@everymatrix/player-profile-info 1.92.2 → 1.92.4
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/components/{PlayerAccountBiometricsAction-BA9Ie2Za.js → PlayerAccountBiometricsAction-BAGMeJ7n.js} +1 -1
- package/components/{PlayerAccountBiometricsAction-BT9CnaZn.cjs → PlayerAccountBiometricsAction-C80Si6jU.cjs} +1 -1
- package/components/{PlayerAccountBiometricsAction-CdjRpYV-.js → PlayerAccountBiometricsAction-Dyt5-VKL.js} +1 -1
- package/components/{PlayerProfileInfo-CTEj5Rw2.js → PlayerProfileInfo-BD3Smhlz.js} +2 -2
- package/components/{PlayerProfileInfo-DWSJ3IK_.js → PlayerProfileInfo-D7JsveZr.js} +2 -2
- package/components/{PlayerProfileInfo-BjnZ5Gd8.cjs → PlayerProfileInfo-DeA5q7TR.cjs} +1 -1
- package/components/QrSessionGenerator-98YJa0kO.cjs +8 -0
- package/components/{QrSessionGenerator-BwR-VKzG.js → QrSessionGenerator-_j3dUSs4.js} +458 -465
- package/components/{QrSessionGenerator-B4KOHnOP.js → QrSessionGenerator-mkYXTmck.js} +487 -460
- package/es2015/player-profile-info.cjs +1 -1
- package/es2015/player-profile-info.js +1 -1
- package/esnext/player-profile-info.js +1 -1
- package/package.json +1 -1
- package/components/QrSessionGenerator-Cf0niVes.cjs +0 -8
|
@@ -1,31 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var j = (e, t, n) => new Promise((o, r) => {
|
|
2
|
+
var i = (a) => {
|
|
3
|
+
try {
|
|
4
|
+
l(n.next(a));
|
|
5
|
+
} catch (u) {
|
|
6
|
+
r(u);
|
|
7
|
+
}
|
|
8
|
+
}, s = (a) => {
|
|
9
|
+
try {
|
|
10
|
+
l(n.throw(a));
|
|
11
|
+
} catch (u) {
|
|
12
|
+
r(u);
|
|
13
|
+
}
|
|
14
|
+
}, l = (a) => a.done ? o(a.value) : Promise.resolve(a.value).then(i, s);
|
|
15
|
+
l((n = n.apply(e, t)).next());
|
|
16
|
+
});
|
|
17
|
+
import { a as Wt, $ as Xt, S as Zt, i as xt, s as $t, f as F, b as te, n as ht, d as nt, k as mt, c as rt, l as P, m as ee, h as U, t as wt, y as It, p as _, g as ne, z as re, j as oe, A as Nt, r as ie, u as se, v as ae, w as le, x as ue } from "./PlayerProfileInfo-BD3Smhlz.js";
|
|
18
|
+
function Rt(e, t) {
|
|
19
|
+
Wt(e, t);
|
|
4
20
|
}
|
|
5
|
-
function
|
|
6
|
-
|
|
21
|
+
function ce(e) {
|
|
22
|
+
Xt.set(e);
|
|
7
23
|
}
|
|
8
|
-
const
|
|
24
|
+
const Mt = {
|
|
9
25
|
en: {
|
|
10
26
|
titleQRSessionGenerator: "Scan the QR Code to access your account on retail devices.",
|
|
11
27
|
generateQRButton: "Generate QR",
|
|
12
28
|
unauthorized: "Authentication failed.",
|
|
13
29
|
failedToFetch: "Cannot generate QR, Please try again.",
|
|
14
|
-
unexpectedError: "Unexpected error occurred. Please try again later."
|
|
30
|
+
unexpectedError: "Unexpected error occurred. Please try again later.",
|
|
31
|
+
second: "s"
|
|
15
32
|
},
|
|
16
33
|
fr: {
|
|
17
34
|
titleQRSessionGenerator: "Scannez le code QR pour accéder à votre compte sur les appareils en magasin.",
|
|
18
35
|
generateQRButton: "Générer des QR",
|
|
19
36
|
unauthorized: "L'authentification a échoué.",
|
|
20
37
|
failedToFetch: "Impossible de générer le code QR, veuillez réessayer.",
|
|
21
|
-
unexpectedError: "Une erreur inattendue s'est produite. Veuillez réessayer plus tard."
|
|
38
|
+
unexpectedError: "Une erreur inattendue s'est produite. Veuillez réessayer plus tard.",
|
|
39
|
+
second: "s"
|
|
22
40
|
}
|
|
23
41
|
};
|
|
24
|
-
var
|
|
42
|
+
var q = {}, fe = function() {
|
|
25
43
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
26
|
-
},
|
|
27
|
-
let
|
|
28
|
-
const
|
|
44
|
+
}, Ut = {}, I = {};
|
|
45
|
+
let bt;
|
|
46
|
+
const de = [
|
|
29
47
|
0,
|
|
30
48
|
// Not used
|
|
31
49
|
26,
|
|
@@ -69,34 +87,34 @@ const se = [
|
|
|
69
87
|
3532,
|
|
70
88
|
3706
|
|
71
89
|
];
|
|
72
|
-
|
|
90
|
+
I.getSymbolSize = function(t) {
|
|
73
91
|
if (!t)
|
|
74
92
|
throw new Error('"version" cannot be null or undefined');
|
|
75
93
|
if (t < 1 || t > 40)
|
|
76
94
|
throw new Error('"version" should be in range from 1 to 40');
|
|
77
95
|
return t * 4 + 17;
|
|
78
96
|
};
|
|
79
|
-
|
|
80
|
-
return
|
|
97
|
+
I.getSymbolTotalCodewords = function(t) {
|
|
98
|
+
return de[t];
|
|
81
99
|
};
|
|
82
|
-
|
|
100
|
+
I.getBCHDigit = function(e) {
|
|
83
101
|
let t = 0;
|
|
84
102
|
for (; e !== 0; )
|
|
85
103
|
t++, e >>>= 1;
|
|
86
104
|
return t;
|
|
87
105
|
};
|
|
88
|
-
|
|
106
|
+
I.setToSJISFunction = function(t) {
|
|
89
107
|
if (typeof t != "function")
|
|
90
108
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
91
|
-
|
|
109
|
+
bt = t;
|
|
92
110
|
};
|
|
93
|
-
|
|
94
|
-
return typeof
|
|
111
|
+
I.isKanjiModeEnabled = function() {
|
|
112
|
+
return typeof bt != "undefined";
|
|
95
113
|
};
|
|
96
|
-
|
|
97
|
-
return
|
|
114
|
+
I.toSJIS = function(t) {
|
|
115
|
+
return bt(t);
|
|
98
116
|
};
|
|
99
|
-
var
|
|
117
|
+
var ot = {};
|
|
100
118
|
(function(e) {
|
|
101
119
|
e.L = { bit: 1 }, e.M = { bit: 0 }, e.Q = { bit: 3 }, e.H = { bit: 2 };
|
|
102
120
|
function t(n) {
|
|
@@ -120,21 +138,21 @@ var x = {};
|
|
|
120
138
|
}
|
|
121
139
|
}
|
|
122
140
|
e.isValid = function(o) {
|
|
123
|
-
return o && typeof o.bit
|
|
141
|
+
return o && typeof o.bit != "undefined" && o.bit >= 0 && o.bit < 4;
|
|
124
142
|
}, e.from = function(o, r) {
|
|
125
143
|
if (e.isValid(o))
|
|
126
144
|
return o;
|
|
127
145
|
try {
|
|
128
146
|
return t(o);
|
|
129
|
-
} catch {
|
|
147
|
+
} catch (i) {
|
|
130
148
|
return r;
|
|
131
149
|
}
|
|
132
150
|
};
|
|
133
|
-
})(
|
|
134
|
-
function
|
|
151
|
+
})(ot);
|
|
152
|
+
function Dt() {
|
|
135
153
|
this.buffer = [], this.length = 0;
|
|
136
154
|
}
|
|
137
|
-
|
|
155
|
+
Dt.prototype = {
|
|
138
156
|
get: function(e) {
|
|
139
157
|
const t = Math.floor(e / 8);
|
|
140
158
|
return (this.buffer[t] >>> 7 - e % 8 & 1) === 1;
|
|
@@ -151,28 +169,28 @@ Nt.prototype = {
|
|
|
151
169
|
this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
|
|
152
170
|
}
|
|
153
171
|
};
|
|
154
|
-
var
|
|
155
|
-
function
|
|
172
|
+
var ge = Dt;
|
|
173
|
+
function W(e) {
|
|
156
174
|
if (!e || e < 1)
|
|
157
175
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
158
176
|
this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
|
|
159
177
|
}
|
|
160
|
-
|
|
178
|
+
W.prototype.set = function(e, t, n, o) {
|
|
161
179
|
const r = e * this.size + t;
|
|
162
180
|
this.data[r] = n, o && (this.reservedBit[r] = !0);
|
|
163
181
|
};
|
|
164
|
-
|
|
182
|
+
W.prototype.get = function(e, t) {
|
|
165
183
|
return this.data[e * this.size + t];
|
|
166
184
|
};
|
|
167
|
-
|
|
185
|
+
W.prototype.xor = function(e, t, n) {
|
|
168
186
|
this.data[e * this.size + t] ^= n;
|
|
169
187
|
};
|
|
170
|
-
|
|
188
|
+
W.prototype.isReserved = function(e, t) {
|
|
171
189
|
return this.reservedBit[e * this.size + t];
|
|
172
190
|
};
|
|
173
|
-
var
|
|
191
|
+
var he = W, kt = {};
|
|
174
192
|
(function(e) {
|
|
175
|
-
const t =
|
|
193
|
+
const t = I.getSymbolSize;
|
|
176
194
|
e.getRowColCoords = function(o) {
|
|
177
195
|
if (o === 1)
|
|
178
196
|
return [];
|
|
@@ -189,21 +207,21 @@ var ae = j, Rt = {};
|
|
|
189
207
|
l === s - 1 && a === 0 || r.push([i[l], i[a]]);
|
|
190
208
|
return r;
|
|
191
209
|
};
|
|
192
|
-
})(
|
|
193
|
-
var
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
const n =
|
|
210
|
+
})(kt);
|
|
211
|
+
var Ft = {};
|
|
212
|
+
const me = I.getSymbolSize, Pt = 7;
|
|
213
|
+
Ft.getPositions = function(t) {
|
|
214
|
+
const n = me(t);
|
|
197
215
|
return [
|
|
198
216
|
// top-left
|
|
199
217
|
[0, 0],
|
|
200
218
|
// top-right
|
|
201
|
-
[n -
|
|
219
|
+
[n - Pt, 0],
|
|
202
220
|
// bottom-left
|
|
203
|
-
[0, n -
|
|
221
|
+
[0, n - Pt]
|
|
204
222
|
];
|
|
205
223
|
};
|
|
206
|
-
var
|
|
224
|
+
var zt = {};
|
|
207
225
|
(function(e) {
|
|
208
226
|
e.Patterns = {
|
|
209
227
|
PATTERN000: 0,
|
|
@@ -227,12 +245,12 @@ var Pt = {};
|
|
|
227
245
|
return e.isValid(r) ? parseInt(r, 10) : void 0;
|
|
228
246
|
}, e.getPenaltyN1 = function(r) {
|
|
229
247
|
const i = r.size;
|
|
230
|
-
let s = 0, l = 0, a = 0,
|
|
248
|
+
let s = 0, l = 0, a = 0, u = null, f = null;
|
|
231
249
|
for (let b = 0; b < i; b++) {
|
|
232
|
-
l = a = 0,
|
|
250
|
+
l = a = 0, u = f = null;
|
|
233
251
|
for (let d = 0; d < i; d++) {
|
|
234
252
|
let g = r.get(b, d);
|
|
235
|
-
g ===
|
|
253
|
+
g === u ? l++ : (l >= 5 && (s += t.N1 + (l - 5)), u = g, l = 1), g = r.get(d, b), g === f ? a++ : (a >= 5 && (s += t.N1 + (a - 5)), f = g, a = 1);
|
|
236
254
|
}
|
|
237
255
|
l >= 5 && (s += t.N1 + (l - 5)), a >= 5 && (s += t.N1 + (a - 5));
|
|
238
256
|
}
|
|
@@ -242,17 +260,17 @@ var Pt = {};
|
|
|
242
260
|
let s = 0;
|
|
243
261
|
for (let l = 0; l < i - 1; l++)
|
|
244
262
|
for (let a = 0; a < i - 1; a++) {
|
|
245
|
-
const
|
|
246
|
-
(
|
|
263
|
+
const u = r.get(l, a) + r.get(l, a + 1) + r.get(l + 1, a) + r.get(l + 1, a + 1);
|
|
264
|
+
(u === 4 || u === 0) && s++;
|
|
247
265
|
}
|
|
248
266
|
return s * t.N2;
|
|
249
267
|
}, e.getPenaltyN3 = function(r) {
|
|
250
268
|
const i = r.size;
|
|
251
269
|
let s = 0, l = 0, a = 0;
|
|
252
|
-
for (let
|
|
270
|
+
for (let u = 0; u < i; u++) {
|
|
253
271
|
l = a = 0;
|
|
254
|
-
for (let
|
|
255
|
-
l = l << 1 & 2047 | r.get(
|
|
272
|
+
for (let f = 0; f < i; f++)
|
|
273
|
+
l = l << 1 & 2047 | r.get(u, f), f >= 10 && (l === 1488 || l === 93) && s++, a = a << 1 & 2047 | r.get(f, u), f >= 10 && (a === 1488 || a === 93) && s++;
|
|
256
274
|
}
|
|
257
275
|
return s * t.N3;
|
|
258
276
|
}, e.getPenaltyN4 = function(r) {
|
|
@@ -292,16 +310,16 @@ var Pt = {};
|
|
|
292
310
|
}, e.getBestMask = function(r, i) {
|
|
293
311
|
const s = Object.keys(e.Patterns).length;
|
|
294
312
|
let l = 0, a = 1 / 0;
|
|
295
|
-
for (let
|
|
296
|
-
i(
|
|
297
|
-
const
|
|
298
|
-
e.applyMask(
|
|
313
|
+
for (let u = 0; u < s; u++) {
|
|
314
|
+
i(u), e.applyMask(u, r);
|
|
315
|
+
const f = e.getPenaltyN1(r) + e.getPenaltyN2(r) + e.getPenaltyN3(r) + e.getPenaltyN4(r);
|
|
316
|
+
e.applyMask(u, r), f < a && (a = f, l = u);
|
|
299
317
|
}
|
|
300
318
|
return l;
|
|
301
319
|
};
|
|
302
|
-
})(
|
|
303
|
-
var
|
|
304
|
-
const D =
|
|
320
|
+
})(zt);
|
|
321
|
+
var it = {};
|
|
322
|
+
const D = ot, Z = [
|
|
305
323
|
// L M Q H
|
|
306
324
|
1,
|
|
307
325
|
1,
|
|
@@ -463,7 +481,7 @@ const D = x, G = [
|
|
|
463
481
|
49,
|
|
464
482
|
68,
|
|
465
483
|
81
|
|
466
|
-
],
|
|
484
|
+
], x = [
|
|
467
485
|
// L M Q H
|
|
468
486
|
7,
|
|
469
487
|
10,
|
|
@@ -626,56 +644,56 @@ const D = x, G = [
|
|
|
626
644
|
2040,
|
|
627
645
|
2430
|
|
628
646
|
];
|
|
629
|
-
|
|
647
|
+
it.getBlocksCount = function(t, n) {
|
|
630
648
|
switch (n) {
|
|
631
649
|
case D.L:
|
|
632
|
-
return
|
|
650
|
+
return Z[(t - 1) * 4 + 0];
|
|
633
651
|
case D.M:
|
|
634
|
-
return
|
|
652
|
+
return Z[(t - 1) * 4 + 1];
|
|
635
653
|
case D.Q:
|
|
636
|
-
return
|
|
654
|
+
return Z[(t - 1) * 4 + 2];
|
|
637
655
|
case D.H:
|
|
638
|
-
return
|
|
656
|
+
return Z[(t - 1) * 4 + 3];
|
|
639
657
|
default:
|
|
640
658
|
return;
|
|
641
659
|
}
|
|
642
660
|
};
|
|
643
|
-
|
|
661
|
+
it.getTotalCodewordsCount = function(t, n) {
|
|
644
662
|
switch (n) {
|
|
645
663
|
case D.L:
|
|
646
|
-
return
|
|
664
|
+
return x[(t - 1) * 4 + 0];
|
|
647
665
|
case D.M:
|
|
648
|
-
return
|
|
666
|
+
return x[(t - 1) * 4 + 1];
|
|
649
667
|
case D.Q:
|
|
650
|
-
return
|
|
668
|
+
return x[(t - 1) * 4 + 2];
|
|
651
669
|
case D.H:
|
|
652
|
-
return
|
|
670
|
+
return x[(t - 1) * 4 + 3];
|
|
653
671
|
default:
|
|
654
672
|
return;
|
|
655
673
|
}
|
|
656
674
|
};
|
|
657
|
-
var
|
|
658
|
-
const
|
|
675
|
+
var vt = {}, st = {};
|
|
676
|
+
const G = new Uint8Array(512), tt = new Uint8Array(256);
|
|
659
677
|
(function() {
|
|
660
678
|
let t = 1;
|
|
661
679
|
for (let n = 0; n < 255; n++)
|
|
662
|
-
|
|
680
|
+
G[n] = t, tt[t] = n, t <<= 1, t & 256 && (t ^= 285);
|
|
663
681
|
for (let n = 255; n < 512; n++)
|
|
664
|
-
|
|
682
|
+
G[n] = G[n - 255];
|
|
665
683
|
})();
|
|
666
|
-
|
|
684
|
+
st.log = function(t) {
|
|
667
685
|
if (t < 1)
|
|
668
686
|
throw new Error("log(" + t + ")");
|
|
669
|
-
return
|
|
687
|
+
return tt[t];
|
|
670
688
|
};
|
|
671
|
-
|
|
672
|
-
return
|
|
689
|
+
st.exp = function(t) {
|
|
690
|
+
return G[t];
|
|
673
691
|
};
|
|
674
|
-
|
|
675
|
-
return t === 0 || n === 0 ? 0 :
|
|
692
|
+
st.mul = function(t, n) {
|
|
693
|
+
return t === 0 || n === 0 ? 0 : G[tt[t] + tt[n]];
|
|
676
694
|
};
|
|
677
695
|
(function(e) {
|
|
678
|
-
const t =
|
|
696
|
+
const t = st;
|
|
679
697
|
e.mul = function(o, r) {
|
|
680
698
|
const i = new Uint8Array(o.length + r.length - 1);
|
|
681
699
|
for (let s = 0; s < o.length; s++)
|
|
@@ -700,53 +718,53 @@ tt.mul = function(t, n) {
|
|
|
700
718
|
r = e.mul(r, new Uint8Array([1, t.exp(i)]));
|
|
701
719
|
return r;
|
|
702
720
|
};
|
|
703
|
-
})(
|
|
704
|
-
const
|
|
705
|
-
function
|
|
721
|
+
})(vt);
|
|
722
|
+
const Vt = vt;
|
|
723
|
+
function Bt(e) {
|
|
706
724
|
this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree);
|
|
707
725
|
}
|
|
708
|
-
|
|
709
|
-
this.degree = t, this.genPoly =
|
|
726
|
+
Bt.prototype.initialize = function(t) {
|
|
727
|
+
this.degree = t, this.genPoly = Vt.generateECPolynomial(this.degree);
|
|
710
728
|
};
|
|
711
|
-
|
|
729
|
+
Bt.prototype.encode = function(t) {
|
|
712
730
|
if (!this.genPoly)
|
|
713
731
|
throw new Error("Encoder not initialized");
|
|
714
732
|
const n = new Uint8Array(t.length + this.degree);
|
|
715
733
|
n.set(t);
|
|
716
|
-
const o =
|
|
734
|
+
const o = Vt.mod(n, this.genPoly), r = this.degree - o.length;
|
|
717
735
|
if (r > 0) {
|
|
718
736
|
const i = new Uint8Array(this.degree);
|
|
719
737
|
return i.set(o, r), i;
|
|
720
738
|
}
|
|
721
739
|
return o;
|
|
722
740
|
};
|
|
723
|
-
var
|
|
724
|
-
|
|
741
|
+
var we = Bt, Ht = {}, k = {}, St = {};
|
|
742
|
+
St.isValid = function(t) {
|
|
725
743
|
return !isNaN(t) && t >= 1 && t <= 40;
|
|
726
744
|
};
|
|
727
|
-
var
|
|
728
|
-
const
|
|
729
|
-
let
|
|
730
|
-
|
|
731
|
-
const
|
|
745
|
+
var M = {};
|
|
746
|
+
const Ot = "[0-9]+", ye = "[A-Z $%*+\\-./:]+";
|
|
747
|
+
let Y = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
748
|
+
Y = Y.replace(/u/g, "\\u");
|
|
749
|
+
const Ee = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Y + `)(?:.|[\r
|
|
732
750
|
]))+`;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
return
|
|
751
|
+
M.KANJI = new RegExp(Y, "g");
|
|
752
|
+
M.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
753
|
+
M.BYTE = new RegExp(Ee, "g");
|
|
754
|
+
M.NUMERIC = new RegExp(Ot, "g");
|
|
755
|
+
M.ALPHANUMERIC = new RegExp(ye, "g");
|
|
756
|
+
const pe = new RegExp("^" + Y + "$"), Ce = new RegExp("^" + Ot + "$"), be = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
757
|
+
M.testKanji = function(t) {
|
|
758
|
+
return pe.test(t);
|
|
741
759
|
};
|
|
742
|
-
|
|
743
|
-
return
|
|
760
|
+
M.testNumeric = function(t) {
|
|
761
|
+
return Ce.test(t);
|
|
744
762
|
};
|
|
745
|
-
|
|
746
|
-
return
|
|
763
|
+
M.testAlphanumeric = function(t) {
|
|
764
|
+
return be.test(t);
|
|
747
765
|
};
|
|
748
766
|
(function(e) {
|
|
749
|
-
const t =
|
|
767
|
+
const t = St, n = M;
|
|
750
768
|
e.NUMERIC = {
|
|
751
769
|
id: "Numeric",
|
|
752
770
|
bit: 1,
|
|
@@ -801,107 +819,107 @@ P.testAlphanumeric = function(t) {
|
|
|
801
819
|
return i;
|
|
802
820
|
try {
|
|
803
821
|
return o(i);
|
|
804
|
-
} catch {
|
|
822
|
+
} catch (l) {
|
|
805
823
|
return s;
|
|
806
824
|
}
|
|
807
825
|
};
|
|
808
826
|
})(k);
|
|
809
827
|
(function(e) {
|
|
810
|
-
const t =
|
|
811
|
-
function a(d, g,
|
|
812
|
-
for (let
|
|
813
|
-
if (g <= e.getCapacity(
|
|
814
|
-
return
|
|
828
|
+
const t = I, n = it, o = ot, r = k, i = St, s = 7973, l = t.getBCHDigit(s);
|
|
829
|
+
function a(d, g, h) {
|
|
830
|
+
for (let m = 1; m <= 40; m++)
|
|
831
|
+
if (g <= e.getCapacity(m, h, d))
|
|
832
|
+
return m;
|
|
815
833
|
}
|
|
816
|
-
function
|
|
834
|
+
function u(d, g) {
|
|
817
835
|
return r.getCharCountIndicator(d, g) + 4;
|
|
818
836
|
}
|
|
819
|
-
function
|
|
820
|
-
let
|
|
821
|
-
return d.forEach(function(
|
|
822
|
-
const
|
|
823
|
-
|
|
824
|
-
}),
|
|
837
|
+
function f(d, g) {
|
|
838
|
+
let h = 0;
|
|
839
|
+
return d.forEach(function(m) {
|
|
840
|
+
const C = u(m.mode, g);
|
|
841
|
+
h += C + m.getBitsLength();
|
|
842
|
+
}), h;
|
|
825
843
|
}
|
|
826
844
|
function b(d, g) {
|
|
827
|
-
for (let
|
|
828
|
-
if (
|
|
829
|
-
return
|
|
845
|
+
for (let h = 1; h <= 40; h++)
|
|
846
|
+
if (f(d, h) <= e.getCapacity(h, g, r.MIXED))
|
|
847
|
+
return h;
|
|
830
848
|
}
|
|
831
|
-
e.from = function(g,
|
|
832
|
-
return i.isValid(g) ? parseInt(g, 10) :
|
|
833
|
-
}, e.getCapacity = function(g,
|
|
849
|
+
e.from = function(g, h) {
|
|
850
|
+
return i.isValid(g) ? parseInt(g, 10) : h;
|
|
851
|
+
}, e.getCapacity = function(g, h, m) {
|
|
834
852
|
if (!i.isValid(g))
|
|
835
853
|
throw new Error("Invalid QR Code version");
|
|
836
|
-
typeof
|
|
837
|
-
const
|
|
838
|
-
if (
|
|
839
|
-
return
|
|
840
|
-
const
|
|
841
|
-
switch (
|
|
854
|
+
typeof m == "undefined" && (m = r.BYTE);
|
|
855
|
+
const C = t.getSymbolTotalCodewords(g), c = n.getTotalCodewordsCount(g, h), w = (C - c) * 8;
|
|
856
|
+
if (m === r.MIXED)
|
|
857
|
+
return w;
|
|
858
|
+
const E = w - u(m, g);
|
|
859
|
+
switch (m) {
|
|
842
860
|
case r.NUMERIC:
|
|
843
|
-
return Math.floor(
|
|
861
|
+
return Math.floor(E / 10 * 3);
|
|
844
862
|
case r.ALPHANUMERIC:
|
|
845
|
-
return Math.floor(
|
|
863
|
+
return Math.floor(E / 11 * 2);
|
|
846
864
|
case r.KANJI:
|
|
847
|
-
return Math.floor(
|
|
865
|
+
return Math.floor(E / 13);
|
|
848
866
|
case r.BYTE:
|
|
849
867
|
default:
|
|
850
|
-
return Math.floor(
|
|
868
|
+
return Math.floor(E / 8);
|
|
851
869
|
}
|
|
852
|
-
}, e.getBestVersionForData = function(g,
|
|
853
|
-
let
|
|
854
|
-
const
|
|
870
|
+
}, e.getBestVersionForData = function(g, h) {
|
|
871
|
+
let m;
|
|
872
|
+
const C = o.from(h, o.M);
|
|
855
873
|
if (Array.isArray(g)) {
|
|
856
874
|
if (g.length > 1)
|
|
857
|
-
return b(g,
|
|
875
|
+
return b(g, C);
|
|
858
876
|
if (g.length === 0)
|
|
859
877
|
return 1;
|
|
860
|
-
|
|
878
|
+
m = g[0];
|
|
861
879
|
} else
|
|
862
|
-
|
|
863
|
-
return a(
|
|
880
|
+
m = g;
|
|
881
|
+
return a(m.mode, m.getLength(), C);
|
|
864
882
|
}, e.getEncodedBits = function(g) {
|
|
865
883
|
if (!i.isValid(g) || g < 7)
|
|
866
884
|
throw new Error("Invalid QR Code version");
|
|
867
|
-
let
|
|
868
|
-
for (; t.getBCHDigit(
|
|
869
|
-
|
|
870
|
-
return g << 12 |
|
|
885
|
+
let h = g << 12;
|
|
886
|
+
for (; t.getBCHDigit(h) - l >= 0; )
|
|
887
|
+
h ^= s << t.getBCHDigit(h) - l;
|
|
888
|
+
return g << 12 | h;
|
|
871
889
|
};
|
|
872
|
-
})(
|
|
873
|
-
var
|
|
874
|
-
const
|
|
875
|
-
|
|
890
|
+
})(Ht);
|
|
891
|
+
var Qt = {};
|
|
892
|
+
const yt = I, Kt = 1335, Be = 21522, _t = yt.getBCHDigit(Kt);
|
|
893
|
+
Qt.getEncodedBits = function(t, n) {
|
|
876
894
|
const o = t.bit << 3 | n;
|
|
877
895
|
let r = o << 10;
|
|
878
|
-
for (;
|
|
879
|
-
r ^=
|
|
880
|
-
return (o << 10 | r) ^
|
|
896
|
+
for (; yt.getBCHDigit(r) - _t >= 0; )
|
|
897
|
+
r ^= Kt << yt.getBCHDigit(r) - _t;
|
|
898
|
+
return (o << 10 | r) ^ Be;
|
|
881
899
|
};
|
|
882
|
-
var
|
|
883
|
-
const
|
|
884
|
-
function
|
|
885
|
-
this.mode =
|
|
900
|
+
var Jt = {};
|
|
901
|
+
const Se = k;
|
|
902
|
+
function z(e) {
|
|
903
|
+
this.mode = Se.NUMERIC, this.data = e.toString();
|
|
886
904
|
}
|
|
887
|
-
|
|
905
|
+
z.getBitsLength = function(t) {
|
|
888
906
|
return 10 * Math.floor(t / 3) + (t % 3 ? t % 3 * 3 + 1 : 0);
|
|
889
907
|
};
|
|
890
|
-
|
|
908
|
+
z.prototype.getLength = function() {
|
|
891
909
|
return this.data.length;
|
|
892
910
|
};
|
|
893
|
-
|
|
894
|
-
return
|
|
911
|
+
z.prototype.getBitsLength = function() {
|
|
912
|
+
return z.getBitsLength(this.data.length);
|
|
895
913
|
};
|
|
896
|
-
|
|
914
|
+
z.prototype.write = function(t) {
|
|
897
915
|
let n, o, r;
|
|
898
916
|
for (n = 0; n + 3 <= this.data.length; n += 3)
|
|
899
917
|
o = this.data.substr(n, 3), r = parseInt(o, 10), t.put(r, 10);
|
|
900
918
|
const i = this.data.length - n;
|
|
901
919
|
i > 0 && (o = this.data.substr(n), r = parseInt(o, 10), t.put(r, i * 3 + 1));
|
|
902
920
|
};
|
|
903
|
-
var
|
|
904
|
-
const
|
|
921
|
+
var Ae = z;
|
|
922
|
+
const Te = k, ut = [
|
|
905
923
|
"0",
|
|
906
924
|
"1",
|
|
907
925
|
"2",
|
|
@@ -948,62 +966,62 @@ const pe = k, nt = [
|
|
|
948
966
|
"/",
|
|
949
967
|
":"
|
|
950
968
|
];
|
|
951
|
-
function
|
|
952
|
-
this.mode =
|
|
969
|
+
function v(e) {
|
|
970
|
+
this.mode = Te.ALPHANUMERIC, this.data = e;
|
|
953
971
|
}
|
|
954
|
-
|
|
972
|
+
v.getBitsLength = function(t) {
|
|
955
973
|
return 11 * Math.floor(t / 2) + 6 * (t % 2);
|
|
956
974
|
};
|
|
957
|
-
|
|
975
|
+
v.prototype.getLength = function() {
|
|
958
976
|
return this.data.length;
|
|
959
977
|
};
|
|
960
|
-
|
|
961
|
-
return
|
|
978
|
+
v.prototype.getBitsLength = function() {
|
|
979
|
+
return v.getBitsLength(this.data.length);
|
|
962
980
|
};
|
|
963
|
-
|
|
981
|
+
v.prototype.write = function(t) {
|
|
964
982
|
let n;
|
|
965
983
|
for (n = 0; n + 2 <= this.data.length; n += 2) {
|
|
966
|
-
let o =
|
|
967
|
-
o +=
|
|
984
|
+
let o = ut.indexOf(this.data[n]) * 45;
|
|
985
|
+
o += ut.indexOf(this.data[n + 1]), t.put(o, 11);
|
|
968
986
|
}
|
|
969
|
-
this.data.length % 2 && t.put(
|
|
987
|
+
this.data.length % 2 && t.put(ut.indexOf(this.data[n]), 6);
|
|
970
988
|
};
|
|
971
|
-
var
|
|
972
|
-
const
|
|
973
|
-
function
|
|
974
|
-
this.mode =
|
|
989
|
+
var Ie = v;
|
|
990
|
+
const Ne = k;
|
|
991
|
+
function V(e) {
|
|
992
|
+
this.mode = Ne.BYTE, typeof e == "string" ? this.data = new TextEncoder().encode(e) : this.data = new Uint8Array(e);
|
|
975
993
|
}
|
|
976
|
-
|
|
994
|
+
V.getBitsLength = function(t) {
|
|
977
995
|
return t * 8;
|
|
978
996
|
};
|
|
979
|
-
|
|
997
|
+
V.prototype.getLength = function() {
|
|
980
998
|
return this.data.length;
|
|
981
999
|
};
|
|
982
|
-
|
|
983
|
-
return
|
|
1000
|
+
V.prototype.getBitsLength = function() {
|
|
1001
|
+
return V.getBitsLength(this.data.length);
|
|
984
1002
|
};
|
|
985
|
-
|
|
1003
|
+
V.prototype.write = function(e) {
|
|
986
1004
|
for (let t = 0, n = this.data.length; t < n; t++)
|
|
987
1005
|
e.put(this.data[t], 8);
|
|
988
1006
|
};
|
|
989
|
-
var
|
|
990
|
-
const
|
|
991
|
-
function
|
|
992
|
-
this.mode =
|
|
1007
|
+
var Re = V;
|
|
1008
|
+
const Me = k, Pe = I;
|
|
1009
|
+
function H(e) {
|
|
1010
|
+
this.mode = Me.KANJI, this.data = e;
|
|
993
1011
|
}
|
|
994
|
-
|
|
1012
|
+
H.getBitsLength = function(t) {
|
|
995
1013
|
return t * 13;
|
|
996
1014
|
};
|
|
997
|
-
|
|
1015
|
+
H.prototype.getLength = function() {
|
|
998
1016
|
return this.data.length;
|
|
999
1017
|
};
|
|
1000
|
-
|
|
1001
|
-
return
|
|
1018
|
+
H.prototype.getBitsLength = function() {
|
|
1019
|
+
return H.getBitsLength(this.data.length);
|
|
1002
1020
|
};
|
|
1003
|
-
|
|
1021
|
+
H.prototype.write = function(e) {
|
|
1004
1022
|
let t;
|
|
1005
1023
|
for (t = 0; t < this.data.length; t++) {
|
|
1006
|
-
let n =
|
|
1024
|
+
let n = Pe.toSJIS(this.data[t]);
|
|
1007
1025
|
if (n >= 33088 && n <= 40956)
|
|
1008
1026
|
n -= 33088;
|
|
1009
1027
|
else if (n >= 57408 && n <= 60351)
|
|
@@ -1016,7 +1034,7 @@ Make sure your charset is UTF-8`
|
|
|
1016
1034
|
n = (n >>> 8 & 255) * 192 + (n & 255), e.put(n, 13);
|
|
1017
1035
|
}
|
|
1018
1036
|
};
|
|
1019
|
-
var
|
|
1037
|
+
var _e = H, jt = { exports: {} };
|
|
1020
1038
|
(function(e) {
|
|
1021
1039
|
var t = {
|
|
1022
1040
|
single_source_shortest_paths: function(n, o, r) {
|
|
@@ -1024,12 +1042,12 @@ var Ie = O, vt = { exports: {} };
|
|
|
1024
1042
|
s[o] = 0;
|
|
1025
1043
|
var l = t.PriorityQueue.make();
|
|
1026
1044
|
l.push(o, 0);
|
|
1027
|
-
for (var a,
|
|
1028
|
-
a = l.pop(),
|
|
1029
|
-
for (
|
|
1030
|
-
d.hasOwnProperty(
|
|
1045
|
+
for (var a, u, f, b, d, g, h, m, C; !l.empty(); ) {
|
|
1046
|
+
a = l.pop(), u = a.value, b = a.cost, d = n[u] || {};
|
|
1047
|
+
for (f in d)
|
|
1048
|
+
d.hasOwnProperty(f) && (g = d[f], h = b + g, m = s[f], C = typeof s[f] == "undefined", (C || m > h) && (s[f] = h, l.push(f, h), i[f] = u));
|
|
1031
1049
|
}
|
|
1032
|
-
if (typeof r
|
|
1050
|
+
if (typeof r != "undefined" && typeof s[r] == "undefined") {
|
|
1033
1051
|
var c = ["Could not find a path from ", o, " to ", r, "."].join("");
|
|
1034
1052
|
throw new Error(c);
|
|
1035
1053
|
}
|
|
@@ -1081,30 +1099,30 @@ var Ie = O, vt = { exports: {} };
|
|
|
1081
1099
|
}
|
|
1082
1100
|
};
|
|
1083
1101
|
e.exports = t;
|
|
1084
|
-
})(
|
|
1085
|
-
var
|
|
1102
|
+
})(jt);
|
|
1103
|
+
var Le = jt.exports;
|
|
1086
1104
|
(function(e) {
|
|
1087
|
-
const t = k, n =
|
|
1088
|
-
function
|
|
1105
|
+
const t = k, n = Ae, o = Ie, r = Re, i = _e, s = M, l = I, a = Le;
|
|
1106
|
+
function u(c) {
|
|
1089
1107
|
return unescape(encodeURIComponent(c)).length;
|
|
1090
1108
|
}
|
|
1091
|
-
function
|
|
1109
|
+
function f(c, w, E) {
|
|
1092
1110
|
const y = [];
|
|
1093
1111
|
let B;
|
|
1094
|
-
for (; (B = c.exec(
|
|
1112
|
+
for (; (B = c.exec(E)) !== null; )
|
|
1095
1113
|
y.push({
|
|
1096
1114
|
data: B[0],
|
|
1097
1115
|
index: B.index,
|
|
1098
|
-
mode:
|
|
1116
|
+
mode: w,
|
|
1099
1117
|
length: B[0].length
|
|
1100
1118
|
});
|
|
1101
1119
|
return y;
|
|
1102
1120
|
}
|
|
1103
1121
|
function b(c) {
|
|
1104
|
-
const
|
|
1122
|
+
const w = f(s.NUMERIC, t.NUMERIC, c), E = f(s.ALPHANUMERIC, t.ALPHANUMERIC, c);
|
|
1105
1123
|
let y, B;
|
|
1106
|
-
return l.isKanjiModeEnabled() ? (y =
|
|
1107
|
-
return A.index -
|
|
1124
|
+
return l.isKanjiModeEnabled() ? (y = f(s.BYTE, t.BYTE, c), B = f(s.KANJI, t.KANJI, c)) : (y = f(s.BYTE_KANJI, t.BYTE, c), B = []), w.concat(E, y, B).sort(function(A, T) {
|
|
1125
|
+
return A.index - T.index;
|
|
1108
1126
|
}).map(function(A) {
|
|
1109
1127
|
return {
|
|
1110
1128
|
data: A.data,
|
|
@@ -1113,8 +1131,8 @@ var Te = vt.exports;
|
|
|
1113
1131
|
};
|
|
1114
1132
|
});
|
|
1115
1133
|
}
|
|
1116
|
-
function d(c,
|
|
1117
|
-
switch (
|
|
1134
|
+
function d(c, w) {
|
|
1135
|
+
switch (w) {
|
|
1118
1136
|
case t.NUMERIC:
|
|
1119
1137
|
return n.getBitsLength(c);
|
|
1120
1138
|
case t.ALPHANUMERIC:
|
|
@@ -1126,69 +1144,69 @@ var Te = vt.exports;
|
|
|
1126
1144
|
}
|
|
1127
1145
|
}
|
|
1128
1146
|
function g(c) {
|
|
1129
|
-
return c.reduce(function(
|
|
1130
|
-
const y =
|
|
1131
|
-
return y && y.mode ===
|
|
1147
|
+
return c.reduce(function(w, E) {
|
|
1148
|
+
const y = w.length - 1 >= 0 ? w[w.length - 1] : null;
|
|
1149
|
+
return y && y.mode === E.mode ? (w[w.length - 1].data += E.data, w) : (w.push(E), w);
|
|
1132
1150
|
}, []);
|
|
1133
1151
|
}
|
|
1134
|
-
function
|
|
1135
|
-
const
|
|
1136
|
-
for (let
|
|
1137
|
-
const y = c[
|
|
1152
|
+
function h(c) {
|
|
1153
|
+
const w = [];
|
|
1154
|
+
for (let E = 0; E < c.length; E++) {
|
|
1155
|
+
const y = c[E];
|
|
1138
1156
|
switch (y.mode) {
|
|
1139
1157
|
case t.NUMERIC:
|
|
1140
|
-
|
|
1158
|
+
w.push([
|
|
1141
1159
|
y,
|
|
1142
1160
|
{ data: y.data, mode: t.ALPHANUMERIC, length: y.length },
|
|
1143
1161
|
{ data: y.data, mode: t.BYTE, length: y.length }
|
|
1144
1162
|
]);
|
|
1145
1163
|
break;
|
|
1146
1164
|
case t.ALPHANUMERIC:
|
|
1147
|
-
|
|
1165
|
+
w.push([
|
|
1148
1166
|
y,
|
|
1149
1167
|
{ data: y.data, mode: t.BYTE, length: y.length }
|
|
1150
1168
|
]);
|
|
1151
1169
|
break;
|
|
1152
1170
|
case t.KANJI:
|
|
1153
|
-
|
|
1171
|
+
w.push([
|
|
1154
1172
|
y,
|
|
1155
|
-
{ data: y.data, mode: t.BYTE, length:
|
|
1173
|
+
{ data: y.data, mode: t.BYTE, length: u(y.data) }
|
|
1156
1174
|
]);
|
|
1157
1175
|
break;
|
|
1158
1176
|
case t.BYTE:
|
|
1159
|
-
|
|
1160
|
-
{ data: y.data, mode: t.BYTE, length:
|
|
1177
|
+
w.push([
|
|
1178
|
+
{ data: y.data, mode: t.BYTE, length: u(y.data) }
|
|
1161
1179
|
]);
|
|
1162
1180
|
}
|
|
1163
1181
|
}
|
|
1164
|
-
return
|
|
1182
|
+
return w;
|
|
1165
1183
|
}
|
|
1166
|
-
function
|
|
1167
|
-
const
|
|
1184
|
+
function m(c, w) {
|
|
1185
|
+
const E = {}, y = { start: {} };
|
|
1168
1186
|
let B = ["start"];
|
|
1169
1187
|
for (let S = 0; S < c.length; S++) {
|
|
1170
|
-
const A = c[S],
|
|
1171
|
-
for (let
|
|
1172
|
-
const
|
|
1173
|
-
|
|
1174
|
-
for (let
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1188
|
+
const A = c[S], T = [];
|
|
1189
|
+
for (let N = 0; N < A.length; N++) {
|
|
1190
|
+
const R = A[N], L = "" + S + N;
|
|
1191
|
+
T.push(L), E[L] = { node: R, lastCount: 0 }, y[L] = {};
|
|
1192
|
+
for (let O = 0; O < B.length; O++) {
|
|
1193
|
+
const p = B[O];
|
|
1194
|
+
E[p] && E[p].node.mode === R.mode ? (y[p][L] = d(E[p].lastCount + R.length, R.mode) - d(E[p].lastCount, R.mode), E[p].lastCount += R.length) : (E[p] && (E[p].lastCount = R.length), y[p][L] = d(R.length, R.mode) + 4 + t.getCharCountIndicator(R.mode, w));
|
|
1177
1195
|
}
|
|
1178
1196
|
}
|
|
1179
|
-
B =
|
|
1197
|
+
B = T;
|
|
1180
1198
|
}
|
|
1181
1199
|
for (let S = 0; S < B.length; S++)
|
|
1182
1200
|
y[B[S]].end = 0;
|
|
1183
|
-
return { map: y, table:
|
|
1201
|
+
return { map: y, table: E };
|
|
1184
1202
|
}
|
|
1185
|
-
function
|
|
1186
|
-
let
|
|
1203
|
+
function C(c, w) {
|
|
1204
|
+
let E;
|
|
1187
1205
|
const y = t.getBestModeForData(c);
|
|
1188
|
-
if (
|
|
1189
|
-
throw new Error('"' + c + '" cannot be encoded with mode ' + t.toString(
|
|
1206
|
+
if (E = t.from(w, y), E !== t.BYTE && E.bit < y.bit)
|
|
1207
|
+
throw new Error('"' + c + '" cannot be encoded with mode ' + t.toString(E) + `.
|
|
1190
1208
|
Suggested mode is: ` + t.toString(y));
|
|
1191
|
-
switch (
|
|
1209
|
+
switch (E === t.KANJI && !l.isKanjiModeEnabled() && (E = t.BYTE), E) {
|
|
1192
1210
|
case t.NUMERIC:
|
|
1193
1211
|
return new n(c);
|
|
1194
1212
|
case t.ALPHANUMERIC:
|
|
@@ -1199,24 +1217,24 @@ var Te = vt.exports;
|
|
|
1199
1217
|
return new r(c);
|
|
1200
1218
|
}
|
|
1201
1219
|
}
|
|
1202
|
-
e.fromArray = function(
|
|
1203
|
-
return
|
|
1204
|
-
return typeof y == "string" ?
|
|
1220
|
+
e.fromArray = function(w) {
|
|
1221
|
+
return w.reduce(function(E, y) {
|
|
1222
|
+
return typeof y == "string" ? E.push(C(y, null)) : y.data && E.push(C(y.data, y.mode)), E;
|
|
1205
1223
|
}, []);
|
|
1206
|
-
}, e.fromString = function(
|
|
1207
|
-
const y = b(
|
|
1208
|
-
for (let
|
|
1209
|
-
|
|
1210
|
-
return e.fromArray(g(
|
|
1211
|
-
}, e.rawSplit = function(
|
|
1224
|
+
}, e.fromString = function(w, E) {
|
|
1225
|
+
const y = b(w, l.isKanjiModeEnabled()), B = h(y), S = m(B, E), A = a.find_path(S.map, "start", "end"), T = [];
|
|
1226
|
+
for (let N = 1; N < A.length - 1; N++)
|
|
1227
|
+
T.push(S.table[A[N]].node);
|
|
1228
|
+
return e.fromArray(g(T));
|
|
1229
|
+
}, e.rawSplit = function(w) {
|
|
1212
1230
|
return e.fromArray(
|
|
1213
|
-
b(
|
|
1231
|
+
b(w, l.isKanjiModeEnabled())
|
|
1214
1232
|
);
|
|
1215
1233
|
};
|
|
1216
|
-
})(
|
|
1217
|
-
const
|
|
1218
|
-
function
|
|
1219
|
-
const n = e.size, o =
|
|
1234
|
+
})(Jt);
|
|
1235
|
+
const at = I, ct = ot, Ue = ge, De = he, ke = kt, Fe = Ft, Et = zt, pt = it, ze = we, et = Ht, ve = Qt, Ve = k, ft = Jt;
|
|
1236
|
+
function He(e, t) {
|
|
1237
|
+
const n = e.size, o = Fe.getPositions(t);
|
|
1220
1238
|
for (let r = 0; r < o.length; r++) {
|
|
1221
1239
|
const i = o[r][0], s = o[r][1];
|
|
1222
1240
|
for (let l = -1; l <= 7; l++)
|
|
@@ -1225,15 +1243,15 @@ function De(e, t) {
|
|
|
1225
1243
|
s + a <= -1 || n <= s + a || (l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 2 && l <= 4 && a >= 2 && a <= 4 ? e.set(i + l, s + a, !0, !0) : e.set(i + l, s + a, !1, !0));
|
|
1226
1244
|
}
|
|
1227
1245
|
}
|
|
1228
|
-
function
|
|
1246
|
+
function Oe(e) {
|
|
1229
1247
|
const t = e.size;
|
|
1230
1248
|
for (let n = 8; n < t - 8; n++) {
|
|
1231
1249
|
const o = n % 2 === 0;
|
|
1232
1250
|
e.set(n, 6, o, !0), e.set(6, n, o, !0);
|
|
1233
1251
|
}
|
|
1234
1252
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const n =
|
|
1253
|
+
function Qe(e, t) {
|
|
1254
|
+
const n = ke.getPositions(t);
|
|
1237
1255
|
for (let o = 0; o < n.length; o++) {
|
|
1238
1256
|
const r = n[o][0], i = n[o][1];
|
|
1239
1257
|
for (let s = -2; s <= 2; s++)
|
|
@@ -1241,28 +1259,28 @@ function Fe(e, t) {
|
|
|
1241
1259
|
s === -2 || s === 2 || l === -2 || l === 2 || s === 0 && l === 0 ? e.set(r + s, i + l, !0, !0) : e.set(r + s, i + l, !1, !0);
|
|
1242
1260
|
}
|
|
1243
1261
|
}
|
|
1244
|
-
function
|
|
1245
|
-
const n = e.size, o =
|
|
1262
|
+
function Ke(e, t) {
|
|
1263
|
+
const n = e.size, o = et.getEncodedBits(t);
|
|
1246
1264
|
let r, i, s;
|
|
1247
1265
|
for (let l = 0; l < 18; l++)
|
|
1248
1266
|
r = Math.floor(l / 3), i = l % 3 + n - 8 - 3, s = (o >> l & 1) === 1, e.set(r, i, s, !0), e.set(i, r, s, !0);
|
|
1249
1267
|
}
|
|
1250
|
-
function
|
|
1251
|
-
const o = e.size, r =
|
|
1268
|
+
function dt(e, t, n) {
|
|
1269
|
+
const o = e.size, r = ve.getEncodedBits(t, n);
|
|
1252
1270
|
let i, s;
|
|
1253
1271
|
for (i = 0; i < 15; i++)
|
|
1254
1272
|
s = (r >> i & 1) === 1, i < 6 ? e.set(i, 8, s, !0) : i < 8 ? e.set(i + 1, 8, s, !0) : e.set(o - 15 + i, 8, s, !0), i < 8 ? e.set(8, o - i - 1, s, !0) : i < 9 ? e.set(8, 15 - i - 1 + 1, s, !0) : e.set(8, 15 - i - 1, s, !0);
|
|
1255
1273
|
e.set(o - 8, 8, 1, !0);
|
|
1256
1274
|
}
|
|
1257
|
-
function
|
|
1275
|
+
function Je(e, t) {
|
|
1258
1276
|
const n = e.size;
|
|
1259
1277
|
let o = -1, r = n - 1, i = 7, s = 0;
|
|
1260
1278
|
for (let l = n - 1; l > 0; l -= 2)
|
|
1261
1279
|
for (l === 6 && l--; ; ) {
|
|
1262
1280
|
for (let a = 0; a < 2; a++)
|
|
1263
1281
|
if (!e.isReserved(r, l - a)) {
|
|
1264
|
-
let
|
|
1265
|
-
s < t.length && (
|
|
1282
|
+
let u = !1;
|
|
1283
|
+
s < t.length && (u = (t[s] >>> i & 1) === 1), e.set(r, l - a, u), i--, i === -1 && (s++, i = 7);
|
|
1266
1284
|
}
|
|
1267
1285
|
if (r += o, r < 0 || n <= r) {
|
|
1268
1286
|
r -= o, o = -o;
|
|
@@ -1270,53 +1288,53 @@ function ve(e, t) {
|
|
|
1270
1288
|
}
|
|
1271
1289
|
}
|
|
1272
1290
|
}
|
|
1273
|
-
function
|
|
1274
|
-
const o = new
|
|
1291
|
+
function je(e, t, n) {
|
|
1292
|
+
const o = new Ue();
|
|
1275
1293
|
n.forEach(function(a) {
|
|
1276
|
-
o.put(a.mode.bit, 4), o.put(a.getLength(),
|
|
1294
|
+
o.put(a.mode.bit, 4), o.put(a.getLength(), Ve.getCharCountIndicator(a.mode, e)), a.write(o);
|
|
1277
1295
|
});
|
|
1278
|
-
const r =
|
|
1296
|
+
const r = at.getSymbolTotalCodewords(e), i = pt.getTotalCodewordsCount(e, t), s = (r - i) * 8;
|
|
1279
1297
|
for (o.getLengthInBits() + 4 <= s && o.put(0, 4); o.getLengthInBits() % 8 !== 0; )
|
|
1280
1298
|
o.putBit(0);
|
|
1281
1299
|
const l = (s - o.getLengthInBits()) / 8;
|
|
1282
1300
|
for (let a = 0; a < l; a++)
|
|
1283
1301
|
o.put(a % 2 ? 17 : 236, 8);
|
|
1284
|
-
return
|
|
1302
|
+
return Ge(o, e, t);
|
|
1285
1303
|
}
|
|
1286
|
-
function
|
|
1287
|
-
const o =
|
|
1288
|
-
let
|
|
1289
|
-
const
|
|
1304
|
+
function Ge(e, t, n) {
|
|
1305
|
+
const o = at.getSymbolTotalCodewords(t), r = pt.getTotalCodewordsCount(t, n), i = o - r, s = pt.getBlocksCount(t, n), l = o % s, a = s - l, u = Math.floor(o / s), f = Math.floor(i / s), b = f + 1, d = u - f, g = new ze(d);
|
|
1306
|
+
let h = 0;
|
|
1307
|
+
const m = new Array(s), C = new Array(s);
|
|
1290
1308
|
let c = 0;
|
|
1291
|
-
const
|
|
1309
|
+
const w = new Uint8Array(e.buffer);
|
|
1292
1310
|
for (let A = 0; A < s; A++) {
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1311
|
+
const T = A < a ? f : b;
|
|
1312
|
+
m[A] = w.slice(h, h + T), C[A] = g.encode(m[A]), h += T, c = Math.max(c, T);
|
|
1295
1313
|
}
|
|
1296
|
-
const
|
|
1314
|
+
const E = new Uint8Array(o);
|
|
1297
1315
|
let y = 0, B, S;
|
|
1298
1316
|
for (B = 0; B < c; B++)
|
|
1299
1317
|
for (S = 0; S < s; S++)
|
|
1300
|
-
B <
|
|
1318
|
+
B < m[S].length && (E[y++] = m[S][B]);
|
|
1301
1319
|
for (B = 0; B < d; B++)
|
|
1302
1320
|
for (S = 0; S < s; S++)
|
|
1303
|
-
|
|
1304
|
-
return
|
|
1321
|
+
E[y++] = C[S][B];
|
|
1322
|
+
return E;
|
|
1305
1323
|
}
|
|
1306
|
-
function
|
|
1324
|
+
function Ye(e, t, n, o) {
|
|
1307
1325
|
let r;
|
|
1308
1326
|
if (Array.isArray(e))
|
|
1309
|
-
r =
|
|
1327
|
+
r = ft.fromArray(e);
|
|
1310
1328
|
else if (typeof e == "string") {
|
|
1311
|
-
let
|
|
1312
|
-
if (!
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1329
|
+
let u = t;
|
|
1330
|
+
if (!u) {
|
|
1331
|
+
const f = ft.rawSplit(e);
|
|
1332
|
+
u = et.getBestVersionForData(f, n);
|
|
1315
1333
|
}
|
|
1316
|
-
r =
|
|
1334
|
+
r = ft.fromString(e, u || 40);
|
|
1317
1335
|
} else
|
|
1318
1336
|
throw new Error("Invalid data");
|
|
1319
|
-
const i =
|
|
1337
|
+
const i = et.getBestVersionForData(r, n);
|
|
1320
1338
|
if (!i)
|
|
1321
1339
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1322
1340
|
if (!t)
|
|
@@ -1328,11 +1346,11 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1328
1346
|
Minimum version required to store current data is: ` + i + `.
|
|
1329
1347
|
`
|
|
1330
1348
|
);
|
|
1331
|
-
const s =
|
|
1332
|
-
return
|
|
1349
|
+
const s = je(t, n, r), l = at.getSymbolSize(t), a = new De(l);
|
|
1350
|
+
return He(a, t), Oe(a), Qe(a, t), dt(a, n, 0), t >= 7 && Ke(a, t), Je(a, s), isNaN(o) && (o = Et.getBestMask(
|
|
1333
1351
|
a,
|
|
1334
|
-
|
|
1335
|
-
)),
|
|
1352
|
+
dt.bind(null, a, n)
|
|
1353
|
+
)), Et.applyMask(o, a), dt(a, n, o), {
|
|
1336
1354
|
modules: a,
|
|
1337
1355
|
version: t,
|
|
1338
1356
|
errorCorrectionLevel: n,
|
|
@@ -1340,13 +1358,13 @@ Minimum version required to store current data is: ` + i + `.
|
|
|
1340
1358
|
segments: r
|
|
1341
1359
|
};
|
|
1342
1360
|
}
|
|
1343
|
-
|
|
1344
|
-
if (typeof t
|
|
1361
|
+
Ut.create = function(t, n) {
|
|
1362
|
+
if (typeof t == "undefined" || t === "")
|
|
1345
1363
|
throw new Error("No input text");
|
|
1346
|
-
let o =
|
|
1347
|
-
return typeof n
|
|
1364
|
+
let o = ct.M, r, i;
|
|
1365
|
+
return typeof n != "undefined" && (o = ct.from(n.errorCorrectionLevel, ct.M), r = et.from(n.version), i = Et.from(n.maskPattern), n.toSJISFunc && at.setToSJISFunction(n.toSJISFunc)), Ye(t, r, o, i);
|
|
1348
1366
|
};
|
|
1349
|
-
var
|
|
1367
|
+
var Gt = {}, At = {};
|
|
1350
1368
|
(function(e) {
|
|
1351
1369
|
function t(n) {
|
|
1352
1370
|
if (typeof n == "number" && (n = n.toString()), typeof n != "string")
|
|
@@ -1368,7 +1386,7 @@ var Vt = {}, yt = {};
|
|
|
1368
1386
|
}
|
|
1369
1387
|
e.getOptions = function(o) {
|
|
1370
1388
|
o || (o = {}), o.color || (o.color = {});
|
|
1371
|
-
const r = typeof o.margin
|
|
1389
|
+
const r = typeof o.margin == "undefined" || o.margin === null || o.margin < 0 ? 4 : o.margin, i = o.width && o.width >= 21 ? o.width : void 0, s = o.scale || 4;
|
|
1372
1390
|
return {
|
|
1373
1391
|
width: i,
|
|
1374
1392
|
scale: i ? 4 : s,
|
|
@@ -1386,138 +1404,139 @@ var Vt = {}, yt = {};
|
|
|
1386
1404
|
const i = e.getScale(o, r);
|
|
1387
1405
|
return Math.floor((o + r.margin * 2) * i);
|
|
1388
1406
|
}, e.qrToImageData = function(o, r, i) {
|
|
1389
|
-
const s = r.modules.size, l = r.modules.data, a = e.getScale(s, i),
|
|
1390
|
-
for (let d = 0; d <
|
|
1391
|
-
for (let g = 0; g <
|
|
1392
|
-
let
|
|
1393
|
-
if (d >=
|
|
1394
|
-
const
|
|
1395
|
-
|
|
1407
|
+
const s = r.modules.size, l = r.modules.data, a = e.getScale(s, i), u = Math.floor((s + i.margin * 2) * a), f = i.margin * a, b = [i.color.light, i.color.dark];
|
|
1408
|
+
for (let d = 0; d < u; d++)
|
|
1409
|
+
for (let g = 0; g < u; g++) {
|
|
1410
|
+
let h = (d * u + g) * 4, m = i.color.light;
|
|
1411
|
+
if (d >= f && g >= f && d < u - f && g < u - f) {
|
|
1412
|
+
const C = Math.floor((d - f) / a), c = Math.floor((g - f) / a);
|
|
1413
|
+
m = b[l[C * s + c] ? 1 : 0];
|
|
1396
1414
|
}
|
|
1397
|
-
o[
|
|
1415
|
+
o[h++] = m.r, o[h++] = m.g, o[h++] = m.b, o[h] = m.a;
|
|
1398
1416
|
}
|
|
1399
1417
|
};
|
|
1400
|
-
})(
|
|
1418
|
+
})(At);
|
|
1401
1419
|
(function(e) {
|
|
1402
|
-
const t =
|
|
1420
|
+
const t = At;
|
|
1403
1421
|
function n(r, i, s) {
|
|
1404
1422
|
r.clearRect(0, 0, i.width, i.height), i.style || (i.style = {}), i.height = s, i.width = s, i.style.height = s + "px", i.style.width = s + "px";
|
|
1405
1423
|
}
|
|
1406
1424
|
function o() {
|
|
1407
1425
|
try {
|
|
1408
1426
|
return document.createElement("canvas");
|
|
1409
|
-
} catch {
|
|
1427
|
+
} catch (r) {
|
|
1410
1428
|
throw new Error("You need to specify a canvas element");
|
|
1411
1429
|
}
|
|
1412
1430
|
}
|
|
1413
1431
|
e.render = function(i, s, l) {
|
|
1414
|
-
let a = l,
|
|
1415
|
-
typeof a
|
|
1416
|
-
const
|
|
1417
|
-
return t.qrToImageData(d.data, i, a), n(b,
|
|
1432
|
+
let a = l, u = s;
|
|
1433
|
+
typeof a == "undefined" && (!s || !s.getContext) && (a = s, s = void 0), s || (u = o()), a = t.getOptions(a);
|
|
1434
|
+
const f = t.getImageWidth(i.modules.size, a), b = u.getContext("2d"), d = b.createImageData(f, f);
|
|
1435
|
+
return t.qrToImageData(d.data, i, a), n(b, u, f), b.putImageData(d, 0, 0), u;
|
|
1418
1436
|
}, e.renderToDataURL = function(i, s, l) {
|
|
1419
1437
|
let a = l;
|
|
1420
|
-
typeof a
|
|
1421
|
-
const
|
|
1422
|
-
return
|
|
1438
|
+
typeof a == "undefined" && (!s || !s.getContext) && (a = s, s = void 0), a || (a = {});
|
|
1439
|
+
const u = e.render(i, s, a), f = a.type || "image/png", b = a.rendererOpts || {};
|
|
1440
|
+
return u.toDataURL(f, b.quality);
|
|
1423
1441
|
};
|
|
1424
|
-
})(
|
|
1425
|
-
var
|
|
1426
|
-
const
|
|
1427
|
-
function
|
|
1442
|
+
})(Gt);
|
|
1443
|
+
var Yt = {};
|
|
1444
|
+
const qe = At;
|
|
1445
|
+
function Lt(e, t) {
|
|
1428
1446
|
const n = e.a / 255, o = t + '="' + e.hex + '"';
|
|
1429
1447
|
return n < 1 ? o + " " + t + '-opacity="' + n.toFixed(2).slice(1) + '"' : o;
|
|
1430
1448
|
}
|
|
1431
|
-
function
|
|
1449
|
+
function gt(e, t, n) {
|
|
1432
1450
|
let o = e + t;
|
|
1433
|
-
return typeof n
|
|
1451
|
+
return typeof n != "undefined" && (o += " " + n), o;
|
|
1434
1452
|
}
|
|
1435
|
-
function
|
|
1453
|
+
function We(e, t, n) {
|
|
1436
1454
|
let o = "", r = 0, i = !1, s = 0;
|
|
1437
1455
|
for (let l = 0; l < e.length; l++) {
|
|
1438
|
-
const a = Math.floor(l % t),
|
|
1439
|
-
!a && !i && (i = !0), e[l] ? (s++, l > 0 && a > 0 && e[l - 1] || (o += i ?
|
|
1456
|
+
const a = Math.floor(l % t), u = Math.floor(l / t);
|
|
1457
|
+
!a && !i && (i = !0), e[l] ? (s++, l > 0 && a > 0 && e[l - 1] || (o += i ? gt("M", a + n, 0.5 + u + n) : gt("m", r, 0), r = 0, i = !1), a + 1 < t && e[l + 1] || (o += gt("h", s), s = 0)) : r++;
|
|
1440
1458
|
}
|
|
1441
1459
|
return o;
|
|
1442
1460
|
}
|
|
1443
|
-
|
|
1444
|
-
const r =
|
|
1461
|
+
Yt.render = function(t, n, o) {
|
|
1462
|
+
const r = qe.getOptions(n), i = t.modules.size, s = t.modules.data, l = i + r.margin * 2, a = r.color.light.a ? "<path " + Lt(r.color.light, "fill") + ' d="M0 0h' + l + "v" + l + 'H0z"/>' : "", u = "<path " + Lt(r.color.dark, "stroke") + ' d="' + We(s, i, r.margin) + '"/>', f = 'viewBox="0 0 ' + l + " " + l + '"', d = '<svg xmlns="http://www.w3.org/2000/svg" ' + (r.width ? 'width="' + r.width + '" height="' + r.width + '" ' : "") + f + ' shape-rendering="crispEdges">' + a + u + `</svg>
|
|
1445
1463
|
`;
|
|
1446
1464
|
return typeof o == "function" && o(null, d), d;
|
|
1447
1465
|
};
|
|
1448
|
-
const
|
|
1449
|
-
function
|
|
1466
|
+
const Xe = fe, Ct = Ut, qt = Gt, Ze = Yt;
|
|
1467
|
+
function Tt(e, t, n, o, r) {
|
|
1450
1468
|
const i = [].slice.call(arguments, 1), s = i.length, l = typeof i[s - 1] == "function";
|
|
1451
|
-
if (!l && !
|
|
1469
|
+
if (!l && !Xe())
|
|
1452
1470
|
throw new Error("Callback required as last argument");
|
|
1453
1471
|
if (l) {
|
|
1454
1472
|
if (s < 2)
|
|
1455
1473
|
throw new Error("Too few arguments provided");
|
|
1456
|
-
s === 2 ? (r = n, n = t, t = o = void 0) : s === 3 && (t.getContext && typeof r
|
|
1474
|
+
s === 2 ? (r = n, n = t, t = o = void 0) : s === 3 && (t.getContext && typeof r == "undefined" ? (r = o, o = void 0) : (r = o, o = n, n = t, t = void 0));
|
|
1457
1475
|
} else {
|
|
1458
1476
|
if (s < 1)
|
|
1459
1477
|
throw new Error("Too few arguments provided");
|
|
1460
|
-
return s === 1 ? (n = t, t = o = void 0) : s === 2 && !t.getContext && (o = n, n = t, t = void 0), new Promise(function(a,
|
|
1478
|
+
return s === 1 ? (n = t, t = o = void 0) : s === 2 && !t.getContext && (o = n, n = t, t = void 0), new Promise(function(a, u) {
|
|
1461
1479
|
try {
|
|
1462
|
-
const
|
|
1463
|
-
a(e(
|
|
1464
|
-
} catch (
|
|
1465
|
-
f
|
|
1480
|
+
const f = Ct.create(n, o);
|
|
1481
|
+
a(e(f, t, o));
|
|
1482
|
+
} catch (f) {
|
|
1483
|
+
u(f);
|
|
1466
1484
|
}
|
|
1467
1485
|
});
|
|
1468
1486
|
}
|
|
1469
1487
|
try {
|
|
1470
|
-
const a =
|
|
1488
|
+
const a = Ct.create(n, o);
|
|
1471
1489
|
r(null, e(a, t, o));
|
|
1472
1490
|
} catch (a) {
|
|
1473
1491
|
r(a);
|
|
1474
1492
|
}
|
|
1475
1493
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
return
|
|
1494
|
+
q.create = Ct.create;
|
|
1495
|
+
q.toCanvas = Tt.bind(null, qt.render);
|
|
1496
|
+
q.toDataURL = Tt.bind(null, qt.renderToDataURL);
|
|
1497
|
+
q.toString = Tt.bind(null, function(e, t, n) {
|
|
1498
|
+
return Ze.render(e, n);
|
|
1481
1499
|
});
|
|
1482
|
-
|
|
1483
|
-
|
|
1500
|
+
var $ = /* @__PURE__ */ ((e) => (e.unauthorizedError = "unauthorized", e.unexpectedError = "unexpectedError", e.failedToFetch = "failedToFetch", e))($ || {});
|
|
1501
|
+
function xe(e) {
|
|
1502
|
+
te(e, "svelte-ty0b2n", '*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.LoadingSpinner{display:block;width:80px;height:80px;margin:0 auto 0 0}.LoadingSpinner:after{content:" ";display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:6px solid var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e));border-color:var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e)) transparent var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e)) transparent;animation:LoadingSpinner 1.2s linear infinite}@keyframes LoadingSpinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}');
|
|
1484
1503
|
}
|
|
1485
|
-
function
|
|
1504
|
+
function $e(e) {
|
|
1486
1505
|
let t, n, o;
|
|
1487
1506
|
return {
|
|
1488
1507
|
c() {
|
|
1489
|
-
t = U("div"), n = U("img"),
|
|
1490
|
-
e[3]) ||
|
|
1508
|
+
t = U("div"), n = U("img"), _(n, "class", "qr-image"), Nt(n.src, o = /*qrImageUrl*/
|
|
1509
|
+
e[3]) || _(n, "src", o), _(n, "alt", "qr-session-login"), _(t, "class", "qr-section");
|
|
1491
1510
|
},
|
|
1492
1511
|
m(r, i) {
|
|
1493
|
-
|
|
1512
|
+
rt(r, t, i), P(t, n);
|
|
1494
1513
|
},
|
|
1495
1514
|
p(r, i) {
|
|
1496
1515
|
i & /*qrImageUrl*/
|
|
1497
|
-
8 && !
|
|
1498
|
-
r[3]) &&
|
|
1516
|
+
8 && !Nt(n.src, o = /*qrImageUrl*/
|
|
1517
|
+
r[3]) && _(n, "src", o);
|
|
1499
1518
|
},
|
|
1500
1519
|
d(r) {
|
|
1501
|
-
r &&
|
|
1520
|
+
r && nt(t);
|
|
1502
1521
|
}
|
|
1503
1522
|
};
|
|
1504
1523
|
}
|
|
1505
|
-
function
|
|
1524
|
+
function tn(e) {
|
|
1506
1525
|
let t;
|
|
1507
1526
|
return {
|
|
1508
1527
|
c() {
|
|
1509
|
-
t = U("div"),
|
|
1528
|
+
t = U("div"), _(t, "class", "LoadingSpinner");
|
|
1510
1529
|
},
|
|
1511
1530
|
m(n, o) {
|
|
1512
|
-
|
|
1531
|
+
rt(n, t, o);
|
|
1513
1532
|
},
|
|
1514
|
-
p:
|
|
1533
|
+
p: ht,
|
|
1515
1534
|
d(n) {
|
|
1516
|
-
n &&
|
|
1535
|
+
n && nt(t);
|
|
1517
1536
|
}
|
|
1518
1537
|
};
|
|
1519
1538
|
}
|
|
1520
|
-
function
|
|
1539
|
+
function en(e) {
|
|
1521
1540
|
let t, n = (
|
|
1522
1541
|
/*$_*/
|
|
1523
1542
|
e[5](
|
|
@@ -1527,10 +1546,10 @@ function We(e) {
|
|
|
1527
1546
|
), o;
|
|
1528
1547
|
return {
|
|
1529
1548
|
c() {
|
|
1530
|
-
t = U("p"), o =
|
|
1549
|
+
t = U("p"), o = wt(n), _(t, "class", "generate-qr-error-message");
|
|
1531
1550
|
},
|
|
1532
1551
|
m(r, i) {
|
|
1533
|
-
|
|
1552
|
+
rt(r, t, i), P(t, o);
|
|
1534
1553
|
},
|
|
1535
1554
|
p(r, i) {
|
|
1536
1555
|
i & /*$_, errorCode*/
|
|
@@ -1538,180 +1557,188 @@ function We(e) {
|
|
|
1538
1557
|
r[5](
|
|
1539
1558
|
/*errorCode*/
|
|
1540
1559
|
r[4]
|
|
1541
|
-
) + "") &&
|
|
1560
|
+
) + "") && mt(o, n);
|
|
1542
1561
|
},
|
|
1543
1562
|
d(r) {
|
|
1544
|
-
r &&
|
|
1563
|
+
r && nt(t);
|
|
1545
1564
|
}
|
|
1546
1565
|
};
|
|
1547
1566
|
}
|
|
1548
|
-
function
|
|
1567
|
+
function nn(e) {
|
|
1549
1568
|
let t, n, o, r = (
|
|
1550
1569
|
/*$_*/
|
|
1551
1570
|
e[5]("titleQRSessionGenerator") + ""
|
|
1552
1571
|
), i, s, l, a = (
|
|
1553
1572
|
/*remaining*/
|
|
1554
1573
|
(e[1] > 0 ? `${/*remaining*/
|
|
1555
|
-
e[1]}
|
|
1574
|
+
e[1]}${/*$_*/
|
|
1575
|
+
e[5]("second")}` : (
|
|
1556
1576
|
/*$_*/
|
|
1557
1577
|
e[5]("generateQRButton")
|
|
1558
1578
|
)) + ""
|
|
1559
|
-
),
|
|
1560
|
-
function
|
|
1579
|
+
), u, f, b, d, g;
|
|
1580
|
+
function h(c, w) {
|
|
1561
1581
|
if (
|
|
1562
1582
|
/*errorCode*/
|
|
1563
1583
|
c[4]
|
|
1564
1584
|
)
|
|
1565
|
-
return
|
|
1585
|
+
return en;
|
|
1566
1586
|
if (
|
|
1567
1587
|
/*isGenerating*/
|
|
1568
1588
|
c[2]
|
|
1569
1589
|
)
|
|
1570
|
-
return
|
|
1590
|
+
return tn;
|
|
1571
1591
|
if (
|
|
1572
1592
|
/*qrImageUrl*/
|
|
1573
1593
|
c[3]
|
|
1574
1594
|
)
|
|
1575
|
-
return
|
|
1595
|
+
return $e;
|
|
1576
1596
|
}
|
|
1577
|
-
let
|
|
1597
|
+
let m = h(e), C = m && m(e);
|
|
1578
1598
|
return {
|
|
1579
1599
|
c() {
|
|
1580
|
-
t = U("div"), n = U("div"), o = U("p"), i =
|
|
1600
|
+
t = U("div"), n = U("div"), o = U("p"), i = wt(r), s = It(), l = U("button"), u = wt(a), b = It(), C && C.c(), _(l, "class", "generate-qr-btn"), l.disabled = f = /*isGenerating*/
|
|
1581
1601
|
e[2] || /*remaining*/
|
|
1582
|
-
e[1] > 0,
|
|
1602
|
+
e[1] > 0, _(n, "class", "qr-session-generator");
|
|
1583
1603
|
},
|
|
1584
|
-
m(c,
|
|
1585
|
-
|
|
1604
|
+
m(c, w) {
|
|
1605
|
+
rt(c, t, w), P(t, n), P(n, o), P(o, i), P(n, s), P(n, l), P(l, u), P(n, b), C && C.m(n, null), e[14](t), d || (g = ee(
|
|
1586
1606
|
l,
|
|
1587
1607
|
"click",
|
|
1588
1608
|
/*onGenerateQRClick*/
|
|
1589
1609
|
e[6]
|
|
1590
1610
|
), d = !0);
|
|
1591
1611
|
},
|
|
1592
|
-
p(c, [
|
|
1593
|
-
|
|
1612
|
+
p(c, [w]) {
|
|
1613
|
+
w & /*$_*/
|
|
1594
1614
|
32 && r !== (r = /*$_*/
|
|
1595
|
-
c[5]("titleQRSessionGenerator") + "") &&
|
|
1615
|
+
c[5]("titleQRSessionGenerator") + "") && mt(i, r), w & /*remaining, $_*/
|
|
1596
1616
|
34 && a !== (a = /*remaining*/
|
|
1597
1617
|
(c[1] > 0 ? `${/*remaining*/
|
|
1598
|
-
c[1]}
|
|
1618
|
+
c[1]}${/*$_*/
|
|
1619
|
+
c[5]("second")}` : (
|
|
1599
1620
|
/*$_*/
|
|
1600
1621
|
c[5]("generateQRButton")
|
|
1601
|
-
)) + "") &&
|
|
1602
|
-
6 &&
|
|
1622
|
+
)) + "") && mt(u, a), w & /*isGenerating, remaining*/
|
|
1623
|
+
6 && f !== (f = /*isGenerating*/
|
|
1603
1624
|
c[2] || /*remaining*/
|
|
1604
|
-
c[1] > 0) && (l.disabled =
|
|
1625
|
+
c[1] > 0) && (l.disabled = f), m === (m = h(c)) && C ? C.p(c, w) : (C && C.d(1), C = m && m(c), C && (C.c(), C.m(n, null)));
|
|
1605
1626
|
},
|
|
1606
|
-
i:
|
|
1607
|
-
o:
|
|
1627
|
+
i: ht,
|
|
1628
|
+
o: ht,
|
|
1608
1629
|
d(c) {
|
|
1609
|
-
c &&
|
|
1630
|
+
c && nt(t), C && C.d(), e[14](null), d = !1, g();
|
|
1610
1631
|
}
|
|
1611
1632
|
};
|
|
1612
1633
|
}
|
|
1613
|
-
const
|
|
1614
|
-
function
|
|
1634
|
+
const rn = 60, on = 1e3;
|
|
1635
|
+
function sn(e, t, n) {
|
|
1615
1636
|
let o;
|
|
1616
|
-
|
|
1617
|
-
let { clientstyling: r = "" } = t, { clientstylingurl: i = "" } = t, { mbsource: s } = t, { lang: l = "en" } = t, { endpoint: a = "" } = t, { sessionid:
|
|
1637
|
+
ne(e, ue, (p) => n(5, o = p));
|
|
1638
|
+
let { clientstyling: r = "" } = t, { clientstylingurl: i = "" } = t, { mbsource: s } = t, { lang: l = "en" } = t, { endpoint: a = "" } = t, { sessionid: u } = t, { translationurl: f } = t;
|
|
1618
1639
|
const b = {
|
|
1619
|
-
"gm.norway.unauthorized":
|
|
1640
|
+
"gm.norway.unauthorized": $.unauthorizedError
|
|
1620
1641
|
};
|
|
1621
|
-
let d, g,
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
Object.keys(
|
|
1627
|
-
|
|
1642
|
+
let d, g, h = 0, m = !1, C = null, c = null, w = null;
|
|
1643
|
+
const E = () => j(this, null, function* () {
|
|
1644
|
+
const p = f;
|
|
1645
|
+
try {
|
|
1646
|
+
const X = yield (yield fetch(p)).json();
|
|
1647
|
+
Object.keys(X).forEach((K) => {
|
|
1648
|
+
Rt(K, X[K]);
|
|
1628
1649
|
});
|
|
1629
|
-
}
|
|
1630
|
-
console.error(
|
|
1631
|
-
}
|
|
1632
|
-
};
|
|
1633
|
-
Object.keys(
|
|
1634
|
-
|
|
1650
|
+
} catch (Q) {
|
|
1651
|
+
console.error(Q);
|
|
1652
|
+
}
|
|
1653
|
+
});
|
|
1654
|
+
Object.keys(Mt).forEach((p) => {
|
|
1655
|
+
Rt(p, Mt[p]);
|
|
1635
1656
|
});
|
|
1636
1657
|
const y = () => {
|
|
1637
|
-
|
|
1638
|
-
}, B =
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
n(
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1646
|
-
const
|
|
1658
|
+
ce(l);
|
|
1659
|
+
}, B = (p) => j(this, null, function* () {
|
|
1660
|
+
n(3, c = yield q.toDataURL(p));
|
|
1661
|
+
}), S = (p) => {
|
|
1662
|
+
n(4, w = p), L();
|
|
1663
|
+
}, A = () => j(this, null, function* () {
|
|
1664
|
+
var K;
|
|
1665
|
+
const p = new URL(`${a}/api/pam/v1/qr/authenticate`), Q = new Headers();
|
|
1666
|
+
Q.append("X-SessionID", u);
|
|
1667
|
+
const X = { method: "POST", headers: Q };
|
|
1647
1668
|
try {
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1669
|
+
const J = yield fetch(p.href, X);
|
|
1670
|
+
if (J.ok) {
|
|
1671
|
+
const lt = yield J.json();
|
|
1672
|
+
yield B(JSON.stringify(lt));
|
|
1651
1673
|
} else {
|
|
1652
|
-
const
|
|
1653
|
-
|
|
1674
|
+
const lt = yield J.json();
|
|
1675
|
+
S((K = b[lt.Code]) != null ? K : $.unexpectedError);
|
|
1654
1676
|
}
|
|
1655
|
-
} catch (
|
|
1656
|
-
console.error(
|
|
1677
|
+
} catch (J) {
|
|
1678
|
+
console.error(J), S($.failedToFetch);
|
|
1657
1679
|
} finally {
|
|
1658
|
-
n(2,
|
|
1680
|
+
n(2, m = !1);
|
|
1659
1681
|
}
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1682
|
+
}), T = () => j(this, null, function* () {
|
|
1683
|
+
m || h > 0 || (n(2, m = !0), n(4, w = null), n(3, c = null), n(1, h = rn), R(), yield A());
|
|
1684
|
+
});
|
|
1685
|
+
function N() {
|
|
1686
|
+
C !== null && clearInterval(C);
|
|
1687
|
+
}
|
|
1688
|
+
function R() {
|
|
1689
|
+
N(), C = setInterval(
|
|
1663
1690
|
() => {
|
|
1664
|
-
|
|
1691
|
+
h > 1 ? n(1, h -= 1) : (n(1, h = 0), n(2, m = !1), n(3, c = null), L());
|
|
1665
1692
|
},
|
|
1666
|
-
|
|
1693
|
+
on
|
|
1667
1694
|
);
|
|
1668
1695
|
}
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1696
|
+
function L() {
|
|
1697
|
+
N(), C = null, n(1, h = 0);
|
|
1671
1698
|
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1699
|
+
re(() => {
|
|
1700
|
+
N();
|
|
1674
1701
|
});
|
|
1675
|
-
function
|
|
1676
|
-
|
|
1677
|
-
d =
|
|
1702
|
+
function O(p) {
|
|
1703
|
+
oe[p ? "unshift" : "push"](() => {
|
|
1704
|
+
d = p, n(0, d);
|
|
1678
1705
|
});
|
|
1679
1706
|
}
|
|
1680
|
-
return e.$$set = (
|
|
1681
|
-
"clientstyling" in
|
|
1707
|
+
return e.$$set = (p) => {
|
|
1708
|
+
"clientstyling" in p && n(7, r = p.clientstyling), "clientstylingurl" in p && n(8, i = p.clientstylingurl), "mbsource" in p && n(9, s = p.mbsource), "lang" in p && n(10, l = p.lang), "endpoint" in p && n(11, a = p.endpoint), "sessionid" in p && n(12, u = p.sessionid), "translationurl" in p && n(13, f = p.translationurl);
|
|
1682
1709
|
}, e.$$.update = () => {
|
|
1683
1710
|
e.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
1684
|
-
129 && r && d &&
|
|
1685
|
-
257 && i && d &&
|
|
1686
|
-
513 && s && d &&
|
|
1711
|
+
129 && r && d && ie(d, r), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
1712
|
+
257 && i && d && se(d, i), e.$$.dirty & /*mbsource, customStylingContainer*/
|
|
1713
|
+
513 && s && d && ae(d, `${s}.Style`, g), e.$$.dirty & /*lang*/
|
|
1687
1714
|
1024 && l && y(), e.$$.dirty & /*translationurl*/
|
|
1688
|
-
8192 &&
|
|
1715
|
+
8192 && f && E();
|
|
1689
1716
|
}, [
|
|
1690
1717
|
d,
|
|
1718
|
+
h,
|
|
1691
1719
|
m,
|
|
1692
|
-
w,
|
|
1693
1720
|
c,
|
|
1694
|
-
|
|
1721
|
+
w,
|
|
1695
1722
|
o,
|
|
1696
|
-
|
|
1723
|
+
T,
|
|
1697
1724
|
r,
|
|
1698
1725
|
i,
|
|
1699
1726
|
s,
|
|
1700
1727
|
l,
|
|
1701
1728
|
a,
|
|
1702
|
-
f,
|
|
1703
1729
|
u,
|
|
1704
|
-
|
|
1730
|
+
f,
|
|
1731
|
+
O
|
|
1705
1732
|
];
|
|
1706
1733
|
}
|
|
1707
|
-
class
|
|
1734
|
+
class an extends Zt {
|
|
1708
1735
|
constructor(t) {
|
|
1709
|
-
super(),
|
|
1736
|
+
super(), xt(
|
|
1710
1737
|
this,
|
|
1711
1738
|
t,
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1739
|
+
sn,
|
|
1740
|
+
nn,
|
|
1741
|
+
$t,
|
|
1715
1742
|
{
|
|
1716
1743
|
clientstyling: 7,
|
|
1717
1744
|
clientstylingurl: 8,
|
|
@@ -1721,53 +1748,53 @@ class $e extends Jt {
|
|
|
1721
1748
|
sessionid: 12,
|
|
1722
1749
|
translationurl: 13
|
|
1723
1750
|
},
|
|
1724
|
-
|
|
1751
|
+
xe
|
|
1725
1752
|
);
|
|
1726
1753
|
}
|
|
1727
1754
|
get clientstyling() {
|
|
1728
1755
|
return this.$$.ctx[7];
|
|
1729
1756
|
}
|
|
1730
1757
|
set clientstyling(t) {
|
|
1731
|
-
this.$$set({ clientstyling: t }),
|
|
1758
|
+
this.$$set({ clientstyling: t }), F();
|
|
1732
1759
|
}
|
|
1733
1760
|
get clientstylingurl() {
|
|
1734
1761
|
return this.$$.ctx[8];
|
|
1735
1762
|
}
|
|
1736
1763
|
set clientstylingurl(t) {
|
|
1737
|
-
this.$$set({ clientstylingurl: t }),
|
|
1764
|
+
this.$$set({ clientstylingurl: t }), F();
|
|
1738
1765
|
}
|
|
1739
1766
|
get mbsource() {
|
|
1740
1767
|
return this.$$.ctx[9];
|
|
1741
1768
|
}
|
|
1742
1769
|
set mbsource(t) {
|
|
1743
|
-
this.$$set({ mbsource: t }),
|
|
1770
|
+
this.$$set({ mbsource: t }), F();
|
|
1744
1771
|
}
|
|
1745
1772
|
get lang() {
|
|
1746
1773
|
return this.$$.ctx[10];
|
|
1747
1774
|
}
|
|
1748
1775
|
set lang(t) {
|
|
1749
|
-
this.$$set({ lang: t }),
|
|
1776
|
+
this.$$set({ lang: t }), F();
|
|
1750
1777
|
}
|
|
1751
1778
|
get endpoint() {
|
|
1752
1779
|
return this.$$.ctx[11];
|
|
1753
1780
|
}
|
|
1754
1781
|
set endpoint(t) {
|
|
1755
|
-
this.$$set({ endpoint: t }),
|
|
1782
|
+
this.$$set({ endpoint: t }), F();
|
|
1756
1783
|
}
|
|
1757
1784
|
get sessionid() {
|
|
1758
1785
|
return this.$$.ctx[12];
|
|
1759
1786
|
}
|
|
1760
1787
|
set sessionid(t) {
|
|
1761
|
-
this.$$set({ sessionid: t }),
|
|
1788
|
+
this.$$set({ sessionid: t }), F();
|
|
1762
1789
|
}
|
|
1763
1790
|
get translationurl() {
|
|
1764
1791
|
return this.$$.ctx[13];
|
|
1765
1792
|
}
|
|
1766
1793
|
set translationurl(t) {
|
|
1767
|
-
this.$$set({ translationurl: t }),
|
|
1794
|
+
this.$$set({ translationurl: t }), F();
|
|
1768
1795
|
}
|
|
1769
1796
|
}
|
|
1770
|
-
|
|
1797
|
+
le(an, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, sessionid: {}, translationurl: {} }, [], [], !0);
|
|
1771
1798
|
export {
|
|
1772
|
-
|
|
1799
|
+
an as default
|
|
1773
1800
|
};
|