@gataca/qr 2.0.14 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/gataca-autoqr.cjs.entry.js +5 -5
- package/dist/cjs/gataca-qr_2.cjs.entry.js +6 -19
- package/dist/cjs/gataca-qrws.cjs.entry.js +6 -18
- package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +197 -13
- package/dist/cjs/gatacaqr.cjs.js +3 -7
- package/dist/cjs/{index-f214ab7a.js → index-93d47a75.js} +2 -111
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +5 -5
- package/dist/collection/components/gataca-qr/gataca-qr.js +13 -26
- package/dist/collection/components/gataca-qrws/gataca-qrws.js +12 -24
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +259 -19
- package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +9 -9
- package/dist/components/gataca-autoqr.js +4 -4
- package/dist/components/gataca-qr2.js +6 -19
- package/dist/components/gataca-qrws2.js +6 -18
- package/dist/components/gataca-ssibutton2.js +203 -12
- package/dist/components/gataca-ssibuttonws2.js +3 -3
- package/dist/components/index.d.ts +0 -9
- package/dist/components/index.js +1 -1
- package/dist/esm/gataca-autoqr.entry.js +5 -5
- package/dist/esm/gataca-qr_2.entry.js +6 -19
- package/dist/esm/gataca-qrws.entry.js +6 -18
- package/dist/esm/gataca-ssibutton_2.entry.js +197 -13
- package/dist/esm/gatacaqr.js +3 -4
- package/dist/esm/{index-570c9813.js → index-2be54f32.js} +3 -111
- package/dist/esm/loader.js +3 -4
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/gatacaqr/gatacaqr.esm.js +1 -1
- package/dist/gatacaqr/p-0381ab9a.entry.js +1 -0
- package/dist/gatacaqr/p-0be4566d.js +1 -1
- package/dist/gatacaqr/p-16298cb4.entry.js +1 -0
- package/dist/gatacaqr/p-5ae5f952.js +2 -0
- package/dist/gatacaqr/p-761647d3.entry.js +1 -0
- package/dist/gatacaqr/p-9e9af27e.entry.js +1 -0
- package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +2 -2
- package/dist/types/components/gataca-qr/components/qr/QR.d.ts +1 -1
- package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +1 -1
- package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +1 -1
- package/dist/types/components/gataca-qr/components/success/Success.d.ts +1 -1
- package/dist/types/components/gataca-qr/gataca-qr.d.ts +4 -4
- package/dist/types/components/gataca-qrws/components/qr/QR.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/readQR/ReadQR.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/retryButton/RetryButton.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/success/Success.d.ts +1 -1
- package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +3 -3
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +29 -5
- package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +2 -2
- package/dist/types/components.d.ts +38 -22
- package/dist/types/stencil-public-runtime.d.ts +3 -59
- package/dist/types/utils/utils.d.ts +9 -9
- package/loader/index.d.ts +0 -9
- package/package.json +2 -2
- package/readme.md +2 -0
- package/dist/gatacaqr/p-3d1a6526.entry.js +0 -1
- package/dist/gatacaqr/p-64740141.entry.js +0 -1
- package/dist/gatacaqr/p-bd6bd52f.entry.js +0 -1
- package/dist/gatacaqr/p-ec0f00a6.js +0 -2
- package/dist/gatacaqr/p-f9931de0.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-
|
|
1
|
+
import{p as e,b as a}from"./p-5ae5f952.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-16298cb4",[[1,"gataca-qr",{checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],autostart:[4],autorefresh:[4],v:[1],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideModalTexts:[4,"hide-modal-texts"],hideModalBoxShadow:[4,"hide-modal-box-shadow"],hideBrandTitle:[4,"hide-brand-title"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrSize:[2,"qr-size"],modalWidth:[2,"modal-width"],modalHeight:[2,"modal-height"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],readQrTitle:[1,"read-qr-title"],readQrDescription:[1,"read-qr-description"],hideQrModalDescription:[4,"hide-qr-modal-description"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]}],[0,"gataca-qrdisplay",{qrData:[1,"qr-data"],size:[2],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrColor:[1,"qr-color"],rounded:[4]}]]],["p-9e9af27e",[[1,"gataca-qrws",{successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v:[1],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideModalTexts:[4,"hide-modal-texts"],hideModalBoxShadow:[4,"hide-modal-box-shadow"],hideBrandTitle:[4,"hide-brand-title"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrSize:[2,"qr-size"],modalWidth:[2,"modal-width"],modalHeight:[2,"modal-height"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],readQrTitle:[1,"read-qr-title"],readQrDescription:[1,"read-qr-description"],hideQrModalDescription:[4,"hide-qr-modal-description"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["p-761647d3",[[1,"gataca-ssibutton",{buttonText:[1,"button-text"],checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],handleCheckAppLoading:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],autorefresh:[4],v:[1],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],hideQrModalDescription:[4,"hide-qr-modal-description"],open:[32],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],getSessionData:[64],startMobilePolling:[64],stop:[64]}],[1,"gataca-ssibuttonws",{buttonText:[1,"button-text"],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v:[1],qrModalTitle:[1,"qr-modal-title"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],open:[32],getSessionData:[64]}]]],["p-0381ab9a",[[1,"gataca-autoqr",{configId:[1,"config-id"],configRepository:[1,"config-repository"],successCallback:[16],errorCallback:[16],checkStatus:[16],createSession:[16],wsOnOpen:[16],wsOnMessage:[16],config:[32],loading:[32],getSessionData:[64]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-5ae5f952.js";const e=t=>{if(t)return new Function("return "+t)()},a=class{constructor(s){t(this,s),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(this,"gatacaLoginFailed",7),this.configId=void 0,this.configRepository="https://studio.gataca.io/api/v1/qrconfigs",this.successCallback=void 0,this.errorCallback=void 0,this.checkStatus=void 0,this.createSession=void 0,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.config=void 0,this.loading=void 0,this.loading=!0,fetch(this.configRepository+"/"+this.configId,{method:"GET",headers:{"Content-Type":"application/json"}}).then((t=>{t.json().then((t=>{t=(t=>{var i,s,a,o,r,n;return t.errorCallback=e(null===(i=t.errorCallback)||void 0===i?void 0:i.toString()),t.successCallback=e(null===(s=t.successCallback)||void 0===s?void 0:s.toString()),t.wsOnMessage=e(null===(a=t.wsOnMessage)||void 0===a?void 0:a.toString()),t.wsOnOpen=e(null===(o=t.wsOnOpen)||void 0===o?void 0:o.toString()),t.checkStatus=e(null===(r=t.checkStatus)||void 0===r?void 0:r.toString()),t.createSession=e(null===(n=t.createSession)||void 0===n?void 0:n.toString()),t})(t),this.config=t,this.loading=!1})).catch((t=>{console.log("Cannot retrieve selected config",t),this.loading=!1}))})).catch((t=>{console.log("Cannot retrieve selected config",t),this.loading=!1}))}async getSessionData(){return this.qr.getSessionData()}selectQR(){this.qr=this.config.useButton?this.config.useWs?s("gataca-ssibuttonws",{buttonText:this.config.buttonText,wsOnMessage:this.wsOnMessage||this.config.wsOnMessage,wsOnOpen:this.wsOnOpen||this.config.wsOnOpen,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,socketEndpoint:this.config.socketEndpoint,autostart:!0,autorefresh:this.config.autorefresh,v:this.config.v,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink}):s("gataca-ssibutton",{buttonText:this.config.buttonText,checkStatus:this.checkStatus||this.config.checkStatus,createSession:this.createSession||this.config.createSession,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,pollingFrequency:this.config.pollingFrequency,autorefresh:this.config.autorefresh,v:this.config.v,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink}):this.config.useWs?s("gataca-qrws",{wsOnMessage:this.wsOnMessage||this.config.wsOnMessage,wsOnOpen:this.wsOnOpen||this.config.wsOnOpen,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,socketEndpoint:this.config.socketEndpoint,autostart:this.config.autostart,autorefresh:this.config.autorefresh,v:this.config.v,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink}):s("gataca-qr",{checkStatus:this.checkStatus||this.config.checkStatus,createSession:this.createSession||this.config.createSession,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,pollingFrequency:this.config.pollingFrequency,autostart:this.config.autostart,autorefresh:this.config.autorefresh,v:this.config.v,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink})}render(){return this.loading?s("div",null,"Loading..."):this.config?(this.selectQR(),this.qr):s("div",null,"Error loading your config...")}};a.style='@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:"Work Sans", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:"Helvetica Neue", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}';export{a as gataca_autoqr}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r,n,i=(r=function(t){self,t.exports=(()=>{var t={192:(t,r)=>{var n,i,o=function(){var t=function(t,r){var n=t,i=a[r],o=null,e=0,f=null,g=[],p={},m=function(t,r){o=function(t){for(var r=new Array(t),n=0;n<t;n+=1){r[n]=new Array(t);for(var i=0;i<t;i+=1)r[n][i]=null}return r}(e=4*n+17),M(0,0),M(e-7,0),M(0,e-7),x(),b(),k(t,r),n>=7&&S(t),null==f&&(f=A(n,i,g)),z(f,r)},M=function(t,r){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||e<=t+n))for(var i=-1;i<=7;i+=1)r+i<=-1||e<=r+i||(o[t+n][r+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},b=function(){for(var t=8;t<e-8;t+=1)null==o[t][6]&&(o[t][6]=t%2==0);for(var r=8;r<e-8;r+=1)null==o[6][r]&&(o[6][r]=r%2==0)},x=function(){for(var t=u.getPatternPosition(n),r=0;r<t.length;r+=1)for(var i=0;i<t.length;i+=1){var e=t[r],a=t[i];if(null==o[e][a])for(var f=-2;f<=2;f+=1)for(var c=-2;c<=2;c+=1)o[e+f][a+c]=-2==f||2==f||-2==c||2==c||0==f&&0==c}},S=function(t){for(var r=u.getBCHTypeNumber(n),i=0;i<18;i+=1){var a=!t&&1==(r>>i&1);o[Math.floor(i/3)][i%3+e-8-3]=a}for(i=0;i<18;i+=1)a=!t&&1==(r>>i&1),o[i%3+e-8-3][Math.floor(i/3)]=a},k=function(t,r){for(var n=u.getBCHTypeInfo(i<<3|r),a=0;a<15;a+=1){var f=!t&&1==(n>>a&1);a<6?o[a][8]=f:a<8?o[a+1][8]=f:o[e-15+a][8]=f}for(a=0;a<15;a+=1)f=!t&&1==(n>>a&1),a<8?o[8][e-a-1]=f:a<9?o[8][15-a-1+1]=f:o[8][15-a-1]=f;o[e-8][8]=!t},z=function(t,r){for(var n=-1,i=e-1,a=7,f=0,c=u.getMaskFunction(r),s=e-1;s>0;s-=2)for(6==s&&(s-=1);;){for(var h=0;h<2;h+=1)if(null==o[i][s-h]){var v=!1;f<t.length&&(v=1==(t[f]>>>a&1)),c(i,s-h)&&(v=!v),o[i][s-h]=v,-1==(a-=1)&&(f+=1,a=7)}if((i+=n)<0||e<=i){i-=n,n=-n;break}}},A=function(t,r,n){for(var i=s.getRSBlocks(t,r),o=h(),e=0;e<n.length;e+=1){var a=n[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<i.length;e+=1)f+=i[e].dataCount;if(o.getLengthInBits()>8*f)throw"code length overflow. ("+o.getLengthInBits()+">"+8*f+")";for(o.getLengthInBits()+4<=8*f&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*f||(o.put(236,8),o.getLengthInBits()>=8*f));)o.put(17,8);return function(t,r){for(var n=0,i=0,o=0,e=new Array(r.length),a=new Array(r.length),f=0;f<r.length;f+=1){var s=r[f].dataCount,h=r[f].totalCount-s;i=Math.max(i,s),o=Math.max(o,h),e[f]=new Array(s);for(var v=0;v<e[f].length;v+=1)e[f][v]=255&t.getBuffer()[v+n];n+=s;var d=u.getErrorCorrectPolynomial(h),l=c(e[f],d.getLength()-1).mod(d);for(a[f]=new Array(d.getLength()-1),v=0;v<a[f].length;v+=1){var w=v+l.getLength()-a[f].length;a[f][v]=w>=0?l.getAt(w):0}}var g=0;for(v=0;v<r.length;v+=1)g+=r[v].totalCount;var p=new Array(g),y=0;for(v=0;v<i;v+=1)for(f=0;f<r.length;f+=1)v<e[f].length&&(p[y]=e[f][v],y+=1);for(v=0;v<o;v+=1)for(f=0;f<r.length;f+=1)v<a[f].length&&(p[y]=a[f][v],y+=1);return p}(o,i)};p.addData=function(t,r){var n=null;switch(r=r||"Byte"){case"Numeric":n=v(t);break;case"Alphanumeric":n=d(t);break;case"Byte":n=l(t);break;case"Kanji":n=w(t);break;default:throw"mode:"+r}g.push(n),f=null},p.isDark=function(t,r){if(t<0||e<=t||r<0||e<=r)throw t+","+r;return o[t][r]},p.getModuleCount=function(){return e},p.make=function(){if(n<1){for(var t=1;t<40;t++){for(var r=s.getRSBlocks(t,i),o=h(),e=0;e<g.length;e++){var a=g[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<r.length;e++)f+=r[e].dataCount;if(o.getLengthInBits()<=8*f)break}n=t}m(!1,function(){for(var t=0,r=0,n=0;n<8;n+=1){m(!0,n);var i=u.getLostPoint(p);(0==n||t>i)&&(t=i,r=n)}return r}())},p.createTableTag=function(t,r){t=t||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(r=void 0===r?4*t:r)+"px;",n+='">',n+="<tbody>";for(var i=0;i<p.getModuleCount();i+=1){n+="<tr>";for(var o=0;o<p.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+t+"px;",n+=" height: "+t+"px;",n+=" background-color: ",n+=p.isDark(i,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},p.createSvgTag=function(t,r,n,i){var o={};"object"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,r=o.margin,n=o.alt,i=o.title),t=t||2,r=void 0===r?4*t:r,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-title":null;var e,a,u,f,c=p.getModuleCount()*t+2*r,s="";for(f="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",s+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',s+=o.scalable?"":' width="'+c+'px" height="'+c+'px"',s+=' viewBox="0 0 '+c+" "+c+'" ',s+=' preserveAspectRatio="xMinYMin meet"',s+=i.text||n.text?' role="img" aria-labelledby="'+O([i.id,n.id].join(" ").trim())+'"':"",s+=">",s+=i.text?'<title id="'+O(i.id)+'">'+O(i.text)+"</title>":"",s+=n.text?'<description id="'+O(n.id)+'">'+O(n.text)+"</description>":"",s+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',s+='<path d="',a=0;a<p.getModuleCount();a+=1)for(u=a*t+r,e=0;e<p.getModuleCount();e+=1)p.isDark(a,e)&&(s+="M"+(e*t+r)+","+u+f);return(s+='" stroke="transparent" fill="black"/>')+"</svg>"},p.createDataURL=function(t,r){t=t||2,r=void 0===r?4*t:r;var n=p.getModuleCount()*t+2*r,i=r,o=n-r;return y(n,n,(function(r,n){if(i<=r&&r<o&&i<=n&&n<o){var e=Math.floor((r-i)/t),a=Math.floor((n-i)/t);return p.isDark(a,e)?0:1}return 1}))},p.createImgTag=function(t,r,n){t=t||2,r=void 0===r?4*t:r;var i=p.getModuleCount()*t+2*r,o="";return o+="<img",o+=' src="',o+=p.createDataURL(t,r),o+='"',o+=' width="',o+=i,o+='"',o+=' height="',o+=i,o+='"',n&&(o+=' alt="',o+=O(n),o+='"'),o+"/>"};var O=function(t){for(var r="",n=0;n<t.length;n+=1){var i=t.charAt(n);switch(i){case"<":r+="<";break;case">":r+=">";break;case"&":r+="&";break;case'"':r+=""";break;default:r+=i}}return r};return p.createASCII=function(t,r){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var r,n,i,o,e,a=1*p.getModuleCount()+2*t,u=t,f=a-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},s={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(r=0;r<a;r+=2){for(i=Math.floor((r-u)/1),o=Math.floor((r+1-u)/1),n=0;n<a;n+=1)e="█",u<=n&&n<f&&u<=r&&r<f&&p.isDark(i,Math.floor((n-u)/1))&&(e=" "),u<=n&&n<f&&u<=r+1&&r+1<f&&p.isDark(o,Math.floor((n-u)/1))?e+=" ":e+="█",h+=t<1&&r+1>=f?s[e]:c[e];h+="\n"}return a%2&&t>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(r);t-=1,r=void 0===r?2*t:r;var n,i,o,e,a=p.getModuleCount()*t+2*r,u=r,f=a-r,c=Array(t+1).join("██"),s=Array(t+1).join(" "),h="",v="";for(n=0;n<a;n+=1){for(o=Math.floor((n-u)/t),v="",i=0;i<a;i+=1)e=1,u<=i&&i<f&&u<=n&&n<f&&p.isDark(o,Math.floor((i-u)/t))&&(e=0),v+=e?c:s;for(o=0;o<t;o+=1)h+=v+"\n"}return h.substring(0,h.length-1)},p.renderTo2dContext=function(t,r){r=r||2;for(var n=p.getModuleCount(),i=0;i<n;i++)for(var o=0;o<n;o++)t.fillStyle=p.isDark(i,o)?"black":"white",t.fillRect(i*r,o*r,r,r)},p};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var r=[],n=0;n<t.length;n+=1){var i=t.charCodeAt(n);r.push(255&i)}return r}}).default,t.createStringToBytes=function(t,r){var n=function(){for(var n=p(t),i=function(){var t=n.read();if(-1==t)throw"eof";return t},o=0,e={};;){var a=n.read();if(-1==a)break;var u=i(),f=i()<<8|i();e[String.fromCharCode(a<<8|u)]=f,o+=1}if(o!=r)throw o+" != "+r;return e}(),i="?".charCodeAt(0);return function(t){for(var r=[],o=0;o<t.length;o+=1){var e=t.charCodeAt(o);if(e<128)r.push(e);else{var a=n[t.charAt(o)];"number"==typeof a?(255&a)==a?r.push(a):(r.push(a>>>8),r.push(255&a)):r.push(i)}}return r}};var r,n,i,o,e,a={L:1,M:0,Q:3,H:2},u=(r=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,e=function(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r},(o={}).getBCHTypeInfo=function(t){for(var r=t<<10;e(r)-e(n)>=0;)r^=n<<e(r)-e(n);return 21522^(t<<10|r)},o.getBCHTypeNumber=function(t){for(var r=t<<12;e(r)-e(i)>=0;)r^=i<<e(r)-e(i);return t<<12|r},o.getPatternPosition=function(t){return r[t-1]},o.getMaskFunction=function(t){switch(t){case 0:return function(t,r){return(t+r)%2==0};case 1:return function(t){return t%2==0};case 2:return function(t,r){return r%3==0};case 3:return function(t,r){return(t+r)%3==0};case 4:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case 5:return function(t,r){return t*r%2+t*r%3==0};case 6:return function(t,r){return(t*r%2+t*r%3)%2==0};case 7:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw"bad maskPattern:"+t}},o.getErrorCorrectPolynomial=function(t){for(var r=c([1],0),n=0;n<t;n+=1)r=r.multiply(c([1,f.gexp(n)],0));return r},o.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+t}else if(r<27)switch(t){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+t}else{if(!(r<41))throw"type:"+r;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+t}}},o.getLostPoint=function(t){for(var r=t.getModuleCount(),n=0,i=0;i<r;i+=1)for(var o=0;o<r;o+=1){for(var e=0,a=t.isDark(i,o),u=-1;u<=1;u+=1)if(!(i+u<0||r<=i+u))for(var f=-1;f<=1;f+=1)o+f<0||r<=o+f||0==u&&0==f||a==t.isDark(i+u,o+f)&&(e+=1);e>5&&(n+=3+e-5)}for(i=0;i<r-1;i+=1)for(o=0;o<r-1;o+=1){var c=0;t.isDark(i,o)&&(c+=1),t.isDark(i+1,o)&&(c+=1),t.isDark(i,o+1)&&(c+=1),t.isDark(i+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(i=0;i<r;i+=1)for(o=0;o<r-6;o+=1)t.isDark(i,o)&&!t.isDark(i,o+1)&&t.isDark(i,o+2)&&t.isDark(i,o+3)&&t.isDark(i,o+4)&&!t.isDark(i,o+5)&&t.isDark(i,o+6)&&(n+=40);for(o=0;o<r;o+=1)for(i=0;i<r-6;i+=1)t.isDark(i,o)&&!t.isDark(i+1,o)&&t.isDark(i+2,o)&&t.isDark(i+3,o)&&t.isDark(i+4,o)&&!t.isDark(i+5,o)&&t.isDark(i+6,o)&&(n+=40);var s=0;for(o=0;o<r;o+=1)for(i=0;i<r;i+=1)t.isDark(i,o)&&(s+=1);return n+Math.abs(100*s/r/r-50)/5*10},o),f=function(){for(var t=new Array(256),r=new Array(256),n=0;n<8;n+=1)t[n]=1<<n;for(n=8;n<256;n+=1)t[n]=t[n-4]^t[n-5]^t[n-6]^t[n-8];for(n=0;n<255;n+=1)r[t[n]]=n;return{glog:function(t){if(t<1)throw"glog("+t+")";return r[t]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return t[r]}}}();function c(t,r){if(void 0===t.length)throw t.length+"/"+r;var n=function(){for(var n=0;n<t.length&&0==t[n];)n+=1;for(var i=new Array(t.length-n+r),o=0;o<t.length-n;o+=1)i[o]=t[o+n];return i}(),i={getAt:function(t){return n[t]},getLength:function(){return n.length},multiply:function(t){for(var r=new Array(i.getLength()+t.getLength()-1),n=0;n<i.getLength();n+=1)for(var o=0;o<t.getLength();o+=1)r[n+o]^=f.gexp(f.glog(i.getAt(n))+f.glog(t.getAt(o)));return c(r,0)},mod:function(t){if(i.getLength()-t.getLength()<0)return i;for(var r=f.glog(i.getAt(0))-f.glog(t.getAt(0)),n=new Array(i.getLength()),o=0;o<i.getLength();o+=1)n[o]=i.getAt(o);for(o=0;o<t.getLength();o+=1)n[o]^=f.gexp(f.glog(t.getAt(o))+r);return c(n,0).mod(t)}};return i}var s=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(t,r){var n={};return n.totalCount=t,n.dataCount=r,n},n={getRSBlocks:function(n,i){var o=function(r,n){switch(n){case a.L:return t[4*(r-1)+0];case a.M:return t[4*(r-1)+1];case a.Q:return t[4*(r-1)+2];case a.H:return t[4*(r-1)+3];default:return}}(n,i);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;for(var e=o.length/3,u=[],f=0;f<e;f+=1)for(var c=o[3*f+0],s=o[3*f+1],h=o[3*f+2],v=0;v<c;v+=1)u.push(r(s,h));return u}};return n}(),h=function(){var t=[],r=0,n={getBuffer:function(){return t},getAt:function(r){var n=Math.floor(r/8);return 1==(t[n]>>>7-r%8&1)},put:function(t,r){for(var i=0;i<r;i+=1)n.putBit(1==(t>>>r-i-1&1))},getLengthInBits:function(){return r},putBit:function(n){var i=Math.floor(r/8);t.length<=i&&t.push(0),n&&(t[i]|=128>>>r%8),r+=1}};return n},v=function(t){var r=t,n={getMode:function(){return 1},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+2<n.length;)t.put(i(n.substring(o,o+3)),10),o+=3;o<n.length&&(n.length-o==1?t.put(i(n.substring(o,o+1)),4):n.length-o==2&&t.put(i(n.substring(o,o+2)),7))}},i=function(t){for(var r=0,n=0;n<t.length;n+=1)r=10*r+o(t.charAt(n));return r},o=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return n},d=function(t){var r=t,n={getMode:function(){return 2},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+1<n.length;)t.put(45*i(n.charAt(o))+i(n.charAt(o+1)),11),o+=2;o<n.length&&t.put(i(n.charAt(o)),6)}},i=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);if("A"<=t&&t<="Z")return t.charCodeAt(0)-"A".charCodeAt(0)+10;switch(t){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+t}};return n},l=function(r){var n=t.stringToBytes(r);return{getMode:function(){return 4},getLength:function(){return n.length},write:function(t){for(var r=0;r<n.length;r+=1)t.put(n[r],8)}}},w=function(r){var n=t.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(){var t=n("友");if(2!=t.length||38726!=(t[0]<<8|t[1]))throw"sjis not supported."}();var i=n(r);return{getMode:function(){return 8},getLength:function(){return~~(i.length/2)},write:function(t){for(var r=i,n=0;n+1<r.length;){var o=(255&r[n])<<8|255&r[n+1];if(33088<=o&&o<=40956)o-=33088;else{if(!(57408<=o&&o<=60351))throw"illegal char at "+(n+1)+"/"+o;o-=49472}t.put(o=192*(o>>>8&255)+(255&o),13),n+=2}if(n<r.length)throw"illegal char at "+(n+1)}}},g=function(){var t=[],r={writeByte:function(r){t.push(255&r)},writeShort:function(t){r.writeByte(t),r.writeByte(t>>>8)},writeBytes:function(t,n,i){n=n||0,i=i||t.length;for(var o=0;o<i;o+=1)r.writeByte(t[o+n])},writeString:function(t){for(var n=0;n<t.length;n+=1)r.writeByte(t.charCodeAt(n))},toByteArray:function(){return t},toString:function(){var r="";r+="[";for(var n=0;n<t.length;n+=1)n>0&&(r+=","),r+=t[n];return r+"]"}};return r},p=function(t){var r=t,n=0,i=0,o=0,e={read:function(){for(;o<8;){if(n>=r.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=r.charAt(n);if(n+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(i=i<<6|a(t.charCodeAt(0)),o+=6)}var e=i>>>o-8&255;return o-=8,e}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return e},y=function(t,r,n){for(var i=function(t,r){var n=t,i=r,o=new Array(t*r),e={setPixel:function(t,r,i){o[r*n+t]=i},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(i),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(i),t.writeByte(0);var r=a(2);t.writeByte(2);for(var o=0;r.length-o>255;)t.writeByte(255),t.writeBytes(r,o,255),o+=255;t.writeByte(r.length-o),t.writeBytes(r,o,r.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var r=1<<t,n=1+(1<<t),i=t+1,e=u(),a=0;a<r;a+=1)e.add(String.fromCharCode(a));e.add(String.fromCharCode(r)),e.add(String.fromCharCode(n));var f,c,s,h=g(),v=(f=h,c=0,s=0,{write:function(t,r){if(t>>>r!=0)throw"length over";for(;c+r>=8;)f.writeByte(255&(t<<c|s)),r-=8-c,t>>>=8-c,s=0,c=0;s|=t<<c,c+=r},flush:function(){c>0&&f.writeByte(s)}});v.write(r,i);var d=0,l=String.fromCharCode(o[d]);for(d+=1;d<o.length;){var w=String.fromCharCode(o[d]);d+=1,e.contains(l+w)?l+=w:(v.write(e.indexOf(l),i),e.size()<4095&&(e.size()==1<<i&&(i+=1),e.add(l+w)),l=w)}return v.write(e.indexOf(l),i),v.write(n,i),v.flush(),h.toByteArray()},u=function(){var t={},r=0,n={add:function(i){if(n.contains(i))throw"dup key:"+i;t[i]=r,r+=1},size:function(){return r},indexOf:function(r){return t[r]},contains:function(r){return void 0!==t[r]}};return n};return e}(t,r),o=0;o<r;o+=1)for(var e=0;e<t;e+=1)i.setPixel(e,o,n(e,o));var a=g();i.write(a);for(var u=function(){var t=0,r=0,n=0,i="",o={},e=function(t){i+=String.fromCharCode(a(63&t))},a=function(t){if(t<0);else{if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw"n:"+t};return o.writeByte=function(i){for(t=t<<8|255&i,r+=8,n+=1;r>=6;)e(t>>>r-6),r-=6},o.flush=function(){if(r>0&&(e(t<<6-r),t=0,r=0),n%3!=0)for(var o=3-n%3,a=0;a<o;a+=1)i+="="},o.toString=function(){return i},o}(),f=a.toByteArray(),c=0;c<f.length;c+=1)u.writeByte(f[c]);return u.flush(),"data:image/gif;base64,"+u};return t}();o.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?r.push(i):i<2048?r.push(192|i>>6,128|63&i):i<55296||i>=57344?r.push(224|i>>12,128|i>>6&63,128|63&i):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return r}(t)},void 0===(i="function"==typeof(n=function(){return o})?n.apply(r,[]):n)||(t.exports=i)},676:(t,r,n)=>{n.d(r,{default:()=>P});var i=function(){return(i=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o=function(){for(var t=0,r=0,n=arguments.length;r<n;r++)t+=arguments[r].length;var i=Array(t),o=0;for(r=0;r<n;r++)for(var e=arguments[r],a=0,u=e.length;a<u;a++,o++)i[o]=e[a];return i},e=function(t){return!!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!r.length)return t;var u=r.shift();return void 0!==u&&e(t)&&e(u)?(t=i({},t),Object.keys(u).forEach((function(r){var n=t[r],i=u[r];t[r]=Array.isArray(n)&&Array.isArray(i)?i:e(n)&&e(i)?a(Object.assign({},n),i):i})),a.apply(void 0,o([t],r))):t}function u(t,r){var n=document.createElement("a");n.download=r,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function f(t){return r=this,void 0,i=function(){return function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}}(this,(function(){return[2,new Promise((function(r){var n=new XMLHttpRequest;n.onload=function(){var t=new FileReader;t.onloadend=function(){r(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}))]}))},new((n=void 0)||(n=Promise))((function(t,o){function e(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(r){var i;r.done?t(r.value):(i=r.value,i instanceof n?i:new n((function(t){t(i)}))).then(e,a)}u((i=i.apply(r,[])).next())}));var r,n,i}const c={L:.07,M:.15,Q:.25,H:.3};var s=function(){return(s=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const h=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"dots":o=this._drawDot;break;case"classy":o=this._drawClassy;break;case"classy-rounded":o=this._drawClassyRounded;break;case"rounded":o=this._drawRounded;break;case"extra-rounded":o=this._drawExtraRounded;break;default:o=this._drawSquare}o.call(this,{x:t,y:r,size:n,getNeighbor:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._basicSideRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},t.prototype._basicCornerRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._basicCornerExtraRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},t.prototype._basicCornersRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawExtraRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawClassy=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t}();var v=function(){return(v=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const d=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"extra-rounded":o=this._drawExtraRounded;break;default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+(i+n/2)+" "+o+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+e+"a "+(n/2-e)+" "+(n/2-e)+" 0 1 1 -0.1 0Z")}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n+"zM "+(i+e)+" "+(o+e)+"h "+(n-2*e)+"v "+(n-2*e)+"h "+(2*e-n)+"z")}}))},t.prototype._basicExtraRounded=function(t){var r=this,n=t.x,i=t.y,o=t.size/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+n+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(n+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawExtraRounded=function(t){this._basicExtraRounded({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}();var l=function(){return(l=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const w=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){("square"===this._type?this._drawSquare:this._drawDot).call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}(),g="circle";var p=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},y=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}},m=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],M=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const b=function(){function t(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this._element},t.prototype.drawQR=function(t){return p(this,void 0,void 0,(function(){var r,n,i,o,e,a,u,f=this;return y(this,(function(s){switch(s.label){case 0:return r=t.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,i=this._options.shape===g?n/Math.sqrt(2):n,o=Math.floor(i/r),e={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(s.sent(),!this._image)return[2];a=this._options,u=Math.floor(a.imageOptions.imageSize*c[a.qrOptions.errorCorrectionLevel]*r*r),e=function(t){var r=t.originalHeight,n=t.originalWidth,i=t.maxHiddenDots,o=t.maxHiddenAxisDots,e=t.dotSize,a={x:0,y:0},u={x:0,y:0};if(r<=0||n<=0||i<=0||e<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var f=r/n;return a.x=Math.floor(Math.sqrt(i/f)),a.x<=0&&(a.x=1),o&&o<a.x&&(a.x=o),a.x%2==0&&a.x--,u.x=a.x*e,a.y=1+2*Math.ceil((a.x*f-1)/2),u.y=Math.round(u.x*f),(a.y*a.x>i||o&&o<a.y)&&(o&&o<a.y?(a.y=o,a.y%2==0&&a.x--):a.y-=2,u.y=a.y*e,a.x=1+2*Math.ceil((a.y/f-1)/2),u.x=Math.round(u.y/f)),{height:u.y,width:u.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:u,maxHiddenAxisDots:r-14,dotSize:o}),s.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,n){var i,o,a,u,c,s;return!(f._options.imageOptions.hideBackgroundDots&&t>=(r-e.hideXDots)/2&&t<(r+e.hideXDots)/2&&n>=(r-e.hideYDots)/2&&n<(r+e.hideYDots)/2||(null===(i=m[t])||void 0===i?void 0:i[n])||(null===(o=m[t-r+7])||void 0===o?void 0:o[n])||(null===(a=m[t])||void 0===a?void 0:a[n-r+7])||(null===(u=M[t])||void 0===u?void 0:u[n])||(null===(c=M[t-r+7])||void 0===c?void 0:c[n])||(null===(s=M[t])||void 0===s?void 0:s[n-r+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:e.width,height:e.height,count:r,dotSize:o})]:[3,4];case 3:s.sent(),s.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,r,n,i=this._options;if(this._element){var o=null===(t=i.backgroundOptions)||void 0===t?void 0:t.gradient,e=null===(r=i.backgroundOptions)||void 0===r?void 0:r.color;if((o||e)&&this._createColor({options:o,color:e,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"background-color"}),null===(n=i.backgroundOptions)||void 0===n?void 0:n.round){var a=Math.min(i.width,i.height),u=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),u.setAttribute("x",String((i.width-a)/2)),u.setAttribute("y",String((i.height-a)/2)),u.setAttribute("width",String(a)),u.setAttribute("height",String(a)),u.setAttribute("rx",String(a/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(u)}}},t.prototype.drawDots=function(t){var r,n,i=this;if(!this._qr)throw"QR code is not defined";var o=this._options,e=this._qr.getModuleCount();if(e>o.width||e>o.height)throw"The canvas is too small.";var a=Math.min(o.width,o.height)-2*o.margin,u=o.shape===g?a/Math.sqrt(2):a,f=Math.floor(u/e),c=Math.floor((o.width-e*f)/2),s=Math.floor((o.height-e*f)/2),v=new h({svg:this._element,type:o.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(r=o.dotsOptions)||void 0===r?void 0:r.gradient,color:o.dotsOptions.color,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:"dot-color"});for(var d=function(r){for(var o=function(o){return t&&!t(r,o)?"continue":(null===(n=l._qr)||void 0===n?void 0:n.isDark(r,o))?(v.draw(c+r*f,s+o*f,f,(function(n,a){return!(r+n<0||o+a<0||r+n>=e||o+a>=e)&&!(t&&!t(r+n,o+a))&&!!i._qr&&i._qr.isDark(r+n,o+a)})),void(v._element&&l._dotsClipPath&&l._dotsClipPath.appendChild(v._element))):"continue"},a=0;a<e;a++)o(a)},l=this,w=0;w<e;w++)d(w);if(o.shape===g){var p=Math.floor((a/f-e)/2),y=e+2*p,m=c-p*f,M=s-p*f,b=[],x=Math.floor(y/2);for(w=0;w<y;w++){b[w]=[];for(var S=0;S<y;S++)b[w][S]=w>=p-1&&w<=y-p&&S>=p-1&&S<=y-p||Math.sqrt((w-x)*(w-x)+(S-x)*(S-x))>x?0:this._qr.isDark(S-2*p<0?S:S>=e?S-2*p:S-p,w-2*p<0?w:w>=e?w-2*p:w-p)?1:0}var k=function(t){for(var r=function(r){if(!b[t][r])return"continue";v.draw(m+t*f,M+r*f,f,(function(n,i){var o;return!!(null===(o=b[t+n])||void 0===o?void 0:o[r+i])})),v._element&&z._dotsClipPath&&z._dotsClipPath.appendChild(v._element)},n=0;n<y;n++)r(n)},z=this;for(w=0;w<y;w++)k(w)}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var r=this._options;if(!this._element)throw"Element code is not defined";var n=this._qr.getModuleCount(),i=Math.min(r.width,r.height)-2*r.margin,o=r.shape===g?i/Math.sqrt(2):i,e=Math.floor(o/n),a=7*e,u=3*e,f=Math.floor((r.width-n*e)/2),c=Math.floor((r.height-n*e)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(i){var o,s,v,l,g,p,y,b,x,S,k,z,A=i[0],O=i[1],j=i[2],q=f+A*e*(n-7),B=c+O*e*(n-7),L=t._dotsClipPath,R=t._dotsClipPath;if(((null===(o=r.cornersSquareOptions)||void 0===o?void 0:o.gradient)||(null===(s=r.cornersSquareOptions)||void 0===s?void 0:s.color))&&((L=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+A+"-"+O),t._defs.appendChild(L),t._cornersSquareClipPath=t._cornersDotClipPath=R=L,t._createColor({options:null===(v=r.cornersSquareOptions)||void 0===v?void 0:v.gradient,color:null===(l=r.cornersSquareOptions)||void 0===l?void 0:l.color,additionalRotation:j,x:q,y:B,height:a,width:a,name:"corners-square-color-"+A+"-"+O})),null===(g=r.cornersSquareOptions)||void 0===g?void 0:g.type){var P=new d({svg:t._element,type:r.cornersSquareOptions.type});P.draw(q,B,a,j),P._element&&L&&L.appendChild(P._element)}else for(var D=new h({svg:t._element,type:r.dotsOptions.type}),N=function(t){for(var r=function(r){if(!(null===(p=m[t])||void 0===p?void 0:p[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=m[t+n])||void 0===o?void 0:o[r+i])})),D._element&&L&&L.appendChild(D._element)},n=0;n<m[t].length;n++)r(n)},Q=0;Q<m.length;Q++)N(Q);if(((null===(y=r.cornersDotOptions)||void 0===y?void 0:y.gradient)||(null===(b=r.cornersDotOptions)||void 0===b?void 0:b.color))&&((R=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+A+"-"+O),t._defs.appendChild(R),t._cornersDotClipPath=R,t._createColor({options:null===(x=r.cornersDotOptions)||void 0===x?void 0:x.gradient,color:null===(S=r.cornersDotOptions)||void 0===S?void 0:S.color,additionalRotation:j,x:q+2*e,y:B+2*e,height:u,width:u,name:"corners-dot-color-"+A+"-"+O})),null===(k=r.cornersDotOptions)||void 0===k?void 0:k.type){var E=new w({svg:t._element,type:r.cornersDotOptions.type});E.draw(q+2*e,B+2*e,u,j),E._element&&R&&R.appendChild(E._element)}else{D=new h({svg:t._element,type:r.dotsOptions.type});var G=function(t){for(var r=function(r){if(!(null===(z=M[t])||void 0===z?void 0:z[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=M[t+n])||void 0===o?void 0:o[r+i])})),D._element&&R&&R.appendChild(D._element)},n=0;n<M[t].length;n++)r(n)};for(Q=0;Q<M.length;Q++)G(Q)}}))},t.prototype.loadImage=function(){var t=this;return new Promise((function(r,n){var i=t._options,o=new Image;if(!i.image)return n("Image is not defined");"string"==typeof i.imageOptions.crossOrigin&&(o.crossOrigin=i.imageOptions.crossOrigin),t._image=o,o.onload=function(){r()},o.src=i.image}))},t.prototype.drawImage=function(t){var r=t.width,n=t.height,i=t.count,o=t.dotSize;return p(this,void 0,void 0,(function(){var t,e,a,u,c,s,h,v,d;return y(this,(function(l){switch(l.label){case 0:return t=this._options,e=Math.floor((t.width-i*o)/2),a=Math.floor((t.height-i*o)/2),u=e+t.imageOptions.margin+(i*o-r)/2,c=a+t.imageOptions.margin+(i*o-n)/2,s=r-2*t.imageOptions.margin,h=n-2*t.imageOptions.margin,(v=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(u)),v.setAttribute("y",String(c)),v.setAttribute("width",s+"px"),v.setAttribute("height",h+"px"),[4,f(t.image||"")];case 1:return d=l.sent(),v.setAttribute("href",d||""),this._element.appendChild(v),[2]}}))}))},t.prototype._createColor=function(t){var r=t.options,n=t.color,i=t.additionalRotation,o=t.x,e=t.y,a=t.height,u=t.width,f=t.name,c=u>a?u:a,s=document.createElementNS("http://www.w3.org/2000/svg","rect");if(s.setAttribute("x",String(o)),s.setAttribute("y",String(e)),s.setAttribute("height",String(a)),s.setAttribute("width",String(u)),s.setAttribute("clip-path","url('#clip-path-"+f+"')"),r){var h;if("radial"===r.type)(h=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("fx",String(o+u/2)),h.setAttribute("fy",String(e+a/2)),h.setAttribute("cx",String(o+u/2)),h.setAttribute("cy",String(e+a/2)),h.setAttribute("r",String(c/2));else{var v=((r.rotation||0)+i)%(2*Math.PI),d=(v+2*Math.PI)%(2*Math.PI),l=o+u/2,w=e+a/2,g=o+u/2,p=e+a/2;d>=0&&d<=.25*Math.PI||d>1.75*Math.PI&&d<=2*Math.PI?(l-=u/2,w-=a/2*Math.tan(v),g+=u/2,p+=a/2*Math.tan(v)):d>.25*Math.PI&&d<=.75*Math.PI?(w-=a/2,l-=u/2/Math.tan(v),p+=a/2,g+=u/2/Math.tan(v)):d>.75*Math.PI&&d<=1.25*Math.PI?(l+=u/2,w+=a/2*Math.tan(v),g-=u/2,p-=a/2*Math.tan(v)):d>1.25*Math.PI&&d<=1.75*Math.PI&&(w+=a/2,l+=u/2/Math.tan(v),p-=a/2,g-=u/2/Math.tan(v)),(h=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("x1",String(Math.round(l))),h.setAttribute("y1",String(Math.round(w))),h.setAttribute("x2",String(Math.round(g))),h.setAttribute("y2",String(Math.round(p)))}r.colorStops.forEach((function(t){var r=t.offset,n=t.color,i=document.createElementNS("http://www.w3.org/2000/svg","stop");i.setAttribute("offset",100*r+"%"),i.setAttribute("stop-color",n),h.appendChild(i)})),s.setAttribute("fill","url('#"+f+"')"),this._defs.appendChild(h)}else n&&s.setAttribute("fill",n);this._element.appendChild(s)},t}(),x="canvas";for(var S={},k=0;k<=40;k++)S[k]=k;const z={type:x,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:S[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var A=function(){return(A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};function O(t){var r=A({},t);if(!r.colorStops||!r.colorStops.length)throw"Field 'colorStops' is required in gradient";return r.rotation=r.rotation?Number(r.rotation):0,r.colorStops=r.colorStops.map((function(t){return A(A({},t),{offset:Number(t.offset)})})),r}function j(t){var r=A({},t);return r.width=Number(r.width),r.height=Number(r.height),r.margin=Number(r.margin),r.imageOptions=A(A({},r.imageOptions),{hideBackgroundDots:Boolean(r.imageOptions.hideBackgroundDots),imageSize:Number(r.imageOptions.imageSize),margin:Number(r.imageOptions.margin)}),r.margin>Math.min(r.width,r.height)&&(r.margin=Math.min(r.width,r.height)),r.dotsOptions=A({},r.dotsOptions),r.dotsOptions.gradient&&(r.dotsOptions.gradient=O(r.dotsOptions.gradient)),r.cornersSquareOptions&&(r.cornersSquareOptions=A({},r.cornersSquareOptions),r.cornersSquareOptions.gradient&&(r.cornersSquareOptions.gradient=O(r.cornersSquareOptions.gradient))),r.cornersDotOptions&&(r.cornersDotOptions=A({},r.cornersDotOptions),r.cornersDotOptions.gradient&&(r.cornersDotOptions.gradient=O(r.cornersDotOptions.gradient))),r.backgroundOptions&&(r.backgroundOptions=A({},r.backgroundOptions),r.backgroundOptions.gradient&&(r.backgroundOptions.gradient=O(r.backgroundOptions.gradient))),r}var q=n(192),B=n.n(q),L=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},R=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}};const P=function(){function t(t){this._options=t?j(a(z,t)):z,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype._setupSvg=function(){var t=this;if(this._qr){var r=new b(this._options);this._svg=r.getElement(),this._svgDrawingPromise=r.drawQR(this._qr).then((function(){var n;t._svg&&(null===(n=t._extension)||void 0===n||n.call(t,r.getElement(),t._options))}))}},t.prototype._setupCanvas=function(){var t,r=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then((function(){if(r._svg){var t=r._svg,n=(new XMLSerializer).serializeToString(t),i="data:image/svg+xml;base64,"+btoa(n),o=new Image;return new Promise((function(t){o.onload=function(){var n,i;null===(i=null===(n=r._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===i||i.drawImage(o,0,0),t()},o.src=i}))}})))},t.prototype._getElement=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){return R(this,(function(r){switch(r.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==t.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return r.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return r.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(r){t._clearContainer(this._container),this._options=r?j(a(this._options,r)):this._options,this._options.data&&(this._qr=B()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(t):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===x?this._setupCanvas():this._setupSvg(),this.append(this._container))},t.prototype.append=function(t){if(t){if("function"!=typeof t.appendChild)throw"Container should be a single DOM node";this._options.type===x?this._canvas&&t.appendChild(this._canvas):this._svg&&t.appendChild(this._svg),this._container=t}},t.prototype.applyExtension=function(t){if(!t)throw"Extension function should be defined.";this._extension=t,this.update()},t.prototype.deleteExtension=function(){this._extension=void 0,this.update()},t.prototype.getRawData=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){var r,n,i;return R(this,(function(o){switch(o.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(t)];case 1:return(r=o.sent())?"svg"===t.toLowerCase()?(n=new XMLSerializer,i=n.serializeToString(r),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+i],{type:"image/svg+xml"})]):[2,new Promise((function(n){return r.toBlob(n,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return L(this,void 0,void 0,(function(){var r,n,i,o,e;return R(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return r="png",n="qr","string"==typeof t?(r=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(n=t.name),t.extension&&(r=t.extension)),[4,this._getElement(r)];case 1:return(i=a.sent())?("svg"===r.toLowerCase()?(o=new XMLSerializer,e='<?xml version="1.0" standalone="no"?>\r\n'+(e=o.serializeToString(i)),u("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),n+".svg")):u(i.toDataURL("image/"+r),n+"."+r),[2]):[2]}}))}))},t}()}},r={};function n(i){if(r[i])return r[i].exports;var o=r[i]={exports:{}};return t[i](o,o.exports,n),o.exports}return n.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return n.d(r,{a:r}),r},n.d=(t,r)=>{for(var i in r)n.o(r,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},n.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),n(676)})().default},r(n={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),n.exports);const o=t(i);export{o as Q}
|
|
1
|
+
function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r;const n=t((function(t){self,t.exports=(()=>{var t={192:(t,r)=>{var n,i,o=function(){var t=function(t,r){var n=t,i=a[r],o=null,e=0,f=null,g=[],p={},m=function(t,r){o=function(t){for(var r=new Array(t),n=0;n<t;n+=1){r[n]=new Array(t);for(var i=0;i<t;i+=1)r[n][i]=null}return r}(e=4*n+17),M(0,0),M(e-7,0),M(0,e-7),x(),b(),k(t,r),n>=7&&S(t),null==f&&(f=A(n,i,g)),z(f,r)},M=function(t,r){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||e<=t+n))for(var i=-1;i<=7;i+=1)r+i<=-1||e<=r+i||(o[t+n][r+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},b=function(){for(var t=8;t<e-8;t+=1)null==o[t][6]&&(o[t][6]=t%2==0);for(var r=8;r<e-8;r+=1)null==o[6][r]&&(o[6][r]=r%2==0)},x=function(){for(var t=u.getPatternPosition(n),r=0;r<t.length;r+=1)for(var i=0;i<t.length;i+=1){var e=t[r],a=t[i];if(null==o[e][a])for(var f=-2;f<=2;f+=1)for(var c=-2;c<=2;c+=1)o[e+f][a+c]=-2==f||2==f||-2==c||2==c||0==f&&0==c}},S=function(t){for(var r=u.getBCHTypeNumber(n),i=0;i<18;i+=1){var a=!t&&1==(r>>i&1);o[Math.floor(i/3)][i%3+e-8-3]=a}for(i=0;i<18;i+=1)a=!t&&1==(r>>i&1),o[i%3+e-8-3][Math.floor(i/3)]=a},k=function(t,r){for(var n=u.getBCHTypeInfo(i<<3|r),a=0;a<15;a+=1){var f=!t&&1==(n>>a&1);a<6?o[a][8]=f:a<8?o[a+1][8]=f:o[e-15+a][8]=f}for(a=0;a<15;a+=1)f=!t&&1==(n>>a&1),a<8?o[8][e-a-1]=f:a<9?o[8][15-a-1+1]=f:o[8][15-a-1]=f;o[e-8][8]=!t},z=function(t,r){for(var n=-1,i=e-1,a=7,f=0,c=u.getMaskFunction(r),s=e-1;s>0;s-=2)for(6==s&&(s-=1);;){for(var h=0;h<2;h+=1)if(null==o[i][s-h]){var v=!1;f<t.length&&(v=1==(t[f]>>>a&1)),c(i,s-h)&&(v=!v),o[i][s-h]=v,-1==(a-=1)&&(f+=1,a=7)}if((i+=n)<0||e<=i){i-=n,n=-n;break}}},A=function(t,r,n){for(var i=s.getRSBlocks(t,r),o=h(),e=0;e<n.length;e+=1){var a=n[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<i.length;e+=1)f+=i[e].dataCount;if(o.getLengthInBits()>8*f)throw"code length overflow. ("+o.getLengthInBits()+">"+8*f+")";for(o.getLengthInBits()+4<=8*f&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*f||(o.put(236,8),o.getLengthInBits()>=8*f));)o.put(17,8);return function(t,r){for(var n=0,i=0,o=0,e=new Array(r.length),a=new Array(r.length),f=0;f<r.length;f+=1){var s=r[f].dataCount,h=r[f].totalCount-s;i=Math.max(i,s),o=Math.max(o,h),e[f]=new Array(s);for(var v=0;v<e[f].length;v+=1)e[f][v]=255&t.getBuffer()[v+n];n+=s;var d=u.getErrorCorrectPolynomial(h),l=c(e[f],d.getLength()-1).mod(d);for(a[f]=new Array(d.getLength()-1),v=0;v<a[f].length;v+=1){var w=v+l.getLength()-a[f].length;a[f][v]=w>=0?l.getAt(w):0}}var g=0;for(v=0;v<r.length;v+=1)g+=r[v].totalCount;var p=new Array(g),y=0;for(v=0;v<i;v+=1)for(f=0;f<r.length;f+=1)v<e[f].length&&(p[y]=e[f][v],y+=1);for(v=0;v<o;v+=1)for(f=0;f<r.length;f+=1)v<a[f].length&&(p[y]=a[f][v],y+=1);return p}(o,i)};p.addData=function(t,r){var n=null;switch(r=r||"Byte"){case"Numeric":n=v(t);break;case"Alphanumeric":n=d(t);break;case"Byte":n=l(t);break;case"Kanji":n=w(t);break;default:throw"mode:"+r}g.push(n),f=null},p.isDark=function(t,r){if(t<0||e<=t||r<0||e<=r)throw t+","+r;return o[t][r]},p.getModuleCount=function(){return e},p.make=function(){if(n<1){for(var t=1;t<40;t++){for(var r=s.getRSBlocks(t,i),o=h(),e=0;e<g.length;e++){var a=g[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<r.length;e++)f+=r[e].dataCount;if(o.getLengthInBits()<=8*f)break}n=t}m(!1,function(){for(var t=0,r=0,n=0;n<8;n+=1){m(!0,n);var i=u.getLostPoint(p);(0==n||t>i)&&(t=i,r=n)}return r}())},p.createTableTag=function(t,r){t=t||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(r=void 0===r?4*t:r)+"px;",n+='">',n+="<tbody>";for(var i=0;i<p.getModuleCount();i+=1){n+="<tr>";for(var o=0;o<p.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+t+"px;",n+=" height: "+t+"px;",n+=" background-color: ",n+=p.isDark(i,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},p.createSvgTag=function(t,r,n,i){var o={};"object"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,r=o.margin,n=o.alt,i=o.title),t=t||2,r=void 0===r?4*t:r,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-title":null;var e,a,u,f,c=p.getModuleCount()*t+2*r,s="";for(f="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",s+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',s+=o.scalable?"":' width="'+c+'px" height="'+c+'px"',s+=' viewBox="0 0 '+c+" "+c+'" ',s+=' preserveAspectRatio="xMinYMin meet"',s+=i.text||n.text?' role="img" aria-labelledby="'+O([i.id,n.id].join(" ").trim())+'"':"",s+=">",s+=i.text?'<title id="'+O(i.id)+'">'+O(i.text)+"</title>":"",s+=n.text?'<description id="'+O(n.id)+'">'+O(n.text)+"</description>":"",s+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',s+='<path d="',a=0;a<p.getModuleCount();a+=1)for(u=a*t+r,e=0;e<p.getModuleCount();e+=1)p.isDark(a,e)&&(s+="M"+(e*t+r)+","+u+f);return(s+='" stroke="transparent" fill="black"/>')+"</svg>"},p.createDataURL=function(t,r){t=t||2,r=void 0===r?4*t:r;var n=p.getModuleCount()*t+2*r,i=r,o=n-r;return y(n,n,(function(r,n){if(i<=r&&r<o&&i<=n&&n<o){var e=Math.floor((r-i)/t),a=Math.floor((n-i)/t);return p.isDark(a,e)?0:1}return 1}))},p.createImgTag=function(t,r,n){t=t||2,r=void 0===r?4*t:r;var i=p.getModuleCount()*t+2*r,o="";return o+="<img",o+=' src="',o+=p.createDataURL(t,r),o+='"',o+=' width="',o+=i,o+='"',o+=' height="',o+=i,o+='"',n&&(o+=' alt="',o+=O(n),o+='"'),o+"/>"};var O=function(t){for(var r="",n=0;n<t.length;n+=1){var i=t.charAt(n);switch(i){case"<":r+="<";break;case">":r+=">";break;case"&":r+="&";break;case'"':r+=""";break;default:r+=i}}return r};return p.createASCII=function(t,r){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var r,n,i,o,e,a=1*p.getModuleCount()+2*t,u=t,f=a-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},s={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(r=0;r<a;r+=2){for(i=Math.floor((r-u)/1),o=Math.floor((r+1-u)/1),n=0;n<a;n+=1)e="█",u<=n&&n<f&&u<=r&&r<f&&p.isDark(i,Math.floor((n-u)/1))&&(e=" "),u<=n&&n<f&&u<=r+1&&r+1<f&&p.isDark(o,Math.floor((n-u)/1))?e+=" ":e+="█",h+=t<1&&r+1>=f?s[e]:c[e];h+="\n"}return a%2&&t>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(r);t-=1,r=void 0===r?2*t:r;var n,i,o,e,a=p.getModuleCount()*t+2*r,u=r,f=a-r,c=Array(t+1).join("██"),s=Array(t+1).join(" "),h="",v="";for(n=0;n<a;n+=1){for(o=Math.floor((n-u)/t),v="",i=0;i<a;i+=1)e=1,u<=i&&i<f&&u<=n&&n<f&&p.isDark(o,Math.floor((i-u)/t))&&(e=0),v+=e?c:s;for(o=0;o<t;o+=1)h+=v+"\n"}return h.substring(0,h.length-1)},p.renderTo2dContext=function(t,r){r=r||2;for(var n=p.getModuleCount(),i=0;i<n;i++)for(var o=0;o<n;o++)t.fillStyle=p.isDark(i,o)?"black":"white",t.fillRect(i*r,o*r,r,r)},p};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var r=[],n=0;n<t.length;n+=1){var i=t.charCodeAt(n);r.push(255&i)}return r}}).default,t.createStringToBytes=function(t,r){var n=function(){for(var n=p(t),i=function(){var t=n.read();if(-1==t)throw"eof";return t},o=0,e={};;){var a=n.read();if(-1==a)break;var u=i(),f=i()<<8|i();e[String.fromCharCode(a<<8|u)]=f,o+=1}if(o!=r)throw o+" != "+r;return e}(),i="?".charCodeAt(0);return function(t){for(var r=[],o=0;o<t.length;o+=1){var e=t.charCodeAt(o);if(e<128)r.push(e);else{var a=n[t.charAt(o)];"number"==typeof a?(255&a)==a?r.push(a):(r.push(a>>>8),r.push(255&a)):r.push(i)}}return r}};var r,n,i,o,e,a={L:1,M:0,Q:3,H:2},u=(r=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,e=function(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r},(o={}).getBCHTypeInfo=function(t){for(var r=t<<10;e(r)-e(n)>=0;)r^=n<<e(r)-e(n);return 21522^(t<<10|r)},o.getBCHTypeNumber=function(t){for(var r=t<<12;e(r)-e(i)>=0;)r^=i<<e(r)-e(i);return t<<12|r},o.getPatternPosition=function(t){return r[t-1]},o.getMaskFunction=function(t){switch(t){case 0:return function(t,r){return(t+r)%2==0};case 1:return function(t){return t%2==0};case 2:return function(t,r){return r%3==0};case 3:return function(t,r){return(t+r)%3==0};case 4:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case 5:return function(t,r){return t*r%2+t*r%3==0};case 6:return function(t,r){return(t*r%2+t*r%3)%2==0};case 7:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw"bad maskPattern:"+t}},o.getErrorCorrectPolynomial=function(t){for(var r=c([1],0),n=0;n<t;n+=1)r=r.multiply(c([1,f.gexp(n)],0));return r},o.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+t}else if(r<27)switch(t){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+t}else{if(!(r<41))throw"type:"+r;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+t}}},o.getLostPoint=function(t){for(var r=t.getModuleCount(),n=0,i=0;i<r;i+=1)for(var o=0;o<r;o+=1){for(var e=0,a=t.isDark(i,o),u=-1;u<=1;u+=1)if(!(i+u<0||r<=i+u))for(var f=-1;f<=1;f+=1)o+f<0||r<=o+f||0==u&&0==f||a==t.isDark(i+u,o+f)&&(e+=1);e>5&&(n+=3+e-5)}for(i=0;i<r-1;i+=1)for(o=0;o<r-1;o+=1){var c=0;t.isDark(i,o)&&(c+=1),t.isDark(i+1,o)&&(c+=1),t.isDark(i,o+1)&&(c+=1),t.isDark(i+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(i=0;i<r;i+=1)for(o=0;o<r-6;o+=1)t.isDark(i,o)&&!t.isDark(i,o+1)&&t.isDark(i,o+2)&&t.isDark(i,o+3)&&t.isDark(i,o+4)&&!t.isDark(i,o+5)&&t.isDark(i,o+6)&&(n+=40);for(o=0;o<r;o+=1)for(i=0;i<r-6;i+=1)t.isDark(i,o)&&!t.isDark(i+1,o)&&t.isDark(i+2,o)&&t.isDark(i+3,o)&&t.isDark(i+4,o)&&!t.isDark(i+5,o)&&t.isDark(i+6,o)&&(n+=40);var s=0;for(o=0;o<r;o+=1)for(i=0;i<r;i+=1)t.isDark(i,o)&&(s+=1);return n+Math.abs(100*s/r/r-50)/5*10},o),f=function(){for(var t=new Array(256),r=new Array(256),n=0;n<8;n+=1)t[n]=1<<n;for(n=8;n<256;n+=1)t[n]=t[n-4]^t[n-5]^t[n-6]^t[n-8];for(n=0;n<255;n+=1)r[t[n]]=n;return{glog:function(t){if(t<1)throw"glog("+t+")";return r[t]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return t[r]}}}();function c(t,r){if(void 0===t.length)throw t.length+"/"+r;var n=function(){for(var n=0;n<t.length&&0==t[n];)n+=1;for(var i=new Array(t.length-n+r),o=0;o<t.length-n;o+=1)i[o]=t[o+n];return i}(),i={getAt:function(t){return n[t]},getLength:function(){return n.length},multiply:function(t){for(var r=new Array(i.getLength()+t.getLength()-1),n=0;n<i.getLength();n+=1)for(var o=0;o<t.getLength();o+=1)r[n+o]^=f.gexp(f.glog(i.getAt(n))+f.glog(t.getAt(o)));return c(r,0)},mod:function(t){if(i.getLength()-t.getLength()<0)return i;for(var r=f.glog(i.getAt(0))-f.glog(t.getAt(0)),n=new Array(i.getLength()),o=0;o<i.getLength();o+=1)n[o]=i.getAt(o);for(o=0;o<t.getLength();o+=1)n[o]^=f.gexp(f.glog(t.getAt(o))+r);return c(n,0).mod(t)}};return i}var s=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(t,r){var n={};return n.totalCount=t,n.dataCount=r,n};return{getRSBlocks:function(n,i){var o=function(r,n){switch(n){case a.L:return t[4*(r-1)+0];case a.M:return t[4*(r-1)+1];case a.Q:return t[4*(r-1)+2];case a.H:return t[4*(r-1)+3];default:return}}(n,i);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;for(var e=o.length/3,u=[],f=0;f<e;f+=1)for(var c=o[3*f+0],s=o[3*f+1],h=o[3*f+2],v=0;v<c;v+=1)u.push(r(s,h));return u}}}(),h=function(){var t=[],r=0,n={getBuffer:function(){return t},getAt:function(r){var n=Math.floor(r/8);return 1==(t[n]>>>7-r%8&1)},put:function(t,r){for(var i=0;i<r;i+=1)n.putBit(1==(t>>>r-i-1&1))},getLengthInBits:function(){return r},putBit:function(n){var i=Math.floor(r/8);t.length<=i&&t.push(0),n&&(t[i]|=128>>>r%8),r+=1}};return n},v=function(t){var r=t,n={getMode:function(){return 1},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+2<n.length;)t.put(i(n.substring(o,o+3)),10),o+=3;o<n.length&&(n.length-o==1?t.put(i(n.substring(o,o+1)),4):n.length-o==2&&t.put(i(n.substring(o,o+2)),7))}},i=function(t){for(var r=0,n=0;n<t.length;n+=1)r=10*r+o(t.charAt(n));return r},o=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return n},d=function(t){var r=t,n={getMode:function(){return 2},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+1<n.length;)t.put(45*i(n.charAt(o))+i(n.charAt(o+1)),11),o+=2;o<n.length&&t.put(i(n.charAt(o)),6)}},i=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);if("A"<=t&&t<="Z")return t.charCodeAt(0)-"A".charCodeAt(0)+10;switch(t){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+t}};return n},l=function(r){var n=t.stringToBytes(r);return{getMode:function(){return 4},getLength:function(){return n.length},write:function(t){for(var r=0;r<n.length;r+=1)t.put(n[r],8)}}},w=function(r){var n=t.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(){var t=n("友");if(2!=t.length||38726!=(t[0]<<8|t[1]))throw"sjis not supported."}();var i=n(r);return{getMode:function(){return 8},getLength:function(){return~~(i.length/2)},write:function(t){for(var r=i,n=0;n+1<r.length;){var o=(255&r[n])<<8|255&r[n+1];if(33088<=o&&o<=40956)o-=33088;else{if(!(57408<=o&&o<=60351))throw"illegal char at "+(n+1)+"/"+o;o-=49472}t.put(o=192*(o>>>8&255)+(255&o),13),n+=2}if(n<r.length)throw"illegal char at "+(n+1)}}},g=function(){var t=[],r={writeByte:function(r){t.push(255&r)},writeShort:function(t){r.writeByte(t),r.writeByte(t>>>8)},writeBytes:function(t,n,i){n=n||0,i=i||t.length;for(var o=0;o<i;o+=1)r.writeByte(t[o+n])},writeString:function(t){for(var n=0;n<t.length;n+=1)r.writeByte(t.charCodeAt(n))},toByteArray:function(){return t},toString:function(){var r="";r+="[";for(var n=0;n<t.length;n+=1)n>0&&(r+=","),r+=t[n];return r+"]"}};return r},p=function(t){var r=t,n=0,i=0,o=0,e={read:function(){for(;o<8;){if(n>=r.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=r.charAt(n);if(n+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(i=i<<6|a(t.charCodeAt(0)),o+=6)}var e=i>>>o-8&255;return o-=8,e}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return e},y=function(t,r,n){for(var i=function(t,r){var n=t,i=r,o=new Array(t*r),e={setPixel:function(t,r,i){o[r*n+t]=i},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(i),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(i),t.writeByte(0);var r=a(2);t.writeByte(2);for(var o=0;r.length-o>255;)t.writeByte(255),t.writeBytes(r,o,255),o+=255;t.writeByte(r.length-o),t.writeBytes(r,o,r.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var r=1<<t,n=1+(1<<t),i=t+1,e=u(),a=0;a<r;a+=1)e.add(String.fromCharCode(a));e.add(String.fromCharCode(r)),e.add(String.fromCharCode(n));var f,c,s,h=g(),v=(f=h,c=0,s=0,{write:function(t,r){if(t>>>r!=0)throw"length over";for(;c+r>=8;)f.writeByte(255&(t<<c|s)),r-=8-c,t>>>=8-c,s=0,c=0;s|=t<<c,c+=r},flush:function(){c>0&&f.writeByte(s)}});v.write(r,i);var d=0,l=String.fromCharCode(o[d]);for(d+=1;d<o.length;){var w=String.fromCharCode(o[d]);d+=1,e.contains(l+w)?l+=w:(v.write(e.indexOf(l),i),e.size()<4095&&(e.size()==1<<i&&(i+=1),e.add(l+w)),l=w)}return v.write(e.indexOf(l),i),v.write(n,i),v.flush(),h.toByteArray()},u=function(){var t={},r=0,n={add:function(i){if(n.contains(i))throw"dup key:"+i;t[i]=r,r+=1},size:function(){return r},indexOf:function(r){return t[r]},contains:function(r){return void 0!==t[r]}};return n};return e}(t,r),o=0;o<r;o+=1)for(var e=0;e<t;e+=1)i.setPixel(e,o,n(e,o));var a=g();i.write(a);for(var u=function(){var t=0,r=0,n=0,i="",o={},e=function(t){i+=String.fromCharCode(a(63&t))},a=function(t){if(t<0);else{if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw"n:"+t};return o.writeByte=function(i){for(t=t<<8|255&i,r+=8,n+=1;r>=6;)e(t>>>r-6),r-=6},o.flush=function(){if(r>0&&(e(t<<6-r),t=0,r=0),n%3!=0)for(var o=3-n%3,a=0;a<o;a+=1)i+="="},o.toString=function(){return i},o}(),f=a.toByteArray(),c=0;c<f.length;c+=1)u.writeByte(f[c]);return u.flush(),"data:image/gif;base64,"+u};return t}();o.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?r.push(i):i<2048?r.push(192|i>>6,128|63&i):i<55296||i>=57344?r.push(224|i>>12,128|i>>6&63,128|63&i):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return r}(t)},void 0===(i="function"==typeof(n=function(){return o})?n.apply(r,[]):n)||(t.exports=i)},676:(t,r,n)=>{n.d(r,{default:()=>P});var i=function(){return(i=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o=function(){for(var t=0,r=0,n=arguments.length;r<n;r++)t+=arguments[r].length;var i=Array(t),o=0;for(r=0;r<n;r++)for(var e=arguments[r],a=0,u=e.length;a<u;a++,o++)i[o]=e[a];return i},e=function(t){return!!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!r.length)return t;var u=r.shift();return void 0!==u&&e(t)&&e(u)?(t=i({},t),Object.keys(u).forEach((function(r){var n=t[r],i=u[r];t[r]=Array.isArray(n)&&Array.isArray(i)?i:e(n)&&e(i)?a(Object.assign({},n),i):i})),a.apply(void 0,o([t],r))):t}function u(t,r){var n=document.createElement("a");n.download=r,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function f(t){return r=this,void 0,i=function(){return function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}}(this,(function(){return[2,new Promise((function(r){var n=new XMLHttpRequest;n.onload=function(){var t=new FileReader;t.onloadend=function(){r(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}))]}))},new((n=void 0)||(n=Promise))((function(t,o){function e(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(r){var i;r.done?t(r.value):(i=r.value,i instanceof n?i:new n((function(t){t(i)}))).then(e,a)}u((i=i.apply(r,[])).next())}));var r,n,i}const c={L:.07,M:.15,Q:.25,H:.3};var s=function(){return(s=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const h=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"dots":o=this._drawDot;break;case"classy":o=this._drawClassy;break;case"classy-rounded":o=this._drawClassyRounded;break;case"rounded":o=this._drawRounded;break;case"extra-rounded":o=this._drawExtraRounded;break;case"square":default:o=this._drawSquare}o.call(this,{x:t,y:r,size:n,getNeighbor:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._basicSideRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},t.prototype._basicCornerRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._basicCornerExtraRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},t.prototype._basicCornersRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawExtraRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawClassy=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t}();var v=function(){return(v=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const d=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"extra-rounded":o=this._drawExtraRounded;break;case"dot":default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+(i+n/2)+" "+o+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+e+"a "+(n/2-e)+" "+(n/2-e)+" 0 1 1 -0.1 0Z")}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n+"zM "+(i+e)+" "+(o+e)+"h "+(n-2*e)+"v "+(n-2*e)+"h "+(2*e-n)+"z")}}))},t.prototype._basicExtraRounded=function(t){var r=this,n=t.x,i=t.y,o=t.size/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+n+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(n+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawExtraRounded=function(t){this._basicExtraRounded({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}();var l=function(){return(l=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const w=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"dot":default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}(),g="circle";var p=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},y=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}},m=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],M=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const b=function(){function t(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this._element},t.prototype.drawQR=function(t){return p(this,void 0,void 0,(function(){var r,n,i,o,e,a,u,f=this;return y(this,(function(s){switch(s.label){case 0:return r=t.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,i=this._options.shape===g?n/Math.sqrt(2):n,o=Math.floor(i/r),e={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(s.sent(),!this._image)return[2];a=this._options,u=Math.floor(a.imageOptions.imageSize*c[a.qrOptions.errorCorrectionLevel]*r*r),e=function(t){var r=t.originalHeight,n=t.originalWidth,i=t.maxHiddenDots,o=t.maxHiddenAxisDots,e=t.dotSize,a={x:0,y:0},u={x:0,y:0};if(r<=0||n<=0||i<=0||e<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var f=r/n;return a.x=Math.floor(Math.sqrt(i/f)),a.x<=0&&(a.x=1),o&&o<a.x&&(a.x=o),a.x%2==0&&a.x--,u.x=a.x*e,a.y=1+2*Math.ceil((a.x*f-1)/2),u.y=Math.round(u.x*f),(a.y*a.x>i||o&&o<a.y)&&(o&&o<a.y?(a.y=o,a.y%2==0&&a.x--):a.y-=2,u.y=a.y*e,a.x=1+2*Math.ceil((a.y/f-1)/2),u.x=Math.round(u.y/f)),{height:u.y,width:u.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:u,maxHiddenAxisDots:r-14,dotSize:o}),s.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,n){var i,o,a,u,c,s;return!(f._options.imageOptions.hideBackgroundDots&&t>=(r-e.hideXDots)/2&&t<(r+e.hideXDots)/2&&n>=(r-e.hideYDots)/2&&n<(r+e.hideYDots)/2||(null===(i=m[t])||void 0===i?void 0:i[n])||(null===(o=m[t-r+7])||void 0===o?void 0:o[n])||(null===(a=m[t])||void 0===a?void 0:a[n-r+7])||(null===(u=M[t])||void 0===u?void 0:u[n])||(null===(c=M[t-r+7])||void 0===c?void 0:c[n])||(null===(s=M[t])||void 0===s?void 0:s[n-r+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:e.width,height:e.height,count:r,dotSize:o})]:[3,4];case 3:s.sent(),s.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,r,n,i=this._options;if(this._element){var o=null===(t=i.backgroundOptions)||void 0===t?void 0:t.gradient,e=null===(r=i.backgroundOptions)||void 0===r?void 0:r.color;if((o||e)&&this._createColor({options:o,color:e,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"background-color"}),null===(n=i.backgroundOptions)||void 0===n?void 0:n.round){var a=Math.min(i.width,i.height),u=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),u.setAttribute("x",String((i.width-a)/2)),u.setAttribute("y",String((i.height-a)/2)),u.setAttribute("width",String(a)),u.setAttribute("height",String(a)),u.setAttribute("rx",String(a/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(u)}}},t.prototype.drawDots=function(t){var r,n,i=this;if(!this._qr)throw"QR code is not defined";var o=this._options,e=this._qr.getModuleCount();if(e>o.width||e>o.height)throw"The canvas is too small.";var a=Math.min(o.width,o.height)-2*o.margin,u=o.shape===g?a/Math.sqrt(2):a,f=Math.floor(u/e),c=Math.floor((o.width-e*f)/2),s=Math.floor((o.height-e*f)/2),v=new h({svg:this._element,type:o.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(r=o.dotsOptions)||void 0===r?void 0:r.gradient,color:o.dotsOptions.color,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:"dot-color"});for(var d=function(r){for(var o=function(o){return t&&!t(r,o)?"continue":(null===(n=l._qr)||void 0===n?void 0:n.isDark(r,o))?(v.draw(c+r*f,s+o*f,f,(function(n,a){return!(r+n<0||o+a<0||r+n>=e||o+a>=e)&&!(t&&!t(r+n,o+a))&&!!i._qr&&i._qr.isDark(r+n,o+a)})),void(v._element&&l._dotsClipPath&&l._dotsClipPath.appendChild(v._element))):"continue"},a=0;a<e;a++)o(a)},l=this,w=0;w<e;w++)d(w);if(o.shape===g){var p=Math.floor((a/f-e)/2),y=e+2*p,m=c-p*f,M=s-p*f,b=[],x=Math.floor(y/2);for(w=0;w<y;w++){b[w]=[];for(var S=0;S<y;S++)b[w][S]=w>=p-1&&w<=y-p&&S>=p-1&&S<=y-p||Math.sqrt((w-x)*(w-x)+(S-x)*(S-x))>x?0:this._qr.isDark(S-2*p<0?S:S>=e?S-2*p:S-p,w-2*p<0?w:w>=e?w-2*p:w-p)?1:0}var k=function(t){for(var r=function(r){if(!b[t][r])return"continue";v.draw(m+t*f,M+r*f,f,(function(n,i){var o;return!!(null===(o=b[t+n])||void 0===o?void 0:o[r+i])})),v._element&&z._dotsClipPath&&z._dotsClipPath.appendChild(v._element)},n=0;n<y;n++)r(n)},z=this;for(w=0;w<y;w++)k(w)}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var r=this._options;if(!this._element)throw"Element code is not defined";var n=this._qr.getModuleCount(),i=Math.min(r.width,r.height)-2*r.margin,o=r.shape===g?i/Math.sqrt(2):i,e=Math.floor(o/n),a=7*e,u=3*e,f=Math.floor((r.width-n*e)/2),c=Math.floor((r.height-n*e)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(i){var o,s,v,l,g,p,y,b,x,S,k,z,A=i[0],O=i[1],j=i[2],q=f+A*e*(n-7),B=c+O*e*(n-7),L=t._dotsClipPath,R=t._dotsClipPath;if(((null===(o=r.cornersSquareOptions)||void 0===o?void 0:o.gradient)||(null===(s=r.cornersSquareOptions)||void 0===s?void 0:s.color))&&((L=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+A+"-"+O),t._defs.appendChild(L),t._cornersSquareClipPath=t._cornersDotClipPath=R=L,t._createColor({options:null===(v=r.cornersSquareOptions)||void 0===v?void 0:v.gradient,color:null===(l=r.cornersSquareOptions)||void 0===l?void 0:l.color,additionalRotation:j,x:q,y:B,height:a,width:a,name:"corners-square-color-"+A+"-"+O})),null===(g=r.cornersSquareOptions)||void 0===g?void 0:g.type){var P=new d({svg:t._element,type:r.cornersSquareOptions.type});P.draw(q,B,a,j),P._element&&L&&L.appendChild(P._element)}else for(var D=new h({svg:t._element,type:r.dotsOptions.type}),N=function(t){for(var r=function(r){if(!(null===(p=m[t])||void 0===p?void 0:p[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=m[t+n])||void 0===o?void 0:o[r+i])})),D._element&&L&&L.appendChild(D._element)},n=0;n<m[t].length;n++)r(n)},Q=0;Q<m.length;Q++)N(Q);if(((null===(y=r.cornersDotOptions)||void 0===y?void 0:y.gradient)||(null===(b=r.cornersDotOptions)||void 0===b?void 0:b.color))&&((R=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+A+"-"+O),t._defs.appendChild(R),t._cornersDotClipPath=R,t._createColor({options:null===(x=r.cornersDotOptions)||void 0===x?void 0:x.gradient,color:null===(S=r.cornersDotOptions)||void 0===S?void 0:S.color,additionalRotation:j,x:q+2*e,y:B+2*e,height:u,width:u,name:"corners-dot-color-"+A+"-"+O})),null===(k=r.cornersDotOptions)||void 0===k?void 0:k.type){var E=new w({svg:t._element,type:r.cornersDotOptions.type});E.draw(q+2*e,B+2*e,u,j),E._element&&R&&R.appendChild(E._element)}else{D=new h({svg:t._element,type:r.dotsOptions.type});var G=function(t){for(var r=function(r){if(!(null===(z=M[t])||void 0===z?void 0:z[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=M[t+n])||void 0===o?void 0:o[r+i])})),D._element&&R&&R.appendChild(D._element)},n=0;n<M[t].length;n++)r(n)};for(Q=0;Q<M.length;Q++)G(Q)}}))},t.prototype.loadImage=function(){var t=this;return new Promise((function(r,n){var i=t._options,o=new Image;if(!i.image)return n("Image is not defined");"string"==typeof i.imageOptions.crossOrigin&&(o.crossOrigin=i.imageOptions.crossOrigin),t._image=o,o.onload=function(){r()},o.src=i.image}))},t.prototype.drawImage=function(t){var r=t.width,n=t.height,i=t.count,o=t.dotSize;return p(this,void 0,void 0,(function(){var t,e,a,u,c,s,h,v,d;return y(this,(function(l){switch(l.label){case 0:return t=this._options,e=Math.floor((t.width-i*o)/2),a=Math.floor((t.height-i*o)/2),u=e+t.imageOptions.margin+(i*o-r)/2,c=a+t.imageOptions.margin+(i*o-n)/2,s=r-2*t.imageOptions.margin,h=n-2*t.imageOptions.margin,(v=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(u)),v.setAttribute("y",String(c)),v.setAttribute("width",s+"px"),v.setAttribute("height",h+"px"),[4,f(t.image||"")];case 1:return d=l.sent(),v.setAttribute("href",d||""),this._element.appendChild(v),[2]}}))}))},t.prototype._createColor=function(t){var r=t.options,n=t.color,i=t.additionalRotation,o=t.x,e=t.y,a=t.height,u=t.width,f=t.name,c=u>a?u:a,s=document.createElementNS("http://www.w3.org/2000/svg","rect");if(s.setAttribute("x",String(o)),s.setAttribute("y",String(e)),s.setAttribute("height",String(a)),s.setAttribute("width",String(u)),s.setAttribute("clip-path","url('#clip-path-"+f+"')"),r){var h;if("radial"===r.type)(h=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("fx",String(o+u/2)),h.setAttribute("fy",String(e+a/2)),h.setAttribute("cx",String(o+u/2)),h.setAttribute("cy",String(e+a/2)),h.setAttribute("r",String(c/2));else{var v=((r.rotation||0)+i)%(2*Math.PI),d=(v+2*Math.PI)%(2*Math.PI),l=o+u/2,w=e+a/2,g=o+u/2,p=e+a/2;d>=0&&d<=.25*Math.PI||d>1.75*Math.PI&&d<=2*Math.PI?(l-=u/2,w-=a/2*Math.tan(v),g+=u/2,p+=a/2*Math.tan(v)):d>.25*Math.PI&&d<=.75*Math.PI?(w-=a/2,l-=u/2/Math.tan(v),p+=a/2,g+=u/2/Math.tan(v)):d>.75*Math.PI&&d<=1.25*Math.PI?(l+=u/2,w+=a/2*Math.tan(v),g-=u/2,p-=a/2*Math.tan(v)):d>1.25*Math.PI&&d<=1.75*Math.PI&&(w+=a/2,l+=u/2/Math.tan(v),p-=a/2,g-=u/2/Math.tan(v)),(h=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("x1",String(Math.round(l))),h.setAttribute("y1",String(Math.round(w))),h.setAttribute("x2",String(Math.round(g))),h.setAttribute("y2",String(Math.round(p)))}r.colorStops.forEach((function(t){var r=t.offset,n=t.color,i=document.createElementNS("http://www.w3.org/2000/svg","stop");i.setAttribute("offset",100*r+"%"),i.setAttribute("stop-color",n),h.appendChild(i)})),s.setAttribute("fill","url('#"+f+"')"),this._defs.appendChild(h)}else n&&s.setAttribute("fill",n);this._element.appendChild(s)},t}(),x="canvas";for(var S={},k=0;k<=40;k++)S[k]=k;const z={type:x,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:S[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var A=function(){return(A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};function O(t){var r=A({},t);if(!r.colorStops||!r.colorStops.length)throw"Field 'colorStops' is required in gradient";return r.rotation=r.rotation?Number(r.rotation):0,r.colorStops=r.colorStops.map((function(t){return A(A({},t),{offset:Number(t.offset)})})),r}function j(t){var r=A({},t);return r.width=Number(r.width),r.height=Number(r.height),r.margin=Number(r.margin),r.imageOptions=A(A({},r.imageOptions),{hideBackgroundDots:Boolean(r.imageOptions.hideBackgroundDots),imageSize:Number(r.imageOptions.imageSize),margin:Number(r.imageOptions.margin)}),r.margin>Math.min(r.width,r.height)&&(r.margin=Math.min(r.width,r.height)),r.dotsOptions=A({},r.dotsOptions),r.dotsOptions.gradient&&(r.dotsOptions.gradient=O(r.dotsOptions.gradient)),r.cornersSquareOptions&&(r.cornersSquareOptions=A({},r.cornersSquareOptions),r.cornersSquareOptions.gradient&&(r.cornersSquareOptions.gradient=O(r.cornersSquareOptions.gradient))),r.cornersDotOptions&&(r.cornersDotOptions=A({},r.cornersDotOptions),r.cornersDotOptions.gradient&&(r.cornersDotOptions.gradient=O(r.cornersDotOptions.gradient))),r.backgroundOptions&&(r.backgroundOptions=A({},r.backgroundOptions),r.backgroundOptions.gradient&&(r.backgroundOptions.gradient=O(r.backgroundOptions.gradient))),r}var q=n(192),B=n.n(q),L=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},R=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}};const P=function(){function t(t){this._options=t?j(a(z,t)):z,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype._setupSvg=function(){var t=this;if(this._qr){var r=new b(this._options);this._svg=r.getElement(),this._svgDrawingPromise=r.drawQR(this._qr).then((function(){var n;t._svg&&(null===(n=t._extension)||void 0===n||n.call(t,r.getElement(),t._options))}))}},t.prototype._setupCanvas=function(){var t,r=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then((function(){if(r._svg){var t=r._svg,n=(new XMLSerializer).serializeToString(t),i="data:image/svg+xml;base64,"+btoa(n),o=new Image;return new Promise((function(t){o.onload=function(){var n,i;null===(i=null===(n=r._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===i||i.drawImage(o,0,0),t()},o.src=i}))}})))},t.prototype._getElement=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){return R(this,(function(r){switch(r.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==t.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return r.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return r.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(r){t._clearContainer(this._container),this._options=r?j(a(this._options,r)):this._options,this._options.data&&(this._qr=B()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(t):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===x?this._setupCanvas():this._setupSvg(),this.append(this._container))},t.prototype.append=function(t){if(t){if("function"!=typeof t.appendChild)throw"Container should be a single DOM node";this._options.type===x?this._canvas&&t.appendChild(this._canvas):this._svg&&t.appendChild(this._svg),this._container=t}},t.prototype.applyExtension=function(t){if(!t)throw"Extension function should be defined.";this._extension=t,this.update()},t.prototype.deleteExtension=function(){this._extension=void 0,this.update()},t.prototype.getRawData=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){var r,n,i;return R(this,(function(o){switch(o.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(t)];case 1:return(r=o.sent())?"svg"===t.toLowerCase()?(n=new XMLSerializer,i=n.serializeToString(r),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+i],{type:"image/svg+xml"})]):[2,new Promise((function(n){return r.toBlob(n,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return L(this,void 0,void 0,(function(){var r,n,i,o,e;return R(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return r="png",n="qr","string"==typeof t?(r=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(n=t.name),t.extension&&(r=t.extension)),[4,this._getElement(r)];case 1:return(i=a.sent())?("svg"===r.toLowerCase()?(o=new XMLSerializer,e='<?xml version="1.0" standalone="no"?>\r\n'+(e=o.serializeToString(i)),u("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),n+".svg")):u(i.toDataURL("image/"+r),n+"."+r),[2]):[2]}}))}))},t}()}},r={};function n(i){if(r[i])return r[i].exports;var o=r[i]={exports:{}};return t[i](o,o.exports,n),o.exports}return n.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return n.d(r,{a:r}),r},n.d=(t,r)=>{for(var i in r)n.o(r,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},n.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),n(676)})().default}(r={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),r.exports));export{n as Q}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as t,c as e}from"./p-5ae5f952.js";import{l as n,g as a,a as s,b as o}from"./p-ea783014.js";import{Q as r}from"./p-0be4566d.js";import{R as l,c as d,b as p}from"./p-2cd7b062.js";const h=class{constructor(t){i(this,t),this.qrData=void 0,this.size=256,this.logoSize=0,this.logoSrc=void 0,this.qrColor="#1E1E20",this.rounded=!0}componentDidLoad(){new r({data:this.qrData,width:this.size,height:this.size,image:this.logoSize>0?this.logoSrc||n:void 0,margin:10,type:"svg",dotsOptions:{color:this.qrColor,type:this.rounded?"dots":"square"},cornersSquareOptions:{type:this.rounded?"extra-rounded":"square"},cornersDotOptions:{type:this.rounded?"dot":"square"},imageOptions:{margin:2,imageSize:this.logoSize}}).append(this.qr)}render(){return t("div",{ref:i=>{this.qr=i}})}},m=i=>{const{modalHeight:e,successLoginLabel:n}=i;return t("div",{class:"success",style:{height:e?(null==e?void 0:e.toString())+"px":"300px"}},t("img",{src:a,height:52,width:52}),t("p",{class:"successMsg"},n))},c=i=>{var e;const{errorMessage:n,modalWidth:a,clickInsideBoxLabel:r,refreshQrLabel:l,scanQrLabel:d,waitingStartSessionLabel:p,display:h,renderRetryQR:m}=i;return t("div",{class:"reload",style:{width:(a-48).toString()+"px",height:a?(null===(e=a-48)||void 0===e?void 0:e.toString())+"px":""}},t("div",{id:"notify",onClick:()=>h()},t("img",{src:s,height:24,width:24}),t("p",{class:"notify-text"},r," "),t("p",{class:"notify-text bold"},n?l:d),n&&t("div",{class:"alert",style:{width:(a-48).toString()+"px"}},t("img",{src:o,height:24,width:24}),t("p",null,n))),t("div",{id:"qrwait"},m(p)))},g=()=>t("div",{class:"containerLoader"},t("div",{class:"loader"},t("div",{class:"loader__item loader__item__1"}),t("div",{class:"loader__item loader__item__2"}),t("div",{class:"loader__item loader__item__3"}),t("div",{class:"loader__item loader__item__4"}),t("div",{class:"loader__item loader__item__5"}),t("div",{class:"loader__item loader__item__6"}),t("div",{class:"loader__item loader__item__7"}),t("div",{class:"loader__item loader__item__8"}))),x=i=>{var e;const{modalWidth:n,readQrMessages:a,renderQR:s,url:o,sizeQR:r}=i;return t("div",{class:"blured",style:{width:(n-48).toString()+"px",height:n?(null===(e=n-48)||void 0===e?void 0:e.toString())+"px":""}},t("div",{id:"notify"},t(g,null),t("p",{class:"notify-text"},null==a?void 0:a.title," "),t("p",{class:"notify-text bold"},null==a?void 0:a.description)),t("div",{id:"qrwait"},s(o,!1,r)))},u=i=>{const{value:e,useLogo:n,logoSrc:a,size:s}=i;return t("gataca-qrdisplay",{qrData:e,rounded:!0,size:s,"logo-size":n?.33:0,"logo-src":a})},f=class{constructor(t){i(this,t),this.gatacaLoginCompleted=e(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=e(this,"gatacaLoginFailed",7),this.checkStatus=void 0,this.createSession=void 0,this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.autostart=!0,this.autorefresh=!1,this.v="3",this.qrModalTitle="Quick Access",this.modalTitleColor="#4745B7",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideModalTexts=!1,this.hideModalBoxShadow=!1,this.hideBrandTitle=!1,this.logoSize=0,this.logoSrc=n,this.qrSize=300,this.modalWidth=300,this.modalHeight=void 0,this.qrCodeExpiredLabel="QR Code expired",this.credentialsNotValidatedLabel="User credentials not validated",this.clickInsideBoxLabel="Click inside the box to",this.refreshQrLabel="Refresh QR Code",this.scanQrLabel="Scan QR Code",this.userNotScanInTimeErrorLabel="User did not scan the QR in the allowed time",this.credsNotValidatedErrorLabel="Provided user credentials couldn't be validated",this.failedLoginErrorLabel="No successful login",this.successLoginLabel="Successful Connection!",this.byBrandLabel="by Gataca",this.waitingStartSessionLabel="waiting to start a session",this.readQrTitle="Processing...",this.readQrDescription="Please wait a moment",this.hideQrModalDescription=!1,this.sessionTimeout=300,this.pollingFrequency=3,this.dynamicLink=!0,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=l.NOT_STARTED}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){await this.getSessionId(),this.result=l.ONGOING,this.poll().then((i=>{this.result=l.SUCCESS,this.sessionData=i,this.gatacaLoginCompleted.emit(i),this.successCallback(i)})).catch((i=>{this.clean();let t=i===l.EXPIRED;if(t&&this.autorefresh)this.display();else if(i!==l.NOT_STARTED){let e=t?new Error(this.userNotScanInTimeErrorLabel):new Error(this.credsNotValidatedErrorLabel);this.result=i,this.gatacaLoginFailed.emit(e),this.errorCallback(e)}})),d()&&this.dynamicLink&&(window.location.href=this.getLink())}async stop(){this.clean(),(this.result===l.ONGOING||l.READ)&&(this.result=l.NOT_STARTED)}clean(){this.sessionData=void 0,this.sessionId=void 0}async getSessionData(){return this.sessionData?Promise.resolve(this.sessionData):Promise.reject(new Error(this.failedLoginErrorLabel))}async getSessionId(){if(this.sessionId)return this.sessionId;let{sessionId:i,authenticationRequest:t}=await this.createSession();return this.sessionId=i,this.authenticationRequest=t,this.sessionId}getLink(){return"2"===this.v?this.authenticationRequest:"https://api.gataca.io/qr/redirect.html?dl="+p(this.authenticationRequest)}async poll(){let i=(new Date).getTime()+1e3*(this.sessionTimeout||300),t=1e3*(this.pollingFrequency||3),e=this,n=async function(a,s){let{result:o,data:r}=await(async i=>{if(i.result===l.NOT_STARTED)return{result:l.NOT_STARTED};let t=await i.getSessionId();return i.checkStatus(t)})(e);switch(o){case l.SUCCESS:a(r);break;case l.READ:e.result=l.READ;case l.ONGOING:e.sessionTimeout>0&&(new Date).getTime()<i?setTimeout(n,t,a,s):s(l.EXPIRED);break;default:s(o)}};return new Promise(n)}renderQRSection(){switch(this.result){case l.NOT_STARTED:return this.renderRetryButton();case l.ONGOING:return this.renderQR(this.getLink(),!0);case l.EXPIRED:return this.renderRetryButton(this.qrCodeExpiredLabel);case l.FAILED:return this.renderRetryButton(this.credentialsNotValidatedLabel);case l.SUCCESS:return this.renderSuccess();case l.READ:return this.renderReadQR({title:null==this?void 0:this.readQrTitle,description:null==this?void 0:this.readQrDescription})}}renderSuccess(){return t(m,{modalHeight:null==this?void 0:this.modalHeight,successLoginLabel:null==this?void 0:this.successLoginLabel})}renderRetryButton(i){return t(c,{errorMessage:i,modalWidth:null==this?void 0:this.modalWidth,clickInsideBoxLabel:null==this?void 0:this.clickInsideBoxLabel,refreshQrLabel:null==this?void 0:this.refreshQrLabel,scanQrLabel:null==this?void 0:this.scanQrLabel,waitingStartSessionLabel:null==this?void 0:this.waitingStartSessionLabel,display:this.display.bind(this),renderRetryQR:this.renderRetryQR.bind(this)})}renderReadQR(i){return t(x,{modalWidth:null==this?void 0:this.modalWidth,readQrMessages:i,url:this.getLink(),sizeQR:(null==this?void 0:this.qrSize)?(null==this?void 0:this.qrSize)-50:void 0,renderQR:this.renderQR})}renderQR(i,e){return t(u,{value:i,useLogo:e,size:(null==this?void 0:this.qrSize)||void 0,logoSrc:null==this?void 0:this.logoSrc})}renderRetryQR(i,e){return t(u,{value:i,useLogo:e,size:(null==this?void 0:this.qrSize)?(null==this?void 0:this.qrSize)-50:void 0,logoSrc:null==this?void 0:this.logoSrc})}render(){var i,e;return t("div",{class:"popUpContainer"},t("div",{class:`is-visible modal-window ${this.hideModalTexts?"":"large-modal"} ${this.hideModalBoxShadow?"noBoxShadow":""}`,style:{width:(this.modalWidth-2).toString()+"px",height:this.modalHeight?(null===(i=this.modalHeight-2)||void 0===i?void 0:i.toString())+"px":""},onClick:i=>{i.stopPropagation()}},t("div",{class:"modal-window__content"},t("div",{class:"qrTitleContainer "+(this.hideModalTexts?"hidenText":"")},t("p",{class:"qrTitle modalText",style:{color:this.modalTitleColor||"#1e1e20"}},this.qrModalTitle),!this.hideBrandTitle&&t("p",{class:"qrBrand modalText"},this.byBrandLabel," ",t("span",null,t("img",{src:n}))),this.result!==l.SUCCESS&&!this.hideQrModalDescription&&t("p",{class:"qrDescription modalText"},this.qrModalDescription)),t("div",{class:"qrSection",style:{width:this.modalWidth.toString()+"px",height:this.modalWidth?(null===(e=this.modalWidth)||void 0===e?void 0:e.toString())+"px":""}},this.renderQRSection()))))}};f.style='@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window .modalText{font-family:"Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:700}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success>img{padding-bottom:12px}.success>.successMsg{line-height:23.5px;color:var(--neutral-1000, #1e1e20);text-align:center;font-family:"Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px}.reload,.blured{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:12px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;display:flex;flex-direction:column;box-sizing:border-box;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>img{padding-bottom:12px}.alert{display:flex;flex-direction:row;justify-content:start;width:252px;position:absolute;bottom:0px;border:1px solid #ee888c;background:#ffdedf;border-radius:11px;box-sizing:border-box;padding:12px;align-items:center;gap:12px}.alert>img{margin:0}.alert>p{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;margin-top:0;line-height:16px;color:#1e1e20}.notify-text{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074;text-align:center}.containerLoader{display:flex;justify-content:center;align-items:center;width:30px;height:30px;margin-bottom:12px}.loader{position:relative;margin-left:0 !important}.loader__item{position:absolute;width:9.68px;height:4px;background:transparent;border-radius:2px}.loader__item__1{transform:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-webkit-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-moz-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-o-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);animation:blink 0.8333333333s linear 0.1041666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.1041666667s infinite;-moz-animation:blink 0.8333333333s linear 0.1041666667s infinite;-o-animation:blink 0.8333333333s linear 0.1041666667s infinite}.loader__item__2{transform:translate(-4.84px, 8.5px) rotate(90deg);-webkit-animation:translate(-4.84px, 8.5px) rotate(90deg);-moz-animation:translate(-4.84px, 8.5px) rotate(90deg);-o-animation:translate(-4.84px, 8.5px) rotate(90deg);animation:blink 0.8333333333s linear 0.2083333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.2083333333s infinite;-moz-animation:blink 0.8333333333s linear 0.2083333333s infinite;-o-animation:blink 0.8333333333s linear 0.2083333333s infinite}.loader__item__3{transform:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-webkit-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-moz-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-o-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);animation:blink 0.8333333333s linear 0.3125s infinite;-webkit-animation:blink 0.8333333333s linear 0.3125s infinite;-moz-animation:blink 0.8333333333s linear 0.3125s infinite;-o-animation:blink 0.8333333333s linear 0.3125s infinite}.loader__item__4{transform:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-webkit-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-moz-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-o-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);animation:blink 0.8333333333s linear 0.4166666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.4166666667s infinite;-moz-animation:blink 0.8333333333s linear 0.4166666667s infinite;-o-animation:blink 0.8333333333s linear 0.4166666667s infinite}.loader__item__5{transform:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-webkit-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-moz-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-o-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);animation:blink 0.8333333333s linear 0.5208333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.5208333333s infinite;-moz-animation:blink 0.8333333333s linear 0.5208333333s infinite;-o-animation:blink 0.8333333333s linear 0.5208333333s infinite}.loader__item__6{transform:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-webkit-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-moz-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-o-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);animation:blink 0.8333333333s linear 0.625s infinite;-webkit-animation:blink 0.8333333333s linear 0.625s infinite;-moz-animation:blink 0.8333333333s linear 0.625s infinite;-o-animation:blink 0.8333333333s linear 0.625s infinite}.loader__item__7{transform:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-webkit-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-moz-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-o-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);animation:blink 0.8333333333s linear 0.7291666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.7291666667s infinite;-moz-animation:blink 0.8333333333s linear 0.7291666667s infinite;-o-animation:blink 0.8333333333s linear 0.7291666667s infinite}.loader__item__8{transform:translate(5.6631628524px, -1.99913122px) rotate(360deg);-webkit-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-moz-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-o-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);animation:blink 0.8333333333s linear 0.8333333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.8333333333s infinite;-moz-animation:blink 0.8333333333s linear 0.8333333333s infinite;-o-animation:blink 0.8333333333s linear 0.8333333333s infinite}.loader__item__8{max-width:8.5px}@keyframes blink{0%{background:#4745B7}100%{background:#CCCBF8}}@keyframes rotate{0%{transform:rotate(0deg)}100%{background:rotate(360deg)}}';export{f as gataca_qr,h as gataca_qrdisplay}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e,t,n=!1;const l={},s=e=>"object"==(e=typeof e)||"function"===e,o=(e,t,...n)=>{let l=null,o=!1,r=!1;const u=[],a=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!s(l))&&(l+=""),o&&r?u[u.length-1].t+=l:u.push(o?c(null,l):l),r=o)};if(a(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}if("function"==typeof e)return e(null===t?{}:t,u,i);const f=c(e,null);return f.l=t,u.length>0&&(f.o=u),f},c=(e,t)=>({i:0,u:e,t,h:null,o:null,l:null}),r={},i={forEach:(e,t)=>e.map(u).forEach(t),map:(e,t)=>e.map(u).map(t).map(a)},u=e=>({vattrs:e.l,vchildren:e.o,vkey:e.p,vname:e.m,vtag:e.u,vtext:e.t}),a=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),o(e.vtag,t,...e.vchildren||[])}const t=c(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.p=e.vkey,t.m=e.vname,t},f=(e,t,n)=>{const l=(e=>H(e).$)(e);return{emit:e=>d(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},d=(e,t,n)=>{const l=X.ce(t,n);return e.dispatchEvent(l),l},h=new WeakMap,y=e=>"sc-"+e.v,p=(e,t,n,l,o,c)=>{if(n!==l){let r=z(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,s=$(n),o=$(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const i=s(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&c||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):z(K,i)?i.slice(2):i[2]+t.slice(3),n&&X.rel(e,t,n,!1),l&&X.ael(e,t,l,!1)}},m=/\s/,$=e=>e?e.split(m):[],b=(e,t,n,s)=>{const o=11===t.h.nodeType&&t.h.host?t.h.host:t.h,c=e&&e.l||l,r=t.l||l;for(s in c)s in r||p(o,s,c[s],void 0,n,t.i);for(s in r)p(o,s,c[s],r[s],n,t.i)},w=(t,n,l)=>{const s=n.o[l];let o,c,r=0;if(null!==s.t)o=s.h=Q.createTextNode(s.t);else if(o=s.h=Q.createElement(s.u),b(null,s,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),s.o)for(r=0;r<s.o.length;++r)c=w(t,s,r),c&&o.appendChild(c);return o},v=(e,n,l,s,o,c)=>{let r,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=w(null,l,o),r&&(s[o].h=r,i.insertBefore(r,n)))},g=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.h,k(l),s.remove())},S=(e,t)=>e.u===t.u,j=(e,t)=>{const n=t.h=e.h,l=e.o,s=t.o,o=t.t;null===o?(b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,c=0,r=t.length-1,i=t[0],u=t[r],a=l.length-1,f=l[0],d=l[a];for(;o<=r&&c<=a;)null==i?i=t[++o]:null==u?u=t[--r]:null==f?f=l[++c]:null==d?d=l[--a]:S(i,f)?(j(i,f),i=t[++o],f=l[++c]):S(u,d)?(j(u,d),u=t[--r],d=l[--a]):S(i,d)?(j(i,d),e.insertBefore(i.h,u.h.nextSibling),i=t[++o],d=l[--a]):S(u,f)?(j(u,f),e.insertBefore(u.h,i.h),u=t[--r],f=l[++c]):(s=w(t&&t[c],n,c),f=l[++c],s&&i.h.parentNode.insertBefore(s,i.h));o>r?v(e,null==l[a+1]?null:l[a+1].h,n,l,c,a):c>a&&g(t,o,r)})(n,l,t,s):null!==s?(null!==e.t&&(n.textContent=""),v(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.t!==o&&(n.data=o)},k=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(k)},M=(e,t)=>{t&&!e.g&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.g=t)))},O=(e,t)=>{if(e.i|=16,!(4&e.i))return M(e,e.S),ce((()=>C(e,t)));e.i|=512},C=(e,t)=>{const n=e.j;return t&&(e.i|=256,e.k&&(e.k.map((([e,t])=>N(n,e,t))),e.k=null)),T(void 0,(()=>P(e,n,t)))},P=async(e,t,n)=>{const l=e.$,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.$,l=t.i,s=((e,t)=>{let n=y(t);const l=J.get(n);if(e=11===e.nodeType?e:Q,l)if("string"==typeof l){let t,s=h.get(e=e.head||e);s||h.set(e,s=new Set),s.has(n)||(t=Q.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);x(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>E(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},x=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.$,i=n.O||c(null,null),u=(e=>e&&e.u===r)(l)?l:o(null,null,l);t=s.tagName,u.u=null,u.i|=4,n.O=u,u.h=i.h=s.shadowRoot||s,e=s["s-sc"],j(i,u)})(n,l)}catch(e){B(e,n.$)}return null},E=e=>{const t=e.$,n=e.j,l=e.S;64&e.i||(e.i|=64,q(t),N(n,"componentDidLoad"),e.C(t),l||L()),e.P(t),e.g&&(e.g(),e.g=void 0),512&e.i&&oe((()=>O(e,!1))),e.i&=-517},L=()=>{q(Q.documentElement),oe((()=>d(K,"appload",{detail:{namespace:"gatacaqr"}})))},N=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){B(e)}},T=(e,t)=>e&&e.then?e.then(t):t(),q=e=>e.classList.add("hydrated"),A=(e,t,n)=>{if(t.L){const l=Object.entries(t.L),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>H(this).N.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=H(e),c=o.N.get(t),r=o.i,i=o.j;n=((e,t)=>null==e||s(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.L[t][0]),8&r&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n)||(o.N.set(t,n),i&&2==(18&r)&&O(o,!1))})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=H(this);return n.T.then((()=>n.j[e](...t)))}})})),1&n){const t=new Map;o.attributeChangedCallback=function(e,n,l){X.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},F=(e,t={})=>{const n=[],l=t.exclude||[],s=K.customElements,o=Q.head,c=o.querySelector("meta[charset]"),r=Q.createElement("style"),i=[];let u,a=!0;Object.assign(X,t),X.q=new URL(t.resourcesUrl||"./",Q.baseURI).href,e.map((e=>{e[1].map((t=>{const o={i:t[0],v:t[1],L:t[2],A:t[3]};o.L=t[2],o.A=t[3];const c=o.v,r=class extends HTMLElement{constructor(e){super(e),_(e=this,o),1&o.i&&e.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),a?i.push(this):X.jmp((()=>(e=>{if(0==(1&X.i)){const t=H(e),n=t.M,l=()=>{};if(1&t.i)R(e,t,n.A);else{t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){M(t,t.S=n);break}}n.L&&Object.entries(n.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.i)){{if(t.i|=32,(s=I(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(A(s,n,2),s.isProxied=!0);const e=()=>{};t.i|=8;try{new s(t)}catch(e){B(e)}t.i&=-9,e()}if(s.style){let e=s.style;const t=y(n);if(!J.has(t)){const l=()=>{};((e,t,n)=>{let l=J.get(e);Z&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,J.set(e,l)})(t,e,!!(1&n.i)),l()}}}const o=t.S,c=()=>O(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){X.jmp((()=>(()=>{if(0==(1&X.i)){const e=H(this),t=e.j;e.F&&(e.F.map((e=>e())),e.F=void 0),N(t,"disconnectedCallback")}})()))}componentOnReady(){return H(this).R}};o.U=e[0],l.includes(c)||s.get(c)||(n.push(c),s.define(c,A(r,o,1)))}))})),r.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),o.insertBefore(r,c?c.nextSibling:o.firstChild),a=!1,i.length?i.map((e=>e.connectedCallback())):X.jmp((()=>u=setTimeout(L,30)))},R=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=e,c=U(t,s),r=W(n);X.ael(o,l,c,r),(t.F=t.F||[]).push((()=>X.rel(o,l,c,r)))}))},U=(e,t)=>n=>{try{256&e.i?e.j[t](n):(e.k=e.k||[]).push([t,n])}catch(e){B(e)}},W=e=>0!=(2&e),D=new WeakMap,H=e=>D.get(e),V=(e,t)=>D.set(t.j=e,t),_=(e,t)=>{const n={i:0,$:e,M:t,N:new Map};return n.T=new Promise((e=>n.P=e)),n.R=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],R(e,n,t.A),D.set(e,n)},z=(e,t)=>t in e,B=(e,t)=>(0,console.error)(e,t),G=new Map,I=e=>{const t=e.v.replace(/-/g,"_"),n=e.U,l=G.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(G.set(n,e),e[t])),B)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},J=new Map,K="undefined"!=typeof window?window:{},Q=K.document||{head:{}},X={i:0,q:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},Y=e=>Promise.resolve(e),Z=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ee=[],te=[],ne=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&X.i?oe(se):X.raf(se))},le=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){B(e)}e.length=0},se=()=>{le(ee),le(te),(n=ee.length>0)&&X.raf(se)},oe=e=>Y().then(e),ce=ne(te,!0);export{F as b,f as c,o as h,Y as p,V as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as a}from"./p-5ae5f952.js";import"./p-0be4566d.js";import{R as s}from"./p-2cd7b062.js";const e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=",o=class{constructor(e){t(this,e),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(this,"gatacaLoginFailed",7),this.buttonText="Easy login",this.checkStatus=void 0,this.createSession=void 0,this.successCallback=void 0,this.errorCallback=void 0,this.handleCheckAppLoading=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.sessionTimeout=void 0,this.pollingFrequency=void 0,this.autorefresh=!1,this.v="3",this.qrModalTitle="Quick Access",this.modalTitleColor="#4745B7",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideBrandTitle=!1,this.dynamicLink=!0,this.logoSize=0,this.logoSrc=void 0,this.qrCodeExpiredLabel="QR Code expired",this.credentialsNotValidatedLabel="User credentials not validated",this.clickInsideBoxLabel="Click inside the box to",this.refreshQrLabel="Refresh QR Code",this.scanQrLabel="Scan QR Code",this.userNotScanInTimeErrorLabel="User did not scan the QR in the allowed time",this.credsNotValidatedErrorLabel="Provided user credentials couldn't be validated",this.failedLoginErrorLabel="No successful login",this.successLoginLabel="Successful Connection!",this.byBrandLabel="by Gataca",this.waitingStartSessionLabel="waiting to start a session",this.hideQrModalDescription=!1,this.open=!1,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=s.NOT_STARTED,this.qr=a("gataca-qr",{ref:t=>this.qrElement=t,checkStatus:this.checkStatus,createSession:this.createSession,successCallback:this.successCallback,errorCallback:this.errorCallback,qrRole:this.qrRole,callbackServer:this.callbackServer,sessionTimeout:this.sessionTimeout,pollingFrequency:this.pollingFrequency,autostart:!0,autorefresh:this.autorefresh,v:this.v,qrModalTitle:this.qrModalTitle,qrModalDescription:this.qrModalDescription,hideBrandTitle:this.hideBrandTitle,dynamicLink:this.dynamicLink,logoSize:this.logoSize,logoSrc:this.logoSrc,modalTitleColor:this.modalTitleColor,qrCodeExpiredLabel:this.qrCodeExpiredLabel,credentialsNotValidatedLabel:this.credentialsNotValidatedLabel,clickInsideBoxLabel:this.clickInsideBoxLabel,refreshQrLabel:this.refreshQrLabel,scanQrLabel:this.scanQrLabel,userNotScanInTimeErrorLabel:this.userNotScanInTimeErrorLabel,credsNotValidatedErrorLabel:this.credsNotValidatedErrorLabel,failedLoginErrorLabel:this.failedLoginErrorLabel,successLoginLabel:this.successLoginLabel,byBrandLabel:this.byBrandLabel,waitingStartSessionLabel:this.waitingStartSessionLabel,hideQrModalDescription:this.hideQrModalDescription})}async getSessionData(){return this.qr.getSessionData()}async getSessionId(){if(this.sessionId)return this.sessionId;let{sessionId:t,authenticationRequest:i}=await this.createSession();return this.sessionId=t,this.authenticationRequest=i,this.sessionId}async startMobilePolling(){await this.getSessionId(),this.result=s.ONGOING,this.poll().then((t=>{this.result=s.SUCCESS,this.sessionData=t,this.gatacaLoginCompleted.emit(t),this.successCallback(t)})).catch((t=>{this.clean();let i=t===s.EXPIRED;if(i&&this.autorefresh)this.startMobilePolling();else if(t!==s.NOT_STARTED){let a=i?new Error(this.userNotScanInTimeErrorLabel):new Error(this.credsNotValidatedErrorLabel);this.result=t,this.gatacaLoginFailed.emit(a),this.errorCallback(a)}}))}async stop(){this.clean(),(this.result===s.ONGOING||s.READ)&&(this.result=s.NOT_STARTED)}clean(){this.sessionData=void 0,this.sessionId=void 0}renderModal(){return this.qr}async poll(){let t=(new Date).getTime()+1e3*(this.sessionTimeout||300),i=1e3*(this.pollingFrequency||3),a=this,e=async function(o,n){let{result:r,data:h}=await(async t=>{if(t.result===s.NOT_STARTED)return{result:s.NOT_STARTED};let i=await t.getSessionId();return t.checkStatus(i)})(a);switch(r){case s.SUCCESS:o(h);break;case s.READ:a.result=s.READ;case s.ONGOING:a.sessionTimeout>0&&(new Date).getTime()<t?setTimeout(e,i,o,n):n(s.EXPIRED);break;default:n(r)}};return new Promise(e)}isAppInstalled(t,i){let a,s=!1;(null==t?void 0:t.length)&&(window.location.href=t),a=setTimeout((()=>{s||setTimeout((()=>{s||i(!1),o()}),1e3)}),1500);const e=()=>{document.hidden&&(s=!0,i(!0),this.startMobilePolling(),o())};function o(){clearTimeout(a),document.removeEventListener("visibilitychange",e)}document.addEventListener("visibilitychange",e)}renderDesktopButton(){return a("div",{class:"gatacaButtonWrapper"},a("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,setTimeout((()=>{var t,i;this.open?null===(t=this.qrElement)||void 0===t||t.display():null===(i=this.qrElement)||void 0===i||i.stop()}),0)}},a("img",{src:e,class:"buttonImg",alt:this.buttonText}),a("span",null,this.buttonText)))}async getAuthRequest(){let{authenticationRequest:t}=await this.createSession();return t}renderMobileButton(t,i){let s=!1;const o=t=>{s=t,this.handleCheckAppLoading&&this.handleCheckAppLoading(t)},n=async()=>{o(!0);try{const a=await this.getAuthRequest();this.isAppInstalled(a,(a=>{a||setTimeout((()=>{this.stop(),t?window.location.href="https://play.google.com/store/apps/details?id=com.gataca.identity":i&&(window.location.href="https://apps.apple.com/us/app/gataca/id1498607616")}),500),o(!1)}))}catch(t){this.stop(),o(!1)}};return a("div",{class:"gatacaButtonWrapper"},a("button",{class:"gatacaButton",onClick:()=>{n()},disabled:s},a("img",{src:e,class:"buttonImg",alt:this.buttonText}),a("span",null,this.buttonText)))}render(){const t=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||(null===navigator||void 0===navigator?void 0:navigator.vendor)||(null===window||void 0===window?void 0:window.opera),i=/android/i.test(t),s=/iPad|iPhone|iPod/.test(t)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,e=i||s;return a("div",{class:"buttonContainer"},e&&"3"===this.v?this.renderMobileButton(i,s):this.renderDesktopButton(),this.open&&(!e||"3"===this.v)&&this.renderModal())}};o.style='@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:"Work Sans", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:"Helvetica Neue", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}';const n=class{constructor(s){t(this,s),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(this,"gatacaLoginFailed",7),this.buttonText="Easy login",this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.socketEndpoint=void 0,this.sessionTimeout=void 0,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.autostart=!0,this.autorefresh=!1,this.v="3",this.qrModalTitle="Quick Access",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideBrandTitle=!1,this.dynamicLink=!0,this.open=!1,this.qr=a("gataca-qrws",{wsOnMessage:this.wsOnMessage,wsOnOpen:this.wsOnOpen,successCallback:this.successCallback,errorCallback:this.errorCallback,qrRole:this.qrRole,callbackServer:this.callbackServer,sessionTimeout:this.sessionTimeout,socketEndpoint:this.socketEndpoint,autostart:!0,autorefresh:this.autorefresh,v:this.v,qrModalTitle:this.qrModalTitle,qrModalDescription:this.qrModalDescription,hideBrandTitle:this.hideBrandTitle,dynamicLink:this.dynamicLink})}async getSessionData(){return this.qr.getSessionData()}renderModal(){return this.qr}renderButton(){return a("div",{class:"gatacaButtonWrapper"},a("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,this.open?this.qr.display():this.qr.stop()}},a("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=",class:"buttonImg",alt:this.buttonText}),a("span",null,this.buttonText)))}render(){return a("div",{class:"buttonContainer"},this.renderButton(),this.open&&this.renderModal())}};n.style='@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:"Work Sans", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:"Helvetica Neue", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}';export{o as gataca_ssibutton,n as gataca_ssibuttonws}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as i,r as t,c as e}from"./p-5ae5f952.js";import{g as n,a,b as s,l as o}from"./p-ea783014.js";import"./p-0be4566d.js";import{R as r,c as l,b as d}from"./p-2cd7b062.js";const h=t=>{const{modalHeight:e,successLoginLabel:a}=t;return i("div",{class:"success",style:{height:e?(null==e?void 0:e.toString())+"px":"300px"}},i("img",{src:n,height:52,width:52}),i("p",{class:"successMsg"},a))},p=t=>{var e;const{errorMessage:n,modalWidth:o,clickInsideBoxLabel:r,refreshQrLabel:l,scanQrLabel:d,waitingStartSessionLabel:h,display:p,renderRetryQR:c}=t;return i("div",{class:"reload",style:{width:(o-48).toString()+"px",height:o?(null===(e=o-48)||void 0===e?void 0:e.toString())+"px":""}},i("div",{id:"notify",onClick:()=>p()},i("img",{src:a,height:24,width:24}),i("p",{class:"notify-text"},r," "),i("p",{class:"notify-text bold"},n?l:d),n&&i("div",{class:"alert",style:{width:(o-48).toString()+"px"}},i("img",{src:s,height:24,width:24}),i("p",null,n))),i("div",{id:"qrwait"},c(h)))},c=t=>{const{value:e,useLogo:n,logoSrc:a,size:s}=t;return i("gataca-qrdisplay",{qrData:e,rounded:!0,size:s,"logo-size":n?.33:0,"logo-src":a})},m=()=>i("div",{class:"containerLoader"},i("div",{class:"loader"},i("div",{class:"loader__item loader__item__1"}),i("div",{class:"loader__item loader__item__2"}),i("div",{class:"loader__item loader__item__3"}),i("div",{class:"loader__item loader__item__4"}),i("div",{class:"loader__item loader__item__5"}),i("div",{class:"loader__item loader__item__6"}),i("div",{class:"loader__item loader__item__7"}),i("div",{class:"loader__item loader__item__8"}))),g=t=>{var e;const{modalWidth:n,readQrMessages:a,renderQR:s,url:o,sizeQR:r}=t;return i("div",{class:"blured",style:{width:(n-48).toString()+"px",height:n?(null===(e=n-48)||void 0===e?void 0:e.toString())+"px":""}},i("div",{id:"notify"},i(m,null),i("p",{class:"notify-text"},null==a?void 0:a.title," "),i("p",{class:"notify-text bold"},null==a?void 0:a.description)),i("div",{id:"qrwait"},s(o,!1,r)))},x=class{constructor(i){t(this,i),this.gatacaLoginCompleted=e(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=e(this,"gatacaLoginFailed",7),this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.socketEndpoint=void 0,this.sessionTimeout=300,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.autostart=!0,this.autorefresh=!1,this.v="3",this.qrModalTitle="Quick Access",this.modalTitleColor="#4745B7",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideModalTexts=!1,this.hideModalBoxShadow=!1,this.hideBrandTitle=!1,this.logoSize=0,this.logoSrc=o,this.qrSize=300,this.modalWidth=300,this.modalHeight=void 0,this.qrCodeExpiredLabel="QR Code expired",this.credentialsNotValidatedLabel="User credentials not validated",this.clickInsideBoxLabel="Click inside the box to",this.refreshQrLabel="Refresh QR Code",this.scanQrLabel="Scan QR Code",this.userNotScanInTimeErrorLabel="User did not scan the QR in the allowed time",this.credsNotValidatedErrorLabel="Provided user credentials couldn't be validated",this.failedLoginErrorLabel="No successful login",this.successLoginLabel="Successful Connection!",this.byBrandLabel="by Gataca",this.waitingStartSessionLabel="waiting to start a session",this.readQrTitle="Processing...",this.readQrDescription="Please wait a moment",this.hideQrModalDescription=!1,this.dynamicLink=!0,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=r.NOT_STARTED}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){let i=new WebSocket(this.socketEndpoint);setTimeout((()=>{this.socket.close(1e3,"")}),1e3*this.sessionTimeout),this.socket=i,i.onopen=()=>{this.wsOnOpen&&this.wsOnOpen(this.socket)},i.onmessage=i=>{if(this.wsOnMessage)this.wsOnMessage(this.socket,i);else{let t=JSON.parse(i.data);t.sessionId&&this.handleWSResponse(t)}},i.onerror=()=>{let t=new Error("Error connecting with server");this.result=r.FAILED,this.gatacaLoginFailed.emit(t),this.errorCallback(t),i.close(1e3,"")},i.onclose=()=>{if((this.result===r.ONGOING||r.READ)&&(this.result=r.EXPIRED),this.result===r.EXPIRED)if(this.autorefresh)this.display();else{let i=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(i),this.errorCallback(i)}},l()&&this.dynamicLink&&(window.location.href=this.getLink())}sessionMsgReceived(i){this.handleWSResponse(i.detail)}handleWSResponse(i){switch(this.result=i.result,i.result){case r.ONGOING:case r.READ:this.sessionId=i.sessionId,this.authenticationRequest=i.authenticationRequest;break;case r.SUCCESS:this.sessionData=i.authenticatedUserData,this.gatacaLoginCompleted.emit(i.authenticatedUserData),this.successCallback(i.authenticatedUserData),this.socket.close(1e3,"");break;case r.FAILED:this.socket.close();let t=new Error("Provided user credentials couldn't be validated");this.gatacaLoginFailed.emit(t),this.errorCallback(t);break;case r.EXPIRED:if(this.socket.close(),this.autorefresh)this.display();else{let i=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(i),this.errorCallback(i)}}}async stop(){this.sessionData=void 0,this.sessionId=void 0,this.socket.close(1e3,"Client stopped the connection")}async getSessionData(){return this.sessionData?Promise.resolve(this.sessionData):Promise.reject(new Error("No successful login"))}getLink(){return"2"===this.v&&"connect"==this.qrRole?this.authenticationRequest:"https://api.gataca.io/qr/redirect.html?dl="+d(this.authenticationRequest)}renderQRSection(){switch(this.result){case r.NOT_STARTED:return this.renderRetryButton();case r.ONGOING:return this.renderQR(this.getLink(),!0);case r.EXPIRED:return this.renderRetryButton(this.qrCodeExpiredLabel);case r.FAILED:return this.renderRetryButton(this.credentialsNotValidatedLabel);case r.SUCCESS:return this.renderSuccess();case r.READ:return this.renderReadQR({title:null==this?void 0:this.readQrTitle,description:null==this?void 0:this.readQrDescription})}}renderSuccess(){return i(h,{modalHeight:null==this?void 0:this.modalHeight,successLoginLabel:null==this?void 0:this.successLoginLabel})}renderRetryButton(t){return i(p,{errorMessage:t,modalWidth:null==this?void 0:this.modalWidth,clickInsideBoxLabel:null==this?void 0:this.clickInsideBoxLabel,refreshQrLabel:null==this?void 0:this.refreshQrLabel,scanQrLabel:null==this?void 0:this.scanQrLabel,waitingStartSessionLabel:null==this?void 0:this.waitingStartSessionLabel,display:this.display.bind(this),renderRetryQR:this.renderRetryQR.bind(this)})}renderReadQR(t){return i(g,{modalWidth:null==this?void 0:this.modalWidth,readQrMessages:t,url:this.getLink(),sizeQR:(null==this?void 0:this.qrSize)?(null==this?void 0:this.qrSize)-50:void 0,renderQR:this.renderQR.bind(this)})}renderQR(t,e){return i(c,{value:t,useLogo:e,size:(null==this?void 0:this.qrSize)||void 0,logoSrc:null==this?void 0:this.logoSrc})}renderRetryQR(t,e){return i(c,{value:t,useLogo:e,size:(null==this?void 0:this.qrSize)?(null==this?void 0:this.qrSize)-50:void 0,logoSrc:null==this?void 0:this.logoSrc})}render(){var t,e;return i("div",{class:"popUpContainer"},i("div",{class:`is-visible modal-window ${this.hideModalTexts?"":"large-modal"} ${this.hideModalBoxShadow?"noBoxShadow":""}`,style:{width:(this.modalWidth-2).toString()+"px",height:this.modalHeight?(null===(t=this.modalHeight-2)||void 0===t?void 0:t.toString())+"px":""},onClick:i=>{i.stopPropagation()}},i("div",{class:"modal-window__content"},i("div",{class:"qrTitleContainer "+(this.hideModalTexts?"hidenText":"")},i("p",{class:"qrTitle modalText",style:{color:this.modalTitleColor||"#1e1e20"}},this.qrModalTitle),!this.hideBrandTitle&&i("p",{class:"qrBrand modalText"},this.byBrandLabel," ",i("span",null,i("img",{src:o}))),this.result!==r.SUCCESS&&!this.hideQrModalDescription&&i("p",{class:"qrDescription modalText"},this.qrModalDescription)),i("div",{class:"qrSection",style:{width:this.modalWidth.toString()+"px",height:this.modalWidth?(null===(e=this.modalWidth)||void 0===e?void 0:e.toString())+"px":""}},this.renderQRSection()))))}};x.style='@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window .modalText{font-family:"Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:700}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success>img{padding-bottom:12px}.success>.successMsg{line-height:23.5px;color:var(--neutral-1000, #1e1e20);text-align:center;font-family:"Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px}.reload,.blured{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:12px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;display:flex;flex-direction:column;box-sizing:border-box;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>img{padding-bottom:12px}.alert{display:flex;flex-direction:row;justify-content:start;width:252px;position:absolute;bottom:0px;border:1px solid #ee888c;background:#ffdedf;border-radius:11px;box-sizing:border-box;padding:12px;align-items:center;gap:12px}.alert>img{margin:0}.alert>p{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;margin-top:0;line-height:16px;color:#1e1e20}.notify-text{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074;text-align:center}.containerLoader{display:flex;justify-content:center;align-items:center;width:30px;height:30px;margin-bottom:12px}.loader{position:relative;margin-left:0 !important}.loader__item{position:absolute;width:9.68px;height:4px;background:transparent;border-radius:2px}.loader__item__1{transform:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-webkit-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-moz-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-o-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);animation:blink 0.8333333333s linear 0.1041666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.1041666667s infinite;-moz-animation:blink 0.8333333333s linear 0.1041666667s infinite;-o-animation:blink 0.8333333333s linear 0.1041666667s infinite}.loader__item__2{transform:translate(-4.84px, 8.5px) rotate(90deg);-webkit-animation:translate(-4.84px, 8.5px) rotate(90deg);-moz-animation:translate(-4.84px, 8.5px) rotate(90deg);-o-animation:translate(-4.84px, 8.5px) rotate(90deg);animation:blink 0.8333333333s linear 0.2083333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.2083333333s infinite;-moz-animation:blink 0.8333333333s linear 0.2083333333s infinite;-o-animation:blink 0.8333333333s linear 0.2083333333s infinite}.loader__item__3{transform:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-webkit-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-moz-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-o-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);animation:blink 0.8333333333s linear 0.3125s infinite;-webkit-animation:blink 0.8333333333s linear 0.3125s infinite;-moz-animation:blink 0.8333333333s linear 0.3125s infinite;-o-animation:blink 0.8333333333s linear 0.3125s infinite}.loader__item__4{transform:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-webkit-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-moz-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-o-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);animation:blink 0.8333333333s linear 0.4166666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.4166666667s infinite;-moz-animation:blink 0.8333333333s linear 0.4166666667s infinite;-o-animation:blink 0.8333333333s linear 0.4166666667s infinite}.loader__item__5{transform:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-webkit-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-moz-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-o-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);animation:blink 0.8333333333s linear 0.5208333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.5208333333s infinite;-moz-animation:blink 0.8333333333s linear 0.5208333333s infinite;-o-animation:blink 0.8333333333s linear 0.5208333333s infinite}.loader__item__6{transform:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-webkit-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-moz-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-o-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);animation:blink 0.8333333333s linear 0.625s infinite;-webkit-animation:blink 0.8333333333s linear 0.625s infinite;-moz-animation:blink 0.8333333333s linear 0.625s infinite;-o-animation:blink 0.8333333333s linear 0.625s infinite}.loader__item__7{transform:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-webkit-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-moz-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-o-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);animation:blink 0.8333333333s linear 0.7291666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.7291666667s infinite;-moz-animation:blink 0.8333333333s linear 0.7291666667s infinite;-o-animation:blink 0.8333333333s linear 0.7291666667s infinite}.loader__item__8{transform:translate(5.6631628524px, -1.99913122px) rotate(360deg);-webkit-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-moz-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-o-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);animation:blink 0.8333333333s linear 0.8333333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.8333333333s infinite;-moz-animation:blink 0.8333333333s linear 0.8333333333s infinite;-o-animation:blink 0.8333333333s linear 0.8333333333s infinite}.loader__item__8{max-width:8.5px}@keyframes blink{0%{background:#4745B7}100%{background:#CCCBF8}}@keyframes rotate{0%{transform:rotate(0deg)}100%{background:rotate(360deg)}}';export{x as gataca_qrws}
|
|
@@ -45,8 +45,8 @@ export declare class GatacaAutoQR {
|
|
|
45
45
|
/**
|
|
46
46
|
* ***Mandatory***
|
|
47
47
|
* Create session function to generate a new Session
|
|
48
|
-
* Using
|
|
49
|
-
* Using
|
|
48
|
+
* Using v="3", it can provide just a session Id
|
|
49
|
+
* Using another version, it must provide also the authentication request. The session Id is the id of the presentation definition
|
|
50
50
|
*/
|
|
51
51
|
createSession?: () => Promise<{
|
|
52
52
|
sessionId: string;
|
|
@@ -16,8 +16,8 @@ export declare class GatacaQR {
|
|
|
16
16
|
/**
|
|
17
17
|
* ***Mandatory***
|
|
18
18
|
* Create session function to generate a new Session
|
|
19
|
-
* Using
|
|
20
|
-
* Using
|
|
19
|
+
* Using v="3", it can provide just a session Id
|
|
20
|
+
* Using another version, it must provide also the authentication request. The session Id is the id of the presentation definition
|
|
21
21
|
*/
|
|
22
22
|
createSession?: () => Promise<{
|
|
23
23
|
sessionId: string;
|
|
@@ -61,9 +61,9 @@ export declare class GatacaQR {
|
|
|
61
61
|
autorefresh: boolean;
|
|
62
62
|
/**
|
|
63
63
|
* _[Optional]_
|
|
64
|
-
*
|
|
64
|
+
* If 3, handle deeplink redirects and deprecates (remove) v1 functionality. If not, the create session must be providing both an authentication request and a session Id
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
v?: string;
|
|
67
67
|
/**
|
|
68
68
|
* _[Optional]_
|
|
69
69
|
* Modifies the qr headline title
|