@webitel/ui-sdk 26.8.86 → 26.8.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{clients-CkhN_A5L.js → clients-cfVUVngv.js} +317 -289
- package/dist/{components-CV6dUJR6.js → components-BSM66otL.js} +1065 -1853
- package/dist/{composables-BtWSAI5D.js → composables-OP5kSvlh.js} +3 -3
- package/dist/debounce-A4B4PTkL.js +5 -0
- package/dist/{deep-copy-CTgLtgMO.js → deep-copy-7O5ej7vT.js} +1 -1
- package/dist/dist-DB8lC4KJ.js +112 -0
- package/dist/{dist-CAOIU8xq.js → dist-DJZOILzq.js} +1 -1
- package/dist/{genClient-HHiOUj56.js → genClient-5JkKKac8.js} +6 -7
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +2 -2
- package/dist/ui-sdk.umd.cjs +675 -675
- package/dist/{useValidation-CEed9cxY.js → useValidation-Dmm2xos_.js} +1 -1
- package/dist/{useWtTable-DLWucXPx.js → useWtTable-CUpN0LZ5.js} +1 -1
- package/dist/{vue-i18n-Db_oYfO8.js → vue-i18n-B88GcHzn.js} +215 -215
- package/dist/{vue-router-Dwey8MMv.js → vue-router-CobN9tLi.js} +1 -1
- package/dist/{wt-action-bar-DtAECixF.js → wt-action-bar-BpuER6TA.js} +1 -1
- package/dist/{wt-chat-emoji-CPKosJ8P.js → wt-chat-emoji-zW3fKPW8.js} +1 -1
- package/dist/{wt-datepicker-BgjjbOMX.js → wt-datepicker-BS3przUJ.js} +2 -2
- package/dist/{wt-display-chip-items-CK-cnYdD.js → wt-display-chip-items-D-lzTp0d.js} +1 -1
- package/dist/{wt-expansion-card-BT586Mul.js → wt-expansion-card-8YzHs8F1.js} +1 -1
- package/dist/{wt-galleria-DMCgiiju.js → wt-galleria-CmaNfz7E.js} +2 -2
- package/dist/{wt-icon-action-DJzm0kEk.js → wt-icon-action-B8vuj9cC.js} +1 -1
- package/dist/{wt-pagination-G2ZGU4Pi.js → wt-pagination-DLRMTDRV.js} +1 -1
- package/dist/{wt-player-CFrKSilF.js → wt-player-CqjIR3Q-.js} +2 -2
- package/dist/{wt-popover-BCYPu5NC.js → wt-popover-DuZFw3bg.js} +1 -1
- package/dist/{wt-search-bar-DosqJLXT.js → wt-search-bar-CE4WhuJ6.js} +2 -2
- package/dist/{wt-selection-popup-CjYw4ppb.js → wt-selection-popup-Bd4EuLl-.js} +1 -1
- package/dist/{wt-send-message-popup-C4XEqrKj.js → wt-send-message-popup-CiswBW69.js} +287 -306
- package/dist/{wt-slider-BPzRTeYU.js → wt-slider-Co6hZQu_.js} +1 -1
- package/dist/{wt-start-page-BFQExFUj.js → wt-start-page-Bp7b0ir-.js} +1 -1
- package/dist/{wt-status-select-Dnv9tj7o.js → wt-status-select-z4n_FL2z.js} +1 -1
- package/dist/{wt-table-PR_Kx7Sv.js → wt-table-C-DMIrud.js} +2 -2
- package/dist/{wt-table-column-select-CmbjLO9b.js → wt-table-column-select-BtFhZKPT.js} +26 -19
- package/dist/{wt-timepicker-B4MOaSEZ.js → wt-timepicker-D-tnO-gX.js} +2 -2
- package/dist/{wt-tree-BYk31Ees.js → wt-tree-BH2o2iCt.js} +843 -844
- package/dist/{wt-tree-table-ZJSw_3hx.js → wt-tree-table-D4nCNUq_.js} +1 -1
- package/dist/{wt-type-extension-value-input-CuxKUgu-.js → wt-type-extension-value-input-DTjVuaQe.js} +3 -3
- package/dist/{wt-vidstack-player-O1Xcyw-A.js → wt-vidstack-player-BUFABzVR.js} +997 -991
- package/package.json +6 -2
- package/src/api/transformers/starToSearch/starToSearch.transformer.js +1 -1
- package/src/components/wt-table-column-select/wt-table-column-select.vue +21 -2
- package/src/components/wt-textarea/wt-textarea.vue +12 -1
- package/src/components/wt-vidstack-player/wt-vidstack-player.vue +16 -0
- package/src/composables/useCachedItemInstanceName/useCachedItemInstanceName.js +1 -1
- package/src/modules/AuditForm/components/audit-form.vue +1 -1
- package/src/modules/CardStoreModule/store/CardStoreModule.js +1 -1
- package/src/modules/TableVariableColumnSelect/components/__tests__/wt-table-variable-column-select.spec.ts +101 -0
- package/src/modules/TableVariableColumnSelect/components/wt-table-variable-column-select.vue +278 -0
- package/src/modules/TableVariableColumnSelect/composable/__tests__/useTableVariableHeaders.spec.ts +129 -0
- package/src/modules/TableVariableColumnSelect/composable/useTableVariableHeaders.ts +59 -0
- package/src/modules/TableVariableColumnSelect/index.ts +7 -0
- package/src/modules/Userinfo/mappings/mappings.ts +1 -1
- package/src/modules/Userinfo/stores/userinfoStore.ts +1 -1
- package/src/scripts/debounce.js +1 -1
- package/src/scripts/logger.js +1 -1
- package/src/scripts/updateObject.js +1 -2
- package/src/store/BaseStoreModules/BaseStoreModule.js +1 -1
- package/src/store/new/helpers/createStoreModule.js +1 -1
- package/src/store/new/modules/baseStoreModule/baseStoreModule.js +1 -1
- package/src/store/new/modules/cardStoreModule/cardStoreModule.js +1 -1
- package/types/.tsbuildinfo +1 -1
- package/types/components/wt-textarea/wt-textarea.vue.d.ts +11 -0
- package/types/modules/TableVariableColumnSelect/components/wt-table-variable-column-select.vue.d.ts +17 -0
- package/types/modules/TableVariableColumnSelect/composable/useTableVariableHeaders.d.ts +14 -0
- package/types/modules/TableVariableColumnSelect/index.d.ts +2 -0
- package/dist/debounce-Bp3jy7S5.js +0 -133
- package/dist/dist-Crpfx4FA.js +0 -87
- package/dist/rolldown-runtime-BEcgMyyN.js +0 -27
|
@@ -1,47 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
//#region node_modules/lodash/_baseGet.js
|
|
8
|
-
var b = /* @__PURE__ */ e(((e, t) => {
|
|
9
|
-
var n = r(), i = a();
|
|
10
|
-
function o(e, t) {
|
|
11
|
-
t = n(t, e);
|
|
12
|
-
for (var r = 0, a = t.length; e != null && r < a;) e = e[i(t[r++])];
|
|
13
|
-
return r && r == a ? e : void 0;
|
|
14
|
-
}
|
|
15
|
-
t.exports = o;
|
|
16
|
-
}));
|
|
17
|
-
(/* @__PURE__ */ e(((e, t) => {
|
|
18
|
-
var n = b();
|
|
19
|
-
function r(e, t, r) {
|
|
20
|
-
var i = e == null ? void 0 : n(e, t);
|
|
21
|
-
return i === void 0 ? r : i;
|
|
22
|
-
}
|
|
23
|
-
t.exports = r;
|
|
24
|
-
})))();
|
|
25
|
-
//#endregion
|
|
1
|
+
import { n as e, r as t } from "./clients-cfVUVngv.js";
|
|
2
|
+
import { n } from "./components-BSM66otL.js";
|
|
3
|
+
import { t as r } from "./vue-i18n-B88GcHzn.js";
|
|
4
|
+
import { n as i } from "./useEventBus-B-ZeklLu.js";
|
|
5
|
+
import { createBlock as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeProps as l, onMounted as u, openBlock as d, ref as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
6
|
+
import "lodash-es";
|
|
26
7
|
//#region node_modules/sortablejs/modular/sortable.esm.js
|
|
27
|
-
function
|
|
28
|
-
return (t =
|
|
8
|
+
function _(e, t, n) {
|
|
9
|
+
return (t = ee(t)) in e ? Object.defineProperty(e, t, {
|
|
29
10
|
value: n,
|
|
30
11
|
enumerable: !0,
|
|
31
12
|
configurable: !0,
|
|
32
13
|
writable: !0
|
|
33
14
|
}) : e[t] = n, e;
|
|
34
15
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
16
|
+
function v() {
|
|
17
|
+
return v = Object.assign ? Object.assign.bind() : function(e) {
|
|
37
18
|
for (var t = 1; t < arguments.length; t++) {
|
|
38
19
|
var n = arguments[t];
|
|
39
20
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
40
21
|
}
|
|
41
22
|
return e;
|
|
42
|
-
},
|
|
23
|
+
}, v.apply(null, arguments);
|
|
43
24
|
}
|
|
44
|
-
function
|
|
25
|
+
function y(e, t) {
|
|
45
26
|
var n = Object.keys(e);
|
|
46
27
|
if (Object.getOwnPropertySymbols) {
|
|
47
28
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -51,27 +32,27 @@ function ee(e, t) {
|
|
|
51
32
|
}
|
|
52
33
|
return n;
|
|
53
34
|
}
|
|
54
|
-
function
|
|
35
|
+
function b(e) {
|
|
55
36
|
for (var t = 1; t < arguments.length; t++) {
|
|
56
37
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
57
|
-
t % 2 ?
|
|
58
|
-
|
|
59
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
38
|
+
t % 2 ? y(Object(n), !0).forEach(function(t) {
|
|
39
|
+
_(e, t, n[t]);
|
|
40
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : y(Object(n)).forEach(function(t) {
|
|
60
41
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
61
42
|
});
|
|
62
43
|
}
|
|
63
44
|
return e;
|
|
64
45
|
}
|
|
65
|
-
function
|
|
46
|
+
function x(e, t) {
|
|
66
47
|
if (e == null) return {};
|
|
67
|
-
var n, r, i =
|
|
48
|
+
var n, r, i = S(e, t);
|
|
68
49
|
if (Object.getOwnPropertySymbols) {
|
|
69
50
|
var a = Object.getOwnPropertySymbols(e);
|
|
70
51
|
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
|
|
71
52
|
}
|
|
72
53
|
return i;
|
|
73
54
|
}
|
|
74
|
-
function
|
|
55
|
+
function S(e, t) {
|
|
75
56
|
if (e == null) return {};
|
|
76
57
|
var n = {};
|
|
77
58
|
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
@@ -80,7 +61,7 @@ function te(e, t) {
|
|
|
80
61
|
}
|
|
81
62
|
return n;
|
|
82
63
|
}
|
|
83
|
-
function
|
|
64
|
+
function C(e, t) {
|
|
84
65
|
if (typeof e != "object" || !e) return e;
|
|
85
66
|
var n = e[Symbol.toPrimitive];
|
|
86
67
|
if (n !== void 0) {
|
|
@@ -90,33 +71,33 @@ function ne(e, t) {
|
|
|
90
71
|
}
|
|
91
72
|
return (t === "string" ? String : Number)(e);
|
|
92
73
|
}
|
|
93
|
-
function
|
|
94
|
-
var t =
|
|
74
|
+
function ee(e) {
|
|
75
|
+
var t = C(e, "string");
|
|
95
76
|
return typeof t == "symbol" ? t : t + "";
|
|
96
77
|
}
|
|
97
|
-
function
|
|
78
|
+
function w(e) {
|
|
98
79
|
"@babel/helpers - typeof";
|
|
99
|
-
return
|
|
80
|
+
return w = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
100
81
|
return typeof e;
|
|
101
82
|
} : function(e) {
|
|
102
83
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
103
|
-
},
|
|
84
|
+
}, w(e);
|
|
104
85
|
}
|
|
105
|
-
var
|
|
106
|
-
function
|
|
86
|
+
var te = "1.15.7";
|
|
87
|
+
function T(e) {
|
|
107
88
|
if (typeof window < "u" && window.navigator) return !!/*@__PURE__*/ navigator.userAgent.match(e);
|
|
108
89
|
}
|
|
109
|
-
var
|
|
90
|
+
var E = T(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), D = T(/Edge/i), O = T(/firefox/i), ne = T(/safari/i) && !T(/chrome/i) && !T(/android/i), re = T(/iP(ad|od|hone)/i), ie = T(/chrome/i) && T(/android/i), ae = {
|
|
110
91
|
capture: !1,
|
|
111
92
|
passive: !1
|
|
112
93
|
};
|
|
113
94
|
function k(e, t, n) {
|
|
114
|
-
e.addEventListener(t, n, !
|
|
95
|
+
e.addEventListener(t, n, !E && ae);
|
|
115
96
|
}
|
|
116
97
|
function A(e, t, n) {
|
|
117
|
-
e.removeEventListener(t, n, !
|
|
98
|
+
e.removeEventListener(t, n, !E && ae);
|
|
118
99
|
}
|
|
119
|
-
function
|
|
100
|
+
function oe(e, t) {
|
|
120
101
|
if (t) {
|
|
121
102
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
122
103
|
if (e.matches) return e.matches(t);
|
|
@@ -128,22 +109,22 @@ function ue(e, t) {
|
|
|
128
109
|
return !1;
|
|
129
110
|
}
|
|
130
111
|
}
|
|
131
|
-
function
|
|
112
|
+
function se(e) {
|
|
132
113
|
return e.host && e !== document && e.host.nodeType && e.host !== e ? e.host : e.parentNode;
|
|
133
114
|
}
|
|
134
115
|
function j(e, t, n, r) {
|
|
135
116
|
if (e) {
|
|
136
117
|
n ||= document;
|
|
137
118
|
do {
|
|
138
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
119
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && oe(e, t) : oe(e, t)) || r && e === n) return e;
|
|
139
120
|
if (e === n) break;
|
|
140
|
-
} while (e =
|
|
121
|
+
} while (e = se(e));
|
|
141
122
|
}
|
|
142
123
|
return null;
|
|
143
124
|
}
|
|
144
|
-
var
|
|
125
|
+
var ce = /\s+/g;
|
|
145
126
|
function M(e, t, n) {
|
|
146
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
127
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ce, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ce, " "));
|
|
147
128
|
}
|
|
148
129
|
function N(e, t, n) {
|
|
149
130
|
var r = e && e.style;
|
|
@@ -152,7 +133,7 @@ function N(e, t, n) {
|
|
|
152
133
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
153
134
|
}
|
|
154
135
|
}
|
|
155
|
-
function
|
|
136
|
+
function le(e, t) {
|
|
156
137
|
var n = "";
|
|
157
138
|
if (typeof e == "string") n = e;
|
|
158
139
|
else do {
|
|
@@ -162,7 +143,7 @@ function pe(e, t) {
|
|
|
162
143
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
163
144
|
return i && new i(n);
|
|
164
145
|
}
|
|
165
|
-
function
|
|
146
|
+
function ue(e, t, n) {
|
|
166
147
|
if (e) {
|
|
167
148
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
168
149
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -176,7 +157,7 @@ function P() {
|
|
|
176
157
|
function F(e, t, n, r, i) {
|
|
177
158
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
178
159
|
var a, o, s, c, l, u, d;
|
|
179
|
-
if (e !== window && e.parentNode && e !== P() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !
|
|
160
|
+
if (e !== window && e.parentNode && e !== P() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !E)) do
|
|
180
161
|
if (i && i.getBoundingClientRect && (N(i, "transform") !== "none" || n && N(i, "position") !== "static")) {
|
|
181
162
|
var f = i.getBoundingClientRect();
|
|
182
163
|
o -= f.top + parseInt(N(i, "border-top-width")), s -= f.left + parseInt(N(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -184,7 +165,7 @@ function F(e, t, n, r, i) {
|
|
|
184
165
|
}
|
|
185
166
|
while (i = i.parentNode);
|
|
186
167
|
if (r && e !== window) {
|
|
187
|
-
var p =
|
|
168
|
+
var p = le(i || e), m = p && p.a, h = p && p.d;
|
|
188
169
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
189
170
|
}
|
|
190
171
|
return {
|
|
@@ -197,7 +178,7 @@ function F(e, t, n, r, i) {
|
|
|
197
178
|
};
|
|
198
179
|
}
|
|
199
180
|
}
|
|
200
|
-
function
|
|
181
|
+
function de(e, t, n) {
|
|
201
182
|
for (var r = L(e, !0), i = F(e)[t]; r;) {
|
|
202
183
|
var a = F(r)[n], o = void 0;
|
|
203
184
|
if (o = n === "top" || n === "left" ? i >= a : i <= a, !o) return r;
|
|
@@ -206,7 +187,7 @@ function he(e, t, n) {
|
|
|
206
187
|
}
|
|
207
188
|
return !1;
|
|
208
189
|
}
|
|
209
|
-
function
|
|
190
|
+
function fe(e, t, n, r) {
|
|
210
191
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
211
192
|
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && j(o[a], n.draggable, e, !1)) {
|
|
212
193
|
if (i === t) return o[a];
|
|
@@ -216,25 +197,25 @@ function ge(e, t, n, r) {
|
|
|
216
197
|
}
|
|
217
198
|
return null;
|
|
218
199
|
}
|
|
219
|
-
function
|
|
220
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || N(n, "display") === "none" || t && !
|
|
200
|
+
function pe(e, t) {
|
|
201
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || N(n, "display") === "none" || t && !oe(n, t));) n = n.previousElementSibling;
|
|
221
202
|
return n || null;
|
|
222
203
|
}
|
|
223
204
|
function I(e, t) {
|
|
224
205
|
var n = 0;
|
|
225
206
|
if (!e || !e.parentNode) return -1;
|
|
226
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
207
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || oe(e, t)) && n++;
|
|
227
208
|
return n;
|
|
228
209
|
}
|
|
229
|
-
function
|
|
210
|
+
function me(e) {
|
|
230
211
|
var t = 0, n = 0, r = P();
|
|
231
212
|
if (e) do {
|
|
232
|
-
var i =
|
|
213
|
+
var i = le(e), a = i.a, o = i.d;
|
|
233
214
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
234
215
|
} while (e !== r && (e = e.parentNode));
|
|
235
216
|
return [t, n];
|
|
236
217
|
}
|
|
237
|
-
function
|
|
218
|
+
function he(e, t) {
|
|
238
219
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
239
220
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
240
221
|
}
|
|
@@ -255,35 +236,35 @@ function L(e, t) {
|
|
|
255
236
|
while (n = n.parentNode);
|
|
256
237
|
return P();
|
|
257
238
|
}
|
|
258
|
-
function
|
|
239
|
+
function ge(e, t) {
|
|
259
240
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
260
241
|
return e;
|
|
261
242
|
}
|
|
262
|
-
function
|
|
243
|
+
function _e(e, t) {
|
|
263
244
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
264
245
|
}
|
|
265
|
-
var
|
|
266
|
-
function
|
|
246
|
+
var ve;
|
|
247
|
+
function ye(e, t) {
|
|
267
248
|
return function() {
|
|
268
|
-
if (!
|
|
249
|
+
if (!ve) {
|
|
269
250
|
var n = arguments, r = this;
|
|
270
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
271
|
-
|
|
251
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), ve = setTimeout(function() {
|
|
252
|
+
ve = void 0;
|
|
272
253
|
}, t);
|
|
273
254
|
}
|
|
274
255
|
};
|
|
275
256
|
}
|
|
276
|
-
function
|
|
277
|
-
clearTimeout(
|
|
257
|
+
function be() {
|
|
258
|
+
clearTimeout(ve), ve = void 0;
|
|
278
259
|
}
|
|
279
|
-
function
|
|
260
|
+
function xe(e, t, n) {
|
|
280
261
|
e.scrollLeft += t, e.scrollTop += n;
|
|
281
262
|
}
|
|
282
|
-
function
|
|
263
|
+
function Se(e) {
|
|
283
264
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
284
265
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
285
266
|
}
|
|
286
|
-
function
|
|
267
|
+
function Ce(e, t, n) {
|
|
287
268
|
var r = {};
|
|
288
269
|
return Array.from(e.children).forEach(function(i) {
|
|
289
270
|
if (!(!j(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
@@ -293,7 +274,7 @@ function De(e, t, n) {
|
|
|
293
274
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
294
275
|
}
|
|
295
276
|
var R = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
296
|
-
function
|
|
277
|
+
function we() {
|
|
297
278
|
var e = [], t;
|
|
298
279
|
return {
|
|
299
280
|
captureAnimationState: function() {
|
|
@@ -303,9 +284,9 @@ function Oe() {
|
|
|
303
284
|
target: t,
|
|
304
285
|
rect: F(t)
|
|
305
286
|
});
|
|
306
|
-
var n =
|
|
287
|
+
var n = b({}, e[e.length - 1].rect);
|
|
307
288
|
if (t.thisAnimationDuration) {
|
|
308
|
-
var r =
|
|
289
|
+
var r = le(t, !0);
|
|
309
290
|
r && (n.top -= r.f, n.left -= r.e);
|
|
310
291
|
}
|
|
311
292
|
t.fromRect = n;
|
|
@@ -316,7 +297,7 @@ function Oe() {
|
|
|
316
297
|
e.push(t);
|
|
317
298
|
},
|
|
318
299
|
removeAnimationState: function(t) {
|
|
319
|
-
e.splice(
|
|
300
|
+
e.splice(he(e, { target: t }), 1);
|
|
320
301
|
},
|
|
321
302
|
animateAll: function(n) {
|
|
322
303
|
var r = this;
|
|
@@ -326,8 +307,8 @@ function Oe() {
|
|
|
326
307
|
}
|
|
327
308
|
var i = !1, a = 0;
|
|
328
309
|
e.forEach(function(e) {
|
|
329
|
-
var t = 0, n = e.target, o = n.fromRect, s = F(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
330
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
310
|
+
var t = 0, n = e.target, o = n.fromRect, s = F(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = le(n, !0);
|
|
311
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && _e(c, s) && !_e(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ee(u, c, l, r.options)), _e(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
|
|
331
312
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
332
313
|
}, t), n.thisAnimationDuration = t);
|
|
333
314
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -337,26 +318,26 @@ function Oe() {
|
|
|
337
318
|
animate: function(e, t, n, r) {
|
|
338
319
|
if (r) {
|
|
339
320
|
N(e, "transition", ""), N(e, "transform", "");
|
|
340
|
-
var i =
|
|
341
|
-
e.animatingX = !!s, e.animatingY = !!c, N(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
321
|
+
var i = le(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
322
|
+
e.animatingX = !!s, e.animatingY = !!c, N(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Te(e), N(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), N(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
342
323
|
N(e, "transition", ""), N(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
343
324
|
}, r);
|
|
344
325
|
}
|
|
345
326
|
}
|
|
346
327
|
};
|
|
347
328
|
}
|
|
348
|
-
function
|
|
329
|
+
function Te(e) {
|
|
349
330
|
return e.offsetWidth;
|
|
350
331
|
}
|
|
351
|
-
function
|
|
332
|
+
function Ee(e, t, n, r) {
|
|
352
333
|
return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
|
|
353
334
|
}
|
|
354
|
-
var
|
|
335
|
+
var De = [], Oe = { initializeByDefault: !0 }, ke = {
|
|
355
336
|
mount: function(e) {
|
|
356
|
-
for (var t in
|
|
357
|
-
|
|
337
|
+
for (var t in Oe) Oe.hasOwnProperty(t) && !(t in e) && (e[t] = Oe[t]);
|
|
338
|
+
De.forEach(function(t) {
|
|
358
339
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
359
|
-
}),
|
|
340
|
+
}), De.push(e);
|
|
360
341
|
},
|
|
361
342
|
pluginEvent: function(e, t, n) {
|
|
362
343
|
var r = this;
|
|
@@ -364,16 +345,16 @@ var je = [], Me = { initializeByDefault: !0 }, Ne = {
|
|
|
364
345
|
r.eventCanceled = !0;
|
|
365
346
|
};
|
|
366
347
|
var i = e + "Global";
|
|
367
|
-
|
|
368
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
348
|
+
De.forEach(function(r) {
|
|
349
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](b({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](b({ sortable: t }, n)));
|
|
369
350
|
});
|
|
370
351
|
},
|
|
371
352
|
initializePlugins: function(e, t, n, r) {
|
|
372
|
-
for (var i in
|
|
353
|
+
for (var i in De.forEach(function(r) {
|
|
373
354
|
var i = r.pluginName;
|
|
374
355
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
375
356
|
var a = new r(e, t, e.options);
|
|
376
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
357
|
+
a.sortable = e, a.options = e.options, e[i] = a, v(n, a.defaults);
|
|
377
358
|
}
|
|
378
359
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
379
360
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -382,51 +363,51 @@ var je = [], Me = { initializeByDefault: !0 }, Ne = {
|
|
|
382
363
|
},
|
|
383
364
|
getEventProperties: function(e, t) {
|
|
384
365
|
var n = {};
|
|
385
|
-
return
|
|
386
|
-
typeof r.eventProperties == "function" &&
|
|
366
|
+
return De.forEach(function(r) {
|
|
367
|
+
typeof r.eventProperties == "function" && v(n, r.eventProperties.call(t[r.pluginName], e));
|
|
387
368
|
}), n;
|
|
388
369
|
},
|
|
389
370
|
modifyOption: function(e, t, n) {
|
|
390
371
|
var r;
|
|
391
|
-
return
|
|
372
|
+
return De.forEach(function(i) {
|
|
392
373
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
393
374
|
}), r;
|
|
394
375
|
}
|
|
395
376
|
};
|
|
396
|
-
function
|
|
377
|
+
function Ae(e) {
|
|
397
378
|
var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
|
|
398
379
|
if (t ||= n && n[R], t) {
|
|
399
380
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
400
|
-
window.CustomEvent && !
|
|
381
|
+
window.CustomEvent && !E && !D ? h = new CustomEvent(r, {
|
|
401
382
|
bubbles: !0,
|
|
402
383
|
cancelable: !0
|
|
403
384
|
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
404
|
-
var v =
|
|
385
|
+
var v = b(b({}, m), ke.getEventProperties(r, t));
|
|
405
386
|
for (var y in v) h[y] = v[y];
|
|
406
387
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
407
388
|
}
|
|
408
389
|
}
|
|
409
|
-
var
|
|
410
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
411
|
-
|
|
390
|
+
var je = ["evt"], z = function(e, t) {
|
|
391
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = x(n, je);
|
|
392
|
+
ke.pluginEvent.bind(Q)(e, t, b({
|
|
412
393
|
dragEl: V,
|
|
413
394
|
parentEl: H,
|
|
414
395
|
ghostEl: U,
|
|
415
396
|
rootEl: W,
|
|
416
|
-
nextEl:
|
|
417
|
-
lastDownEl:
|
|
397
|
+
nextEl: Me,
|
|
398
|
+
lastDownEl: Ne,
|
|
418
399
|
cloneEl: G,
|
|
419
400
|
cloneHidden: K,
|
|
420
|
-
dragStarted:
|
|
401
|
+
dragStarted: Ge,
|
|
421
402
|
putSortable: Y,
|
|
422
403
|
activeSortable: Q.active,
|
|
423
404
|
originalEvent: r,
|
|
424
|
-
oldIndex:
|
|
425
|
-
oldDraggableIndex:
|
|
405
|
+
oldIndex: Pe,
|
|
406
|
+
oldDraggableIndex: Fe,
|
|
426
407
|
newIndex: q,
|
|
427
408
|
newDraggableIndex: J,
|
|
428
|
-
hideGhostForTarget:
|
|
429
|
-
unhideGhostForTarget:
|
|
409
|
+
hideGhostForTarget: lt,
|
|
410
|
+
unhideGhostForTarget: ut,
|
|
430
411
|
cloneNowHidden: function() {
|
|
431
412
|
K = !0;
|
|
432
413
|
},
|
|
@@ -443,45 +424,45 @@ var Fe = ["evt"], z = function(e, t) {
|
|
|
443
424
|
}, i));
|
|
444
425
|
};
|
|
445
426
|
function B(e) {
|
|
446
|
-
|
|
427
|
+
Ae(b({
|
|
447
428
|
putSortable: Y,
|
|
448
429
|
cloneEl: G,
|
|
449
430
|
targetEl: V,
|
|
450
431
|
rootEl: W,
|
|
451
|
-
oldIndex:
|
|
452
|
-
oldDraggableIndex:
|
|
432
|
+
oldIndex: Pe,
|
|
433
|
+
oldDraggableIndex: Fe,
|
|
453
434
|
newIndex: q,
|
|
454
435
|
newDraggableIndex: J
|
|
455
436
|
}, e));
|
|
456
437
|
}
|
|
457
|
-
var V, H, U, W,
|
|
458
|
-
if (
|
|
459
|
-
if (
|
|
438
|
+
var V, H, U, W, Me, Ne, G, K, Pe, q, Fe, J, Ie, Y, Le = !1, Re = !1, ze = [], Be, X, Ve, He, Ue, We, Ge, Ke, qe, Je = !1, Ye = !1, Xe, Z, Ze = [], Qe = !1, $e = [], et = typeof document < "u", tt = re, nt = D || E ? "cssFloat" : "float", rt = et && !ie && !re && "draggable" in document.createElement("div"), it = function() {
|
|
439
|
+
if (et) {
|
|
440
|
+
if (E) return !1;
|
|
460
441
|
var e = document.createElement("x");
|
|
461
442
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
462
443
|
}
|
|
463
|
-
}(),
|
|
464
|
-
var n = N(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
444
|
+
}(), at = function(e, t) {
|
|
445
|
+
var n = N(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = fe(e, 0, t), a = fe(e, 1, t), o = i && N(i), s = a && N(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + F(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + F(a).width;
|
|
465
446
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
466
447
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
467
448
|
if (i && o.float && o.float !== "none") {
|
|
468
449
|
var u = o.float === "left" ? "left" : "right";
|
|
469
450
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
470
451
|
}
|
|
471
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
472
|
-
},
|
|
452
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[nt] === "none" || a && n[nt] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
453
|
+
}, ot = function(e, t, n) {
|
|
473
454
|
var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
474
455
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
475
|
-
},
|
|
456
|
+
}, st = function(e, t) {
|
|
476
457
|
var n;
|
|
477
|
-
return
|
|
458
|
+
return ze.some(function(r) {
|
|
478
459
|
var i = r[R].options.emptyInsertThreshold;
|
|
479
|
-
if (!(!i ||
|
|
460
|
+
if (!(!i || pe(r))) {
|
|
480
461
|
var a = F(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
481
462
|
if (o && s) return n = r;
|
|
482
463
|
}
|
|
483
464
|
}), n;
|
|
484
|
-
},
|
|
465
|
+
}, ct = function(e) {
|
|
485
466
|
function t(e, n) {
|
|
486
467
|
return function(r, i, a, o) {
|
|
487
468
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -494,31 +475,31 @@ var V, H, U, W, Ie, Le, G, K, Re, q, ze, J, Be, Y, Ve = !1, He = !1, Ue = [], We
|
|
|
494
475
|
};
|
|
495
476
|
}
|
|
496
477
|
var n = {}, r = e.group;
|
|
497
|
-
(!r ||
|
|
498
|
-
},
|
|
499
|
-
!
|
|
500
|
-
},
|
|
501
|
-
!
|
|
478
|
+
(!r || w(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
|
|
479
|
+
}, lt = function() {
|
|
480
|
+
!it && U && N(U, "display", "none");
|
|
481
|
+
}, ut = function() {
|
|
482
|
+
!it && U && N(U, "display", "");
|
|
502
483
|
};
|
|
503
|
-
|
|
504
|
-
if (
|
|
484
|
+
et && !ie && document.addEventListener("click", function(e) {
|
|
485
|
+
if (Re) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Re = !1, !1;
|
|
505
486
|
}, !0);
|
|
506
|
-
var
|
|
487
|
+
var dt = function(e) {
|
|
507
488
|
if (V) {
|
|
508
489
|
e = e.touches ? e.touches[0] : e;
|
|
509
|
-
var t =
|
|
490
|
+
var t = st(e.clientX, e.clientY);
|
|
510
491
|
if (t) {
|
|
511
492
|
var n = {};
|
|
512
493
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
513
494
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[R]._onDragOver(n);
|
|
514
495
|
}
|
|
515
496
|
}
|
|
516
|
-
},
|
|
497
|
+
}, ft = function(e) {
|
|
517
498
|
V && V.parentNode[R]._isOutsideThisEl(e.target);
|
|
518
499
|
};
|
|
519
500
|
function Q(e, t) {
|
|
520
501
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
521
|
-
this.el = e, this.options = t =
|
|
502
|
+
this.el = e, this.options = t = v({}, t), e[R] = this;
|
|
522
503
|
var n = {
|
|
523
504
|
group: null,
|
|
524
505
|
sort: !0,
|
|
@@ -531,7 +512,7 @@ function Q(e, t) {
|
|
|
531
512
|
invertedSwapThreshold: null,
|
|
532
513
|
removeCloneOnHide: !0,
|
|
533
514
|
direction: function() {
|
|
534
|
-
return
|
|
515
|
+
return at(e, this.options);
|
|
535
516
|
},
|
|
536
517
|
ghostClass: "sortable-ghost",
|
|
537
518
|
chosenClass: "sortable-chosen",
|
|
@@ -558,17 +539,17 @@ function Q(e, t) {
|
|
|
558
539
|
x: 0,
|
|
559
540
|
y: 0
|
|
560
541
|
},
|
|
561
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && (!
|
|
542
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && (!ne || re),
|
|
562
543
|
emptyInsertThreshold: 5
|
|
563
544
|
};
|
|
564
|
-
for (var r in
|
|
565
|
-
for (var i in
|
|
566
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
545
|
+
for (var r in ke.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
546
|
+
for (var i in ct(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
547
|
+
this.nativeDraggable = t.forceFallback ? !1 : rt, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? k(e, "pointerdown", this._onTapStart) : (k(e, "mousedown", this._onTapStart), k(e, "touchstart", this._onTapStart)), this.nativeDraggable && (k(e, "dragover", this), k(e, "dragenter", this)), ze.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), v(this, we());
|
|
567
548
|
}
|
|
568
549
|
Q.prototype = {
|
|
569
550
|
constructor: Q,
|
|
570
551
|
_isOutsideThisEl: function(e) {
|
|
571
|
-
!this.el.contains(e) && e !== this.el && (
|
|
552
|
+
!this.el.contains(e) && e !== this.el && (Ke = null);
|
|
572
553
|
},
|
|
573
554
|
_getDirection: function(e, t) {
|
|
574
555
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, V) : this.options.direction;
|
|
@@ -576,8 +557,8 @@ Q.prototype = {
|
|
|
576
557
|
_onTapStart: function(e) {
|
|
577
558
|
if (e.cancelable) {
|
|
578
559
|
var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
|
|
579
|
-
if (
|
|
580
|
-
if (
|
|
560
|
+
if (St(n), !V && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ne && s && s.tagName.toUpperCase() === "SELECT") && (s = j(s, r.draggable, n, !1), !(s && s.animated) && Ne !== s)) {
|
|
561
|
+
if (Pe = I(s), Fe = I(s, r.draggable), typeof l == "function") {
|
|
581
562
|
if (l.call(this, e, s, this)) {
|
|
582
563
|
B({
|
|
583
564
|
sortable: t,
|
|
@@ -610,23 +591,23 @@ Q.prototype = {
|
|
|
610
591
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
611
592
|
if (n && !V && n.parentNode === i) {
|
|
612
593
|
var c = F(n);
|
|
613
|
-
if (W = i, V = n, H = V.parentNode,
|
|
594
|
+
if (W = i, V = n, H = V.parentNode, Me = V.nextSibling, Ne = n, Ie = a.group, Q.dragged = V, Be = {
|
|
614
595
|
target: V,
|
|
615
596
|
clientX: (t || e).clientX,
|
|
616
597
|
clientY: (t || e).clientY
|
|
617
|
-
},
|
|
598
|
+
}, Ue = Be.clientX - c.left, We = Be.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, V.style["will-change"] = "all", s = function() {
|
|
618
599
|
if (z("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
619
600
|
r._onDrop();
|
|
620
601
|
return;
|
|
621
602
|
}
|
|
622
|
-
r._disableDelayedDragEvents(), !
|
|
603
|
+
r._disableDelayedDragEvents(), !O && r.nativeDraggable && (V.draggable = !0), r._triggerDragStart(e, t), B({
|
|
623
604
|
sortable: r,
|
|
624
605
|
name: "choose",
|
|
625
606
|
originalEvent: e
|
|
626
607
|
}), M(V, a.chosenClass, !0);
|
|
627
608
|
}, a.ignore.split(",").forEach(function(e) {
|
|
628
|
-
|
|
629
|
-
}), k(o, "dragover",
|
|
609
|
+
ue(V, e.trim(), ht);
|
|
610
|
+
}), k(o, "dragover", dt), k(o, "mousemove", dt), k(o, "touchmove", dt), a.supportPointer ? (k(o, "pointerup", r._onDrop), !this.nativeDraggable && k(o, "pointercancel", r._onDrop)) : (k(o, "mouseup", r._onDrop), k(o, "touchend", r._onDrop), k(o, "touchcancel", r._onDrop)), O && this.nativeDraggable && (this.options.touchStartThreshold = 4, V.draggable = !0), z("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(D || E))) {
|
|
630
611
|
if (Q.eventCanceled) {
|
|
631
612
|
this._onDrop();
|
|
632
613
|
return;
|
|
@@ -640,7 +621,7 @@ Q.prototype = {
|
|
|
640
621
|
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
641
622
|
},
|
|
642
623
|
_disableDelayedDrag: function() {
|
|
643
|
-
V &&
|
|
624
|
+
V && ht(V), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
644
625
|
},
|
|
645
626
|
_disableDelayedDragEvents: function() {
|
|
646
627
|
var e = this.el.ownerDocument;
|
|
@@ -649,14 +630,14 @@ Q.prototype = {
|
|
|
649
630
|
_triggerDragStart: function(e, t) {
|
|
650
631
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? k(document, "pointermove", this._onTouchMove) : t ? k(document, "touchmove", this._onTouchMove) : k(document, "mousemove", this._onTouchMove) : (k(V, "dragend", this), k(W, "dragstart", this._onDragStart));
|
|
651
632
|
try {
|
|
652
|
-
document.selection ?
|
|
633
|
+
document.selection ? Ct(function() {
|
|
653
634
|
document.selection.empty();
|
|
654
635
|
}) : window.getSelection().removeAllRanges();
|
|
655
636
|
} catch {}
|
|
656
637
|
},
|
|
657
638
|
_dragStarted: function(e, t) {
|
|
658
|
-
if (
|
|
659
|
-
z("dragStarted", this, { evt: t }), this.nativeDraggable && k(document, "dragover",
|
|
639
|
+
if (Le = !1, W && V) {
|
|
640
|
+
z("dragStarted", this, { evt: t }), this.nativeDraggable && k(document, "dragover", ft);
|
|
660
641
|
var n = this.options;
|
|
661
642
|
!e && M(V, n.dragClass, !1), M(V, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), B({
|
|
662
643
|
sortable: this,
|
|
@@ -667,7 +648,7 @@ Q.prototype = {
|
|
|
667
648
|
},
|
|
668
649
|
_emulateDragOver: function() {
|
|
669
650
|
if (X) {
|
|
670
|
-
this._lastX = X.clientX, this._lastY = X.clientY,
|
|
651
|
+
this._lastX = X.clientX, this._lastY = X.clientY, lt();
|
|
671
652
|
for (var e = document.elementFromPoint(X.clientX, X.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(X.clientX, X.clientY), e !== t);) t = e;
|
|
672
653
|
if (V.parentNode[R]._isOutsideThisEl(e), t) do {
|
|
673
654
|
if (t[R]) {
|
|
@@ -680,19 +661,19 @@ Q.prototype = {
|
|
|
680
661
|
}), n && !this.options.dragoverBubble) break;
|
|
681
662
|
}
|
|
682
663
|
e = t;
|
|
683
|
-
} while (t =
|
|
684
|
-
|
|
664
|
+
} while (t = se(t));
|
|
665
|
+
ut();
|
|
685
666
|
}
|
|
686
667
|
},
|
|
687
668
|
_onTouchMove: function(e) {
|
|
688
|
-
if (
|
|
689
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = U &&
|
|
690
|
-
if (!Q.active && !
|
|
669
|
+
if (Be) {
|
|
670
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = U && le(U, !0), o = U && a && a.a, s = U && a && a.d, c = tt && Z && me(Z), l = (i.clientX - Be.clientX + r.x) / (o || 1) + (c ? c[0] - Ze[0] : 0) / (o || 1), u = (i.clientY - Be.clientY + r.y) / (s || 1) + (c ? c[1] - Ze[1] : 0) / (s || 1);
|
|
671
|
+
if (!Q.active && !Le) {
|
|
691
672
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
692
673
|
this._onDragStart(e, !0);
|
|
693
674
|
}
|
|
694
675
|
if (U) {
|
|
695
|
-
a ? (a.e += l - (
|
|
676
|
+
a ? (a.e += l - (Ve || 0), a.f += u - (He || 0)) : a = {
|
|
696
677
|
a: 1,
|
|
697
678
|
b: 0,
|
|
698
679
|
c: 0,
|
|
@@ -701,19 +682,19 @@ Q.prototype = {
|
|
|
701
682
|
f: u
|
|
702
683
|
};
|
|
703
684
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
704
|
-
N(U, "webkitTransform", d), N(U, "mozTransform", d), N(U, "msTransform", d), N(U, "transform", d),
|
|
685
|
+
N(U, "webkitTransform", d), N(U, "mozTransform", d), N(U, "msTransform", d), N(U, "transform", d), Ve = l, He = u, X = i;
|
|
705
686
|
}
|
|
706
687
|
e.cancelable && e.preventDefault();
|
|
707
688
|
}
|
|
708
689
|
},
|
|
709
690
|
_appendGhost: function() {
|
|
710
691
|
if (!U) {
|
|
711
|
-
var e = this.options.fallbackOnBody ? document.body : W, t = F(V, !0,
|
|
712
|
-
if (
|
|
692
|
+
var e = this.options.fallbackOnBody ? document.body : W, t = F(V, !0, tt, !0, e), n = this.options;
|
|
693
|
+
if (tt) {
|
|
713
694
|
for (Z = e; N(Z, "position") === "static" && N(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
714
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = P()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = P(),
|
|
695
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = P()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = P(), Ze = me(Z);
|
|
715
696
|
}
|
|
716
|
-
U = V.cloneNode(!0), M(U, n.ghostClass, !1), M(U, n.fallbackClass, !0), M(U, n.dragClass, !0), N(U, "transition", ""), N(U, "transform", ""), N(U, "box-sizing", "border-box"), N(U, "margin", 0), N(U, "top", t.top), N(U, "left", t.left), N(U, "width", t.width), N(U, "height", t.height), N(U, "opacity", "0.8"), N(U, "position",
|
|
697
|
+
U = V.cloneNode(!0), M(U, n.ghostClass, !1), M(U, n.fallbackClass, !0), M(U, n.dragClass, !0), N(U, "transition", ""), N(U, "transform", ""), N(U, "box-sizing", "border-box"), N(U, "margin", 0), N(U, "top", t.top), N(U, "left", t.left), N(U, "width", t.width), N(U, "height", t.height), N(U, "opacity", "0.8"), N(U, "position", tt ? "absolute" : "fixed"), N(U, "zIndex", "100000"), N(U, "pointerEvents", "none"), Q.ghost = U, e.appendChild(U), N(U, "transform-origin", Ue / parseInt(U.style.width) * 100 + "% " + We / parseInt(U.style.height) * 100 + "%");
|
|
717
698
|
}
|
|
718
699
|
},
|
|
719
700
|
_onDragStart: function(e, t) {
|
|
@@ -722,18 +703,18 @@ Q.prototype = {
|
|
|
722
703
|
this._onDrop();
|
|
723
704
|
return;
|
|
724
705
|
}
|
|
725
|
-
z("setupClone", this), Q.eventCanceled || (G =
|
|
706
|
+
z("setupClone", this), Q.eventCanceled || (G = Se(V), G.removeAttribute("id"), G.draggable = !1, G.style["will-change"] = "", this._hideClone(), M(G, this.options.chosenClass, !1), Q.clone = G), n.cloneId = Ct(function() {
|
|
726
707
|
z("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || W.insertBefore(G, V), n._hideClone(), B({
|
|
727
708
|
sortable: n,
|
|
728
709
|
name: "clone"
|
|
729
710
|
}));
|
|
730
|
-
}), !t && M(V, i.dragClass, !0), t ? (
|
|
711
|
+
}), !t && M(V, i.dragClass, !0), t ? (Re = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (A(document, "mouseup", n._onDrop), A(document, "touchend", n._onDrop), A(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, V)), k(document, "drop", n), N(V, "transform", "translateZ(0)")), Le = !0, n._dragStartId = Ct(n._dragStarted.bind(n, t, e)), k(document, "selectstart", n), Ge = !0, window.getSelection().removeAllRanges(), ne && N(document.body, "user-select", "none");
|
|
731
712
|
},
|
|
732
713
|
_onDragOver: function(e) {
|
|
733
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
734
|
-
if (
|
|
714
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Ie === s, u = o.sort, d = Y || c, f, p = this, m = !1;
|
|
715
|
+
if (Qe) return;
|
|
735
716
|
function h(o, s) {
|
|
736
|
-
z(o, p,
|
|
717
|
+
z(o, p, b({
|
|
737
718
|
evt: e,
|
|
738
719
|
isOwner: l,
|
|
739
720
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -745,7 +726,7 @@ Q.prototype = {
|
|
|
745
726
|
target: n,
|
|
746
727
|
completed: _,
|
|
747
728
|
onMove: function(n, i) {
|
|
748
|
-
return
|
|
729
|
+
return mt(W, t, V, r, n, F(n), e, i);
|
|
749
730
|
},
|
|
750
731
|
changed: v
|
|
751
732
|
}, s));
|
|
@@ -756,7 +737,7 @@ Q.prototype = {
|
|
|
756
737
|
function _(r) {
|
|
757
738
|
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (M(V, Y ? Y.options.ghostClass : c.options.ghostClass, !1), M(V, o.ghostClass, !0)), Y !== p && p !== Q.active ? Y = p : p === Q.active && Y && (Y = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
758
739
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
759
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === V && !V.animated || n === t && !n.animated) && (
|
|
740
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === V && !V.animated || n === t && !n.animated) && (Ke = null), !o.dragoverBubble && !e.rootEl && n !== document && (V.parentNode[R]._isOutsideThisEl(e.target), !r && dt(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
760
741
|
}
|
|
761
742
|
function v() {
|
|
762
743
|
q = I(V), J = I(V, o.draggable), B({
|
|
@@ -770,34 +751,34 @@ Q.prototype = {
|
|
|
770
751
|
}
|
|
771
752
|
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = j(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
772
753
|
if (V.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
773
|
-
if (
|
|
754
|
+
if (Re = !1, c && !o.disabled && (l ? u || (a = H !== W) : Y === this || (this.lastPutMode = Ie.checkPull(this, c, V, e)) && s.checkPut(this, c, V, e))) {
|
|
774
755
|
if (f = this._getDirection(e, n) === "vertical", r = F(V), h("dragOverValid"), Q.eventCanceled) return m;
|
|
775
|
-
if (a) return H = W, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
776
|
-
var y =
|
|
777
|
-
if (!y ||
|
|
756
|
+
if (a) return H = W, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Me ? W.insertBefore(V, Me) : W.appendChild(V)), _(!0);
|
|
757
|
+
var y = pe(t, o.draggable);
|
|
758
|
+
if (!y || vt(e, f, this) && !y.animated) {
|
|
778
759
|
if (y === V) return _(!1);
|
|
779
|
-
if (y && t === e.target && (n = y), n && (i = F(n)),
|
|
780
|
-
} else if (y &&
|
|
781
|
-
var
|
|
782
|
-
if (
|
|
783
|
-
if (n =
|
|
760
|
+
if (y && t === e.target && (n = y), n && (i = F(n)), mt(W, t, V, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(V, y.nextSibling) : t.appendChild(V), H = t, v(), _(!0);
|
|
761
|
+
} else if (y && _t(e, f, this)) {
|
|
762
|
+
var x = fe(t, 0, o, !0);
|
|
763
|
+
if (x === V) return _(!1);
|
|
764
|
+
if (n = x, i = F(n), mt(W, t, V, r, n, i, e, !1) !== !1) return g(), t.insertBefore(V, x), H = t, v(), _(!0);
|
|
784
765
|
} else if (n.parentNode === t) {
|
|
785
766
|
i = F(n);
|
|
786
|
-
var
|
|
787
|
-
|
|
788
|
-
var
|
|
789
|
-
if (
|
|
790
|
-
var
|
|
767
|
+
var S = 0, C, ee = V.parentNode !== t, w = !ot(V.animated && V.toRect || r, n.animated && n.toRect || i, f), te = f ? "top" : "left", T = de(n, "top", "top") || de(V, "top", "top"), E = T ? T.scrollTop : void 0;
|
|
768
|
+
Ke !== n && (C = i[te], Je = !1, Ye = !w && o.invertSwap || ee), S = yt(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Ye, Ke === n);
|
|
769
|
+
var D;
|
|
770
|
+
if (S !== 0) {
|
|
771
|
+
var O = I(V);
|
|
791
772
|
do
|
|
792
|
-
|
|
793
|
-
while (
|
|
773
|
+
O -= S, D = H.children[O];
|
|
774
|
+
while (D && (N(D, "display") === "none" || D === U));
|
|
794
775
|
}
|
|
795
|
-
if (
|
|
796
|
-
|
|
797
|
-
var
|
|
798
|
-
|
|
799
|
-
var
|
|
800
|
-
if (
|
|
776
|
+
if (S === 0 || D === n) return _(!1);
|
|
777
|
+
Ke = n, qe = S;
|
|
778
|
+
var ne = n.nextElementSibling, re = !1;
|
|
779
|
+
re = S === 1;
|
|
780
|
+
var ie = mt(W, t, V, r, n, i, e, re);
|
|
781
|
+
if (ie !== !1) return (ie === 1 || ie === -1) && (re = ie === 1), Qe = !0, setTimeout(gt, 30), g(), re && !ne ? t.appendChild(V) : n.parentNode.insertBefore(V, re ? ne : n), T && xe(T, 0, E - T.scrollTop), H = V.parentNode, C !== void 0 && !Ye && (Xe = Math.abs(C - F(n)[te])), v(), _(!0);
|
|
801
782
|
}
|
|
802
783
|
if (t.contains(V)) return _(!1);
|
|
803
784
|
}
|
|
@@ -805,7 +786,7 @@ Q.prototype = {
|
|
|
805
786
|
},
|
|
806
787
|
_ignoreWhileAnimating: null,
|
|
807
788
|
_offMoveEvents: function() {
|
|
808
|
-
A(document, "mousemove", this._onTouchMove), A(document, "touchmove", this._onTouchMove), A(document, "pointermove", this._onTouchMove), A(document, "dragover",
|
|
789
|
+
A(document, "mousemove", this._onTouchMove), A(document, "touchmove", this._onTouchMove), A(document, "pointermove", this._onTouchMove), A(document, "dragover", dt), A(document, "mousemove", dt), A(document, "touchmove", dt);
|
|
809
790
|
},
|
|
810
791
|
_offUpEvents: function() {
|
|
811
792
|
var e = this.el.ownerDocument;
|
|
@@ -817,14 +798,14 @@ Q.prototype = {
|
|
|
817
798
|
this._nulling();
|
|
818
799
|
return;
|
|
819
800
|
}
|
|
820
|
-
|
|
801
|
+
Le = !1, Ye = !1, Je = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), wt(this.cloneId), wt(this._dragStartId), this.nativeDraggable && (A(document, "drop", this), A(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ne && N(document.body, "user-select", ""), N(V, "transform", ""), e && (Ge && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), U && U.parentNode && U.parentNode.removeChild(U), (W === H || Y && Y.lastPutMode !== "clone") && G && G.parentNode && G.parentNode.removeChild(G), V && (this.nativeDraggable && A(V, "dragend", this), ht(V), V.style["will-change"] = "", Ge && !Le && M(V, Y ? Y.options.ghostClass : this.options.ghostClass, !1), M(V, this.options.chosenClass, !1), B({
|
|
821
802
|
sortable: this,
|
|
822
803
|
name: "unchoose",
|
|
823
804
|
toEl: H,
|
|
824
805
|
newIndex: null,
|
|
825
806
|
newDraggableIndex: null,
|
|
826
807
|
originalEvent: e
|
|
827
|
-
}), W === H ? q !==
|
|
808
|
+
}), W === H ? q !== Pe && q >= 0 && (B({
|
|
828
809
|
sortable: this,
|
|
829
810
|
name: "update",
|
|
830
811
|
toEl: H,
|
|
@@ -856,7 +837,7 @@ Q.prototype = {
|
|
|
856
837
|
name: "sort",
|
|
857
838
|
toEl: H,
|
|
858
839
|
originalEvent: e
|
|
859
|
-
})), Y && Y.save()), Q.active && ((q == null || q === -1) && (q =
|
|
840
|
+
})), Y && Y.save()), Q.active && ((q == null || q === -1) && (q = Pe, J = Fe), B({
|
|
860
841
|
sortable: this,
|
|
861
842
|
name: "end",
|
|
862
843
|
toEl: H,
|
|
@@ -864,11 +845,11 @@ Q.prototype = {
|
|
|
864
845
|
}), this.save()))), this._nulling();
|
|
865
846
|
},
|
|
866
847
|
_nulling: function() {
|
|
867
|
-
z("nulling", this), W = V = H = U =
|
|
848
|
+
z("nulling", this), W = V = H = U = Me = G = Ne = K = Be = X = Ge = q = J = Pe = Fe = Ke = qe = Y = Ie = Q.dragged = Q.ghost = Q.clone = Q.active = null;
|
|
868
849
|
var e = this.el;
|
|
869
|
-
|
|
850
|
+
$e.forEach(function(t) {
|
|
870
851
|
e.contains(t) && (t.checked = !0);
|
|
871
|
-
}),
|
|
852
|
+
}), $e.length = Ve = He = 0;
|
|
872
853
|
},
|
|
873
854
|
handleEvent: function(e) {
|
|
874
855
|
switch (e.type) {
|
|
@@ -878,7 +859,7 @@ Q.prototype = {
|
|
|
878
859
|
break;
|
|
879
860
|
case "dragenter":
|
|
880
861
|
case "dragover":
|
|
881
|
-
V && (this._onDragOver(e),
|
|
862
|
+
V && (this._onDragOver(e), pt(e));
|
|
882
863
|
break;
|
|
883
864
|
case "selectstart":
|
|
884
865
|
e.preventDefault();
|
|
@@ -886,7 +867,7 @@ Q.prototype = {
|
|
|
886
867
|
}
|
|
887
868
|
},
|
|
888
869
|
toArray: function() {
|
|
889
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], j(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) ||
|
|
870
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], j(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || xt(t));
|
|
890
871
|
return e;
|
|
891
872
|
},
|
|
892
873
|
sort: function(e, t) {
|
|
@@ -908,15 +889,15 @@ Q.prototype = {
|
|
|
908
889
|
option: function(e, t) {
|
|
909
890
|
var n = this.options;
|
|
910
891
|
if (t === void 0) return n[e];
|
|
911
|
-
var r =
|
|
912
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
892
|
+
var r = ke.modifyOption(this, e, t);
|
|
893
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && ct(n);
|
|
913
894
|
},
|
|
914
895
|
destroy: function() {
|
|
915
896
|
z("destroy", this);
|
|
916
897
|
var e = this.el;
|
|
917
898
|
e[R] = null, A(e, "mousedown", this._onTapStart), A(e, "touchstart", this._onTapStart), A(e, "pointerdown", this._onTapStart), this.nativeDraggable && (A(e, "dragover", this), A(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
918
899
|
e.removeAttribute("draggable");
|
|
919
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
900
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), ze.splice(ze.indexOf(this.el), 1), this.el = e = null;
|
|
920
901
|
},
|
|
921
902
|
_hideClone: function() {
|
|
922
903
|
if (!K) {
|
|
@@ -931,84 +912,84 @@ Q.prototype = {
|
|
|
931
912
|
}
|
|
932
913
|
if (K) {
|
|
933
914
|
if (z("showClone", this), Q.eventCanceled) return;
|
|
934
|
-
V.parentNode == W && !this.options.group.revertClone ? W.insertBefore(G, V) :
|
|
915
|
+
V.parentNode == W && !this.options.group.revertClone ? W.insertBefore(G, V) : Me ? W.insertBefore(G, Me) : W.appendChild(G), this.options.group.revertClone && this.animate(V, G), N(G, "display", ""), K = !1;
|
|
935
916
|
}
|
|
936
917
|
}
|
|
937
918
|
};
|
|
938
|
-
function
|
|
919
|
+
function pt(e) {
|
|
939
920
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
940
921
|
}
|
|
941
|
-
function
|
|
922
|
+
function mt(e, t, n, r, i, a, o, s) {
|
|
942
923
|
var c, l = e[R], u = l.options.onMove, d;
|
|
943
|
-
return window.CustomEvent && !
|
|
924
|
+
return window.CustomEvent && !E && !D ? c = new CustomEvent("move", {
|
|
944
925
|
bubbles: !0,
|
|
945
926
|
cancelable: !0
|
|
946
927
|
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || F(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
947
928
|
}
|
|
948
|
-
function
|
|
929
|
+
function ht(e) {
|
|
949
930
|
e.draggable = !1;
|
|
950
931
|
}
|
|
951
|
-
function
|
|
952
|
-
|
|
932
|
+
function gt() {
|
|
933
|
+
Qe = !1;
|
|
953
934
|
}
|
|
954
|
-
function
|
|
955
|
-
var r = F(
|
|
935
|
+
function _t(e, t, n) {
|
|
936
|
+
var r = F(fe(n.el, 0, n.options, !0)), i = Ce(n.el, n.options, U), a = 10;
|
|
956
937
|
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
957
938
|
}
|
|
958
|
-
function
|
|
959
|
-
var r = F(
|
|
939
|
+
function vt(e, t, n) {
|
|
940
|
+
var r = F(pe(n.el, n.options.draggable)), i = Ce(n.el, n.options, U), a = 10;
|
|
960
941
|
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
961
942
|
}
|
|
962
|
-
function
|
|
943
|
+
function yt(e, t, n, r, i, a, o, s) {
|
|
963
944
|
var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
|
|
964
945
|
if (!o) {
|
|
965
|
-
if (s &&
|
|
966
|
-
if (!
|
|
967
|
-
else if (
|
|
968
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
946
|
+
if (s && Xe < l * i) {
|
|
947
|
+
if (!Je && (qe === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Je = !0), Je) f = !0;
|
|
948
|
+
else if (qe === 1 ? c < u + Xe : c > d - Xe) return -qe;
|
|
949
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return bt(t);
|
|
969
950
|
}
|
|
970
951
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
971
952
|
}
|
|
972
|
-
function
|
|
953
|
+
function bt(e) {
|
|
973
954
|
return I(V) < I(e) ? 1 : -1;
|
|
974
955
|
}
|
|
975
|
-
function
|
|
956
|
+
function xt(e) {
|
|
976
957
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
977
958
|
return r.toString(36);
|
|
978
959
|
}
|
|
979
|
-
function
|
|
980
|
-
|
|
960
|
+
function St(e) {
|
|
961
|
+
$e.length = 0;
|
|
981
962
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
982
963
|
var r = t[n];
|
|
983
|
-
r.checked &&
|
|
964
|
+
r.checked && $e.push(r);
|
|
984
965
|
}
|
|
985
966
|
}
|
|
986
|
-
function
|
|
967
|
+
function Ct(e) {
|
|
987
968
|
return setTimeout(e, 0);
|
|
988
969
|
}
|
|
989
|
-
function
|
|
970
|
+
function wt(e) {
|
|
990
971
|
return clearTimeout(e);
|
|
991
972
|
}
|
|
992
|
-
|
|
993
|
-
(Q.active ||
|
|
973
|
+
et && k(document, "touchmove", function(e) {
|
|
974
|
+
(Q.active || Le) && e.cancelable && e.preventDefault();
|
|
994
975
|
}), Q.utils = {
|
|
995
976
|
on: k,
|
|
996
977
|
off: A,
|
|
997
978
|
css: N,
|
|
998
|
-
find:
|
|
979
|
+
find: ue,
|
|
999
980
|
is: function(e, t) {
|
|
1000
981
|
return !!j(e, t, e, !1);
|
|
1001
982
|
},
|
|
1002
|
-
extend:
|
|
1003
|
-
throttle:
|
|
983
|
+
extend: ge,
|
|
984
|
+
throttle: ye,
|
|
1004
985
|
closest: j,
|
|
1005
986
|
toggleClass: M,
|
|
1006
|
-
clone:
|
|
987
|
+
clone: Se,
|
|
1007
988
|
index: I,
|
|
1008
|
-
nextTick:
|
|
1009
|
-
cancelNextTick:
|
|
1010
|
-
detectDirection:
|
|
1011
|
-
getChild:
|
|
989
|
+
nextTick: Ct,
|
|
990
|
+
cancelNextTick: wt,
|
|
991
|
+
detectDirection: at,
|
|
992
|
+
getChild: fe,
|
|
1012
993
|
expando: R
|
|
1013
994
|
}, Q.get = function(e) {
|
|
1014
995
|
return e[R];
|
|
@@ -1016,13 +997,13 @@ it && k(document, "touchmove", function(e) {
|
|
|
1016
997
|
var e = [...arguments];
|
|
1017
998
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
1018
999
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
1019
|
-
e.utils && (Q.utils =
|
|
1000
|
+
e.utils && (Q.utils = b(b({}, Q.utils), e.utils)), ke.mount(e);
|
|
1020
1001
|
});
|
|
1021
1002
|
}, Q.create = function(e, t) {
|
|
1022
1003
|
return new Q(e, t);
|
|
1023
|
-
}, Q.version =
|
|
1024
|
-
var $ = [],
|
|
1025
|
-
function
|
|
1004
|
+
}, Q.version = te;
|
|
1005
|
+
var $ = [], Tt, Et, Dt = !1, Ot, kt, At, jt;
|
|
1006
|
+
function Mt() {
|
|
1026
1007
|
function e() {
|
|
1027
1008
|
for (var e in this.defaults = {
|
|
1028
1009
|
scroll: !0,
|
|
@@ -1042,63 +1023,63 @@ function It() {
|
|
|
1042
1023
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1043
1024
|
},
|
|
1044
1025
|
drop: function() {
|
|
1045
|
-
this.sortable.nativeDraggable ? A(document, "dragover", this._handleAutoScroll) : (A(document, "pointermove", this._handleFallbackAutoScroll), A(document, "touchmove", this._handleFallbackAutoScroll), A(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
1026
|
+
this.sortable.nativeDraggable ? A(document, "dragover", this._handleAutoScroll) : (A(document, "pointermove", this._handleFallbackAutoScroll), A(document, "touchmove", this._handleFallbackAutoScroll), A(document, "mousemove", this._handleFallbackAutoScroll)), Pt(), Nt(), be();
|
|
1046
1027
|
},
|
|
1047
1028
|
nulling: function() {
|
|
1048
|
-
|
|
1029
|
+
At = Et = Tt = Dt = jt = Ot = kt = null, $.length = 0;
|
|
1049
1030
|
},
|
|
1050
1031
|
_handleFallbackAutoScroll: function(e) {
|
|
1051
1032
|
this._handleAutoScroll(e, !0);
|
|
1052
1033
|
},
|
|
1053
1034
|
_handleAutoScroll: function(e, t) {
|
|
1054
1035
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
1055
|
-
if (
|
|
1056
|
-
|
|
1036
|
+
if (At = e, t || this.options.forceAutoScrollFallback || D || E || ne) {
|
|
1037
|
+
Ft(e, this.options, a, t);
|
|
1057
1038
|
var o = L(a, !0);
|
|
1058
|
-
|
|
1039
|
+
Dt && (!jt || r !== Ot || i !== kt) && (jt && Pt(), jt = setInterval(function() {
|
|
1059
1040
|
var a = L(document.elementFromPoint(r, i), !0);
|
|
1060
|
-
a !== o && (o = a,
|
|
1061
|
-
}, 10),
|
|
1041
|
+
a !== o && (o = a, Nt()), Ft(e, n.options, a, t);
|
|
1042
|
+
}, 10), Ot = r, kt = i);
|
|
1062
1043
|
} else {
|
|
1063
1044
|
if (!this.options.bubbleScroll || L(a, !0) === P()) {
|
|
1064
|
-
|
|
1045
|
+
Nt();
|
|
1065
1046
|
return;
|
|
1066
1047
|
}
|
|
1067
|
-
|
|
1048
|
+
Ft(e, this.options, L(a, !1), !1);
|
|
1068
1049
|
}
|
|
1069
1050
|
}
|
|
1070
|
-
},
|
|
1051
|
+
}, v(e, {
|
|
1071
1052
|
pluginName: "scroll",
|
|
1072
1053
|
initializeByDefault: !0
|
|
1073
1054
|
});
|
|
1074
1055
|
}
|
|
1075
|
-
function
|
|
1056
|
+
function Nt() {
|
|
1076
1057
|
$.forEach(function(e) {
|
|
1077
1058
|
clearInterval(e.pid);
|
|
1078
1059
|
}), $ = [];
|
|
1079
1060
|
}
|
|
1080
|
-
function
|
|
1081
|
-
clearInterval(
|
|
1061
|
+
function Pt() {
|
|
1062
|
+
clearInterval(jt);
|
|
1082
1063
|
}
|
|
1083
|
-
var
|
|
1064
|
+
var Ft = ye(function(e, t, n, r) {
|
|
1084
1065
|
if (t.scroll) {
|
|
1085
1066
|
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = P(), l = !1, u;
|
|
1086
|
-
|
|
1087
|
-
var d = 0, f =
|
|
1067
|
+
Et !== n && (Et = n, Nt(), Tt = t.scroll, u = t.scrollFn, Tt === !0 && (Tt = L(n, !0)));
|
|
1068
|
+
var d = 0, f = Tt;
|
|
1088
1069
|
do {
|
|
1089
|
-
var p = f, m = F(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0,
|
|
1090
|
-
p === c ? (x = y <
|
|
1091
|
-
var
|
|
1092
|
-
if (!$[d]) for (var
|
|
1093
|
-
($[d].vx !=
|
|
1094
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
1070
|
+
var p = f, m = F(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, ee = p.scrollHeight, w = N(p), te = p.scrollLeft, T = p.scrollTop;
|
|
1071
|
+
p === c ? (x = y < C && (w.overflowX === "auto" || w.overflowX === "scroll" || w.overflowX === "visible"), S = b < ee && (w.overflowY === "auto" || w.overflowY === "scroll" || w.overflowY === "visible")) : (x = y < C && (w.overflowX === "auto" || w.overflowX === "scroll"), S = b < ee && (w.overflowY === "auto" || w.overflowY === "scroll"));
|
|
1072
|
+
var E = x && (Math.abs(v - i) <= o && te + y < C) - (Math.abs(_ - i) <= o && !!te), D = S && (Math.abs(g - a) <= o && T + b < ee) - (Math.abs(h - a) <= o && !!T);
|
|
1073
|
+
if (!$[d]) for (var O = 0; O <= d; O++) $[O] || ($[O] = {});
|
|
1074
|
+
($[d].vx != E || $[d].vy != D || $[d].el !== p) && ($[d].el = p, $[d].vx = E, $[d].vy = D, clearInterval($[d].pid), (E != 0 || D != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
1075
|
+
r && this.layer === 0 && Q.active._onTouchMove(At);
|
|
1095
1076
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
1096
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[R], n, t, e,
|
|
1077
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[R], n, t, e, At, $[this.layer].el) !== "continue" || xe($[this.layer].el, n, t);
|
|
1097
1078
|
}.bind({ layer: d }), 24))), d++;
|
|
1098
1079
|
} while (t.bubbleScroll && f !== c && (f = L(f, !1)));
|
|
1099
|
-
|
|
1080
|
+
Dt = l;
|
|
1100
1081
|
}
|
|
1101
|
-
}, 30),
|
|
1082
|
+
}, 30), It = function(e) {
|
|
1102
1083
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1103
1084
|
if (t) {
|
|
1104
1085
|
var c = n || i;
|
|
@@ -1110,8 +1091,8 @@ var zt = Ce(function(e, t, n, r) {
|
|
|
1110
1091
|
}));
|
|
1111
1092
|
}
|
|
1112
1093
|
};
|
|
1113
|
-
function
|
|
1114
|
-
|
|
1094
|
+
function Lt() {}
|
|
1095
|
+
Lt.prototype = {
|
|
1115
1096
|
startIndex: null,
|
|
1116
1097
|
dragStart: function(e) {
|
|
1117
1098
|
var t = e.oldDraggableIndex;
|
|
@@ -1120,84 +1101,84 @@ Vt.prototype = {
|
|
|
1120
1101
|
onSpill: function(e) {
|
|
1121
1102
|
var t = e.dragEl, n = e.putSortable;
|
|
1122
1103
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1123
|
-
var r =
|
|
1104
|
+
var r = fe(this.sortable.el, this.startIndex, this.options);
|
|
1124
1105
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
1125
1106
|
},
|
|
1126
|
-
drop:
|
|
1127
|
-
},
|
|
1128
|
-
function
|
|
1129
|
-
|
|
1107
|
+
drop: It
|
|
1108
|
+
}, v(Lt, { pluginName: "revertOnSpill" });
|
|
1109
|
+
function Rt() {}
|
|
1110
|
+
Rt.prototype = {
|
|
1130
1111
|
onSpill: function(e) {
|
|
1131
1112
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
1132
1113
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
1133
1114
|
},
|
|
1134
|
-
drop:
|
|
1135
|
-
},
|
|
1115
|
+
drop: It
|
|
1116
|
+
}, v(Rt, { pluginName: "removeOnSpill" }), Q.mount(new Mt()), Q.mount(Rt, Lt);
|
|
1136
1117
|
//#endregion
|
|
1137
1118
|
//#region src/components/on-demand/wt-send-message-popup/wt-send-message-popup.vue
|
|
1138
|
-
var
|
|
1119
|
+
var zt = /* @__PURE__ */ c({
|
|
1139
1120
|
__name: "wt-send-message-popup",
|
|
1140
1121
|
props: {
|
|
1141
1122
|
chatItem: {},
|
|
1142
1123
|
userId: {}
|
|
1143
1124
|
},
|
|
1144
1125
|
emits: ["close"],
|
|
1145
|
-
setup(
|
|
1146
|
-
let
|
|
1147
|
-
gateway:
|
|
1148
|
-
provider:
|
|
1126
|
+
setup(c, { emit: _ }) {
|
|
1127
|
+
let v = c, y = _, b = i(), { t: x } = r(), S = f({
|
|
1128
|
+
gateway: v.chatItem?.app || {},
|
|
1129
|
+
provider: v.chatItem?.protocol || "",
|
|
1149
1130
|
message: "",
|
|
1150
1131
|
agentId: null
|
|
1151
1132
|
});
|
|
1152
|
-
async function
|
|
1153
|
-
let { items:
|
|
1133
|
+
async function C(e = {}) {
|
|
1134
|
+
let { items: n } = await t.getList({
|
|
1154
1135
|
...e,
|
|
1155
|
-
userId:
|
|
1136
|
+
userId: v.userId
|
|
1156
1137
|
});
|
|
1157
|
-
S.value.agentId =
|
|
1138
|
+
S.value.agentId = n[0]?.id;
|
|
1158
1139
|
}
|
|
1159
|
-
let
|
|
1160
|
-
let
|
|
1140
|
+
let ee = async () => {
|
|
1141
|
+
let t = await e.patch({
|
|
1161
1142
|
peers: [{
|
|
1162
1143
|
via: S.value.gateway.id,
|
|
1163
|
-
id:
|
|
1144
|
+
id: v.chatItem?.externalId,
|
|
1164
1145
|
type: S.value.provider
|
|
1165
1146
|
}],
|
|
1166
1147
|
variables: { agentId: S.value.agentId },
|
|
1167
1148
|
message: { text: S.value.message }
|
|
1168
1149
|
});
|
|
1169
|
-
|
|
1150
|
+
t.failure && b?.$emit("notification", {
|
|
1170
1151
|
type: "error",
|
|
1171
|
-
text:
|
|
1172
|
-
}),
|
|
1152
|
+
text: t.failure[0].error.message
|
|
1153
|
+
}), y("close");
|
|
1173
1154
|
}, w = (e) => {
|
|
1174
1155
|
S.value.message += e, document.querySelector("textarea")?.focus();
|
|
1175
1156
|
};
|
|
1176
|
-
return
|
|
1177
|
-
let
|
|
1178
|
-
return
|
|
1157
|
+
return u(async () => await C()), (e, t) => {
|
|
1158
|
+
let r = p("wt-textarea"), i = p("wt-button"), c = p("wt-popup");
|
|
1159
|
+
return d(), a(c, l(e.$attrs, {
|
|
1179
1160
|
class: "wt-send-message-popup",
|
|
1180
1161
|
overflow: "",
|
|
1181
|
-
onClose: t[1] ||= (e) =>
|
|
1162
|
+
onClose: t[1] ||= (e) => y("close")
|
|
1182
1163
|
}), {
|
|
1183
|
-
header:
|
|
1184
|
-
main:
|
|
1164
|
+
header: g(() => [o(m(h(x)("reusable.sendMessage")), 1)]),
|
|
1165
|
+
main: g(() => [s(r, {
|
|
1185
1166
|
"model-value": S.value.message,
|
|
1186
1167
|
"onUpdate:modelValue": t[0] ||= (e) => S.value.message = e,
|
|
1187
|
-
placeholder:
|
|
1188
|
-
onEnter:
|
|
1168
|
+
placeholder: h(x)("objects.chat.draftPlaceholder"),
|
|
1169
|
+
onEnter: ee
|
|
1189
1170
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
1190
|
-
actions:
|
|
1171
|
+
actions: g(() => [s(h(n), {
|
|
1191
1172
|
filled: "",
|
|
1192
1173
|
rounded: !1,
|
|
1193
1174
|
class: "wt-send-message-popup__emoji",
|
|
1194
1175
|
onInsertEmoji: w
|
|
1195
|
-
}),
|
|
1176
|
+
}), s(i, {
|
|
1196
1177
|
icon: "chat-send",
|
|
1197
1178
|
color: "secondary",
|
|
1198
1179
|
disabled: !S.value.message,
|
|
1199
1180
|
wide: "",
|
|
1200
|
-
onClick:
|
|
1181
|
+
onClick: ee
|
|
1201
1182
|
}, null, 8, ["disabled"])]),
|
|
1202
1183
|
_: 1
|
|
1203
1184
|
}, 16);
|
|
@@ -1205,4 +1186,4 @@ var Ut = /* @__PURE__ */ d({
|
|
|
1205
1186
|
}
|
|
1206
1187
|
});
|
|
1207
1188
|
//#endregion
|
|
1208
|
-
export {
|
|
1189
|
+
export { zt as default };
|