/*! * qrcode.vue v1.7.0 * A Vue component to generate QRCode. * © 2017-2019 @scopewu(https://github.com/scopewu) * MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).QrcodeVue=e()}(this,function(){"use strict";var r=1,n=2,o=4,i=8;function t(t){this.mode=o,this.data=t}t.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e>>7-t%8&1)},put:function(t,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);e>>this.length%8),this.length++}};for(var h=e,s={glog:function(t){if(t<1)throw Error("glog("+t+")");return s.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;256<=t;)t-=255;return s.EXP_TABLE[t]},EXP_TABLE:Array(256),LOG_TABLE:Array(256)},f=0;f<8;f++)s.EXP_TABLE[f]=1<>>=1;return e},getPatternPosition:function(t){return A.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case m:return(e+r)%2==0;case v:return e%2==0;case C:return r%3==0;case L:return(e+r)%3==0;case B:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case y:return e*r%2+e*r%3==0;case P:return(e*r%2+e*r%3)%2==0;case E:return(e*r%3+(e+r)%2)%2==0;default:throw Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new p([1],0),r=0;r>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++){n=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},T.setupTypeInfo=function(t,e){for(var r=k.getBCHTypeInfo(this.errorCorrectLevel<<3|e),n=0;n<15;n++){var o=!t&&1==(r>>n&1);n<6?this.modules[n][8]=o:n<8?this.modules[n+1][8]=o:this.modules[this.moduleCount-15+n][8]=o}for(n=0;n<15;n++){o=!t&&1==(r>>n&1);n<8?this.modules[8][this.moduleCount-n-1]=o:n<9?this.modules[8][15-n-1+1]=o:this.modules[8][15-n-1]=o}this.modules[this.moduleCount-8][8]=!t},T.mapData=function(t,e){for(var r=-1,n=this.moduleCount-1,o=7,i=0,a=this.moduleCount-1;0>>o&1)),k.getMask(e,n,a-s)&&(u=!u),this.modules[n][a-s]=u,-1==--o&&(i++,o=7)}if((n+=r)<0||this.moduleCount<=n){n-=r,r=-r;break}}},D.PAD0=236,D.PAD1=17,D.createData=function(t,e,r){for(var n=u.getRSBlocks(t,e),o=new h,i=0;i8*s)throw Error("code length overflow. ("+o.getLengthInBits()+">"+8*s+")");for(o.getLengthInBits()+4>8*s||o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;o.getLengthInBits()<8*s&&(o.put(D.PAD0,8),o.getLengthInBits()<8*s);)o.put(D.PAD1,8);return D.createBytes(o,n)},D.createBytes=function(t,e){for(var r=0,n=0,o=0,i=Array(e.length),a=Array(e.length),s=0;s>>0,n=new b(-1,g[this.level]);n.addData(function(t){for(var e="",r=0;r>6):(n<55296||57344<=n?e+=String.fromCharCode(224|n>>12):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++r)),e+=String.fromCharCode(240|n>>18),e+=String.fromCharCode(128|n>>12&63)),e+=String.fromCharCode(128|n>>6&63)),e+=String.fromCharCode(128|63&n))}return e}(t)),n.make();var o=n.modules,s=r/o.length,u=r/o.length,h=window.devicePixelRatio||1;if("svg"===e)this.numCells=o.length,this.fgPath=function(t,e){var i=1