UNPKG

qmw-form-design

Version:

表单设计器

1,261 lines (1,260 loc) 7.59 MB
import { defineComponent as VO, computed as g2, toRefs as Qh, unref as E, ref as Z0, reactive as _r, h as NO, getCurrentInstance as Ue, watch as d8, onMounted as e4, nextTick as Yx, onUnmounted as Pr, isRef as T4, effectScope as Tr, markRaw as g8, toRaw as P5, hasInjectionContext as BO, inject as WO, isReactive as J6, toRef as At, getCurrentScope as XO, onScopeDispose as UO, createElementBlock as I, createCommentVNode as B, openBlock as D, mergeModels as FO, useModel as Et, Fragment as hn, createElementVNode as q, withModifiers as a0, normalizeClass as Un, withDirectives as K, vModelRadio as nn, renderList as D3, toDisplayString as O4, vModelText as f0, createTextVNode as rn, createBlock as y4, vModelCheckbox as bx, vModelSelect as M8, createStaticVNode as YO, Teleport as n7, createVNode as z4, defineAsyncComponent as Qr, normalizeStyle as Y2, withCtx as Es, renderSlot as h3, resolveDynamicComponent as $s, vShow as Ms } from "vue"; var GO = Object.defineProperty, le = Object.getOwnPropertySymbols, Ar = Object.prototype.hasOwnProperty, Er = Object.prototype.propertyIsEnumerable, Rs = (e, x, i) => x in e ? GO(e, x, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[x] = i, W8 = (e, x) => { for (var i in x || (x = {})) Ar.call(x, i) && Rs(e, i, x[i]); if (le) for (var i of le(x)) Er.call(x, i) && Rs(e, i, x[i]); return e; }, $r = (e, x) => { var i = {}; for (var t in e) Ar.call(e, t) && x.indexOf(t) < 0 && (i[t] = e[t]); if (e != null && le) for (var t of le(e)) x.indexOf(t) < 0 && Er.call(e, t) && (i[t] = e[t]); return i; }; const Mr = "[vue-draggable-plus]: "; function HO(e) { console.warn(Mr + e); } function KO(e) { console.error(Mr + e); } function Ds(e, x, i) { return i >= 0 && i < e.length && e.splice(i, 0, e.splice(x, 1)[0]), e; } function JO(e) { return e.replace(/-(\w)/g, (x, i) => i ? i.toUpperCase() : ""); } function nk(e) { return Object.keys(e).reduce((x, i) => (typeof e[i] < "u" && (x[JO(i)] = e[i]), x), {}); } function Is(e, x) { return Array.isArray(e) && e.splice(x, 1), e; } function Zs(e, x, i) { return Array.isArray(e) && e.splice(x, 0, i), e; } function xk(e) { return typeof e > "u"; } function ik(e) { return typeof e == "string"; } function Ls(e, x, i) { const t = e.children[i]; e.insertBefore(x, t); } function $t(e) { e.parentNode && e.parentNode.removeChild(e); } function ek(e, x = document) { var i; let t = null; return typeof (x == null ? void 0 : x.querySelector) == "function" ? t = (i = x == null ? void 0 : x.querySelector) == null ? void 0 : i.call(x, e) : t = document.querySelector(e), t || HO(`Element not found: ${e}`), t; } function tk(e, x, i = null) { return function(...t) { return e.apply(i, t), x.apply(i, t); }; } function hk(e, x) { const i = W8({}, e); return Object.keys(x).forEach((t) => { i[t] ? i[t] = tk(e[t], x[t]) : i[t] = x[t]; }), i; } function gk(e) { return e instanceof HTMLElement; } function Vs(e, x) { Object.keys(e).forEach((i) => { x(i, e[i]); }); } function uk(e) { return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97); } const sk = Object.assign; /**! * Sortable 1.15.2 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */ function Ns(e, x) { var i = Object.keys(e); if (Object.getOwnPropertySymbols) { var t = Object.getOwnPropertySymbols(e); x && (t = t.filter(function(h) { return Object.getOwnPropertyDescriptor(e, h).enumerable; })), i.push.apply(i, t); } return i; } function Tx(e) { for (var x = 1; x < arguments.length; x++) { var i = arguments[x] != null ? arguments[x] : {}; x % 2 ? Ns(Object(i), !0).forEach(function(t) { ok(e, t, i[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : Ns(Object(i)).forEach(function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(i, t)); }); } return e; } function I3(e) { "@babel/helpers - typeof"; return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? I3 = function(x) { return typeof x; } : I3 = function(x) { return x && typeof Symbol == "function" && x.constructor === Symbol && x !== Symbol.prototype ? "symbol" : typeof x; }, I3(e); } function ok(e, x, i) { return x in e ? Object.defineProperty(e, x, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : e[x] = i, e; } function Jx() { return Jx = Object.assign || function(e) { for (var x = 1; x < arguments.length; x++) { var i = arguments[x]; for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (e[t] = i[t]); } return e; }, Jx.apply(this, arguments); } function lk(e, x) { if (e == null) return {}; var i = {}, t = Object.keys(e), h, g; for (g = 0; g < t.length; g++) h = t[g], !(x.indexOf(h) >= 0) && (i[h] = e[h]); return i; } function ck(e, x) { if (e == null) return {}; var i = lk(e, x), t, h; if (Object.getOwnPropertySymbols) { var g = Object.getOwnPropertySymbols(e); for (h = 0; h < g.length; h++) t = g[h], !(x.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (i[t] = e[t]); } return i; } var rk = "1.15.2"; function Hx(e) { if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e); } var t4 = Hx(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), J5 = Hx(/Edge/i), Bs = Hx(/firefox/i), y5 = Hx(/safari/i) && !Hx(/chrome/i) && !Hx(/android/i), Rr = Hx(/iP(ad|od|hone)/i), Dr = Hx(/chrome/i) && Hx(/android/i), Ir = { capture: !1, passive: !1 }; function N0(e, x, i) { e.addEventListener(x, i, !t4 && Ir); } function R0(e, x, i) { e.removeEventListener(x, i, !t4 && Ir); } function ce(e, x) { if (x) { if (x[0] === ">" && (x = x.substring(1)), e) try { if (e.matches) return e.matches(x); if (e.msMatchesSelector) return e.msMatchesSelector(x); if (e.webkitMatchesSelector) return e.webkitMatchesSelector(x); } catch { return !1; } return !1; } } function dk(e) { return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode; } function sx(e, x, i, t) { if (e) { i = i || document; do { if (x != null && (x[0] === ">" ? e.parentNode === i && ce(e, x) : ce(e, x)) || t && e === i) return e; if (e === i) break; } while (e = dk(e)); } return null; } var Ws = /\s+/g; function C1(e, x, i) { if (e && x) if (e.classList) e.classList[i ? "add" : "remove"](x); else { var t = (" " + e.className + " ").replace(Ws, " ").replace(" " + x + " ", " "); e.className = (t + (i ? " " + x : "")).replace(Ws, " "); } } function m0(e, x, i) { var t = e && e.style; if (t) { if (i === void 0) return document.defaultView && document.defaultView.getComputedStyle ? i = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (i = e.currentStyle), x === void 0 ? i : i[x]; !(x in t) && x.indexOf("webkit") === -1 && (x = "-webkit-" + x), t[x] = i + (typeof i == "string" ? "" : "px"); } } function J8(e, x) { var i = ""; if (typeof e == "string") i = e; else do { var t = m0(e, "transform"); t && t !== "none" && (i = t + " " + i); } while (!x && (e = e.parentNode)); var h = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; return h && new h(i); } function Zr(e, x, i) { if (e) { var t = e.getElementsByTagName(x), h = 0, g = t.length; if (i) for (; h < g; h++) i(t[h], h); return t; } return []; } function Cx() { var e = document.scrollingElement; return e || document.documentElement; } function mn(e, x, i, t, h) { if (!(!e.getBoundingClientRect && e !== window)) { var g, u, o, l, r, d, f; if (e !== window && e.parentNode && e !== Cx() ? (g = e.getBoundingClientRect(), u = g.top, o = g.left, l = g.bottom, r = g.right, d = g.height, f = g.width) : (u = 0, o = 0, l = window.innerHeight, r = window.innerWidth, d = window.innerHeight, f = window.innerWidth), (x || i) && e !== window && (h = h || e.parentNode, !t4)) do if (h && h.getBoundingClientRect && (m0(h, "transform") !== "none" || i && m0(h, "position") !== "static")) { var b = h.getBoundingClientRect(); u -= b.top + parseInt(m0(h, "border-top-width")), o -= b.left + parseInt(m0(h, "border-left-width")), l = u + g.height, r = o + g.width; break; } while (h = h.parentNode); if (t && e !== window) { var p = J8(h || e), j = p && p.a, S = p && p.d; p && (u /= S, o /= j, f /= j, d /= S, l = u + d, r = o + f); } return { top: u, left: o, bottom: l, right: r, width: f, height: d }; } } function Xs(e, x, i) { for (var t = k4(e, !0), h = mn(e)[x]; t; ) { var g = mn(t)[i], u = void 0; if (u = h >= g, !u) return t; if (t === Cx()) break; t = k4(t, !1); } return !1; } function u2(e, x, i, t) { for (var h = 0, g = 0, u = e.children; g < u.length; ) { if (u[g].style.display !== "none" && u[g] !== j0.ghost && (t || u[g] !== j0.dragged) && sx(u[g], i.draggable, e, !1)) { if (h === x) return u[g]; h++; } g++; } return null; } function x7(e, x) { for (var i = e.lastElementChild; i && (i === j0.ghost || m0(i, "display") === "none" || x && !ce(i, x)); ) i = i.previousElementSibling; return i || null; } function U1(e, x) { var i = 0; if (!e || !e.parentNode) return -1; for (; e = e.previousElementSibling; ) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== j0.clone && (!x || ce(e, x)) && i++; return i; } function Us(e) { var x = 0, i = 0, t = Cx(); if (e) do { var h = J8(e), g = h.a, u = h.d; x += e.scrollLeft * g, i += e.scrollTop * u; } while (e !== t && (e = e.parentNode)); return [x, i]; } function ak(e, x) { for (var i in e) if (e.hasOwnProperty(i)) { for (var t in x) if (x.hasOwnProperty(t) && x[t] === e[i][t]) return Number(i); } return -1; } function k4(e, x) { if (!e || !e.getBoundingClientRect) return Cx(); var i = e, t = !1; do if (i.clientWidth < i.scrollWidth || i.clientHeight < i.scrollHeight) { var h = m0(i); if (i.clientWidth < i.scrollWidth && (h.overflowX == "auto" || h.overflowX == "scroll") || i.clientHeight < i.scrollHeight && (h.overflowY == "auto" || h.overflowY == "scroll")) { if (!i.getBoundingClientRect || i === document.body) return Cx(); if (t || x) return i; t = !0; } } while (i = i.parentNode); return Cx(); } function fk(e, x) { if (e && x) for (var i in x) x.hasOwnProperty(i) && (e[i] = x[i]); return e; } function Mt(e, x) { return Math.round(e.top) === Math.round(x.top) && Math.round(e.left) === Math.round(x.left) && Math.round(e.height) === Math.round(x.height) && Math.round(e.width) === Math.round(x.width); } var z5; function Lr(e, x) { return function() { if (!z5) { var i = arguments, t = this; i.length === 1 ? e.call(t, i[0]) : e.apply(t, i), z5 = setTimeout(function() { z5 = void 0; }, x); } }; } function bk() { clearTimeout(z5), z5 = void 0; } function Vr(e, x, i) { e.scrollLeft += x, e.scrollTop += i; } function Nr(e) { var x = window.Polymer, i = window.jQuery || window.Zepto; return x && x.dom ? x.dom(e).cloneNode(!0) : i ? i(e).clone(!0)[0] : e.cloneNode(!0); } function Br(e, x, i) { var t = {}; return Array.from(e.children).forEach(function(h) { var g, u, o, l; if (!(!sx(h, x.draggable, e, !1) || h.animated || h === i)) { var r = mn(h); t.left = Math.min((g = t.left) !== null && g !== void 0 ? g : 1 / 0, r.left), t.top = Math.min((u = t.top) !== null && u !== void 0 ? u : 1 / 0, r.top), t.right = Math.max((o = t.right) !== null && o !== void 0 ? o : -1 / 0, r.right), t.bottom = Math.max((l = t.bottom) !== null && l !== void 0 ? l : -1 / 0, r.bottom); } }), t.width = t.right - t.left, t.height = t.bottom - t.top, t.x = t.left, t.y = t.top, t; } var Q1 = "Sortable" + (/* @__PURE__ */ new Date()).getTime(); function yk() { var e = [], x; return { captureAnimationState: function() { if (e = [], !!this.options.animation) { var i = [].slice.call(this.el.children); i.forEach(function(t) { if (!(m0(t, "display") === "none" || t === j0.ghost)) { e.push({ target: t, rect: mn(t) }); var h = Tx({}, e[e.length - 1].rect); if (t.thisAnimationDuration) { var g = J8(t, !0); g && (h.top -= g.f, h.left -= g.e); } t.fromRect = h; } }); } }, addAnimationState: function(i) { e.push(i); }, removeAnimationState: function(i) { e.splice(ak(e, { target: i }), 1); }, animateAll: function(i) { var t = this; if (!this.options.animation) { clearTimeout(x), typeof i == "function" && i(); return; } var h = !1, g = 0; e.forEach(function(u) { var o = 0, l = u.target, r = l.fromRect, d = mn(l), f = l.prevFromRect, b = l.prevToRect, p = u.rect, j = J8(l, !0); j && (d.top -= j.f, d.left -= j.e), l.toRect = d, l.thisAnimationDuration && Mt(f, d) && !Mt(r, d) && // Make sure animatingRect is on line between toRect & fromRect (p.top - d.top) / (p.left - d.left) === (r.top - d.top) / (r.left - d.left) && (o = pk(p, f, b, t.options)), Mt(d, r) || (l.prevFromRect = r, l.prevToRect = d, o || (o = t.options.animation), t.animate(l, p, d, o)), o && (h = !0, g = Math.max(g, o), clearTimeout(l.animationResetTimer), l.animationResetTimer = setTimeout(function() { l.animationTime = 0, l.prevFromRect = null, l.fromRect = null, l.prevToRect = null, l.thisAnimationDuration = null; }, o), l.thisAnimationDuration = o); }), clearTimeout(x), h ? x = setTimeout(function() { typeof i == "function" && i(); }, g) : typeof i == "function" && i(), e = []; }, animate: function(i, t, h, g) { if (g) { m0(i, "transition", ""), m0(i, "transform", ""); var u = J8(this.el), o = u && u.a, l = u && u.d, r = (t.left - h.left) / (o || 1), d = (t.top - h.top) / (l || 1); i.animatingX = !!r, i.animatingY = !!d, m0(i, "transform", "translate3d(" + r + "px," + d + "px,0)"), this.forRepaintDummy = zk(i), m0(i, "transition", "transform " + g + "ms" + (this.options.easing ? " " + this.options.easing : "")), m0(i, "transform", "translate3d(0,0,0)"), typeof i.animated == "number" && clearTimeout(i.animated), i.animated = setTimeout(function() { m0(i, "transition", ""), m0(i, "transform", ""), i.animated = !1, i.animatingX = !1, i.animatingY = !1; }, g); } } }; } function zk(e) { return e.offsetWidth; } function pk(e, x, i, t) { return Math.sqrt(Math.pow(x.top - e.top, 2) + Math.pow(x.left - e.left, 2)) / Math.sqrt(Math.pow(x.top - i.top, 2) + Math.pow(x.left - i.left, 2)) * t.animation; } var R8 = [], Rt = { initializeByDefault: !0 }, ni = { mount: function(e) { for (var x in Rt) Rt.hasOwnProperty(x) && !(x in e) && (e[x] = Rt[x]); R8.forEach(function(i) { if (i.pluginName === e.pluginName) throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once"); }), R8.push(e); }, pluginEvent: function(e, x, i) { var t = this; this.eventCanceled = !1, i.cancel = function() { t.eventCanceled = !0; }; var h = e + "Global"; R8.forEach(function(g) { x[g.pluginName] && (x[g.pluginName][h] && x[g.pluginName][h](Tx({ sortable: x }, i)), x.options[g.pluginName] && x[g.pluginName][e] && x[g.pluginName][e](Tx({ sortable: x }, i))); }); }, initializePlugins: function(e, x, i, t) { R8.forEach(function(u) { var o = u.pluginName; if (!(!e.options[o] && !u.initializeByDefault)) { var l = new u(e, x, e.options); l.sortable = e, l.options = e.options, e[o] = l, Jx(i, l.defaults); } }); for (var h in e.options) if (e.options.hasOwnProperty(h)) { var g = this.modifyOption(e, h, e.options[h]); typeof g < "u" && (e.options[h] = g); } }, getEventProperties: function(e, x) { var i = {}; return R8.forEach(function(t) { typeof t.eventProperties == "function" && Jx(i, t.eventProperties.call(x[t.pluginName], e)); }), i; }, modifyOption: function(e, x, i) { var t; return R8.forEach(function(h) { e[h.pluginName] && h.optionListeners && typeof h.optionListeners[x] == "function" && (t = h.optionListeners[x].call(e[h.pluginName], i)); }), t; } }; function mk(e) { var x = e.sortable, i = e.rootEl, t = e.name, h = e.targetEl, g = e.cloneEl, u = e.toEl, o = e.fromEl, l = e.oldIndex, r = e.newIndex, d = e.oldDraggableIndex, f = e.newDraggableIndex, b = e.originalEvent, p = e.putSortable, j = e.extraEventProperties; if (x = x || i && i[Q1], !!x) { var S, v = x.options, m = "on" + t.charAt(0).toUpperCase() + t.substr(1); window.CustomEvent && !t4 && !J5 ? S = new CustomEvent(t, { bubbles: !0, cancelable: !0 }) : (S = document.createEvent("Event"), S.initEvent(t, !0, !0)), S.to = u || i, S.from = o || i, S.item = h || i, S.clone = g, S.oldIndex = l, S.newIndex = r, S.oldDraggableIndex = d, S.newDraggableIndex = f, S.originalEvent = b, S.pullMode = p ? p.lastPutMode : void 0; var y = Tx(Tx({}, j), ni.getEventProperties(t, x)); for (var O in y) S[O] = y[O]; i && i.dispatchEvent(S), v[m] && v[m].call(x, S); } } var jk = ["evt"], l1 = function(e, x) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, t = i.evt, h = ck(i, jk); ni.pluginEvent.bind(j0)(e, x, Tx({ dragEl: x0, parentEl: an, ghostEl: k0, rootEl: sn, nextEl: J4, lastDownEl: Z3, cloneEl: cn, cloneHidden: w4, dragStarted: h5, putSortable: Dn, activeSortable: j0.active, originalEvent: t, oldIndex: X8, oldDraggableIndex: p5, newIndex: _1, newDraggableIndex: p4, hideGhostForTarget: Fr, unhideGhostForTarget: Yr, cloneNowHidden: function() { w4 = !0; }, cloneNowShown: function() { w4 = !1; }, dispatchSortableEvent: function(g) { x1({ sortable: x, name: g, originalEvent: t }); } }, h)); }; function x1(e) { mk(Tx({ putSortable: Dn, cloneEl: cn, targetEl: x0, rootEl: sn, oldIndex: X8, oldDraggableIndex: p5, newIndex: _1, newDraggableIndex: p4 }, e)); } var x0, an, k0, sn, J4, Z3, cn, w4, X8, _1, p5, p4, g3, Dn, V8 = !1, re = !1, de = [], G4, gx, Dt, It, Fs, Ys, h5, D8, m5, j5 = !1, u3 = !1, L3, Xn, Zt = [], Ah = !1, ae = [], Fe = typeof document < "u", s3 = Rr, Gs = J5 || t4 ? "cssFloat" : "float", wk = Fe && !Dr && !Rr && "draggable" in document.createElement("div"), Wr = function() { if (Fe) { if (t4) return !1; var e = document.createElement("x"); return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto"; } }(), Xr = function(e, x) { var i = m0(e), t = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), h = u2(e, 0, x), g = u2(e, 1, x), u = h && m0(h), o = g && m0(g), l = u && parseInt(u.marginLeft) + parseInt(u.marginRight) + mn(h).width, r = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + mn(g).width; if (i.display === "flex") return i.flexDirection === "column" || i.flexDirection === "column-reverse" ? "vertical" : "horizontal"; if (i.display === "grid") return i.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal"; if (h && u.float && u.float !== "none") { var d = u.float === "left" ? "left" : "right"; return g && (o.clear === "both" || o.clear === d) ? "vertical" : "horizontal"; } return h && (u.display === "block" || u.display === "flex" || u.display === "table" || u.display === "grid" || l >= t && i[Gs] === "none" || g && i[Gs] === "none" && l + r > t) ? "vertical" : "horizontal"; }, qk = function(e, x, i) { var t = i ? e.left : e.top, h = i ? e.right : e.bottom, g = i ? e.width : e.height, u = i ? x.left : x.top, o = i ? x.right : x.bottom, l = i ? x.width : x.height; return t === u || h === o || t + g / 2 === u + l / 2; }, Ok = function(e, x) { var i; return de.some(function(t) { var h = t[Q1].options.emptyInsertThreshold; if (!(!h || x7(t))) { var g = mn(t), u = e >= g.left - h && e <= g.right + h, o = x >= g.top - h && x <= g.bottom + h; if (u && o) return i = t; } }), i; }, Ur = function(e) { function x(h, g) { return function(u, o, l, r) { var d = u.options.group.name && o.options.group.name && u.options.group.name === o.options.group.name; if (h == null && (g || d)) return !0; if (h == null || h === !1) return !1; if (g && h === "clone") return h; if (typeof h == "function") return x(h(u, o, l, r), g)(u, o, l, r); var f = (g ? u : o).options.group.name; return h === !0 || typeof h == "string" && h === f || h.join && h.indexOf(f) > -1; }; } var i = {}, t = e.group; (!t || I3(t) != "object") && (t = { name: t }), i.name = t.name, i.checkPull = x(t.pull, !0), i.checkPut = x(t.put), i.revertClone = t.revertClone, e.group = i; }, Fr = function() { !Wr && k0 && m0(k0, "display", "none"); }, Yr = function() { !Wr && k0 && m0(k0, "display", ""); }; Fe && !Dr && document.addEventListener("click", function(e) { if (re) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), re = !1, !1; }, !0); var H4 = function(e) { if (x0) { e = e.touches ? e.touches[0] : e; var x = Ok(e.clientX, e.clientY); if (x) { var i = {}; for (var t in e) e.hasOwnProperty(t) && (i[t] = e[t]); i.target = i.rootEl = x, i.preventDefault = void 0, i.stopPropagation = void 0, x[Q1]._onDragOver(i); } } }, kk = function(e) { x0 && x0.parentNode[Q1]._isOutsideThisEl(e.target); }; function j0(e, x) { if (!(e && e.nodeType && e.nodeType === 1)) throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e)); this.el = e, this.options = x = Jx({}, x), e[Q1] = this; var i = { group: null, sort: !0, disabled: !1, store: null, handle: null, draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*", swapThreshold: 1, // percentage; 0 <= x <= 1 invertSwap: !1, // invert always invertedSwapThreshold: null, // will be set to same as swapThreshold if default removeCloneOnHide: !0, direction: function() { return Xr(e, this.options); }, ghostClass: "sortable-ghost", chosenClass: "sortable-chosen", dragClass: "sortable-drag", ignore: "a, img", filter: null, preventOnFilter: !0, animation: 0, easing: null, setData: function(g, u) { g.setData("Text", u.textContent); }, dropBubble: !1, dragoverBubble: !1, dataIdAttr: "data-id", delay: 0, delayOnTouchOnly: !1, touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1, forceFallback: !1, fallbackClass: "sortable-fallback", fallbackOnBody: !1, fallbackTolerance: 0, fallbackOffset: { x: 0, y: 0 }, supportPointer: j0.supportPointer !== !1 && "PointerEvent" in window && !y5, emptyInsertThreshold: 5 }; ni.initializePlugins(this, e, i); for (var t in i) !(t in x) && (x[t] = i[t]); Ur(x); for (var h in this) h.charAt(0) === "_" && typeof this[h] == "function" && (this[h] = this[h].bind(this)); this.nativeDraggable = x.forceFallback ? !1 : wk, this.nativeDraggable && (this.options.touchStartThreshold = 1), x.supportPointer ? N0(e, "pointerdown", this._onTapStart) : (N0(e, "mousedown", this._onTapStart), N0(e, "touchstart", this._onTapStart)), this.nativeDraggable && (N0(e, "dragover", this), N0(e, "dragenter", this)), de.push(this.el), x.store && x.store.get && this.sort(x.store.get(this) || []), Jx(this, yk()); } j0.prototype = /** @lends Sortable.prototype */ { constructor: j0, _isOutsideThisEl: function(e) { !this.el.contains(e) && e !== this.el && (D8 = null); }, _getDirection: function(e, x) { return typeof this.options.direction == "function" ? this.options.direction.call(this, e, x, x0) : this.options.direction; }, _onTapStart: function(e) { if (e.cancelable) { var x = this, i = this.el, t = this.options, h = t.preventOnFilter, g = e.type, u = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, o = (u || e).target, l = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || o, r = t.filter; if (Ak(i), !x0 && !(/mousedown|pointerdown/.test(g) && e.button !== 0 || t.disabled) && !l.isContentEditable && !(!this.nativeDraggable && y5 && o && o.tagName.toUpperCase() === "SELECT") && (o = sx(o, t.draggable, i, !1), !(o && o.animated) && Z3 !== o)) { if (X8 = U1(o), p5 = U1(o, t.draggable), typeof r == "function") { if (r.call(this, e, o, this)) { x1({ sortable: x, rootEl: l, name: "filter", targetEl: o, toEl: i, fromEl: i }), l1("filter", x, { evt: e }), h && e.cancelable && e.preventDefault(); return; } } else if (r && (r = r.split(",").some(function(d) { if (d = sx(l, d.trim(), i, !1), d) return x1({ sortable: x, rootEl: d, name: "filter", targetEl: o, fromEl: i, toEl: i }), l1("filter", x, { evt: e }), !0; }), r)) { h && e.cancelable && e.preventDefault(); return; } t.handle && !sx(l, t.handle, i, !1) || this._prepareDragStart(e, u, o); } } }, _prepareDragStart: function(e, x, i) { var t = this, h = t.el, g = t.options, u = h.ownerDocument, o; if (i && !x0 && i.parentNode === h) { var l = mn(i); if (sn = h, x0 = i, an = x0.parentNode, J4 = x0.nextSibling, Z3 = i, g3 = g.group, j0.dragged = x0, G4 = { target: x0, clientX: (x || e).clientX, clientY: (x || e).clientY }, Fs = G4.clientX - l.left, Ys = G4.clientY - l.top, this._lastX = (x || e).clientX, this._lastY = (x || e).clientY, x0.style["will-change"] = "all", o = function() { if (l1("delayEnded", t, { evt: e }), j0.eventCanceled) { t._onDrop(); return; } t._disableDelayedDragEvents(), !Bs && t.nativeDraggable && (x0.draggable = !0), t._triggerDragStart(e, x), x1({ sortable: t, name: "choose", originalEvent: e }), C1(x0, g.chosenClass, !0); }, g.ignore.split(",").forEach(function(r) { Zr(x0, r.trim(), Lt); }), N0(u, "dragover", H4), N0(u, "mousemove", H4), N0(u, "touchmove", H4), N0(u, "mouseup", t._onDrop), N0(u, "touchend", t._onDrop), N0(u, "touchcancel", t._onDrop), Bs && this.nativeDraggable && (this.options.touchStartThreshold = 4, x0.draggable = !0), l1("delayStart", this, { evt: e }), g.delay && (!g.delayOnTouchOnly || x) && (!this.nativeDraggable || !(J5 || t4))) { if (j0.eventCanceled) { this._onDrop(); return; } N0(u, "mouseup", t._disableDelayedDrag), N0(u, "touchend", t._disableDelayedDrag), N0(u, "touchcancel", t._disableDelayedDrag), N0(u, "mousemove", t._delayedDragTouchMoveHandler), N0(u, "touchmove", t._delayedDragTouchMoveHandler), g.supportPointer && N0(u, "pointermove", t._delayedDragTouchMoveHandler), t._dragStartTimer = setTimeout(o, g.delay); } else o(); } }, _delayedDragTouchMoveHandler: function(e) { var x = e.touches ? e.touches[0] : e; Math.max(Math.abs(x.clientX - this._lastX), Math.abs(x.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag(); }, _disableDelayedDrag: function() { x0 && Lt(x0), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents(); }, _disableDelayedDragEvents: function() { var e = this.el.ownerDocument; R0(e, "mouseup", this._disableDelayedDrag), R0(e, "touchend", this._disableDelayedDrag), R0(e, "touchcancel", this._disableDelayedDrag), R0(e, "mousemove", this._delayedDragTouchMoveHandler), R0(e, "touchmove", this._delayedDragTouchMoveHandler), R0(e, "pointermove", this._delayedDragTouchMoveHandler); }, _triggerDragStart: function(e, x) { x = x || e.pointerType == "touch" && e, !this.nativeDraggable || x ? this.options.supportPointer ? N0(document, "pointermove", this._onTouchMove) : x ? N0(document, "touchmove", this._onTouchMove) : N0(document, "mousemove", this._onTouchMove) : (N0(x0, "dragend", this), N0(sn, "dragstart", this._onDragStart)); try { document.selection ? V3(function() { document.selection.empty(); }) : window.getSelection().removeAllRanges(); } catch { } }, _dragStarted: function(e, x) { if (V8 = !1, sn && x0) { l1("dragStarted", this, { evt: x }), this.nativeDraggable && N0(document, "dragover", kk); var i = this.options; !e && C1(x0, i.dragClass, !1), C1(x0, i.ghostClass, !0), j0.active = this, e && this._appendGhost(), x1({ sortable: this, name: "start", originalEvent: x }); } else this._nulling(); }, _emulateDragOver: function() { if (gx) { this._lastX = gx.clientX, this._lastY = gx.clientY, Fr(); for (var e = document.elementFromPoint(gx.clientX, gx.clientY), x = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(gx.clientX, gx.clientY), e !== x); ) x = e; if (x0.parentNode[Q1]._isOutsideThisEl(e), x) do { if (x[Q1]) { var i = void 0; if (i = x[Q1]._onDragOver({ clientX: gx.clientX, clientY: gx.clientY, target: e, rootEl: x }), i && !this.options.dragoverBubble) break; } e = x; } while (x = x.parentNode); Yr(); } }, _onTouchMove: function(e) { if (G4) { var x = this.options, i = x.fallbackTolerance, t = x.fallbackOffset, h = e.touches ? e.touches[0] : e, g = k0 && J8(k0, !0), u = k0 && g && g.a, o = k0 && g && g.d, l = s3 && Xn && Us(Xn), r = (h.clientX - G4.clientX + t.x) / (u || 1) + (l ? l[0] - Zt[0] : 0) / (u || 1), d = (h.clientY - G4.clientY + t.y) / (o || 1) + (l ? l[1] - Zt[1] : 0) / (o || 1); if (!j0.active && !V8) { if (i && Math.max(Math.abs(h.clientX - this._lastX), Math.abs(h.clientY - this._lastY)) < i) return; this._onDragStart(e, !0); } if (k0) { g ? (g.e += r - (Dt || 0), g.f += d - (It || 0)) : g = { a: 1, b: 0, c: 0, d: 1, e: r, f: d }; var f = "matrix(".concat(g.a, ",").concat(g.b, ",").concat(g.c, ",").concat(g.d, ",").concat(g.e, ",").concat(g.f, ")"); m0(k0, "webkitTransform", f), m0(k0, "mozTransform", f), m0(k0, "msTransform", f), m0(k0, "transform", f), Dt = r, It = d, gx = h; } e.cancelable && e.preventDefault(); } }, _appendGhost: function() { if (!k0) { var e = this.options.fallbackOnBody ? document.body : sn, x = mn(x0, !0, s3, !0, e), i = this.options; if (s3) { for (Xn = e; m0(Xn, "position") === "static" && m0(Xn, "transform") === "none" && Xn !== document; ) Xn = Xn.parentNode; Xn !== document.body && Xn !== document.documentElement ? (Xn === document && (Xn = Cx()), x.top += Xn.scrollTop, x.left += Xn.scrollLeft) : Xn = Cx(), Zt = Us(Xn); } k0 = x0.cloneNode(!0), C1(k0, i.ghostClass, !1), C1(k0, i.fallbackClass, !0), C1(k0, i.dragClass, !0), m0(k0, "transition", ""), m0(k0, "transform", ""), m0(k0, "box-sizing", "border-box"), m0(k0, "margin", 0), m0(k0, "top", x.top), m0(k0, "left", x.left), m0(k0, "width", x.width), m0(k0, "height", x.height), m0(k0, "opacity", "0.8"), m0(k0, "position", s3 ? "absolute" : "fixed"), m0(k0, "zIndex", "100000"), m0(k0, "pointerEvents", "none"), j0.ghost = k0, e.appendChild(k0), m0(k0, "transform-origin", Fs / parseInt(k0.style.width) * 100 + "% " + Ys / parseInt(k0.style.height) * 100 + "%"); } }, _onDragStart: function(e, x) { var i = this, t = e.dataTransfer, h = i.options; if (l1("dragStart", this, { evt: e }), j0.eventCanceled) { this._onDrop(); return; } l1("setupClone", this), j0.eventCanceled || (cn = Nr(x0), cn.removeAttribute("id"), cn.draggable = !1, cn.style["will-change"] = "", this._hideClone(), C1(cn, this.options.chosenClass, !1), j0.clone = cn), i.cloneId = V3(function() { l1("clone", i), !j0.eventCanceled && (i.options.removeCloneOnHide || sn.insertBefore(cn, x0), i._hideClone(), x1({ sortable: i, name: "clone" })); }), !x && C1(x0, h.dragClass, !0), x ? (re = !0, i._loopId = setInterval(i._emulateDragOver, 50)) : (R0(document, "mouseup", i._onDrop), R0(document, "touchend", i._onDrop), R0(document, "touchcancel", i._onDrop), t && (t.effectAllowed = "move", h.setData && h.setData.call(i, t, x0)), N0(document, "drop", i), m0(x0, "transform", "translateZ(0)")), V8 = !0, i._dragStartId = V3(i._dragStarted.bind(i, x, e)), N0(document, "selectstart", i), h5 = !0, y5 && m0(document.body, "user-select", "none"); }, // Returns true - if no further action is needed (either inserted or another condition) _onDragOver: function(e) { var x = this.el, i = e.target, t, h, g, u = this.options, o = u.group, l = j0.active, r = g3 === o, d = u.sort, f = Dn || l, b, p = this, j = !1; if (Ah) return; function S(l0, I0) { l1(l0, p, Tx({ evt: e, isOwner: r, axis: b ? "vertical" : "horizontal", revert: g, dragRect: t, targetRect: h, canSort: d, fromSortable: f, target: i, completed: m, onMove: function(w0, H0) { return o3(sn, x, x0, t, w0, mn(w0), e, H0); }, changed: y }, I0)); } function v() { S("dragOverAnimationCapture"), p.captureAnimationState(), p !== f && f.captureAnimationState(); } function m(l0) { return S("dragOverCompleted", { insertion: l0 }), l0 && (r ? l._hideClone() : l._showClone(p), p !== f && (C1(x0, Dn ? Dn.options.ghostClass : l.options.ghostClass, !1), C1(x0, u.ghostClass, !0)), Dn !== p && p !== j0.active ? Dn = p : p === j0.active && Dn && (Dn = null), f === p && (p._ignoreWhileAnimating = i), p.animateAll(function() { S("dragOverAnimationComplete"), p._ignoreWhileAnimating = null; }), p !== f && (f.animateAll(), f._ignoreWhileAnimating = null)), (i === x0 && !x0.animated || i === x && !i.animated) && (D8 = null), !u.dragoverBubble && !e.rootEl && i !== document && (x0.parentNode[Q1]._isOutsideThisEl(e.target), !l0 && H4(e)), !u.dragoverBubble && e.stopPropagation && e.stopPropagation(), j = !0; } function y() { _1 = U1(x0), p4 = U1(x0, u.draggable), x1({ sortable: p, name: "change", toEl: x, newIndex: _1, newDraggableIndex: p4, originalEvent: e }); } if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), i = sx(i, u.draggable, x, !0), S("dragOver"), j0.eventCanceled) return j; if (x0.contains(e.target) || i.animated && i.animatingX && i.animatingY || p._ignoreWhileAnimating === i) return m(!1); if (re = !1, l && !u.disabled && (r ? d || (g = an !== sn) : Dn === this || (this.lastPutMode = g3.checkPull(this, l, x0, e)) && o.checkPut(this, l, x0, e))) { if (b = this._getDirection(e, i) === "vertical", t = mn(x0), S("dragOverValid"), j0.eventCanceled) return j; if (g) return an = sn, v(), this._hideClone(), S("revert"), j0.eventCanceled || (J4 ? sn.insertBefore(x0, J4) : sn.appendChild(x0)), m(!0); var O = x7(x, u.draggable); if (!O || _k(e, b, this) && !O.animated) { if (O === x0) return m(!1); if (O && x === e.target && (i = O), i && (h = mn(i)), o3(sn, x, x0, t, i, h, e, !!i) !== !1) return v(), O && O.nextSibling ? x.insertBefore(x0, O.nextSibling) : x.appendChild(x0), an = x, y(), m(!0); } else if (O && Ck(e, b, this)) { var _ = u2(x, 0, u, !0); if (_ === x0) return m(!1); if (i = _, h = mn(i), o3(sn, x, x0, t, i, h, e, !1) !== !1) return v(), x.insertBefore(x0, _), an = x, y(), m(!0); } else if (i.parentNode === x) { h = mn(i); var T = 0, L, R = x0.parentNode !== x, J = !qk(x0.animated && x0.toRect || t, i.animated && i.toRect || h, b), n0 = b ? "top" : "left", F = Xs(i, "top", "top") || Xs(x0, "top", "top"), N = F ? F.scrollTop : void 0; D8 !== i && (L = h[n0], j5 = !1, u3 = !J && u.invertSwap || R), T = Pk(e, i, h, b, J ? 1 : u.swapThreshold, u.invertedSwapThreshold == null ? u.swapThreshold : u.invertedSwapThreshold, u3, D8 === i); var Y; if (T !== 0) { var t0 = U1(x0); do t0 -= T, Y = an.children[t0]; while (Y && (m0(Y, "display") === "none" || Y === k0)); } if (T === 0 || Y === i) return m(!1); D8 = i, m5 = T; var o0 = i.nextElementSibling, d0 = !1; d0 = T === 1; var C0 = o3(sn, x, x0, t, i, h, e, d0); if (C0 !== !1) return (C0 === 1 || C0 === -1) && (d0 = C0 === 1), Ah = !0, setTimeout(Sk, 30), v(), d0 && !o0 ? x.appendChild(x0) : i.parentNode.insertBefore(x0, d0 ? o0 : i), F && Vr(F, 0, N - F.scrollTop), an = x0.parentNode, L !== void 0 && !u3 && (L3 = Math.abs(L - mn(i)[n0])), y(), m(!0); } if (x.contains(x0)) return m(!1); } return !1; }, _ignoreWhileAnimating: null, _offMoveEvents: function() { R0(document, "mousemove", this._onTouchMove), R0(document, "touchmove", this._onTouchMove), R0(document, "pointermove", this._onTouchMove), R0(document, "dragover", H4), R0(document, "mousemove", H4), R0(document, "touchmove", H4); }, _offUpEvents: function() { var e = this.el.ownerDocument; R0(e, "mouseup", this._onDrop), R0(e, "touchend", this._onDrop), R0(e, "pointerup", this._onDrop), R0(e, "touchcancel", this._onDrop), R0(document, "selectstart", this); }, _onDrop: function(e) { var x = this.el, i = this.options; if (_1 = U1(x0), p4 = U1(x0, i.draggable), l1("drop", this, { evt: e }), an = x0 && x0.parentNode, _1 = U1(x0), p4 = U1(x0, i.draggable), j0.eventCanceled) { this._nulling(); return; } V8 = !1, u3 = !1, j5 = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Eh(this.cloneId), Eh(this._dragStartId), this.nativeDraggable && (R0(document, "drop", this), R0(x, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), y5 && m0(document.body, "user-select", ""), m0(x0, "transform", ""), e && (h5 && (e.cancelable && e.preventDefault(), !i.dropBubble && e.stopPropagation()), k0 && k0.parentNode && k0.parentNode.removeChild(k0), (sn === an || Dn && Dn.lastPutMode !== "clone") && cn && cn.parentNode && cn.parentNode.removeChild(cn), x0 && (this.nativeDraggable && R0(x0, "dragend", this), Lt(x0), x0.style["will-change"] = "", h5 && !V8 && C1(x0, Dn ? Dn.options.ghostClass : this.options.ghostClass, !1), C1(x0, this.options.chosenClass, !1), x1({ sortable: this, name: "unchoose", toEl: an, newIndex: null, newDraggableIndex: null, originalEvent: e }), sn !== an ? (_1 >= 0 && (x1({ rootEl: an, name: "add", toEl: an, fromEl: sn, originalEvent: e }), x1({ sortable: this, name: "remove", toEl: an, originalEvent: e }), x1({ rootEl: an, name: "sort", toEl: an, fromEl: sn, originalEvent: e }), x1({ sortable: this, name: "sort", toEl: an, originalEvent: e })), Dn && Dn.save()) : _1 !== X8 && _1 >= 0 && (x1({ sortable: this, name: "update", toEl: an, originalEvent: e }), x1({ sortable: this, name: "sort", toEl: an, originalEvent: e })), j0.active && ((_1 == null || _1 === -1) && (_1 = X8, p4 = p5), x1({ sortable: this, name: "end", toEl: an, originalEvent: e }), this.save()))), this._nulling(); }, _nulling: function() { l1("nulling", this), sn = x0 = an = k0 = J4 = cn = Z3 = w4 = G4 = gx = h5 = _1 = p4 = X8 = p5 = D8 = m5 = Dn = g3 = j0.dragged = j0.ghost = j0.clone = j0.active = null, ae.forEach(function(e) { e.checked = !0; }), ae.length = Dt = It = 0; }, handleEvent: function(e) { switch (e.type) { case "drop": case "dragend": this._onDrop(e); break; case "dragenter": case "dragover": x0 && (this._onDragOver(e), vk(e)); break; case "selectstart": e.preventDefault(); break; } }, /** * Serializes the item into an array of string. * @returns {String[]} */ toArray: function() { for (var e = [], x, i = this.el.children, t = 0, h = i.length, g = this.options; t < h; t++) x = i[t], sx(x, g.draggable, this.el, !1) && e.push(x.getAttribute(g.dataIdAttr) || Qk(x)); return e; }, /** * Sorts the elements according to the array. * @param {String[]} order order of the items */ sort: function(e, x) { var i = {}, t = this.el; this.toArray().forEach(function(h, g) { var u = t.children[g]; sx(u, this.options.draggable, t, !1) && (i[h] = u); }, this), x && this.captureAnimationState(), e.forEach(function(h) { i[h] && (t.removeChild(i[h]), t.appendChild(i[h])); }), x && this.animateAll(); }, /** * Save the current sorting */ save: function() { var e = this.options.store; e && e.set && e.set(this); }, /** * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. * @param {HTMLElement} el * @param {String} [selector] default: `options.draggable` * @returns {HTMLElement|null} */ closest: function(e, x) { return sx(e, x || this.options.draggable, this.el, !1); }, /** * Set/get option * @param {string} name * @param {*} [value] * @returns {*} */ option: function(e, x) { var i = this.options; if (x === void 0) return i[e]; var t = ni.modifyOption(this, e, x); typeof t < "u" ? i[e] = t : i[e] = x, e === "group" && Ur(i); }, /** * Destroy */ destroy: function() { l1("destroy", this); var e = this.el; e[Q1] = null, R0(e, "mousedown", this._onTapStart), R0(e, "touchstart", this._onTapStart), R0(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R0(e, "dragover", this), R0(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(x) { x.removeAttribute("draggable"); }), this._onDrop(), this._disableDelayedDragEvents(), de.splice(de.indexOf(this.el), 1), this.el = e = null; }, _hideClone: function() { if (!w4) { if (l1("hideClone", this), j0.eventCanceled) return; m0(cn, "display", "none"), this.options.removeCloneOnHide && cn.parentNode && cn.parentNode.removeChild(cn), w4 = !0; } }, _showClone: function(e) { if (e.lastPutMode !== "clone") { this._hideClone(); return; } if (w4) { if (l1("showClone", this), j0.eventCanceled) return; x0.parentNode == sn && !this.options.group.revertClone ? sn.insertBefore(cn, x0) : J4 ? sn.insertBefore(cn, J4) : sn.appendChild(cn), this.options.group.revertClone && this.animate(x0, cn), m0(cn, "display", ""), w4 = !1; } } }; function vk(e) { e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault(); } function o3(e, x, i, t, h, g, u, o) { var l, r = e[Q1], d = r.options.onMove, f; return window.CustomEvent && !t4 && !J5 ? l = new CustomEvent("move", { bubbles: !0, cancelable: !0 }) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = x, l.from = e, l.dragged = i, l.draggedRect = t, l.related = h || x, l.relatedRect = g || mn(x), l.willInsertAfter = o, l.originalEvent = u, e.dispatchEvent(l), d && (f = d.call(r, l, u)), f; } function Lt(e) { e.draggable = !1; } function Sk() { Ah = !1; } function Ck(e, x, i) { var t = mn(u2(i.el, 0, i.options, !0)), h = Br(i.el, i.options, k0), g = 10; return x ? e.clientX < h.left - g || e.clientY < t.top && e.clientX < t.right : e.clientY < h.top - g || e.clientY < t.bottom && e.clientX < t.left; } function _k(e, x, i) { var t = mn(x7(i.el, i.options.draggable)), h = Br(i.el, i.options, k0), g = 10; return x ? e.clientX > h.right + g || e.clientY > t.bottom && e.clientX > t.left : e.clientY > h.bottom + g || e.clientX > t.right && e.clientY > t.top; } function Pk(e, x, i, t, h, g, u, o) { var l = t ? e.clientY : e.clientX, r = t ? i.height : i.width, d = t ? i.top : i.left, f = t ? i.bottom : i.right, b = !1; if (!u) { if (o && L3 < r * h) { if (!j5 && (m5 === 1 ? l > d + r * g / 2 : l < f - r * g / 2) && (j5 = !0), j5) b = !0; else if (m5 === 1 ? l < d + L3 : l > f - L3) return -m5; } else if (l > d + r * (1 - h) / 2 && l < f - r * (1 - h) / 2) return Tk(x); } return b = b || u, b && (l < d + r * g / 2 || l > f - r * g / 2) ? l > d + r / 2 ? 1 : -1 : 0; } function Tk(e) { return U1(x0) < U1(e) ? 1 : -1; } function Qk(e) { for (var x = e.tagName + e.className + e.src + e.href + e.textContent, i = x.length, t = 0; i--; ) t += x.charCodeAt(i); return t.toString(36); } function Ak(e) { ae.length = 0; for (var x = e.getElementsByTagName("input"), i = x.length; i--; ) { var t = x[i]; t.checked && ae.push(t); } } function V3(e) { return setTimeout(e, 0); } function Eh(e) { return clearTimeout(e); } Fe && N0(document, "touchmove", function(e) { (j0.active || V8) && e.cancelable && e.preventDefault(); }); j0.utils = { on: N0, off: R0, css: m0, find: Zr, is: function(e, x) { return !!sx(e, x, e, !1); }, extend: fk, throttle: Lr, closest: sx, toggleClass: C1, clone: Nr, index: U1, nextTick: V3, cancelNextTick: Eh, detectDirection: Xr, getChild: u2 }; j0.get = function(e) { return e[Q1]; }; j0.mount = function() { for (var e = arguments.length, x = new Array(e), i = 0; i < e; i++) x[i] = arguments[i]; x[0].constructor === Array && (x = x[0]), x.forEach(function(t) { if (!t.prototype || !t.prototype.constructor) throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t)); t.utils && (j0.utils = Tx(Tx({}, j0.utils), t.utils)), ni.mount(t); }); }; j0.create = function(e, x) { return new j0(e, x); }; j0.version = rk; var zn = [], g5, $h, Mh = !1, Vt, Nt, fe, u5; function Ek() { function e() { this.defaults = { scroll: !0, forceAutoScrollFallback: !1, scrollSensitivity: 30, scrollSpeed: 10, bubbleScroll: !0 }; for (var x in this) x.charAt(0) === "_" && typeof this[x] == "function" && (this[x] = this[x].bind(this)); } return e.prototype = { dragStarted: function(x) { var i = x.originalEvent; this.sortable.nativeDraggable ? N0(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? N0(document, "pointermove", this._handleFallbackAutoScroll) : i.touches ? N0(document, "touchmove", this._handleFallbackAutoScroll) : N0(document, "mousemove", this._handleFallbackAutoScroll); }, dragOverCompleted: function(x) { var i = x.originalEvent; !this.options.dragOverBubble && !i.rootEl && this._handleAutoScroll(i); }, drop: function() { this.sortable.nativeDraggable ? R0(document, "dragover", this._handleAutoScroll) : (R0(document, "pointermove", this._handleFallbackAutoScroll), R0(document, "touchmove", this._handleFallbackAutoScroll), R0(document, "mousemove", this._handleFallbackAutoScroll)), Hs(), N3(), bk(); }, nulling: function() { fe = $h = g5 = Mh = u5 = Vt = Nt = null, zn.length = 0; }, _handleFallbackAutoScroll: function(x) { this._handleAutoScroll(x, !0); }, _handleAutoScroll: function(x, i) { var t = this, h = (x.touches ? x.touches[0] : x).clientX, g = (x.touches ? x.touches[0] : x).clientY, u = document.elementFromPoint(h, g); if (fe = x, i || this.options.forceAutoScrollFallback || J5 || t4 || y5) { Bt(x, this.options, u, i); var o = k4(u, !0); Mh && (!u5 || h !== Vt || g !== Nt) && (u5 && Hs(), u5 = setInterval(function() { var l = k4(document.elementFromPoint(h, g), !0);