ghost 5.72.1 → 5.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/components/{tryghost-adapter-cache-memory-ttl-5.72.1.tgz → tryghost-adapter-cache-memory-ttl-5.73.0.tgz} +0 -0
  2. package/components/{tryghost-adapter-cache-redis-5.72.1.tgz → tryghost-adapter-cache-redis-5.73.0.tgz} +0 -0
  3. package/components/{tryghost-adapter-manager-5.72.1.tgz → tryghost-adapter-manager-5.73.0.tgz} +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.73.0.tgz +0 -0
  5. package/components/{tryghost-api-framework-5.72.1.tgz → tryghost-api-framework-5.73.0.tgz} +0 -0
  6. package/components/tryghost-api-version-compatibility-service-5.73.0.tgz +0 -0
  7. package/components/tryghost-audience-feedback-5.73.0.tgz +0 -0
  8. package/components/tryghost-bookshelf-repository-5.73.0.tgz +0 -0
  9. package/components/{tryghost-bootstrap-socket-5.72.1.tgz → tryghost-bootstrap-socket-5.73.0.tgz} +0 -0
  10. package/components/tryghost-collections-5.73.0.tgz +0 -0
  11. package/components/tryghost-constants-5.73.0.tgz +0 -0
  12. package/components/tryghost-custom-theme-settings-service-5.73.0.tgz +0 -0
  13. package/components/{tryghost-data-generator-5.72.1.tgz → tryghost-data-generator-5.73.0.tgz} +0 -0
  14. package/components/{tryghost-domain-events-5.72.1.tgz → tryghost-domain-events-5.73.0.tgz} +0 -0
  15. package/components/tryghost-donations-5.73.0.tgz +0 -0
  16. package/components/tryghost-dynamic-routing-events-5.73.0.tgz +0 -0
  17. package/components/tryghost-email-analytics-provider-mailgun-5.73.0.tgz +0 -0
  18. package/components/{tryghost-email-analytics-service-5.72.1.tgz → tryghost-email-analytics-service-5.73.0.tgz} +0 -0
  19. package/components/tryghost-email-content-generator-5.73.0.tgz +0 -0
  20. package/components/{tryghost-email-events-5.72.1.tgz → tryghost-email-events-5.73.0.tgz} +0 -0
  21. package/components/tryghost-email-service-5.73.0.tgz +0 -0
  22. package/components/tryghost-email-suppression-list-5.73.0.tgz +0 -0
  23. package/components/tryghost-event-aware-cache-wrapper-5.73.0.tgz +0 -0
  24. package/components/tryghost-express-dynamic-redirects-5.73.0.tgz +0 -0
  25. package/components/tryghost-external-media-inliner-5.73.0.tgz +0 -0
  26. package/components/tryghost-extract-api-key-5.73.0.tgz +0 -0
  27. package/components/tryghost-html-to-plaintext-5.73.0.tgz +0 -0
  28. package/components/tryghost-i18n-5.73.0.tgz +0 -0
  29. package/components/{tryghost-importer-handler-content-files-5.72.1.tgz → tryghost-importer-handler-content-files-5.73.0.tgz} +0 -0
  30. package/components/{tryghost-importer-revue-5.72.1.tgz → tryghost-importer-revue-5.73.0.tgz} +0 -0
  31. package/components/{tryghost-in-memory-repository-5.72.1.tgz → tryghost-in-memory-repository-5.73.0.tgz} +0 -0
  32. package/components/{tryghost-job-manager-5.72.1.tgz → tryghost-job-manager-5.73.0.tgz} +0 -0
  33. package/components/{tryghost-link-redirects-5.72.1.tgz → tryghost-link-redirects-5.73.0.tgz} +0 -0
  34. package/components/tryghost-link-replacer-5.73.0.tgz +0 -0
  35. package/components/{tryghost-link-tracking-5.72.1.tgz → tryghost-link-tracking-5.73.0.tgz} +0 -0
  36. package/components/{tryghost-magic-link-5.72.1.tgz → tryghost-magic-link-5.73.0.tgz} +0 -0
  37. package/components/tryghost-mail-events-5.73.0.tgz +0 -0
  38. package/components/{tryghost-mailgun-client-5.72.1.tgz → tryghost-mailgun-client-5.73.0.tgz} +0 -0
  39. package/components/{tryghost-member-attribution-5.72.1.tgz → tryghost-member-attribution-5.73.0.tgz} +0 -0
  40. package/components/{tryghost-member-events-5.72.1.tgz → tryghost-member-events-5.73.0.tgz} +0 -0
  41. package/components/{tryghost-members-api-5.72.1.tgz → tryghost-members-api-5.73.0.tgz} +0 -0
  42. package/components/{tryghost-members-csv-5.72.1.tgz → tryghost-members-csv-5.73.0.tgz} +0 -0
  43. package/components/{tryghost-members-events-service-5.72.1.tgz → tryghost-members-events-service-5.73.0.tgz} +0 -0
  44. package/components/{tryghost-members-importer-5.72.1.tgz → tryghost-members-importer-5.73.0.tgz} +0 -0
  45. package/components/{tryghost-members-offers-5.72.1.tgz → tryghost-members-offers-5.73.0.tgz} +0 -0
  46. package/components/{tryghost-members-payments-5.72.1.tgz → tryghost-members-payments-5.73.0.tgz} +0 -0
  47. package/components/tryghost-members-ssr-5.73.0.tgz +0 -0
  48. package/components/{tryghost-members-stripe-service-5.72.1.tgz → tryghost-members-stripe-service-5.73.0.tgz} +0 -0
  49. package/components/{tryghost-mentions-email-report-5.72.1.tgz → tryghost-mentions-email-report-5.73.0.tgz} +0 -0
  50. package/components/tryghost-milestones-5.73.0.tgz +0 -0
  51. package/components/{tryghost-minifier-5.72.1.tgz → tryghost-minifier-5.73.0.tgz} +0 -0
  52. package/components/tryghost-model-to-domain-event-interceptor-5.73.0.tgz +0 -0
  53. package/components/tryghost-mw-api-version-mismatch-5.73.0.tgz +0 -0
  54. package/components/tryghost-mw-cache-control-5.73.0.tgz +0 -0
  55. package/components/{tryghost-mw-error-handler-5.72.1.tgz → tryghost-mw-error-handler-5.73.0.tgz} +0 -0
  56. package/components/tryghost-mw-session-from-token-5.73.0.tgz +0 -0
  57. package/components/tryghost-mw-update-user-last-seen-5.73.0.tgz +0 -0
  58. package/components/{tryghost-mw-version-match-5.72.1.tgz → tryghost-mw-version-match-5.73.0.tgz} +0 -0
  59. package/components/tryghost-mw-vhost-5.73.0.tgz +0 -0
  60. package/components/tryghost-nql-filter-expansions-5.73.0.tgz +0 -0
  61. package/components/tryghost-oembed-service-5.73.0.tgz +0 -0
  62. package/components/tryghost-package-json-5.73.0.tgz +0 -0
  63. package/components/tryghost-post-events-5.73.0.tgz +0 -0
  64. package/components/tryghost-post-revisions-5.73.0.tgz +0 -0
  65. package/components/tryghost-posts-service-5.73.0.tgz +0 -0
  66. package/components/tryghost-recommendations-5.73.0.tgz +0 -0
  67. package/components/tryghost-referrers-5.73.0.tgz +0 -0
  68. package/components/{tryghost-security-5.72.1.tgz → tryghost-security-5.73.0.tgz} +0 -0
  69. package/components/tryghost-session-service-5.73.0.tgz +0 -0
  70. package/components/tryghost-settings-path-manager-5.73.0.tgz +0 -0
  71. package/components/{tryghost-slack-notifications-5.72.1.tgz → tryghost-slack-notifications-5.73.0.tgz} +0 -0
  72. package/components/tryghost-staff-service-5.73.0.tgz +0 -0
  73. package/components/tryghost-stats-service-5.73.0.tgz +0 -0
  74. package/components/{tryghost-tiers-5.72.1.tgz → tryghost-tiers-5.73.0.tgz} +0 -0
  75. package/components/{tryghost-update-check-service-5.72.1.tgz → tryghost-update-check-service-5.73.0.tgz} +0 -0
  76. package/components/tryghost-verification-trigger-5.73.0.tgz +0 -0
  77. package/components/tryghost-version-notifications-data-service-5.73.0.tgz +0 -0
  78. package/components/tryghost-webmentions-5.73.0.tgz +0 -0
  79. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-4989db6d.mjs → CodeEditorView-7eba6adb.mjs} +249 -249
  80. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
  81. package/core/built/admin/assets/admin-x-settings/index-8ca58c71.mjs +21086 -0
  82. package/core/built/admin/assets/admin-x-settings/{index-3bbe0fa2.mjs → index-e732a865.mjs} +182 -182
  83. package/core/built/admin/assets/admin-x-settings/{modals-02dc5819.mjs → modals-c85ad0c1.mjs} +12012 -14950
  84. package/core/built/admin/assets/{chunk.143.ece81e21fe21e88fd1b3.js → chunk.143.7c6e0b8d5105c7e16006.js} +5 -5
  85. package/core/built/admin/assets/{chunk.178.edad244e884dcf66cedb.js → chunk.178.8a0fcb624780c9dce8f6.js} +4 -4
  86. package/core/built/admin/assets/{chunk.611.cbd29e2a43c5b8a0d83e.js → chunk.761.88d6f15954870c0c9f60.js} +1266 -1366
  87. package/core/built/admin/assets/{chunk.611.cbd29e2a43c5b8a0d83e.js.LICENSE.txt → chunk.761.88d6f15954870c0c9f60.js.LICENSE.txt} +0 -15
  88. package/core/built/admin/assets/codemirror/{codemirror-31d641cdd0cb3388688402609608cb10.js → codemirror-98996fc475bb3df2b1b82dd701d32bc0.js} +1 -1
  89. package/core/built/admin/assets/ghost-ad224505f7a80c242cc1272d1755995d.css +1 -0
  90. package/core/built/admin/assets/ghost-dark-81e3ee175ed67abaafca3fa228c620a3.css +1 -0
  91. package/core/built/admin/assets/{ghost-f85471aad8d3f75d7024a9c2bf2f77bd.js → ghost-f849fe36e5d0bab807c159e331a2c5a9.js} +2755 -4080
  92. package/core/built/admin/assets/koenig-lexical/index.css +1 -1
  93. package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +17486 -17423
  94. package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +146 -146
  95. package/core/built/admin/assets/{vendor-71d606e7533962f2cd721075ab56a66a.js → vendor-f6856af9fcd8ab6533f2a4339ececbc8.js} +3 -3
  96. package/core/built/admin/index.html +6 -6
  97. package/core/frontend/apps/private-blogging/lib/views/private.hbs +27 -0
  98. package/core/server/api/endpoints/utils/serializers/input/pages.js +12 -0
  99. package/core/server/api/endpoints/utils/serializers/input/posts.js +12 -0
  100. package/core/server/lib/lexical.js +11 -1
  101. package/core/server/lib/mobiledoc.js +11 -1
  102. package/core/server/services/members/utils.js +8 -2
  103. package/core/shared/labs.js +2 -2
  104. package/core/shared/sentry.js +1 -1
  105. package/package.json +154 -153
  106. package/yarn.lock +244 -225
  107. package/components/tryghost-announcement-bar-settings-5.72.1.tgz +0 -0
  108. package/components/tryghost-api-version-compatibility-service-5.72.1.tgz +0 -0
  109. package/components/tryghost-audience-feedback-5.72.1.tgz +0 -0
  110. package/components/tryghost-bookshelf-repository-5.72.1.tgz +0 -0
  111. package/components/tryghost-collections-5.72.1.tgz +0 -0
  112. package/components/tryghost-constants-5.72.1.tgz +0 -0
  113. package/components/tryghost-custom-theme-settings-service-5.72.1.tgz +0 -0
  114. package/components/tryghost-donations-5.72.1.tgz +0 -0
  115. package/components/tryghost-dynamic-routing-events-5.72.1.tgz +0 -0
  116. package/components/tryghost-email-analytics-provider-mailgun-5.72.1.tgz +0 -0
  117. package/components/tryghost-email-content-generator-5.72.1.tgz +0 -0
  118. package/components/tryghost-email-service-5.72.1.tgz +0 -0
  119. package/components/tryghost-email-suppression-list-5.72.1.tgz +0 -0
  120. package/components/tryghost-event-aware-cache-wrapper-5.72.1.tgz +0 -0
  121. package/components/tryghost-express-dynamic-redirects-5.72.1.tgz +0 -0
  122. package/components/tryghost-external-media-inliner-5.72.1.tgz +0 -0
  123. package/components/tryghost-extract-api-key-5.72.1.tgz +0 -0
  124. package/components/tryghost-html-to-plaintext-5.72.1.tgz +0 -0
  125. package/components/tryghost-i18n-5.72.1.tgz +0 -0
  126. package/components/tryghost-link-replacer-5.72.1.tgz +0 -0
  127. package/components/tryghost-mail-events-5.72.1.tgz +0 -0
  128. package/components/tryghost-members-ssr-5.72.1.tgz +0 -0
  129. package/components/tryghost-milestones-5.72.1.tgz +0 -0
  130. package/components/tryghost-model-to-domain-event-interceptor-5.72.1.tgz +0 -0
  131. package/components/tryghost-mw-api-version-mismatch-5.72.1.tgz +0 -0
  132. package/components/tryghost-mw-cache-control-5.72.1.tgz +0 -0
  133. package/components/tryghost-mw-session-from-token-5.72.1.tgz +0 -0
  134. package/components/tryghost-mw-update-user-last-seen-5.72.1.tgz +0 -0
  135. package/components/tryghost-mw-vhost-5.72.1.tgz +0 -0
  136. package/components/tryghost-nql-filter-expansions-5.72.1.tgz +0 -0
  137. package/components/tryghost-oembed-service-5.72.1.tgz +0 -0
  138. package/components/tryghost-package-json-5.72.1.tgz +0 -0
  139. package/components/tryghost-post-events-5.72.1.tgz +0 -0
  140. package/components/tryghost-post-revisions-5.72.1.tgz +0 -0
  141. package/components/tryghost-posts-service-5.72.1.tgz +0 -0
  142. package/components/tryghost-recommendations-5.72.1.tgz +0 -0
  143. package/components/tryghost-referrers-5.72.1.tgz +0 -0
  144. package/components/tryghost-session-service-5.72.1.tgz +0 -0
  145. package/components/tryghost-settings-path-manager-5.72.1.tgz +0 -0
  146. package/components/tryghost-staff-service-5.72.1.tgz +0 -0
  147. package/components/tryghost-stats-service-5.72.1.tgz +0 -0
  148. package/components/tryghost-verification-trigger-5.72.1.tgz +0 -0
  149. package/components/tryghost-version-notifications-data-service-5.72.1.tgz +0 -0
  150. package/components/tryghost-webmentions-5.72.1.tgz +0 -0
  151. package/core/built/admin/assets/admin-x-settings/index-81eb7730.mjs +0 -17897
  152. package/core/built/admin/assets/ghost-33715d7968b8a38396450f28623b7a94.css +0 -1
  153. package/core/built/admin/assets/ghost-dark-114b1812a92f63449e10acf799cd2664.css +0 -1
