@doubao-dev/cli 1.0.0-rc.5 → 1.0.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/691.js +53 -53
- package/dist/build.js +1 -0
- package/dist/command.js +8 -8
- package/dist/command~1.js +3 -3
- package/dist/index.d.ts +624 -5
- package/dist/main.d.ts +624 -5
- package/dist/preview.js +5 -5
- package/dist/skills/doubao-plugin-cli/references/upload.md +2 -0
- package/package.json +3 -3
package/dist/preview.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{setTimeout as e}from"node:timers/promises";import{stripVTControlCharacters as t}from"node:util";import n from"node:fs/promises";import o from"node:os";import r from"node:path";import{pathToFileURL as i}from"node:url";import{z as s}from"zod";import{__webpack_require__ as l}from"./rslib-runtime.js";import{node_modules_open as d}from"./open.js";import{dist_ve as a,createPreview as u,getBuildStatus as h,pluginIdentity as p,pD as c,isInteractive as f,error_errorMessage as m,chalk_source as _}from"./691.js";import{withProgress as g}from"./progress.js";l.add({"../../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js"(e){var t={single_source_shortest_paths:function(e,n,o){var r,i,s,l,d,a,u,h={},p={};p[n]=0;var c=t.PriorityQueue.make();for(c.push(n,0);!c.empty();)for(s in i=(r=c.pop()).value,l=r.cost,d=e[i]||{})d.hasOwnProperty(s)&&(a=l+d[s],u=p[s],(void 0===p[s]||u>a)&&(p[s]=a,c.push(s,a),h[s]=i));if(void 0!==o&&void 0===p[o])throw Error(["Could not find a path from ",n," to ",o,"."].join(""));return h},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],o=t;o;)n.push(o),e[o],o=e[o];return n.reverse(),n},find_path:function(e,n,o){var r=t.single_source_shortest_paths(e,n,o);return t.extract_shortest_path_from_predecessor_list(r,o)},PriorityQueue:{make:function(e){var n,o=t.PriorityQueue,r={};for(n in e=e||{},o)o.hasOwnProperty(n)&&(r[n]=o[n]);return r.queue=[],r.sorter=e.sorter||o.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitmapper.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/interlace.js"),r=[function(){},function(e,t,n,o){if(o===t.length)throw Error("Ran out of data");let r=t[o];e[n]=r,e[n+1]=r,e[n+2]=r,e[n+3]=255},function(e,t,n,o){if(o+1>=t.length)throw Error("Ran out of data");let r=t[o];e[n]=r,e[n+1]=r,e[n+2]=r,e[n+3]=t[o+1]},function(e,t,n,o){if(o+2>=t.length)throw Error("Ran out of data");e[n]=t[o],e[n+1]=t[o+1],e[n+2]=t[o+2],e[n+3]=255},function(e,t,n,o){if(o+3>=t.length)throw Error("Ran out of data");e[n]=t[o],e[n+1]=t[o+1],e[n+2]=t[o+2],e[n+3]=t[o+3]}],i=[function(){},function(e,t,n,o){let r=t[0];e[n]=r,e[n+1]=r,e[n+2]=r,e[n+3]=o},function(e,t,n){let o=t[0];e[n]=o,e[n+1]=o,e[n+2]=o,e[n+3]=t[1]},function(e,t,n,o){e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2],e[n+3]=o},function(e,t,n){e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2],e[n+3]=t[3]}];t.dataToBitMap=function(e,t){let n,s,l,d,a,u,h=t.width,p=t.height,c=t.depth,f=t.bpp,m=t.interlace;8!==c&&(n=[],s=0,l={get:function(t){for(;n.length<t;)!function(){let t,o,r,i;if(s===e.length)throw Error("Ran out of data");let l=e[s];switch(s++,c){default:throw Error("unrecognised depth");case 16:r=e[s],s++,n.push((l<<8)+r);break;case 4:r=15&l,i=l>>4,n.push(i,r);break;case 2:t=3&l,o=l>>2&3,r=l>>4&3,i=l>>6&3,n.push(i,r,o,t);break;case 1:t=l>>4&1,o=l>>5&1,r=l>>6&1,i=l>>7&1,n.push(i,r,o,t,l>>3&1,l>>2&1,l>>1&1,1&l)}}();let o=n.slice(0,t);return n=n.slice(t),o},resetAfterLine:function(){n.length=0},end:function(){if(s!==e.length)throw Error("extra data found")}}),d=c<=8?Buffer.alloc(h*p*4):new Uint16Array(h*p*4);let _=Math.pow(2,c)-1,g=0;if(m)a=o.getImagePasses(h,p),u=o.getInterlaceIterator(h,p);else{let e=0;u=function(){let t=e;return e+=4,t},a=[{width:h,height:p}]}for(let t=0;t<a.length;t++)8===c?g=function(e,t,n,o,i,s){let l=e.width,d=e.height,a=e.index;for(let e=0;e<d;e++)for(let d=0;d<l;d++){let l=n(d,e,a);r[o](t,i,l,s),s+=o}return s}(a[t],d,u,f,e,g):function(e,t,n,o,r,s){let l=e.width,d=e.height,a=e.index;for(let e=0;e<d;e++){for(let d=0;d<l;d++){let l=r.get(o),u=n(d,e,a);i[o](t,l,u,s)}r.resetAfterLine()}}(a[t],d,u,f,l,_);if(8===c){if(g!==e.length)throw Error("extra data found")}else l.end();return d}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitpacker.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js");e.exports=function(e,t,n,r){let i=-1!==[o.COLORTYPE_COLOR_ALPHA,o.COLORTYPE_ALPHA].indexOf(r.colorType);if(r.colorType===r.inputColorType){let t,n=(new DataView(t=new ArrayBuffer(2)).setInt16(0,256,!0),256!==new Int16Array(t)[0]);if(8===r.bitDepth||16===r.bitDepth&&n)return e}let s=16!==r.bitDepth?e:new Uint16Array(e.buffer),l=255,d=o.COLORTYPE_TO_BPP_MAP[r.inputColorType];4!==d||r.inputHasAlpha||(d=3);let a=o.COLORTYPE_TO_BPP_MAP[r.colorType];16===r.bitDepth&&(l=65535,a*=2);let u=Buffer.alloc(t*n*a),h=0,p=0,c=r.bgColor||{};void 0===c.red&&(c.red=l),void 0===c.green&&(c.green=l),void 0===c.blue&&(c.blue=l);for(let e=0;e<n;e++)for(let e=0;e<t;e++){let e=function(){let e,t,n,d=l;switch(r.inputColorType){case o.COLORTYPE_COLOR_ALPHA:d=s[h+3],e=s[h],t=s[h+1],n=s[h+2];break;case o.COLORTYPE_COLOR:e=s[h],t=s[h+1],n=s[h+2];break;case o.COLORTYPE_ALPHA:d=s[h+1],t=e=s[h],n=e;break;case o.COLORTYPE_GRAYSCALE:t=e=s[h],n=e;break;default:throw Error("input color type:"+r.inputColorType+" is not supported at present")}return r.inputHasAlpha&&!i&&(d/=l,e=Math.min(Math.max(Math.round((1-d)*c.red+d*e),0),l),t=Math.min(Math.max(Math.round((1-d)*c.green+d*t),0),l),n=Math.min(Math.max(Math.round((1-d)*c.blue+d*n),0),l)),{red:e,green:t,blue:n,alpha:d}}();switch(r.colorType){case o.COLORTYPE_COLOR_ALPHA:case o.COLORTYPE_COLOR:8===r.bitDepth?(u[p]=e.red,u[p+1]=e.green,u[p+2]=e.blue,i&&(u[p+3]=e.alpha)):(u.writeUInt16BE(e.red,p),u.writeUInt16BE(e.green,p+2),u.writeUInt16BE(e.blue,p+4),i&&u.writeUInt16BE(e.alpha,p+6));break;case o.COLORTYPE_ALPHA:case o.COLORTYPE_GRAYSCALE:{let t=(e.red+e.green+e.blue)/3;8===r.bitDepth?(u[p]=t,i&&(u[p+1]=e.alpha)):(u.writeUInt16BE(t,p),i&&u.writeUInt16BE(e.alpha,p+2));break}default:throw Error("unrecognised color Type "+r.colorType)}h+=d,p+=a}return u}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/chunkstream.js"(e,t,n){let o=n("util"),r=n("stream"),i=e.exports=function(){r.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};o.inherits(i,r),i.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t}),process.nextTick((function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}).bind(this))},i.prototype.write=function(e,t){let n;return this.writable?(n=Buffer.isBuffer(e)?e:Buffer.from(e,t||this._encoding),this._buffers.push(n),this._buffered+=n.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",Error("Stream not writable")),!1)},i.prototype.end=function(e,t){e&&this.write(e,t),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},i.prototype.destroySoon=i.prototype.end,i.prototype._end=function(){this._reads.length>0&&this.emit("error",Error("Unexpected end of input")),this.destroy()},i.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},i.prototype._processReadAllowingLess=function(e){this._reads.shift();let t=this._buffers[0];t.length>e.length?(this._buffered-=e.length,this._buffers[0]=t.slice(e.length),e.func.call(this,t.slice(0,e.length))):(this._buffered-=t.length,this._buffers.shift(),e.func.call(this,t))},i.prototype._processRead=function(e){this._reads.shift();let t=0,n=0,o=Buffer.alloc(e.length);for(;t<e.length;){let r=this._buffers[n++],i=Math.min(r.length,e.length-t);r.copy(o,t,0,i),t+=i,i!==r.length&&(this._buffers[--n]=r.slice(i))}n>0&&this._buffers.splice(0,n),this._buffered-=e.length,e.func.call(this,o)},i.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let e=this._reads[0];if(e.allowLess)this._processReadAllowingLess(e);else if(this._buffered>=e.length)this._processRead(e);else break}this._buffers&&!this.writable&&this._end()}catch(e){this.emit("error",e)}}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"(e){e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:0x49484452,TYPE_IEND:0x49454e44,TYPE_IDAT:0x49444154,TYPE_PLTE:0x504c5445,TYPE_tRNS:0x74524e53,TYPE_gAMA:0x67414d41,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/crc.js"(e){let t=[];for(let e=0;e<256;e++){let n=e;for(let e=0;e<8;e++)1&n?n=0xedb88320^n>>>1:n>>>=1;t[e]=n}let n=e.exports=function(){this._crc=-1};n.prototype.write=function(e){for(let n=0;n<e.length;n++)this._crc=t[(this._crc^e[n])&255]^this._crc>>>8;return!0},n.prototype.crc32=function(){return -1^this._crc},n.crc32=function(e){let n=-1;for(let o=0;o<e.length;o++)n=t[(n^e[o])&255]^n>>>8;return -1^n}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-pack.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/paeth-predictor.js"),r={0:function(e,t,n,o,r){for(let i=0;i<n;i++)o[r+i]=e[t+i]},1:function(e,t,n,o,r,i){for(let s=0;s<n;s++){let n=s>=i?e[t+s-i]:0,l=e[t+s]-n;o[r+s]=l}},2:function(e,t,n,o,r){for(let i=0;i<n;i++){let s=t>0?e[t+i-n]:0,l=e[t+i]-s;o[r+i]=l}},3:function(e,t,n,o,r,i){for(let s=0;s<n;s++){let l=s>=i?e[t+s-i]:0,d=t>0?e[t+s-n]:0,a=e[t+s]-(l+d>>1);o[r+s]=a}},4:function(e,t,n,r,i,s){for(let l=0;l<n;l++){let d=l>=s?e[t+l-s]:0,a=t>0?e[t+l-n]:0,u=t>0&&l>=s?e[t+l-(n+s)]:0,h=e[t+l]-o(d,a,u);r[i+l]=h}}},i={0:function(e,t,n){let o=0,r=t+n;for(let n=t;n<r;n++)o+=Math.abs(e[n]);return o},1:function(e,t,n,o){let r=0;for(let i=0;i<n;i++){let n=i>=o?e[t+i-o]:0;r+=Math.abs(e[t+i]-n)}return r},2:function(e,t,n){let o=0,r=t+n;for(let i=t;i<r;i++){let r=t>0?e[i-n]:0;o+=Math.abs(e[i]-r)}return o},3:function(e,t,n,o){let r=0;for(let i=0;i<n;i++){let s=i>=o?e[t+i-o]:0,l=t>0?e[t+i-n]:0;r+=Math.abs(e[t+i]-(s+l>>1))}return r},4:function(e,t,n,r){let i=0;for(let s=0;s<n;s++){let l=s>=r?e[t+s-r]:0,d=t>0?e[t+s-n]:0,a=t>0&&s>=r?e[t+s-(n+r)]:0;i+=Math.abs(e[t+s]-o(l,d,a))}return i}};e.exports=function(e,t,n,o,s){let l;if("filterType"in o&&-1!==o.filterType)if("number"==typeof o.filterType)l=[o.filterType];else throw Error("unrecognised filter types");else l=[0,1,2,3,4];16===o.bitDepth&&(s*=2);let d=t*s,a=0,u=0,h=Buffer.alloc((d+1)*n),p=l[0];for(let t=0;t<n;t++){if(l.length>1){let t=1/0;for(let n=0;n<l.length;n++){let o=i[l[n]](e,u,d,s);o<t&&(p=l[n],t=o)}}h[a]=p,a++,r[p](e,u,d,h,a,s),a+=d,u+=d}return h}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-async.js"(e,t,n){let o=n("util"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/chunkstream.js"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse.js"),s=e.exports=function(e){r.call(this);let t=[],n=this;this._filter=new i(e,{read:this.read.bind(this),write:function(e){t.push(e)},complete:function(){n.emit("complete",Buffer.concat(t))}}),this._filter.start()};o.inherits(s,r)},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-sync.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-reader.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse.js");t.process=function(e,t){let n=[],i=new o(e);return new r(t,{read:i.read.bind(i),write:function(e){n.push(e)},complete:function(){}}).start(),i.process(),Buffer.concat(n)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/interlace.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/paeth-predictor.js");function i(e,t,n){let o=e*t;return 8!==n&&(o=Math.ceil(o/(8/n))),o}let s=e.exports=function(e,t){let n=e.width,r=e.height,s=e.interlace,l=e.bpp,d=e.depth;if(this.read=t.read,this.write=t.write,this.complete=t.complete,this._imageIndex=0,this._images=[],s){let e=o.getImagePasses(n,r);for(let t=0;t<e.length;t++)this._images.push({byteWidth:i(e[t].width,l,d),height:e[t].height,lineIndex:0})}else this._images.push({byteWidth:i(n,l,d),height:r,lineIndex:0});8===d?this._xComparison=l:16===d?this._xComparison=2*l:this._xComparison=1};s.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},s.prototype._unFilterType1=function(e,t,n){let o=this._xComparison,r=o-1;for(let i=0;i<n;i++){let n=e[1+i],s=i>r?t[i-o]:0;t[i]=n+s}},s.prototype._unFilterType2=function(e,t,n){let o=this._lastLine;for(let r=0;r<n;r++){let n=e[1+r],i=o?o[r]:0;t[r]=n+i}},s.prototype._unFilterType3=function(e,t,n){let o=this._xComparison,r=o-1,i=this._lastLine;for(let s=0;s<n;s++){let n=e[1+s],l=i?i[s]:0,d=Math.floor(((s>r?t[s-o]:0)+l)/2);t[s]=n+d}},s.prototype._unFilterType4=function(e,t,n){let o=this._xComparison,i=o-1,s=this._lastLine;for(let l=0;l<n;l++){let n=e[1+l],d=s?s[l]:0,a=r(l>i?t[l-o]:0,d,l>i&&s?s[l-o]:0);t[l]=n+a}},s.prototype._reverseFilterLine=function(e){let t,n=e[0],o=this._images[this._imageIndex],r=o.byteWidth;if(0===n)t=e.slice(1,r+1);else switch(t=Buffer.alloc(r),n){case 1:this._unFilterType1(e,t,r);break;case 2:this._unFilterType2(e,t,r);break;case 3:this._unFilterType3(e,t,r);break;case 4:this._unFilterType4(e,t,r);break;default:throw Error("Unrecognised filter type - "+n)}this.write(t),o.lineIndex++,o.lineIndex>=o.height?(this._lastLine=null,this._imageIndex++,o=this._images[this._imageIndex]):this._lastLine=t,o?this.read(o.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/format-normaliser.js"(e){e.exports=function(e,t){let n=t.depth,o=t.width,r=t.height,i=t.colorType,s=t.transColor,l=t.palette,d=e;return 3===i?!function(e,t,n,o,r){let i=0;for(let s=0;s<o;s++)for(let o=0;o<n;o++){let n=r[e[i]];if(!n)throw Error("index "+e[i]+" not in palette");for(let e=0;e<4;e++)t[i+e]=n[e];i+=4}}(e,d,o,r,l):(s&&function(e,t,n,o,r){let i=0;for(let s=0;s<o;s++)for(let o=0;o<n;o++){let n=!1;if(1===r.length?r[0]===e[i]&&(n=!0):r[0]===e[i]&&r[1]===e[i+1]&&r[2]===e[i+2]&&(n=!0),n)for(let e=0;e<4;e++)t[i+e]=0;i+=4}}(e,d,o,r,s),8!==n&&(16===n&&(d=Buffer.alloc(o*r*4)),!function(e,t,n,o,r){let i=Math.pow(2,r)-1,s=0;for(let r=0;r<o;r++)for(let o=0;o<n;o++){for(let n=0;n<4;n++)t[s+n]=Math.floor(255*e[s+n]/i+.5);s+=4}}(e,d,o,r,n))),d}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/interlace.js"(e,t){let n=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];t.getImagePasses=function(e,t){let o=[],r=e%8,i=t%8,s=(e-r)/8,l=(t-i)/8;for(let e=0;e<n.length;e++){let t=n[e],d=s*t.x.length,a=l*t.y.length;for(let e=0;e<t.x.length;e++)if(t.x[e]<r)d++;else break;for(let e=0;e<t.y.length;e++)if(t.y[e]<i)a++;else break;d>0&&a>0&&o.push({width:d,height:a,index:e})}return o},t.getInterlaceIterator=function(e){return function(t,o,r){let i=t%n[r].x.length,s=(t-i)/n[r].x.length*8+n[r].x[i],l=o%n[r].y.length;return 4*s+((o-l)/n[r].y.length*8+n[r].y[l])*e*4}}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-async.js"(e,t,n){let o=n("util"),r=n("stream"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer.js"),l=e.exports=function(e){r.call(this),this._packer=new s(e||{}),this._deflate=this._packer.createDeflate(),this.readable=!0};o.inherits(l,r),l.prototype.pack=function(e,t,n,o){this.emit("data",Buffer.from(i.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(t,n)),o&&this.emit("data",this._packer.packGAMA(o));let r=this._packer.filterData(e,t,n);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",(function(e){this.emit("data",this._packer.packIDAT(e))}).bind(this)),this._deflate.on("end",(function(){this.emit("data",this._packer.packIEND()),this.emit("end")}).bind(this)),this._deflate.end(r)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-sync.js"(e,t,n){let o=!0,r=n("zlib");r.deflateSync||(o=!1);let i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer.js");e.exports=function(e,t){if(!o)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let n=new s(t||{}),l=[];l.push(Buffer.from(i.PNG_SIGNATURE)),l.push(n.packIHDR(e.width,e.height)),e.gamma&&l.push(n.packGAMA(e.gamma));let d=n.filterData(e.data,e.width,e.height),a=r.deflateSync(d,n.getDeflateOptions());if(d=null,!a||!a.length)throw Error("bad png - invalid compressed data response");return l.push(n.packIDAT(a)),l.push(n.packIEND()),Buffer.concat(l)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/crc.js"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitpacker.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-pack.js"),l=n("zlib"),d=e.exports=function(e){if(this._options=e,e.deflateChunkSize=e.deflateChunkSize||32768,e.deflateLevel=null!=e.deflateLevel?e.deflateLevel:9,e.deflateStrategy=null!=e.deflateStrategy?e.deflateStrategy:3,e.inputHasAlpha=null==e.inputHasAlpha||e.inputHasAlpha,e.deflateFactory=e.deflateFactory||l.createDeflate,e.bitDepth=e.bitDepth||8,e.colorType="number"==typeof e.colorType?e.colorType:o.COLORTYPE_COLOR_ALPHA,e.inputColorType="number"==typeof e.inputColorType?e.inputColorType:o.COLORTYPE_COLOR_ALPHA,-1===[o.COLORTYPE_GRAYSCALE,o.COLORTYPE_COLOR,o.COLORTYPE_COLOR_ALPHA,o.COLORTYPE_ALPHA].indexOf(e.colorType))throw Error("option color type:"+e.colorType+" is not supported at present");if(-1===[o.COLORTYPE_GRAYSCALE,o.COLORTYPE_COLOR,o.COLORTYPE_COLOR_ALPHA,o.COLORTYPE_ALPHA].indexOf(e.inputColorType))throw Error("option input color type:"+e.inputColorType+" is not supported at present");if(8!==e.bitDepth&&16!==e.bitDepth)throw Error("option bit depth:"+e.bitDepth+" is not supported at present")};d.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},d.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},d.prototype.filterData=function(e,t,n){let r=i(e,t,n,this._options),l=o.COLORTYPE_TO_BPP_MAP[this._options.colorType];return s(r,t,n,this._options,l)},d.prototype._packChunk=function(e,t){let n=t?t.length:0,o=Buffer.alloc(n+12);return o.writeUInt32BE(n,0),o.writeUInt32BE(e,4),t&&t.copy(o,8),o.writeInt32BE(r.crc32(o.slice(4,o.length-4)),o.length-4),o},d.prototype.packGAMA=function(e){let t=Buffer.alloc(4);return t.writeUInt32BE(Math.floor(e*o.GAMMA_DIVISION),0),this._packChunk(o.TYPE_gAMA,t)},d.prototype.packIHDR=function(e,t){let n=Buffer.alloc(13);return n.writeUInt32BE(e,0),n.writeUInt32BE(t,4),n[8]=this._options.bitDepth,n[9]=this._options.colorType,n[10]=0,n[11]=0,n[12]=0,this._packChunk(o.TYPE_IHDR,n)},d.prototype.packIDAT=function(e){return this._packChunk(o.TYPE_IDAT,e)},d.prototype.packIEND=function(){return this._packChunk(o.TYPE_IEND,null)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/paeth-predictor.js"(e){e.exports=function(e,t,n){let o=e+t-n,r=Math.abs(o-e),i=Math.abs(o-t),s=Math.abs(o-n);return r<=i&&r<=s?e:i<=s?t:n}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-async.js"(e,t,n){let o=n("util"),r=n("zlib"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/chunkstream.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-async.js"),l=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser.js"),d=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitmapper.js"),a=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/format-normaliser.js"),u=e.exports=function(e){i.call(this),this._parser=new l(e,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=e,this.writable=!0,this._parser.start()};o.inherits(u,i),u.prototype._handleError=function(e){this.emit("error",e),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},u.prototype._inflateData=function(e){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=r.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let e=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,t=Math.max(e,r.Z_MIN_CHUNK);this._inflate=r.createInflate({chunkSize:t});let n=e,o=this.emit.bind(this,"error");this._inflate.on("error",function(e){n&&o(e)}),this._filter.on("complete",this._complete.bind(this));let i=this._filter.write.bind(this._filter);this._inflate.on("data",function(e){n&&(e.length>n&&(e=e.slice(0,n)),n-=e.length,i(e))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(e)},u.prototype._handleMetaData=function(e){this._metaData=e,this._bitmapInfo=Object.create(e),this._filter=new s(this._bitmapInfo)},u.prototype._handleTransColor=function(e){this._bitmapInfo.transColor=e},u.prototype._handlePalette=function(e){this._bitmapInfo.palette=e},u.prototype._simpleTransparency=function(){this._metaData.alpha=!0},u.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},u.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},u.prototype._complete=function(e){let t;if(!this.errord){try{let n=d.dataToBitMap(e,this._bitmapInfo);t=a(n,this._bitmapInfo),n=null}catch(e){this._handleError(e);return}this.emit("parsed",t)}}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-sync.js"(e,t,n){let o=!0,r=n("zlib"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-inflate.js");r.deflateSync||(o=!1);let s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-reader.js"),l=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-sync.js"),d=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser.js"),a=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitmapper.js"),u=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/format-normaliser.js");e.exports=function(e,t){let n,h,p,c;if(!o)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let f=[],m=new s(e);if(new d(t,{read:m.read.bind(m),error:function(e){n=e},metadata:function(e){h=e},gamma:function(e){p=e},palette:function(e){h.palette=e},transColor:function(e){h.transColor=e},inflateData:function(e){f.push(e)},simpleTransparency:function(){h.alpha=!0}}).start(),m.process(),n)throw n;let _=Buffer.concat(f);if(f.length=0,h.interlace)c=r.inflateSync(_);else{let e=((h.width*h.bpp*h.depth+7>>3)+1)*h.height;c=i(_,{chunkSize:e,maxLength:e})}if(_=null,!c||!c.length)throw Error("bad png - invalid inflate data response");let g=l.process(c,h);_=null;let b=a.dataToBitMap(g,h);g=null;let y=u(b,h);return h.data=y,h.gamma=p||0,h}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/crc.js"),i=e.exports=function(e,t){this._options=e,e.checkCRC=!1!==e.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[o.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[o.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[o.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[o.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[o.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[o.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t.read,this.error=t.error,this.metadata=t.metadata,this.gamma=t.gamma,this.transColor=t.transColor,this.palette=t.palette,this.parsed=t.parsed,this.inflateData=t.inflateData,this.finished=t.finished,this.simpleTransparency=t.simpleTransparency,this.headersFinished=t.headersFinished||function(){}};i.prototype.start=function(){this.read(o.PNG_SIGNATURE.length,this._parseSignature.bind(this))},i.prototype._parseSignature=function(e){let t=o.PNG_SIGNATURE;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return void this.error(Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},i.prototype._parseChunkBegin=function(e){let t=e.readUInt32BE(0),n=e.readUInt32BE(4),i="";for(let t=4;t<8;t++)i+=String.fromCharCode(e[t]);let s=!!(32&e[4]);return this._hasIHDR||n===o.TYPE_IHDR?(this._crc=new r,this._crc.write(Buffer.from(i)),this._chunks[n])?this._chunks[n](t):s?void this.read(t+4,this._skipChunk.bind(this)):void this.error(Error("Unsupported critical chunk type "+i)):void this.error(Error("Expected IHDR on beggining"))},i.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},i.prototype._parseChunkEnd=function(e){let t=e.readInt32BE(0),n=this._crc.crc32();this._options.checkCRC&&n!==t?this.error(Error("Crc error - "+t+" - "+n)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleIHDR=function(e){this.read(e,this._parseIHDR.bind(this))},i.prototype._parseIHDR=function(e){this._crc.write(e);let t=e.readUInt32BE(0),n=e.readUInt32BE(4),r=e[8],i=e[9],s=e[10],l=e[11],d=e[12];if(8!==r&&4!==r&&2!==r&&1!==r&&16!==r)return void this.error(Error("Unsupported bit depth "+r));if(!(i in o.COLORTYPE_TO_BPP_MAP))return void this.error(Error("Unsupported color type"));if(0!==s)return void this.error(Error("Unsupported compression method"));if(0!==l)return void this.error(Error("Unsupported filter method"));if(0!==d&&1!==d)return void this.error(Error("Unsupported interlace method"));this._colorType=i;let a=o.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:t,height:n,depth:r,interlace:!!d,palette:!!(i&o.COLORTYPE_PALETTE),color:!!(i&o.COLORTYPE_COLOR),alpha:!!(i&o.COLORTYPE_ALPHA),bpp:a,colorType:i}),this._handleChunkEnd()},i.prototype._handlePLTE=function(e){this.read(e,this._parsePLTE.bind(this))},i.prototype._parsePLTE=function(e){this._crc.write(e);let t=Math.floor(e.length/3);for(let n=0;n<t;n++)this._palette.push([e[3*n],e[3*n+1],e[3*n+2],255]);this.palette(this._palette),this._handleChunkEnd()},i.prototype._handleTRNS=function(e){this.simpleTransparency(),this.read(e,this._parseTRNS.bind(this))},i.prototype._parseTRNS=function(e){if(this._crc.write(e),this._colorType===o.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(Error("Transparency chunk must be after palette"));if(e.length>this._palette.length)return void this.error(Error("More transparent colors than palette size"));for(let t=0;t<e.length;t++)this._palette[t][3]=e[t];this.palette(this._palette)}this._colorType===o.COLORTYPE_GRAYSCALE&&this.transColor([e.readUInt16BE(0)]),this._colorType===o.COLORTYPE_COLOR&&this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)]),this._handleChunkEnd()},i.prototype._handleGAMA=function(e){this.read(e,this._parseGAMA.bind(this))},i.prototype._parseGAMA=function(e){this._crc.write(e),this.gamma(e.readUInt32BE(0)/o.GAMMA_DIVISION),this._handleChunkEnd()},i.prototype._handleIDAT=function(e){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-e,this._parseIDAT.bind(this,e))},i.prototype._parseIDAT=function(e,t){if(this._crc.write(t),this._colorType===o.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw Error("Expected palette not found");this.inflateData(t);let n=e-t.length;n>0?this._handleIDAT(n):this._handleChunkEnd()},i.prototype._handleIEND=function(e){this.read(e,this._parseIEND.bind(this))},i.prototype._parseIEND=function(e){this._crc.write(e),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png-sync.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-sync.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-sync.js");t.read=function(e,t){return o(e,t||{})},t.write=function(e,t){return r(e,t)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png.js"(e,t,n){let o=n("util"),r=n("stream"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-async.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-async.js"),l=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png-sync.js"),d=t.O=function(e){r.call(this),e=e||{},this.width=0|e.width,this.height=0|e.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,e.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new i(e),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",(function(e){this.data=e,this.emit("parsed",e)}).bind(this)),this._packer=new s(e),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};o.inherits(d,r),d.sync=l,d.prototype.pack=function(){return this.data&&this.data.length?process.nextTick((function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}).bind(this)):this.emit("error","No data provided"),this},d.prototype.parse=function(e,t){if(t){let e,n;e=(function(e){this.removeListener("error",n),this.data=e,t(null,this)}).bind(this),n=(function(n){this.removeListener("parsed",e),t(n,null)}).bind(this),this.once("parsed",e),this.once("error",n)}return this.end(e),this},d.prototype.write=function(e){return this._parser.write(e),!0},d.prototype.end=function(e){this._parser.end(e)},d.prototype._metadata=function(e){this.width=e.width,this.height=e.height,this.emit("metadata",e)},d.prototype._gamma=function(e){this.gamma=e},d.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},d.bitblt=function(e,t,n,o,r,i,s,l){if(o|=0,r|=0,i|=0,s|=0,l|=0,(n|=0)>e.width||o>e.height||n+r>e.width||o+i>e.height)throw Error("bitblt reading outside image");if(s>t.width||l>t.height||s+r>t.width||l+i>t.height)throw Error("bitblt writing outside image");for(let d=0;d<i;d++)e.data.copy(t.data,(l+d)*t.width+s<<2,(o+d)*e.width+n<<2,(o+d)*e.width+n+r<<2)},d.prototype.bitblt=function(e,t,n,o,r,i,s){return d.bitblt(this,e,t,n,o,r,i,s),this},d.adjustGamma=function(e){if(e.gamma){for(let t=0;t<e.height;t++)for(let n=0;n<e.width;n++){let o=e.width*t+n<<2;for(let t=0;t<3;t++){let n=e.data[o+t]/255;n=Math.pow(n,1/2.2/e.gamma),e.data[o+t]=Math.round(255*n)}}e.gamma=0}},d.prototype.adjustGamma=function(){d.adjustGamma(this)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-inflate.js"(e,t,n){let o=n("assert").ok,r=n("zlib"),i=n("util"),s=n("buffer").kMaxLength;function l(e){if(!(this instanceof l))return new l(e);e&&e.chunkSize<r.Z_MIN_CHUNK&&(e.chunkSize=r.Z_MIN_CHUNK),r.Inflate.call(this,e),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,e&&null!=e.maxLength&&(this._maxLength=e.maxLength)}function d(e,t){t&&process.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function a(e,t){var n=new l(t),o=e;if("string"==typeof o&&(o=Buffer.from(o)),!(o instanceof Buffer))throw TypeError("Not a string or buffer");let i=n._finishFlushFlag;return null==i&&(i=r.Z_FINISH),n._processChunk(o,i)}l.prototype._processChunk=function(e,t,n){let i,l;if("function"==typeof n)return r.Inflate._processChunk.call(this,e,t,n);let a=this,u=e&&e.length,h=this._chunkSize-this._offset,p=this._maxLength,c=0,f=[],m=0;this.on("error",function(e){i=e}),o(this._handle,"zlib binding closed");do l=(l=this._handle.writeSync(t,e,c,u,this._buffer,this._offset,h))||this._writeState;while(!this._hadError&&function(e,t){if(a._hadError)return;let n=h-t;if(o(n>=0,"have should not go down"),n>0){let e=a._buffer.slice(a._offset,a._offset+n);if(a._offset+=n,e.length>p&&(e=e.slice(0,p)),f.push(e),m+=e.length,0==(p-=e.length))return!1}return(0===t||a._offset>=a._chunkSize)&&(h=a._chunkSize,a._offset=0,a._buffer=Buffer.allocUnsafe(a._chunkSize)),0===t&&(c+=u-e,u=e,!0)}(l[0],l[1]));if(this._hadError)throw i;if(m>=s)throw d(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+s.toString(16)+" bytes");let _=Buffer.concat(f,m);return d(this),_},i.inherits(l,r.Inflate),e.exports=t=a,t.Inflate=l,t.createInflate=function(e){return new l(e)},t.inflateSync=a},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-reader.js"(e){let t=e.exports=function(e){this._buffer=e,this._reads=[]};t.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t})},t.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let e=this._reads[0];if(this._buffer.length&&(this._buffer.length>=e.length||e.allowLess)){this._reads.shift();let t=this._buffer;this._buffer=t.slice(e.length),e.func.call(this,t.slice(0,e.length))}else break}return this._reads.length>0?Error("There are some read requests waitng on finished stream"):this._buffer.length>0?Error("unrecognised content at end of stream"):void 0}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js");function l(e,t,n,i,s){let l=[].slice.call(arguments,1),d=l.length,a="function"==typeof l[d-1];if(!a&&!o())throw Error("Callback required as last argument");if(a){if(d<2)throw Error("Too few arguments provided");2===d?(s=n,n=t,t=i=void 0):3===d&&(t.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=n,n=t,t=void 0))}else{if(d<1)throw Error("Too few arguments provided");return 1===d?(n=t,t=i=void 0):2!==d||t.getContext||(i=n,n=t,t=void 0),new Promise(function(o,s){try{let s=r.create(n,i);o(e(s,t,i))}catch(e){s(e)}})}try{let o=r.create(n,i);s(null,e(o,t,i))}catch(e){s(e)}}r.create,l.bind(null,i.render),l.bind(null,i.renderToDataURL),l.bind(null,function(e,t,n){return s.render(e,n)})},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js").getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,n=o(e),r=145===n?26:2*Math.ceil((n-13)/(2*t-2)),i=[n-7];for(let e=1;e<t-1;e++)i[e]=i[e-1]-r;return i.push(6),i.reverse()},t.getPositions=function(e){let n=[],o=t.getRowColCoords(e),r=o.length;for(let e=0;e<r;e++)for(let t=0;t<r;t++)(0!==e||0!==t)&&(0!==e||t!==r-1)&&(e!==r-1||0!==t)&&n.push([o[e],o[t]]);return n}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),r=["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=o.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},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+2<=this.data.length;t+=2){let n=45*r.indexOf(this.data[t]);n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},e.exports=i},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js"(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js"(e){function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,o){let r=e*this.size+t;this.data[r]=n,o&&(this.reservedBit[r]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js");function r(e){this.mode=o.BYTE,"string"==typeof e?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}r.getBitsLength=function(e){return 8*e},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=r},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"),r=[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];t.getBlocksCount=function(e,t){switch(t){case o.L:return r[(e-1)*4+0];case o.M:return r[(e-1)*4+1];case o.Q:return r[(e-1)*4+2];case o.H:return r[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case o.L:return i[(e-1)*4+0];case o.M:return i[(e-1)*4+1];case o.Q:return i[(e-1)*4+2];case o.H:return i[(e-1)*4+3];default:return}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}catch(e){return n}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js").getSymbolSize;t.getPositions=function(e){let t=o(e);return[[0,0],[t-7,0],[0,t-7]]}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),r=o.getBCHDigit(1335);t.getEncodedBits=function(e,t){let n=e.bit<<3|t,i=n<<10;for(;o.getBCHDigit(i)-r>=0;)i^=1335<<o.getBCHDigit(i)-r;return(n<<10|i)^21522}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js"(e,t){let n=new Uint8Array(512),o=new Uint8Array(256),r=1;for(let e=0;e<255;e++)n[e]=r,o[r]=e,256&(r<<=1)&&(r^=285);for(let e=255;e<512;e++)n[e]=n[e-255];t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[o[e]+o[t]]}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js");function i(e){this.mode=o.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},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=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n=(n>>>8&255)*192+(255&n),e.put(n,13)}},e.exports=i},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js"(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,n=0,o=0,r=0,i=null,s=null;for(let l=0;l<t;l++){o=r=0,i=s=null;for(let d=0;d<t;d++){let t=e.get(l,d);t===i?o++:(o>=5&&(n+=3+(o-5)),i=t,o=1),(t=e.get(d,l))===s?r++:(r>=5&&(n+=3+(r-5)),s=t,r=1)}o>=5&&(n+=3+(o-5)),r>=5&&(n+=3+(r-5))}return n},t.getPenaltyN2=function(e){let t=e.size,n=0;for(let o=0;o<t-1;o++)for(let r=0;r<t-1;r++){let t=e.get(o,r)+e.get(o,r+1)+e.get(o+1,r)+e.get(o+1,r+1);(4===t||0===t)&&n++}return 3*n},t.getPenaltyN3=function(e){let t=e.size,n=0,o=0,r=0;for(let i=0;i<t;i++){o=r=0;for(let s=0;s<t;s++)o=o<<1&2047|e.get(i,s),s>=10&&(1488===o||93===o)&&n++,r=r<<1&2047|e.get(s,i),s>=10&&(1488===r||93===r)&&n++}return 40*n},t.getPenaltyN4=function(e){let t=0,n=e.data.length;for(let o=0;o<n;o++)t+=e.data[o];return 10*Math.abs(Math.ceil(100*t/n/5)-10)},t.applyMask=function(e,n){let o=n.size;for(let r=0;r<o;r++)for(let i=0;i<o;i++)n.isReserved(i,r)||n.xor(i,r,function(e,n,o){switch(e){case t.Patterns.PATTERN000:return(n+o)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return o%3==0;case t.Patterns.PATTERN011:return(n+o)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2==0;case t.Patterns.PATTERN101:return n*o%2+n*o%3==0;case t.Patterns.PATTERN110:return(n*o%2+n*o%3)%2==0;case t.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,i,r))},t.getBestMask=function(e,n){let o=Object.keys(t.Patterns).length,r=0,i=1/0;for(let s=0;s<o;s++){n(s),t.applyMask(s,e);let o=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),o<i&&(i=o,r=s)}return r}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js");t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!o.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return r.testNumeric(e)?t.NUMERIC:r.testAlphanumeric(e)?t.ALPHANUMERIC:r.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}catch(e){return n}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js");function r(e){this.mode=o.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n;for(t=0;t+3<=this.data.length;t+=3)n=parseInt(this.data.substr(t,3),10),e.put(n,10);let o=this.data.length-t;o>0&&(n=parseInt(this.data.substr(t),10),e.put(n,3*o+1))},e.exports=r},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js");t.mul=function(e,t){let n=new Uint8Array(e.length+t.length-1);for(let r=0;r<e.length;r++)for(let i=0;i<t.length;i++)n[r+i]^=o.mul(e[r],t[i]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){let e=n[0];for(let r=0;r<t.length;r++)n[r]^=o.mul(t[r],e);let r=0;for(;r<n.length&&0===n[r];)r++;n=n.slice(r)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let r=0;r<e;r++)n=t.mul(n,new Uint8Array([1,o.exp(r)]));return n}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js"),d=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js"),a=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js"),u=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"),h=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js"),p=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js"),c=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js"),f=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),m=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js");function _(e,t,n){let o,r,i=e.size,s=c.getEncodedBits(t,n);for(o=0;o<15;o++)r=(s>>o&1)==1,o<6?e.set(o,8,r,!0):o<8?e.set(o+1,8,r,!0):e.set(i-15+o,8,r,!0),o<8?e.set(8,i-o-1,r,!0):o<9?e.set(8,15-o-1+1,r,!0):e.set(8,15-o-1,r,!0);e.set(i-8,8,1,!0)}t.create=function(e,t){let n,c;if(void 0===e||""===e)throw Error("No input text");let g=r.M;return void 0!==t&&(g=r.from(t.errorCorrectionLevel,r.M),n=p.from(t.version),c=a.from(t.maskPattern),t.toSJISFunc&&o.setToSJISFunction(t.toSJISFunc)),function(e,t,n,r){let c;if(Array.isArray(e))c=m.fromArray(e);else if("string"==typeof e){let o=t;if(!o){let t=m.rawSplit(e);o=p.getBestVersionForData(t,n)}c=m.fromString(e,o||40)}else throw Error("Invalid data");let g=p.getBestVersionForData(c,n);if(!g)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<g)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+g+".\n")}else t=g;let b=function(e,t,n){let r=new i;n.forEach(function(t){r.put(t.mode.bit,4),r.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(r)});let s=(o.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t))*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);let l=(s-r.getLengthInBits())/8;for(let e=0;e<l;e++)r.put(e%2?17:236,8);return function(e,t,n){let r,i,s=o.getSymbolTotalCodewords(t),l=s-u.getTotalCodewordsCount(t,n),d=u.getBlocksCount(t,n),a=s%d,p=d-a,c=Math.floor(s/d),f=Math.floor(l/d),m=f+1,_=c-f,g=new h(_),b=0,y=Array(d),j=Array(d),E=0,w=new Uint8Array(e.buffer);for(let e=0;e<d;e++){let t=e<p?f:m;y[e]=w.slice(b,b+t),j[e]=g.encode(y[e]),b+=t,E=Math.max(E,t)}let T=new Uint8Array(s),C=0;for(r=0;r<E;r++)for(i=0;i<d;i++)r<y[i].length&&(T[C++]=y[i][r]);for(r=0;r<_;r++)for(i=0;i<d;i++)T[C++]=j[i][r];return T}(r,e,t)}(t,n,c),y=new s(o.getSymbolSize(t));!function(e,t){let n=e.size,o=d.getPositions(t);for(let t=0;t<o.length;t++){let r=o[t][0],i=o[t][1];for(let t=-1;t<=7;t++)if(!(r+t<=-1)&&!(n<=r+t))for(let o=-1;o<=7;o++)i+o<=-1||n<=i+o||(t>=0&&t<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===t||6===t)||t>=2&&t<=4&&o>=2&&o<=4?e.set(r+t,i+o,!0,!0):e.set(r+t,i+o,!1,!0))}}(y,t);let j=y.size;for(let e=8;e<j-8;e++){let t=e%2==0;y.set(e,6,t,!0),y.set(6,e,t,!0)}return!function(e,t){let n=l.getPositions(t);for(let t=0;t<n.length;t++){let o=n[t][0],r=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(o+t,r+n,!0,!0):e.set(o+t,r+n,!1,!0)}}(y,t),_(y,n,0),t>=7&&function(e,t){let n,o,r,i=e.size,s=p.getEncodedBits(t);for(let t=0;t<18;t++)n=Math.floor(t/3),o=t%3+i-8-3,r=(s>>t&1)==1,e.set(n,o,r,!0),e.set(o,n,r,!0)}(y,t),!function(e,t){let n=e.size,o=-1,r=n-1,i=7,s=0;for(let l=n-1;l>0;l-=2)for(6===l&&l--;;){for(let n=0;n<2;n++)if(!e.isReserved(r,l-n)){let o=!1;s<t.length&&(o=(t[s]>>>i&1)==1),e.set(r,l-n,o),-1==--i&&(s++,i=7)}if((r+=o)<0||n<=r){r-=o,o=-o;break}}}(y,b),isNaN(r)&&(r=a.getBestMask(y,_.bind(null,y,n))),a.applyMask(r,y),_(y,n,r),{modules:y,version:t,errorCorrectionLevel:n,maskPattern:r,segments:c}}(e,n,g,c)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js");function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=o.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let n=o.mod(t,this.genPoly),r=this.degree-n.length;if(r>0){let e=new Uint8Array(this.degree);return e.set(n,r),e}return n},e.exports=r},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js"(e,t){let n="[0-9]+",o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(o=o.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(o,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(r,"g"),t.NUMERIC=RegExp(n,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let i=RegExp("^"+o+"$"),s=RegExp("^"+n+"$"),l=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return l.test(e)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js"),d=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js"),a=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),u=n("../../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js");function h(e){return unescape(encodeURIComponent(e)).length}function p(e,t,n){let o,r=[];for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function c(e){let t,n,r=p(d.NUMERIC,o.NUMERIC,e),i=p(d.ALPHANUMERIC,o.ALPHANUMERIC,e);return a.isKanjiModeEnabled()?(t=p(d.BYTE,o.BYTE,e),n=p(d.KANJI,o.KANJI,e)):(t=p(d.BYTE_KANJI,o.BYTE,e),n=[]),r.concat(i,t,n).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case o.NUMERIC:return r.getBitsLength(e);case o.ALPHANUMERIC:return i.getBitsLength(e);case o.KANJI:return l.getBitsLength(e);case o.BYTE:return s.getBitsLength(e)}}function m(e,t){let n,d=o.getBestModeForData(e);if((n=o.from(t,d))!==o.BYTE&&n.bit<d.bit)throw Error('"'+e+'" cannot be encoded with mode '+o.toString(n)+".\n Suggested mode is: "+o.toString(d));switch(n===o.KANJI&&!a.isKanjiModeEnabled()&&(n=o.BYTE),n){case o.NUMERIC:return new r(e);case o.ALPHANUMERIC:return new i(e);case o.KANJI:return new l(e);case o.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},t.fromString=function(e,n){let r=function(e,t){let n={},r={start:{}},i=["start"];for(let s=0;s<e.length;s++){let l=e[s],d=[];for(let e=0;e<l.length;e++){let a=l[e],u=""+s+e;d.push(u),n[u]={node:a,lastCount:0},r[u]={};for(let e=0;e<i.length;e++){let s=i[e];n[s]&&n[s].node.mode===a.mode?(r[s][u]=f(n[s].lastCount+a.length,a.mode)-f(n[s].lastCount,a.mode),n[s].lastCount+=a.length):(n[s]&&(n[s].lastCount=a.length),r[s][u]=f(a.length,a.mode)+4+o.getCharCountIndicator(a.mode,t))}}i=d}for(let e=0;e<i.length;e++)r[i[e]].end=0;return{map:r,table:n}}(function(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];switch(r.mode){case o.NUMERIC:t.push([r,{data:r.data,mode:o.ALPHANUMERIC,length:r.length},{data:r.data,mode:o.BYTE,length:r.length}]);break;case o.ALPHANUMERIC:t.push([r,{data:r.data,mode:o.BYTE,length:r.length}]);break;case o.KANJI:t.push([r,{data:r.data,mode:o.BYTE,length:h(r.data)}]);break;case o.BYTE:t.push([{data:r.data,mode:o.BYTE,length:h(r.data)}])}}return t}(c(e,a.isKanjiModeEnabled())),n),i=u.find_path(r.map,"start","end"),s=[];for(let e=1;e<i.length-1;e++)s.push(r.table[i[e]].node);return t.fromArray(s.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(c(e,a.isKanjiModeEnabled()))}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"(e,t){let n,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];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return o[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js"(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js"),d=o.getBCHDigit(7973);function a(e,t){return s.getCharCountIndicator(e,t)+4}t.from=function(e,t){return l.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!l.isValid(e))throw Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);let i=(o.getSymbolTotalCodewords(e)-r.getTotalCodewordsCount(e,t))*8;if(n===s.MIXED)return i;let d=i-a(n,e);switch(n){case s.NUMERIC:return Math.floor(d/10*3);case s.ALPHANUMERIC:return Math.floor(d/11*2);case s.KANJI:return Math.floor(d/13);case s.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(e,n){let o,r=i.from(n,i.M);if(Array.isArray(e)){if(e.length>1){for(let n=1;n<=40;n++)if(function(e,t){let n=0;return e.forEach(function(e){let o=a(e.mode,t);n+=o+e.getBitsLength()}),n}(e,n)<=t.getCapacity(n,r,s.MIXED))return n;return}if(0===e.length)return 1;o=e[0]}else o=e;return function(e,n,o){for(let r=1;r<=40;r++)if(n<=t.getCapacity(r,o,e))return r}(o.mode,o.getLength(),r)},t.getEncodedBits=function(e){if(!l.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;o.getBCHDigit(t)-d>=0;)t^=7973<<o.getBCHDigit(t)-d;return e<<12|t}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/index.js"(e,t,n){e.exports=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/server.js")},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js");t.render=function(e,t,n){var r;let i=n,s=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(s=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),i=o.getOptions(i);let l=o.getImageWidth(e.modules.size,i),d=s.getContext("2d"),a=d.createImageData(l,l);return o.qrToImageData(a.data,e,i),r=s,d.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=l,r.width=l,r.style.height=l+"px",r.style.width=l+"px",d.putImageData(a,0,0),s},t.renderToDataURL=function(e,n,o){let r=o;void 0!==r||n&&n.getContext||(r=n,n=void 0),r||(r={});let i=t.render(e,n,r),s=r.type||"image/png",l=r.rendererOpts||{};return i.toDataURL(s,l.quality)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js"(e,t,n){let o=n("fs"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png.js").O,i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js");t.render=function(e,t){let n=i.getOptions(t),o=n.rendererOpts,s=i.getImageWidth(e.modules.size,n);o.width=s,o.height=s;let l=new r(o);return i.qrToImageData(l.data,e,n),l},t.renderToDataURL=function(e,n,o){void 0===o&&(o=n,n=void 0),t.renderToBuffer(e,n,function(e,t){e&&o(e);let n="data:image/png;base64,";n+=t.toString("base64"),o(null,n)})},t.renderToBuffer=function(e,n,o){void 0===o&&(o=n,n=void 0);let r=t.render(e,n),i=[];r.on("error",o),r.on("data",function(e){i.push(e)}),r.on("end",function(){o(null,Buffer.concat(i))}),r.pack()},t.renderToFile=function(e,n,r,i){void 0===i&&(i=r,r=void 0);let s=!1,l=(...e)=>{s||(s=!0,i.apply(null,e))},d=o.createWriteStream(e);d.on("error",l),d.on("close",l),t.renderToFileStream(d,n,r)},t.renderToFileStream=function(e,n,o){t.render(n,o).pack().pipe(e)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js");function r(e,t){let n=e.a/255,o=t+'="'+e.hex+'"';return n<1?o+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':o}function i(e,t,n){let o=e+t;return void 0!==n&&(o+=" "+n),o}t.render=function(e,t,n){let s=o.getOptions(t),l=e.modules.size,d=e.modules.data,a=l+2*s.margin,u=s.color.light.a?"<path "+r(s.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",h="<path "+r(s.color.dark,"stroke")+' d="'+function(e,t,n){let o="",r=0,s=!1,l=0;for(let d=0;d<e.length;d++){let a=Math.floor(d%t),u=Math.floor(d/t);a||s||(s=!0),e[d]?(l++,d>0&&a>0&&e[d-1]||(o+=s?i("M",a+n,.5+u+n):i("m",r,0),r=0,s=!1),a+1<t&&e[d+1]||(o+=i("h",l),l=0)):r++}return o}(d,l,s.margin)+'"/>',p='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+('viewBox="0 0 '+a+" ")+a+'" shape-rendering="crispEdges">'+u+h+"</svg>\n";return"function"==typeof n&&n(null,p),p}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg.js"(e,t,n){t.render=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js").render,t.renderToFile=function(e,o,r,i){void 0===i&&(i=r,r=void 0);let s=n("fs"),l=t.render(o,r);s.writeFile(e,'<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'+l,i)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal-small.js");t.render=function(e,t,n){return t&&t.small?r.render(e,t,n):o.render(e,t,n)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal-small.js"(e,t){let n="\x1b[37m",o="\x1b[30m",r="\x1b[0m",i="\x1b[47m"+o,s="\x1b[40m"+n,l=function(e,t,n,o){let r=t+1;return n>=r||o>=r||o<-1||n<-1?"0":n>=t||o>=t||o<0||n<0?"1":e[o*t+n]?"2":"1"},d=function(e,t,n,o){return l(e,t,n,o)+l(e,t,n,o+1)};t.render=function(e,t,l){var a,u;let h=e.modules.size,p=e.modules.data,c=!!(t&&t.inverse),f=t&&t.inverse?s:i,m={"00":r+" "+f,"01":r+(a=c?o:n)+"▄"+f,"02":r+(u=c?n:o)+"▄"+f,10:r+a+"▀"+f,11:" ",12:"▄",20:r+u+"▀"+f,21:"▀",22:"█"},_=r+"\n"+f,g=f;for(let e=-1;e<h+1;e+=2){for(let t=-1;t<h;t++)g+=m[d(p,h,t,e)];g+=m[d(p,h,h,e)]+_}return g+=r,"function"==typeof l&&l(null,g),g}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal.js"(e,t){t.render=function(e,t,n){let o=e.modules.size,r=e.modules.data,i="\x1b[47m \x1b[0m",s="",l=Array(o+3).join(i),d=[,,].join(i);s+=l+"\n";for(let e=0;e<o;++e){s+=i;for(let t=0;t<o;t++)s+=r[e*o+t]?"\x1b[40m \x1b[0m":i;s+=d+"\n"}return s+=l+"\n","function"==typeof n&&n(null,s),s}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utf8.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js"),r={WW:" ",WB:"▄",BB:"█",BW:"▀"},i={BB:" ",BW:"▄",WW:"█",WB:"▀"};t.render=function(e,t,n){let s=o.getOptions(t),l=r;("#ffffff"===s.color.dark.hex||"#000000"===s.color.light.hex)&&(l=i);let d=e.modules.size,a=e.modules.data,u="",h=Array(d+2*s.margin+1).join(l.WW);h=Array(s.margin/2+1).join(h+"\n");let p=Array(s.margin+1).join(l.WW);u+=h;for(let e=0;e<d;e+=2){u+=p;for(let t=0;t<d;t++){var c;let n=a[e*d+t],o=a[(e+1)*d+t];u+=(c=l,n&&o?c.BB:n&&!o?c.BW:!n&&o?c.WB:c.WW)}u+=p+"\n"}return u+=h.slice(0,-1),"function"==typeof n&&n(null,u),u},t.renderToFile=function(e,o,r,i){void 0===i&&(i=r,r=void 0);let s=n("fs"),l=t.render(o,r);s.writeFile(e,l,i)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js"(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,o=e.width&&e.width>=21?e.width:void 0,r=e.scale||4;return{width:o,scale:o?4:r,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){let o=t.getScale(e,n);return Math.floor((e+2*n.margin)*o)},t.qrToImageData=function(e,n,o){let r=n.modules.size,i=n.modules.data,s=t.getScale(r,o),l=Math.floor((r+2*o.margin)*s),d=o.margin*s,a=[o.color.light,o.color.dark];for(let t=0;t<l;t++)for(let n=0;n<l;n++){let u=(t*l+n)*4,h=o.color.light;t>=d&&n>=d&&t<l-d&&n<l-d&&(h=a[+!!i[Math.floor((t-d)/s)*r+Math.floor((n-d)/s)]]),e[u++]=h.r,e[u++]=h.g,e[u++]=h.b,e[u]=h.a}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/server.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utf8.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal.js"),d=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg.js");function a(e,t,n){if(void 0===e)throw Error("String required as first argument");if(void 0===n&&(n=t,t={}),"function"!=typeof n)if(o())t=n||{},n=null;else throw Error("Callback required as last argument");return{opts:t,cb:n}}function u(e,t,n){if(!n.cb)return new Promise(function(o,i){try{let s=r.create(t,n.opts);return e(s,n.opts,function(e,t){return e?i(e):o(t)})}catch(e){i(e)}});try{let o=r.create(t,n.opts);return e(o,n.opts,n.cb)}catch(e){n.cb(e)}}t.create=r.create,n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js"),t.toString=function(e,t,n){let o=a(e,t,n);return u(function(e){switch(e){case"svg":return d;case"terminal":return l;default:return s}}(o.opts?o.opts.type:void 0).render,e,o)},t.toDataURL=function(e,t,n){let o=a(e,t,n);return u(function(e){switch(e){case"svg":return d;case"txt":case"utf8":return s;default:return i}}(o.opts.type).renderToDataURL,e,o)}}});let b=l("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/index.js");async function y(e){let t=await b.toDataURL(e,{margin:4,scale:8,errorCorrectionLevel:"L"});return`<!doctype html>
|
|
1
|
+
import{stripVTControlCharacters as e}from"node:util";import t from"node:fs/promises";import n from"node:os";import o from"node:path";import{pathToFileURL as r}from"node:url";import{z as i}from"zod";import{__webpack_require__ as s}from"./rslib-runtime.js";import{node_modules_open as l}from"./open.js";import{dist_ve as d,pluginIdentity as a,pD as u,createPreview as h,isInteractive as p,error_errorMessage as c,chalk_source as f}from"./691.js";import{waitForAppBuild as m}from"./build.js";s.add({"../../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js"(e){var t={single_source_shortest_paths:function(e,n,o){var r,i,s,l,d,a,u,h={},p={};p[n]=0;var c=t.PriorityQueue.make();for(c.push(n,0);!c.empty();)for(s in i=(r=c.pop()).value,l=r.cost,d=e[i]||{})d.hasOwnProperty(s)&&(a=l+d[s],u=p[s],(void 0===p[s]||u>a)&&(p[s]=a,c.push(s,a),h[s]=i));if(void 0!==o&&void 0===p[o])throw Error(["Could not find a path from ",n," to ",o,"."].join(""));return h},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],o=t;o;)n.push(o),e[o],o=e[o];return n.reverse(),n},find_path:function(e,n,o){var r=t.single_source_shortest_paths(e,n,o);return t.extract_shortest_path_from_predecessor_list(r,o)},PriorityQueue:{make:function(e){var n,o=t.PriorityQueue,r={};for(n in e=e||{},o)o.hasOwnProperty(n)&&(r[n]=o[n]);return r.queue=[],r.sorter=e.sorter||o.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitmapper.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/interlace.js"),r=[function(){},function(e,t,n,o){if(o===t.length)throw Error("Ran out of data");let r=t[o];e[n]=r,e[n+1]=r,e[n+2]=r,e[n+3]=255},function(e,t,n,o){if(o+1>=t.length)throw Error("Ran out of data");let r=t[o];e[n]=r,e[n+1]=r,e[n+2]=r,e[n+3]=t[o+1]},function(e,t,n,o){if(o+2>=t.length)throw Error("Ran out of data");e[n]=t[o],e[n+1]=t[o+1],e[n+2]=t[o+2],e[n+3]=255},function(e,t,n,o){if(o+3>=t.length)throw Error("Ran out of data");e[n]=t[o],e[n+1]=t[o+1],e[n+2]=t[o+2],e[n+3]=t[o+3]}],i=[function(){},function(e,t,n,o){let r=t[0];e[n]=r,e[n+1]=r,e[n+2]=r,e[n+3]=o},function(e,t,n){let o=t[0];e[n]=o,e[n+1]=o,e[n+2]=o,e[n+3]=t[1]},function(e,t,n,o){e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2],e[n+3]=o},function(e,t,n){e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2],e[n+3]=t[3]}];t.dataToBitMap=function(e,t){let n,s,l,d,a,u,h=t.width,p=t.height,c=t.depth,f=t.bpp,m=t.interlace;8!==c&&(n=[],s=0,l={get:function(t){for(;n.length<t;)!function(){let t,o,r,i;if(s===e.length)throw Error("Ran out of data");let l=e[s];switch(s++,c){default:throw Error("unrecognised depth");case 16:r=e[s],s++,n.push((l<<8)+r);break;case 4:r=15&l,i=l>>4,n.push(i,r);break;case 2:t=3&l,o=l>>2&3,r=l>>4&3,i=l>>6&3,n.push(i,r,o,t);break;case 1:t=l>>4&1,o=l>>5&1,r=l>>6&1,i=l>>7&1,n.push(i,r,o,t,l>>3&1,l>>2&1,l>>1&1,1&l)}}();let o=n.slice(0,t);return n=n.slice(t),o},resetAfterLine:function(){n.length=0},end:function(){if(s!==e.length)throw Error("extra data found")}}),d=c<=8?Buffer.alloc(h*p*4):new Uint16Array(h*p*4);let _=Math.pow(2,c)-1,g=0;if(m)a=o.getImagePasses(h,p),u=o.getInterlaceIterator(h,p);else{let e=0;u=function(){let t=e;return e+=4,t},a=[{width:h,height:p}]}for(let t=0;t<a.length;t++)8===c?g=function(e,t,n,o,i,s){let l=e.width,d=e.height,a=e.index;for(let e=0;e<d;e++)for(let d=0;d<l;d++){let l=n(d,e,a);r[o](t,i,l,s),s+=o}return s}(a[t],d,u,f,e,g):function(e,t,n,o,r,s){let l=e.width,d=e.height,a=e.index;for(let e=0;e<d;e++){for(let d=0;d<l;d++){let l=r.get(o),u=n(d,e,a);i[o](t,l,u,s)}r.resetAfterLine()}}(a[t],d,u,f,l,_);if(8===c){if(g!==e.length)throw Error("extra data found")}else l.end();return d}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitpacker.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js");e.exports=function(e,t,n,r){let i=-1!==[o.COLORTYPE_COLOR_ALPHA,o.COLORTYPE_ALPHA].indexOf(r.colorType);if(r.colorType===r.inputColorType){let t,n=(new DataView(t=new ArrayBuffer(2)).setInt16(0,256,!0),256!==new Int16Array(t)[0]);if(8===r.bitDepth||16===r.bitDepth&&n)return e}let s=16!==r.bitDepth?e:new Uint16Array(e.buffer),l=255,d=o.COLORTYPE_TO_BPP_MAP[r.inputColorType];4!==d||r.inputHasAlpha||(d=3);let a=o.COLORTYPE_TO_BPP_MAP[r.colorType];16===r.bitDepth&&(l=65535,a*=2);let u=Buffer.alloc(t*n*a),h=0,p=0,c=r.bgColor||{};void 0===c.red&&(c.red=l),void 0===c.green&&(c.green=l),void 0===c.blue&&(c.blue=l);for(let e=0;e<n;e++)for(let e=0;e<t;e++){let e=function(){let e,t,n,d=l;switch(r.inputColorType){case o.COLORTYPE_COLOR_ALPHA:d=s[h+3],e=s[h],t=s[h+1],n=s[h+2];break;case o.COLORTYPE_COLOR:e=s[h],t=s[h+1],n=s[h+2];break;case o.COLORTYPE_ALPHA:d=s[h+1],t=e=s[h],n=e;break;case o.COLORTYPE_GRAYSCALE:t=e=s[h],n=e;break;default:throw Error("input color type:"+r.inputColorType+" is not supported at present")}return r.inputHasAlpha&&!i&&(d/=l,e=Math.min(Math.max(Math.round((1-d)*c.red+d*e),0),l),t=Math.min(Math.max(Math.round((1-d)*c.green+d*t),0),l),n=Math.min(Math.max(Math.round((1-d)*c.blue+d*n),0),l)),{red:e,green:t,blue:n,alpha:d}}();switch(r.colorType){case o.COLORTYPE_COLOR_ALPHA:case o.COLORTYPE_COLOR:8===r.bitDepth?(u[p]=e.red,u[p+1]=e.green,u[p+2]=e.blue,i&&(u[p+3]=e.alpha)):(u.writeUInt16BE(e.red,p),u.writeUInt16BE(e.green,p+2),u.writeUInt16BE(e.blue,p+4),i&&u.writeUInt16BE(e.alpha,p+6));break;case o.COLORTYPE_ALPHA:case o.COLORTYPE_GRAYSCALE:{let t=(e.red+e.green+e.blue)/3;8===r.bitDepth?(u[p]=t,i&&(u[p+1]=e.alpha)):(u.writeUInt16BE(t,p),i&&u.writeUInt16BE(e.alpha,p+2));break}default:throw Error("unrecognised color Type "+r.colorType)}h+=d,p+=a}return u}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/chunkstream.js"(e,t,n){let o=n("util"),r=n("stream"),i=e.exports=function(){r.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};o.inherits(i,r),i.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t}),process.nextTick((function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}).bind(this))},i.prototype.write=function(e,t){let n;return this.writable?(n=Buffer.isBuffer(e)?e:Buffer.from(e,t||this._encoding),this._buffers.push(n),this._buffered+=n.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",Error("Stream not writable")),!1)},i.prototype.end=function(e,t){e&&this.write(e,t),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},i.prototype.destroySoon=i.prototype.end,i.prototype._end=function(){this._reads.length>0&&this.emit("error",Error("Unexpected end of input")),this.destroy()},i.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},i.prototype._processReadAllowingLess=function(e){this._reads.shift();let t=this._buffers[0];t.length>e.length?(this._buffered-=e.length,this._buffers[0]=t.slice(e.length),e.func.call(this,t.slice(0,e.length))):(this._buffered-=t.length,this._buffers.shift(),e.func.call(this,t))},i.prototype._processRead=function(e){this._reads.shift();let t=0,n=0,o=Buffer.alloc(e.length);for(;t<e.length;){let r=this._buffers[n++],i=Math.min(r.length,e.length-t);r.copy(o,t,0,i),t+=i,i!==r.length&&(this._buffers[--n]=r.slice(i))}n>0&&this._buffers.splice(0,n),this._buffered-=e.length,e.func.call(this,o)},i.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let e=this._reads[0];if(e.allowLess)this._processReadAllowingLess(e);else if(this._buffered>=e.length)this._processRead(e);else break}this._buffers&&!this.writable&&this._end()}catch(e){this.emit("error",e)}}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"(e){e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:0x49484452,TYPE_IEND:0x49454e44,TYPE_IDAT:0x49444154,TYPE_PLTE:0x504c5445,TYPE_tRNS:0x74524e53,TYPE_gAMA:0x67414d41,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/crc.js"(e){let t=[];for(let e=0;e<256;e++){let n=e;for(let e=0;e<8;e++)1&n?n=0xedb88320^n>>>1:n>>>=1;t[e]=n}let n=e.exports=function(){this._crc=-1};n.prototype.write=function(e){for(let n=0;n<e.length;n++)this._crc=t[(this._crc^e[n])&255]^this._crc>>>8;return!0},n.prototype.crc32=function(){return -1^this._crc},n.crc32=function(e){let n=-1;for(let o=0;o<e.length;o++)n=t[(n^e[o])&255]^n>>>8;return -1^n}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-pack.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/paeth-predictor.js"),r={0:function(e,t,n,o,r){for(let i=0;i<n;i++)o[r+i]=e[t+i]},1:function(e,t,n,o,r,i){for(let s=0;s<n;s++){let n=s>=i?e[t+s-i]:0,l=e[t+s]-n;o[r+s]=l}},2:function(e,t,n,o,r){for(let i=0;i<n;i++){let s=t>0?e[t+i-n]:0,l=e[t+i]-s;o[r+i]=l}},3:function(e,t,n,o,r,i){for(let s=0;s<n;s++){let l=s>=i?e[t+s-i]:0,d=t>0?e[t+s-n]:0,a=e[t+s]-(l+d>>1);o[r+s]=a}},4:function(e,t,n,r,i,s){for(let l=0;l<n;l++){let d=l>=s?e[t+l-s]:0,a=t>0?e[t+l-n]:0,u=t>0&&l>=s?e[t+l-(n+s)]:0,h=e[t+l]-o(d,a,u);r[i+l]=h}}},i={0:function(e,t,n){let o=0,r=t+n;for(let n=t;n<r;n++)o+=Math.abs(e[n]);return o},1:function(e,t,n,o){let r=0;for(let i=0;i<n;i++){let n=i>=o?e[t+i-o]:0;r+=Math.abs(e[t+i]-n)}return r},2:function(e,t,n){let o=0,r=t+n;for(let i=t;i<r;i++){let r=t>0?e[i-n]:0;o+=Math.abs(e[i]-r)}return o},3:function(e,t,n,o){let r=0;for(let i=0;i<n;i++){let s=i>=o?e[t+i-o]:0,l=t>0?e[t+i-n]:0;r+=Math.abs(e[t+i]-(s+l>>1))}return r},4:function(e,t,n,r){let i=0;for(let s=0;s<n;s++){let l=s>=r?e[t+s-r]:0,d=t>0?e[t+s-n]:0,a=t>0&&s>=r?e[t+s-(n+r)]:0;i+=Math.abs(e[t+s]-o(l,d,a))}return i}};e.exports=function(e,t,n,o,s){let l;if("filterType"in o&&-1!==o.filterType)if("number"==typeof o.filterType)l=[o.filterType];else throw Error("unrecognised filter types");else l=[0,1,2,3,4];16===o.bitDepth&&(s*=2);let d=t*s,a=0,u=0,h=Buffer.alloc((d+1)*n),p=l[0];for(let t=0;t<n;t++){if(l.length>1){let t=1/0;for(let n=0;n<l.length;n++){let o=i[l[n]](e,u,d,s);o<t&&(p=l[n],t=o)}}h[a]=p,a++,r[p](e,u,d,h,a,s),a+=d,u+=d}return h}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-async.js"(e,t,n){let o=n("util"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/chunkstream.js"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse.js"),s=e.exports=function(e){r.call(this);let t=[],n=this;this._filter=new i(e,{read:this.read.bind(this),write:function(e){t.push(e)},complete:function(){n.emit("complete",Buffer.concat(t))}}),this._filter.start()};o.inherits(s,r)},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-sync.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-reader.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse.js");t.process=function(e,t){let n=[],i=new o(e);return new r(t,{read:i.read.bind(i),write:function(e){n.push(e)},complete:function(){}}).start(),i.process(),Buffer.concat(n)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/interlace.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/paeth-predictor.js");function i(e,t,n){let o=e*t;return 8!==n&&(o=Math.ceil(o/(8/n))),o}let s=e.exports=function(e,t){let n=e.width,r=e.height,s=e.interlace,l=e.bpp,d=e.depth;if(this.read=t.read,this.write=t.write,this.complete=t.complete,this._imageIndex=0,this._images=[],s){let e=o.getImagePasses(n,r);for(let t=0;t<e.length;t++)this._images.push({byteWidth:i(e[t].width,l,d),height:e[t].height,lineIndex:0})}else this._images.push({byteWidth:i(n,l,d),height:r,lineIndex:0});8===d?this._xComparison=l:16===d?this._xComparison=2*l:this._xComparison=1};s.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},s.prototype._unFilterType1=function(e,t,n){let o=this._xComparison,r=o-1;for(let i=0;i<n;i++){let n=e[1+i],s=i>r?t[i-o]:0;t[i]=n+s}},s.prototype._unFilterType2=function(e,t,n){let o=this._lastLine;for(let r=0;r<n;r++){let n=e[1+r],i=o?o[r]:0;t[r]=n+i}},s.prototype._unFilterType3=function(e,t,n){let o=this._xComparison,r=o-1,i=this._lastLine;for(let s=0;s<n;s++){let n=e[1+s],l=i?i[s]:0,d=Math.floor(((s>r?t[s-o]:0)+l)/2);t[s]=n+d}},s.prototype._unFilterType4=function(e,t,n){let o=this._xComparison,i=o-1,s=this._lastLine;for(let l=0;l<n;l++){let n=e[1+l],d=s?s[l]:0,a=r(l>i?t[l-o]:0,d,l>i&&s?s[l-o]:0);t[l]=n+a}},s.prototype._reverseFilterLine=function(e){let t,n=e[0],o=this._images[this._imageIndex],r=o.byteWidth;if(0===n)t=e.slice(1,r+1);else switch(t=Buffer.alloc(r),n){case 1:this._unFilterType1(e,t,r);break;case 2:this._unFilterType2(e,t,r);break;case 3:this._unFilterType3(e,t,r);break;case 4:this._unFilterType4(e,t,r);break;default:throw Error("Unrecognised filter type - "+n)}this.write(t),o.lineIndex++,o.lineIndex>=o.height?(this._lastLine=null,this._imageIndex++,o=this._images[this._imageIndex]):this._lastLine=t,o?this.read(o.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/format-normaliser.js"(e){e.exports=function(e,t){let n=t.depth,o=t.width,r=t.height,i=t.colorType,s=t.transColor,l=t.palette,d=e;return 3===i?!function(e,t,n,o,r){let i=0;for(let s=0;s<o;s++)for(let o=0;o<n;o++){let n=r[e[i]];if(!n)throw Error("index "+e[i]+" not in palette");for(let e=0;e<4;e++)t[i+e]=n[e];i+=4}}(e,d,o,r,l):(s&&function(e,t,n,o,r){let i=0;for(let s=0;s<o;s++)for(let o=0;o<n;o++){let n=!1;if(1===r.length?r[0]===e[i]&&(n=!0):r[0]===e[i]&&r[1]===e[i+1]&&r[2]===e[i+2]&&(n=!0),n)for(let e=0;e<4;e++)t[i+e]=0;i+=4}}(e,d,o,r,s),8!==n&&(16===n&&(d=Buffer.alloc(o*r*4)),!function(e,t,n,o,r){let i=Math.pow(2,r)-1,s=0;for(let r=0;r<o;r++)for(let o=0;o<n;o++){for(let n=0;n<4;n++)t[s+n]=Math.floor(255*e[s+n]/i+.5);s+=4}}(e,d,o,r,n))),d}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/interlace.js"(e,t){let n=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];t.getImagePasses=function(e,t){let o=[],r=e%8,i=t%8,s=(e-r)/8,l=(t-i)/8;for(let e=0;e<n.length;e++){let t=n[e],d=s*t.x.length,a=l*t.y.length;for(let e=0;e<t.x.length;e++)if(t.x[e]<r)d++;else break;for(let e=0;e<t.y.length;e++)if(t.y[e]<i)a++;else break;d>0&&a>0&&o.push({width:d,height:a,index:e})}return o},t.getInterlaceIterator=function(e){return function(t,o,r){let i=t%n[r].x.length,s=(t-i)/n[r].x.length*8+n[r].x[i],l=o%n[r].y.length;return 4*s+((o-l)/n[r].y.length*8+n[r].y[l])*e*4}}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-async.js"(e,t,n){let o=n("util"),r=n("stream"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer.js"),l=e.exports=function(e){r.call(this),this._packer=new s(e||{}),this._deflate=this._packer.createDeflate(),this.readable=!0};o.inherits(l,r),l.prototype.pack=function(e,t,n,o){this.emit("data",Buffer.from(i.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(t,n)),o&&this.emit("data",this._packer.packGAMA(o));let r=this._packer.filterData(e,t,n);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",(function(e){this.emit("data",this._packer.packIDAT(e))}).bind(this)),this._deflate.on("end",(function(){this.emit("data",this._packer.packIEND()),this.emit("end")}).bind(this)),this._deflate.end(r)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-sync.js"(e,t,n){let o=!0,r=n("zlib");r.deflateSync||(o=!1);let i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer.js");e.exports=function(e,t){if(!o)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let n=new s(t||{}),l=[];l.push(Buffer.from(i.PNG_SIGNATURE)),l.push(n.packIHDR(e.width,e.height)),e.gamma&&l.push(n.packGAMA(e.gamma));let d=n.filterData(e.data,e.width,e.height),a=r.deflateSync(d,n.getDeflateOptions());if(d=null,!a||!a.length)throw Error("bad png - invalid compressed data response");return l.push(n.packIDAT(a)),l.push(n.packIEND()),Buffer.concat(l)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/crc.js"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitpacker.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-pack.js"),l=n("zlib"),d=e.exports=function(e){if(this._options=e,e.deflateChunkSize=e.deflateChunkSize||32768,e.deflateLevel=null!=e.deflateLevel?e.deflateLevel:9,e.deflateStrategy=null!=e.deflateStrategy?e.deflateStrategy:3,e.inputHasAlpha=null==e.inputHasAlpha||e.inputHasAlpha,e.deflateFactory=e.deflateFactory||l.createDeflate,e.bitDepth=e.bitDepth||8,e.colorType="number"==typeof e.colorType?e.colorType:o.COLORTYPE_COLOR_ALPHA,e.inputColorType="number"==typeof e.inputColorType?e.inputColorType:o.COLORTYPE_COLOR_ALPHA,-1===[o.COLORTYPE_GRAYSCALE,o.COLORTYPE_COLOR,o.COLORTYPE_COLOR_ALPHA,o.COLORTYPE_ALPHA].indexOf(e.colorType))throw Error("option color type:"+e.colorType+" is not supported at present");if(-1===[o.COLORTYPE_GRAYSCALE,o.COLORTYPE_COLOR,o.COLORTYPE_COLOR_ALPHA,o.COLORTYPE_ALPHA].indexOf(e.inputColorType))throw Error("option input color type:"+e.inputColorType+" is not supported at present");if(8!==e.bitDepth&&16!==e.bitDepth)throw Error("option bit depth:"+e.bitDepth+" is not supported at present")};d.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},d.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},d.prototype.filterData=function(e,t,n){let r=i(e,t,n,this._options),l=o.COLORTYPE_TO_BPP_MAP[this._options.colorType];return s(r,t,n,this._options,l)},d.prototype._packChunk=function(e,t){let n=t?t.length:0,o=Buffer.alloc(n+12);return o.writeUInt32BE(n,0),o.writeUInt32BE(e,4),t&&t.copy(o,8),o.writeInt32BE(r.crc32(o.slice(4,o.length-4)),o.length-4),o},d.prototype.packGAMA=function(e){let t=Buffer.alloc(4);return t.writeUInt32BE(Math.floor(e*o.GAMMA_DIVISION),0),this._packChunk(o.TYPE_gAMA,t)},d.prototype.packIHDR=function(e,t){let n=Buffer.alloc(13);return n.writeUInt32BE(e,0),n.writeUInt32BE(t,4),n[8]=this._options.bitDepth,n[9]=this._options.colorType,n[10]=0,n[11]=0,n[12]=0,this._packChunk(o.TYPE_IHDR,n)},d.prototype.packIDAT=function(e){return this._packChunk(o.TYPE_IDAT,e)},d.prototype.packIEND=function(){return this._packChunk(o.TYPE_IEND,null)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/paeth-predictor.js"(e){e.exports=function(e,t,n){let o=e+t-n,r=Math.abs(o-e),i=Math.abs(o-t),s=Math.abs(o-n);return r<=i&&r<=s?e:i<=s?t:n}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-async.js"(e,t,n){let o=n("util"),r=n("zlib"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/chunkstream.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-async.js"),l=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser.js"),d=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitmapper.js"),a=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/format-normaliser.js"),u=e.exports=function(e){i.call(this),this._parser=new l(e,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=e,this.writable=!0,this._parser.start()};o.inherits(u,i),u.prototype._handleError=function(e){this.emit("error",e),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},u.prototype._inflateData=function(e){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=r.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let e=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,t=Math.max(e,r.Z_MIN_CHUNK);this._inflate=r.createInflate({chunkSize:t});let n=e,o=this.emit.bind(this,"error");this._inflate.on("error",function(e){n&&o(e)}),this._filter.on("complete",this._complete.bind(this));let i=this._filter.write.bind(this._filter);this._inflate.on("data",function(e){n&&(e.length>n&&(e=e.slice(0,n)),n-=e.length,i(e))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(e)},u.prototype._handleMetaData=function(e){this._metaData=e,this._bitmapInfo=Object.create(e),this._filter=new s(this._bitmapInfo)},u.prototype._handleTransColor=function(e){this._bitmapInfo.transColor=e},u.prototype._handlePalette=function(e){this._bitmapInfo.palette=e},u.prototype._simpleTransparency=function(){this._metaData.alpha=!0},u.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},u.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},u.prototype._complete=function(e){let t;if(!this.errord){try{let n=d.dataToBitMap(e,this._bitmapInfo);t=a(n,this._bitmapInfo),n=null}catch(e){this._handleError(e);return}this.emit("parsed",t)}}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-sync.js"(e,t,n){let o=!0,r=n("zlib"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-inflate.js");r.deflateSync||(o=!1);let s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-reader.js"),l=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-sync.js"),d=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser.js"),a=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitmapper.js"),u=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/format-normaliser.js");e.exports=function(e,t){let n,h,p,c;if(!o)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let f=[],m=new s(e);if(new d(t,{read:m.read.bind(m),error:function(e){n=e},metadata:function(e){h=e},gamma:function(e){p=e},palette:function(e){h.palette=e},transColor:function(e){h.transColor=e},inflateData:function(e){f.push(e)},simpleTransparency:function(){h.alpha=!0}}).start(),m.process(),n)throw n;let _=Buffer.concat(f);if(f.length=0,h.interlace)c=r.inflateSync(_);else{let e=((h.width*h.bpp*h.depth+7>>3)+1)*h.height;c=i(_,{chunkSize:e,maxLength:e})}if(_=null,!c||!c.length)throw Error("bad png - invalid inflate data response");let g=l.process(c,h);_=null;let b=a.dataToBitMap(g,h);g=null;let y=u(b,h);return h.data=y,h.gamma=p||0,h}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/crc.js"),i=e.exports=function(e,t){this._options=e,e.checkCRC=!1!==e.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[o.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[o.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[o.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[o.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[o.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[o.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t.read,this.error=t.error,this.metadata=t.metadata,this.gamma=t.gamma,this.transColor=t.transColor,this.palette=t.palette,this.parsed=t.parsed,this.inflateData=t.inflateData,this.finished=t.finished,this.simpleTransparency=t.simpleTransparency,this.headersFinished=t.headersFinished||function(){}};i.prototype.start=function(){this.read(o.PNG_SIGNATURE.length,this._parseSignature.bind(this))},i.prototype._parseSignature=function(e){let t=o.PNG_SIGNATURE;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return void this.error(Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},i.prototype._parseChunkBegin=function(e){let t=e.readUInt32BE(0),n=e.readUInt32BE(4),i="";for(let t=4;t<8;t++)i+=String.fromCharCode(e[t]);let s=!!(32&e[4]);return this._hasIHDR||n===o.TYPE_IHDR?(this._crc=new r,this._crc.write(Buffer.from(i)),this._chunks[n])?this._chunks[n](t):s?void this.read(t+4,this._skipChunk.bind(this)):void this.error(Error("Unsupported critical chunk type "+i)):void this.error(Error("Expected IHDR on beggining"))},i.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},i.prototype._parseChunkEnd=function(e){let t=e.readInt32BE(0),n=this._crc.crc32();this._options.checkCRC&&n!==t?this.error(Error("Crc error - "+t+" - "+n)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleIHDR=function(e){this.read(e,this._parseIHDR.bind(this))},i.prototype._parseIHDR=function(e){this._crc.write(e);let t=e.readUInt32BE(0),n=e.readUInt32BE(4),r=e[8],i=e[9],s=e[10],l=e[11],d=e[12];if(8!==r&&4!==r&&2!==r&&1!==r&&16!==r)return void this.error(Error("Unsupported bit depth "+r));if(!(i in o.COLORTYPE_TO_BPP_MAP))return void this.error(Error("Unsupported color type"));if(0!==s)return void this.error(Error("Unsupported compression method"));if(0!==l)return void this.error(Error("Unsupported filter method"));if(0!==d&&1!==d)return void this.error(Error("Unsupported interlace method"));this._colorType=i;let a=o.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:t,height:n,depth:r,interlace:!!d,palette:!!(i&o.COLORTYPE_PALETTE),color:!!(i&o.COLORTYPE_COLOR),alpha:!!(i&o.COLORTYPE_ALPHA),bpp:a,colorType:i}),this._handleChunkEnd()},i.prototype._handlePLTE=function(e){this.read(e,this._parsePLTE.bind(this))},i.prototype._parsePLTE=function(e){this._crc.write(e);let t=Math.floor(e.length/3);for(let n=0;n<t;n++)this._palette.push([e[3*n],e[3*n+1],e[3*n+2],255]);this.palette(this._palette),this._handleChunkEnd()},i.prototype._handleTRNS=function(e){this.simpleTransparency(),this.read(e,this._parseTRNS.bind(this))},i.prototype._parseTRNS=function(e){if(this._crc.write(e),this._colorType===o.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(Error("Transparency chunk must be after palette"));if(e.length>this._palette.length)return void this.error(Error("More transparent colors than palette size"));for(let t=0;t<e.length;t++)this._palette[t][3]=e[t];this.palette(this._palette)}this._colorType===o.COLORTYPE_GRAYSCALE&&this.transColor([e.readUInt16BE(0)]),this._colorType===o.COLORTYPE_COLOR&&this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)]),this._handleChunkEnd()},i.prototype._handleGAMA=function(e){this.read(e,this._parseGAMA.bind(this))},i.prototype._parseGAMA=function(e){this._crc.write(e),this.gamma(e.readUInt32BE(0)/o.GAMMA_DIVISION),this._handleChunkEnd()},i.prototype._handleIDAT=function(e){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-e,this._parseIDAT.bind(this,e))},i.prototype._parseIDAT=function(e,t){if(this._crc.write(t),this._colorType===o.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw Error("Expected palette not found");this.inflateData(t);let n=e-t.length;n>0?this._handleIDAT(n):this._handleChunkEnd()},i.prototype._handleIEND=function(e){this.read(e,this._parseIEND.bind(this))},i.prototype._parseIEND=function(e){this._crc.write(e),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png-sync.js"(e,t,n){let o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-sync.js"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-sync.js");t.read=function(e,t){return o(e,t||{})},t.write=function(e,t){return r(e,t)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png.js"(e,t,n){let o=n("util"),r=n("stream"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-async.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-async.js"),l=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png-sync.js"),d=t.O=function(e){r.call(this),e=e||{},this.width=0|e.width,this.height=0|e.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,e.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new i(e),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",(function(e){this.data=e,this.emit("parsed",e)}).bind(this)),this._packer=new s(e),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};o.inherits(d,r),d.sync=l,d.prototype.pack=function(){return this.data&&this.data.length?process.nextTick((function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}).bind(this)):this.emit("error","No data provided"),this},d.prototype.parse=function(e,t){if(t){let e,n;e=(function(e){this.removeListener("error",n),this.data=e,t(null,this)}).bind(this),n=(function(n){this.removeListener("parsed",e),t(n,null)}).bind(this),this.once("parsed",e),this.once("error",n)}return this.end(e),this},d.prototype.write=function(e){return this._parser.write(e),!0},d.prototype.end=function(e){this._parser.end(e)},d.prototype._metadata=function(e){this.width=e.width,this.height=e.height,this.emit("metadata",e)},d.prototype._gamma=function(e){this.gamma=e},d.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},d.bitblt=function(e,t,n,o,r,i,s,l){if(o|=0,r|=0,i|=0,s|=0,l|=0,(n|=0)>e.width||o>e.height||n+r>e.width||o+i>e.height)throw Error("bitblt reading outside image");if(s>t.width||l>t.height||s+r>t.width||l+i>t.height)throw Error("bitblt writing outside image");for(let d=0;d<i;d++)e.data.copy(t.data,(l+d)*t.width+s<<2,(o+d)*e.width+n<<2,(o+d)*e.width+n+r<<2)},d.prototype.bitblt=function(e,t,n,o,r,i,s){return d.bitblt(this,e,t,n,o,r,i,s),this},d.adjustGamma=function(e){if(e.gamma){for(let t=0;t<e.height;t++)for(let n=0;n<e.width;n++){let o=e.width*t+n<<2;for(let t=0;t<3;t++){let n=e.data[o+t]/255;n=Math.pow(n,1/2.2/e.gamma),e.data[o+t]=Math.round(255*n)}}e.gamma=0}},d.prototype.adjustGamma=function(){d.adjustGamma(this)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-inflate.js"(e,t,n){let o=n("assert").ok,r=n("zlib"),i=n("util"),s=n("buffer").kMaxLength;function l(e){if(!(this instanceof l))return new l(e);e&&e.chunkSize<r.Z_MIN_CHUNK&&(e.chunkSize=r.Z_MIN_CHUNK),r.Inflate.call(this,e),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,e&&null!=e.maxLength&&(this._maxLength=e.maxLength)}function d(e,t){t&&process.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function a(e,t){var n=new l(t),o=e;if("string"==typeof o&&(o=Buffer.from(o)),!(o instanceof Buffer))throw TypeError("Not a string or buffer");let i=n._finishFlushFlag;return null==i&&(i=r.Z_FINISH),n._processChunk(o,i)}l.prototype._processChunk=function(e,t,n){let i,l;if("function"==typeof n)return r.Inflate._processChunk.call(this,e,t,n);let a=this,u=e&&e.length,h=this._chunkSize-this._offset,p=this._maxLength,c=0,f=[],m=0;this.on("error",function(e){i=e}),o(this._handle,"zlib binding closed");do l=(l=this._handle.writeSync(t,e,c,u,this._buffer,this._offset,h))||this._writeState;while(!this._hadError&&function(e,t){if(a._hadError)return;let n=h-t;if(o(n>=0,"have should not go down"),n>0){let e=a._buffer.slice(a._offset,a._offset+n);if(a._offset+=n,e.length>p&&(e=e.slice(0,p)),f.push(e),m+=e.length,0==(p-=e.length))return!1}return(0===t||a._offset>=a._chunkSize)&&(h=a._chunkSize,a._offset=0,a._buffer=Buffer.allocUnsafe(a._chunkSize)),0===t&&(c+=u-e,u=e,!0)}(l[0],l[1]));if(this._hadError)throw i;if(m>=s)throw d(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+s.toString(16)+" bytes");let _=Buffer.concat(f,m);return d(this),_},i.inherits(l,r.Inflate),e.exports=t=a,t.Inflate=l,t.createInflate=function(e){return new l(e)},t.inflateSync=a},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-reader.js"(e){let t=e.exports=function(e){this._buffer=e,this._reads=[]};t.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t})},t.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let e=this._reads[0];if(this._buffer.length&&(this._buffer.length>=e.length||e.allowLess)){this._reads.shift();let t=this._buffer;this._buffer=t.slice(e.length),e.func.call(this,t.slice(0,e.length))}else break}return this._reads.length>0?Error("There are some read requests waitng on finished stream"):this._buffer.length>0?Error("unrecognised content at end of stream"):void 0}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js");function l(e,t,n,i,s){let l=[].slice.call(arguments,1),d=l.length,a="function"==typeof l[d-1];if(!a&&!o())throw Error("Callback required as last argument");if(a){if(d<2)throw Error("Too few arguments provided");2===d?(s=n,n=t,t=i=void 0):3===d&&(t.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=n,n=t,t=void 0))}else{if(d<1)throw Error("Too few arguments provided");return 1===d?(n=t,t=i=void 0):2!==d||t.getContext||(i=n,n=t,t=void 0),new Promise(function(o,s){try{let s=r.create(n,i);o(e(s,t,i))}catch(e){s(e)}})}try{let o=r.create(n,i);s(null,e(o,t,i))}catch(e){s(e)}}r.create,l.bind(null,i.render),l.bind(null,i.renderToDataURL),l.bind(null,function(e,t,n){return s.render(e,n)})},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js").getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,n=o(e),r=145===n?26:2*Math.ceil((n-13)/(2*t-2)),i=[n-7];for(let e=1;e<t-1;e++)i[e]=i[e-1]-r;return i.push(6),i.reverse()},t.getPositions=function(e){let n=[],o=t.getRowColCoords(e),r=o.length;for(let e=0;e<r;e++)for(let t=0;t<r;t++)(0!==e||0!==t)&&(0!==e||t!==r-1)&&(e!==r-1||0!==t)&&n.push([o[e],o[t]]);return n}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),r=["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=o.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},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+2<=this.data.length;t+=2){let n=45*r.indexOf(this.data[t]);n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},e.exports=i},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js"(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js"(e){function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,o){let r=e*this.size+t;this.data[r]=n,o&&(this.reservedBit[r]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js");function r(e){this.mode=o.BYTE,"string"==typeof e?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}r.getBitsLength=function(e){return 8*e},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=r},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"),r=[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];t.getBlocksCount=function(e,t){switch(t){case o.L:return r[(e-1)*4+0];case o.M:return r[(e-1)*4+1];case o.Q:return r[(e-1)*4+2];case o.H:return r[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case o.L:return i[(e-1)*4+0];case o.M:return i[(e-1)*4+1];case o.Q:return i[(e-1)*4+2];case o.H:return i[(e-1)*4+3];default:return}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}catch(e){return n}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js").getSymbolSize;t.getPositions=function(e){let t=o(e);return[[0,0],[t-7,0],[0,t-7]]}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),r=o.getBCHDigit(1335);t.getEncodedBits=function(e,t){let n=e.bit<<3|t,i=n<<10;for(;o.getBCHDigit(i)-r>=0;)i^=1335<<o.getBCHDigit(i)-r;return(n<<10|i)^21522}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js"(e,t){let n=new Uint8Array(512),o=new Uint8Array(256),r=1;for(let e=0;e<255;e++)n[e]=r,o[r]=e,256&(r<<=1)&&(r^=285);for(let e=255;e<512;e++)n[e]=n[e-255];t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[o[e]+o[t]]}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js");function i(e){this.mode=o.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},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=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n=(n>>>8&255)*192+(255&n),e.put(n,13)}},e.exports=i},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js"(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,n=0,o=0,r=0,i=null,s=null;for(let l=0;l<t;l++){o=r=0,i=s=null;for(let d=0;d<t;d++){let t=e.get(l,d);t===i?o++:(o>=5&&(n+=3+(o-5)),i=t,o=1),(t=e.get(d,l))===s?r++:(r>=5&&(n+=3+(r-5)),s=t,r=1)}o>=5&&(n+=3+(o-5)),r>=5&&(n+=3+(r-5))}return n},t.getPenaltyN2=function(e){let t=e.size,n=0;for(let o=0;o<t-1;o++)for(let r=0;r<t-1;r++){let t=e.get(o,r)+e.get(o,r+1)+e.get(o+1,r)+e.get(o+1,r+1);(4===t||0===t)&&n++}return 3*n},t.getPenaltyN3=function(e){let t=e.size,n=0,o=0,r=0;for(let i=0;i<t;i++){o=r=0;for(let s=0;s<t;s++)o=o<<1&2047|e.get(i,s),s>=10&&(1488===o||93===o)&&n++,r=r<<1&2047|e.get(s,i),s>=10&&(1488===r||93===r)&&n++}return 40*n},t.getPenaltyN4=function(e){let t=0,n=e.data.length;for(let o=0;o<n;o++)t+=e.data[o];return 10*Math.abs(Math.ceil(100*t/n/5)-10)},t.applyMask=function(e,n){let o=n.size;for(let r=0;r<o;r++)for(let i=0;i<o;i++)n.isReserved(i,r)||n.xor(i,r,function(e,n,o){switch(e){case t.Patterns.PATTERN000:return(n+o)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return o%3==0;case t.Patterns.PATTERN011:return(n+o)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2==0;case t.Patterns.PATTERN101:return n*o%2+n*o%3==0;case t.Patterns.PATTERN110:return(n*o%2+n*o%3)%2==0;case t.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,i,r))},t.getBestMask=function(e,n){let o=Object.keys(t.Patterns).length,r=0,i=1/0;for(let s=0;s<o;s++){n(s),t.applyMask(s,e);let o=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),o<i&&(i=o,r=s)}return r}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js");t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!o.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return r.testNumeric(e)?t.NUMERIC:r.testAlphanumeric(e)?t.ALPHANUMERIC:r.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}catch(e){return n}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js");function r(e){this.mode=o.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n;for(t=0;t+3<=this.data.length;t+=3)n=parseInt(this.data.substr(t,3),10),e.put(n,10);let o=this.data.length-t;o>0&&(n=parseInt(this.data.substr(t),10),e.put(n,3*o+1))},e.exports=r},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js");t.mul=function(e,t){let n=new Uint8Array(e.length+t.length-1);for(let r=0;r<e.length;r++)for(let i=0;i<t.length;i++)n[r+i]^=o.mul(e[r],t[i]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){let e=n[0];for(let r=0;r<t.length;r++)n[r]^=o.mul(t[r],e);let r=0;for(;r<n.length&&0===n[r];)r++;n=n.slice(r)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let r=0;r<e;r++)n=t.mul(n,new Uint8Array([1,o.exp(r)]));return n}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js"),d=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js"),a=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js"),u=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"),h=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js"),p=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js"),c=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js"),f=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),m=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js");function _(e,t,n){let o,r,i=e.size,s=c.getEncodedBits(t,n);for(o=0;o<15;o++)r=(s>>o&1)==1,o<6?e.set(o,8,r,!0):o<8?e.set(o+1,8,r,!0):e.set(i-15+o,8,r,!0),o<8?e.set(8,i-o-1,r,!0):o<9?e.set(8,15-o-1+1,r,!0):e.set(8,15-o-1,r,!0);e.set(i-8,8,1,!0)}t.create=function(e,t){let n,c;if(void 0===e||""===e)throw Error("No input text");let g=r.M;return void 0!==t&&(g=r.from(t.errorCorrectionLevel,r.M),n=p.from(t.version),c=a.from(t.maskPattern),t.toSJISFunc&&o.setToSJISFunction(t.toSJISFunc)),function(e,t,n,r){let c;if(Array.isArray(e))c=m.fromArray(e);else if("string"==typeof e){let o=t;if(!o){let t=m.rawSplit(e);o=p.getBestVersionForData(t,n)}c=m.fromString(e,o||40)}else throw Error("Invalid data");let g=p.getBestVersionForData(c,n);if(!g)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<g)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+g+".\n")}else t=g;let b=function(e,t,n){let r=new i;n.forEach(function(t){r.put(t.mode.bit,4),r.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(r)});let s=(o.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t))*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);let l=(s-r.getLengthInBits())/8;for(let e=0;e<l;e++)r.put(e%2?17:236,8);return function(e,t,n){let r,i,s=o.getSymbolTotalCodewords(t),l=s-u.getTotalCodewordsCount(t,n),d=u.getBlocksCount(t,n),a=s%d,p=d-a,c=Math.floor(s/d),f=Math.floor(l/d),m=f+1,_=c-f,g=new h(_),b=0,y=Array(d),j=Array(d),E=0,w=new Uint8Array(e.buffer);for(let e=0;e<d;e++){let t=e<p?f:m;y[e]=w.slice(b,b+t),j[e]=g.encode(y[e]),b+=t,E=Math.max(E,t)}let T=new Uint8Array(s),C=0;for(r=0;r<E;r++)for(i=0;i<d;i++)r<y[i].length&&(T[C++]=y[i][r]);for(r=0;r<_;r++)for(i=0;i<d;i++)T[C++]=j[i][r];return T}(r,e,t)}(t,n,c),y=new s(o.getSymbolSize(t));!function(e,t){let n=e.size,o=d.getPositions(t);for(let t=0;t<o.length;t++){let r=o[t][0],i=o[t][1];for(let t=-1;t<=7;t++)if(!(r+t<=-1)&&!(n<=r+t))for(let o=-1;o<=7;o++)i+o<=-1||n<=i+o||(t>=0&&t<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===t||6===t)||t>=2&&t<=4&&o>=2&&o<=4?e.set(r+t,i+o,!0,!0):e.set(r+t,i+o,!1,!0))}}(y,t);let j=y.size;for(let e=8;e<j-8;e++){let t=e%2==0;y.set(e,6,t,!0),y.set(6,e,t,!0)}return!function(e,t){let n=l.getPositions(t);for(let t=0;t<n.length;t++){let o=n[t][0],r=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(o+t,r+n,!0,!0):e.set(o+t,r+n,!1,!0)}}(y,t),_(y,n,0),t>=7&&function(e,t){let n,o,r,i=e.size,s=p.getEncodedBits(t);for(let t=0;t<18;t++)n=Math.floor(t/3),o=t%3+i-8-3,r=(s>>t&1)==1,e.set(n,o,r,!0),e.set(o,n,r,!0)}(y,t),!function(e,t){let n=e.size,o=-1,r=n-1,i=7,s=0;for(let l=n-1;l>0;l-=2)for(6===l&&l--;;){for(let n=0;n<2;n++)if(!e.isReserved(r,l-n)){let o=!1;s<t.length&&(o=(t[s]>>>i&1)==1),e.set(r,l-n,o),-1==--i&&(s++,i=7)}if((r+=o)<0||n<=r){r-=o,o=-o;break}}}(y,b),isNaN(r)&&(r=a.getBestMask(y,_.bind(null,y,n))),a.applyMask(r,y),_(y,n,r),{modules:y,version:t,errorCorrectionLevel:n,maskPattern:r,segments:c}}(e,n,g,c)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js");function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=o.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let n=o.mod(t,this.genPoly),r=this.degree-n.length;if(r>0){let e=new Uint8Array(this.degree);return e.set(n,r),e}return n},e.exports=r},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js"(e,t){let n="[0-9]+",o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(o=o.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(o,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(r,"g"),t.NUMERIC=RegExp(n,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let i=RegExp("^"+o+"$"),s=RegExp("^"+n+"$"),l=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return l.test(e)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js"),d=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js"),a=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),u=n("../../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js");function h(e){return unescape(encodeURIComponent(e)).length}function p(e,t,n){let o,r=[];for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function c(e){let t,n,r=p(d.NUMERIC,o.NUMERIC,e),i=p(d.ALPHANUMERIC,o.ALPHANUMERIC,e);return a.isKanjiModeEnabled()?(t=p(d.BYTE,o.BYTE,e),n=p(d.KANJI,o.KANJI,e)):(t=p(d.BYTE_KANJI,o.BYTE,e),n=[]),r.concat(i,t,n).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case o.NUMERIC:return r.getBitsLength(e);case o.ALPHANUMERIC:return i.getBitsLength(e);case o.KANJI:return l.getBitsLength(e);case o.BYTE:return s.getBitsLength(e)}}function m(e,t){let n,d=o.getBestModeForData(e);if((n=o.from(t,d))!==o.BYTE&&n.bit<d.bit)throw Error('"'+e+'" cannot be encoded with mode '+o.toString(n)+".\n Suggested mode is: "+o.toString(d));switch(n===o.KANJI&&!a.isKanjiModeEnabled()&&(n=o.BYTE),n){case o.NUMERIC:return new r(e);case o.ALPHANUMERIC:return new i(e);case o.KANJI:return new l(e);case o.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},t.fromString=function(e,n){let r=function(e,t){let n={},r={start:{}},i=["start"];for(let s=0;s<e.length;s++){let l=e[s],d=[];for(let e=0;e<l.length;e++){let a=l[e],u=""+s+e;d.push(u),n[u]={node:a,lastCount:0},r[u]={};for(let e=0;e<i.length;e++){let s=i[e];n[s]&&n[s].node.mode===a.mode?(r[s][u]=f(n[s].lastCount+a.length,a.mode)-f(n[s].lastCount,a.mode),n[s].lastCount+=a.length):(n[s]&&(n[s].lastCount=a.length),r[s][u]=f(a.length,a.mode)+4+o.getCharCountIndicator(a.mode,t))}}i=d}for(let e=0;e<i.length;e++)r[i[e]].end=0;return{map:r,table:n}}(function(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];switch(r.mode){case o.NUMERIC:t.push([r,{data:r.data,mode:o.ALPHANUMERIC,length:r.length},{data:r.data,mode:o.BYTE,length:r.length}]);break;case o.ALPHANUMERIC:t.push([r,{data:r.data,mode:o.BYTE,length:r.length}]);break;case o.KANJI:t.push([r,{data:r.data,mode:o.BYTE,length:h(r.data)}]);break;case o.BYTE:t.push([{data:r.data,mode:o.BYTE,length:h(r.data)}])}}return t}(c(e,a.isKanjiModeEnabled())),n),i=u.find_path(r.map,"start","end"),s=[];for(let e=1;e<i.length-1;e++)s.push(r.table[i[e]].node);return t.fromArray(s.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(c(e,a.isKanjiModeEnabled()))}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"(e,t){let n,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];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return o[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js"(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js"),d=o.getBCHDigit(7973);function a(e,t){return s.getCharCountIndicator(e,t)+4}t.from=function(e,t){return l.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!l.isValid(e))throw Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);let i=(o.getSymbolTotalCodewords(e)-r.getTotalCodewordsCount(e,t))*8;if(n===s.MIXED)return i;let d=i-a(n,e);switch(n){case s.NUMERIC:return Math.floor(d/10*3);case s.ALPHANUMERIC:return Math.floor(d/11*2);case s.KANJI:return Math.floor(d/13);case s.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(e,n){let o,r=i.from(n,i.M);if(Array.isArray(e)){if(e.length>1){for(let n=1;n<=40;n++)if(function(e,t){let n=0;return e.forEach(function(e){let o=a(e.mode,t);n+=o+e.getBitsLength()}),n}(e,n)<=t.getCapacity(n,r,s.MIXED))return n;return}if(0===e.length)return 1;o=e[0]}else o=e;return function(e,n,o){for(let r=1;r<=40;r++)if(n<=t.getCapacity(r,o,e))return r}(o.mode,o.getLength(),r)},t.getEncodedBits=function(e){if(!l.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;o.getBCHDigit(t)-d>=0;)t^=7973<<o.getBCHDigit(t)-d;return e<<12|t}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/index.js"(e,t,n){e.exports=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/server.js")},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js");t.render=function(e,t,n){var r;let i=n,s=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(s=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),i=o.getOptions(i);let l=o.getImageWidth(e.modules.size,i),d=s.getContext("2d"),a=d.createImageData(l,l);return o.qrToImageData(a.data,e,i),r=s,d.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=l,r.width=l,r.style.height=l+"px",r.style.width=l+"px",d.putImageData(a,0,0),s},t.renderToDataURL=function(e,n,o){let r=o;void 0!==r||n&&n.getContext||(r=n,n=void 0),r||(r={});let i=t.render(e,n,r),s=r.type||"image/png",l=r.rendererOpts||{};return i.toDataURL(s,l.quality)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js"(e,t,n){let o=n("fs"),r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png.js").O,i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js");t.render=function(e,t){let n=i.getOptions(t),o=n.rendererOpts,s=i.getImageWidth(e.modules.size,n);o.width=s,o.height=s;let l=new r(o);return i.qrToImageData(l.data,e,n),l},t.renderToDataURL=function(e,n,o){void 0===o&&(o=n,n=void 0),t.renderToBuffer(e,n,function(e,t){e&&o(e);let n="data:image/png;base64,";n+=t.toString("base64"),o(null,n)})},t.renderToBuffer=function(e,n,o){void 0===o&&(o=n,n=void 0);let r=t.render(e,n),i=[];r.on("error",o),r.on("data",function(e){i.push(e)}),r.on("end",function(){o(null,Buffer.concat(i))}),r.pack()},t.renderToFile=function(e,n,r,i){void 0===i&&(i=r,r=void 0);let s=!1,l=(...e)=>{s||(s=!0,i.apply(null,e))},d=o.createWriteStream(e);d.on("error",l),d.on("close",l),t.renderToFileStream(d,n,r)},t.renderToFileStream=function(e,n,o){t.render(n,o).pack().pipe(e)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js");function r(e,t){let n=e.a/255,o=t+'="'+e.hex+'"';return n<1?o+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':o}function i(e,t,n){let o=e+t;return void 0!==n&&(o+=" "+n),o}t.render=function(e,t,n){let s=o.getOptions(t),l=e.modules.size,d=e.modules.data,a=l+2*s.margin,u=s.color.light.a?"<path "+r(s.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",h="<path "+r(s.color.dark,"stroke")+' d="'+function(e,t,n){let o="",r=0,s=!1,l=0;for(let d=0;d<e.length;d++){let a=Math.floor(d%t),u=Math.floor(d/t);a||s||(s=!0),e[d]?(l++,d>0&&a>0&&e[d-1]||(o+=s?i("M",a+n,.5+u+n):i("m",r,0),r=0,s=!1),a+1<t&&e[d+1]||(o+=i("h",l),l=0)):r++}return o}(d,l,s.margin)+'"/>',p='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+('viewBox="0 0 '+a+" ")+a+'" shape-rendering="crispEdges">'+u+h+"</svg>\n";return"function"==typeof n&&n(null,p),p}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg.js"(e,t,n){t.render=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js").render,t.renderToFile=function(e,o,r,i){void 0===i&&(i=r,r=void 0);let s=n("fs"),l=t.render(o,r);s.writeFile(e,'<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'+l,i)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal-small.js");t.render=function(e,t,n){return t&&t.small?r.render(e,t,n):o.render(e,t,n)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal-small.js"(e,t){let n="\x1b[37m",o="\x1b[30m",r="\x1b[0m",i="\x1b[47m"+o,s="\x1b[40m"+n,l=function(e,t,n,o){let r=t+1;return n>=r||o>=r||o<-1||n<-1?"0":n>=t||o>=t||o<0||n<0?"1":e[o*t+n]?"2":"1"},d=function(e,t,n,o){return l(e,t,n,o)+l(e,t,n,o+1)};t.render=function(e,t,l){var a,u;let h=e.modules.size,p=e.modules.data,c=!!(t&&t.inverse),f=t&&t.inverse?s:i,m={"00":r+" "+f,"01":r+(a=c?o:n)+"▄"+f,"02":r+(u=c?n:o)+"▄"+f,10:r+a+"▀"+f,11:" ",12:"▄",20:r+u+"▀"+f,21:"▀",22:"█"},_=r+"\n"+f,g=f;for(let e=-1;e<h+1;e+=2){for(let t=-1;t<h;t++)g+=m[d(p,h,t,e)];g+=m[d(p,h,h,e)]+_}return g+=r,"function"==typeof l&&l(null,g),g}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal.js"(e,t){t.render=function(e,t,n){let o=e.modules.size,r=e.modules.data,i="\x1b[47m \x1b[0m",s="",l=Array(o+3).join(i),d=[,,].join(i);s+=l+"\n";for(let e=0;e<o;++e){s+=i;for(let t=0;t<o;t++)s+=r[e*o+t]?"\x1b[40m \x1b[0m":i;s+=d+"\n"}return s+=l+"\n","function"==typeof n&&n(null,s),s}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utf8.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js"),r={WW:" ",WB:"▄",BB:"█",BW:"▀"},i={BB:" ",BW:"▄",WW:"█",WB:"▀"};t.render=function(e,t,n){let s=o.getOptions(t),l=r;("#ffffff"===s.color.dark.hex||"#000000"===s.color.light.hex)&&(l=i);let d=e.modules.size,a=e.modules.data,u="",h=Array(d+2*s.margin+1).join(l.WW);h=Array(s.margin/2+1).join(h+"\n");let p=Array(s.margin+1).join(l.WW);u+=h;for(let e=0;e<d;e+=2){u+=p;for(let t=0;t<d;t++){var c;let n=a[e*d+t],o=a[(e+1)*d+t];u+=(c=l,n&&o?c.BB:n&&!o?c.BW:!n&&o?c.WB:c.WW)}u+=p+"\n"}return u+=h.slice(0,-1),"function"==typeof n&&n(null,u),u},t.renderToFile=function(e,o,r,i){void 0===i&&(i=r,r=void 0);let s=n("fs"),l=t.render(o,r);s.writeFile(e,l,i)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js"(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,o=e.width&&e.width>=21?e.width:void 0,r=e.scale||4;return{width:o,scale:o?4:r,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){let o=t.getScale(e,n);return Math.floor((e+2*n.margin)*o)},t.qrToImageData=function(e,n,o){let r=n.modules.size,i=n.modules.data,s=t.getScale(r,o),l=Math.floor((r+2*o.margin)*s),d=o.margin*s,a=[o.color.light,o.color.dark];for(let t=0;t<l;t++)for(let n=0;n<l;n++){let u=(t*l+n)*4,h=o.color.light;t>=d&&n>=d&&t<l-d&&n<l-d&&(h=a[+!!i[Math.floor((t-d)/s)*r+Math.floor((n-d)/s)]]),e[u++]=h.r,e[u++]=h.g,e[u++]=h.b,e[u]=h.a}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/server.js"(e,t,n){let o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"),r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utf8.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal.js"),d=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg.js");function a(e,t,n){if(void 0===e)throw Error("String required as first argument");if(void 0===n&&(n=t,t={}),"function"!=typeof n)if(o())t=n||{},n=null;else throw Error("Callback required as last argument");return{opts:t,cb:n}}function u(e,t,n){if(!n.cb)return new Promise(function(o,i){try{let s=r.create(t,n.opts);return e(s,n.opts,function(e,t){return e?i(e):o(t)})}catch(e){i(e)}});try{let o=r.create(t,n.opts);return e(o,n.opts,n.cb)}catch(e){n.cb(e)}}t.create=r.create,n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js"),t.toString=function(e,t,n){let o=a(e,t,n);return u(function(e){switch(e){case"svg":return d;case"terminal":return l;default:return s}}(o.opts?o.opts.type:void 0).render,e,o)},t.toDataURL=function(e,t,n){let o=a(e,t,n);return u(function(e){switch(e){case"svg":return d;case"txt":case"utf8":return s;default:return i}}(o.opts.type).renderToDataURL,e,o)}}});let _=s("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/index.js");async function g(e){let t=await _.toDataURL(e,{margin:4,scale:8,errorCorrectionLevel:"L"});return`<!doctype html>
|
|
2
2
|
<html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
3
3
|
<title>豆包扫码</title>
|
|
4
4
|
<style>body{margin:32px;font-family:system-ui,sans-serif;background:#f5f6f8;color:#1f2329;text-align:center}main{display:flex;flex-wrap:wrap;justify-content:center;gap:24px}section{padding:24px;background:white;border-radius:12px}h2{font-size:18px}img{display:block;width:360px;max-width:100%;height:auto}p{color:#586174}</style>
|
|
5
5
|
<h1>使用豆包扫码</h1><p>使用手机豆包扫描下方二维码。</p>
|
|
6
|
-
<main><section><img src="${t}" alt="豆包二维码"></section></main><p>二维码过期或重新生成后,请从终端重新打开此页。</p></html>`}async function
|
|
7
|
-
${
|
|
8
|
-
${
|
|
9
|
-
`),!
|
|
6
|
+
<main><section><img src="${t}" alt="豆包二维码"></section></main><p>二维码过期或重新生成后,请从终端重新打开此页。</p></html>`}async function b(e,t=!1){if(!t){let t=await _.toString(e,{type:"utf8",margin:4}),n=t.replace(/\n$/,"").split("\n");return{width:t.split("\n")[0].length,text:n.map(e=>`\x1b[30;47m${e}\x1b[0m`).join("\n")}}let{modules:n}=_.create(e),o=Array.from({length:n.size+8},(e,t)=>t-4);return{width:2*o.length,text:o.map(e=>{let t=o.map(t=>t>=0&&e>=0&&t<n.size&&e<n.size&&n.get(e,t)?"\x1b[30;40m██":"\x1b[30;47m ").join("");return`${t}\x1b[0m`}).join("\n")}}async function y(e,t){let{name:n}=e.plugin,o={...a(e.plugin),version:t},r=AbortSignal.timeout(6e5);i.string().regex(/^\d+\.\d+\.\d+$/,"版本号须为 x.y.z 格式").parse(t),await m(o,r);let s=await h(o,r),l=s.preview?.preview_url;if(!l)throw Error("服务端未返回预览链接");await j({url:l,name:s.display_name||n,version:s.test_version||t,expiresAt:s.expires_at_ms})}async function j(i){let s,{url:a,name:h,version:m,expiresAt:_}=i,y=[`插件 ${h}`,`版本 ${m}`,..._?[`有效期至 ${new Date(Number(_)).toLocaleString("zh-CN",{hour12:!1})}(本地时间)`]:[]];if(console.log(`
|
|
7
|
+
${f.blue.bold("豆包扫码预览")}
|
|
8
|
+
${y.join("\n")}
|
|
9
|
+
`),!p()){console.log(`预览链接:${a}`),console.log(e((await b(a)).text));return}let j={async open(e){let i=await g(e);s??=await t.mkdtemp(o.join(n.tmpdir(),"dbx-qr-"));let d=o.join(s,"index.html");await t.writeFile(d,i,{mode:384}),await l(r(d).href)},async close(){s&&(await t.rm(s,{recursive:!0,force:!0}),s=void 0)}},E=!1;try{for(;;){let e=await b(a,E);process.stdout.columns&&e.width+2>process.stdout.columns?console.log("终端宽度不足,请拉宽窗口或选择“在浏览器中查看二维码”。"):console.log(e.text.split("\n").map(e=>` ${e}`).join("\n")),console.log("\n请使用豆包扫码预览。若无法识别,可切换二维码大小或在浏览器中查看。");let t=await d({message:"请选择操作",options:[{value:"change-size",label:`切换为${E?"小":"大"}尺寸二维码`},{value:"open-web",label:"在浏览器中查看二维码"},{value:"back",label:"完成并退出"}]});if(u(t)||"back"===t)return;if("change-size"===t)E=!E;else try{await j.open(a)}catch(e){console.log(`无法打开二维码页面:${c(e)}`)}}}finally{await j.close()}}export{y as showPreview};
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
`dbx audit` 处理当前草稿,不选择历史版本,也不接受 `--version`。CLI 读取草稿并显示本次提审版本,材料保存到草稿后,再保存对应版本并提交审核。提审前会检查全部页面中的审核记录,存在未结束审核时不重复提交。填写材料期间发现草稿版本变化,或保存接口返回版本与本次提审版本不一致时停止提审,重新运行前确认没有并行上传。
|
|
15
15
|
|
|
16
|
+
草稿包含应用插件时,CLI 保存审核材料和版本后等待该版本云构建成功,再核对草稿并提交审核。构建失败或超时会停止提审,已保存的审核材料和版本可在平台版本页查看。
|
|
17
|
+
|
|
16
18
|
审核中服务端禁止修改当前草稿,`upload --version` 也不能绕过。须等待审核结束,或仅在用户要求时撤回当前审核后再操作;后续草稿版本以服务端返回为准。
|
|
17
19
|
|
|
18
20
|
上传或 App 调试首次创建草稿时,使用 `plugin.json.publicationType`,类型配置规则见 [项目配置](project-config.md#pluginjson身份与展示信息)。`upload` 不提供类型或范围参数;企业专属插件首次创建草稿时默认仅本人,后续上传保留草稿范围。已有 ID 的审核与版本操作按 ID 定位;审核缺少本地 ID 时,按名称和项目发布类型查询已上传草稿并恢复 ID。确实没有草稿时先执行用户授权的上传,不通过审核命令隐式上传。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doubao-dev/cli",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.7",
|
|
4
4
|
"description": "Doubao Plugins CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"ofetch": "1.5.1",
|
|
37
37
|
"open": "10.1.0",
|
|
38
38
|
"ora": "8.1.0",
|
|
39
|
-
"@byted-doubao-apps/cli": "1.0.0-rc.
|
|
39
|
+
"@byted-doubao-apps/cli": "1.0.0-rc.7",
|
|
40
40
|
"@doubao-dev/kit": "0.9.0",
|
|
41
|
-
"@doubao-dev/plugin-app-dev": "1.0.0-rc.
|
|
41
|
+
"@doubao-dev/plugin-app-dev": "1.0.0-rc.7",
|
|
42
42
|
"@rslib/core": "1.0.0-beta.1",
|
|
43
43
|
"@types/node": "22.20.4",
|
|
44
44
|
"@types/qrcode": "1.5.6",
|