2 lines
42 KiB
JavaScript
2 lines
42 KiB
JavaScript
|
_aa={};_aa._ab=function(f,e){var d=qrcode.width;var b=qrcode.height;var c=true;for(var g=0;g<e.length&&c;g+=2){var a=Math.floor(e[g]);var h=Math.floor(e[g+1]);if(a<-1||a>d||h<-1||h>b){throw"Error._ab "}c=false;if(a==-1){e[g]=0;c=true}else{if(a==d){e[g]=d-1;c=true}}if(h==-1){e[g+1]=0;c=true}else{if(h==b){e[g+1]=b-1;c=true}}}c=true;for(var g=e.length-2;g>=0&&c;g-=2){var a=Math.floor(e[g]);var h=Math.floor(e[g+1]);if(a<-1||a>d||h<-1||h>b){throw"Error._ab "}c=false;if(a==-1){e[g]=0;c=true}else{if(a==d){e[g]=d-1;c=true}}if(h==-1){e[g+1]=0;c=true}else{if(h==b){e[g+1]=b-1;c=true}}}};_aa._af=function(b,d,a){var l=new _ac(d);var k=new Array(d<<1);for(var g=0;g<d;g++){var h=k.length;var j=g+0.5;for(var i=0;i<h;i+=2){k[i]=(i>>1)+0.5;k[i+1]=j}a._ad(k);_aa._ab(b,k);try{for(var i=0;i<h;i+=2){var e=(Math.floor(k[i])*4)+(Math.floor(k[i+1])*qrcode.width*4);var f=b[Math.floor(k[i])+qrcode.width*Math.floor(k[i+1])];qrcode.imagedata.data[e]=f?255:0;qrcode.imagedata.data[e+1]=f?255:0;qrcode.imagedata.data[e+2]=0;qrcode.imagedata.data[e+3]=255;if(f){l._dq(i>>1,g)}}}catch(c){throw"Error._ab"}}return l};_aa._ah=function(h,o,l,k,r,q,b,a,f,e,n,m,t,s,d,c,j,i){var g=_ae._ag(l,k,r,q,b,a,f,e,n,m,t,s,d,c,j,i);return _aa._af(h,o,g)};function _a1(b,a){this.count=b;this._fc=a;this.__defineGetter__("Count",function(){return this.count});this.__defineGetter__("_dm",function(){return this._fc})}function _a2(a,c,b){this._bm=a;if(b){this._do=new Array(c,b)}else{this._do=new Array(c)}this.__defineGetter__("_bo",function(){return this._bm});this.__defineGetter__("_dn",function(){return this._bm*this._fo});this.__defineGetter__("_fo",function(){var e=0;for(var d=0;d<this._do.length;d++){e+=this._do[d].length}return e});this._fb=function(){return this._do}}function _a3(k,l,h,g,f,e){this._bs=k;this._ar=l;this._do=new Array(h,g,f,e);var j=0;var b=h._bo;var a=h._fb();for(var d=0;d<a.length;d++){var c=a[d];j+=c.Count*(c._dm+b)}this._br=j;this.__defineGetter__("_fd",function(){return this._bs});this.__defineGetter__("_as",function(){return this._ar});this.__defineGetter__("_dp",function(){return this._br});this.__defineGetter__("_cr",function(){return 17+4*this._bs});this._aq=function(){var r=this._cr;var o=new _ac(r);o._bq(0,0,9,9);o._bq(r-8,0,8,9);o._bq(0,r-8,9,8);var n=this._ar.length;for(var m=0;m<n;m++){var q=this._ar[m]-2;for(var s=0;s<n;s++){if((m==0&&(s==0||s==n-1))||(m==n-1&&s==0)){continue}o._bq(this._ar[s]-2,q,5,5)}}o._bq(6,9,1,r-17);o._bq(9,6,r-17,1);if(this._bs>6){o._bq(r-11,0,3,6);o._bq(0,r-11,6,3)}return o};this._bu=function(i){return this._do[i.ordinal()]}}_a3._bv=new Array(31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017);_a3.VERSIONS=_ay();_a3._av=function(a){if(a<1||a>40){throw"bad arguments"}return _a3.VERSIONS[a-1]};_a3._at=function(b){if(b%4!=1){throw"Error _at"}try{return _a3._av((b-17)>>2)}catch(a){throw"Error _av"}};_a3._aw=function(d){var b=4294967295;var f=0;for(var c=0;c<_a3._bv.length;c++){var a=_a3._bv[c];if(a==d){return this._av(c+7)}var e=_ax._gj(d,a);if(e<b){f=c+7;b=e}}if(b<=3){return this._av(f)}return null};function _ay(){return new Array(new _a3(1,new Array(),new _a2(7,new _a1(1,19)),new _a2(10,new _a1(1,16)),new _a2(13,new _a1(1,13)),new _a2(17,new _a1(1,9))),new _a3(2,new Array(6,18),new _a2(10,new _a1(1,34)),new _a2(16,new _a1(1,28)),new _a2(22,new _a1(1,22)),new _a2(28,new _a1(1,16))),new _a3(3,new Array(6,22),new _a2(15,new _a1(1,55)),new _a2(26,new _a1(1,44)),new _a2(18,new _a1(2,17)),new _a2(22,new _a1(2,13))),new _a3(4,new Array(6,26),new _a2(20,new _a1(1,80)),new _a2(18,new _a1(2,32)),new _a2(26,new _a1(2,24)),new _a2(16,new _a1(4,9))),new _a3(5,new Array(6,30),new _a2(26,new _a1(1,108)),new _a2(24,new _a1(2,43)),new _a2(18,new _a1(2,15),new _a1(2,16)),new _a2(22,new _a1(2,11),new _a1(2,12))),new _a3(6,new Array(6,34),new _a2(18,new _a1(2,68)),new _a2(16,new _a1(4,27)),new _a2(24,new _a1(4,19)),new _a2(28,new _a1(4,15))),new _a3(7,new Array(6,22,38),new
|