@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.
Files changed (110) hide show
  1. package/components/{GeneralLogout-WQPZo1XA.js → GeneralLogout-BewfWDIc.js} +1 -1
  2. package/components/{GeneralLogout-DwUKWQEM.cjs → GeneralLogout-C2y7Y1dE.cjs} +1 -1
  3. package/components/{GeneralLogout-RtZ56Nn3.js → GeneralLogout-Czvcegs5.js} +1 -1
  4. package/components/{PlayerAccountBettingHistory-CvFZhJr5.js → PlayerAccountBettingHistory-CM97TaVJ.js} +1 -1
  5. package/components/{PlayerAccountBettingHistory-B73xqRDd.cjs → PlayerAccountBettingHistory-DLSYtCZp.cjs} +1 -1
  6. package/components/{PlayerAccountBettingHistory-CmbPT188.js → PlayerAccountBettingHistory-s5znvIxt.js} +1 -1
  7. package/components/{PlayerAccountBiometrics-NfD7xlui.js → PlayerAccountBiometrics-BKYna6WA.js} +2 -2
  8. package/components/{PlayerAccountBiometrics-8QlKdliQ.cjs → PlayerAccountBiometrics-Qoytvaxy.cjs} +1 -1
  9. package/components/{PlayerAccountBiometrics-DPDH3rze.js → PlayerAccountBiometrics-h-dyAXxg.js} +2 -2
  10. package/components/{PlayerAccountBiometricsAction-DfVIWqGO.js → PlayerAccountBiometricsAction-BqGYtfNg.js} +1 -1
  11. package/components/{PlayerAccountBiometricsAction-oyPYqpGN.cjs → PlayerAccountBiometricsAction-ClGKS2gp.cjs} +1 -1
  12. package/components/{PlayerAccountBiometricsAction-Cerl0hxM.js → PlayerAccountBiometricsAction-DDXu8QXv.js} +1 -1
  13. package/components/{PlayerAccountClosure-wcTZTC1v.cjs → PlayerAccountClosure-BGsdGJU3.cjs} +1 -1
  14. package/components/{PlayerAccountClosure-DNkokDK1.js → PlayerAccountClosure-BssaJEGB.js} +1 -1
  15. package/components/{PlayerAccountClosure-CaVbfY7o.js → PlayerAccountClosure-PwcGFe0J.js} +1 -1
  16. package/components/{PlayerAccountController-DErgObNK.cjs → PlayerAccountController-DLXlZ6SW.cjs} +1 -1
  17. package/components/{PlayerAccountController-DG3KbTWa.js → PlayerAccountController-DsJ74Us2.js} +22 -22
  18. package/components/{PlayerAccountController-DyqNYFxa.js → PlayerAccountController-SntRT_hM.js} +22 -22
  19. package/components/{PlayerAccountGamingLimits-Dr2DFwJy.js → PlayerAccountGamingLimits-BBI62m2M.js} +2 -2
  20. package/components/{PlayerAccountGamingLimits-C92dYqb3.js → PlayerAccountGamingLimits-CTGgeEPm.js} +2 -2
  21. package/components/{PlayerAccountGamingLimits-Ur_9kp2o.cjs → PlayerAccountGamingLimits-_RZx_m5W.cjs} +1 -1
  22. package/components/{PlayerAccountGamingLimitsConfirmationModal-BdKrgcP9.cjs → PlayerAccountGamingLimitsConfirmationModal-CE01pg7P.cjs} +1 -1
  23. package/components/{PlayerAccountGamingLimitsConfirmationModal-JoLpq5Qd.js → PlayerAccountGamingLimitsConfirmationModal-CKwFrXcz.js} +1 -1
  24. package/components/{PlayerAccountGamingLimitsConfirmationModal-DzSs9Wlh.js → PlayerAccountGamingLimitsConfirmationModal-DFOcuwIh.js} +1 -1
  25. package/components/{PlayerAccountGamingLimitsGroupEdit-C61nqLfa.js → PlayerAccountGamingLimitsGroupEdit-6y04dYzq.js} +5 -5
  26. package/components/{PlayerAccountGamingLimitsGroupEdit-CQylV_LW.cjs → PlayerAccountGamingLimitsGroupEdit-CdkRwGIG.cjs} +1 -1
  27. package/components/{PlayerAccountGamingLimitsGroupEdit-CGPf2GzC.js → PlayerAccountGamingLimitsGroupEdit-DWC376x3.js} +5 -5
  28. package/components/{PlayerAccountGamingLimitsHistory2-DJ-Cjyp1.cjs → PlayerAccountGamingLimitsHistory2-BFKK_PHb.cjs} +1 -1
  29. package/components/{PlayerAccountGamingLimitsHistory2-BntJofdm.js → PlayerAccountGamingLimitsHistory2-CBEGaMY3.js} +1 -1
  30. package/components/{PlayerAccountGamingLimitsHistory2-CEqiSFnd.js → PlayerAccountGamingLimitsHistory2-ClfDvYz5.js} +1 -1
  31. package/components/{PlayerAccountGamingLimitsInfoCard-CZcelMtY.cjs → PlayerAccountGamingLimitsInfoCard-BhJtrPGf.cjs} +1 -1
  32. package/components/{PlayerAccountGamingLimitsInfoCard-Bzww1-RJ.js → PlayerAccountGamingLimitsInfoCard-CYBvAKAo.js} +4 -4
  33. package/components/{PlayerAccountGamingLimitsInfoCard-DnWRF2MA.js → PlayerAccountGamingLimitsInfoCard-DuAQqQMM.js} +4 -4
  34. package/components/{PlayerAccountGamingLimitsPage2Gm16-B-RLJAxy.js → PlayerAccountGamingLimitsPage2Gm16-BYzr5vwa.js} +1 -1
  35. package/components/{PlayerAccountGamingLimitsPage2Gm16-BIphnM6Y.js → PlayerAccountGamingLimitsPage2Gm16-C8uCJhKP.js} +1 -1
  36. package/components/{PlayerAccountGamingLimitsPage2Gm16-CNA7QruD.cjs → PlayerAccountGamingLimitsPage2Gm16-D7tAsvtX.cjs} +1 -1
  37. package/components/{PlayerAccountGamingLimitsPopup-CSLlyssM.js → PlayerAccountGamingLimitsPopup-B_ct-g3T.js} +1 -1
  38. package/components/{PlayerAccountGamingLimitsPopup-BdBRIFfU.js → PlayerAccountGamingLimitsPopup-CUDTCM1F.js} +1 -1
  39. package/components/{PlayerAccountGamingLimitsPopup-o3iv0A6x.cjs → PlayerAccountGamingLimitsPopup-D9_oGqEa.cjs} +1 -1
  40. package/components/{PlayerAccountGamingLimitsWrapper2-DcQHUkFT.cjs → PlayerAccountGamingLimitsWrapper2-BliP4ItH.cjs} +1 -1
  41. package/components/{PlayerAccountGamingLimitsWrapper2-DwZwd-hy.js → PlayerAccountGamingLimitsWrapper2-C2zg2CAI.js} +3 -3
  42. package/components/{PlayerAccountGamingLimitsWrapper2-05u-l372.js → PlayerAccountGamingLimitsWrapper2-D2BMF4mt.js} +3 -3
  43. package/components/{PlayerAccountGeneralConfirmationModal-CjKLQaHH.js → PlayerAccountGeneralConfirmationModal-B_t7QPdS.js} +1 -1
  44. package/components/{PlayerAccountGeneralConfirmationModal-BbGVvtLY.cjs → PlayerAccountGeneralConfirmationModal-BtbmIISI.cjs} +1 -1
  45. package/components/{PlayerAccountGeneralConfirmationModal-Cst4rd-S.js → PlayerAccountGeneralConfirmationModal-CqON6ro1.js} +1 -1
  46. package/components/{PlayerAccountMenu-CdjH1gEW.js → PlayerAccountMenu-D8cVhd2H.js} +2 -2
  47. package/components/{PlayerAccountMenu-Cr_HRHLF.js → PlayerAccountMenu-DQCrC-4R.js} +2 -2
  48. package/components/{PlayerAccountMenu-C3slbiux.cjs → PlayerAccountMenu-DnRhW9pN.cjs} +1 -1
  49. package/components/{PlayerAccountModal-u6LegtfR.cjs → PlayerAccountModal-BLW1ybcK.cjs} +1 -1
  50. package/components/{PlayerAccountModal-C6p2KI7k.js → PlayerAccountModal-CeP6yj14.js} +1 -1
  51. package/components/{PlayerAccountModal-BRWjYAGu.js → PlayerAccountModal-DpJNoelk.js} +1 -1
  52. package/components/{PlayerAccountNotifications-tWE-aFjO.js → PlayerAccountNotifications-BFcCZ7Zu.js} +1 -1
  53. package/components/{PlayerAccountNotifications-C2A1_LCL.js → PlayerAccountNotifications-CxHtpdNr.js} +1 -1
  54. package/components/{PlayerAccountNotifications-QFoWBKny.cjs → PlayerAccountNotifications-DbQdy81X.cjs} +1 -1
  55. package/components/{PlayerAccountProductRestriction-DkDbBfka.js → PlayerAccountProductRestriction-CZ7EoRjk.js} +3 -3
  56. package/components/{PlayerAccountProductRestriction-B0Ri7MHw.js → PlayerAccountProductRestriction-LMRzxRV2.js} +3 -3
  57. package/components/{PlayerAccountProductRestriction-HHHbDtlq.cjs → PlayerAccountProductRestriction-ktMW-ZvT.cjs} +1 -1
  58. package/components/{PlayerAccountReviewFrequency-DpI_eJta.js → PlayerAccountReviewFrequency-CfmK1Obu.js} +1 -1
  59. package/components/{PlayerAccountReviewFrequency-CV609scj.js → PlayerAccountReviewFrequency-DlpnpwkB.js} +1 -1
  60. package/components/{PlayerAccountReviewFrequency-D9TTXGcO.cjs → PlayerAccountReviewFrequency-DnabhObX.cjs} +1 -1
  61. package/components/{PlayerAccountSelfExclusion-B9-rTgYV.cjs → PlayerAccountSelfExclusion-0v1N8elD.cjs} +1 -1
  62. package/components/{PlayerAccountSelfExclusion-DoGu-Fe9.js → PlayerAccountSelfExclusion-CtIgMC0t.js} +2 -2
  63. package/components/{PlayerAccountSelfExclusion-B0jQ5C6c.js → PlayerAccountSelfExclusion-Jb_V4i6_.js} +2 -2
  64. package/components/{PlayerAccountTimeout-CJccgvCT.js → PlayerAccountTimeout-8fzk_RgK.js} +3 -3
  65. package/components/{PlayerAccountTimeout-ojIglJPR.js → PlayerAccountTimeout-B_rvinGm.js} +3 -3
  66. package/components/{PlayerAccountTimeout-Bi1R5_Rb.cjs → PlayerAccountTimeout-PUZUbjl5.cjs} +2 -2
  67. package/components/{PlayerAccountTransactionsHistory-Coa29LAd.js → PlayerAccountTransactionsHistory-Cmvap37J.js} +4 -4
  68. package/components/{PlayerAccountTransactionsHistory-DUwj5lNk.cjs → PlayerAccountTransactionsHistory-D4v46D-9.cjs} +1 -1
  69. package/components/{PlayerAccountTransactionsHistory-DjwLYkfj.js → PlayerAccountTransactionsHistory-DLu-55uY.js} +4 -4
  70. package/components/{PlayerActiveBonuses-BBeMkdSY.cjs → PlayerActiveBonuses-C1PpUxaU.cjs} +1 -1
  71. package/components/{PlayerActiveBonuses-Bx0uoqz4.js → PlayerActiveBonuses-DuONPq12.js} +2 -2
  72. package/components/{PlayerActiveBonuses-B65W7Wz0.js → PlayerActiveBonuses-xqjLxWxj.js} +2 -2
  73. package/components/{PlayerBonusCard-TMDOHvnL.cjs → PlayerBonusCard-BPekoz_J.cjs} +1 -1
  74. package/components/{PlayerBonusCard-CbkfDKjT.js → PlayerBonusCard-Cd4CFOvV.js} +2 -2
  75. package/components/{PlayerBonusCard-CqeLHQ0G.js → PlayerBonusCard-DjeuOIGK.js} +2 -2
  76. package/components/{PlayerBonusHistory-DwI1OKTw.js → PlayerBonusHistory-D--3LkB0.js} +2 -2
  77. package/components/{PlayerBonusHistory-7zvs9Ym9.js → PlayerBonusHistory-DU1SycKq.js} +2 -2
  78. package/components/{PlayerBonusHistory-Mjrhaj6a.cjs → PlayerBonusHistory-DgS2gdht.cjs} +1 -1
  79. package/components/{PlayerChangePassword-BmC4EyoL.cjs → PlayerChangePassword-B5XpvV9H.cjs} +1 -1
  80. package/components/{PlayerChangePassword-CfFZhaXQ.js → PlayerChangePassword-CLerFf5K.js} +1 -1
  81. package/components/{PlayerChangePassword-BqjLItv0.js → PlayerChangePassword-Dl-dCIpW.js} +1 -1
  82. package/components/{PlayerDeposit-Ba0qJRp2.js → PlayerDeposit-B-v03sTE.js} +1 -1
  83. package/components/{PlayerDeposit-o49phTHz.cjs → PlayerDeposit-b1W47bGW.cjs} +1 -1
  84. package/components/{PlayerDeposit-DP8bCOdN.js → PlayerDeposit-h04Mh6YW.js} +1 -1
  85. package/components/{PlayerGamingHistory-BgapmKYI.js → PlayerGamingHistory-Cv8-Rfzo.js} +3 -3
  86. package/components/{PlayerGamingHistory-DV6Slzt_.js → PlayerGamingHistory-DmKqCLau.js} +3 -3
  87. package/components/{PlayerGamingHistory-DvW-LsKl.cjs → PlayerGamingHistory-DsW9jT5y.cjs} +1 -1
  88. package/components/{PlayerPendingWithdrawals-HEjFhSrJ.cjs → PlayerPendingWithdrawals-DYzXY4hW.cjs} +1 -1
  89. package/components/{PlayerPendingWithdrawals-CedsWvDL.js → PlayerPendingWithdrawals-Dn8gpaSl.js} +1 -1
  90. package/components/{PlayerPendingWithdrawals-BZ62DYZ9.js → PlayerPendingWithdrawals-ZAMQ5qqB.js} +1 -1
  91. package/components/{PlayerProfileInfo-BDF3Bqtt.js → PlayerProfileInfo-B7dKfAe_.js} +3 -3
  92. package/components/{PlayerProfileInfo-DPDI61Mv.js → PlayerProfileInfo-BEMt39Gt.js} +3 -3
  93. package/components/{PlayerProfileInfo-DXVRL3lh.cjs → PlayerProfileInfo-DjD4E513.cjs} +1 -1
  94. package/components/{PlayerRealityCheck-DgPTeJe_.js → PlayerRealityCheck-B52w0x7t.js} +1 -1
  95. package/components/{PlayerRealityCheck-CMZtzPkR.cjs → PlayerRealityCheck-Bnyc-oHq.cjs} +1 -1
  96. package/components/{PlayerRealityCheck-CLVunEKT.js → PlayerRealityCheck-Dbzh832i.js} +1 -1
  97. package/components/{PlayerTransactionHistory-CHhOIZhh.js → PlayerTransactionHistory-B70UTWWR.js} +1 -1
  98. package/components/{PlayerTransactionHistory-S0lzcu95.js → PlayerTransactionHistory-C81SVMNQ.js} +1 -1
  99. package/components/{PlayerTransactionHistory-BEqLK737.cjs → PlayerTransactionHistory-D8Jy6PgB.cjs} +1 -1
  100. package/components/{PlayerWithdrawal-C46pCXyV.js → PlayerWithdrawal-C3SkDGS_.js} +1 -1
  101. package/components/{PlayerWithdrawal-DKCRQ9pT.cjs → PlayerWithdrawal-CJUkIcgA.cjs} +1 -1
  102. package/components/{PlayerWithdrawal-BqAC-Oq4.js → PlayerWithdrawal-DlCsEoDt.js} +1 -1
  103. package/components/{QrSessionGenerator-DgIh_dAl.js → QrSessionGenerator-BzNmvH-J.js} +463 -453
  104. package/components/QrSessionGenerator-DatUnp4r.cjs +8 -0
  105. package/components/{QrSessionGenerator-BkFSg0GV.js → QrSessionGenerator-hn3NvTO5.js} +441 -431
  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/components/QrSessionGenerator--jEOQTub.cjs +0 -8
