filesbox/web/dist/9271.36dc9c05.async.js

10 lines
16 KiB
JavaScript
Raw Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9271],{59879:function(j,D,v){"use strict";v.d(D,{Z:function(){return N}});var w=v(28991),b=v(67294),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},F=y,B=v(27029),O=function(p,_){return b.createElement(B.Z,(0,w.Z)((0,w.Z)({},p),{},{ref:_,icon:F}))};O.displayName="ReloadOutlined";var N=b.forwardRef(O)},84059:function(j,D,v){"use strict";v.d(D,{ZP:function(){return te}});var w=v(67294),b=Object.defineProperty,y=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,O=(u,s,c)=>s in u?b(u,s,{enumerable:!0,configurable:!0,writable:!0,value:c}):u[s]=c,N=(u,s)=>{for(var c in s||(s={}))F.call(s,c)&&O(u,c,s[c]);if(y)for(var c of y(s))B.call(s,c)&&O(u,c,s[c]);return u},T=(u,s)=>{var c={};for(var i in u)F.call(u,i)&&s.indexOf(i)<0&&(c[i]=u[i]);if(u!=null&&y)for(var i of y(u))s.indexOf(i)<0&&B.call(u,i)&&(c[i]=u[i]);return c};/**
* @license QR Code generator library (TypeScript)
* Copyright (c) Project Nayuki.
* SPDX-License-Identifier: MIT
*/var p;(u=>{const s=class{constructor(e,t,n,r){if(this.version=e,this.errorCorrectionLevel=t,this.modules=[],this.isFunction=[],e<s.MIN_VERSION||e>s.MAX_VERSION)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let o=[];for(let l=0;l<this.size;l++)o.push(!1);for(let l=0;l<this.size;l++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),r==-1){let l=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const d=this.getPenaltyScore();d<l&&(r=g,l=d),this.applyMask(g)}}h(0<=r&&r<=7),this.mask=r,this.applyMask(r),this.drawFormatBits(r),this.isFunction=[]}static encodeText(e,t){const n=u.QrSegment.makeSegments(e);return s.encodeSegments(n,t)}static encodeBinary(e,t){const n=u.QrSegment.makeBytes(e);return s.encodeSegments([n],t)}static encodeSegments(e,t,n=1,r=40,o=-1,a=!0){if(!(s.MIN_VERSION<=n&&n<=r&&r<=s.MAX_VERSION)||o<-1||o>7)throw new RangeError("Invalid value");let l,g;for(l=n;;l++){const m=s.getNumDataCodewords(l,t)*8,M=C.getTotalBits(e,l);if(M<=m){g=M;break}if(l>=r)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])a&&g<=s.getNumDataCodewords(l,m)*8&&(t=m);let d=[];for(const m of e){i(m.mode.modeBits,4,d),i(m.numChars,m.mode.numCharCountBits(l),d);for(const M of m.getData())d.push(M)}h(d.length==g);const P=s.getNumDataCodewords(l,t)*8;h(d.length<=P),i(0,Math.min(4,P-d.length),d),i(0,(8-d.length%8)%8,d),h(d.length%8==0);for(let m=236;d.length<P;m^=236^17)i(m,8,d);let A=[];for(;A.length*8<d.length;)A.push(0);return d.forEach((m,M)=>A[M>>>3]|=m<<7-(M&7)),new s(l,t,A,o)}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 r=0;r<t;r++)n==0&&r==0||n==0&&r==t-1||n==t-1&&r==0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let o=0;o<10;o++)n=n<<1^(n>>>9)*1335;const r=(t<<10|n)^21522;h(r>>>15==0);for(let o=0;o<=5;o++)this.setFunctionModule(8,o,E(r,o));this.setFunctionModule(8,7,E(r,6)),this.setFunctionModule(8,8,E(r,7)),this.setFunctionModule(7,8,E(r,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,E(r,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,E(r,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,E(r,o));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;h(t>>>18==0);for(let n=0;n<18;n++){const r=E(t,n),o=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(o,a,r),this.setFunctionModule(a,o,r)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const o=Math.max(Math.abs(r),Math.abs(n)),a=e+r,l=t+n;0<=a&&a<this.size&&0<=l&&l<this.size&&this.setFunctionModule(a,l,o!=2&&o!=4)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!=1)}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const t=this.version,n=this.errorCorrectionLevel;if(e.length!=s.getNumDataCodewords(t,n))throw new RangeError("Invalid argument");const r=s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t],o=s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t],a=Math.floor(s.getNumRawDataModules(t)/8),l=r-a%r,g=Math.floor(a/r);let d=[];const P=s.reedSolomonComputeDivisor(o);for(let m=0,M=0;m<r;m++){let R=e.slice(M,M+g-o+(m<l?0:1));M+=R.length;const S=s.reedSolomonComputeRemainder(R,P);m<l&&R.push(0),d.push(R.concat(S))}let A=[];for(let m=0;m<d[0].length;m++)d.forEach((M,R)=>{(m!=g-o||R>=
* @license qrcode.react
* Copyright (c) Paul O'Shannessy
* SPDX-License-Identifier: ISC
*/var U={L:_.QrCode.Ecc.LOW,M:_.QrCode.Ecc.MEDIUM,Q:_.QrCode.Ecc.QUARTILE,H:_.QrCode.Ecc.HIGH},Q=128,k="L",H="#FFFFFF",$="#000000",Y=!1,z=4,V=.1;function G(u,s=0){const c=[];return u.forEach(function(i,E){let h=null;i.forEach(function(f,C){if(!f&&h!==null){c.push(`M${h+s} ${E+s}h${C-h}v1H${h+s}z`),h=null;return}if(C===i.length-1){if(!f)return;h===null?c.push(`M${C+s},${E+s} h1v1H${C+s}z`):c.push(`M${h+s},${E+s} h${C+1-h}v1H${h+s}z`);return}f&&h===null&&(h=C)})}),c.join("")}function x(u,s){return u.slice().map((c,i)=>i<s.y||i>=s.y+s.h?c:c.map((E,h)=>h<s.x||h>=s.x+s.w?E:!1))}function X(u,s,c,i){if(i==null)return null;const E=c?z:0,h=u.length+E*2,f=Math.floor(s*V),C=h/s,e=(i.width||f)*C,t=(i.height||f)*C,n=i.x==null?u.length/2-e/2:i.x*C,r=i.y==null?u.length/2-t/2:i.y*C;let o=null;if(i.excavate){let a=Math.floor(n),l=Math.floor(r),g=Math.ceil(e+n-a),d=Math.ceil(t+r-l);o={x:a,y:l,w:g,h:d}}return{x:n,y:r,h:t,w:e,excavation:o}}var J=function(){try{new Path2D().addPath(new Path2D)}catch(u){return!1}return!0}();function q(u){const s=u,{value:c,size:i=Q,level:E=k,bgColor:h=H,fgColor:f=$,includeMargin:C=Y,style:e,imageSettings:t}=s,n=T(s,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),r=t==null?void 0:t.src,o=(0,w.useRef)(null),a=(0,w.useRef)(null),[l,g]=(0,w.useState)(!1);(0,w.useEffect)(()=>{if(o.current!=null){const A=o.current,m=A.getContext("2d");if(!m)return;let M=_.QrCode.encodeText(c,U[E]).getModules();const R=C?z:0,S=M.length+R*2,I=X(M,i,C,t),L=a.current,K=I!=null&&L!==null&&L.complete&&L.naturalHeight!==0&&L.naturalWidth!==0;K&&I.excavation!=null&&(M=x(M,I.excavation));const W=window.devicePixelRatio||1;A.height=A.width=i*W;const Z=i/S*W;m.scale(Z,Z),m.fillStyle=h,m.fillRect(0,0,S,S),m.fillStyle=f,J?m.fill(new Path2D(G(M,R))):M.forEach(function(ne,re){ne.forEach(function(oe,se){oe&&m.fillRect(se+R,re+R,1,1)})}),K&&m.drawImage(L,I.x+R,I.y+R,I.w,I.h)}}),(0,w.useEffect)(()=>{g(!1)},[r]);const d=N({height:i,width:i},e);let P=null;return r!=null&&(P=w.createElement("img",{src:r,key:r,style:{display:"none"},onLoad:()=>{g(!0)},ref:a})),w.createElement(w.Fragment,null,w.createElement("canvas",N({style:d,height:i,width:i,ref:o},n)),P)}function ee(u){const s=u,{value:c,size:i=Q,level:E=k,bgColor:h=H,fgColor:f=$,includeMargin:C=Y,imageSettings:e}=s,t=T(s,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let n=_.QrCode.encodeText(c,U[E]).getModules();const r=C?z:0,o=n.length+r*2,a=X(n,i,C,e);let l=null;e!=null&&a!=null&&(a.excavation!=null&&(n=x(n,a.excavation)),l=w.createElement("image",{xlinkHref:e.src,height:a.h,width:a.w,x:a.x+r,y:a.y+r,preserveAspectRatio:"none"}));const g=G(n,r);return w.createElement("svg",N({height:i,width:i,viewBox:`0 0 ${o} ${o}`},t),w.createElement("path",{fill:h,d:`M0,0 h${o}v${o}H0z`,shapeRendering:"crispEdges"}),w.createElement("path",{fill:f,d:g,shapeRendering:"crispEdges"}),l)}var te=u=>{const s=u,{renderAs:c}=s,i=T(s,["renderAs"]);return c==="svg"?w.createElement(ee,N({},i)):w.createElement(q,N({},i))}}}]);