@junobuild/cli 0.9.0 → 0.9.1

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -709,7 +709,7 @@ ${t}`,Oce=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Ice=Obj
709
709
  `),u=iO(e);c===i&&n===u||(i=c,n=u,c=mle(c,u,{trim:!1,hard:!0,wordWrap:!1}),e.write(LB.eraseLines(r)+c),r=c.split(`
710
710
  `).length)};return o.clear=()=>{e.write(LB.eraseLines(r)),s()},o.done=()=>{s(),t||VB.show()},o}var Yce,iO,wle,Jce,Tle,Sle,xWe=Ki(()=>{LZe(),WZe(),gle(),vWe(),h$(),Yce=24,iO=({columns:e=80})=>e,wle=(e,t)=>{let r=e.rows??Yce,n=t.split(`
711
711
  `),i=Math.max(0,n.length-r);return i?bWe(t,f$(n.slice(0,i).join(`
712
- `)).length+1):t},Jce=YB(Gce.stdout),Tle=Jce,Sle=YB(Gce.stderr)});function _We(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var EWe=Ki(()=>{});function wWe(){let e=new Map;for(let[t,r]of Object.entries(Fi)){for(let[n,i]of Object.entries(r))Fi[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Fi[n],e.set(i[0],i[1]);Object.defineProperty(Fi,t,{value:r,enumerable:!1})}return Object.defineProperty(Fi,"codes",{value:e,enumerable:!1}),Fi.color.close="\x1B[39m",Fi.bgColor.close="\x1B[49m",Fi.color.ansi=JB(),Fi.color.ansi256=XB(),Fi.color.ansi16m=QB(),Fi.bgColor.ansi=JB(10),Fi.bgColor.ansi256=XB(10),Fi.bgColor.ansi16m=QB(10),Object.defineProperties(Fi,{rgbToAnsi256:{value:(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>Fi.rgbToAnsi256(...Fi.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>Fi.ansi256ToAnsi(Fi.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Fi.ansi256ToAnsi(Fi.hexToAnsi256(t)),enumerable:!1}}),Fi}var JB,XB,QB,Fi,TWe,Xce,Qce,SWe,eue,e$,DWe=Ki(()=>{JB=(e=0)=>t=>`\x1B[${t+e}m`,XB=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,QB=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Fi={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},TWe=Object.keys(Fi.modifier),Xce=Object.keys(Fi.color),Qce=Object.keys(Fi.bgColor),SWe=[...Xce,...Qce],eue=wWe(),e$=eue});function Um(e,t,r){let n=[...e],i=[],s=typeof r=="number"?r:n.length,o=!1,a,c=0,u="";for(let[l,p]of n.entries()){let d=!1;if(t$.includes(p)){let f=/\d[^m]*/.exec(e.slice(l,l+18));a=f&&f.length>0?f[0]:void 0,c<s&&(o=!0,a!==void 0&&i.push(a))}else o&&p==="m"&&(o=!1,d=!0);if(!o&&!d&&c++,!Dle.test(p)&&_We(p.codePointAt())&&(c++,typeof r!="number"&&s++),c>t&&c<=s)u+=p;else if(c===t&&!o&&a!==void 0)u=r$(i);else if(c>=s){u+=r$(i,!0,a);break}}return u}var Dle,t$,mE,r$,PWe=Ki(()=>{EWe(),DWe(),Dle=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,t$=["\x1B","\x9B"],mE=e=>`${t$[0]}[${e}m`,r$=(e,t,r)=>{let n=[];e=[...e];for(let i of e){let s=i;i.includes(";")&&(i=i.split(";")[0][0]+"0");let o=e$.codes.get(Number.parseInt(i,10));if(o){let a=e.indexOf(o.toString());a===-1?n.push(mE(t?o:s)):e.splice(a,1)}else if(t){n.push(mE(0));break}else n.push(mE(s))}if(t&&(n=n.filter((i,s)=>n.indexOf(i)===s),r!==void 0)){let i=mE(e$.codes.get(Number.parseInt(r,10)));n=n.reduce((s,o)=>o===i?[o,...s]:[...s,o],[])}return n.join("")}}),Ple={};fO(Ple,{default:()=>CWe});function QA(e,t,r){if(e.charAt(t)===" ")return t;let n=r?1:-1;for(let i=0;i<=3;i++){let s=t+i*n;if(e.charAt(s)===" ")return s}return t}function CWe(e,t,r={}){let{position:n="end",space:i=!1,preferTruncationOnSpace:s=!1}=r,{truncationCharacter:o="\u2026"}=r;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return o;let a=uf(e);if(a<=t)return e;if(n==="start"){if(s){let c=QA(e,a-t+1,!0);return o+Um(e,c,a).trim()}return i===!0&&(o+=" "),o+Um(e,a-t+uf(o),a)}if(n==="middle"){i===!0&&(o=` ${o} `);let c=Math.floor(t/2);if(s){let u=QA(e,c),l=QA(e,a-(t-c)+1,!0);return Um(e,0,u)+o+Um(e,l,a).trim()}return Um(e,0,c)+o+Um(e,a-(t-c)+uf(o),a)}if(n==="end"){if(s){let c=QA(e,t-1);return Um(e,0,c)+o}return i===!0&&(o=` ${o}`),Um(e,0,t-uf(o))+o}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${n}`)}var AWe=Ki(()=>{PWe(),dle()}),Cle=async({infile:e,outfile:t,banner:r})=>{await IWe();let{build:n,version:i}=await import("esbuild");await OWe(t,{force:!0});let{metafile:s,errors:o,warnings:a}=await n({entryPoints:[e],outfile:t,bundle:!0,minify:!0,treeShaking:!0,format:"esm",platform:"browser",write:!0,supported:{"top-level-await":!1,"inline-script":!1},define:{self:"globalThis"},metafile:!0,banner:r});return{metafile:s,errors:o,warnings:a,version:i}},IWe=async()=>{try{await import("esbuild")}catch{console.error("Esbuild is required to build your functions. Please install it by running: npm i esbuild"),process.exit(1)}},mO="build",NWe=[],FWe=[],Gb={pattern:"**/*.+(css|js|mjs|html)",mode:"both",algorithm:"gzip"},kWe=[".ds_store","thumbs.db"],m$=20,Ky="#dapp",y$="#_juno/releases",Ile=async(e,t,r)=>await $We(e,r)?[n$(e),t.map(n=>UWe(n)),{...r,shell:!0}]:[e,t,r],$We=async(e,{shell:t,cwd:r,env:n=rue.env})=>rue.platform==="win32"&&!t&&!await jWe(e,r,n),jWe=async(e,t,{Path:r="",PATH:n=r})=>Nle.some(i=>e.toLowerCase().endsWith(i))||(LWe[`${e}\0${t}\0${n}`]??=await MWe(e,t,n)),LWe={},MWe=async(e,t,r)=>{let n=r.split(tue.delimiter).filter(Boolean).map(i=>i.replace(/^"(.*)"$/,"$1"));try{await Promise.all(Nle.flatMap(i=>[t,...n].filter(Ole.nonNullish).map(s=>`${tue.resolve(s instanceof BWe?s.toString():s,e)}${i}`)).map(async i=>{try{await RWe(i)}catch{return}throw 0}))}catch{return!0}return!1},Nle=[".exe",".com"],UWe=e=>n$(n$(`"${e.replaceAll(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`)),n$=e=>e.replaceAll(/([()\][%!^"`<>&|;, *?])/g,"^$1"),Ls=async({command:e,cwd:t,args:r,env:n,stdout:i,silentOut:s=!1,silentErrors:o=!1})=>await new Promise(async(a,c)=>{let[u,l,p]=await Ile(e,r??[],{shell:!0,...(0,_E.nonNullish)(t)&&{cwd:t},...(0,_E.nonNullish)(n)&&{env:n}}),d=Ale(u,l,p);d.stdout.on("data",f=>{if((0,_E.nonNullish)(i)){i(`${f}`);return}s||console.log(`${f}`)}),d.stderr.on("data",f=>{o||c(new Error(`${f}`))}),d.on("close",f=>{a(f)}),d.on("error",f=>{c(f)})}),na=async({command:e,args:t,env:r})=>await new Promise(async n=>{let[i,s,o]=await Ile(e,t??[],{stdio:"inherit",...(0,_E.nonNullish)(r)&&{env:r}});Ale(i,s??[],o).on("close",a=>{if(a===0){n(a);return}process.exit(1)})}),Fle=async e=>{for(let t of e??[]){let[r,...n]=t.split(" ");await na({command:r,args:n})}},ZWe="End-Of-Stream",$a=class extends Error{constructor(){super(ZWe),this.name="EndOfStreamError"}},kle=class extends Error{constructor(e="The operation was aborted"){super(e),this.name="AbortError"}},WWe=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((e,t)=>{this.reject=t,this.resolve=e})}},g$=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(e,t=!1){let r=await this.read(e,t);return this.peekQueue.push(e.subarray(0,r)),r}async read(e,t=!1){if(e.length===0)return 0;let r=this.readFromPeekBuffer(e);if(this.endOfStream||(r+=await this.readRemainderFromStream(e.subarray(r),t)),r===0)throw new $a;return r}readFromPeekBuffer(e){let t=e.length,r=0;for(;this.peekQueue.length>0&&t>0;){let n=this.peekQueue.pop();if(!n)throw new Error("peekData should be defined");let i=Math.min(n.length,t);e.set(n.subarray(0,i),r),r+=i,t-=i,i<n.length&&this.peekQueue.push(n.subarray(i))}return r}async readRemainderFromStream(e,t){let r=0;for(;r<e.length&&!this.endOfStream;){if(this.interrupted)throw new kle;let n=await this.readFromStream(e.subarray(r),t);if(n===0)break;r+=n}if(!t&&r<e.length)throw new $a;return r}},GWe=class extends g${constructor(e){if(super(),this.s=e,this.deferred=null,!e.read||!e.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>{this.endOfStream=!0,this.deferred&&this.deferred.resolve(0)}),this.s.once("error",t=>this.reject(t)),this.s.once("close",()=>this.abort())}async readFromStream(e,t){if(e.length===0)return 0;let r=this.s.read(e.length);if(r)return e.set(r),r.length;let n={buffer:e,mayBeLess:t,deferred:new WWe};return this.deferred=n.deferred,this.s.once("readable",()=>{this.readDeferred(n)}),n.deferred.promise}readDeferred(e){let t=this.s.read(e.buffer.length);t?(e.buffer.set(t),e.deferred.resolve(t.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(e)})}reject(e){this.interrupted=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}async abort(){this.reject(new kle)}async close(){return this.abort()}},YWe=class extends g${constructor(e){super(),this.reader=e}async abort(){return this.close()}async close(){this.reader.releaseLock()}},JWe=class extends YWe{async readFromStream(e,t){if(e.length===0)return 0;let r=await this.reader.read(new Uint8Array(e.length),{min:t?void 0:e.length});return r.done&&(this.endOfStream=r.done),r.value?(e.set(r.value),r.value.length):0}},iue=class extends g${constructor(e){super(),this.reader=e,this.buffer=null}writeChunk(e,t){let r=Math.min(t.length,e.length);return e.set(t.subarray(0,r)),r<t.length?this.buffer=t.subarray(r):this.buffer=null,r}async readFromStream(e,t){if(e.length===0)return 0;let r=0;for(this.buffer&&(r+=this.writeChunk(e,this.buffer));r<e.length&&!this.endOfStream;){let n=await this.reader.read();if(n.done){this.endOfStream=!0;break}n.value&&(r+=this.writeChunk(e.subarray(r),n.value))}if(r===0&&this.endOfStream)throw new $a;return r}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}};function XWe(e){try{let t=e.getReader({mode:"byob"});return t instanceof ReadableStreamDefaultReader?new iue(t):new JWe(t)}catch(t){if(t instanceof TypeError)return new iue(e.getReader());throw t}}var b$=class{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new $a;return e.get(r,0)}async peekToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new $a;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new $a;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new $a;return e.get(this.numBuffer,0)}async ignore(e){if(this.fileInfo.size!==void 0){let t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(e,t){if(!this.supportsRandomAccess()&&t&&t.position!==void 0&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:e.length,position:this.position,...t}}abort(){return Promise.resolve()}},QWe=256e3,Rle=class extends b${constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.fileInfo??{}}async readBuffer(e,t){let r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(r.length===0)return 0;let i=await this.streamReader.read(e.subarray(0,r.length),r.mayBeLess);if(this.position+=i,(!t||!t.mayBeLess)&&i<r.length)throw new $a;return i}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=0;if(r.position){let i=r.position-this.position;if(i>0){let s=new Uint8Array(r.length+i);return n=await this.peekBuffer(s,{mayBeLess:r.mayBeLess}),e.set(s.subarray(i)),n-i}if(i<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e.subarray(0,r.length),r.mayBeLess)}catch(i){if(t?.mayBeLess&&i instanceof $a)return 0;throw i}if(!r.mayBeLess&&n<r.length)throw new $a}return n}async ignore(e){let t=Math.min(QWe,e),r=new Uint8Array(t),n=0;for(;n<e;){let i=e-n,s=await this.readBuffer(r,{length:Math.min(t,i)});if(s<0)return s;n+=s}return n}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}},eGe=class extends b${constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},size:e.length}}async readBuffer(e,t){t?.position&&(this.position=t.position);let r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new $a;return e.set(this.uint8Array.subarray(r.position,r.position+n)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}};function tGe(e,t){let r=new GWe(e),n=t??{},i=n.onClose;return n.onClose=async()=>{if(await r.close(),i)return i()},new Rle(r,n)}function Ble(e,t){let r=XWe(e),n=t??{},i=n.onClose;return n.onClose=async()=>{if(await r.close(),i)return i()},new Rle(r,n)}function rGe(e,t){return new eGe(e,t)}var iGe=class $le extends b${static async fromFile(t){let r=await nGe(t,"r"),n=await r.stat();return new $le(r,{fileInfo:{path:t,size:n.size}})}constructor(t,r){super(r),this.fileHandle=t,this.fileInfo=r.fileInfo}async readBuffer(t,r){let n=this.normalizeOptions(t,r);if(this.position=n.position,n.length===0)return 0;let i=await this.fileHandle.read(t,0,n.length,n.position);if(this.position+=i.bytesRead,i.bytesRead<n.length&&(!r||!r.mayBeLess))throw new $a;return i.bytesRead}async peekBuffer(t,r){let n=this.normalizeOptions(t,r),i=await this.fileHandle.read(t,0,n.length,n.position);if(!n.mayBeLess&&i.bytesRead<n.length)throw new $a;return i.bytesRead}async close(){return await this.fileHandle.close(),super.close()}setPosition(t){this.position=t}supportsRandomAccess(){return!0}};async function sGe(e,t){let r=tGe(e,t);if(e.path){let n=await KWe(e.path);r.fileInfo.path=e.path,r.fileInfo.size=n.size}return r}var oGe=iGe.fromFile,BEr=ev(pZe(),1);function yc(e){return new DataView(e.buffer,e.byteOffset)}var aGe={len:1,get(e,t){return yc(e).getUint8(t)},put(e,t,r){return yc(e).setUint8(t,r),t+1}},gs={len:2,get(e,t){return yc(e).getUint16(t,!0)},put(e,t,r){return yc(e).setUint16(t,r,!0),t+2}},yE={len:2,get(e,t){return yc(e).getUint16(t)},put(e,t,r){return yc(e).setUint16(t,r),t+2}},mo={len:4,get(e,t){return yc(e).getUint32(t,!0)},put(e,t,r){return yc(e).setUint32(t,r,!0),t+4}},cGe={len:4,get(e,t){return yc(e).getUint32(t)},put(e,t,r){return yc(e).setUint32(t,r),t+4}},uGe={len:4,get(e,t){return yc(e).getInt32(t)},put(e,t,r){return yc(e).setInt32(t,r),t+4}},lGe={len:8,get(e,t){return yc(e).getBigUint64(t,!0)},put(e,t,r){return yc(e).setBigUint64(t,r,!0),t+8}},cf=class{constructor(e,t){this.len=e,this.encoding=t,this.textDecoder=new TextDecoder(t)}get(e,t){return this.textDecoder.decode(e.subarray(t,t+this.len))}},dGe=pGe("/"),fGe;try{fGe=dGe("worker_threads").Worker}catch{}var zc=Uint8Array,Yb=Uint16Array,hGe=Int32Array,jle=new zc([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Lle=new zc([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),mGe=new zc([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Mle=function(e,t){for(var r=new Yb(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new hGe(r[30]),n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},Ule=Mle(jle,2),qle=Ule.b,yGe=Ule.r;qle[28]=258,yGe[258]=28;var Vle=Mle(Lle,0),gGe=Vle.b,jEr=Vle.r,i$=new Yb(32768);for(Un=0;Un<32768;++Un)af=(Un&43690)>>1|(Un&21845)<<1,af=(af&52428)>>2|(af&13107)<<2,af=(af&61680)>>4|(af&3855)<<4,i$[Un]=((af&65280)>>8|(af&255)<<8)>>1;var af,Un,EE=(function(e,t,r){for(var n=e.length,i=0,s=new Yb(t);i<n;++i)e[i]&&++s[e[i]-1];var o=new Yb(t);for(i=1;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;var a;if(r){a=new Yb(1<<t);var c=15-t;for(i=0;i<n;++i)if(e[i])for(var u=i<<4|e[i],l=t-e[i],p=o[e[i]-1]++<<l,d=p|(1<<l)-1;p<=d;++p)a[i$[p]>>c]=u}else for(a=new Yb(n),i=0;i<n;++i)e[i]&&(a[i]=i$[o[e[i]-1]++]>>15-e[i]);return a}),PE=new zc(288);for(Un=0;Un<144;++Un)PE[Un]=8;var Un;for(Un=144;Un<256;++Un)PE[Un]=9;var Un;for(Un=256;Un<280;++Un)PE[Un]=7;var Un;for(Un=280;Un<288;++Un)PE[Un]=8;var Un,zle=new zc(32);for(Un=0;Un<32;++Un)zle[Un]=5;var Un,bGe=EE(PE,9,1),vGe=EE(zle,5,1),FB=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},wl=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},kB=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},xGe=function(e){return(e+7)/8|0},_Ge=function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new zc(e.subarray(t,r))},EGe=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Vc=function(e,t,r){var n=new Error(t||EGe[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Vc),!r)throw n;return n},v$=function(e,t,r,n){var i=e.length,s=n?n.length:0;if(!i||t.f&&!t.l)return r||new zc(0);var o=!r,a=o||t.i!=2,c=t.i;o&&(r=new zc(i*3));var u=function(rt){var mt=r.length;if(rt>mt){var Nt=new zc(Math.max(mt*2,rt));Nt.set(r),r=Nt}},l=t.f||0,p=t.p||0,d=t.b||0,f=t.l,h=t.d,m=t.m,y=t.n,g=i*8;do{if(!f){l=wl(e,p,1);var v=wl(e,p+1,3);if(p+=3,v)if(v==1)f=bGe,h=vGe,m=9,y=5;else if(v==2){var b=wl(e,p,31)+257,_=wl(e,p+10,15)+4,w=b+wl(e,p+5,31)+1;p+=14;for(var P=new zc(w),D=new zc(19),F=0;F<_;++F)D[mGe[F]]=wl(e,p+F*3,7);p+=_*3;for(var A=FB(D),H=(1<<A)-1,Z=EE(D,A,1),F=0;F<w;){var G=Z[wl(e,p,H)];p+=G&15;var O=G>>4;if(O<16)P[F++]=O;else{var N=0,K=0;for(O==16?(K=3+wl(e,p,3),p+=2,N=P[F-1]):O==17?(K=3+wl(e,p,7),p+=3):O==18&&(K=11+wl(e,p,127),p+=7);K--;)P[F++]=N}}var te=P.subarray(0,b),W=P.subarray(b);m=FB(te),y=FB(W),f=EE(te,m,1),h=EE(W,y,1)}else Vc(1);else{var O=xGe(p)+4,I=e[O-4]|e[O-3]<<8,S=O+I;if(S>i){c&&Vc(0);break}a&&u(d+I),r.set(e.subarray(O,S),d),t.b=d+=I,t.p=p=S*8,t.f=l;continue}if(p>g){c&&Vc(0);break}}a&&u(d+131072);for(var B=(1<<m)-1,Y=(1<<y)-1,X=p;;X=p){var N=f[kB(e,p)&B],ue=N>>4;if(p+=N&15,p>g){c&&Vc(0);break}if(N||Vc(2),ue<256)r[d++]=ue;else if(ue==256){X=p,f=null;break}else{var he=ue-254;if(ue>264){var F=ue-257,pe=jle[F];he=wl(e,p,(1<<pe)-1)+qle[F],p+=pe}var Te=h[kB(e,p)&Y],Pe=Te>>4;Te||Vc(3),p+=Te&15;var W=gGe[Pe];if(Pe>3){var pe=Lle[Pe];W+=kB(e,p)&(1<<pe)-1,p+=pe}if(p>g){c&&Vc(0);break}a&&u(d+131072);var He=d+he;if(d<W){var Ie=s-W,Ne=Math.min(W,He);for(Ie+d<0&&Vc(3);d<Ne;++d)r[d]=n[Ie+d]}for(;d<He;++d)r[d]=r[d-W]}}t.l=f,t.p=X,t.b=d,t.f=l,f&&(l=1,t.m=m,t.d=h,t.n=y)}while(!l);return d!=r.length&&o?_Ge(r,0,d):r.subarray(0,d)},wGe=new zc(0),TGe=function(e){(e[0]!=31||e[1]!=139||e[2]!=8)&&Vc(6,"invalid gzip data");var t=e[3],r=10;t&4&&(r+=(e[10]|e[11]<<8)+2);for(var n=(t>>3&1)+(t>>4&1);n>0;n-=!e[r++]);return r+(t&2)},SGe=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},DGe=function(e,t){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&Vc(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&Vc(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2};function PGe(e,t){return v$(e,{i:2},t&&t.out,t&&t.dictionary)}function CGe(e,t){var r=TGe(e);return r+8>e.length&&Vc(6,"invalid gzip data"),v$(e.subarray(r,-8),{i:2},t&&t.out||new zc(SGe(e)),t&&t.dictionary)}function AGe(e,t){return v$(e.subarray(DGe(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}function OGe(e,t){return e[0]==31&&e[1]==139&&e[2]==8?CGe(e,t):(e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31?PGe(e,t):AGe(e,t)}var IGe=typeof TextDecoder<"u"&&new TextDecoder,NGe=0;try{IGe.decode(wGe,{stream:!0}),NGe=1}catch{}var FGe=ev(gZe(),1),Jb={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},sue={get(e){let t=gs.get(e,6);return{signature:mo.get(e,0),compressedSize:mo.get(e,8),uncompressedSize:mo.get(e,12)}},len:16},kGe={get(e){let t=gs.get(e,6);return{signature:mo.get(e,0),minVersion:gs.get(e,4),dataDescriptor:!!(t&8),compressedMethod:gs.get(e,8),compressedSize:mo.get(e,18),uncompressedSize:mo.get(e,22),filenameLength:gs.get(e,26),extraFieldLength:gs.get(e,28),filename:null}},len:30},RGe={get(e){return{signature:mo.get(e,0),nrOfThisDisk:gs.get(e,4),nrOfThisDiskWithTheStart:gs.get(e,6),nrOfEntriesOnThisDisk:gs.get(e,8),nrOfEntriesOfSize:gs.get(e,10),sizeOfCd:mo.get(e,12),offsetOfStartOfCd:mo.get(e,16),zipFileCommentLength:gs.get(e,20)}},len:22},BGe={get(e){let t=gs.get(e,8);return{signature:mo.get(e,0),minVersion:gs.get(e,6),dataDescriptor:!!(t&8),compressedMethod:gs.get(e,10),compressedSize:mo.get(e,20),uncompressedSize:mo.get(e,24),filenameLength:gs.get(e,28),extraFieldLength:gs.get(e,30),fileCommentLength:gs.get(e,32),relativeOffsetOfLocalHeader:mo.get(e,42),filename:null}},len:46};function Hle(e){let t=new Uint8Array(mo.len);return mo.put(t,0,e),t}var kp=(0,FGe.default)("tokenizer:inflate"),RB=256*1024,$Ge=Hle(Jb.DataDescriptor),eO=Hle(Jb.EndOfCentralDirectory),jGe=class{constructor(e){this.tokenizer=e,this.syncBuffer=new Uint8Array(RB)}async isZip(){return await this.peekSignature()===Jb.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(mo)}async findEndOfCentralDirectoryLocator(){let e=this.tokenizer,t=Math.min(16*1024,e.fileInfo.size),r=this.syncBuffer.subarray(0,t);await this.tokenizer.readBuffer(r,{position:e.fileInfo.size-t});for(let n=r.length-4;n>=0;n--)if(r[n]===eO[0]&&r[n+1]===eO[1]&&r[n+2]===eO[2]&&r[n+3]===eO[3])return e.fileInfo.size-t+n;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){kp("Cannot reading central-directory without random-read support");return}kp("Reading central-directory...");let e=this.tokenizer.position,t=await this.findEndOfCentralDirectoryLocator();if(t>0){kp("Central-directory 32-bit signature found");let r=await this.tokenizer.readToken(RGe,t),n=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let i=0;i<r.nrOfEntriesOfSize;++i){let s=await this.tokenizer.readToken(BGe);if(s.signature!==Jb.CentralFileHeader)throw new Error("Expected Central-File-Header signature");s.filename=await this.tokenizer.readToken(new cf(s.filenameLength,"utf-8")),await this.tokenizer.ignore(s.extraFieldLength),await this.tokenizer.ignore(s.fileCommentLength),n.push(s),kp(`Add central-directory file-entry: n=${i+1}/${n.length}: filename=${n[i].filename}`)}return this.tokenizer.setPosition(e),n}this.tokenizer.setPosition(e)}async unzip(e){let t=await this.readCentralDirectory();if(t)return this.iterateOverCentralDirectory(t,e);let r=!1;do{let n=await this.readLocalFileHeader();if(!n)break;let i=e(n);r=!!i.stop;let s;if(await this.tokenizer.ignore(n.extraFieldLength),n.dataDescriptor&&n.compressedSize===0){let o=[],a=RB;kp("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let c=-1;for(;c<0&&a===RB;){a=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),c=LGe(this.syncBuffer.subarray(0,a),$Ge);let u=c>=0?c:a;if(i.handler){let l=new Uint8Array(u);await this.tokenizer.readBuffer(l),o.push(l)}else await this.tokenizer.ignore(u)}kp(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),i.handler&&await this.inflate(n,MGe(o),i.handler)}else i.handler?(kp(`Reading compressed-file-data: ${n.compressedSize} bytes`),s=new Uint8Array(n.compressedSize),await this.tokenizer.readBuffer(s),await this.inflate(n,s,i.handler)):(kp(`Ignoring compressed-file-data: ${n.compressedSize} bytes`),await this.tokenizer.ignore(n.compressedSize));if(kp(`Reading data-descriptor at pos=${this.tokenizer.position}`),n.dataDescriptor&&(await this.tokenizer.readToken(sue)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-sue.len}`)}while(!r)}async iterateOverCentralDirectory(e,t){for(let r of e){let n=t(r);if(n.handler){this.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);let i=await this.readLocalFileHeader();if(i){await this.tokenizer.ignore(i.extraFieldLength);let s=new Uint8Array(r.compressedSize);await this.tokenizer.readBuffer(s),await this.inflate(i,s,n.handler)}}if(n.stop)break}}inflate(e,t,r){if(e.compressedMethod===0)return r(t);kp(`Decompress filename=${e.filename}, compressed-size=${t.length}`);let n=OGe(t);return r(n)}async readLocalFileHeader(){let e=await this.tokenizer.peekToken(mo);if(e===Jb.LocalFileHeader){let t=await this.tokenizer.readToken(kGe);return t.filename=await this.tokenizer.readToken(new cf(t.filenameLength,"utf-8")),t}if(e===Jb.CentralFileHeader)return!1;throw e===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}};function LGe(e,t){let r=e.length,n=t.length;if(n>r)return-1;for(let i=0;i<=r-n;i++){let s=!0;for(let o=0;o<n;o++)if(e[i+o]!==t[o]){s=!1;break}if(s)return i}return-1}function MGe(e){let t=e.reduce((i,s)=>i+s.length,0),r=new Uint8Array(t),n=0;for(let i of e)r.set(i,n),n+=i.length;return r}var LEr={utf8:new globalThis.TextDecoder("utf8")},MEr=new globalThis.TextEncoder,UEr=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function oue(e){let{byteLength:t}=e;if(t===6)return e.getUint16(0)*2**32+e.getUint32(2);if(t===5)return e.getUint8(0)*2**32+e.getUint32(1);if(t===4)return e.getUint32(0);if(t===3)return e.getUint8(0)*2**16+e.getUint16(1);if(t===2)return e.getUint16(0);if(t===1)return e.getUint8(0)}function UGe(e){return[...e].map(t=>t.charCodeAt(0))}function qGe(e,t=0){let r=Number.parseInt(new cf(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(r))return!1;let n=256;for(let i=t;i<t+148;i++)n+=e[i];for(let i=t+156;i<t+512;i++)n+=e[i];return r===n}var VGe={get:(e,t)=>e[t+3]&127|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},zGe=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","rm","ppsm","ppsx"],HGe=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia"],sO=4100;function BB(e){switch(e=e.toLowerCase(),e){case"application/epub+zip":return{ext:"epub",mime:e};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:e};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:e};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:e};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:e};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:e};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:e};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:e};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:e};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:e};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:e};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:e};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:e};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:e};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:e};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:e};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function Rp(e,t,r){r={offset:0,...r};for(let[n,i]of t.entries())if(r.mask){if(i!==(r.mask[n]&e[n+r.offset]))return!1}else if(i!==e[n+r.offset])return!1;return!0}var KGe=class{constructor(e){this.options={mpegOffsetTolerance:0,...e},this.detectors=[...e?.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:e?.signal}}async fromTokenizer(e){let t=e.position;for(let r of this.detectors){let n=await r.detect(e);if(n)return n;if(t!==e.position)return}}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t?.length>1)return this.fromTokenizer(rGe(t,this.tokenizerOptions))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){let t=await Ble(e,this.tokenizerOptions);try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){let{sampleSize:r=sO}=t,n,i,s=e.getReader({mode:"byob"});try{let{value:c,done:u}=await s.read(new Uint8Array(r));if(i=c,!u&&c)try{n=await this.fromBuffer(c.subarray(0,r))}catch(l){if(!(l instanceof $a))throw l;n=void 0}i=c}finally{s.releaseLock()}let o=new TransformStream({async start(c){c.enqueue(i)},transform(c,u){u.enqueue(c)}}),a=e.pipeThrough(o);return a.fileType=n,a}check(e,t){return Rp(this.buffer,e,t)}checkString(e,t){return this.check(UGe(e),t)}detectConfident=async e=>{if(this.buffer=new Uint8Array(sO),e.fileInfo.size===void 0&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,await e.peekBuffer(this.buffer,{length:12,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.tokenizer.ignore(3),this.detectConfident(e);if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await e.ignore(6);let t=await e.readToken(VGe);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),this.fromTokenizer(e))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let t;return await new jGe(e).unzip(r=>{switch(r.filename){case"META-INF/mozilla.rsa":return t={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return t={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return{async handler(n){let i=new TextDecoder("utf-8").decode(n).trim();t=BB(i)},stop:!0};case"[Content_Types].xml":return{async handler(n){let i=new TextDecoder("utf-8").decode(n),s=i.indexOf('.main+xml"');if(s===-1){let o="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";i.includes(`ContentType="${o}"`)&&(t=BB(o))}else{i=i.slice(0,Math.max(0,s));let o=i.lastIndexOf('"'),a=i.slice(Math.max(0,o+1));t=BB(a)}},stop:!0};default:return/classes\d*\.dex/.test(r.filename)?(t={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}}),t??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);let t=new Uint8Array(8);return await e.readBuffer(t),Rp(t,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:Rp(t,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:Rp(t,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:Rp(t,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:Rp(t,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:Rp(t,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let t=await this.readTiffHeader(!1);if(t)return t}if(this.check([77,77])){let t=await this.readTiffHeader(!0);if(t)return t}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function t(){let s=await e.peekNumber(aGe),o=128,a=0;for(;(s&o)===0&&o!==0;)++a,o>>=1;let c=new Uint8Array(a+1);return await e.readBuffer(c),c}async function r(){let s=await t(),o=await t();o[0]^=128>>o.length-1;let a=Math.min(6,o.length),c=new DataView(s.buffer),u=new DataView(o.buffer,o.length-a,a);return{id:oue(c),len:oue(u)}}async function n(s){for(;s>0;){let o=await r();if(o.id===17026)return(await e.readToken(new cf(o.len))).replaceAll(/\00.*$/g,"");await e.ignore(o.len),--s}}let i=await r();switch(await n(i.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190]))return{ext:"class",mime:"application/java-vm"};if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(this.buffer[6]===0||this.buffer[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){let t=new cf(4,"latin1").get(this.buffer,2);if(t.match("^d*")&&t>=1e3&&t<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await e.ignore(8),await e.readToken(new cf(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[`
712
+ `)).length+1):t},Jce=YB(Gce.stdout),Tle=Jce,Sle=YB(Gce.stderr)});function _We(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var EWe=Ki(()=>{});function wWe(){let e=new Map;for(let[t,r]of Object.entries(Fi)){for(let[n,i]of Object.entries(r))Fi[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Fi[n],e.set(i[0],i[1]);Object.defineProperty(Fi,t,{value:r,enumerable:!1})}return Object.defineProperty(Fi,"codes",{value:e,enumerable:!1}),Fi.color.close="\x1B[39m",Fi.bgColor.close="\x1B[49m",Fi.color.ansi=JB(),Fi.color.ansi256=XB(),Fi.color.ansi16m=QB(),Fi.bgColor.ansi=JB(10),Fi.bgColor.ansi256=XB(10),Fi.bgColor.ansi16m=QB(10),Object.defineProperties(Fi,{rgbToAnsi256:{value:(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>Fi.rgbToAnsi256(...Fi.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>Fi.ansi256ToAnsi(Fi.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Fi.ansi256ToAnsi(Fi.hexToAnsi256(t)),enumerable:!1}}),Fi}var JB,XB,QB,Fi,TWe,Xce,Qce,SWe,eue,e$,DWe=Ki(()=>{JB=(e=0)=>t=>`\x1B[${t+e}m`,XB=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,QB=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Fi={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},TWe=Object.keys(Fi.modifier),Xce=Object.keys(Fi.color),Qce=Object.keys(Fi.bgColor),SWe=[...Xce,...Qce],eue=wWe(),e$=eue});function Um(e,t,r){let n=[...e],i=[],s=typeof r=="number"?r:n.length,o=!1,a,c=0,u="";for(let[l,p]of n.entries()){let d=!1;if(t$.includes(p)){let f=/\d[^m]*/.exec(e.slice(l,l+18));a=f&&f.length>0?f[0]:void 0,c<s&&(o=!0,a!==void 0&&i.push(a))}else o&&p==="m"&&(o=!1,d=!0);if(!o&&!d&&c++,!Dle.test(p)&&_We(p.codePointAt())&&(c++,typeof r!="number"&&s++),c>t&&c<=s)u+=p;else if(c===t&&!o&&a!==void 0)u=r$(i);else if(c>=s){u+=r$(i,!0,a);break}}return u}var Dle,t$,mE,r$,PWe=Ki(()=>{EWe(),DWe(),Dle=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,t$=["\x1B","\x9B"],mE=e=>`${t$[0]}[${e}m`,r$=(e,t,r)=>{let n=[];e=[...e];for(let i of e){let s=i;i.includes(";")&&(i=i.split(";")[0][0]+"0");let o=e$.codes.get(Number.parseInt(i,10));if(o){let a=e.indexOf(o.toString());a===-1?n.push(mE(t?o:s)):e.splice(a,1)}else if(t){n.push(mE(0));break}else n.push(mE(s))}if(t&&(n=n.filter((i,s)=>n.indexOf(i)===s),r!==void 0)){let i=mE(e$.codes.get(Number.parseInt(r,10)));n=n.reduce((s,o)=>o===i?[o,...s]:[...s,o],[])}return n.join("")}}),Ple={};fO(Ple,{default:()=>CWe});function QA(e,t,r){if(e.charAt(t)===" ")return t;let n=r?1:-1;for(let i=0;i<=3;i++){let s=t+i*n;if(e.charAt(s)===" ")return s}return t}function CWe(e,t,r={}){let{position:n="end",space:i=!1,preferTruncationOnSpace:s=!1}=r,{truncationCharacter:o="\u2026"}=r;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return o;let a=uf(e);if(a<=t)return e;if(n==="start"){if(s){let c=QA(e,a-t+1,!0);return o+Um(e,c,a).trim()}return i===!0&&(o+=" "),o+Um(e,a-t+uf(o),a)}if(n==="middle"){i===!0&&(o=` ${o} `);let c=Math.floor(t/2);if(s){let u=QA(e,c),l=QA(e,a-(t-c)+1,!0);return Um(e,0,u)+o+Um(e,l,a).trim()}return Um(e,0,c)+o+Um(e,a-(t-c)+uf(o),a)}if(n==="end"){if(s){let c=QA(e,t-1);return Um(e,0,c)+o}return i===!0&&(o=` ${o}`),Um(e,0,t-uf(o))+o}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${n}`)}var AWe=Ki(()=>{PWe(),dle()}),Cle=async({infile:e,outfile:t,banner:r})=>{await IWe();let{build:n,version:i}=await import("esbuild");await OWe(t,{force:!0});let{metafile:s,errors:o,warnings:a}=await n({entryPoints:[e],outfile:t,bundle:!0,minify:!0,treeShaking:!0,format:"esm",platform:"browser",write:!0,supported:{"top-level-await":!1,"inline-script":!1},define:{self:"globalThis"},metafile:!0,banner:r});return{metafile:s,errors:o,warnings:a,version:i}},IWe=async()=>{try{await import("esbuild")}catch{console.error("Esbuild is required to build your functions. Please install it by running: npm i esbuild"),process.exit(1)}},mO="build",NWe=[],FWe=[],Gb={pattern:"**/*.+(css|js|mjs|html)",mode:"both",algorithm:"gzip"},kWe=[".ds_store","thumbs.db"],m$=50,Ky="#dapp",y$="#_juno/releases",Ile=async(e,t,r)=>await $We(e,r)?[n$(e),t.map(n=>UWe(n)),{...r,shell:!0}]:[e,t,r],$We=async(e,{shell:t,cwd:r,env:n=rue.env})=>rue.platform==="win32"&&!t&&!await jWe(e,r,n),jWe=async(e,t,{Path:r="",PATH:n=r})=>Nle.some(i=>e.toLowerCase().endsWith(i))||(LWe[`${e}\0${t}\0${n}`]??=await MWe(e,t,n)),LWe={},MWe=async(e,t,r)=>{let n=r.split(tue.delimiter).filter(Boolean).map(i=>i.replace(/^"(.*)"$/,"$1"));try{await Promise.all(Nle.flatMap(i=>[t,...n].filter(Ole.nonNullish).map(s=>`${tue.resolve(s instanceof BWe?s.toString():s,e)}${i}`)).map(async i=>{try{await RWe(i)}catch{return}throw 0}))}catch{return!0}return!1},Nle=[".exe",".com"],UWe=e=>n$(n$(`"${e.replaceAll(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`)),n$=e=>e.replaceAll(/([()\][%!^"`<>&|;, *?])/g,"^$1"),Ls=async({command:e,cwd:t,args:r,env:n,stdout:i,silentOut:s=!1,silentErrors:o=!1})=>await new Promise(async(a,c)=>{let[u,l,p]=await Ile(e,r??[],{shell:!0,...(0,_E.nonNullish)(t)&&{cwd:t},...(0,_E.nonNullish)(n)&&{env:n}}),d=Ale(u,l,p);d.stdout.on("data",f=>{if((0,_E.nonNullish)(i)){i(`${f}`);return}s||console.log(`${f}`)}),d.stderr.on("data",f=>{o||c(new Error(`${f}`))}),d.on("close",f=>{a(f)}),d.on("error",f=>{c(f)})}),na=async({command:e,args:t,env:r})=>await new Promise(async n=>{let[i,s,o]=await Ile(e,t??[],{stdio:"inherit",...(0,_E.nonNullish)(r)&&{env:r}});Ale(i,s??[],o).on("close",a=>{if(a===0){n(a);return}process.exit(1)})}),Fle=async e=>{for(let t of e??[]){let[r,...n]=t.split(" ");await na({command:r,args:n})}},ZWe="End-Of-Stream",$a=class extends Error{constructor(){super(ZWe),this.name="EndOfStreamError"}},kle=class extends Error{constructor(e="The operation was aborted"){super(e),this.name="AbortError"}},WWe=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((e,t)=>{this.reject=t,this.resolve=e})}},g$=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(e,t=!1){let r=await this.read(e,t);return this.peekQueue.push(e.subarray(0,r)),r}async read(e,t=!1){if(e.length===0)return 0;let r=this.readFromPeekBuffer(e);if(this.endOfStream||(r+=await this.readRemainderFromStream(e.subarray(r),t)),r===0)throw new $a;return r}readFromPeekBuffer(e){let t=e.length,r=0;for(;this.peekQueue.length>0&&t>0;){let n=this.peekQueue.pop();if(!n)throw new Error("peekData should be defined");let i=Math.min(n.length,t);e.set(n.subarray(0,i),r),r+=i,t-=i,i<n.length&&this.peekQueue.push(n.subarray(i))}return r}async readRemainderFromStream(e,t){let r=0;for(;r<e.length&&!this.endOfStream;){if(this.interrupted)throw new kle;let n=await this.readFromStream(e.subarray(r),t);if(n===0)break;r+=n}if(!t&&r<e.length)throw new $a;return r}},GWe=class extends g${constructor(e){if(super(),this.s=e,this.deferred=null,!e.read||!e.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>{this.endOfStream=!0,this.deferred&&this.deferred.resolve(0)}),this.s.once("error",t=>this.reject(t)),this.s.once("close",()=>this.abort())}async readFromStream(e,t){if(e.length===0)return 0;let r=this.s.read(e.length);if(r)return e.set(r),r.length;let n={buffer:e,mayBeLess:t,deferred:new WWe};return this.deferred=n.deferred,this.s.once("readable",()=>{this.readDeferred(n)}),n.deferred.promise}readDeferred(e){let t=this.s.read(e.buffer.length);t?(e.buffer.set(t),e.deferred.resolve(t.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(e)})}reject(e){this.interrupted=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}async abort(){this.reject(new kle)}async close(){return this.abort()}},YWe=class extends g${constructor(e){super(),this.reader=e}async abort(){return this.close()}async close(){this.reader.releaseLock()}},JWe=class extends YWe{async readFromStream(e,t){if(e.length===0)return 0;let r=await this.reader.read(new Uint8Array(e.length),{min:t?void 0:e.length});return r.done&&(this.endOfStream=r.done),r.value?(e.set(r.value),r.value.length):0}},iue=class extends g${constructor(e){super(),this.reader=e,this.buffer=null}writeChunk(e,t){let r=Math.min(t.length,e.length);return e.set(t.subarray(0,r)),r<t.length?this.buffer=t.subarray(r):this.buffer=null,r}async readFromStream(e,t){if(e.length===0)return 0;let r=0;for(this.buffer&&(r+=this.writeChunk(e,this.buffer));r<e.length&&!this.endOfStream;){let n=await this.reader.read();if(n.done){this.endOfStream=!0;break}n.value&&(r+=this.writeChunk(e.subarray(r),n.value))}if(r===0&&this.endOfStream)throw new $a;return r}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}};function XWe(e){try{let t=e.getReader({mode:"byob"});return t instanceof ReadableStreamDefaultReader?new iue(t):new JWe(t)}catch(t){if(t instanceof TypeError)return new iue(e.getReader());throw t}}var b$=class{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new $a;return e.get(r,0)}async peekToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new $a;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new $a;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new $a;return e.get(this.numBuffer,0)}async ignore(e){if(this.fileInfo.size!==void 0){let t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(e,t){if(!this.supportsRandomAccess()&&t&&t.position!==void 0&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:e.length,position:this.position,...t}}abort(){return Promise.resolve()}},QWe=256e3,Rle=class extends b${constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.fileInfo??{}}async readBuffer(e,t){let r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(r.length===0)return 0;let i=await this.streamReader.read(e.subarray(0,r.length),r.mayBeLess);if(this.position+=i,(!t||!t.mayBeLess)&&i<r.length)throw new $a;return i}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=0;if(r.position){let i=r.position-this.position;if(i>0){let s=new Uint8Array(r.length+i);return n=await this.peekBuffer(s,{mayBeLess:r.mayBeLess}),e.set(s.subarray(i)),n-i}if(i<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e.subarray(0,r.length),r.mayBeLess)}catch(i){if(t?.mayBeLess&&i instanceof $a)return 0;throw i}if(!r.mayBeLess&&n<r.length)throw new $a}return n}async ignore(e){let t=Math.min(QWe,e),r=new Uint8Array(t),n=0;for(;n<e;){let i=e-n,s=await this.readBuffer(r,{length:Math.min(t,i)});if(s<0)return s;n+=s}return n}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}},eGe=class extends b${constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},size:e.length}}async readBuffer(e,t){t?.position&&(this.position=t.position);let r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new $a;return e.set(this.uint8Array.subarray(r.position,r.position+n)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}};function tGe(e,t){let r=new GWe(e),n=t??{},i=n.onClose;return n.onClose=async()=>{if(await r.close(),i)return i()},new Rle(r,n)}function Ble(e,t){let r=XWe(e),n=t??{},i=n.onClose;return n.onClose=async()=>{if(await r.close(),i)return i()},new Rle(r,n)}function rGe(e,t){return new eGe(e,t)}var iGe=class $le extends b${static async fromFile(t){let r=await nGe(t,"r"),n=await r.stat();return new $le(r,{fileInfo:{path:t,size:n.size}})}constructor(t,r){super(r),this.fileHandle=t,this.fileInfo=r.fileInfo}async readBuffer(t,r){let n=this.normalizeOptions(t,r);if(this.position=n.position,n.length===0)return 0;let i=await this.fileHandle.read(t,0,n.length,n.position);if(this.position+=i.bytesRead,i.bytesRead<n.length&&(!r||!r.mayBeLess))throw new $a;return i.bytesRead}async peekBuffer(t,r){let n=this.normalizeOptions(t,r),i=await this.fileHandle.read(t,0,n.length,n.position);if(!n.mayBeLess&&i.bytesRead<n.length)throw new $a;return i.bytesRead}async close(){return await this.fileHandle.close(),super.close()}setPosition(t){this.position=t}supportsRandomAccess(){return!0}};async function sGe(e,t){let r=tGe(e,t);if(e.path){let n=await KWe(e.path);r.fileInfo.path=e.path,r.fileInfo.size=n.size}return r}var oGe=iGe.fromFile,BEr=ev(pZe(),1);function yc(e){return new DataView(e.buffer,e.byteOffset)}var aGe={len:1,get(e,t){return yc(e).getUint8(t)},put(e,t,r){return yc(e).setUint8(t,r),t+1}},gs={len:2,get(e,t){return yc(e).getUint16(t,!0)},put(e,t,r){return yc(e).setUint16(t,r,!0),t+2}},yE={len:2,get(e,t){return yc(e).getUint16(t)},put(e,t,r){return yc(e).setUint16(t,r),t+2}},mo={len:4,get(e,t){return yc(e).getUint32(t,!0)},put(e,t,r){return yc(e).setUint32(t,r,!0),t+4}},cGe={len:4,get(e,t){return yc(e).getUint32(t)},put(e,t,r){return yc(e).setUint32(t,r),t+4}},uGe={len:4,get(e,t){return yc(e).getInt32(t)},put(e,t,r){return yc(e).setInt32(t,r),t+4}},lGe={len:8,get(e,t){return yc(e).getBigUint64(t,!0)},put(e,t,r){return yc(e).setBigUint64(t,r,!0),t+8}},cf=class{constructor(e,t){this.len=e,this.encoding=t,this.textDecoder=new TextDecoder(t)}get(e,t){return this.textDecoder.decode(e.subarray(t,t+this.len))}},dGe=pGe("/"),fGe;try{fGe=dGe("worker_threads").Worker}catch{}var zc=Uint8Array,Yb=Uint16Array,hGe=Int32Array,jle=new zc([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Lle=new zc([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),mGe=new zc([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Mle=function(e,t){for(var r=new Yb(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new hGe(r[30]),n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},Ule=Mle(jle,2),qle=Ule.b,yGe=Ule.r;qle[28]=258,yGe[258]=28;var Vle=Mle(Lle,0),gGe=Vle.b,jEr=Vle.r,i$=new Yb(32768);for(Un=0;Un<32768;++Un)af=(Un&43690)>>1|(Un&21845)<<1,af=(af&52428)>>2|(af&13107)<<2,af=(af&61680)>>4|(af&3855)<<4,i$[Un]=((af&65280)>>8|(af&255)<<8)>>1;var af,Un,EE=(function(e,t,r){for(var n=e.length,i=0,s=new Yb(t);i<n;++i)e[i]&&++s[e[i]-1];var o=new Yb(t);for(i=1;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;var a;if(r){a=new Yb(1<<t);var c=15-t;for(i=0;i<n;++i)if(e[i])for(var u=i<<4|e[i],l=t-e[i],p=o[e[i]-1]++<<l,d=p|(1<<l)-1;p<=d;++p)a[i$[p]>>c]=u}else for(a=new Yb(n),i=0;i<n;++i)e[i]&&(a[i]=i$[o[e[i]-1]++]>>15-e[i]);return a}),PE=new zc(288);for(Un=0;Un<144;++Un)PE[Un]=8;var Un;for(Un=144;Un<256;++Un)PE[Un]=9;var Un;for(Un=256;Un<280;++Un)PE[Un]=7;var Un;for(Un=280;Un<288;++Un)PE[Un]=8;var Un,zle=new zc(32);for(Un=0;Un<32;++Un)zle[Un]=5;var Un,bGe=EE(PE,9,1),vGe=EE(zle,5,1),FB=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},wl=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},kB=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},xGe=function(e){return(e+7)/8|0},_Ge=function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new zc(e.subarray(t,r))},EGe=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Vc=function(e,t,r){var n=new Error(t||EGe[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Vc),!r)throw n;return n},v$=function(e,t,r,n){var i=e.length,s=n?n.length:0;if(!i||t.f&&!t.l)return r||new zc(0);var o=!r,a=o||t.i!=2,c=t.i;o&&(r=new zc(i*3));var u=function(rt){var mt=r.length;if(rt>mt){var Nt=new zc(Math.max(mt*2,rt));Nt.set(r),r=Nt}},l=t.f||0,p=t.p||0,d=t.b||0,f=t.l,h=t.d,m=t.m,y=t.n,g=i*8;do{if(!f){l=wl(e,p,1);var v=wl(e,p+1,3);if(p+=3,v)if(v==1)f=bGe,h=vGe,m=9,y=5;else if(v==2){var b=wl(e,p,31)+257,_=wl(e,p+10,15)+4,w=b+wl(e,p+5,31)+1;p+=14;for(var P=new zc(w),D=new zc(19),F=0;F<_;++F)D[mGe[F]]=wl(e,p+F*3,7);p+=_*3;for(var A=FB(D),H=(1<<A)-1,Z=EE(D,A,1),F=0;F<w;){var G=Z[wl(e,p,H)];p+=G&15;var O=G>>4;if(O<16)P[F++]=O;else{var N=0,K=0;for(O==16?(K=3+wl(e,p,3),p+=2,N=P[F-1]):O==17?(K=3+wl(e,p,7),p+=3):O==18&&(K=11+wl(e,p,127),p+=7);K--;)P[F++]=N}}var te=P.subarray(0,b),W=P.subarray(b);m=FB(te),y=FB(W),f=EE(te,m,1),h=EE(W,y,1)}else Vc(1);else{var O=xGe(p)+4,I=e[O-4]|e[O-3]<<8,S=O+I;if(S>i){c&&Vc(0);break}a&&u(d+I),r.set(e.subarray(O,S),d),t.b=d+=I,t.p=p=S*8,t.f=l;continue}if(p>g){c&&Vc(0);break}}a&&u(d+131072);for(var B=(1<<m)-1,Y=(1<<y)-1,X=p;;X=p){var N=f[kB(e,p)&B],ue=N>>4;if(p+=N&15,p>g){c&&Vc(0);break}if(N||Vc(2),ue<256)r[d++]=ue;else if(ue==256){X=p,f=null;break}else{var he=ue-254;if(ue>264){var F=ue-257,pe=jle[F];he=wl(e,p,(1<<pe)-1)+qle[F],p+=pe}var Te=h[kB(e,p)&Y],Pe=Te>>4;Te||Vc(3),p+=Te&15;var W=gGe[Pe];if(Pe>3){var pe=Lle[Pe];W+=kB(e,p)&(1<<pe)-1,p+=pe}if(p>g){c&&Vc(0);break}a&&u(d+131072);var He=d+he;if(d<W){var Ie=s-W,Ne=Math.min(W,He);for(Ie+d<0&&Vc(3);d<Ne;++d)r[d]=n[Ie+d]}for(;d<He;++d)r[d]=r[d-W]}}t.l=f,t.p=X,t.b=d,t.f=l,f&&(l=1,t.m=m,t.d=h,t.n=y)}while(!l);return d!=r.length&&o?_Ge(r,0,d):r.subarray(0,d)},wGe=new zc(0),TGe=function(e){(e[0]!=31||e[1]!=139||e[2]!=8)&&Vc(6,"invalid gzip data");var t=e[3],r=10;t&4&&(r+=(e[10]|e[11]<<8)+2);for(var n=(t>>3&1)+(t>>4&1);n>0;n-=!e[r++]);return r+(t&2)},SGe=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},DGe=function(e,t){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&Vc(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&Vc(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2};function PGe(e,t){return v$(e,{i:2},t&&t.out,t&&t.dictionary)}function CGe(e,t){var r=TGe(e);return r+8>e.length&&Vc(6,"invalid gzip data"),v$(e.subarray(r,-8),{i:2},t&&t.out||new zc(SGe(e)),t&&t.dictionary)}function AGe(e,t){return v$(e.subarray(DGe(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}function OGe(e,t){return e[0]==31&&e[1]==139&&e[2]==8?CGe(e,t):(e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31?PGe(e,t):AGe(e,t)}var IGe=typeof TextDecoder<"u"&&new TextDecoder,NGe=0;try{IGe.decode(wGe,{stream:!0}),NGe=1}catch{}var FGe=ev(gZe(),1),Jb={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},sue={get(e){let t=gs.get(e,6);return{signature:mo.get(e,0),compressedSize:mo.get(e,8),uncompressedSize:mo.get(e,12)}},len:16},kGe={get(e){let t=gs.get(e,6);return{signature:mo.get(e,0),minVersion:gs.get(e,4),dataDescriptor:!!(t&8),compressedMethod:gs.get(e,8),compressedSize:mo.get(e,18),uncompressedSize:mo.get(e,22),filenameLength:gs.get(e,26),extraFieldLength:gs.get(e,28),filename:null}},len:30},RGe={get(e){return{signature:mo.get(e,0),nrOfThisDisk:gs.get(e,4),nrOfThisDiskWithTheStart:gs.get(e,6),nrOfEntriesOnThisDisk:gs.get(e,8),nrOfEntriesOfSize:gs.get(e,10),sizeOfCd:mo.get(e,12),offsetOfStartOfCd:mo.get(e,16),zipFileCommentLength:gs.get(e,20)}},len:22},BGe={get(e){let t=gs.get(e,8);return{signature:mo.get(e,0),minVersion:gs.get(e,6),dataDescriptor:!!(t&8),compressedMethod:gs.get(e,10),compressedSize:mo.get(e,20),uncompressedSize:mo.get(e,24),filenameLength:gs.get(e,28),extraFieldLength:gs.get(e,30),fileCommentLength:gs.get(e,32),relativeOffsetOfLocalHeader:mo.get(e,42),filename:null}},len:46};function Hle(e){let t=new Uint8Array(mo.len);return mo.put(t,0,e),t}var kp=(0,FGe.default)("tokenizer:inflate"),RB=256*1024,$Ge=Hle(Jb.DataDescriptor),eO=Hle(Jb.EndOfCentralDirectory),jGe=class{constructor(e){this.tokenizer=e,this.syncBuffer=new Uint8Array(RB)}async isZip(){return await this.peekSignature()===Jb.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(mo)}async findEndOfCentralDirectoryLocator(){let e=this.tokenizer,t=Math.min(16*1024,e.fileInfo.size),r=this.syncBuffer.subarray(0,t);await this.tokenizer.readBuffer(r,{position:e.fileInfo.size-t});for(let n=r.length-4;n>=0;n--)if(r[n]===eO[0]&&r[n+1]===eO[1]&&r[n+2]===eO[2]&&r[n+3]===eO[3])return e.fileInfo.size-t+n;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){kp("Cannot reading central-directory without random-read support");return}kp("Reading central-directory...");let e=this.tokenizer.position,t=await this.findEndOfCentralDirectoryLocator();if(t>0){kp("Central-directory 32-bit signature found");let r=await this.tokenizer.readToken(RGe,t),n=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let i=0;i<r.nrOfEntriesOfSize;++i){let s=await this.tokenizer.readToken(BGe);if(s.signature!==Jb.CentralFileHeader)throw new Error("Expected Central-File-Header signature");s.filename=await this.tokenizer.readToken(new cf(s.filenameLength,"utf-8")),await this.tokenizer.ignore(s.extraFieldLength),await this.tokenizer.ignore(s.fileCommentLength),n.push(s),kp(`Add central-directory file-entry: n=${i+1}/${n.length}: filename=${n[i].filename}`)}return this.tokenizer.setPosition(e),n}this.tokenizer.setPosition(e)}async unzip(e){let t=await this.readCentralDirectory();if(t)return this.iterateOverCentralDirectory(t,e);let r=!1;do{let n=await this.readLocalFileHeader();if(!n)break;let i=e(n);r=!!i.stop;let s;if(await this.tokenizer.ignore(n.extraFieldLength),n.dataDescriptor&&n.compressedSize===0){let o=[],a=RB;kp("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let c=-1;for(;c<0&&a===RB;){a=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),c=LGe(this.syncBuffer.subarray(0,a),$Ge);let u=c>=0?c:a;if(i.handler){let l=new Uint8Array(u);await this.tokenizer.readBuffer(l),o.push(l)}else await this.tokenizer.ignore(u)}kp(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),i.handler&&await this.inflate(n,MGe(o),i.handler)}else i.handler?(kp(`Reading compressed-file-data: ${n.compressedSize} bytes`),s=new Uint8Array(n.compressedSize),await this.tokenizer.readBuffer(s),await this.inflate(n,s,i.handler)):(kp(`Ignoring compressed-file-data: ${n.compressedSize} bytes`),await this.tokenizer.ignore(n.compressedSize));if(kp(`Reading data-descriptor at pos=${this.tokenizer.position}`),n.dataDescriptor&&(await this.tokenizer.readToken(sue)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-sue.len}`)}while(!r)}async iterateOverCentralDirectory(e,t){for(let r of e){let n=t(r);if(n.handler){this.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);let i=await this.readLocalFileHeader();if(i){await this.tokenizer.ignore(i.extraFieldLength);let s=new Uint8Array(r.compressedSize);await this.tokenizer.readBuffer(s),await this.inflate(i,s,n.handler)}}if(n.stop)break}}inflate(e,t,r){if(e.compressedMethod===0)return r(t);kp(`Decompress filename=${e.filename}, compressed-size=${t.length}`);let n=OGe(t);return r(n)}async readLocalFileHeader(){let e=await this.tokenizer.peekToken(mo);if(e===Jb.LocalFileHeader){let t=await this.tokenizer.readToken(kGe);return t.filename=await this.tokenizer.readToken(new cf(t.filenameLength,"utf-8")),t}if(e===Jb.CentralFileHeader)return!1;throw e===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}};function LGe(e,t){let r=e.length,n=t.length;if(n>r)return-1;for(let i=0;i<=r-n;i++){let s=!0;for(let o=0;o<n;o++)if(e[i+o]!==t[o]){s=!1;break}if(s)return i}return-1}function MGe(e){let t=e.reduce((i,s)=>i+s.length,0),r=new Uint8Array(t),n=0;for(let i of e)r.set(i,n),n+=i.length;return r}var LEr={utf8:new globalThis.TextDecoder("utf8")},MEr=new globalThis.TextEncoder,UEr=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function oue(e){let{byteLength:t}=e;if(t===6)return e.getUint16(0)*2**32+e.getUint32(2);if(t===5)return e.getUint8(0)*2**32+e.getUint32(1);if(t===4)return e.getUint32(0);if(t===3)return e.getUint8(0)*2**16+e.getUint16(1);if(t===2)return e.getUint16(0);if(t===1)return e.getUint8(0)}function UGe(e){return[...e].map(t=>t.charCodeAt(0))}function qGe(e,t=0){let r=Number.parseInt(new cf(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(r))return!1;let n=256;for(let i=t;i<t+148;i++)n+=e[i];for(let i=t+156;i<t+512;i++)n+=e[i];return r===n}var VGe={get:(e,t)=>e[t+3]&127|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},zGe=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","rm","ppsm","ppsx"],HGe=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia"],sO=4100;function BB(e){switch(e=e.toLowerCase(),e){case"application/epub+zip":return{ext:"epub",mime:e};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:e};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:e};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:e};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:e};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:e};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:e};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:e};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:e};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:e};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:e};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:e};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:e};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:e};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:e};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:e};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function Rp(e,t,r){r={offset:0,...r};for(let[n,i]of t.entries())if(r.mask){if(i!==(r.mask[n]&e[n+r.offset]))return!1}else if(i!==e[n+r.offset])return!1;return!0}var KGe=class{constructor(e){this.options={mpegOffsetTolerance:0,...e},this.detectors=[...e?.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:e?.signal}}async fromTokenizer(e){let t=e.position;for(let r of this.detectors){let n=await r.detect(e);if(n)return n;if(t!==e.position)return}}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t?.length>1)return this.fromTokenizer(rGe(t,this.tokenizerOptions))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){let t=await Ble(e,this.tokenizerOptions);try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){let{sampleSize:r=sO}=t,n,i,s=e.getReader({mode:"byob"});try{let{value:c,done:u}=await s.read(new Uint8Array(r));if(i=c,!u&&c)try{n=await this.fromBuffer(c.subarray(0,r))}catch(l){if(!(l instanceof $a))throw l;n=void 0}i=c}finally{s.releaseLock()}let o=new TransformStream({async start(c){c.enqueue(i)},transform(c,u){u.enqueue(c)}}),a=e.pipeThrough(o);return a.fileType=n,a}check(e,t){return Rp(this.buffer,e,t)}checkString(e,t){return this.check(UGe(e),t)}detectConfident=async e=>{if(this.buffer=new Uint8Array(sO),e.fileInfo.size===void 0&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,await e.peekBuffer(this.buffer,{length:12,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.tokenizer.ignore(3),this.detectConfident(e);if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await e.ignore(6);let t=await e.readToken(VGe);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),this.fromTokenizer(e))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let t;return await new jGe(e).unzip(r=>{switch(r.filename){case"META-INF/mozilla.rsa":return t={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return t={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return{async handler(n){let i=new TextDecoder("utf-8").decode(n).trim();t=BB(i)},stop:!0};case"[Content_Types].xml":return{async handler(n){let i=new TextDecoder("utf-8").decode(n),s=i.indexOf('.main+xml"');if(s===-1){let o="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";i.includes(`ContentType="${o}"`)&&(t=BB(o))}else{i=i.slice(0,Math.max(0,s));let o=i.lastIndexOf('"'),a=i.slice(Math.max(0,o+1));t=BB(a)}},stop:!0};default:return/classes\d*\.dex/.test(r.filename)?(t={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}}),t??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);let t=new Uint8Array(8);return await e.readBuffer(t),Rp(t,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:Rp(t,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:Rp(t,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:Rp(t,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:Rp(t,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:Rp(t,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let t=await this.readTiffHeader(!1);if(t)return t}if(this.check([77,77])){let t=await this.readTiffHeader(!0);if(t)return t}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function t(){let s=await e.peekNumber(aGe),o=128,a=0;for(;(s&o)===0&&o!==0;)++a,o>>=1;let c=new Uint8Array(a+1);return await e.readBuffer(c),c}async function r(){let s=await t(),o=await t();o[0]^=128>>o.length-1;let a=Math.min(6,o.length),c=new DataView(s.buffer),u=new DataView(o.buffer,o.length-a,a);return{id:oue(c),len:oue(u)}}async function n(s){for(;s>0;){let o=await r();if(o.id===17026)return(await e.readToken(new cf(o.len))).replaceAll(/\00.*$/g,"");await e.ignore(o.len),--s}}let i=await r();switch(await n(i.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190]))return{ext:"class",mime:"application/java-vm"};if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(this.buffer[6]===0||this.buffer[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){let t=new cf(4,"latin1").get(this.buffer,2);if(t.match("^d*")&&t>=1e3&&t<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await e.ignore(8),await e.readToken(new cf(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[`
713
713
  `,"\r"," "," ","\0"].some(t=>this.checkString(t,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){await e.ignore(8);async function t(){return{length:await e.readToken(uGe),type:await e.readToken(new cf(4,"latin1"))}}do{let r=await t();if(r.length<0)return;switch(r.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(r.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/vnd.apache.arrow.file"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&(this.buffer[8]&96)!==0){let t=new cf(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(t){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return t.startsWith("3g")?t.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){async function t(){let r=new Uint8Array(16);return await e.readBuffer(r),{id:r,size:Number(await e.readToken(lGe))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){let r=await t(),n=r.size-24;if(Rp(r.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let i=new Uint8Array(16);if(n-=await e.readBuffer(i),Rp(i,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(Rp(i,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(n)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new cf(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.check([0,60,0,63,0,120,0,109,0,108],{offset:2})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){let t=new DataView(this.buffer.buffer).getUint32(12,!0);if(t>12&&this.buffer.length>=t+16)try{let r=new TextDecoder().decode(this.buffer.subarray(16,t+16));if(JSON.parse(r).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&qGe(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254]))return this.check([60,0,63,0,120,0,109,0,108,0],{offset:2})?{ext:"xml",mime:"application/xml"}:this.check([255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0],{offset:2})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:void 0;if(this.checkString("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"}};detectImprecise=async e=>{if(this.buffer=new Uint8Array(sO),await e.peekBuffer(this.buffer,{length:Math.min(8,e.fileInfo.size),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await e.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,e.fileInfo.size),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let t=0;t<=this.options.mpegOffsetTolerance;++t){let r=this.scanMpeg(t);if(r)return r}};async readTiffTag(e){let t=await this.tokenizer.readToken(e?yE:gs);switch(this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(e){let t=await this.tokenizer.readToken(e?yE:gs);for(let r=0;r<t;++r){let n=await this.readTiffTag(e);if(n)return n}}async readTiffHeader(e){let t=(e?yE:gs).get(this.buffer,2),r=(e?cGe:mo).get(this.buffer,4);if(t===42){if(r>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r>=8){let n=(e?yE:gs).get(this.buffer,8),i=(e?yE:gs).get(this.buffer,10);if(n===28&&i===254||n===31&&i===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}return await this.tokenizer.ignore(r),await this.readTiffIFD(e)??{ext:"tif",mime:"image/tiff"}}if(t===43)return{ext:"tif",mime:"image/tiff"}}scanMpeg(e){if(this.check([255,224],{offset:e,mask:[255,224]})){if(this.check([16],{offset:e+1,mask:[22]}))return this.check([8],{offset:e+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:e+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:e+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:e+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},qEr=new Set(zGe),VEr=new Set(HGe),ZGe=class extends KGe{async fromStream(e){let t=await(e instanceof VWe?Ble(e,this.tokenizerOptions):sGe(e,this.tokenizerOptions));try{return await super.fromTokenizer(t)}finally{await t.close()}}async fromFile(e){let t=await oGe(e);try{return await super.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t={}){if(!(e instanceof HWe))return super.toDetectionStream(e,t);let{sampleSize:r=sO}=t;return new Promise((n,i)=>{e.on("error",i),e.once("readable",()=>{(async()=>{try{let s=new zWe,o=nue?nue(e,s,()=>{}):e.pipe(s),a=e.read(r)??e.read()??new Uint8Array(0);try{s.fileType=await this.fromBuffer(a)}catch(c){c instanceof $a?s.fileType=void 0:i(c)}n(o)}catch(s){i(s)}})()})})}};async function WGe(e,t){return new ZGe(t).fromFile(e,t)}var GGe=ev(_Ze(),1),Kle=(e,t,r)=>{let n=e instanceof RegExp?aue(e,r):e,i=t instanceof RegExp?aue(t,r):t,s=n!==null&&i!=null&&YGe(n,i,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+n.length,s[1]),post:r.slice(s[1]+i.length)}},aue=(e,t)=>{let r=t.match(e);return r?r[0]:null},YGe=(e,t,r)=>{let n,i,s,o,a,c=r.indexOf(e),u=r.indexOf(t,c+1),l=c;if(c>=0&&u>0){if(e===t)return[c,u];for(n=[],s=r.length;l>=0&&!a;){if(l===c)n.push(l),c=r.indexOf(e,l+1);else if(n.length===1){let p=n.pop();p!==void 0&&(a=[p,u])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=u),u=r.indexOf(t,l+1);l=c<u&&c>=0?c:u}n.length&&o!==void 0&&(a=[s,o])}return a},Zle="\0SLASH"+Math.random()+"\0",Wle="\0OPEN"+Math.random()+"\0",x$="\0CLOSE"+Math.random()+"\0",Gle="\0COMMA"+Math.random()+"\0",Yle="\0PERIOD"+Math.random()+"\0",JGe=new RegExp(Zle,"g"),XGe=new RegExp(Wle,"g"),QGe=new RegExp(x$,"g"),eYe=new RegExp(Gle,"g"),tYe=new RegExp(Yle,"g"),rYe=/\\\\/g,nYe=/\\{/g,iYe=/\\}/g,sYe=/\\,/g,oYe=/\\./g;function $B(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function aYe(e){return e.replace(rYe,Zle).replace(nYe,Wle).replace(iYe,x$).replace(sYe,Gle).replace(oYe,Yle)}function cYe(e){return e.replace(JGe,"\\").replace(XGe,"{").replace(QGe,"}").replace(eYe,",").replace(tYe,".")}function Jle(e){if(!e)return[""];let t=[],r=Kle("{","}",e);if(!r)return e.split(",");let{pre:n,body:i,post:s}=r,o=n.split(",");o[o.length-1]+="{"+i+"}";let a=Jle(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),t.push.apply(t,o),t}function uYe(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),vE(aYe(e),!0).map(cYe)):[]}function lYe(e){return"{"+e+"}"}function pYe(e){return/^-?0\d/.test(e)}function dYe(e,t){return e<=t}function fYe(e,t){return e>=t}function vE(e,t){let r=[],n=Kle("{","}",e);if(!n)return[e];let i=n.pre,s=n.post.length?vE(n.post,!1):[""];if(/\$$/.test(n.pre))for(let o=0;o<s.length;o++){let a=i+"{"+n.body+"}"+s[o];r.push(a)}else{let o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),c=o||a,u=n.body.indexOf(",")>=0;if(!c&&!u)return n.post.match(/,(?!,).*\}/)?(e=n.pre+"{"+n.body+x$+n.post,vE(e)):[e];let l;if(c)l=n.body.split(/\.\./);else if(l=Jle(n.body),l.length===1&&l[0]!==void 0&&(l=vE(l[0],!1).map(lYe),l.length===1))return s.map(d=>n.pre+l[0]+d);let p;if(c&&l[0]!==void 0&&l[1]!==void 0){let d=$B(l[0]),f=$B(l[1]),h=Math.max(l[0].length,l[1].length),m=l.length===3&&l[2]!==void 0?Math.abs($B(l[2])):1,y=dYe;f<d&&(m*=-1,y=fYe);let g=l.some(pYe);p=[];for(let v=d;y(v,f);v+=m){let b;if(a)b=String.fromCharCode(v),b==="\\"&&(b="");else if(b=String(v),g){let _=h-b.length;if(_>0){let w=new Array(_+1).join("0");v<0?b="-"+w+b.slice(1):b=w+b}}p.push(b)}}else{p=[];for(let d=0;d<l.length;d++)p.push.apply(p,vE(l[d],!1))}for(let d=0;d<p.length;d++)for(let f=0;f<s.length;f++){let h=i+p[d]+s[f];(!t||c||h)&&r.push(h)}}return r}var lO=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},hYe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},gE=e=>e.replace(/[[\]\\-]/g,"\\$&"),mYe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),cue=e=>e.join(""),yYe=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=r+1,o=!1,a=!1,c=!1,u=!1,l=r,p="";e:for(;s<e.length;){let h=e.charAt(s);if((h==="!"||h==="^")&&s===r+1){u=!0,s++;continue}if(h==="]"&&o&&!c){l=s+1;break}if(o=!0,h==="\\"&&!c){c=!0,s++;continue}if(h==="["&&!c){for(let[m,[y,g,v]]of Object.entries(hYe))if(e.startsWith(m,s)){if(p)return["$.",!1,e.length-r,!0];s+=m.length,v?i.push(y):n.push(y),a=a||g;continue e}}if(c=!1,p){h>p?n.push(gE(p)+"-"+gE(h)):h===p&&n.push(gE(h)),p="",s++;continue}if(e.startsWith("-]",s+1)){n.push(gE(h+"-")),s+=2;continue}if(e.startsWith("-",s+1)){p=h,s+=2;continue}n.push(gE(h)),s++}if(l<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let h=n[0].length===2?n[0].slice(-1):n[0];return[mYe(h),!1,l-r,!1]}let d="["+(u?"^":"")+cue(n)+"]",f="["+(u?"":"^")+cue(i)+"]";return[n.length&&i.length?"("+d+"|"+f+")":n.length?d:f,a,l-r,!0]},xE=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),gYe=new Set(["!","?","+","*","@"]),uue=e=>gYe.has(e),bYe="(?!(?:^|/)\\.\\.?(?:$|/))",tO="(?!\\.)",vYe=new Set(["[","."]),xYe=new Set(["..","."]),_Ye=new Set("().*{}+?[]^$\\!"),EYe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_$="[^/]",lue=_$+"*?",pue=_$+"+?",Xle=class qc{type;#e;#t;#r=!1;#n=[];#o;#s;#i;#a=!1;#c;#h;#u=!1;constructor(t,r,n={}){this.type=t,t&&(this.#t=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#i=this.#e===this?[]:this.#e.#i,t==="!"&&!this.#e.#a&&this.#i.push(this),this.#s=this.#o?this.#o.#n.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let t of this.#n)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#n.map(t=>String(t)).join("|")+")":this.#h=this.#n.map(t=>String(t)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#i.pop();){if(t.type!=="!")continue;let r=t,n=r.#o;for(;n;){for(let i=r.#s+1;!n.type&&i<n.#n.length;i++)for(let s of t.#n){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#n[i])}r=n,n=r.#o}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof qc&&r.#o===this))throw new Error("invalid part: "+r);this.#n.push(r)}}toJSON(){let t=this.type===null?this.#n.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#n.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#a&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#s===0)return!0;let t=this.#o;for(let r=0;r<this.#s;r++){let n=t.#n[r];if(!(n instanceof qc&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let t=this.#o?this.#o.#n.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new qc(this.type,t);for(let n of this.#n)r.copyIn(n);return r}static#p(t,r,n,i){let s=!1,o=!1,a=-1,c=!1;if(r.type===null){let f=n,h="";for(;f<t.length;){let m=t.charAt(f++);if(s||m==="\\"){s=!s,h+=m;continue}if(o){f===a+1?(m==="^"||m==="!")&&(c=!0):m==="]"&&!(f===a+2&&c)&&(o=!1),h+=m;continue}else if(m==="["){o=!0,a=f,c=!1,h+=m;continue}if(!i.noext&&uue(m)&&t.charAt(f)==="("){r.push(h),h="";let y=new qc(m,r);f=qc.#p(t,y,f,i),r.push(y);continue}h+=m}return r.push(h),f}let u=n+1,l=new qc(null,r),p=[],d="";for(;u<t.length;){let f=t.charAt(u++);if(s||f==="\\"){s=!s,d+=f;continue}if(o){u===a+1?(f==="^"||f==="!")&&(c=!0):f==="]"&&!(u===a+2&&c)&&(o=!1),d+=f;continue}else if(f==="["){o=!0,a=u,c=!1,d+=f;continue}if(uue(f)&&t.charAt(u)==="("){l.push(d),d="";let h=new qc(f,l);l.push(h),u=qc.#p(t,h,u,i);continue}if(f==="|"){l.push(d),d="",p.push(l),l=new qc(null,r);continue}if(f===")")return d===""&&r.#n.length===0&&(r.#u=!0),l.push(d),d="",r.push(...p,l),u;d+=f}return r.type=null,r.#t=void 0,r.#n=[t.substring(n-1)],u}static fromGlob(t,r={}){let n=new qc(null,void 0,r);return qc.#p(t,n,0,r),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[r,n,i,s]=this.toRegExpSource();if(!(i||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let o=(this.#c.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:t})}get options(){return this.#c}toRegExpSource(t){let r=t??!!this.#c.dot;if(this.#e===this&&this.#l(),!this.type){let c=this.isStart()&&this.isEnd(),u=this.#n.map(d=>{let[f,h,m,y]=typeof d=="string"?qc.#y(d,this.#t,c):d.toRegExpSource(t);return this.#t=this.#t||m,this.#r=this.#r||y,f}).join(""),l="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&xYe.has(this.#n[0]))){let d=vYe,f=r&&d.has(u.charAt(0))||u.startsWith("\\.")&&d.has(u.charAt(2))||u.startsWith("\\.\\.")&&d.has(u.charAt(4)),h=!r&&!t&&d.has(u.charAt(0));l=f?bYe:h?tO:""}let p="";return this.isEnd()&&this.#e.#a&&this.#o?.type==="!"&&(p="(?:$|\\/)"),[l+u+p,xE(u),this.#t=!!this.#t,this.#r]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#d(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString();return this.#n=[c],this.type=null,this.#t=void 0,[c,xE(this.toString()),!1,!1]}let o=!n||t||r||!tO?"":this.#d(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#u)a=(this.isStart()&&!r?tO:"")+pue;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!t?tO:"")+lue+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+s+c}return[a,xE(s),this.#t=!!this.#t,this.#r]}#d(t){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,s,o]=r.toRegExpSource(t);return this.#r=this.#r||o,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#y(t,r,n=!1){let i=!1,s="",o=!1;for(let a=0;a<t.length;a++){let c=t.charAt(a);if(i){i=!1,s+=(_Ye.has(c)?"\\":"")+c;continue}if(c==="\\"){a===t.length-1?s+="\\\\":i=!0;continue}if(c==="["){let[u,l,p,d]=yYe(t,a);if(p){s+=u,o=o||l,a+=p-1,r=r||d;continue}}if(c==="*"){n&&t==="*"?s+=pue:s+=lue,r=!0;continue}if(c==="?"){s+=_$,r=!0;continue}s+=EYe(c)}return[s,xE(t),!!r,o]}},wYe=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),yo=(e,t,r={})=>(lO(t),!r.nocomment&&t.charAt(0)==="#"?!1:new gO(t,r).match(e)),TYe=/^\*+([^+@!?\*\[\(]*)$/,SYe=e=>t=>!t.startsWith(".")&&t.endsWith(e),DYe=e=>t=>t.endsWith(e),PYe=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),CYe=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),AYe=/^\*+\.\*+$/,OYe=e=>!e.startsWith(".")&&e.includes("."),IYe=e=>e!=="."&&e!==".."&&e.includes("."),NYe=/^\.\*+$/,FYe=e=>e!=="."&&e!==".."&&e.startsWith("."),kYe=/^\*+$/,RYe=e=>e.length!==0&&!e.startsWith("."),BYe=e=>e.length!==0&&e!=="."&&e!=="..",$Ye=/^\?+([^+@!?\*\[\(]*)?$/,jYe=([e,t=""])=>{let r=Qle([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},LYe=([e,t=""])=>{let r=epe([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},MYe=([e,t=""])=>{let r=epe([e]);return t?n=>r(n)&&n.endsWith(t):r},UYe=([e,t=""])=>{let r=Qle([e]);return t?n=>r(n)&&n.endsWith(t):r},Qle=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},epe=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},tpe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",due={win32:{sep:"\\"},posix:{sep:"/"}},qYe=tpe==="win32"?due.win32.sep:due.posix.sep;yo.sep=qYe;var wu=Symbol("globstar **");yo.GLOBSTAR=wu;var VYe="[^/]",zYe=VYe+"*?",HYe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",KYe="(?:(?!(?:\\/|^)\\.).)*?",ZYe=(e,t={})=>r=>yo(r,e,t);yo.filter=ZYe;var Eu=(e,t={})=>Object.assign({},e,t),WYe=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return yo;let t=yo;return Object.assign((r,n,i={})=>t(r,n,Eu(e,i)),{Minimatch:class extends t.Minimatch{constructor(r,n={}){super(r,Eu(e,n))}static defaults(r){return t.defaults(Eu(e,r)).Minimatch}},AST:class extends t.AST{constructor(r,n,i={}){super(r,n,Eu(e,i))}static fromGlob(r,n={}){return t.AST.fromGlob(r,Eu(e,n))}},unescape:(r,n={})=>t.unescape(r,Eu(e,n)),escape:(r,n={})=>t.escape(r,Eu(e,n)),filter:(r,n={})=>t.filter(r,Eu(e,n)),defaults:r=>t.defaults(Eu(e,r)),makeRe:(r,n={})=>t.makeRe(r,Eu(e,n)),braceExpand:(r,n={})=>t.braceExpand(r,Eu(e,n)),match:(r,n,i={})=>t.match(r,n,Eu(e,i)),sep:t.sep,GLOBSTAR:wu})};yo.defaults=WYe;var rpe=(e,t={})=>(lO(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:uYe(e));yo.braceExpand=rpe;var GYe=(e,t={})=>new gO(e,t).makeRe();yo.makeRe=GYe;var YYe=(e,t,r={})=>{let n=new gO(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e};yo.match=YYe;var fue=/[?*]|[+@!]\(.*?\)|\[|\]/,JYe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),gO=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){lO(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||tpe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let n=this.globParts.map((i,s,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=i[0]===""&&i[1]===""&&(i[2]==="?"||!fue.test(i[2]))&&!fue.test(i[3]),c=/^[a-z]:/i.test(i[0]);if(a)return[...i.slice(0,4),...i.slice(4).map(u=>this.parse(u))];if(c)return[i[0],...i.slice(1).map(u=>this.parse(u))]}return i.map(a=>this.parse(a))});if(this.debug(this.pattern,n),this.set=n.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let s=this.set[i];s[0]===""&&s[1]===""&&this.globParts[i][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r=0;r<e.length;r++)for(let n=0;n<e[r].length;n++)e[r][n]==="**"&&(e[r][n]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let n=r;for(;t[n+1]==="**";)n++;n!==r&&t.splice(r,n-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,n)=>{let i=r[r.length-1];return n==="**"&&i==="**"?r:n===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(n),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let i=e[n];n===1&&i===""&&e[0]===""||(i==="."||i==="")&&(t=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let n=e[r-1];n&&n!=="."&&n!==".."&&n!=="**"&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let s=n;for(;r[s+1]==="**";)s++;s>n&&r.splice(n+1,s-n);let o=r[n+1],a=r[n+2],c=r[n+3];if(o!==".."||!a||a==="."||a===".."||!c||c==="."||c==="..")continue;t=!0,r.splice(n,1);let u=r.slice(0);u[n]="**",e.push(u),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<r.length-1;s++){let o=r[s];s===1&&o===""&&r[0]===""||(o==="."||o==="")&&(t=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(t=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let s=r[i-1];if(s&&s!=="."&&s!==".."&&s!=="**"){t=!0;let o=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...o),r.length===0&&r.push(""),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){let n=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(n){e[t]=[],e[r]=n;break}}return e.filter(t=>t.length)}partsMatch(e,t,r=!1){let n=0,i=0,s=[],o="";for(;n<e.length&&i<t.length;)if(e[n]===t[i])s.push(o==="b"?t[i]:e[n]),n++,i++;else if(r&&e[n]==="**"&&t[i]===e[n+1])s.push(e[n]),n++;else if(r&&t[i]==="**"&&e[n]===t[i+1])s.push(t[i]),i++;else if(e[n]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(o==="b")return!1;o="a",s.push(e[n]),n++,i++}else if(t[i]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="a")return!1;o="b",s.push(t[i]),n++,i++}else return!1;return e.length===t.length&&s}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,r=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){let n=this.options;if(this.isWindows){let h=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),m=!h&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),g=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),v=m?3:h?0:void 0,b=g?3:y?0:void 0;if(typeof v=="number"&&typeof b=="number"){let[_,w]=[e[v],t[b]];_.toLowerCase()===w.toLowerCase()&&(t[b]=_,b>v?t=t.slice(b):v>b&&(e=e.slice(v)))}}let{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var s=0,o=0,a=e.length,c=t.length;s<a&&o<c;s++,o++){this.debug("matchOne loop");var u=t[o],l=e[s];if(this.debug(t,u,l),u===!1)return!1;if(u===wu){this.debug("GLOBSTAR",[t,u,l]);var p=s,d=o+1;if(d===c){for(this.debug("** at the end");s<a;s++)if(e[s]==="."||e[s]===".."||!n.dot&&e[s].charAt(0)===".")return!1;return!0}for(;p<a;){var f=e[p];if(this.debug(`
714
714
  globstar while`,e,p,t,d,f),this.matchOne(e.slice(p),t.slice(d),r))return this.debug("globstar found match!",p,a,f),!0;if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",e,p,t,d);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
715
715
  >>> no match, partial?`,e,p,t,d),p===a))}let h;if(typeof u=="string"?(h=l===u,this.debug("string match",u,l,h)):(h=u.test(l),this.debug("pattern match",u,l,h)),!h)return!1}if(s===a&&o===c)return!0;if(s===a)return r;if(o===c)return s===a-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return rpe(this.pattern,this.options)}parse(e){lO(e);let t=this.options;if(e==="**")return wu;if(e==="")return"";let r,n=null;(r=e.match(kYe))?n=t.dot?BYe:RYe:(r=e.match(TYe))?n=(t.nocase?t.dot?CYe:PYe:t.dot?DYe:SYe)(r[1]):(r=e.match($Ye))?n=(t.nocase?t.dot?LYe:jYe:t.dot?MYe:UYe)(r):(r=e.match(AYe))?n=t.dot?IYe:OYe:(r=e.match(NYe))&&(n=FYe);let i=Xle.fromGlob(e,this.options).toMMPattern();return n&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:n}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,r=t.noglobstar?zYe:t.dot?HYe:KYe,n=new Set(t.nocase?["i"]:[]),i=e.map(a=>{let c=a.map(u=>{if(u instanceof RegExp)for(let l of u.flags.split(""))n.add(l);return typeof u=="string"?JYe(u):u===wu?wu:u._src});return c.forEach((u,l)=>{let p=c[l+1],d=c[l-1];u!==wu||d===wu||(d===void 0?p!==void 0&&p!==wu?c[l+1]="(?:\\/|"+r+"\\/)?"+p:c[l]=r:p===void 0?c[l-1]=d+"(?:\\/|"+r+")?":p!==wu&&(c[l-1]=d+"(?:\\/|\\/"+r+"\\/)"+p,c[l+1]=wu))}),c.filter(u=>u!==wu).join("/")}).join("|"),[s,o]=e.length>1?["(?:",")"]:["",""];i="^"+s+i+o+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let i=this.set;this.debug(this.pattern,"set",i);let s=n[n.length-1];if(!s)for(let o=n.length-2;!s&&o>=0;o--)s=n[o];for(let o=0;o<i.length;o++){let a=i[o],c=n;if(r.matchBase&&a.length===1&&(c=[s]),this.matchOne(c,a,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return yo.defaults(e).Minimatch}};yo.AST=Xle;yo.Minimatch=gO;yo.escape=wYe;yo.unescape=xE;var npe=async({source:e})=>await new Promise((t,r)=>{let n=rJe.from(e),i=[],s=iJe();n.pipe(s),s.on("data",o=>i.push(o)),s.on("end",()=>{t(Buffer.concat(i))}),s.on("error",r)}),oJe=async({sourceFiles:e,precompress:t})=>{if(t===!1)return[];let r=Array.isArray(t)?t:[t];return(await Promise.all(r.map(async n=>await aJe({sourceFiles:e,precompress:n})))).reduce((n,i)=>[...n,...i],[])},aJe=async({sourceFiles:e,precompress:t})=>{let r=t===!0?Gb.pattern:t.pattern??Gb.pattern,n=t===!0?Gb.algorithm:t.algorithm??Gb.algorithm,i=e.filter(s=>yo(s,r));return await Promise.all(i.map(async s=>({source:s,compressed:await spe({source:s,algorithm:n}),mode:t?.mode??Gb.mode})))},ipe=async e=>await spe({...e,algorithm:"gzip"});var spe=async({source:e,algorithm:t,destination:r})=>await new Promise((n,i)=>{let s=eJe(e),o=r??`${e}.${t==="brotli"?"br":"gz"}`,a=tJe(o),c=t==="brotli"?nJe():sJe();s.pipe(c).pipe(a),a.on("close",()=>{n(o)}),a.on("error",i)}),ope=e=>e.length>2&&e[0]===31&&e[1]===139,cpe=e=>lJe(e).flatMap(t=>{let r=mue(e,t);return ape(r).isDirectory()?cpe(r):mue(r)});var pJe=e=>{let{size:t}=ape(e);return t},upe=({file:e,sourceAbsolutePath:t})=>e.replace(t,"").replace(/\\/g,"/"),dJe=({sourceAbsolutePath:e,ignore:t})=>cpe(e).filter(r=>fJe({file:r,ignore:t})),fJe=({file:e,ignore:t})=>cJe(e).size<=0||kWe.includes(uJe(e).toLowerCase())?!1:t.find(r=>yo(e,r))===void 0,hJe=async({config:e,listAssets:t,assertSourceDirExists:r,includeAllFiles:n})=>{let{source:i=mO,ignore:s=NWe,encoding:o=FWe,precompress:a=Gb}=e,c=QYe(process.cwd(),i);return r?.(c),{files:await bJe({sourceAbsolutePath:c,ignore:s,encoding:o,precompress:a,listAssets:t,includeAllFiles:n}),sourceAbsolutePath:c}},mJe=async({files:e,sourceAbsolutePath:t,listAssets:r})=>{let n=await r({}),i=e.map(async s=>await gJe({file:s,sourceAbsolutePath:t,existingAssets:n}));return(await Promise.all(i)).filter(({upload:s})=>s).map(({file:s})=>s)},yJe=async e=>{let t=await XYe(e);return qWe.createHash("sha256").update(t).digest("base64")},gJe=async({file:e,existingAssets:t,sourceAbsolutePath:r})=>{let n=e.alternateFile??e.file,i=t.find(({fullPath:c})=>c===upe({file:n,sourceAbsolutePath:r}));if((0,yO.isNullish)(i))return{file:e,upload:!0};let{encoding:s,file:o}=e,a=await yJe(o);return{file:e,upload:a!==i.encodings[s??"identity"]?.sha256}},bJe=async({sourceAbsolutePath:e,ignore:t,encoding:r,precompress:n,listAssets:i,includeAllFiles:s})=>{let o=dJe({sourceAbsolutePath:e,ignore:t}),a=(await oJe({sourceFiles:o,precompress:n})).filter(({compressed:y})=>!o.includes(y)),c=o.filter(y=>a.find(({source:g})=>g===y)===void 0),u=({file:y,ext:g})=>{let v=r.find(([b,_])=>yo(y,b));if((0,yO.nonNullish)(v)){let[b,_]=v;return _}if(g==="Z")return"compress";if(g==="gz")return"gzip";if(hue(y).toLowerCase()===".br")return"br";if(hue(y).toLowerCase()===".zlib")return"deflate"},l=async({file:y,alternateFile:g})=>{let v=await WGe(y),b=u({file:y,ext:v?.ext}),_=GGe.default.lookup(g??y);return{file:y,alternateFile:g,mime:typeof _=="string"?_:void 0,encoding:b}},p=await Promise.all(c.map(async y=>await l({file:y}))),d=async({source:y,compressed:g})=>{let v=async()=>await l({file:g,alternateFile:y}),b=async()=>await l({file:y});return await Promise.all([v(),b()])},f=async({compressed:y,source:g})=>await(async()=>await l({file:y,alternateFile:g}))(),h=await Promise.all(a.filter(({mode:y})=>y==="both").map(async({source:y,compressed:g})=>await d({source:y,compressed:g}))),m=[...await Promise.all(a.filter(({mode:y})=>y==="replace").map(async({source:y,compressed:g})=>await f({source:y,compressed:g}))),...h.flatMap(y=>y),...p];return s===!0?m:await mJe({files:m,sourceAbsolutePath:e,listAssets:i})},vJe=async({proposalType:e,cdn:t,executeChanges:r,autoCommit:n})=>{let i=async()=>{let c=Ur("Opening proposal...").start();try{let[u,l]=await gce({proposalType:e,cdn:t});return{proposalId:u}}finally{c.stop()}},{proposalId:s}=await i();await r(s);let o=async()=>{console.log("");let c=Ur("Submitting proposal...").start();try{let[u,{sha256:l,status:p}]=await bce({cdn:t,proposalId:s}),d=(0,tv.fromNullable)(l);return c.stop(),console.log(`Change submitted.
@@ -769,7 +769,7 @@ Done. The ${Ea(t)} ${(0,iu.green)(r)} has been configured for your terminal. \u2
769
769
  ${(0,ei.yellow)("--source-path")} Optional path to the TypeScript or JavaScript entry file.`,bQ=`${Qdr}
770
770
  ${efr}`,bi=`${bQ}
771
771
  ${(0,ei.yellow)("--container-url")} Override a custom container URL. If not provided, defaults to production or the local container in development mode.
772
- ${(0,ei.yellow)("--console-url")} Specify a custom URL to access the developer Console.`,bF=`The option ${(0,ei.yellow)("--keep-staged")} only applies when ${(0,ei.yellow)("--no-apply")} is NOT used (i.e. the change is applied immediately).`;var Gt=e=>Wt({args:e,options:["-d","--doc"]})?"doc":"cli";var Di=ee(Ue(),1);var xD="0.9.0";var rfr=` __ __ __ __ _ ____
772
+ ${(0,ei.yellow)("--console-url")} Specify a custom URL to access the developer Console.`,bF=`The option ${(0,ei.yellow)("--keep-staged")} only applies when ${(0,ei.yellow)("--no-apply")} is NOT used (i.e. the change is applied immediately).`;var Gt=e=>Wt({args:e,options:["-d","--doc"]})?"doc":"cli";var Di=ee(Ue(),1);var xD="0.9.1";var rfr=` __ __ __ __ _ ____
773
773
  __) || | || \\| |/ \\
774
774
  \\___/ \\___/ |_|\\__|\\____/`,zt=`${rfr} CLI ${(0,Di.grey)(`v${xD}`)}`,C5e=`Juno CLI ${(0,Di.grey)(`v${xD}`)}`,_D=`
775
775
  ${zt}
@@ -1177,7 +1177,7 @@ ${SBe}
1177
1177
  `,DBe=e=>{console.log(Gt(e)==="doc"?e1r:t1r)};var ap=ee(Ue(),1);var PBe=`Usage: ${(0,ap.green)("juno")} ${(0,ap.cyan)("deploy")} ${(0,ap.yellow)("[options]")}
1178
1178
 
1179
1179
  Options:
1180
- ${(0,ap.yellow)("--batch")} Number of files to upload in parallel per batch (default: 20).
1180
+ ${(0,ap.yellow)("--batch")} Number of files to upload in parallel per batch (default: 50).
1181
1181
  ${(0,ap.yellow)("--clear")} Clear existing app files before proceeding with deployment.
1182
1182
  ${(0,ap.yellow)("--config")} Apply configuration after deployment succeeds.
1183
1183
  ${(0,ap.yellow)("--no-apply")} Submit the deployment as a change but do not apply it yet.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/cli",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "The Juno command-line interface",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "@dfinity/zod-schemas": "^1.1.0",
33
33
  "@junobuild/admin": "^2.2.0",
34
34
  "@junobuild/cdn": "^1.3.0",
35
- "@junobuild/cli-tools": "^0.7.0",
35
+ "@junobuild/cli-tools": "^0.7.1",
36
36
  "@junobuild/config": "^2.1.0",
37
37
  "@junobuild/config-loader": "^0.4.4",
38
38
  "@junobuild/core": "^2.1.0",