@feedmepos/mf-payment 1.10.7-dev → 1.10.7
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/{Actions.vue_vue_type_script_setup_true_lang-CDTMsbYv.js → Actions.vue_vue_type_script_setup_true_lang-Cb4w7Its.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-BXw-ZGes.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-B_-olj-A.js} +3 -3
- package/dist/AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-KddyORH2.js +505 -0
- package/dist/{Chargeback-BqXwYiuk.js → Chargeback-B5MXERko.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-BMBTecYJ.js → DocumentViewer.vue_vue_type_script_setup_true_lang-DNrsl1TX.js} +1 -1
- package/dist/{ExternalTerminal-CPqZXXJN.js → ExternalTerminal-bjMJ7qr-.js} +6 -6
- package/dist/{OnboardForm-Dc99b9Y9.js → OnboardForm-BwFlXqV5.js} +6 -6
- package/dist/{OnboardForm-CzW4p_2d.js → OnboardForm-CE0weADC.js} +6 -6
- package/dist/{OnboardSubmission-DE1LorIG.js → OnboardSubmission-2s5PtLcm.js} +3 -3
- package/dist/{OnboardSubmission-CW0mAt6g.js → OnboardSubmission-C60-dPdV.js} +6 -6
- package/dist/{PayoutAccount-CcxQG44I.js → PayoutAccount-DnE00Tpx.js} +5 -5
- package/dist/{PayoutAccount-BaxlEkSz.js → PayoutAccount-PGN4vUiE.js} +7 -7
- package/dist/{PayoutAccountSetting-BjGT7oIq.js → PayoutAccountSetting-UxgmC_It.js} +6 -6
- package/dist/{Restaurant-Dubtx0qm.js → Restaurant-DWs8l6IN.js} +4 -4
- package/dist/{RestaurantSetting-CaV9iLhj.js → RestaurantSetting-CghN3Qij.js} +3 -3
- package/dist/{Settlement-Dk2vmfTC.js → Settlement-BZG0nEhU.js} +4 -4
- package/dist/{Settlement-BpI9rV6S.js → Settlement-DSAWgf1q.js} +3 -3
- package/dist/{SettlementTransactions-DUKUIBGb.js → SettlementTransactions-5l9xe_rQ.js} +5 -5
- package/dist/{SettlementTransactions-L1UnE3Dz.js → SettlementTransactions-dSH6mKX9.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-CBq4EZkF.js → Status.vue_vue_type_script_setup_true_lang-CSz0sfMv.js} +1 -1
- package/dist/{Terminal-DA4Y3glc.js → Terminal-CU70aAqI.js} +6 -6
- package/dist/TerminalSetting-Bc6HJqCW.js +4521 -0
- package/dist/{Transaction-BoYZtvk4.js → Transaction-9yHZiRAp.js} +10 -10
- package/dist/{Transaction-eJhtXrtB.js → Transaction-CHL7HVtl.js} +19 -20
- package/dist/{TransactionOld-CpcwSOPc.js → TransactionOld-Dk_5TVXm.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-uOyBTSIr.js → TransactionStatus.vue_vue_type_script_setup_true_lang-D4A7Hfk7.js} +1 -1
- package/dist/api/terminal/index.d.ts +0 -1
- package/dist/{app-D6AC4Zp8.js → app-WOQvK6eu.js} +353 -389
- package/dist/app.js +1 -1
- package/dist/assets-B_Ilda1K.js +96 -0
- package/dist/{grafana-Ci9Ouxi7.js → grafana-BqnbcwyU.js} +1 -1
- package/dist/{index-DGXTnrw9.js → index--Svzj_Uq.js} +1 -1
- package/dist/{index-BexuYVa4.js → index-BPTPINow.js} +1 -1
- package/dist/index-BR7n0dkV.js +63 -0
- package/dist/{index-DJAcIsfC.js → index-BRCt0Wjb.js} +3030 -3073
- package/dist/{index-UvQbjo9b.js → index-BSUOKl_R.js} +1 -1
- package/dist/{index-Dyq-uY9m.js → index-Cc7BGx40.js} +1 -1
- package/dist/{index-CQWvP-R5.js → index-Cwbpxr-3.js} +1 -1
- package/dist/{index-YRTDpAkL.js → index-DiYIJH8n.js} +2 -2
- package/dist/{index-C1rqQDv4.js → index-Jo4g2Fvl.js} +1 -1
- package/dist/{index-B1Q7VAq8.js → index-XucAJsGV.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-C1d0q7uA.js → index.vue_vue_type_script_setup_true_lang-CQwRJloj.js} +1 -1
- package/dist/{onboard-submission-Dfp-461W.js → onboard-submission-B7IRbUGm.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-BziG4FgY.js → payout-account-v0EWhJ79.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +6 -6
- package/package.json +2 -2
- package/dist/AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-DOSmgkgi.js +0 -135
- package/dist/PaymentCheckout-Dak0HEN-.js +0 -1939
- package/dist/TerminalSetting-ChWAOcmg.js +0 -2779
- package/dist/TerminalTemplate-CPL-E4c2.js +0 -322
- package/dist/TerminalTemplateSetting-BTZZ_5hn.js +0 -262
- package/dist/api/terminal-template/index.d.ts +0 -15
- package/dist/assets-he2Gzvfg.js +0 -96
- package/dist/index-BDQw2qyD.js +0 -71
- package/dist/index-rlCqwp1w.js +0 -43
- package/dist/useQuery-Bjhr1nB7.js +0 -375
- package/dist/views/admin/terminal/TerminalApplyTemplateDialog.vue.d.ts +0 -6
- package/dist/views/admin/terminal/TerminalSaveTemplateDialog.vue.d.ts +0 -2
- package/dist/views/admin/terminal-template/TerminalTemplate.vue.d.ts +0 -2
- package/dist/views/admin/terminal-template/TerminalTemplateSetting.vue.d.ts +0 -12
- package/dist/views/admin/terminal-template/TerminalTemplateSideSheet.vue.d.ts +0 -174
- package/dist/views/admin/terminal-template/cell/Actions.vue.d.ts +0 -12
- package/dist/views/admin/terminal-template/cell/Default.vue.d.ts +0 -5
- package/dist/views/admin/terminal-template/tabs/EcrGateways.vue.d.ts +0 -104
- package/dist/views/admin/terminal-template/tabs/Information.vue.d.ts +0 -95
|
@@ -1,1939 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $t, computed as Tt, toRefs as bn, unref as W, ref as Ae, reactive as yn, h as _n, getCurrentInstance as Et, watch as Gt, onMounted as wn, nextTick as Qt, onUnmounted as xn, isRef as rt, resolveComponent as Ee, openBlock as k, createElementBlock as N, createTextVNode as kt, createVNode as B, createCommentVNode as Z, withCtx as Ot, Fragment as at, renderList as lt, normalizeClass as Pt, createElementVNode as X, withModifiers as En, toDisplayString as ae, withKeys as Sn, createBlock as it } from "vue";
|
|
2
|
-
import "./index-DJAcIsfC.js";
|
|
3
|
-
import { g as Cn } from "./assets-he2Gzvfg.js";
|
|
4
|
-
import { useDialog as Dn } from "@feedmepos/ui-library";
|
|
5
|
-
import { w as Tn } from "./Modal-DB8M9o1T.js";
|
|
6
|
-
import { _ as kn } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
var On = Object.defineProperty, Ke = Object.getOwnPropertySymbols, Kt = Object.prototype.hasOwnProperty, Jt = Object.prototype.propertyIsEnumerable, At = (e, n, t) => n in e ? On(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, Te = (e, n) => {
|
|
8
|
-
for (var t in n || (n = {}))
|
|
9
|
-
Kt.call(n, t) && At(e, t, n[t]);
|
|
10
|
-
if (Ke)
|
|
11
|
-
for (var t of Ke(n))
|
|
12
|
-
Jt.call(n, t) && At(e, t, n[t]);
|
|
13
|
-
return e;
|
|
14
|
-
}, Zt = (e, n) => {
|
|
15
|
-
var t = {};
|
|
16
|
-
for (var o in e)
|
|
17
|
-
Kt.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
|
|
18
|
-
if (e != null && Ke)
|
|
19
|
-
for (var o of Ke(e))
|
|
20
|
-
n.indexOf(o) < 0 && Jt.call(e, o) && (t[o] = e[o]);
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
const en = "[vue-draggable-plus]: ";
|
|
24
|
-
function Pn(e) {
|
|
25
|
-
console.warn(en + e);
|
|
26
|
-
}
|
|
27
|
-
function An(e) {
|
|
28
|
-
console.error(en + e);
|
|
29
|
-
}
|
|
30
|
-
function It(e, n, t) {
|
|
31
|
-
return t >= 0 && t < e.length && e.splice(t, 0, e.splice(n, 1)[0]), e;
|
|
32
|
-
}
|
|
33
|
-
function In(e) {
|
|
34
|
-
return e.replace(/-(\w)/g, (n, t) => t ? t.toUpperCase() : "");
|
|
35
|
-
}
|
|
36
|
-
function Nn(e) {
|
|
37
|
-
return Object.keys(e).reduce((n, t) => (typeof e[t] < "u" && (n[In(t)] = e[t]), n), {});
|
|
38
|
-
}
|
|
39
|
-
function Nt(e, n) {
|
|
40
|
-
return Array.isArray(e) && e.splice(n, 1), e;
|
|
41
|
-
}
|
|
42
|
-
function Mt(e, n, t) {
|
|
43
|
-
return Array.isArray(e) && e.splice(n, 0, t), e;
|
|
44
|
-
}
|
|
45
|
-
function Mn(e) {
|
|
46
|
-
return typeof e > "u";
|
|
47
|
-
}
|
|
48
|
-
function Vn(e) {
|
|
49
|
-
return typeof e == "string";
|
|
50
|
-
}
|
|
51
|
-
function Vt(e, n, t) {
|
|
52
|
-
const o = e.children[t];
|
|
53
|
-
e.insertBefore(n, o);
|
|
54
|
-
}
|
|
55
|
-
function st(e) {
|
|
56
|
-
e.parentNode && e.parentNode.removeChild(e);
|
|
57
|
-
}
|
|
58
|
-
function Rn(e, n = document) {
|
|
59
|
-
var t;
|
|
60
|
-
let o = null;
|
|
61
|
-
return typeof (n == null ? void 0 : n.querySelector) == "function" ? o = (t = n == null ? void 0 : n.querySelector) == null ? void 0 : t.call(n, e) : o = document.querySelector(e), o || Pn(`Element not found: ${e}`), o;
|
|
62
|
-
}
|
|
63
|
-
function Fn(e, n, t = null) {
|
|
64
|
-
return function(...o) {
|
|
65
|
-
return e.apply(t, o), n.apply(t, o);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function Yn(e, n) {
|
|
69
|
-
const t = Te({}, e);
|
|
70
|
-
return Object.keys(n).forEach((o) => {
|
|
71
|
-
t[o] ? t[o] = Fn(e[o], n[o]) : t[o] = n[o];
|
|
72
|
-
}), t;
|
|
73
|
-
}
|
|
74
|
-
function Un(e) {
|
|
75
|
-
return e instanceof HTMLElement;
|
|
76
|
-
}
|
|
77
|
-
function Rt(e, n) {
|
|
78
|
-
Object.keys(e).forEach((t) => {
|
|
79
|
-
n(t, e[t]);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function jn(e) {
|
|
83
|
-
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
84
|
-
}
|
|
85
|
-
const Xn = Object.assign;
|
|
86
|
-
/**!
|
|
87
|
-
* Sortable 1.15.2
|
|
88
|
-
* @author RubaXa <trash@rubaxa.org>
|
|
89
|
-
* @author owenm <owen23355@gmail.com>
|
|
90
|
-
* @license MIT
|
|
91
|
-
*/
|
|
92
|
-
function Ft(e, n) {
|
|
93
|
-
var t = Object.keys(e);
|
|
94
|
-
if (Object.getOwnPropertySymbols) {
|
|
95
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
96
|
-
n && (o = o.filter(function(r) {
|
|
97
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
98
|
-
})), t.push.apply(t, o);
|
|
99
|
-
}
|
|
100
|
-
return t;
|
|
101
|
-
}
|
|
102
|
-
function fe(e) {
|
|
103
|
-
for (var n = 1; n < arguments.length; n++) {
|
|
104
|
-
var t = arguments[n] != null ? arguments[n] : {};
|
|
105
|
-
n % 2 ? Ft(Object(t), !0).forEach(function(o) {
|
|
106
|
-
Ln(e, o, t[o]);
|
|
107
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Ft(Object(t)).forEach(function(o) {
|
|
108
|
-
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
return e;
|
|
112
|
-
}
|
|
113
|
-
function ze(e) {
|
|
114
|
-
"@babel/helpers - typeof";
|
|
115
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ze = function(n) {
|
|
116
|
-
return typeof n;
|
|
117
|
-
} : ze = function(n) {
|
|
118
|
-
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
119
|
-
}, ze(e);
|
|
120
|
-
}
|
|
121
|
-
function Ln(e, n, t) {
|
|
122
|
-
return n in e ? Object.defineProperty(e, n, {
|
|
123
|
-
value: t,
|
|
124
|
-
enumerable: !0,
|
|
125
|
-
configurable: !0,
|
|
126
|
-
writable: !0
|
|
127
|
-
}) : e[n] = t, e;
|
|
128
|
-
}
|
|
129
|
-
function he() {
|
|
130
|
-
return he = Object.assign || function(e) {
|
|
131
|
-
for (var n = 1; n < arguments.length; n++) {
|
|
132
|
-
var t = arguments[n];
|
|
133
|
-
for (var o in t)
|
|
134
|
-
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
135
|
-
}
|
|
136
|
-
return e;
|
|
137
|
-
}, he.apply(this, arguments);
|
|
138
|
-
}
|
|
139
|
-
function Bn(e, n) {
|
|
140
|
-
if (e == null)
|
|
141
|
-
return {};
|
|
142
|
-
var t = {}, o = Object.keys(e), r, a;
|
|
143
|
-
for (a = 0; a < o.length; a++)
|
|
144
|
-
r = o[a], !(n.indexOf(r) >= 0) && (t[r] = e[r]);
|
|
145
|
-
return t;
|
|
146
|
-
}
|
|
147
|
-
function Hn(e, n) {
|
|
148
|
-
if (e == null)
|
|
149
|
-
return {};
|
|
150
|
-
var t = Bn(e, n), o, r;
|
|
151
|
-
if (Object.getOwnPropertySymbols) {
|
|
152
|
-
var a = Object.getOwnPropertySymbols(e);
|
|
153
|
-
for (r = 0; r < a.length; r++)
|
|
154
|
-
o = a[r], !(n.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (t[o] = e[o]);
|
|
155
|
-
}
|
|
156
|
-
return t;
|
|
157
|
-
}
|
|
158
|
-
var Wn = "1.15.2";
|
|
159
|
-
function pe(e) {
|
|
160
|
-
if (typeof window < "u" && window.navigator)
|
|
161
|
-
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
162
|
-
}
|
|
163
|
-
var ge = pe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), je = pe(/Edge/i), Yt = pe(/firefox/i), Ve = pe(/safari/i) && !pe(/chrome/i) && !pe(/android/i), tn = pe(/iP(ad|od|hone)/i), nn = pe(/chrome/i) && pe(/android/i), on = {
|
|
164
|
-
capture: !1,
|
|
165
|
-
passive: !1
|
|
166
|
-
};
|
|
167
|
-
function C(e, n, t) {
|
|
168
|
-
e.addEventListener(n, t, !ge && on);
|
|
169
|
-
}
|
|
170
|
-
function S(e, n, t) {
|
|
171
|
-
e.removeEventListener(n, t, !ge && on);
|
|
172
|
-
}
|
|
173
|
-
function Je(e, n) {
|
|
174
|
-
if (n) {
|
|
175
|
-
if (n[0] === ">" && (n = n.substring(1)), e)
|
|
176
|
-
try {
|
|
177
|
-
if (e.matches)
|
|
178
|
-
return e.matches(n);
|
|
179
|
-
if (e.msMatchesSelector)
|
|
180
|
-
return e.msMatchesSelector(n);
|
|
181
|
-
if (e.webkitMatchesSelector)
|
|
182
|
-
return e.webkitMatchesSelector(n);
|
|
183
|
-
} catch {
|
|
184
|
-
return !1;
|
|
185
|
-
}
|
|
186
|
-
return !1;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
function zn(e) {
|
|
190
|
-
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
191
|
-
}
|
|
192
|
-
function se(e, n, t, o) {
|
|
193
|
-
if (e) {
|
|
194
|
-
t = t || document;
|
|
195
|
-
do {
|
|
196
|
-
if (n != null && (n[0] === ">" ? e.parentNode === t && Je(e, n) : Je(e, n)) || o && e === t)
|
|
197
|
-
return e;
|
|
198
|
-
if (e === t)
|
|
199
|
-
break;
|
|
200
|
-
} while (e = zn(e));
|
|
201
|
-
}
|
|
202
|
-
return null;
|
|
203
|
-
}
|
|
204
|
-
var Ut = /\s+/g;
|
|
205
|
-
function te(e, n, t) {
|
|
206
|
-
if (e && n)
|
|
207
|
-
if (e.classList)
|
|
208
|
-
e.classList[t ? "add" : "remove"](n);
|
|
209
|
-
else {
|
|
210
|
-
var o = (" " + e.className + " ").replace(Ut, " ").replace(" " + n + " ", " ");
|
|
211
|
-
e.className = (o + (t ? " " + n : "")).replace(Ut, " ");
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
function m(e, n, t) {
|
|
215
|
-
var o = e && e.style;
|
|
216
|
-
if (o) {
|
|
217
|
-
if (t === void 0)
|
|
218
|
-
return document.defaultView && document.defaultView.getComputedStyle ? t = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (t = e.currentStyle), n === void 0 ? t : t[n];
|
|
219
|
-
!(n in o) && n.indexOf("webkit") === -1 && (n = "-webkit-" + n), o[n] = t + (typeof t == "string" ? "" : "px");
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
function Oe(e, n) {
|
|
223
|
-
var t = "";
|
|
224
|
-
if (typeof e == "string")
|
|
225
|
-
t = e;
|
|
226
|
-
else
|
|
227
|
-
do {
|
|
228
|
-
var o = m(e, "transform");
|
|
229
|
-
o && o !== "none" && (t = o + " " + t);
|
|
230
|
-
} while (!n && (e = e.parentNode));
|
|
231
|
-
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
232
|
-
return r && new r(t);
|
|
233
|
-
}
|
|
234
|
-
function rn(e, n, t) {
|
|
235
|
-
if (e) {
|
|
236
|
-
var o = e.getElementsByTagName(n), r = 0, a = o.length;
|
|
237
|
-
if (t)
|
|
238
|
-
for (; r < a; r++)
|
|
239
|
-
t(o[r], r);
|
|
240
|
-
return o;
|
|
241
|
-
}
|
|
242
|
-
return [];
|
|
243
|
-
}
|
|
244
|
-
function de() {
|
|
245
|
-
var e = document.scrollingElement;
|
|
246
|
-
return e || document.documentElement;
|
|
247
|
-
}
|
|
248
|
-
function j(e, n, t, o, r) {
|
|
249
|
-
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
250
|
-
var a, l, s, i, u, d, h;
|
|
251
|
-
if (e !== window && e.parentNode && e !== de() ? (a = e.getBoundingClientRect(), l = a.top, s = a.left, i = a.bottom, u = a.right, d = a.height, h = a.width) : (l = 0, s = 0, i = window.innerHeight, u = window.innerWidth, d = window.innerHeight, h = window.innerWidth), (n || t) && e !== window && (r = r || e.parentNode, !ge))
|
|
252
|
-
do
|
|
253
|
-
if (r && r.getBoundingClientRect && (m(r, "transform") !== "none" || t && m(r, "position") !== "static")) {
|
|
254
|
-
var E = r.getBoundingClientRect();
|
|
255
|
-
l -= E.top + parseInt(m(r, "border-top-width")), s -= E.left + parseInt(m(r, "border-left-width")), i = l + a.height, u = s + a.width;
|
|
256
|
-
break;
|
|
257
|
-
}
|
|
258
|
-
while (r = r.parentNode);
|
|
259
|
-
if (o && e !== window) {
|
|
260
|
-
var g = Oe(r || e), T = g && g.a, x = g && g.d;
|
|
261
|
-
g && (l /= x, s /= T, h /= T, d /= x, i = l + d, u = s + h);
|
|
262
|
-
}
|
|
263
|
-
return {
|
|
264
|
-
top: l,
|
|
265
|
-
left: s,
|
|
266
|
-
bottom: i,
|
|
267
|
-
right: u,
|
|
268
|
-
width: h,
|
|
269
|
-
height: d
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
function jt(e, n, t) {
|
|
274
|
-
for (var o = ye(e, !0), r = j(e)[n]; o; ) {
|
|
275
|
-
var a = j(o)[t], l = void 0;
|
|
276
|
-
if (l = r >= a, !l)
|
|
277
|
-
return o;
|
|
278
|
-
if (o === de())
|
|
279
|
-
break;
|
|
280
|
-
o = ye(o, !1);
|
|
281
|
-
}
|
|
282
|
-
return !1;
|
|
283
|
-
}
|
|
284
|
-
function Pe(e, n, t, o) {
|
|
285
|
-
for (var r = 0, a = 0, l = e.children; a < l.length; ) {
|
|
286
|
-
if (l[a].style.display !== "none" && l[a] !== v.ghost && (o || l[a] !== v.dragged) && se(l[a], t.draggable, e, !1)) {
|
|
287
|
-
if (r === n)
|
|
288
|
-
return l[a];
|
|
289
|
-
r++;
|
|
290
|
-
}
|
|
291
|
-
a++;
|
|
292
|
-
}
|
|
293
|
-
return null;
|
|
294
|
-
}
|
|
295
|
-
function St(e, n) {
|
|
296
|
-
for (var t = e.lastElementChild; t && (t === v.ghost || m(t, "display") === "none" || n && !Je(t, n)); )
|
|
297
|
-
t = t.previousElementSibling;
|
|
298
|
-
return t || null;
|
|
299
|
-
}
|
|
300
|
-
function le(e, n) {
|
|
301
|
-
var t = 0;
|
|
302
|
-
if (!e || !e.parentNode)
|
|
303
|
-
return -1;
|
|
304
|
-
for (; e = e.previousElementSibling; )
|
|
305
|
-
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== v.clone && (!n || Je(e, n)) && t++;
|
|
306
|
-
return t;
|
|
307
|
-
}
|
|
308
|
-
function Xt(e) {
|
|
309
|
-
var n = 0, t = 0, o = de();
|
|
310
|
-
if (e)
|
|
311
|
-
do {
|
|
312
|
-
var r = Oe(e), a = r.a, l = r.d;
|
|
313
|
-
n += e.scrollLeft * a, t += e.scrollTop * l;
|
|
314
|
-
} while (e !== o && (e = e.parentNode));
|
|
315
|
-
return [n, t];
|
|
316
|
-
}
|
|
317
|
-
function qn(e, n) {
|
|
318
|
-
for (var t in e)
|
|
319
|
-
if (e.hasOwnProperty(t)) {
|
|
320
|
-
for (var o in n)
|
|
321
|
-
if (n.hasOwnProperty(o) && n[o] === e[t][o])
|
|
322
|
-
return Number(t);
|
|
323
|
-
}
|
|
324
|
-
return -1;
|
|
325
|
-
}
|
|
326
|
-
function ye(e, n) {
|
|
327
|
-
if (!e || !e.getBoundingClientRect)
|
|
328
|
-
return de();
|
|
329
|
-
var t = e, o = !1;
|
|
330
|
-
do
|
|
331
|
-
if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) {
|
|
332
|
-
var r = m(t);
|
|
333
|
-
if (t.clientWidth < t.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
334
|
-
if (!t.getBoundingClientRect || t === document.body)
|
|
335
|
-
return de();
|
|
336
|
-
if (o || n)
|
|
337
|
-
return t;
|
|
338
|
-
o = !0;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
while (t = t.parentNode);
|
|
342
|
-
return de();
|
|
343
|
-
}
|
|
344
|
-
function $n(e, n) {
|
|
345
|
-
if (e && n)
|
|
346
|
-
for (var t in n)
|
|
347
|
-
n.hasOwnProperty(t) && (e[t] = n[t]);
|
|
348
|
-
return e;
|
|
349
|
-
}
|
|
350
|
-
function ct(e, n) {
|
|
351
|
-
return Math.round(e.top) === Math.round(n.top) && Math.round(e.left) === Math.round(n.left) && Math.round(e.height) === Math.round(n.height) && Math.round(e.width) === Math.round(n.width);
|
|
352
|
-
}
|
|
353
|
-
var Re;
|
|
354
|
-
function an(e, n) {
|
|
355
|
-
return function() {
|
|
356
|
-
if (!Re) {
|
|
357
|
-
var t = arguments, o = this;
|
|
358
|
-
t.length === 1 ? e.call(o, t[0]) : e.apply(o, t), Re = setTimeout(function() {
|
|
359
|
-
Re = void 0;
|
|
360
|
-
}, n);
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
function Gn() {
|
|
365
|
-
clearTimeout(Re), Re = void 0;
|
|
366
|
-
}
|
|
367
|
-
function ln(e, n, t) {
|
|
368
|
-
e.scrollLeft += n, e.scrollTop += t;
|
|
369
|
-
}
|
|
370
|
-
function sn(e) {
|
|
371
|
-
var n = window.Polymer, t = window.jQuery || window.Zepto;
|
|
372
|
-
return n && n.dom ? n.dom(e).cloneNode(!0) : t ? t(e).clone(!0)[0] : e.cloneNode(!0);
|
|
373
|
-
}
|
|
374
|
-
function cn(e, n, t) {
|
|
375
|
-
var o = {};
|
|
376
|
-
return Array.from(e.children).forEach(function(r) {
|
|
377
|
-
var a, l, s, i;
|
|
378
|
-
if (!(!se(r, n.draggable, e, !1) || r.animated || r === t)) {
|
|
379
|
-
var u = j(r);
|
|
380
|
-
o.left = Math.min((a = o.left) !== null && a !== void 0 ? a : 1 / 0, u.left), o.top = Math.min((l = o.top) !== null && l !== void 0 ? l : 1 / 0, u.top), o.right = Math.max((s = o.right) !== null && s !== void 0 ? s : -1 / 0, u.right), o.bottom = Math.max((i = o.bottom) !== null && i !== void 0 ? i : -1 / 0, u.bottom);
|
|
381
|
-
}
|
|
382
|
-
}), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
383
|
-
}
|
|
384
|
-
var oe = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
385
|
-
function Qn() {
|
|
386
|
-
var e = [], n;
|
|
387
|
-
return {
|
|
388
|
-
captureAnimationState: function() {
|
|
389
|
-
if (e = [], !!this.options.animation) {
|
|
390
|
-
var t = [].slice.call(this.el.children);
|
|
391
|
-
t.forEach(function(o) {
|
|
392
|
-
if (!(m(o, "display") === "none" || o === v.ghost)) {
|
|
393
|
-
e.push({
|
|
394
|
-
target: o,
|
|
395
|
-
rect: j(o)
|
|
396
|
-
});
|
|
397
|
-
var r = fe({}, e[e.length - 1].rect);
|
|
398
|
-
if (o.thisAnimationDuration) {
|
|
399
|
-
var a = Oe(o, !0);
|
|
400
|
-
a && (r.top -= a.f, r.left -= a.e);
|
|
401
|
-
}
|
|
402
|
-
o.fromRect = r;
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
addAnimationState: function(t) {
|
|
408
|
-
e.push(t);
|
|
409
|
-
},
|
|
410
|
-
removeAnimationState: function(t) {
|
|
411
|
-
e.splice(qn(e, {
|
|
412
|
-
target: t
|
|
413
|
-
}), 1);
|
|
414
|
-
},
|
|
415
|
-
animateAll: function(t) {
|
|
416
|
-
var o = this;
|
|
417
|
-
if (!this.options.animation) {
|
|
418
|
-
clearTimeout(n), typeof t == "function" && t();
|
|
419
|
-
return;
|
|
420
|
-
}
|
|
421
|
-
var r = !1, a = 0;
|
|
422
|
-
e.forEach(function(l) {
|
|
423
|
-
var s = 0, i = l.target, u = i.fromRect, d = j(i), h = i.prevFromRect, E = i.prevToRect, g = l.rect, T = Oe(i, !0);
|
|
424
|
-
T && (d.top -= T.f, d.left -= T.e), i.toRect = d, i.thisAnimationDuration && ct(h, d) && !ct(u, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
425
|
-
(g.top - d.top) / (g.left - d.left) === (u.top - d.top) / (u.left - d.left) && (s = Jn(g, h, E, o.options)), ct(d, u) || (i.prevFromRect = u, i.prevToRect = d, s || (s = o.options.animation), o.animate(i, g, d, s)), s && (r = !0, a = Math.max(a, s), clearTimeout(i.animationResetTimer), i.animationResetTimer = setTimeout(function() {
|
|
426
|
-
i.animationTime = 0, i.prevFromRect = null, i.fromRect = null, i.prevToRect = null, i.thisAnimationDuration = null;
|
|
427
|
-
}, s), i.thisAnimationDuration = s);
|
|
428
|
-
}), clearTimeout(n), r ? n = setTimeout(function() {
|
|
429
|
-
typeof t == "function" && t();
|
|
430
|
-
}, a) : typeof t == "function" && t(), e = [];
|
|
431
|
-
},
|
|
432
|
-
animate: function(t, o, r, a) {
|
|
433
|
-
if (a) {
|
|
434
|
-
m(t, "transition", ""), m(t, "transform", "");
|
|
435
|
-
var l = Oe(this.el), s = l && l.a, i = l && l.d, u = (o.left - r.left) / (s || 1), d = (o.top - r.top) / (i || 1);
|
|
436
|
-
t.animatingX = !!u, t.animatingY = !!d, m(t, "transform", "translate3d(" + u + "px," + d + "px,0)"), this.forRepaintDummy = Kn(t), m(t, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), m(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
437
|
-
m(t, "transition", ""), m(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
438
|
-
}, a);
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
function Kn(e) {
|
|
444
|
-
return e.offsetWidth;
|
|
445
|
-
}
|
|
446
|
-
function Jn(e, n, t, o) {
|
|
447
|
-
return Math.sqrt(Math.pow(n.top - e.top, 2) + Math.pow(n.left - e.left, 2)) / Math.sqrt(Math.pow(n.top - t.top, 2) + Math.pow(n.left - t.left, 2)) * o.animation;
|
|
448
|
-
}
|
|
449
|
-
var Se = [], ut = {
|
|
450
|
-
initializeByDefault: !0
|
|
451
|
-
}, Xe = {
|
|
452
|
-
mount: function(e) {
|
|
453
|
-
for (var n in ut)
|
|
454
|
-
ut.hasOwnProperty(n) && !(n in e) && (e[n] = ut[n]);
|
|
455
|
-
Se.forEach(function(t) {
|
|
456
|
-
if (t.pluginName === e.pluginName)
|
|
457
|
-
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
458
|
-
}), Se.push(e);
|
|
459
|
-
},
|
|
460
|
-
pluginEvent: function(e, n, t) {
|
|
461
|
-
var o = this;
|
|
462
|
-
this.eventCanceled = !1, t.cancel = function() {
|
|
463
|
-
o.eventCanceled = !0;
|
|
464
|
-
};
|
|
465
|
-
var r = e + "Global";
|
|
466
|
-
Se.forEach(function(a) {
|
|
467
|
-
n[a.pluginName] && (n[a.pluginName][r] && n[a.pluginName][r](fe({
|
|
468
|
-
sortable: n
|
|
469
|
-
}, t)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](fe({
|
|
470
|
-
sortable: n
|
|
471
|
-
}, t)));
|
|
472
|
-
});
|
|
473
|
-
},
|
|
474
|
-
initializePlugins: function(e, n, t, o) {
|
|
475
|
-
Se.forEach(function(l) {
|
|
476
|
-
var s = l.pluginName;
|
|
477
|
-
if (!(!e.options[s] && !l.initializeByDefault)) {
|
|
478
|
-
var i = new l(e, n, e.options);
|
|
479
|
-
i.sortable = e, i.options = e.options, e[s] = i, he(t, i.defaults);
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
for (var r in e.options)
|
|
483
|
-
if (e.options.hasOwnProperty(r)) {
|
|
484
|
-
var a = this.modifyOption(e, r, e.options[r]);
|
|
485
|
-
typeof a < "u" && (e.options[r] = a);
|
|
486
|
-
}
|
|
487
|
-
},
|
|
488
|
-
getEventProperties: function(e, n) {
|
|
489
|
-
var t = {};
|
|
490
|
-
return Se.forEach(function(o) {
|
|
491
|
-
typeof o.eventProperties == "function" && he(t, o.eventProperties.call(n[o.pluginName], e));
|
|
492
|
-
}), t;
|
|
493
|
-
},
|
|
494
|
-
modifyOption: function(e, n, t) {
|
|
495
|
-
var o;
|
|
496
|
-
return Se.forEach(function(r) {
|
|
497
|
-
e[r.pluginName] && r.optionListeners && typeof r.optionListeners[n] == "function" && (o = r.optionListeners[n].call(e[r.pluginName], t));
|
|
498
|
-
}), o;
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
|
-
function Zn(e) {
|
|
502
|
-
var n = e.sortable, t = e.rootEl, o = e.name, r = e.targetEl, a = e.cloneEl, l = e.toEl, s = e.fromEl, i = e.oldIndex, u = e.newIndex, d = e.oldDraggableIndex, h = e.newDraggableIndex, E = e.originalEvent, g = e.putSortable, T = e.extraEventProperties;
|
|
503
|
-
if (n = n || t && t[oe], !!n) {
|
|
504
|
-
var x, $ = n.options, I = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
505
|
-
window.CustomEvent && !ge && !je ? x = new CustomEvent(o, {
|
|
506
|
-
bubbles: !0,
|
|
507
|
-
cancelable: !0
|
|
508
|
-
}) : (x = document.createEvent("Event"), x.initEvent(o, !0, !0)), x.to = l || t, x.from = s || t, x.item = r || t, x.clone = a, x.oldIndex = i, x.newIndex = u, x.oldDraggableIndex = d, x.newDraggableIndex = h, x.originalEvent = E, x.pullMode = g ? g.lastPutMode : void 0;
|
|
509
|
-
var G = fe(fe({}, T), Xe.getEventProperties(o, n));
|
|
510
|
-
for (var F in G)
|
|
511
|
-
x[F] = G[F];
|
|
512
|
-
t && t.dispatchEvent(x), $[I] && $[I].call(n, x);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
var eo = ["evt"], ee = function(e, n) {
|
|
516
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = t.evt, r = Hn(t, eo);
|
|
517
|
-
Xe.pluginEvent.bind(v)(e, n, fe({
|
|
518
|
-
dragEl: c,
|
|
519
|
-
parentEl: R,
|
|
520
|
-
ghostEl: _,
|
|
521
|
-
rootEl: M,
|
|
522
|
-
nextEl: xe,
|
|
523
|
-
lastDownEl: qe,
|
|
524
|
-
cloneEl: V,
|
|
525
|
-
cloneHidden: be,
|
|
526
|
-
dragStarted: Ie,
|
|
527
|
-
putSortable: H,
|
|
528
|
-
activeSortable: v.active,
|
|
529
|
-
originalEvent: o,
|
|
530
|
-
oldIndex: ke,
|
|
531
|
-
oldDraggableIndex: Fe,
|
|
532
|
-
newIndex: ne,
|
|
533
|
-
newDraggableIndex: ve,
|
|
534
|
-
hideGhostForTarget: pn,
|
|
535
|
-
unhideGhostForTarget: hn,
|
|
536
|
-
cloneNowHidden: function() {
|
|
537
|
-
be = !0;
|
|
538
|
-
},
|
|
539
|
-
cloneNowShown: function() {
|
|
540
|
-
be = !1;
|
|
541
|
-
},
|
|
542
|
-
dispatchSortableEvent: function(a) {
|
|
543
|
-
K({
|
|
544
|
-
sortable: n,
|
|
545
|
-
name: a,
|
|
546
|
-
originalEvent: o
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
}, r));
|
|
550
|
-
};
|
|
551
|
-
function K(e) {
|
|
552
|
-
Zn(fe({
|
|
553
|
-
putSortable: H,
|
|
554
|
-
cloneEl: V,
|
|
555
|
-
targetEl: c,
|
|
556
|
-
rootEl: M,
|
|
557
|
-
oldIndex: ke,
|
|
558
|
-
oldDraggableIndex: Fe,
|
|
559
|
-
newIndex: ne,
|
|
560
|
-
newDraggableIndex: ve
|
|
561
|
-
}, e));
|
|
562
|
-
}
|
|
563
|
-
var c, R, _, M, xe, qe, V, be, ke, ne, Fe, ve, Le, H, De = !1, Ze = !1, et = [], _e, ie, dt, ft, Lt, Bt, Ie, Ce, Ye, Ue = !1, Be = !1, $e, q, pt = [], bt = !1, tt = [], ot = typeof document < "u", He = tn, Ht = je || ge ? "cssFloat" : "float", to = ot && !nn && !tn && "draggable" in document.createElement("div"), un = function() {
|
|
564
|
-
if (ot) {
|
|
565
|
-
if (ge)
|
|
566
|
-
return !1;
|
|
567
|
-
var e = document.createElement("x");
|
|
568
|
-
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
569
|
-
}
|
|
570
|
-
}(), dn = function(e, n) {
|
|
571
|
-
var t = m(e), o = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), r = Pe(e, 0, n), a = Pe(e, 1, n), l = r && m(r), s = a && m(a), i = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + j(r).width, u = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + j(a).width;
|
|
572
|
-
if (t.display === "flex")
|
|
573
|
-
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
574
|
-
if (t.display === "grid")
|
|
575
|
-
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
576
|
-
if (r && l.float && l.float !== "none") {
|
|
577
|
-
var d = l.float === "left" ? "left" : "right";
|
|
578
|
-
return a && (s.clear === "both" || s.clear === d) ? "vertical" : "horizontal";
|
|
579
|
-
}
|
|
580
|
-
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || i >= o && t[Ht] === "none" || a && t[Ht] === "none" && i + u > o) ? "vertical" : "horizontal";
|
|
581
|
-
}, no = function(e, n, t) {
|
|
582
|
-
var o = t ? e.left : e.top, r = t ? e.right : e.bottom, a = t ? e.width : e.height, l = t ? n.left : n.top, s = t ? n.right : n.bottom, i = t ? n.width : n.height;
|
|
583
|
-
return o === l || r === s || o + a / 2 === l + i / 2;
|
|
584
|
-
}, oo = function(e, n) {
|
|
585
|
-
var t;
|
|
586
|
-
return et.some(function(o) {
|
|
587
|
-
var r = o[oe].options.emptyInsertThreshold;
|
|
588
|
-
if (!(!r || St(o))) {
|
|
589
|
-
var a = j(o), l = e >= a.left - r && e <= a.right + r, s = n >= a.top - r && n <= a.bottom + r;
|
|
590
|
-
if (l && s)
|
|
591
|
-
return t = o;
|
|
592
|
-
}
|
|
593
|
-
}), t;
|
|
594
|
-
}, fn = function(e) {
|
|
595
|
-
function n(r, a) {
|
|
596
|
-
return function(l, s, i, u) {
|
|
597
|
-
var d = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
598
|
-
if (r == null && (a || d))
|
|
599
|
-
return !0;
|
|
600
|
-
if (r == null || r === !1)
|
|
601
|
-
return !1;
|
|
602
|
-
if (a && r === "clone")
|
|
603
|
-
return r;
|
|
604
|
-
if (typeof r == "function")
|
|
605
|
-
return n(r(l, s, i, u), a)(l, s, i, u);
|
|
606
|
-
var h = (a ? l : s).options.group.name;
|
|
607
|
-
return r === !0 || typeof r == "string" && r === h || r.join && r.indexOf(h) > -1;
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
var t = {}, o = e.group;
|
|
611
|
-
(!o || ze(o) != "object") && (o = {
|
|
612
|
-
name: o
|
|
613
|
-
}), t.name = o.name, t.checkPull = n(o.pull, !0), t.checkPut = n(o.put), t.revertClone = o.revertClone, e.group = t;
|
|
614
|
-
}, pn = function() {
|
|
615
|
-
!un && _ && m(_, "display", "none");
|
|
616
|
-
}, hn = function() {
|
|
617
|
-
!un && _ && m(_, "display", "");
|
|
618
|
-
};
|
|
619
|
-
ot && !nn && document.addEventListener("click", function(e) {
|
|
620
|
-
if (Ze)
|
|
621
|
-
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ze = !1, !1;
|
|
622
|
-
}, !0);
|
|
623
|
-
var we = function(e) {
|
|
624
|
-
if (c) {
|
|
625
|
-
e = e.touches ? e.touches[0] : e;
|
|
626
|
-
var n = oo(e.clientX, e.clientY);
|
|
627
|
-
if (n) {
|
|
628
|
-
var t = {};
|
|
629
|
-
for (var o in e)
|
|
630
|
-
e.hasOwnProperty(o) && (t[o] = e[o]);
|
|
631
|
-
t.target = t.rootEl = n, t.preventDefault = void 0, t.stopPropagation = void 0, n[oe]._onDragOver(t);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
}, ro = function(e) {
|
|
635
|
-
c && c.parentNode[oe]._isOutsideThisEl(e.target);
|
|
636
|
-
};
|
|
637
|
-
function v(e, n) {
|
|
638
|
-
if (!(e && e.nodeType && e.nodeType === 1))
|
|
639
|
-
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
640
|
-
this.el = e, this.options = n = he({}, n), e[oe] = this;
|
|
641
|
-
var t = {
|
|
642
|
-
group: null,
|
|
643
|
-
sort: !0,
|
|
644
|
-
disabled: !1,
|
|
645
|
-
store: null,
|
|
646
|
-
handle: null,
|
|
647
|
-
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
|
|
648
|
-
swapThreshold: 1,
|
|
649
|
-
// percentage; 0 <= x <= 1
|
|
650
|
-
invertSwap: !1,
|
|
651
|
-
// invert always
|
|
652
|
-
invertedSwapThreshold: null,
|
|
653
|
-
// will be set to same as swapThreshold if default
|
|
654
|
-
removeCloneOnHide: !0,
|
|
655
|
-
direction: function() {
|
|
656
|
-
return dn(e, this.options);
|
|
657
|
-
},
|
|
658
|
-
ghostClass: "sortable-ghost",
|
|
659
|
-
chosenClass: "sortable-chosen",
|
|
660
|
-
dragClass: "sortable-drag",
|
|
661
|
-
ignore: "a, img",
|
|
662
|
-
filter: null,
|
|
663
|
-
preventOnFilter: !0,
|
|
664
|
-
animation: 0,
|
|
665
|
-
easing: null,
|
|
666
|
-
setData: function(a, l) {
|
|
667
|
-
a.setData("Text", l.textContent);
|
|
668
|
-
},
|
|
669
|
-
dropBubble: !1,
|
|
670
|
-
dragoverBubble: !1,
|
|
671
|
-
dataIdAttr: "data-id",
|
|
672
|
-
delay: 0,
|
|
673
|
-
delayOnTouchOnly: !1,
|
|
674
|
-
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
675
|
-
forceFallback: !1,
|
|
676
|
-
fallbackClass: "sortable-fallback",
|
|
677
|
-
fallbackOnBody: !1,
|
|
678
|
-
fallbackTolerance: 0,
|
|
679
|
-
fallbackOffset: {
|
|
680
|
-
x: 0,
|
|
681
|
-
y: 0
|
|
682
|
-
},
|
|
683
|
-
supportPointer: v.supportPointer !== !1 && "PointerEvent" in window && !Ve,
|
|
684
|
-
emptyInsertThreshold: 5
|
|
685
|
-
};
|
|
686
|
-
Xe.initializePlugins(this, e, t);
|
|
687
|
-
for (var o in t)
|
|
688
|
-
!(o in n) && (n[o] = t[o]);
|
|
689
|
-
fn(n);
|
|
690
|
-
for (var r in this)
|
|
691
|
-
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
692
|
-
this.nativeDraggable = n.forceFallback ? !1 : to, this.nativeDraggable && (this.options.touchStartThreshold = 1), n.supportPointer ? C(e, "pointerdown", this._onTapStart) : (C(e, "mousedown", this._onTapStart), C(e, "touchstart", this._onTapStart)), this.nativeDraggable && (C(e, "dragover", this), C(e, "dragenter", this)), et.push(this.el), n.store && n.store.get && this.sort(n.store.get(this) || []), he(this, Qn());
|
|
693
|
-
}
|
|
694
|
-
v.prototype = /** @lends Sortable.prototype */
|
|
695
|
-
{
|
|
696
|
-
constructor: v,
|
|
697
|
-
_isOutsideThisEl: function(e) {
|
|
698
|
-
!this.el.contains(e) && e !== this.el && (Ce = null);
|
|
699
|
-
},
|
|
700
|
-
_getDirection: function(e, n) {
|
|
701
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, c) : this.options.direction;
|
|
702
|
-
},
|
|
703
|
-
_onTapStart: function(e) {
|
|
704
|
-
if (e.cancelable) {
|
|
705
|
-
var n = this, t = this.el, o = this.options, r = o.preventOnFilter, a = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (l || e).target, i = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, u = o.filter;
|
|
706
|
-
if (po(t), !c && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || o.disabled) && !i.isContentEditable && !(!this.nativeDraggable && Ve && s && s.tagName.toUpperCase() === "SELECT") && (s = se(s, o.draggable, t, !1), !(s && s.animated) && qe !== s)) {
|
|
707
|
-
if (ke = le(s), Fe = le(s, o.draggable), typeof u == "function") {
|
|
708
|
-
if (u.call(this, e, s, this)) {
|
|
709
|
-
K({
|
|
710
|
-
sortable: n,
|
|
711
|
-
rootEl: i,
|
|
712
|
-
name: "filter",
|
|
713
|
-
targetEl: s,
|
|
714
|
-
toEl: t,
|
|
715
|
-
fromEl: t
|
|
716
|
-
}), ee("filter", n, {
|
|
717
|
-
evt: e
|
|
718
|
-
}), r && e.cancelable && e.preventDefault();
|
|
719
|
-
return;
|
|
720
|
-
}
|
|
721
|
-
} else if (u && (u = u.split(",").some(function(d) {
|
|
722
|
-
if (d = se(i, d.trim(), t, !1), d)
|
|
723
|
-
return K({
|
|
724
|
-
sortable: n,
|
|
725
|
-
rootEl: d,
|
|
726
|
-
name: "filter",
|
|
727
|
-
targetEl: s,
|
|
728
|
-
fromEl: t,
|
|
729
|
-
toEl: t
|
|
730
|
-
}), ee("filter", n, {
|
|
731
|
-
evt: e
|
|
732
|
-
}), !0;
|
|
733
|
-
}), u)) {
|
|
734
|
-
r && e.cancelable && e.preventDefault();
|
|
735
|
-
return;
|
|
736
|
-
}
|
|
737
|
-
o.handle && !se(i, o.handle, t, !1) || this._prepareDragStart(e, l, s);
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
},
|
|
741
|
-
_prepareDragStart: function(e, n, t) {
|
|
742
|
-
var o = this, r = o.el, a = o.options, l = r.ownerDocument, s;
|
|
743
|
-
if (t && !c && t.parentNode === r) {
|
|
744
|
-
var i = j(t);
|
|
745
|
-
if (M = r, c = t, R = c.parentNode, xe = c.nextSibling, qe = t, Le = a.group, v.dragged = c, _e = {
|
|
746
|
-
target: c,
|
|
747
|
-
clientX: (n || e).clientX,
|
|
748
|
-
clientY: (n || e).clientY
|
|
749
|
-
}, Lt = _e.clientX - i.left, Bt = _e.clientY - i.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, c.style["will-change"] = "all", s = function() {
|
|
750
|
-
if (ee("delayEnded", o, {
|
|
751
|
-
evt: e
|
|
752
|
-
}), v.eventCanceled) {
|
|
753
|
-
o._onDrop();
|
|
754
|
-
return;
|
|
755
|
-
}
|
|
756
|
-
o._disableDelayedDragEvents(), !Yt && o.nativeDraggable && (c.draggable = !0), o._triggerDragStart(e, n), K({
|
|
757
|
-
sortable: o,
|
|
758
|
-
name: "choose",
|
|
759
|
-
originalEvent: e
|
|
760
|
-
}), te(c, a.chosenClass, !0);
|
|
761
|
-
}, a.ignore.split(",").forEach(function(u) {
|
|
762
|
-
rn(c, u.trim(), ht);
|
|
763
|
-
}), C(l, "dragover", we), C(l, "mousemove", we), C(l, "touchmove", we), C(l, "mouseup", o._onDrop), C(l, "touchend", o._onDrop), C(l, "touchcancel", o._onDrop), Yt && this.nativeDraggable && (this.options.touchStartThreshold = 4, c.draggable = !0), ee("delayStart", this, {
|
|
764
|
-
evt: e
|
|
765
|
-
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(je || ge))) {
|
|
766
|
-
if (v.eventCanceled) {
|
|
767
|
-
this._onDrop();
|
|
768
|
-
return;
|
|
769
|
-
}
|
|
770
|
-
C(l, "mouseup", o._disableDelayedDrag), C(l, "touchend", o._disableDelayedDrag), C(l, "touchcancel", o._disableDelayedDrag), C(l, "mousemove", o._delayedDragTouchMoveHandler), C(l, "touchmove", o._delayedDragTouchMoveHandler), a.supportPointer && C(l, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(s, a.delay);
|
|
771
|
-
} else
|
|
772
|
-
s();
|
|
773
|
-
}
|
|
774
|
-
},
|
|
775
|
-
_delayedDragTouchMoveHandler: function(e) {
|
|
776
|
-
var n = e.touches ? e.touches[0] : e;
|
|
777
|
-
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
778
|
-
},
|
|
779
|
-
_disableDelayedDrag: function() {
|
|
780
|
-
c && ht(c), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
781
|
-
},
|
|
782
|
-
_disableDelayedDragEvents: function() {
|
|
783
|
-
var e = this.el.ownerDocument;
|
|
784
|
-
S(e, "mouseup", this._disableDelayedDrag), S(e, "touchend", this._disableDelayedDrag), S(e, "touchcancel", this._disableDelayedDrag), S(e, "mousemove", this._delayedDragTouchMoveHandler), S(e, "touchmove", this._delayedDragTouchMoveHandler), S(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
785
|
-
},
|
|
786
|
-
_triggerDragStart: function(e, n) {
|
|
787
|
-
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? C(document, "pointermove", this._onTouchMove) : n ? C(document, "touchmove", this._onTouchMove) : C(document, "mousemove", this._onTouchMove) : (C(c, "dragend", this), C(M, "dragstart", this._onDragStart));
|
|
788
|
-
try {
|
|
789
|
-
document.selection ? Ge(function() {
|
|
790
|
-
document.selection.empty();
|
|
791
|
-
}) : window.getSelection().removeAllRanges();
|
|
792
|
-
} catch {
|
|
793
|
-
}
|
|
794
|
-
},
|
|
795
|
-
_dragStarted: function(e, n) {
|
|
796
|
-
if (De = !1, M && c) {
|
|
797
|
-
ee("dragStarted", this, {
|
|
798
|
-
evt: n
|
|
799
|
-
}), this.nativeDraggable && C(document, "dragover", ro);
|
|
800
|
-
var t = this.options;
|
|
801
|
-
!e && te(c, t.dragClass, !1), te(c, t.ghostClass, !0), v.active = this, e && this._appendGhost(), K({
|
|
802
|
-
sortable: this,
|
|
803
|
-
name: "start",
|
|
804
|
-
originalEvent: n
|
|
805
|
-
});
|
|
806
|
-
} else
|
|
807
|
-
this._nulling();
|
|
808
|
-
},
|
|
809
|
-
_emulateDragOver: function() {
|
|
810
|
-
if (ie) {
|
|
811
|
-
this._lastX = ie.clientX, this._lastY = ie.clientY, pn();
|
|
812
|
-
for (var e = document.elementFromPoint(ie.clientX, ie.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ie.clientX, ie.clientY), e !== n); )
|
|
813
|
-
n = e;
|
|
814
|
-
if (c.parentNode[oe]._isOutsideThisEl(e), n)
|
|
815
|
-
do {
|
|
816
|
-
if (n[oe]) {
|
|
817
|
-
var t = void 0;
|
|
818
|
-
if (t = n[oe]._onDragOver({
|
|
819
|
-
clientX: ie.clientX,
|
|
820
|
-
clientY: ie.clientY,
|
|
821
|
-
target: e,
|
|
822
|
-
rootEl: n
|
|
823
|
-
}), t && !this.options.dragoverBubble)
|
|
824
|
-
break;
|
|
825
|
-
}
|
|
826
|
-
e = n;
|
|
827
|
-
} while (n = n.parentNode);
|
|
828
|
-
hn();
|
|
829
|
-
}
|
|
830
|
-
},
|
|
831
|
-
_onTouchMove: function(e) {
|
|
832
|
-
if (_e) {
|
|
833
|
-
var n = this.options, t = n.fallbackTolerance, o = n.fallbackOffset, r = e.touches ? e.touches[0] : e, a = _ && Oe(_, !0), l = _ && a && a.a, s = _ && a && a.d, i = He && q && Xt(q), u = (r.clientX - _e.clientX + o.x) / (l || 1) + (i ? i[0] - pt[0] : 0) / (l || 1), d = (r.clientY - _e.clientY + o.y) / (s || 1) + (i ? i[1] - pt[1] : 0) / (s || 1);
|
|
834
|
-
if (!v.active && !De) {
|
|
835
|
-
if (t && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < t)
|
|
836
|
-
return;
|
|
837
|
-
this._onDragStart(e, !0);
|
|
838
|
-
}
|
|
839
|
-
if (_) {
|
|
840
|
-
a ? (a.e += u - (dt || 0), a.f += d - (ft || 0)) : a = {
|
|
841
|
-
a: 1,
|
|
842
|
-
b: 0,
|
|
843
|
-
c: 0,
|
|
844
|
-
d: 1,
|
|
845
|
-
e: u,
|
|
846
|
-
f: d
|
|
847
|
-
};
|
|
848
|
-
var h = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
849
|
-
m(_, "webkitTransform", h), m(_, "mozTransform", h), m(_, "msTransform", h), m(_, "transform", h), dt = u, ft = d, ie = r;
|
|
850
|
-
}
|
|
851
|
-
e.cancelable && e.preventDefault();
|
|
852
|
-
}
|
|
853
|
-
},
|
|
854
|
-
_appendGhost: function() {
|
|
855
|
-
if (!_) {
|
|
856
|
-
var e = this.options.fallbackOnBody ? document.body : M, n = j(c, !0, He, !0, e), t = this.options;
|
|
857
|
-
if (He) {
|
|
858
|
-
for (q = e; m(q, "position") === "static" && m(q, "transform") === "none" && q !== document; )
|
|
859
|
-
q = q.parentNode;
|
|
860
|
-
q !== document.body && q !== document.documentElement ? (q === document && (q = de()), n.top += q.scrollTop, n.left += q.scrollLeft) : q = de(), pt = Xt(q);
|
|
861
|
-
}
|
|
862
|
-
_ = c.cloneNode(!0), te(_, t.ghostClass, !1), te(_, t.fallbackClass, !0), te(_, t.dragClass, !0), m(_, "transition", ""), m(_, "transform", ""), m(_, "box-sizing", "border-box"), m(_, "margin", 0), m(_, "top", n.top), m(_, "left", n.left), m(_, "width", n.width), m(_, "height", n.height), m(_, "opacity", "0.8"), m(_, "position", He ? "absolute" : "fixed"), m(_, "zIndex", "100000"), m(_, "pointerEvents", "none"), v.ghost = _, e.appendChild(_), m(_, "transform-origin", Lt / parseInt(_.style.width) * 100 + "% " + Bt / parseInt(_.style.height) * 100 + "%");
|
|
863
|
-
}
|
|
864
|
-
},
|
|
865
|
-
_onDragStart: function(e, n) {
|
|
866
|
-
var t = this, o = e.dataTransfer, r = t.options;
|
|
867
|
-
if (ee("dragStart", this, {
|
|
868
|
-
evt: e
|
|
869
|
-
}), v.eventCanceled) {
|
|
870
|
-
this._onDrop();
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
ee("setupClone", this), v.eventCanceled || (V = sn(c), V.removeAttribute("id"), V.draggable = !1, V.style["will-change"] = "", this._hideClone(), te(V, this.options.chosenClass, !1), v.clone = V), t.cloneId = Ge(function() {
|
|
874
|
-
ee("clone", t), !v.eventCanceled && (t.options.removeCloneOnHide || M.insertBefore(V, c), t._hideClone(), K({
|
|
875
|
-
sortable: t,
|
|
876
|
-
name: "clone"
|
|
877
|
-
}));
|
|
878
|
-
}), !n && te(c, r.dragClass, !0), n ? (Ze = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (S(document, "mouseup", t._onDrop), S(document, "touchend", t._onDrop), S(document, "touchcancel", t._onDrop), o && (o.effectAllowed = "move", r.setData && r.setData.call(t, o, c)), C(document, "drop", t), m(c, "transform", "translateZ(0)")), De = !0, t._dragStartId = Ge(t._dragStarted.bind(t, n, e)), C(document, "selectstart", t), Ie = !0, Ve && m(document.body, "user-select", "none");
|
|
879
|
-
},
|
|
880
|
-
// Returns true - if no further action is needed (either inserted or another condition)
|
|
881
|
-
_onDragOver: function(e) {
|
|
882
|
-
var n = this.el, t = e.target, o, r, a, l = this.options, s = l.group, i = v.active, u = Le === s, d = l.sort, h = H || i, E, g = this, T = !1;
|
|
883
|
-
if (bt)
|
|
884
|
-
return;
|
|
885
|
-
function x(P, ue) {
|
|
886
|
-
ee(P, g, fe({
|
|
887
|
-
evt: e,
|
|
888
|
-
isOwner: u,
|
|
889
|
-
axis: E ? "vertical" : "horizontal",
|
|
890
|
-
revert: a,
|
|
891
|
-
dragRect: o,
|
|
892
|
-
targetRect: r,
|
|
893
|
-
canSort: d,
|
|
894
|
-
fromSortable: h,
|
|
895
|
-
target: t,
|
|
896
|
-
completed: I,
|
|
897
|
-
onMove: function(me, f) {
|
|
898
|
-
return We(M, n, c, o, me, j(me), e, f);
|
|
899
|
-
},
|
|
900
|
-
changed: G
|
|
901
|
-
}, ue));
|
|
902
|
-
}
|
|
903
|
-
function $() {
|
|
904
|
-
x("dragOverAnimationCapture"), g.captureAnimationState(), g !== h && h.captureAnimationState();
|
|
905
|
-
}
|
|
906
|
-
function I(P) {
|
|
907
|
-
return x("dragOverCompleted", {
|
|
908
|
-
insertion: P
|
|
909
|
-
}), P && (u ? i._hideClone() : i._showClone(g), g !== h && (te(c, H ? H.options.ghostClass : i.options.ghostClass, !1), te(c, l.ghostClass, !0)), H !== g && g !== v.active ? H = g : g === v.active && H && (H = null), h === g && (g._ignoreWhileAnimating = t), g.animateAll(function() {
|
|
910
|
-
x("dragOverAnimationComplete"), g._ignoreWhileAnimating = null;
|
|
911
|
-
}), g !== h && (h.animateAll(), h._ignoreWhileAnimating = null)), (t === c && !c.animated || t === n && !t.animated) && (Ce = null), !l.dragoverBubble && !e.rootEl && t !== document && (c.parentNode[oe]._isOutsideThisEl(e.target), !P && we(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), T = !0;
|
|
912
|
-
}
|
|
913
|
-
function G() {
|
|
914
|
-
ne = le(c), ve = le(c, l.draggable), K({
|
|
915
|
-
sortable: g,
|
|
916
|
-
name: "change",
|
|
917
|
-
toEl: n,
|
|
918
|
-
newIndex: ne,
|
|
919
|
-
newDraggableIndex: ve,
|
|
920
|
-
originalEvent: e
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = se(t, l.draggable, n, !0), x("dragOver"), v.eventCanceled)
|
|
924
|
-
return T;
|
|
925
|
-
if (c.contains(e.target) || t.animated && t.animatingX && t.animatingY || g._ignoreWhileAnimating === t)
|
|
926
|
-
return I(!1);
|
|
927
|
-
if (Ze = !1, i && !l.disabled && (u ? d || (a = R !== M) : H === this || (this.lastPutMode = Le.checkPull(this, i, c, e)) && s.checkPut(this, i, c, e))) {
|
|
928
|
-
if (E = this._getDirection(e, t) === "vertical", o = j(c), x("dragOverValid"), v.eventCanceled)
|
|
929
|
-
return T;
|
|
930
|
-
if (a)
|
|
931
|
-
return R = M, $(), this._hideClone(), x("revert"), v.eventCanceled || (xe ? M.insertBefore(c, xe) : M.appendChild(c)), I(!0);
|
|
932
|
-
var F = St(n, l.draggable);
|
|
933
|
-
if (!F || so(e, E, this) && !F.animated) {
|
|
934
|
-
if (F === c)
|
|
935
|
-
return I(!1);
|
|
936
|
-
if (F && n === e.target && (t = F), t && (r = j(t)), We(M, n, c, o, t, r, e, !!t) !== !1)
|
|
937
|
-
return $(), F && F.nextSibling ? n.insertBefore(c, F.nextSibling) : n.appendChild(c), R = n, G(), I(!0);
|
|
938
|
-
} else if (F && io(e, E, this)) {
|
|
939
|
-
var J = Pe(n, 0, l, !0);
|
|
940
|
-
if (J === c)
|
|
941
|
-
return I(!1);
|
|
942
|
-
if (t = J, r = j(t), We(M, n, c, o, t, r, e, !1) !== !1)
|
|
943
|
-
return $(), n.insertBefore(c, J), R = n, G(), I(!0);
|
|
944
|
-
} else if (t.parentNode === n) {
|
|
945
|
-
r = j(t);
|
|
946
|
-
var z = 0, re, Q = c.parentNode !== n, ce = !no(c.animated && c.toRect || o, t.animated && t.toRect || r, E), L = E ? "top" : "left", b = jt(t, "top", "top") || jt(c, "top", "top"), D = b ? b.scrollTop : void 0;
|
|
947
|
-
Ce !== t && (re = r[L], Ue = !1, Be = !ce && l.invertSwap || Q), z = co(e, t, r, E, ce ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Be, Ce === t);
|
|
948
|
-
var p;
|
|
949
|
-
if (z !== 0) {
|
|
950
|
-
var y = le(c);
|
|
951
|
-
do
|
|
952
|
-
y -= z, p = R.children[y];
|
|
953
|
-
while (p && (m(p, "display") === "none" || p === _));
|
|
954
|
-
}
|
|
955
|
-
if (z === 0 || p === t)
|
|
956
|
-
return I(!1);
|
|
957
|
-
Ce = t, Ye = z;
|
|
958
|
-
var w = t.nextElementSibling, O = !1;
|
|
959
|
-
O = z === 1;
|
|
960
|
-
var Y = We(M, n, c, o, t, r, e, O);
|
|
961
|
-
if (Y !== !1)
|
|
962
|
-
return (Y === 1 || Y === -1) && (O = Y === 1), bt = !0, setTimeout(lo, 30), $(), O && !w ? n.appendChild(c) : t.parentNode.insertBefore(c, O ? w : t), b && ln(b, 0, D - b.scrollTop), R = c.parentNode, re !== void 0 && !Be && ($e = Math.abs(re - j(t)[L])), G(), I(!0);
|
|
963
|
-
}
|
|
964
|
-
if (n.contains(c))
|
|
965
|
-
return I(!1);
|
|
966
|
-
}
|
|
967
|
-
return !1;
|
|
968
|
-
},
|
|
969
|
-
_ignoreWhileAnimating: null,
|
|
970
|
-
_offMoveEvents: function() {
|
|
971
|
-
S(document, "mousemove", this._onTouchMove), S(document, "touchmove", this._onTouchMove), S(document, "pointermove", this._onTouchMove), S(document, "dragover", we), S(document, "mousemove", we), S(document, "touchmove", we);
|
|
972
|
-
},
|
|
973
|
-
_offUpEvents: function() {
|
|
974
|
-
var e = this.el.ownerDocument;
|
|
975
|
-
S(e, "mouseup", this._onDrop), S(e, "touchend", this._onDrop), S(e, "pointerup", this._onDrop), S(e, "touchcancel", this._onDrop), S(document, "selectstart", this);
|
|
976
|
-
},
|
|
977
|
-
_onDrop: function(e) {
|
|
978
|
-
var n = this.el, t = this.options;
|
|
979
|
-
if (ne = le(c), ve = le(c, t.draggable), ee("drop", this, {
|
|
980
|
-
evt: e
|
|
981
|
-
}), R = c && c.parentNode, ne = le(c), ve = le(c, t.draggable), v.eventCanceled) {
|
|
982
|
-
this._nulling();
|
|
983
|
-
return;
|
|
984
|
-
}
|
|
985
|
-
De = !1, Be = !1, Ue = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), yt(this.cloneId), yt(this._dragStartId), this.nativeDraggable && (S(document, "drop", this), S(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ve && m(document.body, "user-select", ""), m(c, "transform", ""), e && (Ie && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), _ && _.parentNode && _.parentNode.removeChild(_), (M === R || H && H.lastPutMode !== "clone") && V && V.parentNode && V.parentNode.removeChild(V), c && (this.nativeDraggable && S(c, "dragend", this), ht(c), c.style["will-change"] = "", Ie && !De && te(c, H ? H.options.ghostClass : this.options.ghostClass, !1), te(c, this.options.chosenClass, !1), K({
|
|
986
|
-
sortable: this,
|
|
987
|
-
name: "unchoose",
|
|
988
|
-
toEl: R,
|
|
989
|
-
newIndex: null,
|
|
990
|
-
newDraggableIndex: null,
|
|
991
|
-
originalEvent: e
|
|
992
|
-
}), M !== R ? (ne >= 0 && (K({
|
|
993
|
-
rootEl: R,
|
|
994
|
-
name: "add",
|
|
995
|
-
toEl: R,
|
|
996
|
-
fromEl: M,
|
|
997
|
-
originalEvent: e
|
|
998
|
-
}), K({
|
|
999
|
-
sortable: this,
|
|
1000
|
-
name: "remove",
|
|
1001
|
-
toEl: R,
|
|
1002
|
-
originalEvent: e
|
|
1003
|
-
}), K({
|
|
1004
|
-
rootEl: R,
|
|
1005
|
-
name: "sort",
|
|
1006
|
-
toEl: R,
|
|
1007
|
-
fromEl: M,
|
|
1008
|
-
originalEvent: e
|
|
1009
|
-
}), K({
|
|
1010
|
-
sortable: this,
|
|
1011
|
-
name: "sort",
|
|
1012
|
-
toEl: R,
|
|
1013
|
-
originalEvent: e
|
|
1014
|
-
})), H && H.save()) : ne !== ke && ne >= 0 && (K({
|
|
1015
|
-
sortable: this,
|
|
1016
|
-
name: "update",
|
|
1017
|
-
toEl: R,
|
|
1018
|
-
originalEvent: e
|
|
1019
|
-
}), K({
|
|
1020
|
-
sortable: this,
|
|
1021
|
-
name: "sort",
|
|
1022
|
-
toEl: R,
|
|
1023
|
-
originalEvent: e
|
|
1024
|
-
})), v.active && ((ne == null || ne === -1) && (ne = ke, ve = Fe), K({
|
|
1025
|
-
sortable: this,
|
|
1026
|
-
name: "end",
|
|
1027
|
-
toEl: R,
|
|
1028
|
-
originalEvent: e
|
|
1029
|
-
}), this.save()))), this._nulling();
|
|
1030
|
-
},
|
|
1031
|
-
_nulling: function() {
|
|
1032
|
-
ee("nulling", this), M = c = R = _ = xe = V = qe = be = _e = ie = Ie = ne = ve = ke = Fe = Ce = Ye = H = Le = v.dragged = v.ghost = v.clone = v.active = null, tt.forEach(function(e) {
|
|
1033
|
-
e.checked = !0;
|
|
1034
|
-
}), tt.length = dt = ft = 0;
|
|
1035
|
-
},
|
|
1036
|
-
handleEvent: function(e) {
|
|
1037
|
-
switch (e.type) {
|
|
1038
|
-
case "drop":
|
|
1039
|
-
case "dragend":
|
|
1040
|
-
this._onDrop(e);
|
|
1041
|
-
break;
|
|
1042
|
-
case "dragenter":
|
|
1043
|
-
case "dragover":
|
|
1044
|
-
c && (this._onDragOver(e), ao(e));
|
|
1045
|
-
break;
|
|
1046
|
-
case "selectstart":
|
|
1047
|
-
e.preventDefault();
|
|
1048
|
-
break;
|
|
1049
|
-
}
|
|
1050
|
-
},
|
|
1051
|
-
/**
|
|
1052
|
-
* Serializes the item into an array of string.
|
|
1053
|
-
* @returns {String[]}
|
|
1054
|
-
*/
|
|
1055
|
-
toArray: function() {
|
|
1056
|
-
for (var e = [], n, t = this.el.children, o = 0, r = t.length, a = this.options; o < r; o++)
|
|
1057
|
-
n = t[o], se(n, a.draggable, this.el, !1) && e.push(n.getAttribute(a.dataIdAttr) || fo(n));
|
|
1058
|
-
return e;
|
|
1059
|
-
},
|
|
1060
|
-
/**
|
|
1061
|
-
* Sorts the elements according to the array.
|
|
1062
|
-
* @param {String[]} order order of the items
|
|
1063
|
-
*/
|
|
1064
|
-
sort: function(e, n) {
|
|
1065
|
-
var t = {}, o = this.el;
|
|
1066
|
-
this.toArray().forEach(function(r, a) {
|
|
1067
|
-
var l = o.children[a];
|
|
1068
|
-
se(l, this.options.draggable, o, !1) && (t[r] = l);
|
|
1069
|
-
}, this), n && this.captureAnimationState(), e.forEach(function(r) {
|
|
1070
|
-
t[r] && (o.removeChild(t[r]), o.appendChild(t[r]));
|
|
1071
|
-
}), n && this.animateAll();
|
|
1072
|
-
},
|
|
1073
|
-
/**
|
|
1074
|
-
* Save the current sorting
|
|
1075
|
-
*/
|
|
1076
|
-
save: function() {
|
|
1077
|
-
var e = this.options.store;
|
|
1078
|
-
e && e.set && e.set(this);
|
|
1079
|
-
},
|
|
1080
|
-
/**
|
|
1081
|
-
* 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.
|
|
1082
|
-
* @param {HTMLElement} el
|
|
1083
|
-
* @param {String} [selector] default: `options.draggable`
|
|
1084
|
-
* @returns {HTMLElement|null}
|
|
1085
|
-
*/
|
|
1086
|
-
closest: function(e, n) {
|
|
1087
|
-
return se(e, n || this.options.draggable, this.el, !1);
|
|
1088
|
-
},
|
|
1089
|
-
/**
|
|
1090
|
-
* Set/get option
|
|
1091
|
-
* @param {string} name
|
|
1092
|
-
* @param {*} [value]
|
|
1093
|
-
* @returns {*}
|
|
1094
|
-
*/
|
|
1095
|
-
option: function(e, n) {
|
|
1096
|
-
var t = this.options;
|
|
1097
|
-
if (n === void 0)
|
|
1098
|
-
return t[e];
|
|
1099
|
-
var o = Xe.modifyOption(this, e, n);
|
|
1100
|
-
typeof o < "u" ? t[e] = o : t[e] = n, e === "group" && fn(t);
|
|
1101
|
-
},
|
|
1102
|
-
/**
|
|
1103
|
-
* Destroy
|
|
1104
|
-
*/
|
|
1105
|
-
destroy: function() {
|
|
1106
|
-
ee("destroy", this);
|
|
1107
|
-
var e = this.el;
|
|
1108
|
-
e[oe] = null, S(e, "mousedown", this._onTapStart), S(e, "touchstart", this._onTapStart), S(e, "pointerdown", this._onTapStart), this.nativeDraggable && (S(e, "dragover", this), S(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
|
1109
|
-
n.removeAttribute("draggable");
|
|
1110
|
-
}), this._onDrop(), this._disableDelayedDragEvents(), et.splice(et.indexOf(this.el), 1), this.el = e = null;
|
|
1111
|
-
},
|
|
1112
|
-
_hideClone: function() {
|
|
1113
|
-
if (!be) {
|
|
1114
|
-
if (ee("hideClone", this), v.eventCanceled)
|
|
1115
|
-
return;
|
|
1116
|
-
m(V, "display", "none"), this.options.removeCloneOnHide && V.parentNode && V.parentNode.removeChild(V), be = !0;
|
|
1117
|
-
}
|
|
1118
|
-
},
|
|
1119
|
-
_showClone: function(e) {
|
|
1120
|
-
if (e.lastPutMode !== "clone") {
|
|
1121
|
-
this._hideClone();
|
|
1122
|
-
return;
|
|
1123
|
-
}
|
|
1124
|
-
if (be) {
|
|
1125
|
-
if (ee("showClone", this), v.eventCanceled)
|
|
1126
|
-
return;
|
|
1127
|
-
c.parentNode == M && !this.options.group.revertClone ? M.insertBefore(V, c) : xe ? M.insertBefore(V, xe) : M.appendChild(V), this.options.group.revertClone && this.animate(c, V), m(V, "display", ""), be = !1;
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
};
|
|
1131
|
-
function ao(e) {
|
|
1132
|
-
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1133
|
-
}
|
|
1134
|
-
function We(e, n, t, o, r, a, l, s) {
|
|
1135
|
-
var i, u = e[oe], d = u.options.onMove, h;
|
|
1136
|
-
return window.CustomEvent && !ge && !je ? i = new CustomEvent("move", {
|
|
1137
|
-
bubbles: !0,
|
|
1138
|
-
cancelable: !0
|
|
1139
|
-
}) : (i = document.createEvent("Event"), i.initEvent("move", !0, !0)), i.to = n, i.from = e, i.dragged = t, i.draggedRect = o, i.related = r || n, i.relatedRect = a || j(n), i.willInsertAfter = s, i.originalEvent = l, e.dispatchEvent(i), d && (h = d.call(u, i, l)), h;
|
|
1140
|
-
}
|
|
1141
|
-
function ht(e) {
|
|
1142
|
-
e.draggable = !1;
|
|
1143
|
-
}
|
|
1144
|
-
function lo() {
|
|
1145
|
-
bt = !1;
|
|
1146
|
-
}
|
|
1147
|
-
function io(e, n, t) {
|
|
1148
|
-
var o = j(Pe(t.el, 0, t.options, !0)), r = cn(t.el, t.options, _), a = 10;
|
|
1149
|
-
return n ? e.clientX < r.left - a || e.clientY < o.top && e.clientX < o.right : e.clientY < r.top - a || e.clientY < o.bottom && e.clientX < o.left;
|
|
1150
|
-
}
|
|
1151
|
-
function so(e, n, t) {
|
|
1152
|
-
var o = j(St(t.el, t.options.draggable)), r = cn(t.el, t.options, _), a = 10;
|
|
1153
|
-
return n ? e.clientX > r.right + a || e.clientY > o.bottom && e.clientX > o.left : e.clientY > r.bottom + a || e.clientX > o.right && e.clientY > o.top;
|
|
1154
|
-
}
|
|
1155
|
-
function co(e, n, t, o, r, a, l, s) {
|
|
1156
|
-
var i = o ? e.clientY : e.clientX, u = o ? t.height : t.width, d = o ? t.top : t.left, h = o ? t.bottom : t.right, E = !1;
|
|
1157
|
-
if (!l) {
|
|
1158
|
-
if (s && $e < u * r) {
|
|
1159
|
-
if (!Ue && (Ye === 1 ? i > d + u * a / 2 : i < h - u * a / 2) && (Ue = !0), Ue)
|
|
1160
|
-
E = !0;
|
|
1161
|
-
else if (Ye === 1 ? i < d + $e : i > h - $e)
|
|
1162
|
-
return -Ye;
|
|
1163
|
-
} else if (i > d + u * (1 - r) / 2 && i < h - u * (1 - r) / 2)
|
|
1164
|
-
return uo(n);
|
|
1165
|
-
}
|
|
1166
|
-
return E = E || l, E && (i < d + u * a / 2 || i > h - u * a / 2) ? i > d + u / 2 ? 1 : -1 : 0;
|
|
1167
|
-
}
|
|
1168
|
-
function uo(e) {
|
|
1169
|
-
return le(c) < le(e) ? 1 : -1;
|
|
1170
|
-
}
|
|
1171
|
-
function fo(e) {
|
|
1172
|
-
for (var n = e.tagName + e.className + e.src + e.href + e.textContent, t = n.length, o = 0; t--; )
|
|
1173
|
-
o += n.charCodeAt(t);
|
|
1174
|
-
return o.toString(36);
|
|
1175
|
-
}
|
|
1176
|
-
function po(e) {
|
|
1177
|
-
tt.length = 0;
|
|
1178
|
-
for (var n = e.getElementsByTagName("input"), t = n.length; t--; ) {
|
|
1179
|
-
var o = n[t];
|
|
1180
|
-
o.checked && tt.push(o);
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
function Ge(e) {
|
|
1184
|
-
return setTimeout(e, 0);
|
|
1185
|
-
}
|
|
1186
|
-
function yt(e) {
|
|
1187
|
-
return clearTimeout(e);
|
|
1188
|
-
}
|
|
1189
|
-
ot && C(document, "touchmove", function(e) {
|
|
1190
|
-
(v.active || De) && e.cancelable && e.preventDefault();
|
|
1191
|
-
});
|
|
1192
|
-
v.utils = {
|
|
1193
|
-
on: C,
|
|
1194
|
-
off: S,
|
|
1195
|
-
css: m,
|
|
1196
|
-
find: rn,
|
|
1197
|
-
is: function(e, n) {
|
|
1198
|
-
return !!se(e, n, e, !1);
|
|
1199
|
-
},
|
|
1200
|
-
extend: $n,
|
|
1201
|
-
throttle: an,
|
|
1202
|
-
closest: se,
|
|
1203
|
-
toggleClass: te,
|
|
1204
|
-
clone: sn,
|
|
1205
|
-
index: le,
|
|
1206
|
-
nextTick: Ge,
|
|
1207
|
-
cancelNextTick: yt,
|
|
1208
|
-
detectDirection: dn,
|
|
1209
|
-
getChild: Pe
|
|
1210
|
-
};
|
|
1211
|
-
v.get = function(e) {
|
|
1212
|
-
return e[oe];
|
|
1213
|
-
};
|
|
1214
|
-
v.mount = function() {
|
|
1215
|
-
for (var e = arguments.length, n = new Array(e), t = 0; t < e; t++)
|
|
1216
|
-
n[t] = arguments[t];
|
|
1217
|
-
n[0].constructor === Array && (n = n[0]), n.forEach(function(o) {
|
|
1218
|
-
if (!o.prototype || !o.prototype.constructor)
|
|
1219
|
-
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
|
1220
|
-
o.utils && (v.utils = fe(fe({}, v.utils), o.utils)), Xe.mount(o);
|
|
1221
|
-
});
|
|
1222
|
-
};
|
|
1223
|
-
v.create = function(e, n) {
|
|
1224
|
-
return new v(e, n);
|
|
1225
|
-
};
|
|
1226
|
-
v.version = Wn;
|
|
1227
|
-
var U = [], Ne, _t, wt = !1, gt, mt, nt, Me;
|
|
1228
|
-
function ho() {
|
|
1229
|
-
function e() {
|
|
1230
|
-
this.defaults = {
|
|
1231
|
-
scroll: !0,
|
|
1232
|
-
forceAutoScrollFallback: !1,
|
|
1233
|
-
scrollSensitivity: 30,
|
|
1234
|
-
scrollSpeed: 10,
|
|
1235
|
-
bubbleScroll: !0
|
|
1236
|
-
};
|
|
1237
|
-
for (var n in this)
|
|
1238
|
-
n.charAt(0) === "_" && typeof this[n] == "function" && (this[n] = this[n].bind(this));
|
|
1239
|
-
}
|
|
1240
|
-
return e.prototype = {
|
|
1241
|
-
dragStarted: function(n) {
|
|
1242
|
-
var t = n.originalEvent;
|
|
1243
|
-
this.sortable.nativeDraggable ? C(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? C(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? C(document, "touchmove", this._handleFallbackAutoScroll) : C(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1244
|
-
},
|
|
1245
|
-
dragOverCompleted: function(n) {
|
|
1246
|
-
var t = n.originalEvent;
|
|
1247
|
-
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1248
|
-
},
|
|
1249
|
-
drop: function() {
|
|
1250
|
-
this.sortable.nativeDraggable ? S(document, "dragover", this._handleAutoScroll) : (S(document, "pointermove", this._handleFallbackAutoScroll), S(document, "touchmove", this._handleFallbackAutoScroll), S(document, "mousemove", this._handleFallbackAutoScroll)), Wt(), Qe(), Gn();
|
|
1251
|
-
},
|
|
1252
|
-
nulling: function() {
|
|
1253
|
-
nt = _t = Ne = wt = Me = gt = mt = null, U.length = 0;
|
|
1254
|
-
},
|
|
1255
|
-
_handleFallbackAutoScroll: function(n) {
|
|
1256
|
-
this._handleAutoScroll(n, !0);
|
|
1257
|
-
},
|
|
1258
|
-
_handleAutoScroll: function(n, t) {
|
|
1259
|
-
var o = this, r = (n.touches ? n.touches[0] : n).clientX, a = (n.touches ? n.touches[0] : n).clientY, l = document.elementFromPoint(r, a);
|
|
1260
|
-
if (nt = n, t || this.options.forceAutoScrollFallback || je || ge || Ve) {
|
|
1261
|
-
vt(n, this.options, l, t);
|
|
1262
|
-
var s = ye(l, !0);
|
|
1263
|
-
wt && (!Me || r !== gt || a !== mt) && (Me && Wt(), Me = setInterval(function() {
|
|
1264
|
-
var i = ye(document.elementFromPoint(r, a), !0);
|
|
1265
|
-
i !== s && (s = i, Qe()), vt(n, o.options, i, t);
|
|
1266
|
-
}, 10), gt = r, mt = a);
|
|
1267
|
-
} else {
|
|
1268
|
-
if (!this.options.bubbleScroll || ye(l, !0) === de()) {
|
|
1269
|
-
Qe();
|
|
1270
|
-
return;
|
|
1271
|
-
}
|
|
1272
|
-
vt(n, this.options, ye(l, !1), !1);
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
}, he(e, {
|
|
1276
|
-
pluginName: "scroll",
|
|
1277
|
-
initializeByDefault: !0
|
|
1278
|
-
});
|
|
1279
|
-
}
|
|
1280
|
-
function Qe() {
|
|
1281
|
-
U.forEach(function(e) {
|
|
1282
|
-
clearInterval(e.pid);
|
|
1283
|
-
}), U = [];
|
|
1284
|
-
}
|
|
1285
|
-
function Wt() {
|
|
1286
|
-
clearInterval(Me);
|
|
1287
|
-
}
|
|
1288
|
-
var vt = an(function(e, n, t, o) {
|
|
1289
|
-
if (n.scroll) {
|
|
1290
|
-
var r = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, l = n.scrollSensitivity, s = n.scrollSpeed, i = de(), u = !1, d;
|
|
1291
|
-
_t !== t && (_t = t, Qe(), Ne = n.scroll, d = n.scrollFn, Ne === !0 && (Ne = ye(t, !0)));
|
|
1292
|
-
var h = 0, E = Ne;
|
|
1293
|
-
do {
|
|
1294
|
-
var g = E, T = j(g), x = T.top, $ = T.bottom, I = T.left, G = T.right, F = T.width, J = T.height, z = void 0, re = void 0, Q = g.scrollWidth, ce = g.scrollHeight, L = m(g), b = g.scrollLeft, D = g.scrollTop;
|
|
1295
|
-
g === i ? (z = F < Q && (L.overflowX === "auto" || L.overflowX === "scroll" || L.overflowX === "visible"), re = J < ce && (L.overflowY === "auto" || L.overflowY === "scroll" || L.overflowY === "visible")) : (z = F < Q && (L.overflowX === "auto" || L.overflowX === "scroll"), re = J < ce && (L.overflowY === "auto" || L.overflowY === "scroll"));
|
|
1296
|
-
var p = z && (Math.abs(G - r) <= l && b + F < Q) - (Math.abs(I - r) <= l && !!b), y = re && (Math.abs($ - a) <= l && D + J < ce) - (Math.abs(x - a) <= l && !!D);
|
|
1297
|
-
if (!U[h])
|
|
1298
|
-
for (var w = 0; w <= h; w++)
|
|
1299
|
-
U[w] || (U[w] = {});
|
|
1300
|
-
(U[h].vx != p || U[h].vy != y || U[h].el !== g) && (U[h].el = g, U[h].vx = p, U[h].vy = y, clearInterval(U[h].pid), (p != 0 || y != 0) && (u = !0, U[h].pid = setInterval((function() {
|
|
1301
|
-
o && this.layer === 0 && v.active._onTouchMove(nt);
|
|
1302
|
-
var O = U[this.layer].vy ? U[this.layer].vy * s : 0, Y = U[this.layer].vx ? U[this.layer].vx * s : 0;
|
|
1303
|
-
typeof d == "function" && d.call(v.dragged.parentNode[oe], Y, O, e, nt, U[this.layer].el) !== "continue" || ln(U[this.layer].el, Y, O);
|
|
1304
|
-
}).bind({
|
|
1305
|
-
layer: h
|
|
1306
|
-
}), 24))), h++;
|
|
1307
|
-
} while (n.bubbleScroll && E !== i && (E = ye(E, !1)));
|
|
1308
|
-
wt = u;
|
|
1309
|
-
}
|
|
1310
|
-
}, 30), gn = function(e) {
|
|
1311
|
-
var n = e.originalEvent, t = e.putSortable, o = e.dragEl, r = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1312
|
-
if (n) {
|
|
1313
|
-
var i = t || r;
|
|
1314
|
-
l();
|
|
1315
|
-
var u = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, d = document.elementFromPoint(u.clientX, u.clientY);
|
|
1316
|
-
s(), i && !i.el.contains(d) && (a("spill"), this.onSpill({
|
|
1317
|
-
dragEl: o,
|
|
1318
|
-
putSortable: t
|
|
1319
|
-
}));
|
|
1320
|
-
}
|
|
1321
|
-
};
|
|
1322
|
-
function Ct() {
|
|
1323
|
-
}
|
|
1324
|
-
Ct.prototype = {
|
|
1325
|
-
startIndex: null,
|
|
1326
|
-
dragStart: function(e) {
|
|
1327
|
-
var n = e.oldDraggableIndex;
|
|
1328
|
-
this.startIndex = n;
|
|
1329
|
-
},
|
|
1330
|
-
onSpill: function(e) {
|
|
1331
|
-
var n = e.dragEl, t = e.putSortable;
|
|
1332
|
-
this.sortable.captureAnimationState(), t && t.captureAnimationState();
|
|
1333
|
-
var o = Pe(this.sortable.el, this.startIndex, this.options);
|
|
1334
|
-
o ? this.sortable.el.insertBefore(n, o) : this.sortable.el.appendChild(n), this.sortable.animateAll(), t && t.animateAll();
|
|
1335
|
-
},
|
|
1336
|
-
drop: gn
|
|
1337
|
-
};
|
|
1338
|
-
he(Ct, {
|
|
1339
|
-
pluginName: "revertOnSpill"
|
|
1340
|
-
});
|
|
1341
|
-
function Dt() {
|
|
1342
|
-
}
|
|
1343
|
-
Dt.prototype = {
|
|
1344
|
-
onSpill: function(e) {
|
|
1345
|
-
var n = e.dragEl, t = e.putSortable, o = t || this.sortable;
|
|
1346
|
-
o.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), o.animateAll();
|
|
1347
|
-
},
|
|
1348
|
-
drop: gn
|
|
1349
|
-
};
|
|
1350
|
-
he(Dt, {
|
|
1351
|
-
pluginName: "removeOnSpill"
|
|
1352
|
-
});
|
|
1353
|
-
v.mount(new ho());
|
|
1354
|
-
v.mount(Dt, Ct);
|
|
1355
|
-
function go(e) {
|
|
1356
|
-
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
1357
|
-
}
|
|
1358
|
-
function mo(e) {
|
|
1359
|
-
Et() && xn(e);
|
|
1360
|
-
}
|
|
1361
|
-
function vo(e) {
|
|
1362
|
-
Et() ? wn(e) : Qt(e);
|
|
1363
|
-
}
|
|
1364
|
-
let mn = null, vn = null;
|
|
1365
|
-
function zt(e = null, n = null) {
|
|
1366
|
-
mn = e, vn = n;
|
|
1367
|
-
}
|
|
1368
|
-
function bo() {
|
|
1369
|
-
return {
|
|
1370
|
-
data: mn,
|
|
1371
|
-
clonedData: vn
|
|
1372
|
-
};
|
|
1373
|
-
}
|
|
1374
|
-
const qt = Symbol("cloneElement");
|
|
1375
|
-
function yo(...e) {
|
|
1376
|
-
var n, t;
|
|
1377
|
-
const o = (n = Et()) == null ? void 0 : n.proxy;
|
|
1378
|
-
let r = null;
|
|
1379
|
-
const a = e[0];
|
|
1380
|
-
let [, l, s] = e;
|
|
1381
|
-
Array.isArray(W(l)) || (s = l, l = null);
|
|
1382
|
-
let i = null;
|
|
1383
|
-
const {
|
|
1384
|
-
immediate: u = !0,
|
|
1385
|
-
clone: d = go,
|
|
1386
|
-
forceFallback: h,
|
|
1387
|
-
fallbackOnBody: E,
|
|
1388
|
-
customUpdate: g
|
|
1389
|
-
} = (t = W(s)) != null ? t : {};
|
|
1390
|
-
function T(b) {
|
|
1391
|
-
var D;
|
|
1392
|
-
const { from: p, oldIndex: y, item: w } = b, O = Array.from(p.childNodes);
|
|
1393
|
-
r = h && !E ? O.slice(0, -1) : O;
|
|
1394
|
-
const Y = W((D = W(l)) == null ? void 0 : D[y]), P = d(Y);
|
|
1395
|
-
zt(Y, P), w[qt] = P;
|
|
1396
|
-
}
|
|
1397
|
-
function x(b) {
|
|
1398
|
-
const D = b.item[qt];
|
|
1399
|
-
if (!Mn(D)) {
|
|
1400
|
-
if (st(b.item), rt(l)) {
|
|
1401
|
-
const p = [...W(l)];
|
|
1402
|
-
l.value = Mt(p, b.newDraggableIndex, D);
|
|
1403
|
-
return;
|
|
1404
|
-
}
|
|
1405
|
-
Mt(W(l), b.newDraggableIndex, D);
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
function $(b) {
|
|
1409
|
-
const { from: D, item: p, oldIndex: y, oldDraggableIndex: w, pullMode: O, clone: Y } = b;
|
|
1410
|
-
if (Vt(D, p, y), O === "clone") {
|
|
1411
|
-
st(Y);
|
|
1412
|
-
return;
|
|
1413
|
-
}
|
|
1414
|
-
if (rt(l)) {
|
|
1415
|
-
const P = [...W(l)];
|
|
1416
|
-
l.value = Nt(P, w);
|
|
1417
|
-
return;
|
|
1418
|
-
}
|
|
1419
|
-
Nt(W(l), w);
|
|
1420
|
-
}
|
|
1421
|
-
function I(b) {
|
|
1422
|
-
if (g) {
|
|
1423
|
-
g(b);
|
|
1424
|
-
return;
|
|
1425
|
-
}
|
|
1426
|
-
const { from: D, item: p, oldIndex: y, oldDraggableIndex: w, newDraggableIndex: O } = b;
|
|
1427
|
-
if (st(p), Vt(D, p, y), rt(l)) {
|
|
1428
|
-
const Y = [...W(l)];
|
|
1429
|
-
l.value = It(
|
|
1430
|
-
Y,
|
|
1431
|
-
w,
|
|
1432
|
-
O
|
|
1433
|
-
);
|
|
1434
|
-
return;
|
|
1435
|
-
}
|
|
1436
|
-
It(W(l), w, O);
|
|
1437
|
-
}
|
|
1438
|
-
function G(b) {
|
|
1439
|
-
const { newIndex: D, oldIndex: p, from: y, to: w } = b;
|
|
1440
|
-
let O = null;
|
|
1441
|
-
const Y = D === p && y === w;
|
|
1442
|
-
try {
|
|
1443
|
-
if (Y) {
|
|
1444
|
-
let P = null;
|
|
1445
|
-
r == null || r.some((ue, me) => {
|
|
1446
|
-
if (P && (r == null ? void 0 : r.length) !== w.childNodes.length)
|
|
1447
|
-
return y.insertBefore(P, ue.nextSibling), !0;
|
|
1448
|
-
const f = w.childNodes[me];
|
|
1449
|
-
P = w == null ? void 0 : w.replaceChild(ue, f);
|
|
1450
|
-
});
|
|
1451
|
-
}
|
|
1452
|
-
} catch (P) {
|
|
1453
|
-
O = P;
|
|
1454
|
-
} finally {
|
|
1455
|
-
r = null;
|
|
1456
|
-
}
|
|
1457
|
-
Qt(() => {
|
|
1458
|
-
if (zt(), O)
|
|
1459
|
-
throw O;
|
|
1460
|
-
});
|
|
1461
|
-
}
|
|
1462
|
-
const F = {
|
|
1463
|
-
onUpdate: I,
|
|
1464
|
-
onStart: T,
|
|
1465
|
-
onAdd: x,
|
|
1466
|
-
onRemove: $,
|
|
1467
|
-
onEnd: G
|
|
1468
|
-
};
|
|
1469
|
-
function J(b) {
|
|
1470
|
-
const D = W(a);
|
|
1471
|
-
return b || (b = Vn(D) ? Rn(D, o == null ? void 0 : o.$el) : D), b && !Un(b) && (b = b.$el), b || An("Root element not found"), b;
|
|
1472
|
-
}
|
|
1473
|
-
function z() {
|
|
1474
|
-
var b;
|
|
1475
|
-
const D = (b = W(s)) != null ? b : {}, { immediate: p, clone: y } = D, w = Zt(D, ["immediate", "clone"]);
|
|
1476
|
-
return Rt(w, (O, Y) => {
|
|
1477
|
-
jn(O) && (w[O] = (P, ...ue) => {
|
|
1478
|
-
const me = bo();
|
|
1479
|
-
return Xn(P, me), Y(P, ...ue);
|
|
1480
|
-
});
|
|
1481
|
-
}), Yn(
|
|
1482
|
-
l === null ? {} : F,
|
|
1483
|
-
w
|
|
1484
|
-
);
|
|
1485
|
-
}
|
|
1486
|
-
const re = (b) => {
|
|
1487
|
-
b = J(b), i && Q.destroy(), i = new v(b, z());
|
|
1488
|
-
};
|
|
1489
|
-
Gt(
|
|
1490
|
-
() => s,
|
|
1491
|
-
() => {
|
|
1492
|
-
i && Rt(z(), (b, D) => {
|
|
1493
|
-
i == null || i.option(b, D);
|
|
1494
|
-
});
|
|
1495
|
-
},
|
|
1496
|
-
{ deep: !0 }
|
|
1497
|
-
);
|
|
1498
|
-
const Q = {
|
|
1499
|
-
option: (b, D) => i == null ? void 0 : i.option(b, D),
|
|
1500
|
-
destroy: () => {
|
|
1501
|
-
i == null || i.destroy(), i = null;
|
|
1502
|
-
},
|
|
1503
|
-
save: () => i == null ? void 0 : i.save(),
|
|
1504
|
-
toArray: () => i == null ? void 0 : i.toArray(),
|
|
1505
|
-
closest: (...b) => i == null ? void 0 : i.closest(...b)
|
|
1506
|
-
}, ce = () => Q == null ? void 0 : Q.option("disabled", !0), L = () => Q == null ? void 0 : Q.option("disabled", !1);
|
|
1507
|
-
return vo(() => {
|
|
1508
|
-
u && re();
|
|
1509
|
-
}), mo(Q.destroy), Te({ start: re, pause: ce, resume: L }, Q);
|
|
1510
|
-
}
|
|
1511
|
-
const xt = [
|
|
1512
|
-
"update",
|
|
1513
|
-
"start",
|
|
1514
|
-
"add",
|
|
1515
|
-
"remove",
|
|
1516
|
-
"choose",
|
|
1517
|
-
"unchoose",
|
|
1518
|
-
"end",
|
|
1519
|
-
"sort",
|
|
1520
|
-
"filter",
|
|
1521
|
-
"clone",
|
|
1522
|
-
"move",
|
|
1523
|
-
"change"
|
|
1524
|
-
], _o = [
|
|
1525
|
-
"clone",
|
|
1526
|
-
"animation",
|
|
1527
|
-
"ghostClass",
|
|
1528
|
-
"group",
|
|
1529
|
-
"sort",
|
|
1530
|
-
"disabled",
|
|
1531
|
-
"store",
|
|
1532
|
-
"handle",
|
|
1533
|
-
"draggable",
|
|
1534
|
-
"swapThreshold",
|
|
1535
|
-
"invertSwap",
|
|
1536
|
-
"invertedSwapThreshold",
|
|
1537
|
-
"removeCloneOnHide",
|
|
1538
|
-
"direction",
|
|
1539
|
-
"chosenClass",
|
|
1540
|
-
"dragClass",
|
|
1541
|
-
"ignore",
|
|
1542
|
-
"filter",
|
|
1543
|
-
"preventOnFilter",
|
|
1544
|
-
"easing",
|
|
1545
|
-
"setData",
|
|
1546
|
-
"dropBubble",
|
|
1547
|
-
"dragoverBubble",
|
|
1548
|
-
"dataIdAttr",
|
|
1549
|
-
"delay",
|
|
1550
|
-
"delayOnTouchOnly",
|
|
1551
|
-
"touchStartThreshold",
|
|
1552
|
-
"forceFallback",
|
|
1553
|
-
"fallbackClass",
|
|
1554
|
-
"fallbackOnBody",
|
|
1555
|
-
"fallbackTolerance",
|
|
1556
|
-
"fallbackOffset",
|
|
1557
|
-
"supportPointer",
|
|
1558
|
-
"emptyInsertThreshold",
|
|
1559
|
-
"scroll",
|
|
1560
|
-
"forceAutoScrollFallback",
|
|
1561
|
-
"scrollSensitivity",
|
|
1562
|
-
"scrollSpeed",
|
|
1563
|
-
"bubbleScroll",
|
|
1564
|
-
"modelValue",
|
|
1565
|
-
"tag",
|
|
1566
|
-
"target",
|
|
1567
|
-
"customUpdate",
|
|
1568
|
-
...xt.map((e) => `on${e.replace(/^\S/, (n) => n.toUpperCase())}`)
|
|
1569
|
-
], wo = $t({
|
|
1570
|
-
name: "VueDraggable",
|
|
1571
|
-
model: {
|
|
1572
|
-
prop: "modelValue",
|
|
1573
|
-
event: "update:modelValue"
|
|
1574
|
-
},
|
|
1575
|
-
props: _o,
|
|
1576
|
-
emits: ["update:modelValue", ...xt],
|
|
1577
|
-
setup(e, { slots: n, emit: t, expose: o, attrs: r }) {
|
|
1578
|
-
const a = xt.reduce((d, h) => {
|
|
1579
|
-
const E = `on${h.replace(/^\S/, (g) => g.toUpperCase())}`;
|
|
1580
|
-
return d[E] = (...g) => t(h, ...g), d;
|
|
1581
|
-
}, {}), l = Tt(() => {
|
|
1582
|
-
const d = bn(e), { modelValue: h } = d, E = Zt(d, ["modelValue"]), g = Object.entries(E).reduce((T, [x, $]) => {
|
|
1583
|
-
const I = W($);
|
|
1584
|
-
return I !== void 0 && (T[x] = I), T;
|
|
1585
|
-
}, {});
|
|
1586
|
-
return Te(Te({}, a), Nn(Te(Te({}, r), g)));
|
|
1587
|
-
}), s = Tt({
|
|
1588
|
-
get: () => e.modelValue,
|
|
1589
|
-
set: (d) => t("update:modelValue", d)
|
|
1590
|
-
}), i = Ae(), u = yn(
|
|
1591
|
-
yo(e.target || i, s, l)
|
|
1592
|
-
);
|
|
1593
|
-
return o(u), () => {
|
|
1594
|
-
var d;
|
|
1595
|
-
return _n(e.tag || "div", { ref: i }, (d = n == null ? void 0 : n.default) == null ? void 0 : d.call(n, u));
|
|
1596
|
-
};
|
|
1597
|
-
}
|
|
1598
|
-
}), xo = { class: "flex flex-col gap-6" }, Eo = {
|
|
1599
|
-
key: 0,
|
|
1600
|
-
class: "text-sm text-gray-500 flex items-center gap-1.5 -mb-2"
|
|
1601
|
-
}, So = { class: "flex items-center justify-between" }, Co = ["onClick"], Do = ["src"], To = { class: "text-xs font-semibold uppercase bg-gray-100 rounded px-2 py-1" }, ko = { class: "font-medium" }, Oo = {
|
|
1602
|
-
key: 0,
|
|
1603
|
-
class: "flex gap-8 my-6"
|
|
1604
|
-
}, Po = { class: "flex-1 min-w-0 flex flex-col gap-6" }, Ao = { class: "grid grid-cols-2 gap-6" }, Io = {
|
|
1605
|
-
key: 0,
|
|
1606
|
-
class: "flex flex-col gap-2"
|
|
1607
|
-
}, No = { class: "flex items-end gap-3" }, Mo = {
|
|
1608
|
-
key: 0,
|
|
1609
|
-
class: "flex flex-wrap gap-2"
|
|
1610
|
-
}, Vo = { class: "w-[300px] flex-shrink-0 flex flex-col gap-4" }, Ro = {
|
|
1611
|
-
key: 0,
|
|
1612
|
-
class: "flex flex-col gap-2"
|
|
1613
|
-
}, Fo = { class: "flex gap-1.5" }, Yo = ["onClick"], Uo = { class: "bg-gray-50 rounded-lg flex items-center justify-center py-10 px-6 min-h-[160px]" }, jo = {
|
|
1614
|
-
key: 0,
|
|
1615
|
-
class: "bg-white rounded-lg shadow-sm px-5 py-2.5 max-w-full"
|
|
1616
|
-
}, Xo = { class: "text-sm font-semibold text-indigo-500 text-center break-words block" }, Lo = {
|
|
1617
|
-
key: 0,
|
|
1618
|
-
class: "text-xs text-gray-400 text-center break-words block mt-0.5"
|
|
1619
|
-
}, Bo = {
|
|
1620
|
-
key: 1,
|
|
1621
|
-
class: "bg-white rounded-2xl shadow-sm px-5 py-4 flex flex-col items-start gap-2 min-w-[140px] max-w-[200px]"
|
|
1622
|
-
}, Ho = ["src"], Wo = { class: "text-sm font-medium text-gray-800 text-left break-words" }, zo = {
|
|
1623
|
-
key: 2,
|
|
1624
|
-
class: "text-xs text-gray-400 text-left break-words"
|
|
1625
|
-
}, qo = {
|
|
1626
|
-
key: 2,
|
|
1627
|
-
class: "bg-white rounded-2xl shadow-md px-6 py-5 flex flex-col items-center gap-2 min-w-[140px] max-w-[200px]"
|
|
1628
|
-
}, $o = ["src"], Go = { class: "text-base font-bold text-orange-500 text-center break-words" }, Qo = {
|
|
1629
|
-
key: 2,
|
|
1630
|
-
class: "text-xs text-gray-400 text-center break-words"
|
|
1631
|
-
}, Ko = {
|
|
1632
|
-
key: 1,
|
|
1633
|
-
class: "flex flex-col gap-2"
|
|
1634
|
-
}, Jo = { class: "bg-gray-50 border rounded-lg flex flex-col items-center gap-3 py-6 px-4" }, Zo = ["src"], er = {
|
|
1635
|
-
key: 1,
|
|
1636
|
-
class: "text-xs font-medium text-gray-400"
|
|
1637
|
-
}, tr = { class: "border-4 border-red-500 rounded-lg p-3 flex items-center justify-center bg-white" }, nr = { class: "text-center text-sm font-bold text-gray-900" }, or = {
|
|
1638
|
-
key: 2,
|
|
1639
|
-
class: "text-center text-xs text-gray-500"
|
|
1640
|
-
}, rr = {
|
|
1641
|
-
key: 1,
|
|
1642
|
-
class: "text-gray-500"
|
|
1643
|
-
}, ar = {
|
|
1644
|
-
key: 2,
|
|
1645
|
-
class: "mt-2 flex gap-3"
|
|
1646
|
-
}, lr = /* @__PURE__ */ $t({
|
|
1647
|
-
__name: "PaymentCheckout",
|
|
1648
|
-
props: {
|
|
1649
|
-
terminal: {
|
|
1650
|
-
type: Object,
|
|
1651
|
-
required: !0
|
|
1652
|
-
},
|
|
1653
|
-
onUpdate: {
|
|
1654
|
-
type: Function,
|
|
1655
|
-
required: !0
|
|
1656
|
-
}
|
|
1657
|
-
},
|
|
1658
|
-
setup(e) {
|
|
1659
|
-
const n = e, t = () => (n.terminal.paymentCheckouts ?? []).map((p) => ({ ...p })).sort((p, y) => (p.sortOrder ?? 0) - (y.sortOrder ?? 0)), o = Ae(t());
|
|
1660
|
-
Gt(
|
|
1661
|
-
() => n.terminal.paymentCheckouts,
|
|
1662
|
-
() => {
|
|
1663
|
-
o.value = t(), I.value = /* @__PURE__ */ new Set();
|
|
1664
|
-
}
|
|
1665
|
-
);
|
|
1666
|
-
function r() {
|
|
1667
|
-
o.value.forEach((p, y) => {
|
|
1668
|
-
p.sortOrder = y;
|
|
1669
|
-
});
|
|
1670
|
-
}
|
|
1671
|
-
const a = (p) => p.type === "ecr" || p.type === "ecr_qr", l = /* @__PURE__ */ new Set(["qr", "ecr_qr"]), s = (p) => l.has(p.type), i = {
|
|
1672
|
-
card: "credit_card",
|
|
1673
|
-
ecr: "credit_card"
|
|
1674
|
-
}, u = (p) => i[p.type] ?? null, d = [
|
|
1675
|
-
{ value: "pos_v7", label: "POS V7" },
|
|
1676
|
-
{ value: "pos_v8", label: "POS V8" }
|
|
1677
|
-
], h = [
|
|
1678
|
-
{ value: "kiosk_v2", label: "KIOSK V2" }
|
|
1679
|
-
], E = n.terminal.deviceType === "KIOSK" ? h : d, g = E[0].value, T = Ae({}), x = (p) => T.value[p.id] ?? g;
|
|
1680
|
-
function $(p, y) {
|
|
1681
|
-
T.value = { ...T.value, [p.id]: y };
|
|
1682
|
-
}
|
|
1683
|
-
const I = Ae(/* @__PURE__ */ new Set()), G = (p) => I.value.has(p.id);
|
|
1684
|
-
function F(p) {
|
|
1685
|
-
const y = new Set(I.value);
|
|
1686
|
-
y.has(p.id) ? y.delete(p.id) : y.add(p.id), I.value = y;
|
|
1687
|
-
}
|
|
1688
|
-
const J = Ae({});
|
|
1689
|
-
function z(p) {
|
|
1690
|
-
const y = (J.value[p.id] ?? "").trim().toUpperCase();
|
|
1691
|
-
if (!y) return;
|
|
1692
|
-
const w = p.fallbackCardTypes ?? [];
|
|
1693
|
-
w.includes(y) || (p.fallbackCardTypes = [...w, y]), J.value[p.id] = "";
|
|
1694
|
-
}
|
|
1695
|
-
function re(p, y) {
|
|
1696
|
-
const w = (p.fallbackCardTypes ?? []).filter((O) => O !== y);
|
|
1697
|
-
p.fallbackCardTypes = w.length > 0 ? w : null;
|
|
1698
|
-
}
|
|
1699
|
-
const Q = {
|
|
1700
|
-
card: "Card",
|
|
1701
|
-
ecr: "ECR",
|
|
1702
|
-
ecr_qr: "ECR QR",
|
|
1703
|
-
qr: "QR",
|
|
1704
|
-
scanpay: "Scan Pay"
|
|
1705
|
-
}, ce = (p) => p.action ? `${p.gateway} (${p.action})` : p.gateway;
|
|
1706
|
-
async function L() {
|
|
1707
|
-
await n.onUpdate(n.terminal, o.value);
|
|
1708
|
-
}
|
|
1709
|
-
const b = Dn();
|
|
1710
|
-
function D() {
|
|
1711
|
-
Tn(
|
|
1712
|
-
b,
|
|
1713
|
-
"Reset Payment Checkout",
|
|
1714
|
-
"This will clear all customizations (display name, subtitle, icon, payment description, payment tagline, receipt payment name, sort order, enabled state) for every payment method on this terminal and restore the defaults. This action cannot be undone.",
|
|
1715
|
-
async () => {
|
|
1716
|
-
await n.onUpdate(n.terminal, []);
|
|
1717
|
-
}
|
|
1718
|
-
);
|
|
1719
|
-
}
|
|
1720
|
-
return (p, y) => {
|
|
1721
|
-
const w = Ee("FmIcon"), O = Ee("FmTooltip"), Y = Ee("FmSwitch"), P = Ee("FmTextField"), ue = Ee("FmButton"), me = Ee("FmChip");
|
|
1722
|
-
return k(), N("div", xo, [
|
|
1723
|
-
o.value.length > 0 ? (k(), N("p", Eo, [
|
|
1724
|
-
y[2] || (y[2] = kt(" Drag the ", -1)),
|
|
1725
|
-
B(w, {
|
|
1726
|
-
class: "text-gray-400 mx-0.5",
|
|
1727
|
-
name: "drag_indicator"
|
|
1728
|
-
}),
|
|
1729
|
-
y[3] || (y[3] = kt(" handle to reorder payment checkouts ", -1))
|
|
1730
|
-
])) : Z("", !0),
|
|
1731
|
-
B(W(wo), {
|
|
1732
|
-
modelValue: o.value,
|
|
1733
|
-
"onUpdate:modelValue": y[1] || (y[1] = (f) => o.value = f),
|
|
1734
|
-
handle: ".checkout-drag-handle",
|
|
1735
|
-
class: "flex flex-col gap-6",
|
|
1736
|
-
"drag-class": "dragging-card",
|
|
1737
|
-
"ghost-class": "sortable-ghost-card",
|
|
1738
|
-
onEnd: r
|
|
1739
|
-
}, {
|
|
1740
|
-
default: Ot(() => [
|
|
1741
|
-
(k(!0), N(at, null, lt(o.value, (f) => (k(), N("div", {
|
|
1742
|
-
key: f.id,
|
|
1743
|
-
class: Pt(["border rounded-lg px-6 flex flex-col gap-4", G(f) ? "py-6" : "py-3"])
|
|
1744
|
-
}, [
|
|
1745
|
-
X("div", So, [
|
|
1746
|
-
X("div", {
|
|
1747
|
-
class: "flex items-center gap-3 flex-1 cursor-pointer select-none",
|
|
1748
|
-
onClick: (A) => F(f)
|
|
1749
|
-
}, [
|
|
1750
|
-
B(w, {
|
|
1751
|
-
class: "checkout-drag-handle cursor-grab text-gray-400",
|
|
1752
|
-
name: "drag_indicator",
|
|
1753
|
-
onClick: y[0] || (y[0] = En(() => {
|
|
1754
|
-
}, ["stop"]))
|
|
1755
|
-
}),
|
|
1756
|
-
B(w, {
|
|
1757
|
-
class: "text-gray-400",
|
|
1758
|
-
name: G(f) ? "expand_less" : "expand_more"
|
|
1759
|
-
}, null, 8, ["name"]),
|
|
1760
|
-
B(O, {
|
|
1761
|
-
variant: "plain",
|
|
1762
|
-
placement: "top",
|
|
1763
|
-
content: f.gateway,
|
|
1764
|
-
"hide-arrow": !0
|
|
1765
|
-
}, {
|
|
1766
|
-
default: Ot(() => [
|
|
1767
|
-
X("img", {
|
|
1768
|
-
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
1769
|
-
src: W(Cn)(f.gateway.toUpperCase())
|
|
1770
|
-
}, null, 8, Do)
|
|
1771
|
-
]),
|
|
1772
|
-
_: 2
|
|
1773
|
-
}, 1032, ["content"]),
|
|
1774
|
-
X("span", To, ae(Q[f.type] ?? f.type), 1),
|
|
1775
|
-
X("span", ko, ae(ce(f)), 1)
|
|
1776
|
-
], 8, Co),
|
|
1777
|
-
B(Y, {
|
|
1778
|
-
modelValue: f.enabled,
|
|
1779
|
-
"onUpdate:modelValue": (A) => f.enabled = A,
|
|
1780
|
-
label: "Enabled"
|
|
1781
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
1782
|
-
]),
|
|
1783
|
-
G(f) ? (k(), N("div", Oo, [
|
|
1784
|
-
X("div", Po, [
|
|
1785
|
-
X("div", Ao, [
|
|
1786
|
-
B(P, {
|
|
1787
|
-
modelValue: f.displayName,
|
|
1788
|
-
"onUpdate:modelValue": (A) => f.displayName = A,
|
|
1789
|
-
label: "Display Name"
|
|
1790
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
1791
|
-
B(P, {
|
|
1792
|
-
modelValue: f.subtitle,
|
|
1793
|
-
"onUpdate:modelValue": (A) => f.subtitle = A,
|
|
1794
|
-
label: "Subtitle",
|
|
1795
|
-
"label-mark": "optional"
|
|
1796
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
1797
|
-
B(P, {
|
|
1798
|
-
modelValue: f.icon,
|
|
1799
|
-
"onUpdate:modelValue": (A) => f.icon = A,
|
|
1800
|
-
label: "Icon URL",
|
|
1801
|
-
"label-mark": "optional"
|
|
1802
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
1803
|
-
B(P, {
|
|
1804
|
-
modelValue: f.paymentDescription,
|
|
1805
|
-
"onUpdate:modelValue": (A) => f.paymentDescription = A,
|
|
1806
|
-
label: "Payment Description",
|
|
1807
|
-
"label-mark": "optional"
|
|
1808
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
1809
|
-
B(P, {
|
|
1810
|
-
modelValue: f.paymentTagline,
|
|
1811
|
-
"onUpdate:modelValue": (A) => f.paymentTagline = A,
|
|
1812
|
-
label: "Payment Tagline",
|
|
1813
|
-
"label-mark": "optional"
|
|
1814
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
1815
|
-
B(P, {
|
|
1816
|
-
modelValue: f.receiptPaymentName,
|
|
1817
|
-
"onUpdate:modelValue": (A) => f.receiptPaymentName = A,
|
|
1818
|
-
label: "Receipt Payment Name",
|
|
1819
|
-
"label-info": "Name printed on the receipt. Leave blank to use the default for this payment method.",
|
|
1820
|
-
"label-mark": "optional"
|
|
1821
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
1822
|
-
]),
|
|
1823
|
-
a(f) ? (k(), N("div", Io, [
|
|
1824
|
-
X("div", No, [
|
|
1825
|
-
B(P, {
|
|
1826
|
-
modelValue: J.value[f.id],
|
|
1827
|
-
"onUpdate:modelValue": (A) => J.value[f.id] = A,
|
|
1828
|
-
class: "flex-1",
|
|
1829
|
-
label: "Fallback Card Types",
|
|
1830
|
-
"label-info": "Cards offered when a transaction falls back to the reconcile dialog. Default VISA, MASTERCARD.",
|
|
1831
|
-
"label-mark": "optional",
|
|
1832
|
-
onKeyup: Sn((A) => z(f), ["enter"])
|
|
1833
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]),
|
|
1834
|
-
B(ue, {
|
|
1835
|
-
icon: "add",
|
|
1836
|
-
onClick: (A) => z(f)
|
|
1837
|
-
}, null, 8, ["onClick"])
|
|
1838
|
-
]),
|
|
1839
|
-
(f.fallbackCardTypes ?? []).length > 0 ? (k(), N("div", Mo, [
|
|
1840
|
-
(k(!0), N(at, null, lt(f.fallbackCardTypes ?? [], (A) => (k(), it(me, {
|
|
1841
|
-
key: A,
|
|
1842
|
-
label: A,
|
|
1843
|
-
removable: !0,
|
|
1844
|
-
onChipClosed: () => re(f, A)
|
|
1845
|
-
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1846
|
-
])) : Z("", !0)
|
|
1847
|
-
])) : Z("", !0)
|
|
1848
|
-
]),
|
|
1849
|
-
X("div", Vo, [
|
|
1850
|
-
W(E).length > 1 ? (k(), N("div", Ro, [
|
|
1851
|
-
y[4] || (y[4] = X("span", { class: "text-xs font-medium text-gray-500" }, "Preview on", -1)),
|
|
1852
|
-
X("div", Fo, [
|
|
1853
|
-
(k(!0), N(at, null, lt(W(E), (A) => (k(), N("button", {
|
|
1854
|
-
key: A.value,
|
|
1855
|
-
type: "button",
|
|
1856
|
-
class: Pt([
|
|
1857
|
-
"rounded-md px-2.5 py-1 text-xs font-medium transition-colors mb-2",
|
|
1858
|
-
x(f) === A.value ? "bg-orange-500 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"
|
|
1859
|
-
]),
|
|
1860
|
-
onClick: (ir) => $(f, A.value)
|
|
1861
|
-
}, ae(A.label), 11, Yo))), 128))
|
|
1862
|
-
])
|
|
1863
|
-
])) : Z("", !0),
|
|
1864
|
-
X("div", Uo, [
|
|
1865
|
-
x(f) === "pos_v7" ? (k(), N("div", jo, [
|
|
1866
|
-
X("span", Xo, ae(f.displayName || "Payment Method"), 1),
|
|
1867
|
-
f.subtitle ? (k(), N("span", Lo, ae(f.subtitle), 1)) : Z("", !0)
|
|
1868
|
-
])) : x(f) === "pos_v8" ? (k(), N("div", Bo, [
|
|
1869
|
-
f.icon ? (k(), N("img", {
|
|
1870
|
-
key: 0,
|
|
1871
|
-
src: f.icon,
|
|
1872
|
-
class: "w-9 h-9 object-contain"
|
|
1873
|
-
}, null, 8, Ho)) : u(f) ? (k(), it(w, {
|
|
1874
|
-
key: 1,
|
|
1875
|
-
class: "text-gray-700 text-2xl",
|
|
1876
|
-
name: u(f)
|
|
1877
|
-
}, null, 8, ["name"])) : Z("", !0),
|
|
1878
|
-
X("span", Wo, ae(f.displayName || "Payment Method"), 1),
|
|
1879
|
-
f.subtitle ? (k(), N("span", zo, ae(f.subtitle), 1)) : Z("", !0)
|
|
1880
|
-
])) : (k(), N("div", qo, [
|
|
1881
|
-
f.icon ? (k(), N("img", {
|
|
1882
|
-
key: 0,
|
|
1883
|
-
src: f.icon,
|
|
1884
|
-
class: "w-9 h-9 object-contain"
|
|
1885
|
-
}, null, 8, $o)) : u(f) ? (k(), it(w, {
|
|
1886
|
-
key: 1,
|
|
1887
|
-
class: "text-orange-500 text-3xl",
|
|
1888
|
-
name: u(f)
|
|
1889
|
-
}, null, 8, ["name"])) : Z("", !0),
|
|
1890
|
-
X("span", Go, ae(f.displayName || "Payment Method"), 1),
|
|
1891
|
-
f.subtitle ? (k(), N("span", Qo, ae(f.subtitle), 1)) : Z("", !0)
|
|
1892
|
-
]))
|
|
1893
|
-
]),
|
|
1894
|
-
s(f) ? (k(), N("div", Ko, [
|
|
1895
|
-
y[5] || (y[5] = X("span", { class: "mt-2 text-xs font-medium text-gray-500" }, "Payment QR Screen", -1)),
|
|
1896
|
-
X("div", Jo, [
|
|
1897
|
-
f.icon ? (k(), N("img", {
|
|
1898
|
-
key: 0,
|
|
1899
|
-
src: f.icon,
|
|
1900
|
-
class: "h-6 object-contain"
|
|
1901
|
-
}, null, 8, Zo)) : (k(), N("span", er, ae(f.gateway), 1)),
|
|
1902
|
-
X("div", tr, [
|
|
1903
|
-
B(w, {
|
|
1904
|
-
name: "qr_code_2",
|
|
1905
|
-
class: "text-6xl text-gray-800"
|
|
1906
|
-
})
|
|
1907
|
-
]),
|
|
1908
|
-
X("p", nr, ae(f.paymentDescription || "Payment description"), 1),
|
|
1909
|
-
f.paymentTagline ? (k(), N("p", or, ae(f.paymentTagline), 1)) : Z("", !0)
|
|
1910
|
-
])
|
|
1911
|
-
])) : Z("", !0)
|
|
1912
|
-
])
|
|
1913
|
-
])) : Z("", !0)
|
|
1914
|
-
], 2))), 128))
|
|
1915
|
-
]),
|
|
1916
|
-
_: 1
|
|
1917
|
-
}, 8, ["modelValue"]),
|
|
1918
|
-
o.value.length === 0 ? (k(), N("div", rr, " No payment methods configured for this terminal. ")) : Z("", !0),
|
|
1919
|
-
o.value.length > 0 ? (k(), N("div", ar, [
|
|
1920
|
-
B(ue, {
|
|
1921
|
-
variant: "secondary",
|
|
1922
|
-
label: "Reset",
|
|
1923
|
-
icon: "restart_alt",
|
|
1924
|
-
onclick: D
|
|
1925
|
-
}),
|
|
1926
|
-
B(ue, {
|
|
1927
|
-
variant: "primary",
|
|
1928
|
-
label: "Save",
|
|
1929
|
-
icon: "save",
|
|
1930
|
-
onclick: L
|
|
1931
|
-
})
|
|
1932
|
-
])) : Z("", !0)
|
|
1933
|
-
]);
|
|
1934
|
-
};
|
|
1935
|
-
}
|
|
1936
|
-
}), hr = /* @__PURE__ */ kn(lr, [["__scopeId", "data-v-936ac426"]]);
|
|
1937
|
-
export {
|
|
1938
|
-
hr as P
|
|
1939
|
-
};
|