var q=Object.create;var x=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var A=(e,r)=>{for(var o in r)x(e,o,{get:r[o],enumerable:!0})},$=(e,r,o,g)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of R(r))!k.call(e,n)&&n!==o&&x(e,n,{get:()=>r[n],enumerable:!(g=E(r,n))||g.enumerable});return e};var C=(e,r,o)=>(o=e!=null?q(S(e)):{},$(r||!e||!e.__esModule?x(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>$(x({},"__esModule",{value:!0}),e);var B={};A(B,{QRCode:()=>Q});module.exports=L(B);var m=C(require("qrcode"),1),w=require("react"),h=require("react/jsx-runtime"),O=(e,r)=>{let o=Array.prototype.slice.call(m.default.create(e,{errorCorrectionLevel:r}).modules.data,0),g=Math.sqrt(o.length);return o.reduce((n,f,y)=>(y%g===0?n.push([f]):n[n.length-1].push(f))&&n,[])};function Q({ecl:e="M",size:r=200,uri:o,clearArea:g=!1,image:n,imageBackground:f="transparent"}){let y=g?76:0,i=r-10*2,z=(0,w.useMemo)(()=>{let u=[],s=O(o,e),t=i/s.length;if([{x:0,y:0},{x:1,y:0},{x:0,y:1}].forEach(({x:d,y:c})=>{let M=(s.length-7)*t*d,a=(s.length-7)*t*c;for(let l=0;l<3;l++)u.push((0,h.jsx)("rect",{fill:l%2!==0?"var(--bad-colors-background, var(--bad-colors-background))":"var(--bad-colors-foreground)",rx:(l-2)*-5+(l===0?2:3),ry:(l-2)*-5+(l===0?2:3),width:t*(7-l*2),height:t*(7-l*2),x:M+t*l,y:a+t*l},`${l}-${d}-${c}`))}),n){let d=(s.length-7)*t*1,c=(s.length-7)*t*1;u.push((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("rect",{fill:f,rx:(0-2)*-5+2,ry:(0-2)*-5+2,width:t*(7-0*2),height:t*(7-0*2),x:d+t*0,y:c+t*0}),(0,h.jsx)("foreignObject",{width:t*(7-0*2),height:t*(7-0*2),x:d+t*0,y:c+t*0,children:(0,h.jsx)("div",{style:{borderRadius:(0-2)*-5+2,overflow:"hidden"},children:n})})]}))}let p=Math.floor((y+25)/t),v=s.length/2-p/2,b=s.length/2+p/2-1;return s.forEach((d,c)=>{d.forEach((M,a)=>{s[c][a]&&(c<7&&a<7||c>s.length-8&&a<7||c<7&&a>s.length-8||(n||!(c>v&&c<b&&a>v&&a<b))&&u.push((0,h.jsx)("circle",{cx:c*t+t/2,cy:a*t+t/2,fill:"var(--bad-colors-foreground)",r:t/3},`circle-${c}-${a}`)))})}),u},[e,i,o]);return(0,h.jsxs)("svg",{height:i,width:i,viewBox:`0 0 ${i} ${i}`,style:{width:i,height:i},children:[(0,h.jsx)("rect",{fill:"transparent",height:i,width:i}),z]})}0&&(module.exports={QRCode});
