MyRepo-Ums/node_modules/esbuild-wasm/lib/browser.min.js

23 lines
49 KiB
JavaScript
Raw Normal View History

2024-01-19 10:09:11 +00:00
(module=>{
"use strict";var ve=Object.defineProperty;var Ke=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Ve=Object.prototype.hasOwnProperty;var Ye=(e,t)=>{for(var n in t)ve(e,n,{get:t[n],enumerable:!0})},Je=(e,t,n,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of _e(t))!Ve.call(e,a)&&a!==n&&ve(e,a,{get:()=>t[a],enumerable:!(l=Ke(t,a))||l.enumerable});return e};var Qe=e=>Je(ve({},"__esModule",{value:!0}),e);var ne=(e,t,n)=>new Promise((l,a)=>{var i=p=>{try{s(n.next(p))}catch(b){a(b)}},d=p=>{try{s(n.throw(p))}catch(b){a(b)}},s=p=>p.done?l(p.value):Promise.resolve(p.value).then(i,d);s((n=n.apply(e,t)).next())});var we={};Ye(we,{analyzeMetafile:()=>pt,analyzeMetafileSync:()=>ht,build:()=>ut,buildSync:()=>gt,context:()=>ct,default:()=>vt,formatMessages:()=>dt,formatMessagesSync:()=>yt,initialize:()=>bt,transform:()=>ft,transformSync:()=>mt,version:()=>at});module.exports=Qe(we);function Oe(e){let t=l=>{if(l===null)n.write8(0);else if(typeof l=="boolean")n.write8(1),n.write8(+l);else if(typeof l=="number")n.write8(2),n.write32(l|0);else if(typeof l=="string")n.write8(3),n.write(Z(l));else if(l instanceof Uint8Array)n.write8(4),n.write(l);else if(l instanceof Array){n.write8(5),n.write32(l.length);for(let a of l)t(a)}else{let a=Object.keys(l);n.write8(6),n.write32(a.length);for(let i of a)n.write(Z(i)),t(l[i])}},n=new pe;return n.write32(0),n.write32(e.id<<1|+!e.isRequest),t(e.value),Re(n.buf,n.len-4,0),n.buf.subarray(0,n.len)}function ke(e){let t=()=>{switch(n.read8()){case 0:return null;case 1:return!!n.read8();case 2:return n.read32();case 3:return ie(n.read());case 4:return n.read();case 5:{let d=n.read32(),s=[];for(let p=0;p<d;p++)s.push(t());return s}case 6:{let d=n.read32(),s={};for(let p=0;p<d;p++)s[ie(n.read())]=t();return s}default:throw new Error("Invalid packet")}},n=new pe(e),l=n.read32(),a=(l&1)===0;l>>>=1;let i=t();if(n.ptr!==e.length)throw new Error("Invalid packet");return{id:l,isRequest:a,value:i}}var pe=class{constructor(t=new Uint8Array(1024)){this.buf=t;this.len=0;this.ptr=0}_write(t){if(this.len+t>this.buf.length){let n=new Uint8Array((this.len+t)*2);n.set(this.buf),this.buf=n}return this.len+=t,this.len-t}write8(t){let n=this._write(1);this.buf[n]=t}write32(t){let n=this._write(4);Re(this.buf,t,n)}write(t){let n=this._write(4+t.length);Re(this.buf,t.length,n),this.buf.set(t,n+4)}_read(t){if(this.ptr+t>this.buf.length)throw new Error("Invalid packet");return this.ptr+=t,this.ptr-t}read8(){return this.buf[this._read(1)]}read32(){return Ee(this.buf,this._read(4))}read(){let t=this.read32(),n=new Uint8Array(t),l=this._read(n.length);return n.set(this.buf.subarray(l,l+t)),n}},Z,ie,xe;if(typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined"){let e=new TextEncoder,t=new TextDecoder;Z=n=>e.encode(n),ie=n=>t.decode(n),xe='new TextEncoder().encode("")'}else if(typeof Buffer!="undefined")Z=e=>Buffer.from(e),ie=e=>{let{buffer:t,byteOffset:n,byteLength:l}=e;return Buffer.from(t,n,l).toString()},xe='Buffer.from("")';else throw new Error("No UTF-8 codec found");if(!(Z("")instanceof Uint8Array))throw new Error(`Invariant violation: "${xe} instanceof Uint8Array" is incorrectly false
This indicates that your JavaScript environment is broken. You cannot use
esbuild in this environment because esbuild relies on this invariant. This
is not a problem with esbuild. You need to fix your environment instead.
`);function Ee(e,t){return e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24}function Re(e,t,n){e[n++]=t,e[n++]=t>>8,e[n++]=t>>16,e[n++]=t>>24}var Y=JSON.stringify,$e="warning",Me="silent";function Ce(e){if(V(e,"target"),e.indexOf(",")>=0)throw new Error(`Invalid target: ${e}`);return e}var ye=()=>null,I=e=>typeof e=="boolean"?null:"a boolean",y=e=>typeof e=="string"?null:"a string",he=e=>e instanceof RegExp?null:"a RegExp object",se=e=>typeof e=="number"&&e===(e|0)?null:"an integer",De=e=>typeof e=="function"?null:"a function",W=e=>Array.isArray(e)?null:"an array",ee=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"an object",Ge=e=>typeof e=="object"&&e!==null?null:"an array or an object",Xe=e=>e instanceof WebAssembly.Module?null:"a WebAssembly.Module",Ae=e=>typeof e=="object"&&!Array.isArray(e)?null:"an object or null",Fe=e=>typeof e=="string"||typeof e=="boolean"?null:"a string or a boolean",Ze=e=>typeof e=="string"||typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"a string or an object",et=e=>typeof e=="string"||Array.isArray(e)?null:"a string or an array",Te=e=>typeof e=="string"||e instanceof Uint8Array?null:"a string or a Uint8Array",tt=e=>typeof e=="string"||e instanceof URL?null:"a string or a URL";function r(e,t,n,l){let a=e[n];if(t[n+""]=!0,a===void 0)return;let i=l(a);if(i!==null)throw new Error(`${Y(n)} must be ${i}`);return a}function K(e,t,n){for(let l in e)if(!(l in t))throw new Error(`Invalid option ${n}: ${Y(l)}`)}function Be(e){let t=Object.create(null),n=r(e,t,"wasmURL",tt),l=r(e,t,"wasmModule",Xe),a=r(e,t,"worker",I);return K(e,t,"in initialize() call"),{wasmURL:n,wasmModule:l,worker:a}}function Ue(e){let t;if(e!==void 0){t=Object.create(null);for(let n in e){let l=e[n];if(typeof l=="string"||l===!1)t[n]=l;else throw new Error(`Expected ${Y(n)} in mangle cache to map to either a string or false`)}}return t}function be(e,t,n,l,a){let i=r(t,n,"color",I),d=r(t,n,"logLevel",y),s=r(t,n,"logLimit",se);i!==void 0?e.push(`--color=${i}`):l&&e.push("--color=true"),e.push(`--log-level=${d||a}`),e.push(`--log-limit=${s||0}`)}function V(e,t,n){if(typeof e!="string")throw new Error(`Expected value for ${t}${n!==void 0?" "+Y(n):""} to be a string, got ${typeof e} instead`);return e}function je(e,t,n){let l=r(t,n,"legalComments",y),a=r(t,n,"sourceRoot",y),i=r(t,n,"sourcesContent",I),d=r(t,n,"target",et),s=r(t,n,"format",y),p=r(t,n,"globalName",y),b=r(t,n,"mangleProps",he),w=r(t,n,"reserveProps",he),U=r(t,n,"mangleQuoted",I),j=r(t,n,"minify",I),B=r(t,n,"minifySyntax",I),L=r(t,n,"minifyWhitespace",I),Q=r(t,n,"minifyIdentifiers",I),T=r(t,n,"lineLimit",se),z=r(t,n,"drop",W),J=r(t,n,"dropLabels",W),v=r(t,n,"charset",y),m=r(t,n,"treeShaking",I),f=r(t,n,"ignoreAnnotations",I),o=r(t,n,"jsx",y),x=r(t,n,"jsxFactory",y),$=r(t,n,"jsxFragment",y),M=r(t,n,"jsxImportSource",y),P=r(t,n,"jsxDev",I),u=r(t,n,"jsxSideEffects",I),c=r(t,n,"define",ee),h=r(t,n,"logOverride",ee),E=r(t,n,"supported",ee),C=r(t,n,"pure",W),S=r(t,n,"keepNames",I),O=r(t,n,"platform",y),A=r(t,n,"tsconfigRaw",Ze);if(l&&e.push(`--legal-comments=${l}`),a!==void 0&&e.push(`--source-root=${a}`),i!==void 0&&e.push(`--sources-content=${i}`),d&&(Array.isArray(d)?e.push(`--target=${Array.from(d).map(Ce).join(",")}`):e.push(`--target=${Ce(d)}`)),s&&e.push(`--format=${s}`),p&&e.push(`--global-name=${p}`),O&&e.push(`--platform=${O}`),A&&e.push(`--tsconfig-raw=${typeof A=="string"?A:JSON.stringify(A)}`),j&&e.push("--minify"),B&&e.push("--minify-syntax"),L&&e.push("--minify-whitespace"),Q&&e.push("--minify-identifiers"),T&&e.push(`--line-limit=${T}`),v&&e.push(`--charset=${v}`),m!==void 0&&e.push(`--tree-shaking=${m}`),f&&e.push("--ignore-annotations"),z)for(let R of z)e.push(`--drop:${V(R,"drop")}`);if(J&&e.push(`--drop-labels=${Array.from(J).map(R=>V(R,"dropLabels")).join(",")}`),b&&e.push(`--mangle-props=${b.source}`),w&&e.push(`--reserve-props=${w.source}`),U!==void 0&&e.push(`--mangle-quoted=${U}`),o&&e.push(`--jsx=${o}`),x&&e.push(`--jsx-factory=${x}`),$&&e.push(`--jsx-fragment=${$}`),M&&e.push(`--jsx-import-source=${M}`),P&&e.push("--jsx-dev"),u&&e.push("--jsx-side
`);i.splice(1,1);let d=Ne(t,i,n);if(d)return l={text:e.message,location:d},l}catch(i){}}}function le(e,t,n,l,a){let i="Internal error",d=null;try{i=(e&&e.message||e)+""}catch(s){}try{d=Ne(t,(e.stack+"").split(`
`),"")}catch(s){}return{id:"",pluginName:a,text:i,location:d,notes:l?[l]:[],detail:n?n.store(e):-1}}function Ne(e,t,n){let l=" at ";if(e.readFileSync&&!t[0].startsWith(l)&&t[1].startsWith(l))for(let a=1;a<t.length;a++){let i=t[a];if(i.startsWith(l))for(i=i.slice(l.length);;){let d=/^(?:new |async )?\S+ \((.*)\)$/.exec(i);if(d){i=d[1];continue}if(d=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(i),d){i=d[1];continue}if(d=/^(\S+):(\d+):(\d+)$/.exec(i),d){let s;try{s=e.readFileSync(d[1],"utf8")}catch(U){break}let p=s.split(/\r\n|\r|\n|\u2028|\u2029/)[+d[2]-1]||"",b=+d[3]-1,w=p.slice(b,b+n.length)===n?n.length:0;return{file:d[1],namespace:"file",line:+d[2],column:Z(p.slice(0,b)).length,length:Z(p.slice(b,b+w)).length,lineText:p+`
`+t.slice(1).join(`
`),suggestion:""}}break}}return null}function fe(e,t,n){let l=5;e+=t.length<1?"":` with ${t.length} error${t.length<2?"":"s"}:`+t.slice(0,l+1).map((i,d)=>{if(d===l)return`
...`;if(!i.location)return`
error: ${i.text}`;let{file:s,line:p,column:b}=i.location,w=i.pluginName?`[plugin: ${i.pluginName}] `:"";return`
${s}:${p}:${b}: ERROR: ${w}${i.text}`}).join("");let a=new Error(e);for(let[i,d]of[["errors",t],["warnings",n]])Object.defineProperty(a,i,{configurable:!0,enumerable:!0,get:()=>d,set:s=>Object.defineProperty(a,i,{configurable:!0,enumerable:!0,value:s})});return a}function ae(e,t){for(let n of e)n.detail=t.load(n.detail);return e}function Pe(e,t){if(e==null)return null;let n={},l=r(e,n,"file",y),a=r(e,n,"namespace",y),i=r(e,n,"line",se),d=r(e,n,"column",se),s=r(e,n,"length",se),p=r(e,n,"lineText",y),b=r(e,n,"suggestion",y);return K(e,n,t),{file:l||"",namespace:a||"",line:i||0,column:d||0,length:s||0,lineText:p||"",suggestion:b||""}}function re(e,t,n,l){let a=[],i=0;for(let d of e){let s={},p=r(d,s,"id",y),b=r(d,s,"pluginName",y),w=r(d,s,"text",y),U=r(d,s,"location",Ae),j=r(d,s,"notes",W),B=r(d,s,"detail",ye),L=`in element ${i} of "${t}"`;K(d,s,L);let Q=[];if(j)for(let T of j){let z={},J=r(T,z,"text",y),v=r(T,z,"location",Ae);K(T,z,L),Q.push({text:J||"",location:Pe(v,L)})}a.push({id:p||"",pluginName:b||l,text:w||"",location:Pe(U,L),notes:Q,detail:n?n.store(B):-1}),i++}return a}function me(e,t){let n=[];for(let l of e){if(typeof l!="string")throw new Error(`${Y(t)} must be an array of strings`);n.push(l)}return n}function st({path:e,contents:t,hash:n}){let l=null;return{path:e,contents:t,hash:n,get text(){let a=this.contents;return(l===null||a!==t)&&(t=a,l=ie(a)),l}}}var at="0.19.5",ut=e=>de().build(e),ct=e=>de().context(e),ft=(e,t)=>de().transform(e,t),dt=(e,t)=>de().formatMessages(e,t),pt=(e,t)=>de().analyzeMetafile(e,t),gt=()=>{throw new Error('The "buildSync" API only works in node')},mt=()=>{throw new Error('The "transformSync" API only works in node')},yt=()=>{throw new Error('The "formatMessagesSync" API only works in node')},ht=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ue,Se,de=()=>{if(Se)return Se;throw ue?new Error('You need to wait for the promise returned from "initialize" to be resolved before calling this'):new Error('You need to call "initialize" before calling this')},bt=e=>{e=Be(e||{});let t=e.wasmURL,n=e.wasmModule,l=e.worker!==!1;if(!t&&!n)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ue)throw new Error('Cannot call "initialize" more than once');return ue=wt(t||"",n,l),ue.catch(()=>{ue=void 0}),ue},wt=(e,t,n)=>ne(void 0,null,function*(){let l;if(n){let b=new Blob(['onmessage=(postMessage=>{\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nvar y=(r,f,m)=>new Promise((c,n)=>{var s=h=>{try{l(m.next(h))}catch(u){n(u)}},i=h=>{try{l(m.throw(h))}catch(u){n(u)}},l=h=>h.done?c(h.value):Promise.resolve(h.value).then(s,i);l((m=m.apply(r,f)).next())});let onmessage,globalThis={};for(let r=self;r;r=Object.getPrototypeOf(r))for(let f of Object.getOwnPropertyNames(r))f in globalThis||Object.defineProperty(globalThis,f,{get:()=>self[f]});(()=>{const r=()=>{const c=new Error("not implemented");return c.code="ENOSYS",c};if(!globalThis.fs){let c="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(n,s){c+=m.decode(s);const i=c.lastIndexOf(`\n`);return i!=-1&&(console.log(c.substring(0,i)),c=c.substring(i+1)),s.length},write(n,s,i,l,h,u){if(i!==0||l!==s.length||h!==null){u(r());return}const g=this.writeSync(n,s);u(null,g)},chmod(n,s,i){i(r())},chown(n,s,i,l){l(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,l){l(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,l){l(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,l){l(r())},read(n,s,i,l,h,u){u(r())},readdir(n,s){s(r())},readlink(n,s){s(r())},rename(n,s,i){i(r())},rmdir(n,s){s(r())},stat(n,s){s(r())},symlink(n,s,i){i(r())},truncate(n,s,i){i(r())},unlink(n,s){s(r())},utimes(n,s,i,l){l(r())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw r()},pid:-1,ppid:-1,umask(){throw r(
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
var y=(r,f,m)=>new Promise((c,n)=>{var s=h=>{try{l(m.next(h))}catch(u){n(u)}},i=h=>{try{l(m.throw(h))}catch(u){n(u)}},l=h=>h.done?c(h.value):Promise.resolve(h.value).then(s,i);l((m=m.apply(r,f)).next())});let onmessage,globalThis={};for(let r=self;r;r=Object.getPrototypeOf(r))for(let f of Object.getOwnPropertyNames(r))f in globalThis||Object.defineProperty(globalThis,f,{get:()=>self[f]});(()=>{const r=()=>{const c=new Error("not implemented");return c.code="ENOSYS",c};if(!globalThis.fs){let c="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(n,s){c+=m.decode(s);const i=c.lastIndexOf(`
`);return i!=-1&&(console.log(c.substring(0,i)),c=c.substring(i+1)),s.length},write(n,s,i,l,h,u){if(i!==0||l!==s.length||h!==null){u(r());return}const g=this.writeSync(n,s);u(null,g)},chmod(n,s,i){i(r())},chown(n,s,i,l){l(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,l){l(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,l){l(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,l){l(r())},read(n,s,i,l,h,u){u(r())},readdir(n,s){s(r())},readlink(n,s){s(r())},rename(n,s,i){i(r())},rmdir(n,s){s(r())},stat(n,s){s(r())},symlink(n,s,i){i(r())},truncate(n,s,i){i(r())},unlink(n,s){s(r())},utimes(n,s,i,l){l(r())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw r()},pid:-1,ppid:-1,umask(){throw r()},cwd(){throw r()},chdir(){throw r()}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");const f=new TextEncoder("utf-8"),m=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{e!==0&&console.warn("exit code:",e)},this._exitPromise=new Promise(e=>{this._resolveExitPromise=e}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let a=this._ids.get(t);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=t,this._goRefCounts[a]=0,this._ids.set(t,a)),this._goRefCounts[a]++;let d=0;switch(typeof t){case"object":t!==null&&(d=1);break;case"string":d=2;break;case"symbol":d=3;break;case"function":d=4;break}this.mem.setUint32(e+4,2146959360|d,!0),this.mem.setUint32(e,a,!0)},l=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},h=e=>{const t=n(e+0),o=n(e+8),a=new Array(o);for(let d=0;d<o;d++)a[d]=s(t+d*8);return a},u=e=>{const t=n(e+0),o=n(e+8);return m.decode(new DataView(this._inst.exports.mem.buffer,t,o))},g=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{e>>>=0;const t=n(e+8),o=n(e+16),a=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,c(e+8,(g+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();c(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(l(e+8))},"syscal
`);g.length>1&&console.log(g.slice(0,-1).join(`
`)),c=g[g.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:h})=>{h.length>0&&(n.push(h),s&&s())},m.read=(h,u,g,e,t,o)=>{if(h!==0||g!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>m.read(h,u,g,e,t,o);return}let a=n[0],d=Math.max(0,Math.min(e,a.length-i));u.set(a.subarray(i,i+d),g),i+=d,i===a.length&&(n.shift(),i=0),o(null,d)};let l=new globalThis.Go;l.argv=["","--service=0.19.5"],tryToInstantiateModule(r,l).then(h=>{postMessage(null),l.run(h)},h=>{postMessage(h)})};function tryToInstantiateModule(r,f){return y(this,null,function*(){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const m=yield fetch(r);if(!m.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\/wasm($|;)/i.test(m.headers.get("Content-Type")||""))return(yield WebAssembly.instantiateStreaming(m,f.importObject)).instance;const c=yield m.arrayBuffer();return(yield WebAssembly.instantiate(c,f.importObject)).instance})}return r=>onmessage(r);})(w=>l.onmessage({data:w}));l={onmessage:null,postMessage:w=>setTimeout(()=>b({data:w})),terminate(){}}}let a,i,d=new Promise((b,w)=>{a=b,i=w});l.onmessage=({data:b})=>{l.onmessage=({data:w})=>s(w),b?i(b):a()},l.postMessage(t||new URL(e,location.href).toString());let{readFromStdout:s,service:p}=Le({writeToStdin(b){l.postMessage(b)},isSync:!1,hasFS:!1,esbuild:we});yield d,Se={build:b=>new Promise((w,U)=>p.buildOrContext({callName:"build",refs:null,options:b,isTTY:!1,defaultWD:"/",callback:(j,B)=>j?U(j):w(B)})),context:b=>new Promise((w,U)=>p.buildOrContext({callName:"context",refs:null,options:b,isTTY:!1,defaultWD:"/",callback:(j,B)=>j?U(j):w(B)})),transform:(b,w)=>new Promise((U,j)=>p.transform({callName:"transform",refs:null,input:b,options:w||{},isTTY:!1,fs:{readFile(B,L){L(new Error("Internal error"),null)},writeFile(B,L){L(null)}},callback:(B,L)=>B?j(B):U(L)})),formatMessages:(b,w)=>new Promise((U,j)=>p.formatMessages({callName:"formatMessages",refs:null,messages:b,options:w,callback:(B,L)=>B?j(B):U(L)})),analyzeMetafile:(b,w)=>new Promise((U,j)=>p.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof b=="string"?b:JSON.stringify(b),options:w,callback:(B,L)=>B?j(B):U(L)}))}}),vt=we;
})(typeof module==="object"?module:{set exports(x){(typeof self!=="undefined"?self:this).esbuild=x}});