@feedmepos/mf-payment 1.0.28-beta.2 → 1.1.0-beta.1

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.
Files changed (80) hide show
  1. package/dist/{PDFViewer-xrBtzrlR.js → PDFViewer-BQfgFexr.js} +2 -1
  2. package/dist/{PayoutAccount-CBh520Qd.js → PayoutAccount-BHJpjUqD.js} +5 -5
  3. package/dist/{PayoutAccount-BnHoTtMi.js → PayoutAccount-DCkf_1yL.js} +5 -4
  4. package/dist/PayoutAccountSetting-Bk-g7ucZ.js +723 -0
  5. package/dist/{Restaurant-Hg88M5VI.js → Restaurant-D2qq84VL.js} +56 -54
  6. package/dist/{RestaurantSetting-B-wc4YDK.js → RestaurantSetting-DAtrtX6S.js} +3 -3
  7. package/dist/{Settlement-BGS6kLTS.js → Settlement-BVIsszEJ.js} +37 -34
  8. package/dist/{Settlement-Ce2W2XDS.js → Settlement-Cx1tc5wt.js} +9 -8
  9. package/dist/{SettlementTransactions-DACSkgFS.js → SettlementTransactions-C82DyYlO.js} +14 -14
  10. package/dist/{SettlementTransactions-CFS-4VBi.js → SettlementTransactions-CeN4SRWa.js} +39 -39
  11. package/dist/{Terminal-yfS0o6id.js → Terminal-Az2k8E6F.js} +323 -342
  12. package/dist/{TerminalSetting-NvYoH1FN.js → TerminalSetting-C-xlLYXa.js} +27 -27
  13. package/dist/Transaction-CC8hc8_r.js +250 -0
  14. package/dist/{Transaction-DOkGYxU_.js → Transaction-Y_mc0yQv.js} +123 -105
  15. package/dist/{TransactionOld-zxpmzUzh.js → TransactionOld-BxhI-wwm.js} +7 -7
  16. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-dwwesT4_.js +304 -0
  17. package/dist/api/payout/index.d.ts +5 -1
  18. package/dist/api/terminal/index.d.ts +6 -10
  19. package/dist/api/transaction/index.d.ts +12 -11
  20. package/dist/{app-U2zosiYM.js → app-OBp4HaEY.js} +873 -811
  21. package/dist/app.js +1 -1
  22. package/dist/{assets-C5ikBqta.js → assets-pLBp82yE.js} +208 -58
  23. package/dist/components/SourceSelector.vue.d.ts +12 -0
  24. package/dist/{grafana-Bf91brqK.js → grafana-hv7inD36.js} +1 -1
  25. package/dist/{index-GteStxtj.js → index-1xF00w89.js} +1 -1
  26. package/dist/{index-BBoi9wDz.js → index-CFYD8Dv4.js} +1 -1
  27. package/dist/index-Cqq3p9PP.js +66 -0
  28. package/dist/{index-B5xc12hq.js → index-DD5mEX0D.js} +1 -1
  29. package/dist/{index-D8J1GO2q.js → index-DGKxdJVj.js} +8164 -8082
  30. package/dist/index-oM4Z9ffu.js +45 -0
  31. package/dist/{index.vue_vue_type_script_setup_true_lang-DZwLItyk.js → index.vue_vue_type_script_setup_true_lang-C9tnqgzY.js} +8 -7
  32. package/dist/model/payout-account.d.ts +1 -1
  33. package/dist/model/transaction.d.ts +13 -5
  34. package/dist/package.json +2 -2
  35. package/dist/{payout-account-BKcgcf9C.js → payout-account-DPaS3dIs.js} +2 -2
  36. package/dist/router/index.d.ts +1 -0
  37. package/dist/stores/payoutAccount.d.ts +4 -4
  38. package/dist/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
  40. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +133 -0
  41. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +133 -0
  42. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
  43. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
  44. package/dist/views/admin/payout-account/tabs/cell/Actions.vue.d.ts +8 -0
  45. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +10 -23
  46. package/dist/views/admin/{terminal-transaction/TerminalTransaction.vue.d.ts → payout-account/tabs/gateway/MacauPassGateway.vue.d.ts} +1 -1
  47. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
  48. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
  49. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
  50. package/dist/views/admin/terminal/Terminal.vue.d.ts +4 -1
  51. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +2 -2
  52. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +2 -2
  53. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +2 -2
  54. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +2 -2
  55. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +2 -2
  56. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +2 -0
  57. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
  58. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +16 -16
  59. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +8 -8
  60. package/dist/views/{admin/terminal-transaction → transaction}/cell/Actions.vue.d.ts +3 -3
  61. package/package.json +2 -2
  62. package/dist/PayoutAccountSetting-xC8_JQLN.js +0 -426
  63. package/dist/TerminalTransaction-BulIYAWj.js +0 -333
  64. package/dist/TerminalTransaction-HMmRqtr1.js +0 -589
  65. package/dist/Transaction-B1u_AbEJ.js +0 -247
  66. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-DEPASHaN.js +0 -159
  67. package/dist/components/PayoutAccountSelector.vue.d.ts +0 -23
  68. package/dist/index-6CRJVoBq.js +0 -52
  69. package/dist/index-Cti5gi62.js +0 -77
  70. package/dist/index-l27QvtNB.js +0 -40
  71. package/dist/transaction-CxXve4F4.js +0 -136
  72. package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +0 -50
  73. package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +0 -52
  74. package/dist/views/admin/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
  75. package/dist/views/admin/terminal-transaction/cell/Method.vue.d.ts +0 -7
  76. package/dist/views/admin/terminal-transaction/cell/Status.vue.d.ts +0 -7
  77. package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +0 -2
  78. package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
  79. package/dist/views/terminal-transaction/cell/Method.vue.d.ts +0 -7
  80. package/dist/views/terminal-transaction/cell/Status.vue.d.ts +0 -7
@@ -1,17 +1,17 @@
1
- import { defineComponent as D, ref as k, onUpdated as ie, h as M, onMounted as me, Fragment as se, openBlock as N, createElementBlock as G, createElementVNode as A, createTextVNode as ee, toDisplayString as le, createVNode as _, resolveComponent as P, normalizeClass as pe, withCtx as q, createBlock as O, createCommentVNode as K, computed as ge, unref as S, watch as te, isRef as re } from "vue";
2
- import { e as Ce } from "./index-D8J1GO2q.js";
1
+ import { defineComponent as z, ref as I, onUpdated as oe, h as M, onMounted as he, Fragment as ie, openBlock as N, createElementBlock as G, createElementVNode as A, createTextVNode as ee, toDisplayString as se, createVNode as k, resolveComponent as _, normalizeClass as me, withCtx as q, createBlock as D, createCommentVNode as V, computed as pe, unref as P, watch as te, isRef as ge } from "vue";
2
+ import { e as Ce } from "./index-DGKxdJVj.js";
3
3
  import { h as ye } from "./moment-h96o7c8I.js";
4
- import { u as we } from "./index-GteStxtj.js";
5
- import { _ as Ee } from "./index.vue_vue_type_script_setup_true_lang-DZwLItyk.js";
4
+ import { u as we } from "./index-1xF00w89.js";
5
+ import { _ as Ee } from "./index.vue_vue_type_script_setup_true_lang-C9tnqgzY.js";
6
6
  import { _ as Me } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
7
7
  import { useSnackbar as W, useDialogChild as Re, useDialog as Ae } from "@feedmepos/ui-library";
8
- import { t as x } from "./index-6CRJVoBq.js";
9
- import { c as ue } from "./clipboard-4jh1WteU.js";
10
- import { useCoreStore as de } from "@feedmepos/mf-common";
11
- import { g as Se } from "./grafana-Bf91brqK.js";
8
+ import { t as Q } from "./index-oM4Z9ffu.js";
9
+ import { c as le } from "./clipboard-4jh1WteU.js";
10
+ import { useCoreStore as ue } from "@feedmepos/mf-common";
11
+ import { g as Se } from "./grafana-hv7inD36.js";
12
12
  import { u as Y } from "./error-K1CakhA9.js";
13
- import { z as ne, a as ae } from "./validator-D5jtpt9A.js";
14
- import { w as oe } from "./Modal-DB8M9o1T.js";
13
+ import { z as re, a as ne } from "./validator-D5jtpt9A.js";
14
+ import { w as ae } from "./Modal-DB8M9o1T.js";
15
15
  import { useRouter as be } from "vue-router";
