@everymatrix/player-account-controller 1.91.0 → 1.91.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/components/{GeneralLogout-CZx06fEj.cjs → GeneralLogout-DwUKWQEM.cjs} +1 -1
  2. package/components/{GeneralLogout-CfTLK2Bc.js → GeneralLogout-RtZ56Nn3.js} +1 -1
  3. package/components/{GeneralLogout-hD19E-Zw.js → GeneralLogout-WQPZo1XA.js} +1 -1
  4. package/components/{PlayerAccountBettingHistory-CktRMlqd.cjs → PlayerAccountBettingHistory-B73xqRDd.cjs} +1 -1
  5. package/components/{PlayerAccountBettingHistory-CA7auAML.js → PlayerAccountBettingHistory-CmbPT188.js} +1 -1
  6. package/components/{PlayerAccountBettingHistory-DqxCb3Vd.js → PlayerAccountBettingHistory-CvFZhJr5.js} +1 -1
  7. package/components/{PlayerAccountBiometrics-_e_GPij0.cjs → PlayerAccountBiometrics-8QlKdliQ.cjs} +1 -1
  8. package/components/{PlayerAccountBiometrics-BkD_4qfK.js → PlayerAccountBiometrics-DPDH3rze.js} +2 -2
  9. package/components/{PlayerAccountBiometrics-SFhwP7hC.js → PlayerAccountBiometrics-NfD7xlui.js} +2 -2
  10. package/components/{PlayerAccountBiometricsAction-BNbtq7KV.js → PlayerAccountBiometricsAction-Cerl0hxM.js} +1 -1
  11. package/components/{PlayerAccountBiometricsAction-1lBtdXlm.js → PlayerAccountBiometricsAction-DfVIWqGO.js} +1 -1
  12. package/components/{PlayerAccountBiometricsAction-y4GZTxcT.cjs → PlayerAccountBiometricsAction-oyPYqpGN.cjs} +1 -1
  13. package/components/{PlayerAccountClosure-BicB6rYD.js → PlayerAccountClosure-CaVbfY7o.js} +1 -1
  14. package/components/{PlayerAccountClosure-BVmcfM4z.js → PlayerAccountClosure-DNkokDK1.js} +1 -1
  15. package/components/{PlayerAccountClosure-D7HxqU1N.cjs → PlayerAccountClosure-wcTZTC1v.cjs} +1 -1
  16. package/components/PlayerAccountController-DErgObNK.cjs +21 -0
  17. package/components/{PlayerAccountController-B1uYSIz3.js → PlayerAccountController-DG3KbTWa.js} +115 -111
  18. package/components/{PlayerAccountController-RTgAeQIt.js → PlayerAccountController-DyqNYFxa.js} +49 -45
  19. package/components/{PlayerAccountGamingLimits-9nxBFWJ_.js → PlayerAccountGamingLimits-C92dYqb3.js} +2 -2
  20. package/components/{PlayerAccountGamingLimits-8cX20yx0.js → PlayerAccountGamingLimits-Dr2DFwJy.js} +2 -2
  21. package/components/{PlayerAccountGamingLimits-Dx5_vi1Q.cjs → PlayerAccountGamingLimits-Ur_9kp2o.cjs} +1 -1
  22. package/components/{PlayerAccountGamingLimitsConfirmationModal-BF_ch2qb.cjs → PlayerAccountGamingLimitsConfirmationModal-BdKrgcP9.cjs} +1 -1
  23. package/components/{PlayerAccountGamingLimitsConfirmationModal-Y-C4A1I2.js → PlayerAccountGamingLimitsConfirmationModal-DzSs9Wlh.js} +15 -15
  24. package/components/{PlayerAccountGamingLimitsConfirmationModal-CJgc8OTg.js → PlayerAccountGamingLimitsConfirmationModal-JoLpq5Qd.js} +12 -12
  25. package/components/{PlayerAccountGamingLimitsGroupEdit-CEM4at0P.js → PlayerAccountGamingLimitsGroupEdit-C61nqLfa.js} +5 -5
  26. package/components/{PlayerAccountGamingLimitsGroupEdit-DejiPaBu.js → PlayerAccountGamingLimitsGroupEdit-CGPf2GzC.js} +5 -5
  27. package/components/{PlayerAccountGamingLimitsGroupEdit-D-yNkbWZ.cjs → PlayerAccountGamingLimitsGroupEdit-CQylV_LW.cjs} +1 -1
  28. package/components/{PlayerAccountGamingLimitsHistory2-BiTbzLOf.js → PlayerAccountGamingLimitsHistory2-BntJofdm.js} +1 -1
  29. package/components/{PlayerAccountGamingLimitsHistory2-320drqSz.js → PlayerAccountGamingLimitsHistory2-CEqiSFnd.js} +1 -1
  30. package/components/{PlayerAccountGamingLimitsHistory2-CJzOaUU_.cjs → PlayerAccountGamingLimitsHistory2-DJ-Cjyp1.cjs} +1 -1
  31. package/components/{PlayerAccountGamingLimitsInfoCard-DFDthU1l.js → PlayerAccountGamingLimitsInfoCard-Bzww1-RJ.js} +4 -4
  32. package/components/{PlayerAccountGamingLimitsInfoCard-oZ_FtdRr.cjs → PlayerAccountGamingLimitsInfoCard-CZcelMtY.cjs} +1 -1
  33. package/components/{PlayerAccountGamingLimitsInfoCard-DDu6HRZw.js → PlayerAccountGamingLimitsInfoCard-DnWRF2MA.js} +4 -4
  34. package/components/{PlayerAccountGamingLimitsPage2Gm16-DROry-l8.js → PlayerAccountGamingLimitsPage2Gm16-B-RLJAxy.js} +2 -2
  35. package/components/{PlayerAccountGamingLimitsPage2Gm16-CPTiY5Gi.js → PlayerAccountGamingLimitsPage2Gm16-BIphnM6Y.js} +2 -2
  36. package/components/{PlayerAccountGamingLimitsPage2Gm16-Cax6QJLC.cjs → PlayerAccountGamingLimitsPage2Gm16-CNA7QruD.cjs} +2 -2
  37. package/components/{PlayerAccountGamingLimitsPopup-Bkweu2PX.js → PlayerAccountGamingLimitsPopup-BdBRIFfU.js} +1 -1
  38. package/components/{PlayerAccountGamingLimitsPopup-D89lxHJp.js → PlayerAccountGamingLimitsPopup-CSLlyssM.js} +1 -1
  39. package/components/{PlayerAccountGamingLimitsPopup-D8YDDkab.cjs → PlayerAccountGamingLimitsPopup-o3iv0A6x.cjs} +1 -1
  40. package/components/{PlayerAccountGamingLimitsWrapper2-BT8njqvW.js → PlayerAccountGamingLimitsWrapper2-05u-l372.js} +3 -3
  41. package/components/{PlayerAccountGamingLimitsWrapper2-BGsrIa9G.cjs → PlayerAccountGamingLimitsWrapper2-DcQHUkFT.cjs} +1 -1
  42. package/components/{PlayerAccountGamingLimitsWrapper2-kXLXzvuq.js → PlayerAccountGamingLimitsWrapper2-DwZwd-hy.js} +3 -3
  43. package/components/{PlayerAccountGeneralConfirmationModal-DD6-ZM6O.cjs → PlayerAccountGeneralConfirmationModal-BbGVvtLY.cjs} +1 -1
  44. package/components/{PlayerAccountGeneralConfirmationModal-D_pYKyRi.js → PlayerAccountGeneralConfirmationModal-CjKLQaHH.js} +22 -22
  45. package/components/{PlayerAccountGeneralConfirmationModal-CUnk1KbD.js → PlayerAccountGeneralConfirmationModal-Cst4rd-S.js} +20 -20
  46. package/components/{PlayerAccountMenu-B3wxhtKr.cjs → PlayerAccountMenu-C3slbiux.cjs} +1 -1
  47. package/components/{PlayerAccountMenu-DK810GKe.js → PlayerAccountMenu-CdjH1gEW.js} +2 -2
  48. package/components/{PlayerAccountMenu-C2qI1Gjj.js → PlayerAccountMenu-Cr_HRHLF.js} +2 -2
  49. package/components/{PlayerAccountModal-CgbTqk4Z.js → PlayerAccountModal-BRWjYAGu.js} +36 -36
  50. package/components/{PlayerAccountModal-LSGvdqwB.js → PlayerAccountModal-C6p2KI7k.js} +39 -39
  51. package/components/{PlayerAccountModal-BqZx6Q1_.cjs → PlayerAccountModal-u6LegtfR.cjs} +1 -1
  52. package/components/{PlayerAccountNotifications-BQ9xn1VL.js → PlayerAccountNotifications-C2A1_LCL.js} +1 -1
  53. package/components/{PlayerAccountNotifications-CNdLGJFQ.cjs → PlayerAccountNotifications-QFoWBKny.cjs} +1 -1
  54. package/components/{PlayerAccountNotifications-u-d--KIi.js → PlayerAccountNotifications-tWE-aFjO.js} +1 -1
  55. package/components/{PlayerAccountProductRestriction-DzSoX2xT.js → PlayerAccountProductRestriction-B0Ri7MHw.js} +3 -3
  56. package/components/{PlayerAccountProductRestriction-hNSYwwQJ.js → PlayerAccountProductRestriction-DkDbBfka.js} +3 -3
  57. package/components/{PlayerAccountProductRestriction-DBZ66u9m.cjs → PlayerAccountProductRestriction-HHHbDtlq.cjs} +1 -1
  58. package/components/{PlayerAccountReviewFrequency-B1ken94Z.js → PlayerAccountReviewFrequency-CV609scj.js} +1 -1
  59. package/components/{PlayerAccountReviewFrequency-BhTI5ygr.cjs → PlayerAccountReviewFrequency-D9TTXGcO.cjs} +1 -1
  60. package/components/{PlayerAccountReviewFrequency-BwxBa9uB.js → PlayerAccountReviewFrequency-DpI_eJta.js} +1 -1
  61. package/components/{PlayerAccountSelfExclusion-BcTJOKLt.js → PlayerAccountSelfExclusion-B0jQ5C6c.js} +2 -2
  62. package/components/{PlayerAccountSelfExclusion-BEiUYvo8.cjs → PlayerAccountSelfExclusion-B9-rTgYV.cjs} +1 -1
  63. package/components/{PlayerAccountSelfExclusion-BgretRDx.js → PlayerAccountSelfExclusion-DoGu-Fe9.js} +2 -2
  64. package/components/{PlayerAccountTimeout-BQNMtPRB.cjs → PlayerAccountTimeout-Bi1R5_Rb.cjs} +9 -9
  65. package/components/{PlayerAccountTimeout-Dc8BBO2V.js → PlayerAccountTimeout-CJccgvCT.js} +137 -137
  66. package/components/{PlayerAccountTimeout-vy__wvIh.js → PlayerAccountTimeout-ojIglJPR.js} +137 -137
  67. package/components/{PlayerAccountTransactionsHistory-dOFdBYm7.js → PlayerAccountTransactionsHistory-Coa29LAd.js} +925 -877
  68. package/components/PlayerAccountTransactionsHistory-DUwj5lNk.cjs +4 -0
  69. package/components/{PlayerAccountTransactionsHistory-Co83Xe7f.js → PlayerAccountTransactionsHistory-DjwLYkfj.js} +1003 -955
  70. package/components/PlayerActiveBonuses-B65W7Wz0.js +1253 -0
  71. package/components/PlayerActiveBonuses-BBeMkdSY.cjs +4 -0
  72. package/components/PlayerActiveBonuses-Bx0uoqz4.js +1254 -0
  73. package/components/{PlayerBonusCard-CC3I7Uun.js → PlayerBonusCard-CbkfDKjT.js} +2 -2
  74. package/components/{PlayerBonusCard-BPNrGywL.js → PlayerBonusCard-CqeLHQ0G.js} +2 -2
  75. package/components/{PlayerBonusCard-ju9yDt9H.cjs → PlayerBonusCard-TMDOHvnL.cjs} +1 -1
  76. package/components/{PlayerBonusHistory-B6tJiRPL.js → PlayerBonusHistory-7zvs9Ym9.js} +852 -831
  77. package/components/{PlayerBonusHistory-BEcvSevy.js → PlayerBonusHistory-DwI1OKTw.js} +853 -832
  78. package/components/{PlayerBonusHistory-DBQ6rFhB.cjs → PlayerBonusHistory-Mjrhaj6a.cjs} +130 -130
  79. package/components/{PlayerChangePassword-TqYGnJRR.cjs → PlayerChangePassword-BmC4EyoL.cjs} +1 -1
  80. package/components/{PlayerChangePassword-oyX7WtIB.js → PlayerChangePassword-BqjLItv0.js} +1 -1
  81. package/components/{PlayerChangePassword-1DgloKUI.js → PlayerChangePassword-CfFZhaXQ.js} +1 -1
  82. package/components/{PlayerDeposit-Ae3zKmKx.js → PlayerDeposit-Ba0qJRp2.js} +1 -1
  83. package/components/{PlayerDeposit-B6wgBKOs.js → PlayerDeposit-DP8bCOdN.js} +1 -1
  84. package/components/{PlayerDeposit-C5Q6t3-y.cjs → PlayerDeposit-o49phTHz.cjs} +1 -1
  85. package/components/{PlayerGamingHistory-C_lmfCru.js → PlayerGamingHistory-BgapmKYI.js} +41 -41
  86. package/components/{PlayerGamingHistory-B0n_kQiV.js → PlayerGamingHistory-DV6Slzt_.js} +42 -42
  87. package/components/{PlayerGamingHistory-DuE6DQ-m.cjs → PlayerGamingHistory-DvW-LsKl.cjs} +1 -1
  88. package/components/{PlayerPendingWithdrawals-BYWg7-_P.js → PlayerPendingWithdrawals-BZ62DYZ9.js} +1 -1
  89. package/components/{PlayerPendingWithdrawals-BqXkv2-Y.js → PlayerPendingWithdrawals-CedsWvDL.js} +1 -1
  90. package/components/{PlayerPendingWithdrawals-D0CqKeVG.cjs → PlayerPendingWithdrawals-HEjFhSrJ.cjs} +1 -1
  91. package/components/{PlayerProfileInfo-iRKwx8zy.js → PlayerProfileInfo-BDF3Bqtt.js} +1647 -1338
  92. package/components/{PlayerProfileInfo-DTNpqqu6.js → PlayerProfileInfo-DPDI61Mv.js} +1647 -1329
  93. package/components/PlayerProfileInfo-DXVRL3lh.cjs +4 -0
  94. package/components/{PlayerRealityCheck-DpLxecMn.js → PlayerRealityCheck-CLVunEKT.js} +22 -22
  95. package/components/{PlayerRealityCheck-q7yC_T2b.cjs → PlayerRealityCheck-CMZtzPkR.cjs} +1 -1
  96. package/components/{PlayerRealityCheck-BVugi2xm.js → PlayerRealityCheck-DgPTeJe_.js} +21 -21
  97. package/components/{PlayerTransactionHistory-DnU7U9r2.cjs → PlayerTransactionHistory-BEqLK737.cjs} +1 -1
  98. package/components/{PlayerTransactionHistory-DNgb0l0d.js → PlayerTransactionHistory-CHhOIZhh.js} +1 -1
  99. package/components/{PlayerTransactionHistory-BFLvQwa2.js → PlayerTransactionHistory-S0lzcu95.js} +1 -1
  100. package/components/{PlayerWithdrawal-DNO0w4Mf.js → PlayerWithdrawal-BqAC-Oq4.js} +1 -1
  101. package/components/{PlayerWithdrawal-BYEfF5HL.js → PlayerWithdrawal-C46pCXyV.js} +1 -1
  102. package/components/{PlayerWithdrawal-q2z7ub8O.cjs → PlayerWithdrawal-DKCRQ9pT.cjs} +1 -1
  103. package/components/QrSessionGenerator--jEOQTub.cjs +8 -0
  104. package/components/QrSessionGenerator-BkFSg0GV.js +1773 -0
  105. package/components/QrSessionGenerator-DgIh_dAl.js +1790 -0
  106. package/es2015/player-account-controller.cjs +1 -1
  107. package/es2015/player-account-controller.js +1 -1
  108. package/esnext/player-account-controller.js +1 -1
  109. package/package.json +1 -1
  110. package/stencil/{checkbox-group-input_16-DFnfVjZQ.js → checkbox-group-input_16-BClc1QAF.js} +2376 -2306
  111. package/stencil/{checkbox-group-input_16-BOlBVPuK.cjs → checkbox-group-input_16-BzGXxdU9.cjs} +249 -249
  112. package/stencil/{checkbox-group-input_16-CqrjL3Bm.js → checkbox-group-input_16-_13Kv9Zi.js} +2374 -2304
  113. package/stencil/{index-c666b6e6-CUrOCQZ4.cjs → index-7469517b-8Vfz7n3C.cjs} +1 -1
  114. package/stencil/{index-c666b6e6-D2XV3pxn.js → index-7469517b-Bmgiy_n-.js} +31 -31
  115. package/stencil/{index-c666b6e6-CKyPRY9v.js → index-7469517b-ulg1Qmdy.js} +32 -32
  116. package/stencil/{index-9c0f6c58-DEdG7mVW.js → index-9c0f6c58-CK57ve5P.js} +1 -1
  117. package/stencil/{index-9c0f6c58-Bd8abek0.cjs → index-9c0f6c58-DnbhPPTI.cjs} +1 -1
  118. package/stencil/{index-9c0f6c58-LdtWdXWH.js → index-9c0f6c58-P8h0R10S.js} +1 -1
  119. package/stencil/{pam-change-password-20667ec7-DxeS48v8.js → pam-change-password-259289fa-7sJvUi0P.js} +119 -76
  120. package/stencil/{pam-change-password-20667ec7-gdoPQSVy.cjs → pam-change-password-259289fa-CR3dv02q.cjs} +36 -2
  121. package/stencil/{pam-change-password-20667ec7-CdjcMbLl.js → pam-change-password-259289fa-DvjX931m.js} +119 -76
  122. package/stencil/pam-change-password-BiAsiO8l.js +25 -0
  123. package/stencil/pam-change-password-Dil_uhA4.js +7 -0
  124. package/stencil/pam-change-password-DnCN0UHR.cjs +1 -0
  125. package/stencil/{player-kyc-verification-BVyIvjQs.js → player-kyc-verification-C2xE1hLK.js} +126 -96
  126. package/stencil/player-kyc-verification-Cb647IzH.cjs +181 -0
  127. package/stencil/{player-kyc-verification-DaKmgzNJ.js → player-kyc-verification-mnYQMtSn.js} +135 -105
  128. package/components/PlayerAccountController-Cfjy33Ek.cjs +0 -21
  129. package/components/PlayerAccountTransactionsHistory-DmXGYQDM.cjs +0 -4
  130. package/components/PlayerActiveBonuses-CWQdnuVo.js +0 -1215
  131. package/components/PlayerActiveBonuses-Dp5ZJgik.cjs +0 -4
  132. package/components/PlayerActiveBonuses-v2Qt6nA5.js +0 -1214
  133. package/components/PlayerProfileInfo-C-J7FN_C.cjs +0 -4
  134. package/stencil/pam-change-password-B3-5i5W3.js +0 -25
  135. package/stencil/pam-change-password-Btjglzia.js +0 -7
  136. package/stencil/pam-change-password-DlEAZlEY.cjs +0 -1
  137. package/stencil/player-kyc-verification-Bq0WwkeW.cjs +0 -181
