isomorfeus-asset-manager 0.15.5 → 0.15.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f44ff99928ab2c60169756f5bba25744b37fbfe612325b21778856fe3844d5a0
4
- data.tar.gz: 68b5e4ba520d8ce8397277cab6e0fb7201742b23e6e356b5d4497b643d10ed96
3
+ metadata.gz: 01b9c5c71265d26294e82c117e1b925629205df732b69bc9d71572c914ed9d22
4
+ data.tar.gz: 5ffbe43b6bc53503dd4aeebbb9ddf8fcf6752a6c158bad63f1a6062ab71c53d0
5
5
  SHA512:
6
- metadata.gz: 28acbd98ad2d5bce74db561c1ae2c131ec42b64e0cff04cbf1376c7dfe25331243fd5ffed184036dfde3a2c44d6b8702a6f2b1d4bcd2923ac72b15efc90cc433
7
- data.tar.gz: f5cde2f1cf4aec902bb6dbd297aaad29bf1ded58a4e9b19050cf72f3ef4624d04353e147ed75bcf0fbb6055f9deb4fa3415b7c273a68f2a8f277bfbf32989936
6
+ metadata.gz: 384ba3538963ac1784b8cca5ae4ce0c490e2ae5da20a280f8ed20847bbbd6268bd322c7468aa7ddc22879ef524630d388d5cd9d13262229454752028fd6106e6
7
+ data.tar.gz: fbe2c4ed2a4ba5b76ca3b3c4eff0adc8e0e684d05635ccd6890f94f506245b95932378669356d8ae223b2c246cf82e2e27755dd60e76845ec56120adb9e8276f
@@ -34,6 +34,7 @@ module Isomorfeus
34
34
  def add_js_import(*args)
35
35
  @js_imports << Isomorfeus::AssetManager::JsImport.new(*args)
36
36
  end
37
+ alias add_css_import add_js_import
37
38
 
38
39
  def add_ruby_import(*args)
39
40
  @ruby_imports << Isomorfeus::AssetManager::RubyImport.new(*args)
@@ -20,28 +20,10 @@ module Isomorfeus
20
20
  Isomorfeus.assets['web.js'].add_js_import(*args)
21
21
  end
22
22
 
23
- def add_ssr_js_import(*args)
24
- Isomorfeus.assets['ssr.js'].add_js_import(*args)
25
- end
26
-
27
- def add_common_js_import(*args)
28
- Isomorfeus.assets['web.js'].add_js_import(*args)
29
- Isomorfeus.assets['ssr.js'].add_js_import(*args)
30
- end
31
-
32
23
  def add_web_ruby_import(*args)
33
24
  Isomorfeus.assets['web.js'].add_ruby_import(*args)
34
25
  end
35
26
 
36
- def add_ssr_ruby_import(*args)
37
- Isomorfeus.assets['ssr.js'].add_ruby_import(*args)
38
- end
39
-
40
- def add_common_ruby_import(*args)
41
- Isomorfeus.assets['web.js'].add_ruby_import(*args)
42
- Isomorfeus.assets['ssr.js'].add_ruby_import(*args)
43
- end
44
-
45
27
  # client side env is initialized in isomorfeus-preact
46
28
  def env=(env_string)
47
29
  @env = env_string ? env_string.to_s : 'development'
@@ -81,10 +63,7 @@ module Isomorfeus
81
63
  self.asset_manager_hmr_dirs = %w[channels components data imports locales mail_components operations policies server]
82
64
  self.hmr_websocket_path = '/_asset_manager_hmr_websocket'
83
65
  self.assets_path = '/assets'
84
- self.assets = {
85
- 'web.js' => Isomorfeus::AssetManager::Asset.new(:browser),
86
- 'ssr.js' => Isomorfeus::AssetManager::Asset.new(:node)
87
- }
66
+ self.assets = { 'web.js' => Isomorfeus::AssetManager::Asset.new(:browser) }
88
67
  self.asset_manager_tmpdir = Dir.mktmpdir
89
68
  Kernel.at_exit { FileUtils.rm_rf(Isomorfeus.asset_manager_tmpdir) if Dir.exist?(Isomorfeus.asset_manager_tmpdir) }
90
69
  end
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  class AssetManager
3
- VERSION = '0.15.5'
3
+ VERSION = '0.15.6'
4
4
  end
5
5
  end
@@ -1,19 +1,10 @@
1
1
  module Isomorfeus
2
2
  class AssetManager
3
- @@app_common_imports = false
4
3
  @@app_web_imports = false
5
- @@app_ssr_imports = false
6
4
 
7
5
  def self.add_app_imports
8
6
  imports_path = File.expand_path(File.join(Isomorfeus.app_root, 'imports'))
9
7
  if Dir.exist?(imports_path)
10
- unless @@app_common_imports
11
- common_imports_file = File.join(imports_path, 'common.js')
12
- if File.exist?(common_imports_file)
13
- Isomorfeus.add_common_js_import(common_imports_file)
14
- @@app_common_imports = true
15
- end
16
- end
17
8
  unless @@app_web_imports
18
9
  web_imports_file = File.join(imports_path, 'web.js')
19
10
  if File.exist?(web_imports_file)
@@ -21,13 +12,6 @@ module Isomorfeus
21
12
  @@app_web_imports = true
22
13
  end
23
14
  end
24
- unless @@app_ssr_imports
25
- ssr_imports_file = File.join(imports_path, 'ssr.js')
26
- if File.exist?(ssr_imports_file)
27
- Isomorfeus.add_ssr_js_import(ssr_imports_file)
28
- @@app_ssr_imports
29
- end
30
- end
31
15
  end
32
16
  end
33
17
 
@@ -52,7 +36,7 @@ module Isomorfeus
52
36
  asset.mutex.synchronize do
53
37
  return if asset.bundled?
54
38
  start = Time.now
55
- puts "Isomorfeus Asset Manager bundling #{asset_key} ..."
39
+ print "Isomorfeus Asset Manager bundling #{asset_key}#{analyze ? ':' : ' ...'}"
56
40
  asset.touch
57
41
  asset_name = asset_key[0..-4]
58
42
  asset.build_ruby_and_save(asset_key, asset_name, @imports_path)
@@ -65,7 +49,7 @@ module Isomorfeus
65
49
  asset.bundle_js_map(asset_key, @output_path)
66
50
  end
67
51
  asset.bundled!
68
- puts "Isomorfeus Asset Manager bundling #{asset_key} took #{Time.now - start}s"
52
+ puts "#{'bundling' if analyze} took #{Time.now - start}s"
69
53
  end
70
54
  end
71
55
 
@@ -175,7 +159,7 @@ module Isomorfeus
175
159
  analysis = @context.await <<~JAVASCRIPT
176
160
  esbuild.analyzeMetafile(global.res_meta, { verbose: true });
177
161
  JAVASCRIPT
178
- STDOUT.puts "Bundle analysis for #{asset_key}:\n#{analysis}\n"
162
+ puts "\n#{analysis}\n"
179
163
  end
180
164
  handle_errors(asset_key, result)
181
165
  end
@@ -4,9 +4,9 @@
4
4
  "requires": true,
5
5
  "packages": {
6
6
  "node_modules/esbuild-wasm": {
7
- "version": "0.15.9",
8
- "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.15.9.tgz",
9
- "integrity": "sha512-5ST4pyUZMRnYg/D6zxPxmCovDSPtxHcckLNf8uPU4YkqBr4xsSSkcaijBB5dcy7gu1DqRS0uDaK5j+cZLrtbdg==",
7
+ "version": "0.15.12",
8
+ "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.15.12.tgz",
9
+ "integrity": "sha512-mm6ouQxg27wHHIBc7ii8x4v2eu67O14wfa7OM0gfwmrHVzuQCLd6hATK/tvR73Pif/WS+/OvhcV4hY0REfHeUw==",
10
10
  "bin": {
11
11
  "esbuild": "bin/esbuild"
12
12
  },
Binary file
@@ -252,11 +252,15 @@ export interface ServeResult {
252
252
  export interface TransformOptions extends CommonOptions {
253
253
  tsconfigRaw?: string | {
254
254
  compilerOptions?: {
255
+ alwaysStrict?: boolean,
256
+ importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
257
+ jsx?: 'react' | 'react-jsx' | 'react-jsxdev' | 'preserve',
255
258
  jsxFactory?: string,
256
259
  jsxFragmentFactory?: string,
257
- useDefineForClassFields?: boolean,
258
- importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
260
+ jsxImportSource?: string,
259
261
  preserveValueImports?: boolean,
262
+ target?: string,
263
+ useDefineForClassFields?: boolean,
260
264
  },
261
265
  };
262
266
 
@@ -448,6 +452,7 @@ export interface Metafile {
448
452
  }[]
449
453
  exports: string[]
450
454
  entryPoint?: string
455
+ cssBundle?: string
451
456
  }
452
457
  }
453
458
  }
@@ -689,8 +689,8 @@ function createChannel(streamIn) {
689
689
  if (isFirstPacket) {
690
690
  isFirstPacket = false;
691
691
  let binaryVersion = String.fromCharCode(...bytes);
692
- if (binaryVersion !== "0.15.9") {
693
- throw new Error(`Cannot start service: Host version "${"0.15.9"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
692
+ if (binaryVersion !== "0.15.12") {
693
+ throw new Error(`Cannot start service: Host version "${"0.15.12"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
694
694
  }
695
695
  return;
696
696
  }
@@ -1640,7 +1640,7 @@ function convertOutputFiles({ path, contents }) {
1640
1640
  }
1641
1641
 
1642
1642
  // lib/npm/browser.ts
1643
- var version = "0.15.9";
1643
+ var version = "0.15.12";
1644
1644
  var build = (options) => ensureServiceIsRunning().build(options);
1645
1645
  var serve = () => {
1646
1646
  throw new Error(`The "serve" API only works in node`);
@@ -1696,7 +1696,7 @@ var startRunningService = async (wasmURL, wasmModule, useWorker) => {
1696
1696
  }
1697
1697
  let worker;
1698
1698
  if (useWorker) {
1699
- let blob = 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.\n let onmessage;\n let globalThis = {};\n for (let o = self; o; o = Object.getPrototypeOf(o))\n for (let k of Object.getOwnPropertyNames(o))\n if (!(k in globalThis))\n Object.defineProperty(globalThis, k, { get: () => self[k] });\n "use strict";\n (() => {\n const enosys = () => {\n const err = new Error("not implemented");\n err.code = "ENOSYS";\n return err;\n };\n if (!globalThis.fs) {\n let outputBuf = "";\n globalThis.fs = {\n constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 },\n writeSync(fd, buf) {\n outputBuf += decoder.decode(buf);\n const nl = outputBuf.lastIndexOf("\\n");\n if (nl != -1) {\n console.log(outputBuf.substr(0, nl));\n outputBuf = outputBuf.substr(nl + 1);\n }\n return buf.length;\n },\n write(fd, buf, offset, length, position, callback) {\n if (offset !== 0 || length !== buf.length || position !== null) {\n callback(enosys());\n return;\n }\n const n = this.writeSync(fd, buf);\n callback(null, n);\n },\n chmod(path, mode, callback) {\n callback(enosys());\n },\n chown(path, uid, gid, callback) {\n callback(enosys());\n },\n close(fd, callback) {\n callback(enosys());\n },\n fchmod(fd, mode, callback) {\n callback(enosys());\n },\n fchown(fd, uid, gid, callback) {\n callback(enosys());\n },\n fstat(fd, callback) {\n callback(enosys());\n },\n fsync(fd, callback) {\n callback(null);\n },\n ftruncate(fd, length, callback) {\n callback(enosys());\n },\n lchown(path, uid, gid, callback) {\n callback(enosys());\n },\n link(path, link, callback) {\n callback(enosys());\n },\n lstat(path, callback) {\n callback(enosys());\n },\n mkdir(path, perm, callback) {\n callback(enosys());\n },\n open(path, flags, mode, callback) {\n callback(enosys());\n },\n read(fd, buffer, offset, length, position, callback) {\n callback(enosys());\n },\n readdir(path, callback) {\n callback(enosys());\n },\n readlink(path, callback) {\n callback(enosys());\n },\n rename(from, to, callback) {\n callback(enosys());\n },\n rmdir(path, callback) {\n callback(enosys());\n },\n stat(path, callback) {\n callback(enosys());\n },\n symlink(path, link, callback) {\n callback(enosys());\n },\n truncate(path, length, callback) {\n callback(enosys());\n },\n unlink(path, callback) {\n callback(enosys());\n },\n utimes(path, atime, mtime, callback) {\n callback(enosys());\n }\n };\n }\n if (!globalThis.process) {\n globalThis.process = {\n getuid() {\n return -1;\n },\n getgid() {\n return -1;\n },\n geteuid() {\n return -1;\n },\n getegid() {\n return -1;\n },\n getgroups() {\n throw enosys();\n },\n pid: -1,\n ppid: -1,\n umask() {\n throw enosys();\n },\n cwd() {\n throw enosys();\n },\n chdir() {\n throw enosys();\n }\n };\n }\n if (!globalThis.crypto) {\n throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");\n }\n if (!globalThis.performance) {\n throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");\n }\n if (!globalThis.TextEncoder) {\n throw new Error("globalThis.TextEncoder is not available, polyfill required");\n }\n if (!globalThis.TextDecoder) {\n throw new Error("globalThis.TextDecoder is not available, polyfill required");\n }\n const encoder = new TextEncoder("utf-8");\n const decoder = new TextDecoder("utf-8");\n globalThis.Go = class {\n constructor() {\n this.argv = ["js"];\n this.env = {};\n this.exit = (code) => {\n if (code !== 0) {\n console.warn("exit code:", code);\n }\n };\n this._exitPromise = new Promise((resolve) => {\n this._resolveExitPromise = resolve;\n });\n this._pendingEvent = null;\n this._scheduledTimeouts = /* @__PURE__ */ new Map();\n this._nextCallbackTimeoutID = 1;\n const setInt64 = (addr, v) => {\n this.mem.setUint32(addr + 0, v, true);\n this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n };\n const getInt64 = (addr) => {\n const low = this.mem.getUint32(addr + 0, true);\n const high = this.mem.getInt32(addr + 4, true);\n return low + high * 4294967296;\n };\n const loadValue = (addr) => {\n const f = this.mem.getFloat64(addr, true);\n if (f === 0) {\n return void 0;\n }\n if (!isNaN(f)) {\n return f;\n }\n const id = this.mem.getUint32(addr, true);\n return this._values[id];\n };\n const storeValue = (addr, v) => {\n const nanHead = 2146959360;\n if (typeof v === "number" && v !== 0) {\n if (isNaN(v)) {\n this.mem.setUint32(addr + 4, nanHead, true);\n this.mem.setUint32(addr, 0, true);\n return;\n }\n this.mem.setFloat64(addr, v, true);\n return;\n }\n if (v === void 0) {\n this.mem.setFloat64(addr, 0, true);\n return;\n }\n let id = this._ids.get(v);\n if (id === void 0) {\n id = this._idPool.pop();\n if (id === void 0) {\n id = this._values.length;\n }\n this._values[id] = v;\n this._goRefCounts[id] = 0;\n this._ids.set(v, id);\n }\n this._goRefCounts[id]++;\n let typeFlag = 0;\n switch (typeof v) {\n case "object":\n if (v !== null) {\n typeFlag = 1;\n }\n break;\n case "string":\n typeFlag = 2;\n break;\n case "symbol":\n typeFlag = 3;\n break;\n case "function":\n typeFlag = 4;\n break;\n }\n this.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n this.mem.setUint32(addr, id, true);\n };\n const loadSlice = (addr) => {\n const array = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n return new Uint8Array(this._inst.exports.mem.buffer, array, len);\n };\n const loadSliceOfValues = (addr) => {\n const array = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n const a = new Array(len);\n for (let i = 0; i < len; i++) {\n a[i] = loadValue(array + i * 8);\n }\n return a;\n };\n const loadString = (addr) => {\n const saddr = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n };\n const timeOrigin = Date.now() - performance.now();\n this.importObject = {\n go: {\n "runtime.wasmExit": (sp) => {\n sp >>>= 0;\n const code = this.mem.getInt32(sp + 8, true);\n this.exited = true;\n delete this._inst;\n delete this._values;\n delete this._goRefCounts;\n delete this._ids;\n delete this._idPool;\n this.exit(code);\n },\n "runtime.wasmWrite": (sp) => {\n sp >>>= 0;\n const fd = getInt64(sp + 8);\n const p = getInt64(sp + 16);\n const n = this.mem.getInt32(sp + 24, true);\n globalThis.fs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n },\n "runtime.resetMemoryDataView": (sp) => {\n sp >>>= 0;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n },\n "runtime.nanotime1": (sp) => {\n sp >>>= 0;\n setInt64(sp + 8, (timeOrigin + performance.now()) * 1e6);\n },\n "runtime.walltime": (sp) => {\n sp >>>= 0;\n const msec = new Date().getTime();\n setInt64(sp + 8, msec / 1e3);\n this.mem.setInt32(sp + 16, msec % 1e3 * 1e6, true);\n },\n "runtime.scheduleTimeoutEvent": (sp) => {\n sp >>>= 0;\n const id = this._nextCallbackTimeoutID;\n this._nextCallbackTimeoutID++;\n this._scheduledTimeouts.set(id, setTimeout(\n () => {\n this._resume();\n while (this._scheduledTimeouts.has(id)) {\n console.warn("scheduleTimeoutEvent: missed timeout event");\n this._resume();\n }\n },\n getInt64(sp + 8) + 1\n ));\n this.mem.setInt32(sp + 16, id, true);\n },\n "runtime.clearTimeoutEvent": (sp) => {\n sp >>>= 0;\n const id = this.mem.getInt32(sp + 8, true);\n clearTimeout(this._scheduledTimeouts.get(id));\n this._scheduledTimeouts.delete(id);\n },\n "runtime.getRandomData": (sp) => {\n sp >>>= 0;\n crypto.getRandomValues(loadSlice(sp + 8));\n },\n "syscall/js.finalizeRef": (sp) => {\n sp >>>= 0;\n const id = this.mem.getUint32(sp + 8, true);\n this._goRefCounts[id]--;\n if (this._goRefCounts[id] === 0) {\n const v = this._values[id];\n this._values[id] = null;\n this._ids.delete(v);\n this._idPool.push(id);\n }\n },\n "syscall/js.stringVal": (sp) => {\n sp >>>= 0;\n storeValue(sp + 24, loadString(sp + 8));\n },\n "syscall/js.valueGet": (sp) => {\n sp >>>= 0;\n const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 32, result);\n },\n "syscall/js.valueSet": (sp) => {\n sp >>>= 0;\n Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n },\n "syscall/js.valueDelete": (sp) => {\n sp >>>= 0;\n Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n },\n "syscall/js.valueIndex": (sp) => {\n sp >>>= 0;\n storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n },\n "syscall/js.valueSetIndex": (sp) => {\n sp >>>= 0;\n Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n },\n "syscall/js.valueCall": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const m = Reflect.get(v, loadString(sp + 16));\n const args = loadSliceOfValues(sp + 32);\n const result = Reflect.apply(m, v, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 56, result);\n this.mem.setUint8(sp + 64, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 56, err);\n this.mem.setUint8(sp + 64, 0);\n }\n },\n "syscall/js.valueInvoke": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const args = loadSliceOfValues(sp + 16);\n const result = Reflect.apply(v, void 0, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, result);\n this.mem.setUint8(sp + 48, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, err);\n this.mem.setUint8(sp + 48, 0);\n }\n },\n "syscall/js.valueNew": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const args = loadSliceOfValues(sp + 16);\n const result = Reflect.construct(v, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, result);\n this.mem.setUint8(sp + 48, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, err);\n this.mem.setUint8(sp + 48, 0);\n }\n },\n "syscall/js.valueLength": (sp) => {\n sp >>>= 0;\n setInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n },\n "syscall/js.valuePrepareString": (sp) => {\n sp >>>= 0;\n const str = encoder.encode(String(loadValue(sp + 8)));\n storeValue(sp + 16, str);\n setInt64(sp + 24, str.length);\n },\n "syscall/js.valueLoadString": (sp) => {\n sp >>>= 0;\n const str = loadValue(sp + 8);\n loadSlice(sp + 16).set(str);\n },\n "syscall/js.valueInstanceOf": (sp) => {\n sp >>>= 0;\n this.mem.setUint8(sp + 24, loadValue(sp + 8) instanceof loadValue(sp + 16) ? 1 : 0);\n },\n "syscall/js.copyBytesToGo": (sp) => {\n sp >>>= 0;\n const dst = loadSlice(sp + 8);\n const src = loadValue(sp + 32);\n if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n this.mem.setUint8(sp + 48, 0);\n return;\n }\n const toCopy = src.subarray(0, dst.length);\n dst.set(toCopy);\n setInt64(sp + 40, toCopy.length);\n this.mem.setUint8(sp + 48, 1);\n },\n "syscall/js.copyBytesToJS": (sp) => {\n sp >>>= 0;\n const dst = loadValue(sp + 8);\n const src = loadSlice(sp + 16);\n if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n this.mem.setUint8(sp + 48, 0);\n return;\n }\n const toCopy = src.subarray(0, dst.length);\n dst.set(toCopy);\n setInt64(sp + 40, toCopy.length);\n this.mem.setUint8(sp + 48, 1);\n },\n "debug": (value) => {\n console.log(value);\n }\n }\n };\n }\n async run(instance) {\n if (!(instance instanceof WebAssembly.Instance)) {\n throw new Error("Go.run: WebAssembly.Instance expected");\n }\n this._inst = instance;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n this._values = [\n NaN,\n 0,\n null,\n true,\n false,\n globalThis,\n this\n ];\n this._goRefCounts = new Array(this._values.length).fill(Infinity);\n this._ids = /* @__PURE__ */ new Map([\n [0, 1],\n [null, 2],\n [true, 3],\n [false, 4],\n [globalThis, 5],\n [this, 6]\n ]);\n this._idPool = [];\n this.exited = false;\n let offset = 4096;\n const strPtr = (str) => {\n const ptr = offset;\n const bytes = encoder.encode(str + "\\0");\n new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n offset += bytes.length;\n if (offset % 8 !== 0) {\n offset += 8 - offset % 8;\n }\n return ptr;\n };\n const argc = this.argv.length;\n const argvPtrs = [];\n this.argv.forEach((arg) => {\n argvPtrs.push(strPtr(arg));\n });\n argvPtrs.push(0);\n const keys = Object.keys(this.env).sort();\n keys.forEach((key) => {\n argvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n });\n argvPtrs.push(0);\n const argv = offset;\n argvPtrs.forEach((ptr) => {\n this.mem.setUint32(offset, ptr, true);\n this.mem.setUint32(offset + 4, 0, true);\n offset += 8;\n });\n const wasmMinDataAddr = 4096 + 8192;\n if (offset >= wasmMinDataAddr) {\n throw new Error("total length of command line and environment variables exceeds limit");\n }\n this._inst.exports.run(argc, argv);\n if (this.exited) {\n this._resolveExitPromise();\n }\n await this._exitPromise;\n }\n _resume() {\n if (this.exited) {\n throw new Error("Go program has already exited");\n }\n this._inst.exports.resume();\n if (this.exited) {\n this._resolveExitPromise();\n }\n }\n _makeFuncWrapper(id) {\n const go = this;\n return function() {\n const event = { id, this: this, args: arguments };\n go._pendingEvent = event;\n go._resume();\n return event.result;\n };\n }\n };\n })();\n onmessage = ({ data: wasm }) => {\n let decoder = new TextDecoder();\n let fs = globalThis.fs;\n let stderr = "";\n fs.writeSync = (fd, buffer) => {\n if (fd === 1) {\n postMessage(buffer);\n } else if (fd === 2) {\n stderr += decoder.decode(buffer);\n let parts = stderr.split("\\n");\n if (parts.length > 1)\n console.log(parts.slice(0, -1).join("\\n"));\n stderr = parts[parts.length - 1];\n } else {\n throw new Error("Bad write");\n }\n return buffer.length;\n };\n let stdin = [];\n let resumeStdin;\n let stdinPos = 0;\n onmessage = ({ data }) => {\n if (data.length > 0) {\n stdin.push(data);\n if (resumeStdin)\n resumeStdin();\n }\n };\n fs.read = (fd, buffer, offset, length, position, callback) => {\n if (fd !== 0 || offset !== 0 || length !== buffer.length || position !== null) {\n throw new Error("Bad read");\n }\n if (stdin.length === 0) {\n resumeStdin = () => fs.read(fd, buffer, offset, length, position, callback);\n return;\n }\n let first = stdin[0];\n let count = Math.max(0, Math.min(length, first.length - stdinPos));\n buffer.set(first.subarray(stdinPos, stdinPos + count), offset);\n stdinPos += count;\n if (stdinPos === first.length) {\n stdin.shift();\n stdinPos = 0;\n }\n callback(null, count);\n };\n let go = new globalThis.Go();\n go.argv = ["", `--service=${"0.15.9"}`];\n if (wasm instanceof WebAssembly.Module) {\n WebAssembly.instantiate(wasm, go.importObject).then((instance) => go.run(instance));\n } else {\n WebAssembly.instantiate(wasm, go.importObject).then(({ instance }) => go.run(instance));\n }\n };\n return (m) => onmessage(m);\n })'}(postMessage)`], { type: "text/javascript" });
1699
+ let blob = 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.\n let onmessage;\n let globalThis = {};\n for (let o = self; o; o = Object.getPrototypeOf(o))\n for (let k of Object.getOwnPropertyNames(o))\n if (!(k in globalThis))\n Object.defineProperty(globalThis, k, { get: () => self[k] });\n "use strict";\n (() => {\n const enosys = () => {\n const err = new Error("not implemented");\n err.code = "ENOSYS";\n return err;\n };\n if (!globalThis.fs) {\n let outputBuf = "";\n globalThis.fs = {\n constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 },\n writeSync(fd, buf) {\n outputBuf += decoder.decode(buf);\n const nl = outputBuf.lastIndexOf("\\n");\n if (nl != -1) {\n console.log(outputBuf.substr(0, nl));\n outputBuf = outputBuf.substr(nl + 1);\n }\n return buf.length;\n },\n write(fd, buf, offset, length, position, callback) {\n if (offset !== 0 || length !== buf.length || position !== null) {\n callback(enosys());\n return;\n }\n const n = this.writeSync(fd, buf);\n callback(null, n);\n },\n chmod(path, mode, callback) {\n callback(enosys());\n },\n chown(path, uid, gid, callback) {\n callback(enosys());\n },\n close(fd, callback) {\n callback(enosys());\n },\n fchmod(fd, mode, callback) {\n callback(enosys());\n },\n fchown(fd, uid, gid, callback) {\n callback(enosys());\n },\n fstat(fd, callback) {\n callback(enosys());\n },\n fsync(fd, callback) {\n callback(null);\n },\n ftruncate(fd, length, callback) {\n callback(enosys());\n },\n lchown(path, uid, gid, callback) {\n callback(enosys());\n },\n link(path, link, callback) {\n callback(enosys());\n },\n lstat(path, callback) {\n callback(enosys());\n },\n mkdir(path, perm, callback) {\n callback(enosys());\n },\n open(path, flags, mode, callback) {\n callback(enosys());\n },\n read(fd, buffer, offset, length, position, callback) {\n callback(enosys());\n },\n readdir(path, callback) {\n callback(enosys());\n },\n readlink(path, callback) {\n callback(enosys());\n },\n rename(from, to, callback) {\n callback(enosys());\n },\n rmdir(path, callback) {\n callback(enosys());\n },\n stat(path, callback) {\n callback(enosys());\n },\n symlink(path, link, callback) {\n callback(enosys());\n },\n truncate(path, length, callback) {\n callback(enosys());\n },\n unlink(path, callback) {\n callback(enosys());\n },\n utimes(path, atime, mtime, callback) {\n callback(enosys());\n }\n };\n }\n if (!globalThis.process) {\n globalThis.process = {\n getuid() {\n return -1;\n },\n getgid() {\n return -1;\n },\n geteuid() {\n return -1;\n },\n getegid() {\n return -1;\n },\n getgroups() {\n throw enosys();\n },\n pid: -1,\n ppid: -1,\n umask() {\n throw enosys();\n },\n cwd() {\n throw enosys();\n },\n chdir() {\n throw enosys();\n }\n };\n }\n if (!globalThis.crypto) {\n throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");\n }\n if (!globalThis.performance) {\n throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");\n }\n if (!globalThis.TextEncoder) {\n throw new Error("globalThis.TextEncoder is not available, polyfill required");\n }\n if (!globalThis.TextDecoder) {\n throw new Error("globalThis.TextDecoder is not available, polyfill required");\n }\n const encoder = new TextEncoder("utf-8");\n const decoder = new TextDecoder("utf-8");\n globalThis.Go = class {\n constructor() {\n this.argv = ["js"];\n this.env = {};\n this.exit = (code) => {\n if (code !== 0) {\n console.warn("exit code:", code);\n }\n };\n this._exitPromise = new Promise((resolve) => {\n this._resolveExitPromise = resolve;\n });\n this._pendingEvent = null;\n this._scheduledTimeouts = /* @__PURE__ */ new Map();\n this._nextCallbackTimeoutID = 1;\n const setInt64 = (addr, v) => {\n this.mem.setUint32(addr + 0, v, true);\n this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n };\n const getInt64 = (addr) => {\n const low = this.mem.getUint32(addr + 0, true);\n const high = this.mem.getInt32(addr + 4, true);\n return low + high * 4294967296;\n };\n const loadValue = (addr) => {\n const f = this.mem.getFloat64(addr, true);\n if (f === 0) {\n return void 0;\n }\n if (!isNaN(f)) {\n return f;\n }\n const id = this.mem.getUint32(addr, true);\n return this._values[id];\n };\n const storeValue = (addr, v) => {\n const nanHead = 2146959360;\n if (typeof v === "number" && v !== 0) {\n if (isNaN(v)) {\n this.mem.setUint32(addr + 4, nanHead, true);\n this.mem.setUint32(addr, 0, true);\n return;\n }\n this.mem.setFloat64(addr, v, true);\n return;\n }\n if (v === void 0) {\n this.mem.setFloat64(addr, 0, true);\n return;\n }\n let id = this._ids.get(v);\n if (id === void 0) {\n id = this._idPool.pop();\n if (id === void 0) {\n id = this._values.length;\n }\n this._values[id] = v;\n this._goRefCounts[id] = 0;\n this._ids.set(v, id);\n }\n this._goRefCounts[id]++;\n let typeFlag = 0;\n switch (typeof v) {\n case "object":\n if (v !== null) {\n typeFlag = 1;\n }\n break;\n case "string":\n typeFlag = 2;\n break;\n case "symbol":\n typeFlag = 3;\n break;\n case "function":\n typeFlag = 4;\n break;\n }\n this.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n this.mem.setUint32(addr, id, true);\n };\n const loadSlice = (addr) => {\n const array = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n return new Uint8Array(this._inst.exports.mem.buffer, array, len);\n };\n const loadSliceOfValues = (addr) => {\n const array = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n const a = new Array(len);\n for (let i = 0; i < len; i++) {\n a[i] = loadValue(array + i * 8);\n }\n return a;\n };\n const loadString = (addr) => {\n const saddr = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n };\n const timeOrigin = Date.now() - performance.now();\n this.importObject = {\n go: {\n "runtime.wasmExit": (sp) => {\n sp >>>= 0;\n const code = this.mem.getInt32(sp + 8, true);\n this.exited = true;\n delete this._inst;\n delete this._values;\n delete this._goRefCounts;\n delete this._ids;\n delete this._idPool;\n this.exit(code);\n },\n "runtime.wasmWrite": (sp) => {\n sp >>>= 0;\n const fd = getInt64(sp + 8);\n const p = getInt64(sp + 16);\n const n = this.mem.getInt32(sp + 24, true);\n globalThis.fs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n },\n "runtime.resetMemoryDataView": (sp) => {\n sp >>>= 0;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n },\n "runtime.nanotime1": (sp) => {\n sp >>>= 0;\n setInt64(sp + 8, (timeOrigin + performance.now()) * 1e6);\n },\n "runtime.walltime": (sp) => {\n sp >>>= 0;\n const msec = new Date().getTime();\n setInt64(sp + 8, msec / 1e3);\n this.mem.setInt32(sp + 16, msec % 1e3 * 1e6, true);\n },\n "runtime.scheduleTimeoutEvent": (sp) => {\n sp >>>= 0;\n const id = this._nextCallbackTimeoutID;\n this._nextCallbackTimeoutID++;\n this._scheduledTimeouts.set(id, setTimeout(\n () => {\n this._resume();\n while (this._scheduledTimeouts.has(id)) {\n console.warn("scheduleTimeoutEvent: missed timeout event");\n this._resume();\n }\n },\n getInt64(sp + 8) + 1\n ));\n this.mem.setInt32(sp + 16, id, true);\n },\n "runtime.clearTimeoutEvent": (sp) => {\n sp >>>= 0;\n const id = this.mem.getInt32(sp + 8, true);\n clearTimeout(this._scheduledTimeouts.get(id));\n this._scheduledTimeouts.delete(id);\n },\n "runtime.getRandomData": (sp) => {\n sp >>>= 0;\n crypto.getRandomValues(loadSlice(sp + 8));\n },\n "syscall/js.finalizeRef": (sp) => {\n sp >>>= 0;\n const id = this.mem.getUint32(sp + 8, true);\n this._goRefCounts[id]--;\n if (this._goRefCounts[id] === 0) {\n const v = this._values[id];\n this._values[id] = null;\n this._ids.delete(v);\n this._idPool.push(id);\n }\n },\n "syscall/js.stringVal": (sp) => {\n sp >>>= 0;\n storeValue(sp + 24, loadString(sp + 8));\n },\n "syscall/js.valueGet": (sp) => {\n sp >>>= 0;\n const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 32, result);\n },\n "syscall/js.valueSet": (sp) => {\n sp >>>= 0;\n Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n },\n "syscall/js.valueDelete": (sp) => {\n sp >>>= 0;\n Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n },\n "syscall/js.valueIndex": (sp) => {\n sp >>>= 0;\n storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n },\n "syscall/js.valueSetIndex": (sp) => {\n sp >>>= 0;\n Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n },\n "syscall/js.valueCall": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const m = Reflect.get(v, loadString(sp + 16));\n const args = loadSliceOfValues(sp + 32);\n const result = Reflect.apply(m, v, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 56, result);\n this.mem.setUint8(sp + 64, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 56, err);\n this.mem.setUint8(sp + 64, 0);\n }\n },\n "syscall/js.valueInvoke": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const args = loadSliceOfValues(sp + 16);\n const result = Reflect.apply(v, void 0, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, result);\n this.mem.setUint8(sp + 48, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, err);\n this.mem.setUint8(sp + 48, 0);\n }\n },\n "syscall/js.valueNew": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const args = loadSliceOfValues(sp + 16);\n const result = Reflect.construct(v, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, result);\n this.mem.setUint8(sp + 48, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, err);\n this.mem.setUint8(sp + 48, 0);\n }\n },\n "syscall/js.valueLength": (sp) => {\n sp >>>= 0;\n setInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n },\n "syscall/js.valuePrepareString": (sp) => {\n sp >>>= 0;\n const str = encoder.encode(String(loadValue(sp + 8)));\n storeValue(sp + 16, str);\n setInt64(sp + 24, str.length);\n },\n "syscall/js.valueLoadString": (sp) => {\n sp >>>= 0;\n const str = loadValue(sp + 8);\n loadSlice(sp + 16).set(str);\n },\n "syscall/js.valueInstanceOf": (sp) => {\n sp >>>= 0;\n this.mem.setUint8(sp + 24, loadValue(sp + 8) instanceof loadValue(sp + 16) ? 1 : 0);\n },\n "syscall/js.copyBytesToGo": (sp) => {\n sp >>>= 0;\n const dst = loadSlice(sp + 8);\n const src = loadValue(sp + 32);\n if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n this.mem.setUint8(sp + 48, 0);\n return;\n }\n const toCopy = src.subarray(0, dst.length);\n dst.set(toCopy);\n setInt64(sp + 40, toCopy.length);\n this.mem.setUint8(sp + 48, 1);\n },\n "syscall/js.copyBytesToJS": (sp) => {\n sp >>>= 0;\n const dst = loadValue(sp + 8);\n const src = loadSlice(sp + 16);\n if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n this.mem.setUint8(sp + 48, 0);\n return;\n }\n const toCopy = src.subarray(0, dst.length);\n dst.set(toCopy);\n setInt64(sp + 40, toCopy.length);\n this.mem.setUint8(sp + 48, 1);\n },\n "debug": (value) => {\n console.log(value);\n }\n }\n };\n }\n async run(instance) {\n if (!(instance instanceof WebAssembly.Instance)) {\n throw new Error("Go.run: WebAssembly.Instance expected");\n }\n this._inst = instance;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n this._values = [\n NaN,\n 0,\n null,\n true,\n false,\n globalThis,\n this\n ];\n this._goRefCounts = new Array(this._values.length).fill(Infinity);\n this._ids = /* @__PURE__ */ new Map([\n [0, 1],\n [null, 2],\n [true, 3],\n [false, 4],\n [globalThis, 5],\n [this, 6]\n ]);\n this._idPool = [];\n this.exited = false;\n let offset = 4096;\n const strPtr = (str) => {\n const ptr = offset;\n const bytes = encoder.encode(str + "\\0");\n new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n offset += bytes.length;\n if (offset % 8 !== 0) {\n offset += 8 - offset % 8;\n }\n return ptr;\n };\n const argc = this.argv.length;\n const argvPtrs = [];\n this.argv.forEach((arg) => {\n argvPtrs.push(strPtr(arg));\n });\n argvPtrs.push(0);\n const keys = Object.keys(this.env).sort();\n keys.forEach((key) => {\n argvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n });\n argvPtrs.push(0);\n const argv = offset;\n argvPtrs.forEach((ptr) => {\n this.mem.setUint32(offset, ptr, true);\n this.mem.setUint32(offset + 4, 0, true);\n offset += 8;\n });\n const wasmMinDataAddr = 4096 + 8192;\n if (offset >= wasmMinDataAddr) {\n throw new Error("total length of command line and environment variables exceeds limit");\n }\n this._inst.exports.run(argc, argv);\n if (this.exited) {\n this._resolveExitPromise();\n }\n await this._exitPromise;\n }\n _resume() {\n if (this.exited) {\n throw new Error("Go program has already exited");\n }\n this._inst.exports.resume();\n if (this.exited) {\n this._resolveExitPromise();\n }\n }\n _makeFuncWrapper(id) {\n const go = this;\n return function() {\n const event = { id, this: this, args: arguments };\n go._pendingEvent = event;\n go._resume();\n return event.result;\n };\n }\n };\n })();\n onmessage = ({ data: wasm }) => {\n let decoder = new TextDecoder();\n let fs = globalThis.fs;\n let stderr = "";\n fs.writeSync = (fd, buffer) => {\n if (fd === 1) {\n postMessage(buffer);\n } else if (fd === 2) {\n stderr += decoder.decode(buffer);\n let parts = stderr.split("\\n");\n if (parts.length > 1)\n console.log(parts.slice(0, -1).join("\\n"));\n stderr = parts[parts.length - 1];\n } else {\n throw new Error("Bad write");\n }\n return buffer.length;\n };\n let stdin = [];\n let resumeStdin;\n let stdinPos = 0;\n onmessage = ({ data }) => {\n if (data.length > 0) {\n stdin.push(data);\n if (resumeStdin)\n resumeStdin();\n }\n };\n fs.read = (fd, buffer, offset, length, position, callback) => {\n if (fd !== 0 || offset !== 0 || length !== buffer.length || position !== null) {\n throw new Error("Bad read");\n }\n if (stdin.length === 0) {\n resumeStdin = () => fs.read(fd, buffer, offset, length, position, callback);\n return;\n }\n let first = stdin[0];\n let count = Math.max(0, Math.min(length, first.length - stdinPos));\n buffer.set(first.subarray(stdinPos, stdinPos + count), offset);\n stdinPos += count;\n if (stdinPos === first.length) {\n stdin.shift();\n stdinPos = 0;\n }\n callback(null, count);\n };\n let go = new globalThis.Go();\n go.argv = ["", `--service=${"0.15.12"}`];\n if (wasm instanceof WebAssembly.Module) {\n WebAssembly.instantiate(wasm, go.importObject).then((instance) => go.run(instance));\n } else {\n WebAssembly.instantiate(wasm, go.importObject).then(({ instance }) => go.run(instance));\n }\n };\n return (m) => onmessage(m);\n })'}(postMessage)`], { type: "text/javascript" });
1700
1700
  worker = new Worker(URL.createObjectURL(blob));
