@vkontakte/vk-qr 2.1.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +22 -3
- package/dist/constants.d.ts +10 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/figures.d.ts +9 -0
- package/dist/figures.d.ts.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1311 -0
- package/dist/index.js.map +1 -0
- package/dist/qr.d.ts +71 -0
- package/dist/qr.d.ts.map +1 -0
- package/dist/svg-path.d.ts +8 -0
- package/dist/svg-path.d.ts.map +1 -0
- package/dist/svg.d.ts +6 -0
- package/dist/svg.d.ts.map +1 -0
- package/dist/types.d.ts +69 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +55 -80
- package/src/constants.ts +9 -0
- package/src/figures.ts +106 -0
- package/src/index.ts +45 -27
- package/src/qr.ts +711 -837
- package/src/svg-path.ts +254 -0
- package/src/svg.ts +132 -257
- package/src/types.ts +30 -12
- package/dist/cjs/index.js +0 -1185
- package/dist/es/index.js +0 -1183
- package/dist/types/index.d.ts +0 -20
- package/dist/types/qr.d.ts +0 -87
- package/dist/types/svg.d.ts +0 -9
- package/dist/types/types.d.ts +0 -51
- package/dist/umd/qrCodeGenerator.js +0 -1191
- package/dist/umd/qrCodeGenerator.min.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t=t||self).qrCodeGenerator=r()}(this,function(){"use strict";function k(t,r,e,o,n){if(t<7&&r<7)return!1;if(e-7<=t&&r<7)return!1;if(t<7&&e-7<=r)return!1;if(n){var i=9;e<=25&&i--;var s=(e-14-i)/2-1;return e<=25&&s++,!(7+s<t&&t<e-7-s-1&&7+s<r&&r<e-7-s-1)&&(0<=t&&t<e&&0<=r&&r<e&&o[r][t])}return o[r]&&o[r][t]}var f=function(){return(f=Object.assign||function(t){for(var r,e=1,o=arguments.length;e<o;e++)for(var n in r=arguments[e])Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);return t}).apply(this,arguments)},h=(N.encodeText=function(t,r){var e=R.makeSegments(t);return N.encodeSegments(e,r)},N.encodeBinary=function(t,r){var e=R.makeBytes(t);return N.encodeSegments([e],r)},N.encodeSegments=function(t,r,e,o,n,i){if(void 0===e&&(e=1),void 0===o&&(o=40),void 0===n&&(n=-1),void 0===i&&(i=!0),!(N.MIN_VERSION<=e&&e<=o&&o<=N.MAX_VERSION)||n<-1||7<n)throw"Invalid value";var s,a;for(s=e;;s++){var f=8*N.getNumDataCodewords(s,r),h=R.getTotalBits(t,s);if(h<=f){a=h;break}if(o<=s)throw"Data too long"}for(var l=0,u=[N.Ecc.MEDIUM,N.Ecc.QUARTILE,N.Ecc.HIGH];l<u.length;l++){var d=u[l];i&&a<=8*N.getNumDataCodewords(s,d)&&(r=d)}for(var c=new z,g=0,p=t;g<p.length;g++){var v=p[g];c.appendBits(v.mode.modeBits,4),c.appendBits(v.numChars,v.mode.numCharCountBits(s));for(var C=0,m=v.getData();C<m.length;C++){var w=m[C];c.array.push(w)}}if(c.array.length!=a)throw"Assertion error";var M=8*N.getNumDataCodewords(s,r);if(c.array.length>M)throw"Assertion error";if(c.appendBits(0,Math.min(4,M-c.array.length)),c.appendBits(0,(8-c.array.length%8)%8),c.array.length%8!=0)throw"Assertion error";for(var E=236;c.array.length<M;E^=253)c.appendBits(E,8);for(var y=[];8*y.length<c.array.length;)y.push(0);return c.array.forEach(function(t,r){return y[r>>>3]|=t<<7-(7&r)}),new N(s,r,y,n)},N.prototype.getModule=function(t,r){return 0<=t&&t<this.size&&0<=r&&r<this.size&&this.modules[r][t]},N.prototype.drawCanvas=function(t,r,e){if(t<=0||r<0)throw"Value out of range";var o=(this.size+2*r)*t;e.width=o,e.height=o;for(var n=e.getContext("2d"),i=-r;i<this.size+r;i++)for(var s=-r;s<this.size+r;s++)n.fillStyle=this.getModule(s,i)?"#000000":"#FFFFFF",n.fillRect((s+r)*t,(i+r)*t,t,t)},N.prototype.toSvgString=function(t){if(t<0)throw"Border must be non-negative";for(var r=[],e=0;e<this.size;e++)for(var o=0;o<this.size;o++)this.getModule(o,e)&&r.push("M"+(o+t)+","+(e+t)+"h1v1h-1z");return'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+(this.size+2*t)+" "+(this.size+2*t)+'" stroke="none">\n\t<rect width="100%" height="100%" fill="#FFFFFF"/>\n\t<path d="'+r.join(" ")+'" fill="#000000"/>\n</svg>\n'},N.prototype.drawFunctionPatterns=function(){for(var t=0;t<this.size;t++)this.setFunctionModule(6,t,t%2==0),this.setFunctionModule(t,6,t%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);var r=this.getAlignmentPatternPositions(),e=r.length;for(t=0;t<e;t++)for(var o=0;o<e;o++)0==t&&0==o||0==t&&o==e-1||t==e-1&&0==o||this.drawAlignmentPattern(r[t],r[o]);this.drawFormatBits(0),this.drawVersion()},N.prototype.drawFormatBits=function(t){for(var r=this.errorCorrectionLevel.formatBits<<3|t,e=r,o=0;o<10;o++)e=e<<1^1335*(e>>>9);var n=21522^(r<<10|e);if(n>>>15!=0)throw"Assertion error";for(o=0;o<=5;o++)this.setFunctionModule(8,o,a(n,o));for(this.setFunctionModule(8,7,a(n,6)),this.setFunctionModule(8,8,a(n,7)),this.setFunctionModule(7,8,a(n,8)),o=9;o<15;o++)this.setFunctionModule(14-o,8,a(n,o));for(o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,a(n,o));for(o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,a(n,o));this.setFunctionModule(8,this.size-8,!0)},N.prototype.drawVersion=function(){if(!(this.version<7)){for(var t=this.version,r=0;r<12;r++)t=t<<1^7973*(t>>>11);var e=this.version<<12|t;if(e>>>18!=0)throw"Assertion error";for(r=0;r<18;r++){var o=a(e,r),n=this.size-11+r%3,i=Math.floor(r/3);this.setFunctionModule(n,i,o),this.setFunctionModule(i,n,o)}}},N.prototype.drawFinderPattern=function(t,r){for(var e=-4;e<=4;e++)for(var o=-4;o<=4;o++){var n=Math.max(Math.abs(o),Math.abs(e)),i=t+o,s=r+e;0<=i&&i<this.size&&0<=s&&s<this.size&&this.setFunctionModule(i,s,2!=n&&4!=n)}},N.prototype.drawAlignmentPattern=function(t,r){for(var e=-2;e<=2;e++)for(var o=-2;o<=2;o++)this.setFunctionModule(t+o,r+e,1!=Math.max(Math.abs(o),Math.abs(e)))},N.prototype.setFunctionModule=function(t,r,e){this.modules[r][t]=e,this.isFunction[r][t]=!0},N.prototype.addEccAndInterleave=function(t){var r=this.version,e=this.errorCorrectionLevel;if(t.length!=N.getNumDataCodewords(r,e))throw"Invalid argument";for(var o=N.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][r],n=N.ECC_CODEWORDS_PER_BLOCK[e.ordinal][r],i=Math.floor(N.getNumRawDataModules(r)/8),s=o-i%o,a=Math.floor(i/o),f=[],h=new v(n),l=0,u=0;l<o;l++){var d=t.slice(u,u+a-n+(l<s?0:1));u+=d.length;var c=h.getRemainder(d);l<s&&d.push(0),f.push(d.concat(c))}var g=[];for(l=0;l<f[0].length;l++)for(var p=0;p<f.length;p++)(l!=a-n||s<=p)&&g.push(f[p][l]);if(g.length!=i)throw"Assertion error";return g},N.prototype.drawCodewords=function(t){if(t.length!=Math.floor(N.getNumRawDataModules(this.version)/8))throw"Invalid argument";for(var r=0,e=this.size-1;1<=e;e-=2){6==e&&(e=5);for(var o=0;o<this.size;o++)for(var n=0;n<2;n++){var i=e-n,s=0==(e+1&2)?this.size-1-o:o;!this.isFunction[s][i]&&r<8*t.length&&(this.modules[s][i]=a(t[r>>>3],7-(7&r)),r++)}}if(r!=8*t.length)throw"Assertion error"},N.prototype.applyMask=function(t){if(t<0||7<t)throw"Mask value out of range";for(var r=0;r<this.size;r++)for(var e=0;e<this.size;e++){var o=void 0;switch(t){case 0:o=(e+r)%2==0;break;case 1:o=r%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+r)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(r/2))%2==0;break;case 5:o=e*r%2+e*r%3==0;break;case 6:o=(e*r%2+e*r%3)%2==0;break;case 7:o=((e+r)%2+e*r%3)%2==0;break;default:throw"Assertion error"}!this.isFunction[r][e]&&o&&(this.modules[r][e]=!this.modules[r][e])}},N.prototype.getPenaltyScore=function(){for(var t=0,r=0;r<this.size;r++){for(var e=[0,0,0,0,0,0,0],o=!1,n=0,i=0;i<this.size;i++)this.modules[r][i]==o?5==++n?t+=N.PENALTY_N1:5<n&&t++:(N.addRunToHistory(n,e),!o&&N.hasFinderLikePattern(e)&&(t+=N.PENALTY_N3),o=this.modules[r][i],n=1);N.addRunToHistory(n,e),o&&N.addRunToHistory(0,e),N.hasFinderLikePattern(e)&&(t+=N.PENALTY_N3)}for(i=0;i<this.size;i++){o=!(e=[0,0,0,0,0,0,0]);var s=0;for(r=0;r<this.size;r++)this.modules[r][i]==o?5==++s?t+=N.PENALTY_N1:5<s&&t++:(N.addRunToHistory(s,e),!o&&N.hasFinderLikePattern(e)&&(t+=N.PENALTY_N3),o=this.modules[r][i],s=1);N.addRunToHistory(s,e),o&&N.addRunToHistory(0,e),N.hasFinderLikePattern(e)&&(t+=N.PENALTY_N3)}for(r=0;r<this.size-1;r++)for(i=0;i<this.size-1;i++)(o=this.modules[r][i])==this.modules[r][i+1]&&o==this.modules[r+1][i]&&o==this.modules[r+1][i+1]&&(t+=N.PENALTY_N2);for(var a=0,f=0,h=this.modules;f<h.length;f++)for(var l=0,u=h[f];l<u.length;l++)(o=u[l])&&a++;var d=this.size*this.size;return t+=(Math.ceil(Math.abs(20*a-10*d)/d)-1)*N.PENALTY_N4},N.prototype.getAlignmentPatternPositions=function(){if(1==this.version)return[];for(var t=Math.floor(this.version/7)+2,r=32==this.version?26:2*Math.ceil((this.size-13)/(2*t-2)),e=[6],o=this.size-7;e.length<t;o-=r)e.splice(1,0,o);return e},N.getNumRawDataModules=function(t){if(t<N.MIN_VERSION||N.MAX_VERSION<t)throw"Version number out of range";var r=(16*t+128)*t+64;if(2<=t){var e=Math.floor(t/7)+2;r-=(25*e-10)*e-55,7<=t&&(r-=36)}return r},N.getNumDataCodewords=function(t,r){return Math.floor(N.getNumRawDataModules(t)/8)-N.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t]*N.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t]},N.addRunToHistory=function(t,r){r.pop(),r.unshift(t)},N.hasFinderLikePattern=function(t){var r=t[1];return 0<r&&t[2]==r&&t[4]==r&&t[5]==r&&t[3]==3*r&&Math.max(t[0],t[6])>=4*r},N.MIN_VERSION=1,N.MAX_VERSION=40,N.PENALTY_N1=3,N.PENALTY_N2=3,N.PENALTY_N3=40,N.PENALTY_N4=10,N.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],N.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],N);function N(t,r,e,o){if(this.version=t,this.errorCorrectionLevel=r,this.mask=o,this.modules=[],this.isFunction=[],t<N.MIN_VERSION||N.MAX_VERSION<t)throw"Version value out of range";if(o<-1||7<o)throw"Mask value out of range";this.size=4*t+17;for(var n=[],i=0;i<this.size;i++)n.push(!1);for(i=0;i<this.size;i++)this.modules.push(n.slice()),this.isFunction.push(n.slice());this.drawFunctionPatterns();var s=this.addEccAndInterleave(e);if(this.drawCodewords(s),-1==o){var a=1e9;for(i=0;i<8;i++){this.applyMask(i),this.drawFormatBits(i);var f=this.getPenaltyScore();f<a&&(o=i,a=f),this.applyMask(i)}}if(o<0||7<o)throw"Assertion error";this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}function a(t,r){return 0!=(t>>>r&1)}var R=(i.makeBytes=function(t){for(var r=new z,e=0,o=t;e<o.length;e++){var n=o[e];r.appendBits(n,8)}return new i(i.Mode.BYTE,t.length,r.array)},i.makeNumeric=function(t){if(!this.NUMERIC_REGEX.test(t))throw"String contains non-numeric characters";for(var r=new z,e=0;e<t.length;){var o=Math.min(t.length-e,3);r.appendBits(parseInt(t.substr(e,o),10),3*o+1),e+=o}return new i(i.Mode.NUMERIC,t.length,r.array)},i.makeAlphanumeric=function(t){if(!this.ALPHANUMERIC_REGEX.test(t))throw"String contains unencodable characters in alphanumeric mode";var r,e=new z;for(r=0;r+2<=t.length;r+=2){var o=45*i.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r));o+=i.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r+1)),e.appendBits(o,11)}return r<t.length&&e.appendBits(i.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r)),6),new i(i.Mode.ALPHANUMERIC,t.length,e.array)},i.makeSegments=function(t){return""==t?[]:this.NUMERIC_REGEX.test(t)?[i.makeNumeric(t)]:this.ALPHANUMERIC_REGEX.test(t)?[i.makeAlphanumeric(t)]:[i.makeBytes(i.toUtf8ByteArray(t))]},i.makeEci=function(t){var r=new z;if(t<0)throw"ECI assignment value out of range";if(t<128)r.appendBits(t,8);else if(t<16384)r.appendBits(2,2),r.appendBits(t,14);else{if(!(t<1e6))throw"ECI assignment value out of range";r.appendBits(6,3),r.appendBits(t,21)}return new i(i.Mode.ECI,0,r.array)},i.prototype.getData=function(){return this.bitData.slice()},i.getTotalBits=function(t,r){for(var e=0,o=0,n=t;o<n.length;o++){var i=n[o],s=i.mode.numCharCountBits(r);if(i.numChars>=1<<s)return 1/0;e+=4+s+i.bitData.length}return e},i.toUtf8ByteArray=function(t){t=encodeURI(t);for(var r=[],e=0;e<t.length;e++)"%"!=t.charAt(e)?r.push(t.charCodeAt(e)):(r.push(parseInt(t.substr(e+1,2),16)),e+=2);return r},i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",i);function i(t,r,e){if(this.mode=t,this.numChars=r,this.bitData=e,r<0)throw"Invalid argument";this.bitData=e.slice()}var v=(s.prototype.getRemainder=function(t){for(var o=this.coefficients.map(function(t){return 0}),r=function(t){var e=t^o.shift();o.push(0),n.coefficients.forEach(function(t,r){return o[r]^=s.multiply(t,e)})},n=this,e=0,i=t;e<i.length;e++)r(i[e]);return o},s.multiply=function(t,r){if(t>>>8!=0||r>>>8!=0)throw"Byte out of range";for(var e=0,o=7;0<=o;o--)e=e<<1^285*(e>>>7),e^=(r>>>o&1)*t;if(e>>>8!=0)throw"Assertion error";return e},s);function s(t){if(this.coefficients=[],t<1||255<t)throw"Degree out of range";for(var r=this.coefficients,e=0;e<t-1;e++)r.push(0);r.push(1);var o=1;for(e=0;e<t;e++){for(var n=0;n<r.length;n++)r[n]=s.multiply(r[n],o),n+1<r.length&&(r[n]^=r[n+1]);o=s.multiply(o,2)}}var t,r,e,o,z=(n.prototype.appendBits=function(t,r){if(r<0||31<r||t>>>r!=0)throw"Value out of range";for(var e=r-1;0<=e;e--)this.array.push(t>>>e&1)},n);function n(){this.array=[]}function l(t,r){this.ordinal=t,this.formatBits=r}function u(t,r){this.modeBits=t,this.numBitsCharCount=r}t=h=h||{},l.LOW=new l(0,1),l.MEDIUM=new l(1,0),l.QUARTILE=new l(2,3),l.HIGH=new l(3,2),r=l,t.Ecc=r,e=R=R||{},u.prototype.numCharCountBits=function(t){return this.numBitsCharCount[Math.floor((t+7)/17)]},u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),o=u,e.Mode=o;return{createQR:function(t,r,e,o){if("string"!=typeof t)throw new TypeError("Enter text for encoding");var n=f(f(f({},"object"==typeof r&&null!==r?r:{}),"object"==typeof o&&null!==o?o:{}),{qrSize:"object"==typeof r&&null!==r&&"number"==typeof r.qrSize?r.qrSize:r,className:"object"==typeof r&&null!==r&&"string"==typeof r.className?r.className:e}),i=[h.Ecc.LOW,h.Ecc.MEDIUM,h.Ecc.QUARTILE,h.Ecc.HIGH],s={qrSize:"number"==typeof n.qrSize?n.qrSize:128,className:"string"==typeof n.className?n.className:e||"",isShowLogo:!!n.isShowLogo||!1,isShowBackground:!!n.isShowBackground||!1,foregroundColor:"string"==typeof n.foregroundColor?n.foregroundColor:"#000000",backgroundColor:"string"==typeof n.backgroundColor?n.backgroundColor:"#ffffff",logoColor:"string"==typeof n.logoColor?n.logoColor:"#07f",suffix:n.suffix?n.suffix.toString():"0",logoData:"string"==typeof n.logoData?n.logoData:null,ecc:"number"==typeof n.ecc&&i[n.ecc]?n.ecc:3,incTileSize:"number"==typeof n.incTileSize?n.incTileSize:96},a=R.makeSegments(t);return function(t,r){if("number"!=typeof r.qrSize)throw new Error("Size should be a number");if("string"!=typeof r.className)throw new Error("Classname should be a string");for(var e,o,n,i,s,a=12.8,f=28.6,h=30.5,l=84.7776815,u=69.5,d=100,c=[],g=0,p=0,v=0,C=0,m=0;m<t.size;m++){for(var w=g=0;w<t.size;w++){v=w+g,g+=96,C=m+p;var M,E=(e=w,o=m,n=t.size,i=t.modules,void 0===(s=r.isShowLogo)&&(s=!0),{l:k(e-1,o,n,i,s),r:k(e+1,o,n,i,s),t:k(e,o-1,n,i,s),b:k(e,o+1,n,i,s),current:k(e,o,n,i,s)}),y="";E.current?(y=!(y=y||E.l||E.r||E.t||E.b?"":"empty")&&E.l&&E.r||E.t&&E.b?"rect":"")||(y+=E.l?"l":E.r?"r":"",y=(y+=E.t?"t":E.b?"b":"")||"empty"):y=!(y=!(y=!(y=!y&&E.l&&E.t&&k(w-1,m-1,t.size,t.modules,r.isShowLogo)?"n_lt":"")&&E.l&&E.b&&k(w-1,m+1,t.size,t.modules,r.isShowLogo)?"n_lb":"")&&E.r&&E.t&&k(w+1,m-1,t.size,t.modules,r.isShowLogo)?"n_rt":"")&&E.r&&E.b&&k(w+1,m+1,t.size,t.modules,r.isShowLogo)?"n_rb":"",y&&(M='<use xlink:href="#'+y+"-"+r.suffix+'"/>',c.push('<g transform="translate('+v+","+C+')">'+M+"</g>"))}p+=96}var N="",R=(t.size-21)/2*96+672-10;t.size<=25&&(N="scale(0.85)",R+=50);var z=(t.size-7)*r.incTileSize;c.push('<use fill-rule="evenodd" transform="translate(0,0)" xlink:href="#point-'+r.suffix+'"/>'),c.push('<use fill-rule="evenodd" transform="translate('+z+',0)" xlink:href="#point-'+r.suffix+'"/>'),c.push('<use fill-rule="evenodd" transform="translate(0,'+z+')" xlink:href="#point-'+r.suffix+'"/>'),r.isShowLogo&&(r.logoData?c.push('\n <image\n preserveAspectRatio="xMidYMid slice" clip-path="url(#logo-mask-'+r.suffix+')"\n style="width: 750px; height: 750px;" width="750" height="750"\n transform="translate('+R+","+R+") "+N+'"\n xlink:href="'+r.logoData+'"\n />\n '):c.push('\n <use style="width: 750px; height: 750px;" width="750" height="750"\n fill="none"\n fill-rule="evenodd"\n transform="translate('+R+","+R+") "+N+'" xlink:href="#vk_logo-'+r.suffix+'"\n />\n '));var A=99*t.size,S="",x="translate(0,0)";if(r.isShowBackground){var L=(r.qrSize-40)/r.qrSize,_=A/r.qrSize*21;S='\n <rect\n x="0"\n width="'+A+'"\n height="'+A+'"\n rx="'+Math.ceil(A/(r.qrSize/36))+'"\n fill="'+r.backgroundColor+'"\n />',x="translate("+_+", "+_+") scale("+L+")"}var b="M0,0 L66,0 C84.7776815,-3.44940413e-15 100,15.2223185 100,34 L100,66 C100,"+l+" "+l+","+d+" 66,"+d+" L0,"+d+" L0,0 Z",I="M0,0 L100,0 L100,66 C100,"+l+" "+l+","+d+" 66,"+d+" L0,"+d+" L0,0 Z";return'\n <svg\n version="1.1"\n viewBox="0 0 '+A+" "+A+'"\n width="'+r.qrSize+'px"\n height="'+r.qrSize+'px"\n '+(r.className?'class="'+r.className+'"':"")+'\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"\n >\n <defs>\n <rect id="rect-'+r.suffix+'" width="100" height="100" fill="'+r.foregroundColor+'"/>\n <path\n id="empty-'+r.suffix+'"\n d="M0,'+f+"v42.9C0,87.3,"+a+","+d+","+f+","+d+"h42.9c15.9,0,"+f+"-"+a+","+f+"-"+f+"V"+f+"C"+d+",12.7,87.2,0,71.4,0H"+f+" C"+a+",0,0,"+a+",0,"+f+'z"\n fill="'+r.foregroundColor+'"\n />\n <path id="b-'+r.suffix+'" d="'+b+'" transform="rotate(-90 50 50)" fill="'+r.foregroundColor+'"/>\n <path id="r-'+r.suffix+'" d="'+b+'" transform="rotate(-180 50 50)" fill="'+r.foregroundColor+'"/>\n <path id="l-'+r.suffix+'" d="'+b+'" fill="'+r.foregroundColor+'"/>\n <path id="t-'+r.suffix+'" d="'+b+'" transform="rotate(90 50 50)" fill="'+r.foregroundColor+'"/>\n <path id="l-'+r.suffix+'" d="'+I+'" transform="rotate(-90 50 50)" fill="'+r.foregroundColor+'"/>\n <path id="lt-'+r.suffix+'" d="'+I+'" fill="'+r.foregroundColor+'"/>\n <path id="lb-'+r.suffix+'" d="'+I+'" transform="rotate(-90 50 50)" fill="'+r.foregroundColor+'"/>\n <path id="rb-'+r.suffix+'" d="'+I+'" transform="rotate(-180 50 50)" fill="'+r.foregroundColor+'"/>\n <path id="rt-'+r.suffix+'" d="'+I+'" transform="rotate(90 50 50)" fill="'+r.foregroundColor+'"/>\n <path\n id="n_lt-'+r.suffix+'"\n d="M'+h+",2V0H0v"+h+"h2C2,14.7,14.8,2,"+h+',2z"\n fill="'+r.foregroundColor+'"\n />\n <path\n id="n_lb-'+r.suffix+'"\n d="M2,'+u+"H0V"+d+"h"+h+"v-2C14.7,98,2,85.2,2,"+u+'z"\n fill="'+r.foregroundColor+'"\n />\n <path\n id="n_rt-'+r.suffix+'"\n d="M98,'+h+"h2V0H"+u+"v2C85.3,2,98,14.8,98,"+h+'z"\n fill="'+r.foregroundColor+'"\n />\n <path id="n_rb-'+r.suffix+'"\n d="M'+u+",98v2H"+d+"V"+u+"h-2C98,85.3,85.2,98,"+u+',98z"\n fill="'+r.foregroundColor+'"\n />\n <path\n id="point-'+r.suffix+'"\n fill="'+r.foregroundColor+'"\n d="M600.001786,457.329333 L600.001786,242.658167 C600.001786,147.372368 587.039517,124.122784 581.464617,118.535383 C575.877216,112.960483 552.627632,99.9982143 457.329333,99.9982143 L242.670667,99.9982143 C147.372368,99.9982143 124.122784,112.960483 118.547883,118.535383 C112.972983,124.122784 99.9982143,147.372368 99.9982143,242.658167 L99.9982143,457.329333 C99.9982143,552.627632 112.972983,575.877216 118.547883,581.464617 C124.122784,587.027017 147.372368,600.001786 242.670667,600.001786 L457.329333,600.001786 C552.627632,600.001786 575.877216,587.027017 581.464617,581.464617 C587.039517,575.877216 600.001786,552.627632 600.001786,457.329333 Z M457.329333,0 C653.338333,0 700,46.6616668 700,242.658167 C700,438.667167 700,261.332833 700,457.329333 C700,653.338333 653.338333,700 457.329333,700 C261.332833,700 438.667167,700 242.670667,700 C46.6616668,700 0,653.338333 0,457.329333 C0,261.332833 0,352.118712 0,242.658167 C0,46.6616668 46.6616668,0 242.670667,0 C438.667167,0 261.332833,0 457.329333,0 Z M395.996667,200 C480.004166,200 500,220.008332 500,303.990835 C500,387.998334 500,312.001666 500,395.996667 C500,479.991668 480.004166,500 395.996667,500 C312.001666,500 387.998334,500 304.003333,500 C220.008332,500 200,479.991668 200,395.996667 C200,312.001666 200,350.906061 200,303.990835 C200,220.008332 220.008332,200 304.003333,200 C387.998334,200 312.001666,200 395.996667,200 Z"\n />\n <g id="vk_logo-'+r.suffix+'">\n <path\n fill="'+r.logoColor+'"\n d="M83.3334 363.333C83.3334 231.34 83.3334 165.343 124.338 124.338C165.343 83.3333 231.34 83.3333 363.333 83.3333H386.667C518.66 83.3333 584.657 83.3333 625.662 124.338C666.667 165.343 666.667 231.34 666.667 363.333V386.667C666.667 518.66 666.667 584.657 625.662 625.662C584.657 666.667 518.66 666.667 386.667 666.667H363.333C231.34 666.667 165.343 666.667 124.338 625.662C83.3334 584.657 83.3334 518.66 83.3334 386.667V363.333Z"\n />\n <path\n fill="#FFF"\n d="M394.907 508.681C263.293 508.681 183.442 417.365 180.313 265.625H246.972C249.05 377.09 299.763 424.323 338.638 434.036V265.625H402.519V361.82C440.016 357.664 479.264 313.909 492.456 265.625H555.333C545.27 325 502.543 368.754 472.353 386.803C502.566 401.395 551.177 439.593 569.926 508.681H500.815C486.222 462.498 450.476 426.728 402.542 421.872V508.681H394.907Z"\n />\n </g>\n <clipPath id="logo-mask-'+r.suffix+'">\n <rect x="0" y="0" width="750" height="750" />\n </clipPath>\n </defs>\n\n '+S+'\n\n <g transform="'+x+'">\n '+c.join("\n")+"\n </g>\n </svg>"}(h.encodeSegments(a,i[s.ecc],1,40,-1,!0),s)}}});
|