@skaldapp/monaco-sfc 1.1.41 → 1.1.43

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 (2) hide show
  1. package/dist/vue.worker.js +1391 -119
  2. package/package.json +6 -6
@@ -10230,6 +10230,11 @@ var init_shared_esm_bundler = __esmMin((() => {
10230
10230
  }));
10231
10231
  //#endregion
10232
10232
  //#region node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js
10233
+ /**
10234
+ * @vue/compiler-core v3.5.34
10235
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
10236
+ * @license MIT
10237
+ **/
10233
10238
  function registerRuntimeHelpers(helpers) {
10234
10239
  Object.getOwnPropertySymbols(helpers).forEach((s) => {
10235
10240
  helperNameMap[s] = helpers[s];
@@ -14531,6 +14536,11 @@ var compiler_dom_esm_bundler_exports = /* @__PURE__ */ __exportAll({
14531
14536
  walkIdentifiers: () => walkIdentifiers,
14532
14537
  warnDeprecation: () => warnDeprecation
14533
14538
  });
14539
+ /**
14540
+ * @vue/compiler-dom v3.5.34
14541
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
14542
+ * @license MIT
14543
+ **/
14534
14544
  function decodeHtmlBrowser(raw, asAttr = false) {
14535
14545
  if (!decoder) decoder = document.createElement("div");
14536
14546
  if (asAttr) {
@@ -15382,7 +15392,7 @@ var require_stringLiteralKey = /* @__PURE__ */ __commonJSMin(((exports) => {
15382
15392
  }));
15383
15393
  //#endregion
15384
15394
  //#region node_modules/@vue/language-core/lib/utils/shared.js
15385
- var require_shared$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
15395
+ var require_shared$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
15386
15396
  Object.defineProperty(exports, "__esModule", { value: true });
15387
15397
  exports.hyphenateTag = void 0;
15388
15398
  exports.hyphenateAttr = hyphenateAttr;
@@ -15435,7 +15445,7 @@ var require_collectBindings = /* @__PURE__ */ __commonJSMin(((exports) => {
15435
15445
  exports.collectBindingNames = collectBindingNames;
15436
15446
  exports.collectBindingRanges = collectBindingRanges;
15437
15447
  exports.collectBindingIdentifiers = collectBindingIdentifiers;
15438
- var shared_1 = require_shared$2();
15448
+ var shared_1 = require_shared$3();
15439
15449
  function collectBindingNames(ts, node, ast) {
15440
15450
  return collectBindingIdentifiers(ts, node).map(({ id }) => (0, shared_1.getNodeText)(ts, id, ast));
15441
15451
  }
@@ -15461,7 +15471,7 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15461
15471
  exports.generateInterpolation = generateInterpolation;
15462
15472
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
15463
15473
  var collectBindings_1 = require_collectBindings();
15464
- var shared_2 = require_shared$2();
15474
+ var shared_2 = require_shared$3();
15465
15475
  var codeFeatures_1 = require_codeFeatures();
15466
15476
  var names_1 = require_names();
15467
15477
  var utils_1 = require_utils$4();
@@ -18082,7 +18092,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18082
18092
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
18083
18093
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
18084
18094
  var picomatch_1 = require_picomatch();
18085
- var shared_2 = require_shared$2();
18095
+ var shared_2 = require_shared$3();
18086
18096
  var codeFeatures_1 = require_codeFeatures();
18087
18097
  var inlayHints_1 = require_inlayHints();
18088
18098
  var names_1 = require_names();
@@ -18664,7 +18674,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18664
18674
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
18665
18675
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
18666
18676
  var muggle_string_1 = require_out$1();
18667
- var shared_2 = require_shared$2();
18677
+ var shared_2 = require_shared$3();
18668
18678
  var codeFeatures_1 = require_codeFeatures();
18669
18679
  var inlayHints_1 = require_inlayHints();
18670
18680
  var names_1 = require_names();
@@ -18965,7 +18975,7 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
18965
18975
  Object.defineProperty(exports, "__esModule", { value: true });
18966
18976
  exports.generateSlotOutlet = generateSlotOutlet;
18967
18977
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
18968
- var shared_1 = require_shared$2();
18978
+ var shared_1 = require_shared$3();
18969
18979
  var codeFeatures_1 = require_codeFeatures();
18970
18980
  var inlayHints_1 = require_inlayHints();
18971
18981
  var names_1 = require_names();
@@ -19278,7 +19288,7 @@ var require_templateChild = /* @__PURE__ */ __commonJSMin(((exports) => {
19278
19288
  exports.generateTemplateChild = generateTemplateChild;
19279
19289
  exports.parseInterpolationNode = parseInterpolationNode;
19280
19290
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
19281
- var shared_1 = require_shared$2();
19291
+ var shared_1 = require_shared$3();
19282
19292
  var codeFeatures_1 = require_codeFeatures();
19283
19293
  var utils_1 = require_utils$4();
19284
19294
  var element_1 = require_element();
@@ -19454,7 +19464,7 @@ var require_compilerOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
19454
19464
  exports.getDefaultCompilerOptions = getDefaultCompilerOptions;
19455
19465
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
19456
19466
  var path_browserify_1 = require_path_browserify();
19457
- var shared_2 = require_shared$2();
19467
+ var shared_2 = require_shared$3();
19458
19468
  function createParsedCommandLineByJson(ts, host, rootDir, json, configFileName) {
19459
19469
  const extendedPaths = /* @__PURE__ */ new Set();
19460
19470
  const proxyHost = {
@@ -19828,7 +19838,7 @@ var require_parseSfc = /* @__PURE__ */ __commonJSMin(((exports) => {
19828
19838
  Object.defineProperty(exports, "__esModule", { value: true });
19829
19839
  exports.parse = parse;
19830
19840
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
19831
- var shared_1 = require_shared$2();
19841
+ var shared_1 = require_shared$3();
19832
19842
  function parse(source) {
19833
19843
  const errors = [];
19834
19844
  const ast = CompilerDOM.parse(source, {
@@ -20087,7 +20097,7 @@ var require_file_vue = /* @__PURE__ */ __commonJSMin(((exports) => {
20087
20097
  }));
20088
20098
  //#endregion
20089
20099
  //#region node_modules/@vue/language-core/lib/plugins/shared.js
20090
- var require_shared$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
20100
+ var require_shared$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
20091
20101
  Object.defineProperty(exports, "__esModule", { value: true });
20092
20102
  exports.allCodeFeatures = void 0;
20093
20103
  exports.allCodeFeatures = {
@@ -20104,7 +20114,7 @@ var require_shared$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
20104
20114
  var require_vue_root_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
20105
20115
  Object.defineProperty(exports, "__esModule", { value: true });
20106
20116
  var muggle_string_1 = require_out$1();
20107
- var shared_1 = require_shared$1();
20117
+ var shared_1 = require_shared$2();
20108
20118
  var plugin = () => {
20109
20119
  return {
20110
20120
  version: 2.2,
@@ -20162,7 +20172,7 @@ var require_vue_script_js = /* @__PURE__ */ __commonJSMin(((exports) => {
20162
20172
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-customblocks.js
20163
20173
  var require_vue_sfc_customblocks = /* @__PURE__ */ __commonJSMin(((exports) => {
20164
20174
  Object.defineProperty(exports, "__esModule", { value: true });
20165
- var shared_1 = require_shared$1();
20175
+ var shared_1 = require_shared$2();
20166
20176
  var plugin = () => {
20167
20177
  return {
20168
20178
  version: 2.2,
@@ -20227,7 +20237,7 @@ var require_vue_sfc_scripts = /* @__PURE__ */ __commonJSMin(((exports) => {
20227
20237
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-styles.js
20228
20238
  var require_vue_sfc_styles = /* @__PURE__ */ __commonJSMin(((exports) => {
20229
20239
  Object.defineProperty(exports, "__esModule", { value: true });
20230
- var shared_1 = require_shared$1();
20240
+ var shared_1 = require_shared$2();
20231
20241
  var plugin = () => {
20232
20242
  return {
20233
20243
  version: 2.2,
@@ -20276,7 +20286,7 @@ var require_vue_sfc_styles = /* @__PURE__ */ __commonJSMin(((exports) => {
20276
20286
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-template.js
20277
20287
  var require_vue_sfc_template = /* @__PURE__ */ __commonJSMin(((exports) => {
20278
20288
  Object.defineProperty(exports, "__esModule", { value: true });
20279
- var shared_1 = require_shared$1();
20289
+ var shared_1 = require_shared$2();
20280
20290
  var plugin = () => {
20281
20291
  return {
20282
20292
  version: 2.2,
@@ -20605,9 +20615,9 @@ var require_vue_template_inline_css = /* @__PURE__ */ __commonJSMin(((exports) =
20605
20615
  Object.defineProperty(exports, "__esModule", { value: true });
20606
20616
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
20607
20617
  var forEachTemplateNode_1 = require_forEachTemplateNode();
20608
- var shared_1 = require_shared$2();
20618
+ var shared_1 = require_shared$3();
20609
20619
  var codeFeatures = {
20610
- ...require_shared$1().allCodeFeatures,
20620
+ ...require_shared$2().allCodeFeatures,
20611
20621
  format: false,
20612
20622
  structure: false
20613
20623
  };
@@ -20861,11 +20871,7 @@ var require_system = /* @__PURE__ */ __commonJSMin(((exports) => {
20861
20871
  else dep.subs = newLink;
20862
20872
  }
20863
20873
  function unlink(link, sub = link.sub) {
20864
- const dep = link.dep;
20865
- const prevDep = link.prevDep;
20866
- const nextDep = link.nextDep;
20867
- const nextSub = link.nextSub;
20868
- const prevSub = link.prevSub;
20874
+ const { dep, prevDep, nextDep, nextSub, prevSub } = link;
20869
20875
  if (nextDep !== void 0) nextDep.prevDep = prevDep;
20870
20876
  else sub.depsTail = prevDep;
20871
20877
  if (prevDep !== void 0) prevDep.nextDep = nextDep;
@@ -20876,14 +20882,16 @@ var require_system = /* @__PURE__ */ __commonJSMin(((exports) => {
20876
20882
  else if ((dep.subs = nextSub) === void 0) unwatched(dep);
20877
20883
  return nextDep;
20878
20884
  }
20879
- function propagate(link) {
20885
+ function propagate(link, innerWrite) {
20880
20886
  let next = link.nextSub;
20881
20887
  let stack;
20882
20888
  top: do {
20883
20889
  const sub = link.sub;
20884
20890
  let flags = sub.flags;
20885
- if (!(flags & 60)) sub.flags = flags | 32;
20886
- else if (!(flags & 12)) flags = 0;
20891
+ if (!(flags & 60)) {
20892
+ sub.flags = flags | 32;
20893
+ if (innerWrite) sub.flags |= 8;
20894
+ } else if (!(flags & 12)) flags = 0;
20887
20895
  else if (!(flags & 4)) sub.flags = flags & -9 | 32;
20888
20896
  else if (!(flags & 48) && isValidLink(link, sub)) {
20889
20897
  sub.flags = flags | 40;
@@ -20928,13 +20936,13 @@ var require_system = /* @__PURE__ */ __commonJSMin(((exports) => {
20928
20936
  const flags = dep.flags;
20929
20937
  if (sub.flags & 16) dirty = true;
20930
20938
  else if ((flags & 17) === 17) {
20939
+ const subs = dep.subs;
20931
20940
  if (update(dep)) {
20932
- const subs = dep.subs;
20933
20941
  if (subs.nextSub !== void 0) shallowPropagate(subs);
20934
20942
  dirty = true;
20935
20943
  }
20936
20944
  } else if ((flags & 33) === 33) {
20937
- if (link.nextSub !== void 0 || link.prevSub !== void 0) stack = {
20945
+ stack = {
20938
20946
  value: link,
20939
20947
  prev: stack
20940
20948
  };
@@ -20951,15 +20959,12 @@ var require_system = /* @__PURE__ */ __commonJSMin(((exports) => {
20951
20959
  }
20952
20960
  }
20953
20961
  while (checkDepth--) {
20954
- const firstSub = sub.subs;
20955
- const hasMultipleSubs = firstSub.nextSub !== void 0;
20956
- if (hasMultipleSubs) {
20957
- link = stack.value;
20958
- stack = stack.prev;
20959
- } else link = firstSub;
20962
+ link = stack.value;
20963
+ stack = stack.prev;
20960
20964
  if (dirty) {
20965
+ const subs = sub.subs;
20961
20966
  if (update(sub)) {
20962
- if (hasMultipleSubs) shallowPropagate(firstSub);
20967
+ if (subs.nextSub !== void 0) shallowPropagate(subs);
20963
20968
  sub = link.sub;
20964
20969
  continue;
20965
20970
  }
@@ -20972,7 +20977,7 @@ var require_system = /* @__PURE__ */ __commonJSMin(((exports) => {
20972
20977
  continue top;
20973
20978
  }
20974
20979
  }
20975
- return dirty;
20980
+ return dirty && !!sub.flags;
20976
20981
  } while (true);
20977
20982
  }
20978
20983
  function shallowPropagate(link) {
@@ -21015,6 +21020,7 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21015
21020
  exports.trigger = trigger;
21016
21021
  var system_js_1 = require_system();
21017
21022
  var cycle = 0;
21023
+ var runDepth = 0;
21018
21024
  var batchDepth = 0;
21019
21025
  var notifyIndex = 0;
21020
21026
  var queuedLength = 0;
@@ -21022,8 +21028,10 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21022
21028
  var queued = [];
21023
21029
  var { link, unlink, propagate, checkDirty, shallowPropagate } = (0, system_js_1.createReactiveSystem)({
21024
21030
  update(node) {
21025
- if (node.depsTail !== void 0) return updateComputed(node);
21026
- else return updateSignal(node);
21031
+ if ("getter" in node) return updateComputed(node);
21032
+ if ("currentValue" in node) return updateSignal(node);
21033
+ node.flags = 1;
21034
+ return true;
21027
21035
  },
21028
21036
  notify(effect) {
21029
21037
  let insertIndex = queuedLength;
@@ -21102,6 +21110,7 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21102
21110
  function effect(fn) {
21103
21111
  const e = {
21104
21112
  fn,
21113
+ cleanup: void 0,
21105
21114
  subs: void 0,
21106
21115
  subsTail: void 0,
21107
21116
  deps: void 0,
@@ -21111,8 +21120,10 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21111
21120
  const prevSub = setActiveSub(e);
21112
21121
  if (prevSub !== void 0) link(e, prevSub, 0);
21113
21122
  try {
21114
- e.fn();
21123
+ ++runDepth;
21124
+ e.cleanup = e.fn();
21115
21125
  } finally {
21126
+ --runDepth;
21116
21127
  activeSub = prevSub;
21117
21128
  e.flags &= -5;
21118
21129
  }
@@ -21124,7 +21135,7 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21124
21135
  depsTail: void 0,
21125
21136
  subs: void 0,
21126
21137
  subsTail: void 0,
21127
- flags: 0
21138
+ flags: 1
21128
21139
  };
21129
21140
  const prevSub = setActiveSub(e);
21130
21141
  if (prevSub !== void 0) link(e, prevSub, 0);
@@ -21146,14 +21157,14 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21146
21157
  fn();
21147
21158
  } finally {
21148
21159
  activeSub = prevSub;
21160
+ sub.flags = 0;
21149
21161
  let link = sub.deps;
21150
21162
  while (link !== void 0) {
21151
21163
  const dep = link.dep;
21152
21164
  link = unlink(link, sub);
21153
21165
  const subs = dep.subs;
21154
21166
  if (subs !== void 0) {
21155
- sub.flags = 0;
21156
- propagate(subs);
21167
+ propagate(subs, !!runDepth);
21157
21168
  shallowPropagate(subs);
21158
21169
  }
21159
21170
  }
@@ -21161,14 +21172,16 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21161
21172
  }
21162
21173
  }
21163
21174
  function updateComputed(c) {
21164
- ++cycle;
21165
21175
  c.depsTail = void 0;
21166
21176
  c.flags = 5;
21167
21177
  const prevSub = setActiveSub(c);
21168
21178
  try {
21179
+ ++cycle;
21180
+ ++runDepth;
21169
21181
  const oldValue = c.value;
21170
21182
  return oldValue !== (c.value = c.getter(oldValue));
21171
21183
  } finally {
21184
+ --runDepth;
21172
21185
  activeSub = prevSub;
21173
21186
  c.flags &= -5;
21174
21187
  purgeDeps(c);
@@ -21181,18 +21194,24 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21181
21194
  function run(e) {
21182
21195
  const flags = e.flags;
21183
21196
  if (flags & 16 || flags & 32 && checkDirty(e.deps, e)) {
21184
- ++cycle;
21197
+ if (e.cleanup) {
21198
+ runCleanup(e);
21199
+ if (!e.flags) return;
21200
+ }
21185
21201
  e.depsTail = void 0;
21186
21202
  e.flags = 6;
21187
21203
  const prevSub = setActiveSub(e);
21188
21204
  try {
21189
- e.fn();
21205
+ ++cycle;
21206
+ ++runDepth;
21207
+ e.cleanup = e.fn();
21190
21208
  } finally {
21209
+ --runDepth;
21191
21210
  activeSub = prevSub;
21192
21211
  e.flags &= -5;
21193
21212
  purgeDeps(e);
21194
21213
  }
21195
- } else e.flags = 2;
21214
+ } else if (e.flags) e.flags = 2;
21196
21215
  }
21197
21216
  function flush() {
21198
21217
  try {
@@ -21222,8 +21241,10 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21222
21241
  this.flags = 5;
21223
21242
  const prevSub = setActiveSub(this);
21224
21243
  try {
21244
+ ++runDepth;
21225
21245
  this.value = this.getter();
21226
21246
  } finally {
21247
+ --runDepth;
21227
21248
  activeSub = prevSub;
21228
21249
  this.flags &= -5;
21229
21250
  }
@@ -21238,7 +21259,7 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21238
21259
  this.flags = 17;
21239
21260
  const subs = this.subs;
21240
21261
  if (subs !== void 0) {
21241
- propagate(subs);
21262
+ propagate(subs, !!runDepth);
21242
21263
  if (!batchDepth) flush();
21243
21264
  }
21244
21265
  }
@@ -21249,18 +21270,24 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
21249
21270
  if (subs !== void 0) shallowPropagate(subs);
21250
21271
  }
21251
21272
  }
21252
- let sub = activeSub;
21253
- while (sub !== void 0) {
21254
- if (sub.flags & 3) {
21255
- link(this, sub, cycle);
21256
- break;
21257
- }
21258
- sub = sub.subs?.sub;
21259
- }
21273
+ const sub = activeSub;
21274
+ if (sub !== void 0) link(this, sub, cycle);
21260
21275
  return this.currentValue;
21261
21276
  }
21262
21277
  }
21278
+ function runCleanup(e) {
21279
+ const cleanup = e.cleanup;
21280
+ e.cleanup = void 0;
21281
+ const prevSub = activeSub;
21282
+ activeSub = void 0;
21283
+ try {
21284
+ cleanup();
21285
+ } finally {
21286
+ activeSub = prevSub;
21287
+ }
21288
+ }
21263
21289
  function effectOper() {
21290
+ if (this.cleanup) runCleanup(this);
21264
21291
  effectScopeOper.call(this);
21265
21292
  }
21266
21293
  function effectScopeOper() {
@@ -22246,7 +22273,7 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
22246
22273
  exports.parseBindingRanges = parseBindingRanges;
22247
22274
  exports.getClosestMultiLineCommentRange = getClosestMultiLineCommentRange;
22248
22275
  var collectBindings_1 = require_collectBindings();
22249
- var shared_1 = require_shared$2();
22276
+ var shared_1 = require_shared$3();
22250
22277
  function parseBindingRanges(ts, ast, componentExtsensions) {
22251
22278
  const bindings = [];
22252
22279
  const components = [];
@@ -22305,7 +22332,7 @@ var require_scriptRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22305
22332
  Object.defineProperty(exports, "__esModule", { value: true });
22306
22333
  exports.parseScriptRanges = parseScriptRanges;
22307
22334
  exports.parseOptionsFromExtression = parseOptionsFromExtression;
22308
- var shared_1 = require_shared$2();
22335
+ var shared_1 = require_shared$3();
22309
22336
  var utils_1 = require_utils$2();
22310
22337
  function parseScriptRanges(ts, sourceFile, vueCompilerOptions) {
22311
22338
  let exportDefault;
@@ -22380,7 +22407,7 @@ var require_scriptSetupRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22380
22407
  Object.defineProperty(exports, "__esModule", { value: true });
22381
22408
  exports.parseScriptSetupRanges = parseScriptSetupRanges;
22382
22409
  var collectBindings_1 = require_collectBindings();
22383
- var shared_1 = require_shared$2();
22410
+ var shared_1 = require_shared$3();
22384
22411
  var utils_1 = require_utils$2();
22385
22412
  var tsCheckReg = /^\/\/\s*@ts-(?:no)?check(?:$|\s)/;
22386
22413
  function parseScriptSetupRanges(ts, sourceFile, vueCompilerOptions) {
@@ -22912,7 +22939,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports) => {
22912
22939
  var vue_template_inline_ts_1 = __importDefault(require_vue_template_inline_ts());
22913
22940
  var vue_tsx_1 = __importDefault(require_vue_tsx());
22914
22941
  var types_1 = require_types();
22915
- __exportStar(require_shared$1(), exports);
22942
+ __exportStar(require_shared$2(), exports);
22916
22943
  function createPlugins(pluginContext) {
22917
22944
  return [
22918
22945
  file_vue_1.default,
@@ -23902,7 +23929,7 @@ var require_language_core = /* @__PURE__ */ __commonJSMin(((exports) => {
23902
23929
  __exportStar(require_collectBindings(), exports);
23903
23930
  __exportStar(require_forEachTemplateNode(), exports);
23904
23931
  __exportStar(require_parseSfc(), exports);
23905
- __exportStar(require_shared$2(), exports);
23932
+ __exportStar(require_shared$3(), exports);
23906
23933
  __exportStar(require_virtualCode(), exports);
23907
23934
  var names_1 = require_names();
23908
23935
  Object.defineProperty(exports, "names", {
@@ -31694,8 +31721,8 @@ var require_main$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
31694
31721
  }));
31695
31722
  }));
31696
31723
  //#endregion
31697
- //#region node_modules/volar-service-typescript/lib/shared.js
31698
- var require_shared = /* @__PURE__ */ __commonJSMin(((exports) => {
31724
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/shared.js
31725
+ var require_shared$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
31699
31726
  Object.defineProperty(exports, "__esModule", { value: true });
31700
31727
  exports.getConfigTitle = getConfigTitle;
31701
31728
  exports.isTsDocument = isTsDocument;
@@ -32298,6 +32325,39 @@ var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32298
32325
  module.exports = coerce;
32299
32326
  }));
32300
32327
  //#endregion
32328
+ //#region node_modules/semver/functions/truncate.js
32329
+ var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32330
+ var parse = require_parse();
32331
+ var constants = require_constants();
32332
+ var SemVer = require_semver$1();
32333
+ var truncate = (version, truncation, options) => {
32334
+ if (!constants.RELEASE_TYPES.includes(truncation)) return null;
32335
+ const clonedVersion = cloneInputVersion(version, options);
32336
+ return clonedVersion && doTruncation(clonedVersion, truncation);
32337
+ };
32338
+ var cloneInputVersion = (version, options) => {
32339
+ return parse(version instanceof SemVer ? version.version : version, options);
32340
+ };
32341
+ var doTruncation = (version, truncation) => {
32342
+ if (isPrerelease(truncation)) return version.version;
32343
+ version.prerelease = [];
32344
+ switch (truncation) {
32345
+ case "major":
32346
+ version.minor = 0;
32347
+ version.patch = 0;
32348
+ break;
32349
+ case "minor":
32350
+ version.patch = 0;
32351
+ break;
32352
+ }
32353
+ return version.format();
32354
+ };
32355
+ var isPrerelease = (type) => {
32356
+ return type.startsWith("pre");
32357
+ };
32358
+ module.exports = truncate;
32359
+ }));
32360
+ //#endregion
32301
32361
  //#region node_modules/semver/internal/lrucache.js
32302
32362
  var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32303
32363
  var LRUCache = class {
@@ -33032,6 +33092,7 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
33032
33092
  lte: require_lte(),
33033
33093
  cmp: require_cmp(),
33034
33094
  coerce: require_coerce(),
33095
+ truncate: require_truncate(),
33035
33096
  Comparator: require_comparator(),
33036
33097
  Range: require_range(),
33037
33098
  satisfies: require_satisfies(),
@@ -33057,8 +33118,8 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
33057
33118
  };
33058
33119
  }));
33059
33120
  //#endregion
33060
- //#region node_modules/volar-service-typescript/lib/protocol.const.js
33061
- var require_protocol_const = /* @__PURE__ */ __commonJSMin(((exports) => {
33121
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/protocol.const.js
33122
+ var require_protocol_const$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
33062
33123
  Object.defineProperty(exports, "__esModule", { value: true });
33063
33124
  exports.EventName = exports.DisplayPartKind = exports.KindModifiers = exports.DiagnosticCategory = exports.Kind = void 0;
33064
33125
  var Kind = class {};
@@ -33143,8 +33204,8 @@ var require_protocol_const = /* @__PURE__ */ __commonJSMin(((exports) => {
33143
33204
  })(EventName || (exports.EventName = EventName = {}));
33144
33205
  }));
33145
33206
  //#endregion
33146
- //#region node_modules/volar-service-typescript/lib/utils/modifiers.js
33147
- var require_modifiers = /* @__PURE__ */ __commonJSMin(((exports) => {
33207
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/utils/modifiers.js
33208
+ var require_modifiers$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
33148
33209
  Object.defineProperty(exports, "__esModule", { value: true });
33149
33210
  exports.parseKindModifier = parseKindModifier;
33150
33211
  function parseKindModifier(kindModifiers) {
@@ -33152,8 +33213,8 @@ var require_modifiers = /* @__PURE__ */ __commonJSMin(((exports) => {
33152
33213
  }
33153
33214
  }));
33154
33215
  //#endregion
33155
- //#region node_modules/volar-service-typescript/lib/utils/previewer.js
33156
- var require_previewer = /* @__PURE__ */ __commonJSMin(((exports) => {
33216
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/utils/previewer.js
33217
+ var require_previewer$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
33157
33218
  Object.defineProperty(exports, "__esModule", { value: true });
33158
33219
  exports.plainWithLinks = plainWithLinks;
33159
33220
  exports.tagsMarkdownPreview = tagsMarkdownPreview;
@@ -33293,11 +33354,11 @@ var require_previewer = /* @__PURE__ */ __commonJSMin(((exports) => {
33293
33354
  }
33294
33355
  }));
33295
33356
  //#endregion
33296
- //#region node_modules/volar-service-typescript/lib/utils/typeConverters.js
33297
- var require_typeConverters = /* @__PURE__ */ __commonJSMin(((exports) => {
33357
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/utils/typeConverters.js
33358
+ var require_typeConverters$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
33298
33359
  Object.defineProperty(exports, "__esModule", { value: true });
33299
33360
  exports.SymbolKind = void 0;
33300
- var PConst = require_protocol_const();
33361
+ var PConst = require_protocol_const$1();
33301
33362
  var SymbolKind;
33302
33363
  (function(SymbolKind) {
33303
33364
  function fromProtocolScriptElementKind(kind) {
@@ -33331,8 +33392,8 @@ var require_typeConverters = /* @__PURE__ */ __commonJSMin(((exports) => {
33331
33392
  })(SymbolKind || (exports.SymbolKind = SymbolKind = {}));
33332
33393
  }));
33333
33394
  //#endregion
33334
- //#region node_modules/volar-service-typescript/lib/utils/lspConverters.js
33335
- var require_lspConverters = /* @__PURE__ */ __commonJSMin(((exports) => {
33395
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/utils/lspConverters.js
33396
+ var require_lspConverters$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
33336
33397
  Object.defineProperty(exports, "__esModule", { value: true });
33337
33398
  exports.convertDiagnostic = convertDiagnostic;
33338
33399
  exports.applyCompletionEntryDetails = applyCompletionEntryDetails;
@@ -33358,10 +33419,10 @@ var require_lspConverters = /* @__PURE__ */ __commonJSMin(((exports) => {
33358
33419
  exports.convertTextSpan = convertTextSpan;
33359
33420
  var path = require_path_browserify();
33360
33421
  var semver = require_semver();
33361
- var PConst = require_protocol_const();
33362
- var modifiers_1 = require_modifiers();
33363
- var previewer = require_previewer();
33364
- var typeConverters = require_typeConverters();
33422
+ var PConst = require_protocol_const$1();
33423
+ var modifiers_1 = require_modifiers$1();
33424
+ var previewer = require_previewer$1();
33425
+ var typeConverters = require_typeConverters$1();
33365
33426
  function convertDiagnostic(diag, document, fileNameToUri, getTextDocument) {
33366
33427
  if (diag.start === void 0) return;
33367
33428
  if (diag.length === void 0) return;
@@ -34006,11 +34067,11 @@ var require_lspConverters = /* @__PURE__ */ __commonJSMin(((exports) => {
34006
34067
  }
34007
34068
  }));
34008
34069
  //#endregion
34009
- //#region node_modules/volar-service-typescript/lib/configs/getFormatCodeSettings.js
34010
- var require_getFormatCodeSettings = /* @__PURE__ */ __commonJSMin(((exports) => {
34070
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/configs/getFormatCodeSettings.js
34071
+ var require_getFormatCodeSettings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
34011
34072
  Object.defineProperty(exports, "__esModule", { value: true });
34012
34073
  exports.getFormatCodeSettings = getFormatCodeSettings;
34013
- var shared_1 = require_shared();
34074
+ var shared_1 = require_shared$1();
34014
34075
  async function getFormatCodeSettings(ctx, document, options) {
34015
34076
  const config = await ctx.env.getConfiguration?.((0, shared_1.getConfigTitle)(document) + ".format") ?? {};
34016
34077
  return {
@@ -34040,7 +34101,7 @@ var require_getFormatCodeSettings = /* @__PURE__ */ __commonJSMin(((exports) =>
34040
34101
  }
34041
34102
  }));
34042
34103
  //#endregion
34043
- //#region node_modules/volar-service-typescript/lib/syntaxOnlyService.js
34104
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/syntaxOnlyService.js
34044
34105
  var require_syntaxOnlyService = /* @__PURE__ */ __commonJSMin(((exports) => {
34045
34106
  Object.defineProperty(exports, "__esModule", { value: true });
34046
34107
  exports.createSyntaxOnlyService = createSyntaxOnlyService;
@@ -34080,15 +34141,15 @@ var require_syntaxOnlyService = /* @__PURE__ */ __commonJSMin(((exports) => {
34080
34141
  }
34081
34142
  }));
34082
34143
  //#endregion
34083
- //#region node_modules/volar-service-typescript/lib/plugins/syntactic.js
34144
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/plugins/syntactic.js
34084
34145
  var require_syntactic = /* @__PURE__ */ __commonJSMin(((exports) => {
34085
34146
  Object.defineProperty(exports, "__esModule", { value: true });
34086
34147
  exports.getLanguageServiceByDocument = getLanguageServiceByDocument;
34087
34148
  exports.create = create;
34088
- var getFormatCodeSettings_1 = require_getFormatCodeSettings();
34089
- var shared_1 = require_shared();
34149
+ var getFormatCodeSettings_1 = require_getFormatCodeSettings$1();
34150
+ var shared_1 = require_shared$1();
34090
34151
  var syntaxOnlyService_1 = require_syntaxOnlyService();
34091
- var lspConverters_1 = require_lspConverters();
34152
+ var lspConverters_1 = require_lspConverters$1();
34092
34153
  var snapshots = /* @__PURE__ */ new WeakMap();
34093
34154
  var created;
34094
34155
  function getLanguageServiceByDocument(ts, document) {
@@ -34186,13 +34247,13 @@ var require_syntactic = /* @__PURE__ */ __commonJSMin(((exports) => {
34186
34247
  }
34187
34248
  }));
34188
34249
  //#endregion
34189
- //#region node_modules/volar-service-typescript/lib/plugins/docCommentTemplate.js
34250
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/plugins/docCommentTemplate.js
34190
34251
  var require_docCommentTemplate = /* @__PURE__ */ __commonJSMin(((exports) => {
34191
34252
  Object.defineProperty(exports, "__esModule", { value: true });
34192
34253
  exports.create = create;
34193
34254
  var nls = require_main$2();
34194
- var shared_1 = require_shared();
34195
- var lspConverters_1 = require_lspConverters();
34255
+ var shared_1 = require_shared$1();
34256
+ var lspConverters_1 = require_lspConverters$1();
34196
34257
  var syntactic_1 = require_syntactic();
34197
34258
  var localize = nls.loadMessageBundle();
34198
34259
  var defaultJsDoc = `/**\n * $0\n */`;
@@ -84711,12 +84772,12 @@ var require_css = /* @__PURE__ */ __commonJSMin(((exports) => {
84711
84772
  }
84712
84773
  }));
84713
84774
  //#endregion
84714
- //#region node_modules/volar-service-typescript/lib/semanticFeatures/semanticTokens.js
84715
- var require_semanticTokens = /* @__PURE__ */ __commonJSMin(((exports) => {
84775
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/semanticFeatures/semanticTokens.js
84776
+ var require_semanticTokens$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
84716
84777
  Object.defineProperty(exports, "__esModule", { value: true });
84717
84778
  exports.register = register;
84718
84779
  exports.convertClassificationsToSemanticTokens = convertClassificationsToSemanticTokens;
84719
- var shared_1 = require_shared();
84780
+ var shared_1 = require_shared$1();
84720
84781
  function register(ts, ctx) {
84721
84782
  return (uri, document, range, legend) => {
84722
84783
  const fileName = ctx.uriToFileName(uri);
@@ -84837,7 +84898,7 @@ var require_semanticTokens = /* @__PURE__ */ __commonJSMin(((exports) => {
84837
84898
  var require_typescript_semantic_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
84838
84899
  Object.defineProperty(exports, "__esModule", { value: true });
84839
84900
  exports.create = create;
84840
- var semanticTokens_1 = require_semanticTokens();
84901
+ var semanticTokens_1 = require_semanticTokens$1();
84841
84902
  var utils_1 = require_utils$1();
84842
84903
  function create({ getEncodedSemanticClassifications }) {
84843
84904
  return {
@@ -85147,13 +85208,13 @@ var require_vue_directive_comments = /* @__PURE__ */ __commonJSMin(((exports) =>
85147
85208
  }
85148
85209
  }));
85149
85210
  //#endregion
85150
- //#region node_modules/volar-service-typescript/lib/configs/getUserPreferences.js
85151
- var require_getUserPreferences = /* @__PURE__ */ __commonJSMin(((exports) => {
85211
+ //#region node_modules/@vue/language-service/node_modules/volar-service-typescript/lib/configs/getUserPreferences.js
85212
+ var require_getUserPreferences$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
85152
85213
  Object.defineProperty(exports, "__esModule", { value: true });
85153
85214
  exports.getUserPreferences = getUserPreferences;
85154
85215
  var path = require_path_browserify();
85155
85216
  var vscode_uri_1 = require_umd();
85156
- var shared_1 = require_shared();
85217
+ var shared_1 = require_shared$1();
85157
85218
  async function getUserPreferences(ctx, document) {
85158
85219
  let currentDirectory = "";
85159
85220
  if (ctx.project.typescript) currentDirectory = ctx.project.typescript.languageServiceHost.getCurrentDirectory();
@@ -85539,7 +85600,7 @@ var require_vue_document_drop = /* @__PURE__ */ __commonJSMin(((exports) => {
85539
85600
  var language_core_1 = require_language_core();
85540
85601
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
85541
85602
  var path_browserify_1 = require_path_browserify();
85542
- var getUserPreferences_1 = require_getUserPreferences();
85603
+ var getUserPreferences_1 = require_getUserPreferences$1();
85543
85604
  var vscode_uri_1 = require_umd();
85544
85605
  var nameCasing_1 = require_nameCasing();
85545
85606
  var vue_extract_file_1 = require_vue_extract_file();
@@ -112613,7 +112674,7 @@ var require_vue_template = /* @__PURE__ */ __commonJSMin(((exports) => {
112613
112674
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
112614
112675
  var volar_service_html_1 = require_volar_service_html();
112615
112676
  var volar_service_pug_1 = require_empty();
112616
- var lspConverters_js_1 = require_lspConverters();
112677
+ var lspConverters_js_1 = require_lspConverters$1();
112617
112678
  var html = __importStar((init_htmlLanguageService(), __toCommonJS(htmlLanguageService_exports)));
112618
112679
  var vscode_uri_1 = require_umd();
112619
112680
  var data_1 = require_data();
@@ -118442,7 +118503,6 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, stackCrawlMark || failBadS
118442
118503
  class DebugTypeMapper {
118443
118504
  __debugToString() {
118444
118505
  var _a;
118445
- type(this);
118446
118506
  switch (this.kind) {
118447
118507
  case 3: return ((_a = this.debugInfo) == null ? void 0 : _a.call(this)) || "(function mapper)";
118448
118508
  case 0: return `${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;
@@ -134539,9 +134599,7 @@ ${lanes.join("\n")}
134539
134599
  case 339:
134540
134600
  case 347:
134541
134601
  case 324: return true;
134542
- default:
134543
- assertType(node);
134544
- return isDeclarationWithTypeParameterChildren(node);
134602
+ default: return isDeclarationWithTypeParameterChildren(node);
134545
134603
  }
134546
134604
  }
134547
134605
  function isDeclarationWithTypeParameterChildren(node) {
@@ -134566,9 +134624,7 @@ ${lanes.join("\n")}
134566
134624
  case 179:
134567
134625
  case 219:
134568
134626
  case 220: return true;
134569
- default:
134570
- assertType(node);
134571
- return false;
134627
+ default: return false;
134572
134628
  }
134573
134629
  }
134574
134630
  function isAnyImportSyntax(node) {
@@ -139820,9 +139876,7 @@ ${lanes.join("\n")}
139820
139876
  if (node.operator === 41) return isNumericLiteral(node.operand) || includeBigInt && isBigIntLiteral(node.operand);
139821
139877
  if (node.operator === 40) return isNumericLiteral(node.operand);
139822
139878
  return false;
139823
- default:
139824
- assertType(node);
139825
- return false;
139879
+ default: return false;
139826
139880
  }
139827
139881
  }
139828
139882
  function unwrapParenthesizedExpression(o) {
@@ -139845,9 +139899,7 @@ ${lanes.join("\n")}
139845
139899
  case 305:
139846
139900
  case 342:
139847
139901
  case 349: return true;
139848
- default:
139849
- assertType(node);
139850
- return false;
139902
+ default: return false;
139851
139903
  }
139852
139904
  }
139853
139905
  function isSideEffectImport(node) {
@@ -202528,9 +202580,7 @@ ${lanes.join("\n")}
202528
202580
  case 170: return createParameterError(node);
202529
202581
  case 304: return createExpressionError(node.initializer);
202530
202582
  case 232: return createClassExpressionError(node);
202531
- default:
202532
- assertType(node);
202533
- return createExpressionError(node);
202583
+ default: return createExpressionError(node);
202534
202584
  }
202535
202585
  }
202536
202586
  function findNearestDeclaration(node) {
@@ -214681,7 +214731,7 @@ ${lanes.join("\n")}
214681
214731
  queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.checkDefined(buildResult));
214682
214732
  step++;
214683
214733
  break;
214684
- default: assertType(step);
214734
+ default:
214685
214735
  }
214686
214736
  Debug.assert(step > currentStep);
214687
214737
  }
@@ -215419,7 +215469,7 @@ ${lanes.join("\n")}
215419
215469
  case 17: return reportStatus(state, Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
215420
215470
  case 16:
215421
215471
  case 13: break;
215422
- default: assertType(status);
215472
+ default:
215423
215473
  }
215424
215474
  }
215425
215475
  function verboseReportProjectStatus(state, configFileName, status) {
@@ -217680,9 +217730,7 @@ ${lanes.join("\n")}
217680
217730
  case 4: return "property";
217681
217731
  case 5: return isFunctionExpression(right) ? "method" : "property";
217682
217732
  case 6: return "local class";
217683
- default:
217684
- assertType(kind);
217685
- return "";
217733
+ default: return "";
217686
217734
  }
217687
217735
  case 80: return isImportClause(node.parent) ? "alias" : "";
217688
217736
  case 278:
@@ -226170,7 +226218,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
226170
226218
  if (isBlock(body)) return body.statements;
226171
226219
  } else if (isModuleBlock(scope) || isSourceFile(scope)) return scope.statements;
226172
226220
  else if (isClassLike(scope)) return scope.members;
226173
- else assertType(scope);
226174
226221
  return emptyArray;
226175
226222
  }
226176
226223
  function getNodeToInsertFunctionBefore(minPos, scope) {
@@ -262067,7 +262114,7 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
262067
262114
  case ActionWatchTypingLocations:
262068
262115
  this.projectService.watchTypingLocations(response);
262069
262116
  break;
262070
- default: assertType(response);
262117
+ default:
262071
262118
  }
262072
262119
  }
262073
262120
  scheduleRequest(request) {
@@ -262198,6 +262245,31 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
262198
262245
  });
262199
262246
  }));
262200
262247
  //#endregion
262248
+ //#region node_modules/volar-service-typescript/lib/shared.js
262249
+ var require_shared = /* @__PURE__ */ __commonJSMin(((exports) => {
262250
+ Object.defineProperty(exports, "__esModule", { value: true });
262251
+ exports.getConfigTitle = getConfigTitle;
262252
+ exports.isTsDocument = isTsDocument;
262253
+ exports.isJsonDocument = isJsonDocument;
262254
+ exports.safeCall = safeCall;
262255
+ function getConfigTitle(document) {
262256
+ if (document.languageId === "javascriptreact") return "javascript";
262257
+ if (document.languageId === "typescriptreact") return "typescript";
262258
+ return document.languageId;
262259
+ }
262260
+ function isTsDocument(document) {
262261
+ return document.languageId === "javascript" || document.languageId === "typescript" || document.languageId === "javascriptreact" || document.languageId === "typescriptreact";
262262
+ }
262263
+ function isJsonDocument(document) {
262264
+ return document.languageId === "json" || document.languageId === "jsonc";
262265
+ }
262266
+ function safeCall(cb) {
262267
+ try {
262268
+ return cb();
262269
+ } catch {}
262270
+ }
262271
+ }));
262272
+ //#endregion
262201
262273
  //#region node_modules/volar-service-typescript/lib/plugins/directiveComment.js
262202
262274
  var require_directiveComment = /* @__PURE__ */ __commonJSMin(((exports) => {
262203
262275
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -263380,6 +263452,135 @@ var require_out = /* @__PURE__ */ __commonJSMin(((exports) => {
263380
263452
  exports.createLanguageService = createLanguageService;
263381
263453
  }));
263382
263454
  //#endregion
263455
+ //#region node_modules/volar-service-typescript/lib/configs/getFormatCodeSettings.js
263456
+ var require_getFormatCodeSettings = /* @__PURE__ */ __commonJSMin(((exports) => {
263457
+ Object.defineProperty(exports, "__esModule", { value: true });
263458
+ exports.getFormatCodeSettings = getFormatCodeSettings;
263459
+ var shared_1 = require_shared();
263460
+ async function getFormatCodeSettings(ctx, document, options) {
263461
+ const config = await ctx.env.getConfiguration?.((0, shared_1.getConfigTitle)(document) + ".format") ?? {};
263462
+ return {
263463
+ convertTabsToSpaces: options?.insertSpaces,
263464
+ tabSize: options?.tabSize,
263465
+ indentSize: options?.tabSize,
263466
+ indentStyle: 2,
263467
+ newLineCharacter: "\n",
263468
+ insertSpaceAfterCommaDelimiter: config.insertSpaceAfterCommaDelimiter ?? true,
263469
+ insertSpaceAfterConstructor: config.insertSpaceAfterConstructor ?? false,
263470
+ insertSpaceAfterSemicolonInForStatements: config.insertSpaceAfterSemicolonInForStatements ?? true,
263471
+ insertSpaceBeforeAndAfterBinaryOperators: config.insertSpaceBeforeAndAfterBinaryOperators ?? true,
263472
+ insertSpaceAfterKeywordsInControlFlowStatements: config.insertSpaceAfterKeywordsInControlFlowStatements ?? true,
263473
+ insertSpaceAfterFunctionKeywordForAnonymousFunctions: config.insertSpaceAfterFunctionKeywordForAnonymousFunctions ?? true,
263474
+ insertSpaceBeforeFunctionParenthesis: config.insertSpaceBeforeFunctionParenthesis ?? false,
263475
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: config.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis ?? false,
263476
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: config.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets ?? false,
263477
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: config.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces ?? true,
263478
+ insertSpaceAfterOpeningAndBeforeClosingEmptyBraces: config.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces ?? true,
263479
+ insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: config.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces ?? false,
263480
+ insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: config.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces ?? false,
263481
+ insertSpaceAfterTypeAssertion: config.insertSpaceAfterTypeAssertion ?? false,
263482
+ placeOpenBraceOnNewLineForFunctions: config.placeOpenBraceOnNewLineForFunctions ?? false,
263483
+ placeOpenBraceOnNewLineForControlBlocks: config.placeOpenBraceOnNewLineForControlBlocks ?? false,
263484
+ semicolons: config.semicolons ?? "ignore"
263485
+ };
263486
+ }
263487
+ }));
263488
+ //#endregion
263489
+ //#region node_modules/volar-service-typescript/lib/configs/getUserPreferences.js
263490
+ var require_getUserPreferences = /* @__PURE__ */ __commonJSMin(((exports) => {
263491
+ Object.defineProperty(exports, "__esModule", { value: true });
263492
+ exports.getUserPreferences = getUserPreferences;
263493
+ var path = require_path_browserify();
263494
+ var vscode_uri_1 = require_umd();
263495
+ var shared_1 = require_shared();
263496
+ async function getUserPreferences(ctx, document) {
263497
+ let currentDirectory = "";
263498
+ if (ctx.project.typescript) currentDirectory = ctx.project.typescript.languageServiceHost.getCurrentDirectory();
263499
+ const uri = vscode_uri_1.URI.parse(document.uri);
263500
+ const documentUri = ctx.decodeEmbeddedDocumentUri(uri)?.[0] ?? uri;
263501
+ const config = await ctx.env.getConfiguration?.((0, shared_1.getConfigTitle)(document)) ?? {};
263502
+ const preferencesConfig = config?.preferences ?? {};
263503
+ return {
263504
+ ...config.unstable ?? {},
263505
+ quotePreference: getQuoteStylePreference(preferencesConfig),
263506
+ importModuleSpecifierPreference: getImportModuleSpecifierPreference(preferencesConfig),
263507
+ importModuleSpecifierEnding: getImportModuleSpecifierEndingPreference(preferencesConfig),
263508
+ jsxAttributeCompletionStyle: getJsxAttributeCompletionStyle(preferencesConfig),
263509
+ allowTextChangesInNewFiles: documentUri.scheme === "file",
263510
+ providePrefixAndSuffixTextForRename: (preferencesConfig.renameShorthandProperties ?? true) === false ? false : preferencesConfig.useAliasesForRenames ?? true,
263511
+ allowRenameOfImportPath: true,
263512
+ includeAutomaticOptionalChainCompletions: config.suggest?.includeAutomaticOptionalChainCompletions ?? true,
263513
+ provideRefactorNotApplicableReason: true,
263514
+ generateReturnInDocTemplate: config.suggest?.jsdoc?.generateReturns ?? true,
263515
+ includeCompletionsForImportStatements: config.suggest?.includeCompletionsForImportStatements ?? true,
263516
+ includeCompletionsWithSnippetText: config.suggest?.includeCompletionsWithSnippetText ?? true,
263517
+ includeCompletionsWithClassMemberSnippets: config.suggest?.classMemberSnippets?.enabled ?? true,
263518
+ includeCompletionsWithObjectLiteralMethodSnippets: config.suggest?.objectLiteralMethodSnippets?.enabled ?? true,
263519
+ autoImportFileExcludePatterns: getAutoImportFileExcludePatternsPreference(preferencesConfig, currentDirectory),
263520
+ autoImportSpecifierExcludeRegexes: preferencesConfig.autoImportSpecifierExcludeRegexes,
263521
+ useLabelDetailsInCompletionEntries: true,
263522
+ allowIncompleteCompletions: true,
263523
+ displayPartsForJSDoc: true,
263524
+ includeInlayParameterNameHints: getInlayParameterNameHintsPreference(config),
263525
+ includeInlayParameterNameHintsWhenArgumentMatchesName: !(config.inlayHints?.parameterNames?.suppressWhenArgumentMatchesName ?? true),
263526
+ includeInlayFunctionParameterTypeHints: config.inlayHints?.parameterTypes?.enabled ?? false,
263527
+ includeInlayVariableTypeHints: config.inlayHints?.variableTypes?.enabled ?? false,
263528
+ includeInlayVariableTypeHintsWhenTypeMatchesName: !(config.inlayHints?.variableTypes?.suppressWhenTypeMatchesName ?? true),
263529
+ includeInlayPropertyDeclarationTypeHints: config.inlayHints?.propertyDeclarationTypes?.enabled ?? false,
263530
+ includeInlayFunctionLikeReturnTypeHints: config.inlayHints?.functionLikeReturnTypes?.enabled ?? false,
263531
+ includeInlayEnumMemberValueHints: config.inlayHints?.enumMemberValues?.enabled ?? false,
263532
+ includeCompletionsForModuleExports: config.suggest?.autoImports ?? true,
263533
+ includeCompletionsWithInsertText: true,
263534
+ includePackageJsonAutoImports: preferencesConfig.includePackageJsonAutoImports ?? "auto"
263535
+ };
263536
+ }
263537
+ function getQuoteStylePreference(config) {
263538
+ switch (config.quoteStyle) {
263539
+ case "single": return "single";
263540
+ case "double": return "double";
263541
+ default: return "auto";
263542
+ }
263543
+ }
263544
+ function getAutoImportFileExcludePatternsPreference(config, workspacePath) {
263545
+ if (workspacePath) return config.autoImportFileExcludePatterns?.map((p) => {
263546
+ const slashNormalized = p.replace(/\\/g, "/");
263547
+ const isRelative = /^\.\.?($|\/)/.test(slashNormalized);
263548
+ return path.isAbsolute(p) ? p : p.startsWith("*") ? "/" + slashNormalized : isRelative ? path.join(workspacePath, p) : "/**/" + slashNormalized;
263549
+ });
263550
+ }
263551
+ function getImportModuleSpecifierPreference(config) {
263552
+ switch (config.importModuleSpecifier) {
263553
+ case "project-relative": return "project-relative";
263554
+ case "relative": return "relative";
263555
+ case "non-relative": return "non-relative";
263556
+ default: return;
263557
+ }
263558
+ }
263559
+ function getImportModuleSpecifierEndingPreference(config) {
263560
+ switch (config.importModuleSpecifierEnding) {
263561
+ case "minimal": return "minimal";
263562
+ case "index": return "index";
263563
+ case "js": return "js";
263564
+ default: return "minimal";
263565
+ }
263566
+ }
263567
+ function getJsxAttributeCompletionStyle(config) {
263568
+ switch (config.jsxAttributeCompletionStyle) {
263569
+ case "braces": return "braces";
263570
+ case "none": return "none";
263571
+ default: return "auto";
263572
+ }
263573
+ }
263574
+ function getInlayParameterNameHintsPreference(config) {
263575
+ switch (config.inlayHints?.parameterNames?.enabled) {
263576
+ case "none": return "none";
263577
+ case "literals": return "literals";
263578
+ case "all": return "all";
263579
+ default: return;
263580
+ }
263581
+ }
263582
+ }));
263583
+ //#endregion
263383
263584
  //#region node_modules/volar-service-typescript/lib/utils/fixNames.js
263384
263585
  var require_fixNames = /* @__PURE__ */ __commonJSMin(((exports) => {
263385
263586
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -263399,6 +263600,955 @@ var require_fixNames = /* @__PURE__ */ __commonJSMin(((exports) => {
263399
263600
  exports.addMissingOverride = "fixOverrideModifier";
263400
263601
  }));
263401
263602
  //#endregion
263603
+ //#region node_modules/volar-service-typescript/lib/protocol.const.js
263604
+ var require_protocol_const = /* @__PURE__ */ __commonJSMin(((exports) => {
263605
+ Object.defineProperty(exports, "__esModule", { value: true });
263606
+ exports.EventName = exports.DisplayPartKind = exports.KindModifiers = exports.DiagnosticCategory = exports.Kind = void 0;
263607
+ var Kind = class {};
263608
+ exports.Kind = Kind;
263609
+ Kind.alias = "alias";
263610
+ Kind.callSignature = "call";
263611
+ Kind.class = "class";
263612
+ Kind.const = "const";
263613
+ Kind.constructorImplementation = "constructor";
263614
+ Kind.constructSignature = "construct";
263615
+ Kind.directory = "directory";
263616
+ Kind.enum = "enum";
263617
+ Kind.enumMember = "enum member";
263618
+ Kind.externalModuleName = "external module name";
263619
+ Kind.function = "function";
263620
+ Kind.indexSignature = "index";
263621
+ Kind.interface = "interface";
263622
+ Kind.keyword = "keyword";
263623
+ Kind.let = "let";
263624
+ Kind.localFunction = "local function";
263625
+ Kind.localVariable = "local var";
263626
+ Kind.method = "method";
263627
+ Kind.memberGetAccessor = "getter";
263628
+ Kind.memberSetAccessor = "setter";
263629
+ Kind.memberVariable = "property";
263630
+ Kind.module = "module";
263631
+ Kind.primitiveType = "primitive type";
263632
+ Kind.script = "script";
263633
+ Kind.type = "type";
263634
+ Kind.variable = "var";
263635
+ Kind.warning = "warning";
263636
+ Kind.string = "string";
263637
+ Kind.parameter = "parameter";
263638
+ Kind.typeParameter = "type parameter";
263639
+ var DiagnosticCategory = class {};
263640
+ exports.DiagnosticCategory = DiagnosticCategory;
263641
+ DiagnosticCategory.error = "error";
263642
+ DiagnosticCategory.warning = "warning";
263643
+ DiagnosticCategory.suggestion = "suggestion";
263644
+ var KindModifiers = class {};
263645
+ exports.KindModifiers = KindModifiers;
263646
+ KindModifiers.optional = "optional";
263647
+ KindModifiers.deprecated = "deprecated";
263648
+ KindModifiers.color = "color";
263649
+ KindModifiers.dtsFile = ".d.ts";
263650
+ KindModifiers.tsFile = ".ts";
263651
+ KindModifiers.tsxFile = ".tsx";
263652
+ KindModifiers.jsFile = ".js";
263653
+ KindModifiers.jsxFile = ".jsx";
263654
+ KindModifiers.jsonFile = ".json";
263655
+ KindModifiers.fileExtensionKindModifiers = [
263656
+ KindModifiers.dtsFile,
263657
+ KindModifiers.tsFile,
263658
+ KindModifiers.tsxFile,
263659
+ KindModifiers.jsFile,
263660
+ KindModifiers.jsxFile,
263661
+ KindModifiers.jsonFile
263662
+ ];
263663
+ var DisplayPartKind = class {};
263664
+ exports.DisplayPartKind = DisplayPartKind;
263665
+ DisplayPartKind.functionName = "functionName";
263666
+ DisplayPartKind.methodName = "methodName";
263667
+ DisplayPartKind.parameterName = "parameterName";
263668
+ DisplayPartKind.propertyName = "propertyName";
263669
+ DisplayPartKind.punctuation = "punctuation";
263670
+ DisplayPartKind.text = "text";
263671
+ var EventName;
263672
+ (function(EventName) {
263673
+ EventName["syntaxDiag"] = "syntaxDiag";
263674
+ EventName["semanticDiag"] = "semanticDiag";
263675
+ EventName["suggestionDiag"] = "suggestionDiag";
263676
+ EventName["configFileDiag"] = "configFileDiag";
263677
+ EventName["telemetry"] = "telemetry";
263678
+ EventName["projectLanguageServiceState"] = "projectLanguageServiceState";
263679
+ EventName["projectsUpdatedInBackground"] = "projectsUpdatedInBackground";
263680
+ EventName["beginInstallTypes"] = "beginInstallTypes";
263681
+ EventName["endInstallTypes"] = "endInstallTypes";
263682
+ EventName["typesInstallerInitializationFailed"] = "typesInstallerInitializationFailed";
263683
+ EventName["surveyReady"] = "surveyReady";
263684
+ EventName["projectLoadingStart"] = "projectLoadingStart";
263685
+ EventName["projectLoadingFinish"] = "projectLoadingFinish";
263686
+ })(EventName || (exports.EventName = EventName = {}));
263687
+ }));
263688
+ //#endregion
263689
+ //#region node_modules/volar-service-typescript/lib/utils/modifiers.js
263690
+ var require_modifiers = /* @__PURE__ */ __commonJSMin(((exports) => {
263691
+ Object.defineProperty(exports, "__esModule", { value: true });
263692
+ exports.parseKindModifier = parseKindModifier;
263693
+ function parseKindModifier(kindModifiers) {
263694
+ return new Set(kindModifiers.split(/,|\s+/g));
263695
+ }
263696
+ }));
263697
+ //#endregion
263698
+ //#region node_modules/volar-service-typescript/lib/utils/previewer.js
263699
+ var require_previewer = /* @__PURE__ */ __commonJSMin(((exports) => {
263700
+ Object.defineProperty(exports, "__esModule", { value: true });
263701
+ exports.plainWithLinks = plainWithLinks;
263702
+ exports.tagsMarkdownPreview = tagsMarkdownPreview;
263703
+ exports.markdownDocumentation = markdownDocumentation;
263704
+ exports.addMarkdownDocumentation = addMarkdownDocumentation;
263705
+ function replaceLinks(text) {
263706
+ return text.replace(/\{@(link|linkplain|linkcode) (https?:\/\/[^ |}]+?)(?:[| ]([^{}\n]+?))?\}/gi, (_, tag, link, text) => {
263707
+ switch (tag) {
263708
+ case "linkcode": return `[\`${text ? text.trim() : link}\`](${link})`;
263709
+ default: return `[${text ? text.trim() : link}](${link})`;
263710
+ }
263711
+ });
263712
+ }
263713
+ function processInlineTags(text) {
263714
+ return replaceLinks(text);
263715
+ }
263716
+ function getTagBodyText(tag, fileNameToUri, getTextDocument) {
263717
+ if (!tag.text) return;
263718
+ function makeCodeblock(text) {
263719
+ if (text.match(/^\s*[~`]{3}/g)) return text;
263720
+ return "```\n" + text + "\n```";
263721
+ }
263722
+ const text = convertLinkTags(tag.text, fileNameToUri, getTextDocument);
263723
+ switch (tag.name) {
263724
+ case "example":
263725
+ const captionTagMatches = text.match(/<caption>(.*?)<\/caption>\s*(\r\n|\n)/);
263726
+ if (captionTagMatches && captionTagMatches.index === 0) return captionTagMatches[1] + "\n\n" + makeCodeblock(text.slice(captionTagMatches[0].length));
263727
+ else return makeCodeblock(text);
263728
+ case "author":
263729
+ const emailMatch = text.match(/(.+)\s<([-.\w]+@[-.\w]+)>/);
263730
+ if (emailMatch === null) return text;
263731
+ else return `${emailMatch[1]} ${emailMatch[2]}`;
263732
+ case "default": return makeCodeblock(text);
263733
+ }
263734
+ return processInlineTags(text);
263735
+ }
263736
+ function getTagDocumentation(tag, fileNameToUri, getTextDocument) {
263737
+ switch (tag.name) {
263738
+ case "augments":
263739
+ case "extends":
263740
+ case "param":
263741
+ case "template":
263742
+ const body = convertLinkTags(tag.text, fileNameToUri, getTextDocument).split(/^(\S+)\s*-?\s*/);
263743
+ if (body?.length === 3) {
263744
+ const param = body[1];
263745
+ const doc = body[2];
263746
+ const label = `*@${tag.name}* \`${param}\``;
263747
+ if (!doc) return label;
263748
+ return label + (doc.match(/\r\n|\n/g) ? " \n" + processInlineTags(doc) : ` — ${processInlineTags(doc)}`);
263749
+ }
263750
+ }
263751
+ const label = `*@${tag.name}*`;
263752
+ const text = getTagBodyText(tag, fileNameToUri, getTextDocument);
263753
+ if (!text) return label;
263754
+ return label + (text.match(/\r\n|\n/g) ? " \n" + text : ` — ${text}`);
263755
+ }
263756
+ function plainWithLinks(parts, fileNameToUri, getTextDocument) {
263757
+ return processInlineTags(convertLinkTags(parts, fileNameToUri, getTextDocument));
263758
+ }
263759
+ /**
263760
+ * Convert `@link` inline tags to markdown links
263761
+ */
263762
+ function convertLinkTags(parts, fileNameToUri, getTextDocument) {
263763
+ if (!parts) return "";
263764
+ if (typeof parts === "string") return parts;
263765
+ const out = [];
263766
+ let currentLink;
263767
+ for (const part of parts) switch (part.kind) {
263768
+ case "link":
263769
+ if (currentLink) {
263770
+ const text = currentLink.text ?? currentLink.name;
263771
+ let target = currentLink.target;
263772
+ if (typeof currentLink.target === "object" && "fileName" in currentLink.target) {
263773
+ const _target = currentLink.target;
263774
+ const fileDoc = getTextDocument(fileNameToUri(_target.fileName));
263775
+ if (fileDoc) {
263776
+ const start = fileDoc.positionAt(_target.textSpan.start);
263777
+ const end = fileDoc.positionAt(_target.textSpan.start + _target.textSpan.length);
263778
+ target = {
263779
+ file: _target.fileName,
263780
+ start: {
263781
+ line: start.line + 1,
263782
+ offset: start.character + 1
263783
+ },
263784
+ end: {
263785
+ line: end.line + 1,
263786
+ offset: end.character + 1
263787
+ }
263788
+ };
263789
+ } else target = {
263790
+ file: _target.fileName,
263791
+ start: {
263792
+ line: 1,
263793
+ offset: 1
263794
+ },
263795
+ end: {
263796
+ line: 1,
263797
+ offset: 1
263798
+ }
263799
+ };
263800
+ }
263801
+ if (target) {
263802
+ const link = fileNameToUri(target.file) + `#L${target.start.line},${target.start.offset}`;
263803
+ out.push(`[${text}](${link})`);
263804
+ } else if (text) out.push(text);
263805
+ currentLink = void 0;
263806
+ } else currentLink = {};
263807
+ break;
263808
+ case "linkName":
263809
+ if (currentLink) {
263810
+ currentLink.name = part.text;
263811
+ currentLink.target = part.target;
263812
+ }
263813
+ break;
263814
+ case "linkText":
263815
+ if (currentLink) currentLink.text = part.text;
263816
+ break;
263817
+ default:
263818
+ out.push(part.text);
263819
+ break;
263820
+ }
263821
+ return processInlineTags(out.join(""));
263822
+ }
263823
+ function tagsMarkdownPreview(tags, fileNameToUri, getTextDocument) {
263824
+ return tags.map((tag) => getTagDocumentation(tag, fileNameToUri, getTextDocument)).join(" \n\n");
263825
+ }
263826
+ function markdownDocumentation(documentation, tags, fileNameToUri, getTextDocument) {
263827
+ return addMarkdownDocumentation("", documentation, tags, fileNameToUri, getTextDocument);
263828
+ }
263829
+ function addMarkdownDocumentation(out, documentation, tags, fileNameToUri, getTextDocument) {
263830
+ if (documentation) out += plainWithLinks(documentation, fileNameToUri, getTextDocument);
263831
+ if (tags) {
263832
+ const tagsPreview = tagsMarkdownPreview(tags, fileNameToUri, getTextDocument);
263833
+ if (tagsPreview) out += "\n\n" + tagsPreview;
263834
+ }
263835
+ return out;
263836
+ }
263837
+ }));
263838
+ //#endregion
263839
+ //#region node_modules/volar-service-typescript/lib/utils/typeConverters.js
263840
+ var require_typeConverters = /* @__PURE__ */ __commonJSMin(((exports) => {
263841
+ Object.defineProperty(exports, "__esModule", { value: true });
263842
+ exports.SymbolKind = void 0;
263843
+ var PConst = require_protocol_const();
263844
+ var SymbolKind;
263845
+ (function(SymbolKind) {
263846
+ function fromProtocolScriptElementKind(kind) {
263847
+ switch (kind) {
263848
+ case PConst.Kind.module: return 2;
263849
+ case PConst.Kind.class: return 5;
263850
+ case PConst.Kind.enum: return 10;
263851
+ case PConst.Kind.enumMember: return 22;
263852
+ case PConst.Kind.interface: return 11;
263853
+ case PConst.Kind.indexSignature: return 6;
263854
+ case PConst.Kind.callSignature: return 6;
263855
+ case PConst.Kind.method: return 6;
263856
+ case PConst.Kind.memberVariable: return 7;
263857
+ case PConst.Kind.memberGetAccessor: return 7;
263858
+ case PConst.Kind.memberSetAccessor: return 7;
263859
+ case PConst.Kind.variable: return 13;
263860
+ case PConst.Kind.let: return 13;
263861
+ case PConst.Kind.const: return 13;
263862
+ case PConst.Kind.localVariable: return 13;
263863
+ case PConst.Kind.alias: return 13;
263864
+ case PConst.Kind.function: return 12;
263865
+ case PConst.Kind.localFunction: return 12;
263866
+ case PConst.Kind.constructSignature: return 9;
263867
+ case PConst.Kind.constructorImplementation: return 9;
263868
+ case PConst.Kind.typeParameter: return 26;
263869
+ case PConst.Kind.string: return 15;
263870
+ default: return 13;
263871
+ }
263872
+ }
263873
+ SymbolKind.fromProtocolScriptElementKind = fromProtocolScriptElementKind;
263874
+ })(SymbolKind || (exports.SymbolKind = SymbolKind = {}));
263875
+ }));
263876
+ //#endregion
263877
+ //#region node_modules/volar-service-typescript/lib/utils/lspConverters.js
263878
+ var require_lspConverters = /* @__PURE__ */ __commonJSMin(((exports) => {
263879
+ Object.defineProperty(exports, "__esModule", { value: true });
263880
+ exports.convertDiagnostic = convertDiagnostic;
263881
+ exports.applyCompletionEntryDetails = applyCompletionEntryDetails;
263882
+ exports.convertCompletionInfo = convertCompletionInfo;
263883
+ exports.getLineText = getLineText;
263884
+ exports.convertNavigateToItem = convertNavigateToItem;
263885
+ exports.convertInlayHint = convertInlayHint;
263886
+ exports.convertHighlightSpan = convertHighlightSpan;
263887
+ exports.convertSelectionRange = convertSelectionRange;
263888
+ exports.convertFileTextChanges = convertFileTextChanges;
263889
+ exports.convertRenameLocations = convertRenameLocations;
263890
+ exports.convertQuickInfo = convertQuickInfo;
263891
+ exports.convertNavTree = convertNavTree;
263892
+ exports.convertOutliningSpan = convertOutliningSpan;
263893
+ exports.convertOutliningSpanKind = convertOutliningSpanKind;
263894
+ exports.convertTextChange = convertTextChange;
263895
+ exports.convertCallHierarchyIncomingCall = convertCallHierarchyIncomingCall;
263896
+ exports.convertCallHierarchyOutgoingCall = convertCallHierarchyOutgoingCall;
263897
+ exports.convertCallHierarchyItem = convertCallHierarchyItem;
263898
+ exports.convertDocumentSpanToLocation = convertDocumentSpanToLocation;
263899
+ exports.convertDefinitionInfoAndBoundSpan = convertDefinitionInfoAndBoundSpan;
263900
+ exports.convertDocumentSpantoLocationLink = convertDocumentSpantoLocationLink;
263901
+ exports.convertTextSpan = convertTextSpan;
263902
+ var path = require_path_browserify();
263903
+ var semver = require_semver();
263904
+ var PConst = require_protocol_const();
263905
+ var modifiers_1 = require_modifiers();
263906
+ var previewer = require_previewer();
263907
+ var typeConverters = require_typeConverters();
263908
+ function convertDiagnostic(diag, document, fileNameToUri, getTextDocument) {
263909
+ if (diag.start === void 0) return;
263910
+ if (diag.length === void 0) return;
263911
+ const diagnostic = {
263912
+ range: {
263913
+ start: document.positionAt(diag.start),
263914
+ end: document.positionAt(diag.start + diag.length)
263915
+ },
263916
+ severity: convertDiagnosticCategory(diag.category),
263917
+ source: "ts",
263918
+ code: diag.code,
263919
+ message: getMessageText(diag)
263920
+ };
263921
+ if (diag.relatedInformation) diagnostic.relatedInformation = diag.relatedInformation.map((rErr) => convertDiagnosticRelatedInformation(rErr, fileNameToUri, getTextDocument)).filter((v) => !!v);
263922
+ if (diag.reportsUnnecessary) {
263923
+ if (diagnostic.tags === void 0) diagnostic.tags = [];
263924
+ diagnostic.tags.push(1);
263925
+ }
263926
+ if (diag.reportsDeprecated) {
263927
+ if (diagnostic.tags === void 0) diagnostic.tags = [];
263928
+ diagnostic.tags.push(2);
263929
+ }
263930
+ return diagnostic;
263931
+ }
263932
+ function convertDiagnosticRelatedInformation(diag, fileNameToUri, getTextDocument) {
263933
+ if (diag.start === void 0) return;
263934
+ if (diag.length === void 0) return;
263935
+ let document;
263936
+ if (diag.file) document = getTextDocument(fileNameToUri(diag.file.fileName));
263937
+ if (!document) return;
263938
+ return {
263939
+ location: {
263940
+ uri: document.uri,
263941
+ range: {
263942
+ start: document.positionAt(diag.start),
263943
+ end: document.positionAt(diag.start + diag.length)
263944
+ }
263945
+ },
263946
+ message: getMessageText(diag)
263947
+ };
263948
+ }
263949
+ function convertDiagnosticCategory(input) {
263950
+ switch (input) {
263951
+ case 0: return 2;
263952
+ case 1: return 1;
263953
+ case 2: return 4;
263954
+ case 3: return 3;
263955
+ }
263956
+ return 1;
263957
+ }
263958
+ function getMessageText(diag) {
263959
+ let messageText = "";
263960
+ if (typeof diag.messageText === "string") messageText += diag.messageText;
263961
+ else {
263962
+ messageText += diag.messageText.messageText;
263963
+ if (diag.messageText.next) for (const info of diag.messageText.next) messageText += "\n" + getNextMessageText(info, 1);
263964
+ }
263965
+ return messageText;
263966
+ }
263967
+ function getNextMessageText(diag, level = 0) {
263968
+ let messageText = " ".repeat(level);
263969
+ messageText += diag.messageText;
263970
+ if (diag.next) for (const info of diag.next) messageText += "\n" + getNextMessageText(info, level + 1);
263971
+ return messageText;
263972
+ }
263973
+ function applyCompletionEntryDetails(ts, item, data, document, fileNameToUri, getTextDocument) {
263974
+ const { sourceDisplay } = data;
263975
+ if (sourceDisplay) {
263976
+ item.labelDetails ??= {};
263977
+ item.labelDetails.description = ts.displayPartsToString(sourceDisplay);
263978
+ }
263979
+ const detailTexts = [];
263980
+ if (data.codeActions) {
263981
+ item.additionalTextEdits ??= [];
263982
+ for (const action of data.codeActions) {
263983
+ detailTexts.push(action.description);
263984
+ for (const changes of action.changes) changes.textChanges.map((change) => convertTextSpan(change.span, document)).forEach((range, index) => {
263985
+ item.additionalTextEdits?.push({
263986
+ range,
263987
+ newText: changes.textChanges[index].newText
263988
+ });
263989
+ });
263990
+ }
263991
+ }
263992
+ if (data.displayParts) detailTexts.push(previewer.plainWithLinks(data.displayParts, fileNameToUri, getTextDocument));
263993
+ if (detailTexts.length) item.detail = detailTexts.join("\n");
263994
+ item.documentation = {
263995
+ kind: "markdown",
263996
+ value: previewer.markdownDocumentation(data.documentation, data.tags, fileNameToUri, getTextDocument)
263997
+ };
263998
+ if (data) handleKindModifiers(item, data);
263999
+ }
264000
+ function convertCompletionInfo(ts, completionContext, document, position, createData) {
264001
+ const lt_320 = semver.lt(ts.version, "3.2.0");
264002
+ const gte_300 = semver.gte(ts.version, "3.0.0");
264003
+ const wordRange = completionContext.optionalReplacementSpan ? convertTextSpan(completionContext.optionalReplacementSpan, document) : void 0;
264004
+ const line = getLineText(document, position.line);
264005
+ const dotAccessorContext = getDotAccessorContext(document);
264006
+ const entries = completionContext.entries.map((tsEntry) => ({
264007
+ ...convertCompletionEntry(tsEntry, document),
264008
+ data: createData(tsEntry)
264009
+ }));
264010
+ return {
264011
+ isIncomplete: !!completionContext.isIncomplete,
264012
+ items: entries
264013
+ };
264014
+ function convertCompletionEntry(tsEntry, document) {
264015
+ const item = { label: tsEntry.name };
264016
+ item.kind = convertCompletionItemKind(tsEntry.kind);
264017
+ if (tsEntry.source && tsEntry.hasAction) item.sortText = "￿" + tsEntry.sortText;
264018
+ else item.sortText = tsEntry.sortText;
264019
+ const { sourceDisplay, isSnippet, labelDetails } = tsEntry;
264020
+ if (sourceDisplay) {
264021
+ item.labelDetails ??= {};
264022
+ item.labelDetails.description = ts.displayPartsToString(sourceDisplay);
264023
+ }
264024
+ if (labelDetails) {
264025
+ item.labelDetails ??= {};
264026
+ Object.assign(item.labelDetails, labelDetails);
264027
+ }
264028
+ item.preselect = tsEntry.isRecommended;
264029
+ let range = getRangeFromReplacementSpan(tsEntry, document);
264030
+ item.commitCharacters = getCommitCharacters(tsEntry, {
264031
+ isNewIdentifierLocation: completionContext.isNewIdentifierLocation,
264032
+ isInValidCommitCharacterContext: isInValidCommitCharacterContext(document, position),
264033
+ enableCallCompletions: true
264034
+ });
264035
+ item.insertText = tsEntry.insertText;
264036
+ item.insertTextFormat = isSnippet ? 2 : 1;
264037
+ item.filterText = getFilterText(tsEntry, wordRange, line, tsEntry.insertText);
264038
+ if (completionContext?.isMemberCompletion && dotAccessorContext && !isSnippet) {
264039
+ item.filterText = dotAccessorContext.text + (item.insertText || item.label);
264040
+ if (!range) {
264041
+ const replacementRange = wordRange;
264042
+ if (replacementRange) range = {
264043
+ inserting: dotAccessorContext.range,
264044
+ replacing: rangeUnion(dotAccessorContext.range, replacementRange)
264045
+ };
264046
+ else range = dotAccessorContext.range;
264047
+ item.insertText = item.filterText;
264048
+ }
264049
+ }
264050
+ handleKindModifiers(item, tsEntry);
264051
+ if (!range && wordRange) range = {
264052
+ inserting: {
264053
+ start: wordRange.start,
264054
+ end: position
264055
+ },
264056
+ replacing: wordRange
264057
+ };
264058
+ if (range) if ("start" in range) item.textEdit = {
264059
+ range,
264060
+ newText: item.insertText || item.label
264061
+ };
264062
+ else item.textEdit = {
264063
+ insert: range.inserting,
264064
+ replace: range.replacing,
264065
+ newText: item.insertText || item.label
264066
+ };
264067
+ return item;
264068
+ }
264069
+ function getDotAccessorContext(document) {
264070
+ let dotAccessorContext;
264071
+ if (gte_300) {
264072
+ if (!completionContext) return;
264073
+ if (completionContext.isMemberCompletion) {
264074
+ const dotMatch = line.slice(0, position.character).match(/\??\.\s*$/) || void 0;
264075
+ if (dotMatch) {
264076
+ const range = {
264077
+ start: {
264078
+ line: position.line,
264079
+ character: position.character - dotMatch[0].length
264080
+ },
264081
+ end: position
264082
+ };
264083
+ dotAccessorContext = {
264084
+ range,
264085
+ text: document.getText(range)
264086
+ };
264087
+ }
264088
+ }
264089
+ }
264090
+ return dotAccessorContext;
264091
+ }
264092
+ function getRangeFromReplacementSpan(tsEntry, document) {
264093
+ if (!tsEntry.replacementSpan) return;
264094
+ let replaceRange = {
264095
+ start: document.positionAt(tsEntry.replacementSpan.start),
264096
+ end: document.positionAt(tsEntry.replacementSpan.start + tsEntry.replacementSpan.length)
264097
+ };
264098
+ if (replaceRange.start.line !== replaceRange.end.line) replaceRange = {
264099
+ start: {
264100
+ line: replaceRange.start.line,
264101
+ character: replaceRange.start.character
264102
+ },
264103
+ end: {
264104
+ line: replaceRange.start.line,
264105
+ character: document.positionAt(document.offsetAt({
264106
+ line: replaceRange.start.line + 1,
264107
+ character: 0
264108
+ }) - 1).character
264109
+ }
264110
+ };
264111
+ return {
264112
+ inserting: replaceRange,
264113
+ replacing: replaceRange
264114
+ };
264115
+ }
264116
+ function getFilterText(tsEntry, wordRange, line, insertText) {
264117
+ if (tsEntry.name.startsWith("#")) {
264118
+ const wordStart = wordRange ? line.charAt(wordRange.start.character) : void 0;
264119
+ if (insertText) if (insertText.startsWith("this.#")) return wordStart === "#" ? insertText : insertText.replace(/^this\.#/, "");
264120
+ else return insertText;
264121
+ else return wordStart === "#" ? void 0 : tsEntry.name.replace(/^#/, "");
264122
+ }
264123
+ if (insertText?.startsWith("this.")) return;
264124
+ else if (insertText?.startsWith("[")) return insertText.replace(/^\[['"](.+)[['"]\]$/, ".$1");
264125
+ return insertText;
264126
+ }
264127
+ function getCommitCharacters(entry, context) {
264128
+ if (entry.kind === PConst.Kind.warning) return;
264129
+ if (context.isNewIdentifierLocation || !context.isInValidCommitCharacterContext) return;
264130
+ const commitCharacters = [
264131
+ ".",
264132
+ ",",
264133
+ ";"
264134
+ ];
264135
+ if (context.enableCallCompletions) commitCharacters.push("(");
264136
+ return commitCharacters;
264137
+ }
264138
+ function isInValidCommitCharacterContext(document, position) {
264139
+ if (lt_320) {
264140
+ if (position.character > 1) return document.getText({
264141
+ start: {
264142
+ line: position.line,
264143
+ character: 0
264144
+ },
264145
+ end: position
264146
+ }).match(/(\s|^)\.$/gi) === null;
264147
+ }
264148
+ return true;
264149
+ }
264150
+ }
264151
+ function convertCompletionItemKind(kind) {
264152
+ switch (kind) {
264153
+ case PConst.Kind.primitiveType:
264154
+ case PConst.Kind.keyword: return 14;
264155
+ case PConst.Kind.const:
264156
+ case PConst.Kind.let:
264157
+ case PConst.Kind.variable:
264158
+ case PConst.Kind.localVariable:
264159
+ case PConst.Kind.alias:
264160
+ case PConst.Kind.parameter: return 6;
264161
+ case PConst.Kind.memberVariable:
264162
+ case PConst.Kind.memberGetAccessor:
264163
+ case PConst.Kind.memberSetAccessor: return 5;
264164
+ case PConst.Kind.function:
264165
+ case PConst.Kind.localFunction: return 3;
264166
+ case PConst.Kind.method:
264167
+ case PConst.Kind.constructSignature:
264168
+ case PConst.Kind.callSignature:
264169
+ case PConst.Kind.indexSignature: return 2;
264170
+ case PConst.Kind.enum: return 13;
264171
+ case PConst.Kind.enumMember: return 20;
264172
+ case PConst.Kind.module:
264173
+ case PConst.Kind.externalModuleName: return 9;
264174
+ case PConst.Kind.class:
264175
+ case PConst.Kind.type: return 7;
264176
+ case PConst.Kind.interface: return 8;
264177
+ case PConst.Kind.warning: return 1;
264178
+ case PConst.Kind.script: return 17;
264179
+ case PConst.Kind.directory: return 19;
264180
+ case PConst.Kind.string: return 21;
264181
+ default: return 10;
264182
+ }
264183
+ }
264184
+ function handleKindModifiers(item, tsEntry) {
264185
+ if (tsEntry.kindModifiers) {
264186
+ const kindModifiers = (0, modifiers_1.parseKindModifier)(tsEntry.kindModifiers);
264187
+ if (kindModifiers.has(PConst.KindModifiers.optional)) {
264188
+ if (!item.insertText) item.insertText = item.label;
264189
+ if (!item.filterText) item.filterText = item.label;
264190
+ item.label += "?";
264191
+ }
264192
+ if (kindModifiers.has(PConst.KindModifiers.deprecated)) item.tags = [1];
264193
+ if (kindModifiers.has(PConst.KindModifiers.color)) item.kind = 16;
264194
+ if (tsEntry.kind === PConst.Kind.script) {
264195
+ for (const extModifier of PConst.KindModifiers.fileExtensionKindModifiers) if (kindModifiers.has(extModifier)) {
264196
+ if (tsEntry.name.toLowerCase().endsWith(extModifier)) item.detail = tsEntry.name;
264197
+ else item.detail = tsEntry.name + extModifier;
264198
+ break;
264199
+ }
264200
+ }
264201
+ }
264202
+ }
264203
+ function rangeUnion(a, b) {
264204
+ return {
264205
+ start: a.start.line < b.start.line || a.start.line === b.start.line && a.start.character < b.start.character ? a.start : b.start,
264206
+ end: a.end.line > b.end.line || a.end.line === b.end.line && a.end.character > b.end.character ? a.end : b.end
264207
+ };
264208
+ }
264209
+ function getLineText(document, line) {
264210
+ const endOffset = document.offsetAt({
264211
+ line: line + 1,
264212
+ character: 0
264213
+ });
264214
+ const end = document.positionAt(endOffset);
264215
+ return document.getText({
264216
+ start: {
264217
+ line,
264218
+ character: 0
264219
+ },
264220
+ end: end.line === line ? end : document.positionAt(endOffset - 1)
264221
+ });
264222
+ }
264223
+ function convertNavigateToItem(item, document) {
264224
+ const info = {
264225
+ name: getLabel(item),
264226
+ kind: convertScriptElementKind(item.kind),
264227
+ location: {
264228
+ uri: document.uri,
264229
+ range: convertTextSpan(item.textSpan, document)
264230
+ }
264231
+ };
264232
+ if ((item.kindModifiers ? (0, modifiers_1.parseKindModifier)(item.kindModifiers) : void 0)?.has(PConst.KindModifiers.deprecated)) info.tags = [1];
264233
+ return info;
264234
+ }
264235
+ function getLabel(item) {
264236
+ const label = item.name;
264237
+ if (item.kind === "method" || item.kind === "function") return label + "()";
264238
+ return label;
264239
+ }
264240
+ function convertScriptElementKind(kind) {
264241
+ switch (kind) {
264242
+ case PConst.Kind.method: return 6;
264243
+ case PConst.Kind.enum: return 10;
264244
+ case PConst.Kind.enumMember: return 22;
264245
+ case PConst.Kind.function: return 12;
264246
+ case PConst.Kind.class: return 5;
264247
+ case PConst.Kind.interface: return 11;
264248
+ case PConst.Kind.type: return 5;
264249
+ case PConst.Kind.memberVariable: return 8;
264250
+ case PConst.Kind.memberGetAccessor: return 8;
264251
+ case PConst.Kind.memberSetAccessor: return 8;
264252
+ case PConst.Kind.variable: return 13;
264253
+ default: return 13;
264254
+ }
264255
+ }
264256
+ function convertInlayHint(hint, document) {
264257
+ const result = {
264258
+ position: document.positionAt(hint.position),
264259
+ label: hint.text,
264260
+ kind: hint.kind === "Type" ? 1 : hint.kind === "Parameter" ? 2 : void 0
264261
+ };
264262
+ result.paddingLeft = hint.whitespaceBefore;
264263
+ result.paddingRight = hint.whitespaceAfter;
264264
+ return result;
264265
+ }
264266
+ function convertHighlightSpan(span, document) {
264267
+ return {
264268
+ kind: span.kind === "writtenReference" ? 3 : 2,
264269
+ range: convertTextSpan(span.textSpan, document)
264270
+ };
264271
+ }
264272
+ function convertSelectionRange(range, document) {
264273
+ return {
264274
+ parent: range.parent ? convertSelectionRange(range.parent, document) : void 0,
264275
+ range: convertTextSpan(range.textSpan, document)
264276
+ };
264277
+ }
264278
+ function convertFileTextChanges(changes, fileNameToUri, getTextDocument) {
264279
+ const workspaceEdit = {};
264280
+ for (const change of changes) {
264281
+ if (!workspaceEdit.documentChanges) workspaceEdit.documentChanges = [];
264282
+ const uri = fileNameToUri(change.fileName);
264283
+ if (change.isNewFile) {
264284
+ workspaceEdit.documentChanges.push({
264285
+ kind: "create",
264286
+ uri: uri.toString()
264287
+ });
264288
+ workspaceEdit.documentChanges.push({
264289
+ textDocument: {
264290
+ uri: uri.toString(),
264291
+ version: null
264292
+ },
264293
+ edits: change.textChanges.map((edit) => ({
264294
+ newText: edit.newText,
264295
+ range: {
264296
+ start: {
264297
+ line: 0,
264298
+ character: edit.span.start
264299
+ },
264300
+ end: {
264301
+ line: 0,
264302
+ character: edit.span.start + edit.span.length
264303
+ }
264304
+ }
264305
+ }))
264306
+ });
264307
+ } else {
264308
+ const doc = getTextDocument(uri);
264309
+ workspaceEdit.documentChanges.push({
264310
+ textDocument: {
264311
+ uri: uri.toString(),
264312
+ version: null
264313
+ },
264314
+ edits: change.textChanges.map((edit) => convertTextChange(edit, doc))
264315
+ });
264316
+ }
264317
+ }
264318
+ return workspaceEdit;
264319
+ }
264320
+ function convertRenameLocations(newText, locations, fileNameToUri, getTextDocument) {
264321
+ const workspaceEdit = {};
264322
+ for (const location of locations) {
264323
+ if (!workspaceEdit.changes) workspaceEdit.changes = {};
264324
+ const uri = fileNameToUri(location.fileName);
264325
+ const doc = getTextDocument(uri);
264326
+ if (!workspaceEdit.changes[uri.toString()]) workspaceEdit.changes[uri.toString()] = [];
264327
+ let _newText = newText;
264328
+ if (location.prefixText) _newText = location.prefixText + _newText;
264329
+ if (location.suffixText) _newText = _newText + location.suffixText;
264330
+ workspaceEdit.changes[uri.toString()].push({
264331
+ newText: _newText,
264332
+ range: convertTextSpan(location.textSpan, doc)
264333
+ });
264334
+ }
264335
+ return workspaceEdit;
264336
+ }
264337
+ function convertQuickInfo(ts, info, document, fileNameToUri, getTextDocument) {
264338
+ const parts = [];
264339
+ const displayString = ts.displayPartsToString(info.displayParts);
264340
+ const documentation = previewer.markdownDocumentation(info.documentation ?? [], info.tags, fileNameToUri, getTextDocument);
264341
+ if (displayString) parts.push([
264342
+ "```typescript",
264343
+ displayString,
264344
+ "```"
264345
+ ].join("\n"));
264346
+ if (documentation) parts.push(documentation);
264347
+ return {
264348
+ contents: {
264349
+ kind: "markdown",
264350
+ value: parts.join("\n\n")
264351
+ },
264352
+ range: convertTextSpan(info.textSpan, document)
264353
+ };
264354
+ }
264355
+ function convertNavTree(item, document) {
264356
+ if (!shouldIncludeEntry(item)) return [];
264357
+ let remain = item.childItems ?? [];
264358
+ return item.spans.map((span) => {
264359
+ const childItems = [];
264360
+ remain = remain.filter((child) => {
264361
+ const childStart = child.spans[0].start;
264362
+ const childEnd = child.spans[child.spans.length - 1].start + child.spans[child.spans.length - 1].length;
264363
+ if (childStart >= span.start && childEnd <= span.start + span.length) {
264364
+ childItems.push(child);
264365
+ return false;
264366
+ }
264367
+ return true;
264368
+ });
264369
+ const nameSpan = item.spans.length === 1 ? item.nameSpan ?? span : span;
264370
+ const fullRange = {
264371
+ start: Math.min(span.start, nameSpan.start),
264372
+ end: Math.max(span.start + span.length, nameSpan.start + nameSpan.length)
264373
+ };
264374
+ const symbol = {
264375
+ name: item.text,
264376
+ kind: getSymbolKind(item.kind),
264377
+ range: convertTextSpan({
264378
+ start: fullRange.start,
264379
+ length: fullRange.end - fullRange.start
264380
+ }, document),
264381
+ selectionRange: convertTextSpan(nameSpan, document),
264382
+ children: childItems.map((item) => convertNavTree(item, document)).flat()
264383
+ };
264384
+ if ((0, modifiers_1.parseKindModifier)(item.kindModifiers).has(PConst.KindModifiers.deprecated)) {
264385
+ symbol.deprecated = true;
264386
+ symbol.tags ??= [];
264387
+ symbol.tags.push(1);
264388
+ }
264389
+ return symbol;
264390
+ });
264391
+ }
264392
+ var getSymbolKind = (kind) => {
264393
+ switch (kind) {
264394
+ case PConst.Kind.module: return 2;
264395
+ case PConst.Kind.class: return 5;
264396
+ case PConst.Kind.enum: return 10;
264397
+ case PConst.Kind.interface: return 11;
264398
+ case PConst.Kind.method: return 6;
264399
+ case PConst.Kind.memberVariable: return 7;
264400
+ case PConst.Kind.memberGetAccessor: return 7;
264401
+ case PConst.Kind.memberSetAccessor: return 7;
264402
+ case PConst.Kind.variable: return 13;
264403
+ case PConst.Kind.const: return 13;
264404
+ case PConst.Kind.localVariable: return 13;
264405
+ case PConst.Kind.function: return 12;
264406
+ case PConst.Kind.localFunction: return 12;
264407
+ case PConst.Kind.constructSignature: return 9;
264408
+ case PConst.Kind.constructorImplementation: return 9;
264409
+ }
264410
+ return 13;
264411
+ };
264412
+ function shouldIncludeEntry(item) {
264413
+ if (item.kind === PConst.Kind.alias) return false;
264414
+ return !!(item.text && item.text !== "<function>" && item.text !== "<class>");
264415
+ }
264416
+ function convertOutliningSpan(outliningSpan, document) {
264417
+ const start = document.positionAt(outliningSpan.textSpan.start);
264418
+ const end = adjustFoldingEnd(start, document.positionAt(outliningSpan.textSpan.start + outliningSpan.textSpan.length), document);
264419
+ return {
264420
+ startLine: start.line,
264421
+ endLine: end.line,
264422
+ startCharacter: start.character,
264423
+ endCharacter: end.character,
264424
+ kind: convertOutliningSpanKind(outliningSpan.kind)
264425
+ };
264426
+ }
264427
+ function convertOutliningSpanKind(kind) {
264428
+ switch (kind) {
264429
+ case "comment": return "comment";
264430
+ case "region": return "region";
264431
+ case "imports": return "imports";
264432
+ default: return;
264433
+ }
264434
+ }
264435
+ var foldEndPairCharacters = [
264436
+ "}",
264437
+ "]",
264438
+ ")",
264439
+ "`"
264440
+ ];
264441
+ function adjustFoldingEnd(start, end, document) {
264442
+ if (end.character > 0) {
264443
+ const foldEndCharacter = document.getText({
264444
+ start: {
264445
+ line: end.line,
264446
+ character: end.character - 1
264447
+ },
264448
+ end
264449
+ });
264450
+ if (foldEndPairCharacters.includes(foldEndCharacter)) {
264451
+ const endOffset = Math.max(document.offsetAt({
264452
+ line: end.line,
264453
+ character: 0
264454
+ }) - 1, document.offsetAt(start));
264455
+ return document.positionAt(endOffset);
264456
+ }
264457
+ }
264458
+ return end;
264459
+ }
264460
+ function convertTextChange(edit, document) {
264461
+ return {
264462
+ range: convertTextSpan(edit.span, document),
264463
+ newText: edit.newText
264464
+ };
264465
+ }
264466
+ function convertCallHierarchyIncomingCall(item, ctx) {
264467
+ const uri = ctx.fileNameToUri(item.from.file);
264468
+ const document = ctx.getTextDocument(uri);
264469
+ return {
264470
+ from: convertCallHierarchyItem(item.from, ctx),
264471
+ fromRanges: item.fromSpans.map((span) => convertTextSpan(span, document)).filter((span) => !!span)
264472
+ };
264473
+ }
264474
+ function convertCallHierarchyOutgoingCall(item, fromDocument, ctx) {
264475
+ return {
264476
+ to: convertCallHierarchyItem(item.to, ctx),
264477
+ fromRanges: item.fromSpans.map((span) => convertTextSpan(span, fromDocument)).filter((span) => !!span)
264478
+ };
264479
+ }
264480
+ function convertCallHierarchyItem(item, ctx) {
264481
+ const rootPath = ctx.languageService.getProgram()?.getCompilerOptions().rootDir ?? "";
264482
+ const uri = ctx.fileNameToUri(item.file);
264483
+ const document = ctx.getTextDocument(uri);
264484
+ const useFileName = isSourceFileItem(item);
264485
+ const name = useFileName ? path.basename(item.file) : item.name;
264486
+ const detail = useFileName ? path.relative(rootPath, path.dirname(item.file)) : item.containerName ?? "";
264487
+ const result = {
264488
+ kind: typeConverters.SymbolKind.fromProtocolScriptElementKind(item.kind),
264489
+ name,
264490
+ detail,
264491
+ uri: uri.toString(),
264492
+ range: convertTextSpan(item.span, document),
264493
+ selectionRange: convertTextSpan(item.selectionSpan, document)
264494
+ };
264495
+ if ((item.kindModifiers ? (0, modifiers_1.parseKindModifier)(item.kindModifiers) : void 0)?.has(PConst.KindModifiers.deprecated)) result.tags = [1];
264496
+ return result;
264497
+ }
264498
+ function isSourceFileItem(item) {
264499
+ return item.kind === PConst.Kind.script || item.kind === PConst.Kind.module && item.selectionSpan.start === 0;
264500
+ }
264501
+ function convertDocumentSpanToLocation(documentSpan, ctx) {
264502
+ const uri = ctx.fileNameToUri(documentSpan.fileName);
264503
+ const document = ctx.getTextDocument(uri);
264504
+ const range = convertTextSpan(documentSpan.textSpan, document);
264505
+ return {
264506
+ uri: uri.toString(),
264507
+ range
264508
+ };
264509
+ }
264510
+ function convertDefinitionInfoAndBoundSpan(info, document, ctx) {
264511
+ if (!info.definitions) return [];
264512
+ const originSelectionRange = convertTextSpan(info.textSpan, document);
264513
+ return info.definitions.map((entry) => {
264514
+ const link = convertDocumentSpantoLocationLink(entry, ctx);
264515
+ if (link) {
264516
+ link.originSelectionRange ??= originSelectionRange;
264517
+ return link;
264518
+ }
264519
+ }).filter((entry) => !!entry);
264520
+ }
264521
+ function convertDocumentSpantoLocationLink(documentSpan, ctx) {
264522
+ const targetUri = ctx.fileNameToUri(documentSpan.fileName);
264523
+ const document = ctx.getTextDocument(targetUri);
264524
+ const targetSelectionRange = convertTextSpan(documentSpan.textSpan, document);
264525
+ const targetRange = documentSpan.contextSpan ? convertTextSpan(documentSpan.contextSpan, document) : targetSelectionRange;
264526
+ const originSelectionRange = documentSpan.originalTextSpan ? convertTextSpan(documentSpan.originalTextSpan, document) : void 0;
264527
+ return {
264528
+ targetUri: targetUri.toString(),
264529
+ targetRange,
264530
+ targetSelectionRange,
264531
+ originSelectionRange
264532
+ };
264533
+ }
264534
+ function convertTextSpan(textSpan, document) {
264535
+ if (!document) return {
264536
+ start: {
264537
+ line: 0,
264538
+ character: 0
264539
+ },
264540
+ end: {
264541
+ line: 0,
264542
+ character: 0
264543
+ }
264544
+ };
264545
+ return {
264546
+ start: document.positionAt(textSpan.start),
264547
+ end: document.positionAt(textSpan.start + textSpan.length)
264548
+ };
264549
+ }
264550
+ }));
264551
+ //#endregion
263402
264552
  //#region node_modules/volar-service-typescript/lib/semanticFeatures/codeActionResolve.js
263403
264553
  var require_codeActionResolve = /* @__PURE__ */ __commonJSMin(((exports) => {
263404
264554
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -263665,6 +264815,128 @@ var require_codeAction = /* @__PURE__ */ __commonJSMin(((exports) => {
263665
264815
  }
263666
264816
  }));
263667
264817
  //#endregion
264818
+ //#region node_modules/volar-service-typescript/lib/semanticFeatures/semanticTokens.js
264819
+ var require_semanticTokens = /* @__PURE__ */ __commonJSMin(((exports) => {
264820
+ Object.defineProperty(exports, "__esModule", { value: true });
264821
+ exports.register = register;
264822
+ exports.convertClassificationsToSemanticTokens = convertClassificationsToSemanticTokens;
264823
+ var shared_1 = require_shared();
264824
+ function register(ts, ctx) {
264825
+ return (uri, document, range, legend) => {
264826
+ const fileName = ctx.uriToFileName(uri);
264827
+ const start = range ? document.offsetAt(range.start) : 0;
264828
+ const length = range ? document.offsetAt(range.end) - start : document.getText().length;
264829
+ if (ctx.project.typescript?.languageServiceHost.getCancellationToken?.().isCancellationRequested()) return;
264830
+ const response = (0, shared_1.safeCall)(() => ctx.languageService.getEncodedSemanticClassifications(fileName, {
264831
+ start,
264832
+ length
264833
+ }, ts.SemanticClassificationFormat.TwentyTwenty));
264834
+ if (!response) return;
264835
+ return convertClassificationsToSemanticTokens(document, {
264836
+ start,
264837
+ length
264838
+ }, legend, response);
264839
+ };
264840
+ }
264841
+ function convertClassificationsToSemanticTokens(document, { start, length }, legend, response) {
264842
+ let tokenModifiersTable = [];
264843
+ tokenModifiersTable[2] = 1 << legend.tokenModifiers.indexOf("async");
264844
+ tokenModifiersTable[0] = 1 << legend.tokenModifiers.indexOf("declaration");
264845
+ tokenModifiersTable[3] = 1 << legend.tokenModifiers.indexOf("readonly");
264846
+ tokenModifiersTable[1] = 1 << legend.tokenModifiers.indexOf("static");
264847
+ tokenModifiersTable[5] = 1 << legend.tokenModifiers.indexOf("local");
264848
+ tokenModifiersTable[4] = 1 << legend.tokenModifiers.indexOf("defaultLibrary");
264849
+ tokenModifiersTable = tokenModifiersTable.map((mod) => Math.max(mod, 0));
264850
+ const end = start + length;
264851
+ const tokenSpan = response.spans;
264852
+ const tokens = [];
264853
+ let i = 0;
264854
+ while (i < tokenSpan.length) {
264855
+ const offset = tokenSpan[i++];
264856
+ if (offset >= end) break;
264857
+ const length = tokenSpan[i++];
264858
+ const tsClassification = tokenSpan[i++];
264859
+ const tokenType = getTokenTypeFromClassification(tsClassification);
264860
+ if (tokenType === void 0) continue;
264861
+ const tokenModifiers = getTokenModifierFromClassification(tsClassification);
264862
+ const startPos = document.positionAt(offset);
264863
+ const endPos = document.positionAt(offset + length);
264864
+ const serverToken = tsTokenTypeToServerTokenType(tokenType);
264865
+ if (serverToken === void 0) continue;
264866
+ const serverTokenModifiers = tsTokenModifierToServerTokenModifier(tokenModifiers);
264867
+ for (let line = startPos.line; line <= endPos.line; line++) {
264868
+ const startCharacter = line === startPos.line ? startPos.character : 0;
264869
+ const endCharacter = line === endPos.line ? endPos.character : docLineLength(document, line);
264870
+ tokens.push([
264871
+ line,
264872
+ startCharacter,
264873
+ endCharacter - startCharacter,
264874
+ serverToken,
264875
+ serverTokenModifiers
264876
+ ]);
264877
+ }
264878
+ }
264879
+ return tokens;
264880
+ function tsTokenTypeToServerTokenType(tokenType) {
264881
+ return legend.tokenTypes.indexOf(tokenTypes[tokenType]);
264882
+ }
264883
+ function tsTokenModifierToServerTokenModifier(input) {
264884
+ let m = 0;
264885
+ let i = 0;
264886
+ while (input) {
264887
+ if (input & 1) m |= tokenModifiersTable[i];
264888
+ input = input >> 1;
264889
+ i++;
264890
+ }
264891
+ return m;
264892
+ }
264893
+ }
264894
+ function docLineLength(document, line) {
264895
+ const currentLineOffset = document.offsetAt({
264896
+ line,
264897
+ character: 0
264898
+ });
264899
+ return document.offsetAt({
264900
+ line: line + 1,
264901
+ character: 0
264902
+ }) - currentLineOffset;
264903
+ }
264904
+ function getTokenTypeFromClassification(tsClassification) {
264905
+ if (tsClassification > 255) return (tsClassification >> 8) - 1;
264906
+ }
264907
+ function getTokenModifierFromClassification(tsClassification) {
264908
+ return tsClassification & 255;
264909
+ }
264910
+ var tokenTypes = [];
264911
+ tokenTypes[0] = "class";
264912
+ tokenTypes[1] = "enum";
264913
+ tokenTypes[2] = "interface";
264914
+ tokenTypes[3] = "namespace";
264915
+ tokenTypes[4] = "typeParameter";
264916
+ tokenTypes[5] = "type";
264917
+ tokenTypes[6] = "parameter";
264918
+ tokenTypes[7] = "variable";
264919
+ tokenTypes[8] = "enumMember";
264920
+ tokenTypes[9] = "property";
264921
+ tokenTypes[10] = "function";
264922
+ tokenTypes[11] = "method";
264923
+ var tokenModifiers = [];
264924
+ tokenModifiers[2] = "async";
264925
+ tokenModifiers[0] = "declaration";
264926
+ tokenModifiers[3] = "readonly";
264927
+ tokenModifiers[1] = "static";
264928
+ tokenModifiers[5] = "local";
264929
+ tokenModifiers[4] = "defaultLibrary";
264930
+ var tokenTypeMap = [];
264931
+ tokenTypeMap[11] = 0;
264932
+ tokenTypeMap[12] = 1;
264933
+ tokenTypeMap[13] = 2;
264934
+ tokenTypeMap[14] = 3;
264935
+ tokenTypeMap[15] = 4;
264936
+ tokenTypeMap[16] = 5;
264937
+ tokenTypeMap[17] = 6;
264938
+ }));
264939
+ //#endregion
263668
264940
  //#region node_modules/volar-service-typescript/lib/utils/snippetForFunctionCall.js
263669
264941
  var require_snippetForFunctionCall = /* @__PURE__ */ __commonJSMin(((exports) => {
263670
264942
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -266081,7 +267353,7 @@ var require_connection$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
266081
267353
  const toCancel = messageQueue.get(key);
266082
267354
  if (messages_1.Message.isRequest(toCancel)) {
266083
267355
  const strategy = options?.connectionStrategy;
266084
- const response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
267356
+ const response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : void 0;
266085
267357
  if (response && (response.error !== void 0 || response.result !== void 0)) {
266086
267358
  messageQueue.delete(key);
266087
267359
  requestTokens.delete(cancelId);