1701
1701
  } else {
1702
1702
  let onmessage = ((postMessage) => {
@@ -2278,7 +2278,7 @@ var startRunningService = async (wasmURL, wasmModule, useWorker) => {
2278
2278
  callback(null, count);
2279
2279
  };
2280
2280
  let go = new globalThis.Go();
2281
- go.argv = ["", `--service=${"0.15.9"}`];
2281
+ go.argv = ["", `--service=${"0.15.12"}`];
2282
2282
  if (wasm instanceof WebAssembly.Module) {
2283
2283
  WebAssembly.instantiate(wasm, go.importObject).then((instance) => go.run(instance));
2284
2284
  } else {
@@ -1,15 +1,15 @@
1
- var Ue=Object.defineProperty;var Ne=(t,e)=>{for(var r in e)Ue(t,r,{get:e[r],enumerable:!0})};var ge={};Ne(ge,{analyzeMetafile:()=>rt,analyzeMetafileSync:()=>ot,build:()=>Xe,buildSync:()=>nt,default:()=>ut,formatMessages:()=>tt,formatMessagesSync:()=>it,initialize:()=>st,serve:()=>Ze,transform:()=>et,transformSync:()=>lt,version:()=>Ge});function ye(t){let e=s=>{if(s===null)r.write8(0);else if(typeof s=="boolean")r.write8(1),r.write8(+s);else if(typeof s=="number")r.write8(2),r.write32(s|0);else if(typeof s=="string")r.write8(3),r.write(Q(s));else if(s instanceof Uint8Array)r.write8(4),r.write(s);else if(s instanceof Array){r.write8(5),r.write32(s.length);for(let a of s)e(a)}else{let a=Object.keys(s);r.write8(6),r.write32(a.length);for(let i of a)r.write(Q(i)),e(s[i])}},r=new se;return r.write32(0),r.write32(t.id<<1|+!t.isRequest),e(t.value),me(r.buf,r.len-4,0),r.buf.subarray(0,r.len)}function Oe(t){let e=()=>{switch(r.read8()){case 0:return null;case 1:return!!r.read8();case 2:return r.read32();case 3:return Z(r.read());case 4:return r.read();case 5:{let u=r.read32(),l=[];for(let g=0;g<u;g++)l.push(e());return l}case 6:{let u=r.read32(),l={};for(let g=0;g<u;g++)l[Z(r.read())]=e();return l}default:throw new Error("Invalid packet")}},r=new se(t),s=r.read32(),a=(s&1)===0;s>>>=1;let i=e();if(r.ptr!==t.length)throw new Error("Invalid packet");return{id:s,isRequest:a,value:i}}var se=class{constructor(e=new Uint8Array(1024)){this.buf=e;this.len=0;this.ptr=0}_write(e){if(this.len+e>this.buf.length){let r=new Uint8Array((this.len+e)*2);r.set(this.buf),this.buf=r}return this.len+=e,this.len-e}write8(e){let r=this._write(1);this.buf[r]=e}write32(e){let r=this._write(4);me(this.buf,e,r)}write(e){let r=this._write(4+e.length);me(this.buf,e.length,r),this.buf.set(e,r+4)}_read(e){if(this.ptr+e>this.buf.length)throw new Error("Invalid packet");return this.ptr+=e,this.ptr-e}read8(){return this.buf[this._read(1)]}read32(){return he(this.buf,this._read(4))}read(){let e=this.read32(),r=new Uint8Array(e),s=this._read(r.length);return r.set(this.buf.subarray(s,s+e)),r}},Q,Z;if(typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined"){let t=new TextEncoder,e=new TextDecoder;Q=r=>t.encode(r),Z=r=>e.decode(r)}else if(typeof Buffer!="undefined")Q=t=>{let e=Buffer.from(t);return e instanceof Uint8Array||(e=new Uint8Array(e)),e},Z=t=>{let{buffer:e,byteOffset:r,byteLength:s}=t;return Buffer.from(e,r,s).toString()};else throw new Error("No UTF-8 codec found");function he(t,e){return t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24}function me(t,e,r){t[r++]=e,t[r++]=e>>8,t[r++]=e>>16,t[r++]=e>>24}var xe="warning",Se="silent";function Ee(t){if(t+="",t.indexOf(",")>=0)throw new Error(`Invalid target: ${t}`);return t}var fe=()=>null,U=t=>typeof t=="boolean"?null:"a boolean",Le=t=>typeof t=="boolean"||typeof t=="object"&&!Array.isArray(t)?null:"a boolean or an object",h=t=>typeof t=="string"?null:"a string",ce=t=>t instanceof RegExp?null:"a RegExp object",ne=t=>typeof t=="number"&&t===(t|0)?null:"an integer",be=t=>typeof t=="function"?null:"a function",q=t=>Array.isArray(t)?null:"an array",H=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"an object",We=t=>t instanceof WebAssembly.Module?null:"a WebAssembly.Module",qe=t=>typeof t=="object"&&t!==null?null:"an array or an object",ke=t=>typeof t=="object"&&!Array.isArray(t)?null:"an object or null",Me=t=>typeof t=="string"||typeof t=="boolean"?null:"a string or a boolean",Ie=t=>typeof t=="string"||typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"a string or an object",ze=t=>typeof t=="string"||Array.isArray(t)?null:"a string or an array",Ae=t=>typeof t=="string"||t instanceof Uint8Array?null:"a string or a Uint8Array";function n(t,e,r,s){let a=t[r];if(e[r+""]=!0,a===void 0)return;let i=s(a);if(i!==null)throw new Error(`"${r}" must be ${i}`);return a}function K(t,e,r){for(let s in t)if(!(s in e))throw new Error(`Invalid option ${r}: "${s}"`)}function Ce(t){let e=Object.create(null),r=n(t,e,"wasmURL",h),s=n(t,e,"wasmModule",We),a=n(t,e,"worker",U);return K(t,e,"in initialize() call"),{wasmURL:r,wasmModule:s,worker:a}}function De(t){let e;if(t!==void 0){e=Object.create(null);for(let r of Object.keys(t)){let s=t[r];if(typeof s=="string"||s===!1)e[r]=s;else throw new Error(`Expected ${JSON.stringify(r)} in mangle cache to map to either a string or false`)}}return e}function de(t,e,r,s,a){let i=n(e,r,"color",U),u=n(e,r,"logLevel",h),l=n(e,r,"logLimit",ne);i!==void 0?t.push(`--color=${i}`):s&&t.push("--color=true"),t.push(`--log-level=${u||a}`),t.push(`--log-limit=${l||0}`)}function Be(t,e,r){let s=n(e,r,"legalComments",h),a=n(e,r,"sourceRoot",h),i=n(e,r,"sourcesContent",U),u=n(e,r,"target",ze),l=n(e,r,"format",h),g=n(e,r,"globalName",h),S=n(e,r,"mangleProps",ce),E=n(e,r,"reserveProps",ce),k=n(e,r,"mangleQuoted",U),B=n(e,r,"minify",U),F=n(e,r,"minifySyntax",U),N=n(e,r,"minifyWhitespace",U),I=n(e,r,"minifyIdentifiers",U),j=n(e,r,"drop",q),V=n(e,r,"charset",h),w=n(e,r,"treeShaking",U),d=n(e,r,"ignoreAnnotations",U),o=n(e,r,"jsx",h),f=n(e,r,"jsxFactory",h),y=n(e,r,"jsxFragment",h),x=n(e,r,"jsxImportSource",h),O=n(e,r,"jsxDev",U),c=n(e,r,"jsxSideEffects",U),p=n(e,r,"define",H),b=n(e,r,"logOverride",H),$=n(e,r,"supported",H),R=n(e,r,"pure",q),C=n(e,r,"keepNames",U),M=n(e,r,"platform",h);if(s&&t.push(`--legal-comments=${s}`),a!==void 0&&t.push(`--source-root=${a}`),i!==void 0&&t.push(`--sources-content=${i}`),u&&(Array.isArray(u)?t.push(`--target=${Array.from(u).map(Ee).join(",")}`):t.push(`--target=${Ee(u)}`)),l&&t.push(`--format=${l}`),g&&t.push(`--global-name=${g}`),M&&t.push(`--platform=${M}`),B&&t.push("--minify"),F&&t.push("--minify-syntax"),N&&t.push("--minify-whitespace"),I&&t.push("--minify-identifiers"),V&&t.push(`--charset=${V}`),w!==void 0&&t.push(`--tree-shaking=${w}`),d&&t.push("--ignore-annotations"),j)for(let v of j)t.push(`--drop:${v}`);if(S&&t.push(`--mangle-props=${S.source}`),E&&t.push(`--reserve-props=${E.source}`),k!==void 0&&t.push(`--mangle-quoted=${k}`),o&&t.push(`--jsx=${o}`),f&&t.push(`--jsx-factory=${f}`),y&&t.push(`--jsx-fragment=${y}`),x&&t.push(`--jsx-import-source=${x}`),O&&t.push("--jsx-dev"),c&&t.push("--jsx-side-effects"),p)for(let v in p){if(v.indexOf("=")>=0)throw new Error(`Invalid define: ${v}`);t.push(`--define:${v}=${p[v]}`)}if(b)for(let v in b){if(v.indexOf("=")>=0)throw new Error(`Invalid log override: ${v}`);t.push(`--log-override:${v}=${b[v]}`)}if($)for(let v in $){if(v.indexOf("=")>=0)throw new Error(`Invalid supported: ${v}`);t.push(`--supported:${v}=${$[v]}`)}if(R)for(let v of R)t.push(`--pure:${v}`);C&&t.push("--keep-names")}function Ke(t,e,r,s,a){var Y;let i=[],u=[],l=Object.create(null),g=null,S=null,E=null;de(i,e,l,r,s),Be(i,e,l);let k=n(e,l,"sourcemap",Me),B=n(e,l,"bundle",U),F=n(e,l,"watch",Le),N=n(e,l,"splitting",U),I=n(e,l,"preserveSymlinks",U),j=n(e,l,"metafile",U),V=n(e,l,"outfile",h),w=n(e,l,"outdir",h),d=n(e,l,"outbase",h),o=n(e,l,"tsconfig",h),f=n(e,l,"resolveExtensions",q),y=n(e,l,"nodePaths",q),x=n(e,l,"mainFields",q),O=n(e,l,"conditions",q),c=n(e,l,"external",q),p=n(e,l,"loader",H),b=n(e,l,"outExtension",H),$=n(e,l,"publicPath",h),R=n(e,l,"entryNames",h),C=n(e,l,"chunkNames",h),M=n(e,l,"assetNames",h),v=n(e,l,"inject",q),D=n(e,l,"banner",H),L=n(e,l,"footer",H),z=n(e,l,"entryPoints",qe),W=n(e,l,"absWorkingDir",h),A=n(e,l,"stdin",H),P=(Y=n(e,l,"write",U))!=null?Y:a,_=n(e,l,"allowOverwrite",U),J=n(e,l,"incremental",U)===!0,X=n(e,l,"mangleCache",H);if(l.plugins=!0,K(e,l,`in ${t}() call`),k&&i.push(`--sourcemap${k===!0?"":`=${k}`}`),B&&i.push("--bundle"),_&&i.push("--allow-overwrite"),F)if(i.push("--watch"),typeof F=="boolean")E={};else{let m=Object.create(null),T=n(F,m,"onRebuild",be);K(F,m,`on "watch" in ${t}() call`),E={onRebuild:T}}if(N&&i.push("--splitting"),I&&i.push("--preserve-symlinks"),j&&i.push("--metafile"),V&&i.push(`--outfile=${V}`),w&&i.push(`--outdir=${w}`),d&&i.push(`--outbase=${d}`),o&&i.push(`--tsconfig=${o}`),f){let m=[];for(let T of f){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${T}`);m.push(T)}i.push(`--resolve-extensions=${m.join(",")}`)}if($&&i.push(`--public-path=${$}`),R&&i.push(`--entry-names=${R}`),C&&i.push(`--chunk-names=${C}`),M&&i.push(`--asset-names=${M}`),x){let m=[];for(let T of x){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid main field: ${T}`);m.push(T)}i.push(`--main-fields=${m.join(",")}`)}if(O){let m=[];for(let T of O){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid condition: ${T}`);m.push(T)}i.push(`--conditions=${m.join(",")}`)}if(c)for(let m of c)i.push(`--external:${m}`);if(D)for(let m in D){if(m.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${m}`);i.push(`--banner:${m}=${D[m]}`)}if(L)for(let m in L){if(m.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${m}`);i.push(`--footer:${m}=${L[m]}`)}if(v)for(let m of v)i.push(`--inject:${m}`);if(p)for(let m in p){if(m.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${m}`);i.push(`--loader:${m}=${p[m]}`)}if(b)for(let m in b){if(m.indexOf("=")>=0)throw new Error(`Invalid out extension: ${m}`);i.push(`--out-extension:${m}=${b[m]}`)}if(z)if(Array.isArray(z))for(let m of z)u.push(["",m+""]);else for(let[m,T]of Object.entries(z))u.push([m+"",T+""]);if(A){let m=Object.create(null),T=n(A,m,"contents",Ae),oe=n(A,m,"resolveDir",h),ve=n(A,m,"sourcefile",h),Re=n(A,m,"loader",h);K(A,m,'in "stdin" object'),ve&&i.push(`--sourcefile=${ve}`),Re&&i.push(`--loader=${Re}`),oe&&(S=oe+""),typeof T=="string"?g=Q(T):T instanceof Uint8Array&&(g=T)}let te=[];if(y)for(let m of y)m+="",te.push(m);return{entries:u,flags:i,write:P,stdinContents:g,stdinResolveDir:S,absWorkingDir:W,incremental:J,nodePaths:te,watch:E,mangleCache:De(X)}}function _e(t,e,r,s){let a=[],i=Object.create(null);de(a,e,i,r,s),Be(a,e,i);let u=n(e,i,"sourcemap",Me),l=n(e,i,"tsconfigRaw",Ie),g=n(e,i,"sourcefile",h),S=n(e,i,"loader",h),E=n(e,i,"banner",h),k=n(e,i,"footer",h),B=n(e,i,"mangleCache",H);return K(e,i,`in ${t}() call`),u&&a.push(`--sourcemap=${u===!0?"external":u}`),l&&a.push(`--tsconfig-raw=${typeof l=="string"?l:JSON.stringify(l)}`),g&&a.push(`--sourcefile=${g}`),S&&a.push(`--loader=${S}`),E&&a.push(`--banner=${E}`),k&&a.push(`--footer=${k}`),{flags:a,mangleCache:De(B)}}function Pe(t){let e={},r={didClose:!1,reason:""},s={},a=0,i=0,u=new Uint8Array(16*1024),l=0,g=d=>{let o=l+d.length;if(o>u.length){let y=new Uint8Array(o*2);y.set(u),u=y}u.set(d,l),l+=d.length;let f=0;for(;f+4<=l;){let y=he(u,f);if(f+4+y>l)break;f+=4,N(u.subarray(f,f+y)),f+=y}f>0&&(u.copyWithin(0,f,l),l-=f)},S=d=>{r.didClose=!0,d&&(r.reason=": "+(d.message||d));let o="The service was stopped"+r.reason;for(let f in s)s[f](o,null);s={}},E=(d,o,f)=>{if(r.didClose)return f("The service is no longer running"+r.reason,null);let y=a++;s[y]=(x,O)=>{try{f(x,O)}finally{d&&d.unref()}},d&&d.ref(),t.writeToStdin(ye({id:y,isRequest:!0,value:o}))},k=(d,o)=>{if(r.didClose)throw new Error("The service is no longer running"+r.reason);t.writeToStdin(ye({id:d,isRequest:!1,value:o}))},B=async(d,o)=>{try{if(o.command==="ping"){k(d,{});return}if(typeof o.key=="number"){let f=e[o.key];if(f){let y=f[o.command];if(y){await y(d,o);return}}}throw new Error("Invalid command: "+o.command)}catch(f){k(d,{errors:[le(f,t,null,void 0,"")]})}},F=!0,N=d=>{if(F){F=!1;let f=String.fromCharCode(...d);if(f!=="0.15.9")throw new Error(`Cannot start service: Host version "0.15.9" does not match binary version ${JSON.stringify(f)}`);return}let o=Oe(d);if(o.isRequest)B(o.id,o.value);else{let f=s[o.id];delete s[o.id],o.value.error?f(o.value.error,{}):f(null,o.value)}};return{readFromStdout:g,afterClose:S,service:{buildOrServe:({callName:d,refs:o,serveOptions:f,options:y,isTTY:x,defaultWD:O,callback:c})=>{let p=0,b=i++,$={},R={ref(){++p===1&&o&&o.ref()},unref(){--p===0&&(delete e[b],o&&o.unref())}};e[b]=$,R.ref(),Ve(d,b,E,k,R,t,$,y,f,x,O,r,(C,M)=>{try{c(C,M)}finally{R.unref()}})},transform:({callName:d,refs:o,input:f,options:y,isTTY:x,fs:O,callback:c})=>{let p=Te(),b=$=>{try{if(typeof f!="string"&&!(f instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:R,mangleCache:C}=_e(d,y,x,Se),M={command:"transform",flags:R,inputFS:$!==null,input:$!==null?Q($):typeof f=="string"?Q(f):f};C&&(M.mangleCache=C),E(o,M,(v,D)=>{if(v)return c(new Error(v),null);let L=G(D.errors,p),z=G(D.warnings,p),W=1,A=()=>{if(--W===0){let P={warnings:z,code:D.code,map:D.map};D.mangleCache&&(P.mangleCache=D==null?void 0:D.mangleCache),c(null,P)}};if(L.length>0)return c(re("Transform failed",L,z),null);D.codeFS&&(W++,O.readFile(D.code,(P,_)=>{P!==null?c(P,null):(D.code=_,A())})),D.mapFS&&(W++,O.readFile(D.map,(P,_)=>{P!==null?c(P,null):(D.map=_,A())})),A()})}catch(R){let C=[];try{de(C,y,{},x,Se)}catch(v){}let M=le(R,t,p,void 0,"");E(o,{command:"error",flags:C,error:M},()=>{M.detail=p.load(M.detail),c(re("Transform failed",[M],[]),null)})}};if((typeof f=="string"||f instanceof Uint8Array)&&f.length>1024*1024){let $=b;b=()=>O.writeFile(f,$)}b(null)},formatMessages:({callName:d,refs:o,messages:f,options:y,callback:x})=>{let O=ee(f,"messages",null,"");if(!y)throw new Error(`Missing second argument in ${d}() call`);let c={},p=n(y,c,"kind",h),b=n(y,c,"color",U),$=n(y,c,"terminalWidth",ne);if(K(y,c,`in ${d}() call`),p===void 0)throw new Error(`Missing "kind" in ${d}() call`);if(p!=="error"&&p!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${d}() call`);let R={command:"format-msgs",messages:O,isWarning:p==="warning"};b!==void 0&&(R.color=b),$!==void 0&&(R.terminalWidth=$),E(o,R,(C,M)=>{if(C)return x(new Error(C),null);x(null,M.messages)})},analyzeMetafile:({callName:d,refs:o,metafile:f,options:y,callback:x})=>{y===void 0&&(y={});let O={},c=n(y,O,"color",U),p=n(y,O,"verbose",U);K(y,O,`in ${d}() call`);let b={command:"analyze-metafile",metafile:f};c!==void 0&&(b.color=c),p!==void 0&&(b.verbose=p),E(o,b,($,R)=>{if($)return x(new Error($),null);x(null,R.result)})}}}}function Ve(t,e,r,s,a,i,u,l,g,S,E,k,B){let F=Te(),N=(w,d,o,f)=>{let y=[];try{de(y,l,{},S,xe)}catch(O){}let x=le(w,i,F,o,d);r(a,{command:"error",flags:y,error:x},()=>{x.detail=F.load(x.detail),f(x)})},I=(w,d)=>{N(w,d,void 0,o=>{B(re("Build failed",[o],[]),null)})},j;if(typeof l=="object"){let w=l.plugins;if(w!==void 0){if(!Array.isArray(w))throw new Error('"plugins" must be an array');j=w}}if(j&&j.length>0){if(i.isSync){I(new Error("Cannot use plugins in synchronous API calls"),"");return}Ye(e,r,s,a,i,u,l,j,F).then(w=>{if(!w.ok){I(w.error,w.pluginName);return}try{V(w.requestPlugins,w.runOnEndCallbacks)}catch(d){I(d,"")}},w=>I(w,""));return}try{V(null,(w,d,o)=>o())}catch(w){I(w,"")}function V(w,d){let o=!i.isWriteUnavailable,{entries:f,flags:y,write:x,stdinContents:O,stdinResolveDir:c,absWorkingDir:p,incremental:b,nodePaths:$,watch:R,mangleCache:C}=Ke(t,l,S,xe,o),M={command:"build",key:e,entries:f,flags:y,write:x,stdinContents:O,stdinResolveDir:c,absWorkingDir:p||E,incremental:b,nodePaths:$};w&&(M.plugins=w),C&&(M.mangleCache=C);let v=g&&Je(e,r,s,a,u,g,M),D,L,z=(A,P)=>{A.outputFiles&&(P.outputFiles=A.outputFiles.map(Qe)),A.metafile&&(P.metafile=JSON.parse(A.metafile)),A.mangleCache&&(P.mangleCache=A.mangleCache),A.writeToStdout!==void 0&&console.log(Z(A.writeToStdout).replace(/\n$/,""))},W=(A,P)=>{let _={errors:G(A.errors,F),warnings:G(A.warnings,F)};z(A,_),d(_,N,()=>{if(_.errors.length>0)return P(re("Build failed",_.errors,_.warnings),null);if(A.rebuild){if(!D){let J=!1;D=()=>new Promise((X,te)=>{if(J||k.didClose)throw new Error("Cannot rebuild");r(a,{command:"rebuild",key:e},(Y,m)=>{if(Y)return P(re("Build failed",[{id:"",pluginName:"",text:Y,location:null,notes:[],detail:void 0}],[]),null);W(m,(T,oe)=>{T?te(T):X(oe)})})}),a.ref(),D.dispose=()=>{J||(J=!0,r(a,{command:"rebuild-dispose",key:e},()=>{}),a.unref())}}_.rebuild=D}if(A.watch){if(!L){let J=!1;a.ref(),L=()=>{J||(J=!0,delete u["watch-rebuild"],r(a,{command:"watch-stop",key:e},()=>{}),a.unref())},R&&(u["watch-rebuild"]=(X,te)=>{try{let Y=te.args,m={errors:G(Y.errors,F),warnings:G(Y.warnings,F)};z(Y,m),d(m,N,()=>{if(m.errors.length>0){R.onRebuild&&R.onRebuild(re("Build failed",m.errors,m.warnings),null);return}m.stop=L,R.onRebuild&&R.onRebuild(null,m)})}catch(Y){console.error(Y)}s(X,{})})}_.stop=L}P(null,_)})};if(x&&i.isWriteUnavailable)throw new Error('The "write" option is unavailable in this environment');if(b&&i.isSync)throw new Error('Cannot use "incremental" with a synchronous build');if(R&&i.isSync)throw new Error('Cannot use "watch" with a synchronous build');r(a,M,(A,P)=>{if(A)return B(new Error(A),null);if(v){let _=P,J=!1;a.ref();let X={port:_.port,host:_.host,wait:v.wait,stop(){J||(J=!0,v.stop(),a.unref())}};return a.ref(),v.wait.then(a.unref,a.unref),B(null,X)}return W(P,B)})}}var Je=(t,e,r,s,a,i,u)=>{let l={},g=n(i,l,"port",ne),S=n(i,l,"host",h),E=n(i,l,"servedir",h),k=n(i,l,"onRequest",be),B=new Promise((F,N)=>{a["serve-wait"]=(I,j)=>{j.error!==null?N(new Error(j.error)):F(),r(I,{})}});return u.serve={},K(i,l,"in serve() call"),g!==void 0&&(u.serve.port=g),S!==void 0&&(u.serve.host=S),E!==void 0&&(u.serve.servedir=E),a["serve-request"]=(F,N)=>{k&&k(N.args),r(F,{})},{wait:B,stop(){e(s,{command:"serve-stop",key:t},()=>{})}}},Ye=async(t,e,r,s,a,i,u,l,g)=>{let S=[],E=[],k={},B={},F=0,N=0,I=[],j=!1;l=[...l];for(let w of l){let d={};if(typeof w!="object")throw new Error(`Plugin at index ${N} must be an object`);let o=n(w,d,"name",h);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${N} is missing a name`);try{let f=n(w,d,"setup",be);if(typeof f!="function")throw new Error("Plugin is missing a setup function");K(w,d,`on plugin ${JSON.stringify(o)}`);let y={name:o,onResolve:[],onLoad:[]};N++;let O=f({initialOptions:u,resolve:(c,p={})=>{if(!j)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof c!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),$=n(p,b,"pluginName",h),R=n(p,b,"importer",h),C=n(p,b,"namespace",h),M=n(p,b,"resolveDir",h),v=n(p,b,"kind",h),D=n(p,b,"pluginData",fe);return K(p,b,"in resolve() call"),new Promise((L,z)=>{let W={command:"resolve",path:c,key:t,pluginName:o};$!=null&&(W.pluginName=$),R!=null&&(W.importer=R),C!=null&&(W.namespace=C),M!=null&&(W.resolveDir=M),v!=null&&(W.kind=v),D!=null&&(W.pluginData=g.store(D)),e(s,W,(A,P)=>{A!==null?z(new Error(A)):L({errors:G(P.errors,g),warnings:G(P.warnings,g),path:P.path,external:P.external,sideEffects:P.sideEffects,namespace:P.namespace,suffix:P.suffix,pluginData:g.load(P.pluginData)})})})},onStart(c){let p='This error came from the "onStart" callback registered here:',b=ae(new Error(p),a,"onStart");S.push({name:o,callback:c,note:b})},onEnd(c){let p='This error came from the "onEnd" callback registered here:',b=ae(new Error(p),a,"onEnd");E.push({name:o,callback:c,note:b})},onResolve(c,p){let b='This error came from the "onResolve" callback registered here:',$=ae(new Error(b),a,"onResolve"),R={},C=n(c,R,"filter",ce),M=n(c,R,"namespace",h);if(K(c,R,`in onResolve() call for plugin ${JSON.stringify(o)}`),C==null)throw new Error("onResolve() call is missing a filter");let v=F++;k[v]={name:o,callback:p,note:$},y.onResolve.push({id:v,filter:C.source,namespace:M||""})},onLoad(c,p){let b='This error came from the "onLoad" callback registered here:',$=ae(new Error(b),a,"onLoad"),R={},C=n(c,R,"filter",ce),M=n(c,R,"namespace",h);if(K(c,R,`in onLoad() call for plugin ${JSON.stringify(o)}`),C==null)throw new Error("onLoad() call is missing a filter");let v=F++;B[v]={name:o,callback:p,note:$},y.onLoad.push({id:v,filter:C.source,namespace:M||""})},esbuild:a.esbuild});O&&await O,I.push(y)}catch(f){return{ok:!1,error:f,pluginName:o}}}i["on-start"]=async(w,d)=>{let o={errors:[],warnings:[]};await Promise.all(S.map(async({name:f,callback:y,note:x})=>{try{let O=await y();if(O!=null){if(typeof O!="object")throw new Error(`Expected onStart() callback in plugin ${JSON.stringify(f)} to return an object`);let c={},p=n(O,c,"errors",q),b=n(O,c,"warnings",q);K(O,c,`from onStart() callback in plugin ${JSON.stringify(f)}`),p!=null&&o.errors.push(...ee(p,"errors",g,f)),b!=null&&o.warnings.push(...ee(b,"warnings",g,f))}}catch(O){o.errors.push(le(O,a,g,x&&x(),f))}})),r(w,o)},i["on-resolve"]=async(w,d)=>{let o={},f="",y,x;for(let O of d.ids)try{({name:f,callback:y,note:x}=k[O]);let c=await y({path:d.path,importer:d.importer,namespace:d.namespace,resolveDir:d.resolveDir,kind:d.kind,pluginData:g.load(d.pluginData)});if(c!=null){if(typeof c!="object")throw new Error(`Expected onResolve() callback in plugin ${JSON.stringify(f)} to return an object`);let p={},b=n(c,p,"pluginName",h),$=n(c,p,"path",h),R=n(c,p,"namespace",h),C=n(c,p,"suffix",h),M=n(c,p,"external",U),v=n(c,p,"sideEffects",U),D=n(c,p,"pluginData",fe),L=n(c,p,"errors",q),z=n(c,p,"warnings",q),W=n(c,p,"watchFiles",q),A=n(c,p,"watchDirs",q);K(c,p,`from onResolve() callback in plugin ${JSON.stringify(f)}`),o.id=O,b!=null&&(o.pluginName=b),$!=null&&(o.path=$),R!=null&&(o.namespace=R),C!=null&&(o.suffix=C),M!=null&&(o.external=M),v!=null&&(o.sideEffects=v),D!=null&&(o.pluginData=g.store(D)),L!=null&&(o.errors=ee(L,"errors",g,f)),z!=null&&(o.warnings=ee(z,"warnings",g,f)),W!=null&&(o.watchFiles=ue(W,"watchFiles")),A!=null&&(o.watchDirs=ue(A,"watchDirs"));break}}catch(c){o={id:O,errors:[le(c,a,g,x&&x(),f)]};break}r(w,o)},i["on-load"]=async(w,d)=>{let o={},f="",y,x;for(let O of d.ids)try{({name:f,callback:y,note:x}=B[O]);let c=await y({path:d.path,namespace:d.namespace,suffix:d.suffix,pluginData:g.load(d.pluginData)});if(c!=null){if(typeof c!="object")throw new Error(`Expected onLoad() callback in plugin ${JSON.stringify(f)} to return an object`);let p={},b=n(c,p,"pluginName",h),$=n(c,p,"contents",Ae),R=n(c,p,"resolveDir",h),C=n(c,p,"pluginData",fe),M=n(c,p,"loader",h),v=n(c,p,"errors",q),D=n(c,p,"warnings",q),L=n(c,p,"watchFiles",q),z=n(c,p,"watchDirs",q);K(c,p,`from onLoad() callback in plugin ${JSON.stringify(f)}`),o.id=O,b!=null&&(o.pluginName=b),$ instanceof Uint8Array?o.contents=$:$!=null&&(o.contents=Q($)),R!=null&&(o.resolveDir=R),C!=null&&(o.pluginData=g.store(C)),M!=null&&(o.loader=M),v!=null&&(o.errors=ee(v,"errors",g,f)),D!=null&&(o.warnings=ee(D,"warnings",g,f)),L!=null&&(o.watchFiles=ue(L,"watchFiles")),z!=null&&(o.watchDirs=ue(z,"watchDirs"));break}}catch(c){o={id:O,errors:[le(c,a,g,x&&x(),f)]};break}r(w,o)};let V=(w,d,o)=>o();return E.length>0&&(V=(w,d,o)=>{(async()=>{for(let{name:f,callback:y,note:x}of E)try{await y(w)}catch(O){w.errors.push(await new Promise(c=>d(O,f,x&&x(),c)))}})().then(o)}),j=!0,{ok:!0,requestPlugins:I,runOnEndCallbacks:V}};function Te(){let t=new Map,e=0;return{load(r){return t.get(r)},store(r){if(r===void 0)return-1;let s=e++;return t.set(s,r),s}}}function ae(t,e,r){let s,a=!1;return()=>{if(a)return s;a=!0;try{let i=(t.stack+"").split(`
1
+ var Ue=Object.defineProperty;var Ne=(t,e)=>{for(var r in e)Ue(t,r,{get:e[r],enumerable:!0})};var ge={};Ne(ge,{analyzeMetafile:()=>rt,analyzeMetafileSync:()=>ot,build:()=>Xe,buildSync:()=>nt,default:()=>ut,formatMessages:()=>tt,formatMessagesSync:()=>it,initialize:()=>st,serve:()=>Ze,transform:()=>et,transformSync:()=>lt,version:()=>Ge});function ye(t){let e=s=>{if(s===null)r.write8(0);else if(typeof s=="boolean")r.write8(1),r.write8(+s);else if(typeof s=="number")r.write8(2),r.write32(s|0);else if(typeof s=="string")r.write8(3),r.write(Q(s));else if(s instanceof Uint8Array)r.write8(4),r.write(s);else if(s instanceof Array){r.write8(5),r.write32(s.length);for(let a of s)e(a)}else{let a=Object.keys(s);r.write8(6),r.write32(a.length);for(let i of a)r.write(Q(i)),e(s[i])}},r=new se;return r.write32(0),r.write32(t.id<<1|+!t.isRequest),e(t.value),me(r.buf,r.len-4,0),r.buf.subarray(0,r.len)}function Oe(t){let e=()=>{switch(r.read8()){case 0:return null;case 1:return!!r.read8();case 2:return r.read32();case 3:return Z(r.read());case 4:return r.read();case 5:{let u=r.read32(),l=[];for(let g=0;g<u;g++)l.push(e());return l}case 6:{let u=r.read32(),l={};for(let g=0;g<u;g++)l[Z(r.read())]=e();return l}default:throw new Error("Invalid packet")}},r=new se(t),s=r.read32(),a=(s&1)===0;s>>>=1;let i=e();if(r.ptr!==t.length)throw new Error("Invalid packet");return{id:s,isRequest:a,value:i}}var se=class{constructor(e=new Uint8Array(1024)){this.buf=e;this.len=0;this.ptr=0}_write(e){if(this.len+e>this.buf.length){let r=new Uint8Array((this.len+e)*2);r.set(this.buf),this.buf=r}return this.len+=e,this.len-e}write8(e){let r=this._write(1);this.buf[r]=e}write32(e){let r=this._write(4);me(this.buf,e,r)}write(e){let r=this._write(4+e.length);me(this.buf,e.length,r),this.buf.set(e,r+4)}_read(e){if(this.ptr+e>this.buf.length)throw new Error("Invalid packet");return this.ptr+=e,this.ptr-e}read8(){return this.buf[this._read(1)]}read32(){return he(this.buf,this._read(4))}read(){let e=this.read32(),r=new Uint8Array(e),s=this._read(r.length);return r.set(this.buf.subarray(s,s+e)),r}},Q,Z;if(typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined"){let t=new TextEncoder,e=new TextDecoder;Q=r=>t.encode(r),Z=r=>e.decode(r)}else if(typeof Buffer!="undefined")Q=t=>{let e=Buffer.from(t);return e instanceof Uint8Array||(e=new Uint8Array(e)),e},Z=t=>{let{buffer:e,byteOffset:r,byteLength:s}=t;return Buffer.from(e,r,s).toString()};else throw new Error("No UTF-8 codec found");function he(t,e){return t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24}function me(t,e,r){t[r++]=e,t[r++]=e>>8,t[r++]=e>>16,t[r++]=e>>24}var xe="warning",Se="silent";function Ee(t){if(t+="",t.indexOf(",")>=0)throw new Error(`Invalid target: ${t}`);return t}var fe=()=>null,U=t=>typeof t=="boolean"?null:"a boolean",Le=t=>typeof t=="boolean"||typeof t=="object"&&!Array.isArray(t)?null:"a boolean or an object",h=t=>typeof t=="string"?null:"a string",ce=t=>t instanceof RegExp?null:"a RegExp object",ne=t=>typeof t=="number"&&t===(t|0)?null:"an integer",be=t=>typeof t=="function"?null:"a function",q=t=>Array.isArray(t)?null:"an array",H=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"an object",We=t=>t instanceof WebAssembly.Module?null:"a WebAssembly.Module",qe=t=>typeof t=="object"&&t!==null?null:"an array or an object",ke=t=>typeof t=="object"&&!Array.isArray(t)?null:"an object or null",Me=t=>typeof t=="string"||typeof t=="boolean"?null:"a string or a boolean",Ie=t=>typeof t=="string"||typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"a string or an object",ze=t=>typeof t=="string"||Array.isArray(t)?null:"a string or an array",Ae=t=>typeof t=="string"||t instanceof Uint8Array?null:"a string or a Uint8Array";function n(t,e,r,s){let a=t[r];if(e[r+""]=!0,a===void 0)return;let i=s(a);if(i!==null)throw new Error(`"${r}" must be ${i}`);return a}function K(t,e,r){for(let s in t)if(!(s in e))throw new Error(`Invalid option ${r}: "${s}"`)}function Ce(t){let e=Object.create(null),r=n(t,e,"wasmURL",h),s=n(t,e,"wasmModule",We),a=n(t,e,"worker",U);return K(t,e,"in initialize() call"),{wasmURL:r,wasmModule:s,worker:a}}function De(t){let e;if(t!==void 0){e=Object.create(null);for(let r of Object.keys(t)){let s=t[r];if(typeof s=="string"||s===!1)e[r]=s;else throw new Error(`Expected ${JSON.stringify(r)} in mangle cache to map to either a string or false`)}}return e}function de(t,e,r,s,a){let i=n(e,r,"color",U),u=n(e,r,"logLevel",h),l=n(e,r,"logLimit",ne);i!==void 0?t.push(`--color=${i}`):s&&t.push("--color=true"),t.push(`--log-level=${u||a}`),t.push(`--log-limit=${l||0}`)}function Be(t,e,r){let s=n(e,r,"legalComments",h),a=n(e,r,"sourceRoot",h),i=n(e,r,"sourcesContent",U),u=n(e,r,"target",ze),l=n(e,r,"format",h),g=n(e,r,"globalName",h),S=n(e,r,"mangleProps",ce),E=n(e,r,"reserveProps",ce),k=n(e,r,"mangleQuoted",U),B=n(e,r,"minify",U),F=n(e,r,"minifySyntax",U),N=n(e,r,"minifyWhitespace",U),I=n(e,r,"minifyIdentifiers",U),j=n(e,r,"drop",q),V=n(e,r,"charset",h),w=n(e,r,"treeShaking",U),d=n(e,r,"ignoreAnnotations",U),o=n(e,r,"jsx",h),f=n(e,r,"jsxFactory",h),y=n(e,r,"jsxFragment",h),x=n(e,r,"jsxImportSource",h),O=n(e,r,"jsxDev",U),c=n(e,r,"jsxSideEffects",U),p=n(e,r,"define",H),b=n(e,r,"logOverride",H),$=n(e,r,"supported",H),R=n(e,r,"pure",q),C=n(e,r,"keepNames",U),M=n(e,r,"platform",h);if(s&&t.push(`--legal-comments=${s}`),a!==void 0&&t.push(`--source-root=${a}`),i!==void 0&&t.push(`--sources-content=${i}`),u&&(Array.isArray(u)?t.push(`--target=${Array.from(u).map(Ee).join(",")}`):t.push(`--target=${Ee(u)}`)),l&&t.push(`--format=${l}`),g&&t.push(`--global-name=${g}`),M&&t.push(`--platform=${M}`),B&&t.push("--minify"),F&&t.push("--minify-syntax"),N&&t.push("--minify-whitespace"),I&&t.push("--minify-identifiers"),V&&t.push(`--charset=${V}`),w!==void 0&&t.push(`--tree-shaking=${w}`),d&&t.push("--ignore-annotations"),j)for(let v of j)t.push(`--drop:${v}`);if(S&&t.push(`--mangle-props=${S.source}`),E&&t.push(`--reserve-props=${E.source}`),k!==void 0&&t.push(`--mangle-quoted=${k}`),o&&t.push(`--jsx=${o}`),f&&t.push(`--jsx-factory=${f}`),y&&t.push(`--jsx-fragment=${y}`),x&&t.push(`--jsx-import-source=${x}`),O&&t.push("--jsx-dev"),c&&t.push("--jsx-side-effects"),p)for(let v in p){if(v.indexOf("=")>=0)throw new Error(`Invalid define: ${v}`);t.push(`--define:${v}=${p[v]}`)}if(b)for(let v in b){if(v.indexOf("=")>=0)throw new Error(`Invalid log override: ${v}`);t.push(`--log-override:${v}=${b[v]}`)}if($)for(let v in $){if(v.indexOf("=")>=0)throw new Error(`Invalid supported: ${v}`);t.push(`--supported:${v}=${$[v]}`)}if(R)for(let v of R)t.push(`--pure:${v}`);C&&t.push("--keep-names")}function Ke(t,e,r,s,a){var Y;let i=[],u=[],l=Object.create(null),g=null,S=null,E=null;de(i,e,l,r,s),Be(i,e,l);let k=n(e,l,"sourcemap",Me),B=n(e,l,"bundle",U),F=n(e,l,"watch",Le),N=n(e,l,"splitting",U),I=n(e,l,"preserveSymlinks",U),j=n(e,l,"metafile",U),V=n(e,l,"outfile",h),w=n(e,l,"outdir",h),d=n(e,l,"outbase",h),o=n(e,l,"tsconfig",h),f=n(e,l,"resolveExtensions",q),y=n(e,l,"nodePaths",q),x=n(e,l,"mainFields",q),O=n(e,l,"conditions",q),c=n(e,l,"external",q),p=n(e,l,"loader",H),b=n(e,l,"outExtension",H),$=n(e,l,"publicPath",h),R=n(e,l,"entryNames",h),C=n(e,l,"chunkNames",h),M=n(e,l,"assetNames",h),v=n(e,l,"inject",q),D=n(e,l,"banner",H),L=n(e,l,"footer",H),z=n(e,l,"entryPoints",qe),W=n(e,l,"absWorkingDir",h),A=n(e,l,"stdin",H),P=(Y=n(e,l,"write",U))!=null?Y:a,_=n(e,l,"allowOverwrite",U),J=n(e,l,"incremental",U)===!0,X=n(e,l,"mangleCache",H);if(l.plugins=!0,K(e,l,`in ${t}() call`),k&&i.push(`--sourcemap${k===!0?"":`=${k}`}`),B&&i.push("--bundle"),_&&i.push("--allow-overwrite"),F)if(i.push("--watch"),typeof F=="boolean")E={};else{let m=Object.create(null),T=n(F,m,"onRebuild",be);K(F,m,`on "watch" in ${t}() call`),E={onRebuild:T}}if(N&&i.push("--splitting"),I&&i.push("--preserve-symlinks"),j&&i.push("--metafile"),V&&i.push(`--outfile=${V}`),w&&i.push(`--outdir=${w}`),d&&i.push(`--outbase=${d}`),o&&i.push(`--tsconfig=${o}`),f){let m=[];for(let T of f){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${T}`);m.push(T)}i.push(`--resolve-extensions=${m.join(",")}`)}if($&&i.push(`--public-path=${$}`),R&&i.push(`--entry-names=${R}`),C&&i.push(`--chunk-names=${C}`),M&&i.push(`--asset-names=${M}`),x){let m=[];for(let T of x){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid main field: ${T}`);m.push(T)}i.push(`--main-fields=${m.join(",")}`)}if(O){let m=[];for(let T of O){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid condition: ${T}`);m.push(T)}i.push(`--conditions=${m.join(",")}`)}if(c)for(let m of c)i.push(`--external:${m}`);if(D)for(let m in D){if(m.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${m}`);i.push(`--banner:${m}=${D[m]}`)}if(L)for(let m in L){if(m.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${m}`);i.push(`--footer:${m}=${L[m]}`)}if(v)for(let m of v)i.push(`--inject:${m}`);if(p)for(let m in p){if(m.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${m}`);i.push(`--loader:${m}=${p[m]}`)}if(b)for(let m in b){if(m.indexOf("=")>=0)throw new Error(`Invalid out extension: ${m}`);i.push(`--out-extension:${m}=${b[m]}`)}if(z)if(Array.isArray(z))for(let m of z)u.push(["",m+""]);else for(let[m,T]of Object.entries(z))u.push([m+"",T+""]);if(A){let m=Object.create(null),T=n(A,m,"contents",Ae),oe=n(A,m,"resolveDir",h),ve=n(A,m,"sourcefile",h),Re=n(A,m,"loader",h);K(A,m,'in "stdin" object'),ve&&i.push(`--sourcefile=${ve}`),Re&&i.push(`--loader=${Re}`),oe&&(S=oe+""),typeof T=="string"?g=Q(T):T instanceof Uint8Array&&(g=T)}let te=[];if(y)for(let m of y)m+="",te.push(m);return{entries:u,flags:i,write:P,stdinContents:g,stdinResolveDir:S,absWorkingDir:W,incremental:J,nodePaths:te,watch:E,mangleCache:De(X)}}function _e(t,e,r,s){let a=[],i=Object.create(null);de(a,e,i,r,s),Be(a,e,i);let u=n(e,i,"sourcemap",Me),l=n(e,i,"tsconfigRaw",Ie),g=n(e,i,"sourcefile",h),S=n(e,i,"loader",h),E=n(e,i,"banner",h),k=n(e,i,"footer",h),B=n(e,i,"mangleCache",H);return K(e,i,`in ${t}() call`),u&&a.push(`--sourcemap=${u===!0?"external":u}`),l&&a.push(`--tsconfig-raw=${typeof l=="string"?l:JSON.stringify(l)}`),g&&a.push(`--sourcefile=${g}`),S&&a.push(`--loader=${S}`),E&&a.push(`--banner=${E}`),k&&a.push(`--footer=${k}`),{flags:a,mangleCache:De(B)}}function Pe(t){let e={},r={didClose:!1,reason:""},s={},a=0,i=0,u=new Uint8Array(16*1024),l=0,g=d=>{let o=l+d.length;if(o>u.length){let y=new Uint8Array(o*2);y.set(u),u=y}u.set(d,l),l+=d.length;let f=0;for(;f+4<=l;){let y=he(u,f);if(f+4+y>l)break;f+=4,N(u.subarray(f,f+y)),f+=y}f>0&&(u.copyWithin(0,f,l),l-=f)},S=d=>{r.didClose=!0,d&&(r.reason=": "+(d.message||d));let o="The service was stopped"+r.reason;for(let f in s)s[f](o,null);s={}},E=(d,o,f)=>{if(r.didClose)return f("The service is no longer running"+r.reason,null);let y=a++;s[y]=(x,O)=>{try{f(x,O)}finally{d&&d.unref()}},d&&d.ref(),t.writeToStdin(ye({id:y,isRequest:!0,value:o}))},k=(d,o)=>{if(r.didClose)throw new Error("The service is no longer running"+r.reason);t.writeToStdin(ye({id:d,isRequest:!1,value:o}))},B=async(d,o)=>{try{if(o.command==="ping"){k(d,{});return}if(typeof o.key=="number"){let f=e[o.key];if(f){let y=f[o.command];if(y){await y(d,o);return}}}throw new Error("Invalid command: "+o.command)}catch(f){k(d,{errors:[le(f,t,null,void 0,"")]})}},F=!0,N=d=>{if(F){F=!1;let f=String.fromCharCode(...d);if(f!=="0.15.12")throw new Error(`Cannot start service: Host version "0.15.12" does not match binary version ${JSON.stringify(f)}`);return}let o=Oe(d);if(o.isRequest)B(o.id,o.value);else{let f=s[o.id];delete s[o.id],o.value.error?f(o.value.error,{}):f(null,o.value)}};return{readFromStdout:g,afterClose:S,service:{buildOrServe:({callName:d,refs:o,serveOptions:f,options:y,isTTY:x,defaultWD:O,callback:c})=>{let p=0,b=i++,$={},R={ref(){++p===1&&o&&o.ref()},unref(){--p===0&&(delete e[b],o&&o.unref())}};e[b]=$,R.ref(),Ve(d,b,E,k,R,t,$,y,f,x,O,r,(C,M)=>{try{c(C,M)}finally{R.unref()}})},transform:({callName:d,refs:o,input:f,options:y,isTTY:x,fs:O,callback:c})=>{let p=Te(),b=$=>{try{if(typeof f!="string"&&!(f instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:R,mangleCache:C}=_e(d,y,x,Se),M={command:"transform",flags:R,inputFS:$!==null,input:$!==null?Q($):typeof f=="string"?Q(f):f};C&&(M.mangleCache=C),E(o,M,(v,D)=>{if(v)return c(new Error(v),null);let L=G(D.errors,p),z=G(D.warnings,p),W=1,A=()=>{if(--W===0){let P={warnings:z,code:D.code,map:D.map};D.mangleCache&&(P.mangleCache=D==null?void 0:D.mangleCache),c(null,P)}};if(L.length>0)return c(re("Transform failed",L,z),null);D.codeFS&&(W++,O.readFile(D.code,(P,_)=>{P!==null?c(P,null):(D.code=_,A())})),D.mapFS&&(W++,O.readFile(D.map,(P,_)=>{P!==null?c(P,null):(D.map=_,A())})),A()})}catch(R){let C=[];try{de(C,y,{},x,Se)}catch(v){}let M=le(R,t,p,void 0,"");E(o,{command:"error",flags:C,error:M},()=>{M.detail=p.load(M.detail),c(re("Transform failed",[M],[]),null)})}};if((typeof f=="string"||f instanceof Uint8Array)&&f.length>1024*1024){let $=b;b=()=>O.writeFile(f,$)}b(null)},formatMessages:({callName:d,refs:o,messages:f,options:y,callback:x})=>{let O=ee(f,"messages",null,"");if(!y)throw new Error(`Missing second argument in ${d}() call`);let c={},p=n(y,c,"kind",h),b=n(y,c,"color",U),$=n(y,c,"terminalWidth",ne);if(K(y,c,`in ${d}() call`),p===void 0)throw new Error(`Missing "kind" in ${d}() call`);if(p!=="error"&&p!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${d}() call`);let R={command:"format-msgs",messages:O,isWarning:p==="warning"};b!==void 0&&(R.color=b),$!==void 0&&(R.terminalWidth=$),E(o,R,(C,M)=>{if(C)return x(new Error(C),null);x(null,M.messages)})},analyzeMetafile:({callName:d,refs:o,metafile:f,options:y,callback:x})=>{y===void 0&&(y={});let O={},c=n(y,O,"color",U),p=n(y,O,"verbose",U);K(y,O,`in ${d}() call`);let b={command:"analyze-metafile",metafile:f};c!==void 0&&(b.color=c),p!==void 0&&(b.verbose=p),E(o,b,($,R)=>{if($)return x(new Error($),null);x(null,R.result)})}}}}function Ve(t,e,r,s,a,i,u,l,g,S,E,k,B){let F=Te(),N=(w,d,o,f)=>{let y=[];try{de(y,l,{},S,xe)}catch(O){}let x=le(w,i,F,o,d);r(a,{command:"error",flags:y,error:x},()=>{x.detail=F.load(x.detail),f(x)})},I=(w,d)=>{N(w,d,void 0,o=>{B(re("Build failed",[o],[]),null)})},j;if(typeof l=="object"){let w=l.plugins;if(w!==void 0){if(!Array.isArray(w))throw new Error('"plugins" must be an array');j=w}}if(j&&j.length>0){if(i.isSync){I(new Error("Cannot use plugins in synchronous API calls"),"");return}Ye(e,r,s,a,i,u,l,j,F).then(w=>{if(!w.ok){I(w.error,w.pluginName);return}try{V(w.requestPlugins,w.runOnEndCallbacks)}catch(d){I(d,"")}},w=>I(w,""));return}try{V(null,(w,d,o)=>o())}catch(w){I(w,"")}function V(w,d){let o=!i.isWriteUnavailable,{entries:f,flags:y,write:x,stdinContents:O,stdinResolveDir:c,absWorkingDir:p,incremental:b,nodePaths:$,watch:R,mangleCache:C}=Ke(t,l,S,xe,o),M={command:"build",key:e,entries:f,flags:y,write:x,stdinContents:O,stdinResolveDir:c,absWorkingDir:p||E,incremental:b,nodePaths:$};w&&(M.plugins=w),C&&(M.mangleCache=C);let v=g&&Je(e,r,s,a,u,g,M),D,L,z=(A,P)=>{A.outputFiles&&(P.outputFiles=A.outputFiles.map(Qe)),A.metafile&&(P.metafile=JSON.parse(A.metafile)),A.mangleCache&&(P.mangleCache=A.mangleCache),A.writeToStdout!==void 0&&console.log(Z(A.writeToStdout).replace(/\n$/,""))},W=(A,P)=>{let _={errors:G(A.errors,F),warnings:G(A.warnings,F)};z(A,_),d(_,N,()=>{if(_.errors.length>0)return P(re("Build failed",_.errors,_.warnings),null);if(A.rebuild){if(!D){let J=!1;D=()=>new Promise((X,te)=>{if(J||k.didClose)throw new Error("Cannot rebuild");r(a,{command:"rebuild",key:e},(Y,m)=>{if(Y)return P(re("Build failed",[{id:"",pluginName:"",text:Y,location:null,notes:[],detail:void 0}],[]),null);W(m,(T,oe)=>{T?te(T):X(oe)})})}),a.ref(),D.dispose=()=>{J||(J=!0,r(a,{command:"rebuild-dispose",key:e},()=>{}),a.unref())}}_.rebuild=D}if(A.watch){if(!L){let J=!1;a.ref(),L=()=>{J||(J=!0,delete u["watch-rebuild"],r(a,{command:"watch-stop",key:e},()=>{}),a.unref())},R&&(u["watch-rebuild"]=(X,te)=>{try{let Y=te.args,m={errors:G(Y.errors,F),warnings:G(Y.warnings,F)};z(Y,m),d(m,N,()=>{if(m.errors.length>0){R.onRebuild&&R.onRebuild(re("Build failed",m.errors,m.warnings),null);return}m.stop=L,R.onRebuild&&R.onRebuild(null,m)})}catch(Y){console.error(Y)}s(X,{})})}_.stop=L}P(null,_)})};if(x&&i.isWriteUnavailable)throw new Error('The "write" option is unavailable in this environment');if(b&&i.isSync)throw new Error('Cannot use "incremental" with a synchronous build');if(R&&i.isSync)throw new Error('Cannot use "watch" with a synchronous build');r(a,M,(A,P)=>{if(A)return B(new Error(A),null);if(v){let _=P,J=!1;a.ref();let X={port:_.port,host:_.host,wait:v.wait,stop(){J||(J=!0,v.stop(),a.unref())}};return a.ref(),v.wait.then(a.unref,a.unref),B(null,X)}return W(P,B)})}}var Je=(t,e,r,s,a,i,u)=>{let l={},g=n(i,l,"port",ne),S=n(i,l,"host",h),E=n(i,l,"servedir",h),k=n(i,l,"onRequest",be),B=new Promise((F,N)=>{a["serve-wait"]=(I,j)=>{j.error!==null?N(new Error(j.error)):F(),r(I,{})}});return u.serve={},K(i,l,"in serve() call"),g!==void 0&&(u.serve.port=g),S!==void 0&&(u.serve.host=S),E!==void 0&&(u.serve.servedir=E),a["serve-request"]=(F,N)=>{k&&k(N.args),r(F,{})},{wait:B,stop(){e(s,{command:"serve-stop",key:t},()=>{})}}},Ye=async(t,e,r,s,a,i,u,l,g)=>{let S=[],E=[],k={},B={},F=0,N=0,I=[],j=!1;l=[...l];for(let w of l){let d={};if(typeof w!="object")throw new Error(`Plugin at index ${N} must be an object`);let o=n(w,d,"name",h);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${N} is missing a name`);try{let f=n(w,d,"setup",be);if(typeof f!="function")throw new Error("Plugin is missing a setup function");K(w,d,`on plugin ${JSON.stringify(o)}`);let y={name:o,onResolve:[],onLoad:[]};N++;let O=f({initialOptions:u,resolve:(c,p={})=>{if(!j)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof c!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),$=n(p,b,"pluginName",h),R=n(p,b,"importer",h),C=n(p,b,"namespace",h),M=n(p,b,"resolveDir",h),v=n(p,b,"kind",h),D=n(p,b,"pluginData",fe);return K(p,b,"in resolve() call"),new Promise((L,z)=>{let W={command:"resolve",path:c,key:t,pluginName:o};$!=null&&(W.pluginName=$),R!=null&&(W.importer=R),C!=null&&(W.namespace=C),M!=null&&(W.resolveDir=M),v!=null&&(W.kind=v),D!=null&&(W.pluginData=g.store(D)),e(s,W,(A,P)=>{A!==null?z(new Error(A)):L({errors:G(P.errors,g),warnings:G(P.warnings,g),path:P.path,external:P.external,sideEffects:P.sideEffects,namespace:P.namespace,suffix:P.suffix,pluginData:g.load(P.pluginData)})})})},onStart(c){let p='This error came from the "onStart" callback registered here:',b=ae(new Error(p),a,"onStart");S.push({name:o,callback:c,note:b})},onEnd(c){let p='This error came from the "onEnd" callback registered here:',b=ae(new Error(p),a,"onEnd");E.push({name:o,callback:c,note:b})},onResolve(c,p){let b='This error came from the "onResolve" callback registered here:',$=ae(new Error(b),a,"onResolve"),R={},C=n(c,R,"filter",ce),M=n(c,R,"namespace",h);if(K(c,R,`in onResolve() call for plugin ${JSON.stringify(o)}`),C==null)throw new Error("onResolve() call is missing a filter");let v=F++;k[v]={name:o,callback:p,note:$},y.onResolve.push({id:v,filter:C.source,namespace:M||""})},onLoad(c,p){let b='This error came from the "onLoad" callback registered here:',$=ae(new Error(b),a,"onLoad"),R={},C=n(c,R,"filter",ce),M=n(c,R,"namespace",h);if(K(c,R,`in onLoad() call for plugin ${JSON.stringify(o)}`),C==null)throw new Error("onLoad() call is missing a filter");let v=F++;B[v]={name:o,callback:p,note:$},y.onLoad.push({id:v,filter:C.source,namespace:M||""})},esbuild:a.esbuild});O&&await O,I.push(y)}catch(f){return{ok:!1,error:f,pluginName:o}}}i["on-start"]=async(w,d)=>{let o={errors:[],warnings:[]};await Promise.all(S.map(async({name:f,callback:y,note:x})=>{try{let O=await y();if(O!=null){if(typeof O!="object")throw new Error(`Expected onStart() callback in plugin ${JSON.stringify(f)} to return an object`);let c={},p=n(O,c,"errors",q),b=n(O,c,"warnings",q);K(O,c,`from onStart() callback in plugin ${JSON.stringify(f)}`),p!=null&&o.errors.push(...ee(p,"errors",g,f)),b!=null&&o.warnings.push(...ee(b,"warnings",g,f))}}catch(O){o.errors.push(le(O,a,g,x&&x(),f))}})),r(w,o)},i["on-resolve"]=async(w,d)=>{let o={},f="",y,x;for(let O of d.ids)try{({name:f,callback:y,note:x}=k[O]);let c=await y({path:d.path,importer:d.importer,namespace:d.namespace,resolveDir:d.resolveDir,kind:d.kind,pluginData:g.load(d.pluginData)});if(c!=null){if(typeof c!="object")throw new Error(`Expected onResolve() callback in plugin ${JSON.stringify(f)} to return an object`);let p={},b=n(c,p,"pluginName",h),$=n(c,p,"path",h),R=n(c,p,"namespace",h),C=n(c,p,"suffix",h),M=n(c,p,"external",U),v=n(c,p,"sideEffects",U),D=n(c,p,"pluginData",fe),L=n(c,p,"errors",q),z=n(c,p,"warnings",q),W=n(c,p,"watchFiles",q),A=n(c,p,"watchDirs",q);K(c,p,`from onResolve() callback in plugin ${JSON.stringify(f)}`),o.id=O,b!=null&&(o.pluginName=b),$!=null&&(o.path=$),R!=null&&(o.namespace=R),C!=null&&(o.suffix=C),M!=null&&(o.external=M),v!=null&&(o.sideEffects=v),D!=null&&(o.pluginData=g.store(D)),L!=null&&(o.errors=ee(L,"errors",g,f)),z!=null&&(o.warnings=ee(z,"warnings",g,f)),W!=null&&(o.watchFiles=ue(W,"watchFiles")),A!=null&&(o.watchDirs=ue(A,"watchDirs"));break}}catch(c){o={id:O,errors:[le(c,a,g,x&&x(),f)]};break}r(w,o)},i["on-load"]=async(w,d)=>{let o={},f="",y,x;for(let O of d.ids)try{({name:f,callback:y,note:x}=B[O]);let c=await y({path:d.path,namespace:d.namespace,suffix:d.suffix,pluginData:g.load(d.pluginData)});if(c!=null){if(typeof c!="object")throw new Error(`Expected onLoad() callback in plugin ${JSON.stringify(f)} to return an object`);let p={},b=n(c,p,"pluginName",h),$=n(c,p,"contents",Ae),R=n(c,p,"resolveDir",h),C=n(c,p,"pluginData",fe),M=n(c,p,"loader",h),v=n(c,p,"errors",q),D=n(c,p,"warnings",q),L=n(c,p,"watchFiles",q),z=n(c,p,"watchDirs",q);K(c,p,`from onLoad() callback in plugin ${JSON.stringify(f)}`),o.id=O,b!=null&&(o.pluginName=b),$ instanceof Uint8Array?o.contents=$:$!=null&&(o.contents=Q($)),R!=null&&(o.resolveDir=R),C!=null&&(o.pluginData=g.store(C)),M!=null&&(o.loader=M),v!=null&&(o.errors=ee(v,"errors",g,f)),D!=null&&(o.warnings=ee(D,"warnings",g,f)),L!=null&&(o.watchFiles=ue(L,"watchFiles")),z!=null&&(o.watchDirs=ue(z,"watchDirs"));break}}catch(c){o={id:O,errors:[le(c,a,g,x&&x(),f)]};break}r(w,o)};let V=(w,d,o)=>o();return E.length>0&&(V=(w,d,o)=>{(async()=>{for(let{name:f,callback:y,note:x}of E)try{await y(w)}catch(O){w.errors.push(await new Promise(c=>d(O,f,x&&x(),c)))}})().then(o)}),j=!0,{ok:!0,requestPlugins:I,runOnEndCallbacks:V}};function Te(){let t=new Map,e=0;return{load(r){return t.get(r)},store(r){if(r===void 0)return-1;let s=e++;return t.set(s,r),s}}}function ae(t,e,r){let s,a=!1;return()=>{if(a)return s;a=!0;try{let i=(t.stack+"").split(`
2
2
  `);i.splice(1,1);let u=Fe(e,i,r);if(u)return s={text:t.message,location:u},s}catch(i){}}}function le(t,e,r,s,a){let i="Internal error",u=null;try{i=(t&&t.message||t)+""}catch(l){}try{u=Fe(e,(t.stack+"").split(`
3
3
  `),"")}catch(l){}return{id:"",pluginName:a,text:i,location:u,notes:s?[s]:[],detail:r?r.store(t):-1}}function Fe(t,e,r){let s=" at ";if(t.readFileSync&&!e[0].startsWith(s)&&e[1].startsWith(s))for(let a=1;a<e.length;a++){let i=e[a];if(!!i.startsWith(s))for(i=i.slice(s.length);;){let u=/^(?:new |async )?\S+ \((.*)\)$/.exec(i);if(u){i=u[1];continue}if(u=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(i),u){i=u[1];continue}if(u=/^(\S+):(\d+):(\d+)$/.exec(i),u){let l;try{l=t.readFileSync(u[1],"utf8")}catch(k){break}let g=l.split(/\r\n|\r|\n|\u2028|\u2029/)[+u[2]-1]||"",S=+u[3]-1,E=g.slice(S,S+r.length)===r?r.length:0;return{file:u[1],namespace:"file",line:+u[2],column:Q(g.slice(0,S)).length,length:Q(g.slice(S,S+E)).length,lineText:g+`
4
4
  `+e.slice(1).join(`
5
5
  `),suggestion:""}}break}}return null}function re(t,e,r){let s=5,a=e.length<1?"":` with ${e.length} error${e.length<2?"":"s"}:`+e.slice(0,s+1).map((u,l)=>{if(l===s)return`
6
6
  ...`;if(!u.location)return`
7
7
  error: ${u.text}`;let{file:g,line:S,column:E}=u.location,k=u.pluginName?`[plugin: ${u.pluginName}] `:"";return`
8
- ${g}:${S}:${E}: ERROR: ${k}${u.text}`}).join(""),i=new Error(`${t}${a}`);return i.errors=e,i.warnings=r,i}function G(t,e){for(let r of t)r.detail=e.load(r.detail);return t}function $e(t,e){if(t==null)return null;let r={},s=n(t,r,"file",h),a=n(t,r,"namespace",h),i=n(t,r,"line",ne),u=n(t,r,"column",ne),l=n(t,r,"length",ne),g=n(t,r,"lineText",h),S=n(t,r,"suggestion",h);return K(t,r,e),{file:s||"",namespace:a||"",line:i||0,column:u||0,length:l||0,lineText:g||"",suggestion:S||""}}function ee(t,e,r,s){let a=[],i=0;for(let u of t){let l={},g=n(u,l,"id",h),S=n(u,l,"pluginName",h),E=n(u,l,"text",h),k=n(u,l,"location",ke),B=n(u,l,"notes",q),F=n(u,l,"detail",fe),N=`in element ${i} of "${e}"`;K(u,l,N);let I=[];if(B)for(let j of B){let V={},w=n(j,V,"text",h),d=n(j,V,"location",ke);K(j,V,N),I.push({text:w||"",location:$e(d,N)})}a.push({id:g||"",pluginName:S||s,text:E||"",location:$e(k,N),notes:I,detail:r?r.store(F):-1}),i++}return a}function ue(t,e){let r=[];for(let s of t){if(typeof s!="string")throw new Error(`${JSON.stringify(e)} must be an array of strings`);r.push(s)}return r}function Qe({path:t,contents:e}){let r=null;return{path:t,contents:e,get text(){let s=this.contents;return(r===null||s!==e)&&(e=s,r=Z(s)),r}}}var Ge="0.15.9",Xe=t=>pe().build(t),Ze=()=>{throw new Error('The "serve" API only works in node')},et=(t,e)=>pe().transform(t,e),tt=(t,e)=>pe().formatMessages(t,e),rt=(t,e)=>pe().analyzeMetafile(t,e),nt=()=>{throw new Error('The "buildSync" API only works in node')},lt=()=>{throw new Error('The "transformSync" API only works in node')},it=()=>{throw new Error('The "formatMessagesSync" API only works in node')},ot=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ie,we,pe=()=>{if(we)return we;throw ie?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')},st=t=>{t=Ce(t||{});let e=t.wasmURL,r=t.wasmModule,s=t.worker!==!1;if(!e&&!r)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ie)throw new Error('Cannot call "initialize" more than once');return ie=at(e||"",r,s),ie.catch(()=>{ie=void 0}),ie},at=async(t,e,r)=>{let s;if(e)s=e;else{let l=await fetch(t);if(!l.ok)throw new Error(`Failed to download ${JSON.stringify(t)}`);s=await l.arrayBuffer()}let a;if(r){let l=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]});return(()=>{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.substr(0,i)),c=c.substr(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.15.9"],r instanceof WebAssembly.Module?WebAssembly.instantiate(r,a.importObject).then(h=>a.run(h)):WebAssembly.instantiate(r,a.importObject).then(({instance:h})=>a.run(h))},r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});a=new Worker(URL.createObjectURL(l))}else{let l=(postMessage=>{
8
+ ${g}:${S}:${E}: ERROR: ${k}${u.text}`}).join(""),i=new Error(`${t}${a}`);return i.errors=e,i.warnings=r,i}function G(t,e){for(let r of t)r.detail=e.load(r.detail);return t}function $e(t,e){if(t==null)return null;let r={},s=n(t,r,"file",h),a=n(t,r,"namespace",h),i=n(t,r,"line",ne),u=n(t,r,"column",ne),l=n(t,r,"length",ne),g=n(t,r,"lineText",h),S=n(t,r,"suggestion",h);return K(t,r,e),{file:s||"",namespace:a||"",line:i||0,column:u||0,length:l||0,lineText:g||"",suggestion:S||""}}function ee(t,e,r,s){let a=[],i=0;for(let u of t){let l={},g=n(u,l,"id",h),S=n(u,l,"pluginName",h),E=n(u,l,"text",h),k=n(u,l,"location",ke),B=n(u,l,"notes",q),F=n(u,l,"detail",fe),N=`in element ${i} of "${e}"`;K(u,l,N);let I=[];if(B)for(let j of B){let V={},w=n(j,V,"text",h),d=n(j,V,"location",ke);K(j,V,N),I.push({text:w||"",location:$e(d,N)})}a.push({id:g||"",pluginName:S||s,text:E||"",location:$e(k,N),notes:I,detail:r?r.store(F):-1}),i++}return a}function ue(t,e){let r=[];for(let s of t){if(typeof s!="string")throw new Error(`${JSON.stringify(e)} must be an array of strings`);r.push(s)}return r}function Qe({path:t,contents:e}){let r=null;return{path:t,contents:e,get text(){let s=this.contents;return(r===null||s!==e)&&(e=s,r=Z(s)),r}}}var Ge="0.15.12",Xe=t=>pe().build(t),Ze=()=>{throw new Error('The "serve" API only works in node')},et=(t,e)=>pe().transform(t,e),tt=(t,e)=>pe().formatMessages(t,e),rt=(t,e)=>pe().analyzeMetafile(t,e),nt=()=>{throw new Error('The "buildSync" API only works in node')},lt=()=>{throw new Error('The "transformSync" API only works in node')},it=()=>{throw new Error('The "formatMessagesSync" API only works in node')},ot=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ie,we,pe=()=>{if(we)return we;throw ie?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')},st=t=>{t=Ce(t||{});let e=t.wasmURL,r=t.wasmModule,s=t.worker!==!1;if(!e&&!r)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ie)throw new Error('Cannot call "initialize" more than once');return ie=at(e||"",r,s),ie.catch(()=>{ie=void 0}),ie},at=async(t,e,r)=>{let s;if(e)s=e;else{let l=await fetch(t);if(!l.ok)throw new Error(`Failed to download ${JSON.stringify(t)}`);s=await l.arrayBuffer()}let a;if(r){let l=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]});return(()=>{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.substr(0,i)),c=c.substr(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.15.12"],r instanceof WebAssembly.Module?WebAssembly.instantiate(r,a.importObject).then(h=>a.run(h)):WebAssembly.instantiate(r,a.importObject).then(({instance:h})=>a.run(h))},r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});a=new Worker(URL.createObjectURL(l))}else{let l=(postMessage=>{
9
9
  // Copyright 2018 The Go Authors. All rights reserved.
10
10
  // Use of this source code is governed by a BSD-style
11
11
  // license that can be found in the LICENSE file.
12
12
  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]});return(()=>{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(`
13
13
  `);return i!=-1&&(console.log(c.substr(0,i)),c=c.substr(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(`
14
14
  `);d.length>1&&console.log(d.slice(0,-1).join(`
15
- `)),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.15.9"],r instanceof WebAssembly.Module?WebAssembly.instantiate(r,a.importObject).then(h=>a.run(h)):WebAssembly.instantiate(r,a.importObject).then(({instance:h})=>a.run(h))},r=>onmessage(r);})(g=>a.onmessage({data:g}));a={onmessage:null,postMessage:g=>setTimeout(()=>l({data:g})),terminate(){}}}a.postMessage(s),a.onmessage=({data:l})=>i(l);let{readFromStdout:i,service:u}=Pe({writeToStdin(l){a.postMessage(l)},isSync:!1,isWriteUnavailable:!0,esbuild:ge});we={build:l=>new Promise((g,S)=>u.buildOrServe({callName:"build",refs:null,serveOptions:null,options:l,isTTY:!1,defaultWD:"/",callback:(E,k)=>E?S(E):g(k)})),transform:(l,g)=>new Promise((S,E)=>u.transform({callName:"transform",refs:null,input:l,options:g||{},isTTY:!1,fs:{readFile(k,B){B(new Error("Internal error"),null)},writeFile(k,B){B(null)}},callback:(k,B)=>k?E(k):S(B)})),formatMessages:(l,g)=>new Promise((S,E)=>u.formatMessages({callName:"formatMessages",refs:null,messages:l,options:g,callback:(k,B)=>k?E(k):S(B)})),analyzeMetafile:(l,g)=>new Promise((S,E)=>u.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof l=="string"?l:JSON.stringify(l),options:g,callback:(k,B)=>k?E(k):S(B)}))}},ut=ge;export{rt as analyzeMetafile,ot as analyzeMetafileSync,Xe as build,nt as buildSync,ut as default,tt as formatMessages,it as formatMessagesSync,st as initialize,Ze as serve,et as transform,lt as transformSync,Ge as version};
15
+ `)),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.15.12"],r instanceof WebAssembly.Module?WebAssembly.instantiate(r,a.importObject).then(h=>a.run(h)):WebAssembly.instantiate(r,a.importObject).then(({instance:h})=>a.run(h))},r=>onmessage(r);})(g=>a.onmessage({data:g}));a={onmessage:null,postMessage:g=>setTimeout(()=>l({data:g})),terminate(){}}}a.postMessage(s),a.onmessage=({data:l})=>i(l);let{readFromStdout:i,service:u}=Pe({writeToStdin(l){a.postMessage(l)},isSync:!1,isWriteUnavailable:!0,esbuild:ge});we={build:l=>new Promise((g,S)=>u.buildOrServe({callName:"build",refs:null,serveOptions:null,options:l,isTTY:!1,defaultWD:"/",callback:(E,k)=>E?S(E):g(k)})),transform:(l,g)=>new Promise((S,E)=>u.transform({callName:"transform",refs:null,input:l,options:g||{},isTTY:!1,fs:{readFile(k,B){B(new Error("Internal error"),null)},writeFile(k,B){B(null)}},callback:(k,B)=>k?E(k):S(B)})),formatMessages:(l,g)=>new Promise((S,E)=>u.formatMessages({callName:"formatMessages",refs:null,messages:l,options:g,callback:(k,B)=>k?E(k):S(B)})),analyzeMetafile:(l,g)=>new Promise((S,E)=>u.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof l=="string"?l:JSON.stringify(l),options:g,callback:(k,B)=>k?E(k):S(B)}))}},ut=ge;export{rt as analyzeMetafile,ot as analyzeMetafileSync,Xe as build,nt as buildSync,ut as default,tt as formatMessages,it as formatMessagesSync,st as initialize,Ze as serve,et as transform,lt as transformSync,Ge as version};
@@ -252,11 +252,15 @@ export interface ServeResult {
252
252
  export interface TransformOptions extends CommonOptions {
253
253
  tsconfigRaw?: string | {
254
254
  compilerOptions?: {
255
+ alwaysStrict?: boolean,
256
+ importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
257
+ jsx?: 'react' | 'react-jsx' | 'react-jsxdev' | 'preserve',
255
258
  jsxFactory?: string,
256
259
  jsxFragmentFactory?: string,
257
- useDefineForClassFields?: boolean,
258
- importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
260
+ jsxImportSource?: string,
259
261
  preserveValueImports?: boolean,
262
+ target?: string,
263
+ useDefineForClassFields?: boolean,
260
264
  },
261
265
  };
262
266
 
@@ -448,6 +452,7 @@ export interface Metafile {
448
452
  }[]
449
453
  exports: string[]
450
454
  entryPoint?: string
455
+ cssBundle?: string
451
456
  }
452
457
  }
453
458
  }
@@ -724,8 +724,8 @@ function createChannel(streamIn) {
724
724
  if (isFirstPacket) {
725
725
  isFirstPacket = false;
726
726
  let binaryVersion = String.fromCharCode(...bytes);
727
- if (binaryVersion !== "0.15.9") {
728
- throw new Error(`Cannot start service: Host version "${"0.15.9"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
727
+ if (binaryVersion !== "0.15.12") {
728
+ throw new Error(`Cannot start service: Host version "${"0.15.12"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
729
729
  }
730
730
  return;
731
731
  }
@@ -1675,7 +1675,7 @@ function convertOutputFiles({ path, contents }) {
1675
1675
  }
1676
1676
 
1677
1677
  // lib/npm/browser.ts
1678
- var version = "0.15.9";
1678
+ var version = "0.15.12";
1679
1679
  var build = (options) => ensureServiceIsRunning().build(options);
1680
1680
  var serve = () => {
1681
1681
  throw new Error(`The "serve" API only works in node`);
@@ -1731,7 +1731,7 @@ var startRunningService = (wasmURL, wasmModule, useWorker) => __async(void 0, nu
1731
1731
  }
1732
1732
  let worker;
1733
1733
  if (useWorker) {
1734
- let blob = 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.\n var __async = (__this, __arguments, generator) => {\n return new Promise((resolve, reject) => {\n var fulfilled = (value) => {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n };\n var rejected = (value) => {\n try {\n step(generator.throw(value));\n } catch (e) {\n reject(e);\n }\n };\n var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n step((generator = generator.apply(__this, __arguments)).next());\n });\n };\n let onmessage;\n let globalThis = {};\n for (let o = self; o; o = Object.getPrototypeOf(o))\n for (let k of Object.getOwnPropertyNames(o))\n if (!(k in globalThis))\n Object.defineProperty(globalThis, k, { get: () => self[k] });\n "use strict";\n (() => {\n const enosys = () => {\n const err = new Error("not implemented");\n err.code = "ENOSYS";\n return err;\n };\n if (!globalThis.fs) {\n let outputBuf = "";\n globalThis.fs = {\n constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 },\n writeSync(fd, buf) {\n outputBuf += decoder.decode(buf);\n const nl = outputBuf.lastIndexOf("\\n");\n if (nl != -1) {\n console.log(outputBuf.substr(0, nl));\n outputBuf = outputBuf.substr(nl + 1);\n }\n return buf.length;\n },\n write(fd, buf, offset, length, position, callback) {\n if (offset !== 0 || length !== buf.length || position !== null) {\n callback(enosys());\n return;\n }\n const n = this.writeSync(fd, buf);\n callback(null, n);\n },\n chmod(path, mode, callback) {\n callback(enosys());\n },\n chown(path, uid, gid, callback) {\n callback(enosys());\n },\n close(fd, callback) {\n callback(enosys());\n },\n fchmod(fd, mode, callback) {\n callback(enosys());\n },\n fchown(fd, uid, gid, callback) {\n callback(enosys());\n },\n fstat(fd, callback) {\n callback(enosys());\n },\n fsync(fd, callback) {\n callback(null);\n },\n ftruncate(fd, length, callback) {\n callback(enosys());\n },\n lchown(path, uid, gid, callback) {\n callback(enosys());\n },\n link(path, link, callback) {\n callback(enosys());\n },\n lstat(path, callback) {\n callback(enosys());\n },\n mkdir(path, perm, callback) {\n callback(enosys());\n },\n open(path, flags, mode, callback) {\n callback(enosys());\n },\n read(fd, buffer, offset, length, position, callback) {\n callback(enosys());\n },\n readdir(path, callback) {\n callback(enosys());\n },\n readlink(path, callback) {\n callback(enosys());\n },\n rename(from, to, callback) {\n callback(enosys());\n },\n rmdir(path, callback) {\n callback(enosys());\n },\n stat(path, callback) {\n callback(enosys());\n },\n symlink(path, link, callback) {\n callback(enosys());\n },\n truncate(path, length, callback) {\n callback(enosys());\n },\n unlink(path, callback) {\n callback(enosys());\n },\n utimes(path, atime, mtime, callback) {\n callback(enosys());\n }\n };\n }\n if (!globalThis.process) {\n globalThis.process = {\n getuid() {\n return -1;\n },\n getgid() {\n return -1;\n },\n geteuid() {\n return -1;\n },\n getegid() {\n return -1;\n },\n getgroups() {\n throw enosys();\n },\n pid: -1,\n ppid: -1,\n umask() {\n throw enosys();\n },\n cwd() {\n throw enosys();\n },\n chdir() {\n throw enosys();\n }\n };\n }\n if (!globalThis.crypto) {\n throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");\n }\n if (!globalThis.performance) {\n throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");\n }\n if (!globalThis.TextEncoder) {\n throw new Error("globalThis.TextEncoder is not available, polyfill required");\n }\n if (!globalThis.TextDecoder) {\n throw new Error("globalThis.TextDecoder is not available, polyfill required");\n }\n const encoder = new TextEncoder("utf-8");\n const decoder = new TextDecoder("utf-8");\n globalThis.Go = class {\n constructor() {\n this.argv = ["js"];\n this.env = {};\n this.exit = (code) => {\n if (code !== 0) {\n console.warn("exit code:", code);\n }\n };\n this._exitPromise = new Promise((resolve) => {\n this._resolveExitPromise = resolve;\n });\n this._pendingEvent = null;\n this._scheduledTimeouts = /* @__PURE__ */ new Map();\n this._nextCallbackTimeoutID = 1;\n const setInt64 = (addr, v) => {\n this.mem.setUint32(addr + 0, v, true);\n this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n };\n const getInt64 = (addr) => {\n const low = this.mem.getUint32(addr + 0, true);\n const high = this.mem.getInt32(addr + 4, true);\n return low + high * 4294967296;\n };\n const loadValue = (addr) => {\n const f = this.mem.getFloat64(addr, true);\n if (f === 0) {\n return void 0;\n }\n if (!isNaN(f)) {\n return f;\n }\n const id = this.mem.getUint32(addr, true);\n return this._values[id];\n };\n const storeValue = (addr, v) => {\n const nanHead = 2146959360;\n if (typeof v === "number" && v !== 0) {\n if (isNaN(v)) {\n this.mem.setUint32(addr + 4, nanHead, true);\n this.mem.setUint32(addr, 0, true);\n return;\n }\n this.mem.setFloat64(addr, v, true);\n return;\n }\n if (v === void 0) {\n this.mem.setFloat64(addr, 0, true);\n return;\n }\n let id = this._ids.get(v);\n if (id === void 0) {\n id = this._idPool.pop();\n if (id === void 0) {\n id = this._values.length;\n }\n this._values[id] = v;\n this._goRefCounts[id] = 0;\n this._ids.set(v, id);\n }\n this._goRefCounts[id]++;\n let typeFlag = 0;\n switch (typeof v) {\n case "object":\n if (v !== null) {\n typeFlag = 1;\n }\n break;\n case "string":\n typeFlag = 2;\n break;\n case "symbol":\n typeFlag = 3;\n break;\n case "function":\n typeFlag = 4;\n break;\n }\n this.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n this.mem.setUint32(addr, id, true);\n };\n const loadSlice = (addr) => {\n const array = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n return new Uint8Array(this._inst.exports.mem.buffer, array, len);\n };\n const loadSliceOfValues = (addr) => {\n const array = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n const a = new Array(len);\n for (let i = 0; i < len; i++) {\n a[i] = loadValue(array + i * 8);\n }\n return a;\n };\n const loadString = (addr) => {\n const saddr = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n };\n const timeOrigin = Date.now() - performance.now();\n this.importObject = {\n go: {\n "runtime.wasmExit": (sp) => {\n sp >>>= 0;\n const code = this.mem.getInt32(sp + 8, true);\n this.exited = true;\n delete this._inst;\n delete this._values;\n delete this._goRefCounts;\n delete this._ids;\n delete this._idPool;\n this.exit(code);\n },\n "runtime.wasmWrite": (sp) => {\n sp >>>= 0;\n const fd = getInt64(sp + 8);\n const p = getInt64(sp + 16);\n const n = this.mem.getInt32(sp + 24, true);\n globalThis.fs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n },\n "runtime.resetMemoryDataView": (sp) => {\n sp >>>= 0;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n },\n "runtime.nanotime1": (sp) => {\n sp >>>= 0;\n setInt64(sp + 8, (timeOrigin + performance.now()) * 1e6);\n },\n "runtime.walltime": (sp) => {\n sp >>>= 0;\n const msec = new Date().getTime();\n setInt64(sp + 8, msec / 1e3);\n this.mem.setInt32(sp + 16, msec % 1e3 * 1e6, true);\n },\n "runtime.scheduleTimeoutEvent": (sp) => {\n sp >>>= 0;\n const id = this._nextCallbackTimeoutID;\n this._nextCallbackTimeoutID++;\n this._scheduledTimeouts.set(id, setTimeout(\n () => {\n this._resume();\n while (this._scheduledTimeouts.has(id)) {\n console.warn("scheduleTimeoutEvent: missed timeout event");\n this._resume();\n }\n },\n getInt64(sp + 8) + 1\n ));\n this.mem.setInt32(sp + 16, id, true);\n },\n "runtime.clearTimeoutEvent": (sp) => {\n sp >>>= 0;\n const id = this.mem.getInt32(sp + 8, true);\n clearTimeout(this._scheduledTimeouts.get(id));\n this._scheduledTimeouts.delete(id);\n },\n "runtime.getRandomData": (sp) => {\n sp >>>= 0;\n crypto.getRandomValues(loadSlice(sp + 8));\n },\n "syscall/js.finalizeRef": (sp) => {\n sp >>>= 0;\n const id = this.mem.getUint32(sp + 8, true);\n this._goRefCounts[id]--;\n if (this._goRefCounts[id] === 0) {\n const v = this._values[id];\n this._values[id] = null;\n this._ids.delete(v);\n this._idPool.push(id);\n }\n },\n "syscall/js.stringVal": (sp) => {\n sp >>>= 0;\n storeValue(sp + 24, loadString(sp + 8));\n },\n "syscall/js.valueGet": (sp) => {\n sp >>>= 0;\n const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 32, result);\n },\n "syscall/js.valueSet": (sp) => {\n sp >>>= 0;\n Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n },\n "syscall/js.valueDelete": (sp) => {\n sp >>>= 0;\n Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n },\n "syscall/js.valueIndex": (sp) => {\n sp >>>= 0;\n storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n },\n "syscall/js.valueSetIndex": (sp) => {\n sp >>>= 0;\n Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n },\n "syscall/js.valueCall": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const m = Reflect.get(v, loadString(sp + 16));\n const args = loadSliceOfValues(sp + 32);\n const result = Reflect.apply(m, v, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 56, result);\n this.mem.setUint8(sp + 64, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 56, err);\n this.mem.setUint8(sp + 64, 0);\n }\n },\n "syscall/js.valueInvoke": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const args = loadSliceOfValues(sp + 16);\n const result = Reflect.apply(v, void 0, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, result);\n this.mem.setUint8(sp + 48, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, err);\n this.mem.setUint8(sp + 48, 0);\n }\n },\n "syscall/js.valueNew": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const args = loadSliceOfValues(sp + 16);\n const result = Reflect.construct(v, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, result);\n this.mem.setUint8(sp + 48, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, err);\n this.mem.setUint8(sp + 48, 0);\n }\n },\n "syscall/js.valueLength": (sp) => {\n sp >>>= 0;\n setInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n },\n "syscall/js.valuePrepareString": (sp) => {\n sp >>>= 0;\n const str = encoder.encode(String(loadValue(sp + 8)));\n storeValue(sp + 16, str);\n setInt64(sp + 24, str.length);\n },\n "syscall/js.valueLoadString": (sp) => {\n sp >>>= 0;\n const str = loadValue(sp + 8);\n loadSlice(sp + 16).set(str);\n },\n "syscall/js.valueInstanceOf": (sp) => {\n sp >>>= 0;\n this.mem.setUint8(sp + 24, loadValue(sp + 8) instanceof loadValue(sp + 16) ? 1 : 0);\n },\n "syscall/js.copyBytesToGo": (sp) => {\n sp >>>= 0;\n const dst = loadSlice(sp + 8);\n const src = loadValue(sp + 32);\n if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n this.mem.setUint8(sp + 48, 0);\n return;\n }\n const toCopy = src.subarray(0, dst.length);\n dst.set(toCopy);\n setInt64(sp + 40, toCopy.length);\n this.mem.setUint8(sp + 48, 1);\n },\n "syscall/js.copyBytesToJS": (sp) => {\n sp >>>= 0;\n const dst = loadValue(sp + 8);\n const src = loadSlice(sp + 16);\n if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n this.mem.setUint8(sp + 48, 0);\n return;\n }\n const toCopy = src.subarray(0, dst.length);\n dst.set(toCopy);\n setInt64(sp + 40, toCopy.length);\n this.mem.setUint8(sp + 48, 1);\n },\n "debug": (value) => {\n console.log(value);\n }\n }\n };\n }\n run(instance) {\n return __async(this, null, function* () {\n if (!(instance instanceof WebAssembly.Instance)) {\n throw new Error("Go.run: WebAssembly.Instance expected");\n }\n this._inst = instance;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n this._values = [\n NaN,\n 0,\n null,\n true,\n false,\n globalThis,\n this\n ];\n this._goRefCounts = new Array(this._values.length).fill(Infinity);\n this._ids = /* @__PURE__ */ new Map([\n [0, 1],\n [null, 2],\n [true, 3],\n [false, 4],\n [globalThis, 5],\n [this, 6]\n ]);\n this._idPool = [];\n this.exited = false;\n let offset = 4096;\n const strPtr = (str) => {\n const ptr = offset;\n const bytes = encoder.encode(str + "\\0");\n new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n offset += bytes.length;\n if (offset % 8 !== 0) {\n offset += 8 - offset % 8;\n }\n return ptr;\n };\n const argc = this.argv.length;\n const argvPtrs = [];\n this.argv.forEach((arg) => {\n argvPtrs.push(strPtr(arg));\n });\n argvPtrs.push(0);\n const keys = Object.keys(this.env).sort();\n keys.forEach((key) => {\n argvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n });\n argvPtrs.push(0);\n const argv = offset;\n argvPtrs.forEach((ptr) => {\n this.mem.setUint32(offset, ptr, true);\n this.mem.setUint32(offset + 4, 0, true);\n offset += 8;\n });\n const wasmMinDataAddr = 4096 + 8192;\n if (offset >= wasmMinDataAddr) {\n throw new Error("total length of command line and environment variables exceeds limit");\n }\n this._inst.exports.run(argc, argv);\n if (this.exited) {\n this._resolveExitPromise();\n }\n yield this._exitPromise;\n });\n }\n _resume() {\n if (this.exited) {\n throw new Error("Go program has already exited");\n }\n this._inst.exports.resume();\n if (this.exited) {\n this._resolveExitPromise();\n }\n }\n _makeFuncWrapper(id) {\n const go = this;\n return function() {\n const event = { id, this: this, args: arguments };\n go._pendingEvent = event;\n go._resume();\n return event.result;\n };\n }\n };\n })();\n onmessage = ({ data: wasm }) => {\n let decoder = new TextDecoder();\n let fs = globalThis.fs;\n let stderr = "";\n fs.writeSync = (fd, buffer) => {\n if (fd === 1) {\n postMessage(buffer);\n } else if (fd === 2) {\n stderr += decoder.decode(buffer);\n let parts = stderr.split("\\n");\n if (parts.length > 1)\n console.log(parts.slice(0, -1).join("\\n"));\n stderr = parts[parts.length - 1];\n } else {\n throw new Error("Bad write");\n }\n return buffer.length;\n };\n let stdin = [];\n let resumeStdin;\n let stdinPos = 0;\n onmessage = ({ data }) => {\n if (data.length > 0) {\n stdin.push(data);\n if (resumeStdin)\n resumeStdin();\n }\n };\n fs.read = (fd, buffer, offset, length, position, callback) => {\n if (fd !== 0 || offset !== 0 || length !== buffer.length || position !== null) {\n throw new Error("Bad read");\n }\n if (stdin.length === 0) {\n resumeStdin = () => fs.read(fd, buffer, offset, length, position, callback);\n return;\n }\n let first = stdin[0];\n let count = Math.max(0, Math.min(length, first.length - stdinPos));\n buffer.set(first.subarray(stdinPos, stdinPos + count), offset);\n stdinPos += count;\n if (stdinPos === first.length) {\n stdin.shift();\n stdinPos = 0;\n }\n callback(null, count);\n };\n let go = new globalThis.Go();\n go.argv = ["", `--service=${"0.15.9"}`];\n if (wasm instanceof WebAssembly.Module) {\n WebAssembly.instantiate(wasm, go.importObject).then((instance) => go.run(instance));\n } else {\n WebAssembly.instantiate(wasm, go.importObject).then(({ instance }) => go.run(instance));\n }\n };\n return (m) => onmessage(m);\n })'}(postMessage)`], { type: "text/javascript" });
1734
+ let blob = 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.\n var __async = (__this, __arguments, generator) => {\n return new Promise((resolve, reject) => {\n var fulfilled = (value) => {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n };\n var rejected = (value) => {\n try {\n step(generator.throw(value));\n } catch (e) {\n reject(e);\n }\n };\n var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n step((generator = generator.apply(__this, __arguments)).next());\n });\n };\n let onmessage;\n let globalThis = {};\n for (let o = self; o; o = Object.getPrototypeOf(o))\n for (let k of Object.getOwnPropertyNames(o))\n if (!(k in globalThis))\n Object.defineProperty(globalThis, k, { get: () => self[k] });\n "use strict";\n (() => {\n const enosys = () => {\n const err = new Error("not implemented");\n err.code = "ENOSYS";\n return err;\n };\n if (!globalThis.fs) {\n let outputBuf = "";\n globalThis.fs = {\n constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 },\n writeSync(fd, buf) {\n outputBuf += decoder.decode(buf);\n const nl = outputBuf.lastIndexOf("\\n");\n if (nl != -1) {\n console.log(outputBuf.substr(0, nl));\n outputBuf = outputBuf.substr(nl + 1);\n }\n return buf.length;\n },\n write(fd, buf, offset, length, position, callback) {\n if (offset !== 0 || length !== buf.length || position !== null) {\n callback(enosys());\n return;\n }\n const n = this.writeSync(fd, buf);\n callback(null, n);\n },\n chmod(path, mode, callback) {\n callback(enosys());\n },\n chown(path, uid, gid, callback) {\n callback(enosys());\n },\n close(fd, callback) {\n callback(enosys());\n },\n fchmod(fd, mode, callback) {\n callback(enosys());\n },\n fchown(fd, uid, gid, callback) {\n callback(enosys());\n },\n fstat(fd, callback) {\n callback(enosys());\n },\n fsync(fd, callback) {\n callback(null);\n },\n ftruncate(fd, length, callback) {\n callback(enosys());\n },\n lchown(path, uid, gid, callback) {\n callback(enosys());\n },\n link(path, link, callback) {\n callback(enosys());\n },\n lstat(path, callback) {\n callback(enosys());\n },\n mkdir(path, perm, callback) {\n callback(enosys());\n },\n open(path, flags, mode, callback) {\n callback(enosys());\n },\n read(fd, buffer, offset, length, position, callback) {\n callback(enosys());\n },\n readdir(path, callback) {\n callback(enosys());\n },\n readlink(path, callback) {\n callback(enosys());\n },\n rename(from, to, callback) {\n callback(enosys());\n },\n rmdir(path, callback) {\n callback(enosys());\n },\n stat(path, callback) {\n callback(enosys());\n },\n symlink(path, link, callback) {\n callback(enosys());\n },\n truncate(path, length, callback) {\n callback(enosys());\n },\n unlink(path, callback) {\n callback(enosys());\n },\n utimes(path, atime, mtime, callback) {\n callback(enosys());\n }\n };\n }\n if (!globalThis.process) {\n globalThis.process = {\n getuid() {\n return -1;\n },\n getgid() {\n return -1;\n },\n geteuid() {\n return -1;\n },\n getegid() {\n return -1;\n },\n getgroups() {\n throw enosys();\n },\n pid: -1,\n ppid: -1,\n umask() {\n throw enosys();\n },\n cwd() {\n throw enosys();\n },\n chdir() {\n throw enosys();\n }\n };\n }\n if (!globalThis.crypto) {\n throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");\n }\n if (!globalThis.performance) {\n throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");\n }\n if (!globalThis.TextEncoder) {\n throw new Error("globalThis.TextEncoder is not available, polyfill required");\n }\n if (!globalThis.TextDecoder) {\n throw new Error("globalThis.TextDecoder is not available, polyfill required");\n }\n const encoder = new TextEncoder("utf-8");\n const decoder = new TextDecoder("utf-8");\n globalThis.Go = class {\n constructor() {\n this.argv = ["js"];\n this.env = {};\n this.exit = (code) => {\n if (code !== 0) {\n console.warn("exit code:", code);\n }\n };\n this._exitPromise = new Promise((resolve) => {\n this._resolveExitPromise = resolve;\n });\n this._pendingEvent = null;\n this._scheduledTimeouts = /* @__PURE__ */ new Map();\n this._nextCallbackTimeoutID = 1;\n const setInt64 = (addr, v) => {\n this.mem.setUint32(addr + 0, v, true);\n this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n };\n const getInt64 = (addr) => {\n const low = this.mem.getUint32(addr + 0, true);\n const high = this.mem.getInt32(addr + 4, true);\n return low + high * 4294967296;\n };\n const loadValue = (addr) => {\n const f = this.mem.getFloat64(addr, true);\n if (f === 0) {\n return void 0;\n }\n if (!isNaN(f)) {\n return f;\n }\n const id = this.mem.getUint32(addr, true);\n return this._values[id];\n };\n const storeValue = (addr, v) => {\n const nanHead = 2146959360;\n if (typeof v === "number" && v !== 0) {\n if (isNaN(v)) {\n this.mem.setUint32(addr + 4, nanHead, true);\n this.mem.setUint32(addr, 0, true);\n return;\n }\n this.mem.setFloat64(addr, v, true);\n return;\n }\n if (v === void 0) {\n this.mem.setFloat64(addr, 0, true);\n return;\n }\n let id = this._ids.get(v);\n if (id === void 0) {\n id = this._idPool.pop();\n if (id === void 0) {\n id = this._values.length;\n }\n this._values[id] = v;\n this._goRefCounts[id] = 0;\n this._ids.set(v, id);\n }\n this._goRefCounts[id]++;\n let typeFlag = 0;\n switch (typeof v) {\n case "object":\n if (v !== null) {\n typeFlag = 1;\n }\n break;\n case "string":\n typeFlag = 2;\n break;\n case "symbol":\n typeFlag = 3;\n break;\n case "function":\n typeFlag = 4;\n break;\n }\n this.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n this.mem.setUint32(addr, id, true);\n };\n const loadSlice = (addr) => {\n const array = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n return new Uint8Array(this._inst.exports.mem.buffer, array, len);\n };\n const loadSliceOfValues = (addr) => {\n const array = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n const a = new Array(len);\n for (let i = 0; i < len; i++) {\n a[i] = loadValue(array + i * 8);\n }\n return a;\n };\n const loadString = (addr) => {\n const saddr = getInt64(addr + 0);\n const len = getInt64(addr + 8);\n return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n };\n const timeOrigin = Date.now() - performance.now();\n this.importObject = {\n go: {\n "runtime.wasmExit": (sp) => {\n sp >>>= 0;\n const code = this.mem.getInt32(sp + 8, true);\n this.exited = true;\n delete this._inst;\n delete this._values;\n delete this._goRefCounts;\n delete this._ids;\n delete this._idPool;\n this.exit(code);\n },\n "runtime.wasmWrite": (sp) => {\n sp >>>= 0;\n const fd = getInt64(sp + 8);\n const p = getInt64(sp + 16);\n const n = this.mem.getInt32(sp + 24, true);\n globalThis.fs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n },\n "runtime.resetMemoryDataView": (sp) => {\n sp >>>= 0;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n },\n "runtime.nanotime1": (sp) => {\n sp >>>= 0;\n setInt64(sp + 8, (timeOrigin + performance.now()) * 1e6);\n },\n "runtime.walltime": (sp) => {\n sp >>>= 0;\n const msec = new Date().getTime();\n setInt64(sp + 8, msec / 1e3);\n this.mem.setInt32(sp + 16, msec % 1e3 * 1e6, true);\n },\n "runtime.scheduleTimeoutEvent": (sp) => {\n sp >>>= 0;\n const id = this._nextCallbackTimeoutID;\n this._nextCallbackTimeoutID++;\n this._scheduledTimeouts.set(id, setTimeout(\n () => {\n this._resume();\n while (this._scheduledTimeouts.has(id)) {\n console.warn("scheduleTimeoutEvent: missed timeout event");\n this._resume();\n }\n },\n getInt64(sp + 8) + 1\n ));\n this.mem.setInt32(sp + 16, id, true);\n },\n "runtime.clearTimeoutEvent": (sp) => {\n sp >>>= 0;\n const id = this.mem.getInt32(sp + 8, true);\n clearTimeout(this._scheduledTimeouts.get(id));\n this._scheduledTimeouts.delete(id);\n },\n "runtime.getRandomData": (sp) => {\n sp >>>= 0;\n crypto.getRandomValues(loadSlice(sp + 8));\n },\n "syscall/js.finalizeRef": (sp) => {\n sp >>>= 0;\n const id = this.mem.getUint32(sp + 8, true);\n this._goRefCounts[id]--;\n if (this._goRefCounts[id] === 0) {\n const v = this._values[id];\n this._values[id] = null;\n this._ids.delete(v);\n this._idPool.push(id);\n }\n },\n "syscall/js.stringVal": (sp) => {\n sp >>>= 0;\n storeValue(sp + 24, loadString(sp + 8));\n },\n "syscall/js.valueGet": (sp) => {\n sp >>>= 0;\n const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 32, result);\n },\n "syscall/js.valueSet": (sp) => {\n sp >>>= 0;\n Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n },\n "syscall/js.valueDelete": (sp) => {\n sp >>>= 0;\n Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n },\n "syscall/js.valueIndex": (sp) => {\n sp >>>= 0;\n storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n },\n "syscall/js.valueSetIndex": (sp) => {\n sp >>>= 0;\n Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n },\n "syscall/js.valueCall": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const m = Reflect.get(v, loadString(sp + 16));\n const args = loadSliceOfValues(sp + 32);\n const result = Reflect.apply(m, v, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 56, result);\n this.mem.setUint8(sp + 64, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 56, err);\n this.mem.setUint8(sp + 64, 0);\n }\n },\n "syscall/js.valueInvoke": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const args = loadSliceOfValues(sp + 16);\n const result = Reflect.apply(v, void 0, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, result);\n this.mem.setUint8(sp + 48, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, err);\n this.mem.setUint8(sp + 48, 0);\n }\n },\n "syscall/js.valueNew": (sp) => {\n sp >>>= 0;\n try {\n const v = loadValue(sp + 8);\n const args = loadSliceOfValues(sp + 16);\n const result = Reflect.construct(v, args);\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, result);\n this.mem.setUint8(sp + 48, 1);\n } catch (err) {\n sp = this._inst.exports.getsp() >>> 0;\n storeValue(sp + 40, err);\n this.mem.setUint8(sp + 48, 0);\n }\n },\n "syscall/js.valueLength": (sp) => {\n sp >>>= 0;\n setInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n },\n "syscall/js.valuePrepareString": (sp) => {\n sp >>>= 0;\n const str = encoder.encode(String(loadValue(sp + 8)));\n storeValue(sp + 16, str);\n setInt64(sp + 24, str.length);\n },\n "syscall/js.valueLoadString": (sp) => {\n sp >>>= 0;\n const str = loadValue(sp + 8);\n loadSlice(sp + 16).set(str);\n },\n "syscall/js.valueInstanceOf": (sp) => {\n sp >>>= 0;\n this.mem.setUint8(sp + 24, loadValue(sp + 8) instanceof loadValue(sp + 16) ? 1 : 0);\n },\n "syscall/js.copyBytesToGo": (sp) => {\n sp >>>= 0;\n const dst = loadSlice(sp + 8);\n const src = loadValue(sp + 32);\n if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n this.mem.setUint8(sp + 48, 0);\n return;\n }\n const toCopy = src.subarray(0, dst.length);\n dst.set(toCopy);\n setInt64(sp + 40, toCopy.length);\n this.mem.setUint8(sp + 48, 1);\n },\n "syscall/js.copyBytesToJS": (sp) => {\n sp >>>= 0;\n const dst = loadValue(sp + 8);\n const src = loadSlice(sp + 16);\n if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n this.mem.setUint8(sp + 48, 0);\n return;\n }\n const toCopy = src.subarray(0, dst.length);\n dst.set(toCopy);\n setInt64(sp + 40, toCopy.length);\n this.mem.setUint8(sp + 48, 1);\n },\n "debug": (value) => {\n console.log(value);\n }\n }\n };\n }\n run(instance) {\n return __async(this, null, function* () {\n if (!(instance instanceof WebAssembly.Instance)) {\n throw new Error("Go.run: WebAssembly.Instance expected");\n }\n this._inst = instance;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n this._values = [\n NaN,\n 0,\n null,\n true,\n false,\n globalThis,\n this\n ];\n this._goRefCounts = new Array(this._values.length).fill(Infinity);\n this._ids = /* @__PURE__ */ new Map([\n [0, 1],\n [null, 2],\n [true, 3],\n [false, 4],\n [globalThis, 5],\n [this, 6]\n ]);\n this._idPool = [];\n this.exited = false;\n let offset = 4096;\n const strPtr = (str) => {\n const ptr = offset;\n const bytes = encoder.encode(str + "\\0");\n new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n offset += bytes.length;\n if (offset % 8 !== 0) {\n offset += 8 - offset % 8;\n }\n return ptr;\n };\n const argc = this.argv.length;\n const argvPtrs = [];\n this.argv.forEach((arg) => {\n argvPtrs.push(strPtr(arg));\n });\n argvPtrs.push(0);\n const keys = Object.keys(this.env).sort();\n keys.forEach((key) => {\n argvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n });\n argvPtrs.push(0);\n const argv = offset;\n argvPtrs.forEach((ptr) => {\n this.mem.setUint32(offset, ptr, true);\n this.mem.setUint32(offset + 4, 0, true);\n offset += 8;\n });\n const wasmMinDataAddr = 4096 + 8192;\n if (offset >= wasmMinDataAddr) {\n throw new Error("total length of command line and environment variables exceeds limit");\n }\n this._inst.exports.run(argc, argv);\n if (this.exited) {\n this._resolveExitPromise();\n }\n yield this._exitPromise;\n });\n }\n _resume() {\n if (this.exited) {\n throw new Error("Go program has already exited");\n }\n this._inst.exports.resume();\n if (this.exited) {\n this._resolveExitPromise();\n }\n }\n _makeFuncWrapper(id) {\n const go = this;\n return function() {\n const event = { id, this: this, args: arguments };\n go._pendingEvent = event;\n go._resume();\n return event.result;\n };\n }\n };\n })();\n onmessage = ({ data: wasm }) => {\n let decoder = new TextDecoder();\n let fs = globalThis.fs;\n let stderr = "";\n fs.writeSync = (fd, buffer) => {\n if (fd === 1) {\n postMessage(buffer);\n } else if (fd === 2) {\n stderr += decoder.decode(buffer);\n let parts = stderr.split("\\n");\n if (parts.length > 1)\n console.log(parts.slice(0, -1).join("\\n"));\n stderr = parts[parts.length - 1];\n } else {\n throw new Error("Bad write");\n }\n return buffer.length;\n };\n let stdin = [];\n let resumeStdin;\n let stdinPos = 0;\n onmessage = ({ data }) => {\n if (data.length > 0) {\n stdin.push(data);\n if (resumeStdin)\n resumeStdin();\n }\n };\n fs.read = (fd, buffer, offset, length, position, callback) => {\n if (fd !== 0 || offset !== 0 || length !== buffer.length || position !== null) {\n throw new Error("Bad read");\n }\n if (stdin.length === 0) {\n resumeStdin = () => fs.read(fd, buffer, offset, length, position, callback);\n return;\n }\n let first = stdin[0];\n let count = Math.max(0, Math.min(length, first.length - stdinPos));\n buffer.set(first.subarray(stdinPos, stdinPos + count), offset);\n stdinPos += count;\n if (stdinPos === first.length) {\n stdin.shift();\n stdinPos = 0;\n }\n callback(null, count);\n };\n let go = new globalThis.Go();\n go.argv = ["", `--service=${"0.15.12"}`];\n if (wasm instanceof WebAssembly.Module) {\n WebAssembly.instantiate(wasm, go.importObject).then((instance) => go.run(instance));\n } else {\n WebAssembly.instantiate(wasm, go.importObject).then(({ instance }) => go.run(instance));\n }\n };\n return (m) => onmessage(m);\n })'}(postMessage)`], { type: "text/javascript" });
1735
1735
  worker = new Worker(URL.createObjectURL(blob));
