@feedmepos/mf-connect 0.1.0-beta.7 → 0.1.0-beta.70

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