var QRCode;!function(){function t(t){this.mode=o.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(let t=0,e=this.data.length;t65536?(e[0]=240|(1835008&o)>>>18,e[1]=128|(258048&o)>>>12,e[2]=128|(4032&o)>>>6,e[3]=128|63&o):o>2048?(e[0]=224|(61440&o)>>>12,e[1]=128|(4032&o)>>>6,e[2]=128|63&o):o>128?(e[0]=192|(1984&o)>>>6,e[1]=128|63&o):e[0]=o,this.parsedData.push(e)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function e(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(let e=0,o=this.parsedData.length;e=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,o)},setupPositionProbePattern:function(t,e){for(let o=-1;o<=7;o++)if(!(t+o<=-1||this.moduleCount<=t+o))for(let i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(this.modules[t+o][e+i]=0<=o&&o<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==o||6==o)||2<=o&&o<=4&&2<=i&&i<=4)},getBestMaskPattern:function(){let t=0,e=0;for(let o=0;o<8;o++){this.makeImpl(!0,o);let i=f.getLostPoint(this);(0==o||t>i)&&(t=i,e=o)}return e},createMovieClip:function(t,e,o){let i=t.createEmptyMovieClip(e,o);this.make();for(let t=0;t>o&1);this.modules[Math.floor(o/3)][o%3+this.moduleCount-8-3]=i}for(let o=0;o<18;o++){let i=!t&&1==(e>>o&1);this.modules[o%3+this.moduleCount-8-3][Math.floor(o/3)]=i}},setupTypeInfo:function(t,e){let o=this.errorCorrectLevel<<3|e,i=f.getBCHTypeInfo(o);for(let e=0;e<15;e++){let o=!t&&1==(i>>e&1);e<6?this.modules[e][8]=o:e<8?this.modules[e+1][8]=o:this.modules[this.moduleCount-15+e][8]=o}for(let e=0;e<15;e++){let o=!t&&1==(i>>e&1);e<8?this.modules[8][this.moduleCount-e-1]=o:e<9?this.modules[8][15-e-1+1]=o:this.modules[8][15-e-1]=o}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){let o=-1,i=this.moduleCount-1,n=7,r=0;for(let l=this.moduleCount-1;l>0;l-=2)for(6==l&&l--;;){for(let o=0;o<2;o++)if(null==this.modules[i][l-o]){let s=!1;r>>n&1)),f.getMask(e,i,l-o)&&(s=!s),this.modules[i][l-o]=s,n--,-1==n&&(r++,n=7)}if(i+=o,i<0||this.moduleCount<=i){i-=o,o=-o;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(t,o,i){let n=p.getRSBlocks(t,o),r=new m;for(let e=0;e8*l)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+8*l+")");for(r.getLengthInBits()+4<=8*l&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*l||(r.put(e.PAD0,8),r.getLengthInBits()>=8*l));)r.put(e.PAD1,8);return e.createBytes(r,n)},e.createBytes=function(t,e){let o=0,i=0,n=0,r=new Array(e.length),l=new Array(e.length);for(let s=0;s=0?g.get(e):0}}let s=0;for(let t=0;t=0;)e^=f.G15<=0;)e^=f.G18<>>=1;return e},getPatternPosition:function(t){return f.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,o){switch(t){case n:return(e+o)%2==0;case r:return e%2==0;case l:return o%3==0;case s:return(e+o)%3==0;case h:return(Math.floor(e/2)+Math.floor(o/3))%2==0;case a:return e*o%2+e*o%3==0;case u:return(e*o%2+e*o%3)%2==0;case g:return(e*o%3+(e+o)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){let e=new c([1],0);for(let o=0;o5&&(o+=3+r-5)}for(let i=0;i=256;)t-=255;return d.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let t=0;t<8;t++)d.EXP_TABLE[t]=1<>>7-t%8&1)},put:function(t,e){for(let o=0;o>>e-o-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};let _=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function C(){let t=!1,e=navigator.userAgent;if(/android/i.test(e)){t=!0;let o=e.toString().match(/android ([0-9]\.[0-9])/i);o&&o[1]&&(t=parseFloat(o[1]))}return t}let w=function(){let t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){let e=this._htOption,o=this._el,i=t.getModuleCount();Math.floor(e.width/i),Math.floor(e.height/i);function n(t,e){let o=document.createElementNS("http://www.w3.org/2000/svg",t);for(let t in e)e.hasOwnProperty(t)&&o.setAttribute(t,e[t]);return o}this.clear();let r=n("svg",{viewBox:"0 0 "+String(i)+" "+String(i),width:"100%",height:"100%",fill:e.colorLight});r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),o.appendChild(r),r.appendChild(n("rect",{fill:e.colorLight,width:"100%",height:"100%"})),r.appendChild(n("rect",{fill:e.colorDark,width:"1",height:"1",id:"template"}));for(let e=0;e'];for(let o=0;o");for(let s=0;s');l.push("")}l.push(""),o.innerHTML=l.join("");let s=o.childNodes[0],h=(e.width-s.offsetWidth)/2,a=(e.height-s.offsetHeight)/2;h>0&&a>0&&(s.style.margin=a+"px "+h+"px")},t.prototype.clear=function(){this._el.innerHTML=""},t}():function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}if(this._android&&this._android<=2.1){let t=1/window.devicePixelRatio,e=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(o,i,n,r,l,s,h,a,u){if("nodeName"in o&&/img/i.test(o.nodeName))for(let e=arguments.length-1;e>=1;e--)arguments[e]=arguments[e]*t;else void 0===a&&(arguments[1]*=t,arguments[2]*=t,arguments[3]*=t,arguments[4]*=t);e.apply(this,arguments)}}function e(t,e){let o=this;if(o._fFail=e,o._fSuccess=t,null===o._bSupportDataURI){let t=document.createElement("img"),e=function(){o._bSupportDataURI=!1,o._fFail&&o._fFail.call(o)},i=function(){o._bSupportDataURI=!0,o._fSuccess&&o._fSuccess.call(o)};return t.onabort=e,t.onerror=e,t.onload=i,void(t.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===o._bSupportDataURI&&o._fSuccess?o._fSuccess.call(o):!1===o._bSupportDataURI&&o._fFail&&o._fFail.call(o)}let o=function(t,e){this._bIsPainted=!1,this._android=C(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.appendChild(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return o.prototype.draw=function(t){let e=this._elImage,o=this._oContext,i=this._htOption,n=t.getModuleCount(),r=i.width/n,l=i.height/n,s=Math.round(r),h=Math.round(l);e.style.display="none",this.clear();for(let e=0;e_.length)throw new Error("Too long data");return o}QRCode=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:i.H},"string"==typeof e&&(e={text:e}),e)for(let t in e)this._htOption[t]=e[t];"string"==typeof t&&(t=document.getElementById(t)),this._htOption.useSVG&&(D=w),this._android=C(),this._el=t,this._oQRCode=null,this._oDrawing=new D(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(t){this._oQRCode=new e(A(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=i}(); //used var instead of let!!