@@ -0,0 +1,8 @@
1
+ "use strict";var Q=(e,t,n)=>new Promise((o,r)=>{var i=a=>{try{l(n.next(a))}catch(c){r(c)}},s=a=>{try{l(n.throw(a))}catch(c){r(c)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,s);l((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./PlayerAccountController-DLXlZ6SW.cjs");function pt(e,t){u.addMessages(e,t)}function Ot(e){u.$locale.set(e)}const Et={en:{titleQRSessionGenerator:"Scan the QR Code to access your account on retail devices.",generateQRButton:"Generate QR",unauthorized:"Authentication failed.",failedToFetch:"Cannot generate QR, Please try again.",unexpectedError:"Unexpected error occurred. Please try again later.",second:"s"},fr:{titleQRSessionGenerator:"Scannez le code QR pour accéder à votre compte sur les appareils en magasin.",generateQRButton:"Générer des QR",unauthorized:"L'authentification a échoué.",failedToFetch:"Impossible de générer le code QR, veuillez réessayer.",unexpectedError:"Une erreur inattendue s'est produite. Veuillez réessayer plus tard.",second:"s"}};var j={},Ht=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},St={},N={};let gt;const Qt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];N.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};N.getSymbolTotalCodewords=function(t){return Qt[t]};N.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};N.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');gt=t};N.isKanjiModeEnabled=function(){return typeof gt!="undefined"};N.toSJIS=function(t){return gt(t)};var $={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(o){return o&&typeof o.bit!="undefined"&&o.bit>=0&&o.bit<4},e.from=function(o,r){if(e.isValid(o))return o;try{return t(o)}catch(i){return r}}})($);function At(){this.buffer=[],this.length=0}At.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Kt=At;function G(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}G.prototype.set=function(e,t,n,o){const r=e*this.size+t;this.data[r]=n,o&&(this.reservedBit[r]=!0)};G.prototype.get=function(e,t){return this.data[e*this.size+t]};G.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};G.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Jt=G,Tt={};(function(e){const t=N.getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const r=Math.floor(o/7)+2,i=t(o),s=i===145?26:Math.ceil((i-13)/(2*r-2))*2,l=[i-7];for(let a=1;a<r-1;a++)l[a]=l[a-1]-s;return l.push(6),l.reverse()},e.getPositions=function(o){const r=[],i=e.getRowColCoords(o),s=i.length;for(let l=0;l<s;l++)for(let a=0;a<s;a++)l===0&&a===0||l===0&&a===s-1||l===s-1&&a===0||r.push([i[l],i[a]]);return r}})(Tt);var It={};const jt=N.getSymbolSize,Ct=7;It.getPositions=function(t){const n=jt(t);return[[0,0],[n-Ct,0],[0,n-Ct]]};var Nt={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const i=r.size;let s=0,l=0,a=0,c=null,d=null;for(let B=0;B<i;B++){l=a=0,c=d=null;for(let g=0;g<i;g++){let h=r.get(B,g);h===c?l++:(l>=5&&(s+=t.N1+(l-5)),c=h,l=1),h=r.get(g,B),h===d?a++:(a>=5&&(s+=t.N1+(a-5)),d=h,a=1)}l>=5&&(s+=t.N1+(l-5)),a>=5&&(s+=t.N1+(a-5))}return s},e.getPenaltyN2=function(r){const i=r.size;let s=0;for(let l=0;l<i-1;l++)for(let a=0;a<i-1;a++){const c=r.get(l,a)+r.get(l,a+1)+r.get(l+1,a)+r.get(l+1,a+1);(c===4||c===0)&&s++}return s*t.N2},e.getPenaltyN3=function(r){const i=r.size;let s=0,l=0,a=0;for(let c=0;c<i;c++){l=a=0;for(let d=0;d<i;d++)l=l<<1&2047|r.get(c,d),d>=10&&(l===1488||l===93)&&s++,a=a<<1&2047|r.get(d,c),d>=10&&(a===1488||a===93)&&s++}return s*t.N3},e.getPenaltyN4=function(r){let i=0;const s=r.data.length;for(let a=0;a<s;a++)i+=r.data[a];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function n(o,r,i){switch(o){case e.Patterns.PATTERN000:return(r+i)%2===0;case e.Patterns.PATTERN001:return r%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(r+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return r*i%2+r*i%3===0;case e.Patterns.PATTERN110:return(r*i%2+r*i%3)%2===0;case e.Patterns.PATTERN111:return(r*i%3+(r+i)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(r,i){const s=i.size;for(let l=0;l<s;l++)for(let a=0;a<s;a++)i.isReserved(a,l)||i.xor(a,l,n(r,a,l))},e.getBestMask=function(r,i){const s=Object.keys(e.Patterns).length;let l=0,a=1/0;for(let c=0;c<s;c++){i(c),e.applyMask(c,r);const d=e.getPenaltyN1(r)+e.getPenaltyN2(r)+e.getPenaltyN3(r)+e.getPenaltyN4(r);e.applyMask(c,r),d<a&&(a=d,l=c)}return l}})(Nt);var tt={};const L=$,Y=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],W=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];tt.getBlocksCount=function(t,n){switch(n){case L.L:return Y[(t-1)*4+0];case L.M:return Y[(t-1)*4+1];case L.Q:return Y[(t-1)*4+2];case L.H:return Y[(t-1)*4+3];default:return}};tt.getTotalCodewordsCount=function(t,n){switch(n){case L.L:return W[(t-1)*4+0];case L.M:return W[(t-1)*4+1];case L.Q:return W[(t-1)*4+2];case L.H:return W[(t-1)*4+3];default:return}};var Rt={},et={};const K=new Uint8Array(512),Z=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)K[n]=t,Z[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)K[n]=K[n-255]})();et.log=function(t){if(t<1)throw new Error("log("+t+")");return Z[t]};et.exp=function(t){return K[t]};et.mul=function(t,n){return t===0||n===0?0:K[Z[t]+Z[n]]};(function(e){const t=et;e.mul=function(o,r){const i=new Uint8Array(o.length+r.length-1);for(let s=0;s<o.length;s++)for(let l=0;l<r.length;l++)i[s+l]^=t.mul(o[s],r[l]);return i},e.mod=function(o,r){let i=new Uint8Array(o);for(;i.length-r.length>=0;){const s=i[0];for(let a=0;a<r.length;a++)i[a]^=t.mul(r[a],s);let l=0;for(;l<i.length&&i[l]===0;)l++;i=i.slice(l)}return i},e.generateECPolynomial=function(o){let r=new Uint8Array([1]);for(let i=0;i<o;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})(Rt);const Mt=Rt;function ht(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}ht.prototype.initialize=function(t){this.degree=t,this.genPoly=Mt.generateECPolynomial(this.degree)};ht.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const o=Mt.mod(n,this.genPoly),r=this.degree-o.length;if(r>0){const i=new Uint8Array(this.degree);return i.set(o,r),i}return o};var Gt=ht,_t={},U={},mt={};mt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var _={};const Pt="[0-9]+",qt="[A-Z $%*+\\-./:]+";let J="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";J=J.replace(/u/g,"\\u");const Yt="(?:(?![A-Z0-9 $%*+\\-./:]|"+J+`)(?:.|[\r
2
+ ]))+`;_.KANJI=new RegExp(J,"g");_.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_.BYTE=new RegExp(Yt,"g");_.NUMERIC=new RegExp(Pt,"g");_.ALPHANUMERIC=new RegExp(qt,"g");const Wt=new RegExp("^"+J+"$"),Xt=new RegExp("^"+Pt+"$"),Zt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_.testKanji=function(t){return Wt.test(t)};_.testNumeric=function(t){return Xt.test(t)};_.testAlphanumeric=function(t){return Zt.test(t)};(function(e){const t=mt,n=_;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return n.testNumeric(i)?e.NUMERIC:n.testAlphanumeric(i)?e.ALPHANUMERIC:n.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function o(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+r)}}e.from=function(i,s){if(e.isValid(i))return i;try{return o(i)}catch(l){return s}}})(U);(function(e){const t=N,n=tt,o=$,r=U,i=mt,s=7973,l=t.getBCHDigit(s);function a(g,h,m){for(let w=1;w<=40;w++)if(h<=e.getCapacity(w,m,g))return w}function c(g,h){return r.getCharCountIndicator(g,h)+4}function d(g,h){let m=0;return g.forEach(function(w){const b=c(w.mode,h);m+=b+w.getBitsLength()}),m}function B(g,h){for(let m=1;m<=40;m++)if(d(g,m)<=e.getCapacity(m,h,r.MIXED))return m}e.from=function(h,m){return i.isValid(h)?parseInt(h,10):m},e.getCapacity=function(h,m,w){if(!i.isValid(h))throw new Error("Invalid QR Code version");typeof w=="undefined"&&(w=r.BYTE);const b=t.getSymbolTotalCodewords(h),f=n.getTotalCodewordsCount(h,m),y=(b-f)*8;if(w===r.MIXED)return y;const E=y-c(w,h);switch(w){case r.NUMERIC:return Math.floor(E/10*3);case r.ALPHANUMERIC:return Math.floor(E/11*2);case r.KANJI:return Math.floor(E/13);case r.BYTE:default:return Math.floor(E/8)}},e.getBestVersionForData=function(h,m){let w;const b=o.from(m,o.M);if(Array.isArray(h)){if(h.length>1)return B(h,b);if(h.length===0)return 1;w=h[0]}else w=h;return a(w.mode,w.getLength(),b)},e.getEncodedBits=function(h){if(!i.isValid(h)||h<7)throw new Error("Invalid QR Code version");let m=h<<12;for(;t.getBCHDigit(m)-l>=0;)m^=s<<t.getBCHDigit(m)-l;return h<<12|m}})(_t);var Lt={};const ut=N,Ut=1335,xt=21522,bt=ut.getBCHDigit(Ut);Lt.getEncodedBits=function(t,n){const o=t.bit<<3|n;let r=o<<10;for(;ut.getBCHDigit(r)-bt>=0;)r^=Ut<<ut.getBCHDigit(r)-bt;return(o<<10|r)^xt};var Dt={};const $t=U;function D(e){this.mode=$t.NUMERIC,this.data=e.toString()}D.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(t){let n,o,r;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),r=parseInt(o,10),t.put(r,10);const i=this.data.length-n;i>0&&(o=this.data.substr(n),r=parseInt(o,10),t.put(r,i*3+1))};var te=D;const ee=U,ot=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function k(e){this.mode=ee.ALPHANUMERIC,this.data=e}k.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};k.prototype.getLength=function(){return this.data.length};k.prototype.getBitsLength=function(){return k.getBitsLength(this.data.length)};k.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let o=ot.indexOf(this.data[n])*45;o+=ot.indexOf(this.data[n+1]),t.put(o,11)}this.data.length%2&&t.put(ot.indexOf(this.data[n]),6)};var ne=k;const re=U;function F(e){this.mode=re.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}F.getBitsLength=function(t){return t*8};F.prototype.getLength=function(){return this.data.length};F.prototype.getBitsLength=function(){return F.getBitsLength(this.data.length)};F.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var oe=F;const ie=U,se=N;function z(e){this.mode=ie.KANJI,this.data=e}z.getBitsLength=function(t){return t*13};z.prototype.getLength=function(){return this.data.length};z.prototype.getBitsLength=function(){return z.getBitsLength(this.data.length)};z.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=se.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
3
+ Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var ae=z,kt={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,o,r){var i={},s={};s[o]=0;var l=t.PriorityQueue.make();l.push(o,0);for(var a,c,d,B,g,h,m,w,b;!l.empty();){a=l.pop(),c=a.value,B=a.cost,g=n[c]||{};for(d in g)g.hasOwnProperty(d)&&(h=g[d],m=B+h,w=s[d],b=typeof s[d]=="undefined",(b||w>m)&&(s[d]=m,l.push(d,m),i[d]=c))}if(typeof r!="undefined"&&typeof s[r]=="undefined"){var f=["Could not find a path from ",o," to ",r,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(n,o){for(var r=[],i=o;i;)r.push(i),n[i],i=n[i];return r.reverse(),r},find_path:function(n,o,r){var i=t.single_source_shortest_paths(n,o,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(n){var o=t.PriorityQueue,r={},i;n=n||{};for(i in o)o.hasOwnProperty(i)&&(r[i]=o[i]);return r.queue=[],r.sorter=n.sorter||o.default_sorter,r},default_sorter:function(n,o){return n.cost-o.cost},push:function(n,o){var r={value:n,cost:o};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(kt);var le=kt.exports;(function(e){const t=U,n=te,o=ne,r=oe,i=ae,s=_,l=N,a=le;function c(f){return unescape(encodeURIComponent(f)).length}function d(f,y,E){const p=[];let S;for(;(S=f.exec(E))!==null;)p.push({data:S[0],index:S.index,mode:y,length:S[0].length});return p}function B(f){const y=d(s.NUMERIC,t.NUMERIC,f),E=d(s.ALPHANUMERIC,t.ALPHANUMERIC,f);let p,S;return l.isKanjiModeEnabled()?(p=d(s.BYTE,t.BYTE,f),S=d(s.KANJI,t.KANJI,f)):(p=d(s.BYTE_KANJI,t.BYTE,f),S=[]),y.concat(E,p,S).sort(function(T,I){return T.index-I.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.length}})}function g(f,y){switch(y){case t.NUMERIC:return n.getBitsLength(f);case t.ALPHANUMERIC:return o.getBitsLength(f);case t.KANJI:return i.getBitsLength(f);case t.BYTE:return r.getBitsLength(f)}}function h(f){return f.reduce(function(y,E){const p=y.length-1>=0?y[y.length-1]:null;return p&&p.mode===E.mode?(y[y.length-1].data+=E.data,y):(y.push(E),y)},[])}function m(f){const y=[];for(let E=0;E<f.length;E++){const p=f[E];switch(p.mode){case t.NUMERIC:y.push([p,{data:p.data,mode:t.ALPHANUMERIC,length:p.length},{data:p.data,mode:t.BYTE,length:p.length}]);break;case t.ALPHANUMERIC:y.push([p,{data:p.data,mode:t.BYTE,length:p.length}]);break;case t.KANJI:y.push([p,{data:p.data,mode:t.BYTE,length:c(p.data)}]);break;case t.BYTE:y.push([{data:p.data,mode:t.BYTE,length:c(p.data)}])}}return y}function w(f,y){const E={},p={start:{}};let S=["start"];for(let A=0;A<f.length;A++){const T=f[A],I=[];for(let R=0;R<T.length;R++){const M=T[R],P=""+A+R;I.push(P),E[P]={node:M,lastCount:0},p[P]={};for(let v=0;v<S.length;v++){const C=S[v];E[C]&&E[C].node.mode===M.mode?(p[C][P]=g(E[C].lastCount+M.length,M.mode)-g(E[C].lastCount,M.mode),E[C].lastCount+=M.length):(E[C]&&(E[C].lastCount=M.length),p[C][P]=g(M.length,M.mode)+4+t.getCharCountIndicator(M.mode,y))}}S=I}for(let A=0;A<S.length;A++)p[S[A]].end=0;return{map:p,table:E}}function b(f,y){let E;const p=t.getBestModeForData(f);if(E=t.from(y,p),E!==t.BYTE&&E.bit<p.bit)throw new Error('"'+f+'" cannot be encoded with mode '+t.toString(E)+`.
4
+ Suggested mode is: `+t.toString(p));switch(E===t.KANJI&&!l.isKanjiModeEnabled()&&(E=t.BYTE),E){case t.NUMERIC:return new n(f);case t.ALPHANUMERIC:return new o(f);case t.KANJI:return new i(f);case t.BYTE:return new r(f)}}e.fromArray=function(y){return y.reduce(function(E,p){return typeof p=="string"?E.push(b(p,null)):p.data&&E.push(b(p.data,p.mode)),E},[])},e.fromString=function(y,E){const p=B(y,l.isKanjiModeEnabled()),S=m(p),A=w(S,E),T=a.find_path(A.map,"start","end"),I=[];for(let R=1;R<T.length-1;R++)I.push(A.table[T[R]].node);return e.fromArray(h(I))},e.rawSplit=function(y){return e.fromArray(B(y,l.isKanjiModeEnabled()))}})(Dt);const nt=N,it=$,ue=Kt,ce=Jt,fe=Tt,de=It,ct=Nt,ft=tt,ge=Gt,x=_t,he=Lt,me=U,st=Dt;function we(e,t){const n=e.size,o=de.getPositions(t);for(let r=0;r<o.length;r++){const i=o[r][0],s=o[r][1];for(let l=-1;l<=7;l++)if(!(i+l<=-1||n<=i+l))for(let a=-1;a<=7;a++)s+a<=-1||n<=s+a||(l>=0&&l<=6&&(a===0||a===6)||a>=0&&a<=6&&(l===0||l===6)||l>=2&&l<=4&&a>=2&&a<=4?e.set(i+l,s+a,!0,!0):e.set(i+l,s+a,!1,!0))}}function ye(e){const t=e.size;for(let n=8;n<t-8;n++){const o=n%2===0;e.set(n,6,o,!0),e.set(6,n,o,!0)}}function pe(e,t){const n=fe.getPositions(t);for(let o=0;o<n.length;o++){const r=n[o][0],i=n[o][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?e.set(r+s,i+l,!0,!0):e.set(r+s,i+l,!1,!0)}}function Ee(e,t){const n=e.size,o=x.getEncodedBits(t);let r,i,s;for(let l=0;l<18;l++)r=Math.floor(l/3),i=l%3+n-8-3,s=(o>>l&1)===1,e.set(r,i,s,!0),e.set(i,r,s,!0)}function at(e,t,n){const o=e.size,r=he.getEncodedBits(t,n);let i,s;for(i=0;i<15;i++)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);e.set(o-8,8,1,!0)}function Ce(e,t){const n=e.size;let o=-1,r=n-1,i=7,s=0;for(let l=n-1;l>0;l-=2)for(l===6&&l--;;){for(let a=0;a<2;a++)if(!e.isReserved(r,l-a)){let c=!1;s<t.length&&(c=(t[s]>>>i&1)===1),e.set(r,l-a,c),i--,i===-1&&(s++,i=7)}if(r+=o,r<0||n<=r){r-=o,o=-o;break}}}function be(e,t,n){const o=new ue;n.forEach(function(a){o.put(a.mode.bit,4),o.put(a.getLength(),me.getCharCountIndicator(a.mode,e)),a.write(o)});const r=nt.getSymbolTotalCodewords(e),i=ft.getTotalCodewordsCount(e,t),s=(r-i)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const l=(s-o.getLengthInBits())/8;for(let a=0;a<l;a++)o.put(a%2?17:236,8);return Be(o,e,t)}function Be(e,t,n){const o=nt.getSymbolTotalCodewords(t),r=ft.getTotalCodewordsCount(t,n),i=o-r,s=ft.getBlocksCount(t,n),l=o%s,a=s-l,c=Math.floor(o/s),d=Math.floor(i/s),B=d+1,g=c-d,h=new ge(g);let m=0;const w=new Array(s),b=new Array(s);let f=0;const y=new Uint8Array(e.buffer);for(let T=0;T<s;T++){const I=T<a?d:B;w[T]=y.slice(m,m+I),b[T]=h.encode(w[T]),m+=I,f=Math.max(f,I)}const E=new Uint8Array(o);let p=0,S,A;for(S=0;S<f;S++)for(A=0;A<s;A++)S<w[A].length&&(E[p++]=w[A][S]);for(S=0;S<g;S++)for(A=0;A<s;A++)E[p++]=b[A][S];return E}function Se(e,t,n,o){let r;if(Array.isArray(e))r=st.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const d=st.rawSplit(e);c=x.getBestVersionForData(d,n)}r=st.fromString(e,c||40)}else throw new Error("Invalid data");const i=x.getBestVersionForData(r,n);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=i;else if(t<i)throw new Error(`
5
+ The chosen QR Code version cannot contain this amount of data.
6
+ Minimum version required to store current data is: `+i+`.
7
+ `);const s=be(t,n,r),l=nt.getSymbolSize(t),a=new ce(l);return we(a,t),ye(a),pe(a,t),at(a,n,0),t>=7&&Ee(a,t),Ce(a,s),isNaN(o)&&(o=ct.getBestMask(a,at.bind(null,a,n))),ct.applyMask(o,a),at(a,n,o),{modules:a,version:t,errorCorrectionLevel:n,maskPattern:o,segments:r}}St.create=function(t,n){if(typeof t=="undefined"||t==="")throw new Error("No input text");let o=it.M,r,i;return typeof n!="undefined"&&(o=it.from(n.errorCorrectionLevel,it.M),r=x.from(n.version),i=ct.from(n.maskPattern),n.toSJISFunc&&nt.setToSJISFunction(n.toSJISFunc)),Se(t,r,o,i)};var Ft={},wt={};(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let o=n.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+n);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");const r=parseInt(o.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+o.slice(0,6).join("")}}e.getOptions=function(o){o||(o={}),o.color||(o.color={});const r=typeof o.margin=="undefined"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:i,scale:i?4:s,margin:r,color:{dark:t(o.color.dark||"#000000ff"),light:t(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},e.getScale=function(o,r){return r.width&&r.width>=o+r.margin*2?r.width/(o+r.margin*2):r.scale},e.getImageWidth=function(o,r){const i=e.getScale(o,r);return Math.floor((o+r.margin*2)*i)},e.qrToImageData=function(o,r,i){const s=r.modules.size,l=r.modules.data,a=e.getScale(s,i),c=Math.floor((s+i.margin*2)*a),d=i.margin*a,B=[i.color.light,i.color.dark];for(let g=0;g<c;g++)for(let h=0;h<c;h++){let m=(g*c+h)*4,w=i.color.light;if(g>=d&&h>=d&&g<c-d&&h<c-d){const b=Math.floor((g-d)/a),f=Math.floor((h-d)/a);w=B[l[b*s+f]?1:0]}o[m++]=w.r,o[m++]=w.g,o[m++]=w.b,o[m]=w.a}}})(wt);(function(e){const t=wt;function n(r,i,s){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"}function o(){try{return document.createElement("canvas")}catch(r){throw new Error("You need to specify a canvas element")}}e.render=function(i,s,l){let a=l,c=s;typeof a=="undefined"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(c=o()),a=t.getOptions(a);const d=t.getImageWidth(i.modules.size,a),B=c.getContext("2d"),g=B.createImageData(d,d);return t.qrToImageData(g.data,i,a),n(B,c,d),B.putImageData(g,0,0),c},e.renderToDataURL=function(i,s,l){let a=l;typeof a=="undefined"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const c=e.render(i,s,a),d=a.type||"image/png",B=a.rendererOpts||{};return c.toDataURL(d,B.quality)}})(Ft);var zt={};const Ae=wt;function Bt(e,t){const n=e.a/255,o=t+'="'+e.hex+'"';return n<1?o+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':o}function lt(e,t,n){let o=e+t;return typeof n!="undefined"&&(o+=" "+n),o}function Te(e,t,n){let o="",r=0,i=!1,s=0;for(let l=0;l<e.length;l++){const a=Math.floor(l%t),c=Math.floor(l/t);!a&&!i&&(i=!0),e[l]?(s++,l>0&&a>0&&e[l-1]||(o+=i?lt("M",a+n,.5+c+n):lt("m",r,0),r=0,i=!1),a+1<t&&e[l+1]||(o+=lt("h",s),s=0)):r++}return o}zt.render=function(t,n,o){const r=Ae.getOptions(n),i=t.modules.size,s=t.modules.data,l=i+r.margin*2,a=r.color.light.a?"<path "+Bt(r.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",c="<path "+Bt(r.color.dark,"stroke")+' d="'+Te(s,i,r.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+d+' shape-rendering="crispEdges">'+a+c+`</svg>
8
+ `;return typeof o=="function"&&o(null,g),g};const Ie=Ht,dt=St,vt=Ft,Ne=zt;function yt(e,t,n,o,r){const i=[].slice.call(arguments,1),s=i.length,l=typeof i[s-1]=="function";if(!l&&!Ie())throw new Error("Callback required as last argument");if(l){if(s<2)throw new Error("Too few arguments provided");s===2?(r=n,n=t,t=o=void 0):s===3&&(t.getContext&&typeof r=="undefined"?(r=o,o=void 0):(r=o,o=n,n=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=t,t=o=void 0):s===2&&!t.getContext&&(o=n,n=t,t=void 0),new Promise(function(a,c){try{const d=dt.create(n,o);a(e(d,t,o))}catch(d){c(d)}})}try{const a=dt.create(n,o);r(null,e(a,t,o))}catch(a){r(a)}}j.create=dt.create;j.toCanvas=yt.bind(null,vt.render);j.toDataURL=yt.bind(null,vt.renderToDataURL);j.toString=yt.bind(null,function(e,t,n){return Ne.render(e,n)});var X=(e=>(e.unauthorizedError="unauthorized",e.unexpectedError="unexpectedError",e.failedToFetch="failedToFetch",e))(X||{});function Re(e){u.append_styles(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)}}')}function Me(e){let t,n,o;return{c(){t=u.element("div"),n=u.element("img"),u.attr(n,"class","qr-image"),u.src_url_equal(n.src,o=e[3])||u.attr(n,"src",o),u.attr(n,"alt","qr-session-login"),u.attr(t,"class","qr-section")},m(r,i){u.insert(r,t,i),u.append(t,n)},p(r,i){i&8&&!u.src_url_equal(n.src,o=r[3])&&u.attr(n,"src",o)},d(r){r&&u.detach(t)}}}function _e(e){let t;return{c(){t=u.element("div"),u.attr(t,"class","LoadingSpinner")},m(n,o){u.insert(n,t,o)},p:u.noop,d(n){n&&u.detach(t)}}}function Pe(e){let t,n=e[5](e[4])+"",o;return{c(){t=u.element("p"),o=u.text(n),u.attr(t,"class","generate-qr-error-message")},m(r,i){u.insert(r,t,i),u.append(t,o)},p(r,i){i&48&&n!==(n=r[5](r[4])+"")&&u.set_data(o,n)},d(r){r&&u.detach(t)}}}function Le(e){let t,n,o,r=e[5]("titleQRSessionGenerator")+"",i,s,l,a=(e[1]>0?`${e[1]}${e[5]("second")}`:e[5]("generateQRButton"))+"",c,d,B,g,h;function m(f,y){if(f[4])return Pe;if(f[2])return _e;if(f[3])return Me}let w=m(e),b=w&&w(e);return{c(){t=u.element("div"),n=u.element("div"),o=u.element("p"),i=u.text(r),s=u.space(),l=u.element("button"),c=u.text(a),B=u.space(),b&&b.c(),u.attr(l,"class","generate-qr-btn"),l.disabled=d=e[2]||e[1]>0,u.attr(n,"class","qr-session-generator")},m(f,y){u.insert(f,t,y),u.append(t,n),u.append(n,o),u.append(o,i),u.append(n,s),u.append(n,l),u.append(l,c),u.append(n,B),b&&b.m(n,null),e[14](t),g||(h=u.listen(l,"click",e[6]),g=!0)},p(f,[y]){y&32&&r!==(r=f[5]("titleQRSessionGenerator")+"")&&u.set_data(i,r),y&34&&a!==(a=(f[1]>0?`${f[1]}${f[5]("second")}`:f[5]("generateQRButton"))+"")&&u.set_data(c,a),y&6&&d!==(d=f[2]||f[1]>0)&&(l.disabled=d),w===(w=m(f))&&b?b.p(f,y):(b&&b.d(1),b=w&&w(f),b&&(b.c(),b.m(n,null)))},i:u.noop,o:u.noop,d(f){f&&u.detach(t),b&&b.d(),e[14](null),g=!1,h()}}}const Ue=60,De=1e3;function ke(e,t,n){let o;u.component_subscribe(e,u.$format,C=>n(5,o=C));let{clientstyling:r=""}=t,{clientstylingurl:i=""}=t,{mbsource:s}=t,{lang:l="en"}=t,{endpoint:a=""}=t,{sessionid:c}=t,{translationurl:d}=t;const B={"gm.norway.unauthorized":X.unauthorizedError};let g,h,m=0,w=!1,b=null,f=null,y=null;const E=()=>Q(this,null,function*(){const C=d;try{const q=yield(yield fetch(C)).json();Object.keys(q).forEach(O=>{pt(O,q[O])})}catch(V){console.error(V)}});Object.keys(Et).forEach(C=>{pt(C,Et[C])});const p=()=>{Ot(l)},S=C=>Q(this,null,function*(){n(3,f=yield j.toDataURL(C))}),A=C=>{n(4,y=C),P()},T=()=>Q(this,null,function*(){var O;const C=new URL(`${a}/api/pam/v1/qr/authenticate`),V=new Headers;V.append("X-SessionID",c);const q={method:"POST",headers:V};try{const H=yield fetch(C.href,q);if(H.ok){const rt=yield H.json();yield S(JSON.stringify(rt))}else{const rt=yield H.json();A((O=B[rt.Code])!=null?O:X.unexpectedError)}}catch(H){console.error(H),A(X.failedToFetch)}finally{n(2,w=!1)}}),I=()=>Q(this,null,function*(){w||m>0||(n(2,w=!0),n(4,y=null),n(3,f=null),n(1,m=Ue),M(),yield T())});function R(){b!==null&&clearInterval(b)}function M(){R(),b=setInterval(()=>{m>1?n(1,m-=1):(n(1,m=0),n(2,w=!1),n(3,f=null),P())},De)}function P(){R(),b=null,n(1,m=0)}u.onDestroy(()=>{R()});function v(C){u.binding_callbacks[C?"unshift":"push"](()=>{g=C,n(0,g)})}return e.$$set=C=>{"clientstyling"in C&&n(7,r=C.clientstyling),"clientstylingurl"in C&&n(8,i=C.clientstylingurl),"mbsource"in C&&n(9,s=C.mbsource),"lang"in C&&n(10,l=C.lang),"endpoint"in C&&n(11,a=C.endpoint),"sessionid"in C&&n(12,c=C.sessionid),"translationurl"in C&&n(13,d=C.translationurl)},e.$$.update=()=>{e.$$.dirty&129&&r&&g&&u.setClientStyling(g,r),e.$$.dirty&257&&i&&g&&u.setClientStylingURL(g,i),e.$$.dirty&513&&s&&g&&u.setStreamStyling(g,`${s}.Style`,h),e.$$.dirty&1024&&l&&p(),e.$$.dirty&8192&&d&&E()},[g,m,w,f,y,o,I,r,i,s,l,a,c,d,v]}class Vt extends u.SvelteComponent{constructor(t){super(),u.init(this,t,ke,Le,u.safe_not_equal,{clientstyling:7,clientstylingurl:8,mbsource:9,lang:10,endpoint:11,sessionid:12,translationurl:13},Re)}get clientstyling(){return this.$$.ctx[7]}set clientstyling(t){this.$$set({clientstyling:t}),u.flush()}get clientstylingurl(){return this.$$.ctx[8]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),u.flush()}get mbsource(){return this.$$.ctx[9]}set mbsource(t){this.$$set({mbsource:t}),u.flush()}get lang(){return this.$$.ctx[10]}set lang(t){this.$$set({lang:t}),u.flush()}get endpoint(){return this.$$.ctx[11]}set endpoint(t){this.$$set({endpoint:t}),u.flush()}get sessionid(){return this.$$.ctx[12]}set sessionid(t){this.$$set({sessionid:t}),u.flush()}get translationurl(){return this.$$.ctx[13]}set translationurl(t){this.$$set({translationurl:t}),u.flush()}}u.create_custom_element(Vt,{clientstyling:{},clientstylingurl:{},mbsource:{},lang:{},endpoint:{},sessionid:{},translationurl:{}},[],[],!0);exports.default=Vt;