import{g as te}from"./copy-to-clipboard-DgsYVcxl.js";import{r as ee}from"./dijkstrajs-C00ieaqj.js";var V={},Q,Bt;function ne(){return Bt||(Bt=1,Q=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Q}var $={},F={},At;function v(){if(At)return F;At=1;let r;const o=[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];return F.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},F.getSymbolTotalCodewords=function(n){return o[n]},F.getBCHDigit=function(u){let n=0;for(;u!==0;)n++,u>>>=1;return n},F.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');r=n},F.isKanjiModeEnabled=function(){return typeof r<"u"},F.toSJIS=function(n){return r(n)},F}var W={},Rt;function wt(){return Rt||(Rt=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(u){if(typeof u!="string")throw new Error("Param is not a string");switch(u.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+u)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,t){if(r.isValid(n))return n;try{return o(n)}catch{return t}}}(W)),W}var Z,pt;function re(){if(pt)return Z;pt=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const u=Math.floor(o/8);return(this.buffer[u]>>>7-o%8&1)===1},put:function(o,u){for(let n=0;n>>u-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const u=Math.floor(this.length/8);this.buffer.length<=u&&this.buffer.push(0),o&&(this.buffer[u]|=128>>>this.length%8),this.length++}},Z=r,Z}var X,It;function oe(){if(It)return X;It=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,u,n,t){const e=o*this.size+u;this.data[e]=n,t&&(this.reservedBit[e]=!0)},r.prototype.get=function(o,u){return this.data[o*this.size+u]},r.prototype.xor=function(o,u,n){this.data[o*this.size+u]^=n},r.prototype.isReserved=function(o,u){return this.reservedBit[o*this.size+u]},X=r,X}var x={},Tt;function ie(){return Tt||(Tt=1,function(r){const o=v().getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const t=Math.floor(n/7)+2,e=o(n),i=e===145?26:Math.ceil((e-13)/(2*t-2))*2,a=[e-7];for(let s=1;s=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const e=t.size;let i=0,a=0,s=0,c=null,E=null;for(let p=0;p=5&&(i+=o.N1+(a-5)),c=f,a=1),f=t.get(y,p),f===E?s++:(s>=5&&(i+=o.N1+(s-5)),E=f,s=1)}a>=5&&(i+=o.N1+(a-5)),s>=5&&(i+=o.N1+(s-5))}return i},r.getPenaltyN2=function(t){const e=t.size;let i=0;for(let a=0;a=10&&(a===1488||a===93)&&i++,s=s<<1&2047|t.get(E,c),E>=10&&(s===1488||s===93)&&i++}return i*o.N3},r.getPenaltyN4=function(t){let e=0;const i=t.data.length;for(let s=0;s=0;){const i=e[0];for(let s=0;s0){const a=new Uint8Array(this.degree);return a.set(e,i),a}return e},rt=o,rt}var ot={},it={},ut={},Dt;function Qt(){return Dt||(Dt=1,ut.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),ut}var L={},qt;function $t(){if(qt)return L;qt=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let u="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";u=u.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+u+`)(?:.|[\r ]))+`;L.KANJI=new RegExp(u,"g"),L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),L.BYTE=new RegExp(n,"g"),L.NUMERIC=new RegExp(r,"g"),L.ALPHANUMERIC=new RegExp(o,"g");const t=new RegExp("^"+u+"$"),e=new RegExp("^"+r+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return L.testKanji=function(s){return t.test(s)},L.testNumeric=function(s){return e.test(s)},L.testAlphanumeric=function(s){return i.test(s)},L}var Ut;function k(){return Ut||(Ut=1,function(r){const o=Qt(),u=$t();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(e,i){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!o.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?e.ccBits[0]:i<27?e.ccBits[1]:e.ccBits[2]},r.getBestModeForData=function(e){return u.testNumeric(e)?r.NUMERIC:u.testAlphanumeric(e)?r.ALPHANUMERIC:u.testKanji(e)?r.KANJI:r.BYTE},r.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},r.isValid=function(e){return e&&e.bit&&e.ccBits};function n(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}r.from=function(e,i){if(r.isValid(e))return e;try{return n(e)}catch{return i}}}(it)),it}var Ft;function fe(){return Ft||(Ft=1,function(r){const o=v(),u=Gt(),n=wt(),t=k(),e=Qt(),i=7973,a=o.getBCHDigit(i);function s(y,f,M){for(let S=1;S<=40;S++)if(f<=r.getCapacity(S,M,y))return S}function c(y,f){return t.getCharCountIndicator(y,f)+4}function E(y,f){let M=0;return y.forEach(function(S){const b=c(S.mode,f);M+=b+S.getBitsLength()}),M}function p(y,f){for(let M=1;M<=40;M++)if(E(y,M)<=r.getCapacity(M,f,t.MIXED))return M}r.from=function(f,M){return e.isValid(f)?parseInt(f,10):M},r.getCapacity=function(f,M,S){if(!e.isValid(f))throw new Error("Invalid QR Code version");typeof S>"u"&&(S=t.BYTE);const b=o.getSymbolTotalCodewords(f),I=u.getTotalCodewordsCount(f,M),N=(b-I)*8;if(S===t.MIXED)return N;const R=N-c(S,f);switch(S){case t.NUMERIC:return Math.floor(R/10*3);case t.ALPHANUMERIC:return Math.floor(R/11*2);case t.KANJI:return Math.floor(R/13);case t.BYTE:default:return Math.floor(R/8)}},r.getBestVersionForData=function(f,M){let S;const b=n.from(M,n.M);if(Array.isArray(f)){if(f.length>1)return p(f,b);if(f.length===0)return 1;S=f[0]}else S=f;return s(S.mode,S.getLength(),b)},r.getEncodedBits=function(f){if(!e.isValid(f)||f<7)throw new Error("Invalid QR Code version");let M=f<<12;for(;o.getBCHDigit(M)-a>=0;)M^=i<=0;)s^=o<0&&(e=this.data.substr(t),i=parseInt(e,10),n.put(i,a*3+1))},ct=o,ct}var lt,zt;function he(){if(zt)return lt;zt=1;const r=k(),o=["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 u(n){this.mode=r.ALPHANUMERIC,this.data=n}return u.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},u.prototype.getLength=function(){return this.data.length},u.prototype.getBitsLength=function(){return u.getBitsLength(this.data.length)},u.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let i=o.indexOf(this.data[e])*45;i+=o.indexOf(this.data[e+1]),t.put(i,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},lt=u,lt}var ft,Vt;function me(){if(Vt)return ft;Vt=1;const r=k();function o(u){this.mode=r.BYTE,typeof u=="string"?this.data=new TextEncoder().encode(u):this.data=new Uint8Array(u)}return o.getBitsLength=function(n){return n*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(u){for(let n=0,t=this.data.length;n=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),n.put(e,13)}},dt=u,dt}var Ht;function Ce(){return Ht||(Ht=1,function(r){const o=k(),u=ge(),n=he(),t=me(),e=we(),i=$t(),a=v(),s=ee();function c(I){return unescape(encodeURIComponent(I)).length}function E(I,N,R){const B=[];let P;for(;(P=I.exec(R))!==null;)B.push({data:P[0],index:P.index,mode:N,length:P[0].length});return B}function p(I){const N=E(i.NUMERIC,o.NUMERIC,I),R=E(i.ALPHANUMERIC,o.ALPHANUMERIC,I);let B,P;return a.isKanjiModeEnabled()?(B=E(i.BYTE,o.BYTE,I),P=E(i.KANJI,o.KANJI,I)):(B=E(i.BYTE_KANJI,o.BYTE,I),P=[]),N.concat(R,B,P).sort(function(w,m){return w.index-m.index}).map(function(w){return{data:w.data,mode:w.mode,length:w.length}})}function y(I,N){switch(N){case o.NUMERIC:return u.getBitsLength(I);case o.ALPHANUMERIC:return n.getBitsLength(I);case o.KANJI:return e.getBitsLength(I);case o.BYTE:return t.getBitsLength(I)}}function f(I){return I.reduce(function(N,R){const B=N.length-1>=0?N[N.length-1]:null;return B&&B.mode===R.mode?(N[N.length-1].data+=R.data,N):(N.push(R),N)},[])}function M(I){const N=[];for(let R=0;R=0&&h<=6&&(T===0||T===6)||T>=0&&T<=6&&(h===0||h===6)||h>=2&&h<=4&&T>=2&&T<=4?d.set(g+h,C+T,!0,!0):d.set(g+h,C+T,!1,!0))}}function M(d){const w=d.size;for(let m=8;m>h&1)===1,d.set(A,g,C,!0),d.set(g,A,C,!0)}function I(d,w,m){const l=d.size,A=E.getEncodedBits(w,m);let g,C;for(g=0;g<15;g++)C=(A>>g&1)===1,g<6?d.set(g,8,C,!0):g<8?d.set(g+1,8,C,!0):d.set(l-15+g,8,C,!0),g<8?d.set(8,l-g-1,C,!0):g<9?d.set(8,15-g-1+1,C,!0):d.set(8,15-g-1,C,!0);d.set(l-8,8,1,!0)}function N(d,w){const m=d.size;let l=-1,A=m-1,g=7,C=0;for(let h=m-1;h>0;h-=2)for(h===6&&h--;;){for(let T=0;T<2;T++)if(!d.isReserved(A,h-T)){let U=!1;C>>g&1)===1),d.set(A,h-T,U),g--,g===-1&&(C++,g=7)}if(A+=l,A<0||m<=A){A-=l,l=-l;break}}}function R(d,w,m){const l=new u;m.forEach(function(T){l.put(T.mode.bit,4),l.put(T.getLength(),p.getCharCountIndicator(T.mode,d)),T.write(l)});const A=r.getSymbolTotalCodewords(d),g=a.getTotalCodewordsCount(d,w),C=(A-g)*8;for(l.getLengthInBits()+4<=C&&l.put(0,4);l.getLengthInBits()%8!==0;)l.putBit(0);const h=(C-l.getLengthInBits())/8;for(let T=0;T=7&&b(T,w),N(T,C),isNaN(l)&&(l=i.getBestMask(T,I.bind(null,T,m))),i.applyMask(l,T),I(T,m,l),{modules:T,version:w,errorCorrectionLevel:m,maskPattern:l,segments:A}}return $.create=function(w,m){if(typeof w>"u"||w==="")throw new Error("No input text");let l=o.M,A,g;return typeof m<"u"&&(l=o.from(m.errorCorrectionLevel,o.M),A=c.from(m.version),g=i.from(m.maskPattern),m.toSJISFunc&&r.setToSJISFunction(m.toSJISFunc)),P(w,A,l,g)},$}var gt={},ht={},Yt;function Wt(){return Yt||(Yt=1,function(r){function o(u){if(typeof u=="number"&&(u=u.toString()),typeof u!="string")throw new Error("Color should be defined as hex string");let n=u.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+u);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(e){return[e,e]}))),n.length===6&&n.push("F","F");const t=parseInt(n.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+n.slice(0,6).join("")}}r.getOptions=function(n){n||(n={}),n.color||(n.color={});const t=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,e=n.width&&n.width>=21?n.width:void 0,i=n.scale||4;return{width:e,scale:e?4:i,margin:t,color:{dark:o(n.color.dark||"#000000ff"),light:o(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},r.getScale=function(n,t){return t.width&&t.width>=n+t.margin*2?t.width/(n+t.margin*2):t.scale},r.getImageWidth=function(n,t){const e=r.getScale(n,t);return Math.floor((n+t.margin*2)*e)},r.qrToImageData=function(n,t,e){const i=t.modules.size,a=t.modules.data,s=r.getScale(i,e),c=Math.floor((i+e.margin*2)*s),E=e.margin*s,p=[e.color.light,e.color.dark];for(let y=0;y=E&&f>=E&&y"u"&&(!i||!i.getContext)&&(s=i,i=void 0),i||(c=n()),s=o.getOptions(s);const E=o.getImageWidth(e.modules.size,s),p=c.getContext("2d"),y=p.createImageData(E,E);return o.qrToImageData(y.data,e,s),u(p,c,E),p.putImageData(y,0,0),c},r.renderToDataURL=function(e,i,a){let s=a;typeof s>"u"&&(!i||!i.getContext)&&(s=i,i=void 0),s||(s={});const c=r.render(e,i,s),E=s.type||"image/png",p=s.rendererOpts||{};return c.toDataURL(E,p.quality)}}(gt)),gt}var mt={},Ot;function Be(){if(Ot)return mt;Ot=1;const r=Wt();function o(t,e){const i=t.a/255,a=e+'="'+t.hex+'"';return i<1?a+" "+e+'-opacity="'+i.toFixed(2).slice(1)+'"':a}function u(t,e,i){let a=t+e;return typeof i<"u"&&(a+=" "+i),a}function n(t,e,i){let a="",s=0,c=!1,E=0;for(let p=0;p0&&y>0&&t[p-1]||(a+=c?u("M",y+i,.5+f+i):u("m",s,0),s=0,c=!1),y+1':"",f="',M='viewBox="0 0 '+p+" "+p+'"',b=''+y+f+` `;return typeof a=="function"&&a(null,b),b},mt}var jt;function Ae(){if(jt)return V;jt=1;const r=ne(),o=Ee(),u=ye(),n=Be();function t(e,i,a,s,c){const E=[].slice.call(arguments,1),p=E.length,y=typeof E[p-1]=="function";if(!y&&!r())throw new Error("Callback required as last argument");if(y){if(p<2)throw new Error("Too few arguments provided");p===2?(c=a,a=i,i=s=void 0):p===3&&(i.getContext&&typeof c>"u"?(c=s,s=void 0):(c=s,s=a,a=i,i=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(a=i,i=s=void 0):p===2&&!i.getContext&&(s=a,a=i,i=void 0),new Promise(function(f,M){try{const S=o.create(a,s);f(e(S,i,s))}catch(S){M(S)}})}try{const f=o.create(a,s);c(null,e(f,i,s))}catch(f){c(f)}}return V.create=o.create,V.toCanvas=t.bind(null,u.render),V.toDataURL=t.bind(null,u.renderToDataURL),V.toString=t.bind(null,function(e,i,a){return n.render(e,a)}),V}var Re=Ae();const Te=te(Re);export{Te as Q};