@@ -1,8 +1,8 @@
1
- import { e as ke, f as N, b2 as wt, bK as qn, W as Rt, bL as _n, j as F, bM as Hn, Y as Vn, L as zn, a3 as Un, x as $n, H as Gn, Z as Kn } from "./index-81eb7730.mjs";
2
- import { E as p, F as fe, v as Ee, S as we, o as d, w as qe, C as Jn, x as jn, y as Tt, z as Ot, A as Se, B as It, G as Pt, H as Wt, J as Ue, K as Xe, M as R, O as Z, g as et, b as $e, Q as Qn, R as ee, V as Ft, U as x, W as Yn, X as Zn, Y as ce, Z as M, _ as Xn, $ as er, a0 as tt, a1 as he, a2 as tr, a3 as nr, a4 as rr, a5 as or, a6 as ir, a7 as sr, a8 as lr, a9 as ar, aa as cr, ab as hr, ac as ur, ad as fr, ae as dr, af as mr, ag as Nt, ah as gr, ai as pr, aj as yr, ak as xr, al as kr, am as br, an as qt, ao as Sr, ap as Cr, t as f, aq as vr } from "./index-9cc1df42.mjs";
1
+ import { a as ke, b as N, bT as Rt, bU as qn, e as wt, bV as Vn, j as F, bW as _n, u as Hn, R as Un, q as zn, d as $n, H as Gn, c as Kn } from "./index-8ca58c71.mjs";
2
+ import { E as p, F as fe, v as Ee, S as Re, o as d, w as qe, C as Jn, x as jn, y as Tt, z as Ot, A as Se, B as It, G as Pt, H as Wt, J as ze, K as Xe, M as w, O as Z, g as et, b as $e, Q as Qn, R as ee, V as Ft, U as x, W as Yn, X as Zn, Y as ce, Z as M, _ as Xn, $ as er, a0 as tt, a1 as ue, a2 as tr, a3 as nr, a4 as rr, a5 as or, a6 as ir, a7 as sr, a8 as lr, a9 as ar, aa as cr, ab as ur, ac as hr, ad as fr, ae as dr, af as mr, ag as Nt, ah as gr, ai as pr, aj as yr, ak as xr, al as kr, am as br, an as qt, ao as Sr, ap as Cr, t as f, aq as vr } from "./index-9cc1df42.mjs";
3
3
  const Ar = (t) => {
4
4
  let { state: e } = t, r = e.doc.lineAt(e.selection.main.from), n = rt(t.state, r.from);
5
- return n.line ? Mr(t) : n.block ? Dr(t) : !1;
5
+ return n.line ? Mr(t) : n.block ? Br(t) : !1;
6
6
  };
