isomorfeus-asset-manager 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isomorfeus/asset_manager/version.rb +1 -1
- data/node_modules/.package-lock.json +3 -3
- data/node_modules/esbuild-wasm/esbuild.wasm +0 -0
- data/node_modules/esbuild-wasm/esm/browser.d.ts +43 -33
- data/node_modules/esbuild-wasm/esm/browser.js +8 -8
- data/node_modules/esbuild-wasm/esm/browser.min.js +9 -9
- data/node_modules/esbuild-wasm/lib/browser.d.ts +43 -33
- data/node_modules/esbuild-wasm/lib/browser.js +8 -8
- data/node_modules/esbuild-wasm/lib/browser.min.js +9 -9
- data/node_modules/esbuild-wasm/lib/main.d.ts +43 -33
- data/node_modules/esbuild-wasm/lib/main.js +10 -10
- data/node_modules/esbuild-wasm/package.json +1 -1
- data/package.json +1 -1
- metadata +3 -3
@@ -1,20 +1,20 @@
|
|
1
|
-
var Ie=Object.defineProperty;var We=(e,t)=>{for(var n in t)Ie(e,n,{get:t[n],enumerable:!0})};var be={};We(be,{analyzeMetafile:()=>st,analyzeMetafileSync:()=>ct,build:()=>nt,buildSync:()=>ot,context:()=>rt,default:()=>pt,formatMessages:()=>lt,formatMessagesSync:()=>ut,initialize:()=>ft,transform:()=>it,transformSync:()=>at,version:()=>tt});function xe(e){let t=l=>{if(l===null)n.write8(0);else if(typeof l=="boolean")n.write8(1),n.write8(+l);else if(typeof l=="number")n.write8(2),n.write32(l|0);else if(typeof l=="string")n.write8(3),n.write(Z(l));else if(l instanceof Uint8Array)n.write8(4),n.write(l);else if(l instanceof Array){n.write8(5),n.write32(l.length);for(let
|
1
|
+
var Ie=Object.defineProperty;var We=(e,t)=>{for(var n in t)Ie(e,n,{get:t[n],enumerable:!0})};var be={};We(be,{analyzeMetafile:()=>st,analyzeMetafileSync:()=>ct,build:()=>nt,buildSync:()=>ot,context:()=>rt,default:()=>pt,formatMessages:()=>lt,formatMessagesSync:()=>ut,initialize:()=>ft,transform:()=>it,transformSync:()=>at,version:()=>tt});function xe(e){let t=l=>{if(l===null)n.write8(0);else if(typeof l=="boolean")n.write8(1),n.write8(+l);else if(typeof l=="number")n.write8(2),n.write32(l|0);else if(typeof l=="string")n.write8(3),n.write(Z(l));else if(l instanceof Uint8Array)n.write8(4),n.write(l);else if(l instanceof Array){n.write8(5),n.write32(l.length);for(let d of l)t(d)}else{let d=Object.keys(l);n.write8(6),n.write32(d.length);for(let i of d)n.write(Z(i)),t(l[i])}},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 f=n.read32(),o=[];for(let y=0;y<f;y++)o.push(t());return o}case 6:{let f=n.read32(),o={};for(let y=0;y<f;y++)o[re(n.read())]=t();return o}default:throw new Error("Invalid packet")}},n=new de(e),l=n.read32(),d=(l&1)===0;l>>>=1;let i=t();if(n.ptr!==e.length)throw new Error("Invalid packet");return{id:l,isRequest:d,value:i}}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),l=this._read(n.length);return n.set(this.buf.subarray(l,l+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:l}=e;return Buffer.from(t,n,l).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
|
2
2
|
|
3
3
|
This indicates that your JavaScript environment is broken. You cannot use
|
4
4
|
esbuild in this environment because esbuild relies on this invariant. This
|
5
5
|
is not a problem with esbuild. You need to fix your environment instead.
|
6
|
-
`);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 V=JSON.stringify,Se="warning",ke="silent";function $e(e){if(J(e,"target"),e.indexOf(",")>=0)throw new Error(`Invalid target: ${e}`);return e}var me=()=>null,I=e=>typeof e=="boolean"?null:"a boolean",h=e=>typeof e=="string"?null:"a string",ye=e=>e instanceof RegExp?null:"a RegExp object",se=e=>typeof e=="number"&&e===(e|0)?null:"an integer",Ae=e=>typeof e=="function"?null:"a function",z=e=>Array.isArray(e)?null:"an array",ee=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"an object",Ke=e=>typeof e=="object"&&e!==null?null:"an array or an object",_e=e=>e instanceof WebAssembly.Module?null:"a WebAssembly.Module",Me=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",Ve=e=>typeof e=="string"||typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"a string or an object",Ye=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",Je=e=>typeof e=="string"||e instanceof URL?null:"a string or a URL";function r(e,t,n,l){let f=e[n];if(t[n+""]=!0,f===void 0)return;let i=l(f);if(i!==null)throw new Error(`${V(n)} must be ${i}`);return f}function K(e,t,n){for(let l in e)if(!(l in t))throw new Error(`Invalid option ${n}: ${V(l)}`)}function Fe(e){let t=Object.create(null),n=r(e,t,"wasmURL",Je),l=r(e,t,"wasmModule",_e),f=r(e,t,"worker",I);return K(e,t,"in initialize() call"),{wasmURL:n,wasmModule:l,worker:f}}function Te(e){let t;if(e!==void 0){t=Object.create(null);for(let n in e){let l=e[n];if(typeof l=="string"||l===!1)t[n]=l;else throw new Error(`Expected ${V(n)} in mangle cache to map to either a string or false`)}}return t}function he(e,t,n,l,f){let i=r(t,n,"color",I),d=r(t,n,"logLevel",h),s=r(t,n,"logLimit",se);i!==void 0?e.push(`--color=${i}`):l&&e.push("--color=true"),e.push(`--log-level=${d||f}`),e.push(`--log-limit=${s||0}`)}function J(e,t,n){if(typeof e!="string")throw new Error(`Expected value for ${t}${n!==void 0?" "+V(n):""} to be a string, got ${typeof e} instead`);return e}function Be(e,t,n){let l=r(t,n,"legalComments",h),f=r(t,n,"sourceRoot",h),i=r(t,n,"sourcesContent",I),d=r(t,n,"target",Ye),s=r(t,n,"format",h),y=r(t,n,"globalName",h),w=r(t,n,"mangleProps",ye),v=r(t,n,"reserveProps",ye),P=r(t,n,"mangleQuoted",I),U=r(t,n,"minify",I),B=r(t,n,"minifySyntax",I),j=r(t,n,"minifyWhitespace",I),Q=r(t,n,"minifyIdentifiers",I),T=r(t,n,"drop",z),W=r(t,n,"charset",h),Y=r(t,n,"treeShaking",I),R=r(t,n,"ignoreAnnotations",I),g=r(t,n,"jsx",h),c=r(t,n,"jsxFactory",h),o=r(t,n,"jsxFragment",h),O=r(t,n,"jsxImportSource",h),S=r(t,n,"jsxDev",I),$=r(t,n,"jsxSideEffects",I),E=r(t,n,"define",ee),a=r(t,n,"logOverride",ee),u=r(t,n,"supported",ee),b=r(t,n,"pure",z),M=r(t,n,"keepNames",I),k=r(t,n,"platform",h);if(l&&e.push(`--legal-comments=${l}`),f!==void 0&&e.push(`--source-root=${f}`),i!==void 0&&e.push(`--sources-content=${i}`),d&&(Array.isArray(d)?e.push(`--target=${Array.from(d).map($e).join(",")}`):e.push(`--target=${$e(d)}`)),s&&e.push(`--format=${s}`),y&&e.push(`--global-name=${y}`),k&&e.push(`--platform=${k}`),U&&e.push("--minify"),B&&e.push("--minify-syntax"),j&&e.push("--minify-whitespace"),Q&&e.push("--minify-identifiers"),W&&e.push(`--charset=${W}`),Y!==void 0&&e.push(`--tree-shaking=${Y}`),R&&e.push("--ignore-annotations"),T)for(let m of T)e.push(`--drop:${J(m,"drop")}`);if(w&&e.push(`--mangle-props=${w.source}`),v&&e.push(`--reserve-props=${v.source}`),P!==void 0&&e.push(`--mangle-quoted=${P}`),g&&e.push(`--jsx=${g}`),c&&e.push(`--jsx-factory=${c}`),o&&e.push(`--jsx-fragment=${o}`),O&&e.push(`--jsx-import-source=${O}`),S&&e.push("--jsx-dev"),$&&e.push("--jsx-side-effects"),E)for(let m in E){if(m.indexOf("=")>=0)throw new Error(`Invalid define: ${m}`);e.push(`--define:${m}=${J(E[m],"define",m)}`)}if(a)for(let m in a){if(m.indexOf("=")>=0)throw new Error(`Invalid log override: ${m}`);e.push(`--log-override:${m}=${J(a[m],"log override",m)}`)}if(u)for(let m in u){if(m.indexOf("=")>=0)throw new Error(`Invalid supported: ${m}`);let x=u[m];if(typeof x!="boolean")throw new Error(`Expected value for supported ${V(m)} to be a boolean, got ${typeof x} instead`);e.push(`--supported:${m}=${x}`)}if(b)for(let m of b)e.push(`--pure:${J(m,"pure")}`);M&&e.push("--keep-names")}function Qe(e,t,n,l,f){var le;let i=[],d=[],s=Object.create(null),y=null,w=null;he(i,t,s,n,l),Be(i,t,s);let v=r(t,s,"sourcemap",De),P=r(t,s,"bundle",I),U=r(t,s,"splitting",I),B=r(t,s,"preserveSymlinks",I),j=r(t,s,"metafile",I),Q=r(t,s,"outfile",h),T=r(t,s,"outdir",h),W=r(t,s,"outbase",h),Y=r(t,s,"tsconfig",h),R=r(t,s,"resolveExtensions",z),g=r(t,s,"nodePaths",z),c=r(t,s,"mainFields",z),o=r(t,s,"conditions",z),O=r(t,s,"external",z),S=r(t,s,"packages",h),$=r(t,s,"alias",ee),E=r(t,s,"loader",ee),a=r(t,s,"outExtension",ee),u=r(t,s,"publicPath",h),b=r(t,s,"entryNames",h),M=r(t,s,"chunkNames",h),k=r(t,s,"assetNames",h),m=r(t,s,"inject",z),x=r(t,s,"banner",ee),F=r(t,s,"footer",ee),L=r(t,s,"entryPoints",Ke),C=r(t,s,"absWorkingDir",h),D=r(t,s,"stdin",ee),A=(le=r(t,s,"write",I))!=null?le:f,q=r(t,s,"allowOverwrite",I),_=r(t,s,"mangleCache",ee);if(s.plugins=!0,K(t,s,`in ${e}() call`),v&&i.push(`--sourcemap${v===!0?"":`=${v}`}`),P&&i.push("--bundle"),q&&i.push("--allow-overwrite"),U&&i.push("--splitting"),B&&i.push("--preserve-symlinks"),j&&i.push("--metafile"),Q&&i.push(`--outfile=${Q}`),T&&i.push(`--outdir=${T}`),W&&i.push(`--outbase=${W}`),Y&&i.push(`--tsconfig=${Y}`),S&&i.push(`--packages=${S}`),R){let p=[];for(let N of R){if(J(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);p.push(N)}i.push(`--resolve-extensions=${p.join(",")}`)}if(u&&i.push(`--public-path=${u}`),b&&i.push(`--entry-names=${b}`),M&&i.push(`--chunk-names=${M}`),k&&i.push(`--asset-names=${k}`),c){let p=[];for(let N of c){if(J(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);p.push(N)}i.push(`--main-fields=${p.join(",")}`)}if(o){let p=[];for(let N of o){if(J(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);p.push(N)}i.push(`--conditions=${p.join(",")}`)}if(O)for(let p of O)i.push(`--external:${J(p,"external")}`);if($)for(let p in $){if(p.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${p}`);i.push(`--alias:${p}=${J($[p],"alias",p)}`)}if(x)for(let p in x){if(p.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${p}`);i.push(`--banner:${p}=${J(x[p],"banner",p)}`)}if(F)for(let p in F){if(p.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${p}`);i.push(`--footer:${p}=${J(F[p],"footer",p)}`)}if(m)for(let p of m)i.push(`--inject:${J(p,"inject")}`);if(E)for(let p in E){if(p.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${p}`);i.push(`--loader:${p}=${J(E[p],"loader",p)}`)}if(a)for(let p in a){if(p.indexOf("=")>=0)throw new Error(`Invalid out extension: ${p}`);i.push(`--out-extension:${p}=${J(a[p],"out extension",p)}`)}if(L)if(Array.isArray(L))for(let p=0,N=L.length;p<N;p++){let G=L[p];if(typeof G=="object"&&G!==null){let X=Object.create(null),ne=r(G,X,"in",h),fe=r(G,X,"out",h);if(K(G,X,"in entry point at index "+p),ne===void 0)throw new Error('Missing property "in" for entry point at index '+p);if(fe===void 0)throw new Error('Missing property "out" for entry point at index '+p);d.push([fe,ne])}else d.push(["",J(G,"entry point at index "+p)])}else for(let p in L)d.push([p,J(L[p],"entry point",p)]);if(D){let p=Object.create(null),N=r(D,p,"contents",Pe),G=r(D,p,"resolveDir",h),X=r(D,p,"sourcefile",h),ne=r(D,p,"loader",h);K(D,p,'in "stdin" object'),X&&i.push(`--sourcefile=${X}`),ne&&i.push(`--loader=${ne}`),G&&(w=G),typeof N=="string"?y=Z(N):N instanceof Uint8Array&&(y=N)}let H=[];if(g)for(let p of g)p+="",H.push(p);return{entries:d,flags:i,write:A,stdinContents:y,stdinResolveDir:w,absWorkingDir:C,nodePaths:H,mangleCache:Te(_)}}function He(e,t,n,l){let f=[],i=Object.create(null);he(f,t,i,n,l),Be(f,t,i);let d=r(t,i,"sourcemap",De),s=r(t,i,"tsconfigRaw",Ve),y=r(t,i,"sourcefile",h),w=r(t,i,"loader",h),v=r(t,i,"banner",h),P=r(t,i,"footer",h),U=r(t,i,"mangleCache",ee);return K(t,i,`in ${e}() call`),d&&f.push(`--sourcemap=${d===!0?"external":d}`),s&&f.push(`--tsconfig-raw=${typeof s=="string"?s:JSON.stringify(s)}`),y&&f.push(`--sourcefile=${y}`),w&&f.push(`--loader=${w}`),v&&f.push(`--banner=${v}`),P&&f.push(`--footer=${P}`),{flags:f,mangleCache:Te(U)}}function Ue(e){let t={},n={didClose:!1,reason:""},l={},f=0,i=0,d=new Uint8Array(16*1024),s=0,y=R=>{let g=s+R.length;if(g>d.length){let o=new Uint8Array(g*2);o.set(d),d=o}d.set(R,s),s+=R.length;let c=0;for(;c+4<=s;){let o=Re(d,c);if(c+4+o>s)break;c+=4,j(d.subarray(c,c+o)),c+=o}c>0&&(d.copyWithin(0,c,s),s-=c)},w=R=>{n.didClose=!0,R&&(n.reason=": "+(R.message||R));let g="The service was stopped"+n.reason;for(let c in l)l[c](g,null);l={}},v=(R,g,c)=>{if(n.didClose)return c("The service is no longer running"+n.reason,null);let o=f++;l[o]=(O,S)=>{try{c(O,S)}finally{R&&R.unref()}},R&&R.ref(),e.writeToStdin(xe({id:o,isRequest:!0,value:g}))},P=(R,g)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);e.writeToStdin(xe({id:R,isRequest:!1,value:g}))},U=async(R,g)=>{try{if(g.command==="ping"){P(R,{});return}if(typeof g.key=="number"){let c=t[g.key];if(c){let o=c[g.command];if(o){await o(R,g);return}}}throw new Error("Invalid command: "+g.command)}catch(c){P(R,{errors:[ie(c,e,null,void 0,"")]})}},B=!0,j=R=>{if(B){B=!1;let c=String.fromCharCode(...R);if(c!=="0.17.12")throw new Error(`Cannot start service: Host version "0.17.12" does not match binary version ${V(c)}`);return}let g=Ee(R);if(g.isRequest)U(g.id,g.value);else{let c=l[g.id];delete l[g.id],g.value.error?c(g.value.error,{}):c(null,g.value)}};return{readFromStdout:y,afterClose:w,service:{buildOrContext:({callName:R,refs:g,options:c,isTTY:o,defaultWD:O,callback:S})=>{let $=0,E=i++,a={},u={ref(){++$===1&&g&&g.ref()},unref(){--$===0&&(delete t[E],g&&g.unref())}};t[E]=a,u.ref(),Ge(R,E,v,P,u,e,a,c,o,O,(b,M)=>{try{S(b,M)}finally{u.unref()}})},transform:({callName:R,refs:g,input:c,options:o,isTTY:O,fs:S,callback:$})=>{let E=je(),a=u=>{try{if(typeof c!="string"&&!(c instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:b,mangleCache:M}=He(R,o,O,ke),k={command:"transform",flags:b,inputFS:u!==null,input:u!==null?Z(u):typeof c=="string"?Z(c):c};M&&(k.mangleCache=M),v(g,k,(m,x)=>{if(m)return $(new Error(m),null);let F=oe(x.errors,E),L=oe(x.warnings,E),C=1,D=()=>{if(--C===0){let A={warnings:L,code:x.code,map:x.map,mangleCache:void 0,legalComments:void 0};"legalComments"in x&&(A.legalComments=x==null?void 0:x.legalComments),x.mangleCache&&(A.mangleCache=x==null?void 0:x.mangleCache),$(null,A)}};if(F.length>0)return $(ue("Transform failed",F,L),null);x.codeFS&&(C++,S.readFile(x.code,(A,q)=>{A!==null?$(A,null):(x.code=q,D())})),x.mapFS&&(C++,S.readFile(x.map,(A,q)=>{A!==null?$(A,null):(x.map=q,D())})),D()})}catch(b){let M=[];try{he(M,o,{},O,ke)}catch(m){}let k=ie(b,e,E,void 0,"");v(g,{command:"error",flags:M,error:k},()=>{k.detail=E.load(k.detail),$(ue("Transform failed",[k],[]),null)})}};if((typeof c=="string"||c instanceof Uint8Array)&&c.length>1024*1024){let u=a;a=()=>S.writeFile(c,u)}a(null)},formatMessages:({callName:R,refs:g,messages:c,options:o,callback:O})=>{let S=te(c,"messages",null,"");if(!o)throw new Error(`Missing second argument in ${R}() call`);let $={},E=r(o,$,"kind",h),a=r(o,$,"color",I),u=r(o,$,"terminalWidth",se);if(K(o,$,`in ${R}() call`),E===void 0)throw new Error(`Missing "kind" in ${R}() call`);if(E!=="error"&&E!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${R}() call`);let b={command:"format-msgs",messages:S,isWarning:E==="warning"};a!==void 0&&(b.color=a),u!==void 0&&(b.terminalWidth=u),v(g,b,(M,k)=>{if(M)return O(new Error(M),null);O(null,k.messages)})},analyzeMetafile:({callName:R,refs:g,metafile:c,options:o,callback:O})=>{o===void 0&&(o={});let S={},$=r(o,S,"color",I),E=r(o,S,"verbose",I);K(o,S,`in ${R}() call`);let a={command:"analyze-metafile",metafile:c};$!==void 0&&(a.color=$),E!==void 0&&(a.verbose=E),v(g,a,(u,b)=>{if(u)return O(new Error(u),null);O(null,b.result)})}}}}function Ge(e,t,n,l,f,i,d,s,y,w,v){let P=je(),U=e==="context",B=(T,W)=>{let Y=[];try{he(Y,s,{},y,Se)}catch(g){}let R=ie(T,i,P,void 0,W);n(f,{command:"error",flags:Y,error:R},()=>{R.detail=P.load(R.detail),v(ue(U?"Context failed":"Build failed",[R],[]),null)})},j;if(typeof s=="object"){let T=s.plugins;if(T!==void 0){if(!Array.isArray(T))return B(new Error('"plugins" must be an array'),"");j=T}}if(j&&j.length>0){if(i.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");Xe(t,n,l,f,i,d,s,j,P).then(T=>{if(!T.ok)return B(T.error,T.pluginName);try{Q(T.requestPlugins,T.runOnEndCallbacks,T.scheduleOnDisposeCallbacks)}catch(W){B(W,"")}},T=>B(T,""));return}try{Q(null,(T,W)=>W([],[]),()=>{})}catch(T){B(T,"")}function Q(T,W,Y){let R=i.hasFS,{entries:g,flags:c,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:$,nodePaths:E,mangleCache:a}=Qe(e,s,y,Se,R);if(o&&!i.hasFS)throw new Error('The "write" option is unavailable in this environment');let u={command:"build",key:t,entries:g,flags:c,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:$||w,nodePaths:E,context:U};T&&(u.plugins=T),a&&(u.mangleCache=a);let b=(m,x)=>{let F={errors:oe(m.errors,P),warnings:oe(m.warnings,P),outputFiles:void 0,metafile:void 0,mangleCache:void 0},L=F.errors.slice(),C=F.warnings.slice();m.outputFiles&&(F.outputFiles=m.outputFiles.map(Ze)),m.metafile&&(F.metafile=JSON.parse(m.metafile)),m.mangleCache&&(F.mangleCache=m.mangleCache),m.writeToStdout!==void 0&&console.log(re(m.writeToStdout).replace(/\n$/,"")),W(F,(D,A)=>{if(L.length>0||D.length>0){let q=ue("Build failed",L.concat(D),C.concat(A));return x(q,null,D,A)}x(null,F,D,A)})},M,k;U&&(d["on-end"]=(m,x)=>new Promise(F=>{b(x,(L,C,D,A)=>{let q={errors:D,warnings:A};k&&k(L,C),M=void 0,k=void 0,l(m,q),F()})})),n(f,u,(m,x)=>{if(m)return v(new Error(m),null);if(!U)return b(x,(C,D)=>(Y(),v(C,D)));if(x.errors.length>0)return v(ue("Context failed",x.errors,x.warnings),null);let F=!1,L={rebuild:()=>(M||(M=new Promise((C,D)=>{let A;k=(_,H)=>{A||(A=()=>_?D(_):C(H))};let q=()=>{n(f,{command:"rebuild",key:t},(H,le)=>{H?D(new Error(H)):A?A():q()})};q()})),M),watch:(C={})=>new Promise((D,A)=>{if(!i.hasFS)throw new Error('Cannot use the "watch" API in this environment');K(C,{},"in watch() call"),n(f,{command:"watch",key:t},H=>{H?A(new Error(H)):D(void 0)})}),serve:(C={})=>new Promise((D,A)=>{if(!i.hasFS)throw new Error('Cannot use the "serve" API in this environment');let q={},_=r(C,q,"port",se),H=r(C,q,"host",h),le=r(C,q,"servedir",h),p=r(C,q,"keyfile",h),N=r(C,q,"certfile",h),G=r(C,q,"onRequest",Ae);K(C,q,"in serve() call");let X={command:"serve",key:t,onRequest:!!G};_!==void 0&&(X.port=_),H!==void 0&&(X.host=H),le!==void 0&&(X.servedir=le),p!==void 0&&(X.keyfile=p),N!==void 0&&(X.certfile=N),n(f,X,(ne,fe)=>{if(ne)return A(new Error(ne));G&&(d["serve-request"]=(Le,Ne)=>{G(Ne.args),l(Le,{})}),D(fe)})}),cancel:()=>new Promise(C=>{if(F)return C();n(f,{command:"cancel",key:t},()=>{C()})}),dispose:()=>new Promise(C=>{if(F)return C();F=!0,n(f,{command:"dispose",key:t},()=>{C(),Y(),f.unref()})})};f.ref(),v(null,L)})}}var Xe=async(e,t,n,l,f,i,d,s,y)=>{let w=[],v=[],P={},U={},B=[],j=0,Q=0,T=[],W=!1;s=[...s];for(let g of s){let c={};if(typeof g!="object")throw new Error(`Plugin at index ${Q} must be an object`);let o=r(g,c,"name",h);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${Q} is missing a name`);try{let O=r(g,c,"setup",Ae);if(typeof O!="function")throw new Error("Plugin is missing a setup function");K(g,c,`on plugin ${V(o)}`);let S={name:o,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};Q++;let E=O({initialOptions:d,resolve:(a,u={})=>{if(!W)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),M=r(u,b,"pluginName",h),k=r(u,b,"importer",h),m=r(u,b,"namespace",h),x=r(u,b,"resolveDir",h),F=r(u,b,"kind",h),L=r(u,b,"pluginData",me);return K(u,b,"in resolve() call"),new Promise((C,D)=>{let A={command:"resolve",path:a,key:e,pluginName:o};if(M!=null&&(A.pluginName=M),k!=null&&(A.importer=k),m!=null&&(A.namespace=m),x!=null&&(A.resolveDir=x),F!=null)A.kind=F;else throw new Error('Must specify "kind" when calling "resolve"');L!=null&&(A.pluginData=y.store(L)),t(l,A,(q,_)=>{q!==null?D(new Error(q)):C({errors:oe(_.errors,y),warnings:oe(_.warnings,y),path:_.path,external:_.external,sideEffects:_.sideEffects,namespace:_.namespace,suffix:_.suffix,pluginData:y.load(_.pluginData)})})})},onStart(a){let u='This error came from the "onStart" callback registered here:',b=pe(new Error(u),f,"onStart");w.push({name:o,callback:a,note:b}),S.onStart=!0},onEnd(a){let u='This error came from the "onEnd" callback registered here:',b=pe(new Error(u),f,"onEnd");v.push({name:o,callback:a,note:b}),S.onEnd=!0},onResolve(a,u){let b='This error came from the "onResolve" callback registered here:',M=pe(new Error(b),f,"onResolve"),k={},m=r(a,k,"filter",ye),x=r(a,k,"namespace",h);if(K(a,k,`in onResolve() call for plugin ${V(o)}`),m==null)throw new Error("onResolve() call is missing a filter");let F=j++;P[F]={name:o,callback:u,note:M},S.onResolve.push({id:F,filter:m.source,namespace:x||""})},onLoad(a,u){let b='This error came from the "onLoad" callback registered here:',M=pe(new Error(b),f,"onLoad"),k={},m=r(a,k,"filter",ye),x=r(a,k,"namespace",h);if(K(a,k,`in onLoad() call for plugin ${V(o)}`),m==null)throw new Error("onLoad() call is missing a filter");let F=j++;U[F]={name:o,callback:u,note:M},S.onLoad.push({id:F,filter:m.source,namespace:x||""})},onDispose(a){B.push(a)},esbuild:f.esbuild});E&&await E,T.push(S)}catch(O){return{ok:!1,error:O,pluginName:o}}}i["on-start"]=async(g,c)=>{let o={errors:[],warnings:[]};await Promise.all(w.map(async({name:O,callback:S,note:$})=>{try{let E=await S();if(E!=null){if(typeof E!="object")throw new Error(`Expected onStart() callback in plugin ${V(O)} to return an object`);let a={},u=r(E,a,"errors",z),b=r(E,a,"warnings",z);K(E,a,`from onStart() callback in plugin ${V(O)}`),u!=null&&o.errors.push(...te(u,"errors",y,O)),b!=null&&o.warnings.push(...te(b,"warnings",y,O))}}catch(E){o.errors.push(ie(E,f,y,$&&$(),O))}})),n(g,o)},i["on-resolve"]=async(g,c)=>{let o={},O="",S,$;for(let E of c.ids)try{({name:O,callback:S,note:$}=P[E]);let a=await S({path:c.path,importer:c.importer,namespace:c.namespace,resolveDir:c.resolveDir,kind:c.kind,pluginData:y.load(c.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${V(O)} to return an object`);let u={},b=r(a,u,"pluginName",h),M=r(a,u,"path",h),k=r(a,u,"namespace",h),m=r(a,u,"suffix",h),x=r(a,u,"external",I),F=r(a,u,"sideEffects",I),L=r(a,u,"pluginData",me),C=r(a,u,"errors",z),D=r(a,u,"warnings",z),A=r(a,u,"watchFiles",z),q=r(a,u,"watchDirs",z);K(a,u,`from onResolve() callback in plugin ${V(O)}`),o.id=E,b!=null&&(o.pluginName=b),M!=null&&(o.path=M),k!=null&&(o.namespace=k),m!=null&&(o.suffix=m),x!=null&&(o.external=x),F!=null&&(o.sideEffects=F),L!=null&&(o.pluginData=y.store(L)),C!=null&&(o.errors=te(C,"errors",y,O)),D!=null&&(o.warnings=te(D,"warnings",y,O)),A!=null&&(o.watchFiles=ge(A,"watchFiles")),q!=null&&(o.watchDirs=ge(q,"watchDirs"));break}}catch(a){o={id:E,errors:[ie(a,f,y,$&&$(),O)]};break}n(g,o)},i["on-load"]=async(g,c)=>{let o={},O="",S,$;for(let E of c.ids)try{({name:O,callback:S,note:$}=U[E]);let a=await S({path:c.path,namespace:c.namespace,suffix:c.suffix,pluginData:y.load(c.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${V(O)} to return an object`);let u={},b=r(a,u,"pluginName",h),M=r(a,u,"contents",Pe),k=r(a,u,"resolveDir",h),m=r(a,u,"pluginData",me),x=r(a,u,"loader",h),F=r(a,u,"errors",z),L=r(a,u,"warnings",z),C=r(a,u,"watchFiles",z),D=r(a,u,"watchDirs",z);K(a,u,`from onLoad() callback in plugin ${V(O)}`),o.id=E,b!=null&&(o.pluginName=b),M instanceof Uint8Array?o.contents=M:M!=null&&(o.contents=Z(M)),k!=null&&(o.resolveDir=k),m!=null&&(o.pluginData=y.store(m)),x!=null&&(o.loader=x),F!=null&&(o.errors=te(F,"errors",y,O)),L!=null&&(o.warnings=te(L,"warnings",y,O)),C!=null&&(o.watchFiles=ge(C,"watchFiles")),D!=null&&(o.watchDirs=ge(D,"watchDirs"));break}}catch(a){o={id:E,errors:[ie(a,f,y,$&&$(),O)]};break}n(g,o)};let Y=(g,c)=>c([],[]);v.length>0&&(Y=(g,c)=>{(async()=>{let o=[],O=[];for(let{name:S,callback:$,note:E}of v){let a,u;try{let b=await $(g);if(b!=null){if(typeof b!="object")throw new Error(`Expected onEnd() callback in plugin ${V(S)} to return an object`);let M={},k=r(b,M,"errors",z),m=r(b,M,"warnings",z);K(b,M,`from onEnd() callback in plugin ${V(S)}`),k!=null&&(a=te(k,"errors",y,S)),m!=null&&(u=te(m,"warnings",y,S))}}catch(b){a=[ie(b,f,y,E&&E(),S)]}if(a){o.push(...a);try{g.errors.push(...a)}catch(b){}}if(u){O.push(...u);try{g.warnings.push(...u)}catch(b){}}}c(o,O)})()});let R=()=>{for(let g of B)setTimeout(()=>g(),0)};return W=!0,{ok:!0,requestPlugins:T,runOnEndCallbacks:Y,scheduleOnDisposeCallbacks:R}};function je(){let e=new Map,t=0;return{load(n){return e.get(n)},store(n){if(n===void 0)return-1;let l=t++;return e.set(l,n),l}}}function pe(e,t,n){let l,f=!1;return()=>{if(f)return l;f=!0;try{let i=(e.stack+"").split(`
|
7
|
-
`);i.splice(1,1);let
|
8
|
-
`),"")}catch(
|
6
|
+
`);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 V=JSON.stringify,Se="warning",ke="silent";function $e(e){if(J(e,"target"),e.indexOf(",")>=0)throw new Error(`Invalid target: ${e}`);return e}var me=()=>null,I=e=>typeof e=="boolean"?null:"a boolean",h=e=>typeof e=="string"?null:"a string",ye=e=>e instanceof RegExp?null:"a RegExp object",se=e=>typeof e=="number"&&e===(e|0)?null:"an integer",Ae=e=>typeof e=="function"?null:"a function",z=e=>Array.isArray(e)?null:"an array",ee=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"an object",Ke=e=>typeof e=="object"&&e!==null?null:"an array or an object",_e=e=>e instanceof WebAssembly.Module?null:"a WebAssembly.Module",Me=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",Ve=e=>typeof e=="string"||typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"a string or an object",Ye=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",Je=e=>typeof e=="string"||e instanceof URL?null:"a string or a URL";function r(e,t,n,l){let d=e[n];if(t[n+""]=!0,d===void 0)return;let i=l(d);if(i!==null)throw new Error(`${V(n)} must be ${i}`);return d}function K(e,t,n){for(let l in e)if(!(l in t))throw new Error(`Invalid option ${n}: ${V(l)}`)}function Fe(e){let t=Object.create(null),n=r(e,t,"wasmURL",Je),l=r(e,t,"wasmModule",_e),d=r(e,t,"worker",I);return K(e,t,"in initialize() call"),{wasmURL:n,wasmModule:l,worker:d}}function Te(e){let t;if(e!==void 0){t=Object.create(null);for(let n in e){let l=e[n];if(typeof l=="string"||l===!1)t[n]=l;else throw new Error(`Expected ${V(n)} in mangle cache to map to either a string or false`)}}return t}function he(e,t,n,l,d){let i=r(t,n,"color",I),f=r(t,n,"logLevel",h),o=r(t,n,"logLimit",se);i!==void 0?e.push(`--color=${i}`):l&&e.push("--color=true"),e.push(`--log-level=${f||d}`),e.push(`--log-limit=${o||0}`)}function J(e,t,n){if(typeof e!="string")throw new Error(`Expected value for ${t}${n!==void 0?" "+V(n):""} to be a string, got ${typeof e} instead`);return e}function Be(e,t,n){let l=r(t,n,"legalComments",h),d=r(t,n,"sourceRoot",h),i=r(t,n,"sourcesContent",I),f=r(t,n,"target",Ye),o=r(t,n,"format",h),y=r(t,n,"globalName",h),w=r(t,n,"mangleProps",ye),v=r(t,n,"reserveProps",ye),F=r(t,n,"mangleQuoted",I),U=r(t,n,"minify",I),B=r(t,n,"minifySyntax",I),j=r(t,n,"minifyWhitespace",I),Q=r(t,n,"minifyIdentifiers",I),T=r(t,n,"drop",z),W=r(t,n,"charset",h),Y=r(t,n,"treeShaking",I),x=r(t,n,"ignoreAnnotations",I),m=r(t,n,"jsx",h),c=r(t,n,"jsxFactory",h),s=r(t,n,"jsxFragment",h),R=r(t,n,"jsxImportSource",h),S=r(t,n,"jsxDev",I),$=r(t,n,"jsxSideEffects",I),O=r(t,n,"define",ee),a=r(t,n,"logOverride",ee),u=r(t,n,"supported",ee),b=r(t,n,"pure",z),M=r(t,n,"keepNames",I),k=r(t,n,"platform",h),E=r(t,n,"tsconfigRaw",Ve);if(l&&e.push(`--legal-comments=${l}`),d!==void 0&&e.push(`--source-root=${d}`),i!==void 0&&e.push(`--sources-content=${i}`),f&&(Array.isArray(f)?e.push(`--target=${Array.from(f).map($e).join(",")}`):e.push(`--target=${$e(f)}`)),o&&e.push(`--format=${o}`),y&&e.push(`--global-name=${y}`),k&&e.push(`--platform=${k}`),E&&e.push(`--tsconfig-raw=${typeof E=="string"?E:JSON.stringify(E)}`),U&&e.push("--minify"),B&&e.push("--minify-syntax"),j&&e.push("--minify-whitespace"),Q&&e.push("--minify-identifiers"),W&&e.push(`--charset=${W}`),Y!==void 0&&e.push(`--tree-shaking=${Y}`),x&&e.push("--ignore-annotations"),T)for(let p of T)e.push(`--drop:${J(p,"drop")}`);if(w&&e.push(`--mangle-props=${w.source}`),v&&e.push(`--reserve-props=${v.source}`),F!==void 0&&e.push(`--mangle-quoted=${F}`),m&&e.push(`--jsx=${m}`),c&&e.push(`--jsx-factory=${c}`),s&&e.push(`--jsx-fragment=${s}`),R&&e.push(`--jsx-import-source=${R}`),S&&e.push("--jsx-dev"),$&&e.push("--jsx-side-effects"),O)for(let p in O){if(p.indexOf("=")>=0)throw new Error(`Invalid define: ${p}`);e.push(`--define:${p}=${J(O[p],"define",p)}`)}if(a)for(let p in a){if(p.indexOf("=")>=0)throw new Error(`Invalid log override: ${p}`);e.push(`--log-override:${p}=${J(a[p],"log override",p)}`)}if(u)for(let p in u){if(p.indexOf("=")>=0)throw new Error(`Invalid supported: ${p}`);let C=u[p];if(typeof C!="boolean")throw new Error(`Expected value for supported ${V(p)} to be a boolean, got ${typeof C} instead`);e.push(`--supported:${p}=${C}`)}if(b)for(let p of b)e.push(`--pure:${J(p,"pure")}`);M&&e.push("--keep-names")}function Qe(e,t,n,l,d){var le;let i=[],f=[],o=Object.create(null),y=null,w=null;he(i,t,o,n,l),Be(i,t,o);let v=r(t,o,"sourcemap",De),F=r(t,o,"bundle",I),U=r(t,o,"splitting",I),B=r(t,o,"preserveSymlinks",I),j=r(t,o,"metafile",I),Q=r(t,o,"outfile",h),T=r(t,o,"outdir",h),W=r(t,o,"outbase",h),Y=r(t,o,"tsconfig",h),x=r(t,o,"resolveExtensions",z),m=r(t,o,"nodePaths",z),c=r(t,o,"mainFields",z),s=r(t,o,"conditions",z),R=r(t,o,"external",z),S=r(t,o,"packages",h),$=r(t,o,"alias",ee),O=r(t,o,"loader",ee),a=r(t,o,"outExtension",ee),u=r(t,o,"publicPath",h),b=r(t,o,"entryNames",h),M=r(t,o,"chunkNames",h),k=r(t,o,"assetNames",h),E=r(t,o,"inject",z),p=r(t,o,"banner",ee),C=r(t,o,"footer",ee),L=r(t,o,"entryPoints",Ke),A=r(t,o,"absWorkingDir",h),P=r(t,o,"stdin",ee),D=(le=r(t,o,"write",I))!=null?le:d,q=r(t,o,"allowOverwrite",I),_=r(t,o,"mangleCache",ee);if(o.plugins=!0,K(t,o,`in ${e}() call`),v&&i.push(`--sourcemap${v===!0?"":`=${v}`}`),F&&i.push("--bundle"),q&&i.push("--allow-overwrite"),U&&i.push("--splitting"),B&&i.push("--preserve-symlinks"),j&&i.push("--metafile"),Q&&i.push(`--outfile=${Q}`),T&&i.push(`--outdir=${T}`),W&&i.push(`--outbase=${W}`),Y&&i.push(`--tsconfig=${Y}`),S&&i.push(`--packages=${S}`),x){let g=[];for(let N of x){if(J(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);g.push(N)}i.push(`--resolve-extensions=${g.join(",")}`)}if(u&&i.push(`--public-path=${u}`),b&&i.push(`--entry-names=${b}`),M&&i.push(`--chunk-names=${M}`),k&&i.push(`--asset-names=${k}`),c){let g=[];for(let N of c){if(J(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);g.push(N)}i.push(`--main-fields=${g.join(",")}`)}if(s){let g=[];for(let N of s){if(J(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);g.push(N)}i.push(`--conditions=${g.join(",")}`)}if(R)for(let g of R)i.push(`--external:${J(g,"external")}`);if($)for(let g in $){if(g.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${g}`);i.push(`--alias:${g}=${J($[g],"alias",g)}`)}if(p)for(let g in p){if(g.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${g}`);i.push(`--banner:${g}=${J(p[g],"banner",g)}`)}if(C)for(let g in C){if(g.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${g}`);i.push(`--footer:${g}=${J(C[g],"footer",g)}`)}if(E)for(let g of E)i.push(`--inject:${J(g,"inject")}`);if(O)for(let g in O){if(g.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${g}`);i.push(`--loader:${g}=${J(O[g],"loader",g)}`)}if(a)for(let g in a){if(g.indexOf("=")>=0)throw new Error(`Invalid out extension: ${g}`);i.push(`--out-extension:${g}=${J(a[g],"out extension",g)}`)}if(L)if(Array.isArray(L))for(let g=0,N=L.length;g<N;g++){let G=L[g];if(typeof G=="object"&&G!==null){let X=Object.create(null),ne=r(G,X,"in",h),fe=r(G,X,"out",h);if(K(G,X,"in entry point at index "+g),ne===void 0)throw new Error('Missing property "in" for entry point at index '+g);if(fe===void 0)throw new Error('Missing property "out" for entry point at index '+g);f.push([fe,ne])}else f.push(["",J(G,"entry point at index "+g)])}else for(let g in L)f.push([g,J(L[g],"entry point",g)]);if(P){let g=Object.create(null),N=r(P,g,"contents",Pe),G=r(P,g,"resolveDir",h),X=r(P,g,"sourcefile",h),ne=r(P,g,"loader",h);K(P,g,'in "stdin" object'),X&&i.push(`--sourcefile=${X}`),ne&&i.push(`--loader=${ne}`),G&&(w=G),typeof N=="string"?y=Z(N):N instanceof Uint8Array&&(y=N)}let H=[];if(m)for(let g of m)g+="",H.push(g);return{entries:f,flags:i,write:D,stdinContents:y,stdinResolveDir:w,absWorkingDir:A,nodePaths:H,mangleCache:Te(_)}}function He(e,t,n,l){let d=[],i=Object.create(null);he(d,t,i,n,l),Be(d,t,i);let f=r(t,i,"sourcemap",De),o=r(t,i,"sourcefile",h),y=r(t,i,"loader",h),w=r(t,i,"banner",h),v=r(t,i,"footer",h),F=r(t,i,"mangleCache",ee);return K(t,i,`in ${e}() call`),f&&d.push(`--sourcemap=${f===!0?"external":f}`),o&&d.push(`--sourcefile=${o}`),y&&d.push(`--loader=${y}`),w&&d.push(`--banner=${w}`),v&&d.push(`--footer=${v}`),{flags:d,mangleCache:Te(F)}}function Ue(e){let t={},n={didClose:!1,reason:""},l={},d=0,i=0,f=new Uint8Array(16*1024),o=0,y=x=>{let m=o+x.length;if(m>f.length){let s=new Uint8Array(m*2);s.set(f),f=s}f.set(x,o),o+=x.length;let c=0;for(;c+4<=o;){let s=Re(f,c);if(c+4+s>o)break;c+=4,j(f.subarray(c,c+s)),c+=s}c>0&&(f.copyWithin(0,c,o),o-=c)},w=x=>{n.didClose=!0,x&&(n.reason=": "+(x.message||x));let m="The service was stopped"+n.reason;for(let c in l)l[c](m,null);l={}},v=(x,m,c)=>{if(n.didClose)return c("The service is no longer running"+n.reason,null);let s=d++;l[s]=(R,S)=>{try{c(R,S)}finally{x&&x.unref()}},x&&x.ref(),e.writeToStdin(xe({id:s,isRequest:!0,value:m}))},F=(x,m)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);e.writeToStdin(xe({id:x,isRequest:!1,value:m}))},U=async(x,m)=>{try{if(m.command==="ping"){F(x,{});return}if(typeof m.key=="number"){let c=t[m.key];if(c){let s=c[m.command];if(s){await s(x,m);return}}}throw new Error("Invalid command: "+m.command)}catch(c){F(x,{errors:[ie(c,e,null,void 0,"")]})}},B=!0,j=x=>{if(B){B=!1;let c=String.fromCharCode(...x);if(c!=="0.18.4")throw new Error(`Cannot start service: Host version "0.18.4" does not match binary version ${V(c)}`);return}let m=Ee(x);if(m.isRequest)U(m.id,m.value);else{let c=l[m.id];delete l[m.id],m.value.error?c(m.value.error,{}):c(null,m.value)}};return{readFromStdout:y,afterClose:w,service:{buildOrContext:({callName:x,refs:m,options:c,isTTY:s,defaultWD:R,callback:S})=>{let $=0,O=i++,a={},u={ref(){++$===1&&m&&m.ref()},unref(){--$===0&&(delete t[O],m&&m.unref())}};t[O]=a,u.ref(),Ge(x,O,v,F,u,e,a,c,s,R,(b,M)=>{try{S(b,M)}finally{u.unref()}})},transform:({callName:x,refs:m,input:c,options:s,isTTY:R,fs:S,callback:$})=>{let O=je(),a=u=>{try{if(typeof c!="string"&&!(c instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:b,mangleCache:M}=He(x,s,R,ke),k={command:"transform",flags:b,inputFS:u!==null,input:u!==null?Z(u):typeof c=="string"?Z(c):c};M&&(k.mangleCache=M),v(m,k,(E,p)=>{if(E)return $(new Error(E),null);let C=oe(p.errors,O),L=oe(p.warnings,O),A=1,P=()=>{if(--A===0){let D={warnings:L,code:p.code,map:p.map,mangleCache:void 0,legalComments:void 0};"legalComments"in p&&(D.legalComments=p==null?void 0:p.legalComments),p.mangleCache&&(D.mangleCache=p==null?void 0:p.mangleCache),$(null,D)}};if(C.length>0)return $(ue("Transform failed",C,L),null);p.codeFS&&(A++,S.readFile(p.code,(D,q)=>{D!==null?$(D,null):(p.code=q,P())})),p.mapFS&&(A++,S.readFile(p.map,(D,q)=>{D!==null?$(D,null):(p.map=q,P())})),P()})}catch(b){let M=[];try{he(M,s,{},R,ke)}catch(E){}let k=ie(b,e,O,void 0,"");v(m,{command:"error",flags:M,error:k},()=>{k.detail=O.load(k.detail),$(ue("Transform failed",[k],[]),null)})}};if((typeof c=="string"||c instanceof Uint8Array)&&c.length>1024*1024){let u=a;a=()=>S.writeFile(c,u)}a(null)},formatMessages:({callName:x,refs:m,messages:c,options:s,callback:R})=>{let S=te(c,"messages",null,"");if(!s)throw new Error(`Missing second argument in ${x}() call`);let $={},O=r(s,$,"kind",h),a=r(s,$,"color",I),u=r(s,$,"terminalWidth",se);if(K(s,$,`in ${x}() call`),O===void 0)throw new Error(`Missing "kind" in ${x}() call`);if(O!=="error"&&O!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${x}() call`);let b={command:"format-msgs",messages:S,isWarning:O==="warning"};a!==void 0&&(b.color=a),u!==void 0&&(b.terminalWidth=u),v(m,b,(M,k)=>{if(M)return R(new Error(M),null);R(null,k.messages)})},analyzeMetafile:({callName:x,refs:m,metafile:c,options:s,callback:R})=>{s===void 0&&(s={});let S={},$=r(s,S,"color",I),O=r(s,S,"verbose",I);K(s,S,`in ${x}() call`);let a={command:"analyze-metafile",metafile:c};$!==void 0&&(a.color=$),O!==void 0&&(a.verbose=O),v(m,a,(u,b)=>{if(u)return R(new Error(u),null);R(null,b.result)})}}}}function Ge(e,t,n,l,d,i,f,o,y,w,v){let F=je(),U=e==="context",B=(T,W)=>{let Y=[];try{he(Y,o,{},y,Se)}catch(m){}let x=ie(T,i,F,void 0,W);n(d,{command:"error",flags:Y,error:x},()=>{x.detail=F.load(x.detail),v(ue(U?"Context failed":"Build failed",[x],[]),null)})},j;if(typeof o=="object"){let T=o.plugins;if(T!==void 0){if(!Array.isArray(T))return B(new Error('"plugins" must be an array'),"");j=T}}if(j&&j.length>0){if(i.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");Xe(t,n,l,d,i,f,o,j,F).then(T=>{if(!T.ok)return B(T.error,T.pluginName);try{Q(T.requestPlugins,T.runOnEndCallbacks,T.scheduleOnDisposeCallbacks)}catch(W){B(W,"")}},T=>B(T,""));return}try{Q(null,(T,W)=>W([],[]),()=>{})}catch(T){B(T,"")}function Q(T,W,Y){let x=i.hasFS,{entries:m,flags:c,write:s,stdinContents:R,stdinResolveDir:S,absWorkingDir:$,nodePaths:O,mangleCache:a}=Qe(e,o,y,Se,x);if(s&&!i.hasFS)throw new Error('The "write" option is unavailable in this environment');let u={command:"build",key:t,entries:m,flags:c,write:s,stdinContents:R,stdinResolveDir:S,absWorkingDir:$||w,nodePaths:O,context:U};T&&(u.plugins=T),a&&(u.mangleCache=a);let b=(E,p)=>{let C={errors:oe(E.errors,F),warnings:oe(E.warnings,F),outputFiles:void 0,metafile:void 0,mangleCache:void 0},L=C.errors.slice(),A=C.warnings.slice();E.outputFiles&&(C.outputFiles=E.outputFiles.map(Ze)),E.metafile&&(C.metafile=JSON.parse(E.metafile)),E.mangleCache&&(C.mangleCache=E.mangleCache),E.writeToStdout!==void 0&&console.log(re(E.writeToStdout).replace(/\n$/,"")),W(C,(P,D)=>{if(L.length>0||P.length>0){let q=ue("Build failed",L.concat(P),A.concat(D));return p(q,null,P,D)}p(null,C,P,D)})},M,k;U&&(f["on-end"]=(E,p)=>new Promise(C=>{b(p,(L,A,P,D)=>{let q={errors:P,warnings:D};k&&k(L,A),M=void 0,k=void 0,l(E,q),C()})})),n(d,u,(E,p)=>{if(E)return v(new Error(E),null);if(!U)return b(p,(A,P)=>(Y(),v(A,P)));if(p.errors.length>0)return v(ue("Context failed",p.errors,p.warnings),null);let C=!1,L={rebuild:()=>(M||(M=new Promise((A,P)=>{let D;k=(_,H)=>{D||(D=()=>_?P(_):A(H))};let q=()=>{n(d,{command:"rebuild",key:t},(H,le)=>{H?P(new Error(H)):D?D():q()})};q()})),M),watch:(A={})=>new Promise((P,D)=>{if(!i.hasFS)throw new Error('Cannot use the "watch" API in this environment');K(A,{},"in watch() call"),n(d,{command:"watch",key:t},H=>{H?D(new Error(H)):P(void 0)})}),serve:(A={})=>new Promise((P,D)=>{if(!i.hasFS)throw new Error('Cannot use the "serve" API in this environment');let q={},_=r(A,q,"port",se),H=r(A,q,"host",h),le=r(A,q,"servedir",h),g=r(A,q,"keyfile",h),N=r(A,q,"certfile",h),G=r(A,q,"onRequest",Ae);K(A,q,"in serve() call");let X={command:"serve",key:t,onRequest:!!G};_!==void 0&&(X.port=_),H!==void 0&&(X.host=H),le!==void 0&&(X.servedir=le),g!==void 0&&(X.keyfile=g),N!==void 0&&(X.certfile=N),n(d,X,(ne,fe)=>{if(ne)return D(new Error(ne));G&&(f["serve-request"]=(Le,Ne)=>{G(Ne.args),l(Le,{})}),P(fe)})}),cancel:()=>new Promise(A=>{if(C)return A();n(d,{command:"cancel",key:t},()=>{A()})}),dispose:()=>new Promise(A=>{if(C)return A();C=!0,n(d,{command:"dispose",key:t},()=>{A(),Y(),d.unref()})})};d.ref(),v(null,L)})}}var Xe=async(e,t,n,l,d,i,f,o,y)=>{let w=[],v=[],F={},U={},B=[],j=0,Q=0,T=[],W=!1;o=[...o];for(let m of o){let c={};if(typeof m!="object")throw new Error(`Plugin at index ${Q} must be an object`);let s=r(m,c,"name",h);if(typeof s!="string"||s==="")throw new Error(`Plugin at index ${Q} is missing a name`);try{let R=r(m,c,"setup",Ae);if(typeof R!="function")throw new Error("Plugin is missing a setup function");K(m,c,`on plugin ${V(s)}`);let S={name:s,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};Q++;let O=R({initialOptions:f,resolve:(a,u={})=>{if(!W)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),M=r(u,b,"pluginName",h),k=r(u,b,"importer",h),E=r(u,b,"namespace",h),p=r(u,b,"resolveDir",h),C=r(u,b,"kind",h),L=r(u,b,"pluginData",me);return K(u,b,"in resolve() call"),new Promise((A,P)=>{let D={command:"resolve",path:a,key:e,pluginName:s};if(M!=null&&(D.pluginName=M),k!=null&&(D.importer=k),E!=null&&(D.namespace=E),p!=null&&(D.resolveDir=p),C!=null)D.kind=C;else throw new Error('Must specify "kind" when calling "resolve"');L!=null&&(D.pluginData=y.store(L)),t(l,D,(q,_)=>{q!==null?P(new Error(q)):A({errors:oe(_.errors,y),warnings:oe(_.warnings,y),path:_.path,external:_.external,sideEffects:_.sideEffects,namespace:_.namespace,suffix:_.suffix,pluginData:y.load(_.pluginData)})})})},onStart(a){let u='This error came from the "onStart" callback registered here:',b=pe(new Error(u),d,"onStart");w.push({name:s,callback:a,note:b}),S.onStart=!0},onEnd(a){let u='This error came from the "onEnd" callback registered here:',b=pe(new Error(u),d,"onEnd");v.push({name:s,callback:a,note:b}),S.onEnd=!0},onResolve(a,u){let b='This error came from the "onResolve" callback registered here:',M=pe(new Error(b),d,"onResolve"),k={},E=r(a,k,"filter",ye),p=r(a,k,"namespace",h);if(K(a,k,`in onResolve() call for plugin ${V(s)}`),E==null)throw new Error("onResolve() call is missing a filter");let C=j++;F[C]={name:s,callback:u,note:M},S.onResolve.push({id:C,filter:E.source,namespace:p||""})},onLoad(a,u){let b='This error came from the "onLoad" callback registered here:',M=pe(new Error(b),d,"onLoad"),k={},E=r(a,k,"filter",ye),p=r(a,k,"namespace",h);if(K(a,k,`in onLoad() call for plugin ${V(s)}`),E==null)throw new Error("onLoad() call is missing a filter");let C=j++;U[C]={name:s,callback:u,note:M},S.onLoad.push({id:C,filter:E.source,namespace:p||""})},onDispose(a){B.push(a)},esbuild:d.esbuild});O&&await O,T.push(S)}catch(R){return{ok:!1,error:R,pluginName:s}}}i["on-start"]=async(m,c)=>{let s={errors:[],warnings:[]};await Promise.all(w.map(async({name:R,callback:S,note:$})=>{try{let O=await S();if(O!=null){if(typeof O!="object")throw new Error(`Expected onStart() callback in plugin ${V(R)} to return an object`);let a={},u=r(O,a,"errors",z),b=r(O,a,"warnings",z);K(O,a,`from onStart() callback in plugin ${V(R)}`),u!=null&&s.errors.push(...te(u,"errors",y,R)),b!=null&&s.warnings.push(...te(b,"warnings",y,R))}}catch(O){s.errors.push(ie(O,d,y,$&&$(),R))}})),n(m,s)},i["on-resolve"]=async(m,c)=>{let s={},R="",S,$;for(let O of c.ids)try{({name:R,callback:S,note:$}=F[O]);let a=await S({path:c.path,importer:c.importer,namespace:c.namespace,resolveDir:c.resolveDir,kind:c.kind,pluginData:y.load(c.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${V(R)} to return an object`);let u={},b=r(a,u,"pluginName",h),M=r(a,u,"path",h),k=r(a,u,"namespace",h),E=r(a,u,"suffix",h),p=r(a,u,"external",I),C=r(a,u,"sideEffects",I),L=r(a,u,"pluginData",me),A=r(a,u,"errors",z),P=r(a,u,"warnings",z),D=r(a,u,"watchFiles",z),q=r(a,u,"watchDirs",z);K(a,u,`from onResolve() callback in plugin ${V(R)}`),s.id=O,b!=null&&(s.pluginName=b),M!=null&&(s.path=M),k!=null&&(s.namespace=k),E!=null&&(s.suffix=E),p!=null&&(s.external=p),C!=null&&(s.sideEffects=C),L!=null&&(s.pluginData=y.store(L)),A!=null&&(s.errors=te(A,"errors",y,R)),P!=null&&(s.warnings=te(P,"warnings",y,R)),D!=null&&(s.watchFiles=ge(D,"watchFiles")),q!=null&&(s.watchDirs=ge(q,"watchDirs"));break}}catch(a){s={id:O,errors:[ie(a,d,y,$&&$(),R)]};break}n(m,s)},i["on-load"]=async(m,c)=>{let s={},R="",S,$;for(let O of c.ids)try{({name:R,callback:S,note:$}=U[O]);let a=await S({path:c.path,namespace:c.namespace,suffix:c.suffix,pluginData:y.load(c.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${V(R)} to return an object`);let u={},b=r(a,u,"pluginName",h),M=r(a,u,"contents",Pe),k=r(a,u,"resolveDir",h),E=r(a,u,"pluginData",me),p=r(a,u,"loader",h),C=r(a,u,"errors",z),L=r(a,u,"warnings",z),A=r(a,u,"watchFiles",z),P=r(a,u,"watchDirs",z);K(a,u,`from onLoad() callback in plugin ${V(R)}`),s.id=O,b!=null&&(s.pluginName=b),M instanceof Uint8Array?s.contents=M:M!=null&&(s.contents=Z(M)),k!=null&&(s.resolveDir=k),E!=null&&(s.pluginData=y.store(E)),p!=null&&(s.loader=p),C!=null&&(s.errors=te(C,"errors",y,R)),L!=null&&(s.warnings=te(L,"warnings",y,R)),A!=null&&(s.watchFiles=ge(A,"watchFiles")),P!=null&&(s.watchDirs=ge(P,"watchDirs"));break}}catch(a){s={id:O,errors:[ie(a,d,y,$&&$(),R)]};break}n(m,s)};let Y=(m,c)=>c([],[]);v.length>0&&(Y=(m,c)=>{(async()=>{let s=[],R=[];for(let{name:S,callback:$,note:O}of v){let a,u;try{let b=await $(m);if(b!=null){if(typeof b!="object")throw new Error(`Expected onEnd() callback in plugin ${V(S)} to return an object`);let M={},k=r(b,M,"errors",z),E=r(b,M,"warnings",z);K(b,M,`from onEnd() callback in plugin ${V(S)}`),k!=null&&(a=te(k,"errors",y,S)),E!=null&&(u=te(E,"warnings",y,S))}}catch(b){a=[ie(b,d,y,O&&O(),S)]}if(a){s.push(...a);try{m.errors.push(...a)}catch(b){}}if(u){R.push(...u);try{m.warnings.push(...u)}catch(b){}}}c(s,R)})()});let x=()=>{for(let m of B)setTimeout(()=>m(),0)};return W=!0,{ok:!0,requestPlugins:T,runOnEndCallbacks:Y,scheduleOnDisposeCallbacks:x}};function je(){let e=new Map,t=0;return{load(n){return e.get(n)},store(n){if(n===void 0)return-1;let l=t++;return e.set(l,n),l}}}function pe(e,t,n){let l,d=!1;return()=>{if(d)return l;d=!0;try{let i=(e.stack+"").split(`
|
7
|
+
`);i.splice(1,1);let f=qe(t,i,n);if(f)return l={text:e.message,location:f},l}catch(i){}}}function ie(e,t,n,l,d){let i="Internal error",f=null;try{i=(e&&e.message||e)+""}catch(o){}try{f=qe(t,(e.stack+"").split(`
|
8
|
+
`),"")}catch(o){}return{id:"",pluginName:d,text:i,location:f,notes:l?[l]:[],detail:n?n.store(e):-1}}function qe(e,t,n){let l=" at ";if(e.readFileSync&&!t[0].startsWith(l)&&t[1].startsWith(l))for(let d=1;d<t.length;d++){let i=t[d];if(i.startsWith(l))for(i=i.slice(l.length);;){let f=/^(?:new |async )?\S+ \((.*)\)$/.exec(i);if(f){i=f[1];continue}if(f=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(i),f){i=f[1];continue}if(f=/^(\S+):(\d+):(\d+)$/.exec(i),f){let o;try{o=e.readFileSync(f[1],"utf8")}catch(F){break}let y=o.split(/\r\n|\r|\n|\u2028|\u2029/)[+f[2]-1]||"",w=+f[3]-1,v=y.slice(w,w+n.length)===n?n.length:0;return{file:f[1],namespace:"file",line:+f[2],column:Z(y.slice(0,w)).length,length:Z(y.slice(w,w+v)).length,lineText:y+`
|
9
9
|
`+t.slice(1).join(`
|
10
|
-
`),suggestion:""}}break}}return null}function ue(e,t,n){let l=5,
|
11
|
-
...`;if(!
|
12
|
-
error: ${
|
13
|
-
${y}:${w}:${v}: ERROR: ${P}${d.text}`}).join(""),i=new Error(`${e}${f}`);return i.errors=t,i.warnings=n,i}function oe(e,t){for(let n of e)n.detail=t.load(n.detail);return e}function Ce(e,t){if(e==null)return null;let n={},l=r(e,n,"file",h),f=r(e,n,"namespace",h),i=r(e,n,"line",se),d=r(e,n,"column",se),s=r(e,n,"length",se),y=r(e,n,"lineText",h),w=r(e,n,"suggestion",h);return K(e,n,t),{file:l||"",namespace:f||"",line:i||0,column:d||0,length:s||0,lineText:y||"",suggestion:w||""}}function te(e,t,n,l){let f=[],i=0;for(let d of e){let s={},y=r(d,s,"id",h),w=r(d,s,"pluginName",h),v=r(d,s,"text",h),P=r(d,s,"location",Me),U=r(d,s,"notes",z),B=r(d,s,"detail",me),j=`in element ${i} of "${t}"`;K(d,s,j);let Q=[];if(U)for(let T of U){let W={},Y=r(T,W,"text",h),R=r(T,W,"location",Me);K(T,W,j),Q.push({text:Y||"",location:Ce(R,j)})}f.push({id:y||"",pluginName:w||l,text:v||"",location:Ce(P,j),notes:Q,detail:n?n.store(B):-1}),i++}return f}function ge(e,t){let n=[];for(let l of e){if(typeof l!="string")throw new Error(`${V(t)} must be an array of strings`);n.push(l)}return n}function Ze({path:e,contents:t}){let n=null;return{path:e,contents:t,get text(){let l=this.contents;return(n===null||l!==t)&&(t=l,n=re(l)),n}}}var tt="0.17.12",nt=e=>ce().build(e),rt=e=>ce().context(e),it=(e,t)=>ce().transform(e,t),lt=(e,t)=>ce().formatMessages(e,t),st=(e,t)=>ce().analyzeMetafile(e,t),ot=()=>{throw new Error('The "buildSync" API only works in node')},at=()=>{throw new Error('The "transformSync" API only works in node')},ut=()=>{throw new Error('The "formatMessagesSync" API only works in node')},ct=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ae,Oe,ce=()=>{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')},ft=e=>{e=Fe(e||{});let t=e.wasmURL,n=e.wasmModule,l=e.worker!==!1;if(!t&&!n)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ae)throw new Error('Cannot call "initialize" more than once');return ae=dt(t||"",n,l),ae.catch(()=>{ae=void 0}),ae},dt=async(e,t,n)=>{let l;if(n){let w=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=e=>{e!==0&&console.warn("exit code:",e)},this._exitPromise=new Promise(e=>{this._resolveExitPromise=e}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let l=this._ids.get(t);l===void 0&&(l=this._idPool.pop(),l===void 0&&(l=this._values.length),this._values[l]=t,this._goRefCounts[l]=0,this._ids.set(t,l)),this._goRefCounts[l]++;let m=0;switch(typeof t){case"object":t!==null&&(m=1);break;case"string":m=2;break;case"symbol":m=3;break;case"function":m=4;break}this.mem.setUint32(e+4,2146959360|m,!0),this.mem.setUint32(e,l,!0)},a=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},h=e=>{const t=n(e+0),o=n(e+8),l=new Array(o);for(let m=0;m<o;m++)l[m]=s(t+m*8);return l},u=e=>{const t=n(e+0),o=n(e+8);return g.decode(new DataView(this._inst.exports.mem.buffer,t,o))},d=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{e>>>=0;const t=n(e+8),o=n(e+16),l=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,l))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,c(e+8,(d+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();c(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(a(e+8))},"syscall/js.finalizeRef":e=>{e>>>=0;const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,this._goRefCounts[t]===0){const o=this._values[t];this._values[t]=null,this._ids.delete(o),this._idPool.push(t)}},"syscall/js.stringVal":e=>{e>>>=0,i(e+24,u(e+8))},"syscall/js.valueGet":e=>{e>>>=0;const t=Reflect.get(s(e+8),u(e+16));e=this._inst.exports.getsp()>>>0,i(e+32,t)},"syscall/js.valueSet":e=>{e>>>=0,Reflect.set(s(e+8),u(e+16),s(e+32))},"syscall/js.valueDelete":e=>{e>>>=0,Reflect.deleteProperty(s(e+8),u(e+16))},"syscall/js.valueIndex":e=>{e>>>=0,i(e+24,Reflect.get(s(e+8),n(e+16)))},"syscall/js.valueSetIndex":e=>{e>>>=0,Reflect.set(s(e+8),n(e+16),s(e+24))},"syscall/js.valueCall":e=>{e>>>=0;try{const t=s(e+8),o=Reflect.get(t,u(e+16)),l=h(e+32),m=Reflect.apply(o,t,l);e=this._inst.exports.getsp()>>>0,i(e+56,m),this.mem.setUint8(e+64,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":e=>{e>>>=0,c(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=f.encode(String(s(e+8)));i(e+16,t),c(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);a(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{e>>>=0,this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":e=>{e>>>=0;const t=a(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=a(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}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=e=>{const t=n,o=f.encode(e+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),t},i=this.argv.length,a=[];this.argv.forEach(e=>{a.push(s(e))}),a.push(0),Object.keys(this.env).sort().forEach(e=>{a.push(s(`${e}=${this.env[e]}`))}),a.push(0);const u=n;a.forEach(e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8});const d=4096+8192;if(n>=d)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,e,t,o)=>{if(h!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,e,t,o);return}let l=n[0],m=Math.max(0,Math.min(e,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.17.12"],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"});l=new Worker(URL.createObjectURL(w))}else{let w=(postMessage=>{
|
10
|
+
`),suggestion:""}}break}}return null}function ue(e,t,n){let l=5,d=t.length<1?"":` with ${t.length} error${t.length<2?"":"s"}:`+t.slice(0,l+1).map((f,o)=>{if(o===l)return`
|
11
|
+
...`;if(!f.location)return`
|
12
|
+
error: ${f.text}`;let{file:y,line:w,column:v}=f.location,F=f.pluginName?`[plugin: ${f.pluginName}] `:"";return`
|
13
|
+
${y}:${w}:${v}: ERROR: ${F}${f.text}`}).join(""),i=new Error(`${e}${d}`);return i.errors=t,i.warnings=n,i}function oe(e,t){for(let n of e)n.detail=t.load(n.detail);return e}function Ce(e,t){if(e==null)return null;let n={},l=r(e,n,"file",h),d=r(e,n,"namespace",h),i=r(e,n,"line",se),f=r(e,n,"column",se),o=r(e,n,"length",se),y=r(e,n,"lineText",h),w=r(e,n,"suggestion",h);return K(e,n,t),{file:l||"",namespace:d||"",line:i||0,column:f||0,length:o||0,lineText:y||"",suggestion:w||""}}function te(e,t,n,l){let d=[],i=0;for(let f of e){let o={},y=r(f,o,"id",h),w=r(f,o,"pluginName",h),v=r(f,o,"text",h),F=r(f,o,"location",Me),U=r(f,o,"notes",z),B=r(f,o,"detail",me),j=`in element ${i} of "${t}"`;K(f,o,j);let Q=[];if(U)for(let T of U){let W={},Y=r(T,W,"text",h),x=r(T,W,"location",Me);K(T,W,j),Q.push({text:Y||"",location:Ce(x,j)})}d.push({id:y||"",pluginName:w||l,text:v||"",location:Ce(F,j),notes:Q,detail:n?n.store(B):-1}),i++}return d}function ge(e,t){let n=[];for(let l of e){if(typeof l!="string")throw new Error(`${V(t)} must be an array of strings`);n.push(l)}return n}function Ze({path:e,contents:t}){let n=null;return{path:e,contents:t,get text(){let l=this.contents;return(n===null||l!==t)&&(t=l,n=re(l)),n}}}var tt="0.18.4",nt=e=>ce().build(e),rt=e=>ce().context(e),it=(e,t)=>ce().transform(e,t),lt=(e,t)=>ce().formatMessages(e,t),st=(e,t)=>ce().analyzeMetafile(e,t),ot=()=>{throw new Error('The "buildSync" API only works in node')},at=()=>{throw new Error('The "transformSync" API only works in node')},ut=()=>{throw new Error('The "formatMessagesSync" API only works in node')},ct=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ae,Oe,ce=()=>{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')},ft=e=>{e=Fe(e||{});let t=e.wasmURL,n=e.wasmModule,l=e.worker!==!1;if(!t&&!n)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ae)throw new Error('Cannot call "initialize" more than once');return ae=dt(t||"",n,l),ae.catch(()=>{ae=void 0}),ae},dt=async(e,t,n)=>{let l;if(n){let w=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=e=>{e!==0&&console.warn("exit code:",e)},this._exitPromise=new Promise(e=>{this._resolveExitPromise=e}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let l=this._ids.get(t);l===void 0&&(l=this._idPool.pop(),l===void 0&&(l=this._values.length),this._values[l]=t,this._goRefCounts[l]=0,this._ids.set(t,l)),this._goRefCounts[l]++;let m=0;switch(typeof t){case"object":t!==null&&(m=1);break;case"string":m=2;break;case"symbol":m=3;break;case"function":m=4;break}this.mem.setUint32(e+4,2146959360|m,!0),this.mem.setUint32(e,l,!0)},a=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},h=e=>{const t=n(e+0),o=n(e+8),l=new Array(o);for(let m=0;m<o;m++)l[m]=s(t+m*8);return l},u=e=>{const t=n(e+0),o=n(e+8);return g.decode(new DataView(this._inst.exports.mem.buffer,t,o))},d=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{e>>>=0;const t=n(e+8),o=n(e+16),l=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,l))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,c(e+8,(d+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();c(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(a(e+8))},"syscall/js.finalizeRef":e=>{e>>>=0;const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,this._goRefCounts[t]===0){const o=this._values[t];this._values[t]=null,this._ids.delete(o),this._idPool.push(t)}},"syscall/js.stringVal":e=>{e>>>=0,i(e+24,u(e+8))},"syscall/js.valueGet":e=>{e>>>=0;const t=Reflect.get(s(e+8),u(e+16));e=this._inst.exports.getsp()>>>0,i(e+32,t)},"syscall/js.valueSet":e=>{e>>>=0,Reflect.set(s(e+8),u(e+16),s(e+32))},"syscall/js.valueDelete":e=>{e>>>=0,Reflect.deleteProperty(s(e+8),u(e+16))},"syscall/js.valueIndex":e=>{e>>>=0,i(e+24,Reflect.get(s(e+8),n(e+16)))},"syscall/js.valueSetIndex":e=>{e>>>=0,Reflect.set(s(e+8),n(e+16),s(e+24))},"syscall/js.valueCall":e=>{e>>>=0;try{const t=s(e+8),o=Reflect.get(t,u(e+16)),l=h(e+32),m=Reflect.apply(o,t,l);e=this._inst.exports.getsp()>>>0,i(e+56,m),this.mem.setUint8(e+64,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":e=>{e>>>=0,c(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=f.encode(String(s(e+8)));i(e+16,t),c(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);a(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{e>>>=0,this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":e=>{e>>>=0;const t=a(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=a(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}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=e=>{const t=n,o=f.encode(e+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),t},i=this.argv.length,a=[];this.argv.forEach(e=>{a.push(s(e))}),a.push(0),Object.keys(this.env).sort().forEach(e=>{a.push(s(`${e}=${this.env[e]}`))}),a.push(0);const u=n;a.forEach(e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8});const d=4096+8192;if(n>=d)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,e,t,o)=>{if(h!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,e,t,o);return}let l=n[0],m=Math.max(0,Math.min(e,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.18.4"],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"});l=new Worker(URL.createObjectURL(w))}else{let w=(postMessage=>{
|
14
14
|
// Copyright 2018 The Go Authors. All rights reserved.
|
15
15
|
// Use of this source code is governed by a BSD-style
|
16
16
|
// license that can be found in the LICENSE file.
|
17
17
|
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(`
|
18
18
|
`);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=e=>{e!==0&&console.warn("exit code:",e)},this._exitPromise=new Promise(e=>{this._resolveExitPromise=e}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let l=this._ids.get(t);l===void 0&&(l=this._idPool.pop(),l===void 0&&(l=this._values.length),this._values[l]=t,this._goRefCounts[l]=0,this._ids.set(t,l)),this._goRefCounts[l]++;let m=0;switch(typeof t){case"object":t!==null&&(m=1);break;case"string":m=2;break;case"symbol":m=3;break;case"function":m=4;break}this.mem.setUint32(e+4,2146959360|m,!0),this.mem.setUint32(e,l,!0)},a=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},h=e=>{const t=n(e+0),o=n(e+8),l=new Array(o);for(let m=0;m<o;m++)l[m]=s(t+m*8);return l},u=e=>{const t=n(e+0),o=n(e+8);return g.decode(new DataView(this._inst.exports.mem.buffer,t,o))},d=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{e>>>=0;const t=n(e+8),o=n(e+16),l=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,l))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,c(e+8,(d+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();c(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(a(e+8))},"syscall/js.finalizeRef":e=>{e>>>=0;const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,this._goRefCounts[t]===0){const o=this._values[t];this._values[t]=null,this._ids.delete(o),this._idPool.push(t)}},"syscall/js.stringVal":e=>{e>>>=0,i(e+24,u(e+8))},"syscall/js.valueGet":e=>{e>>>=0;const t=Reflect.get(s(e+8),u(e+16));e=this._inst.exports.getsp()>>>0,i(e+32,t)},"syscall/js.valueSet":e=>{e>>>=0,Reflect.set(s(e+8),u(e+16),s(e+32))},"syscall/js.valueDelete":e=>{e>>>=0,Reflect.deleteProperty(s(e+8),u(e+16))},"syscall/js.valueIndex":e=>{e>>>=0,i(e+24,Reflect.get(s(e+8),n(e+16)))},"syscall/js.valueSetIndex":e=>{e>>>=0,Reflect.set(s(e+8),n(e+16),s(e+24))},"syscall/js.valueCall":e=>{e>>>=0;try{const t=s(e+8),o=Reflect.get(t,u(e+16)),l=h(e+32),m=Reflect.apply(o,t,l);e=this._inst.exports.getsp()>>>0,i(e+56,m),this.mem.setUint8(e+64,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":e=>{e>>>=0,c(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=f.encode(String(s(e+8)));i(e+16,t),c(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);a(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{e>>>=0,this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":e=>{e>>>=0;const t=a(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=a(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}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=e=>{const t=n,o=f.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),t},i=this.argv.length,a=[];this.argv.forEach(e=>{a.push(s(e))}),a.push(0),Object.keys(this.env).sort().forEach(e=>{a.push(s(`${e}=${this.env[e]}`))}),a.push(0);const u=n;a.forEach(e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8});const d=4096+8192;if(n>=d)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(`
|
19
19
|
`);d.length>1&&console.log(d.slice(0,-1).join(`
|
20
|
-
`)),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,e,t,o)=>{if(h!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,e,t,o);return}let l=n[0],m=Math.max(0,Math.min(e,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.
|
20
|
+
`)),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,e,t,o)=>{if(h!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,e,t,o);return}let l=n[0],m=Math.max(0,Math.min(e,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.18.4"],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);})(v=>l.onmessage({data:v}));l={onmessage:null,postMessage:v=>setTimeout(()=>w({data:v})),terminate(){}}}let d,i,f=new Promise((w,v)=>{d=w,i=v});l.onmessage=({data:w})=>{l.onmessage=({data:v})=>o(v),w?i(w):d()},l.postMessage(t||new URL(e,location.href).toString());let{readFromStdout:o,service:y}=Ue({writeToStdin(w){l.postMessage(w)},isSync:!1,hasFS:!1,esbuild:be});await f,Oe={build:w=>new Promise((v,F)=>y.buildOrContext({callName:"build",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?F(U):v(B)})),context:w=>new Promise((v,F)=>y.buildOrContext({callName:"context",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?F(U):v(B)})),transform:(w,v)=>new Promise((F,U)=>y.transform({callName:"transform",refs:null,input:w,options:v||{},isTTY:!1,fs:{readFile(B,j){j(new Error("Internal error"),null)},writeFile(B,j){j(null)}},callback:(B,j)=>B?U(B):F(j)})),formatMessages:(w,v)=>new Promise((F,U)=>y.formatMessages({callName:"formatMessages",refs:null,messages:w,options:v,callback:(B,j)=>B?U(B):F(j)})),analyzeMetafile:(w,v)=>new Promise((F,U)=>y.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof w=="string"?w:JSON.stringify(w),options:v,callback:(B,j)=>B?U(B):F(j)}))}},pt=be;export{st as analyzeMetafile,ct as analyzeMetafileSync,nt as build,ot as buildSync,rt as context,pt as default,lt as formatMessages,ut as formatMessagesSync,ft as initialize,it as transform,at as transformSync,tt as version};
|
@@ -79,6 +79,26 @@ interface CommonOptions {
|
|
79
79
|
logLimit?: number
|
80
80
|
/** Documentation: https://esbuild.github.io/api/#log-override */
|
81
81
|
logOverride?: Record<string, LogLevel>
|
82
|
+
|
83
|
+
/** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
|
84
|
+
tsconfigRaw?: string | {
|
85
|
+
compilerOptions?: {
|
86
|
+
alwaysStrict?: boolean
|
87
|
+
baseUrl?: boolean
|
88
|
+
experimentalDecorators?: boolean
|
89
|
+
importsNotUsedAsValues?: 'remove' | 'preserve' | 'error'
|
90
|
+
jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev'
|
91
|
+
jsxFactory?: string
|
92
|
+
jsxFragmentFactory?: string
|
93
|
+
jsxImportSource?: string
|
94
|
+
paths?: Record<string, string[]>
|
95
|
+
preserveValueImports?: boolean
|
96
|
+
strict?: boolean
|
97
|
+
target?: string
|
98
|
+
useDefineForClassFields?: boolean
|
99
|
+
verbatimModuleSyntax?: boolean
|
100
|
+
}
|
101
|
+
}
|
82
102
|
}
|
83
103
|
|
84
104
|
export interface BuildOptions extends CommonOptions {
|
@@ -191,15 +211,15 @@ export interface OutputFile {
|
|
191
211
|
readonly text: string
|
192
212
|
}
|
193
213
|
|
194
|
-
export interface BuildResult<
|
214
|
+
export interface BuildResult<ProvidedOptions extends BuildOptions = BuildOptions> {
|
195
215
|
errors: Message[]
|
196
216
|
warnings: Message[]
|
197
217
|
/** Only when "write: false" */
|
198
|
-
outputFiles: OutputFile[] | (
|
218
|
+
outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined)
|
199
219
|
/** Only when "metafile: true" */
|
200
|
-
metafile: Metafile | (
|
220
|
+
metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined)
|
201
221
|
/** Only when "mangleCache" is present */
|
202
|
-
mangleCache: Record<string, string | false> | (
|
222
|
+
mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
|
203
223
|
}
|
204
224
|
|
205
225
|
export interface BuildFailure extends Error {
|
@@ -233,34 +253,24 @@ export interface ServeResult {
|
|
233
253
|
}
|
234
254
|
|
235
255
|
export interface TransformOptions extends CommonOptions {
|
236
|
-
|
237
|
-
compilerOptions?: {
|
238
|
-
alwaysStrict?: boolean,
|
239
|
-
importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
|
240
|
-
jsx?: 'react' | 'react-jsx' | 'react-jsxdev' | 'preserve',
|
241
|
-
jsxFactory?: string,
|
242
|
-
jsxFragmentFactory?: string,
|
243
|
-
jsxImportSource?: string,
|
244
|
-
preserveValueImports?: boolean,
|
245
|
-
target?: string,
|
246
|
-
useDefineForClassFields?: boolean,
|
247
|
-
},
|
248
|
-
}
|
249
|
-
|
256
|
+
/** Documentation: https://esbuild.github.io/api/#sourcefile */
|
250
257
|
sourcefile?: string
|
258
|
+
/** Documentation: https://esbuild.github.io/api/#loader */
|
251
259
|
loader?: Loader
|
260
|
+
/** Documentation: https://esbuild.github.io/api/#banner */
|
252
261
|
banner?: string
|
262
|
+
/** Documentation: https://esbuild.github.io/api/#footer */
|
253
263
|
footer?: string
|
254
264
|
}
|
255
265
|
|
256
|
-
export interface TransformResult<
|
266
|
+
export interface TransformResult<ProvidedOptions extends TransformOptions = TransformOptions> {
|
257
267
|
code: string
|
258
268
|
map: string
|
259
269
|
warnings: Message[]
|
260
270
|
/** Only when "mangleCache" is present */
|
261
|
-
mangleCache: Record<string, string | false> | (
|
271
|
+
mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
|
262
272
|
/** Only when "legalComments" is "external" */
|
263
|
-
legalComments: string | (
|
273
|
+
legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined)
|
264
274
|
}
|
265
275
|
|
266
276
|
export interface TransformFailure extends Error {
|
@@ -487,9 +497,9 @@ export interface AnalyzeMetafileOptions {
|
|
487
497
|
export interface WatchOptions {
|
488
498
|
}
|
489
499
|
|
490
|
-
export interface BuildContext<
|
500
|
+
export interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> {
|
491
501
|
/** Documentation: https://esbuild.github.io/api/#rebuild */
|
492
|
-
rebuild(): Promise<BuildResult<
|
502
|
+
rebuild(): Promise<BuildResult<ProvidedOptions>>
|
493
503
|
|
494
504
|
/** Documentation: https://esbuild.github.io/api/#watch */
|
495
505
|
watch(options?: WatchOptions): Promise<void>
|
@@ -501,6 +511,11 @@ export interface BuildContext<SpecificOptions extends BuildOptions = BuildOption
|
|
501
511
|
dispose(): Promise<void>
|
502
512
|
}
|
503
513
|
|
514
|
+
// This is a TypeScript type-level function which replaces any keys in "In"
|
515
|
+
// that aren't in "Out" with "never". We use this to reject properties with
|
516
|
+
// typos in object literals. See: https://stackoverflow.com/questions/49580725
|
517
|
+
type SameShape<Out, In extends Out> = In & { [Key in Exclude<keyof In, keyof Out>]: never }
|
518
|
+
|
504
519
|
/**
|
505
520
|
* This function invokes the "esbuild" command-line tool for you. It returns a
|
506
521
|
* promise that either resolves with a "BuildResult" object or rejects with a
|
@@ -511,8 +526,7 @@ export interface BuildContext<SpecificOptions extends BuildOptions = BuildOption
|
|
511
526
|
*
|
512
527
|
* Documentation: https://esbuild.github.io/api/#build
|
513
528
|
*/
|
514
|
-
export declare function build<
|
515
|
-
export declare function build(options: BuildOptions): Promise<BuildResult>
|
529
|
+
export declare function build<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildResult<T>>
|
516
530
|
|
517
531
|
/**
|
518
532
|
* This is the advanced long-running form of "build" that supports additional
|
@@ -523,8 +537,7 @@ export declare function build(options: BuildOptions): Promise<BuildResult>
|
|
523
537
|
*
|
524
538
|
* Documentation: https://esbuild.github.io/api/#build
|
525
539
|
*/
|
526
|
-
export declare function context<T extends BuildOptions>(options: T): Promise<BuildContext<T>>
|
527
|
-
export declare function context(options: BuildOptions): Promise<BuildContext>
|
540
|
+
export declare function context<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildContext<T>>
|
528
541
|
|
529
542
|
/**
|
530
543
|
* This function transforms a single JavaScript file. It can be used to minify
|
@@ -537,8 +550,7 @@ export declare function context(options: BuildOptions): Promise<BuildContext>
|
|
537
550
|
*
|
538
551
|
* Documentation: https://esbuild.github.io/api/#transform
|
539
552
|
*/
|
540
|
-
export declare function transform<
|
541
|
-
export declare function transform(input: string | Uint8Array, options?: TransformOptions): Promise<TransformResult>
|
553
|
+
export declare function transform<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): Promise<TransformResult<T>>
|
542
554
|
|
543
555
|
/**
|
544
556
|
* Converts log messages to formatted message strings suitable for printing in
|
@@ -570,8 +582,7 @@ export declare function analyzeMetafile(metafile: Metafile | string, options?: A
|
|
570
582
|
*
|
571
583
|
* Documentation: https://esbuild.github.io/api/#build
|
572
584
|
*/
|
573
|
-
export declare function buildSync<
|
574
|
-
export declare function buildSync(options: BuildOptions): BuildResult
|
585
|
+
export declare function buildSync<T extends BuildOptions>(options: SameShape<BuildOptions, T>): BuildResult<T>
|
575
586
|
|
576
587
|
/**
|
577
588
|
* A synchronous version of "transform".
|
@@ -581,8 +592,7 @@ export declare function buildSync(options: BuildOptions): BuildResult
|
|
581
592
|
*
|
582
593
|
* Documentation: https://esbuild.github.io/api/#transform
|
583
594
|
*/
|
584
|
-
export declare function transformSync<
|
585
|
-
export declare function transformSync(input: string | Uint8Array, options?: TransformOptions): TransformResult
|
595
|
+
export declare function transformSync<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): TransformResult<T>
|
586
596
|
|
587
597
|
/**
|
588
598
|
* A synchronous version of "formatMessages".
|