@turquoisehealth/pit-viper 2.104.2-dev.0 → 2.105.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/_site/assets/css/pit-viper-v2-scoped.css +0 -19
- package/_site/assets/css/pit-viper-v2.css +0 -21
- package/_site/assets/css/pit-viper.css +0 -21
- package/_site/assets/js/pit-viper.js +133 -0
- package/package.json +11 -38
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +4 -3
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +1 -1
- package/pv-components/dist/vue/base/components/base/PvTooltipV2/PvTooltipV2.vue.d.ts +0 -1
- package/pv-components/dist/vue/base/components/base/PvTooltipV2/types.d.ts +1 -2
- package/pv-components/dist/vue/base/components/base/index.d.ts +1 -0
- package/pv-components/dist/vue/base/pv-components-base.js +1546 -0
- package/pv-components/dist/vue/base/pv-components-base.mjs +6653 -4387
- package/pv-components/dist/vue/base/pv-components-base.umd.js +1546 -0
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.js +176 -0
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +5920 -3407
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.umd.js +176 -0
- package/pv-components/dist/web/pv-components.iife.js +31 -31
- package/pv-components/dist/stats/vue/base/stats.html +0 -4949
- package/pv-components/dist/stats/vue/visualizations/stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-accordion-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-action-bar-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-avatar-group-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-avatar-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-banner-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-breadcrumbs-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-button-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-card-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-checkbox-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-company-label-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-company-logo-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-company-tag-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-counter-badge-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-date-picker-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-date-time-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-drawer-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-dropdown-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-expandable-content-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-ghost-input-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-icon-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-input-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-insight-card-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-modal-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-pagination-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-pill-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-popover-menu-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-popover-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-popover-v2-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-rating-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-release-badge-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-search-input-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-segmented-control-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-select-button-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-selectable-card-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-side-panel-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-skeleton-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-spinner-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-sprite-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-suggestion-tag-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-switch-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-tab-list-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-tabs-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-tag-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-text-area-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-toast-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-toggle-button-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-toggle-group-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-tooltip-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +0 -4949
- package/pv-components/dist/stats/web/pv-widget-stats.html +0 -4949
- package/pv-components/dist/web/components/pv-accordion/pv-accordion.js +0 -186
- package/pv-components/dist/web/components/pv-action-bar/pv-action-bar.js +0 -66
- package/pv-components/dist/web/components/pv-avatar/pv-avatar.js +0 -96
- package/pv-components/dist/web/components/pv-avatar-group/pv-avatar-group.js +0 -102
- package/pv-components/dist/web/components/pv-banner/pv-banner.js +0 -155
- package/pv-components/dist/web/components/pv-breadcrumbs/pv-breadcrumbs.js +0 -92
- package/pv-components/dist/web/components/pv-button/pv-button.js +0 -173
- package/pv-components/dist/web/components/pv-card/pv-card.js +0 -80
- package/pv-components/dist/web/components/pv-checkbox/pv-checkbox.js +0 -77
- package/pv-components/dist/web/components/pv-company-label/pv-company-label.js +0 -153
- package/pv-components/dist/web/components/pv-company-logo/pv-company-logo.js +0 -124
- package/pv-components/dist/web/components/pv-company-tag/pv-company-tag.js +0 -204
- package/pv-components/dist/web/components/pv-counter-badge/pv-counter-badge.js +0 -89
- package/pv-components/dist/web/components/pv-date-picker/pv-date-picker.js +0 -7481
- package/pv-components/dist/web/components/pv-date-time/pv-date-time.js +0 -577
- package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +0 -486
- package/pv-components/dist/web/components/pv-dropdown/pv-dropdown.js +0 -1724
- package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +0 -235
- package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +0 -251
- package/pv-components/dist/web/components/pv-icon/pv-icon.js +0 -81
- package/pv-components/dist/web/components/pv-input/pv-input.js +0 -123
- package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +0 -293
- package/pv-components/dist/web/components/pv-modal/pv-modal.js +0 -118
- package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +0 -2752
- package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +0 -286
- package/pv-components/dist/web/components/pv-pill/pv-pill.js +0 -160
- package/pv-components/dist/web/components/pv-popover/pv-popover.js +0 -1417
- package/pv-components/dist/web/components/pv-popover-menu/pv-popover-menu.js +0 -1439
- package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +0 -1421
- package/pv-components/dist/web/components/pv-rating/pv-rating.js +0 -78
- package/pv-components/dist/web/components/pv-release-badge/pv-release-badge.js +0 -74
- package/pv-components/dist/web/components/pv-search-input/pv-search-input.js +0 -170
- package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +0 -145
- package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +0 -2563
- package/pv-components/dist/web/components/pv-selectable-card/pv-selectable-card.js +0 -85
- package/pv-components/dist/web/components/pv-side-panel/pv-side-panel.js +0 -80
- package/pv-components/dist/web/components/pv-skeleton/pv-skeleton.js +0 -1525
- package/pv-components/dist/web/components/pv-spinner/pv-spinner.js +0 -83
- package/pv-components/dist/web/components/pv-sprite/pv-sprite.js +0 -82
- package/pv-components/dist/web/components/pv-suggestion-tag/pv-suggestion-tag.js +0 -126
- package/pv-components/dist/web/components/pv-switch/pv-switch.js +0 -94
- package/pv-components/dist/web/components/pv-tab-list/pv-tab-list.js +0 -100
- package/pv-components/dist/web/components/pv-tabs/pv-tabs.js +0 -178
- package/pv-components/dist/web/components/pv-tag/pv-tag.js +0 -141
- package/pv-components/dist/web/components/pv-text-area/pv-text-area.js +0 -120
- package/pv-components/dist/web/components/pv-toast/pv-toast.js +0 -223
- package/pv-components/dist/web/components/pv-toggle-button/pv-toggle-button.js +0 -139
- package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +0 -2887
- package/pv-components/dist/web/components/pv-tooltip/pv-tooltip.js +0 -90
- package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +0 -1489
- package/pv-components/dist/web/components/pv-widget/pv-widget.js +0 -91
- package/pv-components/dist/web/vue.runtime.esm-browser.prod.js +0 -7
|
@@ -1,1417 +0,0 @@
|
|
|
1
|
-
import { onMounted as Lt, nextTick as Dt, getCurrentScope as Wt, onScopeDispose as Gt, getCurrentInstance as Ht, toValue as et, isRef as jt, defineComponent as zt, ref as $t, useTemplateRef as Ut, createElementBlock as ct, openBlock as ft, normalizeStyle as dt, renderSlot as ht, defineCustomElement as qt } from "vue";
|
|
2
|
-
function Vt(t) {
|
|
3
|
-
return Wt() ? (Gt(t), !0) : !1;
|
|
4
|
-
}
|
|
5
|
-
const Kt = typeof window < "u" && typeof document < "u";
|
|
6
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
7
|
-
function Zt(t) {
|
|
8
|
-
return Ht();
|
|
9
|
-
}
|
|
10
|
-
function Qt(t, e = !0, o) {
|
|
11
|
-
Zt() ? Lt(t, o) : e ? t() : Dt(t);
|
|
12
|
-
}
|
|
13
|
-
const Jt = Kt ? window.document : void 0;
|
|
14
|
-
function en(t) {
|
|
15
|
-
var e;
|
|
16
|
-
const o = et(t);
|
|
17
|
-
return (e = o?.$el) != null ? e : o;
|
|
18
|
-
}
|
|
19
|
-
/**!
|
|
20
|
-
* Sortable 1.15.6
|
|
21
|
-
* @author RubaXa <trash@rubaxa.org>
|
|
22
|
-
* @author owenm <owen23355@gmail.com>
|
|
23
|
-
* @license MIT
|
|
24
|
-
*/
|
|
25
|
-
function pt(t, e) {
|
|
26
|
-
var o = Object.keys(t);
|
|
27
|
-
if (Object.getOwnPropertySymbols) {
|
|
28
|
-
var n = Object.getOwnPropertySymbols(t);
|
|
29
|
-
e && (n = n.filter(function(i) {
|
|
30
|
-
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
31
|
-
})), o.push.apply(o, n);
|
|
32
|
-
}
|
|
33
|
-
return o;
|
|
34
|
-
}
|
|
35
|
-
function j(t) {
|
|
36
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
37
|
-
var o = arguments[e] != null ? arguments[e] : {};
|
|
38
|
-
e % 2 ? pt(Object(o), !0).forEach(function(n) {
|
|
39
|
-
tn(t, n, o[n]);
|
|
40
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(o)) : pt(Object(o)).forEach(function(n) {
|
|
41
|
-
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(o, n));
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return t;
|
|
45
|
-
}
|
|
46
|
-
function Me(t) {
|
|
47
|
-
"@babel/helpers - typeof";
|
|
48
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Me = function(e) {
|
|
49
|
-
return typeof e;
|
|
50
|
-
} : Me = function(e) {
|
|
51
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
52
|
-
}, Me(t);
|
|
53
|
-
}
|
|
54
|
-
function tn(t, e, o) {
|
|
55
|
-
return e in t ? Object.defineProperty(t, e, {
|
|
56
|
-
value: o,
|
|
57
|
-
enumerable: !0,
|
|
58
|
-
configurable: !0,
|
|
59
|
-
writable: !0
|
|
60
|
-
}) : t[e] = o, t;
|
|
61
|
-
}
|
|
62
|
-
function q() {
|
|
63
|
-
return q = Object.assign || function(t) {
|
|
64
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
65
|
-
var o = arguments[e];
|
|
66
|
-
for (var n in o)
|
|
67
|
-
Object.prototype.hasOwnProperty.call(o, n) && (t[n] = o[n]);
|
|
68
|
-
}
|
|
69
|
-
return t;
|
|
70
|
-
}, q.apply(this, arguments);
|
|
71
|
-
}
|
|
72
|
-
function nn(t, e) {
|
|
73
|
-
if (t == null) return {};
|
|
74
|
-
var o = {}, n = Object.keys(t), i, r;
|
|
75
|
-
for (r = 0; r < n.length; r++)
|
|
76
|
-
i = n[r], !(e.indexOf(i) >= 0) && (o[i] = t[i]);
|
|
77
|
-
return o;
|
|
78
|
-
}
|
|
79
|
-
function on(t, e) {
|
|
80
|
-
if (t == null) return {};
|
|
81
|
-
var o = nn(t, e), n, i;
|
|
82
|
-
if (Object.getOwnPropertySymbols) {
|
|
83
|
-
var r = Object.getOwnPropertySymbols(t);
|
|
84
|
-
for (i = 0; i < r.length; i++)
|
|
85
|
-
n = r[i], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(t, n) && (o[n] = t[n]);
|
|
86
|
-
}
|
|
87
|
-
return o;
|
|
88
|
-
}
|
|
89
|
-
var rn = "1.15.6";
|
|
90
|
-
function U(t) {
|
|
91
|
-
if (typeof window < "u" && window.navigator)
|
|
92
|
-
return !!/* @__PURE__ */ navigator.userAgent.match(t);
|
|
93
|
-
}
|
|
94
|
-
var V = U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ce = U(/Edge/i), gt = U(/firefox/i), Ee = U(/safari/i) && !U(/chrome/i) && !U(/android/i), rt = U(/iP(ad|od|hone)/i), St = U(/chrome/i) && U(/android/i), Tt = {
|
|
95
|
-
capture: !1,
|
|
96
|
-
passive: !1
|
|
97
|
-
};
|
|
98
|
-
function v(t, e, o) {
|
|
99
|
-
t.addEventListener(e, o, !V && Tt);
|
|
100
|
-
}
|
|
101
|
-
function m(t, e, o) {
|
|
102
|
-
t.removeEventListener(e, o, !V && Tt);
|
|
103
|
-
}
|
|
104
|
-
function Ye(t, e) {
|
|
105
|
-
if (e) {
|
|
106
|
-
if (e[0] === ">" && (e = e.substring(1)), t)
|
|
107
|
-
try {
|
|
108
|
-
if (t.matches)
|
|
109
|
-
return t.matches(e);
|
|
110
|
-
if (t.msMatchesSelector)
|
|
111
|
-
return t.msMatchesSelector(e);
|
|
112
|
-
if (t.webkitMatchesSelector)
|
|
113
|
-
return t.webkitMatchesSelector(e);
|
|
114
|
-
} catch {
|
|
115
|
-
return !1;
|
|
116
|
-
}
|
|
117
|
-
return !1;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
function Ct(t) {
|
|
121
|
-
return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
|
|
122
|
-
}
|
|
123
|
-
function W(t, e, o, n) {
|
|
124
|
-
if (t) {
|
|
125
|
-
o = o || document;
|
|
126
|
-
do {
|
|
127
|
-
if (e != null && (e[0] === ">" ? t.parentNode === o && Ye(t, e) : Ye(t, e)) || n && t === o)
|
|
128
|
-
return t;
|
|
129
|
-
if (t === o) break;
|
|
130
|
-
} while (t = Ct(t));
|
|
131
|
-
}
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
var mt = /\s+/g;
|
|
135
|
-
function R(t, e, o) {
|
|
136
|
-
if (t && e)
|
|
137
|
-
if (t.classList)
|
|
138
|
-
t.classList[o ? "add" : "remove"](e);
|
|
139
|
-
else {
|
|
140
|
-
var n = (" " + t.className + " ").replace(mt, " ").replace(" " + e + " ", " ");
|
|
141
|
-
t.className = (n + (o ? " " + e : "")).replace(mt, " ");
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function h(t, e, o) {
|
|
145
|
-
var n = t && t.style;
|
|
146
|
-
if (n) {
|
|
147
|
-
if (o === void 0)
|
|
148
|
-
return document.defaultView && document.defaultView.getComputedStyle ? o = document.defaultView.getComputedStyle(t, "") : t.currentStyle && (o = t.currentStyle), e === void 0 ? o : o[e];
|
|
149
|
-
!(e in n) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), n[e] = o + (typeof o == "string" ? "" : "px");
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function fe(t, e) {
|
|
153
|
-
var o = "";
|
|
154
|
-
if (typeof t == "string")
|
|
155
|
-
o = t;
|
|
156
|
-
else
|
|
157
|
-
do {
|
|
158
|
-
var n = h(t, "transform");
|
|
159
|
-
n && n !== "none" && (o = n + " " + o);
|
|
160
|
-
} while (!e && (t = t.parentNode));
|
|
161
|
-
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
162
|
-
return i && new i(o);
|
|
163
|
-
}
|
|
164
|
-
function Ot(t, e, o) {
|
|
165
|
-
if (t) {
|
|
166
|
-
var n = t.getElementsByTagName(e), i = 0, r = n.length;
|
|
167
|
-
if (o)
|
|
168
|
-
for (; i < r; i++)
|
|
169
|
-
o(n[i], i);
|
|
170
|
-
return n;
|
|
171
|
-
}
|
|
172
|
-
return [];
|
|
173
|
-
}
|
|
174
|
-
function H() {
|
|
175
|
-
var t = document.scrollingElement;
|
|
176
|
-
return t || document.documentElement;
|
|
177
|
-
}
|
|
178
|
-
function C(t, e, o, n, i) {
|
|
179
|
-
if (!(!t.getBoundingClientRect && t !== window)) {
|
|
180
|
-
var r, a, l, s, u, f, d;
|
|
181
|
-
if (t !== window && t.parentNode && t !== H() ? (r = t.getBoundingClientRect(), a = r.top, l = r.left, s = r.bottom, u = r.right, f = r.height, d = r.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, f = window.innerHeight, d = window.innerWidth), (e || o) && t !== window && (i = i || t.parentNode, !V))
|
|
182
|
-
do
|
|
183
|
-
if (i && i.getBoundingClientRect && (h(i, "transform") !== "none" || o && h(i, "position") !== "static")) {
|
|
184
|
-
var b = i.getBoundingClientRect();
|
|
185
|
-
a -= b.top + parseInt(h(i, "border-top-width")), l -= b.left + parseInt(h(i, "border-left-width")), s = a + r.height, u = l + r.width;
|
|
186
|
-
break;
|
|
187
|
-
}
|
|
188
|
-
while (i = i.parentNode);
|
|
189
|
-
if (n && t !== window) {
|
|
190
|
-
var E = fe(i || t), y = E && E.a, w = E && E.d;
|
|
191
|
-
E && (a /= w, l /= y, d /= y, f /= w, s = a + f, u = l + d);
|
|
192
|
-
}
|
|
193
|
-
return {
|
|
194
|
-
top: a,
|
|
195
|
-
left: l,
|
|
196
|
-
bottom: s,
|
|
197
|
-
right: u,
|
|
198
|
-
width: d,
|
|
199
|
-
height: f
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
function vt(t, e, o) {
|
|
204
|
-
for (var n = ee(t, !0), i = C(t)[e]; n; ) {
|
|
205
|
-
var r = C(n)[o], a = void 0;
|
|
206
|
-
if (a = i >= r, !a) return n;
|
|
207
|
-
if (n === H()) break;
|
|
208
|
-
n = ee(n, !1);
|
|
209
|
-
}
|
|
210
|
-
return !1;
|
|
211
|
-
}
|
|
212
|
-
function de(t, e, o, n) {
|
|
213
|
-
for (var i = 0, r = 0, a = t.children; r < a.length; ) {
|
|
214
|
-
if (a[r].style.display !== "none" && a[r] !== p.ghost && (n || a[r] !== p.dragged) && W(a[r], o.draggable, t, !1)) {
|
|
215
|
-
if (i === e)
|
|
216
|
-
return a[r];
|
|
217
|
-
i++;
|
|
218
|
-
}
|
|
219
|
-
r++;
|
|
220
|
-
}
|
|
221
|
-
return null;
|
|
222
|
-
}
|
|
223
|
-
function at(t, e) {
|
|
224
|
-
for (var o = t.lastElementChild; o && (o === p.ghost || h(o, "display") === "none" || e && !Ye(o, e)); )
|
|
225
|
-
o = o.previousElementSibling;
|
|
226
|
-
return o || null;
|
|
227
|
-
}
|
|
228
|
-
function X(t, e) {
|
|
229
|
-
var o = 0;
|
|
230
|
-
if (!t || !t.parentNode)
|
|
231
|
-
return -1;
|
|
232
|
-
for (; t = t.previousElementSibling; )
|
|
233
|
-
t.nodeName.toUpperCase() !== "TEMPLATE" && t !== p.clone && (!e || Ye(t, e)) && o++;
|
|
234
|
-
return o;
|
|
235
|
-
}
|
|
236
|
-
function bt(t) {
|
|
237
|
-
var e = 0, o = 0, n = H();
|
|
238
|
-
if (t)
|
|
239
|
-
do {
|
|
240
|
-
var i = fe(t), r = i.a, a = i.d;
|
|
241
|
-
e += t.scrollLeft * r, o += t.scrollTop * a;
|
|
242
|
-
} while (t !== n && (t = t.parentNode));
|
|
243
|
-
return [e, o];
|
|
244
|
-
}
|
|
245
|
-
function an(t, e) {
|
|
246
|
-
for (var o in t)
|
|
247
|
-
if (t.hasOwnProperty(o)) {
|
|
248
|
-
for (var n in e)
|
|
249
|
-
if (e.hasOwnProperty(n) && e[n] === t[o][n]) return Number(o);
|
|
250
|
-
}
|
|
251
|
-
return -1;
|
|
252
|
-
}
|
|
253
|
-
function ee(t, e) {
|
|
254
|
-
if (!t || !t.getBoundingClientRect) return H();
|
|
255
|
-
var o = t, n = !1;
|
|
256
|
-
do
|
|
257
|
-
if (o.clientWidth < o.scrollWidth || o.clientHeight < o.scrollHeight) {
|
|
258
|
-
var i = h(o);
|
|
259
|
-
if (o.clientWidth < o.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || o.clientHeight < o.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
260
|
-
if (!o.getBoundingClientRect || o === document.body) return H();
|
|
261
|
-
if (n || e) return o;
|
|
262
|
-
n = !0;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
while (o = o.parentNode);
|
|
266
|
-
return H();
|
|
267
|
-
}
|
|
268
|
-
function ln(t, e) {
|
|
269
|
-
if (t && e)
|
|
270
|
-
for (var o in e)
|
|
271
|
-
e.hasOwnProperty(o) && (t[o] = e[o]);
|
|
272
|
-
return t;
|
|
273
|
-
}
|
|
274
|
-
function je(t, e) {
|
|
275
|
-
return Math.round(t.top) === Math.round(e.top) && Math.round(t.left) === Math.round(e.left) && Math.round(t.height) === Math.round(e.height) && Math.round(t.width) === Math.round(e.width);
|
|
276
|
-
}
|
|
277
|
-
var _e;
|
|
278
|
-
function It(t, e) {
|
|
279
|
-
return function() {
|
|
280
|
-
if (!_e) {
|
|
281
|
-
var o = arguments, n = this;
|
|
282
|
-
o.length === 1 ? t.call(n, o[0]) : t.apply(n, o), _e = setTimeout(function() {
|
|
283
|
-
_e = void 0;
|
|
284
|
-
}, e);
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
function sn() {
|
|
289
|
-
clearTimeout(_e), _e = void 0;
|
|
290
|
-
}
|
|
291
|
-
function Pt(t, e, o) {
|
|
292
|
-
t.scrollLeft += e, t.scrollTop += o;
|
|
293
|
-
}
|
|
294
|
-
function At(t) {
|
|
295
|
-
var e = window.Polymer, o = window.jQuery || window.Zepto;
|
|
296
|
-
return e && e.dom ? e.dom(t).cloneNode(!0) : o ? o(t).clone(!0)[0] : t.cloneNode(!0);
|
|
297
|
-
}
|
|
298
|
-
function Nt(t, e, o) {
|
|
299
|
-
var n = {};
|
|
300
|
-
return Array.from(t.children).forEach(function(i) {
|
|
301
|
-
var r, a, l, s;
|
|
302
|
-
if (!(!W(i, e.draggable, t, !1) || i.animated || i === o)) {
|
|
303
|
-
var u = C(i);
|
|
304
|
-
n.left = Math.min((r = n.left) !== null && r !== void 0 ? r : 1 / 0, u.left), n.top = Math.min((a = n.top) !== null && a !== void 0 ? a : 1 / 0, u.top), n.right = Math.max((l = n.right) !== null && l !== void 0 ? l : -1 / 0, u.right), n.bottom = Math.max((s = n.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);
|
|
305
|
-
}
|
|
306
|
-
}), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
|
|
307
|
-
}
|
|
308
|
-
var x = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
309
|
-
function un() {
|
|
310
|
-
var t = [], e;
|
|
311
|
-
return {
|
|
312
|
-
captureAnimationState: function() {
|
|
313
|
-
if (t = [], !!this.options.animation) {
|
|
314
|
-
var n = [].slice.call(this.el.children);
|
|
315
|
-
n.forEach(function(i) {
|
|
316
|
-
if (!(h(i, "display") === "none" || i === p.ghost)) {
|
|
317
|
-
t.push({
|
|
318
|
-
target: i,
|
|
319
|
-
rect: C(i)
|
|
320
|
-
});
|
|
321
|
-
var r = j({}, t[t.length - 1].rect);
|
|
322
|
-
if (i.thisAnimationDuration) {
|
|
323
|
-
var a = fe(i, !0);
|
|
324
|
-
a && (r.top -= a.f, r.left -= a.e);
|
|
325
|
-
}
|
|
326
|
-
i.fromRect = r;
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
addAnimationState: function(n) {
|
|
332
|
-
t.push(n);
|
|
333
|
-
},
|
|
334
|
-
removeAnimationState: function(n) {
|
|
335
|
-
t.splice(an(t, {
|
|
336
|
-
target: n
|
|
337
|
-
}), 1);
|
|
338
|
-
},
|
|
339
|
-
animateAll: function(n) {
|
|
340
|
-
var i = this;
|
|
341
|
-
if (!this.options.animation) {
|
|
342
|
-
clearTimeout(e), typeof n == "function" && n();
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
var r = !1, a = 0;
|
|
346
|
-
t.forEach(function(l) {
|
|
347
|
-
var s = 0, u = l.target, f = u.fromRect, d = C(u), b = u.prevFromRect, E = u.prevToRect, y = l.rect, w = fe(u, !0);
|
|
348
|
-
w && (d.top -= w.f, d.left -= w.e), u.toRect = d, u.thisAnimationDuration && je(b, d) && !je(f, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
349
|
-
(y.top - d.top) / (y.left - d.left) === (f.top - d.top) / (f.left - d.left) && (s = fn(y, b, E, i.options)), je(d, f) || (u.prevFromRect = f, u.prevToRect = d, s || (s = i.options.animation), i.animate(u, y, d, s)), s && (r = !0, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
350
|
-
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
351
|
-
}, s), u.thisAnimationDuration = s);
|
|
352
|
-
}), clearTimeout(e), r ? e = setTimeout(function() {
|
|
353
|
-
typeof n == "function" && n();
|
|
354
|
-
}, a) : typeof n == "function" && n(), t = [];
|
|
355
|
-
},
|
|
356
|
-
animate: function(n, i, r, a) {
|
|
357
|
-
if (a) {
|
|
358
|
-
h(n, "transition", ""), h(n, "transform", "");
|
|
359
|
-
var l = fe(this.el), s = l && l.a, u = l && l.d, f = (i.left - r.left) / (s || 1), d = (i.top - r.top) / (u || 1);
|
|
360
|
-
n.animatingX = !!f, n.animatingY = !!d, h(n, "transform", "translate3d(" + f + "px," + d + "px,0)"), this.forRepaintDummy = cn(n), h(n, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), h(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
|
|
361
|
-
h(n, "transition", ""), h(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
362
|
-
}, a);
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
function cn(t) {
|
|
368
|
-
return t.offsetWidth;
|
|
369
|
-
}
|
|
370
|
-
function fn(t, e, o, n) {
|
|
371
|
-
return Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) / Math.sqrt(Math.pow(e.top - o.top, 2) + Math.pow(e.left - o.left, 2)) * n.animation;
|
|
372
|
-
}
|
|
373
|
-
var le = [], ze = {
|
|
374
|
-
initializeByDefault: !0
|
|
375
|
-
}, Oe = {
|
|
376
|
-
mount: function(e) {
|
|
377
|
-
for (var o in ze)
|
|
378
|
-
ze.hasOwnProperty(o) && !(o in e) && (e[o] = ze[o]);
|
|
379
|
-
le.forEach(function(n) {
|
|
380
|
-
if (n.pluginName === e.pluginName)
|
|
381
|
-
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
382
|
-
}), le.push(e);
|
|
383
|
-
},
|
|
384
|
-
pluginEvent: function(e, o, n) {
|
|
385
|
-
var i = this;
|
|
386
|
-
this.eventCanceled = !1, n.cancel = function() {
|
|
387
|
-
i.eventCanceled = !0;
|
|
388
|
-
};
|
|
389
|
-
var r = e + "Global";
|
|
390
|
-
le.forEach(function(a) {
|
|
391
|
-
o[a.pluginName] && (o[a.pluginName][r] && o[a.pluginName][r](j({
|
|
392
|
-
sortable: o
|
|
393
|
-
}, n)), o.options[a.pluginName] && o[a.pluginName][e] && o[a.pluginName][e](j({
|
|
394
|
-
sortable: o
|
|
395
|
-
}, n)));
|
|
396
|
-
});
|
|
397
|
-
},
|
|
398
|
-
initializePlugins: function(e, o, n, i) {
|
|
399
|
-
le.forEach(function(l) {
|
|
400
|
-
var s = l.pluginName;
|
|
401
|
-
if (!(!e.options[s] && !l.initializeByDefault)) {
|
|
402
|
-
var u = new l(e, o, e.options);
|
|
403
|
-
u.sortable = e, u.options = e.options, e[s] = u, q(n, u.defaults);
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
for (var r in e.options)
|
|
407
|
-
if (e.options.hasOwnProperty(r)) {
|
|
408
|
-
var a = this.modifyOption(e, r, e.options[r]);
|
|
409
|
-
typeof a < "u" && (e.options[r] = a);
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
getEventProperties: function(e, o) {
|
|
413
|
-
var n = {};
|
|
414
|
-
return le.forEach(function(i) {
|
|
415
|
-
typeof i.eventProperties == "function" && q(n, i.eventProperties.call(o[i.pluginName], e));
|
|
416
|
-
}), n;
|
|
417
|
-
},
|
|
418
|
-
modifyOption: function(e, o, n) {
|
|
419
|
-
var i;
|
|
420
|
-
return le.forEach(function(r) {
|
|
421
|
-
e[r.pluginName] && r.optionListeners && typeof r.optionListeners[o] == "function" && (i = r.optionListeners[o].call(e[r.pluginName], n));
|
|
422
|
-
}), i;
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
function dn(t) {
|
|
426
|
-
var e = t.sortable, o = t.rootEl, n = t.name, i = t.targetEl, r = t.cloneEl, a = t.toEl, l = t.fromEl, s = t.oldIndex, u = t.newIndex, f = t.oldDraggableIndex, d = t.newDraggableIndex, b = t.originalEvent, E = t.putSortable, y = t.extraEventProperties;
|
|
427
|
-
if (e = e || o && o[x], !!e) {
|
|
428
|
-
var w, Y = e.options, z = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
429
|
-
window.CustomEvent && !V && !Ce ? w = new CustomEvent(n, {
|
|
430
|
-
bubbles: !0,
|
|
431
|
-
cancelable: !0
|
|
432
|
-
}) : (w = document.createEvent("Event"), w.initEvent(n, !0, !0)), w.to = a || o, w.from = l || o, w.item = i || o, w.clone = r, w.oldIndex = s, w.newIndex = u, w.oldDraggableIndex = f, w.newDraggableIndex = d, w.originalEvent = b, w.pullMode = E ? E.lastPutMode : void 0;
|
|
433
|
-
var P = j(j({}, y), Oe.getEventProperties(n, e));
|
|
434
|
-
for (var B in P)
|
|
435
|
-
w[B] = P[B];
|
|
436
|
-
o && o.dispatchEvent(w), Y[z] && Y[z].call(e, w);
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
var hn = ["evt"], N = function(e, o) {
|
|
440
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = n.evt, r = on(n, hn);
|
|
441
|
-
Oe.pluginEvent.bind(p)(e, o, j({
|
|
442
|
-
dragEl: c,
|
|
443
|
-
parentEl: S,
|
|
444
|
-
ghostEl: g,
|
|
445
|
-
rootEl: _,
|
|
446
|
-
nextEl: ae,
|
|
447
|
-
lastDownEl: Fe,
|
|
448
|
-
cloneEl: D,
|
|
449
|
-
cloneHidden: J,
|
|
450
|
-
dragStarted: be,
|
|
451
|
-
putSortable: O,
|
|
452
|
-
activeSortable: p.active,
|
|
453
|
-
originalEvent: i,
|
|
454
|
-
oldIndex: ce,
|
|
455
|
-
oldDraggableIndex: De,
|
|
456
|
-
newIndex: k,
|
|
457
|
-
newDraggableIndex: Q,
|
|
458
|
-
hideGhostForTarget: Rt,
|
|
459
|
-
unhideGhostForTarget: kt,
|
|
460
|
-
cloneNowHidden: function() {
|
|
461
|
-
J = !0;
|
|
462
|
-
},
|
|
463
|
-
cloneNowShown: function() {
|
|
464
|
-
J = !1;
|
|
465
|
-
},
|
|
466
|
-
dispatchSortableEvent: function(l) {
|
|
467
|
-
A({
|
|
468
|
-
sortable: o,
|
|
469
|
-
name: l,
|
|
470
|
-
originalEvent: i
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
}, r));
|
|
474
|
-
};
|
|
475
|
-
function A(t) {
|
|
476
|
-
dn(j({
|
|
477
|
-
putSortable: O,
|
|
478
|
-
cloneEl: D,
|
|
479
|
-
targetEl: c,
|
|
480
|
-
rootEl: _,
|
|
481
|
-
oldIndex: ce,
|
|
482
|
-
oldDraggableIndex: De,
|
|
483
|
-
newIndex: k,
|
|
484
|
-
newDraggableIndex: Q
|
|
485
|
-
}, t));
|
|
486
|
-
}
|
|
487
|
-
var c, S, g, _, ae, Fe, D, J, ce, k, De, Q, Pe, O, ue = !1, Be = !1, Le = [], ie, L, $e, Ue, yt, wt, be, se, Se, Te = !1, Ae = !1, Re, I, qe = [], tt = !1, We = [], He = typeof document < "u", Ne = rt, Et = Ce || V ? "cssFloat" : "float", pn = He && !St && !rt && "draggable" in document.createElement("div"), xt = (function() {
|
|
488
|
-
if (He) {
|
|
489
|
-
if (V)
|
|
490
|
-
return !1;
|
|
491
|
-
var t = document.createElement("x");
|
|
492
|
-
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
|
|
493
|
-
}
|
|
494
|
-
})(), Mt = function(e, o) {
|
|
495
|
-
var n = h(e), i = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), r = de(e, 0, o), a = de(e, 1, o), l = r && h(r), s = a && h(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + C(r).width, f = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + C(a).width;
|
|
496
|
-
if (n.display === "flex")
|
|
497
|
-
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
498
|
-
if (n.display === "grid")
|
|
499
|
-
return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
500
|
-
if (r && l.float && l.float !== "none") {
|
|
501
|
-
var d = l.float === "left" ? "left" : "right";
|
|
502
|
-
return a && (s.clear === "both" || s.clear === d) ? "vertical" : "horizontal";
|
|
503
|
-
}
|
|
504
|
-
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= i && n[Et] === "none" || a && n[Et] === "none" && u + f > i) ? "vertical" : "horizontal";
|
|
505
|
-
}, gn = function(e, o, n) {
|
|
506
|
-
var i = n ? e.left : e.top, r = n ? e.right : e.bottom, a = n ? e.width : e.height, l = n ? o.left : o.top, s = n ? o.right : o.bottom, u = n ? o.width : o.height;
|
|
507
|
-
return i === l || r === s || i + a / 2 === l + u / 2;
|
|
508
|
-
}, mn = function(e, o) {
|
|
509
|
-
var n;
|
|
510
|
-
return Le.some(function(i) {
|
|
511
|
-
var r = i[x].options.emptyInsertThreshold;
|
|
512
|
-
if (!(!r || at(i))) {
|
|
513
|
-
var a = C(i), l = e >= a.left - r && e <= a.right + r, s = o >= a.top - r && o <= a.bottom + r;
|
|
514
|
-
if (l && s)
|
|
515
|
-
return n = i;
|
|
516
|
-
}
|
|
517
|
-
}), n;
|
|
518
|
-
}, Ft = function(e) {
|
|
519
|
-
function o(r, a) {
|
|
520
|
-
return function(l, s, u, f) {
|
|
521
|
-
var d = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
522
|
-
if (r == null && (a || d))
|
|
523
|
-
return !0;
|
|
524
|
-
if (r == null || r === !1)
|
|
525
|
-
return !1;
|
|
526
|
-
if (a && r === "clone")
|
|
527
|
-
return r;
|
|
528
|
-
if (typeof r == "function")
|
|
529
|
-
return o(r(l, s, u, f), a)(l, s, u, f);
|
|
530
|
-
var b = (a ? l : s).options.group.name;
|
|
531
|
-
return r === !0 || typeof r == "string" && r === b || r.join && r.indexOf(b) > -1;
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
var n = {}, i = e.group;
|
|
535
|
-
(!i || Me(i) != "object") && (i = {
|
|
536
|
-
name: i
|
|
537
|
-
}), n.name = i.name, n.checkPull = o(i.pull, !0), n.checkPut = o(i.put), n.revertClone = i.revertClone, e.group = n;
|
|
538
|
-
}, Rt = function() {
|
|
539
|
-
!xt && g && h(g, "display", "none");
|
|
540
|
-
}, kt = function() {
|
|
541
|
-
!xt && g && h(g, "display", "");
|
|
542
|
-
};
|
|
543
|
-
He && !St && document.addEventListener("click", function(t) {
|
|
544
|
-
if (Be)
|
|
545
|
-
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), Be = !1, !1;
|
|
546
|
-
}, !0);
|
|
547
|
-
var re = function(e) {
|
|
548
|
-
if (c) {
|
|
549
|
-
e = e.touches ? e.touches[0] : e;
|
|
550
|
-
var o = mn(e.clientX, e.clientY);
|
|
551
|
-
if (o) {
|
|
552
|
-
var n = {};
|
|
553
|
-
for (var i in e)
|
|
554
|
-
e.hasOwnProperty(i) && (n[i] = e[i]);
|
|
555
|
-
n.target = n.rootEl = o, n.preventDefault = void 0, n.stopPropagation = void 0, o[x]._onDragOver(n);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
}, vn = function(e) {
|
|
559
|
-
c && c.parentNode[x]._isOutsideThisEl(e.target);
|
|
560
|
-
};
|
|
561
|
-
function p(t, e) {
|
|
562
|
-
if (!(t && t.nodeType && t.nodeType === 1))
|
|
563
|
-
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
|
|
564
|
-
this.el = t, this.options = e = q({}, e), t[x] = this;
|
|
565
|
-
var o = {
|
|
566
|
-
group: null,
|
|
567
|
-
sort: !0,
|
|
568
|
-
disabled: !1,
|
|
569
|
-
store: null,
|
|
570
|
-
handle: null,
|
|
571
|
-
draggable: /^[uo]l$/i.test(t.nodeName) ? ">li" : ">*",
|
|
572
|
-
swapThreshold: 1,
|
|
573
|
-
// percentage; 0 <= x <= 1
|
|
574
|
-
invertSwap: !1,
|
|
575
|
-
// invert always
|
|
576
|
-
invertedSwapThreshold: null,
|
|
577
|
-
// will be set to same as swapThreshold if default
|
|
578
|
-
removeCloneOnHide: !0,
|
|
579
|
-
direction: function() {
|
|
580
|
-
return Mt(t, this.options);
|
|
581
|
-
},
|
|
582
|
-
ghostClass: "sortable-ghost",
|
|
583
|
-
chosenClass: "sortable-chosen",
|
|
584
|
-
dragClass: "sortable-drag",
|
|
585
|
-
ignore: "a, img",
|
|
586
|
-
filter: null,
|
|
587
|
-
preventOnFilter: !0,
|
|
588
|
-
animation: 0,
|
|
589
|
-
easing: null,
|
|
590
|
-
setData: function(a, l) {
|
|
591
|
-
a.setData("Text", l.textContent);
|
|
592
|
-
},
|
|
593
|
-
dropBubble: !1,
|
|
594
|
-
dragoverBubble: !1,
|
|
595
|
-
dataIdAttr: "data-id",
|
|
596
|
-
delay: 0,
|
|
597
|
-
delayOnTouchOnly: !1,
|
|
598
|
-
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
599
|
-
forceFallback: !1,
|
|
600
|
-
fallbackClass: "sortable-fallback",
|
|
601
|
-
fallbackOnBody: !1,
|
|
602
|
-
fallbackTolerance: 0,
|
|
603
|
-
fallbackOffset: {
|
|
604
|
-
x: 0,
|
|
605
|
-
y: 0
|
|
606
|
-
},
|
|
607
|
-
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
608
|
-
supportPointer: p.supportPointer !== !1 && "PointerEvent" in window && (!Ee || rt),
|
|
609
|
-
emptyInsertThreshold: 5
|
|
610
|
-
};
|
|
611
|
-
Oe.initializePlugins(this, t, o);
|
|
612
|
-
for (var n in o)
|
|
613
|
-
!(n in e) && (e[n] = o[n]);
|
|
614
|
-
Ft(e);
|
|
615
|
-
for (var i in this)
|
|
616
|
-
i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
617
|
-
this.nativeDraggable = e.forceFallback ? !1 : pn, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? v(t, "pointerdown", this._onTapStart) : (v(t, "mousedown", this._onTapStart), v(t, "touchstart", this._onTapStart)), this.nativeDraggable && (v(t, "dragover", this), v(t, "dragenter", this)), Le.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), q(this, un());
|
|
618
|
-
}
|
|
619
|
-
p.prototype = /** @lends Sortable.prototype */
|
|
620
|
-
{
|
|
621
|
-
constructor: p,
|
|
622
|
-
_isOutsideThisEl: function(e) {
|
|
623
|
-
!this.el.contains(e) && e !== this.el && (se = null);
|
|
624
|
-
},
|
|
625
|
-
_getDirection: function(e, o) {
|
|
626
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, o, c) : this.options.direction;
|
|
627
|
-
},
|
|
628
|
-
_onTapStart: function(e) {
|
|
629
|
-
if (e.cancelable) {
|
|
630
|
-
var o = this, n = this.el, i = this.options, r = i.preventOnFilter, a = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (l || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, f = i.filter;
|
|
631
|
-
if (Tn(n), !c && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || i.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Ee && s && s.tagName.toUpperCase() === "SELECT") && (s = W(s, i.draggable, n, !1), !(s && s.animated) && Fe !== s)) {
|
|
632
|
-
if (ce = X(s), De = X(s, i.draggable), typeof f == "function") {
|
|
633
|
-
if (f.call(this, e, s, this)) {
|
|
634
|
-
A({
|
|
635
|
-
sortable: o,
|
|
636
|
-
rootEl: u,
|
|
637
|
-
name: "filter",
|
|
638
|
-
targetEl: s,
|
|
639
|
-
toEl: n,
|
|
640
|
-
fromEl: n
|
|
641
|
-
}), N("filter", o, {
|
|
642
|
-
evt: e
|
|
643
|
-
}), r && e.preventDefault();
|
|
644
|
-
return;
|
|
645
|
-
}
|
|
646
|
-
} else if (f && (f = f.split(",").some(function(d) {
|
|
647
|
-
if (d = W(u, d.trim(), n, !1), d)
|
|
648
|
-
return A({
|
|
649
|
-
sortable: o,
|
|
650
|
-
rootEl: d,
|
|
651
|
-
name: "filter",
|
|
652
|
-
targetEl: s,
|
|
653
|
-
fromEl: n,
|
|
654
|
-
toEl: n
|
|
655
|
-
}), N("filter", o, {
|
|
656
|
-
evt: e
|
|
657
|
-
}), !0;
|
|
658
|
-
}), f)) {
|
|
659
|
-
r && e.preventDefault();
|
|
660
|
-
return;
|
|
661
|
-
}
|
|
662
|
-
i.handle && !W(u, i.handle, n, !1) || this._prepareDragStart(e, l, s);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
},
|
|
666
|
-
_prepareDragStart: function(e, o, n) {
|
|
667
|
-
var i = this, r = i.el, a = i.options, l = r.ownerDocument, s;
|
|
668
|
-
if (n && !c && n.parentNode === r) {
|
|
669
|
-
var u = C(n);
|
|
670
|
-
if (_ = r, c = n, S = c.parentNode, ae = c.nextSibling, Fe = n, Pe = a.group, p.dragged = c, ie = {
|
|
671
|
-
target: c,
|
|
672
|
-
clientX: (o || e).clientX,
|
|
673
|
-
clientY: (o || e).clientY
|
|
674
|
-
}, yt = ie.clientX - u.left, wt = ie.clientY - u.top, this._lastX = (o || e).clientX, this._lastY = (o || e).clientY, c.style["will-change"] = "all", s = function() {
|
|
675
|
-
if (N("delayEnded", i, {
|
|
676
|
-
evt: e
|
|
677
|
-
}), p.eventCanceled) {
|
|
678
|
-
i._onDrop();
|
|
679
|
-
return;
|
|
680
|
-
}
|
|
681
|
-
i._disableDelayedDragEvents(), !gt && i.nativeDraggable && (c.draggable = !0), i._triggerDragStart(e, o), A({
|
|
682
|
-
sortable: i,
|
|
683
|
-
name: "choose",
|
|
684
|
-
originalEvent: e
|
|
685
|
-
}), R(c, a.chosenClass, !0);
|
|
686
|
-
}, a.ignore.split(",").forEach(function(f) {
|
|
687
|
-
Ot(c, f.trim(), Ve);
|
|
688
|
-
}), v(l, "dragover", re), v(l, "mousemove", re), v(l, "touchmove", re), a.supportPointer ? (v(l, "pointerup", i._onDrop), !this.nativeDraggable && v(l, "pointercancel", i._onDrop)) : (v(l, "mouseup", i._onDrop), v(l, "touchend", i._onDrop), v(l, "touchcancel", i._onDrop)), gt && this.nativeDraggable && (this.options.touchStartThreshold = 4, c.draggable = !0), N("delayStart", this, {
|
|
689
|
-
evt: e
|
|
690
|
-
}), a.delay && (!a.delayOnTouchOnly || o) && (!this.nativeDraggable || !(Ce || V))) {
|
|
691
|
-
if (p.eventCanceled) {
|
|
692
|
-
this._onDrop();
|
|
693
|
-
return;
|
|
694
|
-
}
|
|
695
|
-
a.supportPointer ? (v(l, "pointerup", i._disableDelayedDrag), v(l, "pointercancel", i._disableDelayedDrag)) : (v(l, "mouseup", i._disableDelayedDrag), v(l, "touchend", i._disableDelayedDrag), v(l, "touchcancel", i._disableDelayedDrag)), v(l, "mousemove", i._delayedDragTouchMoveHandler), v(l, "touchmove", i._delayedDragTouchMoveHandler), a.supportPointer && v(l, "pointermove", i._delayedDragTouchMoveHandler), i._dragStartTimer = setTimeout(s, a.delay);
|
|
696
|
-
} else
|
|
697
|
-
s();
|
|
698
|
-
}
|
|
699
|
-
},
|
|
700
|
-
_delayedDragTouchMoveHandler: function(e) {
|
|
701
|
-
var o = e.touches ? e.touches[0] : e;
|
|
702
|
-
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();
|
|
703
|
-
},
|
|
704
|
-
_disableDelayedDrag: function() {
|
|
705
|
-
c && Ve(c), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
706
|
-
},
|
|
707
|
-
_disableDelayedDragEvents: function() {
|
|
708
|
-
var e = this.el.ownerDocument;
|
|
709
|
-
m(e, "mouseup", this._disableDelayedDrag), m(e, "touchend", this._disableDelayedDrag), m(e, "touchcancel", this._disableDelayedDrag), m(e, "pointerup", this._disableDelayedDrag), m(e, "pointercancel", this._disableDelayedDrag), m(e, "mousemove", this._delayedDragTouchMoveHandler), m(e, "touchmove", this._delayedDragTouchMoveHandler), m(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
710
|
-
},
|
|
711
|
-
_triggerDragStart: function(e, o) {
|
|
712
|
-
o = o || e.pointerType == "touch" && e, !this.nativeDraggable || o ? this.options.supportPointer ? v(document, "pointermove", this._onTouchMove) : o ? v(document, "touchmove", this._onTouchMove) : v(document, "mousemove", this._onTouchMove) : (v(c, "dragend", this), v(_, "dragstart", this._onDragStart));
|
|
713
|
-
try {
|
|
714
|
-
document.selection ? ke(function() {
|
|
715
|
-
document.selection.empty();
|
|
716
|
-
}) : window.getSelection().removeAllRanges();
|
|
717
|
-
} catch {
|
|
718
|
-
}
|
|
719
|
-
},
|
|
720
|
-
_dragStarted: function(e, o) {
|
|
721
|
-
if (ue = !1, _ && c) {
|
|
722
|
-
N("dragStarted", this, {
|
|
723
|
-
evt: o
|
|
724
|
-
}), this.nativeDraggable && v(document, "dragover", vn);
|
|
725
|
-
var n = this.options;
|
|
726
|
-
!e && R(c, n.dragClass, !1), R(c, n.ghostClass, !0), p.active = this, e && this._appendGhost(), A({
|
|
727
|
-
sortable: this,
|
|
728
|
-
name: "start",
|
|
729
|
-
originalEvent: o
|
|
730
|
-
});
|
|
731
|
-
} else
|
|
732
|
-
this._nulling();
|
|
733
|
-
},
|
|
734
|
-
_emulateDragOver: function() {
|
|
735
|
-
if (L) {
|
|
736
|
-
this._lastX = L.clientX, this._lastY = L.clientY, Rt();
|
|
737
|
-
for (var e = document.elementFromPoint(L.clientX, L.clientY), o = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(L.clientX, L.clientY), e !== o); )
|
|
738
|
-
o = e;
|
|
739
|
-
if (c.parentNode[x]._isOutsideThisEl(e), o)
|
|
740
|
-
do {
|
|
741
|
-
if (o[x]) {
|
|
742
|
-
var n = void 0;
|
|
743
|
-
if (n = o[x]._onDragOver({
|
|
744
|
-
clientX: L.clientX,
|
|
745
|
-
clientY: L.clientY,
|
|
746
|
-
target: e,
|
|
747
|
-
rootEl: o
|
|
748
|
-
}), n && !this.options.dragoverBubble)
|
|
749
|
-
break;
|
|
750
|
-
}
|
|
751
|
-
e = o;
|
|
752
|
-
} while (o = Ct(o));
|
|
753
|
-
kt();
|
|
754
|
-
}
|
|
755
|
-
},
|
|
756
|
-
_onTouchMove: function(e) {
|
|
757
|
-
if (ie) {
|
|
758
|
-
var o = this.options, n = o.fallbackTolerance, i = o.fallbackOffset, r = e.touches ? e.touches[0] : e, a = g && fe(g, !0), l = g && a && a.a, s = g && a && a.d, u = Ne && I && bt(I), f = (r.clientX - ie.clientX + i.x) / (l || 1) + (u ? u[0] - qe[0] : 0) / (l || 1), d = (r.clientY - ie.clientY + i.y) / (s || 1) + (u ? u[1] - qe[1] : 0) / (s || 1);
|
|
759
|
-
if (!p.active && !ue) {
|
|
760
|
-
if (n && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < n)
|
|
761
|
-
return;
|
|
762
|
-
this._onDragStart(e, !0);
|
|
763
|
-
}
|
|
764
|
-
if (g) {
|
|
765
|
-
a ? (a.e += f - ($e || 0), a.f += d - (Ue || 0)) : a = {
|
|
766
|
-
a: 1,
|
|
767
|
-
b: 0,
|
|
768
|
-
c: 0,
|
|
769
|
-
d: 1,
|
|
770
|
-
e: f,
|
|
771
|
-
f: d
|
|
772
|
-
};
|
|
773
|
-
var b = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
774
|
-
h(g, "webkitTransform", b), h(g, "mozTransform", b), h(g, "msTransform", b), h(g, "transform", b), $e = f, Ue = d, L = r;
|
|
775
|
-
}
|
|
776
|
-
e.cancelable && e.preventDefault();
|
|
777
|
-
}
|
|
778
|
-
},
|
|
779
|
-
_appendGhost: function() {
|
|
780
|
-
if (!g) {
|
|
781
|
-
var e = this.options.fallbackOnBody ? document.body : _, o = C(c, !0, Ne, !0, e), n = this.options;
|
|
782
|
-
if (Ne) {
|
|
783
|
-
for (I = e; h(I, "position") === "static" && h(I, "transform") === "none" && I !== document; )
|
|
784
|
-
I = I.parentNode;
|
|
785
|
-
I !== document.body && I !== document.documentElement ? (I === document && (I = H()), o.top += I.scrollTop, o.left += I.scrollLeft) : I = H(), qe = bt(I);
|
|
786
|
-
}
|
|
787
|
-
g = c.cloneNode(!0), R(g, n.ghostClass, !1), R(g, n.fallbackClass, !0), R(g, n.dragClass, !0), h(g, "transition", ""), h(g, "transform", ""), h(g, "box-sizing", "border-box"), h(g, "margin", 0), h(g, "top", o.top), h(g, "left", o.left), h(g, "width", o.width), h(g, "height", o.height), h(g, "opacity", "0.8"), h(g, "position", Ne ? "absolute" : "fixed"), h(g, "zIndex", "100000"), h(g, "pointerEvents", "none"), p.ghost = g, e.appendChild(g), h(g, "transform-origin", yt / parseInt(g.style.width) * 100 + "% " + wt / parseInt(g.style.height) * 100 + "%");
|
|
788
|
-
}
|
|
789
|
-
},
|
|
790
|
-
_onDragStart: function(e, o) {
|
|
791
|
-
var n = this, i = e.dataTransfer, r = n.options;
|
|
792
|
-
if (N("dragStart", this, {
|
|
793
|
-
evt: e
|
|
794
|
-
}), p.eventCanceled) {
|
|
795
|
-
this._onDrop();
|
|
796
|
-
return;
|
|
797
|
-
}
|
|
798
|
-
N("setupClone", this), p.eventCanceled || (D = At(c), D.removeAttribute("id"), D.draggable = !1, D.style["will-change"] = "", this._hideClone(), R(D, this.options.chosenClass, !1), p.clone = D), n.cloneId = ke(function() {
|
|
799
|
-
N("clone", n), !p.eventCanceled && (n.options.removeCloneOnHide || _.insertBefore(D, c), n._hideClone(), A({
|
|
800
|
-
sortable: n,
|
|
801
|
-
name: "clone"
|
|
802
|
-
}));
|
|
803
|
-
}), !o && R(c, r.dragClass, !0), o ? (Be = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (m(document, "mouseup", n._onDrop), m(document, "touchend", n._onDrop), m(document, "touchcancel", n._onDrop), i && (i.effectAllowed = "move", r.setData && r.setData.call(n, i, c)), v(document, "drop", n), h(c, "transform", "translateZ(0)")), ue = !0, n._dragStartId = ke(n._dragStarted.bind(n, o, e)), v(document, "selectstart", n), be = !0, window.getSelection().removeAllRanges(), Ee && h(document.body, "user-select", "none");
|
|
804
|
-
},
|
|
805
|
-
// Returns true - if no further action is needed (either inserted or another condition)
|
|
806
|
-
_onDragOver: function(e) {
|
|
807
|
-
var o = this.el, n = e.target, i, r, a, l = this.options, s = l.group, u = p.active, f = Pe === s, d = l.sort, b = O || u, E, y = this, w = !1;
|
|
808
|
-
if (tt) return;
|
|
809
|
-
function Y(ve, Yt) {
|
|
810
|
-
N(ve, y, j({
|
|
811
|
-
evt: e,
|
|
812
|
-
isOwner: f,
|
|
813
|
-
axis: E ? "vertical" : "horizontal",
|
|
814
|
-
revert: a,
|
|
815
|
-
dragRect: i,
|
|
816
|
-
targetRect: r,
|
|
817
|
-
canSort: d,
|
|
818
|
-
fromSortable: b,
|
|
819
|
-
target: n,
|
|
820
|
-
completed: P,
|
|
821
|
-
onMove: function(ut, Bt) {
|
|
822
|
-
return xe(_, o, c, i, ut, C(ut), e, Bt);
|
|
823
|
-
},
|
|
824
|
-
changed: B
|
|
825
|
-
}, Yt));
|
|
826
|
-
}
|
|
827
|
-
function z() {
|
|
828
|
-
Y("dragOverAnimationCapture"), y.captureAnimationState(), y !== b && b.captureAnimationState();
|
|
829
|
-
}
|
|
830
|
-
function P(ve) {
|
|
831
|
-
return Y("dragOverCompleted", {
|
|
832
|
-
insertion: ve
|
|
833
|
-
}), ve && (f ? u._hideClone() : u._showClone(y), y !== b && (R(c, O ? O.options.ghostClass : u.options.ghostClass, !1), R(c, l.ghostClass, !0)), O !== y && y !== p.active ? O = y : y === p.active && O && (O = null), b === y && (y._ignoreWhileAnimating = n), y.animateAll(function() {
|
|
834
|
-
Y("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
|
|
835
|
-
}), y !== b && (b.animateAll(), b._ignoreWhileAnimating = null)), (n === c && !c.animated || n === o && !n.animated) && (se = null), !l.dragoverBubble && !e.rootEl && n !== document && (c.parentNode[x]._isOutsideThisEl(e.target), !ve && re(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), w = !0;
|
|
836
|
-
}
|
|
837
|
-
function B() {
|
|
838
|
-
k = X(c), Q = X(c, l.draggable), A({
|
|
839
|
-
sortable: y,
|
|
840
|
-
name: "change",
|
|
841
|
-
toEl: o,
|
|
842
|
-
newIndex: k,
|
|
843
|
-
newDraggableIndex: Q,
|
|
844
|
-
originalEvent: e
|
|
845
|
-
});
|
|
846
|
-
}
|
|
847
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = W(n, l.draggable, o, !0), Y("dragOver"), p.eventCanceled) return w;
|
|
848
|
-
if (c.contains(e.target) || n.animated && n.animatingX && n.animatingY || y._ignoreWhileAnimating === n)
|
|
849
|
-
return P(!1);
|
|
850
|
-
if (Be = !1, u && !l.disabled && (f ? d || (a = S !== _) : O === this || (this.lastPutMode = Pe.checkPull(this, u, c, e)) && s.checkPut(this, u, c, e))) {
|
|
851
|
-
if (E = this._getDirection(e, n) === "vertical", i = C(c), Y("dragOverValid"), p.eventCanceled) return w;
|
|
852
|
-
if (a)
|
|
853
|
-
return S = _, z(), this._hideClone(), Y("revert"), p.eventCanceled || (ae ? _.insertBefore(c, ae) : _.appendChild(c)), P(!0);
|
|
854
|
-
var M = at(o, l.draggable);
|
|
855
|
-
if (!M || En(e, E, this) && !M.animated) {
|
|
856
|
-
if (M === c)
|
|
857
|
-
return P(!1);
|
|
858
|
-
if (M && o === e.target && (n = M), n && (r = C(n)), xe(_, o, c, i, n, r, e, !!n) !== !1)
|
|
859
|
-
return z(), M && M.nextSibling ? o.insertBefore(c, M.nextSibling) : o.appendChild(c), S = o, B(), P(!0);
|
|
860
|
-
} else if (M && wn(e, E, this)) {
|
|
861
|
-
var te = de(o, 0, l, !0);
|
|
862
|
-
if (te === c)
|
|
863
|
-
return P(!1);
|
|
864
|
-
if (n = te, r = C(n), xe(_, o, c, i, n, r, e, !1) !== !1)
|
|
865
|
-
return z(), o.insertBefore(c, te), S = o, B(), P(!0);
|
|
866
|
-
} else if (n.parentNode === o) {
|
|
867
|
-
r = C(n);
|
|
868
|
-
var G = 0, ne, he = c.parentNode !== o, F = !gn(c.animated && c.toRect || i, n.animated && n.toRect || r, E), pe = E ? "top" : "left", K = vt(n, "top", "top") || vt(c, "top", "top"), ge = K ? K.scrollTop : void 0;
|
|
869
|
-
se !== n && (ne = r[pe], Te = !1, Ae = !F && l.invertSwap || he), G = _n(e, n, r, E, F ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Ae, se === n);
|
|
870
|
-
var $;
|
|
871
|
-
if (G !== 0) {
|
|
872
|
-
var oe = X(c);
|
|
873
|
-
do
|
|
874
|
-
oe -= G, $ = S.children[oe];
|
|
875
|
-
while ($ && (h($, "display") === "none" || $ === g));
|
|
876
|
-
}
|
|
877
|
-
if (G === 0 || $ === n)
|
|
878
|
-
return P(!1);
|
|
879
|
-
se = n, Se = G;
|
|
880
|
-
var me = n.nextElementSibling, Z = !1;
|
|
881
|
-
Z = G === 1;
|
|
882
|
-
var Ie = xe(_, o, c, i, n, r, e, Z);
|
|
883
|
-
if (Ie !== !1)
|
|
884
|
-
return (Ie === 1 || Ie === -1) && (Z = Ie === 1), tt = !0, setTimeout(yn, 30), z(), Z && !me ? o.appendChild(c) : n.parentNode.insertBefore(c, Z ? me : n), K && Pt(K, 0, ge - K.scrollTop), S = c.parentNode, ne !== void 0 && !Ae && (Re = Math.abs(ne - C(n)[pe])), B(), P(!0);
|
|
885
|
-
}
|
|
886
|
-
if (o.contains(c))
|
|
887
|
-
return P(!1);
|
|
888
|
-
}
|
|
889
|
-
return !1;
|
|
890
|
-
},
|
|
891
|
-
_ignoreWhileAnimating: null,
|
|
892
|
-
_offMoveEvents: function() {
|
|
893
|
-
m(document, "mousemove", this._onTouchMove), m(document, "touchmove", this._onTouchMove), m(document, "pointermove", this._onTouchMove), m(document, "dragover", re), m(document, "mousemove", re), m(document, "touchmove", re);
|
|
894
|
-
},
|
|
895
|
-
_offUpEvents: function() {
|
|
896
|
-
var e = this.el.ownerDocument;
|
|
897
|
-
m(e, "mouseup", this._onDrop), m(e, "touchend", this._onDrop), m(e, "pointerup", this._onDrop), m(e, "pointercancel", this._onDrop), m(e, "touchcancel", this._onDrop), m(document, "selectstart", this);
|
|
898
|
-
},
|
|
899
|
-
_onDrop: function(e) {
|
|
900
|
-
var o = this.el, n = this.options;
|
|
901
|
-
if (k = X(c), Q = X(c, n.draggable), N("drop", this, {
|
|
902
|
-
evt: e
|
|
903
|
-
}), S = c && c.parentNode, k = X(c), Q = X(c, n.draggable), p.eventCanceled) {
|
|
904
|
-
this._nulling();
|
|
905
|
-
return;
|
|
906
|
-
}
|
|
907
|
-
ue = !1, Ae = !1, Te = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), nt(this.cloneId), nt(this._dragStartId), this.nativeDraggable && (m(document, "drop", this), m(o, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ee && h(document.body, "user-select", ""), h(c, "transform", ""), e && (be && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), g && g.parentNode && g.parentNode.removeChild(g), (_ === S || O && O.lastPutMode !== "clone") && D && D.parentNode && D.parentNode.removeChild(D), c && (this.nativeDraggable && m(c, "dragend", this), Ve(c), c.style["will-change"] = "", be && !ue && R(c, O ? O.options.ghostClass : this.options.ghostClass, !1), R(c, this.options.chosenClass, !1), A({
|
|
908
|
-
sortable: this,
|
|
909
|
-
name: "unchoose",
|
|
910
|
-
toEl: S,
|
|
911
|
-
newIndex: null,
|
|
912
|
-
newDraggableIndex: null,
|
|
913
|
-
originalEvent: e
|
|
914
|
-
}), _ !== S ? (k >= 0 && (A({
|
|
915
|
-
rootEl: S,
|
|
916
|
-
name: "add",
|
|
917
|
-
toEl: S,
|
|
918
|
-
fromEl: _,
|
|
919
|
-
originalEvent: e
|
|
920
|
-
}), A({
|
|
921
|
-
sortable: this,
|
|
922
|
-
name: "remove",
|
|
923
|
-
toEl: S,
|
|
924
|
-
originalEvent: e
|
|
925
|
-
}), A({
|
|
926
|
-
rootEl: S,
|
|
927
|
-
name: "sort",
|
|
928
|
-
toEl: S,
|
|
929
|
-
fromEl: _,
|
|
930
|
-
originalEvent: e
|
|
931
|
-
}), A({
|
|
932
|
-
sortable: this,
|
|
933
|
-
name: "sort",
|
|
934
|
-
toEl: S,
|
|
935
|
-
originalEvent: e
|
|
936
|
-
})), O && O.save()) : k !== ce && k >= 0 && (A({
|
|
937
|
-
sortable: this,
|
|
938
|
-
name: "update",
|
|
939
|
-
toEl: S,
|
|
940
|
-
originalEvent: e
|
|
941
|
-
}), A({
|
|
942
|
-
sortable: this,
|
|
943
|
-
name: "sort",
|
|
944
|
-
toEl: S,
|
|
945
|
-
originalEvent: e
|
|
946
|
-
})), p.active && ((k == null || k === -1) && (k = ce, Q = De), A({
|
|
947
|
-
sortable: this,
|
|
948
|
-
name: "end",
|
|
949
|
-
toEl: S,
|
|
950
|
-
originalEvent: e
|
|
951
|
-
}), this.save()))), this._nulling();
|
|
952
|
-
},
|
|
953
|
-
_nulling: function() {
|
|
954
|
-
N("nulling", this), _ = c = S = g = ae = D = Fe = J = ie = L = be = k = Q = ce = De = se = Se = O = Pe = p.dragged = p.ghost = p.clone = p.active = null, We.forEach(function(e) {
|
|
955
|
-
e.checked = !0;
|
|
956
|
-
}), We.length = $e = Ue = 0;
|
|
957
|
-
},
|
|
958
|
-
handleEvent: function(e) {
|
|
959
|
-
switch (e.type) {
|
|
960
|
-
case "drop":
|
|
961
|
-
case "dragend":
|
|
962
|
-
this._onDrop(e);
|
|
963
|
-
break;
|
|
964
|
-
case "dragenter":
|
|
965
|
-
case "dragover":
|
|
966
|
-
c && (this._onDragOver(e), bn(e));
|
|
967
|
-
break;
|
|
968
|
-
case "selectstart":
|
|
969
|
-
e.preventDefault();
|
|
970
|
-
break;
|
|
971
|
-
}
|
|
972
|
-
},
|
|
973
|
-
/**
|
|
974
|
-
* Serializes the item into an array of string.
|
|
975
|
-
* @returns {String[]}
|
|
976
|
-
*/
|
|
977
|
-
toArray: function() {
|
|
978
|
-
for (var e = [], o, n = this.el.children, i = 0, r = n.length, a = this.options; i < r; i++)
|
|
979
|
-
o = n[i], W(o, a.draggable, this.el, !1) && e.push(o.getAttribute(a.dataIdAttr) || Sn(o));
|
|
980
|
-
return e;
|
|
981
|
-
},
|
|
982
|
-
/**
|
|
983
|
-
* Sorts the elements according to the array.
|
|
984
|
-
* @param {String[]} order order of the items
|
|
985
|
-
*/
|
|
986
|
-
sort: function(e, o) {
|
|
987
|
-
var n = {}, i = this.el;
|
|
988
|
-
this.toArray().forEach(function(r, a) {
|
|
989
|
-
var l = i.children[a];
|
|
990
|
-
W(l, this.options.draggable, i, !1) && (n[r] = l);
|
|
991
|
-
}, this), o && this.captureAnimationState(), e.forEach(function(r) {
|
|
992
|
-
n[r] && (i.removeChild(n[r]), i.appendChild(n[r]));
|
|
993
|
-
}), o && this.animateAll();
|
|
994
|
-
},
|
|
995
|
-
/**
|
|
996
|
-
* Save the current sorting
|
|
997
|
-
*/
|
|
998
|
-
save: function() {
|
|
999
|
-
var e = this.options.store;
|
|
1000
|
-
e && e.set && e.set(this);
|
|
1001
|
-
},
|
|
1002
|
-
/**
|
|
1003
|
-
* 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.
|
|
1004
|
-
* @param {HTMLElement} el
|
|
1005
|
-
* @param {String} [selector] default: `options.draggable`
|
|
1006
|
-
* @returns {HTMLElement|null}
|
|
1007
|
-
*/
|
|
1008
|
-
closest: function(e, o) {
|
|
1009
|
-
return W(e, o || this.options.draggable, this.el, !1);
|
|
1010
|
-
},
|
|
1011
|
-
/**
|
|
1012
|
-
* Set/get option
|
|
1013
|
-
* @param {string} name
|
|
1014
|
-
* @param {*} [value]
|
|
1015
|
-
* @returns {*}
|
|
1016
|
-
*/
|
|
1017
|
-
option: function(e, o) {
|
|
1018
|
-
var n = this.options;
|
|
1019
|
-
if (o === void 0)
|
|
1020
|
-
return n[e];
|
|
1021
|
-
var i = Oe.modifyOption(this, e, o);
|
|
1022
|
-
typeof i < "u" ? n[e] = i : n[e] = o, e === "group" && Ft(n);
|
|
1023
|
-
},
|
|
1024
|
-
/**
|
|
1025
|
-
* Destroy
|
|
1026
|
-
*/
|
|
1027
|
-
destroy: function() {
|
|
1028
|
-
N("destroy", this);
|
|
1029
|
-
var e = this.el;
|
|
1030
|
-
e[x] = null, m(e, "mousedown", this._onTapStart), m(e, "touchstart", this._onTapStart), m(e, "pointerdown", this._onTapStart), this.nativeDraggable && (m(e, "dragover", this), m(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(o) {
|
|
1031
|
-
o.removeAttribute("draggable");
|
|
1032
|
-
}), this._onDrop(), this._disableDelayedDragEvents(), Le.splice(Le.indexOf(this.el), 1), this.el = e = null;
|
|
1033
|
-
},
|
|
1034
|
-
_hideClone: function() {
|
|
1035
|
-
if (!J) {
|
|
1036
|
-
if (N("hideClone", this), p.eventCanceled) return;
|
|
1037
|
-
h(D, "display", "none"), this.options.removeCloneOnHide && D.parentNode && D.parentNode.removeChild(D), J = !0;
|
|
1038
|
-
}
|
|
1039
|
-
},
|
|
1040
|
-
_showClone: function(e) {
|
|
1041
|
-
if (e.lastPutMode !== "clone") {
|
|
1042
|
-
this._hideClone();
|
|
1043
|
-
return;
|
|
1044
|
-
}
|
|
1045
|
-
if (J) {
|
|
1046
|
-
if (N("showClone", this), p.eventCanceled) return;
|
|
1047
|
-
c.parentNode == _ && !this.options.group.revertClone ? _.insertBefore(D, c) : ae ? _.insertBefore(D, ae) : _.appendChild(D), this.options.group.revertClone && this.animate(c, D), h(D, "display", ""), J = !1;
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
};
|
|
1051
|
-
function bn(t) {
|
|
1052
|
-
t.dataTransfer && (t.dataTransfer.dropEffect = "move"), t.cancelable && t.preventDefault();
|
|
1053
|
-
}
|
|
1054
|
-
function xe(t, e, o, n, i, r, a, l) {
|
|
1055
|
-
var s, u = t[x], f = u.options.onMove, d;
|
|
1056
|
-
return window.CustomEvent && !V && !Ce ? s = new CustomEvent("move", {
|
|
1057
|
-
bubbles: !0,
|
|
1058
|
-
cancelable: !0
|
|
1059
|
-
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = t, s.dragged = o, s.draggedRect = n, s.related = i || e, s.relatedRect = r || C(e), s.willInsertAfter = l, s.originalEvent = a, t.dispatchEvent(s), f && (d = f.call(u, s, a)), d;
|
|
1060
|
-
}
|
|
1061
|
-
function Ve(t) {
|
|
1062
|
-
t.draggable = !1;
|
|
1063
|
-
}
|
|
1064
|
-
function yn() {
|
|
1065
|
-
tt = !1;
|
|
1066
|
-
}
|
|
1067
|
-
function wn(t, e, o) {
|
|
1068
|
-
var n = C(de(o.el, 0, o.options, !0)), i = Nt(o.el, o.options, g), r = 10;
|
|
1069
|
-
return e ? t.clientX < i.left - r || t.clientY < n.top && t.clientX < n.right : t.clientY < i.top - r || t.clientY < n.bottom && t.clientX < n.left;
|
|
1070
|
-
}
|
|
1071
|
-
function En(t, e, o) {
|
|
1072
|
-
var n = C(at(o.el, o.options.draggable)), i = Nt(o.el, o.options, g), r = 10;
|
|
1073
|
-
return e ? t.clientX > i.right + r || t.clientY > n.bottom && t.clientX > n.left : t.clientY > i.bottom + r || t.clientX > n.right && t.clientY > n.top;
|
|
1074
|
-
}
|
|
1075
|
-
function _n(t, e, o, n, i, r, a, l) {
|
|
1076
|
-
var s = n ? t.clientY : t.clientX, u = n ? o.height : o.width, f = n ? o.top : o.left, d = n ? o.bottom : o.right, b = !1;
|
|
1077
|
-
if (!a) {
|
|
1078
|
-
if (l && Re < u * i) {
|
|
1079
|
-
if (!Te && (Se === 1 ? s > f + u * r / 2 : s < d - u * r / 2) && (Te = !0), Te)
|
|
1080
|
-
b = !0;
|
|
1081
|
-
else if (Se === 1 ? s < f + Re : s > d - Re)
|
|
1082
|
-
return -Se;
|
|
1083
|
-
} else if (s > f + u * (1 - i) / 2 && s < d - u * (1 - i) / 2)
|
|
1084
|
-
return Dn(e);
|
|
1085
|
-
}
|
|
1086
|
-
return b = b || a, b && (s < f + u * r / 2 || s > d - u * r / 2) ? s > f + u / 2 ? 1 : -1 : 0;
|
|
1087
|
-
}
|
|
1088
|
-
function Dn(t) {
|
|
1089
|
-
return X(c) < X(t) ? 1 : -1;
|
|
1090
|
-
}
|
|
1091
|
-
function Sn(t) {
|
|
1092
|
-
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, o = e.length, n = 0; o--; )
|
|
1093
|
-
n += e.charCodeAt(o);
|
|
1094
|
-
return n.toString(36);
|
|
1095
|
-
}
|
|
1096
|
-
function Tn(t) {
|
|
1097
|
-
We.length = 0;
|
|
1098
|
-
for (var e = t.getElementsByTagName("input"), o = e.length; o--; ) {
|
|
1099
|
-
var n = e[o];
|
|
1100
|
-
n.checked && We.push(n);
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
function ke(t) {
|
|
1104
|
-
return setTimeout(t, 0);
|
|
1105
|
-
}
|
|
1106
|
-
function nt(t) {
|
|
1107
|
-
return clearTimeout(t);
|
|
1108
|
-
}
|
|
1109
|
-
He && v(document, "touchmove", function(t) {
|
|
1110
|
-
(p.active || ue) && t.cancelable && t.preventDefault();
|
|
1111
|
-
});
|
|
1112
|
-
p.utils = {
|
|
1113
|
-
on: v,
|
|
1114
|
-
off: m,
|
|
1115
|
-
css: h,
|
|
1116
|
-
find: Ot,
|
|
1117
|
-
is: function(e, o) {
|
|
1118
|
-
return !!W(e, o, e, !1);
|
|
1119
|
-
},
|
|
1120
|
-
extend: ln,
|
|
1121
|
-
throttle: It,
|
|
1122
|
-
closest: W,
|
|
1123
|
-
toggleClass: R,
|
|
1124
|
-
clone: At,
|
|
1125
|
-
index: X,
|
|
1126
|
-
nextTick: ke,
|
|
1127
|
-
cancelNextTick: nt,
|
|
1128
|
-
detectDirection: Mt,
|
|
1129
|
-
getChild: de,
|
|
1130
|
-
expando: x
|
|
1131
|
-
};
|
|
1132
|
-
p.get = function(t) {
|
|
1133
|
-
return t[x];
|
|
1134
|
-
};
|
|
1135
|
-
p.mount = function() {
|
|
1136
|
-
for (var t = arguments.length, e = new Array(t), o = 0; o < t; o++)
|
|
1137
|
-
e[o] = arguments[o];
|
|
1138
|
-
e[0].constructor === Array && (e = e[0]), e.forEach(function(n) {
|
|
1139
|
-
if (!n.prototype || !n.prototype.constructor)
|
|
1140
|
-
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
1141
|
-
n.utils && (p.utils = j(j({}, p.utils), n.utils)), Oe.mount(n);
|
|
1142
|
-
});
|
|
1143
|
-
};
|
|
1144
|
-
p.create = function(t, e) {
|
|
1145
|
-
return new p(t, e);
|
|
1146
|
-
};
|
|
1147
|
-
p.version = rn;
|
|
1148
|
-
var T = [], ye, ot, it = !1, Ke, Ze, Ge, we;
|
|
1149
|
-
function Cn() {
|
|
1150
|
-
function t() {
|
|
1151
|
-
this.defaults = {
|
|
1152
|
-
scroll: !0,
|
|
1153
|
-
forceAutoScrollFallback: !1,
|
|
1154
|
-
scrollSensitivity: 30,
|
|
1155
|
-
scrollSpeed: 10,
|
|
1156
|
-
bubbleScroll: !0
|
|
1157
|
-
};
|
|
1158
|
-
for (var e in this)
|
|
1159
|
-
e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
|
|
1160
|
-
}
|
|
1161
|
-
return t.prototype = {
|
|
1162
|
-
dragStarted: function(o) {
|
|
1163
|
-
var n = o.originalEvent;
|
|
1164
|
-
this.sortable.nativeDraggable ? v(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? v(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? v(document, "touchmove", this._handleFallbackAutoScroll) : v(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1165
|
-
},
|
|
1166
|
-
dragOverCompleted: function(o) {
|
|
1167
|
-
var n = o.originalEvent;
|
|
1168
|
-
!this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
|
|
1169
|
-
},
|
|
1170
|
-
drop: function() {
|
|
1171
|
-
this.sortable.nativeDraggable ? m(document, "dragover", this._handleAutoScroll) : (m(document, "pointermove", this._handleFallbackAutoScroll), m(document, "touchmove", this._handleFallbackAutoScroll), m(document, "mousemove", this._handleFallbackAutoScroll)), _t(), Xe(), sn();
|
|
1172
|
-
},
|
|
1173
|
-
nulling: function() {
|
|
1174
|
-
Ge = ot = ye = it = we = Ke = Ze = null, T.length = 0;
|
|
1175
|
-
},
|
|
1176
|
-
_handleFallbackAutoScroll: function(o) {
|
|
1177
|
-
this._handleAutoScroll(o, !0);
|
|
1178
|
-
},
|
|
1179
|
-
_handleAutoScroll: function(o, n) {
|
|
1180
|
-
var i = this, r = (o.touches ? o.touches[0] : o).clientX, a = (o.touches ? o.touches[0] : o).clientY, l = document.elementFromPoint(r, a);
|
|
1181
|
-
if (Ge = o, n || this.options.forceAutoScrollFallback || Ce || V || Ee) {
|
|
1182
|
-
Qe(o, this.options, l, n);
|
|
1183
|
-
var s = ee(l, !0);
|
|
1184
|
-
it && (!we || r !== Ke || a !== Ze) && (we && _t(), we = setInterval(function() {
|
|
1185
|
-
var u = ee(document.elementFromPoint(r, a), !0);
|
|
1186
|
-
u !== s && (s = u, Xe()), Qe(o, i.options, u, n);
|
|
1187
|
-
}, 10), Ke = r, Ze = a);
|
|
1188
|
-
} else {
|
|
1189
|
-
if (!this.options.bubbleScroll || ee(l, !0) === H()) {
|
|
1190
|
-
Xe();
|
|
1191
|
-
return;
|
|
1192
|
-
}
|
|
1193
|
-
Qe(o, this.options, ee(l, !1), !1);
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
}, q(t, {
|
|
1197
|
-
pluginName: "scroll",
|
|
1198
|
-
initializeByDefault: !0
|
|
1199
|
-
});
|
|
1200
|
-
}
|
|
1201
|
-
function Xe() {
|
|
1202
|
-
T.forEach(function(t) {
|
|
1203
|
-
clearInterval(t.pid);
|
|
1204
|
-
}), T = [];
|
|
1205
|
-
}
|
|
1206
|
-
function _t() {
|
|
1207
|
-
clearInterval(we);
|
|
1208
|
-
}
|
|
1209
|
-
var Qe = It(function(t, e, o, n) {
|
|
1210
|
-
if (e.scroll) {
|
|
1211
|
-
var i = (t.touches ? t.touches[0] : t).clientX, r = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, l = e.scrollSpeed, s = H(), u = !1, f;
|
|
1212
|
-
ot !== o && (ot = o, Xe(), ye = e.scroll, f = e.scrollFn, ye === !0 && (ye = ee(o, !0)));
|
|
1213
|
-
var d = 0, b = ye;
|
|
1214
|
-
do {
|
|
1215
|
-
var E = b, y = C(E), w = y.top, Y = y.bottom, z = y.left, P = y.right, B = y.width, M = y.height, te = void 0, G = void 0, ne = E.scrollWidth, he = E.scrollHeight, F = h(E), pe = E.scrollLeft, K = E.scrollTop;
|
|
1216
|
-
E === s ? (te = B < ne && (F.overflowX === "auto" || F.overflowX === "scroll" || F.overflowX === "visible"), G = M < he && (F.overflowY === "auto" || F.overflowY === "scroll" || F.overflowY === "visible")) : (te = B < ne && (F.overflowX === "auto" || F.overflowX === "scroll"), G = M < he && (F.overflowY === "auto" || F.overflowY === "scroll"));
|
|
1217
|
-
var ge = te && (Math.abs(P - i) <= a && pe + B < ne) - (Math.abs(z - i) <= a && !!pe), $ = G && (Math.abs(Y - r) <= a && K + M < he) - (Math.abs(w - r) <= a && !!K);
|
|
1218
|
-
if (!T[d])
|
|
1219
|
-
for (var oe = 0; oe <= d; oe++)
|
|
1220
|
-
T[oe] || (T[oe] = {});
|
|
1221
|
-
(T[d].vx != ge || T[d].vy != $ || T[d].el !== E) && (T[d].el = E, T[d].vx = ge, T[d].vy = $, clearInterval(T[d].pid), (ge != 0 || $ != 0) && (u = !0, T[d].pid = setInterval(function() {
|
|
1222
|
-
n && this.layer === 0 && p.active._onTouchMove(Ge);
|
|
1223
|
-
var me = T[this.layer].vy ? T[this.layer].vy * l : 0, Z = T[this.layer].vx ? T[this.layer].vx * l : 0;
|
|
1224
|
-
typeof f == "function" && f.call(p.dragged.parentNode[x], Z, me, t, Ge, T[this.layer].el) !== "continue" || Pt(T[this.layer].el, Z, me);
|
|
1225
|
-
}.bind({
|
|
1226
|
-
layer: d
|
|
1227
|
-
}), 24))), d++;
|
|
1228
|
-
} while (e.bubbleScroll && b !== s && (b = ee(b, !1)));
|
|
1229
|
-
it = u;
|
|
1230
|
-
}
|
|
1231
|
-
}, 30), Xt = function(e) {
|
|
1232
|
-
var o = e.originalEvent, n = e.putSortable, i = e.dragEl, r = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1233
|
-
if (o) {
|
|
1234
|
-
var u = n || r;
|
|
1235
|
-
l();
|
|
1236
|
-
var f = o.changedTouches && o.changedTouches.length ? o.changedTouches[0] : o, d = document.elementFromPoint(f.clientX, f.clientY);
|
|
1237
|
-
s(), u && !u.el.contains(d) && (a("spill"), this.onSpill({
|
|
1238
|
-
dragEl: i,
|
|
1239
|
-
putSortable: n
|
|
1240
|
-
}));
|
|
1241
|
-
}
|
|
1242
|
-
};
|
|
1243
|
-
function lt() {
|
|
1244
|
-
}
|
|
1245
|
-
lt.prototype = {
|
|
1246
|
-
startIndex: null,
|
|
1247
|
-
dragStart: function(e) {
|
|
1248
|
-
var o = e.oldDraggableIndex;
|
|
1249
|
-
this.startIndex = o;
|
|
1250
|
-
},
|
|
1251
|
-
onSpill: function(e) {
|
|
1252
|
-
var o = e.dragEl, n = e.putSortable;
|
|
1253
|
-
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1254
|
-
var i = de(this.sortable.el, this.startIndex, this.options);
|
|
1255
|
-
i ? this.sortable.el.insertBefore(o, i) : this.sortable.el.appendChild(o), this.sortable.animateAll(), n && n.animateAll();
|
|
1256
|
-
},
|
|
1257
|
-
drop: Xt
|
|
1258
|
-
};
|
|
1259
|
-
q(lt, {
|
|
1260
|
-
pluginName: "revertOnSpill"
|
|
1261
|
-
});
|
|
1262
|
-
function st() {
|
|
1263
|
-
}
|
|
1264
|
-
st.prototype = {
|
|
1265
|
-
onSpill: function(e) {
|
|
1266
|
-
var o = e.dragEl, n = e.putSortable, i = n || this.sortable;
|
|
1267
|
-
i.captureAnimationState(), o.parentNode && o.parentNode.removeChild(o), i.animateAll();
|
|
1268
|
-
},
|
|
1269
|
-
drop: Xt
|
|
1270
|
-
};
|
|
1271
|
-
q(st, {
|
|
1272
|
-
pluginName: "removeOnSpill"
|
|
1273
|
-
});
|
|
1274
|
-
p.mount(new Cn());
|
|
1275
|
-
p.mount(st, lt);
|
|
1276
|
-
function On(t, e, o = {}) {
|
|
1277
|
-
let n;
|
|
1278
|
-
const { document: i = Jt, ...r } = o, a = {
|
|
1279
|
-
onUpdate: (f) => {
|
|
1280
|
-
An(e, f.oldIndex, f.newIndex, f);
|
|
1281
|
-
}
|
|
1282
|
-
}, l = () => {
|
|
1283
|
-
const f = typeof t == "string" ? i?.querySelector(t) : en(t);
|
|
1284
|
-
!f || n !== void 0 || (n = new p(f, { ...a, ...r }));
|
|
1285
|
-
}, s = () => {
|
|
1286
|
-
n?.destroy(), n = void 0;
|
|
1287
|
-
}, u = (f, d) => {
|
|
1288
|
-
if (d !== void 0)
|
|
1289
|
-
n?.option(f, d);
|
|
1290
|
-
else
|
|
1291
|
-
return n?.option(f);
|
|
1292
|
-
};
|
|
1293
|
-
return Qt(l), Vt(s), {
|
|
1294
|
-
stop: s,
|
|
1295
|
-
start: l,
|
|
1296
|
-
option: u
|
|
1297
|
-
};
|
|
1298
|
-
}
|
|
1299
|
-
function In(t, e, o) {
|
|
1300
|
-
const n = t.children[o];
|
|
1301
|
-
t.insertBefore(e, n);
|
|
1302
|
-
}
|
|
1303
|
-
function Pn(t) {
|
|
1304
|
-
t.parentNode && t.parentNode.removeChild(t);
|
|
1305
|
-
}
|
|
1306
|
-
function An(t, e, o, n = null) {
|
|
1307
|
-
n != null && (Pn(n.item), In(n.from, n.item, e));
|
|
1308
|
-
const i = jt(t), r = i ? [...et(t)] : et(t);
|
|
1309
|
-
if (o >= 0 && o < r.length) {
|
|
1310
|
-
const a = r.splice(e, 1)[0];
|
|
1311
|
-
Dt(() => {
|
|
1312
|
-
r.splice(o, 0, a), i && (t.value = r);
|
|
1313
|
-
});
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
const Nn = ["data-align"], xn = /* @__PURE__ */ zt({
|
|
1317
|
-
__name: "PvPopover",
|
|
1318
|
-
props: {
|
|
1319
|
-
alignment: { default: void 0, type: null },
|
|
1320
|
-
cssCustomProperties: { default: () => ({}), type: Object },
|
|
1321
|
-
cssCustomListProperties: { type: Object },
|
|
1322
|
-
isList: { type: Boolean, default: !1 },
|
|
1323
|
-
isSortable: { type: Boolean }
|
|
1324
|
-
},
|
|
1325
|
-
emits: ["list-order-updated"],
|
|
1326
|
-
setup(t, { expose: e, emit: o }) {
|
|
1327
|
-
const n = $t(null), i = Ut("popoverList"), r = t, a = o;
|
|
1328
|
-
return r.isSortable && r.isList && On(i, [], {
|
|
1329
|
-
animation: 150,
|
|
1330
|
-
onUpdate: () => {
|
|
1331
|
-
const l = Array.from(i.value?.children || []).map(
|
|
1332
|
-
(s) => s.id
|
|
1333
|
-
);
|
|
1334
|
-
a("list-order-updated", l);
|
|
1335
|
-
}
|
|
1336
|
-
}), e({ popoverRoot: n }), (l, s) => (ft(), ct("div", {
|
|
1337
|
-
ref_key: "popoverRoot",
|
|
1338
|
-
ref: n,
|
|
1339
|
-
class: "pv-popover",
|
|
1340
|
-
"data-testid": "pv-popover",
|
|
1341
|
-
"data-align": t.alignment,
|
|
1342
|
-
style: dt(t.cssCustomProperties)
|
|
1343
|
-
}, [
|
|
1344
|
-
t.isList ? (ft(), ct(
|
|
1345
|
-
"ul",
|
|
1346
|
-
{
|
|
1347
|
-
key: 0,
|
|
1348
|
-
ref: "popoverList",
|
|
1349
|
-
role: "list",
|
|
1350
|
-
class: "pv-popover-list",
|
|
1351
|
-
style: dt(t.cssCustomListProperties)
|
|
1352
|
-
},
|
|
1353
|
-
[
|
|
1354
|
-
ht(l.$slots, "default", {}, void 0, !0)
|
|
1355
|
-
],
|
|
1356
|
-
4
|
|
1357
|
-
/* STYLE */
|
|
1358
|
-
)) : ht(l.$slots, "default", { key: 1 }, void 0, !0)
|
|
1359
|
-
], 12, Nn));
|
|
1360
|
-
}
|
|
1361
|
-
}), Mn = ".pv-popover-list[data-v-cda1af8c]{font-size:14px}", Fn = (t, e) => {
|
|
1362
|
-
const o = t.__vccOpts || t;
|
|
1363
|
-
for (const [n, i] of e)
|
|
1364
|
-
o[n] = i;
|
|
1365
|
-
return o;
|
|
1366
|
-
}, Rn = /* @__PURE__ */ Fn(xn, [["styles", [Mn]], ["__scopeId", "data-v-cda1af8c"]]), kn = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
1367
|
-
function Xn(t) {
|
|
1368
|
-
return !kn.has(t);
|
|
1369
|
-
}
|
|
1370
|
-
function Je(t, e) {
|
|
1371
|
-
const o = document.querySelector('link[href*="' + e + '"]');
|
|
1372
|
-
if (!t.shadowRoot)
|
|
1373
|
-
return !1;
|
|
1374
|
-
if (o && t.shadowRoot) {
|
|
1375
|
-
const n = o.href;
|
|
1376
|
-
if (t.shadowRoot.querySelector(`link[href="${n}"]`))
|
|
1377
|
-
return;
|
|
1378
|
-
const i = document.createElement("link");
|
|
1379
|
-
return i.rel = "stylesheet", i.href = n, t.shadowRoot.prepend(i), !0;
|
|
1380
|
-
}
|
|
1381
|
-
return !1;
|
|
1382
|
-
}
|
|
1383
|
-
function Yn(t) {
|
|
1384
|
-
if (!Je(t, "pit-viper-v2")) {
|
|
1385
|
-
if (Je(t, "pit-viper")) {
|
|
1386
|
-
Je(t, "pit-viper-v2-scoped");
|
|
1387
|
-
return;
|
|
1388
|
-
}
|
|
1389
|
-
console.warn(
|
|
1390
|
-
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
1391
|
-
);
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
const Bn = (t) => ({ shadowRoot: Xn(t) });
|
|
1395
|
-
function Ln(t) {
|
|
1396
|
-
const e = t.__name || t.name;
|
|
1397
|
-
if (!e)
|
|
1398
|
-
throw new Error("Component must have a __name or name property");
|
|
1399
|
-
const o = qt(t, Bn(e));
|
|
1400
|
-
class n extends o {
|
|
1401
|
-
connectedCallback() {
|
|
1402
|
-
super.connectedCallback?.(), Yn(this);
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
return n;
|
|
1406
|
-
}
|
|
1407
|
-
function Wn(t) {
|
|
1408
|
-
return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
1409
|
-
}
|
|
1410
|
-
function Gn(t) {
|
|
1411
|
-
const e = t.__name || t.name;
|
|
1412
|
-
if (!e)
|
|
1413
|
-
throw new Error("Component must have a __name or name property");
|
|
1414
|
-
const o = Wn(e), n = Ln(t);
|
|
1415
|
-
customElements.get(o) || customElements.define(o, n);
|
|
1416
|
-
}
|
|
1417
|
-
Gn(Rn);
|