1736
1736
  } else {
1737
1737
  let onmessage = ((postMessage) => {
@@ -2335,7 +2335,7 @@ var startRunningService = (wasmURL, wasmModule, useWorker) => __async(void 0, nu
2335
2335
  callback(null, count);
2336
2336
  };
2337
2337
  let go = new globalThis.Go();
2338
- go.argv = ["", `--service=${"0.15.9"}`];
2338
+ go.argv = ["", `--service=${"0.15.12"}`];
2339
2339
  if (wasm instanceof WebAssembly.Module) {
2340
2340
  WebAssembly.instantiate(wasm, go.importObject).then((instance) => go.run(instance));
2341
2341
  } else {
@@ -1,17 +1,17 @@
1
1
  (module=>{
2
- "use strict";var ye=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var We=Object.prototype.hasOwnProperty;var qe=(t,e)=>{for(var r in e)ye(t,r,{get:e[r],enumerable:!0})},Ie=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Le(e))!We.call(t,a)&&a!==r&&ye(t,a,{get:()=>e[a],enumerable:!(s=je(e,a))||s.enumerable});return t};var ze=t=>Ie(ye({},"__esModule",{value:!0}),t);var H=(t,e,r)=>new Promise((s,a)=>{var i=d=>{try{l(r.next(d))}catch(R){a(R)}},u=d=>{try{l(r.throw(d))}catch(R){a(R)}},l=d=>d.done?s(d.value):Promise.resolve(d.value).then(i,u);l((r=r.apply(t,e)).next())});var me={};qe(me,{analyzeMetafile:()=>at,analyzeMetafileSync:()=>dt,build:()=>lt,buildSync:()=>ut,default:()=>mt,formatMessages:()=>st,formatMessagesSync:()=>ct,initialize:()=>pt,serve:()=>it,transform:()=>ot,transformSync:()=>ft,version:()=>nt});module.exports=ze(me);function be(t){let e=s=>{if(s===null)r.write8(0);else if(typeof s=="boolean")r.write8(1),r.write8(+s);else if(typeof s=="number")r.write8(2),r.write32(s|0);else if(typeof s=="string")r.write8(3),r.write(Q(s));else if(s instanceof Uint8Array)r.write8(4),r.write(s);else if(s instanceof Array){r.write8(5),r.write32(s.length);for(let a of s)e(a)}else{let a=Object.keys(s);r.write8(6),r.write32(a.length);for(let i of a)r.write(Q(i)),e(s[i])}},r=new ae;return r.write32(0),r.write32(t.id<<1|+!t.isRequest),e(t.value),he(r.buf,r.len-4,0),r.buf.subarray(0,r.len)}function Se(t){let e=()=>{switch(r.read8()){case 0:return null;case 1:return!!r.read8();case 2:return r.read32();case 3:return ee(r.read());case 4:return r.read();case 5:{let u=r.read32(),l=[];for(let d=0;d<u;d++)l.push(e());return l}case 6:{let u=r.read32(),l={};for(let d=0;d<u;d++)l[ee(r.read())]=e();return l}default:throw new Error("Invalid packet")}},r=new ae(t),s=r.read32(),a=(s&1)===0;s>>>=1;let i=e();if(r.ptr!==t.length)throw new Error("Invalid packet");return{id:s,isRequest:a,value:i}}var ae=class{constructor(e=new Uint8Array(1024)){this.buf=e;this.len=0;this.ptr=0}_write(e){if(this.len+e>this.buf.length){let r=new Uint8Array((this.len+e)*2);r.set(this.buf),this.buf=r}return this.len+=e,this.len-e}write8(e){let r=this._write(1);this.buf[r]=e}write32(e){let r=this._write(4);he(this.buf,e,r)}write(e){let r=this._write(4+e.length);he(this.buf,e.length,r),this.buf.set(e,r+4)}_read(e){if(this.ptr+e>this.buf.length)throw new Error("Invalid packet");return this.ptr+=e,this.ptr-e}read8(){return this.buf[this._read(1)]}read32(){return we(this.buf,this._read(4))}read(){let e=this.read32(),r=new Uint8Array(e),s=this._read(r.length);return r.set(this.buf.subarray(s,s+e)),r}},Q,ee;if(typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined"){let t=new TextEncoder,e=new TextDecoder;Q=r=>t.encode(r),ee=r=>e.decode(r)}else if(typeof Buffer!="undefined")Q=t=>{let e=Buffer.from(t);return e instanceof Uint8Array||(e=new Uint8Array(e)),e},ee=t=>{let{buffer:e,byteOffset:r,byteLength:s}=t;return Buffer.from(e,r,s).toString()};else throw new Error("No UTF-8 codec found");function we(t,e){return t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24}function he(t,e,r){t[r++]=e,t[r++]=e>>8,t[r++]=e>>16,t[r++]=e>>24}var Ee="warning",ke="silent";function $e(t){if(t+="",t.indexOf(",")>=0)throw new Error(`Invalid target: ${t}`);return t}var ce=()=>null,U=t=>typeof t=="boolean"?null:"a boolean",_e=t=>typeof t=="boolean"||typeof t=="object"&&!Array.isArray(t)?null:"a boolean or an object",h=t=>typeof t=="string"?null:"a string",de=t=>t instanceof RegExp?null:"a RegExp object",le=t=>typeof t=="number"&&t===(t|0)?null:"an integer",ve=t=>typeof t=="function"?null:"a function",q=t=>Array.isArray(t)?null:"an array",G=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"an object",Ve=t=>t instanceof WebAssembly.Module?null:"a WebAssembly.Module",Je=t=>typeof t=="object"&&t!==null?null:"an array or an object",Me=t=>typeof t=="object"&&!Array.isArray(t)?null:"an object or null",Ce=t=>typeof t=="string"||typeof t=="boolean"?null:"a string or a boolean",Ye=t=>typeof t=="string"||typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"a string or an object",Qe=t=>typeof t=="string"||Array.isArray(t)?null:"a string or an array",De=t=>typeof t=="string"||t instanceof Uint8Array?null:"a string or a Uint8Array";function n(t,e,r,s){let a=t[r];if(e[r+""]=!0,a===void 0)return;let i=s(a);if(i!==null)throw new Error(`"${r}" must be ${i}`);return a}function K(t,e,r){for(let s in t)if(!(s in e))throw new Error(`Invalid option ${r}: "${s}"`)}function Be(t){let e=Object.create(null),r=n(t,e,"wasmURL",h),s=n(t,e,"wasmModule",Ve),a=n(t,e,"worker",U);return K(t,e,"in initialize() call"),{wasmURL:r,wasmModule:s,worker:a}}function Pe(t){let e;if(t!==void 0){e=Object.create(null);for(let r of Object.keys(t)){let s=t[r];if(typeof s=="string"||s===!1)e[r]=s;else throw new Error(`Expected ${JSON.stringify(r)} in mangle cache to map to either a string or false`)}}return e}function pe(t,e,r,s,a){let i=n(e,r,"color",U),u=n(e,r,"logLevel",h),l=n(e,r,"logLimit",le);i!==void 0?t.push(`--color=${i}`):s&&t.push("--color=true"),t.push(`--log-level=${u||a}`),t.push(`--log-limit=${l||0}`)}function Te(t,e,r){let s=n(e,r,"legalComments",h),a=n(e,r,"sourceRoot",h),i=n(e,r,"sourcesContent",U),u=n(e,r,"target",Qe),l=n(e,r,"format",h),d=n(e,r,"globalName",h),R=n(e,r,"mangleProps",de),E=n(e,r,"reserveProps",de),k=n(e,r,"mangleQuoted",U),B=n(e,r,"minify",U),F=n(e,r,"minifySyntax",U),N=n(e,r,"minifyWhitespace",U),I=n(e,r,"minifyIdentifiers",U),j=n(e,r,"drop",q),V=n(e,r,"charset",h),w=n(e,r,"treeShaking",U),p=n(e,r,"ignoreAnnotations",U),o=n(e,r,"jsx",h),c=n(e,r,"jsxFactory",h),y=n(e,r,"jsxFragment",h),x=n(e,r,"jsxImportSource",h),M=n(e,r,"jsxDev",U),f=n(e,r,"jsxSideEffects",U),g=n(e,r,"define",G),b=n(e,r,"logOverride",G),S=n(e,r,"supported",G),O=n(e,r,"pure",q),C=n(e,r,"keepNames",U),$=n(e,r,"platform",h);if(s&&t.push(`--legal-comments=${s}`),a!==void 0&&t.push(`--source-root=${a}`),i!==void 0&&t.push(`--sources-content=${i}`),u&&(Array.isArray(u)?t.push(`--target=${Array.from(u).map($e).join(",")}`):t.push(`--target=${$e(u)}`)),l&&t.push(`--format=${l}`),d&&t.push(`--global-name=${d}`),$&&t.push(`--platform=${$}`),B&&t.push("--minify"),F&&t.push("--minify-syntax"),N&&t.push("--minify-whitespace"),I&&t.push("--minify-identifiers"),V&&t.push(`--charset=${V}`),w!==void 0&&t.push(`--tree-shaking=${w}`),p&&t.push("--ignore-annotations"),j)for(let v of j)t.push(`--drop:${v}`);if(R&&t.push(`--mangle-props=${R.source}`),E&&t.push(`--reserve-props=${E.source}`),k!==void 0&&t.push(`--mangle-quoted=${k}`),o&&t.push(`--jsx=${o}`),c&&t.push(`--jsx-factory=${c}`),y&&t.push(`--jsx-fragment=${y}`),x&&t.push(`--jsx-import-source=${x}`),M&&t.push("--jsx-dev"),f&&t.push("--jsx-side-effects"),g)for(let v in g){if(v.indexOf("=")>=0)throw new Error(`Invalid define: ${v}`);t.push(`--define:${v}=${g[v]}`)}if(b)for(let v in b){if(v.indexOf("=")>=0)throw new Error(`Invalid log override: ${v}`);t.push(`--log-override:${v}=${b[v]}`)}if(S)for(let v in S){if(v.indexOf("=")>=0)throw new Error(`Invalid supported: ${v}`);t.push(`--supported:${v}=${S[v]}`)}if(O)for(let v of O)t.push(`--pure:${v}`);C&&t.push("--keep-names")}function He(t,e,r,s,a){var Y;let i=[],u=[],l=Object.create(null),d=null,R=null,E=null;pe(i,e,l,r,s),Te(i,e,l);let k=n(e,l,"sourcemap",Ce),B=n(e,l,"bundle",U),F=n(e,l,"watch",_e),N=n(e,l,"splitting",U),I=n(e,l,"preserveSymlinks",U),j=n(e,l,"metafile",U),V=n(e,l,"outfile",h),w=n(e,l,"outdir",h),p=n(e,l,"outbase",h),o=n(e,l,"tsconfig",h),c=n(e,l,"resolveExtensions",q),y=n(e,l,"nodePaths",q),x=n(e,l,"mainFields",q),M=n(e,l,"conditions",q),f=n(e,l,"external",q),g=n(e,l,"loader",G),b=n(e,l,"outExtension",G),S=n(e,l,"publicPath",h),O=n(e,l,"entryNames",h),C=n(e,l,"chunkNames",h),$=n(e,l,"assetNames",h),v=n(e,l,"inject",q),D=n(e,l,"banner",G),L=n(e,l,"footer",G),z=n(e,l,"entryPoints",Je),W=n(e,l,"absWorkingDir",h),A=n(e,l,"stdin",G),P=(Y=n(e,l,"write",U))!=null?Y:a,_=n(e,l,"allowOverwrite",U),J=n(e,l,"incremental",U)===!0,Z=n(e,l,"mangleCache",G);if(l.plugins=!0,K(e,l,`in ${t}() call`),k&&i.push(`--sourcemap${k===!0?"":`=${k}`}`),B&&i.push("--bundle"),_&&i.push("--allow-overwrite"),F)if(i.push("--watch"),typeof F=="boolean")E={};else{let m=Object.create(null),T=n(F,m,"onRebuild",ve);K(F,m,`on "watch" in ${t}() call`),E={onRebuild:T}}if(N&&i.push("--splitting"),I&&i.push("--preserve-symlinks"),j&&i.push("--metafile"),V&&i.push(`--outfile=${V}`),w&&i.push(`--outdir=${w}`),p&&i.push(`--outbase=${p}`),o&&i.push(`--tsconfig=${o}`),c){let m=[];for(let T of c){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${T}`);m.push(T)}i.push(`--resolve-extensions=${m.join(",")}`)}if(S&&i.push(`--public-path=${S}`),O&&i.push(`--entry-names=${O}`),C&&i.push(`--chunk-names=${C}`),$&&i.push(`--asset-names=${$}`),x){let m=[];for(let T of x){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid main field: ${T}`);m.push(T)}i.push(`--main-fields=${m.join(",")}`)}if(M){let m=[];for(let T of M){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid condition: ${T}`);m.push(T)}i.push(`--conditions=${m.join(",")}`)}if(f)for(let m of f)i.push(`--external:${m}`);if(D)for(let m in D){if(m.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${m}`);i.push(`--banner:${m}=${D[m]}`)}if(L)for(let m in L){if(m.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${m}`);i.push(`--footer:${m}=${L[m]}`)}if(v)for(let m of v)i.push(`--inject:${m}`);if(g)for(let m in g){if(m.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${m}`);i.push(`--loader:${m}=${g[m]}`)}if(b)for(let m in b){if(m.indexOf("=")>=0)throw new Error(`Invalid out extension: ${m}`);i.push(`--out-extension:${m}=${b[m]}`)}if(z)if(Array.isArray(z))for(let m of z)u.push(["",m+""]);else for(let[m,T]of Object.entries(z))u.push([m+"",T+""]);if(A){let m=Object.create(null),T=n(A,m,"contents",De),se=n(A,m,"resolveDir",h),Oe=n(A,m,"sourcefile",h),xe=n(A,m,"loader",h);K(A,m,'in "stdin" object'),Oe&&i.push(`--sourcefile=${Oe}`),xe&&i.push(`--loader=${xe}`),se&&(R=se+""),typeof T=="string"?d=Q(T):T instanceof Uint8Array&&(d=T)}let re=[];if(y)for(let m of y)m+="",re.push(m);return{entries:u,flags:i,write:P,stdinContents:d,stdinResolveDir:R,absWorkingDir:W,incremental:J,nodePaths:re,watch:E,mangleCache:Pe(Z)}}function Ge(t,e,r,s){let a=[],i=Object.create(null);pe(a,e,i,r,s),Te(a,e,i);let u=n(e,i,"sourcemap",Ce),l=n(e,i,"tsconfigRaw",Ye),d=n(e,i,"sourcefile",h),R=n(e,i,"loader",h),E=n(e,i,"banner",h),k=n(e,i,"footer",h),B=n(e,i,"mangleCache",G);return K(e,i,`in ${t}() call`),u&&a.push(`--sourcemap=${u===!0?"external":u}`),l&&a.push(`--tsconfig-raw=${typeof l=="string"?l:JSON.stringify(l)}`),d&&a.push(`--sourcefile=${d}`),R&&a.push(`--loader=${R}`),E&&a.push(`--banner=${E}`),k&&a.push(`--footer=${k}`),{flags:a,mangleCache:Pe(B)}}function Fe(t){let e={},r={didClose:!1,reason:""},s={},a=0,i=0,u=new Uint8Array(16*1024),l=0,d=p=>{let o=l+p.length;if(o>u.length){let y=new Uint8Array(o*2);y.set(u),u=y}u.set(p,l),l+=p.length;let c=0;for(;c+4<=l;){let y=we(u,c);if(c+4+y>l)break;c+=4,N(u.subarray(c,c+y)),c+=y}c>0&&(u.copyWithin(0,c,l),l-=c)},R=p=>{r.didClose=!0,p&&(r.reason=": "+(p.message||p));let o="The service was stopped"+r.reason;for(let c in s)s[c](o,null);s={}},E=(p,o,c)=>{if(r.didClose)return c("The service is no longer running"+r.reason,null);let y=a++;s[y]=(x,M)=>{try{c(x,M)}finally{p&&p.unref()}},p&&p.ref(),t.writeToStdin(be({id:y,isRequest:!0,value:o}))},k=(p,o)=>{if(r.didClose)throw new Error("The service is no longer running"+r.reason);t.writeToStdin(be({id:p,isRequest:!1,value:o}))},B=(p,o)=>H(this,null,function*(){try{if(o.command==="ping"){k(p,{});return}if(typeof o.key=="number"){let c=e[o.key];if(c){let y=c[o.command];if(y){yield y(p,o);return}}}throw new Error("Invalid command: "+o.command)}catch(c){k(p,{errors:[ie(c,t,null,void 0,"")]})}}),F=!0,N=p=>{if(F){F=!1;let c=String.fromCharCode(...p);if(c!=="0.15.9")throw new Error(`Cannot start service: Host version "0.15.9" does not match binary version ${JSON.stringify(c)}`);return}let o=Se(p);if(o.isRequest)B(o.id,o.value);else{let c=s[o.id];delete s[o.id],o.value.error?c(o.value.error,{}):c(null,o.value)}};return{readFromStdout:d,afterClose:R,service:{buildOrServe:({callName:p,refs:o,serveOptions:c,options:y,isTTY:x,defaultWD:M,callback:f})=>{let g=0,b=i++,S={},O={ref(){++g===1&&o&&o.ref()},unref(){--g===0&&(delete e[b],o&&o.unref())}};e[b]=S,O.ref(),Xe(p,b,E,k,O,t,S,y,c,x,M,r,(C,$)=>{try{f(C,$)}finally{O.unref()}})},transform:({callName:p,refs:o,input:c,options:y,isTTY:x,fs:M,callback:f})=>{let g=Ue(),b=S=>{try{if(typeof c!="string"&&!(c instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:O,mangleCache:C}=Ge(p,y,x,ke),$={command:"transform",flags:O,inputFS:S!==null,input:S!==null?Q(S):typeof c=="string"?Q(c):c};C&&($.mangleCache=C),E(o,$,(v,D)=>{if(v)return f(new Error(v),null);let L=X(D.errors,g),z=X(D.warnings,g),W=1,A=()=>{if(--W===0){let P={warnings:z,code:D.code,map:D.map};D.mangleCache&&(P.mangleCache=D==null?void 0:D.mangleCache),f(null,P)}};if(L.length>0)return f(ne("Transform failed",L,z),null);D.codeFS&&(W++,M.readFile(D.code,(P,_)=>{P!==null?f(P,null):(D.code=_,A())})),D.mapFS&&(W++,M.readFile(D.map,(P,_)=>{P!==null?f(P,null):(D.map=_,A())})),A()})}catch(O){let C=[];try{pe(C,y,{},x,ke)}catch(v){}let $=ie(O,t,g,void 0,"");E(o,{command:"error",flags:C,error:$},()=>{$.detail=g.load($.detail),f(ne("Transform failed",[$],[]),null)})}};if((typeof c=="string"||c instanceof Uint8Array)&&c.length>1024*1024){let S=b;b=()=>M.writeFile(c,S)}b(null)},formatMessages:({callName:p,refs:o,messages:c,options:y,callback:x})=>{let M=te(c,"messages",null,"");if(!y)throw new Error(`Missing second argument in ${p}() call`);let f={},g=n(y,f,"kind",h),b=n(y,f,"color",U),S=n(y,f,"terminalWidth",le);if(K(y,f,`in ${p}() call`),g===void 0)throw new Error(`Missing "kind" in ${p}() call`);if(g!=="error"&&g!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${p}() call`);let O={command:"format-msgs",messages:M,isWarning:g==="warning"};b!==void 0&&(O.color=b),S!==void 0&&(O.terminalWidth=S),E(o,O,(C,$)=>{if(C)return x(new Error(C),null);x(null,$.messages)})},analyzeMetafile:({callName:p,refs:o,metafile:c,options:y,callback:x})=>{y===void 0&&(y={});let M={},f=n(y,M,"color",U),g=n(y,M,"verbose",U);K(y,M,`in ${p}() call`);let b={command:"analyze-metafile",metafile:c};f!==void 0&&(b.color=f),g!==void 0&&(b.verbose=g),E(o,b,(S,O)=>{if(S)return x(new Error(S),null);x(null,O.result)})}}}}function Xe(t,e,r,s,a,i,u,l,d,R,E,k,B){let F=Ue(),N=(w,p,o,c)=>{let y=[];try{pe(y,l,{},R,Ee)}catch(M){}let x=ie(w,i,F,o,p);r(a,{command:"error",flags:y,error:x},()=>{x.detail=F.load(x.detail),c(x)})},I=(w,p)=>{N(w,p,void 0,o=>{B(ne("Build failed",[o],[]),null)})},j;if(typeof l=="object"){let w=l.plugins;if(w!==void 0){if(!Array.isArray(w))throw new Error('"plugins" must be an array');j=w}}if(j&&j.length>0){if(i.isSync){I(new Error("Cannot use plugins in synchronous API calls"),"");return}et(e,r,s,a,i,u,l,j,F).then(w=>{if(!w.ok){I(w.error,w.pluginName);return}try{V(w.requestPlugins,w.runOnEndCallbacks)}catch(p){I(p,"")}},w=>I(w,""));return}try{V(null,(w,p,o)=>o())}catch(w){I(w,"")}function V(w,p){let o=!i.isWriteUnavailable,{entries:c,flags:y,write:x,stdinContents:M,stdinResolveDir:f,absWorkingDir:g,incremental:b,nodePaths:S,watch:O,mangleCache:C}=He(t,l,R,Ee,o),$={command:"build",key:e,entries:c,flags:y,write:x,stdinContents:M,stdinResolveDir:f,absWorkingDir:g||E,incremental:b,nodePaths:S};w&&($.plugins=w),C&&($.mangleCache=C);let v=d&&Ze(e,r,s,a,u,d,$),D,L,z=(A,P)=>{A.outputFiles&&(P.outputFiles=A.outputFiles.map(tt)),A.metafile&&(P.metafile=JSON.parse(A.metafile)),A.mangleCache&&(P.mangleCache=A.mangleCache),A.writeToStdout!==void 0&&console.log(ee(A.writeToStdout).replace(/\n$/,""))},W=(A,P)=>{let _={errors:X(A.errors,F),warnings:X(A.warnings,F)};z(A,_),p(_,N,()=>{if(_.errors.length>0)return P(ne("Build failed",_.errors,_.warnings),null);if(A.rebuild){if(!D){let J=!1;D=()=>new Promise((Z,re)=>{if(J||k.didClose)throw new Error("Cannot rebuild");r(a,{command:"rebuild",key:e},(Y,m)=>{if(Y)return P(ne("Build failed",[{id:"",pluginName:"",text:Y,location:null,notes:[],detail:void 0}],[]),null);W(m,(T,se)=>{T?re(T):Z(se)})})}),a.ref(),D.dispose=()=>{J||(J=!0,r(a,{command:"rebuild-dispose",key:e},()=>{}),a.unref())}}_.rebuild=D}if(A.watch){if(!L){let J=!1;a.ref(),L=()=>{J||(J=!0,delete u["watch-rebuild"],r(a,{command:"watch-stop",key:e},()=>{}),a.unref())},O&&(u["watch-rebuild"]=(Z,re)=>{try{let Y=re.args,m={errors:X(Y.errors,F),warnings:X(Y.warnings,F)};z(Y,m),p(m,N,()=>{if(m.errors.length>0){O.onRebuild&&O.onRebuild(ne("Build failed",m.errors,m.warnings),null);return}m.stop=L,O.onRebuild&&O.onRebuild(null,m)})}catch(Y){console.error(Y)}s(Z,{})})}_.stop=L}P(null,_)})};if(x&&i.isWriteUnavailable)throw new Error('The "write" option is unavailable in this environment');if(b&&i.isSync)throw new Error('Cannot use "incremental" with a synchronous build');if(O&&i.isSync)throw new Error('Cannot use "watch" with a synchronous build');r(a,$,(A,P)=>{if(A)return B(new Error(A),null);if(v){let _=P,J=!1;a.ref();let Z={port:_.port,host:_.host,wait:v.wait,stop(){J||(J=!0,v.stop(),a.unref())}};return a.ref(),v.wait.then(a.unref,a.unref),B(null,Z)}return W(P,B)})}}var Ze=(t,e,r,s,a,i,u)=>{let l={},d=n(i,l,"port",le),R=n(i,l,"host",h),E=n(i,l,"servedir",h),k=n(i,l,"onRequest",ve),B=new Promise((F,N)=>{a["serve-wait"]=(I,j)=>{j.error!==null?N(new Error(j.error)):F(),r(I,{})}});return u.serve={},K(i,l,"in serve() call"),d!==void 0&&(u.serve.port=d),R!==void 0&&(u.serve.host=R),E!==void 0&&(u.serve.servedir=E),a["serve-request"]=(F,N)=>{k&&k(N.args),r(F,{})},{wait:B,stop(){e(s,{command:"serve-stop",key:t},()=>{})}}},et=(t,e,r,s,a,i,u,l,d)=>H(void 0,null,function*(){let R=[],E=[],k={},B={},F=0,N=0,I=[],j=!1;l=[...l];for(let w of l){let p={};if(typeof w!="object")throw new Error(`Plugin at index ${N} must be an object`);let o=n(w,p,"name",h);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${N} is missing a name`);try{let c=n(w,p,"setup",ve);if(typeof c!="function")throw new Error("Plugin is missing a setup function");K(w,p,`on plugin ${JSON.stringify(o)}`);let y={name:o,onResolve:[],onLoad:[]};N++;let M=c({initialOptions:u,resolve:(f,g={})=>{if(!j)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof f!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),S=n(g,b,"pluginName",h),O=n(g,b,"importer",h),C=n(g,b,"namespace",h),$=n(g,b,"resolveDir",h),v=n(g,b,"kind",h),D=n(g,b,"pluginData",ce);return K(g,b,"in resolve() call"),new Promise((L,z)=>{let W={command:"resolve",path:f,key:t,pluginName:o};S!=null&&(W.pluginName=S),O!=null&&(W.importer=O),C!=null&&(W.namespace=C),$!=null&&(W.resolveDir=$),v!=null&&(W.kind=v),D!=null&&(W.pluginData=d.store(D)),e(s,W,(A,P)=>{A!==null?z(new Error(A)):L({errors:X(P.errors,d),warnings:X(P.warnings,d),path:P.path,external:P.external,sideEffects:P.sideEffects,namespace:P.namespace,suffix:P.suffix,pluginData:d.load(P.pluginData)})})})},onStart(f){let g='This error came from the "onStart" callback registered here:',b=ue(new Error(g),a,"onStart");R.push({name:o,callback:f,note:b})},onEnd(f){let g='This error came from the "onEnd" callback registered here:',b=ue(new Error(g),a,"onEnd");E.push({name:o,callback:f,note:b})},onResolve(f,g){let b='This error came from the "onResolve" callback registered here:',S=ue(new Error(b),a,"onResolve"),O={},C=n(f,O,"filter",de),$=n(f,O,"namespace",h);if(K(f,O,`in onResolve() call for plugin ${JSON.stringify(o)}`),C==null)throw new Error("onResolve() call is missing a filter");let v=F++;k[v]={name:o,callback:g,note:S},y.onResolve.push({id:v,filter:C.source,namespace:$||""})},onLoad(f,g){let b='This error came from the "onLoad" callback registered here:',S=ue(new Error(b),a,"onLoad"),O={},C=n(f,O,"filter",de),$=n(f,O,"namespace",h);if(K(f,O,`in onLoad() call for plugin ${JSON.stringify(o)}`),C==null)throw new Error("onLoad() call is missing a filter");let v=F++;B[v]={name:o,callback:g,note:S},y.onLoad.push({id:v,filter:C.source,namespace:$||""})},esbuild:a.esbuild});M&&(yield M),I.push(y)}catch(c){return{ok:!1,error:c,pluginName:o}}}i["on-start"]=(w,p)=>H(void 0,null,function*(){let o={errors:[],warnings:[]};yield Promise.all(R.map(M=>H(void 0,[M],function*({name:c,callback:y,note:x}){try{let f=yield y();if(f!=null){if(typeof f!="object")throw new Error(`Expected onStart() callback in plugin ${JSON.stringify(c)} to return an object`);let g={},b=n(f,g,"errors",q),S=n(f,g,"warnings",q);K(f,g,`from onStart() callback in plugin ${JSON.stringify(c)}`),b!=null&&o.errors.push(...te(b,"errors",d,c)),S!=null&&o.warnings.push(...te(S,"warnings",d,c))}}catch(f){o.errors.push(ie(f,a,d,x&&x(),c))}}))),r(w,o)}),i["on-resolve"]=(w,p)=>H(void 0,null,function*(){let o={},c="",y,x;for(let M of p.ids)try{({name:c,callback:y,note:x}=k[M]);let f=yield y({path:p.path,importer:p.importer,namespace:p.namespace,resolveDir:p.resolveDir,kind:p.kind,pluginData:d.load(p.pluginData)});if(f!=null){if(typeof f!="object")throw new Error(`Expected onResolve() callback in plugin ${JSON.stringify(c)} to return an object`);let g={},b=n(f,g,"pluginName",h),S=n(f,g,"path",h),O=n(f,g,"namespace",h),C=n(f,g,"suffix",h),$=n(f,g,"external",U),v=n(f,g,"sideEffects",U),D=n(f,g,"pluginData",ce),L=n(f,g,"errors",q),z=n(f,g,"warnings",q),W=n(f,g,"watchFiles",q),A=n(f,g,"watchDirs",q);K(f,g,`from onResolve() callback in plugin ${JSON.stringify(c)}`),o.id=M,b!=null&&(o.pluginName=b),S!=null&&(o.path=S),O!=null&&(o.namespace=O),C!=null&&(o.suffix=C),$!=null&&(o.external=$),v!=null&&(o.sideEffects=v),D!=null&&(o.pluginData=d.store(D)),L!=null&&(o.errors=te(L,"errors",d,c)),z!=null&&(o.warnings=te(z,"warnings",d,c)),W!=null&&(o.watchFiles=fe(W,"watchFiles")),A!=null&&(o.watchDirs=fe(A,"watchDirs"));break}}catch(f){o={id:M,errors:[ie(f,a,d,x&&x(),c)]};break}r(w,o)}),i["on-load"]=(w,p)=>H(void 0,null,function*(){let o={},c="",y,x;for(let M of p.ids)try{({name:c,callback:y,note:x}=B[M]);let f=yield y({path:p.path,namespace:p.namespace,suffix:p.suffix,pluginData:d.load(p.pluginData)});if(f!=null){if(typeof f!="object")throw new Error(`Expected onLoad() callback in plugin ${JSON.stringify(c)} to return an object`);let g={},b=n(f,g,"pluginName",h),S=n(f,g,"contents",De),O=n(f,g,"resolveDir",h),C=n(f,g,"pluginData",ce),$=n(f,g,"loader",h),v=n(f,g,"errors",q),D=n(f,g,"warnings",q),L=n(f,g,"watchFiles",q),z=n(f,g,"watchDirs",q);K(f,g,`from onLoad() callback in plugin ${JSON.stringify(c)}`),o.id=M,b!=null&&(o.pluginName=b),S instanceof Uint8Array?o.contents=S:S!=null&&(o.contents=Q(S)),O!=null&&(o.resolveDir=O),C!=null&&(o.pluginData=d.store(C)),$!=null&&(o.loader=$),v!=null&&(o.errors=te(v,"errors",d,c)),D!=null&&(o.warnings=te(D,"warnings",d,c)),L!=null&&(o.watchFiles=fe(L,"watchFiles")),z!=null&&(o.watchDirs=fe(z,"watchDirs"));break}}catch(f){o={id:M,errors:[ie(f,a,d,x&&x(),c)]};break}r(w,o)});let V=(w,p,o)=>o();return E.length>0&&(V=(w,p,o)=>{(()=>H(void 0,null,function*(){for(let{name:c,callback:y,note:x}of E)try{yield y(w)}catch(M){w.errors.push(yield new Promise(f=>p(M,c,x&&x(),f)))}}))().then(o)}),j=!0,{ok:!0,requestPlugins:I,runOnEndCallbacks:V}});function Ue(){let t=new Map,e=0;return{load(r){return t.get(r)},store(r){if(r===void 0)return-1;let s=e++;return t.set(s,r),s}}}function ue(t,e,r){let s,a=!1;return()=>{if(a)return s;a=!0;try{let i=(t.stack+"").split(`
2
+ "use strict";var ye=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var We=Object.prototype.hasOwnProperty;var qe=(t,e)=>{for(var r in e)ye(t,r,{get:e[r],enumerable:!0})},Ie=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Le(e))!We.call(t,a)&&a!==r&&ye(t,a,{get:()=>e[a],enumerable:!(s=je(e,a))||s.enumerable});return t};var ze=t=>Ie(ye({},"__esModule",{value:!0}),t);var H=(t,e,r)=>new Promise((s,a)=>{var i=d=>{try{l(r.next(d))}catch(R){a(R)}},u=d=>{try{l(r.throw(d))}catch(R){a(R)}},l=d=>d.done?s(d.value):Promise.resolve(d.value).then(i,u);l((r=r.apply(t,e)).next())});var me={};qe(me,{analyzeMetafile:()=>at,analyzeMetafileSync:()=>dt,build:()=>lt,buildSync:()=>ut,default:()=>mt,formatMessages:()=>st,formatMessagesSync:()=>ct,initialize:()=>pt,serve:()=>it,transform:()=>ot,transformSync:()=>ft,version:()=>nt});module.exports=ze(me);function be(t){let e=s=>{if(s===null)r.write8(0);else if(typeof s=="boolean")r.write8(1),r.write8(+s);else if(typeof s=="number")r.write8(2),r.write32(s|0);else if(typeof s=="string")r.write8(3),r.write(Q(s));else if(s instanceof Uint8Array)r.write8(4),r.write(s);else if(s instanceof Array){r.write8(5),r.write32(s.length);for(let a of s)e(a)}else{let a=Object.keys(s);r.write8(6),r.write32(a.length);for(let i of a)r.write(Q(i)),e(s[i])}},r=new ae;return r.write32(0),r.write32(t.id<<1|+!t.isRequest),e(t.value),he(r.buf,r.len-4,0),r.buf.subarray(0,r.len)}function Se(t){let e=()=>{switch(r.read8()){case 0:return null;case 1:return!!r.read8();case 2:return r.read32();case 3:return ee(r.read());case 4:return r.read();case 5:{let u=r.read32(),l=[];for(let d=0;d<u;d++)l.push(e());return l}case 6:{let u=r.read32(),l={};for(let d=0;d<u;d++)l[ee(r.read())]=e();return l}default:throw new Error("Invalid packet")}},r=new ae(t),s=r.read32(),a=(s&1)===0;s>>>=1;let i=e();if(r.ptr!==t.length)throw new Error("Invalid packet");return{id:s,isRequest:a,value:i}}var ae=class{constructor(e=new Uint8Array(1024)){this.buf=e;this.len=0;this.ptr=0}_write(e){if(this.len+e>this.buf.length){let r=new Uint8Array((this.len+e)*2);r.set(this.buf),this.buf=r}return this.len+=e,this.len-e}write8(e){let r=this._write(1);this.buf[r]=e}write32(e){let r=this._write(4);he(this.buf,e,r)}write(e){let r=this._write(4+e.length);he(this.buf,e.length,r),this.buf.set(e,r+4)}_read(e){if(this.ptr+e>this.buf.length)throw new Error("Invalid packet");return this.ptr+=e,this.ptr-e}read8(){return this.buf[this._read(1)]}read32(){return we(this.buf,this._read(4))}read(){let e=this.read32(),r=new Uint8Array(e),s=this._read(r.length);return r.set(this.buf.subarray(s,s+e)),r}},Q,ee;if(typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined"){let t=new TextEncoder,e=new TextDecoder;Q=r=>t.encode(r),ee=r=>e.decode(r)}else if(typeof Buffer!="undefined")Q=t=>{let e=Buffer.from(t);return e instanceof Uint8Array||(e=new Uint8Array(e)),e},ee=t=>{let{buffer:e,byteOffset:r,byteLength:s}=t;return Buffer.from(e,r,s).toString()};else throw new Error("No UTF-8 codec found");function we(t,e){return t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24}function he(t,e,r){t[r++]=e,t[r++]=e>>8,t[r++]=e>>16,t[r++]=e>>24}var Ee="warning",ke="silent";function $e(t){if(t+="",t.indexOf(",")>=0)throw new Error(`Invalid target: ${t}`);return t}var ce=()=>null,U=t=>typeof t=="boolean"?null:"a boolean",_e=t=>typeof t=="boolean"||typeof t=="object"&&!Array.isArray(t)?null:"a boolean or an object",h=t=>typeof t=="string"?null:"a string",de=t=>t instanceof RegExp?null:"a RegExp object",le=t=>typeof t=="number"&&t===(t|0)?null:"an integer",ve=t=>typeof t=="function"?null:"a function",q=t=>Array.isArray(t)?null:"an array",G=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"an object",Ve=t=>t instanceof WebAssembly.Module?null:"a WebAssembly.Module",Je=t=>typeof t=="object"&&t!==null?null:"an array or an object",Me=t=>typeof t=="object"&&!Array.isArray(t)?null:"an object or null",Ce=t=>typeof t=="string"||typeof t=="boolean"?null:"a string or a boolean",Ye=t=>typeof t=="string"||typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"a string or an object",Qe=t=>typeof t=="string"||Array.isArray(t)?null:"a string or an array",De=t=>typeof t=="string"||t instanceof Uint8Array?null:"a string or a Uint8Array";function n(t,e,r,s){let a=t[r];if(e[r+""]=!0,a===void 0)return;let i=s(a);if(i!==null)throw new Error(`"${r}" must be ${i}`);return a}function K(t,e,r){for(let s in t)if(!(s in e))throw new Error(`Invalid option ${r}: "${s}"`)}function Be(t){let e=Object.create(null),r=n(t,e,"wasmURL",h),s=n(t,e,"wasmModule",Ve),a=n(t,e,"worker",U);return K(t,e,"in initialize() call"),{wasmURL:r,wasmModule:s,worker:a}}function Pe(t){let e;if(t!==void 0){e=Object.create(null);for(let r of Object.keys(t)){let s=t[r];if(typeof s=="string"||s===!1)e[r]=s;else throw new Error(`Expected ${JSON.stringify(r)} in mangle cache to map to either a string or false`)}}return e}function pe(t,e,r,s,a){let i=n(e,r,"color",U),u=n(e,r,"logLevel",h),l=n(e,r,"logLimit",le);i!==void 0?t.push(`--color=${i}`):s&&t.push("--color=true"),t.push(`--log-level=${u||a}`),t.push(`--log-limit=${l||0}`)}function Te(t,e,r){let s=n(e,r,"legalComments",h),a=n(e,r,"sourceRoot",h),i=n(e,r,"sourcesContent",U),u=n(e,r,"target",Qe),l=n(e,r,"format",h),d=n(e,r,"globalName",h),R=n(e,r,"mangleProps",de),E=n(e,r,"reserveProps",de),k=n(e,r,"mangleQuoted",U),B=n(e,r,"minify",U),F=n(e,r,"minifySyntax",U),N=n(e,r,"minifyWhitespace",U),I=n(e,r,"minifyIdentifiers",U),j=n(e,r,"drop",q),V=n(e,r,"charset",h),w=n(e,r,"treeShaking",U),p=n(e,r,"ignoreAnnotations",U),o=n(e,r,"jsx",h),c=n(e,r,"jsxFactory",h),y=n(e,r,"jsxFragment",h),x=n(e,r,"jsxImportSource",h),M=n(e,r,"jsxDev",U),f=n(e,r,"jsxSideEffects",U),g=n(e,r,"define",G),b=n(e,r,"logOverride",G),S=n(e,r,"supported",G),O=n(e,r,"pure",q),C=n(e,r,"keepNames",U),$=n(e,r,"platform",h);if(s&&t.push(`--legal-comments=${s}`),a!==void 0&&t.push(`--source-root=${a}`),i!==void 0&&t.push(`--sources-content=${i}`),u&&(Array.isArray(u)?t.push(`--target=${Array.from(u).map($e).join(",")}`):t.push(`--target=${$e(u)}`)),l&&t.push(`--format=${l}`),d&&t.push(`--global-name=${d}`),$&&t.push(`--platform=${$}`),B&&t.push("--minify"),F&&t.push("--minify-syntax"),N&&t.push("--minify-whitespace"),I&&t.push("--minify-identifiers"),V&&t.push(`--charset=${V}`),w!==void 0&&t.push(`--tree-shaking=${w}`),p&&t.push("--ignore-annotations"),j)for(let v of j)t.push(`--drop:${v}`);if(R&&t.push(`--mangle-props=${R.source}`),E&&t.push(`--reserve-props=${E.source}`),k!==void 0&&t.push(`--mangle-quoted=${k}`),o&&t.push(`--jsx=${o}`),c&&t.push(`--jsx-factory=${c}`),y&&t.push(`--jsx-fragment=${y}`),x&&t.push(`--jsx-import-source=${x}`),M&&t.push("--jsx-dev"),f&&t.push("--jsx-side-effects"),g)for(let v in g){if(v.indexOf("=")>=0)throw new Error(`Invalid define: ${v}`);t.push(`--define:${v}=${g[v]}`)}if(b)for(let v in b){if(v.indexOf("=")>=0)throw new Error(`Invalid log override: ${v}`);t.push(`--log-override:${v}=${b[v]}`)}if(S)for(let v in S){if(v.indexOf("=")>=0)throw new Error(`Invalid supported: ${v}`);t.push(`--supported:${v}=${S[v]}`)}if(O)for(let v of O)t.push(`--pure:${v}`);C&&t.push("--keep-names")}function He(t,e,r,s,a){var Y;let i=[],u=[],l=Object.create(null),d=null,R=null,E=null;pe(i,e,l,r,s),Te(i,e,l);let k=n(e,l,"sourcemap",Ce),B=n(e,l,"bundle",U),F=n(e,l,"watch",_e),N=n(e,l,"splitting",U),I=n(e,l,"preserveSymlinks",U),j=n(e,l,"metafile",U),V=n(e,l,"outfile",h),w=n(e,l,"outdir",h),p=n(e,l,"outbase",h),o=n(e,l,"tsconfig",h),c=n(e,l,"resolveExtensions",q),y=n(e,l,"nodePaths",q),x=n(e,l,"mainFields",q),M=n(e,l,"conditions",q),f=n(e,l,"external",q),g=n(e,l,"loader",G),b=n(e,l,"outExtension",G),S=n(e,l,"publicPath",h),O=n(e,l,"entryNames",h),C=n(e,l,"chunkNames",h),$=n(e,l,"assetNames",h),v=n(e,l,"inject",q),D=n(e,l,"banner",G),L=n(e,l,"footer",G),z=n(e,l,"entryPoints",Je),W=n(e,l,"absWorkingDir",h),A=n(e,l,"stdin",G),P=(Y=n(e,l,"write",U))!=null?Y:a,_=n(e,l,"allowOverwrite",U),J=n(e,l,"incremental",U)===!0,Z=n(e,l,"mangleCache",G);if(l.plugins=!0,K(e,l,`in ${t}() call`),k&&i.push(`--sourcemap${k===!0?"":`=${k}`}`),B&&i.push("--bundle"),_&&i.push("--allow-overwrite"),F)if(i.push("--watch"),typeof F=="boolean")E={};else{let m=Object.create(null),T=n(F,m,"onRebuild",ve);K(F,m,`on "watch" in ${t}() call`),E={onRebuild:T}}if(N&&i.push("--splitting"),I&&i.push("--preserve-symlinks"),j&&i.push("--metafile"),V&&i.push(`--outfile=${V}`),w&&i.push(`--outdir=${w}`),p&&i.push(`--outbase=${p}`),o&&i.push(`--tsconfig=${o}`),c){let m=[];for(let T of c){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${T}`);m.push(T)}i.push(`--resolve-extensions=${m.join(",")}`)}if(S&&i.push(`--public-path=${S}`),O&&i.push(`--entry-names=${O}`),C&&i.push(`--chunk-names=${C}`),$&&i.push(`--asset-names=${$}`),x){let m=[];for(let T of x){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid main field: ${T}`);m.push(T)}i.push(`--main-fields=${m.join(",")}`)}if(M){let m=[];for(let T of M){if(T+="",T.indexOf(",")>=0)throw new Error(`Invalid condition: ${T}`);m.push(T)}i.push(`--conditions=${m.join(",")}`)}if(f)for(let m of f)i.push(`--external:${m}`);if(D)for(let m in D){if(m.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${m}`);i.push(`--banner:${m}=${D[m]}`)}if(L)for(let m in L){if(m.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${m}`);i.push(`--footer:${m}=${L[m]}`)}if(v)for(let m of v)i.push(`--inject:${m}`);if(g)for(let m in g){if(m.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${m}`);i.push(`--loader:${m}=${g[m]}`)}if(b)for(let m in b){if(m.indexOf("=")>=0)throw new Error(`Invalid out extension: ${m}`);i.push(`--out-extension:${m}=${b[m]}`)}if(z)if(Array.isArray(z))for(let m of z)u.push(["",m+""]);else for(let[m,T]of Object.entries(z))u.push([m+"",T+""]);if(A){let m=Object.create(null),T=n(A,m,"contents",De),se=n(A,m,"resolveDir",h),Oe=n(A,m,"sourcefile",h),xe=n(A,m,"loader",h);K(A,m,'in "stdin" object'),Oe&&i.push(`--sourcefile=${Oe}`),xe&&i.push(`--loader=${xe}`),se&&(R=se+""),typeof T=="string"?d=Q(T):T instanceof Uint8Array&&(d=T)}let re=[];if(y)for(let m of y)m+="",re.push(m);return{entries:u,flags:i,write:P,stdinContents:d,stdinResolveDir:R,absWorkingDir:W,incremental:J,nodePaths:re,watch:E,mangleCache:Pe(Z)}}function Ge(t,e,r,s){let a=[],i=Object.create(null);pe(a,e,i,r,s),Te(a,e,i);let u=n(e,i,"sourcemap",Ce),l=n(e,i,"tsconfigRaw",Ye),d=n(e,i,"sourcefile",h),R=n(e,i,"loader",h),E=n(e,i,"banner",h),k=n(e,i,"footer",h),B=n(e,i,"mangleCache",G);return K(e,i,`in ${t}() call`),u&&a.push(`--sourcemap=${u===!0?"external":u}`),l&&a.push(`--tsconfig-raw=${typeof l=="string"?l:JSON.stringify(l)}`),d&&a.push(`--sourcefile=${d}`),R&&a.push(`--loader=${R}`),E&&a.push(`--banner=${E}`),k&&a.push(`--footer=${k}`),{flags:a,mangleCache:Pe(B)}}function Fe(t){let e={},r={didClose:!1,reason:""},s={},a=0,i=0,u=new Uint8Array(16*1024),l=0,d=p=>{let o=l+p.length;if(o>u.length){let y=new Uint8Array(o*2);y.set(u),u=y}u.set(p,l),l+=p.length;let c=0;for(;c+4<=l;){let y=we(u,c);if(c+4+y>l)break;c+=4,N(u.subarray(c,c+y)),c+=y}c>0&&(u.copyWithin(0,c,l),l-=c)},R=p=>{r.didClose=!0,p&&(r.reason=": "+(p.message||p));let o="The service was stopped"+r.reason;for(let c in s)s[c](o,null);s={}},E=(p,o,c)=>{if(r.didClose)return c("The service is no longer running"+r.reason,null);let y=a++;s[y]=(x,M)=>{try{c(x,M)}finally{p&&p.unref()}},p&&p.ref(),t.writeToStdin(be({id:y,isRequest:!0,value:o}))},k=(p,o)=>{if(r.didClose)throw new Error("The service is no longer running"+r.reason);t.writeToStdin(be({id:p,isRequest:!1,value:o}))},B=(p,o)=>H(this,null,function*(){try{if(o.command==="ping"){k(p,{});return}if(typeof o.key=="number"){let c=e[o.key];if(c){let y=c[o.command];if(y){yield y(p,o);return}}}throw new Error("Invalid command: "+o.command)}catch(c){k(p,{errors:[ie(c,t,null,void 0,"")]})}}),F=!0,N=p=>{if(F){F=!1;let c=String.fromCharCode(...p);if(c!=="0.15.12")throw new Error(`Cannot start service: Host version "0.15.12" does not match binary version ${JSON.stringify(c)}`);return}let o=Se(p);if(o.isRequest)B(o.id,o.value);else{let c=s[o.id];delete s[o.id],o.value.error?c(o.value.error,{}):c(null,o.value)}};return{readFromStdout:d,afterClose:R,service:{buildOrServe:({callName:p,refs:o,serveOptions:c,options:y,isTTY:x,defaultWD:M,callback:f})=>{let g=0,b=i++,S={},O={ref(){++g===1&&o&&o.ref()},unref(){--g===0&&(delete e[b],o&&o.unref())}};e[b]=S,O.ref(),Xe(p,b,E,k,O,t,S,y,c,x,M,r,(C,$)=>{try{f(C,$)}finally{O.unref()}})},transform:({callName:p,refs:o,input:c,options:y,isTTY:x,fs:M,callback:f})=>{let g=Ue(),b=S=>{try{if(typeof c!="string"&&!(c instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:O,mangleCache:C}=Ge(p,y,x,ke),$={command:"transform",flags:O,inputFS:S!==null,input:S!==null?Q(S):typeof c=="string"?Q(c):c};C&&($.mangleCache=C),E(o,$,(v,D)=>{if(v)return f(new Error(v),null);let L=X(D.errors,g),z=X(D.warnings,g),W=1,A=()=>{if(--W===0){let P={warnings:z,code:D.code,map:D.map};D.mangleCache&&(P.mangleCache=D==null?void 0:D.mangleCache),f(null,P)}};if(L.length>0)return f(ne("Transform failed",L,z),null);D.codeFS&&(W++,M.readFile(D.code,(P,_)=>{P!==null?f(P,null):(D.code=_,A())})),D.mapFS&&(W++,M.readFile(D.map,(P,_)=>{P!==null?f(P,null):(D.map=_,A())})),A()})}catch(O){let C=[];try{pe(C,y,{},x,ke)}catch(v){}let $=ie(O,t,g,void 0,"");E(o,{command:"error",flags:C,error:$},()=>{$.detail=g.load($.detail),f(ne("Transform failed",[$],[]),null)})}};if((typeof c=="string"||c instanceof Uint8Array)&&c.length>1024*1024){let S=b;b=()=>M.writeFile(c,S)}b(null)},formatMessages:({callName:p,refs:o,messages:c,options:y,callback:x})=>{let M=te(c,"messages",null,"");if(!y)throw new Error(`Missing second argument in ${p}() call`);let f={},g=n(y,f,"kind",h),b=n(y,f,"color",U),S=n(y,f,"terminalWidth",le);if(K(y,f,`in ${p}() call`),g===void 0)throw new Error(`Missing "kind" in ${p}() call`);if(g!=="error"&&g!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${p}() call`);let O={command:"format-msgs",messages:M,isWarning:g==="warning"};b!==void 0&&(O.color=b),S!==void 0&&(O.terminalWidth=S),E(o,O,(C,$)=>{if(C)return x(new Error(C),null);x(null,$.messages)})},analyzeMetafile:({callName:p,refs:o,metafile:c,options:y,callback:x})=>{y===void 0&&(y={});let M={},f=n(y,M,"color",U),g=n(y,M,"verbose",U);K(y,M,`in ${p}() call`);let b={command:"analyze-metafile",metafile:c};f!==void 0&&(b.color=f),g!==void 0&&(b.verbose=g),E(o,b,(S,O)=>{if(S)return x(new Error(S),null);x(null,O.result)})}}}}function Xe(t,e,r,s,a,i,u,l,d,R,E,k,B){let F=Ue(),N=(w,p,o,c)=>{let y=[];try{pe(y,l,{},R,Ee)}catch(M){}let x=ie(w,i,F,o,p);r(a,{command:"error",flags:y,error:x},()=>{x.detail=F.load(x.detail),c(x)})},I=(w,p)=>{N(w,p,void 0,o=>{B(ne("Build failed",[o],[]),null)})},j;if(typeof l=="object"){let w=l.plugins;if(w!==void 0){if(!Array.isArray(w))throw new Error('"plugins" must be an array');j=w}}if(j&&j.length>0){if(i.isSync){I(new Error("Cannot use plugins in synchronous API calls"),"");return}et(e,r,s,a,i,u,l,j,F).then(w=>{if(!w.ok){I(w.error,w.pluginName);return}try{V(w.requestPlugins,w.runOnEndCallbacks)}catch(p){I(p,"")}},w=>I(w,""));return}try{V(null,(w,p,o)=>o())}catch(w){I(w,"")}function V(w,p){let o=!i.isWriteUnavailable,{entries:c,flags:y,write:x,stdinContents:M,stdinResolveDir:f,absWorkingDir:g,incremental:b,nodePaths:S,watch:O,mangleCache:C}=He(t,l,R,Ee,o),$={command:"build",key:e,entries:c,flags:y,write:x,stdinContents:M,stdinResolveDir:f,absWorkingDir:g||E,incremental:b,nodePaths:S};w&&($.plugins=w),C&&($.mangleCache=C);let v=d&&Ze(e,r,s,a,u,d,$),D,L,z=(A,P)=>{A.outputFiles&&(P.outputFiles=A.outputFiles.map(tt)),A.metafile&&(P.metafile=JSON.parse(A.metafile)),A.mangleCache&&(P.mangleCache=A.mangleCache),A.writeToStdout!==void 0&&console.log(ee(A.writeToStdout).replace(/\n$/,""))},W=(A,P)=>{let _={errors:X(A.errors,F),warnings:X(A.warnings,F)};z(A,_),p(_,N,()=>{if(_.errors.length>0)return P(ne("Build failed",_.errors,_.warnings),null);if(A.rebuild){if(!D){let J=!1;D=()=>new Promise((Z,re)=>{if(J||k.didClose)throw new Error("Cannot rebuild");r(a,{command:"rebuild",key:e},(Y,m)=>{if(Y)return P(ne("Build failed",[{id:"",pluginName:"",text:Y,location:null,notes:[],detail:void 0}],[]),null);W(m,(T,se)=>{T?re(T):Z(se)})})}),a.ref(),D.dispose=()=>{J||(J=!0,r(a,{command:"rebuild-dispose",key:e},()=>{}),a.unref())}}_.rebuild=D}if(A.watch){if(!L){let J=!1;a.ref(),L=()=>{J||(J=!0,delete u["watch-rebuild"],r(a,{command:"watch-stop",key:e},()=>{}),a.unref())},O&&(u["watch-rebuild"]=(Z,re)=>{try{let Y=re.args,m={errors:X(Y.errors,F),warnings:X(Y.warnings,F)};z(Y,m),p(m,N,()=>{if(m.errors.length>0){O.onRebuild&&O.onRebuild(ne("Build failed",m.errors,m.warnings),null);return}m.stop=L,O.onRebuild&&O.onRebuild(null,m)})}catch(Y){console.error(Y)}s(Z,{})})}_.stop=L}P(null,_)})};if(x&&i.isWriteUnavailable)throw new Error('The "write" option is unavailable in this environment');if(b&&i.isSync)throw new Error('Cannot use "incremental" with a synchronous build');if(O&&i.isSync)throw new Error('Cannot use "watch" with a synchronous build');r(a,$,(A,P)=>{if(A)return B(new Error(A),null);if(v){let _=P,J=!1;a.ref();let Z={port:_.port,host:_.host,wait:v.wait,stop(){J||(J=!0,v.stop(),a.unref())}};return a.ref(),v.wait.then(a.unref,a.unref),B(null,Z)}return W(P,B)})}}var Ze=(t,e,r,s,a,i,u)=>{let l={},d=n(i,l,"port",le),R=n(i,l,"host",h),E=n(i,l,"servedir",h),k=n(i,l,"onRequest",ve),B=new Promise((F,N)=>{a["serve-wait"]=(I,j)=>{j.error!==null?N(new Error(j.error)):F(),r(I,{})}});return u.serve={},K(i,l,"in serve() call"),d!==void 0&&(u.serve.port=d),R!==void 0&&(u.serve.host=R),E!==void 0&&(u.serve.servedir=E),a["serve-request"]=(F,N)=>{k&&k(N.args),r(F,{})},{wait:B,stop(){e(s,{command:"serve-stop",key:t},()=>{})}}},et=(t,e,r,s,a,i,u,l,d)=>H(void 0,null,function*(){let R=[],E=[],k={},B={},F=0,N=0,I=[],j=!1;l=[...l];for(let w of l){let p={};if(typeof w!="object")throw new Error(`Plugin at index ${N} must be an object`);let o=n(w,p,"name",h);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${N} is missing a name`);try{let c=n(w,p,"setup",ve);if(typeof c!="function")throw new Error("Plugin is missing a setup function");K(w,p,`on plugin ${JSON.stringify(o)}`);let y={name:o,onResolve:[],onLoad:[]};N++;let M=c({initialOptions:u,resolve:(f,g={})=>{if(!j)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof f!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),S=n(g,b,"pluginName",h),O=n(g,b,"importer",h),C=n(g,b,"namespace",h),$=n(g,b,"resolveDir",h),v=n(g,b,"kind",h),D=n(g,b,"pluginData",ce);return K(g,b,"in resolve() call"),new Promise((L,z)=>{let W={command:"resolve",path:f,key:t,pluginName:o};S!=null&&(W.pluginName=S),O!=null&&(W.importer=O),C!=null&&(W.namespace=C),$!=null&&(W.resolveDir=$),v!=null&&(W.kind=v),D!=null&&(W.pluginData=d.store(D)),e(s,W,(A,P)=>{A!==null?z(new Error(A)):L({errors:X(P.errors,d),warnings:X(P.warnings,d),path:P.path,external:P.external,sideEffects:P.sideEffects,namespace:P.namespace,suffix:P.suffix,pluginData:d.load(P.pluginData)})})})},onStart(f){let g='This error came from the "onStart" callback registered here:',b=ue(new Error(g),a,"onStart");R.push({name:o,callback:f,note:b})},onEnd(f){let g='This error came from the "onEnd" callback registered here:',b=ue(new Error(g),a,"onEnd");E.push({name:o,callback:f,note:b})},onResolve(f,g){let b='This error came from the "onResolve" callback registered here:',S=ue(new Error(b),a,"onResolve"),O={},C=n(f,O,"filter",de),$=n(f,O,"namespace",h);if(K(f,O,`in onResolve() call for plugin ${JSON.stringify(o)}`),C==null)throw new Error("onResolve() call is missing a filter");let v=F++;k[v]={name:o,callback:g,note:S},y.onResolve.push({id:v,filter:C.source,namespace:$||""})},onLoad(f,g){let b='This error came from the "onLoad" callback registered here:',S=ue(new Error(b),a,"onLoad"),O={},C=n(f,O,"filter",de),$=n(f,O,"namespace",h);if(K(f,O,`in onLoad() call for plugin ${JSON.stringify(o)}`),C==null)throw new Error("onLoad() call is missing a filter");let v=F++;B[v]={name:o,callback:g,note:S},y.onLoad.push({id:v,filter:C.source,namespace:$||""})},esbuild:a.esbuild});M&&(yield M),I.push(y)}catch(c){return{ok:!1,error:c,pluginName:o}}}i["on-start"]=(w,p)=>H(void 0,null,function*(){let o={errors:[],warnings:[]};yield Promise.all(R.map(M=>H(void 0,[M],function*({name:c,callback:y,note:x}){try{let f=yield y();if(f!=null){if(typeof f!="object")throw new Error(`Expected onStart() callback in plugin ${JSON.stringify(c)} to return an object`);let g={},b=n(f,g,"errors",q),S=n(f,g,"warnings",q);K(f,g,`from onStart() callback in plugin ${JSON.stringify(c)}`),b!=null&&o.errors.push(...te(b,"errors",d,c)),S!=null&&o.warnings.push(...te(S,"warnings",d,c))}}catch(f){o.errors.push(ie(f,a,d,x&&x(),c))}}))),r(w,o)}),i["on-resolve"]=(w,p)=>H(void 0,null,function*(){let o={},c="",y,x;for(let M of p.ids)try{({name:c,callback:y,note:x}=k[M]);let f=yield y({path:p.path,importer:p.importer,namespace:p.namespace,resolveDir:p.resolveDir,kind:p.kind,pluginData:d.load(p.pluginData)});if(f!=null){if(typeof f!="object")throw new Error(`Expected onResolve() callback in plugin ${JSON.stringify(c)} to return an object`);let g={},b=n(f,g,"pluginName",h),S=n(f,g,"path",h),O=n(f,g,"namespace",h),C=n(f,g,"suffix",h),$=n(f,g,"external",U),v=n(f,g,"sideEffects",U),D=n(f,g,"pluginData",ce),L=n(f,g,"errors",q),z=n(f,g,"warnings",q),W=n(f,g,"watchFiles",q),A=n(f,g,"watchDirs",q);K(f,g,`from onResolve() callback in plugin ${JSON.stringify(c)}`),o.id=M,b!=null&&(o.pluginName=b),S!=null&&(o.path=S),O!=null&&(o.namespace=O),C!=null&&(o.suffix=C),$!=null&&(o.external=$),v!=null&&(o.sideEffects=v),D!=null&&(o.pluginData=d.store(D)),L!=null&&(o.errors=te(L,"errors",d,c)),z!=null&&(o.warnings=te(z,"warnings",d,c)),W!=null&&(o.watchFiles=fe(W,"watchFiles")),A!=null&&(o.watchDirs=fe(A,"watchDirs"));break}}catch(f){o={id:M,errors:[ie(f,a,d,x&&x(),c)]};break}r(w,o)}),i["on-load"]=(w,p)=>H(void 0,null,function*(){let o={},c="",y,x;for(let M of p.ids)try{({name:c,callback:y,note:x}=B[M]);let f=yield y({path:p.path,namespace:p.namespace,suffix:p.suffix,pluginData:d.load(p.pluginData)});if(f!=null){if(typeof f!="object")throw new Error(`Expected onLoad() callback in plugin ${JSON.stringify(c)} to return an object`);let g={},b=n(f,g,"pluginName",h),S=n(f,g,"contents",De),O=n(f,g,"resolveDir",h),C=n(f,g,"pluginData",ce),$=n(f,g,"loader",h),v=n(f,g,"errors",q),D=n(f,g,"warnings",q),L=n(f,g,"watchFiles",q),z=n(f,g,"watchDirs",q);K(f,g,`from onLoad() callback in plugin ${JSON.stringify(c)}`),o.id=M,b!=null&&(o.pluginName=b),S instanceof Uint8Array?o.contents=S:S!=null&&(o.contents=Q(S)),O!=null&&(o.resolveDir=O),C!=null&&(o.pluginData=d.store(C)),$!=null&&(o.loader=$),v!=null&&(o.errors=te(v,"errors",d,c)),D!=null&&(o.warnings=te(D,"warnings",d,c)),L!=null&&(o.watchFiles=fe(L,"watchFiles")),z!=null&&(o.watchDirs=fe(z,"watchDirs"));break}}catch(f){o={id:M,errors:[ie(f,a,d,x&&x(),c)]};break}r(w,o)});let V=(w,p,o)=>o();return E.length>0&&(V=(w,p,o)=>{(()=>H(void 0,null,function*(){for(let{name:c,callback:y,note:x}of E)try{yield y(w)}catch(M){w.errors.push(yield new Promise(f=>p(M,c,x&&x(),f)))}}))().then(o)}),j=!0,{ok:!0,requestPlugins:I,runOnEndCallbacks:V}});function Ue(){let t=new Map,e=0;return{load(r){return t.get(r)},store(r){if(r===void 0)return-1;let s=e++;return t.set(s,r),s}}}function ue(t,e,r){let s,a=!1;return()=>{if(a)return s;a=!0;try{let i=(t.stack+"").split(`
3
3
  `);i.splice(1,1);let u=Ne(e,i,r);if(u)return s={text:t.message,location:u},s}catch(i){}}}function ie(t,e,r,s,a){let i="Internal error",u=null;try{i=(t&&t.message||t)+""}catch(l){}try{u=Ne(e,(t.stack+"").split(`
4
4
  `),"")}catch(l){}return{id:"",pluginName:a,text:i,location:u,notes:s?[s]:[],detail:r?r.store(t):-1}}function Ne(t,e,r){let s=" at ";if(t.readFileSync&&!e[0].startsWith(s)&&e[1].startsWith(s))for(let a=1;a<e.length;a++){let i=e[a];if(!!i.startsWith(s))for(i=i.slice(s.length);;){let u=/^(?:new |async )?\S+ \((.*)\)$/.exec(i);if(u){i=u[1];continue}if(u=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(i),u){i=u[1];continue}if(u=/^(\S+):(\d+):(\d+)$/.exec(i),u){let l;try{l=t.readFileSync(u[1],"utf8")}catch(k){break}let d=l.split(/\r\n|\r|\n|\u2028|\u2029/)[+u[2]-1]||"",R=+u[3]-1,E=d.slice(R,R+r.length)===r?r.length:0;return{file:u[1],namespace:"file",line:+u[2],column:Q(d.slice(0,R)).length,length:Q(d.slice(R,R+E)).length,lineText:d+`
5
5
  `+e.slice(1).join(`
6
6
  `),suggestion:""}}break}}return null}function ne(t,e,r){let s=5,a=e.length<1?"":` with ${e.length} error${e.length<2?"":"s"}:`+e.slice(0,s+1).map((u,l)=>{if(l===s)return`
7
7
  ...`;if(!u.location)return`
8
8
  error: ${u.text}`;let{file:d,line:R,column:E}=u.location,k=u.pluginName?`[plugin: ${u.pluginName}] `:"";return`
9
- ${d}:${R}:${E}: ERROR: ${k}${u.text}`}).join(""),i=new Error(`${t}${a}`);return i.errors=e,i.warnings=r,i}function X(t,e){for(let r of t)r.detail=e.load(r.detail);return t}function Ae(t,e){if(t==null)return null;let r={},s=n(t,r,"file",h),a=n(t,r,"namespace",h),i=n(t,r,"line",le),u=n(t,r,"column",le),l=n(t,r,"length",le),d=n(t,r,"lineText",h),R=n(t,r,"suggestion",h);return K(t,r,e),{file:s||"",namespace:a||"",line:i||0,column:u||0,length:l||0,lineText:d||"",suggestion:R||""}}function te(t,e,r,s){let a=[],i=0;for(let u of t){let l={},d=n(u,l,"id",h),R=n(u,l,"pluginName",h),E=n(u,l,"text",h),k=n(u,l,"location",Me),B=n(u,l,"notes",q),F=n(u,l,"detail",ce),N=`in element ${i} of "${e}"`;K(u,l,N);let I=[];if(B)for(let j of B){let V={},w=n(j,V,"text",h),p=n(j,V,"location",Me);K(j,V,N),I.push({text:w||"",location:Ae(p,N)})}a.push({id:d||"",pluginName:R||s,text:E||"",location:Ae(k,N),notes:I,detail:r?r.store(F):-1}),i++}return a}function fe(t,e){let r=[];for(let s of t){if(typeof s!="string")throw new Error(`${JSON.stringify(e)} must be an array of strings`);r.push(s)}return r}function tt({path:t,contents:e}){let r=null;return{path:t,contents:e,get text(){let s=this.contents;return(r===null||s!==e)&&(e=s,r=ee(s)),r}}}var nt="0.15.9",lt=t=>ge().build(t),it=()=>{throw new Error('The "serve" API only works in node')},ot=(t,e)=>ge().transform(t,e),st=(t,e)=>ge().formatMessages(t,e),at=(t,e)=>ge().analyzeMetafile(t,e),ut=()=>{throw new Error('The "buildSync" API only works in node')},ft=()=>{throw new Error('The "transformSync" API only works in node')},ct=()=>{throw new Error('The "formatMessagesSync" API only works in node')},dt=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},oe,Re,ge=()=>{if(Re)return Re;throw oe?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')},pt=t=>{t=Be(t||{});let e=t.wasmURL,r=t.wasmModule,s=t.worker!==!1;if(!e&&!r)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(oe)throw new Error('Cannot call "initialize" more than once');return oe=gt(e||"",r,s),oe.catch(()=>{oe=void 0}),oe},gt=(t,e,r)=>H(void 0,null,function*(){let s;if(e)s=e;else{let l=yield fetch(t);if(!l.ok)throw new Error(`Failed to download ${JSON.stringify(t)}`);s=yield l.arrayBuffer()}let a;if(r){let l=new Blob(['onmessage=(postMessage=>{\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nvar y=(r,g,f)=>new Promise((h,n)=>{var s=c=>{try{l(f.next(c))}catch(u){n(u)}},i=c=>{try{l(f.throw(c))}catch(u){n(u)}},l=c=>c.done?h(c.value):Promise.resolve(c.value).then(s,i);l((f=f.apply(r,g)).next())});let onmessage,globalThis={};for(let r=self;r;r=Object.getPrototypeOf(r))for(let g of Object.getOwnPropertyNames(r))g in globalThis||Object.defineProperty(globalThis,g,{get:()=>self[g]});return(()=>{const r=()=>{const h=new Error("not implemented");return h.code="ENOSYS",h};if(!globalThis.fs){let h="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(n,s){h+=f.decode(s);const i=h.lastIndexOf(`\n`);return i!=-1&&(console.log(h.substr(0,i)),h=h.substr(i+1)),s.length},write(n,s,i,l,c,u){if(i!==0||l!==s.length||c!==null){u(r());return}const d=this.writeSync(n,s);u(null,d)},chmod(n,s,i){i(r())},chown(n,s,i,l){l(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,l){l(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,l){l(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,l){l(r())},read(n,s,i,l,c,u){u(r())},readdir(n,s){s(r())},readlink(n,s){s(r())},rename(n,s,i){i(r())},rmdir(n,s){s(r())},stat(n,s){s(r())},symlink(n,s,i){i(r())},truncate(n,s,i){i(r())},unlink(n,s){s(r())},utimes(n,s,i,l){l(r())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw r()},pid:-1,ppid:-1,umask(){throw r()},cwd(){throw r()},chdir(){throw r()}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");const g=new TextEncoder("utf-8"),f=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 h=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let a=this._ids.get(t);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=t,this._goRefCounts[a]=0,this._ids.set(t,a)),this._goRefCounts[a]++;let 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,a,!0)},l=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},c=e=>{const t=n(e+0),o=n(e+8),a=new Array(o);for(let m=0;m<o;m++)a[m]=s(t+m*8);return a},u=e=>{const t=n(e+0),o=n(e+8);return f.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),a=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,h(e+8,(d+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();h(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(l(e+8))},"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)),a=c(e+32),m=Reflect.apply(o,t,a);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=c(e+16),a=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),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=c(e+16),a=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),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,h(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=g.encode(String(s(e+8)));i(e+16,t),h(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);l(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=l(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),h(e+40,a.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=l(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),h(e+40,a.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}run(h){return y(this,null,function*(){if(!(h instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=h,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=g.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,l=[];this.argv.forEach(e=>{l.push(s(e))}),l.push(0),Object.keys(this.env).sort().forEach(e=>{l.push(s(`${e}=${this.env[e]}`))}),l.push(0);const u=n;l.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(),yield this._exitPromise})}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(h){const n=this;return function(){const s={id:h,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let g=new TextDecoder,f=globalThis.fs,h="";f.writeSync=(c,u)=>{if(c===1)postMessage(u);else if(c===2){h+=g.decode(u);let d=h.split(`\n`);d.length>1&&console.log(d.slice(0,-1).join(`\n`)),h=d[d.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:c})=>{c.length>0&&(n.push(c),s&&s())},f.read=(c,u,d,e,t,o)=>{if(c!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>f.read(c,u,d,e,t,o);return}let a=n[0],m=Math.max(0,Math.min(e,a.length-i));u.set(a.subarray(i,i+m),d),i+=m,i===a.length&&(n.shift(),i=0),o(null,m)};let l=new globalThis.Go;l.argv=["","--service=0.15.9"],r instanceof WebAssembly.Module?WebAssembly.instantiate(r,l.importObject).then(c=>l.run(c)):WebAssembly.instantiate(r,l.importObject).then(({instance:c})=>l.run(c))},r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});a=new Worker(URL.createObjectURL(l))}else{let l=(postMessage=>{
9
+ ${d}:${R}:${E}: ERROR: ${k}${u.text}`}).join(""),i=new Error(`${t}${a}`);return i.errors=e,i.warnings=r,i}function X(t,e){for(let r of t)r.detail=e.load(r.detail);return t}function Ae(t,e){if(t==null)return null;let r={},s=n(t,r,"file",h),a=n(t,r,"namespace",h),i=n(t,r,"line",le),u=n(t,r,"column",le),l=n(t,r,"length",le),d=n(t,r,"lineText",h),R=n(t,r,"suggestion",h);return K(t,r,e),{file:s||"",namespace:a||"",line:i||0,column:u||0,length:l||0,lineText:d||"",suggestion:R||""}}function te(t,e,r,s){let a=[],i=0;for(let u of t){let l={},d=n(u,l,"id",h),R=n(u,l,"pluginName",h),E=n(u,l,"text",h),k=n(u,l,"location",Me),B=n(u,l,"notes",q),F=n(u,l,"detail",ce),N=`in element ${i} of "${e}"`;K(u,l,N);let I=[];if(B)for(let j of B){let V={},w=n(j,V,"text",h),p=n(j,V,"location",Me);K(j,V,N),I.push({text:w||"",location:Ae(p,N)})}a.push({id:d||"",pluginName:R||s,text:E||"",location:Ae(k,N),notes:I,detail:r?r.store(F):-1}),i++}return a}function fe(t,e){let r=[];for(let s of t){if(typeof s!="string")throw new Error(`${JSON.stringify(e)} must be an array of strings`);r.push(s)}return r}function tt({path:t,contents:e}){let r=null;return{path:t,contents:e,get text(){let s=this.contents;return(r===null||s!==e)&&(e=s,r=ee(s)),r}}}var nt="0.15.12",lt=t=>ge().build(t),it=()=>{throw new Error('The "serve" API only works in node')},ot=(t,e)=>ge().transform(t,e),st=(t,e)=>ge().formatMessages(t,e),at=(t,e)=>ge().analyzeMetafile(t,e),ut=()=>{throw new Error('The "buildSync" API only works in node')},ft=()=>{throw new Error('The "transformSync" API only works in node')},ct=()=>{throw new Error('The "formatMessagesSync" API only works in node')},dt=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},oe,Re,ge=()=>{if(Re)return Re;throw oe?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')},pt=t=>{t=Be(t||{});let e=t.wasmURL,r=t.wasmModule,s=t.worker!==!1;if(!e&&!r)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(oe)throw new Error('Cannot call "initialize" more than once');return oe=gt(e||"",r,s),oe.catch(()=>{oe=void 0}),oe},gt=(t,e,r)=>H(void 0,null,function*(){let s;if(e)s=e;else{let l=yield fetch(t);if(!l.ok)throw new Error(`Failed to download ${JSON.stringify(t)}`);s=yield l.arrayBuffer()}let a;if(r){let l=new Blob(['onmessage=(postMessage=>{\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nvar y=(r,g,f)=>new Promise((h,n)=>{var s=c=>{try{l(f.next(c))}catch(u){n(u)}},i=c=>{try{l(f.throw(c))}catch(u){n(u)}},l=c=>c.done?h(c.value):Promise.resolve(c.value).then(s,i);l((f=f.apply(r,g)).next())});let onmessage,globalThis={};for(let r=self;r;r=Object.getPrototypeOf(r))for(let g of Object.getOwnPropertyNames(r))g in globalThis||Object.defineProperty(globalThis,g,{get:()=>self[g]});return(()=>{const r=()=>{const h=new Error("not implemented");return h.code="ENOSYS",h};if(!globalThis.fs){let h="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(n,s){h+=f.decode(s);const i=h.lastIndexOf(`\n`);return i!=-1&&(console.log(h.substr(0,i)),h=h.substr(i+1)),s.length},write(n,s,i,l,c,u){if(i!==0||l!==s.length||c!==null){u(r());return}const d=this.writeSync(n,s);u(null,d)},chmod(n,s,i){i(r())},chown(n,s,i,l){l(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,l){l(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,l){l(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,l){l(r())},read(n,s,i,l,c,u){u(r())},readdir(n,s){s(r())},readlink(n,s){s(r())},rename(n,s,i){i(r())},rmdir(n,s){s(r())},stat(n,s){s(r())},symlink(n,s,i){i(r())},truncate(n,s,i){i(r())},unlink(n,s){s(r())},utimes(n,s,i,l){l(r())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw r()},pid:-1,ppid:-1,umask(){throw r()},cwd(){throw r()},chdir(){throw r()}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");const g=new TextEncoder("utf-8"),f=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 h=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let a=this._ids.get(t);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=t,this._goRefCounts[a]=0,this._ids.set(t,a)),this._goRefCounts[a]++;let 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,a,!0)},l=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},c=e=>{const t=n(e+0),o=n(e+8),a=new Array(o);for(let m=0;m<o;m++)a[m]=s(t+m*8);return a},u=e=>{const t=n(e+0),o=n(e+8);return f.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),a=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,h(e+8,(d+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();h(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(l(e+8))},"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)),a=c(e+32),m=Reflect.apply(o,t,a);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=c(e+16),a=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),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=c(e+16),a=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),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,h(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=g.encode(String(s(e+8)));i(e+16,t),h(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);l(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=l(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),h(e+40,a.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=l(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),h(e+40,a.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}run(h){return y(this,null,function*(){if(!(h instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=h,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=g.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,l=[];this.argv.forEach(e=>{l.push(s(e))}),l.push(0),Object.keys(this.env).sort().forEach(e=>{l.push(s(`${e}=${this.env[e]}`))}),l.push(0);const u=n;l.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(),yield this._exitPromise})}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(h){const n=this;return function(){const s={id:h,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let g=new TextDecoder,f=globalThis.fs,h="";f.writeSync=(c,u)=>{if(c===1)postMessage(u);else if(c===2){h+=g.decode(u);let d=h.split(`\n`);d.length>1&&console.log(d.slice(0,-1).join(`\n`)),h=d[d.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:c})=>{c.length>0&&(n.push(c),s&&s())},f.read=(c,u,d,e,t,o)=>{if(c!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>f.read(c,u,d,e,t,o);return}let a=n[0],m=Math.max(0,Math.min(e,a.length-i));u.set(a.subarray(i,i+m),d),i+=m,i===a.length&&(n.shift(),i=0),o(null,m)};let l=new globalThis.Go;l.argv=["","--service=0.15.12"],r instanceof WebAssembly.Module?WebAssembly.instantiate(r,l.importObject).then(c=>l.run(c)):WebAssembly.instantiate(r,l.importObject).then(({instance:c})=>l.run(c))},r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});a=new Worker(URL.createObjectURL(l))}else{let l=(postMessage=>{
10
10
  // Copyright 2018 The Go Authors. All rights reserved.
11
11
  // Use of this source code is governed by a BSD-style
12
12
  // license that can be found in the LICENSE file.
13
13
  var y=(r,g,f)=>new Promise((h,n)=>{var s=c=>{try{l(f.next(c))}catch(u){n(u)}},i=c=>{try{l(f.throw(c))}catch(u){n(u)}},l=c=>c.done?h(c.value):Promise.resolve(c.value).then(s,i);l((f=f.apply(r,g)).next())});let onmessage,globalThis={};for(let r=self;r;r=Object.getPrototypeOf(r))for(let g of Object.getOwnPropertyNames(r))g in globalThis||Object.defineProperty(globalThis,g,{get:()=>self[g]});return(()=>{const r=()=>{const h=new Error("not implemented");return h.code="ENOSYS",h};if(!globalThis.fs){let h="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(n,s){h+=f.decode(s);const i=h.lastIndexOf(`
14
14
  `);return i!=-1&&(console.log(h.substr(0,i)),h=h.substr(i+1)),s.length},write(n,s,i,l,c,u){if(i!==0||l!==s.length||c!==null){u(r());return}const d=this.writeSync(n,s);u(null,d)},chmod(n,s,i){i(r())},chown(n,s,i,l){l(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,l){l(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,l){l(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,l){l(r())},read(n,s,i,l,c,u){u(r())},readdir(n,s){s(r())},readlink(n,s){s(r())},rename(n,s,i){i(r())},rmdir(n,s){s(r())},stat(n,s){s(r())},symlink(n,s,i){i(r())},truncate(n,s,i){i(r())},unlink(n,s){s(r())},utimes(n,s,i,l){l(r())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw r()},pid:-1,ppid:-1,umask(){throw r()},cwd(){throw r()},chdir(){throw r()}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");const g=new TextEncoder("utf-8"),f=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 h=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let a=this._ids.get(t);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=t,this._goRefCounts[a]=0,this._ids.set(t,a)),this._goRefCounts[a]++;let 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,a,!0)},l=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},c=e=>{const t=n(e+0),o=n(e+8),a=new Array(o);for(let m=0;m<o;m++)a[m]=s(t+m*8);return a},u=e=>{const t=n(e+0),o=n(e+8);return f.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),a=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,h(e+8,(d+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();h(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(l(e+8))},"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)),a=c(e+32),m=Reflect.apply(o,t,a);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=c(e+16),a=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),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=c(e+16),a=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),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,h(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=g.encode(String(s(e+8)));i(e+16,t),h(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);l(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=l(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),h(e+40,a.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=l(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),h(e+40,a.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}run(h){return y(this,null,function*(){if(!(h instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=h,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=g.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,l=[];this.argv.forEach(e=>{l.push(s(e))}),l.push(0),Object.keys(this.env).sort().forEach(e=>{l.push(s(`${e}=${this.env[e]}`))}),l.push(0);const u=n;l.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(),yield this._exitPromise})}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(h){const n=this;return function(){const s={id:h,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let g=new TextDecoder,f=globalThis.fs,h="";f.writeSync=(c,u)=>{if(c===1)postMessage(u);else if(c===2){h+=g.decode(u);let d=h.split(`
15
15
  `);d.length>1&&console.log(d.slice(0,-1).join(`
16
- `)),h=d[d.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:c})=>{c.length>0&&(n.push(c),s&&s())},f.read=(c,u,d,e,t,o)=>{if(c!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>f.read(c,u,d,e,t,o);return}let a=n[0],m=Math.max(0,Math.min(e,a.length-i));u.set(a.subarray(i,i+m),d),i+=m,i===a.length&&(n.shift(),i=0),o(null,m)};let l=new globalThis.Go;l.argv=["","--service=0.15.9"],r instanceof WebAssembly.Module?WebAssembly.instantiate(r,l.importObject).then(c=>l.run(c)):WebAssembly.instantiate(r,l.importObject).then(({instance:c})=>l.run(c))},r=>onmessage(r);})(d=>a.onmessage({data:d}));a={onmessage:null,postMessage:d=>setTimeout(()=>l({data:d})),terminate(){}}}a.postMessage(s),a.onmessage=({data:l})=>i(l);let{readFromStdout:i,service:u}=Fe({writeToStdin(l){a.postMessage(l)},isSync:!1,isWriteUnavailable:!0,esbuild:me});Re={build:l=>new Promise((d,R)=>u.buildOrServe({callName:"build",refs:null,serveOptions:null,options:l,isTTY:!1,defaultWD:"/",callback:(E,k)=>E?R(E):d(k)})),transform:(l,d)=>new Promise((R,E)=>u.transform({callName:"transform",refs:null,input:l,options:d||{},isTTY:!1,fs:{readFile(k,B){B(new Error("Internal error"),null)},writeFile(k,B){B(null)}},callback:(k,B)=>k?E(k):R(B)})),formatMessages:(l,d)=>new Promise((R,E)=>u.formatMessages({callName:"formatMessages",refs:null,messages:l,options:d,callback:(k,B)=>k?E(k):R(B)})),analyzeMetafile:(l,d)=>new Promise((R,E)=>u.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof l=="string"?l:JSON.stringify(l),options:d,callback:(k,B)=>k?E(k):R(B)}))}}),mt=me;
16
+ `)),h=d[d.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:c})=>{c.length>0&&(n.push(c),s&&s())},f.read=(c,u,d,e,t,o)=>{if(c!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>f.read(c,u,d,e,t,o);return}let a=n[0],m=Math.max(0,Math.min(e,a.length-i));u.set(a.subarray(i,i+m),d),i+=m,i===a.length&&(n.shift(),i=0),o(null,m)};let l=new globalThis.Go;l.argv=["","--service=0.15.12"],r instanceof WebAssembly.Module?WebAssembly.instantiate(r,l.importObject).then(c=>l.run(c)):WebAssembly.instantiate(r,l.importObject).then(({instance:c})=>l.run(c))},r=>onmessage(r);})(d=>a.onmessage({data:d}));a={onmessage:null,postMessage:d=>setTimeout(()=>l({data:d})),terminate(){}}}a.postMessage(s),a.onmessage=({data:l})=>i(l);let{readFromStdout:i,service:u}=Fe({writeToStdin(l){a.postMessage(l)},isSync:!1,isWriteUnavailable:!0,esbuild:me});Re={build:l=>new Promise((d,R)=>u.buildOrServe({callName:"build",refs:null,serveOptions:null,options:l,isTTY:!1,defaultWD:"/",callback:(E,k)=>E?R(E):d(k)})),transform:(l,d)=>new Promise((R,E)=>u.transform({callName:"transform",refs:null,input:l,options:d||{},isTTY:!1,fs:{readFile(k,B){B(new Error("Internal error"),null)},writeFile(k,B){B(null)}},callback:(k,B)=>k?E(k):R(B)})),formatMessages:(l,d)=>new Promise((R,E)=>u.formatMessages({callName:"formatMessages",refs:null,messages:l,options:d,callback:(k,B)=>k?E(k):R(B)})),analyzeMetafile:(l,d)=>new Promise((R,E)=>u.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof l=="string"?l:JSON.stringify(l),options:d,callback:(k,B)=>k?E(k):R(B)}))}}),mt=me;
17
17
  })(typeof module==="object"?module:{set exports(x){(typeof self!=="undefined"?self:this).esbuild=x}});