@@ -0,0 +1,1773 @@
1
+ import { a as Kt, $ as Qt, S as Jt, i as Gt, s as jt, f as z, b as Yt, n as at, d as X, u as lt, e as Z, p as _, x as qt, g as U, v as ut, q as pt, t as L, h as Wt, o as Xt, I as Zt, k as xt, z as Et, B as $t, C as te, D as ee, c as ne, A as re } from "./PlayerAccountController-DG3KbTWa.js";
2
+ function Bt(e, t) {
3
+ Kt(e, t);
4
+ }
5
+ function oe(e) {
6
+ Qt.set(e);
7
+ }
8
+ const bt = {
9
+ en: {
10
+ titleQRSessionGenerator: "Scan the QR Code to access your account on retail devices.",
11
+ generateQRButton: "Generate QR",
12
+ unauthorized: "Authentication failed.",
13
+ failedToFetch: "Cannot generate QR, Please try again.",
14
+ unexpectedError: "Unexpected error occurred. Please try again later."
15
+ },
16
+ fr: {
17
+ titleQRSessionGenerator: "Scannez le code QR pour accéder à votre compte sur les appareils en magasin.",
18
+ generateQRButton: "Générer des QR",
19
+ unauthorized: "L'authentification a échoué.",
20
+ 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
+ }
23
+ };
24
+ var J = {}, ie = function() {
25
+ return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
26
+ }, Tt = {}, R = {};
27
+ let ht;
28
+ const se = [
29
+ 0,
30
+ // Not used
31
+ 26,
32
+ 44,
33
+ 70,
34
+ 100,
35
+ 134,
36
+ 172,
37
+ 196,
38
+ 242,
39
+ 292,
40
+ 346,
41
+ 404,
42
+ 466,
43
+ 532,
44
+ 581,
45
+ 655,
46
+ 733,
47
+ 815,
48
+ 901,
49
+ 991,
50
+ 1085,
51
+ 1156,
52
+ 1258,
53
+ 1364,
54
+ 1474,
55
+ 1588,
56
+ 1706,
57
+ 1828,
58
+ 1921,
59
+ 2051,
60
+ 2185,
61
+ 2323,
62
+ 2465,
63
+ 2611,
64
+ 2761,
65
+ 2876,
66
+ 3034,
67
+ 3196,
68
+ 3362,
69
+ 3532,
70
+ 3706
71
+ ];
72
+ R.getSymbolSize = function(t) {
73
+ if (!t)
74
+ throw new Error('"version" cannot be null or undefined');
75
+ if (t < 1 || t > 40)
76
+ throw new Error('"version" should be in range from 1 to 40');
77
+ return t * 4 + 17;
78
+ };
79
+ R.getSymbolTotalCodewords = function(t) {
80
+ return se[t];
81
+ };
82
+ R.getBCHDigit = function(e) {
83
+ let t = 0;
84
+ for (; e !== 0; )
85
+ t++, e >>>= 1;
86
+ return t;
87
+ };
88
+ R.setToSJISFunction = function(t) {
89
+ if (typeof t != "function")
90
+ throw new Error('"toSJISFunc" is not a valid function.');
91
+ ht = t;
92
+ };
93
+ R.isKanjiModeEnabled = function() {
94
+ return typeof ht < "u";
95
+ };
96
+ R.toSJIS = function(t) {
97
+ return ht(t);
98
+ };
99
+ var x = {};
100
+ (function(e) {
101
+ e.L = { bit: 1 }, e.M = { bit: 0 }, e.Q = { bit: 3 }, e.H = { bit: 2 };
102
+ function t(n) {
103
+ if (typeof n != "string")
104
+ throw new Error("Param is not a string");
105
+ switch (n.toLowerCase()) {
106
+ case "l":
107
+ case "low":
108
+ return e.L;
109
+ case "m":
110
+ case "medium":
111
+ return e.M;
112
+ case "q":
113
+ case "quartile":
114
+ return e.Q;
115
+ case "h":
116
+ case "high":
117
+ return e.H;
118
+ default:
119
+ throw new Error("Unknown EC Level: " + n);
120
+ }
121
+ }
122
+ e.isValid = function(o) {
123
+ return o && typeof o.bit < "u" && o.bit >= 0 && o.bit < 4;
124
+ }, e.from = function(o, r) {
125
+ if (e.isValid(o))
126
+ return o;
127
+ try {
128
+ return t(o);
129
+ } catch {
130
+ return r;
131
+ }
132
+ };
133
+ })(x);
134
+ function Nt() {
135
+ this.buffer = [], this.length = 0;
136
+ }
137
+ Nt.prototype = {
138
+ get: function(e) {
139
+ const t = Math.floor(e / 8);
140
+ return (this.buffer[t] >>> 7 - e % 8 & 1) === 1;
141
+ },
142
+ put: function(e, t) {
143
+ for (let n = 0; n < t; n++)
144
+ this.putBit((e >>> t - n - 1 & 1) === 1);
145
+ },
146
+ getLengthInBits: function() {
147
+ return this.length;
148
+ },
149
+ putBit: function(e) {
150
+ const t = Math.floor(this.length / 8);
151
+ this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
152
+ }
153
+ };
154
+ var ae = Nt;
155
+ function G(e) {
156
+ if (!e || e < 1)
157
+ throw new Error("BitMatrix size must be defined and greater than 0");
158
+ this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
159
+ }
160
+ G.prototype.set = function(e, t, n, o) {
161
+ const r = e * this.size + t;
162
+ this.data[r] = n, o && (this.reservedBit[r] = !0);
163
+ };
164
+ G.prototype.get = function(e, t) {
165
+ return this.data[e * this.size + t];
166
+ };
167
+ G.prototype.xor = function(e, t, n) {
168
+ this.data[e * this.size + t] ^= n;
169
+ };
170
+ G.prototype.isReserved = function(e, t) {
171
+ return this.reservedBit[e * this.size + t];
172
+ };
173
+ var le = G, Rt = {};
174
+ (function(e) {
175
+ const t = R.getSymbolSize;
176
+ e.getRowColCoords = function(o) {
177
+ if (o === 1)
178
+ return [];
179
+ const r = Math.floor(o / 7) + 2, i = t(o), s = i === 145 ? 26 : Math.ceil((i - 13) / (2 * r - 2)) * 2, a = [i - 7];
180
+ for (let l = 1; l < r - 1; l++)
181
+ a[l] = a[l - 1] - s;
182
+ return a.push(6), a.reverse();
183
+ }, e.getPositions = function(o) {
184
+ const r = [], i = e.getRowColCoords(o), s = i.length;
185
+ for (let a = 0; a < s; a++)
186
+ for (let l = 0; l < s; l++)
187
+ a === 0 && l === 0 || // top-left
188
+ a === 0 && l === s - 1 || // bottom-left
189
+ a === s - 1 && l === 0 || r.push([i[a], i[l]]);
190
+ return r;
191
+ };
192
+ })(Rt);
193
+ var Mt = {};
194
+ const ue = R.getSymbolSize, St = 7;
195
+ Mt.getPositions = function(t) {
196
+ const n = ue(t);
197
+ return [
198
+ // top-left
199
+ [0, 0],
200
+ // top-right
201
+ [n - St, 0],
202
+ // bottom-left
203
+ [0, n - St]
204
+ ];
205
+ };
206
+ var Pt = {};
207
+ (function(e) {
208
+ e.Patterns = {
209
+ PATTERN000: 0,
210
+ PATTERN001: 1,
211
+ PATTERN010: 2,
212
+ PATTERN011: 3,
213
+ PATTERN100: 4,
214
+ PATTERN101: 5,
215
+ PATTERN110: 6,
216
+ PATTERN111: 7
217
+ };
218
+ const t = {
219
+ N1: 3,
220
+ N2: 3,
221
+ N3: 40,
222
+ N4: 10
223
+ };
224
+ e.isValid = function(r) {
225
+ return r != null && r !== "" && !isNaN(r) && r >= 0 && r <= 7;
226
+ }, e.from = function(r) {
227
+ return e.isValid(r) ? parseInt(r, 10) : void 0;
228
+ }, e.getPenaltyN1 = function(r) {
229
+ const i = r.size;
230
+ let s = 0, a = 0, l = 0, f = null, u = null;
231
+ for (let B = 0; B < i; B++) {
232
+ a = l = 0, f = u = null;
233
+ for (let d = 0; d < i; d++) {
234
+ 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 === u ? l++ : (l >= 5 && (s += t.N1 + (l - 5)), u = g, l = 1);
236
+ }
237
+ a >= 5 && (s += t.N1 + (a - 5)), l >= 5 && (s += t.N1 + (l - 5));
238
+ }
239
+ return s;
240
+ }, e.getPenaltyN2 = function(r) {
241
+ const i = r.size;
242
+ let s = 0;
243
+ for (let a = 0; a < i - 1; a++)
244
+ for (let l = 0; l < i - 1; l++) {
245
+ const f = r.get(a, l) + r.get(a, l + 1) + r.get(a + 1, l) + r.get(a + 1, l + 1);
246
+ (f === 4 || f === 0) && s++;
247
+ }
248
+ return s * t.N2;
249
+ }, e.getPenaltyN3 = function(r) {
250
+ const i = r.size;
251
+ let s = 0, a = 0, l = 0;
252
+ for (let f = 0; f < i; f++) {
253
+ a = l = 0;
254
+ for (let u = 0; u < i; u++)
255
+ a = a << 1 & 2047 | r.get(f, u), u >= 10 && (a === 1488 || a === 93) && s++, l = l << 1 & 2047 | r.get(u, f), u >= 10 && (l === 1488 || l === 93) && s++;
256
+ }
257
+ return s * t.N3;
258
+ }, e.getPenaltyN4 = function(r) {
259
+ let i = 0;
260
+ const s = r.data.length;
261
+ for (let l = 0; l < s; l++)
262
+ i += r.data[l];
263
+ return Math.abs(Math.ceil(i * 100 / s / 5) - 10) * t.N4;
264
+ };
265
+ function n(o, r, i) {
266
+ switch (o) {
267
+ case e.Patterns.PATTERN000:
268
+ return (r + i) % 2 === 0;
269
+ case e.Patterns.PATTERN001:
270
+ return r % 2 === 0;
271
+ case e.Patterns.PATTERN010:
272
+ return i % 3 === 0;
273
+ case e.Patterns.PATTERN011:
274
+ return (r + i) % 3 === 0;
275
+ case e.Patterns.PATTERN100:
276
+ return (Math.floor(r / 2) + Math.floor(i / 3)) % 2 === 0;
277
+ case e.Patterns.PATTERN101:
278
+ return r * i % 2 + r * i % 3 === 0;
279
+ case e.Patterns.PATTERN110:
280
+ return (r * i % 2 + r * i % 3) % 2 === 0;
281
+ case e.Patterns.PATTERN111:
282
+ return (r * i % 3 + (r + i) % 2) % 2 === 0;
283
+ default:
284
+ throw new Error("bad maskPattern:" + o);
285
+ }
286
+ }
287
+ e.applyMask = function(r, i) {
288
+ const s = i.size;
289
+ for (let a = 0; a < s; a++)
290
+ for (let l = 0; l < s; l++)
291
+ i.isReserved(l, a) || i.xor(l, a, n(r, l, a));
292
+ }, e.getBestMask = function(r, i) {
293
+ const s = Object.keys(e.Patterns).length;
294
+ let a = 0, l = 1 / 0;
295
+ for (let f = 0; f < s; f++) {
296
+ i(f), e.applyMask(f, r);
297
+ const u = e.getPenaltyN1(r) + e.getPenaltyN2(r) + e.getPenaltyN3(r) + e.getPenaltyN4(r);
298
+ e.applyMask(f, r), u < l && (l = u, a = f);
299
+ }
300
+ return a;
301
+ };
302
+ })(Pt);
303
+ var $ = {};
304
+ const D = x, j = [
305
+ // L M Q H
306
+ 1,
307
+ 1,
308
+ 1,
309
+ 1,
310
+ 1,
311
+ 1,
312
+ 1,
313
+ 1,
314
+ 1,
315
+ 1,
316
+ 2,
317
+ 2,
318
+ 1,
319
+ 2,
320
+ 2,
321
+ 4,
322
+ 1,
323
+ 2,
324
+ 4,
325
+ 4,
326
+ 2,
327
+ 4,
328
+ 4,
329
+ 4,
330
+ 2,
331
+ 4,
332
+ 6,
333
+ 5,
334
+ 2,
335
+ 4,
336
+ 6,
337
+ 6,
338
+ 2,
339
+ 5,
340
+ 8,
341
+ 8,
342
+ 4,
343
+ 5,
344
+ 8,
345
+ 8,
346
+ 4,
347
+ 5,
348
+ 8,
349
+ 11,
350
+ 4,
351
+ 8,
352
+ 10,
353
+ 11,
354
+ 4,
355
+ 9,
356
+ 12,
357
+ 16,
358
+ 4,
359
+ 9,
360
+ 16,
361
+ 16,
362
+ 6,
363
+ 10,
364
+ 12,
365
+ 18,
366
+ 6,
367
+ 10,
368
+ 17,
369
+ 16,
370
+ 6,
371
+ 11,
372
+ 16,
373
+ 19,
374
+ 6,
375
+ 13,
376
+ 18,
377
+ 21,
378
+ 7,
379
+ 14,
380
+ 21,
381
+ 25,
382
+ 8,
383
+ 16,
384
+ 20,
385
+ 25,
386
+ 8,
387
+ 17,
388
+ 23,
389
+ 25,
390
+ 9,
391
+ 17,
392
+ 23,
393
+ 34,
394
+ 9,
395
+ 18,
396
+ 25,
397
+ 30,
398
+ 10,
399
+ 20,
400
+ 27,
401
+ 32,
402
+ 12,
403
+ 21,
404
+ 29,
405
+ 35,
406
+ 12,
407
+ 23,
408
+ 34,
409
+ 37,
410
+ 12,
411
+ 25,
412
+ 34,
413
+ 40,
414
+ 13,
415
+ 26,
416
+ 35,
417
+ 42,
418
+ 14,
419
+ 28,
420
+ 38,
421
+ 45,
422
+ 15,
423
+ 29,
424
+ 40,
425
+ 48,
426
+ 16,
427
+ 31,
428
+ 43,
429
+ 51,
430
+ 17,
431
+ 33,
432
+ 45,
433
+ 54,
434
+ 18,
435
+ 35,
436
+ 48,
437
+ 57,
438
+ 19,
439
+ 37,
440
+ 51,
441
+ 60,
442
+ 19,
443
+ 38,
444
+ 53,
445
+ 63,
446
+ 20,
447
+ 40,
448
+ 56,
449
+ 66,
450
+ 21,
451
+ 43,
452
+ 59,
453
+ 70,
454
+ 22,
455
+ 45,
456
+ 62,
457
+ 74,
458
+ 24,
459
+ 47,
460
+ 65,
461
+ 77,
462
+ 25,
463
+ 49,
464
+ 68,
465
+ 81
466
+ ], Y = [
467
+ // L M Q H
468
+ 7,
469
+ 10,
470
+ 13,
471
+ 17,
472
+ 10,
473
+ 16,
474
+ 22,
475
+ 28,
476
+ 15,
477
+ 26,
478
+ 36,
479
+ 44,
480
+ 20,
481
+ 36,
482
+ 52,
483
+ 64,
484
+ 26,
485
+ 48,
486
+ 72,
487
+ 88,
488
+ 36,
489
+ 64,
490
+ 96,
491
+ 112,
492
+ 40,
493
+ 72,
494
+ 108,
495
+ 130,
496
+ 48,
497
+ 88,
498
+ 132,
499
+ 156,
500
+ 60,
501
+ 110,
502
+ 160,
503
+ 192,
504
+ 72,
505
+ 130,
506
+ 192,
507
+ 224,
508
+ 80,
509
+ 150,
510
+ 224,
511
+ 264,
512
+ 96,
513
+ 176,
514
+ 260,
515
+ 308,
516
+ 104,
517
+ 198,
518
+ 288,
519
+ 352,
520
+ 120,
521
+ 216,
522
+ 320,
523
+ 384,
524
+ 132,
525
+ 240,
526
+ 360,
527
+ 432,
528
+ 144,
529
+ 280,
530
+ 408,
531
+ 480,
532
+ 168,
533
+ 308,
534
+ 448,
535
+ 532,
536
+ 180,
537
+ 338,
538
+ 504,
539
+ 588,
540
+ 196,
541
+ 364,
542
+ 546,
543
+ 650,
544
+ 224,
545
+ 416,
546
+ 600,
547
+ 700,
548
+ 224,
549
+ 442,
550
+ 644,
551
+ 750,
552
+ 252,
553
+ 476,
554
+ 690,
555
+ 816,
556
+ 270,
557
+ 504,
558
+ 750,
559
+ 900,
560
+ 300,
561
+ 560,
562
+ 810,
563
+ 960,
564
+ 312,
565
+ 588,
566
+ 870,
567
+ 1050,
568
+ 336,
569
+ 644,
570
+ 952,
571
+ 1110,
572
+ 360,
573
+ 700,
574
+ 1020,
575
+ 1200,
576
+ 390,
577
+ 728,
578
+ 1050,
579
+ 1260,
580
+ 420,
581
+ 784,
582
+ 1140,
583
+ 1350,
584
+ 450,
585
+ 812,
586
+ 1200,
587
+ 1440,
588
+ 480,
589
+ 868,
590
+ 1290,
591
+ 1530,
592
+ 510,
593
+ 924,
594
+ 1350,
595
+ 1620,
596
+ 540,
597
+ 980,
598
+ 1440,
599
+ 1710,
600
+ 570,
601
+ 1036,
602
+ 1530,
603
+ 1800,
604
+ 570,
605
+ 1064,
606
+ 1590,
607
+ 1890,
608
+ 600,
609
+ 1120,
610
+ 1680,
611
+ 1980,
612
+ 630,
613
+ 1204,
614
+ 1770,
615
+ 2100,
616
+ 660,
617
+ 1260,
618
+ 1860,
619
+ 2220,
620
+ 720,
621
+ 1316,
622
+ 1950,
623
+ 2310,
624
+ 750,
625
+ 1372,
626
+ 2040,
627
+ 2430
628
+ ];
629
+ $.getBlocksCount = function(t, n) {
630
+ switch (n) {
631
+ case D.L:
632
+ return j[(t - 1) * 4 + 0];
633
+ case D.M:
634
+ return j[(t - 1) * 4 + 1];
635
+ case D.Q:
636
+ return j[(t - 1) * 4 + 2];
637
+ case D.H:
638
+ return j[(t - 1) * 4 + 3];
639
+ default:
640
+ return;
641
+ }
642
+ };
643
+ $.getTotalCodewordsCount = function(t, n) {
644
+ switch (n) {
645
+ case D.L:
646
+ return Y[(t - 1) * 4 + 0];
647
+ case D.M:
648
+ return Y[(t - 1) * 4 + 1];
649
+ case D.Q:
650
+ return Y[(t - 1) * 4 + 2];
651
+ case D.H:
652
+ return Y[(t - 1) * 4 + 3];
653
+ default:
654
+ return;
655
+ }
656
+ };
657
+ var _t = {}, tt = {};
658
+ const K = new Uint8Array(512), q = new Uint8Array(256);
659
+ (function() {
660
+ let t = 1;
661
+ for (let n = 0; n < 255; n++)
662
+ K[n] = t, q[t] = n, t <<= 1, t & 256 && (t ^= 285);
663
+ for (let n = 255; n < 512; n++)
664
+ K[n] = K[n - 255];
665
+ })();
666
+ tt.log = function(t) {
667
+ if (t < 1)
668
+ throw new Error("log(" + t + ")");
669
+ return q[t];
670
+ };
671
+ tt.exp = function(t) {
672
+ return K[t];
673
+ };
674
+ tt.mul = function(t, n) {
675
+ return t === 0 || n === 0 ? 0 : K[q[t] + q[n]];
676
+ };
677
+ (function(e) {
678
+ const t = tt;
679
+ e.mul = function(o, r) {
680
+ const i = new Uint8Array(o.length + r.length - 1);
681
+ for (let s = 0; s < o.length; s++)
682
+ for (let a = 0; a < r.length; a++)
683
+ i[s + a] ^= t.mul(o[s], r[a]);
684
+ return i;
685
+ }, e.mod = function(o, r) {
686
+ let i = new Uint8Array(o);
687
+ for (; i.length - r.length >= 0; ) {
688
+ const s = i[0];
689
+ for (let l = 0; l < r.length; l++)
690
+ i[l] ^= t.mul(r[l], s);
691
+ let a = 0;
692
+ for (; a < i.length && i[a] === 0; )
693
+ a++;
694
+ i = i.slice(a);
695
+ }
696
+ return i;
697
+ }, e.generateECPolynomial = function(o) {
698
+ let r = new Uint8Array([1]);
699
+ for (let i = 0; i < o; i++)
700
+ r = e.mul(r, new Uint8Array([1, t.exp(i)]));
701
+ return r;
702
+ };
703
+ })(_t);
704
+ const Lt = _t;
705
+ function mt(e) {
706
+ this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree);
707
+ }
708
+ mt.prototype.initialize = function(t) {
709
+ this.degree = t, this.genPoly = Lt.generateECPolynomial(this.degree);
710
+ };
711
+ mt.prototype.encode = function(t) {
712
+ if (!this.genPoly)
713
+ throw new Error("Encoder not initialized");
714
+ const n = new Uint8Array(t.length + this.degree);
715
+ n.set(t);
716
+ const o = Lt.mod(n, this.genPoly), r = this.degree - o.length;
717
+ if (r > 0) {
718
+ const i = new Uint8Array(this.degree);
719
+ return i.set(o, r), i;
720
+ }
721
+ return o;
722
+ };
723
+ var ce = mt, Ut = {}, k = {}, wt = {};
724
+ wt.isValid = function(t) {
725
+ return !isNaN(t) && t >= 1 && t <= 40;
726
+ };
727
+ var P = {};
728
+ const Dt = "[0-9]+", fe = "[A-Z $%*+\\-./:]+";
729
+ let Q = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
730
+ Q = Q.replace(/u/g, "\\u");
731
+ const de = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Q + `)(?:.|[\r
732
+ ]))+`;
733
+ P.KANJI = new RegExp(Q, "g");
734
+ P.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
735
+ P.BYTE = new RegExp(de, "g");
736
+ P.NUMERIC = new RegExp(Dt, "g");
737
+ P.ALPHANUMERIC = new RegExp(fe, "g");
738
+ const ge = new RegExp("^" + Q + "$"), he = new RegExp("^" + Dt + "$"), me = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
739
+ P.testKanji = function(t) {
740
+ return ge.test(t);
741
+ };
742
+ P.testNumeric = function(t) {
743
+ return he.test(t);
744
+ };
745
+ P.testAlphanumeric = function(t) {
746
+ return me.test(t);
747
+ };
748
+ (function(e) {
749
+ const t = wt, n = P;
750
+ e.NUMERIC = {
751
+ id: "Numeric",
752
+ bit: 1,
753
+ ccBits: [10, 12, 14]
754
+ }, e.ALPHANUMERIC = {
755
+ id: "Alphanumeric",
756
+ bit: 2,
757
+ ccBits: [9, 11, 13]
758
+ }, e.BYTE = {
759
+ id: "Byte",
760
+ bit: 4,
761
+ ccBits: [8, 16, 16]
762
+ }, e.KANJI = {
763
+ id: "Kanji",
764
+ bit: 8,
765
+ ccBits: [8, 10, 12]
766
+ }, e.MIXED = {
767
+ bit: -1
768
+ }, e.getCharCountIndicator = function(i, s) {
769
+ if (!i.ccBits)
770
+ throw new Error("Invalid mode: " + i);
771
+ if (!t.isValid(s))
772
+ throw new Error("Invalid version: " + s);
773
+ return s >= 1 && s < 10 ? i.ccBits[0] : s < 27 ? i.ccBits[1] : i.ccBits[2];
774
+ }, e.getBestModeForData = function(i) {
775
+ return n.testNumeric(i) ? e.NUMERIC : n.testAlphanumeric(i) ? e.ALPHANUMERIC : n.testKanji(i) ? e.KANJI : e.BYTE;
776
+ }, e.toString = function(i) {
777
+ if (i && i.id)
778
+ return i.id;
779
+ throw new Error("Invalid mode");
780
+ }, e.isValid = function(i) {
781
+ return i && i.bit && i.ccBits;
782
+ };
783
+ function o(r) {
784
+ if (typeof r != "string")
785
+ throw new Error("Param is not a string");
786
+ switch (r.toLowerCase()) {
787
+ case "numeric":
788
+ return e.NUMERIC;
789
+ case "alphanumeric":
790
+ return e.ALPHANUMERIC;
791
+ case "kanji":
792
+ return e.KANJI;
793
+ case "byte":
794
+ return e.BYTE;
795
+ default:
796
+ throw new Error("Unknown mode: " + r);
797
+ }
798
+ }
799
+ e.from = function(i, s) {
800
+ if (e.isValid(i))
801
+ return i;
802
+ try {
803
+ return o(i);
804
+ } catch {
805
+ return s;
806
+ }
807
+ };
808
+ })(k);
809
+ (function(e) {
810
+ const t = R, n = $, o = x, r = k, i = wt, s = 7973, a = t.getBCHDigit(s);
811
+ function l(d, g, m) {
812
+ for (let w = 1; w <= 40; w++)
813
+ if (g <= e.getCapacity(w, m, d))
814
+ return w;
815
+ }
816
+ function f(d, g) {
817
+ return r.getCharCountIndicator(d, g) + 4;
818
+ }
819
+ function u(d, g) {
820
+ let m = 0;
821
+ return d.forEach(function(w) {
822
+ const p = f(w.mode, g);
823
+ m += p + w.getBitsLength();
824
+ }), m;
825
+ }
826
+ function B(d, g) {
827
+ for (let m = 1; m <= 40; m++)
828
+ if (u(d, m) <= e.getCapacity(m, g, r.MIXED))
829
+ return m;
830
+ }
831
+ e.from = function(g, m) {
832
+ return i.isValid(g) ? parseInt(g, 10) : m;
833
+ }, e.getCapacity = function(g, m, w) {
834
+ if (!i.isValid(g))
835
+ throw new Error("Invalid QR Code version");
836
+ typeof w > "u" && (w = r.BYTE);
837
+ const p = t.getSymbolTotalCodewords(g), c = n.getTotalCodewordsCount(g, m), h = (p - c) * 8;
838
+ if (w === r.MIXED)
839
+ return h;
840
+ const C = h - f(w, g);
841
+ switch (w) {
842
+ case r.NUMERIC:
843
+ return Math.floor(C / 10 * 3);
844
+ case r.ALPHANUMERIC:
845
+ return Math.floor(C / 11 * 2);
846
+ case r.KANJI:
847
+ return Math.floor(C / 13);
848
+ case r.BYTE:
849
+ default:
850
+ return Math.floor(C / 8);
851
+ }
852
+ }, e.getBestVersionForData = function(g, m) {
853
+ let w;
854
+ const p = o.from(m, o.M);
855
+ if (Array.isArray(g)) {
856
+ if (g.length > 1)
857
+ return B(g, p);
858
+ if (g.length === 0)
859
+ return 1;
860
+ w = g[0];
861
+ } else
862
+ w = g;
863
+ return l(w.mode, w.getLength(), p);
864
+ }, e.getEncodedBits = function(g) {
865
+ if (!i.isValid(g) || g < 7)
866
+ throw new Error("Invalid QR Code version");
867
+ let m = g << 12;
868
+ for (; t.getBCHDigit(m) - a >= 0; )
869
+ m ^= s << t.getBCHDigit(m) - a;
870
+ return g << 12 | m;
871
+ };
872
+ })(Ut);
873
+ var kt = {};
874
+ const ct = R, Ft = 1335, we = 21522, At = ct.getBCHDigit(Ft);
875
+ kt.getEncodedBits = function(t, n) {
876
+ const o = t.bit << 3 | n;
877
+ let r = o << 10;
878
+ for (; ct.getBCHDigit(r) - At >= 0; )
879
+ r ^= Ft << ct.getBCHDigit(r) - At;
880
+ return (o << 10 | r) ^ we;
881
+ };
882
+ var zt = {};
883
+ const ye = k;
884
+ function v(e) {
885
+ this.mode = ye.NUMERIC, this.data = e.toString();
886
+ }
887
+ v.getBitsLength = function(t) {
888
+ return 10 * Math.floor(t / 3) + (t % 3 ? t % 3 * 3 + 1 : 0);
889
+ };
890
+ v.prototype.getLength = function() {
891
+ return this.data.length;
892
+ };
893
+ v.prototype.getBitsLength = function() {
894
+ return v.getBitsLength(this.data.length);
895
+ };
896
+ v.prototype.write = function(t) {
897
+ let n, o, r;
898
+ for (n = 0; n + 3 <= this.data.length; n += 3)
899
+ o = this.data.substr(n, 3), r = parseInt(o, 10), t.put(r, 10);
900
+ const i = this.data.length - n;
901
+ i > 0 && (o = this.data.substr(n), r = parseInt(o, 10), t.put(r, i * 3 + 1));
902
+ };
903
+ var Ce = v;
904
+ const pe = k, nt = [
905
+ "0",
906
+ "1",
907
+ "2",
908
+ "3",
909
+ "4",
910
+ "5",
911
+ "6",
912
+ "7",
913
+ "8",
914
+ "9",
915
+ "A",
916
+ "B",
917
+ "C",
918
+ "D",
919
+ "E",
920
+ "F",
921
+ "G",
922
+ "H",
923
+ "I",
924
+ "J",
925
+ "K",
926
+ "L",
927
+ "M",
928
+ "N",
929
+ "O",
930
+ "P",
931
+ "Q",
932
+ "R",
933
+ "S",
934
+ "T",
935
+ "U",
936
+ "V",
937
+ "W",
938
+ "X",
939
+ "Y",
940
+ "Z",
941
+ " ",
942
+ "$",
943
+ "%",
944
+ "*",
945
+ "+",
946
+ "-",
947
+ ".",
948
+ "/",
949
+ ":"
950
+ ];
951
+ function V(e) {
952
+ this.mode = pe.ALPHANUMERIC, this.data = e;
953
+ }
954
+ V.getBitsLength = function(t) {
955
+ return 11 * Math.floor(t / 2) + 6 * (t % 2);
956
+ };
957
+ V.prototype.getLength = function() {
958
+ return this.data.length;
959
+ };
960
+ V.prototype.getBitsLength = function() {
961
+ return V.getBitsLength(this.data.length);
962
+ };
963
+ V.prototype.write = function(t) {
964
+ let n;
965
+ for (n = 0; n + 2 <= this.data.length; n += 2) {
966
+ let o = nt.indexOf(this.data[n]) * 45;
967
+ o += nt.indexOf(this.data[n + 1]), t.put(o, 11);
968
+ }
969
+ this.data.length % 2 && t.put(nt.indexOf(this.data[n]), 6);
970
+ };
971
+ var Ee = V;
972
+ const Be = k;
973
+ function H(e) {
974
+ this.mode = Be.BYTE, typeof e == "string" ? this.data = new TextEncoder().encode(e) : this.data = new Uint8Array(e);
975
+ }
976
+ H.getBitsLength = function(t) {
977
+ return t * 8;
978
+ };
979
+ H.prototype.getLength = function() {
980
+ return this.data.length;
981
+ };
982
+ H.prototype.getBitsLength = function() {
983
+ return H.getBitsLength(this.data.length);
984
+ };
985
+ H.prototype.write = function(e) {
986
+ for (let t = 0, n = this.data.length; t < n; t++)
987
+ e.put(this.data[t], 8);
988
+ };
989
+ var be = H;
990
+ const Se = k, Ae = R;
991
+ function O(e) {
992
+ this.mode = Se.KANJI, this.data = e;
993
+ }
994
+ O.getBitsLength = function(t) {
995
+ return t * 13;
996
+ };
997
+ O.prototype.getLength = function() {
998
+ return this.data.length;
999
+ };
1000
+ O.prototype.getBitsLength = function() {
1001
+ return O.getBitsLength(this.data.length);
1002
+ };
1003
+ O.prototype.write = function(e) {
1004
+ let t;
1005
+ for (t = 0; t < this.data.length; t++) {
1006
+ let n = Ae.toSJIS(this.data[t]);
1007
+ if (n >= 33088 && n <= 40956)
1008
+ n -= 33088;
1009
+ else if (n >= 57408 && n <= 60351)
1010
+ n -= 49472;
1011
+ else
1012
+ throw new Error(
1013
+ "Invalid SJIS character: " + this.data[t] + `
1014
+ Make sure your charset is UTF-8`
1015
+ );
1016
+ n = (n >>> 8 & 255) * 192 + (n & 255), e.put(n, 13);
1017
+ }
1018
+ };
1019
+ var Ie = O, vt = { exports: {} };
1020
+ (function(e) {
1021
+ var t = {
1022
+ single_source_shortest_paths: function(n, o, r) {
1023
+ var i = {}, s = {};
1024
+ s[o] = 0;
1025
+ var a = t.PriorityQueue.make();
1026
+ a.push(o, 0);
1027
+ for (var l, f, u, B, d, g, m, w, p; !a.empty(); ) {
1028
+ l = a.pop(), f = l.value, B = l.cost, d = n[f] || {};
1029
+ for (u in d)
1030
+ d.hasOwnProperty(u) && (g = d[u], m = B + g, w = s[u], p = typeof s[u] > "u", (p || w > m) && (s[u] = m, a.push(u, m), i[u] = f));
1031
+ }
1032
+ if (typeof r < "u" && typeof s[r] > "u") {
1033
+ var c = ["Could not find a path from ", o, " to ", r, "."].join("");
1034
+ throw new Error(c);
1035
+ }
1036
+ return i;
1037
+ },
1038
+ extract_shortest_path_from_predecessor_list: function(n, o) {
1039
+ for (var r = [], i = o; i; )
1040
+ r.push(i), n[i], i = n[i];
1041
+ return r.reverse(), r;
1042
+ },
1043
+ find_path: function(n, o, r) {
1044
+ var i = t.single_source_shortest_paths(n, o, r);
1045
+ return t.extract_shortest_path_from_predecessor_list(
1046
+ i,
1047
+ r
1048
+ );
1049
+ },
1050
+ /**
1051
+ * A very naive priority queue implementation.
1052
+ */
1053
+ PriorityQueue: {
1054
+ make: function(n) {
1055
+ var o = t.PriorityQueue, r = {}, i;
1056
+ n = n || {};
1057
+ for (i in o)
1058
+ o.hasOwnProperty(i) && (r[i] = o[i]);
1059
+ return r.queue = [], r.sorter = n.sorter || o.default_sorter, r;
1060
+ },
1061
+ default_sorter: function(n, o) {
1062
+ return n.cost - o.cost;
1063
+ },
1064
+ /**
1065
+ * Add a new item to the queue and ensure the highest priority element
1066
+ * is at the front of the queue.
1067
+ */
1068
+ push: function(n, o) {
1069
+ var r = { value: n, cost: o };
1070
+ this.queue.push(r), this.queue.sort(this.sorter);
1071
+ },
1072
+ /**
1073
+ * Return the highest priority element in the queue.
1074
+ */
1075
+ pop: function() {
1076
+ return this.queue.shift();
1077
+ },
1078
+ empty: function() {
1079
+ return this.queue.length === 0;
1080
+ }
1081
+ }
1082
+ };
1083
+ e.exports = t;
1084
+ })(vt);
1085
+ var Te = vt.exports;
1086
+ (function(e) {
1087
+ const t = k, n = Ce, o = Ee, r = be, i = Ie, s = P, a = R, l = Te;
1088
+ function f(c) {
1089
+ return unescape(encodeURIComponent(c)).length;
1090
+ }
1091
+ function u(c, h, C) {
1092
+ const y = [];
1093
+ let b;
1094
+ for (; (b = c.exec(C)) !== null; )
1095
+ y.push({
1096
+ data: b[0],
1097
+ index: b.index,
1098
+ mode: h,
1099
+ length: b[0].length
1100
+ });
1101
+ return y;
1102
+ }
1103
+ function B(c) {
1104
+ const h = u(s.NUMERIC, t.NUMERIC, c), C = u(s.ALPHANUMERIC, t.ALPHANUMERIC, c);
1105
+ let y, b;
1106
+ return a.isKanjiModeEnabled() ? (y = u(s.BYTE, t.BYTE, c), b = u(s.KANJI, t.KANJI, c)) : (y = u(s.BYTE_KANJI, t.BYTE, c), b = []), h.concat(C, y, b).sort(function(A, N) {
1107
+ return A.index - N.index;
1108
+ }).map(function(A) {
1109
+ return {
1110
+ data: A.data,
1111
+ mode: A.mode,
1112
+ length: A.length
1113
+ };
1114
+ });
1115
+ }
1116
+ function d(c, h) {
1117
+ switch (h) {
1118
+ case t.NUMERIC:
1119
+ return n.getBitsLength(c);
1120
+ case t.ALPHANUMERIC:
1121
+ return o.getBitsLength(c);
1122
+ case t.KANJI:
1123
+ return i.getBitsLength(c);
1124
+ case t.BYTE:
1125
+ return r.getBitsLength(c);
1126
+ }
1127
+ }
1128
+ function g(c) {
1129
+ return c.reduce(function(h, C) {
1130
+ const y = h.length - 1 >= 0 ? h[h.length - 1] : null;
1131
+ return y && y.mode === C.mode ? (h[h.length - 1].data += C.data, h) : (h.push(C), h);
1132
+ }, []);
1133
+ }
1134
+ function m(c) {
1135
+ const h = [];
1136
+ for (let C = 0; C < c.length; C++) {
1137
+ const y = c[C];
1138
+ switch (y.mode) {
1139
+ case t.NUMERIC:
1140
+ h.push([
1141
+ y,
1142
+ { data: y.data, mode: t.ALPHANUMERIC, length: y.length },
1143
+ { data: y.data, mode: t.BYTE, length: y.length }
1144
+ ]);
1145
+ break;
1146
+ case t.ALPHANUMERIC:
1147
+ h.push([
1148
+ y,
1149
+ { data: y.data, mode: t.BYTE, length: y.length }
1150
+ ]);
1151
+ break;
1152
+ case t.KANJI:
1153
+ h.push([
1154
+ y,
1155
+ { data: y.data, mode: t.BYTE, length: f(y.data) }
1156
+ ]);
1157
+ break;
1158
+ case t.BYTE:
1159
+ h.push([
1160
+ { data: y.data, mode: t.BYTE, length: f(y.data) }
1161
+ ]);
1162
+ }
1163
+ }
1164
+ return h;
1165
+ }
1166
+ function w(c, h) {
1167
+ const C = {}, y = { start: {} };
1168
+ let b = ["start"];
1169
+ for (let S = 0; S < c.length; S++) {
1170
+ const A = c[S], N = [];
1171
+ for (let E = 0; E < A.length; E++) {
1172
+ const I = A[E], M = "" + S + E;
1173
+ N.push(M), C[M] = { node: I, lastCount: 0 }, y[M] = {};
1174
+ for (let F = 0; F < b.length; F++) {
1175
+ const T = b[F];
1176
+ C[T] && C[T].node.mode === I.mode ? (y[T][M] = d(C[T].lastCount + I.length, I.mode) - d(C[T].lastCount, I.mode), C[T].lastCount += I.length) : (C[T] && (C[T].lastCount = I.length), y[T][M] = d(I.length, I.mode) + 4 + t.getCharCountIndicator(I.mode, h));
1177
+ }
1178
+ }
1179
+ b = N;
1180
+ }
1181
+ for (let S = 0; S < b.length; S++)
1182
+ y[b[S]].end = 0;
1183
+ return { map: y, table: C };
1184
+ }
1185
+ function p(c, h) {
1186
+ let C;
1187
+ const y = t.getBestModeForData(c);
1188
+ if (C = t.from(h, y), C !== t.BYTE && C.bit < y.bit)
1189
+ throw new Error('"' + c + '" cannot be encoded with mode ' + t.toString(C) + `.
1190
+ Suggested mode is: ` + t.toString(y));
1191
+ switch (C === t.KANJI && !a.isKanjiModeEnabled() && (C = t.BYTE), C) {
1192
+ case t.NUMERIC:
1193
+ return new n(c);
1194
+ case t.ALPHANUMERIC:
1195
+ return new o(c);
1196
+ case t.KANJI:
1197
+ return new i(c);
1198
+ case t.BYTE:
1199
+ return new r(c);
1200
+ }
1201
+ }
1202
+ e.fromArray = function(h) {
1203
+ return h.reduce(function(C, y) {
1204
+ return typeof y == "string" ? C.push(p(y, null)) : y.data && C.push(p(y.data, y.mode)), C;
1205
+ }, []);
1206
+ }, e.fromString = function(h, C) {
1207
+ const y = B(h, a.isKanjiModeEnabled()), b = m(y), S = w(b, C), A = l.find_path(S.map, "start", "end"), N = [];
1208
+ for (let E = 1; E < A.length - 1; E++)
1209
+ N.push(S.table[A[E]].node);
1210
+ return e.fromArray(g(N));
1211
+ }, e.rawSplit = function(h) {
1212
+ return e.fromArray(
1213
+ B(h, a.isKanjiModeEnabled())
1214
+ );
1215
+ };
1216
+ })(zt);
1217
+ const et = R, rt = x, Ne = ae, Re = le, Me = Rt, Pe = Mt, ft = Pt, dt = $, _e = ce, W = Ut, Le = kt, Ue = k, ot = zt;
1218
+ function De(e, t) {
1219
+ const n = e.size, o = Pe.getPositions(t);
1220
+ for (let r = 0; r < o.length; r++) {
1221
+ const i = o[r][0], s = o[r][1];
1222
+ for (let a = -1; a <= 7; a++)
1223
+ if (!(i + a <= -1 || n <= i + a))
1224
+ for (let l = -1; l <= 7; l++)
1225
+ 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
+ }
1227
+ }
1228
+ function ke(e) {
1229
+ const t = e.size;
1230
+ for (let n = 8; n < t - 8; n++) {
1231
+ const o = n % 2 === 0;
1232
+ e.set(n, 6, o, !0), e.set(6, n, o, !0);
1233
+ }
1234
+ }
1235
+ function Fe(e, t) {
1236
+ const n = Me.getPositions(t);
1237
+ for (let o = 0; o < n.length; o++) {
1238
+ const r = n[o][0], i = n[o][1];
1239
+ for (let s = -2; s <= 2; s++)
1240
+ for (let a = -2; a <= 2; a++)
1241
+ 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
+ }
1243
+ }
1244
+ function ze(e, t) {
1245
+ const n = e.size, o = W.getEncodedBits(t);
1246
+ let r, i, s;
1247
+ for (let a = 0; a < 18; a++)
1248
+ 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
+ }
1250
+ function it(e, t, n) {
1251
+ const o = e.size, r = Le.getEncodedBits(t, n);
1252
+ let i, s;
1253
+ for (i = 0; i < 15; i++)
1254
+ 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
+ e.set(o - 8, 8, 1, !0);
1256
+ }
1257
+ function ve(e, t) {
1258
+ const n = e.size;
1259
+ let o = -1, r = n - 1, i = 7, s = 0;
1260
+ for (let a = n - 1; a > 0; a -= 2)
1261
+ for (a === 6 && a--; ; ) {
1262
+ for (let l = 0; l < 2; l++)
1263
+ if (!e.isReserved(r, a - l)) {
1264
+ let f = !1;
1265
+ s < t.length && (f = (t[s] >>> i & 1) === 1), e.set(r, a - l, f), i--, i === -1 && (s++, i = 7);
1266
+ }
1267
+ if (r += o, r < 0 || n <= r) {
1268
+ r -= o, o = -o;
1269
+ break;
1270
+ }
1271
+ }
1272
+ }
1273
+ function Ve(e, t, n) {
1274
+ const o = new Ne();
1275
+ n.forEach(function(l) {
1276
+ o.put(l.mode.bit, 4), o.put(l.getLength(), Ue.getCharCountIndicator(l.mode, e)), l.write(o);
1277
+ });
1278
+ const r = et.getSymbolTotalCodewords(e), i = dt.getTotalCodewordsCount(e, t), s = (r - i) * 8;
1279
+ for (o.getLengthInBits() + 4 <= s && o.put(0, 4); o.getLengthInBits() % 8 !== 0; )
1280
+ o.putBit(0);
1281
+ const a = (s - o.getLengthInBits()) / 8;
1282
+ for (let l = 0; l < a; l++)
1283
+ o.put(l % 2 ? 17 : 236, 8);
1284
+ return He(o, e, t);
1285
+ }
1286
+ function He(e, t, n) {
1287
+ const o = et.getSymbolTotalCodewords(t), r = dt.getTotalCodewordsCount(t, n), i = o - r, s = dt.getBlocksCount(t, n), a = o % s, l = s - a, f = Math.floor(o / s), u = Math.floor(i / s), B = u + 1, d = f - u, g = new _e(d);
1288
+ let m = 0;
1289
+ const w = new Array(s), p = new Array(s);
1290
+ let c = 0;
1291
+ const h = new Uint8Array(e.buffer);
1292
+ for (let A = 0; A < s; A++) {
1293
+ const N = A < l ? u : B;
1294
+ w[A] = h.slice(m, m + N), p[A] = g.encode(w[A]), m += N, c = Math.max(c, N);
1295
+ }
1296
+ const C = new Uint8Array(o);
1297
+ let y = 0, b, S;
1298
+ for (b = 0; b < c; b++)
1299
+ for (S = 0; S < s; S++)
1300
+ b < w[S].length && (C[y++] = w[S][b]);
1301
+ for (b = 0; b < d; b++)
1302
+ for (S = 0; S < s; S++)
1303
+ C[y++] = p[S][b];
1304
+ return C;
1305
+ }
1306
+ function Oe(e, t, n, o) {
1307
+ let r;
1308
+ if (Array.isArray(e))
1309
+ r = ot.fromArray(e);
1310
+ else if (typeof e == "string") {
1311
+ let f = t;
1312
+ if (!f) {
1313
+ const u = ot.rawSplit(e);
1314
+ f = W.getBestVersionForData(u, n);
1315
+ }
1316
+ r = ot.fromString(e, f || 40);
1317
+ } else
1318
+ throw new Error("Invalid data");
1319
+ const i = W.getBestVersionForData(r, n);
1320
+ if (!i)
1321
+ throw new Error("The amount of data is too big to be stored in a QR Code");
1322
+ if (!t)
1323
+ t = i;
1324
+ else if (t < i)
1325
+ throw new Error(
1326
+ `
1327
+ The chosen QR Code version cannot contain this amount of data.
1328
+ Minimum version required to store current data is: ` + i + `.
1329
+ `
1330
+ );
1331
+ const s = Ve(t, n, r), a = et.getSymbolSize(t), l = new Re(a);
1332
+ return De(l, t), ke(l), Fe(l, t), it(l, n, 0), t >= 7 && ze(l, t), ve(l, s), isNaN(o) && (o = ft.getBestMask(
1333
+ l,
1334
+ it.bind(null, l, n)
1335
+ )), ft.applyMask(o, l), it(l, n, o), {
1336
+ modules: l,
1337
+ version: t,
1338
+ errorCorrectionLevel: n,
1339
+ maskPattern: o,
1340
+ segments: r
1341
+ };
1342
+ }
1343
+ Tt.create = function(t, n) {
1344
+ if (typeof t > "u" || t === "")
1345
+ throw new Error("No input text");
1346
+ let o = rt.M, r, i;
1347
+ return typeof n < "u" && (o = rt.from(n.errorCorrectionLevel, rt.M), r = W.from(n.version), i = ft.from(n.maskPattern), n.toSJISFunc && et.setToSJISFunction(n.toSJISFunc)), Oe(t, r, o, i);
1348
+ };
1349
+ var Vt = {}, yt = {};
1350
+ (function(e) {
1351
+ function t(n) {
1352
+ if (typeof n == "number" && (n = n.toString()), typeof n != "string")
1353
+ throw new Error("Color should be defined as hex string");
1354
+ let o = n.slice().replace("#", "").split("");
1355
+ if (o.length < 3 || o.length === 5 || o.length > 8)
1356
+ throw new Error("Invalid hex color: " + n);
1357
+ (o.length === 3 || o.length === 4) && (o = Array.prototype.concat.apply([], o.map(function(i) {
1358
+ return [i, i];
1359
+ }))), o.length === 6 && o.push("F", "F");
1360
+ const r = parseInt(o.join(""), 16);
1361
+ return {
1362
+ r: r >> 24 & 255,
1363
+ g: r >> 16 & 255,
1364
+ b: r >> 8 & 255,
1365
+ a: r & 255,
1366
+ hex: "#" + o.slice(0, 6).join("")
1367
+ };
1368
+ }
1369
+ e.getOptions = function(o) {
1370
+ o || (o = {}), o.color || (o.color = {});
1371
+ 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;
1372
+ return {
1373
+ width: i,
1374
+ scale: i ? 4 : s,
1375
+ margin: r,
1376
+ color: {
1377
+ dark: t(o.color.dark || "#000000ff"),
1378
+ light: t(o.color.light || "#ffffffff")
1379
+ },
1380
+ type: o.type,
1381
+ rendererOpts: o.rendererOpts || {}
1382
+ };
1383
+ }, e.getScale = function(o, r) {
1384
+ return r.width && r.width >= o + r.margin * 2 ? r.width / (o + r.margin * 2) : r.scale;
1385
+ }, e.getImageWidth = function(o, r) {
1386
+ const i = e.getScale(o, r);
1387
+ return Math.floor((o + r.margin * 2) * i);
1388
+ }, 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), u = i.margin * l, B = [i.color.light, i.color.dark];
1390
+ for (let d = 0; d < f; d++)
1391
+ for (let g = 0; g < f; g++) {
1392
+ let m = (d * f + g) * 4, w = i.color.light;
1393
+ if (d >= u && g >= u && d < f - u && g < f - u) {
1394
+ const p = Math.floor((d - u) / l), c = Math.floor((g - u) / l);
1395
+ w = B[a[p * s + c] ? 1 : 0];
1396
+ }
1397
+ o[m++] = w.r, o[m++] = w.g, o[m++] = w.b, o[m] = w.a;
1398
+ }
1399
+ };
1400
+ })(yt);
1401
+ (function(e) {
1402
+ const t = yt;
1403
+ function n(r, i, s) {
1404
+ 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
+ }
1406
+ function o() {
1407
+ try {
1408
+ return document.createElement("canvas");
1409
+ } catch {
1410
+ throw new Error("You need to specify a canvas element");
1411
+ }
1412
+ }
1413
+ e.render = function(i, s, a) {
1414
+ let l = a, f = s;
1415
+ typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), s || (f = o()), l = t.getOptions(l);
1416
+ const u = t.getImageWidth(i.modules.size, l), B = f.getContext("2d"), d = B.createImageData(u, u);
1417
+ return t.qrToImageData(d.data, i, l), n(B, f, u), B.putImageData(d, 0, 0), f;
1418
+ }, e.renderToDataURL = function(i, s, a) {
1419
+ let l = a;
1420
+ typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), l || (l = {});
1421
+ const f = e.render(i, s, l), u = l.type || "image/png", B = l.rendererOpts || {};
1422
+ return f.toDataURL(u, B.quality);
1423
+ };
1424
+ })(Vt);
1425
+ var Ht = {};
1426
+ const Ke = yt;
1427
+ function It(e, t) {
1428
+ const n = e.a / 255, o = t + '="' + e.hex + '"';
1429
+ return n < 1 ? o + " " + t + '-opacity="' + n.toFixed(2).slice(1) + '"' : o;
1430
+ }
1431
+ function st(e, t, n) {
1432
+ let o = e + t;
1433
+ return typeof n < "u" && (o += " " + n), o;
1434
+ }
1435
+ function Qe(e, t, n) {
1436
+ let o = "", r = 0, i = !1, s = 0;
1437
+ for (let a = 0; a < e.length; a++) {
1438
+ 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 ? st("M", l + n, 0.5 + f + n) : st("m", r, 0), r = 0, i = !1), l + 1 < t && e[a + 1] || (o += st("h", s), s = 0)) : r++;
1440
+ }
1441
+ return o;
1442
+ }
1443
+ Ht.render = function(t, n, o) {
1444
+ const r = Ke.getOptions(n), i = t.modules.size, s = t.modules.data, a = i + r.margin * 2, l = r.color.light.a ? "<path " + It(r.color.light, "fill") + ' d="M0 0h' + a + "v" + a + 'H0z"/>' : "", f = "<path " + It(r.color.dark, "stroke") + ' d="' + Qe(s, i, r.margin) + '"/>', u = 'viewBox="0 0 ' + a + " " + a + '"', d = '<svg xmlns="http://www.w3.org/2000/svg" ' + (r.width ? 'width="' + r.width + '" height="' + r.width + '" ' : "") + u + ' shape-rendering="crispEdges">' + l + f + `</svg>
1445
+ `;
1446
+ return typeof o == "function" && o(null, d), d;
1447
+ };
1448
+ const Je = ie, gt = Tt, Ot = Vt, Ge = Ht;
1449
+ function Ct(e, t, n, o, r) {
1450
+ const i = [].slice.call(arguments, 1), s = i.length, a = typeof i[s - 1] == "function";
1451
+ if (!a && !Je())
1452
+ throw new Error("Callback required as last argument");
1453
+ if (a) {
1454
+ if (s < 2)
1455
+ throw new Error("Too few arguments provided");
1456
+ 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));
1457
+ } else {
1458
+ if (s < 1)
1459
+ throw new Error("Too few arguments provided");
1460
+ return s === 1 ? (n = t, t = o = void 0) : s === 2 && !t.getContext && (o = n, n = t, t = void 0), new Promise(function(l, f) {
1461
+ try {
1462
+ const u = gt.create(n, o);
1463
+ l(e(u, t, o));
1464
+ } catch (u) {
1465
+ f(u);
1466
+ }
1467
+ });
1468
+ }
1469
+ try {
1470
+ const l = gt.create(n, o);
1471
+ r(null, e(l, t, o));
1472
+ } catch (l) {
1473
+ r(l);
1474
+ }
1475
+ }
1476
+ J.create = gt.create;
1477
+ J.toCanvas = Ct.bind(null, Ot.render);
1478
+ J.toDataURL = Ct.bind(null, Ot.renderToDataURL);
1479
+ J.toString = Ct.bind(null, function(e, t, n) {
1480
+ return Ge.render(e, n);
1481
+ });
1482
+ function je(e) {
1483
+ Yt(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
+ }
1485
+ function Ye(e) {
1486
+ let t, n, o;
1487
+ return {
1488
+ c() {
1489
+ t = U("div"), n = U("img"), L(n, "class", "qr-image"), Et(n.src, o = /*qrImageUrl*/
1490
+ e[3]) || L(n, "src", o), L(n, "alt", "qr-session-login"), L(t, "class", "qr-section");
1491
+ },
1492
+ m(r, i) {
1493
+ Z(r, t, i), _(t, n);
1494
+ },
1495
+ p(r, i) {
1496
+ i & /*qrImageUrl*/
1497
+ 8 && !Et(n.src, o = /*qrImageUrl*/
1498
+ r[3]) && L(n, "src", o);
1499
+ },
1500
+ d(r) {
1501
+ r && X(t);
1502
+ }
1503
+ };
1504
+ }
1505
+ function qe(e) {
1506
+ let t;
1507
+ return {
1508
+ c() {
1509
+ t = U("div"), L(t, "class", "LoadingSpinner");
1510
+ },
1511
+ m(n, o) {
1512
+ Z(n, t, o);
1513
+ },
1514
+ p: at,
1515
+ d(n) {
1516
+ n && X(t);
1517
+ }
1518
+ };
1519
+ }
1520
+ function We(e) {
1521
+ let t, n = (
1522
+ /*$_*/
1523
+ e[5](
1524
+ /*errorCode*/
1525
+ e[4]
1526
+ ) + ""
1527
+ ), o;
1528
+ return {
1529
+ c() {
1530
+ t = U("p"), o = ut(n), L(t, "class", "generate-qr-error-message");
1531
+ },
1532
+ m(r, i) {
1533
+ Z(r, t, i), _(t, o);
1534
+ },
1535
+ p(r, i) {
1536
+ i & /*$_, errorCode*/
1537
+ 48 && n !== (n = /*$_*/
1538
+ r[5](
1539
+ /*errorCode*/
1540
+ r[4]
1541
+ ) + "") && lt(o, n);
1542
+ },
1543
+ d(r) {
1544
+ r && X(t);
1545
+ }
1546
+ };
1547
+ }
1548
+ function Xe(e) {
1549
+ let t, n, o, r = (
1550
+ /*$_*/
1551
+ e[5]("titleQRSessionGenerator") + ""
1552
+ ), i, s, a, l = (
1553
+ /*remaining*/
1554
+ (e[1] > 0 ? `${/*remaining*/
1555
+ e[1]}s` : (
1556
+ /*$_*/
1557
+ e[5]("generateQRButton")
1558
+ )) + ""
1559
+ ), f, u, B, d, g;
1560
+ function m(c, h) {
1561
+ if (
1562
+ /*errorCode*/
1563
+ c[4]
1564
+ )
1565
+ return We;
1566
+ if (
1567
+ /*isGenerating*/
1568
+ c[2]
1569
+ )
1570
+ return qe;
1571
+ if (
1572
+ /*qrImageUrl*/
1573
+ c[3]
1574
+ )
1575
+ return Ye;
1576
+ }
1577
+ let w = m(e), p = w && w(e);
1578
+ return {
1579
+ c() {
1580
+ t = U("div"), n = U("div"), o = U("p"), i = ut(r), s = pt(), a = U("button"), f = ut(l), B = pt(), p && p.c(), L(a, "class", "generate-qr-btn"), a.disabled = u = /*isGenerating*/
1581
+ e[2] || /*remaining*/
1582
+ e[1] > 0, L(n, "class", "qr-session-generator");
1583
+ },
1584
+ m(c, h) {
1585
+ Z(c, t, h), _(t, n), _(n, o), _(o, i), _(n, s), _(n, a), _(a, f), _(n, B), p && p.m(n, null), e[14](t), d || (g = qt(
1586
+ a,
1587
+ "click",
1588
+ /*onGenerateQRClick*/
1589
+ e[6]
1590
+ ), d = !0);
1591
+ },
1592
+ p(c, [h]) {
1593
+ h & /*$_*/
1594
+ 32 && r !== (r = /*$_*/
1595
+ c[5]("titleQRSessionGenerator") + "") && lt(i, r), h & /*remaining, $_*/
1596
+ 34 && l !== (l = /*remaining*/
1597
+ (c[1] > 0 ? `${/*remaining*/
1598
+ c[1]}s` : (
1599
+ /*$_*/
1600
+ c[5]("generateQRButton")
1601
+ )) + "") && lt(f, l), h & /*isGenerating, remaining*/
1602
+ 6 && u !== (u = /*isGenerating*/
1603
+ c[2] || /*remaining*/
1604
+ c[1] > 0) && (a.disabled = u), w === (w = m(c)) && p ? p.p(c, h) : (p && p.d(1), p = w && w(c), p && (p.c(), p.m(n, null)));
1605
+ },
1606
+ i: at,
1607
+ o: at,
1608
+ d(c) {
1609
+ c && X(t), p && p.d(), e[14](null), d = !1, g();
1610
+ }
1611
+ };
1612
+ }
1613
+ const Ze = 60;
1614
+ function xe(e, t, n) {
1615
+ let o;
1616
+ Wt(e, re, (E) => n(5, o = E));
1617
+ let { clientstyling: r = "" } = t, { clientstylingurl: i = "" } = t, { mbsource: s } = t, { lang: a = "en" } = t, { endpoint: l = "" } = t, { sessionid: f } = t, { translationurl: u } = t;
1618
+ const B = {
1619
+ "gm.norway.unauthorized": "unauthorizedError"
1620
+ };
1621
+ let d, g, m = 0, w = !1, p = null, c = null, h = null;
1622
+ Xt(() => () => {
1623
+ });
1624
+ const C = () => {
1625
+ fetch(u).then((I) => I.json()).then((I) => {
1626
+ Object.keys(I).forEach((M) => {
1627
+ Bt(M, I[M]);
1628
+ });
1629
+ }).catch((I) => {
1630
+ console.error(I);
1631
+ });
1632
+ };
1633
+ Object.keys(bt).forEach((E) => {
1634
+ Bt(E, bt[E]);
1635
+ });
1636
+ const y = () => {
1637
+ oe(a);
1638
+ }, b = async () => {
1639
+ if (w || m > 0)
1640
+ return;
1641
+ n(2, w = !0), n(4, h = null), n(3, c = null), n(1, m = Ze), S();
1642
+ const E = new URL(`${l}/api/pam/v1/qr/authenticate`), I = new Headers();
1643
+ I.append("X-SessionID", f);
1644
+ const M = { method: "POST", headers: I };
1645
+ n(4, h = null);
1646
+ const F = await fetch(E.href, M);
1647
+ try {
1648
+ if (F.ok) {
1649
+ const T = await F.json();
1650
+ n(3, c = await J.toDataURL(JSON.stringify(T)));
1651
+ } else {
1652
+ const T = await F.json();
1653
+ n(4, h = B[T.Code] ?? "unexpectedError"), A();
1654
+ }
1655
+ } catch (T) {
1656
+ console.error(T), n(4, h = "failedToFetch"), A();
1657
+ } finally {
1658
+ n(2, w = !1);
1659
+ }
1660
+ };
1661
+ function S() {
1662
+ p !== null && clearInterval(p), p = setInterval(
1663
+ () => {
1664
+ m > 1 ? n(1, m -= 1) : (n(1, m = 0), n(2, w = !1), n(3, c = null), A());
1665
+ },
1666
+ 1e3
1667
+ );
1668
+ }
1669
+ function A() {
1670
+ p !== null && (clearInterval(p), p = null), n(1, m = 0);
1671
+ }
1672
+ Zt(() => {
1673
+ p !== null && clearInterval(p);
1674
+ });
1675
+ function N(E) {
1676
+ xt[E ? "unshift" : "push"](() => {
1677
+ d = E, n(0, d);
1678
+ });
1679
+ }
1680
+ return e.$$set = (E) => {
1681
+ "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, f = E.sessionid), "translationurl" in E && n(13, u = E.translationurl);
1682
+ }, e.$$.update = () => {
1683
+ e.$$.dirty & /*clientstyling, customStylingContainer*/
1684
+ 129 && r && d && $t(d, r), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
1685
+ 257 && i && d && te(d, i), e.$$.dirty & /*mbsource, customStylingContainer*/
1686
+ 513 && s && d && ee(d, `${s}.Style`, g), e.$$.dirty & /*lang*/
1687
+ 1024 && a && y(), e.$$.dirty & /*translationurl*/
1688
+ 8192 && u && C();
1689
+ }, [
1690
+ d,
1691
+ m,
1692
+ w,
1693
+ c,
1694
+ h,
1695
+ o,
1696
+ b,
1697
+ r,
1698
+ i,
1699
+ s,
1700
+ a,
1701
+ l,
1702
+ f,
1703
+ u,
1704
+ N
1705
+ ];
1706
+ }
1707
+ class $e extends Jt {
1708
+ constructor(t) {
1709
+ super(), Gt(
1710
+ this,
1711
+ t,
1712
+ xe,
1713
+ Xe,
1714
+ jt,
1715
+ {
1716
+ clientstyling: 7,
1717
+ clientstylingurl: 8,
1718
+ mbsource: 9,
1719
+ lang: 10,
1720
+ endpoint: 11,
1721
+ sessionid: 12,
1722
+ translationurl: 13
1723
+ },
1724
+ je
1725
+ );
1726
+ }
1727
+ get clientstyling() {
1728
+ return this.$$.ctx[7];
1729
+ }
1730
+ set clientstyling(t) {
1731
+ this.$$set({ clientstyling: t }), z();
1732
+ }
1733
+ get clientstylingurl() {
1734
+ return this.$$.ctx[8];
1735
+ }
1736
+ set clientstylingurl(t) {
1737
+ this.$$set({ clientstylingurl: t }), z();
1738
+ }
1739
+ get mbsource() {
1740
+ return this.$$.ctx[9];
1741
+ }
1742
+ set mbsource(t) {
1743
+ this.$$set({ mbsource: t }), z();
1744
+ }
1745
+ get lang() {
1746
+ return this.$$.ctx[10];
1747
+ }
1748
+ set lang(t) {
1749
+ this.$$set({ lang: t }), z();
1750
+ }
1751
+ get endpoint() {
1752
+ return this.$$.ctx[11];
1753
+ }
1754
+ set endpoint(t) {
1755
+ this.$$set({ endpoint: t }), z();
1756
+ }
1757
+ get sessionid() {
1758
+ return this.$$.ctx[12];
1759
+ }
1760
+ set sessionid(t) {
1761
+ this.$$set({ sessionid: t }), z();
1762
+ }
1763
+ get translationurl() {
1764
+ return this.$$.ctx[13];
1765
+ }
1766
+ set translationurl(t) {
1767
+ this.$$set({ translationurl: t }), z();
1768
+ }
1769
+ }
1770
+ ne($e, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, sessionid: {}, translationurl: {} }, [], [], !0);
1771
+ export {
1772
+ $e as default
1773
+ };