@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.16-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Analytic-C-zZmF5N.js → Analytic-Gq7PoNer.js} +368 -365
- package/dist/App-Cikl5jnp.js +177 -0
- package/dist/Broadcast-DU3JnBwZ.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +20 -20
- package/dist/Card-hIeQ5XUH.js +825 -0
- package/dist/Collections-B1SC1rr7.js +453 -0
- package/dist/Credit-BgwI8DR3.js +216 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js} +1026 -1022
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js} +29 -29
- package/dist/Experience-C2Q-zqV6.js +221 -0
- package/dist/Game-DU2pZDGk.js +255 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +1 -1
- package/dist/{MainLayout-D0AoA1tk.js → MainLayout-B1aJoR95.js} +2 -2
- package/dist/Marketing-DWiTQp9I.js +316 -0
- package/dist/Member-BEXKBFry.js +69 -0
- package/dist/MemberList-DzMdajIf.js +1733 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-Bciankuu.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js → MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js} +46 -46
- package/dist/Mission-KzwRlaA5.js +259 -0
- package/dist/Point-CSKvZXHc.js +222 -0
- package/dist/Promotion-IiwPhx8p.js +221 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js} +545 -544
- package/dist/Segment-2Q0PonBb.js +447 -0
- package/dist/{Setting-Zrj5P_4m.js → Setting-Df5vVRt4.js} +600 -598
- package/dist/Store-C0WXCKs6.js +1503 -0
- package/dist/StoreRewards-eSSIO0nk.js +401 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +106 -108
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js} +1 -1
- package/dist/{Tier-DVWJyQ9S.js → Tier-v-1FkRU-.js} +464 -449
- package/dist/{Title-B5kX64vs.js → Title-CQ2JWqBW.js} +315 -299
- package/dist/Transaction-0OouN_6s.js +39 -0
- package/dist/Voucher-CL0cgogx.js +488 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-Bd19eW7X.js +5381 -0
- package/dist/app-CfS25Z66.js +34797 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +5 -3
- package/dist/business-dQh3AEot.js +78 -0
- package/dist/{campaign-BZJuknWK.js → campaign-BOl8AgKA.js} +12 -12
- package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-B_YsXmrP.js} +2 -2
- package/dist/dto-B8NfyVPG.js +1169 -0
- package/dist/{effect-B8kmnKvY.js → effect-C2jCStXO.js} +1 -1
- package/dist/{export-Dm6LYnWo.js → export-BtZc3Yzh.js} +3 -3
- package/dist/{helper-DR4XK3nv.js → helper-8oGsrM56.js} +1 -1
- package/dist/{index-DcUrk07Q.js → index-6FkKY3q0.js} +3 -3
- package/dist/{index-Bu4_26qI.js → index-C7oeXRUl.js} +1 -1
- package/dist/{index-CuL5-ORK.js → index-CZKYIefW.js} +6 -7
- package/dist/{index-yxJMhfxj.js → index-C_0IFnwi.js} +5 -5
- package/dist/{index-BryrRq8O.js → index-DCixRRvz.js} +36 -30
- package/dist/{index-CkiYkbXb.js → index-DFgt4-VW.js} +1 -1
- package/dist/{index-CWf0mh3a.js → index-DYDhH9bi.js} +177 -168
- package/dist/{index-boor8e80.js → index-Di-kWSmf.js} +3 -3
- package/dist/{app-DkI7dYRN.js → index-Dn0jdj0o.js} +9665 -13024
- package/dist/index-DwKqFNF6.js +3 -0
- package/dist/{index-BobRgQrE.js → index-HoacsZDk.js} +2 -2
- package/dist/{index-BxkxVtgm.js → index-UTQHDUdW.js} +1 -1
- package/dist/{loading-BzV5acUX.js → loading-D_AN6p24.js} +6807 -6805
- package/dist/{lodash-mg4435Qq.js → lodash-B5I3zXaY.js} +1 -1
- package/dist/{membership-CqbsLHqx.js → membership-Ccrx9R6r.js} +3 -3
- package/dist/{money-DA_gtp3q.js → money-waD-f-Zz.js} +1 -1
- package/dist/{number-C388eyOu.js → number-CwTGGsh9.js} +1 -1
- package/dist/{rule-Clmr5y4j.js → rule-DJ07h3Gh.js} +2 -2
- package/dist/{rule-builder-BgqNbM-P.js → rule-builder-DJ-acvVD.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/template-clxvNnbF.js +190 -0
- package/dist/{usePagination-o5fgsZwU.js → usePagination-BeF5K3M7.js} +86 -86
- package/dist/vue-i18n-BxwiXSkp.js +2365 -0
- package/dist/{xlsx-BRdh9e2p.js → xlsx-BB366cdN.js} +1945 -1945
- package/package.json +9 -5
- package/dist/Broadcast-X69Mtv3b.js +0 -216
- package/dist/Card-D0X3v1UF.js +0 -822
- package/dist/Collections-umR6Ehqf.js +0 -452
- package/dist/Credit-C1EWF7R0.js +0 -214
- package/dist/Experience-CqL8wyPm.js +0 -211
- package/dist/Game--kYe64EV.js +0 -250
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js +0 -144
- package/dist/Marketing-CTCQ5ZmZ.js +0 -308
- package/dist/Member-DCduX7zP.js +0 -91
- package/dist/MemberList-B0EkXZJu.js +0 -1729
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Mission-CVr9rS_D.js +0 -248
- package/dist/Point-BnZ6M74y.js +0 -220
- package/dist/Promotion-B0PUve5S.js +0 -218
- package/dist/Segment-B-XpkyM5.js +0 -445
- package/dist/Store-B2gywCt2.js +0 -1503
- package/dist/StoreRewards-D8410Q_-.js +0 -434
- package/dist/Transaction-CZBO4v4d.js +0 -36
- package/dist/Voucher-se-4JF9B.js +0 -481
- package/dist/app-B2ImSO3V.js +0 -53382
- package/dist/dto-BWpvRpK2.js +0 -1151
- package/dist/template-Dwp7heBA.js +0 -190
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { h as
|
|
3
|
-
import { Z as
|
|
4
|
-
import { useDialog as
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import { u as Je } from "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { _ as
|
|
11
|
-
import { _ as yt } from "./
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
1
|
+
import { defineComponent as He, ref as H, computed as se, onMounted as Ke, resolveComponent as R, openBlock as x, createBlock as be, withCtx as W, createElementVNode as b, createVNode as S, unref as c, isRef as Oe, createElementBlock as G, Fragment as me, toDisplayString as F, createTextVNode as Q, renderList as Re, createCommentVNode as De } from "vue";
|
|
2
|
+
import { h as dt } from "./moment-BWErdI6_.js";
|
|
3
|
+
import { Z as ke } from "./zod-W_PvIofQ.js";
|
|
4
|
+
import { useDialog as Ye } from "@feedmepos/ui-library";
|
|
5
|
+
import { a as je, u as ft, p as mt, f as K } from "./loading-D_AN6p24.js";
|
|
6
|
+
import { u as gt } from "./app-wDQR6dpb.js";
|
|
7
|
+
import { u as ve, l as Je } from "./business-dQh3AEot.js";
|
|
8
|
+
import { u as qe } from "./membership-Ccrx9R6r.js";
|
|
9
|
+
import { m as ht, l as pt } from "./index-DCixRRvz.js";
|
|
10
|
+
import { _ as Ve } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
11
|
+
import { _ as yt } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js";
|
|
12
|
+
import { _ as wt } from "./MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js";
|
|
13
|
+
import { u as bt } from "./vue-i18n-BxwiXSkp.js";
|
|
14
|
+
import { m as vt } from "./index-C7oeXRUl.js";
|
|
15
|
+
import { o as Ct } from "./objectId-dwaoBfJX.js";
|
|
16
|
+
import { a as Et } from "./object-qECH92oz.js";
|
|
17
|
+
var ee = {}, Bt = function() {
|
|
16
18
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
17
|
-
},
|
|
18
|
-
let
|
|
19
|
-
const
|
|
19
|
+
}, Ge = {}, U = {};
|
|
20
|
+
let _e;
|
|
21
|
+
const At = [
|
|
20
22
|
0,
|
|
21
23
|
// Not used
|
|
22
24
|
26,
|
|
@@ -66,7 +68,7 @@ U.getSymbolSize = function(e) {
|
|
|
66
68
|
return e * 4 + 17;
|
|
67
69
|
};
|
|
68
70
|
U.getSymbolTotalCodewords = function(e) {
|
|
69
|
-
return
|
|
71
|
+
return At[e];
|
|
70
72
|
};
|
|
71
73
|
U.getBCHDigit = function(t) {
|
|
72
74
|
let e = 0;
|
|
@@ -77,15 +79,15 @@ U.getBCHDigit = function(t) {
|
|
|
77
79
|
U.setToSJISFunction = function(e) {
|
|
78
80
|
if (typeof e != "function")
|
|
79
81
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
80
|
-
|
|
82
|
+
_e = e;
|
|
81
83
|
};
|
|
82
84
|
U.isKanjiModeEnabled = function() {
|
|
83
|
-
return typeof
|
|
85
|
+
return typeof _e < "u";
|
|
84
86
|
};
|
|
85
87
|
U.toSJIS = function(e) {
|
|
86
|
-
return
|
|
88
|
+
return _e(e);
|
|
87
89
|
};
|
|
88
|
-
var
|
|
90
|
+
var ue = {};
|
|
89
91
|
(function(t) {
|
|
90
92
|
t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
|
|
91
93
|
function e(i) {
|
|
@@ -119,11 +121,11 @@ var ce = {};
|
|
|
119
121
|
return o;
|
|
120
122
|
}
|
|
121
123
|
};
|
|
122
|
-
})(
|
|
123
|
-
function
|
|
124
|
+
})(ue);
|
|
125
|
+
function Qe() {
|
|
124
126
|
this.buffer = [], this.length = 0;
|
|
125
127
|
}
|
|
126
|
-
|
|
128
|
+
Qe.prototype = {
|
|
127
129
|
get: function(t) {
|
|
128
130
|
const e = Math.floor(t / 8);
|
|
129
131
|
return (this.buffer[e] >>> 7 - t % 8 & 1) === 1;
|
|
@@ -140,7 +142,7 @@ Ge.prototype = {
|
|
|
140
142
|
this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
|
|
141
143
|
}
|
|
142
144
|
};
|
|
143
|
-
var
|
|
145
|
+
var _t = Qe;
|
|
144
146
|
function te(t) {
|
|
145
147
|
if (!t || t < 1)
|
|
146
148
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
@@ -159,39 +161,39 @@ te.prototype.xor = function(t, e, i) {
|
|
|
159
161
|
te.prototype.isReserved = function(t, e) {
|
|
160
162
|
return this.reservedBit[t * this.size + e];
|
|
161
163
|
};
|
|
162
|
-
var
|
|
164
|
+
var Mt = te, We = {};
|
|
163
165
|
(function(t) {
|
|
164
166
|
const e = U.getSymbolSize;
|
|
165
167
|
t.getRowColCoords = function(r) {
|
|
166
168
|
if (r === 1) return [];
|
|
167
|
-
const o = Math.floor(r / 7) + 2, n = e(r),
|
|
168
|
-
for (let
|
|
169
|
-
s[
|
|
169
|
+
const o = Math.floor(r / 7) + 2, n = e(r), l = n === 145 ? 26 : Math.ceil((n - 13) / (2 * o - 2)) * 2, s = [n - 7];
|
|
170
|
+
for (let a = 1; a < o - 1; a++)
|
|
171
|
+
s[a] = s[a - 1] - l;
|
|
170
172
|
return s.push(6), s.reverse();
|
|
171
173
|
}, t.getPositions = function(r) {
|
|
172
|
-
const o = [], n = t.getRowColCoords(r),
|
|
173
|
-
for (let s = 0; s <
|
|
174
|
-
for (let
|
|
175
|
-
s === 0 &&
|
|
176
|
-
s === 0 &&
|
|
177
|
-
s ===
|
|
174
|
+
const o = [], n = t.getRowColCoords(r), l = n.length;
|
|
175
|
+
for (let s = 0; s < l; s++)
|
|
176
|
+
for (let a = 0; a < l; a++)
|
|
177
|
+
s === 0 && a === 0 || // top-left
|
|
178
|
+
s === 0 && a === l - 1 || // bottom-left
|
|
179
|
+
s === l - 1 && a === 0 || o.push([n[s], n[a]]);
|
|
178
180
|
return o;
|
|
179
181
|
};
|
|
180
|
-
})(
|
|
181
|
-
var
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
const i =
|
|
182
|
+
})(We);
|
|
183
|
+
var Xe = {};
|
|
184
|
+
const St = U.getSymbolSize, xe = 7;
|
|
185
|
+
Xe.getPositions = function(e) {
|
|
186
|
+
const i = St(e);
|
|
185
187
|
return [
|
|
186
188
|
// top-left
|
|
187
189
|
[0, 0],
|
|
188
190
|
// top-right
|
|
189
|
-
[i -
|
|
191
|
+
[i - xe, 0],
|
|
190
192
|
// bottom-left
|
|
191
|
-
[0, i -
|
|
193
|
+
[0, i - xe]
|
|
192
194
|
];
|
|
193
195
|
};
|
|
194
|
-
var
|
|
196
|
+
var Ze = {};
|
|
195
197
|
(function(t) {
|
|
196
198
|
t.Patterns = {
|
|
197
199
|
PATTERN000: 0,
|
|
@@ -215,39 +217,39 @@ var Xe = {};
|
|
|
215
217
|
return t.isValid(o) ? parseInt(o, 10) : void 0;
|
|
216
218
|
}, t.getPenaltyN1 = function(o) {
|
|
217
219
|
const n = o.size;
|
|
218
|
-
let
|
|
220
|
+
let l = 0, s = 0, a = 0, m = null, g = null;
|
|
219
221
|
for (let B = 0; B < n; B++) {
|
|
220
|
-
s =
|
|
222
|
+
s = a = 0, m = g = null;
|
|
221
223
|
for (let h = 0; h < n; h++) {
|
|
222
224
|
let d = o.get(B, h);
|
|
223
|
-
d === m ? s++ : (s >= 5 && (
|
|
225
|
+
d === m ? s++ : (s >= 5 && (l += e.N1 + (s - 5)), m = d, s = 1), d = o.get(h, B), d === g ? a++ : (a >= 5 && (l += e.N1 + (a - 5)), g = d, a = 1);
|
|
224
226
|
}
|
|
225
|
-
s >= 5 && (
|
|
227
|
+
s >= 5 && (l += e.N1 + (s - 5)), a >= 5 && (l += e.N1 + (a - 5));
|
|
226
228
|
}
|
|
227
|
-
return
|
|
229
|
+
return l;
|
|
228
230
|
}, t.getPenaltyN2 = function(o) {
|
|
229
231
|
const n = o.size;
|
|
230
|
-
let
|
|
232
|
+
let l = 0;
|
|
231
233
|
for (let s = 0; s < n - 1; s++)
|
|
232
|
-
for (let
|
|
233
|
-
const m = o.get(s,
|
|
234
|
-
(m === 4 || m === 0) &&
|
|
234
|
+
for (let a = 0; a < n - 1; a++) {
|
|
235
|
+
const m = o.get(s, a) + o.get(s, a + 1) + o.get(s + 1, a) + o.get(s + 1, a + 1);
|
|
236
|
+
(m === 4 || m === 0) && l++;
|
|
235
237
|
}
|
|
236
|
-
return
|
|
238
|
+
return l * e.N2;
|
|
237
239
|
}, t.getPenaltyN3 = function(o) {
|
|
238
240
|
const n = o.size;
|
|
239
|
-
let
|
|
241
|
+
let l = 0, s = 0, a = 0;
|
|
240
242
|
for (let m = 0; m < n; m++) {
|
|
241
|
-
s =
|
|
243
|
+
s = a = 0;
|
|
242
244
|
for (let g = 0; g < n; g++)
|
|
243
|
-
s = s << 1 & 2047 | o.get(m, g), g >= 10 && (s === 1488 || s === 93) &&
|
|
245
|
+
s = s << 1 & 2047 | o.get(m, g), g >= 10 && (s === 1488 || s === 93) && l++, a = a << 1 & 2047 | o.get(g, m), g >= 10 && (a === 1488 || a === 93) && l++;
|
|
244
246
|
}
|
|
245
|
-
return
|
|
247
|
+
return l * e.N3;
|
|
246
248
|
}, t.getPenaltyN4 = function(o) {
|
|
247
249
|
let n = 0;
|
|
248
|
-
const
|
|
249
|
-
for (let
|
|
250
|
-
return Math.abs(Math.ceil(n * 100 /
|
|
250
|
+
const l = o.data.length;
|
|
251
|
+
for (let a = 0; a < l; a++) n += o.data[a];
|
|
252
|
+
return Math.abs(Math.ceil(n * 100 / l / 5) - 10) * e.N4;
|
|
251
253
|
};
|
|
252
254
|
function i(r, o, n) {
|
|
253
255
|
switch (r) {
|
|
@@ -272,23 +274,23 @@ var Xe = {};
|
|
|
272
274
|
}
|
|
273
275
|
}
|
|
274
276
|
t.applyMask = function(o, n) {
|
|
275
|
-
const
|
|
276
|
-
for (let s = 0; s <
|
|
277
|
-
for (let
|
|
278
|
-
n.isReserved(
|
|
277
|
+
const l = n.size;
|
|
278
|
+
for (let s = 0; s < l; s++)
|
|
279
|
+
for (let a = 0; a < l; a++)
|
|
280
|
+
n.isReserved(a, s) || n.xor(a, s, i(o, a, s));
|
|
279
281
|
}, t.getBestMask = function(o, n) {
|
|
280
|
-
const
|
|
281
|
-
let s = 0,
|
|
282
|
-
for (let m = 0; m <
|
|
282
|
+
const l = Object.keys(t.Patterns).length;
|
|
283
|
+
let s = 0, a = 1 / 0;
|
|
284
|
+
for (let m = 0; m < l; m++) {
|
|
283
285
|
n(m), t.applyMask(m, o);
|
|
284
286
|
const g = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
|
|
285
|
-
t.applyMask(m, o), g <
|
|
287
|
+
t.applyMask(m, o), g < a && (a = g, s = m);
|
|
286
288
|
}
|
|
287
289
|
return s;
|
|
288
290
|
};
|
|
289
|
-
})(
|
|
290
|
-
var
|
|
291
|
-
const
|
|
291
|
+
})(Ze);
|
|
292
|
+
var ce = {};
|
|
293
|
+
const z = ue, re = [
|
|
292
294
|
// L M Q H
|
|
293
295
|
1,
|
|
294
296
|
1,
|
|
@@ -613,67 +615,67 @@ const x = ce, re = [
|
|
|
613
615
|
2040,
|
|
614
616
|
2430
|
|
615
617
|
];
|
|
616
|
-
|
|
618
|
+
ce.getBlocksCount = function(e, i) {
|
|
617
619
|
switch (i) {
|
|
618
|
-
case
|
|
620
|
+
case z.L:
|
|
619
621
|
return re[(e - 1) * 4 + 0];
|
|
620
|
-
case
|
|
622
|
+
case z.M:
|
|
621
623
|
return re[(e - 1) * 4 + 1];
|
|
622
|
-
case
|
|
624
|
+
case z.Q:
|
|
623
625
|
return re[(e - 1) * 4 + 2];
|
|
624
|
-
case
|
|
626
|
+
case z.H:
|
|
625
627
|
return re[(e - 1) * 4 + 3];
|
|
626
628
|
default:
|
|
627
629
|
return;
|
|
628
630
|
}
|
|
629
631
|
};
|
|
630
|
-
|
|
632
|
+
ce.getTotalCodewordsCount = function(e, i) {
|
|
631
633
|
switch (i) {
|
|
632
|
-
case
|
|
634
|
+
case z.L:
|
|
633
635
|
return ie[(e - 1) * 4 + 0];
|
|
634
|
-
case
|
|
636
|
+
case z.M:
|
|
635
637
|
return ie[(e - 1) * 4 + 1];
|
|
636
|
-
case
|
|
638
|
+
case z.Q:
|
|
637
639
|
return ie[(e - 1) * 4 + 2];
|
|
638
|
-
case
|
|
640
|
+
case z.H:
|
|
639
641
|
return ie[(e - 1) * 4 + 3];
|
|
640
642
|
default:
|
|
641
643
|
return;
|
|
642
644
|
}
|
|
643
645
|
};
|
|
644
|
-
var
|
|
645
|
-
const X = new Uint8Array(512),
|
|
646
|
+
var et = {}, de = {};
|
|
647
|
+
const X = new Uint8Array(512), le = new Uint8Array(256);
|
|
646
648
|
(function() {
|
|
647
649
|
let e = 1;
|
|
648
650
|
for (let i = 0; i < 255; i++)
|
|
649
|
-
X[i] = e,
|
|
651
|
+
X[i] = e, le[e] = i, e <<= 1, e & 256 && (e ^= 285);
|
|
650
652
|
for (let i = 255; i < 512; i++)
|
|
651
653
|
X[i] = X[i - 255];
|
|
652
654
|
})();
|
|
653
655
|
de.log = function(e) {
|
|
654
656
|
if (e < 1) throw new Error("log(" + e + ")");
|
|
655
|
-
return
|
|
657
|
+
return le[e];
|
|
656
658
|
};
|
|
657
659
|
de.exp = function(e) {
|
|
658
660
|
return X[e];
|
|
659
661
|
};
|
|
660
662
|
de.mul = function(e, i) {
|
|
661
|
-
return e === 0 || i === 0 ? 0 : X[
|
|
663
|
+
return e === 0 || i === 0 ? 0 : X[le[e] + le[i]];
|
|
662
664
|
};
|
|
663
665
|
(function(t) {
|
|
664
666
|
const e = de;
|
|
665
667
|
t.mul = function(r, o) {
|
|
666
668
|
const n = new Uint8Array(r.length + o.length - 1);
|
|
667
|
-
for (let
|
|
669
|
+
for (let l = 0; l < r.length; l++)
|
|
668
670
|
for (let s = 0; s < o.length; s++)
|
|
669
|
-
n[
|
|
671
|
+
n[l + s] ^= e.mul(r[l], o[s]);
|
|
670
672
|
return n;
|
|
671
673
|
}, t.mod = function(r, o) {
|
|
672
674
|
let n = new Uint8Array(r);
|
|
673
675
|
for (; n.length - o.length >= 0; ) {
|
|
674
|
-
const
|
|
675
|
-
for (let
|
|
676
|
-
n[
|
|
676
|
+
const l = n[0];
|
|
677
|
+
for (let a = 0; a < o.length; a++)
|
|
678
|
+
n[a] ^= e.mul(o[a], l);
|
|
677
679
|
let s = 0;
|
|
678
680
|
for (; s < n.length && n[s] === 0; ) s++;
|
|
679
681
|
n = n.slice(s);
|
|
@@ -685,53 +687,53 @@ de.mul = function(e, i) {
|
|
|
685
687
|
o = t.mul(o, new Uint8Array([1, e.exp(n)]));
|
|
686
688
|
return o;
|
|
687
689
|
};
|
|
688
|
-
})(
|
|
689
|
-
const
|
|
690
|
+
})(et);
|
|
691
|
+
const tt = et;
|
|
690
692
|
function Me(t) {
|
|
691
693
|
this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
|
|
692
694
|
}
|
|
693
695
|
Me.prototype.initialize = function(e) {
|
|
694
|
-
this.degree = e, this.genPoly =
|
|
696
|
+
this.degree = e, this.genPoly = tt.generateECPolynomial(this.degree);
|
|
695
697
|
};
|
|
696
698
|
Me.prototype.encode = function(e) {
|
|
697
699
|
if (!this.genPoly)
|
|
698
700
|
throw new Error("Encoder not initialized");
|
|
699
701
|
const i = new Uint8Array(e.length + this.degree);
|
|
700
702
|
i.set(e);
|
|
701
|
-
const r =
|
|
703
|
+
const r = tt.mod(i, this.genPoly), o = this.degree - r.length;
|
|
702
704
|
if (o > 0) {
|
|
703
705
|
const n = new Uint8Array(this.degree);
|
|
704
706
|
return n.set(r, o), n;
|
|
705
707
|
}
|
|
706
708
|
return r;
|
|
707
709
|
};
|
|
708
|
-
var
|
|
710
|
+
var It = Me, nt = {}, $ = {}, Se = {};
|
|
709
711
|
Se.isValid = function(e) {
|
|
710
712
|
return !isNaN(e) && e >= 1 && e <= 40;
|
|
711
713
|
};
|
|
712
|
-
var
|
|
713
|
-
const
|
|
714
|
+
var D = {};
|
|
715
|
+
const ot = "[0-9]+", Tt = "[A-Z $%*+\\-./:]+";
|
|
714
716
|
let Z = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
715
717
|
Z = Z.replace(/u/g, "\\u");
|
|
716
|
-
const
|
|
718
|
+
const Pt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Z + `)(?:.|[\r
|
|
717
719
|
]))+`;
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
return
|
|
720
|
+
D.KANJI = new RegExp(Z, "g");
|
|
721
|
+
D.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
722
|
+
D.BYTE = new RegExp(Pt, "g");
|
|
723
|
+
D.NUMERIC = new RegExp(ot, "g");
|
|
724
|
+
D.ALPHANUMERIC = new RegExp(Tt, "g");
|
|
725
|
+
const Nt = new RegExp("^" + Z + "$"), Ut = new RegExp("^" + ot + "$"), Lt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
726
|
+
D.testKanji = function(e) {
|
|
727
|
+
return Nt.test(e);
|
|
726
728
|
};
|
|
727
|
-
|
|
728
|
-
return
|
|
729
|
+
D.testNumeric = function(e) {
|
|
730
|
+
return Ut.test(e);
|
|
729
731
|
};
|
|
730
|
-
|
|
731
|
-
return
|
|
732
|
+
D.testAlphanumeric = function(e) {
|
|
733
|
+
return Lt.test(e);
|
|
732
734
|
};
|
|
733
735
|
(function(t) {
|
|
734
|
-
const e = Se, i =
|
|
736
|
+
const e = Se, i = D;
|
|
735
737
|
t.NUMERIC = {
|
|
736
738
|
id: "Numeric",
|
|
737
739
|
bit: 1,
|
|
@@ -750,11 +752,11 @@ R.testAlphanumeric = function(e) {
|
|
|
750
752
|
ccBits: [8, 10, 12]
|
|
751
753
|
}, t.MIXED = {
|
|
752
754
|
bit: -1
|
|
753
|
-
}, t.getCharCountIndicator = function(n,
|
|
755
|
+
}, t.getCharCountIndicator = function(n, l) {
|
|
754
756
|
if (!n.ccBits) throw new Error("Invalid mode: " + n);
|
|
755
|
-
if (!e.isValid(
|
|
756
|
-
throw new Error("Invalid version: " +
|
|
757
|
-
return
|
|
757
|
+
if (!e.isValid(l))
|
|
758
|
+
throw new Error("Invalid version: " + l);
|
|
759
|
+
return l >= 1 && l < 10 ? n.ccBits[0] : l < 27 ? n.ccBits[1] : n.ccBits[2];
|
|
758
760
|
}, t.getBestModeForData = function(n) {
|
|
759
761
|
return i.testNumeric(n) ? t.NUMERIC : i.testAlphanumeric(n) ? t.ALPHANUMERIC : i.testKanji(n) ? t.KANJI : t.BYTE;
|
|
760
762
|
}, t.toString = function(n) {
|
|
@@ -779,111 +781,111 @@ R.testAlphanumeric = function(e) {
|
|
|
779
781
|
throw new Error("Unknown mode: " + o);
|
|
780
782
|
}
|
|
781
783
|
}
|
|
782
|
-
t.from = function(n,
|
|
784
|
+
t.from = function(n, l) {
|
|
783
785
|
if (t.isValid(n))
|
|
784
786
|
return n;
|
|
785
787
|
try {
|
|
786
788
|
return r(n);
|
|
787
789
|
} catch {
|
|
788
|
-
return
|
|
790
|
+
return l;
|
|
789
791
|
}
|
|
790
792
|
};
|
|
791
793
|
})($);
|
|
792
794
|
(function(t) {
|
|
793
|
-
const e = U, i =
|
|
794
|
-
function
|
|
795
|
-
for (let
|
|
796
|
-
if (d <= t.getCapacity(
|
|
797
|
-
return
|
|
795
|
+
const e = U, i = ce, r = ue, o = $, n = Se, l = 7973, s = e.getBCHDigit(l);
|
|
796
|
+
function a(h, d, w) {
|
|
797
|
+
for (let C = 1; C <= 40; C++)
|
|
798
|
+
if (d <= t.getCapacity(C, w, h))
|
|
799
|
+
return C;
|
|
798
800
|
}
|
|
799
801
|
function m(h, d) {
|
|
800
802
|
return o.getCharCountIndicator(h, d) + 4;
|
|
801
803
|
}
|
|
802
804
|
function g(h, d) {
|
|
803
|
-
let
|
|
804
|
-
return h.forEach(function(
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
}),
|
|
805
|
+
let w = 0;
|
|
806
|
+
return h.forEach(function(C) {
|
|
807
|
+
const A = m(C.mode, d);
|
|
808
|
+
w += A + C.getBitsLength();
|
|
809
|
+
}), w;
|
|
808
810
|
}
|
|
809
811
|
function B(h, d) {
|
|
810
|
-
for (let
|
|
811
|
-
if (g(h,
|
|
812
|
-
return
|
|
812
|
+
for (let w = 1; w <= 40; w++)
|
|
813
|
+
if (g(h, w) <= t.getCapacity(w, d, o.MIXED))
|
|
814
|
+
return w;
|
|
813
815
|
}
|
|
814
|
-
t.from = function(d,
|
|
815
|
-
return n.isValid(d) ? parseInt(d, 10) :
|
|
816
|
-
}, t.getCapacity = function(d,
|
|
816
|
+
t.from = function(d, w) {
|
|
817
|
+
return n.isValid(d) ? parseInt(d, 10) : w;
|
|
818
|
+
}, t.getCapacity = function(d, w, C) {
|
|
817
819
|
if (!n.isValid(d))
|
|
818
820
|
throw new Error("Invalid QR Code version");
|
|
819
|
-
typeof
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
822
|
-
const
|
|
823
|
-
switch (
|
|
821
|
+
typeof C > "u" && (C = o.BYTE);
|
|
822
|
+
const A = e.getSymbolTotalCodewords(d), p = i.getTotalCodewordsCount(d, w), v = (A - p) * 8;
|
|
823
|
+
if (C === o.MIXED) return v;
|
|
824
|
+
const y = v - m(C, d);
|
|
825
|
+
switch (C) {
|
|
824
826
|
case o.NUMERIC:
|
|
825
|
-
return Math.floor(
|
|
827
|
+
return Math.floor(y / 10 * 3);
|
|
826
828
|
case o.ALPHANUMERIC:
|
|
827
|
-
return Math.floor(
|
|
829
|
+
return Math.floor(y / 11 * 2);
|
|
828
830
|
case o.KANJI:
|
|
829
|
-
return Math.floor(
|
|
831
|
+
return Math.floor(y / 13);
|
|
830
832
|
case o.BYTE:
|
|
831
833
|
default:
|
|
832
|
-
return Math.floor(
|
|
834
|
+
return Math.floor(y / 8);
|
|
833
835
|
}
|
|
834
|
-
}, t.getBestVersionForData = function(d,
|
|
835
|
-
let
|
|
836
|
-
const
|
|
836
|
+
}, t.getBestVersionForData = function(d, w) {
|
|
837
|
+
let C;
|
|
838
|
+
const A = r.from(w, r.M);
|
|
837
839
|
if (Array.isArray(d)) {
|
|
838
840
|
if (d.length > 1)
|
|
839
|
-
return B(d,
|
|
841
|
+
return B(d, A);
|
|
840
842
|
if (d.length === 0)
|
|
841
843
|
return 1;
|
|
842
|
-
|
|
844
|
+
C = d[0];
|
|
843
845
|
} else
|
|
844
|
-
|
|
845
|
-
return
|
|
846
|
+
C = d;
|
|
847
|
+
return a(C.mode, C.getLength(), A);
|
|
846
848
|
}, t.getEncodedBits = function(d) {
|
|
847
849
|
if (!n.isValid(d) || d < 7)
|
|
848
850
|
throw new Error("Invalid QR Code version");
|
|
849
|
-
let
|
|
850
|
-
for (; e.getBCHDigit(
|
|
851
|
-
|
|
852
|
-
return d << 12 |
|
|
851
|
+
let w = d << 12;
|
|
852
|
+
for (; e.getBCHDigit(w) - s >= 0; )
|
|
853
|
+
w ^= l << e.getBCHDigit(w) - s;
|
|
854
|
+
return d << 12 | w;
|
|
853
855
|
};
|
|
854
|
-
})(
|
|
855
|
-
var
|
|
856
|
-
const Ce = U,
|
|
857
|
-
|
|
856
|
+
})(nt);
|
|
857
|
+
var rt = {};
|
|
858
|
+
const Ce = U, it = 1335, Ft = 21522, ze = Ce.getBCHDigit(it);
|
|
859
|
+
rt.getEncodedBits = function(e, i) {
|
|
858
860
|
const r = e.bit << 3 | i;
|
|
859
861
|
let o = r << 10;
|
|
860
|
-
for (; Ce.getBCHDigit(o) -
|
|
861
|
-
o ^=
|
|
862
|
-
return (r << 10 | o) ^
|
|
862
|
+
for (; Ce.getBCHDigit(o) - ze >= 0; )
|
|
863
|
+
o ^= it << Ce.getBCHDigit(o) - ze;
|
|
864
|
+
return (r << 10 | o) ^ Ft;
|
|
863
865
|
};
|
|
864
|
-
var
|
|
865
|
-
const
|
|
866
|
-
function
|
|
867
|
-
this.mode =
|
|
866
|
+
var st = {};
|
|
867
|
+
const Rt = $;
|
|
868
|
+
function O(t) {
|
|
869
|
+
this.mode = Rt.NUMERIC, this.data = t.toString();
|
|
868
870
|
}
|
|
869
|
-
|
|
871
|
+
O.getBitsLength = function(e) {
|
|
870
872
|
return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
|
|
871
873
|
};
|
|
872
|
-
|
|
874
|
+
O.prototype.getLength = function() {
|
|
873
875
|
return this.data.length;
|
|
874
876
|
};
|
|
875
|
-
|
|
876
|
-
return
|
|
877
|
+
O.prototype.getBitsLength = function() {
|
|
878
|
+
return O.getBitsLength(this.data.length);
|
|
877
879
|
};
|
|
878
|
-
|
|
880
|
+
O.prototype.write = function(e) {
|
|
879
881
|
let i, r, o;
|
|
880
882
|
for (i = 0; i + 3 <= this.data.length; i += 3)
|
|
881
883
|
r = this.data.substr(i, 3), o = parseInt(r, 10), e.put(o, 10);
|
|
882
884
|
const n = this.data.length - i;
|
|
883
885
|
n > 0 && (r = this.data.substr(i), o = parseInt(r, 10), e.put(o, n * 3 + 1));
|
|
884
886
|
};
|
|
885
|
-
var
|
|
886
|
-
const
|
|
887
|
+
var Dt = O;
|
|
888
|
+
const kt = $, ge = [
|
|
887
889
|
"0",
|
|
888
890
|
"1",
|
|
889
891
|
"2",
|
|
@@ -930,19 +932,19 @@ const Rt = $, ge = [
|
|
|
930
932
|
"/",
|
|
931
933
|
":"
|
|
932
934
|
];
|
|
933
|
-
function
|
|
934
|
-
this.mode =
|
|
935
|
+
function Y(t) {
|
|
936
|
+
this.mode = kt.ALPHANUMERIC, this.data = t;
|
|
935
937
|
}
|
|
936
|
-
|
|
938
|
+
Y.getBitsLength = function(e) {
|
|
937
939
|
return 11 * Math.floor(e / 2) + 6 * (e % 2);
|
|
938
940
|
};
|
|
939
|
-
|
|
941
|
+
Y.prototype.getLength = function() {
|
|
940
942
|
return this.data.length;
|
|
941
943
|
};
|
|
942
|
-
|
|
943
|
-
return
|
|
944
|
+
Y.prototype.getBitsLength = function() {
|
|
945
|
+
return Y.getBitsLength(this.data.length);
|
|
944
946
|
};
|
|
945
|
-
|
|
947
|
+
Y.prototype.write = function(e) {
|
|
946
948
|
let i;
|
|
947
949
|
for (i = 0; i + 2 <= this.data.length; i += 2) {
|
|
948
950
|
let r = ge.indexOf(this.data[i]) * 45;
|
|
@@ -950,12 +952,12 @@ j.prototype.write = function(e) {
|
|
|
950
952
|
}
|
|
951
953
|
this.data.length % 2 && e.put(ge.indexOf(this.data[i]), 6);
|
|
952
954
|
};
|
|
953
|
-
var
|
|
955
|
+
var Vt = Y, xt = function(e) {
|
|
954
956
|
for (var i = [], r = e.length, o = 0; o < r; o++) {
|
|
955
957
|
var n = e.charCodeAt(o);
|
|
956
958
|
if (n >= 55296 && n <= 56319 && r > o + 1) {
|
|
957
|
-
var
|
|
958
|
-
|
|
959
|
+
var l = e.charCodeAt(o + 1);
|
|
960
|
+
l >= 56320 && l <= 57343 && (n = (n - 55296) * 1024 + l - 56320 + 65536, o += 1);
|
|
959
961
|
}
|
|
960
962
|
if (n < 128) {
|
|
961
963
|
i.push(n);
|
|
@@ -977,41 +979,41 @@ var Dt = j, kt = function(e) {
|
|
|
977
979
|
}
|
|
978
980
|
return new Uint8Array(i).buffer;
|
|
979
981
|
};
|
|
980
|
-
const
|
|
981
|
-
function
|
|
982
|
-
this.mode =
|
|
982
|
+
const zt = xt, $t = $;
|
|
983
|
+
function j(t) {
|
|
984
|
+
this.mode = $t.BYTE, typeof t == "string" && (t = zt(t)), this.data = new Uint8Array(t);
|
|
983
985
|
}
|
|
984
|
-
|
|
986
|
+
j.getBitsLength = function(e) {
|
|
985
987
|
return e * 8;
|
|
986
988
|
};
|
|
987
|
-
|
|
989
|
+
j.prototype.getLength = function() {
|
|
988
990
|
return this.data.length;
|
|
989
991
|
};
|
|
990
|
-
|
|
991
|
-
return
|
|
992
|
+
j.prototype.getBitsLength = function() {
|
|
993
|
+
return j.getBitsLength(this.data.length);
|
|
992
994
|
};
|
|
993
|
-
|
|
995
|
+
j.prototype.write = function(t) {
|
|
994
996
|
for (let e = 0, i = this.data.length; e < i; e++)
|
|
995
997
|
t.put(this.data[e], 8);
|
|
996
998
|
};
|
|
997
|
-
var
|
|
998
|
-
const
|
|
999
|
-
function
|
|
1000
|
-
this.mode =
|
|
999
|
+
var Ht = j;
|
|
1000
|
+
const Kt = $, Ot = U;
|
|
1001
|
+
function J(t) {
|
|
1002
|
+
this.mode = Kt.KANJI, this.data = t;
|
|
1001
1003
|
}
|
|
1002
|
-
|
|
1004
|
+
J.getBitsLength = function(e) {
|
|
1003
1005
|
return e * 13;
|
|
1004
1006
|
};
|
|
1005
|
-
|
|
1007
|
+
J.prototype.getLength = function() {
|
|
1006
1008
|
return this.data.length;
|
|
1007
1009
|
};
|
|
1008
|
-
|
|
1009
|
-
return
|
|
1010
|
+
J.prototype.getBitsLength = function() {
|
|
1011
|
+
return J.getBitsLength(this.data.length);
|
|
1010
1012
|
};
|
|
1011
|
-
|
|
1013
|
+
J.prototype.write = function(t) {
|
|
1012
1014
|
let e;
|
|
1013
1015
|
for (e = 0; e < this.data.length; e++) {
|
|
1014
|
-
let i =
|
|
1016
|
+
let i = Ot.toSJIS(this.data[e]);
|
|
1015
1017
|
if (i >= 33088 && i <= 40956)
|
|
1016
1018
|
i -= 33088;
|
|
1017
1019
|
else if (i >= 57408 && i <= 60351)
|
|
@@ -1024,20 +1026,20 @@ Make sure your charset is UTF-8`
|
|
|
1024
1026
|
i = (i >>> 8 & 255) * 192 + (i & 255), t.put(i, 13);
|
|
1025
1027
|
}
|
|
1026
1028
|
};
|
|
1027
|
-
var
|
|
1029
|
+
var Yt = J, lt = { exports: {} };
|
|
1028
1030
|
(function(t) {
|
|
1029
1031
|
var e = {
|
|
1030
1032
|
single_source_shortest_paths: function(i, r, o) {
|
|
1031
|
-
var n = {},
|
|
1032
|
-
|
|
1033
|
+
var n = {}, l = {};
|
|
1034
|
+
l[r] = 0;
|
|
1033
1035
|
var s = e.PriorityQueue.make();
|
|
1034
1036
|
s.push(r, 0);
|
|
1035
|
-
for (var
|
|
1036
|
-
|
|
1037
|
+
for (var a, m, g, B, h, d, w, C, A; !s.empty(); ) {
|
|
1038
|
+
a = s.pop(), m = a.value, B = a.cost, h = i[m] || {};
|
|
1037
1039
|
for (g in h)
|
|
1038
|
-
h.hasOwnProperty(g) && (d = h[g],
|
|
1040
|
+
h.hasOwnProperty(g) && (d = h[g], w = B + d, C = l[g], A = typeof l[g] > "u", (A || C > w) && (l[g] = w, s.push(g, w), n[g] = m));
|
|
1039
1041
|
}
|
|
1040
|
-
if (typeof o < "u" && typeof
|
|
1042
|
+
if (typeof o < "u" && typeof l[o] > "u") {
|
|
1041
1043
|
var p = ["Could not find a path from ", r, " to ", o, "."].join("");
|
|
1042
1044
|
throw new Error(p);
|
|
1043
1045
|
}
|
|
@@ -1089,40 +1091,40 @@ var Kt = q, st = { exports: {} };
|
|
|
1089
1091
|
}
|
|
1090
1092
|
};
|
|
1091
1093
|
t.exports = e;
|
|
1092
|
-
})(
|
|
1093
|
-
var
|
|
1094
|
+
})(lt);
|
|
1095
|
+
var jt = lt.exports;
|
|
1094
1096
|
(function(t) {
|
|
1095
|
-
const e = $, i =
|
|
1097
|
+
const e = $, i = Dt, r = Vt, o = Ht, n = Yt, l = D, s = U, a = jt;
|
|
1096
1098
|
function m(p) {
|
|
1097
1099
|
return unescape(encodeURIComponent(p)).length;
|
|
1098
1100
|
}
|
|
1099
|
-
function g(p,
|
|
1100
|
-
const
|
|
1101
|
-
let
|
|
1102
|
-
for (; (
|
|
1103
|
-
|
|
1104
|
-
data:
|
|
1105
|
-
index:
|
|
1106
|
-
mode:
|
|
1107
|
-
length:
|
|
1101
|
+
function g(p, v, y) {
|
|
1102
|
+
const f = [];
|
|
1103
|
+
let u;
|
|
1104
|
+
for (; (u = p.exec(y)) !== null; )
|
|
1105
|
+
f.push({
|
|
1106
|
+
data: u[0],
|
|
1107
|
+
index: u.index,
|
|
1108
|
+
mode: v,
|
|
1109
|
+
length: u[0].length
|
|
1108
1110
|
});
|
|
1109
|
-
return
|
|
1111
|
+
return f;
|
|
1110
1112
|
}
|
|
1111
1113
|
function B(p) {
|
|
1112
|
-
const
|
|
1113
|
-
let
|
|
1114
|
-
return s.isKanjiModeEnabled() ? (
|
|
1115
|
-
return
|
|
1116
|
-
}).map(function(
|
|
1114
|
+
const v = g(l.NUMERIC, e.NUMERIC, p), y = g(l.ALPHANUMERIC, e.ALPHANUMERIC, p);
|
|
1115
|
+
let f, u;
|
|
1116
|
+
return s.isKanjiModeEnabled() ? (f = g(l.BYTE, e.BYTE, p), u = g(l.KANJI, e.KANJI, p)) : (f = g(l.BYTE_KANJI, e.BYTE, p), u = []), v.concat(y, f, u).sort(function(M, I) {
|
|
1117
|
+
return M.index - I.index;
|
|
1118
|
+
}).map(function(M) {
|
|
1117
1119
|
return {
|
|
1118
|
-
data:
|
|
1119
|
-
mode:
|
|
1120
|
-
length:
|
|
1120
|
+
data: M.data,
|
|
1121
|
+
mode: M.mode,
|
|
1122
|
+
length: M.length
|
|
1121
1123
|
};
|
|
1122
1124
|
});
|
|
1123
1125
|
}
|
|
1124
|
-
function h(p,
|
|
1125
|
-
switch (
|
|
1126
|
+
function h(p, v) {
|
|
1127
|
+
switch (v) {
|
|
1126
1128
|
case e.NUMERIC:
|
|
1127
1129
|
return i.getBitsLength(p);
|
|
1128
1130
|
case e.ALPHANUMERIC:
|
|
@@ -1134,69 +1136,69 @@ var Ot = st.exports;
|
|
|
1134
1136
|
}
|
|
1135
1137
|
}
|
|
1136
1138
|
function d(p) {
|
|
1137
|
-
return p.reduce(function(
|
|
1138
|
-
const
|
|
1139
|
-
return
|
|
1139
|
+
return p.reduce(function(v, y) {
|
|
1140
|
+
const f = v.length - 1 >= 0 ? v[v.length - 1] : null;
|
|
1141
|
+
return f && f.mode === y.mode ? (v[v.length - 1].data += y.data, v) : (v.push(y), v);
|
|
1140
1142
|
}, []);
|
|
1141
1143
|
}
|
|
1142
|
-
function
|
|
1143
|
-
const
|
|
1144
|
-
for (let
|
|
1145
|
-
const
|
|
1146
|
-
switch (
|
|
1144
|
+
function w(p) {
|
|
1145
|
+
const v = [];
|
|
1146
|
+
for (let y = 0; y < p.length; y++) {
|
|
1147
|
+
const f = p[y];
|
|
1148
|
+
switch (f.mode) {
|
|
1147
1149
|
case e.NUMERIC:
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
{ data:
|
|
1151
|
-
{ data:
|
|
1150
|
+
v.push([
|
|
1151
|
+
f,
|
|
1152
|
+
{ data: f.data, mode: e.ALPHANUMERIC, length: f.length },
|
|
1153
|
+
{ data: f.data, mode: e.BYTE, length: f.length }
|
|
1152
1154
|
]);
|
|
1153
1155
|
break;
|
|
1154
1156
|
case e.ALPHANUMERIC:
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
{ data:
|
|
1157
|
+
v.push([
|
|
1158
|
+
f,
|
|
1159
|
+
{ data: f.data, mode: e.BYTE, length: f.length }
|
|
1158
1160
|
]);
|
|
1159
1161
|
break;
|
|
1160
1162
|
case e.KANJI:
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
{ data:
|
|
1163
|
+
v.push([
|
|
1164
|
+
f,
|
|
1165
|
+
{ data: f.data, mode: e.BYTE, length: m(f.data) }
|
|
1164
1166
|
]);
|
|
1165
1167
|
break;
|
|
1166
1168
|
case e.BYTE:
|
|
1167
|
-
|
|
1168
|
-
{ data:
|
|
1169
|
+
v.push([
|
|
1170
|
+
{ data: f.data, mode: e.BYTE, length: m(f.data) }
|
|
1169
1171
|
]);
|
|
1170
1172
|
}
|
|
1171
1173
|
}
|
|
1172
|
-
return
|
|
1174
|
+
return v;
|
|
1173
1175
|
}
|
|
1174
|
-
function
|
|
1175
|
-
const
|
|
1176
|
-
let
|
|
1177
|
-
for (let
|
|
1178
|
-
const
|
|
1179
|
-
for (let
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1182
|
-
for (let
|
|
1183
|
-
const L =
|
|
1184
|
-
|
|
1176
|
+
function C(p, v) {
|
|
1177
|
+
const y = {}, f = { start: {} };
|
|
1178
|
+
let u = ["start"];
|
|
1179
|
+
for (let _ = 0; _ < p.length; _++) {
|
|
1180
|
+
const M = p[_], I = [];
|
|
1181
|
+
for (let N = 0; N < M.length; N++) {
|
|
1182
|
+
const P = M[N], k = "" + _ + N;
|
|
1183
|
+
I.push(k), y[k] = { node: P, lastCount: 0 }, f[k] = {};
|
|
1184
|
+
for (let q = 0; q < u.length; q++) {
|
|
1185
|
+
const L = u[q];
|
|
1186
|
+
y[L] && y[L].node.mode === P.mode ? (f[L][k] = h(y[L].lastCount + P.length, P.mode) - h(y[L].lastCount, P.mode), y[L].lastCount += P.length) : (y[L] && (y[L].lastCount = P.length), f[L][k] = h(P.length, P.mode) + 4 + e.getCharCountIndicator(P.mode, v));
|
|
1185
1187
|
}
|
|
1186
1188
|
}
|
|
1187
|
-
|
|
1189
|
+
u = I;
|
|
1188
1190
|
}
|
|
1189
|
-
for (let
|
|
1190
|
-
|
|
1191
|
-
return { map:
|
|
1191
|
+
for (let _ = 0; _ < u.length; _++)
|
|
1192
|
+
f[u[_]].end = 0;
|
|
1193
|
+
return { map: f, table: y };
|
|
1192
1194
|
}
|
|
1193
|
-
function
|
|
1194
|
-
let
|
|
1195
|
-
const
|
|
1196
|
-
if (
|
|
1197
|
-
throw new Error('"' + p + '" cannot be encoded with mode ' + e.toString(
|
|
1198
|
-
Suggested mode is: ` + e.toString(
|
|
1199
|
-
switch (
|
|
1195
|
+
function A(p, v) {
|
|
1196
|
+
let y;
|
|
1197
|
+
const f = e.getBestModeForData(p);
|
|
1198
|
+
if (y = e.from(v, f), y !== e.BYTE && y.bit < f.bit)
|
|
1199
|
+
throw new Error('"' + p + '" cannot be encoded with mode ' + e.toString(y) + `.
|
|
1200
|
+
Suggested mode is: ` + e.toString(f));
|
|
1201
|
+
switch (y === e.KANJI && !s.isKanjiModeEnabled() && (y = e.BYTE), y) {
|
|
1200
1202
|
case e.NUMERIC:
|
|
1201
1203
|
return new i(p);
|
|
1202
1204
|
case e.ALPHANUMERIC:
|
|
@@ -1207,70 +1209,70 @@ var Ot = st.exports;
|
|
|
1207
1209
|
return new o(p);
|
|
1208
1210
|
}
|
|
1209
1211
|
}
|
|
1210
|
-
t.fromArray = function(
|
|
1211
|
-
return
|
|
1212
|
-
return typeof
|
|
1212
|
+
t.fromArray = function(v) {
|
|
1213
|
+
return v.reduce(function(y, f) {
|
|
1214
|
+
return typeof f == "string" ? y.push(A(f, null)) : f.data && y.push(A(f.data, f.mode)), y;
|
|
1213
1215
|
}, []);
|
|
1214
|
-
}, t.fromString = function(
|
|
1215
|
-
const
|
|
1216
|
-
for (let
|
|
1217
|
-
|
|
1218
|
-
return t.fromArray(d(
|
|
1219
|
-
}, t.rawSplit = function(
|
|
1216
|
+
}, t.fromString = function(v, y) {
|
|
1217
|
+
const f = B(v, s.isKanjiModeEnabled()), u = w(f), _ = C(u, y), M = a.find_path(_.map, "start", "end"), I = [];
|
|
1218
|
+
for (let N = 1; N < M.length - 1; N++)
|
|
1219
|
+
I.push(_.table[M[N]].node);
|
|
1220
|
+
return t.fromArray(d(I));
|
|
1221
|
+
}, t.rawSplit = function(v) {
|
|
1220
1222
|
return t.fromArray(
|
|
1221
|
-
B(
|
|
1223
|
+
B(v, s.isKanjiModeEnabled())
|
|
1222
1224
|
);
|
|
1223
1225
|
};
|
|
1224
|
-
})(
|
|
1225
|
-
const fe = U, he =
|
|
1226
|
-
function
|
|
1227
|
-
const i = t.size, r =
|
|
1226
|
+
})(st);
|
|
1227
|
+
const fe = U, he = ue, Jt = _t, qt = Mt, Gt = We, Qt = Xe, Ee = Ze, Be = ce, Wt = It, ae = nt, Xt = rt, Zt = $, pe = st;
|
|
1228
|
+
function en(t, e) {
|
|
1229
|
+
const i = t.size, r = Qt.getPositions(e);
|
|
1228
1230
|
for (let o = 0; o < r.length; o++) {
|
|
1229
|
-
const n = r[o][0],
|
|
1231
|
+
const n = r[o][0], l = r[o][1];
|
|
1230
1232
|
for (let s = -1; s <= 7; s++)
|
|
1231
1233
|
if (!(n + s <= -1 || i <= n + s))
|
|
1232
|
-
for (let
|
|
1233
|
-
|
|
1234
|
+
for (let a = -1; a <= 7; a++)
|
|
1235
|
+
l + a <= -1 || i <= l + a || (s >= 0 && s <= 6 && (a === 0 || a === 6) || a >= 0 && a <= 6 && (s === 0 || s === 6) || s >= 2 && s <= 4 && a >= 2 && a <= 4 ? t.set(n + s, l + a, !0, !0) : t.set(n + s, l + a, !1, !0));
|
|
1234
1236
|
}
|
|
1235
1237
|
}
|
|
1236
|
-
function
|
|
1238
|
+
function tn(t) {
|
|
1237
1239
|
const e = t.size;
|
|
1238
1240
|
for (let i = 8; i < e - 8; i++) {
|
|
1239
1241
|
const r = i % 2 === 0;
|
|
1240
1242
|
t.set(i, 6, r, !0), t.set(6, i, r, !0);
|
|
1241
1243
|
}
|
|
1242
1244
|
}
|
|
1243
|
-
function
|
|
1244
|
-
const i =
|
|
1245
|
+
function nn(t, e) {
|
|
1246
|
+
const i = Gt.getPositions(e);
|
|
1245
1247
|
for (let r = 0; r < i.length; r++) {
|
|
1246
1248
|
const o = i[r][0], n = i[r][1];
|
|
1247
|
-
for (let
|
|
1249
|
+
for (let l = -2; l <= 2; l++)
|
|
1248
1250
|
for (let s = -2; s <= 2; s++)
|
|
1249
|
-
|
|
1251
|
+
l === -2 || l === 2 || s === -2 || s === 2 || l === 0 && s === 0 ? t.set(o + l, n + s, !0, !0) : t.set(o + l, n + s, !1, !0);
|
|
1250
1252
|
}
|
|
1251
1253
|
}
|
|
1252
|
-
function
|
|
1253
|
-
const i = t.size, r =
|
|
1254
|
-
let o, n,
|
|
1254
|
+
function on(t, e) {
|
|
1255
|
+
const i = t.size, r = ae.getEncodedBits(e);
|
|
1256
|
+
let o, n, l;
|
|
1255
1257
|
for (let s = 0; s < 18; s++)
|
|
1256
|
-
o = Math.floor(s / 3), n = s % 3 + i - 8 - 3,
|
|
1258
|
+
o = Math.floor(s / 3), n = s % 3 + i - 8 - 3, l = (r >> s & 1) === 1, t.set(o, n, l, !0), t.set(n, o, l, !0);
|
|
1257
1259
|
}
|
|
1258
1260
|
function ye(t, e, i) {
|
|
1259
|
-
const r = t.size, o =
|
|
1260
|
-
let n,
|
|
1261
|
+
const r = t.size, o = Xt.getEncodedBits(e, i);
|
|
1262
|
+
let n, l;
|
|
1261
1263
|
for (n = 0; n < 15; n++)
|
|
1262
|
-
|
|
1264
|
+
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);
|
|
1263
1265
|
t.set(r - 8, 8, 1, !0);
|
|
1264
1266
|
}
|
|
1265
|
-
function
|
|
1267
|
+
function rn(t, e) {
|
|
1266
1268
|
const i = t.size;
|
|
1267
|
-
let r = -1, o = i - 1, n = 7,
|
|
1269
|
+
let r = -1, o = i - 1, n = 7, l = 0;
|
|
1268
1270
|
for (let s = i - 1; s > 0; s -= 2)
|
|
1269
1271
|
for (s === 6 && s--; ; ) {
|
|
1270
|
-
for (let
|
|
1271
|
-
if (!t.isReserved(o, s -
|
|
1272
|
+
for (let a = 0; a < 2; a++)
|
|
1273
|
+
if (!t.isReserved(o, s - a)) {
|
|
1272
1274
|
let m = !1;
|
|
1273
|
-
|
|
1275
|
+
l < e.length && (m = (e[l] >>> n & 1) === 1), t.set(o, s - a, m), n--, n === -1 && (l++, n = 7);
|
|
1274
1276
|
}
|
|
1275
1277
|
if (o += r, o < 0 || i <= o) {
|
|
1276
1278
|
o -= r, r = -r;
|
|
@@ -1278,40 +1280,40 @@ function nn(t, e) {
|
|
|
1278
1280
|
}
|
|
1279
1281
|
}
|
|
1280
1282
|
}
|
|
1281
|
-
function
|
|
1282
|
-
const r = new
|
|
1283
|
-
i.forEach(function(
|
|
1284
|
-
r.put(
|
|
1283
|
+
function sn(t, e, i) {
|
|
1284
|
+
const r = new Jt();
|
|
1285
|
+
i.forEach(function(a) {
|
|
1286
|
+
r.put(a.mode.bit, 4), r.put(a.getLength(), Zt.getCharCountIndicator(a.mode, t)), a.write(r);
|
|
1285
1287
|
});
|
|
1286
|
-
const o = fe.getSymbolTotalCodewords(t), n =
|
|
1287
|
-
for (r.getLengthInBits() + 4 <=
|
|
1288
|
+
const o = fe.getSymbolTotalCodewords(t), n = Be.getTotalCodewordsCount(t, e), l = (o - n) * 8;
|
|
1289
|
+
for (r.getLengthInBits() + 4 <= l && r.put(0, 4); r.getLengthInBits() % 8 !== 0; )
|
|
1288
1290
|
r.putBit(0);
|
|
1289
|
-
const s = (
|
|
1290
|
-
for (let
|
|
1291
|
-
r.put(
|
|
1292
|
-
return
|
|
1291
|
+
const s = (l - r.getLengthInBits()) / 8;
|
|
1292
|
+
for (let a = 0; a < s; a++)
|
|
1293
|
+
r.put(a % 2 ? 17 : 236, 8);
|
|
1294
|
+
return ln(r, t, e);
|
|
1293
1295
|
}
|
|
1294
|
-
function
|
|
1295
|
-
const r = fe.getSymbolTotalCodewords(e), o =
|
|
1296
|
-
let
|
|
1297
|
-
const
|
|
1296
|
+
function ln(t, e, i) {
|
|
1297
|
+
const r = fe.getSymbolTotalCodewords(e), o = Be.getTotalCodewordsCount(e, i), n = r - o, l = Be.getBlocksCount(e, i), s = r % l, a = l - s, m = Math.floor(r / l), g = Math.floor(n / l), B = g + 1, h = m - g, d = new Wt(h);
|
|
1298
|
+
let w = 0;
|
|
1299
|
+
const C = new Array(l), A = new Array(l);
|
|
1298
1300
|
let p = 0;
|
|
1299
|
-
const
|
|
1300
|
-
for (let
|
|
1301
|
-
const
|
|
1302
|
-
|
|
1301
|
+
const v = new Uint8Array(t.buffer);
|
|
1302
|
+
for (let M = 0; M < l; M++) {
|
|
1303
|
+
const I = M < a ? g : B;
|
|
1304
|
+
C[M] = v.slice(w, w + I), A[M] = d.encode(C[M]), w += I, p = Math.max(p, I);
|
|
1303
1305
|
}
|
|
1304
|
-
const
|
|
1305
|
-
let
|
|
1306
|
-
for (
|
|
1307
|
-
for (
|
|
1308
|
-
|
|
1309
|
-
for (
|
|
1310
|
-
for (
|
|
1311
|
-
f
|
|
1312
|
-
return
|
|
1306
|
+
const y = new Uint8Array(r);
|
|
1307
|
+
let f = 0, u, _;
|
|
1308
|
+
for (u = 0; u < p; u++)
|
|
1309
|
+
for (_ = 0; _ < l; _++)
|
|
1310
|
+
u < C[_].length && (y[f++] = C[_][u]);
|
|
1311
|
+
for (u = 0; u < h; u++)
|
|
1312
|
+
for (_ = 0; _ < l; _++)
|
|
1313
|
+
y[f++] = A[_][u];
|
|
1314
|
+
return y;
|
|
1313
1315
|
}
|
|
1314
|
-
function
|
|
1316
|
+
function an(t, e, i, r) {
|
|
1315
1317
|
let o;
|
|
1316
1318
|
if (Array.isArray(t))
|
|
1317
1319
|
o = pe.fromArray(t);
|
|
@@ -1319,12 +1321,12 @@ function sn(t, e, i, r) {
|
|
|
1319
1321
|
let m = e;
|
|
1320
1322
|
if (!m) {
|
|
1321
1323
|
const g = pe.rawSplit(t);
|
|
1322
|
-
m =
|
|
1324
|
+
m = ae.getBestVersionForData(g, i);
|
|
1323
1325
|
}
|
|
1324
1326
|
o = pe.fromString(t, m || 40);
|
|
1325
1327
|
} else
|
|
1326
1328
|
throw new Error("Invalid data");
|
|
1327
|
-
const n =
|
|
1329
|
+
const n = ae.getBestVersionForData(o, i);
|
|
1328
1330
|
if (!n)
|
|
1329
1331
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1330
1332
|
if (!e)
|
|
@@ -1336,25 +1338,25 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1336
1338
|
Minimum version required to store current data is: ` + n + `.
|
|
1337
1339
|
`
|
|
1338
1340
|
);
|
|
1339
|
-
const
|
|
1340
|
-
return
|
|
1341
|
-
|
|
1342
|
-
ye.bind(null,
|
|
1343
|
-
)),
|
|
1344
|
-
modules:
|
|
1341
|
+
const l = sn(e, i, o), s = fe.getSymbolSize(e), a = new qt(s);
|
|
1342
|
+
return en(a, e), tn(a), nn(a, e), ye(a, i, 0), e >= 7 && on(a, e), rn(a, l), isNaN(r) && (r = Ee.getBestMask(
|
|
1343
|
+
a,
|
|
1344
|
+
ye.bind(null, a, i)
|
|
1345
|
+
)), Ee.applyMask(r, a), ye(a, i, r), {
|
|
1346
|
+
modules: a,
|
|
1345
1347
|
version: e,
|
|
1346
1348
|
errorCorrectionLevel: i,
|
|
1347
1349
|
maskPattern: r,
|
|
1348
1350
|
segments: o
|
|
1349
1351
|
};
|
|
1350
1352
|
}
|
|
1351
|
-
|
|
1353
|
+
Ge.create = function(e, i) {
|
|
1352
1354
|
if (typeof e > "u" || e === "")
|
|
1353
1355
|
throw new Error("No input text");
|
|
1354
1356
|
let r = he.M, o, n;
|
|
1355
|
-
return typeof i < "u" && (r = he.from(i.errorCorrectionLevel, he.M), o =
|
|
1357
|
+
return typeof i < "u" && (r = he.from(i.errorCorrectionLevel, he.M), o = ae.from(i.version), n = Ee.from(i.maskPattern), i.toSJISFunc && fe.setToSJISFunction(i.toSJISFunc)), an(e, o, r, n);
|
|
1356
1358
|
};
|
|
1357
|
-
var at = {},
|
|
1359
|
+
var at = {}, Ie = {};
|
|
1358
1360
|
(function(t) {
|
|
1359
1361
|
function e(i) {
|
|
1360
1362
|
if (typeof i == "number" && (i = i.toString()), typeof i != "string")
|
|
@@ -1376,10 +1378,10 @@ var at = {}, Te = {};
|
|
|
1376
1378
|
}
|
|
1377
1379
|
t.getOptions = function(r) {
|
|
1378
1380
|
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,
|
|
1381
|
+
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;
|
|
1380
1382
|
return {
|
|
1381
1383
|
width: n,
|
|
1382
|
-
scale: n ? 4 :
|
|
1384
|
+
scale: n ? 4 : l,
|
|
1383
1385
|
margin: o,
|
|
1384
1386
|
color: {
|
|
1385
1387
|
dark: e(r.color.dark || "#000000ff"),
|
|
@@ -1394,22 +1396,22 @@ var at = {}, Te = {};
|
|
|
1394
1396
|
const n = t.getScale(r, o);
|
|
1395
1397
|
return Math.floor((r + o.margin * 2) * n);
|
|
1396
1398
|
}, t.qrToImageData = function(r, o, n) {
|
|
1397
|
-
const
|
|
1399
|
+
const l = o.modules.size, s = o.modules.data, a = t.getScale(l, n), m = Math.floor((l + n.margin * 2) * a), g = n.margin * a, B = [n.color.light, n.color.dark];
|
|
1398
1400
|
for (let h = 0; h < m; h++)
|
|
1399
1401
|
for (let d = 0; d < m; d++) {
|
|
1400
|
-
let
|
|
1402
|
+
let w = (h * m + d) * 4, C = n.color.light;
|
|
1401
1403
|
if (h >= g && d >= g && h < m - g && d < m - g) {
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1404
|
+
const A = Math.floor((h - g) / a), p = Math.floor((d - g) / a);
|
|
1405
|
+
C = B[s[A * l + p] ? 1 : 0];
|
|
1404
1406
|
}
|
|
1405
|
-
r[
|
|
1407
|
+
r[w++] = C.r, r[w++] = C.g, r[w++] = C.b, r[w] = C.a;
|
|
1406
1408
|
}
|
|
1407
1409
|
};
|
|
1408
|
-
})(
|
|
1410
|
+
})(Ie);
|
|
1409
1411
|
(function(t) {
|
|
1410
|
-
const e =
|
|
1411
|
-
function i(o, n,
|
|
1412
|
-
o.clearRect(0, 0, n.width, n.height), n.style || (n.style = {}), n.height =
|
|
1412
|
+
const e = Ie;
|
|
1413
|
+
function i(o, n, l) {
|
|
1414
|
+
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";
|
|
1413
1415
|
}
|
|
1414
1416
|
function r() {
|
|
1415
1417
|
try {
|
|
@@ -1418,20 +1420,20 @@ var at = {}, Te = {};
|
|
|
1418
1420
|
throw new Error("You need to specify a canvas element");
|
|
1419
1421
|
}
|
|
1420
1422
|
}
|
|
1421
|
-
t.render = function(n,
|
|
1422
|
-
let
|
|
1423
|
-
typeof
|
|
1424
|
-
const g = e.getImageWidth(n.modules.size,
|
|
1425
|
-
return e.qrToImageData(h.data, n,
|
|
1426
|
-
}, t.renderToDataURL = function(n,
|
|
1427
|
-
let
|
|
1428
|
-
typeof
|
|
1429
|
-
const m = t.render(n,
|
|
1423
|
+
t.render = function(n, l, s) {
|
|
1424
|
+
let a = s, m = l;
|
|
1425
|
+
typeof a > "u" && (!l || !l.getContext) && (a = l, l = void 0), l || (m = r()), a = e.getOptions(a);
|
|
1426
|
+
const g = e.getImageWidth(n.modules.size, a), B = m.getContext("2d"), h = B.createImageData(g, g);
|
|
1427
|
+
return e.qrToImageData(h.data, n, a), i(B, m, g), B.putImageData(h, 0, 0), m;
|
|
1428
|
+
}, t.renderToDataURL = function(n, l, s) {
|
|
1429
|
+
let a = s;
|
|
1430
|
+
typeof a > "u" && (!l || !l.getContext) && (a = l, l = void 0), a || (a = {});
|
|
1431
|
+
const m = t.render(n, l, a), g = a.type || "image/png", B = a.rendererOpts || {};
|
|
1430
1432
|
return m.toDataURL(g, B.quality);
|
|
1431
1433
|
};
|
|
1432
1434
|
})(at);
|
|
1433
|
-
var
|
|
1434
|
-
const
|
|
1435
|
+
var ut = {};
|
|
1436
|
+
const un = Ie;
|
|
1435
1437
|
function $e(t, e) {
|
|
1436
1438
|
const i = t.a / 255, r = e + '="' + t.hex + '"';
|
|
1437
1439
|
return i < 1 ? r + " " + e + '-opacity="' + i.toFixed(2).slice(1) + '"' : r;
|
|
@@ -1440,54 +1442,54 @@ function we(t, e, i) {
|
|
|
1440
1442
|
let r = t + e;
|
|
1441
1443
|
return typeof i < "u" && (r += " " + i), r;
|
|
1442
1444
|
}
|
|
1443
|
-
function
|
|
1444
|
-
let r = "", o = 0, n = !1,
|
|
1445
|
+
function cn(t, e, i) {
|
|
1446
|
+
let r = "", o = 0, n = !1, l = 0;
|
|
1445
1447
|
for (let s = 0; s < t.length; s++) {
|
|
1446
|
-
const
|
|
1447
|
-
!
|
|
1448
|
+
const a = Math.floor(s % e), m = Math.floor(s / e);
|
|
1449
|
+
!a && !n && (n = !0), t[s] ? (l++, s > 0 && a > 0 && t[s - 1] || (r += n ? we("M", a + i, 0.5 + m + i) : we("m", o, 0), o = 0, n = !1), a + 1 < e && t[s + 1] || (r += we("h", l), l = 0)) : o++;
|
|
1448
1450
|
}
|
|
1449
1451
|
return r;
|
|
1450
1452
|
}
|
|
1451
|
-
|
|
1452
|
-
const o =
|
|
1453
|
+
ut.render = function(e, i, r) {
|
|
1454
|
+
const o = un.getOptions(i), n = e.modules.size, l = e.modules.data, s = n + o.margin * 2, a = o.color.light.a ? "<path " + $e(o.color.light, "fill") + ' d="M0 0h' + s + "v" + s + 'H0z"/>' : "", m = "<path " + $e(o.color.dark, "stroke") + ' d="' + cn(l, n, o.margin) + '"/>', g = 'viewBox="0 0 ' + s + " " + s + '"', h = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + g + ' shape-rendering="crispEdges">' + a + m + `</svg>
|
|
1453
1455
|
`;
|
|
1454
1456
|
return typeof r == "function" && r(null, h), h;
|
|
1455
1457
|
};
|
|
1456
|
-
const
|
|
1457
|
-
function
|
|
1458
|
-
const n = [].slice.call(arguments, 1),
|
|
1459
|
-
if (!s && !
|
|
1458
|
+
const dn = Bt, Ae = Ge, ct = at, fn = ut;
|
|
1459
|
+
function Te(t, e, i, r, o) {
|
|
1460
|
+
const n = [].slice.call(arguments, 1), l = n.length, s = typeof n[l - 1] == "function";
|
|
1461
|
+
if (!s && !dn())
|
|
1460
1462
|
throw new Error("Callback required as last argument");
|
|
1461
1463
|
if (s) {
|
|
1462
|
-
if (
|
|
1464
|
+
if (l < 2)
|
|
1463
1465
|
throw new Error("Too few arguments provided");
|
|
1464
|
-
|
|
1466
|
+
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));
|
|
1465
1467
|
} else {
|
|
1466
|
-
if (
|
|
1468
|
+
if (l < 1)
|
|
1467
1469
|
throw new Error("Too few arguments provided");
|
|
1468
|
-
return
|
|
1470
|
+
return l === 1 ? (i = e, e = r = void 0) : l === 2 && !e.getContext && (r = i, i = e, e = void 0), new Promise(function(a, m) {
|
|
1469
1471
|
try {
|
|
1470
|
-
const g =
|
|
1471
|
-
|
|
1472
|
+
const g = Ae.create(i, r);
|
|
1473
|
+
a(t(g, e, r));
|
|
1472
1474
|
} catch (g) {
|
|
1473
1475
|
m(g);
|
|
1474
1476
|
}
|
|
1475
1477
|
});
|
|
1476
1478
|
}
|
|
1477
1479
|
try {
|
|
1478
|
-
const
|
|
1479
|
-
o(null, t(
|
|
1480
|
-
} catch (
|
|
1481
|
-
o(
|
|
1480
|
+
const a = Ae.create(i, r);
|
|
1481
|
+
o(null, t(a, e, r));
|
|
1482
|
+
} catch (a) {
|
|
1483
|
+
o(a);
|
|
1482
1484
|
}
|
|
1483
1485
|
}
|
|
1484
|
-
ee.create =
|
|
1485
|
-
ee.toCanvas =
|
|
1486
|
-
ee.toDataURL =
|
|
1487
|
-
ee.toString =
|
|
1488
|
-
return
|
|
1486
|
+
ee.create = Ae.create;
|
|
1487
|
+
ee.toCanvas = Te.bind(null, ct.render);
|
|
1488
|
+
ee.toDataURL = Te.bind(null, ct.renderToDataURL);
|
|
1489
|
+
ee.toString = Te.bind(null, function(t, e, i) {
|
|
1490
|
+
return fn.render(t, i);
|
|
1489
1491
|
});
|
|
1490
|
-
async function
|
|
1492
|
+
async function mn(t, e = 350) {
|
|
1491
1493
|
try {
|
|
1492
1494
|
return await ee.toDataURL(t, {
|
|
1493
1495
|
width: e,
|
|
@@ -1497,26 +1499,23 @@ async function dn(t, e = 350) {
|
|
|
1497
1499
|
console.error(i);
|
|
1498
1500
|
}
|
|
1499
1501
|
}
|
|
1500
|
-
var
|
|
1501
|
-
const
|
|
1502
|
-
/* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
|
|
1503
|
-
/* @__PURE__ */ w("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
|
|
1504
|
-
], -1), hn = { class: "flex flex-col gap-16 mt-16" }, pn = ["src"], yn = /* @__PURE__ */ ze({
|
|
1502
|
+
var gn = { 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", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
1503
|
+
const hn = { class: "flex items-start" }, pn = { class: "flex flex-col gap-16 mt-16" }, yn = ["src"], wn = /* @__PURE__ */ He({
|
|
1505
1504
|
__name: "LinkDeviceDialog",
|
|
1506
1505
|
setup(t) {
|
|
1507
|
-
const e = ve(), i =
|
|
1506
|
+
const e = ve(), i = qe(), r = Ye(), o = H(), n = H(), l = gn.crmUrl, s = H(), a = se(() => i.membership), m = se(() => {
|
|
1508
1507
|
var h, d;
|
|
1509
|
-
return `https://${(h =
|
|
1508
|
+
return `https://${(h = a.value) != null && h.url ? a.value.url : (d = a.value) == null ? void 0 : d.business}.${l}`;
|
|
1510
1509
|
});
|
|
1511
1510
|
async function g(h) {
|
|
1512
|
-
const d = await
|
|
1511
|
+
const d = await Je.getOtp(h);
|
|
1513
1512
|
return `${m.value}?link-device=${d.otp}`;
|
|
1514
1513
|
}
|
|
1515
1514
|
async function B(h) {
|
|
1516
1515
|
const d = await g(h);
|
|
1517
|
-
s.value = d, o.value = await
|
|
1516
|
+
s.value = d, o.value = await mn(d);
|
|
1518
1517
|
}
|
|
1519
|
-
return
|
|
1518
|
+
return Ke(async () => {
|
|
1520
1519
|
if (await e.readLocations(), !e.locations.length) {
|
|
1521
1520
|
r.close();
|
|
1522
1521
|
return;
|
|
@@ -1524,36 +1523,39 @@ const mn = { class: "flex items-start" }, gn = /* @__PURE__ */ w("div", null, [
|
|
|
1524
1523
|
const h = e.locations[0]._id;
|
|
1525
1524
|
n.value = h, await B(h);
|
|
1526
1525
|
}), (h, d) => {
|
|
1527
|
-
const
|
|
1528
|
-
return
|
|
1529
|
-
default:
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1526
|
+
const w = R("FmIcon"), C = R("FmSelect"), A = R("FmButton"), p = R("FmCard");
|
|
1527
|
+
return x(), be(p, { class: "p-24 max-w-[350px]" }, {
|
|
1528
|
+
default: W(() => [
|
|
1529
|
+
b("div", hn, [
|
|
1530
|
+
d[3] || (d[3] = b("div", null, [
|
|
1531
|
+
b("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
|
|
1532
|
+
b("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
|
|
1533
|
+
], -1)),
|
|
1534
|
+
S(w, {
|
|
1533
1535
|
name: "close",
|
|
1534
|
-
onClick: d[0] || (d[0] = (
|
|
1536
|
+
onClick: d[0] || (d[0] = (v) => c(r).close()),
|
|
1535
1537
|
class: "cursor-pointer"
|
|
1536
1538
|
})
|
|
1537
1539
|
]),
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
modelValue:
|
|
1540
|
+
b("div", pn, [
|
|
1541
|
+
S(C, {
|
|
1542
|
+
modelValue: c(n),
|
|
1541
1543
|
"onUpdate:modelValue": [
|
|
1542
|
-
d[1] || (d[1] = (
|
|
1544
|
+
d[1] || (d[1] = (v) => Oe(n) ? n.value = v : null),
|
|
1543
1545
|
B
|
|
1544
1546
|
],
|
|
1545
1547
|
label: "Select Location",
|
|
1546
|
-
items:
|
|
1548
|
+
items: c(e).locationItems.filter((v) => !!v.value)
|
|
1547
1549
|
}, null, 8, ["modelValue", "items"]),
|
|
1548
|
-
|
|
1549
|
-
src:
|
|
1550
|
+
b("img", {
|
|
1551
|
+
src: c(o),
|
|
1550
1552
|
class: "aspect-square w-full"
|
|
1551
|
-
}, null, 8,
|
|
1552
|
-
|
|
1553
|
+
}, null, 8, yn),
|
|
1554
|
+
S(A, {
|
|
1553
1555
|
class: "mx-auto",
|
|
1554
1556
|
variant: "plain",
|
|
1555
1557
|
icon: "content_copy",
|
|
1556
|
-
onClick: d[2] || (d[2] = (
|
|
1558
|
+
onClick: d[2] || (d[2] = (v) => c(je)(c(s)))
|
|
1557
1559
|
})
|
|
1558
1560
|
])
|
|
1559
1561
|
]),
|
|
@@ -1562,41 +1564,38 @@ const mn = { class: "flex items-start" }, gn = /* @__PURE__ */ w("div", null, [
|
|
|
1562
1564
|
};
|
|
1563
1565
|
}
|
|
1564
1566
|
});
|
|
1565
|
-
var
|
|
1566
|
-
const
|
|
1567
|
+
var bn = { 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", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
1568
|
+
const vn = { class: "hidden xs:flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Cn = { class: "fm-typo-en-title-md-800" }, En = {
|
|
1567
1569
|
key: 0,
|
|
1568
1570
|
class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
|
|
1569
|
-
},
|
|
1570
|
-
/* @__PURE__ */ W(" Free Credit as Discount "),
|
|
1571
|
-
/* @__PURE__ */ w("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
|
|
1572
|
-
], -1), Vn = { class: "space-y-8" }, xn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, $n = { class: "space-y-8" }, zn = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1), Hn = { class: "flex justify-end pb-24" }, Kn = { class: "col-span-1 space-y-8 xs:hidden" }, On = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1), Yn = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1), jn = { class: "fm-typo-en-body-lg-600" }, Jn = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1), qn = { class: "fm-typo-en-body-lg-600" }, Gn = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1), Qn = { class: "fm-typo-en-body-lg-600" }, Wn = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1), Xn = { class: "fm-typo-en-body-lg-600" }, go = /* @__PURE__ */ ze({
|
|
1571
|
+
}, Bn = { class: "col-span-2 flex flex-col xs:col-span-3" }, An = { class: "fm-typo-en-title-sm-800" }, _n = { class: "space-y-24" }, Mn = { class: "space-y-8" }, Sn = { class: "fm-typo-en-title-sm-800" }, In = { class: "fm-typo-body-lg-400" }, Tn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Pn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Nn = { class: "space-y-8" }, Un = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Ln = { class: "space-y-8" }, Fn = { class: "space-y-8" }, Rn = { class: "space-y-8" }, Dn = { class: "space-y-8" }, kn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Vn = { class: "space-y-8" }, xn = { class: "flex justify-end pb-24" }, zn = { class: "col-span-1 space-y-8 xs:hidden" }, $n = { class: "fm-typo-en-body-lg-600" }, Hn = { class: "fm-typo-en-body-lg-600" }, Kn = { class: "fm-typo-en-body-lg-600" }, On = { class: "fm-typo-en-body-lg-600" }, lo = /* @__PURE__ */ He({
|
|
1573
1572
|
__name: "Setting",
|
|
1574
1573
|
setup(t) {
|
|
1575
|
-
const e =
|
|
1574
|
+
const e = gt(), i = ve(), r = qe(), { global: o, minor: n } = ft, l = Ye(), s = H(), a = H(!1), m = ht, g = [
|
|
1576
1575
|
(f) => !f || f.length >= 6 || "Invalid URL format, please enter at least 6 characters",
|
|
1577
1576
|
(f) => !f || new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/).test(f) || "Invalid URL format, url should start with a letter or number and can only include lowercase letters, numbers, or hyphens"
|
|
1578
|
-
], B =
|
|
1577
|
+
], B = bn.appUrl, h = se(() => {
|
|
1579
1578
|
var f;
|
|
1580
1579
|
return `https://${(f = s.value) == null ? void 0 : f.business}.${B}`;
|
|
1581
|
-
}), d = H(),
|
|
1582
|
-
var f,
|
|
1583
|
-
return Math.min((((
|
|
1584
|
-
});
|
|
1585
|
-
async function
|
|
1586
|
-
|
|
1580
|
+
}), d = H(), w = H([]), C = se(() => {
|
|
1581
|
+
var f, u;
|
|
1582
|
+
return Math.min((((u = (f = s.value) == null ? void 0 : f.advertisements) == null ? void 0 : u.length) ?? 0) + 1, 5);
|
|
1583
|
+
}), { t: A } = bt();
|
|
1584
|
+
async function p() {
|
|
1585
|
+
l.open({
|
|
1587
1586
|
title: "",
|
|
1588
|
-
dialogComponent:
|
|
1587
|
+
dialogComponent: wn,
|
|
1589
1588
|
closeButton: !1
|
|
1590
1589
|
});
|
|
1591
1590
|
}
|
|
1592
|
-
async function
|
|
1593
|
-
await
|
|
1591
|
+
async function v(f) {
|
|
1592
|
+
await mt.remove(
|
|
1594
1593
|
"Are you sure you want to unlink this device?",
|
|
1595
1594
|
"Unlink device",
|
|
1596
1595
|
"Unlink"
|
|
1597
1596
|
) && await n(
|
|
1598
1597
|
async () => {
|
|
1599
|
-
await
|
|
1598
|
+
await Je.unregisterDevice(f), await i.readLocationDevices();
|
|
1600
1599
|
},
|
|
1601
1600
|
{
|
|
1602
1601
|
message: "Unlinking device",
|
|
@@ -1604,26 +1603,26 @@ const bn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1604
1603
|
}
|
|
1605
1604
|
);
|
|
1606
1605
|
}
|
|
1607
|
-
async function
|
|
1606
|
+
async function y() {
|
|
1608
1607
|
await n(
|
|
1609
1608
|
async () => {
|
|
1610
1609
|
var _;
|
|
1611
|
-
const f =
|
|
1610
|
+
const f = Et(s.value);
|
|
1612
1611
|
f.welcomeMessage && !((_ = f.welcomeMessage) != null && _.content) && (f.welcomeMessage.content = "Hi there, you have been invited to join our membership");
|
|
1613
|
-
const
|
|
1614
|
-
d.value === null &&
|
|
1615
|
-
|
|
1612
|
+
const u = pt.parse(f);
|
|
1613
|
+
d.value === null && u.image ? await K.delete(K.coverImagePath()) : d.value && (u.image = await K.update(
|
|
1614
|
+
K.coverImagePath(),
|
|
1616
1615
|
d.value
|
|
1617
|
-
)),
|
|
1618
|
-
new Array(
|
|
1619
|
-
var
|
|
1620
|
-
const
|
|
1621
|
-
return
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
) : (
|
|
1616
|
+
)), a.value ? u.advertisements = (await Promise.all(
|
|
1617
|
+
new Array(C.value - 1).fill(null).map(async (M, I) => {
|
|
1618
|
+
var P;
|
|
1619
|
+
const N = w.value[I];
|
|
1620
|
+
return N ? await K.update(
|
|
1621
|
+
K.advertisementPath(I, N),
|
|
1622
|
+
N
|
|
1623
|
+
) : (P = u.advertisements) == null ? void 0 : P[I];
|
|
1625
1624
|
})
|
|
1626
|
-
)).filter((
|
|
1625
|
+
)).filter((M) => M) : u.advertisements = [], await vt.update(u), await r.readMembership(), s.value = r.membership;
|
|
1627
1626
|
},
|
|
1628
1627
|
{
|
|
1629
1628
|
message: "Updating membership",
|
|
@@ -1631,147 +1630,147 @@ const bn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1631
1630
|
}
|
|
1632
1631
|
);
|
|
1633
1632
|
}
|
|
1634
|
-
return
|
|
1633
|
+
return Ke(async () => {
|
|
1635
1634
|
await o(async () => {
|
|
1636
|
-
var f,
|
|
1637
|
-
await i.readPremium(), await i.readLocations(), await i.readLocationDevices(), await r.readMembership(), s.value = r.membership,
|
|
1635
|
+
var f, u;
|
|
1636
|
+
await i.readPremium(), await i.readLocations(), await i.readLocationDevices(), await r.readMembership(), s.value = r.membership, a.value = (((f = s.value.advertisements) == null ? void 0 : f.length) ?? 0) > 0, w.value = ((u = s.value.advertisements) == null ? void 0 : u.map(() => null)) ?? [];
|
|
1638
1637
|
});
|
|
1639
|
-
}), (f,
|
|
1640
|
-
var
|
|
1641
|
-
const _ =
|
|
1642
|
-
return
|
|
1643
|
-
|
|
1644
|
-
title: "
|
|
1638
|
+
}), (f, u) => {
|
|
1639
|
+
var L, Pe, Ne, Ue, Le, Fe;
|
|
1640
|
+
const _ = R("FmPageHead"), M = R("FmButton"), I = R("FmTextField"), N = R("FmCard"), P = R("FmPill"), k = R("FmSwitch"), q = R("FmMenuDivider");
|
|
1641
|
+
return x(), G(me, null, [
|
|
1642
|
+
S(_, {
|
|
1643
|
+
title: c(A)("connect.setting.title"),
|
|
1645
1644
|
class: "xs:hidden"
|
|
1646
|
-
}),
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
M
|
|
1645
|
+
}, null, 8, ["title"]),
|
|
1646
|
+
b("div", vn, [
|
|
1647
|
+
b("div", Cn, F(c(A)("connect.setting.basicInfo.title")), 1),
|
|
1648
|
+
S(M, {
|
|
1650
1649
|
icon: "info",
|
|
1651
1650
|
variant: "tertiary"
|
|
1652
1651
|
})
|
|
1653
1652
|
]),
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
label: "
|
|
1660
|
-
modelValue:
|
|
1661
|
-
"onUpdate:modelValue":
|
|
1662
|
-
}, null, 8, ["modelValue"]),
|
|
1663
|
-
|
|
1653
|
+
c(s) ? (x(), G("div", En, [
|
|
1654
|
+
b("div", Bn, [
|
|
1655
|
+
b("div", An, F(c(A)("connect.setting.basicInfo.title")), 1),
|
|
1656
|
+
b("div", _n, [
|
|
1657
|
+
S(I, {
|
|
1658
|
+
label: c(A)("connect.setting.basicInfo.membershipTitle"),
|
|
1659
|
+
modelValue: c(s).name,
|
|
1660
|
+
"onUpdate:modelValue": u[0] || (u[0] = (E) => c(s).name = E)
|
|
1661
|
+
}, null, 8, ["label", "modelValue"]),
|
|
1662
|
+
S(I, {
|
|
1664
1663
|
disabled: !0,
|
|
1665
|
-
"model-value":
|
|
1664
|
+
"model-value": c(s).business,
|
|
1666
1665
|
rules: g,
|
|
1667
1666
|
required: !0,
|
|
1668
|
-
label: "
|
|
1669
|
-
"helper-text":
|
|
1670
|
-
placeholder:
|
|
1671
|
-
"onUpdate:modelValue":
|
|
1667
|
+
label: c(A)("connect.setting.basicInfo.memberAppUrl"),
|
|
1668
|
+
"helper-text": c(h),
|
|
1669
|
+
placeholder: c(s).business.toString(),
|
|
1670
|
+
"onUpdate:modelValue": u[2] || (u[2] = (E) => c(s).url = E)
|
|
1672
1671
|
}, {
|
|
1673
|
-
prepend:
|
|
1674
|
-
|
|
1675
|
-
]),
|
|
1676
|
-
append:
|
|
1677
|
-
|
|
1678
|
-
M
|
|
1672
|
+
prepend: W(() => u[12] || (u[12] = [
|
|
1673
|
+
Q(" https:// ")
|
|
1674
|
+
])),
|
|
1675
|
+
append: W(() => [
|
|
1676
|
+
Q(" ." + F(c(B)) + " ", 1),
|
|
1677
|
+
S(M, {
|
|
1679
1678
|
icon: "content_copy",
|
|
1680
1679
|
variant: "tertiary",
|
|
1681
|
-
onClick:
|
|
1680
|
+
onClick: u[1] || (u[1] = (E) => c(je)(c(h)))
|
|
1682
1681
|
})
|
|
1683
1682
|
]),
|
|
1684
1683
|
_: 1
|
|
1685
|
-
}, 8, ["model-value", "helper-text", "placeholder"]),
|
|
1686
|
-
|
|
1684
|
+
}, 8, ["model-value", "label", "helper-text", "placeholder"]),
|
|
1685
|
+
S(Ve, {
|
|
1687
1686
|
label: "Cover image",
|
|
1688
1687
|
class: "w-2/3 xs:w-full",
|
|
1689
1688
|
"image-fit": "cover",
|
|
1690
1689
|
"aspect-ratio": "3/1",
|
|
1691
|
-
thumbnail:
|
|
1692
|
-
"onUpdate:file":
|
|
1693
|
-
d.value =
|
|
1690
|
+
thumbnail: c(s).image || void 0,
|
|
1691
|
+
"onUpdate:file": u[3] || (u[3] = async (E) => {
|
|
1692
|
+
d.value = E, E || (c(s).image = null);
|
|
1694
1693
|
})
|
|
1695
1694
|
}, null, 8, ["thumbnail"]),
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
M
|
|
1695
|
+
b("div", Mn, [
|
|
1696
|
+
b("div", Sn, F(c(A)("connect.setting.counterApp.title")), 1),
|
|
1697
|
+
S(M, {
|
|
1699
1698
|
variant: "plain",
|
|
1700
1699
|
icon: "link",
|
|
1701
|
-
label: "
|
|
1702
|
-
onClick:
|
|
1703
|
-
}),
|
|
1704
|
-
(
|
|
1705
|
-
key:
|
|
1700
|
+
label: c(A)("connect.setting.counterApp.linkDevice"),
|
|
1701
|
+
onClick: p
|
|
1702
|
+
}, null, 8, ["label"]),
|
|
1703
|
+
(x(!0), G(me, null, Re(c(i).locationDevices, (E, T) => (x(), be(N, {
|
|
1704
|
+
key: T,
|
|
1706
1705
|
variant: "outlined",
|
|
1707
1706
|
class: "flex items-center justify-between px-16 py-12"
|
|
1708
1707
|
}, {
|
|
1709
|
-
default:
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1708
|
+
default: W(() => [
|
|
1709
|
+
b("div", null, [
|
|
1710
|
+
b("p", In, F(E.name || `Device ${E._id}`), 1),
|
|
1711
|
+
b("p", Tn, " Activation date: " + F(c(dt)(c(Ct)(E._id.toString())).format(
|
|
1713
1712
|
"D MMM YYYY"
|
|
1714
1713
|
)), 1),
|
|
1715
|
-
|
|
1714
|
+
b("p", Pn, " Linked location: " + F(c(i).locations.find((V) => V._id == E.location).name), 1)
|
|
1716
1715
|
]),
|
|
1717
|
-
M
|
|
1716
|
+
S(M, {
|
|
1718
1717
|
icon: "link_off",
|
|
1719
1718
|
variant: "tertiary",
|
|
1720
|
-
onClick: (
|
|
1719
|
+
onClick: (V) => v(E._id)
|
|
1721
1720
|
}, null, 8, ["onClick"])
|
|
1722
1721
|
]),
|
|
1723
1722
|
_: 2
|
|
1724
1723
|
}, 1024))), 128))
|
|
1725
1724
|
]),
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1725
|
+
b("div", Nn, [
|
|
1726
|
+
b("div", Un, [
|
|
1727
|
+
u[13] || (u[13] = Q(" Advertisement ")),
|
|
1728
|
+
S(P, { variant: "premium" })
|
|
1730
1729
|
]),
|
|
1731
|
-
|
|
1732
|
-
modelValue:
|
|
1733
|
-
"onUpdate:modelValue":
|
|
1730
|
+
S(k, {
|
|
1731
|
+
modelValue: c(a),
|
|
1732
|
+
"onUpdate:modelValue": u[4] || (u[4] = (E) => Oe(a) ? a.value = E : null),
|
|
1734
1733
|
label: "Advertisement",
|
|
1735
1734
|
sublabel: "This will be show on FeedMe ordering app",
|
|
1736
1735
|
"label-placement": "right",
|
|
1737
|
-
disabled: !
|
|
1736
|
+
disabled: !c(i).isPremium,
|
|
1738
1737
|
value: ""
|
|
1739
1738
|
}, null, 8, ["modelValue", "disabled"]),
|
|
1740
|
-
|
|
1739
|
+
c(a) ? (x(), G("div", {
|
|
1741
1740
|
class: "flex items-center gap-8 flex-wrap xs:grid xs:grid-cols-2 xs:overflow-x-scroll xs:w-full",
|
|
1742
|
-
key:
|
|
1741
|
+
key: c(C)
|
|
1743
1742
|
}, [
|
|
1744
|
-
(
|
|
1745
|
-
var
|
|
1746
|
-
return
|
|
1743
|
+
(x(!0), G(me, null, Re(c(C), (E, T) => {
|
|
1744
|
+
var V, ne;
|
|
1745
|
+
return x(), be(Ve, {
|
|
1747
1746
|
class: "w-[200px]",
|
|
1748
1747
|
"image-fit": "cover",
|
|
1749
1748
|
label: "",
|
|
1750
1749
|
"aspect-ratio": "2/3",
|
|
1751
|
-
thumbnail: (ne = (
|
|
1750
|
+
thumbnail: (ne = (V = c(s)) == null ? void 0 : V.advertisements) == null ? void 0 : ne[T],
|
|
1752
1751
|
accept: ".png, .jpg, .jpeg, .mp4, .gif",
|
|
1753
1752
|
"recommended-size": "Recommended 4:5 ratio / 1080px x 1350px",
|
|
1754
|
-
file:
|
|
1753
|
+
file: c(w)[T] ?? void 0,
|
|
1755
1754
|
"onUpdate:file": (oe) => {
|
|
1756
|
-
|
|
1755
|
+
c(s).advertisements || (c(s).advertisements = []), oe ? (c(s).advertisements[T] = "", c(w)[T] = oe) : (c(s).advertisements.splice(T, 1), c(w).splice(T, 1));
|
|
1757
1756
|
}
|
|
1758
1757
|
}, null, 8, ["thumbnail", "file", "onUpdate:file"]);
|
|
1759
1758
|
}), 256))
|
|
1760
|
-
])) :
|
|
1759
|
+
])) : De("", !0)
|
|
1761
1760
|
]),
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
"model-value": ((
|
|
1761
|
+
b("div", Ln, [
|
|
1762
|
+
u[14] || (u[14] = b("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
|
|
1763
|
+
S(I, {
|
|
1764
|
+
"model-value": ((L = c(s)) == null ? void 0 : L.brand) || "",
|
|
1766
1765
|
"max-length": 15,
|
|
1767
1766
|
label: "Brand Name",
|
|
1768
1767
|
"show-word-count": "",
|
|
1769
|
-
"helper-text": `RM 0 ${((
|
|
1770
|
-
"onUpdate:modelValue":
|
|
1768
|
+
"helper-text": `RM 0 ${((Pe = c(s)) == null ? void 0 : Pe.brand) || ""}: YOUR CUSTOMER MESSAGE`,
|
|
1769
|
+
"onUpdate:modelValue": u[5] || (u[5] = (E) => c(s).brand = E)
|
|
1771
1770
|
}, null, 8, ["model-value", "helper-text"]),
|
|
1772
|
-
|
|
1773
|
-
modelValue:
|
|
1774
|
-
"onUpdate:modelValue":
|
|
1771
|
+
S(wt, {
|
|
1772
|
+
modelValue: c(s).welcomeMessage,
|
|
1773
|
+
"onUpdate:modelValue": u[6] || (u[6] = (E) => c(s).welcomeMessage = E),
|
|
1775
1774
|
variables: [
|
|
1776
1775
|
"user.name",
|
|
1777
1776
|
"user.gender",
|
|
@@ -1782,106 +1781,109 @@ const bn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1782
1781
|
placeholder: "Hi there, you have been invited to join membership"
|
|
1783
1782
|
}, null, 8, ["modelValue"])
|
|
1784
1783
|
]),
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
"model-value": ((
|
|
1784
|
+
b("div", Fn, [
|
|
1785
|
+
u[15] || (u[15] = b("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
|
|
1786
|
+
S(I, {
|
|
1787
|
+
"model-value": ((Ue = (Ne = c(s)) == null ? void 0 : Ne.email) == null ? void 0 : Ue.from) || null,
|
|
1789
1788
|
label: "From Address",
|
|
1790
1789
|
"helper-text": "Will be shown as email of the sender (requires DNS configuration, Contact us to verify your domain.)",
|
|
1791
1790
|
placeholder: "noreply@feedme.cc",
|
|
1792
1791
|
disabled: "",
|
|
1793
|
-
"onUpdate:modelValue":
|
|
1794
|
-
var
|
|
1795
|
-
(
|
|
1796
|
-
from:
|
|
1797
|
-
}),
|
|
1792
|
+
"onUpdate:modelValue": u[7] || (u[7] = (E) => {
|
|
1793
|
+
var T;
|
|
1794
|
+
(T = c(s)) != null && T.email || (c(s).email = {
|
|
1795
|
+
from: E
|
|
1796
|
+
}), c(s).email.from = E || null;
|
|
1798
1797
|
}),
|
|
1799
|
-
rules: [
|
|
1798
|
+
rules: [c(ke).ruleAtPath(c(m), "email.from")]
|
|
1800
1799
|
}, null, 8, ["model-value", "rules"]),
|
|
1801
|
-
|
|
1802
|
-
"model-value": ((
|
|
1800
|
+
S(I, {
|
|
1801
|
+
"model-value": ((Fe = (Le = c(s)) == null ? void 0 : Le.email) == null ? void 0 : Fe.name) || null,
|
|
1803
1802
|
label: "Sender name",
|
|
1804
1803
|
"helper-text": "Will be shown as the name of the sender",
|
|
1805
|
-
"onUpdate:modelValue":
|
|
1806
|
-
var
|
|
1807
|
-
(
|
|
1808
|
-
name:
|
|
1809
|
-
}),
|
|
1804
|
+
"onUpdate:modelValue": u[8] || (u[8] = (E) => {
|
|
1805
|
+
var T;
|
|
1806
|
+
(T = c(s)) != null && T.email || (c(s).email = {
|
|
1807
|
+
name: E
|
|
1808
|
+
}), c(s).email.name = E || null;
|
|
1810
1809
|
}),
|
|
1811
|
-
rules: [
|
|
1810
|
+
rules: [c(ke).ruleAtPath(c(m), "email.name")]
|
|
1812
1811
|
}, null, 8, ["model-value", "rules"])
|
|
1813
1812
|
]),
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
"
|
|
1818
|
-
|
|
1813
|
+
b("div", Rn, [
|
|
1814
|
+
u[16] || (u[16] = b("div", { class: "fm-typo-en-title-sm-800" }, [
|
|
1815
|
+
Q(" Free Credit as Discount "),
|
|
1816
|
+
b("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
|
|
1817
|
+
], -1)),
|
|
1818
|
+
S(k, {
|
|
1819
|
+
"model-value": c(s).freeCreditAsDiscount ?? !1,
|
|
1820
|
+
"onUpdate:modelValue": u[9] || (u[9] = (E) => c(s).freeCreditAsDiscount = E),
|
|
1819
1821
|
label: "Free Credit as Discount",
|
|
1820
1822
|
sublabel: "When enabled, this will allow free credit to be used as discount in the bill (POS >=v6.56)",
|
|
1821
1823
|
"label-placement": "right",
|
|
1822
1824
|
value: ""
|
|
1823
1825
|
}, null, 8, ["model-value"])
|
|
1824
1826
|
]),
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1827
|
+
b("div", Dn, [
|
|
1828
|
+
b("div", kn, [
|
|
1829
|
+
u[17] || (u[17] = Q(" Member Card ")),
|
|
1830
|
+
S(P, { variant: "premium" })
|
|
1829
1831
|
]),
|
|
1830
|
-
|
|
1831
|
-
"model-value":
|
|
1832
|
-
"onUpdate:modelValue":
|
|
1832
|
+
S(k, {
|
|
1833
|
+
"model-value": c(s).cardEnable ?? !1,
|
|
1834
|
+
"onUpdate:modelValue": u[10] || (u[10] = (E) => c(s).cardEnable = E),
|
|
1833
1835
|
label: "",
|
|
1834
1836
|
sublabel: "Allow member to bind card via member app",
|
|
1835
1837
|
"label-placement": "right",
|
|
1836
1838
|
value: "",
|
|
1837
|
-
disabled: !
|
|
1839
|
+
disabled: !c(i).isPremium
|
|
1838
1840
|
}, null, 8, ["model-value", "disabled"])
|
|
1839
1841
|
]),
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1842
|
+
b("div", Vn, [
|
|
1843
|
+
u[18] || (u[18] = b("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1)),
|
|
1844
|
+
S(yt, {
|
|
1843
1845
|
label: "Select restaurant",
|
|
1844
|
-
"model-value":
|
|
1845
|
-
"onUpdate:modelValue":
|
|
1846
|
+
"model-value": c(s).targetLocation ?? null,
|
|
1847
|
+
"onUpdate:modelValue": u[11] || (u[11] = (E) => c(s).targetLocation = E)
|
|
1846
1848
|
}, null, 8, ["model-value"])
|
|
1847
1849
|
]),
|
|
1848
|
-
|
|
1849
|
-
M
|
|
1850
|
+
b("div", xn, [
|
|
1851
|
+
S(M, {
|
|
1850
1852
|
label: "Update",
|
|
1851
1853
|
type: "button",
|
|
1852
|
-
onClick:
|
|
1853
|
-
disabled: !!
|
|
1854
|
-
loading: !!
|
|
1854
|
+
onClick: y,
|
|
1855
|
+
disabled: !!c(e).loadingQueue.length,
|
|
1856
|
+
loading: !!c(e).loadingQueue.length
|
|
1855
1857
|
}, null, 8, ["disabled", "loading"])
|
|
1856
1858
|
])
|
|
1857
1859
|
])
|
|
1858
1860
|
]),
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
+
b("div", zn, [
|
|
1862
|
+
S(N, {
|
|
1861
1863
|
variant: "outlined",
|
|
1862
1864
|
class: "flex flex-col p-24 gap-8"
|
|
1863
1865
|
}, {
|
|
1864
|
-
default:
|
|
1865
|
-
var
|
|
1866
|
+
default: W(() => {
|
|
1867
|
+
var E, T, V;
|
|
1866
1868
|
return [
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1869
|
+
u[23] || (u[23] = b("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1)),
|
|
1870
|
+
S(q, { class: "my-4" }),
|
|
1871
|
+
b("div", null, [
|
|
1872
|
+
u[19] || (u[19] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1)),
|
|
1873
|
+
b("div", $n, F(c(s).name), 1)
|
|
1872
1874
|
]),
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1875
|
+
b("div", null, [
|
|
1876
|
+
u[20] || (u[20] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1)),
|
|
1877
|
+
b("div", Hn, F((((E = c(s).advertisements) == null ? void 0 : E.length) ?? 0) || "No advertisments"), 1)
|
|
1876
1878
|
]),
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1879
|
+
b("div", null, [
|
|
1880
|
+
u[21] || (u[21] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1)),
|
|
1881
|
+
b("div", Kn, F(c(s).freeCreditAsDiscount ? "Enabled" : "Disabled"), 1)
|
|
1880
1882
|
]),
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
(ne) =>
|
|
1883
|
+
b("div", null, [
|
|
1884
|
+
u[22] || (u[22] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1)),
|
|
1885
|
+
b("div", On, F(!c(s).targetLocation || c(s).targetLocation.length == c(ve)().locations.length ? "All locations" : (V = (T = c(s)) == null ? void 0 : T.targetLocation) == null ? void 0 : V.map(
|
|
1886
|
+
(ne) => c(i).locations.find((oe) => oe._id == ne).name
|
|
1885
1887
|
).join(", ")), 1)
|
|
1886
1888
|
])
|
|
1887
1889
|
];
|
|
@@ -1889,11 +1891,11 @@ const bn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1889
1891
|
_: 1
|
|
1890
1892
|
})
|
|
1891
1893
|
])
|
|
1892
|
-
])) :
|
|
1894
|
+
])) : De("", !0)
|
|
1893
1895
|
], 64);
|
|
1894
1896
|
};
|
|
1895
1897
|
}
|
|
1896
1898
|
});
|
|
1897
1899
|
export {
|
|
1898
|
-
|
|
1900
|
+
lo as default
|
|
1899
1901
|
};
|