7
7
  function nt(t, e) {
8
8
  return ({ state: r, dispatch: n }) => {
@@ -13,15 +13,15 @@ function nt(t, e) {
13
13
  };
14
14
  }
15
15
  const Mr = /* @__PURE__ */ nt(
16
- wr,
16
+ Rr,
17
17
  0
18
18
  /* CommentOption.Toggle */
19
19
  ), Lr = /* @__PURE__ */ nt(
20
- _t,
20
+ Vt,
21
21
  0
22
22
  /* CommentOption.Toggle */
23
- ), Dr = /* @__PURE__ */ nt(
24
- (t, e) => _t(t, e, Er(e)),
23
+ ), Br = /* @__PURE__ */ nt(
24
+ (t, e) => Vt(t, e, Er(e)),
25
25
  0
26
26
  /* CommentOption.Toggle */
27
27
  );
@@ -30,24 +30,24 @@ function rt(t, e) {
30
30
  return r.length ? r[0] : {};
31
31
  }
32
32
  const ae = 50;
33
- function Br(t, { open: e, close: r }, n, o) {
33
+ function Dr(t, { open: e, close: r }, n, o) {
34
34
  let i = t.sliceDoc(n - ae, n), s = t.sliceDoc(o, o + ae), l = /\s*$/.exec(i)[0].length, a = /^\s*/.exec(s)[0].length, c = i.length - l;
35
35
  if (i.slice(c - e.length, c) == e && s.slice(a, a + r.length) == r)
36
36
  return {
37
37
  open: { pos: n - l, margin: l && 1 },
38
38
  close: { pos: o + a, margin: a && 1 }
39
39
  };
40
- let h, u;
41
- o - n <= 2 * ae ? h = u = t.sliceDoc(n, o) : (h = t.sliceDoc(n, n + ae), u = t.sliceDoc(o - ae, o));
42
- let m = /^\s*/.exec(h)[0].length, k = /\s*$/.exec(u)[0].length, S = u.length - k - r.length;
43
- return h.slice(m, m + e.length) == e && u.slice(S, S + r.length) == r ? {
40
+ let u, h;
41
+ o - n <= 2 * ae ? u = h = t.sliceDoc(n, o) : (u = t.sliceDoc(n, n + ae), h = t.sliceDoc(o - ae, o));
42
+ let m = /^\s*/.exec(u)[0].length, k = /\s*$/.exec(h)[0].length, S = h.length - k - r.length;
43
+ return u.slice(m, m + e.length) == e && h.slice(S, S + r.length) == r ? {
44
44
  open: {
45
45
  pos: n + m + e.length,
46
- margin: /\s/.test(h.charAt(m + e.length)) ? 1 : 0
46
+ margin: /\s/.test(u.charAt(m + e.length)) ? 1 : 0
47
47
  },
48
48
  close: {
49
49
  pos: o - k - r.length,
50
- margin: /\s/.test(u.charAt(S - 1)) ? 1 : 0
50
+ margin: /\s/.test(h.charAt(S - 1)) ? 1 : 0
51
51
  }
52
52
  } : null;
53
53
  }
@@ -59,62 +59,62 @@ function Er(t) {
59
59
  }
60
60
  return e;
61
61
  }
62
- function _t(t, e, r = e.selection.ranges) {
62
+ function Vt(t, e, r = e.selection.ranges) {
63
63
  let n = r.map((i) => rt(e, i.from).block);
64
64
  if (!n.every((i) => i))
65
65
  return null;
66
- let o = r.map((i, s) => Br(e, n[s], i.from, i.to));
66
+ let o = r.map((i, s) => Dr(e, n[s], i.from, i.to));
67
67
  if (t != 2 && !o.every((i) => i))
68
68
  return { changes: e.changes(r.map((i, s) => o[s] ? [] : [{ from: i.from, insert: n[s].open + " " }, { from: i.to, insert: " " + n[s].close }])) };
69
69
  if (t != 1 && o.some((i) => i)) {
70
70
  let i = [];
71
71
  for (let s = 0, l; s < o.length; s++)
72
72
  if (l = o[s]) {
73
- let a = n[s], { open: c, close: h } = l;
74
- i.push({ from: c.pos - a.open.length, to: c.pos + c.margin }, { from: h.pos - h.margin, to: h.pos + a.close.length });
73
+ let a = n[s], { open: c, close: u } = l;
74
+ i.push({ from: c.pos - a.open.length, to: c.pos + c.margin }, { from: u.pos - u.margin, to: u.pos + a.close.length });
75
75
  }
76
76
  return { changes: i };
77
77
  }
78
78
  return null;
79
79
  }
80
- function wr(t, e, r = e.selection.ranges) {
80
+ function Rr(t, e, r = e.selection.ranges) {
81
81
  let n = [], o = -1;
82
82
  for (let { from: i, to: s } of r) {
83
83
  let l = n.length, a = 1e9, c = rt(e, i).line;
84
84
  if (c) {
85
- for (let h = i; h <= s; ) {
86
- let u = e.doc.lineAt(h);
87
- if (u.from > o && (i == s || s > u.from)) {
88
- o = u.from;
89
- let m = /^\s*/.exec(u.text)[0].length, k = m == u.length, S = u.text.slice(m, m + c.length) == c ? m : -1;
90
- m < u.text.length && m < a && (a = m), n.push({ line: u, comment: S, token: c, indent: m, empty: k, single: !1 });
85
+ for (let u = i; u <= s; ) {
86
+ let h = e.doc.lineAt(u);
87
+ if (h.from > o && (i == s || s > h.from)) {
88
+ o = h.from;
89
+ let m = /^\s*/.exec(h.text)[0].length, k = m == h.length, S = h.text.slice(m, m + c.length) == c ? m : -1;
90
+ m < h.text.length && m < a && (a = m), n.push({ line: h, comment: S, token: c, indent: m, empty: k, single: !1 });
91
91
  }
92
- h = u.to + 1;
92
+ u = h.to + 1;
93
93
  }
94
94
  if (a < 1e9)
95
- for (let h = l; h < n.length; h++)
96
- n[h].indent < n[h].line.text.length && (n[h].indent = a);
95
+ for (let u = l; u < n.length; u++)
96
+ n[u].indent < n[u].line.text.length && (n[u].indent = a);
97
97
  n.length == l + 1 && (n[l].single = !0);
98
98
  }
99
99
  }
100
100
  if (t != 2 && n.some((i) => i.comment < 0 && (!i.empty || i.single))) {
101
101
  let i = [];
102
- for (let { line: l, token: a, indent: c, empty: h, single: u } of n)
103
- (u || !h) && i.push({ from: l.from + c, insert: a + " " });
102
+ for (let { line: l, token: a, indent: c, empty: u, single: h } of n)
103
+ (h || !u) && i.push({ from: l.from + c, insert: a + " " });
104
104
  let s = e.changes(i);
105
105
  return { changes: s, selection: e.selection.map(s, 1) };
106
106
  } else if (t != 1 && n.some((i) => i.comment >= 0)) {
107
107
  let i = [];
108
108
  for (let { line: s, comment: l, token: a } of n)
109
109
  if (l >= 0) {
110
- let c = s.from + l, h = c + a.length;
111
- s.text[h - s.from] == " " && h++, i.push({ from: c, to: h });
110
+ let c = s.from + l, u = c + a.length;
111
+ s.text[u - s.from] == " " && u++, i.push({ from: c, to: u });
112
112
  }
113
113
  return { changes: i };
114
114
  }
115
115
  return null;
116
116
  }
117
- const Ge = /* @__PURE__ */ Xe.define(), Rr = /* @__PURE__ */ Xe.define(), Tr = /* @__PURE__ */ fe.define(), Ht = /* @__PURE__ */ fe.define({
117
+ const Ge = /* @__PURE__ */ Xe.define(), wr = /* @__PURE__ */ Xe.define(), Tr = /* @__PURE__ */ fe.define(), _t = /* @__PURE__ */ fe.define({
118
118
  combine(t) {
119
119
  return Ee(t, {
120
120
  minDepth: 100,
@@ -131,17 +131,17 @@ function Or(t) {
131
131
  let e = 0;
132
132
  return t.iterChangedRanges((r, n) => e = n), e;
133
133
  }
134
- const Vt = /* @__PURE__ */ we.define({
134
+ const Ht = /* @__PURE__ */ Re.define({
135
135
  create() {
136
136
  return O.empty;
137
137
  },
138
138
  update(t, e) {
139
- let r = e.state.facet(Ht), n = e.annotation(Ge);
139
+ let r = e.state.facet(_t), n = e.annotation(Ge);
140
140
  if (n) {
141
- let a = e.docChanged ? d.single(Or(e.changes)) : void 0, c = C.fromTransaction(e, a), h = n.side, u = h == 0 ? t.undone : t.done;
142
- return c ? u = Ce(u, u.length, r.minDepth, c) : u = $t(u, e.startState.selection), new O(h == 0 ? n.rest : u, h == 0 ? u : n.rest);
141
+ let a = e.docChanged ? d.single(Or(e.changes)) : void 0, c = C.fromTransaction(e, a), u = n.side, h = u == 0 ? t.undone : t.done;
142
+ return c ? h = Ce(h, h.length, r.minDepth, c) : h = $t(h, e.startState.selection), new O(u == 0 ? n.rest : h, u == 0 ? h : n.rest);
143
143
  }
144
- let o = e.annotation(Rr);
144
+ let o = e.annotation(wr);
145
145
  if ((o == "full" || o == "before") && (t = t.isolate()), e.annotation(qe.addToHistory) === !1)
146
146
  return e.changes.empty ? t : t.addMapping(e.changes.desc);
147
147
  let i = C.fromTransaction(e), s = e.annotation(qe.time), l = e.annotation(qe.userEvent);
@@ -156,28 +156,28 @@ const Vt = /* @__PURE__ */ we.define({
156
156
  });
157
157
  function Ir(t = {}) {
158
158
  return [
159
- Vt,
160
- Ht.of(t),
159
+ Ht,
160
+ _t.of(t),
161
161
  p.domEventHandlers({
162
162
  beforeinput(e, r) {
163
- let n = e.inputType == "historyUndo" ? zt : e.inputType == "historyRedo" ? Ke : null;
163
+ let n = e.inputType == "historyUndo" ? Ut : e.inputType == "historyRedo" ? Ke : null;
164
164
  return n ? (e.preventDefault(), n(r)) : !1;
165
165
  }
166
166
  })
167
167
  ];
168
168
  }
169
- function Re(t, e) {
169
+ function we(t, e) {
170
170
  return function({ state: r, dispatch: n }) {
171
171
  if (!e && r.readOnly)
172
172
  return !1;
173
- let o = r.field(Vt, !1);
173
+ let o = r.field(Ht, !1);
174
174
  if (!o)
175
175
  return !1;
176
176
  let i = o.pop(t, r, e);
177
177
  return i ? (n(i), !0) : !1;
178
178
  };
179
179
  }
180
- const zt = /* @__PURE__ */ Re(0, !1), Ke = /* @__PURE__ */ Re(1, !1), Pr = /* @__PURE__ */ Re(0, !0), Wr = /* @__PURE__ */ Re(1, !0);
180
+ const Ut = /* @__PURE__ */ we(0, !1), Ke = /* @__PURE__ */ we(1, !1), Pr = /* @__PURE__ */ we(0, !0), Wr = /* @__PURE__ */ we(1, !0);
181
181
  class C {
182
182
  constructor(e, r, n, o, i) {
183
183
  this.changes = e, this.effects = r, this.mapped = n, this.startSelection = o, this.selectionsAfter = i;
@@ -220,15 +220,15 @@ function Fr(t, e) {
220
220
  let r = [], n = !1;
221
221
  return t.iterChangedRanges((o, i) => r.push(o, i)), e.iterChangedRanges((o, i, s, l) => {
222
222
  for (let a = 0; a < r.length; ) {
223
- let c = r[a++], h = r[a++];
224
- l >= c && s <= h && (n = !0);
223
+ let c = r[a++], u = r[a++];
224
+ l >= c && s <= u && (n = !0);
225
225
  }
226
226
  }), n;
227
227
  }
228
228
  function Nr(t, e) {
229
229
  return t.ranges.length == e.ranges.length && t.ranges.filter((r, n) => r.empty != e.ranges[n].empty).length === 0;
230
230
  }
231
- function Ut(t, e) {
231
+ function zt(t, e) {
232
232
  return t.length ? e.length ? t.concat(e) : t : e;
233
233
  }
234
234
  const L = [], qr = 200;
@@ -239,16 +239,16 @@ function $t(t, e) {
239
239
  } else
240
240
  return [C.selection([e])];
241
241
  }
242
- function _r(t) {
242
+ function Vr(t) {
243
243
  let e = t[t.length - 1], r = t.slice();
244
244
  return r[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), r;
245
245
  }
246
- function _e(t, e) {
246
+ function Ve(t, e) {
247
247
  if (!t.length)
248
248
  return t;
249
249
  let r = t.length, n = L;
250
250
  for (; r; ) {
251
- let o = Hr(t[r - 1], e, n);
251
+ let o = _r(t[r - 1], e, n);
252
252
  if (o.changes && !o.changes.empty || o.effects.length) {
253
253
  let i = t.slice(0, r);
254
254
  return i[r - 1] = o, i;
@@ -257,14 +257,14 @@ function _e(t, e) {
257
257
  }
258
258
  return n.length ? [C.selection(n)] : L;
259
259
  }
260
- function Hr(t, e, r) {
261
- let n = Ut(t.selectionsAfter.length ? t.selectionsAfter.map((l) => l.map(e)) : L, r);
260
+ function _r(t, e, r) {
261
+ let n = zt(t.selectionsAfter.length ? t.selectionsAfter.map((l) => l.map(e)) : L, r);
262
262
  if (!t.changes)
263
263
  return C.selection(n);
264
264
  let o = t.changes.map(e), i = e.mapDesc(t.changes, !0), s = t.mapped ? t.mapped.composeDesc(i) : i;
265
- return new C(o, R.mapEffects(t.effects, e), s, t.startSelection.map(i), n);
265
+ return new C(o, w.mapEffects(t.effects, e), s, t.startSelection.map(i), n);
266
266
  }
267
- const Vr = /^(input\.type|delete)($|\.)/;
267
+ const Hr = /^(input\.type|delete)($|\.)/;
268
268
  class O {
269
269
  constructor(e, r, n = 0, o = void 0) {
270
270
  this.done = e, this.undone = r, this.prevTime = n, this.prevUserEvent = o;
@@ -274,15 +274,15 @@ class O {
274
274
  }
275
275
  addChanges(e, r, n, o, i) {
276
276
  let s = this.done, l = s[s.length - 1];
277
- return l && l.changes && !l.changes.empty && e.changes && (!n || Vr.test(n)) && (!l.selectionsAfter.length && r - this.prevTime < o.newGroupDelay && o.joinToEvent(i, Fr(l.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
278
- n == "input.type.compose") ? s = Ce(s, s.length - 1, o.minDepth, new C(e.changes.compose(l.changes), Ut(e.effects, l.effects), l.mapped, l.startSelection, L)) : s = Ce(s, s.length, o.minDepth, e), new O(s, L, r, n);
277
+ return l && l.changes && !l.changes.empty && e.changes && (!n || Hr.test(n)) && (!l.selectionsAfter.length && r - this.prevTime < o.newGroupDelay && o.joinToEvent(i, Fr(l.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
278
+ n == "input.type.compose") ? s = Ce(s, s.length - 1, o.minDepth, new C(e.changes.compose(l.changes), zt(e.effects, l.effects), l.mapped, l.startSelection, L)) : s = Ce(s, s.length, o.minDepth, e), new O(s, L, r, n);
279
279
  }
280
280
  addSelection(e, r, n, o) {
281
281
  let i = this.done.length ? this.done[this.done.length - 1].selectionsAfter : L;
282
282
  return i.length > 0 && r - this.prevTime < o && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && Nr(i[i.length - 1], e) ? this : new O($t(this.done, e), this.undone, r, n);
283
283
  }
284
284
  addMapping(e) {
285
- return new O(_e(this.done, e), _e(this.undone, e), this.prevTime, this.prevUserEvent);
285
+ return new O(Ve(this.done, e), Ve(this.undone, e), this.prevTime, this.prevUserEvent);
286
286
  }
287
287
  pop(e, r, n) {
288
288
  let o = e == 0 ? this.done : this.undone;
@@ -292,13 +292,13 @@ class O {
292
292
  if (n && i.selectionsAfter.length)
293
293
  return r.update({
294
294
  selection: i.selectionsAfter[i.selectionsAfter.length - 1],
295
- annotations: Ge.of({ side: e, rest: _r(o) }),
295
+ annotations: Ge.of({ side: e, rest: Vr(o) }),
296
296
  userEvent: e == 0 ? "select.undo" : "select.redo",
297
297
  scrollIntoView: !0
298
298
  });
299
299
  if (i.changes) {
300
300
  let s = o.length == 1 ? L : o.slice(0, o.length - 1);
301
- return i.mapped && (s = _e(s, i.mapped)), r.update({
301
+ return i.mapped && (s = Ve(s, i.mapped)), r.update({
302
302
  changes: i.changes,
303
303
  selection: i.startSelection,
304
304
  effects: i.effects,
@@ -312,8 +312,8 @@ class O {
312
312
  }
313
313
  }
314
314
  O.empty = /* @__PURE__ */ new O(L, L);
315
- const zr = [
316
- { key: "Mod-z", run: zt, preventDefault: !0 },
315
+ const Ur = [
316
+ { key: "Mod-z", run: Ut, preventDefault: !0 },
317
317
  { key: "Mod-y", mac: "Mod-Shift-z", run: Ke, preventDefault: !0 },
318
318
  { linux: "Ctrl-Shift-z", run: Ke, preventDefault: !0 },
319
319
  { key: "Mod-u", run: Pr, preventDefault: !0 },
@@ -342,7 +342,7 @@ const Kt = (t) => Gt(t, !b(t)), Jt = (t) => Gt(t, b(t));
342
342
  function jt(t, e) {
343
343
  return T(t, (r) => r.empty ? t.moveByGroup(r, e) : Te(r, e));
344
344
  }
345
- const Ur = (t) => jt(t, !b(t)), $r = (t) => jt(t, b(t));
345
+ const zr = (t) => jt(t, !b(t)), $r = (t) => jt(t, b(t));
346
346
  function Gr(t, e, r) {
347
347
  if (e.type.prop(r))
348
348
  return !0;
@@ -398,8 +398,8 @@ function en(t, e) {
398
398
  }
399
399
  return t.dispatch(I(n, o), { effects: i }), !0;
400
400
  }
401
- const ht = (t) => en(t, !1), Je = (t) => en(t, !0);
402
- function _(t, e, r) {
401
+ const ut = (t) => en(t, !1), Je = (t) => en(t, !0);
402
+ function V(t, e, r) {
403
403
  let n = t.lineBlockAt(e.head), o = t.moveToLineBoundary(e, r);
404
404
  if (o.head == e.head && o.head != (r ? n.to : n.from) && (o = t.moveToLineBoundary(e, r, !1)), !r && o.head == n.from && n.length) {
405
405
  let i = /^\s*/.exec(t.state.sliceDoc(n.from, Math.min(n.from + 100, n.to)))[0].length;
@@ -407,7 +407,7 @@ function _(t, e, r) {
407
407
  }
408
408
  return o;
409
409
  }
410
- const jr = (t) => T(t, (e) => _(t, e, !0)), Qr = (t) => T(t, (e) => _(t, e, !1)), Yr = (t) => T(t, (e) => _(t, e, !b(t))), Zr = (t) => T(t, (e) => _(t, e, b(t))), Xr = (t) => T(t, (e) => d.cursor(t.lineBlockAt(e.head).from, 1)), eo = (t) => T(t, (e) => d.cursor(t.lineBlockAt(e.head).to, -1));
410
+ const jr = (t) => T(t, (e) => V(t, e, !0)), Qr = (t) => T(t, (e) => V(t, e, !1)), Yr = (t) => T(t, (e) => V(t, e, !b(t))), Zr = (t) => T(t, (e) => V(t, e, b(t))), Xr = (t) => T(t, (e) => d.cursor(t.lineBlockAt(e.head).from, 1)), eo = (t) => T(t, (e) => d.cursor(t.lineBlockAt(e.head).to, -1));
411
411
  function to(t, e, r) {
412
412
  let n = !1, o = re(t.selection, (i) => {
413
413
  let s = Z(t, i.head, -1) || Z(t, i.head, 1) || i.head > 0 && Z(t, i.head - 1, 1) || i.head < t.doc.length && Z(t, i.head + 1, -1);
@@ -420,7 +420,7 @@ function to(t, e, r) {
420
420
  return n ? (e(I(t, o)), !0) : !1;
421
421
  }
422
422
  const no = ({ state: t, dispatch: e }) => to(t, e, !1);
423
- function D(t, e) {
423
+ function B(t, e) {
424
424
  let r = re(t.state.selection, (n) => {
425
425
  let o = e(n);
426
426
  return d.range(n.anchor, o.head, o.goalColumn, o.bidiLevel || void 0);
@@ -428,21 +428,21 @@ function D(t, e) {
428
428
  return r.eq(t.state.selection) ? !1 : (t.dispatch(I(t.state, r)), !0);
429
429
  }
430
430
  function tn(t, e) {
431
- return D(t, (r) => t.moveByChar(r, e));
431
+ return B(t, (r) => t.moveByChar(r, e));
432
432
  }
433
433
  const nn = (t) => tn(t, !b(t)), rn = (t) => tn(t, b(t));
434
434
  function on(t, e) {
435
- return D(t, (r) => t.moveByGroup(r, e));
435
+ return B(t, (r) => t.moveByGroup(r, e));
436
436
  }
437
- const ro = (t) => on(t, !b(t)), oo = (t) => on(t, b(t)), io = (t) => D(t, (e) => Oe(t.state, e, !b(t))), so = (t) => D(t, (e) => Oe(t.state, e, b(t)));
437
+ const ro = (t) => on(t, !b(t)), oo = (t) => on(t, b(t)), io = (t) => B(t, (e) => Oe(t.state, e, !b(t))), so = (t) => B(t, (e) => Oe(t.state, e, b(t)));
438
438
  function sn(t, e) {
439
- return D(t, (r) => t.moveVertically(r, e));
439
+ return B(t, (r) => t.moveVertically(r, e));
440
440
  }
441
441
  const ln = (t) => sn(t, !1), an = (t) => sn(t, !0);
442
442
  function cn(t, e) {
443
- return D(t, (r) => t.moveVertically(r, e, Xt(t).height));
443
+ return B(t, (r) => t.moveVertically(r, e, Xt(t).height));
444
444
  }
445
- const ut = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => D(t, (e) => _(t, e, !0)), ao = (t) => D(t, (e) => _(t, e, !1)), co = (t) => D(t, (e) => _(t, e, !b(t))), ho = (t) => D(t, (e) => _(t, e, b(t))), uo = (t) => D(t, (e) => d.cursor(t.lineBlockAt(e.head).from)), fo = (t) => D(t, (e) => d.cursor(t.lineBlockAt(e.head).to)), dt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: 0 })), !0), mt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: t.doc.length })), !0), gt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: t.selection.main.anchor, head: 0 })), !0), pt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), mo = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), go = ({ state: t, dispatch: e }) => {
445
+ const ht = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => B(t, (e) => V(t, e, !0)), ao = (t) => B(t, (e) => V(t, e, !1)), co = (t) => B(t, (e) => V(t, e, !b(t))), uo = (t) => B(t, (e) => V(t, e, b(t))), ho = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).from)), fo = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).to)), dt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: 0 })), !0), mt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: t.doc.length })), !0), gt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: t.selection.main.anchor, head: 0 })), !0), pt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), mo = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), go = ({ state: t, dispatch: e }) => {
446
446
  let r = Pe(t).map(({ from: n, to: o }) => d.range(n, Math.min(o + 1, t.doc.length)));
447
447
  return e(t.update({ selection: d.create(r), userEvent: "select" })), !0;
448
448
  }, po = ({ state: t, dispatch: e }) => {
@@ -484,29 +484,29 @@ function ge(t, e, r) {
484
484
  });
485
485
  return e;
486
486
  }
487
- const hn = (t, e) => Ie(t, (r) => {
487
+ const un = (t, e) => Ie(t, (r) => {
488
488
  let { state: n } = t, o = n.doc.lineAt(r), i, s;
489
489
  if (!e && r > o.from && r < o.from + 200 && !/[^ \t]/.test(i = o.text.slice(0, r - o.from))) {
490
490
  if (i[i.length - 1] == " ")
491
491
  return r - 1;
492
- let l = Wt(i, n.tabSize), a = l % Ue(n) || Ue(n);
492
+ let l = Wt(i, n.tabSize), a = l % ze(n) || ze(n);
493
493
  for (let c = 0; c < a && i[i.length - 1 - c] == " "; c++)
494
494
  r--;
495
495
  s = r;
496
496
  } else
497
497
  s = ee(o.text, r - o.from, e, e) + o.from, s == r && o.number != (e ? n.doc.lines : 1) && (s += e ? 1 : -1);
498
498
  return s;
499
- }), je = (t) => hn(t, !1), un = (t) => hn(t, !0), fn = (t, e) => Ie(t, (r) => {
499
+ }), je = (t) => un(t, !1), hn = (t) => un(t, !0), fn = (t, e) => Ie(t, (r) => {
500
500
  let n = r, { state: o } = t, i = o.doc.lineAt(n), s = o.charCategorizer(n);
501
501
  for (let l = null; ; ) {
502
502
  if (n == (e ? i.to : i.from)) {
503
503
  n == r && i.number != (e ? o.doc.lines : 1) && (n += e ? 1 : -1);
504
504
  break;
505
505
  }
506
- let a = ee(i.text, n - i.from, e) + i.from, c = i.text.slice(Math.min(n, a) - i.from, Math.max(n, a) - i.from), h = s(c);
507
- if (l != null && h != l)
506
+ let a = ee(i.text, n - i.from, e) + i.from, c = i.text.slice(Math.min(n, a) - i.from, Math.max(n, a) - i.from), u = s(c);
507
+ if (l != null && u != l)
508
508
  break;
509
- (c != " " || n != r) && (l = h), n = a;
509
+ (c != " " || n != r) && (l = u), n = a;
510
510
  }
511
511
  return n;
512
512
  }), dn = (t) => fn(t, !1), xo = (t) => fn(t, !0), mn = (t) => Ie(t, (e) => {
@@ -590,28 +590,28 @@ const Ao = ({ state: t, dispatch: e }) => pn(t, e, !1), Mo = ({ state: t, dispat
590
590
  let { state: e } = t, r = e.changes(Pe(e).map(({ from: o, to: i }) => (o > 0 ? o-- : i < e.doc.length && i++, { from: o, to: i }))), n = re(e.selection, (o) => t.moveVertically(o, !0)).map(r);
591
591
  return t.dispatch({ changes: r, selection: n, scrollIntoView: !0, userEvent: "delete.line" }), !0;
592
592
  };
593
- function Do(t, e) {
593
+ function Bo(t, e) {
594
594
  if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
595
595
  return { from: e, to: e };
596
596
  let r = et(t).resolveInner(e), n = r.childBefore(e), o = r.childAfter(e), i;
597
597
  return n && o && n.to <= e && o.from >= e && (i = n.type.prop($e.closedBy)) && i.indexOf(o.name) > -1 && t.doc.lineAt(n.to).from == t.doc.lineAt(o.from).from ? { from: n.to, to: o.from } : null;
598
598
  }
599
- const Bo = /* @__PURE__ */ yn(!1), Eo = /* @__PURE__ */ yn(!0);
599
+ const Do = /* @__PURE__ */ yn(!1), Eo = /* @__PURE__ */ yn(!0);
600
600
  function yn(t) {
601
601
  return ({ state: e, dispatch: r }) => {
602
602
  if (e.readOnly)
603
603
  return !1;
604
604
  let n = e.changeByRange((o) => {
605
- let { from: i, to: s } = o, l = e.doc.lineAt(i), a = !t && i == s && Do(e, i);
605
+ let { from: i, to: s } = o, l = e.doc.lineAt(i), a = !t && i == s && Bo(e, i);
606
606
  t && (i = s = (s <= l.to ? l : e.doc.lineAt(s)).to);
607
- let c = new Tt(e, { simulateBreak: i, simulateDoubleBreak: !!a }), h = Ot(c, i);
608
- for (h == null && (h = /^\s*/.exec(e.doc.lineAt(i).text)[0].length); s < l.to && /\s/.test(l.text[s - l.from]); )
607
+ let c = new Tt(e, { simulateBreak: i, simulateDoubleBreak: !!a }), u = Ot(c, i);
608
+ for (u == null && (u = /^\s*/.exec(e.doc.lineAt(i).text)[0].length); s < l.to && /\s/.test(l.text[s - l.from]); )
609
609
  s++;
610
610
  a ? { from: i, to: s } = a : i > l.from && i < l.from + 100 && !/\S/.test(l.text.slice(0, i)) && (i = l.from);
611
- let u = ["", Se(e, h)];
612
- return a && u.push(Se(e, c.lineIndent(l.from, -1))), {
613
- changes: { from: i, to: s, insert: It.of(u) },
614
- range: d.cursor(i + 1 + u[1].length)
611
+ let h = ["", Se(e, u)];
612
+ return a && h.push(Se(e, c.lineIndent(l.from, -1))), {
613
+ changes: { from: i, to: s, insert: It.of(h) },
614
+ range: d.cursor(i + 1 + h[1].length)
615
615
  };
616
616
  });
617
617
  return r(e.update(n, { scrollIntoView: !0, userEvent: "input" })), !0;
@@ -632,7 +632,7 @@ function ot(t, e) {
632
632
  };
633
633
  });
634
634
  }
635
- const wo = ({ state: t, dispatch: e }) => {
635
+ const Ro = ({ state: t, dispatch: e }) => {
636
636
  if (t.readOnly)
637
637
  return !1;
638
638
  let r = /* @__PURE__ */ Object.create(null), n = new Tt(t, { overrideIndentation: (i) => {
@@ -643,8 +643,8 @@ const wo = ({ state: t, dispatch: e }) => {
643
643
  if (a == null)
644
644
  return;
645
645
  /\S/.test(i.text) || (a = 0);
646
- let c = /^\s*/.exec(i.text)[0], h = Se(t, a);
647
- (c != h || l.from < i.from + c.length) && (r[i.from] = a, s.push({ from: i.from, to: i.from + c.length, insert: h }));
646
+ let c = /^\s*/.exec(i.text)[0], u = Se(t, a);
647
+ (c != u || l.from < i.from + c.length) && (r[i.from] = a, s.push({ from: i.from, to: i.from + c.length, insert: u }));
648
648
  });
649
649
  return o.changes.empty || e(t.update(o, { userEvent: "indent" })), !0;
650
650
  }, xn = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(ot(t, (r, n) => {
@@ -653,18 +653,18 @@ const wo = ({ state: t, dispatch: e }) => {
653
653
  let o = /^\s*/.exec(r.text)[0];
654
654
  if (!o)
655
655
  return;
656
- let i = Wt(o, t.tabSize), s = 0, l = Se(t, Math.max(0, i - Ue(t)));
656
+ let i = Wt(o, t.tabSize), s = 0, l = Se(t, Math.max(0, i - ze(t)));
657
657
  for (; s < o.length && s < l.length && o.charCodeAt(s) == l.charCodeAt(s); )
658
658
  s++;
659
659
  n.push({ from: r.from + s, to: r.from + o.length, insert: l.slice(s) });
660
- }), { userEvent: "delete.dedent" })), !0), Ro = [
660
+ }), { userEvent: "delete.dedent" })), !0), wo = [
661
661
  { key: "Ctrl-b", run: Kt, shift: nn, preventDefault: !0 },
662
662
  { key: "Ctrl-f", run: Jt, shift: rn },
663
663
  { key: "Ctrl-p", run: Yt, shift: ln },
664
664
  { key: "Ctrl-n", run: Zt, shift: an },
665
- { key: "Ctrl-a", run: Xr, shift: uo },
665
+ { key: "Ctrl-a", run: Xr, shift: ho },
666
666
  { key: "Ctrl-e", run: eo, shift: fo },
667
- { key: "Ctrl-d", run: un },
667
+ { key: "Ctrl-d", run: hn },
668
668
  { key: "Ctrl-h", run: je },
669
669
  { key: "Ctrl-k", run: mn },
670
670
  { key: "Ctrl-Alt-h", run: dn },
@@ -673,32 +673,32 @@ const wo = ({ state: t, dispatch: e }) => {
673
673
  { key: "Ctrl-v", run: Je }
674
674
  ], To = /* @__PURE__ */ [
675
675
  { key: "ArrowLeft", run: Kt, shift: nn, preventDefault: !0 },
676
- { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: Ur, shift: ro, preventDefault: !0 },
676
+ { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: zr, shift: ro, preventDefault: !0 },
677
677
  { mac: "Cmd-ArrowLeft", run: Yr, shift: co, preventDefault: !0 },
678
678
  { key: "ArrowRight", run: Jt, shift: rn, preventDefault: !0 },
679
679
  { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: $r, shift: oo, preventDefault: !0 },
680
- { mac: "Cmd-ArrowRight", run: Zr, shift: ho, preventDefault: !0 },
680
+ { mac: "Cmd-ArrowRight", run: Zr, shift: uo, preventDefault: !0 },
681
681
  { key: "ArrowUp", run: Yt, shift: ln, preventDefault: !0 },
682
682
  { mac: "Cmd-ArrowUp", run: dt, shift: gt },
683
- { mac: "Ctrl-ArrowUp", run: ht, shift: ut },
683
+ { mac: "Ctrl-ArrowUp", run: ut, shift: ht },
684
684
  { key: "ArrowDown", run: Zt, shift: an, preventDefault: !0 },
685
685
  { mac: "Cmd-ArrowDown", run: mt, shift: pt },
686
686
  { mac: "Ctrl-ArrowDown", run: Je, shift: ft },
687
- { key: "PageUp", run: ht, shift: ut },
687
+ { key: "PageUp", run: ut, shift: ht },
688
688
  { key: "PageDown", run: Je, shift: ft },
689
689
  { key: "Home", run: Qr, shift: ao, preventDefault: !0 },
690
690
  { key: "Mod-Home", run: dt, shift: gt },
691
691
  { key: "End", run: jr, shift: lo, preventDefault: !0 },
692
692
  { key: "Mod-End", run: mt, shift: pt },
693
- { key: "Enter", run: Bo },
693
+ { key: "Enter", run: Do },
694
694
  { key: "Mod-a", run: mo },
695
695
  { key: "Backspace", run: je, shift: je },
696
- { key: "Delete", run: un },
696
+ { key: "Delete", run: hn },
697
697
  { key: "Mod-Backspace", mac: "Alt-Backspace", run: dn },
698
698
  { key: "Mod-Delete", mac: "Alt-Delete", run: xo },
699
699
  { mac: "Mod-Backspace", run: ko },
700
700
  { mac: "Mod-Delete", run: mn }
701
- ].concat(/* @__PURE__ */ Ro.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), Oo = /* @__PURE__ */ [
701
+ ].concat(/* @__PURE__ */ wo.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), Oo = /* @__PURE__ */ [
702
702
  { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: Kr, shift: io },
703
703
  { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: Jr, shift: so },
704
704
  { key: "Alt-ArrowUp", run: Co },
@@ -711,7 +711,7 @@ const wo = ({ state: t, dispatch: e }) => {
711
711
  { key: "Mod-i", run: po, preventDefault: !0 },
712
712
  { key: "Mod-[", run: kn },
713
713
  { key: "Mod-]", run: xn },
714
- { key: "Mod-Alt-\\", run: wo },
714
+ { key: "Mod-Alt-\\", run: Ro },
715
715
  { key: "Shift-Mod-k", run: Lo },
716
716
  { key: "Shift-Mod-\\", run: no },
717
717
  { key: "Mod-/", run: Ar },
@@ -857,7 +857,7 @@ class Cn {
857
857
  }
858
858
  }
859
859
  }
860
- const He = /* @__PURE__ */ new WeakMap();
860
+ const _e = /* @__PURE__ */ new WeakMap();
861
861
  class X {
862
862
  constructor(e, r) {
863
863
  this.from = e, this.text = r;
@@ -866,15 +866,15 @@ class X {
866
866
  return this.from + this.text.length;
867
867
  }
868
868
  static get(e, r, n) {
869
- let o = He.get(e);
869
+ let o = _e.get(e);
870
870
  if (!o || o.from >= n || o.to <= r) {
871
871
  let l = new X(r, e.sliceString(r, n));
872
- return He.set(e, l), l;
872
+ return _e.set(e, l), l;
873
873
  }
874
874
  if (o.from == r && o.to == n)
875
875
  return o;
876
876
  let { text: i, from: s } = o;
877
- return s > r && (i = e.sliceString(r, s) + i, s = r), o.to < n && (i += e.sliceString(o.to, n)), He.set(e, new X(s, i)), new X(r, i.slice(r - s, n - s));
877
+ return s > r && (i = e.sliceString(r, s) + i, s = r), o.to < n && (i += e.sliceString(o.to, n)), _e.set(e, new X(s, i)), new X(r, i.slice(r - s, n - s));
878
878
  }
879
879
  }
880
880
  class vn {
@@ -933,13 +933,13 @@ function Qe(t) {
933
933
  let o = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);
934
934
  if (!o)
935
935
  return;
936
- let { state: i } = t, s = i.doc.lineAt(i.selection.main.head), [, l, a, c, h] = o, u = c ? +c.slice(1) : 0, m = a ? +a : s.number;
937
- if (a && h) {
938
- let B = m / 100;
939
- l && (B = B * (l == "-" ? -1 : 1) + s.number / i.doc.lines), m = Math.round(i.doc.lines * B);
936
+ let { state: i } = t, s = i.doc.lineAt(i.selection.main.head), [, l, a, c, u] = o, h = c ? +c.slice(1) : 0, m = a ? +a : s.number;
937
+ if (a && u) {
938
+ let D = m / 100;
939
+ l && (D = D * (l == "-" ? -1 : 1) + s.number / i.doc.lines), m = Math.round(i.doc.lines * D);
940
940
  } else
941
941
  a && l && (m = m * (l == "-" ? -1 : 1) + s.number);
942
- let k = i.doc.line(Math.max(1, Math.min(i.doc.lines, m))), S = d.cursor(k.from + Math.max(0, Math.min(u, k.length)));
942
+ let k = i.doc.line(Math.max(1, Math.min(i.doc.lines, m))), S = d.cursor(k.from + Math.max(0, Math.min(h, k.length)));
943
943
  t.dispatch({
944
944
  effects: [Ae.of(!1), p.scrollIntoView(S.from, { y: "center" })],
945
945
  selection: S
@@ -947,7 +947,7 @@ function Qe(t) {
947
947
  }
948
948
  return { dom: r };
949
949
  }
950
- const Ae = /* @__PURE__ */ R.define(), xt = /* @__PURE__ */ we.define({
950
+ const Ae = /* @__PURE__ */ w.define(), xt = /* @__PURE__ */ Re.define({
951
951
  create() {
952
952
  return !0;
953
953
  },
@@ -961,7 +961,7 @@ const Ae = /* @__PURE__ */ R.define(), xt = /* @__PURE__ */ we.define({
961
961
  let e = ce(t, Qe);
962
962
  if (!e) {
963
963
  let r = [Ae.of(!0)];
964
- t.state.field(xt, !1) == null && r.push(R.appendConfig.of([xt, Fo])), t.dispatch({ effects: r }), e = ce(t, Qe);
964
+ t.state.field(xt, !1) == null && r.push(w.appendConfig.of([xt, Fo])), t.dispatch({ effects: r }), e = ce(t, Qe);
965
965
  }
966
966
  return e && e.dom.querySelector("input").focus(), !0;
967
967
  }, Fo = /* @__PURE__ */ p.baseTheme({
@@ -984,17 +984,17 @@ const Ae = /* @__PURE__ */ R.define(), xt = /* @__PURE__ */ we.define({
984
984
  }
985
985
  });
986
986
  function qo(t) {
987
- let e = [Uo, zo];
987
+ let e = [zo, Uo];
988
988
  return t && e.push(An.of(t)), e;
989
989
  }
990
- const _o = /* @__PURE__ */ x.mark({ class: "cm-selectionMatch" }), Ho = /* @__PURE__ */ x.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
990
+ const Vo = /* @__PURE__ */ x.mark({ class: "cm-selectionMatch" }), _o = /* @__PURE__ */ x.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
991
991
  function kt(t, e, r, n) {
992
992
  return (r == 0 || t(e.sliceDoc(r - 1, r)) != M.Word) && (n == e.doc.length || t(e.sliceDoc(n, n + 1)) != M.Word);
993
993
  }
994
- function Vo(t, e, r, n) {
994
+ function Ho(t, e, r, n) {
995
995
  return t(e.sliceDoc(r, r + 1)) == M.Word && t(e.sliceDoc(n - 1, n)) == M.Word;
996
996
  }
997
- const zo = /* @__PURE__ */ Ft.fromClass(class {
997
+ const Uo = /* @__PURE__ */ Ft.fromClass(class {
998
998
  constructor(t) {
999
999
  this.decorations = this.getDeco(t);
1000
1000
  }
@@ -1018,7 +1018,7 @@ const zo = /* @__PURE__ */ Ft.fromClass(class {
1018
1018
  if (a < e.minSelectionLength || a > 200)
1019
1019
  return x.none;
1020
1020
  if (e.wholeWords) {
1021
- if (i = r.sliceDoc(o.from, o.to), s = r.charCategorizer(o.head), !(kt(s, r, o.from, o.to) && Vo(s, r, o.from, o.to)))
1021
+ if (i = r.sliceDoc(o.from, o.to), s = r.charCategorizer(o.head), !(kt(s, r, o.from, o.to) && Ho(s, r, o.from, o.to)))
1022
1022
  return x.none;
1023
1023
  } else if (i = r.sliceDoc(o.from, o.to).trim(), !i)
1024
1024
  return x.none;
@@ -1027,8 +1027,8 @@ const zo = /* @__PURE__ */ Ft.fromClass(class {
1027
1027
  for (let a of t.visibleRanges) {
1028
1028
  let c = new te(r.doc, i, a.from, a.to);
1029
1029
  for (; !c.next().done; ) {
1030
- let { from: h, to: u } = c.value;
1031
- if ((!s || kt(s, r, h, u)) && (o.empty && h <= o.from && u >= o.to ? l.push(Ho.range(h, u)) : (h >= o.to || u <= o.from) && l.push(_o.range(h, u)), l.length > e.maxMatches))
1030
+ let { from: u, to: h } = c.value;
1031
+ if ((!s || kt(s, r, u, h)) && (o.empty && u <= o.from && h >= o.to ? l.push(_o.range(u, h)) : (u >= o.to || h <= o.from) && l.push(Vo.range(u, h)), l.length > e.maxMatches))
1032
1032
  return x.none;
1033
1033
  }
1034
1034
  }
@@ -1036,7 +1036,7 @@ const zo = /* @__PURE__ */ Ft.fromClass(class {
1036
1036
  }
1037
1037
  }, {
1038
1038
  decorations: (t) => t.decorations
1039
- }), Uo = /* @__PURE__ */ p.baseTheme({
1039
+ }), zo = /* @__PURE__ */ p.baseTheme({
1040
1040
  ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
1041
1041
  ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
1042
1042
  }), $o = ({ state: t, dispatch: e }) => {
@@ -1117,7 +1117,7 @@ class Mn {
1117
1117
  range in the given state.
1118
1118
  */
1119
1119
  getCursor(e, r = 0, n) {
1120
- let o = e.doc ? e : he.create({ doc: e });
1120
+ let o = e.doc ? e : ue.create({ doc: e });
1121
1121
  return n == null && (n = o.doc.length), this.regexp ? Y(this, o, r, n) : Q(this, o, r, n);
1122
1122
  }
1123
1123
  }
@@ -1235,18 +1235,18 @@ class Yo extends Ln {
1235
1235
  o(i.value.from, i.value.to);
1236
1236
  }
1237
1237
  }
1238
- const ue = /* @__PURE__ */ R.define(), st = /* @__PURE__ */ R.define(), q = /* @__PURE__ */ we.define({
1238
+ const he = /* @__PURE__ */ w.define(), st = /* @__PURE__ */ w.define(), q = /* @__PURE__ */ Re.define({
1239
1239
  create(t) {
1240
- return new Ve(Ye(t).create(), null);
1240
+ return new He(Ye(t).create(), null);
1241
1241
  },
1242
1242
  update(t, e) {
1243
1243
  for (let r of e.effects)
1244
- r.is(ue) ? t = new Ve(r.value.create(), t.panel) : r.is(st) && (t = new Ve(t.query, r.value ? lt : null));
1244
+ r.is(he) ? t = new He(r.value.create(), t.panel) : r.is(st) && (t = new He(t.query, r.value ? lt : null));
1245
1245
  return t;
1246
1246
  },
1247
1247
  provide: (t) => tt.from(t, (e) => e.panel)
1248
1248
  });
1249
- class Ve {
1249
+ class He {
1250
1250
  constructor(e, r) {
1251
1251
  this.query = e, this.panel = r;
1252
1252
  }
@@ -1267,9 +1267,9 @@ const Zo = /* @__PURE__ */ x.mark({ class: "cm-searchMatch" }), Xo = /* @__PURE_
1267
1267
  let { from: l, to: a } = i[o];
1268
1268
  for (; o < s - 1 && a > i[o + 1].from - 2 * 250; )
1269
1269
  a = i[++o].to;
1270
- t.highlight(r.state, l, a, (c, h) => {
1271
- let u = r.state.selection.ranges.some((m) => m.from == c && m.to == h);
1272
- n.add(c, h, u ? Xo : Zo);
1270
+ t.highlight(r.state, l, a, (c, u) => {
1271
+ let h = r.state.selection.ranges.some((m) => m.from == c && m.to == u);
1272
+ n.add(c, u, h ? Xo : Zo);
1273
1273
  });
1274
1274
  }
1275
1275
  return n.finish();
@@ -1283,7 +1283,7 @@ function de(t) {
1283
1283
  return r && r.query.spec.valid ? t(e, r) : En(e);
1284
1284
  };
1285
1285
  }
1286
- const De = /* @__PURE__ */ de((t, { query: e }) => {
1286
+ const Be = /* @__PURE__ */ de((t, { query: e }) => {
1287
1287
  let { to: r } = t.state.selection.main, n = e.nextMatch(t.state, r, r);
1288
1288
  if (!n)
1289
1289
  return !1;
@@ -1292,8 +1292,8 @@ const De = /* @__PURE__ */ de((t, { query: e }) => {
1292
1292
  selection: o,
1293
1293
  effects: [at(t, n), i.scrollToMatch(o.main, t)],
1294
1294
  userEvent: "select.search"
1295
- }), Bn(t), !0;
1296
- }), Be = /* @__PURE__ */ de((t, { query: e }) => {
1295
+ }), Dn(t), !0;
1296
+ }), De = /* @__PURE__ */ de((t, { query: e }) => {
1297
1297
  let { state: r } = t, { from: n } = r.selection.main, o = e.prevMatch(r, n, n);
1298
1298
  if (!o)
1299
1299
  return !1;
@@ -1302,7 +1302,7 @@ const De = /* @__PURE__ */ de((t, { query: e }) => {
1302
1302
  selection: i,
1303
1303
  effects: [at(t, o), s.scrollToMatch(i.main, t)],
1304
1304
  userEvent: "select.search"
1305
- }), Bn(t), !0;
1305
+ }), Dn(t), !0;
1306
1306
  }), ti = /* @__PURE__ */ de((t, { query: e }) => {
1307
1307
  let r = e.matchAll(t.state, 1e3);
1308
1308
  return !r || !r.length ? !1 : (t.dispatch({
@@ -1332,8 +1332,8 @@ const De = /* @__PURE__ */ de((t, { query: e }) => {
1332
1332
  return !1;
1333
1333
  let s = [], l, a, c = [];
1334
1334
  if (i.from == n && i.to == o && (a = r.toText(e.getReplacement(i)), s.push({ from: i.from, to: i.to, insert: a }), i = e.nextMatch(r, i.from, i.to), c.push(p.announce.of(r.phrase("replaced match on line $", r.doc.lineAt(n).number) + "."))), i) {
1335
- let h = s.length == 0 || s[0].from >= i.to ? 0 : i.to - i.from - a.length;
1336
- l = d.single(i.from - h, i.to - h), c.push(at(t, i)), c.push(r.facet(oe).scrollToMatch(l.main, t));
1335
+ let u = s.length == 0 || s[0].from >= i.to ? 0 : i.to - i.from - a.length;
1336
+ l = d.single(i.from - u, i.to - u), c.push(at(t, i)), c.push(r.facet(oe).scrollToMatch(l.main, t));
1337
1337
  }
1338
1338
  return t.dispatch({
1339
1339
  changes: s,
@@ -1374,29 +1374,29 @@ function Ye(t, e) {
1374
1374
  wholeWord: (s = e == null ? void 0 : e.wholeWord) !== null && s !== void 0 ? s : c.wholeWord
1375
1375
  });
1376
1376
  }
1377
- function Dn(t) {
1377
+ function Bn(t) {
1378
1378
  let e = ce(t, lt);
1379
1379
  return e && e.dom.querySelector("[main-field]");
1380
1380
  }
1381
- function Bn(t) {
1382
- let e = Dn(t);
1381
+ function Dn(t) {
1382
+ let e = Bn(t);
1383
1383
  e && e == t.root.activeElement && e.select();
1384
1384
  }
1385
1385
  const En = (t) => {
1386
1386
  let e = t.state.field(q, !1);
1387
1387
  if (e && e.panel) {
1388
- let r = Dn(t);
1388
+ let r = Bn(t);
1389
1389
  if (r && r != t.root.activeElement) {
1390
1390
  let n = Ye(t.state, e.query.spec);
1391
- n.valid && t.dispatch({ effects: ue.of(n) }), r.focus(), r.select();
1391
+ n.valid && t.dispatch({ effects: he.of(n) }), r.focus(), r.select();
1392
1392
  }
1393
1393
  } else
1394
1394
  t.dispatch({ effects: [
1395
1395
  st.of(!0),
1396
- e ? ue.of(Ye(t.state, e.query.spec)) : R.appendConfig.of(li)
1396
+ e ? he.of(Ye(t.state, e.query.spec)) : w.appendConfig.of(li)
1397
1397
  ] });
1398
1398
  return !0;
1399
- }, wn = (t) => {
1399
+ }, Rn = (t) => {
1400
1400
  let e = t.state.field(q, !1);
1401
1401
  if (!e || !e.panel)
1402
1402
  return !1;
@@ -1404,9 +1404,9 @@ const En = (t) => {
1404
1404
  return r && r.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: st.of(!1) }), !0;
1405
1405
  }, oi = [
1406
1406
  { key: "Mod-f", run: En, scope: "editor search-panel" },
1407
- { key: "F3", run: De, shift: Be, scope: "editor search-panel", preventDefault: !0 },
1408
- { key: "Mod-g", run: De, shift: Be, scope: "editor search-panel", preventDefault: !0 },
1409
- { key: "Escape", run: wn, scope: "editor search-panel" },
1407
+ { key: "F3", run: Be, shift: De, scope: "editor search-panel", preventDefault: !0 },
1408
+ { key: "Mod-g", run: Be, shift: De, scope: "editor search-panel", preventDefault: !0 },
1409
+ { key: "Escape", run: Rn, scope: "editor search-panel" },
1410
1410
  { key: "Mod-Shift-l", run: ni },
1411
1411
  { key: "Alt-g", run: Wo },
1412
1412
  { key: "Mod-d", run: Ko, preventDefault: !0 }
@@ -1458,8 +1458,8 @@ class ii {
1458
1458
  }
1459
1459
  this.dom = g("div", { onkeydown: (o) => this.keydown(o), class: "cm-search" }, [
1460
1460
  this.searchField,
1461
- n("next", () => De(e), [v(e, "next")]),
1462
- n("prev", () => Be(e), [v(e, "previous")]),
1461
+ n("next", () => Be(e), [v(e, "next")]),
1462
+ n("prev", () => De(e), [v(e, "previous")]),
1463
1463
  n("select", () => ti(e), [v(e, "all")]),
1464
1464
  g("label", null, [this.caseField, v(e, "match case")]),
1465
1465
  g("label", null, [this.reField, v(e, "regexp")]),
@@ -1472,7 +1472,7 @@ class ii {
1472
1472
  ],
1473
1473
  g("button", {
1474
1474
  name: "close",
1475
- onclick: () => wn(e),
1475
+ onclick: () => Rn(e),
1476
1476
  "aria-label": v(e, "close"),
1477
1477
  type: "button"
1478
1478
  }, ["×"])
@@ -1486,15 +1486,15 @@ class ii {
1486
1486
  wholeWord: this.wordField.checked,
1487
1487
  replace: this.replaceField.value
1488
1488
  });
1489
- e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: ue.of(e) }));
1489
+ e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: he.of(e) }));
1490
1490
  }
1491
1491
  keydown(e) {
1492
- nr(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? Be : De)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), bt(this.view));
1492
+ nr(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? De : Be)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), bt(this.view));
1493
1493
  }
1494
1494
  update(e) {
1495
1495
  for (let r of e.transactions)
1496
1496
  for (let n of r.effects)
1497
- n.is(ue) && !n.value.eq(this.query) && this.setQuery(n.value);
1497
+ n.is(he) && !n.value.eq(this.query) && this.setQuery(n.value);
1498
1498
  }
1499
1499
  setQuery(e) {
1500
1500
  this.query = e, this.searchField.value = e.search, this.replaceField.value = e.replace, this.caseField.checked = e.caseSensitive, this.reField.checked = e.regexp, this.wordField.checked = e.wholeWord;
@@ -1570,7 +1570,7 @@ class ai {
1570
1570
  this.from = e, this.to = r, this.diagnostic = n;
1571
1571
  }
1572
1572
  }
1573
- class U {
1573
+ class z {
1574
1574
  constructor(e, r, n) {
1575
1575
  this.diagnostics = e, this.panel = r, this.selected = n;
1576
1576
  }
@@ -1584,7 +1584,7 @@ class U {
1584
1584
  attributes: { class: "cm-lintRange cm-lintRange-" + l.severity + (l.markClass ? " " + l.markClass : "") },
1585
1585
  diagnostic: l
1586
1586
  }).range(l.from, l.to)), !0);
1587
- return new U(s, r, ne(s));
1587
+ return new z(s, r, ne(s));
1588
1588
  }
1589
1589
  }
1590
1590
  function ne(t, e = null, r = 0) {
@@ -1596,14 +1596,14 @@ function ne(t, e = null, r = 0) {
1596
1596
  }
1597
1597
  function ci(t, e) {
1598
1598
  let r = t.startState.doc.lineAt(e.pos);
1599
- return !!(t.effects.some((n) => n.is(Rn)) || t.changes.touchesRange(r.from, r.to));
1599
+ return !!(t.effects.some((n) => n.is(wn)) || t.changes.touchesRange(r.from, r.to));
1600
1600
  }
1601
- function hi(t, e) {
1602
- return t.field(A, !1) ? e : e.concat(R.appendConfig.of(bi));
1601
+ function ui(t, e) {
1602
+ return t.field(A, !1) ? e : e.concat(w.appendConfig.of(bi));
1603
1603
  }
1604
- const Rn = /* @__PURE__ */ R.define(), ct = /* @__PURE__ */ R.define(), Tn = /* @__PURE__ */ R.define(), A = /* @__PURE__ */ we.define({
1604
+ const wn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /* @__PURE__ */ w.define(), A = /* @__PURE__ */ Re.define({
1605
1605
  create() {
1606
- return new U(x.none, null, null);
1606
+ return new z(x.none, null, null);
1607
1607
  },
1608
1608
  update(t, e) {
1609
1609
  if (e.docChanged) {
@@ -1612,21 +1612,21 @@ const Rn = /* @__PURE__ */ R.define(), ct = /* @__PURE__ */ R.define(), Tn = /*
1612
1612
  let o = e.changes.mapPos(t.selected.from, 1);
1613
1613
  n = ne(r, t.selected.diagnostic, o) || ne(r, null, o);
1614
1614
  }
1615
- t = new U(r, t.panel, n);
1615
+ t = new z(r, t.panel, n);
1616
1616
  }
1617
1617
  for (let r of e.effects)
1618
- r.is(Rn) ? t = U.init(r.value, t.panel, e.state) : r.is(ct) ? t = new U(t.diagnostics, r.value ? We.open : null, t.selected) : r.is(Tn) && (t = new U(t.diagnostics, t.panel, r.value));
1618
+ r.is(wn) ? t = z.init(r.value, t.panel, e.state) : r.is(ct) ? t = new z(t.diagnostics, r.value ? We.open : null, t.selected) : r.is(Tn) && (t = new z(t.diagnostics, t.panel, r.value));
1619
1619
  return t;
1620
1620
  },
1621
1621
  provide: (t) => [
1622
1622
  tt.from(t, (e) => e.panel),
1623
1623
  p.decorations.from(t, (e) => e.diagnostics)
1624
1624
  ]
1625
- }), ui = /* @__PURE__ */ x.mark({ class: "cm-lintRange cm-lintRange-active" });
1625
+ }), hi = /* @__PURE__ */ x.mark({ class: "cm-lintRange cm-lintRange-active" });
1626
1626
  function fi(t, e, r) {
1627
1627
  let { diagnostics: n } = t.state.field(A), o = [], i = 2e8, s = 0;
1628
- n.between(e - (r < 0 ? 1 : 0), e + (r > 0 ? 1 : 0), (a, c, { spec: h }) => {
1629
- e >= a && e <= c && (a == c || (e > a || r > 0) && (e < c || r < 0)) && (o.push(h.diagnostic), i = Math.min(a, i), s = Math.max(c, s));
1628
+ n.between(e - (r < 0 ? 1 : 0), e + (r > 0 ? 1 : 0), (a, c, { spec: u }) => {
1629
+ e >= a && e <= c && (a == c || (e > a || r > 0) && (e < c || r < 0)) && (o.push(u.diagnostic), i = Math.min(a, i), s = Math.max(c, s));
1630
1630
  });
1631
1631
  let l = t.state.facet(On).tooltipFilter;
1632
1632
  return l && (o = l(o)), o.length ? {
@@ -1643,7 +1643,7 @@ function di(t, e) {
1643
1643
  }
1644
1644
  const mi = (t) => {
1645
1645
  let e = t.state.field(A, !1);
1646
- (!e || !e.panel) && t.dispatch({ effects: hi(t.state, [ct.of(!0)]) });
1646
+ (!e || !e.panel) && t.dispatch({ effects: ui(t.state, [ct.of(!0)]) });
1647
1647
  let r = ce(t, We.open);
1648
1648
  return r && r.dom.querySelector(".cm-panel-lint ul").focus(), !0;
1649
1649
  }, St = (t) => {
@@ -1696,18 +1696,18 @@ function Pn(t, e, r) {
1696
1696
  l = !0;
1697
1697
  let k = ne(t.state.field(A).diagnostics, e);
1698
1698
  k && i.apply(t, k.from, k.to);
1699
- }, { name: c } = i, h = o[s] ? c.indexOf(o[s]) : -1, u = h < 0 ? c : [
1700
- c.slice(0, h),
1701
- g("u", c.slice(h, h + 1)),
1702
- c.slice(h + 1)
1699
+ }, { name: c } = i, u = o[s] ? c.indexOf(o[s]) : -1, h = u < 0 ? c : [
1700
+ c.slice(0, u),
1701
+ g("u", c.slice(u, u + 1)),
1702
+ c.slice(u + 1)
1703
1703
  ];
1704
1704
  return g("button", {
1705
1705
  type: "button",
1706
1706
  class: "cm-diagnosticAction",
1707
1707
  onclick: a,
1708
1708
  onmousedown: a,
1709
- "aria-label": ` Action: ${c}${h < 0 ? "" : ` (access key "${o[s]})"`}.`
1710
- }, u);
1709
+ "aria-label": ` Action: ${c}${u < 0 ? "" : ` (access key "${o[s]})"`}.`
1710
+ }, h);
1711
1711
  }), e.source && g("div", { class: "cm-diagnosticSource" }, e.source));
1712
1712
  }
1713
1713
  class yi extends or {
@@ -1781,13 +1781,13 @@ class We {
1781
1781
  update() {
1782
1782
  let { diagnostics: e, selected: r } = this.view.state.field(A), n = 0, o = !1, i = null;
1783
1783
  for (e.between(0, this.view.state.doc.length, (s, l, { spec: a }) => {
1784
- let c = -1, h;
1785
- for (let u = n; u < this.items.length; u++)
1786
- if (this.items[u].diagnostic == a.diagnostic) {
1787
- c = u;
1784
+ let c = -1, u;
1785
+ for (let h = n; h < this.items.length; h++)
1786
+ if (this.items[h].diagnostic == a.diagnostic) {
1787
+ c = h;
1788
1788
  break;
1789
1789
  }
1790
- c < 0 ? (h = new Ct(this.view, a.diagnostic), this.items.splice(n, 0, h), o = !0) : (h = this.items[c], c > n && (this.items.splice(n, c - n), o = !0)), r && h.diagnostic == r.diagnostic ? h.dom.hasAttribute("aria-selected") || (h.dom.setAttribute("aria-selected", "true"), i = h) : h.dom.hasAttribute("aria-selected") && h.dom.removeAttribute("aria-selected"), n++;
1790
+ c < 0 ? (u = new Ct(this.view, a.diagnostic), this.items.splice(n, 0, u), o = !0) : (u = this.items[c], c > n && (this.items.splice(n, c - n), o = !0)), r && u.diagnostic == r.diagnostic ? u.dom.hasAttribute("aria-selected") || (u.dom.setAttribute("aria-selected", "true"), i = u) : u.dom.hasAttribute("aria-selected") && u.dom.removeAttribute("aria-selected"), n++;
1791
1791
  }); n < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); )
1792
1792
  o = !0, this.items.pop();
1793
1793
  this.items.length == 0 && (this.items.push(new Ct(this.view, {
@@ -1934,7 +1934,7 @@ const ki = /* @__PURE__ */ p.baseTheme({
1934
1934
  /* @__PURE__ */ p.decorations.compute([A], (t) => {
1935
1935
  let { selected: e, panel: r } = t.field(A);
1936
1936
  return !e || !r || e.from == e.to ? x.none : x.set([
1937
- ui.range(e.from, e.to)
1937
+ hi.range(e.from, e.to)
1938
1938
  ]);
1939
1939
  }),
1940
1940
  /* @__PURE__ */ rr(fi, { hideOn: ci }),
@@ -1945,23 +1945,23 @@ var vt = function(e) {
1945
1945
  var {
1946
1946
  crosshairCursor: r = !1
1947
1947
  } = e, n = [];
1948
- e.closeBracketsKeymap !== !1 && (n = n.concat(ir)), e.defaultKeymap !== !1 && (n = n.concat(Oo)), e.searchKeymap !== !1 && (n = n.concat(oi)), e.historyKeymap !== !1 && (n = n.concat(zr)), e.foldKeymap !== !1 && (n = n.concat(sr)), e.completionKeymap !== !1 && (n = n.concat(lr)), e.lintKeymap !== !1 && (n = n.concat(pi));
1948
+ e.closeBracketsKeymap !== !1 && (n = n.concat(ir)), e.defaultKeymap !== !1 && (n = n.concat(Oo)), e.searchKeymap !== !1 && (n = n.concat(oi)), e.historyKeymap !== !1 && (n = n.concat(Ur)), e.foldKeymap !== !1 && (n = n.concat(sr)), e.completionKeymap !== !1 && (n = n.concat(lr)), e.lintKeymap !== !1 && (n = n.concat(pi));
1949
1949
  var o = [];
1950
- return e.lineNumbers !== !1 && o.push(ar()), e.highlightActiveLineGutter !== !1 && o.push(cr()), e.highlightSpecialChars !== !1 && o.push(hr()), e.history !== !1 && o.push(Ir()), e.foldGutter !== !1 && o.push(ur()), e.drawSelection !== !1 && o.push(fr()), e.dropCursor !== !1 && o.push(dr()), e.allowMultipleSelections !== !1 && o.push(he.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && o.push(mr()), e.syntaxHighlighting !== !1 && o.push(Nt(Sr, {
1950
+ return e.lineNumbers !== !1 && o.push(ar()), e.highlightActiveLineGutter !== !1 && o.push(cr()), e.highlightSpecialChars !== !1 && o.push(ur()), e.history !== !1 && o.push(Ir()), e.foldGutter !== !1 && o.push(hr()), e.drawSelection !== !1 && o.push(fr()), e.dropCursor !== !1 && o.push(dr()), e.allowMultipleSelections !== !1 && o.push(ue.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && o.push(mr()), e.syntaxHighlighting !== !1 && o.push(Nt(Sr, {
1951
1951
  fallback: !0
1952
1952
  })), e.bracketMatching !== !1 && o.push(gr()), e.closeBrackets !== !1 && o.push(pr()), e.autocompletion !== !1 && o.push(yr()), e.rectangularSelection !== !1 && o.push(xr()), r !== !1 && o.push(kr()), e.highlightActiveLine !== !1 && o.push(br()), e.highlightSelectionMatches !== !1 && o.push(qo()), e.tabSize && typeof e.tabSize == "number" && o.push(Pt.of(" ".repeat(e.tabSize))), o.concat([qt.of(n.flat())]).filter(Boolean);
1953
1953
  };
1954
- const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb2bf", Ze = "#7d8799", Ai = "#61afef", Mi = "#98c379", Mt = "#d19a66", Li = "#c678dd", Di = "#21252b", Lt = "#2c313a", Dt = "#282c34", ze = "#353a42", Bi = "#3E4451", Bt = "#528bff", Ei = /* @__PURE__ */ p.theme({
1954
+ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb2bf", Ze = "#7d8799", Ai = "#61afef", Mi = "#98c379", Mt = "#d19a66", Li = "#c678dd", Bi = "#21252b", Lt = "#2c313a", Bt = "#282c34", Ue = "#353a42", Di = "#3E4451", Dt = "#528bff", Ei = /* @__PURE__ */ p.theme({
1955
1955
  "&": {
1956
1956
  color: be,
1957
- backgroundColor: Dt
1957
+ backgroundColor: Bt
1958
1958
  },
1959
1959
  ".cm-content": {
1960
- caretColor: Bt
1960
+ caretColor: Dt
1961
1961
  },
1962
- ".cm-cursor, .cm-dropCursor": { borderLeftColor: Bt },
1963
- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Bi },
1964
- ".cm-panels": { backgroundColor: Di, color: be },
1962
+ ".cm-cursor, .cm-dropCursor": { borderLeftColor: Dt },
1963
+ "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Di },
1964
+ ".cm-panels": { backgroundColor: Bi, color: be },
1965
1965
  ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
1966
1966
  ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
1967
1967
  ".cm-searchMatch": {
@@ -1977,7 +1977,7 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
1977
1977
  backgroundColor: "#bad0f847"
1978
1978
  },
1979
1979
  ".cm-gutters": {
1980
- backgroundColor: Dt,
1980
+ backgroundColor: Bt,
1981
1981
  color: Ze,
1982
1982
  border: "none"
1983
1983
  },
@@ -1991,15 +1991,15 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
1991
1991
  },
1992
1992
  ".cm-tooltip": {
1993
1993
  border: "none",
1994
- backgroundColor: ze
1994
+ backgroundColor: Ue
1995
1995
  },
1996
1996
  ".cm-tooltip .cm-tooltip-arrow:before": {
1997
1997
  borderTopColor: "transparent",
1998
1998
  borderBottomColor: "transparent"
1999
1999
  },
2000
2000
  ".cm-tooltip .cm-tooltip-arrow:after": {
2001
- borderTopColor: ze,
2002
- borderBottomColor: ze
2001
+ borderTopColor: Ue,
2002
+ borderBottomColor: Ue
2003
2003
  },
2004
2004
  ".cm-tooltip-autocomplete": {
2005
2005
  "& > ul > li[aria-selected]": {
@@ -2007,7 +2007,7 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
2007
2007
  color: be
2008
2008
  }
2009
2009
  }
2010
- }, { dark: !0 }), wi = /* @__PURE__ */ Cr.define([
2010
+ }, { dark: !0 }), Ri = /* @__PURE__ */ Cr.define([
2011
2011
  {
2012
2012
  tag: f.keyword,
2013
2013
  color: Li
@@ -2074,7 +2074,7 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
2074
2074
  tag: f.invalid,
2075
2075
  color: vi
2076
2076
  }
2077
- ]), Ri = [Ei, /* @__PURE__ */ Nt(wi)];
2077
+ ]), wi = [Ei, /* @__PURE__ */ Nt(Ri)];
2078
2078
  var Ti = p.theme({
2079
2079
  "&": {
2080
2080
  backgroundColor: "#fff"
@@ -2096,7 +2096,7 @@ var Ti = p.theme({
2096
2096
  a.push(Ti);
2097
2097
  break;
2098
2098
  case "dark":
2099
- a.push(Ri);
2099
+ a.push(wi);
2100
2100
  break;
2101
2101
  case "none":
2102
2102
  break;
@@ -2104,7 +2104,7 @@ var Ti = p.theme({
2104
2104
  a.push(i);
2105
2105
  break;
2106
2106
  }
2107
- return n === !1 && a.push(p.editable.of(!1)), o && a.push(he.readOnly.of(!0)), [...a];
2107
+ return n === !1 && a.push(p.editable.of(!1)), o && a.push(ue.readOnly.of(!0)), [...a];
2108
2108
  }, Ii = (t) => ({
2109
2109
  line: t.state.doc.lineAt(t.state.selection.main.from),
2110
2110
  lineCount: t.state.doc.lines,
@@ -2130,54 +2130,54 @@ function Wi(t) {
2130
2130
  extensions: l = Pi,
2131
2131
  autoFocus: a,
2132
2132
  theme: c = "light",
2133
- height: h = null,
2134
- minHeight: u = null,
2133
+ height: u = null,
2134
+ minHeight: h = null,
2135
2135
  maxHeight: m = null,
2136
2136
  width: k = null,
2137
2137
  minWidth: S = null,
2138
- maxWidth: B = null,
2138
+ maxWidth: D = null,
2139
2139
  placeholder: $ = "",
2140
2140
  editable: G = !0,
2141
- readOnly: H = !1,
2141
+ readOnly: _ = !1,
2142
2142
  indentWithTab: K = !0,
2143
- basicSetup: V = !0,
2143
+ basicSetup: H = !0,
2144
2144
  root: ie,
2145
- initialState: z
2145
+ initialState: U
2146
2146
  } = t, [W, E] = ke(), [y, P] = ke(), [J, j] = ke(), Fe = p.theme({
2147
2147
  "&": {
2148
- height: h,
2149
- minHeight: u,
2148
+ height: u,
2149
+ minHeight: h,
2150
2150
  maxHeight: m,
2151
2151
  width: k,
2152
2152
  minWidth: S,
2153
- maxWidth: B
2153
+ maxWidth: D
2154
2154
  },
2155
2155
  "& .cm-scroller": {
2156
2156
  height: "100% !important"
2157
2157
  }
2158
- }), Ne = p.updateListener.of((w) => {
2159
- if (w.docChanged && typeof n == "function" && // Fix echoing of the remote changes:
2158
+ }), Ne = p.updateListener.of((R) => {
2159
+ if (R.docChanged && typeof n == "function" && // Fix echoing of the remote changes:
2160
2160
  // If transaction is market as remote we don't have to call `onChange` handler again
2161
- !w.transactions.some((Nn) => Nn.annotation(Et))) {
2162
- var le = w.state.doc, me = le.toString();
2163
- n(me, w);
2161
+ !R.transactions.some((Nn) => Nn.annotation(Et))) {
2162
+ var le = R.state.doc, me = le.toString();
2163
+ n(me, R);
2164
2164
  }
2165
- o && o(Ii(w));
2165
+ o && o(Ii(R));
2166
2166
  }), Fn = Oi({
2167
2167
  theme: c,
2168
2168
  editable: G,
2169
- readOnly: H,
2169
+ readOnly: _,
2170
2170
  placeholder: $,
2171
2171
  indentWithTab: K,
2172
- basicSetup: V
2172
+ basicSetup: H
2173
2173
  }), se = [Ne, Fe, ...Fn];
2174
2174
  return s && typeof s == "function" && se.push(p.updateListener.of(s)), se = se.concat(l), N(() => {
2175
2175
  if (W && !J) {
2176
- var w = {
2176
+ var R = {
2177
2177
  doc: e,
2178
2178
  selection: r,
2179
2179
  extensions: se
2180
- }, le = z ? he.fromJSON(z.json, w, z.fields) : he.create(w);
2180
+ }, le = U ? ue.fromJSON(U.json, R, U.fields) : ue.create(R);
2181
2181
  if (j(le), !y) {
2182
2182
  var me = new p({
2183
2183
  state: le,
@@ -2196,15 +2196,15 @@ function Wi(t) {
2196
2196
  a && y && y.focus();
2197
2197
  }, [a, y]), N(() => {
2198
2198
  y && y.dispatch({
2199
- effects: R.reconfigure.of(se)
2199
+ effects: w.reconfigure.of(se)
2200
2200
  });
2201
- }, [c, l, h, u, m, k, S, B, $, G, H, K, V, n, s]), N(() => {
2201
+ }, [c, l, u, h, m, k, S, D, $, G, _, K, H, n, s]), N(() => {
2202
2202
  if (e !== void 0) {
2203
- var w = y ? y.state.doc.toString() : "";
2204
- y && e !== w && y.dispatch({
2203
+ var R = y ? y.state.doc.toString() : "";
2204
+ y && e !== R && y.dispatch({
2205
2205
  changes: {
2206
2206
  from: 0,
2207
- to: w.length,
2207
+ to: R.length,
2208
2208
  insert: e || ""
2209
2209
  },
2210
2210
  annotations: [Et.of(!0)]
@@ -2219,7 +2219,7 @@ function Wi(t) {
2219
2219
  setContainer: E
2220
2220
  };
2221
2221
  }
2222
- var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatistics", "onCreateEditor", "onUpdate", "autoFocus", "theme", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "basicSetup", "placeholder", "indentWithTab", "editable", "readOnly", "root", "initialState"], Wn = /* @__PURE__ */ wt((t, e) => {
2222
+ var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatistics", "onCreateEditor", "onUpdate", "autoFocus", "theme", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "basicSetup", "placeholder", "indentWithTab", "editable", "readOnly", "root", "initialState"], Wn = /* @__PURE__ */ Rt((t, e) => {
2223
2223
  var {
2224
2224
  className: r,
2225
2225
  value: n = "",
@@ -2229,22 +2229,22 @@ var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatis
2229
2229
  onStatistics: l,
2230
2230
  onCreateEditor: a,
2231
2231
  onUpdate: c,
2232
- autoFocus: h,
2233
- theme: u = "light",
2232
+ autoFocus: u,
2233
+ theme: h = "light",
2234
2234
  height: m,
2235
2235
  minHeight: k,
2236
2236
  maxHeight: S,
2237
- width: B,
2237
+ width: D,
2238
2238
  minWidth: $,
2239
2239
  maxWidth: G,
2240
- basicSetup: H,
2240
+ basicSetup: _,
2241
2241
  placeholder: K,
2242
- indentWithTab: V,
2242
+ indentWithTab: H,
2243
2243
  editable: ie,
2244
- readOnly: z,
2244
+ readOnly: U,
2245
2245
  root: W,
2246
2246
  initialState: E
2247
- } = t, y = qn(t, Fi), P = Rt(null), {
2247
+ } = t, y = qn(t, Fi), P = wt(null), {
2248
2248
  state: J,
2249
2249
  view: j,
2250
2250
  container: Fe
@@ -2252,19 +2252,19 @@ var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatis
2252
2252
  container: P.current,
2253
2253
  root: W,
2254
2254
  value: n,
2255
- autoFocus: h,
2256
- theme: u,
2255
+ autoFocus: u,
2256
+ theme: h,
2257
2257
  height: m,
2258
2258
  minHeight: k,
2259
2259
  maxHeight: S,
2260
- width: B,
2260
+ width: D,
2261
2261
  minWidth: $,
2262
2262
  maxWidth: G,
2263
- basicSetup: H,
2263
+ basicSetup: _,
2264
2264
  placeholder: K,
2265
- indentWithTab: V,
2265
+ indentWithTab: H,
2266
2266
  editable: ie,
2267
- readOnly: z,
2267
+ readOnly: U,
2268
2268
  selection: o,
2269
2269
  onChange: s,
2270
2270
  onStatistics: l,
@@ -2273,14 +2273,14 @@ var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatis
2273
2273
  extensions: i,
2274
2274
  initialState: E
2275
2275
  });
2276
- if (_n(e, () => ({
2276
+ if (Vn(e, () => ({
2277
2277
  editor: P.current,
2278
2278
  state: J,
2279
2279
  view: j
2280
2280
  }), [P, Fe, J, j]), typeof n != "string")
2281
2281
  throw new Error("value must be typeof string but got " + typeof n);
2282
- var Ne = typeof u == "string" ? "cm-theme-" + u : "cm-theme";
2283
- return /* @__PURE__ */ F.jsx("div", Hn({
2282
+ var Ne = typeof h == "string" ? "cm-theme-" + h : "cm-theme";
2283
+ return /* @__PURE__ */ F.jsx("div", _n({
2284
2284
  ref: P,
2285
2285
  className: "" + Ne + (r ? " " + r : "")
2286
2286
  }, y));
@@ -2297,7 +2297,7 @@ const Ni = [
2297
2297
  "[&_.cm-gutters]:text-grey-600 dark:[&_.cm-gutters]:text-grey-500",
2298
2298
  "[&_.cm-gutters]:border-grey-500 dark:[&_.cm-gutters]:border-grey-800",
2299
2299
  "[&_.cm-cursor]:border-grey-900 dark:[&_.cm-cursor]:border-grey-75"
2300
- ].join(" "), Hi = wt(function({
2300
+ ].join(" "), _i = Rt(function({
2301
2301
  title: e,
2302
2302
  value: r,
2303
2303
  height: n = "200px",
@@ -2307,14 +2307,14 @@ const Ni = [
2307
2307
  extensions: l,
2308
2308
  onChange: a,
2309
2309
  onFocus: c,
2310
- onBlur: h,
2311
- className: u,
2310
+ onBlur: u,
2311
+ className: h,
2312
2312
  ...m
2313
2313
  }, k) {
2314
- const S = Vn(), B = Rt(null), [$, G] = ke(100), [H, K] = zn.useState(null), { setFocusState: V } = Un(), ie = (E) => {
2315
- c == null || c(E), V(!0);
2316
- }, z = (E) => {
2317
- h == null || h(E), V(!1);
2314
+ const S = Hn(), D = wt(null), [$, G] = ke(100), [_, K] = Un.useState(null), { setFocusState: H } = zn(), ie = (E) => {
2315
+ c == null || c(E), H(!0);
2316
+ }, U = (E) => {
2317
+ u == null || u(E), H(!1);
2318
2318
  };
2319
2319
  N(() => {
2320
2320
  Promise.all(l).then(K);
@@ -2322,29 +2322,29 @@ const Ni = [
2322
2322
  const E = new ResizeObserver(([y]) => {
2323
2323
  G(y.contentRect.width);
2324
2324
  });
2325
- return E.observe(B.current), () => E.disconnect();
2325
+ return E.observe(D.current), () => E.disconnect();
2326
2326
  }, []);
2327
- let W = $n(
2327
+ const W = $n(
2328
2328
  "peer order-2 w-full max-w-full overflow-hidden rounded-sm border",
2329
2329
  s ? "bg-transparent" : "bg-grey-75",
2330
2330
  o ? "border-red" : "border-grey-500 dark:border-grey-800",
2331
2331
  e && "mt-2",
2332
2332
  n === "full" && "h-full",
2333
2333
  Ni,
2334
- u
2334
+ h
2335
2335
  );
2336
2336
  return /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
2337
- /* @__PURE__ */ F.jsx("div", { ref: B }),
2338
- H && /* @__PURE__ */ F.jsxs("div", { className: n === "full" ? "h-full" : "", style: { width: $ }, children: [
2337
+ /* @__PURE__ */ F.jsx("div", { ref: D }),
2338
+ _ && /* @__PURE__ */ F.jsxs("div", { className: n === "full" ? "h-full" : "", style: { width: $ }, children: [
2339
2339
  /* @__PURE__ */ F.jsx(
2340
2340
  Wn,
2341
2341
  {
2342
2342
  ref: k,
2343
2343
  className: W,
2344
- extensions: H,
2344
+ extensions: _,
2345
2345
  height: n === "full" ? "100%" : n,
2346
2346
  value: r,
2347
- onBlur: z,
2347
+ onBlur: U,
2348
2348
  onChange: a,
2349
2349
  onFocus: ie,
2350
2350
  ...m
@@ -2356,6 +2356,6 @@ const Ni = [
2356
2356
  ] });
2357
2357
  });
2358
2358
  export {
2359
- Hi as default
2359
+ _i as default
2360
2360
  };
2361
- //# sourceMappingURL=CodeEditorView-4989db6d.mjs.map
2361
+ //# sourceMappingURL=CodeEditorView-7eba6adb.mjs.map