@feedmepos/mf-connect 0.1.38-beta.73 → 0.1.38-beta.74

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 (133) hide show
  1. package/package.json +1 -1
  2. package/dist/Analytic-gGjm5ome.js +0 -761
  3. package/dist/App-BDz9mw-6.js +0 -4638
  4. package/dist/AuditLogs-4x90ZjjY.js +0 -1991
  5. package/dist/Bin-Bby2f42O.js +0 -166
  6. package/dist/Broadcast-eYN2AqFC.js +0 -267
  7. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-fO9-Hb.js +0 -121
  8. package/dist/Card-Cz-pLt7X.js +0 -909
  9. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  10. package/dist/Collections-CgfXuVA1.js +0 -540
  11. package/dist/Credit-Lc6B2oQ9.js +0 -261
  12. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  13. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  14. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bm7XTR7o.js +0 -3167
  15. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Cp5nSLEX.js +0 -351
  16. package/dist/Experience-Ca94IJBt.js +0 -260
  17. package/dist/FileSaver.min-BThLVsSf.js +0 -74
  18. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  19. package/dist/Game-BYLYDTU9.js +0 -331
  20. package/dist/GenerateMaterial-CUoG6uyI.js +0 -589
  21. package/dist/Grab-DZ_LkTly.js +0 -301
  22. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-CI4kP9ul.js +0 -145
  23. package/dist/Index-BZ2r8x0t.js +0 -259
  24. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  25. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-BLKlXW1b.js +0 -18737
  26. package/dist/MainLayout-BfGSSVMW.js +0 -41
  27. package/dist/Marketing-DYg0J1xG.js +0 -145
  28. package/dist/MarketingMaterialEdit-B--Kck7j.js +0 -746
  29. package/dist/Member-By5QEJxn.js +0 -280
  30. package/dist/MemberList-D49bMmGJ.js +0 -1600
  31. package/dist/MemberOverview-wL_ailso.js +0 -58
  32. package/dist/MemberTransactions-Cz9XENK1.js +0 -45
  33. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-IlFjM-Y5.js +0 -60798
  34. package/dist/Mission-Cvl-V7c8.js +0 -335
  35. package/dist/Overview-lu82lUJp.js +0 -1078
  36. package/dist/Point-C65YFhOB.js +0 -263
  37. package/dist/Promotion-DQCrKO6a.js +0 -397
  38. package/dist/Queue-DR5lfSMi.js +0 -259
  39. package/dist/Record-BCt42_VZ.js +0 -341
  40. package/dist/Reward-7aOnjmMm.js +0 -442
  41. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BPgjr91S.js +0 -149
  42. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Bp5jnlFr.js +0 -1912
  43. package/dist/Segment-DiYwfb8M.js +0 -881
  44. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-ydM5ypC0.js +0 -181
  45. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BRs7pw0l.js +0 -188
  46. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DU8AAPFD.js +0 -147
  47. package/dist/Setting-k6xShcs8.js +0 -1999
  48. package/dist/SettingAdvertisements-DQa_jXYM.js +0 -263
  49. package/dist/Store-B6lYBpsm.js +0 -1995
  50. package/dist/StoreRewards-Cqd399q8.js +0 -534
  51. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Wv_SHwmo.js +0 -1128
  52. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bi1o4YAz.js +0 -7005
  53. package/dist/Tier-CXXImaDx.js +0 -969
  54. package/dist/Title-CTxNCmBW.js +0 -567
  55. package/dist/Transaction-DonaHVzF.js +0 -39
  56. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DbRVYccO.js +0 -130
  57. package/dist/Voucher-Bso_Mjlg.js +0 -422
  58. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DNvmaJk9.js +0 -421
  59. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-KHZ3-THo.js +0 -56
  60. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  61. package/dist/app-DKrmktFJ.js +0 -59071
  62. package/dist/app-wDQR6dpb.js +0 -39
  63. package/dist/app.js +0 -7
  64. package/dist/business-Dd73TVX5.js +0 -82
  65. package/dist/campaign-BUQHH4KL.js +0 -100
  66. package/dist/campaign-CpzFl8Vr.js +0 -4
  67. package/dist/campaign-DkJOyF24.js +0 -253
  68. package/dist/campaign.enum-C8vJuDAq.js +0 -26
  69. package/dist/campaign.fn-DJSpfhZH.js +0 -776
  70. package/dist/collectible.enum-D3W0TwoJ.js +0 -19
  71. package/dist/collection.fn-YzgpOmG0.js +0 -26
  72. package/dist/dto-sceHHLGr.js +0 -222
  73. package/dist/duplicateCampaign-CDulKxgJ.js +0 -51
  74. package/dist/effect-BSgfR9iB.js +0 -89
  75. package/dist/email-addresses-D_fyxOof.js +0 -705
  76. package/dist/export-OxiqL1B7.js +0 -96
  77. package/dist/feedme.ico +0 -0
  78. package/dist/helper-CzurWUe4.js +0 -86
  79. package/dist/index-BF0hGAkO.js +0 -32
  80. package/dist/index-BGMhsZnB.js +0 -124
  81. package/dist/index-B_QGGlMD.js +0 -54
  82. package/dist/index-BbTHqh58.js +0 -31
  83. package/dist/index-BqQas5Sx.js +0 -2428
  84. package/dist/index-BtMmY44D.js +0 -36
  85. package/dist/index-CAUVTn1I.js +0 -67
  86. package/dist/index-Cg-sBBf_.js +0 -3419
  87. package/dist/index-CuvNtC_M.js +0 -61
  88. package/dist/index-Cyt6eKEF.js +0 -8912
  89. package/dist/index-Dw3ew6qN.js +0 -85
  90. package/dist/index-IBvUTxqC.js +0 -30289
  91. package/dist/index-pkwrUX33.js +0 -28897
  92. package/dist/index-tYmg4eyJ.js +0 -3
  93. package/dist/index-vh86FiIQ.js +0 -10
  94. package/dist/index.esm2017-5xGykkgL.js +0 -3069
  95. package/dist/loading-CvHPT80F.js +0 -215
  96. package/dist/lodash-Q-_FPkpI.js +0 -3678
  97. package/dist/membership-CU-wFWan.js +0 -235
  98. package/dist/moment-D7p2TMB-.js +0 -2583
  99. package/dist/money-CzlfhEoe.js +0 -15
  100. package/dist/number-Bee2M41N.js +0 -12
  101. package/dist/object-qECH92oz.js +0 -26
  102. package/dist/objectId-dwaoBfJX.js +0 -7
  103. package/dist/objectid-DRJQv7AY.js +0 -145
  104. package/dist/plugins-CAdlnev8.js +0 -1817
  105. package/dist/remy-D_Deb3ue.js +0 -13
  106. package/dist/reward-BhlYd0FB.js +0 -36
  107. package/dist/rule-Ccvu41A_.js +0 -1969
  108. package/dist/rule-builder-B968rIyS.js +0 -102
  109. package/dist/style.css +0 -13
  110. package/dist/template-OZfyPJVE.js +0 -188
  111. package/dist/tier-BJDhpH6X.js +0 -4
  112. package/dist/tiers/tier=1.png +0 -0
  113. package/dist/tiers/tier=2.png +0 -0
  114. package/dist/tiers/tier=3.png +0 -0
  115. package/dist/tiers/tier=4.png +0 -0
  116. package/dist/timezone-CopuRbDK.js +0 -1154
  117. package/dist/titles/type=diamond.png +0 -0
  118. package/dist/titles/type=drinks.png +0 -0
  119. package/dist/titles/type=food.png +0 -0
  120. package/dist/titles/type=heart.png +0 -0
  121. package/dist/titles/type=medal.png +0 -0
  122. package/dist/titles/type=spend.png +0 -0
  123. package/dist/titles/type=thank-you.png +0 -0
  124. package/dist/titles/type=thumbs-up.png +0 -0
  125. package/dist/titles/type=years.png +0 -0
  126. package/dist/trigger-BtQI81FL.js +0 -213
  127. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  128. package/dist/type_drinks-D6jnpvwV.js +0 -4
  129. package/dist/usePagination-Ciom38dd.js +0 -266
  130. package/dist/user-BOW0ixDK.js +0 -55
  131. package/dist/vue-i18n-jTYKTJq1.js +0 -2365
  132. package/dist/xlsx-YD3LYwip.js +0 -15491
  133. package/dist/zod-B_G9o5PC.js +0 -91
