@kusto/monaco-kusto 11.4.0 → 12.0.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 (44) hide show
  1. package/README.md +19 -1
  2. package/package.json +3 -1
  3. package/release/dev/globals-0aacfe72.js +46 -0
  4. package/release/dev/kustoMode.js +214 -497
  5. package/release/dev/kustoWorker.js +49 -90
  6. package/release/dev/{main-1587ba64.js → main-b690e47e.js} +2 -2
  7. package/release/dev/monaco.contribution.js +235 -201
  8. package/release/dev/{schema-a5230652.js → schema-957f5e9b.js} +13 -2
  9. package/release/esm/extendedGlobalApi/getRangeHtml.d.ts +2 -0
  10. package/release/esm/extendedGlobalApi/getRangeHtml.js +11 -0
  11. package/release/esm/extendedGlobalApi/index.d.ts +1 -0
  12. package/release/esm/extendedGlobalApi/index.js +1 -0
  13. package/release/esm/globals-88d92b64.js +40 -0
  14. package/release/esm/globals.d.ts +1 -0
  15. package/release/esm/globals.js +1 -0
  16. package/release/esm/kusto.worker.js +39 -91
  17. package/release/esm/kustoMode.js +39 -29
  18. package/release/esm/kustoWorker.d.ts +2 -5
  19. package/release/esm/kustoWorker.js +2 -5
  20. package/release/esm/languageFeatures.d.ts +0 -13
  21. package/release/esm/languageFeatures.js +0 -299
  22. package/release/esm/languageServiceManager/kustoLanguageService.d.ts +2 -4
  23. package/release/esm/languageServiceManager/kustoLanguageService.js +58 -71
  24. package/release/esm/languageServiceManager/settings.d.ts +0 -2
  25. package/release/esm/monaco.contribution.d.ts +1 -6
  26. package/release/esm/monaco.contribution.js +22 -79
  27. package/release/esm/{schema-c006895b.js → schema-66580db4.js} +12 -2
  28. package/release/esm/syntaxHighlighting/SemanticTokensProvider.d.ts +18 -0
  29. package/release/esm/syntaxHighlighting/SemanticTokensProvider.js +78 -0
  30. package/release/esm/syntaxHighlighting/kustoMonarchLanguageDefinition.d.ts +2 -0
  31. package/release/esm/syntaxHighlighting/kustoMonarchLanguageDefinition.js +401 -0
  32. package/release/esm/syntaxHighlighting/themes.d.ts +11 -0
  33. package/release/esm/syntaxHighlighting/themes.js +103 -0
  34. package/release/esm/syntaxHighlighting/types.d.ts +41 -0
  35. package/release/esm/syntaxHighlighting/types.js +55 -0
  36. package/release/min/globals-cce7b304.js +7 -0
  37. package/release/min/kustoMode.js +2 -2
  38. package/release/min/kustoWorker.js +4 -4
  39. package/release/min/{main-75aa3e71.js → main-13659fc4.js} +2 -2
  40. package/release/min/monaco.contribution.js +2 -2
  41. package/release/min/schema-ab3cbb28.js +7 -0
  42. package/release/esm/languageServiceManager/kustoMonarchLanguageDefinition.d.ts +0 -2
  43. package/release/esm/languageServiceManager/kustoMonarchLanguageDefinition.js +0 -211
  44. package/release/min/schema-192b3175.js +0 -7
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 11.4.0(7572339ea10d5d0fdd55c4a2b813f3663acab903)
3
+ * monaco-kusto version: 12.0.0(2f1838c12bdb98562467acf51b6fd3e396182e86)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-1587ba64'], (function (exports, monaco, main) { 'use strict';
8
+ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-b690e47e', './globals-0aacfe72'], (function (exports, monaco, main, globals) { 'use strict';
9
9
 