@@ -252,11 +252,15 @@ export interface ServeResult {
252
252
  export interface TransformOptions extends CommonOptions {
253
253
  tsconfigRaw?: string | {
254
254
  compilerOptions?: {
255
+ alwaysStrict?: boolean,
256
+ importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
257
+ jsx?: 'react' | 'react-jsx' | 'react-jsxdev' | 'preserve',
255
258
  jsxFactory?: string,
256
259
  jsxFragmentFactory?: string,
257
- useDefineForClassFields?: boolean,
258
- importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
260
+ jsxImportSource?: string,
259
261
  preserveValueImports?: boolean,
262
+ target?: string,
263
+ useDefineForClassFields?: boolean,
260
264
  },
261
265
  };
262
266
 
@@ -448,6 +452,7 @@ export interface Metafile {
448
452
  }[]
449
453
  exports: string[]
450
454
  entryPoint?: string
455
+ cssBundle?: string
451
456
  }
452
457
  }
453
458
  }
@@ -703,8 +703,8 @@ function createChannel(streamIn) {
703
703
  if (isFirstPacket) {
704
704
  isFirstPacket = false;
705
705
  let binaryVersion = String.fromCharCode(...bytes);
706
- if (binaryVersion !== "0.15.9") {
707
- throw new Error(`Cannot start service: Host version "${"0.15.9"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
706
+ if (binaryVersion !== "0.15.12") {
707
+ throw new Error(`Cannot start service: Host version "${"0.15.12"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
708
708
  }
709
709
  return;
710
710
  }
@@ -1678,7 +1678,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
1678
1678
  }
1679
1679
  }
