@powerhousedao/powerhouse-vetra-packages 6.2.3-dev.5 → 6.2.3-dev.51

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 (117) hide show
  1. package/dist/browser/assets/{entry-5_Eh4a2Z.js → entry-BETsJgYg.js} +111 -7
  2. package/dist/browser/assets/{projection-entry-5PVbP10h.js → projection-entry-CdlLTrjU.js} +99 -21
  3. package/dist/browser/document-models/index.js +2 -1
  4. package/dist/browser/{documents-J_l59mSV.js → documents-CRzouuNR.js} +631 -752
  5. package/dist/browser/documents-CRzouuNR.js.map +1 -0
  6. package/dist/browser/editor-C7KBR_ar.js +4676 -0
  7. package/dist/browser/editor-C7KBR_ar.js.map +1 -0
  8. package/dist/browser/{editor-Cbl_EDjI.js → editor-CiR6XQBO.js} +4 -5
  9. package/dist/browser/{editor-Cbl_EDjI.js.map → editor-CiR6XQBO.js.map} +1 -1
  10. package/dist/browser/editors/document-model-editor/module.js +1 -1
  11. package/dist/browser/editors/document-model-editor/module.js.map +1 -1
  12. package/dist/browser/editors/generic-drive-explorer/index.js +81 -65
  13. package/dist/browser/editors/generic-drive-explorer/index.js.map +1 -1
  14. package/dist/browser/editors/generic-drive-explorer/module.js +1 -1
  15. package/dist/browser/editors/generic-drive-explorer/module.js.map +1 -1
  16. package/dist/browser/folder-view-DSgXN79D.js +4409 -0
  17. package/dist/browser/folder-view-DSgXN79D.js.map +1 -0
  18. package/dist/browser/{graphql-editor-BcL3-Zha.js → graphql-editor-Cgi5UOrF.js} +98 -88
  19. package/dist/browser/graphql-editor-Cgi5UOrF.js.map +1 -0
  20. package/dist/{node/hooks-D0DcS3MV.mjs → browser/hooks-eQxBX7g4.js} +824 -444
  21. package/dist/browser/{hooks-KKcNp2X0.js.map → hooks-eQxBX7g4.js.map} +1 -1
  22. package/dist/browser/index.js +137 -34
  23. package/dist/browser/index.js.map +1 -1
  24. package/dist/browser/{json-editor-DHXQRIN5.js → json-editor-DfRD-pfk.js} +8 -9
  25. package/dist/browser/{json-editor-DHXQRIN5.js.map → json-editor-DfRD-pfk.js.map} +1 -1
  26. package/dist/browser/{parser-CkF6Qt8V.js → parser-DtbeHA3H.js} +7 -6
  27. package/dist/browser/{parser-CkF6Qt8V.js.map → parser-DtbeHA3H.js.map} +1 -1
  28. package/dist/browser/rolldown-runtime-DC62tzP2.js +33 -0
  29. package/dist/browser/src-CrUksCLW-B2dkRdgq.js +5254 -0
  30. package/dist/browser/src-CrUksCLW-B2dkRdgq.js.map +1 -0
  31. package/dist/browser/state-schemas-B5Bk_l1s.js +696 -0
  32. package/dist/browser/state-schemas-B5Bk_l1s.js.map +1 -0
  33. package/dist/browser/tslib.es6-Cno80yFJ.js +32 -0
  34. package/dist/browser/tslib.es6-Cno80yFJ.js.map +1 -0
  35. package/dist/node/document-models/index.mjs +2 -1
  36. package/dist/node/documents-D70S9PZL.mjs +17 -0
  37. package/dist/node/documents-D70S9PZL.mjs.map +1 -0
  38. package/dist/node/editor-96sMeumV.mjs +4597 -0
  39. package/dist/node/editor-96sMeumV.mjs.map +1 -0
  40. package/dist/node/{editor-DG1q4Y55.mjs → editor-wqvKwcO5.mjs} +4 -5
  41. package/dist/node/{editor-DG1q4Y55.mjs.map → editor-wqvKwcO5.mjs.map} +1 -1
  42. package/dist/node/editors/document-model-editor/module.mjs +1 -1
  43. package/dist/node/editors/document-model-editor/module.mjs.map +1 -1
  44. package/dist/node/editors/generic-drive-explorer/index.mjs +26 -21
  45. package/dist/node/editors/generic-drive-explorer/index.mjs.map +1 -1
  46. package/dist/node/editors/generic-drive-explorer/module.mjs +1 -1
  47. package/dist/node/editors/generic-drive-explorer/module.mjs.map +1 -1
  48. package/dist/node/folder-view-ktfv2Cvw.mjs +4409 -0
  49. package/dist/node/folder-view-ktfv2Cvw.mjs.map +1 -0
  50. package/dist/node/{graphql-BfAoPeWM.mjs → graphql-Dp4j7rmx.mjs} +50 -49
  51. package/dist/node/{graphql-BfAoPeWM.mjs.map → graphql-Dp4j7rmx.mjs.map} +1 -1
  52. package/dist/node/{graphql-editor-B-XIb6az.mjs → graphql-editor-CBJXEY_C.mjs} +77 -63
  53. package/dist/node/graphql-editor-CBJXEY_C.mjs.map +1 -0
  54. package/dist/{browser/hooks-KKcNp2X0.js → node/hooks-C2b46djt.mjs} +824 -444
  55. package/dist/node/{hooks-D0DcS3MV.mjs.map → hooks-C2b46djt.mjs.map} +1 -1
  56. package/dist/node/index.mjs +158 -35
  57. package/dist/node/index.mjs.map +1 -1
  58. package/dist/node/{json-editor-DB0vi6tV.mjs → json-editor-DaqHARBD.mjs} +8 -9
  59. package/dist/node/{json-editor-DB0vi6tV.mjs.map → json-editor-DaqHARBD.mjs.map} +1 -1
  60. package/dist/node/{schema-context-DL8jhi_d.mjs → schema-context-CojjnSE6.mjs} +6 -5
  61. package/dist/node/schema-context-CojjnSE6.mjs.map +1 -0
  62. package/dist/node/src-CrUksCLW-TvF37aMo.mjs +5935 -0
  63. package/dist/node/src-CrUksCLW-TvF37aMo.mjs.map +1 -0
  64. package/dist/node/state-schemas-BHuo0GPl.mjs +698 -0
  65. package/dist/node/state-schemas-BHuo0GPl.mjs.map +1 -0
  66. package/dist/node/{main-B1tRsYOp.mjs → tslib.es6-VORZjfk3.mjs} +40 -202
  67. package/dist/node/tslib.es6-VORZjfk3.mjs.map +1 -0
  68. package/package.json +12 -12
  69. package/dist/browser/button-CuO8Gh3v.js +0 -696
  70. package/dist/browser/button-CuO8Gh3v.js.map +0 -1
  71. package/dist/browser/connect-BtHSAuSc.js +0 -14328
  72. package/dist/browser/connect-BtHSAuSc.js.map +0 -1
  73. package/dist/browser/dist-B4FWbuEM.js +0 -4148
  74. package/dist/browser/dist-B4FWbuEM.js.map +0 -1
  75. package/dist/browser/dist-BAJ5nRDl.js +0 -2711
  76. package/dist/browser/dist-BAJ5nRDl.js.map +0 -1
  77. package/dist/browser/dist-D69hfRZN.js +0 -4641
  78. package/dist/browser/dist-D69hfRZN.js.map +0 -1
  79. package/dist/browser/document-drive-BEXJ-rHp.js +0 -8277
  80. package/dist/browser/document-drive-BEXJ-rHp.js.map +0 -1
  81. package/dist/browser/documents-J_l59mSV.js.map +0 -1
  82. package/dist/browser/editor-mNThkZOv.js +0 -1809
  83. package/dist/browser/editor-mNThkZOv.js.map +0 -1
  84. package/dist/browser/folder-view-D8AkN1Oj.js +0 -232
  85. package/dist/browser/folder-view-D8AkN1Oj.js.map +0 -1
  86. package/dist/browser/graphql-editor-BcL3-Zha.js.map +0 -1
  87. package/dist/browser/lib-ewnRj2dJ.js +0 -209
  88. package/dist/browser/lib-ewnRj2dJ.js.map +0 -1
  89. package/dist/browser/printer-CEYr4JOg.js +0 -604
  90. package/dist/browser/printer-CEYr4JOg.js.map +0 -1
  91. package/dist/browser/schema-context-ZyeclQwy.js +0 -69
  92. package/dist/browser/schema-context-ZyeclQwy.js.map +0 -1
  93. package/dist/browser/state-schemas-C4F8lReN.js +0 -298
  94. package/dist/browser/state-schemas-C4F8lReN.js.map +0 -1
  95. package/dist/node/button-Da7CxMn7.mjs +0 -678
  96. package/dist/node/button-Da7CxMn7.mjs.map +0 -1
  97. package/dist/node/connect-B6IQsY6u.mjs +0 -15022
  98. package/dist/node/connect-B6IQsY6u.mjs.map +0 -1
  99. package/dist/node/dist-CzYOpeXN.mjs +0 -2711
  100. package/dist/node/dist-CzYOpeXN.mjs.map +0 -1
  101. package/dist/node/dist-DT7jI9ol.mjs +0 -4148
  102. package/dist/node/dist-DT7jI9ol.mjs.map +0 -1
  103. package/dist/node/dist-hd-KLWy7.mjs +0 -4649
  104. package/dist/node/dist-hd-KLWy7.mjs.map +0 -1
  105. package/dist/node/document-drive-CkV9NvD7.mjs +0 -8294
  106. package/dist/node/document-drive-CkV9NvD7.mjs.map +0 -1
  107. package/dist/node/documents-DCf53bzO.mjs +0 -747
  108. package/dist/node/documents-DCf53bzO.mjs.map +0 -1
  109. package/dist/node/editor-C93fdI28.mjs +0 -1809
  110. package/dist/node/editor-C93fdI28.mjs.map +0 -1
  111. package/dist/node/folder-view-BGabHV7H.mjs +0 -232
  112. package/dist/node/folder-view-BGabHV7H.mjs.map +0 -1
  113. package/dist/node/graphql-editor-B-XIb6az.mjs.map +0 -1
  114. package/dist/node/main-B1tRsYOp.mjs.map +0 -1
  115. package/dist/node/schema-context-DL8jhi_d.mjs.map +0 -1
  116. package/dist/node/state-schemas-BGsgtEG1.mjs +0 -299
  117. package/dist/node/state-schemas-BGsgtEG1.mjs.map +0 -1
@@ -1,7 +1,8 @@
1
- import { i as updateTimeout } from "./documents-DCf53bzO.mjs";
1
+ import { i as updateTimeout } from "./documents-CRzouuNR.js";
2
2
  import { useEffect, useRef } from "react";
3
3
  //#region ../../node_modules/.pnpm/@marijn+find-cluster-break@1.0.2/node_modules/@marijn/find-cluster-break/src/index.js
4
- let rangeFrom = [], rangeTo = [];
4
+ let rangeFrom = [];
5
+ let rangeTo = [];
5
6
  (() => {
6
7
  let numbers = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((s) => s ? parseInt(s, 36) : 1);
7
8
  for (let i = 0, n = 0; i < numbers.length; i++) (i % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i]);
@@ -383,7 +384,7 @@ var TextNode = class TextNode extends Text {
383
384
  return chunked.length == 1 ? chunked[0] : new TextNode(chunked, length);
384
385
  }
385
386
  };
