Socket
Socket
Sign inDemoInstall

esbuild-wasm

Package Overview
Dependencies
0
Maintainers
1
Versions
456
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.19.9 to 0.19.10

10

esm/browser.min.js

@@ -6,5 +6,5 @@ var We=Object.defineProperty;var ze=(e,t)=>{for(var n in t)We(e,n,{get:t[n],enumerable:!0})};var be={};ze(be,{analyzeMetafile:()=>ot,analyzeMetafileSync:()=>ft,build:()=>rt,buildSync:()=>at,context:()=>it,default:()=>gt,formatMessages:()=>st,formatMessagesSync:()=>ct,initialize:()=>dt,transform:()=>lt,transformSync:()=>ut,version:()=>nt});function xe(e){let t=i=>{if(i===null)n.write8(0);else if(typeof i=="boolean")n.write8(1),n.write8(+i);else if(typeof i=="number")n.write8(2),n.write32(i|0);else if(typeof i=="string")n.write8(3),n.write(Z(i));else if(i instanceof Uint8Array)n.write8(4),n.write(i);else if(i instanceof Array){n.write8(5),n.write32(i.length);for(let u of i)t(u)}else{let u=Object.keys(i);n.write8(6),n.write32(u.length);for(let l of u)n.write(Z(l)),t(i[l])}},n=new de;return n.write32(0),n.write32(e.id<<1|+!e.isRequest),t(e.value),ve(n.buf,n.len-4,0),n.buf.subarray(0,n.len)}function Ee(e){let t=()=>{switch(n.read8()){case 0:return null;case 1:return!!n.read8();case 2:return n.read32();case 3:return re(n.read());case 4:return n.read();case 5:{let m=n.read32(),s=[];for(let d=0;d<m;d++)s.push(t());return s}case 6:{let m=n.read32(),s={};for(let d=0;d<m;d++)s[re(n.read())]=t();return s}default:throw new Error("Invalid packet")}},n=new de(e),i=n.read32(),u=(i&1)===0;i>>>=1;let l=t();if(n.ptr!==e.length)throw new Error("Invalid packet");return{id:i,isRequest:u,value:l}}var de=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);ve(this.buf,t,n)}write(t){let n=this._write(4+t.length);ve(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 Re(this.buf,this._read(4))}read(){let t=this.read32(),n=new Uint8Array(t),i=this._read(n.length);return n.set(this.buf.subarray(i,i+t)),n}},Z,re,we;if(typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined"){let e=new TextEncoder,t=new TextDecoder;Z=n=>e.encode(n),re=n=>t.decode(n),we='new TextEncoder().encode("")'}else if(typeof Buffer!="undefined")Z=e=>Buffer.from(e),re=e=>{let{buffer:t,byteOffset:n,byteLength:i}=e;return Buffer.from(t,n,i).toString()},we='Buffer.from("")';else throw new Error("No UTF-8 codec found");if(!(Z("")instanceof Uint8Array))throw new Error(`Invariant violation: "${we} instanceof Uint8Array" is incorrectly false

is not a problem with esbuild. You need to fix your environment instead.
`);function Re(e,t){return e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24}function ve(e,t,n){e[n++]=t,e[n++]=t>>8,e[n++]=t>>16,e[n++]=t>>24}var J=JSON.stringify,Se="warning",ke="silent";function $e(e){if(Y(e,"target"),e.indexOf(",")>=0)throw new Error(`Invalid target: ${e}`);return e}var me=()=>null,I=e=>typeof e=="boolean"?null:"a boolean",y=e=>typeof e=="string"?null:"a string",ye=e=>e instanceof RegExp?null:"a RegExp object",le=e=>typeof e=="number"&&e===(e|0)?null:"an integer",Ae=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",_e=e=>typeof e=="object"&&e!==null?null:"an array or an object",Ve=e=>e instanceof WebAssembly.Module?null:"a WebAssembly.Module",Ce=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",Ye=e=>typeof e=="string"||typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"a string or an object",Je=e=>typeof e=="string"||Array.isArray(e)?null:"a string or an array",Pe=e=>typeof e=="string"||e instanceof Uint8Array?null:"a string or a Uint8Array",Qe=e=>typeof e=="string"||e instanceof URL?null:"a string or a URL";function r(e,t,n,i){let u=e[n];if(t[n+""]=!0,u===void 0)return;let l=i(u);if(l!==null)throw new Error(`${J(n)} must be ${l}`);return u}function K(e,t,n){for(let i in e)if(!(i in t))throw new Error(`Invalid option ${n}: ${J(i)}`)}function De(e){let t=Object.create(null),n=r(e,t,"wasmURL",Qe),i=r(e,t,"wasmModule",Ve),u=r(e,t,"worker",I);return K(e,t,"in initialize() call"),{wasmURL:n,wasmModule:i,worker:u}}function Te(e){let t;if(e!==void 0){t=Object.create(null);for(let n in e){let i=e[n];if(typeof i=="string"||i===!1)t[n]=i;else throw new Error(`Expected ${J(n)} in mangle cache to map to either a string or false`)}}return t}function he(e,t,n,i,u){let l=r(t,n,"color",I),m=r(t,n,"logLevel",y),s=r(t,n,"logLimit",le);l!==void 0?e.push(`--color=${l}`):i&&e.push("--color=true"),e.push(`--log-level=${m||u}`),e.push(`--log-limit=${s||0}`)}function Y(e,t,n){if(typeof e!="string")throw new Error(`Expected value for ${t}${n!==void 0?" "+J(n):""} to be a string, got ${typeof e} instead`);return e}function Be(e,t,n){let i=r(t,n,"legalComments",y),u=r(t,n,"sourceRoot",y),l=r(t,n,"sourcesContent",I),m=r(t,n,"target",Je),s=r(t,n,"format",y),d=r(t,n,"globalName",y),b=r(t,n,"mangleProps",ye),w=r(t,n,"reserveProps",ye),T=r(t,n,"mangleQuoted",I),L=r(t,n,"minify",I),B=r(t,n,"minifySyntax",I),q=r(t,n,"minifyWhitespace",I),Q=r(t,n,"minifyIdentifiers",I),U=r(t,n,"lineLimit",le),z=r(t,n,"drop",W),_=r(t,n,"dropLabels",W),v=r(t,n,"charset",y),g=r(t,n,"treeShaking",I),f=r(t,n,"ignoreAnnotations",I),o=r(t,n,"jsx",y),x=r(t,n,"jsxFactory",y),E=r(t,n,"jsxFragment",y),C=r(t,n,"jsxImportSource",y),S=r(t,n,"jsxDev",I),a=r(t,n,"jsxSideEffects",I),c=r(t,n,"define",ee),h=r(t,n,"logOverride",ee),M=r(t,n,"supported",ee),F=r(t,n,"pure",W),k=r(t,n,"keepNames",I),O=r(t,n,"platform",y),A=r(t,n,"tsconfigRaw",Ye);if(i&&e.push(`--legal-comments=${i}`),u!==void 0&&e.push(`--source-root=${u}`),l!==void 0&&e.push(`--sources-content=${l}`),m&&(Array.isArray(m)?e.push(`--target=${Array.from(m).map($e).join(",")}`):e.push(`--target=${$e(m)}`)),s&&e.push(`--format=${s}`),d&&e.push(`--global-name=${d}`),O&&e.push(`--platform=${O}`),A&&e.push(`--tsconfig-raw=${typeof A=="string"?A:JSON.stringify(A)}`),L&&e.push("--minify"),B&&e.push("--minify-syntax"),q&&e.push("--minify-whitespace"),Q&&e.push("--minify-identifiers"),U&&e.push(`--line-limit=${U}`),v&&e.push(`--charset=${v}`),g!==void 0&&e.push(`--tree-shaking=${g}`),f&&e.push("--ignore-annotations"),z)for(let R of z)e.push(`--drop:${Y(R,"drop")}`);if(_&&e.push(`--drop-labels=${Array.from(_).map(R=>Y(R,"dropLabels")).join(",")}`),b&&e.push(`--mangle-props=${b.source}`),w&&e.push(`--reserve-props=${w.source}`),T!==void 0&&e.push(`--mangle-quoted=${T}`),o&&e.push(`--jsx=${o}`),x&&e.push(`--jsx-factory=${x}`),E&&e.push(`--jsx-fragment=${E}`),C&&e.push(`--jsx-import-source=${C}`),S&&e.push("--jsx-dev"),a&&e.push("--jsx-side-effects"),c)for(let R in c){if(R.indexOf("=")>=0)throw new Error(`Invalid define: ${R}`);e.push(`--define:${R}=${Y(c[R],"define",R)}`)}if(h)for(let R in h){if(R.indexOf("=")>=0)throw new Error(`Invalid log override: ${R}`);e.push(`--log-override:${R}=${Y(h[R],"log override",R)}`)}if(M)for(let R in M){if(R.indexOf("=")>=0)throw new Error(`Invalid supported: ${R}`);let $=M[R];if(typeof $!="boolean")throw new Error(`Expected value for supported ${J(R)} to be a boolean, got ${typeof $} instead`);e.push(`--supported:${R}=${$}`)}if(F)for(let R of F)e.push(`--pure:${Y(R,"pure")}`);k&&e.push("--keep-names")}function He(e,t,n,i,u){var se;let l=[],m=[],s=Object.create(null),d=null,b=null;he(l,t,s,n,i),Be(l,t,s);let w=r(t,s,"sourcemap",Fe),T=r(t,s,"bundle",I),L=r(t,s,"splitting",I),B=r(t,s,"preserveSymlinks",I),q=r(t,s,"metafile",I),Q=r(t,s,"outfile",y),U=r(t,s,"outdir",y),z=r(t,s,"outbase",y),_=r(t,s,"tsconfig",y),v=r(t,s,"resolveExtensions",W),g=r(t,s,"nodePaths",W),f=r(t,s,"mainFields",W),o=r(t,s,"conditions",W),x=r(t,s,"external",W),E=r(t,s,"packages",y),C=r(t,s,"alias",ee),S=r(t,s,"loader",ee),a=r(t,s,"outExtension",ee),c=r(t,s,"publicPath",y),h=r(t,s,"entryNames",y),M=r(t,s,"chunkNames",y),F=r(t,s,"assetNames",y),k=r(t,s,"inject",W),O=r(t,s,"banner",ee),A=r(t,s,"footer",ee),R=r(t,s,"entryPoints",_e),$=r(t,s,"absWorkingDir",y),D=r(t,s,"stdin",ee),P=(se=r(t,s,"write",I))!=null?se:u,j=r(t,s,"allowOverwrite",I),V=r(t,s,"mangleCache",ee);if(s.plugins=!0,K(t,s,`in ${e}() call`),w&&l.push(`--sourcemap${w===!0?"":`=${w}`}`),T&&l.push("--bundle"),j&&l.push("--allow-overwrite"),L&&l.push("--splitting"),B&&l.push("--preserve-symlinks"),q&&l.push("--metafile"),Q&&l.push(`--outfile=${Q}`),U&&l.push(`--outdir=${U}`),z&&l.push(`--outbase=${z}`),_&&l.push(`--tsconfig=${_}`),E&&l.push(`--packages=${E}`),v){let p=[];for(let N of v){if(Y(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);p.push(N)}l.push(`--resolve-extensions=${p.join(",")}`)}if(c&&l.push(`--public-path=${c}`),h&&l.push(`--entry-names=${h}`),M&&l.push(`--chunk-names=${M}`),F&&l.push(`--asset-names=${F}`),f){let p=[];for(let N of f){if(Y(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);p.push(N)}l.push(`--main-fields=${p.join(",")}`)}if(o){let p=[];for(let N of o){if(Y(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);p.push(N)}l.push(`--conditions=${p.join(",")}`)}if(x)for(let p of x)l.push(`--external:${Y(p,"external")}`);if(C)for(let p in C){if(p.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${p}`);l.push(`--alias:${p}=${Y(C[p],"alias",p)}`)}if(O)for(let p in O){if(p.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${p}`);l.push(`--banner:${p}=${Y(O[p],"banner",p)}`)}if(A)for(let p in A){if(p.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${p}`);l.push(`--footer:${p}=${Y(A[p],"footer",p)}`)}if(k)for(let p of k)l.push(`--inject:${Y(p,"inject")}`);if(S)for(let p in S){if(p.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${p}`);l.push(`--loader:${p}=${Y(S[p],"loader",p)}`)}if(a)for(let p in a){if(p.indexOf("=")>=0)throw new Error(`Invalid out extension: ${p}`);l.push(`--out-extension:${p}=${Y(a[p],"out extension",p)}`)}if(R)if(Array.isArray(R))for(let p=0,N=R.length;p<N;p++){let X=R[p];if(typeof X=="object"&&X!==null){let te=Object.create(null),G=r(X,te,"in",y),ue=r(X,te,"out",y);if(K(X,te,"in entry point at index "+p),G===void 0)throw new Error('Missing property "in" for entry point at index '+p);if(ue===void 0)throw new Error('Missing property "out" for entry point at index '+p);m.push([ue,G])}else m.push(["",Y(X,"entry point at index "+p)])}else for(let p in R)m.push([p,Y(R[p],"entry point",p)]);if(D){let p=Object.create(null),N=r(D,p,"contents",Pe),X=r(D,p,"resolveDir",y),te=r(D,p,"sourcefile",y),G=r(D,p,"loader",y);K(D,p,'in "stdin" object'),te&&l.push(`--sourcefile=${te}`),G&&l.push(`--loader=${G}`),X&&(b=X),typeof N=="string"?d=Z(N):N instanceof Uint8Array&&(d=N)}let H=[];if(g)for(let p of g)p+="",H.push(p);return{entries:m,flags:l,write:P,stdinContents:d,stdinResolveDir:b,absWorkingDir:$,nodePaths:H,mangleCache:Te(V)}}function Ge(e,t,n,i){let u=[],l=Object.create(null);he(u,t,l,n,i),Be(u,t,l);let m=r(t,l,"sourcemap",Fe),s=r(t,l,"sourcefile",y),d=r(t,l,"loader",y),b=r(t,l,"banner",y),w=r(t,l,"footer",y),T=r(t,l,"mangleCache",ee);return K(t,l,`in ${e}() call`),m&&u.push(`--sourcemap=${m===!0?"external":m}`),s&&u.push(`--sourcefile=${s}`),d&&u.push(`--loader=${d}`),b&&u.push(`--banner=${b}`),w&&u.push(`--footer=${w}`),{flags:u,mangleCache:Te(T)}}function Ue(e){let t={},n={didClose:!1,reason:""},i={},u=0,l=0,m=new Uint8Array(16*1024),s=0,d=v=>{let g=s+v.length;if(g>m.length){let o=new Uint8Array(g*2);o.set(m),m=o}m.set(v,s),s+=v.length;let f=0;for(;f+4<=s;){let o=Re(m,f);if(f+4+o>s)break;f+=4,q(m.subarray(f,f+o)),f+=o}f>0&&(m.copyWithin(0,f,s),s-=f)},b=v=>{n.didClose=!0,v&&(n.reason=": "+(v.message||v));let g="The service was stopped"+n.reason;for(let f in i)i[f](g,null);i={}},w=(v,g,f)=>{if(n.didClose)return f("The service is no longer running"+n.reason,null);let o=u++;i[o]=(x,E)=>{try{f(x,E)}finally{v&&v.unref()}},v&&v.ref(),e.writeToStdin(xe({id:o,isRequest:!0,value:g}))},T=(v,g)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);e.writeToStdin(xe({id:v,isRequest:!1,value:g}))},L=async(v,g)=>{try{if(g.command==="ping"){T(v,{});return}if(typeof g.key=="number"){let f=t[g.key];if(!f)return;let o=f[g.command];if(o){await o(v,g);return}}throw new Error("Invalid command: "+g.command)}catch(f){let o=[ie(f,e,null,void 0,"")];try{T(v,{errors:o})}catch(x){}}},B=!0,q=v=>{if(B){B=!1;let f=String.fromCharCode(...v);if(f!=="0.19.9")throw new Error(`Cannot start service: Host version "0.19.9" does not match binary version ${J(f)}`);return}let g=Ee(v);if(g.isRequest)L(g.id,g.value);else{let f=i[g.id];delete i[g.id],g.value.error?f(g.value.error,{}):f(null,g.value)}};return{readFromStdout:d,afterClose:b,service:{buildOrContext:({callName:v,refs:g,options:f,isTTY:o,defaultWD:x,callback:E})=>{let C=0,S=l++,a={},c={ref(){++C===1&&g&&g.ref()},unref(){--C===0&&(delete t[S],g&&g.unref())}};t[S]=a,c.ref(),Xe(v,S,w,T,c,e,a,f,o,x,(h,M)=>{try{E(h,M)}finally{c.unref()}})},transform:({callName:v,refs:g,input:f,options:o,isTTY:x,fs:E,callback:C})=>{let S=je(),a=c=>{try{if(typeof f!="string"&&!(f instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:h,mangleCache:M}=Ge(v,o,x,ke),F={command:"transform",flags:h,inputFS:c!==null,input:c!==null?Z(c):typeof f=="string"?Z(f):f};M&&(F.mangleCache=M),w(g,F,(k,O)=>{if(k)return C(new Error(k),null);let A=oe(O.errors,S),R=oe(O.warnings,S),$=1,D=()=>{if(--$===0){let P={warnings:R,code:O.code,map:O.map,mangleCache:void 0,legalComments:void 0};"legalComments"in O&&(P.legalComments=O==null?void 0:O.legalComments),O.mangleCache&&(P.mangleCache=O==null?void 0:O.mangleCache),C(null,P)}};if(A.length>0)return C(ce("Transform failed",A,R),null);O.codeFS&&($++,E.readFile(O.code,(P,j)=>{P!==null?C(P,null):(O.code=j,D())})),O.mapFS&&($++,E.readFile(O.map,(P,j)=>{P!==null?C(P,null):(O.map=j,D())})),D()})}catch(h){let M=[];try{he(M,o,{},x,ke)}catch(k){}let F=ie(h,e,S,void 0,"");w(g,{command:"error",flags:M,error:F},()=>{F.detail=S.load(F.detail),C(ce("Transform failed",[F],[]),null)})}};if((typeof f=="string"||f instanceof Uint8Array)&&f.length>1024*1024){let c=a;a=()=>E.writeFile(f,c)}a(null)},formatMessages:({callName:v,refs:g,messages:f,options:o,callback:x})=>{if(!o)throw new Error(`Missing second argument in ${v}() call`);let E={},C=r(o,E,"kind",y),S=r(o,E,"color",I),a=r(o,E,"terminalWidth",le);if(K(o,E,`in ${v}() call`),C===void 0)throw new Error(`Missing "kind" in ${v}() call`);if(C!=="error"&&C!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${v}() call`);let c={command:"format-msgs",messages:ne(f,"messages",null,"",a),isWarning:C==="warning"};S!==void 0&&(c.color=S),a!==void 0&&(c.terminalWidth=a),w(g,c,(h,M)=>{if(h)return x(new Error(h),null);x(null,M.messages)})},analyzeMetafile:({callName:v,refs:g,metafile:f,options:o,callback:x})=>{o===void 0&&(o={});let E={},C=r(o,E,"color",I),S=r(o,E,"verbose",I);K(o,E,`in ${v}() call`);let a={command:"analyze-metafile",metafile:f};C!==void 0&&(a.color=C),S!==void 0&&(a.verbose=S),w(g,a,(c,h)=>{if(c)return x(new Error(c),null);x(null,h.result)})}}}}function Xe(e,t,n,i,u,l,m,s,d,b,w){let T=je(),L=e==="context",B=(U,z)=>{let _=[];try{he(_,s,{},d,Se)}catch(g){}let v=ie(U,l,T,void 0,z);n(u,{command:"error",flags:_,error:v},()=>{v.detail=T.load(v.detail),w(ce(L?"Context failed":"Build failed",[v],[]),null)})},q;if(typeof s=="object"){let U=s.plugins;if(U!==void 0){if(!Array.isArray(U))return B(new Error('"plugins" must be an array'),"");q=U}}if(q&&q.length>0){if(l.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");Ze(t,n,i,u,l,m,s,q,T).then(U=>{if(!U.ok)return B(U.error,U.pluginName);try{Q(U.requestPlugins,U.runOnEndCallbacks,U.scheduleOnDisposeCallbacks)}catch(z){B(z,"")}},U=>B(U,""));return}try{Q(null,(U,z)=>z([],[]),()=>{})}catch(U){B(U,"")}function Q(U,z,_){let v=l.hasFS,{entries:g,flags:f,write:o,stdinContents:x,stdinResolveDir:E,absWorkingDir:C,nodePaths:S,mangleCache:a}=He(e,s,d,Se,v);if(o&&!l.hasFS)throw new Error('The "write" option is unavailable in this environment');let c={command:"build",key:t,entries:g,flags:f,write:o,stdinContents:x,stdinResolveDir:E,absWorkingDir:C||b,nodePaths:S,context:L};U&&(c.plugins=U),a&&(c.mangleCache=a);let h=(k,O)=>{let A={errors:oe(k.errors,T),warnings:oe(k.warnings,T),outputFiles:void 0,metafile:void 0,mangleCache:void 0},R=A.errors.slice(),$=A.warnings.slice();k.outputFiles&&(A.outputFiles=k.outputFiles.map(et)),k.metafile&&(A.metafile=JSON.parse(k.metafile)),k.mangleCache&&(A.mangleCache=k.mangleCache),k.writeToStdout!==void 0&&console.log(re(k.writeToStdout).replace(/\n$/,"")),z(A,(D,P)=>{if(R.length>0||D.length>0){let j=ce("Build failed",R.concat(D),$.concat(P));return O(j,null,D,P)}O(null,A,D,P)})},M,F;L&&(m["on-end"]=(k,O)=>new Promise(A=>{h(O,(R,$,D,P)=>{let j={errors:D,warnings:P};F&&F(R,$),M=void 0,F=void 0,i(k,j),A()})})),n(u,c,(k,O)=>{if(k)return w(new Error(k),null);if(!L)return h(O,($,D)=>(_(),w($,D)));if(O.errors.length>0)return w(ce("Context failed",O.errors,O.warnings),null);let A=!1,R={rebuild:()=>(M||(M=new Promise(($,D)=>{let P;F=(V,H)=>{P||(P=()=>V?D(V):$(H))};let j=()=>{n(u,{command:"rebuild",key:t},(H,se)=>{H?D(new Error(H)):P?P():j()})};j()})),M),watch:($={})=>new Promise((D,P)=>{if(!l.hasFS)throw new Error('Cannot use the "watch" API in this environment');K($,{},"in watch() call"),n(u,{command:"watch",key:t},H=>{H?P(new Error(H)):D(void 0)})}),serve:($={})=>new Promise((D,P)=>{if(!l.hasFS)throw new Error('Cannot use the "serve" API in this environment');let j={},V=r($,j,"port",le),H=r($,j,"host",y),se=r($,j,"servedir",y),p=r($,j,"keyfile",y),N=r($,j,"certfile",y),X=r($,j,"fallback",y),te=r($,j,"onRequest",Ae);K($,j,"in serve() call");let G={command:"serve",key:t,onRequest:!!te};V!==void 0&&(G.port=V),H!==void 0&&(G.host=H),se!==void 0&&(G.servedir=se),p!==void 0&&(G.keyfile=p),N!==void 0&&(G.certfile=N),X!==void 0&&(G.fallback=X),n(u,G,(ue,qe)=>{if(ue)return P(new Error(ue));te&&(m["serve-request"]=(Ne,Ie)=>{te(Ie.args),i(Ne,{})}),D(qe)})}),cancel:()=>new Promise($=>{if(A)return $();n(u,{command:"cancel",key:t},()=>{$()})}),dispose:()=>new Promise($=>{if(A)return $();A=!0,n(u,{command:"dispose",key:t},()=>{$(),_(),u.unref()})})};u.ref(),w(null,R)})}}var Ze=async(e,t,n,i,u,l,m,s,d)=>{let b=[],w=[],T={},L={},B=[],q=0,Q=0,U=[],z=!1;s=[...s];for(let g of s){let f={};if(typeof g!="object")throw new Error(`Plugin at index ${Q} must be an object`);let o=r(g,f,"name",y);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${Q} is missing a name`);try{let x=r(g,f,"setup",Ae);if(typeof x!="function")throw new Error("Plugin is missing a setup function");K(g,f,`on plugin ${J(o)}`);let E={name:o,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};Q++;let S=x({initialOptions:m,resolve:(a,c={})=>{if(!z)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof a!="string")throw new Error("The path to resolve must be a string");let h=Object.create(null),M=r(c,h,"pluginName",y),F=r(c,h,"importer",y),k=r(c,h,"namespace",y),O=r(c,h,"resolveDir",y),A=r(c,h,"kind",y),R=r(c,h,"pluginData",me);return K(c,h,"in resolve() call"),new Promise(($,D)=>{let P={command:"resolve",path:a,key:e,pluginName:o};if(M!=null&&(P.pluginName=M),F!=null&&(P.importer=F),k!=null&&(P.namespace=k),O!=null&&(P.resolveDir=O),A!=null)P.kind=A;else throw new Error('Must specify "kind" when calling "resolve"');R!=null&&(P.pluginData=d.store(R)),t(i,P,(j,V)=>{j!==null?D(new Error(j)):$({errors:oe(V.errors,d),warnings:oe(V.warnings,d),path:V.path,external:V.external,sideEffects:V.sideEffects,namespace:V.namespace,suffix:V.suffix,pluginData:d.load(V.pluginData)})})})},onStart(a){let c='This error came from the "onStart" callback registered here:',h=pe(new Error(c),u,"onStart");b.push({name:o,callback:a,note:h}),E.onStart=!0},onEnd(a){let c='This error came from the "onEnd" callback registered here:',h=pe(new Error(c),u,"onEnd");w.push({name:o,callback:a,note:h}),E.onEnd=!0},onResolve(a,c){let h='This error came from the "onResolve" callback registered here:',M=pe(new Error(h),u,"onResolve"),F={},k=r(a,F,"filter",ye),O=r(a,F,"namespace",y);if(K(a,F,`in onResolve() call for plugin ${J(o)}`),k==null)throw new Error("onResolve() call is missing a filter");let A=q++;T[A]={name:o,callback:c,note:M},E.onResolve.push({id:A,filter:k.source,namespace:O||""})},onLoad(a,c){let h='This error came from the "onLoad" callback registered here:',M=pe(new Error(h),u,"onLoad"),F={},k=r(a,F,"filter",ye),O=r(a,F,"namespace",y);if(K(a,F,`in onLoad() call for plugin ${J(o)}`),k==null)throw new Error("onLoad() call is missing a filter");let A=q++;L[A]={name:o,callback:c,note:M},E.onLoad.push({id:A,filter:k.source,namespace:O||""})},onDispose(a){B.push(a)},esbuild:u.esbuild});S&&await S,U.push(E)}catch(x){return{ok:!1,error:x,pluginName:o}}}l["on-start"]=async(g,f)=>{let o={errors:[],warnings:[]};await Promise.all(b.map(async({name:x,callback:E,note:C})=>{try{let S=await E();if(S!=null){if(typeof S!="object")throw new Error(`Expected onStart() callback in plugin ${J(x)} to return an object`);let a={},c=r(S,a,"errors",W),h=r(S,a,"warnings",W);K(S,a,`from onStart() callback in plugin ${J(x)}`),c!=null&&o.errors.push(...ne(c,"errors",d,x,void 0)),h!=null&&o.warnings.push(...ne(h,"warnings",d,x,void 0))}}catch(S){o.errors.push(ie(S,u,d,C&&C(),x))}})),n(g,o)},l["on-resolve"]=async(g,f)=>{let o={},x="",E,C;for(let S of f.ids)try{({name:x,callback:E,note:C}=T[S]);let a=await E({path:f.path,importer:f.importer,namespace:f.namespace,resolveDir:f.resolveDir,kind:f.kind,pluginData:d.load(f.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${J(x)} to return an object`);let c={},h=r(a,c,"pluginName",y),M=r(a,c,"path",y),F=r(a,c,"namespace",y),k=r(a,c,"suffix",y),O=r(a,c,"external",I),A=r(a,c,"sideEffects",I),R=r(a,c,"pluginData",me),$=r(a,c,"errors",W),D=r(a,c,"warnings",W),P=r(a,c,"watchFiles",W),j=r(a,c,"watchDirs",W);K(a,c,`from onResolve() callback in plugin ${J(x)}`),o.id=S,h!=null&&(o.pluginName=h),M!=null&&(o.path=M),F!=null&&(o.namespace=F),k!=null&&(o.suffix=k),O!=null&&(o.external=O),A!=null&&(o.sideEffects=A),R!=null&&(o.pluginData=d.store(R)),$!=null&&(o.errors=ne($,"errors",d,x,void 0)),D!=null&&(o.warnings=ne(D,"warnings",d,x,void 0)),P!=null&&(o.watchFiles=ge(P,"watchFiles")),j!=null&&(o.watchDirs=ge(j,"watchDirs"));break}}catch(a){o={id:S,errors:[ie(a,u,d,C&&C(),x)]};break}n(g,o)},l["on-load"]=async(g,f)=>{let o={},x="",E,C;for(let S of f.ids)try{({name:x,callback:E,note:C}=L[S]);let a=await E({path:f.path,namespace:f.namespace,suffix:f.suffix,pluginData:d.load(f.pluginData),with:f.with});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${J(x)} to return an object`);let c={},h=r(a,c,"pluginName",y),M=r(a,c,"contents",Pe),F=r(a,c,"resolveDir",y),k=r(a,c,"pluginData",me),O=r(a,c,"loader",y),A=r(a,c,"errors",W),R=r(a,c,"warnings",W),$=r(a,c,"watchFiles",W),D=r(a,c,"watchDirs",W);K(a,c,`from onLoad() callback in plugin ${J(x)}`),o.id=S,h!=null&&(o.pluginName=h),M instanceof Uint8Array?o.contents=M:M!=null&&(o.contents=Z(M)),F!=null&&(o.resolveDir=F),k!=null&&(o.pluginData=d.store(k)),O!=null&&(o.loader=O),A!=null&&(o.errors=ne(A,"errors",d,x,void 0)),R!=null&&(o.warnings=ne(R,"warnings",d,x,void 0)),$!=null&&(o.watchFiles=ge($,"watchFiles")),D!=null&&(o.watchDirs=ge(D,"watchDirs"));break}}catch(a){o={id:S,errors:[ie(a,u,d,C&&C(),x)]};break}n(g,o)};let _=(g,f)=>f([],[]);w.length>0&&(_=(g,f)=>{(async()=>{let o=[],x=[];for(let{name:E,callback:C,note:S}of w){let a,c;try{let h=await C(g);if(h!=null){if(typeof h!="object")throw new Error(`Expected onEnd() callback in plugin ${J(E)} to return an object`);let M={},F=r(h,M,"errors",W),k=r(h,M,"warnings",W);K(h,M,`from onEnd() callback in plugin ${J(E)}`),F!=null&&(a=ne(F,"errors",d,E,void 0)),k!=null&&(c=ne(k,"warnings",d,E,void 0))}}catch(h){a=[ie(h,u,d,S&&S(),E)]}if(a){o.push(...a);try{g.errors.push(...a)}catch(h){}}if(c){x.push(...c);try{g.warnings.push(...c)}catch(h){}}}f(o,x)})()});let v=()=>{for(let g of B)setTimeout(()=>g(),0)};return z=!0,{ok:!0,requestPlugins:U,runOnEndCallbacks:_,scheduleOnDisposeCallbacks:v}};function je(){let e=new Map,t=0;return{load(n){return e.get(n)},store(n){if(n===void 0)return-1;let i=t++;return e.set(i,n),i}}}function pe(e,t,n){let i,u=!1;return()=>{if(u)return i;u=!0;try{let l=(e.stack+"").split(`
`);function Re(e,t){return e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24}function ve(e,t,n){e[n++]=t,e[n++]=t>>8,e[n++]=t>>16,e[n++]=t>>24}var J=JSON.stringify,Se="warning",ke="silent";function $e(e){if(Y(e,"target"),e.indexOf(",")>=0)throw new Error(`Invalid target: ${e}`);return e}var me=()=>null,I=e=>typeof e=="boolean"?null:"a boolean",y=e=>typeof e=="string"?null:"a string",ye=e=>e instanceof RegExp?null:"a RegExp object",le=e=>typeof e=="number"&&e===(e|0)?null:"an integer",Ae=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",_e=e=>typeof e=="object"&&e!==null?null:"an array or an object",Ve=e=>e instanceof WebAssembly.Module?null:"a WebAssembly.Module",Me=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",Ye=e=>typeof e=="string"||typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"a string or an object",Je=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",Ge=e=>typeof e=="string"||e instanceof URL?null:"a string or a URL";function r(e,t,n,i){let u=e[n];if(t[n+""]=!0,u===void 0)return;let l=i(u);if(l!==null)throw new Error(`${J(n)} must be ${l}`);return u}function K(e,t,n){for(let i in e)if(!(i in t))throw new Error(`Invalid option ${n}: ${J(i)}`)}function Pe(e){let t=Object.create(null),n=r(e,t,"wasmURL",Ge),i=r(e,t,"wasmModule",Ve),u=r(e,t,"worker",I);return K(e,t,"in initialize() call"),{wasmURL:n,wasmModule:i,worker:u}}function De(e){let t;if(e!==void 0){t=Object.create(null);for(let n in e){let i=e[n];if(typeof i=="string"||i===!1)t[n]=i;else throw new Error(`Expected ${J(n)} in mangle cache to map to either a string or false`)}}return t}function he(e,t,n,i,u){let l=r(t,n,"color",I),m=r(t,n,"logLevel",y),s=r(t,n,"logLimit",le);l!==void 0?e.push(`--color=${l}`):i&&e.push("--color=true"),e.push(`--log-level=${m||u}`),e.push(`--log-limit=${s||0}`)}function Y(e,t,n){if(typeof e!="string")throw new Error(`Expected value for ${t}${n!==void 0?" "+J(n):""} to be a string, got ${typeof e} instead`);return e}function Be(e,t,n){let i=r(t,n,"legalComments",y),u=r(t,n,"sourceRoot",y),l=r(t,n,"sourcesContent",I),m=r(t,n,"target",Je),s=r(t,n,"format",y),d=r(t,n,"globalName",y),b=r(t,n,"mangleProps",ye),w=r(t,n,"reserveProps",ye),M=r(t,n,"mangleQuoted",I),L=r(t,n,"minify",I),B=r(t,n,"minifySyntax",I),q=r(t,n,"minifyWhitespace",I),G=r(t,n,"minifyIdentifiers",I),U=r(t,n,"lineLimit",le),z=r(t,n,"drop",W),_=r(t,n,"dropLabels",W),v=r(t,n,"charset",y),g=r(t,n,"treeShaking",I),f=r(t,n,"ignoreAnnotations",I),o=r(t,n,"jsx",y),x=r(t,n,"jsxFactory",y),E=r(t,n,"jsxFragment",y),C=r(t,n,"jsxImportSource",y),S=r(t,n,"jsxDev",I),a=r(t,n,"jsxSideEffects",I),c=r(t,n,"define",ee),h=r(t,n,"logOverride",ee),A=r(t,n,"supported",ee),T=r(t,n,"pure",W),k=r(t,n,"keepNames",I),O=r(t,n,"platform",y),F=r(t,n,"tsconfigRaw",Ye);if(i&&e.push(`--legal-comments=${i}`),u!==void 0&&e.push(`--source-root=${u}`),l!==void 0&&e.push(`--sources-content=${l}`),m&&(Array.isArray(m)?e.push(`--target=${Array.from(m).map($e).join(",")}`):e.push(`--target=${$e(m)}`)),s&&e.push(`--format=${s}`),d&&e.push(`--global-name=${d}`),O&&e.push(`--platform=${O}`),F&&e.push(`--tsconfig-raw=${typeof F=="string"?F:JSON.stringify(F)}`),L&&e.push("--minify"),B&&e.push("--minify-syntax"),q&&e.push("--minify-whitespace"),G&&e.push("--minify-identifiers"),U&&e.push(`--line-limit=${U}`),v&&e.push(`--charset=${v}`),g!==void 0&&e.push(`--tree-shaking=${g}`),f&&e.push("--ignore-annotations"),z)for(let R of z)e.push(`--drop:${Y(R,"drop")}`);if(_&&e.push(`--drop-labels=${Array.from(_).map(R=>Y(R,"dropLabels")).join(",")}`),b&&e.push(`--mangle-props=${b.source}`),w&&e.push(`--reserve-props=${w.source}`),M!==void 0&&e.push(`--mangle-quoted=${M}`),o&&e.push(`--jsx=${o}`),x&&e.push(`--jsx-factory=${x}`),E&&e.push(`--jsx-fragment=${E}`),C&&e.push(`--jsx-import-source=${C}`),S&&e.push("--jsx-dev"),a&&e.push("--jsx-side-effects"),c)for(let R in c){if(R.indexOf("=")>=0)throw new Error(`Invalid define: ${R}`);e.push(`--define:${R}=${Y(c[R],"define",R)}`)}if(h)for(let R in h){if(R.indexOf("=")>=0)throw new Error(`Invalid log override: ${R}`);e.push(`--log-override:${R}=${Y(h[R],"log override",R)}`)}if(A)for(let R in A){if(R.indexOf("=")>=0)throw new Error(`Invalid supported: ${R}`);let $=A[R];if(typeof $!="boolean")throw new Error(`Expected value for supported ${J(R)} to be a boolean, got ${typeof $} instead`);e.push(`--supported:${R}=${$}`)}if(T)for(let R of T)e.push(`--pure:${Y(R,"pure")}`);k&&e.push("--keep-names")}function Qe(e,t,n,i,u){var se;let l=[],m=[],s=Object.create(null),d=null,b=null;he(l,t,s,n,i),Be(l,t,s);let w=r(t,s,"sourcemap",Fe),M=r(t,s,"bundle",I),L=r(t,s,"splitting",I),B=r(t,s,"preserveSymlinks",I),q=r(t,s,"metafile",I),G=r(t,s,"outfile",y),U=r(t,s,"outdir",y),z=r(t,s,"outbase",y),_=r(t,s,"tsconfig",y),v=r(t,s,"resolveExtensions",W),g=r(t,s,"nodePaths",W),f=r(t,s,"mainFields",W),o=r(t,s,"conditions",W),x=r(t,s,"external",W),E=r(t,s,"packages",y),C=r(t,s,"alias",ee),S=r(t,s,"loader",ee),a=r(t,s,"outExtension",ee),c=r(t,s,"publicPath",y),h=r(t,s,"entryNames",y),A=r(t,s,"chunkNames",y),T=r(t,s,"assetNames",y),k=r(t,s,"inject",W),O=r(t,s,"banner",ee),F=r(t,s,"footer",ee),R=r(t,s,"entryPoints",_e),$=r(t,s,"absWorkingDir",y),D=r(t,s,"stdin",ee),P=(se=r(t,s,"write",I))!=null?se:u,j=r(t,s,"allowOverwrite",I),V=r(t,s,"mangleCache",ee);if(s.plugins=!0,K(t,s,`in ${e}() call`),w&&l.push(`--sourcemap${w===!0?"":`=${w}`}`),M&&l.push("--bundle"),j&&l.push("--allow-overwrite"),L&&l.push("--splitting"),B&&l.push("--preserve-symlinks"),q&&l.push("--metafile"),G&&l.push(`--outfile=${G}`),U&&l.push(`--outdir=${U}`),z&&l.push(`--outbase=${z}`),_&&l.push(`--tsconfig=${_}`),E&&l.push(`--packages=${E}`),v){let p=[];for(let N of v){if(Y(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);p.push(N)}l.push(`--resolve-extensions=${p.join(",")}`)}if(c&&l.push(`--public-path=${c}`),h&&l.push(`--entry-names=${h}`),A&&l.push(`--chunk-names=${A}`),T&&l.push(`--asset-names=${T}`),f){let p=[];for(let N of f){if(Y(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);p.push(N)}l.push(`--main-fields=${p.join(",")}`)}if(o){let p=[];for(let N of o){if(Y(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);p.push(N)}l.push(`--conditions=${p.join(",")}`)}if(x)for(let p of x)l.push(`--external:${Y(p,"external")}`);if(C)for(let p in C){if(p.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${p}`);l.push(`--alias:${p}=${Y(C[p],"alias",p)}`)}if(O)for(let p in O){if(p.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${p}`);l.push(`--banner:${p}=${Y(O[p],"banner",p)}`)}if(F)for(let p in F){if(p.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${p}`);l.push(`--footer:${p}=${Y(F[p],"footer",p)}`)}if(k)for(let p of k)l.push(`--inject:${Y(p,"inject")}`);if(S)for(let p in S){if(p.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${p}`);l.push(`--loader:${p}=${Y(S[p],"loader",p)}`)}if(a)for(let p in a){if(p.indexOf("=")>=0)throw new Error(`Invalid out extension: ${p}`);l.push(`--out-extension:${p}=${Y(a[p],"out extension",p)}`)}if(R)if(Array.isArray(R))for(let p=0,N=R.length;p<N;p++){let X=R[p];if(typeof X=="object"&&X!==null){let te=Object.create(null),H=r(X,te,"in",y),ue=r(X,te,"out",y);if(K(X,te,"in entry point at index "+p),H===void 0)throw new Error('Missing property "in" for entry point at index '+p);if(ue===void 0)throw new Error('Missing property "out" for entry point at index '+p);m.push([ue,H])}else m.push(["",Y(X,"entry point at index "+p)])}else for(let p in R)m.push([p,Y(R[p],"entry point",p)]);if(D){let p=Object.create(null),N=r(D,p,"contents",Te),X=r(D,p,"resolveDir",y),te=r(D,p,"sourcefile",y),H=r(D,p,"loader",y);K(D,p,'in "stdin" object'),te&&l.push(`--sourcefile=${te}`),H&&l.push(`--loader=${H}`),X&&(b=X),typeof N=="string"?d=Z(N):N instanceof Uint8Array&&(d=N)}let Q=[];if(g)for(let p of g)p+="",Q.push(p);return{entries:m,flags:l,write:P,stdinContents:d,stdinResolveDir:b,absWorkingDir:$,nodePaths:Q,mangleCache:De(V)}}function He(e,t,n,i){let u=[],l=Object.create(null);he(u,t,l,n,i),Be(u,t,l);let m=r(t,l,"sourcemap",Fe),s=r(t,l,"sourcefile",y),d=r(t,l,"loader",y),b=r(t,l,"banner",y),w=r(t,l,"footer",y),M=r(t,l,"mangleCache",ee);return K(t,l,`in ${e}() call`),m&&u.push(`--sourcemap=${m===!0?"external":m}`),s&&u.push(`--sourcefile=${s}`),d&&u.push(`--loader=${d}`),b&&u.push(`--banner=${b}`),w&&u.push(`--footer=${w}`),{flags:u,mangleCache:De(M)}}function Ue(e){let t={},n={didClose:!1,reason:""},i={},u=0,l=0,m=new Uint8Array(16*1024),s=0,d=v=>{let g=s+v.length;if(g>m.length){let o=new Uint8Array(g*2);o.set(m),m=o}m.set(v,s),s+=v.length;let f=0;for(;f+4<=s;){let o=Re(m,f);if(f+4+o>s)break;f+=4,q(m.subarray(f,f+o)),f+=o}f>0&&(m.copyWithin(0,f,s),s-=f)},b=v=>{n.didClose=!0,v&&(n.reason=": "+(v.message||v));let g="The service was stopped"+n.reason;for(let f in i)i[f](g,null);i={}},w=(v,g,f)=>{if(n.didClose)return f("The service is no longer running"+n.reason,null);let o=u++;i[o]=(x,E)=>{try{f(x,E)}finally{v&&v.unref()}},v&&v.ref(),e.writeToStdin(xe({id:o,isRequest:!0,value:g}))},M=(v,g)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);e.writeToStdin(xe({id:v,isRequest:!1,value:g}))},L=async(v,g)=>{try{if(g.command==="ping"){M(v,{});return}if(typeof g.key=="number"){let f=t[g.key];if(!f)return;let o=f[g.command];if(o){await o(v,g);return}}throw new Error("Invalid command: "+g.command)}catch(f){let o=[ie(f,e,null,void 0,"")];try{M(v,{errors:o})}catch(x){}}},B=!0,q=v=>{if(B){B=!1;let f=String.fromCharCode(...v);if(f!=="0.19.10")throw new Error(`Cannot start service: Host version "0.19.10" does not match binary version ${J(f)}`);return}let g=Ee(v);if(g.isRequest)L(g.id,g.value);else{let f=i[g.id];delete i[g.id],g.value.error?f(g.value.error,{}):f(null,g.value)}};return{readFromStdout:d,afterClose:b,service:{buildOrContext:({callName:v,refs:g,options:f,isTTY:o,defaultWD:x,callback:E})=>{let C=0,S=l++,a={},c={ref(){++C===1&&g&&g.ref()},unref(){--C===0&&(delete t[S],g&&g.unref())}};t[S]=a,c.ref(),Xe(v,S,w,M,c,e,a,f,o,x,(h,A)=>{try{E(h,A)}finally{c.unref()}})},transform:({callName:v,refs:g,input:f,options:o,isTTY:x,fs:E,callback:C})=>{let S=je(),a=c=>{try{if(typeof f!="string"&&!(f instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:h,mangleCache:A}=He(v,o,x,ke),T={command:"transform",flags:h,inputFS:c!==null,input:c!==null?Z(c):typeof f=="string"?Z(f):f};A&&(T.mangleCache=A),w(g,T,(k,O)=>{if(k)return C(new Error(k),null);let F=oe(O.errors,S),R=oe(O.warnings,S),$=1,D=()=>{if(--$===0){let P={warnings:R,code:O.code,map:O.map,mangleCache:void 0,legalComments:void 0};"legalComments"in O&&(P.legalComments=O==null?void 0:O.legalComments),O.mangleCache&&(P.mangleCache=O==null?void 0:O.mangleCache),C(null,P)}};if(F.length>0)return C(ce("Transform failed",F,R),null);O.codeFS&&($++,E.readFile(O.code,(P,j)=>{P!==null?C(P,null):(O.code=j,D())})),O.mapFS&&($++,E.readFile(O.map,(P,j)=>{P!==null?C(P,null):(O.map=j,D())})),D()})}catch(h){let A=[];try{he(A,o,{},x,ke)}catch(k){}let T=ie(h,e,S,void 0,"");w(g,{command:"error",flags:A,error:T},()=>{T.detail=S.load(T.detail),C(ce("Transform failed",[T],[]),null)})}};if((typeof f=="string"||f instanceof Uint8Array)&&f.length>1024*1024){let c=a;a=()=>E.writeFile(f,c)}a(null)},formatMessages:({callName:v,refs:g,messages:f,options:o,callback:x})=>{if(!o)throw new Error(`Missing second argument in ${v}() call`);let E={},C=r(o,E,"kind",y),S=r(o,E,"color",I),a=r(o,E,"terminalWidth",le);if(K(o,E,`in ${v}() call`),C===void 0)throw new Error(`Missing "kind" in ${v}() call`);if(C!=="error"&&C!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${v}() call`);let c={command:"format-msgs",messages:ne(f,"messages",null,"",a),isWarning:C==="warning"};S!==void 0&&(c.color=S),a!==void 0&&(c.terminalWidth=a),w(g,c,(h,A)=>{if(h)return x(new Error(h),null);x(null,A.messages)})},analyzeMetafile:({callName:v,refs:g,metafile:f,options:o,callback:x})=>{o===void 0&&(o={});let E={},C=r(o,E,"color",I),S=r(o,E,"verbose",I);K(o,E,`in ${v}() call`);let a={command:"analyze-metafile",metafile:f};C!==void 0&&(a.color=C),S!==void 0&&(a.verbose=S),w(g,a,(c,h)=>{if(c)return x(new Error(c),null);x(null,h.result)})}}}}function Xe(e,t,n,i,u,l,m,s,d,b,w){let M=je(),L=e==="context",B=(U,z)=>{let _=[];try{he(_,s,{},d,Se)}catch(g){}let v=ie(U,l,M,void 0,z);n(u,{command:"error",flags:_,error:v},()=>{v.detail=M.load(v.detail),w(ce(L?"Context failed":"Build failed",[v],[]),null)})},q;if(typeof s=="object"){let U=s.plugins;if(U!==void 0){if(!Array.isArray(U))return B(new Error('"plugins" must be an array'),"");q=U}}if(q&&q.length>0){if(l.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");Ze(t,n,i,u,l,m,s,q,M).then(U=>{if(!U.ok)return B(U.error,U.pluginName);try{G(U.requestPlugins,U.runOnEndCallbacks,U.scheduleOnDisposeCallbacks)}catch(z){B(z,"")}},U=>B(U,""));return}try{G(null,(U,z)=>z([],[]),()=>{})}catch(U){B(U,"")}function G(U,z,_){let v=l.hasFS,{entries:g,flags:f,write:o,stdinContents:x,stdinResolveDir:E,absWorkingDir:C,nodePaths:S,mangleCache:a}=Qe(e,s,d,Se,v);if(o&&!l.hasFS)throw new Error('The "write" option is unavailable in this environment');let c={command:"build",key:t,entries:g,flags:f,write:o,stdinContents:x,stdinResolveDir:E,absWorkingDir:C||b,nodePaths:S,context:L};U&&(c.plugins=U),a&&(c.mangleCache=a);let h=(k,O)=>{let F={errors:oe(k.errors,M),warnings:oe(k.warnings,M),outputFiles:void 0,metafile:void 0,mangleCache:void 0},R=F.errors.slice(),$=F.warnings.slice();k.outputFiles&&(F.outputFiles=k.outputFiles.map(et)),k.metafile&&(F.metafile=JSON.parse(k.metafile)),k.mangleCache&&(F.mangleCache=k.mangleCache),k.writeToStdout!==void 0&&console.log(re(k.writeToStdout).replace(/\n$/,"")),z(F,(D,P)=>{if(R.length>0||D.length>0){let j=ce("Build failed",R.concat(D),$.concat(P));return O(j,null,D,P)}O(null,F,D,P)})},A,T;L&&(m["on-end"]=(k,O)=>new Promise(F=>{h(O,(R,$,D,P)=>{let j={errors:D,warnings:P};T&&T(R,$),A=void 0,T=void 0,i(k,j),F()})})),n(u,c,(k,O)=>{if(k)return w(new Error(k),null);if(!L)return h(O,($,D)=>(_(),w($,D)));if(O.errors.length>0)return w(ce("Context failed",O.errors,O.warnings),null);let F=!1,R={rebuild:()=>(A||(A=new Promise(($,D)=>{let P;T=(V,Q)=>{P||(P=()=>V?D(V):$(Q))};let j=()=>{n(u,{command:"rebuild",key:t},(Q,se)=>{Q?D(new Error(Q)):P?P():j()})};j()})),A),watch:($={})=>new Promise((D,P)=>{if(!l.hasFS)throw new Error('Cannot use the "watch" API in this environment');K($,{},"in watch() call"),n(u,{command:"watch",key:t},Q=>{Q?P(new Error(Q)):D(void 0)})}),serve:($={})=>new Promise((D,P)=>{if(!l.hasFS)throw new Error('Cannot use the "serve" API in this environment');let j={},V=r($,j,"port",le),Q=r($,j,"host",y),se=r($,j,"servedir",y),p=r($,j,"keyfile",y),N=r($,j,"certfile",y),X=r($,j,"fallback",y),te=r($,j,"onRequest",Ae);K($,j,"in serve() call");let H={command:"serve",key:t,onRequest:!!te};V!==void 0&&(H.port=V),Q!==void 0&&(H.host=Q),se!==void 0&&(H.servedir=se),p!==void 0&&(H.keyfile=p),N!==void 0&&(H.certfile=N),X!==void 0&&(H.fallback=X),n(u,H,(ue,qe)=>{if(ue)return P(new Error(ue));te&&(m["serve-request"]=(Ne,Ie)=>{te(Ie.args),i(Ne,{})}),D(qe)})}),cancel:()=>new Promise($=>{if(F)return $();n(u,{command:"cancel",key:t},()=>{$()})}),dispose:()=>new Promise($=>{if(F)return $();F=!0,n(u,{command:"dispose",key:t},()=>{$(),_(),u.unref()})})};u.ref(),w(null,R)})}}var Ze=async(e,t,n,i,u,l,m,s,d)=>{let b=[],w=[],M={},L={},B=[],q=0,G=0,U=[],z=!1;s=[...s];for(let g of s){let f={};if(typeof g!="object")throw new Error(`Plugin at index ${G} must be an object`);let o=r(g,f,"name",y);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${G} is missing a name`);try{let x=r(g,f,"setup",Ae);if(typeof x!="function")throw new Error("Plugin is missing a setup function");K(g,f,`on plugin ${J(o)}`);let E={name:o,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};G++;let S=x({initialOptions:m,resolve:(a,c={})=>{if(!z)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof a!="string")throw new Error("The path to resolve must be a string");let h=Object.create(null),A=r(c,h,"pluginName",y),T=r(c,h,"importer",y),k=r(c,h,"namespace",y),O=r(c,h,"resolveDir",y),F=r(c,h,"kind",y),R=r(c,h,"pluginData",me);return K(c,h,"in resolve() call"),new Promise(($,D)=>{let P={command:"resolve",path:a,key:e,pluginName:o};if(A!=null&&(P.pluginName=A),T!=null&&(P.importer=T),k!=null&&(P.namespace=k),O!=null&&(P.resolveDir=O),F!=null)P.kind=F;else throw new Error('Must specify "kind" when calling "resolve"');R!=null&&(P.pluginData=d.store(R)),t(i,P,(j,V)=>{j!==null?D(new Error(j)):$({errors:oe(V.errors,d),warnings:oe(V.warnings,d),path:V.path,external:V.external,sideEffects:V.sideEffects,namespace:V.namespace,suffix:V.suffix,pluginData:d.load(V.pluginData)})})})},onStart(a){let c='This error came from the "onStart" callback registered here:',h=pe(new Error(c),u,"onStart");b.push({name:o,callback:a,note:h}),E.onStart=!0},onEnd(a){let c='This error came from the "onEnd" callback registered here:',h=pe(new Error(c),u,"onEnd");w.push({name:o,callback:a,note:h}),E.onEnd=!0},onResolve(a,c){let h='This error came from the "onResolve" callback registered here:',A=pe(new Error(h),u,"onResolve"),T={},k=r(a,T,"filter",ye),O=r(a,T,"namespace",y);if(K(a,T,`in onResolve() call for plugin ${J(o)}`),k==null)throw new Error("onResolve() call is missing a filter");let F=q++;M[F]={name:o,callback:c,note:A},E.onResolve.push({id:F,filter:k.source,namespace:O||""})},onLoad(a,c){let h='This error came from the "onLoad" callback registered here:',A=pe(new Error(h),u,"onLoad"),T={},k=r(a,T,"filter",ye),O=r(a,T,"namespace",y);if(K(a,T,`in onLoad() call for plugin ${J(o)}`),k==null)throw new Error("onLoad() call is missing a filter");let F=q++;L[F]={name:o,callback:c,note:A},E.onLoad.push({id:F,filter:k.source,namespace:O||""})},onDispose(a){B.push(a)},esbuild:u.esbuild});S&&await S,U.push(E)}catch(x){return{ok:!1,error:x,pluginName:o}}}l["on-start"]=async(g,f)=>{let o={errors:[],warnings:[]};await Promise.all(b.map(async({name:x,callback:E,note:C})=>{try{let S=await E();if(S!=null){if(typeof S!="object")throw new Error(`Expected onStart() callback in plugin ${J(x)} to return an object`);let a={},c=r(S,a,"errors",W),h=r(S,a,"warnings",W);K(S,a,`from onStart() callback in plugin ${J(x)}`),c!=null&&o.errors.push(...ne(c,"errors",d,x,void 0)),h!=null&&o.warnings.push(...ne(h,"warnings",d,x,void 0))}}catch(S){o.errors.push(ie(S,u,d,C&&C(),x))}})),n(g,o)},l["on-resolve"]=async(g,f)=>{let o={},x="",E,C;for(let S of f.ids)try{({name:x,callback:E,note:C}=M[S]);let a=await E({path:f.path,importer:f.importer,namespace:f.namespace,resolveDir:f.resolveDir,kind:f.kind,pluginData:d.load(f.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${J(x)} to return an object`);let c={},h=r(a,c,"pluginName",y),A=r(a,c,"path",y),T=r(a,c,"namespace",y),k=r(a,c,"suffix",y),O=r(a,c,"external",I),F=r(a,c,"sideEffects",I),R=r(a,c,"pluginData",me),$=r(a,c,"errors",W),D=r(a,c,"warnings",W),P=r(a,c,"watchFiles",W),j=r(a,c,"watchDirs",W);K(a,c,`from onResolve() callback in plugin ${J(x)}`),o.id=S,h!=null&&(o.pluginName=h),A!=null&&(o.path=A),T!=null&&(o.namespace=T),k!=null&&(o.suffix=k),O!=null&&(o.external=O),F!=null&&(o.sideEffects=F),R!=null&&(o.pluginData=d.store(R)),$!=null&&(o.errors=ne($,"errors",d,x,void 0)),D!=null&&(o.warnings=ne(D,"warnings",d,x,void 0)),P!=null&&(o.watchFiles=ge(P,"watchFiles")),j!=null&&(o.watchDirs=ge(j,"watchDirs"));break}}catch(a){o={id:S,errors:[ie(a,u,d,C&&C(),x)]};break}n(g,o)},l["on-load"]=async(g,f)=>{let o={},x="",E,C;for(let S of f.ids)try{({name:x,callback:E,note:C}=L[S]);let a=await E({path:f.path,namespace:f.namespace,suffix:f.suffix,pluginData:d.load(f.pluginData),with:f.with});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${J(x)} to return an object`);let c={},h=r(a,c,"pluginName",y),A=r(a,c,"contents",Te),T=r(a,c,"resolveDir",y),k=r(a,c,"pluginData",me),O=r(a,c,"loader",y),F=r(a,c,"errors",W),R=r(a,c,"warnings",W),$=r(a,c,"watchFiles",W),D=r(a,c,"watchDirs",W);K(a,c,`from onLoad() callback in plugin ${J(x)}`),o.id=S,h!=null&&(o.pluginName=h),A instanceof Uint8Array?o.contents=A:A!=null&&(o.contents=Z(A)),T!=null&&(o.resolveDir=T),k!=null&&(o.pluginData=d.store(k)),O!=null&&(o.loader=O),F!=null&&(o.errors=ne(F,"errors",d,x,void 0)),R!=null&&(o.warnings=ne(R,"warnings",d,x,void 0)),$!=null&&(o.watchFiles=ge($,"watchFiles")),D!=null&&(o.watchDirs=ge(D,"watchDirs"));break}}catch(a){o={id:S,errors:[ie(a,u,d,C&&C(),x)]};break}n(g,o)};let _=(g,f)=>f([],[]);w.length>0&&(_=(g,f)=>{(async()=>{let o=[],x=[];for(let{name:E,callback:C,note:S}of w){let a,c;try{let h=await C(g);if(h!=null){if(typeof h!="object")throw new Error(`Expected onEnd() callback in plugin ${J(E)} to return an object`);let A={},T=r(h,A,"errors",W),k=r(h,A,"warnings",W);K(h,A,`from onEnd() callback in plugin ${J(E)}`),T!=null&&(a=ne(T,"errors",d,E,void 0)),k!=null&&(c=ne(k,"warnings",d,E,void 0))}}catch(h){a=[ie(h,u,d,S&&S(),E)]}if(a){o.push(...a);try{g.errors.push(...a)}catch(h){}}if(c){x.push(...c);try{g.warnings.push(...c)}catch(h){}}}f(o,x)})()});let v=()=>{for(let g of B)setTimeout(()=>g(),0)};return z=!0,{ok:!0,requestPlugins:U,runOnEndCallbacks:_,scheduleOnDisposeCallbacks:v}};function je(){let e=new Map,t=0;return{load(n){return e.get(n)},store(n){if(n===void 0)return-1;let i=t++;return e.set(i,n),i}}}function pe(e,t,n){let i,u=!1;return()=>{if(u)return i;u=!0;try{let l=(e.stack+"").split(`
`);l.splice(1,1);let m=Le(t,l,n);if(m)return i={text:e.message,location:m},i}catch(l){}}}function ie(e,t,n,i,u){let l="Internal error",m=null;try{l=(e&&e.message||e)+""}catch(s){}try{m=Le(t,(e.stack+"").split(`
`),"")}catch(s){}return{id:"",pluginName:u,text:l,location:m,notes:i?[i]:[],detail:n?n.store(e):-1}}function Le(e,t,n){let i=" at ";if(e.readFileSync&&!t[0].startsWith(i)&&t[1].startsWith(i))for(let u=1;u<t.length;u++){let l=t[u];if(l.startsWith(i))for(l=l.slice(i.length);;){let m=/^(?:new |async )?\S+ \((.*)\)$/.exec(l);if(m){l=m[1];continue}if(m=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(l),m){l=m[1];continue}if(m=/^(\S+):(\d+):(\d+)$/.exec(l),m){let s;try{s=e.readFileSync(m[1],"utf8")}catch(T){break}let d=s.split(/\r\n|\r|\n|\u2028|\u2029/)[+m[2]-1]||"",b=+m[3]-1,w=d.slice(b,b+n.length)===n?n.length:0;return{file:m[1],namespace:"file",line:+m[2],column:Z(d.slice(0,b)).length,length:Z(d.slice(b,b+w)).length,lineText:d+`
`),"")}catch(s){}return{id:"",pluginName:u,text:l,location:m,notes:i?[i]:[],detail:n?n.store(e):-1}}function Le(e,t,n){let i=" at ";if(e.readFileSync&&!t[0].startsWith(i)&&t[1].startsWith(i))for(let u=1;u<t.length;u++){let l=t[u];if(l.startsWith(i))for(l=l.slice(i.length);;){let m=/^(?:new |async )?\S+ \((.*)\)$/.exec(l);if(m){l=m[1];continue}if(m=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(l),m){l=m[1];continue}if(m=/^(\S+):(\d+):(\d+)$/.exec(l),m){let s;try{s=e.readFileSync(m[1],"utf8")}catch(M){break}let d=s.split(/\r\n|\r|\n|\u2028|\u2029/)[+m[2]-1]||"",b=+m[3]-1,w=d.slice(b,b+n.length)===n?n.length:0;return{file:m[1],namespace:"file",line:+m[2],column:Z(d.slice(0,b)).length,length:Z(d.slice(b,b+w)).length,lineText:d+`
`+t.slice(1).join(`

@@ -14,3 +14,3 @@ `),suggestion:""}}break}}return null}function ce(e,t,n){let i=5;e+=t.length<1?"":` with ${t.length} error${t.length<2?"":"s"}:`+t.slice(0,i+1).map((l,m)=>{if(m===i)return`

error: ${l.text}`;let{file:s,line:d,column:b}=l.location,w=l.pluginName?`[plugin: ${l.pluginName}] `:"";return`
${s}:${d}:${b}: ERROR: ${w}${l.text}`}).join("");let u=new Error(e);for(let[l,m]of[["errors",t],["warnings",n]])Object.defineProperty(u,l,{configurable:!0,enumerable:!0,get:()=>m,set:s=>Object.defineProperty(u,l,{configurable:!0,enumerable:!0,value:s})});return u}function oe(e,t){for(let n of e)n.detail=t.load(n.detail);return e}function Me(e,t,n){if(e==null)return null;let i={},u=r(e,i,"file",y),l=r(e,i,"namespace",y),m=r(e,i,"line",le),s=r(e,i,"column",le),d=r(e,i,"length",le),b=r(e,i,"lineText",y),w=r(e,i,"suggestion",y);if(K(e,i,t),b){let T=b.slice(0,(s&&s>0?s:0)+(d&&d>0?d:0)+(n&&n>0?n:80));!/[\x7F-\uFFFF]/.test(T)&&!/\n/.test(b)&&(b=T)}return{file:u||"",namespace:l||"",line:m||0,column:s||0,length:d||0,lineText:b||"",suggestion:w||""}}function ne(e,t,n,i,u){let l=[],m=0;for(let s of e){let d={},b=r(s,d,"id",y),w=r(s,d,"pluginName",y),T=r(s,d,"text",y),L=r(s,d,"location",Ce),B=r(s,d,"notes",W),q=r(s,d,"detail",me),Q=`in element ${m} of "${t}"`;K(s,d,Q);let U=[];if(B)for(let z of B){let _={},v=r(z,_,"text",y),g=r(z,_,"location",Ce);K(z,_,Q),U.push({text:v||"",location:Me(g,Q,u)})}l.push({id:b||"",pluginName:w||i,text:T||"",location:Me(L,Q,u),notes:U,detail:n?n.store(q):-1}),m++}return l}function ge(e,t){let n=[];for(let i of e){if(typeof i!="string")throw new Error(`${J(t)} must be an array of strings`);n.push(i)}return n}function et({path:e,contents:t,hash:n}){let i=null;return{path:e,contents:t,hash:n,get text(){let u=this.contents;return(i===null||u!==t)&&(t=u,i=re(u)),i}}}var nt="0.19.9",rt=e=>fe().build(e),it=e=>fe().context(e),lt=(e,t)=>fe().transform(e,t),st=(e,t)=>fe().formatMessages(e,t),ot=(e,t)=>fe().analyzeMetafile(e,t),at=()=>{throw new Error('The "buildSync" API only works in node')},ut=()=>{throw new Error('The "transformSync" API only works in node')},ct=()=>{throw new Error('The "formatMessagesSync" API only works in node')},ft=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ae,Oe,fe=()=>{if(Oe)return Oe;throw ae?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')},dt=e=>{e=De(e||{});let t=e.wasmURL,n=e.wasmModule,i=e.worker!==!1;if(!t&&!n)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ae)throw new Error('Cannot call "initialize" more than once');return ae=pt(t||"",n,i),ae.catch(()=>{ae=void 0}),ae},pt=async(e,t,n)=>{let i;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.\nlet 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+=g.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,a,h,u){if(i!==0||a!==s.length||h!==null){u(r());return}const d=this.writeSync(n,s);u(null,d)},chmod(n,s,i){i(r())},chown(n,s,i,a){a(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,a){a(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,a){a(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,a){a(r())},read(n,s,i,a,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,a){a(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"),g=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=t=>{t!==0&&console.warn("exit code:",t)},this._exitPromise=new Promise(t=>{this._resolveExitPromise=t}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(t,e)=>{this.mem.setUint32(t+0,e,!0),this.mem.setUint32(t+4,Math.floor(e/4294967296),!0)},n=t=>{const e=this.mem.getUint32(t+0,!0),o=this.mem.getInt32(t+4,!0);return e+o*4294967296},s=t=>{const e=this.mem.getFloat64(t,!0);if(e===0)return;if(!isNaN(e))return e;const o=this.mem.getUint32(t,!0);return this._values[o]},i=(t,e)=>{if(typeof e=="number"&&e!==0){if(isNaN(e)){this.mem.setUint32(t+4,2146959360,!0),this.mem.setUint32(t,0,!0);return}this.mem.setFloat64(t,e,!0);return}if(e===void 0){this.mem.setFloat64(t,0,!0);return}let l=this._ids.get(e);l===void 0&&(l=this._idPool.pop(),l===void 0&&(l=this._values.length),this._values[l]=e,this._goRefCounts[l]=0,this._ids.set(e,l)),this._goRefCounts[l]++;let m=0;switch(typeof e){case"object":e!==null&&(m=1);break;case"string":m=2;break;case"symbol":m=3;break;case"function":m=4;break}this.mem.setUint32(t+4,2146959360|m,!0),this.mem.setUint32(t,l,!0)},a=t=>{const e=n(t+0),o=n(t+8);return new Uint8Array(this._inst.exports.mem.buffer,e,o)},h=t=>{const e=n(t+0),o=n(t+8),l=new Array(o);for(let m=0;m<o;m++)l[m]=s(e+m*8);return l},u=t=>{const e=n(t+0),o=n(t+8);return g.decode(new DataView(this._inst.exports.mem.buffer,e,o))},d=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(e)},"runtime.wasmWrite":t=>{t>>>=0;const e=n(t+8),o=n(t+16),l=this.mem.getInt32(t+24,!0);globalThis.fs.writeSync(e,new Uint8Array(this._inst.exports.mem.buffer,o,l))},"runtime.resetMemoryDataView":t=>{t>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{t>>>=0,c(t+8,(d+performance.now())*1e6)},"runtime.walltime":t=>{t>>>=0;const e=new Date().getTime();c(t+8,e/1e3),this.mem.setInt32(t+16,e%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":t=>{t>>>=0;const e=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(e,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(e);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(t+8)+1)),this.mem.setInt32(t+16,e,!0)},"runtime.clearTimeoutEvent":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);clearTimeout(this._scheduledTimeouts.get(e)),this._scheduledTimeouts.delete(e)},"runtime.getRandomData":t=>{t>>>=0,crypto.getRandomValues(a(t+8))},"syscall/js.finalizeRef":t=>{t>>>=0;const e=this.mem.getUint32(t+8,!0);if(this._goRefCounts[e]--,this._goRefCounts[e]===0){const o=this._values[e];this._values[e]=null,this._ids.delete(o),this._idPool.push(e)}},"syscall/js.stringVal":t=>{t>>>=0,i(t+24,u(t+8))},"syscall/js.valueGet":t=>{t>>>=0;const e=Reflect.get(s(t+8),u(t+16));t=this._inst.exports.getsp()>>>0,i(t+32,e)},"syscall/js.valueSet":t=>{t>>>=0,Reflect.set(s(t+8),u(t+16),s(t+32))},"syscall/js.valueDelete":t=>{t>>>=0,Reflect.deleteProperty(s(t+8),u(t+16))},"syscall/js.valueIndex":t=>{t>>>=0,i(t+24,Reflect.get(s(t+8),n(t+16)))},"syscall/js.valueSetIndex":t=>{t>>>=0,Reflect.set(s(t+8),n(t+16),s(t+24))},"syscall/js.valueCall":t=>{t>>>=0;try{const e=s(t+8),o=Reflect.get(e,u(t+16)),l=h(t+32),m=Reflect.apply(o,e,l);t=this._inst.exports.getsp()>>>0,i(t+56,m),this.mem.setUint8(t+64,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+56,e),this.mem.setUint8(t+64,0)}},"syscall/js.valueInvoke":t=>{t>>>=0;try{const e=s(t+8),o=h(t+16),l=Reflect.apply(e,void 0,o);t=this._inst.exports.getsp()>>>0,i(t+40,l),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueNew":t=>{t>>>=0;try{const e=s(t+8),o=h(t+16),l=Reflect.construct(e,o);t=this._inst.exports.getsp()>>>0,i(t+40,l),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueLength":t=>{t>>>=0,c(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":t=>{t>>>=0;const e=f.encode(String(s(t+8)));i(t+16,e),c(t+24,e.length)},"syscall/js.valueLoadString":t=>{t>>>=0;const e=s(t+8);a(t+16).set(e)},"syscall/js.valueInstanceOf":t=>{t>>>=0,this.mem.setUint8(t+24,s(t+8)instanceof s(t+16)?1:0)},"syscall/js.copyBytesToGo":t=>{t>>>=0;const e=a(t+8),o=s(t+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const l=o.subarray(0,e.length);e.set(l),c(t+40,l.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{t>>>=0;const e=s(t+8),o=a(t+16);if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const l=o.subarray(0,e.length);e.set(l),c(t+40,l.length),this.mem.setUint8(t+48,1)},debug:t=>{console.log(t)}}}}async run(c){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=t=>{const e=n,o=f.encode(t+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),e},i=this.argv.length,a=[];this.argv.forEach(t=>{a.push(s(t))}),a.push(0),Object.keys(this.env).sort().forEach(t=>{a.push(s(`${t}=${this.env[t]}`))}),a.push(0);const u=n;if(a.forEach(t=>{this.mem.setUint32(n,t,!0),this.mem.setUint32(n+4,0,!0),n+=8}),n>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,u),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,g=globalThis.fs,c="";g.writeSync=(h,u)=>{if(h===1)postMessage(u);else if(h===2){c+=f.decode(u);let d=c.split(`\n`);d.length>1&&console.log(d.slice(0,-1).join(`\n`)),c=d[d.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())},g.read=(h,u,d,t,e,o)=>{if(h!==0||d!==0||t!==u.length||e!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,t,e,o);return}let l=n[0],m=Math.max(0,Math.min(t,l.length-i));u.set(l.subarray(i,i+m),d),i+=m,i===l.length&&(n.shift(),i=0),o(null,m)};let a=new globalThis.Go;a.argv=["","--service=0.19.9"],tryToInstantiateModule(r,a).then(h=>{postMessage(null),a.run(h)},h=>{postMessage(h)})};async function tryToInstantiateModule(r,f){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const g=await fetch(r);if(!g.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\\/wasm($|;)/i.test(g.headers.get("Content-Type")||""))return(await WebAssembly.instantiateStreaming(g,f.importObject)).instance;const c=await g.arrayBuffer();return(await WebAssembly.instantiate(c,f.importObject)).instance}return r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});i=new Worker(URL.createObjectURL(b))}else{let b=(postMessage=>{
${s}:${d}:${b}: ERROR: ${w}${l.text}`}).join("");let u=new Error(e);for(let[l,m]of[["errors",t],["warnings",n]])Object.defineProperty(u,l,{configurable:!0,enumerable:!0,get:()=>m,set:s=>Object.defineProperty(u,l,{configurable:!0,enumerable:!0,value:s})});return u}function oe(e,t){for(let n of e)n.detail=t.load(n.detail);return e}function Ce(e,t,n){if(e==null)return null;let i={},u=r(e,i,"file",y),l=r(e,i,"namespace",y),m=r(e,i,"line",le),s=r(e,i,"column",le),d=r(e,i,"length",le),b=r(e,i,"lineText",y),w=r(e,i,"suggestion",y);if(K(e,i,t),b){let M=b.slice(0,(s&&s>0?s:0)+(d&&d>0?d:0)+(n&&n>0?n:80));!/[\x7F-\uFFFF]/.test(M)&&!/\n/.test(b)&&(b=M)}return{file:u||"",namespace:l||"",line:m||0,column:s||0,length:d||0,lineText:b||"",suggestion:w||""}}function ne(e,t,n,i,u){let l=[],m=0;for(let s of e){let d={},b=r(s,d,"id",y),w=r(s,d,"pluginName",y),M=r(s,d,"text",y),L=r(s,d,"location",Me),B=r(s,d,"notes",W),q=r(s,d,"detail",me),G=`in element ${m} of "${t}"`;K(s,d,G);let U=[];if(B)for(let z of B){let _={},v=r(z,_,"text",y),g=r(z,_,"location",Me);K(z,_,G),U.push({text:v||"",location:Ce(g,G,u)})}l.push({id:b||"",pluginName:w||i,text:M||"",location:Ce(L,G,u),notes:U,detail:n?n.store(q):-1}),m++}return l}function ge(e,t){let n=[];for(let i of e){if(typeof i!="string")throw new Error(`${J(t)} must be an array of strings`);n.push(i)}return n}function et({path:e,contents:t,hash:n}){let i=null;return{path:e,contents:t,hash:n,get text(){let u=this.contents;return(i===null||u!==t)&&(t=u,i=re(u)),i}}}var nt="0.19.10",rt=e=>fe().build(e),it=e=>fe().context(e),lt=(e,t)=>fe().transform(e,t),st=(e,t)=>fe().formatMessages(e,t),ot=(e,t)=>fe().analyzeMetafile(e,t),at=()=>{throw new Error('The "buildSync" API only works in node')},ut=()=>{throw new Error('The "transformSync" API only works in node')},ct=()=>{throw new Error('The "formatMessagesSync" API only works in node')},ft=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ae,Oe,fe=()=>{if(Oe)return Oe;throw ae?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')},dt=e=>{e=Pe(e||{});let t=e.wasmURL,n=e.wasmModule,i=e.worker!==!1;if(!t&&!n)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ae)throw new Error('Cannot call "initialize" more than once');return ae=pt(t||"",n,i),ae.catch(()=>{ae=void 0}),ae},pt=async(e,t,n)=>{let i;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.\nlet 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+=g.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,a,u,h){if(i!==0||a!==s.length||u!==null){h(r());return}const d=this.writeSync(n,s);h(null,d)},chmod(n,s,i){i(r())},chown(n,s,i,a){a(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,a){a(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,a){a(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,a){a(r())},read(n,s,i,a,u,h){h(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,a){a(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"),g=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=t=>{t!==0&&console.warn("exit code:",t)},this._exitPromise=new Promise(t=>{this._resolveExitPromise=t}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(t,e)=>{this.mem.setUint32(t+0,e,!0),this.mem.setUint32(t+4,Math.floor(e/4294967296),!0)},n=t=>{const e=this.mem.getUint32(t+0,!0),o=this.mem.getInt32(t+4,!0);return e+o*4294967296},s=t=>{const e=this.mem.getFloat64(t,!0);if(e===0)return;if(!isNaN(e))return e;const o=this.mem.getUint32(t,!0);return this._values[o]},i=(t,e)=>{if(typeof e=="number"&&e!==0){if(isNaN(e)){this.mem.setUint32(t+4,2146959360,!0),this.mem.setUint32(t,0,!0);return}this.mem.setFloat64(t,e,!0);return}if(e===void 0){this.mem.setFloat64(t,0,!0);return}let l=this._ids.get(e);l===void 0&&(l=this._idPool.pop(),l===void 0&&(l=this._values.length),this._values[l]=e,this._goRefCounts[l]=0,this._ids.set(e,l)),this._goRefCounts[l]++;let m=0;switch(typeof e){case"object":e!==null&&(m=1);break;case"string":m=2;break;case"symbol":m=3;break;case"function":m=4;break}this.mem.setUint32(t+4,2146959360|m,!0),this.mem.setUint32(t,l,!0)},a=t=>{const e=n(t+0),o=n(t+8);return new Uint8Array(this._inst.exports.mem.buffer,e,o)},u=t=>{const e=n(t+0),o=n(t+8),l=new Array(o);for(let m=0;m<o;m++)l[m]=s(e+m*8);return l},h=t=>{const e=n(t+0),o=n(t+8);return g.decode(new DataView(this._inst.exports.mem.buffer,e,o))},d=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(e)},"runtime.wasmWrite":t=>{t>>>=0;const e=n(t+8),o=n(t+16),l=this.mem.getInt32(t+24,!0);globalThis.fs.writeSync(e,new Uint8Array(this._inst.exports.mem.buffer,o,l))},"runtime.resetMemoryDataView":t=>{t>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{t>>>=0,c(t+8,(d+performance.now())*1e6)},"runtime.walltime":t=>{t>>>=0;const e=new Date().getTime();c(t+8,e/1e3),this.mem.setInt32(t+16,e%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":t=>{t>>>=0;const e=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(e,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(e);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(t+8)+1)),this.mem.setInt32(t+16,e,!0)},"runtime.clearTimeoutEvent":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);clearTimeout(this._scheduledTimeouts.get(e)),this._scheduledTimeouts.delete(e)},"runtime.getRandomData":t=>{t>>>=0,crypto.getRandomValues(a(t+8))},"syscall/js.finalizeRef":t=>{t>>>=0;const e=this.mem.getUint32(t+8,!0);if(this._goRefCounts[e]--,this._goRefCounts[e]===0){const o=this._values[e];this._values[e]=null,this._ids.delete(o),this._idPool.push(e)}},"syscall/js.stringVal":t=>{t>>>=0,i(t+24,h(t+8))},"syscall/js.valueGet":t=>{t>>>=0;const e=Reflect.get(s(t+8),h(t+16));t=this._inst.exports.getsp()>>>0,i(t+32,e)},"syscall/js.valueSet":t=>{t>>>=0,Reflect.set(s(t+8),h(t+16),s(t+32))},"syscall/js.valueDelete":t=>{t>>>=0,Reflect.deleteProperty(s(t+8),h(t+16))},"syscall/js.valueIndex":t=>{t>>>=0,i(t+24,Reflect.get(s(t+8),n(t+16)))},"syscall/js.valueSetIndex":t=>{t>>>=0,Reflect.set(s(t+8),n(t+16),s(t+24))},"syscall/js.valueCall":t=>{t>>>=0;try{const e=s(t+8),o=Reflect.get(e,h(t+16)),l=u(t+32),m=Reflect.apply(o,e,l);t=this._inst.exports.getsp()>>>0,i(t+56,m),this.mem.setUint8(t+64,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+56,e),this.mem.setUint8(t+64,0)}},"syscall/js.valueInvoke":t=>{t>>>=0;try{const e=s(t+8),o=u(t+16),l=Reflect.apply(e,void 0,o);t=this._inst.exports.getsp()>>>0,i(t+40,l),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueNew":t=>{t>>>=0;try{const e=s(t+8),o=u(t+16),l=Reflect.construct(e,o);t=this._inst.exports.getsp()>>>0,i(t+40,l),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueLength":t=>{t>>>=0,c(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":t=>{t>>>=0;const e=f.encode(String(s(t+8)));i(t+16,e),c(t+24,e.length)},"syscall/js.valueLoadString":t=>{t>>>=0;const e=s(t+8);a(t+16).set(e)},"syscall/js.valueInstanceOf":t=>{t>>>=0,this.mem.setUint8(t+24,s(t+8)instanceof s(t+16)?1:0)},"syscall/js.copyBytesToGo":t=>{t>>>=0;const e=a(t+8),o=s(t+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const l=o.subarray(0,e.length);e.set(l),c(t+40,l.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{t>>>=0;const e=s(t+8),o=a(t+16);if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const l=o.subarray(0,e.length);e.set(l),c(t+40,l.length),this.mem.setUint8(t+48,1)},debug:t=>{console.log(t)}}}}async run(c){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=t=>{const e=n,o=f.encode(t+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),e},i=this.argv.length,a=[];this.argv.forEach(t=>{a.push(s(t))}),a.push(0),Object.keys(this.env).sort().forEach(t=>{a.push(s(`${t}=${this.env[t]}`))}),a.push(0);const h=n;if(a.forEach(t=>{this.mem.setUint32(n,t,!0),this.mem.setUint32(n+4,0,!0),n+=8}),n>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,h),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,g=globalThis.fs,c="";g.writeSync=(u,h)=>{if(u===1)postMessage(h);else if(u===2){c+=f.decode(h);let d=c.split(`\n`);d.length>1&&console.log(d.slice(0,-1).join(`\n`)),c=d[d.length-1]}else throw new Error("Bad write");return h.length};let n=[],s,i=0;onmessage=({data:u})=>(u.length>0&&(n.push(u),s&&s()),a),g.read=(u,h,d,t,e,o)=>{if(u!==0||d!==0||t!==h.length||e!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(u,h,d,t,e,o);return}let l=n[0],m=Math.max(0,Math.min(t,l.length-i));h.set(l.subarray(i,i+m),d),i+=m,i===l.length&&(n.shift(),i=0),o(null,m)};let a=new globalThis.Go;return a.argv=["","--service=0.19.10"],tryToInstantiateModule(r,a).then(u=>{postMessage(null),a.run(u)},u=>{postMessage(u)}),a};async function tryToInstantiateModule(r,f){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const g=await fetch(r);if(!g.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\\/wasm($|;)/i.test(g.headers.get("Content-Type")||""))return(await WebAssembly.instantiateStreaming(g,f.importObject)).instance;const c=await g.arrayBuffer();return(await WebAssembly.instantiate(c,f.importObject)).instance}return r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});i=new Worker(URL.createObjectURL(b))}else{let b=(postMessage=>{
// Copyright 2018 The Go Authors. All rights reserved.

@@ -20,4 +20,4 @@ // Use of this source code is governed by a BSD-style

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+=g.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,a,h,u){if(i!==0||a!==s.length||h!==null){u(r());return}const d=this.writeSync(n,s);u(null,d)},chmod(n,s,i){i(r())},chown(n,s,i,a){a(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,a){a(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,a){a(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,a){a(r())},read(n,s,i,a,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,a){a(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"),g=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=t=>{t!==0&&console.warn("exit code:",t)},this._exitPromise=new Promise(t=>{this._resolveExitPromise=t}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(t,e)=>{this.mem.setUint32(t+0,e,!0),this.mem.setUint32(t+4,Math.floor(e/4294967296),!0)},n=t=>{const e=this.mem.getUint32(t+0,!0),o=this.mem.getInt32(t+4,!0);return e+o*4294967296},s=t=>{const e=this.mem.getFloat64(t,!0);if(e===0)return;if(!isNaN(e))return e;const o=this.mem.getUint32(t,!0);return this._values[o]},i=(t,e)=>{if(typeof e=="number"&&e!==0){if(isNaN(e)){this.mem.setUint32(t+4,2146959360,!0),this.mem.setUint32(t,0,!0);return}this.mem.setFloat64(t,e,!0);return}if(e===void 0){this.mem.setFloat64(t,0,!0);return}let l=this._ids.get(e);l===void 0&&(l=this._idPool.pop(),l===void 0&&(l=this._values.length),this._values[l]=e,this._goRefCounts[l]=0,this._ids.set(e,l)),this._goRefCounts[l]++;let m=0;switch(typeof e){case"object":e!==null&&(m=1);break;case"string":m=2;break;case"symbol":m=3;break;case"function":m=4;break}this.mem.setUint32(t+4,2146959360|m,!0),this.mem.setUint32(t,l,!0)},a=t=>{const e=n(t+0),o=n(t+8);return new Uint8Array(this._inst.exports.mem.buffer,e,o)},h=t=>{const e=n(t+0),o=n(t+8),l=new Array(o);for(let m=0;m<o;m++)l[m]=s(e+m*8);return l},u=t=>{const e=n(t+0),o=n(t+8);return g.decode(new DataView(this._inst.exports.mem.buffer,e,o))},d=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(e)},"runtime.wasmWrite":t=>{t>>>=0;const e=n(t+8),o=n(t+16),l=this.mem.getInt32(t+24,!0);globalThis.fs.writeSync(e,new Uint8Array(this._inst.exports.mem.buffer,o,l))},"runtime.resetMemoryDataView":t=>{t>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{t>>>=0,c(t+8,(d+performance.now())*1e6)},"runtime.walltime":t=>{t>>>=0;const e=new Date().getTime();c(t+8,e/1e3),this.mem.setInt32(t+16,e%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":t=>{t>>>=0;const e=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(e,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(e);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(t+8)+1)),this.mem.setInt32(t+16,e,!0)},"runtime.clearTimeoutEvent":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);clearTimeout(this._scheduledTimeouts.get(e)),this._scheduledTimeouts.delete(e)},"runtime.getRandomData":t=>{t>>>=0,crypto.getRandomValues(a(t+8))},"syscall/js.finalizeRef":t=>{t>>>=0;const e=this.mem.getUint32(t+8,!0);if(this._goRefCounts[e]--,this._goRefCounts[e]===0){const o=this._values[e];this._values[e]=null,this._ids.delete(o),this._idPool.push(e)}},"syscall/js.stringVal":t=>{t>>>=0,i(t+24,u(t+8))},"syscall/js.valueGet":t=>{t>>>=0;const e=Reflect.get(s(t+8),u(t+16));t=this._inst.exports.getsp()>>>0,i(t+32,e)},"syscall/js.valueSet":t=>{t>>>=0,Reflect.set(s(t+8),u(t+16),s(t+32))},"syscall/js.valueDelete":t=>{t>>>=0,Reflect.deleteProperty(s(t+8),u(t+16))},"syscall/js.valueIndex":t=>{t>>>=0,i(t+24,Reflect.get(s(t+8),n(t+16)))},"syscall/js.valueSetIndex":t=>{t>>>=0,Reflect.set(s(t+8),n(t+16),s(t+24))},"syscall/js.valueCall":t=>{t>>>=0;try{const e=s(t+8),o=Reflect.get(e,u(t+16)),l=h(t+32),m=Reflect.apply(o,e,l);t=this._inst.exports.getsp()>>>0,i(t+56,m),this.mem.setUint8(t+64,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+56,e),this.mem.setUint8(t+64,0)}},"syscall/js.valueInvoke":t=>{t>>>=0;try{const e=s(t+8),o=h(t+16),l=Reflect.apply(e,void 0,o);t=this._inst.exports.getsp()>>>0,i(t+40,l),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueNew":t=>{t>>>=0;try{const e=s(t+8),o=h(t+16),l=Reflect.construct(e,o);t=this._inst.exports.getsp()>>>0,i(t+40,l),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueLength":t=>{t>>>=0,c(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":t=>{t>>>=0;const e=f.encode(String(s(t+8)));i(t+16,e),c(t+24,e.length)},"syscall/js.valueLoadString":t=>{t>>>=0;const e=s(t+8);a(t+16).set(e)},"syscall/js.valueInstanceOf":t=>{t>>>=0,this.mem.setUint8(t+24,s(t+8)instanceof s(t+16)?1:0)},"syscall/js.copyBytesToGo":t=>{t>>>=0;const e=a(t+8),o=s(t+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const l=o.subarray(0,e.length);e.set(l),c(t+40,l.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{t>>>=0;const e=s(t+8),o=a(t+16);if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const l=o.subarray(0,e.length);e.set(l),c(t+40,l.length),this.mem.setUint8(t+48,1)},debug:t=>{console.log(t)}}}}async run(c){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=t=>{const e=n,o=f.encode(t+"\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),e},i=this.argv.length,a=[];this.argv.forEach(t=>{a.push(s(t))}),a.push(0),Object.keys(this.env).sort().forEach(t=>{a.push(s(`${t}=${this.env[t]}`))}),a.push(0);const u=n;if(a.forEach(t=>{this.mem.setUint32(n,t,!0),this.mem.setUint32(n+4,0,!0),n+=8}),n>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,u),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,g=globalThis.fs,c="";g.writeSync=(h,u)=>{if(h===1)postMessage(u);else if(h===2){c+=f.decode(u);let d=c.split(`
`);return i!=-1&&(console.log(c.substring(0,i)),c=c.substring(i+1)),s.length},write(n,s,i,a,u,h){if(i!==0||a!==s.length||u!==null){h(r());return}const d=this.writeSync(n,s);h(null,d)},chmod(n,s,i){i(r())},chown(n,s,i,a){a(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,a){a(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,a){a(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,a){a(r())},read(n,s,i,a,u,h){h(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,a){a(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"),g=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=t=>{t!==0&&console.warn("exit code:",t)},this._exitPromise=new Promise(t=>{this._resolveExitPromise=t}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(t,e)=>{this.mem.setUint32(t+0,e,!0),this.mem.setUint32(t+4,Math.floor(e/4294967296),!0)},n=t=>{const e=this.mem.getUint32(t+0,!0),o=this.mem.getInt32(t+4,!0);return e+o*4294967296},s=t=>{const e=this.mem.getFloat64(t,!0);if(e===0)return;if(!isNaN(e))return e;const o=this.mem.getUint32(t,!0);return this._values[o]},i=(t,e)=>{if(typeof e=="number"&&e!==0){if(isNaN(e)){this.mem.setUint32(t+4,2146959360,!0),this.mem.setUint32(t,0,!0);return}this.mem.setFloat64(t,e,!0);return}if(e===void 0){this.mem.setFloat64(t,0,!0);return}let l=this._ids.get(e);l===void 0&&(l=this._idPool.pop(),l===void 0&&(l=this._values.length),this._values[l]=e,this._goRefCounts[l]=0,this._ids.set(e,l)),this._goRefCounts[l]++;let m=0;switch(typeof e){case"object":e!==null&&(m=1);break;case"string":m=2;break;case"symbol":m=3;break;case"function":m=4;break}this.mem.setUint32(t+4,2146959360|m,!0),this.mem.setUint32(t,l,!0)},a=t=>{const e=n(t+0),o=n(t+8);return new Uint8Array(this._inst.exports.mem.buffer,e,o)},u=t=>{const e=n(t+0),o=n(t+8),l=new Array(o);for(let m=0;m<o;m++)l[m]=s(e+m*8);return l},h=t=>{const e=n(t+0),o=n(t+8);return g.decode(new DataView(this._inst.exports.mem.buffer,e,o))},d=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(e)},"runtime.wasmWrite":t=>{t>>>=0;const e=n(t+8),o=n(t+16),l=this.mem.getInt32(t+24,!0);globalThis.fs.writeSync(e,new Uint8Array(this._inst.exports.mem.buffer,o,l))},"runtime.resetMemoryDataView":t=>{t>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{t>>>=0,c(t+8,(d+performance.now())*1e6)},"runtime.walltime":t=>{t>>>=0;const e=new Date().getTime();c(t+8,e/1e3),this.mem.setInt32(t+16,e%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":t=>{t>>>=0;const e=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(e,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(e);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(t+8)+1)),this.mem.setInt32(t+16,e,!0)},"runtime.clearTimeoutEvent":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);clearTimeout(this._scheduledTimeouts.get(e)),this._scheduledTimeouts.delete(e)},"runtime.getRandomData":t=>{t>>>=0,crypto.getRandomValues(a(t+8))},"syscall/js.finalizeRef":t=>{t>>>=0;const e=this.mem.getUint32(t+8,!0);if(this._goRefCounts[e]--,this._goRefCounts[e]===0){const o=this._values[e];this._values[e]=null,this._ids.delete(o),this._idPool.push(e)}},"syscall/js.stringVal":t=>{t>>>=0,i(t+24,h(t+8))},"syscall/js.valueGet":t=>{t>>>=0;const e=Reflect.get(s(t+8),h(t+16));t=this._inst.exports.getsp()>>>0,i(t+32,e)},"syscall/js.valueSet":t=>{t>>>=0,Reflect.set(s(t+8),h(t+16),s(t+32))},"syscall/js.valueDelete":t=>{t>>>=0,Reflect.deleteProperty(s(t+8),h(t+16))},"syscall/js.valueIndex":t=>{t>>>=0,i(t+24,Reflect.get(s(t+8),n(t+16)))},"syscall/js.valueSetIndex":t=>{t>>>=0,Reflect.set(s(t+8),n(t+16),s(t+24))},"syscall/js.valueCall":t=>{t>>>=0;try{const e=s(t+8),o=Reflect.get(e,h(t+16)),l=u(t+32),m=Reflect.apply(o,e,l);t=this._inst.exports.getsp()>>>0,i(t+56,m),this.mem.setUint8(t+64,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+56,e),this.mem.setUint8(t+64,0)}},"syscall/js.valueInvoke":t=>{t>>>=0;try{const e=s(t+8),o=u(t+16),l=Reflect.apply(e,void 0,o);t=this._inst.exports.getsp()>>>0,i(t+40,l),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueNew":t=>{t>>>=0;try{const e=s(t+8),o=u(t+16),l=Reflect.construct(e,o);t=this._inst.exports.getsp()>>>0,i(t+40,l),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueLength":t=>{t>>>=0,c(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":t=>{t>>>=0;const e=f.encode(String(s(t+8)));i(t+16,e),c(t+24,e.length)},"syscall/js.valueLoadString":t=>{t>>>=0;const e=s(t+8);a(t+16).set(e)},"syscall/js.valueInstanceOf":t=>{t>>>=0,this.mem.setUint8(t+24,s(t+8)instanceof s(t+16)?1:0)},"syscall/js.copyBytesToGo":t=>{t>>>=0;const e=a(t+8),o=s(t+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const l=o.subarray(0,e.length);e.set(l),c(t+40,l.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{t>>>=0;const e=s(t+8),o=a(t+16);if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const l=o.subarray(0,e.length);e.set(l),c(t+40,l.length),this.mem.setUint8(t+48,1)},debug:t=>{console.log(t)}}}}async run(c){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=t=>{const e=n,o=f.encode(t+"\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),e},i=this.argv.length,a=[];this.argv.forEach(t=>{a.push(s(t))}),a.push(0),Object.keys(this.env).sort().forEach(t=>{a.push(s(`${t}=${this.env[t]}`))}),a.push(0);const h=n;if(a.forEach(t=>{this.mem.setUint32(n,t,!0),this.mem.setUint32(n+4,0,!0),n+=8}),n>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,h),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,g=globalThis.fs,c="";g.writeSync=(u,h)=>{if(u===1)postMessage(h);else if(u===2){c+=f.decode(h);let d=c.split(`
`);d.length>1&&console.log(d.slice(0,-1).join(`
`)),c=d[d.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())},g.read=(h,u,d,t,e,o)=>{if(h!==0||d!==0||t!==u.length||e!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,t,e,o);return}let l=n[0],m=Math.max(0,Math.min(t,l.length-i));u.set(l.subarray(i,i+m),d),i+=m,i===l.length&&(n.shift(),i=0),o(null,m)};let a=new globalThis.Go;a.argv=["","--service=0.19.9"],tryToInstantiateModule(r,a).then(h=>{postMessage(null),a.run(h)},h=>{postMessage(h)})};async function tryToInstantiateModule(r,f){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const g=await fetch(r);if(!g.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\/wasm($|;)/i.test(g.headers.get("Content-Type")||""))return(await WebAssembly.instantiateStreaming(g,f.importObject)).instance;const c=await g.arrayBuffer();return(await WebAssembly.instantiate(c,f.importObject)).instance}return r=>onmessage(r);})(w=>i.onmessage({data:w}));i={onmessage:null,postMessage:w=>setTimeout(()=>b({data:w})),terminate(){}}}let u,l,m=new Promise((b,w)=>{u=b,l=w});i.onmessage=({data:b})=>{i.onmessage=({data:w})=>s(w),b?l(b):u()},i.postMessage(t||new URL(e,location.href).toString());let{readFromStdout:s,service:d}=Ue({writeToStdin(b){i.postMessage(b)},isSync:!1,hasFS:!1,esbuild:be});await m,Oe={build:b=>new Promise((w,T)=>d.buildOrContext({callName:"build",refs:null,options:b,isTTY:!1,defaultWD:"/",callback:(L,B)=>L?T(L):w(B)})),context:b=>new Promise((w,T)=>d.buildOrContext({callName:"context",refs:null,options:b,isTTY:!1,defaultWD:"/",callback:(L,B)=>L?T(L):w(B)})),transform:(b,w)=>new Promise((T,L)=>d.transform({callName:"transform",refs:null,input:b,options:w||{},isTTY:!1,fs:{readFile(B,q){q(new Error("Internal error"),null)},writeFile(B,q){q(null)}},callback:(B,q)=>B?L(B):T(q)})),formatMessages:(b,w)=>new Promise((T,L)=>d.formatMessages({callName:"formatMessages",refs:null,messages:b,options:w,callback:(B,q)=>B?L(B):T(q)})),analyzeMetafile:(b,w)=>new Promise((T,L)=>d.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof b=="string"?b:JSON.stringify(b),options:w,callback:(B,q)=>B?L(B):T(q)}))}},gt=be;export{ot as analyzeMetafile,ft as analyzeMetafileSync,rt as build,at as buildSync,it as context,gt as default,st as formatMessages,ct as formatMessagesSync,dt as initialize,lt as transform,ut as transformSync,nt as version};
`)),c=d[d.length-1]}else throw new Error("Bad write");return h.length};let n=[],s,i=0;onmessage=({data:u})=>(u.length>0&&(n.push(u),s&&s()),a),g.read=(u,h,d,t,e,o)=>{if(u!==0||d!==0||t!==h.length||e!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(u,h,d,t,e,o);return}let l=n[0],m=Math.max(0,Math.min(t,l.length-i));h.set(l.subarray(i,i+m),d),i+=m,i===l.length&&(n.shift(),i=0),o(null,m)};let a=new globalThis.Go;return a.argv=["","--service=0.19.10"],tryToInstantiateModule(r,a).then(u=>{postMessage(null),a.run(u)},u=>{postMessage(u)}),a};async function tryToInstantiateModule(r,f){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const g=await fetch(r);if(!g.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\/wasm($|;)/i.test(g.headers.get("Content-Type")||""))return(await WebAssembly.instantiateStreaming(g,f.importObject)).instance;const c=await g.arrayBuffer();return(await WebAssembly.instantiate(c,f.importObject)).instance}return r=>onmessage(r);})(M=>i.onmessage({data:M})),w;i={onmessage:null,postMessage:M=>setTimeout(()=>w=b({data:M})),terminate(){if(w)for(let M of w._scheduledTimeouts.values())clearTimeout(M)}}}let u,l,m=new Promise((b,w)=>{u=b,l=w});i.onmessage=({data:b})=>{i.onmessage=({data:w})=>s(w),b?l(b):u()},i.postMessage(t||new URL(e,location.href).toString());let{readFromStdout:s,service:d}=Ue({writeToStdin(b){i.postMessage(b)},isSync:!1,hasFS:!1,esbuild:be});await m,Oe={build:b=>new Promise((w,M)=>d.buildOrContext({callName:"build",refs:null,options:b,isTTY:!1,defaultWD:"/",callback:(L,B)=>L?M(L):w(B)})),context:b=>new Promise((w,M)=>d.buildOrContext({callName:"context",refs:null,options:b,isTTY:!1,defaultWD:"/",callback:(L,B)=>L?M(L):w(B)})),transform:(b,w)=>new Promise((M,L)=>d.transform({callName:"transform",refs:null,input:b,options:w||{},isTTY:!1,fs:{readFile(B,q){q(new Error("Internal error"),null)},writeFile(B,q){q(null)}},callback:(B,q)=>B?L(B):M(q)})),formatMessages:(b,w)=>new Promise((M,L)=>d.formatMessages({callName:"formatMessages",refs:null,messages:b,options:w,callback:(B,q)=>B?L(B):M(q)})),analyzeMetafile:(b,w)=>new Promise((M,L)=>d.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof b=="string"?b:JSON.stringify(b),options:w,callback:(B,q)=>B?L(B):M(q)}))}},gt=be;export{ot as analyzeMetafile,ft as analyzeMetafileSync,rt as build,at as buildSync,it as context,gt as default,st as formatMessages,ct as formatMessagesSync,dt as initialize,lt as transform,ut as transformSync,nt as version};
(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,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of _e(t))!Ve.call(e,u)&&u!==n&&ve(e,u,{get:()=>t[u],enumerable:!(i=Ke(t,u))||i.enumerable});return e};var Qe=e=>Je(ve({},"__esModule",{value:!0}),e);var ne=(e,t,n)=>new Promise((i,u)=>{var l=f=>{try{s(n.next(f))}catch(h){u(h)}},g=f=>{try{s(n.throw(f))}catch(h){u(h)}},s=f=>f.done?i(f.value):Promise.resolve(f.value).then(l,g);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=i=>{if(i===null)n.write8(0);else if(typeof i=="boolean")n.write8(1),n.write8(+i);else if(typeof i=="number")n.write8(2),n.write32(i|0);else if(typeof i=="string")n.write8(3),n.write(Z(i));else if(i instanceof Uint8Array)n.write8(4),n.write(i);else if(i instanceof Array){n.write8(5),n.write32(i.length);for(let u of i)t(u)}else{let u=Object.keys(i);n.write8(6),n.write32(u.length);for(let l of u)n.write(Z(l)),t(i[l])}},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 g=n.read32(),s=[];for(let f=0;f<g;f++)s.push(t());return s}case 6:{let g=n.read32(),s={};for(let f=0;f<g;f++)s[ie(n.read())]=t();return s}default:throw new Error("Invalid packet")}},n=new pe(e),i=n.read32(),u=(i&1)===0;i>>>=1;let l=t();if(n.ptr!==e.length)throw new Error("Invalid packet");return{id:i,isRequest:u,value:l}}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),i=this._read(n.length);return n.set(this.buf.subarray(i,i+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:i}=e;return Buffer.from(t,n,i).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
"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,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of _e(t))!Ve.call(e,u)&&u!==n&&ve(e,u,{get:()=>t[u],enumerable:!(i=Ke(t,u))||i.enumerable});return e};var Ge=e=>Je(ve({},"__esModule",{value:!0}),e);var ne=(e,t,n)=>new Promise((i,u)=>{var l=f=>{try{s(n.next(f))}catch(h){u(h)}},g=f=>{try{s(n.throw(f))}catch(h){u(h)}},s=f=>f.done?i(f.value):Promise.resolve(f.value).then(l,g);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=Ge(we);function Oe(e){let t=i=>{if(i===null)n.write8(0);else if(typeof i=="boolean")n.write8(1),n.write8(+i);else if(typeof i=="number")n.write8(2),n.write32(i|0);else if(typeof i=="string")n.write8(3),n.write(Z(i));else if(i instanceof Uint8Array)n.write8(4),n.write(i);else if(i instanceof Array){n.write8(5),n.write32(i.length);for(let u of i)t(u)}else{let u=Object.keys(i);n.write8(6),n.write32(u.length);for(let l of u)n.write(Z(l)),t(i[l])}},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 g=n.read32(),s=[];for(let f=0;f<g;f++)s.push(t());return s}case 6:{let g=n.read32(),s={};for(let f=0;f<g;f++)s[ie(n.read())]=t();return s}default:throw new Error("Invalid packet")}},n=new pe(e),i=n.read32(),u=(i&1)===0;i>>>=1;let l=t();if(n.ptr!==e.length)throw new Error("Invalid packet");return{id:i,isRequest:u,value:l}}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),i=this._read(n.length);return n.set(this.buf.subarray(i,i+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:i}=e;return Buffer.from(t,n,i).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

@@ -7,5 +7,5 @@ This indicates that your JavaScript environment is broken. You cannot use

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 J=JSON.stringify,$e="warning",Ce="silent";function Me(e){if(Y(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",Pe=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",De=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,i){let u=e[n];if(t[n+""]=!0,u===void 0)return;let l=i(u);if(l!==null)throw new Error(`${J(n)} must be ${l}`);return u}function K(e,t,n){for(let i in e)if(!(i in t))throw new Error(`Invalid option ${n}: ${J(i)}`)}function Be(e){let t=Object.create(null),n=r(e,t,"wasmURL",tt),i=r(e,t,"wasmModule",Xe),u=r(e,t,"worker",I);return K(e,t,"in initialize() call"),{wasmURL:n,wasmModule:i,worker:u}}function Ue(e){let t;if(e!==void 0){t=Object.create(null);for(let n in e){let i=e[n];if(typeof i=="string"||i===!1)t[n]=i;else throw new Error(`Expected ${J(n)} in mangle cache to map to either a string or false`)}}return t}function be(e,t,n,i,u){let l=r(t,n,"color",I),g=r(t,n,"logLevel",y),s=r(t,n,"logLimit",se);l!==void 0?e.push(`--color=${l}`):i&&e.push("--color=true"),e.push(`--log-level=${g||u}`),e.push(`--log-limit=${s||0}`)}function Y(e,t,n){if(typeof e!="string")throw new Error(`Expected value for ${t}${n!==void 0?" "+J(n):""} to be a string, got ${typeof e} instead`);return e}function je(e,t,n){let i=r(t,n,"legalComments",y),u=r(t,n,"sourceRoot",y),l=r(t,n,"sourcesContent",I),g=r(t,n,"target",et),s=r(t,n,"format",y),f=r(t,n,"globalName",y),h=r(t,n,"mangleProps",he),w=r(t,n,"reserveProps",he),T=r(t,n,"mangleQuoted",I),L=r(t,n,"minify",I),B=r(t,n,"minifySyntax",I),q=r(t,n,"minifyWhitespace",I),Q=r(t,n,"minifyIdentifiers",I),U=r(t,n,"lineLimit",se),z=r(t,n,"drop",W),_=r(t,n,"dropLabels",W),v=r(t,n,"charset",y),m=r(t,n,"treeShaking",I),d=r(t,n,"ignoreAnnotations",I),o=r(t,n,"jsx",y),x=r(t,n,"jsxFactory",y),E=r(t,n,"jsxFragment",y),C=r(t,n,"jsxImportSource",y),P=r(t,n,"jsxDev",I),a=r(t,n,"jsxSideEffects",I),c=r(t,n,"define",ee),b=r(t,n,"logOverride",ee),S=r(t,n,"supported",ee),A=r(t,n,"pure",W),k=r(t,n,"keepNames",I),O=r(t,n,"platform",y),M=r(t,n,"tsconfigRaw",Ze);if(i&&e.push(`--legal-comments=${i}`),u!==void 0&&e.push(`--source-root=${u}`),l!==void 0&&e.push(`--sources-content=${l}`),g&&(Array.isArray(g)?e.push(`--target=${Array.from(g).map(Me).join(",")}`):e.push(`--target=${Me(g)}`)),s&&e.push(`--format=${s}`),f&&e.push(`--global-name=${f}`),O&&e.push(`--platform=${O}`),M&&e.push(`--tsconfig-raw=${typeof M=="string"?M:JSON.stringify(M)}`),L&&e.push("--minify"),B&&e.push("--minify-syntax"),q&&e.push("--minify-whitespace"),Q&&e.push("--minify-identifiers"),U&&e.push(`--line-limit=${U}`),v&&e.push(`--charset=${v}`),m!==void 0&&e.push(`--tree-shaking=${m}`),d&&e.push("--ignore-annotations"),z)for(let R of z)e.push(`--drop:${Y(R,"drop")}`);if(_&&e.push(`--drop-labels=${Array.from(_).map(R=>Y(R,"dropLabels")).join(",")}`),h&&e.push(`--mangle-props=${h.source}`),w&&e.push(`--reserve-props=${w.source}`),T!==void 0&&e.push(`--mangle-quoted=${T}`),o&&e.push(`--jsx=${o}`),x&&e.push(`--jsx-factory=${x}`),E&&e.push(`--jsx-fragment=${E}`),C&&e.push(`--jsx-import-source=${C}`),P&&e.push("--jsx-dev"),a&&e.push("--jsx-side-effects"),c)for(let R in c){if(R.indexOf("=")>=0)throw new Error(`Invalid define: ${R}`);e.push(`--define:${R}=${Y(c[R],"define",R)}`)}if(b)for(let R in b){if(R.indexOf("=")>=0)throw new Error(`Invalid log override: ${R}`);e.push(`--log-override:${R}=${Y(b[R],"log override",R)}`)}if(S)for(let R in S){if(R.indexOf("=")>=0)throw new Error(`Invalid supported: ${R}`);let $=S[R];if(typeof $!="boolean")throw new Error(`Expected value for supported ${J(R)} to be a boolean, got ${typeof $} instead`);e.push(`--supported:${R}=${$}`)}if(A)for(let R of A)e.push(`--pure:${Y(R,"pure")}`);k&&e.push("--keep-names")}function nt(e,t,n,i,u){var oe;let l=[],g=[],s=Object.create(null),f=null,h=null;be(l,t,s,n,i),je(l,t,s);let w=r(t,s,"sourcemap",De),T=r(t,s,"bundle",I),L=r(t,s,"splitting",I),B=r(t,s,"preserveSymlinks",I),q=r(t,s,"metafile",I),Q=r(t,s,"outfile",y),U=r(t,s,"outdir",y),z=r(t,s,"outbase",y),_=r(t,s,"tsconfig",y),v=r(t,s,"resolveExtensions",W),m=r(t,s,"nodePaths",W),d=r(t,s,"mainFields",W),o=r(t,s,"conditions",W),x=r(t,s,"external",W),E=r(t,s,"packages",y),C=r(t,s,"alias",ee),P=r(t,s,"loader",ee),a=r(t,s,"outExtension",ee),c=r(t,s,"publicPath",y),b=r(t,s,"entryNames",y),S=r(t,s,"chunkNames",y),A=r(t,s,"assetNames",y),k=r(t,s,"inject",W),O=r(t,s,"banner",ee),M=r(t,s,"footer",ee),R=r(t,s,"entryPoints",Ge),$=r(t,s,"absWorkingDir",y),D=r(t,s,"stdin",ee),F=(oe=r(t,s,"write",I))!=null?oe:u,j=r(t,s,"allowOverwrite",I),V=r(t,s,"mangleCache",ee);if(s.plugins=!0,K(t,s,`in ${e}() call`),w&&l.push(`--sourcemap${w===!0?"":`=${w}`}`),T&&l.push("--bundle"),j&&l.push("--allow-overwrite"),L&&l.push("--splitting"),B&&l.push("--preserve-symlinks"),q&&l.push("--metafile"),Q&&l.push(`--outfile=${Q}`),U&&l.push(`--outdir=${U}`),z&&l.push(`--outbase=${z}`),_&&l.push(`--tsconfig=${_}`),E&&l.push(`--packages=${E}`),v){let p=[];for(let N of v){if(Y(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);p.push(N)}l.push(`--resolve-extensions=${p.join(",")}`)}if(c&&l.push(`--public-path=${c}`),b&&l.push(`--entry-names=${b}`),S&&l.push(`--chunk-names=${S}`),A&&l.push(`--asset-names=${A}`),d){let p=[];for(let N of d){if(Y(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);p.push(N)}l.push(`--main-fields=${p.join(",")}`)}if(o){let p=[];for(let N of o){if(Y(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);p.push(N)}l.push(`--conditions=${p.join(",")}`)}if(x)for(let p of x)l.push(`--external:${Y(p,"external")}`);if(C)for(let p in C){if(p.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${p}`);l.push(`--alias:${p}=${Y(C[p],"alias",p)}`)}if(O)for(let p in O){if(p.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${p}`);l.push(`--banner:${p}=${Y(O[p],"banner",p)}`)}if(M)for(let p in M){if(p.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${p}`);l.push(`--footer:${p}=${Y(M[p],"footer",p)}`)}if(k)for(let p of k)l.push(`--inject:${Y(p,"inject")}`);if(P)for(let p in P){if(p.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${p}`);l.push(`--loader:${p}=${Y(P[p],"loader",p)}`)}if(a)for(let p in a){if(p.indexOf("=")>=0)throw new Error(`Invalid out extension: ${p}`);l.push(`--out-extension:${p}=${Y(a[p],"out extension",p)}`)}if(R)if(Array.isArray(R))for(let p=0,N=R.length;p<N;p++){let X=R[p];if(typeof X=="object"&&X!==null){let te=Object.create(null),G=r(X,te,"in",y),ce=r(X,te,"out",y);if(K(X,te,"in entry point at index "+p),G===void 0)throw new Error('Missing property "in" for entry point at index '+p);if(ce===void 0)throw new Error('Missing property "out" for entry point at index '+p);g.push([ce,G])}else g.push(["",Y(X,"entry point at index "+p)])}else for(let p in R)g.push([p,Y(R[p],"entry point",p)]);if(D){let p=Object.create(null),N=r(D,p,"contents",Te),X=r(D,p,"resolveDir",y),te=r(D,p,"sourcefile",y),G=r(D,p,"loader",y);K(D,p,'in "stdin" object'),te&&l.push(`--sourcefile=${te}`),G&&l.push(`--loader=${G}`),X&&(h=X),typeof N=="string"?f=Z(N):N instanceof Uint8Array&&(f=N)}let H=[];if(m)for(let p of m)p+="",H.push(p);return{entries:g,flags:l,write:F,stdinContents:f,stdinResolveDir:h,absWorkingDir:$,nodePaths:H,mangleCache:Ue(V)}}function rt(e,t,n,i){let u=[],l=Object.create(null);be(u,t,l,n,i),je(u,t,l);let g=r(t,l,"sourcemap",De),s=r(t,l,"sourcefile",y),f=r(t,l,"loader",y),h=r(t,l,"banner",y),w=r(t,l,"footer",y),T=r(t,l,"mangleCache",ee);return K(t,l,`in ${e}() call`),g&&u.push(`--sourcemap=${g===!0?"external":g}`),s&&u.push(`--sourcefile=${s}`),f&&u.push(`--loader=${f}`),h&&u.push(`--banner=${h}`),w&&u.push(`--footer=${w}`),{flags:u,mangleCache:Ue(T)}}function Le(e){let t={},n={didClose:!1,reason:""},i={},u=0,l=0,g=new Uint8Array(16*1024),s=0,f=v=>{let m=s+v.length;if(m>g.length){let o=new Uint8Array(m*2);o.set(g),g=o}g.set(v,s),s+=v.length;let d=0;for(;d+4<=s;){let o=Ee(g,d);if(d+4+o>s)break;d+=4,q(g.subarray(d,d+o)),d+=o}d>0&&(g.copyWithin(0,d,s),s-=d)},h=v=>{n.didClose=!0,v&&(n.reason=": "+(v.message||v));let m="The service was stopped"+n.reason;for(let d in i)i[d](m,null);i={}},w=(v,m,d)=>{if(n.didClose)return d("The service is no longer running"+n.reason,null);let o=u++;i[o]=(x,E)=>{try{d(x,E)}finally{v&&v.unref()}},v&&v.ref(),e.writeToStdin(Oe({id:o,isRequest:!0,value:m}))},T=(v,m)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);e.writeToStdin(Oe({id:v,isRequest:!1,value:m}))},L=(v,m)=>ne(this,null,function*(){try{if(m.command==="ping"){T(v,{});return}if(typeof m.key=="number"){let d=t[m.key];if(!d)return;let o=d[m.command];if(o){yield o(v,m);return}}throw new Error("Invalid command: "+m.command)}catch(d){let o=[le(d,e,null,void 0,"")];try{T(v,{errors:o})}catch(x){}}}),B=!0,q=v=>{if(B){B=!1;let d=String.fromCharCode(...v);if(d!=="0.19.9")throw new Error(`Cannot start service: Host version "0.19.9" does not match binary version ${J(d)}`);return}let m=ke(v);if(m.isRequest)L(m.id,m.value);else{let d=i[m.id];delete i[m.id],m.value.error?d(m.value.error,{}):d(null,m.value)}};return{readFromStdout:f,afterClose:h,service:{buildOrContext:({callName:v,refs:m,options:d,isTTY:o,defaultWD:x,callback:E})=>{let C=0,P=l++,a={},c={ref(){++C===1&&m&&m.ref()},unref(){--C===0&&(delete t[P],m&&m.unref())}};t[P]=a,c.ref(),it(v,P,w,T,c,e,a,d,o,x,(b,S)=>{try{E(b,S)}finally{c.unref()}})},transform:({callName:v,refs:m,input:d,options:o,isTTY:x,fs:E,callback:C})=>{let P=qe(),a=c=>{try{if(typeof d!="string"&&!(d instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:b,mangleCache:S}=rt(v,o,x,Ce),A={command:"transform",flags:b,inputFS:c!==null,input:c!==null?Z(c):typeof d=="string"?Z(d):d};S&&(A.mangleCache=S),w(m,A,(k,O)=>{if(k)return C(new Error(k),null);let M=ae(O.errors,P),R=ae(O.warnings,P),$=1,D=()=>{if(--$===0){let F={warnings:R,code:O.code,map:O.map,mangleCache:void 0,legalComments:void 0};"legalComments"in O&&(F.legalComments=O==null?void 0:O.legalComments),O.mangleCache&&(F.mangleCache=O==null?void 0:O.mangleCache),C(null,F)}};if(M.length>0)return C(fe("Transform failed",M,R),null);O.codeFS&&($++,E.readFile(O.code,(F,j)=>{F!==null?C(F,null):(O.code=j,D())})),O.mapFS&&($++,E.readFile(O.map,(F,j)=>{F!==null?C(F,null):(O.map=j,D())})),D()})}catch(b){let S=[];try{be(S,o,{},x,Ce)}catch(k){}let A=le(b,e,P,void 0,"");w(m,{command:"error",flags:S,error:A},()=>{A.detail=P.load(A.detail),C(fe("Transform failed",[A],[]),null)})}};if((typeof d=="string"||d instanceof Uint8Array)&&d.length>1024*1024){let c=a;a=()=>E.writeFile(d,c)}a(null)},formatMessages:({callName:v,refs:m,messages:d,options:o,callback:x})=>{if(!o)throw new Error(`Missing second argument in ${v}() call`);let E={},C=r(o,E,"kind",y),P=r(o,E,"color",I),a=r(o,E,"terminalWidth",se);if(K(o,E,`in ${v}() call`),C===void 0)throw new Error(`Missing "kind" in ${v}() call`);if(C!=="error"&&C!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${v}() call`);let c={command:"format-msgs",messages:re(d,"messages",null,"",a),isWarning:C==="warning"};P!==void 0&&(c.color=P),a!==void 0&&(c.terminalWidth=a),w(m,c,(b,S)=>{if(b)return x(new Error(b),null);x(null,S.messages)})},analyzeMetafile:({callName:v,refs:m,metafile:d,options:o,callback:x})=>{o===void 0&&(o={});let E={},C=r(o,E,"color",I),P=r(o,E,"verbose",I);K(o,E,`in ${v}() call`);let a={command:"analyze-metafile",metafile:d};C!==void 0&&(a.color=C),P!==void 0&&(a.verbose=P),w(m,a,(c,b)=>{if(c)return x(new Error(c),null);x(null,b.result)})}}}}function it(e,t,n,i,u,l,g,s,f,h,w){let T=qe(),L=e==="context",B=(U,z)=>{let _=[];try{be(_,s,{},f,$e)}catch(m){}let v=le(U,l,T,void 0,z);n(u,{command:"error",flags:_,error:v},()=>{v.detail=T.load(v.detail),w(fe(L?"Context failed":"Build failed",[v],[]),null)})},q;if(typeof s=="object"){let U=s.plugins;if(U!==void 0){if(!Array.isArray(U))return B(new Error('"plugins" must be an array'),"");q=U}}if(q&&q.length>0){if(l.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");lt(t,n,i,u,l,g,s,q,T).then(U=>{if(!U.ok)return B(U.error,U.pluginName);try{Q(U.requestPlugins,U.runOnEndCallbacks,U.scheduleOnDisposeCallbacks)}catch(z){B(z,"")}},U=>B(U,""));return}try{Q(null,(U,z)=>z([],[]),()=>{})}catch(U){B(U,"")}function Q(U,z,_){let v=l.hasFS,{entries:m,flags:d,write:o,stdinContents:x,stdinResolveDir:E,absWorkingDir:C,nodePaths:P,mangleCache:a}=nt(e,s,f,$e,v);if(o&&!l.hasFS)throw new Error('The "write" option is unavailable in this environment');let c={command:"build",key:t,entries:m,flags:d,write:o,stdinContents:x,stdinResolveDir:E,absWorkingDir:C||h,nodePaths:P,context:L};U&&(c.plugins=U),a&&(c.mangleCache=a);let b=(k,O)=>{let M={errors:ae(k.errors,T),warnings:ae(k.warnings,T),outputFiles:void 0,metafile:void 0,mangleCache:void 0},R=M.errors.slice(),$=M.warnings.slice();k.outputFiles&&(M.outputFiles=k.outputFiles.map(st)),k.metafile&&(M.metafile=JSON.parse(k.metafile)),k.mangleCache&&(M.mangleCache=k.mangleCache),k.writeToStdout!==void 0&&console.log(ie(k.writeToStdout).replace(/\n$/,"")),z(M,(D,F)=>{if(R.length>0||D.length>0){let j=fe("Build failed",R.concat(D),$.concat(F));return O(j,null,D,F)}O(null,M,D,F)})},S,A;L&&(g["on-end"]=(k,O)=>new Promise(M=>{b(O,(R,$,D,F)=>{let j={errors:D,warnings:F};A&&A(R,$),S=void 0,A=void 0,i(k,j),M()})})),n(u,c,(k,O)=>{if(k)return w(new Error(k),null);if(!L)return b(O,($,D)=>(_(),w($,D)));if(O.errors.length>0)return w(fe("Context failed",O.errors,O.warnings),null);let M=!1,R={rebuild:()=>(S||(S=new Promise(($,D)=>{let F;A=(V,H)=>{F||(F=()=>V?D(V):$(H))};let j=()=>{n(u,{command:"rebuild",key:t},(H,oe)=>{H?D(new Error(H)):F?F():j()})};j()})),S),watch:($={})=>new Promise((D,F)=>{if(!l.hasFS)throw new Error('Cannot use the "watch" API in this environment');K($,{},"in watch() call"),n(u,{command:"watch",key:t},H=>{H?F(new Error(H)):D(void 0)})}),serve:($={})=>new Promise((D,F)=>{if(!l.hasFS)throw new Error('Cannot use the "serve" API in this environment');let j={},V=r($,j,"port",se),H=r($,j,"host",y),oe=r($,j,"servedir",y),p=r($,j,"keyfile",y),N=r($,j,"certfile",y),X=r($,j,"fallback",y),te=r($,j,"onRequest",Pe);K($,j,"in serve() call");let G={command:"serve",key:t,onRequest:!!te};V!==void 0&&(G.port=V),H!==void 0&&(G.host=H),oe!==void 0&&(G.servedir=oe),p!==void 0&&(G.keyfile=p),N!==void 0&&(G.certfile=N),X!==void 0&&(G.fallback=X),n(u,G,(ce,Ie)=>{if(ce)return F(new Error(ce));te&&(g["serve-request"]=(We,ze)=>{te(ze.args),i(We,{})}),D(Ie)})}),cancel:()=>new Promise($=>{if(M)return $();n(u,{command:"cancel",key:t},()=>{$()})}),dispose:()=>new Promise($=>{if(M)return $();M=!0,n(u,{command:"dispose",key:t},()=>{$(),_(),u.unref()})})};u.ref(),w(null,R)})}}var lt=(e,t,n,i,u,l,g,s,f)=>ne(void 0,null,function*(){let h=[],w=[],T={},L={},B=[],q=0,Q=0,U=[],z=!1;s=[...s];for(let m of s){let d={};if(typeof m!="object")throw new Error(`Plugin at index ${Q} must be an object`);let o=r(m,d,"name",y);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${Q} is missing a name`);try{let x=r(m,d,"setup",Pe);if(typeof x!="function")throw new Error("Plugin is missing a setup function");K(m,d,`on plugin ${J(o)}`);let E={name:o,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};Q++;let P=x({initialOptions:g,resolve:(a,c={})=>{if(!z)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof a!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),S=r(c,b,"pluginName",y),A=r(c,b,"importer",y),k=r(c,b,"namespace",y),O=r(c,b,"resolveDir",y),M=r(c,b,"kind",y),R=r(c,b,"pluginData",ye);return K(c,b,"in resolve() call"),new Promise(($,D)=>{let F={command:"resolve",path:a,key:e,pluginName:o};if(S!=null&&(F.pluginName=S),A!=null&&(F.importer=A),k!=null&&(F.namespace=k),O!=null&&(F.resolveDir=O),M!=null)F.kind=M;else throw new Error('Must specify "kind" when calling "resolve"');R!=null&&(F.pluginData=f.store(R)),t(i,F,(j,V)=>{j!==null?D(new Error(j)):$({errors:ae(V.errors,f),warnings:ae(V.warnings,f),path:V.path,external:V.external,sideEffects:V.sideEffects,namespace:V.namespace,suffix:V.suffix,pluginData:f.load(V.pluginData)})})})},onStart(a){let c='This error came from the "onStart" callback registered here:',b=ge(new Error(c),u,"onStart");h.push({name:o,callback:a,note:b}),E.onStart=!0},onEnd(a){let c='This error came from the "onEnd" callback registered here:',b=ge(new Error(c),u,"onEnd");w.push({name:o,callback:a,note:b}),E.onEnd=!0},onResolve(a,c){let b='This error came from the "onResolve" callback registered here:',S=ge(new Error(b),u,"onResolve"),A={},k=r(a,A,"filter",he),O=r(a,A,"namespace",y);if(K(a,A,`in onResolve() call for plugin ${J(o)}`),k==null)throw new Error("onResolve() call is missing a filter");let M=q++;T[M]={name:o,callback:c,note:S},E.onResolve.push({id:M,filter:k.source,namespace:O||""})},onLoad(a,c){let b='This error came from the "onLoad" callback registered here:',S=ge(new Error(b),u,"onLoad"),A={},k=r(a,A,"filter",he),O=r(a,A,"namespace",y);if(K(a,A,`in onLoad() call for plugin ${J(o)}`),k==null)throw new Error("onLoad() call is missing a filter");let M=q++;L[M]={name:o,callback:c,note:S},E.onLoad.push({id:M,filter:k.source,namespace:O||""})},onDispose(a){B.push(a)},esbuild:u.esbuild});P&&(yield P),U.push(E)}catch(x){return{ok:!1,error:x,pluginName:o}}}l["on-start"]=(m,d)=>ne(void 0,null,function*(){let o={errors:[],warnings:[]};yield Promise.all(h.map(P=>ne(void 0,[P],function*({name:x,callback:E,note:C}){try{let a=yield E();if(a!=null){if(typeof a!="object")throw new Error(`Expected onStart() callback in plugin ${J(x)} to return an object`);let c={},b=r(a,c,"errors",W),S=r(a,c,"warnings",W);K(a,c,`from onStart() callback in plugin ${J(x)}`),b!=null&&o.errors.push(...re(b,"errors",f,x,void 0)),S!=null&&o.warnings.push(...re(S,"warnings",f,x,void 0))}}catch(a){o.errors.push(le(a,u,f,C&&C(),x))}}))),n(m,o)}),l["on-resolve"]=(m,d)=>ne(void 0,null,function*(){let o={},x="",E,C;for(let P of d.ids)try{({name:x,callback:E,note:C}=T[P]);let a=yield E({path:d.path,importer:d.importer,namespace:d.namespace,resolveDir:d.resolveDir,kind:d.kind,pluginData:f.load(d.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${J(x)} to return an object`);let c={},b=r(a,c,"pluginName",y),S=r(a,c,"path",y),A=r(a,c,"namespace",y),k=r(a,c,"suffix",y),O=r(a,c,"external",I),M=r(a,c,"sideEffects",I),R=r(a,c,"pluginData",ye),$=r(a,c,"errors",W),D=r(a,c,"warnings",W),F=r(a,c,"watchFiles",W),j=r(a,c,"watchDirs",W);K(a,c,`from onResolve() callback in plugin ${J(x)}`),o.id=P,b!=null&&(o.pluginName=b),S!=null&&(o.path=S),A!=null&&(o.namespace=A),k!=null&&(o.suffix=k),O!=null&&(o.external=O),M!=null&&(o.sideEffects=M),R!=null&&(o.pluginData=f.store(R)),$!=null&&(o.errors=re($,"errors",f,x,void 0)),D!=null&&(o.warnings=re(D,"warnings",f,x,void 0)),F!=null&&(o.watchFiles=me(F,"watchFiles")),j!=null&&(o.watchDirs=me(j,"watchDirs"));break}}catch(a){o={id:P,errors:[le(a,u,f,C&&C(),x)]};break}n(m,o)}),l["on-load"]=(m,d)=>ne(void 0,null,function*(){let o={},x="",E,C;for(let P of d.ids)try{({name:x,callback:E,note:C}=L[P]);let a=yield E({path:d.path,namespace:d.namespace,suffix:d.suffix,pluginData:f.load(d.pluginData),with:d.with});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${J(x)} to return an object`);let c={},b=r(a,c,"pluginName",y),S=r(a,c,"contents",Te),A=r(a,c,"resolveDir",y),k=r(a,c,"pluginData",ye),O=r(a,c,"loader",y),M=r(a,c,"errors",W),R=r(a,c,"warnings",W),$=r(a,c,"watchFiles",W),D=r(a,c,"watchDirs",W);K(a,c,`from onLoad() callback in plugin ${J(x)}`),o.id=P,b!=null&&(o.pluginName=b),S instanceof Uint8Array?o.contents=S:S!=null&&(o.contents=Z(S)),A!=null&&(o.resolveDir=A),k!=null&&(o.pluginData=f.store(k)),O!=null&&(o.loader=O),M!=null&&(o.errors=re(M,"errors",f,x,void 0)),R!=null&&(o.warnings=re(R,"warnings",f,x,void 0)),$!=null&&(o.watchFiles=me($,"watchFiles")),D!=null&&(o.watchDirs=me(D,"watchDirs"));break}}catch(a){o={id:P,errors:[le(a,u,f,C&&C(),x)]};break}n(m,o)});let _=(m,d)=>d([],[]);w.length>0&&(_=(m,d)=>{ne(void 0,null,function*(){let o=[],x=[];for(let{name:E,callback:C,note:P}of w){let a,c;try{let b=yield C(m);if(b!=null){if(typeof b!="object")throw new Error(`Expected onEnd() callback in plugin ${J(E)} to return an object`);let S={},A=r(b,S,"errors",W),k=r(b,S,"warnings",W);K(b,S,`from onEnd() callback in plugin ${J(E)}`),A!=null&&(a=re(A,"errors",f,E,void 0)),k!=null&&(c=re(k,"warnings",f,E,void 0))}}catch(b){a=[le(b,u,f,P&&P(),E)]}if(a){o.push(...a);try{m.errors.push(...a)}catch(b){}}if(c){x.push(...c);try{m.warnings.push(...c)}catch(b){}}}d(o,x)})});let v=()=>{for(let m of B)setTimeout(()=>m(),0)};return z=!0,{ok:!0,requestPlugins:U,runOnEndCallbacks:_,scheduleOnDisposeCallbacks:v}});function qe(){let e=new Map,t=0;return{load(n){return e.get(n)},store(n){if(n===void 0)return-1;let i=t++;return e.set(i,n),i}}}function ge(e,t,n){let i,u=!1;return()=>{if(u)return i;u=!0;try{let l=(e.stack+"").split(`
`);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 J=JSON.stringify,$e="warning",Me="silent";function Ce(e){if(Y(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",Te=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",He=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",Pe=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",De=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,i){let u=e[n];if(t[n+""]=!0,u===void 0)return;let l=i(u);if(l!==null)throw new Error(`${J(n)} must be ${l}`);return u}function K(e,t,n){for(let i in e)if(!(i in t))throw new Error(`Invalid option ${n}: ${J(i)}`)}function Be(e){let t=Object.create(null),n=r(e,t,"wasmURL",tt),i=r(e,t,"wasmModule",Xe),u=r(e,t,"worker",I);return K(e,t,"in initialize() call"),{wasmURL:n,wasmModule:i,worker:u}}function Ue(e){let t;if(e!==void 0){t=Object.create(null);for(let n in e){let i=e[n];if(typeof i=="string"||i===!1)t[n]=i;else throw new Error(`Expected ${J(n)} in mangle cache to map to either a string or false`)}}return t}function be(e,t,n,i,u){let l=r(t,n,"color",I),g=r(t,n,"logLevel",y),s=r(t,n,"logLimit",se);l!==void 0?e.push(`--color=${l}`):i&&e.push("--color=true"),e.push(`--log-level=${g||u}`),e.push(`--log-limit=${s||0}`)}function Y(e,t,n){if(typeof e!="string")throw new Error(`Expected value for ${t}${n!==void 0?" "+J(n):""} to be a string, got ${typeof e} instead`);return e}function je(e,t,n){let i=r(t,n,"legalComments",y),u=r(t,n,"sourceRoot",y),l=r(t,n,"sourcesContent",I),g=r(t,n,"target",et),s=r(t,n,"format",y),f=r(t,n,"globalName",y),h=r(t,n,"mangleProps",he),w=r(t,n,"reserveProps",he),M=r(t,n,"mangleQuoted",I),L=r(t,n,"minify",I),B=r(t,n,"minifySyntax",I),q=r(t,n,"minifyWhitespace",I),G=r(t,n,"minifyIdentifiers",I),U=r(t,n,"lineLimit",se),z=r(t,n,"drop",W),_=r(t,n,"dropLabels",W),v=r(t,n,"charset",y),m=r(t,n,"treeShaking",I),d=r(t,n,"ignoreAnnotations",I),o=r(t,n,"jsx",y),x=r(t,n,"jsxFactory",y),E=r(t,n,"jsxFragment",y),C=r(t,n,"jsxImportSource",y),P=r(t,n,"jsxDev",I),a=r(t,n,"jsxSideEffects",I),c=r(t,n,"define",ee),b=r(t,n,"logOverride",ee),S=r(t,n,"supported",ee),F=r(t,n,"pure",W),k=r(t,n,"keepNames",I),O=r(t,n,"platform",y),A=r(t,n,"tsconfigRaw",Ze);if(i&&e.push(`--legal-comments=${i}`),u!==void 0&&e.push(`--source-root=${u}`),l!==void 0&&e.push(`--sources-content=${l}`),g&&(Array.isArray(g)?e.push(`--target=${Array.from(g).map(Ce).join(",")}`):e.push(`--target=${Ce(g)}`)),s&&e.push(`--format=${s}`),f&&e.push(`--global-name=${f}`),O&&e.push(`--platform=${O}`),A&&e.push(`--tsconfig-raw=${typeof A=="string"?A:JSON.stringify(A)}`),L&&e.push("--minify"),B&&e.push("--minify-syntax"),q&&e.push("--minify-whitespace"),G&&e.push("--minify-identifiers"),U&&e.push(`--line-limit=${U}`),v&&e.push(`--charset=${v}`),m!==void 0&&e.push(`--tree-shaking=${m}`),d&&e.push("--ignore-annotations"),z)for(let R of z)e.push(`--drop:${Y(R,"drop")}`);if(_&&e.push(`--drop-labels=${Array.from(_).map(R=>Y(R,"dropLabels")).join(",")}`),h&&e.push(`--mangle-props=${h.source}`),w&&e.push(`--reserve-props=${w.source}`),M!==void 0&&e.push(`--mangle-quoted=${M}`),o&&e.push(`--jsx=${o}`),x&&e.push(`--jsx-factory=${x}`),E&&e.push(`--jsx-fragment=${E}`),C&&e.push(`--jsx-import-source=${C}`),P&&e.push("--jsx-dev"),a&&e.push("--jsx-side-effects"),c)for(let R in c){if(R.indexOf("=")>=0)throw new Error(`Invalid define: ${R}`);e.push(`--define:${R}=${Y(c[R],"define",R)}`)}if(b)for(let R in b){if(R.indexOf("=")>=0)throw new Error(`Invalid log override: ${R}`);e.push(`--log-override:${R}=${Y(b[R],"log override",R)}`)}if(S)for(let R in S){if(R.indexOf("=")>=0)throw new Error(`Invalid supported: ${R}`);let $=S[R];if(typeof $!="boolean")throw new Error(`Expected value for supported ${J(R)} to be a boolean, got ${typeof $} instead`);e.push(`--supported:${R}=${$}`)}if(F)for(let R of F)e.push(`--pure:${Y(R,"pure")}`);k&&e.push("--keep-names")}function nt(e,t,n,i,u){var oe;let l=[],g=[],s=Object.create(null),f=null,h=null;be(l,t,s,n,i),je(l,t,s);let w=r(t,s,"sourcemap",Pe),M=r(t,s,"bundle",I),L=r(t,s,"splitting",I),B=r(t,s,"preserveSymlinks",I),q=r(t,s,"metafile",I),G=r(t,s,"outfile",y),U=r(t,s,"outdir",y),z=r(t,s,"outbase",y),_=r(t,s,"tsconfig",y),v=r(t,s,"resolveExtensions",W),m=r(t,s,"nodePaths",W),d=r(t,s,"mainFields",W),o=r(t,s,"conditions",W),x=r(t,s,"external",W),E=r(t,s,"packages",y),C=r(t,s,"alias",ee),P=r(t,s,"loader",ee),a=r(t,s,"outExtension",ee),c=r(t,s,"publicPath",y),b=r(t,s,"entryNames",y),S=r(t,s,"chunkNames",y),F=r(t,s,"assetNames",y),k=r(t,s,"inject",W),O=r(t,s,"banner",ee),A=r(t,s,"footer",ee),R=r(t,s,"entryPoints",He),$=r(t,s,"absWorkingDir",y),D=r(t,s,"stdin",ee),T=(oe=r(t,s,"write",I))!=null?oe:u,j=r(t,s,"allowOverwrite",I),V=r(t,s,"mangleCache",ee);if(s.plugins=!0,K(t,s,`in ${e}() call`),w&&l.push(`--sourcemap${w===!0?"":`=${w}`}`),M&&l.push("--bundle"),j&&l.push("--allow-overwrite"),L&&l.push("--splitting"),B&&l.push("--preserve-symlinks"),q&&l.push("--metafile"),G&&l.push(`--outfile=${G}`),U&&l.push(`--outdir=${U}`),z&&l.push(`--outbase=${z}`),_&&l.push(`--tsconfig=${_}`),E&&l.push(`--packages=${E}`),v){let p=[];for(let N of v){if(Y(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);p.push(N)}l.push(`--resolve-extensions=${p.join(",")}`)}if(c&&l.push(`--public-path=${c}`),b&&l.push(`--entry-names=${b}`),S&&l.push(`--chunk-names=${S}`),F&&l.push(`--asset-names=${F}`),d){let p=[];for(let N of d){if(Y(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);p.push(N)}l.push(`--main-fields=${p.join(",")}`)}if(o){let p=[];for(let N of o){if(Y(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);p.push(N)}l.push(`--conditions=${p.join(",")}`)}if(x)for(let p of x)l.push(`--external:${Y(p,"external")}`);if(C)for(let p in C){if(p.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${p}`);l.push(`--alias:${p}=${Y(C[p],"alias",p)}`)}if(O)for(let p in O){if(p.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${p}`);l.push(`--banner:${p}=${Y(O[p],"banner",p)}`)}if(A)for(let p in A){if(p.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${p}`);l.push(`--footer:${p}=${Y(A[p],"footer",p)}`)}if(k)for(let p of k)l.push(`--inject:${Y(p,"inject")}`);if(P)for(let p in P){if(p.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${p}`);l.push(`--loader:${p}=${Y(P[p],"loader",p)}`)}if(a)for(let p in a){if(p.indexOf("=")>=0)throw new Error(`Invalid out extension: ${p}`);l.push(`--out-extension:${p}=${Y(a[p],"out extension",p)}`)}if(R)if(Array.isArray(R))for(let p=0,N=R.length;p<N;p++){let X=R[p];if(typeof X=="object"&&X!==null){let te=Object.create(null),H=r(X,te,"in",y),ce=r(X,te,"out",y);if(K(X,te,"in entry point at index "+p),H===void 0)throw new Error('Missing property "in" for entry point at index '+p);if(ce===void 0)throw new Error('Missing property "out" for entry point at index '+p);g.push([ce,H])}else g.push(["",Y(X,"entry point at index "+p)])}else for(let p in R)g.push([p,Y(R[p],"entry point",p)]);if(D){let p=Object.create(null),N=r(D,p,"contents",De),X=r(D,p,"resolveDir",y),te=r(D,p,"sourcefile",y),H=r(D,p,"loader",y);K(D,p,'in "stdin" object'),te&&l.push(`--sourcefile=${te}`),H&&l.push(`--loader=${H}`),X&&(h=X),typeof N=="string"?f=Z(N):N instanceof Uint8Array&&(f=N)}let Q=[];if(m)for(let p of m)p+="",Q.push(p);return{entries:g,flags:l,write:T,stdinContents:f,stdinResolveDir:h,absWorkingDir:$,nodePaths:Q,mangleCache:Ue(V)}}function rt(e,t,n,i){let u=[],l=Object.create(null);be(u,t,l,n,i),je(u,t,l);let g=r(t,l,"sourcemap",Pe),s=r(t,l,"sourcefile",y),f=r(t,l,"loader",y),h=r(t,l,"banner",y),w=r(t,l,"footer",y),M=r(t,l,"mangleCache",ee);return K(t,l,`in ${e}() call`),g&&u.push(`--sourcemap=${g===!0?"external":g}`),s&&u.push(`--sourcefile=${s}`),f&&u.push(`--loader=${f}`),h&&u.push(`--banner=${h}`),w&&u.push(`--footer=${w}`),{flags:u,mangleCache:Ue(M)}}function Le(e){let t={},n={didClose:!1,reason:""},i={},u=0,l=0,g=new Uint8Array(16*1024),s=0,f=v=>{let m=s+v.length;if(m>g.length){let o=new Uint8Array(m*2);o.set(g),g=o}g.set(v,s),s+=v.length;let d=0;for(;d+4<=s;){let o=Ee(g,d);if(d+4+o>s)break;d+=4,q(g.subarray(d,d+o)),d+=o}d>0&&(g.copyWithin(0,d,s),s-=d)},h=v=>{n.didClose=!0,v&&(n.reason=": "+(v.message||v));let m="The service was stopped"+n.reason;for(let d in i)i[d](m,null);i={}},w=(v,m,d)=>{if(n.didClose)return d("The service is no longer running"+n.reason,null);let o=u++;i[o]=(x,E)=>{try{d(x,E)}finally{v&&v.unref()}},v&&v.ref(),e.writeToStdin(Oe({id:o,isRequest:!0,value:m}))},M=(v,m)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);e.writeToStdin(Oe({id:v,isRequest:!1,value:m}))},L=(v,m)=>ne(this,null,function*(){try{if(m.command==="ping"){M(v,{});return}if(typeof m.key=="number"){let d=t[m.key];if(!d)return;let o=d[m.command];if(o){yield o(v,m);return}}throw new Error("Invalid command: "+m.command)}catch(d){let o=[le(d,e,null,void 0,"")];try{M(v,{errors:o})}catch(x){}}}),B=!0,q=v=>{if(B){B=!1;let d=String.fromCharCode(...v);if(d!=="0.19.10")throw new Error(`Cannot start service: Host version "0.19.10" does not match binary version ${J(d)}`);return}let m=ke(v);if(m.isRequest)L(m.id,m.value);else{let d=i[m.id];delete i[m.id],m.value.error?d(m.value.error,{}):d(null,m.value)}};return{readFromStdout:f,afterClose:h,service:{buildOrContext:({callName:v,refs:m,options:d,isTTY:o,defaultWD:x,callback:E})=>{let C=0,P=l++,a={},c={ref(){++C===1&&m&&m.ref()},unref(){--C===0&&(delete t[P],m&&m.unref())}};t[P]=a,c.ref(),it(v,P,w,M,c,e,a,d,o,x,(b,S)=>{try{E(b,S)}finally{c.unref()}})},transform:({callName:v,refs:m,input:d,options:o,isTTY:x,fs:E,callback:C})=>{let P=qe(),a=c=>{try{if(typeof d!="string"&&!(d instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:b,mangleCache:S}=rt(v,o,x,Me),F={command:"transform",flags:b,inputFS:c!==null,input:c!==null?Z(c):typeof d=="string"?Z(d):d};S&&(F.mangleCache=S),w(m,F,(k,O)=>{if(k)return C(new Error(k),null);let A=ae(O.errors,P),R=ae(O.warnings,P),$=1,D=()=>{if(--$===0){let T={warnings:R,code:O.code,map:O.map,mangleCache:void 0,legalComments:void 0};"legalComments"in O&&(T.legalComments=O==null?void 0:O.legalComments),O.mangleCache&&(T.mangleCache=O==null?void 0:O.mangleCache),C(null,T)}};if(A.length>0)return C(fe("Transform failed",A,R),null);O.codeFS&&($++,E.readFile(O.code,(T,j)=>{T!==null?C(T,null):(O.code=j,D())})),O.mapFS&&($++,E.readFile(O.map,(T,j)=>{T!==null?C(T,null):(O.map=j,D())})),D()})}catch(b){let S=[];try{be(S,o,{},x,Me)}catch(k){}let F=le(b,e,P,void 0,"");w(m,{command:"error",flags:S,error:F},()=>{F.detail=P.load(F.detail),C(fe("Transform failed",[F],[]),null)})}};if((typeof d=="string"||d instanceof Uint8Array)&&d.length>1024*1024){let c=a;a=()=>E.writeFile(d,c)}a(null)},formatMessages:({callName:v,refs:m,messages:d,options:o,callback:x})=>{if(!o)throw new Error(`Missing second argument in ${v}() call`);let E={},C=r(o,E,"kind",y),P=r(o,E,"color",I),a=r(o,E,"terminalWidth",se);if(K(o,E,`in ${v}() call`),C===void 0)throw new Error(`Missing "kind" in ${v}() call`);if(C!=="error"&&C!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${v}() call`);let c={command:"format-msgs",messages:re(d,"messages",null,"",a),isWarning:C==="warning"};P!==void 0&&(c.color=P),a!==void 0&&(c.terminalWidth=a),w(m,c,(b,S)=>{if(b)return x(new Error(b),null);x(null,S.messages)})},analyzeMetafile:({callName:v,refs:m,metafile:d,options:o,callback:x})=>{o===void 0&&(o={});let E={},C=r(o,E,"color",I),P=r(o,E,"verbose",I);K(o,E,`in ${v}() call`);let a={command:"analyze-metafile",metafile:d};C!==void 0&&(a.color=C),P!==void 0&&(a.verbose=P),w(m,a,(c,b)=>{if(c)return x(new Error(c),null);x(null,b.result)})}}}}function it(e,t,n,i,u,l,g,s,f,h,w){let M=qe(),L=e==="context",B=(U,z)=>{let _=[];try{be(_,s,{},f,$e)}catch(m){}let v=le(U,l,M,void 0,z);n(u,{command:"error",flags:_,error:v},()=>{v.detail=M.load(v.detail),w(fe(L?"Context failed":"Build failed",[v],[]),null)})},q;if(typeof s=="object"){let U=s.plugins;if(U!==void 0){if(!Array.isArray(U))return B(new Error('"plugins" must be an array'),"");q=U}}if(q&&q.length>0){if(l.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");lt(t,n,i,u,l,g,s,q,M).then(U=>{if(!U.ok)return B(U.error,U.pluginName);try{G(U.requestPlugins,U.runOnEndCallbacks,U.scheduleOnDisposeCallbacks)}catch(z){B(z,"")}},U=>B(U,""));return}try{G(null,(U,z)=>z([],[]),()=>{})}catch(U){B(U,"")}function G(U,z,_){let v=l.hasFS,{entries:m,flags:d,write:o,stdinContents:x,stdinResolveDir:E,absWorkingDir:C,nodePaths:P,mangleCache:a}=nt(e,s,f,$e,v);if(o&&!l.hasFS)throw new Error('The "write" option is unavailable in this environment');let c={command:"build",key:t,entries:m,flags:d,write:o,stdinContents:x,stdinResolveDir:E,absWorkingDir:C||h,nodePaths:P,context:L};U&&(c.plugins=U),a&&(c.mangleCache=a);let b=(k,O)=>{let A={errors:ae(k.errors,M),warnings:ae(k.warnings,M),outputFiles:void 0,metafile:void 0,mangleCache:void 0},R=A.errors.slice(),$=A.warnings.slice();k.outputFiles&&(A.outputFiles=k.outputFiles.map(st)),k.metafile&&(A.metafile=JSON.parse(k.metafile)),k.mangleCache&&(A.mangleCache=k.mangleCache),k.writeToStdout!==void 0&&console.log(ie(k.writeToStdout).replace(/\n$/,"")),z(A,(D,T)=>{if(R.length>0||D.length>0){let j=fe("Build failed",R.concat(D),$.concat(T));return O(j,null,D,T)}O(null,A,D,T)})},S,F;L&&(g["on-end"]=(k,O)=>new Promise(A=>{b(O,(R,$,D,T)=>{let j={errors:D,warnings:T};F&&F(R,$),S=void 0,F=void 0,i(k,j),A()})})),n(u,c,(k,O)=>{if(k)return w(new Error(k),null);if(!L)return b(O,($,D)=>(_(),w($,D)));if(O.errors.length>0)return w(fe("Context failed",O.errors,O.warnings),null);let A=!1,R={rebuild:()=>(S||(S=new Promise(($,D)=>{let T;F=(V,Q)=>{T||(T=()=>V?D(V):$(Q))};let j=()=>{n(u,{command:"rebuild",key:t},(Q,oe)=>{Q?D(new Error(Q)):T?T():j()})};j()})),S),watch:($={})=>new Promise((D,T)=>{if(!l.hasFS)throw new Error('Cannot use the "watch" API in this environment');K($,{},"in watch() call"),n(u,{command:"watch",key:t},Q=>{Q?T(new Error(Q)):D(void 0)})}),serve:($={})=>new Promise((D,T)=>{if(!l.hasFS)throw new Error('Cannot use the "serve" API in this environment');let j={},V=r($,j,"port",se),Q=r($,j,"host",y),oe=r($,j,"servedir",y),p=r($,j,"keyfile",y),N=r($,j,"certfile",y),X=r($,j,"fallback",y),te=r($,j,"onRequest",Te);K($,j,"in serve() call");let H={command:"serve",key:t,onRequest:!!te};V!==void 0&&(H.port=V),Q!==void 0&&(H.host=Q),oe!==void 0&&(H.servedir=oe),p!==void 0&&(H.keyfile=p),N!==void 0&&(H.certfile=N),X!==void 0&&(H.fallback=X),n(u,H,(ce,Ie)=>{if(ce)return T(new Error(ce));te&&(g["serve-request"]=(We,ze)=>{te(ze.args),i(We,{})}),D(Ie)})}),cancel:()=>new Promise($=>{if(A)return $();n(u,{command:"cancel",key:t},()=>{$()})}),dispose:()=>new Promise($=>{if(A)return $();A=!0,n(u,{command:"dispose",key:t},()=>{$(),_(),u.unref()})})};u.ref(),w(null,R)})}}var lt=(e,t,n,i,u,l,g,s,f)=>ne(void 0,null,function*(){let h=[],w=[],M={},L={},B=[],q=0,G=0,U=[],z=!1;s=[...s];for(let m of s){let d={};if(typeof m!="object")throw new Error(`Plugin at index ${G} must be an object`);let o=r(m,d,"name",y);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${G} is missing a name`);try{let x=r(m,d,"setup",Te);if(typeof x!="function")throw new Error("Plugin is missing a setup function");K(m,d,`on plugin ${J(o)}`);let E={name:o,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};G++;let P=x({initialOptions:g,resolve:(a,c={})=>{if(!z)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof a!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),S=r(c,b,"pluginName",y),F=r(c,b,"importer",y),k=r(c,b,"namespace",y),O=r(c,b,"resolveDir",y),A=r(c,b,"kind",y),R=r(c,b,"pluginData",ye);return K(c,b,"in resolve() call"),new Promise(($,D)=>{let T={command:"resolve",path:a,key:e,pluginName:o};if(S!=null&&(T.pluginName=S),F!=null&&(T.importer=F),k!=null&&(T.namespace=k),O!=null&&(T.resolveDir=O),A!=null)T.kind=A;else throw new Error('Must specify "kind" when calling "resolve"');R!=null&&(T.pluginData=f.store(R)),t(i,T,(j,V)=>{j!==null?D(new Error(j)):$({errors:ae(V.errors,f),warnings:ae(V.warnings,f),path:V.path,external:V.external,sideEffects:V.sideEffects,namespace:V.namespace,suffix:V.suffix,pluginData:f.load(V.pluginData)})})})},onStart(a){let c='This error came from the "onStart" callback registered here:',b=ge(new Error(c),u,"onStart");h.push({name:o,callback:a,note:b}),E.onStart=!0},onEnd(a){let c='This error came from the "onEnd" callback registered here:',b=ge(new Error(c),u,"onEnd");w.push({name:o,callback:a,note:b}),E.onEnd=!0},onResolve(a,c){let b='This error came from the "onResolve" callback registered here:',S=ge(new Error(b),u,"onResolve"),F={},k=r(a,F,"filter",he),O=r(a,F,"namespace",y);if(K(a,F,`in onResolve() call for plugin ${J(o)}`),k==null)throw new Error("onResolve() call is missing a filter");let A=q++;M[A]={name:o,callback:c,note:S},E.onResolve.push({id:A,filter:k.source,namespace:O||""})},onLoad(a,c){let b='This error came from the "onLoad" callback registered here:',S=ge(new Error(b),u,"onLoad"),F={},k=r(a,F,"filter",he),O=r(a,F,"namespace",y);if(K(a,F,`in onLoad() call for plugin ${J(o)}`),k==null)throw new Error("onLoad() call is missing a filter");let A=q++;L[A]={name:o,callback:c,note:S},E.onLoad.push({id:A,filter:k.source,namespace:O||""})},onDispose(a){B.push(a)},esbuild:u.esbuild});P&&(yield P),U.push(E)}catch(x){return{ok:!1,error:x,pluginName:o}}}l["on-start"]=(m,d)=>ne(void 0,null,function*(){let o={errors:[],warnings:[]};yield Promise.all(h.map(P=>ne(void 0,[P],function*({name:x,callback:E,note:C}){try{let a=yield E();if(a!=null){if(typeof a!="object")throw new Error(`Expected onStart() callback in plugin ${J(x)} to return an object`);let c={},b=r(a,c,"errors",W),S=r(a,c,"warnings",W);K(a,c,`from onStart() callback in plugin ${J(x)}`),b!=null&&o.errors.push(...re(b,"errors",f,x,void 0)),S!=null&&o.warnings.push(...re(S,"warnings",f,x,void 0))}}catch(a){o.errors.push(le(a,u,f,C&&C(),x))}}))),n(m,o)}),l["on-resolve"]=(m,d)=>ne(void 0,null,function*(){let o={},x="",E,C;for(let P of d.ids)try{({name:x,callback:E,note:C}=M[P]);let a=yield E({path:d.path,importer:d.importer,namespace:d.namespace,resolveDir:d.resolveDir,kind:d.kind,pluginData:f.load(d.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${J(x)} to return an object`);let c={},b=r(a,c,"pluginName",y),S=r(a,c,"path",y),F=r(a,c,"namespace",y),k=r(a,c,"suffix",y),O=r(a,c,"external",I),A=r(a,c,"sideEffects",I),R=r(a,c,"pluginData",ye),$=r(a,c,"errors",W),D=r(a,c,"warnings",W),T=r(a,c,"watchFiles",W),j=r(a,c,"watchDirs",W);K(a,c,`from onResolve() callback in plugin ${J(x)}`),o.id=P,b!=null&&(o.pluginName=b),S!=null&&(o.path=S),F!=null&&(o.namespace=F),k!=null&&(o.suffix=k),O!=null&&(o.external=O),A!=null&&(o.sideEffects=A),R!=null&&(o.pluginData=f.store(R)),$!=null&&(o.errors=re($,"errors",f,x,void 0)),D!=null&&(o.warnings=re(D,"warnings",f,x,void 0)),T!=null&&(o.watchFiles=me(T,"watchFiles")),j!=null&&(o.watchDirs=me(j,"watchDirs"));break}}catch(a){o={id:P,errors:[le(a,u,f,C&&C(),x)]};break}n(m,o)}),l["on-load"]=(m,d)=>ne(void 0,null,function*(){let o={},x="",E,C;for(let P of d.ids)try{({name:x,callback:E,note:C}=L[P]);let a=yield E({path:d.path,namespace:d.namespace,suffix:d.suffix,pluginData:f.load(d.pluginData),with:d.with});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${J(x)} to return an object`);let c={},b=r(a,c,"pluginName",y),S=r(a,c,"contents",De),F=r(a,c,"resolveDir",y),k=r(a,c,"pluginData",ye),O=r(a,c,"loader",y),A=r(a,c,"errors",W),R=r(a,c,"warnings",W),$=r(a,c,"watchFiles",W),D=r(a,c,"watchDirs",W);K(a,c,`from onLoad() callback in plugin ${J(x)}`),o.id=P,b!=null&&(o.pluginName=b),S instanceof Uint8Array?o.contents=S:S!=null&&(o.contents=Z(S)),F!=null&&(o.resolveDir=F),k!=null&&(o.pluginData=f.store(k)),O!=null&&(o.loader=O),A!=null&&(o.errors=re(A,"errors",f,x,void 0)),R!=null&&(o.warnings=re(R,"warnings",f,x,void 0)),$!=null&&(o.watchFiles=me($,"watchFiles")),D!=null&&(o.watchDirs=me(D,"watchDirs"));break}}catch(a){o={id:P,errors:[le(a,u,f,C&&C(),x)]};break}n(m,o)});let _=(m,d)=>d([],[]);w.length>0&&(_=(m,d)=>{ne(void 0,null,function*(){let o=[],x=[];for(let{name:E,callback:C,note:P}of w){let a,c;try{let b=yield C(m);if(b!=null){if(typeof b!="object")throw new Error(`Expected onEnd() callback in plugin ${J(E)} to return an object`);let S={},F=r(b,S,"errors",W),k=r(b,S,"warnings",W);K(b,S,`from onEnd() callback in plugin ${J(E)}`),F!=null&&(a=re(F,"errors",f,E,void 0)),k!=null&&(c=re(k,"warnings",f,E,void 0))}}catch(b){a=[le(b,u,f,P&&P(),E)]}if(a){o.push(...a);try{m.errors.push(...a)}catch(b){}}if(c){x.push(...c);try{m.warnings.push(...c)}catch(b){}}}d(o,x)})});let v=()=>{for(let m of B)setTimeout(()=>m(),0)};return z=!0,{ok:!0,requestPlugins:U,runOnEndCallbacks:_,scheduleOnDisposeCallbacks:v}});function qe(){let e=new Map,t=0;return{load(n){return e.get(n)},store(n){if(n===void 0)return-1;let i=t++;return e.set(i,n),i}}}function ge(e,t,n){let i,u=!1;return()=>{if(u)return i;u=!0;try{let l=(e.stack+"").split(`
`);l.splice(1,1);let g=Ne(t,l,n);if(g)return i={text:e.message,location:g},i}catch(l){}}}function le(e,t,n,i,u){let l="Internal error",g=null;try{l=(e&&e.message||e)+""}catch(s){}try{g=Ne(t,(e.stack+"").split(`
`),"")}catch(s){}return{id:"",pluginName:u,text:l,location:g,notes:i?[i]:[],detail:n?n.store(e):-1}}function Ne(e,t,n){let i=" at ";if(e.readFileSync&&!t[0].startsWith(i)&&t[1].startsWith(i))for(let u=1;u<t.length;u++){let l=t[u];if(l.startsWith(i))for(l=l.slice(i.length);;){let g=/^(?:new |async )?\S+ \((.*)\)$/.exec(l);if(g){l=g[1];continue}if(g=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(l),g){l=g[1];continue}if(g=/^(\S+):(\d+):(\d+)$/.exec(l),g){let s;try{s=e.readFileSync(g[1],"utf8")}catch(T){break}let f=s.split(/\r\n|\r|\n|\u2028|\u2029/)[+g[2]-1]||"",h=+g[3]-1,w=f.slice(h,h+n.length)===n?n.length:0;return{file:g[1],namespace:"file",line:+g[2],column:Z(f.slice(0,h)).length,length:Z(f.slice(h,h+w)).length,lineText:f+`
`),"")}catch(s){}return{id:"",pluginName:u,text:l,location:g,notes:i?[i]:[],detail:n?n.store(e):-1}}function Ne(e,t,n){let i=" at ";if(e.readFileSync&&!t[0].startsWith(i)&&t[1].startsWith(i))for(let u=1;u<t.length;u++){let l=t[u];if(l.startsWith(i))for(l=l.slice(i.length);;){let g=/^(?:new |async )?\S+ \((.*)\)$/.exec(l);if(g){l=g[1];continue}if(g=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(l),g){l=g[1];continue}if(g=/^(\S+):(\d+):(\d+)$/.exec(l),g){let s;try{s=e.readFileSync(g[1],"utf8")}catch(M){break}let f=s.split(/\r\n|\r|\n|\u2028|\u2029/)[+g[2]-1]||"",h=+g[3]-1,w=f.slice(h,h+n.length)===n?n.length:0;return{file:g[1],namespace:"file",line:+g[2],column:Z(f.slice(0,h)).length,length:Z(f.slice(h,h+w)).length,lineText:f+`
`+t.slice(1).join(`

@@ -15,10 +15,10 @@ `),suggestion:""}}break}}return null}function fe(e,t,n){let i=5;e+=t.length<1?"":` with ${t.length} error${t.length<2?"":"s"}:`+t.slice(0,i+1).map((l,g)=>{if(g===i)return`

error: ${l.text}`;let{file:s,line:f,column:h}=l.location,w=l.pluginName?`[plugin: ${l.pluginName}] `:"";return`
${s}:${f}:${h}: ERROR: ${w}${l.text}`}).join("");let u=new Error(e);for(let[l,g]of[["errors",t],["warnings",n]])Object.defineProperty(u,l,{configurable:!0,enumerable:!0,get:()=>g,set:s=>Object.defineProperty(u,l,{configurable:!0,enumerable:!0,value:s})});return u}function ae(e,t){for(let n of e)n.detail=t.load(n.detail);return e}function Fe(e,t,n){if(e==null)return null;let i={},u=r(e,i,"file",y),l=r(e,i,"namespace",y),g=r(e,i,"line",se),s=r(e,i,"column",se),f=r(e,i,"length",se),h=r(e,i,"lineText",y),w=r(e,i,"suggestion",y);if(K(e,i,t),h){let T=h.slice(0,(s&&s>0?s:0)+(f&&f>0?f:0)+(n&&n>0?n:80));!/[\x7F-\uFFFF]/.test(T)&&!/\n/.test(h)&&(h=T)}return{file:u||"",namespace:l||"",line:g||0,column:s||0,length:f||0,lineText:h||"",suggestion:w||""}}function re(e,t,n,i,u){let l=[],g=0;for(let s of e){let f={},h=r(s,f,"id",y),w=r(s,f,"pluginName",y),T=r(s,f,"text",y),L=r(s,f,"location",Ae),B=r(s,f,"notes",W),q=r(s,f,"detail",ye),Q=`in element ${g} of "${t}"`;K(s,f,Q);let U=[];if(B)for(let z of B){let _={},v=r(z,_,"text",y),m=r(z,_,"location",Ae);K(z,_,Q),U.push({text:v||"",location:Fe(m,Q,u)})}l.push({id:h||"",pluginName:w||i,text:T||"",location:Fe(L,Q,u),notes:U,detail:n?n.store(q):-1}),g++}return l}function me(e,t){let n=[];for(let i of e){if(typeof i!="string")throw new Error(`${J(t)} must be an array of strings`);n.push(i)}return n}function st({path:e,contents:t,hash:n}){let i=null;return{path:e,contents:t,hash:n,get text(){let u=this.contents;return(i===null||u!==t)&&(t=u,i=ie(u)),i}}}var at="0.19.9",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,i=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,i),ue.catch(()=>{ue=void 0}),ue},wt=(e,t,n)=>ne(void 0,null,function*(){let i;if(n){let h=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()},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=t=>{t!==0&&console.warn("exit code:",t)},this._exitPromise=new Promise(t=>{this._resolveExitPromise=t}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(t,e)=>{this.mem.setUint32(t+0,e,!0),this.mem.setUint32(t+4,Math.floor(e/4294967296),!0)},n=t=>{const e=this.mem.getUint32(t+0,!0),o=this.mem.getInt32(t+4,!0);return e+o*4294967296},s=t=>{const e=this.mem.getFloat64(t,!0);if(e===0)return;if(!isNaN(e))return e;const o=this.mem.getUint32(t,!0);return this._values[o]},i=(t,e)=>{if(typeof e=="number"&&e!==0){if(isNaN(e)){this.mem.setUint32(t+4,2146959360,!0),this.mem.setUint32(t,0,!0);return}this.mem.setFloat64(t,e,!0);return}if(e===void 0){this.mem.setFloat64(t,0,!0);return}let a=this._ids.get(e);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=e,this._goRefCounts[a]=0,this._ids.set(e,a)),this._goRefCounts[a]++;let d=0;switch(typeof e){case"object":e!==null&&(d=1);break;case"string":d=2;break;case"symbol":d=3;break;case"function":d=4;break}this.mem.setUint32(t+4,2146959360|d,!0),this.mem.setUint32(t,a,!0)},l=t=>{const e=n(t+0),o=n(t+8);return new Uint8Array(this._inst.exports.mem.buffer,e,o)},h=t=>{const e=n(t+0),o=n(t+8),a=new Array(o);for(let d=0;d<o;d++)a[d]=s(e+d*8);return a},u=t=>{const e=n(t+0),o=n(t+8);return m.decode(new DataView(this._inst.exports.mem.buffer,e,o))},g=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(e)},"runtime.wasmWrite":t=>{t>>>=0;const e=n(t+8),o=n(t+16),a=this.mem.getInt32(t+24,!0);globalThis.fs.writeSync(e,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":t=>{t>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{t>>>=0,c(t+8,(g+performance.now())*1e6)},"runtime.walltime":t=>{t>>>=0;const e=new Date().getTime();c(t+8,e/1e3),this.mem.setInt32(t+16,e%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":t=>{t>>>=0;const e=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(e,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(e);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(t+8)+1)),this.mem.setInt32(t+16,e,!0)},"runtime.clearTimeoutEvent":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);clearTimeout(this._scheduledTimeouts.get(e)),this._scheduledTimeouts.delete(e)},"runtime.getRandomData":t=>{t>>>=0,crypto.getRandomValues(l(t+8))},"syscall/js.finalizeRef":t=>{t>>>=0;const e=this.mem.getUint32(t+8,!0);if(this._goRefCounts[e]--,this._goRefCounts[e]===0){const o=this._values[e];this._values[e]=null,this._ids.delete(o),this._idPool.push(e)}},"syscall/js.stringVal":t=>{t>>>=0,i(t+24,u(t+8))},"syscall/js.valueGet":t=>{t>>>=0;const e=Reflect.get(s(t+8),u(t+16));t=this._inst.exports.getsp()>>>0,i(t+32,e)},"syscall/js.valueSet":t=>{t>>>=0,Reflect.set(s(t+8),u(t+16),s(t+32))},"syscall/js.valueDelete":t=>{t>>>=0,Reflect.deleteProperty(s(t+8),u(t+16))},"syscall/js.valueIndex":t=>{t>>>=0,i(t+24,Reflect.get(s(t+8),n(t+16)))},"syscall/js.valueSetIndex":t=>{t>>>=0,Reflect.set(s(t+8),n(t+16),s(t+24))},"syscall/js.valueCall":t=>{t>>>=0;try{const e=s(t+8),o=Reflect.get(e,u(t+16)),a=h(t+32),d=Reflect.apply(o,e,a);t=this._inst.exports.getsp()>>>0,i(t+56,d),this.mem.setUint8(t+64,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+56,e),this.mem.setUint8(t+64,0)}},"syscall/js.valueInvoke":t=>{t>>>=0;try{const e=s(t+8),o=h(t+16),a=Reflect.apply(e,void 0,o);t=this._inst.exports.getsp()>>>0,i(t+40,a),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueNew":t=>{t>>>=0;try{const e=s(t+8),o=h(t+16),a=Reflect.construct(e,o);t=this._inst.exports.getsp()>>>0,i(t+40,a),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueLength":t=>{t>>>=0,c(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":t=>{t>>>=0;const e=f.encode(String(s(t+8)));i(t+16,e),c(t+24,e.length)},"syscall/js.valueLoadString":t=>{t>>>=0;const e=s(t+8);l(t+16).set(e)},"syscall/js.valueInstanceOf":t=>{t>>>=0,this.mem.setUint8(t+24,s(t+8)instanceof s(t+16)?1:0)},"syscall/js.copyBytesToGo":t=>{t>>>=0;const e=l(t+8),o=s(t+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const a=o.subarray(0,e.length);e.set(a),c(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{t>>>=0;const e=s(t+8),o=l(t+16);if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const a=o.subarray(0,e.length);e.set(a),c(t+40,a.length),this.mem.setUint8(t+48,1)},debug:t=>{console.log(t)}}}}run(c){return y(this,null,function*(){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=t=>{const e=n,o=f.encode(t+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),e},i=this.argv.length,l=[];this.argv.forEach(t=>{l.push(s(t))}),l.push(0),Object.keys(this.env).sort().forEach(t=>{l.push(s(`${t}=${this.env[t]}`))}),l.push(0);const u=n;if(l.forEach(t=>{this.mem.setUint32(n,t,!0),this.mem.setUint32(n+4,0,!0),n+=8}),n>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,u),this.exited&&this._resolveExitPromise(),yield this._exitPromise})}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,m=globalThis.fs,c="";m.writeSync=(h,u)=>{if(h===1)postMessage(u);else if(h===2){c+=f.decode(u);let g=c.split(`\n`);g.length>1&&console.log(g.slice(0,-1).join(`\n`)),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,t,e,o)=>{if(h!==0||g!==0||t!==u.length||e!==null)throw new Error("Bad read");if(n.length===0){s=()=>m.read(h,u,g,t,e,o);return}let a=n[0],d=Math.max(0,Math.min(t,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.9"],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);})(postMessage)'],{type:"text/javascript"});i=new Worker(URL.createObjectURL(h))}else{let h=(postMessage=>{
${s}:${f}:${h}: ERROR: ${w}${l.text}`}).join("");let u=new Error(e);for(let[l,g]of[["errors",t],["warnings",n]])Object.defineProperty(u,l,{configurable:!0,enumerable:!0,get:()=>g,set:s=>Object.defineProperty(u,l,{configurable:!0,enumerable:!0,value:s})});return u}function ae(e,t){for(let n of e)n.detail=t.load(n.detail);return e}function Fe(e,t,n){if(e==null)return null;let i={},u=r(e,i,"file",y),l=r(e,i,"namespace",y),g=r(e,i,"line",se),s=r(e,i,"column",se),f=r(e,i,"length",se),h=r(e,i,"lineText",y),w=r(e,i,"suggestion",y);if(K(e,i,t),h){let M=h.slice(0,(s&&s>0?s:0)+(f&&f>0?f:0)+(n&&n>0?n:80));!/[\x7F-\uFFFF]/.test(M)&&!/\n/.test(h)&&(h=M)}return{file:u||"",namespace:l||"",line:g||0,column:s||0,length:f||0,lineText:h||"",suggestion:w||""}}function re(e,t,n,i,u){let l=[],g=0;for(let s of e){let f={},h=r(s,f,"id",y),w=r(s,f,"pluginName",y),M=r(s,f,"text",y),L=r(s,f,"location",Ae),B=r(s,f,"notes",W),q=r(s,f,"detail",ye),G=`in element ${g} of "${t}"`;K(s,f,G);let U=[];if(B)for(let z of B){let _={},v=r(z,_,"text",y),m=r(z,_,"location",Ae);K(z,_,G),U.push({text:v||"",location:Fe(m,G,u)})}l.push({id:h||"",pluginName:w||i,text:M||"",location:Fe(L,G,u),notes:U,detail:n?n.store(q):-1}),g++}return l}function me(e,t){let n=[];for(let i of e){if(typeof i!="string")throw new Error(`${J(t)} must be an array of strings`);n.push(i)}return n}function st({path:e,contents:t,hash:n}){let i=null;return{path:e,contents:t,hash:n,get text(){let u=this.contents;return(i===null||u!==t)&&(t=u,i=ie(u)),i}}}var at="0.19.10",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,i=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,i),ue.catch(()=>{ue=void 0}),ue},wt=(e,t,n)=>ne(void 0,null,function*(){let i;if(n){let h=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=u=>{try{l(m.next(u))}catch(h){n(h)}},i=u=>{try{l(m.throw(u))}catch(h){n(h)}},l=u=>u.done?c(u.value):Promise.resolve(u.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,u,h){if(i!==0||l!==s.length||u!==null){h(r());return}const g=this.writeSync(n,s);h(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,u,h){h(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=t=>{t!==0&&console.warn("exit code:",t)},this._exitPromise=new Promise(t=>{this._resolveExitPromise=t}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(t,e)=>{this.mem.setUint32(t+0,e,!0),this.mem.setUint32(t+4,Math.floor(e/4294967296),!0)},n=t=>{const e=this.mem.getUint32(t+0,!0),o=this.mem.getInt32(t+4,!0);return e+o*4294967296},s=t=>{const e=this.mem.getFloat64(t,!0);if(e===0)return;if(!isNaN(e))return e;const o=this.mem.getUint32(t,!0);return this._values[o]},i=(t,e)=>{if(typeof e=="number"&&e!==0){if(isNaN(e)){this.mem.setUint32(t+4,2146959360,!0),this.mem.setUint32(t,0,!0);return}this.mem.setFloat64(t,e,!0);return}if(e===void 0){this.mem.setFloat64(t,0,!0);return}let a=this._ids.get(e);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=e,this._goRefCounts[a]=0,this._ids.set(e,a)),this._goRefCounts[a]++;let d=0;switch(typeof e){case"object":e!==null&&(d=1);break;case"string":d=2;break;case"symbol":d=3;break;case"function":d=4;break}this.mem.setUint32(t+4,2146959360|d,!0),this.mem.setUint32(t,a,!0)},l=t=>{const e=n(t+0),o=n(t+8);return new Uint8Array(this._inst.exports.mem.buffer,e,o)},u=t=>{const e=n(t+0),o=n(t+8),a=new Array(o);for(let d=0;d<o;d++)a[d]=s(e+d*8);return a},h=t=>{const e=n(t+0),o=n(t+8);return m.decode(new DataView(this._inst.exports.mem.buffer,e,o))},g=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(e)},"runtime.wasmWrite":t=>{t>>>=0;const e=n(t+8),o=n(t+16),a=this.mem.getInt32(t+24,!0);globalThis.fs.writeSync(e,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":t=>{t>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{t>>>=0,c(t+8,(g+performance.now())*1e6)},"runtime.walltime":t=>{t>>>=0;const e=new Date().getTime();c(t+8,e/1e3),this.mem.setInt32(t+16,e%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":t=>{t>>>=0;const e=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(e,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(e);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(t+8)+1)),this.mem.setInt32(t+16,e,!0)},"runtime.clearTimeoutEvent":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);clearTimeout(this._scheduledTimeouts.get(e)),this._scheduledTimeouts.delete(e)},"runtime.getRandomData":t=>{t>>>=0,crypto.getRandomValues(l(t+8))},"syscall/js.finalizeRef":t=>{t>>>=0;const e=this.mem.getUint32(t+8,!0);if(this._goRefCounts[e]--,this._goRefCounts[e]===0){const o=this._values[e];this._values[e]=null,this._ids.delete(o),this._idPool.push(e)}},"syscall/js.stringVal":t=>{t>>>=0,i(t+24,h(t+8))},"syscall/js.valueGet":t=>{t>>>=0;const e=Reflect.get(s(t+8),h(t+16));t=this._inst.exports.getsp()>>>0,i(t+32,e)},"syscall/js.valueSet":t=>{t>>>=0,Reflect.set(s(t+8),h(t+16),s(t+32))},"syscall/js.valueDelete":t=>{t>>>=0,Reflect.deleteProperty(s(t+8),h(t+16))},"syscall/js.valueIndex":t=>{t>>>=0,i(t+24,Reflect.get(s(t+8),n(t+16)))},"syscall/js.valueSetIndex":t=>{t>>>=0,Reflect.set(s(t+8),n(t+16),s(t+24))},"syscall/js.valueCall":t=>{t>>>=0;try{const e=s(t+8),o=Reflect.get(e,h(t+16)),a=u(t+32),d=Reflect.apply(o,e,a);t=this._inst.exports.getsp()>>>0,i(t+56,d),this.mem.setUint8(t+64,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+56,e),this.mem.setUint8(t+64,0)}},"syscall/js.valueInvoke":t=>{t>>>=0;try{const e=s(t+8),o=u(t+16),a=Reflect.apply(e,void 0,o);t=this._inst.exports.getsp()>>>0,i(t+40,a),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueNew":t=>{t>>>=0;try{const e=s(t+8),o=u(t+16),a=Reflect.construct(e,o);t=this._inst.exports.getsp()>>>0,i(t+40,a),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueLength":t=>{t>>>=0,c(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":t=>{t>>>=0;const e=f.encode(String(s(t+8)));i(t+16,e),c(t+24,e.length)},"syscall/js.valueLoadString":t=>{t>>>=0;const e=s(t+8);l(t+16).set(e)},"syscall/js.valueInstanceOf":t=>{t>>>=0,this.mem.setUint8(t+24,s(t+8)instanceof s(t+16)?1:0)},"syscall/js.copyBytesToGo":t=>{t>>>=0;const e=l(t+8),o=s(t+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const a=o.subarray(0,e.length);e.set(a),c(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{t>>>=0;const e=s(t+8),o=l(t+16);if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const a=o.subarray(0,e.length);e.set(a),c(t+40,a.length),this.mem.setUint8(t+48,1)},debug:t=>{console.log(t)}}}}run(c){return y(this,null,function*(){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=t=>{const e=n,o=f.encode(t+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),e},i=this.argv.length,l=[];this.argv.forEach(t=>{l.push(s(t))}),l.push(0),Object.keys(this.env).sort().forEach(t=>{l.push(s(`${t}=${this.env[t]}`))}),l.push(0);const h=n;if(l.forEach(t=>{this.mem.setUint32(n,t,!0),this.mem.setUint32(n+4,0,!0),n+=8}),n>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,h),this.exited&&this._resolveExitPromise(),yield this._exitPromise})}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,m=globalThis.fs,c="";m.writeSync=(u,h)=>{if(u===1)postMessage(h);else if(u===2){c+=f.decode(h);let g=c.split(`\n`);g.length>1&&console.log(g.slice(0,-1).join(`\n`)),c=g[g.length-1]}else throw new Error("Bad write");return h.length};let n=[],s,i=0;onmessage=({data:u})=>(u.length>0&&(n.push(u),s&&s()),l),m.read=(u,h,g,t,e,o)=>{if(u!==0||g!==0||t!==h.length||e!==null)throw new Error("Bad read");if(n.length===0){s=()=>m.read(u,h,g,t,e,o);return}let a=n[0],d=Math.max(0,Math.min(t,a.length-i));h.set(a.subarray(i,i+d),g),i+=d,i===a.length&&(n.shift(),i=0),o(null,d)};let l=new globalThis.Go;return l.argv=["","--service=0.19.10"],tryToInstantiateModule(r,l).then(u=>{postMessage(null),l.run(u)},u=>{postMessage(u)}),l};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);})(postMessage)'],{type:"text/javascript"});i=new Worker(URL.createObjectURL(h))}else{let h=(postMessage=>{
// 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=t=>{t!==0&&console.warn("exit code:",t)},this._exitPromise=new Promise(t=>{this._resolveExitPromise=t}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(t,e)=>{this.mem.setUint32(t+0,e,!0),this.mem.setUint32(t+4,Math.floor(e/4294967296),!0)},n=t=>{const e=this.mem.getUint32(t+0,!0),o=this.mem.getInt32(t+4,!0);return e+o*4294967296},s=t=>{const e=this.mem.getFloat64(t,!0);if(e===0)return;if(!isNaN(e))return e;const o=this.mem.getUint32(t,!0);return this._values[o]},i=(t,e)=>{if(typeof e=="number"&&e!==0){if(isNaN(e)){this.mem.setUint32(t+4,2146959360,!0),this.mem.setUint32(t,0,!0);return}this.mem.setFloat64(t,e,!0);return}if(e===void 0){this.mem.setFloat64(t,0,!0);return}let a=this._ids.get(e);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=e,this._goRefCounts[a]=0,this._ids.set(e,a)),this._goRefCounts[a]++;let d=0;switch(typeof e){case"object":e!==null&&(d=1);break;case"string":d=2;break;case"symbol":d=3;break;case"function":d=4;break}this.mem.setUint32(t+4,2146959360|d,!0),this.mem.setUint32(t,a,!0)},l=t=>{const e=n(t+0),o=n(t+8);return new Uint8Array(this._inst.exports.mem.buffer,e,o)},h=t=>{const e=n(t+0),o=n(t+8),a=new Array(o);for(let d=0;d<o;d++)a[d]=s(e+d*8);return a},u=t=>{const e=n(t+0),o=n(t+8);return m.decode(new DataView(this._inst.exports.mem.buffer,e,o))},g=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(e)},"runtime.wasmWrite":t=>{t>>>=0;const e=n(t+8),o=n(t+16),a=this.mem.getInt32(t+24,!0);globalThis.fs.writeSync(e,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":t=>{t>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{t>>>=0,c(t+8,(g+performance.now())*1e6)},"runtime.walltime":t=>{t>>>=0;const e=new Date().getTime();c(t+8,e/1e3),this.mem.setInt32(t+16,e%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":t=>{t>>>=0;const e=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(e,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(e);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(t+8)+1)),this.mem.setInt32(t+16,e,!0)},"runtime.clearTimeoutEvent":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);clearTimeout(this._scheduledTimeouts.get(e)),this._scheduledTimeouts.delete(e)},"runtime.getRandomData":t=>{t>>>=0,crypto.getRandomValues(l(t+8))},"syscall/js.finalizeRef":t=>{t>>>=0;const e=this.mem.getUint32(t+8,!0);if(this._goRefCounts[e]--,this._goRefCounts[e]===0){const o=this._values[e];this._values[e]=null,this._ids.delete(o),this._idPool.push(e)}},"syscall/js.stringVal":t=>{t>>>=0,i(t+24,u(t+8))},"syscall/js.valueGet":t=>{t>>>=0;const e=Reflect.get(s(t+8),u(t+16));t=this._inst.exports.getsp()>>>0,i(t+32,e)},"syscall/js.valueSet":t=>{t>>>=0,Reflect.set(s(t+8),u(t+16),s(t+32))},"syscall/js.valueDelete":t=>{t>>>=0,Reflect.deleteProperty(s(t+8),u(t+16))},"syscall/js.valueIndex":t=>{t>>>=0,i(t+24,Reflect.get(s(t+8),n(t+16)))},"syscall/js.valueSetIndex":t=>{t>>>=0,Reflect.set(s(t+8),n(t+16),s(t+24))},"syscall/js.valueCall":t=>{t>>>=0;try{const e=s(t+8),o=Reflect.get(e,u(t+16)),a=h(t+32),d=Reflect.apply(o,e,a);t=this._inst.exports.getsp()>>>0,i(t+56,d),this.mem.setUint8(t+64,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+56,e),this.mem.setUint8(t+64,0)}},"syscall/js.valueInvoke":t=>{t>>>=0;try{const e=s(t+8),o=h(t+16),a=Reflect.apply(e,void 0,o);t=this._inst.exports.getsp()>>>0,i(t+40,a),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueNew":t=>{t>>>=0;try{const e=s(t+8),o=h(t+16),a=Reflect.construct(e,o);t=this._inst.exports.getsp()>>>0,i(t+40,a),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueLength":t=>{t>>>=0,c(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":t=>{t>>>=0;const e=f.encode(String(s(t+8)));i(t+16,e),c(t+24,e.length)},"syscall/js.valueLoadString":t=>{t>>>=0;const e=s(t+8);l(t+16).set(e)},"syscall/js.valueInstanceOf":t=>{t>>>=0,this.mem.setUint8(t+24,s(t+8)instanceof s(t+16)?1:0)},"syscall/js.copyBytesToGo":t=>{t>>>=0;const e=l(t+8),o=s(t+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const a=o.subarray(0,e.length);e.set(a),c(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{t>>>=0;const e=s(t+8),o=l(t+16);if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const a=o.subarray(0,e.length);e.set(a),c(t+40,a.length),this.mem.setUint8(t+48,1)},debug:t=>{console.log(t)}}}}run(c){return y(this,null,function*(){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=t=>{const e=n,o=f.encode(t+"\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),e},i=this.argv.length,l=[];this.argv.forEach(t=>{l.push(s(t))}),l.push(0),Object.keys(this.env).sort().forEach(t=>{l.push(s(`${t}=${this.env[t]}`))}),l.push(0);const u=n;if(l.forEach(t=>{this.mem.setUint32(n,t,!0),this.mem.setUint32(n+4,0,!0),n+=8}),n>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,u),this.exited&&this._resolveExitPromise(),yield this._exitPromise})}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,m=globalThis.fs,c="";m.writeSync=(h,u)=>{if(h===1)postMessage(u);else if(h===2){c+=f.decode(u);let g=c.split(`
var y=(r,f,m)=>new Promise((c,n)=>{var s=u=>{try{l(m.next(u))}catch(h){n(h)}},i=u=>{try{l(m.throw(u))}catch(h){n(h)}},l=u=>u.done?c(u.value):Promise.resolve(u.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,u,h){if(i!==0||l!==s.length||u!==null){h(r());return}const g=this.writeSync(n,s);h(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,u,h){h(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=t=>{t!==0&&console.warn("exit code:",t)},this._exitPromise=new Promise(t=>{this._resolveExitPromise=t}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(t,e)=>{this.mem.setUint32(t+0,e,!0),this.mem.setUint32(t+4,Math.floor(e/4294967296),!0)},n=t=>{const e=this.mem.getUint32(t+0,!0),o=this.mem.getInt32(t+4,!0);return e+o*4294967296},s=t=>{const e=this.mem.getFloat64(t,!0);if(e===0)return;if(!isNaN(e))return e;const o=this.mem.getUint32(t,!0);return this._values[o]},i=(t,e)=>{if(typeof e=="number"&&e!==0){if(isNaN(e)){this.mem.setUint32(t+4,2146959360,!0),this.mem.setUint32(t,0,!0);return}this.mem.setFloat64(t,e,!0);return}if(e===void 0){this.mem.setFloat64(t,0,!0);return}let a=this._ids.get(e);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=e,this._goRefCounts[a]=0,this._ids.set(e,a)),this._goRefCounts[a]++;let d=0;switch(typeof e){case"object":e!==null&&(d=1);break;case"string":d=2;break;case"symbol":d=3;break;case"function":d=4;break}this.mem.setUint32(t+4,2146959360|d,!0),this.mem.setUint32(t,a,!0)},l=t=>{const e=n(t+0),o=n(t+8);return new Uint8Array(this._inst.exports.mem.buffer,e,o)},u=t=>{const e=n(t+0),o=n(t+8),a=new Array(o);for(let d=0;d<o;d++)a[d]=s(e+d*8);return a},h=t=>{const e=n(t+0),o=n(t+8);return m.decode(new DataView(this._inst.exports.mem.buffer,e,o))},g=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(e)},"runtime.wasmWrite":t=>{t>>>=0;const e=n(t+8),o=n(t+16),a=this.mem.getInt32(t+24,!0);globalThis.fs.writeSync(e,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":t=>{t>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{t>>>=0,c(t+8,(g+performance.now())*1e6)},"runtime.walltime":t=>{t>>>=0;const e=new Date().getTime();c(t+8,e/1e3),this.mem.setInt32(t+16,e%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":t=>{t>>>=0;const e=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(e,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(e);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(t+8)+1)),this.mem.setInt32(t+16,e,!0)},"runtime.clearTimeoutEvent":t=>{t>>>=0;const e=this.mem.getInt32(t+8,!0);clearTimeout(this._scheduledTimeouts.get(e)),this._scheduledTimeouts.delete(e)},"runtime.getRandomData":t=>{t>>>=0,crypto.getRandomValues(l(t+8))},"syscall/js.finalizeRef":t=>{t>>>=0;const e=this.mem.getUint32(t+8,!0);if(this._goRefCounts[e]--,this._goRefCounts[e]===0){const o=this._values[e];this._values[e]=null,this._ids.delete(o),this._idPool.push(e)}},"syscall/js.stringVal":t=>{t>>>=0,i(t+24,h(t+8))},"syscall/js.valueGet":t=>{t>>>=0;const e=Reflect.get(s(t+8),h(t+16));t=this._inst.exports.getsp()>>>0,i(t+32,e)},"syscall/js.valueSet":t=>{t>>>=0,Reflect.set(s(t+8),h(t+16),s(t+32))},"syscall/js.valueDelete":t=>{t>>>=0,Reflect.deleteProperty(s(t+8),h(t+16))},"syscall/js.valueIndex":t=>{t>>>=0,i(t+24,Reflect.get(s(t+8),n(t+16)))},"syscall/js.valueSetIndex":t=>{t>>>=0,Reflect.set(s(t+8),n(t+16),s(t+24))},"syscall/js.valueCall":t=>{t>>>=0;try{const e=s(t+8),o=Reflect.get(e,h(t+16)),a=u(t+32),d=Reflect.apply(o,e,a);t=this._inst.exports.getsp()>>>0,i(t+56,d),this.mem.setUint8(t+64,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+56,e),this.mem.setUint8(t+64,0)}},"syscall/js.valueInvoke":t=>{t>>>=0;try{const e=s(t+8),o=u(t+16),a=Reflect.apply(e,void 0,o);t=this._inst.exports.getsp()>>>0,i(t+40,a),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueNew":t=>{t>>>=0;try{const e=s(t+8),o=u(t+16),a=Reflect.construct(e,o);t=this._inst.exports.getsp()>>>0,i(t+40,a),this.mem.setUint8(t+48,1)}catch(e){t=this._inst.exports.getsp()>>>0,i(t+40,e),this.mem.setUint8(t+48,0)}},"syscall/js.valueLength":t=>{t>>>=0,c(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":t=>{t>>>=0;const e=f.encode(String(s(t+8)));i(t+16,e),c(t+24,e.length)},"syscall/js.valueLoadString":t=>{t>>>=0;const e=s(t+8);l(t+16).set(e)},"syscall/js.valueInstanceOf":t=>{t>>>=0,this.mem.setUint8(t+24,s(t+8)instanceof s(t+16)?1:0)},"syscall/js.copyBytesToGo":t=>{t>>>=0;const e=l(t+8),o=s(t+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const a=o.subarray(0,e.length);e.set(a),c(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{t>>>=0;const e=s(t+8),o=l(t+16);if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray)){this.mem.setUint8(t+48,0);return}const a=o.subarray(0,e.length);e.set(a),c(t+40,a.length),this.mem.setUint8(t+48,1)},debug:t=>{console.log(t)}}}}run(c){return y(this,null,function*(){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=t=>{const e=n,o=f.encode(t+"\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),e},i=this.argv.length,l=[];this.argv.forEach(t=>{l.push(s(t))}),l.push(0),Object.keys(this.env).sort().forEach(t=>{l.push(s(`${t}=${this.env[t]}`))}),l.push(0);const h=n;if(l.forEach(t=>{this.mem.setUint32(n,t,!0),this.mem.setUint32(n+4,0,!0),n+=8}),n>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,h),this.exited&&this._resolveExitPromise(),yield this._exitPromise})}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,m=globalThis.fs,c="";m.writeSync=(u,h)=>{if(u===1)postMessage(h);else if(u===2){c+=f.decode(h);let g=c.split(`
`);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,t,e,o)=>{if(h!==0||g!==0||t!==u.length||e!==null)throw new Error("Bad read");if(n.length===0){s=()=>m.read(h,u,g,t,e,o);return}let a=n[0],d=Math.max(0,Math.min(t,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.9"],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=>i.onmessage({data:w}));i={onmessage:null,postMessage:w=>setTimeout(()=>h({data:w})),terminate(){}}}let u,l,g=new Promise((h,w)=>{u=h,l=w});i.onmessage=({data:h})=>{i.onmessage=({data:w})=>s(w),h?l(h):u()},i.postMessage(t||new URL(e,location.href).toString());let{readFromStdout:s,service:f}=Le({writeToStdin(h){i.postMessage(h)},isSync:!1,hasFS:!1,esbuild:we});yield g,Se={build:h=>new Promise((w,T)=>f.buildOrContext({callName:"build",refs:null,options:h,isTTY:!1,defaultWD:"/",callback:(L,B)=>L?T(L):w(B)})),context:h=>new Promise((w,T)=>f.buildOrContext({callName:"context",refs:null,options:h,isTTY:!1,defaultWD:"/",callback:(L,B)=>L?T(L):w(B)})),transform:(h,w)=>new Promise((T,L)=>f.transform({callName:"transform",refs:null,input:h,options:w||{},isTTY:!1,fs:{readFile(B,q){q(new Error("Internal error"),null)},writeFile(B,q){q(null)}},callback:(B,q)=>B?L(B):T(q)})),formatMessages:(h,w)=>new Promise((T,L)=>f.formatMessages({callName:"formatMessages",refs:null,messages:h,options:w,callback:(B,q)=>B?L(B):T(q)})),analyzeMetafile:(h,w)=>new Promise((T,L)=>f.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof h=="string"?h:JSON.stringify(h),options:w,callback:(B,q)=>B?L(B):T(q)}))}}),vt=we;
`)),c=g[g.length-1]}else throw new Error("Bad write");return h.length};let n=[],s,i=0;onmessage=({data:u})=>(u.length>0&&(n.push(u),s&&s()),l),m.read=(u,h,g,t,e,o)=>{if(u!==0||g!==0||t!==h.length||e!==null)throw new Error("Bad read");if(n.length===0){s=()=>m.read(u,h,g,t,e,o);return}let a=n[0],d=Math.max(0,Math.min(t,a.length-i));h.set(a.subarray(i,i+d),g),i+=d,i===a.length&&(n.shift(),i=0),o(null,d)};let l=new globalThis.Go;return l.argv=["","--service=0.19.10"],tryToInstantiateModule(r,l).then(u=>{postMessage(null),l.run(u)},u=>{postMessage(u)}),l};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);})(M=>i.onmessage({data:M})),w;i={onmessage:null,postMessage:M=>setTimeout(()=>w=h({data:M})),terminate(){if(w)for(let M of w._scheduledTimeouts.values())clearTimeout(M)}}}let u,l,g=new Promise((h,w)=>{u=h,l=w});i.onmessage=({data:h})=>{i.onmessage=({data:w})=>s(w),h?l(h):u()},i.postMessage(t||new URL(e,location.href).toString());let{readFromStdout:s,service:f}=Le({writeToStdin(h){i.postMessage(h)},isSync:!1,hasFS:!1,esbuild:we});yield g,Se={build:h=>new Promise((w,M)=>f.buildOrContext({callName:"build",refs:null,options:h,isTTY:!1,defaultWD:"/",callback:(L,B)=>L?M(L):w(B)})),context:h=>new Promise((w,M)=>f.buildOrContext({callName:"context",refs:null,options:h,isTTY:!1,defaultWD:"/",callback:(L,B)=>L?M(L):w(B)})),transform:(h,w)=>new Promise((M,L)=>f.transform({callName:"transform",refs:null,input:h,options:w||{},isTTY:!1,fs:{readFile(B,q){q(new Error("Internal error"),null)},writeFile(B,q){q(null)}},callback:(B,q)=>B?L(B):M(q)})),formatMessages:(h,w)=>new Promise((M,L)=>f.formatMessages({callName:"formatMessages",refs:null,messages:h,options:w,callback:(B,q)=>B?L(B):M(q)})),analyzeMetafile:(h,w)=>new Promise((M,L)=>f.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof h=="string"?h:JSON.stringify(h),options:w,callback:(B,q)=>B?L(B):M(q)}))}}),vt=we;
})(typeof module==="object"?module:{set exports(x){(typeof self!=="undefined"?self:this).esbuild=x}});
{
"name": "esbuild-wasm",
"version": "0.19.9",
"version": "0.19.10",
"description": "The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.",

@@ -5,0 +5,0 @@ "repository": "https://github.com/evanw/esbuild",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc