ethereum-lite-explorer
Version:
Ethereum Lite Explorer
2 lines • 31.9 kB
JavaScript
(window["webpackJsonp_aleth_io_ethLite"]=window["webpackJsonp_aleth_io_ethLite"]||[]).push([[4],{"+a/P":function(t,r,e){var n=e("JFjY");var o=e("2qcX");var a=e("Fg8C");var i=e("Dnq1");function u(t,r,e,a,i){var u=[].slice.call(arguments,1);var s=u.length;var f="function"==typeof u[s-1];if(!f&&!n())throw new Error("Callback required as last argument");if(!f){if(s<1)throw new Error("Too few arguments provided");if(1===s){e=r;r=a=void 0}else if(2===s&&!r.getContext){a=e;e=r;r=void 0}return new Promise(function(n,i){try{var u=o.create(e,a);n(t(u,r,a))}catch(t){i(t)}})}if(s<2)throw new Error("Too few arguments provided");if(2===s){i=e;e=r;r=a=void 0}else if(3===s)if(r.getContext&&void 0===i){i=a;a=void 0}else{i=a;a=e;e=r;r=void 0}try{var v=o.create(e,a);i(null,t(v,r,a))}catch(t){i(t)}}r.create=o.create;r.toCanvas=u.bind(null,a.render);r.toDataURL=u.bind(null,a.renderToDataURL);r.toString=u.bind(null,function(t,r,e){return i.render(t,e)})},"+xW6":function(t,r,e){"use strict";var n={single_source_shortest_paths:function(t,r,e){var o={};var a={};a[r]=0;var i=n.PriorityQueue.make();i.push(r,0);var u,s,f,v,h,c,l,g,d;for(;!i.empty();){s=(u=i.pop()).value;v=u.cost;h=t[s]||{};for(f in h)if(h.hasOwnProperty(f)){l=v+(c=h[f]);g=a[f];if((d=void 0===a[f])||g>l){a[f]=l;i.push(f,l);o[f]=s}}}if(void 0!==e&&void 0===a[e]){var p=["Could not find a path from ",r," to ",e,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(t,r){var e=[];var n=r;var o;for(;n;){e.push(n);o=t[n];n=t[n]}e.reverse();return e},find_path:function(t,r,e){var o=n.single_source_shortest_paths(t,r,e);return n.extract_shortest_path_from_predecessor_list(o,e)},PriorityQueue:{make:function(t){var r=n.PriorityQueue,e={},o;t=t||{};for(o in r)r.hasOwnProperty(o)&&(e[o]=r[o]);e.queue=[];e.sorter=t.sorter||r.default_sorter;return e},default_sorter:function(t,r){return t.cost-r.cost},push:function(t,r){var e={value:t,cost:r};this.queue.push(e);this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=n},"/UjK":function(t,r){function e(t){if("string"!=typeof t)throw new Error("Color should be defined as hex string");var r=t.slice().replace("#","").split("");if(r.length<3||5===r.length||r.length>8)throw new Error("Invalid hex color: "+t);3!==r.length&&4!==r.length||(r=Array.prototype.concat.apply([],r.map(function(t){return[t,t]})));6===r.length&&r.push("F","F");var e=parseInt(r.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:255&e,hex:"#"+r.slice(0,6).join("")}}r.getOptions=function t(r){r||(r={});r.color||(r.color={});var n=void 0===r.margin||null===r.margin||r.margin<0?4:r.margin;var o=r.width&&r.width>=21?r.width:void 0;var a=r.scale||4;return{width:o,scale:o?4:a,margin:n,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}};r.getScale=function t(r,e){return e.width&&e.width>=r+2*e.margin?e.width/(r+2*e.margin):e.scale};r.getImageWidth=function t(e,n){var o=r.getScale(e,n);return Math.floor((e+2*n.margin)*o)};r.qrToImageData=function t(e,n,o){var a=n.modules.size;var i=n.modules.data;var u=r.getScale(a,o);var s=Math.floor((a+2*o.margin)*u);var f=o.margin*u;var v=[o.color.light,o.color.dark];for(var h=0;h<s;h++)for(var c=0;c<s;c++){var l=4*(h*s+c);var g=o.color.light;if(h>=f&&c>=f&&h<s-f&&c<s-f){var d;var p;g=v[i[Math.floor((h-f)/u)*a+Math.floor((c-f)/u)]?1:0]}e[l++]=g.r;e[l++]=g.g;e[l++]=g.b;e[l]=g.a}}},"0LT6":function(t,r,e){var n=e("XWDa");var o=e("EbFT");var a=e("uSPP");var i=e("H4bg");var u=e("mSge");var s=e("J4wr");var f=e("OWvW");var v=e("+xW6");function h(t){return unescape(encodeURIComponent(t)).length}function c(t,r,e){var n=[];var o;for(;null!==(o=t.exec(e));)n.push({data:o[0],index:o.index,mode:r,length:o[0].length});return n}function l(t){var r=c(s.NUMERIC,n.NUMERIC,t);var e=c(s.ALPHANUMERIC,n.ALPHANUMERIC,t);var o;var a;if(f.isKanjiModeEnabled()){o=c(s.BYTE,n.BYTE,t);a=c(s.KANJI,n.KANJI,t)}else{o=c(s.BYTE_KANJI,n.BYTE,t);a=[]}var i;return r.concat(e,o,a).sort(function(t,r){return t.index-r.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function g(t,r){switch(r){case n.NUMERIC:return o.getBitsLength(t);case n.ALPHANUMERIC:return a.getBitsLength(t);case n.KANJI:return u.getBitsLength(t);case n.BYTE:return i.getBitsLength(t)}}function d(t){return t.reduce(function(t,r){var e=t.length-1>=0?t[t.length-1]:null;if(e&&e.mode===r.mode){t[t.length-1].data+=r.data;return t}t.push(r);return t},[])}function p(t){var r=[];for(var e=0;e<t.length;e++){var o=t[e];switch(o.mode){case n.NUMERIC:r.push([o,{data:o.data,mode:n.ALPHANUMERIC,length:o.length},{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.ALPHANUMERIC:r.push([o,{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.KANJI:r.push([o,{data:o.data,mode:n.BYTE,length:h(o.data)}]);break;case n.BYTE:r.push([{data:o.data,mode:n.BYTE,length:h(o.data)}])}}return r}function w(t,r){var e={};var o={start:{}};var a=["start"];for(var i=0;i<t.length;i++){var u=t[i];var s=[];for(var f=0;f<u.length;f++){var v=u[f];var h=""+i+f;s.push(h);e[h]={node:v,lastCount:0};o[h]={};for(var c=0;c<a.length;c++){var l=a[c];if(e[l]&&e[l].node.mode===v.mode){o[l][h]=g(e[l].lastCount+v.length,v.mode)-g(e[l].lastCount,v.mode);e[l].lastCount+=v.length}else{e[l]&&(e[l].lastCount=v.length);o[l][h]=g(v.length,v.mode)+4+n.getCharCountIndicator(v.mode,r)}}}a=s}for(c=0;c<a.length;c++)o[a[c]]["end"]=0;return{map:o,table:e}}function m(t,r){var e;var s=n.getBestModeForData(t);if((e=n.from(r,s))!==n.BYTE&&e.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(e)+".\n Suggested mode is: "+n.toString(s));e!==n.KANJI||f.isKanjiModeEnabled()||(e=n.BYTE);switch(e){case n.NUMERIC:return new o(t);case n.ALPHANUMERIC:return new a(t);case n.KANJI:return new u(t);case n.BYTE:return new i(t)}}r.fromArray=function t(r){return r.reduce(function(t,r){"string"==typeof r?t.push(m(r,null)):r.data&&t.push(m(r.data,r.mode));return t},[])};r.fromString=function t(e,n){var o;var a;var i=w(p(l(e,f.isKanjiModeEnabled())),n);var u=v.find_path(i.map,"start","end");var s=[];for(var h=1;h<u.length-1;h++)s.push(i.table[u[h]].node);return r.fromArray(d(s))};r.rawSplit=function t(e){return r.fromArray(l(e,f.isKanjiModeEnabled()))}},"2qcX":function(t,r,e){var n=e("4SNz");var o=e("OWvW");var a=e("fFB8");var i=e("5Q0v");var u=e("g5Bx");var s=e("MPSF");var f=e("mcj0");var v=e("cHmf");var h=e("phLJ");var c=e("xI7O");var l=e("vS3M");var g=e("fJmk");var d=e("XWDa");var p=e("0LT6");var w=e("jz3v");function m(t,r){var e=t.size;var n=f.getPositions(r);for(var o=0;o<n.length;o++){var a=n[o][0];var i=n[o][1];for(var u=-1;u<=7;u++){if(a+u<=-1||e<=a+u)continue;for(var s=-1;s<=7;s++){if(i+s<=-1||e<=i+s)continue;u>=0&&u<=6&&(0===s||6===s)||s>=0&&s<=6&&(0===u||6===u)||u>=2&&u<=4&&s>=2&&s<=4?t.set(a+u,i+s,!0,!0):t.set(a+u,i+s,!1,!0)}}}}function y(t){var r=t.size;for(var e=8;e<r-8;e++){var n=e%2==0;t.set(e,6,n,!0);t.set(6,e,n,!0)}}function E(t,r){var e=s.getPositions(r);for(var n=0;n<e.length;n++){var o=e[n][0];var a=e[n][1];for(var i=-2;i<=2;i++)for(var u=-2;u<=2;u++)-2===i||2===i||-2===u||2===u||0===i&&0===u?t.set(o+i,a+u,!0,!0):t.set(o+i,a+u,!1,!0)}}function A(t,r){var e=t.size;var n=l.getEncodedBits(r);var o,a,i;for(var u=0;u<18;u++){o=Math.floor(u/3);a=u%3+e-8-3;i=1==(n>>u&1);t.set(o,a,i,!0);t.set(a,o,i,!0)}}function B(t,r,e){var n=t.size;var o=g.getEncodedBits(r,e);var a,i;for(a=0;a<15;a++){i=1==(o>>a&1);a<6?t.set(a,8,i,!0):a<8?t.set(a+1,8,i,!0):t.set(n-15+a,8,i,!0);a<8?t.set(8,n-a-1,i,!0):a<9?t.set(8,15-a-1+1,i,!0):t.set(8,15-a-1,i,!0)}t.set(n-8,8,1,!0)}function P(t,r){var e=t.size;var n=-1;var o=e-1;var a=7;var i=0;for(var u=e-1;u>0;u-=2){6===u&&u--;for(;;){for(var s=0;s<2;s++)if(!t.isReserved(o,u-s)){var f=!1;i<r.length&&(f=1==(r[i]>>>a&1));t.set(o,u-s,f);if(-1===--a){i++;a=7}}if((o+=n)<0||e<=o){o-=n;n=-n;break}}}}function b(t,r,e){var n=new i;e.forEach(function(r){n.put(r.mode.bit,4);n.put(r.getLength(),d.getCharCountIndicator(r.mode,t));r.write(n)});var a;var u;var s=8*(o.getSymbolTotalCodewords(t)-h.getTotalCodewordsCount(t,r));n.getLengthInBits()+4<=s&&n.put(0,4);for(;n.getLengthInBits()%8!=0;)n.putBit(0);var f=(s-n.getLengthInBits())/8;for(var v=0;v<f;v++)n.put(v%2?17:236,8);return T(n,t,r)}function T(t,r,e){var a=o.getSymbolTotalCodewords(r);var i;var u=a-h.getTotalCodewordsCount(r,e);var s=h.getBlocksCount(r,e);var f;var v=s-a%s;var l=Math.floor(a/s);var g=Math.floor(u/s);var d=g+1;var p=l-g;var w=new c(p);var m=0;var y=new Array(s);var E=new Array(s);var A=0;var B=new n(t.buffer);for(var P=0;P<s;P++){var b=P<v?g:d;y[P]=B.slice(m,m+b);E[P]=w.encode(y[P]);m+=b;A=Math.max(A,b)}var T=new n(a);var R=0;var C,I;for(C=0;C<A;C++)for(I=0;I<s;I++)C<y[I].length&&(T[R++]=y[I][C]);for(C=0;C<p;C++)for(I=0;I<s;I++)T[R++]=E[I][C];return T}function R(t,r,e,n){var a;if(w(t))a=p.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var i=r;if(!i){var s=p.rawSplit(t);i=l.getBestVersionForData(s,e)}a=p.fromString(t,i||40)}var f=l.getBestVersionForData(a,e);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(r){if(r<f)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else r=f;var h=b(r,e,a);var c=o.getSymbolSize(r);var g=new u(c);m(g,r);y(g);E(g,r);B(g,e,0);r>=7&&A(g,r);P(g,h);isNaN(n)&&(n=v.getBestMask(g,B.bind(null,g,e)));v.applyMask(n,g);B(g,e,n);return{modules:g,version:r,errorCorrectionLevel:e,maskPattern:n,segments:a}}r.create=function t(r,e){if(void 0===r||""===r)throw new Error("No input text");var n=a.M;var i;var u;if(void 0!==e){n=a.from(e.errorCorrectionLevel,a.M);i=l.from(e.version);u=v.from(e.maskPattern);e.toSJISFunc&&o.setToSJISFunction(e.toSJISFunc)}return R(r,i,n,u)}},"4SNz":function(t,r,e){"use strict";var n=e("jz3v");function o(){try{var t=new Uint8Array(1);t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return 42===t.foo()}catch(t){return!1}}i.TYPED_ARRAY_SUPPORT=o();var a=i.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function i(t,r,e){if(!(i.TYPED_ARRAY_SUPPORT||this instanceof i))return new i(t,r,e);if("number"==typeof t)return v(this,t);return y(this,t,r,e)}if(i.TYPED_ARRAY_SUPPORT){i.prototype.__proto__=Uint8Array.prototype;i.__proto__=Uint8Array;"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})}function u(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function s(t){return t!=t}function f(t,r){var e;if(i.TYPED_ARRAY_SUPPORT)(e=new Uint8Array(r)).__proto__=i.prototype;else{null===(e=t)&&(e=new i(r));e.length=r}return e}function v(t,r){var e=f(t,r<0?0:0|u(r));if(!i.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function h(t,r){var e=0|p(r);var n=f(t,e);var o=n.write(r);o!==e&&(n=n.slice(0,o));return n}function c(t,r){var e=r.length<0?0:0|u(r.length);var n=f(t,e);for(var o=0;o<e;o+=1)n[o]=255&r[o];return n}function l(t,r,e,n){if(e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");var o;o=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);i.TYPED_ARRAY_SUPPORT?o.__proto__=i.prototype:o=c(t,o);return o}function g(t,r){if(i.isBuffer(r)){var e=0|u(r.length);var n=f(t,e);if(0===n.length)return n;r.copy(n,0,0,e);return n}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r){if("number"!=typeof r.length||s(r.length))return f(t,0);return c(t,r)}if("Buffer"===r.type&&Array.isArray(r.data))return c(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(t,r){r=r||1/0;var e;var n=t.length;var o=null;var a=[];for(var i=0;i<n;++i){if((e=t.charCodeAt(i))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(r-=3)>-1&&a.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&a.push(239,191,189);o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&a.push(239,191,189);o=null;if(e<128){if((r-=1)<0)break;a.push(e)}else if(e<2048){if((r-=2)<0)break;a.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;a.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return a}function p(t){if(i.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r;if(0===t.length)return 0;return d(t).length}function w(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function m(t,r,e,n){return w(d(r,t.length-e),t,e,n)}function y(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer)return l(t,r,e,n);if("string"==typeof r)return h(t,r,e);return g(t,r)}i.prototype.write=function t(r,e,n){if(void 0===e){n=this.length;e=0}else if(void 0===n&&"string"==typeof e){n=this.length;e=0}else if(isFinite(e)){e|=0;isFinite(n)?n|=0:n=void 0}var o=this.length-e;(void 0===n||n>o)&&(n=o);if(r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return m(this,r,e,n)};i.prototype.slice=function t(r,e){var n=this.length;r=~~r;e=void 0===e?n:~~e;r<0?(r+=n)<0&&(r=0):r>n&&(r=n);e<0?(e+=n)<0&&(e=0):e>n&&(e=n);e<r&&(e=r);var o;if(i.TYPED_ARRAY_SUPPORT)(o=this.subarray(r,e)).__proto__=i.prototype;else{var a=e-r;o=new i(a,void 0);for(var u=0;u<a;++u)o[u]=this[u+r]}return o};i.prototype.copy=function t(r,e,n,o){n||(n=0);o||0===o||(o=this.length);e>=r.length&&(e=r.length);e||(e=0);o>0&&o<n&&(o=n);if(o===n)return 0;if(0===r.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length);r.length-e<o-n&&(o=r.length-e+n);var a=o-n;var u;if(this===r&&n<e&&e<o)for(u=a-1;u>=0;--u)r[u+e]=this[u+n];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(u=0;u<a;++u)r[u+e]=this[u+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+a),e);return a};i.prototype.fill=function t(r,e,n){if("string"==typeof r){if("string"==typeof e){e=0;n=this.length}else"string"==typeof n&&(n=this.length);if(1===r.length){var o=r.charCodeAt(0);o<256&&(r=o)}}else"number"==typeof r&&(r&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e>>>=0;n=void 0===n?this.length:n>>>0;r||(r=0);var a;if("number"==typeof r)for(a=e;a<n;++a)this[a]=r;else{var u=i.isBuffer(r)?r:new i(r);var s=u.length;for(a=0;a<n-e;++a)this[a+e]=u[a%s]}return this};i.concat=function t(r,e){if(!n(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return f(null,0);var o;if(void 0===e){e=0;for(o=0;o<r.length;++o)e+=r[o].length}var a=v(null,e);var u=0;for(o=0;o<r.length;++o){var s=r[o];if(!i.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(a,u);u+=s.length}return a};i.byteLength=p;i.prototype._isBuffer=!0;i.isBuffer=function t(r){return!(null==r||!r._isBuffer)};t.exports=i},"5Q0v":function(t,r){function e(){this.buffer=[];this.length=0}e.prototype={get:function(t){var r=Math.floor(t/8);return 1==(this.buffer[r]>>>7-t%8&1)},put:function(t,r){for(var e=0;e<r;e++)this.putBit(1==(t>>>r-e-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0);t&&(this.buffer[r]|=128>>>this.length%8);this.length++}};t.exports=e},Dnq1:function(t,r,e){var n=e("/UjK");function o(t,r){var e=t.a/255;var n=r+'="'+t.hex+'"';return e<1?n+" "+r+'-opacity="'+e.toFixed(2).slice(1)+'"':n}function a(t,r,e){var n=t+r;void 0!==e&&(n+=" "+e);return n}function i(t,r,e){var n="";var o=0;var i=!1;var u=0;for(var s=0;s<t.length;s++){var f=Math.floor(s%r);var v=Math.floor(s/r);f||i||(i=!0);if(t[s]){u++;if(!(s>0&&f>0&&t[s-1])){n+=i?a("M",f+e,.5+v+e):a("m",o,0);o=0;i=!1}if(!(f+1<r&&t[s+1])){n+=a("h",u);u=0}}else o++}return n}r.render=function t(r,e,a){var u=n.getOptions(e);var s=r.modules.size;var f=r.modules.data;var v=s+2*u.margin;var h=u.color.light.a?"<path "+o(u.color.light,"fill")+' d="M0 0h'+v+"v"+v+'H0z"/>':"";var c="<path "+o(u.color.dark,"stroke")+' d="'+i(f,s,u.margin)+'"/>';var l='viewBox="0 0 '+v+" "+v+'"';var g;var d='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+l+' shape-rendering="crispEdges">'+h+c+"</svg>\n";"function"==typeof a&&a(null,d);return d}},EbFT:function(t,r,e){var n=e("XWDa");function o(t){this.mode=n.NUMERIC;this.data=t.toString()}o.getBitsLength=function t(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)};o.prototype.getLength=function t(){return this.data.length};o.prototype.getBitsLength=function t(){return o.getBitsLength(this.data.length)};o.prototype.write=function t(r){var e,n,o;for(e=0;e+3<=this.data.length;e+=3){n=this.data.substr(e,3);o=parseInt(n,10);r.put(o,10)}var a=this.data.length-e;if(a>0){n=this.data.substr(e);o=parseInt(n,10);r.put(o,3*a+1)}};t.exports=o},Fg8C:function(t,r,e){var n=e("/UjK");function o(t,r,e){t.clearRect(0,0,r.width,r.height);r.style||(r.style={});r.height=e;r.width=e;r.style.height=e+"px";r.style.width=e+"px"}function a(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}r.render=function t(r,e,i){var u=i;var s=e;if(!(void 0!==u||e&&e.getContext)){u=e;e=void 0}e||(s=a());u=n.getOptions(u);var f=n.getImageWidth(r.modules.size,u);var v=s.getContext("2d");var h=v.createImageData(f,f);n.qrToImageData(h.data,r,u);o(v,s,f);v.putImageData(h,0,0);return s};r.renderToDataURL=function t(e,n,o){var a=o;if(!(void 0!==a||n&&n.getContext)){a=n;n=void 0}a||(a={});var i=r.render(e,n,a);var u=a.type||"image/png";var s=a.rendererOpts||{};return i.toDataURL(u,s.quality)}},H4bg:function(t,r,e){var n=e("4SNz");var o=e("XWDa");function a(t){this.mode=o.BYTE;this.data=new n(t)}a.getBitsLength=function t(r){return 8*r};a.prototype.getLength=function t(){return this.data.length};a.prototype.getBitsLength=function t(){return a.getBitsLength(this.data.length)};a.prototype.write=function(t){for(var r=0,e=this.data.length;r<e;r++)t.put(this.data[r],8)};t.exports=a},J4wr:function(t,r){var e="[0-9]+";var n="[A-Z $%*+\\-./:]+";var o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";var a="(?:(?![A-Z0-9 $%*+\\-./:]|"+(o=o.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";r.KANJI=new RegExp(o,"g");r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");r.BYTE=new RegExp(a,"g");r.NUMERIC=new RegExp(e,"g");r.ALPHANUMERIC=new RegExp(n,"g");var i=new RegExp("^"+o+"$");var u=new RegExp("^[0-9]+$");var s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function t(r){return i.test(r)};r.testNumeric=function t(r){return u.test(r)};r.testAlphanumeric=function t(r){return s.test(r)}},JFjY:function(t,r){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},"Kv8/":function(t,r,e){var n=e("4SNz");if(n.alloc){var o=n.alloc(512);var a=n.alloc(256)}else{var o=new n(512);var a=new n(256)}!function t(){var r=1;for(var e=0;e<255;e++){o[e]=r;a[r]=e;256&(r<<=1)&&(r^=285)}for(e=255;e<512;e++)o[e]=o[e-255]}();r.log=function t(r){if(r<1)throw new Error("log("+r+")");return a[r]};r.exp=function t(r){return o[r]};r.mul=function t(r,e){if(0===r||0===e)return 0;return o[a[r]+a[e]]}},MPSF:function(t,r,e){var n=e("OWvW").getSymbolSize;r.getRowColCoords=function t(r){if(1===r)return[];var e=Math.floor(r/7)+2;var o=n(r);var a=145===o?26:2*Math.ceil((o-13)/(2*e-2));var i=[o-7];for(var u=1;u<e-1;u++)i[u]=i[u-1]-a;i.push(6);return i.reverse()};r.getPositions=function t(e){var n=[];var o=r.getRowColCoords(e);var a=o.length;for(var i=0;i<a;i++)for(var u=0;u<a;u++){if(0===i&&0===u||0===i&&u===a-1||i===a-1&&0===u)continue;n.push([o[i],o[u]])}return n}},OWvW:function(t,r){var e;var n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];r.getSymbolSize=function t(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return 4*r+17};r.getSymbolTotalCodewords=function t(r){return n[r]};r.getBCHDigit=function(t){var r=0;for(;0!==t;){r++;t>>>=1}return r};r.setToSJISFunction=function t(r){if("function"!=typeof r)throw new Error('"toSJISFunc" is not a valid function.');e=r};r.isKanjiModeEnabled=function(){return void 0!==e};r.toSJIS=function t(r){return e(r)}},XWDa:function(t,r,e){var n=e("eGTa");var o=e("J4wr");r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};r.MIXED={bit:-1};r.getCharCountIndicator=function t(r,e){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!n.isValid(e))throw new Error("Invalid version: "+e);if(e>=1&&e<10)return r.ccBits[0];if(e<27)return r.ccBits[1];return r.ccBits[2]};r.getBestModeForData=function t(e){return o.testNumeric(e)?r.NUMERIC:o.testAlphanumeric(e)?r.ALPHANUMERIC:o.testKanji(e)?r.KANJI:r.BYTE};r.toString=function t(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")};r.isValid=function t(r){return r&&r.bit&&r.ccBits};function a(t){if("string"!=typeof t)throw new Error("Param is not a string");var e;switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}r.from=function t(e,n){if(r.isValid(e))return e;try{return a(e)}catch(t){return n}}},ZUi3:function(t,r,e){var n=e("4SNz");var o=e("Kv8/");r.mul=function t(r,e){var a=new n(r.length+e.length-1);a.fill(0);for(var i=0;i<r.length;i++)for(var u=0;u<e.length;u++)a[i+u]^=o.mul(r[i],e[u]);return a};r.mod=function t(r,e){var a=new n(r);for(;a.length-e.length>=0;){var i=a[0];for(var u=0;u<e.length;u++)a[u]^=o.mul(e[u],i);var s=0;for(;s<a.length&&0===a[s];)s++;a=a.slice(s)}return a};r.generateECPolynomial=function t(e){var a=new n([1]);for(var i=0;i<e;i++)a=r.mul(a,[1,o.exp(i)]);return a}},cHmf:function(t,r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e=3,n=3,o=40,a=10;r.isValid=function t(r){return null!=r&&""!==r&&!isNaN(r)&&r>=0&&r<=7};r.from=function t(e){return r.isValid(e)?parseInt(e,10):void 0};r.getPenaltyN1=function t(r){var n=r.size;var o=0;var a=0;var i=0;var u=null;var s=null;for(var f=0;f<n;f++){a=i=0;u=s=null;for(var v=0;v<n;v++){var h=r.get(f,v);if(h===u)a++;else{a>=5&&(o+=e+(a-5));u=h;a=1}if((h=r.get(v,f))===s)i++;else{i>=5&&(o+=e+(i-5));s=h;i=1}}a>=5&&(o+=e+(a-5));i>=5&&(o+=e+(i-5))}return o};r.getPenaltyN2=function t(r){var e=r.size;var o=0;for(var a=0;a<e-1;a++)for(var i=0;i<e-1;i++){var u=r.get(a,i)+r.get(a,i+1)+r.get(a+1,i)+r.get(a+1,i+1);4!==u&&0!==u||o++}return o*n};r.getPenaltyN3=function t(r){var e=r.size;var n=0;var a=0;var i=0;for(var u=0;u<e;u++){a=i=0;for(var s=0;s<e;s++){a=a<<1&2047|r.get(u,s);s>=10&&(1488===a||93===a)&&n++;i=i<<1&2047|r.get(s,u);s>=10&&(1488===i||93===i)&&n++}}return n*o};r.getPenaltyN4=function t(r){var e=0;var n=r.data.length;for(var o=0;o<n;o++)e+=r.data[o];var i;return Math.abs(Math.ceil(100*e/n/5)-10)*a};function i(t,e,n){switch(t){case r.Patterns.PATTERN000:return(e+n)%2==0;case r.Patterns.PATTERN001:return e%2==0;case r.Patterns.PATTERN010:return n%3==0;case r.Patterns.PATTERN011:return(e+n)%3==0;case r.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case r.Patterns.PATTERN101:return e*n%2+e*n%3==0;case r.Patterns.PATTERN110:return(e*n%2+e*n%3)%2==0;case r.Patterns.PATTERN111:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}r.applyMask=function t(r,e){var n=e.size;for(var o=0;o<n;o++)for(var a=0;a<n;a++){if(e.isReserved(a,o))continue;e.xor(a,o,i(r,a,o))}};r.getBestMask=function t(e,n){var o=Object.keys(r.Patterns).length;var a=0;var i=1/0;for(var u=0;u<o;u++){n(u);r.applyMask(u,e);var s=r.getPenaltyN1(e)+r.getPenaltyN2(e)+r.getPenaltyN3(e)+r.getPenaltyN4(e);r.applyMask(u,e);if(s<i){i=s;a=u}}return a}},eGTa:function(t,r){r.isValid=function t(r){return!isNaN(r)&&r>=1&&r<=40}},fFB8:function(t,r){r.L={bit:1};r.M={bit:0};r.Q={bit:3};r.H={bit:2};function e(t){if("string"!=typeof t)throw new Error("Param is not a string");var e;switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function t(r){return r&&void 0!==r.bit&&r.bit>=0&&r.bit<4};r.from=function t(n,o){if(r.isValid(n))return n;try{return e(n)}catch(t){return o}}},fJmk:function(t,r,e){var n=e("OWvW");var o=1335;var a=21522;var i=n.getBCHDigit(o);r.getEncodedBits=function t(r,e){var a=r.bit<<3|e;var u=a<<10;for(;n.getBCHDigit(u)-i>=0;)u^=o<<n.getBCHDigit(u)-i;return 21522^(a<<10|u)}},g5Bx:function(t,r,e){var n=e("4SNz");function o(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t;this.data=new n(t*t);this.data.fill(0);this.reservedBit=new n(t*t);this.reservedBit.fill(0)}o.prototype.set=function(t,r,e,n){var o=t*this.size+r;this.data[o]=e;n&&(this.reservedBit[o]=!0)};o.prototype.get=function(t,r){return this.data[t*this.size+r]};o.prototype.xor=function(t,r,e){this.data[t*this.size+r]^=e};o.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]};t.exports=o},jz3v:function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},mSge:function(t,r,e){var n=e("XWDa");var o=e("OWvW");function a(t){this.mode=n.KANJI;this.data=t}a.getBitsLength=function t(r){return 13*r};a.prototype.getLength=function t(){return this.data.length};a.prototype.getBitsLength=function t(){return a.getBitsLength(this.data.length)};a.prototype.write=function(t){var r;for(r=0;r<this.data.length;r++){var e=o.toSJIS(this.data[r]);if(e>=33088&&e<=40956)e-=33088;else{if(!(e>=57408&&e<=60351))throw new Error("Invalid SJIS character: "+this.data[r]+"\nMake sure your charset is UTF-8");e-=49472}e=192*(e>>>8&255)+(255&e);t.put(e,13)}};t.exports=a},mcj0:function(t,r,e){var n=e("OWvW").getSymbolSize;var o=7;r.getPositions=function t(r){var e=n(r);return[[0,0],[e-7,0],[0,e-7]]}},phLJ:function(t,r,e){var n=e("fFB8");var o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81];var a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];r.getBlocksCount=function t(r,e){switch(e){case n.L:return o[4*(r-1)+0];case n.M:return o[4*(r-1)+1];case n.Q:return o[4*(r-1)+2];case n.H:return o[4*(r-1)+3];default:return}};r.getTotalCodewordsCount=function t(r,e){switch(e){case n.L:return a[4*(r-1)+0];case n.M:return a[4*(r-1)+1];case n.Q:return a[4*(r-1)+2];case n.H:return a[4*(r-1)+3];default:return}}},tNOs:function(t,r,e){"use strict";e.r(r);e.d(r,"QrCode",function(){return u});var n=e("cDcd");var o=e.n(n);var a=e("+a/P");var i=e.n(a);class u extends n["PureComponent"]{componentDidMount(){this.renderToCanvasDeferred()}componentDidUpdate(t){t.value!==this.props.value&&this.renderToCanvasDeferred()}componentWillUnmount(){this.cancelDeferredRender()}renderToCanvasDeferred(){this.cancelDeferredRender();this.timeoutId=setTimeout(()=>{a["toCanvas"](this.canvasEl,this.props.value).catch(t=>{this.props.logger.error("Couldn't render QRCode",t,{value:this.props.value})})})}cancelDeferredRender(){if(this.timeoutId){clearTimeout(this.timeoutId);this.timeoutId=void 0}}render(){return n["createElement"]("canvas",{ref:t=>this.canvasEl=t})}}},uSPP:function(t,r,e){var n=e("XWDa");var o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(t){this.mode=n.ALPHANUMERIC;this.data=t}a.getBitsLength=function t(r){return 11*Math.floor(r/2)+r%2*6};a.prototype.getLength=function t(){return this.data.length};a.prototype.getBitsLength=function t(){return a.getBitsLength(this.data.length)};a.prototype.write=function t(r){var e;for(e=0;e+2<=this.data.length;e+=2){var n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]);r.put(n,11)}this.data.length%2&&r.put(o.indexOf(this.data[e]),6)};t.exports=a},vS3M:function(t,r,e){var n=e("OWvW");var o=e("phLJ");var a=e("fFB8");var i=e("XWDa");var u=e("eGTa");var s=e("jz3v");var f=7973;var v=n.getBCHDigit(f);function h(t,e,n){for(var o=1;o<=40;o++)if(e<=r.getCapacity(o,n,t))return o;return}function c(t,r){return i.getCharCountIndicator(t,r)+4}function l(t,r){var e=0;t.forEach(function(t){var n=c(t.mode,r);e+=n+t.getBitsLength()});return e}function g(t,e){for(var n=1;n<=40;n++){var o;if(l(t,n)<=r.getCapacity(n,e,i.MIXED))return n}return}r.from=function t(r,e){if(u.isValid(r))return parseInt(r,10);return e};r.getCapacity=function t(r,e,a){if(!u.isValid(r))throw new Error("Invalid QR Code version");void 0===a&&(a=i.BYTE);var s;var f;var v=8*(n.getSymbolTotalCodewords(r)-o.getTotalCodewordsCount(r,e));if(a===i.MIXED)return v;var h=v-c(a,r);switch(a){case i.NUMERIC:return Math.floor(h/10*3);case i.ALPHANUMERIC:return Math.floor(h/11*2);case i.KANJI:return Math.floor(h/13);case i.BYTE:default:return Math.floor(h/8)}};r.getBestVersionForData=function t(r,e){var n;var o=a.from(e,a.M);if(s(r)){if(r.length>1)return g(r,o);if(0===r.length)return 1;n=r[0]}else n=r;return h(n.mode,n.getLength(),o)};r.getEncodedBits=function t(r){if(!u.isValid(r)||r<7)throw new Error("Invalid QR Code version");var e=r<<12;for(;n.getBCHDigit(e)-v>=0;)e^=f<<n.getBCHDigit(e)-v;return r<<12|e}},xI7O:function(t,r,e){var n=e("4SNz");var o=e("ZUi3");function a(t){this.genPoly=void 0;this.degree=t;this.degree&&this.initialize(this.degree)}a.prototype.initialize=function t(r){this.degree=r;this.genPoly=o.generateECPolynomial(this.degree)};a.prototype.encode=function t(r){if(!this.genPoly)throw new Error("Encoder not initialized");var e=new n(this.degree);e.fill(0);var a=n.concat([r,e],r.length+this.degree);var i=o.mod(a,this.genPoly);var u=this.degree-i.length;if(u>0){var s=new n(this.degree);s.fill(0);i.copy(s,u);return s}return i};t.exports=a}}]);
//# sourceMappingURL=014d46ded436c3e44069.bundle.js.map