@everymatrix/player-account-controller 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.
- package/components/{GeneralLogout-WQPZo1XA.js → GeneralLogout-BewfWDIc.js} +1 -1
- package/components/{GeneralLogout-DwUKWQEM.cjs → GeneralLogout-C2y7Y1dE.cjs} +1 -1
- package/components/{GeneralLogout-RtZ56Nn3.js → GeneralLogout-Czvcegs5.js} +1 -1
- package/components/{PlayerAccountBettingHistory-CvFZhJr5.js → PlayerAccountBettingHistory-CM97TaVJ.js} +1 -1
- package/components/{PlayerAccountBettingHistory-B73xqRDd.cjs → PlayerAccountBettingHistory-DLSYtCZp.cjs} +1 -1
- package/components/{PlayerAccountBettingHistory-CmbPT188.js → PlayerAccountBettingHistory-s5znvIxt.js} +1 -1
- package/components/{PlayerAccountBiometrics-NfD7xlui.js → PlayerAccountBiometrics-BKYna6WA.js} +2 -2
- package/components/{PlayerAccountBiometrics-8QlKdliQ.cjs → PlayerAccountBiometrics-Qoytvaxy.cjs} +1 -1
- package/components/{PlayerAccountBiometrics-DPDH3rze.js → PlayerAccountBiometrics-h-dyAXxg.js} +2 -2
- package/components/{PlayerAccountBiometricsAction-DfVIWqGO.js → PlayerAccountBiometricsAction-BqGYtfNg.js} +1 -1
- package/components/{PlayerAccountBiometricsAction-oyPYqpGN.cjs → PlayerAccountBiometricsAction-ClGKS2gp.cjs} +1 -1
- package/components/{PlayerAccountBiometricsAction-Cerl0hxM.js → PlayerAccountBiometricsAction-DDXu8QXv.js} +1 -1
- package/components/{PlayerAccountClosure-wcTZTC1v.cjs → PlayerAccountClosure-BGsdGJU3.cjs} +1 -1
- package/components/{PlayerAccountClosure-DNkokDK1.js → PlayerAccountClosure-BssaJEGB.js} +1 -1
- package/components/{PlayerAccountClosure-CaVbfY7o.js → PlayerAccountClosure-PwcGFe0J.js} +1 -1
- package/components/{PlayerAccountController-DErgObNK.cjs → PlayerAccountController-DLXlZ6SW.cjs} +1 -1
- package/components/{PlayerAccountController-DG3KbTWa.js → PlayerAccountController-DsJ74Us2.js} +22 -22
- package/components/{PlayerAccountController-DyqNYFxa.js → PlayerAccountController-SntRT_hM.js} +22 -22
- package/components/{PlayerAccountGamingLimits-Dr2DFwJy.js → PlayerAccountGamingLimits-BBI62m2M.js} +2 -2
- package/components/{PlayerAccountGamingLimits-C92dYqb3.js → PlayerAccountGamingLimits-CTGgeEPm.js} +2 -2
- package/components/{PlayerAccountGamingLimits-Ur_9kp2o.cjs → PlayerAccountGamingLimits-_RZx_m5W.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsConfirmationModal-BdKrgcP9.cjs → PlayerAccountGamingLimitsConfirmationModal-CE01pg7P.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsConfirmationModal-JoLpq5Qd.js → PlayerAccountGamingLimitsConfirmationModal-CKwFrXcz.js} +1 -1
- package/components/{PlayerAccountGamingLimitsConfirmationModal-DzSs9Wlh.js → PlayerAccountGamingLimitsConfirmationModal-DFOcuwIh.js} +1 -1
- package/components/{PlayerAccountGamingLimitsGroupEdit-C61nqLfa.js → PlayerAccountGamingLimitsGroupEdit-6y04dYzq.js} +5 -5
- package/components/{PlayerAccountGamingLimitsGroupEdit-CQylV_LW.cjs → PlayerAccountGamingLimitsGroupEdit-CdkRwGIG.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsGroupEdit-CGPf2GzC.js → PlayerAccountGamingLimitsGroupEdit-DWC376x3.js} +5 -5
- package/components/{PlayerAccountGamingLimitsHistory2-DJ-Cjyp1.cjs → PlayerAccountGamingLimitsHistory2-BFKK_PHb.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsHistory2-BntJofdm.js → PlayerAccountGamingLimitsHistory2-CBEGaMY3.js} +1 -1
- package/components/{PlayerAccountGamingLimitsHistory2-CEqiSFnd.js → PlayerAccountGamingLimitsHistory2-ClfDvYz5.js} +1 -1
- package/components/{PlayerAccountGamingLimitsInfoCard-CZcelMtY.cjs → PlayerAccountGamingLimitsInfoCard-BhJtrPGf.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsInfoCard-Bzww1-RJ.js → PlayerAccountGamingLimitsInfoCard-CYBvAKAo.js} +4 -4
- package/components/{PlayerAccountGamingLimitsInfoCard-DnWRF2MA.js → PlayerAccountGamingLimitsInfoCard-DuAQqQMM.js} +4 -4
- package/components/{PlayerAccountGamingLimitsPage2Gm16-B-RLJAxy.js → PlayerAccountGamingLimitsPage2Gm16-BYzr5vwa.js} +1 -1
- package/components/{PlayerAccountGamingLimitsPage2Gm16-BIphnM6Y.js → PlayerAccountGamingLimitsPage2Gm16-C8uCJhKP.js} +1 -1
- package/components/{PlayerAccountGamingLimitsPage2Gm16-CNA7QruD.cjs → PlayerAccountGamingLimitsPage2Gm16-D7tAsvtX.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsPopup-CSLlyssM.js → PlayerAccountGamingLimitsPopup-B_ct-g3T.js} +1 -1
- package/components/{PlayerAccountGamingLimitsPopup-BdBRIFfU.js → PlayerAccountGamingLimitsPopup-CUDTCM1F.js} +1 -1
- package/components/{PlayerAccountGamingLimitsPopup-o3iv0A6x.cjs → PlayerAccountGamingLimitsPopup-D9_oGqEa.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsWrapper2-DcQHUkFT.cjs → PlayerAccountGamingLimitsWrapper2-BliP4ItH.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsWrapper2-DwZwd-hy.js → PlayerAccountGamingLimitsWrapper2-C2zg2CAI.js} +3 -3
- package/components/{PlayerAccountGamingLimitsWrapper2-05u-l372.js → PlayerAccountGamingLimitsWrapper2-D2BMF4mt.js} +3 -3
- package/components/{PlayerAccountGeneralConfirmationModal-CjKLQaHH.js → PlayerAccountGeneralConfirmationModal-B_t7QPdS.js} +1 -1
- package/components/{PlayerAccountGeneralConfirmationModal-BbGVvtLY.cjs → PlayerAccountGeneralConfirmationModal-BtbmIISI.cjs} +1 -1
- package/components/{PlayerAccountGeneralConfirmationModal-Cst4rd-S.js → PlayerAccountGeneralConfirmationModal-CqON6ro1.js} +1 -1
- package/components/{PlayerAccountMenu-CdjH1gEW.js → PlayerAccountMenu-D8cVhd2H.js} +2 -2
- package/components/{PlayerAccountMenu-Cr_HRHLF.js → PlayerAccountMenu-DQCrC-4R.js} +2 -2
- package/components/{PlayerAccountMenu-C3slbiux.cjs → PlayerAccountMenu-DnRhW9pN.cjs} +1 -1
- package/components/{PlayerAccountModal-u6LegtfR.cjs → PlayerAccountModal-BLW1ybcK.cjs} +1 -1
- package/components/{PlayerAccountModal-C6p2KI7k.js → PlayerAccountModal-CeP6yj14.js} +1 -1
- package/components/{PlayerAccountModal-BRWjYAGu.js → PlayerAccountModal-DpJNoelk.js} +1 -1
- package/components/{PlayerAccountNotifications-tWE-aFjO.js → PlayerAccountNotifications-BFcCZ7Zu.js} +1 -1
- package/components/{PlayerAccountNotifications-C2A1_LCL.js → PlayerAccountNotifications-CxHtpdNr.js} +1 -1
- package/components/{PlayerAccountNotifications-QFoWBKny.cjs → PlayerAccountNotifications-DbQdy81X.cjs} +1 -1
- package/components/{PlayerAccountProductRestriction-DkDbBfka.js → PlayerAccountProductRestriction-CZ7EoRjk.js} +3 -3
- package/components/{PlayerAccountProductRestriction-B0Ri7MHw.js → PlayerAccountProductRestriction-LMRzxRV2.js} +3 -3
- package/components/{PlayerAccountProductRestriction-HHHbDtlq.cjs → PlayerAccountProductRestriction-ktMW-ZvT.cjs} +1 -1
- package/components/{PlayerAccountReviewFrequency-DpI_eJta.js → PlayerAccountReviewFrequency-CfmK1Obu.js} +1 -1
- package/components/{PlayerAccountReviewFrequency-CV609scj.js → PlayerAccountReviewFrequency-DlpnpwkB.js} +1 -1
- package/components/{PlayerAccountReviewFrequency-D9TTXGcO.cjs → PlayerAccountReviewFrequency-DnabhObX.cjs} +1 -1
- package/components/{PlayerAccountSelfExclusion-B9-rTgYV.cjs → PlayerAccountSelfExclusion-0v1N8elD.cjs} +1 -1
- package/components/{PlayerAccountSelfExclusion-DoGu-Fe9.js → PlayerAccountSelfExclusion-CtIgMC0t.js} +2 -2
- package/components/{PlayerAccountSelfExclusion-B0jQ5C6c.js → PlayerAccountSelfExclusion-Jb_V4i6_.js} +2 -2
- package/components/{PlayerAccountTimeout-CJccgvCT.js → PlayerAccountTimeout-8fzk_RgK.js} +3 -3
- package/components/{PlayerAccountTimeout-ojIglJPR.js → PlayerAccountTimeout-B_rvinGm.js} +3 -3
- package/components/{PlayerAccountTimeout-Bi1R5_Rb.cjs → PlayerAccountTimeout-PUZUbjl5.cjs} +2 -2
- package/components/{PlayerAccountTransactionsHistory-Coa29LAd.js → PlayerAccountTransactionsHistory-Cmvap37J.js} +4 -4
- package/components/{PlayerAccountTransactionsHistory-DUwj5lNk.cjs → PlayerAccountTransactionsHistory-D4v46D-9.cjs} +1 -1
- package/components/{PlayerAccountTransactionsHistory-DjwLYkfj.js → PlayerAccountTransactionsHistory-DLu-55uY.js} +4 -4
- package/components/{PlayerActiveBonuses-BBeMkdSY.cjs → PlayerActiveBonuses-C1PpUxaU.cjs} +1 -1
- package/components/{PlayerActiveBonuses-Bx0uoqz4.js → PlayerActiveBonuses-DuONPq12.js} +2 -2
- package/components/{PlayerActiveBonuses-B65W7Wz0.js → PlayerActiveBonuses-xqjLxWxj.js} +2 -2
- package/components/{PlayerBonusCard-TMDOHvnL.cjs → PlayerBonusCard-BPekoz_J.cjs} +1 -1
- package/components/{PlayerBonusCard-CbkfDKjT.js → PlayerBonusCard-Cd4CFOvV.js} +2 -2
- package/components/{PlayerBonusCard-CqeLHQ0G.js → PlayerBonusCard-DjeuOIGK.js} +2 -2
- package/components/{PlayerBonusHistory-DwI1OKTw.js → PlayerBonusHistory-D--3LkB0.js} +2 -2
- package/components/{PlayerBonusHistory-7zvs9Ym9.js → PlayerBonusHistory-DU1SycKq.js} +2 -2
- package/components/{PlayerBonusHistory-Mjrhaj6a.cjs → PlayerBonusHistory-DgS2gdht.cjs} +1 -1
- package/components/{PlayerChangePassword-BmC4EyoL.cjs → PlayerChangePassword-B5XpvV9H.cjs} +1 -1
- package/components/{PlayerChangePassword-CfFZhaXQ.js → PlayerChangePassword-CLerFf5K.js} +1 -1
- package/components/{PlayerChangePassword-BqjLItv0.js → PlayerChangePassword-Dl-dCIpW.js} +1 -1
- package/components/{PlayerDeposit-Ba0qJRp2.js → PlayerDeposit-B-v03sTE.js} +1 -1
- package/components/{PlayerDeposit-o49phTHz.cjs → PlayerDeposit-b1W47bGW.cjs} +1 -1
- package/components/{PlayerDeposit-DP8bCOdN.js → PlayerDeposit-h04Mh6YW.js} +1 -1
- package/components/{PlayerGamingHistory-BgapmKYI.js → PlayerGamingHistory-Cv8-Rfzo.js} +3 -3
- package/components/{PlayerGamingHistory-DV6Slzt_.js → PlayerGamingHistory-DmKqCLau.js} +3 -3
- package/components/{PlayerGamingHistory-DvW-LsKl.cjs → PlayerGamingHistory-DsW9jT5y.cjs} +1 -1
- package/components/{PlayerPendingWithdrawals-HEjFhSrJ.cjs → PlayerPendingWithdrawals-DYzXY4hW.cjs} +1 -1
- package/components/{PlayerPendingWithdrawals-CedsWvDL.js → PlayerPendingWithdrawals-Dn8gpaSl.js} +1 -1
- package/components/{PlayerPendingWithdrawals-BZ62DYZ9.js → PlayerPendingWithdrawals-ZAMQ5qqB.js} +1 -1
- package/components/{PlayerProfileInfo-BDF3Bqtt.js → PlayerProfileInfo-B7dKfAe_.js} +3 -3
- package/components/{PlayerProfileInfo-DPDI61Mv.js → PlayerProfileInfo-BEMt39Gt.js} +3 -3
- package/components/{PlayerProfileInfo-DXVRL3lh.cjs → PlayerProfileInfo-DjD4E513.cjs} +1 -1
- package/components/{PlayerRealityCheck-DgPTeJe_.js → PlayerRealityCheck-B52w0x7t.js} +1 -1
- package/components/{PlayerRealityCheck-CMZtzPkR.cjs → PlayerRealityCheck-Bnyc-oHq.cjs} +1 -1
- package/components/{PlayerRealityCheck-CLVunEKT.js → PlayerRealityCheck-Dbzh832i.js} +1 -1
- package/components/{PlayerTransactionHistory-CHhOIZhh.js → PlayerTransactionHistory-B70UTWWR.js} +1 -1
- package/components/{PlayerTransactionHistory-S0lzcu95.js → PlayerTransactionHistory-C81SVMNQ.js} +1 -1
- package/components/{PlayerTransactionHistory-BEqLK737.cjs → PlayerTransactionHistory-D8Jy6PgB.cjs} +1 -1
- package/components/{PlayerWithdrawal-C46pCXyV.js → PlayerWithdrawal-C3SkDGS_.js} +1 -1
- package/components/{PlayerWithdrawal-DKCRQ9pT.cjs → PlayerWithdrawal-CJUkIcgA.cjs} +1 -1
- package/components/{PlayerWithdrawal-BqAC-Oq4.js → PlayerWithdrawal-DlCsEoDt.js} +1 -1
- package/components/{QrSessionGenerator-DgIh_dAl.js → QrSessionGenerator-BzNmvH-J.js} +463 -453
- package/components/QrSessionGenerator-DatUnp4r.cjs +8 -0
- package/components/{QrSessionGenerator-BkFSg0GV.js → QrSessionGenerator-hn3NvTO5.js} +441 -431
- package/es2015/player-account-controller.cjs +1 -1
- package/es2015/player-account-controller.js +1 -1
- package/esnext/player-account-controller.js +1 -1
- package/package.json +1 -1
- package/components/QrSessionGenerator--jEOQTub.cjs +0 -8
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
function
|
|
3
|
-
|
|
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, u as gt, e as et, p as P, x as $t, g as D, v as ht, q as At, t as _, h as te, I as ee, k as ne, z as Tt, B as re, C as oe, D as ie, c as se, A as ae } from "./PlayerAccountController-DsJ74Us2.js";
|
|
2
|
+
function It(e, t) {
|
|
3
|
+
Yt(e, t);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
|
|
5
|
+
function le(e) {
|
|
6
|
+
qt.set(e);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const Nt = {
|
|
9
9
|
en: {
|
|
10
10
|
titleQRSessionGenerator: "Scan the QR Code to access your account on retail devices.",
|
|
11
11
|
generateQRButton: "Generate QR",
|
|
12
12
|
unauthorized: "Authentication failed.",
|
|
13
13
|
failedToFetch: "Cannot generate QR, Please try again.",
|
|
14
|
-
unexpectedError: "Unexpected error occurred. Please try again later."
|
|
14
|
+
unexpectedError: "Unexpected error occurred. Please try again later.",
|
|
15
|
+
second: "s"
|
|
15
16
|
},
|
|
16
17
|
fr: {
|
|
17
18
|
titleQRSessionGenerator: "Scannez le code QR pour accéder à votre compte sur les appareils en magasin.",
|
|
18
19
|
generateQRButton: "Générer des QR",
|
|
19
20
|
unauthorized: "L'authentification a échoué.",
|
|
20
21
|
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."
|
|
22
|
+
unexpectedError: "Une erreur inattendue s'est produite. Veuillez réessayer plus tard.",
|
|
23
|
+
second: "s"
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
|
-
var
|
|
26
|
+
var j = {}, ue = function() {
|
|
25
27
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
26
|
-
},
|
|
27
|
-
let
|
|
28
|
-
const
|
|
28
|
+
}, _t = {}, I = {};
|
|
29
|
+
let pt;
|
|
30
|
+
const ce = [
|
|
29
31
|
0,
|
|
30
32
|
// Not used
|
|
31
33
|
26,
|
|
@@ -69,34 +71,34 @@ const se = [
|
|
|
69
71
|
3532,
|
|
70
72
|
3706
|
|
71
73
|
];
|
|
72
|
-
|
|
74
|
+
I.getSymbolSize = function(t) {
|
|
73
75
|
if (!t)
|
|
74
76
|
throw new Error('"version" cannot be null or undefined');
|
|
75
77
|
if (t < 1 || t > 40)
|
|
76
78
|
throw new Error('"version" should be in range from 1 to 40');
|
|
77
79
|
return t * 4 + 17;
|
|
78
80
|
};
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
+
I.getSymbolTotalCodewords = function(t) {
|
|
82
|
+
return ce[t];
|
|
81
83
|
};
|
|
82
|
-
|
|
84
|
+
I.getBCHDigit = function(e) {
|
|
83
85
|
let t = 0;
|
|
84
86
|
for (; e !== 0; )
|
|
85
87
|
t++, e >>>= 1;
|
|
86
88
|
return t;
|
|
87
89
|
};
|
|
88
|
-
|
|
90
|
+
I.setToSJISFunction = function(t) {
|
|
89
91
|
if (typeof t != "function")
|
|
90
92
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
91
|
-
|
|
93
|
+
pt = t;
|
|
92
94
|
};
|
|
93
|
-
|
|
94
|
-
return typeof
|
|
95
|
+
I.isKanjiModeEnabled = function() {
|
|
96
|
+
return typeof pt < "u";
|
|
95
97
|
};
|
|
96
|
-
|
|
97
|
-
return
|
|
98
|
+
I.toSJIS = function(t) {
|
|
99
|
+
return pt(t);
|
|
98
100
|
};
|
|
99
|
-
var
|
|
101
|
+
var nt = {};
|
|
100
102
|
(function(e) {
|
|
101
103
|
e.L = { bit: 1 }, e.M = { bit: 0 }, e.Q = { bit: 3 }, e.H = { bit: 2 };
|
|
102
104
|
function t(n) {
|
|
@@ -130,11 +132,11 @@ var x = {};
|
|
|
130
132
|
return r;
|
|
131
133
|
}
|
|
132
134
|
};
|
|
133
|
-
})(
|
|
134
|
-
function
|
|
135
|
+
})(nt);
|
|
136
|
+
function Lt() {
|
|
135
137
|
this.buffer = [], this.length = 0;
|
|
136
138
|
}
|
|
137
|
-
|
|
139
|
+
Lt.prototype = {
|
|
138
140
|
get: function(e) {
|
|
139
141
|
const t = Math.floor(e / 8);
|
|
140
142
|
return (this.buffer[t] >>> 7 - e % 8 & 1) === 1;
|
|
@@ -151,28 +153,28 @@ Nt.prototype = {
|
|
|
151
153
|
this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
|
|
152
154
|
}
|
|
153
155
|
};
|
|
154
|
-
var
|
|
155
|
-
function
|
|
156
|
+
var fe = Lt;
|
|
157
|
+
function Y(e) {
|
|
156
158
|
if (!e || e < 1)
|
|
157
159
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
158
160
|
this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
|
|
159
161
|
}
|
|
160
|
-
|
|
162
|
+
Y.prototype.set = function(e, t, n, o) {
|
|
161
163
|
const r = e * this.size + t;
|
|
162
164
|
this.data[r] = n, o && (this.reservedBit[r] = !0);
|
|
163
165
|
};
|
|
164
|
-
|
|
166
|
+
Y.prototype.get = function(e, t) {
|
|
165
167
|
return this.data[e * this.size + t];
|
|
166
168
|
};
|
|
167
|
-
|
|
169
|
+
Y.prototype.xor = function(e, t, n) {
|
|
168
170
|
this.data[e * this.size + t] ^= n;
|
|
169
171
|
};
|
|
170
|
-
|
|
172
|
+
Y.prototype.isReserved = function(e, t) {
|
|
171
173
|
return this.reservedBit[e * this.size + t];
|
|
172
174
|
};
|
|
173
|
-
var
|
|
175
|
+
var de = Y, Ut = {};
|
|
174
176
|
(function(e) {
|
|
175
|
-
const t =
|
|
177
|
+
const t = I.getSymbolSize;
|
|
176
178
|
e.getRowColCoords = function(o) {
|
|
177
179
|
if (o === 1)
|
|
178
180
|
return [];
|
|
@@ -189,21 +191,21 @@ var le = G, Rt = {};
|
|
|
189
191
|
a === s - 1 && l === 0 || r.push([i[a], i[l]]);
|
|
190
192
|
return r;
|
|
191
193
|
};
|
|
192
|
-
})(
|
|
193
|
-
var
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
const n =
|
|
194
|
+
})(Ut);
|
|
195
|
+
var Dt = {};
|
|
196
|
+
const ge = I.getSymbolSize, Rt = 7;
|
|
197
|
+
Dt.getPositions = function(t) {
|
|
198
|
+
const n = ge(t);
|
|
197
199
|
return [
|
|
198
200
|
// top-left
|
|
199
201
|
[0, 0],
|
|
200
202
|
// top-right
|
|
201
|
-
[n -
|
|
203
|
+
[n - Rt, 0],
|
|
202
204
|
// bottom-left
|
|
203
|
-
[0, n -
|
|
205
|
+
[0, n - Rt]
|
|
204
206
|
];
|
|
205
207
|
};
|
|
206
|
-
var
|
|
208
|
+
var kt = {};
|
|
207
209
|
(function(e) {
|
|
208
210
|
e.Patterns = {
|
|
209
211
|
PATTERN000: 0,
|
|
@@ -227,12 +229,12 @@ var Pt = {};
|
|
|
227
229
|
return e.isValid(r) ? parseInt(r, 10) : void 0;
|
|
228
230
|
}, e.getPenaltyN1 = function(r) {
|
|
229
231
|
const i = r.size;
|
|
230
|
-
let s = 0, a = 0, l = 0, f = null,
|
|
232
|
+
let s = 0, a = 0, l = 0, f = null, c = null;
|
|
231
233
|
for (let B = 0; B < i; B++) {
|
|
232
|
-
a = l = 0, f =
|
|
234
|
+
a = l = 0, f = c = null;
|
|
233
235
|
for (let d = 0; d < i; d++) {
|
|
234
236
|
let g = r.get(B, d);
|
|
235
|
-
g === f ? a++ : (a >= 5 && (s += t.N1 + (a - 5)), f = g, a = 1), g = r.get(d, B), g ===
|
|
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);
|
|
236
238
|
}
|
|
237
239
|
a >= 5 && (s += t.N1 + (a - 5)), l >= 5 && (s += t.N1 + (l - 5));
|
|
238
240
|
}
|
|
@@ -251,8 +253,8 @@ var Pt = {};
|
|
|
251
253
|
let s = 0, a = 0, l = 0;
|
|
252
254
|
for (let f = 0; f < i; f++) {
|
|
253
255
|
a = l = 0;
|
|
254
|
-
for (let
|
|
255
|
-
a = a << 1 & 2047 | r.get(f,
|
|
256
|
+
for (let c = 0; c < i; c++)
|
|
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++;
|
|
256
258
|
}
|
|
257
259
|
return s * t.N3;
|
|
258
260
|
}, e.getPenaltyN4 = function(r) {
|
|
@@ -294,14 +296,14 @@ var Pt = {};
|
|
|
294
296
|
let a = 0, l = 1 / 0;
|
|
295
297
|
for (let f = 0; f < s; f++) {
|
|
296
298
|
i(f), e.applyMask(f, r);
|
|
297
|
-
const
|
|
298
|
-
e.applyMask(f, r),
|
|
299
|
+
const c = e.getPenaltyN1(r) + e.getPenaltyN2(r) + e.getPenaltyN3(r) + e.getPenaltyN4(r);
|
|
300
|
+
e.applyMask(f, r), c < l && (l = c, a = f);
|
|
299
301
|
}
|
|
300
302
|
return a;
|
|
301
303
|
};
|
|
302
|
-
})(
|
|
303
|
-
var
|
|
304
|
-
const
|
|
304
|
+
})(kt);
|
|
305
|
+
var rt = {};
|
|
306
|
+
const k = nt, W = [
|
|
305
307
|
// L M Q H
|
|
306
308
|
1,
|
|
307
309
|
1,
|
|
@@ -463,7 +465,7 @@ const D = x, j = [
|
|
|
463
465
|
49,
|
|
464
466
|
68,
|
|
465
467
|
81
|
|
466
|
-
],
|
|
468
|
+
], X = [
|
|
467
469
|
// L M Q H
|
|
468
470
|
7,
|
|
469
471
|
10,
|
|
@@ -626,56 +628,56 @@ const D = x, j = [
|
|
|
626
628
|
2040,
|
|
627
629
|
2430
|
|
628
630
|
];
|
|
629
|
-
|
|
631
|
+
rt.getBlocksCount = function(t, n) {
|
|
630
632
|
switch (n) {
|
|
631
|
-
case
|
|
632
|
-
return
|
|
633
|
-
case
|
|
634
|
-
return
|
|
635
|
-
case
|
|
636
|
-
return
|
|
637
|
-
case
|
|
638
|
-
return
|
|
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];
|
|
639
641
|
default:
|
|
640
642
|
return;
|
|
641
643
|
}
|
|
642
644
|
};
|
|
643
|
-
|
|
645
|
+
rt.getTotalCodewordsCount = function(t, n) {
|
|
644
646
|
switch (n) {
|
|
645
|
-
case
|
|
646
|
-
return
|
|
647
|
-
case
|
|
648
|
-
return
|
|
649
|
-
case
|
|
650
|
-
return
|
|
651
|
-
case
|
|
652
|
-
return
|
|
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];
|
|
653
655
|
default:
|
|
654
656
|
return;
|
|
655
657
|
}
|
|
656
658
|
};
|
|
657
|
-
var
|
|
658
|
-
const
|
|
659
|
+
var Ft = {}, ot = {};
|
|
660
|
+
const J = new Uint8Array(512), x = new Uint8Array(256);
|
|
659
661
|
(function() {
|
|
660
662
|
let t = 1;
|
|
661
663
|
for (let n = 0; n < 255; n++)
|
|
662
|
-
|
|
664
|
+
J[n] = t, x[t] = n, t <<= 1, t & 256 && (t ^= 285);
|
|
663
665
|
for (let n = 255; n < 512; n++)
|
|
664
|
-
|
|
666
|
+
J[n] = J[n - 255];
|
|
665
667
|
})();
|
|
666
|
-
|
|
668
|
+
ot.log = function(t) {
|
|
667
669
|
if (t < 1)
|
|
668
670
|
throw new Error("log(" + t + ")");
|
|
669
|
-
return
|
|
671
|
+
return x[t];
|
|
670
672
|
};
|
|
671
|
-
|
|
672
|
-
return
|
|
673
|
+
ot.exp = function(t) {
|
|
674
|
+
return J[t];
|
|
673
675
|
};
|
|
674
|
-
|
|
675
|
-
return t === 0 || n === 0 ? 0 :
|
|
676
|
+
ot.mul = function(t, n) {
|
|
677
|
+
return t === 0 || n === 0 ? 0 : J[x[t] + x[n]];
|
|
676
678
|
};
|
|
677
679
|
(function(e) {
|
|
678
|
-
const t =
|
|
680
|
+
const t = ot;
|
|
679
681
|
e.mul = function(o, r) {
|
|
680
682
|
const i = new Uint8Array(o.length + r.length - 1);
|
|
681
683
|
for (let s = 0; s < o.length; s++)
|
|
@@ -700,53 +702,53 @@ tt.mul = function(t, n) {
|
|
|
700
702
|
r = e.mul(r, new Uint8Array([1, t.exp(i)]));
|
|
701
703
|
return r;
|
|
702
704
|
};
|
|
703
|
-
})(
|
|
704
|
-
const
|
|
705
|
-
function
|
|
705
|
+
})(Ft);
|
|
706
|
+
const zt = Ft;
|
|
707
|
+
function Ct(e) {
|
|
706
708
|
this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree);
|
|
707
709
|
}
|
|
708
|
-
|
|
709
|
-
this.degree = t, this.genPoly =
|
|
710
|
+
Ct.prototype.initialize = function(t) {
|
|
711
|
+
this.degree = t, this.genPoly = zt.generateECPolynomial(this.degree);
|
|
710
712
|
};
|
|
711
|
-
|
|
713
|
+
Ct.prototype.encode = function(t) {
|
|
712
714
|
if (!this.genPoly)
|
|
713
715
|
throw new Error("Encoder not initialized");
|
|
714
716
|
const n = new Uint8Array(t.length + this.degree);
|
|
715
717
|
n.set(t);
|
|
716
|
-
const o =
|
|
718
|
+
const o = zt.mod(n, this.genPoly), r = this.degree - o.length;
|
|
717
719
|
if (r > 0) {
|
|
718
720
|
const i = new Uint8Array(this.degree);
|
|
719
721
|
return i.set(o, r), i;
|
|
720
722
|
}
|
|
721
723
|
return o;
|
|
722
724
|
};
|
|
723
|
-
var
|
|
724
|
-
|
|
725
|
+
var he = Ct, vt = {}, F = {}, Bt = {};
|
|
726
|
+
Bt.isValid = function(t) {
|
|
725
727
|
return !isNaN(t) && t >= 1 && t <= 40;
|
|
726
728
|
};
|
|
727
|
-
var
|
|
728
|
-
const
|
|
729
|
-
let
|
|
730
|
-
|
|
731
|
-
const
|
|
729
|
+
var M = {};
|
|
730
|
+
const Vt = "[0-9]+", me = "[A-Z $%*+\\-./:]+";
|
|
731
|
+
let G = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
732
|
+
G = G.replace(/u/g, "\\u");
|
|
733
|
+
const we = "(?:(?![A-Z0-9 $%*+\\-./:]|" + G + `)(?:.|[\r
|
|
732
734
|
]))+`;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
return
|
|
735
|
+
M.KANJI = new RegExp(G, "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("^" + G + "$"), Ee = new RegExp("^" + Vt + "$"), pe = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
741
|
+
M.testKanji = function(t) {
|
|
742
|
+
return ye.test(t);
|
|
741
743
|
};
|
|
742
|
-
|
|
743
|
-
return
|
|
744
|
+
M.testNumeric = function(t) {
|
|
745
|
+
return Ee.test(t);
|
|
744
746
|
};
|
|
745
|
-
|
|
746
|
-
return
|
|
747
|
+
M.testAlphanumeric = function(t) {
|
|
748
|
+
return pe.test(t);
|
|
747
749
|
};
|
|
748
750
|
(function(e) {
|
|
749
|
-
const t =
|
|
751
|
+
const t = Bt, n = M;
|
|
750
752
|
e.NUMERIC = {
|
|
751
753
|
id: "Numeric",
|
|
752
754
|
bit: 1,
|
|
@@ -805,84 +807,84 @@ P.testAlphanumeric = function(t) {
|
|
|
805
807
|
return s;
|
|
806
808
|
}
|
|
807
809
|
};
|
|
808
|
-
})(
|
|
810
|
+
})(F);
|
|
809
811
|
(function(e) {
|
|
810
|
-
const t =
|
|
811
|
-
function l(d, g,
|
|
812
|
-
for (let
|
|
813
|
-
if (g <= e.getCapacity(
|
|
814
|
-
return
|
|
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;
|
|
815
817
|
}
|
|
816
818
|
function f(d, g) {
|
|
817
819
|
return r.getCharCountIndicator(d, g) + 4;
|
|
818
820
|
}
|
|
819
|
-
function
|
|
820
|
-
let
|
|
821
|
-
return d.forEach(function(
|
|
822
|
-
const
|
|
823
|
-
|
|
824
|
-
}),
|
|
821
|
+
function c(d, g) {
|
|
822
|
+
let h = 0;
|
|
823
|
+
return d.forEach(function(m) {
|
|
824
|
+
const C = f(m.mode, g);
|
|
825
|
+
h += C + m.getBitsLength();
|
|
826
|
+
}), h;
|
|
825
827
|
}
|
|
826
828
|
function B(d, g) {
|
|
827
|
-
for (let
|
|
828
|
-
if (
|
|
829
|
-
return
|
|
829
|
+
for (let h = 1; h <= 40; h++)
|
|
830
|
+
if (c(d, h) <= e.getCapacity(h, g, r.MIXED))
|
|
831
|
+
return h;
|
|
830
832
|
}
|
|
831
|
-
e.from = function(g,
|
|
832
|
-
return i.isValid(g) ? parseInt(g, 10) :
|
|
833
|
-
}, e.getCapacity = function(g,
|
|
833
|
+
e.from = function(g, h) {
|
|
834
|
+
return i.isValid(g) ? parseInt(g, 10) : h;
|
|
835
|
+
}, e.getCapacity = function(g, h, m) {
|
|
834
836
|
if (!i.isValid(g))
|
|
835
837
|
throw new Error("Invalid QR Code version");
|
|
836
|
-
typeof
|
|
837
|
-
const
|
|
838
|
-
if (
|
|
839
|
-
return
|
|
840
|
-
const
|
|
841
|
-
switch (
|
|
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) {
|
|
842
844
|
case r.NUMERIC:
|
|
843
|
-
return Math.floor(
|
|
845
|
+
return Math.floor(E / 10 * 3);
|
|
844
846
|
case r.ALPHANUMERIC:
|
|
845
|
-
return Math.floor(
|
|
847
|
+
return Math.floor(E / 11 * 2);
|
|
846
848
|
case r.KANJI:
|
|
847
|
-
return Math.floor(
|
|
849
|
+
return Math.floor(E / 13);
|
|
848
850
|
case r.BYTE:
|
|
849
851
|
default:
|
|
850
|
-
return Math.floor(
|
|
852
|
+
return Math.floor(E / 8);
|
|
851
853
|
}
|
|
852
|
-
}, e.getBestVersionForData = function(g,
|
|
853
|
-
let
|
|
854
|
-
const
|
|
854
|
+
}, e.getBestVersionForData = function(g, h) {
|
|
855
|
+
let m;
|
|
856
|
+
const C = o.from(h, o.M);
|
|
855
857
|
if (Array.isArray(g)) {
|
|
856
858
|
if (g.length > 1)
|
|
857
|
-
return B(g,
|
|
859
|
+
return B(g, C);
|
|
858
860
|
if (g.length === 0)
|
|
859
861
|
return 1;
|
|
860
|
-
|
|
862
|
+
m = g[0];
|
|
861
863
|
} else
|
|
862
|
-
|
|
863
|
-
return l(
|
|
864
|
+
m = g;
|
|
865
|
+
return l(m.mode, m.getLength(), C);
|
|
864
866
|
}, e.getEncodedBits = function(g) {
|
|
865
867
|
if (!i.isValid(g) || g < 7)
|
|
866
868
|
throw new Error("Invalid QR Code version");
|
|
867
|
-
let
|
|
868
|
-
for (; t.getBCHDigit(
|
|
869
|
-
|
|
870
|
-
return g << 12 |
|
|
869
|
+
let h = g << 12;
|
|
870
|
+
for (; t.getBCHDigit(h) - a >= 0; )
|
|
871
|
+
h ^= s << t.getBCHDigit(h) - a;
|
|
872
|
+
return g << 12 | h;
|
|
871
873
|
};
|
|
872
|
-
})(
|
|
873
|
-
var
|
|
874
|
-
const
|
|
875
|
-
|
|
874
|
+
})(vt);
|
|
875
|
+
var Ht = {};
|
|
876
|
+
const mt = I, Ot = 1335, Ce = 21522, Mt = mt.getBCHDigit(Ot);
|
|
877
|
+
Ht.getEncodedBits = function(t, n) {
|
|
876
878
|
const o = t.bit << 3 | n;
|
|
877
879
|
let r = o << 10;
|
|
878
|
-
for (;
|
|
879
|
-
r ^=
|
|
880
|
-
return (o << 10 | r) ^
|
|
880
|
+
for (; mt.getBCHDigit(r) - Mt >= 0; )
|
|
881
|
+
r ^= Ot << mt.getBCHDigit(r) - Mt;
|
|
882
|
+
return (o << 10 | r) ^ Ce;
|
|
881
883
|
};
|
|
882
|
-
var
|
|
883
|
-
const
|
|
884
|
+
var Qt = {};
|
|
885
|
+
const Be = F;
|
|
884
886
|
function v(e) {
|
|
885
|
-
this.mode =
|
|
887
|
+
this.mode = Be.NUMERIC, this.data = e.toString();
|
|
886
888
|
}
|
|
887
889
|
v.getBitsLength = function(t) {
|
|
888
890
|
return 10 * Math.floor(t / 3) + (t % 3 ? t % 3 * 3 + 1 : 0);
|
|
@@ -900,8 +902,8 @@ v.prototype.write = function(t) {
|
|
|
900
902
|
const i = this.data.length - n;
|
|
901
903
|
i > 0 && (o = this.data.substr(n), r = parseInt(o, 10), t.put(r, i * 3 + 1));
|
|
902
904
|
};
|
|
903
|
-
var
|
|
904
|
-
const
|
|
905
|
+
var be = v;
|
|
906
|
+
const Se = F, at = [
|
|
905
907
|
"0",
|
|
906
908
|
"1",
|
|
907
909
|
"2",
|
|
@@ -949,7 +951,7 @@ const pe = k, nt = [
|
|
|
949
951
|
":"
|
|
950
952
|
];
|
|
951
953
|
function V(e) {
|
|
952
|
-
this.mode =
|
|
954
|
+
this.mode = Se.ALPHANUMERIC, this.data = e;
|
|
953
955
|
}
|
|
954
956
|
V.getBitsLength = function(t) {
|
|
955
957
|
return 11 * Math.floor(t / 2) + 6 * (t % 2);
|
|
@@ -963,15 +965,15 @@ V.prototype.getBitsLength = function() {
|
|
|
963
965
|
V.prototype.write = function(t) {
|
|
964
966
|
let n;
|
|
965
967
|
for (n = 0; n + 2 <= this.data.length; n += 2) {
|
|
966
|
-
let o =
|
|
967
|
-
o +=
|
|
968
|
+
let o = at.indexOf(this.data[n]) * 45;
|
|
969
|
+
o += at.indexOf(this.data[n + 1]), t.put(o, 11);
|
|
968
970
|
}
|
|
969
|
-
this.data.length % 2 && t.put(
|
|
971
|
+
this.data.length % 2 && t.put(at.indexOf(this.data[n]), 6);
|
|
970
972
|
};
|
|
971
|
-
var
|
|
972
|
-
const
|
|
973
|
+
var Ae = V;
|
|
974
|
+
const Te = F;
|
|
973
975
|
function H(e) {
|
|
974
|
-
this.mode =
|
|
976
|
+
this.mode = Te.BYTE, typeof e == "string" ? this.data = new TextEncoder().encode(e) : this.data = new Uint8Array(e);
|
|
975
977
|
}
|
|
976
978
|
H.getBitsLength = function(t) {
|
|
977
979
|
return t * 8;
|
|
@@ -986,10 +988,10 @@ H.prototype.write = function(e) {
|
|
|
986
988
|
for (let t = 0, n = this.data.length; t < n; t++)
|
|
987
989
|
e.put(this.data[t], 8);
|
|
988
990
|
};
|
|
989
|
-
var
|
|
990
|
-
const
|
|
991
|
+
var Ie = H;
|
|
992
|
+
const Ne = F, Re = I;
|
|
991
993
|
function O(e) {
|
|
992
|
-
this.mode =
|
|
994
|
+
this.mode = Ne.KANJI, this.data = e;
|
|
993
995
|
}
|
|
994
996
|
O.getBitsLength = function(t) {
|
|
995
997
|
return t * 13;
|
|
@@ -1003,7 +1005,7 @@ O.prototype.getBitsLength = function() {
|
|
|
1003
1005
|
O.prototype.write = function(e) {
|
|
1004
1006
|
let t;
|
|
1005
1007
|
for (t = 0; t < this.data.length; t++) {
|
|
1006
|
-
let n =
|
|
1008
|
+
let n = Re.toSJIS(this.data[t]);
|
|
1007
1009
|
if (n >= 33088 && n <= 40956)
|
|
1008
1010
|
n -= 33088;
|
|
1009
1011
|
else if (n >= 57408 && n <= 60351)
|
|
@@ -1016,7 +1018,7 @@ Make sure your charset is UTF-8`
|
|
|
1016
1018
|
n = (n >>> 8 & 255) * 192 + (n & 255), e.put(n, 13);
|
|
1017
1019
|
}
|
|
1018
1020
|
};
|
|
1019
|
-
var
|
|
1021
|
+
var Me = O, Kt = { exports: {} };
|
|
1020
1022
|
(function(e) {
|
|
1021
1023
|
var t = {
|
|
1022
1024
|
single_source_shortest_paths: function(n, o, r) {
|
|
@@ -1024,14 +1026,14 @@ var Ie = O, vt = { exports: {} };
|
|
|
1024
1026
|
s[o] = 0;
|
|
1025
1027
|
var a = t.PriorityQueue.make();
|
|
1026
1028
|
a.push(o, 0);
|
|
1027
|
-
for (var l, f,
|
|
1029
|
+
for (var l, f, c, B, d, g, h, m, C; !a.empty(); ) {
|
|
1028
1030
|
l = a.pop(), f = l.value, B = l.cost, d = n[f] || {};
|
|
1029
|
-
for (
|
|
1030
|
-
d.hasOwnProperty(
|
|
1031
|
+
for (c in d)
|
|
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));
|
|
1031
1033
|
}
|
|
1032
1034
|
if (typeof r < "u" && typeof s[r] > "u") {
|
|
1033
|
-
var
|
|
1034
|
-
throw new Error(
|
|
1035
|
+
var u = ["Could not find a path from ", o, " to ", r, "."].join("");
|
|
1036
|
+
throw new Error(u);
|
|
1035
1037
|
}
|
|
1036
1038
|
return i;
|
|
1037
1039
|
},
|
|
@@ -1081,30 +1083,30 @@ var Ie = O, vt = { exports: {} };
|
|
|
1081
1083
|
}
|
|
1082
1084
|
};
|
|
1083
1085
|
e.exports = t;
|
|
1084
|
-
})(
|
|
1085
|
-
var
|
|
1086
|
+
})(Kt);
|
|
1087
|
+
var Pe = Kt.exports;
|
|
1086
1088
|
(function(e) {
|
|
1087
|
-
const t =
|
|
1088
|
-
function f(
|
|
1089
|
-
return unescape(encodeURIComponent(
|
|
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;
|
|
1090
1092
|
}
|
|
1091
|
-
function u
|
|
1093
|
+
function c(u, w, E) {
|
|
1092
1094
|
const y = [];
|
|
1093
1095
|
let b;
|
|
1094
|
-
for (; (b =
|
|
1096
|
+
for (; (b = u.exec(E)) !== null; )
|
|
1095
1097
|
y.push({
|
|
1096
1098
|
data: b[0],
|
|
1097
1099
|
index: b.index,
|
|
1098
|
-
mode:
|
|
1100
|
+
mode: w,
|
|
1099
1101
|
length: b[0].length
|
|
1100
1102
|
});
|
|
1101
1103
|
return y;
|
|
1102
1104
|
}
|
|
1103
|
-
function B(
|
|
1104
|
-
const
|
|
1105
|
+
function B(u) {
|
|
1106
|
+
const w = c(s.NUMERIC, t.NUMERIC, u), E = c(s.ALPHANUMERIC, t.ALPHANUMERIC, u);
|
|
1105
1107
|
let y, b;
|
|
1106
|
-
return a.isKanjiModeEnabled() ? (y =
|
|
1107
|
-
return A.index -
|
|
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) {
|
|
1109
|
+
return A.index - T.index;
|
|
1108
1110
|
}).map(function(A) {
|
|
1109
1111
|
return {
|
|
1110
1112
|
data: A.data,
|
|
@@ -1113,110 +1115,110 @@ var Te = vt.exports;
|
|
|
1113
1115
|
};
|
|
1114
1116
|
});
|
|
1115
1117
|
}
|
|
1116
|
-
function d(
|
|
1117
|
-
switch (
|
|
1118
|
+
function d(u, w) {
|
|
1119
|
+
switch (w) {
|
|
1118
1120
|
case t.NUMERIC:
|
|
1119
|
-
return n.getBitsLength(
|
|
1121
|
+
return n.getBitsLength(u);
|
|
1120
1122
|
case t.ALPHANUMERIC:
|
|
1121
|
-
return o.getBitsLength(
|
|
1123
|
+
return o.getBitsLength(u);
|
|
1122
1124
|
case t.KANJI:
|
|
1123
|
-
return i.getBitsLength(
|
|
1125
|
+
return i.getBitsLength(u);
|
|
1124
1126
|
case t.BYTE:
|
|
1125
|
-
return r.getBitsLength(
|
|
1127
|
+
return r.getBitsLength(u);
|
|
1126
1128
|
}
|
|
1127
1129
|
}
|
|
1128
|
-
function g(
|
|
1129
|
-
return
|
|
1130
|
-
const y =
|
|
1131
|
-
return y && y.mode ===
|
|
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);
|
|
1132
1134
|
}, []);
|
|
1133
1135
|
}
|
|
1134
|
-
function
|
|
1135
|
-
const
|
|
1136
|
-
for (let
|
|
1137
|
-
const y =
|
|
1136
|
+
function h(u) {
|
|
1137
|
+
const w = [];
|
|
1138
|
+
for (let E = 0; E < u.length; E++) {
|
|
1139
|
+
const y = u[E];
|
|
1138
1140
|
switch (y.mode) {
|
|
1139
1141
|
case t.NUMERIC:
|
|
1140
|
-
|
|
1142
|
+
w.push([
|
|
1141
1143
|
y,
|
|
1142
1144
|
{ data: y.data, mode: t.ALPHANUMERIC, length: y.length },
|
|
1143
1145
|
{ data: y.data, mode: t.BYTE, length: y.length }
|
|
1144
1146
|
]);
|
|
1145
1147
|
break;
|
|
1146
1148
|
case t.ALPHANUMERIC:
|
|
1147
|
-
|
|
1149
|
+
w.push([
|
|
1148
1150
|
y,
|
|
1149
1151
|
{ data: y.data, mode: t.BYTE, length: y.length }
|
|
1150
1152
|
]);
|
|
1151
1153
|
break;
|
|
1152
1154
|
case t.KANJI:
|
|
1153
|
-
|
|
1155
|
+
w.push([
|
|
1154
1156
|
y,
|
|
1155
1157
|
{ data: y.data, mode: t.BYTE, length: f(y.data) }
|
|
1156
1158
|
]);
|
|
1157
1159
|
break;
|
|
1158
1160
|
case t.BYTE:
|
|
1159
|
-
|
|
1161
|
+
w.push([
|
|
1160
1162
|
{ data: y.data, mode: t.BYTE, length: f(y.data) }
|
|
1161
1163
|
]);
|
|
1162
1164
|
}
|
|
1163
1165
|
}
|
|
1164
|
-
return
|
|
1166
|
+
return w;
|
|
1165
1167
|
}
|
|
1166
|
-
function
|
|
1167
|
-
const
|
|
1168
|
+
function m(u, w) {
|
|
1169
|
+
const E = {}, y = { start: {} };
|
|
1168
1170
|
let b = ["start"];
|
|
1169
|
-
for (let S = 0; S <
|
|
1170
|
-
const A =
|
|
1171
|
-
for (let
|
|
1172
|
-
const
|
|
1173
|
-
|
|
1174
|
-
for (let
|
|
1175
|
-
const
|
|
1176
|
-
|
|
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));
|
|
1177
1179
|
}
|
|
1178
1180
|
}
|
|
1179
|
-
b =
|
|
1181
|
+
b = T;
|
|
1180
1182
|
}
|
|
1181
1183
|
for (let S = 0; S < b.length; S++)
|
|
1182
1184
|
y[b[S]].end = 0;
|
|
1183
|
-
return { map: y, table:
|
|
1185
|
+
return { map: y, table: E };
|
|
1184
1186
|
}
|
|
1185
|
-
function
|
|
1186
|
-
let
|
|
1187
|
-
const y = t.getBestModeForData(
|
|
1188
|
-
if (
|
|
1189
|
-
throw new Error('"' +
|
|
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) + `.
|
|
1190
1192
|
Suggested mode is: ` + t.toString(y));
|
|
1191
|
-
switch (
|
|
1193
|
+
switch (E === t.KANJI && !a.isKanjiModeEnabled() && (E = t.BYTE), E) {
|
|
1192
1194
|
case t.NUMERIC:
|
|
1193
|
-
return new n(
|
|
1195
|
+
return new n(u);
|
|
1194
1196
|
case t.ALPHANUMERIC:
|
|
1195
|
-
return new o(
|
|
1197
|
+
return new o(u);
|
|
1196
1198
|
case t.KANJI:
|
|
1197
|
-
return new i(
|
|
1199
|
+
return new i(u);
|
|
1198
1200
|
case t.BYTE:
|
|
1199
|
-
return new r(
|
|
1201
|
+
return new r(u);
|
|
1200
1202
|
}
|
|
1201
1203
|
}
|
|
1202
|
-
e.fromArray = function(
|
|
1203
|
-
return
|
|
1204
|
-
return typeof y == "string" ?
|
|
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;
|
|
1205
1207
|
}, []);
|
|
1206
|
-
}, e.fromString = function(
|
|
1207
|
-
const y = B(
|
|
1208
|
-
for (let
|
|
1209
|
-
|
|
1210
|
-
return e.fromArray(g(
|
|
1211
|
-
}, e.rawSplit = function(
|
|
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);
|
|
1212
|
+
return e.fromArray(g(T));
|
|
1213
|
+
}, e.rawSplit = function(w) {
|
|
1212
1214
|
return e.fromArray(
|
|
1213
|
-
B(
|
|
1215
|
+
B(w, a.isKanjiModeEnabled())
|
|
1214
1216
|
);
|
|
1215
1217
|
};
|
|
1216
|
-
})(
|
|
1217
|
-
const
|
|
1218
|
-
function
|
|
1219
|
-
const n = e.size, o =
|
|
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);
|
|
1220
1222
|
for (let r = 0; r < o.length; r++) {
|
|
1221
1223
|
const i = o[r][0], s = o[r][1];
|
|
1222
1224
|
for (let a = -1; a <= 7; a++)
|
|
@@ -1225,15 +1227,15 @@ function De(e, t) {
|
|
|
1225
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));
|
|
1226
1228
|
}
|
|
1227
1229
|
}
|
|
1228
|
-
function
|
|
1230
|
+
function Ve(e) {
|
|
1229
1231
|
const t = e.size;
|
|
1230
1232
|
for (let n = 8; n < t - 8; n++) {
|
|
1231
1233
|
const o = n % 2 === 0;
|
|
1232
1234
|
e.set(n, 6, o, !0), e.set(6, n, o, !0);
|
|
1233
1235
|
}
|
|
1234
1236
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const n =
|
|
1237
|
+
function He(e, t) {
|
|
1238
|
+
const n = Ue.getPositions(t);
|
|
1237
1239
|
for (let o = 0; o < n.length; o++) {
|
|
1238
1240
|
const r = n[o][0], i = n[o][1];
|
|
1239
1241
|
for (let s = -2; s <= 2; s++)
|
|
@@ -1241,20 +1243,20 @@ function Fe(e, t) {
|
|
|
1241
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);
|
|
1242
1244
|
}
|
|
1243
1245
|
}
|
|
1244
|
-
function
|
|
1245
|
-
const n = e.size, o =
|
|
1246
|
+
function Oe(e, t) {
|
|
1247
|
+
const n = e.size, o = $.getEncodedBits(t);
|
|
1246
1248
|
let r, i, s;
|
|
1247
1249
|
for (let a = 0; a < 18; a++)
|
|
1248
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);
|
|
1249
1251
|
}
|
|
1250
|
-
function
|
|
1251
|
-
const o = e.size, r =
|
|
1252
|
+
function ct(e, t, n) {
|
|
1253
|
+
const o = e.size, r = Fe.getEncodedBits(t, n);
|
|
1252
1254
|
let i, s;
|
|
1253
1255
|
for (i = 0; i < 15; i++)
|
|
1254
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);
|
|
1255
1257
|
e.set(o - 8, 8, 1, !0);
|
|
1256
1258
|
}
|
|
1257
|
-
function
|
|
1259
|
+
function Qe(e, t) {
|
|
1258
1260
|
const n = e.size;
|
|
1259
1261
|
let o = -1, r = n - 1, i = 7, s = 0;
|
|
1260
1262
|
for (let a = n - 1; a > 0; a -= 2)
|
|
@@ -1270,53 +1272,53 @@ function ve(e, t) {
|
|
|
1270
1272
|
}
|
|
1271
1273
|
}
|
|
1272
1274
|
}
|
|
1273
|
-
function
|
|
1274
|
-
const o = new
|
|
1275
|
+
function Ke(e, t, n) {
|
|
1276
|
+
const o = new _e();
|
|
1275
1277
|
n.forEach(function(l) {
|
|
1276
|
-
o.put(l.mode.bit, 4), o.put(l.getLength(),
|
|
1278
|
+
o.put(l.mode.bit, 4), o.put(l.getLength(), ze.getCharCountIndicator(l.mode, e)), l.write(o);
|
|
1277
1279
|
});
|
|
1278
|
-
const r =
|
|
1280
|
+
const r = it.getSymbolTotalCodewords(e), i = yt.getTotalCodewordsCount(e, t), s = (r - i) * 8;
|
|
1279
1281
|
for (o.getLengthInBits() + 4 <= s && o.put(0, 4); o.getLengthInBits() % 8 !== 0; )
|
|
1280
1282
|
o.putBit(0);
|
|
1281
1283
|
const a = (s - o.getLengthInBits()) / 8;
|
|
1282
1284
|
for (let l = 0; l < a; l++)
|
|
1283
1285
|
o.put(l % 2 ? 17 : 236, 8);
|
|
1284
|
-
return
|
|
1286
|
+
return Je(o, e, t);
|
|
1285
1287
|
}
|
|
1286
|
-
function
|
|
1287
|
-
const o =
|
|
1288
|
-
let
|
|
1289
|
-
const
|
|
1290
|
-
let
|
|
1291
|
-
const
|
|
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);
|
|
1292
1294
|
for (let A = 0; A < s; A++) {
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1295
|
+
const T = A < l ? c : B;
|
|
1296
|
+
m[A] = w.slice(h, h + T), C[A] = g.encode(m[A]), h += T, u = Math.max(u, T);
|
|
1295
1297
|
}
|
|
1296
|
-
const
|
|
1298
|
+
const E = new Uint8Array(o);
|
|
1297
1299
|
let y = 0, b, S;
|
|
1298
|
-
for (b = 0; b <
|
|
1300
|
+
for (b = 0; b < u; b++)
|
|
1299
1301
|
for (S = 0; S < s; S++)
|
|
1300
|
-
b <
|
|
1302
|
+
b < m[S].length && (E[y++] = m[S][b]);
|
|
1301
1303
|
for (b = 0; b < d; b++)
|
|
1302
1304
|
for (S = 0; S < s; S++)
|
|
1303
|
-
|
|
1304
|
-
return
|
|
1305
|
+
E[y++] = C[S][b];
|
|
1306
|
+
return E;
|
|
1305
1307
|
}
|
|
1306
|
-
function
|
|
1308
|
+
function Ge(e, t, n, o) {
|
|
1307
1309
|
let r;
|
|
1308
1310
|
if (Array.isArray(e))
|
|
1309
|
-
r =
|
|
1311
|
+
r = ut.fromArray(e);
|
|
1310
1312
|
else if (typeof e == "string") {
|
|
1311
1313
|
let f = t;
|
|
1312
1314
|
if (!f) {
|
|
1313
|
-
const
|
|
1314
|
-
f =
|
|
1315
|
+
const c = ut.rawSplit(e);
|
|
1316
|
+
f = $.getBestVersionForData(c, n);
|
|
1315
1317
|
}
|
|
1316
|
-
r =
|
|
1318
|
+
r = ut.fromString(e, f || 40);
|
|
1317
1319
|
} else
|
|
1318
1320
|
throw new Error("Invalid data");
|
|
1319
|
-
const i =
|
|
1321
|
+
const i = $.getBestVersionForData(r, n);
|
|
1320
1322
|
if (!i)
|
|
1321
1323
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1322
1324
|
if (!t)
|
|
@@ -1328,11 +1330,11 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1328
1330
|
Minimum version required to store current data is: ` + i + `.
|
|
1329
1331
|
`
|
|
1330
1332
|
);
|
|
1331
|
-
const s =
|
|
1332
|
-
return
|
|
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(
|
|
1333
1335
|
l,
|
|
1334
|
-
|
|
1335
|
-
)),
|
|
1336
|
+
ct.bind(null, l, n)
|
|
1337
|
+
)), wt.applyMask(o, l), ct(l, n, o), {
|
|
1336
1338
|
modules: l,
|
|
1337
1339
|
version: t,
|
|
1338
1340
|
errorCorrectionLevel: n,
|
|
@@ -1340,13 +1342,13 @@ Minimum version required to store current data is: ` + i + `.
|
|
|
1340
1342
|
segments: r
|
|
1341
1343
|
};
|
|
1342
1344
|
}
|
|
1343
|
-
|
|
1345
|
+
_t.create = function(t, n) {
|
|
1344
1346
|
if (typeof t > "u" || t === "")
|
|
1345
1347
|
throw new Error("No input text");
|
|
1346
|
-
let o =
|
|
1347
|
-
return typeof n < "u" && (o =
|
|
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)), Ge(t, r, o, i);
|
|
1348
1350
|
};
|
|
1349
|
-
var
|
|
1351
|
+
var Jt = {}, bt = {};
|
|
1350
1352
|
(function(e) {
|
|
1351
1353
|
function t(n) {
|
|
1352
1354
|
if (typeof n == "number" && (n = n.toString()), typeof n != "string")
|
|
@@ -1386,20 +1388,20 @@ var Vt = {}, yt = {};
|
|
|
1386
1388
|
const i = e.getScale(o, r);
|
|
1387
1389
|
return Math.floor((o + r.margin * 2) * i);
|
|
1388
1390
|
}, e.qrToImageData = function(o, r, i) {
|
|
1389
|
-
const s = r.modules.size, a = r.modules.data, l = e.getScale(s, i), f = Math.floor((s + i.margin * 2) * l),
|
|
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];
|
|
1390
1392
|
for (let d = 0; d < f; d++)
|
|
1391
1393
|
for (let g = 0; g < f; g++) {
|
|
1392
|
-
let
|
|
1393
|
-
if (d >=
|
|
1394
|
-
const
|
|
1395
|
-
|
|
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];
|
|
1396
1398
|
}
|
|
1397
|
-
o[
|
|
1399
|
+
o[h++] = m.r, o[h++] = m.g, o[h++] = m.b, o[h] = m.a;
|
|
1398
1400
|
}
|
|
1399
1401
|
};
|
|
1400
|
-
})(
|
|
1402
|
+
})(bt);
|
|
1401
1403
|
(function(e) {
|
|
1402
|
-
const t =
|
|
1404
|
+
const t = bt;
|
|
1403
1405
|
function n(r, i, s) {
|
|
1404
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";
|
|
1405
1407
|
}
|
|
@@ -1413,42 +1415,42 @@ var Vt = {}, yt = {};
|
|
|
1413
1415
|
e.render = function(i, s, a) {
|
|
1414
1416
|
let l = a, f = s;
|
|
1415
1417
|
typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), s || (f = o()), l = t.getOptions(l);
|
|
1416
|
-
const
|
|
1417
|
-
return t.qrToImageData(d.data, i, l), n(B, f,
|
|
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;
|
|
1418
1420
|
}, e.renderToDataURL = function(i, s, a) {
|
|
1419
1421
|
let l = a;
|
|
1420
1422
|
typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), l || (l = {});
|
|
1421
|
-
const f = e.render(i, s, l),
|
|
1422
|
-
return f.toDataURL(
|
|
1423
|
+
const f = e.render(i, s, l), c = l.type || "image/png", B = l.rendererOpts || {};
|
|
1424
|
+
return f.toDataURL(c, B.quality);
|
|
1423
1425
|
};
|
|
1424
|
-
})(
|
|
1425
|
-
var
|
|
1426
|
-
const
|
|
1427
|
-
function
|
|
1426
|
+
})(Jt);
|
|
1427
|
+
var Gt = {};
|
|
1428
|
+
const je = bt;
|
|
1429
|
+
function Pt(e, t) {
|
|
1428
1430
|
const n = e.a / 255, o = t + '="' + e.hex + '"';
|
|
1429
1431
|
return n < 1 ? o + " " + t + '-opacity="' + n.toFixed(2).slice(1) + '"' : o;
|
|
1430
1432
|
}
|
|
1431
|
-
function
|
|
1433
|
+
function ft(e, t, n) {
|
|
1432
1434
|
let o = e + t;
|
|
1433
1435
|
return typeof n < "u" && (o += " " + n), o;
|
|
1434
1436
|
}
|
|
1435
|
-
function
|
|
1437
|
+
function Ye(e, t, n) {
|
|
1436
1438
|
let o = "", r = 0, i = !1, s = 0;
|
|
1437
1439
|
for (let a = 0; a < e.length; a++) {
|
|
1438
1440
|
const l = Math.floor(a % t), f = Math.floor(a / t);
|
|
1439
|
-
!l && !i && (i = !0), e[a] ? (s++, a > 0 && l > 0 && e[a - 1] || (o += i ?
|
|
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++;
|
|
1440
1442
|
}
|
|
1441
1443
|
return o;
|
|
1442
1444
|
}
|
|
1443
|
-
|
|
1444
|
-
const r =
|
|
1445
|
+
Gt.render = function(t, n, o) {
|
|
1446
|
+
const r = je.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>
|
|
1445
1447
|
`;
|
|
1446
1448
|
return typeof o == "function" && o(null, d), d;
|
|
1447
1449
|
};
|
|
1448
|
-
const
|
|
1449
|
-
function
|
|
1450
|
+
const qe = ue, Et = _t, jt = Jt, We = Gt;
|
|
1451
|
+
function St(e, t, n, o, r) {
|
|
1450
1452
|
const i = [].slice.call(arguments, 1), s = i.length, a = typeof i[s - 1] == "function";
|
|
1451
|
-
if (!a && !
|
|
1453
|
+
if (!a && !qe())
|
|
1452
1454
|
throw new Error("Callback required as last argument");
|
|
1453
1455
|
if (a) {
|
|
1454
1456
|
if (s < 2)
|
|
@@ -1459,65 +1461,66 @@ function Ct(e, t, n, o, r) {
|
|
|
1459
1461
|
throw new Error("Too few arguments provided");
|
|
1460
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) {
|
|
1461
1463
|
try {
|
|
1462
|
-
const
|
|
1463
|
-
l(e(
|
|
1464
|
-
} catch (
|
|
1465
|
-
f(
|
|
1464
|
+
const c = Et.create(n, o);
|
|
1465
|
+
l(e(c, t, o));
|
|
1466
|
+
} catch (c) {
|
|
1467
|
+
f(c);
|
|
1466
1468
|
}
|
|
1467
1469
|
});
|
|
1468
1470
|
}
|
|
1469
1471
|
try {
|
|
1470
|
-
const l =
|
|
1472
|
+
const l = Et.create(n, o);
|
|
1471
1473
|
r(null, e(l, t, o));
|
|
1472
1474
|
} catch (l) {
|
|
1473
1475
|
r(l);
|
|
1474
1476
|
}
|
|
1475
1477
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
return
|
|
1478
|
+
j.create = Et.create;
|
|
1479
|
+
j.toCanvas = St.bind(null, jt.render);
|
|
1480
|
+
j.toDataURL = St.bind(null, jt.renderToDataURL);
|
|
1481
|
+
j.toString = St.bind(null, function(e, t, n) {
|
|
1482
|
+
return We.render(e, n);
|
|
1481
1483
|
});
|
|
1482
|
-
|
|
1483
|
-
|
|
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)}}');
|
|
1484
1487
|
}
|
|
1485
|
-
function
|
|
1488
|
+
function Ze(e) {
|
|
1486
1489
|
let t, n, o;
|
|
1487
1490
|
return {
|
|
1488
1491
|
c() {
|
|
1489
|
-
t =
|
|
1490
|
-
e[3]) ||
|
|
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");
|
|
1491
1494
|
},
|
|
1492
1495
|
m(r, i) {
|
|
1493
|
-
|
|
1496
|
+
et(r, t, i), P(t, n);
|
|
1494
1497
|
},
|
|
1495
1498
|
p(r, i) {
|
|
1496
1499
|
i & /*qrImageUrl*/
|
|
1497
|
-
8 && !
|
|
1498
|
-
r[3]) &&
|
|
1500
|
+
8 && !Tt(n.src, o = /*qrImageUrl*/
|
|
1501
|
+
r[3]) && _(n, "src", o);
|
|
1499
1502
|
},
|
|
1500
1503
|
d(r) {
|
|
1501
|
-
r &&
|
|
1504
|
+
r && tt(t);
|
|
1502
1505
|
}
|
|
1503
1506
|
};
|
|
1504
1507
|
}
|
|
1505
|
-
function
|
|
1508
|
+
function xe(e) {
|
|
1506
1509
|
let t;
|
|
1507
1510
|
return {
|
|
1508
1511
|
c() {
|
|
1509
|
-
t =
|
|
1512
|
+
t = D("div"), _(t, "class", "LoadingSpinner");
|
|
1510
1513
|
},
|
|
1511
1514
|
m(n, o) {
|
|
1512
|
-
|
|
1515
|
+
et(n, t, o);
|
|
1513
1516
|
},
|
|
1514
|
-
p:
|
|
1517
|
+
p: dt,
|
|
1515
1518
|
d(n) {
|
|
1516
|
-
n &&
|
|
1519
|
+
n && tt(t);
|
|
1517
1520
|
}
|
|
1518
1521
|
};
|
|
1519
1522
|
}
|
|
1520
|
-
function
|
|
1523
|
+
function $e(e) {
|
|
1521
1524
|
let t, n = (
|
|
1522
1525
|
/*$_*/
|
|
1523
1526
|
e[5](
|
|
@@ -1527,10 +1530,10 @@ function We(e) {
|
|
|
1527
1530
|
), o;
|
|
1528
1531
|
return {
|
|
1529
1532
|
c() {
|
|
1530
|
-
t =
|
|
1533
|
+
t = D("p"), o = ht(n), _(t, "class", "generate-qr-error-message");
|
|
1531
1534
|
},
|
|
1532
1535
|
m(r, i) {
|
|
1533
|
-
|
|
1536
|
+
et(r, t, i), P(t, o);
|
|
1534
1537
|
},
|
|
1535
1538
|
p(r, i) {
|
|
1536
1539
|
i & /*$_, errorCode*/
|
|
@@ -1538,180 +1541,187 @@ function We(e) {
|
|
|
1538
1541
|
r[5](
|
|
1539
1542
|
/*errorCode*/
|
|
1540
1543
|
r[4]
|
|
1541
|
-
) + "") &&
|
|
1544
|
+
) + "") && gt(o, n);
|
|
1542
1545
|
},
|
|
1543
1546
|
d(r) {
|
|
1544
|
-
r &&
|
|
1547
|
+
r && tt(t);
|
|
1545
1548
|
}
|
|
1546
1549
|
};
|
|
1547
1550
|
}
|
|
1548
|
-
function
|
|
1551
|
+
function tn(e) {
|
|
1549
1552
|
let t, n, o, r = (
|
|
1550
1553
|
/*$_*/
|
|
1551
1554
|
e[5]("titleQRSessionGenerator") + ""
|
|
1552
1555
|
), i, s, a, l = (
|
|
1553
1556
|
/*remaining*/
|
|
1554
1557
|
(e[1] > 0 ? `${/*remaining*/
|
|
1555
|
-
e[1]}
|
|
1558
|
+
e[1]}${/*$_*/
|
|
1559
|
+
e[5]("second")}` : (
|
|
1556
1560
|
/*$_*/
|
|
1557
1561
|
e[5]("generateQRButton")
|
|
1558
1562
|
)) + ""
|
|
1559
|
-
), f,
|
|
1560
|
-
function
|
|
1563
|
+
), f, c, B, d, g;
|
|
1564
|
+
function h(u, w) {
|
|
1561
1565
|
if (
|
|
1562
1566
|
/*errorCode*/
|
|
1563
|
-
|
|
1567
|
+
u[4]
|
|
1564
1568
|
)
|
|
1565
|
-
return
|
|
1569
|
+
return $e;
|
|
1566
1570
|
if (
|
|
1567
1571
|
/*isGenerating*/
|
|
1568
|
-
|
|
1572
|
+
u[2]
|
|
1569
1573
|
)
|
|
1570
|
-
return
|
|
1574
|
+
return xe;
|
|
1571
1575
|
if (
|
|
1572
1576
|
/*qrImageUrl*/
|
|
1573
|
-
|
|
1577
|
+
u[3]
|
|
1574
1578
|
)
|
|
1575
|
-
return
|
|
1579
|
+
return Ze;
|
|
1576
1580
|
}
|
|
1577
|
-
let
|
|
1581
|
+
let m = h(e), C = m && m(e);
|
|
1578
1582
|
return {
|
|
1579
1583
|
c() {
|
|
1580
|
-
t =
|
|
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*/
|
|
1581
1585
|
e[2] || /*remaining*/
|
|
1582
|
-
e[1] > 0,
|
|
1586
|
+
e[1] > 0, _(n, "class", "qr-session-generator");
|
|
1583
1587
|
},
|
|
1584
|
-
m(
|
|
1585
|
-
|
|
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(
|
|
1586
1590
|
a,
|
|
1587
1591
|
"click",
|
|
1588
1592
|
/*onGenerateQRClick*/
|
|
1589
1593
|
e[6]
|
|
1590
1594
|
), d = !0);
|
|
1591
1595
|
},
|
|
1592
|
-
p(
|
|
1593
|
-
|
|
1596
|
+
p(u, [w]) {
|
|
1597
|
+
w & /*$_*/
|
|
1594
1598
|
32 && r !== (r = /*$_*/
|
|
1595
|
-
|
|
1599
|
+
u[5]("titleQRSessionGenerator") + "") && gt(i, r), w & /*remaining, $_*/
|
|
1596
1600
|
34 && l !== (l = /*remaining*/
|
|
1597
|
-
(
|
|
1598
|
-
|
|
1601
|
+
(u[1] > 0 ? `${/*remaining*/
|
|
1602
|
+
u[1]}${/*$_*/
|
|
1603
|
+
u[5]("second")}` : (
|
|
1599
1604
|
/*$_*/
|
|
1600
|
-
|
|
1601
|
-
)) + "") &&
|
|
1602
|
-
6 &&
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
+
u[5]("generateQRButton")
|
|
1606
|
+
)) + "") && gt(f, l), w & /*isGenerating, remaining*/
|
|
1607
|
+
6 && c !== (c = /*isGenerating*/
|
|
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)));
|
|
1605
1610
|
},
|
|
1606
|
-
i:
|
|
1607
|
-
o:
|
|
1608
|
-
d(
|
|
1609
|
-
|
|
1611
|
+
i: dt,
|
|
1612
|
+
o: dt,
|
|
1613
|
+
d(u) {
|
|
1614
|
+
u && tt(t), C && C.d(), e[14](null), d = !1, g();
|
|
1610
1615
|
}
|
|
1611
1616
|
};
|
|
1612
1617
|
}
|
|
1613
|
-
const
|
|
1614
|
-
function
|
|
1618
|
+
const en = 60, nn = 1e3;
|
|
1619
|
+
function rn(e, t, n) {
|
|
1615
1620
|
let o;
|
|
1616
|
-
|
|
1617
|
-
let { clientstyling: r = "" } = t, { clientstylingurl: i = "" } = t, { mbsource: s } = t, { lang: a = "en" } = t, { endpoint: l = "" } = t, { sessionid: f } = t, { translationurl:
|
|
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;
|
|
1618
1623
|
const B = {
|
|
1619
|
-
"gm.norway.unauthorized":
|
|
1624
|
+
"gm.norway.unauthorized": Z.unauthorizedError
|
|
1620
1625
|
};
|
|
1621
|
-
let d, g,
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
Object.keys(
|
|
1627
|
-
|
|
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]);
|
|
1628
1633
|
});
|
|
1629
|
-
}
|
|
1630
|
-
console.error(
|
|
1631
|
-
}
|
|
1634
|
+
} catch (K) {
|
|
1635
|
+
console.error(K);
|
|
1636
|
+
}
|
|
1632
1637
|
};
|
|
1633
|
-
Object.keys(
|
|
1634
|
-
|
|
1638
|
+
Object.keys(Nt).forEach((p) => {
|
|
1639
|
+
It(p, Nt[p]);
|
|
1635
1640
|
});
|
|
1636
1641
|
const y = () => {
|
|
1637
|
-
|
|
1638
|
-
}, b = async () => {
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
n(
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
const F = await fetch(E.href, M);
|
|
1642
|
+
le(a);
|
|
1643
|
+
}, b = async (p) => {
|
|
1644
|
+
n(3, u = await j.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 };
|
|
1647
1651
|
try {
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1652
|
+
const U = await fetch(p.href, q);
|
|
1653
|
+
if (U.ok) {
|
|
1654
|
+
const st = await U.json();
|
|
1655
|
+
await b(JSON.stringify(st));
|
|
1651
1656
|
} else {
|
|
1652
|
-
const
|
|
1653
|
-
|
|
1657
|
+
const st = await U.json();
|
|
1658
|
+
S(B[st.Code] ?? Z.unexpectedError);
|
|
1654
1659
|
}
|
|
1655
|
-
} catch (
|
|
1656
|
-
console.error(
|
|
1660
|
+
} catch (U) {
|
|
1661
|
+
console.error(U), S(Z.failedToFetch);
|
|
1657
1662
|
} finally {
|
|
1658
|
-
n(2,
|
|
1663
|
+
n(2, m = !1);
|
|
1659
1664
|
}
|
|
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());
|
|
1660
1667
|
};
|
|
1661
|
-
function
|
|
1662
|
-
|
|
1668
|
+
function N() {
|
|
1669
|
+
C !== null && clearInterval(C);
|
|
1670
|
+
}
|
|
1671
|
+
function R() {
|
|
1672
|
+
N(), C = setInterval(
|
|
1663
1673
|
() => {
|
|
1664
|
-
|
|
1674
|
+
h > 1 ? n(1, h -= 1) : (n(1, h = 0), n(2, m = !1), n(3, u = null), L());
|
|
1665
1675
|
},
|
|
1666
|
-
|
|
1676
|
+
nn
|
|
1667
1677
|
);
|
|
1668
1678
|
}
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1679
|
+
function L() {
|
|
1680
|
+
N(), C = null, n(1, h = 0);
|
|
1671
1681
|
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1682
|
+
ee(() => {
|
|
1683
|
+
N();
|
|
1674
1684
|
});
|
|
1675
|
-
function
|
|
1676
|
-
|
|
1677
|
-
d =
|
|
1685
|
+
function Q(p) {
|
|
1686
|
+
ne[p ? "unshift" : "push"](() => {
|
|
1687
|
+
d = p, n(0, d);
|
|
1678
1688
|
});
|
|
1679
1689
|
}
|
|
1680
|
-
return e.$$set = (
|
|
1681
|
-
"clientstyling" in
|
|
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);
|
|
1682
1692
|
}, e.$$.update = () => {
|
|
1683
1693
|
e.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
1684
|
-
129 && r && d &&
|
|
1685
|
-
257 && i && d &&
|
|
1686
|
-
513 && s && d &&
|
|
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*/
|
|
1687
1697
|
1024 && a && y(), e.$$.dirty & /*translationurl*/
|
|
1688
|
-
8192 &&
|
|
1698
|
+
8192 && c && E();
|
|
1689
1699
|
}, [
|
|
1690
1700
|
d,
|
|
1701
|
+
h,
|
|
1691
1702
|
m,
|
|
1703
|
+
u,
|
|
1692
1704
|
w,
|
|
1693
|
-
c,
|
|
1694
|
-
h,
|
|
1695
1705
|
o,
|
|
1696
|
-
|
|
1706
|
+
T,
|
|
1697
1707
|
r,
|
|
1698
1708
|
i,
|
|
1699
1709
|
s,
|
|
1700
1710
|
a,
|
|
1701
1711
|
l,
|
|
1702
1712
|
f,
|
|
1703
|
-
|
|
1704
|
-
|
|
1713
|
+
c,
|
|
1714
|
+
Q
|
|
1705
1715
|
];
|
|
1706
1716
|
}
|
|
1707
|
-
class
|
|
1717
|
+
class on extends Wt {
|
|
1708
1718
|
constructor(t) {
|
|
1709
|
-
super(),
|
|
1719
|
+
super(), Xt(
|
|
1710
1720
|
this,
|
|
1711
1721
|
t,
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1722
|
+
rn,
|
|
1723
|
+
tn,
|
|
1724
|
+
Zt,
|
|
1715
1725
|
{
|
|
1716
1726
|
clientstyling: 7,
|
|
1717
1727
|
clientstylingurl: 8,
|
|
@@ -1721,7 +1731,7 @@ class $e extends Jt {
|
|
|
1721
1731
|
sessionid: 12,
|
|
1722
1732
|
translationurl: 13
|
|
1723
1733
|
},
|
|
1724
|
-
|
|
1734
|
+
Xe
|
|
1725
1735
|
);
|
|
1726
1736
|
}
|
|
1727
1737
|
get clientstyling() {
|
|
@@ -1767,7 +1777,7 @@ class $e extends Jt {
|
|
|
1767
1777
|
this.$$set({ translationurl: t }), z();
|
|
1768
1778
|
}
|
|
1769
1779
|
}
|
|
1770
|
-
|
|
1780
|
+
se(on, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, sessionid: {}, translationurl: {} }, [], [], !0);
|
|
1771
1781
|
export {
|
|
1772
|
-
|
|
1782
|
+
on as default
|
|
1773
1783
|
};
|