<?php$_content='<img src=\"'.$block->getViewFileUrl('Magento_Checkout::cvv.png').'\" alt=\"'.__('Card Verification Number Visual Reference').'\" title=\"'.__('Card Verification Number Visual Reference').'\" />';?>
<divclass="note">
<ahref="#"class="action cvv"title="<?phpecho__('What is this?')?>"data-mage-init='{"tooltip": {"content": "<?phpecho$_content?>"}}'><span><?phpecho__('What is this?')?></span></a>
</div>
</div>
</div>
<?phpendif;?>
<?phpif($block->hasSsCardType()):?>
<divclass="field switch solo required"id="<?phpecho$_code?>_cc_type_ss_div">
functionBigInteger(e,t,n){if(e!=null)if("number"==typeofe)this.fromNumber(e,t,n);elseif(t==null&&"string"!=typeofe)this.fromString(e,256);elsethis.fromString(e,t)}functionnbi(){returnnewBigInteger(null)}functionam1(e,t,n,r,i,s){while(--s>=0){varo=t*this[e++]+n[r]+i;i=Math.floor(o/67108864);n[r++]=o&67108863}returni}functionam2(e,t,n,r,i,s){varo=t&32767,u=t>>15;while(--s>=0){vara=this[e]&32767;varf=this[e++]>>15;varl=u*a+f*o;a=o*a+((l&32767)<<15)+n[r]+(i&1073741823);i=(a>>>30)+(l>>>15)+u*f+(i>>>30);n[r++]=a&1073741823}returni}functionam3(e,t,n,r,i,s){varo=t&16383,u=t>>14;while(--s>=0){vara=this[e]&16383;varf=this[e++]>>14;varl=u*a+f*o;a=o*a+((l&16383)<<14)+n[r]+i;i=(a>>28)+(l>>14)+u*f;n[r++]=a&268435455}returni}functionint2char(e){returnBI_RM.charAt(e)}functionintAt(e,t){varn=BI_RC[e.charCodeAt(t)];returnn==null?-1:n}functionbnpCopyTo(e){for(vart=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t;e.s=this.s}functionbnpFromInt(e){this.t=1;this.s=e<0?-1:0;if(e>0)this[0]=e;elseif(e<-1)this[0]=e+DV;elsethis.t=0}functionnbv(e){vart=nbi();t.fromInt(e);returnt}functionbnpFromString(e,t){varn;if(t==16)n=4;elseif(t==8)n=3;elseif(t==256)n=8;elseif(t==2)n=1;elseif(t==32)n=5;elseif(t==4)n=2;else{this.fromRadix(e,t);return}this.t=0;this.s=0;varr=e.length,i=false,s=0;while(--r>=0){varo=n==8?e[r]&255:intAt(e,r);if(o<0){if(e.charAt(r)=="-")i=true;continue}i=false;if(s==0)this[this.t++]=o;elseif(s+n>this.DB){this[this.t-1]|=(o&(1<<this.DB-s)-1)<<s;this[this.t++]=o>>this.DB-s}elsethis[this.t-1]|=o<<s;s+=n;if(s>=this.DB)s-=this.DB}if(n==8&&(e[0]&128)!=0){this.s=-1;if(s>0)this[this.t-1]|=(1<<this.DB-s)-1<<s}this.clamp();if(i)BigInteger.ZERO.subTo(this,this)}functionbnpClamp(){vare=this.s&this.DM;while(this.t>0&&this[this.t-1]==e)--this.t}functionbnToString(e){if(this.s<0)return"-"+this.negate().toString(e);vart;if(e==16)t=4;elseif(e==8)t=3;elseif(e==2)t=1;elseif(e==32)t=5;elseif(e==4)t=2;elsereturnthis.toRadix(e);varn=(1<<t)-1,r,i=false,s="",o=this.t;varu=this.DB-o*this.DB%t;if(o-->0){if(u<this.DB&&(r=this[o]>>u)>0){i=true;s=int2char(r)}while(o>=0){if(u<t){r=(this[o]&(1<<u)-1)<<t-u;r|=this[--o]>>(u+=this.DB-t)}else{r=this[o]>>(u-=t)&n;if(u<=0){u+=this.DB;--o}}if(r>0)i=true;if(i)s+=int2char(r)}}returni?s:"0"}functionbnNegate(){vare=nbi();BigInteger.ZERO.subTo(this,e);returne}functionbnAbs(){returnthis.s<0?this.negate():this}functionbnCompareTo(e){vart=this.s-e.s;if(t!=0)returnt;varn=this.t;t=n-e.t;if(t!=0)returnthis.s<0?-t:t;while(--n>=0)if((t=this[n]-e[n])!=0)returnt;return0}functionnbits(e){vart=1,n;if((n=e>>>16)!=0){e=n;t+=16}if((n=e>>8)!=0){e=n;t+=8}if((n=e>>4)!=0){e=n;t+=4}if((n=e>>2)!=0){e=n;t+=2}if((n=e>>1)!=0){e=n;t+=1}returnt}functionbnBitLength(){if(this.t<=0)return0;returnthis.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}functionbnpDLShiftTo(e,t){varn;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e;t.s=this.s}functionbnpDRShiftTo(e,t){for(varn=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0);t.s=this.s}functionbnpLShiftTo(e,t){varn=e%this.DB;varr=this.DB-n;vari=(1<<r)-1;vars=Math.floor(e/this.DB),o=this.s<<n&this.DM,u;for(u=this.t-1;u>=0;--u){t[u+s+1]=this[u]>>r|o;o=(this[u]&i)<<n}for(u=s-1;u>=0;--u)t[u]=0;t[s]=o;t.t=this.t+s+1;t.s=this.s;t.clamp()}functionbnpRShiftTo(e,t){t.s=this.s;varn=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}varr=e%this.DB;vari=this.DB-r;vars=(1<<r)-1;t[0]=this[n]>>r;for(varo=n+1;o<this.t;++o){t[o-n-1]|=(this[o]&s)<<i;t[o-n]=this[o]>>r}if(r>0)t[this.t-n-1]|=(this.s&s)<<i;t.t=this.t-n;t.clamp()}functionbnpSubTo(e,t){varn=0,r=0,i=Math.min(e.t,this.t);while(n<i){r+=this[n]-e[n];t[n++]=r&this.DM;r>>=this.DB}if(e.t<this.t){r-=e.s;while(n<this.t){r+=this[n];t[n++]=r&this.DM;r>>=this.DB}r+=this.s}else{r+=this.s;while(n<e.t){r-=e[n];t[n++]=r&this.DM;r>>=this.DB}r-=e.s}t.s=r<0?-1:0;if(r<-1)t[n++]=this.DV+r;elseif(r>0)t[n++]=r;t.t=n;t.clamp()}functionbnpMultiplyTo(e,t){varn=this.abs(),r=e.abs();vari=n.t;t.t=i+r.t;while(--i>=0)t[i]=0;for(i=0;i<r.t;++i)t[i+n.t]=n.am(0,r[i],t,i,0,n.t);t.s=0;t.clamp();if(this.s!=e.s)BigInteger.ZERO.subTo(t,t)}functionbnpSquareTo(e){vart=this.abs();varn=e.t=2*t.t;while(--n>=0)e[n]=0;for(n=0;n<t.t-1;++n){varr=t.am(n,t[n],e,2*n,0,1);if((e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV){e[n+t.t]-=t.DV;e[n+t.t+1]=1}}if(e.t>0)e[e.t-1]+=t.am(n,t[n],e,2*n,0,1);e.s=0;e.clamp()}functionbnpDivRemTo(e,t,n){varr=e.abs();if(r.t<=0)return;vari=this.abs();if(i.t<r.t){if(t!=null)t.fromInt(0);if(n!=null)this.copyTo(n);return}if(n==null)n=nbi();vars=nbi(),o=this.s,u=e.s;vara=this.DB-nbits(r[r.t-1]);if(a>0){r.lShiftTo(a,s);i.lShiftTo(a,n)}else{r.copyTo(s);i.copyTo(n)}varf=s.t;varl=s[f-1];if(l==0)return;varc=l*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0);varh=this.FV/c,p=(1<<this.F1)/c,d=1<<this.F2;varv=n.t,m=v-f,g=t==null?nbi():t;s.dlShiftTo(m,g);if(n.compareTo(g)>=0){n[n.t++]=1;n.subTo(g,n)}BigInteger.ONE.dlShiftTo(f,g);g.subTo(s,s);while(s.t<f)s[s.t++]=0;while(--m>=0){vary=n[--v]==l?this.DM:Math.floor(n[v]*h+(n[v-1]+d)*p);if((n[v]+=s.am(0,y,n,m,0,f))<y){s.dlShiftTo(m,g);n.subTo(g,n);while(n[v]<--y)n.subTo(g,n)}}if(t!=null){n.drShiftTo(f,t);if(o!=u)BigInteger.ZERO.subTo(t,t)}n.t=f;n.clamp();if(a>0)n.rShiftTo(a,n);if(o<0)BigInteger.ZERO.subTo(n,n)}functionbnMod(e){vart=nbi();this.abs().divRemTo(e,null,t);if(this.s<0&&t.compareTo(BigInteger.ZERO)>0)e.subTo(t,t);returnt}functionClassic(e){this.m=e}functioncConvert(e){if(e.s<0||e.compareTo(this.m)>=0)returne.mod(this.m);elsereturne}functioncRevert(e){returne}functioncReduce(e){e.divRemTo(this.m,null,e)}functioncMulTo(e,t,n){e.multiplyTo(t,n);this.reduce(n)}functioncSqrTo(e,t){e.squareTo(t);this.reduce(t)}functionbnpInvDigit(){if(this.t<1)return0;vare=this[0];if((e&1)==0)return0;vart=e&3;t=t*(2-(e&15)*t)&15;t=t*(2-(e&255)*t)&255;t=t*(2-((e&65535)*t&65535))&65535;t=t*(2-e*t%this.DV)%this.DV;returnt>0?this.DV-t:-t}functionMontgomery(e){this.m=e;this.mp=e.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<e.DB-15)-1;this.mt2=2*e.t}functionmontConvert(e){vart=nbi();e.abs().dlShiftTo(this.m.t,t);t.divRemTo(this.m,null,t);if(e.s<0&&t.compareTo(BigInteger.ZERO)>0)this.m.subTo(t,t);returnt}functionmontRevert(e){vart=nbi();e.copyTo(t);this.reduce(t);returnt}functionmontReduce(e){while(e.t<=this.mt2)e[e.t++]=0;for(vart=0;t<this.m.t;++t){varn=e[t]&32767;varr=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;n=t+this.m.t;e[n]+=this.m.am(0,r,e,t,0,this.m.t);while(e[n]>=e.DV){e[n]-=e.DV;e[++n]++}}e.clamp();e.drShiftTo(this.m.t,e);if(e.compareTo(this.m)>=0)e.subTo(this.m,e)}functionmontSqrTo(e,t){e.squareTo(t);this.reduce(t)}functionmontMulTo(e,t,n){e.multiplyTo(t,n);this.reduce(n)}functionbnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}functionbnpExp(e,t){if(e>4294967295||e<1)returnBigInteger.ONE;varn=nbi(),r=nbi(),i=t.convert(this),s=nbits(e)-1;i.copyTo(n);while(--s>=0){t.sqrTo(n,r);if((e&1<<s)>0)t.mulTo(r,i,n);else{varo=n;n=r;r=o}}returnt.revert(n)}functionbnModPowInt(e,t){varn;if(e<256||t.isEven())n=newClassic(t);elsen=newMontgomery(t);returnthis.exp(e,n)}vardbits;varcanary=0xdeadbeefcafe;varj_lm=(canary&16777215)==15715070;if(j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}elseif(j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;varBI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;varBI_RM="0123456789abcdefghijklmnopqrstuvwxyz";varBI_RC=newArray;varrr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1)
functionparseBigInt(str,r){returnnewBigInteger(str,r)}functionpkcs1pad2(b,n){if(n<b.length+11){alert("Message too long for RSA");returnnull}varba=newArray();vari=b.length-1;while(i>=0&&n>0){ba[--n]=b[i--]}ba[--n]=0;varrng=newSecureRandom();varx=newArray();while(n>2){x[0]=0;while(x[0]==0){rng.nextBytes(x)}ba[--n]=x[0]}ba[--n]=2;ba[--n]=0;returnnewBigInteger(ba)}functionRSAKey(){this.n=null;this.e=0;this.d=null;this.p=null;this.q=null;this.dmp1=null;this.dmq1=null;this.coeff=null}functionRSASetPublic(N,E){if(N!=null&&E!=null&&N.length>0&&E.length>0){this.n=parseBigInt(N,16);this.e=parseInt(E,16)}else{alert("Invalid RSA public key")}}functionRSADoPublic(x){returnx.modPowInt(this.e,this.n)}functionRSAEncrypt(bytes){varm=pkcs1pad2(bytes,(this.n.bitLength()+7)>>3);if(m==null){returnnull}varc=this.doPublic(m);if(c==null){returnnull}varh=c.toString(16);if((h.length&1)==0){returnh}else{return"0"+h}}functionRSAEncryptB64(bytes){varh=this.encrypt(bytes);if(h){returnhex2b64(h)}else{returnnull}}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;RSAKey.prototype.encrypt_b64=RSAEncryptB64;
/* sjcl.js */
"use strict";varsjcl={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(a){this.toString=function(){return"CORRUPT: "+this.message};this.message=a},invalid:function(a){this.toString=function(){return"INVALID: "+this.message};this.message=a},bug:function(a){this.toString=function(){return"BUG: "+this.message};this.message=a},notReady:function(a){this.toString=function(){return"NOT READY: "+this.message};this.message=a}}};if(typeofmodule!="undefined"&&module.exports){module.exports=sjcl}sjcl.cipher.aes=function(a){this.g[0][0][0]||this.u();varb,c,d,e,f=this.g[0][4],g=this.g[1];b=a.length;varh=1;if(b!==4&&b!==6&&b!==8){thrownewsjcl.exception.invalid("invalid aes key size")}this.a=[d=a.slice(0),e=[]];for(a=b;a<4*b+28;a++){c=d[a-1];if(a%b===0||b===8&&a%b===4){c=f[c>>>24]<<24^f[c>>16&255]<<16^f[c>>8&255]<<8^f[c&255];if(a%b===0){c=c<<8^c>>>24^h<<24;h=h<<1^(h>>7)*283}}d[a]=d[a-b]^c}for(b=0;a;b++,a--){c=d[b&3?a:a-4];e[b]=a<=4||b<4?c:g[0][f[c>>>24]]^g[1][f[c>>16&255]]^g[2][f[c>>8&255]]^g[3][f[c&255]]}};sjcl.cipher.aes.prototype={encrypt:function(a){returnthis.D(a,0)},decrypt:function(a){returnthis.D(a,1)},g:[[[],[],[],[],[]],[[],[],[],[],[]]],u:function(){vara=this.g[0],b=this.g[1],c=a[4],d=b[4],e,f,g,h=[],i=[],k,j,l,m;for(e=0;e<256;e++){i[(h[e]=e<<1^(e>>7)*283)^e]=e}for(f=g=0;!c[f];f^=k||1,g=i[g]||1){l=g^g<<1^g<<2^g<<3^g<<4;l=l>>8^l&255^99;c[f]=l;d[l]=f;j=h[e=h[k=h[f]]];m=j*16843009^e*65537^k*257^f*16843008;j=h[l]*257^l*16843008;for(e=0;e<4;e++){a[e][f]=j=j<<24^j>>>8;b[e][l]=m=m<<24^m>>>8}}for(e=0;e<5;e++){a[e]=a[e].slice(0);b[e]=b[e].slice(0)}},D:function(a,b){if(a.length!==4){thrownewsjcl.exception.invalid("invalid aes block size")}varc=this.a[b],d=a[0]^c[0],e=a[b?3:1]^c[1],f=a[2]^c[2];a=a[b?1:3]^c[3];varg,h,i,k=c.length/4-2,j,l=4,m=[0,0,0,0];g=this.g[b];varn=g[0],o=g[1],p=g[2],q=g[3],r=g[4];for(j=0;j<k;j++){g=n[d>>>24]^o[e>>16&255]^p[f>>8&255]^q[a&255]^c[l];h=n[e>>>24]^o[f>>16&255]^p[a>>8&255]^q[d&255]^c[l+1];i=n[f>>>24]^o[a>>16&255]^p[d>>8&255]^q[e&255]^c[l+2];a=n[a>>>24]^o[d>>16&255]^p[e>>8&255]^q[f&255]^c[l+3];l+=4;d=g;e=h;f=i}for(j=0;j<4;j++){m[b?3&-j:j]=r[d>>>24]<<24^r[e>>16&255]<<16^r[f>>8&255]<<8^r[a&255]^c[l++];g=d;d=e;e=f;f=a;a=g}returnm}};sjcl.bitArray={bitSlice:function(a,b,c){a=sjcl.bitArray.L(a.slice(b/32),32-(b&31)).slice(1);returnc===undefined?a:sjcl.bitArray.clamp(a,c-b)},extract:function(a,b,c){vard=Math.floor(-b-c&31);return((b+c-1^b)&-32?a[b/32|0]<<32-d^a[b/32+1|0]>>>d:a[b/32|0]>>>d)&(1<<c)-1},concat:function(a,b){if(a.length===0||b.length===0){returna.concat(b)}varc=a[a.length-1],d=sjcl.bitArray.getPartial(c);returnd===32?a.concat(b):sjcl.bitArray.L(b,d,c|0,a.slice(0,a.length-1))},bitLength:function(a){varb=a.length;if(b===0){return0}return(b-1)*32+sjcl.bitArray.getPartial(a[b-1])},clamp:function(a,b){if(a.length*32<b){returna}a=a.slice(0,Math.ceil(b/32));varc=a.length;b&=31;if(c>0&&b){a[c-1]=sjcl.bitArray.partial(b,a[c-1]&2147483648>>b-1,1)}returna},partial:function(a,b,c){if(a===32){returnb}return(c?b|0:b<<32-a)+a*1099511627776},getPartial:function(a){returnMath.round(a/1099511627776)||32},equal:function(a,b){if(sjcl.bitArray.bitLength(a)!==sjcl.bitArray.bitLength(b)){returnfalse}varc=0,d;for(d=0;d<a.length;d++){c|=a[d]^b[d]}returnc===0},L:function(a,b,c,d){vare;e=0;if(d===undefined){d=[]}for(;b>=32;b-=32){d.push(c);c=0}if(b===0){returnd.concat(a)}for(e=0;e<a.length;e++){d.push(c|a[e]>>>b);c=a[e]<<32-b}e=a.length?a[a.length-1]:0;a=sjcl.bitArray.getPartial(e);d.push(sjcl.bitArray.partial(b+a&31,b+a>32?c:d.pop(),1));returnd},M:function(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}};sjcl.codec.utf8String={fromBits:function(a){varb="",c=sjcl.bitArray.bitLength(a),d,e;for(d=0;d<c/8;d++){if((d&3)===0){e=a[d/4]}b+=String.fromCharCode(e>>>24);e<<=8}returndecodeURIComponent(escape(b))},toBits:function(a){a=unescape(encodeURIComponent(a));varb=[],c,d=0;for(c=0;c<a.length;c++){d=d<<8|a.charCodeAt(c);if((c&3)===3){b.push(d);d=0}}c&3&&b.push(sjcl.bitArray.partial(8*(c&3),d));returnb}};sjcl.codec.base64={A:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(a,b,c){vard="",e=0,f=sjcl.codec.base64.A,g=0,h=sjcl.bitArray.bitLength(a);if(c){f=f.substr(0,62)+"-_"}for(c=0;d.length*6<h;){d+=f.charAt((g^a[c]>>>e)>>>26);if(e<6){g=a[c]<<6-e;e+=26;c++}else{g<<=6;e-=6}}for(;d.length&3&&!b;){d+="="}returnd},toBits:function(a,b){a=a.replace(/\s|=/g,"");varc=[],d=0,e=sjcl.codec.base64.A,f=0,g;if(b){e=e.substr(0,62)+"-_"}for(b=0;b<a.length;b++){g=e.indexOf(a.charAt(b));if(g<0){thrownewsjcl.exception.invalid("this isn't base64!")}if(d>26){d-=26;c.push(f^g>>>d);f=g<<32-d}else{d+=6;f^=g<<32-d}}d&56&&c.push(sjcl.bitArray.partial(d&56,f,1));returnc}};sjcl.codec.base64url={fromBits:function(a){returnsjcl.codec.base64.fromBits(a,1,1)},toBits:function(a){returnsjcl.codec.base64.toBits(a,1)}};sjcl.codec.bytes={fromBits:function(a){varb=[],c=sjcl.bitArray.bitLength(a),d,e;for(d=0;d<c/8;d++){if((d&3)===0){e=a[d/4]}b.push(e>>>24);e<<=8}returnb},toBits:function(a){varb=[],c,d=0;for(c=0;c<a.length;c++){d=d<<8|a[c];if((c&3)===3){b.push(d);d=0}}c&3&&b.push(sjcl.bitArray.partial(8*(c&3),d));returnb}};sjcl.hash.sha256=function(a){this.a[0]||this.u();if(a){this.l=a.l.slice(0);this.h=a.h.slice(0);this.d=a.d}else{this.reset()}};sjcl.hash.sha256.hash=function(a){return(newsjcl.hash.sha256).update(a).finalize()};sjcl.hash.sha256.prototype={blockSize:512,reset:function(){this.l=this.J.slice(0);this.h=[];this.d=0;returnthis},update:function(a){if(typeofa==="string"){a=sjcl.codec.utf8String.toBits(a)}varb,c=this.h=sjcl.bitArray.concat(this.h,a);b=this.d;a=this.d=b+sjcl.bitArray.bitLength(a);for(b=512+b&-512;b<=a;b+=512){this.z(c.splice(0,16))}returnthis},finalize:function(){vara,b=this.h,c=this.l;b=sjcl.bitArray.concat(b,[sjcl.bitArray.partial(1,1)]);for(a=b.length+2;a&15;a++){b.push(0)}b.push(Math.floor(this.d/4294967296));for(b.push(this.d|0);b.length;){this.z(b.splice(0,16))}this.reset();returnc},J:[],a:[],u:function(){functiona(e){return(e-Math.floor(e))*4294967296|0}varb=0,c=2,d;a:for(;b<64;c++){for(d=2;d*d<=c;d++){if(c%d===0){continuea}}if(b<8){this.J[b]=a(Math.pow(c,0.5))}this.a[b]=a(Math.pow(c,1/3));b++}},z:function(a){varb,c,d=a.slice(0),e=this.l,f=this.a,g=e[0],h=e[1],i=e[2],k=e[3],j=e[4],l=e[5],m=e[6],n=e[7];for(a=0;a<64;a++){if(a<16){b=d[a]}else{b=d[a+1&15];c=d[a+14&15];b=d[a&15]=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+d[a&15]+d[a+9&15]|0}b=b+n+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(m^j&(l^m))+f[a];n=m;m=l;l=j;j=k+b|0;k=i;i=h;h=g;g=b+(h&i^k&(h^i))+(h>>>2^h>>>13^h>>>22^h<<30^h<<19^h<<10)|0}e[0]=e[0]+g|0;e[1]=e[1]+h|0;e[2]=e[2]+i|0;e[3]=e[3]+k|0;e[4]=e[4]+j|0;e[5]=e[5]+l|0;e[6]=e[6]+m|0;e[7]=e[7]+n|0}};sjcl.mode.ccm={name:"ccm",encrypt:function(a,b,c,d,e){varf,g=b.slice(0),h=sjcl.bitArray,i=h.bitLength(c)/8,k=h.bitLength(g)/8;e=e||64;d=d||[];if(i<7){thrownewsjcl.exception.invalid("ccm: iv must be at least 7 bytes")}for(f=2;f<4&&k>>>8*f;f++){}if(f<15-i){f=15-i}c=h.clamp(c,8*(15-f));b=sjcl.mode.ccm.C(a,b,c,d,e,f);g=sjcl.mode.ccm.F(a,g,c,b,e,f);returnh.concat(g.data,g.tag)},decrypt:function(a,b,c,d,e){e=e||64;d=d||[];varf=sjcl.bitArray,g=f.bitLength(c)/8,h=f.bitLength(b),i=f.clamp(b,h-e),k=f.bitSlice(b,h-e);h=(h-e)/8;if(g<7){thrownewsjcl.exception.invalid("ccm: iv must be at least 7 bytes")}for(b=2;b<4&&h>>>8*b;b++){}if(b<15-g){b=15-g}c=f.clamp(c,8*(15-b));i=sjcl.mode.ccm.F(a,i,c,k,e,b);a=sjcl.mode.ccm.C(a,i.data,c,d,e,b);if(!f.equal(i.tag,a)){thrownewsjcl.exception.corrupt("ccm: tag doesn't match")}returni.data},C:function(a,b,c,d,e,f){varg=[],h=sjcl.bitArray,i=h.M;e/=8;if(e%2||e<4||e>16){thrownewsjcl.exception.invalid("ccm: invalid tag length")}if(d.length>4294967295||b.length>4294967295){thrownewsjcl.exception.bug("ccm: can't deal with 4GiB or more data")}f=[h.partial(8,(d.length?64:0)|e-2<<2|f-1)];f=h.concat(f,c);f[3]|=h.bitLength(b)/8;f=a.encrypt(f);if(d.length){c=h.bitLength(d)/8;if(c<=65279){g=[h.partial(16,c)]}else{if(c<=4294967295){g=h.concat([h.partial(16,65534)],[c])}}g=h.concat(g,d);for(d=0;d<g.length;d+=4){f=a.encrypt(i(f,g.slice(d,d+4).concat([0,0,0])))}}for(d=0;d<b.length;d+=4){f=a.encrypt(i(f,b.slice(d,d+4).concat([0,0,0])))}returnh.clamp(f,e*8)},F:function(a,b,c,d,e,f){varg,h=sjcl.bitArray;g=h.M;vari=b.length,k=h.bitLength(b);c=h.concat([h.partial(8,f-1)],c).concat([0,0,0]).slice(0,4);d=h.bitSlice(g(d,a.encrypt(c)),0,e);if(!i){return{tag:d,data:[]}}for(g=0;g<i;g+=4){c[3]++;e=a.encrypt(c);b[g]^=e[0];b[g+1]^=e[1];b[g+2]^=e[2];b[g+3]^=e[3]}return{tag:d,data:h.clamp(b,k)}}};sjcl.misc.hmac=function(a,b){this.I=b=b||sjcl.hash.sha256;varc=[[],[]],d=b.prototype.blockSize/32;this.j=[newb,newb];if(a.length>d){a=b.hash(a)}for(b=0;b<d;b++){c[0][b]=a[b]^909522486;c[1][b]=a[b]^1549556828}this.j[0].update(c[0]);this.j[1].update(c[1])};sjcl.misc.hmac.prototype.encrypt=sjcl.misc.hmac.prototype.mac=function(a){a=(newthis.I(this.j[0])).update(a).finalize();return(newthis.I(this.j[1])).update(a).finalize()};sjcl.misc.pbkdf2=function(a,b,c,d,e){c=c||1000;if(d<0||c<0){throwsjcl.exception.invalid("invalid params to pbkdf2")}if(typeofa==="string"){a=sjcl.codec.utf8String.toBits(a)}e=e||sjcl.misc.hmac;a=newe(a);varf,g,h,i,k=[],j=sjcl.bitArray;for(i=1;32*k.length<(d||1);i++){e=f=a.encrypt(j.concat(b,[i]));for(g=1;g<c;g++){f=a.encrypt(f);for(h=0;h<f.length;h++){e[h]^=f[h]}}k=k.concat(e)}if(d){k=j.clamp(k,d)}returnk};sjcl.random={randomWords:function(a,b){varc=[];b=this.isReady(b);vard;if(b===0){thrownewsjcl.exception.notReady("generator isn't seeded")}else{b&2&&this.Q(!(b&1))}for(b=0;b<a;b+=4){(b+1)%65536===0&&this.H();d=this.t();c.push(d[0],d[1],d[2],d[3])}this.H();returnc.slice(0,a)},setDefaultParanoia:function(a){this.r=a},addEntropy:function(a,b,c){c=c||"user";vard,e,f=(newDate).valueOf(),g=this.o[c],h=this.isReady(),i=0;d=this.B[c];if(d===undefined){d=this.B[c]=this.O++}if(g===undefined){g=this.o[c]=0}this.o[c]=(this.o[c]+1)%this.b.length;switch(typeofa){case"number":if(b===undefined){b=1}this.b[g].update([d,this.s++,1,b,f,1,a|0]);break;case"object":c=Object.prototype.toString.call(a);if(c==="[object Uint32Array]"){e=[];for(c=0;c<a.length;c++){e.push(a[c])}a=e}else{if(c!=="[object Array]"){i=1}for(c=0;c<a.length&&!i;c++){if(typeofa[c]!="number"){i=1}}}if(!i){if(b===undefined){for(c=b=0;c<a.length;c++){for(e=a[c];e>0;){b++;e>>>=1}}}this.b[g].update([d,this.s++,2,b,f,a.length].concat(a))}break;case"string":if(b===undefined){b=a.length}this.b[g].update([d,this.s++,3,b,f,a.length]);this.b[g].update(a);break;default:i=1}if(i){thrownewsjcl.exception.bug("random: addEntropy only supports number, array of numbers or string")}this.i[g]+=b;this.e+=b;if(h===0){this.isReady()!==0&&this.G("seeded",Math.max(this.f,this.e));this.G("progress",this.getProgress())}},isReady:function(a){a=this.w[a!==undefined?a:this.r];returnthis.f&&this.f>=a?this.i[0]>80&&(newDate).valueOf()>this.K?3:1:this.e>=a?2:0},getProgress:function(a){a=this.w[a?a:this.r];returnthis.f>=a?1:this.e>a?1:this.e/a},startCollectors:function(){if(!this.k){if(window.addEventListener){window.addEventListener("load",this.m,false);window.addEventListener("mousemove",this.n,false)}else{if(document.attachEvent){document.attachEvent("onload",this.m);document.attachEvent("onmousemove",this.n)}else{thrownewsjcl.exception.bug("can't attach event")}}this.k=true}},stopCollectors:function(){if(this.k){if(window.removeEventListener){window.removeEventListener("load",this.m,false);window.removeEventListener("mousemove",this.n,false)}else{if(window.detachEvent){window.detachEvent("onload",this.m);window.detachEvent("onmousemove",this.n)}}this.k=false}},addEventListener:function(a,b){this.p[a][this.N++]=b},removeEventListener:function(a,b){varc;a=this.p[a];vard=[];for(cina){a.hasOwnProperty(c)&&a[c]===b&&d.push(c)}for(b=0;b<d.length;b++){c=d[b];deletea[c]}},b:[newsjcl.hash.sha256],i:[0],v:0,o:{},s:0,B:{},O:0,f:0,e:0,K:0,a:[0,0,0,0,0,0,0,0],c:[0,0,0,0],q:undefined,r:6,k:false,p:{progress:{},seeded:{}},N:0,w:[0,48,64,96,128,192,256,384,512,768,1024],t:function(){for(vara=0;a<4;a++){this.c[a]=this.c[a]+1|0;if(this.c[a]){break}}returnthis.q.encrypt(this.c)},H:function(){this.a=this.t().concat(this.t());this.q=newsjcl.cipher.aes(this.a)},P:function(a){this.a=sjcl.hash.sha256.hash(this.a.concat(a));this.q=newsjcl.cipher.aes(this.a);for(a=0;a<4;a++){this.c[a]=this.c[a]+1|0;if(this.c[a]){break}}},Q:function(a){varb=[],c=0,d;this.K=b[0]=(newDate).valueOf()+30000;for(d=0;d<16;d++){b.push(Math.random()*4294967296|0)}for(d=0;d<this.b.length;d++){b=b.concat(this.b[d].finalize());c+=this.i[d];this.i[d]=0;if(!a&&this.v&1<<d){break}}if(this.v>=1<<this.b.length){this.b.push(newsjcl.hash.sha256);this.i.push(0)}this.e-=c;if(c>this.f){this.f=c}this.v++;this.P(b)},n:function(a){sjcl.random.addEntropy([a.x||a.clientX||a.offsetX||0,a.y||a.clientY||a.offsetY||0],2,"mouse")},m:function(){sjcl.random.addEntropy((newDate).valueOf(),2,"loadtime")},G:function(a,b){varc;a=sjcl.random.p[a];vard=[];for(cina){a.hasOwnProperty(c)&&d.push(a[c])}for(c=0;c<d.length;c++){d[c](b)}}};try{vars=newUint32Array(32);crypto.getRandomValues(s);sjcl.random.addEntropy(s,1024,"crypto['getRandomValues']")}catch(t){};
/* adyen */
varadyen=window.adyen=window.adyen||{};
varencrypt=adyen.encrypt=adyen.encrypt||{
createEncryptedForm:function(form,key,name){
returnnewEncryptedForm(form,key,name);
}
};
encrypt.version='0_1_1';
/*
*
*
*
* @constructor EncryptedForm
*
* @param element {DOMNode} The form element to encrypt as a DOMNode ( <form> );
* @param key {String} The public key used to communicate with Adyen
* @param [options] {Object} Options to pass to the constructor ( onsubmit {Function} and name {String} )
*
* @return form {EncryptedForm} The instance of EncryptedForm.