@loopstack/loopstack-studio 0.25.2 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/api/environments.js +4 -0
  2. package/dist/api/index.js +13 -9
  3. package/dist/app/EnvironmentEmbedRoot.js +29 -19
  4. package/dist/components/data-table/DataList.js +93 -91
  5. package/dist/components/data-table/DataTable.js +128 -126
  6. package/dist/components/feedback/Snackbar.js +1 -1
  7. package/dist/components/layout/StudioSidebar.js +124 -131
  8. package/dist/components/ui/sidebar.js +2 -2
  9. package/dist/components/ui/slider.js +37 -26
  10. package/dist/components/ui-widgets/widgets/SandboxRun.js +16 -14
  11. package/dist/features/code-explorer/components/CodeExplorerTree.js +1 -0
  12. package/dist/features/code-explorer/components/FileContentViewer.js +1 -1
  13. package/dist/features/dashboard/RunItem.js +39 -37
  14. package/dist/features/debug/lib/flow-utils.js +1 -1
  15. package/dist/features/documents/DocumentRenderer.js +59 -58
  16. package/dist/features/documents/renderers/useDocumentTransition.js +29 -24
  17. package/dist/features/feature-registry/FeatureRegistryProvider.js +17 -0
  18. package/dist/features/feature-registry/index.js +1 -0
  19. package/dist/features/file-explorer/api/files.js +7 -0
  20. package/dist/features/file-explorer/components/FileExplorerPanel.js +95 -0
  21. package/dist/features/{workbench/components/RemoteFileTabsBar.js → file-explorer/components/FileTabsBar.js} +4 -4
  22. package/dist/features/{workbench/components/RemoteFileTree.js → file-explorer/components/FileTree.js} +6 -6
  23. package/dist/features/file-explorer/file-explorer-feature.js +12 -0
  24. package/dist/features/file-explorer/hooks/useFileExplorer.js +44 -0
  25. package/dist/features/file-explorer/index.js +2 -0
  26. package/dist/features/file-explorer/providers/FileExplorerProvider.js +112 -0
  27. package/dist/features/oauth/OAuthPromptRenderer.js +162 -132
  28. package/dist/features/runs/Runs.js +1 -1
  29. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +178 -0
  30. package/dist/features/secrets/index.js +1 -0
  31. package/dist/features/{documents → secrets}/renderers/SecretInputRenderer.js +17 -17
  32. package/dist/features/secrets/secrets-feature.js +14 -0
  33. package/dist/features/workbench/Workbench.js +32 -82
  34. package/dist/features/workbench/WorkflowList.js +109 -46
  35. package/dist/features/workbench/components/SidebarPanel.js +155 -0
  36. package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +82 -0
  37. package/dist/features/workbench/components/WorkbenchIconSidebar.js +128 -60
  38. package/dist/features/workbench/components/WorkbenchPreviewPanel.js +127 -114
  39. package/dist/features/workbench/components/WorkbenchRunsPanel.js +32 -0
  40. package/dist/features/workbench/components/WorkbenchSidebarShell.js +80 -0
  41. package/dist/features/workbench/hooks/useWorkflowData.js +3 -3
  42. package/dist/features/workbench/index.js +3 -2
  43. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +60 -62
  44. package/dist/features/workspaces/Workspaces.js +1 -1
  45. package/dist/features/workspaces/components/EnvironmentSlotSelector.js +68 -51
  46. package/dist/features/workspaces/components/WorkflowRunForm.js +1 -1
  47. package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
  48. package/dist/hooks/useEnvironmentPreviewUrl.js +13 -0
  49. package/dist/hooks/useEnvironments.js +8 -0
  50. package/dist/hooks/useWorkflows.js +28 -26
  51. package/dist/hooks/useWorkspaces.js +28 -26
  52. package/dist/index.d.ts +98 -7
  53. package/dist/index.js +8 -1
  54. package/dist/loopstack-studio.css +1 -1
  55. package/dist/node_modules/@shikijs/core/dist/index.js +105 -643
  56. package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +135 -122
  57. package/dist/node_modules/@shikijs/langs/dist/bird2.js +1 -1
  58. package/dist/node_modules/@shikijs/langs/dist/cobol.js +1 -1
  59. package/dist/node_modules/@shikijs/langs/dist/css.js +1 -1
  60. package/dist/node_modules/@shikijs/langs/dist/dart.js +1 -1
  61. package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +1 -1
  62. package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +1 -1
  63. package/dist/node_modules/@shikijs/langs/dist/go.js +1 -1
  64. package/dist/node_modules/@shikijs/langs/dist/kusto.js +1 -1
  65. package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +1 -1
  66. package/dist/node_modules/@shikijs/langs/dist/php.js +1 -1
  67. package/dist/node_modules/@shikijs/langs/dist/ruby.js +1 -1
  68. package/dist/node_modules/@shikijs/langs/dist/typespec.js +1 -1
  69. package/dist/node_modules/@shikijs/primitive/dist/index.js +538 -0
  70. package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +1 -1
  71. package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
  72. package/dist/node_modules/shiki/dist/bundle-full.js +6 -5
  73. package/dist/node_modules/shiki/dist/chunk-CtajNgzt.js +15 -0
  74. package/dist/node_modules/shiki/dist/engine-oniguruma.js +5 -0
  75. package/dist/node_modules/shiki/dist/{langs.js → langs-bundle-full-DfKZStlK.js} +1 -1
  76. package/dist/node_modules/shiki/dist/themes.js +1 -1
  77. package/dist/pages/DashboardPage.js +54 -79
  78. package/dist/pages/DebugWorkflowDetailsPage.js +41 -55
  79. package/dist/pages/DebugWorkflowsPage.js +151 -112
  80. package/dist/pages/EmbedWorkbenchPage.js +2 -1
  81. package/dist/pages/PreviewWorkbenchPage.js +77 -59
  82. package/dist/pages/RunsListPage.js +27 -41
  83. package/dist/pages/RunsPage.js +21 -36
  84. package/dist/pages/WorkbenchPage.js +48 -70
  85. package/dist/pages/WorkflowDebugPage.js +65 -79
  86. package/dist/pages/WorkspacePage.js +59 -86
  87. package/dist/pages/WorkspaceRunsPage.js +59 -54
  88. package/dist/pages/WorkspacesPage.js +11 -27
  89. package/dist/providers/StudioPreferencesProvider.js +54 -0
  90. package/package.json +29 -29
  91. package/dist/features/workbench/components/WorkbenchFilesPanel.js +0 -67
  92. package/dist/features/workbench/components/WorkbenchFloatingPanel.js +0 -57
  93. package/dist/features/workbench/components/WorkbenchFlowPanel.js +0 -47
  94. package/dist/features/workbench/components/WorkbenchSecretsPanel.js +0 -182
  95. package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +0 -160
  96. /package/dist/{node_modules → frontend/studio/node_modules}/@dagrejs/dagre/dist/dagre.esm.js +0 -0
