@feedmepos/mf-connect 0.1.3-prod → 0.1.5-prod

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