You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
18 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[397],{10397:function(Ie,K,M){M.d(K,{Z:function(){return pe}});var C=M(67294),J=M(87462),q=M(82947),ee=M(93771),te=function(r,d){return C.createElement(ee.Z,(0,J.Z)({},r,{ref:d,icon:q.Z}))},ne=C.forwardRef(te),oe=ne,re=M(93967),se=M.n(re),ie=Object.defineProperty,T=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,U=(a,r,d)=>r in a?ie(a,r,{enumerable:!0,configurable:!0,writable:!0,value:d}):a[r]=d,b=(a,r)=>{for(var d in r||(r={}))Q.call(r,d)&&U(a,d,r[d]);if(T)for(var d of T(r))x.call(r,d)&&U(a,d,r[d]);return a},F=(a,r)=>{var d={};for(var i in a)Q.call(a,i)&&r.indexOf(i)<0&&(d[i]=a[i]);if(a!=null&&T)for(var i of T(a))r.indexOf(i)<0&&x.call(a,i)&&(d[i]=a[i]);return d};var I;(a=>{const r=class{constructor(e,t,n,o){if(this.version=e,this.errorCorrectionLevel=t,this.modules=[],this.isFunction=[],e<r.MIN_VERSION||e>r.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let s=[];for(let l=0;l<this.size;l++)s.push(!1);for(let l=0;l<this.size;l++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(n);if(this.drawCodewords(c),o==-1){let l=1e9;for(let E=0;E<8;E++){this.applyMask(E),this.drawFormatBits(E);const g=this.getPenaltyScore();g<l&&(o=E,l=g),this.applyMask(E)}}u(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(e,t){const n=a.QrSegment.makeSegments(e);return r.encodeSegments(n,t)}static encodeBinary(e,t){const n=a.QrSegment.makeBytes(e);return r.encodeSegments([n],t)}static encodeSegments(e,t,n=1,o=40,s=-1,c=!0){if(!(r.MIN_VERSION<=n&&n<=o&&o<=r.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let l,E;for(l=n;;l++){const m=r.getNumDataCodewords(l,t)*8,R=v.getTotalBits(e,l);if(R<=m){E=R;break}if(l>=o)throw new RangeError("Data too long")}for(const m of[r.Ecc.MEDIUM,r.Ecc.QUARTILE,r.Ecc.HIGH])c&&E<=r.getNumDataCodewords(l,m)*8&&(t=m);let g=[];for(const m of e){i(m.mode.modeBits,4,g),i(m.numChars,m.mode.numCharCountBits(l),g);for(const R of m.getData())g.push(R)}u(g.length==E);const P=r.getNumDataCodewords(l,t)*8;u(g.length<=P),i(0,Math.min(4,P-g.length),g),i(0,(8-g.length%8)%8,g),u(g.length%8==0);for(let m=236;g.length<P;m^=253)i(m,8,g);let w=[];for(;w.length*8<g.length;)w.push(0);return g.forEach((m,R)=>w[R>>>3]|=m<<7-(R&7)),new r(l,t,w,s)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2==0),this.setFunctionModule(n,6,n%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let o=0;o<t;o++)n==0&&o==0||n==0&&o==t-1||n==t-1&&o==0||this.drawAlignmentPattern(e[n],e[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let s=0;s<10;s++)n=n<<1^(n>>>9)*1335;const o=(t<<10|n)^21522;u(o>>>15==0);for(let s=0;s<=5;s++)this.setFunctionModule(8,s,f(o,s));this.setFunctionModule(8,7,f(o,6)),this.setFunctionModule(8,8,f(o,7)),this.setFunctionModule(7,8,f(o,8));for(let s=9;s<15;s++)this.setFunctionModule(14-s,8,f(o,s));for(let s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,f(o,s));for(let s=8;s<15;s++)this.setFunctionModule(8,this.size-15+s,f(o,s));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^(e>>>11)*7973;const t=this.version<<12|e;u(t>>>18==0);for(let n=0;n<18;n++){const o=f(t,n),s=this.size-11+n%3,c=Math.floor(n/3);this.setFunctionModule(s,c,o),this.setFunctionModule(c,s,o)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let o=-4;o<=4;o++){const s=Math.max(Math.abs(o),Math.abs(n)),c=e+o,l=t+n;0<=c&&c<this.size&&0<=l&&l<this.size&&this.setFunctionMod