@everymatrix/player-profile-info 1.92.1 → 1.92.3

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