};returnDrawing})():(function(){function_onMakeImage(){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){varfactor=1/window.devicePixelRatio;vardrawImage=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(image,sx,sy,sw,sh,dx,dy,dw,dh){if(("nodeName"inimage)&&/img/i.test(image.nodeName)){for(vari=arguments.length-1;i>=1;i--){arguments[i]=arguments[i]*factor}}else{if(typeofdw=="undefined"){arguments[1]*=factor;arguments[2]*=factor;arguments[3]*=factor;arguments[4]*=factor}}drawImage.apply(this,arguments)}}function_safeSetDataURI(fSuccess,fFail){varself=this;self._fFail=fFail;self._fSuccess=fSuccess;if(self._bSupportDataURI===null){varel=document.createElement("img");varfOnError=function(){self._bSupportDataURI=false;if(self._fFail){self._fFail.call(self)}};varfOnSuccess=function(){self._bSupportDataURI=true;if(self._fSuccess){self._fSuccess.call(self)}};el.onabort=fOnError;el.onerror=fOnError;el.onload=fOnSuccess;el.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";return}else{if(self._bSupportDataURI===true&&self._fSuccess){self._fSuccess.call(self)}else{if(self._bSupportDataURI===false&&self._fFail){self._fFail.call(self)}}}}varDrawing=function(el,htOption){this._bIsPainted=false;this._android=_getAndroid();this._htOption=htOption;this._elCanvas=document.createElement("canvas");this._elCanvas.width=htOption.width;this._elCanvas.height=htOption.height;el.appendChild(this._elCanvas);this._el=el;this._oContext=this._elCanvas.getContext("2d");this._bIsPainted=false;this._elImage=document.createElement("img");this._elImage.alt="Scan me!";this._elImage.style.display="none";this._el.appendChild(this._elImage);this._bSupportDataURI=null};Drawing.prototype.draw=function(oQRCode){var_elImage=this._elImage;var_oContext=this._oContext;var_htOption=this._htOption;varnCount=oQRCode.getModuleCount();varnWidth=_htOption.width/nCount;varnHeight=_htOption.height/nCount;varnRoundedWidth=Math.round(nWidth);varnRoundedHeight=Math.round(nHeight);_elImage.style.display="none";this.clear();for(varrow=0;row<nCount;row++){for(varcol=0;col<nCount;col++){varbIsDark=oQRCode.isDark(row,col);varnLeft=col*nWidth;varnTop=row*nHeight;_oContext.strokeStyle=bIsDark?_htOption.colorDark:_htOption.colorLight;_oContext.lineWidth=1;_oContext.fillStyle=bIsDark?_htOption.colorDark:_htOption.colorLight;_oContext.fillRect(nLeft,nTop,nWidth,nHeight);_oContext.strokeRect(Math.floor(nLeft)+0.5,Math.floor(nTop)+0.5,nRoundedWidth,nRoundedHeight);_oContext.strokeRect(Math.ceil(nLeft)-0.5,Math.ceil(nTop)-0.5,nRoundedWidth,nRoundedHeight)}}this._bIsPainted=true};Drawing.prototype.makeImage=function(){if(this._bIsPainted){_safeSetDataURI.call(this,_onMakeImage)}};Drawing.prototype.isPainted=function(){returnthis._bIsPainted};Drawing.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height);this._bIsPainted=false};Drawing.prototype.round=function(nNumber){if(!nNumber){returnnNumber}returnMath.floor(nNumber*1000)/1000};returnDrawing})();function_getTypeNumber(sText,nCorrectLevel){varnType=1;varlength=_getUTF8Length(sText);for(vari=0,len=QRCodeLimitLength.length;i<=len;i++){varnLimit=0;switch(nCorrectLevel){caseQRErrorCorrectLevel.L:nLimit=QRCodeLimitLength[i][0];break;caseQRErrorCorrectLevel.M:nLimit=QRCodeLimitLength[i][1];break;caseQRErrorCorrectLevel.Q:nLimit=QRCodeLimitLength[i][2];break;caseQRErrorCorrectLevel.H:nLimit=QRCodeLimitLength[i][3];break}if(length<=nLimit){break}else{nType++}}if(nType>QRCodeLimitLength.length){thrownewError("Too long data")}returnnType}function_getUTF8Length(sText){varreplacedText=encodeURI(sText).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");returnreplacedText.length+(replacedText.length!=sText?3:0)}QRCode=function(el,vOption){this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRErrorCorrectLevel.H};if(typeofvOption==="string"){vOption={text:vOption}}if(vOption){for(variinvOption){this._htOption[i]=vOption[i]}}if(typeofel=="string"){el=document.getElementById(el)}if(this._htOption.useSVG){Drawing=svgDrawer}this._android=_getAndroid();this._el=el;this._oQRCode=null;this._oDrawing=newDrawing(this._el,this._htOption);if(this._htOption.text){this.makeCode(this._htOption.text)}};QRCode.prototype.makeCode=function(sText){this._oQRCode=newQRCodeModel(_getTypeNumber(sText,this._htOption.correctLevel),this._htOption.correctLevel);this._oQRCode.addData(sText);this._oQRCode.make();this._oDrawing.draw(this._oQRCode);this.makeImage()};QRCode.prototype.makeImage=function(){if(typeofthis._oDrawing.makeImage=="function"&&(!this._android||this._android>=3)){this._oDrawing.makeImage()}};QRCode.prototype.clear=function(){this._oDrawing.clear()};QRCode.CorrectLevel=QRErrorCorrectLevel
};returnDrawing})():(function(){function_onMakeImage(){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){varfactor=1/window.devicePixelRatio;vardrawImage=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(image,sx,sy,sw,sh,dx,dy,dw,dh){if(("nodeName"inimage)&&/img/i.test(image.nodeName)){for(vari=arguments.length-1;i>=1;i--){arguments[i]=arguments[i]*factor}}else{if(typeofdw=="undefined"){arguments[1]*=factor;arguments[2]*=factor;arguments[3]*=factor;arguments[4]*=factor}}drawImage.apply(this,arguments)}}function_safeSetDataURI(fSuccess,fFail){varself=this;self._fFail=fFail;self._fSuccess=fSuccess;if(self._bSupportDataURI===null){varel=document.createElement("img");varfOnError=function(){self._bSupportDataURI=false;if(self._fFail){self._fFail.call(self)}};varfOnSuccess=function(){self._bSupportDataURI=true;if(self._fSuccess){self._fSuccess.call(self)}};el.onabort=fOnError;el.onerror=fOnError;el.onload=fOnSuccess;el.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";return}else{if(self._bSupportDataURI===true&&self._fSuccess){self._fSuccess.call(self)}else{if(self._bSupportDataURI===false&&self._fFail){self._fFail.call(self)}}}}varDrawing=function(el,htOption){this._bIsPainted=false;this._android=_getAndroid();this._htOption=htOption;this._elCanvas=document.createElement("canvas");this._elCanvas.width=htOption.width;this._elCanvas.height=htOption.height;el.appendChild(this._elCanvas);this._el=el;this._oContext=this._elCanvas.getContext("2d");this._bIsPainted=false;this._elImage=document.createElement("img");this._elImage.alt="Scan me!";this._elImage.style.display="none";this._el.appendChild(this._elImage);this._bSupportDataURI=null};Drawing.prototype.draw=function(oQRCode){var_elImage=this._elImage;var_oContext=this._oContext;var_htOption=this._htOption;varnCount=oQRCode.getModuleCount();varnWidth=_htOption.width/nCount;varnHeight=_htOption.height/nCount;varnRoundedWidth=Math.round(nWidth);varnRoundedHeight=Math.round(nHeight);_elImage.style.display="none";this.clear();for(varrow=0;row<nCount;row++){for(varcol=0;col<nCount;col++){varbIsDark=oQRCode.isDark(row,col);varnLeft=col*nWidth;varnTop=row*nHeight;_oContext.strokeStyle=bIsDark?_htOption.colorDark:_htOption.colorLight;_oContext.lineWidth=1;_oContext.fillStyle=bIsDark?_htOption.colorDark:_htOption.colorLight;_oContext.fillRect(nLeft,nTop,nWidth,nHeight);_oContext.strokeRect(Math.floor(nLeft)+0.5,Math.floor(nTop)+0.5,nRoundedWidth,nRoundedHeight);_oContext.strokeRect(Math.ceil(nLeft)-0.5,Math.ceil(nTop)-0.5,nRoundedWidth,nRoundedHeight)}}this._bIsPainted=true};Drawing.prototype.makeImage=function(){if(this._bIsPainted){_safeSetDataURI.call(this,_onMakeImage)}};Drawing.prototype.isPainted=function(){returnthis._bIsPainted};Drawing.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height);this._bIsPainted=false};Drawing.prototype.round=function(nNumber){if(!nNumber){returnnNumber}returnMath.floor(nNumber*1000)/1000};returnDrawing})();function_getTypeNumber(sText,nCorrectLevel){varnType=1;varlength=_getUTF8Length(sText);for(vari=0,len=QRCodeLimitLength.length;i<=len;i++){varnLimit=0;switch(nCorrectLevel){caseQRErrorCorrectLevel.L:nLimit=QRCodeLimitLength[i][0];break;caseQRErrorCorrectLevel.M:nLimit=QRCodeLimitLength[i][1];break;caseQRErrorCorrectLevel.Q:nLimit=QRCodeLimitLength[i][2];break;caseQRErrorCorrectLevel.H:nLimit=QRCodeLimitLength[i][3];break}if(length<=nLimit){break}else{nType++}}if(nType>QRCodeLimitLength.length){thrownewError("Too long data")}returnnType}function_getUTF8Length(sText){varreplacedText=encodeURI(sText).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");returnreplacedText.length+(replacedText.length!=sText?3:0)}QRCode=function(el,vOption){this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRErrorCorrectLevel.H};if(typeofvOption==="string"){vOption={text:vOption}}if(vOption){for(variinvOption){this._htOption[i]=vOption[i]}}if(typeofel=="string"){el=document.getElementById(el)}if(this._htOption.useSVG){Drawing=svgDrawer}this._android=_getAndroid();this._el=el;this._oQRCode=null;this._oDrawing=newDrawing(this._el,this._htOption);if(this._htOption.text){this.makeCode(this._htOption.text)}};QRCode.prototype.makeCode=function(sText){this._oQRCode=newQRCodeModel(_getTypeNumber(sText,this._htOption.correctLevel),this._htOption.correctLevel);this._oQRCode.addData(sText);this._oQRCode.make();this._oDrawing.draw(this._oQRCode);this.makeImage()};QRCode.prototype.makeImage=function(){if(typeofthis._oDrawing.makeImage=="function"&&(!this._android||this._android>=3)){this._oDrawing.makeImage()}};QRCode.prototype.clear=function(){this._oDrawing.clear()};QRCode.CorrectLevel=QRErrorCorrectLevel