386
- Text.empty = /* @__PURE__ */ new TextLeaf([""], 0);
387
+ Text.empty = /*@__PURE__*/ new TextLeaf([""], 0);
387
388
  function textLength(text) {
388
389
  let length = -1;
389
390
  for (let line of text) length += line.length + 1;
@@ -517,12 +518,13 @@ var LineCursor = class {
517
518
  } else if (done) {
518
519
  this.done = true;
519
520
  this.value = "";
520
- } else if (lineBreak) if (this.afterBreak) this.value = "";
521
- else {
522
- this.afterBreak = true;
523
- this.next();
524
- }
525
- else {
521
+ } else if (lineBreak) {
522
+ if (this.afterBreak) this.value = "";
523
+ else {
524
+ this.afterBreak = true;
525
+ this.next();
526
+ }
527
+ } else {
526
528
  this.value = value;
527
529
  this.afterBreak = false;
528
530
  }
@@ -614,7 +616,7 @@ const DefaultSplit = /\r\n?|\n/;
614
616
  /**
615
617
  Distinguishes different ways in which positions can be mapped.
616
618
  */
617
- var MapMode = /* @__PURE__ */ (function(MapMode) {
619
+ var MapMode = /*@__PURE__*/ (function(MapMode) {
618
620
  /**
619
621
  Map a position to a valid new position, even when its context
620
622
  was deleted.
@@ -1574,7 +1576,7 @@ function dynamicFacetSlot(addresses, facet, providers) {
1574
1576
  }
1575
1577
  };
1576
1578
  }
1577
- const initField = /* @__PURE__ */ Facet.define({ static: true });
1579
+ const initField = /*@__PURE__*/ Facet.define({ static: true });
1578
1580
  /**
1579
1581
  Fields can store additional information in an editor state, and
1580
1582
  keep it in sync with the rest of the state.
@@ -1676,11 +1678,30 @@ final ordering of extensions is determined by first sorting by
1676
1678
  precedence and then by order within each precedence.
1677
1679
  */
1678
1680
  const Prec = {
1679
- highest: /* @__PURE__ */ prec(Prec_.highest),
1680
- high: /* @__PURE__ */ prec(Prec_.high),
1681
- default: /* @__PURE__ */ prec(Prec_.default),
1682
- low: /* @__PURE__ */ prec(Prec_.low),
1683
- lowest: /* @__PURE__ */ prec(Prec_.lowest)
1681
+ /**
1682
+ The highest precedence level, for extensions that should end up
1683
+ near the start of the precedence ordering.
1684
+ */
1685
+ highest: /*@__PURE__*/ prec(Prec_.highest),
1686
+ /**
1687
+ A higher-than-default precedence, for extensions that should
1688
+ come before those with default precedence.
1689
+ */
1690
+ high: /*@__PURE__*/ prec(Prec_.high),
1691
+ /**
1692
+ The default precedence, which is also used for extensions
1693
+ without an explicit precedence.
1694
+ */
1695
+ default: /*@__PURE__*/ prec(Prec_.default),
1696
+ /**
1697
+ A lower-than-default precedence.
1698
+ */
1699
+ low: /*@__PURE__*/ prec(Prec_.low),
1700
+ /**
1701
+ The lowest precedence level. Meant for things that should end up
1702
+ near the end of the extension order.
1703
+ */
1704
+ lowest: /*@__PURE__*/ prec(Prec_.lowest)
1684
1705
  };
1685
1706
  var PrecExtension = class {
1686
1707
  constructor(inner, prec) {
@@ -1778,7 +1799,8 @@ var Configuration = class Configuration {
1778
1799
  dynamicSlots.push((a) => dynamicFacetSlot(a, facet, providers));
1779
1800
  }
1780
1801
  }
1781
- return new Configuration(base, newCompartments, dynamicSlots.map((f) => f(address)), address, staticValues, facets);
1802
+ let dynamic = dynamicSlots.map((f) => f(address));
1803
+ return new Configuration(base, newCompartments, dynamic, address, staticValues, facets);
1782
1804
  }
1783
1805
  };
1784
1806
  function flatten(extension, compartments, newCompartments) {
@@ -1834,19 +1856,19 @@ function ensureAddr(state, addr) {
1834
1856
  function getAddr(state, addr) {
1835
1857
  return addr & 1 ? state.config.staticValues[addr >> 1] : state.values[addr >> 1];
1836
1858
  }
1837
- const languageData = /* @__PURE__ */ Facet.define();
1838
- const allowMultipleSelections = /* @__PURE__ */ Facet.define({
1859
+ const languageData = /*@__PURE__*/ Facet.define();
1860
+ const allowMultipleSelections = /*@__PURE__*/ Facet.define({
1839
1861
  combine: (values) => values.some((v) => v),
1840
1862
  static: true
1841
1863
  });
1842
- const lineSeparator = /* @__PURE__ */ Facet.define({
1864
+ const lineSeparator = /*@__PURE__*/ Facet.define({
1843
1865
  combine: (values) => values.length ? values[0] : void 0,
1844
1866
  static: true
1845
1867
  });
1846
- const changeFilter = /* @__PURE__ */ Facet.define();
1847
- const transactionFilter = /* @__PURE__ */ Facet.define();
1848
- const transactionExtender = /* @__PURE__ */ Facet.define();
1849
- const readOnly = /* @__PURE__ */ Facet.define({ combine: (values) => values.length ? values[0] : false });
1868
+ const changeFilter = /*@__PURE__*/ Facet.define();
1869
+ const transactionFilter = /*@__PURE__*/ Facet.define();
1870
+ const transactionExtender = /*@__PURE__*/ Facet.define();
1871
+ const readOnly = /*@__PURE__*/ Facet.define({ combine: (values) => values.length ? values[0] : false });
1850
1872
  /**
1851
1873
  Annotations are tagged values that are used to add metadata to
1852
1874
  transactions in an extensible way. They should be used to model
@@ -1961,11 +1983,11 @@ the editor. Doing this will discard any extensions
1961
1983
  the content of [reconfigured](https://codemirror.net/6/docs/ref/#state.Compartment.reconfigure)
1962
1984
  compartments.
1963
1985
  */
1964
- StateEffect.reconfigure = /* @__PURE__ */ StateEffect.define();
1986
+ StateEffect.reconfigure = /*@__PURE__*/ StateEffect.define();
1965
1987
  /**
1966
1988
  Append extensions to the top-level configuration of the editor.
1967
1989
  */
1968
- StateEffect.appendConfig = /* @__PURE__ */ StateEffect.define();
1990
+ StateEffect.appendConfig = /*@__PURE__*/ StateEffect.define();
1969
1991
  /**
1970
1992
  Changes to the editor state are grouped into transactions.
1971
1993
  Typically, a user action creates a single transaction, which may
@@ -2067,7 +2089,7 @@ var Transaction = class Transaction {
2067
2089
  Annotation used to store transaction timestamps. Automatically
2068
2090
  added to every transaction, holding `Date.now()`.
2069
2091
  */
2070
- Transaction.time = /* @__PURE__ */ Annotation.define();
2092
+ Transaction.time = /*@__PURE__*/ Annotation.define();
2071
2093
  /**
2072
2094
  Annotation used to associate a transaction with a user interface
2073
2095
  event. Holds a string identifying the event, using a
@@ -2094,19 +2116,19 @@ information. The events used by the core libraries are:
2094
2116
  Use [`isUserEvent`](https://codemirror.net/6/docs/ref/#state.Transaction.isUserEvent) to check
2095
2117
  whether the annotation matches a given event.
2096
2118
  */
2097
- Transaction.userEvent = /* @__PURE__ */ Annotation.define();
2119
+ Transaction.userEvent = /*@__PURE__*/ Annotation.define();
2098
2120
  /**
2099
2121
  Annotation indicating whether a transaction should be added to
2100
2122
  the undo history or not.
2101
2123
  */
2102
- Transaction.addToHistory = /* @__PURE__ */ Annotation.define();
2124
+ Transaction.addToHistory = /*@__PURE__*/ Annotation.define();
2103
2125
  /**
2104
2126
  Annotation indicating (when present and true) that a transaction
2105
2127
  represents a change made by some other actor, not the user. This
2106
2128
  is used, for example, to tag other people's changes in
2107
2129
  collaborative editing.
2108
2130
  */
2109
- Transaction.remote = /* @__PURE__ */ Annotation.define();
2131
+ Transaction.remote = /*@__PURE__*/ Annotation.define();
2110
2132
  function joinRanges(a, b) {
2111
2133
  let result = [];
2112
2134
  for (let iA = 0, iB = 0;;) {
@@ -2213,7 +2235,7 @@ The categories produced by a [character
2213
2235
  categorizer](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer). These are used
2214
2236
  do things like selecting by word.
2215
2237
  */
2216
- var CharCategory = /* @__PURE__ */ (function(CharCategory) {
2238
+ var CharCategory = /*@__PURE__*/ (function(CharCategory) {
2217
2239
  /**
2218
2240
  Word characters.
2219
2241
  */
@@ -2231,7 +2253,7 @@ var CharCategory = /* @__PURE__ */ (function(CharCategory) {
2231
2253
  const nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
2232
2254
  let wordChar;
2233
2255
  try {
2234
- wordChar = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
2256
+ wordChar = /*@__PURE__*/ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
2235
2257
  } catch (_) {}
2236
2258
  function hasWordChar(str) {
2237
2259
  if (wordChar) return wordChar.test(str);
@@ -2568,7 +2590,7 @@ Configures the tab size to use in this state. The first
2568
2590
  (highest-precedence) value of the facet is used. If no value is
2569
2591
  given, this defaults to 4.
2570
2592
  */
2571
- EditorState.tabSize = /* @__PURE__ */ Facet.define({ combine: (values) => values.length ? values[0] : 4 });
2593
+ EditorState.tabSize = /*@__PURE__*/ Facet.define({ combine: (values) => values.length ? values[0] : 4 });
2572
2594
  /**
2573
2595
  The line separator to use. By default, any of `"\n"`, `"\r\n"`
2574
2596
  and `"\r"` is treated as a separator when splitting lines, and
@@ -2599,7 +2621,7 @@ Registers translation phrases. The
2599
2621
  all objects registered with this facet to find translations for
2600
2622
  its argument.
2601
2623
  */
2602
- EditorState.phrases = /* @__PURE__ */ Facet.define({ compare(a, b) {
2624
+ EditorState.phrases = /*@__PURE__*/ Facet.define({ compare(a, b) {
2603
2625
  let kA = Object.keys(a), kB = Object.keys(b);
2604
2626
  return kA.length == kB.length && kA.every((k) => a[k] == b[k]);
2605
2627
  } });
@@ -2657,7 +2679,7 @@ but do want to process every transaction.
2657
2679
  Extenders run _after_ filters, when both are present.
2658
2680
  */
2659
2681
  EditorState.transactionExtender = transactionExtender;
2660
- Compartment.reconfigure = /* @__PURE__ */ StateEffect.define();
2682
+ Compartment.reconfigure = /*@__PURE__*/ StateEffect.define();
2661
2683
  /**
2662
2684
  Utility function for combining behaviors to fill in a config
2663
2685
  object from an array of provided configs. `defaults` should hold
@@ -2929,7 +2951,7 @@ var RangeSet = class RangeSet {
2929
2951
  if they are equivalent in the given range.
2930
2952
  */
2931
2953
  static eq(oldSets, newSets, from = 0, to) {
2932
- if (to == null) to = 999999999;
2954
+ if (to == null) to = 1e9 - 1;
2933
2955
  let a = oldSets.filter((set) => !set.isEmpty && newSets.indexOf(set) < 0);
2934
2956
  let b = newSets.filter((set) => !set.isEmpty && oldSets.indexOf(set) < 0);
2935
2957
  if (a.length != b.length) return false;
@@ -2994,7 +3016,7 @@ var RangeSet = class RangeSet {
2994
3016
  /**
2995
3017
  The empty set of ranges.
2996
3018
  */
2997
- RangeSet.empty = /* @__PURE__ */ new RangeSet([], [], null, -1);
3019
+ RangeSet.empty = /*@__PURE__*/ new RangeSet([], [], null, -1);
2998
3020
  function lazySort(ranges) {
2999
3021
  if (ranges.length > 1) for (let prev = ranges[0], i = 1; i < ranges.length; i++) {
3000
3022
  let cur = ranges[i];
@@ -3148,7 +3170,8 @@ var LayerCursor = class {
3148
3170
  break;
3149
3171
  } else {
3150
3172
  let chunkPos = this.layer.chunkPos[this.chunkIndex], chunk = this.layer.chunk[this.chunkIndex];
3151
- this.from = chunkPos + chunk.from[this.rangeIndex];
3173
+ let from = chunkPos + chunk.from[this.rangeIndex];
3174
+ this.from = from;
3152
3175
  this.to = chunkPos + chunk.to[this.rangeIndex];
3153
3176
  this.value = chunk.value[this.rangeIndex];
3154
3177
  this.setRangeIndex(this.rangeIndex + 1);
@@ -3401,7 +3424,7 @@ function findColumn(string, col, tabSize, strict) {
3401
3424
  //#endregion
3402
3425
  //#region ../../node_modules/.pnpm/style-mod@4.1.3/node_modules/style-mod/src/style-mod.js
3403
3426
  const C = "ͼ";
3404
- const COUNT = typeof Symbol == "undefined" ? "__" + C : Symbol.for(C);
3427
+ const COUNT = typeof Symbol == "undefined" ? "__ͼ" : Symbol.for(C);
3405
3428
  const SET = typeof Symbol == "undefined" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet");
3406
3429
  const top = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : {};
3407
3430
  var StyleModule = class {
@@ -3723,27 +3746,29 @@ function scrollRectIntoView(dom, rect, side, x, y, xMargin, yMargin, ltr) {
3723
3746
  if (side < 0 && rect.left < bounding.left + moveX) moveX = rect.left - (bounding.left + xMargin);
3724
3747
  }
3725
3748
  } else moveX = (x == "center" ? rect.left + (rect.right - rect.left) / 2 - (bounding.right - bounding.left) / 2 : x == "start" == ltr ? rect.left - xMargin : rect.right - (bounding.right - bounding.left) + xMargin) - bounding.left;
3726
- if (moveX || moveY) if (top) win.scrollBy(moveX, moveY);
3727
- else {
3728
- let movedX = 0, movedY = 0;
3729
- if (moveY) {
3730
- let start = cur.scrollTop;
3731
- cur.scrollTop += moveY / scaleY;
3732
- movedY = (cur.scrollTop - start) * scaleY;
3733
- }
3734
- if (moveX) {
3735
- let start = cur.scrollLeft;
3736
- cur.scrollLeft += moveX / scaleX;
3737
- movedX = (cur.scrollLeft - start) * scaleX;
3738
- }
3739
- rect = {
3740
- left: rect.left - movedX,
3741
- top: rect.top - movedY,
3742
- right: rect.right - movedX,
3743
- bottom: rect.bottom - movedY
3744
- };
3745
- if (movedX && Math.abs(movedX - moveX) < 1) x = "nearest";
3746
- if (movedY && Math.abs(movedY - moveY) < 1) y = "nearest";
3749
+ if (moveX || moveY) {
3750
+ if (top) win.scrollBy(moveX, moveY);
3751
+ else {
3752
+ let movedX = 0, movedY = 0;
3753
+ if (moveY) {
3754
+ let start = cur.scrollTop;
3755
+ cur.scrollTop += moveY / scaleY;
3756
+ movedY = (cur.scrollTop - start) * scaleY;
3757
+ }
3758
+ if (moveX) {
3759
+ let start = cur.scrollLeft;
3760
+ cur.scrollLeft += moveX / scaleX;
3761
+ movedX = (cur.scrollLeft - start) * scaleX;
3762
+ }
3763
+ rect = {
3764
+ left: rect.left - movedX,
3765
+ top: rect.top - movedY,
3766
+ right: rect.right - movedX,
3767
+ bottom: rect.bottom - movedY
3768
+ };
3769
+ if (movedX && Math.abs(movedX - moveX) < 1) x = "nearest";
3770
+ if (movedY && Math.abs(movedY - moveY) < 1) y = "nearest";
3771
+ }
3747
3772
  }
3748
3773
  if (top) break;
3749
3774
  if (rect.top < bounding.top || rect.bottom > bounding.bottom || rect.left < bounding.left || rect.right > bounding.right) rect = {
@@ -3974,8 +3999,10 @@ var ContentView = class ContentView {
3974
3999
  for (;;) {
3975
4000
  let parent = node.parentNode;
3976
4001
  if (parent == this.dom) break;
3977
- if (bias == 0 && parent.firstChild != parent.lastChild) if (node == parent.firstChild) bias = -1;
3978
- else bias = 1;
4002
+ if (bias == 0 && parent.firstChild != parent.lastChild) {
4003
+ if (node == parent.firstChild) bias = -1;
4004
+ else bias = 1;
4005
+ }
3979
4006
  node = parent;
3980
4007
  }
3981
4008
  if (bias < 0) after = node;
@@ -4142,8 +4169,10 @@ function replaceRange(parent, fromI, fromOff, toI, toOff, insert, breakAtStart,
4142
4169
  if (toOff || after.children.length && !after.children[0].length) after.merge(0, toOff, null, false, 0, openEnd);
4143
4170
  insert.push(after);
4144
4171
  }
4145
- } else if (after === null || after === void 0 ? void 0 : after.breakAfter) if (last) last.breakAfter = 1;
4146
- else breakAtStart = 1;
4172
+ } else if (after === null || after === void 0 ? void 0 : after.breakAfter) {
4173
+ if (last) last.breakAfter = 1;
4174
+ else breakAtStart = 1;
4175
+ }
4147
4176
  toI++;
4148
4177
  }
4149
4178
  if (before) {
@@ -4181,30 +4210,30 @@ let nav = typeof navigator != "undefined" ? navigator : {
4181
4210
  platform: ""
4182
4211
  };
4183
4212
  let doc = typeof document != "undefined" ? document : { documentElement: { style: {} } };
4184
- const ie_edge = /* @__PURE__ */ /Edge\/(\d+)/.exec(nav.userAgent);
4185
- const ie_upto10 = /* @__PURE__ */ /MSIE \d/.test(nav.userAgent);
4186
- const ie_11up = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nav.userAgent);
4213
+ const ie_edge = /*@__PURE__*/ /Edge\/(\d+)/.exec(nav.userAgent);
4214
+ const ie_upto10 = /*@__PURE__*/ /MSIE \d/.test(nav.userAgent);
4215
+ const ie_11up = /*@__PURE__*/ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nav.userAgent);
4187
4216
  const ie = !!(ie_upto10 || ie_11up || ie_edge);
4188
- const gecko = !ie && /* @__PURE__ */ /gecko\/(\d+)/i.test(nav.userAgent);
4189
- const chrome = !ie && /* @__PURE__ */ /Chrome\/(\d+)/.exec(nav.userAgent);
4217
+ const gecko = !ie && /*@__PURE__*/ /gecko\/(\d+)/i.test(nav.userAgent);
4218
+ const chrome = !ie && /*@__PURE__*/ /Chrome\/(\d+)/.exec(nav.userAgent);
4190
4219
  const webkit = "webkitFontSmoothing" in doc.documentElement.style;
4191
- const safari = !ie && /* @__PURE__ */ /Apple Computer/.test(nav.vendor);
4192
- const ios = safari && (/* @__PURE__ */ /Mobile\/\w+/.test(nav.userAgent) || nav.maxTouchPoints > 2);
4220
+ const safari = !ie && /*@__PURE__*/ /Apple Computer/.test(nav.vendor);
4221
+ const ios = safari && (/*@__PURE__*/ /Mobile\/\w+/.test(nav.userAgent) || nav.maxTouchPoints > 2);
4193
4222
  var browser = {
4194
- mac: ios || /* @__PURE__ */ /Mac/.test(nav.platform),
4195
- windows: /* @__PURE__ */ /Win/.test(nav.platform),
4196
- linux: /* @__PURE__ */ /Linux|X11/.test(nav.platform),
4223
+ mac: ios || /*@__PURE__*/ /Mac/.test(nav.platform),
4224
+ windows: /*@__PURE__*/ /Win/.test(nav.platform),
4225
+ linux: /*@__PURE__*/ /Linux|X11/.test(nav.platform),
4197
4226
  ie,
4198
4227
  ie_version: ie_upto10 ? doc.documentMode || 6 : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : 0,
4199
4228
  gecko,
4200
- gecko_version: gecko ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(nav.userAgent) || [0, 0])[1] : 0,
4229
+ gecko_version: gecko ? +(/*@__PURE__*/ /Firefox\/(\d+)/.exec(nav.userAgent) || [0, 0])[1] : 0,
4201
4230
  chrome: !!chrome,
4202
4231
  chrome_version: chrome ? +chrome[1] : 0,
4203
4232
  ios,
4204
- android: /* @__PURE__ */ /Android\b/.test(nav.userAgent),
4233
+ android: /*@__PURE__*/ /Android\b/.test(nav.userAgent),
4205
4234
  webkit,
4206
4235
  safari,
4207
- webkit_version: webkit ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(nav.userAgent) || [0, 0])[1] : 0,
4236
+ webkit_version: webkit ? +(/*@__PURE__*/ /\bAppleWebKit\/(\d+)/.exec(nav.userAgent) || [0, 0])[1] : 0,
4208
4237
  tabSize: doc.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size"
4209
4238
  };
4210
4239
  const MaxJoinLen = 256;
@@ -4542,7 +4571,7 @@ function combineAttrs(source, target) {
4542
4571
  else target[name] = source[name];
4543
4572
  return target;
4544
4573
  }
4545
- const noAttrs$1 = /* @__PURE__ */ Object.create(null);
4574
+ const noAttrs$1 = /*@__PURE__*/ Object.create(null);
4546
4575
  function attrsEq(a, b, ignore) {
4547
4576
  if (a == b) return true;
4548
4577
  if (!a) a = noAttrs$1;
@@ -4671,7 +4700,7 @@ var WidgetType = class {
4671
4700
  /**
4672
4701
  The different types of blocks that can occur in an editor view.
4673
4702
  */
4674
- var BlockType = /* @__PURE__ */ (function(BlockType) {
4703
+ var BlockType = /*@__PURE__*/ (function(BlockType) {
4675
4704
  /**
4676
4705
  A line of text.
4677
4706
  */
@@ -5184,26 +5213,27 @@ var ContentBuilder = class ContentBuilder {
5184
5213
  if (to > this.doc.lineAt(this.pos).to) throw new RangeError("Decorations that replace line breaks may not be specified via plugins");
5185
5214
  }
5186
5215
  let len = to - from;
5187
- if (deco instanceof PointDecoration) if (deco.block) {
5188
- if (deco.startSide > 0 && !this.posCovered()) this.getLine();
5189
- this.addBlockWidget(new BlockWidgetView(deco.widget || NullWidget.block, len, deco));
5190
- } else {
5191
- let view = WidgetView.create(deco.widget || NullWidget.inline, len, len ? 0 : deco.startSide);
5192
- let cursorBefore = this.atCursorPos && !view.isEditable && openStart <= active.length && (from < to || deco.startSide > 0);
5193
- let cursorAfter = !view.isEditable && (from < to || openStart > active.length || deco.startSide <= 0);
5194
- let line = this.getLine();
5195
- if (this.pendingBuffer == 2 && !cursorBefore && !view.isEditable) this.pendingBuffer = 0;
5196
- this.flushBuffer(active);
5197
- if (cursorBefore) {
5198
- line.append(wrapMarks(new WidgetBufferView(1), active), openStart);
5199
- openStart = active.length + Math.max(0, openStart - active.length);
5200
- }
5201
- line.append(wrapMarks(view, active), openStart);
5202
- this.atCursorPos = cursorAfter;
5203
- this.pendingBuffer = !cursorAfter ? 0 : from < to || openStart > active.length ? 1 : 2;
5204
- if (this.pendingBuffer) this.bufferMarks = active.slice();
5205
- }
5206
- else if (this.doc.lineAt(this.pos).from == this.pos) this.getLine().addLineDeco(deco);
5216
+ if (deco instanceof PointDecoration) {
5217
+ if (deco.block) {
5218
+ if (deco.startSide > 0 && !this.posCovered()) this.getLine();
5219
+ this.addBlockWidget(new BlockWidgetView(deco.widget || NullWidget.block, len, deco));
5220
+ } else {
5221
+ let view = WidgetView.create(deco.widget || NullWidget.inline, len, len ? 0 : deco.startSide);
5222
+ let cursorBefore = this.atCursorPos && !view.isEditable && openStart <= active.length && (from < to || deco.startSide > 0);
5223
+ let cursorAfter = !view.isEditable && (from < to || openStart > active.length || deco.startSide <= 0);
5224
+ let line = this.getLine();
5225
+ if (this.pendingBuffer == 2 && !cursorBefore && !view.isEditable) this.pendingBuffer = 0;
5226
+ this.flushBuffer(active);
5227
+ if (cursorBefore) {
5228
+ line.append(wrapMarks(new WidgetBufferView(1), active), openStart);
5229
+ openStart = active.length + Math.max(0, openStart - active.length);
5230
+ }
5231
+ line.append(wrapMarks(view, active), openStart);
5232
+ this.atCursorPos = cursorAfter;
5233
+ this.pendingBuffer = !cursorAfter ? 0 : from < to || openStart > active.length ? 1 : 2;
5234
+ if (this.pendingBuffer) this.bufferMarks = active.slice();
5235
+ }
5236
+ } else if (this.doc.lineAt(this.pos).from == this.pos) this.getLine().addLineDeco(deco);
5207
5237
  if (len) {
5208
5238
  if (this.textOff + len <= this.text.length) this.textOff += len;
5209
5239
  else {
@@ -5245,12 +5275,12 @@ var NullWidget = class extends WidgetType {
5245
5275
  return true;
5246
5276
  }
5247
5277
  };
5248
- NullWidget.inline = /* @__PURE__ */ new NullWidget("span");
5249
- NullWidget.block = /* @__PURE__ */ new NullWidget("div");
5278
+ NullWidget.inline = /*@__PURE__*/ new NullWidget("span");
5279
+ NullWidget.block = /*@__PURE__*/ new NullWidget("div");
5250
5280
  /**
5251
5281
  Used to indicate [text direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection).
5252
5282
  */
5253
- var Direction = /* @__PURE__ */ (function(Direction) {
5283
+ var Direction = /*@__PURE__*/ (function(Direction) {
5254
5284
  /**
5255
5285
  Left-to-right.
5256
5286
  */
@@ -5261,21 +5291,23 @@ var Direction = /* @__PURE__ */ (function(Direction) {
5261
5291
  Direction[Direction["RTL"] = 1] = "RTL";
5262
5292
  return Direction;
5263
5293
  })(Direction || (Direction = {}));
5264
- const LTR = Direction.LTR, RTL = Direction.RTL;
5294
+ const LTR = Direction.LTR;
5295
+ const RTL = Direction.RTL;
5265
5296
  function dec(str) {
5266
5297
  let result = [];
5267
5298
  for (let i = 0; i < str.length; i++) result.push(1 << +str[i]);
5268
5299
  return result;
5269
5300
  }
5270
- const LowTypes = /* @__PURE__ */ dec("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008");
5271
- const ArabicTypes = /* @__PURE__ */ dec("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333");
5272
- const Brackets = /* @__PURE__ */ Object.create(null), BracketStack = [];
5301
+ const LowTypes = /*@__PURE__*/ dec("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008");
5302
+ const ArabicTypes = /*@__PURE__*/ dec("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333");
5303
+ const Brackets = /*@__PURE__*/ Object.create(null);
5304
+ const BracketStack = [];
5273
5305
  for (let p of [
5274
5306
  "()",
5275
5307
  "[]",
5276
5308
  "{}"
5277
5309
  ]) {
5278
- let l = /* @__PURE__ */ p.charCodeAt(0), r = /* @__PURE__ */ p.charCodeAt(1);
5310
+ let l = /*@__PURE__*/ p.charCodeAt(0), r = /*@__PURE__*/ p.charCodeAt(1);
5279
5311
  Brackets[l] = r;
5280
5312
  Brackets[r] = -l;
5281
5313
  }
@@ -5353,9 +5385,10 @@ function computeCharTypes(line, rFrom, rTo, isolates, outerType) {
5353
5385
  }
5354
5386
  for (let i = from, prev = prevType, prevStrong = prevType; i < to; i++) {
5355
5387
  let type = types[i];
5356
- if (type == 128) if (i < to - 1 && prev == types[i + 1] && prev & 24) type = types[i] = prev;
5357
- else types[i] = 256;
5358
- else if (type == 64) {
5388
+ if (type == 128) {
5389
+ if (i < to - 1 && prev == types[i + 1] && prev & 24) type = types[i] = prev;
5390
+ else types[i] = 256;
5391
+ } else if (type == 64) {
5359
5392
  let end = i + 1;
5360
5393
  while (end < to && types[end] == 64) end++;
5361
5394
  let replace = i && prev == 8 || end < rTo && types[end] == 8 ? prevStrong == 1 ? 1 : 8 : 256;
@@ -5371,21 +5404,22 @@ function processBracketPairs(line, rFrom, rTo, isolates, outerType) {
5371
5404
  let oppositeType = outerType == 1 ? 2 : 1;
5372
5405
  for (let iI = 0, sI = 0, context = 0; iI <= isolates.length; iI++) {
5373
5406
  let from = iI ? isolates[iI - 1].to : rFrom, to = iI < isolates.length ? isolates[iI].from : rTo;
5374
- for (let i = from, ch, br, type; i < to; i++) if (br = Brackets[ch = line.charCodeAt(i)]) if (br < 0) {
5375
- for (let sJ = sI - 3; sJ >= 0; sJ -= 3) if (BracketStack[sJ + 1] == -br) {
5376
- let flags = BracketStack[sJ + 2];
5377
- let type = flags & 2 ? outerType : !(flags & 4) ? 0 : flags & 1 ? oppositeType : outerType;
5378
- if (type) types[i] = types[BracketStack[sJ]] = type;
5379
- sI = sJ;
5380
- break;
5407
+ for (let i = from, ch, br, type; i < to; i++) if (br = Brackets[ch = line.charCodeAt(i)]) {
5408
+ if (br < 0) {
5409
+ for (let sJ = sI - 3; sJ >= 0; sJ -= 3) if (BracketStack[sJ + 1] == -br) {
5410
+ let flags = BracketStack[sJ + 2];
5411
+ let type = flags & 2 ? outerType : !(flags & 4) ? 0 : flags & 1 ? oppositeType : outerType;
5412
+ if (type) types[i] = types[BracketStack[sJ]] = type;
5413
+ sI = sJ;
5414
+ break;
5415
+ }
5416
+ } else if (BracketStack.length == 189) break;
5417
+ else {
5418
+ BracketStack[sI++] = i;
5419
+ BracketStack[sI++] = ch;
5420
+ BracketStack[sI++] = context;
5381
5421
  }
5382
- } else if (BracketStack.length == 189) break;
5383
- else {
5384
- BracketStack[sI++] = i;
5385
- BracketStack[sI++] = ch;
5386
- BracketStack[sI++] = context;
5387
- }
5388
- else if ((type = types[i]) == 2 || type == 1) {
5422
+ } else if ((type = types[i]) == 2 || type == 1) {
5389
5423
  let embed = type == outerType;
5390
5424
  context = embed ? 0 : 1;
5391
5425
  for (let sJ = sI - 3; sJ >= 0; sJ -= 3) {
@@ -5548,18 +5582,18 @@ function autoDirection(text, from, to) {
5548
5582
  }
5549
5583
  return LTR;
5550
5584
  }
5551
- const clickAddsSelectionRange = /* @__PURE__ */ Facet.define();
5552
- const dragMovesSelection$1 = /* @__PURE__ */ Facet.define();
5553
- const mouseSelectionStyle = /* @__PURE__ */ Facet.define();
5554
- const exceptionSink = /* @__PURE__ */ Facet.define();
5555
- const updateListener = /* @__PURE__ */ Facet.define();
5556
- const inputHandler$1 = /* @__PURE__ */ Facet.define();
5557
- const focusChangeEffect = /* @__PURE__ */ Facet.define();
5558
- const clipboardInputFilter = /* @__PURE__ */ Facet.define();
5559
- const clipboardOutputFilter = /* @__PURE__ */ Facet.define();
5560
- const perLineTextDirection = /* @__PURE__ */ Facet.define({ combine: (values) => values.some((x) => x) });
5561
- const nativeSelectionHidden = /* @__PURE__ */ Facet.define({ combine: (values) => values.some((x) => x) });
5562
- const scrollHandler = /* @__PURE__ */ Facet.define();
5585
+ const clickAddsSelectionRange = /*@__PURE__*/ Facet.define();
5586
+ const dragMovesSelection$1 = /*@__PURE__*/ Facet.define();
5587
+ const mouseSelectionStyle = /*@__PURE__*/ Facet.define();
5588
+ const exceptionSink = /*@__PURE__*/ Facet.define();
5589
+ const updateListener = /*@__PURE__*/ Facet.define();
5590
+ const inputHandler$1 = /*@__PURE__*/ Facet.define();
5591
+ const focusChangeEffect = /*@__PURE__*/ Facet.define();
5592
+ const clipboardInputFilter = /*@__PURE__*/ Facet.define();
5593
+ const clipboardOutputFilter = /*@__PURE__*/ Facet.define();
5594
+ const perLineTextDirection = /*@__PURE__*/ Facet.define({ combine: (values) => values.some((x) => x) });
5595
+ const nativeSelectionHidden = /*@__PURE__*/ Facet.define({ combine: (values) => values.some((x) => x) });
5596
+ const scrollHandler = /*@__PURE__*/ Facet.define();
5563
5597
  var ScrollTarget = class ScrollTarget {
5564
5598
  constructor(range, y = "nearest", x = "nearest", yMargin = 5, xMargin = 5, isSnapshot = false) {
5565
5599
  this.range = range;
@@ -5576,8 +5610,8 @@ var ScrollTarget = class ScrollTarget {
5576
5610
  return this.range.to <= state.doc.length ? this : new ScrollTarget(EditorSelection.cursor(state.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
5577
5611
  }
5578
5612
  };
5579
- const scrollIntoView$1 = /* @__PURE__ */ StateEffect.define({ map: (t, ch) => t.map(ch) });
5580
- const setEditContextFormatting = /* @__PURE__ */ StateEffect.define();
5613
+ const scrollIntoView$1 = /*@__PURE__*/ StateEffect.define({ map: (t, ch) => t.map(ch) });
5614
+ const setEditContextFormatting = /*@__PURE__*/ StateEffect.define();
5581
5615
  /**
5582
5616
  Log or report an unhandled exception in client code. Should
5583
5617
  probably only be used by extension code that allows client code to
@@ -5597,9 +5631,9 @@ function logException(state, exception, context) {
5597
5631
  else if (context) console.error(context + ":", exception);
5598
5632
  else console.error(exception);
5599
5633
  }
5600
- const editable = /* @__PURE__ */ Facet.define({ combine: (values) => values.length ? values[0] : true });
5634
+ const editable = /*@__PURE__*/ Facet.define({ combine: (values) => values.length ? values[0] : true });
5601
5635
  let nextPluginID = 0;
5602
- const viewPlugin = /* @__PURE__ */ Facet.define();
5636
+ const viewPlugin = /*@__PURE__*/ Facet.define();
5603
5637
  /**
5604
5638
  View plugins associate stateful values with a view. They can
5605
5639
  influence the way the content is drawn, and are notified of things
@@ -5678,12 +5712,12 @@ var PluginInstance = class {
5678
5712
  this.spec = this.value = null;
5679
5713
  }
5680
5714
  };
5681
- const editorAttributes = /* @__PURE__ */ Facet.define();
5682
- const contentAttributes = /* @__PURE__ */ Facet.define();
5683
- const decorations = /* @__PURE__ */ Facet.define();
5684
- const outerDecorations = /* @__PURE__ */ Facet.define();
5685
- const atomicRanges = /* @__PURE__ */ Facet.define();
5686
- const bidiIsolatedRanges = /* @__PURE__ */ Facet.define();
5715
+ const editorAttributes = /*@__PURE__*/ Facet.define();
5716
+ const contentAttributes = /*@__PURE__*/ Facet.define();
5717
+ const decorations = /*@__PURE__*/ Facet.define();
5718
+ const outerDecorations = /*@__PURE__*/ Facet.define();
5719
+ const atomicRanges = /*@__PURE__*/ Facet.define();
5720
+ const bidiIsolatedRanges = /*@__PURE__*/ Facet.define();
5687
5721
  function getIsolatedRanges(view, line) {
5688
5722
  let isolates = view.state.facet(bidiIsolatedRanges);
5689
5723
  if (!isolates.length) return isolates;
@@ -5715,7 +5749,7 @@ function getIsolatedRanges(view, line) {
5715
5749
  });
5716
5750
  return result;
5717
5751
  }
5718
- const scrollMargins = /* @__PURE__ */ Facet.define();
5752
+ const scrollMargins = /*@__PURE__*/ Facet.define();
5719
5753
  function getScrollMargins(view) {
5720
5754
  let left = 0, right = 0, top = 0, bottom = 0;
5721
5755
  for (let source of view.state.facet(scrollMargins)) {
@@ -5734,7 +5768,7 @@ function getScrollMargins(view) {
5734
5768
  bottom
5735
5769
  };
5736
5770
  }
5737
- const styleModule = /* @__PURE__ */ Facet.define();
5771
+ const styleModule = /*@__PURE__*/ Facet.define();
5738
5772
  var ChangedRange = class ChangedRange {
5739
5773
  constructor(fromA, toA, fromB, toB) {
5740
5774
  this.fromA = fromA;
@@ -5889,10 +5923,12 @@ var DocView = class extends ContentView {
5889
5923
  update(update) {
5890
5924
  var _a;
5891
5925
  let changedRanges = update.changedRanges;
5892
- if (this.minWidth > 0 && changedRanges.length) if (!changedRanges.every(({ fromA, toA }) => toA < this.minWidthFrom || fromA > this.minWidthTo)) this.minWidth = this.minWidthFrom = this.minWidthTo = 0;
5893
- else {
5894
- this.minWidthFrom = update.changes.mapPos(this.minWidthFrom, 1);
5895
- this.minWidthTo = update.changes.mapPos(this.minWidthTo, 1);
5926
+ if (this.minWidth > 0 && changedRanges.length) {
5927
+ if (!changedRanges.every(({ fromA, toA }) => toA < this.minWidthFrom || fromA > this.minWidthTo)) this.minWidth = this.minWidthFrom = this.minWidthTo = 0;
5928
+ else {
5929
+ this.minWidthFrom = update.changes.mapPos(this.minWidthFrom, 1);
5930
+ this.minWidthTo = update.changes.mapPos(this.minWidthTo, 1);
5931
+ }
5896
5932
  }
5897
5933
  this.updateEditContextFormatting(update);
5898
5934
  let readCompositionAt = -1;
@@ -6823,7 +6859,7 @@ function applyDOMChange(view, domChange) {
6823
6859
  }
6824
6860
  let diff = findDiff(view.state.doc.sliceString(from, to, LineBreakPlaceholder), domChange.text, preferredPos - from, preferredSide);
6825
6861
  if (diff) {
6826
- if (browser.chrome && lastKey == 13 && diff.toB == diff.from + 2 && domChange.text.slice(diff.from, diff.toB) == LineBreakPlaceholder + LineBreakPlaceholder) diff.toB--;
6862
+ if (browser.chrome && lastKey == 13 && diff.toB == diff.from + 2 && domChange.text.slice(diff.from, diff.toB) == "￿￿") diff.toB--;
6827
6863
  change = {
6828
6864
  from: from + diff.from,
6829
6865
  to: from + diff.toA,
@@ -7311,8 +7347,8 @@ function eventBelongsToEditor(view, event) {
7311
7347
  for (let node = event.target, cView; node != view.contentDOM; node = node.parentNode) if (!node || node.nodeType == 11 || (cView = ContentView.get(node)) && cView.ignoreEvent(event)) return false;
7312
7348
  return true;
7313
7349
  }
7314
- const handlers = /* @__PURE__ */ Object.create(null);
7315
- const observers = /* @__PURE__ */ Object.create(null);
7350
+ const handlers = /*@__PURE__*/ Object.create(null);
7351
+ const observers = /*@__PURE__*/ Object.create(null);
7316
7352
  const brokenClipboardAPI = browser.ie && browser.ie_version < 15 || browser.ios && browser.webkit_version < 604;
7317
7353
  function capturePaste(view) {
7318
7354
  let parent = view.dom.parentNode;
@@ -7441,7 +7477,9 @@ function queryPos(view, event) {
7441
7477
  };
7442
7478
  }
7443
7479
  const BadMouseDetail = browser.ie && browser.ie_version <= 11;
7444
- let lastMouseDown = null, lastMouseDownCount = 0, lastMouseDownTime = 0;
7480
+ let lastMouseDown = null;
7481
+ let lastMouseDownCount = 0;
7482
+ let lastMouseDownTime = 0;
7445
7483
  function getClickType(event) {
7446
7484
  if (!BadMouseDetail) return event.detail;
7447
7485
  let last = lastMouseDown, lastTime = lastMouseDownTime;
@@ -7632,7 +7670,7 @@ handlers.copy = handlers.cut = (view, event) => {
7632
7670
  return false;
7633
7671
  }
7634
7672
  };
7635
- const isFocusChange = /* @__PURE__ */ Annotation.define();
7673
+ const isFocusChange = /*@__PURE__*/ Annotation.define();
7636
7674
  function focusChangeTransaction(state, focus) {
7637
7675
  let effects = [];
7638
7676
  for (let getEffect of state.facet(focusChangeEffect)) {
@@ -7719,7 +7757,7 @@ handlers.beforeinput = (view, event) => {
7719
7757
  if (browser.safari && event.inputType == "insertText" && view.inputState.composing >= 0) setTimeout(() => observers.compositionend(view, event), 20);
7720
7758
  return false;
7721
7759
  };
7722
- const appliedFirefoxHack = /* @__PURE__ */ new Set();
7760
+ const appliedFirefoxHack = /*@__PURE__*/ new Set();
7723
7761
  function firefoxCopyCutHack(doc) {
7724
7762
  if (!appliedFirefoxHack.has(doc)) {
7725
7763
  appliedFirefoxHack.add(doc);
@@ -7860,7 +7898,7 @@ var BlockInfo = class BlockInfo {
7860
7898
  return new BlockInfo(this.from, this.length + other.length, this.top, this.height + other.height, content);
7861
7899
  }
7862
7900
  };
7863
- var QueryType$1 = /* @__PURE__ */ (function(QueryType) {
7901
+ var QueryType$1 = /*@__PURE__*/ (function(QueryType) {
7864
7902
  QueryType[QueryType["ByPos"] = 0] = "ByPos";
7865
7903
  QueryType[QueryType["ByHeight"] = 1] = "ByHeight";
7866
7904
  QueryType[QueryType["ByPosNoHeight"] = 2] = "ByPosNoHeight";
@@ -7921,20 +7959,21 @@ var HeightMap = class HeightMap {
7921
7959
  static of(nodes) {
7922
7960
  if (nodes.length == 1) return nodes[0];
7923
7961
  let i = 0, j = nodes.length, before = 0, after = 0;
7924
- for (;;) if (i == j) if (before > after * 2) {
7925
- let split = nodes[i - 1];
7926
- if (split.break) nodes.splice(--i, 1, split.left, null, split.right);
7927
- else nodes.splice(--i, 1, split.left, split.right);
7928
- j += 1 + split.break;
7929
- before -= split.size;
7930
- } else if (after > before * 2) {
7931
- let split = nodes[j];
7932
- if (split.break) nodes.splice(j, 1, split.left, null, split.right);
7933
- else nodes.splice(j, 1, split.left, split.right);
7934
- j += 2 + split.break;
7935
- after -= split.size;
7936
- } else break;
7937
- else if (before < after) {
7962
+ for (;;) if (i == j) {
7963
+ if (before > after * 2) {
7964
+ let split = nodes[i - 1];
7965
+ if (split.break) nodes.splice(--i, 1, split.left, null, split.right);
7966
+ else nodes.splice(--i, 1, split.left, split.right);
7967
+ j += 1 + split.break;
7968
+ before -= split.size;
7969
+ } else if (after > before * 2) {
7970
+ let split = nodes[j];
7971
+ if (split.break) nodes.splice(j, 1, split.left, null, split.right);
7972
+ else nodes.splice(j, 1, split.left, split.right);
7973
+ j += 2 + split.break;
7974
+ after -= split.size;
7975
+ } else break;
7976
+ } else if (before < after) {
7938
7977
  let next = nodes[i++];
7939
7978
  if (next) before += next.size;
7940
7979
  } else {
@@ -8442,7 +8481,8 @@ var ViewState = class {
8442
8481
  this.defaultTextDirection = Direction.LTR;
8443
8482
  this.visibleRanges = [];
8444
8483
  this.mustEnforceCursorAssoc = false;
8445
- this.heightOracle = new HeightOracle(state.facet(contentAttributes).some((v) => typeof v != "function" && v.class == "cm-lineWrapping"));
8484
+ let guessWrapping = state.facet(contentAttributes).some((v) => typeof v != "function" && v.class == "cm-lineWrapping");
8485
+ this.heightOracle = new HeightOracle(guessWrapping);
8446
8486
  this.stateDeco = state.facet(decorations).filter((d) => typeof d != "function");
8447
8487
  this.heightMap = HeightMap.empty().applyChanges(this.stateDeco, Text.empty, this.heightOracle.setDoc(state.doc), [new ChangedRange(0, 0, 0, state.doc.length)]);
8448
8488
  for (let i = 0; i < 2; i++) {
@@ -8613,7 +8653,7 @@ var ViewState = class {
8613
8653
  if (scrollTarget.y == "center") topPos = (block.top + block.bottom) / 2 - viewHeight / 2;
8614
8654
  else if (scrollTarget.y == "start" || scrollTarget.y == "nearest" && head < viewport.from) topPos = block.top;
8615
8655
  else topPos = block.bottom - viewHeight;
8616
- viewport = new Viewport(map.lineAt(topPos - 1e3 / 2, QueryType$1.ByHeight, oracle, 0, 0).from, map.lineAt(topPos + viewHeight + 1e3 / 2, QueryType$1.ByHeight, oracle, 0, 0).to);
8656
+ viewport = new Viewport(map.lineAt(topPos - 500, QueryType$1.ByHeight, oracle, 0, 0).from, map.lineAt(topPos + viewHeight + 500, QueryType$1.ByHeight, oracle, 0, 0).to);
8617
8657
  }
8618
8658
  }
8619
8659
  return viewport;
@@ -8627,7 +8667,7 @@ var ViewState = class {
8627
8667
  let { top } = this.heightMap.lineAt(from, QueryType$1.ByPos, this.heightOracle, 0, 0);
8628
8668
  let { bottom } = this.heightMap.lineAt(to, QueryType$1.ByPos, this.heightOracle, 0, 0);
8629
8669
  let { visibleTop, visibleBottom } = this;
8630
- return (from == 0 || top <= visibleTop - Math.max(10, Math.min(-bias, 250))) && (to == this.state.doc.length || bottom >= visibleBottom + Math.max(10, Math.min(bias, 250))) && top > visibleTop - 2 * 1e3 && bottom < visibleBottom + 2 * 1e3;
8670
+ return (from == 0 || top <= visibleTop - Math.max(10, Math.min(-bias, 250))) && (to == this.state.doc.length || bottom >= visibleBottom + Math.max(10, Math.min(bias, 250))) && top > visibleTop - 2e3 && bottom < visibleBottom + 2e3;
8631
8671
  }
8632
8672
  mapLineGaps(gaps, changes) {
8633
8673
  if (!gaps.length || changes.empty) return gaps;
@@ -8884,9 +8924,11 @@ function scaleBlock(block, scaler) {
8884
8924
  let bTop = scaler.toDOM(block.top), bBottom = scaler.toDOM(block.bottom);
8885
8925
  return new BlockInfo(block.from, block.length, bTop, bBottom - bTop, Array.isArray(block._content) ? block._content.map((b) => scaleBlock(b, scaler)) : block._content);
8886
8926
  }
8887
- const theme = /* @__PURE__ */ Facet.define({ combine: (strs) => strs.join(" ") });
8888
- const darkTheme = /* @__PURE__ */ Facet.define({ combine: (values) => values.indexOf(true) > -1 });
8889
- const baseThemeID = /* @__PURE__ */ StyleModule.newName(), baseLightID = /* @__PURE__ */ StyleModule.newName(), baseDarkID = /* @__PURE__ */ StyleModule.newName();
8927
+ const theme = /*@__PURE__*/ Facet.define({ combine: (strs) => strs.join(" ") });
8928
+ const darkTheme = /*@__PURE__*/ Facet.define({ combine: (values) => values.indexOf(true) > -1 });
8929
+ const baseThemeID = /*@__PURE__*/ StyleModule.newName();
8930
+ const baseLightID = /*@__PURE__*/ StyleModule.newName();
8931
+ const baseDarkID = /*@__PURE__*/ StyleModule.newName();
8890
8932
  const lightDarkIDs = {
8891
8933
  "&light": "." + baseLightID,
8892
8934
  "&dark": "." + baseDarkID
@@ -8900,7 +8942,7 @@ function buildTheme(main, spec, scopes) {
8900
8942
  }) : main + " " + sel;
8901
8943
  } });
8902
8944
  }
8903
- const baseTheme$1$5 = /* @__PURE__ */ buildTheme("." + baseThemeID, {
8945
+ const baseTheme$1$5 = /*@__PURE__*/ buildTheme("." + baseThemeID, {
8904
8946
  "&": {
8905
8947
  position: "relative !important",
8906
8948
  boxSizing: "border-box",
@@ -9398,18 +9440,20 @@ var DOMObserver = class {
9398
9440
  }
9399
9441
  addWindowListeners(win) {
9400
9442
  win.addEventListener("resize", this.onResize);
9401
- if (this.printQuery) if (this.printQuery.addEventListener) this.printQuery.addEventListener("change", this.onPrint);
9402
- else this.printQuery.addListener(this.onPrint);
9403
- else win.addEventListener("beforeprint", this.onPrint);
9443
+ if (this.printQuery) {
9444
+ if (this.printQuery.addEventListener) this.printQuery.addEventListener("change", this.onPrint);
9445
+ else this.printQuery.addListener(this.onPrint);
9446
+ } else win.addEventListener("beforeprint", this.onPrint);
9404
9447
  win.addEventListener("scroll", this.onScroll);
9405
9448
  win.document.addEventListener("selectionchange", this.onSelectionChange);
9406
9449
  }
9407
9450
  removeWindowListeners(win) {
9408
9451
  win.removeEventListener("scroll", this.onScroll);
9409
9452
  win.removeEventListener("resize", this.onResize);
9410
- if (this.printQuery) if (this.printQuery.removeEventListener) this.printQuery.removeEventListener("change", this.onPrint);
9411
- else this.printQuery.removeListener(this.onPrint);
9412
- else win.removeEventListener("beforeprint", this.onPrint);
9453
+ if (this.printQuery) {
9454
+ if (this.printQuery.removeEventListener) this.printQuery.removeEventListener("change", this.onPrint);
9455
+ else this.printQuery.removeListener(this.onPrint);
9456
+ } else win.removeEventListener("beforeprint", this.onPrint);
9413
9457
  win.document.removeEventListener("selectionchange", this.onSelectionChange);
9414
9458
  }
9415
9459
  update(update) {
@@ -9579,14 +9623,16 @@ var EditContextManager = class {
9579
9623
  update.changes.iterChanges((fromA, toA, _fromB, _toB, insert) => {
9580
9624
  if (abort) return;
9581
9625
  let dLen = insert.length - (toA - fromA);
9582
- if (pending && toA >= pending.to) if (pending.from == fromA && pending.to == toA && pending.insert.eq(insert)) {
9583
- pending = this.pendingContextChange = null;
9584
- off += dLen;
9585
- this.to += dLen;
9586
- return;
9587
- } else {
9588
- pending = null;
9589
- this.revertPending(update.state);
9626
+ if (pending && toA >= pending.to) {
9627
+ if (pending.from == fromA && pending.to == toA && pending.insert.eq(insert)) {
9628
+ pending = this.pendingContextChange = null;
9629
+ off += dLen;
9630
+ this.to += dLen;
9631
+ return;
9632
+ } else {
9633
+ pending = null;
9634
+ this.revertPending(update.state);
9635
+ }
9590
9636
  }
9591
9637
  fromA += off;
9592
9638
  toA += off;
@@ -9640,7 +9686,7 @@ var EditContextManager = class {
9640
9686
  }
9641
9687
  rangeIsValid(state) {
9642
9688
  let { head } = state.selection.main;
9643
- return !(this.from > 0 && head - this.from < 500 || this.to < state.doc.length && this.to - head < 500 || this.to - this.from > 1e4 * 3);
9689
+ return !(this.from > 0 && head - this.from < 500 || this.to < state.doc.length && this.to - head < 500 || this.to - this.from > 3e4);
9644
9690
  }
9645
9691
  toEditorPos(contextPos, clipLen = this.to - this.from) {
9646
9692
  contextPos = Math.min(contextPos, clipLen);
@@ -9945,13 +9991,15 @@ var EditorView = class EditorView {
9945
9991
  this.viewState.scrollAnchorHeight = -1;
9946
9992
  try {
9947
9993
  for (let i = 0;; i++) {
9948
- if (scrollAnchorHeight < 0) if (isScrolledToBottom(sDOM)) {
9949
- scrollAnchorPos = -1;
9950
- scrollAnchorHeight = this.viewState.heightMap.height;
9951
- } else {
9952
- let block = this.viewState.scrollAnchorAt(scrollTop);
9953
- scrollAnchorPos = block.from;
9954
- scrollAnchorHeight = block.top;
9994
+ if (scrollAnchorHeight < 0) {
9995
+ if (isScrolledToBottom(sDOM)) {
9996
+ scrollAnchorPos = -1;
9997
+ scrollAnchorHeight = this.viewState.heightMap.height;
9998
+ } else {
9999
+ let block = this.viewState.scrollAnchorAt(scrollTop);
10000
+ scrollAnchorPos = block.from;
10001
+ scrollAnchorHeight = block.top;
10002
+ }
9955
10003
  }
9956
10004
  this.updateState = 1;
9957
10005
  let changed = this.viewState.measure(this);
@@ -9990,18 +10038,20 @@ var EditorView = class EditorView {
9990
10038
  }
9991
10039
  if (redrawn) this.docView.updateSelection(true);
9992
10040
  if (!update.viewportChanged && this.measureRequests.length == 0) {
9993
- if (this.viewState.editorHeight) if (this.viewState.scrollTarget) {
9994
- this.docView.scrollIntoView(this.viewState.scrollTarget);
9995
- this.viewState.scrollTarget = null;
9996
- scrollAnchorHeight = -1;
9997
- continue;
9998
- } else {
9999
- let diff = (scrollAnchorPos < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(scrollAnchorPos).top) - scrollAnchorHeight;
10000
- if (diff > 1 || diff < -1) {
10001
- scrollTop = scrollTop + diff;
10002
- sDOM.scrollTop = scrollTop / this.scaleY;
10041
+ if (this.viewState.editorHeight) {
10042
+ if (this.viewState.scrollTarget) {
10043
+ this.docView.scrollIntoView(this.viewState.scrollTarget);
10044
+ this.viewState.scrollTarget = null;
10003
10045
  scrollAnchorHeight = -1;
10004
10046
  continue;
10047
+ } else {
10048
+ let diff = (scrollAnchorPos < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(scrollAnchorPos).top) - scrollAnchorHeight;
10049
+ if (diff > 1 || diff < -1) {
10050
+ scrollTop = scrollTop + diff;
10051
+ sDOM.scrollTop = scrollTop / this.scaleY;
10052
+ scrollAnchorHeight = -1;
10053
+ continue;
10054
+ }
10005
10055
  }
10006
10056
  }
10007
10057
  break;
@@ -10664,7 +10714,7 @@ Provides a Content Security Policy nonce to use when creating
10664
10714
  the style sheets for the editor. Holds the empty string when no
10665
10715
  nonce has been provided.
10666
10716
  */
10667
- EditorView.cspNonce = /* @__PURE__ */ Facet.define({ combine: (values) => values.length ? values[0] : "" });
10717
+ EditorView.cspNonce = /*@__PURE__*/ Facet.define({ combine: (values) => values.length ? values[0] : "" });
10668
10718
  /**
10669
10719
  Facet that provides additional DOM attributes for the editor's
10670
10720
  editable DOM element.
@@ -10679,7 +10729,7 @@ EditorView.editorAttributes = editorAttributes;
10679
10729
  An extension that enables line wrapping in the editor (by
10680
10730
  setting CSS `white-space` to `pre-wrap` in the content).
10681
10731
  */
10682
- EditorView.lineWrapping = /* @__PURE__ */ EditorView.contentAttributes.of({ "class": "cm-lineWrapping" });
10732
+ EditorView.lineWrapping = /*@__PURE__*/ EditorView.contentAttributes.of({ "class": "cm-lineWrapping" });
10683
10733
  /**
10684
10734
  State effect used to include screen reader announcements in a
10685
10735
  transaction. These will be added to the DOM in a visually hidden
@@ -10688,7 +10738,7 @@ describe effects that are visually obvious but may not be
10688
10738
  noticed by screen reader users (such as moving to the next
10689
10739
  search match).
10690
10740
  */
10691
- EditorView.announce = /* @__PURE__ */ StateEffect.define();
10741
+ EditorView.announce = /*@__PURE__*/ StateEffect.define();
10692
10742
  const MaxBidiLine = 4096;
10693
10743
  const BadMeasure = {};
10694
10744
  var CachedOrder = class CachedOrder {
@@ -10729,9 +10779,10 @@ function normalizeKeyName(name, platform) {
10729
10779
  else if (/^a(lt)?$/i.test(mod)) alt = true;
10730
10780
  else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;
10731
10781
  else if (/^s(hift)?$/i.test(mod)) shift = true;
10732
- else if (/^mod$/i.test(mod)) if (platform == "mac") meta = true;
10733
- else ctrl = true;
10734
- else throw new Error("Unrecognized modifier name: " + mod);
10782
+ else if (/^mod$/i.test(mod)) {
10783
+ if (platform == "mac") meta = true;
10784
+ else ctrl = true;
10785
+ } else throw new Error("Unrecognized modifier name: " + mod);
10735
10786
  }
10736
10787
  if (alt) result = "Alt-" + result;
10737
10788
  if (ctrl) result = "Ctrl-" + result;
@@ -10746,7 +10797,7 @@ function modifiers(name, event, shift) {
10746
10797
  if (shift !== false && event.shiftKey) name = "Shift-" + name;
10747
10798
  return name;
10748
10799
  }
10749
- const handleKeyEvents = /* @__PURE__ */ Prec.default(/* @__PURE__ */ EditorView.domEventHandlers({ keydown(event, view) {
10800
+ const handleKeyEvents = /*@__PURE__*/ Prec.default(/*@__PURE__*/ EditorView.domEventHandlers({ keydown(event, view) {
10750
10801
  return runHandlers(getKeymap(view.state), event, view, "editor");
10751
10802
  } }));
10752
10803
  /**
@@ -10757,8 +10808,8 @@ determine their precedence (the ones specified early or with high
10757
10808
  priority get checked first). When a handler has returned `true`
10758
10809
  for a given key, no further handlers are called.
10759
10810
  */
10760
- const keymap = /* @__PURE__ */ Facet.define({ enables: handleKeyEvents });
10761
- const Keymaps = /* @__PURE__ */ new WeakMap();
10811
+ const keymap = /*@__PURE__*/ Facet.define({ enables: handleKeyEvents });
10812
+ const Keymaps = /*@__PURE__*/ new WeakMap();
10762
10813
  function getKeymap(state) {
10763
10814
  let bindings = state.facet(keymap);
10764
10815
  let map = Keymaps.get(bindings);
@@ -11098,14 +11149,14 @@ var LayerView = class {
11098
11149
  this.dom.remove();
11099
11150
  }
11100
11151
  };
11101
- const layerOrder = /* @__PURE__ */ Facet.define();
11152
+ const layerOrder = /*@__PURE__*/ Facet.define();
11102
11153
  /**
11103
11154
  Define a layer.
11104
11155
  */
11105
11156
  function layer(config) {
11106
11157
  return [ViewPlugin.define((v) => new LayerView(v, config)), layerOrder.of(config)];
11107
11158
  }
11108
- const selectionConfig = /* @__PURE__ */ Facet.define({ combine(configs) {
11159
+ const selectionConfig = /*@__PURE__*/ Facet.define({ combine(configs) {
11109
11160
  return combineConfig(configs, {
11110
11161
  cursorBlinkRate: 1200,
11111
11162
  drawRangeCursor: true
@@ -11144,7 +11195,7 @@ function drawSelection(config = {}) {
11144
11195
  function configChanged(update) {
11145
11196
  return update.startState.facet(selectionConfig) != update.state.facet(selectionConfig);
11146
11197
  }
11147
- const cursorLayer = /* @__PURE__ */ layer({
11198
+ const cursorLayer = /*@__PURE__*/ layer({
11148
11199
  above: true,
11149
11200
  markers(view) {
11150
11201
  let { state } = view, conf = state.facet(selectionConfig);
@@ -11173,7 +11224,7 @@ const cursorLayer = /* @__PURE__ */ layer({
11173
11224
  function setBlinkRate(state, dom) {
11174
11225
  dom.style.animationDuration = state.facet(selectionConfig).cursorBlinkRate + "ms";
11175
11226
  }
11176
- const selectionLayer = /* @__PURE__ */ layer({
11227
+ const selectionLayer = /*@__PURE__*/ layer({
11177
11228
  above: false,
11178
11229
  markers(view) {
11179
11230
  return view.state.selection.ranges.map((r) => r.empty ? [] : RectangleMarker.forRange(view, "cm-selectionBackground", r)).reduce((a, b) => a.concat(b));
@@ -11183,7 +11234,7 @@ const selectionLayer = /* @__PURE__ */ layer({
11183
11234
  },
11184
11235
  class: "cm-selectionLayer"
11185
11236
  });
11186
- const hideNativeSelection = /* @__PURE__ */ Prec.highest(/* @__PURE__ */ EditorView.theme({
11237
+ const hideNativeSelection = /*@__PURE__*/ Prec.highest(/*@__PURE__*/ EditorView.theme({
11187
11238
  ".cm-line": {
11188
11239
  "& ::selection, &::selection": { backgroundColor: "transparent !important" },
11189
11240
  caretColor: "transparent !important"
@@ -11196,10 +11247,10 @@ const hideNativeSelection = /* @__PURE__ */ Prec.highest(/* @__PURE__ */ EditorV
11196
11247
  }
11197
11248
  }
11198
11249
  }));
11199
- const setDropCursorPos = /* @__PURE__ */ StateEffect.define({ map(pos, mapping) {
11250
+ const setDropCursorPos = /*@__PURE__*/ StateEffect.define({ map(pos, mapping) {
11200
11251
  return pos == null ? null : mapping.mapPos(pos);
11201
11252
  } });
11202
- const dropCursorPos = /* @__PURE__ */ StateField.define({
11253
+ const dropCursorPos = /*@__PURE__*/ StateField.define({
11203
11254
  create() {
11204
11255
  return null;
11205
11256
  },
@@ -11208,7 +11259,7 @@ const dropCursorPos = /* @__PURE__ */ StateField.define({
11208
11259
  return tr.effects.reduce((pos, e) => e.is(setDropCursorPos) ? e.value : pos, pos);
11209
11260
  }
11210
11261
  });
11211
- const drawDropCursor = /* @__PURE__ */ ViewPlugin.fromClass(class {
11262
+ const drawDropCursor = /*@__PURE__*/ ViewPlugin.fromClass(class {
11212
11263
  constructor(view) {
11213
11264
  this.view = view;
11214
11265
  this.cursor = null;
@@ -11389,7 +11440,7 @@ var MatchDecorator = class {
11389
11440
  }
11390
11441
  };
11391
11442
  const UnicodeRegexpSupport = /x/.unicode != null ? "gu" : "g";
11392
- const Specials = /* @__PURE__ */ new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩-]", UnicodeRegexpSupport);
11443
+ const Specials = /*@__PURE__*/ new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩-]", UnicodeRegexpSupport);
11393
11444
  const Names = {
11394
11445
  0: "null",
11395
11446
  7: "bell",
@@ -11422,7 +11473,7 @@ function supportsTabSize() {
11422
11473
  }
11423
11474
  return _supportsTabSize || false;
11424
11475
  }
11425
- const specialCharConfig = /* @__PURE__ */ Facet.define({ combine(configs) {
11476
+ const specialCharConfig = /*@__PURE__*/ Facet.define({ combine(configs) {
11426
11477
  let config = combineConfig(configs, {
11427
11478
  render: null,
11428
11479
  specialChars: Specials,
@@ -11531,8 +11582,8 @@ DOM class.
11531
11582
  function highlightActiveLine() {
11532
11583
  return activeLineHighlighter;
11533
11584
  }
11534
- const lineDeco = /* @__PURE__ */ Decoration.line({ class: "cm-activeLine" });
11535
- const activeLineHighlighter = /* @__PURE__ */ ViewPlugin.fromClass(class {
11585
+ const lineDeco = /*@__PURE__*/ Decoration.line({ class: "cm-activeLine" });
11586
+ const activeLineHighlighter = /*@__PURE__*/ ViewPlugin.fromClass(class {
11536
11587
  constructor(view) {
11537
11588
  this.decorations = this.getDeco(view);
11538
11589
  }
@@ -11731,7 +11782,7 @@ function windowSpace(view) {
11731
11782
  right: docElt.clientWidth
11732
11783
  };
11733
11784
  }
11734
- const tooltipConfig = /* @__PURE__ */ Facet.define({ combine: (values) => {
11785
+ const tooltipConfig = /*@__PURE__*/ Facet.define({ combine: (values) => {
11735
11786
  var _a, _b, _c;
11736
11787
  return {
11737
11788
  position: browser.ios ? "absolute" : ((_a = values.find((conf) => conf.position)) === null || _a === void 0 ? void 0 : _a.position) || "fixed",
@@ -11739,8 +11790,8 @@ const tooltipConfig = /* @__PURE__ */ Facet.define({ combine: (values) => {
11739
11790
  tooltipSpace: ((_c = values.find((conf) => conf.tooltipSpace)) === null || _c === void 0 ? void 0 : _c.tooltipSpace) || windowSpace
11740
11791
  };
11741
11792
  } });
11742
- const knownHeight = /* @__PURE__ */ new WeakMap();
11743
- const tooltipPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
11793
+ const knownHeight = /*@__PURE__*/ new WeakMap();
11794
+ const tooltipPlugin = /*@__PURE__*/ ViewPlugin.fromClass(class {
11744
11795
  constructor(view) {
11745
11796
  this.view = view;
11746
11797
  this.above = [];
@@ -11850,13 +11901,15 @@ const tooltipPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
11850
11901
  makeAbsolute = Math.abs(rect.top + 1e4) > 1 || Math.abs(rect.left) > 1;
11851
11902
  }
11852
11903
  }
11853
- if (makeAbsolute || this.position == "absolute") if (this.parent) {
11854
- let rect = this.parent.getBoundingClientRect();
11855
- if (rect.width && rect.height) {
11856
- scaleX = rect.width / this.parent.offsetWidth;
11857
- scaleY = rect.height / this.parent.offsetHeight;
11858
- }
11859
- } else ({scaleX, scaleY} = this.view.viewState);
11904
+ if (makeAbsolute || this.position == "absolute") {
11905
+ if (this.parent) {
11906
+ let rect = this.parent.getBoundingClientRect();
11907
+ if (rect.width && rect.height) {
11908
+ scaleX = rect.width / this.parent.offsetWidth;
11909
+ scaleY = rect.height / this.parent.offsetHeight;
11910
+ }
11911
+ } else ({scaleX, scaleY} = this.view.viewState);
11912
+ }
11860
11913
  let visible = this.view.scrollDOM.getBoundingClientRect(), margins = getScrollMargins(this.view);
11861
11914
  return {
11862
11915
  visible: {
@@ -11952,7 +12005,7 @@ function setLeftStyle(elt, value) {
11952
12005
  let current = parseInt(elt.style.left, 10);
11953
12006
  if (isNaN(current) || Math.abs(value - current) > 1) elt.style.left = value + "px";
11954
12007
  }
11955
- const baseTheme$6 = /* @__PURE__ */ EditorView.baseTheme({
12008
+ const baseTheme$6 = /*@__PURE__*/ EditorView.baseTheme({
11956
12009
  ".cm-tooltip": {
11957
12010
  zIndex: 500,
11958
12011
  boxSizing: "border-box"
@@ -12015,8 +12068,8 @@ const noOffset = {
12015
12068
  /**
12016
12069
  Facet to which an extension can add a value to show a tooltip.
12017
12070
  */
12018
- const showTooltip = /* @__PURE__ */ Facet.define({ enables: [tooltipPlugin, baseTheme$6] });
12019
- const showHoverTooltip = /* @__PURE__ */ Facet.define({ combine: (inputs) => inputs.reduce((a, i) => a.concat(i), []) });
12071
+ const showTooltip = /*@__PURE__*/ Facet.define({ enables: [tooltipPlugin, baseTheme$6] });
12072
+ const showHoverTooltip = /*@__PURE__*/ Facet.define({ combine: (inputs) => inputs.reduce((a, i) => a.concat(i), []) });
12020
12073
  var HoverTooltipHost = class HoverTooltipHost {
12021
12074
  static create(view) {
12022
12075
  return new HoverTooltipHost(view);
@@ -12073,7 +12126,7 @@ var HoverTooltipHost = class HoverTooltipHost {
12073
12126
  return this.passProp("resize");
12074
12127
  }
12075
12128
  };
12076
- const showHoverTooltipHost = /* @__PURE__ */ showTooltip.compute([showHoverTooltip], (state) => {
12129
+ const showHoverTooltipHost = /*@__PURE__*/ showTooltip.compute([showHoverTooltip], (state) => {
12077
12130
  let tooltips = state.facet(showHoverTooltip);
12078
12131
  if (tooltips.length === 0) return null;
12079
12132
  return {
@@ -12285,8 +12338,8 @@ function getTooltip(view, tooltip) {
12285
12338
  let found = plugin.manager.tooltips.indexOf(tooltip);
12286
12339
  return found < 0 ? null : plugin.manager.tooltipViews[found];
12287
12340
  }
12288
- const closeHoverTooltipEffect = /* @__PURE__ */ StateEffect.define();
12289
- const panelConfig = /* @__PURE__ */ Facet.define({ combine(configs) {
12341
+ const closeHoverTooltipEffect = /*@__PURE__*/ StateEffect.define();
12342
+ const panelConfig = /*@__PURE__*/ Facet.define({ combine(configs) {
12290
12343
  let topContainer, bottomContainer;
12291
12344
  for (let c of configs) {
12292
12345
  topContainer = topContainer || c.topContainer;
@@ -12307,7 +12360,7 @@ function getPanel(view, panel) {
12307
12360
  let index = plugin ? plugin.specs.indexOf(panel) : -1;
12308
12361
  return index > -1 ? plugin.panels[index] : null;
12309
12362
  }
12310
- const panelPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
12363
+ const panelPlugin = /*@__PURE__*/ ViewPlugin.fromClass(class {
12311
12364
  constructor(view) {
12312
12365
  this.input = view.state.facet(showPanel);
12313
12366
  this.specs = this.input.filter((s) => s);
@@ -12427,7 +12480,7 @@ Opening a panel is done by providing a constructor function for
12427
12480
  the panel through this facet. (The panel is closed again when its
12428
12481
  constructor is no longer provided.) Values of `null` are ignored.
12429
12482
  */
12430
- const showPanel = /* @__PURE__ */ Facet.define({ enables: panelPlugin });
12483
+ const showPanel = /*@__PURE__*/ Facet.define({ enables: panelPlugin });
12431
12484
  /**
12432
12485
  A gutter marker represents a bit of information attached to a line
12433
12486
  in a specific gutter. Your own custom markers have to extend this
@@ -12464,12 +12517,12 @@ Markers given to this facet should _only_ define an
12464
12517
  [`toDOM`](https://codemirror.net/6/docs/ref/#view.GutterMarker.toDOM) (or the marker will appear
12465
12518
  in all gutters for the line).
12466
12519
  */
12467
- const gutterLineClass = /* @__PURE__ */ Facet.define();
12520
+ const gutterLineClass = /*@__PURE__*/ Facet.define();
12468
12521
  /**
12469
12522
  Facet used to add a class to all gutter elements next to a widget.
12470
12523
  Should not provide widgets with a `toDOM` method.
12471
12524
  */
12472
- const gutterWidgetClass = /* @__PURE__ */ Facet.define();
12525
+ const gutterWidgetClass = /*@__PURE__*/ Facet.define();
12473
12526
  const defaults$1 = {
12474
12527
  class: "",
12475
12528
  renderEmptyElements: false,
@@ -12482,7 +12535,7 @@ const defaults$1 = {
12482
12535
  updateSpacer: null,
12483
12536
  domEventHandlers: {}
12484
12537
  };
12485
- const activeGutters = /* @__PURE__ */ Facet.define();
12538
+ const activeGutters = /*@__PURE__*/ Facet.define();
12486
12539
  /**
12487
12540
  Define an editor gutter. The order in which the gutters appear is
12488
12541
  determined by their extension priority.
@@ -12490,7 +12543,7 @@ determined by their extension priority.
12490
12543
  function gutter(config) {
12491
12544
  return [gutters(), activeGutters.of(Object.assign(Object.assign({}, defaults$1), config))];
12492
12545
  }
12493
- const unfixGutters = /* @__PURE__ */ Facet.define({ combine: (values) => values.some((x) => x) });
12546
+ const unfixGutters = /*@__PURE__*/ Facet.define({ combine: (values) => values.some((x) => x) });
12494
12547
  /**
12495
12548
  The gutter-drawing plugin is automatically enabled when you add a
12496
12549
  gutter, but you can use this function to explicitly configure it.
@@ -12506,7 +12559,7 @@ function gutters(config) {
12506
12559
  if (config && config.fixed === false) result.push(unfixGutters.of(true));
12507
12560
  return result;
12508
12561
  }
12509
- const gutterView = /* @__PURE__ */ ViewPlugin.fromClass(class {
12562
+ const gutterView = /*@__PURE__*/ ViewPlugin.fromClass(class {
12510
12563
  constructor(view) {
12511
12564
  this.view = view;
12512
12565
  this.prevViewport = view.viewport;
@@ -12723,8 +12776,10 @@ var GutterElement = class {
12723
12776
  }
12724
12777
  }
12725
12778
  if (!marker) break;
12726
- if (marker.toDOM) if (matched) domPos = domPos.nextSibling;
12727
- else this.dom.insertBefore(marker.toDOM(view), domPos);
12779
+ if (marker.toDOM) {
12780
+ if (matched) domPos = domPos.nextSibling;
12781
+ else this.dom.insertBefore(marker.toDOM(view), domPos);
12782
+ }
12728
12783
  if (matched) iOld++;
12729
12784
  }
12730
12785
  this.dom.className = cls;
@@ -12742,12 +12797,12 @@ function sameMarkers(a, b) {
12742
12797
  /**
12743
12798
  Facet used to provide markers to the line number gutter.
12744
12799
  */
12745
- const lineNumberMarkers = /* @__PURE__ */ Facet.define();
12800
+ const lineNumberMarkers = /*@__PURE__*/ Facet.define();
12746
12801
  /**
12747
12802
  Facet used to create markers in the line number gutter next to widgets.
12748
12803
  */
12749
- const lineNumberWidgetMarker = /* @__PURE__ */ Facet.define();
12750
- const lineNumberConfig = /* @__PURE__ */ Facet.define({ combine(values) {
12804
+ const lineNumberWidgetMarker = /*@__PURE__*/ Facet.define();
12805
+ const lineNumberConfig = /*@__PURE__*/ Facet.define({ combine(values) {
12751
12806
  return combineConfig(values, {
12752
12807
  formatNumber: String,
12753
12808
  domEventHandlers: {}
@@ -12775,7 +12830,7 @@ var NumberMarker = class extends GutterMarker {
12775
12830
  function formatNumber(view, number) {
12776
12831
  return view.state.facet(lineNumberConfig).formatNumber(number, view.state);
12777
12832
  }
12778
- const lineNumberGutter = /* @__PURE__ */ activeGutters.compute([lineNumberConfig], (state) => ({
12833
+ const lineNumberGutter = /*@__PURE__*/ activeGutters.compute([lineNumberConfig], (state) => ({
12779
12834
  class: "cm-lineNumbers",
12780
12835
  renderEmptyElements: false,
12781
12836
  markers(view) {
@@ -12817,13 +12872,13 @@ function maxLineNumber(lines) {
12817
12872
  while (last < lines) last = last * 10 + 9;
12818
12873
  return last;
12819
12874
  }
12820
- const activeLineGutterMarker = /* @__PURE__ */ new class extends GutterMarker {
12875
+ const activeLineGutterMarker = /*@__PURE__*/ new class extends GutterMarker {
12821
12876
  constructor() {
12822
12877
  super(...arguments);
12823
12878
  this.elementClass = "cm-activeLineGutter";
12824
12879
  }
12825
12880
  }();
12826
- const activeLineGutterHighlighter = /* @__PURE__ */ gutterLineClass.compute(["selection"], (state) => {
12881
+ const activeLineGutterHighlighter = /*@__PURE__*/ gutterLineClass.compute(["selection"], (state) => {
12827
12882
  let marks = [], last = -1;
12828
12883
  for (let range of state.selection.ranges) {
12829
12884
  let linePos = state.doc.lineAt(range.head).from;
@@ -12961,10 +13016,10 @@ function setDiagnostics(state, diagnostics) {
12961
13016
  The state effect that updates the set of active diagnostics. Can
12962
13017
  be useful when writing an extension that needs to track these.
12963
13018
  */
12964
- const setDiagnosticsEffect = /* @__PURE__ */ StateEffect.define();
12965
- const togglePanel$1 = /* @__PURE__ */ StateEffect.define();
12966
- const movePanelSelection = /* @__PURE__ */ StateEffect.define();
12967
- const lintState = /* @__PURE__ */ StateField.define({
13019
+ const setDiagnosticsEffect = /*@__PURE__*/ StateEffect.define();
13020
+ const togglePanel$1 = /*@__PURE__*/ StateEffect.define();
13021
+ const movePanelSelection = /*@__PURE__*/ StateEffect.define();
13022
+ const lintState = /*@__PURE__*/ StateField.define({
12968
13023
  create() {
12969
13024
  return new LintState(Decoration.none, null, null);
12970
13025
  },
@@ -12987,7 +13042,7 @@ const lintState = /* @__PURE__ */ StateField.define({
12987
13042
  },
12988
13043
  provide: (f) => [showPanel.from(f, (val) => val.panel), EditorView.decorations.from(f, (s) => s.diagnostics)]
12989
13044
  });
12990
- const activeMark = /* @__PURE__ */ Decoration.mark({ class: "cm-lintRange cm-lintRange-active" });
13045
+ const activeMark = /*@__PURE__*/ Decoration.mark({ class: "cm-lintRange cm-lintRange-active" });
12991
13046
  function lintTooltip(view, pos, side) {
12992
13047
  let { diagnostics } = view.state.field(lintState);
12993
13048
  let found, start = -1, end = -1;
@@ -13067,7 +13122,7 @@ const lintKeymap = [{
13067
13122
  key: "F8",
13068
13123
  run: nextDiagnostic
13069
13124
  }];
13070
- const lintPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
13125
+ const lintPlugin = /*@__PURE__*/ ViewPlugin.fromClass(class {
13071
13126
  constructor(view) {
13072
13127
  this.view = view;
13073
13128
  this.timeout = -1;
@@ -13120,7 +13175,7 @@ function batchResults(promises, sink, error) {
13120
13175
  else timeout = setTimeout(() => sink(collected), 200);
13121
13176
  }, error);
13122
13177
  }
13123
- const lintConfig = /* @__PURE__ */ Facet.define({ combine(input) {
13178
+ const lintConfig = /*@__PURE__*/ Facet.define({ combine(input) {
13124
13179
  return Object.assign({ sources: input.map((i) => i.source).filter((x) => x != null) }, combineConfig(input.map((i) => i.config), {
13125
13180
  delay: 750,
13126
13181
  markerFilter: null,
@@ -13359,7 +13414,7 @@ function svg(content, attrs = `viewBox="0 0 40 40"`) {
13359
13414
  function underline(color) {
13360
13415
  return svg(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${color}" fill="none" stroke-width=".7"/>`, `width="6" height="3"`);
13361
13416
  }
13362
- const baseTheme$3 = /* @__PURE__ */ EditorView.baseTheme({
13417
+ const baseTheme$3 = /*@__PURE__*/ EditorView.baseTheme({
13363
13418
  ".cm-diagnostic": {
13364
13419
  padding: "3px 6px 3px 8px",
13365
13420
  marginLeft: "-1px",
@@ -13389,10 +13444,10 @@ const baseTheme$3 = /* @__PURE__ */ EditorView.baseTheme({
13389
13444
  backgroundRepeat: "repeat-x",
13390
13445
  paddingBottom: "0.7px"
13391
13446
  },
13392
- ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ underline("#d11") },
13393
- ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ underline("orange") },
13394
- ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ underline("#999") },
13395
- ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ underline("#66d") },
13447
+ ".cm-lintRange-error": { backgroundImage: /*@__PURE__*/ underline("#d11") },
13448
+ ".cm-lintRange-warning": { backgroundImage: /*@__PURE__*/ underline("orange") },
13449
+ ".cm-lintRange-info": { backgroundImage: /*@__PURE__*/ underline("#999") },
13450
+ ".cm-lintRange-hint": { backgroundImage: /*@__PURE__*/ underline("#66d") },
13396
13451
  ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
13397
13452
  ".cm-tooltip-lint": {
13398
13453
  padding: 0,
@@ -13460,11 +13515,11 @@ function maxSeverity(diagnostics) {
13460
13515
  }
13461
13516
  const lintExtensions = [
13462
13517
  lintState,
13463
- /* @__PURE__ */ EditorView.decorations.compute([lintState], (state) => {
13518
+ /*@__PURE__*/ EditorView.decorations.compute([lintState], (state) => {
13464
13519
  let { selected, panel } = state.field(lintState);
13465
13520
  return !selected || !panel || selected.from == selected.to ? Decoration.none : Decoration.set([activeMark.range(selected.from, selected.to)]);
13466
13521
  }),
13467
- /* @__PURE__ */ hoverTooltip(lintTooltip, { hideOn: hideTooltip }),
13522
+ /*@__PURE__*/ hoverTooltip(lintTooltip, { hideOn: hideTooltip }),
13468
13523
  baseTheme$3
13469
13524
  ];
13470
13525
  //#endregion
@@ -13725,7 +13780,8 @@ var NodeSet = class NodeSet {
13725
13780
  return new NodeSet(newTypes);
13726
13781
  }
13727
13782
  };
13728
- const CachedNode = /* @__PURE__ */ new WeakMap(), CachedInnerNode = /* @__PURE__ */ new WeakMap();
13783
+ const CachedNode = /* @__PURE__ */ new WeakMap();
13784
+ const CachedInnerNode = /* @__PURE__ */ new WeakMap();
13729
13785
  /**
13730
13786
  Options that control iteration. Can be combined with the `|`
13731
13787
  operator to enable multiple ones.
@@ -14770,9 +14826,10 @@ function buildTree(data) {
14770
14826
  let nodeStart = fork.start;
14771
14827
  fork.next();
14772
14828
  while (fork.pos > startPos) {
14773
- if (fork.size < 0) if (fork.size == -3 || fork.size == -4) localSkipped += 4;
14774
- else break scan;
14775
- else if (fork.id >= minRepeatType) localSkipped += 4;
14829
+ if (fork.size < 0) {
14830
+ if (fork.size == -3 || fork.size == -4) localSkipped += 4;
14831
+ else break scan;
14832
+ } else if (fork.id >= minRepeatType) localSkipped += 4;
14776
14833
  fork.next();
14777
14834
  }
14778
14835
  start = nodeStart;
@@ -15391,7 +15448,8 @@ var SimulatedStack = class {
15391
15448
  this.stack.push(this.state, 0, 0);
15392
15449
  this.base += 3;
15393
15450
  } else this.base -= (depth - 1) * 3;
15394
- this.state = this.start.p.parser.getGoto(this.stack[this.base - 3], term, true);
15451
+ let goto = this.start.p.parser.getGoto(this.stack[this.base - 3], term, true);
15452
+ this.state = goto;
15395
15453
  }
15396
15454
  };
15397
15455
  var StackBufferCursor = class StackBufferCursor {
@@ -15604,7 +15662,8 @@ var InputStream = class {
15604
15662
  this.chunk2 = this.chunk;
15605
15663
  this.chunk2Pos = this.chunkPos;
15606
15664
  let nextChunk = this.input.chunk(this.pos);
15607
- this.chunk = this.pos + nextChunk.length > this.range.to ? nextChunk.slice(0, this.range.to - this.pos) : nextChunk;
15665
+ let end = this.pos + nextChunk.length;
15666
+ this.chunk = end > this.range.to ? nextChunk.slice(0, this.range.to - this.pos) : nextChunk;
15608
15667
  this.chunkPos = this.pos;
15609
15668
  this.chunkOff = 0;
15610
15669
  }
@@ -15928,10 +15987,12 @@ var TokenCache = class {
15928
15987
  addActions(stack, token, end, index) {
15929
15988
  let { state } = stack, { parser } = stack.p, { data } = parser;
15930
15989
  for (let set = 0; set < 2; set++) for (let i = parser.stateSlot(state, set ? 2 : 1);; i += 3) {
15931
- if (data[i] == 65535) if (data[i + 1] == 1) i = pair(data, i + 2);
15932
- else {
15933
- if (index == 0 && data[i + 1] == 2) index = this.putAction(pair(data, i + 2), token, end, index);
15934
- break;
15990
+ if (data[i] == 65535) {
15991
+ if (data[i + 1] == 1) i = pair(data, i + 2);
15992
+ else {
15993
+ if (index == 0 && data[i + 1] == 2) index = this.putAction(pair(data, i + 2), token, end, index);
15994
+ break;
15995
+ }
15935
15996
  }
15936
15997
  if (data[i] == token) index = this.putAction(pair(data, i + 1), token, end, index);
15937
15998
  }
@@ -16019,10 +16080,12 @@ var Parse = class {
16019
16080
  let stack = newStacks[i];
16020
16081
  for (let j = i + 1; j < newStacks.length; j++) {
16021
16082
  let other = newStacks[j];
16022
- if (stack.sameState(other) || stack.buffer.length > 500 && other.buffer.length > 500) if ((stack.score - other.score || stack.buffer.length - other.buffer.length) > 0) newStacks.splice(j--, 1);
16023
- else {
16024
- newStacks.splice(i--, 1);
16025
- continue outer;
16083
+ if (stack.sameState(other) || stack.buffer.length > 500 && other.buffer.length > 500) {
16084
+ if ((stack.score - other.score || stack.buffer.length - other.buffer.length) > 0) newStacks.splice(j--, 1);
16085
+ else {
16086
+ newStacks.splice(i--, 1);
16087
+ continue outer;
16088
+ }
16026
16089
  }
16027
16090
  }
16028
16091
  }
@@ -16256,9 +16319,11 @@ var LRParser = class LRParser extends Parser {
16256
16319
  hasAction(state, terminal) {
16257
16320
  let data = this.data;
16258
16321
  for (let set = 0; set < 2; set++) for (let i = this.stateSlot(state, set ? 2 : 1), next;; i += 3) {
16259
- if ((next = data[i]) == 65535) if (data[i + 1] == 1) next = data[i = pair(data, i + 2)];
16260
- else if (data[i + 1] == 2) return pair(data, i + 2);
16261
- else break;
16322
+ if ((next = data[i]) == 65535) {
16323
+ if (data[i + 1] == 1) next = data[i = pair(data, i + 2)];
16324
+ else if (data[i + 1] == 2) return pair(data, i + 2);
16325
+ else break;
16326
+ }
16262
16327
  if (next == terminal || next == 0) return pair(data, i + 1);
16263
16328
  }
16264
16329
  return 0;
@@ -16288,8 +16353,10 @@ var LRParser = class LRParser extends Parser {
16288
16353
  let deflt = this.stateSlot(state, 4);
16289
16354
  let result = deflt ? action(deflt) : void 0;
16290
16355
  for (let i = this.stateSlot(state, 1); result == null; i += 3) {
16291
- if (this.data[i] == 65535) if (this.data[i + 1] == 1) i = pair(this.data, i + 2);
16292
- else break;
16356
+ if (this.data[i] == 65535) {
16357
+ if (this.data[i + 1] == 1) i = pair(this.data, i + 2);
16358
+ else break;
16359
+ }
16293
16360
  result = action(pair(this.data, i + 1));
16294
16361
  }
16295
16362
  return result;
@@ -16301,8 +16368,10 @@ var LRParser = class LRParser extends Parser {
16301
16368
  nextStates(state) {
16302
16369
  let result = [];
16303
16370
  for (let i = this.stateSlot(state, 1);; i += 3) {
16304
- if (this.data[i] == 65535) if (this.data[i + 1] == 1) i = pair(this.data, i + 2);
16305
- else break;
16371
+ if (this.data[i] == 65535) {
16372
+ if (this.data[i + 1] == 1) i = pair(this.data, i + 2);
16373
+ else break;
16374
+ }
16306
16375
  if ((this.data[i + 2] & 1) == 0) {
16307
16376
  let value = this.data[i + 1];
16308
16377
  if (!result.some((v, i) => i & 1 && v == value)) result.push(this.data[i], value);
@@ -16762,7 +16831,20 @@ function getStyleTags(node) {
16762
16831
  return rule || null;
16763
16832
  }
16764
16833
  const t = Tag.define;
16765
- const comment = t(), name = t(), typeName = t(name), propertyName = t(name), literal = t(), string = t(literal), number = t(literal), content = t(), heading = t(content), keyword = t(), operator = t(), punctuation = t(), bracket = t(punctuation), meta = t();
16834
+ const comment = t();
16835
+ const name = t();
16836
+ const typeName = t(name);
16837
+ const propertyName = t(name);
16838
+ const literal = t();
16839
+ const string = t(literal);
16840
+ const number = t(literal);
16841
+ const content = t();
16842
+ const heading = t(content);
16843
+ const keyword = t();
16844
+ const operator = t();
16845
+ const punctuation = t();
16846
+ const bracket = t(punctuation);
16847
+ const meta = t();
16766
16848
  /**
16767
16849
  The default set of highlighting [tags](#highlight.Tag).
16768
16850
 
@@ -16784,89 +16866,369 @@ For tags that extend some parent tag, the documentation links to
16784
16866
  the parent.
16785
16867
  */
16786
16868
  const tags = {
16869
+ /**
16870
+ A comment.
16871
+ */
16787
16872
  comment,
16873
+ /**
16874
+ A line [comment](#highlight.tags.comment).
16875
+ */
16788
16876
  lineComment: t(comment),
16877
+ /**
16878
+ A block [comment](#highlight.tags.comment).
16879
+ */
16789
16880
  blockComment: t(comment),
16881
+ /**
16882
+ A documentation [comment](#highlight.tags.comment).
16883
+ */
16790
16884
  docComment: t(comment),
16885
+ /**
16886
+ Any kind of identifier.
16887
+ */
16791
16888
  name,
16889
+ /**
16890
+ The [name](#highlight.tags.name) of a variable.
16891
+ */
16792
16892
  variableName: t(name),
16893
+ /**
16894
+ A type [name](#highlight.tags.name).
16895
+ */
16793
16896
  typeName,
16897
+ /**
16898
+ A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
16899
+ */
16794
16900
  tagName: t(typeName),
16901
+ /**
16902
+ A property or field [name](#highlight.tags.name).
16903
+ */
16795
16904
  propertyName,
16905
+ /**
16906
+ An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
16907
+ */
16796
16908
  attributeName: t(propertyName),
16909
+ /**
16910
+ The [name](#highlight.tags.name) of a class.
16911
+ */
16797
16912
  className: t(name),
16913
+ /**
16914
+ A label [name](#highlight.tags.name).
16915
+ */
16798
16916
  labelName: t(name),
16917
+ /**
16918
+ A namespace [name](#highlight.tags.name).
16919
+ */
16799
16920
  namespace: t(name),
16921
+ /**
16922
+ The [name](#highlight.tags.name) of a macro.
16923
+ */
16800
16924
  macroName: t(name),
16925
+ /**
16926
+ A literal value.
16927
+ */
16801
16928
  literal,
16929
+ /**
16930
+ A string [literal](#highlight.tags.literal).
16931
+ */
16802
16932
  string,
16933
+ /**
16934
+ A documentation [string](#highlight.tags.string).
16935
+ */
16803
16936
  docString: t(string),
16937
+ /**
16938
+ A character literal (subtag of [string](#highlight.tags.string)).
16939
+ */
16804
16940
  character: t(string),
16941
+ /**
16942
+ An attribute value (subtag of [string](#highlight.tags.string)).
16943
+ */
16805
16944
  attributeValue: t(string),
16945
+ /**
16946
+ A number [literal](#highlight.tags.literal).
16947
+ */
16806
16948
  number,
16949
+ /**
16950
+ An integer [number](#highlight.tags.number) literal.
16951
+ */
16807
16952
  integer: t(number),
16953
+ /**
16954
+ A floating-point [number](#highlight.tags.number) literal.
16955
+ */
16808
16956
  float: t(number),
16957
+ /**
16958
+ A boolean [literal](#highlight.tags.literal).
16959
+ */
16809
16960
  bool: t(literal),
16961
+ /**
16962
+ Regular expression [literal](#highlight.tags.literal).
16963
+ */
16810
16964
  regexp: t(literal),
16965
+ /**
16966
+ An escape [literal](#highlight.tags.literal), for example a
16967
+ backslash escape in a string.
16968
+ */
16811
16969
  escape: t(literal),
16970
+ /**
16971
+ A color [literal](#highlight.tags.literal).
16972
+ */
16812
16973
  color: t(literal),
16974
+ /**
16975
+ A URL [literal](#highlight.tags.literal).
16976
+ */
16813
16977
  url: t(literal),
16978
+ /**
16979
+ A language keyword.
16980
+ */
16814
16981
  keyword,
16982
+ /**
16983
+ The [keyword](#highlight.tags.keyword) for the self or this
16984
+ object.
16985
+ */
16815
16986
  self: t(keyword),
16987
+ /**
16988
+ The [keyword](#highlight.tags.keyword) for null.
16989
+ */
16816
16990
  null: t(keyword),
16991
+ /**
16992
+ A [keyword](#highlight.tags.keyword) denoting some atomic value.
16993
+ */
16817
16994
  atom: t(keyword),
16995
+ /**
16996
+ A [keyword](#highlight.tags.keyword) that represents a unit.
16997
+ */
16818
16998
  unit: t(keyword),
16999
+ /**
17000
+ A modifier [keyword](#highlight.tags.keyword).
17001
+ */
16819
17002
  modifier: t(keyword),
17003
+ /**
17004
+ A [keyword](#highlight.tags.keyword) that acts as an operator.
17005
+ */
16820
17006
  operatorKeyword: t(keyword),
17007
+ /**
17008
+ A control-flow related [keyword](#highlight.tags.keyword).
17009
+ */
16821
17010
  controlKeyword: t(keyword),
17011
+ /**
17012
+ A [keyword](#highlight.tags.keyword) that defines something.
17013
+ */
16822
17014
  definitionKeyword: t(keyword),
17015
+ /**
17016
+ A [keyword](#highlight.tags.keyword) related to defining or
17017
+ interfacing with modules.
17018
+ */
16823
17019
  moduleKeyword: t(keyword),
17020
+ /**
17021
+ An operator.
17022
+ */
16824
17023
  operator,
17024
+ /**
17025
+ An [operator](#highlight.tags.operator) that dereferences something.
17026
+ */
16825
17027
  derefOperator: t(operator),
17028
+ /**
17029
+ Arithmetic-related [operator](#highlight.tags.operator).
17030
+ */
16826
17031
  arithmeticOperator: t(operator),
17032
+ /**
17033
+ Logical [operator](#highlight.tags.operator).
17034
+ */
16827
17035
  logicOperator: t(operator),
17036
+ /**
17037
+ Bit [operator](#highlight.tags.operator).
17038
+ */
16828
17039
  bitwiseOperator: t(operator),
17040
+ /**
17041
+ Comparison [operator](#highlight.tags.operator).
17042
+ */
16829
17043
  compareOperator: t(operator),
17044
+ /**
17045
+ [Operator](#highlight.tags.operator) that updates its operand.
17046
+ */
16830
17047
  updateOperator: t(operator),
17048
+ /**
17049
+ [Operator](#highlight.tags.operator) that defines something.
17050
+ */
16831
17051
  definitionOperator: t(operator),
17052
+ /**
17053
+ Type-related [operator](#highlight.tags.operator).
17054
+ */
16832
17055
  typeOperator: t(operator),
17056
+ /**
17057
+ Control-flow [operator](#highlight.tags.operator).
17058
+ */
16833
17059
  controlOperator: t(operator),
17060
+ /**
17061
+ Program or markup punctuation.
17062
+ */
16834
17063
  punctuation,
17064
+ /**
17065
+ [Punctuation](#highlight.tags.punctuation) that separates
17066
+ things.
17067
+ */
16835
17068
  separator: t(punctuation),
17069
+ /**
17070
+ Bracket-style [punctuation](#highlight.tags.punctuation).
17071
+ */
16836
17072
  bracket,
17073
+ /**
17074
+ Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
17075
+ tokens).
17076
+ */
16837
17077
  angleBracket: t(bracket),
17078
+ /**
17079
+ Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
17080
+ tokens).
17081
+ */
16838
17082
  squareBracket: t(bracket),
17083
+ /**
17084
+ Parentheses (usually `(` and `)` tokens). Subtag of
17085
+ [bracket](#highlight.tags.bracket).
17086
+ */
16839
17087
  paren: t(bracket),
17088
+ /**
17089
+ Braces (usually `{` and `}` tokens). Subtag of
17090
+ [bracket](#highlight.tags.bracket).
17091
+ */
16840
17092
  brace: t(bracket),
17093
+ /**
17094
+ Content, for example plain text in XML or markup documents.
17095
+ */
16841
17096
  content,
17097
+ /**
17098
+ [Content](#highlight.tags.content) that represents a heading.
17099
+ */
16842
17100
  heading,
17101
+ /**
17102
+ A level 1 [heading](#highlight.tags.heading).
17103
+ */
16843
17104
  heading1: t(heading),
17105
+ /**
17106
+ A level 2 [heading](#highlight.tags.heading).
17107
+ */
16844
17108
  heading2: t(heading),
17109
+ /**
17110
+ A level 3 [heading](#highlight.tags.heading).
17111
+ */
16845
17112
  heading3: t(heading),
17113
+ /**
17114
+ A level 4 [heading](#highlight.tags.heading).
17115
+ */
16846
17116
  heading4: t(heading),
17117
+ /**
17118
+ A level 5 [heading](#highlight.tags.heading).
17119
+ */
16847
17120
  heading5: t(heading),
17121
+ /**
17122
+ A level 6 [heading](#highlight.tags.heading).
17123
+ */
16848
17124
  heading6: t(heading),
17125
+ /**
17126
+ A prose [content](#highlight.tags.content) separator (such as a horizontal rule).
17127
+ */
16849
17128
  contentSeparator: t(content),
17129
+ /**
17130
+ [Content](#highlight.tags.content) that represents a list.
17131
+ */
16850
17132
  list: t(content),
17133
+ /**
17134
+ [Content](#highlight.tags.content) that represents a quote.
17135
+ */
16851
17136
  quote: t(content),
17137
+ /**
17138
+ [Content](#highlight.tags.content) that is emphasized.
17139
+ */
16852
17140
  emphasis: t(content),
17141
+ /**
17142
+ [Content](#highlight.tags.content) that is styled strong.
17143
+ */
16853
17144
  strong: t(content),
17145
+ /**
17146
+ [Content](#highlight.tags.content) that is part of a link.
17147
+ */
16854
17148
  link: t(content),
17149
+ /**
17150
+ [Content](#highlight.tags.content) that is styled as code or
17151
+ monospace.
17152
+ */
16855
17153
  monospace: t(content),
17154
+ /**
17155
+ [Content](#highlight.tags.content) that has a strike-through
17156
+ style.
17157
+ */
16856
17158
  strikethrough: t(content),
17159
+ /**
17160
+ Inserted text in a change-tracking format.
17161
+ */
16857
17162
  inserted: t(),
17163
+ /**
17164
+ Deleted text.
17165
+ */
16858
17166
  deleted: t(),
17167
+ /**
17168
+ Changed text.
17169
+ */
16859
17170
  changed: t(),
17171
+ /**
17172
+ An invalid or unsyntactic element.
17173
+ */
16860
17174
  invalid: t(),
17175
+ /**
17176
+ Metadata or meta-instruction.
17177
+ */
16861
17178
  meta,
17179
+ /**
17180
+ [Metadata](#highlight.tags.meta) that applies to the entire
17181
+ document.
17182
+ */
16862
17183
  documentMeta: t(meta),
17184
+ /**
17185
+ [Metadata](#highlight.tags.meta) that annotates or adds
17186
+ attributes to a given syntactic element.
17187
+ */
16863
17188
  annotation: t(meta),
17189
+ /**
17190
+ Processing instruction or preprocessor directive. Subtag of
17191
+ [meta](#highlight.tags.meta).
17192
+ */
16864
17193
  processingInstruction: t(meta),
17194
+ /**
17195
+ [Modifier](#highlight.Tag^defineModifier) that indicates that a
17196
+ given element is being defined. Expected to be used with the
17197
+ various [name](#highlight.tags.name) tags.
17198
+ */
16865
17199
  definition: Tag.defineModifier("definition"),
17200
+ /**
17201
+ [Modifier](#highlight.Tag^defineModifier) that indicates that
17202
+ something is constant. Mostly expected to be used with
17203
+ [variable names](#highlight.tags.variableName).
17204
+ */
16866
17205
  constant: Tag.defineModifier("constant"),
17206
+ /**
17207
+ [Modifier](#highlight.Tag^defineModifier) used to indicate that
17208
+ a [variable](#highlight.tags.variableName) or [property
17209
+ name](#highlight.tags.propertyName) is being called or defined
17210
+ as a function.
17211
+ */
16867
17212
  function: Tag.defineModifier("function"),
17213
+ /**
17214
+ [Modifier](#highlight.Tag^defineModifier) that can be applied to
17215
+ [names](#highlight.tags.name) to indicate that they belong to
17216
+ the language's standard environment.
17217
+ */
16868
17218
  standard: Tag.defineModifier("standard"),
17219
+ /**
17220
+ [Modifier](#highlight.Tag^defineModifier) that indicates a given
17221
+ [names](#highlight.tags.name) is local to some scope.
17222
+ */
16869
17223
  local: Tag.defineModifier("local"),
17224
+ /**
17225
+ A generic variant [modifier](#highlight.Tag^defineModifier) that
17226
+ can be used to tag language-specific alternative variants of
17227
+ some common tag. It is recommended for themes to define special
17228
+ forms of at least the [string](#highlight.tags.string) and
17229
+ [variable name](#highlight.tags.variableName) tags, since those
17230
+ come up a lot.
17231
+ */
16870
17232
  special: Tag.defineModifier("special")
16871
17233
  };
16872
17234
  for (let name in tags) {
@@ -17006,7 +17368,7 @@ var _a;
17006
17368
  Node prop stored in a parser's top syntax node to provide the
17007
17369
  facet that stores language-specific data for that language.
17008
17370
  */
17009
- const languageDataProp = /* @__PURE__ */ new NodeProp();
17371
+ const languageDataProp = /*@__PURE__*/ new NodeProp();
17010
17372
  /**
17011
17373
  Helper function to define a facet (to be added to the top syntax
17012
17374
  node(s) for a language via
@@ -17022,7 +17384,7 @@ function defineLanguageFacet(baseData) {
17022
17384
  Syntax node prop used to register sublanguages. Should be added to
17023
17385
  the top level node type for the language.
17024
17386
  */
17025
- const sublanguageProp = /* @__PURE__ */ new NodeProp();
17387
+ const sublanguageProp = /*@__PURE__*/ new NodeProp();
17026
17388
  /**
17027
17389
  A language object manages parsing and per-language
17028
17390
  [metadata](https://codemirror.net/6/docs/ref/#state.EditorState.languageDataAt). Parse data is
@@ -17125,7 +17487,7 @@ var Language = class {
17125
17487
  /**
17126
17488
  @internal
17127
17489
  */
17128
- Language.setState = /* @__PURE__ */ StateEffect.define();
17490
+ Language.setState = /*@__PURE__*/ StateEffect.define();
17129
17491
  function topNodeAt(state, pos, side) {
17130
17492
  let topLang = state.facet(language), tree = syntaxTree(state).topNode;
17131
17493
  if (!topLang || topLang.allowsNesting) {
@@ -17444,7 +17806,7 @@ var LanguageState = class LanguageState {
17444
17806
  return new LanguageState(parseState);
17445
17807
  }
17446
17808
  };
17447
- Language.state = /* @__PURE__ */ StateField.define({
17809
+ Language.state = /*@__PURE__*/ StateField.define({
17448
17810
  create: LanguageState.init,
17449
17811
  update(value, tr) {
17450
17812
  for (let e of tr.effects) if (e.is(Language.setState)) return e.value;
@@ -17463,7 +17825,7 @@ if (typeof requestIdleCallback != "undefined") requestIdle = (callback) => {
17463
17825
  return () => idle < 0 ? clearTimeout(timeout) : cancelIdleCallback(idle);
17464
17826
  };
17465
17827
  const isInputPending = typeof navigator != "undefined" && ((_a = navigator.scheduling) === null || _a === void 0 ? void 0 : _a.isInputPending) ? () => navigator.scheduling.isInputPending() : null;
17466
- const parseWorker = /* @__PURE__ */ ViewPlugin.fromClass(class ParseWorker {
17828
+ const parseWorker = /*@__PURE__*/ ViewPlugin.fromClass(class ParseWorker {
17467
17829
  constructor(view) {
17468
17830
  this.view = view;
17469
17831
  this.working = null;
@@ -17532,7 +17894,7 @@ by `Language` object's `extension` property (so you don't need to
17532
17894
  manually wrap your languages in this). Can be used to access the
17533
17895
  current language on a state.
17534
17896
  */
17535
- const language = /* @__PURE__ */ Facet.define({
17897
+ const language = /*@__PURE__*/ Facet.define({
17536
17898
  combine(languages) {
17537
17899
  return languages.length ? languages[0] : null;
17538
17900
  },
@@ -17571,13 +17933,13 @@ determined, and the line should inherit the indentation of the one
17571
17933
  above it. A return value of `undefined` defers to the next indent
17572
17934
  service.
17573
17935
  */
17574
- const indentService = /* @__PURE__ */ Facet.define();
17936
+ const indentService = /*@__PURE__*/ Facet.define();
17575
17937
  /**
17576
17938
  Facet for overriding the unit by which indentation happens. Should
17577
17939
  be a string consisting either entirely of the same whitespace
17578
17940
  character. When not set, this defaults to 2 spaces.
17579
17941
  */
17580
- const indentUnit = /* @__PURE__ */ Facet.define({ combine: (values) => {
17942
+ const indentUnit = /*@__PURE__*/ Facet.define({ combine: (values) => {
17581
17943
  if (!values.length) return " ";
17582
17944
  let unit = values[0];
17583
17945
  if (!unit || /\S/.test(unit) || Array.from(unit).some((e) => e != unit[0])) throw new Error("Invalid indent unit: " + JSON.stringify(values[0]));
@@ -17655,18 +18017,20 @@ var IndentContext = class {
17655
18017
  lineAt(pos, bias = 1) {
17656
18018
  let line = this.state.doc.lineAt(pos);
17657
18019
  let { simulateBreak, simulateDoubleBreak } = this.options;
17658
- if (simulateBreak != null && simulateBreak >= line.from && simulateBreak <= line.to) if (simulateDoubleBreak && simulateBreak == pos) return {
17659
- text: "",
17660
- from: pos
17661
- };
17662
- else if (bias < 0 ? simulateBreak < pos : simulateBreak <= pos) return {
17663
- text: line.text.slice(simulateBreak - line.from),
17664
- from: simulateBreak
17665
- };
17666
- else return {
17667
- text: line.text.slice(0, simulateBreak - line.from),
17668
- from: line.from
17669
- };
18020
+ if (simulateBreak != null && simulateBreak >= line.from && simulateBreak <= line.to) {
18021
+ if (simulateDoubleBreak && simulateBreak == pos) return {
18022
+ text: "",
18023
+ from: pos
18024
+ };
18025
+ else if (bias < 0 ? simulateBreak < pos : simulateBreak <= pos) return {
18026
+ text: line.text.slice(simulateBreak - line.from),
18027
+ from: simulateBreak
18028
+ };
18029
+ else return {
18030
+ text: line.text.slice(0, simulateBreak - line.from),
18031
+ from: line.from
18032
+ };
18033
+ }
17670
18034
  return line;
17671
18035
  }
17672
18036
  /**
@@ -17723,7 +18087,7 @@ context to a column number (see also
17723
18087
  [`indentString`](https://codemirror.net/6/docs/ref/#language.indentString)) or null, where null
17724
18088
  indicates that no definitive indentation can be determined.
17725
18089
  */
17726
- const indentNodeProp = /* @__PURE__ */ new NodeProp();
18090
+ const indentNodeProp = /*@__PURE__*/ new NodeProp();
17727
18091
  function syntaxIndentation(cx, ast, pos) {
17728
18092
  let stack = ast.resolveStack(pos);
17729
18093
  let inner = ast.resolveInner(pos, -1).resolve(pos, 0).enterUnfinishedNodesBefore(pos);
@@ -17933,14 +18297,14 @@ the extent of a line, such a function should return a foldable
17933
18297
  range that starts on that line (but continues beyond it), if one
17934
18298
  can be found.
17935
18299
  */
17936
- const foldService = /* @__PURE__ */ Facet.define();
18300
+ const foldService = /*@__PURE__*/ Facet.define();
17937
18301
  /**
17938
18302
  This node prop is used to associate folding information with
17939
18303
  syntax node types. Given a syntax node, it should check whether
17940
18304
  that tree is foldable and return the range that can be collapsed
17941
18305
  when it is.
17942
18306
  */
17943
- const foldNodeProp = /* @__PURE__ */ new NodeProp();
18307
+ const foldNodeProp = /*@__PURE__*/ new NodeProp();
17944
18308
  /**
17945
18309
  [Fold](https://codemirror.net/6/docs/ref/#language.foldNodeProp) function that folds everything but
17946
18310
  the first and the last child of a syntax node. Useful for nodes
@@ -18003,11 +18367,11 @@ circumstances—usually you'll just want to let
18003
18367
  [`foldCode`](https://codemirror.net/6/docs/ref/#language.foldCode) and the [fold
18004
18368
  gutter](https://codemirror.net/6/docs/ref/#language.foldGutter) create the transactions.)
18005
18369
  */
18006
- const foldEffect = /* @__PURE__ */ StateEffect.define({ map: mapRange });
18370
+ const foldEffect = /*@__PURE__*/ StateEffect.define({ map: mapRange });
18007
18371
  /**
18008
18372
  State effect that unfolds the given range (if it was folded).
18009
18373
  */
18010
- const unfoldEffect = /* @__PURE__ */ StateEffect.define({ map: mapRange });
18374
+ const unfoldEffect = /*@__PURE__*/ StateEffect.define({ map: mapRange });
18011
18375
  function selectedLines(view) {
18012
18376
  let lines = [];
18013
18377
  for (let { head } of view.state.selection.ranges) {
@@ -18023,7 +18387,7 @@ set](https://codemirror.net/6/docs/ref/#view.DecorationSet)). Can be passed to
18023
18387
  [`fromJSON`](https://codemirror.net/6/docs/ref/#state.EditorState^fromJSON) to serialize the fold
18024
18388
  state.
18025
18389
  */
18026
- const foldState = /* @__PURE__ */ StateField.define({
18390
+ const foldState = /*@__PURE__*/ StateField.define({
18027
18391
  create() {
18028
18392
  return Decoration.none;
18029
18393
  },
@@ -18189,7 +18553,7 @@ const defaultConfig = {
18189
18553
  preparePlaceholder: null,
18190
18554
  placeholderText: "…"
18191
18555
  };
18192
- const foldConfig = /* @__PURE__ */ Facet.define({ combine(values) {
18556
+ const foldConfig = /*@__PURE__*/ Facet.define({ combine(values) {
18193
18557
  return combineConfig(values, defaultConfig);
18194
18558
  } });
18195
18559
  /**
@@ -18217,7 +18581,7 @@ function widgetToDOM(view, prepared) {
18217
18581
  element.onclick = onclick;
18218
18582
  return element;
18219
18583
  }
18220
- const foldWidget = /* @__PURE__ */ Decoration.replace({ widget: /* @__PURE__ */ new class extends WidgetType {
18584
+ const foldWidget = /*@__PURE__*/ Decoration.replace({ widget: /*@__PURE__*/ new class extends WidgetType {
18221
18585
  toDOM(view) {
18222
18586
  return widgetToDOM(view, null);
18223
18587
  }
@@ -18313,7 +18677,7 @@ function foldGutter(config = {}) {
18313
18677
  codeFolding()
18314
18678
  ];
18315
18679
  }
18316
- const baseTheme$1$3 = /* @__PURE__ */ EditorView.baseTheme({
18680
+ const baseTheme$1$3 = /*@__PURE__*/ EditorView.baseTheme({
18317
18681
  ".cm-foldPlaceholder": {
18318
18682
  backgroundColor: "#eee",
18319
18683
  border: "1px solid #ddd",
@@ -18370,8 +18734,8 @@ var HighlightStyle = class HighlightStyle {
18370
18734
  return new HighlightStyle(specs, options || {});
18371
18735
  }
18372
18736
  };
18373
- const highlighterFacet = /* @__PURE__ */ Facet.define();
18374
- const fallbackHighlighter = /* @__PURE__ */ Facet.define({ combine(values) {
18737
+ const highlighterFacet = /*@__PURE__*/ Facet.define();
18738
+ const fallbackHighlighter = /*@__PURE__*/ Facet.define({ combine(values) {
18375
18739
  return values.length ? [values[0]] : null;
18376
18740
  } });
18377
18741
  function getHighlighters(state) {
@@ -18427,11 +18791,11 @@ var TreeHighlighter = class {
18427
18791
  return builder.finish();
18428
18792
  }
18429
18793
  };
18430
- const treeHighlighter = /* @__PURE__ */ Prec.high(/* @__PURE__ */ ViewPlugin.fromClass(TreeHighlighter, { decorations: (v) => v.decorations }));
18794
+ const treeHighlighter = /*@__PURE__*/ Prec.high(/*@__PURE__*/ ViewPlugin.fromClass(TreeHighlighter, { decorations: (v) => v.decorations }));
18431
18795
  /**
18432
18796
  A default highlight style (works well with light themes).
18433
18797
  */
18434
- const defaultHighlightStyle = /* @__PURE__ */ HighlightStyle.define([
18798
+ const defaultHighlightStyle = /*@__PURE__*/ HighlightStyle.define([
18435
18799
  {
18436
18800
  tag: tags.meta,
18437
18801
  color: "#404740"
@@ -18483,16 +18847,16 @@ const defaultHighlightStyle = /* @__PURE__ */ HighlightStyle.define([
18483
18847
  tag: [
18484
18848
  tags.regexp,
18485
18849
  tags.escape,
18486
- /* @__PURE__ */ tags.special(tags.string)
18850
+ /*@__PURE__*/ tags.special(tags.string)
18487
18851
  ],
18488
18852
  color: "#e40"
18489
18853
  },
18490
18854
  {
18491
- tag: /* @__PURE__ */ tags.definition(tags.variableName),
18855
+ tag: /*@__PURE__*/ tags.definition(tags.variableName),
18492
18856
  color: "#00f"
18493
18857
  },
18494
18858
  {
18495
- tag: /* @__PURE__ */ tags.local(tags.variableName),
18859
+ tag: /*@__PURE__*/ tags.local(tags.variableName),
18496
18860
  color: "#30a"
18497
18861
  },
18498
18862
  {
@@ -18504,11 +18868,11 @@ const defaultHighlightStyle = /* @__PURE__ */ HighlightStyle.define([
18504
18868
  color: "#167"
18505
18869
  },
18506
18870
  {
18507
- tag: [/* @__PURE__ */ tags.special(tags.variableName), tags.macroName],
18871
+ tag: [/*@__PURE__*/ tags.special(tags.variableName), tags.macroName],
18508
18872
  color: "#256"
18509
18873
  },
18510
18874
  {
18511
- tag: /* @__PURE__ */ tags.definition(tags.propertyName),
18875
+ tag: /*@__PURE__*/ tags.definition(tags.propertyName),
18512
18876
  color: "#00c"
18513
18877
  },
18514
18878
  {
@@ -18520,12 +18884,13 @@ const defaultHighlightStyle = /* @__PURE__ */ HighlightStyle.define([
18520
18884
  color: "#f00"
18521
18885
  }
18522
18886
  ]);
18523
- const baseTheme$4 = /* @__PURE__ */ EditorView.baseTheme({
18887
+ const baseTheme$4 = /*@__PURE__*/ EditorView.baseTheme({
18524
18888
  "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" },
18525
18889
  "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" }
18526
18890
  });
18527
- const DefaultScanDist = 1e4, DefaultBrackets = "()[]{}";
18528
- const bracketMatchingConfig = /* @__PURE__ */ Facet.define({ combine(configs) {
18891
+ const DefaultScanDist = 1e4;
18892
+ const DefaultBrackets = "()[]{}";
18893
+ const bracketMatchingConfig = /*@__PURE__*/ Facet.define({ combine(configs) {
18529
18894
  return combineConfig(configs, {
18530
18895
  afterCursor: true,
18531
18896
  brackets: DefaultBrackets,
@@ -18533,7 +18898,8 @@ const bracketMatchingConfig = /* @__PURE__ */ Facet.define({ combine(configs) {
18533
18898
  renderMatch: defaultRenderMatch
18534
18899
  });
18535
18900
  } });
18536
- const matchingMark = /* @__PURE__ */ Decoration.mark({ class: "cm-matchingBracket" }), nonmatchingMark = /* @__PURE__ */ Decoration.mark({ class: "cm-nonmatchingBracket" });
18901
+ const matchingMark = /*@__PURE__*/ Decoration.mark({ class: "cm-matchingBracket" });
18902
+ const nonmatchingMark = /*@__PURE__*/ Decoration.mark({ class: "cm-nonmatchingBracket" });
18537
18903
  function defaultRenderMatch(match) {
18538
18904
  let decorations = [];
18539
18905
  let mark = match.matched ? matchingMark : nonmatchingMark;
@@ -18575,7 +18941,7 @@ a node, a ‘handle’—the part of the node that is highlighted, and
18575
18941
  that the cursor must be on to activate highlighting in the first
18576
18942
  place.
18577
18943
  */
18578
- const bracketMatchingHandle = /* @__PURE__ */ new NodeProp();
18944
+ const bracketMatchingHandle = /*@__PURE__*/ new NodeProp();
18579
18945
  function matchingNodes(node, dir, brackets) {
18580
18946
  let byProp = node.prop(dir < 0 ? NodeProp.openedBy : NodeProp.closedBy);
18581
18947
  if (byProp) return byProp;
@@ -18681,11 +19047,11 @@ function matchPlainBrackets(state, pos, dir, tree, tokenType, maxScanDistance, b
18681
19047
  matched: false
18682
19048
  } : null;
18683
19049
  }
18684
- const noTokens = /* @__PURE__ */ Object.create(null);
19050
+ const noTokens = /*@__PURE__*/ Object.create(null);
18685
19051
  const typeArray = [NodeType.none];
18686
19052
  const warned = [];
18687
- const byTag = /* @__PURE__ */ Object.create(null);
18688
- const defaultTable = /* @__PURE__ */ Object.create(null);
19053
+ const byTag = /*@__PURE__*/ Object.create(null);
19054
+ const defaultTable = /*@__PURE__*/ Object.create(null);
18689
19055
  for (let [legacyName, name] of [
18690
19056
  ["variable", "variableName"],
18691
19057
  ["variable-2", "variableName.special"],
@@ -18699,7 +19065,7 @@ for (let [legacyName, name] of [
18699
19065
  ["error", "invalid"],
18700
19066
  ["header", "heading"],
18701
19067
  ["property", "propertyName"]
18702
- ]) defaultTable[legacyName] = /* @__PURE__ */ createTokenType(noTokens, name);
19068
+ ]) defaultTable[legacyName] = /*@__PURE__*/ createTokenType(noTokens, name);
18703
19069
  function warnForPart(part, msg) {
18704
19070
  if (warned.indexOf(part) > -1) return;
18705
19071
  warned.push(part);
@@ -18712,9 +19078,10 @@ function createTokenType(extra, tagStr) {
18712
19078
  for (let part of name.split(".")) {
18713
19079
  let value = extra[part] || tags[part];
18714
19080
  if (!value) warnForPart(part, `Unknown highlighting tag ${part}`);
18715
- else if (typeof value == "function") if (!found.length) warnForPart(part, `Modifier ${part} used at start of tag`);
18716
- else found = found.map(value);
18717
- else if (found.length) warnForPart(part, `Tag ${part} used as modifier`);
19081
+ else if (typeof value == "function") {
19082
+ if (!found.length) warnForPart(part, `Modifier ${part} used at start of tag`);
19083
+ else found = found.map(value);
19084
+ } else if (found.length) warnForPart(part, `Tag ${part} used as modifier`);
18718
19085
  else found = Array.isArray(value) ? value : [value];
18719
19086
  }
18720
19087
  for (let tag of found) tags$1.push(tag);
@@ -19968,7 +20335,7 @@ function ensureAnchor(expr, start) {
19968
20335
  This annotation is added to transactions that are produced by
19969
20336
  picking a completion.
19970
20337
  */
19971
- const pickedCompletion = /* @__PURE__ */ Annotation.define();
20338
+ const pickedCompletion = /*@__PURE__*/ Annotation.define();
19972
20339
  /**
19973
20340
  Helper function that returns a transaction spec which inserts a
19974
20341
  completion's text in the main selection range, and any other
@@ -19992,15 +20359,15 @@ function insertCompletionText(state, text, from, to) {
19992
20359
  userEvent: "input.complete"
19993
20360
  });
19994
20361
  }
19995
- const SourceCache = /* @__PURE__ */ new WeakMap();
20362
+ const SourceCache = /*@__PURE__*/ new WeakMap();
19996
20363
  function asSource(source) {
19997
20364
  if (!Array.isArray(source)) return source;
19998
20365
  let known = SourceCache.get(source);
19999
20366
  if (!known) SourceCache.set(source, known = completeFromList(source));
20000
20367
  return known;
20001
20368
  }
20002
- const startCompletionEffect = /* @__PURE__ */ StateEffect.define();
20003
- const closeCompletionEffect = /* @__PURE__ */ StateEffect.define();
20369
+ const startCompletionEffect = /*@__PURE__*/ StateEffect.define();
20370
+ const closeCompletionEffect = /*@__PURE__*/ StateEffect.define();
20004
20371
  var FuzzyMatcher = class {
20005
20372
  constructor(pattern) {
20006
20373
  this.pattern = pattern;
@@ -20056,11 +20423,13 @@ var FuzzyMatcher = class {
20056
20423
  let next = codePointAt(word, i);
20057
20424
  if (direct < 0) {
20058
20425
  if (preciseTo < len && next == chars[preciseTo]) precise[preciseTo++] = i;
20059
- if (adjacentTo < len) if (next == chars[adjacentTo] || next == folded[adjacentTo]) {
20060
- if (adjacentTo == 0) adjacentStart = i;
20061
- adjacentEnd = i + 1;
20062
- adjacentTo++;
20063
- } else adjacentTo = 0;
20426
+ if (adjacentTo < len) {
20427
+ if (next == chars[adjacentTo] || next == folded[adjacentTo]) {
20428
+ if (adjacentTo == 0) adjacentStart = i;
20429
+ adjacentEnd = i + 1;
20430
+ adjacentTo++;
20431
+ } else adjacentTo = 0;
20432
+ }
20064
20433
  }
20065
20434
  let ch, type = next < 255 ? next >= 48 && next <= 57 || next >= 97 && next <= 122 ? 2 : next >= 65 && next <= 90 ? 1 : 0 : (ch = fromCodePoint(next)) != ch.toLowerCase() ? 1 : ch != ch.toUpperCase() ? 2 : 0;
20066
20435
  if (!i || type == 1 && hasLower || prevType == 0 && type != 0) {
@@ -20107,7 +20476,7 @@ var StrictMatcher = class {
20107
20476
  return this;
20108
20477
  }
20109
20478
  };
20110
- const completionConfig = /* @__PURE__ */ Facet.define({ combine(configs) {
20479
+ const completionConfig = /*@__PURE__*/ Facet.define({ combine(configs) {
20111
20480
  return combineConfig(configs, {
20112
20481
  activateOnTyping: true,
20113
20482
  activateOnCompletion: () => false,
@@ -20368,10 +20737,12 @@ var CompletionTooltip = class {
20368
20737
  return this.view.state.facet(completionConfig).positionInfo(this.view, listRect, selRect, infoRect, space, this.dom);
20369
20738
  }
20370
20739
  placeInfo(pos) {
20371
- if (this.info) if (pos) {
20372
- if (pos.style) this.info.style.cssText = pos.style;
20373
- this.info.className = "cm-tooltip cm-completionInfo " + (pos.class || "");
20374
- } else this.info.style.cssText = "top: -1e6px";
20740
+ if (this.info) {
20741
+ if (pos) {
20742
+ if (pos.style) this.info.style.cssText = pos.style;
20743
+ this.info.className = "cm-tooltip cm-completionInfo " + (pos.class || "");
20744
+ } else this.info.style.cssText = "top: -1e6px";
20745
+ }
20375
20746
  }
20376
20747
  createListBox(options, id, range) {
20377
20748
  const ul = document.createElement("ul");
@@ -20653,11 +21024,11 @@ function checkValid(validFor, state, from, to) {
20653
21024
  let text = state.sliceDoc(from, to);
20654
21025
  return typeof validFor == "function" ? validFor(text, from, to, state) : ensureAnchor(validFor, true).test(text);
20655
21026
  }
20656
- const setActiveEffect = /* @__PURE__ */ StateEffect.define({ map(sources, mapping) {
21027
+ const setActiveEffect = /*@__PURE__*/ StateEffect.define({ map(sources, mapping) {
20657
21028
  return sources.map((s) => s.map(mapping));
20658
21029
  } });
20659
- const setSelectedEffect = /* @__PURE__ */ StateEffect.define();
20660
- const completionState = /* @__PURE__ */ StateField.define({
21030
+ const setSelectedEffect = /*@__PURE__*/ StateEffect.define();
21031
+ const completionState = /*@__PURE__*/ StateField.define({
20661
21032
  create() {
20662
21033
  return CompletionState.start();
20663
21034
  },
@@ -20674,7 +21045,7 @@ function applyCompletion(view, option) {
20674
21045
  else apply(view, option.completion, result.from, result.to);
20675
21046
  return true;
20676
21047
  }
20677
- const createTooltip = /* @__PURE__ */ completionTooltip(completionState, applyCompletion);
21048
+ const createTooltip = /*@__PURE__*/ completionTooltip(completionState, applyCompletion);
20678
21049
  /**
20679
21050
  Returns a command that moves the completion selection forward or
20680
21051
  backward by the given amount.
@@ -20727,8 +21098,9 @@ var RunningQuery = class {
20727
21098
  this.done = void 0;
20728
21099
  }
20729
21100
  };
20730
- const MaxUpdateCount = 50, MinAbortTime = 1e3;
20731
- const completionPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
21101
+ const MaxUpdateCount = 50;
21102
+ const MinAbortTime = 1e3;
21103
+ const completionPlugin = /*@__PURE__*/ ViewPlugin.fromClass(class {
20732
21104
  constructor(view) {
20733
21105
  this.view = view;
20734
21106
  this.debounceUpdate = -1;
@@ -20814,11 +21186,13 @@ const completionPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
20814
21186
  }
20815
21187
  }
20816
21188
  let current = cState.active.find((a) => a.source == query.active.source);
20817
- if (current && current.isPending) if (query.done == null) {
20818
- let active = new ActiveSource(query.active.source, 0);
20819
- for (let tr of query.updates) active = active.update(tr, conf);
20820
- if (!active.isPending) updated.push(active);
20821
- } else this.startQuery(current);
21189
+ if (current && current.isPending) {
21190
+ if (query.done == null) {
21191
+ let active = new ActiveSource(query.active.source, 0);
21192
+ for (let tr of query.updates) active = active.update(tr, conf);
21193
+ if (!active.isPending) updated.push(active);
21194
+ } else this.startQuery(current);
21195
+ }
20822
21196
  }
20823
21197
  if (updated.length || cState.open && cState.open.disabled) this.view.dispatch({ effects: setActiveEffect.of(updated) });
20824
21198
  }
@@ -20838,8 +21212,8 @@ const completionPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
20838
21212
  this.composing = 0;
20839
21213
  }
20840
21214
  } });
20841
- const windows = typeof navigator == "object" && /* @__PURE__ */ /Win/.test(navigator.platform);
20842
- const commitCharacters = /* @__PURE__ */ Prec.highest(/* @__PURE__ */ EditorView.domEventHandlers({ keydown(event, view) {
21215
+ const windows = typeof navigator == "object" && /*@__PURE__*/ /Win/.test(navigator.platform);
21216
+ const commitCharacters = /*@__PURE__*/ Prec.highest(/*@__PURE__*/ EditorView.domEventHandlers({ keydown(event, view) {
20843
21217
  let field = view.state.field(completionState, false);
20844
21218
  if (!field || !field.open || field.open.disabled || field.open.selected < 0 || event.key.length > 1 || event.ctrlKey && !(windows && event.altKey) || event.metaKey) return false;
20845
21219
  let option = field.open.options[field.open.selected];
@@ -20848,7 +21222,7 @@ const commitCharacters = /* @__PURE__ */ Prec.highest(/* @__PURE__ */ EditorView
20848
21222
  if (commitChars && commitChars.indexOf(event.key) > -1) applyCompletion(view, option);
20849
21223
  return false;
20850
21224
  } }));
20851
- const baseTheme$2 = /* @__PURE__ */ EditorView.baseTheme({
21225
+ const baseTheme$2 = /*@__PURE__*/ EditorView.baseTheme({
20852
21226
  ".cm-tooltip.cm-tooltip-autocomplete": { "& > ul": {
20853
21227
  fontFamily: "monospace",
20854
21228
  whiteSpace: "nowrap",
@@ -20956,14 +21330,14 @@ const defaults = {
20956
21330
  before: ")]}:;>",
20957
21331
  stringPrefixes: []
20958
21332
  };
20959
- const closeBracketEffect = /* @__PURE__ */ StateEffect.define({ map(value, mapping) {
21333
+ const closeBracketEffect = /*@__PURE__*/ StateEffect.define({ map(value, mapping) {
20960
21334
  let mapped = mapping.mapPos(value, -1, MapMode.TrackAfter);
20961
21335
  return mapped == null ? void 0 : mapped;
20962
21336
  } });
20963
- const closedBracket = /* @__PURE__ */ new class extends RangeValue {}();
21337
+ const closedBracket = /*@__PURE__*/ new class extends RangeValue {}();
20964
21338
  closedBracket.startSide = 1;
20965
21339
  closedBracket.endSide = -1;
20966
- const bracketState = /* @__PURE__ */ StateField.define({
21340
+ const bracketState = /*@__PURE__*/ StateField.define({
20967
21341
  create() {
20968
21342
  return RangeSet.empty;
20969
21343
  },
@@ -20995,8 +21369,8 @@ function closing(ch) {
20995
21369
  function config(state, pos) {
20996
21370
  return state.languageDataAt("closeBrackets", pos)[0] || defaults;
20997
21371
  }
20998
- const android = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent);
20999
- const inputHandler = /* @__PURE__ */ EditorView.inputHandler.of((view, from, to, insert) => {
21372
+ const android = typeof navigator == "object" && /*@__PURE__*/ /Android\b/.test(navigator.userAgent);
21373
+ const inputHandler = /*@__PURE__*/ EditorView.inputHandler.of((view, from, to, insert) => {
21000
21374
  if ((android ? view.composing : view.compositionStarted) || view.state.readOnly) return false;
21001
21375
  let sel = view.state.selection.main;
21002
21376
  if (insert.length > 2 || insert.length == 2 && codePointSize(codePointAt(insert, 0)) == 1 || from != sel.from || to != sel.to) return false;
@@ -21253,26 +21627,26 @@ const completionKeymap = [
21253
21627
  },
21254
21628
  {
21255
21629
  key: "ArrowDown",
21256
- run: /* @__PURE__ */ moveCompletionSelection(true)
21630
+ run: /*@__PURE__*/ moveCompletionSelection(true)
21257
21631
  },
21258
21632
  {
21259
21633
  key: "ArrowUp",
21260
- run: /* @__PURE__ */ moveCompletionSelection(false)
21634
+ run: /*@__PURE__*/ moveCompletionSelection(false)
21261
21635
  },
21262
21636
  {
21263
21637
  key: "PageDown",
21264
- run: /* @__PURE__ */ moveCompletionSelection(true, "page")
21638
+ run: /*@__PURE__*/ moveCompletionSelection(true, "page")
21265
21639
  },
21266
21640
  {
21267
21641
  key: "PageUp",
21268
- run: /* @__PURE__ */ moveCompletionSelection(false, "page")
21642
+ run: /*@__PURE__*/ moveCompletionSelection(false, "page")
21269
21643
  },
21270
21644
  {
21271
21645
  key: "Enter",
21272
21646
  run: acceptCompletion
21273
21647
  }
21274
21648
  ];
21275
- const completionKeymapExt = /* @__PURE__ */ Prec.highest(/* @__PURE__ */ keymap.computeN([completionConfig], (state) => state.facet(completionConfig).defaultKeymap ? [completionKeymap] : []));
21649
+ const completionKeymapExt = /*@__PURE__*/ Prec.highest(/*@__PURE__*/ keymap.computeN([completionConfig], (state) => state.facet(completionConfig).defaultKeymap ? [completionKeymap] : []));
21276
21650
  //#endregion
21277
21651
  //#region ../../node_modules/.pnpm/@codemirror+commands@6.8.1/node_modules/@codemirror/commands/dist/index.js
21278
21652
  /**
@@ -21298,19 +21672,19 @@ The line comment syntax is taken from the
21298
21672
  [`commentTokens`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) [language
21299
21673
  data](https://codemirror.net/6/docs/ref/#state.EditorState.languageDataAt).
21300
21674
  */
21301
- const toggleLineComment = /* @__PURE__ */ command(changeLineComment, 0);
21675
+ const toggleLineComment = /*@__PURE__*/ command(changeLineComment, 0);
21302
21676
  /**
21303
21677
  Comment or uncomment the current selection using block comments.
21304
21678
  The block comment syntax is taken from the
21305
21679
  [`commentTokens`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) [language
21306
21680
  data](https://codemirror.net/6/docs/ref/#state.EditorState.languageDataAt).
21307
21681
  */
21308
- const toggleBlockComment = /* @__PURE__ */ command(changeBlockComment, 0);
21682
+ const toggleBlockComment = /*@__PURE__*/ command(changeBlockComment, 0);
21309
21683
  /**
21310
21684
  Comment or uncomment the lines around the current selection using
21311
21685
  block comments.
21312
21686
  */
21313
- const toggleBlockCommentByLine = /* @__PURE__ */ command((o, s) => changeBlockComment(o, s, selectedLineRanges(s)), 0);
21687
+ const toggleBlockCommentByLine = /*@__PURE__*/ command((o, s) => changeBlockComment(o, s, selectedLineRanges(s)), 0);
21314
21688
  function getConfig(state, pos) {
21315
21689
  let data = state.languageDataAt("commentTokens", pos, 1);
21316
21690
  return data.length ? data[0] : {};
@@ -21336,7 +21710,7 @@ function findBlockComment(state, { open, close }, from, to) {
21336
21710
  }
21337
21711
  };
21338
21712
  let startText, endText;
21339
- if (to - from <= 2 * SearchMargin) startText = endText = state.sliceDoc(from, to);
21713
+ if (to - from <= 100) startText = endText = state.sliceDoc(from, to);
21340
21714
  else {
21341
21715
  startText = state.sliceDoc(from, from + SearchMargin);
21342
21716
  endText = state.sliceDoc(to - SearchMargin, to);
@@ -21456,7 +21830,7 @@ function changeLineComment(option, state, ranges = state.selection.ranges) {
21456
21830
  }
21457
21831
  return null;
21458
21832
  }
21459
- const fromHistory = /* @__PURE__ */ Annotation.define();
21833
+ const fromHistory = /*@__PURE__*/ Annotation.define();
21460
21834
  /**
21461
21835
  Transaction annotation that will prevent that transaction from
21462
21836
  being combined with other transactions in the undo history. Given
@@ -21464,7 +21838,7 @@ being combined with other transactions in the undo history. Given
21464
21838
  `"after"`, subsequent transactions won't be combined with this
21465
21839
  one. With `"full"`, the transaction is isolated on both sides.
21466
21840
  */
21467
- const isolateHistory = /* @__PURE__ */ Annotation.define();
21841
+ const isolateHistory = /*@__PURE__*/ Annotation.define();
21468
21842
  /**
21469
21843
  This facet provides a way to register functions that, given a
21470
21844
  transaction, provide a set of effects that the history should
@@ -21472,8 +21846,8 @@ store when inverting the transaction. This can be used to
21472
21846
  integrate some kinds of effects in the history, so that they can
21473
21847
  be undone (and redone again).
21474
21848
  */
21475
- const invertedEffects = /* @__PURE__ */ Facet.define();
21476
- const historyConfig = /* @__PURE__ */ Facet.define({ combine(configs) {
21849
+ const invertedEffects = /*@__PURE__*/ Facet.define();
21850
+ const historyConfig = /*@__PURE__*/ Facet.define({ combine(configs) {
21477
21851
  return combineConfig(configs, {
21478
21852
  minDepth: 100,
21479
21853
  newGroupDelay: 500,
@@ -21484,7 +21858,7 @@ const historyConfig = /* @__PURE__ */ Facet.define({ combine(configs) {
21484
21858
  joinToEvent: (a, b) => (tr, adj) => a(tr, adj) || b(tr, adj)
21485
21859
  });
21486
21860
  } });
21487
- const historyField_ = /* @__PURE__ */ StateField.define({
21861
+ const historyField_ = /*@__PURE__*/ StateField.define({
21488
21862
  create() {
21489
21863
  return HistoryState.empty;
21490
21864
  },
@@ -21548,20 +21922,20 @@ function cmd(side, selection) {
21548
21922
  Undo a single group of history events. Returns false if no group
21549
21923
  was available.
21550
21924
  */
21551
- const undo = /* @__PURE__ */ cmd(0, false);
21925
+ const undo = /*@__PURE__*/ cmd(0, false);
21552
21926
  /**
21553
21927
  Redo a group of history events. Returns false if no group was
21554
21928
  available.
21555
21929
  */
21556
- const redo = /* @__PURE__ */ cmd(1, false);
21930
+ const redo = /*@__PURE__*/ cmd(1, false);
21557
21931
  /**
21558
21932
  Undo a change or selection change.
21559
21933
  */
21560
- const undoSelection = /* @__PURE__ */ cmd(0, true);
21934
+ const undoSelection = /*@__PURE__*/ cmd(0, true);
21561
21935
  /**
21562
21936
  Redo a change or selection change.
21563
21937
  */
21564
- const redoSelection = /* @__PURE__ */ cmd(1, true);
21938
+ const redoSelection = /*@__PURE__*/ cmd(1, true);
21565
21939
  var HistEvent = class HistEvent {
21566
21940
  constructor(changes, effects, mapped, startSelection, selectionsAfter) {
21567
21941
  this.changes = changes;
@@ -21722,7 +22096,7 @@ var HistoryState = class HistoryState {
21722
22096
  }
21723
22097
  }
21724
22098
  };
21725
- HistoryState.empty = /* @__PURE__ */ new HistoryState(none, none);
22099
+ HistoryState.empty = /*@__PURE__*/ new HistoryState(none, none);
21726
22100
  /**
21727
22101
  Default key bindings for the undo history.
21728
22102
 
@@ -22431,11 +22805,11 @@ will also delete that whitespace. When the cursor is between
22431
22805
  matching brackets, an additional newline will be inserted after
22432
22806
  the cursor.
22433
22807
  */
22434
- const insertNewlineAndIndent = /* @__PURE__ */ newlineAndIndent(false);
22808
+ const insertNewlineAndIndent = /*@__PURE__*/ newlineAndIndent(false);
22435
22809
  /**
22436
22810
  Create a blank, indented line below the current line.
22437
22811
  */
22438
- const insertBlankLine = /* @__PURE__ */ newlineAndIndent(true);
22812
+ const insertBlankLine = /*@__PURE__*/ newlineAndIndent(true);
22439
22813
  function newlineAndIndent(atEof) {
22440
22814
  return ({ state, dispatch }) => {
22441
22815
  if (state.readOnly) return false;
@@ -22677,7 +23051,7 @@ property changed to `mac`.)
22677
23051
  - Cmd-Backspace (macOS): [`deleteLineBoundaryBackward`](https://codemirror.net/6/docs/ref/#commands.deleteLineBoundaryBackward).
22678
23052
  - Cmd-Delete (macOS): [`deleteLineBoundaryForward`](https://codemirror.net/6/docs/ref/#commands.deleteLineBoundaryForward).
22679
23053
  */
22680
- const standardKeymap = /* @__PURE__ */ [
23054
+ const standardKeymap = /*@__PURE__*/ [
22681
23055
  {
22682
23056
  key: "ArrowLeft",
22683
23057
  run: cursorCharLeft,
@@ -22816,7 +23190,7 @@ const standardKeymap = /* @__PURE__ */ [
22816
23190
  mac: "Mod-Delete",
22817
23191
  run: deleteLineBoundaryForward
22818
23192
  }
22819
- ].concat(/* @__PURE__ */ emacsStyleKeymap.map((b) => ({
23193
+ ].concat(/*@__PURE__*/ emacsStyleKeymap.map((b) => ({
22820
23194
  mac: b.key,
22821
23195
  run: b.run,
22822
23196
  shift: b.shift
@@ -22844,7 +23218,7 @@ The default keymap. Includes all bindings from
22844
23218
  - Shift-Alt-a: [`toggleBlockComment`](https://codemirror.net/6/docs/ref/#commands.toggleBlockComment).
22845
23219
  - Ctrl-m (Alt-Shift-m on macOS): [`toggleTabFocusMode`](https://codemirror.net/6/docs/ref/#commands.toggleTabFocusMode).
22846
23220
  */
22847
- const defaultKeymap = /* @__PURE__ */ [
23221
+ const defaultKeymap = /*@__PURE__*/ [
22848
23222
  {
22849
23223
  key: "Alt-ArrowLeft",
22850
23224
  mac: "Ctrl-ArrowLeft",
@@ -23033,24 +23407,28 @@ var SearchCursor = class {
23033
23407
  let match = null;
23034
23408
  for (let i = 0; i < this.matches.length; i += 2) {
23035
23409
  let index = this.matches[i], keep = false;
23036
- if (this.query.charCodeAt(index) == code) if (index == this.query.length - 1) match = {
23037
- from: this.matches[i + 1],
23038
- to: end
23039
- };
23040
- else {
23041
- this.matches[i]++;
23042
- keep = true;
23410
+ if (this.query.charCodeAt(index) == code) {
23411
+ if (index == this.query.length - 1) match = {
23412
+ from: this.matches[i + 1],
23413
+ to: end
23414
+ };
23415
+ else {
23416
+ this.matches[i]++;
23417
+ keep = true;
23418
+ }
23043
23419
  }
23044
23420
  if (!keep) {
23045
23421
  this.matches.splice(i, 2);
23046
23422
  i -= 2;
23047
23423
  }
23048
23424
  }
23049
- if (this.query.charCodeAt(0) == code) if (this.query.length == 1) match = {
23050
- from: pos,
23051
- to: end
23052
- };
23053
- else this.matches.push(1, pos);
23425
+ if (this.query.charCodeAt(0) == code) {
23426
+ if (this.query.length == 1) match = {
23427
+ from: pos,
23428
+ to: end
23429
+ };
23430
+ else this.matches.push(1, pos);
23431
+ }
23054
23432
  if (match && this.test && !this.test(match.from, match.to, this.buffer, this.bufferStart)) match = null;
23055
23433
  return match;
23056
23434
  }
@@ -23061,7 +23439,7 @@ if (typeof Symbol != "undefined") SearchCursor.prototype[Symbol.iterator] = func
23061
23439
  const empty = {
23062
23440
  from: -1,
23063
23441
  to: -1,
23064
- match: /* @__PURE__ */ /.*/.exec("")
23442
+ match: /*@__PURE__*/ /.*/.exec("")
23065
23443
  };
23066
23444
  const baseFlags = "gm" + (/x/.unicode == null ? "" : "u");
23067
23445
  /**
@@ -23094,7 +23472,8 @@ var RegExpCursor = class {
23094
23472
  this.re = new RegExp(query, baseFlags + ((options === null || options === void 0 ? void 0 : options.ignoreCase) ? "i" : ""));
23095
23473
  this.test = options === null || options === void 0 ? void 0 : options.test;
23096
23474
  this.iter = text.iter();
23097
- this.curLineStart = text.lineAt(from).from;
23475
+ let startLine = text.lineAt(from);
23476
+ this.curLineStart = startLine.from;
23098
23477
  this.matchPos = toCharEnd(text, from);
23099
23478
  this.getLine(this.curLineStart);
23100
23479
  }
@@ -23142,7 +23521,7 @@ var RegExpCursor = class {
23142
23521
  }
23143
23522
  }
23144
23523
  };
23145
- const flattened = /* @__PURE__ */ new WeakMap();
23524
+ const flattened = /*@__PURE__*/ new WeakMap();
23146
23525
  var FlattenedDoc = class FlattenedDoc {
23147
23526
  constructor(from, text) {
23148
23527
  this.from = from;
@@ -23284,8 +23663,8 @@ function createLineDialog(view) {
23284
23663
  }
23285
23664
  return { dom };
23286
23665
  }
23287
- const dialogEffect = /* @__PURE__ */ StateEffect.define();
23288
- const dialogField = /* @__PURE__ */ StateField.define({
23666
+ const dialogEffect = /*@__PURE__*/ StateEffect.define();
23667
+ const dialogField = /*@__PURE__*/ StateField.define({
23289
23668
  create() {
23290
23669
  return true;
23291
23670
  },
@@ -23315,7 +23694,7 @@ const gotoLine = (view) => {
23315
23694
  if (panel) panel.dom.querySelector("input").select();
23316
23695
  return true;
23317
23696
  };
23318
- const baseTheme$1 = /* @__PURE__ */ EditorView.baseTheme({ ".cm-panel.cm-gotoLine": {
23697
+ const baseTheme$1 = /*@__PURE__*/ EditorView.baseTheme({ ".cm-panel.cm-gotoLine": {
23319
23698
  padding: "2px 6px 4px",
23320
23699
  position: "relative",
23321
23700
  "& label": { fontSize: "80%" },
@@ -23336,7 +23715,7 @@ const defaultHighlightOptions = {
23336
23715
  maxMatches: 100,
23337
23716
  wholeWords: false
23338
23717
  };
23339
- const highlightConfig = /* @__PURE__ */ Facet.define({ combine(options) {
23718
+ const highlightConfig = /*@__PURE__*/ Facet.define({ combine(options) {
23340
23719
  return combineConfig(options, defaultHighlightOptions, {
23341
23720
  highlightWordAroundCursor: (a, b) => a || b,
23342
23721
  minSelectionLength: Math.min,
@@ -23354,15 +23733,15 @@ function highlightSelectionMatches(options) {
23354
23733
  if (options) ext.push(highlightConfig.of(options));
23355
23734
  return ext;
23356
23735
  }
23357
- const matchDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-selectionMatch" });
23358
- const mainMatchDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
23736
+ const matchDeco = /*@__PURE__*/ Decoration.mark({ class: "cm-selectionMatch" });
23737
+ const mainMatchDeco = /*@__PURE__*/ Decoration.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
23359
23738
  function insideWordBoundaries(check, state, from, to) {
23360
23739
  return (from == 0 || check(state.sliceDoc(from - 1, from)) != CharCategory.Word) && (to == state.doc.length || check(state.sliceDoc(to, to + 1)) != CharCategory.Word);
23361
23740
  }
23362
23741
  function insideWord(check, state, from, to) {
23363
23742
  return check(state.sliceDoc(from, from + 1)) == CharCategory.Word && check(state.sliceDoc(to - 1, to)) == CharCategory.Word;
23364
23743
  }
23365
- const matchHighlighter = /* @__PURE__ */ ViewPlugin.fromClass(class {
23744
+ const matchHighlighter = /*@__PURE__*/ ViewPlugin.fromClass(class {
23366
23745
  constructor(view) {
23367
23746
  this.decorations = this.getDeco(view);
23368
23747
  }
@@ -23407,7 +23786,7 @@ const matchHighlighter = /* @__PURE__ */ ViewPlugin.fromClass(class {
23407
23786
  return Decoration.set(deco);
23408
23787
  }
23409
23788
  }, { decorations: (v) => v.decorations });
23410
- const defaultTheme = /* @__PURE__ */ EditorView.baseTheme({
23789
+ const defaultTheme = /*@__PURE__*/ EditorView.baseTheme({
23411
23790
  ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
23412
23791
  ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
23413
23792
  });
@@ -23457,7 +23836,7 @@ const selectNextOccurrence = ({ state, dispatch }) => {
23457
23836
  }));
23458
23837
  return true;
23459
23838
  };
23460
- const searchConfigFacet = /* @__PURE__ */ Facet.define({ combine(configs) {
23839
+ const searchConfigFacet = /*@__PURE__*/ Facet.define({ combine(configs) {
23461
23840
  return combineConfig(configs, {
23462
23841
  top: false,
23463
23842
  caseSensitive: false,
@@ -23637,9 +24016,9 @@ this only has an effect if the search state has been initialized
23637
24016
  by running [`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel) at least
23638
24017
  once).
23639
24018
  */
23640
- const setSearchQuery = /* @__PURE__ */ StateEffect.define();
23641
- const togglePanel = /* @__PURE__ */ StateEffect.define();
23642
- const searchState = /* @__PURE__ */ StateField.define({
24019
+ const setSearchQuery = /*@__PURE__*/ StateEffect.define();
24020
+ const togglePanel = /*@__PURE__*/ StateEffect.define();
24021
+ const searchState = /*@__PURE__*/ StateField.define({
23643
24022
  create(state) {
23644
24023
  return new SearchState(defaultQuery(state).create(), null);
23645
24024
  },
@@ -23656,8 +24035,9 @@ var SearchState = class {
23656
24035
  this.panel = panel;
23657
24036
  }
23658
24037
  };
23659
- const matchMark = /* @__PURE__ */ Decoration.mark({ class: "cm-searchMatch" }), selectedMatchMark = /* @__PURE__ */ Decoration.mark({ class: "cm-searchMatch cm-searchMatch-selected" });
23660
- const searchHighlighter = /* @__PURE__ */ ViewPlugin.fromClass(class {
24038
+ const matchMark = /*@__PURE__*/ Decoration.mark({ class: "cm-searchMatch" });
24039
+ const selectedMatchMark = /*@__PURE__*/ Decoration.mark({ class: "cm-searchMatch cm-searchMatch-selected" });
24040
+ const searchHighlighter = /*@__PURE__*/ ViewPlugin.fromClass(class {
23661
24041
  constructor(view) {
23662
24042
  this.view = view;
23663
24043
  this.decorations = this.highlight(view.state.field(searchState));
@@ -23693,7 +24073,7 @@ selection to the first match after the current main selection.
23693
24073
  Will wrap around to the start of the document when it reaches the
23694
24074
  end.
23695
24075
  */
23696
- const findNext = /* @__PURE__ */ searchCommand((view, { query }) => {
24076
+ const findNext = /*@__PURE__*/ searchCommand((view, { query }) => {
23697
24077
  let { to } = view.state.selection.main;
23698
24078
  let next = query.nextMatch(view.state, to, to);
23699
24079
  if (!next) return false;
@@ -23712,7 +24092,7 @@ Move the selection to the previous instance of the search query,
23712
24092
  before the current main selection. Will wrap past the start
23713
24093
  of the document to start searching at the end again.
23714
24094
  */
23715
- const findPrevious = /* @__PURE__ */ searchCommand((view, { query }) => {
24095
+ const findPrevious = /*@__PURE__*/ searchCommand((view, { query }) => {
23716
24096
  let { state } = view, { from } = state.selection.main;
23717
24097
  let prev = query.prevMatch(state, from, from);
23718
24098
  if (!prev) return false;
@@ -23729,7 +24109,7 @@ const findPrevious = /* @__PURE__ */ searchCommand((view, { query }) => {
23729
24109
  /**
23730
24110
  Select all instances of the search query.
23731
24111
  */
23732
- const selectMatches = /* @__PURE__ */ searchCommand((view, { query }) => {
24112
+ const selectMatches = /*@__PURE__*/ searchCommand((view, { query }) => {
23733
24113
  let ranges = query.matchAll(view.state, 1e3);
23734
24114
  if (!ranges || !ranges.length) return false;
23735
24115
  view.dispatch({
@@ -23760,7 +24140,7 @@ const selectSelectionMatches = ({ state, dispatch }) => {
23760
24140
  /**
23761
24141
  Replace the current match of the search query.
23762
24142
  */
23763
- const replaceNext = /* @__PURE__ */ searchCommand((view, { query }) => {
24143
+ const replaceNext = /*@__PURE__*/ searchCommand((view, { query }) => {
23764
24144
  let { state } = view, { from, to } = state.selection.main;
23765
24145
  if (state.readOnly) return false;
23766
24146
  let match = query.nextMatch(state, from, from);
@@ -23796,7 +24176,7 @@ const replaceNext = /* @__PURE__ */ searchCommand((view, { query }) => {
23796
24176
  Replace all instances of the search query with the given
23797
24177
  replacement.
23798
24178
  */
23799
- const replaceAll = /* @__PURE__ */ searchCommand((view, { query }) => {
24179
+ const replaceAll = /*@__PURE__*/ searchCommand((view, { query }) => {
23800
24180
  if (view.state.readOnly) return false;
23801
24181
  let changes = query.matchAll(view.state, 1e9).map((match) => {
23802
24182
  let { from, to } = match;
@@ -24062,7 +24442,7 @@ function announceMatch(view, { from, to }) {
24062
24442
  }
24063
24443
  return EditorView.announce.of(`${view.state.phrase("current match")}. ${text} ${view.state.phrase("on line")} ${line.number}.`);
24064
24444
  }
24065
- const baseTheme = /* @__PURE__ */ EditorView.baseTheme({
24445
+ const baseTheme = /*@__PURE__*/ EditorView.baseTheme({
24066
24446
  ".cm-panel.cm-search": {
24067
24447
  padding: "2px 6px 4px",
24068
24448
  position: "relative",
@@ -24090,7 +24470,7 @@ const baseTheme = /* @__PURE__ */ EditorView.baseTheme({
24090
24470
  });
24091
24471
  const searchExtensions = [
24092
24472
  searchState,
24093
- /* @__PURE__ */ Prec.low(searchHighlighter),
24473
+ /*@__PURE__*/ Prec.low(searchHighlighter),
24094
24474
  baseTheme
24095
24475
  ];
24096
24476
  //#endregion
@@ -24210,4 +24590,4 @@ function useDocumentSync(view, doc) {
24210
24590
  //#endregion
24211
24591
  export { linter as C, EditorState as D, Compartment as E, StateEffect as O, forceLinting as S, keymap as T, foldNodeProp as _, makeFocusHandler as a, tags as b, baseEditorExtensions as c, ayuLight as d, LRLanguage as f, foldInside as g, delimitedIndent as h, useHandlerReconfiguration as i, StateField as k, baseKeymap as l, continuedIndent as m, useEditorCleanup as n, makePasteHandler as o, LanguageSupport as p, useEditorRefs as r, makeUpdateHandler as s, useDocumentSync as t, dracula as u, indentNodeProp as v, EditorView as w, LRParser as x, styleTags as y };
24212
24592
 
24213
- //# sourceMappingURL=hooks-D0DcS3MV.mjs.map
24593
+ //# sourceMappingURL=hooks-eQxBX7g4.js.map