16
16
  /*!
17
17
  * qrcode.vue v3.6.0
@@ -19,18 +19,18 @@ import { useRouter as be } from "vue-router";
19
19
  * © 2017-PRESENT @scopewu(https://github.com/scopewu)
20
20
  * MIT License.
21
21
  */
22
- var I = function() {
23
- return I = Object.assign || function(u) {
24
- for (var d, l = 1, h = arguments.length; l < h; l++) {
22
+ var T = function() {
23
+ return T = Object.assign || function(c) {
24
+ for (var d, l = 1, m = arguments.length; l < m; l++) {
25
25
  d = arguments[l];
26
- for (var c in d) Object.prototype.hasOwnProperty.call(d, c) && (u[c] = d[c]);
26
+ for (var f in d) Object.prototype.hasOwnProperty.call(d, f) && (c[f] = d[f]);
27
27
  }
28
- return u;
29
- }, I.apply(this, arguments);
28
+ return c;
29
+ }, T.apply(this, arguments);
30
30
  };
31
- var z;
31
+ var O;
32
32
  (function(o) {
33
- var u = (
33
+ var c = (
34
34
  /** @class */
35
35
  function() {
36
36
  function n(e, t, r, a) {
@@ -44,14 +44,14 @@ var z;
44
44
  for (var s = 0; s < this.size; s++)
45
45
  this.modules.push(i.slice()), this.isFunction.push(i.slice());
46
46
  this.drawFunctionPatterns();
47
- var m = this.addEccAndInterleave(r);
48
- if (this.drawCodewords(m), a == -1)
49
- for (var y = 1e9, s = 0; s < 8; s++) {
47
+ var h = this.addEccAndInterleave(r);
48
+ if (this.drawCodewords(h), a == -1)
49
+ for (var C = 1e9, s = 0; s < 8; s++) {
50
50
  this.applyMask(s), this.drawFormatBits(s);
51
- var f = this.getPenaltyScore();
52
- f < y && (a = s, y = f), this.applyMask(s);
51
+ var u = this.getPenaltyScore();
52
+ u < C && (a = s, C = u), this.applyMask(s);
53
53
  }
54
- h(0 <= a && a <= 7), this.mask = a, this.applyMask(a), this.drawFormatBits(a), this.isFunction = [];
54
+ m(0 <= a && a <= 7), this.mask = a, this.applyMask(a), this.drawFormatBits(a), this.isFunction = [];
55
55
  }
56
56
  return n.encodeText = function(e, t) {
57
57
  var r = o.QrSegment.makeSegments(e);
@@ -62,38 +62,38 @@ var z;
62
62
  }, n.encodeSegments = function(e, t, r, a, i, s) {
63
63
  if (r === void 0 && (r = 1), a === void 0 && (a = 40), i === void 0 && (i = -1), s === void 0 && (s = !0), !(n.MIN_VERSION <= r && r <= a && a <= n.MAX_VERSION) || i < -1 || i > 7)
64
64
  throw new RangeError("Invalid value");
65
- var m, y;
66
- for (m = r; ; m++) {
67
- var f = n.getNumDataCodewords(m, t) * 8, v = c.getTotalBits(e, m);
68
- if (v <= f) {
69
- y = v;
65
+ var h, C;
66
+ for (h = r; ; h++) {
67
+ var u = n.getNumDataCodewords(h, t) * 8, v = f.getTotalBits(e, h);
68
+ if (v <= u) {
69
+ C = v;
70
70
  break;
71
71
  }
72
- if (m >= a)
72
+ if (h >= a)
73
73
  throw new RangeError("Data too long");
74
74
  }
75
- for (var p = 0, E = [n.Ecc.MEDIUM, n.Ecc.QUARTILE, n.Ecc.HIGH]; p < E.length; p++) {
76
- var C = E[p];
77
- s && y <= n.getNumDataCodewords(m, C) * 8 && (t = C);
75
+ for (var p = 0, w = [n.Ecc.MEDIUM, n.Ecc.QUARTILE, n.Ecc.HIGH]; p < w.length; p++) {
76
+ var g = w[p];
77
+ s && C <= n.getNumDataCodewords(h, g) * 8 && (t = g);
78
78
  }
79
- for (var g = [], w = 0, b = e; w < b.length; w++) {
80
- var R = b[w];
81
- d(R.mode.modeBits, 4, g), d(R.numChars, R.mode.numCharCountBits(m), g);
82
- for (var F = 0, T = R.getData(); F < T.length; F++) {
83
- var V = T[F];
84
- g.push(V);
79
+ for (var y = [], E = 0, S = e; E < S.length; E++) {
80
+ var R = S[E];
81
+ d(R.mode.modeBits, 4, y), d(R.numChars, R.mode.numCharCountBits(h), y);
82
+ for (var B = 0, b = R.getData(); B < b.length; B++) {
83
+ var K = b[B];
84
+ y.push(K);
85
85
  }
86
86
  }
87
- h(g.length == y);
88
- var L = n.getNumDataCodewords(m, t) * 8;
89
- h(g.length <= L), d(0, Math.min(4, L - g.length), g), d(0, (8 - g.length % 8) % 8, g), h(g.length % 8 == 0);
90
- for (var B = 236; g.length < L; B ^= 253)
91
- d(B, 8, g);
92
- for (var U = []; U.length * 8 < g.length; )
87
+ m(y.length == C);
88
+ var L = n.getNumDataCodewords(h, t) * 8;
89
+ m(y.length <= L), d(0, Math.min(4, L - y.length), y), d(0, (8 - y.length % 8) % 8, y), m(y.length % 8 == 0);
90
+ for (var F = 236; y.length < L; F ^= 253)
91
+ d(F, 8, y);
92
+ for (var U = []; U.length * 8 < y.length; )
93
93
  U.push(0);
94
- return g.forEach(function($, H) {
94
+ return y.forEach(function($, H) {
95
95
  return U[H >>> 3] |= $ << 7 - (H & 7);
96
- }), new n(m, t, U, i);
96
+ }), new n(h, t, U, i);
97
97
  }, n.prototype.getModule = function(e, t) {
98
98
  return 0 <= e && e < this.size && 0 <= t && t < this.size && this.modules[t][e];
99
99
  }, n.prototype.getModules = function() {
@@ -110,7 +110,7 @@ var z;
110
110
  for (var t = this.errorCorrectionLevel.formatBits << 3 | e, r = t, a = 0; a < 10; a++)
111
111
  r = r << 1 ^ (r >>> 9) * 1335;
112
112
  var i = (t << 10 | r) ^ 21522;
113
- h(i >>> 15 == 0);
113
+ m(i >>> 15 == 0);
114
114
  for (var a = 0; a <= 5; a++)
115
115
  this.setFunctionModule(8, a, l(i, a));
116
116
  this.setFunctionModule(8, 7, l(i, 6)), this.setFunctionModule(8, 8, l(i, 7)), this.setFunctionModule(7, 8, l(i, 8));
@@ -126,7 +126,7 @@ var z;
126
126
  for (var e = this.version, t = 0; t < 12; t++)
127
127
  e = e << 1 ^ (e >>> 11) * 7973;
128
128
  var r = this.version << 12 | e;
129
- h(r >>> 18 == 0);
129
+ m(r >>> 18 == 0);
130
130
  for (var t = 0; t < 18; t++) {
131
131
  var a = l(r, t), i = this.size - 11 + t % 3, s = Math.floor(t / 3);
132
132
  this.setFunctionModule(i, s, a), this.setFunctionModule(s, i, a);
@@ -135,8 +135,8 @@ var z;
135
135
  }, n.prototype.drawFinderPattern = function(e, t) {
136
136
  for (var r = -4; r <= 4; r++)
137
137
  for (var a = -4; a <= 4; a++) {
138
- var i = Math.max(Math.abs(a), Math.abs(r)), s = e + a, m = t + r;
139
- 0 <= s && s < this.size && 0 <= m && m < this.size && this.setFunctionModule(s, m, i != 2 && i != 4);
138
+ var i = Math.max(Math.abs(a), Math.abs(r)), s = e + a, h = t + r;
139
+ 0 <= s && s < this.size && 0 <= h && h < this.size && this.setFunctionModule(s, h, i != 2 && i != 4);
140
140
  }
141
141
  }, n.prototype.drawAlignmentPattern = function(e, t) {
142
142
  for (var r = -2; r <= 2; r++)
@@ -148,19 +148,19 @@ var z;
148
148
  var t = this.version, r = this.errorCorrectionLevel;
149
149
  if (e.length != n.getNumDataCodewords(t, r))
150
150
  throw new RangeError("Invalid argument");
151
- for (var a = n.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t], i = n.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t], s = Math.floor(n.getNumRawDataModules(t) / 8), m = a - s % a, y = Math.floor(s / a), f = [], v = n.reedSolomonComputeDivisor(i), p = 0, E = 0; p < a; p++) {
152
- var C = e.slice(E, E + y - i + (p < m ? 0 : 1));
153
- E += C.length;
154
- var g = n.reedSolomonComputeRemainder(C, v);
155
- p < m && C.push(0), f.push(C.concat(g));
151
+ for (var a = n.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t], i = n.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t], s = Math.floor(n.getNumRawDataModules(t) / 8), h = a - s % a, C = Math.floor(s / a), u = [], v = n.reedSolomonComputeDivisor(i), p = 0, w = 0; p < a; p++) {
152
+ var g = e.slice(w, w + C - i + (p < h ? 0 : 1));
153
+ w += g.length;
154
+ var y = n.reedSolomonComputeRemainder(g, v);
155
+ p < h && g.push(0), u.push(g.concat(y));
156
156
  }
157
- for (var w = [], b = function(R) {
158
- f.forEach(function(F, T) {
159
- (R != y - i || T >= m) && w.push(F[R]);
157
+ for (var E = [], S = function(R) {
158
+ u.forEach(function(B, b) {
159
+ (R != C - i || b >= h) && E.push(B[R]);
160
160
  });
161
- }, p = 0; p < f[0].length; p++)
162
- b(p);
163
- return h(w.length == s), w;
161
+ }, p = 0; p < u[0].length; p++)
162
+ S(p);
163
+ return m(E.length == s), E;
164
164
  }, n.prototype.drawCodewords = function(e) {
165
165
  if (e.length != Math.floor(n.getNumRawDataModules(this.version) / 8))
166
166
  throw new RangeError("Invalid argument");
@@ -168,11 +168,11 @@ var z;
168
168
  r == 6 && (r = 5);
169
169
  for (var a = 0; a < this.size; a++)
170
170
  for (var i = 0; i < 2; i++) {
171
- var s = r - i, m = (r + 1 & 2) == 0, y = m ? this.size - 1 - a : a;
172
- !this.isFunction[y][s] && t < e.length * 8 && (this.modules[y][s] = l(e[t >>> 3], 7 - (t & 7)), t++);
171
+ var s = r - i, h = (r + 1 & 2) == 0, C = h ? this.size - 1 - a : a;
172
+ !this.isFunction[C][s] && t < e.length * 8 && (this.modules[C][s] = l(e[t >>> 3], 7 - (t & 7)), t++);
173
173
  }
174
174
  }
175
- h(t == e.length * 8);
175
+ m(t == e.length * 8);
176
176
  }, n.prototype.applyMask = function(e) {
177
177
  if (e < 0 || e > 7)
178
178
  throw new RangeError("Mask value out of range");
@@ -216,23 +216,23 @@ var z;
216
216
  e += this.finderPenaltyTerminateAndCount(r, a, i) * n.PENALTY_N3;
217
217
  }
218
218
  for (var s = 0; s < this.size; s++) {
219
- for (var r = !1, m = 0, i = [0, 0, 0, 0, 0, 0, 0], t = 0; t < this.size; t++)
220
- this.modules[t][s] == r ? (m++, m == 5 ? e += n.PENALTY_N1 : m > 5 && e++) : (this.finderPenaltyAddHistory(m, i), r || (e += this.finderPenaltyCountPatterns(i) * n.PENALTY_N3), r = this.modules[t][s], m = 1);
221
- e += this.finderPenaltyTerminateAndCount(r, m, i) * n.PENALTY_N3;
219
+ for (var r = !1, h = 0, i = [0, 0, 0, 0, 0, 0, 0], t = 0; t < this.size; t++)
220
+ this.modules[t][s] == r ? (h++, h == 5 ? e += n.PENALTY_N1 : h > 5 && e++) : (this.finderPenaltyAddHistory(h, i), r || (e += this.finderPenaltyCountPatterns(i) * n.PENALTY_N3), r = this.modules[t][s], h = 1);
221
+ e += this.finderPenaltyTerminateAndCount(r, h, i) * n.PENALTY_N3;
222
222
  }
223
223
  for (var t = 0; t < this.size - 1; t++)
224
224
  for (var s = 0; s < this.size - 1; s++) {
225
- var y = this.modules[t][s];
226
- y == this.modules[t][s + 1] && y == this.modules[t + 1][s] && y == this.modules[t + 1][s + 1] && (e += n.PENALTY_N2);
225
+ var C = this.modules[t][s];
226
+ C == this.modules[t][s + 1] && C == this.modules[t + 1][s] && C == this.modules[t + 1][s + 1] && (e += n.PENALTY_N2);
227
227
  }
228
- for (var f = 0, v = 0, p = this.modules; v < p.length; v++) {
229
- var E = p[v];
230
- f = E.reduce(function(w, b) {
231
- return w + (b ? 1 : 0);
232
- }, f);
228
+ for (var u = 0, v = 0, p = this.modules; v < p.length; v++) {
229
+ var w = p[v];
230
+ u = w.reduce(function(E, S) {
231
+ return E + (S ? 1 : 0);
232
+ }, u);
233
233
  }
234
- var C = this.size * this.size, g = Math.ceil(Math.abs(f * 20 - C * 10) / C) - 1;
235
- return h(0 <= g && g <= 9), e += g * n.PENALTY_N4, h(0 <= e && e <= 2568888), e;
234
+ var g = this.size * this.size, y = Math.ceil(Math.abs(u * 20 - g * 10) / g) - 1;
235
+ return m(0 <= y && y <= 9), e += y * n.PENALTY_N4, m(0 <= e && e <= 2568888), e;
236
236
  }, n.prototype.getAlignmentPatternPositions = function() {
237
237
  if (this.version == 1)
238
238
  return [];
@@ -247,7 +247,7 @@ var z;
247
247
  var r = Math.floor(e / 7) + 2;
248
248
  t -= (25 * r - 10) * r - 55, e >= 7 && (t -= 36);
249
249
  }
250
- return h(208 <= t && t <= 29648), t;
250
+ return m(208 <= t && t <= 29648), t;
251
251
  }, n.getNumDataCodewords = function(e, t) {
252
252
  return Math.floor(n.getNumRawDataModules(e) / 8) - n.ECC_CODEWORDS_PER_BLOCK[t.ordinal][e] * n.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][e];
253
253
  }, n.reedSolomonComputeDivisor = function(e) {
@@ -263,16 +263,16 @@ var z;
263
263
  }
264
264
  return t;
265
265
  }, n.reedSolomonComputeRemainder = function(e, t) {
266
- for (var r = t.map(function(y) {
266
+ for (var r = t.map(function(C) {
267
267
  return 0;
268
- }), a = function(y) {
269
- var f = y ^ r.shift();
268
+ }), a = function(C) {
269
+ var u = C ^ r.shift();
270
270
  r.push(0), t.forEach(function(v, p) {
271
- return r[p] ^= n.reedSolomonMultiply(v, f);
271
+ return r[p] ^= n.reedSolomonMultiply(v, u);
272
272
  });
273
273
  }, i = 0, s = e; i < s.length; i++) {
274
- var m = s[i];
275
- a(m);
274
+ var h = s[i];
275
+ a(h);
276
276
  }
277
277
  return r;
278
278
  }, n.reedSolomonMultiply = function(e, t) {
@@ -280,10 +280,10 @@ var z;
280
280
  throw new RangeError("Byte out of range");
281
281
  for (var r = 0, a = 7; a >= 0; a--)
282
282
  r = r << 1 ^ (r >>> 7) * 285, r ^= (t >>> a & 1) * e;
283
- return h(r >>> 8 == 0), r;
283
+ return m(r >>> 8 == 0), r;
284
284
  }, n.prototype.finderPenaltyCountPatterns = function(e) {
285
285
  var t = e[1];
286
- h(t <= this.size * 3);
286
+ m(t <= this.size * 3);
287
287
  var r = t > 0 && e[2] == t && e[3] == t * 3 && e[4] == t && e[5] == t;
288
288
  return (r && e[0] >= t * 4 && e[6] >= t ? 1 : 0) + (r && e[6] >= t * 4 && e[0] >= t ? 1 : 0);
289
289
  }, n.prototype.finderPenaltyTerminateAndCount = function(e, t, r) {
@@ -315,7 +315,7 @@ var z;
315
315
  ], n;
316
316
  }()
317
317
  );
318
- o.QrCode = u;
318
+ o.QrCode = c;
319
319
  function d(n, e, t) {
320
320
  if (e < 0 || e > 31 || n >>> e)
321
321
  throw new RangeError("Value out of range");
@@ -325,11 +325,11 @@ var z;
325
325
  function l(n, e) {
326
326
  return (n >>> e & 1) != 0;
327
327
  }
328
- function h(n) {
328
+ function m(n) {
329
329
  if (!n)
330
330
  throw new Error("Assertion error");
331
331
  }
332
- var c = (
332
+ var f = (
333
333
  /** @class */
334
334
  function() {
335
335
  function n(e, t, r) {
@@ -383,10 +383,10 @@ var z;
383
383
  return this.bitData.slice();
384
384
  }, n.getTotalBits = function(e, t) {
385
385
  for (var r = 0, a = 0, i = e; a < i.length; a++) {
386
- var s = i[a], m = s.mode.numCharCountBits(t);
387
- if (s.numChars >= 1 << m)
386
+ var s = i[a], h = s.mode.numCharCountBits(t);
387
+ if (s.numChars >= 1 << h)
388
388
  return 1 / 0;
389
- r += 4 + m + s.bitData.length;
389
+ r += 4 + h + s.bitData.length;
390
390
  }
391
391
  return r;
392
392
  }, n.toUtf8ByteArray = function(e) {
@@ -397,44 +397,44 @@ var z;
397
397
  }, n.NUMERIC_REGEX = /^[0-9]*$/, n.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/, n.ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", n;
398
398
  }()
399
399
  );
400
- o.QrSegment = c;
401
- })(z || (z = {}));
400
+ o.QrSegment = f;
401
+ })(O || (O = {}));
402
402
  (function(o) {
403
- (function(u) {
403
+ (function(c) {
404
404
  var d = (
405
405
  /** @class */
406
406
  function() {
407
- function l(h, c) {
408
- this.ordinal = h, this.formatBits = c;
407
+ function l(m, f) {
408
+ this.ordinal = m, this.formatBits = f;
409
409
  }
410
410
  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;
411
411
  }()
412
412
  );
413
- u.Ecc = d;
413
+ c.Ecc = d;
414
414
  })(o.QrCode || (o.QrCode = {}));
415
- })(z || (z = {}));
415
+ })(O || (O = {}));
416
416
  (function(o) {
417
- (function(u) {
417
+ (function(c) {
418
418
  var d = (
419
419
  /** @class */
420
420
  function() {
421
- function l(h, c) {
422
- this.modeBits = h, this.numBitsCharCount = c;
421
+ function l(m, f) {
422
+ this.modeBits = m, this.numBitsCharCount = f;
423
423
  }
424
- return l.prototype.numCharCountBits = function(h) {
425
- return this.numBitsCharCount[Math.floor((h + 7) / 17)];
424
+ return l.prototype.numCharCountBits = function(m) {
425
+ return this.numBitsCharCount[Math.floor((m + 7) / 17)];
426
426
  }, 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;
427
427
  }()
428
428
  );
429
- u.Mode = d;
429
+ c.Mode = d;
430
430
  })(o.QrSegment || (o.QrSegment = {}));
431
- })(z || (z = {}));
432
- var Q = z, X = "L", J = {
433
- L: Q.QrCode.Ecc.LOW,
434
- M: Q.QrCode.Ecc.MEDIUM,
435
- Q: Q.QrCode.Ecc.QUARTILE,
436
- H: Q.QrCode.Ecc.HIGH
437
- }, Te = function() {
431
+ })(O || (O = {}));
432
+ var x = O, X = "L", J = {
433
+ L: x.QrCode.Ecc.LOW,
434
+ M: x.QrCode.Ecc.MEDIUM,
435
+ Q: x.QrCode.Ecc.QUARTILE,
436
+ H: x.QrCode.Ecc.HIGH
437
+ }, Pe = function() {
438
438
  try {
439
439
  new Path2D().addPath(new Path2D());
440
440
  } catch {
@@ -445,38 +445,38 @@ var Q = z, X = "L", J = {
445
445
  function Z(o) {
446
446
  return o in J;
447
447
  }
448
- function ce(o, u) {
449
- u === void 0 && (u = 0);
448
+ function ce(o, c) {
449
+ c === void 0 && (c = 0);
450
450
  var d = [];
451
- return o.forEach(function(l, h) {
452
- var c = null;
451
+ return o.forEach(function(l, m) {
452
+ var f = null;
453
453
  l.forEach(function(n, e) {
454
- if (!n && c !== null) {
455
- d.push("M".concat(c + u, " ").concat(h + u, "h").concat(e - c, "v1H").concat(c + u, "z")), c = null;
454
+ if (!n && f !== null) {
455
+ d.push("M".concat(f + c, " ").concat(m + c, "h").concat(e - f, "v1H").concat(f + c, "z")), f = null;
456
456
  return;
457
457
  }
458
458
  if (e === l.length - 1) {
459
459
  if (!n)
460
460
  return;
461
- c === null ? d.push("M".concat(e + u, ",").concat(h + u, " h1v1H").concat(e + u, "z")) : d.push("M".concat(c + u, ",").concat(h + u, " h").concat(e + 1 - c, "v1H").concat(c + u, "z"));
461
+ f === null ? d.push("M".concat(e + c, ",").concat(m + c, " h1v1H").concat(e + c, "z")) : d.push("M".concat(f + c, ",").concat(m + c, " h").concat(e + 1 - f, "v1H").concat(f + c, "z"));
462
462
  return;
463
463
  }
464
- n && c === null && (c = e);
464
+ n && f === null && (f = e);
465
465
  });
466
466
  }), d.join("");
467
467
  }
468
- function fe(o, u, d, l) {
469
- var h = l.width, c = l.height, n = l.x, e = l.y, t = o.length + d * 2, r = Math.floor(u * 0.1), a = t / u, i = (h || r) * a, s = (c || r) * a, m = n == null ? o.length / 2 - i / 2 : n * a, y = e == null ? o.length / 2 - s / 2 : e * a, f = null;
468
+ function de(o, c, d, l) {
469
+ var m = l.width, f = l.height, n = l.x, e = l.y, t = o.length + d * 2, r = Math.floor(c * 0.1), a = t / c, i = (m || r) * a, s = (f || r) * a, h = n == null ? o.length / 2 - i / 2 : n * a, C = e == null ? o.length / 2 - s / 2 : e * a, u = null;
470
470
  if (l.excavate) {
471
- var v = Math.floor(m), p = Math.floor(y), E = Math.ceil(i + m - v), C = Math.ceil(s + y - p);
472
- f = { x: v, y: p, w: E, h: C };
471
+ var v = Math.floor(h), p = Math.floor(C), w = Math.ceil(i + h - v), g = Math.ceil(s + C - p);
472
+ u = { x: v, y: p, w, h: g };
473
473
  }
474
- return { x: m, y, h: s, w: i, excavation: f };
474
+ return { x: h, y: C, h: s, w: i, excavation: u };
475
475
  }
476
- function ve(o, u) {
476
+ function fe(o, c) {
477
477
  return o.slice().map(function(d, l) {
478
- return l < u.y || l >= u.y + u.h ? d : d.map(function(h, c) {
479
- return c < u.x || c >= u.x + u.w ? h : !1;
478
+ return l < c.y || l >= c.y + c.h ? d : d.map(function(m, f) {
479
+ return f < c.x || f >= c.x + c.w ? m : !1;
480
480
  });
481
481
  });
482
482
  }
@@ -540,30 +540,30 @@ var j = {
540
540
  required: !1,
541
541
  default: "#fff"
542
542
  }
543
- }, Pe = I(I({}, j), { renderAs: {
543
+ }, Te = T(T({}, j), { renderAs: {
544
544
  type: String,
545
545
  required: !1,
546
546
  default: "canvas",
547
547
  validator: function(o) {
548
548
  return ["canvas", "svg"].indexOf(o) > -1;
549
549
  }
550
- } }), Ne = D({
550
+ } }), Ne = z({
551
551
  name: "QRCodeSvg",
552
552
  props: j,
553
553
  setup: function(o) {
554
- var u = k(0), d = k(""), l, h = function() {
555
- var n = o.value, e = o.level, t = o.margin, r = t >>> 0, a = Z(e) ? e : X, i = Q.QrCode.encodeText(n, J[a]).getModules();
556
- if (u.value = i.length + r * 2, o.imageSettings.src) {
557
- var s = fe(i, o.size, r, o.imageSettings);
554
+ var c = I(0), d = I(""), l, m = function() {
555
+ var n = o.value, e = o.level, t = o.margin, r = t >>> 0, a = Z(e) ? e : X, i = x.QrCode.encodeText(n, J[a]).getModules();
556
+ if (c.value = i.length + r * 2, o.imageSettings.src) {
557
+ var s = de(i, o.size, r, o.imageSettings);
558
558
  l = {
559
559
  x: s.x + r,
560
560
  y: s.y + r,
561
561
  width: s.w,
562
562
  height: s.h
563
- }, s.excavation && (i = ve(i, s.excavation));
563
+ }, s.excavation && (i = fe(i, s.excavation));
564
564
  }
565
565
  d.value = ce(i, r);
566
- }, c = function() {
566
+ }, f = function() {
567
567
  if (!o.gradient)
568
568
  return null;
569
569
  var n = o.gradientType === "linear" ? {
@@ -578,7 +578,7 @@ var j = {
578
578
  fx: "50%",
579
579
  fy: "50%"
580
580
  };
581
- return M(o.gradientType === "linear" ? "linearGradient" : "radialGradient", I({ id: "qr-gradient" }, n), [
581
+ return M(o.gradientType === "linear" ? "linearGradient" : "radialGradient", T({ id: "qr-gradient" }, n), [
582
582
  M("stop", {
583
583
  offset: "0%",
584
584
  style: { stopColor: o.gradientStartColor }
@@ -589,15 +589,15 @@ var j = {
589
589
  })
590
590
  ]);
591
591
  };
592
- return h(), ie(h), function() {
592
+ return m(), oe(m), function() {
593
593
  return M("svg", {
594
594
  width: o.size,
595
595
  height: o.size,
596
596
  "shape-rendering": "crispEdges",
597
597
  xmlns: "http://www.w3.org/2000/svg",
598
- viewBox: "0 0 ".concat(u.value, " ").concat(u.value)
598
+ viewBox: "0 0 ".concat(c.value, " ").concat(c.value)
599
599
  }, [
600
- M("defs", {}, [c()]),
600
+ M("defs", {}, [f()]),
601
601
  M("rect", {
602
602
  width: "100%",
603
603
  height: "100%",
@@ -607,66 +607,66 @@ var j = {
607
607
  fill: o.gradient ? "url(#qr-gradient)" : o.foreground,
608
608
  d: d.value
609
609
  }),
610
- o.imageSettings.src && M("image", I({ href: o.imageSettings.src }, l))
610
+ o.imageSettings.src && M("image", T({ href: o.imageSettings.src }, l))
611
611
  ]);
612
612
  };
613
613
  }
614
- }), _e = D({
614
+ }), _e = z({
615
615
  name: "QRCodeCanvas",
616
616
  props: j,
617
- setup: function(o, u) {
618
- var d = k(null), l = k(null), h = function() {
619
- var n = o.value, e = o.level, t = o.size, r = o.margin, a = o.background, i = o.foreground, s = o.gradient, m = o.gradientType, y = o.gradientStartColor, f = o.gradientEndColor, v = r >>> 0, p = Z(e) ? e : X, E = d.value;
620
- if (E) {
621
- var C = E.getContext("2d");
622
- if (C) {
623
- var g = Q.QrCode.encodeText(n, J[p]).getModules(), w = g.length + v * 2, b = l.value, R = { x: 0, y: 0, width: 0, height: 0 }, F = o.imageSettings.src && b != null && b.naturalWidth !== 0 && b.naturalHeight !== 0;
624
- if (F) {
625
- var T = fe(g, o.size, v, o.imageSettings);
617
+ setup: function(o, c) {
618
+ var d = I(null), l = I(null), m = function() {
619
+ var n = o.value, e = o.level, t = o.size, r = o.margin, a = o.background, i = o.foreground, s = o.gradient, h = o.gradientType, C = o.gradientStartColor, u = o.gradientEndColor, v = r >>> 0, p = Z(e) ? e : X, w = d.value;
620
+ if (w) {
621
+ var g = w.getContext("2d");
622
+ if (g) {
623
+ var y = x.QrCode.encodeText(n, J[p]).getModules(), E = y.length + v * 2, S = l.value, R = { x: 0, y: 0, width: 0, height: 0 }, B = o.imageSettings.src && S != null && S.naturalWidth !== 0 && S.naturalHeight !== 0;
624
+ if (B) {
625
+ var b = de(y, o.size, v, o.imageSettings);
626
626
  R = {
627
- x: T.x + v,
628
- y: T.y + v,
629
- width: T.w,
630
- height: T.h
631
- }, T.excavation && (g = ve(g, T.excavation));
627
+ x: b.x + v,
628
+ y: b.y + v,
629
+ width: b.w,
630
+ height: b.h
631
+ }, b.excavation && (y = fe(y, b.excavation));
632
632
  }
633
- var V = window.devicePixelRatio || 1, L = t / w * V;
634
- if (E.height = E.width = t * V, C.scale(L, L), C.fillStyle = a, C.fillRect(0, 0, w, w), s) {
635
- var B = void 0;
636
- m === "linear" ? B = C.createLinearGradient(0, 0, w, w) : B = C.createRadialGradient(w / 2, w / 2, 0, w / 2, w / 2, w / 2), B.addColorStop(0, y), B.addColorStop(1, f), C.fillStyle = B;
633
+ var K = window.devicePixelRatio || 1, L = t / E * K;
634
+ if (w.height = w.width = t * K, g.scale(L, L), g.fillStyle = a, g.fillRect(0, 0, E, E), s) {
635
+ var F = void 0;
636
+ h === "linear" ? F = g.createLinearGradient(0, 0, E, E) : F = g.createRadialGradient(E / 2, E / 2, 0, E / 2, E / 2, E / 2), F.addColorStop(0, C), F.addColorStop(1, u), g.fillStyle = F;
637
637
  } else
638
- C.fillStyle = i;
639
- Te ? C.fill(new Path2D(ce(g, v))) : g.forEach(function(U, $) {
640
- U.forEach(function(H, he) {
641
- H && C.fillRect(he + v, $ + v, 1, 1);
638
+ g.fillStyle = i;
639
+ Pe ? g.fill(new Path2D(ce(y, v))) : y.forEach(function(U, $) {
640
+ U.forEach(function(H, ve) {
641
+ H && g.fillRect(ve + v, $ + v, 1, 1);
642
642
  });
643
- }), F && C.drawImage(b, R.x, R.y, R.width, R.height);
643
+ }), B && g.drawImage(S, R.x, R.y, R.width, R.height);
644
644
  }
645
645
  }
646
646
  };
647
- me(h), ie(h);
648
- var c = u.attrs.style;
647
+ he(m), oe(m);
648
+ var f = c.attrs.style;
649
649
  return function() {
650
- return M(se, [
651
- M("canvas", I(I({}, u.attrs), { ref: d, style: I(I({}, c), { width: "".concat(o.size, "px"), height: "".concat(o.size, "px") }) })),
650
+ return M(ie, [
651
+ M("canvas", T(T({}, c.attrs), { ref: d, style: T(T({}, f), { width: "".concat(o.size, "px"), height: "".concat(o.size, "px") }) })),
652
652
  o.imageSettings.src && M("img", {
653
653
  ref: l,
654
654
  src: o.imageSettings.src,
655
655
  style: { display: "none" },
656
- onLoad: h
656
+ onLoad: m
657
657
  })
658
658
  ]);
659
659
  };
660
660
  }
661
- }), Ie = D({
661
+ }), Ie = z({
662
662
  name: "Qrcode",
663
663
  render: function() {
664
- var o = this.$props, u = o.renderAs, d = o.value, l = o.size, h = o.margin, c = o.level, n = o.background, e = o.foreground, t = o.imageSettings, r = o.gradient, a = o.gradientType, i = o.gradientStartColor, s = o.gradientEndColor;
665
- return M(u === "svg" ? Ne : _e, {
664
+ var o = this.$props, c = o.renderAs, d = o.value, l = o.size, m = o.margin, f = o.level, n = o.background, e = o.foreground, t = o.imageSettings, r = o.gradient, a = o.gradientType, i = o.gradientStartColor, s = o.gradientEndColor;
665
+ return M(c === "svg" ? Ne : _e, {
666
666
  value: d,
667
667
  size: l,
668
- margin: h,
669
- level: c,
668
+ margin: m,
669
+ level: f,
670
670
  background: n,
671
671
  foreground: e,
672
672
  imageSettings: t,
@@ -676,9 +676,9 @@ var j = {
676
676
  gradientEndColor: s
677
677
  });
678
678
  },
679
- props: Pe
679
+ props: Te
680
680
  });
681
- const ke = { class: "t-caption" }, Fe = { class: "t-caption" }, Be = { class: "my-6 justify-items-center" }, De = /* @__PURE__ */ D({
681
+ const ke = { class: "t-caption" }, Be = { class: "t-caption" }, Fe = { class: "my-6 justify-items-center" }, ze = /* @__PURE__ */ z({
682
682
  __name: "TerminalBindCodeDialog",
683
683
  props: {
684
684
  code: {
@@ -687,139 +687,138 @@ const ke = { class: "t-caption" }, Fe = { class: "t-caption" }, Be = { class: "m
687
687
  }
688
688
  },
689
689
  setup(o) {
690
- const u = o, d = W(), h = de().currentCountry.value ?? Ce.F_COUNTRY.enum.MY;
691
- function c() {
690
+ const c = o, d = W(), m = ue().currentCountry.value ?? Ce.F_COUNTRY.enum.MY;
691
+ function f() {
692
692
  try {
693
- ue(u.code), d.open({ title: "Text copied to clipboard." }, 1e3);
693
+ le(c.code), d.open({ title: "Text copied to clipboard." }, 1e3);
694
694
  } catch {
695
695
  d.open({ title: "Clipboard API incompatible." }, 1e3);
696
696
  }
697
697
  }
698
- const e = `development,${h.toLowerCase()},${u.code}`;
699
- return (t, r) => (N(), G(se, null, [
698
+ const e = `development,${m.toLowerCase()},${c.code}`;
699
+ return (t, r) => (N(), G(ie, null, [
700
700
  A("div", ke, [
701
701
  r[1] || (r[1] = ee(" Enter the binding code below on your device to link it with this terminal and apply the configuration. ")),
702
702
  A("div", {
703
703
  class: "my-6 text-center fm-typo-en-title-md-800 tracking-[0.3rem] cursor-pointer hover:text-fm-color-neutral-gray-300",
704
704
  onClick: r[0] || (r[0] = (a) => {
705
- a.stopPropagation(), c();
705
+ a.stopPropagation(), f();
706
706
  })
707
- }, le(o.code), 1)
707
+ }, se(o.code), 1)
708
708
  ]),
709
709
  r[3] || (r[3] = A("div", { class: "flex items-center my-4" }, [
710
710
  A("div", { class: "flex-grow border-t border-gray-300" }),
711
711
  A("span", { class: "px-4 text-gray-500 text-sm font-medium" }, "OR"),
712
712
  A("div", { class: "flex-grow border-t border-gray-300" })
713
713
  ], -1)),
714
- A("div", Fe, [
714
+ A("div", Be, [
715
715
  r[2] || (r[2] = ee(" Scan the binding code below on your device to link it with this terminal and apply the configuration. ")),
716
- A("div", Be, [
717
- _(Ie, { value: e })
716
+ A("div", Fe, [
717
+ k(Ie, { value: e })
718
718
  ])
719
719
  ])
720
720
  ], 64));
721
721
  }
722
- }), Oe = /* @__PURE__ */ D({
722
+ }), De = /* @__PURE__ */ z({
723
723
  __name: "ID",
724
724
  props: {
725
725
  row: {},
726
726
  data: {}
727
727
  },
728
728
  setup(o) {
729
- const u = o, d = W();
729
+ const c = o, d = W();
730
730
  function l() {
731
- return u.row.original.status === "Active" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
731
+ return c.row.original.status === "Active" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
732
732
  }
733
- function h() {
733
+ function m() {
734
734
  try {
735
- ue(u.data), d.open({ title: "Text copied to clipboard." }, 1e3);
735
+ le(c.data), d.open({ title: "Text copied to clipboard." }, 1e3);
736
736
  } catch {
737
737
  d.open({ title: "Clipboard API incompatible." }, 1e3);
738
738
  }
739
- u.data;
739
+ c.data;
740
740
  }
741
- return (c, n) => {
742
- const e = P("FmBadge");
741
+ return (f, n) => {
742
+ const e = _("FmBadge");
743
743
  return N(), G("div", {
744
744
  onClick: n[0] || (n[0] = (t) => {
745
- t.stopPropagation(), h();
745
+ t.stopPropagation(), m();
746
746
  })
747
747
  }, [
748
- _(e, {
748
+ k(e, {
749
749
  inline: "",
750
- class: pe(l())
750
+ class: me(l())
751
751
  }, {
752
752
  default: q(() => [
753
- A("div", null, le(c.data), 1)
753
+ A("div", null, se(f.data), 1)
754
754
  ]),
755
755
  _: 1
756
756
  }, 8, ["class"])
757
757
  ]);
758
758
  };
759
759
  }
760
- }), ze = { class: "flex" }, Le = /* @__PURE__ */ D({
760
+ }), Oe = { class: "flex" }, Le = /* @__PURE__ */ z({
761
761
  __name: "Actions",
762
762
  props: {
763
763
  data: {}
764
764
  },
765
765
  emits: ["link", "unlink", "edit", "delete"],
766
- setup(o, { emit: u }) {
767
- const d = o, l = u;
768
- function h() {
769
- const c = Se([
766
+ setup(o, { emit: c }) {
767
+ const d = o, l = c;
768
+ function m() {
769
+ const f = Se([
770
770
  {
771
771
  type: "span",
772
772
  queryKey: "terminal.id",
773
773
  queryValue: d.data._id
774
774
  }
775
775
  ]);
776
- window.open(c, "_blank");
776
+ window.open(f, "_blank");
777
777
  }
778
- return (c, n) => {
779
- const e = P("FmButton");
780
- return N(), G("div", ze, [
781
- _(e, {
778
+ return (f, n) => {
779
+ const e = _("FmButton");
780
+ return N(), G("div", Oe, [
781
+ k(e, {
782
782
  variant: "plain",
783
783
  "prepend-icon": "history",
784
784
  onClick: n[0] || (n[0] = (t) => {
785
- t.stopPropagation(), h();
785
+ t.stopPropagation(), m();
786
786
  })
787
787
  }),
788
- c.data.deviceType === "TERMINAL" && !c.data.deviceId ? (N(), O(e, {
788
+ f.data.deviceType === "TERMINAL" && !f.data.deviceId ? (N(), D(e, {
789
789
  key: 0,
790
790
  variant: "plain",
791
791
  "prepend-icon": "link",
792
792
  onClick: n[1] || (n[1] = (t) => {
793
793
  t.stopPropagation(), l("link");
794
794
  })
795
- })) : K("", !0),
796
- c.data.deviceType === "TERMINAL" && c.data.deviceId ? (N(), O(e, {
795
+ })) : V("", !0),
796
+ f.data.deviceType === "TERMINAL" && f.data.deviceId ? (N(), D(e, {
797
797
  key: 1,
798
798
  variant: "plain",
799
799
  "prepend-icon": "link_off",
800
800
  onClick: n[2] || (n[2] = (t) => {
801
801
  t.stopPropagation(), l("unlink");
802
802
  })
803
- })) : K("", !0),
804
- _(e, {
803
+ })) : V("", !0),
804
+ k(e, {
805
805
  variant: "plain",
806
806
  "prepend-icon": "edit",
807
807
  onClick: n[3] || (n[3] = (t) => {
808
808
  t.stopPropagation(), l("edit");
809
809
  })
810
810
  }),
811
- c.data.deviceType === "TERMINAL" ? (N(), O(e, {
812
- key: 2,
811
+ k(e, {
813
812
  variant: "plain",
814
813
  "prepend-icon": "delete",
815
814
  onClick: n[4] || (n[4] = (t) => {
816
815
  t.stopPropagation(), l("delete");
817
816
  })
818
- })) : K("", !0)
817
+ })
819
818
  ]);
820
819
  };
821
820
  }
822
- }), Ue = /* @__PURE__ */ D({
821
+ }), Ue = /* @__PURE__ */ z({
823
822
  __name: "TerminalDialog",
824
823
  props: {
825
824
  terminal: {
@@ -828,42 +827,42 @@ const ke = { class: "t-caption" }, Fe = { class: "t-caption" }, Be = { class: "m
828
827
  },
829
828
  setup(o) {
830
829
  var r, a, i;
831
- const u = o, d = de(), l = Re(), h = k(), c = k((r = u.terminal) == null ? void 0 : r.name), n = k((a = u.terminal) == null ? void 0 : a.referenceId), e = k(((i = u.terminal) == null ? void 0 : i.status) === "Active"), t = ge(() => d.restaurants.value.map((s) => ({
830
+ const c = o, d = ue(), l = Re(), m = I(), f = I((r = c.terminal) == null ? void 0 : r.name), n = I((a = c.terminal) == null ? void 0 : a.referenceId), e = I(((i = c.terminal) == null ? void 0 : i.status) === "Active"), t = pe(() => d.restaurants.value.map((s) => ({
832
831
  label: s.profile.name,
833
832
  value: s._id
834
833
  })));
835
- return (s, m) => {
836
- const y = P("FmSelect"), f = P("FmTextField"), v = P("FmSwitch"), p = P("FmButton"), E = P("FmForm");
837
- return N(), O(E, {
838
- ref: h.value,
834
+ return (s, h) => {
835
+ const C = _("FmSelect"), u = _("FmTextField"), v = _("FmSwitch"), p = _("FmButton"), w = _("FmForm");
836
+ return N(), D(w, {
837
+ ref: m.value,
839
838
  class: "flex flex-col gap-16 mb-6",
840
- onValidationSuccess: m[3] || (m[3] = () => {
841
- S(l).emitData({ name: c.value, referenceId: n.value, status: e.value ? "Active" : "Inactive" }), S(l).emitAction("primary");
839
+ onValidationSuccess: h[3] || (h[3] = () => {
840
+ P(l).emitData({ name: f.value, referenceId: n.value, status: e.value ? "Active" : "Inactive" }), P(l).emitAction("primary");
842
841
  })
843
842
  }, {
844
843
  default: q(() => [
845
- u.terminal ? K("", !0) : (N(), O(y, {
844
+ c.terminal ? V("", !0) : (N(), D(C, {
846
845
  key: 0,
847
846
  modelValue: n.value,
848
- "onUpdate:modelValue": m[0] || (m[0] = (C) => n.value = C),
847
+ "onUpdate:modelValue": h[0] || (h[0] = (g) => n.value = g),
849
848
  label: "Restaurant",
850
849
  "helper-text": "If you can't find the restaurant please change the business to the restaurant's business.",
851
850
  items: t.value,
852
- rules: S(ne)(S(ae).string())
851
+ rules: P(re)(P(ne).string())
853
852
  }, null, 8, ["modelValue", "items", "rules"])),
854
- _(f, {
855
- modelValue: c.value,
856
- "onUpdate:modelValue": m[1] || (m[1] = (C) => c.value = C),
853
+ k(u, {
854
+ modelValue: f.value,
855
+ "onUpdate:modelValue": h[1] || (h[1] = (g) => f.value = g),
857
856
  label: "Terminal Name",
858
- rules: S(ne)(S(ae).string())
857
+ rules: P(re)(P(ne).string())
859
858
  }, null, 8, ["modelValue", "rules"]),
860
- u.terminal ? (N(), O(v, {
859
+ c.terminal ? (N(), D(v, {
861
860
  key: 1,
862
861
  modelValue: e.value,
863
- "onUpdate:modelValue": m[2] || (m[2] = (C) => e.value = C),
862
+ "onUpdate:modelValue": h[2] || (h[2] = (g) => e.value = g),
864
863
  label: "Status"
865
- }, null, 8, ["modelValue"])) : K("", !0),
866
- _(p, {
864
+ }, null, 8, ["modelValue"])) : V("", !0),
865
+ k(p, {
867
866
  type: "submit",
868
867
  label: "Create"
869
868
  })
@@ -872,42 +871,45 @@ const ke = { class: "t-caption" }, Fe = { class: "t-caption" }, Be = { class: "m
872
871
  }, 512);
873
872
  };
874
873
  }
875
- }), xe = { class: "flex justify-between mb-6 items-center" }, Qe = { class: "flex space-x-4" }, Ke = { class: "flex space-x-4" }, at = /* @__PURE__ */ D({
874
+ }), Qe = { class: "flex justify-between mb-6 items-center" }, xe = { class: "flex space-x-4" }, Ve = { class: "flex space-x-4" }, at = /* @__PURE__ */ z({
876
875
  __name: "Terminal",
876
+ props: {
877
+ type: {}
878
+ },
877
879
  setup(o) {
878
- const u = k(), { searchKey: d, deviceType: l } = we({
880
+ const c = o, d = I(), { searchKey: l, deviceType: m } = we({
879
881
  searchKey: "",
880
882
  deviceType: void 0
881
883
  });
882
- te(l, () => {
883
- var f;
884
- return (f = u.value) == null ? void 0 : f.reset();
884
+ te(m, () => {
885
+ var u;
886
+ return (u = d.value) == null ? void 0 : u.reset();
885
887
  });
886
- let h;
887
- te(d, async () => {
888
- h && clearTimeout(h), h = setTimeout(
888
+ let f;
889
+ te(l, async () => {
890
+ f && clearTimeout(f), f = setTimeout(
889
891
  () => {
890
- var f;
891
- return (f = u.value) == null ? void 0 : f.reset();
892
+ var u;
893
+ return (u = d.value) == null ? void 0 : u.reset();
892
894
  },
893
895
  700
894
896
  );
895
897
  });
896
- const c = be(), n = Ae(), e = W();
897
- async function t(f) {
898
- oe(
899
- n,
898
+ const n = be(), e = Ae(), t = W();
899
+ async function r(u) {
900
+ ae(
901
+ e,
900
902
  "Terminal Unbind",
901
903
  "Are you sure to unbind terminal from device? This action cannot be revert and device will be logged out!",
902
904
  async () => {
903
905
  var v;
904
906
  try {
905
- await x.unbind(f), (v = u.value) == null || v.reset(), e.open({
907
+ await Q.unbind(u), (v = d.value) == null || v.reset(), t.open({
906
908
  type: "success",
907
909
  message: "Terminal unbind successfully"
908
910
  });
909
911
  } catch (p) {
910
- e.open({
912
+ t.open({
911
913
  type: "error",
912
914
  title: "Error occurs when unbind terminal",
913
915
  message: Y(p)
@@ -916,54 +918,54 @@ const ke = { class: "t-caption" }, Fe = { class: "t-caption" }, Be = { class: "m
916
918
  }
917
919
  );
918
920
  }
919
- async function r(f) {
920
- const v = await x.getBindCode(f);
921
- n.open({
921
+ async function a(u) {
922
+ const v = await Q.getBindCode(u);
923
+ e.open({
922
924
  title: "Terminal Binding",
923
925
  closeButton: !0,
924
926
  overlay: !0,
925
- contentComponent: De,
927
+ contentComponent: ze,
926
928
  contentComponentProps: { code: v }
927
929
  });
928
930
  }
929
- async function a(f) {
930
- n.open({
931
- title: f ? "Update Terminal" : "Create New Terminal",
931
+ async function i(u) {
932
+ e.open({
933
+ title: u ? "Update Terminal" : "Create New Terminal",
932
934
  closeButton: !0,
933
935
  overlay: !0,
934
936
  contentComponent: Ue,
935
- contentComponentProps: { terminal: f }
937
+ contentComponentProps: { terminal: u }
936
938
  }).onPrimary(async (v) => {
937
939
  var p;
938
- n.close();
940
+ e.close();
939
941
  try {
940
- await (f ? x.updateById(f._id, v) : x.create(v)), (p = u.value) == null || p.reset(), e.open({
942
+ await (u ? Q.updateById(u._id, { ...v, ecrs: u.ecrs ?? [], gateways: u.gateways ?? [] }) : Q.create(v)), (p = d.value) == null || p.reset(), t.open({
941
943
  type: "success",
942
- message: f ? "Terminal udpated successfully" : "Terminal created successfully."
944
+ message: u ? "Terminal udpated successfully" : "Terminal created successfully."
943
945
  });
944
- } catch (E) {
945
- e.open({
946
+ } catch (w) {
947
+ t.open({
946
948
  type: "error",
947
949
  title: "Error occurs when create terminal",
948
- message: Y(E)
950
+ message: Y(w)
949
951
  });
950
952
  }
951
953
  });
952
954
  }
953
- async function i(f) {
954
- oe(
955
- n,
955
+ async function s(u) {
956
+ ae(
957
+ e,
956
958
  "Delete Terminal",
957
959
  "Are you sure to delete terminal? This action cannot be revert and device will be logged out!",
958
960
  async () => {
959
961
  var v;
960
962
  try {
961
- await x.delete(f), (v = u.value) == null || v.reset(), e.open({
963
+ await Q.delete(u), (v = d.value) == null || v.reset(), t.open({
962
964
  type: "success",
963
965
  message: "Terminal delete successfully"
964
966
  });
965
967
  } catch (p) {
966
- e.open({
968
+ t.open({
967
969
  type: "error",
968
970
  title: "Error occurs when delete terminal",
969
971
  message: Y(p)
@@ -972,31 +974,29 @@ const ke = { class: "t-caption" }, Fe = { class: "t-caption" }, Be = { class: "m
972
974
  }
973
975
  );
974
976
  }
975
- const s = function(f) {
976
- return {
977
- id: f._id,
978
- status: f.status,
979
- referenceId: f.referenceId,
980
- name: f.name,
981
- deviceId: f.deviceId,
982
- deviceType: f.deviceType,
983
- updatedAt: ye(f.updatedAt).format("YYYY-MM-DD HH:mm:ss")
977
+ const h = function(u) {
978
+ var p, w;
979
+ let v = u.name;
980
+ return u.deviceType === "POS" && ((p = u.name) != null && p.includes("@")) && (v = u.restaurant.profile.name), u.deviceType === "KIOSK" && ((w = u.name) != null && w.includes("-")) && (v = u.restaurant.profile.name), {
981
+ id: u._id,
982
+ status: u.status,
983
+ referenceId: u.referenceId,
984
+ name: v,
985
+ deviceId: u.deviceId,
986
+ deviceType: u.deviceType,
987
+ updatedAt: ye(u.updatedAt).format("YYYY-MM-DD HH:mm:ss"),
988
+ posVersion: u.restaurant.posVersion,
989
+ gateways: u.gateways,
990
+ ecrs: u.ecrs
984
991
  };
985
- }, m = [
992
+ }, C = [
986
993
  {
987
994
  accessorKey: "id",
988
995
  header: () => "Terminal ID",
989
996
  meta: {
990
997
  textAlign: "right"
991
998
  },
992
- cell: ({ cell: f, row: v }) => M(Oe, { row: v, data: f.getValue() })
993
- },
994
- {
995
- accessorKey: "deviceType",
996
- header: () => "Device Type",
997
- meta: {
998
- textAlign: "left"
999
- }
999
+ cell: ({ cell: u, row: v }) => M(De, { row: v, data: u.getValue() })
1000
1000
  },
1001
1001
  {
1002
1002
  accessorKey: "name",
@@ -1006,15 +1006,15 @@ const ke = { class: "t-caption" }, Fe = { class: "t-caption" }, Be = { class: "m
1006
1006
  }
1007
1007
  },
1008
1008
  {
1009
- accessorKey: "referenceId",
1010
- header: () => "Reference",
1009
+ accessorKey: "posVersion",
1010
+ header: () => "POS Version",
1011
1011
  meta: {
1012
1012
  textAlign: "left"
1013
1013
  }
1014
1014
  },
1015
1015
  {
1016
1016
  accessorKey: "deviceId",
1017
- header: () => "Bound Device Id",
1017
+ header: () => "Device ID",
1018
1018
  meta: {
1019
1019
  textAlign: "left"
1020
1020
  }
@@ -1032,72 +1032,53 @@ const ke = { class: "t-caption" }, Fe = { class: "t-caption" }, Be = { class: "m
1032
1032
  meta: {
1033
1033
  textAlign: "center"
1034
1034
  },
1035
- cell: ({ row: f }) => {
1035
+ cell: ({ row: u }) => {
1036
1036
  var p;
1037
- const v = (p = u.value) == null ? void 0 : p.pageData().at(f.index);
1037
+ const v = (p = d.value) == null ? void 0 : p.pageData().at(u.index);
1038
1038
  return M(Le, {
1039
1039
  data: v,
1040
- onLink: () => r(v._id),
1041
- onUnlink: () => t(v._id),
1042
- onEdit: () => a(v),
1043
- onDelete: () => i(v._id)
1040
+ onLink: () => a(v._id),
1041
+ onUnlink: () => r(v._id),
1042
+ onEdit: () => i(v),
1043
+ onDelete: () => s(v._id)
1044
1044
  });
1045
1045
  }
1046
1046
  }
1047
- ], y = [
1048
- {
1049
- label: "POS",
1050
- value: "POS"
1051
- },
1052
- {
1053
- label: "KIOSK",
1054
- value: "KIOSK"
1055
- },
1056
- {
1057
- label: "TERMINAL",
1058
- value: "TERMINAL"
1059
- }
1060
1047
  ];
1061
- return (f, v) => {
1062
- const p = P("FmSearch"), E = P("FmSelect"), C = P("FmButton");
1063
- return N(), O(Me, {
1064
- title: "Terminals",
1048
+ return (u, v) => {
1049
+ const p = _("FmSearch"), w = _("FmButton");
1050
+ return N(), D(Me, {
1051
+ title: c.type,
1065
1052
  loading: !1
1066
1053
  }, {
1067
1054
  default: q(() => [
1068
- A("div", xe, [
1069
- A("div", Qe, [
1070
- _(p, {
1071
- "model-value": S(d),
1072
- "onUpdate:modelValue": v[0] || (v[0] = (g) => re(d) ? d.value = g : null),
1055
+ A("div", Qe, [
1056
+ A("div", xe, [
1057
+ k(p, {
1058
+ "model-value": P(l),
1059
+ "onUpdate:modelValue": v[0] || (v[0] = (g) => ge(l) ? l.value = g : null),
1073
1060
  class: "mr-8",
1074
1061
  label: "Search",
1075
- placeholder: "Search Terminals ..."
1076
- }, null, 8, ["model-value"]),
1077
- _(E, {
1078
- modelValue: S(l),
1079
- "onUpdate:modelValue": v[1] || (v[1] = (g) => re(l) ? l.value = g : null),
1080
- class: "ml-6 w-[180px]",
1081
- label: "Device",
1082
- items: y
1083
- }, null, 8, ["modelValue"])
1062
+ placeholder: "Search ..."
1063
+ }, null, 8, ["model-value"])
1084
1064
  ]),
1085
- A("div", Ke, [
1086
- _(C, {
1065
+ A("div", Ve, [
1066
+ c.type === "TERMINAL" ? (N(), D(w, {
1067
+ key: 0,
1087
1068
  label: "Create",
1088
1069
  icon: "add",
1089
- onClick: v[2] || (v[2] = () => a())
1090
- })
1070
+ onClick: v[1] || (v[1] = () => i())
1071
+ })) : V("", !0)
1091
1072
  ])
1092
1073
  ]),
1093
- _(Ee, {
1074
+ k(Ee, {
1094
1075
  ref_key: "controller",
1095
- ref: u,
1096
- "column-defs": m,
1097
- "rows-defs": s,
1098
- paginate: (g, w) => S(x).read({ searchKey: S(d), deviceType: S(l), limit: g, cursor: w }),
1099
- onRowClick: v[3] || (v[3] = (g) => S(c).push({
1100
- name: "mf-payment-admin.terminal-setting",
1076
+ ref: d,
1077
+ "column-defs": C,
1078
+ "rows-defs": h,
1079
+ paginate: (g, y) => P(Q).read({ searchKey: P(l), deviceType: c.type, limit: g, cursor: y }),
1080
+ onRowClick: v[2] || (v[2] = (g) => P(n).push({
1081
+ name: `mf-payment-admin.${c.type.toLowerCase()}-setting`,
1101
1082
  params: {
1102
1083
  terminalId: g._id
1103
1084
  }
@@ -1105,7 +1086,7 @@ const ke = { class: "t-caption" }, Fe = { class: "t-caption" }, Be = { class: "m
1105
1086
  }, null, 8, ["paginate"])
1106
1087
  ]),
1107
1088
  _: 1
1108
- });
1089
+ }, 8, ["title"]);
1109
1090
  };
1110
1091
  }
1111
1092
  });