@feedmepos/mf-payment 1.9.3-dev → 1.9.4-dev
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-C9cv5yKo.js → Actions.vue_vue_type_script_setup_true_lang-CkECWfJH.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-NKO6-sgg.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-BO0JN_rh.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-uhnNKle-.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-Bnn4SxyN.js} +2 -2
- package/dist/{Chargeback-C5c2ggX9.js → Chargeback-b5GjZ9Mb.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DbDKfWJX.js → DocumentViewer.vue_vue_type_script_setup_true_lang-BviLk6nC.js} +1 -1
- package/dist/ExternalTerminal-DhoNW6qp.js +525 -0
- package/dist/{OnboardForm-CVuu8ixt.js → OnboardForm-Bq181JPX.js} +6 -6
- package/dist/{OnboardForm-COJfmIJt.js → OnboardForm-CtgycClY.js} +6 -6
- package/dist/{OnboardSubmission-Tl3HQgov.js → OnboardSubmission-D-0Sas7U.js} +6 -6
- package/dist/{OnboardSubmission-CuH1DxWt.js → OnboardSubmission-DXBjG3oR.js} +3 -3
- package/dist/{PayoutAccount-CmHNLOdq.js → PayoutAccount-D5giLt_J.js} +5 -5
- package/dist/{PayoutAccount-PXQSHup9.js → PayoutAccount-Ddpq-rZp.js} +7 -7
- package/dist/{PayoutAccountSetting-cV5Ts_Qq.js → PayoutAccountSetting-5ik0IR2I.js} +6 -6
- package/dist/{Restaurant-LzRSv42P.js → Restaurant-BG-2LYcJ.js} +4 -4
- package/dist/{RestaurantSetting-CsnW19gh.js → RestaurantSetting-CtnOR7kY.js} +3 -3
- package/dist/{Settlement-BycHPszE.js → Settlement-BzoTb2ks.js} +3 -3
- package/dist/{Settlement-eq9msmbN.js → Settlement-CfU_5sp-.js} +4 -4
- package/dist/{SettlementTransactions-BiDjpqc3.js → SettlementTransactions-CmX9LDuK.js} +5 -5
- package/dist/{SettlementTransactions-Ccm_gaYg.js → SettlementTransactions-Dh-erDBh.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-DuVSuCqQ.js → Status.vue_vue_type_script_setup_true_lang-D3dpjdxR.js} +1 -1
- package/dist/{Terminal-ZRi75g3B.js → Terminal-ZLduA0bd.js} +427 -403
- package/dist/{TerminalSetting-CpIOhxYF.js → TerminalSetting-CvaUOBlA.js} +5 -5
- package/dist/{Transaction-ClDKUNW6.js → Transaction-BeNRIA2R.js} +10 -10
- package/dist/{Transaction-Dfty1Pkq.js → Transaction-Bpc_LdWE.js} +11 -11
- package/dist/{TransactionOld-CkoAQGox.js → TransactionOld-SaMACUtQ.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-BU1aDd8a.js → TransactionStatus.vue_vue_type_script_setup_true_lang-CuBa_qMU.js} +1 -1
- package/dist/{app-BO87oXyA.js → app-Cq04HfHW.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/{assets-CEy6OF2t.js → assets-Cj91tAER.js} +1 -1
- package/dist/{grafana-BL6EdH24.js → grafana-CuJUDQ26.js} +1 -1
- package/dist/{index-CAd13T_z.js → index-BQijmIi-.js} +1 -1
- package/dist/{index-CGfEnp2P.js → index-BTMbNw68.js} +1 -1
- package/dist/{index-nn5zFo8I.js → index-C3dR6tpd.js} +1 -1
- package/dist/{index-CXpoEy-p.js → index-C4EENmPN.js} +1 -1
- package/dist/{index-zzOpgyK_.js → index-Cj7KUaM0.js} +1 -1
- package/dist/{index-By1YYoRG.js → index-DVC9y-6t.js} +1 -1
- package/dist/{index-NcS-Zyhu.js → index-DmC6nw2c.js} +1 -1
- package/dist/{index--870P92-.js → index-JV44EPG0.js} +2 -2
- package/dist/{index-DEPKBu9W.js → index-lfOPW24n.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DZQR-ukK.js → index.vue_vue_type_script_setup_true_lang-Cz6llWgj.js} +1 -1
- package/dist/{onboard-submission-29LM4jfB.js → onboard-submission-ChLJrEtc.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-HS9MHh85.js → payout-account-Db0R_Isi.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/external-terminal/{ExternalTerminalDialog.vue.d.ts → ExternalTerminalSideSheet.vue.d.ts} +23 -2
- package/dist/views/admin/terminal/{TerminalDialog.vue.d.ts → TerminalSideSheet.vue.d.ts} +23 -2
- package/package.json +1 -1
- package/dist/ExternalTerminal-Cd_azqjT.js +0 -502
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { e as
|
|
3
|
-
import { h as
|
|
4
|
-
import { u as Re } from "./index-
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { useSnackbar as
|
|
8
|
-
import { t as K } from "./index-
|
|
9
|
-
import { c as
|
|
10
|
-
import { useCoreStore as
|
|
11
|
-
import { g as
|
|
12
|
-
import { u as
|
|
13
|
-
import { z as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { w as
|
|
16
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as z, h as M, ref as _, onMounted as pe, watchEffect as Ce, Fragment as le, computed as U, openBlock as I, createElementBlock as J, createElementVNode as b, createTextVNode as re, toDisplayString as se, createVNode as P, resolveComponent as N, normalizeClass as we, withCtx as q, createBlock as x, createCommentVNode as $, useModel as ye, watch as Z, unref as L, mergeModels as ae, isRef as Ee } from "vue";
|
|
2
|
+
import { e as Se } from "./index-Cj7KUaM0.js";
|
|
3
|
+
import { h as Me } from "./moment-h96o7c8I.js";
|
|
4
|
+
import { u as Re } from "./index-BQijmIi-.js";
|
|
5
|
+
import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-Cz6llWgj.js";
|
|
6
|
+
import { _ as Ae } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
7
|
+
import { useSnackbar as j, useDialog as Pe } from "@feedmepos/ui-library";
|
|
8
|
+
import { t as K } from "./index-BTMbNw68.js";
|
|
9
|
+
import { c as ue } from "./clipboard-4jh1WteU.js";
|
|
10
|
+
import { useCoreStore as Te } from "@feedmepos/mf-common";
|
|
11
|
+
import { g as Ie } from "./grafana-CuJUDQ26.js";
|
|
12
|
+
import { u as X } from "./error-K1CakhA9.js";
|
|
13
|
+
import { z as ne, a as oe } from "./validator-CTlVogBQ.js";
|
|
14
|
+
import { _ as Ne } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-Bnn4SxyN.js";
|
|
15
|
+
import { w as ie } from "./Modal-DB8M9o1T.js";
|
|
16
|
+
import { useRouter as _e } from "vue-router";
|
|
17
17
|
/*!
|
|
18
18
|
* qrcode.vue v3.8.0
|
|
19
19
|
* A Vue.js component to generate QRCode. Both support Vue 2 and Vue 3
|
|
20
20
|
* © 2017-PRESENT @scopewu(https://github.com/scopewu)
|
|
21
21
|
* MIT License.
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
24
|
-
return
|
|
25
|
-
for (var
|
|
26
|
-
|
|
27
|
-
for (var
|
|
23
|
+
var A = function() {
|
|
24
|
+
return A = Object.assign || function(f) {
|
|
25
|
+
for (var u, l = 1, v = arguments.length; l < v; l++) {
|
|
26
|
+
u = arguments[l];
|
|
27
|
+
for (var d in u) Object.prototype.hasOwnProperty.call(u, d) && (f[d] = u[d]);
|
|
28
28
|
}
|
|
29
29
|
return f;
|
|
30
|
-
},
|
|
30
|
+
}, A.apply(this, arguments);
|
|
31
31
|
};
|
|
32
32
|
var Q;
|
|
33
33
|
(function(o) {
|
|
@@ -40,17 +40,17 @@ var Q;
|
|
|
40
40
|
if (n < -1 || n > 7)
|
|
41
41
|
throw new RangeError("Mask value out of range");
|
|
42
42
|
this.size = e * 4 + 17;
|
|
43
|
-
for (var i = [],
|
|
43
|
+
for (var i = [], s = 0; s < this.size; s++)
|
|
44
44
|
i.push(!1);
|
|
45
|
-
for (var
|
|
45
|
+
for (var s = 0; s < this.size; s++)
|
|
46
46
|
this.modules.push(i.slice()), this.isFunction.push(i.slice());
|
|
47
47
|
this.drawFunctionPatterns();
|
|
48
48
|
var g = this.addEccAndInterleave(a);
|
|
49
49
|
if (this.drawCodewords(g), n == -1)
|
|
50
|
-
for (var C = 1e9,
|
|
51
|
-
this.applyMask(
|
|
52
|
-
var
|
|
53
|
-
|
|
50
|
+
for (var C = 1e9, s = 0; s < 8; s++) {
|
|
51
|
+
this.applyMask(s), this.drawFormatBits(s);
|
|
52
|
+
var w = this.getPenaltyScore();
|
|
53
|
+
w < C && (n = s, C = w), this.applyMask(s);
|
|
54
54
|
}
|
|
55
55
|
v(0 <= n && n <= 7), this.mask = n, this.applyMask(n), this.drawFormatBits(n), this.isFunction = [];
|
|
56
56
|
}
|
|
@@ -60,41 +60,41 @@ var Q;
|
|
|
60
60
|
}, r.encodeBinary = function(e, t) {
|
|
61
61
|
var a = o.QrSegment.makeBytes(e);
|
|
62
62
|
return r.encodeSegments([a], t);
|
|
63
|
-
}, r.encodeSegments = function(e, t, a, n, i,
|
|
64
|
-
if (a === void 0 && (a = 1), n === void 0 && (n = 40), i === void 0 && (i = -1),
|
|
63
|
+
}, r.encodeSegments = function(e, t, a, n, i, s) {
|
|
64
|
+
if (a === void 0 && (a = 1), n === void 0 && (n = 40), i === void 0 && (i = -1), s === void 0 && (s = !0), !(r.MIN_VERSION <= a && a <= n && n <= r.MAX_VERSION) || i < -1 || i > 7)
|
|
65
65
|
throw new RangeError("Invalid value");
|
|
66
66
|
var g, C;
|
|
67
67
|
for (g = a; ; g++) {
|
|
68
|
-
var
|
|
69
|
-
if (
|
|
70
|
-
C =
|
|
68
|
+
var w = r.getNumDataCodewords(g, t) * 8, E = d.getTotalBits(e, g);
|
|
69
|
+
if (E <= w) {
|
|
70
|
+
C = E;
|
|
71
71
|
break;
|
|
72
72
|
}
|
|
73
73
|
if (g >= n)
|
|
74
74
|
throw new RangeError("Data too long");
|
|
75
75
|
}
|
|
76
|
-
for (var p = 0,
|
|
77
|
-
var
|
|
78
|
-
|
|
76
|
+
for (var p = 0, h = [r.Ecc.MEDIUM, r.Ecc.QUARTILE, r.Ecc.HIGH]; p < h.length; p++) {
|
|
77
|
+
var m = h[p];
|
|
78
|
+
s && C <= r.getNumDataCodewords(g, m) * 8 && (t = m);
|
|
79
79
|
}
|
|
80
|
-
for (var
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
for (var
|
|
84
|
-
var
|
|
85
|
-
|
|
80
|
+
for (var c = [], S = 0, y = e; S < y.length; S++) {
|
|
81
|
+
var R = y[S];
|
|
82
|
+
u(R.mode.modeBits, 4, c), u(R.numChars, R.mode.numCharCountBits(g), c);
|
|
83
|
+
for (var k = 0, T = R.getData(); k < T.length; k++) {
|
|
84
|
+
var W = T[k];
|
|
85
|
+
c.push(W);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
v(
|
|
88
|
+
v(c.length == C);
|
|
89
89
|
var V = r.getNumDataCodewords(g, t) * 8;
|
|
90
|
-
v(
|
|
91
|
-
for (var
|
|
92
|
-
|
|
93
|
-
for (var
|
|
94
|
-
|
|
95
|
-
return
|
|
96
|
-
return
|
|
97
|
-
}), new r(g, t,
|
|
90
|
+
v(c.length <= V), u(0, Math.min(4, V - c.length), c), u(0, (8 - c.length % 8) % 8, c), v(c.length % 8 == 0);
|
|
91
|
+
for (var F = 236; c.length < V; F ^= 253)
|
|
92
|
+
u(F, 8, c);
|
|
93
|
+
for (var O = []; O.length * 8 < c.length; )
|
|
94
|
+
O.push(0);
|
|
95
|
+
return c.forEach(function(B, D) {
|
|
96
|
+
return O[D >>> 3] |= B << 7 - (D & 7);
|
|
97
|
+
}), new r(g, t, O, i);
|
|
98
98
|
}, r.prototype.getModule = function(e, t) {
|
|
99
99
|
return 0 <= e && e < this.size && 0 <= t && t < this.size && this.modules[t][e];
|
|
100
100
|
}, r.prototype.getModules = function() {
|
|
@@ -113,14 +113,14 @@ var Q;
|
|
|
113
113
|
var i = (t << 10 | a) ^ 21522;
|
|
114
114
|
v(i >>> 15 == 0);
|
|
115
115
|
for (var n = 0; n <= 5; n++)
|
|
116
|
-
this.setFunctionModule(8, n,
|
|
117
|
-
this.setFunctionModule(8, 7,
|
|
116
|
+
this.setFunctionModule(8, n, l(i, n));
|
|
117
|
+
this.setFunctionModule(8, 7, l(i, 6)), this.setFunctionModule(8, 8, l(i, 7)), this.setFunctionModule(7, 8, l(i, 8));
|
|
118
118
|
for (var n = 9; n < 15; n++)
|
|
119
|
-
this.setFunctionModule(14 - n, 8,
|
|
119
|
+
this.setFunctionModule(14 - n, 8, l(i, n));
|
|
120
120
|
for (var n = 0; n < 8; n++)
|
|
121
|
-
this.setFunctionModule(this.size - 1 - n, 8,
|
|
121
|
+
this.setFunctionModule(this.size - 1 - n, 8, l(i, n));
|
|
122
122
|
for (var n = 8; n < 15; n++)
|
|
123
|
-
this.setFunctionModule(8, this.size - 15 + n,
|
|
123
|
+
this.setFunctionModule(8, this.size - 15 + n, l(i, n));
|
|
124
124
|
this.setFunctionModule(8, this.size - 8, !0);
|
|
125
125
|
}, r.prototype.drawVersion = function() {
|
|
126
126
|
if (!(this.version < 7)) {
|
|
@@ -129,15 +129,15 @@ var Q;
|
|
|
129
129
|
var a = this.version << 12 | e;
|
|
130
130
|
v(a >>> 18 == 0);
|
|
131
131
|
for (var t = 0; t < 18; t++) {
|
|
132
|
-
var n =
|
|
133
|
-
this.setFunctionModule(i,
|
|
132
|
+
var n = l(a, t), i = this.size - 11 + t % 3, s = Math.floor(t / 3);
|
|
133
|
+
this.setFunctionModule(i, s, n), this.setFunctionModule(s, i, n);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}, r.prototype.drawFinderPattern = function(e, t) {
|
|
137
137
|
for (var a = -4; a <= 4; a++)
|
|
138
138
|
for (var n = -4; n <= 4; n++) {
|
|
139
|
-
var i = Math.max(Math.abs(n), Math.abs(a)),
|
|
140
|
-
0 <=
|
|
139
|
+
var i = Math.max(Math.abs(n), Math.abs(a)), s = e + n, g = t + a;
|
|
140
|
+
0 <= s && s < this.size && 0 <= g && g < this.size && this.setFunctionModule(s, g, i != 2 && i != 4);
|
|
141
141
|
}
|
|
142
142
|
}, r.prototype.drawAlignmentPattern = function(e, t) {
|
|
143
143
|
for (var a = -2; a <= 2; a++)
|
|
@@ -149,19 +149,19 @@ var Q;
|
|
|
149
149
|
var t = this.version, a = this.errorCorrectionLevel;
|
|
150
150
|
if (e.length != r.getNumDataCodewords(t, a))
|
|
151
151
|
throw new RangeError("Invalid argument");
|
|
152
|
-
for (var n = r.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][t], i = r.ECC_CODEWORDS_PER_BLOCK[a.ordinal][t],
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
var
|
|
156
|
-
p < g &&
|
|
152
|
+
for (var n = r.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][t], i = r.ECC_CODEWORDS_PER_BLOCK[a.ordinal][t], s = Math.floor(r.getNumRawDataModules(t) / 8), g = n - s % n, C = Math.floor(s / n), w = [], E = r.reedSolomonComputeDivisor(i), p = 0, h = 0; p < n; p++) {
|
|
153
|
+
var m = e.slice(h, h + C - i + (p < g ? 0 : 1));
|
|
154
|
+
h += m.length;
|
|
155
|
+
var c = r.reedSolomonComputeRemainder(m, E);
|
|
156
|
+
p < g && m.push(0), w.push(m.concat(c));
|
|
157
157
|
}
|
|
158
|
-
for (var
|
|
159
|
-
|
|
160
|
-
(
|
|
158
|
+
for (var S = [], y = function(R) {
|
|
159
|
+
w.forEach(function(k, T) {
|
|
160
|
+
(R != C - i || T >= g) && S.push(k[R]);
|
|
161
161
|
});
|
|
162
|
-
}, p = 0; p <
|
|
163
|
-
|
|
164
|
-
return v(
|
|
162
|
+
}, p = 0; p < w[0].length; p++)
|
|
163
|
+
y(p);
|
|
164
|
+
return v(S.length == s), S;
|
|
165
165
|
}, r.prototype.drawCodewords = function(e) {
|
|
166
166
|
if (e.length != Math.floor(r.getNumRawDataModules(this.version) / 8))
|
|
167
167
|
throw new RangeError("Invalid argument");
|
|
@@ -169,8 +169,8 @@ var Q;
|
|
|
169
169
|
a == 6 && (a = 5);
|
|
170
170
|
for (var n = 0; n < this.size; n++)
|
|
171
171
|
for (var i = 0; i < 2; i++) {
|
|
172
|
-
var
|
|
173
|
-
!this.isFunction[C][
|
|
172
|
+
var s = a - i, g = (a + 1 & 2) == 0, C = g ? this.size - 1 - n : n;
|
|
173
|
+
!this.isFunction[C][s] && t < e.length * 8 && (this.modules[C][s] = l(e[t >>> 3], 7 - (t & 7)), t++);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
v(t == e.length * 8);
|
|
@@ -212,28 +212,28 @@ var Q;
|
|
|
212
212
|
}
|
|
213
213
|
}, r.prototype.getPenaltyScore = function() {
|
|
214
214
|
for (var e = 0, t = 0; t < this.size; t++) {
|
|
215
|
-
for (var a = !1, n = 0, i = [0, 0, 0, 0, 0, 0, 0],
|
|
216
|
-
this.modules[t][
|
|
215
|
+
for (var a = !1, n = 0, i = [0, 0, 0, 0, 0, 0, 0], s = 0; s < this.size; s++)
|
|
216
|
+
this.modules[t][s] == a ? (n++, n == 5 ? e += r.PENALTY_N1 : n > 5 && e++) : (this.finderPenaltyAddHistory(n, i), a || (e += this.finderPenaltyCountPatterns(i) * r.PENALTY_N3), a = this.modules[t][s], n = 1);
|
|
217
217
|
e += this.finderPenaltyTerminateAndCount(a, n, i) * r.PENALTY_N3;
|
|
218
218
|
}
|
|
219
|
-
for (var
|
|
219
|
+
for (var s = 0; s < this.size; s++) {
|
|
220
220
|
for (var a = !1, g = 0, i = [0, 0, 0, 0, 0, 0, 0], t = 0; t < this.size; t++)
|
|
221
|
-
this.modules[t][
|
|
221
|
+
this.modules[t][s] == a ? (g++, g == 5 ? e += r.PENALTY_N1 : g > 5 && e++) : (this.finderPenaltyAddHistory(g, i), a || (e += this.finderPenaltyCountPatterns(i) * r.PENALTY_N3), a = this.modules[t][s], g = 1);
|
|
222
222
|
e += this.finderPenaltyTerminateAndCount(a, g, i) * r.PENALTY_N3;
|
|
223
223
|
}
|
|
224
224
|
for (var t = 0; t < this.size - 1; t++)
|
|
225
|
-
for (var
|
|
226
|
-
var C = this.modules[t][
|
|
227
|
-
C == this.modules[t][
|
|
225
|
+
for (var s = 0; s < this.size - 1; s++) {
|
|
226
|
+
var C = this.modules[t][s];
|
|
227
|
+
C == this.modules[t][s + 1] && C == this.modules[t + 1][s] && C == this.modules[t + 1][s + 1] && (e += r.PENALTY_N2);
|
|
228
228
|
}
|
|
229
|
-
for (var
|
|
230
|
-
var
|
|
231
|
-
|
|
232
|
-
return
|
|
233
|
-
},
|
|
229
|
+
for (var w = 0, E = 0, p = this.modules; E < p.length; E++) {
|
|
230
|
+
var h = p[E];
|
|
231
|
+
w = h.reduce(function(S, y) {
|
|
232
|
+
return S + (y ? 1 : 0);
|
|
233
|
+
}, w);
|
|
234
234
|
}
|
|
235
|
-
var
|
|
236
|
-
return v(0 <=
|
|
235
|
+
var m = this.size * this.size, c = Math.ceil(Math.abs(w * 20 - m * 10) / m) - 1;
|
|
236
|
+
return v(0 <= c && c <= 9), e += c * r.PENALTY_N4, v(0 <= e && e <= 2568888), e;
|
|
237
237
|
}, r.prototype.getAlignmentPatternPositions = function() {
|
|
238
238
|
if (this.version == 1)
|
|
239
239
|
return [];
|
|
@@ -267,12 +267,12 @@ var Q;
|
|
|
267
267
|
for (var a = t.map(function(C) {
|
|
268
268
|
return 0;
|
|
269
269
|
}), n = function(C) {
|
|
270
|
-
var
|
|
271
|
-
a.push(0), t.forEach(function(
|
|
272
|
-
return a[p] ^= r.reedSolomonMultiply(
|
|
270
|
+
var w = C ^ a.shift();
|
|
271
|
+
a.push(0), t.forEach(function(E, p) {
|
|
272
|
+
return a[p] ^= r.reedSolomonMultiply(E, w);
|
|
273
273
|
});
|
|
274
|
-
}, i = 0,
|
|
275
|
-
var g =
|
|
274
|
+
}, i = 0, s = e; i < s.length; i++) {
|
|
275
|
+
var g = s[i];
|
|
276
276
|
n(g);
|
|
277
277
|
}
|
|
278
278
|
return a;
|
|
@@ -317,20 +317,20 @@ var Q;
|
|
|
317
317
|
}()
|
|
318
318
|
);
|
|
319
319
|
o.QrCode = f;
|
|
320
|
-
function
|
|
320
|
+
function u(r, e, t) {
|
|
321
321
|
if (e < 0 || e > 31 || r >>> e)
|
|
322
322
|
throw new RangeError("Value out of range");
|
|
323
323
|
for (var a = e - 1; a >= 0; a--)
|
|
324
324
|
t.push(r >>> a & 1);
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function l(r, e) {
|
|
327
327
|
return (r >>> e & 1) != 0;
|
|
328
328
|
}
|
|
329
329
|
function v(r) {
|
|
330
330
|
if (!r)
|
|
331
331
|
throw new Error("Assertion error");
|
|
332
332
|
}
|
|
333
|
-
var
|
|
333
|
+
var d = (
|
|
334
334
|
/** @class */
|
|
335
335
|
function() {
|
|
336
336
|
function r(e, t, a) {
|
|
@@ -341,7 +341,7 @@ var Q;
|
|
|
341
341
|
return r.makeBytes = function(e) {
|
|
342
342
|
for (var t = [], a = 0, n = e; a < n.length; a++) {
|
|
343
343
|
var i = n[a];
|
|
344
|
-
|
|
344
|
+
u(i, 8, t);
|
|
345
345
|
}
|
|
346
346
|
return new r(r.Mode.BYTE, e.length, t);
|
|
347
347
|
}, r.makeNumeric = function(e) {
|
|
@@ -349,7 +349,7 @@ var Q;
|
|
|
349
349
|
throw new RangeError("String contains non-numeric characters");
|
|
350
350
|
for (var t = [], a = 0; a < e.length; ) {
|
|
351
351
|
var n = Math.min(e.length - a, 3);
|
|
352
|
-
|
|
352
|
+
u(parseInt(e.substring(a, a + n), 10), n * 3 + 1, t), a += n;
|
|
353
353
|
}
|
|
354
354
|
return new r(r.Mode.NUMERIC, e.length, t);
|
|
355
355
|
}, r.makeAlphanumeric = function(e) {
|
|
@@ -358,9 +358,9 @@ var Q;
|
|
|
358
358
|
var t = [], a;
|
|
359
359
|
for (a = 0; a + 2 <= e.length; a += 2) {
|
|
360
360
|
var n = r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(a)) * 45;
|
|
361
|
-
n += r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(a + 1)),
|
|
361
|
+
n += r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(a + 1)), u(n, 11, t);
|
|
362
362
|
}
|
|
363
|
-
return a < e.length &&
|
|
363
|
+
return a < e.length && u(r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(a)), 6, t), new r(r.Mode.ALPHANUMERIC, e.length, t);
|
|
364
364
|
}, r.makeSegments = function(e) {
|
|
365
365
|
return e == "" ? [] : r.isNumeric(e) ? [r.makeNumeric(e)] : r.isAlphanumeric(e) ? [r.makeAlphanumeric(e)] : [r.makeBytes(r.toUtf8ByteArray(e))];
|
|
366
366
|
}, r.makeEci = function(e) {
|
|
@@ -368,11 +368,11 @@ var Q;
|
|
|
368
368
|
if (e < 0)
|
|
369
369
|
throw new RangeError("ECI assignment value out of range");
|
|
370
370
|
if (e < 128)
|
|
371
|
-
|
|
371
|
+
u(e, 8, t);
|
|
372
372
|
else if (e < 16384)
|
|
373
|
-
|
|
373
|
+
u(2, 2, t), u(e, 14, t);
|
|
374
374
|
else if (e < 1e6)
|
|
375
|
-
|
|
375
|
+
u(6, 3, t), u(e, 21, t);
|
|
376
376
|
else
|
|
377
377
|
throw new RangeError("ECI assignment value out of range");
|
|
378
378
|
return new r(r.Mode.ECI, 0, t);
|
|
@@ -384,10 +384,10 @@ var Q;
|
|
|
384
384
|
return this.bitData.slice();
|
|
385
385
|
}, r.getTotalBits = function(e, t) {
|
|
386
386
|
for (var a = 0, n = 0, i = e; n < i.length; n++) {
|
|
387
|
-
var
|
|
388
|
-
if (
|
|
387
|
+
var s = i[n], g = s.mode.numCharCountBits(t);
|
|
388
|
+
if (s.numChars >= 1 << g)
|
|
389
389
|
return 1 / 0;
|
|
390
|
-
a += 4 + g +
|
|
390
|
+
a += 4 + g + s.bitData.length;
|
|
391
391
|
}
|
|
392
392
|
return a;
|
|
393
393
|
}, r.toUtf8ByteArray = function(e) {
|
|
@@ -398,44 +398,44 @@ var Q;
|
|
|
398
398
|
}, r.NUMERIC_REGEX = /^[0-9]*$/, r.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/, r.ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", r;
|
|
399
399
|
}()
|
|
400
400
|
);
|
|
401
|
-
o.QrSegment =
|
|
401
|
+
o.QrSegment = d;
|
|
402
402
|
})(Q || (Q = {}));
|
|
403
403
|
(function(o) {
|
|
404
404
|
(function(f) {
|
|
405
|
-
var
|
|
405
|
+
var u = (
|
|
406
406
|
/** @class */
|
|
407
407
|
function() {
|
|
408
|
-
function
|
|
409
|
-
this.ordinal = v, this.formatBits =
|
|
408
|
+
function l(v, d) {
|
|
409
|
+
this.ordinal = v, this.formatBits = d;
|
|
410
410
|
}
|
|
411
|
-
return
|
|
411
|
+
return l.LOW = new l(0, 1), l.MEDIUM = new l(1, 0), l.QUARTILE = new l(2, 3), l.HIGH = new l(3, 2), l;
|
|
412
412
|
}()
|
|
413
413
|
);
|
|
414
|
-
f.Ecc =
|
|
414
|
+
f.Ecc = u;
|
|
415
415
|
})(o.QrCode || (o.QrCode = {}));
|
|
416
416
|
})(Q || (Q = {}));
|
|
417
417
|
(function(o) {
|
|
418
418
|
(function(f) {
|
|
419
|
-
var
|
|
419
|
+
var u = (
|
|
420
420
|
/** @class */
|
|
421
421
|
function() {
|
|
422
|
-
function
|
|
423
|
-
this.modeBits = v, this.numBitsCharCount =
|
|
422
|
+
function l(v, d) {
|
|
423
|
+
this.modeBits = v, this.numBitsCharCount = d;
|
|
424
424
|
}
|
|
425
|
-
return
|
|
425
|
+
return l.prototype.numCharCountBits = function(v) {
|
|
426
426
|
return this.numBitsCharCount[Math.floor((v + 7) / 17)];
|
|
427
|
-
},
|
|
427
|
+
}, l.NUMERIC = new l(1, [10, 12, 14]), l.ALPHANUMERIC = new l(2, [9, 11, 13]), l.BYTE = new l(4, [8, 16, 16]), l.KANJI = new l(8, [8, 10, 12]), l.ECI = new l(7, [0, 0, 0]), l;
|
|
428
428
|
}()
|
|
429
429
|
);
|
|
430
|
-
f.Mode =
|
|
430
|
+
f.Mode = u;
|
|
431
431
|
})(o.QrSegment || (o.QrSegment = {}));
|
|
432
432
|
})(Q || (Q = {}));
|
|
433
|
-
var H = Q,
|
|
433
|
+
var H = Q, de = "L", ke = 100, ce = 0, Fe = 0.1, Be = 2, fe = {
|
|
434
434
|
L: H.QrCode.Ecc.LOW,
|
|
435
435
|
M: H.QrCode.Ecc.MEDIUM,
|
|
436
436
|
Q: H.QrCode.Ecc.QUARTILE,
|
|
437
437
|
H: H.QrCode.Ecc.HIGH
|
|
438
|
-
},
|
|
438
|
+
}, Le = function() {
|
|
439
439
|
try {
|
|
440
440
|
new Path2D().addPath(new Path2D());
|
|
441
441
|
} catch {
|
|
@@ -443,52 +443,52 @@ var H = Q, ue = "L", _e = 100, de = 0, ke = 0.1, Be = 2, ce = {
|
|
|
443
443
|
}
|
|
444
444
|
return !0;
|
|
445
445
|
}();
|
|
446
|
-
function
|
|
447
|
-
return o in
|
|
446
|
+
function ve(o) {
|
|
447
|
+
return o in fe;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function he(o, f) {
|
|
450
450
|
f === void 0 && (f = 0);
|
|
451
|
-
var
|
|
452
|
-
return o.forEach(function(
|
|
453
|
-
var
|
|
454
|
-
|
|
455
|
-
if (!r &&
|
|
456
|
-
|
|
451
|
+
var u = "";
|
|
452
|
+
return o.forEach(function(l, v) {
|
|
453
|
+
var d = null;
|
|
454
|
+
l.forEach(function(r, e) {
|
|
455
|
+
if (!r && d !== null) {
|
|
456
|
+
u += "M".concat(d + f, " ").concat(v + f, "h").concat(e - d, "v1H").concat(d + f, "z"), d = null;
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
|
-
if (e ===
|
|
459
|
+
if (e === l.length - 1) {
|
|
460
460
|
if (!r)
|
|
461
461
|
return;
|
|
462
|
-
|
|
462
|
+
d === null ? u += "M".concat(e + f, ",").concat(v + f, " h1v1H").concat(e + f, "z") : u += "M".concat(d + f, ",").concat(v + f, " h").concat(e + 1 - d, "v1H").concat(d + f, "z");
|
|
463
463
|
return;
|
|
464
464
|
}
|
|
465
|
-
r &&
|
|
465
|
+
r && d === null && (d = e);
|
|
466
466
|
});
|
|
467
|
-
}),
|
|
467
|
+
}), u;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
470
|
-
var v =
|
|
471
|
-
if (
|
|
472
|
-
var p = Math.floor(g),
|
|
473
|
-
|
|
469
|
+
function ze(o, f, u, l) {
|
|
470
|
+
var v = l.width, d = l.height, r = l.x, e = l.y, t = o.length + u * 2, a = Math.floor(f * Fe), n = t / f, i = (v || a) * n, s = (d || a) * n, g = r == null ? o.length / 2 - i / 2 : r * n, C = e == null ? o.length / 2 - s / 2 : e * n, w = (l.borderRadius || 0) * n, E = null;
|
|
471
|
+
if (l.excavate) {
|
|
472
|
+
var p = Math.floor(g), h = Math.floor(C), m = Math.ceil(i + g - p), c = Math.ceil(s + C - h);
|
|
473
|
+
E = { x: p, y: h, w: m, h: c };
|
|
474
474
|
}
|
|
475
|
-
return { x: g, y: C, h:
|
|
475
|
+
return { x: g, y: C, h: s, w: i, borderRadius: w, excavation: E };
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
var f =
|
|
477
|
+
function me(o) {
|
|
478
|
+
var f = U(function() {
|
|
479
479
|
var e;
|
|
480
|
-
return ((e = o.margin) !== null && e !== void 0 ? e :
|
|
481
|
-
}),
|
|
482
|
-
var e =
|
|
483
|
-
return H.QrCode.encodeText(o.value,
|
|
484
|
-
}),
|
|
485
|
-
return
|
|
486
|
-
}), v =
|
|
487
|
-
return
|
|
488
|
-
}),
|
|
480
|
+
return ((e = o.margin) !== null && e !== void 0 ? e : ce) >>> 0;
|
|
481
|
+
}), u = U(function() {
|
|
482
|
+
var e = ve(o.level) ? o.level : de;
|
|
483
|
+
return H.QrCode.encodeText(o.value, fe[e]).getModules();
|
|
484
|
+
}), l = U(function() {
|
|
485
|
+
return u.value.length + f.value * 2;
|
|
486
|
+
}), v = U(function() {
|
|
487
|
+
return he(u.value, f.value);
|
|
488
|
+
}), d = U(function() {
|
|
489
489
|
if (!o.imageSettings.src)
|
|
490
490
|
return { x: 0, y: 0, width: 0, height: 0, borderRadius: 0 };
|
|
491
|
-
var e =
|
|
491
|
+
var e = ze(u.value, o.size, f.value, o.imageSettings);
|
|
492
492
|
return {
|
|
493
493
|
x: e.x + f.value,
|
|
494
494
|
y: e.y + f.value,
|
|
@@ -496,21 +496,21 @@ function he(o) {
|
|
|
496
496
|
height: e.h,
|
|
497
497
|
borderRadius: e.borderRadius
|
|
498
498
|
};
|
|
499
|
-
}), r =
|
|
499
|
+
}), r = U(function() {
|
|
500
500
|
if (!o.imageSettings.excavate || !o.imageSettings.src)
|
|
501
501
|
return null;
|
|
502
|
-
var e = Be / (o.size /
|
|
502
|
+
var e = Be / (o.size / l.value);
|
|
503
503
|
return {
|
|
504
|
-
x:
|
|
505
|
-
y:
|
|
506
|
-
width:
|
|
507
|
-
height:
|
|
508
|
-
borderRadius:
|
|
504
|
+
x: d.value.x - e,
|
|
505
|
+
y: d.value.y - e,
|
|
506
|
+
width: d.value.width + e * 2,
|
|
507
|
+
height: d.value.height + e * 2,
|
|
508
|
+
borderRadius: d.value.borderRadius
|
|
509
509
|
};
|
|
510
510
|
});
|
|
511
|
-
return { margin: f, numCells:
|
|
511
|
+
return { margin: f, numCells: l, cells: u, fgPath: v, imageProps: d, imageBorderProps: r };
|
|
512
512
|
}
|
|
513
|
-
var
|
|
513
|
+
var ee = {
|
|
514
514
|
value: {
|
|
515
515
|
type: String,
|
|
516
516
|
required: !0,
|
|
@@ -518,13 +518,13 @@ var j = {
|
|
|
518
518
|
},
|
|
519
519
|
size: {
|
|
520
520
|
type: Number,
|
|
521
|
-
default:
|
|
521
|
+
default: ke
|
|
522
522
|
},
|
|
523
523
|
level: {
|
|
524
524
|
type: String,
|
|
525
|
-
default:
|
|
525
|
+
default: de,
|
|
526
526
|
validator: function(o) {
|
|
527
|
-
return
|
|
527
|
+
return ve(o);
|
|
528
528
|
}
|
|
529
529
|
},
|
|
530
530
|
background: {
|
|
@@ -538,7 +538,7 @@ var j = {
|
|
|
538
538
|
margin: {
|
|
539
539
|
type: Number,
|
|
540
540
|
required: !1,
|
|
541
|
-
default:
|
|
541
|
+
default: ce
|
|
542
542
|
},
|
|
543
543
|
imageSettings: {
|
|
544
544
|
type: Object,
|
|
@@ -570,18 +570,18 @@ var j = {
|
|
|
570
570
|
required: !1,
|
|
571
571
|
default: "#fff"
|
|
572
572
|
}
|
|
573
|
-
},
|
|
573
|
+
}, Oe = A(A({}, ee), { renderAs: {
|
|
574
574
|
type: String,
|
|
575
575
|
required: !1,
|
|
576
576
|
default: "canvas",
|
|
577
577
|
validator: function(o) {
|
|
578
578
|
return ["canvas", "svg"].indexOf(o) > -1;
|
|
579
579
|
}
|
|
580
|
-
} }),
|
|
580
|
+
} }), De = z({
|
|
581
581
|
name: "QRCodeSvg",
|
|
582
|
-
props:
|
|
582
|
+
props: ee,
|
|
583
583
|
setup: function(o) {
|
|
584
|
-
var f =
|
|
584
|
+
var f = me(o), u = f.numCells, l = f.fgPath, v = f.imageProps, d = f.imageBorderProps, r = "qrcode.vue-gradient", e = function() {
|
|
585
585
|
if (!o.gradient)
|
|
586
586
|
return null;
|
|
587
587
|
var n = o.gradientType === "linear" ? {
|
|
@@ -596,20 +596,20 @@ var j = {
|
|
|
596
596
|
fx: "50%",
|
|
597
597
|
fy: "50%"
|
|
598
598
|
};
|
|
599
|
-
return
|
|
600
|
-
|
|
599
|
+
return M(o.gradientType === "linear" ? "linearGradient" : "radialGradient", A({ id: r }, n), [
|
|
600
|
+
M("stop", {
|
|
601
601
|
offset: "0%",
|
|
602
602
|
style: { stopColor: o.gradientStartColor }
|
|
603
603
|
}),
|
|
604
|
-
|
|
604
|
+
M("stop", {
|
|
605
605
|
offset: "100%",
|
|
606
606
|
style: { stopColor: o.gradientEndColor }
|
|
607
607
|
})
|
|
608
608
|
]);
|
|
609
609
|
}, t = "qrcode.vue-logo-clip-path", a = function() {
|
|
610
610
|
var n = v.value.borderRadius;
|
|
611
|
-
return !o.imageSettings.src || n <= 0 ? null :
|
|
612
|
-
|
|
611
|
+
return !o.imageSettings.src || n <= 0 ? null : M("clipPath", { id: t }, [
|
|
612
|
+
M("rect", {
|
|
613
613
|
x: v.value.x,
|
|
614
614
|
y: v.value.y,
|
|
615
615
|
width: v.value.width,
|
|
@@ -620,77 +620,77 @@ var j = {
|
|
|
620
620
|
]);
|
|
621
621
|
};
|
|
622
622
|
return function() {
|
|
623
|
-
return
|
|
623
|
+
return M("svg", {
|
|
624
624
|
width: o.size,
|
|
625
625
|
height: o.size,
|
|
626
626
|
"shape-rendering": "crispEdges",
|
|
627
627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
628
|
-
viewBox: "0 0 ".concat(
|
|
628
|
+
viewBox: "0 0 ".concat(u.value, " ").concat(u.value)
|
|
629
629
|
}, [
|
|
630
|
-
|
|
631
|
-
|
|
630
|
+
M("defs", {}, [e(), a()]),
|
|
631
|
+
M("rect", {
|
|
632
632
|
width: "100%",
|
|
633
633
|
height: "100%",
|
|
634
634
|
fill: o.background
|
|
635
635
|
}),
|
|
636
|
-
|
|
636
|
+
M("path", {
|
|
637
637
|
fill: o.gradient ? "url(#".concat(r, ")") : o.foreground,
|
|
638
|
-
d:
|
|
638
|
+
d: l.value
|
|
639
639
|
}),
|
|
640
|
-
|
|
641
|
-
x:
|
|
642
|
-
y:
|
|
643
|
-
width:
|
|
644
|
-
height:
|
|
640
|
+
d.value && M("rect", {
|
|
641
|
+
x: d.value.x,
|
|
642
|
+
y: d.value.y,
|
|
643
|
+
width: d.value.width,
|
|
644
|
+
height: d.value.height,
|
|
645
645
|
fill: o.background,
|
|
646
|
-
rx:
|
|
647
|
-
ry:
|
|
646
|
+
rx: d.value.borderRadius,
|
|
647
|
+
ry: d.value.borderRadius
|
|
648
648
|
}),
|
|
649
|
-
o.imageSettings.src &&
|
|
649
|
+
o.imageSettings.src && M("image", A(A({ href: o.imageSettings.src }, v.value), v.value.borderRadius > 0 ? { "clip-path": "url(#".concat(t, ")") } : {}))
|
|
650
650
|
]);
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
|
-
}),
|
|
653
|
+
}), Ue = z({
|
|
654
654
|
name: "QRCodeCanvas",
|
|
655
|
-
props:
|
|
655
|
+
props: ee,
|
|
656
656
|
setup: function(o, f) {
|
|
657
|
-
var
|
|
658
|
-
var
|
|
659
|
-
if (
|
|
660
|
-
var
|
|
661
|
-
if (
|
|
662
|
-
var
|
|
663
|
-
if (
|
|
664
|
-
var
|
|
665
|
-
|
|
657
|
+
var u = me(o), l = u.margin, v = u.cells, d = u.numCells, r = u.imageProps, e = u.imageBorderProps, t = _(null), a = _(null), n = function() {
|
|
658
|
+
var s = o.size, g = o.background, C = o.foreground, w = o.gradient, E = o.gradientType, p = o.gradientStartColor, h = o.gradientEndColor, m = t.value;
|
|
659
|
+
if (m) {
|
|
660
|
+
var c = m.getContext("2d");
|
|
661
|
+
if (c) {
|
|
662
|
+
var S = v.value, y = a.value, R = typeof window < "u" && window.devicePixelRatio || 1, k = s / d.value * R;
|
|
663
|
+
if (m.height = m.width = s * R, c.scale(k, k), c.fillStyle = g, c.fillRect(0, 0, d.value, d.value), w) {
|
|
664
|
+
var T = void 0;
|
|
665
|
+
E === "linear" ? T = c.createLinearGradient(0, 0, d.value, d.value) : T = c.createRadialGradient(d.value / 2, d.value / 2, 0, d.value / 2, d.value / 2, d.value / 2), T.addColorStop(0, p), T.addColorStop(1, h), c.fillStyle = T;
|
|
666
666
|
} else
|
|
667
|
-
|
|
668
|
-
|
|
667
|
+
c.fillStyle = C;
|
|
668
|
+
Le ? c.fill(new Path2D(he(S, l.value))) : S.forEach(function(B, D) {
|
|
669
669
|
B.forEach(function(G, Y) {
|
|
670
|
-
G &&
|
|
670
|
+
G && c.fillRect(Y + l.value, D + l.value, 1, 1);
|
|
671
671
|
});
|
|
672
672
|
});
|
|
673
|
-
var
|
|
674
|
-
if (
|
|
675
|
-
var V = function(B,
|
|
676
|
-
B.beginPath(), B.roundRect ? B.roundRect(
|
|
673
|
+
var W = o.imageSettings.src && y && y.naturalWidth !== 0 && y.naturalHeight !== 0;
|
|
674
|
+
if (W) {
|
|
675
|
+
var V = function(B, D, G, Y, te, ge) {
|
|
676
|
+
B.beginPath(), B.roundRect ? B.roundRect(D, G, Y, te, ge) : B.rect(D, G, Y, te);
|
|
677
677
|
};
|
|
678
678
|
if (e.value) {
|
|
679
|
-
var
|
|
680
|
-
|
|
679
|
+
var F = e.value;
|
|
680
|
+
c.fillStyle = o.background, V(c, F.x, F.y, F.width, F.height, F.borderRadius), c.fill();
|
|
681
681
|
}
|
|
682
|
-
var
|
|
683
|
-
|
|
682
|
+
var O = r.value.borderRadius;
|
|
683
|
+
O > 0 ? (c.save(), V(c, r.value.x, r.value.y, r.value.width, r.value.height, O), c.clip(), c.drawImage(y, r.value.x, r.value.y, r.value.width, r.value.height), c.restore()) : c.drawImage(y, r.value.x, r.value.y, r.value.width, r.value.height);
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
|
-
|
|
688
|
+
pe(n), Ce(n);
|
|
689
689
|
var i = f.attrs.style;
|
|
690
690
|
return function() {
|
|
691
|
-
return
|
|
692
|
-
|
|
693
|
-
o.imageSettings.src &&
|
|
691
|
+
return M(le, [
|
|
692
|
+
M("canvas", A(A({}, f.attrs), { ref: t, style: A(A({}, i), { width: "".concat(o.size, "px"), height: "".concat(o.size, "px") }) })),
|
|
693
|
+
o.imageSettings.src && M("img", {
|
|
694
694
|
ref: a,
|
|
695
695
|
src: o.imageSettings.src,
|
|
696
696
|
style: { display: "none" },
|
|
@@ -699,27 +699,27 @@ var j = {
|
|
|
699
699
|
]);
|
|
700
700
|
};
|
|
701
701
|
}
|
|
702
|
-
}), xe =
|
|
702
|
+
}), xe = z({
|
|
703
703
|
name: "Qrcode",
|
|
704
704
|
render: function() {
|
|
705
|
-
var o = this.$props, f = o.renderAs,
|
|
706
|
-
return
|
|
707
|
-
value:
|
|
708
|
-
size:
|
|
705
|
+
var o = this.$props, f = o.renderAs, u = o.value, l = o.size, v = o.margin, d = o.level, r = o.background, e = o.foreground, t = o.imageSettings, a = o.gradient, n = o.gradientType, i = o.gradientStartColor, s = o.gradientEndColor;
|
|
706
|
+
return M(f === "svg" ? De : Ue, {
|
|
707
|
+
value: u,
|
|
708
|
+
size: l,
|
|
709
709
|
margin: v,
|
|
710
|
-
level:
|
|
710
|
+
level: d,
|
|
711
711
|
background: r,
|
|
712
712
|
foreground: e,
|
|
713
713
|
imageSettings: t,
|
|
714
714
|
gradient: a,
|
|
715
715
|
gradientType: n,
|
|
716
716
|
gradientStartColor: i,
|
|
717
|
-
gradientEndColor:
|
|
717
|
+
gradientEndColor: s
|
|
718
718
|
});
|
|
719
719
|
},
|
|
720
|
-
props:
|
|
720
|
+
props: Oe
|
|
721
721
|
});
|
|
722
|
-
const
|
|
722
|
+
const Qe = { class: "t-caption" }, Ve = { class: "t-caption" }, Ke = { class: "my-6 justify-items-center" }, He = /* @__PURE__ */ z({
|
|
723
723
|
__name: "TerminalBindCodeDialog",
|
|
724
724
|
props: {
|
|
725
725
|
code: {
|
|
@@ -728,314 +728,332 @@ const Ue = { class: "t-caption" }, Qe = { class: "t-caption" }, Ve = { class: "m
|
|
|
728
728
|
}
|
|
729
729
|
},
|
|
730
730
|
setup(o) {
|
|
731
|
-
const f = o,
|
|
731
|
+
const f = o, u = j(), l = Te();
|
|
732
732
|
function v() {
|
|
733
733
|
try {
|
|
734
|
-
|
|
734
|
+
ue(f.code), u.open({ title: "Text copied to clipboard." }, 1e3);
|
|
735
735
|
} catch {
|
|
736
|
-
|
|
736
|
+
u.open({ title: "Clipboard API incompatible." }, 1e3);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
const
|
|
740
|
-
return (e, t) => (I(),
|
|
741
|
-
|
|
742
|
-
t[1] || (t[1] =
|
|
743
|
-
|
|
739
|
+
const d = l.namespace.value === "dev" ? "development" : "production", r = U(() => `${d},${(l.currentCountry.value ?? Se.F_COUNTRY.enum.MY).toLowerCase()},${f.code}`);
|
|
740
|
+
return (e, t) => (I(), J(le, null, [
|
|
741
|
+
b("div", Qe, [
|
|
742
|
+
t[1] || (t[1] = re(" Enter the binding code below on your device to link it with this terminal and apply the configuration. ", -1)),
|
|
743
|
+
b("div", {
|
|
744
744
|
class: "my-6 text-center fm-typo-en-title-md-800 tracking-[0.3rem] cursor-pointer hover:text-fm-color-neutral-gray-300",
|
|
745
745
|
onClick: t[0] || (t[0] = (a) => {
|
|
746
746
|
a.stopPropagation(), v();
|
|
747
747
|
})
|
|
748
748
|
}, se(o.code), 1)
|
|
749
749
|
]),
|
|
750
|
-
t[3] || (t[3] =
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
750
|
+
t[3] || (t[3] = b("div", { class: "flex items-center my-4" }, [
|
|
751
|
+
b("div", { class: "flex-grow border-t border-gray-300" }),
|
|
752
|
+
b("span", { class: "px-4 text-gray-500 text-sm font-medium" }, "OR"),
|
|
753
|
+
b("div", { class: "flex-grow border-t border-gray-300" })
|
|
754
754
|
], -1)),
|
|
755
|
-
|
|
756
|
-
t[2] || (t[2] =
|
|
757
|
-
|
|
758
|
-
|
|
755
|
+
b("div", Ve, [
|
|
756
|
+
t[2] || (t[2] = re(" Scan the binding code below on your device to link it with this terminal and apply the configuration. ", -1)),
|
|
757
|
+
b("div", Ke, [
|
|
758
|
+
P(xe, { value: r.value }, null, 8, ["value"])
|
|
759
759
|
])
|
|
760
760
|
])
|
|
761
761
|
], 64));
|
|
762
762
|
}
|
|
763
|
-
}),
|
|
763
|
+
}), $e = /* @__PURE__ */ z({
|
|
764
764
|
__name: "ID",
|
|
765
765
|
props: {
|
|
766
766
|
row: {},
|
|
767
767
|
data: {}
|
|
768
768
|
},
|
|
769
769
|
setup(o) {
|
|
770
|
-
const f = o,
|
|
771
|
-
function
|
|
770
|
+
const f = o, u = j();
|
|
771
|
+
function l() {
|
|
772
772
|
return f.row.original.status === "Active" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
|
|
773
773
|
}
|
|
774
774
|
function v() {
|
|
775
775
|
try {
|
|
776
|
-
|
|
776
|
+
ue(f.data), u.open({ title: "Text copied to clipboard." }, 1e3);
|
|
777
777
|
} catch {
|
|
778
|
-
|
|
778
|
+
u.open({ title: "Clipboard API incompatible." }, 1e3);
|
|
779
779
|
}
|
|
780
780
|
f.data;
|
|
781
781
|
}
|
|
782
|
-
return (
|
|
783
|
-
const e =
|
|
784
|
-
return I(),
|
|
782
|
+
return (d, r) => {
|
|
783
|
+
const e = N("FmBadge");
|
|
784
|
+
return I(), J("div", {
|
|
785
785
|
onClick: r[0] || (r[0] = (t) => {
|
|
786
786
|
t.stopPropagation(), v();
|
|
787
787
|
})
|
|
788
788
|
}, [
|
|
789
|
-
|
|
789
|
+
P(e, {
|
|
790
790
|
inline: "",
|
|
791
|
-
class:
|
|
791
|
+
class: we(l())
|
|
792
792
|
}, {
|
|
793
|
-
default:
|
|
794
|
-
|
|
793
|
+
default: q(() => [
|
|
794
|
+
b("div", null, se(o.data), 1)
|
|
795
795
|
]),
|
|
796
796
|
_: 1
|
|
797
797
|
}, 8, ["class"])
|
|
798
798
|
]);
|
|
799
799
|
};
|
|
800
800
|
}
|
|
801
|
-
}),
|
|
801
|
+
}), Ge = { class: "flex" }, Ye = /* @__PURE__ */ z({
|
|
802
802
|
__name: "Actions",
|
|
803
803
|
props: {
|
|
804
804
|
data: {}
|
|
805
805
|
},
|
|
806
806
|
emits: ["link", "unlink", "edit", "delete"],
|
|
807
807
|
setup(o, { emit: f }) {
|
|
808
|
-
const
|
|
808
|
+
const u = o, l = f;
|
|
809
809
|
function v() {
|
|
810
|
-
const
|
|
810
|
+
const d = Ie([
|
|
811
811
|
{
|
|
812
812
|
type: "span",
|
|
813
813
|
queryKey: "terminal.id",
|
|
814
|
-
queryValue:
|
|
814
|
+
queryValue: u.data._id
|
|
815
815
|
}
|
|
816
816
|
]);
|
|
817
|
-
window.open(
|
|
817
|
+
window.open(d, "_blank");
|
|
818
818
|
}
|
|
819
|
-
return (
|
|
820
|
-
const e =
|
|
821
|
-
return I(),
|
|
822
|
-
|
|
819
|
+
return (d, r) => {
|
|
820
|
+
const e = N("FmButton");
|
|
821
|
+
return I(), J("div", Ge, [
|
|
822
|
+
P(e, {
|
|
823
823
|
variant: "plain",
|
|
824
824
|
"prepend-icon": "history",
|
|
825
825
|
onClick: r[0] || (r[0] = (t) => {
|
|
826
826
|
t.stopPropagation(), v();
|
|
827
827
|
})
|
|
828
828
|
}),
|
|
829
|
-
o.data.deviceType === "TERMINAL" && !o.data.deviceId ? (I(),
|
|
829
|
+
o.data.deviceType === "TERMINAL" && !o.data.deviceId ? (I(), x(e, {
|
|
830
830
|
key: 0,
|
|
831
831
|
variant: "plain",
|
|
832
832
|
"prepend-icon": "link",
|
|
833
833
|
onClick: r[1] || (r[1] = (t) => {
|
|
834
|
-
t.stopPropagation(),
|
|
834
|
+
t.stopPropagation(), l("link");
|
|
835
835
|
})
|
|
836
836
|
})) : $("", !0),
|
|
837
|
-
o.data.deviceType === "TERMINAL" && o.data.deviceId ? (I(),
|
|
837
|
+
o.data.deviceType === "TERMINAL" && o.data.deviceId ? (I(), x(e, {
|
|
838
838
|
key: 1,
|
|
839
839
|
variant: "plain",
|
|
840
840
|
"prepend-icon": "link_off",
|
|
841
841
|
onClick: r[2] || (r[2] = (t) => {
|
|
842
|
-
t.stopPropagation(),
|
|
842
|
+
t.stopPropagation(), l("unlink");
|
|
843
843
|
})
|
|
844
844
|
})) : $("", !0),
|
|
845
|
-
|
|
845
|
+
P(e, {
|
|
846
846
|
variant: "plain",
|
|
847
847
|
"prepend-icon": "edit",
|
|
848
848
|
onClick: r[3] || (r[3] = (t) => {
|
|
849
|
-
t.stopPropagation(),
|
|
849
|
+
t.stopPropagation(), l("edit");
|
|
850
850
|
})
|
|
851
851
|
}),
|
|
852
|
-
|
|
852
|
+
P(e, {
|
|
853
853
|
variant: "plain",
|
|
854
854
|
"prepend-icon": "delete",
|
|
855
855
|
onClick: r[4] || (r[4] = (t) => {
|
|
856
|
-
t.stopPropagation(),
|
|
856
|
+
t.stopPropagation(), l("delete");
|
|
857
857
|
})
|
|
858
858
|
})
|
|
859
859
|
]);
|
|
860
860
|
};
|
|
861
861
|
}
|
|
862
|
-
}),
|
|
863
|
-
__name: "
|
|
864
|
-
props: {
|
|
862
|
+
}), qe = /* @__PURE__ */ z({
|
|
863
|
+
__name: "TerminalSideSheet",
|
|
864
|
+
props: /* @__PURE__ */ ae({
|
|
865
865
|
terminal: {
|
|
866
866
|
type: Object
|
|
867
867
|
}
|
|
868
|
-
},
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
868
|
+
}, {
|
|
869
|
+
modelValue: { type: Boolean, default: !1 },
|
|
870
|
+
modelModifiers: {}
|
|
871
|
+
}),
|
|
872
|
+
emits: /* @__PURE__ */ ae(["submit"], ["update:modelValue"]),
|
|
873
|
+
setup(o, { emit: f }) {
|
|
874
|
+
const u = o, l = f, v = ye(o, "modelValue"), d = _(), r = _(""), e = _(""), t = _(!1);
|
|
875
|
+
Z(v, (n) => {
|
|
876
|
+
var i, s, g;
|
|
877
|
+
n && (r.value = ((i = u.terminal) == null ? void 0 : i.name) ?? "", e.value = ((s = u.terminal) == null ? void 0 : s.referenceId) ?? "", t.value = ((g = u.terminal) == null ? void 0 : g.status) === "Active");
|
|
878
|
+
});
|
|
879
|
+
function a() {
|
|
880
|
+
l("submit", {
|
|
881
|
+
name: r.value,
|
|
882
|
+
referenceId: e.value,
|
|
883
|
+
status: t.value ? "Active" : "Inactive"
|
|
884
|
+
}), v.value = !1;
|
|
885
|
+
}
|
|
872
886
|
return (n, i) => {
|
|
873
|
-
const
|
|
874
|
-
return I(),
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
})
|
|
887
|
+
const s = N("FmTextField"), g = N("FmSwitch"), C = N("FmButton"), w = N("FmForm"), E = N("FmSideSheet");
|
|
888
|
+
return I(), x(E, {
|
|
889
|
+
modelValue: v.value,
|
|
890
|
+
"onUpdate:modelValue": i[3] || (i[3] = (p) => v.value = p),
|
|
891
|
+
header: u.terminal ? "Update Terminal" : "Create New Terminal",
|
|
892
|
+
"close-button": ""
|
|
880
893
|
}, {
|
|
881
|
-
default:
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
894
|
+
default: q(() => [
|
|
895
|
+
P(w, {
|
|
896
|
+
ref: d.value,
|
|
897
|
+
class: "flex flex-col gap-16 px-4 py-6",
|
|
898
|
+
onValidationSuccess: a
|
|
899
|
+
}, {
|
|
900
|
+
default: q(() => [
|
|
901
|
+
u.terminal ? $("", !0) : (I(), x(Ne, {
|
|
902
|
+
key: 0,
|
|
903
|
+
modelValue: e.value,
|
|
904
|
+
"onUpdate:modelValue": i[0] || (i[0] = (p) => e.value = p),
|
|
905
|
+
label: "Restaurant",
|
|
906
|
+
"label-mark": "required",
|
|
907
|
+
placeholder: "Select restaurant",
|
|
908
|
+
"search-placeholder": "Search restaurants",
|
|
909
|
+
rules: L(ne)(L(oe).string().min(1, "Restaurant is required"))
|
|
910
|
+
}, null, 8, ["modelValue", "rules"])),
|
|
911
|
+
P(s, {
|
|
912
|
+
modelValue: r.value,
|
|
913
|
+
"onUpdate:modelValue": i[1] || (i[1] = (p) => r.value = p),
|
|
914
|
+
label: "Terminal Name",
|
|
915
|
+
rules: L(ne)(L(oe).string().min(1))
|
|
916
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
917
|
+
u.terminal ? (I(), x(g, {
|
|
918
|
+
key: 1,
|
|
919
|
+
modelValue: t.value,
|
|
920
|
+
"onUpdate:modelValue": i[2] || (i[2] = (p) => t.value = p),
|
|
921
|
+
label: "Status"
|
|
922
|
+
}, null, 8, ["modelValue"])) : $("", !0),
|
|
923
|
+
P(C, {
|
|
924
|
+
type: "submit",
|
|
925
|
+
label: u.terminal ? "Update" : "Create"
|
|
926
|
+
}, null, 8, ["label"])
|
|
927
|
+
]),
|
|
928
|
+
_: 1
|
|
929
|
+
}, 512)
|
|
908
930
|
]),
|
|
909
931
|
_: 1
|
|
910
|
-
},
|
|
932
|
+
}, 8, ["modelValue", "header"]);
|
|
911
933
|
};
|
|
912
934
|
}
|
|
913
|
-
}),
|
|
935
|
+
}), We = { class: "flex justify-between mb-6 items-center" }, Xe = { class: "flex space-x-4" }, Ze = { class: "flex space-x-4" }, ht = /* @__PURE__ */ z({
|
|
914
936
|
__name: "Terminal",
|
|
915
937
|
props: {
|
|
916
938
|
type: {}
|
|
917
939
|
},
|
|
918
940
|
setup(o) {
|
|
919
|
-
const f = o,
|
|
941
|
+
const f = o, u = _(), { searchKey: l, deviceType: v } = Re({
|
|
920
942
|
searchKey: "",
|
|
921
943
|
deviceType: void 0
|
|
922
944
|
});
|
|
923
|
-
|
|
924
|
-
var
|
|
925
|
-
return (
|
|
945
|
+
Z(v, () => {
|
|
946
|
+
var h;
|
|
947
|
+
return (h = u.value) == null ? void 0 : h.reset();
|
|
926
948
|
});
|
|
927
|
-
let
|
|
928
|
-
|
|
929
|
-
|
|
949
|
+
let d;
|
|
950
|
+
Z(l, async () => {
|
|
951
|
+
d && clearTimeout(d), d = setTimeout(
|
|
930
952
|
() => {
|
|
931
|
-
var
|
|
932
|
-
return (
|
|
953
|
+
var h;
|
|
954
|
+
return (h = u.value) == null ? void 0 : h.reset();
|
|
933
955
|
},
|
|
934
956
|
700
|
|
935
957
|
);
|
|
936
958
|
});
|
|
937
|
-
const r =
|
|
938
|
-
async function a(
|
|
939
|
-
|
|
959
|
+
const r = _e(), e = Pe(), t = j();
|
|
960
|
+
async function a(h) {
|
|
961
|
+
ie(
|
|
940
962
|
e,
|
|
941
963
|
"Terminal Unbind",
|
|
942
964
|
"Are you sure to unbind terminal from device? This action cannot be revert and device will be logged out!",
|
|
943
965
|
async () => {
|
|
944
|
-
var
|
|
966
|
+
var m;
|
|
945
967
|
try {
|
|
946
|
-
await K.unbind(
|
|
968
|
+
await K.unbind(h), (m = u.value) == null || m.reset(), t.open({
|
|
947
969
|
type: "success",
|
|
948
970
|
message: "Terminal unbind successfully"
|
|
949
971
|
});
|
|
950
|
-
} catch (
|
|
972
|
+
} catch (c) {
|
|
951
973
|
t.open({
|
|
952
974
|
type: "error",
|
|
953
975
|
title: "Error occurs when unbind terminal",
|
|
954
|
-
message:
|
|
976
|
+
message: X(c)
|
|
955
977
|
});
|
|
956
978
|
}
|
|
957
979
|
}
|
|
958
980
|
);
|
|
959
981
|
}
|
|
960
|
-
async function n(
|
|
961
|
-
const
|
|
982
|
+
async function n(h) {
|
|
983
|
+
const m = await K.getBindCode(h);
|
|
962
984
|
e.open({
|
|
963
985
|
title: "Terminal Binding",
|
|
964
986
|
closeButton: !0,
|
|
965
987
|
overlay: !0,
|
|
966
|
-
contentComponent:
|
|
967
|
-
contentComponentProps: { code:
|
|
988
|
+
contentComponent: He,
|
|
989
|
+
contentComponentProps: { code: m }
|
|
968
990
|
});
|
|
969
991
|
}
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
closeButton: !0,
|
|
974
|
-
overlay: !0,
|
|
975
|
-
contentComponent: Ye,
|
|
976
|
-
contentComponentProps: { terminal: c }
|
|
977
|
-
}).onPrimary(async (h) => {
|
|
978
|
-
var p;
|
|
979
|
-
e.close();
|
|
980
|
-
try {
|
|
981
|
-
await (c ? K.updateById(c._id, { ...h, ecrs: c.ecrs ?? [], gateways: c.gateways ?? [] }) : K.create(h)), (p = d.value) == null || p.reset(), t.open({
|
|
982
|
-
type: "success",
|
|
983
|
-
message: c ? "Terminal udpated successfully" : "Terminal created successfully."
|
|
984
|
-
});
|
|
985
|
-
} catch (w) {
|
|
986
|
-
t.open({
|
|
987
|
-
type: "error",
|
|
988
|
-
title: "Error occurs when create terminal",
|
|
989
|
-
message: W(w)
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
});
|
|
992
|
+
const i = _(!1), s = _();
|
|
993
|
+
function g(h) {
|
|
994
|
+
s.value = h, i.value = !0;
|
|
993
995
|
}
|
|
994
|
-
async function
|
|
995
|
-
|
|
996
|
+
async function C(h) {
|
|
997
|
+
var c;
|
|
998
|
+
const m = s.value;
|
|
999
|
+
try {
|
|
1000
|
+
await (m ? K.updateById(m._id, { ...h, ecrs: m.ecrs ?? [], gateways: m.gateways ?? [] }) : K.create(h)), (c = u.value) == null || c.reset(), t.open({
|
|
1001
|
+
type: "success",
|
|
1002
|
+
message: m ? "Terminal udpated successfully" : "Terminal created successfully."
|
|
1003
|
+
});
|
|
1004
|
+
} catch (S) {
|
|
1005
|
+
t.open({
|
|
1006
|
+
type: "error",
|
|
1007
|
+
title: "Error occurs when create terminal",
|
|
1008
|
+
message: X(S)
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
async function w(h) {
|
|
1013
|
+
ie(
|
|
996
1014
|
e,
|
|
997
1015
|
"Delete Terminal",
|
|
998
1016
|
"Are you sure to delete terminal? This action cannot be revert and device will be logged out!",
|
|
999
1017
|
async () => {
|
|
1000
|
-
var
|
|
1018
|
+
var m;
|
|
1001
1019
|
try {
|
|
1002
|
-
await K.delete(
|
|
1020
|
+
await K.delete(h), (m = u.value) == null || m.reset(), t.open({
|
|
1003
1021
|
type: "success",
|
|
1004
1022
|
message: "Terminal delete successfully"
|
|
1005
1023
|
});
|
|
1006
|
-
} catch (
|
|
1024
|
+
} catch (c) {
|
|
1007
1025
|
t.open({
|
|
1008
1026
|
type: "error",
|
|
1009
1027
|
title: "Error occurs when delete terminal",
|
|
1010
|
-
message:
|
|
1028
|
+
message: X(c)
|
|
1011
1029
|
});
|
|
1012
1030
|
}
|
|
1013
1031
|
}
|
|
1014
1032
|
);
|
|
1015
1033
|
}
|
|
1016
|
-
const
|
|
1017
|
-
var
|
|
1018
|
-
let
|
|
1019
|
-
return
|
|
1020
|
-
id:
|
|
1021
|
-
status:
|
|
1022
|
-
referenceId:
|
|
1023
|
-
name:
|
|
1024
|
-
deviceId:
|
|
1025
|
-
deviceType:
|
|
1026
|
-
updatedAt:
|
|
1027
|
-
posVersion:
|
|
1028
|
-
gateways:
|
|
1029
|
-
ecrs:
|
|
1034
|
+
const E = function(h) {
|
|
1035
|
+
var c, S;
|
|
1036
|
+
let m = h.name;
|
|
1037
|
+
return h.deviceType === "POS" && ((c = h.name) != null && c.includes("@")) && (m = h.restaurant.profile.name), h.deviceType === "KIOSK" && ((S = h.name) != null && S.includes("-")) && (m = h.restaurant.profile.name), {
|
|
1038
|
+
id: h._id,
|
|
1039
|
+
status: h.status,
|
|
1040
|
+
referenceId: h.referenceId,
|
|
1041
|
+
name: m,
|
|
1042
|
+
deviceId: h.deviceId,
|
|
1043
|
+
deviceType: h.deviceType,
|
|
1044
|
+
updatedAt: Me(h.updatedAt).format("YYYY-MM-DD HH:mm:ss"),
|
|
1045
|
+
posVersion: h.restaurant.posVersion,
|
|
1046
|
+
gateways: h.gateways,
|
|
1047
|
+
ecrs: h.ecrs
|
|
1030
1048
|
};
|
|
1031
|
-
},
|
|
1049
|
+
}, p = [
|
|
1032
1050
|
{
|
|
1033
1051
|
accessorKey: "id",
|
|
1034
1052
|
header: () => "Terminal ID",
|
|
1035
1053
|
meta: {
|
|
1036
1054
|
textAlign: "right"
|
|
1037
1055
|
},
|
|
1038
|
-
cell: ({ cell:
|
|
1056
|
+
cell: ({ cell: h, row: m }) => M($e, { row: m, data: h.getValue() })
|
|
1039
1057
|
},
|
|
1040
1058
|
{
|
|
1041
1059
|
accessorKey: "name",
|
|
@@ -1071,58 +1089,64 @@ const Ue = { class: "t-caption" }, Qe = { class: "t-caption" }, Ve = { class: "m
|
|
|
1071
1089
|
meta: {
|
|
1072
1090
|
textAlign: "center"
|
|
1073
1091
|
},
|
|
1074
|
-
cell: ({ row:
|
|
1075
|
-
var
|
|
1076
|
-
const
|
|
1077
|
-
return
|
|
1078
|
-
data:
|
|
1079
|
-
onLink: () => n(
|
|
1080
|
-
onUnlink: () => a(
|
|
1081
|
-
onEdit: () =>
|
|
1082
|
-
onDelete: () =>
|
|
1092
|
+
cell: ({ row: h }) => {
|
|
1093
|
+
var c;
|
|
1094
|
+
const m = (c = u.value) == null ? void 0 : c.pageData().at(h.index);
|
|
1095
|
+
return M(Ye, {
|
|
1096
|
+
data: m,
|
|
1097
|
+
onLink: () => n(m._id),
|
|
1098
|
+
onUnlink: () => a(m._id),
|
|
1099
|
+
onEdit: () => g(m),
|
|
1100
|
+
onDelete: () => w(m._id)
|
|
1083
1101
|
});
|
|
1084
1102
|
}
|
|
1085
1103
|
}
|
|
1086
1104
|
];
|
|
1087
|
-
return (
|
|
1088
|
-
const
|
|
1089
|
-
return I(),
|
|
1105
|
+
return (h, m) => {
|
|
1106
|
+
const c = N("FmSearch"), S = N("FmButton");
|
|
1107
|
+
return I(), x(Ae, {
|
|
1090
1108
|
title: f.type,
|
|
1091
1109
|
loading: !1
|
|
1092
1110
|
}, {
|
|
1093
|
-
default:
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
"model-value":
|
|
1098
|
-
"onUpdate:modelValue":
|
|
1111
|
+
default: q(() => [
|
|
1112
|
+
b("div", We, [
|
|
1113
|
+
b("div", Xe, [
|
|
1114
|
+
P(c, {
|
|
1115
|
+
"model-value": L(l),
|
|
1116
|
+
"onUpdate:modelValue": m[0] || (m[0] = (y) => Ee(l) ? l.value = y : null),
|
|
1099
1117
|
class: "mr-8",
|
|
1100
1118
|
label: "Search",
|
|
1101
1119
|
placeholder: "Search ..."
|
|
1102
1120
|
}, null, 8, ["model-value"])
|
|
1103
1121
|
]),
|
|
1104
|
-
|
|
1105
|
-
f.type === "TERMINAL" ? (I(),
|
|
1122
|
+
b("div", Ze, [
|
|
1123
|
+
f.type === "TERMINAL" ? (I(), x(S, {
|
|
1106
1124
|
key: 0,
|
|
1107
1125
|
label: "Create",
|
|
1108
1126
|
icon: "add",
|
|
1109
|
-
onClick:
|
|
1127
|
+
onClick: m[1] || (m[1] = () => g())
|
|
1110
1128
|
})) : $("", !0)
|
|
1111
1129
|
])
|
|
1112
1130
|
]),
|
|
1113
|
-
|
|
1131
|
+
P(be, {
|
|
1114
1132
|
ref_key: "controller",
|
|
1115
|
-
ref:
|
|
1116
|
-
"column-defs":
|
|
1117
|
-
"rows-defs":
|
|
1118
|
-
paginate: (y,
|
|
1119
|
-
onRowClick:
|
|
1133
|
+
ref: u,
|
|
1134
|
+
"column-defs": p,
|
|
1135
|
+
"rows-defs": E,
|
|
1136
|
+
paginate: (y, R) => L(K).read({ searchKey: L(l), deviceType: f.type, limit: y, cursor: R }),
|
|
1137
|
+
onRowClick: m[2] || (m[2] = (y) => L(r).push({
|
|
1120
1138
|
name: `mf-payment-admin.${f.type.toLowerCase()}-setting`,
|
|
1121
1139
|
params: {
|
|
1122
1140
|
terminalId: y._id
|
|
1123
1141
|
}
|
|
1124
1142
|
}))
|
|
1125
|
-
}, null, 8, ["paginate"])
|
|
1143
|
+
}, null, 8, ["paginate"]),
|
|
1144
|
+
P(qe, {
|
|
1145
|
+
modelValue: i.value,
|
|
1146
|
+
"onUpdate:modelValue": m[3] || (m[3] = (y) => i.value = y),
|
|
1147
|
+
terminal: s.value,
|
|
1148
|
+
onSubmit: C
|
|
1149
|
+
}, null, 8, ["modelValue", "terminal"])
|
|
1126
1150
|
]),
|
|
1127
1151
|
_: 1
|
|
1128
1152
|
}, 8, ["title"]);
|
|
@@ -1130,5 +1154,5 @@ const Ue = { class: "t-caption" }, Qe = { class: "t-caption" }, Ve = { class: "m
|
|
|
1130
1154
|
}
|
|
1131
1155
|
});
|
|
1132
1156
|
export {
|
|
1133
|
-
|
|
1157
|
+
ht as default
|
|
1134
1158
|
};
|