markstream-react 0.0.2 → 0.0.3-beta.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 (2) hide show
  1. package/dist/index.js +1407 -1387
  2. package/package.json +10 -9
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import jt, { useMemo as W, useState as B, createContext as Ur, useContext as Kr, useRef as S, useEffect as F, useCallback as D, useLayoutEffect as Yr, useSyncExternalStore as qr } from "react";
1
+ import Ct, { useMemo as H, useState as P, createContext as Ur, useContext as Kr, useRef as R, useEffect as W, useCallback as D, useLayoutEffect as Yr, useSyncExternalStore as qr } from "react";
2
2
  import { getMarkdown as Jt, parseMarkdownToStructure as Gr } from "stream-markdown-parser";
3
3
  import { autoUpdate as Mr, computePosition as Er, offset as Tr, flip as Rr, shift as Sr } from "@floating-ui/dom";
4
4
  import { createPortal as ir } from "react-dom";
@@ -7,13 +7,13 @@ var dr;
7
7
  function Jr() {
8
8
  if (dr) return Rt;
9
9
  dr = 1;
10
- var t = jt, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
11
- function c(d, s, g) {
10
+ var t = Ct, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
11
+ function c(m, s, g) {
12
12
  var f, h = {}, C = null, w = null;
13
13
  g !== void 0 && (C = "" + g), s.key !== void 0 && (C = "" + s.key), s.ref !== void 0 && (w = s.ref);
14
- for (f in s) o.call(s, f) && !l.hasOwnProperty(f) && (h[f] = s[f]);
15
- if (d && d.defaultProps) for (f in s = d.defaultProps, s) h[f] === void 0 && (h[f] = s[f]);
16
- return { $$typeof: e, type: d, key: C, ref: w, props: h, _owner: a.current };
14
+ for (f in s) o.call(s, f) && !u.hasOwnProperty(f) && (h[f] = s[f]);
15
+ if (m && m.defaultProps) for (f in s = m.defaultProps, s) h[f] === void 0 && (h[f] = s[f]);
16
+ return { $$typeof: e, type: m, key: C, ref: w, props: h, _owner: a.current };
17
17
  }
18
18
  return Rt.Fragment = r, Rt.jsx = c, Rt.jsxs = c, Rt;
19
19
  }
@@ -21,48 +21,48 @@ var St = {};
21
21
  var mr;
22
22
  function Zr() {
23
23
  return mr || (mr = 1, process.env.NODE_ENV !== "production" && (function() {
24
- var t = jt, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.portal"), o = /* @__PURE__ */ Symbol.for("react.fragment"), a = /* @__PURE__ */ Symbol.for("react.strict_mode"), l = /* @__PURE__ */ Symbol.for("react.profiler"), c = /* @__PURE__ */ Symbol.for("react.provider"), d = /* @__PURE__ */ Symbol.for("react.context"), s = /* @__PURE__ */ Symbol.for("react.forward_ref"), g = /* @__PURE__ */ Symbol.for("react.suspense"), f = /* @__PURE__ */ Symbol.for("react.suspense_list"), h = /* @__PURE__ */ Symbol.for("react.memo"), C = /* @__PURE__ */ Symbol.for("react.lazy"), w = /* @__PURE__ */ Symbol.for("react.offscreen"), y = Symbol.iterator, N = "@@iterator";
25
- function A(i) {
24
+ var t = Ct, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.portal"), o = /* @__PURE__ */ Symbol.for("react.fragment"), a = /* @__PURE__ */ Symbol.for("react.strict_mode"), u = /* @__PURE__ */ Symbol.for("react.profiler"), c = /* @__PURE__ */ Symbol.for("react.provider"), m = /* @__PURE__ */ Symbol.for("react.context"), s = /* @__PURE__ */ Symbol.for("react.forward_ref"), g = /* @__PURE__ */ Symbol.for("react.suspense"), f = /* @__PURE__ */ Symbol.for("react.suspense_list"), h = /* @__PURE__ */ Symbol.for("react.memo"), C = /* @__PURE__ */ Symbol.for("react.lazy"), w = /* @__PURE__ */ Symbol.for("react.offscreen"), x = Symbol.iterator, S = "@@iterator";
25
+ function O(i) {
26
26
  if (i === null || typeof i != "object")
27
27
  return null;
28
- var p = y && i[y] || i[N];
28
+ var p = x && i[x] || i[S];
29
29
  return typeof p == "function" ? p : null;
30
30
  }
31
31
  var L = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
32
32
  function M(i) {
33
33
  {
34
- for (var p = arguments.length, k = new Array(p > 1 ? p - 1 : 0), R = 1; R < p; R++)
35
- k[R - 1] = arguments[R];
34
+ for (var p = arguments.length, k = new Array(p > 1 ? p - 1 : 0), _ = 1; _ < p; _++)
35
+ k[_ - 1] = arguments[_];
36
36
  I("error", i, k);
37
37
  }
38
38
  }
39
39
  function I(i, p, k) {
40
40
  {
41
- var R = L.ReactDebugCurrentFrame, se = R.getStackAddendum();
42
- se !== "" && (p += "%s", k = k.concat([se]));
43
- var ge = k.map(function(Q) {
44
- return String(Q);
41
+ var _ = L.ReactDebugCurrentFrame, ee = _.getStackAddendum();
42
+ ee !== "" && (p += "%s", k = k.concat([ee]));
43
+ var se = k.map(function(G) {
44
+ return String(G);
45
45
  });
46
- ge.unshift("Warning: " + p), Function.prototype.apply.call(console[i], console, ge);
46
+ se.unshift("Warning: " + p), Function.prototype.apply.call(console[i], console, se);
47
47
  }
48
48
  }
49
- var O = !1, re = !1, ue = !1, de = !1, me = !1, oe;
50
- oe = /* @__PURE__ */ Symbol.for("react.module.reference");
49
+ var $ = !1, te = !1, ue = !1, ie = !1, de = !1, ce;
50
+ ce = /* @__PURE__ */ Symbol.for("react.module.reference");
51
51
  function Se(i) {
52
- return !!(typeof i == "string" || typeof i == "function" || i === o || i === l || me || i === a || i === g || i === f || de || i === w || O || re || ue || typeof i == "object" && i !== null && (i.$$typeof === C || i.$$typeof === h || i.$$typeof === c || i.$$typeof === d || i.$$typeof === s || // This needs to include all possible module reference object
52
+ return !!(typeof i == "string" || typeof i == "function" || i === o || i === u || de || i === a || i === g || i === f || ie || i === w || $ || te || ue || typeof i == "object" && i !== null && (i.$$typeof === C || i.$$typeof === h || i.$$typeof === c || i.$$typeof === m || i.$$typeof === s || // This needs to include all possible module reference object
53
53
  // types supported by any Flight configuration anywhere since
54
54
  // we don't know which Flight build this will end up being used
55
55
  // with.
56
- i.$$typeof === oe || i.getModuleId !== void 0));
56
+ i.$$typeof === ce || i.getModuleId !== void 0));
57
57
  }
58
- function U(i, p, k) {
59
- var R = i.displayName;
60
- if (R)
61
- return R;
62
- var se = p.displayName || p.name || "";
63
- return se !== "" ? k + "(" + se + ")" : k;
58
+ function V(i, p, k) {
59
+ var _ = i.displayName;
60
+ if (_)
61
+ return _;
62
+ var ee = p.displayName || p.name || "";
63
+ return ee !== "" ? k + "(" + ee + ")" : k;
64
64
  }
65
- function ce(i) {
65
+ function re(i) {
66
66
  return i.displayName || "Context";
67
67
  }
68
68
  function we(i) {
@@ -77,7 +77,7 @@ function Zr() {
77
77
  return "Fragment";
78
78
  case r:
79
79
  return "Portal";
80
- case l:
80
+ case u:
81
81
  return "Profiler";
82
82
  case a:
83
83
  return "StrictMode";
@@ -88,21 +88,21 @@ function Zr() {
88
88
  }
89
89
  if (typeof i == "object")
90
90
  switch (i.$$typeof) {
91
- case d:
91
+ case m:
92
92
  var p = i;
93
- return ce(p) + ".Consumer";
93
+ return re(p) + ".Consumer";
94
94
  case c:
95
95
  var k = i;
96
- return ce(k._context) + ".Provider";
96
+ return re(k._context) + ".Provider";
97
97
  case s:
98
- return U(i, i.render, "ForwardRef");
98
+ return V(i, i.render, "ForwardRef");
99
99
  case h:
100
- var R = i.displayName || null;
101
- return R !== null ? R : we(i.type) || "Memo";
100
+ var _ = i.displayName || null;
101
+ return _ !== null ? _ : we(i.type) || "Memo";
102
102
  case C: {
103
- var se = i, ge = se._payload, Q = se._init;
103
+ var ee = i, se = ee._payload, G = ee._init;
104
104
  try {
105
- return we(Q(ge));
105
+ return we(G(se));
106
106
  } catch {
107
107
  return null;
108
108
  }
@@ -110,18 +110,18 @@ function Zr() {
110
110
  }
111
111
  return null;
112
112
  }
113
- var J = Object.assign, K = 0, Ne, ye, Ae, ee, ne, xe, He;
114
- function ie() {
113
+ var q = Object.assign, ye = 0, $e, oe, Ne, X, ne, ve, Fe;
114
+ function ae() {
115
115
  }
116
- ie.__reactDisabledLog = !0;
116
+ ae.__reactDisabledLog = !0;
117
117
  function st() {
118
118
  {
119
- if (K === 0) {
120
- Ne = console.log, ye = console.info, Ae = console.warn, ee = console.error, ne = console.group, xe = console.groupCollapsed, He = console.groupEnd;
119
+ if (ye === 0) {
120
+ $e = console.log, oe = console.info, Ne = console.warn, X = console.error, ne = console.group, ve = console.groupCollapsed, Fe = console.groupEnd;
121
121
  var i = {
122
122
  configurable: !0,
123
123
  enumerable: !0,
124
- value: ie,
124
+ value: ae,
125
125
  writable: !0
126
126
  };
127
127
  Object.defineProperties(console, {
@@ -134,229 +134,229 @@ function Zr() {
134
134
  groupEnd: i
135
135
  });
136
136
  }
137
- K++;
137
+ ye++;
138
138
  }
139
139
  }
140
- function Ze() {
140
+ function Je() {
141
141
  {
142
- if (K--, K === 0) {
142
+ if (ye--, ye === 0) {
143
143
  var i = {
144
144
  configurable: !0,
145
145
  enumerable: !0,
146
146
  writable: !0
147
147
  };
148
148
  Object.defineProperties(console, {
149
- log: J({}, i, {
150
- value: Ne
149
+ log: q({}, i, {
150
+ value: $e
151
151
  }),
152
- info: J({}, i, {
153
- value: ye
152
+ info: q({}, i, {
153
+ value: oe
154
154
  }),
155
- warn: J({}, i, {
156
- value: Ae
155
+ warn: q({}, i, {
156
+ value: Ne
157
157
  }),
158
- error: J({}, i, {
159
- value: ee
158
+ error: q({}, i, {
159
+ value: X
160
160
  }),
161
- group: J({}, i, {
161
+ group: q({}, i, {
162
162
  value: ne
163
163
  }),
164
- groupCollapsed: J({}, i, {
165
- value: xe
164
+ groupCollapsed: q({}, i, {
165
+ value: ve
166
166
  }),
167
- groupEnd: J({}, i, {
168
- value: He
167
+ groupEnd: q({}, i, {
168
+ value: Fe
169
169
  })
170
170
  });
171
171
  }
172
- K < 0 && M("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
172
+ ye < 0 && M("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
173
173
  }
174
174
  }
175
- var Ue = L.ReactCurrentDispatcher, x;
176
- function _e(i, p, k) {
175
+ var We = L.ReactCurrentDispatcher, y;
176
+ function De(i, p, k) {
177
177
  {
178
- if (x === void 0)
178
+ if (y === void 0)
179
179
  try {
180
180
  throw Error();
181
- } catch (se) {
182
- var R = se.stack.trim().match(/\n( *(at )?)/);
183
- x = R && R[1] || "";
181
+ } catch (ee) {
182
+ var _ = ee.stack.trim().match(/\n( *(at )?)/);
183
+ y = _ && _[1] || "";
184
184
  }
185
185
  return `
186
- ` + x + i;
186
+ ` + y + i;
187
187
  }
188
188
  }
189
- var be = !1, Le;
189
+ var be = !1, _e;
190
190
  {
191
- var fe = typeof WeakMap == "function" ? WeakMap : Map;
192
- Le = new fe();
191
+ var He = typeof WeakMap == "function" ? WeakMap : Map;
192
+ _e = new He();
193
193
  }
194
- function gt(i, p) {
194
+ function ut(i, p) {
195
195
  if (!i || be)
196
196
  return "";
197
197
  {
198
- var k = Le.get(i);
198
+ var k = _e.get(i);
199
199
  if (k !== void 0)
200
200
  return k;
201
201
  }
202
- var R;
202
+ var _;
203
203
  be = !0;
204
- var se = Error.prepareStackTrace;
204
+ var ee = Error.prepareStackTrace;
205
205
  Error.prepareStackTrace = void 0;
206
- var ge;
207
- ge = Ue.current, Ue.current = null, st();
206
+ var se;
207
+ se = We.current, We.current = null, st();
208
208
  try {
209
209
  if (p) {
210
- var Q = function() {
210
+ var G = function() {
211
211
  throw Error();
212
212
  };
213
- if (Object.defineProperty(Q.prototype, "props", {
213
+ if (Object.defineProperty(G.prototype, "props", {
214
214
  set: function() {
215
215
  throw Error();
216
216
  }
217
217
  }), typeof Reflect == "object" && Reflect.construct) {
218
218
  try {
219
- Reflect.construct(Q, []);
220
- } catch (Je) {
221
- R = Je;
219
+ Reflect.construct(G, []);
220
+ } catch (Qe) {
221
+ _ = Qe;
222
222
  }
223
- Reflect.construct(i, [], Q);
223
+ Reflect.construct(i, [], G);
224
224
  } else {
225
225
  try {
226
- Q.call();
227
- } catch (Je) {
228
- R = Je;
226
+ G.call();
227
+ } catch (Qe) {
228
+ _ = Qe;
229
229
  }
230
- i.call(Q.prototype);
230
+ i.call(G.prototype);
231
231
  }
232
232
  } else {
233
233
  try {
234
234
  throw Error();
235
- } catch (Je) {
236
- R = Je;
235
+ } catch (Qe) {
236
+ _ = Qe;
237
237
  }
238
238
  i();
239
239
  }
240
- } catch (Je) {
241
- if (Je && R && typeof Je.stack == "string") {
242
- for (var G = Je.stack.split(`
243
- `), Ye = R.stack.split(`
244
- `), Te = G.length - 1, Be = Ye.length - 1; Te >= 1 && Be >= 0 && G[Te] !== Ye[Be]; )
245
- Be--;
246
- for (; Te >= 1 && Be >= 0; Te--, Be--)
247
- if (G[Te] !== Ye[Be]) {
248
- if (Te !== 1 || Be !== 1)
240
+ } catch (Qe) {
241
+ if (Qe && _ && typeof Qe.stack == "string") {
242
+ for (var K = Qe.stack.split(`
243
+ `), Ae = _.stack.split(`
244
+ `), ke = K.length - 1, Ce = Ae.length - 1; ke >= 1 && Ce >= 0 && K[ke] !== Ae[Ce]; )
245
+ Ce--;
246
+ for (; ke >= 1 && Ce >= 0; ke--, Ce--)
247
+ if (K[ke] !== Ae[Ce]) {
248
+ if (ke !== 1 || Ce !== 1)
249
249
  do
250
- if (Te--, Be--, Be < 0 || G[Te] !== Ye[Be]) {
251
- var ot = `
252
- ` + G[Te].replace(" at new ", " at ");
253
- return i.displayName && ot.includes("<anonymous>") && (ot = ot.replace("<anonymous>", i.displayName)), typeof i == "function" && Le.set(i, ot), ot;
250
+ if (ke--, Ce--, Ce < 0 || K[ke] !== Ae[Ce]) {
251
+ var Ye = `
252
+ ` + K[ke].replace(" at new ", " at ");
253
+ return i.displayName && Ye.includes("<anonymous>") && (Ye = Ye.replace("<anonymous>", i.displayName)), typeof i == "function" && _e.set(i, Ye), Ye;
254
254
  }
255
- while (Te >= 1 && Be >= 0);
255
+ while (ke >= 1 && Ce >= 0);
256
256
  break;
257
257
  }
258
258
  }
259
259
  } finally {
260
- be = !1, Ue.current = ge, Ze(), Error.prepareStackTrace = se;
260
+ be = !1, We.current = se, Je(), Error.prepareStackTrace = ee;
261
261
  }
262
- var Ct = i ? i.displayName || i.name : "", bt = Ct ? _e(Ct) : "";
263
- return typeof i == "function" && Le.set(i, bt), bt;
262
+ var ot = i ? i.displayName || i.name : "", tt = ot ? De(ot) : "";
263
+ return typeof i == "function" && _e.set(i, tt), tt;
264
264
  }
265
- function ve(i, p, k) {
266
- return gt(i, !1);
265
+ function xe(i, p, k) {
266
+ return ut(i, !1);
267
267
  }
268
- function pt(i) {
268
+ function vt(i) {
269
269
  var p = i.prototype;
270
270
  return !!(p && p.isReactComponent);
271
271
  }
272
- function qe(i, p, k) {
272
+ function fe(i, p, k) {
273
273
  if (i == null)
274
274
  return "";
275
275
  if (typeof i == "function")
276
- return gt(i, pt(i));
276
+ return ut(i, vt(i));
277
277
  if (typeof i == "string")
278
- return _e(i);
278
+ return De(i);
279
279
  switch (i) {
280
280
  case g:
281
- return _e("Suspense");
281
+ return De("Suspense");
282
282
  case f:
283
- return _e("SuspenseList");
283
+ return De("SuspenseList");
284
284
  }
285
285
  if (typeof i == "object")
286
286
  switch (i.$$typeof) {
287
287
  case s:
288
- return ve(i.render);
288
+ return xe(i.render);
289
289
  case h:
290
- return qe(i.type, p, k);
290
+ return fe(i.type, p, k);
291
291
  case C: {
292
- var R = i, se = R._payload, ge = R._init;
292
+ var _ = i, ee = _._payload, se = _._init;
293
293
  try {
294
- return qe(ge(se), p, k);
294
+ return fe(se(ee), p, k);
295
295
  } catch {
296
296
  }
297
297
  }
298
298
  }
299
299
  return "";
300
300
  }
301
- var ze = Object.prototype.hasOwnProperty, $ = {}, De = L.ReactDebugCurrentFrame;
302
- function Qe(i) {
301
+ var Xe = Object.prototype.hasOwnProperty, Le = {}, Ie = L.ReactDebugCurrentFrame;
302
+ function U(i) {
303
303
  if (i) {
304
- var p = i._owner, k = qe(i.type, i._source, p ? p.type : null);
305
- De.setExtraStackFrame(k);
304
+ var p = i._owner, k = fe(i.type, i._source, p ? p.type : null);
305
+ Ie.setExtraStackFrame(k);
306
306
  } else
307
- De.setExtraStackFrame(null);
307
+ Ie.setExtraStackFrame(null);
308
308
  }
309
- function Oe(i, p, k, R, se) {
309
+ function Ue(i, p, k, _, ee) {
310
310
  {
311
- var ge = Function.call.bind(ze);
312
- for (var Q in i)
313
- if (ge(i, Q)) {
314
- var G = void 0;
311
+ var se = Function.call.bind(Xe);
312
+ for (var G in i)
313
+ if (se(i, G)) {
314
+ var K = void 0;
315
315
  try {
316
- if (typeof i[Q] != "function") {
317
- var Ye = Error((R || "React class") + ": " + k + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
318
- throw Ye.name = "Invariant Violation", Ye;
316
+ if (typeof i[G] != "function") {
317
+ var Ae = Error((_ || "React class") + ": " + k + " type `" + G + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[G] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
318
+ throw Ae.name = "Invariant Violation", Ae;
319
319
  }
320
- G = i[Q](p, Q, R, k, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
321
- } catch (Te) {
322
- G = Te;
320
+ K = i[G](p, G, _, k, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
321
+ } catch (ke) {
322
+ K = ke;
323
323
  }
324
- G && !(G instanceof Error) && (Qe(se), M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", R || "React class", k, Q, typeof G), Qe(null)), G instanceof Error && !(G.message in $) && ($[G.message] = !0, Qe(se), M("Failed %s type: %s", k, G.message), Qe(null));
324
+ K && !(K instanceof Error) && (U(ee), M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _ || "React class", k, G, typeof K), U(null)), K instanceof Error && !(K.message in Le) && (Le[K.message] = !0, U(ee), M("Failed %s type: %s", k, K.message), U(null));
325
325
  }
326
326
  }
327
327
  }
328
- var ct = Array.isArray;
329
- function rt(i) {
330
- return ct(i);
328
+ var bt = Array.isArray;
329
+ function Ge(i) {
330
+ return bt(i);
331
331
  }
332
- function $e(i) {
332
+ function et(i) {
333
333
  {
334
334
  var p = typeof Symbol == "function" && Symbol.toStringTag, k = p && i[Symbol.toStringTag] || i.constructor.name || "Object";
335
335
  return k;
336
336
  }
337
337
  }
338
- function je(i) {
338
+ function Me(i) {
339
339
  try {
340
- return et(i), !1;
340
+ return ze(i), !1;
341
341
  } catch {
342
342
  return !0;
343
343
  }
344
344
  }
345
- function et(i) {
345
+ function ze(i) {
346
346
  return "" + i;
347
347
  }
348
- function ut(i) {
349
- if (je(i))
350
- return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", $e(i)), et(i);
348
+ function dt(i) {
349
+ if (Me(i))
350
+ return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", et(i)), ze(i);
351
351
  }
352
- var he = L.ReactCurrentOwner, tt = {
352
+ var ct = L.ReactCurrentOwner, Ke = {
353
353
  key: !0,
354
354
  ref: !0,
355
355
  __self: !0,
356
356
  __source: !0
357
- }, wt, Ke;
358
- function nt(i) {
359
- if (ze.call(i, "ref")) {
357
+ }, mt, le;
358
+ function rt(i) {
359
+ if (Xe.call(i, "ref")) {
360
360
  var p = Object.getOwnPropertyDescriptor(i, "ref").get;
361
361
  if (p && p.isReactWarning)
362
362
  return !1;
@@ -364,7 +364,7 @@ function Zr() {
364
364
  return i.ref !== void 0;
365
365
  }
366
366
  function b(i) {
367
- if (ze.call(i, "key")) {
367
+ if (Xe.call(i, "key")) {
368
368
  var p = Object.getOwnPropertyDescriptor(i, "key").get;
369
369
  if (p && p.isReactWarning)
370
370
  return !1;
@@ -372,12 +372,12 @@ function Zr() {
372
372
  return i.key !== void 0;
373
373
  }
374
374
  function j(i, p) {
375
- typeof i.ref == "string" && he.current;
375
+ typeof i.ref == "string" && ct.current;
376
376
  }
377
- function T(i, p) {
377
+ function N(i, p) {
378
378
  {
379
379
  var k = function() {
380
- wt || (wt = !0, M("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
380
+ mt || (mt = !0, M("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
381
381
  };
382
382
  k.isReactWarning = !0, Object.defineProperty(i, "key", {
383
383
  get: k,
@@ -385,10 +385,10 @@ function Zr() {
385
385
  });
386
386
  }
387
387
  }
388
- function V(i, p) {
388
+ function z(i, p) {
389
389
  {
390
390
  var k = function() {
391
- Ke || (Ke = !0, M("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
391
+ le || (le = !0, M("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
392
392
  };
393
393
  k.isReactWarning = !0, Object.defineProperty(i, "ref", {
394
394
  get: k,
@@ -396,70 +396,70 @@ function Zr() {
396
396
  });
397
397
  }
398
398
  }
399
- var Y = function(i, p, k, R, se, ge, Q) {
400
- var G = {
399
+ var Z = function(i, p, k, _, ee, se, G) {
400
+ var K = {
401
401
  // This tag allows us to uniquely identify this as a React Element
402
402
  $$typeof: e,
403
403
  // Built-in properties that belong on the element
404
404
  type: i,
405
405
  key: p,
406
406
  ref: k,
407
- props: Q,
407
+ props: G,
408
408
  // Record the component responsible for creating this element.
409
- _owner: ge
409
+ _owner: se
410
410
  };
411
- return G._store = {}, Object.defineProperty(G._store, "validated", {
411
+ return K._store = {}, Object.defineProperty(K._store, "validated", {
412
412
  configurable: !1,
413
413
  enumerable: !1,
414
414
  writable: !0,
415
415
  value: !1
416
- }), Object.defineProperty(G, "_self", {
416
+ }), Object.defineProperty(K, "_self", {
417
417
  configurable: !1,
418
418
  enumerable: !1,
419
419
  writable: !1,
420
- value: R
421
- }), Object.defineProperty(G, "_source", {
420
+ value: _
421
+ }), Object.defineProperty(K, "_source", {
422
422
  configurable: !1,
423
423
  enumerable: !1,
424
424
  writable: !1,
425
- value: se
426
- }), Object.freeze && (Object.freeze(G.props), Object.freeze(G)), G;
425
+ value: ee
426
+ }), Object.freeze && (Object.freeze(K.props), Object.freeze(K)), K;
427
427
  };
428
- function le(i, p, k, R, se) {
428
+ function Q(i, p, k, _, ee) {
429
429
  {
430
- var ge, Q = {}, G = null, Ye = null;
431
- k !== void 0 && (ut(k), G = "" + k), b(p) && (ut(p.key), G = "" + p.key), nt(p) && (Ye = p.ref, j(p, se));
432
- for (ge in p)
433
- ze.call(p, ge) && !tt.hasOwnProperty(ge) && (Q[ge] = p[ge]);
430
+ var se, G = {}, K = null, Ae = null;
431
+ k !== void 0 && (dt(k), K = "" + k), b(p) && (dt(p.key), K = "" + p.key), rt(p) && (Ae = p.ref, j(p, ee));
432
+ for (se in p)
433
+ Xe.call(p, se) && !Ke.hasOwnProperty(se) && (G[se] = p[se]);
434
434
  if (i && i.defaultProps) {
435
- var Te = i.defaultProps;
436
- for (ge in Te)
437
- Q[ge] === void 0 && (Q[ge] = Te[ge]);
435
+ var ke = i.defaultProps;
436
+ for (se in ke)
437
+ G[se] === void 0 && (G[se] = ke[se]);
438
438
  }
439
- if (G || Ye) {
440
- var Be = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
441
- G && T(Q, Be), Ye && V(Q, Be);
439
+ if (K || Ae) {
440
+ var Ce = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
441
+ K && N(G, Ce), Ae && z(G, Ce);
442
442
  }
443
- return Y(i, G, Ye, se, R, he.current, Q);
443
+ return Z(i, K, Ae, ee, _, ct.current, G);
444
444
  }
445
445
  }
446
- var Z = L.ReactCurrentOwner, ae = L.ReactDebugCurrentFrame;
447
- function Fe(i) {
446
+ var je = L.ReactCurrentOwner, Be = L.ReactDebugCurrentFrame;
447
+ function Te(i) {
448
448
  if (i) {
449
- var p = i._owner, k = qe(i.type, i._source, p ? p.type : null);
450
- ae.setExtraStackFrame(k);
449
+ var p = i._owner, k = fe(i.type, i._source, p ? p.type : null);
450
+ Be.setExtraStackFrame(k);
451
451
  } else
452
- ae.setExtraStackFrame(null);
452
+ Be.setExtraStackFrame(null);
453
453
  }
454
- var Ge;
455
- Ge = !1;
456
- function ke(i) {
454
+ var he;
455
+ he = !1;
456
+ function J(i) {
457
457
  return typeof i == "object" && i !== null && i.$$typeof === e;
458
458
  }
459
- function u() {
459
+ function Ze() {
460
460
  {
461
- if (Z.current) {
462
- var i = we(Z.current.type);
461
+ if (je.current) {
462
+ var i = we(je.current.type);
463
463
  if (i)
464
464
  return `
465
465
 
@@ -468,13 +468,13 @@ Check the render method of \`` + i + "`.";
468
468
  return "";
469
469
  }
470
470
  }
471
- function E(i) {
471
+ function ft(i) {
472
472
  return "";
473
473
  }
474
- var _ = {};
475
- function H(i) {
474
+ var nt = {};
475
+ function d(i) {
476
476
  {
477
- var p = u();
477
+ var p = Ze();
478
478
  if (!p) {
479
479
  var k = typeof i == "string" ? i : i.displayName || i.name;
480
480
  k && (p = `
@@ -484,39 +484,39 @@ Check the top-level render call using <` + k + ">.");
484
484
  return p;
485
485
  }
486
486
  }
487
- function q(i, p) {
487
+ function E(i, p) {
488
488
  {
489
489
  if (!i._store || i._store.validated || i.key != null)
490
490
  return;
491
491
  i._store.validated = !0;
492
- var k = H(p);
493
- if (_[k])
492
+ var k = d(p);
493
+ if (nt[k])
494
494
  return;
495
- _[k] = !0;
496
- var R = "";
497
- i && i._owner && i._owner !== Z.current && (R = " It was passed a child from " + we(i._owner.type) + "."), Fe(i), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', k, R), Fe(null);
495
+ nt[k] = !0;
496
+ var _ = "";
497
+ i && i._owner && i._owner !== je.current && (_ = " It was passed a child from " + we(i._owner.type) + "."), Te(i), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', k, _), Te(null);
498
498
  }
499
499
  }
500
- function Ce(i, p) {
500
+ function B(i, p) {
501
501
  {
502
502
  if (typeof i != "object")
503
503
  return;
504
- if (rt(i))
504
+ if (Ge(i))
505
505
  for (var k = 0; k < i.length; k++) {
506
- var R = i[k];
507
- ke(R) && q(R, p);
506
+ var _ = i[k];
507
+ J(_) && E(_, p);
508
508
  }
509
- else if (ke(i))
509
+ else if (J(i))
510
510
  i._store && (i._store.validated = !0);
511
511
  else if (i) {
512
- var se = A(i);
513
- if (typeof se == "function" && se !== i.entries)
514
- for (var ge = se.call(i), Q; !(Q = ge.next()).done; )
515
- ke(Q.value) && q(Q.value, p);
512
+ var ee = O(i);
513
+ if (typeof ee == "function" && ee !== i.entries)
514
+ for (var se = ee.call(i), G; !(G = se.next()).done; )
515
+ J(G.value) && E(G.value, p);
516
516
  }
517
517
  }
518
518
  }
519
- function m(i) {
519
+ function l(i) {
520
520
  {
521
521
  var p = i.type;
522
522
  if (p == null || typeof p == "string")
@@ -531,12 +531,12 @@ Check the top-level render call using <` + k + ">.");
531
531
  else
532
532
  return;
533
533
  if (k) {
534
- var R = we(p);
535
- Oe(k, i.props, "prop", R, i);
536
- } else if (p.PropTypes !== void 0 && !Ge) {
537
- Ge = !0;
538
- var se = we(p);
539
- M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", se || "Unknown");
534
+ var _ = we(p);
535
+ Ue(k, i.props, "prop", _, i);
536
+ } else if (p.PropTypes !== void 0 && !he) {
537
+ he = !0;
538
+ var ee = we(p);
539
+ M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ee || "Unknown");
540
540
  }
541
541
  typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
542
542
  }
@@ -544,68 +544,68 @@ Check the top-level render call using <` + k + ">.");
544
544
  function v(i) {
545
545
  {
546
546
  for (var p = Object.keys(i.props), k = 0; k < p.length; k++) {
547
- var R = p[k];
548
- if (R !== "children" && R !== "key") {
549
- Fe(i), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", R), Fe(null);
547
+ var _ = p[k];
548
+ if (_ !== "children" && _ !== "key") {
549
+ Te(i), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), Te(null);
550
550
  break;
551
551
  }
552
552
  }
553
- i.ref !== null && (Fe(i), M("Invalid attribute `ref` supplied to `React.Fragment`."), Fe(null));
553
+ i.ref !== null && (Te(i), M("Invalid attribute `ref` supplied to `React.Fragment`."), Te(null));
554
554
  }
555
555
  }
556
- var X = {};
557
- function z(i, p, k, R, se, ge) {
556
+ var F = {};
557
+ function A(i, p, k, _, ee, se) {
558
558
  {
559
- var Q = Se(i);
560
- if (!Q) {
561
- var G = "";
562
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (G += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
563
- var Ye = E();
564
- Ye ? G += Ye : G += u();
565
- var Te;
566
- i === null ? Te = "null" : rt(i) ? Te = "array" : i !== void 0 && i.$$typeof === e ? (Te = "<" + (we(i.type) || "Unknown") + " />", G = " Did you accidentally export a JSX literal instead of a component?") : Te = typeof i, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Te, G);
559
+ var G = Se(i);
560
+ if (!G) {
561
+ var K = "";
562
+ (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (K += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
563
+ var Ae = ft();
564
+ Ae ? K += Ae : K += Ze();
565
+ var ke;
566
+ i === null ? ke = "null" : Ge(i) ? ke = "array" : i !== void 0 && i.$$typeof === e ? (ke = "<" + (we(i.type) || "Unknown") + " />", K = " Did you accidentally export a JSX literal instead of a component?") : ke = typeof i, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ke, K);
567
567
  }
568
- var Be = le(i, p, k, se, ge);
569
- if (Be == null)
570
- return Be;
571
- if (Q) {
572
- var ot = p.children;
573
- if (ot !== void 0)
574
- if (R)
575
- if (rt(ot)) {
576
- for (var Ct = 0; Ct < ot.length; Ct++)
577
- Ce(ot[Ct], i);
578
- Object.freeze && Object.freeze(ot);
568
+ var Ce = Q(i, p, k, ee, se);
569
+ if (Ce == null)
570
+ return Ce;
571
+ if (G) {
572
+ var Ye = p.children;
573
+ if (Ye !== void 0)
574
+ if (_)
575
+ if (Ge(Ye)) {
576
+ for (var ot = 0; ot < Ye.length; ot++)
577
+ B(Ye[ot], i);
578
+ Object.freeze && Object.freeze(Ye);
579
579
  } else
580
580
  M("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
581
581
  else
582
- Ce(ot, i);
582
+ B(Ye, i);
583
583
  }
584
- if (ze.call(p, "key")) {
585
- var bt = we(i), Je = Object.keys(p).filter(function(Xr) {
584
+ if (Xe.call(p, "key")) {
585
+ var tt = we(i), Qe = Object.keys(p).filter(function(Xr) {
586
586
  return Xr !== "key";
587
- }), Yt = Je.length > 0 ? "{key: someKey, " + Je.join(": ..., ") + ": ...}" : "{key: someKey}";
588
- if (!X[bt + Yt]) {
589
- var Vr = Je.length > 0 ? "{" + Je.join(": ..., ") + ": ...}" : "{}";
587
+ }), Yt = Qe.length > 0 ? "{key: someKey, " + Qe.join(": ..., ") + ": ...}" : "{key: someKey}";
588
+ if (!F[tt + Yt]) {
589
+ var Vr = Qe.length > 0 ? "{" + Qe.join(": ..., ") + ": ...}" : "{}";
590
590
  M(`A props object containing a "key" prop is being spread into JSX:
591
591
  let props = %s;
592
592
  <%s {...props} />
593
593
  React keys must be passed directly to JSX without using spread:
594
594
  let props = %s;
595
- <%s key={someKey} {...props} />`, Yt, bt, Vr, bt), X[bt + Yt] = !0;
595
+ <%s key={someKey} {...props} />`, Yt, tt, Vr, tt), F[tt + Yt] = !0;
596
596
  }
597
597
  }
598
- return i === o ? v(Be) : m(Be), Be;
598
+ return i === o ? v(Ce) : l(Ce), Ce;
599
599
  }
600
600
  }
601
- function P(i, p, k) {
602
- return z(i, p, k, !0);
601
+ function T(i, p, k) {
602
+ return A(i, p, k, !0);
603
603
  }
604
- function te(i, p, k) {
605
- return z(i, p, k, !1);
604
+ function Y(i, p, k) {
605
+ return A(i, p, k, !1);
606
606
  }
607
- var Ee = te, Ie = P;
608
- St.Fragment = o, St.jsx = Ee, St.jsxs = Ie;
607
+ var me = Y, ge = T;
608
+ St.Fragment = o, St.jsx = me, St.jsxs = ge;
609
609
  })()), St;
610
610
  }
611
611
  var fr;
@@ -640,34 +640,34 @@ function ar(t) {
640
640
  return e[a] = o != null ? o : !0, e;
641
641
  }, {});
642
642
  }
643
- function Xe(t, e, r, o) {
643
+ function qe(t, e, r, o) {
644
644
  if (!Array.isArray(t) || t.length === 0)
645
645
  return null;
646
646
  const a = [];
647
- for (let l = 0; l < t.length; l++) {
648
- const c = t[l];
647
+ for (let u = 0; u < t.length; u++) {
648
+ const c = t[u];
649
649
  if (c) {
650
650
  if (c.type === "label_open") {
651
- const d = [];
652
- for (l++; l < t.length; ) {
653
- const g = t[l];
651
+ const m = [];
652
+ for (u++; u < t.length; ) {
653
+ const g = t[u];
654
654
  if ((g == null ? void 0 : g.type) === "label_close")
655
655
  break;
656
- g && d.push(g), l++;
656
+ g && m.push(g), u++;
657
657
  }
658
- const s = `${r}-label-${l}`;
658
+ const s = `${r}-label-${u}`;
659
659
  a.push(
660
- /* @__PURE__ */ n.jsx("label", { ...ar(c.attrs), children: Xe(d, e, `${s}-child`, o) }, s)
660
+ /* @__PURE__ */ n.jsx("label", { ...ar(c.attrs), children: qe(m, e, `${s}-child`, o) }, s)
661
661
  );
662
662
  continue;
663
663
  }
664
- c.type !== "label_close" && a.push(o(c, `${r}-${l}`, e));
664
+ c.type !== "label_close" && a.push(o(c, `${r}-${u}`, e));
665
665
  }
666
666
  }
667
667
  return a;
668
668
  }
669
669
  function Ht(t, e, r, o) {
670
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: Xe(t, e, `${r}-inline`, o) });
670
+ return /* @__PURE__ */ n.jsx(n.Fragment, { children: qe(t, e, `${r}-inline`, o) });
671
671
  }
672
672
  const hr = {
673
673
  note: "ℹ️",
@@ -679,14 +679,14 @@ const hr = {
679
679
  caution: "⚠️"
680
680
  };
681
681
  function tn(t) {
682
- const { node: e, ctx: r, renderNode: o, indexKey: a, isDark: l } = t, c = String(e.kind || "note"), d = W(() => e.title && String(e.title).trim().length ? String(e.title) : c.charAt(0).toUpperCase() + c.slice(1), [c, e.title]), [s, g] = B(() => {
682
+ const { node: e, ctx: r, renderNode: o, indexKey: a, isDark: u } = t, c = String(e.kind || "note"), m = H(() => e.title && String(e.title).trim().length ? String(e.title) : c.charAt(0).toUpperCase() + c.slice(1), [c, e.title]), [s, g] = P(() => {
683
683
  var h;
684
684
  return e.collapsible ? !((h = e.open) == null || h) : !1;
685
- }), f = W(() => `admonition-${Math.random().toString(36).slice(2, 9)}`, []);
686
- return /* @__PURE__ */ n.jsxs("div", { className: `admonition admonition-${c}${l ? " is-dark" : ""}`, "data-index-key": a, children: [
685
+ }), f = H(() => `admonition-${Math.random().toString(36).slice(2, 9)}`, []);
686
+ return /* @__PURE__ */ n.jsxs("div", { className: `admonition admonition-${c}${u ? " is-dark" : ""}`, "data-index-key": a, children: [
687
687
  /* @__PURE__ */ n.jsxs("div", { id: f, className: "admonition-header", children: [
688
688
  hr[c] && /* @__PURE__ */ n.jsx("span", { className: "admonition-icon", children: hr[c] }),
689
- /* @__PURE__ */ n.jsx("span", { className: "admonition-title", children: d }),
689
+ /* @__PURE__ */ n.jsx("span", { className: "admonition-title", children: m }),
690
690
  e.collapsible && /* @__PURE__ */ n.jsx(
691
691
  "button",
692
692
  {
@@ -700,16 +700,16 @@ function tn(t) {
700
700
  }
701
701
  )
702
702
  ] }),
703
- !s && /* @__PURE__ */ n.jsx("div", { id: `${f}-content`, className: "admonition-content", "aria-labelledby": f, children: r && o ? Xe(e.children, r, String(a != null ? a : f), o) : null })
703
+ !s && /* @__PURE__ */ n.jsx("div", { id: `${f}-content`, className: "admonition-content", "aria-labelledby": f, children: r && o ? qe(e.children, r, String(a != null ? a : f), o) : null })
704
704
  ] });
705
705
  }
706
706
  const Nr = Ur(null);
707
707
  function _r(t, e) {
708
- const r = typeof window != "undefined" && typeof document != "undefined", o = /* @__PURE__ */ new Map(), a = (c, d) => {
709
- var y, N;
708
+ const r = typeof window != "undefined" && typeof document != "undefined", o = /* @__PURE__ */ new Map(), a = (c, m) => {
709
+ var x, S;
710
710
  if (!r || typeof IntersectionObserver == "undefined")
711
711
  return null;
712
- const s = (y = t()) != null ? y : null, g = `${c}::${d}`, f = o.get(g);
712
+ const s = (x = t()) != null ? x : null, g = `${c}::${m}`, f = o.get(g);
713
713
  if (f && f.root === s)
714
714
  return f;
715
715
  if (f) {
@@ -719,8 +719,8 @@ function _r(t, e) {
719
719
  }
720
720
  o.delete(g);
721
721
  }
722
- const h = (N = f == null ? void 0 : f.targets) != null ? N : /* @__PURE__ */ new Map(), C = new IntersectionObserver((A) => {
723
- for (const L of A) {
722
+ const h = (S = f == null ? void 0 : f.targets) != null ? S : /* @__PURE__ */ new Map(), C = new IntersectionObserver((O) => {
723
+ for (const L of O) {
724
724
  const M = h.get(L.target);
725
725
  if (!(!M || !(L.isIntersecting || L.intersectionRatio > 0))) {
726
726
  M.state.current = !0;
@@ -738,15 +738,15 @@ function _r(t, e) {
738
738
  }, {
739
739
  root: s,
740
740
  rootMargin: c,
741
- threshold: d
742
- }), w = { observer: C, root: s, rootMargin: c, threshold: d, targets: h };
741
+ threshold: m
742
+ }), w = { observer: C, root: s, rootMargin: c, threshold: m, targets: h };
743
743
  o.set(g, w);
744
- for (const A of h.keys())
745
- C.observe(A);
744
+ for (const O of h.keys())
745
+ C.observe(O);
746
746
  return w;
747
747
  };
748
- return (c, d) => {
749
- var A, L;
748
+ return (c, m) => {
749
+ var O, L;
750
750
  const s = { current: !1 };
751
751
  let g = !1, f;
752
752
  const h = new Promise((M) => {
@@ -769,8 +769,8 @@ function _r(t, e) {
769
769
  whenVisible: h,
770
770
  destroy: C
771
771
  };
772
- const w = (A = d == null ? void 0 : d.rootMargin) != null ? A : "300px", y = (L = d == null ? void 0 : d.threshold) != null ? L : 0, N = a(w, y);
773
- return N ? (N.targets.set(c, { resolve: f, state: s }), N.observer.observe(c), {
772
+ const w = (O = m == null ? void 0 : m.rootMargin) != null ? O : "300px", x = (L = m == null ? void 0 : m.threshold) != null ? L : 0, S = a(w, x);
773
+ return S ? (S.targets.set(c, { resolve: f, state: s }), S.observer.observe(c), {
774
774
  isVisible: () => s.current,
775
775
  whenVisible: h,
776
776
  destroy: C
@@ -783,15 +783,15 @@ function _r(t, e) {
783
783
  }
784
784
  const rn = _r(() => null, () => !0);
785
785
  function nn({ getRoot: t, enabled: e = !0, children: r }) {
786
- const o = S(e);
786
+ const o = R(e);
787
787
  o.current = e;
788
- const a = S(t);
788
+ const a = R(t);
789
789
  a.current = t;
790
- const l = W(() => _r(() => {
791
- var c, d;
792
- return (d = (c = a.current) == null ? void 0 : c.call(a)) != null ? d : null;
790
+ const u = H(() => _r(() => {
791
+ var c, m;
792
+ return (m = (c = a.current) == null ? void 0 : c.call(a)) != null ? m : null;
793
793
  }, () => o.current), []);
794
- return /* @__PURE__ */ n.jsx(Nr.Provider, { value: l, children: r });
794
+ return /* @__PURE__ */ n.jsx(Nr.Provider, { value: u, children: r });
795
795
  }
796
796
  function It() {
797
797
  var t;
@@ -888,7 +888,7 @@ function lr() {
888
888
  return (r = Lr[e]) != null ? r : sn(e);
889
889
  } };
890
890
  }
891
- let pe = null, Mt = null, kt = null, Ft = null, Wt = null, Bt = null;
891
+ let pe = null, Mt = null, jt = null, Ft = null, Wt = null, Bt = null;
892
892
  function Br() {
893
893
  Ft && (clearTimeout(Ft), Ft = null), Wt && (clearTimeout(Wt), Wt = null);
894
894
  }
@@ -921,25 +921,25 @@ async function pr(t) {
921
921
  });
922
922
  pe.style.transform = `translate3d(${Math.round(e)}px, ${Math.round(r)}px, 0)`;
923
923
  }
924
- function Ut(t, e, r = "top", o = !1, a, l) {
924
+ function Ut(t, e, r = "top", o = !1, a, u) {
925
925
  if (!t || typeof document == "undefined" || (cn(), !pe))
926
926
  return;
927
927
  Br();
928
928
  const c = async () => {
929
929
  if (pe) {
930
- Mt = t, pe.textContent = e, pe.dataset.placement = r, pe.dataset.dark = ln(l) ? "true" : "false", pe.dataset.visible = "false", Bt = `tooltip-${Date.now()}-${Math.random().toString(36).slice(2)}`, pe.id = Bt;
930
+ Mt = t, pe.textContent = e, pe.dataset.placement = r, pe.dataset.dark = ln(u) ? "true" : "false", pe.dataset.visible = "false", Bt = `tooltip-${Date.now()}-${Math.random().toString(36).slice(2)}`, pe.id = Bt;
931
931
  try {
932
932
  t.setAttribute("aria-describedby", Bt);
933
933
  } catch {
934
934
  }
935
- await pr(r), pe.dataset.visible = "true", kt == null || kt(), kt = Mr(t, pe, () => {
935
+ await pr(r), pe.dataset.visible = "true", jt == null || jt(), jt = Mr(t, pe, () => {
936
936
  pr(r);
937
937
  });
938
938
  }
939
939
  };
940
940
  o ? c() : Ft = setTimeout(c, 80);
941
941
  }
942
- function We(t = !1) {
942
+ function Oe(t = !1) {
943
943
  if (!pe)
944
944
  return;
945
945
  Br();
@@ -950,7 +950,7 @@ function We(t = !1) {
950
950
  Mt.removeAttribute("aria-describedby");
951
951
  } catch {
952
952
  }
953
- Mt = null, Bt = null, kt && (kt(), kt = null);
953
+ Mt = null, Bt = null, jt && (jt(), jt = null);
954
954
  }
955
955
  };
956
956
  t ? e() : Wt = setTimeout(e, 120);
@@ -1089,13 +1089,13 @@ function Tn(t) {
1089
1089
  const [r] = e.split(/\s+/), [o] = r.split(":");
1090
1090
  return o.toLowerCase();
1091
1091
  }
1092
- function ft(t) {
1092
+ function pt(t) {
1093
1093
  var r;
1094
1094
  const e = Tn(t);
1095
1095
  return (r = En[e]) != null ? r : e;
1096
1096
  }
1097
1097
  function wr(t) {
1098
- const e = ft(t);
1098
+ const e = pt(t);
1099
1099
  if (!e)
1100
1100
  return "plaintext";
1101
1101
  switch (e) {
@@ -1115,7 +1115,7 @@ function ur(t) {
1115
1115
  if (r != null && r !== "")
1116
1116
  return r;
1117
1117
  }
1118
- switch (ft(t)) {
1118
+ switch (pt(t)) {
1119
1119
  case "javascript":
1120
1120
  return hn;
1121
1121
  case "typescript":
@@ -1169,11 +1169,11 @@ const Qt = {
1169
1169
  mermaid: "Mermaid"
1170
1170
  };
1171
1171
  function Rn(t) {
1172
- const e = W(() => {
1172
+ const e = H(() => {
1173
1173
  const r = t.code || "", o = r.trim().toLowerCase();
1174
1174
  if (o.startsWith("<!doctype") || o.startsWith("<html") || o.startsWith("<body"))
1175
1175
  return r;
1176
- const a = t.isDark ? "#020617" : "#ffffff", l = t.isDark ? "#e5e7eb" : "#020617";
1176
+ const a = t.isDark ? "#020617" : "#ffffff", u = t.isDark ? "#e5e7eb" : "#020617";
1177
1177
  return `<!doctype html>
1178
1178
  <html lang="en">
1179
1179
  <head>
@@ -1185,7 +1185,7 @@ function Rn(t) {
1185
1185
  padding: 0;
1186
1186
  height: 100%;
1187
1187
  background-color: ${a};
1188
- color: ${l};
1188
+ color: ${u};
1189
1189
  }
1190
1190
  body {
1191
1191
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;
@@ -1197,7 +1197,7 @@ function Rn(t) {
1197
1197
  </body>
1198
1198
  </html>`;
1199
1199
  }, [t.code, t.isDark]);
1200
- return F(() => {
1200
+ return W(() => {
1201
1201
  const r = (o) => {
1202
1202
  var a;
1203
1203
  (o.key === "Escape" || o.key === "Esc") && ((a = t.onClose) == null || a.call(t));
@@ -1263,7 +1263,7 @@ function Nn(t) {
1263
1263
  }
1264
1264
  function er({ node: t }) {
1265
1265
  var a;
1266
- const e = W(() => Nn(t == null ? void 0 : t.language), [t]), r = `language-${e}`, o = e ? `Code block: ${e}` : "Code block";
1266
+ const e = H(() => Nn(t == null ? void 0 : t.language), [t]), r = `language-${e}`, o = e ? `Code block: ${e}` : "Code block";
1267
1267
  return /* @__PURE__ */ n.jsx(
1268
1268
  "pre",
1269
1269
  {
@@ -1327,325 +1327,345 @@ const _n = [
1327
1327
  showFontSizeButtons: !0
1328
1328
  };
1329
1329
  function Bn(t) {
1330
- var ke;
1330
+ var nt;
1331
1331
  const e = { ...Ln, ...t }, {
1332
1332
  node: r,
1333
1333
  isDark: o,
1334
1334
  loading: a,
1335
- stream: l,
1335
+ stream: u,
1336
1336
  isShowPreview: c,
1337
- enableFontSizeControl: d,
1337
+ enableFontSizeControl: m,
1338
1338
  darkTheme: s,
1339
1339
  lightTheme: g,
1340
1340
  monacoOptions: f,
1341
1341
  themes: h,
1342
1342
  minWidth: C,
1343
1343
  maxWidth: w,
1344
- showHeader: y,
1345
- showCopyButton: N,
1346
- showExpandButton: A,
1344
+ showHeader: x,
1345
+ showCopyButton: S,
1346
+ showExpandButton: O,
1347
1347
  showPreviewButton: L,
1348
1348
  showFontSizeButtons: M
1349
- } = e, I = S(null), O = S(null), re = S(null), ue = S(null), de = S(null), me = S(null), oe = S(null), Se = S(null), U = It(), ce = S(f), we = S(h), J = S(f), [K, Ne] = B(!1), [ye, Ae] = B(() => typeof window == "undefined"), [ee, ne] = B(!1), [xe, He] = B(!1), [ie, st] = B(!1), [Ze, Ue] = B(() => r.language || "plaintext"), [x, _e] = B(() => ft(r.language)), [be, Le] = B(!1), [fe, gt] = B(!1), [ve, pt] = B(!1), [qe, ze] = B(!1), { t: $ } = lr(), [De, Qe] = B(() => {
1350
- const u = Number(f == null ? void 0 : f.fontSize);
1351
- return Number.isFinite(u) && u > 0 ? u : 14;
1352
- }), [Oe, ct] = B(De), rt = D(() => {
1353
- var H, q;
1354
- const u = (q = (H = ce.current) == null ? void 0 : H.MAX_HEIGHT) != null ? q : 500;
1355
- if (typeof u == "number" && Number.isFinite(u))
1356
- return Math.max(80, u);
1357
- const E = String(u).match(/^(\d+(?:\.\d+)?)/), _ = E ? Number.parseFloat(E[1]) : 500;
1358
- return Number.isFinite(_) ? Math.max(80, _) : 500;
1359
- }, []), $e = D((u) => {
1360
- var Ce, m, v, X;
1361
- if (K)
1349
+ } = e, I = R(null), $ = R(null), te = R(null), ue = R(null), ie = R(null), de = R(null), ce = R(null), Se = R(0), V = R(null), re = R(null), we = It(), q = R(f), ye = R(h), $e = R(f), [oe, Ne] = P(!1), [X, ne] = P(() => typeof window == "undefined"), [ve, Fe] = P(!1), [ae, st] = P(!1), [Je, We] = P(!1), [y, De] = P(() => r.language || "plaintext"), [be, _e] = P(() => pt(r.language)), [He, ut] = P(!1), [xe, vt] = P(!1), [fe, Xe] = P(!1), [Le, Ie] = P(!1), { t: U } = lr(), [Ue, bt] = P(() => {
1350
+ const d = Number(f == null ? void 0 : f.fontSize);
1351
+ return Number.isFinite(d) && d > 0 ? d : 14;
1352
+ }), [Ge, et] = P(Ue), Me = D(() => {
1353
+ var l, v;
1354
+ const d = (v = (l = q.current) == null ? void 0 : l.MAX_HEIGHT) != null ? v : 500;
1355
+ if (typeof d == "number" && Number.isFinite(d))
1356
+ return Math.max(80, d);
1357
+ const E = String(d).match(/^(\d+(?:\.\d+)?)/), B = E ? Number.parseFloat(E[1]) : 500;
1358
+ return Number.isFinite(B) ? Math.max(80, B) : 500;
1359
+ }, []), ze = D((d) => {
1360
+ var F, A, T, Y;
1361
+ if (oe)
1362
1362
  return;
1363
- const E = I.current, _ = re.current;
1364
- if (!E || !_)
1363
+ const E = I.current, B = te.current;
1364
+ if (!E || !B)
1365
1365
  return;
1366
- const H = me.current === "diff" ? (Ce = _.getDiffEditorView) == null ? void 0 : Ce.call(_) : (m = _.getEditorView) == null ? void 0 : m.call(_);
1367
- if (!H)
1366
+ const l = de.current === "diff" ? (F = B.getDiffEditorView) == null ? void 0 : F.call(B) : (A = B.getEditorView) == null ? void 0 : A.call(B);
1367
+ if (!l)
1368
1368
  return;
1369
- const q = rt();
1369
+ const v = Me();
1370
1370
  try {
1371
- (v = H.updateOptions) == null || v.call(H, { automaticLayout: u });
1371
+ (T = l.updateOptions) == null || T.call(l, { automaticLayout: d });
1372
1372
  } catch {
1373
1373
  }
1374
- u ? (E.style.maxHeight = "none", E.style.overflow = "visible") : (E.style.maxHeight = `${Math.ceil(q)}px`, E.style.overflow = "auto");
1374
+ d ? (E.style.maxHeight = "none", E.style.overflow = "visible") : (E.style.maxHeight = `${Math.ceil(v)}px`, E.style.overflow = "auto");
1375
1375
  try {
1376
- const P = Number((() => {
1377
- if (typeof H.getContentHeight == "function")
1378
- return H.getContentHeight();
1379
- if (me.current === "diff" && typeof H.getModifiedEditor == "function") {
1380
- const te = H.getModifiedEditor();
1381
- if (te && typeof te.getContentHeight == "function")
1382
- return te.getContentHeight();
1376
+ const ge = Number((() => {
1377
+ if (typeof l.getContentHeight == "function")
1378
+ return l.getContentHeight();
1379
+ if (de.current === "diff" && typeof l.getModifiedEditor == "function") {
1380
+ const i = l.getModifiedEditor();
1381
+ if (i && typeof i.getContentHeight == "function")
1382
+ return i.getContentHeight();
1383
1383
  }
1384
1384
  })());
1385
- if (Number.isFinite(P) && P > 0) {
1386
- const te = u ? P : Math.min(P, q);
1387
- E.style.height = `${Math.ceil(Math.max(120, te))}px`, (X = H.layout) == null || X.call(H);
1385
+ if (Number.isFinite(ge) && ge > 0) {
1386
+ const i = d ? ge : Math.min(ge, v);
1387
+ E.style.height = `${Math.ceil(Math.max(120, i))}px`;
1388
1388
  }
1389
+ (Y = l.layout) == null || Y.call(l);
1389
1390
  } catch {
1390
1391
  }
1391
- }, [rt, K]);
1392
- F(() => {
1393
- ce.current = f;
1394
- }, [f]), F(() => {
1395
- _e(ft(r.language));
1392
+ }, [Me, oe]);
1393
+ W(() => {
1394
+ q.current = f;
1395
+ }, [f]), W(() => {
1396
+ _e(pt(r.language));
1396
1397
  }, [r.language]);
1397
- const je = S(r);
1398
- je.current = r;
1399
- const et = D(() => {
1400
- var H, q, Ce, m;
1401
- const u = I.current, E = O.current;
1402
- if (!u || !E)
1398
+ const dt = R(r);
1399
+ dt.current = r;
1400
+ const ct = D(() => {
1401
+ var d;
1402
+ Se.current += 1;
1403
+ try {
1404
+ (d = ue.current) == null || d.call(ue);
1405
+ } catch {
1406
+ }
1407
+ ie.current = null, de.current = null, ce.current = null, We(!1), st(!1);
1408
+ }, []), Ke = D(() => {
1409
+ var l, v, F, A;
1410
+ const d = I.current, E = $.current;
1411
+ if (!d || !E)
1403
1412
  return;
1404
- const _ = (H = u.querySelector(".monaco-editor")) != null ? H : u;
1413
+ const B = (l = d.querySelector(".monaco-editor")) != null ? l : d;
1405
1414
  try {
1406
- const v = typeof window != "undefined" && window.getComputedStyle ? window.getComputedStyle(_) : null, X = String((q = v == null ? void 0 : v.getPropertyValue("--vscode-editor-foreground")) != null ? q : "").trim(), z = String((Ce = v == null ? void 0 : v.getPropertyValue("--vscode-editor-background")) != null ? Ce : "").trim(), P = String((m = v == null ? void 0 : v.getPropertyValue("--vscode-editor-selectionBackground")) != null ? m : "").trim();
1407
- X && E.style.setProperty("--vscode-editor-foreground", X), z && E.style.setProperty("--vscode-editor-background", z), P && E.style.setProperty("--vscode-editor-selectionBackground", P);
1415
+ const T = typeof window != "undefined" && window.getComputedStyle ? window.getComputedStyle(B) : null, Y = String((v = T == null ? void 0 : T.getPropertyValue("--vscode-editor-foreground")) != null ? v : "").trim(), me = String((F = T == null ? void 0 : T.getPropertyValue("--vscode-editor-background")) != null ? F : "").trim(), ge = String((A = T == null ? void 0 : T.getPropertyValue("--vscode-editor-selectionBackground")) != null ? A : "").trim();
1416
+ Y && E.style.setProperty("--vscode-editor-foreground", Y), me && E.style.setProperty("--vscode-editor-background", me), ge && E.style.setProperty("--vscode-editor-selectionBackground", ge);
1408
1417
  } catch {
1409
1418
  }
1410
1419
  }, []);
1411
- F(() => () => {
1412
- var u, E, _;
1413
- (u = ue.current) == null || u.call(ue), ue.current = null, de.current = null, me.current = null, oe.current = null, (_ = (E = Se.current) == null ? void 0 : E.destroy) == null || _.call(E), Se.current = null;
1414
- }, []), F(() => {
1415
- var _, H;
1416
- if (typeof window == "undefined" || ye)
1420
+ W(() => () => {
1421
+ var d, E, B;
1422
+ Se.current += 1, (d = ue.current) == null || d.call(ue), ue.current = null, ie.current = null, de.current = null, ce.current = null, V.current = null, (B = (E = re.current) == null ? void 0 : E.destroy) == null || B.call(E), re.current = null;
1423
+ }, []), W(() => {
1424
+ var B, l;
1425
+ if (typeof window == "undefined" || X)
1417
1426
  return;
1418
- const u = O.current;
1419
- if (!u)
1427
+ const d = $.current;
1428
+ if (!d)
1420
1429
  return;
1421
- (H = (_ = Se.current) == null ? void 0 : _.destroy) == null || H.call(_);
1422
- const E = U(u, { rootMargin: "400px" });
1423
- return Se.current = E, E.isVisible() && Ae(!0), E.whenVisible.then(() => Ae(!0)), () => {
1424
- E.destroy(), Se.current === E && (Se.current = null);
1430
+ (l = (B = re.current) == null ? void 0 : B.destroy) == null || l.call(B);
1431
+ const E = we(d, { rootMargin: "400px" });
1432
+ return re.current = E, E.isVisible() && ne(!0), E.whenVisible.then(() => ne(!0)), () => {
1433
+ E.destroy(), re.current === E && (re.current = null);
1425
1434
  };
1426
- }, [U, ye]), F(() => {
1427
- let u = !0;
1435
+ }, [we, X]), W(() => {
1436
+ let d = !0;
1428
1437
  return typeof window == "undefined" ? () => {
1429
- u = !1;
1438
+ d = !1;
1430
1439
  } : ((async () => {
1431
1440
  try {
1432
1441
  const E = await Pr();
1433
- if (!u)
1442
+ if (!d)
1434
1443
  return;
1435
1444
  if (!E) {
1436
1445
  Ne(!0);
1437
1446
  return;
1438
1447
  }
1439
- const _ = E.useMonaco, H = E.detectLanguage;
1440
- if (typeof H == "function" && (oe.current = H), typeof _ != "function") {
1448
+ const B = E.useMonaco, l = E.detectLanguage;
1449
+ if (typeof l == "function" && (V.current = l), typeof B != "function") {
1441
1450
  Ne(!0);
1442
1451
  return;
1443
1452
  }
1444
- const q = o ? s : g, Ce = { ...J.current || {} };
1445
- if (ft(r == null ? void 0 : r.language) === "shell") {
1446
- const X = Array.isArray(Ce.languages) ? Ce.languages.map(String) : null, z = X != null ? X : _n;
1447
- Ce.languages = Array.from(/* @__PURE__ */ new Set([...z, "shell"]));
1453
+ const v = o ? s : g, F = { ...$e.current || {} };
1454
+ if (pt(r == null ? void 0 : r.language) === "shell") {
1455
+ const Y = Array.isArray(F.languages) ? F.languages.map(String) : null, me = Y != null ? Y : _n;
1456
+ F.languages = Array.from(/* @__PURE__ */ new Set([...me, "shell"]));
1448
1457
  }
1449
- const v = _({
1458
+ const T = B({
1450
1459
  wordWrap: "on",
1451
1460
  wrappingIndent: "same",
1452
- themes: we.current,
1453
- theme: q,
1454
- ...Ce,
1461
+ themes: ye.current,
1462
+ theme: v,
1463
+ ...F,
1455
1464
  onThemeChange() {
1456
- et();
1465
+ Ke();
1457
1466
  }
1458
1467
  });
1459
- re.current = v, ue.current = typeof v.safeClean == "function" ? () => v.safeClean() : typeof v.cleanupEditor == "function" ? () => v.cleanupEditor() : null, ne(!0);
1468
+ te.current = T, ue.current = typeof T.safeClean == "function" ? () => T.safeClean() : typeof T.cleanupEditor == "function" ? () => T.cleanupEditor() : null, Fe(!0);
1460
1469
  } catch {
1461
- u && Ne(!0);
1470
+ d && Ne(!0);
1462
1471
  }
1463
1472
  })(), () => {
1464
- u = !1;
1473
+ d = !1;
1465
1474
  });
1466
- }, []), F(() => {
1467
- var u;
1468
- if (!r.language && !x && oe.current)
1475
+ }, []), W(() => {
1476
+ var d;
1477
+ if (!r.language && !be && V.current)
1469
1478
  try {
1470
- const E = oe.current(String((u = r.code) != null ? u : ""));
1471
- E && Ue(E);
1479
+ const E = V.current(String((d = r.code) != null ? d : ""));
1480
+ E && De(E);
1472
1481
  } catch {
1473
1482
  }
1474
- }, [x, r.code, r.language]);
1475
- const ut = W(() => String(r.language || x || Ze || "plaintext"), [x, Ze, r.language]), he = W(() => ft(ut), [ut]), tt = W(() => wr(he), [he]), wt = W(() => ur(he), [he]), Ke = W(() => c ? he === "html" || he === "svg" : !1, [he, c]), nt = W(() => {
1476
- const u = he;
1477
- return u ? Qt[u] || u.charAt(0).toUpperCase() + u.slice(1) : Qt[""] || "Plain Text";
1478
- }, [he]), b = W(() => {
1479
- var u, E, _;
1480
- return r.diff ? (E = (u = r.updatedCode) != null ? u : r.code) != null ? E : "" : (_ = r.code) != null ? _ : "";
1481
- }, [r.code, r.diff, r.updatedCode]), j = W(() => {
1482
- const u = (q) => {
1483
- if (q != null)
1484
- return typeof q == "number" ? `${q}px` : String(q);
1485
- }, E = {}, _ = u(C), H = u(w);
1486
- return _ && (E.minWidth = _), H && (E.maxWidth = H), E;
1487
- }, [C, w]), T = l === !1 && a, V = W(() => o ? s : g, [s, o, g]);
1488
- F(() => {
1489
- if (K || !xe || !ye)
1483
+ }, [be, r.code, r.language]);
1484
+ const mt = H(() => String(r.language || be || y || "plaintext"), [be, y, r.language]), le = H(() => pt(mt), [mt]), rt = H(() => wr(le), [le]), b = H(() => ur(le), [le]), j = H(() => c ? le === "html" || le === "svg" : !1, [le, c]), N = H(() => {
1485
+ const d = le;
1486
+ return d ? Qt[d] || d.charAt(0).toUpperCase() + d.slice(1) : Qt[""] || "Plain Text";
1487
+ }, [le]), z = H(() => {
1488
+ var d, E, B;
1489
+ return r.diff ? (E = (d = r.updatedCode) != null ? d : r.code) != null ? E : "" : (B = r.code) != null ? B : "";
1490
+ }, [r.code, r.diff, r.updatedCode]), Z = H(() => {
1491
+ const d = (v) => {
1492
+ if (v != null)
1493
+ return typeof v == "number" ? `${v}px` : String(v);
1494
+ }, E = {}, B = d(C), l = d(w);
1495
+ return B && (E.minWidth = B), l && (E.maxWidth = l), E;
1496
+ }, [C, w]), Q = u === !1 && a, je = H(() => o ? s : g, [s, o, g]);
1497
+ W(() => {
1498
+ if (oe || !ae || !X)
1490
1499
  return;
1491
- const u = re.current;
1492
- u != null && u.setTheme && V && Promise.resolve(u.setTheme(V)).then(() => et()).catch(() => {
1500
+ const d = te.current;
1501
+ d != null && d.setTheme && je && Promise.resolve(d.setTheme(je)).then(() => Ke()).catch(() => {
1493
1502
  });
1494
- }, [xe, V, et, K, ye]);
1495
- const Y = D(async () => {
1496
- if (K || ve || T)
1503
+ }, [ae, je, Ke, oe, X]);
1504
+ const Be = D(async () => {
1505
+ var ge, i;
1506
+ if (oe || !X || fe || Q)
1497
1507
  return null;
1498
- const u = re.current, E = I.current;
1499
- if (!u || !E || !u.createEditor)
1508
+ const d = te.current, E = I.current;
1509
+ if (!d || !E || !d.createEditor)
1500
1510
  return null;
1501
- const _ = je.current, H = _.diff ? "diff" : "single";
1502
- if (me.current === H)
1511
+ const B = dt.current, l = B.diff ? "diff" : "single", v = ce.current, F = l === "diff" ? !!((ge = d.getDiffEditorView) != null && ge.call(d)) : !!((i = d.getEditorView) != null && i.call(d));
1512
+ if (!(de.current !== l || v !== E || !F))
1503
1513
  return null;
1504
- if (de.current)
1505
- return de.current;
1506
- He(!0);
1507
- const q = (async () => {
1508
- var Ce, m, v, X, z, P, te, Ee, Ie, i;
1514
+ if (ie.current)
1515
+ return ie.current;
1516
+ Se.current += 1;
1517
+ const T = Se.current;
1518
+ st(!0);
1519
+ const me = (async () => {
1520
+ var p, k, _, ee, se, G, K, Ae, ke, Ce;
1509
1521
  try {
1510
- (Ce = ue.current) == null || Ce.call(ue), me.current = null, st(!1);
1511
- const p = tt;
1512
- _.diff ? typeof u.createDiffEditor == "function" ? (me.current = "diff", await u.createDiffEditor(
1522
+ (p = ue.current) == null || p.call(ue), de.current = null, ce.current = null, We(!1);
1523
+ const Ye = rt;
1524
+ if (B.diff ? typeof d.createDiffEditor == "function" ? (de.current = "diff", await d.createDiffEditor(
1513
1525
  E,
1514
- String((m = _.originalCode) != null ? m : ""),
1515
- String((v = _.updatedCode) != null ? v : ""),
1516
- p
1517
- )) : (me.current = "single", await u.createEditor(E, String((z = (X = _.updatedCode) != null ? X : _.code) != null ? z : ""), p)) : (me.current = "single", await u.createEditor(E, String((P = _.code) != null ? P : ""), p));
1518
- const k = Number((te = ce.current) == null ? void 0 : te.fontSize);
1519
- if (Number.isFinite(k) && k > 0) {
1520
- Qe(k), ct(k);
1526
+ String((k = B.originalCode) != null ? k : ""),
1527
+ String((_ = B.updatedCode) != null ? _ : ""),
1528
+ Ye
1529
+ )) : (de.current = "single", await d.createEditor(E, String((se = (ee = B.updatedCode) != null ? ee : B.code) != null ? se : ""), Ye)) : (de.current = "single", await d.createEditor(E, String((G = B.code) != null ? G : ""), Ye)), ce.current = E, Se.current !== T)
1530
+ return;
1531
+ const ot = Number((K = q.current) == null ? void 0 : K.fontSize);
1532
+ if (Number.isFinite(ot) && ot > 0) {
1533
+ bt(ot), et(ot);
1521
1534
  try {
1522
- const R = me.current === "diff" ? (Ee = u.getDiffEditorView) == null ? void 0 : Ee.call(u) : (Ie = u.getEditorView) == null ? void 0 : Ie.call(u);
1523
- (i = R == null ? void 0 : R.updateOptions) == null || i.call(R, { fontSize: k, automaticLayout: !1 });
1535
+ const tt = de.current === "diff" ? (Ae = d.getDiffEditorView) == null ? void 0 : Ae.call(d) : (ke = d.getEditorView) == null ? void 0 : ke.call(d);
1536
+ (Ce = tt == null ? void 0 : tt.updateOptions) == null || Ce.call(tt, { fontSize: ot, automaticLayout: !1 });
1524
1537
  } catch {
1525
1538
  }
1526
1539
  }
1527
- et(), !fe && !ve && $e(!1), st(!0);
1540
+ Ke(), !xe && !fe && ze(!1), We(!0);
1528
1541
  } catch {
1529
- Ne(!0);
1542
+ Se.current === T && Ne(!0);
1530
1543
  }
1531
- })();
1532
- return de.current = q.finally(() => {
1533
- de.current = null;
1534
- }), de.current;
1535
- }, [$e, ve, fe, tt, T, et, K]), le = he === "mermaid";
1536
- F(() => {
1537
- var u;
1538
- if (!K && ee && ye && !ve && !T) {
1539
- if (le) {
1540
- (u = ue.current) == null || u.call(ue);
1544
+ })().finally(() => {
1545
+ ie.current === me && (ie.current = null);
1546
+ });
1547
+ return ie.current = me, me;
1548
+ }, [ze, fe, xe, rt, Q, Ke, oe, X]), Te = le === "mermaid";
1549
+ W(() => {
1550
+ if (!oe && ve && X) {
1551
+ if (fe || Q || Te) {
1552
+ ct();
1541
1553
  return;
1542
1554
  }
1543
- Y();
1555
+ Be();
1544
1556
  }
1545
- }, [ve, Y, le, ee, T, K, ye]), F(() => {
1546
- var H;
1547
- if (e.stream === !1 || K || !ee || ve || le)
1557
+ }, [fe, Be, Te, ve, ct, Q, oe, X]), W(() => {
1558
+ var l;
1559
+ if (oe || !ve || !X || fe || Q || Te)
1548
1560
  return;
1549
- const u = re.current;
1550
- if (!u)
1561
+ const d = te.current;
1562
+ if (!d)
1551
1563
  return;
1552
- const E = String((H = r.code) != null ? H : "");
1564
+ const E = String((l = r.code) != null ? l : "");
1553
1565
  (async () => {
1554
- var m, v;
1555
- let q = x;
1556
- if (!q && oe.current)
1566
+ var A, T;
1567
+ let v = be;
1568
+ if (!v && V.current)
1557
1569
  try {
1558
- q = ft(oe.current(E)), q && _e(q);
1570
+ v = pt(V.current(E)), v && _e(v);
1559
1571
  } catch {
1560
1572
  }
1561
- const Ce = wr(q || he);
1562
- if (u.createEditor && !xe && I.current)
1573
+ const F = wr(v || le);
1574
+ if (d.createEditor && I.current) {
1563
1575
  try {
1564
- await Y();
1576
+ await Promise.resolve(Be());
1565
1577
  } catch {
1566
1578
  }
1579
+ const Y = ie.current;
1580
+ if (Y)
1581
+ try {
1582
+ await Y;
1583
+ } catch {
1584
+ }
1585
+ }
1567
1586
  try {
1568
- r.diff && u.updateDiff ? await Promise.resolve(u.updateDiff(String((m = r.originalCode) != null ? m : ""), String((v = r.updatedCode) != null ? v : ""), Ce)) : u.updateCode && await Promise.resolve(u.updateCode(E, Ce));
1587
+ r.diff && d.updateDiff ? await Promise.resolve(d.updateDiff(String((A = r.originalCode) != null ? A : ""), String((T = r.updatedCode) != null ? T : ""), F)) : d.updateCode && await Promise.resolve(d.updateCode(E, F));
1569
1588
  } catch {
1570
1589
  }
1571
- fe && $e(!0);
1590
+ xe && ze(!0);
1572
1591
  })();
1573
1592
  }, [
1574
- $e,
1575
- he,
1576
- x,
1577
- ve,
1578
- xe,
1579
- Y,
1580
- fe,
1593
+ ze,
1581
1594
  le,
1582
- ee,
1595
+ be,
1596
+ fe,
1597
+ ae,
1598
+ Be,
1599
+ xe,
1600
+ Te,
1601
+ ve,
1583
1602
  r.code,
1584
1603
  r.diff,
1585
1604
  r.originalCode,
1586
1605
  r.updatedCode,
1587
- e.stream,
1588
- K
1589
- ]), F(() => {
1590
- if (K || !ee || !ye || ve || T || !fe && a)
1606
+ Q,
1607
+ oe,
1608
+ X
1609
+ ]), W(() => {
1610
+ if (oe || !ve || !X || fe || Q || !xe && a)
1591
1611
  return;
1592
- const u = typeof window != "undefined" && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame(() => $e(fe)) : null;
1593
- return u == null && $e(fe), () => {
1594
- u != null && typeof window != "undefined" && typeof window.cancelAnimationFrame == "function" && window.cancelAnimationFrame(u);
1612
+ const d = typeof window != "undefined" && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame(() => ze(xe)) : null;
1613
+ return d == null && ze(xe), () => {
1614
+ d != null && typeof window != "undefined" && typeof window.cancelAnimationFrame == "function" && window.cancelAnimationFrame(d);
1595
1615
  };
1596
- }, [$e, ve, fe, a, ee, T, K, ye]), F(() => {
1597
- var E, _, H;
1598
- if (!d || K)
1616
+ }, [ze, fe, xe, a, ve, Q, oe, X]), W(() => {
1617
+ var E, B, l;
1618
+ if (!m || oe)
1599
1619
  return;
1600
- const u = re.current;
1601
- if (u) {
1620
+ const d = te.current;
1621
+ if (d) {
1602
1622
  try {
1603
- const q = me.current === "diff" ? (E = u.getDiffEditorView) == null ? void 0 : E.call(u) : (_ = u.getEditorView) == null ? void 0 : _.call(u);
1604
- (H = q == null ? void 0 : q.updateOptions) == null || H.call(q, { fontSize: Oe });
1623
+ const v = de.current === "diff" ? (E = d.getDiffEditorView) == null ? void 0 : E.call(d) : (B = d.getEditorView) == null ? void 0 : B.call(d);
1624
+ (l = v == null ? void 0 : v.updateOptions) == null || l.call(v, { fontSize: Ge });
1605
1625
  } catch {
1606
1626
  }
1607
- $e(fe);
1608
- }
1609
- }, [$e, d, fe, Oe, r.diff, K]);
1610
- const Z = D((u, E) => {
1611
- const _ = u.currentTarget;
1612
- Ut(_, E, "top", !1, { x: u.clientX, y: u.clientY }, o);
1613
- }, [o]), ae = D(() => {
1614
- We();
1615
- }, []), Fe = D(async () => {
1616
- var u;
1627
+ ze(xe);
1628
+ }
1629
+ }, [ze, m, xe, Ge, r.diff, oe]);
1630
+ const he = D((d, E) => {
1631
+ const B = d.currentTarget;
1632
+ Ut(B, E, "top", !1, { x: d.clientX, y: d.clientY }, o);
1633
+ }, [o]), J = D(() => {
1634
+ Oe();
1635
+ }, []), Ze = D(async () => {
1636
+ var d;
1617
1637
  try {
1618
- typeof navigator != "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && await navigator.clipboard.writeText(String(b)), Le(!0), (u = e.onCopy) == null || u.call(e, String(b)), setTimeout(() => Le(!1), 1e3);
1638
+ typeof navigator != "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && await navigator.clipboard.writeText(String(z)), ut(!0), (d = e.onCopy) == null || d.call(e, String(z)), setTimeout(() => ut(!1), 1e3);
1619
1639
  } catch {
1620
1640
  }
1621
- }, [e, b]), Ge = D(() => {
1622
- if (!Ke)
1641
+ }, [e, z]), ft = D(() => {
1642
+ if (!j)
1623
1643
  return;
1624
- const u = he === "html" ? "text/html" : "image/svg+xml", E = he === "html" ? $("artifacts.htmlPreviewTitle") || "HTML Preview" : $("artifacts.svgPreviewTitle") || "SVG Preview";
1644
+ const d = le === "html" ? "text/html" : "image/svg+xml", E = le === "html" ? U("artifacts.htmlPreviewTitle") || "HTML Preview" : U("artifacts.svgPreviewTitle") || "SVG Preview";
1625
1645
  if (typeof e.onPreviewCode == "function") {
1626
1646
  e.onPreviewCode({
1627
1647
  node: r,
1628
- artifactType: u,
1648
+ artifactType: d,
1629
1649
  artifactTitle: E,
1630
- id: `temp-${he}-${Date.now()}`
1650
+ id: `temp-${le}-${Date.now()}`
1631
1651
  });
1632
1652
  return;
1633
1653
  }
1634
- he === "html" && ze((_) => !_);
1635
- }, [he, Ke, r, e, $]);
1636
- return K ? /* @__PURE__ */ n.jsx(er, { node: r }) : /* @__PURE__ */ n.jsxs(
1654
+ le === "html" && Ie((B) => !B);
1655
+ }, [le, j, r, e, U]);
1656
+ return oe ? /* @__PURE__ */ n.jsx(er, { node: r }) : /* @__PURE__ */ n.jsxs(
1637
1657
  "div",
1638
1658
  {
1639
- ref: O,
1659
+ ref: $,
1640
1660
  className: [
1641
1661
  "code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",
1642
1662
  o ? "border-gray-700/30 bg-gray-900" : "border-gray-200 bg-white",
1643
1663
  a ? "is-rendering" : "",
1644
1664
  o ? "is-dark" : ""
1645
1665
  ].join(" "),
1646
- style: j,
1666
+ style: Z,
1647
1667
  children: [
1648
- y && /* @__PURE__ */ n.jsxs(
1668
+ x && /* @__PURE__ */ n.jsxs(
1649
1669
  "div",
1650
1670
  {
1651
1671
  className: "code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",
@@ -1656,10 +1676,10 @@ function Bn(t) {
1656
1676
  "span",
1657
1677
  {
1658
1678
  className: "icon-slot h-4 w-4 flex-shrink-0",
1659
- dangerouslySetInnerHTML: { __html: wt }
1679
+ dangerouslySetInnerHTML: { __html: b }
1660
1680
  }
1661
1681
  ),
1662
- /* @__PURE__ */ n.jsx("span", { className: "text-sm font-medium font-mono truncate", children: nt })
1682
+ /* @__PURE__ */ n.jsx("span", { className: "text-sm font-medium font-mono truncate", children: N })
1663
1683
  ] }),
1664
1684
  /* @__PURE__ */ n.jsxs("div", { className: "flex items-center space-x-2", children: [
1665
1685
  /* @__PURE__ */ n.jsx(
@@ -1667,16 +1687,16 @@ function Bn(t) {
1667
1687
  {
1668
1688
  type: "button",
1669
1689
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
1670
- "aria-pressed": ve,
1671
- onClick: () => pt((u) => !u),
1672
- onMouseEnter: (u) => Z(u, ve ? $("common.expand") || "Expand" : $("common.collapse") || "Collapse"),
1673
- onFocus: (u) => Z(u, ve ? $("common.expand") || "Expand" : $("common.collapse") || "Collapse"),
1674
- onMouseLeave: ae,
1675
- onBlur: ae,
1690
+ "aria-pressed": fe,
1691
+ onClick: () => Xe((d) => !d),
1692
+ onMouseEnter: (d) => he(d, fe ? U("common.expand") || "Expand" : U("common.collapse") || "Collapse"),
1693
+ onFocus: (d) => he(d, fe ? U("common.expand") || "Expand" : U("common.collapse") || "Collapse"),
1694
+ onMouseLeave: J,
1695
+ onBlur: J,
1676
1696
  children: /* @__PURE__ */ n.jsx(
1677
1697
  "svg",
1678
1698
  {
1679
- style: { rotate: ve ? "0deg" : "90deg" },
1699
+ style: { rotate: fe ? "0deg" : "90deg" },
1680
1700
  xmlns: "http://www.w3.org/2000/svg",
1681
1701
  xmlnsXlink: "http://www.w3.org/1999/xlink",
1682
1702
  "aria-hidden": "true",
@@ -1690,18 +1710,18 @@ function Bn(t) {
1690
1710
  )
1691
1711
  }
1692
1712
  ),
1693
- M && d && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1713
+ M && m && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1694
1714
  /* @__PURE__ */ n.jsx(
1695
1715
  "button",
1696
1716
  {
1697
1717
  type: "button",
1698
1718
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
1699
- disabled: Oe <= 10,
1700
- onClick: () => ct((u) => Math.max(10, u - 1)),
1701
- onMouseEnter: (u) => Z(u, $("common.decrease") || "Decrease"),
1702
- onFocus: (u) => Z(u, $("common.decrease") || "Decrease"),
1703
- onMouseLeave: ae,
1704
- onBlur: ae,
1719
+ disabled: Ge <= 10,
1720
+ onClick: () => et((d) => Math.max(10, d - 1)),
1721
+ onMouseEnter: (d) => he(d, U("common.decrease") || "Decrease"),
1722
+ onFocus: (d) => he(d, U("common.decrease") || "Decrease"),
1723
+ onMouseLeave: J,
1724
+ onBlur: J,
1705
1725
  children: /* @__PURE__ */ n.jsx(
1706
1726
  "svg",
1707
1727
  {
@@ -1723,12 +1743,12 @@ function Bn(t) {
1723
1743
  {
1724
1744
  type: "button",
1725
1745
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
1726
- disabled: Oe === De,
1727
- onClick: () => ct(De),
1728
- onMouseEnter: (u) => Z(u, $("common.reset") || "Reset"),
1729
- onFocus: (u) => Z(u, $("common.reset") || "Reset"),
1730
- onMouseLeave: ae,
1731
- onBlur: ae,
1746
+ disabled: Ge === Ue,
1747
+ onClick: () => et(Ue),
1748
+ onMouseEnter: (d) => he(d, U("common.reset") || "Reset"),
1749
+ onFocus: (d) => he(d, U("common.reset") || "Reset"),
1750
+ onMouseLeave: J,
1751
+ onBlur: J,
1732
1752
  children: /* @__PURE__ */ n.jsx(
1733
1753
  "svg",
1734
1754
  {
@@ -1753,12 +1773,12 @@ function Bn(t) {
1753
1773
  {
1754
1774
  type: "button",
1755
1775
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
1756
- disabled: Oe >= 36,
1757
- onClick: () => ct((u) => Math.min(36, u + 1)),
1758
- onMouseEnter: (u) => Z(u, $("common.increase") || "Increase"),
1759
- onFocus: (u) => Z(u, $("common.increase") || "Increase"),
1760
- onMouseLeave: ae,
1761
- onBlur: ae,
1776
+ disabled: Ge >= 36,
1777
+ onClick: () => et((d) => Math.min(36, d + 1)),
1778
+ onMouseEnter: (d) => he(d, U("common.increase") || "Increase"),
1779
+ onFocus: (d) => he(d, U("common.increase") || "Increase"),
1780
+ onMouseLeave: J,
1781
+ onBlur: J,
1762
1782
  children: /* @__PURE__ */ n.jsx(
1763
1783
  "svg",
1764
1784
  {
@@ -1776,18 +1796,18 @@ function Bn(t) {
1776
1796
  }
1777
1797
  )
1778
1798
  ] }),
1779
- N && /* @__PURE__ */ n.jsx(
1799
+ S && /* @__PURE__ */ n.jsx(
1780
1800
  "button",
1781
1801
  {
1782
1802
  type: "button",
1783
1803
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
1784
- "aria-label": be ? $("common.copied") || "Copied" : $("common.copy") || "Copy",
1785
- onClick: Fe,
1786
- onMouseEnter: (u) => Z(u, be ? $("common.copied") || "Copied" : $("common.copy") || "Copy"),
1787
- onFocus: (u) => Z(u, be ? $("common.copied") || "Copied" : $("common.copy") || "Copy"),
1788
- onMouseLeave: ae,
1789
- onBlur: ae,
1790
- children: be ? /* @__PURE__ */ n.jsx(
1804
+ "aria-label": He ? U("common.copied") || "Copied" : U("common.copy") || "Copy",
1805
+ onClick: Ze,
1806
+ onMouseEnter: (d) => he(d, He ? U("common.copied") || "Copied" : U("common.copy") || "Copy"),
1807
+ onFocus: (d) => he(d, He ? U("common.copied") || "Copied" : U("common.copy") || "Copy"),
1808
+ onMouseLeave: J,
1809
+ onBlur: J,
1810
+ children: He ? /* @__PURE__ */ n.jsx(
1791
1811
  "svg",
1792
1812
  {
1793
1813
  xmlns: "http://www.w3.org/2000/svg",
@@ -1819,18 +1839,18 @@ function Bn(t) {
1819
1839
  )
1820
1840
  }
1821
1841
  ),
1822
- A && /* @__PURE__ */ n.jsx(
1842
+ O && /* @__PURE__ */ n.jsx(
1823
1843
  "button",
1824
1844
  {
1825
1845
  type: "button",
1826
1846
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
1827
- "aria-pressed": fe,
1828
- onClick: () => gt((u) => !u),
1829
- onMouseEnter: (u) => Z(u, fe ? $("common.collapse") || "Collapse" : $("common.expand") || "Expand"),
1830
- onFocus: (u) => Z(u, fe ? $("common.collapse") || "Collapse" : $("common.expand") || "Expand"),
1831
- onMouseLeave: ae,
1832
- onBlur: ae,
1833
- children: fe ? /* @__PURE__ */ n.jsx(
1847
+ "aria-pressed": xe,
1848
+ onClick: () => vt((d) => !d),
1849
+ onMouseEnter: (d) => he(d, xe ? U("common.collapse") || "Collapse" : U("common.expand") || "Expand"),
1850
+ onFocus: (d) => he(d, xe ? U("common.collapse") || "Collapse" : U("common.expand") || "Expand"),
1851
+ onMouseLeave: J,
1852
+ onBlur: J,
1853
+ children: xe ? /* @__PURE__ */ n.jsx(
1834
1854
  "svg",
1835
1855
  {
1836
1856
  xmlns: "http://www.w3.org/2000/svg",
@@ -1859,17 +1879,17 @@ function Bn(t) {
1859
1879
  )
1860
1880
  }
1861
1881
  ),
1862
- Ke && L && /* @__PURE__ */ n.jsx(
1882
+ j && L && /* @__PURE__ */ n.jsx(
1863
1883
  "button",
1864
1884
  {
1865
1885
  type: "button",
1866
1886
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
1867
- "aria-label": $("common.preview") || "Preview",
1868
- onClick: Ge,
1869
- onMouseEnter: (u) => Z(u, $("common.preview") || "Preview"),
1870
- onFocus: (u) => Z(u, $("common.preview") || "Preview"),
1871
- onMouseLeave: ae,
1872
- onBlur: ae,
1887
+ "aria-label": U("common.preview") || "Preview",
1888
+ onClick: ft,
1889
+ onMouseEnter: (d) => he(d, U("common.preview") || "Preview"),
1890
+ onFocus: (d) => he(d, U("common.preview") || "Preview"),
1891
+ onMouseLeave: J,
1892
+ onBlur: J,
1873
1893
  children: /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", children: /* @__PURE__ */ n.jsxs("g", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", children: [
1874
1894
  /* @__PURE__ */ n.jsx("path", { d: "M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496" }),
1875
1895
  /* @__PURE__ */ n.jsx("path", { d: "M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23" })
@@ -1880,18 +1900,18 @@ function Bn(t) {
1880
1900
  ]
1881
1901
  }
1882
1902
  ),
1883
- /* @__PURE__ */ n.jsxs("div", { className: `code-block-body${fe ? " code-block-body--expanded" : ""}`, children: [
1884
- !ve && (l ? !0 : !a) && (K ? /* @__PURE__ */ n.jsx(er, { node: r }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1903
+ /* @__PURE__ */ n.jsxs("div", { className: `code-block-body${xe ? " code-block-body--expanded" : ""}`, children: [
1904
+ !fe && (u ? !0 : !a) && (oe ? /* @__PURE__ */ n.jsx(er, { node: r }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1885
1905
  /* @__PURE__ */ n.jsx(
1886
1906
  "div",
1887
1907
  {
1888
1908
  ref: I,
1889
- className: `code-editor-container${l ? "" : " code-height-placeholder"}`,
1890
- style: { visibility: ie ? "visible" : "hidden" },
1891
- "aria-hidden": !ie
1909
+ className: `code-editor-container${u ? "" : " code-height-placeholder"}`,
1910
+ style: { visibility: Je ? "visible" : "hidden" },
1911
+ "aria-hidden": !Je
1892
1912
  }
1893
1913
  ),
1894
- !ie && /* @__PURE__ */ n.jsx(
1914
+ !Je && /* @__PURE__ */ n.jsx(
1895
1915
  "div",
1896
1916
  {
1897
1917
  style: {
@@ -1905,39 +1925,39 @@ function Bn(t) {
1905
1925
  {
1906
1926
  className: "code-fallback-plain m-0",
1907
1927
  "aria-busy": a,
1908
- "aria-label": `Code block: ${nt}`,
1928
+ "aria-label": `Code block: ${N}`,
1909
1929
  tabIndex: 0,
1910
- children: /* @__PURE__ */ n.jsx("code", { translate: "no", children: String(b) })
1930
+ children: /* @__PURE__ */ n.jsx("code", { translate: "no", children: String(z) })
1911
1931
  }
1912
1932
  )
1913
1933
  }
1914
1934
  )
1915
1935
  ] })),
1916
- !l && a && /* @__PURE__ */ n.jsx("div", { className: "code-loading-placeholder", children: /* @__PURE__ */ n.jsxs("div", { className: "loading-skeleton", children: [
1936
+ !u && a && /* @__PURE__ */ n.jsx("div", { className: "code-loading-placeholder", children: /* @__PURE__ */ n.jsxs("div", { className: "loading-skeleton", children: [
1917
1937
  /* @__PURE__ */ n.jsx("div", { className: "skeleton-line" }),
1918
1938
  /* @__PURE__ */ n.jsx("div", { className: "skeleton-line" }),
1919
1939
  /* @__PURE__ */ n.jsx("div", { className: "skeleton-line short" })
1920
1940
  ] }) })
1921
1941
  ] }),
1922
- qe && !e.onPreviewCode && Ke && he === "html" && /* @__PURE__ */ n.jsx(
1942
+ Le && !e.onPreviewCode && j && le === "html" && /* @__PURE__ */ n.jsx(
1923
1943
  Rn,
1924
1944
  {
1925
- code: String((ke = r.code) != null ? ke : ""),
1945
+ code: String((nt = r.code) != null ? nt : ""),
1926
1946
  isDark: o,
1927
- onClose: () => ze(!1)
1947
+ onClose: () => Ie(!1)
1928
1948
  }
1929
1949
  ),
1930
- /* @__PURE__ */ n.jsx("span", { className: "sr-only", "aria-live": "polite", role: "status", children: be ? $("common.copied") || "Copied" : "" })
1950
+ /* @__PURE__ */ n.jsx("span", { className: "sr-only", "aria-live": "polite", role: "status", children: He ? U("common.copied") || "Copied" : "" })
1931
1951
  ]
1932
1952
  }
1933
1953
  );
1934
1954
  }
1935
1955
  function Pn(t) {
1936
- const { node: e, ctx: r, renderNode: o, indexKey: a } = t, l = Array.isArray(e.items) ? e.items : [];
1937
- return /* @__PURE__ */ n.jsx("dl", { className: "definition-list", "data-index-key": a, children: l.map((c, d) => /* @__PURE__ */ n.jsxs("div", { className: "mb-4", children: [
1938
- /* @__PURE__ */ n.jsx("dt", { className: "definition-term font-semibold", children: r && o ? Ht(c.term, r, `${String(a != null ? a : "definition")}-term-${d}`, o) : null }),
1939
- /* @__PURE__ */ n.jsx("dd", { className: "definition-desc ml-4", children: r && o ? Ht(c.definition, r, `${String(a != null ? a : "definition")}-desc-${d}`, o) : null })
1940
- ] }, `${String(a != null ? a : "definition")}-${d}`)) });
1956
+ const { node: e, ctx: r, renderNode: o, indexKey: a } = t, u = Array.isArray(e.items) ? e.items : [];
1957
+ return /* @__PURE__ */ n.jsx("dl", { className: "definition-list", "data-index-key": a, children: u.map((c, m) => /* @__PURE__ */ n.jsxs("div", { className: "mb-4", children: [
1958
+ /* @__PURE__ */ n.jsx("dt", { className: "definition-term font-semibold", children: r && o ? Ht(c.term, r, `${String(a != null ? a : "definition")}-term-${m}`, o) : null }),
1959
+ /* @__PURE__ */ n.jsx("dd", { className: "definition-desc ml-4", children: r && o ? Ht(c.definition, r, `${String(a != null ? a : "definition")}-desc-${m}`, o) : null })
1960
+ ] }, `${String(a != null ? a : "definition")}-${m}`)) });
1941
1961
  }
1942
1962
  function Dn(t) {
1943
1963
  var r;
@@ -1949,10 +1969,10 @@ function In(t) {
1949
1969
  }
1950
1970
  function An(t) {
1951
1971
  const { node: e } = t, r = D((o) => {
1952
- var l;
1972
+ var u;
1953
1973
  if (o.preventDefault(), typeof document == "undefined")
1954
1974
  return;
1955
- const a = document.getElementById(`fnref-${String((l = e.id) != null ? l : "")}`);
1975
+ const a = document.getElementById(`fnref-${String((u = e.id) != null ? u : "")}`);
1956
1976
  a && a.scrollIntoView({ behavior: "smooth" });
1957
1977
  }, [e.id]);
1958
1978
  return /* @__PURE__ */ n.jsx(
@@ -1968,14 +1988,14 @@ function An(t) {
1968
1988
  }
1969
1989
  function On(t) {
1970
1990
  const { node: e, ctx: r, renderNode: o, indexKey: a } = t;
1971
- return /* @__PURE__ */ n.jsx("div", { id: `footnote-${e.id}`, className: "footnote-node flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2", children: /* @__PURE__ */ n.jsx("div", { className: "flex-1", children: r && o ? Xe(e.children, r, String(a != null ? a : `footnote-${e.id}`), o) : null }) });
1991
+ return /* @__PURE__ */ n.jsx("div", { id: `footnote-${e.id}`, className: "footnote-node flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2", children: /* @__PURE__ */ n.jsx("div", { className: "flex-1", children: r && o ? qe(e.children, r, String(a != null ? a : `footnote-${e.id}`), o) : null }) });
1972
1992
  }
1973
1993
  function $n(t) {
1974
- const { node: e } = t, r = W(() => `#footnote-${e.id}`, [e.id]), o = D((a) => {
1994
+ const { node: e } = t, r = H(() => `#footnote-${e.id}`, [e.id]), o = D((a) => {
1975
1995
  if (a.preventDefault(), typeof document == "undefined")
1976
1996
  return;
1977
- const l = document.querySelector(r);
1978
- l && l.scrollIntoView({ behavior: "smooth" });
1997
+ const u = document.querySelector(r);
1998
+ u && u.scrollIntoView({ behavior: "smooth" });
1979
1999
  }, [r]);
1980
2000
  return /* @__PURE__ */ n.jsx("sup", { id: `fnref-${e.id}`, className: "footnote-reference", onClick: o, children: /* @__PURE__ */ n.jsxs("a", { href: r, title: `View footnote ${e.id}`, className: "footnote-link cursor-pointer", children: [
1981
2001
  "[",
@@ -1995,18 +2015,18 @@ function Dr(t) {
1995
2015
  } else for (r in t) t[r] && (o && (o += " "), o += r);
1996
2016
  return o;
1997
2017
  }
1998
- function Me() {
2018
+ function Ee() {
1999
2019
  for (var t, e, r = 0, o = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (e = Dr(t)) && (o && (o += " "), o += e);
2000
2020
  return o;
2001
2021
  }
2002
2022
  function Wn(t) {
2003
- const { node: e, ctx: r, renderNode: o, indexKey: a, children: l } = t, c = Math.min(6, Math.max(1, Number(e.level) || 1)), d = `h${c}`;
2023
+ const { node: e, ctx: r, renderNode: o, indexKey: a, children: u } = t, c = Math.min(6, Math.max(1, Number(e.level) || 1)), m = `h${c}`;
2004
2024
  return /* @__PURE__ */ n.jsx(
2005
- d,
2025
+ m,
2006
2026
  {
2007
2027
  dir: "auto",
2008
- className: Me("heading-node font-semibold", `heading-${c}`),
2009
- children: l != null ? l : r && o ? Xe(e.children, r, String(a != null ? a : `heading-${c}`), o) : null
2028
+ className: Ee("heading-node font-semibold", `heading-${c}`),
2029
+ children: u != null ? u : r && o ? qe(e.children, r, String(a != null ? a : `heading-${c}`), o) : null
2010
2030
  }
2011
2031
  );
2012
2032
  }
@@ -2014,14 +2034,14 @@ function Hn(t) {
2014
2034
  return /* @__PURE__ */ n.jsx("mark", { className: "highlight-node", children: t.children });
2015
2035
  }
2016
2036
  function zn(t) {
2017
- const { node: e, placeholder: r } = t, o = It(), [a, l] = B(null), c = S(null), [d, s] = B(() => typeof window == "undefined"), [g, f] = B(e.content), h = !!e.loading;
2018
- F(() => {
2019
- var y;
2037
+ const { node: e, placeholder: r } = t, o = It(), [a, u] = P(null), c = R(null), [m, s] = P(() => typeof window == "undefined"), [g, f] = P(e.content), h = !!e.loading;
2038
+ W(() => {
2039
+ var x;
2020
2040
  if (typeof window == "undefined") {
2021
2041
  s(!0);
2022
2042
  return;
2023
2043
  }
2024
- if ((y = c.current) == null || y.destroy(), c.current = null, !h) {
2044
+ if ((x = c.current) == null || x.destroy(), c.current = null, !h) {
2025
2045
  s(!0), f(e.content);
2026
2046
  return;
2027
2047
  }
@@ -2034,17 +2054,17 @@ function zn(t) {
2034
2054
  }), () => {
2035
2055
  w.destroy(), c.current = null;
2036
2056
  };
2037
- }, [a, h, e.content, o]), F(() => () => {
2057
+ }, [a, h, e.content, o]), W(() => () => {
2038
2058
  var w;
2039
2059
  (w = c.current) == null || w.destroy(), c.current = null;
2040
- }, []), F(() => {
2041
- (!h || d) && f(e.content);
2042
- }, [h, e.content, d]);
2043
- const C = W(() => {
2060
+ }, []), W(() => {
2061
+ (!h || m) && f(e.content);
2062
+ }, [h, e.content, m]);
2063
+ const C = H(() => {
2044
2064
  var w;
2045
2065
  return ar((w = e.attrs) != null ? w : void 0);
2046
2066
  }, [e.attrs]);
2047
- return /* @__PURE__ */ n.jsx("div", { ref: l, className: "html-block-node", ...C, children: d ? /* @__PURE__ */ n.jsx("div", { dangerouslySetInnerHTML: { __html: g != null ? g : "" } }) : /* @__PURE__ */ n.jsx("div", { className: "html-block-node__placeholder", children: r != null ? r : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2067
+ return /* @__PURE__ */ n.jsx("div", { ref: u, className: "html-block-node", ...C, children: m ? /* @__PURE__ */ n.jsx("div", { dangerouslySetInnerHTML: { __html: g != null ? g : "" } }) : /* @__PURE__ */ n.jsx("div", { className: "html-block-node__placeholder", children: r != null ? r : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2048
2068
  /* @__PURE__ */ n.jsx("span", { className: "html-block-node__placeholder-bar" }),
2049
2069
  /* @__PURE__ */ n.jsx("span", { className: "html-block-node__placeholder-bar w-4/5" }),
2050
2070
  /* @__PURE__ */ n.jsx("span", { className: "html-block-node__placeholder-bar w-2/3" })
@@ -2069,55 +2089,55 @@ const Xn = {
2069
2089
  usePlaceholder: !0
2070
2090
  };
2071
2091
  function Un(t) {
2072
- var re, ue, de, me, oe, Se;
2073
- const e = { ...Xn, ...t }, r = It(), [o, a] = B(null), l = S(null), [c, d] = B(() => typeof window == "undefined" || e.lazy === !1), [s, g] = B(!1), [f, h] = B(!1), [C, w] = B(!1);
2074
- F(() => {
2075
- var J;
2092
+ var te, ue, ie, de, ce, Se;
2093
+ const e = { ...Xn, ...t }, r = It(), [o, a] = P(null), u = R(null), [c, m] = P(() => typeof window == "undefined" || e.lazy === !1), [s, g] = P(!1), [f, h] = P(!1), [C, w] = P(!1);
2094
+ W(() => {
2095
+ var q;
2076
2096
  if (!e.lazy)
2077
2097
  return;
2078
- const U = o;
2079
- if ((J = l.current) == null || J.destroy(), l.current = null, !U) {
2080
- d(!1);
2098
+ const V = o;
2099
+ if ((q = u.current) == null || q.destroy(), u.current = null, !V) {
2100
+ m(!1);
2081
2101
  return;
2082
2102
  }
2083
- const ce = r(U, { rootMargin: "400px" });
2084
- return l.current = ce, ce.isVisible() && d(!0), ce.whenVisible.then(() => d(!0)).catch(() => {
2103
+ const re = r(V, { rootMargin: "400px" });
2104
+ return u.current = re, re.isVisible() && m(!0), re.whenVisible.then(() => m(!0)).catch(() => {
2085
2105
  }), () => {
2086
- ce.destroy(), l.current = null;
2106
+ re.destroy(), u.current = null;
2087
2107
  };
2088
- }, [o, r, e.lazy]), F(() => () => {
2089
- var U;
2090
- (U = l.current) == null || U.destroy(), l.current = null;
2108
+ }, [o, r, e.lazy]), W(() => () => {
2109
+ var V;
2110
+ (V = u.current) == null || V.destroy(), u.current = null;
2091
2111
  }, []);
2092
- const y = W(() => f && e.fallbackSrc ? e.fallbackSrc : e.node.src, [f, e.fallbackSrc, e.node.src]);
2093
- F(() => {
2112
+ const x = H(() => f && e.fallbackSrc ? e.fallbackSrc : e.node.src, [f, e.fallbackSrc, e.node.src]);
2113
+ W(() => {
2094
2114
  g(!1), h(!1);
2095
- }, [y]), F(() => {
2115
+ }, [x]), W(() => {
2096
2116
  w(!1);
2097
2117
  }, [e.node.src]);
2098
- const N = W(() => /\.svg(?:\?|$)/i.test(String(y)), [y]), A = !e.lazy || c, L = () => {
2099
- var U;
2100
- e.fallbackSrc && !C ? (w(!0), h(!0)) : (h(!0), (U = e.onError) == null || U.call(e, e.node.src));
2118
+ const S = H(() => /\.svg(?:\?|$)/i.test(String(x)), [x]), O = !e.lazy || c, L = () => {
2119
+ var V;
2120
+ e.fallbackSrc && !C ? (w(!0), h(!0)) : (h(!0), (V = e.onError) == null || V.call(e, e.node.src));
2101
2121
  }, M = () => {
2102
- var U;
2103
- g(!0), h(!1), (U = e.onLoad) == null || U.call(e, y);
2104
- }, I = (U) => {
2105
- var ce;
2106
- U.preventDefault(), !(!s || f) && ((ce = e.onClick) == null || ce.call(e, [U, y]));
2107
- }, O = N ? { minHeight: e.svgMinHeight, width: "100%" } : { minHeight: "6rem" };
2122
+ var V;
2123
+ g(!0), h(!1), (V = e.onLoad) == null || V.call(e, x);
2124
+ }, I = (V) => {
2125
+ var re;
2126
+ V.preventDefault(), !(!s || f) && ((re = e.onClick) == null || re.call(e, [V, x]));
2127
+ }, $ = S ? { minHeight: e.svgMinHeight, width: "100%" } : { minHeight: "6rem" };
2108
2128
  return /* @__PURE__ */ n.jsxs("figure", { ref: a, className: "image-node", children: [
2109
- /* @__PURE__ */ n.jsx("div", { className: "image-node__inner", children: !e.node.loading && !f && A ? /* @__PURE__ */ n.jsx(
2129
+ /* @__PURE__ */ n.jsx("div", { className: "image-node__inner", children: !e.node.loading && !f && O ? /* @__PURE__ */ n.jsx(
2110
2130
  "img",
2111
2131
  {
2112
- src: y,
2113
- alt: String((ue = (re = e.node.alt) != null ? re : e.node.title) != null ? ue : ""),
2114
- title: String((me = (de = e.node.title) != null ? de : e.node.alt) != null ? me : ""),
2132
+ src: x,
2133
+ alt: String((ue = (te = e.node.alt) != null ? te : e.node.title) != null ? ue : ""),
2134
+ title: String((de = (ie = e.node.title) != null ? ie : e.node.alt) != null ? de : ""),
2115
2135
  className: `image-node__img${s ? " is-loaded" : ""}`,
2116
- style: N ? { minHeight: e.svgMinHeight, width: "100%", height: "auto", objectFit: "contain" } : void 0,
2136
+ style: S ? { minHeight: e.svgMinHeight, width: "100%", height: "auto", objectFit: "contain" } : void 0,
2117
2137
  loading: e.lazy ? "lazy" : "eager",
2118
2138
  decoding: "async",
2119
2139
  tabIndex: s ? 0 : -1,
2120
- "aria-label": (oe = e.node.alt) != null ? oe : "Preview image",
2140
+ "aria-label": (ce = e.node.alt) != null ? ce : "Preview image",
2121
2141
  onError: L,
2122
2142
  onLoad: M,
2123
2143
  onClick: I
@@ -2146,7 +2166,7 @@ function Un(t) {
2146
2166
  "div",
2147
2167
  {
2148
2168
  className: "image-node__placeholder",
2149
- style: O,
2169
+ style: $,
2150
2170
  children: e.usePlaceholder ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2151
2171
  /* @__PURE__ */ n.jsx("span", { className: "image-node__spinner", "aria-hidden": "true" }),
2152
2172
  /* @__PURE__ */ n.jsx("span", { className: "image-node__placeholder-text", children: "Loading image..." })
@@ -2165,17 +2185,17 @@ function Yn(t) {
2165
2185
  return /* @__PURE__ */ n.jsx("ins", { className: "insert-node", children: t.children });
2166
2186
  }
2167
2187
  function qn(t) {
2168
- var h, C, w, y, N;
2169
- const { node: e, ctx: r, renderNode: o, indexKey: a } = t, l = t.showTooltip !== !1, c = (h = t.isDark) != null ? h : r == null ? void 0 : r.isDark, d = W(() => {
2170
- var L, M, I, O, re, ue;
2171
- const A = t.underlineBottom !== void 0 ? typeof t.underlineBottom == "number" ? `${t.underlineBottom}px` : String(t.underlineBottom) : "-3px";
2188
+ var h, C, w, x, S;
2189
+ const { node: e, ctx: r, renderNode: o, indexKey: a } = t, u = t.showTooltip !== !1, c = (h = t.isDark) != null ? h : r == null ? void 0 : r.isDark, m = H(() => {
2190
+ var L, M, I, $, te, ue;
2191
+ const O = t.underlineBottom !== void 0 ? typeof t.underlineBottom == "number" ? `${t.underlineBottom}px` : String(t.underlineBottom) : "-3px";
2172
2192
  return {
2173
2193
  "--link-color": (L = t.color) != null ? L : "#0366d6",
2174
2194
  "--underline-height": `${(M = t.underlineHeight) != null ? M : 2}px`,
2175
- "--underline-bottom": A,
2195
+ "--underline-bottom": O,
2176
2196
  "--underline-opacity": String((I = t.animationOpacity) != null ? I : 0.9),
2177
- "--underline-duration": `${(O = t.animationDuration) != null ? O : 0.8}s`,
2178
- "--underline-timing": (re = t.animationTiming) != null ? re : "linear",
2197
+ "--underline-duration": `${($ = t.animationDuration) != null ? $ : 0.8}s`,
2198
+ "--underline-timing": (te = t.animationTiming) != null ? te : "linear",
2179
2199
  "--underline-iteration": typeof t.animationIteration == "number" ? String(t.animationIteration) : (ue = t.animationIteration) != null ? ue : "infinite"
2180
2200
  };
2181
2201
  }, [
@@ -2186,22 +2206,22 @@ function qn(t) {
2186
2206
  t.color,
2187
2207
  t.underlineBottom,
2188
2208
  t.underlineHeight
2189
- ]), s = String((w = (C = e.title) != null ? C : e.href) != null ? w : ""), g = D((A) => {
2190
- if (!l)
2209
+ ]), s = String((w = (C = e.title) != null ? C : e.href) != null ? w : ""), g = D((O) => {
2210
+ if (!u)
2191
2211
  return;
2192
- const L = A.currentTarget, M = String(e.title || e.href || e.text || "");
2193
- Ut(L, M, "top", !1, { x: A.clientX, y: A.clientY }, c);
2194
- }, [c, e.href, e.text, e.title, l]), f = D(() => {
2195
- l && We();
2196
- }, [l]);
2212
+ const L = O.currentTarget, M = String(e.title || e.href || e.text || "");
2213
+ Ut(L, M, "top", !1, { x: O.clientX, y: O.clientY }, c);
2214
+ }, [c, e.href, e.text, e.title, u]), f = D(() => {
2215
+ u && Oe();
2216
+ }, [u]);
2197
2217
  return e.loading ? /* @__PURE__ */ n.jsx(
2198
2218
  "span",
2199
2219
  {
2200
2220
  className: "link-loading inline-flex items-baseline gap-1.5",
2201
2221
  "aria-hidden": "false",
2202
- style: d,
2222
+ style: m,
2203
2223
  children: /* @__PURE__ */ n.jsxs("span", { className: "link-text-wrapper relative inline-flex", children: [
2204
- /* @__PURE__ */ n.jsx("span", { className: "leading-[normal] link-text", children: /* @__PURE__ */ n.jsx("span", { className: "leading-[normal] link-text", children: (y = e.text) != null ? y : "" }) }),
2224
+ /* @__PURE__ */ n.jsx("span", { className: "leading-[normal] link-text", children: /* @__PURE__ */ n.jsx("span", { className: "leading-[normal] link-text", children: (x = e.text) != null ? x : "" }) }),
2205
2225
  /* @__PURE__ */ n.jsx("span", { className: "underline-anim", "aria-hidden": "true" })
2206
2226
  ] })
2207
2227
  }
@@ -2210,33 +2230,33 @@ function qn(t) {
2210
2230
  {
2211
2231
  className: "link-node",
2212
2232
  href: e.href,
2213
- title: l ? "" : s,
2233
+ title: u ? "" : s,
2214
2234
  "aria-label": `Link: ${s}`,
2215
2235
  target: "_blank",
2216
2236
  rel: "noopener noreferrer",
2217
- style: d,
2237
+ style: m,
2218
2238
  onMouseEnter: g,
2219
2239
  onMouseLeave: f,
2220
- children: r && o ? Xe(e.children, r, String(a != null ? a : "link"), o) : (N = e.text) != null ? N : null
2240
+ children: r && o ? qe(e.children, r, String(a != null ? a : "link"), o) : (S = e.text) != null ? S : null
2221
2241
  }
2222
2242
  );
2223
2243
  }
2224
2244
  function Ir(t) {
2225
- const { node: e, ctx: r, renderNode: o, value: a, indexKey: l, children: c } = t, d = a == null ? void 0 : a;
2226
- return /* @__PURE__ */ n.jsx("li", { className: "list-item pl-1.5 my-2", dir: "auto", value: d, children: c != null ? c : r && o ? Xe(e.children, r, String(l != null ? l : "list-item"), o) : null });
2245
+ const { node: e, ctx: r, renderNode: o, value: a, indexKey: u, children: c } = t, m = a == null ? void 0 : a;
2246
+ return /* @__PURE__ */ n.jsx("li", { className: "list-item pl-1.5 my-2", dir: "auto", value: m, children: c != null ? c : r && o ? qe(e.children, r, String(u != null ? u : "list-item"), o) : null });
2227
2247
  }
2228
2248
  function Gn(t) {
2229
- var d;
2230
- const { node: e, ctx: r, renderNode: o, indexKey: a } = t, l = e.ordered ? "ol" : "ul", c = e.ordered && e.start ? e.start : void 0;
2249
+ var m;
2250
+ const { node: e, ctx: r, renderNode: o, indexKey: a } = t, u = e.ordered ? "ol" : "ul", c = e.ordered && e.start ? e.start : void 0;
2231
2251
  return /* @__PURE__ */ n.jsx(
2232
- l,
2252
+ u,
2233
2253
  {
2234
- className: Me(
2254
+ className: Ee(
2235
2255
  "list-node my-5 pl-[calc(13/8*1em)]",
2236
2256
  e.ordered ? "list-decimal" : "list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)]"
2237
2257
  ),
2238
2258
  start: c,
2239
- children: (d = e.items) == null ? void 0 : d.map((s, g) => {
2259
+ children: (m = e.items) == null ? void 0 : m.map((s, g) => {
2240
2260
  var f;
2241
2261
  return /* @__PURE__ */ n.jsx(
2242
2262
  Ir,
@@ -2253,8 +2273,8 @@ function Gn(t) {
2253
2273
  }
2254
2274
  );
2255
2275
  }
2256
- let at = null, yt = null, tr = !1;
2257
- const it = /* @__PURE__ */ new Map(), ht = /* @__PURE__ */ new Map(), Ar = 200;
2276
+ let at = null, kt = null, tr = !1;
2277
+ const it = /* @__PURE__ */ new Map(), wt = /* @__PURE__ */ new Map(), Ar = 200;
2258
2278
  let Dt = 5;
2259
2279
  const Et = /* @__PURE__ */ new Set();
2260
2280
  function Tt() {
@@ -2268,23 +2288,23 @@ function Tt() {
2268
2288
  }
2269
2289
  }
2270
2290
  }
2271
- let dt = null;
2291
+ let ht = null;
2272
2292
  function oi(t) {
2273
- at = t, yt = null, at.onmessage = (e) => {
2274
- const { id: r, html: o, error: a } = e.data, l = it.get(r);
2275
- if (l)
2276
- if (it.delete(r), clearTimeout(l.timeoutId), Tt(), a)
2277
- l.reject(new Error(a));
2293
+ at = t, kt = null, at.onmessage = (e) => {
2294
+ const { id: r, html: o, error: a } = e.data, u = it.get(r);
2295
+ if (u)
2296
+ if (it.delete(r), clearTimeout(u.timeoutId), Tt(), a)
2297
+ u.reject(new Error(a));
2278
2298
  else {
2279
- const { content: c, displayMode: d } = e.data;
2299
+ const { content: c, displayMode: m } = e.data;
2280
2300
  if (c) {
2281
- const s = `${d ? "d" : "i"}:${c}`;
2282
- if (ht.set(s, o), ht.size > Ar) {
2283
- const g = ht.keys().next().value;
2284
- ht.delete(g);
2301
+ const s = `${m ? "d" : "i"}:${c}`;
2302
+ if (wt.set(s, o), wt.size > Ar) {
2303
+ const g = wt.keys().next().value;
2304
+ wt.delete(g);
2285
2305
  }
2286
2306
  }
2287
- l.resolve(o);
2307
+ u.resolve(o);
2288
2308
  }
2289
2309
  }, at.onerror = (e) => {
2290
2310
  console.error("[katexWorkerClient] Worker error:", e);
@@ -2295,10 +2315,10 @@ function oi(t) {
2295
2315
  }
2296
2316
  function ii() {
2297
2317
  var t;
2298
- at && ((t = at.terminate) == null || t.call(at)), at = null, yt = null;
2318
+ at && ((t = at.terminate) == null || t.call(at)), at = null, kt = null;
2299
2319
  }
2300
2320
  function Jn() {
2301
- return at || (yt = new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."), yt.name = "WORKER_INIT_ERROR", yt.code = "WORKER_INIT_ERROR", null);
2321
+ return at || (kt = new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."), kt.name = "WORKER_INIT_ERROR", kt.code = "WORKER_INIT_ERROR", null);
2302
2322
  }
2303
2323
  function ai(t) {
2304
2324
  tr = !!t, at && at.postMessage({ type: "init", debug: tr });
@@ -2306,23 +2326,23 @@ function ai(t) {
2306
2326
  const Kt = "WORKER_BUSY";
2307
2327
  async function Zn(t, e = !0, r = 2e3, o) {
2308
2328
  const a = performance.now();
2309
- if (yt)
2310
- return Promise.reject(yt);
2311
- const l = `${e ? "d" : "i"}:${t}`, c = ht.get(l);
2329
+ if (kt)
2330
+ return Promise.reject(kt);
2331
+ const u = `${e ? "d" : "i"}:${t}`, c = wt.get(u);
2312
2332
  if (c)
2313
- return dt && dt.recordRender({
2333
+ return ht && ht.recordRender({
2314
2334
  type: "cache-hit",
2315
2335
  duration: performance.now() - a,
2316
2336
  formulaLength: t.length,
2317
2337
  timestamp: Date.now(),
2318
2338
  success: !0
2319
2339
  }), Promise.resolve(c);
2320
- const d = Jn();
2321
- if (!d)
2322
- return Promise.reject(yt);
2340
+ const m = Jn();
2341
+ if (!m)
2342
+ return Promise.reject(kt);
2323
2343
  if (it.size >= Dt) {
2324
2344
  const s = new Error("Worker busy");
2325
- return s.name = "WorkerBusy", s.code = Kt, s.busy = !0, s.inFlight = it.size, s.max = Dt, dt && dt.recordRender({
2345
+ return s.name = "WorkerBusy", s.code = Kt, s.busy = !0, s.inFlight = it.size, s.max = Dt, ht && ht.recordRender({
2326
2346
  type: "worker",
2327
2347
  duration: performance.now() - a,
2328
2348
  formulaLength: t.length,
@@ -2333,65 +2353,65 @@ async function Zn(t, e = !0, r = 2e3, o) {
2333
2353
  }
2334
2354
  return new Promise((s, g) => {
2335
2355
  if (o != null && o.aborted) {
2336
- const y = new Error("Aborted");
2337
- y.name = "AbortError", g(y);
2356
+ const x = new Error("Aborted");
2357
+ x.name = "AbortError", g(x);
2338
2358
  return;
2339
2359
  }
2340
2360
  const f = Math.random().toString(36).slice(2), h = setTimeout(() => {
2341
2361
  it.delete(f);
2342
- const y = new Error("Worker render timed out");
2343
- y.name = "WorkerTimeout", y.code = "WORKER_TIMEOUT", dt && dt.recordRender({
2362
+ const x = new Error("Worker render timed out");
2363
+ x.name = "WorkerTimeout", x.code = "WORKER_TIMEOUT", ht && ht.recordRender({
2344
2364
  type: "worker",
2345
2365
  duration: performance.now() - a,
2346
2366
  formulaLength: t.length,
2347
2367
  timestamp: Date.now(),
2348
2368
  success: !1,
2349
2369
  error: "timeout"
2350
- }), g(y), Tt();
2370
+ }), g(x), Tt();
2351
2371
  }, r), C = () => {
2352
2372
  }, w = () => {
2353
2373
  it.delete(f), clearTimeout(h), Et.delete(C);
2354
- const y = new Error("Aborted");
2355
- y.name = "AbortError", g(y), Tt();
2374
+ const x = new Error("Aborted");
2375
+ x.name = "AbortError", g(x), Tt();
2356
2376
  };
2357
2377
  o && o.addEventListener("abort", w, { once: !0 }), it.set(f, {
2358
- resolve: (y) => {
2359
- o && o.removeEventListener("abort", w), dt && dt.recordRender({
2378
+ resolve: (x) => {
2379
+ o && o.removeEventListener("abort", w), ht && ht.recordRender({
2360
2380
  type: "worker",
2361
2381
  duration: performance.now() - a,
2362
2382
  formulaLength: t.length,
2363
2383
  timestamp: Date.now(),
2364
2384
  success: !0
2365
- }), s(y);
2385
+ }), s(x);
2366
2386
  },
2367
- reject: (y) => {
2368
- o && o.removeEventListener("abort", w), dt && dt.recordRender({
2387
+ reject: (x) => {
2388
+ o && o.removeEventListener("abort", w), ht && ht.recordRender({
2369
2389
  type: "worker",
2370
2390
  duration: performance.now() - a,
2371
2391
  formulaLength: t.length,
2372
2392
  timestamp: Date.now(),
2373
2393
  success: !1,
2374
- error: (y == null ? void 0 : y.code) || (y == null ? void 0 : y.message)
2375
- }), g(y);
2394
+ error: (x == null ? void 0 : x.code) || (x == null ? void 0 : x.message)
2395
+ }), g(x);
2376
2396
  },
2377
2397
  timeoutId: h
2378
2398
  });
2379
2399
  try {
2380
- d.postMessage({ id: f, content: t, displayMode: e, debug: tr });
2381
- } catch (y) {
2382
- it.delete(f), clearTimeout(h), o && o.removeEventListener("abort", w), g(y), Tt();
2400
+ m.postMessage({ id: f, content: t, displayMode: e, debug: tr });
2401
+ } catch (x) {
2402
+ it.delete(f), clearTimeout(h), o && o.removeEventListener("abort", w), g(x), Tt();
2383
2403
  }
2384
2404
  });
2385
2405
  }
2386
2406
  function Or(t, e, r) {
2387
2407
  const o = `${e ? "d" : "i"}:${t}`;
2388
- if (ht.set(o, r), ht.size > Ar) {
2389
- const a = ht.keys().next().value;
2390
- ht.delete(a);
2408
+ if (wt.set(o, r), wt.size > Ar) {
2409
+ const a = wt.keys().next().value;
2410
+ wt.delete(a);
2391
2411
  }
2392
2412
  }
2393
2413
  function si() {
2394
- ht.clear();
2414
+ wt.clear();
2395
2415
  }
2396
2416
  function ci(t) {
2397
2417
  Dt = Math.max(1, Math.floor(t)), Tt();
@@ -2404,54 +2424,54 @@ function Qn(t = 1500, e) {
2404
2424
  return;
2405
2425
  }
2406
2426
  let a = null;
2407
- function l() {
2408
- Et.delete(c), a != null && clearTimeout(a), e && e.removeEventListener("abort", d);
2427
+ function u() {
2428
+ Et.delete(c), a != null && clearTimeout(a), e && e.removeEventListener("abort", m);
2409
2429
  }
2410
2430
  function c() {
2411
- l(), r();
2431
+ u(), r();
2412
2432
  }
2413
- function d() {
2414
- l();
2433
+ function m() {
2434
+ u();
2415
2435
  const s = new Error("Aborted");
2416
2436
  s.name = "AbortError", o(s);
2417
2437
  }
2418
2438
  a = t > 0 ? setTimeout(() => {
2419
- l(), o(new Error("Timeout waiting for worker slot"));
2420
- }, t) : null, e && e.addEventListener("abort", d, { once: !0 }), Et.add(c);
2439
+ u(), o(new Error("Timeout waiting for worker slot"));
2440
+ }, t) : null, e && e.addEventListener("abort", m, { once: !0 }), Et.add(c);
2421
2441
  });
2422
2442
  }
2423
- const vt = {
2443
+ const xt = {
2424
2444
  timeout: 2e3,
2425
2445
  waitTimeout: 1500,
2426
2446
  backoffMs: 30,
2427
2447
  maxRetries: 1
2428
2448
  };
2429
2449
  function li(t) {
2430
- t.timeout != null && (vt.timeout = Math.max(0, Math.floor(t.timeout))), t.waitTimeout != null && (vt.waitTimeout = Math.max(0, Math.floor(t.waitTimeout))), t.backoffMs != null && (vt.backoffMs = Math.max(0, Math.floor(t.backoffMs))), t.maxRetries != null && (vt.maxRetries = Math.max(0, Math.floor(t.maxRetries)));
2450
+ t.timeout != null && (xt.timeout = Math.max(0, Math.floor(t.timeout))), t.waitTimeout != null && (xt.waitTimeout = Math.max(0, Math.floor(t.waitTimeout))), t.backoffMs != null && (xt.backoffMs = Math.max(0, Math.floor(t.backoffMs))), t.maxRetries != null && (xt.maxRetries = Math.max(0, Math.floor(t.maxRetries)));
2431
2451
  }
2432
2452
  function ui() {
2433
- return { ...vt };
2453
+ return { ...xt };
2434
2454
  }
2435
2455
  async function $r(t, e = !0, r = {}) {
2436
2456
  var g, f, h, C;
2437
- const o = (g = r.timeout) != null ? g : vt.timeout, a = (f = r.waitTimeout) != null ? f : vt.waitTimeout, l = (h = r.backoffMs) != null ? h : vt.backoffMs, c = (C = r.maxRetries) != null ? C : vt.maxRetries, d = r.signal;
2457
+ const o = (g = r.timeout) != null ? g : xt.timeout, a = (f = r.waitTimeout) != null ? f : xt.waitTimeout, u = (h = r.backoffMs) != null ? h : xt.backoffMs, c = (C = r.maxRetries) != null ? C : xt.maxRetries, m = r.signal;
2438
2458
  let s = 0;
2439
2459
  for (; ; ) {
2440
- if (d != null && d.aborted) {
2460
+ if (m != null && m.aborted) {
2441
2461
  const w = new Error("Aborted");
2442
2462
  throw w.name = "AbortError", w;
2443
2463
  }
2444
2464
  try {
2445
- return await Zn(t, e, o, d);
2465
+ return await Zn(t, e, o, m);
2446
2466
  } catch (w) {
2447
2467
  if ((w == null ? void 0 : w.code) !== Kt || s >= c)
2448
2468
  throw w;
2449
- if (s++, await Qn(a, d).catch(() => {
2450
- }), d != null && d.aborted) {
2451
- const y = new Error("Aborted");
2452
- throw y.name = "AbortError", y;
2469
+ if (s++, await Qn(a, m).catch(() => {
2470
+ }), m != null && m.aborted) {
2471
+ const x = new Error("Aborted");
2472
+ throw x.name = "AbortError", x;
2453
2473
  }
2454
- l > 0 && await new Promise((y) => setTimeout(y, l * s));
2474
+ u > 0 && await new Promise((x) => setTimeout(x, u * s));
2455
2475
  }
2456
2476
  }
2457
2477
  }
@@ -2468,75 +2488,75 @@ async function Fr() {
2468
2488
  }
2469
2489
  }
2470
2490
  function eo({ node: t }) {
2471
- const e = S(null), [r, o] = B(!0), a = S(0);
2472
- return F(() => {
2491
+ const e = R(null), [r, o] = P(!0), a = R(0);
2492
+ return W(() => {
2473
2493
  var g;
2474
- let l = !1;
2475
- const c = new AbortController(), d = ++a.current, s = (g = t.content) != null ? g : "";
2494
+ let u = !1;
2495
+ const c = new AbortController(), m = ++a.current, s = (g = t.content) != null ? g : "";
2476
2496
  return s ? ($r(s, !0, {
2477
2497
  timeout: 3e3,
2478
2498
  waitTimeout: 2e3,
2479
2499
  maxRetries: 1,
2480
2500
  signal: c.signal
2481
2501
  }).then((f) => {
2482
- l || d !== a.current || (e.current && (e.current.innerHTML = f), o(!1));
2502
+ u || m !== a.current || (e.current && (e.current.innerHTML = f), o(!1));
2483
2503
  }).catch(async (f) => {
2484
- if (l || d !== a.current || !e.current)
2504
+ if (u || m !== a.current || !e.current)
2485
2505
  return;
2486
2506
  const h = (f == null ? void 0 : f.code) || (f == null ? void 0 : f.name);
2487
2507
  if (h === "WORKER_INIT_ERROR" || (f == null ? void 0 : f.fallbackToRenderer) || (h === Kt || h === "WORKER_TIMEOUT")) {
2488
- const y = await Fr();
2489
- if (y)
2508
+ const x = await Fr();
2509
+ if (x)
2490
2510
  try {
2491
- const N = y.renderToString(s, {
2511
+ const S = x.renderToString(s, {
2492
2512
  throwOnError: t.loading,
2493
2513
  displayMode: !0
2494
2514
  });
2495
- !l && d === a.current && e.current && (e.current.innerHTML = N, o(!1), Or(s, !0, N));
2515
+ !u && m === a.current && e.current && (e.current.innerHTML = S, o(!1), Or(s, !0, S));
2496
2516
  return;
2497
2517
  } catch {
2498
2518
  }
2499
2519
  }
2500
2520
  t.loading || (e.current.textContent = t.raw, o(!1));
2501
2521
  }), () => {
2502
- l = !0, c.abort();
2522
+ u = !0, c.abort();
2503
2523
  }) : (o(!1), () => c.abort());
2504
2524
  }, [t.content, t.loading, t.raw]), /* @__PURE__ */ n.jsx("div", { className: "math-block text-center overflow-x-auto relative min-h-[40px]", children: /* @__PURE__ */ n.jsx("div", { ref: e, className: r ? "math-rendering" : void 0 }) });
2505
2525
  }
2506
2526
  function to({ node: t }) {
2507
- const e = S(null), r = S(null), [o, a] = B(!0), l = S(0);
2508
- return F(() => {
2527
+ const e = R(null), r = R(null), [o, a] = P(!0), u = R(0);
2528
+ return W(() => {
2509
2529
  var f;
2510
2530
  let c = !1;
2511
- const d = new AbortController(), s = ++l.current, g = (f = t.content) != null ? f : "";
2531
+ const m = new AbortController(), s = ++u.current, g = (f = t.content) != null ? f : "";
2512
2532
  return g ? ($r(g, !1, {
2513
2533
  timeout: 1500,
2514
2534
  waitTimeout: 0,
2515
2535
  maxRetries: 0,
2516
- signal: d.signal
2536
+ signal: m.signal
2517
2537
  }).then((h) => {
2518
- c || s !== l.current || r.current && (r.current.innerHTML = h, a(!1));
2538
+ c || s !== u.current || r.current && (r.current.innerHTML = h, a(!1));
2519
2539
  }).catch(async (h) => {
2520
- if (c || s !== l.current || !r.current)
2540
+ if (c || s !== u.current || !r.current)
2521
2541
  return;
2522
2542
  const C = (h == null ? void 0 : h.code) || (h == null ? void 0 : h.name);
2523
2543
  if (C === "WORKER_INIT_ERROR" || (h == null ? void 0 : h.fallbackToRenderer) || (C === Kt || C === "WORKER_TIMEOUT")) {
2524
- const N = await Fr();
2525
- if (N)
2544
+ const S = await Fr();
2545
+ if (S)
2526
2546
  try {
2527
- const A = N.renderToString(g, {
2547
+ const O = S.renderToString(g, {
2528
2548
  throwOnError: t.loading,
2529
2549
  displayMode: !1
2530
2550
  });
2531
- !c && s === l.current && r.current && (r.current.innerHTML = A, a(!1), Or(g, !1, A));
2551
+ !c && s === u.current && r.current && (r.current.innerHTML = O, a(!1), Or(g, !1, O));
2532
2552
  return;
2533
2553
  } catch {
2534
2554
  }
2535
2555
  }
2536
2556
  t.loading || (r.current.textContent = t.raw, a(!1));
2537
2557
  }), () => {
2538
- c = !0, d.abort();
2539
- }) : (a(!1), () => d.abort());
2558
+ c = !0, m.abort();
2559
+ }) : (a(!1), () => m.abort());
2540
2560
  }, [t.content, t.loading, t.raw]), /* @__PURE__ */ n.jsxs("span", { ref: e, className: "math-inline-wrapper", children: [
2541
2561
  /* @__PURE__ */ n.jsx("span", { ref: r, className: `math-inline${o ? " math-inline--hidden" : ""}` }),
2542
2562
  o && /* @__PURE__ */ n.jsxs("span", { className: "math-inline__loading", role: "status", "aria-live": "polite", children: [
@@ -2553,7 +2573,7 @@ function ro(t) {
2553
2573
  }
2554
2574
  return globalThis.setTimeout(t, 0);
2555
2575
  }
2556
- let Pe = null, xt = null;
2576
+ let Pe = null, yt = null;
2557
2577
  const Ve = /* @__PURE__ */ new Map(), no = 5;
2558
2578
  let zt = no, rr = !1;
2559
2579
  function di(t) {
@@ -2567,13 +2587,13 @@ function fi() {
2567
2587
  }
2568
2588
  const oo = "WORKER_BUSY";
2569
2589
  function hi(t) {
2570
- Pe = t, xt = null;
2590
+ Pe = t, yt = null;
2571
2591
  const e = t;
2572
2592
  Pe.onmessage = (r) => {
2573
2593
  if (Pe !== e)
2574
2594
  return;
2575
- const { id: o, ok: a, result: l, error: c } = r.data, d = Ve.get(o);
2576
- d && (a === !1 || c ? d.reject(new Error(c || "Unknown error")) : d.resolve(l));
2595
+ const { id: o, ok: a, result: u, error: c } = r.data, m = Ve.get(o);
2596
+ m && (a === !1 || c ? m.reject(new Error(c || "Unknown error")) : m.resolve(u));
2577
2597
  }, Pe.onerror = (r) => {
2578
2598
  var o, a;
2579
2599
  if (Pe === e) {
@@ -2585,7 +2605,7 @@ function hi(t) {
2585
2605
  rr ? console.error("[mermaidWorkerClient] Worker error:", (r == null ? void 0 : r.message) || r) : (a = console.debug) == null || a.call(console, "[mermaidWorkerClient] Worker error:", (r == null ? void 0 : r.message) || r);
2586
2606
  } catch {
2587
2607
  }
2588
- for (const [l, c] of Ve.entries())
2608
+ for (const [u, c] of Ve.entries())
2589
2609
  c.reject(new Error(`Worker error: ${r.message}`));
2590
2610
  Ve.clear();
2591
2611
  }
@@ -2600,7 +2620,7 @@ function hi(t) {
2600
2620
  rr ? console.error("[mermaidWorkerClient] Worker messageerror:", r) : (a = console.debug) == null || a.call(console, "[mermaidWorkerClient] Worker messageerror:", r);
2601
2621
  } catch {
2602
2622
  }
2603
- for (const [l, c] of Ve.entries())
2623
+ for (const [u, c] of Ve.entries())
2604
2624
  c.reject(new Error("Worker messageerror"));
2605
2625
  Ve.clear();
2606
2626
  }
@@ -2615,39 +2635,39 @@ function gi() {
2615
2635
  Ve.clear(), (t = Pe.terminate) == null || t.call(Pe);
2616
2636
  } catch {
2617
2637
  }
2618
- Pe = null, xt = null;
2638
+ Pe = null, yt = null;
2619
2639
  }
2620
2640
  function io() {
2621
- return Pe || (xt = new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."), xt.name = "WORKER_INIT_ERROR", xt.code = "WORKER_INIT_ERROR", null);
2641
+ return Pe || (yt = new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."), yt.name = "WORKER_INIT_ERROR", yt.code = "WORKER_INIT_ERROR", null);
2622
2642
  }
2623
2643
  function Wr(t, e, r = 1400) {
2624
- if (xt)
2625
- return Promise.reject(xt);
2644
+ if (yt)
2645
+ return Promise.reject(yt);
2626
2646
  const o = io();
2627
2647
  if (!o)
2628
- return Promise.reject(xt);
2648
+ return Promise.reject(yt);
2629
2649
  if (Ve.size >= zt) {
2630
2650
  const a = new Error("Worker busy");
2631
2651
  return a.name = "WorkerBusy", a.code = oo, a.inFlight = Ve.size, a.max = zt, Promise.reject(a);
2632
2652
  }
2633
- return new Promise((a, l) => {
2653
+ return new Promise((a, u) => {
2634
2654
  const c = Math.random().toString(36).slice(2);
2635
- let d = !1, s = null;
2655
+ let m = !1, s = null;
2636
2656
  const g = () => {
2637
- d || (d = !0, s != null && clearTimeout(s), Ve.delete(c));
2657
+ m || (m = !0, s != null && clearTimeout(s), Ve.delete(c));
2638
2658
  }, f = {
2639
2659
  resolve: (h) => {
2640
2660
  g(), a(h);
2641
2661
  },
2642
2662
  reject: (h) => {
2643
- g(), l(h);
2663
+ g(), u(h);
2644
2664
  }
2645
2665
  };
2646
2666
  Ve.set(c, f);
2647
2667
  try {
2648
2668
  o.postMessage({ id: c, action: t, payload: e });
2649
2669
  } catch (h) {
2650
- Ve.delete(c), l(h);
2670
+ Ve.delete(c), u(h);
2651
2671
  return;
2652
2672
  }
2653
2673
  s = setTimeout(() => {
@@ -2666,9 +2686,9 @@ async function so(t, e, r = 2400) {
2666
2686
  }
2667
2687
  function co() {
2668
2688
  var t;
2669
- (t = Pe == null ? void 0 : Pe.terminate) == null || t.call(Pe), Pe = null, xt = null, Ve.clear();
2689
+ (t = Pe == null ? void 0 : Pe.terminate) == null || t.call(Pe), Pe = null, yt = null, Ve.clear();
2670
2690
  }
2671
- let mt = null, br = !1, kr = null, _t = null;
2691
+ let gt = null, br = !1, kr = null, _t = null;
2672
2692
  function lo(t) {
2673
2693
  var o, a;
2674
2694
  const e = String((o = t == null ? void 0 : t.securityLevel) != null ? o : "loose"), r = (a = t == null ? void 0 : t.flowchart) == null ? void 0 : a.htmlLabels;
@@ -2686,8 +2706,8 @@ function $t(t, e) {
2686
2706
  }
2687
2707
  }
2688
2708
  async function uo(t) {
2689
- if (mt)
2690
- return $t(mt, t), mt;
2709
+ if (gt)
2710
+ return $t(gt, t), gt;
2691
2711
  if (_t) {
2692
2712
  const e = await _t;
2693
2713
  return e && $t(e, t), e;
@@ -2698,9 +2718,9 @@ async function uo(t) {
2698
2718
  br = !0, _t = (async () => {
2699
2719
  try {
2700
2720
  const r = await import("mermaid"), o = (r == null ? void 0 : r.default) || r;
2701
- if (o != null && o.default ? mt = o.default : o != null && o.mermaidAPI ? mt = o : o != null && o.mermaid ? mt = o.mermaid : mt = o, !mt)
2721
+ if (o != null && o.default ? gt = o.default : o != null && o.mermaidAPI ? gt = o : o != null && o.mermaid ? gt = o.mermaid : gt = o, !gt)
2702
2722
  throw new Error("Mermaid module did not export expected API");
2703
- return $t(mt, t != null ? t : { startOnLoad: !1, securityLevel: "loose" }), mt;
2723
+ return $t(gt, t != null ? t : { startOnLoad: !1, securityLevel: "loose" }), gt;
2704
2724
  } catch (r) {
2705
2725
  return console.warn("[markstream-react] Failed to load mermaid:", r), null;
2706
2726
  } finally {
@@ -2713,7 +2733,7 @@ async function uo(t) {
2713
2733
  return null;
2714
2734
  }
2715
2735
  }
2716
- const mo = typeof window != "undefined" ? Yr : F, fo = {
2736
+ const mo = typeof window != "undefined" ? Yr : W, fo = {
2717
2737
  USE_PROFILES: { svg: !0 },
2718
2738
  FORBID_TAGS: ["script"],
2719
2739
  FORBID_ATTR: [/^on/i],
@@ -2739,26 +2759,26 @@ function vo(t) {
2739
2759
  continue;
2740
2760
  }
2741
2761
  const a = Array.from(o.attributes);
2742
- for (const l of a) {
2743
- const c = l.name;
2762
+ for (const u of a) {
2763
+ const c = u.name;
2744
2764
  if (/^on/i.test(c)) {
2745
2765
  o.removeAttribute(c);
2746
2766
  continue;
2747
2767
  }
2748
- if (c === "style" && l.value) {
2749
- const d = l.value;
2750
- if (go.some((s) => s.test(d))) {
2768
+ if (c === "style" && u.value) {
2769
+ const m = u.value;
2770
+ if (go.some((s) => s.test(m))) {
2751
2771
  o.removeAttribute(c);
2752
2772
  continue;
2753
2773
  }
2754
2774
  }
2755
- if ((c === "href" || c === "xlink:href") && l.value) {
2756
- const d = wo(l.value);
2757
- if (!d) {
2775
+ if ((c === "href" || c === "xlink:href") && u.value) {
2776
+ const m = wo(u.value);
2777
+ if (!m) {
2758
2778
  o.removeAttribute(c);
2759
2779
  continue;
2760
2780
  }
2761
- d !== l.value && o.setAttribute(c, d);
2781
+ m !== u.value && o.setAttribute(c, m);
2762
2782
  }
2763
2783
  }
2764
2784
  }
@@ -2818,13 +2838,13 @@ const Lt = {
2818
2838
  isStrict: !1
2819
2839
  };
2820
2840
  function Hr(t) {
2821
- var Fe, Ge, ke, u, E, _, H, q, Ce;
2822
- const e = { ...Lt, ...t }, { t: r } = lr(), o = W(() => ur("mermaid"), []), a = (Ge = (Fe = e.node) == null ? void 0 : Fe.code) != null ? Ge : "", l = W(() => a.replace(/\]::([^:])/g, "]:::$1").replace(/:::subgraphNode$/gm, "::subgraphNode"), [a]), c = (ke = e.workerTimeoutMs) != null ? ke : Lt.workerTimeoutMs, d = (u = e.parseTimeoutMs) != null ? u : Lt.parseTimeoutMs, s = (E = e.renderTimeoutMs) != null ? E : Lt.renderTimeoutMs, g = (_ = e.fullRenderTimeoutMs) != null ? _ : Lt.fullRenderTimeoutMs, [f, h] = B(!1), [C, w] = B(!1), [y, N] = B(!1), [A, L] = B(!1), [M, I] = B(1), [O, re] = B({ x: 0, y: 0 }), [ue, de] = B(!1), [me, oe] = B(!1), [Se, U] = B(!1), [ce, we] = B(null), [J, K] = B(!1), [Ne, ye] = B(() => e.maxHeight == null ? "360px" : e.maxHeight), [Ae, ee] = B(typeof window == "undefined"), ne = S(null), xe = S(null), He = S(null), ie = S(null), st = S(null), Ze = S(null), Ue = S(null), x = S({ x: 0, y: 0 }), _e = S(0), be = S({}), Le = S(""), fe = S(!1), gt = S(null), ve = S(!1), pt = S({
2841
+ var Te, he, J, Ze, ft, nt, d, E, B;
2842
+ const e = { ...Lt, ...t }, { t: r } = lr(), o = H(() => ur("mermaid"), []), a = (he = (Te = e.node) == null ? void 0 : Te.code) != null ? he : "", u = H(() => a.replace(/\]::([^:])/g, "]:::$1").replace(/:::subgraphNode$/gm, "::subgraphNode"), [a]), c = (J = e.workerTimeoutMs) != null ? J : Lt.workerTimeoutMs, m = (Ze = e.parseTimeoutMs) != null ? Ze : Lt.parseTimeoutMs, s = (ft = e.renderTimeoutMs) != null ? ft : Lt.renderTimeoutMs, g = (nt = e.fullRenderTimeoutMs) != null ? nt : Lt.fullRenderTimeoutMs, [f, h] = P(!1), [C, w] = P(!1), [x, S] = P(!1), [O, L] = P(!1), [M, I] = P(1), [$, te] = P({ x: 0, y: 0 }), [ue, ie] = P(!1), [de, ce] = P(!1), [Se, V] = P(!1), [re, we] = P(null), [q, ye] = P(!1), [$e, oe] = P(() => e.maxHeight == null ? "360px" : e.maxHeight), [Ne, X] = P(typeof window == "undefined"), ne = R(null), ve = R(null), Fe = R(null), ae = R(null), st = R(null), Je = R(null), We = R(null), y = R({ x: 0, y: 0 }), De = R(0), be = R({}), _e = R(""), He = R(!1), ut = R(null), xe = R(!1), vt = R({
2823
2843
  zoom: 1,
2824
2844
  translateX: 0,
2825
2845
  translateY: 0,
2826
- containerHeight: Ne || "360px"
2827
- }), qe = It(), ze = !!((q = (H = e.node) == null ? void 0 : H.loading) != null ? q : e.loading), $ = e.isDark ? "dark" : "light", De = !!e.isStrict, Qe = W(() => De ? {
2846
+ containerHeight: $e || "360px"
2847
+ }), fe = It(), Xe = !!((E = (d = e.node) == null ? void 0 : d.loading) != null ? E : e.loading), Le = e.isDark ? "dark" : "light", Ie = !!e.isStrict, U = H(() => Ie ? {
2828
2848
  startOnLoad: !1,
2829
2849
  securityLevel: "strict",
2830
2850
  dompurifyConfig: fo,
@@ -2832,284 +2852,284 @@ function Hr(t) {
2832
2852
  } : {
2833
2853
  startOnLoad: !1,
2834
2854
  securityLevel: "loose"
2835
- }, [De]);
2836
- F(() => {
2837
- ve.current = Se;
2838
- }, [Se]), F(() => {
2855
+ }, [Ie]);
2856
+ W(() => {
2857
+ xe.current = Se;
2858
+ }, [Se]), W(() => {
2839
2859
  be.current = {};
2840
- }, [$, l, De]), F(() => {
2841
- let m = !1;
2860
+ }, [Le, u, Ie]), W(() => {
2861
+ let l = !1;
2842
2862
  return (async () => {
2843
- const v = await uo(Qe);
2844
- m || (ne.current = v, h(!!v), fe.current || w(!v));
2863
+ const v = await uo(U);
2864
+ l || (ne.current = v, h(!!v), He.current || w(!v));
2845
2865
  })(), () => {
2846
- m = !0;
2866
+ l = !0;
2847
2867
  };
2848
- }, [Qe]), F(() => {
2849
- const m = xe.current;
2850
- if (!m)
2868
+ }, [U]), W(() => {
2869
+ const l = ve.current;
2870
+ if (!l)
2851
2871
  return;
2852
- const v = qe(m, { rootMargin: "400px" });
2853
- return gt.current = v, v.isVisible() && ee(!0), v.whenVisible.then(() => ee(!0)), () => {
2854
- v.destroy(), gt.current = null;
2872
+ const v = fe(l, { rootMargin: "400px" });
2873
+ return ut.current = v, v.isVisible() && X(!0), v.whenVisible.then(() => X(!0)), () => {
2874
+ v.destroy(), ut.current = null;
2855
2875
  };
2856
- }, [qe]), F(() => {
2857
- if (typeof document == "undefined" || !J)
2876
+ }, [fe]), W(() => {
2877
+ if (typeof document == "undefined" || !q)
2858
2878
  return;
2859
- const m = document.body.style.overflow;
2879
+ const l = document.body.style.overflow;
2860
2880
  return document.body.style.overflow = "hidden", () => {
2861
- document.body.style.overflow = m;
2881
+ document.body.style.overflow = l;
2862
2882
  };
2863
- }, [J]);
2864
- const Oe = D((m) => {
2865
- const v = xe.current, X = ie.current;
2866
- if (!v || !X)
2883
+ }, [q]);
2884
+ const Ue = D((l) => {
2885
+ const v = ve.current, F = ae.current;
2886
+ if (!v || !F)
2867
2887
  return;
2868
- const z = X.querySelector("svg");
2869
- if (!z)
2888
+ const A = F.querySelector("svg");
2889
+ if (!A)
2870
2890
  return;
2871
- let P = 0, te = 0;
2872
- const Ee = z.getAttribute("viewBox");
2873
- if (Ee) {
2874
- const R = Ee.split(" ");
2875
- R.length === 4 && (P = Number.parseFloat(R[2]), te = Number.parseFloat(R[3]));
2891
+ let T = 0, Y = 0;
2892
+ const me = A.getAttribute("viewBox");
2893
+ if (me) {
2894
+ const _ = me.split(" ");
2895
+ _.length === 4 && (T = Number.parseFloat(_[2]), Y = Number.parseFloat(_[3]));
2876
2896
  }
2877
- if ((!P || !te) && z.hasAttribute("width") && z.hasAttribute("height") && (P = Number.parseFloat(z.getAttribute("width") || "0"), te = Number.parseFloat(z.getAttribute("height") || "0")), !P || !te || Number.isNaN(P) || Number.isNaN(te))
2897
+ if ((!T || !Y) && A.hasAttribute("width") && A.hasAttribute("height") && (T = Number.parseFloat(A.getAttribute("width") || "0"), Y = Number.parseFloat(A.getAttribute("height") || "0")), !T || !Y || Number.isNaN(T) || Number.isNaN(Y))
2878
2898
  try {
2879
- const R = z.getBBox();
2880
- P = R.width, te = R.height;
2899
+ const _ = A.getBBox();
2900
+ T = _.width, Y = _.height;
2881
2901
  } catch {
2882
2902
  return;
2883
2903
  }
2884
- if (!(P > 0 && te > 0))
2904
+ if (!(T > 0 && Y > 0))
2885
2905
  return;
2886
- const Ie = m != null ? m : v.clientWidth, i = te / P, p = Ie * i, k = Number.isFinite(p) && p > 0 ? p : te;
2887
- ye(`${Math.min(k, te)}px`);
2906
+ const ge = l != null ? l : v.clientWidth, i = Y / T, p = ge * i, k = Number.isFinite(p) && p > 0 ? p : Y;
2907
+ oe(`${Math.min(k, Y)}px`);
2888
2908
  }, []);
2889
- F(() => {
2890
- if (!xe.current || typeof ResizeObserver == "undefined")
2909
+ W(() => {
2910
+ if (!ve.current || typeof ResizeObserver == "undefined")
2891
2911
  return;
2892
- const m = new ResizeObserver((v) => {
2912
+ const l = new ResizeObserver((v) => {
2893
2913
  if (!v.length)
2894
2914
  return;
2895
- const X = v[0].contentRect.width;
2896
- ro(() => Oe(X));
2915
+ const F = v[0].contentRect.width;
2916
+ ro(() => Ue(F));
2897
2917
  });
2898
- return m.observe(xe.current), () => m.disconnect();
2899
- }, [Oe]), F(() => () => {
2918
+ return l.observe(ve.current), () => l.disconnect();
2919
+ }, [Ue]), W(() => () => {
2900
2920
  co();
2901
2921
  }, []);
2902
- const ct = D(async (m, v, X) => {
2903
- var z;
2904
- if (!ne.current || !ie.current)
2922
+ const bt = D(async (l, v, F) => {
2923
+ var A;
2924
+ if (!ne.current || !ae.current)
2905
2925
  return !1;
2906
- oe(!0);
2926
+ ce(!0);
2907
2927
  try {
2908
- const P = `mermaid-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, te = nr(m, v), Ee = await Vt(
2909
- () => ne.current.render(P, te),
2910
- { timeoutMs: g, signal: X }
2928
+ const T = `mermaid-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, Y = nr(l, v), me = await Vt(
2929
+ () => ne.current.render(T, Y),
2930
+ { timeoutMs: g, signal: F }
2911
2931
  );
2912
- if (!(Ee != null && Ee.svg))
2932
+ if (!(me != null && me.svg))
2913
2933
  return !1;
2914
- const Ie = jr(ie.current, Ee.svg, De);
2915
- return (z = Ee.bindFunctions) == null || z.call(Ee, ie.current), Oe(), be.current[v] = Ie, U(!0), we(null), !0;
2916
- } catch (P) {
2917
- return ze || we(P instanceof Error ? P.message : String(P)), !1;
2934
+ const ge = jr(ae.current, me.svg, Ie);
2935
+ return (A = me.bindFunctions) == null || A.call(me, ae.current), Ue(), be.current[v] = ge, V(!0), we(null), !0;
2936
+ } catch (T) {
2937
+ return Xe || we(T instanceof Error ? T.message : String(T)), !1;
2918
2938
  } finally {
2919
- oe(!1);
2939
+ ce(!1);
2920
2940
  }
2921
- }, [g, ze, De, Oe]), rt = D(async (m, v, X) => {
2922
- var z;
2923
- if (!(!ne.current || !ie.current)) {
2924
- oe(!0);
2941
+ }, [g, Xe, Ie, Ue]), Ge = D(async (l, v, F) => {
2942
+ var A;
2943
+ if (!(!ne.current || !ae.current)) {
2944
+ ce(!0);
2925
2945
  try {
2926
- const P = `mermaid-preview-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, te = zr(m), Ee = nr(te || m, v), Ie = await Vt(
2927
- () => ne.current.render(P, Ee),
2928
- { timeoutMs: s, signal: X }
2946
+ const T = `mermaid-preview-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, Y = zr(l), me = nr(Y || l, v), ge = await Vt(
2947
+ () => ne.current.render(T, me),
2948
+ { timeoutMs: s, signal: F }
2929
2949
  );
2930
- Ie != null && Ie.svg && (jr(ie.current, Ie.svg, De), (z = Ie.bindFunctions) == null || z.call(Ie, ie.current), Oe());
2950
+ ge != null && ge.svg && (jr(ae.current, ge.svg, Ie), (A = ge.bindFunctions) == null || A.call(ge, ae.current), Ue());
2931
2951
  } catch {
2932
2952
  } finally {
2933
- oe(!1);
2953
+ ce(!1);
2934
2954
  }
2935
2955
  }
2936
- }, [s, ze, De, Oe]), $e = D(async (m, v) => {
2937
- if (!m.trim()) {
2938
- Pt(ie.current), U(!1), Le.current = "";
2956
+ }, [s, Xe, Ie, Ue]), et = D(async (l, v) => {
2957
+ if (!l.trim()) {
2958
+ Pt(ae.current), V(!1), _e.current = "";
2939
2959
  return;
2940
2960
  }
2941
- const X = m.replace(/\s+/g, "");
2942
- if (X === Le.current && ve.current)
2961
+ const F = l.replace(/\s+/g, "");
2962
+ if (F === _e.current && xe.current)
2943
2963
  return;
2944
- const z = ++_e.current;
2964
+ const A = ++De.current;
2945
2965
  try {
2946
- if (await bo(m, $, {
2966
+ if (await bo(l, Le, {
2947
2967
  workerTimeout: c,
2948
- parseTimeout: d,
2968
+ parseTimeout: m,
2949
2969
  mermaid: ne.current,
2950
2970
  signal: v
2951
- }), v != null && v.aborted || _e.current !== z)
2971
+ }), v != null && v.aborted || De.current !== A)
2952
2972
  return;
2953
- await ct(m, $, v) && (Le.current = X);
2973
+ await bt(l, Le, v) && (_e.current = F);
2954
2974
  return;
2955
- } catch (P) {
2956
- if ((P == null ? void 0 : P.name) === "AbortError")
2975
+ } catch (T) {
2976
+ if ((T == null ? void 0 : T.name) === "AbortError")
2957
2977
  return;
2958
2978
  }
2959
2979
  try {
2960
- const P = await ko(m, $, { workerTimeout: c, signal: v });
2961
- if (!P || v != null && v.aborted || _e.current !== z)
2980
+ const T = await ko(l, Le, { workerTimeout: c, signal: v });
2981
+ if (!T || v != null && v.aborted || De.current !== A)
2962
2982
  return;
2963
- await rt(P, $, v);
2983
+ await Ge(T, Le, v);
2964
2984
  } catch {
2965
2985
  }
2966
- }, [d, ct, rt, $, c]);
2967
- F(() => {
2968
- if (!Ae || C || y)
2986
+ }, [m, bt, Ge, Le, c]);
2987
+ W(() => {
2988
+ if (!Ne || C || x)
2969
2989
  return;
2970
- const m = new AbortController();
2971
- return $e(l, m.signal), () => m.abort();
2972
- }, [l, y, $e, C, Ae]);
2973
- const je = D((m, v) => {
2974
- const X = { x: m.clientX, y: m.clientY };
2975
- Ut(m.currentTarget, v, "top", !1, X, e.isDark);
2976
- }, [e.isDark]), et = D(async () => {
2977
- var m, v;
2990
+ const l = new AbortController();
2991
+ return et(u, l.signal), () => l.abort();
2992
+ }, [u, x, et, C, Ne]);
2993
+ const Me = D((l, v) => {
2994
+ const F = { x: l.clientX, y: l.clientY };
2995
+ Ut(l.currentTarget, v, "top", !1, F, e.isDark);
2996
+ }, [e.isDark]), ze = D(async () => {
2997
+ var l, v;
2978
2998
  try {
2979
- await ((m = navigator.clipboard) == null ? void 0 : m.writeText(l)), L(!0), (v = e.onCopy) == null || v.call(e, l), setTimeout(() => L(!1), 1e3);
2999
+ await ((l = navigator.clipboard) == null ? void 0 : l.writeText(u)), L(!0), (v = e.onCopy) == null || v.call(e, u), setTimeout(() => L(!1), 1e3);
2980
3000
  } catch {
2981
3001
  }
2982
- }, [l, e]), ut = D(() => {
2983
- var z, P, te;
2984
- const m = (P = (z = ie.current) == null ? void 0 : z.querySelector("svg")) != null ? P : null;
2985
- if (!m)
3002
+ }, [u, e]), dt = D(() => {
3003
+ var A, T, Y;
3004
+ const l = (T = (A = ae.current) == null ? void 0 : A.querySelector("svg")) != null ? T : null;
3005
+ if (!l)
2986
3006
  return;
2987
- const v = or(m), X = {
3007
+ const v = or(l), F = {
2988
3008
  payload: { type: "export" },
2989
3009
  defaultPrevented: !1,
2990
3010
  preventDefault() {
2991
3011
  this.defaultPrevented = !0;
2992
3012
  },
2993
- svgElement: m,
3013
+ svgElement: l,
2994
3014
  svgString: v
2995
3015
  };
2996
- (te = e.onExport) == null || te.call(e, X), X.defaultPrevented || jo(m, v);
2997
- }, [e]), he = D(() => {
2998
- Ue.current = null, Pt(Ze.current);
2999
- }, []), tt = D(() => {
3000
- K(!1), he();
3001
- }, [he]), wt = D(() => {
3002
- var z, P, te;
3003
- const m = (P = (z = ie.current) == null ? void 0 : z.querySelector("svg")) != null ? P : null, v = m ? or(m) : null, X = {
3016
+ (Y = e.onExport) == null || Y.call(e, F), F.defaultPrevented || jo(l, v);
3017
+ }, [e]), ct = D(() => {
3018
+ We.current = null, Pt(Je.current);
3019
+ }, []), Ke = D(() => {
3020
+ ye(!1), ct();
3021
+ }, [ct]), mt = D(() => {
3022
+ var A, T, Y;
3023
+ const l = (T = (A = ae.current) == null ? void 0 : A.querySelector("svg")) != null ? T : null, v = l ? or(l) : null, F = {
3004
3024
  payload: { type: "open-modal" },
3005
3025
  defaultPrevented: !1,
3006
3026
  preventDefault() {
3007
3027
  this.defaultPrevented = !0;
3008
3028
  },
3009
- svgElement: m,
3029
+ svgElement: l,
3010
3030
  svgString: v
3011
3031
  };
3012
- (te = e.onOpenModal) == null || te.call(e, X), !X.defaultPrevented && K(!0);
3032
+ (Y = e.onOpenModal) == null || Y.call(e, F), !F.defaultPrevented && ye(!0);
3013
3033
  }, [e]);
3014
- F(() => {
3015
- if (!J || typeof window == "undefined")
3034
+ W(() => {
3035
+ if (!q || typeof window == "undefined")
3016
3036
  return;
3017
- const m = (v) => {
3018
- v.key === "Escape" && tt();
3037
+ const l = (v) => {
3038
+ v.key === "Escape" && Ke();
3019
3039
  };
3020
3040
  try {
3021
- window.addEventListener("keydown", m);
3041
+ window.addEventListener("keydown", l);
3022
3042
  } catch {
3023
3043
  }
3024
3044
  return () => {
3025
3045
  try {
3026
- window.removeEventListener("keydown", m);
3046
+ window.removeEventListener("keydown", l);
3027
3047
  } catch {
3028
3048
  }
3029
3049
  };
3030
- }, [tt, J]), mo(() => {
3031
- if (!J)
3050
+ }, [Ke, q]), mo(() => {
3051
+ if (!q)
3032
3052
  return;
3033
- const m = Ze.current, v = xe.current;
3034
- if (!m || !v)
3053
+ const l = Je.current, v = ve.current;
3054
+ if (!l || !v)
3035
3055
  return;
3036
- const X = `translate(${O.x}px, ${O.y}px) scale(${M})`, z = v.cloneNode(!0);
3037
- z.classList.add("fullscreen");
3038
- const P = z.querySelector("[data-mermaid-wrapper]");
3039
- P && (Ue.current = P, P.style.transform = X), Pt(m), m.appendChild(z);
3040
- }, [J]), F(() => {
3041
- J && Ue.current && (Ue.current.style.transform = `translate(${O.x}px, ${O.y}px) scale(${M})`);
3042
- }, [J, O.x, O.y, M]);
3043
- const Ke = C || me || y, nt = W(() => e.isDark ? "mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200" : "mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700", [e.isDark]), b = D((m) => {
3044
- var X;
3056
+ const F = `translate(${$.x}px, ${$.y}px) scale(${M})`, A = v.cloneNode(!0);
3057
+ A.classList.add("fullscreen");
3058
+ const T = A.querySelector("[data-mermaid-wrapper]");
3059
+ T && (We.current = T, T.style.transform = F), Pt(l), l.appendChild(A);
3060
+ }, [q]), W(() => {
3061
+ q && We.current && (We.current.style.transform = `translate(${$.x}px, ${$.y}px) scale(${M})`);
3062
+ }, [q, $.x, $.y, M]);
3063
+ const le = C || de || x, rt = H(() => e.isDark ? "mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200" : "mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700", [e.isDark]), b = D((l) => {
3064
+ var F;
3045
3065
  const v = {
3046
- payload: { type: "toggle-mode", target: m },
3066
+ payload: { type: "toggle-mode", target: l },
3047
3067
  defaultPrevented: !1,
3048
3068
  preventDefault() {
3049
3069
  this.defaultPrevented = !0;
3050
3070
  }
3051
3071
  };
3052
- if ((X = e.onToggleMode) == null || X.call(e, m, v), !v.defaultPrevented)
3053
- if (fe.current = !0, m === "preview") {
3072
+ if ((F = e.onToggleMode) == null || F.call(e, l, v), !v.defaultPrevented)
3073
+ if (He.current = !0, l === "preview") {
3054
3074
  w(!1);
3055
- const z = pt.current;
3056
- I(z.zoom), re({ x: z.translateX, y: z.translateY }), ye(z.containerHeight), ve.current && be.current[$] && ie.current ? (ie.current.innerHTML = be.current[$], Oe()) : $e(l);
3075
+ const A = vt.current;
3076
+ I(A.zoom), te({ x: A.translateX, y: A.translateY }), oe(A.containerHeight), xe.current && be.current[Le] && ae.current ? (ae.current.innerHTML = be.current[Le], Ue()) : et(u);
3057
3077
  } else
3058
- pt.current = {
3078
+ vt.current = {
3059
3079
  zoom: M,
3060
- translateX: O.x,
3061
- translateY: O.y,
3062
- containerHeight: Ne
3080
+ translateX: $.x,
3081
+ translateY: $.y,
3082
+ containerHeight: $e
3063
3083
  }, w(!0);
3064
3084
  }, [
3065
- l,
3066
- Ne,
3085
+ u,
3067
3086
  $e,
3087
+ et,
3068
3088
  e,
3069
- $,
3070
- O.x,
3071
- O.y,
3072
- Oe,
3089
+ Le,
3090
+ $.x,
3091
+ $.y,
3092
+ Ue,
3073
3093
  M
3074
- ]), j = D((m) => {
3075
- if (e.enableWheelZoom === !1 || !m.ctrlKey && !m.metaKey)
3094
+ ]), j = D((l) => {
3095
+ if (e.enableWheelZoom === !1 || !l.ctrlKey && !l.metaKey)
3076
3096
  return;
3077
- m.preventDefault();
3078
- const v = xe.current;
3097
+ l.preventDefault();
3098
+ const v = ve.current;
3079
3099
  if (!v)
3080
3100
  return;
3081
- const X = v.getBoundingClientRect(), z = m.clientX - X.left - O.x, P = m.clientY - X.top - O.y, te = -m.deltaY * 0.01, Ee = Gt(M + te, 0.5, 3);
3082
- if (Ee === M)
3101
+ const F = v.getBoundingClientRect(), A = l.clientX - F.left - $.x, T = l.clientY - F.top - $.y, Y = -l.deltaY * 0.01, me = Gt(M + Y, 0.5, 3);
3102
+ if (me === M)
3083
3103
  return;
3084
- const Ie = Ee / M;
3085
- re({
3086
- x: O.x - z * (Ie - 1),
3087
- y: O.y - P * (Ie - 1)
3088
- }), I(Ee);
3089
- }, [O, M]), T = D((m, v) => {
3090
- de(!0), x.current = {
3091
- x: m - O.x,
3092
- y: v - O.y
3104
+ const ge = me / M;
3105
+ te({
3106
+ x: $.x - A * (ge - 1),
3107
+ y: $.y - T * (ge - 1)
3108
+ }), I(me);
3109
+ }, [$, M]), N = D((l, v) => {
3110
+ ie(!0), y.current = {
3111
+ x: l - $.x,
3112
+ y: v - $.y
3093
3113
  };
3094
- }, [O.x, O.y]), V = D((m, v) => {
3095
- ue && re({
3096
- x: m - x.current.x,
3097
- y: v - x.current.y
3114
+ }, [$.x, $.y]), z = D((l, v) => {
3115
+ ue && te({
3116
+ x: l - y.current.x,
3117
+ y: v - y.current.y
3098
3118
  });
3099
- }, [ue]), Y = D(() => {
3100
- de(!1);
3101
- }, []), le = /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
3119
+ }, [ue]), Z = D(() => {
3120
+ ie(!1);
3121
+ }, []), Q = /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
3102
3122
  e.showZoomControls && /* @__PURE__ */ n.jsx("div", { className: "absolute top-2 right-2 z-10 rounded-lg", children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 backdrop-blur rounded-lg", children: [
3103
3123
  /* @__PURE__ */ n.jsx(
3104
3124
  "button",
3105
3125
  {
3106
3126
  type: "button",
3107
- className: Me(
3127
+ className: Ee(
3108
3128
  "p-2 text-xs rounded transition-colors",
3109
3129
  e.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"
3110
3130
  ),
3111
- onMouseEnter: (m) => je(m, r("common.zoomIn")),
3112
- onMouseLeave: () => We(),
3131
+ onMouseEnter: (l) => Me(l, r("common.zoomIn")),
3132
+ onMouseLeave: () => Oe(),
3113
3133
  onClick: () => I(Gt(M + 0.1, 0.5, 3)),
3114
3134
  children: "+"
3115
3135
  }
@@ -3118,12 +3138,12 @@ function Hr(t) {
3118
3138
  "button",
3119
3139
  {
3120
3140
  type: "button",
3121
- className: Me(
3141
+ className: Ee(
3122
3142
  "p-2 text-xs rounded transition-colors",
3123
3143
  e.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"
3124
3144
  ),
3125
- onMouseEnter: (m) => je(m, r("common.zoomOut")),
3126
- onMouseLeave: () => We(),
3145
+ onMouseEnter: (l) => Me(l, r("common.zoomOut")),
3146
+ onMouseLeave: () => Oe(),
3127
3147
  onClick: () => I(Gt(M - 0.1, 0.5, 3)),
3128
3148
  children: "−"
3129
3149
  }
@@ -3132,14 +3152,14 @@ function Hr(t) {
3132
3152
  "button",
3133
3153
  {
3134
3154
  type: "button",
3135
- className: Me(
3155
+ className: Ee(
3136
3156
  "p-2 text-xs rounded transition-colors",
3137
3157
  e.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"
3138
3158
  ),
3139
- onMouseEnter: (m) => je(m, r("common.resetZoom")),
3140
- onMouseLeave: () => We(),
3159
+ onMouseEnter: (l) => Me(l, r("common.resetZoom")),
3160
+ onMouseLeave: () => Oe(),
3141
3161
  onClick: () => {
3142
- I(1), re({ x: 0, y: 0 });
3162
+ I(1), te({ x: 0, y: 0 });
3143
3163
  },
3144
3164
  children: [
3145
3165
  Math.round(M * 100),
@@ -3151,56 +3171,56 @@ function Hr(t) {
3151
3171
  /* @__PURE__ */ n.jsxs(
3152
3172
  "div",
3153
3173
  {
3154
- ref: xe,
3155
- className: Me(
3174
+ ref: ve,
3175
+ className: Ee(
3156
3176
  "min-h-[360px] relative transition-all duration-100 overflow-hidden block",
3157
3177
  e.isDark ? "bg-gray-900" : "bg-gray-50"
3158
3178
  ),
3159
- style: { height: Ne, maxHeight: (Ce = e.maxHeight) != null ? Ce : void 0 },
3179
+ style: { height: $e, maxHeight: (B = e.maxHeight) != null ? B : void 0 },
3160
3180
  onWheel: j,
3161
- onMouseDown: (m) => {
3162
- m.button === 0 && (m.preventDefault(), T(m.clientX, m.clientY));
3181
+ onMouseDown: (l) => {
3182
+ l.button === 0 && (l.preventDefault(), N(l.clientX, l.clientY));
3163
3183
  },
3164
- onMouseMove: (m) => V(m.clientX, m.clientY),
3165
- onMouseUp: Y,
3166
- onMouseLeave: Y,
3167
- onTouchStart: (m) => {
3168
- const v = m.touches[0];
3169
- v && T(v.clientX, v.clientY);
3184
+ onMouseMove: (l) => z(l.clientX, l.clientY),
3185
+ onMouseUp: Z,
3186
+ onMouseLeave: Z,
3187
+ onTouchStart: (l) => {
3188
+ const v = l.touches[0];
3189
+ v && N(v.clientX, v.clientY);
3170
3190
  },
3171
- onTouchMove: (m) => {
3172
- const v = m.touches[0];
3173
- v && V(v.clientX, v.clientY);
3191
+ onTouchMove: (l) => {
3192
+ const v = l.touches[0];
3193
+ v && z(v.clientX, v.clientY);
3174
3194
  },
3175
- onTouchEnd: Y,
3195
+ onTouchEnd: Z,
3176
3196
  children: [
3177
3197
  /* @__PURE__ */ n.jsx(
3178
3198
  "div",
3179
3199
  {
3180
- ref: He,
3200
+ ref: Fe,
3181
3201
  "data-mermaid-wrapper": !0,
3182
- className: Me("absolute inset-0 cursor-grab", { "cursor-grabbing": ue }),
3183
- style: { transform: `translate(${O.x}px, ${O.y}px) scale(${M})` },
3202
+ className: Ee("absolute inset-0 cursor-grab", { "cursor-grabbing": ue }),
3203
+ style: { transform: `translate(${$.x}px, ${$.y}px) scale(${M})` },
3184
3204
  children: /* @__PURE__ */ n.jsx(
3185
3205
  "div",
3186
3206
  {
3187
- ref: ie,
3207
+ ref: ae,
3188
3208
  className: "_mermaid w-full text-center flex items-center justify-center min-h-full"
3189
3209
  }
3190
3210
  )
3191
3211
  }
3192
3212
  ),
3193
- (me || ze) && /* @__PURE__ */ n.jsxs("div", { className: "mermaid-loading", children: [
3213
+ (de || Xe) && /* @__PURE__ */ n.jsxs("div", { className: "mermaid-loading", children: [
3194
3214
  /* @__PURE__ */ n.jsx("span", { className: "mermaid-spinner" }),
3195
3215
  /* @__PURE__ */ n.jsx("span", { children: "Rendering diagram…" })
3196
3216
  ] })
3197
3217
  ]
3198
3218
  }
3199
3219
  )
3200
- ] }), Z = e.showHeader && /* @__PURE__ */ n.jsxs(
3220
+ ] }), je = e.showHeader && /* @__PURE__ */ n.jsxs(
3201
3221
  "div",
3202
3222
  {
3203
- className: Me(
3223
+ className: Ee(
3204
3224
  "mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b",
3205
3225
  e.isDark ? "bg-gray-800 border-gray-700/30" : "bg-gray-50 border-gray-200"
3206
3226
  ),
@@ -3213,22 +3233,22 @@ function Hr(t) {
3213
3233
  dangerouslySetInnerHTML: { __html: o }
3214
3234
  }
3215
3235
  ),
3216
- /* @__PURE__ */ n.jsx("span", { className: Me("text-sm font-medium font-mono truncate", e.isDark ? "text-gray-400" : "text-gray-600"), children: "Mermaid" })
3236
+ /* @__PURE__ */ n.jsx("span", { className: Ee("text-sm font-medium font-mono truncate", e.isDark ? "text-gray-400" : "text-gray-600"), children: "Mermaid" })
3217
3237
  ] }),
3218
- e.showModeToggle && f && /* @__PURE__ */ n.jsxs("div", { className: Me("flex items-center space-x-1 rounded-md p-0.5", e.isDark ? "bg-gray-700" : "bg-gray-100"), children: [
3238
+ e.showModeToggle && f && /* @__PURE__ */ n.jsxs("div", { className: Ee("flex items-center space-x-1 rounded-md p-0.5", e.isDark ? "bg-gray-700" : "bg-gray-100"), children: [
3219
3239
  /* @__PURE__ */ n.jsx(
3220
3240
  "button",
3221
3241
  {
3222
3242
  type: "button",
3223
- className: Me(
3243
+ className: Ee(
3224
3244
  "px-2.5 py-1 text-xs rounded transition-colors",
3225
3245
  C ? e.isDark ? "text-gray-400 hover:text-gray-200" : "text-gray-500 hover:text-gray-700" : e.isDark ? "bg-gray-600 text-gray-200 shadow-sm" : "bg-white text-gray-700 shadow-sm"
3226
3246
  ),
3227
3247
  onClick: () => b("preview"),
3228
- onMouseEnter: (m) => je(m, r("common.preview")),
3229
- onFocus: (m) => je(m, r("common.preview")),
3230
- onMouseLeave: () => We(),
3231
- onBlur: () => We(),
3248
+ onMouseEnter: (l) => Me(l, r("common.preview")),
3249
+ onFocus: (l) => Me(l, r("common.preview")),
3250
+ onMouseLeave: () => Oe(),
3251
+ onBlur: () => Oe(),
3232
3252
  children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center space-x-1", children: [
3233
3253
  /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsxs("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", children: [
3234
3254
  /* @__PURE__ */ n.jsx("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0" }),
@@ -3242,15 +3262,15 @@ function Hr(t) {
3242
3262
  "button",
3243
3263
  {
3244
3264
  type: "button",
3245
- className: Me(
3265
+ className: Ee(
3246
3266
  "px-2.5 py-1 text-xs rounded transition-colors",
3247
3267
  C ? e.isDark ? "bg-gray-600 text-gray-200 shadow-sm" : "bg-white text-gray-700 shadow-sm" : e.isDark ? "text-gray-400 hover:text-gray-200" : "text-gray-500 hover:text-gray-700"
3248
3268
  ),
3249
3269
  onClick: () => b("source"),
3250
- onMouseEnter: (m) => je(m, r("common.source")),
3251
- onFocus: (m) => je(m, r("common.source")),
3252
- onMouseLeave: () => We(),
3253
- onBlur: () => We(),
3270
+ onMouseEnter: (l) => Me(l, r("common.source")),
3271
+ onFocus: (l) => Me(l, r("common.source")),
3272
+ onMouseLeave: () => Oe(),
3273
+ onBlur: () => Oe(),
3254
3274
  children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center space-x-1", children: [
3255
3275
  /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "m16 18l6-6l-6-6M8 6l-6 6l6 6" }) }),
3256
3276
  /* @__PURE__ */ n.jsx("span", { children: r("common.source") })
@@ -3263,17 +3283,17 @@ function Hr(t) {
3263
3283
  "button",
3264
3284
  {
3265
3285
  type: "button",
3266
- className: nt,
3267
- "aria-pressed": y,
3268
- onClick: () => N((m) => !m),
3269
- onMouseEnter: (m) => je(m, r(y ? "common.expand" : "common.collapse")),
3270
- onFocus: (m) => je(m, r(y ? "common.expand" : "common.collapse")),
3271
- onMouseLeave: () => We(),
3272
- onBlur: () => We(),
3286
+ className: rt,
3287
+ "aria-pressed": x,
3288
+ onClick: () => S((l) => !l),
3289
+ onMouseEnter: (l) => Me(l, r(x ? "common.expand" : "common.collapse")),
3290
+ onFocus: (l) => Me(l, r(x ? "common.expand" : "common.collapse")),
3291
+ onMouseLeave: () => Oe(),
3292
+ onBlur: () => Oe(),
3273
3293
  children: /* @__PURE__ */ n.jsx(
3274
3294
  "svg",
3275
3295
  {
3276
- style: { rotate: y ? "0deg" : "90deg" },
3296
+ style: { rotate: x ? "0deg" : "90deg" },
3277
3297
  xmlns: "http://www.w3.org/2000/svg",
3278
3298
  xmlnsXlink: "http://www.w3.org/1999/xlink",
3279
3299
  "aria-hidden": "true",
@@ -3291,13 +3311,13 @@ function Hr(t) {
3291
3311
  "button",
3292
3312
  {
3293
3313
  type: "button",
3294
- className: nt,
3295
- onClick: et,
3296
- onMouseEnter: (m) => je(m, r(A ? "common.copySuccess" : "common.copy")),
3297
- onFocus: (m) => je(m, r(A ? "common.copySuccess" : "common.copy")),
3298
- onMouseLeave: () => We(),
3299
- onBlur: () => We(),
3300
- children: A ? /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M20 6L9 17l-5-5" }) }) : /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsxs("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", children: [
3314
+ className: rt,
3315
+ onClick: ze,
3316
+ onMouseEnter: (l) => Me(l, r(O ? "common.copySuccess" : "common.copy")),
3317
+ onFocus: (l) => Me(l, r(O ? "common.copySuccess" : "common.copy")),
3318
+ onMouseLeave: () => Oe(),
3319
+ onBlur: () => Oe(),
3320
+ children: O ? /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M20 6L9 17l-5-5" }) }) : /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsxs("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", children: [
3301
3321
  /* @__PURE__ */ n.jsx("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
3302
3322
  /* @__PURE__ */ n.jsx("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
3303
3323
  ] }) })
@@ -3307,13 +3327,13 @@ function Hr(t) {
3307
3327
  "button",
3308
3328
  {
3309
3329
  type: "button",
3310
- className: Me(nt, Ke ? "opacity-50 cursor-not-allowed" : ""),
3311
- disabled: Ke,
3312
- onClick: ut,
3313
- onMouseEnter: (m) => je(m, r("common.export")),
3314
- onFocus: (m) => je(m, r("common.export")),
3315
- onMouseLeave: () => We(),
3316
- onBlur: () => We(),
3330
+ className: Ee(rt, le ? "opacity-50 cursor-not-allowed" : ""),
3331
+ disabled: le,
3332
+ onClick: dt,
3333
+ onMouseEnter: (l) => Me(l, r("common.export")),
3334
+ onFocus: (l) => Me(l, r("common.export")),
3335
+ onMouseLeave: () => Oe(),
3336
+ onBlur: () => Oe(),
3317
3337
  children: /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsxs("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", children: [
3318
3338
  /* @__PURE__ */ n.jsx("path", { d: "M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
3319
3339
  /* @__PURE__ */ n.jsx("path", { d: "m7 10l5 5l5-5" })
@@ -3324,57 +3344,57 @@ function Hr(t) {
3324
3344
  "button",
3325
3345
  {
3326
3346
  type: "button",
3327
- className: Me(nt, Ke ? "opacity-50 cursor-not-allowed" : ""),
3328
- disabled: Ke,
3329
- onClick: J ? tt : wt,
3330
- onMouseEnter: (m) => je(m, r(J ? "common.minimize" : "common.open")),
3331
- onFocus: (m) => je(m, r(J ? "common.minimize" : "common.open")),
3332
- onMouseLeave: () => We(),
3333
- onBlur: () => We(),
3334
- children: J ? /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6" }) }) : /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6" }) })
3347
+ className: Ee(rt, le ? "opacity-50 cursor-not-allowed" : ""),
3348
+ disabled: le,
3349
+ onClick: q ? Ke : mt,
3350
+ onMouseEnter: (l) => Me(l, r(q ? "common.minimize" : "common.open")),
3351
+ onFocus: (l) => Me(l, r(q ? "common.minimize" : "common.open")),
3352
+ onMouseLeave: () => Oe(),
3353
+ onBlur: () => Oe(),
3354
+ children: q ? /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6" }) }) : /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", className: "w-3 h-3", children: /* @__PURE__ */ n.jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6" }) })
3335
3355
  }
3336
3356
  )
3337
3357
  ] })
3338
3358
  ]
3339
3359
  }
3340
- ), ae = /* @__PURE__ */ n.jsxs("div", { children: [
3341
- C ? /* @__PURE__ */ n.jsx("div", { className: Me("p-4", e.isDark ? "bg-gray-900 text-gray-300" : "bg-gray-50 text-gray-700"), children: /* @__PURE__ */ n.jsx("pre", { className: "text-sm font-mono whitespace-pre-wrap", children: l }) }) : le,
3342
- ce && /* @__PURE__ */ n.jsx("div", { className: "mermaid-error", children: ce })
3360
+ ), Be = /* @__PURE__ */ n.jsxs("div", { children: [
3361
+ C ? /* @__PURE__ */ n.jsx("div", { className: Ee("p-4", e.isDark ? "bg-gray-900 text-gray-300" : "bg-gray-50 text-gray-700"), children: /* @__PURE__ */ n.jsx("pre", { className: "text-sm font-mono whitespace-pre-wrap", children: u }) }) : Q,
3362
+ re && /* @__PURE__ */ n.jsx("div", { className: "mermaid-error", children: re })
3343
3363
  ] });
3344
3364
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3345
3365
  /* @__PURE__ */ n.jsxs(
3346
3366
  "div",
3347
3367
  {
3348
- className: Me(
3368
+ className: Ee(
3349
3369
  "my-4 rounded-lg border overflow-hidden shadow-sm mermaid-block",
3350
3370
  e.isDark ? "border-gray-700/30" : "border-gray-200",
3351
- { "is-rendering": ze }
3371
+ { "is-rendering": Xe }
3352
3372
  ),
3353
3373
  children: [
3354
- Z,
3355
- !y && /* @__PURE__ */ n.jsx("div", { ref: st, children: ae })
3374
+ je,
3375
+ !x && /* @__PURE__ */ n.jsx("div", { ref: st, children: Be })
3356
3376
  ]
3357
3377
  }
3358
3378
  ),
3359
- J && typeof document != "undefined" && ir(
3379
+ q && typeof document != "undefined" && ir(
3360
3380
  /* @__PURE__ */ n.jsx(
3361
3381
  "div",
3362
3382
  {
3363
3383
  className: "mermaid-modal-overlay",
3364
- onClick: () => tt(),
3384
+ onClick: () => Ke(),
3365
3385
  children: /* @__PURE__ */ n.jsxs(
3366
3386
  "div",
3367
3387
  {
3368
- className: Me("mermaid-modal-panel", { "is-dark": e.isDark }),
3388
+ className: Ee("mermaid-modal-panel", { "is-dark": e.isDark }),
3369
3389
  role: "dialog",
3370
3390
  "aria-modal": "true",
3371
- onClick: (m) => m.stopPropagation(),
3391
+ onClick: (l) => l.stopPropagation(),
3372
3392
  children: [
3373
3393
  /* @__PURE__ */ n.jsxs("div", { className: "mermaid-modal-header", children: [
3374
3394
  /* @__PURE__ */ n.jsx("span", { className: "mermaid-modal-title", children: "Mermaid Preview" }),
3375
- /* @__PURE__ */ n.jsx("button", { type: "button", className: "mermaid-modal-close", onClick: tt, children: "Close" })
3395
+ /* @__PURE__ */ n.jsx("button", { type: "button", className: "mermaid-modal-close", onClick: Ke, children: "Close" })
3376
3396
  ] }),
3377
- /* @__PURE__ */ n.jsx("div", { className: "mermaid-modal-body", children: /* @__PURE__ */ n.jsx("div", { ref: Ze, className: "mermaid-modal-content" }) })
3397
+ /* @__PURE__ */ n.jsx("div", { className: "mermaid-modal-body", children: /* @__PURE__ */ n.jsx("div", { ref: Je, className: "mermaid-modal-content" }) })
3378
3398
  ]
3379
3399
  }
3380
3400
  )
@@ -3400,8 +3420,8 @@ async function bo(t, e, r) {
3400
3420
  const o = nr(t, e), a = r.mermaid;
3401
3421
  if (typeof a.parse == "function")
3402
3422
  return await Vt(() => a.parse(o), { timeoutMs: r.parseTimeout, signal: r.signal }), !0;
3403
- const l = `mermaid-parse-${Math.random().toString(36).slice(2, 9)}`;
3404
- return await Vt(() => a.render(l, o), { timeoutMs: r.parseTimeout, signal: r.signal }), !0;
3423
+ const u = `mermaid-parse-${Math.random().toString(36).slice(2, 9)}`;
3424
+ return await Vt(() => a.render(u, o), { timeoutMs: r.parseTimeout, signal: r.signal }), !0;
3405
3425
  }
3406
3426
  async function ko(t, e, r) {
3407
3427
  try {
@@ -3438,20 +3458,20 @@ function zr(t) {
3438
3458
  }
3439
3459
  async function Vt(t, e = {}) {
3440
3460
  const { timeoutMs: r, signal: o } = e;
3441
- return o != null && o.aborted ? Promise.reject(new DOMException("Aborted", "AbortError")) : new Promise((a, l) => {
3442
- let c = !1, d = null;
3461
+ return o != null && o.aborted ? Promise.reject(new DOMException("Aborted", "AbortError")) : new Promise((a, u) => {
3462
+ let c = !1, m = null;
3443
3463
  function s() {
3444
- c || (c = !0, g(), l(new DOMException("Aborted", "AbortError")));
3464
+ c || (c = !0, g(), u(new DOMException("Aborted", "AbortError")));
3445
3465
  }
3446
3466
  function g() {
3447
- d != null && clearTimeout(d), o && o.removeEventListener("abort", s);
3467
+ m != null && clearTimeout(m), o && o.removeEventListener("abort", s);
3448
3468
  }
3449
- o && o.addEventListener("abort", s, { once: !0 }), r && r > 0 && (d = setTimeout(() => {
3450
- c || (c = !0, g(), l(new Error("Operation timed out")));
3469
+ o && o.addEventListener("abort", s, { once: !0 }), r && r > 0 && (m = setTimeout(() => {
3470
+ c || (c = !0, g(), u(new Error("Operation timed out")));
3451
3471
  }, r)), t().then((f) => {
3452
3472
  c || (c = !0, g(), a(f));
3453
3473
  }).catch((f) => {
3454
- c || (c = !0, g(), l(f));
3474
+ c || (c = !0, g(), u(f));
3455
3475
  });
3456
3476
  });
3457
3477
  }
@@ -3459,8 +3479,8 @@ function or(t) {
3459
3479
  return new XMLSerializer().serializeToString(t);
3460
3480
  }
3461
3481
  function jo(t, e) {
3462
- const r = e != null ? e : or(t), o = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(o), l = document.createElement("a");
3463
- l.href = a, l.download = `mermaid-${Date.now()}.svg`, document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(a);
3482
+ const r = e != null ? e : or(t), o = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(o), u = document.createElement("a");
3483
+ u.href = a, u.download = `mermaid-${Date.now()}.svg`, document.body.appendChild(u), u.click(), document.body.removeChild(u), URL.revokeObjectURL(a);
3464
3484
  }
3465
3485
  function Co(t) {
3466
3486
  const { node: e } = t;
@@ -3472,22 +3492,22 @@ function Co(t) {
3472
3492
  }
3473
3493
  function Mo(t) {
3474
3494
  var f;
3475
- const { node: e, ctx: r, renderNode: o, indexKey: a, children: l } = t;
3495
+ const { node: e, ctx: r, renderNode: o, indexKey: a, children: u } = t;
3476
3496
  if (!r || !o)
3477
- return /* @__PURE__ */ n.jsx("p", { dir: "auto", className: "paragraph-node", children: l });
3478
- const c = (f = e.children) != null ? f : [], d = [], s = [], g = () => {
3497
+ return /* @__PURE__ */ n.jsx("p", { dir: "auto", className: "paragraph-node", children: u });
3498
+ const c = (f = e.children) != null ? f : [], m = [], s = [], g = () => {
3479
3499
  if (!s.length)
3480
3500
  return;
3481
- const h = d.length;
3482
- d.push(
3483
- /* @__PURE__ */ n.jsx("p", { dir: "auto", className: "paragraph-node", children: Xe(s.slice(), r, `${String(a != null ? a : "paragraph")}-${h}`, o) }, `${String(a != null ? a : "paragraph")}-inline-${h}`)
3501
+ const h = m.length;
3502
+ m.push(
3503
+ /* @__PURE__ */ n.jsx("p", { dir: "auto", className: "paragraph-node", children: qe(s.slice(), r, `${String(a != null ? a : "paragraph")}-${h}`, o) }, `${String(a != null ? a : "paragraph")}-inline-${h}`)
3484
3504
  ), s.length = 0;
3485
3505
  };
3486
3506
  return c.forEach((h, C) => {
3487
- en.has(h.type) ? (g(), d.push(
3488
- /* @__PURE__ */ n.jsx(jt.Fragment, { children: o(h, `${String(a != null ? a : "paragraph")}-block-${C}`, r) }, `${String(a != null ? a : "paragraph")}-block-${C}`)
3507
+ en.has(h.type) ? (g(), m.push(
3508
+ /* @__PURE__ */ n.jsx(Ct.Fragment, { children: o(h, `${String(a != null ? a : "paragraph")}-block-${C}`, r) }, `${String(a != null ? a : "paragraph")}-block-${C}`)
3489
3509
  )) : s.push(h);
3490
- }), g(), d.length ? /* @__PURE__ */ n.jsx(n.Fragment, { children: d }) : /* @__PURE__ */ n.jsx("p", { dir: "auto", className: "paragraph-node", children: Xe(c, r, String(a != null ? a : "paragraph"), o) });
3510
+ }), g(), m.length ? /* @__PURE__ */ n.jsx(n.Fragment, { children: m }) : /* @__PURE__ */ n.jsx("p", { dir: "auto", className: "paragraph-node", children: qe(c, r, String(a != null ? a : "paragraph"), o) });
3491
3511
  }
3492
3512
  function Eo(t) {
3493
3513
  const { node: e } = t, r = D((o) => {
@@ -3530,43 +3550,43 @@ function No(t) {
3530
3550
  }
3531
3551
  function _o(t) {
3532
3552
  var g;
3533
- const { node: e, ctx: r, renderNode: o, indexKey: a } = t, l = Array.isArray((g = e == null ? void 0 : e.header) == null ? void 0 : g.cells) ? e.header.cells : [], c = !!(e != null && e.loading), d = Array.isArray(e == null ? void 0 : e.rows) ? e.rows : [], s = (f) => f === "right" ? "text-right" : f === "center" ? "text-center" : "text-left";
3553
+ const { node: e, ctx: r, renderNode: o, indexKey: a } = t, u = Array.isArray((g = e == null ? void 0 : e.header) == null ? void 0 : g.cells) ? e.header.cells : [], c = !!(e != null && e.loading), m = Array.isArray(e == null ? void 0 : e.rows) ? e.rows : [], s = (f) => f === "right" ? "text-right" : f === "center" ? "text-center" : "text-left";
3534
3554
  return /* @__PURE__ */ n.jsxs("div", { className: "table-node-wrapper", "data-index-key": a, children: [
3535
3555
  /* @__PURE__ */ n.jsxs(
3536
3556
  "table",
3537
3557
  {
3538
- className: Me(
3558
+ className: Ee(
3539
3559
  "my-8 text-sm table-node",
3540
3560
  c && "table-node--loading"
3541
3561
  ),
3542
3562
  "aria-busy": c,
3543
3563
  children: [
3544
- /* @__PURE__ */ n.jsx("thead", { className: "border-[var(--table-border,#cbd5e1)]", children: /* @__PURE__ */ n.jsx("tr", { className: "border-b", children: l.map((f, h) => /* @__PURE__ */ n.jsx(
3564
+ /* @__PURE__ */ n.jsx("thead", { className: "border-[var(--table-border,#cbd5e1)]", children: /* @__PURE__ */ n.jsx("tr", { className: "border-b", children: u.map((f, h) => /* @__PURE__ */ n.jsx(
3545
3565
  "th",
3546
3566
  {
3547
- className: Me("font-semibold p-[calc(4/7*1em)]", s(f.align)),
3567
+ className: Ee("font-semibold p-[calc(4/7*1em)]", s(f.align)),
3548
3568
  dir: "auto",
3549
3569
  children: r && o ? Ht(f.children, r, `${String(a != null ? a : "table")}-th-${h}`, o) : null
3550
3570
  },
3551
3571
  `header-${h}`
3552
3572
  )) }) }),
3553
- /* @__PURE__ */ n.jsx("tbody", { children: d.map((f, h) => {
3573
+ /* @__PURE__ */ n.jsx("tbody", { children: m.map((f, h) => {
3554
3574
  var C;
3555
3575
  return /* @__PURE__ */ n.jsx(
3556
3576
  "tr",
3557
3577
  {
3558
- className: Me(
3578
+ className: Ee(
3559
3579
  "border-[var(--table-border,#cbd5e1)]",
3560
- h < d.length - 1 && "border-b"
3580
+ h < m.length - 1 && "border-b"
3561
3581
  ),
3562
- children: (C = f.cells) == null ? void 0 : C.map((w, y) => /* @__PURE__ */ n.jsx(
3582
+ children: (C = f.cells) == null ? void 0 : C.map((w, x) => /* @__PURE__ */ n.jsx(
3563
3583
  "td",
3564
3584
  {
3565
- className: Me("p-[calc(4/7*1em)]", s(w.align)),
3585
+ className: Ee("p-[calc(4/7*1em)]", s(w.align)),
3566
3586
  dir: "auto",
3567
- children: r && o ? Ht(w.children, r, `${String(a != null ? a : "table")}-row-${h}-${y}`, o) : null
3587
+ children: r && o ? Ht(w.children, r, `${String(a != null ? a : "table")}-row-${h}-${x}`, o) : null
3568
3588
  },
3569
- `cell-${h}-${y}`
3589
+ `cell-${h}-${x}`
3570
3590
  ))
3571
3591
  },
3572
3592
  `row-${h}`
@@ -3586,7 +3606,7 @@ function Cr(t) {
3586
3606
  return /* @__PURE__ */ n.jsx(
3587
3607
  "span",
3588
3608
  {
3589
- className: Me(
3609
+ className: Ee(
3590
3610
  "text-node whitespace-pre-wrap break-words",
3591
3611
  e.center && "text-node-center"
3592
3612
  ),
@@ -3598,11 +3618,11 @@ function Lo() {
3598
3618
  return /* @__PURE__ */ n.jsx("hr", { className: "hr-node thematic-break" });
3599
3619
  }
3600
3620
  function Bo(t) {
3601
- const { node: e, ctx: r, renderNode: o, indexKey: a } = t, l = `vmr-container vmr-container-${e.name}`, c = W(() => {
3621
+ const { node: e, ctx: r, renderNode: o, indexKey: a } = t, u = `vmr-container vmr-container-${e.name}`, c = H(() => {
3602
3622
  if (e.attrs)
3603
3623
  return Array.isArray(e.attrs) ? ar(e.attrs) : e.attrs;
3604
3624
  }, [e.attrs]);
3605
- return /* @__PURE__ */ n.jsx("div", { className: l, ...c, children: r && o && Array.isArray(e.children) ? e.children.map((d, s) => /* @__PURE__ */ n.jsx(jt.Fragment, { children: o(d, `${String(a != null ? a : "vmr-container")}-${s}`, r) }, `${String(a != null ? a : "vmr-container")}-${s}`)) : null });
3625
+ return /* @__PURE__ */ n.jsx("div", { className: u, ...c, children: r && o && Array.isArray(e.children) ? e.children.map((m, s) => /* @__PURE__ */ n.jsx(Ct.Fragment, { children: o(m, `${String(a != null ? a : "vmr-container")}-${s}`, r) }, `${String(a != null ? a : "vmr-container")}-${s}`)) : null });
3606
3626
  }
3607
3627
  function Po(t) {
3608
3628
  const r = String(t != null ? t : "").match(/^\s*<\s*([A-Z][\w:-]*)/i);
@@ -3616,12 +3636,12 @@ function Do(t, e) {
3616
3636
  return r.replace(o, "").replace(a, "");
3617
3637
  }
3618
3638
  function Io(t, e, r) {
3619
- var a, l, c, d, s, g;
3620
- const o = ft(String(t.language || ""));
3639
+ var a, u, c, m, s, g;
3640
+ const o = pt(String(t.language || ""));
3621
3641
  if (o === "mermaid") {
3622
3642
  const f = cr(r.customId).mermaid;
3623
3643
  if (f)
3624
- return jt.createElement(f, { key: e, node: t, isDark: r.isDark });
3644
+ return Ct.createElement(f, { key: e, node: t, isDark: r.isDark });
3625
3645
  if (!r.renderCodeBlocksAsPre)
3626
3646
  return /* @__PURE__ */ n.jsx(
3627
3647
  Hr,
@@ -3640,9 +3660,9 @@ function Io(t, e, r) {
3640
3660
  loading: !!t.loading,
3641
3661
  stream: r.codeBlockStream,
3642
3662
  darkTheme: (a = r.codeBlockThemes) == null ? void 0 : a.darkTheme,
3643
- lightTheme: (l = r.codeBlockThemes) == null ? void 0 : l.lightTheme,
3663
+ lightTheme: (u = r.codeBlockThemes) == null ? void 0 : u.lightTheme,
3644
3664
  monacoOptions: (c = r.codeBlockThemes) == null ? void 0 : c.monacoOptions,
3645
- themes: (d = r.codeBlockThemes) == null ? void 0 : d.themes,
3665
+ themes: (m = r.codeBlockThemes) == null ? void 0 : m.themes,
3646
3666
  minWidth: (s = r.codeBlockThemes) == null ? void 0 : s.minWidth,
3647
3667
  maxWidth: (g = r.codeBlockThemes) == null ? void 0 : g.maxWidth,
3648
3668
  isDark: r.isDark,
@@ -3653,10 +3673,10 @@ function Io(t, e, r) {
3653
3673
  );
3654
3674
  }
3655
3675
  function Re(t, e, r) {
3656
- var l, c;
3676
+ var u, c;
3657
3677
  const o = cr(r.customId), a = o[t.type];
3658
3678
  if (a)
3659
- return jt.createElement(a, {
3679
+ return Ct.createElement(a, {
3660
3680
  key: e,
3661
3681
  node: t,
3662
3682
  customId: r.customId,
@@ -3667,15 +3687,15 @@ function Re(t, e, r) {
3667
3687
  typewriter: r.typewriter
3668
3688
  });
3669
3689
  if (t.type === "html_block" || t.type === "html_inline") {
3670
- const d = String((l = t.tag) != null ? l : "").trim().toLowerCase() || Po(t.content), s = d ? o[d] : null;
3690
+ const m = String((u = t.tag) != null ? u : "").trim().toLowerCase() || Po(t.content), s = m ? o[m] : null;
3671
3691
  if (s) {
3672
3692
  const g = {
3673
3693
  ...t,
3674
- type: d,
3675
- tag: d,
3676
- content: Do(t.content, d)
3694
+ type: m,
3695
+ tag: m,
3696
+ content: Do(t.content, m)
3677
3697
  };
3678
- return jt.createElement(s, {
3698
+ return Ct.createElement(s, {
3679
3699
  key: e,
3680
3700
  node: g,
3681
3701
  customId: r.customId,
@@ -3735,22 +3755,22 @@ function Re(t, e, r) {
3735
3755
  Ro,
3736
3756
  {
3737
3757
  node: t,
3738
- children: Xe(t.children, r, `${String(e)}-strong`, Re)
3758
+ children: qe(t.children, r, `${String(e)}-strong`, Re)
3739
3759
  },
3740
3760
  e
3741
3761
  );
3742
3762
  case "emphasis":
3743
- return /* @__PURE__ */ n.jsx(In, { node: t, children: Xe(t.children, r, `${String(e)}-em`, Re) }, e);
3763
+ return /* @__PURE__ */ n.jsx(In, { node: t, children: qe(t.children, r, `${String(e)}-em`, Re) }, e);
3744
3764
  case "strikethrough":
3745
- return /* @__PURE__ */ n.jsx(To, { node: t, children: Xe(t.children, r, `${String(e)}-strike`, Re) }, e);
3765
+ return /* @__PURE__ */ n.jsx(To, { node: t, children: qe(t.children, r, `${String(e)}-strike`, Re) }, e);
3746
3766
  case "highlight":
3747
- return /* @__PURE__ */ n.jsx(Hn, { node: t, children: Xe(t.children, r, `${String(e)}-highlight`, Re) }, e);
3767
+ return /* @__PURE__ */ n.jsx(Hn, { node: t, children: qe(t.children, r, `${String(e)}-highlight`, Re) }, e);
3748
3768
  case "insert":
3749
- return /* @__PURE__ */ n.jsx(Yn, { node: t, children: Xe(t.children, r, `${String(e)}-insert`, Re) }, e);
3769
+ return /* @__PURE__ */ n.jsx(Yn, { node: t, children: qe(t.children, r, `${String(e)}-insert`, Re) }, e);
3750
3770
  case "subscript":
3751
- return /* @__PURE__ */ n.jsx(So, { node: t, children: Xe(t.children, r, `${String(e)}-sub`, Re) }, e);
3771
+ return /* @__PURE__ */ n.jsx(So, { node: t, children: qe(t.children, r, `${String(e)}-sub`, Re) }, e);
3752
3772
  case "superscript":
3753
- return /* @__PURE__ */ n.jsx(No, { node: t, children: Xe(t.children, r, `${String(e)}-sup`, Re) }, e);
3773
+ return /* @__PURE__ */ n.jsx(No, { node: t, children: qe(t.children, r, `${String(e)}-sup`, Re) }, e);
3754
3774
  case "checkbox":
3755
3775
  case "checkbox_input":
3756
3776
  return /* @__PURE__ */ n.jsx(an, { node: t, typewriter: r.typewriter }, e);
@@ -3806,358 +3826,358 @@ const Wo = 32, Ho = 900, zo = ({
3806
3826
  indexPrefix: o,
3807
3827
  containerRef: a
3808
3828
  }) => {
3809
- var et, ut, he, tt, wt, Ke, nt;
3810
- const l = It(), c = typeof window != "undefined", d = typeof window != "undefined" && typeof window.requestIdleCallback == "function", s = Math.max(0, Math.trunc((et = t.renderBatchSize) != null ? et : 80)), g = Math.max(
3829
+ var ze, dt, ct, Ke, mt, le, rt;
3830
+ const u = It(), c = typeof window != "undefined", m = typeof window != "undefined" && typeof window.requestIdleCallback == "function", s = Math.max(0, Math.trunc((ze = t.renderBatchSize) != null ? ze : 80)), g = Math.max(
3811
3831
  0,
3812
- Math.trunc((ut = t.initialRenderBatchSize) != null ? ut : s || e.length)
3813
- ), f = t.batchRendering !== !1 && s > 0 && c, h = Math.max(0, (he = t.liveNodeBuffer) != null ? he : 60), C = Math.max(1, (tt = t.maxLiveNodes) != null ? tt : 320), w = ((wt = t.maxLiveNodes) != null ? wt : 0) > 0 && e.length > C, y = t.viewportPriority !== !1, N = f && ((Ke = t.maxLiveNodes) != null ? Ke : 0) <= 0, A = W(() => {
3832
+ Math.trunc((dt = t.initialRenderBatchSize) != null ? dt : s || e.length)
3833
+ ), f = t.batchRendering !== !1 && s > 0 && c, h = Math.max(0, (ct = t.liveNodeBuffer) != null ? ct : 60), C = Math.max(1, (Ke = t.maxLiveNodes) != null ? Ke : 320), w = ((mt = t.maxLiveNodes) != null ? mt : 0) > 0 && e.length > C, x = t.viewportPriority !== !1, S = f && ((le = t.maxLiveNodes) != null ? le : 0) <= 0, O = H(() => {
3814
3834
  var b;
3815
- return t.deferNodesUntilVisible === !1 || ((b = t.maxLiveNodes) != null ? b : 0) <= 0 || w || e.length > Ho ? !1 : y;
3835
+ return t.deferNodesUntilVisible === !1 || ((b = t.maxLiveNodes) != null ? b : 0) <= 0 || w || e.length > Ho ? !1 : x;
3816
3836
  }, [
3817
3837
  e.length,
3818
3838
  t.deferNodesUntilVisible,
3819
3839
  t.maxLiveNodes,
3820
- y,
3840
+ x,
3821
3841
  w
3822
- ]), [L, M] = B(() => N ? Math.min(e.length, g) : e.length), I = S(L);
3823
- F(() => {
3842
+ ]), [L, M] = P(() => S ? Math.min(e.length, g) : e.length), I = R(L);
3843
+ W(() => {
3824
3844
  I.current = L;
3825
3845
  }, [L]);
3826
- const O = N ? L : e.length, [re, ue] = B(0), [de, me] = B({ start: 0, end: e.length }), oe = S(/* @__PURE__ */ new Map()), [Se, U] = B(0), ce = S({}), we = S(/* @__PURE__ */ new Map()), J = S(/* @__PURE__ */ new Map()), K = S(/* @__PURE__ */ new Set()), Ne = S(L), ye = S(null), Ae = S(null), ee = S(null), ne = S(!1), xe = S(null), He = S(Math.max(1, s || 1)), ie = S(e.length), st = S({
3846
+ const $ = S ? L : e.length, [te, ue] = P(0), [ie, de] = P({ start: 0, end: e.length }), ce = R(/* @__PURE__ */ new Map()), [Se, V] = P(0), re = R({}), we = R(/* @__PURE__ */ new Map()), q = R(/* @__PURE__ */ new Map()), ye = R(/* @__PURE__ */ new Set()), $e = R(L), oe = R(null), Ne = R(null), X = R(null), ne = R(!1), ve = R(null), Fe = R(Math.max(1, s || 1)), ae = R(e.length), st = R({
3827
3847
  key: t.indexKey,
3828
3848
  total: e.length
3829
- }), Ze = S({
3849
+ }), Je = R({
3830
3850
  batchSize: s,
3831
3851
  initial: g,
3832
- delay: (nt = t.renderBatchDelay) != null ? nt : 16,
3833
- enabled: N
3834
- }), Ue = A || w, x = W(() => {
3835
- const b = oe.current;
3852
+ delay: (rt = t.renderBatchDelay) != null ? rt : 16,
3853
+ enabled: S
3854
+ }), We = O || w, y = H(() => {
3855
+ const b = ce.current;
3836
3856
  if (!b.size)
3837
3857
  return Wo;
3838
3858
  let j = 0;
3839
- for (const T of b.values())
3840
- j += T;
3859
+ for (const N of b.values())
3860
+ j += N;
3841
3861
  return Math.max(16, j / b.size);
3842
- }, [Se]), _e = W(() => {
3862
+ }, [Se]), De = H(() => {
3843
3863
  if (!w)
3844
- return e.map((V, Y) => ({ node: V, index: Y }));
3845
- const b = e.length, j = Math.max(0, Math.min(de.start, b)), T = Math.max(j, Math.min(de.end, b));
3846
- return e.slice(j, T).map((V, Y) => ({
3847
- node: V,
3848
- index: j + Y
3864
+ return e.map((z, Z) => ({ node: z, index: Z }));
3865
+ const b = e.length, j = Math.max(0, Math.min(ie.start, b)), N = Math.max(j, Math.min(ie.end, b));
3866
+ return e.slice(j, N).map((z, Z) => ({
3867
+ node: z,
3868
+ index: j + Z
3849
3869
  }));
3850
- }, [e, de, w]), be = W(() => {
3870
+ }, [e, ie, w]), be = H(() => {
3851
3871
  if (!w)
3852
3872
  return e.length;
3853
- const b = Math.max(de.end + h, g), j = Math.min(e.length, b);
3873
+ const b = Math.max(ie.end + h, g), j = Math.min(e.length, b);
3854
3874
  return Math.max(L, j);
3855
3875
  }, [
3856
3876
  e.length,
3857
3877
  w,
3858
- de.end,
3878
+ ie.end,
3859
3879
  h,
3860
3880
  g,
3861
3881
  L
3862
3882
  ]);
3863
- ie.current = be;
3864
- const Le = D((b, j) => {
3865
- var Y;
3883
+ ae.current = be;
3884
+ const _e = D((b, j) => {
3885
+ var Z;
3866
3886
  if (b >= j)
3867
3887
  return 0;
3868
- const T = oe.current;
3869
- let V = 0;
3870
- for (let le = b; le < j; le++)
3871
- V += (Y = T.get(le)) != null ? Y : x;
3872
- return V;
3873
- }, [x]), fe = w ? Le(0, Math.min(de.start, e.length)) : 0, gt = w ? Le(Math.min(de.end, e.length), e.length) : 0, ve = D(() => {
3874
- ye.current != null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(ye.current), ye.current = null), Ae.current != null && (window.clearTimeout(Ae.current), Ae.current = null), ee.current != null && typeof window.cancelIdleCallback == "function" && (window.cancelIdleCallback(ee.current), ee.current = null), ne.current = !1, xe.current = null;
3875
- }, []), pt = D((b) => {
3876
- var Y;
3877
- if (!N)
3888
+ const N = ce.current;
3889
+ let z = 0;
3890
+ for (let Q = b; Q < j; Q++)
3891
+ z += (Z = N.get(Q)) != null ? Z : y;
3892
+ return z;
3893
+ }, [y]), He = w ? _e(0, Math.min(ie.start, e.length)) : 0, ut = w ? _e(Math.min(ie.end, e.length), e.length) : 0, xe = D(() => {
3894
+ oe.current != null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(oe.current), oe.current = null), Ne.current != null && (window.clearTimeout(Ne.current), Ne.current = null), X.current != null && typeof window.cancelIdleCallback == "function" && (window.cancelIdleCallback(X.current), X.current = null), ne.current = !1, ve.current = null;
3895
+ }, []), vt = D((b) => {
3896
+ var Z;
3897
+ if (!S)
3878
3898
  return;
3879
- const j = Math.max(2, (Y = t.renderBatchBudgetMs) != null ? Y : 6), T = Math.max(1, s || 1), V = Math.max(1, Math.floor(T / 4));
3880
- b > j * 1.2 ? He.current = Math.max(V, Math.floor(He.current * 0.7)) : b < j * 0.5 && He.current < T && (He.current = Math.min(T, Math.ceil(He.current * 1.2)));
3881
- }, [N, t.renderBatchBudgetMs, s]), qe = D((b, j = {}) => {
3882
- var Fe, Ge;
3883
- if (!N)
3899
+ const j = Math.max(2, (Z = t.renderBatchBudgetMs) != null ? Z : 6), N = Math.max(1, s || 1), z = Math.max(1, Math.floor(N / 4));
3900
+ b > j * 1.2 ? Fe.current = Math.max(z, Math.floor(Fe.current * 0.7)) : b < j * 0.5 && Fe.current < N && (Fe.current = Math.min(N, Math.ceil(Fe.current * 1.2)));
3901
+ }, [S, t.renderBatchBudgetMs, s]), fe = D((b, j = {}) => {
3902
+ var Te, he;
3903
+ if (!S)
3884
3904
  return;
3885
- const T = ie.current;
3886
- if (I.current >= T)
3905
+ const N = ae.current;
3906
+ if (I.current >= N)
3887
3907
  return;
3888
- const V = Math.max(1, b), Y = (ke) => {
3889
- const u = typeof performance != "undefined" ? performance.now() : Date.now();
3890
- M((_) => {
3891
- const H = Math.min(ie.current, _ + Math.max(1, ke));
3892
- return I.current = H, H;
3908
+ const z = Math.max(1, b), Z = (J) => {
3909
+ const Ze = typeof performance != "undefined" ? performance.now() : Date.now();
3910
+ M((nt) => {
3911
+ const d = Math.min(ae.current, nt + Math.max(1, J));
3912
+ return I.current = d, d;
3893
3913
  });
3894
- const E = typeof performance != "undefined" ? performance.now() : Date.now();
3895
- pt(E - u);
3896
- }, le = () => {
3897
- const ke = Math.max(1, Math.round(He.current));
3898
- qe(ke);
3899
- }, Z = (ke) => {
3900
- var H;
3901
- ye.current = null, Ae.current = null, ee.current = null, ne.current = !1;
3902
- const u = xe.current;
3903
- xe.current = null;
3904
- const E = u != null ? u : V;
3905
- if (Y(E), I.current >= ie.current)
3914
+ const ft = typeof performance != "undefined" ? performance.now() : Date.now();
3915
+ vt(ft - Ze);
3916
+ }, Q = () => {
3917
+ const J = Math.max(1, Math.round(Fe.current));
3918
+ fe(J);
3919
+ }, je = (J) => {
3920
+ var d;
3921
+ oe.current = null, Ne.current = null, X.current = null, ne.current = !1;
3922
+ const Ze = ve.current;
3923
+ ve.current = null;
3924
+ const ft = Ze != null ? Ze : z;
3925
+ if (Z(ft), I.current >= ae.current)
3906
3926
  return;
3907
- if (!ke) {
3908
- le();
3927
+ if (!J) {
3928
+ Q();
3909
3929
  return;
3910
3930
  }
3911
- const _ = Math.max(2, (H = t.renderBatchBudgetMs) != null ? H : 6);
3912
- for (; I.current < ie.current && !((typeof ke.timeRemaining == "function" ? ke.timeRemaining() : 0) <= _ * 0.5); )
3913
- Y(Math.max(1, Math.round(He.current)));
3914
- I.current < ie.current && le();
3931
+ const nt = Math.max(2, (d = t.renderBatchBudgetMs) != null ? d : 6);
3932
+ for (; I.current < ae.current && !((typeof J.timeRemaining == "function" ? J.timeRemaining() : 0) <= nt * 0.5); )
3933
+ Z(Math.max(1, Math.round(Fe.current)));
3934
+ I.current < ae.current && Q();
3915
3935
  };
3916
3936
  if (!c || j.immediate) {
3917
- Z();
3937
+ je();
3918
3938
  return;
3919
3939
  }
3920
- const ae = Math.max(0, (Fe = t.renderBatchDelay) != null ? Fe : 16);
3921
- if (xe.current = xe.current != null ? Math.max(xe.current, V) : V, !ne.current) {
3922
- if (ne.current = !0, d) {
3923
- const ke = Math.max(0, (Ge = t.renderBatchIdleTimeoutMs) != null ? Ge : 120);
3924
- ee.current = window.requestIdleCallback((u) => Z(u), { timeout: ke });
3940
+ const Be = Math.max(0, (Te = t.renderBatchDelay) != null ? Te : 16);
3941
+ if (ve.current = ve.current != null ? Math.max(ve.current, z) : z, !ne.current) {
3942
+ if (ne.current = !0, m) {
3943
+ const J = Math.max(0, (he = t.renderBatchIdleTimeoutMs) != null ? he : 120);
3944
+ X.current = window.requestIdleCallback((Ze) => je(Ze), { timeout: J });
3925
3945
  return;
3926
3946
  }
3927
3947
  if (typeof requestAnimationFrame != "function") {
3928
- Ae.current = window.setTimeout(() => Z(), ae);
3948
+ Ne.current = window.setTimeout(() => je(), Be);
3929
3949
  return;
3930
3950
  }
3931
- ye.current = requestAnimationFrame(() => {
3932
- if (ae === 0) {
3933
- Z();
3951
+ oe.current = requestAnimationFrame(() => {
3952
+ if (Be === 0) {
3953
+ je();
3934
3954
  return;
3935
3955
  }
3936
- Ae.current = window.setTimeout(() => Z(), ae);
3956
+ Ne.current = window.setTimeout(() => je(), Be);
3937
3957
  });
3938
3958
  }
3939
3959
  }, [
3940
- pt,
3941
- d,
3942
- N,
3960
+ vt,
3961
+ m,
3962
+ S,
3943
3963
  c,
3944
3964
  t.renderBatchDelay,
3945
3965
  t.renderBatchBudgetMs,
3946
3966
  t.renderBatchIdleTimeoutMs
3947
3967
  ]);
3948
- F(() => {
3949
- var Ge;
3950
- const b = t.indexKey, j = e.length, T = st.current, V = b !== void 0 ? b !== T.key : j !== T.total;
3968
+ W(() => {
3969
+ var he;
3970
+ const b = t.indexKey, j = e.length, N = st.current, z = b !== void 0 ? b !== N.key : j !== N.total;
3951
3971
  st.current = { key: b, total: j };
3952
- const Y = Ze.current, le = (Ge = t.renderBatchDelay) != null ? Ge : 16, Z = Y.batchSize !== s || Y.initial !== g || Y.delay !== le || Y.enabled !== N;
3953
- if (Ze.current = {
3972
+ const Z = Je.current, Q = (he = t.renderBatchDelay) != null ? he : 16, je = Z.batchSize !== s || Z.initial !== g || Z.delay !== Q || Z.enabled !== S;
3973
+ if (Je.current = {
3954
3974
  batchSize: s,
3955
3975
  initial: g,
3956
- delay: le,
3957
- enabled: N
3958
- }, (V || Z || !N) && ve(), (V || Z) && (He.current = Math.max(1, s || 1), K.current.clear()), !j) {
3976
+ delay: Q,
3977
+ enabled: S
3978
+ }, (z || je || !S) && xe(), (z || je) && (Fe.current = Math.max(1, s || 1), ye.current.clear()), !j) {
3959
3979
  I.current = 0, M(0);
3960
3980
  return;
3961
3981
  }
3962
- const ae = ie.current;
3963
- if (!N) {
3964
- I.current = ae, M(ae);
3982
+ const Be = ae.current;
3983
+ if (!S) {
3984
+ I.current = Be, M(Be);
3965
3985
  return;
3966
3986
  }
3967
- if (V || Z) {
3968
- const ke = Math.min(ae, g);
3969
- I.current = ke, M(ke), ke < ae && qe(Math.max(1, g), { immediate: !c });
3987
+ if (z || je) {
3988
+ const J = Math.min(Be, g);
3989
+ I.current = J, M(J), J < Be && fe(Math.max(1, g), { immediate: !c });
3970
3990
  return;
3971
3991
  }
3972
- const Fe = Math.min(I.current, ae);
3973
- Fe !== I.current && (I.current = Fe, M(Fe)), I.current < ae && qe(Math.max(1, s || 1));
3992
+ const Te = Math.min(I.current, Be);
3993
+ Te !== I.current && (I.current = Te, M(Te)), I.current < Be && fe(Math.max(1, s || 1));
3974
3994
  }, [
3975
- ve,
3976
- N,
3995
+ xe,
3996
+ S,
3977
3997
  c,
3978
3998
  e.length,
3979
3999
  t.indexKey,
3980
4000
  t.renderBatchDelay,
3981
4001
  s,
3982
4002
  g,
3983
- qe
3984
- ]), F(() => {
4003
+ fe
4004
+ ]), W(() => {
3985
4005
  if (!w) {
3986
- me({ start: 0, end: e.length });
4006
+ de({ start: 0, end: e.length });
3987
4007
  return;
3988
4008
  }
3989
4009
  const b = e.length;
3990
4010
  if (!b) {
3991
- me({ start: 0, end: 0 });
4011
+ de({ start: 0, end: 0 });
3992
4012
  return;
3993
4013
  }
3994
- const j = Math.max(0, Math.min(re, b - 1));
3995
- let T = Math.max(0, j - h), V = Math.min(b, j + h + 1);
3996
- const Y = V - T;
3997
- if (Y > C) {
3998
- const le = Y - C;
3999
- T += Math.ceil(le / 2), V -= Math.floor(le / 2);
4000
- } else if (Y < C) {
4001
- const le = C - Y;
4002
- T = Math.max(0, T - Math.ceil(le / 2)), V = Math.min(b, V + Math.floor(le / 2));
4003
- }
4004
- me({ start: T, end: V });
4005
- }, [re, h, C, e.length, w]), F(() => () => {
4006
- ve();
4014
+ const j = Math.max(0, Math.min(te, b - 1));
4015
+ let N = Math.max(0, j - h), z = Math.min(b, j + h + 1);
4016
+ const Z = z - N;
4017
+ if (Z > C) {
4018
+ const Q = Z - C;
4019
+ N += Math.ceil(Q / 2), z -= Math.floor(Q / 2);
4020
+ } else if (Z < C) {
4021
+ const Q = C - Z;
4022
+ N = Math.max(0, N - Math.ceil(Q / 2)), z = Math.min(b, z + Math.floor(Q / 2));
4023
+ }
4024
+ de({ start: N, end: z });
4025
+ }, [te, h, C, e.length, w]), W(() => () => {
4026
+ xe();
4007
4027
  for (const b of we.current.values())
4008
4028
  b.destroy();
4009
4029
  we.current.clear();
4010
- }, [ve]);
4011
- const ze = D((b) => {
4012
- for (const [j, T] of we.current.entries())
4013
- j >= b && (T.destroy(), we.current.delete(j), delete ce.current[j], J.current.delete(j));
4030
+ }, [xe]);
4031
+ const Xe = D((b) => {
4032
+ for (const [j, N] of we.current.entries())
4033
+ j >= b && (N.destroy(), we.current.delete(j), delete re.current[j], q.current.delete(j));
4014
4034
  }, []);
4015
- F(() => {
4016
- ze(O);
4017
- }, [ze, O]), F(() => {
4035
+ W(() => {
4036
+ Xe($);
4037
+ }, [Xe, $]), W(() => {
4018
4038
  const b = e.length;
4019
4039
  let j = !1;
4020
- for (const T of Array.from(oe.current.keys()))
4021
- T >= b && (oe.current.delete(T), j = !0);
4022
- j && U((T) => T + 1);
4023
- for (const T of Object.keys(ce.current))
4024
- Number(T) >= b && delete ce.current[T];
4025
- for (const T of Array.from(K.current))
4026
- T >= b && K.current.delete(T);
4040
+ for (const N of Array.from(ce.current.keys()))
4041
+ N >= b && (ce.current.delete(N), j = !0);
4042
+ j && V((N) => N + 1);
4043
+ for (const N of Object.keys(re.current))
4044
+ Number(N) >= b && delete re.current[N];
4045
+ for (const N of Array.from(ye.current))
4046
+ N >= b && ye.current.delete(N);
4027
4047
  }, [e.length]);
4028
- const $ = D((b, j) => {
4029
- A && j && (ce.current[b] = !0), j && w && ue((T) => b > T ? b : T);
4030
- }, [A, w]), De = D((b) => {
4048
+ const Le = D((b, j) => {
4049
+ O && j && (re.current[b] = !0), j && w && ue((N) => b > N ? b : N);
4050
+ }, [O, w]), Ie = D((b) => {
4031
4051
  const j = we.current.get(b);
4032
4052
  j && (j.destroy(), we.current.delete(b));
4033
- }, []), Qe = D((b, j) => {
4034
- const T = J.current;
4035
- if (j ? T.set(b, j) : T.delete(b), !Ue || !j) {
4036
- De(b), A && !j && delete ce.current[b], j && $(b, !0);
4053
+ }, []), U = D((b, j) => {
4054
+ const N = q.current;
4055
+ if (j ? N.set(b, j) : N.delete(b), !We || !j) {
4056
+ Ie(b), O && !j && delete re.current[b], j && Le(b, !0);
4037
4057
  return;
4038
4058
  }
4039
4059
  if (b < g && !w) {
4040
- De(b), $(b, !0);
4060
+ Ie(b), Le(b, !0);
4041
4061
  return;
4042
4062
  }
4043
- De(b);
4044
- const V = l(j, { rootMargin: "400px" });
4045
- we.current.set(b, V), V.isVisible() && $(b, !0), V.whenVisible.then(() => $(b, !0)).catch(() => {
4063
+ Ie(b);
4064
+ const z = u(j, { rootMargin: "400px" });
4065
+ we.current.set(b, z), z.isVisible() && Le(b, !0), z.whenVisible.then(() => Le(b, !0)).catch(() => {
4046
4066
  });
4047
4067
  }, [
4048
- A,
4049
- De,
4050
- $,
4051
- l,
4068
+ O,
4069
+ Ie,
4070
+ Le,
4071
+ u,
4052
4072
  g,
4053
- Ue,
4073
+ We,
4054
4074
  w
4055
- ]), Oe = D((b, j) => {
4075
+ ]), Ue = D((b, j) => {
4056
4076
  if (!j) {
4057
- oe.current.has(b) && (oe.current.delete(b), U((V) => V + 1));
4077
+ ce.current.has(b) && (ce.current.delete(b), V((z) => z + 1));
4058
4078
  return;
4059
4079
  }
4060
- const T = () => {
4061
- const V = j.offsetHeight;
4062
- if (!V)
4080
+ const N = () => {
4081
+ const z = j.offsetHeight;
4082
+ if (!z)
4063
4083
  return;
4064
- oe.current.get(b) !== V && (oe.current.set(b, V), U((le) => le + 1));
4084
+ ce.current.get(b) !== z && (ce.current.set(b, z), V((Q) => Q + 1));
4065
4085
  };
4066
- typeof queueMicrotask == "function" ? queueMicrotask(T) : Promise.resolve().then(T);
4067
- }, []), ct = D((b) => N && b >= I.current ? !1 : !A || b < g ? !0 : ce.current[b] === !0, [A, N, g]), rt = D((b) => (j) => {
4086
+ typeof queueMicrotask == "function" ? queueMicrotask(N) : Promise.resolve().then(N);
4087
+ }, []), bt = D((b) => S && b >= I.current ? !1 : !O || b < g ? !0 : re.current[b] === !0, [O, S, g]), Ge = D((b) => (j) => {
4068
4088
  if (!b)
4069
4089
  return;
4070
- const T = j.target;
4071
- T != null && T.closest("[data-node-index]") && b(j);
4090
+ const N = j.target;
4091
+ N != null && N.closest("[data-node-index]") && b(j);
4072
4092
  }, []);
4073
- F(() => {
4074
- for (const [b, j] of J.current.entries())
4075
- j && Qe(b, j);
4076
- }, [Qe]), F(() => {
4077
- w && L > Ne.current && ue(L - 1), Ne.current = L;
4093
+ W(() => {
4094
+ for (const [b, j] of q.current.entries())
4095
+ j && U(b, j);
4096
+ }, [U]), W(() => {
4097
+ w && L > $e.current && ue(L - 1), $e.current = L;
4078
4098
  }, [L, w]);
4079
- const $e = w ? /* @__PURE__ */ n.jsx("div", { className: "node-spacer", style: { height: `${fe}px` }, "aria-hidden": "true" }) : null, je = w ? /* @__PURE__ */ n.jsx("div", { className: "node-spacer", style: { height: `${gt}px` }, "aria-hidden": "true" }) : null;
4099
+ const et = w ? /* @__PURE__ */ n.jsx("div", { className: "node-spacer", style: { height: `${He}px` }, "aria-hidden": "true" }) : null, Me = w ? /* @__PURE__ */ n.jsx("div", { className: "node-spacer", style: { height: `${ut}px` }, "aria-hidden": "true" }) : null;
4080
4100
  return /* @__PURE__ */ n.jsxs(
4081
4101
  "div",
4082
4102
  {
4083
4103
  ref: a,
4084
4104
  className: `markstream-vue markdown-renderer${t.isDark ? " dark" : ""}${w ? " virtualized" : ""}`,
4085
4105
  onClick: t.onClick,
4086
- onMouseOver: rt(t.onMouseOver),
4087
- onMouseOut: rt(t.onMouseOut),
4106
+ onMouseOver: Ge(t.onMouseOver),
4107
+ onMouseOut: Ge(t.onMouseOut),
4088
4108
  children: [
4089
- $e,
4090
- _e.map(({ node: b, index: j }) => {
4091
- var le;
4092
- const T = ct(j), V = (le = oe.current.get(j)) != null ? le : x, Y = t.typewriter !== !1 && b.type !== "code_block" && !K.current.has(j) && T;
4093
- return Y && K.current.add(j), /* @__PURE__ */ n.jsx(
4109
+ et,
4110
+ De.map(({ node: b, index: j }) => {
4111
+ var Q;
4112
+ const N = bt(j), z = (Q = ce.current.get(j)) != null ? Q : y, Z = t.typewriter !== !1 && b.type !== "code_block" && !ye.current.has(j) && N;
4113
+ return Z && ye.current.add(j), /* @__PURE__ */ n.jsx(
4094
4114
  "div",
4095
4115
  {
4096
- ref: (Z) => Qe(j, Z),
4116
+ ref: (je) => U(j, je),
4097
4117
  className: "node-slot",
4098
4118
  "data-node-index": j,
4099
4119
  "data-node-type": b.type,
4100
- children: T ? /* @__PURE__ */ n.jsx(
4120
+ children: N ? /* @__PURE__ */ n.jsx(
4101
4121
  "div",
4102
4122
  {
4103
- ref: (Z) => Oe(j, Z),
4104
- className: `node-content${Y ? " typewriter-node" : ""}`,
4123
+ ref: (je) => Ue(j, je),
4124
+ className: `node-content${Z ? " typewriter-node" : ""}`,
4105
4125
  children: Re(b, `${o}-${j}`, r)
4106
4126
  }
4107
- ) : /* @__PURE__ */ n.jsx("div", { className: "node-placeholder", style: { height: `${V}px` } })
4127
+ ) : /* @__PURE__ */ n.jsx("div", { className: "node-placeholder", style: { height: `${z}px` } })
4108
4128
  },
4109
4129
  `${o}-${j}`
4110
4130
  );
4111
4131
  }),
4112
- je
4132
+ Me
4113
4133
  ]
4114
4134
  }
4115
4135
  );
4116
4136
  }, Vo = (t) => {
4117
- const e = { ...Ao, ...t }, r = S(null), o = qr(
4137
+ const e = { ...Ao, ...t }, r = R(null), o = qr(
4118
4138
  on,
4119
4139
  gr,
4120
4140
  gr
4121
- ), a = W(() => e.customId ? `renderer-${e.customId}` : `renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`, [e.customId]), l = W(() => {
4141
+ ), a = H(() => e.customId ? `renderer-${e.customId}` : `renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`, [e.customId]), u = H(() => {
4122
4142
  const w = cr(e.customId);
4123
- return Object.keys(w).map(String).map((y) => y.trim().toLowerCase()).filter(Fo);
4124
- }, [e.customId, o]), c = W(() => {
4125
- var A, L, M;
4126
- const y = (L = ((A = e.parseOptions) != null ? A : {}).customHtmlTags) != null ? L : [], N = [
4143
+ return Object.keys(w).map(String).map((x) => x.trim().toLowerCase()).filter(Fo);
4144
+ }, [e.customId, o]), c = H(() => {
4145
+ var O, L, M;
4146
+ const x = (L = ((O = e.parseOptions) != null ? O : {}).customHtmlTags) != null ? L : [], S = [
4127
4147
  ...(M = e.customHtmlTags) != null ? M : [],
4128
- ...Array.isArray(y) ? y : [],
4129
- ...l
4148
+ ...Array.isArray(x) ? x : [],
4149
+ ...u
4130
4150
  ].map($o).filter(Boolean);
4131
- return Array.from(new Set(N));
4151
+ return Array.from(new Set(S));
4132
4152
  }, [
4133
4153
  e.customId,
4134
4154
  e.customHtmlTags,
4135
4155
  e.parseOptions,
4136
- l,
4156
+ u,
4137
4157
  o
4138
- ]), d = W(() => {
4158
+ ]), m = H(() => {
4139
4159
  const w = c;
4140
4160
  return !w || w.length === 0 ? Jt(a) : Jt(a, { customHtmlTags: w });
4141
- }, [a, c]), s = W(() => {
4142
- const w = d;
4161
+ }, [a, c]), s = H(() => {
4162
+ const w = m;
4143
4163
  return e.customMarkdownIt ? e.customMarkdownIt(w) : w;
4144
- }, [d, e.customMarkdownIt]), g = W(() => {
4145
- var A, L;
4146
- const w = (A = e.parseOptions) != null ? A : {}, y = (L = e.final) != null ? L : w.final, N = c;
4147
- return N.length ? {
4164
+ }, [m, e.customMarkdownIt]), g = H(() => {
4165
+ var O, L;
4166
+ const w = (O = e.parseOptions) != null ? O : {}, x = (L = e.final) != null ? L : w.final, S = c;
4167
+ return S.length ? {
4148
4168
  ...w,
4149
- final: y,
4150
- customHtmlTags: N
4151
- } : y == null ? w : { ...w, final: y };
4152
- }, [c, e.final, e.parseOptions]), f = W(() => {
4153
- var A, L;
4154
- const w = !!e.debugPerformance && typeof console != "undefined" && typeof performance != "undefined", y = w ? performance.now() : 0;
4155
- let N = [];
4156
- return Array.isArray(e.nodes) && e.nodes.length ? N = e.nodes.map((M) => ({ ...M })) : e.content && (N = Gr(e.content, s != null ? s : Oo, g)), w && console.info("[markstream-react][perf] parse(sync)", {
4157
- ms: Math.round(performance.now() - y),
4158
- nodes: N.length,
4159
- contentLength: (L = (A = e.content) == null ? void 0 : A.length) != null ? L : 0
4160
- }), N;
4169
+ final: x,
4170
+ customHtmlTags: S
4171
+ } : x == null ? w : { ...w, final: x };
4172
+ }, [c, e.final, e.parseOptions]), f = H(() => {
4173
+ var O, L;
4174
+ const w = !!e.debugPerformance && typeof console != "undefined" && typeof performance != "undefined", x = w ? performance.now() : 0;
4175
+ let S = [];
4176
+ return Array.isArray(e.nodes) && e.nodes.length ? S = e.nodes.map((M) => ({ ...M })) : e.content && (S = Gr(e.content, s != null ? s : Oo, g)), w && console.info("[markstream-react][perf] parse(sync)", {
4177
+ ms: Math.round(performance.now() - x),
4178
+ nodes: S.length,
4179
+ contentLength: (L = (O = e.content) == null ? void 0 : O.length) != null ? L : 0
4180
+ }), S;
4161
4181
  }, [
4162
4182
  e.content,
4163
4183
  e.debugPerformance,
@@ -4168,22 +4188,22 @@ const Wo = 32, Ho = 900, zo = ({
4168
4188
  o,
4169
4189
  c
4170
4190
  ]);
4171
- F(() => {
4191
+ W(() => {
4172
4192
  var L, M;
4173
4193
  if (typeof window == "undefined" || e.renderCodeBlocksAsPre || !f.some((I) => {
4174
- var re;
4175
- return (I == null ? void 0 : I.type) !== "code_block" ? !1 : ft(String((re = I == null ? void 0 : I.language) != null ? re : "")) !== "mermaid";
4194
+ var te;
4195
+ return (I == null ? void 0 : I.type) !== "code_block" ? !1 : pt(String((te = I == null ? void 0 : I.language) != null ? te : "")) !== "mermaid";
4176
4196
  }))
4177
4197
  return;
4178
- const y = (L = window.requestIdleCallback) != null ? L : ((I, O) => {
4179
- var re;
4180
- return window.setTimeout(() => I({ didTimeout: !0, timeRemaining: () => 0 }), (re = O == null ? void 0 : O.timeout) != null ? re : 600);
4181
- }), N = (M = window.cancelIdleCallback) != null ? M : ((I) => window.clearTimeout(I)), A = y(() => {
4198
+ const x = (L = window.requestIdleCallback) != null ? L : ((I, $) => {
4199
+ var te;
4200
+ return window.setTimeout(() => I({ didTimeout: !0, timeRemaining: () => 0 }), (te = $ == null ? void 0 : $.timeout) != null ? te : 600);
4201
+ }), S = (M = window.cancelIdleCallback) != null ? M : ((I) => window.clearTimeout(I)), O = x(() => {
4182
4202
  Pr();
4183
4203
  }, { timeout: 900 });
4184
- return () => N(A);
4204
+ return () => S(O);
4185
4205
  }, [f, e.renderCodeBlocksAsPre]);
4186
- const h = W(() => e.indexKey != null ? String(e.indexKey) : "markdown-renderer", [e.indexKey]), C = W(() => ({
4206
+ const h = H(() => e.indexKey != null ? String(e.indexKey) : "markdown-renderer", [e.indexKey]), C = H(() => ({
4187
4207
  customId: e.customId,
4188
4208
  isDark: e.isDark,
4189
4209
  indexKey: h,
@@ -4239,9 +4259,9 @@ const Wo = 32, Ho = 900, zo = ({
4239
4259
  );
4240
4260
  };
4241
4261
  function Xo(t) {
4242
- var c, d, s, g, f, h;
4243
- const { node: e, ctx: r, renderNode: o, indexKey: a, children: l } = t;
4244
- return /* @__PURE__ */ n.jsx("blockquote", { className: "blockquote-node", dir: "auto", cite: e.cite, children: l != null ? l : r && o ? /* @__PURE__ */ n.jsx(
4262
+ var c, m, s, g, f, h;
4263
+ const { node: e, ctx: r, renderNode: o, indexKey: a, children: u } = t;
4264
+ return /* @__PURE__ */ n.jsx("blockquote", { className: "blockquote-node", dir: "auto", cite: e.cite, children: u != null ? u : r && o ? /* @__PURE__ */ n.jsx(
4245
4265
  Vo,
4246
4266
  {
4247
4267
  nodes: e.children || [],
@@ -4254,7 +4274,7 @@ function Xo(t) {
4254
4274
  renderCodeBlocksAsPre: r.renderCodeBlocksAsPre,
4255
4275
  codeBlockProps: r.codeBlockProps,
4256
4276
  themes: (c = r.codeBlockThemes) == null ? void 0 : c.themes,
4257
- codeBlockDarkTheme: (d = r.codeBlockThemes) == null ? void 0 : d.darkTheme,
4277
+ codeBlockDarkTheme: (m = r.codeBlockThemes) == null ? void 0 : m.darkTheme,
4258
4278
  codeBlockLightTheme: (s = r.codeBlockThemes) == null ? void 0 : s.lightTheme,
4259
4279
  codeBlockMonacoOptions: (g = r.codeBlockThemes) == null ? void 0 : g.monacoOptions,
4260
4280
  codeBlockMinWidth: (f = r.codeBlockThemes) == null ? void 0 : f.minWidth,
@@ -4287,94 +4307,94 @@ function pi(t) {
4287
4307
  showPreviewButton: !0,
4288
4308
  showFontSizeButtons: !0,
4289
4309
  ...t
4290
- }, r = W(() => {
4291
- var x;
4292
- return String((x = e.node.language) != null ? x : "");
4293
- }, [e.node.language]), o = W(() => Ko(r), [r]), a = W(() => ft(r), [r]), l = a === "mermaid", c = W(() => {
4294
- const x = Qt[a] || a;
4295
- return x ? x.charAt(0).toUpperCase() + x.slice(1) : "Text";
4296
- }, [a]), d = W(() => ur(a), [a]), { t: s } = lr(), g = W(() => e.isShowPreview ? a === "html" || a === "svg" : !1, [a, e.isShowPreview]), f = W(() => {
4297
- const x = {}, _e = (fe) => {
4298
- if (fe != null)
4299
- return typeof fe == "number" ? `${fe}px` : String(fe);
4300
- }, be = _e(e.minWidth), Le = _e(e.maxWidth);
4301
- return be && (x.minWidth = be), Le && (x.maxWidth = Le), x;
4302
- }, [e.maxWidth, e.minWidth]), [h, C] = B(!1), [w, y] = B(!1), [N, A] = B(!1), [L, M] = B(""), [I, O] = B(!1), [re, ue] = B(14), [de, me] = B(re), oe = S(null), Se = S(null), U = S(null), ce = S(null), we = S(!1), J = D(() => e.isDark ? e.darkTheme : e.lightTheme, [e.darkTheme, e.isDark, e.lightTheme]), K = D((x) => {
4303
- if (!x) {
4304
- M(""), O(!1);
4310
+ }, r = H(() => {
4311
+ var y;
4312
+ return String((y = e.node.language) != null ? y : "");
4313
+ }, [e.node.language]), o = H(() => Ko(r), [r]), a = H(() => pt(r), [r]), u = a === "mermaid", c = H(() => {
4314
+ const y = Qt[a] || a;
4315
+ return y ? y.charAt(0).toUpperCase() + y.slice(1) : "Text";
4316
+ }, [a]), m = H(() => ur(a), [a]), { t: s } = lr(), g = H(() => e.isShowPreview ? a === "html" || a === "svg" : !1, [a, e.isShowPreview]), f = H(() => {
4317
+ const y = {}, De = (He) => {
4318
+ if (He != null)
4319
+ return typeof He == "number" ? `${He}px` : String(He);
4320
+ }, be = De(e.minWidth), _e = De(e.maxWidth);
4321
+ return be && (y.minWidth = be), _e && (y.maxWidth = _e), y;
4322
+ }, [e.maxWidth, e.minWidth]), [h, C] = P(!1), [w, x] = P(!1), [S, O] = P(!1), [L, M] = P(""), [I, $] = P(!1), [te, ue] = P(14), [ie, de] = P(te), ce = R(null), Se = R(null), V = R(null), re = R(null), we = R(!1), q = D(() => e.isDark ? e.darkTheme : e.lightTheme, [e.darkTheme, e.isDark, e.lightTheme]), ye = D((y) => {
4323
+ if (!y) {
4324
+ M(""), $(!1);
4305
4325
  return;
4306
4326
  }
4307
- M(`<pre class="shiki shiki-fallback"><code>${Uo(x)}</code></pre>`), O(!1);
4308
- }, []), Ne = D(() => {
4309
- M(""), O(!0);
4310
- }, []), ye = D(async () => {
4311
- if (!(ce.current || we.current)) {
4327
+ M(`<pre class="shiki shiki-fallback"><code>${Uo(y)}</code></pre>`), $(!1);
4328
+ }, []), $e = D(() => {
4329
+ M(""), $(!0);
4330
+ }, []), oe = D(async () => {
4331
+ if (!(re.current || we.current)) {
4312
4332
  we.current = !0;
4313
4333
  try {
4314
- const x = await import("stream-markdown");
4315
- ce.current = x.createShikiStreamRenderer;
4334
+ const y = await import("stream-markdown");
4335
+ re.current = y.createShikiStreamRenderer;
4316
4336
  } catch {
4317
4337
  }
4318
4338
  }
4319
- }, []), Ae = D(async () => {
4320
- var x;
4321
- if (l) {
4322
- (x = U.current) == null || x.dispose(), U.current = null, O(!1);
4339
+ }, []), Ne = D(async () => {
4340
+ var y;
4341
+ if (u) {
4342
+ (y = V.current) == null || y.dispose(), V.current = null, $(!1);
4323
4343
  return;
4324
4344
  }
4325
- if (await ye(), !oe.current || !Se.current) {
4326
- K(e.node.code);
4345
+ if (await oe(), !ce.current || !Se.current) {
4346
+ ye(e.node.code);
4327
4347
  return;
4328
4348
  }
4329
- if (!U.current && ce.current && (U.current = ce.current(Se.current, {
4330
- theme: J(),
4349
+ if (!V.current && re.current && (V.current = re.current(Se.current, {
4350
+ theme: q(),
4331
4351
  themes: e.themes
4332
- }), O(!0)), !U.current) {
4333
- K(e.node.code);
4352
+ }), $(!0)), !V.current) {
4353
+ ye(e.node.code);
4334
4354
  return;
4335
4355
  }
4336
4356
  if (e.stream === !1 && e.loading) {
4337
- K(e.node.code);
4357
+ ye(e.node.code);
4338
4358
  return;
4339
4359
  }
4340
- K(e.node.code);
4360
+ ye(e.node.code);
4341
4361
  try {
4342
- await U.current.updateCode(e.node.code, o), Ne();
4362
+ await V.current.updateCode(e.node.code, o), $e();
4343
4363
  } catch {
4344
4364
  }
4345
- }, [Ne, ye, J, l, o, e.loading, e.node.code, e.stream, e.themes, K]);
4346
- F(() => (Ae(), () => {
4347
- var x;
4348
- (x = U.current) == null || x.dispose(), U.current = null;
4349
- }), [Ae]), F(() => {
4350
- U.current && U.current.setTheme(J());
4351
- }, [J]), F(() => {
4352
- U.current && (e.stream === !1 && e.loading || (K(e.node.code), Promise.resolve(U.current.updateCode(e.node.code, o)).then(() => Ne()).catch(() => {
4365
+ }, [$e, oe, q, u, o, e.loading, e.node.code, e.stream, e.themes, ye]);
4366
+ W(() => (Ne(), () => {
4367
+ var y;
4368
+ (y = V.current) == null || y.dispose(), V.current = null;
4369
+ }), [Ne]), W(() => {
4370
+ V.current && V.current.setTheme(q());
4371
+ }, [q]), W(() => {
4372
+ V.current && (e.stream === !1 && e.loading || (ye(e.node.code), Promise.resolve(V.current.updateCode(e.node.code, o)).then(() => $e()).catch(() => {
4353
4373
  })));
4354
- }, [Ne, o, e.loading, e.node.code, e.stream, K]);
4355
- const ee = D((x, _e) => {
4356
- const be = x.currentTarget;
4357
- Ut(be, _e, "top", !1, { x: x.clientX, y: x.clientY }, e.isDark);
4358
- }, [e.isDark]), ne = D(() => We(), []), xe = D(async () => {
4359
- var x;
4374
+ }, [$e, o, e.loading, e.node.code, e.stream, ye]);
4375
+ const X = D((y, De) => {
4376
+ const be = y.currentTarget;
4377
+ Ut(be, De, "top", !1, { x: y.clientX, y: y.clientY }, e.isDark);
4378
+ }, [e.isDark]), ne = D(() => Oe(), []), ve = D(async () => {
4379
+ var y;
4360
4380
  try {
4361
- typeof navigator != "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && await navigator.clipboard.writeText(e.node.code), C(!0), (x = e.onCopy) == null || x.call(e, e.node.code), setTimeout(() => C(!1), 1e3);
4381
+ typeof navigator != "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && await navigator.clipboard.writeText(e.node.code), C(!0), (y = e.onCopy) == null || y.call(e, e.node.code), setTimeout(() => C(!1), 1e3);
4362
4382
  } catch {
4363
4383
  }
4364
- }, [e]), He = D(() => {
4365
- var Le;
4384
+ }, [e]), Fe = D(() => {
4385
+ var _e;
4366
4386
  if (!g)
4367
4387
  return;
4368
- const x = o, _e = x === "html" ? "text/html" : "image/svg+xml", be = x === "html" ? "HTML Preview" : "SVG Preview";
4369
- (Le = e.onPreviewCode) == null || Le.call(e, {
4370
- type: _e,
4388
+ const y = o, De = y === "html" ? "text/html" : "image/svg+xml", be = y === "html" ? "HTML Preview" : "SVG Preview";
4389
+ (_e = e.onPreviewCode) == null || _e.call(e, {
4390
+ type: De,
4371
4391
  content: e.node.code,
4372
4392
  title: be
4373
4393
  });
4374
- }, [g, o, e]), ie = W(() => ({ fontSize: `${de}px` }), [de]), st = () => me((x) => Math.max(10, x - 1)), Ze = () => me((x) => Math.min(36, x + 1)), Ue = () => me(re);
4375
- return F(() => {
4376
- ue(14), me(14);
4377
- }, []), l ? /* @__PURE__ */ n.jsx(
4394
+ }, [g, o, e]), ae = H(() => ({ fontSize: `${ie}px` }), [ie]), st = () => de((y) => Math.max(10, y - 1)), Je = () => de((y) => Math.min(36, y + 1)), We = () => de(te);
4395
+ return W(() => {
4396
+ ue(14), de(14);
4397
+ }, []), u ? /* @__PURE__ */ n.jsx(
4378
4398
  Hr,
4379
4399
  {
4380
4400
  node: e.node,
@@ -4401,7 +4421,7 @@ function pi(t) {
4401
4421
  "span",
4402
4422
  {
4403
4423
  className: "icon-slot h-4 w-4 flex-shrink-0",
4404
- dangerouslySetInnerHTML: { __html: d }
4424
+ dangerouslySetInnerHTML: { __html: m }
4405
4425
  }
4406
4426
  ),
4407
4427
  /* @__PURE__ */ n.jsx("span", { className: "text-sm font-medium font-mono", children: c })
@@ -4412,16 +4432,16 @@ function pi(t) {
4412
4432
  {
4413
4433
  type: "button",
4414
4434
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
4415
- "aria-pressed": N,
4416
- onClick: () => A((x) => !x),
4417
- onMouseEnter: (x) => ee(x, N ? s("common.expand") || "Expand" : s("common.collapse") || "Collapse"),
4418
- onFocus: (x) => ee(x, N ? s("common.expand") || "Expand" : s("common.collapse") || "Collapse"),
4435
+ "aria-pressed": S,
4436
+ onClick: () => O((y) => !y),
4437
+ onMouseEnter: (y) => X(y, S ? s("common.expand") || "Expand" : s("common.collapse") || "Collapse"),
4438
+ onFocus: (y) => X(y, S ? s("common.expand") || "Expand" : s("common.collapse") || "Collapse"),
4419
4439
  onMouseLeave: ne,
4420
4440
  onBlur: ne,
4421
4441
  children: /* @__PURE__ */ n.jsx(
4422
4442
  "svg",
4423
4443
  {
4424
- style: { rotate: N ? "0deg" : "90deg" },
4444
+ style: { rotate: S ? "0deg" : "90deg" },
4425
4445
  xmlns: "http://www.w3.org/2000/svg",
4426
4446
  xmlnsXlink: "http://www.w3.org/1999/xlink",
4427
4447
  "aria-hidden": "true",
@@ -4441,10 +4461,10 @@ function pi(t) {
4441
4461
  {
4442
4462
  type: "button",
4443
4463
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
4444
- disabled: de <= 10,
4464
+ disabled: ie <= 10,
4445
4465
  onClick: st,
4446
- onMouseEnter: (x) => ee(x, s("common.decrease") || "Decrease"),
4447
- onFocus: (x) => ee(x, s("common.decrease") || "Decrease"),
4466
+ onMouseEnter: (y) => X(y, s("common.decrease") || "Decrease"),
4467
+ onFocus: (y) => X(y, s("common.decrease") || "Decrease"),
4448
4468
  onMouseLeave: ne,
4449
4469
  onBlur: ne,
4450
4470
  children: /* @__PURE__ */ n.jsx(
@@ -4468,10 +4488,10 @@ function pi(t) {
4468
4488
  {
4469
4489
  type: "button",
4470
4490
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
4471
- disabled: de === re,
4472
- onClick: Ue,
4473
- onMouseEnter: (x) => ee(x, s("common.reset") || "Reset"),
4474
- onFocus: (x) => ee(x, s("common.reset") || "Reset"),
4491
+ disabled: ie === te,
4492
+ onClick: We,
4493
+ onMouseEnter: (y) => X(y, s("common.reset") || "Reset"),
4494
+ onFocus: (y) => X(y, s("common.reset") || "Reset"),
4475
4495
  onMouseLeave: ne,
4476
4496
  onBlur: ne,
4477
4497
  children: /* @__PURE__ */ n.jsx(
@@ -4498,10 +4518,10 @@ function pi(t) {
4498
4518
  {
4499
4519
  type: "button",
4500
4520
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
4501
- disabled: de >= 36,
4502
- onClick: Ze,
4503
- onMouseEnter: (x) => ee(x, s("common.increase") || "Increase"),
4504
- onFocus: (x) => ee(x, s("common.increase") || "Increase"),
4521
+ disabled: ie >= 36,
4522
+ onClick: Je,
4523
+ onMouseEnter: (y) => X(y, s("common.increase") || "Increase"),
4524
+ onFocus: (y) => X(y, s("common.increase") || "Increase"),
4505
4525
  onMouseLeave: ne,
4506
4526
  onBlur: ne,
4507
4527
  children: /* @__PURE__ */ n.jsx(
@@ -4527,9 +4547,9 @@ function pi(t) {
4527
4547
  type: "button",
4528
4548
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
4529
4549
  "aria-label": h ? s("common.copied") || "Copied" : s("common.copy") || "Copy",
4530
- onClick: xe,
4531
- onMouseEnter: (x) => ee(x, h ? s("common.copied") || "Copied" : s("common.copy") || "Copy"),
4532
- onFocus: (x) => ee(x, h ? s("common.copied") || "Copied" : s("common.copy") || "Copy"),
4550
+ onClick: ve,
4551
+ onMouseEnter: (y) => X(y, h ? s("common.copied") || "Copied" : s("common.copy") || "Copy"),
4552
+ onFocus: (y) => X(y, h ? s("common.copied") || "Copied" : s("common.copy") || "Copy"),
4533
4553
  onMouseLeave: ne,
4534
4554
  onBlur: ne,
4535
4555
  children: h ? /* @__PURE__ */ n.jsx(
@@ -4570,9 +4590,9 @@ function pi(t) {
4570
4590
  type: "button",
4571
4591
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
4572
4592
  "aria-pressed": w,
4573
- onClick: () => y((x) => !x),
4574
- onMouseEnter: (x) => ee(x, w ? s("common.collapse") || "Collapse" : s("common.expand") || "Expand"),
4575
- onFocus: (x) => ee(x, w ? s("common.collapse") || "Collapse" : s("common.expand") || "Expand"),
4593
+ onClick: () => x((y) => !y),
4594
+ onMouseEnter: (y) => X(y, w ? s("common.collapse") || "Collapse" : s("common.expand") || "Expand"),
4595
+ onFocus: (y) => X(y, w ? s("common.collapse") || "Collapse" : s("common.expand") || "Expand"),
4576
4596
  onMouseLeave: ne,
4577
4597
  onBlur: ne,
4578
4598
  children: w ? /* @__PURE__ */ n.jsx(
@@ -4610,9 +4630,9 @@ function pi(t) {
4610
4630
  type: "button",
4611
4631
  className: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
4612
4632
  "aria-label": s("common.preview") || "Preview",
4613
- onClick: He,
4614
- onMouseEnter: (x) => ee(x, s("common.preview") || "Preview"),
4615
- onFocus: (x) => ee(x, s("common.preview") || "Preview"),
4633
+ onClick: Fe,
4634
+ onMouseEnter: (y) => X(y, s("common.preview") || "Preview"),
4635
+ onFocus: (y) => X(y, s("common.preview") || "Preview"),
4616
4636
  onMouseLeave: ne,
4617
4637
  onBlur: ne,
4618
4638
  children: /* @__PURE__ */ n.jsx(
@@ -4638,13 +4658,13 @@ function pi(t) {
4638
4658
  ]
4639
4659
  }
4640
4660
  ),
4641
- !N && (e.stream ? !0 : !e.loading) && /* @__PURE__ */ n.jsxs(
4661
+ !S && (e.stream ? !0 : !e.loading) && /* @__PURE__ */ n.jsxs(
4642
4662
  "div",
4643
4663
  {
4644
- ref: oe,
4664
+ ref: ce,
4645
4665
  className: "code-block-content",
4646
4666
  style: {
4647
- ...ie,
4667
+ ...ae,
4648
4668
  maxHeight: w ? "none" : "500px",
4649
4669
  overflow: w ? "visible" : "auto"
4650
4670
  },
@@ -4681,9 +4701,9 @@ function Yo(t) {
4681
4701
  return !1;
4682
4702
  }
4683
4703
  function wi(t) {
4684
- var d;
4685
- const e = S(null), [r, o] = B(!1), [a, l] = B({ transform: "translate3d(0px, 0px, 0px)", left: "0px", top: "0px" }), c = W(() => Yo(t.isDark), [t.isDark]);
4686
- return F(() => {
4704
+ var m;
4705
+ const e = R(null), [r, o] = P(!1), [a, u] = P({ transform: "translate3d(0px, 0px, 0px)", left: "0px", top: "0px" }), c = H(() => Yo(t.isDark), [t.isDark]);
4706
+ return W(() => {
4687
4707
  if (!t.visible) {
4688
4708
  o(!1);
4689
4709
  return;
@@ -4694,15 +4714,15 @@ function wi(t) {
4694
4714
  }
4695
4715
  let s = null, g = !1;
4696
4716
  const f = async () => {
4697
- var w, y;
4717
+ var w, x;
4698
4718
  if (!t.anchorEl || !e.current)
4699
4719
  return;
4700
4720
  const { x: h, y: C } = await Er(t.anchorEl, e.current, {
4701
4721
  placement: (w = t.placement) != null ? w : "top",
4702
- middleware: [Tr((y = t.offset) != null ? y : 8), Rr(), Sr({ padding: 8 })],
4722
+ middleware: [Tr((x = t.offset) != null ? x : 8), Rr(), Sr({ padding: 8 })],
4703
4723
  strategy: "fixed"
4704
4724
  });
4705
- g || l({
4725
+ g || u({
4706
4726
  position: "fixed",
4707
4727
  left: "0px",
4708
4728
  top: "0px",
@@ -4718,7 +4738,7 @@ function wi(t) {
4718
4738
  /* @__PURE__ */ n.jsx(
4719
4739
  "div",
4720
4740
  {
4721
- id: (d = t.id) != null ? d : void 0,
4741
+ id: (m = t.id) != null ? m : void 0,
4722
4742
  ref: e,
4723
4743
  style: a,
4724
4744
  className: [
@@ -4787,7 +4807,7 @@ export {
4787
4807
  ur as getLanguageIcon,
4788
4808
  fi as getMermaidWorkerLoad,
4789
4809
  Qt as languageMap,
4790
- ft as normalizeLanguageIdentifier,
4810
+ pt as normalizeLanguageIdentifier,
4791
4811
  ei as removeCustomComponents,
4792
4812
  Zn as renderKaTeXInWorker,
4793
4813
  $r as renderKaTeXWithBackpressure,