varr0=Object.create;varca=Object.defineProperty;vari0=Object.getOwnPropertyDescriptor;vars0=Object.getOwnPropertyNames;varo0=Object.getPrototypeOf,a0=Object.prototype.hasOwnProperty;varSe=(r,a)=>()=>{try{returna||r((a={exports:{}}).exports,a),a.exports}catch(s){throwa=0,s}};varl0=(r,a,s,f)=>{if(a&&typeofa=="object"||typeofa=="function")for(letdofs0(a))!a0.call(r,d)&&d!==s&&ca(r,d,{get:()=>a[d],enumerable:!(f=i0(a,d))||f.enumerable});returnr};varBr=(r,a,s)=>(s=r!=null?r0(o0(r)):{},l0(a||!r||!r.__esModule?ca(s,"default",{value:r,enumerable:!0}):s,r));varua=Se((Rd,fa)=>{fa.exports=function(){returntypeofPromise=="function"&&Promise.prototype&&Promise.prototype.then}});varEn=Se(Ln=>{varNs,c0=[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];Ln.getSymbolSize=function(a){if(!a)thrownewError('"version" cannot be null or undefined');if(a<1||a>40)thrownewError('"version" should be in range from 1 to 40');returna*4+17};Ln.getSymbolTotalCodewords=function(a){returnc0[a]};Ln.getBCHDigit=function(r){leta=0;for(;r!==0;)a++,r>>>=1;returna};Ln.setToSJISFunction=function(a){if(typeofa!="function")thrownewError('"toSJISFunc" is not a valid function.');Ns=a};Ln.isKanjiModeEnabled=function(){returntypeofNs<"u"};Ln.toSJIS=function(a){returnNs(a)}});varIi=Se(Lt=>{Lt.L={bit:1};Lt.M={bit:0};Lt.Q={bit:3};Lt.H={bit:2};functionf0(r){if(typeofr!="string")thrownewError("Param is not a string");switch(r.toLowerCase()){case"l":case"low":returnLt.L;case"m":case"medium":returnLt.M;case"q":case"quartile":returnLt.Q;case"h":case"high":returnLt.H;default:thrownewError("Unknown EC Level: "+r)}}Lt.isValid=function(a){returna&&typeofa.bit<"u"&&a.bit>=0&&a.bit<4};Lt.from=function(a,s){if(Lt.isValid(a))returna;try{returnf0(a)}catch{returns}}});varga=Se((Bd,da)=>{functionha(){this.buffer=[],this.length=0}ha.prototype={get:function(r){leta=Math.floor(r/8);return(this.buffer[a]>>>7-r%8&1)===1},put:function(r,a){for(lets=0;s<a;s++)this.putBit((r>>>a-s-1&1)===1)},getLengthInBits:function(){returnthis.length},putBit:function(r){leta=Math.floor(this.length/8);this.buffer.length<=a&&this.buffer.push(0),r&&(this.buffer[a]|=128>>>this.length%8),this.length++}};da.exports=ha});varwa=Se((Ld,xa)=>{functionLr(r){if(!r||r<1)thrownewError("BitMatrix size must be defined and greater than 0");this.size=r,this.data=newUint8Array(r*r),this.reservedBit=newUint8Array(r*r)}Lr.prototype.set=function(r,a,s,f){letd=r*this.size+a;this.data[d]=s,f&&(this.reservedBit[d]=!0)};Lr.prototype.get=function(r,a){returnthis.data[r*this.size+a]};Lr.prototype.xor=function(r,a,s){this.data[r*this.size+a]^=s};Lr.prototype.isReserved=function(r,a){returnthis.reservedBit[r*this.size+a]};xa.exports=Lr});varpa=Se(bi=>{varu0=En().getSymbolSize;bi.getRowColCoords=function(a){if(a===1)return[];lets=Math.floor(a/7)+2,f=u0(a),d=f===145?26:Math.ceil((f-13)/(2*s-2))*2,h=[f-7];for(letp=1;p<s-1;p++)h[p]=h[p-1]-d;returnh.push(6),h.reverse()};bi.getPositions=function(a){lets=[],f=bi.getRowColCoords(a),d=f.length;for(leth=0;h<d;h++)for(letp=0;p<d;p++)h===0&&p===0||h===0&&p===d-1||h===d-1&&p===0||s.push([f[h],f[p]]);returns}});varma=Se(Ea=>{varh0=En().getSymbolSize,Aa=7;Ea.getPositions=function(a){lets=h0(a);return[[0,0],[s-Aa,0],[0,s-Aa]]}});varCa=Se(Pe=>{Pe.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};varkn={N1:3,N2:3,N3:40,N4:10};Pe.isValid=function(a){returna!=null&&a!==""&&!isNaN(a)&&a>=0&&a<=7};Pe.from=function(a){returnPe.isValid(a)?parseInt(a,10):void0};Pe.getPenaltyN1=function(a){lets=a.size,f=0,d=0,h=0,p=null,A=null;for(lety=0;y<s;y++){d=h=0,p=A=null;for(letx=0;x<s;x++){let_=a.get(y,x);_===p?d++:(d>=5&&(f+=kn.N1+(d-5)),p=_,d=1),_=a.get(x,y),_===A?h++:(h>=5&&(f+=kn.N1+(h-5)),A=_,h=1)}d>=5&&(f+=kn.N1+(d-5)),h>=5&&(f+=kn.N1+(h-5))}returnf};Pe.getPenaltyN2=function(a){lets=a.size,f=0;for(letd=0;d<s-1;d++)for(leth=0;h<s-1;h+
]))+`;an.KANJI=new RegExp(Fr,"g");an.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");an.BYTE=new RegExp(x0,"g");an.NUMERIC=new RegExp(Na,"g");an.ALPHANUMERIC=new RegExp(g0,"g");var w0=new RegExp("^"+Fr+"$"),p0=new RegExp("^"+Na+"$"),A0=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");an.testKanji=function(a){return w0.test(a)};an.testNumeric=function(a){return p0.test(a)};an.testAlphanumeric=function(a){return A0.test(a)}});var Cn=Se(Qe=>{var E0=vs(),Ls=Bs();Qe.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};Qe.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};Qe.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};Qe.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};Qe.MIXED={bit:-1};Qe.getCharCountIndicator=function(a,s){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!E0.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?a.ccBits[0]:s<27?a.ccBits[1]:a.ccBits[2]};Qe.getBestModeForData=function(a){return Ls.testNumeric(a)?Qe.NUMERIC:Ls.testAlphanumeric(a)?Qe.ALPHANUMERIC:Ls.testKanji(a)?Qe.KANJI:Qe.BYTE};Qe.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")};Qe.isValid=function(a){return a&&a.bit&&a.ccBits};function m0(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return Qe.NUMERIC;case"alphanumeric":return Qe.ALPHANUMERIC;case"kanji":return Qe.KANJI;case"byte":return Qe.BYTE;default:throw new Error("Unknown mode: "+r)}}Qe.from=function(a,s){if(Qe.isValid(a))return a;try{return m0(a)}catch{return s}}});var va=Se(Pn=>{var Oi=En(),C0=Os(),Ma=Ii(),_n=Cn(),ks=vs(),Ra=7973,Oa=Oi.getBCHDigit(Ra);function _0(r,a,s){for(let f=1;f<=40;f++)if(a<=Pn.getCapacity(f,s,r))return f}function Da(r,a){return _n.getCharCountIndicator(r,a)+4}function y0(r,a){let s=0;return r.forEach(function(f){let d=Da(f.mode,a);s+=d+f.getBitsLength()}),s}function I0(r,a){for(let s=1;s<=40;s++)if(y0(r,s)<=Pn.getCapacity(s,a,_n.MIXED))return s}Pn.from=function(a,s){return ks.isValid(a)?parseInt(a,10):s};Pn.getCapacity=function(a,s,f){if(!ks.isValid(a))throw new Error("Invalid QR Code version");typeof f>"u"&&(f=_n.BYTE);let d=Oi.getSymbolTotalCodewords(a),h=C0.getTotalCodewordsCount(a,s),p=(d-h)*8;if(f===_n.MIXED)return p;let A=p-Da(f,a);switch(f){case _n.NUMERIC:return Math.floor(A/10*3);case _n.ALPHANUMERIC:return Math.floor(A/11*2);case _n.KANJI:return Math.floor(A/13);case _n.BYTE:default:return Math.floor(A/8)}};Pn.getBestVersionForData=function(a,s){let f,d=Ma.from(s,Ma.M);if(Array.isArray(a)){if(a.length>1)return I0(a,d);if(a.length===0)return 1;f=a[0]}else f=a;return _0(f.mode,f.getLength(),d)};Pn.getEncodedBits=function(a){if(!ks.isValid(a)||a<7)throw new Error("Invalid QR Code version");let s=a<<12;for(;Oi.getBCHDigit(s)-Oa>=0;)s^=Ra<<Oi.getBCHDigit(s)-Oa;return a<<12|s}});var Pa=Se(ka=>{var Ps=En(),La=1335,b0=21522,Ba=Ps.getBCHDigit(La);ka.getEncodedBits=function(a,s){let f=a.bit<<3|s,d=f<<10;for(;Ps.getBCHDigit(d)-Ba>=0;)d^=La<<Ps.getBCHDigit(d)-Ba;return(f<<10|d)^b0}});var Ua=Se((Zd,Fa)=>{var S0=Cn();function ir(r){this.mode=S0.NUMERIC,this.data=r.toString()}ir.getBitsLength=function(a){return 10*Math.floor(a/3)+(a%3?a%3*3+1:0)};ir.prototype.getLength=function(){return this.data.length};ir.prototype.getBitsLength=function(){return ir.getBitsLength(this.data.length)};ir.prototype.write=function(a){let s,f,d;for(s=0;s+3<=this.data.length;s+=3)f=this.data.substr(s,3),d=parseInt(f,10),a.put(d,10);let h=this.data.length-s;h>0&&(f=this.data.substr(s),d=parseInt(f,10),a.put(d,h*3+1))};Fa.exports=ir});var Ha=Se((Qd,za)=>{var T0=Cn(),Fs=["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 sr(r){this.mode=T0.ALPHANUMERIC,this.data=r}sr.getBitsLength=function(a){return 11*Math.floor(a/2)+6*(a%2)};sr.prototype.getLength=function(){return this.data.length};sr.prototype.getBitsLength=function(){return sr.getBitsLength(this.data.length)};sr.prototype.write=function(a){let s;for(s=0;s+2<=this.data.length;s+=2){let f=Fs.indexOf(this.data[s])*45;f+=
Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),r.put(s,13)}};Ga.exports=ar});varYa=Se((Jd,Us)=>{"use strict";varUr={single_source_shortest_paths:function(r,a,s){varf={},d={};d[a]=0;varh=Ur.PriorityQueue.make();h.push(a,0);for(varp,A,y,x,_,v,R,N,V;!h.empty();){p=h.pop(),A=p.value,x=p.cost,_=r[A]||{};for(yin_)_.hasOwnProperty(y)&&(v=_[y],R=x+v,N=d[y],V=typeofd[y]>"u",(V||N>R)&&(d[y]=R,h.push(y,R),f[y]=A))}if(typeofs<"u"&&typeofd[s]>"u"){varK=["Could not find a path from ",a," to ",s,"."].join("");thrownewError(K)}returnf},extract_shortest_path_from_predecessor_list:function(r,a){for(vars=[],f=a,d;f;)s.push(f),d=r[f],f=r[f];returns.reverse(),s},find_path:function(r,a,s){varf=Ur.single_source_shortest_paths(r,a,s);returnUr.extract_shortest_path_from_predecessor_list(f,s)},PriorityQueue:{make:function(r){vara=Ur.PriorityQueue,s={},f;r=r||{};for(fina)a.hasOwnProperty(f)&&(s[f]=a[f]);returns.queue=[],s.sorter=r.sorter||a.default_sorter,s},default_sorter:function(r,a){returnr.cost-a.cost},push:function(r,a){vars={value:r,cost:a};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){returnthis.queue.shift()},empty:function(){returnthis.queue.length===0}}};typeofUs<"u"&&(Us.exports=Ur)});varel=Se(lr=>{varMe=Cn(),Qa=Ua(),Ka=Ha(),qa=Xa(),Ja=ja(),zr=Bs(),Ri=En(),R0=Ya();functionWa(r){returnunescape(encodeURIComponent(r)).length}functionHr(r,a,s){letf=[],d;for(;(d=r.exec(s))!==null;)f.push({data:d[0],index:d.index,mode:a,length:d[0].length});returnf}function$a(r){leta=Hr(zr.NUMERIC,Me.NUMERIC,r),s=Hr(zr.ALPHANUMERIC,Me.ALPHANUMERIC,r),f,d;returnRi.isKanjiModeEnabled()?(f=Hr(zr.BYTE,Me.BYTE,r),d=Hr(zr.KANJI,Me.KANJI,r)):(f=Hr(zr.BYTE_KANJI,Me.BYTE,r),d=[]),a.concat(s,f,d).sort(function(p,A){returnp.index-A.index}).map(function(p){return{data:p.data,mode:p.mode,length:p.length}})}functionzs(r,a){switch(a){caseMe.NUMERIC:returnQa.getBitsLength(r);caseMe.ALPHANUMERIC:returnKa.getBitsLength(r);caseMe.KANJI:returnJa.getBitsLength(r);caseMe.BYTE:returnqa.getBitsLength(r)}}functionD0(r){returnr.reduce(function(a,s){letf=a.length-1>=0?a[a.length-1]:null;returnf&&f.mode===s.mode?(a[a.length-1].data+=s.data,a):(a.push(s),a)},[])}functionv0(r){leta=[];for(lets=0;s<r.length;s++){letf=r[s];switch(f.mode){caseMe.NUMERIC:a.push([f,{data:f.data,mode:Me.ALPHANUMERIC,length:f.length},{data:f.data,mode:Me.BYTE,length:f.length}]);break;caseMe.ALPHANUMERIC:a.push([f,{data:f.data,mode:Me.BYTE,length:f.length}]);break;caseMe.KANJI:a.push([f,{data:f.data,mode:Me.BYTE,length:Wa(f.data)}]);break;caseMe.BYTE:a.push([{data:f.data,mode:Me.BYTE,length:Wa(f.data)}])}}returna}functionB0(r,a){lets={},f={start:{}},d=["start"];for(leth=0;h<r.length;h++){letp=r[h],A=[];for(lety=0;y<p.length;y++){letx=p[y],_=""+h+y;A.push(_),s[_]={node:x,lastCount:0},f[_]={};for(letv=0;v<d.length;v++){letR=d[v];s[R]&&s[R].node.mode===x.mode?(f[R][_]=zs(s[R].lastCount+x.length,x.mode)-zs(s[R].lastCount,x.mode),s[R].lastCount+=x.length):(s[R]&&(s[R].lastCount=x.length),f[R][_]=zs(x.length,x.mode)+4+Me.getCharCountIndicator(x.mode,a))}}d=A}for(leth=0;h<d.length;h++)f[d[h]].end=0;return{map:f,table:s}}functionZa(r,a){lets,f=Me.getBestModeForData(r);if(s=Me.from(a,f),s!==Me.BYTE&&s.bit<f.bit)thrownewError('"'+r+'" cannot be encoded with mode '+Me.toString(s)+`.
Suggested mode is: `+Me.toString(f));switch(s===Me.KANJI&&!Ri.isKanjiModeEnabled()&&(s=Me.BYTE),s){caseMe.NUMERIC:returnnewQa(r);caseMe.ALPHANUMERIC:returnnewKa(r);caseMe.KANJI:returnnewJa(r);caseMe.BYTE:returnnewqa(r)}}lr.fromArray=function(a){returna.reduce(function(s,f){returntypeoff=="string"?s.push(Za(f,null)):f.data&&s.push(Za(f.data,f.mode)),s},[])};lr.fromString=function(a,s){letf=$a(a,Ri.isKanjiModeEnabled()),d=v0(f),h=B0(d,s),p=R0.find_path(h.map,"start","end"),A=[];for(lety=1;y<p.length-1;y++)A.push(h.table[p[y]].node);returnlr.fromArray(D0(A))};lr.rawSplit=function(a){returnlr.fromArray($a(a,Ri.isKanjiModeEnabled()))}});varnl=Se(tl=>{varvi=En(),Hs=Ii(),L0=ga(),k0=wa(),P0=pa(),F0=ma(),Gs=Ca(),js=Os(),U0=Sa(),Di=va(),z0=Pa(),H0=Cn(),Vs=el();functionV0(r,a){lets=r.size,f=F0.getPositions(a);for(letd=0;d<f.length;d++){leth=f[d][0],p=f[d][1];for(letA=-1;A<=7;A++)if(!(h+A<=-1||s<=h+A))for(lety=-1;y<=7;y++)p+y<=-1||s<=p+y||(A>=0&&A<=6&&(y===0||y===6)||y>=0&&y<=6&&(A===0||A===6)||A>=2&&A<=4&&y>=2&&y<=4?r.set(h+A,p+y,!0,!0):r.set(h+A,p+y,!1,!0))}}functionX0(r){leta=r.size;for(lets=8;s<a-8;s++){letf=s%2===0;r.set(s,6,f,!0),r.set(6,s,f,!0)}}functionG0(r,a){lets=P0.getPositions(a);for(letf=0;f<s.length;f++){letd=s[f][0],h=s[f][1];for(letp=-2;p<=2;p++)for(letA=-2;A<=2;A++)p===-2||p===2||A===-2||A===2||p===0&&A===0?r.set(d+p,h+A,!0,!0):r.set(d+p,h+A,!1,!0)}}functionj0(r,a){lets=r.size,f=Di.getEncodedBits(a),d,h,p;for(letA=0;A<18;A++)d=Math.floor(A/3),h=A%3+s-8-3,p=(f>>A&1)===1,r.set(d,h,p,!0),r.set(h,d,p,!0)}functionXs(r,a,s){letf=r.size,d=z0.getEncodedBits(a,s),h,p;for(h=0;h<15;h++)p=(d>>h&1)===1,h<6?r.set(h,8,p,!0):h<8?r.set(h+1,8,p,!0):r.set(f-15+h,8,p,!0),h<8?r.set(8,f-h-1,p,!0):h<9?r.set(8,15-h-1+1,p,!0):r.set(8,15-h-1,p,!0);r.set(f-8,8,1,!0)}functionY0(r,a){lets=r.size,f=-1,d=s-1,h=7,p=0;for(letA=s-1;A>0;A-=2)for(A===6&&A--;;){for(lety=0;y<2;y++)if(!r.isReserved(d,A-y)){letx=!1;p<a.length&&(x=(a[p]>>>h&1)===1),r.set(d,A-y,x),h--,h===-1&&(p++,h=7)}if(d+=f,d<0||s<=d){d-=f,f=-f;break}}}functionW0(r,a,s){letf=newL0;s.forEach(function(y){f.put(y.mode.bit,4),f.put(y.getLength(),H0.getCharCountIndicator(y.mode,r)),y.write(f)});letd=vi.getSymbolTotalCodewords(r),h=js.getTotalCodewordsCount(r,a),p=(d-h)*8;for(f.getLengthInBits()+4<=p&&f.put(0,4);f.getLengthInBits()%8!==0;)f.putBit(0);letA=(p-f.getLengthInBits())/8;for(lety=0;y<A;y++)f.put(y%2?17:236,8);returnZ0(f,r,a)}functionZ0(r,a,s){letf=vi.getSymbolTotalCodewords(a),d=js.getTotalCodewordsCount(a,s),h=f-d,p=js.getBlocksCount(a,s),A=f%p,y=p-A,x=Math.floor(f/p),_=Math.floor(h/p),v=_+1,R=x-_,N=newU0(R),V=0,K=newArray(p),H=newArray(p),U=0,W=newUint8Array(r.buffer);for(letO=0;O<p;O++){letle=O<y?_:v;K[O]=W.slice(V,V+le),H[O]=N.encode(K[O]),V+=le,U=Math.max(U,le)}lette=newUint8Array(f),z=0,L,Y;for(L=0;L<U;L++)for(Y=0;Y<p;Y++)L<K[Y].length&&(te[z++]=K[Y][L]);for(L=0;L<R;L++)for(Y=0;Y<p;Y++)te[z++]=H[Y][L];returnte}functionQ0(r,a,s,f){letd;if(Array.isArray(r))d=Vs.fromArray(r);elseif(typeofr=="string"){letx=a;if(!x){let_=Vs.rawSplit(r);x=Di.getBestVersionForData(_,s)}d=Vs.fromString(r,x||40)}elsethrownewError("Invalid data");leth=Di.getBestVersionForData(d,s);if(!h)thrownewError("The amount of data is too big to be stored in a QR Code");if(!a)a=h;elseif(a<h)thrownewError(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+h+`.
`);letp=W0(a,s,d),A=vi.getSymbolSize(a),y=newk0(A);returnV0(y,a),X0(y),G0(y,a),Xs(y,s,0),a>=7&&j0(y,a),Y0(y,p),isNaN(f)&&(f=Gs.getBestMask(y,Xs.bind(null,y,s))),Gs.applyMask(f,y),Xs(y,s,f),{modules:y,version:a,errorCorrectionLevel:s,maskPattern:f,segments:d}}tl.create=function(a,s){if(typeofa>"u"||a==="")thrownewError("No input text");letf=Hs.M,d,h;returntypeofs<"u"&&(f=Hs.from(s.errorCorrectionLevel,Hs.M),d=Di.from(s.version),h=Gs.from(s.maskPattern),s.toSJISFunc&&vi.setToSJISFunction(s.toSJISFunc)),Q0(a,d,f,h)}});varYs=Se(Fn=>{functionrl(r){if(typeofr=="number"&&(r=r.toString()),typeofr!="string")thrownewError("Color should be defined as hex string");leta=r.slice().replace("#","").split("");if(a.length<3||a.length===5||a.length>8)thrownewError("Invalid hex color: "+r);(a.length===3||a.length===4)&&(a=Array.prototype.concat.apply([],a.map(function(f){return[f,f]}))),a.length===6&&a.push("F","F");lets=parseInt(a.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+a.slice(0,6).join("")}}Fn.getOptions=function(a){a||(a={}),a.color||(a.color={});lets=typeofa.margin>"u"||a.margin===null||a.margin<0?4:a.margin,f=a.width&&a.width>=21?a.width:void0,d=a.scale||4;return{width:f,scale:f?4:d,margin:s,color:{dark:rl(a.color.dark||"#000000ff"),light:rl(a.color.light||"#ffffffff")},type:a.type,rendererOpts:a.rendererOpts||{}}};Fn.getScale=function(a,s){returns.width&&s.width>=a+s.margin*2?s.width/(a+s.margin*2):s.scale};Fn.getImageWidth=function(a,s){letf=Fn.getScale(a,s);returnMath.floor((a+s.margin*2)*f)};Fn.qrToImageData=function(a,s,f){letd=s.modules.size,h=s.modules.data,p=Fn.getScale(d,f),A=Math.floor((d+f.margin*2)*p),y=f.margin*p,x=[f.color.light,f.color.dark];for(let_=0;_<A;_++)for(letv=0;v<A;v++){letR=(_*A+v)*4,N=f.color.light;if(_>=y&&v>=y&&_<A-y&&v<A-y){letV=Math.floor((_-y)/p),K=Math.floor((v-y)/p);N=x[h[V*d+K]?1:0]}a[R++]=N.r,a[R++]=N.g,a[R++]=N.b,a[R]=N.a}}});varil=Se(Bi=>{varWs=Ys();functionK0(r,a,s){r.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=s,a.width=s,a.style.height=s+"px",a.style.width=s+"px"}functionq0(){try{returndocument.createElement("canvas")}catch{thrownewError("You need to specify a canvas element")}}Bi.render=function(a,s,f){letd=f,h=s;typeofd>"u"&&(!s||!s.getContext)&&(d=s,s=void0),s||(h=q0()),d=Ws.getOptions(d);letp=Ws.getImageWidth(a.modules.size,d),A=h.getContext("2d"),y=A.createImageData(p,p);returnWs.qrToImageData(y.data,a,d),K0(A,h,p),A.putImageData(y,0,0),h};Bi.renderToDataURL=function(a,s,f){letd=f;typeofd>"u"&&(!s||!s.getContext)&&(d=s,s=void0),d||(d={});leth=Bi.render(a,s,d),p=d.type||"image/png",A=d.rendererOpts||{};returnh.toDataURL(p,A.quality)}});varal=Se(ol=>{varJ0=Ys();functionsl(r,a){lets=r.a/255,f=a+'="'+r.hex+'"';returns<1?f+" "+a+'-opacity="'+s.toFixed(2).slice(1)+'"':f}functionZs(r,a,s){letf=r+a;returntypeofs<"u"&&(f+=" "+s),f}function$0(r,a,s){letf="",d=0,h=!1,p=0;for(letA=0;A<r.length;A++){lety=Math.floor(A%a),x=Math.floor(A/a);!y&&!h&&(h=!0),r[A]?(p++,A>0&&y>0&&r[A-1]||(f+=h?Zs("M",y+s,.5+x+s):Zs("m",d,0),d=0,h=!1),y+1<a&&r[A+1]||(f+=Zs("h",p),p=0)):d++}returnf}ol.render=function(a,s,f){letd=J0.getOptions(s),h=a.modules.size,p=a.modules.data,A=h+d.margin*2,y=d.color.light.a?"<path "+sl(d.color.light,"fill")+' d="M0 0h'+A+"v"+A+'H0z"/>':"",x="<path "+sl(d.color.dark,"stroke")+' d="'+$0(p,h,d.margin)+'"/>',_='viewBox="0 0 '+A+" "+A+'"',R='<svg xmlns="http://www.w3.org/2000/svg" '+(d.width?'width="'+d.width+'" height="'+d.width+'" ':"")+_+' shape-rendering="crispEdges">'+y+x+`</svg>
`;returntypeoff=="function"&&f(null,R),R}});varcl=Se(Vr=>{varef=ua(),Qs=nl(),ll=il(),tf=al();functionKs(r,a,s,f,d){leth=[].slice.call(arguments,1),p=h.length,A=typeofh[p-1]=="function";if(!A&&!ef())thrownewError("Callback required as last argument");if(A){if(p<2)thrownewError("Too few arguments provided");p===2?(d=s,s=a,a=f=void0):p===3&&(a.getContext&&typeofd>"u"?(d=f,f=void0):(d=f,f=s,s=a,a=void0))}else{if(p<1)thrownewError("Too few arguments provided");returnp===1?(s=a,a=f=void0):p===2&&!a.getContext&&(f=s,s=a,a=void0),newPromise(function(y,x){try{let_=Qs.create(s,f);y(r(_,a,f))}catch(_){x(_)}})}try{lety=Qs.create(s,f);d(null,r(y,a,f))}catch(y){d(y)}}Vr.create=Qs.create;Vr.toCanvas=Ks.bind(null,ll.render);Vr.toDataURL=Ks.bind(null,ll.renderToDataURL);Vr.toString=Ks.bind(null,function(r,a,s){returntf.render(r,s)})});varxl=Se((Fi,gl)=>{(function(r,a){typeofFi=="object"&&typeofgl<"u"?a(Fi):typeofdefine=="function"&&define.amd?define(["exports"],a):(r=typeofglobalThis<"u"?globalThis:r||self,a(r.ZXing={}))})(Fi,(function(r){"use strict";functiona(E){returnE==null}vars=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(E,e){E.__proto__=e}||function(E,e){for(vartine)e.hasOwnProperty(t)&&(E[t]=e[t])};functionf(E,e){s(E,e);functiont(){this.constructor=E}E.prototype=e===null?Object.create(e):(t.prototype=e.prototype,newt)}functiond(E,e){vart=Object.setPrototypeOf;t?t(E,e):E.__proto__=e}functionh(E,e){e===void0&&(e=E.constructor);vart=Error.captureStackTrace;t&&t(E,e)}varp=(function(E){f(e,E);functione(t){varn=this.constructor,i=E.call(this,t)||this;returnObject.defineProperty(i,"name",{value:n.name,enumerable:!1}),d(i,n.prototype),h(i),i}returne})(Error);classAextendsp{constructor(e=void0){super(e),this.message=e}getKind(){returnthis.constructor.kind}}A.kind="Exception";classyextendsA{}y.kind="ArgumentException";classxextendsA{}x.kind="IllegalArgumentException";class_{constructor(e){if(this.binarizer=e,e===null)thrownewx("Binarizer must be non-null.")}getWidth(){returnthis.binarizer.getWidth()}getHeight(){returnthis.binarizer.getHeight()}getBlackRow(e,t){returnthis.binarizer.getBlackRow(e,t)}getBlackMatrix(){return(this.matrix===null||this.matrix===void0)&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix}isCropSupported(){returnthis.binarizer.getLuminanceSource().isCropSupported()}crop(e,t,n,i){leto=this.binarizer.getLuminanceSource().crop(e,t,n,i);returnnew_(this.binarizer.createBinarizer(o))}isRotateSupported(){returnthis.binarizer.getLuminanceSource().isRotateSupported()}rotateCounterClockwise(){lete=this.binarizer.getLuminanceSource().rotateCounterClockwise();returnnew_(this.binarizer.createBinarizer(e))}rotateCounterClockwise45(){lete=this.binarizer.getLuminanceSource().rotateCounterClockwise45();returnnew_(this.binarizer.createBinarizer(e))}toString(){try{returnthis.getBlackMatrix().toString()}catch{return""}}}classvextendsA{staticgetChecksumInstance(){returnnewv}}v.kind="ChecksumException";classR{constructor(e){this.source=e}getLuminanceSource(){returnthis.source}getWidth(){returnthis.source.getWidth()}getHeight(){returnthis.source.getHeight()}}classN{staticarraycopy(e,t,n,i,o){for(;o--;)n[i++]=e[t++]}staticcurrentTimeMillis(){returnDate.now()}}classVextendsA{}V.kind="IndexOutOfBoundsException";classKextendsV{constructor(e=void0,t=void0){super(t),this.index=e,this.message=t}}K.kind="ArrayIndexOutOfBoundsException";classH{staticfill(e,t){for(letn=0,i=e.length;n<i;n++)e[n]=t}staticfillWithin(e,t,n,i){H.rangeCheck(e.length,t,n);for(leto=t;o<n;o++)e[o]=i}staticrangeCheck(e,t,n){if(t>n)thrownewx("fromIndex("+t+") > toIndex("+n+")");if(t<0)thrownewK(t);if(n>e)thrownewK(n)}staticasList(...e){returne}staticcreate(e,t,n){returnArray.from({length:e}).map(o=>Array.from({length:t}).fill(n))}staticcreateInt32Array(e,t,n){returnArray.from({length:e}).map(o=>Int32Array.from({length:t}).fill(n))}staticequals(e,t){if(!e||!t||!e.length||!t.length||e.length!==t.length)return!1;for(letn=0,i=e.length;
`||e.charAt(g)==="\r"){if(o>l){if(c===-1)c=o-l;else if(o-l!==c)throw new x("row lengths do not match");l=o,u++}g++}else if(e.substring(g,g+t.length)===t)g+=t.length,i[o]=!0,o++;else if(e.substring(g,g+n.length)===n)g+=n.length,i[o]=!1,o++;else throw new x("illegal character encountered: "+e.substring(g));if(o>l){if(c===-1)c=o-l;else if(o-l!==c)throw new x("row lengths do not match");u++}let w=new $(c,u);for(let m=0;m<o;m++)i[m]&&w.set(Math.floor(m%c),Math.floor(m/c));return w}get(e,t){let n=t*this.rowSize+Math.floor(e/32);return(this.bits[n]>>>(e&31)&1)!==0}set(e,t){let n=t*this.rowSize+Math.floor(e/32);this.bits[n]|=1<<(e&31)&4294967295}unset(e,t){let n=t*this.rowSize+Math.floor(e/32);this.bits[n]&=~(1<<(e&31)&4294967295)}flip(e,t){let n=t*this.rowSize+Math.floor(e/32);this.bits[n]^=1<<(e&31)&4294967295}xor(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new x("input matrix dimensions do not match");let t=new W(Math.floor(this.width/32)+1),n=this.rowSize,i=this.bits;for(let o=0,l=this.height;o<l;o++){let c=o*n,u=e.getRow(o,t).getBitArray();for(let g=0;g<n;g++)i[c+g]^=u[g]}}clear(){let e=this.bits,t=e.length;for(let n=0;n<t;n++)e[n]=0}setRegion(e,t,n,i){if(t<0||e<0)throw new x("Left and top must be nonnegative");if(i<1||n<1)throw new x("Height and width must be at least 1");let o=e+n,l=t+i;if(l>this.height||o>this.width)throw new x("The region must fit inside the matrix");let c=this.rowSize,u=this.bits;for(let g=t;g<l;g++){let w=g*c;for(let m=e;m<o;m++)u[w+Math.floor(m/32)]|=1<<(m&31)&4294967295}}getRow(e,t){t==null||t.getSize()<this.width?t=new W(this.width):t.clear();let n=this.rowSize,i=this.bits,o=e*n;for(let l=0;l<n;l++)t.setBulk(l*32,i[o+l]);return t}setRow(e,t){N.arraycopy(t.getBitArray(),0,this.bits,e*this.rowSize,this.rowSize)}rotate180(){let e=this.getWidth(),t=this.getHeight(),n=new W(e),i=new W(e);for(let o=0,l=Math.floor((t+1)/2);o<l;o++)n=this.getRow(o,n),i=this.getRow(t-1-o,i),n.reverse(),i.reverse(),this.setRow(o,i),this.setRow(t-1-o,n)}getEnclosingRectangle(){let e=this.width,t=this.height,n=this.rowSize,i=this.bits,o=e,l=t,c=-1,u=-1;for(let g=0;g<t;g++)for(let w=0;w<n;w++){let m=i[g*n+w];if(m!==0){if(g<l&&(l=g),g>u&&(u=g),w*32<o){let C=0;for(;(m<<31-C&4294967295)===0;)C++;w*32+C<o&&(o=w*32+C)}if(w*32+31>c){let C=31;for(;!(m>>>C);)C--;w*32+C>c&&(c=w*32+C)}}}return c<o||u<l?null:Int32Array.from([o,l,c-o+1,u-l+1])}getTopLeftOnBit(){let e=this.rowSize,t=this.bits,n=0;for(;n<t.length&&t[n]===0;)n++;if(n===t.length)return null;let i=n/e,o=n%e*32,l=t[n],c=0;for(;(l<<31-c&4294967295)===0;)c++;return o+=c,Int32Array.from([o,i])}getBottomRightOnBit(){let e=this.rowSize,t=this.bits,n=t.length-1;for(;n>=0&&t[n]===0;)n--;if(n<0)return null;let i=Math.floor(n/e),o=Math.floor(n%e)*32,l=t[n],c=31;for(;!(l>>>c);)c--;return o+=c,Int32Array.from([o,i])}getWidth(){return this.width}getHeight(){return this.height}getRowSize(){return this.rowSize}equals(e){if(!(e instanceof $))return!1;let t=e;return this.width===t.width&&this.height===t.height&&this.rowSize===t.rowSize&&H.equals(this.bits,t.bits)}hashCode(){let e=this.width;return e=31*e+this.width,e=31*e+this.height,e=31*e+this.rowSize,e=31*e+H.hashCode(this.bits),e}toString(e="X ",t=" ",n=`
`)}returnt.toString()}}classstextendsxe{constructor(e){super(e.getWidth(),e.getHeight()),this.delegate=e}getRow(e,t){letn=this.delegate.getRow(e,t),i=this.getWidth();for(leto=0;o<i;o++)n[o]=255-(n[o]&255);returnn}getMatrix(){lete=this.delegate.getMatrix(),t=this.getWidth()*this.getHeight(),n=newUint8ClampedArray(t);for(leti=0;i<t;i++)n[i]=255-(e[i]&255);returnn}isCropSupported(){returnthis.delegate.isCropSupported()}crop(e,t,n,i){returnnewst(this.delegate.crop(e,t,n,i))}isRotateSupported(){returnthis.delegate.isRotateSupported()}invert(){returnthis.delegate}rotateCounterClockwise(){returnnewst(this.delegate.rotateCounterClockwise())}rotateCounterClockwise45(){returnnewst(this.delegate.rotateCounterClockwise45())}}classztextendsxe{constructor(e){super(e.width,e.height),this.canvas=e,this.tempCanvasElement=null,this.buffer=zt.makeBufferFromCanvasImageData(e)}staticmakeBufferFromCanvasImageData(e){lett=e.getContext("2d").getImageData(0,0,e.width,e.height);returnzt.toGrayscaleBuffer(t.data,e.width,e.height)}statictoGrayscaleBuffer(e,t,n){leti=newUint8ClampedArray(t*n);for(leto=0,l=0,c=e.length;o<c;o+=4,l++){letu;if(e[o+3]===0)u=255;else{letw=e[o],m=e[o+1],C=e[o+2];u=306*w+601*m+117*C+512>>10}i[l]=u}returni}getRow(e,t){if(e<0||e>=this.getHeight())thrownewx("Requested row is outside the image: "+e);letn=this.getWidth(),i=e*n;returnt===null?t=this.buffer.slice(i,i+n):(t.length<n&&(t=newUint8ClampedArray(n)),t.set(this.buffer.slice(i,i+n))),t}getMatrix(){returnthis.buffer}isCropSupported(){return!0}crop(e,t,n,i){returnsuper.crop(e,t,n,i),this}isRotateSupported(){return!0}rotateCounterClockwise(){returnthis.rotate(-90),this}rotateCounterClockwise45(){returnthis.rotate(-45),this}getTempCanvasElement(){if(this.tempCanvasElement===null){lete=this.canvas.ownerDocument.createElement("canvas");e.width=this.canvas.width,e.height=this.canvas.height,this.tempCanvasElement=e}returnthis.tempCanvasElement}rotate(e){lett=this.getTempCanvasElement(),n=t.getContext("2d"),i=e*zt.DEGREE_TO_RADIANS,o=this.canvas.width,l=this.canvas.height,c=Math.ceil(Math.abs(Math.cos(i))*o+Math.abs(Math.sin(i))*l),u=Math.ceil(Math.abs(Math.sin(i))*o+Math.abs(Math.cos(i))*l);returnt.width=c,t.height=u,n.translate(c/2,u/2),n.rotate(i),n.drawImage(this.canvas,o/-2,l/-2),this.buffer=zt.makeBufferFromCanvasImageData(t),this}invert(){returnnewst(this)}}zt.DEGREE_TO_RADIANS=Math.PI/180;classCr{constructor(e,t,n){this.deviceId=e,this.label=t,this.kind="videoinput",this.groupId=n||void0}toJSON(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}}}var$e=(globalThis||global||self||window||void0)&&(globalThis||global||self||window||void0).__awaiter||function(E,e,t,n){functioni(o){returnoinstanceoft?o:newt(function(l){l(o)})}returnnew(t||(t=Promise))(function(o,l){functionc(w){try{g(n.next(w))}catch(m){l(m)}}functionu(w){try{g(n.throw(w))}catch(m){l(m)}}functiong(w){w.done?o(w.value):i(w.value).then(c,u)}g((n=n.apply(E,e||[])).next())})};classHt{constructor(e,t=500,n){this.reader=e,this.timeBetweenScansMillis=t,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}gethasNavigator(){returntypeofnavigator<"u"}getisMediaDevicesSuported(){returnthis.hasNavigator&&!!navigator.mediaDevices}getcanEnumerateDevices(){return!!(this.isMediaDevicesSuported&&navigator.mediaDevices.enumerateDevices)}gettimeBetweenDecodingAttempts(){returnthis._timeBetweenDecodingAttempts}settimeBetweenDecodingAttempts(e){this._timeBetweenDecodingAttempts=e<0?0:e}sethints(e){this._hints=e||null}gethints(){returnthis._hints}listVideoInputDevices(){return$e(this,void0,void0,function*(){if(!this.hasNavigator)thrownewError("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)thrownewError("Can't enumerate devices, method not supported.");lete=yieldnavigator.mediaDevices.enumerateDevices(),t=[];for(letnofe){leti=n.kind==="video"?"videoinput":n.kind;if(i!=="videoinput")continue;leto=n.deviceId||n.id,l=n.label||`V
`),n=oa.singletonList($t.INITIAL_STATE);for(leto=0;o<this.text.length;o++){letl,c=o+1<this.text.length?this.text[o+1]:0;switch(this.text[o]){casek.getCharCode("\r"):l=c===t?2:0;break;casek.getCharCode("."):l=c===e?3:0;break;casek.getCharCode(","):l=c===e?4:0;break;casek.getCharCode(":"):l=c===e?5:0;break;default:l=0}l>0?(n=vr.updateStateListForPair(n,o,l),o++):n=this.updateStateListForChar(n,o)}returnoa.min(n,(o,l)=>o.getBitCount()-l.getBitCount()).toBitArray(this.text)}updateStateListForChar(e,t){letn=[];for(letiofe)this.updateStateForChar(i,t,n);returnvr.simplifyStates(n)}updateStateForChar(e,t,n){leti=this.text[t]&255,o=Ts[e.getMode()][i]>0,l=null;for(letc=0;c<=Jt;c++){letu=Ts[c][i];if(u>0){if(l==null&&(l=e.endBinaryShift(t)),!o||c===e.getMode()||c===Bt){letg=l.latchAndAppend(c,u);n.push(g)}if(!o&&la[e.getMode()][c]>=0){letg=l.shiftAndAppend(c,u);n.push(g)}}}if(e.getBinaryShiftByteCount()>0||Ts[e.getMode()][i]===0){letc=e.addBinaryShiftChar(t);n.push(c)}}staticupdateStateListForPair(e,t,n){leti=[];for(letoofe)this.updateStateForPair(o,t,n,i);returnthis.simplifyStates(i)}staticupdateStateForPair(e,t,n,i){leto=e.endBinaryShift(t);if(i.push(o.latchAndAppend(Jt,n)),e.getMode()!==Jt&&i.push(o.shiftAndAppend(Jt,n)),n===3||n===4){letl=o.latchAndAppend(Bt,16-n).latchAndAppend(Bt,1);i.push(l)}if(e.getBinaryShiftByteCount()>0){letl=e.addBinaryShiftChar(t).addBinaryShiftChar(t+1);i.push(l)}}staticsimplifyStates(e){lett=[];for(letnofe){leti=!0;for(letooft){if(o.isBetterThanOrEqualTo(n)){i=!1;break}n.isBetterThanOrEqualTo(o)&&(t=t.filter(l=>l!==o))}i&&t.push(n)}returnt}}class_e{constructor(){}staticencodeBytes(e){return_e.encode(e,_e.DEFAULT_EC_PERCENT,_e.DEFAULT_AZTEC_LAYERS)}staticencode(e,t,n){leti=newvr(e).encode(),o=U.truncDivision(i.getSize()*t,100)+11,l=i.getSize()+o,c,u,g,w,m;if(n!==_e.DEFAULT_AZTEC_LAYERS){if(c=n<0,u=Math.abs(n),u>(c?_e.MAX_NB_BITS_COMPACT:_e.MAX_NB_BITS))thrownewx(k.format("Illegal value %s for layers",n));g=_e.totalBitsInLayer(u,c),w=_e.WORD_SIZE[u];letj=g-g%w;if(m=_e.stuffBits(i,w),m.getSize()+o>j)thrownewx("Data to large for user specified layer");if(c&&m.getSize()>w*64)thrownewx("Data to large for user specified layer")}else{w=0,m=null;for(letj=0;;j++){if(j>_e.MAX_NB_BITS)thrownewx("Data too large for an Aztec code");if(c=j<=3,u=c?j+1:j,g=_e.totalBitsInLayer(u,c),l>g)continue;(m==null||w!==_e.WORD_SIZE[u])&&(w=_e.WORD_SIZE[u],m=_e.stuffBits(i,w));letwe=g-g%w;if(!(c&&m.getSize()>w*64)&&m.getSize()+o<=we)break}}letC=_e.generateCheckWords(m,g,w),b=m.getSize()/w,S=_e.generateModeMessage(c,u,b),T=(c?11:14)+u*4,D=newInt32Array(T),F;if(c){F=T;for(letj=0;j<D.length;j++)D[j]=j}else{F=T+1+2*U.truncDivision(U.truncDivision(T,2)-1,15);letj=U.truncDivision(T,2),we=U.truncDivision(F,2);for(lethe=0;he<j;he++){letmt=he+U.truncDivision(he,15);D[j-he-1]=we-mt-1,D[j+he]=we+mt+1}}letZ=new$(F);for(letj=0,we=0;j<u;j++){lethe=(u-j)*4+(c?9:12);for(letmt=0;mt<he;mt++){letGt=mt*2;for(letCt=0;Ct<2;Ct++)C.get(we+Gt+Ct)&&Z.set(D[j*2+Ct],D[j*2+mt]),C.get(we+he*2+Gt+Ct)&&Z.set(D[j*2+mt],D[T-1-j*2-Ct]),C.get(we+he*4+Gt+Ct)&&Z.set(D[T-1-j*2-Ct],D[T-1-j*2-mt]),C.get(we+he*6+Gt+Ct)&&Z.set(D[T-1-j*2-mt],D[j*2+Ct])}we+=he*8}if(_e.drawModeMessage(Z,c,F,S),c)_e.drawBullsEye(Z,U.truncDivision(F,2),5);else{_e.drawBullsEye(Z,U.truncDivision(F,2),7);for(letj=0,we=0;j<U.truncDivision(T,2)-1;j+=15,we+=16)for(lethe=U.truncDivision(F,2)&1;he<F;he+=2)Z.set(U.truncDivision(F,2)-we,he),Z.set(U.truncDivision(F,2)+we,he),Z.set(he,U.truncDivision(F,2)-we),Z.set(he,U.truncDivision(F,2)+we)}letQ=newsa;returnQ.setCompact(c),Q.setSize(F),Q.setLayers(u),Q.setCodeWords(b),Q.setMatrix(Z),Q}staticdrawBullsEye(e,t,n){for(leti=0;i<n;i+=2)for(leto=t-i;o<=t+i;o++)e.set(o,t-i),e.set(o,t+i),e.set(t-i,o),e.set(t+i,o);e.set(t-n,t-n),e.set(t-n+1,t-n),e.set(t-n,t-n+1),e.set(t+n,t-n),e.set(t+n,t-n+1),e.set(t+n,t+n-1)}staticgenerateModeMessage(e,t,n){leti=newW;returne?(i.appendBits(t-1,2),i.appendBits(n-1,6),i=_e.generateCheckWords(i,28,4)):(i.appendBits(t-1,5),i.appendBits(n-1,11),i=_e.gener