UNPKG

wui-print

Version:

前端打印插件,包含打印设计器、打印表单、打印API

1,206 lines 1.99 MB
import { reactive as Oe, toRefs as $i, inject as oe, onMounted as vt, createElementBlock as E, openBlock as B, createElementVNode as k, Fragment as ue, renderList as Ce, unref as r, toDisplayString as Se, normalizeClass as ce, pushScopeId as Ue, popScopeId as Ee, ref as F, readonly as Bv, getCurrentScope as Mv, onScopeDispose as qh, getCurrentInstance as cn, nextTick as pt, watch as H, defineComponent as ft, warn as Qv, computed as M, watchEffect as Dv, onBeforeUnmount as bn, isRef as Me, shallowRef as Fr, provide as yo, renderSlot as ct, mergeProps as tt, toRef as Ka, onUnmounted as Vv, useAttrs as Wv, useSlots as hu, createCommentVNode as be, createBlock as Z, withCtx as R, resolveDynamicComponent as To, withModifiers as Te, createVNode as x, normalizeStyle as me, Transition as gu, withDirectives as Re, vShow as Le, Text as Uv, h as Ev, shallowReactive as Zv, isVNode as Ds, render as Ja, markRaw as rc, resolveComponent as V, withKeys as Gi, createTextVNode as j, createSlots as Qo } from "vue"; /**! * Sortable 1.15.6 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */ function ic(n, e) { var o = Object.keys(n); if (Object.getOwnPropertySymbols) { var t = Object.getOwnPropertySymbols(n); e && (t = t.filter(function(l) { return Object.getOwnPropertyDescriptor(n, l).enumerable; })), o.push.apply(o, t); } return o; } function mn(n) { for (var e = 1; e < arguments.length; e++) { var o = arguments[e] != null ? arguments[e] : {}; e % 2 ? ic(Object(o), !0).forEach(function(t) { zv(n, t, o[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(o)) : ic(Object(o)).forEach(function(t) { Object.defineProperty(n, t, Object.getOwnPropertyDescriptor(o, t)); }); } return n; } function Pa(n) { "@babel/helpers - typeof"; return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Pa = function(e) { return typeof e; } : Pa = function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Pa(n); } function zv(n, e, o) { return e in n ? Object.defineProperty(n, e, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = o, n; } function wn() { return wn = Object.assign || function(n) { for (var e = 1; e < arguments.length; e++) { var o = arguments[e]; for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && (n[t] = o[t]); } return n; }, wn.apply(this, arguments); } function Hv(n, e) { if (n == null) return {}; var o = {}, t = Object.keys(n), l, i; for (i = 0; i < t.length; i++) l = t[i], !(e.indexOf(l) >= 0) && (o[l] = n[l]); return o; } function jv(n, e) { if (n == null) return {}; var o = Hv(n, e), t, l; if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(n); for (l = 0; l < i.length; l++) t = i[l], !(e.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(n, t) && (o[t] = n[t]); } return o; } var Xv = "1.15.6"; function xn(n) { if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(n); } var kn = xn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Pi = xn(/Edge/i), ac = xn(/firefox/i), qr = xn(/safari/i) && !xn(/chrome/i) && !xn(/android/i), bu = xn(/iP(ad|od|hone)/i), Yh = xn(/chrome/i) && xn(/android/i), Gh = { capture: !1, passive: !1 }; function Ye(n, e, o) { n.addEventListener(e, o, !kn && Gh); } function qe(n, e, o) { n.removeEventListener(e, o, !kn && Gh); } function es(n, e) { if (e) { if (e[0] === ">" && (e = e.substring(1)), n) try { if (n.matches) return n.matches(e); if (n.msMatchesSelector) return n.msMatchesSelector(e); if (n.webkitMatchesSelector) return n.webkitMatchesSelector(e); } catch { return !1; } return !1; } } function Kh(n) { return n.host && n !== document && n.host.nodeType ? n.host : n.parentNode; } function Ho(n, e, o, t) { if (n) { o = o || document; do { if (e != null && (e[0] === ">" ? n.parentNode === o && es(n, e) : es(n, e)) || t && n === o) return n; if (n === o) break; } while (n = Kh(n)); } return null; } var sc = /\s+/g; function So(n, e, o) { if (n && e) if (n.classList) n.classList[o ? "add" : "remove"](e); else { var t = (" " + n.className + " ").replace(sc, " ").replace(" " + e + " ", " "); n.className = (t + (o ? " " + e : "")).replace(sc, " "); } } function Be(n, e, o) { var t = n && n.style; if (t) { if (o === void 0) return document.defaultView && document.defaultView.getComputedStyle ? o = document.defaultView.getComputedStyle(n, "") : n.currentStyle && (o = n.currentStyle), e === void 0 ? o : o[e]; !(e in t) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), t[e] = o + (typeof o == "string" ? "" : "px"); } } function Jl(n, e) { var o = ""; if (typeof n == "string") o = n; else do { var t = Be(n, "transform"); t && t !== "none" && (o = t + " " + o); } while (!e && (n = n.parentNode)); var l = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; return l && new l(o); } function Jh(n, e, o) { if (n) { var t = n.getElementsByTagName(e), l = 0, i = t.length; if (o) for (; l < i; l++) o(t[l], l); return t; } return []; } function un() { var n = document.scrollingElement; return n || document.documentElement; } function Rt(n, e, o, t, l) { if (!(!n.getBoundingClientRect && n !== window)) { var i, s, d, f, u, c, m; if (n !== window && n.parentNode && n !== un() ? (i = n.getBoundingClientRect(), s = i.top, d = i.left, f = i.bottom, u = i.right, c = i.height, m = i.width) : (s = 0, d = 0, f = window.innerHeight, u = window.innerWidth, c = window.innerHeight, m = window.innerWidth), (e || o) && n !== window && (l = l || n.parentNode, !kn)) do if (l && l.getBoundingClientRect && (Be(l, "transform") !== "none" || o && Be(l, "position") !== "static")) { var g = l.getBoundingClientRect(); s -= g.top + parseInt(Be(l, "border-top-width")), d -= g.left + parseInt(Be(l, "border-left-width")), f = s + i.height, u = d + i.width; break; } while (l = l.parentNode); if (t && n !== window) { var y = Jl(l || n), p = y && y.a, v = y && y.d; y && (s /= v, d /= p, m /= p, c /= v, f = s + c, u = d + m); } return { top: s, left: d, bottom: f, right: u, width: m, height: c }; } } function dc(n, e, o) { for (var t = zn(n, !0), l = Rt(n)[e]; t; ) { var i = Rt(t)[o], s = void 0; if (s = l >= i, !s) return t; if (t === un()) break; t = zn(t, !1); } return !1; } function ir(n, e, o, t) { for (var l = 0, i = 0, s = n.children; i < s.length; ) { if (s[i].style.display !== "none" && s[i] !== ke.ghost && (t || s[i] !== ke.dragged) && Ho(s[i], o.draggable, n, !1)) { if (l === e) return s[i]; l++; } i++; } return null; } function yu(n, e) { for (var o = n.lastElementChild; o && (o === ke.ghost || Be(o, "display") === "none" || e && !es(o, e)); ) o = o.previousElementSibling; return o || null; } function Ro(n, e) { var o = 0; if (!n || !n.parentNode) return -1; for (; n = n.previousElementSibling; ) n.nodeName.toUpperCase() !== "TEMPLATE" && n !== ke.clone && (!e || es(n, e)) && o++; return o; } function fc(n) { var e = 0, o = 0, t = un(); if (n) do { var l = Jl(n), i = l.a, s = l.d; e += n.scrollLeft * i, o += n.scrollTop * s; } while (n !== t && (n = n.parentNode)); return [e, o]; } function Nv(n, e) { for (var o in n) if (n.hasOwnProperty(o)) { for (var t in e) if (e.hasOwnProperty(t) && e[t] === n[o][t]) return Number(o); } return -1; } function zn(n, e) { if (!n || !n.getBoundingClientRect) return un(); var o = n, t = !1; do if (o.clientWidth < o.scrollWidth || o.clientHeight < o.scrollHeight) { var l = Be(o); if (o.clientWidth < o.scrollWidth && (l.overflowX == "auto" || l.overflowX == "scroll") || o.clientHeight < o.scrollHeight && (l.overflowY == "auto" || l.overflowY == "scroll")) { if (!o.getBoundingClientRect || o === document.body) return un(); if (t || e) return o; t = !0; } } while (o = o.parentNode); return un(); } function Fv(n, e) { if (n && e) for (var o in e) e.hasOwnProperty(o) && (n[o] = e[o]); return n; } function pd(n, e) { return Math.round(n.top) === Math.round(e.top) && Math.round(n.left) === Math.round(e.left) && Math.round(n.height) === Math.round(e.height) && Math.round(n.width) === Math.round(e.width); } var Yr; function eg(n, e) { return function() { if (!Yr) { var o = arguments, t = this; o.length === 1 ? n.call(t, o[0]) : n.apply(t, o), Yr = setTimeout(function() { Yr = void 0; }, e); } }; } function qv() { clearTimeout(Yr), Yr = void 0; } function tg(n, e, o) { n.scrollLeft += e, n.scrollTop += o; } function og(n) { var e = window.Polymer, o = window.jQuery || window.Zepto; return e && e.dom ? e.dom(n).cloneNode(!0) : o ? o(n).clone(!0)[0] : n.cloneNode(!0); } function ng(n, e, o) { var t = {}; return Array.from(n.children).forEach(function(l) { var i, s, d, f; if (!(!Ho(l, e.draggable, n, !1) || l.animated || l === o)) { var u = Rt(l); t.left = Math.min((i = t.left) !== null && i !== void 0 ? i : 1 / 0, u.left), t.top = Math.min((s = t.top) !== null && s !== void 0 ? s : 1 / 0, u.top), t.right = Math.max((d = t.right) !== null && d !== void 0 ? d : -1 / 0, u.right), t.bottom = Math.max((f = t.bottom) !== null && f !== void 0 ? f : -1 / 0, u.bottom); } }), t.width = t.right - t.left, t.height = t.bottom - t.top, t.x = t.left, t.y = t.top, t; } var mo = "Sortable" + (/* @__PURE__ */ new Date()).getTime(); function Yv() { var n = [], e; return { captureAnimationState: function() { if (n = [], !!this.options.animation) { var t = [].slice.call(this.el.children); t.forEach(function(l) { if (!(Be(l, "display") === "none" || l === ke.ghost)) { n.push({ target: l, rect: Rt(l) }); var i = mn({}, n[n.length - 1].rect); if (l.thisAnimationDuration) { var s = Jl(l, !0); s && (i.top -= s.f, i.left -= s.e); } l.fromRect = i; } }); } }, addAnimationState: function(t) { n.push(t); }, removeAnimationState: function(t) { n.splice(Nv(n, { target: t }), 1); }, animateAll: function(t) { var l = this; if (!this.options.animation) { clearTimeout(e), typeof t == "function" && t(); return; } var i = !1, s = 0; n.forEach(function(d) { var f = 0, u = d.target, c = u.fromRect, m = Rt(u), g = u.prevFromRect, y = u.prevToRect, p = d.rect, v = Jl(u, !0); v && (m.top -= v.f, m.left -= v.e), u.toRect = m, u.thisAnimationDuration && pd(g, m) && !pd(c, m) && // Make sure animatingRect is on line between toRect & fromRect (p.top - m.top) / (p.left - m.left) === (c.top - m.top) / (c.left - m.left) && (f = Kv(p, g, y, l.options)), pd(m, c) || (u.prevFromRect = c, u.prevToRect = m, f || (f = l.options.animation), l.animate(u, p, m, f)), f && (i = !0, s = Math.max(s, f), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() { u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null; }, f), u.thisAnimationDuration = f); }), clearTimeout(e), i ? e = setTimeout(function() { typeof t == "function" && t(); }, s) : typeof t == "function" && t(), n = []; }, animate: function(t, l, i, s) { if (s) { Be(t, "transition", ""), Be(t, "transform", ""); var d = Jl(this.el), f = d && d.a, u = d && d.d, c = (l.left - i.left) / (f || 1), m = (l.top - i.top) / (u || 1); t.animatingX = !!c, t.animatingY = !!m, Be(t, "transform", "translate3d(" + c + "px," + m + "px,0)"), this.forRepaintDummy = Gv(t), Be(t, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), Be(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() { Be(t, "transition", ""), Be(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1; }, s); } } }; } function Gv(n) { return n.offsetWidth; } function Kv(n, e, o, t) { return Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) / Math.sqrt(Math.pow(e.top - o.top, 2) + Math.pow(e.left - o.left, 2)) * t.animation; } var Zl = [], cd = { initializeByDefault: !0 }, Bi = { mount: function(e) { for (var o in cd) cd.hasOwnProperty(o) && !(o in e) && (e[o] = cd[o]); Zl.forEach(function(t) { if (t.pluginName === e.pluginName) throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once"); }), Zl.push(e); }, pluginEvent: function(e, o, t) { var l = this; this.eventCanceled = !1, t.cancel = function() { l.eventCanceled = !0; }; var i = e + "Global"; Zl.forEach(function(s) { o[s.pluginName] && (o[s.pluginName][i] && o[s.pluginName][i](mn({ sortable: o }, t)), o.options[s.pluginName] && o[s.pluginName][e] && o[s.pluginName][e](mn({ sortable: o }, t))); }); }, initializePlugins: function(e, o, t, l) { Zl.forEach(function(d) { var f = d.pluginName; if (!(!e.options[f] && !d.initializeByDefault)) { var u = new d(e, o, e.options); u.sortable = e, u.options = e.options, e[f] = u, wn(t, u.defaults); } }); for (var i in e.options) if (e.options.hasOwnProperty(i)) { var s = this.modifyOption(e, i, e.options[i]); typeof s < "u" && (e.options[i] = s); } }, getEventProperties: function(e, o) { var t = {}; return Zl.forEach(function(l) { typeof l.eventProperties == "function" && wn(t, l.eventProperties.call(o[l.pluginName], e)); }), t; }, modifyOption: function(e, o, t) { var l; return Zl.forEach(function(i) { e[i.pluginName] && i.optionListeners && typeof i.optionListeners[o] == "function" && (l = i.optionListeners[o].call(e[i.pluginName], t)); }), l; } }; function Jv(n) { var e = n.sortable, o = n.rootEl, t = n.name, l = n.targetEl, i = n.cloneEl, s = n.toEl, d = n.fromEl, f = n.oldIndex, u = n.newIndex, c = n.oldDraggableIndex, m = n.newDraggableIndex, g = n.originalEvent, y = n.putSortable, p = n.extraEventProperties; if (e = e || o && o[mo], !!e) { var v, O = e.options, a = "on" + t.charAt(0).toUpperCase() + t.substr(1); window.CustomEvent && !kn && !Pi ? v = new CustomEvent(t, { bubbles: !0, cancelable: !0 }) : (v = document.createEvent("Event"), v.initEvent(t, !0, !0)), v.to = s || o, v.from = d || o, v.item = l || o, v.clone = i, v.oldIndex = f, v.newIndex = u, v.oldDraggableIndex = c, v.newDraggableIndex = m, v.originalEvent = g, v.pullMode = y ? y.lastPutMode : void 0; var _ = mn(mn({}, p), Bi.getEventProperties(t, e)); for (var S in _) v[S] = _[S]; o && o.dispatchEvent(v), O[a] && O[a].call(e, v); } } var e0 = ["evt"], so = function(e, o) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = t.evt, i = jv(t, e0); Bi.pluginEvent.bind(ke)(e, o, mn({ dragEl: pe, parentEl: St, ghostEl: De, rootEl: bt, nextEl: bl, lastDownEl: Ba, cloneEl: Ot, cloneHidden: En, dragStarted: Wr, putSortable: zt, activeSortable: ke.active, originalEvent: l, oldIndex: ql, oldDraggableIndex: Gr, newIndex: _o, newDraggableIndex: Vn, hideGhostForTarget: ag, unhideGhostForTarget: sg, cloneNowHidden: function() { En = !0; }, cloneNowShown: function() { En = !1; }, dispatchSortableEvent: function(d) { no({ sortable: o, name: d, originalEvent: l }); } }, i)); }; function no(n) { Jv(mn({ putSortable: zt, cloneEl: Ot, targetEl: pe, rootEl: bt, oldIndex: ql, oldDraggableIndex: Gr, newIndex: _o, newDraggableIndex: Vn }, n)); } var pe, St, De, bt, bl, Ba, Ot, En, ql, _o, Gr, Vn, Ki, zt, jl = !1, ts = !1, os = [], cl, Vo, md, hd, uc, pc, Wr, zl, Kr, Jr = !1, Ji = !1, Ma, Kt, gd = [], nf = !1, ns = [], Vs = typeof document < "u", ea = bu, cc = Pi || kn ? "cssFloat" : "float", t0 = Vs && !Yh && !bu && "draggable" in document.createElement("div"), lg = function() { if (Vs) { if (kn) return !1; var n = document.createElement("x"); return n.style.cssText = "pointer-events:auto", n.style.pointerEvents === "auto"; } }(), rg = function(e, o) { var t = Be(e), l = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), i = ir(e, 0, o), s = ir(e, 1, o), d = i && Be(i), f = s && Be(s), u = d && parseInt(d.marginLeft) + parseInt(d.marginRight) + Rt(i).width, c = f && parseInt(f.marginLeft) + parseInt(f.marginRight) + Rt(s).width; if (t.display === "flex") return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal"; if (t.display === "grid") return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal"; if (i && d.float && d.float !== "none") { var m = d.float === "left" ? "left" : "right"; return s && (f.clear === "both" || f.clear === m) ? "vertical" : "horizontal"; } return i && (d.display === "block" || d.display === "flex" || d.display === "table" || d.display === "grid" || u >= l && t[cc] === "none" || s && t[cc] === "none" && u + c > l) ? "vertical" : "horizontal"; }, o0 = function(e, o, t) { var l = t ? e.left : e.top, i = t ? e.right : e.bottom, s = t ? e.width : e.height, d = t ? o.left : o.top, f = t ? o.right : o.bottom, u = t ? o.width : o.height; return l === d || i === f || l + s / 2 === d + u / 2; }, n0 = function(e, o) { var t; return os.some(function(l) { var i = l[mo].options.emptyInsertThreshold; if (!(!i || yu(l))) { var s = Rt(l), d = e >= s.left - i && e <= s.right + i, f = o >= s.top - i && o <= s.bottom + i; if (d && f) return t = l; } }), t; }, ig = function(e) { function o(i, s) { return function(d, f, u, c) { var m = d.options.group.name && f.options.group.name && d.options.group.name === f.options.group.name; if (i == null && (s || m)) return !0; if (i == null || i === !1) return !1; if (s && i === "clone") return i; if (typeof i == "function") return o(i(d, f, u, c), s)(d, f, u, c); var g = (s ? d : f).options.group.name; return i === !0 || typeof i == "string" && i === g || i.join && i.indexOf(g) > -1; }; } var t = {}, l = e.group; (!l || Pa(l) != "object") && (l = { name: l }), t.name = l.name, t.checkPull = o(l.pull, !0), t.checkPut = o(l.put), t.revertClone = l.revertClone, e.group = t; }, ag = function() { !lg && De && Be(De, "display", "none"); }, sg = function() { !lg && De && Be(De, "display", ""); }; Vs && !Yh && document.addEventListener("click", function(n) { if (ts) return n.preventDefault(), n.stopPropagation && n.stopPropagation(), n.stopImmediatePropagation && n.stopImmediatePropagation(), ts = !1, !1; }, !0); var ml = function(e) { if (pe) { e = e.touches ? e.touches[0] : e; var o = n0(e.clientX, e.clientY); if (o) { var t = {}; for (var l in e) e.hasOwnProperty(l) && (t[l] = e[l]); t.target = t.rootEl = o, t.preventDefault = void 0, t.stopPropagation = void 0, o[mo]._onDragOver(t); } } }, l0 = function(e) { pe && pe.parentNode[mo]._isOutsideThisEl(e.target); }; function ke(n, e) { if (!(n && n.nodeType && n.nodeType === 1)) throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n)); this.el = n, this.options = e = wn({}, e), n[mo] = this; var o = { group: null, sort: !0, disabled: !1, store: null, handle: null, draggable: /^[uo]l$/i.test(n.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 rg(n, this.options); }, ghostClass: "sortable-ghost", chosenClass: "sortable-chosen", dragClass: "sortable-drag", ignore: "a, img", filter: null, preventOnFilter: !0, animation: 0, easing: null, setData: function(s, d) { s.setData("Text", d.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 }, // Disabled on Safari: #1571; Enabled on Safari IOS: #2244 supportPointer: ke.supportPointer !== !1 && "PointerEvent" in window && (!qr || bu), emptyInsertThreshold: 5 }; Bi.initializePlugins(this, n, o); for (var t in o) !(t in e) && (e[t] = o[t]); ig(e); for (var l in this) l.charAt(0) === "_" && typeof this[l] == "function" && (this[l] = this[l].bind(this)); this.nativeDraggable = e.forceFallback ? !1 : t0, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? Ye(n, "pointerdown", this._onTapStart) : (Ye(n, "mousedown", this._onTapStart), Ye(n, "touchstart", this._onTapStart)), this.nativeDraggable && (Ye(n, "dragover", this), Ye(n, "dragenter", this)), os.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), wn(this, Yv()); } ke.prototype = /** @lends Sortable.prototype */ { constructor: ke, _isOutsideThisEl: function(e) { !this.el.contains(e) && e !== this.el && (zl = null); }, _getDirection: function(e, o) { return typeof this.options.direction == "function" ? this.options.direction.call(this, e, o, pe) : this.options.direction; }, _onTapStart: function(e) { if (e.cancelable) { var o = this, t = this.el, l = this.options, i = l.preventOnFilter, s = e.type, d = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, f = (d || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || f, c = l.filter; if (p0(t), !pe && !(/mousedown|pointerdown/.test(s) && e.button !== 0 || l.disabled) && !u.isContentEditable && !(!this.nativeDraggable && qr && f && f.tagName.toUpperCase() === "SELECT") && (f = Ho(f, l.draggable, t, !1), !(f && f.animated) && Ba !== f)) { if (ql = Ro(f), Gr = Ro(f, l.draggable), typeof c == "function") { if (c.call(this, e, f, this)) { no({ sortable: o, rootEl: u, name: "filter", targetEl: f, toEl: t, fromEl: t }), so("filter", o, { evt: e }), i && e.preventDefault(); return; } } else if (c && (c = c.split(",").some(function(m) { if (m = Ho(u, m.trim(), t, !1), m) return no({ sortable: o, rootEl: m, name: "filter", targetEl: f, fromEl: t, toEl: t }), so("filter", o, { evt: e }), !0; }), c)) { i && e.preventDefault(); return; } l.handle && !Ho(u, l.handle, t, !1) || this._prepareDragStart(e, d, f); } } }, _prepareDragStart: function(e, o, t) { var l = this, i = l.el, s = l.options, d = i.ownerDocument, f; if (t && !pe && t.parentNode === i) { var u = Rt(t); if (bt = i, pe = t, St = pe.parentNode, bl = pe.nextSibling, Ba = t, Ki = s.group, ke.dragged = pe, cl = { target: pe, clientX: (o || e).clientX, clientY: (o || e).clientY }, uc = cl.clientX - u.left, pc = cl.clientY - u.top, this._lastX = (o || e).clientX, this._lastY = (o || e).clientY, pe.style["will-change"] = "all", f = function() { if (so("delayEnded", l, { evt: e }), ke.eventCanceled) { l._onDrop(); return; } l._disableDelayedDragEvents(), !ac && l.nativeDraggable && (pe.draggable = !0), l._triggerDragStart(e, o), no({ sortable: l, name: "choose", originalEvent: e }), So(pe, s.chosenClass, !0); }, s.ignore.split(",").forEach(function(c) { Jh(pe, c.trim(), bd); }), Ye(d, "dragover", ml), Ye(d, "mousemove", ml), Ye(d, "touchmove", ml), s.supportPointer ? (Ye(d, "pointerup", l._onDrop), !this.nativeDraggable && Ye(d, "pointercancel", l._onDrop)) : (Ye(d, "mouseup", l._onDrop), Ye(d, "touchend", l._onDrop), Ye(d, "touchcancel", l._onDrop)), ac && this.nativeDraggable && (this.options.touchStartThreshold = 4, pe.draggable = !0), so("delayStart", this, { evt: e }), s.delay && (!s.delayOnTouchOnly || o) && (!this.nativeDraggable || !(Pi || kn))) { if (ke.eventCanceled) { this._onDrop(); return; } s.supportPointer ? (Ye(d, "pointerup", l._disableDelayedDrag), Ye(d, "pointercancel", l._disableDelayedDrag)) : (Ye(d, "mouseup", l._disableDelayedDrag), Ye(d, "touchend", l._disableDelayedDrag), Ye(d, "touchcancel", l._disableDelayedDrag)), Ye(d, "mousemove", l._delayedDragTouchMoveHandler), Ye(d, "touchmove", l._delayedDragTouchMoveHandler), s.supportPointer && Ye(d, "pointermove", l._delayedDragTouchMoveHandler), l._dragStartTimer = setTimeout(f, s.delay); } else f(); } }, _delayedDragTouchMoveHandler: function(e) { var o = e.touches ? e.touches[0] : e; Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag(); }, _disableDelayedDrag: function() { pe && bd(pe), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents(); }, _disableDelayedDragEvents: function() { var e = this.el.ownerDocument; qe(e, "mouseup", this._disableDelayedDrag), qe(e, "touchend", this._disableDelayedDrag), qe(e, "touchcancel", this._disableDelayedDrag), qe(e, "pointerup", this._disableDelayedDrag), qe(e, "pointercancel", this._disableDelayedDrag), qe(e, "mousemove", this._delayedDragTouchMoveHandler), qe(e, "touchmove", this._delayedDragTouchMoveHandler), qe(e, "pointermove", this._delayedDragTouchMoveHandler); }, _triggerDragStart: function(e, o) { o = o || e.pointerType == "touch" && e, !this.nativeDraggable || o ? this.options.supportPointer ? Ye(document, "pointermove", this._onTouchMove) : o ? Ye(document, "touchmove", this._onTouchMove) : Ye(document, "mousemove", this._onTouchMove) : (Ye(pe, "dragend", this), Ye(bt, "dragstart", this._onDragStart)); try { document.selection ? Qa(function() { document.selection.empty(); }) : window.getSelection().removeAllRanges(); } catch { } }, _dragStarted: function(e, o) { if (jl = !1, bt && pe) { so("dragStarted", this, { evt: o }), this.nativeDraggable && Ye(document, "dragover", l0); var t = this.options; !e && So(pe, t.dragClass, !1), So(pe, t.ghostClass, !0), ke.active = this, e && this._appendGhost(), no({ sortable: this, name: "start", originalEvent: o }); } else this._nulling(); }, _emulateDragOver: function() { if (Vo) { this._lastX = Vo.clientX, this._lastY = Vo.clientY, ag(); for (var e = document.elementFromPoint(Vo.clientX, Vo.clientY), o = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Vo.clientX, Vo.clientY), e !== o); ) o = e; if (pe.parentNode[mo]._isOutsideThisEl(e), o) do { if (o[mo]) { var t = void 0; if (t = o[mo]._onDragOver({ clientX: Vo.clientX, clientY: Vo.clientY, target: e, rootEl: o }), t && !this.options.dragoverBubble) break; } e = o; } while (o = Kh(o)); sg(); } }, _onTouchMove: function(e) { if (cl) { var o = this.options, t = o.fallbackTolerance, l = o.fallbackOffset, i = e.touches ? e.touches[0] : e, s = De && Jl(De, !0), d = De && s && s.a, f = De && s && s.d, u = ea && Kt && fc(Kt), c = (i.clientX - cl.clientX + l.x) / (d || 1) + (u ? u[0] - gd[0] : 0) / (d || 1), m = (i.clientY - cl.clientY + l.y) / (f || 1) + (u ? u[1] - gd[1] : 0) / (f || 1); if (!ke.active && !jl) { if (t && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < t) return; this._onDragStart(e, !0); } if (De) { s ? (s.e += c - (md || 0), s.f += m - (hd || 0)) : s = { a: 1, b: 0, c: 0, d: 1, e: c, f: m }; var g = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")"); Be(De, "webkitTransform", g), Be(De, "mozTransform", g), Be(De, "msTransform", g), Be(De, "transform", g), md = c, hd = m, Vo = i; } e.cancelable && e.preventDefault(); } }, _appendGhost: function() { if (!De) { var e = this.options.fallbackOnBody ? document.body : bt, o = Rt(pe, !0, ea, !0, e), t = this.options; if (ea) { for (Kt = e; Be(Kt, "position") === "static" && Be(Kt, "transform") === "none" && Kt !== document; ) Kt = Kt.parentNode; Kt !== document.body && Kt !== document.documentElement ? (Kt === document && (Kt = un()), o.top += Kt.scrollTop, o.left += Kt.scrollLeft) : Kt = un(), gd = fc(Kt); } De = pe.cloneNode(!0), So(De, t.ghostClass, !1), So(De, t.fallbackClass, !0), So(De, t.dragClass, !0), Be(De, "transition", ""), Be(De, "transform", ""), Be(De, "box-sizing", "border-box"), Be(De, "margin", 0), Be(De, "top", o.top), Be(De, "left", o.left), Be(De, "width", o.width), Be(De, "height", o.height), Be(De, "opacity", "0.8"), Be(De, "position", ea ? "absolute" : "fixed"), Be(De, "zIndex", "100000"), Be(De, "pointerEvents", "none"), ke.ghost = De, e.appendChild(De), Be(De, "transform-origin", uc / parseInt(De.style.width) * 100 + "% " + pc / parseInt(De.style.height) * 100 + "%"); } }, _onDragStart: function(e, o) { var t = this, l = e.dataTransfer, i = t.options; if (so("dragStart", this, { evt: e }), ke.eventCanceled) { this._onDrop(); return; } so("setupClone", this), ke.eventCanceled || (Ot = og(pe), Ot.removeAttribute("id"), Ot.draggable = !1, Ot.style["will-change"] = "", this._hideClone(), So(Ot, this.options.chosenClass, !1), ke.clone = Ot), t.cloneId = Qa(function() { so("clone", t), !ke.eventCanceled && (t.options.removeCloneOnHide || bt.insertBefore(Ot, pe), t._hideClone(), no({ sortable: t, name: "clone" })); }), !o && So(pe, i.dragClass, !0), o ? (ts = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (qe(document, "mouseup", t._onDrop), qe(document, "touchend", t._onDrop), qe(document, "touchcancel", t._onDrop), l && (l.effectAllowed = "move", i.setData && i.setData.call(t, l, pe)), Ye(document, "drop", t), Be(pe, "transform", "translateZ(0)")), jl = !0, t._dragStartId = Qa(t._dragStarted.bind(t, o, e)), Ye(document, "selectstart", t), Wr = !0, window.getSelection().removeAllRanges(), qr && Be(document.body, "user-select", "none"); }, // Returns true - if no further action is needed (either inserted or another condition) _onDragOver: function(e) { var o = this.el, t = e.target, l, i, s, d = this.options, f = d.group, u = ke.active, c = Ki === f, m = d.sort, g = zt || u, y, p = this, v = !1; if (nf) return; function O(N, G) { so(N, p, mn({ evt: e, isOwner: c, axis: y ? "vertical" : "horizontal", revert: s, dragRect: l, targetRect: i, canSort: m, fromSortable: g, target: t, completed: _, onMove: function(ge, J) { return ta(bt, o, pe, l, ge, Rt(ge), e, J); }, changed: S }, G)); } function a() { O("dragOverAnimationCapture"), p.captureAnimationState(), p !== g && g.captureAnimationState(); } function _(N) { return O("dragOverCompleted", { insertion: N }), N && (c ? u._hideClone() : u._showClone(p), p !== g && (So(pe, zt ? zt.options.ghostClass : u.options.ghostClass, !1), So(pe, d.ghostClass, !0)), zt !== p && p !== ke.active ? zt = p : p === ke.active && zt && (zt = null), g === p && (p._ignoreWhileAnimating = t), p.animateAll(function() { O("dragOverAnimationComplete"), p._ignoreWhileAnimating = null; }), p !== g && (g.animateAll(), g._ignoreWhileAnimating = null)), (t === pe && !pe.animated || t === o && !t.animated) && (zl = null), !d.dragoverBubble && !e.rootEl && t !== document && (pe.parentNode[mo]._isOutsideThisEl(e.target), !N && ml(e)), !d.dragoverBubble && e.stopPropagation && e.stopPropagation(), v = !0; } function S() { _o = Ro(pe), Vn = Ro(pe, d.draggable), no({ sortable: p, name: "change", toEl: o, newIndex: _o, newDraggableIndex: Vn, originalEvent: e }); } if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = Ho(t, d.draggable, o, !0), O("dragOver"), ke.eventCanceled) return v; if (pe.contains(e.target) || t.animated && t.animatingX && t.animatingY || p._ignoreWhileAnimating === t) return _(!1); if (ts = !1, u && !d.disabled && (c ? m || (s = St !== bt) : zt === this || (this.lastPutMode = Ki.checkPull(this, u, pe, e)) && f.checkPut(this, u, pe, e))) { if (y = this._getDirection(e, t) === "vertical", l = Rt(pe), O("dragOverValid"), ke.eventCanceled) return v; if (s) return St = bt, a(), this._hideClone(), O("revert"), ke.eventCanceled || (bl ? bt.insertBefore(pe, bl) : bt.appendChild(pe)), _(!0); var I = yu(o, d.draggable); if (!I || s0(e, y, this) && !I.animated) { if (I === pe) return _(!1); if (I && o === e.target && (t = I), t && (i = Rt(t)), ta(bt, o, pe, l, t, i, e, !!t) !== !1) return a(), I && I.nextSibling ? o.insertBefore(pe, I.nextSibling) : o.appendChild(pe), St = o, S(), _(!0); } else if (I && a0(e, y, this)) { var $ = ir(o, 0, d, !0); if ($ === pe) return _(!1); if (t = $, i = Rt(t), ta(bt, o, pe, l, t, i, e, !1) !== !1) return a(), o.insertBefore(pe, $), St = o, S(), _(!0); } else if (t.parentNode === o) { i = Rt(t); var A = 0, b, P = pe.parentNode !== o, C = !o0(pe.animated && pe.toRect || l, t.animated && t.toRect || i, y), w = y ? "top" : "left", h = dc(t, "top", "top") || dc(pe, "top", "top"), D = h ? h.scrollTop : void 0; zl !== t && (b = i[w], Jr = !1, Ji = !C && d.invertSwap || P), A = d0(e, t, i, y, C ? 1 : d.swapThreshold, d.invertedSwapThreshold == null ? d.swapThreshold : d.invertedSwapThreshold, Ji, zl === t); var L; if (A !== 0) { var T = Ro(pe); do T -= A, L = St.children[T]; while (L && (Be(L, "display") === "none" || L === De)); } if (A === 0 || L === t) return _(!1); zl = t, Kr = A; var Q = t.nextElementSibling, U = !1; U = A === 1; var X = ta(bt, o, pe, l, t, i, e, U); if (X !== !1) return (X === 1 || X === -1) && (U = X === 1), nf = !0, setTimeout(i0, 30), a(), U && !Q ? o.appendChild(pe) : t.parentNode.insertBefore(pe, U ? Q : t), h && tg(h, 0, D - h.scrollTop), St = pe.parentNode, b !== void 0 && !Ji && (Ma = Math.abs(b - Rt(t)[w])), S(), _(!0); } if (o.contains(pe)) return _(!1); } return !1; }, _ignoreWhileAnimating: null, _offMoveEvents: function() { qe(document, "mousemove", this._onTouchMove), qe(document, "touchmove", this._onTouchMove), qe(document, "pointermove", this._onTouchMove), qe(document, "dragover", ml), qe(document, "mousemove", ml), qe(document, "touchmove", ml); }, _offUpEvents: function() { var e = this.el.ownerDocument; qe(e, "mouseup", this._onDrop), qe(e, "touchend", this._onDrop), qe(e, "pointerup", this._onDrop), qe(e, "pointercancel", this._onDrop), qe(e, "touchcancel", this._onDrop), qe(document, "selectstart", this); }, _onDrop: function(e) { var o = this.el, t = this.options; if (_o = Ro(pe), Vn = Ro(pe, t.draggable), so("drop", this, { evt: e }), St = pe && pe.parentNode, _o = Ro(pe), Vn = Ro(pe, t.draggable), ke.eventCanceled) { this._nulling(); return; } jl = !1, Ji = !1, Jr = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), lf(this.cloneId), lf(this._dragStartId), this.nativeDraggable && (qe(document, "drop", this), qe(o, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), qr && Be(document.body, "user-select", ""), Be(pe, "transform", ""), e && (Wr && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), De && De.parentNode && De.parentNode.removeChild(De), (bt === St || zt && zt.lastPutMode !== "clone") && Ot && Ot.parentNode && Ot.parentNode.removeChild(Ot), pe && (this.nativeDraggable && qe(pe, "dragend", this), bd(pe), pe.style["will-change"] = "", Wr && !jl && So(pe, zt ? zt.options.ghostClass : this.options.ghostClass, !1), So(pe, this.options.chosenClass, !1), no({ sortable: this, name: "unchoose", toEl: St, newIndex: null, newDraggableIndex: null, originalEvent: e }), bt !== St ? (_o >= 0 && (no({ rootEl: St, name: "add", toEl: St, fromEl: bt, originalEvent: e }), no({ sortable: this, name: "remove", toEl: St, originalEvent: e }), no({ rootEl: St, name: "sort", toEl: St, fromEl: bt, originalEvent: e }), no({ sortable: this, name: "sort", toEl: St, originalEvent: e })), zt && zt.save()) : _o !== ql && _o >= 0 && (no({ sortable: this, name: "update", toEl: St, originalEvent: e }), no({ sortable: this, name: "sort", toEl: St, originalEvent: e })), ke.active && ((_o == null || _o === -1) && (_o = ql, Vn = Gr), no({ sortable: this, name: "end", toEl: St, originalEvent: e }), this.save()))), this._nulling(); }, _nulling: function() { so("nulling", this), bt = pe = St = De = bl = Ot = Ba = En = cl = Vo = Wr = _o = Vn = ql = Gr = zl = Kr = zt = Ki = ke.dragged = ke.ghost = ke.clone = ke.active = null, ns.forEach(function(e) { e.checked = !0; }), ns.length = md = hd = 0; }, handleEvent: function(e) { switch (e.type) { case "drop": case "dragend": this._onDrop(e); break; case "dragenter": case "dragover": pe && (this._onDragOver(e), r0(e)); break; case "selectstart": e.preventDefault(); break; } }, /** * Serializes the item into an array of string. * @returns {String[]} */ toArray: function() { for (var e = [], o, t = this.el.children, l = 0, i = t.length, s = this.options; l < i; l++) o = t[l], Ho(o, s.draggable, this.el, !1) && e.push(o.getAttribute(s.dataIdAttr) || u0(o)); return e; }, /** * Sorts the elements according to the array. * @param {String[]} order order of the items */ sort: function(e, o) { var t = {}, l = this.el; this.toArray().forEach(function(i, s) { var d = l.children[s]; Ho(d, this.options.draggable, l, !1) && (t[i] = d); }, this), o && this.captureAnimationState(), e.forEach(function(i) { t[i] && (l.removeChild(t[i]), l.appendChild(t[i])); }), o && 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, o) { return Ho(e, o || this.options.draggable, this.el, !1); }, /** * Set/get option * @param {string} name * @param {*} [value] * @returns {*} */ option: function(e, o) { var t = this.options; if (o === void 0) return t[e]; var l = Bi.modifyOption(this, e, o); typeof l < "u" ? t[e] = l : t[e] = o, e === "group" && ig(t); }, /** * Destroy */ destroy: function() { so("destroy", this); var e = this.el; e[mo] = null, qe(e, "mousedown", this._onTapStart), qe(e, "touchstart", this._onTapStart), qe(e, "pointerdown", this._onTapStart), this.nativeDraggable && (qe(e, "dragover", this), qe(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(o) { o.removeAttribute("draggable"); }), this._onDrop(), this._disableDelayedDragEvents(), os.splice(os.indexOf(this.el), 1), this.el = e = null; }, _hideClone: function() { if (!En) { if (so("hideClone", this), ke.eventCanceled) return; Be(Ot, "display", "none"), this.options.removeCloneOnHide && Ot.parentNode && Ot.parentNode.removeChild(Ot), En = !0; } }, _showClone: function(e) { if (e.lastPutMode !== "clone") { this._hideClone(); return; } if (En) { if (so("showClone", this), ke.eventCanceled) return; pe.parentNode == bt && !this.options.group.revertClone ? bt.insertBefore(Ot, pe) : bl ? bt.insertBefore(Ot, bl) : bt.appendChild(Ot), this.options.group.revertClone && this.animate(pe, Ot), Be(Ot, "display", ""), En = !1; } } }; function r0(n) { n.dataTransfer && (n.dataTransfer.dropEffect = "move"), n.cancelable && n.preventDefault(); } function ta(n, e, o, t, l, i, s, d) { var f, u = n[mo], c = u.options.onMove, m; return window.CustomEvent && !kn && !Pi ? f = new CustomEvent("move", { bubbles: !0, cancelable: !0 }) : (f = document.createEvent("Event"), f.initEvent("move", !0, !0)), f.to = e, f.from = n, f.dragged = o, f.draggedRect = t, f.related = l || e, f.relatedRect = i || Rt(e), f.willInsertAfter = d, f.originalEvent = s, n.dispatchEvent(f), c && (m = c.call(u, f, s)), m; } function bd(n) { n.draggable = !1; } function i0() { nf = !1; } function a0(n, e, o) { var t = Rt(ir(o.el, 0, o.options, !0)), l = ng(o.el, o.options, De), i = 10; return e ? n.clientX < l.left - i || n.clientY < t.top && n.clientX < t.right : n.clientY < l.top - i || n.clientY < t.bottom && n.clientX < t.left; } function s0(n, e, o) { var t = Rt(yu(o.el, o.options.draggable)), l = ng(o.el, o.options, De), i = 10; return e ? n.clientX > l.right + i || n.clientY > t.bottom && n.clientX > t.left : n.clientY > l.bottom + i || n.clientX > t.right && n.clientY > t.top; } function d0(n, e, o, t, l, i, s, d) { var f = t ? n.clientY : n.clientX, u = t ? o.height : o.width, c = t ? o.top : o.left, m = t ? o.bottom : o.right, g = !1; if (!s) { if (d && Ma < u * l) { if (!Jr && (Kr === 1 ? f > c + u * i / 2 : f < m - u * i / 2) && (Jr = !0), Jr) g = !0; else if (Kr === 1 ? f < c + Ma : f > m - Ma) return -Kr; } else if (f > c + u * (1 - l) / 2 && f < m - u * (1 - l) / 2) return f0(e); } return g = g || s, g && (f < c + u * i / 2 || f > m - u * i / 2) ? f > c + u / 2 ? 1 : -1 : 0; } function f0(n) { return Ro(pe) < Ro(n) ? 1 : -1; } function u0(n) { for (var e = n.tagName + n.className + n.src + n.href + n.textContent, o = e.length, t = 0; o--; ) t += e.charCodeAt(o); return t.toString(36); } function p0(n) { ns.length = 0; for (var e = n.getElementsByTagName("input"), o = e.length; o--; ) { var t = e[o]; t.checked && ns.push(t); } } function Qa(n) { return setTimeout(n, 0); } function lf(n) { return clearTimeout(n); } Vs && Ye(document, "touchmove", function(n) { (ke.active || jl) && n.cancelable && n.preventDefault(); }); ke.utils = { on: Ye, off: qe, css: Be, find: Jh, is: function(e, o) { return !!Ho(e, o, e, !1); }, extend: Fv, throttle: eg, closest: Ho, toggleClass: So, clone: og, index: Ro, nextTick: Qa, cancelNextTick: lf, detectDirection: rg, getChild: ir, expando: mo }; ke.get = function(n) { return n[mo]; }; ke.mount = function() { for (var n = arguments.length, e = new Array(n), o = 0; o < n; o++) e[o] = arguments[o]; e[0].constructor === Array && (e = e[0]), e.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 && (ke.utils = mn(mn({}, ke.utils), t.utils)), Bi.mount(t); }); }; ke.create = function(n, e) { return new ke(n, e); }; ke.version = Xv; var At = [], Ur, rf, af = !1, yd, Od, ls, Er; function c0() { function n() { this.defaults = { scroll: !0, forceAutoScrollFallback: !1, scrollSensitivity: 30, scrollSpeed: 10, bubbleScroll: !0 }; for (var e in this) e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this)); } return n.prototype = { dragStarted: function(o) { var t = o.originalEvent; this.sortable.nativeDraggable ? Ye(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? Ye(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? Ye(document, "touchmove", this._handleFallbackAutoScroll) : Ye(document, "mousemove", this._handleFallbackAutoScroll); }, dragOverCompleted: function(o) { var t = o.originalEvent; !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t); }, drop: function() { this.sortable.nativeDraggable ? qe(document, "dragover", this._handleAutoScroll) : (qe(document, "pointermove", this._handleFallbackAutoScroll), qe(document, "touchmove", this._handleFallbackAutoScroll), qe(document, "mousemove", this._handleFallbackAutoScroll)), mc(), Da(), qv(); }, nulling: function() { ls = rf = Ur = af = Er = yd = Od = null, At.length = 0; }, _handleFallbackAutoScroll: function(o) { this._handleAutoScroll(o, !0); }, _handleAutoScroll: function(o, t) { var l = this, i = (o.touches ? o.touches[0] : o).clientX, s = (o.touches ? o.touches[0] : o).clientY, d = document.elementFromPoint(i, s); if (ls = o, t || this.options.forceAutoScrollFallback || Pi || kn || qr) { vd(o, this.options, d, t); var f = zn(d, !0); af && (!Er || i !== yd || s !== Od) && (Er && mc(), Er = setInterval(function() { var u = zn(document.elementFromPoint(i, s), !0); u !== f && (f = u, Da()), vd(o, l.options, u, t); }, 10), yd = i, Od = s); } else { if (!this.options.bubbleScroll || zn(d, !0) === un()) { Da(); return; } vd(o, this.options, zn(d, !1), !1); } } }, wn(n, { pluginName: "scroll", initializeByDefault: !0 }); } function Da() { At.forEach(function(n) { clearInterval(n.pid); }), At = []; } function mc() { clearInterval(Er); } var vd = eg(function(n, e, o, t) { if (e.scroll) { var l = (n.touches ? n.touches[0] : n).clientX, i = (n.touches ? n.touches[0] : n).clientY, s = e.scrollSensitivity, d = e.scrollSpeed, f = un(), u = !1, c; rf !== o && (rf = o, Da(), Ur = e.scroll, c = e.scrollFn, Ur === !0 && (Ur = zn(o, !0))); var m = 0, g = Ur; do { var y = g, p = Rt(y), v = p.top, O = p.bottom, a = p.left, _ = p.right, S = p.width, I = p.height, $ = void 0, A = void 0, b = y.scrollWidth, P = y.scrollHeight, C = Be(y), w = y.scrollLeft, h = y.scrollTop; y === f ? ($ = S < b && (C.overflowX === "auto" || C.overflowX === "scroll" || C.overflowX === "visible"), A = I < P && (C.overflowY === "auto" || C.overflowY === "scroll" || C.overflowY === "visible")) : ($ = S < b && (C.overflowX === "auto" || C.overflowX === "scroll"), A = I < P && (C.overflowY === "auto" || C.overflowY === "scroll")); var D = $ && (Math.abs(_ - l) <= s && w + S < b) - (Math.abs(a - l) <= s && !!w), L = A && (Math.abs(O - i) <= s && h + I < P) - (Math.abs(v - i) <= s && !!h); if (!At[m]) for (var T = 0; T <= m; T++) At[T] || (At[T] = {}); (At[m].vx != D || At[m].vy != L || At[m].el !== y) && (At[m].el = y, At[m].vx = D, At[m].vy = L, clearInterval(At[m].pid), (D != 0 || L != 0) && (u = !0, At[m].pid = setInterval((function() { t && this.layer === 0 && ke.active._onTouchMove(ls); var Q = At[this.laye