10
10
  function _interopNamespaceDefault(e) {
11
11
  var n = Object.create(null);
@@ -27,18 +27,18 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
27
27
  var monaco__namespace = /*#__PURE__*/_interopNamespaceDefault(monaco);
28
28
 
29
29
  var _excluded = ["onDidProvideCompletionItems"];
30
- function _typeof$7(o) { "@babel/helpers - typeof"; return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$7(o); }
30
+ function _typeof$8(o) { "@babel/helpers - typeof"; return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$8(o); }
31
31
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
32
32
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
33
- function _classCallCheck$1(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
34
- function _defineProperties$1(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$2(o.key), o); } }
35
- function _createClass$1(e, r, t) { return r && _defineProperties$1(e.prototype, r), t && _defineProperties$1(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
36
- function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$7(i) ? i : i + ""; }
37
- function _toPrimitive$2(t, r) { if ("object" != _typeof$7(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$7(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
33
+ function _classCallCheck$2(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
34
+ function _defineProperties$2(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$3(o.key), o); } }
35
+ function _createClass$2(e, r, t) { return r && _defineProperties$2(e.prototype, r), t && _defineProperties$2(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
36
+ function _toPropertyKey$3(t) { var i = _toPrimitive$3(t, "string"); return "symbol" == _typeof$8(i) ? i : i + ""; }
37
+ function _toPrimitive$3(t, r) { if ("object" != _typeof$8(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$8(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
38
38
  var WorkerManager = /*#__PURE__*/function () {
39
39
  function WorkerManager(_monacoInstance, defaults) {
40
40
  var _this = this;
41
- _classCallCheck$1(this, WorkerManager);
41
+ _classCallCheck$2(this, WorkerManager);
42
42
  this._monacoInstance = _monacoInstance;
43
43
  this._defaults = defaults;
44
44
  this._worker = null;
@@ -50,7 +50,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
50
50
  return _this._saveStateAndStopWorker();
51
51
  });
52
52
  }
53
- return _createClass$1(WorkerManager, [{
53
+ return _createClass$2(WorkerManager, [{
54
54
  key: "_stopWorker",
55
55
  value: function _stopWorker() {
56
56
  if (this._worker) {
@@ -147,89 +147,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
147
147
  }]);
148
148
  }();
149
149
 
150
- var KustoLanguageDefinition = {
151
- name: 'kusto',
152
- mimeTypes: ['text/kusto'],
153
- displayName: 'Kusto',
154
- defaultToken: 'invalid',
155
- brackets: [['[', ']', 'delimiter.square'], ['(', ')', 'delimiter.parenthesis']],
156
- // types are wrong
157
- wordDefinition: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
158
- // .slice() call is for creating a shallow copy of the array since bridge.net shoves a $type property on the array which monaco doesn't like.
159
- // Kusto.Data.IntelliSense.CslCommandParser.PromotedOperatorCommandTokens.slice(0),
160
- promotedOperatorCommandTokens: ['where', 'count', 'extend', 'join', 'limit', 'order', 'project', 'project-away', 'project-rename', 'project-reorder', 'project-keep', 'render', 'sort', 'summarize', 'distinct', 'take', 'top', 'top-nested', 'top-hitters', 'union', 'mv-expand', 'mv-apply', 'reduce', 'evaluate', 'parse', 'parse-where', 'parse-kv', 'sample', 'sample-distinct', 'make-series', 'getschema', 'serialize', 'invoke', 'as', 'scan'],
161
- // Kusto.Data.IntelliSense.CslCommandParser.OperatorCommandTokens.slice(0),
162
- operatorCommandTokens: ['filter', 'fork', 'facet', 'range', 'consume', 'find', 'search', 'print', 'partition', 'lookup', 'where', 'count', 'extend', 'join', 'limit', 'order', 'project', 'project-away', 'project-rename', 'project-reorder', 'project-keep', 'render', 'sort', 'summarize', 'distinct', 'take', 'top', 'top-nested', 'top-hitters', 'union', 'mv-expand', 'mv-apply', 'reduce', 'evaluate', 'parse', 'parse-where', 'parse-kv', 'sample', 'sample-distinct', 'make-series', 'getschema', 'serialize', 'invoke', 'as', 'scan'],
163
- keywords: ['by', 'on', 'contains', 'notcontains', 'containscs', 'notcontainscs', 'startswith', 'has', 'matches', 'regex', 'true', 'false', 'and', 'or', 'typeof', 'int', 'string', 'date', 'datetime', 'time', 'long', 'real', '​boolean', 'bool'],
164
- operators: ['+', '-', '*', '/', '>', '<', '==', '<>', '<=', '>=', '~', '!~'],
165
- builtinFunctions: ['countof', 'bin', 'extentid', 'extract', 'extractjson', 'floor', 'iif', 'isnull', 'isnotnull', 'notnull', 'isempty', 'isnotempty', 'notempty', 'now', 're2', 'strcat', 'strlen', 'toupper', 'tostring', 'count', 'cnt', 'sum', 'min', 'max', 'avg'],
166
- tokenizer: {
167
- root: [{
168
- include: '@whitespace'
169
- }, {
170
- include: '@numbers'
171
- }, {
172
- include: '@strings'
173
- }, {
174
- include: '@dqstrings'
175
- }, {
176
- include: '@literals'
177
- }, {
178
- include: '@comments'
179
- }, [/[;,.]/, 'delimiter'], [/[()\[\]]/, '@brackets'], [/[<>=!%&+\-*/|~^]/, 'operator'], [/[\w@#\-$]+/, {
180
- cases: {
181
- '@keywords': 'keyword',
182
- '@promotedOperatorCommandTokens': 'operator.sql',
183
- '@operatorCommandTokens': 'keyword',
184
- '@operators': 'operator',
185
- '@builtinFunctions': 'predefined',
186
- '@default': 'identifier'
187
- }
188
- }]],
189
- whitespace: [[/\s+/, 'white']],
190
- comments: [['\\/\\/+.*', 'comment']],
191
- numbers: [[/0[xX][0-9a-fA-F]*/, 'number'], [/[$][+-]*\d*(\.\d*)?/, 'number'], [/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']],
192
- strings: [[/H'/, {
193
- token: 'string.quote',
194
- bracket: '@open',
195
- next: '@string'
196
- }], [/h'/, {
197
- token: 'string.quote',
198
- bracket: '@open',
199
- next: '@string'
200
- }], [/'/, {
201
- token: 'string.quote',
202
- bracket: '@open',
203
- next: '@string'
204
- }]],
205
- string: [[/[^']+/, 'string'], [/''/, 'string'], [/'/, {
206
- token: 'string.quote',
207
- bracket: '@close',
208
- next: '@pop'
209
- }]],
210
- dqstrings: [[/H"/, {
211
- token: 'string.quote',
212
- bracket: '@open',
213
- next: '@dqstring'
214
- }], [/h"/, {
215
- token: 'string.quote',
216
- bracket: '@open',
217
- next: '@dqstring'
218
- }], [/"/, {
219
- token: 'string.quote',
220
- bracket: '@open',
221
- next: '@dqstring'
222
- }]],
223
- dqstring: [[/[^"]+/, 'string'], [/""/, 'string'], [/"/, {
224
- token: 'string.quote',
225
- bracket: '@close',
226
- next: '@pop'
227
- }]],
228
- literals: [[/datetime\(\d{4}-\d{2}-\d{2}(\s+\d{2}:\d{2}(:\d{2}(\.\d{0,3})?)?)?\)/, 'number'], [/time\((\d+(s(ec(onds?)?)?|m(in(utes?)?)?|h(ours?)?|d(ays?)?)|(\s*(('[^']+')|("[^"]+"))\s*))\)/, 'number'], [/guid\([\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}\)/, 'number'], [/typeof\((int|string|date|datetime|time|long|real|boolean|bool)\)/, 'number']]
229
- }
230
- };
231
-
232
- function _typeof$6(o) { "@babel/helpers - typeof"; return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$6(o); }
150
+ function _typeof$7(o) { "@babel/helpers - typeof"; return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$7(o); }
233
151
  /**
234
152
  * Checks if `value` is the
235
153
  * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
@@ -256,19 +174,19 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
256
174
  * // => false
257
175
  */
258
176
  function isObject(value) {
259
- var type = _typeof$6(value);
177
+ var type = _typeof$7(value);
260
178
  return value != null && (type == 'object' || type == 'function');
261
179
  }
262
180
 
263
- function _typeof$5(o) { "@babel/helpers - typeof"; return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$5(o); }
181
+ function _typeof$6(o) { "@babel/helpers - typeof"; return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$6(o); }
264
182
  /** Detect free variable `global` from Node.js. */
265
- var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof$5(global)) == 'object' && global && global.Object === Object && global;
183
+ var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof$6(global)) == 'object' && global && global.Object === Object && global;
266
184
  var freeGlobal$1 = freeGlobal;
267
185
 
268
- function _typeof$4(o) { "@babel/helpers - typeof"; return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$4(o); }
186
+ function _typeof$5(o) { "@babel/helpers - typeof"; return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$5(o); }
269
187
 
270
188
  /** Detect free variable `self`. */
271
- var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof$4(self)) == 'object' && self && self.Object === Object && self;
189
+ var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof$5(self)) == 'object' && self && self.Object === Object && self;
272
190
 
273
191
  /** Used as a reference to the global object. */
274
192
  var root = freeGlobal$1 || freeSelf || Function('return this')();
@@ -413,7 +331,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
413
331
  return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
414
332
  }
415
333
 
416
- function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$3(o); }
334
+ function _typeof$4(o) { "@babel/helpers - typeof"; return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$4(o); }
417
335
  /**
418
336
  * Checks if `value` is object-like. A value is object-like if it's not `null`
419
337
  * and has a `typeof` result of "object".
@@ -439,10 +357,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
439
357
  * // => false
440
358
  */
441
359
  function isObjectLike(value) {
442
- return value != null && _typeof$3(value) == 'object';
360
+ return value != null && _typeof$4(value) == 'object';
443
361
  }
444
362
 
445
- function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
363
+ function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$3(o); }
446
364
 
447
365
  /** `Object#toString` result references. */
448
366
  var symbolTag = '[object Symbol]';
@@ -465,7 +383,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
465
383
  * // => false
466
384
  */
467
385
  function isSymbol(value) {
468
- return _typeof$2(value) == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
386
+ return _typeof$3(value) == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
469
387
  }
470
388
 
471
389
  /** Used as references for various `Number` constants. */
@@ -726,33 +644,29 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
726
644
  }
727
645
 
728
646
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
729
- function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
730
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest(); }
731
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
732
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
733
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
647
+ function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
734
648
  function _toConsumableArray$1(r) { return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1(); }
735
649
  function _nonIterableSpread$1() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
736
650
  function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
737
651
  function _iterableToArray$1(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
738
652
  function _arrayWithoutHoles$1(r) { if (Array.isArray(r)) return _arrayLikeToArray$1(r); }
739
653
  function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
740
- function _regeneratorRuntime$1() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$1 = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof$1(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof$1(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
741
- function asyncGeneratorStep$1(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
742
- function _asyncToGenerator$1(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep$1(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep$1(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
743
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
744
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$1(o.key), o); } }
745
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
746
- function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
747
- function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; }
748
- function _toPrimitive$1(t, r) { if ("object" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$1(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
654
+ function _regeneratorRuntime$2() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$2 = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof$2(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof$2(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
655
+ function asyncGeneratorStep$2(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
656
+ function _asyncToGenerator$2(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep$2(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep$2(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
657
+ function _classCallCheck$1(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
658
+ function _defineProperties$1(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$2(o.key), o); } }
659
+ function _createClass$1(e, r, t) { return r && _defineProperties$1(e.prototype, r), t && _defineProperties$1(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
660
+ function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
661
+ function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$2(i) ? i : i + ""; }
662
+ function _toPrimitive$2(t, r) { if ("object" != _typeof$2(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$2(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
749
663
 
750
664
  // --- diagnostics ---
751
665
 
752
666
  var DiagnosticsAdapter = /*#__PURE__*/function () {
753
667
  function DiagnosticsAdapter(_monacoInstance, _languageId, _worker, defaults, onSchemaChange) {
754
668
  var _this = this;
755
- _classCallCheck(this, DiagnosticsAdapter);
669
+ _classCallCheck$1(this, DiagnosticsAdapter);
756
670
  _defineProperty$1(this, "_disposables", []);
757
671
  _defineProperty$1(this, "_contentListener", Object.create(null));
758
672
  _defineProperty$1(this, "_configurationListener", Object.create(null));
@@ -835,9 +749,9 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
835
749
  if (this.defaults.languageSettings.enableQuickFixes) {
836
750
  this._disposables.push(monaco__namespace.languages.registerCodeActionProvider(this._languageId, {
837
751
  provideCodeActions: function () {
838
- var _provideCodeActions = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee(model, range, context, _token) {
752
+ var _provideCodeActions = _asyncToGenerator$2( /*#__PURE__*/_regeneratorRuntime$2().mark(function _callee(model, range, context, _token) {
839
753
  var startOffset, endOffset, showQuickFix, actions;
840
- return _regeneratorRuntime$1().wrap(function _callee$(_context) {
754
+ return _regeneratorRuntime$2().wrap(function _callee$(_context) {
841
755
  while (1) switch (_context.prev = _context.next) {
842
756
  case 0:
843
757
  startOffset = model.getOffsetAt(range.getStartPosition());
@@ -887,13 +801,13 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
887
801
  this._monacoInstance.editor.getModels().forEach(onModelAdd);
888
802
  this._monacoInstance.editor.getEditors().forEach(onEditorAdd);
889
803
  }
890
- return _createClass(DiagnosticsAdapter, [{
804
+ return _createClass$1(DiagnosticsAdapter, [{
891
805
  key: "getMonacoCodeActions",
892
806
  value: function () {
893
- var _getMonacoCodeActions = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee2(model, startOffset, endOffset, enableQuickFix) {
807
+ var _getMonacoCodeActions = _asyncToGenerator$2( /*#__PURE__*/_regeneratorRuntime$2().mark(function _callee2(model, startOffset, endOffset, enableQuickFix) {
894
808
  var _this2 = this;
895
809
  var actions, worker, resource, codeActions, _loop, _ret, i;
896
- return _regeneratorRuntime$1().wrap(function _callee2$(_context3) {
810
+ return _regeneratorRuntime$2().wrap(function _callee2$(_context3) {
897
811
  while (1) switch (_context3.prev = _context3.next) {
898
812
  case 0:
899
813
  actions = [];
@@ -906,10 +820,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
906
820
  return worker.getResultActions(resource.toString(), startOffset, endOffset);
907
821
  case 7:
908
822
  codeActions = _context3.sent;
909
- _loop = /*#__PURE__*/_regeneratorRuntime$1().mark(function _loop() {
823
+ _loop = /*#__PURE__*/_regeneratorRuntime$2().mark(function _loop() {
910
824
  var _this2$defaults$langu;
911
825
  var codeAction, codeActionKind, changes, edits;
912
- return _regeneratorRuntime$1().wrap(function _loop$(_context2) {
826
+ return _regeneratorRuntime$2().wrap(function _loop$(_context2) {
913
827
  while (1) switch (_context2.prev = _context2.next) {
914
828
  case 0:
915
829
  codeAction = codeActions[i];
@@ -1140,329 +1054,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1140
1054
  source: diag.source
1141
1055
  };
1142
1056
  }
1143
- /**
1144
- * Copy of Kusto.Language.Editor.ClassificationKind we don't have to depend on it in this file
1145
- */
1146
- var ClassificationKind = {
1147
- PlainText: 0,
1148
- Comment: 1,
1149
- Punctuation: 2,
1150
- Directive: 3,
1151
- Literal: 4,
1152
- StringLiteral: 5,
1153
- Type: 6,
1154
- Column: 7,
1155
- Table: 8,
1156
- Database: 9,
1157
- Function: 10,
1158
- Parameter: 11,
1159
- Variable: 12,
1160
- Identifier: 13,
1161
- ClientParameter: 14,
1162
- QueryParameter: 15,
1163
- ScalarOperator: 16,
1164
- MathOperator: 17,
1165
- QueryOperator: 18,
1166
- Command: 19,
1167
- Keyword: 20,
1168
- MaterializedView: 21,
1169
- SchemaMember: 22,
1170
- SignatureParameter: 23,
1171
- Option: 24
1172
- };
1173
- var ClassificationKindNames = {};
1174
- for (var _i = 0, _Object$entries = Object.entries(ClassificationKind); _i < _Object$entries.length; _i++) {
1175
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
1176
- key = _Object$entries$_i[0],
1177
- value = _Object$entries$_i[1];
1178
- ClassificationKindNames[value] = key;
1179
- }
1180
1057
 
1181
- // commented here is the color definitions are were defined by v1 intellisense terminology:
1182
- // { token: 'comment', foreground: '008000' }, // CommentToken Green
1183
- // { token: 'variable.predefined', foreground: '800080' }, // CalculatedColumnToken Purple
1184
- // { token: 'function', foreground: '0000FF' }, // FunctionNameToken Blue
1185
- // { token: 'operator.sql', foreground: 'FF4500' }, // OperatorToken OrangeRed (now changed to darker color CC3700 because wasn't accessible)
1186
- // { token: 'string', foreground: 'B22222' }, // StringLiteralToken Firebrick
1187
- // { token: 'operator.scss', foreground: '0000FF' }, // SubOperatorToken Blue
1188
- // { token: 'variable', foreground: 'C71585' }, // TableColumnToken MediumVioletRed
1189
- // { token: 'variable.parameter', foreground: '9932CC' }, // TableToken DarkOrchid
1190
- // { token: '', foreground: '000000' }, // UnknownToken, PlainTextToken Black
1191
- // { token: 'type', foreground: '0000FF' }, // DataTypeToken Blue
1192
- // { token: 'tag', foreground: '0000FF' }, // ControlCommandToken Blue
1193
- // { token: 'annotation', foreground: '2B91AF' }, // QueryParametersToken FF2B91AF
1194
- // { token: 'keyword', foreground: '0000FF' }, // CslCommandToken, PluginToken Blue
1195
- // { token: 'number', foreground: '191970' }, // LetVariablesToken MidnightBlue
1196
- // { token: 'annotation', foreground: '9400D3' }, // ClientDirectiveToken DarkViolet
1197
- // { token: 'invalid', background: 'cd3131' },
1198
- var classificationToColorLight = {
1199
- Column: 'C71585',
1200
- Comment: '008000',
1201
- Database: 'C71585',
1202
- Function: '0000FF',
1203
- Identifier: '000000',
1204
- Keyword: '0000FF',
1205
- Literal: 'B22222',
1206
- ScalarOperator: '0000FF',
1207
- MaterializedView: 'C71585',
1208
- MathOperator: '000000',
1209
- Command: '0000FF',
1210
- Parameter: '2B91AF',
1211
- PlainText: '000000',
1212
- Punctuation: '000000',
1213
- QueryOperator: 'CC3700',
1214
- QueryParameter: 'CC3700',
1215
- StringLiteral: 'B22222',
1216
- Table: 'C71585',
1217
- Type: '0000FF',
1218
- Variable: '191970',
1219
- Directive: '9400D3',
1220
- ClientParameter: 'b5cea8',
1221
- SchemaMember: 'C71585',
1222
- SignatureParameter: '2B91AF',
1223
- Option: '000000'
1224
- };
1225
- var classificationToColorDark = {
1226
- Column: '4ec9b0',
1227
- Comment: '6A9B34',
1228
- Database: 'c586c0',
1229
- Function: 'dcdcaa',
1230
- Identifier: 'd4d4d4',
1231
- Keyword: '569cd6',
1232
- Literal: 'ce9178',
1233
- ScalarOperator: '569cd6',
1234
- MaterializedView: 'c586c0',
1235
- MathOperator: 'd4d4d4',
1236
- Command: 'd4d4d4',
1237
- Parameter: '2B91AF',
1238
- PlainText: 'd4d4d4',
1239
- Punctuation: 'd4d4d4',
1240
- QueryOperator: '9cdcfe',
1241
- QueryParameter: '9cdcfe',
1242
- StringLiteral: 'ce9178',
1243
- Table: 'c586c0',
1244
- Type: '569cd6',
1245
- Variable: 'd7ba7d',
1246
- Directive: 'b5cea8',
1247
- ClientParameter: 'b5cea8',
1248
- SchemaMember: '4ec9b0',
1249
- SignatureParameter: '2B91AF',
1250
- Option: 'd4d4d4'
1251
- };
1252
- var ColorizationAdapter = /*#__PURE__*/function () {
1253
- function ColorizationAdapter(_monacoInstance, _languageId, _worker, defaults, onSchemaChange) {
1254
- var _this5 = this;
1255
- _classCallCheck(this, ColorizationAdapter);
1256
- _defineProperty$1(this, "_disposables", []);
1257
- _defineProperty$1(this, "_contentListener", Object.create(null));
1258
- _defineProperty$1(this, "_configurationListener", Object.create(null));
1259
- _defineProperty$1(this, "_schemaListener", Object.create(null));
1260
- _defineProperty$1(this, "decorations", []);
1261
- this._monacoInstance = _monacoInstance;
1262
- this._languageId = _languageId;
1263
- this._worker = _worker;
1264
- injectCss();
1265
- var onModelAdd = function onModelAdd(model) {
1266
- var languageId = model.getLanguageId();
1267
- if (languageId !== _this5._languageId) {
1268
- return;
1269
- }
1270
- var debouncedColorization = debounce(function (intervals) {
1271
- return _this5._doColorization(model, languageId, intervals);
1272
- }, 500);
1273
- _this5._contentListener[model.uri.toString()] = model.onDidChangeContent(function (e) {
1274
- // Changes are represented as a range in doc before change, plus the text that it was replaced with.
1275
- // We are interested in the range _after_ the change (since that's what we need to colorize).
1276
- // following logic calculates that.
1277
- var intervalsToColorize = changeEventToIntervals(e);
1278
- debouncedColorization(intervalsToColorize);
1279
- });
1280
- _this5._configurationListener[model.uri.toString()] = defaults.onDidChange(function () {
1281
- self.setTimeout(function () {
1282
- return _this5._doColorization(model, languageId, []);
1283
- }, 0);
1284
- });
1285
- _this5._schemaListener[model.uri.toString()] = onSchemaChange(function () {
1286
- self.setTimeout(function () {
1287
- return _this5._doColorization(model, languageId, []);
1288
- }, 0);
1289
- });
1290
- };
1291
- var onModelRemoved = function onModelRemoved(model) {
1292
- model.deltaDecorations(_this5.decorations, []);
1293
- var uriStr = model.uri.toString();
1294
- var contentListener = _this5._contentListener[uriStr];
1295
- if (contentListener) {
1296
- contentListener.dispose();
1297
- delete _this5._contentListener[uriStr];
1298
- }
1299
- var configurationListener = _this5._configurationListener[uriStr];
1300
- if (configurationListener) {
1301
- configurationListener.dispose();
1302
- delete _this5._configurationListener[uriStr];
1303
- }
1304
- var schemaListener = _this5._configurationListener[uriStr];
1305
- if (schemaListener) {
1306
- schemaListener.dispose();
1307
- delete _this5._schemaListener[uriStr];
1308
- }
1309
- };
1310
- this._disposables.push(this._monacoInstance.editor.onDidCreateModel(onModelAdd));
1311
- this._disposables.push(this._monacoInstance.editor.onWillDisposeModel(onModelRemoved));
1312
- this._disposables.push(this._monacoInstance.editor.onDidChangeModelLanguage(function (event) {
1313
- onModelRemoved(event.model);
1314
- onModelAdd(event.model);
1315
- }));
1316
- this._disposables.push({
1317
- dispose: function dispose() {
1318
- for (var _key3 in _this5._contentListener) {
1319
- _this5._contentListener[_key3].dispose();
1320
- }
1321
- }
1322
- });
1323
- this._monacoInstance.editor.getModels().forEach(onModelAdd);
1324
- }
1325
- return _createClass(ColorizationAdapter, [{
1326
- key: "dispose",
1327
- value: function dispose() {
1328
- this._disposables.forEach(function (d) {
1329
- return d && d.dispose();
1330
- });
1331
- this._disposables = [];
1332
- }
1333
- }, {
1334
- key: "_doColorization",
1335
- value: function _doColorization(model, languageId, intervals) {
1336
- var _this6 = this;
1337
- if (model.isDisposed()) {
1338
- return;
1339
- }
1340
- var resource = model.uri;
1341
- var versionNumberBeforeColorization = model.getVersionId();
1342
- this._worker(resource).then(function (worker) {
1343
- if (model.isDisposed()) {
1344
- return;
1345
- }
1346
- return worker.doColorization(resource.toString(), intervals);
1347
- }).then(function (colorizationRanges) {
1348
- if (model.isDisposed()) {
1349
- return;
1350
- }
1351
- var newModel = _this6._monacoInstance.editor.getModel(model.uri);
1352
- var versionId = newModel.getVersionId();
1353
-
1354
- // don't colorize an older version of the document.
1355
- if (versionId !== versionNumberBeforeColorization) {
1356
- return;
1357
- }
1358
- var decorationRanges = colorizationRanges.map(function (colorizationRange) {
1359
- var decorations = colorizationRange.classifications.map(function (classification) {
1360
- return toDecoration(model, classification);
1361
- })
1362
- // The following line will prevent things that aren't going to be colorized anyway to get a CSS class.
1363
- // This will prevent the case where the non-semantic colorizer already figured out that a keyword needs
1364
- // to be colorized, but the outdated semantic colorizer still thinks it's a plain text and wants it colored
1365
- // in black.
1366
- .filter(function (d) {
1367
- return d.options.inlineClassName !== 'PlainText' && d.options.inlineClassName != 'Identifier';
1368
- });
1369
- var firstImpactedLine = model.getPositionAt(colorizationRange.absoluteStart).lineNumber;
1370
- var endPosition = model.getPositionAt(colorizationRange.absoluteEnd);
1371
-
1372
- // A token that ends in the first column of the next line is not considered to be part of that line.
1373
- var lastImpactedLine = endPosition.column == 1 && endPosition.lineNumber > 1 ? endPosition.lineNumber - 1 : endPosition.lineNumber;
1374
- return {
1375
- decorations: decorations,
1376
- firstImpactedLine: firstImpactedLine,
1377
- lastImpactedLine: lastImpactedLine
1378
- };
1379
- });
1380
-
1381
- // Compute the previous decorations we want to replace with the new ones.
1382
- var oldDecorations = decorationRanges.map(function (range) {
1383
- return model.getLinesDecorations(range.firstImpactedLine, range.lastImpactedLine).filter(function (d) {
1384
- return classificationToColorLight[d.options.inlineClassName];
1385
- }) // Don't delete any other decorations
1386
- .map(function (d) {
1387
- return d.id;
1388
- });
1389
- }).reduce(function (prev, curr) {
1390
- return prev.concat(curr);
1391
- }, []);
1392
-
1393
- // Flatten decoration groups to an array of decorations
1394
- var newDecorations = decorationRanges.reduce(function (prev, next) {
1395
- return prev.concat(next.decorations);
1396
- }, []);
1397
- if (model && model.getLanguageId() === languageId) {
1398
- _this6.decorations = model.deltaDecorations(oldDecorations, newDecorations);
1399
- }
1400
- }).catch(function (err) {
1401
- // Hack to avoid crashing calling code, while still logging the
1402
- // error. Might be better to just let the error propagate
1403
- // normally, but that would require more investigation.
1404
- setTimeout(function () {
1405
- throw err;
1406
- }, 0);
1407
- });
1408
- }
1409
- }]);
1410
- }();
1411
-
1412
- /**
1413
- * Generates a mapping between ClassificationKind and color.
1414
- */
1415
- function getClassificationColorTriplets() {
1416
- var result = Object.keys(ClassificationKind).map(function (key) {
1417
- return {
1418
- classification: key,
1419
- colorLight: classificationToColorLight[key],
1420
- colorDark: classificationToColorDark[key]
1421
- };
1422
- });
1423
- return result;
1424
- }
1425
-
1426
- /**
1427
- * Returns a string which is a css describing all tokens and their colors.
1428
- * looks a little bit something like this:
1429
- *
1430
- * .vs .Literal {color: '#000000';} .vs-dark .Literal {color: '#FFFFFF';}
1431
- * .vs .Comment {color: '#111111';} .vs-dark .Comment {color: '#EEEEEE';}
1432
- */
1433
- function getCssForClassification() {
1434
- var classificationColorTriplets = getClassificationColorTriplets();
1435
- var cssInnerHtml = classificationColorTriplets.map(function (pair) {
1436
- return ".vs .".concat(pair.classification, " {color: #").concat(pair.colorLight, ";} .vs-dark .").concat(pair.classification, " {color: #").concat(pair.colorDark, ";}");
1437
- }).join('\n');
1438
- return cssInnerHtml;
1439
- }
1440
-
1441
- /**
1442
- * Inject a CSS sheet to the head of document, coloring kusto elements by classification.
1443
- * TODO: make idempotent
1444
- */
1445
- function injectCss() {
1446
- var container = document.getElementsByTagName('head')[0];
1447
- var style = document.createElement('style');
1448
- style.type = 'text/css';
1449
- style.media = 'screen';
1450
- container.appendChild(style);
1451
- style.innerHTML = getCssForClassification();
1452
- }
1453
- function toDecoration(model, classification) {
1454
- var start = model.getPositionAt(classification.start);
1455
- var end = model.getPositionAt(classification.start + classification.length);
1456
- var range = new monaco__namespace.Range(start.lineNumber, start.column, end.lineNumber, end.column);
1457
- var inlineClassName = ClassificationKindNames[classification.kind];
1458
- return {
1459
- range: range,
1460
- options: {
1461
- inlineClassName: inlineClassName,
1462
- stickiness: monaco__namespace.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges
1463
- }
1464
- };
1465
- }
1466
1058
  // --- completion ------
1467
1059
 
1468
1060
  function fromPosition(position) {
@@ -1543,12 +1135,12 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1543
1135
  var DEFAULT_DOCS_BASE_URL = 'https://learn.microsoft.com/azure/data-explorer/kusto/query';
1544
1136
  var CompletionAdapter = /*#__PURE__*/function () {
1545
1137
  function CompletionAdapter(workerAccessor, languageSettings) {
1546
- _classCallCheck(this, CompletionAdapter);
1138
+ _classCallCheck$1(this, CompletionAdapter);
1547
1139
  this.languageSettings = languageSettings;
1548
1140
  var getFromLanguageService = /*#__PURE__*/function () {
1549
- var _ref = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee3(resource, position) {
1141
+ var _ref = _asyncToGenerator$2( /*#__PURE__*/_regeneratorRuntime$2().mark(function _callee3(resource, position) {
1550
1142
  var worker;
1551
- return _regeneratorRuntime$1().wrap(function _callee3$(_context4) {
1143
+ return _regeneratorRuntime$2().wrap(function _callee3$(_context4) {
1552
1144
  while (1) switch (_context4.prev = _context4.next) {
1553
1145
  case 0:
1554
1146
  _context4.next = 2;
@@ -1568,7 +1160,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1568
1160
  }();
1569
1161
  this.completionCacheManager = createCompletionCacheManager(getFromLanguageService);
1570
1162
  }
1571
- return _createClass(CompletionAdapter, [{
1163
+ return _createClass$1(CompletionAdapter, [{
1572
1164
  key: "triggerCharacters",
1573
1165
  get: function get() {
1574
1166
  return [' ', '.', '('];
@@ -1577,7 +1169,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1577
1169
  key: "provideCompletionItems",
1578
1170
  value: function provideCompletionItems(model, position, context, token) {
1579
1171
  var _model$getWordAtPosit,
1580
- _this7 = this;
1172
+ _this5 = this;
1581
1173
  var wordInfo = model.getWordUntilPosition(position);
1582
1174
  var wordRange = new monaco__namespace.Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, wordInfo.endColumn);
1583
1175
  var resource = model.uri;
@@ -1596,7 +1188,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1596
1188
  sortText: entry.sortText,
1597
1189
  filterText: createCompletionFilteredText(userInput, entry),
1598
1190
  // TODO: Is this cast safe?
1599
- documentation: _this7.formatDocLink((_entry$documentation = entry.documentation) === null || _entry$documentation === void 0 ? void 0 : _entry$documentation.value),
1191
+ documentation: _this5.formatDocLink((_entry$documentation = entry.documentation) === null || _entry$documentation === void 0 ? void 0 : _entry$documentation.value),
1600
1192
  detail: entry.detail,
1601
1193
  range: wordRange,
1602
1194
  kind: toCompletionItemKind(entry.kind),
@@ -1656,7 +1248,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1656
1248
  }]);
1657
1249
  }();
1658
1250
  function isMarkupContent(thing) {
1659
- return thing && _typeof$1(thing) === 'object' && typeof thing.kind === 'string';
1251
+ return thing && _typeof$2(thing) === 'object' && typeof thing.kind === 'string';
1660
1252
  }
1661
1253
  function toMarkdownString(entry) {
1662
1254
  if (typeof entry === 'string') {
@@ -1698,10 +1290,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1698
1290
  }
1699
1291
  var DefinitionAdapter = /*#__PURE__*/function () {
1700
1292
  function DefinitionAdapter(_worker) {
1701
- _classCallCheck(this, DefinitionAdapter);
1293
+ _classCallCheck$1(this, DefinitionAdapter);
1702
1294
  this._worker = _worker;
1703
1295
  }
1704
- return _createClass(DefinitionAdapter, [{
1296
+ return _createClass$1(DefinitionAdapter, [{
1705
1297
  key: "provideDefinition",
1706
1298
  value: function provideDefinition(model, position, token) {
1707
1299
  var resource = model.uri;
@@ -1721,10 +1313,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1721
1313
 
1722
1314
  var ReferenceAdapter = /*#__PURE__*/function () {
1723
1315
  function ReferenceAdapter(_worker) {
1724
- _classCallCheck(this, ReferenceAdapter);
1316
+ _classCallCheck$1(this, ReferenceAdapter);
1725
1317
  this._worker = _worker;
1726
1318
  }
1727
- return _createClass(ReferenceAdapter, [{
1319
+ return _createClass$1(ReferenceAdapter, [{
1728
1320
  key: "provideReferences",
1729
1321
  value: function provideReferences(model, position, context, token) {
1730
1322
  var resource = model.uri;
@@ -1775,10 +1367,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1775
1367
  }
1776
1368
  var RenameAdapter = /*#__PURE__*/function () {
1777
1369
  function RenameAdapter(_worker) {
1778
- _classCallCheck(this, RenameAdapter);
1370
+ _classCallCheck$1(this, RenameAdapter);
1779
1371
  this._worker = _worker;
1780
1372
  }
1781
- return _createClass(RenameAdapter, [{
1373
+ return _createClass$1(RenameAdapter, [{
1782
1374
  key: "provideRenameEdits",
1783
1375
  value: function provideRenameEdits(model, position, newName, token) {
1784
1376
  var resource = model.uri;
@@ -1795,10 +1387,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1795
1387
 
1796
1388
  var DocumentFormatAdapter = /*#__PURE__*/function () {
1797
1389
  function DocumentFormatAdapter(_worker) {
1798
- _classCallCheck(this, DocumentFormatAdapter);
1390
+ _classCallCheck$1(this, DocumentFormatAdapter);
1799
1391
  this._worker = _worker;
1800
1392
  }
1801
- return _createClass(DocumentFormatAdapter, [{
1393
+ return _createClass$1(DocumentFormatAdapter, [{
1802
1394
  key: "provideDocumentFormattingEdits",
1803
1395
  value: function provideDocumentFormattingEdits(model, options, token) {
1804
1396
  var resource = model.uri;
@@ -1814,10 +1406,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1814
1406
  }();
1815
1407
  var FormatAdapter = /*#__PURE__*/function () {
1816
1408
  function FormatAdapter(_worker) {
1817
- _classCallCheck(this, FormatAdapter);
1409
+ _classCallCheck$1(this, FormatAdapter);
1818
1410
  this._worker = _worker;
1819
1411
  }
1820
- return _createClass(FormatAdapter, [{
1412
+ return _createClass$1(FormatAdapter, [{
1821
1413
  key: "provideDocumentRangeFormattingEdits",
1822
1414
  value: function provideDocumentRangeFormattingEdits(model, range, options, token) {
1823
1415
  var resource = model.uri;
@@ -1835,10 +1427,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1835
1427
  // --- Folding ---
1836
1428
  var FoldingAdapter = /*#__PURE__*/function () {
1837
1429
  function FoldingAdapter(_worker) {
1838
- _classCallCheck(this, FoldingAdapter);
1430
+ _classCallCheck$1(this, FoldingAdapter);
1839
1431
  this._worker = _worker;
1840
1432
  }
1841
- return _createClass(FoldingAdapter, [{
1433
+ return _createClass$1(FoldingAdapter, [{
1842
1434
  key: "provideFoldingRanges",
1843
1435
  value: function provideFoldingRanges(model, context, token) {
1844
1436
  var resource = model.uri;
@@ -1864,10 +1456,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1864
1456
 
1865
1457
  var HoverAdapter = /*#__PURE__*/function () {
1866
1458
  function HoverAdapter(_worker) {
1867
- _classCallCheck(this, HoverAdapter);
1459
+ _classCallCheck$1(this, HoverAdapter);
1868
1460
  this._worker = _worker;
1869
1461
  }
1870
- return _createClass(HoverAdapter, [{
1462
+ return _createClass$1(HoverAdapter, [{
1871
1463
  key: "provideHover",
1872
1464
  value: function provideHover(model, position, token) {
1873
1465
  var resource = model.uri;
@@ -1886,6 +1478,114 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1886
1478
  }]);
1887
1479
  }();
1888
1480
 
1481
+ function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
1482
+ function _regeneratorRuntime$1() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$1 = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof$1(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof$1(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
1483
+ function asyncGeneratorStep$1(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
1484
+ function _asyncToGenerator$1(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep$1(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep$1(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
1485
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
1486
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$1(o.key), o); } }
1487
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
1488
+ function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; }
1489
+ function _toPrimitive$1(t, r) { if ("object" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$1(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1490
+ var SemanticTokensProvider = /*#__PURE__*/function () {
1491
+ function SemanticTokensProvider(classificationsGetter) {
1492
+ _classCallCheck(this, SemanticTokensProvider);
1493
+ this.classificationsGetter = classificationsGetter;
1494
+ }
1495
+ return _createClass(SemanticTokensProvider, [{
1496
+ key: "getLegend",
1497
+ value: function getLegend() {
1498
+ return {
1499
+ tokenTypes: globals.tokenTypes,
1500
+ tokenModifiers: []
1501
+ };
1502
+ }
1503
+ }, {
1504
+ key: "provideDocumentSemanticTokens",
1505
+ value: function () {
1506
+ var _provideDocumentSemanticTokens = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee(model) {
1507
+ var resource, classifications, semanticTokens;
1508
+ return _regeneratorRuntime$1().wrap(function _callee$(_context) {
1509
+ while (1) switch (_context.prev = _context.next) {
1510
+ case 0:
1511
+ resource = model.uri;
1512
+ _context.next = 3;
1513
+ return this.classificationsGetter(resource);
1514
+ case 3:
1515
+ classifications = _context.sent;
1516
+ semanticTokens = classifications.map(function (classification, index) {
1517
+ var previousClassification = classifications[index - 1];
1518
+ return semanticTokenMaker(classification, previousClassification);
1519
+ });
1520
+ return _context.abrupt("return", {
1521
+ data: new Uint32Array(semanticTokens.flat()),
1522
+ resultId: model.getVersionId().toString()
1523
+ });
1524
+ case 6:
1525
+ case "end":
1526
+ return _context.stop();
1527
+ }
1528
+ }, _callee, this);
1529
+ }));
1530
+ function provideDocumentSemanticTokens(_x) {
1531
+ return _provideDocumentSemanticTokens.apply(this, arguments);
1532
+ }
1533
+ return provideDocumentSemanticTokens;
1534
+ }()
1535
+ }, {
1536
+ key: "releaseDocumentSemanticTokens",
1537
+ value: function releaseDocumentSemanticTokens() {}
1538
+ }]);
1539
+ }();
1540
+ var emptyClassification = {
1541
+ line: 0,
1542
+ character: 0,
1543
+ length: 0,
1544
+ kind: 0
1545
+ };
1546
+ function semanticTokenMaker(classification) {
1547
+ var previousClassification = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : emptyClassification;
1548
+ var line = classification.line,
1549
+ character = classification.character,
1550
+ length = classification.length,
1551
+ kind = classification.kind;
1552
+ var deltaLine = line - previousClassification.line;
1553
+ var deltaStart = deltaLine ? character : character - previousClassification.character;
1554
+ return [deltaLine, deltaStart, length, kind, 0];
1555
+ }
1556
+
1557
+ var queryOperators = ['as', 'consume', 'distinct', 'evaluate', 'extend', 'getschema', 'graph-match', 'graph-merge', 'graph-to-table', 'invoke', 'join', 'limit', 'lookup', 'make-graph', 'make-series', 'mv-apply', 'mv-expand', 'order', 'parse', 'parse-kv', 'parse-where', 'project', 'project-away', 'project-keep', 'project-rename', 'project-reorder', 'range', 'reduce', 'render', 'sample', 'sample-distinct', 'scan', 'serialize', 'sort', 'summarize', 'take', 'top', 'top-hitters', 'top-nested', 'union', 'where', 'filter', 'fork', 'facet', 'range', 'consume', 'find', 'search', 'print', 'partition', 'lookup'];
1558
+ var queryParameters = ['kind'];
1559
+ var types = ['bool', 'datetime', 'decimal', 'double', 'dynamic', 'guid', 'int', 'long', 'real', 'string', 'timespan'];
1560
+ var commands = ['.add', '.alter', '.alter-merge', '.append', '.as', '.assert', '.attach', '.consume', '.count', '.create', '.create-merge', '.create-or-alter', '.create-set', '.datatable', '.default', '.define', '.delete', '.detach', '.distinct', '.drop', '.drop-pretend', '.dup-next-failed-ingest', '.dup-next-ingest', '.evaluate', '.export', '.extend', '.externaldata', '.filter', '.find', '.fork', '.getschema', '.ingest', '.join', '.limit', '.load', '.make-series', '.materialize', '.move', '.mv-expand', '.order', '.parse', '.parse-where', '.partition', '.pivot', '.print', '.project', '.project-away', '.project-keep', '.project-rename', '.reduce', '.remove', '.rename', '.replace', '.restrict', '.run', '.sample', '.sample-distinct', '.save', '.search', '.serialize', '.set', '.set-or-append', '.set-or-replace', '.show', '.sort', '.summarize', '.take', '.top', '.top-hitters', '.top-nested', '.union'];
1561
+ var functions = ['abs', 'acos', 'ago', 'array_concat', 'array_length', 'array_slice', 'array_split', 'asin', 'atan', 'atan2', 'avg', 'bag_keys', 'base64_decodestring', 'base64_encodestring', 'bin', 'bin_at', 'binary_and', 'binary_not', 'binary_or', 'binary_shift_left', 'binary_shift_right', 'binary_xor', 'case', 'ceiling', 'coalesce', 'columnifexists', 'cos', 'count', 'countof', 'cot', 'cursor_after', 'datatable', 'datepart', 'datetime_add', 'datetime_diff', 'datetime_part', 'dayofmonth', 'dayofweek', 'dayofyear', 'dcount', 'dcount_hll', 'degrees', 'endofday', 'endofmonth', 'endofweek', 'endofyear', 'exp', 'exp10', 'exp2', 'extract', 'extractall', 'extractjson', 'format_datetime', 'format_timespan', 'floor', 'gamma', 'geo_distance_2points', 'geo_geohash_to_central_point', 'geo_point_in_circle', 'geo_point_in_polygon', 'geo_point_to_geohash', 'getmonth', 'gettype', 'getyear', 'hash', 'hash_sha256', 'hll_merge', 'iif', 'indexof', 'isempty', 'isfinite', 'isinf', 'isascii', 'isnan', 'isnotempty', 'isnotnull', 'isnull', 'isutf8', 'log', 'log10', 'log2', 'loggamma', 'make_datetime', 'make_string', 'make_timespan', 'materialize', 'max', 'max_of', 'min', 'min_of', 'monthofyear', 'next', 'not', 'pack', 'pack_array', 'pack_dictionary', 'parse_csv', 'parse_ipv4', 'parse_json', 'parse_path', 'parse_url', 'parse_urlquery', 'parse_user_agent', 'parse_version', 'parse_xml', 'parsejson', 'percentrank_tdigest', 'percentile_tdigest', 'pow', 'prev', 'radians', 'rand', 'rank_tdigest', 'repeat', 'replace', 'reverse', 'round', 'row_cumsum', 'row_window_session', 'series_add', 'series_decompose', 'series_decompose_anomalies', 'series_decompose_forecast', 'series_divide', 'series_equals', 'series_fill_backward', 'series_fill_const', 'series_fill_forward', 'series_fill_linear', 'series_fir', 'series_fit_2lines', 'series_fit_2lines_dynamic', 'series_fit_line', 'series_fit_line_dynamic', 'series_greater', 'series_greater_equals', 'series_iir', 'series_less', 'series_less_equals', 'series_multiply', 'series_not_equals', 'series_outliers', 'series_pearson_correlation', 'series_periods_detect', 'series_periods_validate', 'series_seasonal', 'series_stats', 'series_stats_dynamic', 'series_subtract', 'sign', 'sin', 'split', 'sqrt', 'startofday', 'startofmonth', 'startofweek', 'startofyear', 'strcat', 'strcat_array', 'strcat_delim', 'strcmp', 'strlen', 'strrep', 'string_size', 'substring', 'sum', 'tan', 'tdigest_merge', 'tobool', 'toboolean', 'todecimal', 'todouble', 'todynamic', 'tofloat', 'toguid', 'tohex', 'toint', 'tolong', 'tolower', 'toobject', 'toreal', 'toscalar', 'tostring', 'totimespan', 'toupper', 'translate', 'trim', 'trim_end', 'trim_start', 'typeof', 'url_decode', 'url_encode', 'week_of_year', 'welch_test'];
1562
+ var keywords = ['and', 'as', 'asc', 'between', 'by', 'contains', 'count', 'desc', 'extend', 'false', 'filter', 'find', 'from', 'has', 'in', 'inner', 'join', 'leftouter', 'let', 'not', 'on', 'or', 'policy', 'project', 'project-away', 'project-rename', 'project-reorder', 'project-keep', 'range', 'rename', 'retention', 'summarize', 'table', 'take', 'to', 'true', 'where', 'with'];
1563
+ var kustoLanguageDefinition = {
1564
+ name: globals.LANGUAGE_ID,
1565
+ mimeTypes: ['text/kusto'],
1566
+ displayName: 'Kusto',
1567
+ defaultToken: 'invalid',
1568
+ queryOperators: queryOperators,
1569
+ queryParameters: queryParameters,
1570
+ types: types,
1571
+ commands: commands,
1572
+ functions: functions,
1573
+ keywords: keywords,
1574
+ tokenizer: {
1575
+ root: [[/(\/\/.*$)/, globals.Token.Comment], [/[\(\)\{\}\|\[\]\:\=\,\<|\.\..]/, globals.Token.Punctuation], [/[\+\-\*\/\%\!\<\<=\>\>=\=\==\!=\<>\:\;\,\=~\@\?\=>\!~]/, globals.Token.MathOperator], [/"([^"\\]*(\\.[^"\\]*)*)"/, globals.Token.StringLiteral], [/'([^"\\]*(\\.[^"\\]*)*)'/, globals.Token.StringLiteral], [/[\w@#\-$\.]+/, {
1576
+ cases: {
1577
+ '@queryOperators': globals.Token.QueryOperator,
1578
+ '@queryParameters': globals.Token.QueryParameter,
1579
+ '@types': globals.Token.Type,
1580
+ '@commands': globals.Token.Command,
1581
+ '@functions': globals.Token.Function,
1582
+ '@keywords': globals.Token.Keyword,
1583
+ '@default': 'identifier'
1584
+ }
1585
+ }]]
1586
+ }
1587
+ };
1588
+
1889
1589
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1890
1590
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1891
1591
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -1915,7 +1615,6 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1915
1615
  var onSchemaChange = new monaco__namespace.Emitter();
1916
1616
  // TODO: when should we dispose of these? seems like monaco-css and monaco-typescript don't dispose of these.
1917
1617
  var disposables = [];
1918
- var monarchTokensProvider;
1919
1618
  var client = new WorkerManager(monacoInstance, defaults);
1920
1619
  disposables.push(client);
1921
1620
  var workerAccessor = function workerAccessor(first) {
@@ -1974,39 +1673,22 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1974
1673
  });
1975
1674
  });
1976
1675
  };
1977
- var language = 'kusto';
1978
- disposables.push(monacoInstance.languages.registerCompletionItemProvider(language, new CompletionAdapter(workerAccessor, defaults.languageSettings)));
1979
-
1980
- // Monaco tokenization runs in main thread so we're using a quick schema-unaware tokenization.
1981
- // a web worker will run semantic colorization in the background (ColorizationAdapter).
1982
- if (defaults.languageSettings.useTokenColorization) {
1983
- monarchTokensProvider = monacoInstance.languages.setMonarchTokensProvider(language, KustoLanguageDefinition);
1984
- }
1985
-
1986
- // listen to configuration changes and if we're switching from semantic to monarch colorization, do the switch.
1987
- defaults.onDidChange(function (e) {
1988
- if (!e.languageSettings.useTokenColorization && monarchTokensProvider !== undefined) {
1989
- monarchTokensProvider.dispose();
1990
- monarchTokensProvider = undefined;
1991
- }
1992
- if (e.languageSettings.useTokenColorization && monarchTokensProvider == undefined) {
1993
- monarchTokensProvider = monacoInstance.languages.setMonarchTokensProvider(language, KustoLanguageDefinition);
1994
- }
1995
- });
1996
- disposables.push(new DiagnosticsAdapter(monacoInstance, language, workerAccessor, defaults, onSchemaChange.event));
1997
- disposables.push(new ColorizationAdapter(monacoInstance, language, workerAccessor, defaults, onSchemaChange.event));
1998
- disposables.push(monacoInstance.languages.registerDocumentRangeFormattingEditProvider(language, new FormatAdapter(workerAccessor)));
1999
- disposables.push(monacoInstance.languages.registerFoldingRangeProvider(language, new FoldingAdapter(workerAccessor)));
2000
- disposables.push(monacoInstance.languages.registerDefinitionProvider(language, new DefinitionAdapter(workerAccessor)));
2001
- disposables.push(monacoInstance.languages.registerRenameProvider(language, new RenameAdapter(workerAccessor)));
2002
- disposables.push(monacoInstance.languages.registerReferenceProvider(language, new ReferenceAdapter(workerAccessor)));
1676
+ disposables.push(monacoInstance.languages.registerCompletionItemProvider(globals.LANGUAGE_ID, new CompletionAdapter(workerAccessor, defaults.languageSettings)));
1677
+ setMonarchTokensProvider(monacoInstance, disposables);
1678
+ registerDocumentSemanticTokensProvider(workerAccessor, monacoInstance);
1679
+ disposables.push(new DiagnosticsAdapter(monacoInstance, globals.LANGUAGE_ID, workerAccessor, defaults, onSchemaChange.event));
1680
+ disposables.push(monacoInstance.languages.registerDocumentRangeFormattingEditProvider(globals.LANGUAGE_ID, new FormatAdapter(workerAccessor)));
1681
+ disposables.push(monacoInstance.languages.registerFoldingRangeProvider(globals.LANGUAGE_ID, new FoldingAdapter(workerAccessor)));
1682
+ disposables.push(monacoInstance.languages.registerDefinitionProvider(globals.LANGUAGE_ID, new DefinitionAdapter(workerAccessor)));
1683
+ disposables.push(monacoInstance.languages.registerRenameProvider(globals.LANGUAGE_ID, new RenameAdapter(workerAccessor)));
1684
+ disposables.push(monacoInstance.languages.registerReferenceProvider(globals.LANGUAGE_ID, new ReferenceAdapter(workerAccessor)));
2003
1685
  if (defaults.languageSettings.enableHover) {
2004
- disposables.push(monacoInstance.languages.registerHoverProvider(language, new HoverAdapter(workerAccessor)));
1686
+ disposables.push(monacoInstance.languages.registerHoverProvider(globals.LANGUAGE_ID, new HoverAdapter(workerAccessor)));
2005
1687
  }
2006
- monacoInstance.languages.registerDocumentFormattingEditProvider(language, new DocumentFormatAdapter(workerAccessor));
1688
+ monacoInstance.languages.registerDocumentFormattingEditProvider(globals.LANGUAGE_ID, new DocumentFormatAdapter(workerAccessor));
2007
1689
  kustoWorker = workerAccessor;
2008
1690
  resolveWorker(workerAccessor);
2009
- monacoInstance.languages.setLanguageConfiguration(language, {
1691
+ monacoInstance.languages.setLanguageConfiguration(globals.LANGUAGE_ID, {
2010
1692
  folding: {
2011
1693
  offSide: false,
2012
1694
  markers: {
@@ -2045,6 +1727,41 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
2045
1727
  });
2046
1728
  }
2047
1729
 
1730
+ // This function sets the Monarch token provider,
1731
+ // enabling fast syntax highlighting before the language service is called for semantic coloring.
1732
+ function setMonarchTokensProvider(monacoInstance, disposables) {
1733
+ var monarchTokensProvider = monacoInstance.languages.setMonarchTokensProvider(globals.LANGUAGE_ID, kustoLanguageDefinition);
1734
+ disposables.push(monarchTokensProvider);
1735
+ }
1736
+
1737
+ // This function registers a semantic token provider that utilizes the language service
1738
+ // for more context-relevant syntax highlighting.
1739
+ function registerDocumentSemanticTokensProvider(workerAccessor, monacoInstance) {
1740
+ var classificationsGetter = /*#__PURE__*/function () {
1741
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resource) {
1742
+ var worker;
1743
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1744
+ while (1) switch (_context3.prev = _context3.next) {
1745
+ case 0:
1746
+ _context3.next = 2;
1747
+ return workerAccessor(resource);
1748
+ case 2:
1749
+ worker = _context3.sent;
1750
+ return _context3.abrupt("return", worker.getClassifications(resource.toString()));
1751
+ case 4:
1752
+ case "end":
1753
+ return _context3.stop();
1754
+ }
1755
+ }, _callee3);
1756
+ }));
1757
+ return function classificationsGetter(_x3) {
1758
+ return _ref2.apply(this, arguments);
1759
+ };
1760
+ }();
1761
+ var semanticTokenProvider = new SemanticTokensProvider(classificationsGetter);
1762
+ monacoInstance.languages.registerDocumentSemanticTokensProvider(globals.LANGUAGE_ID, semanticTokenProvider);
1763
+ }
1764
+
2048
1765
  exports.getKustoWorker = getKustoWorker;
2049
1766
  exports.setupMode = setupMode;
2050
1767