@@ -1,4 +1,10 @@
1
- var ShikiError = class extends Error {
1
+ import { __export } from "../../../../_virtual/rolldown_runtime.js";
2
+ var dist_exports = /* @__PURE__ */ __export({
3
+ createOnigurumaEngine: () => createOnigurumaEngine,
4
+ getDefaultWasmLoader: () => getDefaultWasmLoader,
5
+ loadWasm: () => loadWasm,
6
+ setDefaultWasmLoader: () => setDefaultWasmLoader
7
+ }, 1), ShikiError = class extends Error {
2
8
  constructor(e) {
3
9
  super(e), this.name = "ShikiError";
4
10
  }
@@ -9,124 +15,124 @@ function getHeapMax() {
9
15
  function _emscripten_get_now() {
10
16
  return typeof performance < "u" ? performance.now() : Date.now();
11
17
  }
12
- var alignUp = (e, u) => e + (u - e % u) % u;
18
+ var alignUp = (e, h) => e + (h - e % h) % h;
13
19
  async function main(e) {
14
- let p, m, h = {};
15
- function g(e) {
16
- m = e, h.HEAPU8 = new Uint8Array(e), h.HEAPU32 = new Uint32Array(e);
20
+ let h, g, b = {};
21
+ function x(e) {
22
+ g = e, b.HEAPU8 = new Uint8Array(e), b.HEAPU32 = new Uint32Array(e);
17
23
  }
18
- function _(e, u, d) {
19
- h.HEAPU8.copyWithin(e, u, u + d);
24
+ function S(e, h, g) {
25
+ b.HEAPU8.copyWithin(e, h, h + g);
20
26
  }
21
- function v(e) {
27
+ function C(e) {
22
28
  try {
23
- return p.grow(e - m.byteLength + 65535 >>> 16), g(p.buffer), 1;
29
+ return h.grow(e - g.byteLength + 65535 >>> 16), x(h.buffer), 1;
24
30
  } catch {}
25
31
  }
26
- function y(e) {
27
- let d = h.HEAPU8.length;
32
+ function w(e) {
33
+ let h = b.HEAPU8.length;
28
34
  e >>>= 0;
29
- let p = getHeapMax();
30
- if (e > p) return !1;
31
- for (let u = 1; u <= 4; u *= 2) {
32
- let m = d * (1 + .2 / u);
33
- if (m = Math.min(m, e + 100663296), v(Math.min(p, alignUp(Math.max(e, m), 65536)))) return !0;
35
+ let g = getHeapMax();
36
+ if (e > g) return !1;
37
+ for (let _ = 1; _ <= 4; _ *= 2) {
38
+ let v = h * (1 + .2 / _);
39
+ if (v = Math.min(v, e + 100663296), C(Math.min(g, alignUp(Math.max(e, v), 65536)))) return !0;
34
40
  }
35
41
  return !1;
36
42
  }
37
- let b = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
38
- function x(e, u, d = 1024) {
39
- let f = u + d, p = u;
40
- for (; e[p] && !(p >= f);) ++p;
41
- if (p - u > 16 && e.buffer && b) return b.decode(e.subarray(u, p));
42
- let m = "";
43
- for (; u < p;) {
44
- let d = e[u++];
45
- if (!(d & 128)) {
46
- m += String.fromCharCode(d);
43
+ let T = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
44
+ function E(e, h, g = 1024) {
45
+ let _ = h + g, v = h;
46
+ for (; e[v] && !(v >= _);) ++v;
47
+ if (v - h > 16 && e.buffer && T) return T.decode(e.subarray(h, v));
48
+ let y = "";
49
+ for (; h < v;) {
50
+ let g = e[h++];
51
+ if (!(g & 128)) {
52
+ y += String.fromCharCode(g);
47
53
  continue;
48
54
  }
49
- let f = e[u++] & 63;
50
- if ((d & 224) == 192) {
51
- m += String.fromCharCode((d & 31) << 6 | f);
55
+ let _ = e[h++] & 63;
56
+ if ((g & 224) == 192) {
57
+ y += String.fromCharCode((g & 31) << 6 | _);
52
58
  continue;
53
59
  }
54
- let p = e[u++] & 63;
55
- if (d = (d & 240) == 224 ? (d & 15) << 12 | f << 6 | p : (d & 7) << 18 | f << 12 | p << 6 | e[u++] & 63, d < 65536) m += String.fromCharCode(d);
60
+ let v = e[h++] & 63;
61
+ if (g = (g & 240) == 224 ? (g & 15) << 12 | _ << 6 | v : (g & 7) << 18 | _ << 12 | v << 6 | e[h++] & 63, g < 65536) y += String.fromCharCode(g);
56
62
  else {
57
- let e = d - 65536;
58
- m += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023);
63
+ let e = g - 65536;
64
+ y += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023);
59
65
  }
60
66
  }
61
- return m;
67
+ return y;
62
68
  }
63
- function S(e, u) {
64
- return e ? x(h.HEAPU8, e, u) : "";
69
+ function D(e, h) {
70
+ return e ? E(b.HEAPU8, e, h) : "";
65
71
  }
66
- let C = {
72
+ let O = {
67
73
  emscripten_get_now: _emscripten_get_now,
68
- emscripten_memcpy_big: _,
69
- emscripten_resize_heap: y,
74
+ emscripten_memcpy_big: S,
75
+ emscripten_resize_heap: w,
70
76
  fd_write: () => 0
71
77
  };
72
- async function w() {
73
- let u = await e({
74
- env: C,
75
- wasi_snapshot_preview1: C
78
+ async function k() {
79
+ let g = await e({
80
+ env: O,
81
+ wasi_snapshot_preview1: O
76
82
  });
77
- p = u.memory, g(p.buffer), Object.assign(h, u), h.UTF8ToString = S;
83
+ h = g.memory, x(h.buffer), Object.assign(b, g), b.UTF8ToString = D;
78
84
  }
79
- return await w(), h;
85
+ return await k(), b;
80
86
  }
81
- var __defProp = Object.defineProperty, __defNormalProp = (e, u, d) => u in e ? __defProp(e, u, {
87
+ var __defProp = Object.defineProperty, __defNormalProp = (e, h, g) => h in e ? __defProp(e, h, {
82
88
  enumerable: !0,
83
89
  configurable: !0,
84
90
  writable: !0,
85
- value: d
86
- }) : e[u] = d, __publicField = (e, u, d) => __defNormalProp(e, typeof u == "symbol" ? u : u + "", d), onigBinding = null;
87
- function throwLastOnigError(u) {
88
- throw new ShikiError(u.UTF8ToString(u.getLastOnigError()));
91
+ value: g
92
+ }) : e[h] = g, __publicField = (e, h, g) => __defNormalProp(e, typeof h == "symbol" ? h : h + "", g), onigBinding = null;
93
+ function throwLastOnigError(e) {
94
+ throw new ShikiError(e.UTF8ToString(e.getLastOnigError()));
89
95
  }
90
96
  var UtfString = class e {
91
- constructor(u) {
97
+ constructor(h) {
92
98
  __publicField(this, "utf16Length"), __publicField(this, "utf8Length"), __publicField(this, "utf16Value"), __publicField(this, "utf8Value"), __publicField(this, "utf16OffsetToUtf8"), __publicField(this, "utf8OffsetToUtf16");
93
- let d = u.length, f = e._utf8ByteLength(u), p = f !== d, m = p ? new Uint32Array(d + 1) : null;
94
- p && (m[d] = f);
95
- let h = p ? new Uint32Array(f + 1) : null;
96
- p && (h[f] = d);
97
- let _ = new Uint8Array(f), v = 0;
98
- for (let e = 0; e < d; e++) {
99
- let f = u.charCodeAt(e), g = f, y = !1;
100
- if (f >= 55296 && f <= 56319 && e + 1 < d) {
101
- let d = u.charCodeAt(e + 1);
102
- d >= 56320 && d <= 57343 && (g = (f - 55296 << 10) + 65536 | d - 56320, y = !0);
99
+ let g = h.length, _ = e._utf8ByteLength(h), v = _ !== g, y = v ? new Uint32Array(g + 1) : null;
100
+ v && (y[g] = _);
101
+ let b = v ? new Uint32Array(_ + 1) : null;
102
+ v && (b[_] = g);
103
+ let x = new Uint8Array(_), S = 0;
104
+ for (let e = 0; e < g; e++) {
105
+ let _ = h.charCodeAt(e), C = _, w = !1;
106
+ if (_ >= 55296 && _ <= 56319 && e + 1 < g) {
107
+ let g = h.charCodeAt(e + 1);
108
+ g >= 56320 && g <= 57343 && (C = (_ - 55296 << 10) + 65536 | g - 56320, w = !0);
103
109
  }
104
- p && (m[e] = v, y && (m[e + 1] = v), g <= 127 ? h[v + 0] = e : g <= 2047 ? (h[v + 0] = e, h[v + 1] = e) : g <= 65535 ? (h[v + 0] = e, h[v + 1] = e, h[v + 2] = e) : (h[v + 0] = e, h[v + 1] = e, h[v + 2] = e, h[v + 3] = e)), g <= 127 ? _[v++] = g : g <= 2047 ? (_[v++] = 192 | (g & 1984) >>> 6, _[v++] = 128 | (g & 63) >>> 0) : g <= 65535 ? (_[v++] = 224 | (g & 61440) >>> 12, _[v++] = 128 | (g & 4032) >>> 6, _[v++] = 128 | (g & 63) >>> 0) : (_[v++] = 240 | (g & 1835008) >>> 18, _[v++] = 128 | (g & 258048) >>> 12, _[v++] = 128 | (g & 4032) >>> 6, _[v++] = 128 | (g & 63) >>> 0), y && e++;
110
+ v && (y[e] = S, w && (y[e + 1] = S), C <= 127 ? b[S + 0] = e : C <= 2047 ? (b[S + 0] = e, b[S + 1] = e) : C <= 65535 ? (b[S + 0] = e, b[S + 1] = e, b[S + 2] = e) : (b[S + 0] = e, b[S + 1] = e, b[S + 2] = e, b[S + 3] = e)), C <= 127 ? x[S++] = C : C <= 2047 ? (x[S++] = 192 | (C & 1984) >>> 6, x[S++] = 128 | (C & 63) >>> 0) : C <= 65535 ? (x[S++] = 224 | (C & 61440) >>> 12, x[S++] = 128 | (C & 4032) >>> 6, x[S++] = 128 | (C & 63) >>> 0) : (x[S++] = 240 | (C & 1835008) >>> 18, x[S++] = 128 | (C & 258048) >>> 12, x[S++] = 128 | (C & 4032) >>> 6, x[S++] = 128 | (C & 63) >>> 0), w && e++;
105
111
  }
106
- this.utf16Length = d, this.utf8Length = f, this.utf16Value = u, this.utf8Value = _, this.utf16OffsetToUtf8 = m, this.utf8OffsetToUtf16 = h;
112
+ this.utf16Length = g, this.utf8Length = _, this.utf16Value = h, this.utf8Value = x, this.utf16OffsetToUtf8 = y, this.utf8OffsetToUtf16 = b;
107
113
  }
108
114
  static _utf8ByteLength(e) {
109
- let u = 0;
110
- for (let d = 0, f = e.length; d < f; d++) {
111
- let p = e.charCodeAt(d), m = p, h = !1;
112
- if (p >= 55296 && p <= 56319 && d + 1 < f) {
113
- let u = e.charCodeAt(d + 1);
114
- u >= 56320 && u <= 57343 && (m = (p - 55296 << 10) + 65536 | u - 56320, h = !0);
115
+ let h = 0;
116
+ for (let g = 0, _ = e.length; g < _; g++) {
117
+ let v = e.charCodeAt(g), y = v, b = !1;
118
+ if (v >= 55296 && v <= 56319 && g + 1 < _) {
119
+ let h = e.charCodeAt(g + 1);
120
+ h >= 56320 && h <= 57343 && (y = (v - 55296 << 10) + 65536 | h - 56320, b = !0);
115
121
  }
116
- m <= 127 ? u += 1 : m <= 2047 ? u += 2 : m <= 65535 ? u += 3 : u += 4, h && d++;
122
+ y <= 127 ? h += 1 : y <= 2047 ? h += 2 : y <= 65535 ? h += 3 : h += 4, b && g++;
117
123
  }
118
- return u;
124
+ return h;
119
125
  }
120
126
  createString(e) {
121
- let u = e.omalloc(this.utf8Length);
122
- return e.HEAPU8.set(this.utf8Value, u), u;
127
+ let h = e.omalloc(this.utf8Length);
128
+ return e.HEAPU8.set(this.utf8Value, h), h;
123
129
  }
124
- }, _OnigString = class u {
125
- constructor(d) {
126
- if (__publicField(this, "id", ++u.LAST_ID), __publicField(this, "_onigBinding"), __publicField(this, "content"), __publicField(this, "utf16Length"), __publicField(this, "utf8Length"), __publicField(this, "utf16OffsetToUtf8"), __publicField(this, "utf8OffsetToUtf16"), __publicField(this, "ptr"), !onigBinding) throw new ShikiError("Must invoke loadWasm first.");
127
- this._onigBinding = onigBinding, this.content = d;
128
- let f = new UtfString(d);
129
- this.utf16Length = f.utf16Length, this.utf8Length = f.utf8Length, this.utf16OffsetToUtf8 = f.utf16OffsetToUtf8, this.utf8OffsetToUtf16 = f.utf8OffsetToUtf16, this.utf8Length < 1e4 && !u._sharedPtrInUse ? (u._sharedPtr ||= onigBinding.omalloc(1e4), u._sharedPtrInUse = !0, onigBinding.HEAPU8.set(f.utf8Value, u._sharedPtr), this.ptr = u._sharedPtr) : this.ptr = f.createString(onigBinding);
130
+ }, _OnigString = class e {
131
+ constructor(h) {
132
+ if (__publicField(this, "id", ++e.LAST_ID), __publicField(this, "_onigBinding"), __publicField(this, "content"), __publicField(this, "utf16Length"), __publicField(this, "utf8Length"), __publicField(this, "utf16OffsetToUtf8"), __publicField(this, "utf8OffsetToUtf16"), __publicField(this, "ptr"), !onigBinding) throw new ShikiError("Must invoke loadWasm first.");
133
+ this._onigBinding = onigBinding, this.content = h;
134
+ let _ = new UtfString(h);
135
+ this.utf16Length = _.utf16Length, this.utf8Length = _.utf8Length, this.utf16OffsetToUtf8 = _.utf16OffsetToUtf8, this.utf8OffsetToUtf16 = _.utf8OffsetToUtf16, this.utf8Length < 1e4 && !e._sharedPtrInUse ? (e._sharedPtr ||= onigBinding.omalloc(1e4), e._sharedPtrInUse = !0, onigBinding.HEAPU8.set(_.utf8Value, e._sharedPtr), this.ptr = e._sharedPtr) : this.ptr = _.createString(onigBinding);
130
136
  }
131
137
  convertUtf8OffsetToUtf16(e) {
132
138
  return this.utf8OffsetToUtf16 ? e < 0 ? 0 : e > this.utf8Length ? this.utf16Length : this.utf8OffsetToUtf16[e] : e;
@@ -135,53 +141,53 @@ var UtfString = class e {
135
141
  return this.utf16OffsetToUtf8 ? e < 0 ? 0 : e > this.utf16Length ? this.utf8Length : this.utf16OffsetToUtf8[e] : e;
136
142
  }
137
143
  dispose() {
138
- this.ptr === u._sharedPtr ? u._sharedPtrInUse = !1 : this._onigBinding.ofree(this.ptr);
144
+ this.ptr === e._sharedPtr ? e._sharedPtrInUse = !1 : this._onigBinding.ofree(this.ptr);
139
145
  }
140
146
  };
141
147
  __publicField(_OnigString, "LAST_ID", 0), __publicField(_OnigString, "_sharedPtr", 0), __publicField(_OnigString, "_sharedPtrInUse", !1);
142
148
  var OnigString = _OnigString, OnigScanner = class {
143
- constructor(u) {
149
+ constructor(e) {
144
150
  if (__publicField(this, "_onigBinding"), __publicField(this, "_ptr"), !onigBinding) throw new ShikiError("Must invoke loadWasm first.");
145
- let d = [], f = [];
146
- for (let e = 0, p = u.length; e < p; e++) {
147
- let p = new UtfString(u[e]);
148
- d[e] = p.createString(onigBinding), f[e] = p.utf8Length;
151
+ let h = [], _ = [];
152
+ for (let g = 0, v = e.length; g < v; g++) {
153
+ let v = new UtfString(e[g]);
154
+ h[g] = v.createString(onigBinding), _[g] = v.utf8Length;
149
155
  }
150
- let p = onigBinding.omalloc(4 * u.length);
151
- onigBinding.HEAPU32.set(d, p / 4);
152
- let m = onigBinding.omalloc(4 * u.length);
153
- onigBinding.HEAPU32.set(f, m / 4);
154
- let h = onigBinding.createOnigScanner(p, m, u.length);
155
- for (let e = 0, f = u.length; e < f; e++) onigBinding.ofree(d[e]);
156
- onigBinding.ofree(m), onigBinding.ofree(p), h === 0 && throwLastOnigError(onigBinding), this._onigBinding = onigBinding, this._ptr = h;
156
+ let v = onigBinding.omalloc(4 * e.length);
157
+ onigBinding.HEAPU32.set(h, v / 4);
158
+ let y = onigBinding.omalloc(4 * e.length);
159
+ onigBinding.HEAPU32.set(_, y / 4);
160
+ let b = onigBinding.createOnigScanner(v, y, e.length);
161
+ for (let g = 0, _ = e.length; g < _; g++) onigBinding.ofree(h[g]);
162
+ onigBinding.ofree(y), onigBinding.ofree(v), b === 0 && throwLastOnigError(onigBinding), this._onigBinding = onigBinding, this._ptr = b;
157
163
  }
158
164
  dispose() {
159
165
  this._onigBinding.freeOnigScanner(this._ptr);
160
166
  }
161
- findNextMatchSync(e, u, d) {
162
- let f = 0;
163
- if (typeof d == "number" && (f = d), typeof e == "string") {
167
+ findNextMatchSync(e, h, g) {
168
+ let _ = 0;
169
+ if (typeof g == "number" && (_ = g), typeof e == "string") {
164
170
  e = new OnigString(e);
165
- let d = this._findNextMatchSync(e, u, !1, f);
166
- return e.dispose(), d;
171
+ let g = this._findNextMatchSync(e, h, !1, _);
172
+ return e.dispose(), g;
167
173
  }
168
- return this._findNextMatchSync(e, u, !1, f);
169
- }
170
- _findNextMatchSync(e, u, d, f) {
171
- let p = this._onigBinding, m = p.findNextOnigScannerMatch(this._ptr, e.id, e.ptr, e.utf8Length, e.convertUtf16OffsetToUtf8(u), f);
172
- if (m === 0) return null;
173
- let h = p.HEAPU32, g = m / 4, _ = h[g++], v = h[g++], y = [];
174
- for (let u = 0; u < v; u++) {
175
- let d = e.convertUtf8OffsetToUtf16(h[g++]), f = e.convertUtf8OffsetToUtf16(h[g++]);
176
- y[u] = {
177
- start: d,
178
- end: f,
179
- length: f - d
174
+ return this._findNextMatchSync(e, h, !1, _);
175
+ }
176
+ _findNextMatchSync(e, h, g, _) {
177
+ let v = this._onigBinding, y = v.findNextOnigScannerMatch(this._ptr, e.id, e.ptr, e.utf8Length, e.convertUtf16OffsetToUtf8(h), _);
178
+ if (y === 0) return null;
179
+ let b = v.HEAPU32, x = y / 4, S = b[x++], C = b[x++], w = [];
180
+ for (let h = 0; h < C; h++) {
181
+ let g = e.convertUtf8OffsetToUtf16(b[x++]), _ = e.convertUtf8OffsetToUtf16(b[x++]);
182
+ w[h] = {
183
+ start: g,
184
+ end: _,
185
+ length: _ - g
180
186
  };
181
187
  }
182
188
  return {
183
- index: _,
184
- captureIndices: y
189
+ index: S,
190
+ captureIndices: w
185
191
  };
186
192
  }
187
193
  };
@@ -203,26 +209,33 @@ function isArrayBuffer(e) {
203
209
  var initPromise;
204
210
  function loadWasm(e) {
205
211
  if (initPromise) return initPromise;
206
- async function u() {
207
- onigBinding = await main(async (u) => {
208
- let d = e;
209
- return d = await d, typeof d == "function" && (d = await d(u)), typeof d == "function" && (d = await d(u)), isInstantiatorOptionsObject(d) ? d = await d.instantiator(u) : isInstantiatorModule(d) ? d = await d.default(u) : (isDataOptionsObject(d) && (d = d.data), isResponse(d) ? d = typeof WebAssembly.instantiateStreaming == "function" ? await _makeResponseStreamingLoader(d)(u) : await _makeResponseNonStreamingLoader(d)(u) : isArrayBuffer(d) || d instanceof WebAssembly.Module ? d = await _makeArrayBufferLoader(d)(u) : "default" in d && d.default instanceof WebAssembly.Module && (d = await _makeArrayBufferLoader(d.default)(u))), "instance" in d && (d = d.instance), "exports" in d && (d = d.exports), d;
212
+ async function h() {
213
+ onigBinding = await main(async (h) => {
214
+ let g = e;
215
+ return g = await g, typeof g == "function" && (g = await g(h)), typeof g == "function" && (g = await g(h)), isInstantiatorOptionsObject(g) ? g = await g.instantiator(h) : isInstantiatorModule(g) ? g = await g.default(h) : (isDataOptionsObject(g) && (g = g.data), isResponse(g) ? g = typeof WebAssembly.instantiateStreaming == "function" ? await _makeResponseStreamingLoader(g)(h) : await _makeResponseNonStreamingLoader(g)(h) : isArrayBuffer(g) || g instanceof WebAssembly.Module ? g = await _makeArrayBufferLoader(g)(h) : "default" in g && g.default instanceof WebAssembly.Module && (g = await _makeArrayBufferLoader(g.default)(h))), "instance" in g && (g = g.instance), "exports" in g && (g = g.exports), g;
210
216
  });
211
217
  }
212
- return initPromise = u(), initPromise;
218
+ return initPromise = h(), initPromise;
213
219
  }
214
220
  function _makeArrayBufferLoader(e) {
215
- return (u) => WebAssembly.instantiate(e, u);
221
+ return (h) => WebAssembly.instantiate(e, h);
216
222
  }
217
223
  function _makeResponseStreamingLoader(e) {
218
- return (u) => WebAssembly.instantiateStreaming(e, u);
224
+ return (h) => WebAssembly.instantiateStreaming(e, h);
219
225
  }
220
226
  function _makeResponseNonStreamingLoader(e) {
221
- return async (u) => {
222
- let d = await e.arrayBuffer();
223
- return WebAssembly.instantiate(d, u);
227
+ return async (h) => {
228
+ let g = await e.arrayBuffer();
229
+ return WebAssembly.instantiate(g, h);
224
230
  };
225
231
  }
232
+ var _defaultWasmLoader;
233
+ function setDefaultWasmLoader(e) {
234
+ _defaultWasmLoader = e;
235
+ }
236
+ function getDefaultWasmLoader() {
237
+ return _defaultWasmLoader;
238
+ }
226
239
  async function createOnigurumaEngine(e) {
227
240
  return e && await loadWasm(e), {
228
241
  createScanner(e) {
@@ -233,4 +246,4 @@ async function createOnigurumaEngine(e) {
233
246
  }
234
247
  };
235
248
  }
236
- export { createOnigurumaEngine };
249
+ export { createOnigurumaEngine, dist_exports, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
@@ -1,2 +1,2 @@
1
- var bird2_default = [Object.freeze(JSON.parse("{\"displayName\":\"BIRD2 Configuration\",\"fileTypes\":[\"conf\",\"bird\",\"bird2\",\"bird3\",\"bird.conf\",\"bird2.conf\",\"bird3.conf\"],\"foldingStartMarker\":\"\\\\{\\\\s*$\",\"foldingStopMarker\":\"^\\\\s*}\",\"name\":\"bird2\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#strings\"},{\"include\":\"#numbers\"},{\"include\":\"#ip-addresses\"},{\"include\":\"#vpn-rd\"},{\"include\":\"#bytestrings\"},{\"include\":\"#bgp-paths\"},{\"include\":\"#prefixes\"},{\"include\":\"#template-definitions\"},{\"include\":\"#filter-definitions\"},{\"include\":\"#function-definitions\"},{\"include\":\"#protocol-definitions\"},{\"include\":\"#next-hop-statements\"},{\"include\":\"#neighbor-statements\"},{\"include\":\"#import-export-statements\"},{\"include\":\"#structural-keywords\"},{\"include\":\"#functional-keywords\"},{\"include\":\"#semantic-modifiers\"},{\"include\":\"#builtin-functions\"},{\"include\":\"#method-properties\"},{\"include\":\"#route-attributes\"},{\"include\":\"#data-types\"},{\"include\":\"#operators\"},{\"include\":\"#constants\"},{\"include\":\"#filter-names\"},{\"include\":\"#user-variables\"},{\"include\":\"#function-calls\"},{\"include\":\"#method-calls\"},{\"include\":\"#variable-declarations\"},{\"include\":\"#symbols\"},{\"include\":\"#blocks\"},{\"include\":\"#print-statements\"}],\"repository\":{\"bgp-paths\":{\"patterns\":[{\"begin\":\"\\\\[=\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.bgp-path.begin.bird\"}},\"end\":\"=]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.bgp-path.end.bird\"}},\"name\":\"meta.bgp-path.bird\",\"patterns\":[{\"match\":\"[*+?]\",\"name\":\"keyword.operator.wildcard.bird\"},{\"match\":\"\\\\b[0-9]+\\\\b\",\"name\":\"constant.numeric.asn.bird\"},{\"include\":\"#numbers\"}]}]},\"blocks\":{\"patterns\":[{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.begin.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.block.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.set.begin.bird\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.set.end.bird\"}},\"name\":\"meta.set.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.tuple.begin.bird\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.tuple.end.bird\"}},\"name\":\"meta.tuple.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"match\":\";\",\"name\":\"punctuation.terminator.statement.bird\"},{\"match\":\",\",\"name\":\"punctuation.separator.bird\"}]},\"builtin-functions\":{\"patterns\":[{\"match\":\"\\\\b(?:defined|unset|printn??|roa_check|aspa_check|aspa_check_downstream|aspa_check_upstream|from_hex|format|prepend|add|delete|filter|empty|reset|bt_assert|bt_test_suite|bt_test_same)\\\\b\",\"name\":\"support.function.builtin.bird\"}]},\"bytestrings\":{\"patterns\":[{\"match\":\"\\\\b(?:hex:)?(?:\\\\h{2}[-.:\\\\s]*){2,}\\\\h{2}\\\\b\",\"name\":\"constant.numeric.bytestring.bird\"},{\"match\":\"\\\\b\\\\h{32,}\\\\b\",\"name\":\"constant.numeric.bytestring.bird\"}]},\"comments\":{\"patterns\":[{\"begin\":\"#\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.bird\"}},\"end\":\"$\",\"name\":\"comment.line.number-sign.bird\"},{\"begin\":\"/\\\\*\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.begin.bird\"}},\"end\":\"\\\\*/\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.end.bird\"}},\"name\":\"comment.block.bird\"}]},\"constants\":{\"patterns\":[{\"match\":\"\\\\b(?:on|off|yes|no|true|false)\\\\b\",\"name\":\"constant.language.boolean.bird\"},{\"match\":\"\\\\b(?:empty|unknown|generic|rt|ro|one|ten)\\\\b\",\"name\":\"constant.language.special.bird\"},{\"match\":\"\\\\bSCOPE_(?:HOST|LINK|SITE|ORGANIZATION|UNIVERSE)\\\\b\",\"name\":\"constant.language.scope.bird\"},{\"match\":\"\\\\bRTS_(?:STATIC|INHERIT|DEVICE|RIP|OSPF|OSPF_IA|OSPF_EXT1|OSPF_EXT2|BGP|PIPE|BABEL)\\\\b\",\"name\":\"constant.language.source.bird\"},{\"match\":\"\\\\bRTD_(?:ROUTER|DEVICE|MULTIPATH|BLACKHOLE|UNREACHABLE|PROHIBIT)\\\\b\",\"name\":\"constant.language.dest.bird\"},{\"match\":\"\\\\bROA_(?:UNKNOWN|INVALID|VALID)\\\\b\",\"name\":\"constant.language.roa.bird\"},{\"match\":\"\\\\bASPA_(?:UNKNOWN|INVALID|VALID)\\\\b\",\"name\":\"constant.language.aspa.bird\"},{\"match\":\"\\\\bNET_(?:IP4|IP6|IP6_SADR|VPN4|VPN6|ROA4|ROA6|FLOW4|FLOW6|MPLS)\\\\b\",\"name\":\"constant.language.net-type.bird\"},{\"match\":\"\\\\bMPLS_POLICY_(?:NONE|STATIC|PREFIX|AGGREGATE|VRF)\\\\b\",\"name\":\"constant.language.mpls.bird\"}]},\"data-types\":{\"patterns\":[{\"match\":\"\\\\b(?:int|bool|ip|prefix|rd|pair|quad|ec|lc|string|bytestring|bgpmask|bgppath|clist|eclist|lclist|set|enum|route)\\\\b\",\"name\":\"storage.type.bird\"}]},\"filter-definitions\":{\"patterns\":[{\"begin\":\"\\\\b(filter)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.filter.bird\"},\"2\":{\"name\":\"entity.name.function.filter.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.filter-definition.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"filter-names\":{\"patterns\":[{\"match\":\"\\\\b[A-Z_a-z][0-9A-Z_a-z]*_filter\\\\b\",\"name\":\"entity.name.function.filter.bird\"}]},\"function-calls\":{\"patterns\":[{\"begin\":\"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\(\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.function.call.bird\"}},\"end\":\"\\\\)\",\"name\":\"meta.function-call.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"function-definitions\":{\"patterns\":[{\"begin\":\"\\\\b(function)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\(\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.function.bird\"},\"2\":{\"name\":\"entity.name.function.user-defined.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.function-definition.bird\",\"patterns\":[{\"begin\":\"\\\\G(?=\\\\()\",\"end\":\"\\\\)\",\"name\":\"meta.function-parameters.bird\",\"patterns\":[{\"include\":\"#data-types\"},{\"include\":\"#symbols\"}]},{\"begin\":\"->\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.operator.return-type.bird\"}},\"end\":\"(?=\\\\{)\",\"name\":\"meta.function-return-type.bird\",\"patterns\":[{\"include\":\"#data-types\"}]},{\"include\":\"$self\"}]}]},\"functional-keywords\":{\"patterns\":[{\"match\":\"\\\\b(?:static|rip|ospf|bgp|babel|rpki|bfd|device|direct|kernel|pipe|perf|mrt|aggregator|l3vpn|radv)\\\\b\",\"name\":\"keyword.control.protocol-type.bird\"},{\"match\":\"\\\\b(?:graceful|restart|preference|disabled|hold|keepalive|connect|retry|start|delay|error|wait|forget|scan|randomize|router|id)\\\\b\",\"name\":\"keyword.control.routing.bird\"},{\"match\":\"\\\\b(?:interface|type|wired|wireless|tunnel|rxcost|limit|hello|update|interval|port|tx|class|dscp|priority|rx|buffer|length|check|link|rtt|cost|min|max|decay|send|timestamps)\\\\b\",\"name\":\"keyword.other.interface.bird\"},{\"match\":\"\\\\b(?:authentication|none|mac|permissive|password|generate|accept|from|to|algorithm|hmac|sha1|sha256|sha384|sha512|blake2s128|blake2s256|blake2b256|blake2b512)\\\\b\",\"name\":\"keyword.other.auth.bird\"},{\"match\":\"\\\\btime\\\\b\",\"name\":\"keyword.other.time.bird\"},{\"match\":\"\\\\b(?:hostname|description|debug|log|syslog|stderr|bird|protocols|tables|channels|timeouts|passwords|bfd|confederation|cluster|stub|dead|neighbors|area|md5|multihop|passive|rfc1583compat|tick|ls|retransmit|transmit|ack|state|database|summary|external|nssa|translator|always|candidate|never|role|stability|election|action|warn|block|disable|keep|filtered|receive|modify|add|delete|withdraw|unreachable|blackhole|prohibit|unreach|igp_metric|localpref|med|origin|community|large_community|ext_community|as_path|prepend|weight|gateway|scope|onlink|recursive|multipath|igp|channel|sadr|src|learn|persist|via|ng)\\\\b\",\"name\":\"keyword.other.config.bird\"},{\"match\":\"\\\\b(?:flow4|flow6|dst|src|proto|header|dport|sport|icmp|code|tcp|flags|dscp|dont_fragment|is_fragment|first_fragment|last_fragment|fragment|label|offset)\\\\b\",\"name\":\"keyword.other.flowspec.bird\"},{\"match\":\"\\\\b(?:vpn|mpls|aspa|roa6??)\\\\b\",\"name\":\"keyword.other.address.bird\"},{\"match\":\"\\\\b(?:all|none)\\\\b\",\"name\":\"keyword.other.quick-declaration.bird\"}]},\"import-export-statements\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.import-export.bird\"},\"2\":{\"name\":\"keyword.control.filter.bird\"},\"3\":{\"name\":\"entity.name.function.filter.bird\"}},\"match\":\"\\\\b(import)\\\\s+(filter)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\b\",\"name\":\"meta.import-statement.bird\"},{\"begin\":\"\\\\b(import)\\\\s+(filter)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.import-export.bird\"},\"2\":{\"name\":\"keyword.control.filter.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.import-filter-inline.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\b(export)\\\\s+(where)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.import-export.bird\"},\"2\":{\"name\":\"keyword.control.where.bird\"}},\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.terminator.statement.bird\"}},\"name\":\"meta.export-where-clause.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"captures\":{\"1\":{\"name\":\"keyword.control.import-export.bird\"},\"2\":{\"name\":\"keyword.control.filter.bird\"},\"3\":{\"name\":\"entity.name.function.filter.bird\"}},\"match\":\"\\\\b(export)\\\\s+(filter)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\b\",\"name\":\"meta.export-statement.bird\"}]},\"ip-addresses\":{\"patterns\":[{\"match\":\"\\\\b(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}(?:/[0-9]{1,2})?\\\\b\",\"name\":\"constant.numeric.ip.ipv4.bird\"},{\"match\":\"\\\\b(?:\\\\h{0,4}:){2,7}\\\\h{0,4}(?:/[0-9]{1,3})?\\\\b\",\"name\":\"constant.numeric.ip.ipv6.bird\"},{\"match\":\"::(?:\\\\h{0,4}:){0,6}\\\\h{0,4}(?:/[0-9]{1,3})?\\\\b\",\"name\":\"constant.numeric.ip.ipv6.bird\"},{\"match\":\"(?:\\\\h{0,4}:){1,6}::(?:\\\\h{0,4}:){0,5}\\\\h{0,4}(?:/[0-9]{1,3})?\\\\b\",\"name\":\"constant.numeric.ip.ipv6.bird\"}]},\"method-calls\":{\"patterns\":[{\"begin\":\"\\\\.\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\(\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.function.method.bird\"}},\"end\":\"\\\\)\",\"name\":\"meta.method-call.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"captures\":{\"1\":{\"name\":\"variable.other.property.bird\"}},\"match\":\"\\\\.\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)\",\"name\":\"meta.method-access.bird\"}]},\"method-properties\":{\"patterns\":[{\"match\":\"\\\\b(?:first|last|last_nonaggregated|len|asn|data1??|data2|is_v4|ip|src|dst|rd|maxlen|type|mask|min|max)\\\\b\",\"name\":\"support.variable.property.bird\"}]},\"neighbor-statements\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.neighbor.bird\"},\"2\":{\"name\":\"constant.numeric.ip-address.bird\"},\"3\":{\"name\":\"meta.interface-reference.bird\"},\"4\":{\"name\":\"string.quoted.single.interface.bird\"},\"5\":{\"name\":\"keyword.control.as.bird\"},\"6\":{\"name\":\"constant.numeric.asn.bird\"}},\"match\":\"\\\\b(neighbor)\\\\s+([.:\\\\h]+)\\\\s*(%\\\\s*'([^']+)')?\\\\s+(as)\\\\s+([0-9]+)\\\\b\",\"name\":\"meta.neighbor-statement.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.source.bird\"},\"2\":{\"name\":\"constant.numeric.ip-address.bird\"}},\"match\":\"\\\\b(source address)\\\\s+([.:\\\\h]+)\\\\b\",\"name\":\"meta.source-address-statement.bird\"}]},\"next-hop-statements\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.routing.bird\"},\"2\":{\"name\":\"keyword.other.ip-version.bird\"},\"3\":{\"name\":\"constant.numeric.ip-address.bird\"}},\"match\":\"\\\\b(next hop)\\\\s+(ipv4)\\\\s+([.0-9]+)\\\\b\",\"name\":\"meta.next-hop-ipv4.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.routing.bird\"},\"2\":{\"name\":\"keyword.other.ip-version.bird\"},\"3\":{\"name\":\"constant.numeric.ip-address.bird\"}},\"match\":\"\\\\b(next hop)\\\\s+(ipv6)\\\\s+([:\\\\h]+)\\\\b\",\"name\":\"meta.next-hop-ipv6.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.routing.bird\"},\"2\":{\"name\":\"keyword.other.semantic-modifier.bird\"}},\"match\":\"\\\\b(next hop)\\\\s+(self)\\\\b\",\"name\":\"meta.next-hop-simple.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.routing.bird\"},\"2\":{\"name\":\"keyword.other.semantic-modifier.bird\"}},\"match\":\"\\\\b(extended next hop)\\\\s+(o(?:n|ff))\\\\b\",\"name\":\"meta.extended-next-hop-statement.bird\"}]},\"numbers\":{\"patterns\":[{\"match\":\"\\\\b0x\\\\h+\\\\b\",\"name\":\"constant.numeric.hex.bird\"},{\"match\":\"\\\\b[0-9]+\\\\b\",\"name\":\"constant.numeric.decimal.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.other.unit.bird\"}},\"match\":\"\\\\b[0-9]+\\\\s*([mu]??s)\\\\b\",\"name\":\"constant.numeric.time.bird\"}]},\"operators\":{\"patterns\":[{\"match\":\"==|!=|<=|>=|[<=>~]|!~\",\"name\":\"keyword.operator.comparison.bird\"},{\"match\":\"&&|\\\\|\\\\||!|->\",\"name\":\"keyword.operator.logical.bird\"},{\"match\":\"[-%*+/]\",\"name\":\"keyword.operator.arithmetic.bird\"},{\"match\":\"\\\\.\\\\.\",\"name\":\"keyword.operator.range.bird\"},{\"match\":\"=\",\"name\":\"keyword.operator.assignment.bird\"},{\"match\":\"\\\\.\",\"name\":\"keyword.operator.accessor.bird\"}]},\"prefixes\":{\"patterns\":[{\"match\":\"\\\\b(?:(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}|(?:\\\\h{0,4}:)+\\\\h{0,4})/[0-9]{1,3}(?:[-+]|\\\\{[0-9]+,[0-9]+})?\\\\b\",\"name\":\"constant.numeric.prefix.bird\"}]},\"print-statements\":{\"patterns\":[{\"begin\":\"\\\\b(printn??)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.print.bird\"}},\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.terminator.statement.bird\"}},\"name\":\"meta.print-statement.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"protocol-definitions\":{\"patterns\":[{\"begin\":\"\\\\b(protocol)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s+(from)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.protocol.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"},\"3\":{\"name\":\"entity.name.function.protocol.bird\"},\"4\":{\"name\":\"keyword.control.template-reference.bird\"},\"5\":{\"name\":\"entity.name.function.template.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.protocol-definition-with-template.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\b(protocol)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.protocol.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"},\"3\":{\"name\":\"entity.name.function.protocol.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.protocol-definition-with-name.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\b(protocol)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.protocol.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.protocol-definition-anonymous.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"route-attributes\":{\"patterns\":[{\"match\":\"\\\\b(?:net|scope|preference|from|gw|proto|source|dest|ifname|ifindex|weight|gw_mpls|gw_mpls_stack|onlink|igp_metric|mpls_label|mpls_policy|mpls_class|bgp_path|bgp_origin|bgp_next_hop|bgp_med|bgp_local_pref|bgp_community|bgp_ext_community|bgp_large_community|bgp_originator_id|bgp_cluster_list|ospf_metric1|ospf_metric2|ospf_tag|ospf_router_id|rip_metric|rip_tag|mypath|mylclist)\\\\b\",\"name\":\"support.variable.route-attribute.bird\"}]},\"semantic-modifiers\":{\"patterns\":[{\"match\":\"\\\\b(?:self|on|off|remote|extended)\\\\b\",\"name\":\"keyword.other.semantic-modifier.bird\"}]},\"strings\":{\"patterns\":[{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.bird\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.bird\"}},\"name\":\"string.quoted.double.bird\",\"patterns\":[{\"match\":\"\\\\.\",\"name\":\"constant.character.escape.bird\"}]},{\"begin\":\"'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.bird\"}},\"end\":\"'\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.bird\"}},\"name\":\"string.quoted.single.bird\"}]},\"structural-keywords\":{\"patterns\":[{\"match\":\"\\\\b(?:if|then|else|case|for|do|while|break|continue|return|in)\\\\b\",\"name\":\"keyword.control.bird\"},{\"match\":\"\\\\belse\\\\s*:\",\"name\":\"keyword.control.case.else.bird\"},{\"match\":\"\\\\b(?:accept|reject|error)\\\\b\",\"name\":\"keyword.control.flow.bird\"},{\"match\":\"\\\\b(?:protocol|table|define|include|attribute|eval|ipv4|ipv6|local|as|from|where|cost|limit|action)\\\\b\",\"name\":\"keyword.control.structure.bird\"}]},\"symbols\":{\"patterns\":[{\"match\":\"\\\\b[A-Z_a-z][0-9A-Z_a-z]*\\\\b\",\"name\":\"variable.other.bird\"}]},\"template-definitions\":{\"patterns\":[{\"begin\":\"\\\\b(template)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.template.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"},\"3\":{\"name\":\"entity.name.function.template.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.template-definition.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"user-variables\":{\"patterns\":[{\"match\":\"\\\\b[A-Z][0-9A-Z_a-z]*\\\\b\",\"name\":\"variable.other.user-defined.bird\"}]},\"variable-declarations\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"storage.type.bird\"},\"2\":{\"name\":\"variable.other.declaration.bird\"}},\"match\":\"\\\\b(int|bool|ip|prefix|rd|pair|quad|ec|lc|string|bytestring|bgpmask|bgppath|clist|eclist|lclist|set|enum|route)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)(?:\\\\s*=|;)\",\"name\":\"meta.variable-declaration.bird\"}]},\"vpn-rd\":{\"match\":\"\\\\b(?:[0-9]+:[0-9]+|[012]:[0-9]+:[0-9]+|(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}:[0-9]+)\\\\b\",\"name\":\"constant.numeric.vpn-rd.bird\"}},\"scopeName\":\"source.bird2\",\"aliases\":[\"bird\"]}"))];
1
+ var bird2_default = [Object.freeze(JSON.parse("{\"displayName\":\"BIRD2 Configuration\",\"fileTypes\":[\"conf\",\"bird\",\"bird2\",\"bird3\",\"bird.conf\",\"bird2.conf\",\"bird3.conf\"],\"foldingStartMarker\":\"\\\\{\\\\s*$\",\"foldingStopMarker\":\"^\\\\s*}\",\"name\":\"bird2\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#strings\"},{\"include\":\"#ip-addresses\"},{\"include\":\"#prefixes\"},{\"include\":\"#vpn-rd\"},{\"include\":\"#bytestrings\"},{\"include\":\"#bgp-paths\"},{\"include\":\"#print-statements\"},{\"include\":\"#template-definitions\"},{\"include\":\"#filter-definitions\"},{\"include\":\"#function-definitions\"},{\"include\":\"#protocol-definitions\"},{\"include\":\"#next-hop-statements\"},{\"include\":\"#neighbor-statements\"},{\"include\":\"#import-export-statements\"},{\"include\":\"#variable-declarations\"},{\"include\":\"#method-calls\"},{\"include\":\"#function-calls\"},{\"include\":\"#method-properties\"},{\"include\":\"#route-attributes\"},{\"include\":\"#data-types\"},{\"include\":\"#constants\"},{\"include\":\"#structural-keywords\"},{\"include\":\"#protocol-phrases\"},{\"include\":\"#functional-keywords\"},{\"include\":\"#semantic-modifiers\"},{\"include\":\"#builtin-functions\"},{\"include\":\"#filter-names\"},{\"include\":\"#user-variables\"},{\"include\":\"#operators\"},{\"include\":\"#numbers\"},{\"include\":\"#symbols\"},{\"include\":\"#blocks\"}],\"repository\":{\"bgp-paths\":{\"patterns\":[{\"begin\":\"\\\\[=\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.bgp-path.begin.bird\"}},\"end\":\"=]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.bgp-path.end.bird\"}},\"name\":\"meta.bgp-path.bird\",\"patterns\":[{\"match\":\"[*+?]\",\"name\":\"keyword.operator.wildcard.bird\"},{\"match\":\"\\\\b[0-9]+\\\\b\",\"name\":\"constant.numeric.asn.bird\"},{\"include\":\"#operators\"},{\"include\":\"#symbols\"}]}]},\"blocks\":{\"patterns\":[{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.begin.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.block.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.set.begin.bird\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.set.end.bird\"}},\"name\":\"meta.set.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.tuple.begin.bird\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.tuple.end.bird\"}},\"name\":\"meta.tuple.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"match\":\";\",\"name\":\"punctuation.terminator.statement.bird\"},{\"match\":\",\",\"name\":\"punctuation.separator.bird\"}]},\"builtin-functions\":{\"patterns\":[{\"match\":\"\\\\b(?:defined|unset|roa_check|aspa_check|aspa_check_downstream|aspa_check_upstream|from_hex|format|append|prepend|add|delete|empty|reset|bt_assert|bt_test_suite|bt_test_same)\\\\b\",\"name\":\"support.function.builtin.bird\"}]},\"bytestrings\":{\"patterns\":[{\"match\":\"\\\\bhex:\\\\h{2}(?:[-.:\\\\s]*\\\\h{2})*\\\\b\",\"name\":\"constant.numeric.bytestring.bird\"},{\"match\":\"\\\\b(?:\\\\h{2}[-.:\\\\s]*){15,}\\\\h{2}\\\\b\",\"name\":\"constant.numeric.bytestring.bird\"},{\"match\":\"\\\\b\\\\h{32,}\\\\b\",\"name\":\"constant.numeric.bytestring.bird\"}]},\"comments\":{\"patterns\":[{\"begin\":\"#\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.bird\"}},\"end\":\"$\",\"name\":\"comment.line.number-sign.bird\"},{\"begin\":\"/\\\\*\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.begin.bird\"}},\"end\":\"\\\\*/\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.end.bird\"}},\"name\":\"comment.block.bird\"}]},\"constants\":{\"patterns\":[{\"match\":\"\\\\b(?:on|off|yes|no|true|false)\\\\b\",\"name\":\"constant.language.boolean.bird\"},{\"match\":\"\\\\b(?:empty|unknown|generic|rt|ro|one|ten)\\\\b\",\"name\":\"constant.language.special.bird\"},{\"match\":\"\\\\bSCOPE_(?:HOST|LINK|SITE|ORGANIZATION|UNIVERSE)\\\\b\",\"name\":\"constant.language.scope.bird\"},{\"match\":\"\\\\bRTS_(?:STATIC|INHERIT|DEVICE|RIP|OSPF|OSPF_IA|OSPF_EXT1|OSPF_EXT2|BGP|PIPE|BABEL)\\\\b\",\"name\":\"constant.language.source.bird\"},{\"match\":\"\\\\bRTD_(?:ROUTER|DEVICE|MULTIPATH|BLACKHOLE|UNREACHABLE|PROHIBIT)\\\\b\",\"name\":\"constant.language.dest.bird\"},{\"match\":\"\\\\bROA_(?:UNKNOWN|INVALID|VALID)\\\\b\",\"name\":\"constant.language.roa.bird\"},{\"match\":\"\\\\bASPA_(?:UNKNOWN|INVALID|VALID)\\\\b\",\"name\":\"constant.language.aspa.bird\"},{\"match\":\"\\\\bNET_(?:IP4|IP6|IP6_SADR|VPN4|VPN6|ROA4|ROA6|FLOW4|FLOW6|MPLS)\\\\b\",\"name\":\"constant.language.net-type.bird\"},{\"match\":\"\\\\bMPLS_POLICY_(?:NONE|STATIC|PREFIX|AGGREGATE|VRF)\\\\b\",\"name\":\"constant.language.mpls.bird\"}]},\"data-types\":{\"patterns\":[{\"match\":\"\\\\b(?:(?:int|pair|quad|ip|prefix|ec|lc|rd|enum)\\\\s+set|int|bool|ip|prefix|rd|pair|quad|ec|lc|string|bytestring|bgpmask|bgppath|clist|eclist|lclist|set|enum|route)\\\\b\",\"name\":\"storage.type.bird\"}]},\"filter-definitions\":{\"patterns\":[{\"begin\":\"\\\\b(filter)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.filter.bird\"},\"2\":{\"name\":\"entity.name.function.filter.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.filter-definition.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"filter-names\":{\"patterns\":[{\"match\":\"\\\\b[A-Z_a-z][0-9A-Z_a-z]*_filter\\\\b\",\"name\":\"entity.name.function.filter.bird\"}]},\"function-calls\":{\"patterns\":[{\"begin\":\"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\(\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.function.call.bird\"}},\"end\":\"\\\\)\",\"name\":\"meta.function-call.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"function-definitions\":{\"patterns\":[{\"begin\":\"\\\\b(function)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')(?=\\\\s*\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.function.bird\"},\"2\":{\"name\":\"entity.name.function.user-defined.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.function-definition.bird\",\"patterns\":[{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.begin.bird\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.end.bird\"}},\"name\":\"meta.function-parameters.bird\",\"patterns\":[{\"include\":\"#data-types\"},{\"include\":\"#symbols\"}]},{\"begin\":\"->\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.operator.return-type.bird\"}},\"end\":\"(?=\\\\{)\",\"name\":\"meta.function-return-type.bird\",\"patterns\":[{\"include\":\"#data-types\"}]},{\"include\":\"$self\"}]}]},\"functional-keywords\":{\"patterns\":[{\"match\":\"\\\\b(?:static|rip|ospf|bgp|babel|rpki|bfd|bmp|device|direct|kernel|pipe|perf|mrt|aggregator|l3vpn|radv)\\\\b\",\"name\":\"keyword.control.protocol-type.bird\"},{\"match\":\"\\\\b(?:graceful|restart|preference|disabled|hold|keepalive|connect|retry|start|delay|error|wait|forget|scan|randomize|router|id)\\\\b\",\"name\":\"keyword.control.routing.bird\"},{\"match\":\"\\\\b(?:interface|type|wired|wireless|tunnel|rxcost|limit|hello|update|interval|port|tx|class|dscp|priority|rx|buffer|length|check|link|rtt|cost|min|max|decay|send|timestamps)\\\\b\",\"name\":\"keyword.other.interface.bird\"},{\"match\":\"\\\\b(?:(?:refresh|retry|expire|transport|ssh|tcp|user|address|version|ignore|private|public|key)|(?:local\\\\s+address|ignore\\\\s+max\\\\s+length|min\\\\s+version|max\\\\s+version|bird\\\\s+private\\\\s+key|remote\\\\s+public\\\\s+key))\\\\b\",\"name\":\"keyword.other.rpki.bird\"},{\"match\":\"\\\\b(?:authentication|none|mac|permissive|password|generate|accept|from|to|algorithm|hmac|sha1|sha256|sha384|sha512|blake2s128|blake2s256|blake2b256|blake2b512)\\\\b\",\"name\":\"keyword.other.auth.bird\"},{\"match\":\"\\\\btime\\\\b\",\"name\":\"keyword.other.time.bird\"},{\"match\":\"\\\\b(?:hostname|description|debug|log|syslog|stderr|bird|protocols|tables|channels|timeouts|passwords|bfd|confederation|cluster|stub|dead|neighbors|area|md5|multihop|passive|rfc1583compat|tick|ls|retransmit|transmit|ack|state|database|summary|external|nssa|translator|always|candidate|never|role|stability|election|action|warn|block|disable|keep|filtered|receive|modify|add|delete|withdraw|unreachable|blackhole|prohibit|unreach|igp_metric|localpref|med|origin|community|large_community|ext_community|as_path|prepend|weight|gateway|scope|onlink|recursive|multipath|igp|channel|sadr|src|learn|persist|via|ng)\\\\b\",\"name\":\"keyword.other.config.bird\"},{\"match\":\"\\\\b(?:flow4|flow6|dst|src|proto|header|dport|sport|icmp|code|tcp|flags|dscp|dont_fragment|is_fragment|first_fragment|last_fragment|fragment|label|offset)\\\\b\",\"name\":\"keyword.other.flowspec.bird\"},{\"match\":\"\\\\b(?:vpn4|vpn6|mpls|aspa|roa4|roa6)\\\\b\",\"name\":\"keyword.other.address.bird\"},{\"match\":\"\\\\b(?:all|none)\\\\b\",\"name\":\"keyword.other.quick-declaration.bird\"}]},\"import-export-statements\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.import-export.bird\"},\"2\":{\"name\":\"keyword.control.filter.bird\"},\"3\":{\"name\":\"entity.name.function.filter.bird\"}},\"match\":\"\\\\b(import)\\\\s+(filter)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')\\\\b\",\"name\":\"meta.import-statement.bird\"},{\"begin\":\"\\\\b(import)\\\\s+(filter)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.import-export.bird\"},\"2\":{\"name\":\"keyword.control.filter.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.import-filter-inline.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\b(export)\\\\s+(where)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.import-export.bird\"},\"2\":{\"name\":\"keyword.control.where.bird\"}},\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.terminator.statement.bird\"}},\"name\":\"meta.export-where-clause.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"captures\":{\"1\":{\"name\":\"keyword.control.import-export.bird\"},\"2\":{\"name\":\"keyword.control.filter.bird\"},\"3\":{\"name\":\"entity.name.function.filter.bird\"}},\"match\":\"\\\\b(export)\\\\s+(filter)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')\\\\b\",\"name\":\"meta.export-statement.bird\"}]},\"ip-addresses\":{\"patterns\":[{\"match\":\"\\\\b(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}(?:/[0-9]{1,2})?\\\\b\",\"name\":\"constant.numeric.ip.ipv4.bird\"},{\"match\":\"\\\\b(?:\\\\h{0,4}:){2,7}\\\\h{0,4}(?:/[0-9]{1,3})?\\\\b\",\"name\":\"constant.numeric.ip.ipv6.bird\"},{\"match\":\"::(?:\\\\h{0,4}:){0,6}\\\\h{0,4}(?:/[0-9]{1,3})?\\\\b\",\"name\":\"constant.numeric.ip.ipv6.bird\"},{\"match\":\"\\\\b(?:\\\\h{0,4}:){1,6}::(?:\\\\h{0,4}:){0,5}\\\\h{0,4}(?:/[0-9]{1,3})?\\\\b\",\"name\":\"constant.numeric.ip.ipv6.bird\"}]},\"method-calls\":{\"patterns\":[{\"begin\":\"\\\\.\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\(\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.function.method.bird\"}},\"end\":\"\\\\)\",\"name\":\"meta.method-call.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"captures\":{\"1\":{\"name\":\"variable.other.property.bird\"}},\"match\":\"\\\\.\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)\",\"name\":\"meta.method-access.bird\"}]},\"method-properties\":{\"patterns\":[{\"match\":\"(?<=\\\\.)\\\\s*(?:first|last|last_nonaggregated|len|asn|data1??|data2|is_v4|ip|src|dst|rd|maxlen|type|mask|min|max)\\\\b(?!\\\\s*\\\\()\",\"name\":\"support.variable.property.bird\"}]},\"neighbor-statements\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.local.bird\"},\"2\":{\"name\":\"entity.name.symbol.local-address.bird\"},\"3\":{\"name\":\"keyword.control.port.bird\"},\"4\":{\"name\":\"constant.numeric.port.bird\"},\"5\":{\"name\":\"keyword.control.as.bird\"},\"6\":{\"name\":\"constant.numeric.asn.bird\"}},\"match\":\"\\\\b(local)\\\\s+([.:\\\\h]+|[A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')(?:\\\\s+(port)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*))?\\\\s+(as)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*)\\\\b\",\"name\":\"meta.local-as-statement.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.local.bird\"},\"2\":{\"name\":\"keyword.control.as.bird\"},\"3\":{\"name\":\"constant.numeric.asn.bird\"}},\"match\":\"\\\\b(local)\\\\s+(as)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*)\\\\b\",\"name\":\"meta.local-as-template-statement.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.neighbor.bird\"},\"2\":{\"name\":\"constant.numeric.ip-address.bird\"},\"3\":{\"name\":\"meta.interface-reference.bird\"},\"4\":{\"name\":\"string.quoted.single.interface.bird\"},\"5\":{\"name\":\"variable.other.interface.bird\"},\"6\":{\"name\":\"keyword.control.as.bird\"},\"7\":{\"name\":\"constant.numeric.asn.bird\"},\"8\":{\"name\":\"keyword.control.port.bird\"},\"9\":{\"name\":\"constant.numeric.port.bird\"}},\"match\":\"\\\\b(neighbor)\\\\s+([.:\\\\h]+)\\\\s*(%\\\\s*(?:'([-.0-:A-Z_a-z]+)'|([-.0-:A-Z_a-z]+)))?(?:\\\\s+(as)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*))?\\\\s+(port)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*)\\\\b\",\"name\":\"meta.neighbor-port-statement.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.neighbor.bird\"},\"2\":{\"name\":\"entity.name.symbol.neighbor-address.bird\"},\"3\":{\"name\":\"meta.interface-reference.bird\"},\"4\":{\"name\":\"string.quoted.single.interface.bird\"},\"5\":{\"name\":\"variable.other.interface.bird\"},\"6\":{\"name\":\"keyword.control.as.bird\"},\"7\":{\"name\":\"constant.numeric.asn.bird\"},\"8\":{\"name\":\"keyword.control.port.bird\"},\"9\":{\"name\":\"constant.numeric.port.bird\"}},\"match\":\"\\\\b(neighbor)\\\\s+('[-.0-:A-Z_a-z]+'|(?!(?:as|range)\\\\b)[A-Z_a-z][0-9A-Z_a-z]*)\\\\s*(%\\\\s*(?:'([-.0-:A-Z_a-z]+)'|([-.0-:A-Z_a-z]+)))?(?:\\\\s+(as)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*))?\\\\s+(port)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*)\\\\b\",\"name\":\"meta.neighbor-port-symbolic-statement.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.neighbor.bird\"},\"2\":{\"name\":\"constant.numeric.ip-address.bird\"},\"3\":{\"name\":\"meta.interface-reference.bird\"},\"4\":{\"name\":\"string.quoted.single.interface.bird\"},\"5\":{\"name\":\"variable.other.interface.bird\"},\"6\":{\"name\":\"keyword.control.as.bird\"},\"7\":{\"name\":\"constant.numeric.asn.bird\"}},\"match\":\"\\\\b(neighbor)\\\\s+([.:\\\\h]+)\\\\s*(%\\\\s*(?:'([-.0-:A-Z_a-z]+)'|([-.0-:A-Z_a-z]+)))?\\\\s+(as)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*)\\\\b\",\"name\":\"meta.neighbor-statement.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.neighbor.bird\"},\"2\":{\"name\":\"entity.name.symbol.neighbor-address.bird\"},\"3\":{\"name\":\"meta.interface-reference.bird\"},\"4\":{\"name\":\"string.quoted.single.interface.bird\"},\"5\":{\"name\":\"variable.other.interface.bird\"},\"6\":{\"name\":\"keyword.control.as.bird\"},\"7\":{\"name\":\"constant.numeric.asn.bird\"}},\"match\":\"\\\\b(neighbor)\\\\s+('[-.0-:A-Z_a-z]+'|(?!(?:as|range)\\\\b)[A-Z_a-z][0-9A-Z_a-z]*)\\\\s*(%\\\\s*(?:'([-.0-:A-Z_a-z]+)'|([-.0-:A-Z_a-z]+)))?\\\\s+(as)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*)\\\\b\",\"name\":\"meta.neighbor-symbolic-statement.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.neighbor.bird\"},\"2\":{\"name\":\"keyword.control.as.bird\"},\"3\":{\"name\":\"constant.numeric.asn.bird\"}},\"match\":\"\\\\b(neighbor)\\\\s+(as)\\\\s+([0-9]+|[A-Z_a-z][0-9A-Z_a-z]*)\\\\b\",\"name\":\"meta.neighbor-template-statement.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.source.bird\"},\"2\":{\"name\":\"constant.numeric.ip-address.bird\"}},\"match\":\"\\\\b(source address)\\\\s+([.:\\\\h]+)\\\\b\",\"name\":\"meta.source-address-statement.bird\"}]},\"next-hop-statements\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.routing.bird\"},\"2\":{\"name\":\"keyword.other.ip-version.bird\"},\"3\":{\"name\":\"constant.numeric.ip-address.bird\"}},\"match\":\"\\\\b(next hop)\\\\s+(ipv4)\\\\s+([.0-9]+)\\\\b\",\"name\":\"meta.next-hop-ipv4.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.routing.bird\"},\"2\":{\"name\":\"keyword.other.ip-version.bird\"},\"3\":{\"name\":\"constant.numeric.ip-address.bird\"}},\"match\":\"\\\\b(next hop)\\\\s+(ipv6)\\\\s+([:\\\\h]+)\\\\b\",\"name\":\"meta.next-hop-ipv6.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.routing.bird\"},\"2\":{\"name\":\"keyword.other.semantic-modifier.bird\"}},\"match\":\"\\\\b(next hop)\\\\s+(self)\\\\b\",\"name\":\"meta.next-hop-simple.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.routing.bird\"},\"2\":{\"name\":\"keyword.other.semantic-modifier.bird\"}},\"match\":\"\\\\b(extended next hop)\\\\s+(o(?:n|ff))\\\\b\",\"name\":\"meta.extended-next-hop-statement.bird\"}]},\"numbers\":{\"patterns\":[{\"match\":\"\\\\b0x\\\\h+\\\\b\",\"name\":\"constant.numeric.hex.bird\"},{\"match\":\"\\\\b[0-9]+\\\\b\",\"name\":\"constant.numeric.decimal.bird\"},{\"captures\":{\"1\":{\"name\":\"keyword.other.unit.bird\"}},\"match\":\"\\\\b[0-9]+\\\\s*([mu]??s)\\\\b\",\"name\":\"constant.numeric.time.bird\"}]},\"operators\":{\"patterns\":[{\"match\":\"==|!=|<=|>=|!~|[<=>~]\",\"name\":\"keyword.operator.comparison.bird\"},{\"match\":\"&&|\\\\|\\\\||!|->\",\"name\":\"keyword.operator.logical.bird\"},{\"match\":\"\\\\+\\\\+\",\"name\":\"keyword.operator.concat.bird\"},{\"match\":\"[-%*+/]\",\"name\":\"keyword.operator.arithmetic.bird\"},{\"match\":\"\\\\.\\\\.\",\"name\":\"keyword.operator.range.bird\"},{\"match\":\"\\\\.\",\"name\":\"keyword.operator.accessor.bird\"}]},\"prefixes\":{\"patterns\":[{\"match\":\"\\\\b(?:(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}|(?:\\\\h{0,4}:)+\\\\h{0,4})/[0-9]{1,3}(?:[-+]|\\\\{[0-9]+,[0-9]+})?\\\\b\",\"name\":\"constant.numeric.prefix.bird\"}]},\"print-statements\":{\"patterns\":[{\"begin\":\"\\\\b(printn??)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.print.bird\"}},\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.terminator.statement.bird\"}},\"name\":\"meta.print-statement.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"protocol-definitions\":{\"patterns\":[{\"begin\":\"\\\\b(protocol)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')\\\\s+(from)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.protocol.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"},\"3\":{\"name\":\"entity.name.function.protocol.bird\"},\"4\":{\"name\":\"keyword.control.template-reference.bird\"},\"5\":{\"name\":\"entity.name.function.template.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.protocol-definition-with-template.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\b(protocol)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.protocol.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"},\"3\":{\"name\":\"entity.name.function.protocol.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.protocol-definition-with-name.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\b(protocol)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.protocol.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.protocol-definition-anonymous.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"protocol-phrases\":{\"patterns\":[{\"match\":\"\\\\b(?:strict\\\\s+bind|zero\\\\s+udp6\\\\s+checksum\\\\s+rx|idle\\\\s+tx\\\\s+interval|multiplier|keyed|meticulous)\\\\b\",\"name\":\"keyword.other.bfd.phrase.bird\"},{\"match\":\"\\\\b(?:send\\\\s+timestamps|rtt\\\\s+(?:cost|min|max|decay)|next\\\\s+hop\\\\s+prefer|prefer|native)\\\\b\",\"name\":\"keyword.other.babel.phrase.bird\"},{\"match\":\"\\\\b(?:next\\\\s+hop\\\\s+(?:self|address|ibgp|ebgp)|link\\\\s+local\\\\s+next\\\\s+hop\\\\s+format|import\\\\s+table|export\\\\s+table|base\\\\s+table|add\\\\s+paths|aigp\\\\s+originate|long\\\\s+lived\\\\s+graceful\\\\s+restart|long\\\\s+lived\\\\s+stale\\\\s+time|dynamic\\\\s+name(?:\\\\s+digits)?|free\\\\s+bind|ttl\\\\s+security|multihop\\\\s+password|rr\\\\s+client|rs\\\\s+client|advertise\\\\s+hostname|interpret\\\\s+communities|deterministic\\\\s+med|default\\\\s+bgp_local_pref|default\\\\s+bgp_med|med\\\\s+metric|igp\\\\s+metric|missing\\\\s+lladdr|gateway\\\\s+address|forwarding\\\\s+addressed|gateway\\\\s+recursive|allow\\\\s+local\\\\s+as|allow\\\\s+bogus\\\\s+as|originate\\\\s+community|full\\\\s+route\\\\s+table|capabilities|primary)\\\\b\",\"name\":\"keyword.other.bgp.phrase.bird\"}]},\"route-attributes\":{\"patterns\":[{\"match\":\"\\\\b(?:net|scope|preference|from|gw|proto|source|dest|ifname|ifindex|weight|gw_mpls|gw_mpls_stack|onlink|igp_metric|mpls_label|mpls_policy|mpls_class|bgp_path|bgp_origin|bgp_next_hop|bgp_med|bgp_local_pref|bgp_community|bgp_ext_community|bgp_large_community|bgp_originator_id|bgp_cluster_list|ospf_metric1|ospf_metric2|ospf_tag|ospf_router_id|rip_metric|rip_tag|mypath|mylclist)\\\\b\",\"name\":\"support.variable.route-attribute.bird\"}]},\"semantic-modifiers\":{\"patterns\":[{\"match\":\"\\\\b(?:self|on|off|remote|extended)\\\\b\",\"name\":\"keyword.other.semantic-modifier.bird\"}]},\"strings\":{\"patterns\":[{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.bird\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.bird\"}},\"name\":\"string.quoted.double.bird\",\"patterns\":[{\"match\":\"\\\\.\",\"name\":\"constant.character.escape.bird\"}]},{\"match\":\"'[-.0-:A-Z_a-z]+'\",\"name\":\"entity.name.symbol.quoted.bird\"}]},\"structural-keywords\":{\"patterns\":[{\"match\":\"\\\\b(?:if|then|else|case|for|do|while|break|continue|return|in)\\\\b\",\"name\":\"keyword.control.bird\"},{\"match\":\"\\\\belse\\\\s*:\",\"name\":\"keyword.control.case.else.bird\"},{\"match\":\"\\\\b(?:accept|reject|error)\\\\b\",\"name\":\"keyword.control.flow.bird\"},{\"match\":\"\\\\b(?:protocol|table|define|include|attribute|eval|ipv4|ipv6|local|as|from|where|cost|limit|action)\\\\b\",\"name\":\"keyword.control.structure.bird\"}]},\"symbols\":{\"patterns\":[{\"match\":\"\\\\b[A-Z_a-z][0-9A-Z_a-z]*\\\\b\",\"name\":\"variable.other.bird\"}]},\"template-definitions\":{\"patterns\":[{\"begin\":\"\\\\b(template)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')\\\\s+(from)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.template.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"},\"3\":{\"name\":\"entity.name.function.template.bird\"},\"4\":{\"name\":\"keyword.control.template-reference.bird\"},\"5\":{\"name\":\"entity.name.function.template.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.template-definition-with-from.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\b(template)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*|'[-.0-:A-Z_a-z]+')\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.template.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"},\"3\":{\"name\":\"entity.name.function.template.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.template-definition-with-name.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\b(template)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.template.bird\"},\"2\":{\"name\":\"entity.name.type.protocol.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.template-definition-anonymous.bird\",\"patterns\":[{\"include\":\"$self\"}]}]},\"user-variables\":{\"patterns\":[{\"match\":\"\\\\b[A-Z][0-9A-Z_a-z]*\\\\b\",\"name\":\"variable.other.user-defined.bird\"}]},\"variable-declarations\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"storage.type.bird\"},\"2\":{\"name\":\"variable.other.declaration.bird\"}},\"match\":\"\\\\b((?:int|pair|quad|ip|prefix|ec|lc|rd|enum)\\\\s+set|int|bool|ip|prefix|rd|pair|quad|ec|lc|string|bytestring|bgpmask|bgppath|clist|eclist|lclist|set|enum|route)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)(?:\\\\s*=|;)\",\"name\":\"meta.variable-declaration.bird\"}]},\"vpn-rd\":{\"match\":\"\\\\b(?:[0-9]+:[0-9]+|[012]:[0-9]+:[0-9]+|(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}:[0-9]+)\\\\b\",\"name\":\"constant.numeric.vpn-rd.bird\"}},\"scopeName\":\"source.bird2\",\"aliases\":[\"bird\"]}"))];
2
2
  export { bird2_default as default };