@infinilabs/discover 0.0.1

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 (233) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +8 -0
  3. package/dist/abap-B988NUrV.js +122 -0
  4. package/dist/abap-obercqiY.cjs +1 -0
  5. package/dist/apex-B0_UGK1B.cjs +1 -0
  6. package/dist/apex-BlHPPQK-.js +168 -0
  7. package/dist/azcli-C7iyZFGk.js +53 -0
  8. package/dist/azcli-CEoytwx_.cjs +1 -0
  9. package/dist/bat-Buc0l0C3.js +123 -0
  10. package/dist/bat-D65OC-jj.cjs +1 -0
  11. package/dist/bicep-DvD_e5vW.cjs +2 -0
  12. package/dist/bicep-U66iJ-pV.js +219 -0
  13. package/dist/cameligo-C9Dwkdmm.js +189 -0
  14. package/dist/cameligo-DzMHfeEs.cjs +1 -0
  15. package/dist/chunk-BjqF3vbe.cjs +1 -0
  16. package/dist/chunk-CIp4IH9D.js +21 -0
  17. package/dist/classnames-BXjDNQ6Q.cjs +1 -0
  18. package/dist/classnames-eUba3oot.js +29 -0
  19. package/dist/clojure-BC7BzAFK.cjs +1 -0
  20. package/dist/clojure-DDWmWbSx.js +146 -0
  21. package/dist/coffee-7Sx2S8NH.js +260 -0
  22. package/dist/coffee-Ca9F0OWZ.cjs +1 -0
  23. package/dist/common-BeXEy5sz.cjs +18 -0
  24. package/dist/common-BlOHZJzI.js +64 -0
  25. package/dist/common-DuYIpe6b.cjs +1 -0
  26. package/dist/common-Tr1I-HCs.js +6725 -0
  27. package/dist/cpp-CHjqaSPQ.js +230 -0
  28. package/dist/cpp-DKy9h6xR.cjs +1 -0
  29. package/dist/createLucideIcon-239Z-2by.cjs +1 -0
  30. package/dist/createLucideIcon-BO6TDGE7.js +43 -0
  31. package/dist/csharp-CkbgT9vH.cjs +1 -0
  32. package/dist/csharp-jwStnVeK.js +260 -0
  33. package/dist/csp-C2qFd6iv.cjs +1 -0
  34. package/dist/csp-DkO8Np0h.js +46 -0
  35. package/dist/css-BFvwcljm.js +284 -0
  36. package/dist/css-DCKUCzD6.cjs +3 -0
  37. package/dist/cssMode-CU2AJQMM.js +1509 -0
  38. package/dist/cssMode-l7eR8WSG.cjs +4 -0
  39. package/dist/cypher-122TYSjJ.cjs +1 -0
  40. package/dist/cypher-DaQ7hFRL.js +212 -0
  41. package/dist/dart-D8p_2HKP.js +236 -0
  42. package/dist/dart-DshcPGU8.cjs +1 -0
  43. package/dist/dist-DCz_Qv0B.js +884 -0
  44. package/dist/dist-D_2dZQH5.cjs +11 -0
  45. package/dist/dockerfile-CL8dwZCe.cjs +1 -0
  46. package/dist/dockerfile-DKWOQrwp.js +191 -0
  47. package/dist/ecl-DP3PNWGB.js +226 -0
  48. package/dist/ecl-DVx2J_EE.cjs +1 -0
  49. package/dist/editor.api-CbUDOph7.js +70302 -0
  50. package/dist/editor.api-lY2thcaq.cjs +644 -0
  51. package/dist/elixir-Xgx_1krO.cjs +1 -0
  52. package/dist/elixir-e9tDp1p1.js +523 -0
  53. package/dist/filter_label-DRJC3vpe.js +58 -0
  54. package/dist/filter_label-DssaWGpx.cjs +1 -0
  55. package/dist/filter_operators-C-TaTcNc.js +70 -0
  56. package/dist/filter_operators-D0kyB-XI.cjs +1 -0
  57. package/dist/flow9-C9BjpX8h.js +176 -0
  58. package/dist/flow9-DR-EyjYV.cjs +1 -0
  59. package/dist/freemarker2-BTGUjvgA.cjs +3 -0
  60. package/dist/freemarker2-C6Iq5MB-.js +724 -0
  61. package/dist/fsharp-BWm_FISn.js +147 -0
  62. package/dist/fsharp-DaBEigN7.cjs +1 -0
  63. package/dist/go-Xyq33f0v.cjs +1 -0
  64. package/dist/go-cmqV0Vy_.js +165 -0
  65. package/dist/graphql-BkFHHVmI.js +174 -0
  66. package/dist/graphql-Cj7XAy25.cjs +1 -0
  67. package/dist/handlebars-B2b1q7PA.cjs +1 -0
  68. package/dist/handlebars-DGGN9u4Y.js +418 -0
  69. package/dist/hcl-5I-P7bYX.js +219 -0
  70. package/dist/hcl-C3dpBsgU.cjs +1 -0
  71. package/dist/html-RJa-j-qT.js +339 -0
  72. package/dist/html-qfcUzk8e.cjs +1 -0
  73. package/dist/htmlMode-CYIxo4hc.cjs +4 -0
  74. package/dist/htmlMode-DDZ48mdp.js +1520 -0
  75. package/dist/index.cjs +303 -0
  76. package/dist/index.d.ts +4 -0
  77. package/dist/index.js +72895 -0
  78. package/dist/index_pattern_select--iGeA3sP.js +93 -0
  79. package/dist/index_pattern_select-BeN5049F.cjs +1 -0
  80. package/dist/ini-ChENqKh8.cjs +1 -0
  81. package/dist/ini-DSIAxBZt.js +94 -0
  82. package/dist/java-DGeAxsRb.js +173 -0
  83. package/dist/java-LZ6g7weJ.cjs +1 -0
  84. package/dist/javascript-CN5gTHH2.js +19 -0
  85. package/dist/javascript-CZ97a-BN.cjs +1 -0
  86. package/dist/jsonMode-BZDeJMLL.cjs +10 -0
  87. package/dist/jsonMode-DraOl-ka.js +1885 -0
  88. package/dist/julia-BeebccKw.cjs +1 -0
  89. package/dist/julia-CU4CtsP4.js +414 -0
  90. package/dist/kotlin-B8NxXJ89.js +183 -0
  91. package/dist/kotlin-M82nl514.cjs +1 -0
  92. package/dist/less-B4Q3fV9Y.cjs +2 -0
  93. package/dist/less-DbeQQzer.js +242 -0
  94. package/dist/lexon-CXQaaecE.cjs +1 -0
  95. package/dist/lexon-Cw9JuAKc.js +185 -0
  96. package/dist/lib-C9j_E-l0.js +47 -0
  97. package/dist/lib-Chy_6VKj.cjs +1 -0
  98. package/dist/liquid-BYNEOJvX.cjs +1 -0
  99. package/dist/liquid-DvB-d2w7.js +205 -0
  100. package/dist/lodash-C_2NO1eK.cjs +35 -0
  101. package/dist/lodash-D-qGlPRW.js +3769 -0
  102. package/dist/lua-CnG8Tpu2.cjs +1 -0
  103. package/dist/lua-yl5NzA_S.js +200 -0
  104. package/dist/m3-CVcm-OIn.cjs +1 -0
  105. package/dist/m3-CdNAqvIX.js +193 -0
  106. package/dist/markdown-C1h-EuiT.js +262 -0
  107. package/dist/markdown-DrRHDVSU.cjs +1 -0
  108. package/dist/mdx-BbiOYPr2.cjs +1 -0
  109. package/dist/mdx-Fk8VTCUK.js +335 -0
  110. package/dist/mips-DIWpzGF0.js +128 -0
  111. package/dist/mips-D_p8UYQb.cjs +1 -0
  112. package/dist/monaco.contribution-BpuUCejv.cjs +1 -0
  113. package/dist/monaco.contribution-Cq4QrMn0.js +134 -0
  114. package/dist/msdax-BiazpDQ1.js +156 -0
  115. package/dist/msdax-xM1_j20x.cjs +1 -0
  116. package/dist/mysql-DMsJkSnA.cjs +1 -0
  117. package/dist/mysql-DphBFJlP.js +168 -0
  118. package/dist/objective-c-BG02Lrht.cjs +1 -0
  119. package/dist/objective-c-DWZ8Qpyc.js +144 -0
  120. package/dist/pascal-BcvlMOdu.js +176 -0
  121. package/dist/pascal-CnP2Fqes.cjs +1 -0
  122. package/dist/pascaligo-BzDEm-l_.cjs +1 -0
  123. package/dist/pascaligo-DHEp4kzh.js +201 -0
  124. package/dist/perl-USYKPHpO.js +316 -0
  125. package/dist/perl-nIxw-e4R.cjs +1 -0
  126. package/dist/pgsql-Buk6XzVf.cjs +1 -0
  127. package/dist/pgsql-DzPhAh9W.js +158 -0
  128. package/dist/php-B3sFYUqV.cjs +1 -0
  129. package/dist/php-PfpSTefE.js +471 -0
  130. package/dist/pla-CZtnfWl6.cjs +1 -0
  131. package/dist/pla-DrFOZwDB.js +146 -0
  132. package/dist/postiats-4OGxVVUT.js +504 -0
  133. package/dist/postiats-CgJZf83Q.cjs +1 -0
  134. package/dist/powerquery-D9gzk2Dq.cjs +1 -0
  135. package/dist/powerquery-_h9-HEnY.js +190 -0
  136. package/dist/powershell-CZHaQY6z.cjs +1 -0
  137. package/dist/powershell-nOzcY8gy.js +211 -0
  138. package/dist/protobuf-DAgxhnea.js +659 -0
  139. package/dist/protobuf-D_C8Guej.cjs +2 -0
  140. package/dist/public-1PveQco4.js +1756 -0
  141. package/dist/public-D1K7oN7t.cjs +3 -0
  142. package/dist/pug-quEtG4rz.cjs +1 -0
  143. package/dist/pug-raGZNmZ1.js +300 -0
  144. package/dist/python-C45c7K7W.js +260 -0
  145. package/dist/python-CQX8JcT4.cjs +1 -0
  146. package/dist/qsharp-C2jz5tuo.js +143 -0
  147. package/dist/qsharp-CX1SSV_j.cjs +1 -0
  148. package/dist/query_bar_top_row-3UclS1nm.cjs +1 -0
  149. package/dist/query_bar_top_row-CfV4Iu71.cjs +1 -0
  150. package/dist/query_bar_top_row-D6a48VTk.js +11 -0
  151. package/dist/query_bar_top_row-DonV1OzY.js +2930 -0
  152. package/dist/query_string_input-75waAcWy.js +9 -0
  153. package/dist/query_string_input-CHG9w1ze.cjs +1 -0
  154. package/dist/query_string_input-CyPZVKif.js +366 -0
  155. package/dist/query_string_input-SOULY6dl.cjs +1 -0
  156. package/dist/r-CXkPcYYf.js +189 -0
  157. package/dist/r-DpVDQTST.cjs +1 -0
  158. package/dist/razor-BnoJmj1k.js +525 -0
  159. package/dist/razor-DYx4yJJn.cjs +1 -0
  160. package/dist/redis-DsCuCZIT.cjs +1 -0
  161. package/dist/redis-giKZvbbg.js +123 -0
  162. package/dist/redshift-qKVxBsP_.js +158 -0
  163. package/dist/redshift-z5_aUfdC.cjs +1 -0
  164. package/dist/restructuredtext-D0n4pabr.js +287 -0
  165. package/dist/restructuredtext-DdXoKocW.cjs +1 -0
  166. package/dist/ruby-BNrBlpcw.js +527 -0
  167. package/dist/ruby-Dj0sNBey.cjs +1 -0
  168. package/dist/rust-D6mpPoli.js +178 -0
  169. package/dist/rust-DjkW1U4M.cjs +1 -0
  170. package/dist/sb-BCN0JcpS.cjs +1 -0
  171. package/dist/sb-DhS9GhXl.js +143 -0
  172. package/dist/scala-BqxBEpi8.js +551 -0
  173. package/dist/scala-CyXWhZaJ.cjs +1 -0
  174. package/dist/scheme-Bh4oGAk3.js +170 -0
  175. package/dist/scheme-Cs9G6QEE.cjs +1 -0
  176. package/dist/scss-Byf08jwC.js +417 -0
  177. package/dist/scss-Fl7taPuq.cjs +3 -0
  178. package/dist/search_bar-Caqi1NVo.js +1815 -0
  179. package/dist/search_bar-DyO_WsC5.cjs +1 -0
  180. package/dist/services-9wPHk1eh.js +2350 -0
  181. package/dist/services-BPC3fXx4.cjs +7 -0
  182. package/dist/shard_failure_open_modal_button-BYTThYch.js +199 -0
  183. package/dist/shard_failure_open_modal_button-Dx8ML4VE.cjs +2 -0
  184. package/dist/shell-Cw5yNfC4.cjs +1 -0
  185. package/dist/shell-UoRv_tpG.js +223 -0
  186. package/dist/solidity-B5t7Lkol.js +147 -0
  187. package/dist/solidity-BoAzg9X_.cjs +1 -0
  188. package/dist/sophia-BrXXWhvp.js +147 -0
  189. package/dist/sophia-L84Jz6Ow.cjs +1 -0
  190. package/dist/sparql-B8ZTY48u.js +124 -0
  191. package/dist/sparql-D6lnG7vO.cjs +1 -0
  192. package/dist/sql-D_74hUL-.js +171 -0
  193. package/dist/sql-VXdYzIyz.cjs +1 -0
  194. package/dist/src/App.d.ts +2 -0
  195. package/dist/src/components/ResultHeader/Info.d.ts +30 -0
  196. package/dist/src/components/ResultHeader/index.d.ts +13 -0
  197. package/dist/src/components/context.d.ts +82 -0
  198. package/dist/src/components/euiicons.d.ts +1 -0
  199. package/dist/src/components/index.d.ts +8 -0
  200. package/dist/src/main.d.ts +1 -0
  201. package/dist/src/utils/request.d.ts +1 -0
  202. package/dist/src/utils/utils.d.ts +1 -0
  203. package/dist/st-CxJLwAAK.cjs +1 -0
  204. package/dist/st-D8Rdx9Bz.js +476 -0
  205. package/dist/suggestions_component-BBHwbjYT.js +1243 -0
  206. package/dist/suggestions_component-CF4sehth.cjs +77 -0
  207. package/dist/swift-ZBC6wQdc.cjs +1 -0
  208. package/dist/swift-s19Ivx3X.js +213 -0
  209. package/dist/systemverilog-DoSgAb1I.cjs +1 -0
  210. package/dist/systemverilog-fA72PnKj.js +298 -0
  211. package/dist/tcl-B8QLbcxi.js +223 -0
  212. package/dist/tcl-IXmy-lJ0.cjs +1 -0
  213. package/dist/tsMode-BrPRpJvb.js +597 -0
  214. package/dist/tsMode-CNvH6xuC.cjs +11 -0
  215. package/dist/tsup.config.d.ts +2 -0
  216. package/dist/twig-CT2RXmm0.cjs +1 -0
  217. package/dist/twig-Dy7NkzKI.js +388 -0
  218. package/dist/typescript-BRKHcp4S.js +263 -0
  219. package/dist/typescript-Bbw9fxuo.cjs +1 -0
  220. package/dist/typescript-CQjO9XnF.js +3 -0
  221. package/dist/typescript-D6q4AO2z.cjs +1 -0
  222. package/dist/typespec-CkKpvaMv.cjs +1 -0
  223. package/dist/typespec-ndyv0mQx.js +234 -0
  224. package/dist/vb-DET0NIW-.js +260 -0
  225. package/dist/vb-R3Kcrzvd.cjs +1 -0
  226. package/dist/vite.config.d.ts +2 -0
  227. package/dist/wgsl-D5TeQchR.js +145 -0
  228. package/dist/wgsl-FTDBzylH.cjs +298 -0
  229. package/dist/xml-BZjE3dtf.js +136 -0
  230. package/dist/xml-CxbMIueA.cjs +1 -0
  231. package/dist/yaml-Di_6aXC4.js +229 -0
  232. package/dist/yaml-DvaGkWBl.cjs +1 -0
  233. package/package.json +98 -0
