1import{r as Tt,j as q}from"./animation-CddyXVCz.js";import{g as ce}from"./react-vendor-CbN3pvl2.js";import{B as bt}from"./index-CGKNpi9E.js";import"./supabase-iKSPld20.js";import"./docgen-Bp8WKBAE.js";import"./query-DPqpbKNH.js";var z={},x,It;function le(){return It||(It=1,x=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),x}var W={},_={},Pt;function k(){if(Pt)return _;Pt=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 _.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},_.getSymbolTotalCodewords=function(e){return o[e]},_.getBCHDigit=function(i){let e=0;for(;i!==0;)e++,i>>>=1;return e},_.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');r=e},_.isKanjiModeEnabled=function(){return typeof r<"u"},_.toSJIS=function(e){return r(e)},_}var Z={},St;function Bt(){return St||(St=1,(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.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: "+i)}}r.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},r.from=function(e,t){if(r.isValid(e))return e;try{return o(e)}catch{return t}}})(Z)),Z}var X,Mt;function fe(){if(Mt)return X;Mt=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let e=0;e<i;e++)this.putBit((o>>>i-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},X=r,X}var $,Lt;function de(){if(Lt)return $;Lt=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,i,e,t){const n=o*this.size+i;this.data[n]=e,t&&(this.reservedBit[n]=!0)},r.prototype.get=function(o,i){return this.data[o*this.size+i]},r.prototype.xor=function(o,i,e){this.data[o*this.size+i]^=e},r.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},$=r,$}var tt={},vt;function ge(){return vt||(vt=1,(function(r){const o=k().getSymbolSize;r.getRowColCoords=function(e){if(e===1)return[];const t=Math.floor(e/7)+2,n=o(e),s=n===145?26:Math.ceil((n-13)/(2*t-2))*2,u=[n-7];for(let a=1;a<t-1;a++)u[a]=u[a-1]-s;return u.push(6),u.reverse()},r.getPositions=function(e){const t=[],n=r.getRowColCoords(e),s=n.length;for(let u=0;u<s;u++)for(let a=0;a<s;a++)u===0&&a===0||u===0&&a===s-1||u===s-1&&a===0||t.push([n[u],n[a]]);return t}})(tt)),tt}var et={},Dt;function he(){if(Dt)return et;Dt=1;const r=k().getSymbolSize,o=7;return et.getPositions=function(e){const t=r(e);return[[0,0],[t-o,0],[0,t-o]]},et}var nt={},qt;function me(){return qt||(qt=1,(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const o={N1:3,N2:3,N3:40,N4:10};r.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const n=t.size;let s=0,u=0,a=0,c=null,d=null;for(let p=0;p<n;p++){u=a=0,c=d=null;for(let h=0;h<n;h++){let l=t.get(p,h);l===c?u++:(u>=5&&(s+=o.N1+(u-5)),c=l,u=1),l=t.get(h,p),l===d?a++:(a>=5&&(s+=o.N1+(a-5)),d=l,a=1)}u>=5&&(s+=o.N1+(u-5)),a>=5&&(s+=o.N1+(a-5))}return s},r.getPenaltyN2=function(t){const n=t.size;let s=0;for(let u=0;u<n-1;u++)for(let a=0;a<n-1;a++){const c=t.get(u,a)+t.get(u,a+1)+t.get(u+1,a)+t.get(u+1,a+1);(c===4||c===0)&&s++}return s*o.N2},r.getPenaltyN3=function(t){const n=t.size;let s=0,u=0,a=0;for(let c=0;c<n;c++){u=a=0;for(let d=0;d<n;d++)u=u<<1&2047|t.get(c,d),d>=10&&(u===1488||u===93)&&s++,a=a<<1&2047|t.get(d,c),d>=10&&(a===1488||a===93)&&s++}return s*o.N3},r.getPenaltyN4=function(t){let n=0;const s=t.data.length;for(let a=0;a<s;a++)n+=t.data[a];return Math.abs(Math.ceil(n*100/s/5)-10)*o.N4};function i(e,t,n){switch(e){case r.Patterns.PATTERN000:return(t+n)%2===0;case r.Patterns.PATTERN001:return t%2===0;case r.Patterns.PATTERN010:return n%3===0;case r.Patterns.PATTERN011:return(t+n)%3===0;case r.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2===0;case r.Patterns.PATTERN101:return t*n%2+t*n%3===0;case r.Patterns.PATTERN110:return(t*n%2+t*n%3)%2===0;case r.Patterns.PATTERN111:return(t*n%3+(t+n)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}r.applyMask=function(t,n){const s=n.size;
1for(let u=0;u<s;u++)for(let a=0;a<s;a++)n.isReserved(a,u)||n.xor(a,u,i(t,a,u))},r.getBestMask=function(t,n){const s=Object.keys(r.Patterns).length;let u=0,a=1/0;for(let c=0;c<s;c++){n(c),r.applyMask(c,t);const d=r.getPenaltyN1(t)+r.getPenaltyN2(t)+r.getPenaltyN3(t)+r.getPenaltyN4(t);r.applyMask(c,t),d<a&&(a=d,u=c)}return u}})(nt)),nt}var O={},Ut;function ne(){if(Ut)return O;Ut=1;const r=Bt(),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return O.getBlocksCount=function(t,n){switch(n){case r.L:return o[(t-1)*4+0];case r.M:return o[(t-1)*4+1];case r.Q:return o[(t-1)*4+2];case r.H:return o[(t-1)*4+3];default:return}},O.getTotalCodewordsCount=function(t,n){switch(n){case r.L:return i[(t-1)*4+0];case r.M:return i[(t-1)*4+1];case r.Q:return i[(t-1)*4+2];case r.H:return i[(t-1)*4+3];default:return}},O}var rt={},H={},_t;function we(){if(_t)return H;_t=1;const r=new Uint8Array(512),o=new Uint8Array(256);return(function(){let e=1;for(let t=0;t<255;t++)r[t]=e,o[e]=t,e<<=1,e&256&&(e^=285);for(let t=255;t<512;t++)r[t]=r[t-255]})(),H.log=function(e){if(e<1)throw new Error("log("+e+")");return o[e]},H.exp=function(e){return r[e]},H.mul=function(e,t){return e===0||t===0?0:r[o[e]+o[t]]},H}var kt;function ye(){return kt||(kt=1,(function(r){const o=we();r.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let s=0;s<e.length;s++)for(let u=0;u<t.length;u++)n[s+u]^=o.mul(e[s],t[u]);return n},r.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const s=n[0];for(let a=0;a<t.length;a++)n[a]^=o.mul(t[a],s);let u=0;for(;u<n.length&&n[u]===0;)u++;n=n.slice(u)}return n},r.generateECPolynomial=function(e){let t=new Uint8Array([1]);for(let n=0;n<e;n++)t=r.mul(t,new Uint8Array([1,o.exp(n)]));return t}})(rt)),rt}var ot,Ft;function Ce(){if(Ft)return ot;Ft=1;const r=ye();function o(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}return o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),s=this.degree-n.length;if(s>0){const u=new Uint8Array(this.degree);return u.set(n,s),u}return n},ot=o,ot}var it={},st={},ut={},jt;function re(){return jt||(jt=1,ut.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),ut}var L={},zt;function oe(){if(zt)return L;zt=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const e="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r 2]))+`;L.KANJI=new RegExp(i,"g"),L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),L.BYTE=new RegExp(e,"g"),L.NUMERIC=new RegExp(r,"g"),L.ALPHANUMERIC=new RegExp(o,"g");const t=new RegExp("^"+i+"$"),n=new RegExp("^"+r+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return L.testKanji=function(a){return t.test(a)},L.testNumeric=function(a){return n.test(a)},L.testAlphanumeric=function(a){return s.test(a)},L}var Vt;function F(){return Vt||(Vt=1,(function(r){const o=re(),i=oe();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(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!o.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?n.ccBits[0]:s<27?n.ccBits[1]:n.ccBits[2]}
2,r.getBestModeForData=function(n){return i.testNumeric(n)?r.NUMERIC:i.testAlphanumeric(n)?r.ALPHANUMERIC:i.testKanji(n)?r.KANJI:r.BYTE},r.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},r.isValid=function(n){return n&&n.bit&&n.ccBits};function e(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(n,s){if(r.isValid(n))return n;try{return e(n)}catch{return s}}})(st)),st}var Ht;function Ee(){return Ht||(Ht=1,(function(r){const o=k(),i=ne(),e=Bt(),t=F(),n=re(),s=7973,u=o.getBCHDigit(s);function a(h,l,b){for(let I=1;I<=40;I++)if(l<=r.getCapacity(I,b,h))return I}function c(h,l){return t.getCharCountIndicator(h,l)+4}function d(h,l){let b=0;return h.forEach(function(I){const S=c(I.mode,l);b+=S+I.getBitsLength()}),b}function p(h,l){for(let b=1;b<=40;b++)if(d(h,b)<=r.getCapacity(b,l,t.MIXED))return b}r.from=function(l,b){return n.isValid(l)?parseInt(l,10):b},r.getCapacity=function(l,b,I){if(!n.isValid(l))throw new Error("Invalid QR Code version");typeof I>"u"&&(I=t.BYTE);const S=o.getSymbolTotalCodewords(l),A=i.getTotalCodewordsCount(l,b),P=(S-A)*8;if(I===t.MIXED)return P;const N=P-c(I,l);switch(I){case t.NUMERIC:return Math.floor(N/10*3);case t.ALPHANUMERIC:return Math.floor(N/11*2);case t.KANJI:return Math.floor(N/13);case t.BYTE:default:return Math.floor(N/8)}},r.getBestVersionForData=function(l,b){let I;const S=e.from(b,e.M);if(Array.isArray(l)){if(l.length>1)return p(l,S);if(l.length===0)return 1;I=l[0]}else I=l;return a(I.mode,I.getLength(),S)},r.getEncodedBits=function(l){if(!n.isValid(l)||l<7)throw new Error("Invalid QR Code version");let b=l<<12;for(;o.getBCHDigit(b)-u>=0;)b^=s<<o.getBCHDigit(b)-u;return l<<12|b}})(it)),it}var at={},Kt;function pe(){if(Kt)return at;Kt=1;const r=k(),o=1335,i=21522,e=r.getBCHDigit(o);return at.getEncodedBits=function(n,s){const u=n.bit<<3|s;let a=u<<10;for(;r.getBCHDigit(a)-e>=0;)a^=o<<r.getBCHDigit(a)-e;return(u<<10|a)^i},at}var ct={},lt,Ot;function Be(){if(Ot)return lt;Ot=1;const r=F();function o(i){this.mode=r.NUMERIC,this.data=i.toString()}return o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n,s;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),s=parseInt(n,10),e.put(s,10);const u=this.data.length-t;u>0&&(n=this.data.substr(t),s=parseInt(n,10),e.put(s,u*3+1))},lt=o,lt}var ft,Jt;function Re(){if(Jt)return ft;Jt=1;const r=F(),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 i(e){this.mode=r.ALPHANUMERIC,this.data=e}return i.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=o.indexOf(this.data[n])*45;s+=o.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(o.indexOf(this.data[n]),6)},ft=i,ft}var dt,Qt;function Ae(){if(Qt)return dt;Qt=1;const r=F();function o(i){this.mode=r.BYTE,typeof i=="string"?this.data=new TextEncoder().encode(i):this.data=new Uint8Array(i)}return o.getBitsLength=function(e){return e*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(i){for(let e=0,t=this.data.length;e<t;e++)i.put(this.data[e],8)},dt=o,dt}var gt,Yt;function Ne(){if(Yt)return gt;Yt=1;const r=F(),o=k();function i(e){this.mode=r.KANJI,this.data=e}return i.getBitsLength=function(t){return t*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=o.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` 3Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},gt=i,gt}var ht={exports:{}},Gt;function Te(){return Gt||(Gt=1,(function(r){var o={single_source_shortest_paths:function(i,e,t){var n={},s={};s[e]=0;var u=o.PriorityQueue.make();u.push(e,0);for(var a,c,d,p,h,l,b,I,S;!u.empty();){a=u.pop(),c=a.value,p=a.cost,h=i[c]||{};for(d in h)h.hasOwnProperty(d)&&(l=h[d],b=p+l,I=s[d],S=typeof s[d]>"u",(S||I>b)&&(s[d]=b,u.push(d,b),n[d]=c))}if(typeof t<"u"&&typeof s[t]>"u"){var A=["Could not find a path from ",e," to ",t,"."].join("");throw new Error(A)}return n},extract_shortest_path_from_predecessor_list:function(i,e){for(var t=[],n=e;n;)t.push(n),i[n],n=i[n];return t.reverse(),t},find_path:function(i,e,t){var n=o.single_source_shortest_paths(i,e,t);return o.extract_shortest_path_from_predecessor_list(n,t)},PriorityQueue:{make:function(i){var e=o.PriorityQueue,t={},n;i=i||{};for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t.queue=[],t.sorter=i.sorter||e.default_sorter,t},default_sorter:function(i,e){return i.cost-e.cost},push:function(i,e){var t={value:i,cost:e};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=o})(ht)),ht.exports}var xt;function be(){return xt||(xt=1,(function(r){const o=F(),i=Be(),e=Re(),t=Ae(),n=Ne(),s=oe(),u=k(),a=Te();function c(A){return unescape(encodeURIComponent(A)).length}function d(A,P,N){const B=[];let M;for(;(M=A.exec(N))!==null;)B.push({data:M[0],index:M.index,mode:P,length:M[0].length});return B}function p(A){const P=d(s.NUMERIC,o.NUMERIC,A),N=d(s.ALPHANUMERIC,o.ALPHANUMERIC,A);let B,M;return u.isKanjiModeEnabled()?(B=d(s.BYTE,o.BYTE,A),M=d(s.KANJI,o.KANJI,A)):(B=d(s.BYTE_KANJI,o.BYTE,A),M=[]),P.concat(N,B,M).sort(function(C,y){return C.index-y.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function h(A,P){switch(P){case o.NUMERIC:return i.getBitsLength(A);case o.ALPHANUMERIC:return e.getBitsLength(A);case o.KANJI:return n.getBitsLength(A);case o.BYTE:return t.getBitsLength(A)}}function l(A){return A.reduce(function(P,N){const B=P.length-1>=0?P[P.length-1]:null;return B&&B.mode===N.mode?(P[P.length-1].data+=N.data,P):(P.push(N),P)},[])}function b(A){const P=[];for(let N=0;N<A.length;N++){const B=A[N];switch(B.mode){case o.NUMERIC:P.push([B,{data:B.data,mode:o.ALPHANUMERIC,length:B.length},{data:B.data,mode:o.BYTE,length:B.length}]);break;case o.ALPHANUMERIC:P.push([B,{data:B.data,mode:o.BYTE,length:B.length}]);break;case o.KANJI:P.push([B,{data:B.data,mode:o.BYTE,length:c(B.data)}]);break;case o.BYTE:P.push([{data:B.data,mode:o.BYTE,length:c(B.data)}])}}return P}function I(A,P){const N={},B={start:{}};let M=["start"];for(let g=0;g<A.length;g++){const C=A[g],y=[];for(let f=0;f<C.length;f++){const R=C[f],m=""+g+f;y.push(m),N[m]={node:R,lastCount:0},B[m]={};for(let E=0;E<M.length;E++){const w=M[E];N[w]&&N[w].node.mode===R.mode?(B[w][m]=h(N[w].lastCount+R.length,R.mode)-h(N[w].lastCount,R.mode),N[w].lastCount+=R.length):(N[w]&&(N[w].lastCount=R.length),B[w][m]=h(R.length,R.mode)+4+o.getCharCountIndicator(R.mode,P))}}M=y}for(let g=0;g<M.length;g++)B[M[g]].end=0;return{map:B,table:N}}function S(A,P){let N;const B=o.getBestModeForData(A);if(N=o.from(P,B),N!==o.BYTE&&N.bit<B.bit)throw new Error('"'+A+'" cannot be encoded with mode '+o.toString(N)+`. 4 Suggested mode is: `+o.toString(B));switch(N===o.KANJI&&!u.isKanjiModeEnabled()&&(N=o.BYTE),N){case o.NUMERIC:return new i(A);case o.ALPHANUMERIC:return new e(A);case o.KANJI:return new n(A);case o.BYTE:return new t(A)}}r.fromArray=function(P){return P.reduce(function(N,B){return typeof B=="str
4ing"?N.push(S(B,null)):B.data&&N.push(S(B.data,B.mode)),N},[])},r.fromString=function(P,N){const B=p(P,u.isKanjiModeEnabled()),M=b(B),g=I(M,N),C=a.find_path(g.map,"start","end"),y=[];for(let f=1;f<C.length-1;f++)y.push(g.table[C[f]].node);return r.fromArray(l(y))},r.rawSplit=function(P){return r.fromArray(p(P,u.isKanjiModeEnabled()))}})(ct)),ct}var Wt;function Ie(){if(Wt)return W;Wt=1;const r=k(),o=Bt(),i=fe(),e=de(),t=ge(),n=he(),s=me(),u=ne(),a=Ce(),c=Ee(),d=pe(),p=F(),h=be();function l(g,C){const y=g.size,f=n.getPositions(C);for(let R=0;R<f.length;R++){const m=f[R][0],E=f[R][1];for(let w=-1;w<=7;w++)if(!(m+w<=-1||y<=m+w))for(let T=-1;T<=7;T++)E+T<=-1||y<=E+T||(w>=0&&w<=6&&(T===0||T===6)||T>=0&&T<=6&&(w===0||w===6)||w>=2&&w<=4&&T>=2&&T<=4?g.set(m+w,E+T,!0,!0):g.set(m+w,E+T,!1,!0))}}function b(g){const C=g.size;for(let y=8;y<C-8;y++){const f=y%2===0;g.set(y,6,f,!0),g.set(6,y,f,!0)}}function I(g,C){const y=t.getPositions(C);for(let f=0;f<y.length;f++){const R=y[f][0],m=y[f][1];for(let E=-2;E<=2;E++)for(let w=-2;w<=2;w++)E===-2||E===2||w===-2||w===2||E===0&&w===0?g.set(R+E,m+w,!0,!0):g.set(R+E,m+w,!1,!0)}}function S(g,C){const y=g.size,f=c.getEncodedBits(C);let R,m,E;for(let w=0;w<18;w++)R=Math.floor(w/3),m=w%3+y-8-3,E=(f>>w&1)===1,g.set(R,m,E,!0),g.set(m,R,E,!0)}function A(g,C,y){const f=g.size,R=d.getEncodedBits(C,y);let m,E;for(m=0;m<15;m++)E=(R>>m&1)===1,m<6?g.set(m,8,E,!0):m<8?g.set(m+1,8,E,!0):g.set(f-15+m,8,E,!0),m<8?g.set(8,f-m-1,E,!0):m<9?g.set(8,15-m-1+1,E,!0):g.set(8,15-m-1,E,!0);g.set(f-8,8,1,!0)}function P(g,C){const y=g.size;let f=-1,R=y-1,m=7,E=0;for(let w=y-1;w>0;w-=2)for(w===6&&w--;;){for(let T=0;T<2;T++)if(!g.isReserved(R,w-T)){let U=!1;E<C.length&&(U=(C[E]>>>m&1)===1),g.set(R,w-T,U),m--,m===-1&&(E++,m=7)}if(R+=f,R<0||y<=R){R-=f,f=-f;break}}}function N(g,C,y){const f=new i;y.forEach(function(T){f.put(T.mode.bit,4),f.put(T.getLength(),p.getCharCountIndicator(T.mode,g)),T.write(f)});const R=r.getSymbolTotalCodewords(g),m=u.getTotalCodewordsCount(g,C),E=(R-m)*8;for(f.getLengthInBits()+4<=E&&f.put(0,4);f.getLengthInBits()%8!==0;)f.putBit(0);const w=(E-f.getLengthInBits())/8;for(let T=0;T<w;T++)f.put(T%2?17:236,8);return B(f,g,C)}function B(g,C,y){const f=r.getSymbolTotalCodewords(C),R=u.getTotalCodewordsCount(C,y),m=f-R,E=u.getBlocksCount(C,y),w=f%E,T=E-w,U=Math.floor(f/E),V=Math.floor(m/E),se=V+1,Rt=U-V,ue=new a(Rt);let J=0;const K=new Array(E),At=new Array(E);let Q=0;const ae=new Uint8Array(g.buffer);for(let j=0;j<E;j++){const G=j<T?V:se;K[j]=ae.slice(J,J+G),At[j]=ue.encode(K[j]),J+=G,Q=Math.max(Q,G)}const Y=new Uint8Array(f);let Nt=0,v,D;for(v=0;v<Q;v++)for(D=0;D<E;D++)v<K[D].length&&(Y[Nt++]=K[D][v]);for(v=0;v<Rt;v++)for(D=0;D<E;D++)Y[Nt++]=At[D][v];return Y}function M(g,C,y,f){let R;if(Array.isArray(g))R=h.fromArray(g);else if(typeof g=="string"){let U=C;if(!U){const V=h.rawSplit(g);U=c.getBestVersionForData(V,y)}R=h.fromString(g,U||40)}else throw new Error("Invalid data");const m=c.getBestVersionForData(R,y);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(!C)C=m;else if(C<m)throw new Error(` 5The chosen QR Code version cannot contain this amount of data. 6Minimum version required to store current data is: `+m+`. 7`);const E=N(C,y,R),w=r.getSymbolSize(C),T=new e(w);return l(T,C),b(T),I(T,C),A(T,y,0),C>=7&&S(T,C),P(T,E),isNaN(f)&&(f=s.getBestMask(T,A.bind(null,T,y))),s.applyMask(f,T),A(T,y,f),{modules:T,version:C,errorCorrectionLevel:y,maskPattern:f,segments:R}}return W.create=function(C,y){if(typeof C>"u"||C==="")throw new Error("No input text");let f=o.M,R,m;return typeof y<"u"&&(f=o.from(y.errorCorrectionLevel,o.M),R=c.from(y.version),m=s.from(y.maskPattern),y.toSJISFunc&&r.setToSJISFunction(y.toSJISFunc)),M(C,R,f,m)},W}var mt={},wt={},Zt;function ie(){return Zt||(Zt=1,(function(r){function o(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let e=i.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+i);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(n){return[n,n]}))),e.length===6&&e.push("F","F");const t=parseInt(e.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+e.slice(0,6).join("")}}r.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,s=e.scale||4;
7return{width:n,scale:n?4:s,margin:t,color:{dark:o(e.color.dark||"#000000ff"),light:o(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},r.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},r.getImageWidth=function(e,t){const n=r.getScale(e,t);return Math.floor((e+t.margin*2)*n)},r.qrToImageData=function(e,t,n){const s=t.modules.size,u=t.modules.data,a=r.getScale(s,n),c=Math.floor((s+n.margin*2)*a),d=n.margin*a,p=[n.color.light,n.color.dark];for(let h=0;h<c;h++)for(let l=0;l<c;l++){let b=(h*c+l)*4,I=n.color.light;if(h>=d&&l>=d&&h<c-d&&l<c-d){const S=Math.floor((h-d)/a),A=Math.floor((l-d)/a);I=p[u[S*s+A]?1:0]}e[b++]=I.r,e[b++]=I.g,e[b++]=I.b,e[b]=I.a}}})(wt)),wt}var Xt;function Pe(){return Xt||(Xt=1,(function(r){const o=ie();function i(t,n,s){t.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=s,n.width=s,n.style.height=s+"px",n.style.width=s+"px"}function e(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}r.render=function(n,s,u){let a=u,c=s;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(c=e()),a=o.getOptions(a);const d=o.getImageWidth(n.modules.size,a),p=c.getContext("2d"),h=p.createImageData(d,d);return o.qrToImageData(h.data,n,a),i(p,c,d),p.putImageData(h,0,0),c},r.renderToDataURL=function(n,s,u){let a=u;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const c=r.render(n,s,a),d=a.type||"image/png",p=a.rendererOpts||{};return c.toDataURL(d,p.quality)}})(mt)),mt}var yt={},$t;function Se(){if($t)return yt;$t=1;const r=ie();function o(t,n){const s=t.a/255,u=n+'="'+t.hex+'"';return s<1?u+" "+n+'-opacity="'+s.toFixed(2).slice(1)+'"':u}function i(t,n,s){let u=t+n;return typeof s<"u"&&(u+=" "+s),u}function e(t,n,s){let u="",a=0,c=!1,d=0;for(let p=0;p<t.length;p++){const h=Math.floor(p%n),l=Math.floor(p/n);!h&&!c&&(c=!0),t[p]?(d++,p>0&&h>0&&t[p-1]||(u+=c?i("M",h+s,.5+l+s):i("m",a,0),a=0,c=!1),h+1<n&&t[p+1]||(u+=i("h",d),d=0)):a++}return u}return yt.render=function(n,s,u){const a=r.getOptions(s),c=n.modules.size,d=n.modules.data,p=c+a.margin*2,h=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+p+"v"+p+'H0z"/>':"",l="<path "+o(a.color.dark,"stroke")+' d="'+e(d,c,a.margin)+'"/>',b='viewBox="0 0 '+p+" "+p+'"',S='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+b+' shape-rendering="crispEdges">'+h+l+`</svg> 8`;return typeof u=="function"&&u(null,S),S},yt}var te;function Me(){if(te)return z;te=1;const r=le(),o=Ie(),i=Pe(),e=Se();function t(n,s,u,a,c){const d=[].slice.call(arguments,1),p=d.length,h=typeof d[p-1]=="function";if(!h&&!r())throw new Error("Callback required as last argument");if(h){if(p<2)throw new Error("Too few arguments provided");p===2?(c=u,u=s,s=a=void 0):p===3&&(s.getContext&&typeof c>"u"?(c=a,a=void 0):(c=a,a=u,u=s,s=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(u=s,s=a=void 0):p===2&&!s.getContext&&(a=u,u=s,s=void 0),new Promise(function(l,b){try{const I=o.create(u,a);l(n(I,s,a))}catch(I){b(I)}})}try{const l=o.create(u,a);c(null,n(l,s,a))}catch(l){c(l)}}return z.create=o.create,z.toCanvas=t.bind(null,i.render),z.toDataURL=t.bind(null,i.renderToDataURL),z.toString=t.bind(null,function(n,s,u){return e.render(n,u)}),z}var Le=Me();const Ct=ce(Le),ve={utm_source:"qr",utm_medium:"offline",utm_campaign:"portfolio-share"},De=r=>{const o=new URL(r);for(const[i,e]of Object.entries(ve))o.searchParams.set(i,e);return o.toString()},Et="#1f2937",pt="#ffffff",ee=(r,o)=>{const i=document.createElement("a");i.href=r,i.download=o,document.body.appendChild(i),i.click(),i.remove()},ze=({portfolioUrl:r,slug:o})=>{const i=De(r),[e,t]=Tt.useState(null);Tt.useEffect(()=>{let u=!1;return Ct.toString(i,{type:"svg",errorCorrectionLevel:"Q",margin:2,color:{dark:Et,light:pt}}).then(a=>{u||t(a)}).catch(()=>{u||t(null)}),()=>{u=!0}},[i]);const n=async()=>{const u=await Ct.toDataURL(i,{width:1e3,errorCorrectionLevel:"Q",margin:4,color:{dark:Et,light:pt}});ee(u,`${o}-portfolio-qr.png`)},s=async()=>{const u=await Ct.toString(i,{type:"svg",errorCorrectionLevel:"Q",margin:4,color:{dar
8k:Et,light:pt}}),a=new Blob([u],{type:"image/svg+xml"}),c=URL.createObjectURL(a);try{ee(c,`${o}-portfolio-qr.svg`)}finally{setTimeout(()=>URL.revokeObjectURL(c),1e3)}};return e?q.jsx("div",{className:"p-4 rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900",children:q.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[q.jsx("div",{className:"w-32 h-32 shrink-0 rounded-lg bg-white p-1.5 border border-slate-200",role:"img","aria-label":`QR code linking to ${r}`,dangerouslySetInnerHTML:{__html:e}}),q.jsxs("div",{className:"flex-1 text-center sm:text-left",children:[q.jsx("p",{className:"text-sm font-semibold text-slate-900 dark:text-white",children:"Share it offline"}),q.jsx("p",{className:"mt-1 text-sm text-slate-600 dark:text-slate-400",children:"Add it to your resume or business card â scans open your portfolio."}),q.jsxs("div",{className:"mt-3 flex flex-wrap justify-center sm:justify-start gap-2",children:[q.jsx(bt,{onClick:n,variant:"secondary",size:"sm",children:"Download PNG"}),q.jsx(bt,{onClick:s,variant:"secondary",size:"sm",children:"Download SVG"})]})]})]})}):null};export{ze as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.