@seamline-kit/seamline-settings 0.0.2 → 0.0.4

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.
@@ -1,1398 +0,0 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s } from "../lib-DIb46Sli.js";
2
- import { init as c } from "../main.js";
3
- import { createComponent as l, createContext as u, createMemo as d, createRenderEffect as f, mergeProps as p, sharedConfig as m, splitProps as h, untrack as g } from "solid-js";
4
- var _ = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, v = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, y = {};
5
- /**
6
- * Checks if the given value is a valid identifier name.
7
- *
8
- * @param {string} name
9
- * Identifier to check.
10
- * @param {Options | null | undefined} [options]
11
- * Configuration (optional).
12
- * @returns {boolean}
13
- * Whether `name` can be an identifier.
14
- */
15
- function b(e, t) {
16
- return ((t || y).jsx ? v : _).test(e);
17
- }
18
- /**
19
- * @typedef {import('hast').Nodes} Nodes
20
- */
21
- var x = /[ \t\n\f\r]/g;
22
- /**
23
- * Check if the given value is *inter-element whitespace*.
24
- *
25
- * @param {Nodes | string} thing
26
- * Thing to check (`Node` or `string`).
27
- * @returns {boolean}
28
- * Whether the `value` is inter-element whitespace (`boolean`): consisting of
29
- * zero or more of space, tab (`\t`), line feed (`\n`), carriage return
30
- * (`\r`), or form feed (`\f`); if a node is passed it must be a `Text` node,
31
- * whose `value` field is checked.
32
- */
33
- function S(e) {
34
- return typeof e == "object" ? e.type === "text" ? C(e.value) : !1 : C(e);
35
- }
36
- /**
37
- * @param {string} value
38
- * @returns {boolean}
39
- */
40
- function C(e) {
41
- return e.replace(x, "") === "";
42
- }
43
- var w = /* @__PURE__ */ t(((e, t) => {
44
- var n = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, r = /\n/g, i = /^\s*/, a = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, c = /^[;\s]*/, l = /^\s+|\s+$/g, u = "\n", d = "/", f = "*", p = "", m = "comment", h = "declaration";
45
- /**
46
- * @param {String} style
47
- * @param {Object} [options]
48
- * @return {Object[]}
49
- * @throws {TypeError}
50
- * @throws {Error}
51
- */
52
- function g(e, t) {
53
- if (typeof e != "string") throw TypeError("First argument must be a string");
54
- if (!e) return [];
55
- t ||= {};
56
- /**
57
- * Positional.
58
- */
59
- var l = 1, g = 1;
60
- /**
61
- * Update lineno and column based on `str`.
62
- *
63
- * @param {String} str
64
- */
65
- function v(e) {
66
- var t = e.match(r);
67
- t && (l += t.length);
68
- var n = e.lastIndexOf(u);
69
- g = ~n ? e.length - n : g + e.length;
70
- }
71
- /**
72
- * Mark position and patch `node.position`.
73
- *
74
- * @return {Function}
75
- */
76
- function y() {
77
- var e = {
78
- line: l,
79
- column: g
80
- };
81
- return function(t) {
82
- return t.position = new b(e), C(), t;
83
- };
84
- }
85
- /**
86
- * Store position information for a node.
87
- *
88
- * @constructor
89
- * @property {Object} start
90
- * @property {Object} end
91
- * @property {undefined|String} source
92
- */
93
- function b(e) {
94
- this.start = e, this.end = {
95
- line: l,
96
- column: g
97
- }, this.source = t.source;
98
- }
99
- /**
100
- * Non-enumerable source string.
101
- */
102
- b.prototype.content = e;
103
- /**
104
- * Error `msg`.
105
- *
106
- * @param {String} msg
107
- * @throws {Error}
108
- */
109
- function x(n) {
110
- var r = /* @__PURE__ */ Error(t.source + ":" + l + ":" + g + ": " + n);
111
- if (r.reason = n, r.filename = t.source, r.line = l, r.column = g, r.source = e, !t.silent) throw r;
112
- }
113
- /**
114
- * Match `re` and return captures.
115
- *
116
- * @param {RegExp} re
117
- * @return {undefined|Array}
118
- */
119
- function S(t) {
120
- var n = t.exec(e);
121
- if (n) {
122
- var r = n[0];
123
- return v(r), e = e.slice(r.length), n;
124
- }
125
- }
126
- /**
127
- * Parse whitespace.
128
- */
129
- function C() {
130
- S(i);
131
- }
132
- /**
133
- * Parse comments.
134
- *
135
- * @param {Object[]} [rules]
136
- * @return {Object[]}
137
- */
138
- function w(e) {
139
- var t;
140
- for (e ||= []; t = T();) t !== !1 && e.push(t);
141
- return e;
142
- }
143
- /**
144
- * Parse comment.
145
- *
146
- * @return {Object}
147
- * @throws {Error}
148
- */
149
- function T() {
150
- var t = y();
151
- if (!(d != e.charAt(0) || f != e.charAt(1))) {
152
- for (var n = 2; p != e.charAt(n) && (f != e.charAt(n) || d != e.charAt(n + 1));) ++n;
153
- if (n += 2, p === e.charAt(n - 1)) return x("End of comment missing");
154
- var r = e.slice(2, n - 2);
155
- return g += 2, v(r), e = e.slice(n), g += 2, t({
156
- type: m,
157
- comment: r
158
- });
159
- }
160
- }
161
- /**
162
- * Parse declaration.
163
- *
164
- * @return {Object}
165
- * @throws {Error}
166
- */
167
- function E() {
168
- var e = y(), t = S(a);
169
- if (t) {
170
- if (T(), !S(o)) return x("property missing ':'");
171
- var r = S(s), i = e({
172
- type: h,
173
- property: _(t[0].replace(n, p)),
174
- value: r ? _(r[0].replace(n, p)) : p
175
- });
176
- return S(c), i;
177
- }
178
- }
179
- /**
180
- * Parse declarations.
181
- *
182
- * @return {Object[]}
183
- */
184
- function D() {
185
- var e = [];
186
- w(e);
187
- for (var t; t = E();) t !== !1 && (e.push(t), w(e));
188
- return e;
189
- }
190
- return C(), D();
191
- }
192
- /**
193
- * Trim `str`.
194
- *
195
- * @param {String} str
196
- * @return {String}
197
- */
198
- function _(e) {
199
- return e ? e.replace(l, p) : p;
200
- }
201
- t.exports = g;
202
- })), T = /* @__PURE__ */ t(((e) => {
203
- var t = e && e.__importDefault || function(e) {
204
- return e && e.__esModule ? e : { default: e };
205
- };
206
- Object.defineProperty(e, "__esModule", { value: !0 }), e.default = r;
207
- var n = t(w());
208
- /**
209
- * Parses inline style to object.
210
- *
211
- * @param style - Inline style.
212
- * @param iterator - Iterator.
213
- * @returns - Style object or null.
214
- *
215
- * @example Parsing inline style to object:
216
- *
217
- * ```js
218
- * import parse from 'style-to-object';
219
- * parse('line-height: 42;'); // { 'line-height': '42' }
220
- * ```
221
- */
222
- function r(e, t) {
223
- let r = null;
224
- if (!e || typeof e != "string") return r;
225
- let i = (0, n.default)(e), a = typeof t == "function";
226
- return i.forEach((e) => {
227
- if (e.type !== "declaration") return;
228
- let { property: n, value: i } = e;
229
- a ? t(n, i, e) : i && (r ||= {}, r[n] = i);
230
- }), r;
231
- }
232
- })), E = /* @__PURE__ */ t(((e) => {
233
- Object.defineProperty(e, "__esModule", { value: !0 }), e.camelCase = void 0;
234
- var t = /^--[a-zA-Z0-9_-]+$/, n = /-([a-z])/g, r = /^[^-]+$/, i = /^-(webkit|moz|ms|o|khtml)-/, a = /^-(ms)-/, o = function(e) {
235
- return !e || r.test(e) || t.test(e);
236
- }, s = function(e, t) {
237
- return t.toUpperCase();
238
- }, c = function(e, t) {
239
- return `${t}-`;
240
- };
241
- e.camelCase = function(e, t) {
242
- return t === void 0 && (t = {}), o(e) ? e : (e = e.toLowerCase(), e = t.reactCompat ? e.replace(a, c) : e.replace(i, c), e.replace(n, s));
243
- };
244
- })), D = /* @__PURE__ */ t(((e, t) => {
245
- var n = (e && e.__importDefault || function(e) {
246
- return e && e.__esModule ? e : { default: e };
247
- })(T()), r = E();
248
- /**
249
- * Parses CSS inline style to JavaScript object (camelCased).
250
- */
251
- function i(e, t) {
252
- var i = {};
253
- return !e || typeof e != "string" || (0, n.default)(e, function(e, n) {
254
- e && n && (i[(0, r.camelCase)(e, t)] = n);
255
- }), i;
256
- }
257
- i.default = i, t.exports = i;
258
- }));
259
- /**
260
- * Get the starting point of `node`.
261
- *
262
- * @param node
263
- * Node.
264
- * @returns
265
- * Point.
266
- */
267
- const ee = te("start");
268
- /**
269
- * Get the positional info of `node`.
270
- *
271
- * @param {'end' | 'start'} type
272
- * Side.
273
- * @returns
274
- * Getter.
275
- */
276
- function te(e) {
277
- return t;
278
- /**
279
- * Get the point info of `node` at a bound side.
280
- *
281
- * @param {Node | NodeLike | null | undefined} [node]
282
- * @returns {Point | undefined}
283
- */
284
- function t(t) {
285
- let n = t && t.position && t.position[e] || {};
286
- if (typeof n.line == "number" && n.line > 0 && typeof n.column == "number" && n.column > 0) return {
287
- line: n.line,
288
- column: n.column,
289
- offset: typeof n.offset == "number" && n.offset > -1 ? n.offset : void 0
290
- };
291
- }
292
- }
293
- /**
294
- * @typedef {import('unist').Node} Node
295
- * @typedef {import('unist').Point} Point
296
- * @typedef {import('unist').Position} Position
297
- */
298
- /**
299
- * @typedef NodeLike
300
- * @property {string} type
301
- * @property {PositionLike | null | undefined} [position]
302
- *
303
- * @typedef PointLike
304
- * @property {number | null | undefined} [line]
305
- * @property {number | null | undefined} [column]
306
- * @property {number | null | undefined} [offset]
307
- *
308
- * @typedef PositionLike
309
- * @property {PointLike | null | undefined} [start]
310
- * @property {PointLike | null | undefined} [end]
311
- */
312
- /**
313
- * Serialize the positional info of a point, position (start and end points),
314
- * or node.
315
- *
316
- * @param {Node | NodeLike | Point | PointLike | Position | PositionLike | null | undefined} [value]
317
- * Node, position, or point.
318
- * @returns {string}
319
- * Pretty printed positional info of a node (`string`).
320
- *
321
- * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)
322
- * or a point `l:c` (when given `point`), where `l` stands for line, `c` for
323
- * column, `s` for `start`, and `e` for end.
324
- * An empty string (`''`) is returned if the given value is neither `node`,
325
- * `position`, nor `point`.
326
- */
327
- function ne(e) {
328
- return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? k(e.position) : "start" in e || "end" in e ? k(e) : "line" in e || "column" in e ? O(e) : "";
329
- }
330
- /**
331
- * @param {Point | PointLike | null | undefined} point
332
- * @returns {string}
333
- */
334
- function O(e) {
335
- return A(e && e.line) + ":" + A(e && e.column);
336
- }
337
- /**
338
- * @param {Position | PositionLike | null | undefined} pos
339
- * @returns {string}
340
- */
341
- function k(e) {
342
- return O(e && e.start) + "-" + O(e && e.end);
343
- }
344
- /**
345
- * @param {number | null | undefined} value
346
- * @returns {number}
347
- */
348
- function A(e) {
349
- return e && typeof e == "number" ? e : 1;
350
- }
351
- /**
352
- * @import {Node, Point, Position} from 'unist'
353
- */
354
- /**
355
- * @typedef {object & {type: string, position?: Position | undefined}} NodeLike
356
- *
357
- * @typedef Options
358
- * Configuration.
359
- * @property {Array<Node> | null | undefined} [ancestors]
360
- * Stack of (inclusive) ancestor nodes surrounding the message (optional).
361
- * @property {Error | null | undefined} [cause]
362
- * Original error cause of the message (optional).
363
- * @property {Point | Position | null | undefined} [place]
364
- * Place of message (optional).
365
- * @property {string | null | undefined} [ruleId]
366
- * Category of message (optional, example: `'my-rule'`).
367
- * @property {string | null | undefined} [source]
368
- * Namespace of who sent the message (optional, example: `'my-package'`).
369
- */
370
- /**
371
- * Message.
372
- */
373
- var j = class extends Error {
374
- /**
375
- * Create a message for `reason`.
376
- *
377
- * > 🪦 **Note**: also has obsolete signatures.
378
- *
379
- * @overload
380
- * @param {string} reason
381
- * @param {Options | null | undefined} [options]
382
- * @returns
383
- *
384
- * @overload
385
- * @param {string} reason
386
- * @param {Node | NodeLike | null | undefined} parent
387
- * @param {string | null | undefined} [origin]
388
- * @returns
389
- *
390
- * @overload
391
- * @param {string} reason
392
- * @param {Point | Position | null | undefined} place
393
- * @param {string | null | undefined} [origin]
394
- * @returns
395
- *
396
- * @overload
397
- * @param {string} reason
398
- * @param {string | null | undefined} [origin]
399
- * @returns
400
- *
401
- * @overload
402
- * @param {Error | VFileMessage} cause
403
- * @param {Node | NodeLike | null | undefined} parent
404
- * @param {string | null | undefined} [origin]
405
- * @returns
406
- *
407
- * @overload
408
- * @param {Error | VFileMessage} cause
409
- * @param {Point | Position | null | undefined} place
410
- * @param {string | null | undefined} [origin]
411
- * @returns
412
- *
413
- * @overload
414
- * @param {Error | VFileMessage} cause
415
- * @param {string | null | undefined} [origin]
416
- * @returns
417
- *
418
- * @param {Error | VFileMessage | string} causeOrReason
419
- * Reason for message, should use markdown.
420
- * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
421
- * Configuration (optional).
422
- * @param {string | null | undefined} [origin]
423
- * Place in code where the message originates (example:
424
- * `'my-package:my-rule'` or `'my-rule'`).
425
- * @returns
426
- * Instance of `VFileMessage`.
427
- */
428
- constructor(e, t, n) {
429
- super(), typeof t == "string" && (n = t, t = void 0);
430
- /** @type {string} */
431
- let r = "", i = {}, a = !1;
432
- if (t && (i = "line" in t && "column" in t || "start" in t && "end" in t ? { place: t } : "type" in t ? {
433
- ancestors: [t],
434
- place: t.position
435
- } : { ...t }), typeof e == "string" ? r = e : !i.cause && e && (a = !0, r = e.message, i.cause = e), !i.ruleId && !i.source && typeof n == "string") {
436
- let e = n.indexOf(":");
437
- e === -1 ? i.ruleId = n : (i.source = n.slice(0, e), i.ruleId = n.slice(e + 1));
438
- }
439
- if (!i.place && i.ancestors && i.ancestors) {
440
- let e = i.ancestors[i.ancestors.length - 1];
441
- e && (i.place = e.position);
442
- }
443
- let o = i.place && "start" in i.place ? i.place.start : i.place;
444
- /**
445
- * Link to docs for the message.
446
- *
447
- * > 👉 **Note**: this must be an absolute URL that can be passed as `x`
448
- * > to `new URL(x)`.
449
- *
450
- * @type {string | undefined}
451
- */
452
- this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = o ? o.column : void 0, this.fatal = void 0, this.file = "", this.message = r, this.line = o ? o.line : void 0, this.name = ne(i.place) || "1:1", this.place = i.place || void 0, this.reason = this.message, this.ruleId = i.ruleId || void 0, this.source = i.source || void 0, this.stack = a && i.cause && typeof i.cause.stack == "string" ? i.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
453
- }
454
- };
455
- j.prototype.file = "", j.prototype.name = "", j.prototype.reason = "", j.prototype.message = "", j.prototype.stack = "", j.prototype.column = void 0, j.prototype.line = void 0, j.prototype.ancestors = void 0, j.prototype.cause = void 0, j.prototype.fatal = void 0, j.prototype.place = void 0, j.prototype.ruleId = void 0, j.prototype.source = void 0;
456
- /**
457
- * @import {Identifier, Literal, MemberExpression} from 'estree'
458
- * @import {Jsx, JsxDev, Options, Props} from 'hast-util-to-jsx-runtime'
459
- * @import {Element, Nodes, Parents, Root, Text} from 'hast'
460
- * @import {MdxFlowExpressionHast, MdxTextExpressionHast} from 'mdast-util-mdx-expression'
461
- * @import {MdxJsxFlowElementHast, MdxJsxTextElementHast} from 'mdast-util-mdx-jsx'
462
- * @import {MdxjsEsmHast} from 'mdast-util-mdxjs-esm'
463
- * @import {Position} from 'unist'
464
- * @import {Child, Create, Field, JsxElement, State, Style} from './types.js'
465
- */
466
- var re = /* @__PURE__ */ r(D(), 1), M = {}.hasOwnProperty, ie = /* @__PURE__ */ new Map(), ae = /[A-Z]/g, oe = new Set([
467
- "table",
468
- "tbody",
469
- "thead",
470
- "tfoot",
471
- "tr"
472
- ]), se = new Set(["td", "th"]), N = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
473
- /**
474
- * Transform a hast tree to preact, react, solid, svelte, vue, etc.,
475
- * with an automatic JSX runtime.
476
- *
477
- * @param {Nodes} tree
478
- * Tree to transform.
479
- * @param {Options} options
480
- * Configuration (required).
481
- * @returns {JsxElement}
482
- * JSX element.
483
- */
484
- function ce(t, r) {
485
- if (!r || r.Fragment === void 0) throw TypeError("Expected `Fragment` in options");
486
- let i = r.filePath || void 0, a;
487
- if (r.development) {
488
- if (typeof r.jsxDEV != "function") throw TypeError("Expected `jsxDEV` in options when `development: true`");
489
- a = ge(i, r.jsxDEV);
490
- } else {
491
- if (typeof r.jsx != "function") throw TypeError("Expected `jsx` in production options");
492
- if (typeof r.jsxs != "function") throw TypeError("Expected `jsxs` in production options");
493
- a = he(i, r.jsx, r.jsxs);
494
- }
495
- /** @type {State} */
496
- let o = {
497
- Fragment: r.Fragment,
498
- ancestors: [],
499
- components: r.components || {},
500
- create: a,
501
- elementAttributeNameCase: r.elementAttributeNameCase || "react",
502
- evaluater: r.createEvaluater ? r.createEvaluater() : void 0,
503
- filePath: i,
504
- ignoreInvalidStyle: r.ignoreInvalidStyle || !1,
505
- passKeys: r.passKeys !== !1,
506
- passNode: r.passNode || !1,
507
- schema: r.space === "svg" ? e : n,
508
- stylePropertyNameCase: r.stylePropertyNameCase || "dom",
509
- tableCellAlignToStyle: r.tableCellAlignToStyle !== !1
510
- }, s = P(o, t, void 0);
511
- return s && typeof s != "string" ? s : o.create(t, o.Fragment, { children: s || void 0 }, void 0);
512
- }
513
- /**
514
- * Transform a node.
515
- *
516
- * @param {State} state
517
- * Info passed around.
518
- * @param {Nodes} node
519
- * Current node.
520
- * @param {string | undefined} key
521
- * Key.
522
- * @returns {Child | undefined}
523
- * Child, optional.
524
- */
525
- function P(e, t, n) {
526
- if (t.type === "element") return le(e, t, n);
527
- if (t.type === "mdxFlowExpression" || t.type === "mdxTextExpression") return ue(e, t);
528
- if (t.type === "mdxJsxFlowElement" || t.type === "mdxJsxTextElement") return fe(e, t, n);
529
- if (t.type === "mdxjsEsm") return de(e, t);
530
- if (t.type === "root") return pe(e, t, n);
531
- if (t.type === "text") return me(e, t);
532
- }
533
- /**
534
- * Handle element.
535
- *
536
- * @param {State} state
537
- * Info passed around.
538
- * @param {Element} node
539
- * Current node.
540
- * @param {string | undefined} key
541
- * Key.
542
- * @returns {Child | undefined}
543
- * Child, optional.
544
- */
545
- function le(t, n, r) {
546
- let i = t.schema, a = i;
547
- n.tagName.toLowerCase() === "svg" && i.space === "html" && (a = e, t.schema = a), t.ancestors.push(n);
548
- let o = R(t, n.tagName, !1), s = _e(t, n), c = L(t, n);
549
- return oe.has(n.tagName) && (c = c.filter(function(e) {
550
- return typeof e == "string" ? !S(e) : !0;
551
- })), F(t, s, o, n), I(s, c), t.ancestors.pop(), t.schema = i, t.create(n, o, s, r);
552
- }
553
- /**
554
- * Handle MDX expression.
555
- *
556
- * @param {State} state
557
- * Info passed around.
558
- * @param {MdxFlowExpressionHast | MdxTextExpressionHast} node
559
- * Current node.
560
- * @returns {Child | undefined}
561
- * Child, optional.
562
- */
563
- function ue(e, t) {
564
- if (t.data && t.data.estree && e.evaluater) {
565
- let n = t.data.estree.body[0];
566
- return n.type, e.evaluater.evaluateExpression(n.expression);
567
- }
568
- z(e, t.position);
569
- }
570
- /**
571
- * Handle MDX ESM.
572
- *
573
- * @param {State} state
574
- * Info passed around.
575
- * @param {MdxjsEsmHast} node
576
- * Current node.
577
- * @returns {Child | undefined}
578
- * Child, optional.
579
- */
580
- function de(e, t) {
581
- if (t.data && t.data.estree && e.evaluater) return e.evaluater.evaluateProgram(t.data.estree);
582
- z(e, t.position);
583
- }
584
- /**
585
- * Handle MDX JSX.
586
- *
587
- * @param {State} state
588
- * Info passed around.
589
- * @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node
590
- * Current node.
591
- * @param {string | undefined} key
592
- * Key.
593
- * @returns {Child | undefined}
594
- * Child, optional.
595
- */
596
- function fe(t, n, r) {
597
- let i = t.schema, a = i;
598
- n.name === "svg" && i.space === "html" && (a = e, t.schema = a), t.ancestors.push(n);
599
- let o = n.name === null ? t.Fragment : R(t, n.name, !0), s = ve(t, n), c = L(t, n);
600
- return F(t, s, o, n), I(s, c), t.ancestors.pop(), t.schema = i, t.create(n, o, s, r);
601
- }
602
- /**
603
- * Handle root.
604
- *
605
- * @param {State} state
606
- * Info passed around.
607
- * @param {Root} node
608
- * Current node.
609
- * @param {string | undefined} key
610
- * Key.
611
- * @returns {Child | undefined}
612
- * Child, optional.
613
- */
614
- function pe(e, t, n) {
615
- /** @type {Props} */
616
- let r = {};
617
- return I(r, L(e, t)), e.create(t, e.Fragment, r, n);
618
- }
619
- /**
620
- * Handle text.
621
- *
622
- * @param {State} _
623
- * Info passed around.
624
- * @param {Text} node
625
- * Current node.
626
- * @returns {Child | undefined}
627
- * Child, optional.
628
- */
629
- function me(e, t) {
630
- return t.value;
631
- }
632
- /**
633
- * Add `node` to props.
634
- *
635
- * @param {State} state
636
- * Info passed around.
637
- * @param {Props} props
638
- * Props.
639
- * @param {unknown} type
640
- * Type.
641
- * @param {Element | MdxJsxFlowElementHast | MdxJsxTextElementHast} node
642
- * Node.
643
- * @returns {undefined}
644
- * Nothing.
645
- */
646
- function F(e, t, n, r) {
647
- typeof n != "string" && n !== e.Fragment && e.passNode && (t.node = r);
648
- }
649
- /**
650
- * Add children to props.
651
- *
652
- * @param {Props} props
653
- * Props.
654
- * @param {Array<Child>} children
655
- * Children.
656
- * @returns {undefined}
657
- * Nothing.
658
- */
659
- function I(e, t) {
660
- if (t.length > 0) {
661
- let n = t.length > 1 ? t : t[0];
662
- n && (e.children = n);
663
- }
664
- }
665
- /**
666
- * @param {string | undefined} _
667
- * Path to file.
668
- * @param {Jsx} jsx
669
- * Dynamic.
670
- * @param {Jsx} jsxs
671
- * Static.
672
- * @returns {Create}
673
- * Create a production element.
674
- */
675
- function he(e, t, n) {
676
- return r;
677
- /** @type {Create} */
678
- function r(e, r, i, a) {
679
- let o = Array.isArray(i.children) ? n : t;
680
- return a ? o(r, i, a) : o(r, i);
681
- }
682
- }
683
- /**
684
- * @param {string | undefined} filePath
685
- * Path to file.
686
- * @param {JsxDev} jsxDEV
687
- * Development.
688
- * @returns {Create}
689
- * Create a development element.
690
- */
691
- function ge(e, t) {
692
- return n;
693
- /** @type {Create} */
694
- function n(n, r, i, a) {
695
- let o = Array.isArray(i.children), s = ee(n);
696
- return t(r, i, a, o, {
697
- columnNumber: s ? s.column - 1 : void 0,
698
- fileName: e,
699
- lineNumber: s ? s.line : void 0
700
- }, void 0);
701
- }
702
- }
703
- /**
704
- * Create props from an element.
705
- *
706
- * @param {State} state
707
- * Info passed around.
708
- * @param {Element} node
709
- * Current element.
710
- * @returns {Props}
711
- * Props.
712
- */
713
- function _e(e, t) {
714
- /** @type {Props} */
715
- let n = {}, r, i;
716
- for (i in t.properties) if (i !== "children" && M.call(t.properties, i)) {
717
- let a = ye(e, i, t.properties[i]);
718
- if (a) {
719
- let [i, o] = a;
720
- e.tableCellAlignToStyle && i === "align" && typeof o == "string" && se.has(t.tagName) ? r = o : n[i] = o;
721
- }
722
- }
723
- if (r) {
724
- let t = n.style ||= {};
725
- t[e.stylePropertyNameCase === "css" ? "text-align" : "textAlign"] = r;
726
- }
727
- return n;
728
- }
729
- /**
730
- * Create props from a JSX element.
731
- *
732
- * @param {State} state
733
- * Info passed around.
734
- * @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node
735
- * Current JSX element.
736
- * @returns {Props}
737
- * Props.
738
- */
739
- function ve(e, t) {
740
- /** @type {Props} */
741
- let n = {};
742
- for (let r of t.attributes) if (r.type === "mdxJsxExpressionAttribute") if (r.data && r.data.estree && e.evaluater) {
743
- let t = r.data.estree.body[0];
744
- t.type;
745
- let i = t.expression;
746
- i.type;
747
- let a = i.properties[0];
748
- a.type, Object.assign(n, e.evaluater.evaluateExpression(a.argument));
749
- } else z(e, t.position);
750
- else {
751
- let i = r.name, a;
752
- if (r.value && typeof r.value == "object") if (r.value.data && r.value.data.estree && e.evaluater) {
753
- let t = r.value.data.estree.body[0];
754
- t.type, a = e.evaluater.evaluateExpression(t.expression);
755
- } else z(e, t.position);
756
- else a = r.value === null ? !0 : r.value;
757
- n[i] = a;
758
- }
759
- return n;
760
- }
761
- /**
762
- * Create children.
763
- *
764
- * @param {State} state
765
- * Info passed around.
766
- * @param {Parents} node
767
- * Current element.
768
- * @returns {Array<Child>}
769
- * Children.
770
- */
771
- function L(e, t) {
772
- /** @type {Array<Child>} */
773
- let n = [], r = -1, i = e.passKeys ? /* @__PURE__ */ new Map() : ie;
774
- for (; ++r < t.children.length;) {
775
- let a = t.children[r], o;
776
- if (e.passKeys) {
777
- let e = a.type === "element" ? a.tagName : a.type === "mdxJsxFlowElement" || a.type === "mdxJsxTextElement" ? a.name : void 0;
778
- if (e) {
779
- let t = i.get(e) || 0;
780
- o = e + "-" + t, i.set(e, t + 1);
781
- }
782
- }
783
- let s = P(e, a, o);
784
- s !== void 0 && n.push(s);
785
- }
786
- return n;
787
- }
788
- /**
789
- * Handle a property.
790
- *
791
- * @param {State} state
792
- * Info passed around.
793
- * @param {string} prop
794
- * Key.
795
- * @param {Array<number | string> | boolean | number | string | null | undefined} value
796
- * hast property value.
797
- * @returns {Field | undefined}
798
- * Field for runtime, optional.
799
- */
800
- function ye(e, t, n) {
801
- let r = a(e.schema, t);
802
- if (!(n == null || typeof n == "number" && Number.isNaN(n))) {
803
- if (Array.isArray(n) && (n = r.commaSeparated ? o(n) : i(n)), r.property === "style") {
804
- let t = typeof n == "object" ? n : be(e, String(n));
805
- return e.stylePropertyNameCase === "css" && (t = xe(t)), ["style", t];
806
- }
807
- return [e.elementAttributeNameCase === "react" && r.space ? s[r.property] || r.property : r.attribute, n];
808
- }
809
- }
810
- /**
811
- * Parse a CSS declaration to an object.
812
- *
813
- * @param {State} state
814
- * Info passed around.
815
- * @param {string} value
816
- * CSS declarations.
817
- * @returns {Style}
818
- * Properties.
819
- * @throws
820
- * Throws `VFileMessage` when CSS cannot be parsed.
821
- */
822
- function be(e, t) {
823
- try {
824
- return (0, re.default)(t, { reactCompat: !0 });
825
- } catch (t) {
826
- if (e.ignoreInvalidStyle) return {};
827
- let n = t, r = new j("Cannot parse `style` attribute", {
828
- ancestors: e.ancestors,
829
- cause: n,
830
- ruleId: "style",
831
- source: "hast-util-to-jsx-runtime"
832
- });
833
- throw r.file = e.filePath || void 0, r.url = N + "#cannot-parse-style-attribute", r;
834
- }
835
- }
836
- /**
837
- * Create a JSX name from a string.
838
- *
839
- * @param {State} state
840
- * To do.
841
- * @param {string} name
842
- * Name.
843
- * @param {boolean} allowExpression
844
- * Allow member expressions and identifiers.
845
- * @returns {unknown}
846
- * To do.
847
- */
848
- function R(e, t, n) {
849
- /** @type {Identifier | Literal | MemberExpression} */
850
- let r;
851
- if (!n) r = {
852
- type: "Literal",
853
- value: t
854
- };
855
- else if (t.includes(".")) {
856
- let e = t.split("."), n = -1, i;
857
- for (; ++n < e.length;) {
858
- /** @type {Identifier | Literal} */
859
- let t = b(e[n]) ? {
860
- type: "Identifier",
861
- name: e[n]
862
- } : {
863
- type: "Literal",
864
- value: e[n]
865
- };
866
- i = i ? {
867
- type: "MemberExpression",
868
- object: i,
869
- property: t,
870
- computed: !!(n && t.type === "Literal"),
871
- optional: !1
872
- } : t;
873
- }
874
- r = i;
875
- } else r = b(t) && !/^[a-z]/.test(t) ? {
876
- type: "Identifier",
877
- name: t
878
- } : {
879
- type: "Literal",
880
- value: t
881
- };
882
- if (r.type === "Literal") {
883
- let t = r.value;
884
- return M.call(e.components, t) ? e.components[t] : t;
885
- }
886
- if (e.evaluater) return e.evaluater.evaluateExpression(r);
887
- z(e);
888
- }
889
- /**
890
- * @param {State} state
891
- * @param {Position | undefined} [place]
892
- * @returns {never}
893
- */
894
- function z(e, t) {
895
- let n = new j("Cannot handle MDX estrees without `createEvaluater`", {
896
- ancestors: e.ancestors,
897
- place: t,
898
- ruleId: "mdx-estree",
899
- source: "hast-util-to-jsx-runtime"
900
- });
901
- throw n.file = e.filePath || void 0, n.url = N + "#cannot-handle-mdx-estrees-without-createevaluater", n;
902
- }
903
- /**
904
- * Transform a DOM casing style object to a CSS casing style object.
905
- *
906
- * @param {Style} domCasing
907
- * @returns {Style}
908
- */
909
- function xe(e) {
910
- /** @type {Style} */
911
- let t = {}, n;
912
- for (n in e) M.call(e, n) && (t[Se(n)] = e[n]);
913
- return t;
914
- }
915
- /**
916
- * Transform a DOM casing style field to a CSS casing style field.
917
- *
918
- * @param {string} from
919
- * @returns {string}
920
- */
921
- function Se(e) {
922
- let t = e.replace(ae, Ce);
923
- return t.slice(0, 3) === "ms-" && (t = "-" + t), t;
924
- }
925
- /**
926
- * Make `$0` dash cased.
927
- *
928
- * @param {string} $0
929
- * Capitalized ASCII leter.
930
- * @returns {string}
931
- * Dash and lower letter.
932
- */
933
- function Ce(e) {
934
- return "-" + e.toLowerCase();
935
- }
936
- var we = /* @__PURE__ */ new Set([
937
- "className",
938
- "value",
939
- "readOnly",
940
- "noValidate",
941
- "formNoValidate",
942
- "isMap",
943
- "noModule",
944
- "playsInline",
945
- "adAuctionHeaders",
946
- "allowFullscreen",
947
- "browsingTopics",
948
- "defaultChecked",
949
- "defaultMuted",
950
- "defaultSelected",
951
- "disablePictureInPicture",
952
- "disableRemotePlayback",
953
- "preservesPitch",
954
- "shadowRootClonable",
955
- "shadowRootCustomElementRegistry",
956
- "shadowRootDelegatesFocus",
957
- "shadowRootSerializable",
958
- "sharedStorageWritable",
959
- .../* @__PURE__ */ "allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable".split(".")
960
- ]), Te = /* @__PURE__ */ new Set([
961
- "innerHTML",
962
- "textContent",
963
- "innerText",
964
- "children"
965
- ]), Ee = /* @__PURE__ */ Object.assign(Object.create(null), {
966
- className: "class",
967
- htmlFor: "for"
968
- }), De = /* @__PURE__ */ Object.assign(Object.create(null), {
969
- class: "className",
970
- novalidate: {
971
- $: "noValidate",
972
- FORM: 1
973
- },
974
- formnovalidate: {
975
- $: "formNoValidate",
976
- BUTTON: 1,
977
- INPUT: 1
978
- },
979
- ismap: {
980
- $: "isMap",
981
- IMG: 1
982
- },
983
- nomodule: {
984
- $: "noModule",
985
- SCRIPT: 1
986
- },
987
- playsinline: {
988
- $: "playsInline",
989
- VIDEO: 1
990
- },
991
- readonly: {
992
- $: "readOnly",
993
- INPUT: 1,
994
- TEXTAREA: 1
995
- },
996
- adauctionheaders: {
997
- $: "adAuctionHeaders",
998
- IFRAME: 1
999
- },
1000
- allowfullscreen: {
1001
- $: "allowFullscreen",
1002
- IFRAME: 1
1003
- },
1004
- browsingtopics: {
1005
- $: "browsingTopics",
1006
- IMG: 1
1007
- },
1008
- defaultchecked: {
1009
- $: "defaultChecked",
1010
- INPUT: 1
1011
- },
1012
- defaultmuted: {
1013
- $: "defaultMuted",
1014
- AUDIO: 1,
1015
- VIDEO: 1
1016
- },
1017
- defaultselected: {
1018
- $: "defaultSelected",
1019
- OPTION: 1
1020
- },
1021
- disablepictureinpicture: {
1022
- $: "disablePictureInPicture",
1023
- VIDEO: 1
1024
- },
1025
- disableremoteplayback: {
1026
- $: "disableRemotePlayback",
1027
- AUDIO: 1,
1028
- VIDEO: 1
1029
- },
1030
- preservespitch: {
1031
- $: "preservesPitch",
1032
- AUDIO: 1,
1033
- VIDEO: 1
1034
- },
1035
- shadowrootclonable: {
1036
- $: "shadowRootClonable",
1037
- TEMPLATE: 1
1038
- },
1039
- shadowrootdelegatesfocus: {
1040
- $: "shadowRootDelegatesFocus",
1041
- TEMPLATE: 1
1042
- },
1043
- shadowrootserializable: {
1044
- $: "shadowRootSerializable",
1045
- TEMPLATE: 1
1046
- },
1047
- sharedstoragewritable: {
1048
- $: "sharedStorageWritable",
1049
- IFRAME: 1,
1050
- IMG: 1
1051
- }
1052
- });
1053
- function Oe(e, t) {
1054
- let n = De[e];
1055
- return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
1056
- }
1057
- var ke = /* @__PURE__ */ new Set([
1058
- "beforeinput",
1059
- "click",
1060
- "dblclick",
1061
- "contextmenu",
1062
- "focusin",
1063
- "focusout",
1064
- "input",
1065
- "keydown",
1066
- "keyup",
1067
- "mousedown",
1068
- "mousemove",
1069
- "mouseout",
1070
- "mouseover",
1071
- "mouseup",
1072
- "pointerdown",
1073
- "pointermove",
1074
- "pointerout",
1075
- "pointerover",
1076
- "pointerup",
1077
- "touchend",
1078
- "touchmove",
1079
- "touchstart"
1080
- ]), Ae = /* @__PURE__ */ new Set(/* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern".split(".")), je = {
1081
- xlink: "http://www.w3.org/1999/xlink",
1082
- xml: "http://www.w3.org/XML/1998/namespace"
1083
- };
1084
- function Me(e, t, n) {
1085
- let r = n.length, i = t.length, a = r, o = 0, s = 0, c = t[i - 1].nextSibling, l = null;
1086
- for (; o < i || s < a;) {
1087
- if (t[o] === n[s]) {
1088
- o++, s++;
1089
- continue;
1090
- }
1091
- for (; t[i - 1] === n[a - 1];) i--, a--;
1092
- if (i === o) {
1093
- let t = a < r ? s ? n[s - 1].nextSibling : n[a - s] : c;
1094
- for (; s < a;) e.insertBefore(n[s++], t);
1095
- } else if (a === s) for (; o < i;) (!l || !l.has(t[o])) && t[o].remove(), o++;
1096
- else if (t[o] === n[a - 1] && n[s] === t[i - 1]) {
1097
- let r = t[--i].nextSibling;
1098
- e.insertBefore(n[s++], t[o++].nextSibling), e.insertBefore(n[--a], r), t[i] = n[a];
1099
- } else {
1100
- if (!l) {
1101
- l = /* @__PURE__ */ new Map();
1102
- let e = s;
1103
- for (; e < a;) l.set(n[e], e++);
1104
- }
1105
- let r = l.get(t[o]);
1106
- if (r != null) if (s < r && r < a) {
1107
- let c = o, u = 1, d;
1108
- for (; ++c < i && c < a && !((d = l.get(t[c])) == null || d !== r + u);) u++;
1109
- if (u > r - s) {
1110
- let i = t[o];
1111
- for (; s < r;) e.insertBefore(n[s++], i);
1112
- } else e.replaceChild(n[s++], t[o++]);
1113
- } else o++;
1114
- else t[o++].remove();
1115
- }
1116
- }
1117
- }
1118
- var B = "_$DX_DELEGATE";
1119
- function Ne(e, t = window.document) {
1120
- let n = t[B] || (t[B] = /* @__PURE__ */ new Set());
1121
- for (let r = 0, i = e.length; r < i; r++) {
1122
- let i = e[r];
1123
- n.has(i) || (n.add(i), t.addEventListener(i, Ge));
1124
- }
1125
- }
1126
- function V(e, t, n) {
1127
- H(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
1128
- }
1129
- function Pe(e, t, n, r) {
1130
- H(e) || (r == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, r));
1131
- }
1132
- function Fe(e, t, n) {
1133
- H(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
1134
- }
1135
- function Ie(e, t) {
1136
- H(e) || (t == null ? e.removeAttribute("class") : e.className = t);
1137
- }
1138
- function Le(e, t, n, r) {
1139
- if (r) Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
1140
- else if (Array.isArray(n)) {
1141
- let r = n[0];
1142
- e.addEventListener(t, n[0] = (t) => r.call(e, n[1], t));
1143
- } else e.addEventListener(t, n, typeof n != "function" && n);
1144
- }
1145
- function Re(e, t, n = {}) {
1146
- let r = Object.keys(t || {}), i = Object.keys(n), a, o;
1147
- for (a = 0, o = i.length; a < o; a++) {
1148
- let r = i[a];
1149
- !r || r === "undefined" || t[r] || (U(e, r, !1), delete n[r]);
1150
- }
1151
- for (a = 0, o = r.length; a < o; a++) {
1152
- let i = r[a], o = !!t[i];
1153
- !i || i === "undefined" || n[i] === o || !o || (U(e, i, !0), n[i] = o);
1154
- }
1155
- return n;
1156
- }
1157
- function ze(e, t, n) {
1158
- if (!t) return n ? V(e, "style") : t;
1159
- let r = e.style;
1160
- if (typeof t == "string") return r.cssText = t;
1161
- typeof n == "string" && (r.cssText = n = void 0), n ||= {}, t ||= {};
1162
- let i, a;
1163
- for (a in n) t[a] ?? r.removeProperty(a), delete n[a];
1164
- for (a in t) i = t[a], i !== n[a] && (r.setProperty(a, i), n[a] = i);
1165
- return n;
1166
- }
1167
- function Be(e, t = {}, n, r) {
1168
- let i = {};
1169
- return r || f(() => i.children = G(e, t.children, i.children)), f(() => typeof t.ref == "function" && Ve(t.ref, e)), f(() => He(e, t, n, !0, i, !0)), i;
1170
- }
1171
- function Ve(e, t, n) {
1172
- return g(() => e(t, n));
1173
- }
1174
- function He(e, t, n, r, i = {}, a = !1) {
1175
- t ||= {};
1176
- for (let r in i) if (!(r in t)) {
1177
- if (r === "children") continue;
1178
- i[r] = W(e, r, null, i[r], n, a, t);
1179
- }
1180
- for (let o in t) {
1181
- if (o === "children") {
1182
- r || G(e, t.children);
1183
- continue;
1184
- }
1185
- let s = t[o];
1186
- i[o] = W(e, o, s, i[o], n, a, t);
1187
- }
1188
- }
1189
- function Ue(e) {
1190
- let t, n;
1191
- return !H() || !(t = m.registry.get(n = Ke())) ? e() : (m.completed && m.completed.add(t), m.registry.delete(n), t);
1192
- }
1193
- function H(e) {
1194
- return !!m.context && !m.done && (!e || e.isConnected);
1195
- }
1196
- function We(e) {
1197
- return e.toLowerCase().replace(/-([a-z])/g, (e, t) => t.toUpperCase());
1198
- }
1199
- function U(e, t, n) {
1200
- let r = t.trim().split(/\s+/);
1201
- for (let t = 0, i = r.length; t < i; t++) e.classList.toggle(r[t], n);
1202
- }
1203
- function W(e, t, n, r, i, a, o) {
1204
- let s, c, l, u, d;
1205
- if (t === "style") return ze(e, n, r);
1206
- if (t === "classList") return Re(e, n, r);
1207
- if (n === r) return r;
1208
- if (t === "ref") a || n(e);
1209
- else if (t.slice(0, 3) === "on:") {
1210
- let i = t.slice(3);
1211
- r && e.removeEventListener(i, r, typeof r != "function" && r), n && e.addEventListener(i, n, typeof n != "function" && n);
1212
- } else if (t.slice(0, 10) === "oncapture:") {
1213
- let i = t.slice(10);
1214
- r && e.removeEventListener(i, r, !0), n && e.addEventListener(i, n, !0);
1215
- } else if (t.slice(0, 2) === "on") {
1216
- let i = t.slice(2).toLowerCase(), a = ke.has(i);
1217
- if (!a && r) {
1218
- let t = Array.isArray(r) ? r[0] : r;
1219
- e.removeEventListener(i, t);
1220
- }
1221
- (a || n) && (Le(e, i, n, a), a && Ne([i]));
1222
- } else if (t.slice(0, 5) === "attr:") V(e, t.slice(5), n);
1223
- else if (t.slice(0, 5) === "bool:") Fe(e, t.slice(5), n);
1224
- else if ((d = t.slice(0, 5) === "prop:") || (l = Te.has(t)) || !i && ((u = Oe(t, e.tagName)) || (c = we.has(t))) || (s = e.nodeName.includes("-") || "is" in o)) {
1225
- if (d) t = t.slice(5), c = !0;
1226
- else if (H(e)) return n;
1227
- t === "class" || t === "className" ? Ie(e, n) : s && !c && !l ? e[We(t)] = n : e[u || t] = n;
1228
- } else {
1229
- let r = i && t.indexOf(":") > -1 && je[t.split(":")[0]];
1230
- r ? Pe(e, r, t, n) : V(e, Ee[t] || t, n);
1231
- }
1232
- return n;
1233
- }
1234
- function Ge(e) {
1235
- if (m.registry && m.events && m.events.find(([t, n]) => n === e)) return;
1236
- let t = e.target, n = `$$${e.type}`, r = e.target, i = e.currentTarget, a = (t) => Object.defineProperty(e, "target", {
1237
- configurable: !0,
1238
- value: t
1239
- }), o = () => {
1240
- let r = t[n];
1241
- if (r && !t.disabled) {
1242
- let i = t[`${n}Data`];
1243
- if (i === void 0 ? r.call(t, e) : r.call(t, i, e), e.cancelBubble) return;
1244
- }
1245
- return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && a(t.host), !0;
1246
- }, s = () => {
1247
- for (; o() && (t = t._$host || t.parentNode || t.host););
1248
- };
1249
- if (Object.defineProperty(e, "currentTarget", {
1250
- configurable: !0,
1251
- get() {
1252
- return t || document;
1253
- }
1254
- }), m.registry && !m.done && (m.done = _$HY.done = !0), e.composedPath) {
1255
- let n = e.composedPath();
1256
- a(n[0]);
1257
- for (let e = 0; e < n.length - 2 && (t = n[e], o()); e++) {
1258
- if (t._$host) {
1259
- t = t._$host, s();
1260
- break;
1261
- }
1262
- if (t.parentNode === i) break;
1263
- }
1264
- } else s();
1265
- a(r);
1266
- }
1267
- function G(e, t, n, r, i) {
1268
- let a = H(e);
1269
- if (a) {
1270
- !n && (n = [...e.childNodes]);
1271
- let t = [];
1272
- for (let e = 0; e < n.length; e++) {
1273
- let r = n[e];
1274
- r.nodeType === 8 && r.data.slice(0, 2) === "!$" ? r.remove() : t.push(r);
1275
- }
1276
- n = t;
1277
- }
1278
- for (; typeof n == "function";) n = n();
1279
- if (t === n) return n;
1280
- let o = typeof t, s = r !== void 0;
1281
- if (e = s && n[0] && n[0].parentNode || e, o === "string" || o === "number") {
1282
- if (a || o === "number" && (t = t.toString(), t === n)) return n;
1283
- if (s) {
1284
- let i = n[0];
1285
- i && i.nodeType === 3 ? i.data !== t && (i.data = t) : i = document.createTextNode(t), n = J(e, n, r, i);
1286
- } else n = n !== "" && typeof n == "string" ? e.firstChild.data = t : e.textContent = t;
1287
- } else if (t == null || o === "boolean") {
1288
- if (a) return n;
1289
- n = J(e, n, r);
1290
- } else if (o === "function") return f(() => {
1291
- let i = t();
1292
- for (; typeof i == "function";) i = i();
1293
- n = G(e, i, n, r);
1294
- }), () => n;
1295
- else if (Array.isArray(t)) {
1296
- let o = [], c = n && Array.isArray(n);
1297
- if (K(o, t, n, i)) return f(() => n = G(e, o, n, r, !0)), () => n;
1298
- if (a) {
1299
- if (!o.length) return n;
1300
- if (r === void 0) return n = [...e.childNodes];
1301
- let t = o[0];
1302
- if (t.parentNode !== e) return n;
1303
- let i = [t];
1304
- for (; (t = t.nextSibling) !== r;) i.push(t);
1305
- return n = i;
1306
- }
1307
- if (o.length === 0) {
1308
- if (n = J(e, n, r), s) return n;
1309
- } else c ? n.length === 0 ? q(e, o, r) : Me(e, n, o) : (n && J(e), q(e, o));
1310
- n = o;
1311
- } else if (t.nodeType) {
1312
- if (a && t.parentNode) return n = s ? [t] : t;
1313
- if (Array.isArray(n)) {
1314
- if (s) return n = J(e, n, r, t);
1315
- J(e, n, null, t);
1316
- } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
1317
- n = t;
1318
- }
1319
- return n;
1320
- }
1321
- function K(e, t, n, r) {
1322
- let i = !1;
1323
- for (let a = 0, o = t.length; a < o; a++) {
1324
- let o = t[a], s = n && n[e.length], c;
1325
- if (!(o == null || o === !0 || o === !1)) if ((c = typeof o) == "object" && o.nodeType) e.push(o);
1326
- else if (Array.isArray(o)) i = K(e, o, s) || i;
1327
- else if (c === "function") if (r) {
1328
- for (; typeof o == "function";) o = o();
1329
- i = K(e, Array.isArray(o) ? o : [o], Array.isArray(s) ? s : [s]) || i;
1330
- } else e.push(o), i = !0;
1331
- else {
1332
- let t = String(o);
1333
- s && s.nodeType === 3 && s.data === t ? e.push(s) : e.push(document.createTextNode(t));
1334
- }
1335
- }
1336
- return i;
1337
- }
1338
- function q(e, t, n = null) {
1339
- for (let r = 0, i = t.length; r < i; r++) e.insertBefore(t[r], n);
1340
- }
1341
- function J(e, t, n, r) {
1342
- if (n === void 0) return e.textContent = "";
1343
- let i = r || document.createTextNode("");
1344
- if (t.length) {
1345
- let r = !1;
1346
- for (let a = t.length - 1; a >= 0; a--) {
1347
- let o = t[a];
1348
- if (i !== o) {
1349
- let t = o.parentNode === e;
1350
- !r && !a ? t ? e.replaceChild(i, o) : e.insertBefore(i, n) : t && o.remove();
1351
- } else r = !0;
1352
- }
1353
- } else e.insertBefore(i, n);
1354
- return [i];
1355
- }
1356
- function Ke() {
1357
- return m.getNextContextId();
1358
- }
1359
- var qe = "http://www.w3.org/2000/svg";
1360
- function Je(e, t = !1, n = void 0) {
1361
- return t ? document.createElementNS(qe, e) : document.createElement(e, { is: n });
1362
- }
1363
- function Ye(e, t) {
1364
- let n = d(e);
1365
- return d(() => {
1366
- let e = n();
1367
- switch (typeof e) {
1368
- case "function": return g(() => e(t));
1369
- case "string":
1370
- let n = Ae.has(e), r = m.context ? Ue() : Je(e, n, g(() => t.is));
1371
- return Be(r, t, n), r;
1372
- }
1373
- });
1374
- }
1375
- function Xe(e) {
1376
- let [, t] = h(e, ["component"]);
1377
- return Ye(() => e.component, t);
1378
- }
1379
- var Ze = (e) => {
1380
- let t = e.charAt(0);
1381
- return t !== t.toLowerCase();
1382
- }, Qe = /e(r[HRWrv]|[Vawy])|Con|l(e[Tcs]|c)|s(eP|y)|a(t[rt]|u|v)|Of|Ex|f[XYa]|gt|hR|d[Pg]|t[TXYd]|[UZq]/, Y = Object.create(null), $e = /[A-Z]/g, et = (e) => Y[e] ?? (Y[e] = Qe.test(e) ? e : e.replaceAll($e, (e) => `-${e.toLowerCase()}`)), tt = /^(t(ext$|s)|s[vwy]|g)|^set|tad|ker|p(at|s)|s(to|c$|ca|k)|r(ec|cl)|ew|us|f($|e|s)|cu|n[ei]|l[ty]|[GOP]/, X = Object.create(null), nt = (e) => e in X ? X[e] ?? !1 : X[e] = tt.test(e) && !e.includes("-");
1383
- u(Object.create(null));
1384
- var rt = new Set(["mjx"]), it = RegExp(`(?:${[...rt].join("|")})-.+`, "g"), Z = Object.create(null), at = (e) => typeof e == "string" ? Z[e] ?? (Z[e] = e.replaceAll(it, (e) => e.replaceAll("-", "_"))) : e, Q = (e, t) => {
1385
- let n = {};
1386
- for (let r of Object.keys(e)) n[ct(r, t)] = typeof e[r] == "object" && !Array.isArray(e[r]) ? Q(e[r], t) : at(e[r]);
1387
- return n;
1388
- }, ot = (e) => e.children, st = (e, t) => typeof e == "function" ? e.name === "Fragment" ? ot(t) : e(Q(t)) : l(Xe, p(Ze(e) ? t : Q(t, e), { component: at(e) })), ct = (e, t = "") => nt(t) ? e = e === "xlinkHref" || e === "xlink:href" ? "href" : et(e) : e, lt = st;
1389
- function $() {
1390
- return ce(c().render(), {
1391
- Fragment: ot,
1392
- jsx: st,
1393
- jsxs: lt,
1394
- elementAttributeNameCase: "html",
1395
- stylePropertyNameCase: "css"
1396
- });
1397
- }
1398
- export { $ as SeamlineSettings, $ as default };