1680
1680
  var _a;
1681
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.15.9";
1681
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.15.12";
1682
1682
  var esbuildCommandAndArgs = () => {
1683
1683
  if ((!ESBUILD_BINARY_PATH || true) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
1684
1684
  throw new Error(
@@ -1745,7 +1745,7 @@ var fsAsync = {
1745
1745
  }
1746
1746
  }
1747
1747
  };
1748
- var version = "0.15.9";
1748
+ var version = "0.15.12";
1749
1749
  var build = (options) => ensureServiceIsRunning().build(options);
1750
1750
  var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
1751
1751
  var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -1856,7 +1856,7 @@ var ensureServiceIsRunning = () => {
1856
1856
  if (longLivedService)
1857
1857
  return longLivedService;
1858
1858
  let [command, args] = esbuildCommandAndArgs();
1859
- let child = child_process.spawn(command, args.concat(`--service=${"0.15.9"}`, "--ping"), {
1859
+ let child = child_process.spawn(command, args.concat(`--service=${"0.15.12"}`, "--ping"), {
1860
1860
  windowsHide: true,
1861
1861
  stdio: ["pipe", "pipe", "inherit"],
1862
1862
  cwd: defaultWD
@@ -1970,7 +1970,7 @@ var runServiceSync = (callback) => {
1970
1970
  esbuild: node_exports
1971
1971
  });
1972
1972
  callback(service);
1973
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.15.9"}`), {
1973
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.15.12"}`), {
1974
1974
  cwd: defaultWD,
1975
1975
  windowsHide: true,
1976
1976
  input: stdin,
@@ -1986,7 +1986,7 @@ var workerThreadService = null;
1986
1986
  var startWorkerThreadService = (worker_threads2) => {
1987
1987
  let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
1988
1988
  let worker = new worker_threads2.Worker(__filename, {
1989
- workerData: { workerPort, defaultWD, esbuildVersion: "0.15.9" },
1989
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.15.12" },
1990
1990
  transferList: [workerPort],
1991
1991
  execArgv: []
1992
1992
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esbuild-wasm",
3
- "version": "0.15.9",
3
+ "version": "0.15.12",
4
4
  "description": "The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.",
5
5
  "repository": "https://github.com/evanw/esbuild",
6
6
  "license": "MIT",
data/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/isomorfeus/isomorfeus-asset-manager",
6
6
  "dependencies": {
7
- "esbuild-wasm": "0.15.9"
7
+ "esbuild-wasm": "0.15.12"
8
8
  }
9
9
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-asset-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.5
4
+ version: 0.15.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-26 00:00:00.000000000 Z
11
+ date: 2022-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brotli
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.8.0
33
+ version: 0.8.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.8.0
40
+ version: 0.8.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: isomorfeus-speednode
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.5.3
47
+ version: 0.6.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.5.3
54
+ version: 0.6.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: listen
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -207,7 +207,15 @@ licenses:
207
207
  metadata:
208
208
  github_repo: ssh://github.com/isomorfeus/gems
209
209
  source_code_uri: https://github.com/isomorfeus/isomorfeus-asset-manager
210
- post_install_message:
210
+ post_install_message: |2+
211
+
212
+ isomorfeus-asset-manager >= 0.15.6:
213
+
214
+ Breaking change:
215
+ Default support for common and ssr assets has been removed for upcoming isomorfeus.
216
+ If common and ssr assets are required, lock isomorfeus-asset-manager
217
+ to version 0.15.5 in the Gemfile
218
+
211
219
  rdoc_options: []
212
220
  require_paths:
213
221
  - lib
@@ -222,8 +230,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
230
  - !ruby/object:Gem::Version
223
231
  version: '0'
224
232
  requirements: []
225
- rubygems_version: 3.3.7
233
+ rubygems_version: 3.4.0.dev
226
234
  signing_key:
227
235
  specification_version: 4
228
236
  summary: Asset manager and bundler for Isomorfeus.
229
237
  test_files: []
238
+ ...