@templatical/editor 0.0.5 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +56 -0
- package/README.md +69 -0
- package/dist/{AiChatSidebar-DwME3f-a.js → AiChatSidebar-DSbBLDkW.js} +9 -9
- package/dist/{AiFeatureMenu-DJvWL1GZ.js → AiFeatureMenu-d04gmgud.js} +5 -5
- package/dist/{CloudEditor-Fe0ssRgi.js → CloudEditor-CjO4tzbV.js} +218 -227
- package/dist/{CollaboratorBar-DTT0EkZn.js → CollaboratorBar-DYBSTuMW.js} +3 -3
- package/dist/{CommentsSidebar-DrJhQRXK.js → CommentsSidebar-CQvUh5xt.js} +9 -9
- package/dist/CountdownBlock-D3olfssJ.js +92 -0
- package/dist/CountdownToolbar-ClpBwFoX.js +210 -0
- package/dist/{DesignReferenceSidebar-DdOht5zn.js → DesignReferenceSidebar-BOfeETis.js} +5 -5
- package/dist/{LoadingTrack-vK8W2PJf.js → LoadingTrack-CdqDYVR-.js} +1 -1
- package/dist/{ModuleBrowserModal-CiV_jOEM.js → ModuleBrowserModal-DKSSQonv.js} +7 -7
- package/dist/{ModulePreviewCanvas-Bmy6Y1WE.js → ModulePreviewCanvas-CoLNuu1o.js} +32 -32
- package/dist/NumberWithSuffix-_0l3Q4jq.js +424 -0
- package/dist/{ParagraphEditor-CoQ3NlS7.js → ParagraphEditor-C9R2ou7x.js} +57 -56
- package/dist/{RichTextEditorContent-CHJlh7HJ.js → RichTextEditorContent-BcY3Rcp4.js} +2 -2
- package/dist/{SaveModuleDialog-CD2ZYq1o.js → SaveModuleDialog-DmFe4VUc.js} +3 -3
- package/dist/{SnapshotHistory-DltsKvhP.js → SnapshotHistory-CAhikAOr.js} +7 -7
- package/dist/{TemplateScoringPanel-DmnmUE3y.js → TemplateScoringPanel-b5DnyIll.js} +10 -10
- package/dist/{TestEmailModal-Dl633j9o.js → TestEmailModal-BmDIzGYz.js} +3 -3
- package/dist/{TitleEditor-C7fds2Nc.js → TitleEditor-DtRYx-LS.js} +11 -11
- package/dist/{TplModal-C5_CF-qn.js → TplModal-BLbMDMd6.js} +4 -4
- package/dist/{_plugin-vue_export-helper-B1-bu7yR.js → _plugin-vue_export-helper-BHUPLLh1.js} +2 -2
- package/dist/{blockTypeIcons-BrKZB10B.js → blockTypeIcons-CEU2dMe1.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-C5UQmEgV.js → AiFeatureMenu-DWMSYD2J.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-C5UQmEgV.js.map → AiFeatureMenu-DWMSYD2J.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DeTolKnf.js → CloudEditor-HrfSfr3G.js} +179 -188
- package/dist/cdn/chunks/CloudEditor-HrfSfr3G.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DO1nxSrr.js → CollaboratorBar-Cfok52TZ.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DO1nxSrr.js.map → CollaboratorBar-Cfok52TZ.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-CkV21NEM.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-CkV21NEM.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-CEmbR7kt.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-CEmbR7kt.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-ChBr3aXj.js → ModuleBrowserModal-sASaPRot.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-ChBr3aXj.js.map → ModuleBrowserModal-sASaPRot.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DkSvri9H.js → ModulePreviewCanvas-D8zsajMf.js} +19 -19
- package/dist/cdn/chunks/{ModulePreviewCanvas-DkSvri9H.js.map → ModulePreviewCanvas-D8zsajMf.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-k5Te7Tuw.js +425 -0
- package/dist/cdn/chunks/NumberWithSuffix-k5Te7Tuw.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-DU3oUKA7.js → ParagraphEditor-C1vQWGzW.js} +37 -37
- package/dist/cdn/chunks/ParagraphEditor-C1vQWGzW.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-BrsW1p9s.js → RichTextEditorContent-CT8dBB0R.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-BrsW1p9s.js.map → RichTextEditorContent-CT8dBB0R.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CjqKkTEc.js → SaveModuleDialog-BkwKrB0N.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-CjqKkTEc.js.map → SaveModuleDialog-BkwKrB0N.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C8FYbadT.js → TitleEditor-BXqt42Px.js} +11 -11
- package/dist/cdn/chunks/{TitleEditor-C8FYbadT.js.map → TitleEditor-BXqt42Px.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-5QwYklNq.js → blockTypeIcons-BS6pWyGO.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-5QwYklNq.js.map → blockTypeIcons-BS6pWyGO.js.map} +1 -1
- package/dist/cdn/chunks/{de-BvYD17KT.js → de-3exf7MYE.js} +1 -1
- package/dist/cdn/chunks/{de-BvYD17KT.js.map → de-3exf7MYE.js.map} +1 -1
- package/dist/cdn/chunks/{de-BB3dgVOc.js → de-C8LxVUsb.js} +1 -1
- package/dist/cdn/chunks/de-C8LxVUsb.js.map +1 -0
- package/dist/cdn/chunks/{dist-KYv9v_1z2.js → dist-BpOx-ugr.js} +10 -3
- package/dist/cdn/chunks/dist-BpOx-ugr.js.map +1 -0
- package/dist/cdn/chunks/{draggable-BQNU47zu.js → draggable-Bcb86AsV.js} +1591 -1563
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
- package/dist/cdn/chunks/{emojiData-BVEJHcNH.js → emojiData-DUHzsh4j.js} +1 -1
- package/dist/cdn/chunks/{emojiData-BVEJHcNH.js.map → emojiData-DUHzsh4j.js.map} +1 -1
- package/dist/cdn/chunks/{en-DeDcpnoS.js → en-BoEycuqw.js} +1 -1
- package/dist/cdn/chunks/en-BoEycuqw.js.map +1 -0
- package/dist/cdn/chunks/{en-CpotcOPr.js → en-KNPUKxYp.js} +1 -1
- package/dist/cdn/chunks/{en-CpotcOPr.js.map → en-KNPUKxYp.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-Bj7USRLr.js → extensions-DBxH6pz0.js} +21 -21
- package/dist/cdn/chunks/{extensions-Bj7USRLr.js.map → extensions-DBxH6pz0.js.map} +1 -1
- package/dist/cdn/chunks/{features-Ds0XUfte.js → features-C3n7AeUc.js} +1338 -1422
- package/dist/cdn/chunks/features-C3n7AeUc.js.map +1 -0
- package/dist/cdn/chunks/{icons-fWsuSvgd.js → icons-Hmpb0_8s.js} +2 -2
- package/dist/cdn/chunks/icons-Hmpb0_8s.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-C1VIYISn.js → liquid.browser-CEMn-ZqL.js} +24 -17
- package/dist/cdn/chunks/liquid.browser-CEMn-ZqL.js.map +1 -0
- package/dist/cdn/chunks/{media-library-BGQm_OyC.js → media-library-C1wCpRY1.js} +114 -110
- package/dist/cdn/chunks/media-library-C1wCpRY1.js.map +1 -0
- package/dist/cdn/chunks/{pusher-DJPhQnE8.js → pusher-DwSQn6BA.js} +11 -8
- package/dist/cdn/chunks/pusher-DwSQn6BA.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-3i8rPuqd.js → src-BUszJqfd.js} +8 -8
- package/dist/cdn/chunks/{src-3i8rPuqd.js.map → src-BUszJqfd.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js → styleConstants-DP1VOca8.js} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js.map → styleConstants-DP1VOca8.js.map} +1 -1
- package/dist/cdn/chunks/{styles-Dgijy53u.js → styles-U2VFFgxC.js} +623 -1239
- package/dist/cdn/chunks/styles-U2VFFgxC.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BhxaWR8R.js → tiptap-w5IqC8oW.js} +1610 -1364
- package/dist/cdn/chunks/tiptap-w5IqC8oW.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +92 -97
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B7kDuZmP.js → check-BDE2uFIC.js} +1 -1
- package/dist/{chevron-down-DJLW2Q9Z.js → chevron-down-BL1DcOiT.js} +1 -1
- package/dist/{circle-alert-E2vYPs5r.js → circle-alert-1tetIFJU.js} +1 -1
- package/dist/{clock-lWIIQA3C.js → clock-CNc3isoG.js} +1 -1
- package/dist/{dist-DysAFIPy.js → dist-7SaUYnxo.js} +385 -357
- package/dist/{dist-DmOE-Ubp.js → dist-BKZ5gvJf.js} +5 -5
- package/dist/{dist-CG-vEqSU.js → dist-CLg2qE0p.js} +2 -2
- package/dist/dist-CdzaZZSx.js +5 -0
- package/dist/dist-Cl9giA3B.js +5 -0
- package/dist/{dist-C_ymrGFi.js → dist-CpHKN3mI.js} +541 -508
- package/dist/{dist-4LiM9FDd.js → dist-DMuaebdo.js} +2 -2
- package/dist/{dist-ChAGLpWo.js → dist-DW_4_uv3.js} +2 -2
- package/dist/{dist-C1BIRHCQ.js → dist-DYG6FL7b.js} +2 -2
- package/dist/{dist-DrvKRSU6.js → dist-DbFMBx8E.js} +2 -2
- package/dist/{dist-D_HQYSY-.js → dist-Dn9cOicG.js} +2 -2
- package/dist/{dist-Ci5lFuUy.js → dist-ENKQZrNg.js} +138 -132
- package/dist/{dist-Bu7veieH.js → dist-fEtcLxee.js} +15 -15
- package/dist/{extensions-DWx_jj8v.js → extensions-Y880c0sP.js} +3 -3
- package/dist/{image-up-X4xIq4ea.js → image-up-4ZmaHFga.js} +1 -1
- package/dist/index.d.ts +234 -0
- package/dist/{liquid.browser-BemTg3sZ.js → liquid.browser-DZ62L7up.js} +20 -15
- package/dist/{loader-circle-BTQQxC3l.js → loader-circle-C7YEH4do.js} +1 -1
- package/dist/{message-circle-Blgm6V_h.js → message-circle-B_lxRh4z.js} +1 -1
- package/dist/{refresh-cw-Bb4PEeW1.js → refresh-cw-DmZNoimV.js} +1 -1
- package/dist/rolldown-runtime-gEudmnaM.js +23 -0
- package/dist/{scan-line-7lZPfOdm.js → scan-line-Cc9KlXo5.js} +1 -1
- package/dist/{send-C0ltAQrv.js → send-CMwNWTPX.js} +1 -1
- package/dist/{shield-check-f-qv4RKs.js → shield-check-DZFf4LTh.js} +1 -1
- package/dist/{sparkles-KhBCGlqB.js → sparkles-D80W88H8.js} +1 -1
- package/dist/{styleConstants-Cxw88naD.js → styleConstants-Codo7aUT.js} +6 -45
- package/dist/styles-unyYKihg.js +2942 -0
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +85 -90
- package/dist/text-align-start-Cje6pwo4.js +43 -0
- package/dist/{trash-2-OwjZ-guZ.js → trash-2-BWvxOB4Q.js} +1 -1
- package/dist/{triangle-alert-DOSRIUYZ.js → triangle-alert-C6y94qVX.js} +1 -1
- package/dist/{useEditorCore-DUGD6pq_.js → useEditorCore-CQwWl2js.js} +1143 -1247
- package/dist/{x-CGlq2XQe.js → x-IyhJ6V90.js} +1 -1
- package/package.json +70 -52
- package/dist/cdn/chunks/AiChatSidebar-X_Bv3Qys.js +0 -2
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-4MTw_hue.js +0 -2
- package/dist/cdn/chunks/DesignReferenceSidebar-Bswh4Yx4.js +0 -2
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js.map +0 -1
- package/dist/cdn/chunks/SnapshotHistory-KME4xmn_.js +0 -2
- package/dist/cdn/chunks/TemplateScoringPanel-DgB3xDN6.js +0 -2
- package/dist/cdn/chunks/TestEmailModal-DdpvRbYf.js +0 -2
- package/dist/cdn/chunks/de-BB3dgVOc.js.map +0 -1
- package/dist/cdn/chunks/dist-BF5c3Dr-.js +0 -2
- package/dist/cdn/chunks/dist-BGzvIxcJ.js +0 -2
- package/dist/cdn/chunks/dist-CFemF8rI.js +0 -2
- package/dist/cdn/chunks/dist-Co6uFhFK.js +0 -2
- package/dist/cdn/chunks/dist-DCikBY9K.js +0 -2
- package/dist/cdn/chunks/dist-DUILafAC.js +0 -2
- package/dist/cdn/chunks/dist-DghiKH0A.js +0 -2
- package/dist/cdn/chunks/dist-Dw8ckvfK.js +0 -2
- package/dist/cdn/chunks/dist-H07p0KAw.js +0 -2
- package/dist/cdn/chunks/dist-KYv9v_1z2.js.map +0 -1
- package/dist/cdn/chunks/dist-MjnKIc0W.js +0 -2
- package/dist/cdn/chunks/dist-odp0vGRv.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-Ds0XUfte.js.map +0 -1
- package/dist/cdn/chunks/icons-fWsuSvgd.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +0 -1
- package/dist/cdn/chunks/media-library-BGQm_OyC.js.map +0 -1
- package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +0 -1
- package/dist/cdn/chunks/styles-Dgijy53u.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BhxaWR8R.js.map +0 -1
- package/dist/dist-DkypH7qG.js +0 -5
- package/dist/dist-Dxnd0GRf.js +0 -5
- package/dist/styles-fdXNRqI3.js +0 -3556
- package/dist/templatical-editor.umd.cjs +0 -179
- /package/dist/cdn/chunks/{_rolldown_dynamic_import_helper-DMEI4TQ3.js → _rolldown_dynamic_import_helper-BRcA6nWq.js} +0 -0
- /package/dist/{de-D7TLGIPA.js → de-DCRASLfd.js} +0 -0
- /package/dist/{emojiData-BfWQS72m.js → emojiData-CyACq8qV.js} +0 -0
- /package/dist/{en-DvtiEMwP.js → en-BC0igPeg.js} +0 -0
- /package/dist/{formatRelativeTime-DX3FgqN9.js → formatRelativeTime-mRxw8HK8.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 $e = Object.create, et = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, nt = Object.getOwnPropertyNames, rt = Object.getPrototypeOf, it = Object.prototype.hasOwnProperty, at = (e, t) => () => (e && (t = e(e = 0)), t), ot = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), st = (e, t) => {
|
|
15
|
-
let n = {};
|
|
16
|
-
for (var r in e) et(n, r, {
|
|
17
|
-
get: e[r],
|
|
18
|
-
enumerable: !0
|
|
19
|
-
});
|
|
20
|
-
return t || et(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
21
|
-
}, ct = (e, t, n, r) => {
|
|
22
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i = nt(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !it.call(e, s) && s !== n && et(e, s, {
|
|
23
|
-
get: ((e) => t[e]).bind(null, s),
|
|
24
|
-
enumerable: !(r = tt(t, s)) || r.enumerable
|
|
25
|
-
});
|
|
26
|
-
return e;
|
|
27
|
-
}, lt = (e, t, n) => (n = e == null ? {} : $e(rt(e)), ct(t || !e || !e.__esModule ? et(n, "default", {
|
|
28
|
-
value: e,
|
|
29
|
-
enumerable: !0
|
|
30
|
-
}) : n, e)), ut = (e) => it.call(e, "module.exports") ? e["module.exports"] : ct(et({}, "__esModule", { value: !0 }), e), dt = /* @__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, r as u, s as d } from "./dist-CLg2qE0p.js";
|
|
3
|
+
import { C as f, S as p, T as m, _ as h, a as g, d as _, f as v, g as y, h as b, i as x, l as S, m as C, n as ee, o as w, p as T, s as te, u as E, v as ne, w as re, y as ie } from "./keys-C0MQRs8d.js";
|
|
4
|
+
import { t as D } from "./useI18n-D6m7ZUgY.js";
|
|
5
|
+
import { n as ae, t as oe } from "./_plugin-vue_export-helper-BHUPLLh1.js";
|
|
6
|
+
import { t as se } from "./message-circle-B_lxRh4z.js";
|
|
7
|
+
import { t as ce } from "./trash-2-BWvxOB4Q.js";
|
|
8
|
+
import { t as le } from "./triangle-alert-C6y94qVX.js";
|
|
9
|
+
import { t as ue } from "./LoadingTrack-CdqDYVR-.js";
|
|
10
|
+
import { t as de } from "./useMergeTag-CSXcnFBc.js";
|
|
11
|
+
import { Fragment as fe, computed as O, createBlock as pe, createCommentVNode as me, createElementBlock as k, createElementVNode as A, createTextVNode as he, createVNode as j, defineAsyncComponent as ge, defineComponent as M, getCurrentScope as _e, inject as ve, nextTick as ye, normalizeClass as be, normalizeStyle as N, onBeforeUnmount as xe, onMounted as Se, onScopeDispose as Ce, openBlock as P, provide as F, ref as I, renderList as we, renderSlot as Te, resolveDynamicComponent as Ee, shallowRef as De, toDisplayString as L, triggerRef as Oe, unref as R, vShow as ke, watch as Ae, withCtx as je, withDirectives as Me, withKeys as Ne, withModifiers as Pe } from "vue";
|
|
12
|
+
import { useAutoSave as Fe, useBlockActions as Ie, useConditionPreview as Le, useDataSourceFetch as Re, useHistory as ze, useHistoryInterceptor as Be } from "@templatical/core";
|
|
13
|
+
import { HEADING_LEVEL_FONT_SIZE as Ve, containsMergeTag as He, createButtonBlock as Ue, createCountdownBlock as We, createCustomBlock as Ge, createDividerBlock as Ke, createHtmlBlock as qe, createImageBlock as Je, createMenuBlock as Ye, createParagraphBlock as Xe, createSectionBlock as Ze, createSocialIconsBlock as Qe, createSpacerBlock as $e, createTableBlock as et, createTitleBlock as tt, createVideoBlock as nt, resolveHtmlLogicMergeTagLabels as rt, resolveHtmlMergeTagLabels as it, resolveSyntax as at } from "@templatical/types";
|
|
35
14
|
//#region src/utils/blockTypeLabels.ts
|
|
36
|
-
function
|
|
15
|
+
function ot(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 st(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 pt(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 ? ot(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 pt(e, t) {
|
|
|
134
113
|
}
|
|
135
114
|
//#endregion
|
|
136
115
|
//#region src/composables/useUiTheme.ts
|
|
137
|
-
function
|
|
138
|
-
let t =
|
|
139
|
-
return { resolvedTheme:
|
|
116
|
+
function ct(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 lt = {
|
|
144
123
|
bg: "--tpl-bg",
|
|
145
124
|
bgElevated: "--tpl-bg-elevated",
|
|
146
125
|
bgHover: "--tpl-bg-hover",
|
|
@@ -164,10 +143,10 @@ var ht = {
|
|
|
164
143
|
dangerLight: "--tpl-danger-light",
|
|
165
144
|
canvasBg: "--tpl-canvas-bg"
|
|
166
145
|
};
|
|
167
|
-
function
|
|
168
|
-
return { themeStyles:
|
|
146
|
+
function ut({ 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(lt)) {
|
|
171
150
|
let n = a[e];
|
|
172
151
|
n && (r[t] = n);
|
|
173
152
|
}
|
|
@@ -176,35 +155,35 @@ function gt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
176
155
|
}
|
|
177
156
|
//#endregion
|
|
178
157
|
//#region src/utils/logger.ts
|
|
179
|
-
var
|
|
180
|
-
function
|
|
158
|
+
var dt = "[Templatical]";
|
|
159
|
+
function ft() {
|
|
181
160
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
182
161
|
}
|
|
183
|
-
var
|
|
162
|
+
var pt = {
|
|
184
163
|
warn(...e) {
|
|
185
|
-
console.warn(
|
|
164
|
+
console.warn(dt, ...e);
|
|
186
165
|
},
|
|
187
166
|
error(...e) {
|
|
188
|
-
console.error(
|
|
167
|
+
console.error(dt, ...e);
|
|
189
168
|
},
|
|
190
169
|
debug(...e) {
|
|
191
|
-
|
|
170
|
+
ft() || console.debug(dt, ...e);
|
|
192
171
|
},
|
|
193
172
|
info(...e) {
|
|
194
|
-
|
|
173
|
+
ft() || console.info(dt, ...e);
|
|
195
174
|
}
|
|
196
175
|
};
|
|
197
176
|
//#endregion
|
|
198
177
|
//#region src/composables/useBlockRegistry.ts
|
|
199
|
-
function
|
|
200
|
-
let e =
|
|
178
|
+
function mt() {
|
|
179
|
+
let e = De(/* @__PURE__ */ new Map());
|
|
201
180
|
function t(t, n) {
|
|
202
|
-
e.value.set(t, n),
|
|
181
|
+
e.value.set(t, n), Oe(e);
|
|
203
182
|
}
|
|
204
183
|
function n(t, n) {
|
|
205
184
|
let r = `custom:${t.type}`, i = {
|
|
206
185
|
component: n,
|
|
207
|
-
createBlock: () =>
|
|
186
|
+
createBlock: () => Ge(t),
|
|
208
187
|
sidebarItem: {
|
|
209
188
|
type: r,
|
|
210
189
|
label: t.name,
|
|
@@ -214,7 +193,7 @@ function bt() {
|
|
|
214
193
|
},
|
|
215
194
|
definition: t
|
|
216
195
|
};
|
|
217
|
-
e.value.set(r, i),
|
|
196
|
+
e.value.set(r, i), Oe(e);
|
|
218
197
|
}
|
|
219
198
|
function r(t) {
|
|
220
199
|
if (t.type === "custom") {
|
|
@@ -242,13 +221,13 @@ function bt() {
|
|
|
242
221
|
let t = o(e.customType);
|
|
243
222
|
if (!t) return s("Block definition not found");
|
|
244
223
|
try {
|
|
245
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
224
|
+
let { Liquid: n } = await import("./liquid.browser-DZ62L7up.js");
|
|
246
225
|
return await new n({
|
|
247
226
|
strictVariables: !1,
|
|
248
227
|
strictFilters: !1
|
|
249
228
|
}).parseAndRender(t.template, e.fieldValues);
|
|
250
229
|
} catch (t) {
|
|
251
|
-
return
|
|
230
|
+
return pt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
252
231
|
}
|
|
253
232
|
}
|
|
254
233
|
function l(t) {
|
|
@@ -267,75 +246,75 @@ function bt() {
|
|
|
267
246
|
}
|
|
268
247
|
//#endregion
|
|
269
248
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
270
|
-
var
|
|
249
|
+
var ht = [
|
|
271
250
|
{
|
|
272
251
|
type: "section",
|
|
273
252
|
label: "Section",
|
|
274
|
-
createBlock:
|
|
253
|
+
createBlock: Ze
|
|
275
254
|
},
|
|
276
255
|
{
|
|
277
256
|
type: "title",
|
|
278
257
|
label: "Title",
|
|
279
|
-
createBlock:
|
|
258
|
+
createBlock: tt
|
|
280
259
|
},
|
|
281
260
|
{
|
|
282
261
|
type: "paragraph",
|
|
283
262
|
label: "Paragraph",
|
|
284
|
-
createBlock:
|
|
263
|
+
createBlock: Xe
|
|
285
264
|
},
|
|
286
265
|
{
|
|
287
266
|
type: "image",
|
|
288
267
|
label: "Image",
|
|
289
|
-
createBlock:
|
|
268
|
+
createBlock: Je
|
|
290
269
|
},
|
|
291
270
|
{
|
|
292
271
|
type: "button",
|
|
293
272
|
label: "Button",
|
|
294
|
-
createBlock:
|
|
273
|
+
createBlock: Ue
|
|
295
274
|
},
|
|
296
275
|
{
|
|
297
276
|
type: "divider",
|
|
298
277
|
label: "Divider",
|
|
299
|
-
createBlock:
|
|
278
|
+
createBlock: Ke
|
|
300
279
|
},
|
|
301
280
|
{
|
|
302
281
|
type: "video",
|
|
303
282
|
label: "Video",
|
|
304
|
-
createBlock:
|
|
283
|
+
createBlock: nt
|
|
305
284
|
},
|
|
306
285
|
{
|
|
307
286
|
type: "social",
|
|
308
287
|
label: "Social",
|
|
309
|
-
createBlock:
|
|
288
|
+
createBlock: Qe
|
|
310
289
|
},
|
|
311
290
|
{
|
|
312
291
|
type: "menu",
|
|
313
292
|
label: "Menu",
|
|
314
|
-
createBlock:
|
|
293
|
+
createBlock: Ye
|
|
315
294
|
},
|
|
316
295
|
{
|
|
317
296
|
type: "table",
|
|
318
297
|
label: "Table",
|
|
319
|
-
createBlock:
|
|
298
|
+
createBlock: et
|
|
320
299
|
},
|
|
321
300
|
{
|
|
322
301
|
type: "spacer",
|
|
323
302
|
label: "Spacer",
|
|
324
|
-
createBlock:
|
|
303
|
+
createBlock: $e
|
|
325
304
|
},
|
|
326
305
|
{
|
|
327
306
|
type: "html",
|
|
328
307
|
label: "HTML",
|
|
329
|
-
createBlock:
|
|
308
|
+
createBlock: qe
|
|
330
309
|
},
|
|
331
310
|
{
|
|
332
311
|
type: "countdown",
|
|
333
312
|
label: "Countdown",
|
|
334
|
-
createBlock:
|
|
313
|
+
createBlock: We
|
|
335
314
|
}
|
|
336
315
|
];
|
|
337
|
-
function
|
|
338
|
-
for (let n of
|
|
316
|
+
function gt(e, t) {
|
|
317
|
+
for (let n of ht) {
|
|
339
318
|
let r = t[n.type];
|
|
340
319
|
r && e.registerBuiltIn(n.type, {
|
|
341
320
|
component: r,
|
|
@@ -350,18 +329,18 @@ function St(e, t) {
|
|
|
350
329
|
}
|
|
351
330
|
//#endregion
|
|
352
331
|
//#region src/utils/keyboardShortcuts.ts
|
|
353
|
-
function
|
|
332
|
+
function _t(e) {
|
|
354
333
|
let t = e.target;
|
|
355
334
|
return t.isContentEditable || t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT";
|
|
356
335
|
}
|
|
357
|
-
function
|
|
336
|
+
function vt(e, t) {
|
|
358
337
|
let n = e.metaKey || e.ctrlKey;
|
|
359
338
|
if (n && e.key === "s") {
|
|
360
339
|
e.preventDefault(), t.onSave?.();
|
|
361
340
|
return;
|
|
362
341
|
}
|
|
363
342
|
if (n && e.key.toLowerCase() === "z") {
|
|
364
|
-
if (
|
|
343
|
+
if (_t(e)) return;
|
|
365
344
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
366
345
|
return;
|
|
367
346
|
}
|
|
@@ -369,18 +348,18 @@ function wt(e, t) {
|
|
|
369
348
|
t.selectBlock(null);
|
|
370
349
|
return;
|
|
371
350
|
}
|
|
372
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
351
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !_t(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
373
352
|
}
|
|
374
353
|
//#endregion
|
|
375
354
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
376
|
-
var
|
|
355
|
+
var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ M({
|
|
377
356
|
__name: "ButtonBlock",
|
|
378
357
|
props: {
|
|
379
358
|
block: {},
|
|
380
359
|
viewport: {}
|
|
381
360
|
},
|
|
382
361
|
setup(e) {
|
|
383
|
-
let t = e, n =
|
|
362
|
+
let t = e, n = O(() => {
|
|
384
363
|
let e = {
|
|
385
364
|
display: "inline-block",
|
|
386
365
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -394,101 +373,17 @@ var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
|
394
373
|
};
|
|
395
374
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
396
375
|
});
|
|
397
|
-
return (t, r) => (
|
|
376
|
+
return (t, r) => (P(), k("div", yt, [A("a", {
|
|
398
377
|
href: e.block.url || "#",
|
|
399
|
-
style:
|
|
378
|
+
style: N(n.value),
|
|
400
379
|
class: "tpl:cursor-default",
|
|
401
|
-
onClick: r[0] ||=
|
|
402
|
-
},
|
|
380
|
+
onClick: r[0] ||= Pe(() => {}, ["prevent"])
|
|
381
|
+
}, L(e.block.text), 13, bt)]));
|
|
403
382
|
}
|
|
404
|
-
}),
|
|
405
|
-
key: 0,
|
|
406
|
-
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
407
|
-
}, kt = {
|
|
408
|
-
key: 1,
|
|
409
|
-
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-4 tpl:text-xs tpl:text-[var(--tpl-text-dim)] tpl:opacity-50"
|
|
410
|
-
}, At = { class: "tpl:text-center" }, jt = /* @__PURE__ */ ue({
|
|
411
|
-
__name: "CountdownBlock",
|
|
412
|
-
props: {
|
|
413
|
-
block: {},
|
|
414
|
-
viewport: {}
|
|
415
|
-
},
|
|
416
|
-
setup(e) {
|
|
417
|
-
let t = e, { t: n } = E(), r = R(Date.now());
|
|
418
|
-
i(() => {
|
|
419
|
-
r.value = Date.now();
|
|
420
|
-
}, 1e3);
|
|
421
|
-
let a = k(() => {
|
|
422
|
-
if (!t.block.targetDate) return null;
|
|
423
|
-
let e = new Date(t.block.targetDate);
|
|
424
|
-
return isNaN(e.getTime()) ? null : e.getTime();
|
|
425
|
-
}), o = k(() => a.value ? r.value >= a.value : !1), s = k(() => {
|
|
426
|
-
if (!a.value || o.value) return {
|
|
427
|
-
days: 0,
|
|
428
|
-
hours: 0,
|
|
429
|
-
minutes: 0,
|
|
430
|
-
seconds: 0
|
|
431
|
-
};
|
|
432
|
-
let e = a.value - r.value, t = Math.floor(e / 1e3);
|
|
433
|
-
return {
|
|
434
|
-
days: Math.floor(t / 86400),
|
|
435
|
-
hours: Math.floor(t % 86400 / 3600),
|
|
436
|
-
minutes: Math.floor(t % 3600 / 60),
|
|
437
|
-
seconds: t % 60
|
|
438
|
-
};
|
|
439
|
-
}), c = k(() => {
|
|
440
|
-
let e = [];
|
|
441
|
-
return t.block.showDays && e.push({
|
|
442
|
-
value: String(s.value.days).padStart(2, "0"),
|
|
443
|
-
label: t.block.labelDays
|
|
444
|
-
}), t.block.showHours && e.push({
|
|
445
|
-
value: String(s.value.hours).padStart(2, "0"),
|
|
446
|
-
label: t.block.labelHours
|
|
447
|
-
}), t.block.showMinutes && e.push({
|
|
448
|
-
value: String(s.value.minutes).padStart(2, "0"),
|
|
449
|
-
label: t.block.labelMinutes
|
|
450
|
-
}), t.block.showSeconds && e.push({
|
|
451
|
-
value: String(s.value.seconds).padStart(2, "0"),
|
|
452
|
-
label: t.block.labelSeconds
|
|
453
|
-
}), e;
|
|
454
|
-
}), l = k(() => ({
|
|
455
|
-
backgroundColor: t.block.backgroundColor,
|
|
456
|
-
fontFamily: t.block.fontFamily || "inherit"
|
|
457
|
-
})), u = k(() => ({
|
|
458
|
-
fontSize: `${t.block.digitFontSize}px`,
|
|
459
|
-
fontWeight: "bold",
|
|
460
|
-
color: t.block.digitColor,
|
|
461
|
-
lineHeight: "1.2"
|
|
462
|
-
})), d = k(() => ({
|
|
463
|
-
fontSize: `${t.block.labelFontSize}px`,
|
|
464
|
-
color: t.block.labelColor,
|
|
465
|
-
marginTop: "4px"
|
|
466
|
-
})), f = k(() => ({
|
|
467
|
-
fontSize: `${t.block.digitFontSize}px`,
|
|
468
|
-
color: t.block.digitColor,
|
|
469
|
-
fontFamily: t.block.fontFamily || "inherit"
|
|
470
|
-
}));
|
|
471
|
-
return (t, r) => e.block.targetDate ? o.value && e.block.hideOnExpiry ? (I(), j("div", kt, z(B(n).countdown.hidden), 1)) : o.value ? (I(), j("div", {
|
|
472
|
-
key: 2,
|
|
473
|
-
style: F(l.value),
|
|
474
|
-
class: "tpl:py-4 tpl:text-center"
|
|
475
|
-
}, [M("span", { style: F({
|
|
476
|
-
fontSize: `${e.block.digitFontSize}px`,
|
|
477
|
-
color: e.block.digitColor
|
|
478
|
-
}) }, z(e.block.expiredMessage), 5)], 4)) : (I(), j("div", {
|
|
479
|
-
key: 3,
|
|
480
|
-
style: F(l.value),
|
|
481
|
-
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
|
|
482
|
-
}, [(I(!0), j(oe, null, _e(c.value, (t, n) => (I(), j(oe, { key: t.label }, [n > 0 ? (I(), j("span", {
|
|
483
|
-
key: 0,
|
|
484
|
-
style: F(f.value),
|
|
485
|
-
class: "tpl:self-start"
|
|
486
|
-
}, z(e.block.separator), 5)) : A("", !0), M("div", At, [M("div", { style: F(u.value) }, z(t.value), 5), M("div", { style: F(d.value) }, z(t.label), 5)])], 64))), 128))], 4)) : (I(), j("div", Ot, z(B(n).countdown.setDate), 1));
|
|
487
|
-
}
|
|
488
|
-
}), Mt = D("bookmark", [["path", {
|
|
383
|
+
}), St = ae("bookmark", [["path", {
|
|
489
384
|
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",
|
|
490
385
|
key: "oz39mx"
|
|
491
|
-
}]]),
|
|
386
|
+
}]]), Ct = ae("box", [
|
|
492
387
|
["path", {
|
|
493
388
|
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",
|
|
494
389
|
key: "hh9hay"
|
|
@@ -501,13 +396,13 @@ var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
|
501
396
|
d: "M12 22V12",
|
|
502
397
|
key: "d0xqtd"
|
|
503
398
|
}]
|
|
504
|
-
]),
|
|
399
|
+
]), wt = ae("code", [["path", {
|
|
505
400
|
d: "m16 18 6-6-6-6",
|
|
506
401
|
key: "eg8j8"
|
|
507
402
|
}], ["path", {
|
|
508
403
|
d: "m8 6-6 6 6 6",
|
|
509
404
|
key: "ppft3o"
|
|
510
|
-
}]]),
|
|
405
|
+
}]]), Tt = ae("copy", [["rect", {
|
|
511
406
|
width: "14",
|
|
512
407
|
height: "14",
|
|
513
408
|
x: "8",
|
|
@@ -518,7 +413,7 @@ var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
|
518
413
|
}], ["path", {
|
|
519
414
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
520
415
|
key: "zix9uf"
|
|
521
|
-
}]]),
|
|
416
|
+
}]]), Et = ae("eye-off", [
|
|
522
417
|
["path", {
|
|
523
418
|
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",
|
|
524
419
|
key: "ct8e1f"
|
|
@@ -535,10 +430,10 @@ var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
|
535
430
|
d: "m2 2 20 20",
|
|
536
431
|
key: "1ooewy"
|
|
537
432
|
}]
|
|
538
|
-
]),
|
|
433
|
+
]), Dt = ae("funnel", [["path", {
|
|
539
434
|
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",
|
|
540
435
|
key: "sc7q7i"
|
|
541
|
-
}]]),
|
|
436
|
+
}]]), Ot = ae("grip-vertical", [
|
|
542
437
|
["circle", {
|
|
543
438
|
cx: "9",
|
|
544
439
|
cy: "12",
|
|
@@ -575,7 +470,7 @@ var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
|
575
470
|
r: "1",
|
|
576
471
|
key: "f4zoj3"
|
|
577
472
|
}]
|
|
578
|
-
]),
|
|
473
|
+
]), kt = ae("image", [
|
|
579
474
|
["rect", {
|
|
580
475
|
width: "18",
|
|
581
476
|
height: "18",
|
|
@@ -595,13 +490,13 @@ var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
|
595
490
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
596
491
|
key: "1xmnt7"
|
|
597
492
|
}]
|
|
598
|
-
]),
|
|
493
|
+
]), At = ae("navigation", [["polygon", {
|
|
599
494
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
600
495
|
key: "1ltx0t"
|
|
601
|
-
}]]),
|
|
496
|
+
}]]), jt = ae("puzzle", [["path", {
|
|
602
497
|
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",
|
|
603
498
|
key: "w46dr5"
|
|
604
|
-
}]]),
|
|
499
|
+
}]]), Mt = ae("share-2", [
|
|
605
500
|
["circle", {
|
|
606
501
|
cx: "18",
|
|
607
502
|
cy: "5",
|
|
@@ -634,7 +529,7 @@ var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
|
634
529
|
y2: "10.49",
|
|
635
530
|
key: "1n3mei"
|
|
636
531
|
}]
|
|
637
|
-
]),
|
|
532
|
+
]), Nt = ae("table", [
|
|
638
533
|
["path", {
|
|
639
534
|
d: "M12 3v18",
|
|
640
535
|
key: "108xh3"
|
|
@@ -655,7 +550,7 @@ var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
|
655
550
|
d: "M3 15h18",
|
|
656
551
|
key: "5xshup"
|
|
657
552
|
}]
|
|
658
|
-
]),
|
|
553
|
+
]), Pt = ae("video", [["path", {
|
|
659
554
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
660
555
|
key: "ftymec"
|
|
661
556
|
}], ["rect", {
|
|
@@ -665,95 +560,95 @@ var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
|
665
560
|
height: "12",
|
|
666
561
|
rx: "2",
|
|
667
562
|
key: "158x01"
|
|
668
|
-
}]]),
|
|
563
|
+
}]]), Ft = ["innerHTML"], It = [
|
|
669
564
|
"src",
|
|
670
565
|
"width",
|
|
671
566
|
"height"
|
|
672
|
-
],
|
|
567
|
+
], Lt = /* @__PURE__ */ M({
|
|
673
568
|
__name: "CustomBlockIcon",
|
|
674
569
|
props: {
|
|
675
570
|
icon: {},
|
|
676
571
|
size: {}
|
|
677
572
|
},
|
|
678
573
|
setup(e) {
|
|
679
|
-
let t = e, n =
|
|
680
|
-
return (t, a) => r.value ? (
|
|
574
|
+
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("/")));
|
|
575
|
+
return (t, a) => r.value ? (P(), k("span", {
|
|
681
576
|
key: 0,
|
|
682
577
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
683
|
-
style:
|
|
578
|
+
style: N({
|
|
684
579
|
width: `${n.value}px`,
|
|
685
580
|
height: `${n.value}px`
|
|
686
581
|
}),
|
|
687
582
|
innerHTML: e.icon
|
|
688
|
-
}, null, 12,
|
|
583
|
+
}, null, 12, Ft)) : i.value ? (P(), k("img", {
|
|
689
584
|
key: 1,
|
|
690
585
|
src: e.icon,
|
|
691
586
|
width: n.value,
|
|
692
587
|
height: n.value,
|
|
693
588
|
class: "tpl:inline-block",
|
|
694
589
|
alt: ""
|
|
695
|
-
}, null, 8,
|
|
590
|
+
}, null, 8, It)) : (P(), pe(R(Ct), {
|
|
696
591
|
key: 2,
|
|
697
592
|
size: n.value,
|
|
698
593
|
"stroke-width": 1.5
|
|
699
594
|
}, null, 8, ["size"]));
|
|
700
595
|
}
|
|
701
|
-
}),
|
|
702
|
-
function
|
|
596
|
+
}), Rt = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
597
|
+
function zt(e, t) {
|
|
703
598
|
let n = null, r = null;
|
|
704
599
|
function i() {
|
|
705
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
600
|
+
return e.value ? Array.from(e.value.querySelectorAll(Rt)).filter((e) => e.offsetParent !== null) : [];
|
|
706
601
|
}
|
|
707
|
-
function
|
|
602
|
+
function a(e) {
|
|
708
603
|
if (e.key !== "Tab") return;
|
|
709
604
|
let t = i();
|
|
710
605
|
if (t.length === 0) return;
|
|
711
606
|
let n = t[0], r = t[t.length - 1];
|
|
712
607
|
e.shiftKey ? document.activeElement === n && (e.preventDefault(), r.focus()) : document.activeElement === r && (e.preventDefault(), n.focus());
|
|
713
608
|
}
|
|
714
|
-
function
|
|
609
|
+
function o() {
|
|
715
610
|
n = document.activeElement, requestAnimationFrame(() => {
|
|
716
611
|
let t = i();
|
|
717
612
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
718
|
-
}), r =
|
|
613
|
+
}), r = u(e, "keydown", a);
|
|
719
614
|
}
|
|
720
|
-
function
|
|
615
|
+
function s() {
|
|
721
616
|
r?.(), r = null, n && n.focus && (n.focus(), n = null);
|
|
722
617
|
}
|
|
723
|
-
let
|
|
724
|
-
e && t ?
|
|
618
|
+
let c = Ae([t, e], ([e, t]) => {
|
|
619
|
+
e && t ? o() : s();
|
|
725
620
|
}, { flush: "post" });
|
|
726
|
-
|
|
727
|
-
|
|
621
|
+
Ce(() => {
|
|
622
|
+
c(), s();
|
|
728
623
|
});
|
|
729
624
|
}
|
|
730
625
|
//#endregion
|
|
731
626
|
//#region src/composables/useEmoji.ts
|
|
732
|
-
function
|
|
733
|
-
let [e,
|
|
734
|
-
|
|
735
|
-
if (e &&
|
|
736
|
-
let { emojiCategories: e } = await import("./emojiData-
|
|
737
|
-
|
|
627
|
+
function Bt() {
|
|
628
|
+
let [e, t] = s(!1), n = De([]);
|
|
629
|
+
Ae(e, async (e) => {
|
|
630
|
+
if (e && n.value.length === 0) {
|
|
631
|
+
let { emojiCategories: e } = await import("./emojiData-CyACq8qV.js");
|
|
632
|
+
n.value = e;
|
|
738
633
|
}
|
|
739
634
|
});
|
|
740
|
-
function
|
|
741
|
-
|
|
635
|
+
function r() {
|
|
636
|
+
t();
|
|
742
637
|
}
|
|
743
|
-
function
|
|
638
|
+
function i() {
|
|
744
639
|
e.value = !1;
|
|
745
640
|
}
|
|
746
641
|
return {
|
|
747
|
-
categories:
|
|
642
|
+
categories: n,
|
|
748
643
|
isOpen: e,
|
|
749
|
-
toggle:
|
|
750
|
-
close:
|
|
644
|
+
toggle: r,
|
|
645
|
+
close: i
|
|
751
646
|
};
|
|
752
647
|
}
|
|
753
648
|
//#endregion
|
|
754
649
|
//#region src/composables/useDragDrop.ts
|
|
755
|
-
function
|
|
756
|
-
let { onBlockMove: t, onBlockAdd: n } = e, r =
|
|
650
|
+
function Vt(e) {
|
|
651
|
+
let { onBlockMove: t, onBlockAdd: n } = e, r = I(!1), i = I(null), a = I(null);
|
|
757
652
|
function o(e) {
|
|
758
653
|
r.value = !0, i.value = e;
|
|
759
654
|
}
|
|
@@ -802,7 +697,7 @@ function Zt(e) {
|
|
|
802
697
|
}
|
|
803
698
|
//#endregion
|
|
804
699
|
//#region src/composables/useFonts.ts
|
|
805
|
-
var
|
|
700
|
+
var Ht = [
|
|
806
701
|
{
|
|
807
702
|
value: "Arial",
|
|
808
703
|
label: "Arial"
|
|
@@ -831,7 +726,7 @@ var Qt = [
|
|
|
831
726
|
value: "Courier New",
|
|
832
727
|
label: "Courier New"
|
|
833
728
|
}
|
|
834
|
-
],
|
|
729
|
+
], Ut = {
|
|
835
730
|
arial: "Arial, sans-serif",
|
|
836
731
|
helvetica: "Helvetica, sans-serif",
|
|
837
732
|
georgia: "Georgia, serif",
|
|
@@ -839,14 +734,14 @@ var Qt = [
|
|
|
839
734
|
verdana: "Verdana, sans-serif",
|
|
840
735
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
841
736
|
"courier new": "'Courier New', monospace"
|
|
842
|
-
},
|
|
843
|
-
function
|
|
844
|
-
let t =
|
|
737
|
+
}, Wt = "Arial, sans-serif";
|
|
738
|
+
function Gt(e) {
|
|
739
|
+
let t = I(e?.customFonts ?? []), n = I(!0), r = I(!1), i = O(() => e?.defaultFallback ?? Wt);
|
|
845
740
|
function a(e) {
|
|
846
741
|
n.value = e;
|
|
847
742
|
}
|
|
848
|
-
let o =
|
|
849
|
-
let e = [...
|
|
743
|
+
let o = O(() => {
|
|
744
|
+
let e = [...Ht];
|
|
850
745
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
851
746
|
let r = t.value.map((e) => ({
|
|
852
747
|
value: e.name,
|
|
@@ -859,19 +754,19 @@ function tn(e) {
|
|
|
859
754
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
860
755
|
}
|
|
861
756
|
function c(e) {
|
|
862
|
-
return
|
|
757
|
+
return Ht.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
863
758
|
}
|
|
864
759
|
function l() {
|
|
865
760
|
if (e?.defaultFont) {
|
|
866
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
761
|
+
if (!n.value && !c(e.defaultFont)) return Wt;
|
|
867
762
|
if (s(e.defaultFont)) {
|
|
868
763
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
869
764
|
if (t) return t.value;
|
|
870
765
|
}
|
|
871
766
|
}
|
|
872
|
-
return
|
|
767
|
+
return Wt;
|
|
873
768
|
}
|
|
874
|
-
let u =
|
|
769
|
+
let u = O(() => l());
|
|
875
770
|
function d(e) {
|
|
876
771
|
if (!e) return i.value;
|
|
877
772
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
@@ -879,7 +774,7 @@ function tn(e) {
|
|
|
879
774
|
let e = n.fallback ?? i.value;
|
|
880
775
|
return `'${n.name}', ${e}`;
|
|
881
776
|
}
|
|
882
|
-
return
|
|
777
|
+
return Ut[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
883
778
|
}
|
|
884
779
|
let f = [];
|
|
885
780
|
async function p() {
|
|
@@ -895,7 +790,7 @@ function tn(e) {
|
|
|
895
790
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
896
791
|
}), f.push(t);
|
|
897
792
|
} catch (t) {
|
|
898
|
-
|
|
793
|
+
pt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
899
794
|
}
|
|
900
795
|
});
|
|
901
796
|
await Promise.allSettled(e), r.value = !0;
|
|
@@ -904,7 +799,7 @@ function tn(e) {
|
|
|
904
799
|
for (let e of f) e.remove();
|
|
905
800
|
f.length = 0;
|
|
906
801
|
}
|
|
907
|
-
return
|
|
802
|
+
return _e() && Ce(m), {
|
|
908
803
|
fonts: o,
|
|
909
804
|
defaultFont: u,
|
|
910
805
|
defaultFallback: i,
|
|
@@ -920,9 +815,9 @@ function tn(e) {
|
|
|
920
815
|
}
|
|
921
816
|
//#endregion
|
|
922
817
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
923
|
-
function
|
|
924
|
-
let t =
|
|
925
|
-
|
|
818
|
+
function Kt(e) {
|
|
819
|
+
let t = I(!1), n = I(""), r = I(null);
|
|
820
|
+
zt(r, t);
|
|
926
821
|
function i() {
|
|
927
822
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
928
823
|
}
|
|
@@ -955,19 +850,19 @@ function nn(e) {
|
|
|
955
850
|
}
|
|
956
851
|
//#endregion
|
|
957
852
|
//#region src/composables/useRichTextEditor.ts
|
|
958
|
-
function
|
|
959
|
-
let t =
|
|
853
|
+
function qt(e) {
|
|
854
|
+
let t = ve(v, null), { mergeTags: n, isEnabled: r, isRequesting: i, requestMergeTag: a, syntax: o } = de(), s = De(null), { showLinkDialog: c, linkUrl: l, linkDialogRef: f, openLinkDialog: p, insertLink: m, removeLink: h, closeLinkDialog: g, handleLinkKeydown: _ } = Kt(s), { start: y, stop: b } = d(() => s.value?.commands.focus("end"), 0, { immediate: !1 }), x = De(null), S = I(!0), C = I(null);
|
|
960
855
|
async function ee() {
|
|
961
856
|
C.value = null, S.value = !0;
|
|
962
857
|
try {
|
|
963
858
|
let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
|
|
964
859
|
mergeTags: n,
|
|
965
|
-
syntax:
|
|
860
|
+
syntax: o
|
|
966
861
|
});
|
|
967
862
|
x.value = i;
|
|
968
|
-
let
|
|
969
|
-
a.forEach((e, t) =>
|
|
970
|
-
extensions: a.filter((e, t) =>
|
|
863
|
+
let c = /* @__PURE__ */ new Map();
|
|
864
|
+
a.forEach((e, t) => c.set(e.name, t)), s.value = new r({
|
|
865
|
+
extensions: a.filter((e, t) => c.get(e.name) === t),
|
|
971
866
|
content: e.blockContent(),
|
|
972
867
|
editable: !0,
|
|
973
868
|
onUpdate: ({ editor: n }) => {
|
|
@@ -975,164 +870,164 @@ function rn(e) {
|
|
|
975
870
|
}
|
|
976
871
|
}), S.value = !1, y();
|
|
977
872
|
} catch (t) {
|
|
978
|
-
|
|
873
|
+
pt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), C.value = t instanceof Error ? t.message : "Failed to load editor", S.value = !1;
|
|
979
874
|
}
|
|
980
875
|
}
|
|
981
876
|
function w() {
|
|
982
|
-
|
|
877
|
+
s.value?.destroy(), s.value = null, ee();
|
|
983
878
|
}
|
|
984
879
|
ee();
|
|
985
|
-
let T =
|
|
986
|
-
|
|
880
|
+
let T = Ae(() => e.blockContent(), (e) => {
|
|
881
|
+
s.value && s.value.getHTML() !== e && s.value.commands.setContent(e, { emitUpdate: !1 });
|
|
987
882
|
});
|
|
988
|
-
function
|
|
883
|
+
function te(t) {
|
|
989
884
|
if (i.value) return;
|
|
990
885
|
let n = t.target;
|
|
991
886
|
e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone();
|
|
992
887
|
}
|
|
993
|
-
|
|
994
|
-
T(), b(),
|
|
888
|
+
u(document, "mousedown", te), xe(() => {
|
|
889
|
+
T(), b(), s.value?.destroy();
|
|
995
890
|
});
|
|
996
|
-
async function
|
|
997
|
-
let e = await
|
|
998
|
-
e &&
|
|
891
|
+
async function E() {
|
|
892
|
+
let e = await a();
|
|
893
|
+
e && s.value ? s.value.chain().focus().insertMergeTag({
|
|
999
894
|
label: e.label,
|
|
1000
895
|
value: e.value
|
|
1001
|
-
}).run() :
|
|
896
|
+
}).run() : s.value?.commands.focus();
|
|
1002
897
|
}
|
|
1003
898
|
return {
|
|
1004
|
-
editor:
|
|
899
|
+
editor: s,
|
|
1005
900
|
EditorContent: x,
|
|
1006
901
|
isLoading: S,
|
|
1007
902
|
initError: C,
|
|
1008
903
|
retry: w,
|
|
1009
|
-
showLinkDialog:
|
|
1010
|
-
linkUrl:
|
|
904
|
+
showLinkDialog: c,
|
|
905
|
+
linkUrl: l,
|
|
1011
906
|
linkDialogRef: f,
|
|
1012
907
|
mergeTags: n,
|
|
1013
908
|
mergeTagEnabled: r,
|
|
1014
909
|
isRequestingMergeTag: i,
|
|
1015
|
-
syntax:
|
|
1016
|
-
openLinkDialog:
|
|
1017
|
-
insertLink:
|
|
1018
|
-
removeLink:
|
|
1019
|
-
closeLinkDialog:
|
|
1020
|
-
handleLinkKeydown:
|
|
1021
|
-
handleAddMergeTag:
|
|
910
|
+
syntax: o,
|
|
911
|
+
openLinkDialog: p,
|
|
912
|
+
insertLink: m,
|
|
913
|
+
removeLink: h,
|
|
914
|
+
closeLinkDialog: g,
|
|
915
|
+
handleLinkKeydown: _,
|
|
916
|
+
handleAddMergeTag: E
|
|
1022
917
|
};
|
|
1023
918
|
}
|
|
1024
919
|
//#endregion
|
|
1025
920
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1026
|
-
var
|
|
921
|
+
var Jt = { class: "tpl:w-full" }, Yt = {
|
|
1027
922
|
key: 0,
|
|
1028
923
|
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)]"
|
|
1029
|
-
},
|
|
924
|
+
}, Xt = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Zt = {
|
|
1030
925
|
key: 1,
|
|
1031
926
|
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)]"
|
|
1032
|
-
},
|
|
927
|
+
}, Qt = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, $t = {
|
|
1033
928
|
key: 2,
|
|
1034
929
|
class: "tpl:relative"
|
|
1035
|
-
},
|
|
930
|
+
}, en = ["innerHTML"], tn = {
|
|
1036
931
|
key: 0,
|
|
1037
932
|
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]",
|
|
1038
933
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1039
|
-
},
|
|
934
|
+
}, nn = /* @__PURE__ */ M({
|
|
1040
935
|
__name: "CustomBlock",
|
|
1041
936
|
props: {
|
|
1042
937
|
block: {},
|
|
1043
938
|
viewport: {}
|
|
1044
939
|
},
|
|
1045
940
|
emits: ["fetchData"],
|
|
1046
|
-
setup(
|
|
1047
|
-
let
|
|
941
|
+
setup(e, { emit: t }) {
|
|
942
|
+
let n = e, r = t, { t: i } = D(), a = ve(w, 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 } = Re({
|
|
1048
943
|
definition: l,
|
|
1049
|
-
block:
|
|
944
|
+
block: O(() => n.block),
|
|
1050
945
|
onUpdate: (e, t) => {
|
|
1051
|
-
|
|
946
|
+
r("fetchData", {
|
|
1052
947
|
fieldValues: e,
|
|
1053
948
|
dataSourceFetched: t
|
|
1054
949
|
});
|
|
1055
950
|
}
|
|
1056
951
|
});
|
|
1057
952
|
async function h() {
|
|
1058
|
-
if (
|
|
953
|
+
if (a) {
|
|
1059
954
|
c.value = !1;
|
|
1060
955
|
try {
|
|
1061
|
-
let e = await
|
|
956
|
+
let e = await a.renderCustomBlock(n.block);
|
|
1062
957
|
e.includes("Template render error:") && (c.value = !0), s.value = e;
|
|
1063
958
|
} catch {
|
|
1064
959
|
c.value = !0, s.value = "";
|
|
1065
960
|
}
|
|
1066
961
|
}
|
|
1067
962
|
}
|
|
1068
|
-
let g =
|
|
1069
|
-
return
|
|
963
|
+
let g = o(h, 150);
|
|
964
|
+
return Se(() => {
|
|
1070
965
|
h();
|
|
1071
|
-
}),
|
|
966
|
+
}), Ae(() => n.block.fieldValues, () => {
|
|
1072
967
|
g();
|
|
1073
|
-
}, { deep: !0 }), (e, t) => (
|
|
968
|
+
}, { deep: !0 }), (e, t) => (P(), k("div", Jt, [u.value ? c.value ? (P(), k("div", Zt, [j(R(le), {
|
|
1074
969
|
size: 24,
|
|
1075
970
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1076
|
-
}),
|
|
971
|
+
}), A("span", Qt, L(R(i).customBlocks.renderError), 1)])) : (P(), k("div", $t, [A("div", { innerHTML: s.value }, null, 8, en), R(m) && R(p) ? (P(), k("div", tn, [R(d) ? (P(), pe(ue, {
|
|
1077
972
|
key: 1,
|
|
1078
973
|
class: "tpl:w-48"
|
|
1079
|
-
})) : (
|
|
974
|
+
})) : (P(), k("button", {
|
|
1080
975
|
key: 0,
|
|
1081
976
|
type: "button",
|
|
1082
977
|
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)]",
|
|
1083
|
-
onClick: t[0] ||=
|
|
1084
|
-
}, [l.value?.icon ? (
|
|
978
|
+
onClick: t[0] ||= Pe((...e) => R(f) && R(f)(...e), ["stop"])
|
|
979
|
+
}, [l.value?.icon ? (P(), pe(Lt, {
|
|
1085
980
|
key: 0,
|
|
1086
981
|
icon: l.value.icon,
|
|
1087
982
|
size: 16
|
|
1088
|
-
}, null, 8, ["icon"])) :
|
|
983
|
+
}, null, 8, ["icon"])) : me("", !0), he(" " + L(l.value?.dataSource?.label || R(i).customBlocks.dataSource.fetchButton), 1)]))])) : me("", !0)])) : (P(), k("div", Yt, [j(R(jt), {
|
|
1089
984
|
size: 24,
|
|
1090
985
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1091
|
-
}),
|
|
986
|
+
}), A("span", Xt, L(R(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1092
987
|
}
|
|
1093
|
-
}),
|
|
988
|
+
}), rn = { class: "tpl:w-full" }, an = /* @__PURE__ */ M({
|
|
1094
989
|
__name: "DividerBlock",
|
|
1095
990
|
props: {
|
|
1096
991
|
block: {},
|
|
1097
992
|
viewport: {}
|
|
1098
993
|
},
|
|
1099
994
|
setup(e) {
|
|
1100
|
-
let t = e, n =
|
|
995
|
+
let t = e, n = O(() => ({
|
|
1101
996
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1102
997
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
1103
998
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1104
999
|
}));
|
|
1105
|
-
return (e, t) => (
|
|
1000
|
+
return (e, t) => (P(), k("div", rn, [A("hr", {
|
|
1106
1001
|
class: "tpl:m-0 tpl:border-none",
|
|
1107
|
-
style:
|
|
1002
|
+
style: N(n.value)
|
|
1108
1003
|
}, null, 4)]));
|
|
1109
1004
|
}
|
|
1110
|
-
}),
|
|
1005
|
+
}), on = { class: "tpl:w-full" }, sn = { 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)]" }, cn = {
|
|
1111
1006
|
key: 0,
|
|
1112
1007
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1113
|
-
},
|
|
1008
|
+
}, ln = {
|
|
1114
1009
|
key: 1,
|
|
1115
1010
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1116
|
-
},
|
|
1011
|
+
}, un = /* @__PURE__ */ M({
|
|
1117
1012
|
__name: "HtmlBlock",
|
|
1118
1013
|
props: {
|
|
1119
1014
|
block: {},
|
|
1120
1015
|
viewport: {}
|
|
1121
1016
|
},
|
|
1122
1017
|
setup(e) {
|
|
1123
|
-
let t = e, { t: n } =
|
|
1124
|
-
return (e, t) => (
|
|
1018
|
+
let t = e, { t: n } = D(), r = O(() => t.block.content.trim().length > 0);
|
|
1019
|
+
return (e, t) => (P(), k("div", on, [A("div", sn, [j(R(wt), {
|
|
1125
1020
|
size: 24,
|
|
1126
1021
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1127
|
-
}), r.value ? (
|
|
1022
|
+
}), r.value ? (P(), k("span", cn, L(R(n).html.preview), 1)) : (P(), k("span", ln, L(R(n).html.empty), 1))])]));
|
|
1128
1023
|
}
|
|
1129
|
-
}),
|
|
1024
|
+
}), dn = ["href"], fn = ["src", "alt"], pn = ["src", "alt"], mn = {
|
|
1130
1025
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1131
1026
|
style: { opacity: "0.7" }
|
|
1132
|
-
},
|
|
1027
|
+
}, hn = ["href"], gn = ["src", "alt"], _n = ["src", "alt"], vn = {
|
|
1133
1028
|
key: 3,
|
|
1134
1029
|
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)]"
|
|
1135
|
-
},
|
|
1030
|
+
}, yn = ["aria-label"], bn = { key: 1 }, xn = /* @__PURE__ */ M({
|
|
1136
1031
|
__name: "ImageBlock",
|
|
1137
1032
|
props: {
|
|
1138
1033
|
block: {},
|
|
@@ -1140,7 +1035,7 @@ var an = { class: "tpl:w-full" }, on = {
|
|
|
1140
1035
|
},
|
|
1141
1036
|
emits: ["update"],
|
|
1142
1037
|
setup(e, { emit: t }) {
|
|
1143
|
-
let n = e, r = t, { t: i } =
|
|
1038
|
+
let n = e, r = t, { t: i } = D(), { syntax: a } = de(), o = ve(ne, null), s = O(() => !!o);
|
|
1144
1039
|
async function c() {
|
|
1145
1040
|
let e = await o?.({ accept: ["images"] });
|
|
1146
1041
|
if (e) {
|
|
@@ -1148,82 +1043,82 @@ var an = { class: "tpl:w-full" }, on = {
|
|
|
1148
1043
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1149
1044
|
}
|
|
1150
1045
|
}
|
|
1151
|
-
let l =
|
|
1046
|
+
let l = O(() => ({ textAlign: n.block.align })), u = O(() => ({
|
|
1152
1047
|
maxWidth: "100%",
|
|
1153
1048
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1154
1049
|
display: "block",
|
|
1155
1050
|
margin: n.block.align === "center" ? "0 auto" : void 0,
|
|
1156
1051
|
marginLeft: n.block.align === "right" ? "auto" : void 0
|
|
1157
|
-
})), d =
|
|
1158
|
-
return (t, n) => (
|
|
1052
|
+
})), d = O(() => He(n.block.src, a));
|
|
1053
|
+
return (t, n) => (P(), k("div", {
|
|
1159
1054
|
class: "tpl:w-full",
|
|
1160
|
-
style:
|
|
1161
|
-
}, [e.block.src && d.value && e.block.placeholderUrl ? (
|
|
1055
|
+
style: N(l.value)
|
|
1056
|
+
}, [e.block.src && d.value && e.block.placeholderUrl ? (P(), k(fe, { key: 0 }, [e.block.linkUrl ? (P(), k("a", {
|
|
1162
1057
|
key: 0,
|
|
1163
1058
|
href: e.block.linkUrl,
|
|
1164
1059
|
target: "_blank",
|
|
1165
1060
|
rel: "noopener noreferrer",
|
|
1166
|
-
onClick: n[0] ||=
|
|
1167
|
-
}, [
|
|
1061
|
+
onClick: n[0] ||= Pe(() => {}, ["prevent"])
|
|
1062
|
+
}, [A("img", {
|
|
1168
1063
|
class: "tpl:border-0",
|
|
1169
1064
|
loading: "lazy",
|
|
1170
1065
|
src: e.block.placeholderUrl,
|
|
1171
|
-
alt: e.block.alt ||
|
|
1172
|
-
style:
|
|
1173
|
-
}, null, 12,
|
|
1066
|
+
alt: e.block.alt || R(i).image.altTextPlaceholder,
|
|
1067
|
+
style: N(u.value)
|
|
1068
|
+
}, null, 12, fn)], 8, dn)) : (P(), k("img", {
|
|
1174
1069
|
key: 1,
|
|
1175
1070
|
class: "tpl:border-0",
|
|
1176
1071
|
src: e.block.placeholderUrl,
|
|
1177
1072
|
alt: e.block.alt,
|
|
1178
|
-
style:
|
|
1179
|
-
}, null, 12,
|
|
1073
|
+
style: N(u.value)
|
|
1074
|
+
}, null, 12, pn))], 64)) : e.block.src && d.value ? (P(), k("div", {
|
|
1180
1075
|
key: 1,
|
|
1181
1076
|
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)]",
|
|
1182
|
-
style:
|
|
1183
|
-
}, [
|
|
1077
|
+
style: N([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
1078
|
+
}, [j(R(kt), {
|
|
1184
1079
|
size: 32,
|
|
1185
1080
|
"stroke-width": 1.5,
|
|
1186
1081
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1187
1082
|
style: { opacity: "0.5" }
|
|
1188
|
-
}),
|
|
1083
|
+
}), A("span", mn, L(e.block.src), 1)], 4)) : e.block.src ? (P(), k(fe, { key: 2 }, [e.block.linkUrl ? (P(), k("a", {
|
|
1189
1084
|
key: 0,
|
|
1190
1085
|
href: e.block.linkUrl,
|
|
1191
1086
|
target: "_blank",
|
|
1192
1087
|
rel: "noopener noreferrer",
|
|
1193
|
-
onClick: n[1] ||=
|
|
1194
|
-
}, [
|
|
1088
|
+
onClick: n[1] ||= Pe(() => {}, ["prevent"])
|
|
1089
|
+
}, [A("img", {
|
|
1195
1090
|
class: "tpl:border-0",
|
|
1196
1091
|
loading: "lazy",
|
|
1197
1092
|
src: e.block.src,
|
|
1198
|
-
alt: e.block.alt ||
|
|
1199
|
-
style:
|
|
1200
|
-
}, null, 12,
|
|
1093
|
+
alt: e.block.alt || R(i).image.altTextPlaceholder,
|
|
1094
|
+
style: N(u.value)
|
|
1095
|
+
}, null, 12, gn)], 8, hn)) : (P(), k("img", {
|
|
1201
1096
|
key: 1,
|
|
1202
1097
|
class: "tpl:border-0",
|
|
1203
1098
|
src: e.block.src,
|
|
1204
1099
|
alt: e.block.alt,
|
|
1205
|
-
style:
|
|
1206
|
-
}, null, 12,
|
|
1100
|
+
style: N(u.value)
|
|
1101
|
+
}, null, 12, _n))], 64)) : (P(), k("div", vn, [s.value ? (P(), k("button", {
|
|
1207
1102
|
key: 0,
|
|
1208
|
-
"aria-label":
|
|
1103
|
+
"aria-label": R(i).image.browseMedia,
|
|
1209
1104
|
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)]",
|
|
1210
|
-
onClick:
|
|
1211
|
-
}, [
|
|
1105
|
+
onClick: Pe(c, ["stop"])
|
|
1106
|
+
}, [j(R(kt), {
|
|
1212
1107
|
size: 14,
|
|
1213
1108
|
"stroke-width": 1.5
|
|
1214
|
-
}),
|
|
1109
|
+
}), he(" " + L(R(i).image.browseMedia), 1)], 8, yn)) : (P(), k("span", bn, L(R(i).image.clickToAdd), 1))]))], 4));
|
|
1215
1110
|
}
|
|
1216
|
-
}),
|
|
1111
|
+
}), Sn = { class: "tpl:w-full" }, Cn = ["href"], wn = {
|
|
1217
1112
|
key: 1,
|
|
1218
1113
|
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)]"
|
|
1219
|
-
},
|
|
1114
|
+
}, Tn = /* @__PURE__ */ M({
|
|
1220
1115
|
__name: "MenuBlock",
|
|
1221
1116
|
props: {
|
|
1222
1117
|
block: {},
|
|
1223
1118
|
viewport: {}
|
|
1224
1119
|
},
|
|
1225
1120
|
setup(e) {
|
|
1226
|
-
let t = e, { t: n } =
|
|
1121
|
+
let t = e, { t: n } = D(), r = O(() => ({
|
|
1227
1122
|
display: "flex",
|
|
1228
1123
|
flexWrap: "wrap",
|
|
1229
1124
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1231,94 +1126,94 @@ var an = { class: "tpl:w-full" }, on = {
|
|
|
1231
1126
|
fontSize: `${t.block.fontSize}px`,
|
|
1232
1127
|
fontFamily: t.block.fontFamily || "inherit",
|
|
1233
1128
|
alignItems: "center"
|
|
1234
|
-
})), i =
|
|
1129
|
+
})), i = O(() => t.block.items.length > 0);
|
|
1235
1130
|
function a(e) {
|
|
1236
1131
|
return e || t.block.linkColor || t.block.color;
|
|
1237
1132
|
}
|
|
1238
|
-
return (t, o) => (
|
|
1133
|
+
return (t, o) => (P(), k("div", Sn, [i.value ? (P(), k("div", {
|
|
1239
1134
|
key: 0,
|
|
1240
|
-
style:
|
|
1241
|
-
}, [(
|
|
1135
|
+
style: N(r.value)
|
|
1136
|
+
}, [(P(!0), k(fe, null, we(e.block.items, (t, n) => (P(), k(fe, { key: t.id }, [A("a", {
|
|
1242
1137
|
href: t.url || "#",
|
|
1243
1138
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1244
|
-
style:
|
|
1139
|
+
style: N({
|
|
1245
1140
|
color: a(t.color),
|
|
1246
1141
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1247
1142
|
textDecoration: t.underline ? "underline" : "none"
|
|
1248
1143
|
}),
|
|
1249
|
-
onClick: o[0] ||=
|
|
1250
|
-
},
|
|
1144
|
+
onClick: o[0] ||= Pe(() => {}, ["prevent"])
|
|
1145
|
+
}, L(t.text || "..."), 13, Cn), n < e.block.items.length - 1 ? (P(), k("span", {
|
|
1251
1146
|
key: 0,
|
|
1252
|
-
style:
|
|
1147
|
+
style: N({
|
|
1253
1148
|
color: e.block.separatorColor,
|
|
1254
1149
|
padding: `0 ${e.block.spacing}px`
|
|
1255
1150
|
})
|
|
1256
|
-
},
|
|
1151
|
+
}, L(e.block.separator), 5)) : me("", !0)], 64))), 128))], 4)) : (P(), k("div", wn, [j(R(At), { size: 16 }), A("span", null, L(R(n).menu.addLinks), 1)]))]));
|
|
1257
1152
|
}
|
|
1258
1153
|
});
|
|
1259
1154
|
//#endregion
|
|
1260
1155
|
//#region src/composables/useEditableTextBlock.ts
|
|
1261
|
-
function
|
|
1262
|
-
let t =
|
|
1263
|
-
top:
|
|
1264
|
-
left:
|
|
1156
|
+
function En(e) {
|
|
1157
|
+
let t = ve(y, []), { syntax: n } = de(), r = O(() => rt(it(e(), t), n)), i = I(!1), a = I(null), { top: o, left: s } = l(a), c = O(() => ({
|
|
1158
|
+
top: o.value - 8,
|
|
1159
|
+
left: s.value
|
|
1265
1160
|
}));
|
|
1266
1161
|
function u() {
|
|
1267
|
-
|
|
1162
|
+
i.value = !0;
|
|
1268
1163
|
}
|
|
1269
1164
|
function d() {
|
|
1270
|
-
|
|
1165
|
+
i.value = !1;
|
|
1271
1166
|
}
|
|
1272
1167
|
return {
|
|
1273
|
-
isEditing:
|
|
1274
|
-
blockRef:
|
|
1275
|
-
toolbarPosition:
|
|
1276
|
-
resolvedContent:
|
|
1168
|
+
isEditing: i,
|
|
1169
|
+
blockRef: a,
|
|
1170
|
+
toolbarPosition: c,
|
|
1171
|
+
resolvedContent: r,
|
|
1277
1172
|
handleDoubleClick: u,
|
|
1278
1173
|
handleEditorDone: d
|
|
1279
1174
|
};
|
|
1280
1175
|
}
|
|
1281
1176
|
//#endregion
|
|
1282
1177
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1283
|
-
var
|
|
1178
|
+
var Dn = ["innerHTML"], On = /* @__PURE__ */ M({
|
|
1284
1179
|
__name: "ParagraphBlock",
|
|
1285
1180
|
props: {
|
|
1286
1181
|
block: {},
|
|
1287
1182
|
viewport: {}
|
|
1288
1183
|
},
|
|
1289
1184
|
setup(e) {
|
|
1290
|
-
let t = e, n =
|
|
1291
|
-
return (t, l) => (
|
|
1185
|
+
let t = e, n = ge(() => import("./ParagraphEditor-C9R2ou7x.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = En(() => t.block.content);
|
|
1186
|
+
return (t, l) => (P(), k("div", {
|
|
1292
1187
|
ref_key: "blockRef",
|
|
1293
1188
|
ref: i,
|
|
1294
1189
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1295
|
-
onDblclick: l[0] ||= (...e) =>
|
|
1296
|
-
}, [
|
|
1190
|
+
onDblclick: l[0] ||= (...e) => R(s) && R(s)(...e)
|
|
1191
|
+
}, [R(r) ? (P(), pe(R(n), {
|
|
1297
1192
|
key: 0,
|
|
1298
1193
|
block: e.block,
|
|
1299
|
-
"toolbar-position":
|
|
1300
|
-
onDone:
|
|
1194
|
+
"toolbar-position": R(a),
|
|
1195
|
+
onDone: R(c)
|
|
1301
1196
|
}, null, 8, [
|
|
1302
1197
|
"block",
|
|
1303
1198
|
"toolbar-position",
|
|
1304
1199
|
"onDone"
|
|
1305
|
-
])) : (
|
|
1200
|
+
])) : (P(), k("div", {
|
|
1306
1201
|
key: 1,
|
|
1307
1202
|
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",
|
|
1308
|
-
innerHTML:
|
|
1309
|
-
}, null, 8,
|
|
1203
|
+
innerHTML: R(o)
|
|
1204
|
+
}, null, 8, Dn))], 544));
|
|
1310
1205
|
}
|
|
1311
1206
|
});
|
|
1312
1207
|
//#endregion
|
|
1313
1208
|
//#region src/utils/blockComponentResolver.ts
|
|
1314
|
-
function
|
|
1209
|
+
function kn(e, t, n) {
|
|
1315
1210
|
if (t) {
|
|
1316
1211
|
let n = t.getComponent(e);
|
|
1317
1212
|
if (n) return n;
|
|
1318
1213
|
}
|
|
1319
1214
|
return n[e.type] ?? null;
|
|
1320
1215
|
}
|
|
1321
|
-
function
|
|
1216
|
+
function An(e) {
|
|
1322
1217
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
1323
1218
|
return {
|
|
1324
1219
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -1328,20 +1223,20 @@ function Bn(e) {
|
|
|
1328
1223
|
}
|
|
1329
1224
|
//#endregion
|
|
1330
1225
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1331
|
-
var
|
|
1226
|
+
var jn = ["data-block-id", "data-block-type"], Mn = ["aria-label"], Nn = [
|
|
1332
1227
|
"aria-label",
|
|
1333
1228
|
"aria-pressed",
|
|
1334
1229
|
"title"
|
|
1335
|
-
],
|
|
1230
|
+
], Pn = ["aria-label", "title"], Fn = ["aria-label", "title"], In = ["aria-label", "title"], Ln = {
|
|
1336
1231
|
key: 1,
|
|
1337
1232
|
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"
|
|
1338
|
-
},
|
|
1233
|
+
}, Rn = { 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)]" }, zn = {
|
|
1339
1234
|
key: 2,
|
|
1340
1235
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1341
|
-
},
|
|
1236
|
+
}, Bn = ["aria-label", "title"], Vn = {
|
|
1342
1237
|
key: 3,
|
|
1343
1238
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1344
|
-
},
|
|
1239
|
+
}, Hn = ["aria-label"], Un = /* @__PURE__ */ oe(/* @__PURE__ */ M({
|
|
1345
1240
|
__name: "BlockWrapper",
|
|
1346
1241
|
props: {
|
|
1347
1242
|
block: {},
|
|
@@ -1351,9 +1246,9 @@ var Vn = ["data-block-id", "data-block-type"], Hn = ["aria-label"], Un = [
|
|
|
1351
1246
|
},
|
|
1352
1247
|
emits: ["select"],
|
|
1353
1248
|
setup(e, { emit: t }) {
|
|
1354
|
-
let n = e, r = t, { t: i, format: a } =
|
|
1249
|
+
let n = e, r = t, { t: i, format: a } = D(), o = ve(b, 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);
|
|
1355
1250
|
async function u() {
|
|
1356
|
-
await
|
|
1251
|
+
await ye(), s.value?.focus();
|
|
1357
1252
|
}
|
|
1358
1253
|
function d(e) {
|
|
1359
1254
|
if (o) {
|
|
@@ -1374,153 +1269,153 @@ var Vn = ["data-block-id", "data-block-type"], Hn = ["aria-label"], Un = [
|
|
|
1374
1269
|
}
|
|
1375
1270
|
}
|
|
1376
1271
|
}
|
|
1377
|
-
let f =
|
|
1272
|
+
let f = O(() => !n.viewport || !n.block.visibility ? !1 : n.block.visibility[n.viewport] === !1), p = O(() => n.viewport ? {
|
|
1378
1273
|
desktop: i.viewport.desktop,
|
|
1379
1274
|
tablet: i.viewport.tablet,
|
|
1380
1275
|
mobile: i.viewport.mobile
|
|
1381
|
-
}[n.viewport] ?? n.viewport : ""), m =
|
|
1382
|
-
function
|
|
1276
|
+
}[n.viewport] ?? n.viewport : ""), m = O(() => !!n.block.displayCondition), h = ve(x, null), g = ve(S, null), _ = ve(te, {}), v = O(() => !!_.savedModules), y = O(() => _.comments?.getBlockCount(n.block.id) ?? 0), C = O(() => An(n.block));
|
|
1277
|
+
function ee(e) {
|
|
1383
1278
|
n.previewMode || (e.stopPropagation(), r("select"));
|
|
1384
1279
|
}
|
|
1385
|
-
function
|
|
1386
|
-
|
|
1280
|
+
function w() {
|
|
1281
|
+
h?.deleteBlock(n.block.id);
|
|
1387
1282
|
}
|
|
1388
|
-
function
|
|
1389
|
-
|
|
1283
|
+
function T() {
|
|
1284
|
+
h?.duplicateBlock(n.block);
|
|
1390
1285
|
}
|
|
1391
|
-
function
|
|
1392
|
-
|
|
1286
|
+
function E() {
|
|
1287
|
+
_.savedModules?.openSaveDialog(n.block.id);
|
|
1393
1288
|
}
|
|
1394
|
-
function
|
|
1395
|
-
|
|
1289
|
+
function ne() {
|
|
1290
|
+
g?.toggleBlock(n.block.id);
|
|
1396
1291
|
}
|
|
1397
|
-
return (t, n) => (
|
|
1398
|
-
class:
|
|
1292
|
+
return (t, n) => (P(), k("div", {
|
|
1293
|
+
class: be(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
1399
1294
|
"tpl-block--selected": e.isSelected,
|
|
1400
1295
|
"tpl-block--idle": !e.isSelected,
|
|
1401
1296
|
"tpl-block--lifted": c.value
|
|
1402
1297
|
}]),
|
|
1403
|
-
style:
|
|
1298
|
+
style: N(C.value),
|
|
1404
1299
|
"data-block-id": e.block.id,
|
|
1405
1300
|
"data-block-type": e.block.type,
|
|
1406
1301
|
draggable: "false",
|
|
1407
|
-
onClick:
|
|
1302
|
+
onClick: ee
|
|
1408
1303
|
}, [
|
|
1409
|
-
e.isSelected ? (
|
|
1304
|
+
e.isSelected ? (P(), k("div", {
|
|
1410
1305
|
key: 0,
|
|
1411
1306
|
role: "toolbar",
|
|
1412
|
-
"aria-label":
|
|
1307
|
+
"aria-label": R(i).blockActions.drag,
|
|
1413
1308
|
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)]"
|
|
1414
1309
|
}, [
|
|
1415
|
-
|
|
1310
|
+
A("button", {
|
|
1416
1311
|
ref_key: "dragButtonRef",
|
|
1417
1312
|
ref: s,
|
|
1418
1313
|
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",
|
|
1419
1314
|
"aria-label": l.value,
|
|
1420
1315
|
"aria-pressed": c.value,
|
|
1421
1316
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1422
|
-
title:
|
|
1317
|
+
title: R(i).blockActions.drag,
|
|
1423
1318
|
onKeydown: d
|
|
1424
|
-
}, [
|
|
1319
|
+
}, [j(R(Ot), {
|
|
1425
1320
|
size: 14,
|
|
1426
1321
|
"stroke-width": 1.5
|
|
1427
|
-
})], 40,
|
|
1428
|
-
|
|
1322
|
+
})], 40, Nn),
|
|
1323
|
+
A("button", {
|
|
1429
1324
|
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",
|
|
1430
|
-
"aria-label":
|
|
1431
|
-
title:
|
|
1432
|
-
onClick:
|
|
1433
|
-
}, [
|
|
1325
|
+
"aria-label": R(i).blockActions.duplicate,
|
|
1326
|
+
title: R(i).blockActions.duplicate,
|
|
1327
|
+
onClick: Pe(T, ["stop"])
|
|
1328
|
+
}, [j(R(Tt), {
|
|
1434
1329
|
size: 14,
|
|
1435
1330
|
"stroke-width": 1.5
|
|
1436
|
-
})], 8,
|
|
1437
|
-
|
|
1331
|
+
})], 8, Pn),
|
|
1332
|
+
v.value ? (P(), k("button", {
|
|
1438
1333
|
key: 0,
|
|
1439
1334
|
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",
|
|
1440
|
-
"aria-label":
|
|
1441
|
-
title:
|
|
1442
|
-
onClick:
|
|
1443
|
-
}, [
|
|
1335
|
+
"aria-label": R(i).blockActions.saveAsModule,
|
|
1336
|
+
title: R(i).blockActions.saveAsModule,
|
|
1337
|
+
onClick: Pe(E, ["stop"])
|
|
1338
|
+
}, [j(R(St), {
|
|
1444
1339
|
size: 14,
|
|
1445
1340
|
"stroke-width": 1.5
|
|
1446
|
-
})], 8,
|
|
1447
|
-
|
|
1341
|
+
})], 8, Fn)) : me("", !0),
|
|
1342
|
+
A("button", {
|
|
1448
1343
|
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",
|
|
1449
|
-
"aria-label":
|
|
1450
|
-
title:
|
|
1451
|
-
onClick:
|
|
1452
|
-
}, [
|
|
1344
|
+
"aria-label": R(i).blockActions.delete,
|
|
1345
|
+
title: R(i).blockActions.delete,
|
|
1346
|
+
onClick: Pe(w, ["stop"])
|
|
1347
|
+
}, [j(R(ce), {
|
|
1453
1348
|
size: 14,
|
|
1454
1349
|
"stroke-width": 1.5
|
|
1455
|
-
})], 8,
|
|
1456
|
-
], 8,
|
|
1457
|
-
f.value ? (
|
|
1350
|
+
})], 8, In)
|
|
1351
|
+
], 8, Mn)) : me("", !0),
|
|
1352
|
+
f.value ? (P(), k("div", Ln, [A("span", Rn, [j(R(Et), {
|
|
1458
1353
|
size: 12,
|
|
1459
1354
|
"stroke-width": 1.5
|
|
1460
|
-
}),
|
|
1461
|
-
m.value && !f.value ? (
|
|
1355
|
+
}), he(" " + L(R(a)(R(i).blockActions.hiddenOnViewport, { viewport: p.value })), 1)])])) : me("", !0),
|
|
1356
|
+
m.value && !f.value ? (P(), k("div", zn, [A("button", {
|
|
1462
1357
|
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)]",
|
|
1463
|
-
"aria-label":
|
|
1358
|
+
"aria-label": R(i).blockActions.conditionToggle,
|
|
1464
1359
|
title: e.block.displayCondition?.label,
|
|
1465
|
-
onClick:
|
|
1466
|
-
}, [
|
|
1360
|
+
onClick: Pe(ne, ["stop"])
|
|
1361
|
+
}, [j(R(Dt), {
|
|
1467
1362
|
size: 12,
|
|
1468
1363
|
"stroke-width": 2
|
|
1469
|
-
})], 8,
|
|
1470
|
-
|
|
1364
|
+
})], 8, Bn)])) : me("", !0),
|
|
1365
|
+
y.value > 0 && !f.value ? (P(), k("div", Vn, [A("button", {
|
|
1471
1366
|
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)]",
|
|
1472
|
-
"aria-label":
|
|
1473
|
-
onClick: n[0] ||=
|
|
1474
|
-
}, [
|
|
1367
|
+
"aria-label": R(a)(R(i).blockActions.comments, { count: String(y.value) }),
|
|
1368
|
+
onClick: n[0] ||= Pe((t) => R(_).comments?.openForBlock(e.block.id), ["stop"])
|
|
1369
|
+
}, [j(R(se), {
|
|
1475
1370
|
size: 12,
|
|
1476
1371
|
"stroke-width": 2.5
|
|
1477
|
-
}),
|
|
1478
|
-
|
|
1479
|
-
], 14,
|
|
1372
|
+
}), he(" " + L(y.value), 1)], 8, Hn)])) : me("", !0),
|
|
1373
|
+
Te(t.$slots, "default", {}, void 0, !0)
|
|
1374
|
+
], 14, jn));
|
|
1480
1375
|
}
|
|
1481
|
-
}), [["__scopeId", "data-v-
|
|
1376
|
+
}), [["__scopeId", "data-v-ca10edcb"]]), Wn = ["innerHTML"], Gn = /* @__PURE__ */ M({
|
|
1482
1377
|
__name: "TitleBlock",
|
|
1483
1378
|
props: {
|
|
1484
1379
|
block: {},
|
|
1485
1380
|
viewport: {}
|
|
1486
1381
|
},
|
|
1487
1382
|
setup(e) {
|
|
1488
|
-
let t = e, n =
|
|
1383
|
+
let t = e, n = ge(() => import("./TitleEditor-DtRYx-LS.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = En(() => t.block.content), l = O(() => {
|
|
1489
1384
|
let e = {
|
|
1490
|
-
fontSize: `${
|
|
1385
|
+
fontSize: `${Ve[t.block.level]}px`,
|
|
1491
1386
|
color: t.block.color,
|
|
1492
1387
|
textAlign: t.block.textAlign
|
|
1493
1388
|
};
|
|
1494
1389
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1495
1390
|
});
|
|
1496
|
-
return (t, u) => (
|
|
1391
|
+
return (t, u) => (P(), k("div", {
|
|
1497
1392
|
ref_key: "blockRef",
|
|
1498
1393
|
ref: i,
|
|
1499
1394
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1500
|
-
style:
|
|
1501
|
-
onDblclick: u[0] ||= (...e) =>
|
|
1502
|
-
}, [
|
|
1395
|
+
style: N(l.value),
|
|
1396
|
+
onDblclick: u[0] ||= (...e) => R(s) && R(s)(...e)
|
|
1397
|
+
}, [R(r) ? (P(), pe(R(n), {
|
|
1503
1398
|
key: 0,
|
|
1504
1399
|
block: e.block,
|
|
1505
|
-
"toolbar-position":
|
|
1506
|
-
onDone:
|
|
1400
|
+
"toolbar-position": R(a),
|
|
1401
|
+
onDone: R(c)
|
|
1507
1402
|
}, null, 8, [
|
|
1508
1403
|
"block",
|
|
1509
1404
|
"toolbar-position",
|
|
1510
1405
|
"onDone"
|
|
1511
|
-
])) : (
|
|
1406
|
+
])) : (P(), k("div", {
|
|
1512
1407
|
key: 1,
|
|
1513
1408
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
|
|
1514
|
-
innerHTML:
|
|
1515
|
-
}, null, 8,
|
|
1409
|
+
innerHTML: R(o)
|
|
1410
|
+
}, null, 8, Wn))], 36));
|
|
1516
1411
|
}
|
|
1517
|
-
}),
|
|
1518
|
-
MultiDrag: () =>
|
|
1519
|
-
Sortable: () =>
|
|
1520
|
-
Swap: () =>
|
|
1521
|
-
default: () =>
|
|
1412
|
+
}), Kn = /* @__PURE__ */ i({
|
|
1413
|
+
MultiDrag: () => Zr,
|
|
1414
|
+
Sortable: () => G,
|
|
1415
|
+
Swap: () => Yr,
|
|
1416
|
+
default: () => G
|
|
1522
1417
|
});
|
|
1523
|
-
function
|
|
1418
|
+
function qn(e, t) {
|
|
1524
1419
|
var n = Object.keys(e);
|
|
1525
1420
|
if (Object.getOwnPropertySymbols) {
|
|
1526
1421
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1530,26 +1425,26 @@ function rr(e, t) {
|
|
|
1530
1425
|
}
|
|
1531
1426
|
return n;
|
|
1532
1427
|
}
|
|
1533
|
-
function
|
|
1428
|
+
function Jn(e) {
|
|
1534
1429
|
for (var t = 1; t < arguments.length; t++) {
|
|
1535
1430
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
1536
|
-
t % 2 ?
|
|
1537
|
-
|
|
1538
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1431
|
+
t % 2 ? qn(Object(n), !0).forEach(function(t) {
|
|
1432
|
+
Xn(e, t, n[t]);
|
|
1433
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : qn(Object(n)).forEach(function(t) {
|
|
1539
1434
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1540
1435
|
});
|
|
1541
1436
|
}
|
|
1542
1437
|
return e;
|
|
1543
1438
|
}
|
|
1544
|
-
function
|
|
1439
|
+
function Yn(e) {
|
|
1545
1440
|
"@babel/helpers - typeof";
|
|
1546
|
-
return
|
|
1441
|
+
return Yn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1547
1442
|
return typeof e;
|
|
1548
1443
|
} : function(e) {
|
|
1549
1444
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1550
|
-
},
|
|
1445
|
+
}, Yn(e);
|
|
1551
1446
|
}
|
|
1552
|
-
function
|
|
1447
|
+
function Xn(e, t, n) {
|
|
1553
1448
|
return t in e ? Object.defineProperty(e, t, {
|
|
1554
1449
|
value: n,
|
|
1555
1450
|
enumerable: !0,
|
|
@@ -1557,65 +1452,65 @@ function or(e, t, n) {
|
|
|
1557
1452
|
writable: !0
|
|
1558
1453
|
}) : e[t] = n, e;
|
|
1559
1454
|
}
|
|
1560
|
-
function
|
|
1561
|
-
return
|
|
1455
|
+
function Zn() {
|
|
1456
|
+
return Zn = Object.assign || function(e) {
|
|
1562
1457
|
for (var t = 1; t < arguments.length; t++) {
|
|
1563
1458
|
var n = arguments[t];
|
|
1564
1459
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1565
1460
|
}
|
|
1566
1461
|
return e;
|
|
1567
|
-
},
|
|
1462
|
+
}, Zn.apply(this, arguments);
|
|
1568
1463
|
}
|
|
1569
|
-
function
|
|
1464
|
+
function Qn(e, t) {
|
|
1570
1465
|
if (e == null) return {};
|
|
1571
1466
|
var n = {}, r = Object.keys(e), i, a;
|
|
1572
1467
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
1573
1468
|
return n;
|
|
1574
1469
|
}
|
|
1575
|
-
function
|
|
1470
|
+
function $n(e, t) {
|
|
1576
1471
|
if (e == null) return {};
|
|
1577
|
-
var n =
|
|
1472
|
+
var n = Qn(e, t), r, i;
|
|
1578
1473
|
if (Object.getOwnPropertySymbols) {
|
|
1579
1474
|
var a = Object.getOwnPropertySymbols(e);
|
|
1580
1475
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
1581
1476
|
}
|
|
1582
1477
|
return n;
|
|
1583
1478
|
}
|
|
1584
|
-
function
|
|
1585
|
-
return
|
|
1479
|
+
function er(e) {
|
|
1480
|
+
return tr(e) || nr(e) || rr(e) || ar();
|
|
1586
1481
|
}
|
|
1587
|
-
function
|
|
1588
|
-
if (Array.isArray(e)) return
|
|
1482
|
+
function tr(e) {
|
|
1483
|
+
if (Array.isArray(e)) return ir(e);
|
|
1589
1484
|
}
|
|
1590
|
-
function
|
|
1485
|
+
function nr(e) {
|
|
1591
1486
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1592
1487
|
}
|
|
1593
|
-
function
|
|
1488
|
+
function rr(e, t) {
|
|
1594
1489
|
if (e) {
|
|
1595
|
-
if (typeof e == "string") return
|
|
1490
|
+
if (typeof e == "string") return ir(e, t);
|
|
1596
1491
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
1597
1492
|
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
1598
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
1493
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ir(e, t);
|
|
1599
1494
|
}
|
|
1600
1495
|
}
|
|
1601
|
-
function
|
|
1496
|
+
function ir(e, t) {
|
|
1602
1497
|
(t == null || t > e.length) && (t = e.length);
|
|
1603
1498
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
1604
1499
|
return r;
|
|
1605
1500
|
}
|
|
1606
|
-
function
|
|
1501
|
+
function ar() {
|
|
1607
1502
|
throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1608
1503
|
}
|
|
1609
|
-
function
|
|
1504
|
+
function or(e) {
|
|
1610
1505
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
1611
1506
|
}
|
|
1612
|
-
function
|
|
1613
|
-
e.addEventListener(t, n, !
|
|
1507
|
+
function z(e, t, n) {
|
|
1508
|
+
e.addEventListener(t, n, !ni && ci);
|
|
1614
1509
|
}
|
|
1615
|
-
function
|
|
1616
|
-
e.removeEventListener(t, n, !
|
|
1510
|
+
function B(e, t, n) {
|
|
1511
|
+
e.removeEventListener(t, n, !ni && ci);
|
|
1617
1512
|
}
|
|
1618
|
-
function
|
|
1513
|
+
function sr(e, t) {
|
|
1619
1514
|
if (t) {
|
|
1620
1515
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
1621
1516
|
if (e.matches) return e.matches(t);
|
|
@@ -1627,40 +1522,40 @@ function _r(e, t) {
|
|
|
1627
1522
|
return !1;
|
|
1628
1523
|
}
|
|
1629
1524
|
}
|
|
1630
|
-
function
|
|
1525
|
+
function cr(e) {
|
|
1631
1526
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
1632
1527
|
}
|
|
1633
|
-
function
|
|
1528
|
+
function lr(e, t, n, r) {
|
|
1634
1529
|
if (e) {
|
|
1635
1530
|
n ||= document;
|
|
1636
1531
|
do {
|
|
1637
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
1532
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && sr(e, t) : sr(e, t)) || r && e === n) return e;
|
|
1638
1533
|
if (e === n) break;
|
|
1639
|
-
} while (e =
|
|
1534
|
+
} while (e = cr(e));
|
|
1640
1535
|
}
|
|
1641
1536
|
return null;
|
|
1642
1537
|
}
|
|
1643
|
-
function
|
|
1644
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
1538
|
+
function V(e, t, n) {
|
|
1539
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(li, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(li, " "));
|
|
1645
1540
|
}
|
|
1646
|
-
function
|
|
1541
|
+
function H(e, t, n) {
|
|
1647
1542
|
var r = e && e.style;
|
|
1648
1543
|
if (r) {
|
|
1649
1544
|
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];
|
|
1650
1545
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
1651
1546
|
}
|
|
1652
1547
|
}
|
|
1653
|
-
function
|
|
1548
|
+
function ur(e, t) {
|
|
1654
1549
|
var n = "";
|
|
1655
1550
|
if (typeof e == "string") n = e;
|
|
1656
1551
|
else do {
|
|
1657
|
-
var r =
|
|
1552
|
+
var r = H(e, "transform");
|
|
1658
1553
|
r && r !== "none" && (n = r + " " + n);
|
|
1659
1554
|
} while (!t && (e = e.parentNode));
|
|
1660
1555
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
1661
1556
|
return i && new i(n);
|
|
1662
1557
|
}
|
|
1663
|
-
function
|
|
1558
|
+
function dr(e, t, n) {
|
|
1664
1559
|
if (e) {
|
|
1665
1560
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
1666
1561
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -1668,21 +1563,21 @@ function xr(e, t, n) {
|
|
|
1668
1563
|
}
|
|
1669
1564
|
return [];
|
|
1670
1565
|
}
|
|
1671
|
-
function
|
|
1566
|
+
function fr() {
|
|
1672
1567
|
return document.scrollingElement || document.documentElement;
|
|
1673
1568
|
}
|
|
1674
|
-
function
|
|
1569
|
+
function U(e, t, n, r, i) {
|
|
1675
1570
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
1676
1571
|
var a, o, s, c, l, u, d;
|
|
1677
|
-
if (e !== window && e.parentNode && e !==
|
|
1678
|
-
if (i && i.getBoundingClientRect && (
|
|
1572
|
+
if (e !== window && e.parentNode && e !== fr() ? (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, !ni)) do
|
|
1573
|
+
if (i && i.getBoundingClientRect && (H(i, "transform") !== "none" || n && H(i, "position") !== "static")) {
|
|
1679
1574
|
var f = i.getBoundingClientRect();
|
|
1680
|
-
o -= f.top + parseInt(
|
|
1575
|
+
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;
|
|
1681
1576
|
break;
|
|
1682
1577
|
}
|
|
1683
1578
|
while (i = i.parentNode);
|
|
1684
1579
|
if (r && e !== window) {
|
|
1685
|
-
var p =
|
|
1580
|
+
var p = ur(i || e), m = p && p.a, h = p && p.d;
|
|
1686
1581
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
1687
1582
|
}
|
|
1688
1583
|
return {
|
|
@@ -1695,18 +1590,18 @@ function G(e, t, n, r, i) {
|
|
|
1695
1590
|
};
|
|
1696
1591
|
}
|
|
1697
1592
|
}
|
|
1698
|
-
function
|
|
1699
|
-
for (var r =
|
|
1700
|
-
var a =
|
|
1593
|
+
function pr(e, t, n) {
|
|
1594
|
+
for (var r = vr(e, !0), i = U(e)[t]; r;) {
|
|
1595
|
+
var a = U(r)[n], o = void 0;
|
|
1701
1596
|
if (o = n === "top" || n === "left" ? i >= a : i <= a, !o) return r;
|
|
1702
|
-
if (r ===
|
|
1703
|
-
r =
|
|
1597
|
+
if (r === fr()) break;
|
|
1598
|
+
r = vr(r, !1);
|
|
1704
1599
|
}
|
|
1705
1600
|
return !1;
|
|
1706
1601
|
}
|
|
1707
|
-
function
|
|
1602
|
+
function mr(e, t, n, r) {
|
|
1708
1603
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
1709
|
-
if (o[a].style.display !== "none" && o[a] !==
|
|
1604
|
+
if (o[a].style.display !== "none" && o[a] !== G.ghost && (r || o[a] !== G.dragged) && lr(o[a], n.draggable, e, !1)) {
|
|
1710
1605
|
if (i === t) return o[a];
|
|
1711
1606
|
i++;
|
|
1712
1607
|
}
|
|
@@ -1714,91 +1609,91 @@ function wr(e, t, n, r) {
|
|
|
1714
1609
|
}
|
|
1715
1610
|
return null;
|
|
1716
1611
|
}
|
|
1717
|
-
function
|
|
1718
|
-
for (var n = e.lastElementChild; n && (n ===
|
|
1612
|
+
function hr(e, t) {
|
|
1613
|
+
for (var n = e.lastElementChild; n && (n === G.ghost || H(n, "display") === "none" || t && !sr(n, t));) n = n.previousElementSibling;
|
|
1719
1614
|
return n || null;
|
|
1720
1615
|
}
|
|
1721
|
-
function
|
|
1616
|
+
function W(e, t) {
|
|
1722
1617
|
var n = 0;
|
|
1723
1618
|
if (!e || !e.parentNode) return -1;
|
|
1724
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !==
|
|
1619
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== G.clone && (!t || sr(e, t)) && n++;
|
|
1725
1620
|
return n;
|
|
1726
1621
|
}
|
|
1727
|
-
function
|
|
1728
|
-
var t = 0, n = 0, r =
|
|
1622
|
+
function gr(e) {
|
|
1623
|
+
var t = 0, n = 0, r = fr();
|
|
1729
1624
|
if (e) do {
|
|
1730
|
-
var i =
|
|
1625
|
+
var i = ur(e), a = i.a, o = i.d;
|
|
1731
1626
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
1732
1627
|
} while (e !== r && (e = e.parentNode));
|
|
1733
1628
|
return [t, n];
|
|
1734
1629
|
}
|
|
1735
|
-
function
|
|
1630
|
+
function _r(e, t) {
|
|
1736
1631
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
1737
1632
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
1738
1633
|
}
|
|
1739
1634
|
return -1;
|
|
1740
1635
|
}
|
|
1741
|
-
function
|
|
1742
|
-
if (!e || !e.getBoundingClientRect) return
|
|
1636
|
+
function vr(e, t) {
|
|
1637
|
+
if (!e || !e.getBoundingClientRect) return fr();
|
|
1743
1638
|
var n = e, r = !1;
|
|
1744
1639
|
do
|
|
1745
1640
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
1746
|
-
var i =
|
|
1641
|
+
var i = H(n);
|
|
1747
1642
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
1748
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
1643
|
+
if (!n.getBoundingClientRect || n === document.body) return fr();
|
|
1749
1644
|
if (r || t) return n;
|
|
1750
1645
|
r = !0;
|
|
1751
1646
|
}
|
|
1752
1647
|
}
|
|
1753
1648
|
while (n = n.parentNode);
|
|
1754
|
-
return
|
|
1649
|
+
return fr();
|
|
1755
1650
|
}
|
|
1756
|
-
function
|
|
1651
|
+
function yr(e, t) {
|
|
1757
1652
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1758
1653
|
return e;
|
|
1759
1654
|
}
|
|
1760
|
-
function
|
|
1655
|
+
function br(e, t) {
|
|
1761
1656
|
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);
|
|
1762
1657
|
}
|
|
1763
|
-
function
|
|
1658
|
+
function xr(e, t) {
|
|
1764
1659
|
return function() {
|
|
1765
|
-
if (!
|
|
1660
|
+
if (!ui) {
|
|
1766
1661
|
var n = arguments, r = this;
|
|
1767
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
1768
|
-
|
|
1662
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), ui = setTimeout(function() {
|
|
1663
|
+
ui = void 0;
|
|
1769
1664
|
}, t);
|
|
1770
1665
|
}
|
|
1771
1666
|
};
|
|
1772
1667
|
}
|
|
1773
|
-
function
|
|
1774
|
-
clearTimeout(
|
|
1668
|
+
function Sr() {
|
|
1669
|
+
clearTimeout(ui), ui = void 0;
|
|
1775
1670
|
}
|
|
1776
|
-
function
|
|
1671
|
+
function Cr(e, t, n) {
|
|
1777
1672
|
e.scrollLeft += t, e.scrollTop += n;
|
|
1778
1673
|
}
|
|
1779
|
-
function
|
|
1674
|
+
function wr(e) {
|
|
1780
1675
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
1781
1676
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
1782
1677
|
}
|
|
1783
|
-
function
|
|
1784
|
-
|
|
1678
|
+
function Tr(e, t) {
|
|
1679
|
+
H(e, "position", "absolute"), H(e, "top", t.top), H(e, "left", t.left), H(e, "width", t.width), H(e, "height", t.height);
|
|
1785
1680
|
}
|
|
1786
|
-
function
|
|
1787
|
-
|
|
1681
|
+
function Er(e) {
|
|
1682
|
+
H(e, "position", ""), H(e, "top", ""), H(e, "left", ""), H(e, "width", ""), H(e, "height", "");
|
|
1788
1683
|
}
|
|
1789
|
-
function
|
|
1684
|
+
function Dr() {
|
|
1790
1685
|
var e = [], t;
|
|
1791
1686
|
return {
|
|
1792
1687
|
captureAnimationState: function() {
|
|
1793
1688
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
1794
|
-
if (!(
|
|
1689
|
+
if (!(H(t, "display") === "none" || t === G.ghost)) {
|
|
1795
1690
|
e.push({
|
|
1796
1691
|
target: t,
|
|
1797
|
-
rect:
|
|
1692
|
+
rect: U(t)
|
|
1798
1693
|
});
|
|
1799
|
-
var n =
|
|
1694
|
+
var n = Jn({}, e[e.length - 1].rect);
|
|
1800
1695
|
if (t.thisAnimationDuration) {
|
|
1801
|
-
var r =
|
|
1696
|
+
var r = ur(t, !0);
|
|
1802
1697
|
r && (n.top -= r.f, n.left -= r.e);
|
|
1803
1698
|
}
|
|
1804
1699
|
t.fromRect = n;
|
|
@@ -1809,7 +1704,7 @@ function Lr() {
|
|
|
1809
1704
|
e.push(t);
|
|
1810
1705
|
},
|
|
1811
1706
|
removeAnimationState: function(t) {
|
|
1812
|
-
e.splice(
|
|
1707
|
+
e.splice(_r(e, { target: t }), 1);
|
|
1813
1708
|
},
|
|
1814
1709
|
animateAll: function(n) {
|
|
1815
1710
|
var r = this;
|
|
@@ -1819,8 +1714,8 @@ function Lr() {
|
|
|
1819
1714
|
}
|
|
1820
1715
|
var i = !1, a = 0;
|
|
1821
1716
|
e.forEach(function(e) {
|
|
1822
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
1823
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
1717
|
+
var t = 0, n = e.target, o = n.fromRect, s = U(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = ur(n, !0);
|
|
1718
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && br(c, s) && !br(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = kr(u, c, l, r.options)), br(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() {
|
|
1824
1719
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
1825
1720
|
}, t), n.thisAnimationDuration = t);
|
|
1826
1721
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -1829,49 +1724,49 @@ function Lr() {
|
|
|
1829
1724
|
},
|
|
1830
1725
|
animate: function(e, t, n, r) {
|
|
1831
1726
|
if (r) {
|
|
1832
|
-
|
|
1833
|
-
var i =
|
|
1834
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
1835
|
-
|
|
1727
|
+
H(e, "transition", ""), H(e, "transform", "");
|
|
1728
|
+
var i = ur(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
1729
|
+
e.animatingX = !!s, e.animatingY = !!c, H(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Or(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() {
|
|
1730
|
+
H(e, "transition", ""), H(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
1836
1731
|
}, r);
|
|
1837
1732
|
}
|
|
1838
1733
|
}
|
|
1839
1734
|
};
|
|
1840
1735
|
}
|
|
1841
|
-
function
|
|
1736
|
+
function Or(e) {
|
|
1842
1737
|
return e.offsetWidth;
|
|
1843
1738
|
}
|
|
1844
|
-
function
|
|
1739
|
+
function kr(e, t, n, r) {
|
|
1845
1740
|
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;
|
|
1846
1741
|
}
|
|
1847
|
-
function
|
|
1742
|
+
function Ar(e) {
|
|
1848
1743
|
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;
|
|
1849
|
-
if (t ||= n && n[
|
|
1744
|
+
if (t ||= n && n[di], t) {
|
|
1850
1745
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
1851
|
-
window.CustomEvent && !
|
|
1746
|
+
window.CustomEvent && !ni && !ri ? h = new CustomEvent(r, {
|
|
1852
1747
|
bubbles: !0,
|
|
1853
1748
|
cancelable: !0
|
|
1854
1749
|
}) : (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;
|
|
1855
|
-
var v =
|
|
1750
|
+
var v = Jn(Jn({}, m), mi.getEventProperties(r, t));
|
|
1856
1751
|
for (var y in v) h[y] = v[y];
|
|
1857
1752
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
1858
1753
|
}
|
|
1859
1754
|
}
|
|
1860
|
-
function
|
|
1861
|
-
|
|
1862
|
-
putSortable:
|
|
1863
|
-
cloneEl:
|
|
1864
|
-
targetEl:
|
|
1865
|
-
rootEl:
|
|
1866
|
-
oldIndex:
|
|
1867
|
-
oldDraggableIndex:
|
|
1868
|
-
newIndex:
|
|
1869
|
-
newDraggableIndex:
|
|
1755
|
+
function jr(e) {
|
|
1756
|
+
Ar(Jn({
|
|
1757
|
+
putSortable: Ti,
|
|
1758
|
+
cloneEl: X,
|
|
1759
|
+
targetEl: K,
|
|
1760
|
+
rootEl: Y,
|
|
1761
|
+
oldIndex: bi,
|
|
1762
|
+
oldDraggableIndex: Si,
|
|
1763
|
+
newIndex: xi,
|
|
1764
|
+
newDraggableIndex: Ci
|
|
1870
1765
|
}, e));
|
|
1871
1766
|
}
|
|
1872
|
-
function
|
|
1767
|
+
function G(e, t) {
|
|
1873
1768
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
1874
|
-
this.el = e, this.options = t =
|
|
1769
|
+
this.el = e, this.options = t = Zn({}, t), e[di] = this;
|
|
1875
1770
|
var n = {
|
|
1876
1771
|
group: null,
|
|
1877
1772
|
sort: !0,
|
|
@@ -1884,7 +1779,7 @@ function q(e, t) {
|
|
|
1884
1779
|
invertedSwapThreshold: null,
|
|
1885
1780
|
removeCloneOnHide: !0,
|
|
1886
1781
|
direction: function() {
|
|
1887
|
-
return
|
|
1782
|
+
return Xi(e, this.options);
|
|
1888
1783
|
},
|
|
1889
1784
|
ghostClass: "sortable-ghost",
|
|
1890
1785
|
chosenClass: "sortable-chosen",
|
|
@@ -1911,68 +1806,68 @@ function q(e, t) {
|
|
|
1911
1806
|
x: 0,
|
|
1912
1807
|
y: 0
|
|
1913
1808
|
},
|
|
1914
|
-
supportPointer:
|
|
1809
|
+
supportPointer: G.supportPointer !== !1 && "PointerEvent" in window && !ai,
|
|
1915
1810
|
emptyInsertThreshold: 5
|
|
1916
1811
|
};
|
|
1917
|
-
for (var r in
|
|
1918
|
-
for (var i in
|
|
1919
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1812
|
+
for (var r in mi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
1813
|
+
for (var i in $i(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
1814
|
+
this.nativeDraggable = t.forceFallback ? !1 : Ji, 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)), Oi.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Zn(this, Dr());
|
|
1920
1815
|
}
|
|
1921
|
-
function
|
|
1816
|
+
function Mr(e) {
|
|
1922
1817
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1923
1818
|
}
|
|
1924
|
-
function
|
|
1925
|
-
var c, l = e[
|
|
1926
|
-
return window.CustomEvent && !
|
|
1819
|
+
function Nr(e, t, n, r, i, a, o, s) {
|
|
1820
|
+
var c, l = e[di], u = l.options.onMove, d;
|
|
1821
|
+
return window.CustomEvent && !ni && !ri ? c = new CustomEvent("move", {
|
|
1927
1822
|
bubbles: !0,
|
|
1928
1823
|
cancelable: !0
|
|
1929
|
-
}) : (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 ||
|
|
1824
|
+
}) : (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;
|
|
1930
1825
|
}
|
|
1931
|
-
function
|
|
1826
|
+
function Pr(e) {
|
|
1932
1827
|
e.draggable = !1;
|
|
1933
1828
|
}
|
|
1934
|
-
function
|
|
1935
|
-
|
|
1829
|
+
function Fr() {
|
|
1830
|
+
Ui = !1;
|
|
1936
1831
|
}
|
|
1937
|
-
function
|
|
1938
|
-
var r =
|
|
1832
|
+
function Ir(e, t, n) {
|
|
1833
|
+
var r = U(mr(n.el, 0, n.options, !0)), i = 10;
|
|
1939
1834
|
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;
|
|
1940
1835
|
}
|
|
1941
|
-
function
|
|
1942
|
-
var r =
|
|
1836
|
+
function Lr(e, t, n) {
|
|
1837
|
+
var r = U(hr(n.el, n.options.draggable)), i = 10;
|
|
1943
1838
|
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;
|
|
1944
1839
|
}
|
|
1945
|
-
function
|
|
1840
|
+
function Rr(e, t, n, r, i, a, o, s) {
|
|
1946
1841
|
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;
|
|
1947
1842
|
if (!o) {
|
|
1948
|
-
if (s &&
|
|
1949
|
-
if (!
|
|
1950
|
-
else if (
|
|
1951
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
1843
|
+
if (s && Bi < l * i) {
|
|
1844
|
+
if (!Ri && (Li === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Ri = !0), Ri) f = !0;
|
|
1845
|
+
else if (Li === 1 ? c < u + Bi : c > d - Bi) return -Li;
|
|
1846
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return zr(t);
|
|
1952
1847
|
}
|
|
1953
1848
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
1954
1849
|
}
|
|
1955
|
-
function
|
|
1956
|
-
return K
|
|
1850
|
+
function zr(e) {
|
|
1851
|
+
return W(K) < W(e) ? 1 : -1;
|
|
1957
1852
|
}
|
|
1958
|
-
function
|
|
1853
|
+
function Br(e) {
|
|
1959
1854
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
1960
1855
|
return r.toString(36);
|
|
1961
1856
|
}
|
|
1962
|
-
function
|
|
1963
|
-
|
|
1857
|
+
function Vr(e) {
|
|
1858
|
+
Wi.length = 0;
|
|
1964
1859
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
1965
1860
|
var r = t[n];
|
|
1966
|
-
r.checked &&
|
|
1861
|
+
r.checked && Wi.push(r);
|
|
1967
1862
|
}
|
|
1968
1863
|
}
|
|
1969
|
-
function
|
|
1864
|
+
function Hr(e) {
|
|
1970
1865
|
return setTimeout(e, 0);
|
|
1971
1866
|
}
|
|
1972
|
-
function
|
|
1867
|
+
function Ur(e) {
|
|
1973
1868
|
return clearTimeout(e);
|
|
1974
1869
|
}
|
|
1975
|
-
function
|
|
1870
|
+
function Wr() {
|
|
1976
1871
|
function e() {
|
|
1977
1872
|
for (var e in this.defaults = {
|
|
1978
1873
|
scroll: !0,
|
|
@@ -1985,99 +1880,99 @@ function ei() {
|
|
|
1985
1880
|
return e.prototype = {
|
|
1986
1881
|
dragStarted: function(e) {
|
|
1987
1882
|
var t = e.originalEvent;
|
|
1988
|
-
this.sortable.nativeDraggable ?
|
|
1883
|
+
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);
|
|
1989
1884
|
},
|
|
1990
1885
|
dragOverCompleted: function(e) {
|
|
1991
1886
|
var t = e.originalEvent;
|
|
1992
1887
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1993
1888
|
},
|
|
1994
1889
|
drop: function() {
|
|
1995
|
-
this.sortable.nativeDraggable ?
|
|
1890
|
+
this.sortable.nativeDraggable ? B(document, "dragover", this._handleAutoScroll) : (B(document, "pointermove", this._handleFallbackAutoScroll), B(document, "touchmove", this._handleFallbackAutoScroll), B(document, "mousemove", this._handleFallbackAutoScroll)), Kr(), Gr(), Sr();
|
|
1996
1891
|
},
|
|
1997
1892
|
nulling: function() {
|
|
1998
|
-
|
|
1893
|
+
la = aa = ia = oa = ua = sa = ca = null, Z.length = 0;
|
|
1999
1894
|
},
|
|
2000
1895
|
_handleFallbackAutoScroll: function(e) {
|
|
2001
1896
|
this._handleAutoScroll(e, !0);
|
|
2002
1897
|
},
|
|
2003
1898
|
_handleAutoScroll: function(e, t) {
|
|
2004
1899
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
2005
|
-
if (
|
|
2006
|
-
|
|
2007
|
-
var o =
|
|
2008
|
-
|
|
2009
|
-
var a =
|
|
2010
|
-
a !== o && (o = a,
|
|
2011
|
-
}, 10),
|
|
1900
|
+
if (la = e, t || this.options.forceAutoScrollFallback || ri || ni || ai) {
|
|
1901
|
+
da(e, this.options, a, t);
|
|
1902
|
+
var o = vr(a, !0);
|
|
1903
|
+
oa && (!ua || r !== sa || i !== ca) && (ua && Kr(), ua = setInterval(function() {
|
|
1904
|
+
var a = vr(document.elementFromPoint(r, i), !0);
|
|
1905
|
+
a !== o && (o = a, Gr()), da(e, n.options, a, t);
|
|
1906
|
+
}, 10), sa = r, ca = i);
|
|
2012
1907
|
} else {
|
|
2013
|
-
if (!this.options.bubbleScroll ||
|
|
2014
|
-
|
|
1908
|
+
if (!this.options.bubbleScroll || vr(a, !0) === fr()) {
|
|
1909
|
+
Gr();
|
|
2015
1910
|
return;
|
|
2016
1911
|
}
|
|
2017
|
-
|
|
1912
|
+
da(e, this.options, vr(a, !1), !1);
|
|
2018
1913
|
}
|
|
2019
1914
|
}
|
|
2020
|
-
},
|
|
1915
|
+
}, Zn(e, {
|
|
2021
1916
|
pluginName: "scroll",
|
|
2022
1917
|
initializeByDefault: !0
|
|
2023
1918
|
});
|
|
2024
1919
|
}
|
|
2025
|
-
function
|
|
2026
|
-
|
|
1920
|
+
function Gr() {
|
|
1921
|
+
Z.forEach(function(e) {
|
|
2027
1922
|
clearInterval(e.pid);
|
|
2028
|
-
}),
|
|
1923
|
+
}), Z = [];
|
|
2029
1924
|
}
|
|
2030
|
-
function
|
|
2031
|
-
clearInterval(
|
|
1925
|
+
function Kr() {
|
|
1926
|
+
clearInterval(ua);
|
|
2032
1927
|
}
|
|
2033
|
-
function
|
|
2034
|
-
function
|
|
2035
|
-
function
|
|
1928
|
+
function qr() {}
|
|
1929
|
+
function Jr() {}
|
|
1930
|
+
function Yr() {
|
|
2036
1931
|
function e() {
|
|
2037
1932
|
this.defaults = { swapClass: "sortable-swap-highlight" };
|
|
2038
1933
|
}
|
|
2039
1934
|
return e.prototype = {
|
|
2040
1935
|
dragStart: function(e) {
|
|
2041
|
-
|
|
1936
|
+
pa = e.dragEl;
|
|
2042
1937
|
},
|
|
2043
1938
|
dragOverValid: function(e) {
|
|
2044
1939
|
var t = e.completed, n = e.target, r = e.onMove, i = e.activeSortable, a = e.changed, o = e.cancel;
|
|
2045
1940
|
if (i.options.swap) {
|
|
2046
1941
|
var s = this.sortable.el, c = this.options;
|
|
2047
1942
|
if (n && n !== s) {
|
|
2048
|
-
var l =
|
|
2049
|
-
r(n) === !1 ?
|
|
1943
|
+
var l = pa;
|
|
1944
|
+
r(n) === !1 ? pa = null : (V(n, c.swapClass, !0), pa = n), l && l !== pa && V(l, c.swapClass, !1);
|
|
2050
1945
|
}
|
|
2051
1946
|
a(), t(!0), o();
|
|
2052
1947
|
}
|
|
2053
1948
|
},
|
|
2054
1949
|
drop: function(e) {
|
|
2055
1950
|
var t = e.activeSortable, n = e.putSortable, r = e.dragEl, i = n || this.sortable, a = this.options;
|
|
2056
|
-
|
|
1951
|
+
pa && V(pa, a.swapClass, !1), pa && (a.swap || n && n.options.swap) && r !== pa && (i.captureAnimationState(), i !== t && t.captureAnimationState(), Xr(r, pa), i.animateAll(), i !== t && t.animateAll());
|
|
2057
1952
|
},
|
|
2058
1953
|
nulling: function() {
|
|
2059
|
-
|
|
1954
|
+
pa = null;
|
|
2060
1955
|
}
|
|
2061
|
-
},
|
|
1956
|
+
}, Zn(e, {
|
|
2062
1957
|
pluginName: "swap",
|
|
2063
1958
|
eventProperties: function() {
|
|
2064
|
-
return { swapItem:
|
|
1959
|
+
return { swapItem: pa };
|
|
2065
1960
|
}
|
|
2066
1961
|
});
|
|
2067
1962
|
}
|
|
2068
|
-
function
|
|
1963
|
+
function Xr(e, t) {
|
|
2069
1964
|
var n = e.parentNode, r = t.parentNode, i, a;
|
|
2070
|
-
!n || !r || n.isEqualNode(t) || r.isEqualNode(e) || (i =
|
|
1965
|
+
!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]));
|
|
2071
1966
|
}
|
|
2072
|
-
function
|
|
1967
|
+
function Zr() {
|
|
2073
1968
|
function e(e) {
|
|
2074
1969
|
for (var t in this) t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
2075
|
-
e.options.supportPointer ?
|
|
1970
|
+
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 = {
|
|
2076
1971
|
selectedClass: "sortable-selected",
|
|
2077
1972
|
multiDragKey: null,
|
|
2078
1973
|
setData: function(t, n) {
|
|
2079
1974
|
var r = "";
|
|
2080
|
-
Q.length &&
|
|
1975
|
+
Q.length && ga === e ? Q.forEach(function(e, t) {
|
|
2081
1976
|
r += (t ? ", " : "") + e.textContent;
|
|
2082
1977
|
}) : r = n.textContent, t.setData("Text", r);
|
|
2083
1978
|
}
|
|
@@ -2095,83 +1990,83 @@ function si() {
|
|
|
2095
1990
|
setupClone: function(e) {
|
|
2096
1991
|
var t = e.sortable, n = e.cancel;
|
|
2097
1992
|
if (this.isMultiDrag) {
|
|
2098
|
-
for (var r = 0; r < Q.length; r++)
|
|
1993
|
+
for (var r = 0; r < Q.length; r++) ma.push(wr(Q[r])), ma[r].sortableIndex = Q[r].sortableIndex, ma[r].draggable = !1, ma[r].style["will-change"] = "", V(ma[r], this.options.selectedClass, !1), Q[r] === $ && V(ma[r], this.options.chosenClass, !1);
|
|
2099
1994
|
t._hideClone(), n();
|
|
2100
1995
|
}
|
|
2101
1996
|
},
|
|
2102
1997
|
clone: function(e) {
|
|
2103
1998
|
var t = e.sortable, n = e.rootEl, r = e.dispatchSortableEvent, i = e.cancel;
|
|
2104
|
-
this.isMultiDrag && (this.options.removeCloneOnHide || Q.length &&
|
|
1999
|
+
this.isMultiDrag && (this.options.removeCloneOnHide || Q.length && ga === t && ($r(!0, n), r("clone"), i()));
|
|
2105
2000
|
},
|
|
2106
2001
|
showClone: function(e) {
|
|
2107
2002
|
var t = e.cloneNowShown, n = e.rootEl, r = e.cancel;
|
|
2108
|
-
this.isMultiDrag && (
|
|
2109
|
-
|
|
2110
|
-
}), t(),
|
|
2003
|
+
this.isMultiDrag && ($r(!1, n), ma.forEach(function(e) {
|
|
2004
|
+
H(e, "display", "");
|
|
2005
|
+
}), t(), xa = !1, r());
|
|
2111
2006
|
},
|
|
2112
2007
|
hideClone: function(e) {
|
|
2113
2008
|
var t = this;
|
|
2114
2009
|
e.sortable;
|
|
2115
2010
|
var n = e.cloneNowHidden, r = e.cancel;
|
|
2116
|
-
this.isMultiDrag && (
|
|
2117
|
-
|
|
2118
|
-
}), n(),
|
|
2011
|
+
this.isMultiDrag && (ma.forEach(function(e) {
|
|
2012
|
+
H(e, "display", "none"), t.options.removeCloneOnHide && e.parentNode && e.parentNode.removeChild(e);
|
|
2013
|
+
}), n(), xa = !0, r());
|
|
2119
2014
|
},
|
|
2120
2015
|
dragStartGlobal: function(e) {
|
|
2121
|
-
e.sortable, !this.isMultiDrag &&
|
|
2122
|
-
e.sortableIndex =
|
|
2016
|
+
e.sortable, !this.isMultiDrag && ga && ga.multiDrag._deselectMultiDrag(), Q.forEach(function(e) {
|
|
2017
|
+
e.sortableIndex = W(e);
|
|
2123
2018
|
}), Q = Q.sort(function(e, t) {
|
|
2124
2019
|
return e.sortableIndex - t.sortableIndex;
|
|
2125
|
-
}),
|
|
2020
|
+
}), ya = !0;
|
|
2126
2021
|
},
|
|
2127
2022
|
dragStarted: function(e) {
|
|
2128
2023
|
var t = this, n = e.sortable;
|
|
2129
2024
|
if (this.isMultiDrag) {
|
|
2130
2025
|
if (this.options.sort && (n.captureAnimationState(), this.options.animation)) {
|
|
2131
2026
|
Q.forEach(function(e) {
|
|
2132
|
-
e !== $ &&
|
|
2027
|
+
e !== $ && H(e, "position", "absolute");
|
|
2133
2028
|
});
|
|
2134
|
-
var r =
|
|
2029
|
+
var r = U($, !1, !0, !0);
|
|
2135
2030
|
Q.forEach(function(e) {
|
|
2136
|
-
e !== $ &&
|
|
2137
|
-
}),
|
|
2031
|
+
e !== $ && Tr(e, r);
|
|
2032
|
+
}), va = !0, _a = !0;
|
|
2138
2033
|
}
|
|
2139
2034
|
n.animateAll(function() {
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
}), t.options.sort &&
|
|
2035
|
+
va = !1, _a = !1, t.options.animation && Q.forEach(function(e) {
|
|
2036
|
+
Er(e);
|
|
2037
|
+
}), t.options.sort && ei();
|
|
2143
2038
|
});
|
|
2144
2039
|
}
|
|
2145
2040
|
},
|
|
2146
2041
|
dragOver: function(e) {
|
|
2147
2042
|
var t = e.target, n = e.completed, r = e.cancel;
|
|
2148
|
-
|
|
2043
|
+
va && ~Q.indexOf(t) && (n(!1), r());
|
|
2149
2044
|
},
|
|
2150
2045
|
revert: function(e) {
|
|
2151
2046
|
var t = e.fromSortable, n = e.rootEl, r = e.sortable, i = e.dragRect;
|
|
2152
2047
|
Q.length > 1 && (Q.forEach(function(e) {
|
|
2153
2048
|
r.addAnimationState({
|
|
2154
2049
|
target: e,
|
|
2155
|
-
rect:
|
|
2156
|
-
}),
|
|
2157
|
-
}),
|
|
2050
|
+
rect: va ? U(e) : i
|
|
2051
|
+
}), Er(e), e.fromRect = i, t.removeAnimationState(e);
|
|
2052
|
+
}), va = !1, Qr(!this.options.removeCloneOnHide, n));
|
|
2158
2053
|
},
|
|
2159
2054
|
dragOverCompleted: function(e) {
|
|
2160
2055
|
var t = e.sortable, n = e.isOwner, r = e.insertion, i = e.activeSortable, a = e.parentEl, o = e.putSortable, s = this.options;
|
|
2161
2056
|
if (r) {
|
|
2162
|
-
if (n && i._hideClone(),
|
|
2163
|
-
var c =
|
|
2057
|
+
if (n && i._hideClone(), _a = !1, s.animation && Q.length > 1 && (va || !n && !i.options.sort && !o)) {
|
|
2058
|
+
var c = U($, !1, !0, !0);
|
|
2164
2059
|
Q.forEach(function(e) {
|
|
2165
|
-
e !== $ && (
|
|
2166
|
-
}),
|
|
2060
|
+
e !== $ && (Tr(e, c), a.appendChild(e));
|
|
2061
|
+
}), va = !0;
|
|
2167
2062
|
}
|
|
2168
|
-
if (!n) if (
|
|
2169
|
-
var l =
|
|
2170
|
-
i._showClone(t), i.options.animation && !
|
|
2063
|
+
if (!n) if (va || ei(), Q.length > 1) {
|
|
2064
|
+
var l = xa;
|
|
2065
|
+
i._showClone(t), i.options.animation && !xa && l && ma.forEach(function(e) {
|
|
2171
2066
|
i.addAnimationState({
|
|
2172
2067
|
target: e,
|
|
2173
|
-
rect:
|
|
2174
|
-
}), e.fromRect =
|
|
2068
|
+
rect: ba
|
|
2069
|
+
}), e.fromRect = ba, e.thisAnimationDuration = null;
|
|
2175
2070
|
});
|
|
2176
2071
|
} else i._showClone(t);
|
|
2177
2072
|
}
|
|
@@ -2181,19 +2076,19 @@ function si() {
|
|
|
2181
2076
|
if (Q.forEach(function(e) {
|
|
2182
2077
|
e.thisAnimationDuration = null;
|
|
2183
2078
|
}), r.options.animation && !n && r.multiDrag.isMultiDrag) {
|
|
2184
|
-
|
|
2185
|
-
var i =
|
|
2186
|
-
|
|
2079
|
+
ba = Zn({}, t);
|
|
2080
|
+
var i = ur($, !0);
|
|
2081
|
+
ba.top -= i.f, ba.left -= i.e;
|
|
2187
2082
|
}
|
|
2188
2083
|
},
|
|
2189
2084
|
dragOverAnimationComplete: function() {
|
|
2190
|
-
|
|
2085
|
+
va && (va = !1, ei());
|
|
2191
2086
|
},
|
|
2192
2087
|
drop: function(e) {
|
|
2193
2088
|
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;
|
|
2194
2089
|
if (t) {
|
|
2195
2090
|
var l = this.options, u = r.children;
|
|
2196
|
-
if (!
|
|
2091
|
+
if (!ya) if (l.multiDragKey && !this.multiDragKeyDown && this._deselectMultiDrag(), V($, l.selectedClass, !~Q.indexOf($)), ~Q.indexOf($)) Q.splice(Q.indexOf($), 1), ha = null, Ar({
|
|
2197
2092
|
sortable: i,
|
|
2198
2093
|
rootEl: n,
|
|
2199
2094
|
name: "deselect",
|
|
@@ -2201,17 +2096,17 @@ function si() {
|
|
|
2201
2096
|
originalEvt: t
|
|
2202
2097
|
});
|
|
2203
2098
|
else {
|
|
2204
|
-
if (Q.push($),
|
|
2099
|
+
if (Q.push($), Ar({
|
|
2205
2100
|
sortable: i,
|
|
2206
2101
|
rootEl: n,
|
|
2207
2102
|
name: "select",
|
|
2208
2103
|
targetEl: $,
|
|
2209
2104
|
originalEvt: t
|
|
2210
|
-
}), t.shiftKey &&
|
|
2211
|
-
var d =
|
|
2105
|
+
}), t.shiftKey && ha && i.el.contains(ha)) {
|
|
2106
|
+
var d = W(ha), f = W($);
|
|
2212
2107
|
if (~d && ~f && d !== f) {
|
|
2213
2108
|
var p, m;
|
|
2214
|
-
for (f > d ? (m = d, p = f) : (m = f, p = d + 1); m < p; m++) ~Q.indexOf(u[m]) || (
|
|
2109
|
+
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]), Ar({
|
|
2215
2110
|
sortable: i,
|
|
2216
2111
|
rootEl: n,
|
|
2217
2112
|
name: "select",
|
|
@@ -2219,52 +2114,52 @@ function si() {
|
|
|
2219
2114
|
originalEvt: t
|
|
2220
2115
|
}));
|
|
2221
2116
|
}
|
|
2222
|
-
} else
|
|
2223
|
-
|
|
2117
|
+
} else ha = $;
|
|
2118
|
+
ga = c;
|
|
2224
2119
|
}
|
|
2225
|
-
if (
|
|
2226
|
-
if (
|
|
2227
|
-
var h =
|
|
2228
|
-
if (!
|
|
2120
|
+
if (ya && this.isMultiDrag) {
|
|
2121
|
+
if (va = !1, (r[di].options.sort || r !== n) && Q.length > 1) {
|
|
2122
|
+
var h = U($), g = W($, ":not(." + this.options.selectedClass + ")");
|
|
2123
|
+
if (!_a && l.animation && ($.thisAnimationDuration = null), c.captureAnimationState(), !_a && (l.animation && ($.fromRect = h, Q.forEach(function(e) {
|
|
2229
2124
|
if (e.thisAnimationDuration = null, e !== $) {
|
|
2230
|
-
var t =
|
|
2125
|
+
var t = va ? U(e) : h;
|
|
2231
2126
|
e.fromRect = t, c.addAnimationState({
|
|
2232
2127
|
target: e,
|
|
2233
2128
|
rect: t
|
|
2234
2129
|
});
|
|
2235
2130
|
}
|
|
2236
|
-
})),
|
|
2131
|
+
})), ei(), Q.forEach(function(e) {
|
|
2237
2132
|
u[g] ? r.insertBefore(e, u[g]) : r.appendChild(e), g++;
|
|
2238
|
-
}), o ===
|
|
2133
|
+
}), o === W($))) {
|
|
2239
2134
|
var _ = !1;
|
|
2240
2135
|
Q.forEach(function(e) {
|
|
2241
|
-
if (e.sortableIndex !==
|
|
2136
|
+
if (e.sortableIndex !== W(e)) {
|
|
2242
2137
|
_ = !0;
|
|
2243
2138
|
return;
|
|
2244
2139
|
}
|
|
2245
2140
|
}), _ && a("update");
|
|
2246
2141
|
}
|
|
2247
2142
|
Q.forEach(function(e) {
|
|
2248
|
-
|
|
2143
|
+
Er(e);
|
|
2249
2144
|
}), c.animateAll();
|
|
2250
2145
|
}
|
|
2251
|
-
|
|
2146
|
+
ga = c;
|
|
2252
2147
|
}
|
|
2253
|
-
(n === r || s && s.lastPutMode !== "clone") &&
|
|
2148
|
+
(n === r || s && s.lastPutMode !== "clone") && ma.forEach(function(e) {
|
|
2254
2149
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2255
2150
|
});
|
|
2256
2151
|
}
|
|
2257
2152
|
},
|
|
2258
2153
|
nullingGlobal: function() {
|
|
2259
|
-
this.isMultiDrag =
|
|
2154
|
+
this.isMultiDrag = ya = !1, ma.length = 0;
|
|
2260
2155
|
},
|
|
2261
2156
|
destroyGlobal: function() {
|
|
2262
|
-
this._deselectMultiDrag(),
|
|
2157
|
+
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);
|
|
2263
2158
|
},
|
|
2264
2159
|
_deselectMultiDrag: function(e) {
|
|
2265
|
-
if (!(
|
|
2160
|
+
if (!(ya !== void 0 && ya) && ga === this.sortable && !(e && lr(e.target, this.options.draggable, this.sortable.el, !1)) && !(e && e.button !== 0)) for (; Q.length;) {
|
|
2266
2161
|
var t = Q[0];
|
|
2267
|
-
|
|
2162
|
+
V(t, this.options.selectedClass, !1), Q.shift(), Ar({
|
|
2268
2163
|
sortable: this.sortable,
|
|
2269
2164
|
rootEl: this.sortable.el,
|
|
2270
2165
|
name: "deselect",
|
|
@@ -2279,16 +2174,16 @@ function si() {
|
|
|
2279
2174
|
_checkKeyUp: function(e) {
|
|
2280
2175
|
e.key === this.options.multiDragKey && (this.multiDragKeyDown = !1);
|
|
2281
2176
|
}
|
|
2282
|
-
},
|
|
2177
|
+
}, Zn(e, {
|
|
2283
2178
|
pluginName: "multiDrag",
|
|
2284
2179
|
utils: {
|
|
2285
2180
|
select: function(e) {
|
|
2286
|
-
var t = e.parentNode[
|
|
2287
|
-
!t || !t.options.multiDrag || ~Q.indexOf(e) || (
|
|
2181
|
+
var t = e.parentNode[di];
|
|
2182
|
+
!t || !t.options.multiDrag || ~Q.indexOf(e) || (ga && ga !== t && (ga.multiDrag._deselectMultiDrag(), ga = t), V(e, t.options.selectedClass, !0), Q.push(e));
|
|
2288
2183
|
},
|
|
2289
2184
|
deselect: function(e) {
|
|
2290
|
-
var t = e.parentNode[
|
|
2291
|
-
!t || !t.options.multiDrag || !~n || (
|
|
2185
|
+
var t = e.parentNode[di], n = Q.indexOf(e);
|
|
2186
|
+
!t || !t.options.multiDrag || !~n || (V(e, t.options.selectedClass, !1), Q.splice(n, 1));
|
|
2292
2187
|
}
|
|
2293
2188
|
},
|
|
2294
2189
|
eventProperties: function() {
|
|
@@ -2298,14 +2193,14 @@ function si() {
|
|
|
2298
2193
|
multiDragElement: r,
|
|
2299
2194
|
index: r.sortableIndex
|
|
2300
2195
|
});
|
|
2301
|
-
var i =
|
|
2196
|
+
var i = va && r !== $ ? -1 : va ? W(r, ":not(." + e.options.selectedClass + ")") : W(r);
|
|
2302
2197
|
n.push({
|
|
2303
2198
|
multiDragElement: r,
|
|
2304
2199
|
index: i
|
|
2305
2200
|
});
|
|
2306
2201
|
}), {
|
|
2307
|
-
items:
|
|
2308
|
-
clones: [].concat(
|
|
2202
|
+
items: er(Q),
|
|
2203
|
+
clones: [].concat(ma),
|
|
2309
2204
|
oldIndicies: t,
|
|
2310
2205
|
newIndicies: n
|
|
2311
2206
|
};
|
|
@@ -2315,33 +2210,33 @@ function si() {
|
|
|
2315
2210
|
} }
|
|
2316
2211
|
});
|
|
2317
2212
|
}
|
|
2318
|
-
function
|
|
2213
|
+
function Qr(e, t) {
|
|
2319
2214
|
Q.forEach(function(n, r) {
|
|
2320
2215
|
var i = t.children[n.sortableIndex + (e ? Number(r) : 0)];
|
|
2321
2216
|
i ? t.insertBefore(n, i) : t.appendChild(n);
|
|
2322
2217
|
});
|
|
2323
2218
|
}
|
|
2324
|
-
function
|
|
2325
|
-
|
|
2219
|
+
function $r(e, t) {
|
|
2220
|
+
ma.forEach(function(n, r) {
|
|
2326
2221
|
var i = t.children[n.sortableIndex + (e ? Number(r) : 0)];
|
|
2327
2222
|
i ? t.insertBefore(n, i) : t.appendChild(n);
|
|
2328
2223
|
});
|
|
2329
2224
|
}
|
|
2330
|
-
function
|
|
2225
|
+
function ei() {
|
|
2331
2226
|
Q.forEach(function(e) {
|
|
2332
2227
|
e !== $ && e.parentNode && e.parentNode.removeChild(e);
|
|
2333
2228
|
});
|
|
2334
2229
|
}
|
|
2335
|
-
var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei,
|
|
2336
|
-
|
|
2230
|
+
var ti, ni, ri, ii, ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, K, q, J, Y, _i, vi, X, yi, bi, xi, Si, Ci, 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, Z, ia, aa, oa, sa, ca, la, ua, da, fa, pa, Q, ma, ha, ga, _a, va, ya, $, ba, xa, Sa = n((() => {
|
|
2231
|
+
ti = "1.14.0", ni = or(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ri = or(/Edge/i), ii = or(/firefox/i), ai = or(/safari/i) && !or(/chrome/i) && !or(/android/i), oi = or(/iP(ad|od|hone)/i), si = or(/chrome/i) && or(/android/i), ci = {
|
|
2337
2232
|
capture: !1,
|
|
2338
2233
|
passive: !1
|
|
2339
|
-
},
|
|
2234
|
+
}, li = /\s+/g, di = "Sortable" + (/* @__PURE__ */ new Date()).getTime(), fi = [], pi = { initializeByDefault: !0 }, mi = {
|
|
2340
2235
|
mount: function(e) {
|
|
2341
|
-
for (var t in
|
|
2342
|
-
|
|
2236
|
+
for (var t in pi) pi.hasOwnProperty(t) && !(t in e) && (e[t] = pi[t]);
|
|
2237
|
+
fi.forEach(function(t) {
|
|
2343
2238
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2344
|
-
}),
|
|
2239
|
+
}), fi.push(e);
|
|
2345
2240
|
},
|
|
2346
2241
|
pluginEvent: function(e, t, n) {
|
|
2347
2242
|
var r = this;
|
|
@@ -2349,16 +2244,16 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2349
2244
|
r.eventCanceled = !0;
|
|
2350
2245
|
};
|
|
2351
2246
|
var i = e + "Global";
|
|
2352
|
-
|
|
2353
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2247
|
+
fi.forEach(function(r) {
|
|
2248
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Jn({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Jn({ sortable: t }, n)));
|
|
2354
2249
|
});
|
|
2355
2250
|
},
|
|
2356
2251
|
initializePlugins: function(e, t, n, r) {
|
|
2357
|
-
for (var i in
|
|
2252
|
+
for (var i in fi.forEach(function(r) {
|
|
2358
2253
|
var i = r.pluginName;
|
|
2359
2254
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2360
2255
|
var a = new r(e, t, e.options);
|
|
2361
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2256
|
+
a.sortable = e, a.options = e.options, e[i] = a, Zn(n, a.defaults);
|
|
2362
2257
|
}
|
|
2363
2258
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2364
2259
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2367,79 +2262,79 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2367
2262
|
},
|
|
2368
2263
|
getEventProperties: function(e, t) {
|
|
2369
2264
|
var n = {};
|
|
2370
|
-
return
|
|
2371
|
-
typeof r.eventProperties == "function" &&
|
|
2265
|
+
return fi.forEach(function(r) {
|
|
2266
|
+
typeof r.eventProperties == "function" && Zn(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2372
2267
|
}), n;
|
|
2373
2268
|
},
|
|
2374
2269
|
modifyOption: function(e, t, n) {
|
|
2375
2270
|
var r;
|
|
2376
|
-
return
|
|
2271
|
+
return fi.forEach(function(i) {
|
|
2377
2272
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2378
2273
|
}), r;
|
|
2379
2274
|
}
|
|
2380
|
-
},
|
|
2381
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2382
|
-
|
|
2383
|
-
dragEl:
|
|
2384
|
-
parentEl:
|
|
2385
|
-
ghostEl:
|
|
2386
|
-
rootEl:
|
|
2387
|
-
nextEl:
|
|
2388
|
-
lastDownEl:
|
|
2389
|
-
cloneEl:
|
|
2390
|
-
cloneHidden:
|
|
2391
|
-
dragStarted:
|
|
2392
|
-
putSortable:
|
|
2393
|
-
activeSortable:
|
|
2275
|
+
}, hi = ["evt"], gi = function(e, t) {
|
|
2276
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = $n(n, hi);
|
|
2277
|
+
mi.pluginEvent.bind(G)(e, t, Jn({
|
|
2278
|
+
dragEl: K,
|
|
2279
|
+
parentEl: q,
|
|
2280
|
+
ghostEl: J,
|
|
2281
|
+
rootEl: Y,
|
|
2282
|
+
nextEl: _i,
|
|
2283
|
+
lastDownEl: vi,
|
|
2284
|
+
cloneEl: X,
|
|
2285
|
+
cloneHidden: yi,
|
|
2286
|
+
dragStarted: Fi,
|
|
2287
|
+
putSortable: Ti,
|
|
2288
|
+
activeSortable: G.active,
|
|
2394
2289
|
originalEvent: r,
|
|
2395
|
-
oldIndex:
|
|
2396
|
-
oldDraggableIndex:
|
|
2397
|
-
newIndex:
|
|
2398
|
-
newDraggableIndex:
|
|
2399
|
-
hideGhostForTarget:
|
|
2400
|
-
unhideGhostForTarget:
|
|
2290
|
+
oldIndex: bi,
|
|
2291
|
+
oldDraggableIndex: Si,
|
|
2292
|
+
newIndex: xi,
|
|
2293
|
+
newDraggableIndex: Ci,
|
|
2294
|
+
hideGhostForTarget: ea,
|
|
2295
|
+
unhideGhostForTarget: ta,
|
|
2401
2296
|
cloneNowHidden: function() {
|
|
2402
|
-
|
|
2297
|
+
yi = !0;
|
|
2403
2298
|
},
|
|
2404
2299
|
cloneNowShown: function() {
|
|
2405
|
-
|
|
2300
|
+
yi = !1;
|
|
2406
2301
|
},
|
|
2407
2302
|
dispatchSortableEvent: function(e) {
|
|
2408
|
-
|
|
2303
|
+
jr({
|
|
2409
2304
|
sortable: t,
|
|
2410
2305
|
name: e,
|
|
2411
2306
|
originalEvent: r
|
|
2412
2307
|
});
|
|
2413
2308
|
}
|
|
2414
2309
|
}, i));
|
|
2415
|
-
},
|
|
2416
|
-
if (
|
|
2417
|
-
if (
|
|
2310
|
+
}, Ei = !1, Di = !1, Oi = [], Ri = !1, zi = !1, Hi = [], Ui = !1, Wi = [], Gi = typeof document < "u", Ki = oi, qi = ri || ni ? "cssFloat" : "float", Ji = Gi && !si && !oi && "draggable" in document.createElement("div"), Yi = function() {
|
|
2311
|
+
if (Gi) {
|
|
2312
|
+
if (ni) return !1;
|
|
2418
2313
|
var e = document.createElement("x");
|
|
2419
2314
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2420
2315
|
}
|
|
2421
|
-
}(),
|
|
2422
|
-
var n =
|
|
2316
|
+
}(), Xi = function(e, t) {
|
|
2317
|
+
var n = H(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = mr(e, 0, t), a = mr(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;
|
|
2423
2318
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2424
2319
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2425
2320
|
if (i && o.float && o.float !== "none") {
|
|
2426
2321
|
var u = o.float === "left" ? "left" : "right";
|
|
2427
2322
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2428
2323
|
}
|
|
2429
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2430
|
-
},
|
|
2324
|
+
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";
|
|
2325
|
+
}, Zi = function(e, t, n) {
|
|
2431
2326
|
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;
|
|
2432
2327
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2433
|
-
},
|
|
2328
|
+
}, Qi = function(e, t) {
|
|
2434
2329
|
var n;
|
|
2435
|
-
return
|
|
2436
|
-
var i = r[
|
|
2437
|
-
if (!(!i ||
|
|
2438
|
-
var a =
|
|
2330
|
+
return Oi.some(function(r) {
|
|
2331
|
+
var i = r[di].options.emptyInsertThreshold;
|
|
2332
|
+
if (!(!i || hr(r))) {
|
|
2333
|
+
var a = U(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2439
2334
|
if (o && s) return n = r;
|
|
2440
2335
|
}
|
|
2441
2336
|
}), n;
|
|
2442
|
-
},
|
|
2337
|
+
}, $i = function(e) {
|
|
2443
2338
|
function t(e, n) {
|
|
2444
2339
|
return function(r, i, a, o) {
|
|
2445
2340
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2452,92 +2347,92 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2452
2347
|
};
|
|
2453
2348
|
}
|
|
2454
2349
|
var n = {}, r = e.group;
|
|
2455
|
-
(!r ||
|
|
2456
|
-
},
|
|
2457
|
-
!
|
|
2458
|
-
},
|
|
2459
|
-
!
|
|
2460
|
-
},
|
|
2461
|
-
if (
|
|
2462
|
-
}, !0),
|
|
2463
|
-
if (
|
|
2350
|
+
(!r || Yn(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;
|
|
2351
|
+
}, ea = function() {
|
|
2352
|
+
!Yi && J && H(J, "display", "none");
|
|
2353
|
+
}, ta = function() {
|
|
2354
|
+
!Yi && J && H(J, "display", "");
|
|
2355
|
+
}, Gi && document.addEventListener("click", function(e) {
|
|
2356
|
+
if (Di) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Di = !1, !1;
|
|
2357
|
+
}, !0), na = function(e) {
|
|
2358
|
+
if (K) {
|
|
2464
2359
|
e = e.touches ? e.touches[0] : e;
|
|
2465
|
-
var t =
|
|
2360
|
+
var t = Qi(e.clientX, e.clientY);
|
|
2466
2361
|
if (t) {
|
|
2467
2362
|
var n = {};
|
|
2468
2363
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2469
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
2364
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[di]._onDragOver(n);
|
|
2470
2365
|
}
|
|
2471
2366
|
}
|
|
2472
|
-
},
|
|
2473
|
-
|
|
2474
|
-
},
|
|
2475
|
-
constructor:
|
|
2367
|
+
}, ra = function(e) {
|
|
2368
|
+
K && K.parentNode[di]._isOutsideThisEl(e.target);
|
|
2369
|
+
}, G.prototype = {
|
|
2370
|
+
constructor: G,
|
|
2476
2371
|
_isOutsideThisEl: function(e) {
|
|
2477
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2372
|
+
!this.el.contains(e) && e !== this.el && (Ii = null);
|
|
2478
2373
|
},
|
|
2479
2374
|
_getDirection: function(e, t) {
|
|
2480
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
2375
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, K) : this.options.direction;
|
|
2481
2376
|
},
|
|
2482
2377
|
_onTapStart: function(e) {
|
|
2483
2378
|
if (e.cancelable) {
|
|
2484
2379
|
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;
|
|
2485
|
-
if (
|
|
2486
|
-
if (
|
|
2380
|
+
if (Vr(n), !K && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ai && s && s.tagName.toUpperCase() === "SELECT") && (s = lr(s, r.draggable, n, !1), !(s && s.animated) && vi !== s)) {
|
|
2381
|
+
if (bi = W(s), Si = W(s, r.draggable), typeof l == "function") {
|
|
2487
2382
|
if (l.call(this, e, s, this)) {
|
|
2488
|
-
|
|
2383
|
+
jr({
|
|
2489
2384
|
sortable: t,
|
|
2490
2385
|
rootEl: c,
|
|
2491
2386
|
name: "filter",
|
|
2492
2387
|
targetEl: s,
|
|
2493
2388
|
toEl: n,
|
|
2494
2389
|
fromEl: n
|
|
2495
|
-
}),
|
|
2390
|
+
}), gi("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
2496
2391
|
return;
|
|
2497
2392
|
}
|
|
2498
2393
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2499
|
-
if (r =
|
|
2394
|
+
if (r = lr(c, r.trim(), n, !1), r) return jr({
|
|
2500
2395
|
sortable: t,
|
|
2501
2396
|
rootEl: r,
|
|
2502
2397
|
name: "filter",
|
|
2503
2398
|
targetEl: s,
|
|
2504
2399
|
fromEl: n,
|
|
2505
2400
|
toEl: n
|
|
2506
|
-
}),
|
|
2401
|
+
}), gi("filter", t, { evt: e }), !0;
|
|
2507
2402
|
}), l)) {
|
|
2508
2403
|
i && e.cancelable && e.preventDefault();
|
|
2509
2404
|
return;
|
|
2510
2405
|
}
|
|
2511
|
-
r.handle && !
|
|
2406
|
+
r.handle && !lr(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2512
2407
|
}
|
|
2513
2408
|
}
|
|
2514
2409
|
},
|
|
2515
2410
|
_prepareDragStart: function(e, t, n) {
|
|
2516
2411
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2517
|
-
if (n && !
|
|
2518
|
-
var c =
|
|
2519
|
-
if (
|
|
2520
|
-
target:
|
|
2412
|
+
if (n && !K && n.parentNode === i) {
|
|
2413
|
+
var c = U(n);
|
|
2414
|
+
if (Y = i, K = n, q = K.parentNode, _i = K.nextSibling, vi = n, wi = a.group, G.dragged = K, ki = {
|
|
2415
|
+
target: K,
|
|
2521
2416
|
clientX: (t || e).clientX,
|
|
2522
2417
|
clientY: (t || e).clientY
|
|
2523
|
-
},
|
|
2524
|
-
if (
|
|
2418
|
+
}, Ni = ki.clientX - c.left, Pi = ki.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, K.style["will-change"] = "all", s = function() {
|
|
2419
|
+
if (gi("delayEnded", r, { evt: e }), G.eventCanceled) {
|
|
2525
2420
|
r._onDrop();
|
|
2526
2421
|
return;
|
|
2527
2422
|
}
|
|
2528
|
-
r._disableDelayedDragEvents(), !
|
|
2423
|
+
r._disableDelayedDragEvents(), !ii && r.nativeDraggable && (K.draggable = !0), r._triggerDragStart(e, t), jr({
|
|
2529
2424
|
sortable: r,
|
|
2530
2425
|
name: "choose",
|
|
2531
2426
|
originalEvent: e
|
|
2532
|
-
}),
|
|
2427
|
+
}), V(K, a.chosenClass, !0);
|
|
2533
2428
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2534
|
-
|
|
2535
|
-
}),
|
|
2536
|
-
if (
|
|
2429
|
+
dr(K, e.trim(), Pr);
|
|
2430
|
+
}), z(o, "dragover", na), z(o, "mousemove", na), z(o, "touchmove", na), z(o, "mouseup", r._onDrop), z(o, "touchend", r._onDrop), z(o, "touchcancel", r._onDrop), ii && this.nativeDraggable && (this.options.touchStartThreshold = 4, K.draggable = !0), gi("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ri || ni))) {
|
|
2431
|
+
if (G.eventCanceled) {
|
|
2537
2432
|
this._onDrop();
|
|
2538
2433
|
return;
|
|
2539
2434
|
}
|
|
2540
|
-
|
|
2435
|
+
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);
|
|
2541
2436
|
} else s();
|
|
2542
2437
|
}
|
|
2543
2438
|
},
|
|
@@ -2546,25 +2441,25 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2546
2441
|
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();
|
|
2547
2442
|
},
|
|
2548
2443
|
_disableDelayedDrag: function() {
|
|
2549
|
-
|
|
2444
|
+
K && Pr(K), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2550
2445
|
},
|
|
2551
2446
|
_disableDelayedDragEvents: function() {
|
|
2552
2447
|
var e = this.el.ownerDocument;
|
|
2553
|
-
|
|
2448
|
+
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);
|
|
2554
2449
|
},
|
|
2555
2450
|
_triggerDragStart: function(e, t) {
|
|
2556
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
2451
|
+
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));
|
|
2557
2452
|
try {
|
|
2558
|
-
document.selection ?
|
|
2453
|
+
document.selection ? Hr(function() {
|
|
2559
2454
|
document.selection.empty();
|
|
2560
2455
|
}) : window.getSelection().removeAllRanges();
|
|
2561
2456
|
} catch {}
|
|
2562
2457
|
},
|
|
2563
2458
|
_dragStarted: function(e, t) {
|
|
2564
|
-
if (
|
|
2565
|
-
|
|
2459
|
+
if (Ei = !1, Y && K) {
|
|
2460
|
+
gi("dragStarted", this, { evt: t }), this.nativeDraggable && z(document, "dragover", ra);
|
|
2566
2461
|
var n = this.options;
|
|
2567
|
-
!e &&
|
|
2462
|
+
!e && V(K, n.dragClass, !1), V(K, n.ghostClass, !0), G.active = this, e && this._appendGhost(), jr({
|
|
2568
2463
|
sortable: this,
|
|
2569
2464
|
name: "start",
|
|
2570
2465
|
originalEvent: t
|
|
@@ -2572,33 +2467,33 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2572
2467
|
} else this._nulling();
|
|
2573
2468
|
},
|
|
2574
2469
|
_emulateDragOver: function() {
|
|
2575
|
-
if (
|
|
2576
|
-
this._lastX =
|
|
2577
|
-
for (var e = document.elementFromPoint(
|
|
2578
|
-
if (
|
|
2579
|
-
if (t[
|
|
2470
|
+
if (Ai) {
|
|
2471
|
+
this._lastX = Ai.clientX, this._lastY = Ai.clientY, ea();
|
|
2472
|
+
for (var e = document.elementFromPoint(Ai.clientX, Ai.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Ai.clientX, Ai.clientY), e !== t);) t = e;
|
|
2473
|
+
if (K.parentNode[di]._isOutsideThisEl(e), t) do {
|
|
2474
|
+
if (t[di]) {
|
|
2580
2475
|
var n = void 0;
|
|
2581
|
-
if (n = t[
|
|
2582
|
-
clientX:
|
|
2583
|
-
clientY:
|
|
2476
|
+
if (n = t[di]._onDragOver({
|
|
2477
|
+
clientX: Ai.clientX,
|
|
2478
|
+
clientY: Ai.clientY,
|
|
2584
2479
|
target: e,
|
|
2585
2480
|
rootEl: t
|
|
2586
2481
|
}), n && !this.options.dragoverBubble) break;
|
|
2587
2482
|
}
|
|
2588
2483
|
e = t;
|
|
2589
2484
|
} while (t = t.parentNode);
|
|
2590
|
-
|
|
2485
|
+
ta();
|
|
2591
2486
|
}
|
|
2592
2487
|
},
|
|
2593
2488
|
_onTouchMove: function(e) {
|
|
2594
|
-
if (
|
|
2595
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
2596
|
-
if (!
|
|
2489
|
+
if (ki) {
|
|
2490
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = J && ur(J, !0), o = J && a && a.a, s = J && a && a.d, c = Ki && Vi && gr(Vi), l = (i.clientX - ki.clientX + r.x) / (o || 1) + (c ? c[0] - Hi[0] : 0) / (o || 1), u = (i.clientY - ki.clientY + r.y) / (s || 1) + (c ? c[1] - Hi[1] : 0) / (s || 1);
|
|
2491
|
+
if (!G.active && !Ei) {
|
|
2597
2492
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2598
2493
|
this._onDragStart(e, !0);
|
|
2599
2494
|
}
|
|
2600
|
-
if (
|
|
2601
|
-
a ? (a.e += l - (
|
|
2495
|
+
if (J) {
|
|
2496
|
+
a ? (a.e += l - (ji || 0), a.f += u - (Mi || 0)) : a = {
|
|
2602
2497
|
a: 1,
|
|
2603
2498
|
b: 0,
|
|
2604
2499
|
c: 0,
|
|
@@ -2607,39 +2502,39 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2607
2502
|
f: u
|
|
2608
2503
|
};
|
|
2609
2504
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2610
|
-
|
|
2505
|
+
H(J, "webkitTransform", d), H(J, "mozTransform", d), H(J, "msTransform", d), H(J, "transform", d), ji = l, Mi = u, Ai = i;
|
|
2611
2506
|
}
|
|
2612
2507
|
e.cancelable && e.preventDefault();
|
|
2613
2508
|
}
|
|
2614
2509
|
},
|
|
2615
2510
|
_appendGhost: function() {
|
|
2616
|
-
if (!
|
|
2617
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
2618
|
-
if (
|
|
2619
|
-
for (
|
|
2620
|
-
|
|
2511
|
+
if (!J) {
|
|
2512
|
+
var e = this.options.fallbackOnBody ? document.body : Y, t = U(K, !0, Ki, !0, e), n = this.options;
|
|
2513
|
+
if (Ki) {
|
|
2514
|
+
for (Vi = e; H(Vi, "position") === "static" && H(Vi, "transform") === "none" && Vi !== document;) Vi = Vi.parentNode;
|
|
2515
|
+
Vi !== document.body && Vi !== document.documentElement ? (Vi === document && (Vi = fr()), t.top += Vi.scrollTop, t.left += Vi.scrollLeft) : Vi = fr(), Hi = gr(Vi);
|
|
2621
2516
|
}
|
|
2622
|
-
|
|
2517
|
+
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", Ki ? "absolute" : "fixed"), H(J, "zIndex", "100000"), H(J, "pointerEvents", "none"), G.ghost = J, e.appendChild(J), H(J, "transform-origin", Ni / parseInt(J.style.width) * 100 + "% " + Pi / parseInt(J.style.height) * 100 + "%");
|
|
2623
2518
|
}
|
|
2624
2519
|
},
|
|
2625
2520
|
_onDragStart: function(e, t) {
|
|
2626
2521
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
2627
|
-
if (
|
|
2522
|
+
if (gi("dragStart", this, { evt: e }), G.eventCanceled) {
|
|
2628
2523
|
this._onDrop();
|
|
2629
2524
|
return;
|
|
2630
2525
|
}
|
|
2631
|
-
|
|
2632
|
-
|
|
2526
|
+
gi("setupClone", this), G.eventCanceled || (X = wr(K), X.draggable = !1, X.style["will-change"] = "", this._hideClone(), V(X, this.options.chosenClass, !1), G.clone = X), n.cloneId = Hr(function() {
|
|
2527
|
+
gi("clone", n), !G.eventCanceled && (n.options.removeCloneOnHide || Y.insertBefore(X, K), n._hideClone(), jr({
|
|
2633
2528
|
sortable: n,
|
|
2634
2529
|
name: "clone"
|
|
2635
2530
|
}));
|
|
2636
|
-
}), !t &&
|
|
2531
|
+
}), !t && V(K, i.dragClass, !0), t ? (Di = !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)")), Ei = !0, n._dragStartId = Hr(n._dragStarted.bind(n, t, e)), z(document, "selectstart", n), Fi = !0, ai && H(document.body, "user-select", "none");
|
|
2637
2532
|
},
|
|
2638
2533
|
_onDragOver: function(e) {
|
|
2639
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c =
|
|
2640
|
-
if (
|
|
2534
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = G.active, l = wi === s, u = o.sort, d = Ti || c, f, p = this, m = !1;
|
|
2535
|
+
if (Ui) return;
|
|
2641
2536
|
function h(o, s) {
|
|
2642
|
-
|
|
2537
|
+
gi(o, p, Jn({
|
|
2643
2538
|
evt: e,
|
|
2644
2539
|
isOwner: l,
|
|
2645
2540
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2651,7 +2546,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2651
2546
|
target: n,
|
|
2652
2547
|
completed: _,
|
|
2653
2548
|
onMove: function(n, i) {
|
|
2654
|
-
return
|
|
2549
|
+
return Nr(Y, t, K, r, n, U(n), e, i);
|
|
2655
2550
|
},
|
|
2656
2551
|
changed: v
|
|
2657
2552
|
}, s));
|
|
@@ -2660,119 +2555,119 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2660
2555
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2661
2556
|
}
|
|
2662
2557
|
function _(r) {
|
|
2663
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
2558
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (V(K, Ti ? Ti.options.ghostClass : c.options.ghostClass, !1), V(K, o.ghostClass, !0)), Ti !== p && p !== G.active ? Ti = p : p === G.active && Ti && (Ti = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
2664
2559
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2665
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
2560
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === K && !K.animated || n === t && !n.animated) && (Ii = null), !o.dragoverBubble && !e.rootEl && n !== document && (K.parentNode[di]._isOutsideThisEl(e.target), !r && na(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2666
2561
|
}
|
|
2667
2562
|
function v() {
|
|
2668
|
-
|
|
2563
|
+
xi = W(K), Ci = W(K, o.draggable), jr({
|
|
2669
2564
|
sortable: p,
|
|
2670
2565
|
name: "change",
|
|
2671
2566
|
toEl: t,
|
|
2672
|
-
newIndex:
|
|
2673
|
-
newDraggableIndex:
|
|
2567
|
+
newIndex: xi,
|
|
2568
|
+
newDraggableIndex: Ci,
|
|
2674
2569
|
originalEvent: e
|
|
2675
2570
|
});
|
|
2676
2571
|
}
|
|
2677
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2678
|
-
if (
|
|
2679
|
-
if (
|
|
2680
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
2681
|
-
if (a) return
|
|
2682
|
-
var y =
|
|
2683
|
-
if (!y ||
|
|
2684
|
-
if (y ===
|
|
2685
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
2686
|
-
} else if (y &&
|
|
2687
|
-
var b =
|
|
2688
|
-
if (b ===
|
|
2689
|
-
if (n = b, i =
|
|
2572
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = lr(n, o.draggable, t, !0), h("dragOver"), G.eventCanceled) return m;
|
|
2573
|
+
if (K.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2574
|
+
if (Di = !1, c && !o.disabled && (l ? u || (a = q !== Y) : Ti === this || (this.lastPutMode = wi.checkPull(this, c, K, e)) && s.checkPut(this, c, K, e))) {
|
|
2575
|
+
if (f = this._getDirection(e, n) === "vertical", r = U(K), h("dragOverValid"), G.eventCanceled) return m;
|
|
2576
|
+
if (a) return q = Y, g(), this._hideClone(), h("revert"), G.eventCanceled || (_i ? Y.insertBefore(K, _i) : Y.appendChild(K)), _(!0);
|
|
2577
|
+
var y = hr(t, o.draggable);
|
|
2578
|
+
if (!y || Lr(e, f, this) && !y.animated) {
|
|
2579
|
+
if (y === K) return _(!1);
|
|
2580
|
+
if (y && t === e.target && (n = y), n && (i = U(n)), Nr(Y, t, K, r, n, i, e, !!n) !== !1) return g(), t.appendChild(K), q = t, v(), _(!0);
|
|
2581
|
+
} else if (y && Ir(e, f, this)) {
|
|
2582
|
+
var b = mr(t, 0, o, !0);
|
|
2583
|
+
if (b === K) return _(!1);
|
|
2584
|
+
if (n = b, i = U(n), Nr(Y, t, K, r, n, i, e, !1) !== !1) return g(), t.insertBefore(K, b), q = t, v(), _(!0);
|
|
2690
2585
|
} else if (n.parentNode === t) {
|
|
2691
|
-
i =
|
|
2692
|
-
var x = 0, S, C =
|
|
2693
|
-
|
|
2694
|
-
var
|
|
2586
|
+
i = U(n);
|
|
2587
|
+
var x = 0, S, C = K.parentNode !== t, ee = !Zi(K.animated && K.toRect || r, n.animated && n.toRect || i, f), w = f ? "top" : "left", T = pr(n, "top", "top") || pr(K, "top", "top"), te = T ? T.scrollTop : void 0;
|
|
2588
|
+
Ii !== n && (S = i[w], Ri = !1, zi = !ee && o.invertSwap || C), x = Rr(e, n, i, f, ee ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, zi, Ii === n);
|
|
2589
|
+
var E;
|
|
2695
2590
|
if (x !== 0) {
|
|
2696
|
-
var
|
|
2591
|
+
var ne = W(K);
|
|
2697
2592
|
do
|
|
2698
|
-
|
|
2699
|
-
while (
|
|
2593
|
+
ne -= x, E = q.children[ne];
|
|
2594
|
+
while (E && (H(E, "display") === "none" || E === J));
|
|
2700
2595
|
}
|
|
2701
|
-
if (x === 0 ||
|
|
2702
|
-
|
|
2703
|
-
var
|
|
2704
|
-
|
|
2705
|
-
var
|
|
2706
|
-
if (
|
|
2596
|
+
if (x === 0 || E === n) return _(!1);
|
|
2597
|
+
Ii = n, Li = x;
|
|
2598
|
+
var re = n.nextElementSibling, ie = !1;
|
|
2599
|
+
ie = x === 1;
|
|
2600
|
+
var D = Nr(Y, t, K, r, n, i, e, ie);
|
|
2601
|
+
if (D !== !1) return (D === 1 || D === -1) && (ie = D === 1), Ui = !0, setTimeout(Fr, 30), g(), ie && !re ? t.appendChild(K) : n.parentNode.insertBefore(K, ie ? re : n), T && Cr(T, 0, te - T.scrollTop), q = K.parentNode, S !== void 0 && !zi && (Bi = Math.abs(S - U(n)[w])), v(), _(!0);
|
|
2707
2602
|
}
|
|
2708
|
-
if (t.contains(
|
|
2603
|
+
if (t.contains(K)) return _(!1);
|
|
2709
2604
|
}
|
|
2710
2605
|
return !1;
|
|
2711
2606
|
},
|
|
2712
2607
|
_ignoreWhileAnimating: null,
|
|
2713
2608
|
_offMoveEvents: function() {
|
|
2714
|
-
|
|
2609
|
+
B(document, "mousemove", this._onTouchMove), B(document, "touchmove", this._onTouchMove), B(document, "pointermove", this._onTouchMove), B(document, "dragover", na), B(document, "mousemove", na), B(document, "touchmove", na);
|
|
2715
2610
|
},
|
|
2716
2611
|
_offUpEvents: function() {
|
|
2717
2612
|
var e = this.el.ownerDocument;
|
|
2718
|
-
|
|
2613
|
+
B(e, "mouseup", this._onDrop), B(e, "touchend", this._onDrop), B(e, "pointerup", this._onDrop), B(e, "touchcancel", this._onDrop), B(document, "selectstart", this);
|
|
2719
2614
|
},
|
|
2720
2615
|
_onDrop: function(e) {
|
|
2721
2616
|
var t = this.el, n = this.options;
|
|
2722
|
-
if (
|
|
2617
|
+
if (xi = W(K), Ci = W(K, n.draggable), gi("drop", this, { evt: e }), q = K && K.parentNode, xi = W(K), Ci = W(K, n.draggable), G.eventCanceled) {
|
|
2723
2618
|
this._nulling();
|
|
2724
2619
|
return;
|
|
2725
2620
|
}
|
|
2726
|
-
|
|
2621
|
+
Ei = !1, zi = !1, Ri = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ur(this.cloneId), Ur(this._dragStartId), this.nativeDraggable && (B(document, "drop", this), B(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ai && H(document.body, "user-select", ""), H(K, "transform", ""), e && (Fi && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), J && J.parentNode && J.parentNode.removeChild(J), (Y === q || Ti && Ti.lastPutMode !== "clone") && X && X.parentNode && X.parentNode.removeChild(X), K && (this.nativeDraggable && B(K, "dragend", this), Pr(K), K.style["will-change"] = "", Fi && !Ei && V(K, Ti ? Ti.options.ghostClass : this.options.ghostClass, !1), V(K, this.options.chosenClass, !1), jr({
|
|
2727
2622
|
sortable: this,
|
|
2728
2623
|
name: "unchoose",
|
|
2729
|
-
toEl:
|
|
2624
|
+
toEl: q,
|
|
2730
2625
|
newIndex: null,
|
|
2731
2626
|
newDraggableIndex: null,
|
|
2732
2627
|
originalEvent: e
|
|
2733
|
-
}),
|
|
2628
|
+
}), Y === q ? xi !== bi && xi >= 0 && (jr({
|
|
2734
2629
|
sortable: this,
|
|
2735
2630
|
name: "update",
|
|
2736
|
-
toEl:
|
|
2631
|
+
toEl: q,
|
|
2737
2632
|
originalEvent: e
|
|
2738
|
-
}),
|
|
2633
|
+
}), jr({
|
|
2739
2634
|
sortable: this,
|
|
2740
2635
|
name: "sort",
|
|
2741
|
-
toEl:
|
|
2636
|
+
toEl: q,
|
|
2742
2637
|
originalEvent: e
|
|
2743
|
-
})) : (
|
|
2744
|
-
rootEl:
|
|
2638
|
+
})) : (xi >= 0 && (jr({
|
|
2639
|
+
rootEl: q,
|
|
2745
2640
|
name: "add",
|
|
2746
|
-
toEl:
|
|
2747
|
-
fromEl:
|
|
2641
|
+
toEl: q,
|
|
2642
|
+
fromEl: Y,
|
|
2748
2643
|
originalEvent: e
|
|
2749
|
-
}),
|
|
2644
|
+
}), jr({
|
|
2750
2645
|
sortable: this,
|
|
2751
2646
|
name: "remove",
|
|
2752
|
-
toEl:
|
|
2647
|
+
toEl: q,
|
|
2753
2648
|
originalEvent: e
|
|
2754
|
-
}),
|
|
2755
|
-
rootEl:
|
|
2649
|
+
}), jr({
|
|
2650
|
+
rootEl: q,
|
|
2756
2651
|
name: "sort",
|
|
2757
|
-
toEl:
|
|
2758
|
-
fromEl:
|
|
2652
|
+
toEl: q,
|
|
2653
|
+
fromEl: Y,
|
|
2759
2654
|
originalEvent: e
|
|
2760
|
-
}),
|
|
2655
|
+
}), jr({
|
|
2761
2656
|
sortable: this,
|
|
2762
2657
|
name: "sort",
|
|
2763
|
-
toEl:
|
|
2658
|
+
toEl: q,
|
|
2764
2659
|
originalEvent: e
|
|
2765
|
-
})),
|
|
2660
|
+
})), Ti && Ti.save()), G.active && ((xi == null || xi === -1) && (xi = bi, Ci = Si), jr({
|
|
2766
2661
|
sortable: this,
|
|
2767
2662
|
name: "end",
|
|
2768
|
-
toEl:
|
|
2663
|
+
toEl: q,
|
|
2769
2664
|
originalEvent: e
|
|
2770
2665
|
}), this.save()))), this._nulling();
|
|
2771
2666
|
},
|
|
2772
2667
|
_nulling: function() {
|
|
2773
|
-
|
|
2668
|
+
gi("nulling", this), Y = K = q = J = _i = X = vi = yi = ki = Ai = Fi = xi = Ci = bi = Si = Ii = Li = Ti = wi = G.dragged = G.ghost = G.clone = G.active = null, Wi.forEach(function(e) {
|
|
2774
2669
|
e.checked = !0;
|
|
2775
|
-
}),
|
|
2670
|
+
}), Wi.length = ji = Mi = 0;
|
|
2776
2671
|
},
|
|
2777
2672
|
handleEvent: function(e) {
|
|
2778
2673
|
switch (e.type) {
|
|
@@ -2782,7 +2677,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2782
2677
|
break;
|
|
2783
2678
|
case "dragenter":
|
|
2784
2679
|
case "dragover":
|
|
2785
|
-
|
|
2680
|
+
K && (this._onDragOver(e), Mr(e));
|
|
2786
2681
|
break;
|
|
2787
2682
|
case "selectstart":
|
|
2788
2683
|
e.preventDefault();
|
|
@@ -2790,14 +2685,14 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2790
2685
|
}
|
|
2791
2686
|
},
|
|
2792
2687
|
toArray: function() {
|
|
2793
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2688
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], lr(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Br(t));
|
|
2794
2689
|
return e;
|
|
2795
2690
|
},
|
|
2796
2691
|
sort: function(e, t) {
|
|
2797
2692
|
var n = {}, r = this.el;
|
|
2798
2693
|
this.toArray().forEach(function(e, t) {
|
|
2799
2694
|
var i = r.children[t];
|
|
2800
|
-
|
|
2695
|
+
lr(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2801
2696
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2802
2697
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2803
2698
|
}), t && this.animateAll();
|
|
@@ -2807,25 +2702,25 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2807
2702
|
e && e.set && e.set(this);
|
|
2808
2703
|
},
|
|
2809
2704
|
closest: function(e, t) {
|
|
2810
|
-
return
|
|
2705
|
+
return lr(e, t || this.options.draggable, this.el, !1);
|
|
2811
2706
|
},
|
|
2812
2707
|
option: function(e, t) {
|
|
2813
2708
|
var n = this.options;
|
|
2814
2709
|
if (t === void 0) return n[e];
|
|
2815
|
-
var r =
|
|
2816
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
2710
|
+
var r = mi.modifyOption(this, e, t);
|
|
2711
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && $i(n);
|
|
2817
2712
|
},
|
|
2818
2713
|
destroy: function() {
|
|
2819
|
-
|
|
2714
|
+
gi("destroy", this);
|
|
2820
2715
|
var e = this.el;
|
|
2821
|
-
e[
|
|
2716
|
+
e[di] = 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) {
|
|
2822
2717
|
e.removeAttribute("draggable");
|
|
2823
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2718
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Oi.splice(Oi.indexOf(this.el), 1), this.el = e = null;
|
|
2824
2719
|
},
|
|
2825
2720
|
_hideClone: function() {
|
|
2826
|
-
if (!
|
|
2827
|
-
if (
|
|
2828
|
-
|
|
2721
|
+
if (!yi) {
|
|
2722
|
+
if (gi("hideClone", this), G.eventCanceled) return;
|
|
2723
|
+
H(X, "display", "none"), this.options.removeCloneOnHide && X.parentNode && X.parentNode.removeChild(X), yi = !0;
|
|
2829
2724
|
}
|
|
2830
2725
|
},
|
|
2831
2726
|
_showClone: function(e) {
|
|
@@ -2833,60 +2728,60 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2833
2728
|
this._hideClone();
|
|
2834
2729
|
return;
|
|
2835
2730
|
}
|
|
2836
|
-
if (
|
|
2837
|
-
if (
|
|
2838
|
-
|
|
2731
|
+
if (yi) {
|
|
2732
|
+
if (gi("showClone", this), G.eventCanceled) return;
|
|
2733
|
+
K.parentNode == Y && !this.options.group.revertClone ? Y.insertBefore(X, K) : _i ? Y.insertBefore(X, _i) : Y.appendChild(X), this.options.group.revertClone && this.animate(K, X), H(X, "display", ""), yi = !1;
|
|
2839
2734
|
}
|
|
2840
2735
|
}
|
|
2841
|
-
},
|
|
2842
|
-
(
|
|
2843
|
-
}),
|
|
2844
|
-
on:
|
|
2845
|
-
off:
|
|
2846
|
-
css:
|
|
2847
|
-
find:
|
|
2736
|
+
}, Gi && z(document, "touchmove", function(e) {
|
|
2737
|
+
(G.active || Ei) && e.cancelable && e.preventDefault();
|
|
2738
|
+
}), G.utils = {
|
|
2739
|
+
on: z,
|
|
2740
|
+
off: B,
|
|
2741
|
+
css: H,
|
|
2742
|
+
find: dr,
|
|
2848
2743
|
is: function(e, t) {
|
|
2849
|
-
return !!
|
|
2744
|
+
return !!lr(e, t, e, !1);
|
|
2850
2745
|
},
|
|
2851
|
-
extend:
|
|
2852
|
-
throttle:
|
|
2853
|
-
closest:
|
|
2854
|
-
toggleClass:
|
|
2855
|
-
clone:
|
|
2856
|
-
index:
|
|
2857
|
-
nextTick:
|
|
2858
|
-
cancelNextTick:
|
|
2859
|
-
detectDirection:
|
|
2860
|
-
getChild:
|
|
2861
|
-
},
|
|
2862
|
-
return e[
|
|
2863
|
-
},
|
|
2746
|
+
extend: yr,
|
|
2747
|
+
throttle: xr,
|
|
2748
|
+
closest: lr,
|
|
2749
|
+
toggleClass: V,
|
|
2750
|
+
clone: wr,
|
|
2751
|
+
index: W,
|
|
2752
|
+
nextTick: Hr,
|
|
2753
|
+
cancelNextTick: Ur,
|
|
2754
|
+
detectDirection: Xi,
|
|
2755
|
+
getChild: mr
|
|
2756
|
+
}, G.get = function(e) {
|
|
2757
|
+
return e[di];
|
|
2758
|
+
}, G.mount = function() {
|
|
2864
2759
|
var e = [...arguments];
|
|
2865
2760
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
2866
2761
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
2867
|
-
e.utils && (
|
|
2762
|
+
e.utils && (G.utils = Jn(Jn({}, G.utils), e.utils)), mi.mount(e);
|
|
2868
2763
|
});
|
|
2869
|
-
},
|
|
2870
|
-
return new
|
|
2871
|
-
},
|
|
2764
|
+
}, G.create = function(e, t) {
|
|
2765
|
+
return new G(e, t);
|
|
2766
|
+
}, G.version = ti, Z = [], oa = !1, da = xr(function(e, t, n, r) {
|
|
2872
2767
|
if (t.scroll) {
|
|
2873
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
2874
|
-
|
|
2875
|
-
var d = 0, f =
|
|
2768
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = fr(), l = !1, u;
|
|
2769
|
+
aa !== n && (aa = n, Gr(), ia = t.scroll, u = t.scrollFn, ia === !0 && (ia = vr(n, !0)));
|
|
2770
|
+
var d = 0, f = ia;
|
|
2876
2771
|
do {
|
|
2877
|
-
var p = f, m =
|
|
2772
|
+
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;
|
|
2878
2773
|
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"));
|
|
2879
|
-
var
|
|
2880
|
-
if (!
|
|
2881
|
-
(
|
|
2882
|
-
r && this.layer === 0 &&
|
|
2883
|
-
var t =
|
|
2884
|
-
typeof u == "function" && u.call(
|
|
2774
|
+
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);
|
|
2775
|
+
if (!Z[d]) for (var re = 0; re <= d; re++) Z[re] || (Z[re] = {});
|
|
2776
|
+
(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() {
|
|
2777
|
+
r && this.layer === 0 && G.active._onTouchMove(la);
|
|
2778
|
+
var t = Z[this.layer].vy ? Z[this.layer].vy * s : 0, n = Z[this.layer].vx ? Z[this.layer].vx * s : 0;
|
|
2779
|
+
typeof u == "function" && u.call(G.dragged.parentNode[di], n, t, e, la, Z[this.layer].el) !== "continue" || Cr(Z[this.layer].el, n, t);
|
|
2885
2780
|
}.bind({ layer: d }), 24))), d++;
|
|
2886
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
2887
|
-
|
|
2781
|
+
} while (t.bubbleScroll && f !== c && (f = vr(f, !1)));
|
|
2782
|
+
oa = l;
|
|
2888
2783
|
}
|
|
2889
|
-
}, 30),
|
|
2784
|
+
}, 30), fa = function(e) {
|
|
2890
2785
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
2891
2786
|
if (t) {
|
|
2892
2787
|
var c = n || i;
|
|
@@ -2897,29 +2792,30 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
2897
2792
|
putSortable: n
|
|
2898
2793
|
}));
|
|
2899
2794
|
}
|
|
2900
|
-
},
|
|
2795
|
+
}, qr.prototype = {
|
|
2901
2796
|
startIndex: null,
|
|
2902
2797
|
dragStart: function(e) {
|
|
2903
|
-
|
|
2798
|
+
var t = e.oldDraggableIndex;
|
|
2799
|
+
this.startIndex = t;
|
|
2904
2800
|
},
|
|
2905
2801
|
onSpill: function(e) {
|
|
2906
2802
|
var t = e.dragEl, n = e.putSortable;
|
|
2907
2803
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
2908
|
-
var r =
|
|
2804
|
+
var r = mr(this.sortable.el, this.startIndex, this.options);
|
|
2909
2805
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
2910
2806
|
},
|
|
2911
|
-
drop:
|
|
2912
|
-
},
|
|
2807
|
+
drop: fa
|
|
2808
|
+
}, Zn(qr, { pluginName: "revertOnSpill" }), Jr.prototype = {
|
|
2913
2809
|
onSpill: function(e) {
|
|
2914
2810
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
2915
2811
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
2916
2812
|
},
|
|
2917
|
-
drop:
|
|
2918
|
-
},
|
|
2919
|
-
})),
|
|
2920
|
-
(function(
|
|
2921
|
-
typeof
|
|
2922
|
-
})(typeof self < "u" ? self :
|
|
2813
|
+
drop: fa
|
|
2814
|
+
}, Zn(Jr, { pluginName: "removeOnSpill" }), Q = [], ma = [], _a = !1, va = !1, ya = !1, G.mount(new Wr()), G.mount(Jr, qr);
|
|
2815
|
+
})), Ca = /* @__PURE__ */ a(((n, r) => {
|
|
2816
|
+
(function(i, a) {
|
|
2817
|
+
typeof n == "object" && typeof r == "object" ? r.exports = a(t("vue"), (Sa(), e(Kn))) : typeof define == "function" && define.amd ? define([, "sortablejs"], a) : typeof n == "object" ? n.vuedraggable = a(t("vue"), (Sa(), e(Kn))) : i.vuedraggable = a(i.Vue, i.Sortable);
|
|
2818
|
+
})(typeof self < "u" ? self : n, function(e, t) {
|
|
2923
2819
|
return (function(e) {
|
|
2924
2820
|
var t = {};
|
|
2925
2821
|
function n(r) {
|
|
@@ -3340,14 +3236,14 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
3340
3236
|
}
|
|
3341
3237
|
for (var ee = "", w = 0, T = 0; T < S.length; T++) {
|
|
3342
3238
|
C = S[T];
|
|
3343
|
-
for (var
|
|
3344
|
-
var
|
|
3239
|
+
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]));
|
|
3240
|
+
var ie = C.groups;
|
|
3345
3241
|
if (m) {
|
|
3346
|
-
var
|
|
3347
|
-
|
|
3348
|
-
var
|
|
3349
|
-
} else
|
|
3350
|
-
|
|
3242
|
+
var D = [te].concat(ne, E, p);
|
|
3243
|
+
ie !== void 0 && D.push(ie);
|
|
3244
|
+
var ae = String(r.apply(void 0, D));
|
|
3245
|
+
} else ae = b(te, p, E, ne, ie, r);
|
|
3246
|
+
E >= w && (ee += p.slice(w, E) + ae, w = E + te.length);
|
|
3351
3247
|
}
|
|
3352
3248
|
return ee + p.slice(w);
|
|
3353
3249
|
}];
|
|
@@ -3562,7 +3458,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
3562
3458
|
e.exports = function(e, t, n, u, p, x, S) {
|
|
3563
3459
|
i(n, t, u);
|
|
3564
3460
|
var C = function(e) {
|
|
3565
|
-
if (e === p &&
|
|
3461
|
+
if (e === p && E) return E;
|
|
3566
3462
|
if (!h && e in T) return T[e];
|
|
3567
3463
|
switch (e) {
|
|
3568
3464
|
case _: return function() {
|
|
@@ -3578,20 +3474,20 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
3578
3474
|
return function() {
|
|
3579
3475
|
return new n(this);
|
|
3580
3476
|
};
|
|
3581
|
-
}, ee = t + " Iterator", w = !1, T = e.prototype,
|
|
3582
|
-
if (
|
|
3583
|
-
return
|
|
3584
|
-
}), (!d || S) && T[g] !==
|
|
3477
|
+
}, 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, D;
|
|
3478
|
+
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() {
|
|
3479
|
+
return te.call(this);
|
|
3480
|
+
}), (!d || S) && T[g] !== E && c(T, g, E), f[t] = E, p) if (ie = {
|
|
3585
3481
|
values: C(v),
|
|
3586
|
-
keys: x ?
|
|
3482
|
+
keys: x ? E : C(_),
|
|
3587
3483
|
entries: C(y)
|
|
3588
|
-
}, S) for (
|
|
3484
|
+
}, S) for (D in ie) (h || w || !(D in T)) && l(T, D, ie[D]);
|
|
3589
3485
|
else r({
|
|
3590
3486
|
target: t,
|
|
3591
3487
|
proto: !0,
|
|
3592
3488
|
forced: h || w
|
|
3593
|
-
},
|
|
3594
|
-
return
|
|
3489
|
+
}, ie);
|
|
3490
|
+
return ie;
|
|
3595
3491
|
};
|
|
3596
3492
|
}),
|
|
3597
3493
|
"7f9a": (function(e, t, n) {
|
|
@@ -3805,103 +3701,103 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
3805
3701
|
} });
|
|
3806
3702
|
}),
|
|
3807
3703
|
a4d3: (function(e, t, n) {
|
|
3808
|
-
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"),
|
|
3809
|
-
return y(
|
|
3810
|
-
return
|
|
3704
|
+
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"), D = n("90e3"), ae = n("b622"), oe = n("e538"), se = n("746f"), ce = n("d44e"), le = n("69f3"), ue = n("b727").forEach, de = re("hidden"), fe = "Symbol", O = "prototype", pe = ae("toPrimitive"), me = le.set, k = le.getterFor(fe), A = Object[O], he = i.Symbol, j = a("JSON", "stringify"), ge = ee.f, M = w.f, _e = S.f, ve = T.f, ye = ne("symbols"), be = ne("op-symbols"), N = ne("string-to-symbol-registry"), xe = ne("symbol-to-string-registry"), Se = ne("wks"), Ce = i.QObject, P = !Ce || !Ce[O] || !Ce[O].findChild, F = s && u(function() {
|
|
3705
|
+
return y(M({}, "a", { get: function() {
|
|
3706
|
+
return M(this, "a", { value: 7 }).a;
|
|
3811
3707
|
} })).a != 7;
|
|
3812
3708
|
}) ? function(e, t, n) {
|
|
3813
|
-
var r =
|
|
3814
|
-
r && delete
|
|
3815
|
-
} :
|
|
3816
|
-
var n =
|
|
3817
|
-
return
|
|
3818
|
-
type:
|
|
3709
|
+
var r = ge(A, t);
|
|
3710
|
+
r && delete A[t], M(e, t, n), r && e !== A && M(A, t, r);
|
|
3711
|
+
} : M, I = function(e, t) {
|
|
3712
|
+
var n = ye[e] = y(he[O]);
|
|
3713
|
+
return me(n, {
|
|
3714
|
+
type: fe,
|
|
3819
3715
|
tag: e,
|
|
3820
3716
|
description: t
|
|
3821
3717
|
}), s || (n.description = t), n;
|
|
3822
|
-
},
|
|
3718
|
+
}, we = l ? function(e) {
|
|
3823
3719
|
return typeof e == "symbol";
|
|
3824
3720
|
} : function(e) {
|
|
3825
|
-
return Object(e) instanceof
|
|
3826
|
-
},
|
|
3827
|
-
e ===
|
|
3721
|
+
return Object(e) instanceof he;
|
|
3722
|
+
}, Te = function(e, t, n) {
|
|
3723
|
+
e === A && Te(be, t, n), m(e);
|
|
3828
3724
|
var r = _(t, !0);
|
|
3829
|
-
return m(n), d(
|
|
3830
|
-
},
|
|
3725
|
+
return m(n), d(ye, r) ? (n.enumerable ? (d(e, de) && e[de][r] && (e[de][r] = !1), n = y(n, { enumerable: v(0, !1) })) : (d(e, de) || M(e, de, v(1, {})), e[de][r] = !0), F(e, r, n)) : M(e, r, n);
|
|
3726
|
+
}, Ee = function(e, t) {
|
|
3831
3727
|
m(e);
|
|
3832
3728
|
var n = g(t);
|
|
3833
|
-
return
|
|
3834
|
-
(!s ||
|
|
3729
|
+
return ue(b(n).concat(ke(n)), function(t) {
|
|
3730
|
+
(!s || L.call(n, t)) && Te(e, t, n[t]);
|
|
3835
3731
|
}), e;
|
|
3836
|
-
},
|
|
3837
|
-
return t === void 0 ? y(e) :
|
|
3838
|
-
},
|
|
3839
|
-
var t = _(e, !0), n =
|
|
3840
|
-
return this ===
|
|
3841
|
-
},
|
|
3732
|
+
}, De = function(e, t) {
|
|
3733
|
+
return t === void 0 ? y(e) : Ee(y(e), t);
|
|
3734
|
+
}, L = function(e) {
|
|
3735
|
+
var t = _(e, !0), n = ve.call(this, t);
|
|
3736
|
+
return this === A && d(ye, t) && !d(be, t) ? !1 : n || !d(this, t) || !d(ye, t) || d(this, de) && this[de][t] ? n : !0;
|
|
3737
|
+
}, Oe = function(e, t) {
|
|
3842
3738
|
var n = g(e), r = _(t, !0);
|
|
3843
|
-
if (!(n ===
|
|
3844
|
-
var i =
|
|
3845
|
-
return i && d(
|
|
3739
|
+
if (!(n === A && d(ye, r) && !d(be, r))) {
|
|
3740
|
+
var i = ge(n, r);
|
|
3741
|
+
return i && d(ye, r) && !(d(n, de) && n[de][r]) && (i.enumerable = !0), i;
|
|
3846
3742
|
}
|
|
3847
|
-
},
|
|
3848
|
-
var t =
|
|
3849
|
-
return
|
|
3850
|
-
!d(
|
|
3743
|
+
}, R = function(e) {
|
|
3744
|
+
var t = _e(g(e)), n = [];
|
|
3745
|
+
return ue(t, function(e) {
|
|
3746
|
+
!d(ye, e) && !d(ie, e) && n.push(e);
|
|
3851
3747
|
}), n;
|
|
3852
|
-
},
|
|
3853
|
-
var t = e ===
|
|
3854
|
-
return
|
|
3855
|
-
d(
|
|
3748
|
+
}, ke = function(e) {
|
|
3749
|
+
var t = e === A, n = _e(t ? be : g(e)), r = [];
|
|
3750
|
+
return ue(n, function(e) {
|
|
3751
|
+
d(ye, e) && (!t || d(A, e)) && r.push(ye[e]);
|
|
3856
3752
|
}), r;
|
|
3857
3753
|
};
|
|
3858
|
-
c || (
|
|
3859
|
-
if (this instanceof
|
|
3860
|
-
var e = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]), t =
|
|
3861
|
-
this ===
|
|
3754
|
+
c || (he = function() {
|
|
3755
|
+
if (this instanceof he) throw TypeError("Symbol is not a constructor");
|
|
3756
|
+
var e = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]), t = D(e), n = function(e) {
|
|
3757
|
+
this === A && n.call(be, e), d(this, de) && d(this[de], t) && (this[de][t] = !1), F(this, t, v(1, e));
|
|
3862
3758
|
};
|
|
3863
|
-
return s &&
|
|
3759
|
+
return s && P && F(A, t, {
|
|
3864
3760
|
configurable: !0,
|
|
3865
3761
|
set: n
|
|
3866
|
-
}),
|
|
3867
|
-
},
|
|
3868
|
-
return
|
|
3869
|
-
}),
|
|
3870
|
-
return
|
|
3871
|
-
}), T.f =
|
|
3872
|
-
return
|
|
3873
|
-
}, s && (
|
|
3762
|
+
}), I(t, e);
|
|
3763
|
+
}, E(he[O], "toString", function() {
|
|
3764
|
+
return k(this).tag;
|
|
3765
|
+
}), E(he, "withoutSetter", function(e) {
|
|
3766
|
+
return I(D(e), e);
|
|
3767
|
+
}), T.f = L, w.f = Te, ee.f = Oe, x.f = S.f = R, C.f = ke, oe.f = function(e) {
|
|
3768
|
+
return I(ae(e), e);
|
|
3769
|
+
}, s && (M(he[O], "description", {
|
|
3874
3770
|
configurable: !0,
|
|
3875
3771
|
get: function() {
|
|
3876
|
-
return
|
|
3772
|
+
return k(this).description;
|
|
3877
3773
|
}
|
|
3878
|
-
}), o ||
|
|
3774
|
+
}), o || E(A, "propertyIsEnumerable", L, { unsafe: !0 }))), r({
|
|
3879
3775
|
global: !0,
|
|
3880
3776
|
wrap: !0,
|
|
3881
3777
|
forced: !c,
|
|
3882
3778
|
sham: !c
|
|
3883
|
-
}, { Symbol:
|
|
3884
|
-
|
|
3779
|
+
}, { Symbol: he }), ue(b(Se), function(e) {
|
|
3780
|
+
se(e);
|
|
3885
3781
|
}), r({
|
|
3886
|
-
target:
|
|
3782
|
+
target: fe,
|
|
3887
3783
|
stat: !0,
|
|
3888
3784
|
forced: !c
|
|
3889
3785
|
}, {
|
|
3890
3786
|
for: function(e) {
|
|
3891
3787
|
var t = String(e);
|
|
3892
|
-
if (d(
|
|
3893
|
-
var n =
|
|
3894
|
-
return
|
|
3788
|
+
if (d(N, t)) return N[t];
|
|
3789
|
+
var n = he(t);
|
|
3790
|
+
return N[t] = n, xe[n] = t, n;
|
|
3895
3791
|
},
|
|
3896
3792
|
keyFor: function(e) {
|
|
3897
|
-
if (!
|
|
3898
|
-
if (d(
|
|
3793
|
+
if (!we(e)) throw TypeError(e + " is not a symbol");
|
|
3794
|
+
if (d(xe, e)) return xe[e];
|
|
3899
3795
|
},
|
|
3900
3796
|
useSetter: function() {
|
|
3901
|
-
|
|
3797
|
+
P = !0;
|
|
3902
3798
|
},
|
|
3903
3799
|
useSimple: function() {
|
|
3904
|
-
|
|
3800
|
+
P = !1;
|
|
3905
3801
|
}
|
|
3906
3802
|
}), r({
|
|
3907
3803
|
target: "Object",
|
|
@@ -3909,17 +3805,17 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
3909
3805
|
forced: !c,
|
|
3910
3806
|
sham: !s
|
|
3911
3807
|
}, {
|
|
3912
|
-
create:
|
|
3913
|
-
defineProperty:
|
|
3914
|
-
defineProperties:
|
|
3915
|
-
getOwnPropertyDescriptor:
|
|
3808
|
+
create: De,
|
|
3809
|
+
defineProperty: Te,
|
|
3810
|
+
defineProperties: Ee,
|
|
3811
|
+
getOwnPropertyDescriptor: Oe
|
|
3916
3812
|
}), r({
|
|
3917
3813
|
target: "Object",
|
|
3918
3814
|
stat: !0,
|
|
3919
3815
|
forced: !c
|
|
3920
3816
|
}, {
|
|
3921
|
-
getOwnPropertyNames:
|
|
3922
|
-
getOwnPropertySymbols:
|
|
3817
|
+
getOwnPropertyNames: R,
|
|
3818
|
+
getOwnPropertySymbols: ke
|
|
3923
3819
|
}), r({
|
|
3924
3820
|
target: "Object",
|
|
3925
3821
|
stat: !0,
|
|
@@ -3928,19 +3824,19 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
3928
3824
|
})
|
|
3929
3825
|
}, { getOwnPropertySymbols: function(e) {
|
|
3930
3826
|
return C.f(h(e));
|
|
3931
|
-
} }),
|
|
3827
|
+
} }), j && r({
|
|
3932
3828
|
target: "JSON",
|
|
3933
3829
|
stat: !0,
|
|
3934
3830
|
forced: !c || u(function() {
|
|
3935
|
-
var e =
|
|
3936
|
-
return
|
|
3831
|
+
var e = he();
|
|
3832
|
+
return j([e]) != "[null]" || j({ a: e }) != "{}" || j(Object(e)) != "{}";
|
|
3937
3833
|
})
|
|
3938
3834
|
}, { stringify: function(e, t, n) {
|
|
3939
3835
|
for (var r = [e], i = 1, a; arguments.length > i;) r.push(arguments[i++]);
|
|
3940
|
-
if (a = t, !(!p(t) && e === void 0 ||
|
|
3941
|
-
if (typeof a == "function" && (t = a.call(this, e, t)), !
|
|
3942
|
-
}), r[1] = t,
|
|
3943
|
-
} }),
|
|
3836
|
+
if (a = t, !(!p(t) && e === void 0 || we(e))) return f(t) || (t = function(e, t) {
|
|
3837
|
+
if (typeof a == "function" && (t = a.call(this, e, t)), !we(t)) return t;
|
|
3838
|
+
}), r[1] = t, j.apply(null, r);
|
|
3839
|
+
} }), he[O][pe] || te(he[O], pe, he[O].valueOf), ce(he, fe), ie[de] = !0;
|
|
3944
3840
|
}),
|
|
3945
3841
|
a630: (function(e, t, n) {
|
|
3946
3842
|
var r = n("23e7"), i = n("4df4");
|
|
@@ -4615,43 +4511,43 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4615
4511
|
});
|
|
4616
4512
|
});
|
|
4617
4513
|
n("5db7"), n("73d9");
|
|
4618
|
-
var
|
|
4514
|
+
var te = [
|
|
4619
4515
|
"Start",
|
|
4620
4516
|
"Add",
|
|
4621
4517
|
"Remove",
|
|
4622
4518
|
"Update",
|
|
4623
4519
|
"End"
|
|
4624
|
-
],
|
|
4520
|
+
], E = [
|
|
4625
4521
|
"Choose",
|
|
4626
4522
|
"Unchoose",
|
|
4627
4523
|
"Sort",
|
|
4628
4524
|
"Filter",
|
|
4629
4525
|
"Clone"
|
|
4630
|
-
],
|
|
4526
|
+
], ne = ["Move"], re = [
|
|
4527
|
+
ne,
|
|
4631
4528
|
te,
|
|
4632
|
-
E
|
|
4633
|
-
D
|
|
4529
|
+
E
|
|
4634
4530
|
].flatMap(function(e) {
|
|
4635
4531
|
return e;
|
|
4636
4532
|
}).map(function(e) {
|
|
4637
4533
|
return `on${e}`;
|
|
4638
|
-
}),
|
|
4639
|
-
manage:
|
|
4640
|
-
manageAndEmit:
|
|
4641
|
-
emit:
|
|
4534
|
+
}), ie = {
|
|
4535
|
+
manage: ne,
|
|
4536
|
+
manageAndEmit: te,
|
|
4537
|
+
emit: E
|
|
4642
4538
|
};
|
|
4643
|
-
function
|
|
4644
|
-
return
|
|
4539
|
+
function D(e) {
|
|
4540
|
+
return re.indexOf(e) !== -1;
|
|
4645
4541
|
}
|
|
4646
4542
|
n("caad"), n("2ca0");
|
|
4647
|
-
var
|
|
4648
|
-
function ae(e) {
|
|
4649
|
-
return ie.includes(e);
|
|
4650
|
-
}
|
|
4543
|
+
var ae = /* @__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(".");
|
|
4651
4544
|
function oe(e) {
|
|
4545
|
+
return ae.includes(e);
|
|
4546
|
+
}
|
|
4547
|
+
function se(e) {
|
|
4652
4548
|
return ["transition-group", "TransitionGroup"].includes(e);
|
|
4653
4549
|
}
|
|
4654
|
-
function
|
|
4550
|
+
function ce(e) {
|
|
4655
4551
|
return [
|
|
4656
4552
|
"id",
|
|
4657
4553
|
"class",
|
|
@@ -4659,67 +4555,67 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4659
4555
|
"style"
|
|
4660
4556
|
].includes(e) || e.startsWith("data-") || e.startsWith("aria-") || e.startsWith("on");
|
|
4661
4557
|
}
|
|
4662
|
-
function
|
|
4558
|
+
function le(e) {
|
|
4663
4559
|
return e.reduce(function(e, t) {
|
|
4664
4560
|
var n = m(t, 2), r = n[0];
|
|
4665
4561
|
return e[r] = n[1], e;
|
|
4666
4562
|
}, {});
|
|
4667
4563
|
}
|
|
4668
|
-
function
|
|
4564
|
+
function ue(e) {
|
|
4669
4565
|
var t = e.$attrs, n = e.componentData, r = n === void 0 ? {} : n;
|
|
4670
|
-
return c(c({},
|
|
4566
|
+
return c(c({}, le(Object.entries(t).filter(function(e) {
|
|
4671
4567
|
var t = m(e, 2), n = t[0];
|
|
4672
|
-
return t[1],
|
|
4568
|
+
return t[1], ce(n);
|
|
4673
4569
|
}))), r);
|
|
4674
4570
|
}
|
|
4675
|
-
function
|
|
4676
|
-
var t = e.$attrs, n = e.callBackBuilder, r =
|
|
4571
|
+
function de(e) {
|
|
4572
|
+
var t = e.$attrs, n = e.callBackBuilder, r = le(fe(t));
|
|
4677
4573
|
Object.entries(n).forEach(function(e) {
|
|
4678
4574
|
var t = m(e, 2), n = t[0], i = t[1];
|
|
4679
|
-
|
|
4575
|
+
ie[n].forEach(function(e) {
|
|
4680
4576
|
r[`on${e}`] = i(e);
|
|
4681
4577
|
});
|
|
4682
4578
|
});
|
|
4683
4579
|
var i = `[data-draggable]${r.draggable || ""}`;
|
|
4684
4580
|
return c(c({}, r), {}, { draggable: i });
|
|
4685
4581
|
}
|
|
4686
|
-
function
|
|
4582
|
+
function fe(e) {
|
|
4687
4583
|
return Object.entries(e).filter(function(e) {
|
|
4688
4584
|
var t = m(e, 2), n = t[0];
|
|
4689
|
-
return t[1], !
|
|
4585
|
+
return t[1], !ce(n);
|
|
4690
4586
|
}).map(function(e) {
|
|
4691
4587
|
var t = m(e, 2), n = t[0], r = t[1];
|
|
4692
4588
|
return [T(n), r];
|
|
4693
4589
|
}).filter(function(e) {
|
|
4694
4590
|
var t = m(e, 2), n = t[0];
|
|
4695
|
-
return t[1], !
|
|
4591
|
+
return t[1], !D(n);
|
|
4696
4592
|
});
|
|
4697
4593
|
}
|
|
4698
4594
|
n("c740");
|
|
4699
|
-
function
|
|
4595
|
+
function O(e, t) {
|
|
4700
4596
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
4701
4597
|
}
|
|
4702
|
-
function
|
|
4598
|
+
function pe(e, t) {
|
|
4703
4599
|
for (var n = 0; n < t.length; n++) {
|
|
4704
4600
|
var r = t[n];
|
|
4705
4601
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
|
|
4706
4602
|
}
|
|
4707
4603
|
}
|
|
4708
|
-
function
|
|
4709
|
-
return t &&
|
|
4604
|
+
function me(e, t, n) {
|
|
4605
|
+
return t && pe(e.prototype, t), n && pe(e, n), e;
|
|
4710
4606
|
}
|
|
4711
|
-
var
|
|
4607
|
+
var k = function(e) {
|
|
4712
4608
|
return e.el;
|
|
4713
|
-
},
|
|
4609
|
+
}, A = function(e, t) {
|
|
4714
4610
|
return e.__draggable_context = t;
|
|
4715
|
-
},
|
|
4611
|
+
}, he = function(e) {
|
|
4716
4612
|
return e.__draggable_context;
|
|
4717
|
-
},
|
|
4613
|
+
}, j = /* @__PURE__ */ function() {
|
|
4718
4614
|
function e(t) {
|
|
4719
4615
|
var n = t.nodes, r = n.header, i = n.default, a = n.footer, o = t.root, s = t.realList;
|
|
4720
|
-
|
|
4616
|
+
O(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;
|
|
4721
4617
|
}
|
|
4722
|
-
return
|
|
4618
|
+
return me(e, [
|
|
4723
4619
|
{
|
|
4724
4620
|
key: "render",
|
|
4725
4621
|
value: function(e, t) {
|
|
@@ -4734,7 +4630,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4734
4630
|
value: function() {
|
|
4735
4631
|
var e = this.defaultNodes, t = this.realList;
|
|
4736
4632
|
e.forEach(function(e, n) {
|
|
4737
|
-
|
|
4633
|
+
A(k(e), {
|
|
4738
4634
|
element: t[n],
|
|
4739
4635
|
index: n
|
|
4740
4636
|
});
|
|
@@ -4744,7 +4640,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4744
4640
|
{
|
|
4745
4641
|
key: "getUnderlyingVm",
|
|
4746
4642
|
value: function(e) {
|
|
4747
|
-
return
|
|
4643
|
+
return he(e);
|
|
4748
4644
|
}
|
|
4749
4645
|
},
|
|
4750
4646
|
{
|
|
@@ -4752,10 +4648,10 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4752
4648
|
value: function(e, t) {
|
|
4753
4649
|
var n = this.defaultNodes, r = n.length, i = t.children, a = i.item(e);
|
|
4754
4650
|
if (a === null) return r;
|
|
4755
|
-
var o =
|
|
4651
|
+
var o = he(a);
|
|
4756
4652
|
if (o) return o.index;
|
|
4757
4653
|
if (r === 0) return 0;
|
|
4758
|
-
var s =
|
|
4654
|
+
var s = k(n[0]);
|
|
4759
4655
|
return e < v(i).findIndex(function(e) {
|
|
4760
4656
|
return e === s;
|
|
4761
4657
|
}) ? 0 : r;
|
|
@@ -4768,14 +4664,14 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4768
4664
|
}
|
|
4769
4665
|
}
|
|
4770
4666
|
]), e;
|
|
4771
|
-
}(),
|
|
4772
|
-
function
|
|
4667
|
+
}(), ge = n("8bbf");
|
|
4668
|
+
function M(e, t) {
|
|
4773
4669
|
var n = e[t];
|
|
4774
4670
|
return n ? n() : [];
|
|
4775
4671
|
}
|
|
4776
|
-
function
|
|
4672
|
+
function _e(e) {
|
|
4777
4673
|
var t = e.$slots, n = e.realList, r = e.getKey, i = n || [], a = m(["header", "footer"].map(function(e) {
|
|
4778
|
-
return
|
|
4674
|
+
return M(t, e);
|
|
4779
4675
|
}), 2), o = a[0], s = a[1], l = t.item;
|
|
4780
4676
|
if (!l) throw Error("draggable element must have an item slot");
|
|
4781
4677
|
var u = i.flatMap(function(e, t) {
|
|
@@ -4793,45 +4689,45 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4793
4689
|
default: u
|
|
4794
4690
|
};
|
|
4795
4691
|
}
|
|
4796
|
-
function
|
|
4797
|
-
var t =
|
|
4692
|
+
function ve(e) {
|
|
4693
|
+
var t = se(e), n = !oe(e) && !t;
|
|
4798
4694
|
return {
|
|
4799
4695
|
transition: t,
|
|
4800
4696
|
externalComponent: n,
|
|
4801
|
-
tag: n ? (0,
|
|
4697
|
+
tag: n ? (0, ge.resolveComponent)(e) : t ? ge.TransitionGroup : e
|
|
4802
4698
|
};
|
|
4803
4699
|
}
|
|
4804
|
-
function
|
|
4700
|
+
function ye(e) {
|
|
4805
4701
|
var t = e.$slots, n = e.tag, r = e.realList, i = e.getKey;
|
|
4806
|
-
return new
|
|
4807
|
-
nodes:
|
|
4702
|
+
return new j({
|
|
4703
|
+
nodes: _e({
|
|
4808
4704
|
$slots: t,
|
|
4809
4705
|
realList: r,
|
|
4810
4706
|
getKey: i
|
|
4811
4707
|
}),
|
|
4812
|
-
root:
|
|
4708
|
+
root: ve(n),
|
|
4813
4709
|
realList: r
|
|
4814
4710
|
});
|
|
4815
4711
|
}
|
|
4816
|
-
function
|
|
4712
|
+
function be(e, t) {
|
|
4817
4713
|
var n = this;
|
|
4818
|
-
(0,
|
|
4714
|
+
(0, ge.nextTick)(function() {
|
|
4819
4715
|
return n.$emit(e.toLowerCase(), t);
|
|
4820
4716
|
});
|
|
4821
4717
|
}
|
|
4822
|
-
function
|
|
4718
|
+
function N(e) {
|
|
4823
4719
|
var t = this;
|
|
4824
4720
|
return function(n, r) {
|
|
4825
4721
|
if (t.realList !== null) return t[`onDrag${e}`](n, r);
|
|
4826
4722
|
};
|
|
4827
4723
|
}
|
|
4828
|
-
function
|
|
4829
|
-
var t = this, n =
|
|
4724
|
+
function xe(e) {
|
|
4725
|
+
var t = this, n = N.call(this, e);
|
|
4830
4726
|
return function(r, i) {
|
|
4831
|
-
n.call(t, r, i),
|
|
4727
|
+
n.call(t, r, i), be.call(t, e, r);
|
|
4832
4728
|
};
|
|
4833
4729
|
}
|
|
4834
|
-
var
|
|
4730
|
+
var Se = null, Ce = {
|
|
4835
4731
|
list: {
|
|
4836
4732
|
type: Array,
|
|
4837
4733
|
required: !1,
|
|
@@ -4865,34 +4761,34 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4865
4761
|
required: !1,
|
|
4866
4762
|
default: null
|
|
4867
4763
|
}
|
|
4868
|
-
},
|
|
4764
|
+
}, P = ["update:modelValue", "change"].concat(v([].concat(v(ie.manageAndEmit), v(ie.emit)).map(function(e) {
|
|
4869
4765
|
return e.toLowerCase();
|
|
4870
4766
|
})));
|
|
4871
|
-
t.default = (0,
|
|
4767
|
+
t.default = (0, ge.defineComponent)({
|
|
4872
4768
|
name: "draggable",
|
|
4873
4769
|
inheritAttrs: !1,
|
|
4874
|
-
props:
|
|
4875
|
-
emits:
|
|
4770
|
+
props: Ce,
|
|
4771
|
+
emits: P,
|
|
4876
4772
|
data: function() {
|
|
4877
4773
|
return { error: !1 };
|
|
4878
4774
|
},
|
|
4879
4775
|
render: function() {
|
|
4880
4776
|
try {
|
|
4881
4777
|
this.error = !1;
|
|
4882
|
-
var e = this.$slots, t = this.$attrs, n = this.tag, r = this.componentData, i = this.realList, a = this.getKey, o =
|
|
4778
|
+
var e = this.$slots, t = this.$attrs, n = this.tag, r = this.componentData, i = this.realList, a = this.getKey, o = ye({
|
|
4883
4779
|
$slots: e,
|
|
4884
4780
|
tag: n,
|
|
4885
4781
|
realList: i,
|
|
4886
4782
|
getKey: a
|
|
4887
4783
|
});
|
|
4888
4784
|
this.componentStructure = o;
|
|
4889
|
-
var s =
|
|
4785
|
+
var s = ue({
|
|
4890
4786
|
$attrs: t,
|
|
4891
4787
|
componentData: r
|
|
4892
4788
|
});
|
|
4893
|
-
return o.render(
|
|
4789
|
+
return o.render(ge.h, s);
|
|
4894
4790
|
} catch (e) {
|
|
4895
|
-
return this.error = !0, (0,
|
|
4791
|
+
return this.error = !0, (0, ge.h)("pre", { style: { color: "red" } }, e.stack);
|
|
4896
4792
|
}
|
|
4897
4793
|
},
|
|
4898
4794
|
created: function() {
|
|
@@ -4903,17 +4799,17 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4903
4799
|
if (!this.error) {
|
|
4904
4800
|
var t = this.$attrs, n = this.$el;
|
|
4905
4801
|
this.componentStructure.updated();
|
|
4906
|
-
var r =
|
|
4802
|
+
var r = de({
|
|
4907
4803
|
$attrs: t,
|
|
4908
4804
|
callBackBuilder: {
|
|
4909
4805
|
manageAndEmit: function(t) {
|
|
4910
|
-
return
|
|
4806
|
+
return xe.call(e, t);
|
|
4911
4807
|
},
|
|
4912
4808
|
emit: function(t) {
|
|
4913
|
-
return
|
|
4809
|
+
return be.bind(e, t);
|
|
4914
4810
|
},
|
|
4915
4811
|
manage: function(t) {
|
|
4916
|
-
return
|
|
4812
|
+
return N.call(e, t);
|
|
4917
4813
|
}
|
|
4918
4814
|
}
|
|
4919
4815
|
}), i = n.nodeType === 1 ? n : n.parentElement;
|
|
@@ -4940,7 +4836,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4940
4836
|
watch: { $attrs: {
|
|
4941
4837
|
handler: function(e) {
|
|
4942
4838
|
var t = this._sortable;
|
|
4943
|
-
t &&
|
|
4839
|
+
t && fe(e).forEach(function(e) {
|
|
4944
4840
|
var n = m(e, 2), r = n[0], i = n[1];
|
|
4945
4841
|
t.option(r, i);
|
|
4946
4842
|
});
|
|
@@ -4956,7 +4852,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4956
4852
|
},
|
|
4957
4853
|
emitChanges: function(e) {
|
|
4958
4854
|
var t = this;
|
|
4959
|
-
(0,
|
|
4855
|
+
(0, ge.nextTick)(function() {
|
|
4960
4856
|
return t.$emit("change", e);
|
|
4961
4857
|
});
|
|
4962
4858
|
},
|
|
@@ -4992,7 +4888,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
4992
4888
|
return this.componentStructure.getVmIndexFromDomIndex(e, this.targetDomElement);
|
|
4993
4889
|
},
|
|
4994
4890
|
onDragStart: function(e) {
|
|
4995
|
-
this.context = this.getUnderlyingVm(e.item), e.item._underlying_vm_ = this.clone(this.context.element),
|
|
4891
|
+
this.context = this.getUnderlyingVm(e.item), e.item._underlying_vm_ = this.clone(this.context.element), Se = e.item;
|
|
4996
4892
|
},
|
|
4997
4893
|
onDragAdd: function(e) {
|
|
4998
4894
|
var t = e.item._underlying_vm_;
|
|
@@ -5036,7 +4932,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5036
4932
|
var n = v(t.to.children).filter(function(e) {
|
|
5037
4933
|
return e.style.display !== "none";
|
|
5038
4934
|
}), r = n.indexOf(t.related), i = e.component.getVmIndexFromDomIndex(r);
|
|
5039
|
-
return n.indexOf(
|
|
4935
|
+
return n.indexOf(Se) !== -1 || !t.willInsertAfter ? i : i + 1;
|
|
5040
4936
|
},
|
|
5041
4937
|
onDragMove: function(e, t) {
|
|
5042
4938
|
var n = this.move, r = this.realList;
|
|
@@ -5048,7 +4944,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5048
4944
|
}), t);
|
|
5049
4945
|
},
|
|
5050
4946
|
onDragEnd: function() {
|
|
5051
|
-
|
|
4947
|
+
Se = null;
|
|
5052
4948
|
}
|
|
5053
4949
|
}
|
|
5054
4950
|
});
|
|
@@ -5116,11 +5012,11 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5116
5012
|
})
|
|
5117
5013
|
}).default;
|
|
5118
5014
|
});
|
|
5119
|
-
})),
|
|
5015
|
+
})), wa = /* @__PURE__ */ r(Ca(), 1), Ta = { class: "tpl:w-full" }, Ea = { class: "tpl:flex tpl:gap-0" }, Da = {
|
|
5120
5016
|
key: 0,
|
|
5121
5017
|
"data-testid": "section-drop-hint",
|
|
5122
5018
|
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)]"
|
|
5123
|
-
},
|
|
5019
|
+
}, Oa = /* @__PURE__ */ M({
|
|
5124
5020
|
__name: "SectionBlock",
|
|
5125
5021
|
props: {
|
|
5126
5022
|
block: {},
|
|
@@ -5128,13 +5024,13 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5128
5024
|
},
|
|
5129
5025
|
setup(e) {
|
|
5130
5026
|
let t = {
|
|
5131
|
-
title:
|
|
5132
|
-
paragraph:
|
|
5133
|
-
image:
|
|
5134
|
-
button:
|
|
5135
|
-
divider:
|
|
5136
|
-
custom:
|
|
5137
|
-
}, n = e, { t: r } =
|
|
5027
|
+
title: Gn,
|
|
5028
|
+
paragraph: On,
|
|
5029
|
+
image: xn,
|
|
5030
|
+
button: xt,
|
|
5031
|
+
divider: an,
|
|
5032
|
+
custom: nn
|
|
5033
|
+
}, n = e, { t: r } = D(), i = m(v, "SectionBlock"), a = ve(S, null), o = ve(w, null), s = O(() => {
|
|
5138
5034
|
switch (n.block.columns) {
|
|
5139
5035
|
case "2": return ["50%", "50%"];
|
|
5140
5036
|
case "3": return [
|
|
@@ -5146,34 +5042,34 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5146
5042
|
case "2-1": return ["66.67%", "33.33%"];
|
|
5147
5043
|
default: return ["100%"];
|
|
5148
5044
|
}
|
|
5149
|
-
}), c =
|
|
5045
|
+
}), c = O(() => {
|
|
5150
5046
|
let e = s.value.length, t = [...n.block.children];
|
|
5151
5047
|
for (; t.length < e;) t.push([]);
|
|
5152
5048
|
return t.slice(0, e);
|
|
5153
5049
|
});
|
|
5154
|
-
function
|
|
5050
|
+
function l(e) {
|
|
5155
5051
|
return c.value[e] || [];
|
|
5156
5052
|
}
|
|
5157
|
-
function
|
|
5053
|
+
function u(e, t) {
|
|
5158
5054
|
let r = [...n.block.children];
|
|
5159
5055
|
for (; r.length <= e;) r.push([]);
|
|
5160
5056
|
r[e] = t, i.updateBlock(n.block.id, { children: r });
|
|
5161
5057
|
}
|
|
5162
|
-
function
|
|
5163
|
-
return
|
|
5058
|
+
function d(e) {
|
|
5059
|
+
return kn(e, o, t);
|
|
5164
5060
|
}
|
|
5165
|
-
function
|
|
5061
|
+
function f(e, t) {
|
|
5166
5062
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
5167
5063
|
fieldValues: t.fieldValues,
|
|
5168
5064
|
dataSourceFetched: t.dataSourceFetched
|
|
5169
5065
|
});
|
|
5170
5066
|
}
|
|
5171
|
-
return (t, n) => (
|
|
5067
|
+
return (t, n) => (P(), k("div", Ta, [A("div", Ea, [(P(!0), k(fe, null, we(c.value, (t, n) => (P(), k("div", {
|
|
5172
5068
|
key: n,
|
|
5173
|
-
class:
|
|
5174
|
-
style:
|
|
5175
|
-
}, [
|
|
5176
|
-
"model-value":
|
|
5069
|
+
class: be(["tpl:relative tpl:min-h-[60px] tpl:rounded", l(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
5070
|
+
style: N({ width: s.value[n] })
|
|
5071
|
+
}, [j(R(wa.default), {
|
|
5072
|
+
"model-value": l(n),
|
|
5177
5073
|
group: {
|
|
5178
5074
|
name: "blocks",
|
|
5179
5075
|
pull: !0,
|
|
@@ -5184,18 +5080,18 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5184
5080
|
"ghost-class": "tpl-ghost",
|
|
5185
5081
|
"empty-insert-threshold": 20,
|
|
5186
5082
|
class: "tpl:min-h-[60px]",
|
|
5187
|
-
"onUpdate:modelValue": (e) =>
|
|
5083
|
+
"onUpdate:modelValue": (e) => u(n, e)
|
|
5188
5084
|
}, {
|
|
5189
|
-
item:
|
|
5085
|
+
item: je(({ element: t }) => [Me(A("div", null, [j(Un, {
|
|
5190
5086
|
block: t,
|
|
5191
|
-
"is-selected":
|
|
5087
|
+
"is-selected": R(i).state.selectedBlockId === t.id,
|
|
5192
5088
|
viewport: e.viewport,
|
|
5193
|
-
onSelect: (e) =>
|
|
5089
|
+
onSelect: (e) => R(i).selectBlock(t.id)
|
|
5194
5090
|
}, {
|
|
5195
|
-
default:
|
|
5091
|
+
default: je(() => [(P(), pe(Ee(d(t)), {
|
|
5196
5092
|
block: t,
|
|
5197
5093
|
viewport: e.viewport,
|
|
5198
|
-
onFetchData: (e) =>
|
|
5094
|
+
onFetchData: (e) => f(t, e)
|
|
5199
5095
|
}, null, 40, [
|
|
5200
5096
|
"block",
|
|
5201
5097
|
"viewport",
|
|
@@ -5207,15 +5103,15 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5207
5103
|
"is-selected",
|
|
5208
5104
|
"viewport",
|
|
5209
5105
|
"onSelect"
|
|
5210
|
-
])], 512), [[
|
|
5106
|
+
])], 512), [[ke, !R(a)?.isHidden(t.id)]])]),
|
|
5211
5107
|
_: 1
|
|
5212
5108
|
}, 8, [
|
|
5213
5109
|
"model-value",
|
|
5214
5110
|
"group",
|
|
5215
5111
|
"onUpdate:modelValue"
|
|
5216
|
-
]),
|
|
5112
|
+
]), l(n).length === 0 ? (P(), k("div", Da, [A("span", null, L(R(r).section.dropHere), 1)])) : me("", !0)], 6))), 128))])]));
|
|
5217
5113
|
}
|
|
5218
|
-
}),
|
|
5114
|
+
}), ka = {
|
|
5219
5115
|
facebook: {
|
|
5220
5116
|
name: "Facebook",
|
|
5221
5117
|
color: "#1877F2",
|
|
@@ -5296,11 +5192,11 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5296
5192
|
color: "#1769FF",
|
|
5297
5193
|
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"
|
|
5298
5194
|
}
|
|
5299
|
-
},
|
|
5195
|
+
}, Aa = {
|
|
5300
5196
|
small: 24,
|
|
5301
5197
|
medium: 32,
|
|
5302
5198
|
large: 48
|
|
5303
|
-
},
|
|
5199
|
+
}, ja = [
|
|
5304
5200
|
"facebook",
|
|
5305
5201
|
"twitter",
|
|
5306
5202
|
"instagram",
|
|
@@ -5317,11 +5213,11 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5317
5213
|
"github",
|
|
5318
5214
|
"dribbble",
|
|
5319
5215
|
"behance"
|
|
5320
|
-
],
|
|
5216
|
+
], Ma = [
|
|
5321
5217
|
"width",
|
|
5322
5218
|
"height",
|
|
5323
5219
|
"fill"
|
|
5324
|
-
],
|
|
5220
|
+
], Na = ["d"], Pa = /* @__PURE__ */ M({
|
|
5325
5221
|
__name: "SocialIconSvg",
|
|
5326
5222
|
props: {
|
|
5327
5223
|
platform: {},
|
|
@@ -5329,7 +5225,7 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5329
5225
|
iconSize: {}
|
|
5330
5226
|
},
|
|
5331
5227
|
setup(e) {
|
|
5332
|
-
let t = e, n =
|
|
5228
|
+
let t = e, n = O(() => ka[t.platform]), r = O(() => Aa[t.iconSize]), i = O(() => {
|
|
5333
5229
|
let e = {
|
|
5334
5230
|
display: "inline-flex",
|
|
5335
5231
|
alignItems: "center",
|
|
@@ -5366,40 +5262,40 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5366
5262
|
};
|
|
5367
5263
|
default: return e;
|
|
5368
5264
|
}
|
|
5369
|
-
}), a =
|
|
5370
|
-
return (e, t) => (
|
|
5265
|
+
}), a = O(() => Math.floor(r.value * .6)), o = O(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
5266
|
+
return (e, t) => (P(), k("span", { style: N(i.value) }, [(P(), k("svg", {
|
|
5371
5267
|
width: a.value,
|
|
5372
5268
|
height: a.value,
|
|
5373
5269
|
viewBox: "0 0 24 24",
|
|
5374
5270
|
fill: o.value,
|
|
5375
5271
|
xmlns: "http://www.w3.org/2000/svg"
|
|
5376
|
-
}, [
|
|
5272
|
+
}, [A("path", { d: n.value.path }, null, 8, Na)], 8, Ma))], 4));
|
|
5377
5273
|
}
|
|
5378
|
-
}),
|
|
5274
|
+
}), Fa = { class: "tpl:w-full" }, Ia = ["href"], La = {
|
|
5379
5275
|
key: 1,
|
|
5380
5276
|
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)]"
|
|
5381
|
-
},
|
|
5277
|
+
}, Ra = /* @__PURE__ */ M({
|
|
5382
5278
|
__name: "SocialIconsBlock",
|
|
5383
5279
|
props: {
|
|
5384
5280
|
block: {},
|
|
5385
5281
|
viewport: {}
|
|
5386
5282
|
},
|
|
5387
5283
|
setup(e) {
|
|
5388
|
-
let t = e, { t: n } =
|
|
5284
|
+
let t = e, { t: n } = D(), r = O(() => ({
|
|
5389
5285
|
display: "flex",
|
|
5390
5286
|
flexWrap: "wrap",
|
|
5391
5287
|
gap: `${t.block.spacing}px`,
|
|
5392
5288
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
5393
|
-
})), i =
|
|
5394
|
-
return (t, a) => (
|
|
5289
|
+
})), i = O(() => t.block.icons.length > 0);
|
|
5290
|
+
return (t, a) => (P(), k("div", Fa, [i.value ? (P(), k("div", {
|
|
5395
5291
|
key: 0,
|
|
5396
|
-
style:
|
|
5397
|
-
}, [(
|
|
5292
|
+
style: N(r.value)
|
|
5293
|
+
}, [(P(!0), k(fe, null, we(e.block.icons, (t) => (P(), k("a", {
|
|
5398
5294
|
key: t.id,
|
|
5399
5295
|
href: t.url || "#",
|
|
5400
5296
|
class: "tpl:cursor-default",
|
|
5401
|
-
onClick: a[0] ||=
|
|
5402
|
-
}, [
|
|
5297
|
+
onClick: a[0] ||= Pe(() => {}, ["prevent"])
|
|
5298
|
+
}, [j(Pa, {
|
|
5403
5299
|
platform: t.platform,
|
|
5404
5300
|
"icon-style": e.block.iconStyle,
|
|
5405
5301
|
"icon-size": e.block.iconSize
|
|
@@ -5407,72 +5303,72 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5407
5303
|
"platform",
|
|
5408
5304
|
"icon-style",
|
|
5409
5305
|
"icon-size"
|
|
5410
|
-
])], 8,
|
|
5306
|
+
])], 8, Ia))), 128))], 4)) : (P(), k("div", La, [j(R(Mt), { size: 16 }), A("span", null, L(R(n).social.addIcons), 1)]))]));
|
|
5411
5307
|
}
|
|
5412
|
-
}),
|
|
5308
|
+
}), za = { class: "tpl:w-full" }, Ba = {
|
|
5413
5309
|
key: 0,
|
|
5414
5310
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
5415
5311
|
style: {
|
|
5416
5312
|
"background-color": "var(--tpl-bg-hover)",
|
|
5417
5313
|
color: "var(--tpl-text-dim)"
|
|
5418
5314
|
}
|
|
5419
|
-
},
|
|
5315
|
+
}, Va = /* @__PURE__ */ M({
|
|
5420
5316
|
__name: "SpacerBlock",
|
|
5421
5317
|
props: {
|
|
5422
5318
|
block: {},
|
|
5423
5319
|
viewport: {}
|
|
5424
5320
|
},
|
|
5425
5321
|
setup(e) {
|
|
5426
|
-
let t = e, n =
|
|
5322
|
+
let t = e, n = m(v, "SpacerBlock"), r = O(() => ({
|
|
5427
5323
|
height: `${t.block.height}px`,
|
|
5428
5324
|
minHeight: `${t.block.height}px`,
|
|
5429
5325
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
5430
5326
|
}));
|
|
5431
|
-
return (t, i) => (
|
|
5432
|
-
style:
|
|
5433
|
-
class:
|
|
5434
|
-
}, [
|
|
5327
|
+
return (t, i) => (P(), k("div", za, [A("div", {
|
|
5328
|
+
style: N(r.value),
|
|
5329
|
+
class: be(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !R(n).state.previewMode }])
|
|
5330
|
+
}, [R(n).state.previewMode ? me("", !0) : (P(), k("span", Ba, L(e.block.height) + "px ", 1))], 6)]));
|
|
5435
5331
|
}
|
|
5436
|
-
}),
|
|
5332
|
+
}), Ha = { class: "tpl:w-full" }, Ua = { key: 0 }, Wa = [
|
|
5437
5333
|
"aria-label",
|
|
5438
5334
|
"data-placeholder",
|
|
5439
5335
|
"onBlur",
|
|
5440
5336
|
"textContent"
|
|
5441
|
-
],
|
|
5337
|
+
], Ga = [
|
|
5442
5338
|
"aria-label",
|
|
5443
5339
|
"data-placeholder",
|
|
5444
5340
|
"onBlur",
|
|
5445
5341
|
"textContent"
|
|
5446
|
-
],
|
|
5342
|
+
], Ka = {
|
|
5447
5343
|
key: 1,
|
|
5448
5344
|
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)]"
|
|
5449
|
-
},
|
|
5345
|
+
}, qa = /* @__PURE__ */ oe(/* @__PURE__ */ M({
|
|
5450
5346
|
__name: "TableBlock",
|
|
5451
5347
|
props: {
|
|
5452
5348
|
block: {},
|
|
5453
5349
|
viewport: {}
|
|
5454
5350
|
},
|
|
5455
5351
|
setup(e) {
|
|
5456
|
-
let t = e, { t: n } =
|
|
5352
|
+
let t = e, { t: n } = D(), r = m(v, "TableBlock"), i = O(() => t.block.rows.length > 0), a = O(() => ({
|
|
5457
5353
|
width: "100%",
|
|
5458
5354
|
borderCollapse: "collapse",
|
|
5459
5355
|
fontSize: `${t.block.fontSize}px`,
|
|
5460
5356
|
color: t.block.color,
|
|
5461
5357
|
textAlign: t.block.textAlign,
|
|
5462
5358
|
fontFamily: t.block.fontFamily || "inherit"
|
|
5463
|
-
})), o =
|
|
5359
|
+
})), o = O(() => ({
|
|
5464
5360
|
border: `${t.block.borderWidth}px solid ${t.block.borderColor}`,
|
|
5465
5361
|
padding: `${t.block.cellPadding}px`,
|
|
5466
5362
|
textAlign: t.block.textAlign
|
|
5467
|
-
})), s =
|
|
5363
|
+
})), s = O(() => ({
|
|
5468
5364
|
...o.value,
|
|
5469
5365
|
fontWeight: "bold",
|
|
5470
5366
|
backgroundColor: t.block.headerBackgroundColor || "transparent"
|
|
5471
|
-
})), c =
|
|
5472
|
-
function
|
|
5367
|
+
})), 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);
|
|
5368
|
+
function u() {
|
|
5473
5369
|
r.selectBlock(t.block.id);
|
|
5474
5370
|
}
|
|
5475
|
-
function
|
|
5371
|
+
function d(e, n, i) {
|
|
5476
5372
|
let a = i.target.innerText.trim(), o = t.block.rows.map((t) => t.id === e ? {
|
|
5477
5373
|
...t,
|
|
5478
5374
|
cells: t.cells.map((e) => e.id === n ? {
|
|
@@ -5482,51 +5378,51 @@ var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z,
|
|
|
5482
5378
|
} : t);
|
|
5483
5379
|
r.updateBlock(t.block.id, { rows: o });
|
|
5484
5380
|
}
|
|
5485
|
-
return (e, t) => (
|
|
5381
|
+
return (e, t) => (P(), k("div", Ha, [i.value ? (P(), k("table", {
|
|
5486
5382
|
key: 0,
|
|
5487
|
-
style:
|
|
5383
|
+
style: N(a.value),
|
|
5488
5384
|
class: "tpl-table-editable"
|
|
5489
|
-
}, [c.value ? (
|
|
5385
|
+
}, [c.value ? (P(), k("thead", Ua, [A("tr", null, [(P(!0), k(fe, null, we(c.value.cells, (e) => (P(), k("th", {
|
|
5490
5386
|
key: e.id,
|
|
5491
|
-
style:
|
|
5492
|
-
"aria-label":
|
|
5387
|
+
style: N(s.value),
|
|
5388
|
+
"aria-label": R(n).table.cellPlaceholder,
|
|
5493
5389
|
contenteditable: "true",
|
|
5494
|
-
"data-placeholder":
|
|
5495
|
-
onBlur: (t) =>
|
|
5496
|
-
onKeydown: t[0] ||=
|
|
5497
|
-
onClick:
|
|
5498
|
-
textContent:
|
|
5499
|
-
}, null, 44,
|
|
5390
|
+
"data-placeholder": R(n).table.cellPlaceholder,
|
|
5391
|
+
onBlur: (t) => d(c.value.id, e.id, t),
|
|
5392
|
+
onKeydown: t[0] ||= Ne(Pe((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
5393
|
+
onClick: Pe(u, ["stop"]),
|
|
5394
|
+
textContent: L(e.content)
|
|
5395
|
+
}, null, 44, Wa))), 128))])])) : me("", !0), A("tbody", null, [(P(!0), k(fe, null, we(l.value, (e) => (P(), k("tr", { key: e.id }, [(P(!0), k(fe, null, we(e.cells, (r) => (P(), k("td", {
|
|
5500
5396
|
key: r.id,
|
|
5501
|
-
style:
|
|
5502
|
-
"aria-label":
|
|
5397
|
+
style: N(o.value),
|
|
5398
|
+
"aria-label": R(n).table.cellPlaceholder,
|
|
5503
5399
|
contenteditable: "true",
|
|
5504
|
-
"data-placeholder":
|
|
5505
|
-
onBlur: (t) =>
|
|
5506
|
-
onKeydown: t[1] ||=
|
|
5507
|
-
onClick:
|
|
5508
|
-
textContent:
|
|
5509
|
-
}, null, 44,
|
|
5400
|
+
"data-placeholder": R(n).table.cellPlaceholder,
|
|
5401
|
+
onBlur: (t) => d(e.id, r.id, t),
|
|
5402
|
+
onKeydown: t[1] ||= Ne(Pe((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
5403
|
+
onClick: Pe(u, ["stop"]),
|
|
5404
|
+
textContent: L(r.content)
|
|
5405
|
+
}, null, 44, Ga))), 128))]))), 128))])], 4)) : (P(), k("div", Ka, [j(R(Nt), { size: 16 }), A("span", null, L(R(n).table.empty), 1)]))]));
|
|
5510
5406
|
}
|
|
5511
|
-
}), [["__scopeId", "data-v-dfc60174"]]),
|
|
5407
|
+
}), [["__scopeId", "data-v-dfc60174"]]), Ja = /* @__PURE__ */ M({
|
|
5512
5408
|
__name: "VideoPlayButton",
|
|
5513
5409
|
props: { hoverEffect: {
|
|
5514
5410
|
type: Boolean,
|
|
5515
5411
|
default: !1
|
|
5516
5412
|
} },
|
|
5517
5413
|
setup(e) {
|
|
5518
|
-
return (t, n) => (
|
|
5414
|
+
return (t, n) => (P(), k("div", { class: be(["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", {
|
|
5519
5415
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
5520
5416
|
width: "28",
|
|
5521
5417
|
height: "28",
|
|
5522
5418
|
viewBox: "0 0 24 24",
|
|
5523
5419
|
fill: "currentColor"
|
|
5524
|
-
}, [
|
|
5420
|
+
}, [A("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
5525
5421
|
}
|
|
5526
5422
|
});
|
|
5527
5423
|
//#endregion
|
|
5528
5424
|
//#region src/utils/videoThumbnail.ts
|
|
5529
|
-
function
|
|
5425
|
+
function Ya(e) {
|
|
5530
5426
|
if (!e) return {
|
|
5531
5427
|
platform: "unknown",
|
|
5532
5428
|
videoId: null,
|
|
@@ -5558,130 +5454,130 @@ function so(e) {
|
|
|
5558
5454
|
thumbnailUrl: null
|
|
5559
5455
|
};
|
|
5560
5456
|
}
|
|
5561
|
-
function
|
|
5562
|
-
return t ||
|
|
5457
|
+
function Xa(e, t) {
|
|
5458
|
+
return t || Ya(e).thumbnailUrl;
|
|
5563
5459
|
}
|
|
5564
5460
|
//#endregion
|
|
5565
5461
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
5566
|
-
var
|
|
5462
|
+
var Za = ["src", "alt"], Qa = {
|
|
5567
5463
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
5568
5464
|
style: { opacity: "0.7" }
|
|
5569
|
-
},
|
|
5465
|
+
}, $a = ["href"], eo = ["src", "alt"], to = ["src", "alt"], no = {
|
|
5570
5466
|
key: 3,
|
|
5571
5467
|
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)]"
|
|
5572
|
-
},
|
|
5468
|
+
}, ro = /* @__PURE__ */ M({
|
|
5573
5469
|
__name: "VideoBlock",
|
|
5574
5470
|
props: {
|
|
5575
5471
|
block: {},
|
|
5576
5472
|
viewport: {}
|
|
5577
5473
|
},
|
|
5578
5474
|
setup(e) {
|
|
5579
|
-
let t = e, { t: n } =
|
|
5475
|
+
let t = e, { t: n } = D(), { syntax: r } = de(), i = O(() => He(t.block.url, r) || He(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : Xa(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => ({
|
|
5580
5476
|
maxWidth: "100%",
|
|
5581
5477
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
5582
5478
|
display: "block",
|
|
5583
5479
|
margin: t.block.align === "center" ? "0 auto" : void 0,
|
|
5584
5480
|
marginLeft: t.block.align === "right" ? "auto" : void 0
|
|
5585
|
-
})), c =
|
|
5586
|
-
return (t, r) => (
|
|
5481
|
+
})), c = O(() => He(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
5482
|
+
return (t, r) => (P(), k("div", {
|
|
5587
5483
|
class: "tpl:w-full",
|
|
5588
|
-
style:
|
|
5589
|
-
}, [i.value && e.block.placeholderUrl ? (
|
|
5484
|
+
style: N(o.value)
|
|
5485
|
+
}, [i.value && e.block.placeholderUrl ? (P(), k("div", {
|
|
5590
5486
|
key: 0,
|
|
5591
5487
|
class: "tpl:relative tpl:inline-block",
|
|
5592
|
-
style:
|
|
5593
|
-
}, [
|
|
5488
|
+
style: N(s.value)
|
|
5489
|
+
}, [A("img", {
|
|
5594
5490
|
class: "tpl:w-full tpl:border-0",
|
|
5595
5491
|
src: e.block.placeholderUrl,
|
|
5596
5492
|
alt: e.block.alt
|
|
5597
|
-
}, null, 8,
|
|
5493
|
+
}, null, 8, Za), j(Ja)], 4)) : i.value ? (P(), k("div", {
|
|
5598
5494
|
key: 1,
|
|
5599
5495
|
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)]",
|
|
5600
|
-
style:
|
|
5601
|
-
}, [
|
|
5496
|
+
style: N([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
5497
|
+
}, [j(R(Pt), {
|
|
5602
5498
|
size: 36,
|
|
5603
5499
|
"stroke-width": 1.5,
|
|
5604
5500
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
5605
5501
|
style: { opacity: "0.5" }
|
|
5606
|
-
}),
|
|
5502
|
+
}), A("span", Qa, L(c.value), 1)], 4)) : a.value ? (P(), k(fe, { key: 2 }, [e.block.url ? (P(), k("a", {
|
|
5607
5503
|
key: 0,
|
|
5608
5504
|
href: e.block.url,
|
|
5609
5505
|
target: "_blank",
|
|
5610
5506
|
rel: "noopener noreferrer",
|
|
5611
5507
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
5612
|
-
style:
|
|
5613
|
-
onClick: r[0] ||=
|
|
5614
|
-
}, [
|
|
5508
|
+
style: N(s.value),
|
|
5509
|
+
onClick: r[0] ||= Pe(() => {}, ["prevent"])
|
|
5510
|
+
}, [A("img", {
|
|
5615
5511
|
class: "tpl:w-full tpl:border-0",
|
|
5616
5512
|
src: a.value,
|
|
5617
5513
|
alt: e.block.alt
|
|
5618
|
-
}, null, 8,
|
|
5514
|
+
}, null, 8, eo), j(Ja, { "hover-effect": "" })], 12, $a)) : (P(), k("div", {
|
|
5619
5515
|
key: 1,
|
|
5620
5516
|
class: "tpl:relative tpl:inline-block",
|
|
5621
|
-
style:
|
|
5622
|
-
}, [
|
|
5517
|
+
style: N(s.value)
|
|
5518
|
+
}, [A("img", {
|
|
5623
5519
|
class: "tpl:w-full tpl:border-0",
|
|
5624
5520
|
src: a.value,
|
|
5625
5521
|
alt: e.block.alt
|
|
5626
|
-
}, null, 8,
|
|
5522
|
+
}, null, 8, to), j(Ja)], 4))], 64)) : (P(), k("div", no, [j(R(Pt), {
|
|
5627
5523
|
size: 40,
|
|
5628
5524
|
"stroke-width": 1.5,
|
|
5629
5525
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
5630
|
-
}),
|
|
5526
|
+
}), A("span", null, L(R(n).video.addVideo), 1)]))], 4));
|
|
5631
5527
|
}
|
|
5632
|
-
}),
|
|
5633
|
-
section:
|
|
5634
|
-
title:
|
|
5635
|
-
paragraph:
|
|
5636
|
-
image:
|
|
5637
|
-
button:
|
|
5638
|
-
divider:
|
|
5639
|
-
video:
|
|
5640
|
-
social:
|
|
5641
|
-
menu:
|
|
5642
|
-
table:
|
|
5643
|
-
spacer:
|
|
5644
|
-
html:
|
|
5645
|
-
countdown:
|
|
5528
|
+
}), io = {
|
|
5529
|
+
section: Oa,
|
|
5530
|
+
title: Gn,
|
|
5531
|
+
paragraph: On,
|
|
5532
|
+
image: xn,
|
|
5533
|
+
button: xt,
|
|
5534
|
+
divider: an,
|
|
5535
|
+
video: ro,
|
|
5536
|
+
social: Ra,
|
|
5537
|
+
menu: Tn,
|
|
5538
|
+
table: qa,
|
|
5539
|
+
spacer: Va,
|
|
5540
|
+
html: un,
|
|
5541
|
+
countdown: ge(() => import("./CountdownBlock-D3olfssJ.js").then((e) => e.n))
|
|
5646
5542
|
};
|
|
5647
|
-
function
|
|
5648
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t:
|
|
5543
|
+
function ao(e) {
|
|
5544
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = D(r);
|
|
5649
5545
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
5650
|
-
let { resolvedTheme:
|
|
5651
|
-
themeOverrides:
|
|
5652
|
-
resolvedTheme:
|
|
5546
|
+
let { resolvedTheme: s } = ct(O(() => t.state.uiTheme)), c = I(n.theme ?? {}), { themeStyles: l } = ut({
|
|
5547
|
+
themeOverrides: c,
|
|
5548
|
+
resolvedTheme: s,
|
|
5653
5549
|
extraStyles: e.themeExtraStyles
|
|
5654
|
-
}),
|
|
5550
|
+
}), d = ze({
|
|
5655
5551
|
content: t.content,
|
|
5656
5552
|
setContent: (e, n) => t.setContent(e, n),
|
|
5657
5553
|
...e.historyOptions
|
|
5658
5554
|
});
|
|
5659
|
-
|
|
5660
|
-
let
|
|
5555
|
+
Be(t, d);
|
|
5556
|
+
let m = Ie({
|
|
5661
5557
|
addBlock: t.addBlock,
|
|
5662
5558
|
removeBlock: t.removeBlock,
|
|
5663
5559
|
updateBlock: t.updateBlock,
|
|
5664
5560
|
selectBlock: t.selectBlock,
|
|
5665
5561
|
blockDefaults: n.blockDefaults
|
|
5666
|
-
}),
|
|
5562
|
+
}), ae = Le(t), oe = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Fe({
|
|
5667
5563
|
content: t.content,
|
|
5668
5564
|
isDirty: () => t.state.isDirty,
|
|
5669
5565
|
...e.autoSaveOptions
|
|
5670
|
-
}) : null,
|
|
5671
|
-
|
|
5672
|
-
e ?
|
|
5566
|
+
}) : null, se = null;
|
|
5567
|
+
oe && (se = Ae(d.isNavigating, (e) => {
|
|
5568
|
+
e ? oe.pause() : oe.resume();
|
|
5673
5569
|
}));
|
|
5674
|
-
let
|
|
5675
|
-
t:
|
|
5676
|
-
format:
|
|
5677
|
-
}),
|
|
5678
|
-
if (
|
|
5679
|
-
function
|
|
5680
|
-
for (let t of e)
|
|
5570
|
+
let ce = st(t, {
|
|
5571
|
+
t: a,
|
|
5572
|
+
format: o
|
|
5573
|
+
}), le = mt();
|
|
5574
|
+
if (gt(le, io), n.customBlocks?.length) for (let e of n.customBlocks) le.registerCustom(e, nn);
|
|
5575
|
+
function ue(e) {
|
|
5576
|
+
for (let t of e) le.registerCustom(t, nn);
|
|
5681
5577
|
}
|
|
5682
|
-
function
|
|
5683
|
-
|
|
5684
|
-
history:
|
|
5578
|
+
function de(r) {
|
|
5579
|
+
vt(r, {
|
|
5580
|
+
history: d,
|
|
5685
5581
|
selectBlock: (e) => t.selectBlock(e),
|
|
5686
5582
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
5687
5583
|
removeBlock: (e) => t.removeBlock(e),
|
|
@@ -5689,27 +5585,27 @@ function vo(e) {
|
|
|
5689
5585
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
5690
5586
|
});
|
|
5691
5587
|
}
|
|
5692
|
-
|
|
5693
|
-
let
|
|
5694
|
-
|
|
5695
|
-
function
|
|
5696
|
-
|
|
5588
|
+
u(document, "keydown", de), F(f, r), F(v, t), F(C, d), F(x, m), F(S, ae), F(T, i), F(p, l), F(re, s), F(g, n.blockDefaults), F(w, le), F(E, n.customBlocks ?? []);
|
|
5589
|
+
let fe = at(n.mergeTags?.syntax);
|
|
5590
|
+
F(y, n.mergeTags?.tags ?? []), F(h, fe), F(ie, n.mergeTags?.onRequest ?? null), F(ne, n.onRequestMedia ?? null), F(_, n.displayConditions?.conditions ?? []), F(ee, n.displayConditions?.allowCustom ?? !1), F(te, e.capabilities ?? {}), F(b, ce);
|
|
5591
|
+
function pe() {
|
|
5592
|
+
se?.(), oe?.destroy(), d.destroy();
|
|
5697
5593
|
}
|
|
5698
5594
|
return {
|
|
5699
|
-
t:
|
|
5700
|
-
format:
|
|
5701
|
-
history:
|
|
5702
|
-
blockActions:
|
|
5703
|
-
conditionPreview:
|
|
5704
|
-
autoSave:
|
|
5705
|
-
resolvedTheme:
|
|
5706
|
-
themeStyles:
|
|
5707
|
-
themeOverrides:
|
|
5708
|
-
registry:
|
|
5709
|
-
keyboardReorder:
|
|
5710
|
-
registerCustomBlocks:
|
|
5711
|
-
destroy:
|
|
5595
|
+
t: a,
|
|
5596
|
+
format: o,
|
|
5597
|
+
history: d,
|
|
5598
|
+
blockActions: m,
|
|
5599
|
+
conditionPreview: ae,
|
|
5600
|
+
autoSave: oe,
|
|
5601
|
+
resolvedTheme: s,
|
|
5602
|
+
themeStyles: l,
|
|
5603
|
+
themeOverrides: c,
|
|
5604
|
+
registry: le,
|
|
5605
|
+
keyboardReorder: ce,
|
|
5606
|
+
registerCustomBlocks: ue,
|
|
5607
|
+
destroy: pe
|
|
5712
5608
|
};
|
|
5713
5609
|
}
|
|
5714
5610
|
//#endregion
|
|
5715
|
-
export {
|
|
5611
|
+
export { Et as A, Bt as C, Mt as D, Nt as E, ot as F, wt as M, xt as N, At as O, pt as P, Vt as S, Lt as T, un as _, Ra as a, qt as b, Oa as c, Un as d, An as f, xn as g, Tn as h, Va as i, Tt as j, kt as k, Ca as l, On as m, ro as n, ka as o, kn as p, qa as r, ja as s, ao as t, Gn as u, an as v, zt as w, Gt as x, nn as y };
|