@@ -1,1999 +0,0 @@
1
- import { defineComponent as Te, ref as O, computed as K, onMounted as Qe, resolveComponent as L, openBlock as x, createBlock as le, withCtx as Y, createElementVNode as h, createVNode as S, unref as c, isRef as Xe, createElementBlock as oe, Fragment as ye, toDisplayString as B, createTextVNode as Q, renderList as _t, createCommentVNode as we } from "vue";
2
- import { h as Et } from "./moment-D7p2TMB-.js";
3
- import { Z as Ke } from "./zod-B_G9o5PC.js";
4
- import { useDialog as We } from "@feedmepos/ui-library";
5
- import { u as At, m as Ye } from "./loading-CvHPT80F.js";
6
- import { u as Bt } from "./app-wDQR6dpb.js";
7
- import { u as Be, l as Ze } from "./business-Dd73TVX5.js";
8
- import { u as et } from "./membership-CU-wFWan.js";
9
- import { P as Pt } from "./index-IBvUTxqC.js";
10
- import { I as St, k as It } from "./index-Cg-sBBf_.js";
11
- import { _ as Mt } from "./ImageInput.vue_vue_type_script_setup_true_lang-CI4kP9ul.js";
12
- import { a as tt, p as Tt, f as se } from "./plugins-CAdlnev8.js";
13
- import { _ as Nt } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-Bi1o4YAz.js";
14
- import { u as nt } from "./vue-i18n-jTYKTJq1.js";
15
- import { M as Ut, _ as Lt } from "./MessageInput.vue_vue_type_script_setup_true_lang-IlFjM-Y5.js";
16
- import { useCoreStore as Rt } from "@feedmepos/mf-common";
17
- import { useRouter as Ft } from "vue-router";
18
- import { R as kt } from "./app-DKrmktFJ.js";
19
- import { S as je } from "./index-pkwrUX33.js";
20
- import { o as Dt } from "./objectId-dwaoBfJX.js";
21
- import { a as Vt } from "./object-qECH92oz.js";
22
- var ee = {}, $t = function() {
23
- return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
24
- }, ot = {}, R = {};
25
- let Ne;
26
- const xt = [
27
- 0,
28
- // Not used
29
- 26,
30
- 44,
31
- 70,
32
- 100,
33
- 134,
34
- 172,
35
- 196,
36
- 242,
37
- 292,
38
- 346,
39
- 404,
40
- 466,
41
- 532,
42
- 581,
43
- 655,
44
- 733,
45
- 815,
46
- 901,
47
- 991,
48
- 1085,
49
- 1156,
50
- 1258,
51
- 1364,
52
- 1474,
53
- 1588,
54
- 1706,
55
- 1828,
56
- 1921,
57
- 2051,
58
- 2185,
59
- 2323,
60
- 2465,
61
- 2611,
62
- 2761,
63
- 2876,
64
- 3034,
65
- 3196,
66
- 3362,
67
- 3532,
68
- 3706
69
- ];
70
- R.getSymbolSize = function(e) {
71
- if (!e) throw new Error('"version" cannot be null or undefined');
72
- if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
73
- return e * 4 + 17;
74
- };
75
- R.getSymbolTotalCodewords = function(e) {
76
- return xt[e];
77
- };
78
- R.getBCHDigit = function(t) {
79
- let e = 0;
80
- for (; t !== 0; )
81
- e++, t >>>= 1;
82
- return e;
83
- };
84
- R.setToSJISFunction = function(e) {
85
- if (typeof e != "function")
86
- throw new Error('"toSJISFunc" is not a valid function.');
87
- Ne = e;
88
- };
89
- R.isKanjiModeEnabled = function() {
90
- return typeof Ne < "u";
91
- };
92
- R.toSJIS = function(e) {
93
- return Ne(e);
94
- };
95
- var ue = {};
96
- (function(t) {
97
- t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
98
- function e(r) {
99
- if (typeof r != "string")
100
- throw new Error("Param is not a string");
101
- switch (r.toLowerCase()) {
102
- case "l":
103
- case "low":
104
- return t.L;
105
- case "m":
106
- case "medium":
107
- return t.M;
108
- case "q":
109
- case "quartile":
110
- return t.Q;
111
- case "h":
112
- case "high":
113
- return t.H;
114
- default:
115
- throw new Error("Unknown EC Level: " + r);
116
- }
117
- }
118
- t.isValid = function(s) {
119
- return s && typeof s.bit < "u" && s.bit >= 0 && s.bit < 4;
120
- }, t.from = function(s, n) {
121
- if (t.isValid(s))
122
- return s;
123
- try {
124
- return e(s);
125
- } catch {
126
- return n;
127
- }
128
- };
129
- })(ue);
130
- function st() {
131
- this.buffer = [], this.length = 0;
132
- }
133
- st.prototype = {
134
- get: function(t) {
135
- const e = Math.floor(t / 8);
136
- return (this.buffer[e] >>> 7 - t % 8 & 1) === 1;
137
- },
138
- put: function(t, e) {
139
- for (let r = 0; r < e; r++)
140
- this.putBit((t >>> e - r - 1 & 1) === 1);
141
- },
142
- getLengthInBits: function() {
143
- return this.length;
144
- },
145
- putBit: function(t) {
146
- const e = Math.floor(this.length / 8);
147
- this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
148
- }
149
- };
150
- var zt = st;
151
- function te(t) {
152
- if (!t || t < 1)
153
- throw new Error("BitMatrix size must be defined and greater than 0");
154
- this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
155
- }
156
- te.prototype.set = function(t, e, r, s) {
157
- const n = t * this.size + e;
158
- this.data[n] = r, s && (this.reservedBit[n] = !0);
159
- };
160
- te.prototype.get = function(t, e) {
161
- return this.data[t * this.size + e];
162
- };
163
- te.prototype.xor = function(t, e, r) {
164
- this.data[t * this.size + e] ^= r;
165
- };
166
- te.prototype.isReserved = function(t, e) {
167
- return this.reservedBit[t * this.size + e];
168
- };
169
- var Ht = te, rt = {};
170
- (function(t) {
171
- const e = R.getSymbolSize;
172
- t.getRowColCoords = function(s) {
173
- if (s === 1) return [];
174
- const n = Math.floor(s / 7) + 2, o = e(s), i = o === 145 ? 26 : Math.ceil((o - 13) / (2 * n - 2)) * 2, a = [o - 7];
175
- for (let l = 1; l < n - 1; l++)
176
- a[l] = a[l - 1] - i;
177
- return a.push(6), a.reverse();
178
- }, t.getPositions = function(s) {
179
- const n = [], o = t.getRowColCoords(s), i = o.length;
180
- for (let a = 0; a < i; a++)
181
- for (let l = 0; l < i; l++)
182
- a === 0 && l === 0 || // top-left
183
- a === 0 && l === i - 1 || // bottom-left
184
- a === i - 1 && l === 0 || n.push([o[a], o[l]]);
185
- return n;
186
- };
187
- })(rt);
188
- var it = {};
189
- const Ot = R.getSymbolSize, Je = 7;
190
- it.getPositions = function(e) {
191
- const r = Ot(e);
192
- return [
193
- // top-left
194
- [0, 0],
195
- // top-right
196
- [r - Je, 0],
197
- // bottom-left
198
- [0, r - Je]
199
- ];
200
- };
201
- var lt = {};
202
- (function(t) {
203
- t.Patterns = {
204
- PATTERN000: 0,
205
- PATTERN001: 1,
206
- PATTERN010: 2,
207
- PATTERN011: 3,
208
- PATTERN100: 4,
209
- PATTERN101: 5,
210
- PATTERN110: 6,
211
- PATTERN111: 7
212
- };
213
- const e = {
214
- N1: 3,
215
- N2: 3,
216
- N3: 40,
217
- N4: 10
218
- };
219
- t.isValid = function(n) {
220
- return n != null && n !== "" && !isNaN(n) && n >= 0 && n <= 7;
221
- }, t.from = function(n) {
222
- return t.isValid(n) ? parseInt(n, 10) : void 0;
223
- }, t.getPenaltyN1 = function(n) {
224
- const o = n.size;
225
- let i = 0, a = 0, l = 0, u = null, f = null;
226
- for (let E = 0; E < o; E++) {
227
- a = l = 0, u = f = null;
228
- for (let g = 0; g < o; g++) {
229
- let m = n.get(E, g);
230
- m === u ? a++ : (a >= 5 && (i += e.N1 + (a - 5)), u = m, a = 1), m = n.get(g, E), m === f ? l++ : (l >= 5 && (i += e.N1 + (l - 5)), f = m, l = 1);
231
- }
232
- a >= 5 && (i += e.N1 + (a - 5)), l >= 5 && (i += e.N1 + (l - 5));
233
- }
234
- return i;
235
- }, t.getPenaltyN2 = function(n) {
236
- const o = n.size;
237
- let i = 0;
238
- for (let a = 0; a < o - 1; a++)
239
- for (let l = 0; l < o - 1; l++) {
240
- const u = n.get(a, l) + n.get(a, l + 1) + n.get(a + 1, l) + n.get(a + 1, l + 1);
241
- (u === 4 || u === 0) && i++;
242
- }
243
- return i * e.N2;
244
- }, t.getPenaltyN3 = function(n) {
245
- const o = n.size;
246
- let i = 0, a = 0, l = 0;
247
- for (let u = 0; u < o; u++) {
248
- a = l = 0;
249
- for (let f = 0; f < o; f++)
250
- a = a << 1 & 2047 | n.get(u, f), f >= 10 && (a === 1488 || a === 93) && i++, l = l << 1 & 2047 | n.get(f, u), f >= 10 && (l === 1488 || l === 93) && i++;
251
- }
252
- return i * e.N3;
253
- }, t.getPenaltyN4 = function(n) {
254
- let o = 0;
255
- const i = n.data.length;
256
- for (let l = 0; l < i; l++) o += n.data[l];
257
- return Math.abs(Math.ceil(o * 100 / i / 5) - 10) * e.N4;
258
- };
259
- function r(s, n, o) {
260
- switch (s) {
261
- case t.Patterns.PATTERN000:
262
- return (n + o) % 2 === 0;
263
- case t.Patterns.PATTERN001:
264
- return n % 2 === 0;
265
- case t.Patterns.PATTERN010:
266
- return o % 3 === 0;
267
- case t.Patterns.PATTERN011:
268
- return (n + o) % 3 === 0;
269
- case t.Patterns.PATTERN100:
270
- return (Math.floor(n / 2) + Math.floor(o / 3)) % 2 === 0;
271
- case t.Patterns.PATTERN101:
272
- return n * o % 2 + n * o % 3 === 0;
273
- case t.Patterns.PATTERN110:
274
- return (n * o % 2 + n * o % 3) % 2 === 0;
275
- case t.Patterns.PATTERN111:
276
- return (n * o % 3 + (n + o) % 2) % 2 === 0;
277
- default:
278
- throw new Error("bad maskPattern:" + s);
279
- }
280
- }
281
- t.applyMask = function(n, o) {
282
- const i = o.size;
283
- for (let a = 0; a < i; a++)
284
- for (let l = 0; l < i; l++)
285
- o.isReserved(l, a) || o.xor(l, a, r(n, l, a));
286
- }, t.getBestMask = function(n, o) {
287
- const i = Object.keys(t.Patterns).length;
288
- let a = 0, l = 1 / 0;
289
- for (let u = 0; u < i; u++) {
290
- o(u), t.applyMask(u, n);
291
- const f = t.getPenaltyN1(n) + t.getPenaltyN2(n) + t.getPenaltyN3(n) + t.getPenaltyN4(n);
292
- t.applyMask(u, n), f < l && (l = f, a = u);
293
- }
294
- return a;
295
- };
296
- })(lt);
297
- var de = {};
298
- const z = ue, re = [
299
- // L M Q H
300
- 1,
301
- 1,
302
- 1,
303
- 1,
304
- 1,
305
- 1,
306
- 1,
307
- 1,
308
- 1,
309
- 1,
310
- 2,
311
- 2,
312
- 1,
313
- 2,
314
- 2,
315
- 4,
316
- 1,
317
- 2,
318
- 4,
319
- 4,
320
- 2,
321
- 4,
322
- 4,
323
- 4,
324
- 2,
325
- 4,
326
- 6,
327
- 5,
328
- 2,
329
- 4,
330
- 6,
331
- 6,
332
- 2,
333
- 5,
334
- 8,
335
- 8,
336
- 4,
337
- 5,
338
- 8,
339
- 8,
340
- 4,
341
- 5,
342
- 8,
343
- 11,
344
- 4,
345
- 8,
346
- 10,
347
- 11,
348
- 4,
349
- 9,
350
- 12,
351
- 16,
352
- 4,
353
- 9,
354
- 16,
355
- 16,
356
- 6,
357
- 10,
358
- 12,
359
- 18,
360
- 6,
361
- 10,
362
- 17,
363
- 16,
364
- 6,
365
- 11,
366
- 16,
367
- 19,
368
- 6,
369
- 13,
370
- 18,
371
- 21,
372
- 7,
373
- 14,
374
- 21,
375
- 25,
376
- 8,
377
- 16,
378
- 20,
379
- 25,
380
- 8,
381
- 17,
382
- 23,
383
- 25,
384
- 9,
385
- 17,
386
- 23,
387
- 34,
388
- 9,
389
- 18,
390
- 25,
391
- 30,
392
- 10,
393
- 20,
394
- 27,
395
- 32,
396
- 12,
397
- 21,
398
- 29,
399
- 35,
400
- 12,
401
- 23,
402
- 34,
403
- 37,
404
- 12,
405
- 25,
406
- 34,
407
- 40,
408
- 13,
409
- 26,
410
- 35,
411
- 42,
412
- 14,
413
- 28,
414
- 38,
415
- 45,
416
- 15,
417
- 29,
418
- 40,
419
- 48,
420
- 16,
421
- 31,
422
- 43,
423
- 51,
424
- 17,
425
- 33,
426
- 45,
427
- 54,
428
- 18,
429
- 35,
430
- 48,
431
- 57,
432
- 19,
433
- 37,
434
- 51,
435
- 60,
436
- 19,
437
- 38,
438
- 53,
439
- 63,
440
- 20,
441
- 40,
442
- 56,
443
- 66,
444
- 21,
445
- 43,
446
- 59,
447
- 70,
448
- 22,
449
- 45,
450
- 62,
451
- 74,
452
- 24,
453
- 47,
454
- 65,
455
- 77,
456
- 25,
457
- 49,
458
- 68,
459
- 81
460
- ], ie = [
461
- // L M Q H
462
- 7,
463
- 10,
464
- 13,
465
- 17,
466
- 10,
467
- 16,
468
- 22,
469
- 28,
470
- 15,
471
- 26,
472
- 36,
473
- 44,
474
- 20,
475
- 36,
476
- 52,
477
- 64,
478
- 26,
479
- 48,
480
- 72,
481
- 88,
482
- 36,
483
- 64,
484
- 96,
485
- 112,
486
- 40,
487
- 72,
488
- 108,
489
- 130,
490
- 48,
491
- 88,
492
- 132,
493
- 156,
494
- 60,
495
- 110,
496
- 160,
497
- 192,
498
- 72,
499
- 130,
500
- 192,
501
- 224,
502
- 80,
503
- 150,
504
- 224,
505
- 264,
506
- 96,
507
- 176,
508
- 260,
509
- 308,
510
- 104,
511
- 198,
512
- 288,
513
- 352,
514
- 120,
515
- 216,
516
- 320,
517
- 384,
518
- 132,
519
- 240,
520
- 360,
521
- 432,
522
- 144,
523
- 280,
524
- 408,
525
- 480,
526
- 168,
527
- 308,
528
- 448,
529
- 532,
530
- 180,
531
- 338,
532
- 504,
533
- 588,
534
- 196,
535
- 364,
536
- 546,
537
- 650,
538
- 224,
539
- 416,
540
- 600,
541
- 700,
542
- 224,
543
- 442,
544
- 644,
545
- 750,
546
- 252,
547
- 476,
548
- 690,
549
- 816,
550
- 270,
551
- 504,
552
- 750,
553
- 900,
554
- 300,
555
- 560,
556
- 810,
557
- 960,
558
- 312,
559
- 588,
560
- 870,
561
- 1050,
562
- 336,
563
- 644,
564
- 952,
565
- 1110,
566
- 360,
567
- 700,
568
- 1020,
569
- 1200,
570
- 390,
571
- 728,
572
- 1050,
573
- 1260,
574
- 420,
575
- 784,
576
- 1140,
577
- 1350,
578
- 450,
579
- 812,
580
- 1200,
581
- 1440,
582
- 480,
583
- 868,
584
- 1290,
585
- 1530,
586
- 510,
587
- 924,
588
- 1350,
589
- 1620,
590
- 540,
591
- 980,
592
- 1440,
593
- 1710,
594
- 570,
595
- 1036,
596
- 1530,
597
- 1800,
598
- 570,
599
- 1064,
600
- 1590,
601
- 1890,
602
- 600,
603
- 1120,
604
- 1680,
605
- 1980,
606
- 630,
607
- 1204,
608
- 1770,
609
- 2100,
610
- 660,
611
- 1260,
612
- 1860,
613
- 2220,
614
- 720,
615
- 1316,
616
- 1950,
617
- 2310,
618
- 750,
619
- 1372,
620
- 2040,
621
- 2430
622
- ];
623
- de.getBlocksCount = function(e, r) {
624
- switch (r) {
625
- case z.L:
626
- return re[(e - 1) * 4 + 0];
627
- case z.M:
628
- return re[(e - 1) * 4 + 1];
629
- case z.Q:
630
- return re[(e - 1) * 4 + 2];
631
- case z.H:
632
- return re[(e - 1) * 4 + 3];
633
- default:
634
- return;
635
- }
636
- };
637
- de.getTotalCodewordsCount = function(e, r) {
638
- switch (r) {
639
- case z.L:
640
- return ie[(e - 1) * 4 + 0];
641
- case z.M:
642
- return ie[(e - 1) * 4 + 1];
643
- case z.Q:
644
- return ie[(e - 1) * 4 + 2];
645
- case z.H:
646
- return ie[(e - 1) * 4 + 3];
647
- default:
648
- return;
649
- }
650
- };
651
- var at = {}, fe = {};
652
- const W = new Uint8Array(512), ae = new Uint8Array(256);
653
- (function() {
654
- let e = 1;
655
- for (let r = 0; r < 255; r++)
656
- W[r] = e, ae[e] = r, e <<= 1, e & 256 && (e ^= 285);
657
- for (let r = 255; r < 512; r++)
658
- W[r] = W[r - 255];
659
- })();
660
- fe.log = function(e) {
661
- if (e < 1) throw new Error("log(" + e + ")");
662
- return ae[e];
663
- };
664
- fe.exp = function(e) {
665
- return W[e];
666
- };
667
- fe.mul = function(e, r) {
668
- return e === 0 || r === 0 ? 0 : W[ae[e] + ae[r]];
669
- };
670
- (function(t) {
671
- const e = fe;
672
- t.mul = function(s, n) {
673
- const o = new Uint8Array(s.length + n.length - 1);
674
- for (let i = 0; i < s.length; i++)
675
- for (let a = 0; a < n.length; a++)
676
- o[i + a] ^= e.mul(s[i], n[a]);
677
- return o;
678
- }, t.mod = function(s, n) {
679
- let o = new Uint8Array(s);
680
- for (; o.length - n.length >= 0; ) {
681
- const i = o[0];
682
- for (let l = 0; l < n.length; l++)
683
- o[l] ^= e.mul(n[l], i);
684
- let a = 0;
685
- for (; a < o.length && o[a] === 0; ) a++;
686
- o = o.slice(a);
687
- }
688
- return o;
689
- }, t.generateECPolynomial = function(s) {
690
- let n = new Uint8Array([1]);
691
- for (let o = 0; o < s; o++)
692
- n = t.mul(n, new Uint8Array([1, e.exp(o)]));
693
- return n;
694
- };
695
- })(at);
696
- const ct = at;
697
- function Ue(t) {
698
- this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
699
- }
700
- Ue.prototype.initialize = function(e) {
701
- this.degree = e, this.genPoly = ct.generateECPolynomial(this.degree);
702
- };
703
- Ue.prototype.encode = function(e) {
704
- if (!this.genPoly)
705
- throw new Error("Encoder not initialized");
706
- const r = new Uint8Array(e.length + this.degree);
707
- r.set(e);
708
- const s = ct.mod(r, this.genPoly), n = this.degree - s.length;
709
- if (n > 0) {
710
- const o = new Uint8Array(this.degree);
711
- return o.set(s, n), o;
712
- }
713
- return s;
714
- };
715
- var Kt = Ue, ut = {}, H = {}, Le = {};
716
- Le.isValid = function(e) {
717
- return !isNaN(e) && e >= 1 && e <= 40;
718
- };
719
- var D = {};
720
- const dt = "[0-9]+", Yt = "[A-Z $%*+\\-./:]+";
721
- let Z = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
722
- Z = Z.replace(/u/g, "\\u");
723
- const jt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Z + `)(?:.|[\r
724
- ]))+`;
725
- D.KANJI = new RegExp(Z, "g");
726
- D.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
727
- D.BYTE = new RegExp(jt, "g");
728
- D.NUMERIC = new RegExp(dt, "g");
729
- D.ALPHANUMERIC = new RegExp(Yt, "g");
730
- const Jt = new RegExp("^" + Z + "$"), qt = new RegExp("^" + dt + "$"), Gt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
731
- D.testKanji = function(e) {
732
- return Jt.test(e);
733
- };
734
- D.testNumeric = function(e) {
735
- return qt.test(e);
736
- };
737
- D.testAlphanumeric = function(e) {
738
- return Gt.test(e);
739
- };
740
- (function(t) {
741
- const e = Le, r = D;
742
- t.NUMERIC = {
743
- id: "Numeric",
744
- bit: 1,
745
- ccBits: [10, 12, 14]
746
- }, t.ALPHANUMERIC = {
747
- id: "Alphanumeric",
748
- bit: 2,
749
- ccBits: [9, 11, 13]
750
- }, t.BYTE = {
751
- id: "Byte",
752
- bit: 4,
753
- ccBits: [8, 16, 16]
754
- }, t.KANJI = {
755
- id: "Kanji",
756
- bit: 8,
757
- ccBits: [8, 10, 12]
758
- }, t.MIXED = {
759
- bit: -1
760
- }, t.getCharCountIndicator = function(o, i) {
761
- if (!o.ccBits) throw new Error("Invalid mode: " + o);
762
- if (!e.isValid(i))
763
- throw new Error("Invalid version: " + i);
764
- return i >= 1 && i < 10 ? o.ccBits[0] : i < 27 ? o.ccBits[1] : o.ccBits[2];
765
- }, t.getBestModeForData = function(o) {
766
- return r.testNumeric(o) ? t.NUMERIC : r.testAlphanumeric(o) ? t.ALPHANUMERIC : r.testKanji(o) ? t.KANJI : t.BYTE;
767
- }, t.toString = function(o) {
768
- if (o && o.id) return o.id;
769
- throw new Error("Invalid mode");
770
- }, t.isValid = function(o) {
771
- return o && o.bit && o.ccBits;
772
- };
773
- function s(n) {
774
- if (typeof n != "string")
775
- throw new Error("Param is not a string");
776
- switch (n.toLowerCase()) {
777
- case "numeric":
778
- return t.NUMERIC;
779
- case "alphanumeric":
780
- return t.ALPHANUMERIC;
781
- case "kanji":
782
- return t.KANJI;
783
- case "byte":
784
- return t.BYTE;
785
- default:
786
- throw new Error("Unknown mode: " + n);
787
- }
788
- }
789
- t.from = function(o, i) {
790
- if (t.isValid(o))
791
- return o;
792
- try {
793
- return s(o);
794
- } catch {
795
- return i;
796
- }
797
- };
798
- })(H);
799
- (function(t) {
800
- const e = R, r = de, s = ue, n = H, o = Le, i = 7973, a = e.getBCHDigit(i);
801
- function l(g, m, b) {
802
- for (let _ = 1; _ <= 40; _++)
803
- if (m <= t.getCapacity(_, b, g))
804
- return _;
805
- }
806
- function u(g, m) {
807
- return n.getCharCountIndicator(g, m) + 4;
808
- }
809
- function f(g, m) {
810
- let b = 0;
811
- return g.forEach(function(_) {
812
- const I = u(_.mode, m);
813
- b += I + _.getBitsLength();
814
- }), b;
815
- }
816
- function E(g, m) {
817
- for (let b = 1; b <= 40; b++)
818
- if (f(g, b) <= t.getCapacity(b, m, n.MIXED))
819
- return b;
820
- }
821
- t.from = function(m, b) {
822
- return o.isValid(m) ? parseInt(m, 10) : b;
823
- }, t.getCapacity = function(m, b, _) {
824
- if (!o.isValid(m))
825
- throw new Error("Invalid QR Code version");
826
- typeof _ > "u" && (_ = n.BYTE);
827
- const I = e.getSymbolTotalCodewords(m), d = r.getTotalCodewordsCount(m, b), C = (I - d) * 8;
828
- if (_ === n.MIXED) return C;
829
- const w = C - u(_, m);
830
- switch (_) {
831
- case n.NUMERIC:
832
- return Math.floor(w / 10 * 3);
833
- case n.ALPHANUMERIC:
834
- return Math.floor(w / 11 * 2);
835
- case n.KANJI:
836
- return Math.floor(w / 13);
837
- case n.BYTE:
838
- default:
839
- return Math.floor(w / 8);
840
- }
841
- }, t.getBestVersionForData = function(m, b) {
842
- let _;
843
- const I = s.from(b, s.M);
844
- if (Array.isArray(m)) {
845
- if (m.length > 1)
846
- return E(m, I);
847
- if (m.length === 0)
848
- return 1;
849
- _ = m[0];
850
- } else
851
- _ = m;
852
- return l(_.mode, _.getLength(), I);
853
- }, t.getEncodedBits = function(m) {
854
- if (!o.isValid(m) || m < 7)
855
- throw new Error("Invalid QR Code version");
856
- let b = m << 12;
857
- for (; e.getBCHDigit(b) - a >= 0; )
858
- b ^= i << e.getBCHDigit(b) - a;
859
- return m << 12 | b;
860
- };
861
- })(ut);
862
- var ft = {};
863
- const Pe = R, mt = 1335, Qt = 21522, qe = Pe.getBCHDigit(mt);
864
- ft.getEncodedBits = function(e, r) {
865
- const s = e.bit << 3 | r;
866
- let n = s << 10;
867
- for (; Pe.getBCHDigit(n) - qe >= 0; )
868
- n ^= mt << Pe.getBCHDigit(n) - qe;
869
- return (s << 10 | n) ^ Qt;
870
- };
871
- var gt = {};
872
- const Xt = H;
873
- function j(t) {
874
- this.mode = Xt.NUMERIC, this.data = t.toString();
875
- }
876
- j.getBitsLength = function(e) {
877
- return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
878
- };
879
- j.prototype.getLength = function() {
880
- return this.data.length;
881
- };
882
- j.prototype.getBitsLength = function() {
883
- return j.getBitsLength(this.data.length);
884
- };
885
- j.prototype.write = function(e) {
886
- let r, s, n;
887
- for (r = 0; r + 3 <= this.data.length; r += 3)
888
- s = this.data.substr(r, 3), n = parseInt(s, 10), e.put(n, 10);
889
- const o = this.data.length - r;
890
- o > 0 && (s = this.data.substr(r), n = parseInt(s, 10), e.put(n, o * 3 + 1));
891
- };
892
- var Wt = j;
893
- const Zt = H, be = [
894
- "0",
895
- "1",
896
- "2",
897
- "3",
898
- "4",
899
- "5",
900
- "6",
901
- "7",
902
- "8",
903
- "9",
904
- "A",
905
- "B",
906
- "C",
907
- "D",
908
- "E",
909
- "F",
910
- "G",
911
- "H",
912
- "I",
913
- "J",
914
- "K",
915
- "L",
916
- "M",
917
- "N",
918
- "O",
919
- "P",
920
- "Q",
921
- "R",
922
- "S",
923
- "T",
924
- "U",
925
- "V",
926
- "W",
927
- "X",
928
- "Y",
929
- "Z",
930
- " ",
931
- "$",
932
- "%",
933
- "*",
934
- "+",
935
- "-",
936
- ".",
937
- "/",
938
- ":"
939
- ];
940
- function J(t) {
941
- this.mode = Zt.ALPHANUMERIC, this.data = t;
942
- }
943
- J.getBitsLength = function(e) {
944
- return 11 * Math.floor(e / 2) + 6 * (e % 2);
945
- };
946
- J.prototype.getLength = function() {
947
- return this.data.length;
948
- };
949
- J.prototype.getBitsLength = function() {
950
- return J.getBitsLength(this.data.length);
951
- };
952
- J.prototype.write = function(e) {
953
- let r;
954
- for (r = 0; r + 2 <= this.data.length; r += 2) {
955
- let s = be.indexOf(this.data[r]) * 45;
956
- s += be.indexOf(this.data[r + 1]), e.put(s, 11);
957
- }
958
- this.data.length % 2 && e.put(be.indexOf(this.data[r]), 6);
959
- };
960
- var en = J, tn = function(e) {
961
- for (var r = [], s = e.length, n = 0; n < s; n++) {
962
- var o = e.charCodeAt(n);
963
- if (o >= 55296 && o <= 56319 && s > n + 1) {
964
- var i = e.charCodeAt(n + 1);
965
- i >= 56320 && i <= 57343 && (o = (o - 55296) * 1024 + i - 56320 + 65536, n += 1);
966
- }
967
- if (o < 128) {
968
- r.push(o);
969
- continue;
970
- }
971
- if (o < 2048) {
972
- r.push(o >> 6 | 192), r.push(o & 63 | 128);
973
- continue;
974
- }
975
- if (o < 55296 || o >= 57344 && o < 65536) {
976
- r.push(o >> 12 | 224), r.push(o >> 6 & 63 | 128), r.push(o & 63 | 128);
977
- continue;
978
- }
979
- if (o >= 65536 && o <= 1114111) {
980
- r.push(o >> 18 | 240), r.push(o >> 12 & 63 | 128), r.push(o >> 6 & 63 | 128), r.push(o & 63 | 128);
981
- continue;
982
- }
983
- r.push(239, 191, 189);
984
- }
985
- return new Uint8Array(r).buffer;
986
- };
987
- const nn = tn, on = H;
988
- function q(t) {
989
- this.mode = on.BYTE, typeof t == "string" && (t = nn(t)), this.data = new Uint8Array(t);
990
- }
991
- q.getBitsLength = function(e) {
992
- return e * 8;
993
- };
994
- q.prototype.getLength = function() {
995
- return this.data.length;
996
- };
997
- q.prototype.getBitsLength = function() {
998
- return q.getBitsLength(this.data.length);
999
- };
1000
- q.prototype.write = function(t) {
1001
- for (let e = 0, r = this.data.length; e < r; e++)
1002
- t.put(this.data[e], 8);
1003
- };
1004
- var sn = q;
1005
- const rn = H, ln = R;
1006
- function G(t) {
1007
- this.mode = rn.KANJI, this.data = t;
1008
- }
1009
- G.getBitsLength = function(e) {
1010
- return e * 13;
1011
- };
1012
- G.prototype.getLength = function() {
1013
- return this.data.length;
1014
- };
1015
- G.prototype.getBitsLength = function() {
1016
- return G.getBitsLength(this.data.length);
1017
- };
1018
- G.prototype.write = function(t) {
1019
- let e;
1020
- for (e = 0; e < this.data.length; e++) {
1021
- let r = ln.toSJIS(this.data[e]);
1022
- if (r >= 33088 && r <= 40956)
1023
- r -= 33088;
1024
- else if (r >= 57408 && r <= 60351)
1025
- r -= 49472;
1026
- else
1027
- throw new Error(
1028
- "Invalid SJIS character: " + this.data[e] + `
1029
- Make sure your charset is UTF-8`
1030
- );
1031
- r = (r >>> 8 & 255) * 192 + (r & 255), t.put(r, 13);
1032
- }
1033
- };
1034
- var an = G, ht = { exports: {} };
1035
- (function(t) {
1036
- var e = {
1037
- single_source_shortest_paths: function(r, s, n) {
1038
- var o = {}, i = {};
1039
- i[s] = 0;
1040
- var a = e.PriorityQueue.make();
1041
- a.push(s, 0);
1042
- for (var l, u, f, E, g, m, b, _, I; !a.empty(); ) {
1043
- l = a.pop(), u = l.value, E = l.cost, g = r[u] || {};
1044
- for (f in g)
1045
- g.hasOwnProperty(f) && (m = g[f], b = E + m, _ = i[f], I = typeof i[f] > "u", (I || _ > b) && (i[f] = b, a.push(f, b), o[f] = u));
1046
- }
1047
- if (typeof n < "u" && typeof i[n] > "u") {
1048
- var d = ["Could not find a path from ", s, " to ", n, "."].join("");
1049
- throw new Error(d);
1050
- }
1051
- return o;
1052
- },
1053
- extract_shortest_path_from_predecessor_list: function(r, s) {
1054
- for (var n = [], o = s; o; )
1055
- n.push(o), r[o], o = r[o];
1056
- return n.reverse(), n;
1057
- },
1058
- find_path: function(r, s, n) {
1059
- var o = e.single_source_shortest_paths(r, s, n);
1060
- return e.extract_shortest_path_from_predecessor_list(
1061
- o,
1062
- n
1063
- );
1064
- },
1065
- /**
1066
- * A very naive priority queue implementation.
1067
- */
1068
- PriorityQueue: {
1069
- make: function(r) {
1070
- var s = e.PriorityQueue, n = {}, o;
1071
- r = r || {};
1072
- for (o in s)
1073
- s.hasOwnProperty(o) && (n[o] = s[o]);
1074
- return n.queue = [], n.sorter = r.sorter || s.default_sorter, n;
1075
- },
1076
- default_sorter: function(r, s) {
1077
- return r.cost - s.cost;
1078
- },
1079
- /**
1080
- * Add a new item to the queue and ensure the highest priority element
1081
- * is at the front of the queue.
1082
- */
1083
- push: function(r, s) {
1084
- var n = { value: r, cost: s };
1085
- this.queue.push(n), this.queue.sort(this.sorter);
1086
- },
1087
- /**
1088
- * Return the highest priority element in the queue.
1089
- */
1090
- pop: function() {
1091
- return this.queue.shift();
1092
- },
1093
- empty: function() {
1094
- return this.queue.length === 0;
1095
- }
1096
- }
1097
- };
1098
- t.exports = e;
1099
- })(ht);
1100
- var cn = ht.exports;
1101
- (function(t) {
1102
- const e = H, r = Wt, s = en, n = sn, o = an, i = D, a = R, l = cn;
1103
- function u(d) {
1104
- return unescape(encodeURIComponent(d)).length;
1105
- }
1106
- function f(d, C, w) {
1107
- const y = [];
1108
- let P;
1109
- for (; (P = d.exec(w)) !== null; )
1110
- y.push({
1111
- data: P[0],
1112
- index: P.index,
1113
- mode: C,
1114
- length: P[0].length
1115
- });
1116
- return y;
1117
- }
1118
- function E(d) {
1119
- const C = f(i.NUMERIC, e.NUMERIC, d), w = f(i.ALPHANUMERIC, e.ALPHANUMERIC, d);
1120
- let y, P;
1121
- return a.isKanjiModeEnabled() ? (y = f(i.BYTE, e.BYTE, d), P = f(i.KANJI, e.KANJI, d)) : (y = f(i.BYTE_KANJI, e.BYTE, d), P = []), C.concat(w, y, P).sort(function(T, U) {
1122
- return T.index - U.index;
1123
- }).map(function(T) {
1124
- return {
1125
- data: T.data,
1126
- mode: T.mode,
1127
- length: T.length
1128
- };
1129
- });
1130
- }
1131
- function g(d, C) {
1132
- switch (C) {
1133
- case e.NUMERIC:
1134
- return r.getBitsLength(d);
1135
- case e.ALPHANUMERIC:
1136
- return s.getBitsLength(d);
1137
- case e.KANJI:
1138
- return o.getBitsLength(d);
1139
- case e.BYTE:
1140
- return n.getBitsLength(d);
1141
- }
1142
- }
1143
- function m(d) {
1144
- return d.reduce(function(C, w) {
1145
- const y = C.length - 1 >= 0 ? C[C.length - 1] : null;
1146
- return y && y.mode === w.mode ? (C[C.length - 1].data += w.data, C) : (C.push(w), C);
1147
- }, []);
1148
- }
1149
- function b(d) {
1150
- const C = [];
1151
- for (let w = 0; w < d.length; w++) {
1152
- const y = d[w];
1153
- switch (y.mode) {
1154
- case e.NUMERIC:
1155
- C.push([
1156
- y,
1157
- { data: y.data, mode: e.ALPHANUMERIC, length: y.length },
1158
- { data: y.data, mode: e.BYTE, length: y.length }
1159
- ]);
1160
- break;
1161
- case e.ALPHANUMERIC:
1162
- C.push([
1163
- y,
1164
- { data: y.data, mode: e.BYTE, length: y.length }
1165
- ]);
1166
- break;
1167
- case e.KANJI:
1168
- C.push([
1169
- y,
1170
- { data: y.data, mode: e.BYTE, length: u(y.data) }
1171
- ]);
1172
- break;
1173
- case e.BYTE:
1174
- C.push([
1175
- { data: y.data, mode: e.BYTE, length: u(y.data) }
1176
- ]);
1177
- }
1178
- }
1179
- return C;
1180
- }
1181
- function _(d, C) {
1182
- const w = {}, y = { start: {} };
1183
- let P = ["start"];
1184
- for (let M = 0; M < d.length; M++) {
1185
- const T = d[M], U = [];
1186
- for (let k = 0; k < T.length; k++) {
1187
- const A = T[k], p = "" + M + k;
1188
- U.push(p), w[p] = { node: A, lastCount: 0 }, y[p] = {};
1189
- for (let V = 0; V < P.length; V++) {
1190
- const N = P[V];
1191
- w[N] && w[N].node.mode === A.mode ? (y[N][p] = g(w[N].lastCount + A.length, A.mode) - g(w[N].lastCount, A.mode), w[N].lastCount += A.length) : (w[N] && (w[N].lastCount = A.length), y[N][p] = g(A.length, A.mode) + 4 + e.getCharCountIndicator(A.mode, C));
1192
- }
1193
- }
1194
- P = U;
1195
- }
1196
- for (let M = 0; M < P.length; M++)
1197
- y[P[M]].end = 0;
1198
- return { map: y, table: w };
1199
- }
1200
- function I(d, C) {
1201
- let w;
1202
- const y = e.getBestModeForData(d);
1203
- if (w = e.from(C, y), w !== e.BYTE && w.bit < y.bit)
1204
- throw new Error('"' + d + '" cannot be encoded with mode ' + e.toString(w) + `.
1205
- Suggested mode is: ` + e.toString(y));
1206
- switch (w === e.KANJI && !a.isKanjiModeEnabled() && (w = e.BYTE), w) {
1207
- case e.NUMERIC:
1208
- return new r(d);
1209
- case e.ALPHANUMERIC:
1210
- return new s(d);
1211
- case e.KANJI:
1212
- return new o(d);
1213
- case e.BYTE:
1214
- return new n(d);
1215
- }
1216
- }
1217
- t.fromArray = function(C) {
1218
- return C.reduce(function(w, y) {
1219
- return typeof y == "string" ? w.push(I(y, null)) : y.data && w.push(I(y.data, y.mode)), w;
1220
- }, []);
1221
- }, t.fromString = function(C, w) {
1222
- const y = E(C, a.isKanjiModeEnabled()), P = b(y), M = _(P, w), T = l.find_path(M.map, "start", "end"), U = [];
1223
- for (let k = 1; k < T.length - 1; k++)
1224
- U.push(M.table[T[k]].node);
1225
- return t.fromArray(m(U));
1226
- }, t.rawSplit = function(C) {
1227
- return t.fromArray(
1228
- E(C, a.isKanjiModeEnabled())
1229
- );
1230
- };
1231
- })(gt);
1232
- const me = R, ve = ue, un = zt, dn = Ht, fn = rt, mn = it, Se = lt, Ie = de, gn = Kt, ce = ut, hn = ft, pn = H, Ce = gt;
1233
- function yn(t, e) {
1234
- const r = t.size, s = mn.getPositions(e);
1235
- for (let n = 0; n < s.length; n++) {
1236
- const o = s[n][0], i = s[n][1];
1237
- for (let a = -1; a <= 7; a++)
1238
- if (!(o + a <= -1 || r <= o + a))
1239
- for (let l = -1; l <= 7; l++)
1240
- i + l <= -1 || r <= i + l || (a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 2 && a <= 4 && l >= 2 && l <= 4 ? t.set(o + a, i + l, !0, !0) : t.set(o + a, i + l, !1, !0));
1241
- }
1242
- }
1243
- function wn(t) {
1244
- const e = t.size;
1245
- for (let r = 8; r < e - 8; r++) {
1246
- const s = r % 2 === 0;
1247
- t.set(r, 6, s, !0), t.set(6, r, s, !0);
1248
- }
1249
- }
1250
- function bn(t, e) {
1251
- const r = fn.getPositions(e);
1252
- for (let s = 0; s < r.length; s++) {
1253
- const n = r[s][0], o = r[s][1];
1254
- for (let i = -2; i <= 2; i++)
1255
- for (let a = -2; a <= 2; a++)
1256
- i === -2 || i === 2 || a === -2 || a === 2 || i === 0 && a === 0 ? t.set(n + i, o + a, !0, !0) : t.set(n + i, o + a, !1, !0);
1257
- }
1258
- }
1259
- function vn(t, e) {
1260
- const r = t.size, s = ce.getEncodedBits(e);
1261
- let n, o, i;
1262
- for (let a = 0; a < 18; a++)
1263
- n = Math.floor(a / 3), o = a % 3 + r - 8 - 3, i = (s >> a & 1) === 1, t.set(n, o, i, !0), t.set(o, n, i, !0);
1264
- }
1265
- function _e(t, e, r) {
1266
- const s = t.size, n = hn.getEncodedBits(e, r);
1267
- let o, i;
1268
- for (o = 0; o < 15; o++)
1269
- i = (n >> o & 1) === 1, o < 6 ? t.set(o, 8, i, !0) : o < 8 ? t.set(o + 1, 8, i, !0) : t.set(s - 15 + o, 8, i, !0), o < 8 ? t.set(8, s - o - 1, i, !0) : o < 9 ? t.set(8, 15 - o - 1 + 1, i, !0) : t.set(8, 15 - o - 1, i, !0);
1270
- t.set(s - 8, 8, 1, !0);
1271
- }
1272
- function Cn(t, e) {
1273
- const r = t.size;
1274
- let s = -1, n = r - 1, o = 7, i = 0;
1275
- for (let a = r - 1; a > 0; a -= 2)
1276
- for (a === 6 && a--; ; ) {
1277
- for (let l = 0; l < 2; l++)
1278
- if (!t.isReserved(n, a - l)) {
1279
- let u = !1;
1280
- i < e.length && (u = (e[i] >>> o & 1) === 1), t.set(n, a - l, u), o--, o === -1 && (i++, o = 7);
1281
- }
1282
- if (n += s, n < 0 || r <= n) {
1283
- n -= s, s = -s;
1284
- break;
1285
- }
1286
- }
1287
- }
1288
- function _n(t, e, r) {
1289
- const s = new un();
1290
- r.forEach(function(l) {
1291
- s.put(l.mode.bit, 4), s.put(l.getLength(), pn.getCharCountIndicator(l.mode, t)), l.write(s);
1292
- });
1293
- const n = me.getSymbolTotalCodewords(t), o = Ie.getTotalCodewordsCount(t, e), i = (n - o) * 8;
1294
- for (s.getLengthInBits() + 4 <= i && s.put(0, 4); s.getLengthInBits() % 8 !== 0; )
1295
- s.putBit(0);
1296
- const a = (i - s.getLengthInBits()) / 8;
1297
- for (let l = 0; l < a; l++)
1298
- s.put(l % 2 ? 17 : 236, 8);
1299
- return En(s, t, e);
1300
- }
1301
- function En(t, e, r) {
1302
- const s = me.getSymbolTotalCodewords(e), n = Ie.getTotalCodewordsCount(e, r), o = s - n, i = Ie.getBlocksCount(e, r), a = s % i, l = i - a, u = Math.floor(s / i), f = Math.floor(o / i), E = f + 1, g = u - f, m = new gn(g);
1303
- let b = 0;
1304
- const _ = new Array(i), I = new Array(i);
1305
- let d = 0;
1306
- const C = new Uint8Array(t.buffer);
1307
- for (let T = 0; T < i; T++) {
1308
- const U = T < l ? f : E;
1309
- _[T] = C.slice(b, b + U), I[T] = m.encode(_[T]), b += U, d = Math.max(d, U);
1310
- }
1311
- const w = new Uint8Array(s);
1312
- let y = 0, P, M;
1313
- for (P = 0; P < d; P++)
1314
- for (M = 0; M < i; M++)
1315
- P < _[M].length && (w[y++] = _[M][P]);
1316
- for (P = 0; P < g; P++)
1317
- for (M = 0; M < i; M++)
1318
- w[y++] = I[M][P];
1319
- return w;
1320
- }
1321
- function An(t, e, r, s) {
1322
- let n;
1323
- if (Array.isArray(t))
1324
- n = Ce.fromArray(t);
1325
- else if (typeof t == "string") {
1326
- let u = e;
1327
- if (!u) {
1328
- const f = Ce.rawSplit(t);
1329
- u = ce.getBestVersionForData(f, r);
1330
- }
1331
- n = Ce.fromString(t, u || 40);
1332
- } else
1333
- throw new Error("Invalid data");
1334
- const o = ce.getBestVersionForData(n, r);
1335
- if (!o)
1336
- throw new Error("The amount of data is too big to be stored in a QR Code");
1337
- if (!e)
1338
- e = o;
1339
- else if (e < o)
1340
- throw new Error(
1341
- `
1342
- The chosen QR Code version cannot contain this amount of data.
1343
- Minimum version required to store current data is: ` + o + `.
1344
- `
1345
- );
1346
- const i = _n(e, r, n), a = me.getSymbolSize(e), l = new dn(a);
1347
- return yn(l, e), wn(l), bn(l, e), _e(l, r, 0), e >= 7 && vn(l, e), Cn(l, i), isNaN(s) && (s = Se.getBestMask(
1348
- l,
1349
- _e.bind(null, l, r)
1350
- )), Se.applyMask(s, l), _e(l, r, s), {
1351
- modules: l,
1352
- version: e,
1353
- errorCorrectionLevel: r,
1354
- maskPattern: s,
1355
- segments: n
1356
- };
1357
- }
1358
- ot.create = function(e, r) {
1359
- if (typeof e > "u" || e === "")
1360
- throw new Error("No input text");
1361
- let s = ve.M, n, o;
1362
- return typeof r < "u" && (s = ve.from(r.errorCorrectionLevel, ve.M), n = ce.from(r.version), o = Se.from(r.maskPattern), r.toSJISFunc && me.setToSJISFunction(r.toSJISFunc)), An(e, n, s, o);
1363
- };
1364
- var pt = {}, Re = {};
1365
- (function(t) {
1366
- function e(r) {
1367
- if (typeof r == "number" && (r = r.toString()), typeof r != "string")
1368
- throw new Error("Color should be defined as hex string");
1369
- let s = r.slice().replace("#", "").split("");
1370
- if (s.length < 3 || s.length === 5 || s.length > 8)
1371
- throw new Error("Invalid hex color: " + r);
1372
- (s.length === 3 || s.length === 4) && (s = Array.prototype.concat.apply([], s.map(function(o) {
1373
- return [o, o];
1374
- }))), s.length === 6 && s.push("F", "F");
1375
- const n = parseInt(s.join(""), 16);
1376
- return {
1377
- r: n >> 24 & 255,
1378
- g: n >> 16 & 255,
1379
- b: n >> 8 & 255,
1380
- a: n & 255,
1381
- hex: "#" + s.slice(0, 6).join("")
1382
- };
1383
- }
1384
- t.getOptions = function(s) {
1385
- s || (s = {}), s.color || (s.color = {});
1386
- const n = typeof s.margin > "u" || s.margin === null || s.margin < 0 ? 4 : s.margin, o = s.width && s.width >= 21 ? s.width : void 0, i = s.scale || 4;
1387
- return {
1388
- width: o,
1389
- scale: o ? 4 : i,
1390
- margin: n,
1391
- color: {
1392
- dark: e(s.color.dark || "#000000ff"),
1393
- light: e(s.color.light || "#ffffffff")
1394
- },
1395
- type: s.type,
1396
- rendererOpts: s.rendererOpts || {}
1397
- };
1398
- }, t.getScale = function(s, n) {
1399
- return n.width && n.width >= s + n.margin * 2 ? n.width / (s + n.margin * 2) : n.scale;
1400
- }, t.getImageWidth = function(s, n) {
1401
- const o = t.getScale(s, n);
1402
- return Math.floor((s + n.margin * 2) * o);
1403
- }, t.qrToImageData = function(s, n, o) {
1404
- const i = n.modules.size, a = n.modules.data, l = t.getScale(i, o), u = Math.floor((i + o.margin * 2) * l), f = o.margin * l, E = [o.color.light, o.color.dark];
1405
- for (let g = 0; g < u; g++)
1406
- for (let m = 0; m < u; m++) {
1407
- let b = (g * u + m) * 4, _ = o.color.light;
1408
- if (g >= f && m >= f && g < u - f && m < u - f) {
1409
- const I = Math.floor((g - f) / l), d = Math.floor((m - f) / l);
1410
- _ = E[a[I * i + d] ? 1 : 0];
1411
- }
1412
- s[b++] = _.r, s[b++] = _.g, s[b++] = _.b, s[b] = _.a;
1413
- }
1414
- };
1415
- })(Re);
1416
- (function(t) {
1417
- const e = Re;
1418
- function r(n, o, i) {
1419
- n.clearRect(0, 0, o.width, o.height), o.style || (o.style = {}), o.height = i, o.width = i, o.style.height = i + "px", o.style.width = i + "px";
1420
- }
1421
- function s() {
1422
- try {
1423
- return document.createElement("canvas");
1424
- } catch {
1425
- throw new Error("You need to specify a canvas element");
1426
- }
1427
- }
1428
- t.render = function(o, i, a) {
1429
- let l = a, u = i;
1430
- typeof l > "u" && (!i || !i.getContext) && (l = i, i = void 0), i || (u = s()), l = e.getOptions(l);
1431
- const f = e.getImageWidth(o.modules.size, l), E = u.getContext("2d"), g = E.createImageData(f, f);
1432
- return e.qrToImageData(g.data, o, l), r(E, u, f), E.putImageData(g, 0, 0), u;
1433
- }, t.renderToDataURL = function(o, i, a) {
1434
- let l = a;
1435
- typeof l > "u" && (!i || !i.getContext) && (l = i, i = void 0), l || (l = {});
1436
- const u = t.render(o, i, l), f = l.type || "image/png", E = l.rendererOpts || {};
1437
- return u.toDataURL(f, E.quality);
1438
- };
1439
- })(pt);
1440
- var yt = {};
1441
- const Bn = Re;
1442
- function Ge(t, e) {
1443
- const r = t.a / 255, s = e + '="' + t.hex + '"';
1444
- return r < 1 ? s + " " + e + '-opacity="' + r.toFixed(2).slice(1) + '"' : s;
1445
- }
1446
- function Ee(t, e, r) {
1447
- let s = t + e;
1448
- return typeof r < "u" && (s += " " + r), s;
1449
- }
1450
- function Pn(t, e, r) {
1451
- let s = "", n = 0, o = !1, i = 0;
1452
- for (let a = 0; a < t.length; a++) {
1453
- const l = Math.floor(a % e), u = Math.floor(a / e);
1454
- !l && !o && (o = !0), t[a] ? (i++, a > 0 && l > 0 && t[a - 1] || (s += o ? Ee("M", l + r, 0.5 + u + r) : Ee("m", n, 0), n = 0, o = !1), l + 1 < e && t[a + 1] || (s += Ee("h", i), i = 0)) : n++;
1455
- }
1456
- return s;
1457
- }
1458
- yt.render = function(e, r, s) {
1459
- const n = Bn.getOptions(r), o = e.modules.size, i = e.modules.data, a = o + n.margin * 2, l = n.color.light.a ? "<path " + Ge(n.color.light, "fill") + ' d="M0 0h' + a + "v" + a + 'H0z"/>' : "", u = "<path " + Ge(n.color.dark, "stroke") + ' d="' + Pn(i, o, n.margin) + '"/>', f = 'viewBox="0 0 ' + a + " " + a + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (n.width ? 'width="' + n.width + '" height="' + n.width + '" ' : "") + f + ' shape-rendering="crispEdges">' + l + u + `</svg>
1460
- `;
1461
- return typeof s == "function" && s(null, g), g;
1462
- };
1463
- const Sn = $t, Me = ot, wt = pt, In = yt;
1464
- function Fe(t, e, r, s, n) {
1465
- const o = [].slice.call(arguments, 1), i = o.length, a = typeof o[i - 1] == "function";
1466
- if (!a && !Sn())
1467
- throw new Error("Callback required as last argument");
1468
- if (a) {
1469
- if (i < 2)
1470
- throw new Error("Too few arguments provided");
1471
- i === 2 ? (n = r, r = e, e = s = void 0) : i === 3 && (e.getContext && typeof n > "u" ? (n = s, s = void 0) : (n = s, s = r, r = e, e = void 0));
1472
- } else {
1473
- if (i < 1)
1474
- throw new Error("Too few arguments provided");
1475
- return i === 1 ? (r = e, e = s = void 0) : i === 2 && !e.getContext && (s = r, r = e, e = void 0), new Promise(function(l, u) {
1476
- try {
1477
- const f = Me.create(r, s);
1478
- l(t(f, e, s));
1479
- } catch (f) {
1480
- u(f);
1481
- }
1482
- });
1483
- }
1484
- try {
1485
- const l = Me.create(r, s);
1486
- n(null, t(l, e, s));
1487
- } catch (l) {
1488
- n(l);
1489
- }
1490
- }
1491
- ee.create = Me.create;
1492
- ee.toCanvas = Fe.bind(null, wt.render);
1493
- ee.toDataURL = Fe.bind(null, wt.renderToDataURL);
1494
- ee.toString = Fe.bind(null, function(t, e, r) {
1495
- return In.render(t, r);
1496
- });
1497
- async function Mn(t, e = 350) {
1498
- try {
1499
- return await ee.toDataURL(t, {
1500
- width: e,
1501
- margin: 0
1502
- });
1503
- } catch (r) {
1504
- console.error(r);
1505
- }
1506
- }
1507
- var Tn = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
1508
- const Nn = { class: "flex items-start" }, Un = { class: "flex flex-col gap-16 mt-16" }, Ln = ["src"], Rn = /* @__PURE__ */ Te({
1509
- __name: "LinkDeviceDialog",
1510
- setup(t) {
1511
- const e = Be(), r = et(), s = We(), n = O(), o = O(), i = Tn.crmUrl, a = O(), l = K(() => r.membership), u = K(() => {
1512
- var g, m;
1513
- return `https://${(g = l.value) != null && g.url ? l.value.url : (m = l.value) == null ? void 0 : m.business}.${i}`;
1514
- });
1515
- async function f(g) {
1516
- const m = await Ze.getOtp(g);
1517
- return `${u.value}?link-device=${m.otp}`;
1518
- }
1519
- async function E(g) {
1520
- const m = await f(g);
1521
- a.value = m, n.value = await Mn(m);
1522
- }
1523
- return Qe(async () => {
1524
- if (await e.readLocations(), !e.locations.length) {
1525
- s.close();
1526
- return;
1527
- }
1528
- const g = e.locations[0]._id;
1529
- o.value = g, await E(g);
1530
- }), (g, m) => {
1531
- const b = L("FmIcon"), _ = L("FmSelect"), I = L("FmButton"), d = L("FmCard");
1532
- return x(), le(d, { class: "p-24 max-w-[350px]" }, {
1533
- default: Y(() => [
1534
- h("div", Nn, [
1535
- m[3] || (m[3] = h("div", null, [
1536
- h("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
1537
- h("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
1538
- ], -1)),
1539
- S(b, {
1540
- name: "close",
1541
- onClick: m[0] || (m[0] = (C) => c(s).close()),
1542
- class: "cursor-pointer"
1543
- })
1544
- ]),
1545
- h("div", Un, [
1546
- S(_, {
1547
- modelValue: c(o),
1548
- "onUpdate:modelValue": [
1549
- m[1] || (m[1] = (C) => Xe(o) ? o.value = C : null),
1550
- E
1551
- ],
1552
- label: "Select Location",
1553
- items: c(e).locationItems.filter((C) => !!C.value)
1554
- }, null, 8, ["modelValue", "items"]),
1555
- h("img", {
1556
- src: c(n),
1557
- class: "aspect-square w-full"
1558
- }, null, 8, Ln),
1559
- S(I, {
1560
- class: "mx-auto",
1561
- variant: "plain",
1562
- icon: "content_copy",
1563
- onClick: m[2] || (m[2] = (C) => c(tt)(c(a)))
1564
- })
1565
- ])
1566
- ]),
1567
- _: 1
1568
- });
1569
- };
1570
- }
1571
- }), X = "__ALL__", Fn = /* @__PURE__ */ Te({
1572
- __name: "AllowedPhoneCountriesSelect",
1573
- props: {
1574
- modelValue: {}
1575
- },
1576
- emits: ["update:modelValue"],
1577
- setup(t, { emit: e }) {
1578
- const { t: r } = nt(), s = t, n = e, o = Pt.map((f) => ({
1579
- label: `${f.name} (${f.phoneCode})`,
1580
- value: f.phoneCode
1581
- })), i = K(() => [
1582
- {
1583
- label: r("connect.setting.allowedPhoneCountries.allCountries"),
1584
- value: X
1585
- },
1586
- ...o
1587
- ]), a = K(() => {
1588
- const f = s.modelValue;
1589
- return Array.isArray(f) && f.length === 0;
1590
- }), l = K({
1591
- get() {
1592
- const f = s.modelValue;
1593
- return f == null ? [X] : f.length === 0 ? [] : [...f];
1594
- },
1595
- set(f) {
1596
- const E = l.value;
1597
- if (f.filter((m) => !E.includes(m)).includes(X))
1598
- n("update:modelValue", null);
1599
- else {
1600
- const m = f.filter((b) => b !== X);
1601
- m.length === 0 && !a.value ? n("update:modelValue", null) : n("update:modelValue", m);
1602
- }
1603
- }
1604
- }), u = K(() => a.value ? r("connect.setting.allowedPhoneCountries.helper.noneAllowed") : l.value.includes(X) || l.value.length === 0 ? r("connect.setting.allowedPhoneCountries.helper.allAllowed") : r("connect.setting.allowedPhoneCountries.helper.selectedOnly"));
1605
- return (f, E) => {
1606
- const g = L("FmSelect");
1607
- return x(), le(g, {
1608
- modelValue: c(l),
1609
- "onUpdate:modelValue": E[0] || (E[0] = (m) => Xe(l) ? l.value = m : null),
1610
- label: c(r)("connect.setting.allowedPhoneCountries.label"),
1611
- items: c(i),
1612
- multiselect: "",
1613
- searchable: "",
1614
- searchTarget: "label",
1615
- placeholder: c(r)("connect.setting.allowedPhoneCountries.placeholder"),
1616
- "helper-text": c(u)
1617
- }, null, 8, ["modelValue", "label", "items", "placeholder", "helper-text"]);
1618
- };
1619
- }
1620
- });
1621
- var Ae = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
1622
- const kn = { class: "hidden xs:!flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Dn = { class: "fm-typo-en-title-md-800" }, Vn = {
1623
- key: 0,
1624
- class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
1625
- }, $n = { class: "col-span-2 flex flex-col xs:col-span-3 space-y-8" }, xn = { class: "fm-typo-en-title-sm-800" }, zn = { class: "space-y-24" }, Hn = { class: "space-y-8" }, On = { class: "fm-typo-en-title-sm-800" }, Kn = { class: "fm-typo-body-lg-400" }, Yn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, jn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Jn = { class: "space-y-8" }, qn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Gn = { class: "fm-typo-en-body-lg-600" }, Qn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Xn = { class: "space-y-8" }, Wn = { class: "space-y-8" }, Zn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, eo = { class: "space-y-8" }, to = { class: "fm-typo-en-title-sm-800" }, no = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, oo = { class: "space-y-8" }, so = { class: "fm-typo-en-title-sm-800" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, io = { class: "space-y-8" }, lo = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, ao = { class: "space-y-8" }, co = { class: "space-y-8" }, uo = { class: "fm-typo-en-title-sm-800" }, fo = { class: "space-y-8" }, mo = { class: "fm-typo-en-title-sm-800" }, go = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ho = { class: "flex justify-end pb-24" }, po = { class: "col-span-1 space-y-8 xs:hidden" }, yo = { class: "fm-typo-en-body-lg-600" }, wo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, bo = { class: "fm-typo-en-body-lg-600" }, vo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Co = { class: "fm-typo-en-body-lg-600" }, _o = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Eo = { class: "fm-typo-en-body-lg-600" }, Ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Bo = { class: "fm-typo-en-body-lg-600" }, Jo = /* @__PURE__ */ Te({
1626
- __name: "Setting",
1627
- setup(t) {
1628
- const e = Ft(), r = Bt(), s = Rt(), n = Be(), o = et(), { global: i, minor: a } = At, l = We(), u = O(), f = O([]), E = O(null), g = St, m = [
1629
- (A) => !A || A.length >= 6 || "Invalid URL format, please enter at least 6 characters",
1630
- (A) => !A || new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/).test(A) || "Invalid URL format, url should start with a letter or number and can only include lowercase letters, numbers, or hyphens"
1631
- ], b = Ae.appUrl, _ = K(() => {
1632
- var A;
1633
- return `https://${(A = u.value) == null ? void 0 : A.business}.${b}`;
1634
- }), I = O(), { t: d } = nt(), C = s.currentCountry.value || "MY", w = [
1635
- "user.name",
1636
- "user.gender",
1637
- "user.birthday",
1638
- "user.phoneNumber",
1639
- "membership.url"
1640
- ].filter(
1641
- (A) => {
1642
- var p;
1643
- return !((p = Ut[C]) != null && p.includes(A));
1644
- }
1645
- );
1646
- async function y() {
1647
- l.open({
1648
- title: "",
1649
- dialogComponent: Rn,
1650
- closeButton: !1
1651
- });
1652
- }
1653
- async function P(A) {
1654
- await Tt.remove(
1655
- "Are you sure you want to unlink this device?",
1656
- "Unlink device",
1657
- "Unlink"
1658
- ) && await a(
1659
- async () => {
1660
- await Ze.unregisterDevice(A), await n.readLocationDevices();
1661
- },
1662
- {
1663
- message: "Unlinking device",
1664
- successMessage: "Unlinked device successfully"
1665
- }
1666
- );
1667
- }
1668
- async function M() {
1669
- await a(
1670
- async () => {
1671
- var V;
1672
- const A = Vt(u.value);
1673
- console.log(u.value), A.welcomeMessage && !((V = A.welcomeMessage) != null && V.content) && (A.welcomeMessage.content = "Hi there, you have been invited to join our membership");
1674
- const p = It.parse(A);
1675
- I.value === null && p.image ? await se.delete(se.coverImagePath()) : I.value && (p.image = await se.update(
1676
- se.coverImagePath(),
1677
- I.value
1678
- )), await Ye.update(p), await o.readMembership(), u.value = o.membership;
1679
- },
1680
- {
1681
- message: "Updating membership",
1682
- successMessage: "Membership updated successfully"
1683
- }
1684
- );
1685
- }
1686
- async function T() {
1687
- const A = await Ye.getEmailAddresses();
1688
- console.log(A), f.value = A, E.value = A.find((p) => p.default.includes("Marketing"));
1689
- }
1690
- async function U() {
1691
- window.open(
1692
- `${Ae.licensePortalUrl}business/${je.businessId}/settings`,
1693
- "_blank"
1694
- );
1695
- }
1696
- async function k() {
1697
- const A = `${Ae.licensePortalUrl}settings?businessId=${je.businessId}`;
1698
- console.log("Opening", A), window.open(A, "_blank");
1699
- }
1700
- return Qe(async () => {
1701
- await i(async () => {
1702
- await n.readPremium(), await n.readLocations(), await n.readLocationDevices(), await o.readMembership(), await T(), u.value = o.membership;
1703
- });
1704
- }), (A, p) => {
1705
- var De, Ve, $e, xe, ze, He, Oe;
1706
- const V = L("FmPageHead"), N = L("FmButton"), ne = L("FmTextField"), ge = L("FmCard"), ke = L("FmPill"), bt = L("FmSelect"), he = L("FmSwitch"), vt = L("FmMenuDivider");
1707
- return x(), oe(ye, null, [
1708
- S(V, {
1709
- title: c(d)("connect.setting.title"),
1710
- class: "xs:hidden"
1711
- }, null, 8, ["title"]),
1712
- h("div", kn, [
1713
- h("div", Dn, B(c(d)("connect.setting.basicInfo.title")), 1),
1714
- S(N, {
1715
- icon: "info",
1716
- variant: "tertiary"
1717
- })
1718
- ]),
1719
- c(u) ? (x(), oe("div", Vn, [
1720
- h("div", $n, [
1721
- h("div", xn, B(c(d)("connect.setting.basicInfo.title")), 1),
1722
- h("div", zn, [
1723
- S(ne, {
1724
- label: c(d)("connect.setting.basicInfo.membershipTitle"),
1725
- modelValue: c(u).name,
1726
- "onUpdate:modelValue": p[0] || (p[0] = (v) => c(u).name = v)
1727
- }, null, 8, ["label", "modelValue"]),
1728
- S(ne, {
1729
- disabled: !0,
1730
- "model-value": c(u).business,
1731
- rules: m,
1732
- required: !0,
1733
- label: c(d)("connect.setting.basicInfo.memberAppUrl"),
1734
- "helper-text": c(_),
1735
- placeholder: c(u).business.toString(),
1736
- "onUpdate:modelValue": p[2] || (p[2] = (v) => c(u).url = v)
1737
- }, {
1738
- prepend: Y(() => [...p[15] || (p[15] = [
1739
- Q(" https:// ", -1)
1740
- ])]),
1741
- append: Y(() => [
1742
- Q(" ." + B(c(b)) + " ", 1),
1743
- S(N, {
1744
- icon: "content_copy",
1745
- variant: "tertiary",
1746
- onClick: p[1] || (p[1] = (v) => c(tt)(c(_)))
1747
- })
1748
- ]),
1749
- _: 1
1750
- }, 8, ["model-value", "label", "helper-text", "placeholder"]),
1751
- S(Mt, {
1752
- label: "Cover image",
1753
- class: "w-2/3 xs:w-full",
1754
- "image-fit": "cover",
1755
- "aspect-ratio": "3/1",
1756
- thumbnail: c(u).image || void 0,
1757
- "onUpdate:file": p[3] || (p[3] = async (v) => {
1758
- I.value = v, v || (c(u).image = null);
1759
- })
1760
- }, null, 8, ["thumbnail"]),
1761
- h("div", Hn, [
1762
- h("div", On, B(c(d)("connect.setting.counterApp.title")), 1),
1763
- S(N, {
1764
- variant: "plain",
1765
- icon: "link",
1766
- label: c(d)("connect.setting.counterApp.linkDevice"),
1767
- onClick: y
1768
- }, null, 8, ["label"]),
1769
- (x(!0), oe(ye, null, _t(c(n).locationDevices, (v, F) => (x(), le(ge, {
1770
- key: F,
1771
- variant: "outlined",
1772
- class: "flex items-center justify-between px-16 py-12"
1773
- }, {
1774
- default: Y(() => [
1775
- h("div", null, [
1776
- h("p", Kn, B(v.name || `Device ${v._id}`), 1),
1777
- h("p", Yn, B(c(d)("connect.setting.counterApp.device.activationDate")) + " " + B(c(Et)(c(Dt)(v._id.toString())).format(
1778
- "D MMM YYYY"
1779
- )), 1),
1780
- h("p", jn, B(c(d)("connect.setting.counterApp.device.linkedLocation")) + " " + B(c(n).locations.find(($) => $._id == v.location).name), 1)
1781
- ]),
1782
- S(N, {
1783
- icon: "link_off",
1784
- variant: "tertiary",
1785
- onClick: ($) => P(v._id)
1786
- }, null, 8, ["onClick"])
1787
- ]),
1788
- _: 2
1789
- }, 1024))), 128))
1790
- ]),
1791
- h("div", Jn, [
1792
- h("div", qn, [
1793
- Q(B(c(d)("connect.setting.advertisement.title")) + " ", 1),
1794
- S(ke, { variant: "premium" })
1795
- ]),
1796
- S(ge, {
1797
- variant: "outlined",
1798
- class: "p-16 flex items-center justify-between"
1799
- }, {
1800
- default: Y(() => {
1801
- var v;
1802
- return [
1803
- h("div", null, [
1804
- h("div", Gn, B(c(d)("connect.setting.advertisement.manageAd")), 1),
1805
- h("div", Qn, B(c(d)("connect.setting.advertisement.activeAdsShowing", {
1806
- count: ((v = c(u).advertisements) == null ? void 0 : v.length) ?? 0
1807
- })), 1)
1808
- ]),
1809
- S(N, {
1810
- label: c(d)("connect.setting.advertisement.manage"),
1811
- icon: "arrow_forward",
1812
- "icon-position": "right",
1813
- disabled: !c(n).isPremium,
1814
- onClick: p[4] || (p[4] = (F) => c(e).push({
1815
- name: c(kt)["$connect-SETTING_ADVERTISEMENTS"]
1816
- }))
1817
- }, null, 8, ["label", "disabled"])
1818
- ];
1819
- }),
1820
- _: 1
1821
- })
1822
- ]),
1823
- h("div", Xn, [
1824
- p[16] || (p[16] = h("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
1825
- S(ne, {
1826
- "model-value": ((De = c(u)) == null ? void 0 : De.brand) || "",
1827
- "max-length": 15,
1828
- label: c(d)("connect.setting.sms.brandName"),
1829
- "show-word-count": "",
1830
- "helper-text": c(d)("connect.setting.sms.messageFormat", {
1831
- brand: ((Ve = c(u)) == null ? void 0 : Ve.brand) || ""
1832
- }),
1833
- "onUpdate:modelValue": p[5] || (p[5] = (v) => c(u).brand = v)
1834
- }, null, 8, ["model-value", "label", "helper-text"]),
1835
- S(Lt, {
1836
- modelValue: c(u).welcomeMessage,
1837
- "onUpdate:modelValue": p[6] || (p[6] = (v) => c(u).welcomeMessage = v),
1838
- variables: c(w),
1839
- placeholder: c(d)("connect.setting.sms.welcomeMessage")
1840
- }, null, 8, ["modelValue", "variables", "placeholder"])
1841
- ]),
1842
- h("div", Wn, [
1843
- p[17] || (p[17] = h("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
1844
- h("div", Zn, B(c(d)("connect.setting.email.description")), 1),
1845
- c(f).length ? we("", !0) : (x(), le(N, {
1846
- key: 0,
1847
- onClick: U,
1848
- label: c(d)("connect.setting.email.addNewAddress")
1849
- }, null, 8, ["label"])),
1850
- c(f).length ? (x(), oe(ye, { key: 1 }, [
1851
- S(bt, {
1852
- "model-value": ((xe = ($e = c(u)) == null ? void 0 : $e.email) == null ? void 0 : xe.from) || null,
1853
- label: c(d)("connect.setting.email.fromAddress"),
1854
- items: c(f).map((v) => ({
1855
- label: v.emailAddress,
1856
- value: v.emailAddress
1857
- })),
1858
- placeholder: c(E) ? c(E).emailAddress : c(d)("connect.setting.email.noAddressAvailable"),
1859
- "onUpdate:modelValue": p[7] || (p[7] = (v) => {
1860
- var F, $;
1861
- (F = c(u)) != null && F.email || (c(u).email = {
1862
- from: v,
1863
- name: ($ = c(f).find((pe) => pe.emailAddress == v)) == null ? void 0 : $.name
1864
- }), c(u).email.from = v || null;
1865
- }),
1866
- rules: [c(Ke).ruleAtPath(c(g), "email.from")]
1867
- }, null, 8, ["model-value", "label", "items", "placeholder", "rules"]),
1868
- S(ne, {
1869
- "model-value": ((He = (ze = c(u)) == null ? void 0 : ze.email) == null ? void 0 : He.name) || null,
1870
- label: c(d)("connect.setting.email.senderName"),
1871
- disabled: "",
1872
- placeholder: ((Oe = c(E)) == null ? void 0 : Oe.name) || null,
1873
- "onUpdate:modelValue": p[8] || (p[8] = (v) => {
1874
- var F;
1875
- (F = c(u)) != null && F.email || (c(u).email = {
1876
- name: v
1877
- }), c(u).email.name = v || null;
1878
- }),
1879
- rules: [c(Ke).ruleAtPath(c(g), "email.name")]
1880
- }, null, 8, ["model-value", "label", "placeholder", "rules"])
1881
- ], 64)) : we("", !0)
1882
- ]),
1883
- h("div", eo, [
1884
- h("div", to, B(c(d)("connect.setting.whatsapp.title")), 1),
1885
- h("div", no, B(c(d)("connect.setting.whatsapp.description")), 1),
1886
- S(N, {
1887
- label: c(d)("connect.setting.whatsapp.manageChannel"),
1888
- icon: "open_in_new",
1889
- onClick: p[9] || (p[9] = (v) => k())
1890
- }, null, 8, ["label"])
1891
- ]),
1892
- h("div", oo, [
1893
- h("div", so, [
1894
- Q(B(c(d)("connect.setting.freeCredit.title")) + " ", 1),
1895
- h("span", ro, B(c(d)("connect.setting.freeCredit.posVersion")), 1)
1896
- ]),
1897
- S(he, {
1898
- "model-value": c(u).freeCreditAsDiscount ?? !1,
1899
- "onUpdate:modelValue": p[10] || (p[10] = (v) => c(u).freeCreditAsDiscount = v),
1900
- label: c(d)("connect.setting.freeCredit.title"),
1901
- sublabel: c(d)("connect.setting.freeCredit.description"),
1902
- "label-placement": "right",
1903
- value: ""
1904
- }, null, 8, ["model-value", "label", "sublabel"])
1905
- ]),
1906
- h("div", io, [
1907
- h("div", lo, [
1908
- Q(B(c(d)("connect.setting.memberCard.title")) + " ", 1),
1909
- S(ke, { variant: "premium" })
1910
- ]),
1911
- S(he, {
1912
- "model-value": c(u).cardEnable ?? !1,
1913
- "onUpdate:modelValue": p[11] || (p[11] = (v) => c(u).cardEnable = v),
1914
- label: "",
1915
- sublabel: c(d)("connect.setting.memberCard.description"),
1916
- "label-placement": "right",
1917
- value: "",
1918
- disabled: !c(n).isPremium
1919
- }, null, 8, ["model-value", "sublabel", "disabled"])
1920
- ]),
1921
- h("div", ao, [
1922
- p[18] || (p[18] = h("div", { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, " Auto Revert Reward ", -1)),
1923
- S(he, {
1924
- "model-value": c(u).autoRevertReward ?? !1,
1925
- "onUpdate:modelValue": p[12] || (p[12] = (v) => c(u).autoRevertReward = v),
1926
- label: "",
1927
- sublabel: "When enabled, rewards are automatically revert when if a refund is processed in POS",
1928
- "label-placement": "right",
1929
- value: ""
1930
- }, null, 8, ["model-value"])
1931
- ]),
1932
- h("div", co, [
1933
- h("div", uo, B(c(d)("connect.setting.location.title")), 1),
1934
- S(Nt, {
1935
- label: c(d)("connect.setting.location.selectLabel"),
1936
- "model-value": c(u).targetLocation ?? null,
1937
- "onUpdate:modelValue": p[13] || (p[13] = (v) => c(u).targetLocation = v)
1938
- }, null, 8, ["label", "model-value"])
1939
- ]),
1940
- h("div", fo, [
1941
- h("div", mo, B(c(d)("connect.setting.allowedPhoneCountries.title")), 1),
1942
- h("div", go, B(c(d)("connect.setting.allowedPhoneCountries.description")), 1),
1943
- S(Fn, {
1944
- modelValue: c(u).allowedPhoneCountries,
1945
- "onUpdate:modelValue": p[14] || (p[14] = (v) => c(u).allowedPhoneCountries = v)
1946
- }, null, 8, ["modelValue"])
1947
- ]),
1948
- h("div", ho, [
1949
- S(N, {
1950
- label: c(d)("connect.setting.action.update"),
1951
- type: "button",
1952
- onClick: M,
1953
- disabled: !!c(r).loadingQueue.length,
1954
- loading: !!c(r).loadingQueue.length
1955
- }, null, 8, ["label", "disabled", "loading"])
1956
- ])
1957
- ])
1958
- ]),
1959
- h("div", po, [
1960
- S(ge, {
1961
- variant: "outlined",
1962
- class: "flex flex-col p-24 gap-8"
1963
- }, {
1964
- default: Y(() => {
1965
- var v, F, $;
1966
- return [
1967
- h("div", yo, B(c(d)("connect.setting.summary.title")), 1),
1968
- S(vt, { class: "my-4" }),
1969
- h("div", null, [
1970
- h("div", wo, B(c(d)("connect.setting.summary.name")), 1),
1971
- h("div", bo, B(c(u).name), 1)
1972
- ]),
1973
- h("div", null, [
1974
- h("div", vo, B(c(d)("connect.setting.summary.advertisement")), 1),
1975
- h("div", Co, B((((v = c(u).advertisements) == null ? void 0 : v.length) ?? 0) || c(d)("connect.setting.summary.noAds")), 1)
1976
- ]),
1977
- h("div", null, [
1978
- h("div", _o, B(c(d)("connect.setting.summary.freeCredit")), 1),
1979
- h("div", Eo, B(c(u).freeCreditAsDiscount ? c(d)("connect.setting.summary.enabled") : c(d)("connect.setting.summary.disabled")), 1)
1980
- ]),
1981
- h("div", null, [
1982
- h("div", Ao, B(c(d)("connect.setting.summary.locations")), 1),
1983
- h("div", Bo, B(!c(u).targetLocation || c(u).targetLocation.length == c(Be)().locations.length ? c(d)("connect.setting.summary.allLocations") : ($ = (F = c(u)) == null ? void 0 : F.targetLocation) == null ? void 0 : $.map(
1984
- (pe) => c(n).locations.find((Ct) => Ct._id == pe).name
1985
- ).join(", ")), 1)
1986
- ])
1987
- ];
1988
- }),
1989
- _: 1
1990
- })
1991
- ])
1992
- ])) : we("", !0)
1993
- ], 64);
1994
- };
1995
- }
1996
- });
1997
- export {
1998
- Jo as default
1999
- };