jaml-ui 0.29.0 → 0.31.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.
- package/dist/assets/searchPoolWorker-BPJ3Mf0o.js +40 -0
- package/dist/assets/searchPoolWorker-BPJ3Mf0o.js.map +1 -0
- package/dist/chunks/{searchPoolWorker-hVVM49SD.js → searchPoolWorker-DUope_8B.js} +2 -2
- package/dist/chunks/searchPoolWorker-DUope_8B.js.map +1 -0
- package/dist/chunks/{ui-D_9HO9OO.js → ui-DRov81qO.js} +632 -505
- package/dist/chunks/ui-DRov81qO.js.map +1 -0
- package/dist/index.js +2659 -2659
- package/dist/index.js.map +1 -1
- package/dist/motely.js +6 -3
- package/dist/motely.js.map +1 -1
- package/dist/ui/JimboDualChip.d.ts +17 -0
- package/dist/ui/JimboSlider.d.ts +11 -0
- package/dist/ui/JimboStepper.d.ts +10 -0
- package/dist/ui/JimboToggleList.d.ts +2 -1
- package/dist/ui/jimbo.css +1 -1
- package/dist/ui/jimboTooltip.d.ts +10 -1
- package/dist/ui/panel.d.ts +2 -1
- package/dist/ui.d.ts +3 -0
- package/dist/ui.js +3 -3
- package/package.json +3 -3
- package/dist/assets/searchPoolWorker-C4xj1WA_.js +0 -40
- package/dist/assets/searchPoolWorker-C4xj1WA_.js.map +0 -1
- package/dist/chunks/searchPoolWorker-hVVM49SD.js.map +0 -1
- package/dist/chunks/ui-D_9HO9OO.js.map +0 -1
|
@@ -5,13 +5,13 @@ import s, { createContext as c, createElement as l, forwardRef as u, memo as d,
|
|
|
5
5
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
6
6
|
import { createPortal as S } from "react-dom";
|
|
7
7
|
//#region src/ui/hooks.ts
|
|
8
|
-
function
|
|
8
|
+
function C(e) {
|
|
9
9
|
return new Promise((t) => {
|
|
10
10
|
let n = new window.Image();
|
|
11
11
|
n.addEventListener("load", () => t(n)), n.addEventListener("error", () => t(null)), n.src = e;
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function ee(e, t, n, r, i) {
|
|
15
15
|
if (!n || !r || !r?.pos) return 0;
|
|
16
16
|
let a = n.width / r.columns, o = n.height / r.rows, s = e.style;
|
|
17
17
|
if (r.order === 0 && (e.width = a, e.height = o, s.width = `${a}px`, s.height = `${o}px`), s.imageRendering = "pixelated", t.imageSmoothingEnabled = !0, t.save(), r.animated && i) {
|
|
@@ -20,7 +20,7 @@ function te(e, t, n, r, i) {
|
|
|
20
20
|
}
|
|
21
21
|
return t.drawImage(n, r.pos.x * a, r.pos.y * o, a, o, 0, 0, e.width, e.height), t.restore(), a / o;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function w(e) {
|
|
24
24
|
let n = _(null);
|
|
25
25
|
return m(() => {
|
|
26
26
|
if (!e || !n.current) return;
|
|
@@ -33,7 +33,7 @@ function C(e) {
|
|
|
33
33
|
};
|
|
34
34
|
}, [e]), n;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function te() {
|
|
37
37
|
let e = _(null);
|
|
38
38
|
return m(() => {
|
|
39
39
|
let t = e.current;
|
|
@@ -80,7 +80,7 @@ function ne() {
|
|
|
80
80
|
};
|
|
81
81
|
}, []), e;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function T({ mode: e = "snap", placement: t = "auto", delay: n = 80, disabled: r = !1 }) {
|
|
84
84
|
let [i, a] = v(!1), [o, s] = v(null), c = _(null), l = _(null), u = _(null), d = f(() => {
|
|
85
85
|
r || (u.current && clearTimeout(u.current), u.current = setTimeout(() => a(!0), n));
|
|
86
86
|
}, [r, n]), p = f(() => {
|
|
@@ -123,7 +123,7 @@ function w({ mode: e = "snap", placement: t = "auto", delay: n = 80, disabled: r
|
|
|
123
123
|
}, [e])
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function E({ layers: e, invert: t = !1, hoverTilt: n = !1 }) {
|
|
127
127
|
let r = _(null), a = _(null), o = _(/* @__PURE__ */ new Map()), [s, c] = v(3 / 4), [, l] = v(0), u = _(null), d = _({
|
|
128
128
|
rx: 0,
|
|
129
129
|
ry: 0,
|
|
@@ -136,7 +136,7 @@ function T({ layers: e, invert: t = !1, hoverTilt: n = !1 }) {
|
|
|
136
136
|
m(() => {
|
|
137
137
|
let e = !1, t = o.current;
|
|
138
138
|
return (async () => {
|
|
139
|
-
let n = Array.from(new Set(Object.values(i).map((e) => e.src))), r = await Promise.all(n.map((e) =>
|
|
139
|
+
let n = Array.from(new Set(Object.values(i).map((e) => e.src))), r = await Promise.all(n.map((e) => C(e)));
|
|
140
140
|
e || (r.forEach((e, r) => {
|
|
141
141
|
e && t.set(n[r], e);
|
|
142
142
|
}), l((e) => e + 1));
|
|
@@ -152,14 +152,14 @@ function T({ layers: e, invert: t = !1, hoverTilt: n = !1 }) {
|
|
|
152
152
|
i.clearRect(0, 0, n.width, n.height), [...e].sort((e, t) => e.order - t.order).forEach((e) => {
|
|
153
153
|
let t = o.current.get(e.source);
|
|
154
154
|
if (t) {
|
|
155
|
-
let a =
|
|
155
|
+
let a = ee(n, i, t, e, h ? r : void 0);
|
|
156
156
|
e.order === 0 && c(a);
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
|
-
|
|
159
|
+
C(e.source).then((t) => {
|
|
160
160
|
if (!(a || !t)) {
|
|
161
161
|
if (o.current.set(e.source, t), !h) {
|
|
162
|
-
let r =
|
|
162
|
+
let r = ee(n, i, t, e);
|
|
163
163
|
e.order === 0 && c(r);
|
|
164
164
|
}
|
|
165
165
|
l((e) => e + 1);
|
|
@@ -232,7 +232,7 @@ function T({ layers: e, invert: t = !1, hoverTilt: n = !1 }) {
|
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function D(e, t, n) {
|
|
236
236
|
let [r, i] = v(null), [a, o] = v(null), [s, c] = v(null), l = f((e, t, n) => {
|
|
237
237
|
let r = "touches" in e ? e.touches[0] : e, i = e.currentTarget.getBoundingClientRect();
|
|
238
238
|
o({
|
|
@@ -301,7 +301,7 @@ function E(e, t, n) {
|
|
|
301
301
|
}
|
|
302
302
|
//#endregion
|
|
303
303
|
//#region src/ui/sprites.tsx
|
|
304
|
-
function
|
|
304
|
+
function O({ name: e, sheet: t, width: i = 40, height: s, style: c }) {
|
|
305
305
|
let l = a(e), u = t ?? l?.type ?? "Jokers", d = o[u], f = r(u), p = l?.pos ?? f.pos, m = i;
|
|
306
306
|
[
|
|
307
307
|
"Jokers",
|
|
@@ -327,7 +327,7 @@ function D({ name: e, sheet: t, width: i = 40, height: s, style: c }) {
|
|
|
327
327
|
...c
|
|
328
328
|
} });
|
|
329
329
|
}
|
|
330
|
-
var
|
|
330
|
+
var k = [
|
|
331
331
|
"White",
|
|
332
332
|
"Red",
|
|
333
333
|
"Green",
|
|
@@ -337,8 +337,8 @@ var O = [
|
|
|
337
337
|
"Orange",
|
|
338
338
|
"Gold"
|
|
339
339
|
];
|
|
340
|
-
function
|
|
341
|
-
let a =
|
|
340
|
+
function A({ stake: e, width: t = 29, height: r, style: i }) {
|
|
341
|
+
let a = k.indexOf(e.replace(" Stake", "")), o = a >= 0 ? a : 0, s = o % 5, c = Math.floor(o / 5), l = r ?? t, u = t * 5, d = l * 2;
|
|
342
342
|
return /* @__PURE__ */ b("div", { style: {
|
|
343
343
|
width: t,
|
|
344
344
|
height: l,
|
|
@@ -351,7 +351,7 @@ function k({ stake: e, width: t = 29, height: r, style: i }) {
|
|
|
351
351
|
...i
|
|
352
352
|
} });
|
|
353
353
|
}
|
|
354
|
-
var
|
|
354
|
+
var ne = {
|
|
355
355
|
Red: 0,
|
|
356
356
|
Blue: 1,
|
|
357
357
|
Yellow: 2,
|
|
@@ -362,7 +362,7 @@ var A = {
|
|
|
362
362
|
Ghost: 3
|
|
363
363
|
};
|
|
364
364
|
function re({ deck: e, width: t = 71, height: r, style: i }) {
|
|
365
|
-
let a =
|
|
365
|
+
let a = ne[e.replace(" Deck", "")] ?? 0, o = r ?? t * 95 / 71, s = t * 13, c = o * 4;
|
|
366
366
|
return /* @__PURE__ */ b("div", { style: {
|
|
367
367
|
width: t,
|
|
368
368
|
height: o,
|
|
@@ -394,8 +394,8 @@ function j({ tone: e = "default", size: t = "md", shadow: n = !0, dance: r = !1,
|
|
|
394
394
|
}
|
|
395
395
|
//#endregion
|
|
396
396
|
//#region src/ui/panel.tsx
|
|
397
|
-
var
|
|
398
|
-
ref:
|
|
397
|
+
var M = d(({ children: e, className: t = "", sway: n = !1, onBack: r, hideBack: i = !1, style: a, ...o }) => /* @__PURE__ */ x("div", {
|
|
398
|
+
ref: w(n),
|
|
399
399
|
className: `j-panel ${t}`,
|
|
400
400
|
style: a,
|
|
401
401
|
...o,
|
|
@@ -404,18 +404,18 @@ var ie = d(({ children: e, className: t = "", sway: n = !1, onBack: r, hideBack:
|
|
|
404
404
|
children: e
|
|
405
405
|
}), r && !i && /* @__PURE__ */ b("div", {
|
|
406
406
|
className: "j-panel__back",
|
|
407
|
-
children: /* @__PURE__ */ b(
|
|
407
|
+
children: /* @__PURE__ */ b(ae, { onClick: r })
|
|
408
408
|
})]
|
|
409
409
|
}));
|
|
410
|
-
|
|
411
|
-
var
|
|
410
|
+
M.displayName = "JimboPanel";
|
|
411
|
+
var ie = d(({ children: e, className: t = "", style: n, ...r }) => /* @__PURE__ */ b("div", {
|
|
412
412
|
className: `j-inner-panel ${t}`,
|
|
413
413
|
style: n,
|
|
414
414
|
...r,
|
|
415
415
|
children: e
|
|
416
416
|
}));
|
|
417
|
-
|
|
418
|
-
function
|
|
417
|
+
ie.displayName = "JimboInnerPanel";
|
|
418
|
+
function N({ tone: e = "orange", size: t = "md", fullWidth: n = !1, disabled: r = !1, onClick: i, style: a, className: o = "", children: s, ...c }) {
|
|
419
419
|
let l = t === "xs" ? "xs" : t === "sm" ? "sm" : t === "lg" ? "lg" : "md";
|
|
420
420
|
return /* @__PURE__ */ b("button", {
|
|
421
421
|
type: "button",
|
|
@@ -433,12 +433,12 @@ function M({ tone: e = "orange", size: t = "md", fullWidth: n = !1, disabled: r
|
|
|
433
433
|
})
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function ae({ onClick: e, size: t = "md" }) {
|
|
437
437
|
return /* @__PURE__ */ b("div", {
|
|
438
438
|
className: "j-back-btn-wrap j-flex j-justify-center j-w-full",
|
|
439
|
-
children: /* @__PURE__ */ b(
|
|
439
|
+
children: /* @__PURE__ */ b(N, {
|
|
440
440
|
tone: "orange",
|
|
441
|
-
size:
|
|
441
|
+
size: t,
|
|
442
442
|
fullWidth: !0,
|
|
443
443
|
onClick: e,
|
|
444
444
|
className: "j-back-btn",
|
|
@@ -446,35 +446,39 @@ function oe({ onClick: e }) {
|
|
|
446
446
|
})
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function oe({ children: e, open: t, onClose: n, title: r, className: i, showBack: a = !0 }) {
|
|
450
450
|
return t ? /* @__PURE__ */ b("div", {
|
|
451
451
|
className: "j-modal-overlay",
|
|
452
|
-
children: /* @__PURE__ */ x(
|
|
452
|
+
children: /* @__PURE__ */ x(M, {
|
|
453
453
|
onBack: a ? n : void 0,
|
|
454
454
|
className: `j-modal ${i ?? ""}`,
|
|
455
|
-
children: [r && /* @__PURE__ */ b(
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
455
|
+
children: [r && /* @__PURE__ */ b("div", {
|
|
456
|
+
className: "j-modal__title-wrap",
|
|
457
|
+
"aria-hidden": !1,
|
|
458
|
+
children: /* @__PURE__ */ b(j, {
|
|
459
|
+
as: "h2",
|
|
460
|
+
size: "lg",
|
|
461
|
+
className: "j-modal__title",
|
|
462
|
+
children: r
|
|
463
|
+
})
|
|
460
464
|
}), e]
|
|
461
465
|
})
|
|
462
466
|
}) : null;
|
|
463
467
|
}
|
|
464
468
|
//#endregion
|
|
465
469
|
//#region src/ui/jimboTabs.tsx
|
|
466
|
-
function
|
|
470
|
+
function se({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i }) {
|
|
467
471
|
return /* @__PURE__ */ b("div", {
|
|
468
472
|
className: `j-tabs ${r}`,
|
|
469
473
|
style: i,
|
|
470
|
-
children: e.map((e) => /* @__PURE__ */ b(
|
|
474
|
+
children: e.map((e) => /* @__PURE__ */ b(ce, {
|
|
471
475
|
label: e.label,
|
|
472
476
|
active: t === e.id,
|
|
473
477
|
onClick: () => n(e.id)
|
|
474
478
|
}, e.id))
|
|
475
479
|
});
|
|
476
480
|
}
|
|
477
|
-
function
|
|
481
|
+
function ce({ label: e, active: t, onClick: n }) {
|
|
478
482
|
return /* @__PURE__ */ x("div", {
|
|
479
483
|
className: "j-tab",
|
|
480
484
|
"data-active": t,
|
|
@@ -501,7 +505,7 @@ function le({ label: e, active: t, onClick: n }) {
|
|
|
501
505
|
})]
|
|
502
506
|
});
|
|
503
507
|
}
|
|
504
|
-
function
|
|
508
|
+
function le({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i }) {
|
|
505
509
|
return /* @__PURE__ */ b("div", {
|
|
506
510
|
className: `j-vtabs ${r}`,
|
|
507
511
|
style: i,
|
|
@@ -523,7 +527,7 @@ function ue({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i
|
|
|
523
527
|
}
|
|
524
528
|
//#endregion
|
|
525
529
|
//#region src/ui/JimboBadge.tsx
|
|
526
|
-
function
|
|
530
|
+
function ue({ size: e = "sm", tone: t = "dark", className: n, children: r, ...i }) {
|
|
527
531
|
return /* @__PURE__ */ b("span", {
|
|
528
532
|
className: `j-badge j-badge--${e} j-badge--${t} ${n ?? ""}`,
|
|
529
533
|
...i,
|
|
@@ -532,12 +536,12 @@ function de({ size: e = "sm", tone: t = "dark", className: n, children: r, ...i
|
|
|
532
536
|
}
|
|
533
537
|
//#endregion
|
|
534
538
|
//#region src/ui/jimboFlankNav.tsx
|
|
535
|
-
function
|
|
539
|
+
function de({ onPrev: e, onNext: t, canPrev: n = !0, canNext: r = !0, prevLabel: i = "Previous", nextLabel: a = "Next", children: o, className: s = "", style: c }) {
|
|
536
540
|
return /* @__PURE__ */ x("div", {
|
|
537
541
|
className: `j-flank ${s}`,
|
|
538
542
|
style: c,
|
|
539
543
|
children: [
|
|
540
|
-
/* @__PURE__ */ b(
|
|
544
|
+
/* @__PURE__ */ b(fe, {
|
|
541
545
|
direction: "left",
|
|
542
546
|
onClick: e,
|
|
543
547
|
disabled: !n,
|
|
@@ -547,7 +551,7 @@ function fe({ onPrev: e, onNext: t, canPrev: n = !0, canNext: r = !0, prevLabel:
|
|
|
547
551
|
className: "j-flank__content",
|
|
548
552
|
children: o
|
|
549
553
|
}),
|
|
550
|
-
/* @__PURE__ */ b(
|
|
554
|
+
/* @__PURE__ */ b(fe, {
|
|
551
555
|
direction: "right",
|
|
552
556
|
onClick: t,
|
|
553
557
|
disabled: !r,
|
|
@@ -556,7 +560,7 @@ function fe({ onPrev: e, onNext: t, canPrev: n = !0, canNext: r = !0, prevLabel:
|
|
|
556
560
|
]
|
|
557
561
|
});
|
|
558
562
|
}
|
|
559
|
-
function
|
|
563
|
+
function fe({ direction: e, onClick: t, disabled: n, "aria-label": r }) {
|
|
560
564
|
let [i, a] = s.useState(!1);
|
|
561
565
|
return /* @__PURE__ */ b("button", {
|
|
562
566
|
type: "button",
|
|
@@ -571,10 +575,10 @@ function pe({ direction: e, onClick: t, disabled: n, "aria-label": r }) {
|
|
|
571
575
|
onMouseLeave: () => a(!1),
|
|
572
576
|
onTouchStart: () => !n && a(!0),
|
|
573
577
|
onTouchEnd: () => a(!1),
|
|
574
|
-
children: /* @__PURE__ */ b(
|
|
578
|
+
children: /* @__PURE__ */ b(pe, { direction: e })
|
|
575
579
|
});
|
|
576
580
|
}
|
|
577
|
-
function
|
|
581
|
+
function pe({ direction: e }) {
|
|
578
582
|
return /* @__PURE__ */ b("svg", {
|
|
579
583
|
width: 28,
|
|
580
584
|
height: 28,
|
|
@@ -590,7 +594,7 @@ function me({ direction: e }) {
|
|
|
590
594
|
}
|
|
591
595
|
//#endregion
|
|
592
596
|
//#region src/ui/JimboFloating.tsx
|
|
593
|
-
function
|
|
597
|
+
function me({ anchor: e = "top-right", offset: t = 12, zIndex: n = 20, children: r }) {
|
|
594
598
|
let i = {
|
|
595
599
|
position: "absolute",
|
|
596
600
|
zIndex: n
|
|
@@ -602,26 +606,31 @@ function he({ anchor: e = "top-right", offset: t = 12, zIndex: n = 20, children:
|
|
|
602
606
|
}
|
|
603
607
|
//#endregion
|
|
604
608
|
//#region src/ui/JimboToggleList.tsx
|
|
605
|
-
function
|
|
606
|
-
return /* @__PURE__ */ b(
|
|
607
|
-
className:
|
|
609
|
+
function he({ items: e, onToggle: t, title: n, variant: r = "row" }) {
|
|
610
|
+
return /* @__PURE__ */ b(M, { children: /* @__PURE__ */ x("div", {
|
|
611
|
+
className: `j-toggle-list j-toggle-list--${r}`,
|
|
608
612
|
children: [n && /* @__PURE__ */ b("div", {
|
|
609
613
|
className: "j-toggle-list__title",
|
|
610
614
|
children: n
|
|
611
615
|
}), e.map((e) => /* @__PURE__ */ x("button", {
|
|
612
616
|
type: "button",
|
|
613
617
|
className: "j-toggle-item",
|
|
618
|
+
"data-variant": r,
|
|
619
|
+
"aria-pressed": e.on,
|
|
614
620
|
onClick: () => t(e.id),
|
|
615
|
-
children: [/* @__PURE__ */ b("
|
|
621
|
+
children: [/* @__PURE__ */ b("span", {
|
|
622
|
+
className: "j-toggle-item__label",
|
|
623
|
+
children: e.label
|
|
624
|
+
}), /* @__PURE__ */ b("span", {
|
|
616
625
|
className: "j-toggle-check",
|
|
617
626
|
"data-on": e.on
|
|
618
|
-
})
|
|
627
|
+
})]
|
|
619
628
|
}, e.id))]
|
|
620
629
|
}) });
|
|
621
630
|
}
|
|
622
631
|
//#endregion
|
|
623
632
|
//#region src/ui/jimboFilterBar.tsx
|
|
624
|
-
function
|
|
633
|
+
function ge({ search: e, onSearchChange: t, searchPlaceholder: n = "Search...", searchLabel: r = "Search", sort: i, onSortChange: a, sortLabel: o = "Sort By", sortOptions: s, className: c = "", style: l }) {
|
|
625
634
|
return /* @__PURE__ */ x("div", {
|
|
626
635
|
className: `j-filter-bar ${c}`,
|
|
627
636
|
style: l,
|
|
@@ -637,7 +646,7 @@ function _e({ search: e, onSearchChange: t, searchPlaceholder: n = "Search...",
|
|
|
637
646
|
className: "j-relative",
|
|
638
647
|
children: [/* @__PURE__ */ b("div", {
|
|
639
648
|
className: "j-filter-bar__search-icon",
|
|
640
|
-
children: /* @__PURE__ */ b(
|
|
649
|
+
children: /* @__PURE__ */ b(_e, {})
|
|
641
650
|
}), /* @__PURE__ */ b("input", {
|
|
642
651
|
type: "text",
|
|
643
652
|
value: e ?? "",
|
|
@@ -666,13 +675,13 @@ function _e({ search: e, onSearchChange: t, searchPlaceholder: n = "Search...",
|
|
|
666
675
|
}, e.value))
|
|
667
676
|
}), /* @__PURE__ */ b("div", {
|
|
668
677
|
className: "j-filter-bar__sort-icon",
|
|
669
|
-
children: /* @__PURE__ */ b(
|
|
678
|
+
children: /* @__PURE__ */ b(ve, {})
|
|
670
679
|
})]
|
|
671
680
|
})]
|
|
672
681
|
}) : null]
|
|
673
682
|
});
|
|
674
683
|
}
|
|
675
|
-
function
|
|
684
|
+
function _e() {
|
|
676
685
|
return /* @__PURE__ */ x("svg", {
|
|
677
686
|
width: 24,
|
|
678
687
|
height: 24,
|
|
@@ -695,7 +704,7 @@ function ve() {
|
|
|
695
704
|
})]
|
|
696
705
|
});
|
|
697
706
|
}
|
|
698
|
-
function
|
|
707
|
+
function ve() {
|
|
699
708
|
return /* @__PURE__ */ x("svg", {
|
|
700
709
|
width: 20,
|
|
701
710
|
height: 20,
|
|
@@ -716,7 +725,7 @@ function ye() {
|
|
|
716
725
|
}
|
|
717
726
|
//#endregion
|
|
718
727
|
//#region src/ui/footer.tsx
|
|
719
|
-
function
|
|
728
|
+
function ye({ hidden: e = !1, className: t = "", children: n }) {
|
|
720
729
|
return e ? null : /* @__PURE__ */ b("div", {
|
|
721
730
|
className: ["j-footer", t].filter(Boolean).join(" "),
|
|
722
731
|
children: /* @__PURE__ */ b("div", {
|
|
@@ -753,9 +762,9 @@ function be({ hidden: e = !1, className: t = "", children: n }) {
|
|
|
753
762
|
}
|
|
754
763
|
//#endregion
|
|
755
764
|
//#region src/ui/jimboBackground.tsx
|
|
756
|
-
function
|
|
765
|
+
function be() {
|
|
757
766
|
return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("canvas", {
|
|
758
|
-
ref:
|
|
767
|
+
ref: te(),
|
|
759
768
|
"aria-hidden": !0,
|
|
760
769
|
style: {
|
|
761
770
|
position: "fixed",
|
|
@@ -765,55 +774,61 @@ function xe() {
|
|
|
765
774
|
zIndex: -10,
|
|
766
775
|
pointerEvents: "none"
|
|
767
776
|
}
|
|
768
|
-
}), /* @__PURE__ */ b(
|
|
777
|
+
}), /* @__PURE__ */ b(ye, {})] });
|
|
769
778
|
}
|
|
770
779
|
//#endregion
|
|
771
780
|
//#region src/ui/jimboTooltip.tsx
|
|
772
|
-
function
|
|
781
|
+
function xe(e, t) {
|
|
773
782
|
typeof e == "function" ? e(t) : e && typeof e == "object" && (e.current = t);
|
|
774
783
|
}
|
|
775
|
-
function
|
|
776
|
-
let { visible:
|
|
777
|
-
mode:
|
|
778
|
-
placement:
|
|
779
|
-
delay:
|
|
780
|
-
disabled:
|
|
781
|
-
}),
|
|
782
|
-
|
|
783
|
-
}, [
|
|
784
|
-
return /* @__PURE__ */ x(y, { children: [s.cloneElement(
|
|
785
|
-
ref:
|
|
784
|
+
function Se({ content: e, badge: t, variant: n = "dark", children: r, mode: i = "snap", placement: a = "auto", delay: o = 80, maxWidth: c = 280, disabled: l = !1 }) {
|
|
785
|
+
let { visible: u, pos: d, targetRef: p, tooltipRef: m, show: h, hide: g, handleMouseMove: _ } = T({
|
|
786
|
+
mode: i,
|
|
787
|
+
placement: a,
|
|
788
|
+
delay: o,
|
|
789
|
+
disabled: l
|
|
790
|
+
}), v = s.Children.only(r), S = v.ref, C = f((e) => {
|
|
791
|
+
p.current = e, xe(S, e);
|
|
792
|
+
}, [S, p]);
|
|
793
|
+
return /* @__PURE__ */ x(y, { children: [s.cloneElement(v, {
|
|
794
|
+
ref: C,
|
|
786
795
|
onMouseEnter: (e) => {
|
|
787
|
-
|
|
796
|
+
h(), v.props.onMouseEnter?.(e);
|
|
788
797
|
},
|
|
789
798
|
onMouseLeave: (e) => {
|
|
790
|
-
|
|
799
|
+
g(), v.props.onMouseLeave?.(e);
|
|
791
800
|
},
|
|
792
801
|
onFocus: (e) => {
|
|
793
|
-
|
|
802
|
+
h(), v.props.onFocus?.(e);
|
|
794
803
|
},
|
|
795
804
|
onBlur: (e) => {
|
|
796
|
-
|
|
805
|
+
g(), v.props.onBlur?.(e);
|
|
797
806
|
},
|
|
798
807
|
onMouseMove: (e) => {
|
|
799
|
-
|
|
808
|
+
_(e), v.props.onMouseMove?.(e);
|
|
800
809
|
}
|
|
801
|
-
}),
|
|
802
|
-
ref:
|
|
810
|
+
}), u ? /* @__PURE__ */ x("div", {
|
|
811
|
+
ref: m,
|
|
803
812
|
role: "tooltip",
|
|
804
|
-
className:
|
|
813
|
+
className: `j-tooltip j-tooltip--${n}`,
|
|
805
814
|
style: {
|
|
806
|
-
left:
|
|
807
|
-
top:
|
|
808
|
-
maxWidth:
|
|
809
|
-
opacity: +!!
|
|
815
|
+
left: d?.left ?? -9999,
|
|
816
|
+
top: d?.top ?? -9999,
|
|
817
|
+
maxWidth: c,
|
|
818
|
+
opacity: +!!d
|
|
810
819
|
},
|
|
811
|
-
children:
|
|
820
|
+
children: [/* @__PURE__ */ b("div", {
|
|
821
|
+
className: "j-tooltip__body",
|
|
822
|
+
children: e
|
|
823
|
+
}), t && /* @__PURE__ */ b("div", {
|
|
824
|
+
className: `j-tooltip__badge j-bg--${t.tone}`,
|
|
825
|
+
children: t.label
|
|
826
|
+
})]
|
|
812
827
|
}) : null] });
|
|
813
828
|
}
|
|
814
829
|
//#endregion
|
|
815
830
|
//#region src/ui/codeBlock.tsx
|
|
816
|
-
function
|
|
831
|
+
function Ce({ code: e, language: t, filename: n, className: r = "" }) {
|
|
817
832
|
let [i, a] = v(!1), o = n?.toLowerCase().endsWith(".jaml") ? "JAML" : t?.toLowerCase() === "yaml" ? void 0 : t;
|
|
818
833
|
return /* @__PURE__ */ x("div", {
|
|
819
834
|
className: `j-code-block ${r}`,
|
|
@@ -871,21 +886,21 @@ function we({ code: e, language: t, filename: n, className: r = "" }) {
|
|
|
871
886
|
}
|
|
872
887
|
//#endregion
|
|
873
888
|
//#region src/ui/jimboApp.tsx
|
|
874
|
-
function
|
|
889
|
+
function we({ children: e, fluid: t, className: n = "", ...r }) {
|
|
875
890
|
return /* @__PURE__ */ b("div", {
|
|
876
891
|
className: `j-app${t ? " j-app--fluid" : ""} ${n}`.trim(),
|
|
877
892
|
...r,
|
|
878
893
|
children: e
|
|
879
894
|
});
|
|
880
895
|
}
|
|
881
|
-
function
|
|
896
|
+
function Te({ children: e, className: t = "", ...n }) {
|
|
882
897
|
return /* @__PURE__ */ b("div", {
|
|
883
898
|
className: `j-app__scroll ${t}`,
|
|
884
899
|
...n,
|
|
885
900
|
children: e
|
|
886
901
|
});
|
|
887
902
|
}
|
|
888
|
-
function
|
|
903
|
+
function Ee({ children: e, className: t = "", ...n }) {
|
|
889
904
|
return /* @__PURE__ */ b("div", {
|
|
890
905
|
className: `j-app__footer ${t}`,
|
|
891
906
|
...n,
|
|
@@ -894,7 +909,7 @@ function De({ children: e, className: t = "", ...n }) {
|
|
|
894
909
|
}
|
|
895
910
|
//#endregion
|
|
896
911
|
//#region src/ui/jimboSectionHeader.tsx
|
|
897
|
-
function
|
|
912
|
+
function De({ label: e, tone: t = "blue", className: n = "" }) {
|
|
898
913
|
return /* @__PURE__ */ x("div", {
|
|
899
914
|
className: `j-section-header ${n}`,
|
|
900
915
|
children: [/* @__PURE__ */ b("div", {
|
|
@@ -905,7 +920,7 @@ function Oe({ label: e, tone: t = "blue", className: n = "" }) {
|
|
|
905
920
|
}
|
|
906
921
|
//#endregion
|
|
907
922
|
//#region src/ui/jimboInfoCard.tsx
|
|
908
|
-
function
|
|
923
|
+
function Oe({ tone: e, children: t, className: n = "", ...r }) {
|
|
909
924
|
return /* @__PURE__ */ b("div", {
|
|
910
925
|
className: `j-info-card ${e ? `j-border--${e}` : ""} ${n}`,
|
|
911
926
|
style: e ? { borderColor: void 0 } : void 0,
|
|
@@ -913,25 +928,25 @@ function ke({ tone: e, children: t, className: n = "", ...r }) {
|
|
|
913
928
|
children: t
|
|
914
929
|
});
|
|
915
930
|
}
|
|
916
|
-
function
|
|
931
|
+
function ke({ children: e, className: t = "" }) {
|
|
917
932
|
return /* @__PURE__ */ b("div", {
|
|
918
933
|
className: `j-info-card__body ${t}`,
|
|
919
934
|
children: e
|
|
920
935
|
});
|
|
921
936
|
}
|
|
922
|
-
function
|
|
937
|
+
function Ae({ children: e, className: t = "" }) {
|
|
923
938
|
return /* @__PURE__ */ b("div", {
|
|
924
939
|
className: `j-info-card__title ${t}`,
|
|
925
940
|
children: e
|
|
926
941
|
});
|
|
927
942
|
}
|
|
928
|
-
function
|
|
943
|
+
function je({ children: e, className: t = "" }) {
|
|
929
944
|
return /* @__PURE__ */ b("div", {
|
|
930
945
|
className: `j-info-card__sub ${t}`,
|
|
931
946
|
children: e
|
|
932
947
|
});
|
|
933
948
|
}
|
|
934
|
-
function
|
|
949
|
+
function Me({ children: e, className: t = "" }) {
|
|
935
950
|
return /* @__PURE__ */ b("div", {
|
|
936
951
|
className: `j-info-card__aside ${t}`,
|
|
937
952
|
children: e
|
|
@@ -939,8 +954,8 @@ function Ne({ children: e, className: t = "" }) {
|
|
|
939
954
|
}
|
|
940
955
|
//#endregion
|
|
941
956
|
//#region src/ui/showcase.tsx
|
|
942
|
-
function
|
|
943
|
-
return /* @__PURE__ */ x(
|
|
957
|
+
function Ne({ title: e = "Balatro", subtitle: t = "Seed Curator", hotFilters: n = [], recentFinds: r = [], mcpInfo: i, onNewSearch: a, onBrowseFilters: o, onFilterClick: s }) {
|
|
958
|
+
return /* @__PURE__ */ x(we, { children: [
|
|
944
959
|
/* @__PURE__ */ x("div", {
|
|
945
960
|
style: {
|
|
946
961
|
padding: "12px 12px 8px",
|
|
@@ -952,13 +967,13 @@ function Pe({ title: e = "Balatro", subtitle: t = "Seed Curator", hotFilters: n
|
|
|
952
967
|
/* @__PURE__ */ x("div", {
|
|
953
968
|
className: "j-text-center",
|
|
954
969
|
children: [/* @__PURE__ */ b(j, {
|
|
955
|
-
size: "
|
|
970
|
+
size: "display",
|
|
956
971
|
tone: "gold",
|
|
957
972
|
children: e
|
|
958
973
|
}), /* @__PURE__ */ b(j, {
|
|
959
974
|
size: "micro",
|
|
960
975
|
tone: "grey",
|
|
961
|
-
style: { letterSpacing:
|
|
976
|
+
style: { letterSpacing: 1 },
|
|
962
977
|
children: t
|
|
963
978
|
})]
|
|
964
979
|
}),
|
|
@@ -976,17 +991,17 @@ function Pe({ title: e = "Balatro", subtitle: t = "Seed Curator", hotFilters: n
|
|
|
976
991
|
children: i.engine
|
|
977
992
|
}), /* @__PURE__ */ b(j, {
|
|
978
993
|
size: "micro",
|
|
979
|
-
tone: "
|
|
994
|
+
tone: "white",
|
|
980
995
|
children: i.features
|
|
981
996
|
})]
|
|
982
997
|
}),
|
|
983
|
-
n.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(
|
|
998
|
+
n.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(De, {
|
|
984
999
|
label: "Filters",
|
|
985
1000
|
tone: "blue"
|
|
986
1001
|
}), /* @__PURE__ */ b("div", {
|
|
987
1002
|
className: "j-flex-col",
|
|
988
1003
|
style: { gap: 4 },
|
|
989
|
-
children: n.slice(0, 4).map((e, t) => /* @__PURE__ */ x(
|
|
1004
|
+
children: n.slice(0, 4).map((e, t) => /* @__PURE__ */ x(Oe, {
|
|
990
1005
|
tone: e.tone,
|
|
991
1006
|
onClick: () => s?.(e, t),
|
|
992
1007
|
style: { cursor: s ? "pointer" : void 0 },
|
|
@@ -1001,14 +1016,14 @@ function Pe({ title: e = "Balatro", subtitle: t = "Seed Curator", hotFilters: n
|
|
|
1001
1016
|
alignItems: "center",
|
|
1002
1017
|
justifyContent: "center"
|
|
1003
1018
|
},
|
|
1004
|
-
children: /* @__PURE__ */ b(
|
|
1019
|
+
children: /* @__PURE__ */ b(O, {
|
|
1005
1020
|
name: e,
|
|
1006
1021
|
width: 20
|
|
1007
1022
|
})
|
|
1008
1023
|
}, t))
|
|
1009
1024
|
}),
|
|
1010
|
-
/* @__PURE__ */ x(
|
|
1011
|
-
/* @__PURE__ */ b(
|
|
1025
|
+
/* @__PURE__ */ x(ke, { children: [/* @__PURE__ */ b(Ae, { children: e.name }), /* @__PURE__ */ x(je, { children: ["by ", e.author] })] }),
|
|
1026
|
+
/* @__PURE__ */ b(Me, { children: /* @__PURE__ */ b(j, {
|
|
1012
1027
|
size: "xs",
|
|
1013
1028
|
tone: e.tone === "gold" ? "gold" : e.tone,
|
|
1014
1029
|
children: e.hits
|
|
@@ -1016,7 +1031,7 @@ function Pe({ title: e = "Balatro", subtitle: t = "Seed Curator", hotFilters: n
|
|
|
1016
1031
|
]
|
|
1017
1032
|
}, t))
|
|
1018
1033
|
})] }),
|
|
1019
|
-
r.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(
|
|
1034
|
+
r.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(De, {
|
|
1020
1035
|
label: "Recent",
|
|
1021
1036
|
tone: "green"
|
|
1022
1037
|
}), /* @__PURE__ */ b("div", {
|
|
@@ -1044,25 +1059,25 @@ function Pe({ title: e = "Balatro", subtitle: t = "Seed Curator", hotFilters: n
|
|
|
1044
1059
|
})] })
|
|
1045
1060
|
]
|
|
1046
1061
|
}),
|
|
1047
|
-
/* @__PURE__ */ x(
|
|
1048
|
-
tone: "
|
|
1062
|
+
/* @__PURE__ */ x(Ee, { children: [/* @__PURE__ */ b(N, {
|
|
1063
|
+
tone: "red",
|
|
1049
1064
|
fullWidth: !0,
|
|
1050
1065
|
size: "lg",
|
|
1051
1066
|
onClick: a,
|
|
1052
1067
|
children: "New Search"
|
|
1053
|
-
}), /* @__PURE__ */ b(
|
|
1068
|
+
}), /* @__PURE__ */ b(N, {
|
|
1054
1069
|
tone: "blue",
|
|
1055
1070
|
fullWidth: !0,
|
|
1056
1071
|
size: "lg",
|
|
1057
1072
|
onClick: o,
|
|
1058
1073
|
children: "Browse Filters"
|
|
1059
1074
|
})] }),
|
|
1060
|
-
/* @__PURE__ */ b(
|
|
1075
|
+
/* @__PURE__ */ b(ye, {})
|
|
1061
1076
|
] });
|
|
1062
1077
|
}
|
|
1063
1078
|
//#endregion
|
|
1064
1079
|
//#region src/ui/jimboCopyRow.tsx
|
|
1065
|
-
function
|
|
1080
|
+
function Pe({ value: e, label: t }) {
|
|
1066
1081
|
let [n, r] = v(!1);
|
|
1067
1082
|
function i() {
|
|
1068
1083
|
navigator.clipboard.writeText(e).then(() => {
|
|
@@ -1096,7 +1111,7 @@ function Fe({ value: e, label: t }) {
|
|
|
1096
1111
|
}
|
|
1097
1112
|
//#endregion
|
|
1098
1113
|
//#region src/ui/jimboWordmark.tsx
|
|
1099
|
-
function
|
|
1114
|
+
function Fe({ title: e, subtitle: t, className: n = "" }) {
|
|
1100
1115
|
return /* @__PURE__ */ x("div", {
|
|
1101
1116
|
className: `j-wordmark ${n}`,
|
|
1102
1117
|
children: [/* @__PURE__ */ b("div", {
|
|
@@ -1110,7 +1125,7 @@ function Ie({ title: e, subtitle: t, className: n = "" }) {
|
|
|
1110
1125
|
}
|
|
1111
1126
|
//#endregion
|
|
1112
1127
|
//#region src/ui/jimboStatGrid.tsx
|
|
1113
|
-
function
|
|
1128
|
+
function Ie({ items: e, className: t = "", ...n }) {
|
|
1114
1129
|
return /* @__PURE__ */ b("div", {
|
|
1115
1130
|
className: `j-stat-grid ${t}`,
|
|
1116
1131
|
...n,
|
|
@@ -1125,7 +1140,7 @@ function Le({ items: e, className: t = "", ...n }) {
|
|
|
1125
1140
|
}
|
|
1126
1141
|
//#endregion
|
|
1127
1142
|
//#region src/ui/jimboInset.tsx
|
|
1128
|
-
function
|
|
1143
|
+
function Le({ children: e, className: t = "", ...n }) {
|
|
1129
1144
|
return /* @__PURE__ */ b("div", {
|
|
1130
1145
|
className: `j-inset ${t}`,
|
|
1131
1146
|
...n,
|
|
@@ -1134,68 +1149,68 @@ function Re({ children: e, className: t = "", ...n }) {
|
|
|
1134
1149
|
}
|
|
1135
1150
|
//#endregion
|
|
1136
1151
|
//#region node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.mjs
|
|
1137
|
-
function
|
|
1152
|
+
function Re(e) {
|
|
1138
1153
|
return e == null;
|
|
1139
1154
|
}
|
|
1140
|
-
function
|
|
1155
|
+
function ze(e) {
|
|
1141
1156
|
return typeof e == "object" && !!e;
|
|
1142
1157
|
}
|
|
1143
|
-
function
|
|
1144
|
-
return Array.isArray(e) ? e :
|
|
1158
|
+
function Be(e) {
|
|
1159
|
+
return Array.isArray(e) ? e : Re(e) ? [] : [e];
|
|
1145
1160
|
}
|
|
1146
|
-
function
|
|
1161
|
+
function Ve(e, t) {
|
|
1147
1162
|
var n, r, i, a;
|
|
1148
1163
|
if (t) for (a = Object.keys(t), n = 0, r = a.length; n < r; n += 1) i = a[n], e[i] = t[i];
|
|
1149
1164
|
return e;
|
|
1150
1165
|
}
|
|
1151
|
-
function
|
|
1166
|
+
function He(e, t) {
|
|
1152
1167
|
var n = "", r;
|
|
1153
1168
|
for (r = 0; r < t; r += 1) n += e;
|
|
1154
1169
|
return n;
|
|
1155
1170
|
}
|
|
1156
|
-
function
|
|
1171
|
+
function Ue(e) {
|
|
1157
1172
|
return e === 0 && 1 / e == -Infinity;
|
|
1158
1173
|
}
|
|
1159
|
-
var
|
|
1160
|
-
isNothing:
|
|
1161
|
-
isObject:
|
|
1162
|
-
toArray:
|
|
1163
|
-
repeat:
|
|
1164
|
-
isNegativeZero:
|
|
1165
|
-
extend:
|
|
1174
|
+
var P = {
|
|
1175
|
+
isNothing: Re,
|
|
1176
|
+
isObject: ze,
|
|
1177
|
+
toArray: Be,
|
|
1178
|
+
repeat: He,
|
|
1179
|
+
isNegativeZero: Ue,
|
|
1180
|
+
extend: Ve
|
|
1166
1181
|
};
|
|
1167
|
-
function
|
|
1182
|
+
function We(e, t) {
|
|
1168
1183
|
var n = "", r = e.reason || "(unknown reason)";
|
|
1169
1184
|
return e.mark ? (e.mark.name && (n += "in \"" + e.mark.name + "\" "), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += "\n\n" + e.mark.snippet), r + " " + n) : r;
|
|
1170
1185
|
}
|
|
1171
|
-
function
|
|
1172
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1186
|
+
function F(e, t) {
|
|
1187
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = We(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (/* @__PURE__ */ Error()).stack || "";
|
|
1173
1188
|
}
|
|
1174
|
-
|
|
1175
|
-
return this.name + ": " +
|
|
1189
|
+
F.prototype = Object.create(Error.prototype), F.prototype.constructor = F, F.prototype.toString = function(e) {
|
|
1190
|
+
return this.name + ": " + We(this, e);
|
|
1176
1191
|
};
|
|
1177
|
-
var
|
|
1178
|
-
function
|
|
1192
|
+
var I = F;
|
|
1193
|
+
function Ge(e, t, n, r, i) {
|
|
1179
1194
|
var a = "", o = "", s = Math.floor(i / 2) - 1;
|
|
1180
1195
|
return r - t > s && (a = " ... ", t = r - s + a.length), n - r > s && (o = " ...", n = r + s - o.length), {
|
|
1181
1196
|
str: a + e.slice(t, n).replace(/\t/g, "→") + o,
|
|
1182
1197
|
pos: r - t + a.length
|
|
1183
1198
|
};
|
|
1184
1199
|
}
|
|
1185
|
-
function
|
|
1186
|
-
return
|
|
1200
|
+
function Ke(e, t) {
|
|
1201
|
+
return P.repeat(" ", t - e.length) + e;
|
|
1187
1202
|
}
|
|
1188
|
-
function
|
|
1203
|
+
function qe(e, t) {
|
|
1189
1204
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1190
1205
|
t.maxLength ||= 79, typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
1191
1206
|
for (var n = /\r?\n|\r|\0/g, r = [0], i = [], a, o = -1; a = n.exec(e.buffer);) i.push(a.index), r.push(a.index + a[0].length), e.position <= a.index && o < 0 && (o = r.length - 2);
|
|
1192
1207
|
o < 0 && (o = r.length - 1);
|
|
1193
1208
|
var s = "", c, l, u = Math.min(e.line + t.linesAfter, i.length).toString().length, d = t.maxLength - (t.indent + u + 3);
|
|
1194
|
-
for (c = 1; c <= t.linesBefore && !(o - c < 0); c++) l =
|
|
1195
|
-
for (l =
|
|
1209
|
+
for (c = 1; c <= t.linesBefore && !(o - c < 0); c++) l = Ge(e.buffer, r[o - c], i[o - c], e.position - (r[o] - r[o - c]), d), s = P.repeat(" ", t.indent) + Ke((e.line - c + 1).toString(), u) + " | " + l.str + "\n" + s;
|
|
1210
|
+
for (l = Ge(e.buffer, r[o], i[o], e.position, d), s += P.repeat(" ", t.indent) + Ke((e.line + 1).toString(), u) + " | " + l.str + "\n", s += P.repeat("-", t.indent + u + 3 + l.pos) + "^\n", c = 1; c <= t.linesAfter && !(o + c >= i.length); c++) l = Ge(e.buffer, r[o + c], i[o + c], e.position - (r[o] - r[o + c]), d), s += P.repeat(" ", t.indent) + Ke((e.line + c + 1).toString(), u) + " | " + l.str + "\n";
|
|
1196
1211
|
return s.replace(/\n$/, "");
|
|
1197
1212
|
}
|
|
1198
|
-
var
|
|
1213
|
+
var Je = qe, Ye = [
|
|
1199
1214
|
"kind",
|
|
1200
1215
|
"multi",
|
|
1201
1216
|
"resolve",
|
|
@@ -1206,12 +1221,12 @@ var Ye = Je, Xe = [
|
|
|
1206
1221
|
"representName",
|
|
1207
1222
|
"defaultStyle",
|
|
1208
1223
|
"styleAliases"
|
|
1209
|
-
],
|
|
1224
|
+
], Xe = [
|
|
1210
1225
|
"scalar",
|
|
1211
1226
|
"sequence",
|
|
1212
1227
|
"mapping"
|
|
1213
1228
|
];
|
|
1214
|
-
function
|
|
1229
|
+
function Ze(e) {
|
|
1215
1230
|
var t = {};
|
|
1216
1231
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1217
1232
|
e[n].forEach(function(e) {
|
|
@@ -1219,17 +1234,17 @@ function Qe(e) {
|
|
|
1219
1234
|
});
|
|
1220
1235
|
}), t;
|
|
1221
1236
|
}
|
|
1222
|
-
function
|
|
1237
|
+
function Qe(e, t) {
|
|
1223
1238
|
if (t ||= {}, Object.keys(t).forEach(function(t) {
|
|
1224
|
-
if (
|
|
1239
|
+
if (Ye.indexOf(t) === -1) throw new I("Unknown option \"" + t + "\" is met in definition of \"" + e + "\" YAML type.");
|
|
1225
1240
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1226
1241
|
return !0;
|
|
1227
1242
|
}, this.construct = t.construct || function(e) {
|
|
1228
1243
|
return e;
|
|
1229
|
-
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases =
|
|
1244
|
+
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = Ze(t.styleAliases || null), Xe.indexOf(this.kind) === -1) throw new I("Unknown kind \"" + this.kind + "\" is specified for \"" + e + "\" YAML type.");
|
|
1230
1245
|
}
|
|
1231
|
-
var
|
|
1232
|
-
function
|
|
1246
|
+
var L = Qe;
|
|
1247
|
+
function $e(e, t) {
|
|
1233
1248
|
var n = [];
|
|
1234
1249
|
return e[t].forEach(function(e) {
|
|
1235
1250
|
var t = n.length;
|
|
@@ -1238,7 +1253,7 @@ function et(e, t) {
|
|
|
1238
1253
|
}), n[t] = e;
|
|
1239
1254
|
}), n;
|
|
1240
1255
|
}
|
|
1241
|
-
function
|
|
1256
|
+
function et() {
|
|
1242
1257
|
var e = {
|
|
1243
1258
|
scalar: {},
|
|
1244
1259
|
sequence: {},
|
|
@@ -1257,61 +1272,61 @@ function tt() {
|
|
|
1257
1272
|
for (t = 0, n = arguments.length; t < n; t += 1) arguments[t].forEach(r);
|
|
1258
1273
|
return e;
|
|
1259
1274
|
}
|
|
1260
|
-
function
|
|
1275
|
+
function tt(e) {
|
|
1261
1276
|
return this.extend(e);
|
|
1262
1277
|
}
|
|
1263
|
-
|
|
1278
|
+
tt.prototype.extend = function(e) {
|
|
1264
1279
|
var t = [], n = [];
|
|
1265
|
-
if (e instanceof
|
|
1280
|
+
if (e instanceof L) n.push(e);
|
|
1266
1281
|
else if (Array.isArray(e)) n = n.concat(e);
|
|
1267
1282
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit))) e.implicit && (t = t.concat(e.implicit)), e.explicit && (n = n.concat(e.explicit));
|
|
1268
|
-
else throw new
|
|
1283
|
+
else throw new I("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1269
1284
|
t.forEach(function(e) {
|
|
1270
|
-
if (!(e instanceof
|
|
1271
|
-
if (e.loadKind && e.loadKind !== "scalar") throw new
|
|
1272
|
-
if (e.multi) throw new
|
|
1285
|
+
if (!(e instanceof L)) throw new I("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1286
|
+
if (e.loadKind && e.loadKind !== "scalar") throw new I("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1287
|
+
if (e.multi) throw new I("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1273
1288
|
}), n.forEach(function(e) {
|
|
1274
|
-
if (!(e instanceof
|
|
1289
|
+
if (!(e instanceof L)) throw new I("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1275
1290
|
});
|
|
1276
|
-
var r = Object.create(
|
|
1277
|
-
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit =
|
|
1291
|
+
var r = Object.create(tt.prototype);
|
|
1292
|
+
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = $e(r, "implicit"), r.compiledExplicit = $e(r, "explicit"), r.compiledTypeMap = et(r.compiledImplicit, r.compiledExplicit), r;
|
|
1278
1293
|
};
|
|
1279
|
-
var
|
|
1294
|
+
var nt = tt, rt = new L("tag:yaml.org,2002:str", {
|
|
1280
1295
|
kind: "scalar",
|
|
1281
1296
|
construct: function(e) {
|
|
1282
1297
|
return e === null ? "" : e;
|
|
1283
1298
|
}
|
|
1284
|
-
}),
|
|
1299
|
+
}), it = new L("tag:yaml.org,2002:seq", {
|
|
1285
1300
|
kind: "sequence",
|
|
1286
1301
|
construct: function(e) {
|
|
1287
1302
|
return e === null ? [] : e;
|
|
1288
1303
|
}
|
|
1289
|
-
}),
|
|
1304
|
+
}), at = new L("tag:yaml.org,2002:map", {
|
|
1290
1305
|
kind: "mapping",
|
|
1291
1306
|
construct: function(e) {
|
|
1292
1307
|
return e === null ? {} : e;
|
|
1293
1308
|
}
|
|
1294
|
-
}),
|
|
1309
|
+
}), ot = new nt({ explicit: [
|
|
1310
|
+
rt,
|
|
1295
1311
|
it,
|
|
1296
|
-
at
|
|
1297
|
-
ot
|
|
1312
|
+
at
|
|
1298
1313
|
] });
|
|
1299
|
-
function
|
|
1314
|
+
function st(e) {
|
|
1300
1315
|
if (e === null) return !0;
|
|
1301
1316
|
var t = e.length;
|
|
1302
1317
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1303
1318
|
}
|
|
1304
|
-
function
|
|
1319
|
+
function ct() {
|
|
1305
1320
|
return null;
|
|
1306
1321
|
}
|
|
1307
|
-
function
|
|
1322
|
+
function lt(e) {
|
|
1308
1323
|
return e === null;
|
|
1309
1324
|
}
|
|
1310
|
-
var
|
|
1325
|
+
var ut = new L("tag:yaml.org,2002:null", {
|
|
1311
1326
|
kind: "scalar",
|
|
1312
|
-
resolve:
|
|
1313
|
-
construct:
|
|
1314
|
-
predicate:
|
|
1327
|
+
resolve: st,
|
|
1328
|
+
construct: ct,
|
|
1329
|
+
predicate: lt,
|
|
1315
1330
|
represent: {
|
|
1316
1331
|
canonical: function() {
|
|
1317
1332
|
return "~";
|
|
@@ -1331,22 +1346,22 @@ var dt = new I("tag:yaml.org,2002:null", {
|
|
|
1331
1346
|
},
|
|
1332
1347
|
defaultStyle: "lowercase"
|
|
1333
1348
|
});
|
|
1334
|
-
function
|
|
1349
|
+
function dt(e) {
|
|
1335
1350
|
if (e === null) return !1;
|
|
1336
1351
|
var t = e.length;
|
|
1337
1352
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1338
1353
|
}
|
|
1339
|
-
function
|
|
1354
|
+
function ft(e) {
|
|
1340
1355
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1341
1356
|
}
|
|
1342
|
-
function
|
|
1357
|
+
function pt(e) {
|
|
1343
1358
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1344
1359
|
}
|
|
1345
|
-
var
|
|
1360
|
+
var mt = new L("tag:yaml.org,2002:bool", {
|
|
1346
1361
|
kind: "scalar",
|
|
1347
|
-
resolve:
|
|
1348
|
-
construct:
|
|
1349
|
-
predicate:
|
|
1362
|
+
resolve: dt,
|
|
1363
|
+
construct: ft,
|
|
1364
|
+
predicate: pt,
|
|
1350
1365
|
represent: {
|
|
1351
1366
|
lowercase: function(e) {
|
|
1352
1367
|
return e ? "true" : "false";
|
|
@@ -1360,16 +1375,16 @@ var ht = new I("tag:yaml.org,2002:bool", {
|
|
|
1360
1375
|
},
|
|
1361
1376
|
defaultStyle: "lowercase"
|
|
1362
1377
|
});
|
|
1363
|
-
function
|
|
1378
|
+
function ht(e) {
|
|
1364
1379
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1365
1380
|
}
|
|
1366
|
-
function
|
|
1381
|
+
function gt(e) {
|
|
1367
1382
|
return 48 <= e && e <= 55;
|
|
1368
1383
|
}
|
|
1369
|
-
function
|
|
1384
|
+
function _t(e) {
|
|
1370
1385
|
return 48 <= e && e <= 57;
|
|
1371
1386
|
}
|
|
1372
|
-
function
|
|
1387
|
+
function vt(e) {
|
|
1373
1388
|
if (e === null) return !1;
|
|
1374
1389
|
var t = e.length, n = 0, r = !1, i;
|
|
1375
1390
|
if (!t) return !1;
|
|
@@ -1384,14 +1399,14 @@ function yt(e) {
|
|
|
1384
1399
|
}
|
|
1385
1400
|
if (i === "x") {
|
|
1386
1401
|
for (n++; n < t; n++) if (i = e[n], i !== "_") {
|
|
1387
|
-
if (!
|
|
1402
|
+
if (!ht(e.charCodeAt(n))) return !1;
|
|
1388
1403
|
r = !0;
|
|
1389
1404
|
}
|
|
1390
1405
|
return r && i !== "_";
|
|
1391
1406
|
}
|
|
1392
1407
|
if (i === "o") {
|
|
1393
1408
|
for (n++; n < t; n++) if (i = e[n], i !== "_") {
|
|
1394
|
-
if (!
|
|
1409
|
+
if (!gt(e.charCodeAt(n))) return !1;
|
|
1395
1410
|
r = !0;
|
|
1396
1411
|
}
|
|
1397
1412
|
return r && i !== "_";
|
|
@@ -1399,12 +1414,12 @@ function yt(e) {
|
|
|
1399
1414
|
}
|
|
1400
1415
|
if (i === "_") return !1;
|
|
1401
1416
|
for (; n < t; n++) if (i = e[n], i !== "_") {
|
|
1402
|
-
if (!
|
|
1417
|
+
if (!_t(e.charCodeAt(n))) return !1;
|
|
1403
1418
|
r = !0;
|
|
1404
1419
|
}
|
|
1405
1420
|
return !(!r || i === "_");
|
|
1406
1421
|
}
|
|
1407
|
-
function
|
|
1422
|
+
function yt(e) {
|
|
1408
1423
|
var t = e, n = 1, r;
|
|
1409
1424
|
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), r = t[0], (r === "-" || r === "+") && (r === "-" && (n = -1), t = t.slice(1), r = t[0]), t === "0") return 0;
|
|
1410
1425
|
if (r === "0") {
|
|
@@ -1414,14 +1429,14 @@ function bt(e) {
|
|
|
1414
1429
|
}
|
|
1415
1430
|
return n * parseInt(t, 10);
|
|
1416
1431
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 == 0 && !
|
|
1432
|
+
function bt(e) {
|
|
1433
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 == 0 && !P.isNegativeZero(e);
|
|
1419
1434
|
}
|
|
1420
|
-
var
|
|
1435
|
+
var xt = new L("tag:yaml.org,2002:int", {
|
|
1421
1436
|
kind: "scalar",
|
|
1422
|
-
resolve:
|
|
1423
|
-
construct:
|
|
1424
|
-
predicate:
|
|
1437
|
+
resolve: vt,
|
|
1438
|
+
construct: yt,
|
|
1439
|
+
predicate: bt,
|
|
1425
1440
|
represent: {
|
|
1426
1441
|
binary: function(e) {
|
|
1427
1442
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1443,16 +1458,16 @@ var St = new I("tag:yaml.org,2002:int", {
|
|
|
1443
1458
|
decimal: [10, "dec"],
|
|
1444
1459
|
hexadecimal: [16, "hex"]
|
|
1445
1460
|
}
|
|
1446
|
-
}),
|
|
1447
|
-
function
|
|
1448
|
-
return !(e === null || !
|
|
1461
|
+
}), St = /* @__PURE__ */ RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
1462
|
+
function Ct(e) {
|
|
1463
|
+
return !(e === null || !St.test(e) || e[e.length - 1] === "_");
|
|
1449
1464
|
}
|
|
1450
|
-
function
|
|
1465
|
+
function wt(e) {
|
|
1451
1466
|
var t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1;
|
|
1452
1467
|
return "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Infinity : -Infinity : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
1453
1468
|
}
|
|
1454
|
-
var
|
|
1455
|
-
function
|
|
1469
|
+
var Tt = /^[-+]?[0-9]+e/;
|
|
1470
|
+
function Et(e, t) {
|
|
1456
1471
|
var n;
|
|
1457
1472
|
if (isNaN(e)) switch (t) {
|
|
1458
1473
|
case "lowercase": return ".nan";
|
|
@@ -1469,31 +1484,31 @@ function Dt(e, t) {
|
|
|
1469
1484
|
case "uppercase": return "-.INF";
|
|
1470
1485
|
case "camelcase": return "-.Inf";
|
|
1471
1486
|
}
|
|
1472
|
-
else if (
|
|
1473
|
-
return n = e.toString(10),
|
|
1487
|
+
else if (P.isNegativeZero(e)) return "-0.0";
|
|
1488
|
+
return n = e.toString(10), Tt.test(n) ? n.replace("e", ".e") : n;
|
|
1474
1489
|
}
|
|
1475
|
-
function
|
|
1476
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 != 0 ||
|
|
1490
|
+
function Dt(e) {
|
|
1491
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 != 0 || P.isNegativeZero(e));
|
|
1477
1492
|
}
|
|
1478
|
-
var
|
|
1493
|
+
var Ot = new L("tag:yaml.org,2002:float", {
|
|
1479
1494
|
kind: "scalar",
|
|
1480
|
-
resolve:
|
|
1481
|
-
construct:
|
|
1482
|
-
predicate:
|
|
1483
|
-
represent:
|
|
1495
|
+
resolve: Ct,
|
|
1496
|
+
construct: wt,
|
|
1497
|
+
predicate: Dt,
|
|
1498
|
+
represent: Et,
|
|
1484
1499
|
defaultStyle: "lowercase"
|
|
1485
|
-
}),
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
] }),
|
|
1491
|
-
function
|
|
1492
|
-
return e === null ? !1 :
|
|
1500
|
+
}), kt = ot.extend({ implicit: [
|
|
1501
|
+
ut,
|
|
1502
|
+
mt,
|
|
1503
|
+
xt,
|
|
1504
|
+
Ot
|
|
1505
|
+
] }), At = kt, jt = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), Mt = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
|
|
1506
|
+
function Nt(e) {
|
|
1507
|
+
return e === null ? !1 : jt.exec(e) !== null || Mt.exec(e) !== null;
|
|
1493
1508
|
}
|
|
1494
|
-
function
|
|
1509
|
+
function Pt(e) {
|
|
1495
1510
|
var t, n, r, i, a, o, s, c = 0, l = null, u, d, f;
|
|
1496
|
-
if (t =
|
|
1511
|
+
if (t = jt.exec(e), t === null && (t = Mt.exec(e)), t === null) throw Error("Date resolve error");
|
|
1497
1512
|
if (n = +t[1], r = t[2] - 1, i = +t[3], !t[4]) return new Date(Date.UTC(n, r, i));
|
|
1498
1513
|
if (a = +t[4], o = +t[5], s = +t[6], t[7]) {
|
|
1499
1514
|
for (c = t[7].slice(0, 3); c.length < 3;) c += "0";
|
|
@@ -1501,58 +1516,58 @@ function Ft(e) {
|
|
|
1501
1516
|
}
|
|
1502
1517
|
return t[9] && (u = +t[10], d = +(t[11] || 0), l = (u * 60 + d) * 6e4, t[9] === "-" && (l = -l)), f = new Date(Date.UTC(n, r, i, a, o, s, c)), l && f.setTime(f.getTime() - l), f;
|
|
1503
1518
|
}
|
|
1504
|
-
function
|
|
1519
|
+
function Ft(e) {
|
|
1505
1520
|
return e.toISOString();
|
|
1506
1521
|
}
|
|
1507
|
-
var
|
|
1522
|
+
var It = new L("tag:yaml.org,2002:timestamp", {
|
|
1508
1523
|
kind: "scalar",
|
|
1509
|
-
resolve:
|
|
1510
|
-
construct:
|
|
1524
|
+
resolve: Nt,
|
|
1525
|
+
construct: Pt,
|
|
1511
1526
|
instanceOf: Date,
|
|
1512
|
-
represent:
|
|
1527
|
+
represent: Ft
|
|
1513
1528
|
});
|
|
1514
|
-
function
|
|
1529
|
+
function Lt(e) {
|
|
1515
1530
|
return e === "<<" || e === null;
|
|
1516
1531
|
}
|
|
1517
|
-
var
|
|
1532
|
+
var Rt = new L("tag:yaml.org,2002:merge", {
|
|
1518
1533
|
kind: "scalar",
|
|
1519
|
-
resolve:
|
|
1520
|
-
}),
|
|
1521
|
-
function
|
|
1534
|
+
resolve: Lt
|
|
1535
|
+
}), zt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
1536
|
+
function Bt(e) {
|
|
1522
1537
|
if (e === null) return !1;
|
|
1523
|
-
var t, n, r = 0, i = e.length, a =
|
|
1538
|
+
var t, n, r = 0, i = e.length, a = zt;
|
|
1524
1539
|
for (n = 0; n < i; n++) if (t = a.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1525
1540
|
if (t < 0) return !1;
|
|
1526
1541
|
r += 6;
|
|
1527
1542
|
}
|
|
1528
1543
|
return r % 8 == 0;
|
|
1529
1544
|
}
|
|
1530
|
-
function
|
|
1531
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a =
|
|
1545
|
+
function Vt(e) {
|
|
1546
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a = zt, o = 0, s = [];
|
|
1532
1547
|
for (t = 0; t < i; t++) t % 4 == 0 && t && (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)), o = o << 6 | a.indexOf(r.charAt(t));
|
|
1533
1548
|
return n = i % 4 * 6, n === 0 ? (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)) : n === 18 ? (s.push(o >> 10 & 255), s.push(o >> 2 & 255)) : n === 12 && s.push(o >> 4 & 255), new Uint8Array(s);
|
|
1534
1549
|
}
|
|
1535
|
-
function
|
|
1536
|
-
var t = "", n = 0, r, i, a = e.length, o =
|
|
1550
|
+
function Ht(e) {
|
|
1551
|
+
var t = "", n = 0, r, i, a = e.length, o = zt;
|
|
1537
1552
|
for (r = 0; r < a; r++) r % 3 == 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1538
1553
|
return i = a % 3, i === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : i === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : i === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
1539
1554
|
}
|
|
1540
|
-
function
|
|
1555
|
+
function Ut(e) {
|
|
1541
1556
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1542
1557
|
}
|
|
1543
|
-
var
|
|
1558
|
+
var Wt = new L("tag:yaml.org,2002:binary", {
|
|
1544
1559
|
kind: "scalar",
|
|
1545
|
-
resolve:
|
|
1546
|
-
construct:
|
|
1547
|
-
predicate:
|
|
1548
|
-
represent:
|
|
1549
|
-
}),
|
|
1550
|
-
function
|
|
1560
|
+
resolve: Bt,
|
|
1561
|
+
construct: Vt,
|
|
1562
|
+
predicate: Ut,
|
|
1563
|
+
represent: Ht
|
|
1564
|
+
}), Gt = Object.prototype.hasOwnProperty, Kt = Object.prototype.toString;
|
|
1565
|
+
function qt(e) {
|
|
1551
1566
|
if (e === null) return !0;
|
|
1552
1567
|
var t = [], n, r, i, a, o, s = e;
|
|
1553
1568
|
for (n = 0, r = s.length; n < r; n += 1) {
|
|
1554
|
-
if (i = s[n], o = !1,
|
|
1555
|
-
for (a in i) if (
|
|
1569
|
+
if (i = s[n], o = !1, Kt.call(i) !== "[object Object]") return !1;
|
|
1570
|
+
for (a in i) if (Gt.call(i, a)) if (!o) o = !0;
|
|
1556
1571
|
else return !1;
|
|
1557
1572
|
if (!o) return !1;
|
|
1558
1573
|
if (t.indexOf(a) === -1) t.push(a);
|
|
@@ -1560,88 +1575,88 @@ function Jt(e) {
|
|
|
1560
1575
|
}
|
|
1561
1576
|
return !0;
|
|
1562
1577
|
}
|
|
1563
|
-
function
|
|
1578
|
+
function Jt(e) {
|
|
1564
1579
|
return e === null ? [] : e;
|
|
1565
1580
|
}
|
|
1566
|
-
var
|
|
1581
|
+
var Yt = new L("tag:yaml.org,2002:omap", {
|
|
1567
1582
|
kind: "sequence",
|
|
1568
|
-
resolve:
|
|
1569
|
-
construct:
|
|
1570
|
-
}),
|
|
1571
|
-
function
|
|
1583
|
+
resolve: qt,
|
|
1584
|
+
construct: Jt
|
|
1585
|
+
}), Xt = Object.prototype.toString;
|
|
1586
|
+
function Zt(e) {
|
|
1572
1587
|
if (e === null) return !0;
|
|
1573
1588
|
var t, n, r, i, a, o = e;
|
|
1574
1589
|
for (a = Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1575
|
-
if (r = o[t],
|
|
1590
|
+
if (r = o[t], Xt.call(r) !== "[object Object]" || (i = Object.keys(r), i.length !== 1)) return !1;
|
|
1576
1591
|
a[t] = [i[0], r[i[0]]];
|
|
1577
1592
|
}
|
|
1578
1593
|
return !0;
|
|
1579
1594
|
}
|
|
1580
|
-
function
|
|
1595
|
+
function Qt(e) {
|
|
1581
1596
|
if (e === null) return [];
|
|
1582
1597
|
var t, n, r, i, a, o = e;
|
|
1583
1598
|
for (a = Array(o.length), t = 0, n = o.length; t < n; t += 1) r = o[t], i = Object.keys(r), a[t] = [i[0], r[i[0]]];
|
|
1584
1599
|
return a;
|
|
1585
1600
|
}
|
|
1586
|
-
var
|
|
1601
|
+
var $t = new L("tag:yaml.org,2002:pairs", {
|
|
1587
1602
|
kind: "sequence",
|
|
1588
|
-
resolve:
|
|
1589
|
-
construct:
|
|
1590
|
-
}),
|
|
1591
|
-
function
|
|
1603
|
+
resolve: Zt,
|
|
1604
|
+
construct: Qt
|
|
1605
|
+
}), en = Object.prototype.hasOwnProperty;
|
|
1606
|
+
function tn(e) {
|
|
1592
1607
|
if (e === null) return !0;
|
|
1593
1608
|
var t, n = e;
|
|
1594
|
-
for (t in n) if (
|
|
1609
|
+
for (t in n) if (en.call(n, t) && n[t] !== null) return !1;
|
|
1595
1610
|
return !0;
|
|
1596
1611
|
}
|
|
1597
|
-
function
|
|
1612
|
+
function nn(e) {
|
|
1598
1613
|
return e === null ? {} : e;
|
|
1599
1614
|
}
|
|
1600
|
-
var
|
|
1615
|
+
var rn = new L("tag:yaml.org,2002:set", {
|
|
1601
1616
|
kind: "mapping",
|
|
1602
|
-
resolve:
|
|
1603
|
-
construct:
|
|
1604
|
-
}),
|
|
1605
|
-
implicit: [
|
|
1617
|
+
resolve: tn,
|
|
1618
|
+
construct: nn
|
|
1619
|
+
}), an = At.extend({
|
|
1620
|
+
implicit: [It, Rt],
|
|
1606
1621
|
explicit: [
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1622
|
+
Wt,
|
|
1623
|
+
Yt,
|
|
1624
|
+
$t,
|
|
1625
|
+
rn
|
|
1611
1626
|
]
|
|
1612
|
-
}),
|
|
1613
|
-
function
|
|
1627
|
+
}), R = Object.prototype.hasOwnProperty, on = 1, sn = 2, cn = 3, ln = 4, un = 1, dn = 2, fn = 3, pn = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, mn = /[\x85\u2028\u2029]/, hn = /[,\[\]\{\}]/, gn = /^(?:!|!!|![a-z\-]+!)$/i, _n = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1628
|
+
function vn(e) {
|
|
1614
1629
|
return Object.prototype.toString.call(e);
|
|
1615
1630
|
}
|
|
1616
|
-
function
|
|
1631
|
+
function z(e) {
|
|
1617
1632
|
return e === 10 || e === 13;
|
|
1618
1633
|
}
|
|
1619
|
-
function
|
|
1634
|
+
function B(e) {
|
|
1620
1635
|
return e === 9 || e === 32;
|
|
1621
1636
|
}
|
|
1622
|
-
function
|
|
1637
|
+
function V(e) {
|
|
1623
1638
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1624
1639
|
}
|
|
1625
|
-
function
|
|
1640
|
+
function H(e) {
|
|
1626
1641
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1627
1642
|
}
|
|
1628
|
-
function
|
|
1643
|
+
function yn(e) {
|
|
1629
1644
|
var t;
|
|
1630
1645
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1631
1646
|
}
|
|
1632
|
-
function
|
|
1647
|
+
function bn(e) {
|
|
1633
1648
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1634
1649
|
}
|
|
1635
|
-
function
|
|
1650
|
+
function xn(e) {
|
|
1636
1651
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1637
1652
|
}
|
|
1638
|
-
function
|
|
1653
|
+
function Sn(e) {
|
|
1639
1654
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? "\n" : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? "\"" : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? "\xA0" : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1640
1655
|
}
|
|
1641
|
-
function
|
|
1656
|
+
function Cn(e) {
|
|
1642
1657
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
|
|
1643
1658
|
}
|
|
1644
|
-
function
|
|
1659
|
+
function wn(e, t, n) {
|
|
1645
1660
|
t === "__proto__" ? Object.defineProperty(e, t, {
|
|
1646
1661
|
configurable: !0,
|
|
1647
1662
|
enumerable: !0,
|
|
@@ -1649,11 +1664,11 @@ function Tn(e, t, n) {
|
|
|
1649
1664
|
value: n
|
|
1650
1665
|
}) : e[t] = n;
|
|
1651
1666
|
}
|
|
1652
|
-
for (var
|
|
1653
|
-
function
|
|
1654
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1667
|
+
for (var Tn = Array(256), En = Array(256), U = 0; U < 256; U++) Tn[U] = +!!Sn(U), En[U] = Sn(U);
|
|
1668
|
+
function Dn(e, t) {
|
|
1669
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || an, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1655
1670
|
}
|
|
1656
|
-
function
|
|
1671
|
+
function On(e, t) {
|
|
1657
1672
|
var n = {
|
|
1658
1673
|
name: e.filename,
|
|
1659
1674
|
buffer: e.input.slice(0, -1),
|
|
@@ -1661,290 +1676,290 @@ function kn(e, t) {
|
|
|
1661
1676
|
line: e.line,
|
|
1662
1677
|
column: e.position - e.lineStart
|
|
1663
1678
|
};
|
|
1664
|
-
return n.snippet =
|
|
1679
|
+
return n.snippet = Je(n), new I(t, n);
|
|
1665
1680
|
}
|
|
1666
|
-
function
|
|
1667
|
-
throw
|
|
1681
|
+
function W(e, t) {
|
|
1682
|
+
throw On(e, t);
|
|
1668
1683
|
}
|
|
1669
|
-
function
|
|
1670
|
-
e.onWarning && e.onWarning.call(null,
|
|
1684
|
+
function kn(e, t) {
|
|
1685
|
+
e.onWarning && e.onWarning.call(null, On(e, t));
|
|
1671
1686
|
}
|
|
1672
|
-
var
|
|
1687
|
+
var An = {
|
|
1673
1688
|
YAML: function(e, t, n) {
|
|
1674
1689
|
var r, i, a;
|
|
1675
|
-
e.version !== null &&
|
|
1690
|
+
e.version !== null && W(e, "duplication of %YAML directive"), n.length !== 1 && W(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && W(e, "ill-formed argument of the YAML directive"), i = parseInt(r[1], 10), a = parseInt(r[2], 10), i !== 1 && W(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && kn(e, "unsupported YAML version of the document");
|
|
1676
1691
|
},
|
|
1677
1692
|
TAG: function(e, t, n) {
|
|
1678
1693
|
var r, i;
|
|
1679
|
-
n.length !== 2 &&
|
|
1694
|
+
n.length !== 2 && W(e, "TAG directive accepts exactly two arguments"), r = n[0], i = n[1], gn.test(r) || W(e, "ill-formed tag handle (first argument) of the TAG directive"), R.call(e.tagMap, r) && W(e, "there is a previously declared suffix for \"" + r + "\" tag handle"), _n.test(i) || W(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1680
1695
|
try {
|
|
1681
1696
|
i = decodeURIComponent(i);
|
|
1682
1697
|
} catch {
|
|
1683
|
-
|
|
1698
|
+
W(e, "tag prefix is malformed: " + i);
|
|
1684
1699
|
}
|
|
1685
1700
|
e.tagMap[r] = i;
|
|
1686
1701
|
}
|
|
1687
1702
|
};
|
|
1688
|
-
function
|
|
1703
|
+
function G(e, t, n, r) {
|
|
1689
1704
|
var i, a, o, s;
|
|
1690
1705
|
if (t < n) {
|
|
1691
|
-
if (s = e.input.slice(t, n), r) for (i = 0, a = s.length; i < a; i += 1) o = s.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1692
|
-
else
|
|
1706
|
+
if (s = e.input.slice(t, n), r) for (i = 0, a = s.length; i < a; i += 1) o = s.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || W(e, "expected valid JSON character");
|
|
1707
|
+
else pn.test(s) && W(e, "the stream contains non-printable characters");
|
|
1693
1708
|
e.result += s;
|
|
1694
1709
|
}
|
|
1695
1710
|
}
|
|
1696
|
-
function
|
|
1711
|
+
function jn(e, t, n, r) {
|
|
1697
1712
|
var i, a, o, s;
|
|
1698
|
-
for (
|
|
1713
|
+
for (P.isObject(n) || W(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), o = 0, s = i.length; o < s; o += 1) a = i[o], R.call(t, a) || (wn(t, a, n[a]), r[a] = !0);
|
|
1699
1714
|
}
|
|
1700
|
-
function
|
|
1715
|
+
function K(e, t, n, r, i, a, o, s, c) {
|
|
1701
1716
|
var l, u;
|
|
1702
|
-
if (Array.isArray(i)) for (i = Array.prototype.slice.call(i), l = 0, u = i.length; l < u; l += 1) Array.isArray(i[l]) &&
|
|
1703
|
-
if (typeof i == "object" &&
|
|
1704
|
-
else
|
|
1705
|
-
else !e.json && !
|
|
1717
|
+
if (Array.isArray(i)) for (i = Array.prototype.slice.call(i), l = 0, u = i.length; l < u; l += 1) Array.isArray(i[l]) && W(e, "nested arrays are not supported inside keys"), typeof i == "object" && vn(i[l]) === "[object Object]" && (i[l] = "[object Object]");
|
|
1718
|
+
if (typeof i == "object" && vn(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge") if (Array.isArray(a)) for (l = 0, u = a.length; l < u; l += 1) jn(e, t, a[l], n);
|
|
1719
|
+
else jn(e, t, a, n);
|
|
1720
|
+
else !e.json && !R.call(n, i) && R.call(t, i) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = c || e.position, W(e, "duplicated mapping key")), wn(t, i, a), delete n[i];
|
|
1706
1721
|
return t;
|
|
1707
1722
|
}
|
|
1708
|
-
function
|
|
1723
|
+
function Mn(e) {
|
|
1709
1724
|
var t = e.input.charCodeAt(e.position);
|
|
1710
|
-
t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1725
|
+
t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : W(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1711
1726
|
}
|
|
1712
|
-
function
|
|
1727
|
+
function q(e, t, n) {
|
|
1713
1728
|
for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0;) {
|
|
1714
|
-
for (;
|
|
1729
|
+
for (; B(i);) i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1715
1730
|
if (t && i === 35) do
|
|
1716
1731
|
i = e.input.charCodeAt(++e.position);
|
|
1717
1732
|
while (i !== 10 && i !== 13 && i !== 0);
|
|
1718
|
-
if (
|
|
1733
|
+
if (z(i)) for (Mn(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32;) e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1719
1734
|
else break;
|
|
1720
1735
|
}
|
|
1721
|
-
return n !== -1 && r !== 0 && e.lineIndent < n &&
|
|
1736
|
+
return n !== -1 && r !== 0 && e.lineIndent < n && kn(e, "deficient indentation"), r;
|
|
1722
1737
|
}
|
|
1723
|
-
function
|
|
1738
|
+
function Nn(e) {
|
|
1724
1739
|
var t = e.position, n = e.input.charCodeAt(t);
|
|
1725
|
-
return !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 ||
|
|
1740
|
+
return !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || V(n)));
|
|
1726
1741
|
}
|
|
1727
|
-
function
|
|
1728
|
-
t === 1 ? e.result += " " : t > 1 && (e.result +=
|
|
1742
|
+
function Pn(e, t) {
|
|
1743
|
+
t === 1 ? e.result += " " : t > 1 && (e.result += P.repeat("\n", t - 1));
|
|
1729
1744
|
}
|
|
1730
|
-
function
|
|
1745
|
+
function Fn(e, t, n) {
|
|
1731
1746
|
var r, i, a, o, s, c, l, u, d = e.kind, f = e.result, p = e.input.charCodeAt(e.position);
|
|
1732
|
-
if (
|
|
1747
|
+
if (V(p) || H(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = e.input.charCodeAt(e.position + 1), V(i) || n && H(i))) return !1;
|
|
1733
1748
|
for (e.kind = "scalar", e.result = "", a = o = e.position, s = !1; p !== 0;) {
|
|
1734
1749
|
if (p === 58) {
|
|
1735
|
-
if (i = e.input.charCodeAt(e.position + 1),
|
|
1750
|
+
if (i = e.input.charCodeAt(e.position + 1), V(i) || n && H(i)) break;
|
|
1736
1751
|
} else if (p === 35) {
|
|
1737
|
-
if (r = e.input.charCodeAt(e.position - 1),
|
|
1738
|
-
} else if (e.position === e.lineStart &&
|
|
1739
|
-
else if (
|
|
1752
|
+
if (r = e.input.charCodeAt(e.position - 1), V(r)) break;
|
|
1753
|
+
} else if (e.position === e.lineStart && Nn(e) || n && H(p)) break;
|
|
1754
|
+
else if (z(p)) if (c = e.line, l = e.lineStart, u = e.lineIndent, q(e, !1, -1), e.lineIndent >= t) {
|
|
1740
1755
|
s = !0, p = e.input.charCodeAt(e.position);
|
|
1741
1756
|
continue;
|
|
1742
1757
|
} else {
|
|
1743
1758
|
e.position = o, e.line = c, e.lineStart = l, e.lineIndent = u;
|
|
1744
1759
|
break;
|
|
1745
1760
|
}
|
|
1746
|
-
s &&= (
|
|
1761
|
+
s &&= (G(e, a, o, !1), Pn(e, e.line - c), a = o = e.position, !1), B(p) || (o = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1747
1762
|
}
|
|
1748
|
-
return
|
|
1763
|
+
return G(e, a, o, !1), e.result ? !0 : (e.kind = d, e.result = f, !1);
|
|
1749
1764
|
}
|
|
1750
|
-
function
|
|
1765
|
+
function In(e, t) {
|
|
1751
1766
|
var n = e.input.charCodeAt(e.position), r, i;
|
|
1752
1767
|
if (n !== 39) return !1;
|
|
1753
|
-
for (e.kind = "scalar", e.result = "", e.position++, r = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0;) if (n === 39) if (
|
|
1768
|
+
for (e.kind = "scalar", e.result = "", e.position++, r = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0;) if (n === 39) if (G(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39) r = e.position, e.position++, i = e.position;
|
|
1754
1769
|
else return !0;
|
|
1755
|
-
else
|
|
1756
|
-
|
|
1770
|
+
else z(n) ? (G(e, r, i, !0), Pn(e, q(e, !1, t)), r = i = e.position) : e.position === e.lineStart && Nn(e) ? W(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1771
|
+
W(e, "unexpected end of the stream within a single quoted scalar");
|
|
1757
1772
|
}
|
|
1758
|
-
function
|
|
1773
|
+
function Ln(e, t) {
|
|
1759
1774
|
var n, r, i, a, o, s = e.input.charCodeAt(e.position);
|
|
1760
1775
|
if (s !== 34) return !1;
|
|
1761
|
-
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0;) if (s === 34) return
|
|
1776
|
+
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0;) if (s === 34) return G(e, n, e.position, !0), e.position++, !0;
|
|
1762
1777
|
else if (s === 92) {
|
|
1763
|
-
if (
|
|
1764
|
-
else if (s < 256 &&
|
|
1765
|
-
else if ((o =
|
|
1766
|
-
for (i = o, a = 0; i > 0; i--) s = e.input.charCodeAt(++e.position), (o =
|
|
1767
|
-
e.result +=
|
|
1768
|
-
} else
|
|
1778
|
+
if (G(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), z(s)) q(e, !1, t);
|
|
1779
|
+
else if (s < 256 && Tn[s]) e.result += En[s], e.position++;
|
|
1780
|
+
else if ((o = bn(s)) > 0) {
|
|
1781
|
+
for (i = o, a = 0; i > 0; i--) s = e.input.charCodeAt(++e.position), (o = yn(s)) >= 0 ? a = (a << 4) + o : W(e, "expected hexadecimal character");
|
|
1782
|
+
e.result += Cn(a), e.position++;
|
|
1783
|
+
} else W(e, "unknown escape sequence");
|
|
1769
1784
|
n = r = e.position;
|
|
1770
|
-
} else
|
|
1771
|
-
|
|
1785
|
+
} else z(s) ? (G(e, n, r, !0), Pn(e, q(e, !1, t)), n = r = e.position) : e.position === e.lineStart && Nn(e) ? W(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1786
|
+
W(e, "unexpected end of the stream within a double quoted scalar");
|
|
1772
1787
|
}
|
|
1773
|
-
function
|
|
1788
|
+
function Rn(e, t) {
|
|
1774
1789
|
var n = !0, r, i, a, o = e.tag, s, c = e.anchor, l, u, d, f, p, m = Object.create(null), h, g, _, v = e.input.charCodeAt(e.position);
|
|
1775
1790
|
if (v === 91) u = 93, p = !1, s = [];
|
|
1776
1791
|
else if (v === 123) u = 125, p = !0, s = {};
|
|
1777
1792
|
else return !1;
|
|
1778
1793
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), v = e.input.charCodeAt(++e.position); v !== 0;) {
|
|
1779
|
-
if (
|
|
1780
|
-
n ? v === 44 &&
|
|
1794
|
+
if (q(e, !0, t), v = e.input.charCodeAt(e.position), v === u) return e.position++, e.tag = o, e.anchor = c, e.kind = p ? "mapping" : "sequence", e.result = s, !0;
|
|
1795
|
+
n ? v === 44 && W(e, "expected the node content, but found ','") : W(e, "missed comma between flow collection entries"), g = h = _ = null, d = f = !1, v === 63 && (l = e.input.charCodeAt(e.position + 1), V(l) && (d = f = !0, e.position++, q(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, J(e, t, on, !1, !0), g = e.tag, h = e.result, q(e, !0, t), v = e.input.charCodeAt(e.position), (f || e.line === r) && v === 58 && (d = !0, v = e.input.charCodeAt(++e.position), q(e, !0, t), J(e, t, on, !1, !0), _ = e.result), p ? K(e, s, m, g, h, _, r, i, a) : d ? s.push(K(e, null, m, g, h, _, r, i, a)) : s.push(h), q(e, !0, t), v = e.input.charCodeAt(e.position), v === 44 ? (n = !0, v = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1781
1796
|
}
|
|
1782
|
-
|
|
1797
|
+
W(e, "unexpected end of the stream within a flow collection");
|
|
1783
1798
|
}
|
|
1784
|
-
function
|
|
1785
|
-
var n, r, i =
|
|
1799
|
+
function zn(e, t) {
|
|
1800
|
+
var n, r, i = un, a = !1, o = !1, s = t, c = 0, l = !1, u, d = e.input.charCodeAt(e.position);
|
|
1786
1801
|
if (d === 124) r = !1;
|
|
1787
1802
|
else if (d === 62) r = !0;
|
|
1788
1803
|
else return !1;
|
|
1789
|
-
for (e.kind = "scalar", e.result = ""; d !== 0;) if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45)
|
|
1790
|
-
else if ((u =
|
|
1804
|
+
for (e.kind = "scalar", e.result = ""; d !== 0;) if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45) un === i ? i = d === 43 ? fn : dn : W(e, "repeat of a chomping mode identifier");
|
|
1805
|
+
else if ((u = xn(d)) >= 0) u === 0 ? W(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? W(e, "repeat of an indentation width identifier") : (s = t + u - 1, o = !0);
|
|
1791
1806
|
else break;
|
|
1792
|
-
if (
|
|
1807
|
+
if (B(d)) {
|
|
1793
1808
|
do
|
|
1794
1809
|
d = e.input.charCodeAt(++e.position);
|
|
1795
|
-
while (
|
|
1810
|
+
while (B(d));
|
|
1796
1811
|
if (d === 35) do
|
|
1797
1812
|
d = e.input.charCodeAt(++e.position);
|
|
1798
|
-
while (!
|
|
1813
|
+
while (!z(d) && d !== 0);
|
|
1799
1814
|
}
|
|
1800
1815
|
for (; d !== 0;) {
|
|
1801
|
-
for (
|
|
1802
|
-
if (!o && e.lineIndent > s && (s = e.lineIndent),
|
|
1816
|
+
for (Mn(e), e.lineIndent = 0, d = e.input.charCodeAt(e.position); (!o || e.lineIndent < s) && d === 32;) e.lineIndent++, d = e.input.charCodeAt(++e.position);
|
|
1817
|
+
if (!o && e.lineIndent > s && (s = e.lineIndent), z(d)) {
|
|
1803
1818
|
c++;
|
|
1804
1819
|
continue;
|
|
1805
1820
|
}
|
|
1806
1821
|
if (e.lineIndent < s) {
|
|
1807
|
-
i ===
|
|
1822
|
+
i === fn ? e.result += P.repeat("\n", a ? 1 + c : c) : i === un && a && (e.result += "\n");
|
|
1808
1823
|
break;
|
|
1809
1824
|
}
|
|
1810
|
-
for (r ?
|
|
1811
|
-
|
|
1825
|
+
for (r ? B(d) ? (l = !0, e.result += P.repeat("\n", a ? 1 + c : c)) : l ? (l = !1, e.result += P.repeat("\n", c + 1)) : c === 0 ? a && (e.result += " ") : e.result += P.repeat("\n", c) : e.result += P.repeat("\n", a ? 1 + c : c), a = !0, o = !0, c = 0, n = e.position; !z(d) && d !== 0;) d = e.input.charCodeAt(++e.position);
|
|
1826
|
+
G(e, n, e.position, !1);
|
|
1812
1827
|
}
|
|
1813
1828
|
return !0;
|
|
1814
1829
|
}
|
|
1815
|
-
function
|
|
1830
|
+
function Bn(e, t) {
|
|
1816
1831
|
var n, r = e.tag, i = e.anchor, a = [], o, s = !1, c;
|
|
1817
1832
|
if (e.firstTabInLine !== -1) return !1;
|
|
1818
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1819
|
-
if (s = !0, e.position++,
|
|
1833
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, W(e, "tab characters must not be used in indentation")), !(c !== 45 || (o = e.input.charCodeAt(e.position + 1), !V(o))));) {
|
|
1834
|
+
if (s = !0, e.position++, q(e, !0, -1) && e.lineIndent <= t) {
|
|
1820
1835
|
a.push(null), c = e.input.charCodeAt(e.position);
|
|
1821
1836
|
continue;
|
|
1822
1837
|
}
|
|
1823
|
-
if (n = e.line,
|
|
1838
|
+
if (n = e.line, J(e, t, cn, !1, !0), a.push(e.result), q(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && c !== 0) W(e, "bad indentation of a sequence entry");
|
|
1824
1839
|
else if (e.lineIndent < t) break;
|
|
1825
1840
|
}
|
|
1826
1841
|
return s ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1827
1842
|
}
|
|
1828
|
-
function
|
|
1843
|
+
function Vn(e, t, n) {
|
|
1829
1844
|
var r, i, a, o, s, c, l = e.tag, u = e.anchor, d = {}, f = Object.create(null), p = null, m = null, h = null, g = !1, _ = !1, v;
|
|
1830
1845
|
if (e.firstTabInLine !== -1) return !1;
|
|
1831
1846
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = d), v = e.input.charCodeAt(e.position); v !== 0;) {
|
|
1832
|
-
if (!g && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1847
|
+
if (!g && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, W(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (v === 63 || v === 58) && V(r)) v === 63 ? (g && (K(e, d, f, p, m, null, o, s, c), p = m = h = null), _ = !0, g = !0, i = !0) : g ? (g = !1, i = !0) : W(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = r;
|
|
1833
1848
|
else {
|
|
1834
|
-
if (o = e.line, s = e.lineStart, c = e.position, !
|
|
1849
|
+
if (o = e.line, s = e.lineStart, c = e.position, !J(e, n, sn, !1, !0)) break;
|
|
1835
1850
|
if (e.line === a) {
|
|
1836
|
-
for (v = e.input.charCodeAt(e.position);
|
|
1837
|
-
if (v === 58) v = e.input.charCodeAt(++e.position),
|
|
1838
|
-
else if (_)
|
|
1851
|
+
for (v = e.input.charCodeAt(e.position); B(v);) v = e.input.charCodeAt(++e.position);
|
|
1852
|
+
if (v === 58) v = e.input.charCodeAt(++e.position), V(v) || W(e, "a whitespace character is expected after the key-value separator within a block mapping"), g && (K(e, d, f, p, m, null, o, s, c), p = m = h = null), _ = !0, g = !1, i = !1, p = e.tag, m = e.result;
|
|
1853
|
+
else if (_) W(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1839
1854
|
else return e.tag = l, e.anchor = u, !0;
|
|
1840
|
-
} else if (_)
|
|
1855
|
+
} else if (_) W(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1841
1856
|
else return e.tag = l, e.anchor = u, !0;
|
|
1842
1857
|
}
|
|
1843
|
-
if ((e.line === a || e.lineIndent > t) && (g && (o = e.line, s = e.lineStart, c = e.position),
|
|
1858
|
+
if ((e.line === a || e.lineIndent > t) && (g && (o = e.line, s = e.lineStart, c = e.position), J(e, t, ln, !0, i) && (g ? m = e.result : h = e.result), g || (K(e, d, f, p, m, h, o, s, c), p = m = h = null), q(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && v !== 0) W(e, "bad indentation of a mapping entry");
|
|
1844
1859
|
else if (e.lineIndent < t) break;
|
|
1845
1860
|
}
|
|
1846
|
-
return g &&
|
|
1861
|
+
return g && K(e, d, f, p, m, null, o, s, c), _ && (e.tag = l, e.anchor = u, e.kind = "mapping", e.result = d), _;
|
|
1847
1862
|
}
|
|
1848
|
-
function
|
|
1863
|
+
function Hn(e) {
|
|
1849
1864
|
var t, n = !1, r = !1, i, a, o = e.input.charCodeAt(e.position);
|
|
1850
1865
|
if (o !== 33) return !1;
|
|
1851
|
-
if (e.tag !== null &&
|
|
1866
|
+
if (e.tag !== null && W(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
|
|
1852
1867
|
do
|
|
1853
1868
|
o = e.input.charCodeAt(++e.position);
|
|
1854
1869
|
while (o !== 0 && o !== 62);
|
|
1855
|
-
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
1870
|
+
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : W(e, "unexpected end of the stream within a verbatim tag");
|
|
1856
1871
|
} else {
|
|
1857
|
-
for (; o !== 0 && !
|
|
1858
|
-
a = e.input.slice(t, e.position),
|
|
1872
|
+
for (; o !== 0 && !V(o);) o === 33 && (r ? W(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), gn.test(i) || W(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
1873
|
+
a = e.input.slice(t, e.position), hn.test(a) && W(e, "tag suffix cannot contain flow indicator characters");
|
|
1859
1874
|
}
|
|
1860
|
-
a && !
|
|
1875
|
+
a && !_n.test(a) && W(e, "tag name cannot contain such characters: " + a);
|
|
1861
1876
|
try {
|
|
1862
1877
|
a = decodeURIComponent(a);
|
|
1863
1878
|
} catch {
|
|
1864
|
-
|
|
1879
|
+
W(e, "tag name is malformed: " + a);
|
|
1865
1880
|
}
|
|
1866
|
-
return n ? e.tag = a :
|
|
1881
|
+
return n ? e.tag = a : R.call(e.tagMap, i) ? e.tag = e.tagMap[i] + a : i === "!" ? e.tag = "!" + a : i === "!!" ? e.tag = "tag:yaml.org,2002:" + a : W(e, "undeclared tag handle \"" + i + "\""), !0;
|
|
1867
1882
|
}
|
|
1868
|
-
function
|
|
1883
|
+
function Un(e) {
|
|
1869
1884
|
var t, n = e.input.charCodeAt(e.position);
|
|
1870
1885
|
if (n !== 38) return !1;
|
|
1871
|
-
for (e.anchor !== null &&
|
|
1872
|
-
return e.position === t &&
|
|
1886
|
+
for (e.anchor !== null && W(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !V(n) && !H(n);) n = e.input.charCodeAt(++e.position);
|
|
1887
|
+
return e.position === t && W(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1873
1888
|
}
|
|
1874
|
-
function
|
|
1889
|
+
function Wn(e) {
|
|
1875
1890
|
var t, n, r = e.input.charCodeAt(e.position);
|
|
1876
1891
|
if (r !== 42) return !1;
|
|
1877
|
-
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !
|
|
1878
|
-
return e.position === t &&
|
|
1892
|
+
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !V(r) && !H(r);) r = e.input.charCodeAt(++e.position);
|
|
1893
|
+
return e.position === t && W(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), R.call(e.anchorMap, n) || W(e, "unidentified alias \"" + n + "\""), e.result = e.anchorMap[n], q(e, !0, -1), !0;
|
|
1879
1894
|
}
|
|
1880
|
-
function
|
|
1895
|
+
function J(e, t, n, r, i) {
|
|
1881
1896
|
var a, o, s, c = 1, l = !1, u = !1, d, f, p, m, h, g;
|
|
1882
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = s =
|
|
1883
|
-
if (s &&= l || i, (c === 1 ||
|
|
1897
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = s = ln === n || cn === n, r && q(e, !0, -1) && (l = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1) for (; Hn(e) || Un(e);) q(e, !0, -1) ? (l = !0, s = a, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : s = !1;
|
|
1898
|
+
if (s &&= l || i, (c === 1 || ln === n) && (h = on === n || sn === n ? t : t + 1, g = e.position - e.lineStart, c === 1 ? s && (Bn(e, g) || Vn(e, g, h)) || Rn(e, h) ? u = !0 : (o && zn(e, h) || In(e, h) || Ln(e, h) ? u = !0 : Wn(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && W(e, "alias node should not have any properties")) : Fn(e, h, on === n) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (u = s && Bn(e, g))), e.tag === null) e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1884
1899
|
else if (e.tag === "?") {
|
|
1885
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1900
|
+
for (e.result !== null && e.kind !== "scalar" && W(e, "unacceptable node kind for !<?> tag; it should be \"scalar\", not \"" + e.kind + "\""), d = 0, f = e.implicitTypes.length; d < f; d += 1) if (m = e.implicitTypes[d], m.resolve(e.result)) {
|
|
1886
1901
|
e.result = m.construct(e.result), e.tag = m.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1887
1902
|
break;
|
|
1888
1903
|
}
|
|
1889
1904
|
} else if (e.tag !== "!") {
|
|
1890
|
-
if (
|
|
1905
|
+
if (R.call(e.typeMap[e.kind || "fallback"], e.tag)) m = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1891
1906
|
else for (m = null, p = e.typeMap.multi[e.kind || "fallback"], d = 0, f = p.length; d < f; d += 1) if (e.tag.slice(0, p[d].tag.length) === p[d].tag) {
|
|
1892
1907
|
m = p[d];
|
|
1893
1908
|
break;
|
|
1894
1909
|
}
|
|
1895
|
-
m ||
|
|
1910
|
+
m || W(e, "unknown tag !<" + e.tag + ">"), e.result !== null && m.kind !== e.kind && W(e, "unacceptable node kind for !<" + e.tag + "> tag; it should be \"" + m.kind + "\", not \"" + e.kind + "\""), m.resolve(e.result, e.tag) ? (e.result = m.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : W(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1896
1911
|
}
|
|
1897
1912
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || u;
|
|
1898
1913
|
}
|
|
1899
|
-
function
|
|
1914
|
+
function Gn(e) {
|
|
1900
1915
|
var t = e.position, n, r, i, a = !1, o;
|
|
1901
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = Object.create(null), e.anchorMap = Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (
|
|
1902
|
-
for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !
|
|
1903
|
-
for (r = e.input.slice(n, e.position), i = [], r.length < 1 &&
|
|
1904
|
-
for (;
|
|
1916
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = Object.create(null), e.anchorMap = Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (q(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37));) {
|
|
1917
|
+
for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !V(o);) o = e.input.charCodeAt(++e.position);
|
|
1918
|
+
for (r = e.input.slice(n, e.position), i = [], r.length < 1 && W(e, "directive name must not be less than one character in length"); o !== 0;) {
|
|
1919
|
+
for (; B(o);) o = e.input.charCodeAt(++e.position);
|
|
1905
1920
|
if (o === 35) {
|
|
1906
1921
|
do
|
|
1907
1922
|
o = e.input.charCodeAt(++e.position);
|
|
1908
|
-
while (o !== 0 && !
|
|
1923
|
+
while (o !== 0 && !z(o));
|
|
1909
1924
|
break;
|
|
1910
1925
|
}
|
|
1911
|
-
if (
|
|
1912
|
-
for (n = e.position; o !== 0 && !
|
|
1926
|
+
if (z(o)) break;
|
|
1927
|
+
for (n = e.position; o !== 0 && !V(o);) o = e.input.charCodeAt(++e.position);
|
|
1913
1928
|
i.push(e.input.slice(n, e.position));
|
|
1914
1929
|
}
|
|
1915
|
-
o !== 0 &&
|
|
1930
|
+
o !== 0 && Mn(e), R.call(An, r) ? An[r](e, r, i) : kn(e, "unknown document directive \"" + r + "\"");
|
|
1916
1931
|
}
|
|
1917
|
-
if (
|
|
1918
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
1932
|
+
if (q(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, q(e, !0, -1)) : a && W(e, "directives end mark is expected"), J(e, e.lineIndent - 1, ln, !1, !0), q(e, !0, -1), e.checkLineBreaks && mn.test(e.input.slice(t, e.position)) && kn(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Nn(e)) {
|
|
1933
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, q(e, !0, -1));
|
|
1919
1934
|
return;
|
|
1920
1935
|
}
|
|
1921
|
-
if (e.position < e.length - 1)
|
|
1936
|
+
if (e.position < e.length - 1) W(e, "end of the stream or a document separator is expected");
|
|
1922
1937
|
else return;
|
|
1923
1938
|
}
|
|
1924
|
-
function
|
|
1939
|
+
function Kn(e, t) {
|
|
1925
1940
|
e = String(e), t ||= {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += "\n"), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1926
|
-
var n = new
|
|
1927
|
-
for (r !== -1 && (n.position = r,
|
|
1928
|
-
for (; n.position < n.length - 1;)
|
|
1941
|
+
var n = new Dn(e, t), r = e.indexOf("\0");
|
|
1942
|
+
for (r !== -1 && (n.position = r, W(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32;) n.lineIndent += 1, n.position += 1;
|
|
1943
|
+
for (; n.position < n.length - 1;) Gn(n);
|
|
1929
1944
|
return n.documents;
|
|
1930
1945
|
}
|
|
1931
|
-
function
|
|
1946
|
+
function qn(e, t, n) {
|
|
1932
1947
|
typeof t == "object" && t && n === void 0 && (n = t, t = null);
|
|
1933
|
-
var r =
|
|
1948
|
+
var r = Kn(e, n);
|
|
1934
1949
|
if (typeof t != "function") return r;
|
|
1935
1950
|
for (var i = 0, a = r.length; i < a; i += 1) t(r[i]);
|
|
1936
1951
|
}
|
|
1937
|
-
function
|
|
1938
|
-
var n =
|
|
1952
|
+
function Jn(e, t) {
|
|
1953
|
+
var n = Kn(e, t);
|
|
1939
1954
|
if (n.length !== 0) {
|
|
1940
1955
|
if (n.length === 1) return n[0];
|
|
1941
|
-
throw new
|
|
1956
|
+
throw new I("expected a single document in the stream, but found more");
|
|
1942
1957
|
}
|
|
1943
1958
|
}
|
|
1944
|
-
var
|
|
1945
|
-
loadAll:
|
|
1946
|
-
load:
|
|
1947
|
-
},
|
|
1959
|
+
var Yn = {
|
|
1960
|
+
loadAll: qn,
|
|
1961
|
+
load: Jn
|
|
1962
|
+
}, Xn = Object.prototype.toString, Zn = Object.prototype.hasOwnProperty, Qn = 65279, $n = 9, er = 10, tr = 13, nr = 32, rr = 33, ir = 34, ar = 35, or = 37, sr = 38, cr = 39, lr = 42, ur = 44, dr = 45, fr = 58, pr = 61, mr = 62, hr = 63, gr = 64, _r = 91, vr = 93, yr = 96, br = 123, xr = 124, Sr = 125, Y = {};
|
|
1948
1963
|
Y[0] = "\\0", Y[7] = "\\a", Y[8] = "\\b", Y[9] = "\\t", Y[10] = "\\n", Y[11] = "\\v", Y[12] = "\\f", Y[13] = "\\r", Y[27] = "\\e", Y[34] = "\\\"", Y[92] = "\\\\", Y[133] = "\\N", Y[160] = "\\_", Y[8232] = "\\L", Y[8233] = "\\P";
|
|
1949
1964
|
var Cr = [
|
|
1950
1965
|
"y",
|
|
@@ -1967,7 +1982,7 @@ var Cr = [
|
|
|
1967
1982
|
function Tr(e, t) {
|
|
1968
1983
|
var n, r, i, a, o, s, c;
|
|
1969
1984
|
if (t === null) return {};
|
|
1970
|
-
for (n = {}, r = Object.keys(t), i = 0, a = r.length; i < a; i += 1) o = r[i], s = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c &&
|
|
1985
|
+
for (n = {}, r = Object.keys(t), i = 0, a = r.length; i < a; i += 1) o = r[i], s = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c && Zn.call(c.styleAliases, s) && (s = c.styleAliases[s]), n[o] = s;
|
|
1971
1986
|
return n;
|
|
1972
1987
|
}
|
|
1973
1988
|
function Er(e) {
|
|
@@ -1975,19 +1990,19 @@ function Er(e) {
|
|
|
1975
1990
|
if (e <= 255) n = "x", r = 2;
|
|
1976
1991
|
else if (e <= 65535) n = "u", r = 4;
|
|
1977
1992
|
else if (e <= 4294967295) n = "U", r = 8;
|
|
1978
|
-
else throw new
|
|
1979
|
-
return "\\" + n +
|
|
1993
|
+
else throw new I("code point within a string may not be greater than 0xFFFFFFFF");
|
|
1994
|
+
return "\\" + n + P.repeat("0", r - t.length) + t;
|
|
1980
1995
|
}
|
|
1981
1996
|
var Dr = 1, Or = 2;
|
|
1982
1997
|
function kr(e) {
|
|
1983
|
-
this.schema = e.schema ||
|
|
1998
|
+
this.schema = e.schema || an, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = P.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Tr(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === "\"" ? Or : Dr, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
1984
1999
|
}
|
|
1985
2000
|
function Ar(e, t) {
|
|
1986
|
-
for (var n =
|
|
2001
|
+
for (var n = P.repeat(" ", t), r = 0, i = -1, a = "", o, s = e.length; r < s;) i = e.indexOf("\n", r), i === -1 ? (o = e.slice(r), r = s) : (o = e.slice(r, i + 1), r = i + 1), o.length && o !== "\n" && (a += n), a += o;
|
|
1987
2002
|
return a;
|
|
1988
2003
|
}
|
|
1989
2004
|
function jr(e, t) {
|
|
1990
|
-
return "\n" +
|
|
2005
|
+
return "\n" + P.repeat(" ", e.indent * t);
|
|
1991
2006
|
}
|
|
1992
2007
|
function Mr(e, t) {
|
|
1993
2008
|
var n, r, i;
|
|
@@ -1995,20 +2010,20 @@ function Mr(e, t) {
|
|
|
1995
2010
|
return !1;
|
|
1996
2011
|
}
|
|
1997
2012
|
function Nr(e) {
|
|
1998
|
-
return e === nr || e ===
|
|
2013
|
+
return e === nr || e === $n;
|
|
1999
2014
|
}
|
|
2000
2015
|
function Pr(e) {
|
|
2001
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2016
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Qn || 65536 <= e && e <= 1114111;
|
|
2002
2017
|
}
|
|
2003
2018
|
function Fr(e) {
|
|
2004
|
-
return Pr(e) && e !==
|
|
2019
|
+
return Pr(e) && e !== Qn && e !== tr && e !== er;
|
|
2005
2020
|
}
|
|
2006
2021
|
function Ir(e, t, n) {
|
|
2007
2022
|
var r = Fr(e), i = r && !Nr(e);
|
|
2008
2023
|
return (n ? r : r && e !== ur && e !== _r && e !== vr && e !== br && e !== Sr) && e !== ar && !(t === fr && !i) || Fr(t) && !Nr(t) && e === ar || t === fr && i;
|
|
2009
2024
|
}
|
|
2010
2025
|
function Lr(e) {
|
|
2011
|
-
return Pr(e) && e !==
|
|
2026
|
+
return Pr(e) && e !== Qn && !Nr(e) && e !== dr && e !== hr && e !== fr && e !== ur && e !== _r && e !== vr && e !== br && e !== Sr && e !== ar && e !== sr && e !== lr && e !== rr && e !== xr && e !== pr && e !== mr && e !== cr && e !== ir && e !== or && e !== gr && e !== yr;
|
|
2012
2027
|
}
|
|
2013
2028
|
function Rr(e) {
|
|
2014
2029
|
return !Nr(e) && e !== fr;
|
|
@@ -2029,7 +2044,7 @@ function Gr(e, t, n, r, i, a, o, s) {
|
|
|
2029
2044
|
}
|
|
2030
2045
|
else {
|
|
2031
2046
|
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
2032
|
-
if (l = zr(e, c), l ===
|
|
2047
|
+
if (l = zr(e, c), l === er) d = !0, p && (f ||= c - m - 1 > r && e[m + 1] !== " ", m = c);
|
|
2033
2048
|
else if (!Pr(l)) return X;
|
|
2034
2049
|
h &&= Ir(l, u, s), u = l;
|
|
2035
2050
|
}
|
|
@@ -2051,7 +2066,7 @@ function Kr(e, t, n, r, i) {
|
|
|
2051
2066
|
case Ur: return "|" + qr(t, e.indent) + Jr(Ar(t, a));
|
|
2052
2067
|
case Wr: return ">" + qr(t, e.indent) + Jr(Ar(Yr(t, o), a));
|
|
2053
2068
|
case X: return "\"" + Zr(t) + "\"";
|
|
2054
|
-
default: throw new
|
|
2069
|
+
default: throw new I("impossible error: invalid scalar style");
|
|
2055
2070
|
}
|
|
2056
2071
|
}();
|
|
2057
2072
|
}
|
|
@@ -2088,7 +2103,7 @@ function Qr(e, t, n) {
|
|
|
2088
2103
|
}
|
|
2089
2104
|
function $r(e, t, n, r) {
|
|
2090
2105
|
var i = "", a = e.tag, o, s, c;
|
|
2091
|
-
for (o = 0, s = n.length; o < s; o += 1) c = n[o], e.replacer && (c = e.replacer.call(n, String(o), c)), (Z(e, t + 1, c, !0, !0, !1, !0) || c === void 0 && Z(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += jr(e, t)), e.dump &&
|
|
2106
|
+
for (o = 0, s = n.length; o < s; o += 1) c = n[o], e.replacer && (c = e.replacer.call(n, String(o), c)), (Z(e, t + 1, c, !0, !0, !1, !0) || c === void 0 && Z(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += jr(e, t)), e.dump && er === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2092
2107
|
e.tag = a, e.dump = i || "[]";
|
|
2093
2108
|
}
|
|
2094
2109
|
function ei(e, t, n) {
|
|
@@ -2100,17 +2115,17 @@ function ti(e, t, n, r) {
|
|
|
2100
2115
|
var i = "", a = e.tag, o = Object.keys(n), s, c, l, u, d, f;
|
|
2101
2116
|
if (e.sortKeys === !0) o.sort();
|
|
2102
2117
|
else if (typeof e.sortKeys == "function") o.sort(e.sortKeys);
|
|
2103
|
-
else if (e.sortKeys) throw new
|
|
2104
|
-
for (s = 0, c = o.length; s < c; s += 1) f = "", (!r || i !== "") && (f += jr(e, t)), l = o[s], u = n[l], e.replacer && (u = e.replacer.call(n, l, u)), Z(e, t + 1, l, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump &&
|
|
2118
|
+
else if (e.sortKeys) throw new I("sortKeys must be a boolean or a function");
|
|
2119
|
+
for (s = 0, c = o.length; s < c; s += 1) f = "", (!r || i !== "") && (f += jr(e, t)), l = o[s], u = n[l], e.replacer && (u = e.replacer.call(n, l, u)), Z(e, t + 1, l, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump && er === e.dump.charCodeAt(0) ? f += "?" : f += "? "), f += e.dump, d && (f += jr(e, t)), Z(e, t + 1, u, !0, d) && (e.dump && er === e.dump.charCodeAt(0) ? f += ":" : f += ": ", f += e.dump, i += f));
|
|
2105
2120
|
e.tag = a, e.dump = i || "{}";
|
|
2106
2121
|
}
|
|
2107
2122
|
function ni(e, t, n) {
|
|
2108
2123
|
var r, i = n ? e.explicitTypes : e.implicitTypes, a, o, s, c;
|
|
2109
2124
|
for (a = 0, o = i.length; a < o; a += 1) if (s = i[a], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof t == "object" && t instanceof s.instanceOf) && (!s.predicate || s.predicate(t))) {
|
|
2110
2125
|
if (n ? s.multi && s.representName ? e.tag = s.representName(t) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2111
|
-
if (c = e.styleMap[s.tag] || s.defaultStyle,
|
|
2112
|
-
else if (
|
|
2113
|
-
else throw new
|
|
2126
|
+
if (c = e.styleMap[s.tag] || s.defaultStyle, Xn.call(s.represent) === "[object Function]") r = s.represent(t, c);
|
|
2127
|
+
else if (Zn.call(s.represent, c)) r = s.represent[c](t, c);
|
|
2128
|
+
else throw new I("!<" + s.tag + "> tag resolver accepts not \"" + c + "\" style");
|
|
2114
2129
|
e.dump = r;
|
|
2115
2130
|
}
|
|
2116
2131
|
return !0;
|
|
@@ -2119,7 +2134,7 @@ function ni(e, t, n) {
|
|
|
2119
2134
|
}
|
|
2120
2135
|
function Z(e, t, n, r, i, a, o) {
|
|
2121
2136
|
e.tag = null, e.dump = n, ni(e, n, !1) || ni(e, n, !0);
|
|
2122
|
-
var s =
|
|
2137
|
+
var s = Xn.call(e.dump), c = r, l;
|
|
2123
2138
|
r &&= e.flowLevel < 0 || e.flowLevel > t;
|
|
2124
2139
|
var u = s === "[object Object]" || s === "[object Array]", d, f;
|
|
2125
2140
|
if (u && (d = e.duplicates.indexOf(n), f = d !== -1), (e.tag !== null && e.tag !== "?" || f || e.indent !== 2 && t > 0) && (i = !1), f && e.usedDuplicates[d]) e.dump = "*ref_" + d;
|
|
@@ -2130,7 +2145,7 @@ function Z(e, t, n, r, i, a, o) {
|
|
|
2130
2145
|
else if (s === "[object Undefined]") return !1;
|
|
2131
2146
|
else {
|
|
2132
2147
|
if (e.skipInvalid) return !1;
|
|
2133
|
-
throw new
|
|
2148
|
+
throw new I("unacceptable kind of an object to dump " + s);
|
|
2134
2149
|
}
|
|
2135
2150
|
e.tag !== null && e.tag !== "?" && (l = encodeURI(e.tag[0] === "!" ? e.tag.slice(1) : e.tag).replace(/!/g, "%21"), l = e.tag[0] === "!" ? "!" + l : l.slice(0, 18) === "tag:yaml.org,2002:" ? "!!" + l.slice(18) : "!<" + l + ">", e.dump = l + " " + e.dump);
|
|
2136
2151
|
}
|
|
@@ -2161,30 +2176,30 @@ function si(e, t) {
|
|
|
2161
2176
|
};
|
|
2162
2177
|
}
|
|
2163
2178
|
var ci = {
|
|
2164
|
-
Type:
|
|
2165
|
-
Schema:
|
|
2166
|
-
FAILSAFE_SCHEMA:
|
|
2167
|
-
JSON_SCHEMA:
|
|
2168
|
-
CORE_SCHEMA:
|
|
2169
|
-
DEFAULT_SCHEMA:
|
|
2170
|
-
load:
|
|
2171
|
-
loadAll:
|
|
2179
|
+
Type: L,
|
|
2180
|
+
Schema: nt,
|
|
2181
|
+
FAILSAFE_SCHEMA: ot,
|
|
2182
|
+
JSON_SCHEMA: kt,
|
|
2183
|
+
CORE_SCHEMA: At,
|
|
2184
|
+
DEFAULT_SCHEMA: an,
|
|
2185
|
+
load: Yn.load,
|
|
2186
|
+
loadAll: Yn.loadAll,
|
|
2172
2187
|
dump: oi.dump,
|
|
2173
|
-
YAMLException:
|
|
2188
|
+
YAMLException: I,
|
|
2174
2189
|
types: {
|
|
2175
|
-
binary:
|
|
2176
|
-
float:
|
|
2177
|
-
map:
|
|
2178
|
-
null:
|
|
2179
|
-
pairs:
|
|
2180
|
-
set:
|
|
2181
|
-
timestamp:
|
|
2182
|
-
bool:
|
|
2183
|
-
int:
|
|
2184
|
-
merge:
|
|
2185
|
-
omap:
|
|
2186
|
-
seq:
|
|
2187
|
-
str:
|
|
2190
|
+
binary: Wt,
|
|
2191
|
+
float: Ot,
|
|
2192
|
+
map: at,
|
|
2193
|
+
null: ut,
|
|
2194
|
+
pairs: $t,
|
|
2195
|
+
set: rn,
|
|
2196
|
+
timestamp: It,
|
|
2197
|
+
bool: mt,
|
|
2198
|
+
int: xt,
|
|
2199
|
+
merge: Rt,
|
|
2200
|
+
omap: Yt,
|
|
2201
|
+
seq: it,
|
|
2202
|
+
str: rt
|
|
2188
2203
|
},
|
|
2189
2204
|
safeLoad: si("safeLoad", "load"),
|
|
2190
2205
|
safeLoadAll: si("safeLoadAll", "loadAll"),
|
|
@@ -2517,7 +2532,7 @@ function zi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2517
2532
|
r,
|
|
2518
2533
|
m,
|
|
2519
2534
|
t
|
|
2520
|
-
]),
|
|
2535
|
+
]), C = f((e, n, a) => {
|
|
2521
2536
|
let o = r.map((t) => {
|
|
2522
2537
|
if (t.id !== e || !t.arrayValues) return t;
|
|
2523
2538
|
let r = [...t.arrayValues];
|
|
@@ -2541,7 +2556,7 @@ function zi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2541
2556
|
r,
|
|
2542
2557
|
m,
|
|
2543
2558
|
t
|
|
2544
|
-
]),
|
|
2559
|
+
]), ee = f((e, n) => {
|
|
2545
2560
|
let a = r.map((t) => {
|
|
2546
2561
|
if (t.id !== e) return t;
|
|
2547
2562
|
let r = [...t.arrayValues || [], n], i = `[${r.join(", ")}]`, a = `${" ".repeat(t.indent)}${t.isArrayItem ? "- " : ""}${t.key}: ${i}`;
|
|
@@ -2564,7 +2579,7 @@ function zi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2564
2579
|
r,
|
|
2565
2580
|
m,
|
|
2566
2581
|
t
|
|
2567
|
-
]),
|
|
2582
|
+
]), w = f((e, n) => {
|
|
2568
2583
|
let a = r.map((t) => {
|
|
2569
2584
|
if (t.id !== e || !t.arrayValues) return t;
|
|
2570
2585
|
let r = t.arrayValues.filter((e, t) => t !== n), i = r.length > 0 ? `[${r.join(", ")}]` : "", a = `${" ".repeat(t.indent)}${t.isArrayItem ? "- " : ""}${t.key}: ${i}`;
|
|
@@ -2587,7 +2602,7 @@ function zi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2587
2602
|
r,
|
|
2588
2603
|
m,
|
|
2589
2604
|
t
|
|
2590
|
-
]),
|
|
2605
|
+
]), te = f((e) => {
|
|
2591
2606
|
let n = r.filter((t) => t.id !== e).map((e, t) => ({
|
|
2592
2607
|
...e,
|
|
2593
2608
|
lineNumber: t,
|
|
@@ -2604,7 +2619,7 @@ function zi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2604
2619
|
r,
|
|
2605
2620
|
m,
|
|
2606
2621
|
t
|
|
2607
|
-
]),
|
|
2622
|
+
]), T = g(() => {
|
|
2608
2623
|
let e = {};
|
|
2609
2624
|
for (let t of r) t.key && (e[t.indent] = Math.min(Math.max(e[t.indent] || 0, t.key.length), 12));
|
|
2610
2625
|
return e;
|
|
@@ -2617,7 +2632,7 @@ function zi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2617
2632
|
className: "flex flex-col gap-0.5",
|
|
2618
2633
|
children: r.map((e) => /* @__PURE__ */ b(Bi, {
|
|
2619
2634
|
line: e,
|
|
2620
|
-
keyWidth:
|
|
2635
|
+
keyWidth: T[e.indent] || 8,
|
|
2621
2636
|
isEditing: a === e.id,
|
|
2622
2637
|
editingPart: a === e.id ? s : null,
|
|
2623
2638
|
editingArrayIndex: a === e.id ? l : null,
|
|
@@ -2628,10 +2643,10 @@ function zi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2628
2643
|
o(null), c(null), u(null);
|
|
2629
2644
|
},
|
|
2630
2645
|
onChange: (t, n) => S(e.id, t, n),
|
|
2631
|
-
onArrayItemChange: (t, n) =>
|
|
2632
|
-
onArrayItemAdd: (t) =>
|
|
2633
|
-
onArrayItemRemove: (t) =>
|
|
2634
|
-
onDelete: () =>
|
|
2646
|
+
onArrayItemChange: (t, n) => C(e.id, t, n),
|
|
2647
|
+
onArrayItemAdd: (t) => ee(e.id, t),
|
|
2648
|
+
onArrayItemRemove: (t) => w(e.id, t),
|
|
2649
|
+
onDelete: () => te(e.id)
|
|
2635
2650
|
}, e.id))
|
|
2636
2651
|
}), /* @__PURE__ */ x("div", {
|
|
2637
2652
|
className: "mt-4 p-2 bg-black/40 rounded border border-white/5 flex flex-wrap gap-4 text-[12px] text-white/50 font-mono",
|
|
@@ -2661,27 +2676,27 @@ function zi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2661
2676
|
});
|
|
2662
2677
|
}
|
|
2663
2678
|
function Bi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIndex: i, onStartEdit: a, onEndEdit: o, onChange: s, onArrayItemChange: c, onArrayItemAdd: l, onArrayItemRemove: u, onDelete: d }) {
|
|
2664
|
-
let [f, p] = v(0), [h, y] = v(""), [
|
|
2679
|
+
let [f, p] = v(0), [h, y] = v(""), [C, ee] = v(""), [w, te] = v({
|
|
2665
2680
|
isEditing: n,
|
|
2666
2681
|
editingPart: r,
|
|
2667
2682
|
editingArrayIndex: i,
|
|
2668
2683
|
lineRaw: e.raw
|
|
2669
2684
|
});
|
|
2670
|
-
(n !==
|
|
2685
|
+
(n !== w.isEditing || r !== w.editingPart || i !== w.editingArrayIndex || e.raw !== w.lineRaw) && (te({
|
|
2671
2686
|
isEditing: n,
|
|
2672
2687
|
editingPart: r,
|
|
2673
2688
|
editingArrayIndex: i,
|
|
2674
2689
|
lineRaw: e.raw
|
|
2675
2690
|
}), n && y(r === "key" ? e.key || "" : r === "value" ? (e.value || "").replace(/^~|~$/g, "") : r === "arrayItem" && i !== null && e.arrayValues?.[i] || ""));
|
|
2676
|
-
let
|
|
2691
|
+
let T = g(() => !n || !r ? "" : r === "value" && e.key ? `${e.key}: ${h}` : r === "key" ? h : e.raw, [
|
|
2677
2692
|
n,
|
|
2678
2693
|
r,
|
|
2679
2694
|
h,
|
|
2680
2695
|
e.raw,
|
|
2681
2696
|
e.key
|
|
2682
|
-
]),
|
|
2683
|
-
|
|
2684
|
-
let
|
|
2697
|
+
]), E = g(() => T ? Mi.getCompletions(T).slice(0, 10) : [], [T]);
|
|
2698
|
+
T !== C && (ee(T), p(0));
|
|
2699
|
+
let D = _(null), O = _(null), k = Ri(O, n && E.length > 0), A = () => {
|
|
2685
2700
|
switch (e.validationState) {
|
|
2686
2701
|
case "required-incomplete": return $.red;
|
|
2687
2702
|
case "optional-incomplete": return $.blue;
|
|
@@ -2690,7 +2705,7 @@ function Bi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2690
2705
|
case "metadata": return $.purple;
|
|
2691
2706
|
default: return "#888";
|
|
2692
2707
|
}
|
|
2693
|
-
},
|
|
2708
|
+
}, ne = () => {
|
|
2694
2709
|
switch (e.validationState) {
|
|
2695
2710
|
case "required-incomplete": return $.red;
|
|
2696
2711
|
case "optional-incomplete": return $.blue;
|
|
@@ -2701,14 +2716,14 @@ function Bi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2701
2716
|
}
|
|
2702
2717
|
};
|
|
2703
2718
|
m(() => {
|
|
2704
|
-
n &&
|
|
2719
|
+
n && D.current && D.current.focus();
|
|
2705
2720
|
}, [n]);
|
|
2706
2721
|
let re = (t) => {
|
|
2707
2722
|
if (t.key === "Enter") {
|
|
2708
2723
|
t.preventDefault();
|
|
2709
|
-
let n =
|
|
2724
|
+
let n = E.length > 0 && f >= 0 ? E[f].text : h;
|
|
2710
2725
|
r === "key" ? s("key", n) : r === "value" ? s("value", n) : r === "arrayItem" && (i >= (e.arrayValues?.length || 0) ? l(n) : c(i, n)), o();
|
|
2711
|
-
} else t.key === "ArrowDown" ? (t.preventDefault(), p(Math.min(f + 1,
|
|
2726
|
+
} else t.key === "ArrowDown" ? (t.preventDefault(), p(Math.min(f + 1, E.length - 1))) : t.key === "ArrowUp" ? (t.preventDefault(), p(Math.max(f - 1, 0))) : t.key === "Escape" ? o() : t.key === "Backspace" && h === "" && r === "arrayItem" && (u(i), o());
|
|
2712
2727
|
};
|
|
2713
2728
|
if (e.isComment) return /* @__PURE__ */ b("div", {
|
|
2714
2729
|
className: "pl-8 text-stone-400 italic text-xs py-0.5",
|
|
@@ -2720,10 +2735,10 @@ function Bi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2720
2735
|
style: { "--jaml-color": e.key === "must" ? $.red : $.blue },
|
|
2721
2736
|
children: e.raw
|
|
2722
2737
|
});
|
|
2723
|
-
let j = " ".repeat(e.indent),
|
|
2724
|
-
"--popover-top": `${
|
|
2725
|
-
"--popover-left": `${
|
|
2726
|
-
"--popover-transform":
|
|
2738
|
+
let j = " ".repeat(e.indent), M = e.isArrayItem ? "- " : "", ie = k ? {
|
|
2739
|
+
"--popover-top": `${k.top}px`,
|
|
2740
|
+
"--popover-left": `${k.left}px`,
|
|
2741
|
+
"--popover-transform": k.position === "top" ? "translateY(-100%)" : "none"
|
|
2727
2742
|
} : {};
|
|
2728
2743
|
return /* @__PURE__ */ x("div", {
|
|
2729
2744
|
className: "relative flex items-center py-0.5 group",
|
|
@@ -2740,36 +2755,36 @@ function Bi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2740
2755
|
}),
|
|
2741
2756
|
/* @__PURE__ */ x("span", {
|
|
2742
2757
|
className: "whitespace-pre text-stone-400",
|
|
2743
|
-
children: [j,
|
|
2758
|
+
children: [j, M]
|
|
2744
2759
|
}),
|
|
2745
2760
|
e.key && /* @__PURE__ */ x("div", {
|
|
2746
2761
|
className: "relative",
|
|
2747
2762
|
children: [/* @__PURE__ */ b("div", {
|
|
2748
|
-
ref: r === "key" ?
|
|
2763
|
+
ref: r === "key" ? O : null,
|
|
2749
2764
|
onClick: (e) => {
|
|
2750
2765
|
e.stopPropagation(), a("key");
|
|
2751
2766
|
},
|
|
2752
2767
|
className: "jaml-block jaml-block--start",
|
|
2753
2768
|
style: {
|
|
2754
2769
|
"--jaml-min-w": `${t}ch`,
|
|
2755
|
-
"--jaml-color": n && r === "key" ?
|
|
2756
|
-
"--jaml-bg": n && r === "key" ? `${
|
|
2770
|
+
"--jaml-color": n && r === "key" ? ne() : A(),
|
|
2771
|
+
"--jaml-bg": n && r === "key" ? `${ne()}15` : "transparent"
|
|
2757
2772
|
},
|
|
2758
2773
|
children: n && r === "key" ? /* @__PURE__ */ b("input", {
|
|
2759
|
-
ref:
|
|
2774
|
+
ref: D,
|
|
2760
2775
|
title: "Edit key",
|
|
2761
2776
|
value: h,
|
|
2762
2777
|
onChange: (e) => y(e.target.value),
|
|
2763
2778
|
onKeyDown: re,
|
|
2764
2779
|
onBlur: () => setTimeout(o, 200),
|
|
2765
2780
|
className: "jaml-inline-input",
|
|
2766
|
-
style: { "--jaml-color":
|
|
2781
|
+
style: { "--jaml-color": ne() }
|
|
2767
2782
|
}) : e.key
|
|
2768
|
-
}), n && r === "key" &&
|
|
2783
|
+
}), n && r === "key" && E.length > 0 && k && S(/* @__PURE__ */ b("div", {
|
|
2769
2784
|
className: "jaml-suggestion-popover",
|
|
2770
|
-
style:
|
|
2785
|
+
style: ie,
|
|
2771
2786
|
children: /* @__PURE__ */ b(Ii, {
|
|
2772
|
-
suggestions:
|
|
2787
|
+
suggestions: E,
|
|
2773
2788
|
selectedIndex: f,
|
|
2774
2789
|
onHover: p,
|
|
2775
2790
|
onSelect: (e) => {
|
|
@@ -2788,7 +2803,7 @@ function Bi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2788
2803
|
let n = e.arrayValues.indexOf(t);
|
|
2789
2804
|
n >= 0 ? u(n) : l(t);
|
|
2790
2805
|
},
|
|
2791
|
-
color:
|
|
2806
|
+
color: ne()
|
|
2792
2807
|
}) : /* @__PURE__ */ x("div", {
|
|
2793
2808
|
className: "flex gap-0.5 items-center",
|
|
2794
2809
|
children: [e.arrayValues.map((e, t) => /* @__PURE__ */ b("div", {
|
|
@@ -2798,12 +2813,12 @@ function Bi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2798
2813
|
className: "jaml-block",
|
|
2799
2814
|
style: {
|
|
2800
2815
|
"--jaml-min-w": "24px",
|
|
2801
|
-
"--jaml-bg": `${
|
|
2802
|
-
"--jaml-border": `1px solid ${
|
|
2803
|
-
"--jaml-color":
|
|
2816
|
+
"--jaml-bg": `${A()}15`,
|
|
2817
|
+
"--jaml-border": `1px solid ${A()}40`,
|
|
2818
|
+
"--jaml-color": A()
|
|
2804
2819
|
},
|
|
2805
2820
|
children: n && r === "arrayItem" && i === t ? /* @__PURE__ */ b("input", {
|
|
2806
|
-
ref:
|
|
2821
|
+
ref: D,
|
|
2807
2822
|
title: "Edit array item",
|
|
2808
2823
|
value: h,
|
|
2809
2824
|
onChange: (e) => y(e.target.value),
|
|
@@ -2827,20 +2842,20 @@ function Bi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2827
2842
|
}) : /* @__PURE__ */ x("div", {
|
|
2828
2843
|
className: "relative",
|
|
2829
2844
|
children: [/* @__PURE__ */ b("div", {
|
|
2830
|
-
ref: r === "value" ?
|
|
2845
|
+
ref: r === "value" ? O : null,
|
|
2831
2846
|
onClick: (e) => {
|
|
2832
2847
|
e.stopPropagation(), a("value");
|
|
2833
2848
|
},
|
|
2834
2849
|
className: "jaml-block",
|
|
2835
2850
|
style: {
|
|
2836
2851
|
"--jaml-min-w": e.value ? void 0 : "60px",
|
|
2837
|
-
"--jaml-color": e.isInvalidValue ? $.red : e.value ?
|
|
2838
|
-
"--jaml-bg": e.isInvalidValue ? `${$.red}15` : e.value ? `${
|
|
2839
|
-
"--jaml-border": `1px solid ${e.isInvalidValue ? `${$.red}60` : e.value ? `${
|
|
2852
|
+
"--jaml-color": e.isInvalidValue ? $.red : e.value ? A() : $.red,
|
|
2853
|
+
"--jaml-bg": e.isInvalidValue ? `${$.red}15` : e.value ? `${A()}10` : `${$.red}08`,
|
|
2854
|
+
"--jaml-border": `1px solid ${e.isInvalidValue ? `${$.red}60` : e.value ? `${A()}40` : `${$.red}40`}`,
|
|
2840
2855
|
"--jaml-text-decoration": e.isInvalidValue ? "line-through" : "none"
|
|
2841
2856
|
},
|
|
2842
2857
|
children: n && r === "value" ? /* @__PURE__ */ b("input", {
|
|
2843
|
-
ref:
|
|
2858
|
+
ref: D,
|
|
2844
2859
|
title: "Edit value",
|
|
2845
2860
|
value: h,
|
|
2846
2861
|
onChange: (e) => y(e.target.value),
|
|
@@ -2848,15 +2863,15 @@ function Bi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2848
2863
|
onBlur: () => setTimeout(o, 200),
|
|
2849
2864
|
className: "jaml-inline-input jaml-inline-input--sized",
|
|
2850
2865
|
style: {
|
|
2851
|
-
"--jaml-color":
|
|
2866
|
+
"--jaml-color": A(),
|
|
2852
2867
|
"--jaml-input-w": `${Math.max(h.length, 4)}ch`
|
|
2853
2868
|
}
|
|
2854
2869
|
}) : e.isInvalidValue ? e.value?.replace(/~/g, "") : e.value || "???"
|
|
2855
|
-
}), n && r === "value" &&
|
|
2870
|
+
}), n && r === "value" && E.length > 0 && k && S(/* @__PURE__ */ b("div", {
|
|
2856
2871
|
className: "jaml-suggestion-popover",
|
|
2857
|
-
style:
|
|
2872
|
+
style: ie,
|
|
2858
2873
|
children: /* @__PURE__ */ b(Ii, {
|
|
2859
|
-
suggestions:
|
|
2874
|
+
suggestions: E,
|
|
2860
2875
|
selectedIndex: f,
|
|
2861
2876
|
onHover: p,
|
|
2862
2877
|
onSelect: (e) => {
|
|
@@ -2930,7 +2945,7 @@ function Wi({ open: e, title: t, message: n, placeholder: r, initialValue: i = "
|
|
|
2930
2945
|
}
|
|
2931
2946
|
c(u);
|
|
2932
2947
|
}
|
|
2933
|
-
return /* @__PURE__ */ x(
|
|
2948
|
+
return /* @__PURE__ */ x(oe, {
|
|
2934
2949
|
onClose: l,
|
|
2935
2950
|
open: e,
|
|
2936
2951
|
title: t,
|
|
@@ -2962,12 +2977,12 @@ function Wi({ open: e, title: t, message: n, placeholder: r, initialValue: i = "
|
|
|
2962
2977
|
}),
|
|
2963
2978
|
/* @__PURE__ */ x("div", {
|
|
2964
2979
|
className: "j-input-modal__actions",
|
|
2965
|
-
children: [/* @__PURE__ */ b(
|
|
2980
|
+
children: [/* @__PURE__ */ b(N, {
|
|
2966
2981
|
onClick: l,
|
|
2967
2982
|
size: "sm",
|
|
2968
2983
|
tone: "red",
|
|
2969
2984
|
children: o
|
|
2970
|
-
}), /* @__PURE__ */ b(
|
|
2985
|
+
}), /* @__PURE__ */ b(N, {
|
|
2971
2986
|
onClick: S,
|
|
2972
2987
|
size: "sm",
|
|
2973
2988
|
tone: "blue",
|
|
@@ -2993,7 +3008,7 @@ function Gi({ label: e, title: t, description: n, media: r, meta: i, className:
|
|
|
2993
3008
|
}) : null, /* @__PURE__ */ x("div", {
|
|
2994
3009
|
className: "j-panel-spinner__row",
|
|
2995
3010
|
children: [
|
|
2996
|
-
/* @__PURE__ */ b(
|
|
3011
|
+
/* @__PURE__ */ b(N, {
|
|
2997
3012
|
tone: "red",
|
|
2998
3013
|
size: "lg",
|
|
2999
3014
|
className: "j-panel-spinner__arrow j-panel-spinner__arrow--left",
|
|
@@ -3031,7 +3046,7 @@ function Gi({ label: e, title: t, description: n, media: r, meta: i, className:
|
|
|
3031
3046
|
}) : null
|
|
3032
3047
|
]
|
|
3033
3048
|
}),
|
|
3034
|
-
/* @__PURE__ */ b(
|
|
3049
|
+
/* @__PURE__ */ b(N, {
|
|
3035
3050
|
tone: "red",
|
|
3036
3051
|
size: "lg",
|
|
3037
3052
|
className: "j-panel-spinner__arrow j-panel-spinner__arrow--right",
|
|
@@ -3087,8 +3102,120 @@ function qi({ value: e, options: t, onChange: n, placeholder: r, disabled: i = !
|
|
|
3087
3102
|
});
|
|
3088
3103
|
}
|
|
3089
3104
|
//#endregion
|
|
3105
|
+
//#region src/ui/JimboStepper.tsx
|
|
3106
|
+
function Ji({ value: e, label: t, onPrev: n, onNext: r, canPrev: i = !0, canNext: a = !0, className: o = "" }) {
|
|
3107
|
+
return /* @__PURE__ */ x("div", {
|
|
3108
|
+
className: `j-stepper-wrap ${o}`,
|
|
3109
|
+
children: [t && /* @__PURE__ */ b("div", {
|
|
3110
|
+
className: "j-stepper__label",
|
|
3111
|
+
children: /* @__PURE__ */ b(j, {
|
|
3112
|
+
size: "sm",
|
|
3113
|
+
tone: "white",
|
|
3114
|
+
children: t
|
|
3115
|
+
})
|
|
3116
|
+
}), /* @__PURE__ */ x("div", {
|
|
3117
|
+
className: "j-stepper",
|
|
3118
|
+
children: [
|
|
3119
|
+
/* @__PURE__ */ b(N, {
|
|
3120
|
+
tone: "red",
|
|
3121
|
+
size: "sm",
|
|
3122
|
+
onClick: n,
|
|
3123
|
+
disabled: !i,
|
|
3124
|
+
"aria-label": `Previous ${t ?? "value"}`,
|
|
3125
|
+
children: "<"
|
|
3126
|
+
}),
|
|
3127
|
+
/* @__PURE__ */ b("div", {
|
|
3128
|
+
className: "j-stepper__value",
|
|
3129
|
+
children: /* @__PURE__ */ b(j, {
|
|
3130
|
+
size: "sm",
|
|
3131
|
+
tone: "white",
|
|
3132
|
+
children: e
|
|
3133
|
+
})
|
|
3134
|
+
}),
|
|
3135
|
+
/* @__PURE__ */ b(N, {
|
|
3136
|
+
tone: "red",
|
|
3137
|
+
size: "sm",
|
|
3138
|
+
onClick: r,
|
|
3139
|
+
disabled: !a,
|
|
3140
|
+
"aria-label": `Next ${t ?? "value"}`,
|
|
3141
|
+
children: ">"
|
|
3142
|
+
})
|
|
3143
|
+
]
|
|
3144
|
+
})]
|
|
3145
|
+
});
|
|
3146
|
+
}
|
|
3147
|
+
//#endregion
|
|
3148
|
+
//#region src/ui/JimboSlider.tsx
|
|
3149
|
+
function Yi({ value: e, min: t = 0, max: n = 100, step: r = 1, label: i, onChange: a, className: o = "", id: c }) {
|
|
3150
|
+
let l = n === t ? 0 : (e - t) / (n - t) * 100, u = s.useId(), d = c ?? u;
|
|
3151
|
+
return /* @__PURE__ */ x("div", {
|
|
3152
|
+
className: `j-slider-wrap ${o}`,
|
|
3153
|
+
children: [i && /* @__PURE__ */ b("label", {
|
|
3154
|
+
htmlFor: d,
|
|
3155
|
+
className: "j-slider__label",
|
|
3156
|
+
children: /* @__PURE__ */ b(j, {
|
|
3157
|
+
size: "sm",
|
|
3158
|
+
tone: "white",
|
|
3159
|
+
children: i
|
|
3160
|
+
})
|
|
3161
|
+
}), /* @__PURE__ */ x("div", {
|
|
3162
|
+
className: "j-slider",
|
|
3163
|
+
children: [
|
|
3164
|
+
/* @__PURE__ */ b("div", {
|
|
3165
|
+
className: "j-slider__track",
|
|
3166
|
+
"aria-hidden": !0,
|
|
3167
|
+
children: /* @__PURE__ */ b("div", {
|
|
3168
|
+
className: "j-slider__fill",
|
|
3169
|
+
style: { width: `${l}%` }
|
|
3170
|
+
})
|
|
3171
|
+
}),
|
|
3172
|
+
/* @__PURE__ */ b("input", {
|
|
3173
|
+
id: d,
|
|
3174
|
+
type: "range",
|
|
3175
|
+
className: "j-slider__input",
|
|
3176
|
+
min: t,
|
|
3177
|
+
max: n,
|
|
3178
|
+
step: r,
|
|
3179
|
+
value: e,
|
|
3180
|
+
onChange: (e) => a?.(Number(e.currentTarget.value))
|
|
3181
|
+
}),
|
|
3182
|
+
/* @__PURE__ */ b("div", {
|
|
3183
|
+
className: "j-slider__value",
|
|
3184
|
+
children: /* @__PURE__ */ b(j, {
|
|
3185
|
+
size: "xs",
|
|
3186
|
+
tone: "white",
|
|
3187
|
+
children: Math.round(e)
|
|
3188
|
+
})
|
|
3189
|
+
})
|
|
3190
|
+
]
|
|
3191
|
+
})]
|
|
3192
|
+
});
|
|
3193
|
+
}
|
|
3194
|
+
//#endregion
|
|
3195
|
+
//#region src/ui/JimboDualChip.tsx
|
|
3196
|
+
function Xi({ left: e, right: t, className: n = "" }) {
|
|
3197
|
+
return /* @__PURE__ */ x("div", {
|
|
3198
|
+
className: `j-dual-chip ${n}`,
|
|
3199
|
+
children: [/* @__PURE__ */ b("div", {
|
|
3200
|
+
className: `j-dual-chip__half j-dual-chip__half--left j-dual-chip__half--${e.tone}`,
|
|
3201
|
+
children: /* @__PURE__ */ b(j, {
|
|
3202
|
+
size: "md",
|
|
3203
|
+
tone: e.tone === "gold" ? "default" : "white",
|
|
3204
|
+
children: e.value
|
|
3205
|
+
})
|
|
3206
|
+
}), /* @__PURE__ */ b("div", {
|
|
3207
|
+
className: `j-dual-chip__half j-dual-chip__half--${t.tone}`,
|
|
3208
|
+
children: /* @__PURE__ */ b(j, {
|
|
3209
|
+
size: "md",
|
|
3210
|
+
tone: t.tone === "gold" ? "default" : "white",
|
|
3211
|
+
children: t.value
|
|
3212
|
+
})
|
|
3213
|
+
})]
|
|
3214
|
+
});
|
|
3215
|
+
}
|
|
3216
|
+
//#endregion
|
|
3090
3217
|
//#region src/ui/PanelSplitter.tsx
|
|
3091
|
-
function
|
|
3218
|
+
function Zi({ orientation: e = "vertical", onDrag: t, onKeyAdjust: n, className: r = "", "aria-label": i }) {
|
|
3092
3219
|
let a = _(!1), o = _(0), s = _(t);
|
|
3093
3220
|
h(() => {
|
|
3094
3221
|
s.current = t;
|
|
@@ -3122,6 +3249,6 @@ function Ji({ orientation: e = "vertical", onDrag: t, onKeyAdjust: n, className:
|
|
|
3122
3249
|
});
|
|
3123
3250
|
}
|
|
3124
3251
|
//#endregion
|
|
3125
|
-
export {
|
|
3252
|
+
export { he as A, M as B, Ee as C, be as D, Se as E, le as F, E as G, re as H, ae as I, D as K, N as L, de as M, ue as N, ye as O, se as P, ie as R, we as S, Ce as T, O as U, j as V, A as W, Me as _, qi as a, Ae as b, Ui as c, Le as d, Ie as f, Oe as g, Ne as h, Ji as i, me as j, ge as k, Hi as l, Pe as m, Xi as n, Gi as o, Fe as p, Yi as r, Wi as s, Zi as t, zi as u, ke as v, Te as w, De as x, je as y, oe as z };
|
|
3126
3253
|
|
|
3127
|
-
//# sourceMappingURL=ui-
|
|
3254
|
+
//# sourceMappingURL=ui-DRov81qO.js.map
|