@@ -0,0 +1,884 @@
1
+ import { n as __esmMin, r as __export } from "./chunk-CIp4IH9D.js";
2
+ import { t as createLucideIcon } from "./createLucideIcon-BO6TDGE7.js";
3
+ import React, { memo, useCallback, useEffect, useRef, useState } from "react";
4
+ var ListFilter = createLucideIcon("list-filter", [
5
+ ["path", {
6
+ d: "M2 5h20",
7
+ key: "1fs1ex"
8
+ }],
9
+ ["path", {
10
+ d: "M6 12h12",
11
+ key: "8npq4p"
12
+ }],
13
+ ["path", {
14
+ d: "M9 19h6",
15
+ key: "456am0"
16
+ }]
17
+ ]), ResizeObserver_es_exports = /* @__PURE__ */ __export({ default: () => ResizeObserver_es_default });
18
+ function throttle(t, i) {
19
+ var a = !1, o = !1, s = 0;
20
+ function c() {
21
+ a && (a = !1, t()), o && d();
22
+ }
23
+ function u() {
24
+ requestAnimationFrame$1(c);
25
+ }
26
+ function d() {
27
+ var t = Date.now();
28
+ if (a) {
29
+ if (t - s < trailingTimeout) return;
30
+ o = !0;
31
+ } else a = !0, o = !1, setTimeout(u, i);
32
+ s = t;
33
+ }
34
+ return d;
35
+ }
36
+ function toFloat(t) {
37
+ return parseFloat(t) || 0;
38
+ }
39
+ function getBordersSize(t) {
40
+ return [...arguments].slice(1).reduce(function(i, a) {
41
+ var o = t["border-" + a + "-width"];
42
+ return i + toFloat(o);
43
+ }, 0);
44
+ }
45
+ function getPaddings(t) {
46
+ for (var i = [
47
+ "top",
48
+ "right",
49
+ "bottom",
50
+ "left"
51
+ ], a = {}, o = 0, s = i; o < s.length; o++) {
52
+ var c = s[o], u = t["padding-" + c];
53
+ a[c] = toFloat(u);
54
+ }
55
+ return a;
56
+ }
57
+ function getSVGContentRect(t) {
58
+ var i = t.getBBox();
59
+ return createRectInit(0, 0, i.width, i.height);
60
+ }
61
+ function getHTMLElementContentRect(t) {
62
+ var i = t.clientWidth, a = t.clientHeight;
63
+ if (!i && !a) return emptyRect;
64
+ var o = getWindowOf(t).getComputedStyle(t), s = getPaddings(o), c = s.left + s.right, u = s.top + s.bottom, d = toFloat(o.width), f = toFloat(o.height);
65
+ if (o.boxSizing === "border-box" && (Math.round(d + c) !== i && (d -= getBordersSize(o, "left", "right") + c), Math.round(f + u) !== a && (f -= getBordersSize(o, "top", "bottom") + u)), !isDocumentElement(t)) {
66
+ var p = Math.round(d + c) - i, m = Math.round(f + u) - a;
67
+ Math.abs(p) !== 1 && (d -= p), Math.abs(m) !== 1 && (f -= m);
68
+ }
69
+ return createRectInit(s.left, s.top, d, f);
70
+ }
71
+ function isDocumentElement(t) {
72
+ return t === getWindowOf(t).document.documentElement;
73
+ }
74
+ function getContentRect(t) {
75
+ return isBrowser ? isSVGGraphicsElement(t) ? getSVGContentRect(t) : getHTMLElementContentRect(t) : emptyRect;
76
+ }
77
+ function createReadOnlyRect(t) {
78
+ var i = t.x, a = t.y, o = t.width, s = t.height, c = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, u = Object.create(c.prototype);
79
+ return defineConfigurable(u, {
80
+ x: i,
81
+ y: a,
82
+ width: o,
83
+ height: s,
84
+ top: a,
85
+ right: i + o,
86
+ bottom: s + a,
87
+ left: i
88
+ }), u;
89
+ }
90
+ function createRectInit(t, i, a, o) {
91
+ return {
92
+ x: t,
93
+ y: i,
94
+ width: a,
95
+ height: o
96
+ };
97
+ }
98
+ var MapShim, isBrowser, global$1, requestAnimationFrame$1, trailingTimeout, REFRESH_DELAY, transitionKeys, mutationObserverSupported, ResizeObserverController, defineConfigurable, getWindowOf, emptyRect, isSVGGraphicsElement, ResizeObservation, ResizeObserverEntry, ResizeObserverSPI, observers, ResizeObserver, index$1, ResizeObserver_es_default, init_ResizeObserver_es = __esmMin((() => {
99
+ MapShim = (function() {
100
+ if (typeof Map < "u") return Map;
101
+ function t(t, i) {
102
+ var a = -1;
103
+ return t.some(function(t, o) {
104
+ return t[0] === i ? (a = o, !0) : !1;
105
+ }), a;
106
+ }
107
+ return function() {
108
+ function i() {
109
+ this.__entries__ = [];
110
+ }
111
+ return Object.defineProperty(i.prototype, "size", {
112
+ get: function() {
113
+ return this.__entries__.length;
114
+ },
115
+ enumerable: !0,
116
+ configurable: !0
117
+ }), i.prototype.get = function(i) {
118
+ var a = t(this.__entries__, i), o = this.__entries__[a];
119
+ return o && o[1];
120
+ }, i.prototype.set = function(i, a) {
121
+ var o = t(this.__entries__, i);
122
+ ~o ? this.__entries__[o][1] = a : this.__entries__.push([i, a]);
123
+ }, i.prototype.delete = function(i) {
124
+ var a = this.__entries__, o = t(a, i);
125
+ ~o && a.splice(o, 1);
126
+ }, i.prototype.has = function(i) {
127
+ return !!~t(this.__entries__, i);
128
+ }, i.prototype.clear = function() {
129
+ this.__entries__.splice(0);
130
+ }, i.prototype.forEach = function(t, i) {
131
+ i === void 0 && (i = null);
132
+ for (var a = 0, o = this.__entries__; a < o.length; a++) {
133
+ var s = o[a];
134
+ t.call(i, s[1], s[0]);
135
+ }
136
+ }, i;
137
+ }();
138
+ })(), isBrowser = typeof window < "u" && typeof document < "u" && window.document === document, global$1 = (function() {
139
+ return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
140
+ })(), requestAnimationFrame$1 = (function() {
141
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(global$1) : function(t) {
142
+ return setTimeout(function() {
143
+ return t(Date.now());
144
+ }, 1e3 / 60);
145
+ };
146
+ })(), trailingTimeout = 2, REFRESH_DELAY = 20, transitionKeys = [
147
+ "top",
148
+ "right",
149
+ "bottom",
150
+ "left",
151
+ "width",
152
+ "height",
153
+ "size",
154
+ "weight"
155
+ ], mutationObserverSupported = typeof MutationObserver < "u", ResizeObserverController = function() {
156
+ function t() {
157
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
158
+ }
159
+ return t.prototype.addObserver = function(t) {
160
+ ~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
161
+ }, t.prototype.removeObserver = function(t) {
162
+ var i = this.observers_, a = i.indexOf(t);
163
+ ~a && i.splice(a, 1), !i.length && this.connected_ && this.disconnect_();
164
+ }, t.prototype.refresh = function() {
165
+ this.updateObservers_() && this.refresh();
166
+ }, t.prototype.updateObservers_ = function() {
167
+ var t = this.observers_.filter(function(t) {
168
+ return t.gatherActive(), t.hasActive();
169
+ });
170
+ return t.forEach(function(t) {
171
+ return t.broadcastActive();
172
+ }), t.length > 0;
173
+ }, t.prototype.connect_ = function() {
174
+ !isBrowser || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), mutationObserverSupported ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
175
+ attributes: !0,
176
+ childList: !0,
177
+ characterData: !0,
178
+ subtree: !0
179
+ })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
180
+ }, t.prototype.disconnect_ = function() {
181
+ !isBrowser || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
182
+ }, t.prototype.onTransitionEnd_ = function(t) {
183
+ var i = t.propertyName, a = i === void 0 ? "" : i;
184
+ transitionKeys.some(function(t) {
185
+ return !!~a.indexOf(t);
186
+ }) && this.refresh();
187
+ }, t.getInstance = function() {
188
+ return this.instance_ ||= new t(), this.instance_;
189
+ }, t.instance_ = null, t;
190
+ }(), defineConfigurable = (function(t, i) {
191
+ for (var a = 0, o = Object.keys(i); a < o.length; a++) {
192
+ var s = o[a];
193
+ Object.defineProperty(t, s, {
194
+ value: i[s],
195
+ enumerable: !1,
196
+ writable: !1,
197
+ configurable: !0
198
+ });
199
+ }
200
+ return t;
201
+ }), getWindowOf = (function(t) {
202
+ return t && t.ownerDocument && t.ownerDocument.defaultView || global$1;
203
+ }), emptyRect = createRectInit(0, 0, 0, 0), isSVGGraphicsElement = (function() {
204
+ return typeof SVGGraphicsElement < "u" ? function(t) {
205
+ return t instanceof getWindowOf(t).SVGGraphicsElement;
206
+ } : function(t) {
207
+ return t instanceof getWindowOf(t).SVGElement && typeof t.getBBox == "function";
208
+ };
209
+ })(), ResizeObservation = function() {
210
+ function t(t) {
211
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = createRectInit(0, 0, 0, 0), this.target = t;
212
+ }
213
+ return t.prototype.isActive = function() {
214
+ var t = getContentRect(this.target);
215
+ return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
216
+ }, t.prototype.broadcastRect = function() {
217
+ var t = this.contentRect_;
218
+ return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
219
+ }, t;
220
+ }(), ResizeObserverEntry = function() {
221
+ function t(t, i) {
222
+ var a = createReadOnlyRect(i);
223
+ defineConfigurable(this, {
224
+ target: t,
225
+ contentRect: a
226
+ });
227
+ }
228
+ return t;
229
+ }(), ResizeObserverSPI = function() {
230
+ function t(t, i, a) {
231
+ if (this.activeObservations_ = [], this.observations_ = new MapShim(), typeof t != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
232
+ this.callback_ = t, this.controller_ = i, this.callbackCtx_ = a;
233
+ }
234
+ return t.prototype.observe = function(t) {
235
+ if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
236
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
237
+ if (!(t instanceof getWindowOf(t).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
238
+ var i = this.observations_;
239
+ i.has(t) || (i.set(t, new ResizeObservation(t)), this.controller_.addObserver(this), this.controller_.refresh());
240
+ }
241
+ }, t.prototype.unobserve = function(t) {
242
+ if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
243
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
244
+ if (!(t instanceof getWindowOf(t).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
245
+ var i = this.observations_;
246
+ i.has(t) && (i.delete(t), i.size || this.controller_.removeObserver(this));
247
+ }
248
+ }, t.prototype.disconnect = function() {
249
+ this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
250
+ }, t.prototype.gatherActive = function() {
251
+ var t = this;
252
+ this.clearActive(), this.observations_.forEach(function(i) {
253
+ i.isActive() && t.activeObservations_.push(i);
254
+ });
255
+ }, t.prototype.broadcastActive = function() {
256
+ if (this.hasActive()) {
257
+ var t = this.callbackCtx_, i = this.activeObservations_.map(function(t) {
258
+ return new ResizeObserverEntry(t.target, t.broadcastRect());
259
+ });
260
+ this.callback_.call(t, i, t), this.clearActive();
261
+ }
262
+ }, t.prototype.clearActive = function() {
263
+ this.activeObservations_.splice(0);
264
+ }, t.prototype.hasActive = function() {
265
+ return this.activeObservations_.length > 0;
266
+ }, t;
267
+ }(), observers = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new MapShim(), ResizeObserver = function() {
268
+ function t(i) {
269
+ if (!(this instanceof t)) throw TypeError("Cannot call a class as a function.");
270
+ if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
271
+ var a = new ResizeObserverSPI(i, ResizeObserverController.getInstance(), this);
272
+ observers.set(this, a);
273
+ }
274
+ return t;
275
+ }(), [
276
+ "observe",
277
+ "unobserve",
278
+ "disconnect"
279
+ ].forEach(function(t) {
280
+ ResizeObserver.prototype[t] = function() {
281
+ var i;
282
+ return (i = observers.get(this))[t].apply(i, arguments);
283
+ };
284
+ }), index$1 = (function() {
285
+ return global$1.ResizeObserver === void 0 ? ResizeObserver : global$1.ResizeObserver;
286
+ })(), ResizeObserver_es_default = index$1;
287
+ }));
288
+ function _arrayLikeToArray(t, i) {
289
+ (i == null || i > t.length) && (i = t.length);
290
+ for (var a = 0, o = Array(i); a < i; a++) o[a] = t[a];
291
+ return o;
292
+ }
293
+ function _arrayWithHoles(t) {
294
+ if (Array.isArray(t)) return t;
295
+ }
296
+ function _defineProperty$1(t, i, a) {
297
+ return (i = _toPropertyKey(i)) in t ? Object.defineProperty(t, i, {
298
+ value: a,
299
+ enumerable: !0,
300
+ configurable: !0,
301
+ writable: !0
302
+ }) : t[i] = a, t;
303
+ }
304
+ function _iterableToArrayLimit(t, i) {
305
+ var a = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
306
+ if (a != null) {
307
+ var o, s, c, u, d = [], f = !0, p = !1;
308
+ try {
309
+ if (c = (a = a.call(t)).next, i !== 0) for (; !(f = (o = c.call(a)).done) && (d.push(o.value), d.length !== i); f = !0);
310
+ } catch (t) {
311
+ p = !0, s = t;
312
+ } finally {
313
+ try {
314
+ if (!f && a.return != null && (u = a.return(), Object(u) !== u)) return;
315
+ } finally {
316
+ if (p) throw s;
317
+ }
318
+ }
319
+ return d;
320
+ }
321
+ }
322
+ function _nonIterableRest() {
323
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
324
+ }
325
+ function ownKeys$1(t, i) {
326
+ var a = Object.keys(t);
327
+ if (Object.getOwnPropertySymbols) {
328
+ var o = Object.getOwnPropertySymbols(t);
329
+ i && (o = o.filter(function(i) {
330
+ return Object.getOwnPropertyDescriptor(t, i).enumerable;
331
+ })), a.push.apply(a, o);
332
+ }
333
+ return a;
334
+ }
335
+ function _objectSpread2(t) {
336
+ for (var i = 1; i < arguments.length; i++) {
337
+ var a = arguments[i] == null ? {} : arguments[i];
338
+ i % 2 ? ownKeys$1(Object(a), !0).forEach(function(i) {
339
+ _defineProperty$1(t, i, a[i]);
340
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : ownKeys$1(Object(a)).forEach(function(i) {
341
+ Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(a, i));
342
+ });
343
+ }
344
+ return t;
345
+ }
346
+ function _objectWithoutProperties(t, i) {
347
+ if (t == null) return {};
348
+ var a, o, s = _objectWithoutPropertiesLoose(t, i);
349
+ if (Object.getOwnPropertySymbols) {
350
+ var c = Object.getOwnPropertySymbols(t);
351
+ for (o = 0; o < c.length; o++) a = c[o], i.indexOf(a) === -1 && {}.propertyIsEnumerable.call(t, a) && (s[a] = t[a]);
352
+ }
353
+ return s;
354
+ }
355
+ function _objectWithoutPropertiesLoose(t, i) {
356
+ if (t == null) return {};
357
+ var a = {};
358
+ for (var o in t) if ({}.hasOwnProperty.call(t, o)) {
359
+ if (i.indexOf(o) !== -1) continue;
360
+ a[o] = t[o];
361
+ }
362
+ return a;
363
+ }
364
+ function _slicedToArray(t, i) {
365
+ return _arrayWithHoles(t) || _iterableToArrayLimit(t, i) || _unsupportedIterableToArray(t, i) || _nonIterableRest();
366
+ }
367
+ function _toPrimitive(t, i) {
368
+ if (typeof t != "object" || !t) return t;
369
+ var a = t[Symbol.toPrimitive];
370
+ if (a !== void 0) {
371
+ var o = a.call(t, i);
372
+ if (typeof o != "object") return o;
373
+ throw TypeError("@@toPrimitive must return a primitive value.");
374
+ }
375
+ return (i === "string" ? String : Number)(t);
376
+ }
377
+ function _toPropertyKey(t) {
378
+ var i = _toPrimitive(t, "string");
379
+ return typeof i == "symbol" ? i : i + "";
380
+ }
381
+ function _unsupportedIterableToArray(t, i) {
382
+ if (t) {
383
+ if (typeof t == "string") return _arrayLikeToArray(t, i);
384
+ var a = {}.toString.call(t).slice(8, -1);
385
+ return a === "Object" && t.constructor && (a = t.constructor.name), a === "Map" || a === "Set" ? Array.from(t) : a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a) ? _arrayLikeToArray(t, i) : void 0;
386
+ }
387
+ }
388
+ function _defineProperty(t, i, a) {
389
+ return i in t ? Object.defineProperty(t, i, {
390
+ value: a,
391
+ enumerable: !0,
392
+ configurable: !0,
393
+ writable: !0
394
+ }) : t[i] = a, t;
395
+ }
396
+ function ownKeys(t, i) {
397
+ var a = Object.keys(t);
398
+ if (Object.getOwnPropertySymbols) {
399
+ var o = Object.getOwnPropertySymbols(t);
400
+ i && (o = o.filter(function(i) {
401
+ return Object.getOwnPropertyDescriptor(t, i).enumerable;
402
+ })), a.push.apply(a, o);
403
+ }
404
+ return a;
405
+ }
406
+ function _objectSpread2$1(t) {
407
+ for (var i = 1; i < arguments.length; i++) {
408
+ var a = arguments[i] == null ? {} : arguments[i];
409
+ i % 2 ? ownKeys(Object(a), !0).forEach(function(i) {
410
+ _defineProperty(t, i, a[i]);
411
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : ownKeys(Object(a)).forEach(function(i) {
412
+ Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(a, i));
413
+ });
414
+ }
415
+ return t;
416
+ }
417
+ function compose$1() {
418
+ var t = [...arguments];
419
+ return function(i) {
420
+ return t.reduceRight(function(t, i) {
421
+ return i(t);
422
+ }, i);
423
+ };
424
+ }
425
+ function curry$1(t) {
426
+ return function i() {
427
+ var a = this, o = [...arguments];
428
+ return o.length >= t.length ? t.apply(this, o) : function() {
429
+ var t = [...arguments];
430
+ return i.apply(a, [].concat(o, t));
431
+ };
432
+ };
433
+ }
434
+ function isObject$1(t) {
435
+ return {}.toString.call(t).includes("Object");
436
+ }
437
+ function isEmpty(t) {
438
+ return !Object.keys(t).length;
439
+ }
440
+ function isFunction(t) {
441
+ return typeof t == "function";
442
+ }
443
+ function hasOwnProperty(t, i) {
444
+ return Object.prototype.hasOwnProperty.call(t, i);
445
+ }
446
+ function validateChanges(t, i) {
447
+ return isObject$1(i) || errorHandler$1("changeType"), Object.keys(i).some(function(i) {
448
+ return !hasOwnProperty(t, i);
449
+ }) && errorHandler$1("changeField"), i;
450
+ }
451
+ function validateSelector(t) {
452
+ isFunction(t) || errorHandler$1("selectorType");
453
+ }
454
+ function validateHandler(t) {
455
+ isFunction(t) || isObject$1(t) || errorHandler$1("handlerType"), isObject$1(t) && Object.values(t).some(function(t) {
456
+ return !isFunction(t);
457
+ }) && errorHandler$1("handlersType");
458
+ }
459
+ function validateInitial(t) {
460
+ t || errorHandler$1("initialIsRequired"), isObject$1(t) || errorHandler$1("initialType"), isEmpty(t) && errorHandler$1("initialContent");
461
+ }
462
+ function throwError$1(t, i) {
463
+ throw Error(t[i] || t.default);
464
+ }
465
+ var errorHandler$1 = curry$1(throwError$1)({
466
+ initialIsRequired: "initial state is required",
467
+ initialType: "initial state should be an object",
468
+ initialContent: "initial state shouldn't be an empty object",
469
+ handlerType: "handler should be an object or a function",
470
+ handlersType: "all handlers should be a functions",
471
+ selectorType: "selector should be a function",
472
+ changeType: "provided value of changes should be an object",
473
+ changeField: "it seams you want to change a field in the state which is not specified in the \"initial\" state",
474
+ default: "an unknown error accured in `state-local` package"
475
+ }), validators$1 = {
476
+ changes: validateChanges,
477
+ selector: validateSelector,
478
+ handler: validateHandler,
479
+ initial: validateInitial
480
+ };
481
+ function create(t) {
482
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
483
+ validators$1.initial(t), validators$1.handler(i);
484
+ var a = { current: t }, o = curry$1(didStateUpdate)(a, i), s = curry$1(updateState)(a), c = curry$1(validators$1.changes)(t), u = curry$1(extractChanges)(a);
485
+ function d() {
486
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(t) {
487
+ return t;
488
+ };
489
+ return validators$1.selector(t), t(a.current);
490
+ }
491
+ function f(t) {
492
+ compose$1(o, s, c, u)(t);
493
+ }
494
+ return [d, f];
495
+ }
496
+ function extractChanges(t, i) {
497
+ return isFunction(i) ? i(t.current) : i;
498
+ }
499
+ function updateState(t, i) {
500
+ return t.current = _objectSpread2$1(_objectSpread2$1({}, t.current), i), i;
501
+ }
502
+ function didStateUpdate(t, i, a) {
503
+ return isFunction(i) ? i(t.current) : Object.keys(a).forEach(function(a) {
504
+ return i[a]?.call(i, t.current[a]);
505
+ }), a;
506
+ }
507
+ var state_local_default = { create }, config = { paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs" } };
508
+ function curry(t) {
509
+ return function i() {
510
+ var a = this, o = [...arguments];
511
+ return o.length >= t.length ? t.apply(this, o) : function() {
512
+ var t = [...arguments];
513
+ return i.apply(a, [].concat(o, t));
514
+ };
515
+ };
516
+ }
517
+ function isObject(t) {
518
+ return {}.toString.call(t).includes("Object");
519
+ }
520
+ function validateConfig(t) {
521
+ return t || errorHandler("configIsRequired"), isObject(t) || errorHandler("configType"), t.urls ? (informAboutDeprecation(), { paths: { vs: t.urls.monacoBase } }) : t;
522
+ }
523
+ function informAboutDeprecation() {
524
+ console.warn(errorMessages.deprecation);
525
+ }
526
+ function throwError(t, i) {
527
+ throw Error(t[i] || t.default);
528
+ }
529
+ var errorMessages = {
530
+ configIsRequired: "the configuration object is required",
531
+ configType: "the configuration object should be an object",
532
+ default: "an unknown error accured in `@monaco-editor/loader` package",
533
+ deprecation: "Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "
534
+ }, errorHandler = curry(throwError)(errorMessages), validators = { config: validateConfig }, compose = function() {
535
+ var t = [...arguments];
536
+ return function(i) {
537
+ return t.reduceRight(function(t, i) {
538
+ return i(t);
539
+ }, i);
540
+ };
541
+ };
542
+ function merge(t, i) {
543
+ return Object.keys(i).forEach(function(a) {
544
+ i[a] instanceof Object && t[a] && Object.assign(i[a], merge(t[a], i[a]));
545
+ }), _objectSpread2(_objectSpread2({}, t), i);
546
+ }
547
+ var CANCELATION_MESSAGE = {
548
+ type: "cancelation",
549
+ msg: "operation is manually canceled"
550
+ };
551
+ function makeCancelable(t) {
552
+ var i = !1, a = new Promise(function(a, o) {
553
+ t.then(function(t) {
554
+ return i ? o(CANCELATION_MESSAGE) : a(t);
555
+ }), t.catch(o);
556
+ });
557
+ return a.cancel = function() {
558
+ return i = !0;
559
+ }, a;
560
+ }
561
+ var _excluded = ["monaco"], _state$create2 = _slicedToArray(state_local_default.create({
562
+ config,
563
+ isInitialized: !1,
564
+ resolve: null,
565
+ reject: null,
566
+ monaco: null
567
+ }), 2), getState = _state$create2[0], setState = _state$create2[1];
568
+ function config$1(t) {
569
+ var i = validators.config(t), a = i.monaco, o = _objectWithoutProperties(i, _excluded);
570
+ setState(function(t) {
571
+ return {
572
+ config: merge(t.config, o),
573
+ monaco: a
574
+ };
575
+ });
576
+ }
577
+ function init() {
578
+ var t = getState(function(t) {
579
+ return {
580
+ monaco: t.monaco,
581
+ isInitialized: t.isInitialized,
582
+ resolve: t.resolve
583
+ };
584
+ });
585
+ if (!t.isInitialized) {
586
+ if (setState({ isInitialized: !0 }), t.monaco) return t.resolve(t.monaco), makeCancelable(wrapperPromise);
587
+ if (window.monaco && window.monaco.editor) return storeMonacoInstance(window.monaco), t.resolve(window.monaco), makeCancelable(wrapperPromise);
588
+ compose(injectScripts, getMonacoLoaderScript)(configureLoader);
589
+ }
590
+ return makeCancelable(wrapperPromise);
591
+ }
592
+ function injectScripts(t) {
593
+ return document.body.appendChild(t);
594
+ }
595
+ function createScript(t) {
596
+ var i = document.createElement("script");
597
+ return t && (i.src = t), i;
598
+ }
599
+ function getMonacoLoaderScript(t) {
600
+ var i = getState(function(t) {
601
+ return {
602
+ config: t.config,
603
+ reject: t.reject
604
+ };
605
+ }), a = createScript(`${i.config.paths.vs}/loader.js`);
606
+ return a.onload = function() {
607
+ return t();
608
+ }, a.onerror = i.reject, a;
609
+ }
610
+ function configureLoader() {
611
+ var t = getState(function(t) {
612
+ return {
613
+ config: t.config,
614
+ resolve: t.resolve,
615
+ reject: t.reject
616
+ };
617
+ }), i = window.require;
618
+ i.config(t.config), i(["vs/editor/editor.main"], function(i) {
619
+ var a = i.m || i;
620
+ storeMonacoInstance(a), t.resolve(a);
621
+ }, function(i) {
622
+ t.reject(i);
623
+ });
624
+ }
625
+ function storeMonacoInstance(t) {
626
+ getState().monaco || setState({ monaco: t });
627
+ }
628
+ function __getMonacoInstance() {
629
+ return getState(function(t) {
630
+ return t.monaco;
631
+ });
632
+ }
633
+ var wrapperPromise = new Promise(function(t, i) {
634
+ return setState({
635
+ resolve: t,
636
+ reject: i
637
+ });
638
+ }), loader = {
639
+ config: config$1,
640
+ init,
641
+ __getMonacoInstance
642
+ }, v = {
643
+ wrapper: {
644
+ display: "flex",
645
+ position: "relative",
646
+ textAlign: "initial"
647
+ },
648
+ fullWidth: { width: "100%" },
649
+ hide: { display: "none" }
650
+ }, Y = { container: {
651
+ display: "flex",
652
+ height: "100%",
653
+ width: "100%",
654
+ justifyContent: "center",
655
+ alignItems: "center"
656
+ } };
657
+ function Me({ children: t }) {
658
+ return React.createElement("div", { style: Y.container }, t);
659
+ }
660
+ var $ = Me;
661
+ function Ee({ width: t, height: i, isEditorReady: a, loading: s, _ref: c, className: u, wrapperProps: d }) {
662
+ return React.createElement("section", {
663
+ style: {
664
+ ...v.wrapper,
665
+ width: t,
666
+ height: i
667
+ },
668
+ ...d
669
+ }, !a && React.createElement($, null, s), React.createElement("div", {
670
+ ref: c,
671
+ style: {
672
+ ...v.fullWidth,
673
+ ...!a && v.hide
674
+ },
675
+ className: u
676
+ }));
677
+ }
678
+ var H = memo(Ee);
679
+ function Ce(t) {
680
+ useEffect(t, []);
681
+ }
682
+ var k = Ce;
683
+ function he(t, i, a = !0) {
684
+ let o = useRef(!0);
685
+ useEffect(o.current || !a ? () => {
686
+ o.current = !1;
687
+ } : t, i);
688
+ }
689
+ var l = he;
690
+ function D() {}
691
+ function h(t, i, a, o) {
692
+ return De(t, o) || be(t, i, a, o);
693
+ }
694
+ function De(t, i) {
695
+ return t.editor.getModel(te(t, i));
696
+ }
697
+ function be(t, i, a, o) {
698
+ return t.editor.createModel(i, a, o ? te(t, o) : void 0);
699
+ }
700
+ function te(t, i) {
701
+ return t.Uri.parse(i);
702
+ }
703
+ function Oe({ original: t, modified: i, language: a, originalLanguage: s, modifiedLanguage: p, originalModelPath: m, modifiedModelPath: g, keepCurrentOriginalModel: y = !1, keepCurrentModifiedModel: b = !1, theme: x = "light", loading: S = "Loading...", options: C = {}, height: w = "100%", width: T = "100%", className: E, wrapperProps: O = {}, beforeMount: A = D, onMount: j = D }) {
704
+ let [M, N] = useState(!1), [P, F] = useState(!0), I = useRef(null), L = useRef(null), R = useRef(null), z = useRef(j), B = useRef(A), V = useRef(!1);
705
+ k(() => {
706
+ let t = loader.init();
707
+ return t.then((t) => (L.current = t) && F(!1)).catch((t) => t?.type !== "cancelation" && console.error("Monaco initialization: error:", t)), () => I.current ? G() : t.cancel();
708
+ }), l(() => {
709
+ if (I.current && L.current) {
710
+ let i = I.current.getOriginalEditor(), o = h(L.current, t || "", s || a || "text", m || "");
711
+ o !== i.getModel() && i.setModel(o);
712
+ }
713
+ }, [m], M), l(() => {
714
+ if (I.current && L.current) {
715
+ let t = I.current.getModifiedEditor(), o = h(L.current, i || "", p || a || "text", g || "");
716
+ o !== t.getModel() && t.setModel(o);
717
+ }
718
+ }, [g], M), l(() => {
719
+ let t = I.current.getModifiedEditor();
720
+ t.getOption(L.current.editor.EditorOption.readOnly) ? t.setValue(i || "") : i !== t.getValue() && (t.executeEdits("", [{
721
+ range: t.getModel().getFullModelRange(),
722
+ text: i || "",
723
+ forceMoveMarkers: !0
724
+ }]), t.pushUndoStop());
725
+ }, [i], M), l(() => {
726
+ I.current?.getModel()?.original.setValue(t || "");
727
+ }, [t], M), l(() => {
728
+ let { original: t, modified: i } = I.current.getModel();
729
+ L.current.editor.setModelLanguage(t, s || a || "text"), L.current.editor.setModelLanguage(i, p || a || "text");
730
+ }, [
731
+ a,
732
+ s,
733
+ p
734
+ ], M), l(() => {
735
+ L.current?.editor.setTheme(x);
736
+ }, [x], M), l(() => {
737
+ I.current?.updateOptions(C);
738
+ }, [C], M);
739
+ let U = useCallback(() => {
740
+ if (!L.current) return;
741
+ B.current(L.current);
742
+ let o = h(L.current, t || "", s || a || "text", m || ""), c = h(L.current, i || "", p || a || "text", g || "");
743
+ I.current?.setModel({
744
+ original: o,
745
+ modified: c
746
+ });
747
+ }, [
748
+ a,
749
+ i,
750
+ p,
751
+ t,
752
+ s,
753
+ m,
754
+ g
755
+ ]), W = useCallback(() => {
756
+ !V.current && R.current && (I.current = L.current.editor.createDiffEditor(R.current, {
757
+ automaticLayout: !0,
758
+ ...C
759
+ }), U(), L.current?.editor.setTheme(x), N(!0), V.current = !0);
760
+ }, [
761
+ C,
762
+ x,
763
+ U
764
+ ]);
765
+ useEffect(() => {
766
+ M && z.current(I.current, L.current);
767
+ }, [M]), useEffect(() => {
768
+ !P && !M && W();
769
+ }, [
770
+ P,
771
+ M,
772
+ W
773
+ ]);
774
+ function G() {
775
+ let t = I.current?.getModel();
776
+ y || t?.original?.dispose(), b || t?.modified?.dispose(), I.current?.dispose();
777
+ }
778
+ return React.createElement(H, {
779
+ width: T,
780
+ height: w,
781
+ isEditorReady: M,
782
+ loading: S,
783
+ _ref: R,
784
+ className: E,
785
+ wrapperProps: O
786
+ });
787
+ }
788
+ memo(Oe);
789
+ function He(t) {
790
+ let i = useRef();
791
+ return useEffect(() => {
792
+ i.current = t;
793
+ }, [t]), i.current;
794
+ }
795
+ var se = He, _ = /* @__PURE__ */ new Map();
796
+ function Ve({ defaultValue: t, defaultLanguage: i, defaultPath: a, value: s, language: p, path: m, theme: g = "light", line: y, loading: b = "Loading...", options: x = {}, overrideServices: S = {}, saveViewState: C = !0, keepCurrentModel: w = !1, width: T = "100%", height: E = "100%", className: O, wrapperProps: A = {}, beforeMount: j = D, onMount: M = D, onChange: N, onValidate: P = D }) {
797
+ let [F, I] = useState(!1), [L, R] = useState(!0), z = useRef(null), B = useRef(null), V = useRef(null), U = useRef(M), W = useRef(j), G = useRef(), K = useRef(s), q = se(m), J = useRef(!1), X = useRef(!1);
798
+ k(() => {
799
+ let t = loader.init();
800
+ return t.then((t) => (z.current = t) && R(!1)).catch((t) => t?.type !== "cancelation" && console.error("Monaco initialization: error:", t)), () => B.current ? Q() : t.cancel();
801
+ }), l(() => {
802
+ let o = h(z.current, t || s || "", i || p || "", m || a || "");
803
+ o !== B.current?.getModel() && (C && _.set(q, B.current?.saveViewState()), B.current?.setModel(o), C && B.current?.restoreViewState(_.get(m)));
804
+ }, [m], F), l(() => {
805
+ B.current?.updateOptions(x);
806
+ }, [x], F), l(() => {
807
+ !B.current || s === void 0 || (B.current.getOption(z.current.editor.EditorOption.readOnly) ? B.current.setValue(s) : s !== B.current.getValue() && (X.current = !0, B.current.executeEdits("", [{
808
+ range: B.current.getModel().getFullModelRange(),
809
+ text: s,
810
+ forceMoveMarkers: !0
811
+ }]), B.current.pushUndoStop(), X.current = !1));
812
+ }, [s], F), l(() => {
813
+ let t = B.current?.getModel();
814
+ t && p && z.current?.editor.setModelLanguage(t, p);
815
+ }, [p], F), l(() => {
816
+ y !== void 0 && B.current?.revealLine(y);
817
+ }, [y], F), l(() => {
818
+ z.current?.editor.setTheme(g);
819
+ }, [g], F);
820
+ let Z = useCallback(() => {
821
+ if (!(!V.current || !z.current) && !J.current) {
822
+ W.current(z.current);
823
+ let o = m || a, c = h(z.current, s || t || "", i || p || "", o || "");
824
+ B.current = z.current?.editor.create(V.current, {
825
+ model: c,
826
+ automaticLayout: !0,
827
+ ...x
828
+ }, S), C && B.current.restoreViewState(_.get(o)), z.current.editor.setTheme(g), y !== void 0 && B.current.revealLine(y), I(!0), J.current = !0;
829
+ }
830
+ }, [
831
+ t,
832
+ i,
833
+ a,
834
+ s,
835
+ p,
836
+ m,
837
+ x,
838
+ S,
839
+ C,
840
+ g,
841
+ y
842
+ ]);
843
+ useEffect(() => {
844
+ F && U.current(B.current, z.current);
845
+ }, [F]), useEffect(() => {
846
+ !L && !F && Z();
847
+ }, [
848
+ L,
849
+ F,
850
+ Z
851
+ ]), K.current = s, useEffect(() => {
852
+ F && N && (G.current?.dispose(), G.current = B.current?.onDidChangeModelContent((t) => {
853
+ X.current || N(B.current.getValue(), t);
854
+ }));
855
+ }, [F, N]), useEffect(() => {
856
+ if (F) {
857
+ let t = z.current.editor.onDidChangeMarkers((t) => {
858
+ let i = B.current.getModel()?.uri;
859
+ if (i && t.find((t) => t.path === i.path)) {
860
+ let t = z.current.editor.getModelMarkers({ resource: i });
861
+ P?.(t);
862
+ }
863
+ });
864
+ return () => {
865
+ t?.dispose();
866
+ };
867
+ }
868
+ return () => {};
869
+ }, [F, P]);
870
+ function Q() {
871
+ G.current?.dispose(), w ? C && _.set(m, B.current.saveViewState()) : B.current.getModel()?.dispose(), B.current.dispose();
872
+ }
873
+ return React.createElement(H, {
874
+ width: T,
875
+ height: E,
876
+ isEditorReady: F,
877
+ loading: b,
878
+ _ref: V,
879
+ className: O,
880
+ wrapperProps: A
881
+ });
882
+ }
883
+ var Ft = memo(Ve);
884
+ export { init_ResizeObserver_es as a, ResizeObserver_es_exports as i, loader as n, ListFilter as o, ResizeObserver_es_default as r, Ft as t };