jaml-ui 0.27.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -6
- package/dist/assets/{searchPoolWorker-CejAnH4a.js → searchPoolWorker-BtlROziN.js} +9 -4
- package/dist/assets/searchPoolWorker-BtlROziN.js.map +1 -0
- package/dist/chunks/Layer-BBPJFHfs.js.map +1 -1
- package/dist/chunks/assets-RWUiFSTc.js.map +1 -1
- package/dist/chunks/motelyItemDecoder-BvFrQpaI.js +2061 -0
- package/dist/chunks/motelyItemDecoder-BvFrQpaI.js.map +1 -0
- package/dist/chunks/{searchPoolWorker-CTtPOuxF.js → searchPoolWorker-D1xR43D2.js} +2 -2
- package/dist/chunks/searchPoolWorker-D1xR43D2.js.map +1 -0
- package/dist/chunks/spriteMapper-CFjN0_TV.js.map +1 -1
- package/dist/chunks/tokens-B65Fzble.js.map +1 -1
- package/dist/chunks/ui-BEtq_JNg.js +3229 -0
- package/dist/chunks/ui-BEtq_JNg.js.map +1 -0
- package/dist/components/JamlAestheticSelector.d.ts +2 -3
- package/dist/components/JamlIdeToolbar.d.ts +3 -1
- package/dist/components/JamlSeedInput.d.ts +14 -4
- package/dist/components/JamlSeedSpinner.d.ts +7 -0
- package/dist/components/Jamlyzer.d.ts +5 -1
- package/dist/components/RunConfigModal.d.ts +1 -1
- package/dist/components/jamlSeedUtils.d.ts +1 -0
- package/dist/config.d.ts +5 -4
- package/dist/core.js.map +1 -1
- package/dist/decode/motelyItemFormats.d.ts +3124 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useMotelyRuntime.d.ts +1 -1
- package/dist/hooks/useSearch.d.ts +3 -3
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3297 -3259
- package/dist/index.js.map +1 -1
- package/dist/lib/hooks/useDragScroll.d.ts +1 -1
- package/dist/motely.d.ts +2 -2
- package/dist/motely.js +23 -22
- package/dist/motely.js.map +1 -1
- package/dist/r3f.js.map +1 -1
- package/dist/ui/JimboPanelSpinner.d.ts +15 -0
- package/dist/ui/footer.d.ts +7 -1
- package/dist/ui/hooks.d.ts +2 -2
- package/dist/ui/jimbo.css +1 -1
- package/dist/ui.d.ts +2 -0
- package/dist/ui.js +3 -3
- package/jaml.schema.json +1219 -1165
- package/package.json +20 -22
- package/DESIGN.md +0 -236
- package/dist/assets/searchPoolWorker-CejAnH4a.js.map +0 -1
- package/dist/chunks/motelyItemDecoder-CRhfNIGU.js +0 -219
- package/dist/chunks/motelyItemDecoder-CRhfNIGU.js.map +0 -1
- package/dist/chunks/searchPoolWorker-CTtPOuxF.js.map +0 -1
- package/dist/chunks/ui-BBUfR6RM.js +0 -1386
- package/dist/chunks/ui-BBUfR6RM.js.map +0 -1
- package/dist/motelyBoot.d.ts +0 -15
- package/dist/ui/ide/DeckSprite.d.ts +0 -1
- package/dist/ui/ide/RegexTool.d.ts +0 -3
|
@@ -0,0 +1,3229 @@
|
|
|
1
|
+
import { n as e } from "./assets-RWUiFSTc.js";
|
|
2
|
+
import { n as t, t as n } from "./tokens-B65Fzble.js";
|
|
3
|
+
import { n as r, p as i, r as a, t as o } from "./spriteMapper-CFjN0_TV.js";
|
|
4
|
+
import s, { createContext as c, createElement as l, forwardRef as u, memo as d, useCallback as f, useContext as p, useEffect as m, useLayoutEffect as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
5
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as S } from "react-dom";
|
|
7
|
+
//#region src/ui/hooks.ts
|
|
8
|
+
function ee(e) {
|
|
9
|
+
return new Promise((t) => {
|
|
10
|
+
let n = new window.Image();
|
|
11
|
+
n.addEventListener("load", () => t(n)), n.addEventListener("error", () => t(null)), n.src = e;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function te(e, t, n, r, i) {
|
|
15
|
+
if (!n || !r || !r?.pos) return 0;
|
|
16
|
+
let a = n.width / r.columns, o = n.height / r.rows, s = e.style;
|
|
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) {
|
|
18
|
+
let e = i, n = Math.sin(e / 1e3) * 3, r = Math.sin(e / 1500) * 1.5;
|
|
19
|
+
t.globalAlpha = .65 + (Math.sin(e / 2e3) + 1) * .075, t.translate(r, n);
|
|
20
|
+
}
|
|
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
|
+
}
|
|
23
|
+
function C(e) {
|
|
24
|
+
let t = _(null);
|
|
25
|
+
return m(() => {
|
|
26
|
+
if (!e || !t.current) return;
|
|
27
|
+
let r, i = Date.now(), a = t.current, o = () => {
|
|
28
|
+
let e = (Date.now() - i) % n.SWAY_DURATION / n.SWAY_DURATION * Math.PI * 2;
|
|
29
|
+
a.style.transform = `translate(${Math.sin(e) * n.SWAY_AMOUNT * .3}px, ${Math.sin(e * .8) * n.SWAY_AMOUNT}px)`, r = requestAnimationFrame(o);
|
|
30
|
+
};
|
|
31
|
+
return r = requestAnimationFrame(o), () => {
|
|
32
|
+
cancelAnimationFrame(r), a && (a.style.transform = "");
|
|
33
|
+
};
|
|
34
|
+
}, [e]), t;
|
|
35
|
+
}
|
|
36
|
+
function ne() {
|
|
37
|
+
let e = _(null);
|
|
38
|
+
return m(() => {
|
|
39
|
+
let t = e.current;
|
|
40
|
+
if (!t) return;
|
|
41
|
+
let n = t.getContext("webgl");
|
|
42
|
+
if (!n) return;
|
|
43
|
+
let r = (e, t) => {
|
|
44
|
+
let r = n.createShader(e);
|
|
45
|
+
return r ? (n.shaderSource(r, t), n.compileShader(r), n.getShaderParameter(r, n.COMPILE_STATUS) ? r : (console.error("[JimboBackground] shader compile error:", n.getShaderInfoLog(r)), n.deleteShader(r), null)) : null;
|
|
46
|
+
}, i = r(n.VERTEX_SHADER, "\n attribute vec2 position;\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n }\n "), a = r(n.FRAGMENT_SHADER, "\n precision mediump float;\n\n uniform float u_time;\n uniform vec2 u_resolution;\n\n const float SPIN_ROTATION = -2.0;\n const float SPIN_SPEED = 4.5;\n const vec4 COLOUR_1 = vec4(1.0, 0.2, 0.2, 1.0);\n const vec4 COLOUR_2 = vec4(0.0, 0.5, 1.0, 1.0);\n const vec4 COLOUR_3 = vec4(0.05, 0.08, 0.1, 1.0);\n const float CONTRAST = 4.5;\n const float LIGTHING = 0.5;\n const float SPIN_AMOUNT = 0.35;\n const float PIXEL_FILTER = 740.0 * 0.33;\n const float PI = 3.14159265359;\n\n void main() {\n vec2 screenSize = u_resolution;\n float pixel_size = length(screenSize.xy) / PIXEL_FILTER;\n vec2 uv = (floor(gl_FragCoord.xy*(1.0/pixel_size))*pixel_size - 0.5*screenSize.xy)/length(screenSize.xy);\n float uv_len = length(uv);\n\n float speed = (SPIN_ROTATION * 0.2) + 302.2;\n float new_pixel_angle = atan(uv.y, uv.x) + speed - 20.0*(1.0*SPIN_AMOUNT*uv_len + (1.0 - 1.0*SPIN_AMOUNT));\n\n vec2 mid = (screenSize.xy/length(screenSize.xy))/2.0;\n uv = (vec2((uv_len * cos(new_pixel_angle) + mid.x), (uv_len * sin(new_pixel_angle) + mid.y)) - mid);\n\n uv *= 30.0;\n speed = u_time * SPIN_SPEED;\n vec2 uv2 = vec2(uv.x, uv.y);\n\n for(int i=0; i < 5; i++) {\n uv2 += sin(max(uv.x, uv.y)) + uv;\n uv += 0.5*vec2(cos(5.1123314 + 0.353*uv2.y + speed*0.131121), sin(uv2.x - 0.113*speed));\n uv -= 1.0*cos(uv.x + uv.y) - 1.0*sin(uv.x*0.711 - uv.y);\n }\n\n float contrast_mod = (0.25*CONTRAST + 0.5*SPIN_AMOUNT + 1.2);\n float paint_res = min(2.0, max(0.0, length(uv)*(0.035)*contrast_mod));\n float c1p = max(0.0, 1.0 - contrast_mod*abs(1.0 - paint_res));\n float c2p = max(0.0, 1.0 - contrast_mod*abs(paint_res));\n float c3p = 1.0 - min(1.0, c1p + c2p);\n float light = (LIGTHING - 0.2)*max(c1p*5.0 - 4.0, 0.0) + LIGTHING*max(c2p*5.0 - 4.0, 0.0);\n\n vec4 finalCol = (0.3/CONTRAST)*COLOUR_1 + (1.0 - 0.3/CONTRAST)*(COLOUR_1*c1p + COLOUR_2*c2p + vec4(c3p*COLOUR_3.rgb, c3p*COLOUR_1.a)) + light;\n\n gl_FragColor = finalCol;\n }\n ");
|
|
47
|
+
if (!i || !a) return;
|
|
48
|
+
let o = n.createProgram();
|
|
49
|
+
if (!o) return;
|
|
50
|
+
if (n.attachShader(o, i), n.attachShader(o, a), n.linkProgram(o), !n.getProgramParameter(o, n.LINK_STATUS)) {
|
|
51
|
+
console.error("[JimboBackground] program link error:", n.getProgramInfoLog(o));
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
n.useProgram(o);
|
|
55
|
+
let s = n.createBuffer();
|
|
56
|
+
n.bindBuffer(n.ARRAY_BUFFER, s), n.bufferData(n.ARRAY_BUFFER, new Float32Array([
|
|
57
|
+
-1,
|
|
58
|
+
-1,
|
|
59
|
+
1,
|
|
60
|
+
-1,
|
|
61
|
+
-1,
|
|
62
|
+
1,
|
|
63
|
+
-1,
|
|
64
|
+
1,
|
|
65
|
+
1,
|
|
66
|
+
-1,
|
|
67
|
+
1,
|
|
68
|
+
1
|
|
69
|
+
]), n.STATIC_DRAW);
|
|
70
|
+
let c = n.getAttribLocation(o, "position");
|
|
71
|
+
n.enableVertexAttribArray(c), n.vertexAttribPointer(c, 2, n.FLOAT, !1, 0, 0);
|
|
72
|
+
let l = n.getUniformLocation(o, "u_time"), u = n.getUniformLocation(o, "u_resolution"), d = Date.now(), f, p = () => {
|
|
73
|
+
let e = t.clientWidth, r = t.clientHeight;
|
|
74
|
+
(t.width !== e || t.height !== r) && (t.width = e, t.height = r, n.viewport(0, 0, n.drawingBufferWidth, n.drawingBufferHeight));
|
|
75
|
+
let i = (Date.now() - d) / 1e3;
|
|
76
|
+
n.uniform1f(l, i), n.uniform2f(u, t.width, t.height), n.drawArrays(n.TRIANGLES, 0, 6), f = requestAnimationFrame(p);
|
|
77
|
+
};
|
|
78
|
+
return p(), () => {
|
|
79
|
+
cancelAnimationFrame(f), n.deleteProgram(o), n.deleteShader(i), n.deleteShader(a), n.deleteBuffer(s);
|
|
80
|
+
};
|
|
81
|
+
}, []), e;
|
|
82
|
+
}
|
|
83
|
+
function w({ mode: e = "snap", placement: t = "auto", delay: n = 80, disabled: r = !1 }) {
|
|
84
|
+
let [i, a] = v(!1), [o, s] = v(null), c = _(null), l = _(null), u = _(null), d = f(() => {
|
|
85
|
+
r || (u.current && clearTimeout(u.current), u.current = setTimeout(() => a(!0), n));
|
|
86
|
+
}, [r, n]), p = f(() => {
|
|
87
|
+
u.current && clearTimeout(u.current), a(!1), s(null);
|
|
88
|
+
}, []), h = f(() => {
|
|
89
|
+
let e = c.current, n = l.current;
|
|
90
|
+
if (!e || !n) return;
|
|
91
|
+
let r = e.getBoundingClientRect(), i = n.getBoundingClientRect(), a = r.top, o = t === "top" ? "top" : t === "bottom" ? "bottom" : a >= i.height + 12 ? "top" : "bottom", u = r.left + r.width / 2 - i.width / 2, d = o === "top" ? r.top - i.height - 8 : r.bottom + 8;
|
|
92
|
+
s({
|
|
93
|
+
left: Math.max(8, Math.min(window.innerWidth - i.width - 8, u)),
|
|
94
|
+
top: d,
|
|
95
|
+
align: o
|
|
96
|
+
});
|
|
97
|
+
}, [t]);
|
|
98
|
+
return m(() => {
|
|
99
|
+
if (!i || e !== "snap") return;
|
|
100
|
+
let t = requestAnimationFrame(h);
|
|
101
|
+
return window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
|
|
102
|
+
cancelAnimationFrame(t), window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
|
|
103
|
+
};
|
|
104
|
+
}, [
|
|
105
|
+
i,
|
|
106
|
+
e,
|
|
107
|
+
h
|
|
108
|
+
]), m(() => () => {
|
|
109
|
+
u.current && clearTimeout(u.current);
|
|
110
|
+
}, []), {
|
|
111
|
+
visible: i,
|
|
112
|
+
pos: o,
|
|
113
|
+
targetRef: c,
|
|
114
|
+
tooltipRef: l,
|
|
115
|
+
show: d,
|
|
116
|
+
hide: p,
|
|
117
|
+
handleMouseMove: f((t) => {
|
|
118
|
+
e === "mouse" && s({
|
|
119
|
+
left: t.clientX + 12,
|
|
120
|
+
top: t.clientY + 16,
|
|
121
|
+
align: "bottom"
|
|
122
|
+
});
|
|
123
|
+
}, [e])
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function T({ layers: e, invert: t = !1, hoverTilt: n = !1 }) {
|
|
127
|
+
let r = _(null), a = _(null), o = _(/* @__PURE__ */ new Map()), [s, c] = v(3 / 4), [, l] = v(0), u = _(null), d = _({
|
|
128
|
+
rx: 0,
|
|
129
|
+
ry: 0,
|
|
130
|
+
rz: 0
|
|
131
|
+
}), p = _({
|
|
132
|
+
rx: 0,
|
|
133
|
+
ry: 0,
|
|
134
|
+
rz: 0
|
|
135
|
+
}), h = e?.some((e) => e.animated);
|
|
136
|
+
m(() => {
|
|
137
|
+
let e = !1, t = o.current;
|
|
138
|
+
return (async () => {
|
|
139
|
+
let n = Array.from(new Set(Object.values(i).map((e) => e.src))), r = await Promise.all(n.map((e) => ee(e)));
|
|
140
|
+
e || (r.forEach((e, r) => {
|
|
141
|
+
e && t.set(n[r], e);
|
|
142
|
+
}), l((e) => e + 1));
|
|
143
|
+
})().catch((e) => console.error("[JamlCardRenderer]", e)), () => {
|
|
144
|
+
e = !0, t.clear();
|
|
145
|
+
};
|
|
146
|
+
}, []), m(() => {
|
|
147
|
+
let n = r.current;
|
|
148
|
+
if (!n || !e || e.length === 0) return;
|
|
149
|
+
let i = n.getContext("2d");
|
|
150
|
+
if (!i) return;
|
|
151
|
+
let a = !1, s = null, u, d = (r) => {
|
|
152
|
+
i.clearRect(0, 0, n.width, n.height), [...e].sort((e, t) => e.order - t.order).forEach((e) => {
|
|
153
|
+
let t = o.current.get(e.source);
|
|
154
|
+
if (t) {
|
|
155
|
+
let a = te(n, i, t, e, h ? r : void 0);
|
|
156
|
+
e.order === 0 && c(a);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
ee(e.source).then((t) => {
|
|
160
|
+
if (!(a || !t)) {
|
|
161
|
+
if (o.current.set(e.source, t), !h) {
|
|
162
|
+
let r = te(n, i, t, e);
|
|
163
|
+
e.order === 0 && c(r);
|
|
164
|
+
}
|
|
165
|
+
l((e) => e + 1);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}), n.style.filter = t ? "invert(0.94)" : "none";
|
|
169
|
+
};
|
|
170
|
+
if (h) {
|
|
171
|
+
let e = (t) => {
|
|
172
|
+
a || (u === void 0 && (u = t), d(t - u), s = requestAnimationFrame(e));
|
|
173
|
+
};
|
|
174
|
+
s = requestAnimationFrame(e);
|
|
175
|
+
} else d();
|
|
176
|
+
return () => {
|
|
177
|
+
a = !0, s !== null && cancelAnimationFrame(s);
|
|
178
|
+
};
|
|
179
|
+
}, [
|
|
180
|
+
e,
|
|
181
|
+
t,
|
|
182
|
+
h
|
|
183
|
+
]);
|
|
184
|
+
let g = f(() => {
|
|
185
|
+
u.current !== null && (cancelAnimationFrame(u.current), u.current = null);
|
|
186
|
+
}, []), y = f(() => {
|
|
187
|
+
let e = r.current;
|
|
188
|
+
if (!e) return;
|
|
189
|
+
let t = p.current;
|
|
190
|
+
e.style.transform = `rotateX(${t.rx}deg) rotateY(${t.ry}deg) rotateZ(${t.rz}deg)`;
|
|
191
|
+
}, []), b = f((e, t) => {
|
|
192
|
+
g();
|
|
193
|
+
let n = performance.now(), r = (i) => {
|
|
194
|
+
let a = Math.min(.05, (i - n) / 1e3);
|
|
195
|
+
n = i;
|
|
196
|
+
let o = d.current, s = p.current, c = 1 - Math.exp(-e * a);
|
|
197
|
+
if (s.rx += (o.rx - s.rx) * c, s.ry += (o.ry - s.ry) * c, s.rz += (o.rz - s.rz) * c, y(), Math.abs(o.rx - s.rx) < .02 && Math.abs(o.ry - s.ry) < .02 && Math.abs(o.rz - s.rz) < .02) {
|
|
198
|
+
s.rx = o.rx, s.ry = o.ry, s.rz = o.rz, y(), u.current = null, t?.();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
u.current = requestAnimationFrame(r);
|
|
202
|
+
};
|
|
203
|
+
u.current = requestAnimationFrame(r);
|
|
204
|
+
}, [g, y]);
|
|
205
|
+
return m(() => () => g(), [g]), {
|
|
206
|
+
canvasRef: r,
|
|
207
|
+
containerRef: a,
|
|
208
|
+
ratio: s,
|
|
209
|
+
handlers: {
|
|
210
|
+
onPointerEnter: n ? (e) => {
|
|
211
|
+
!n || e.pointerType === "touch" || (a.current?.setAttribute("data-hovered", "true"), b(22));
|
|
212
|
+
} : void 0,
|
|
213
|
+
onPointerLeave: n ? () => {
|
|
214
|
+
n && (a.current?.setAttribute("data-hovered", "false"), d.current = {
|
|
215
|
+
rx: 0,
|
|
216
|
+
ry: 0,
|
|
217
|
+
rz: 0
|
|
218
|
+
}, b(14, () => {
|
|
219
|
+
let e = r.current;
|
|
220
|
+
e && (e.style.transform = "");
|
|
221
|
+
}));
|
|
222
|
+
} : void 0,
|
|
223
|
+
onPointerMove: n ? (e) => {
|
|
224
|
+
if (!n || e.pointerType === "touch") return;
|
|
225
|
+
let t = e.currentTarget.getBoundingClientRect(), r = Math.max(-1, Math.min(1, ((e.clientX - t.left) / t.width - .5) * 2)), i = Math.max(-1, Math.min(1, ((e.clientY - t.top) / t.height - .5) * 2));
|
|
226
|
+
d.current = {
|
|
227
|
+
rx: i * -10,
|
|
228
|
+
ry: r * 12,
|
|
229
|
+
rz: r * i * -1.2
|
|
230
|
+
}, a.current?.style.setProperty("--j-card-glare-x", `${(r + 1) * 50}%`), a.current?.style.setProperty("--j-card-glare-y", `${(1 - i) * 50}%`), b(22);
|
|
231
|
+
} : void 0
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function E(e, t = {}) {
|
|
236
|
+
let [n, r] = v(e[0]?.ante ?? 0), [i, a] = v(e[0]?.ante), o = _(null), s = _(/* @__PURE__ */ new Map());
|
|
237
|
+
return e[0]?.ante !== i && (a(e[0]?.ante), e.length > 0 && r(e[0].ante)), m(() => {
|
|
238
|
+
let n = o.current;
|
|
239
|
+
if (!n || e.length === 0) return;
|
|
240
|
+
let i = new IntersectionObserver((e) => {
|
|
241
|
+
let t = e.filter((e) => e.isIntersecting).sort((e, t) => t.intersectionRatio - e.intersectionRatio)[0];
|
|
242
|
+
if (t) {
|
|
243
|
+
let e = Number(t.target.dataset.ante);
|
|
244
|
+
Number.isNaN(e) || r(e);
|
|
245
|
+
}
|
|
246
|
+
}, {
|
|
247
|
+
root: n,
|
|
248
|
+
threshold: t.threshold ?? [
|
|
249
|
+
.4,
|
|
250
|
+
.6,
|
|
251
|
+
.8
|
|
252
|
+
]
|
|
253
|
+
});
|
|
254
|
+
return s.current.forEach((e) => i.observe(e)), () => i.disconnect();
|
|
255
|
+
}, [e, t.threshold]), {
|
|
256
|
+
currentAnte: n,
|
|
257
|
+
scrollRef: o,
|
|
258
|
+
scrollToAnte: f((e) => {
|
|
259
|
+
let t = s.current.get(e);
|
|
260
|
+
t && t.scrollIntoView({
|
|
261
|
+
behavior: "smooth",
|
|
262
|
+
block: "start"
|
|
263
|
+
});
|
|
264
|
+
}, []),
|
|
265
|
+
registerAnteRef: f((e, t) => {
|
|
266
|
+
t ? s.current.set(e, t) : s.current.delete(e);
|
|
267
|
+
}, [])
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
function re(e, t, n) {
|
|
271
|
+
let [r, i] = v(null), [a, o] = v(null), [s, c] = v(null), l = f((e, t, n) => {
|
|
272
|
+
let r = "touches" in e ? e.touches[0] : e, i = e.currentTarget.getBoundingClientRect();
|
|
273
|
+
o({
|
|
274
|
+
clause: t,
|
|
275
|
+
fromZone: n,
|
|
276
|
+
x: r.clientX,
|
|
277
|
+
y: r.clientY,
|
|
278
|
+
offX: r.clientX - i.left,
|
|
279
|
+
offY: r.clientY - i.top
|
|
280
|
+
}), c(null);
|
|
281
|
+
}, []), u = _(r), d = _(a), p = _(s), g = _(e), y = _(t);
|
|
282
|
+
h(() => {
|
|
283
|
+
u.current = r, d.current = a, p.current = s, g.current = e, y.current = t;
|
|
284
|
+
});
|
|
285
|
+
let b = r !== null || a !== null;
|
|
286
|
+
return m(() => {
|
|
287
|
+
if (!b) return;
|
|
288
|
+
let e = (e) => {
|
|
289
|
+
let t = "touches" in e ? e : null, r = t ? t.touches[0] : e;
|
|
290
|
+
if (!r) return;
|
|
291
|
+
let a = u.current;
|
|
292
|
+
if (!a && d.current) {
|
|
293
|
+
let e = r.clientX - d.current.x, t = r.clientY - d.current.y;
|
|
294
|
+
if (Math.hypot(e, t) < 8) return;
|
|
295
|
+
a = {
|
|
296
|
+
...d.current,
|
|
297
|
+
x: r.clientX,
|
|
298
|
+
y: r.clientY
|
|
299
|
+
}, o(null), i(a);
|
|
300
|
+
} else a && (a = {
|
|
301
|
+
...a,
|
|
302
|
+
x: r.clientX,
|
|
303
|
+
y: r.clientY
|
|
304
|
+
}, i(a));
|
|
305
|
+
if (!a) return;
|
|
306
|
+
t?.cancelable && t.preventDefault();
|
|
307
|
+
let s = n.current?.querySelectorAll("[data-zone]") ?? [], l = null;
|
|
308
|
+
for (let e of s) {
|
|
309
|
+
let t = e.getBoundingClientRect();
|
|
310
|
+
if (r.clientX >= t.left && r.clientX <= t.right && r.clientY >= t.top && r.clientY <= t.bottom) {
|
|
311
|
+
l = e.getAttribute("data-zone");
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
c(l);
|
|
316
|
+
}, t = () => {
|
|
317
|
+
let e = u.current, t = p.current;
|
|
318
|
+
if (e && t && t !== e.fromZone) {
|
|
319
|
+
let n = t, r = g.current;
|
|
320
|
+
y.current({
|
|
321
|
+
...r,
|
|
322
|
+
[e.fromZone]: r[e.fromZone].filter((t) => t.id !== e.clause.id),
|
|
323
|
+
[n]: [...r[n], { ...e.clause }]
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
o(null), i(null), c(null);
|
|
327
|
+
};
|
|
328
|
+
return window.addEventListener("mousemove", e), window.addEventListener("mouseup", t), window.addEventListener("touchmove", e, { passive: !1 }), window.addEventListener("touchend", t), () => {
|
|
329
|
+
window.removeEventListener("mousemove", e), window.removeEventListener("mouseup", t), window.removeEventListener("touchmove", e), window.removeEventListener("touchend", t);
|
|
330
|
+
};
|
|
331
|
+
}, [b, n]), {
|
|
332
|
+
drag: r,
|
|
333
|
+
hoverZone: s,
|
|
334
|
+
onDragStart: l
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region src/ui/sprites.tsx
|
|
339
|
+
function D({ name: t, sheet: n, width: i = 40, height: s, style: c }) {
|
|
340
|
+
let l = a(t), u = n ?? l?.type ?? "Jokers", d = o[u], f = r(u), p = l?.pos ?? f.pos, m = i;
|
|
341
|
+
[
|
|
342
|
+
"Jokers",
|
|
343
|
+
"Tarots",
|
|
344
|
+
"Vouchers",
|
|
345
|
+
"Boosters",
|
|
346
|
+
"Decks",
|
|
347
|
+
"Enhancers",
|
|
348
|
+
"Editions"
|
|
349
|
+
].includes(u) && (m = Math.round(i * 95 / 71));
|
|
350
|
+
let h = s ?? m;
|
|
351
|
+
if (!d) return null;
|
|
352
|
+
let g = i * d.cols, _ = h * d.rows, v = -(p.x * i), y = -(p.y * h);
|
|
353
|
+
return /* @__PURE__ */ b("div", { style: {
|
|
354
|
+
width: i,
|
|
355
|
+
height: h,
|
|
356
|
+
flexShrink: 0,
|
|
357
|
+
backgroundImage: `url(${e(d.assetKey)})`,
|
|
358
|
+
backgroundSize: `${g}px ${_}px`,
|
|
359
|
+
backgroundPosition: `${v}px ${y}px`,
|
|
360
|
+
backgroundRepeat: "no-repeat",
|
|
361
|
+
imageRendering: "pixelated",
|
|
362
|
+
...c
|
|
363
|
+
} });
|
|
364
|
+
}
|
|
365
|
+
var O = [
|
|
366
|
+
"White",
|
|
367
|
+
"Red",
|
|
368
|
+
"Green",
|
|
369
|
+
"Black",
|
|
370
|
+
"Blue",
|
|
371
|
+
"Purple",
|
|
372
|
+
"Orange",
|
|
373
|
+
"Gold"
|
|
374
|
+
];
|
|
375
|
+
function ie({ stake: t, width: n = 29, height: r, style: i }) {
|
|
376
|
+
let a = O.indexOf(t.replace(" Stake", "")), o = a >= 0 ? a : 0, s = o % 5, c = Math.floor(o / 5), l = r ?? n, u = n * 5, d = l * 2;
|
|
377
|
+
return /* @__PURE__ */ b("div", { style: {
|
|
378
|
+
width: n,
|
|
379
|
+
height: l,
|
|
380
|
+
flexShrink: 0,
|
|
381
|
+
backgroundImage: `url(${e("stakes")})`,
|
|
382
|
+
backgroundSize: `${u}px ${d}px`,
|
|
383
|
+
backgroundPosition: `-${s * n}px -${c * l}px`,
|
|
384
|
+
backgroundRepeat: "no-repeat",
|
|
385
|
+
imageRendering: "pixelated",
|
|
386
|
+
...i
|
|
387
|
+
} });
|
|
388
|
+
}
|
|
389
|
+
var ae = {
|
|
390
|
+
Red: 0,
|
|
391
|
+
Blue: 1,
|
|
392
|
+
Yellow: 2,
|
|
393
|
+
Green: 3,
|
|
394
|
+
Black: 0,
|
|
395
|
+
Magic: 1,
|
|
396
|
+
Nebula: 2,
|
|
397
|
+
Ghost: 3
|
|
398
|
+
};
|
|
399
|
+
function oe({ deck: t, width: n = 71, height: r, style: i }) {
|
|
400
|
+
let a = ae[t.replace(" Deck", "")] ?? 0, o = r ?? n * 95 / 71, s = n * 13, c = o * 4;
|
|
401
|
+
return /* @__PURE__ */ b("div", { style: {
|
|
402
|
+
width: n,
|
|
403
|
+
height: o,
|
|
404
|
+
flexShrink: 0,
|
|
405
|
+
backgroundImage: `url(${e("deck")})`,
|
|
406
|
+
backgroundSize: `${s}px ${c}px`,
|
|
407
|
+
backgroundPosition: `-${12 * n}px -${a * o}px`,
|
|
408
|
+
backgroundRepeat: "no-repeat",
|
|
409
|
+
imageRendering: "pixelated",
|
|
410
|
+
...i
|
|
411
|
+
} });
|
|
412
|
+
}
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region src/ui/jimboText.tsx
|
|
415
|
+
function k({ tone: e = "default", size: t = "md", shadow: n = !0, dance: r = !1, letterSpacing: i, as: a = "span", className: o = "", style: s, children: c, ...l }) {
|
|
416
|
+
let u = `j-text--${t}`, d = `j-text--${e}`, f = n ? "" : "j-text--no-shadow", p = r ? "j-text--dance-container" : "", m = {};
|
|
417
|
+
i != null && (m.letterSpacing = i), s && Object.assign(m, s);
|
|
418
|
+
let h = c;
|
|
419
|
+
return r && typeof c == "string" && (h = c.split("").map((e, t) => /* @__PURE__ */ b("span", {
|
|
420
|
+
className: "j-font-dance-char",
|
|
421
|
+
style: { animationDelay: `${t * -.15}s` },
|
|
422
|
+
children: e === " " ? "\xA0" : e
|
|
423
|
+
}, t))), /* @__PURE__ */ b(a, {
|
|
424
|
+
className: `j-text ${u} ${d} ${f} ${p} ${o}`.trim(),
|
|
425
|
+
style: Object.keys(m).length > 0 ? m : void 0,
|
|
426
|
+
...l,
|
|
427
|
+
children: h
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
//#endregion
|
|
431
|
+
//#region src/ui/panel.tsx
|
|
432
|
+
var A = d(({ children: e, className: t = "", sway: n = !1, onBack: r, hideBack: i = !1, style: a, ...o }) => /* @__PURE__ */ x("div", {
|
|
433
|
+
ref: C(n),
|
|
434
|
+
className: `j-panel ${t}`,
|
|
435
|
+
style: a,
|
|
436
|
+
...o,
|
|
437
|
+
children: [/* @__PURE__ */ b("div", {
|
|
438
|
+
className: "j-panel__body",
|
|
439
|
+
children: e
|
|
440
|
+
}), r && !i && /* @__PURE__ */ b("div", {
|
|
441
|
+
className: "j-panel__back",
|
|
442
|
+
children: /* @__PURE__ */ b(ce, { onClick: r })
|
|
443
|
+
})]
|
|
444
|
+
}));
|
|
445
|
+
A.displayName = "JimboPanel";
|
|
446
|
+
var se = d(({ children: e, className: t = "", style: n, ...r }) => /* @__PURE__ */ b("div", {
|
|
447
|
+
className: `j-inner-panel ${t}`,
|
|
448
|
+
style: n,
|
|
449
|
+
...r,
|
|
450
|
+
children: e
|
|
451
|
+
}));
|
|
452
|
+
se.displayName = "JimboInnerPanel";
|
|
453
|
+
function j({ tone: e = "orange", size: t = "md", fullWidth: n = !1, disabled: r = !1, onClick: i, style: a, className: o = "", children: s }) {
|
|
454
|
+
let c = t === "xs" ? "xs" : t === "sm" ? "sm" : t === "lg" ? "lg" : "md";
|
|
455
|
+
return /* @__PURE__ */ b("button", {
|
|
456
|
+
type: "button",
|
|
457
|
+
className: `j-btn j-btn--${e} j-btn--${t} ${n ? "j-btn--full" : ""} ${r ? "j-btn--disabled" : ""} ${o}`,
|
|
458
|
+
disabled: r,
|
|
459
|
+
onClick: i,
|
|
460
|
+
style: a,
|
|
461
|
+
children: /* @__PURE__ */ b("div", {
|
|
462
|
+
className: "j-btn__face",
|
|
463
|
+
children: /* @__PURE__ */ b(k, {
|
|
464
|
+
size: c,
|
|
465
|
+
children: s
|
|
466
|
+
})
|
|
467
|
+
})
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
function ce({ onClick: e }) {
|
|
471
|
+
return /* @__PURE__ */ b("div", {
|
|
472
|
+
className: "j-back-btn-wrap j-flex j-justify-center j-w-full",
|
|
473
|
+
children: /* @__PURE__ */ b(j, {
|
|
474
|
+
tone: "orange",
|
|
475
|
+
size: "md",
|
|
476
|
+
fullWidth: !0,
|
|
477
|
+
onClick: e,
|
|
478
|
+
className: "j-back-btn",
|
|
479
|
+
children: "Back"
|
|
480
|
+
})
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
function le({ children: e, open: t, onClose: n, title: r, className: i, showBack: a = !0 }) {
|
|
484
|
+
return t ? /* @__PURE__ */ b("div", {
|
|
485
|
+
className: "j-modal-overlay",
|
|
486
|
+
children: /* @__PURE__ */ x(A, {
|
|
487
|
+
onBack: a ? n : void 0,
|
|
488
|
+
className: `j-modal ${i ?? ""}`,
|
|
489
|
+
children: [r && /* @__PURE__ */ b(k, {
|
|
490
|
+
as: "h2",
|
|
491
|
+
size: "lg",
|
|
492
|
+
className: "j-modal__title",
|
|
493
|
+
children: r
|
|
494
|
+
}), e]
|
|
495
|
+
})
|
|
496
|
+
}) : null;
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region src/ui/jimboTabs.tsx
|
|
500
|
+
function ue({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i }) {
|
|
501
|
+
return /* @__PURE__ */ b("div", {
|
|
502
|
+
className: `j-tabs ${r}`,
|
|
503
|
+
style: i,
|
|
504
|
+
children: e.map((e) => /* @__PURE__ */ b(de, {
|
|
505
|
+
label: e.label,
|
|
506
|
+
active: t === e.id,
|
|
507
|
+
onClick: () => n(e.id)
|
|
508
|
+
}, e.id))
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
function de({ label: e, active: t, onClick: n }) {
|
|
512
|
+
return /* @__PURE__ */ x("div", {
|
|
513
|
+
className: "j-tab",
|
|
514
|
+
"data-active": t,
|
|
515
|
+
children: [/* @__PURE__ */ b("div", {
|
|
516
|
+
className: "j-tab__indicator",
|
|
517
|
+
"data-active": t,
|
|
518
|
+
"aria-hidden": !0,
|
|
519
|
+
children: /* @__PURE__ */ b("svg", {
|
|
520
|
+
width: 14,
|
|
521
|
+
height: 10,
|
|
522
|
+
viewBox: "0 0 14 10",
|
|
523
|
+
children: /* @__PURE__ */ b("polygon", { points: "7,10 0,0 14,0" })
|
|
524
|
+
})
|
|
525
|
+
}), /* @__PURE__ */ b("button", {
|
|
526
|
+
type: "button",
|
|
527
|
+
className: "j-tab__btn",
|
|
528
|
+
"data-active": t,
|
|
529
|
+
onClick: n,
|
|
530
|
+
children: /* @__PURE__ */ b(k, {
|
|
531
|
+
size: "sm",
|
|
532
|
+
tone: "default",
|
|
533
|
+
children: e
|
|
534
|
+
})
|
|
535
|
+
})]
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
function fe({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i }) {
|
|
539
|
+
return /* @__PURE__ */ b("div", {
|
|
540
|
+
className: `j-vtabs ${r}`,
|
|
541
|
+
style: i,
|
|
542
|
+
children: e.map((e) => {
|
|
543
|
+
let r = t === e.id;
|
|
544
|
+
return /* @__PURE__ */ b("button", {
|
|
545
|
+
type: "button",
|
|
546
|
+
className: "j-vtab",
|
|
547
|
+
"data-active": r,
|
|
548
|
+
onClick: () => n(e.id),
|
|
549
|
+
children: /* @__PURE__ */ b(k, {
|
|
550
|
+
size: "sm",
|
|
551
|
+
tone: r ? "default" : "grey",
|
|
552
|
+
children: e.label
|
|
553
|
+
})
|
|
554
|
+
}, e.id);
|
|
555
|
+
})
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
//#endregion
|
|
559
|
+
//#region src/ui/JimboBadge.tsx
|
|
560
|
+
function pe({ size: e = "sm", tone: t = "dark", className: n, children: r }) {
|
|
561
|
+
return /* @__PURE__ */ b("span", {
|
|
562
|
+
className: `j-badge j-badge--${e} j-badge--${t} ${n ?? ""}`,
|
|
563
|
+
children: r
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region src/ui/jimboFlankNav.tsx
|
|
568
|
+
function me({ onPrev: e, onNext: t, canPrev: n = !0, canNext: r = !0, prevLabel: i = "Previous", nextLabel: a = "Next", children: o, className: s = "", style: c }) {
|
|
569
|
+
return /* @__PURE__ */ x("div", {
|
|
570
|
+
className: `j-flank ${s}`,
|
|
571
|
+
style: c,
|
|
572
|
+
children: [
|
|
573
|
+
/* @__PURE__ */ b(he, {
|
|
574
|
+
direction: "left",
|
|
575
|
+
onClick: e,
|
|
576
|
+
disabled: !n,
|
|
577
|
+
"aria-label": i
|
|
578
|
+
}),
|
|
579
|
+
/* @__PURE__ */ b("div", {
|
|
580
|
+
className: "j-flank__content",
|
|
581
|
+
children: o
|
|
582
|
+
}),
|
|
583
|
+
/* @__PURE__ */ b(he, {
|
|
584
|
+
direction: "right",
|
|
585
|
+
onClick: t,
|
|
586
|
+
disabled: !r,
|
|
587
|
+
"aria-label": a
|
|
588
|
+
})
|
|
589
|
+
]
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
function he({ direction: e, onClick: t, disabled: n, "aria-label": r }) {
|
|
593
|
+
let [i, a] = s.useState(!1);
|
|
594
|
+
return /* @__PURE__ */ b("button", {
|
|
595
|
+
type: "button",
|
|
596
|
+
className: "j-flank__btn",
|
|
597
|
+
"data-pressed": i && !n,
|
|
598
|
+
onClick: t,
|
|
599
|
+
disabled: n,
|
|
600
|
+
"aria-label": r,
|
|
601
|
+
title: r,
|
|
602
|
+
onMouseDown: () => !n && a(!0),
|
|
603
|
+
onMouseUp: () => a(!1),
|
|
604
|
+
onMouseLeave: () => a(!1),
|
|
605
|
+
onTouchStart: () => !n && a(!0),
|
|
606
|
+
onTouchEnd: () => a(!1),
|
|
607
|
+
children: /* @__PURE__ */ b(ge, { direction: e })
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
function ge({ direction: e }) {
|
|
611
|
+
return /* @__PURE__ */ b("svg", {
|
|
612
|
+
width: 28,
|
|
613
|
+
height: 28,
|
|
614
|
+
viewBox: "0 0 28 28",
|
|
615
|
+
fill: "none",
|
|
616
|
+
stroke: "currentColor",
|
|
617
|
+
strokeWidth: 2,
|
|
618
|
+
strokeLinecap: "round",
|
|
619
|
+
strokeLinejoin: "round",
|
|
620
|
+
"aria-hidden": !0,
|
|
621
|
+
children: /* @__PURE__ */ b("polyline", { points: e === "left" ? "18,4 8,14 18,24" : "10,4 20,14 10,24" })
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
//#endregion
|
|
625
|
+
//#region src/ui/JimboFloating.tsx
|
|
626
|
+
function _e({ anchor: e = "top-right", offset: t = 12, zIndex: n = 20, children: r }) {
|
|
627
|
+
let i = {
|
|
628
|
+
position: "absolute",
|
|
629
|
+
zIndex: n
|
|
630
|
+
};
|
|
631
|
+
return e.includes("top") && (i.top = t), e.includes("bottom") && (i.bottom = t), e.includes("left") && (i.left = t), e.includes("right") && (i.right = t), e.includes("center") && (i.left = "50%", i.transform = "translateX(-50%)"), /* @__PURE__ */ b("div", {
|
|
632
|
+
style: i,
|
|
633
|
+
children: r
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
//#endregion
|
|
637
|
+
//#region src/ui/JimboToggleList.tsx
|
|
638
|
+
function ve({ items: e, onToggle: t, title: n }) {
|
|
639
|
+
return /* @__PURE__ */ b(A, { children: /* @__PURE__ */ x("div", {
|
|
640
|
+
className: "j-toggle-list",
|
|
641
|
+
children: [n && /* @__PURE__ */ b("div", {
|
|
642
|
+
className: "j-toggle-list__title",
|
|
643
|
+
children: n
|
|
644
|
+
}), e.map((e) => /* @__PURE__ */ x("button", {
|
|
645
|
+
type: "button",
|
|
646
|
+
className: "j-toggle-item",
|
|
647
|
+
onClick: () => t(e.id),
|
|
648
|
+
children: [/* @__PURE__ */ b("div", {
|
|
649
|
+
className: "j-toggle-check",
|
|
650
|
+
"data-on": e.on
|
|
651
|
+
}), e.label]
|
|
652
|
+
}, e.id))]
|
|
653
|
+
}) });
|
|
654
|
+
}
|
|
655
|
+
//#endregion
|
|
656
|
+
//#region src/ui/jimboFilterBar.tsx
|
|
657
|
+
function ye({ search: e, onSearchChange: t, searchPlaceholder: n = "Search...", searchLabel: r = "Search", sort: i, onSortChange: a, sortLabel: o = "Sort By", sortOptions: s, className: c = "", style: l }) {
|
|
658
|
+
return /* @__PURE__ */ x("div", {
|
|
659
|
+
className: `j-filter-bar ${c}`,
|
|
660
|
+
style: l,
|
|
661
|
+
children: [t ? /* @__PURE__ */ x("div", {
|
|
662
|
+
className: "j-filter-bar__field",
|
|
663
|
+
children: [/* @__PURE__ */ b("div", {
|
|
664
|
+
className: "j-filter-bar__pill",
|
|
665
|
+
children: /* @__PURE__ */ b(k, {
|
|
666
|
+
size: "xs",
|
|
667
|
+
children: r
|
|
668
|
+
})
|
|
669
|
+
}), /* @__PURE__ */ x("div", {
|
|
670
|
+
className: "j-relative",
|
|
671
|
+
children: [/* @__PURE__ */ b("div", {
|
|
672
|
+
className: "j-filter-bar__search-icon",
|
|
673
|
+
children: /* @__PURE__ */ b(be, {})
|
|
674
|
+
}), /* @__PURE__ */ b("input", {
|
|
675
|
+
type: "text",
|
|
676
|
+
value: e ?? "",
|
|
677
|
+
onChange: (e) => t(e.target.value),
|
|
678
|
+
placeholder: n,
|
|
679
|
+
className: "j-filter-bar__input"
|
|
680
|
+
})]
|
|
681
|
+
})]
|
|
682
|
+
}) : null, s && a ? /* @__PURE__ */ x("div", {
|
|
683
|
+
className: "j-filter-bar__field",
|
|
684
|
+
children: [/* @__PURE__ */ b("div", {
|
|
685
|
+
className: "j-filter-bar__pill",
|
|
686
|
+
children: /* @__PURE__ */ b(k, {
|
|
687
|
+
size: "xs",
|
|
688
|
+
children: o
|
|
689
|
+
})
|
|
690
|
+
}), /* @__PURE__ */ x("div", {
|
|
691
|
+
className: "j-relative",
|
|
692
|
+
children: [/* @__PURE__ */ b("select", {
|
|
693
|
+
value: i ?? s[0]?.value,
|
|
694
|
+
onChange: (e) => a(e.target.value),
|
|
695
|
+
className: "j-filter-bar__select",
|
|
696
|
+
children: s.map((e) => /* @__PURE__ */ b("option", {
|
|
697
|
+
value: e.value,
|
|
698
|
+
children: e.label
|
|
699
|
+
}, e.value))
|
|
700
|
+
}), /* @__PURE__ */ b("div", {
|
|
701
|
+
className: "j-filter-bar__sort-icon",
|
|
702
|
+
children: /* @__PURE__ */ b(xe, {})
|
|
703
|
+
})]
|
|
704
|
+
})]
|
|
705
|
+
}) : null]
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
function be() {
|
|
709
|
+
return /* @__PURE__ */ x("svg", {
|
|
710
|
+
width: 24,
|
|
711
|
+
height: 24,
|
|
712
|
+
viewBox: "0 0 24 24",
|
|
713
|
+
fill: "none",
|
|
714
|
+
stroke: "currentColor",
|
|
715
|
+
strokeWidth: 3,
|
|
716
|
+
strokeLinecap: "round",
|
|
717
|
+
strokeLinejoin: "round",
|
|
718
|
+
"aria-hidden": !0,
|
|
719
|
+
children: [/* @__PURE__ */ b("circle", {
|
|
720
|
+
cx: 11,
|
|
721
|
+
cy: 11,
|
|
722
|
+
r: 8
|
|
723
|
+
}), /* @__PURE__ */ b("line", {
|
|
724
|
+
x1: 21,
|
|
725
|
+
y1: 21,
|
|
726
|
+
x2: 16.65,
|
|
727
|
+
y2: 16.65
|
|
728
|
+
})]
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
function xe() {
|
|
732
|
+
return /* @__PURE__ */ x("svg", {
|
|
733
|
+
width: 20,
|
|
734
|
+
height: 20,
|
|
735
|
+
viewBox: "0 0 24 24",
|
|
736
|
+
fill: "none",
|
|
737
|
+
stroke: "currentColor",
|
|
738
|
+
strokeWidth: 2.5,
|
|
739
|
+
strokeLinecap: "round",
|
|
740
|
+
strokeLinejoin: "round",
|
|
741
|
+
"aria-hidden": !0,
|
|
742
|
+
children: [
|
|
743
|
+
/* @__PURE__ */ b("polyline", { points: "7 4 7 20" }),
|
|
744
|
+
/* @__PURE__ */ b("polyline", { points: "3 8 7 4 11 8" }),
|
|
745
|
+
/* @__PURE__ */ b("polyline", { points: "17 20 17 4" }),
|
|
746
|
+
/* @__PURE__ */ b("polyline", { points: "21 16 17 20 13 16" })
|
|
747
|
+
]
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
//#endregion
|
|
751
|
+
//#region src/ui/footer.tsx
|
|
752
|
+
var Se = [
|
|
753
|
+
{
|
|
754
|
+
char: "♥️",
|
|
755
|
+
keyframe: "bff-heart"
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
char: "♠️",
|
|
759
|
+
keyframe: "bff-spade"
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
char: "♦️",
|
|
763
|
+
keyframe: "bff-diamond"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
char: "♣️",
|
|
767
|
+
keyframe: "bff-club"
|
|
768
|
+
}
|
|
769
|
+
], Ce = "5s", we = {
|
|
770
|
+
fontFamily: "var(--font-game, var(--j-font, ui-sans-serif, system-ui, sans-serif))",
|
|
771
|
+
fontSize: "10px"
|
|
772
|
+
}, Te = "#FFD85C";
|
|
773
|
+
function Ee({ hidden: e = !1, className: t = "", children: n }) {
|
|
774
|
+
return e ? null : /* @__PURE__ */ x("div", {
|
|
775
|
+
className: ["j-footer", t].filter(Boolean).join(" "),
|
|
776
|
+
children: [/* @__PURE__ */ b("div", {
|
|
777
|
+
className: "j-footer__bar",
|
|
778
|
+
children: /* @__PURE__ */ x("p", {
|
|
779
|
+
className: "j-footer__line j-footer__line--wrap",
|
|
780
|
+
style: we,
|
|
781
|
+
children: [
|
|
782
|
+
/* @__PURE__ */ b("span", { children: "Not affiliated with LocalThunk or PlayStack" }),
|
|
783
|
+
/* @__PURE__ */ b("span", {
|
|
784
|
+
className: "j-footer__sep",
|
|
785
|
+
children: "•"
|
|
786
|
+
}),
|
|
787
|
+
/* @__PURE__ */ b("span", { children: "Made with" }),
|
|
788
|
+
/* @__PURE__ */ b("span", {
|
|
789
|
+
style: {
|
|
790
|
+
position: "relative",
|
|
791
|
+
display: "inline-block",
|
|
792
|
+
width: "1.5em",
|
|
793
|
+
height: "1em",
|
|
794
|
+
verticalAlign: "middle"
|
|
795
|
+
},
|
|
796
|
+
children: Se.map(({ char: e, keyframe: t }) => /* @__PURE__ */ b("span", {
|
|
797
|
+
style: {
|
|
798
|
+
position: "absolute",
|
|
799
|
+
inset: 0,
|
|
800
|
+
display: "inline-flex",
|
|
801
|
+
alignItems: "center",
|
|
802
|
+
justifyContent: "center",
|
|
803
|
+
opacity: 0,
|
|
804
|
+
animationName: t,
|
|
805
|
+
animationDuration: Ce,
|
|
806
|
+
animationDelay: "0s",
|
|
807
|
+
animationIterationCount: "infinite",
|
|
808
|
+
animationTimingFunction: "ease-out"
|
|
809
|
+
},
|
|
810
|
+
children: e
|
|
811
|
+
}, e))
|
|
812
|
+
}),
|
|
813
|
+
/* @__PURE__ */ b("span", { children: "for the" }),
|
|
814
|
+
/* @__PURE__ */ b("a", {
|
|
815
|
+
className: "j-footer__link",
|
|
816
|
+
href: "https://playbalatro.com",
|
|
817
|
+
target: "_blank",
|
|
818
|
+
rel: "noopener noreferrer",
|
|
819
|
+
style: { color: Te },
|
|
820
|
+
children: "Balatro"
|
|
821
|
+
}),
|
|
822
|
+
/* @__PURE__ */ b("span", { children: "community" }),
|
|
823
|
+
n ? /* @__PURE__ */ b("span", {
|
|
824
|
+
className: "j-footer__extra",
|
|
825
|
+
children: n
|
|
826
|
+
}) : null
|
|
827
|
+
]
|
|
828
|
+
})
|
|
829
|
+
}), /* @__PURE__ */ b("style", { children: "\n @keyframes bff-heart {\n 0% { opacity: 0; transform: translateY(0); }\n 1% { opacity: 1; transform: translateY(-2px); }\n 3.5% { opacity: 1; transform: translateY(0); }\n 61.5% { opacity: 1; transform: translateY(0); }\n 62% { opacity: 0; transform: translateY(0); }\n 100% { opacity: 0; transform: translateY(0); }\n }\n @keyframes bff-spade {\n 0%, 61.5% { opacity: 0; transform: translateY(0); }\n 62% { opacity: 1; transform: translateY(-2px); }\n 64.5% { opacity: 1; transform: translateY(0); }\n 71.5% { opacity: 1; transform: translateY(0); }\n 72% { opacity: 0; transform: translateY(0); }\n 100% { opacity: 0; }\n }\n @keyframes bff-diamond {\n 0%, 71.5% { opacity: 0; transform: translateY(0); }\n 72% { opacity: 1; transform: translateY(-2px); }\n 74.5% { opacity: 1; transform: translateY(0); }\n 81.5% { opacity: 1; transform: translateY(0); }\n 82% { opacity: 0; transform: translateY(0); }\n 100% { opacity: 0; }\n }\n @keyframes bff-club {\n 0%, 81.5% { opacity: 0; transform: translateY(0); }\n 82% { opacity: 1; transform: translateY(-2px); }\n 84.5% { opacity: 1; transform: translateY(0); }\n 95% { opacity: 1; transform: translateY(0); }\n 96% { opacity: 0; transform: translateY(0); }\n 100% { opacity: 0; }\n }\n " })]
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
//#endregion
|
|
833
|
+
//#region src/ui/jimboBackground.tsx
|
|
834
|
+
function De() {
|
|
835
|
+
return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("canvas", {
|
|
836
|
+
ref: ne(),
|
|
837
|
+
"aria-hidden": !0,
|
|
838
|
+
style: {
|
|
839
|
+
position: "fixed",
|
|
840
|
+
inset: 0,
|
|
841
|
+
width: "100%",
|
|
842
|
+
height: "100%",
|
|
843
|
+
zIndex: -10,
|
|
844
|
+
pointerEvents: "none"
|
|
845
|
+
}
|
|
846
|
+
}), /* @__PURE__ */ b(Ee, {})] });
|
|
847
|
+
}
|
|
848
|
+
//#endregion
|
|
849
|
+
//#region src/ui/jimboTooltip.tsx
|
|
850
|
+
function Oe(e, t) {
|
|
851
|
+
typeof e == "function" ? e(t) : e && typeof e == "object" && (e.current = t);
|
|
852
|
+
}
|
|
853
|
+
function ke({ content: e, children: t, mode: n = "snap", placement: r = "auto", delay: i = 80, maxWidth: a = 280, disabled: o = !1 }) {
|
|
854
|
+
let { visible: c, pos: l, targetRef: u, tooltipRef: d, show: p, hide: m, handleMouseMove: h } = w({
|
|
855
|
+
mode: n,
|
|
856
|
+
placement: r,
|
|
857
|
+
delay: i,
|
|
858
|
+
disabled: o
|
|
859
|
+
}), g = s.Children.only(t), _ = g.ref, v = f((e) => {
|
|
860
|
+
u.current = e, Oe(_, e);
|
|
861
|
+
}, [_, u]);
|
|
862
|
+
return /* @__PURE__ */ x(y, { children: [s.cloneElement(g, {
|
|
863
|
+
ref: v,
|
|
864
|
+
onMouseEnter: (e) => {
|
|
865
|
+
p(), g.props.onMouseEnter?.(e);
|
|
866
|
+
},
|
|
867
|
+
onMouseLeave: (e) => {
|
|
868
|
+
m(), g.props.onMouseLeave?.(e);
|
|
869
|
+
},
|
|
870
|
+
onFocus: (e) => {
|
|
871
|
+
p(), g.props.onFocus?.(e);
|
|
872
|
+
},
|
|
873
|
+
onBlur: (e) => {
|
|
874
|
+
m(), g.props.onBlur?.(e);
|
|
875
|
+
},
|
|
876
|
+
onMouseMove: (e) => {
|
|
877
|
+
h(e), g.props.onMouseMove?.(e);
|
|
878
|
+
}
|
|
879
|
+
}), c ? /* @__PURE__ */ b("div", {
|
|
880
|
+
ref: d,
|
|
881
|
+
role: "tooltip",
|
|
882
|
+
className: "j-tooltip",
|
|
883
|
+
style: {
|
|
884
|
+
left: l?.left ?? -9999,
|
|
885
|
+
top: l?.top ?? -9999,
|
|
886
|
+
maxWidth: a,
|
|
887
|
+
opacity: +!!l
|
|
888
|
+
},
|
|
889
|
+
children: e
|
|
890
|
+
}) : null] });
|
|
891
|
+
}
|
|
892
|
+
//#endregion
|
|
893
|
+
//#region src/ui/codeBlock.tsx
|
|
894
|
+
function Ae({ code: e, language: t, filename: n, className: r = "" }) {
|
|
895
|
+
let [i, a] = v(!1);
|
|
896
|
+
return /* @__PURE__ */ x("div", {
|
|
897
|
+
className: `j-code-block ${r}`,
|
|
898
|
+
children: [/* @__PURE__ */ x("div", {
|
|
899
|
+
className: "j-code-block__header",
|
|
900
|
+
children: [/* @__PURE__ */ x("div", {
|
|
901
|
+
className: "j-code-block__meta",
|
|
902
|
+
children: [n && /* @__PURE__ */ b("span", {
|
|
903
|
+
className: "j-code-block__filename",
|
|
904
|
+
children: n
|
|
905
|
+
}), t && /* @__PURE__ */ b("span", {
|
|
906
|
+
className: "j-code-block__lang",
|
|
907
|
+
children: t
|
|
908
|
+
})]
|
|
909
|
+
}), /* @__PURE__ */ b("button", {
|
|
910
|
+
onClick: () => {
|
|
911
|
+
navigator.clipboard.writeText(e), a(!0), setTimeout(() => a(!1), 2e3);
|
|
912
|
+
},
|
|
913
|
+
title: "Copy",
|
|
914
|
+
className: "j-code-block__copy",
|
|
915
|
+
"data-copied": i,
|
|
916
|
+
children: i ? /* @__PURE__ */ b("svg", {
|
|
917
|
+
width: "14",
|
|
918
|
+
height: "14",
|
|
919
|
+
viewBox: "0 0 24 24",
|
|
920
|
+
fill: "none",
|
|
921
|
+
stroke: "currentColor",
|
|
922
|
+
strokeWidth: "2.5",
|
|
923
|
+
strokeLinecap: "round",
|
|
924
|
+
strokeLinejoin: "round",
|
|
925
|
+
children: /* @__PURE__ */ b("polyline", { points: "20 6 9 17 4 12" })
|
|
926
|
+
}) : /* @__PURE__ */ x("svg", {
|
|
927
|
+
width: "14",
|
|
928
|
+
height: "14",
|
|
929
|
+
viewBox: "0 0 24 24",
|
|
930
|
+
fill: "none",
|
|
931
|
+
stroke: "currentColor",
|
|
932
|
+
strokeWidth: "2",
|
|
933
|
+
strokeLinecap: "round",
|
|
934
|
+
strokeLinejoin: "round",
|
|
935
|
+
children: [/* @__PURE__ */ b("rect", {
|
|
936
|
+
x: "9",
|
|
937
|
+
y: "9",
|
|
938
|
+
width: "13",
|
|
939
|
+
height: "13",
|
|
940
|
+
rx: "2"
|
|
941
|
+
}), /* @__PURE__ */ b("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })]
|
|
942
|
+
})
|
|
943
|
+
})]
|
|
944
|
+
}), /* @__PURE__ */ b("pre", {
|
|
945
|
+
className: "j-code-block__pre",
|
|
946
|
+
children: /* @__PURE__ */ b("code", { children: e })
|
|
947
|
+
})]
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
//#endregion
|
|
951
|
+
//#region src/ui/jimboApp.tsx
|
|
952
|
+
function je({ children: e, fluid: t, className: n = "", ...r }) {
|
|
953
|
+
return /* @__PURE__ */ b("div", {
|
|
954
|
+
className: `j-app${t ? " j-app--fluid" : ""} ${n}`.trim(),
|
|
955
|
+
...r,
|
|
956
|
+
children: e
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
function Me({ children: e, className: t = "", ...n }) {
|
|
960
|
+
return /* @__PURE__ */ b("div", {
|
|
961
|
+
className: `j-app__scroll ${t}`,
|
|
962
|
+
...n,
|
|
963
|
+
children: e
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
function Ne({ children: e, className: t = "", ...n }) {
|
|
967
|
+
return /* @__PURE__ */ b("div", {
|
|
968
|
+
className: `j-app__footer ${t}`,
|
|
969
|
+
...n,
|
|
970
|
+
children: e
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
//#endregion
|
|
974
|
+
//#region src/ui/jimboSectionHeader.tsx
|
|
975
|
+
function Pe({ label: e, tone: t = "blue", className: n = "" }) {
|
|
976
|
+
return /* @__PURE__ */ x("div", {
|
|
977
|
+
className: `j-section-header ${n}`,
|
|
978
|
+
children: [/* @__PURE__ */ b("div", {
|
|
979
|
+
className: `j-section-header__tag j-bg--${t}`,
|
|
980
|
+
children: e
|
|
981
|
+
}), /* @__PURE__ */ b("div", { className: `j-section-header__rule j-bg--${t}` })]
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
//#endregion
|
|
985
|
+
//#region src/ui/jimboInfoCard.tsx
|
|
986
|
+
function Fe({ tone: e, children: t, className: n = "", ...r }) {
|
|
987
|
+
return /* @__PURE__ */ b("div", {
|
|
988
|
+
className: `j-info-card ${e ? `j-border--${e}` : ""} ${n}`,
|
|
989
|
+
style: e ? { borderColor: void 0 } : void 0,
|
|
990
|
+
...r,
|
|
991
|
+
children: t
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
function Ie({ children: e, className: t = "" }) {
|
|
995
|
+
return /* @__PURE__ */ b("div", {
|
|
996
|
+
className: `j-info-card__body ${t}`,
|
|
997
|
+
children: e
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
function Le({ children: e, className: t = "" }) {
|
|
1001
|
+
return /* @__PURE__ */ b("div", {
|
|
1002
|
+
className: `j-info-card__title ${t}`,
|
|
1003
|
+
children: e
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
function Re({ children: e, className: t = "" }) {
|
|
1007
|
+
return /* @__PURE__ */ b("div", {
|
|
1008
|
+
className: `j-info-card__sub ${t}`,
|
|
1009
|
+
children: e
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
function ze({ children: e, className: t = "" }) {
|
|
1013
|
+
return /* @__PURE__ */ b("div", {
|
|
1014
|
+
className: `j-info-card__aside ${t}`,
|
|
1015
|
+
children: e
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
//#endregion
|
|
1019
|
+
//#region src/ui/showcase.tsx
|
|
1020
|
+
function Be({ title: e = "Balatro", subtitle: t = "Seed Curator", hotFilters: n = [], recentFinds: r = [], mcpInfo: i, onNewSearch: a, onBrowseFilters: o, onFilterClick: s }) {
|
|
1021
|
+
return /* @__PURE__ */ x(je, { children: [
|
|
1022
|
+
/* @__PURE__ */ x("div", {
|
|
1023
|
+
style: {
|
|
1024
|
+
padding: "12px 12px 8px",
|
|
1025
|
+
display: "flex",
|
|
1026
|
+
flexDirection: "column",
|
|
1027
|
+
gap: 6
|
|
1028
|
+
},
|
|
1029
|
+
children: [
|
|
1030
|
+
/* @__PURE__ */ x("div", {
|
|
1031
|
+
className: "j-text-center",
|
|
1032
|
+
children: [/* @__PURE__ */ b(k, {
|
|
1033
|
+
size: "lg",
|
|
1034
|
+
tone: "gold",
|
|
1035
|
+
children: e
|
|
1036
|
+
}), /* @__PURE__ */ b(k, {
|
|
1037
|
+
size: "micro",
|
|
1038
|
+
tone: "grey",
|
|
1039
|
+
style: { letterSpacing: 3 },
|
|
1040
|
+
children: t
|
|
1041
|
+
})]
|
|
1042
|
+
}),
|
|
1043
|
+
i && /* @__PURE__ */ x("div", {
|
|
1044
|
+
className: "j-flex j-justify-between",
|
|
1045
|
+
style: {
|
|
1046
|
+
padding: "3px 8px",
|
|
1047
|
+
background: "var(--j-dark-grey)",
|
|
1048
|
+
borderRadius: 4,
|
|
1049
|
+
border: "1px solid var(--j-panel-edge)"
|
|
1050
|
+
},
|
|
1051
|
+
children: [/* @__PURE__ */ b(k, {
|
|
1052
|
+
size: "micro",
|
|
1053
|
+
tone: "purple",
|
|
1054
|
+
children: i.engine
|
|
1055
|
+
}), /* @__PURE__ */ b(k, {
|
|
1056
|
+
size: "micro",
|
|
1057
|
+
tone: "grey",
|
|
1058
|
+
children: i.features
|
|
1059
|
+
})]
|
|
1060
|
+
}),
|
|
1061
|
+
n.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(Pe, {
|
|
1062
|
+
label: "Filters",
|
|
1063
|
+
tone: "blue"
|
|
1064
|
+
}), /* @__PURE__ */ b("div", {
|
|
1065
|
+
className: "j-flex-col",
|
|
1066
|
+
style: { gap: 4 },
|
|
1067
|
+
children: n.slice(0, 4).map((e, t) => /* @__PURE__ */ x(Fe, {
|
|
1068
|
+
tone: e.tone,
|
|
1069
|
+
onClick: () => s?.(e, t),
|
|
1070
|
+
style: { cursor: s ? "pointer" : void 0 },
|
|
1071
|
+
children: [
|
|
1072
|
+
/* @__PURE__ */ b("div", {
|
|
1073
|
+
className: "j-flex j-gap-xs",
|
|
1074
|
+
children: e.sample.slice(0, 2).map((e, t) => /* @__PURE__ */ b("div", {
|
|
1075
|
+
style: {
|
|
1076
|
+
width: 22,
|
|
1077
|
+
height: 28,
|
|
1078
|
+
display: "flex",
|
|
1079
|
+
alignItems: "center",
|
|
1080
|
+
justifyContent: "center"
|
|
1081
|
+
},
|
|
1082
|
+
children: /* @__PURE__ */ b(D, {
|
|
1083
|
+
name: e,
|
|
1084
|
+
width: 20
|
|
1085
|
+
})
|
|
1086
|
+
}, t))
|
|
1087
|
+
}),
|
|
1088
|
+
/* @__PURE__ */ x(Ie, { children: [/* @__PURE__ */ b(Le, { children: e.name }), /* @__PURE__ */ x(Re, { children: ["by ", e.author] })] }),
|
|
1089
|
+
/* @__PURE__ */ b(ze, { children: /* @__PURE__ */ b(k, {
|
|
1090
|
+
size: "xs",
|
|
1091
|
+
tone: e.tone === "gold" ? "gold" : e.tone,
|
|
1092
|
+
children: e.hits
|
|
1093
|
+
}) })
|
|
1094
|
+
]
|
|
1095
|
+
}, t))
|
|
1096
|
+
})] }),
|
|
1097
|
+
r.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(Pe, {
|
|
1098
|
+
label: "Recent",
|
|
1099
|
+
tone: "green"
|
|
1100
|
+
}), /* @__PURE__ */ b("div", {
|
|
1101
|
+
style: { lineHeight: 1.5 },
|
|
1102
|
+
children: r.slice(0, 3).map((e, t) => /* @__PURE__ */ x("div", {
|
|
1103
|
+
className: "j-flex j-gap-sm",
|
|
1104
|
+
children: [
|
|
1105
|
+
/* @__PURE__ */ b(k, {
|
|
1106
|
+
size: "micro",
|
|
1107
|
+
tone: "gold",
|
|
1108
|
+
children: e.seed
|
|
1109
|
+
}),
|
|
1110
|
+
/* @__PURE__ */ b(k, {
|
|
1111
|
+
size: "micro",
|
|
1112
|
+
tone: "grey",
|
|
1113
|
+
children: e.filterName
|
|
1114
|
+
}),
|
|
1115
|
+
e.score > 0 && /* @__PURE__ */ x(k, {
|
|
1116
|
+
size: "micro",
|
|
1117
|
+
tone: "green",
|
|
1118
|
+
children: ["+", e.score]
|
|
1119
|
+
})
|
|
1120
|
+
]
|
|
1121
|
+
}, t))
|
|
1122
|
+
})] })
|
|
1123
|
+
]
|
|
1124
|
+
}),
|
|
1125
|
+
/* @__PURE__ */ x(Ne, { children: [/* @__PURE__ */ b(j, {
|
|
1126
|
+
tone: "green",
|
|
1127
|
+
fullWidth: !0,
|
|
1128
|
+
size: "lg",
|
|
1129
|
+
onClick: a,
|
|
1130
|
+
children: "New Search"
|
|
1131
|
+
}), /* @__PURE__ */ b(j, {
|
|
1132
|
+
tone: "blue",
|
|
1133
|
+
fullWidth: !0,
|
|
1134
|
+
size: "lg",
|
|
1135
|
+
onClick: o,
|
|
1136
|
+
children: "Browse Filters"
|
|
1137
|
+
})] }),
|
|
1138
|
+
/* @__PURE__ */ b(Ee, {})
|
|
1139
|
+
] });
|
|
1140
|
+
}
|
|
1141
|
+
//#endregion
|
|
1142
|
+
//#region src/ui/jimboCopyRow.tsx
|
|
1143
|
+
function Ve({ value: e, label: t }) {
|
|
1144
|
+
let [n, r] = v(!1);
|
|
1145
|
+
function i() {
|
|
1146
|
+
navigator.clipboard.writeText(e).then(() => {
|
|
1147
|
+
r(!0), setTimeout(() => r(!1), 1500);
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
return /* @__PURE__ */ x("div", {
|
|
1151
|
+
className: "j-copy-row",
|
|
1152
|
+
children: [t && /* @__PURE__ */ b(k, {
|
|
1153
|
+
size: "xs",
|
|
1154
|
+
tone: "grey",
|
|
1155
|
+
className: "j-copy-row__label",
|
|
1156
|
+
children: t
|
|
1157
|
+
}), /* @__PURE__ */ x("div", {
|
|
1158
|
+
className: "j-copy-row__field",
|
|
1159
|
+
children: [/* @__PURE__ */ b("div", {
|
|
1160
|
+
className: "j-copy-row__value",
|
|
1161
|
+
children: /* @__PURE__ */ b(k, {
|
|
1162
|
+
size: "sm",
|
|
1163
|
+
children: e
|
|
1164
|
+
})
|
|
1165
|
+
}), /* @__PURE__ */ b("button", {
|
|
1166
|
+
type: "button",
|
|
1167
|
+
className: "j-copy-row__btn",
|
|
1168
|
+
"data-copied": n,
|
|
1169
|
+
onClick: i,
|
|
1170
|
+
children: n ? "Copied" : "Copy"
|
|
1171
|
+
})]
|
|
1172
|
+
})]
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
//#endregion
|
|
1176
|
+
//#region src/ui/jimboWordmark.tsx
|
|
1177
|
+
function He({ title: e, subtitle: t, className: n = "" }) {
|
|
1178
|
+
return /* @__PURE__ */ x("div", {
|
|
1179
|
+
className: `j-wordmark ${n}`,
|
|
1180
|
+
children: [/* @__PURE__ */ b("div", {
|
|
1181
|
+
className: "j-wordmark__title",
|
|
1182
|
+
children: e
|
|
1183
|
+
}), t && /* @__PURE__ */ b("div", {
|
|
1184
|
+
className: "j-wordmark__sub",
|
|
1185
|
+
children: t
|
|
1186
|
+
})]
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
//#endregion
|
|
1190
|
+
//#region src/ui/jimboStatGrid.tsx
|
|
1191
|
+
function Ue({ items: e, className: t = "", ...n }) {
|
|
1192
|
+
return /* @__PURE__ */ b("div", {
|
|
1193
|
+
className: `j-stat-grid ${t}`,
|
|
1194
|
+
...n,
|
|
1195
|
+
children: e.map((e) => /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("div", {
|
|
1196
|
+
className: "j-stat-grid__value",
|
|
1197
|
+
children: e.value
|
|
1198
|
+
}), /* @__PURE__ */ b("div", {
|
|
1199
|
+
className: "j-stat-grid__label",
|
|
1200
|
+
children: e.label
|
|
1201
|
+
})] }, e.label))
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
//#endregion
|
|
1205
|
+
//#region src/ui/jimboInset.tsx
|
|
1206
|
+
function We({ children: e, className: t = "", ...n }) {
|
|
1207
|
+
return /* @__PURE__ */ b("div", {
|
|
1208
|
+
className: `j-inset ${t}`,
|
|
1209
|
+
...n,
|
|
1210
|
+
children: e
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1213
|
+
//#endregion
|
|
1214
|
+
//#region node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.mjs
|
|
1215
|
+
function Ge(e) {
|
|
1216
|
+
return e == null;
|
|
1217
|
+
}
|
|
1218
|
+
function Ke(e) {
|
|
1219
|
+
return typeof e == "object" && !!e;
|
|
1220
|
+
}
|
|
1221
|
+
function qe(e) {
|
|
1222
|
+
return Array.isArray(e) ? e : Ge(e) ? [] : [e];
|
|
1223
|
+
}
|
|
1224
|
+
function Je(e, t) {
|
|
1225
|
+
var n, r, i, a;
|
|
1226
|
+
if (t) for (a = Object.keys(t), n = 0, r = a.length; n < r; n += 1) i = a[n], e[i] = t[i];
|
|
1227
|
+
return e;
|
|
1228
|
+
}
|
|
1229
|
+
function Ye(e, t) {
|
|
1230
|
+
var n = "", r;
|
|
1231
|
+
for (r = 0; r < t; r += 1) n += e;
|
|
1232
|
+
return n;
|
|
1233
|
+
}
|
|
1234
|
+
function Xe(e) {
|
|
1235
|
+
return e === 0 && 1 / e == -Infinity;
|
|
1236
|
+
}
|
|
1237
|
+
var M = {
|
|
1238
|
+
isNothing: Ge,
|
|
1239
|
+
isObject: Ke,
|
|
1240
|
+
toArray: qe,
|
|
1241
|
+
repeat: Ye,
|
|
1242
|
+
isNegativeZero: Xe,
|
|
1243
|
+
extend: Je
|
|
1244
|
+
};
|
|
1245
|
+
function Ze(e, t) {
|
|
1246
|
+
var n = "", r = e.reason || "(unknown reason)";
|
|
1247
|
+
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;
|
|
1248
|
+
}
|
|
1249
|
+
function Qe(e, t) {
|
|
1250
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = Ze(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (/* @__PURE__ */ Error()).stack || "";
|
|
1251
|
+
}
|
|
1252
|
+
Qe.prototype = Object.create(Error.prototype), Qe.prototype.constructor = Qe, Qe.prototype.toString = function(e) {
|
|
1253
|
+
return this.name + ": " + Ze(this, e);
|
|
1254
|
+
};
|
|
1255
|
+
var N = Qe;
|
|
1256
|
+
function $e(e, t, n, r, i) {
|
|
1257
|
+
var a = "", o = "", s = Math.floor(i / 2) - 1;
|
|
1258
|
+
return r - t > s && (a = " ... ", t = r - s + a.length), n - r > s && (o = " ...", n = r + s - o.length), {
|
|
1259
|
+
str: a + e.slice(t, n).replace(/\t/g, "→") + o,
|
|
1260
|
+
pos: r - t + a.length
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1263
|
+
function et(e, t) {
|
|
1264
|
+
return M.repeat(" ", t - e.length) + e;
|
|
1265
|
+
}
|
|
1266
|
+
function tt(e, t) {
|
|
1267
|
+
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1268
|
+
t.maxLength ||= 79, typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
1269
|
+
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);
|
|
1270
|
+
o < 0 && (o = r.length - 1);
|
|
1271
|
+
var s = "", c, l, u = Math.min(e.line + t.linesAfter, i.length).toString().length, d = t.maxLength - (t.indent + u + 3);
|
|
1272
|
+
for (c = 1; c <= t.linesBefore && !(o - c < 0); c++) l = $e(e.buffer, r[o - c], i[o - c], e.position - (r[o] - r[o - c]), d), s = M.repeat(" ", t.indent) + et((e.line - c + 1).toString(), u) + " | " + l.str + "\n" + s;
|
|
1273
|
+
for (l = $e(e.buffer, r[o], i[o], e.position, d), s += M.repeat(" ", t.indent) + et((e.line + 1).toString(), u) + " | " + l.str + "\n", s += M.repeat("-", t.indent + u + 3 + l.pos) + "^\n", c = 1; c <= t.linesAfter && !(o + c >= i.length); c++) l = $e(e.buffer, r[o + c], i[o + c], e.position - (r[o] - r[o + c]), d), s += M.repeat(" ", t.indent) + et((e.line + c + 1).toString(), u) + " | " + l.str + "\n";
|
|
1274
|
+
return s.replace(/\n$/, "");
|
|
1275
|
+
}
|
|
1276
|
+
var nt = tt, rt = [
|
|
1277
|
+
"kind",
|
|
1278
|
+
"multi",
|
|
1279
|
+
"resolve",
|
|
1280
|
+
"construct",
|
|
1281
|
+
"instanceOf",
|
|
1282
|
+
"predicate",
|
|
1283
|
+
"represent",
|
|
1284
|
+
"representName",
|
|
1285
|
+
"defaultStyle",
|
|
1286
|
+
"styleAliases"
|
|
1287
|
+
], it = [
|
|
1288
|
+
"scalar",
|
|
1289
|
+
"sequence",
|
|
1290
|
+
"mapping"
|
|
1291
|
+
];
|
|
1292
|
+
function at(e) {
|
|
1293
|
+
var t = {};
|
|
1294
|
+
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1295
|
+
e[n].forEach(function(e) {
|
|
1296
|
+
t[String(e)] = n;
|
|
1297
|
+
});
|
|
1298
|
+
}), t;
|
|
1299
|
+
}
|
|
1300
|
+
function ot(e, t) {
|
|
1301
|
+
if (t ||= {}, Object.keys(t).forEach(function(t) {
|
|
1302
|
+
if (rt.indexOf(t) === -1) throw new N("Unknown option \"" + t + "\" is met in definition of \"" + e + "\" YAML type.");
|
|
1303
|
+
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1304
|
+
return !0;
|
|
1305
|
+
}, this.construct = t.construct || function(e) {
|
|
1306
|
+
return e;
|
|
1307
|
+
}, 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 = at(t.styleAliases || null), it.indexOf(this.kind) === -1) throw new N("Unknown kind \"" + this.kind + "\" is specified for \"" + e + "\" YAML type.");
|
|
1308
|
+
}
|
|
1309
|
+
var P = ot;
|
|
1310
|
+
function st(e, t) {
|
|
1311
|
+
var n = [];
|
|
1312
|
+
return e[t].forEach(function(e) {
|
|
1313
|
+
var t = n.length;
|
|
1314
|
+
n.forEach(function(n, r) {
|
|
1315
|
+
n.tag === e.tag && n.kind === e.kind && n.multi === e.multi && (t = r);
|
|
1316
|
+
}), n[t] = e;
|
|
1317
|
+
}), n;
|
|
1318
|
+
}
|
|
1319
|
+
function ct() {
|
|
1320
|
+
var e = {
|
|
1321
|
+
scalar: {},
|
|
1322
|
+
sequence: {},
|
|
1323
|
+
mapping: {},
|
|
1324
|
+
fallback: {},
|
|
1325
|
+
multi: {
|
|
1326
|
+
scalar: [],
|
|
1327
|
+
sequence: [],
|
|
1328
|
+
mapping: [],
|
|
1329
|
+
fallback: []
|
|
1330
|
+
}
|
|
1331
|
+
}, t, n;
|
|
1332
|
+
function r(t) {
|
|
1333
|
+
t.multi ? (e.multi[t.kind].push(t), e.multi.fallback.push(t)) : e[t.kind][t.tag] = e.fallback[t.tag] = t;
|
|
1334
|
+
}
|
|
1335
|
+
for (t = 0, n = arguments.length; t < n; t += 1) arguments[t].forEach(r);
|
|
1336
|
+
return e;
|
|
1337
|
+
}
|
|
1338
|
+
function lt(e) {
|
|
1339
|
+
return this.extend(e);
|
|
1340
|
+
}
|
|
1341
|
+
lt.prototype.extend = function(e) {
|
|
1342
|
+
var t = [], n = [];
|
|
1343
|
+
if (e instanceof P) n.push(e);
|
|
1344
|
+
else if (Array.isArray(e)) n = n.concat(e);
|
|
1345
|
+
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));
|
|
1346
|
+
else throw new N("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1347
|
+
t.forEach(function(e) {
|
|
1348
|
+
if (!(e instanceof P)) throw new N("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1349
|
+
if (e.loadKind && e.loadKind !== "scalar") throw new N("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1350
|
+
if (e.multi) throw new N("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1351
|
+
}), n.forEach(function(e) {
|
|
1352
|
+
if (!(e instanceof P)) throw new N("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1353
|
+
});
|
|
1354
|
+
var r = Object.create(lt.prototype);
|
|
1355
|
+
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = st(r, "implicit"), r.compiledExplicit = st(r, "explicit"), r.compiledTypeMap = ct(r.compiledImplicit, r.compiledExplicit), r;
|
|
1356
|
+
};
|
|
1357
|
+
var ut = lt, dt = new P("tag:yaml.org,2002:str", {
|
|
1358
|
+
kind: "scalar",
|
|
1359
|
+
construct: function(e) {
|
|
1360
|
+
return e === null ? "" : e;
|
|
1361
|
+
}
|
|
1362
|
+
}), ft = new P("tag:yaml.org,2002:seq", {
|
|
1363
|
+
kind: "sequence",
|
|
1364
|
+
construct: function(e) {
|
|
1365
|
+
return e === null ? [] : e;
|
|
1366
|
+
}
|
|
1367
|
+
}), pt = new P("tag:yaml.org,2002:map", {
|
|
1368
|
+
kind: "mapping",
|
|
1369
|
+
construct: function(e) {
|
|
1370
|
+
return e === null ? {} : e;
|
|
1371
|
+
}
|
|
1372
|
+
}), mt = new ut({ explicit: [
|
|
1373
|
+
dt,
|
|
1374
|
+
ft,
|
|
1375
|
+
pt
|
|
1376
|
+
] });
|
|
1377
|
+
function ht(e) {
|
|
1378
|
+
if (e === null) return !0;
|
|
1379
|
+
var t = e.length;
|
|
1380
|
+
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1381
|
+
}
|
|
1382
|
+
function gt() {
|
|
1383
|
+
return null;
|
|
1384
|
+
}
|
|
1385
|
+
function _t(e) {
|
|
1386
|
+
return e === null;
|
|
1387
|
+
}
|
|
1388
|
+
var vt = new P("tag:yaml.org,2002:null", {
|
|
1389
|
+
kind: "scalar",
|
|
1390
|
+
resolve: ht,
|
|
1391
|
+
construct: gt,
|
|
1392
|
+
predicate: _t,
|
|
1393
|
+
represent: {
|
|
1394
|
+
canonical: function() {
|
|
1395
|
+
return "~";
|
|
1396
|
+
},
|
|
1397
|
+
lowercase: function() {
|
|
1398
|
+
return "null";
|
|
1399
|
+
},
|
|
1400
|
+
uppercase: function() {
|
|
1401
|
+
return "NULL";
|
|
1402
|
+
},
|
|
1403
|
+
camelcase: function() {
|
|
1404
|
+
return "Null";
|
|
1405
|
+
},
|
|
1406
|
+
empty: function() {
|
|
1407
|
+
return "";
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
defaultStyle: "lowercase"
|
|
1411
|
+
});
|
|
1412
|
+
function yt(e) {
|
|
1413
|
+
if (e === null) return !1;
|
|
1414
|
+
var t = e.length;
|
|
1415
|
+
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1416
|
+
}
|
|
1417
|
+
function bt(e) {
|
|
1418
|
+
return e === "true" || e === "True" || e === "TRUE";
|
|
1419
|
+
}
|
|
1420
|
+
function xt(e) {
|
|
1421
|
+
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1422
|
+
}
|
|
1423
|
+
var St = new P("tag:yaml.org,2002:bool", {
|
|
1424
|
+
kind: "scalar",
|
|
1425
|
+
resolve: yt,
|
|
1426
|
+
construct: bt,
|
|
1427
|
+
predicate: xt,
|
|
1428
|
+
represent: {
|
|
1429
|
+
lowercase: function(e) {
|
|
1430
|
+
return e ? "true" : "false";
|
|
1431
|
+
},
|
|
1432
|
+
uppercase: function(e) {
|
|
1433
|
+
return e ? "TRUE" : "FALSE";
|
|
1434
|
+
},
|
|
1435
|
+
camelcase: function(e) {
|
|
1436
|
+
return e ? "True" : "False";
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1439
|
+
defaultStyle: "lowercase"
|
|
1440
|
+
});
|
|
1441
|
+
function Ct(e) {
|
|
1442
|
+
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1443
|
+
}
|
|
1444
|
+
function wt(e) {
|
|
1445
|
+
return 48 <= e && e <= 55;
|
|
1446
|
+
}
|
|
1447
|
+
function Tt(e) {
|
|
1448
|
+
return 48 <= e && e <= 57;
|
|
1449
|
+
}
|
|
1450
|
+
function Et(e) {
|
|
1451
|
+
if (e === null) return !1;
|
|
1452
|
+
var t = e.length, n = 0, r = !1, i;
|
|
1453
|
+
if (!t) return !1;
|
|
1454
|
+
if (i = e[n], (i === "-" || i === "+") && (i = e[++n]), i === "0") {
|
|
1455
|
+
if (n + 1 === t) return !0;
|
|
1456
|
+
if (i = e[++n], i === "b") {
|
|
1457
|
+
for (n++; n < t; n++) if (i = e[n], i !== "_") {
|
|
1458
|
+
if (i !== "0" && i !== "1") return !1;
|
|
1459
|
+
r = !0;
|
|
1460
|
+
}
|
|
1461
|
+
return r && i !== "_";
|
|
1462
|
+
}
|
|
1463
|
+
if (i === "x") {
|
|
1464
|
+
for (n++; n < t; n++) if (i = e[n], i !== "_") {
|
|
1465
|
+
if (!Ct(e.charCodeAt(n))) return !1;
|
|
1466
|
+
r = !0;
|
|
1467
|
+
}
|
|
1468
|
+
return r && i !== "_";
|
|
1469
|
+
}
|
|
1470
|
+
if (i === "o") {
|
|
1471
|
+
for (n++; n < t; n++) if (i = e[n], i !== "_") {
|
|
1472
|
+
if (!wt(e.charCodeAt(n))) return !1;
|
|
1473
|
+
r = !0;
|
|
1474
|
+
}
|
|
1475
|
+
return r && i !== "_";
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
if (i === "_") return !1;
|
|
1479
|
+
for (; n < t; n++) if (i = e[n], i !== "_") {
|
|
1480
|
+
if (!Tt(e.charCodeAt(n))) return !1;
|
|
1481
|
+
r = !0;
|
|
1482
|
+
}
|
|
1483
|
+
return !(!r || i === "_");
|
|
1484
|
+
}
|
|
1485
|
+
function Dt(e) {
|
|
1486
|
+
var t = e, n = 1, r;
|
|
1487
|
+
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;
|
|
1488
|
+
if (r === "0") {
|
|
1489
|
+
if (t[1] === "b") return n * parseInt(t.slice(2), 2);
|
|
1490
|
+
if (t[1] === "x") return n * parseInt(t.slice(2), 16);
|
|
1491
|
+
if (t[1] === "o") return n * parseInt(t.slice(2), 8);
|
|
1492
|
+
}
|
|
1493
|
+
return n * parseInt(t, 10);
|
|
1494
|
+
}
|
|
1495
|
+
function Ot(e) {
|
|
1496
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 == 0 && !M.isNegativeZero(e);
|
|
1497
|
+
}
|
|
1498
|
+
var kt = new P("tag:yaml.org,2002:int", {
|
|
1499
|
+
kind: "scalar",
|
|
1500
|
+
resolve: Et,
|
|
1501
|
+
construct: Dt,
|
|
1502
|
+
predicate: Ot,
|
|
1503
|
+
represent: {
|
|
1504
|
+
binary: function(e) {
|
|
1505
|
+
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
1506
|
+
},
|
|
1507
|
+
octal: function(e) {
|
|
1508
|
+
return e >= 0 ? "0o" + e.toString(8) : "-0o" + e.toString(8).slice(1);
|
|
1509
|
+
},
|
|
1510
|
+
decimal: function(e) {
|
|
1511
|
+
return e.toString(10);
|
|
1512
|
+
},
|
|
1513
|
+
hexadecimal: function(e) {
|
|
1514
|
+
return e >= 0 ? "0x" + e.toString(16).toUpperCase() : "-0x" + e.toString(16).toUpperCase().slice(1);
|
|
1515
|
+
}
|
|
1516
|
+
},
|
|
1517
|
+
defaultStyle: "decimal",
|
|
1518
|
+
styleAliases: {
|
|
1519
|
+
binary: [2, "bin"],
|
|
1520
|
+
octal: [8, "oct"],
|
|
1521
|
+
decimal: [10, "dec"],
|
|
1522
|
+
hexadecimal: [16, "hex"]
|
|
1523
|
+
}
|
|
1524
|
+
}), At = /* @__PURE__ */ RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
1525
|
+
function jt(e) {
|
|
1526
|
+
return !(e === null || !At.test(e) || e[e.length - 1] === "_");
|
|
1527
|
+
}
|
|
1528
|
+
function Mt(e) {
|
|
1529
|
+
var t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1;
|
|
1530
|
+
return "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Infinity : -Infinity : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
1531
|
+
}
|
|
1532
|
+
var Nt = /^[-+]?[0-9]+e/;
|
|
1533
|
+
function Pt(e, t) {
|
|
1534
|
+
var n;
|
|
1535
|
+
if (isNaN(e)) switch (t) {
|
|
1536
|
+
case "lowercase": return ".nan";
|
|
1537
|
+
case "uppercase": return ".NAN";
|
|
1538
|
+
case "camelcase": return ".NaN";
|
|
1539
|
+
}
|
|
1540
|
+
else if (e === Infinity) switch (t) {
|
|
1541
|
+
case "lowercase": return ".inf";
|
|
1542
|
+
case "uppercase": return ".INF";
|
|
1543
|
+
case "camelcase": return ".Inf";
|
|
1544
|
+
}
|
|
1545
|
+
else if (e === -Infinity) switch (t) {
|
|
1546
|
+
case "lowercase": return "-.inf";
|
|
1547
|
+
case "uppercase": return "-.INF";
|
|
1548
|
+
case "camelcase": return "-.Inf";
|
|
1549
|
+
}
|
|
1550
|
+
else if (M.isNegativeZero(e)) return "-0.0";
|
|
1551
|
+
return n = e.toString(10), Nt.test(n) ? n.replace("e", ".e") : n;
|
|
1552
|
+
}
|
|
1553
|
+
function Ft(e) {
|
|
1554
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 != 0 || M.isNegativeZero(e));
|
|
1555
|
+
}
|
|
1556
|
+
var It = new P("tag:yaml.org,2002:float", {
|
|
1557
|
+
kind: "scalar",
|
|
1558
|
+
resolve: jt,
|
|
1559
|
+
construct: Mt,
|
|
1560
|
+
predicate: Ft,
|
|
1561
|
+
represent: Pt,
|
|
1562
|
+
defaultStyle: "lowercase"
|
|
1563
|
+
}), Lt = mt.extend({ implicit: [
|
|
1564
|
+
vt,
|
|
1565
|
+
St,
|
|
1566
|
+
kt,
|
|
1567
|
+
It
|
|
1568
|
+
] }), Rt = Lt, zt = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), Bt = /* @__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]))?))?$");
|
|
1569
|
+
function Vt(e) {
|
|
1570
|
+
return e === null ? !1 : zt.exec(e) !== null || Bt.exec(e) !== null;
|
|
1571
|
+
}
|
|
1572
|
+
function Ht(e) {
|
|
1573
|
+
var t, n, r, i, a, o, s, c = 0, l = null, u, d, f;
|
|
1574
|
+
if (t = zt.exec(e), t === null && (t = Bt.exec(e)), t === null) throw Error("Date resolve error");
|
|
1575
|
+
if (n = +t[1], r = t[2] - 1, i = +t[3], !t[4]) return new Date(Date.UTC(n, r, i));
|
|
1576
|
+
if (a = +t[4], o = +t[5], s = +t[6], t[7]) {
|
|
1577
|
+
for (c = t[7].slice(0, 3); c.length < 3;) c += "0";
|
|
1578
|
+
c = +c;
|
|
1579
|
+
}
|
|
1580
|
+
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;
|
|
1581
|
+
}
|
|
1582
|
+
function Ut(e) {
|
|
1583
|
+
return e.toISOString();
|
|
1584
|
+
}
|
|
1585
|
+
var Wt = new P("tag:yaml.org,2002:timestamp", {
|
|
1586
|
+
kind: "scalar",
|
|
1587
|
+
resolve: Vt,
|
|
1588
|
+
construct: Ht,
|
|
1589
|
+
instanceOf: Date,
|
|
1590
|
+
represent: Ut
|
|
1591
|
+
});
|
|
1592
|
+
function Gt(e) {
|
|
1593
|
+
return e === "<<" || e === null;
|
|
1594
|
+
}
|
|
1595
|
+
var Kt = new P("tag:yaml.org,2002:merge", {
|
|
1596
|
+
kind: "scalar",
|
|
1597
|
+
resolve: Gt
|
|
1598
|
+
}), qt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
1599
|
+
function Jt(e) {
|
|
1600
|
+
if (e === null) return !1;
|
|
1601
|
+
var t, n, r = 0, i = e.length, a = qt;
|
|
1602
|
+
for (n = 0; n < i; n++) if (t = a.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1603
|
+
if (t < 0) return !1;
|
|
1604
|
+
r += 6;
|
|
1605
|
+
}
|
|
1606
|
+
return r % 8 == 0;
|
|
1607
|
+
}
|
|
1608
|
+
function Yt(e) {
|
|
1609
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a = qt, o = 0, s = [];
|
|
1610
|
+
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));
|
|
1611
|
+
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);
|
|
1612
|
+
}
|
|
1613
|
+
function Xt(e) {
|
|
1614
|
+
var t = "", n = 0, r, i, a = e.length, o = qt;
|
|
1615
|
+
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];
|
|
1616
|
+
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;
|
|
1617
|
+
}
|
|
1618
|
+
function Zt(e) {
|
|
1619
|
+
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1620
|
+
}
|
|
1621
|
+
var Qt = new P("tag:yaml.org,2002:binary", {
|
|
1622
|
+
kind: "scalar",
|
|
1623
|
+
resolve: Jt,
|
|
1624
|
+
construct: Yt,
|
|
1625
|
+
predicate: Zt,
|
|
1626
|
+
represent: Xt
|
|
1627
|
+
}), $t = Object.prototype.hasOwnProperty, en = Object.prototype.toString;
|
|
1628
|
+
function tn(e) {
|
|
1629
|
+
if (e === null) return !0;
|
|
1630
|
+
var t = [], n, r, i, a, o, s = e;
|
|
1631
|
+
for (n = 0, r = s.length; n < r; n += 1) {
|
|
1632
|
+
if (i = s[n], o = !1, en.call(i) !== "[object Object]") return !1;
|
|
1633
|
+
for (a in i) if ($t.call(i, a)) if (!o) o = !0;
|
|
1634
|
+
else return !1;
|
|
1635
|
+
if (!o) return !1;
|
|
1636
|
+
if (t.indexOf(a) === -1) t.push(a);
|
|
1637
|
+
else return !1;
|
|
1638
|
+
}
|
|
1639
|
+
return !0;
|
|
1640
|
+
}
|
|
1641
|
+
function nn(e) {
|
|
1642
|
+
return e === null ? [] : e;
|
|
1643
|
+
}
|
|
1644
|
+
var rn = new P("tag:yaml.org,2002:omap", {
|
|
1645
|
+
kind: "sequence",
|
|
1646
|
+
resolve: tn,
|
|
1647
|
+
construct: nn
|
|
1648
|
+
}), an = Object.prototype.toString;
|
|
1649
|
+
function on(e) {
|
|
1650
|
+
if (e === null) return !0;
|
|
1651
|
+
var t, n, r, i, a, o = e;
|
|
1652
|
+
for (a = Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1653
|
+
if (r = o[t], an.call(r) !== "[object Object]" || (i = Object.keys(r), i.length !== 1)) return !1;
|
|
1654
|
+
a[t] = [i[0], r[i[0]]];
|
|
1655
|
+
}
|
|
1656
|
+
return !0;
|
|
1657
|
+
}
|
|
1658
|
+
function sn(e) {
|
|
1659
|
+
if (e === null) return [];
|
|
1660
|
+
var t, n, r, i, a, o = e;
|
|
1661
|
+
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]]];
|
|
1662
|
+
return a;
|
|
1663
|
+
}
|
|
1664
|
+
var cn = new P("tag:yaml.org,2002:pairs", {
|
|
1665
|
+
kind: "sequence",
|
|
1666
|
+
resolve: on,
|
|
1667
|
+
construct: sn
|
|
1668
|
+
}), ln = Object.prototype.hasOwnProperty;
|
|
1669
|
+
function un(e) {
|
|
1670
|
+
if (e === null) return !0;
|
|
1671
|
+
var t, n = e;
|
|
1672
|
+
for (t in n) if (ln.call(n, t) && n[t] !== null) return !1;
|
|
1673
|
+
return !0;
|
|
1674
|
+
}
|
|
1675
|
+
function dn(e) {
|
|
1676
|
+
return e === null ? {} : e;
|
|
1677
|
+
}
|
|
1678
|
+
var fn = new P("tag:yaml.org,2002:set", {
|
|
1679
|
+
kind: "mapping",
|
|
1680
|
+
resolve: un,
|
|
1681
|
+
construct: dn
|
|
1682
|
+
}), pn = Rt.extend({
|
|
1683
|
+
implicit: [Wt, Kt],
|
|
1684
|
+
explicit: [
|
|
1685
|
+
Qt,
|
|
1686
|
+
rn,
|
|
1687
|
+
cn,
|
|
1688
|
+
fn
|
|
1689
|
+
]
|
|
1690
|
+
}), F = Object.prototype.hasOwnProperty, mn = 1, hn = 2, gn = 3, _n = 4, vn = 1, yn = 2, bn = 3, xn = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Sn = /[\x85\u2028\u2029]/, Cn = /[,\[\]\{\}]/, wn = /^(?:!|!!|![a-z\-]+!)$/i, Tn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1691
|
+
function En(e) {
|
|
1692
|
+
return Object.prototype.toString.call(e);
|
|
1693
|
+
}
|
|
1694
|
+
function I(e) {
|
|
1695
|
+
return e === 10 || e === 13;
|
|
1696
|
+
}
|
|
1697
|
+
function L(e) {
|
|
1698
|
+
return e === 9 || e === 32;
|
|
1699
|
+
}
|
|
1700
|
+
function R(e) {
|
|
1701
|
+
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1702
|
+
}
|
|
1703
|
+
function z(e) {
|
|
1704
|
+
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1705
|
+
}
|
|
1706
|
+
function Dn(e) {
|
|
1707
|
+
var t;
|
|
1708
|
+
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1709
|
+
}
|
|
1710
|
+
function On(e) {
|
|
1711
|
+
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1712
|
+
}
|
|
1713
|
+
function kn(e) {
|
|
1714
|
+
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1715
|
+
}
|
|
1716
|
+
function An(e) {
|
|
1717
|
+
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" : "";
|
|
1718
|
+
}
|
|
1719
|
+
function jn(e) {
|
|
1720
|
+
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
|
|
1721
|
+
}
|
|
1722
|
+
function Mn(e, t, n) {
|
|
1723
|
+
t === "__proto__" ? Object.defineProperty(e, t, {
|
|
1724
|
+
configurable: !0,
|
|
1725
|
+
enumerable: !0,
|
|
1726
|
+
writable: !0,
|
|
1727
|
+
value: n
|
|
1728
|
+
}) : e[t] = n;
|
|
1729
|
+
}
|
|
1730
|
+
for (var Nn = Array(256), Pn = Array(256), B = 0; B < 256; B++) Nn[B] = +!!An(B), Pn[B] = An(B);
|
|
1731
|
+
function Fn(e, t) {
|
|
1732
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || pn, 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 = [];
|
|
1733
|
+
}
|
|
1734
|
+
function In(e, t) {
|
|
1735
|
+
var n = {
|
|
1736
|
+
name: e.filename,
|
|
1737
|
+
buffer: e.input.slice(0, -1),
|
|
1738
|
+
position: e.position,
|
|
1739
|
+
line: e.line,
|
|
1740
|
+
column: e.position - e.lineStart
|
|
1741
|
+
};
|
|
1742
|
+
return n.snippet = nt(n), new N(t, n);
|
|
1743
|
+
}
|
|
1744
|
+
function V(e, t) {
|
|
1745
|
+
throw In(e, t);
|
|
1746
|
+
}
|
|
1747
|
+
function Ln(e, t) {
|
|
1748
|
+
e.onWarning && e.onWarning.call(null, In(e, t));
|
|
1749
|
+
}
|
|
1750
|
+
var Rn = {
|
|
1751
|
+
YAML: function(e, t, n) {
|
|
1752
|
+
var r, i, a;
|
|
1753
|
+
e.version !== null && V(e, "duplication of %YAML directive"), n.length !== 1 && V(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && V(e, "ill-formed argument of the YAML directive"), i = parseInt(r[1], 10), a = parseInt(r[2], 10), i !== 1 && V(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Ln(e, "unsupported YAML version of the document");
|
|
1754
|
+
},
|
|
1755
|
+
TAG: function(e, t, n) {
|
|
1756
|
+
var r, i;
|
|
1757
|
+
n.length !== 2 && V(e, "TAG directive accepts exactly two arguments"), r = n[0], i = n[1], wn.test(r) || V(e, "ill-formed tag handle (first argument) of the TAG directive"), F.call(e.tagMap, r) && V(e, "there is a previously declared suffix for \"" + r + "\" tag handle"), Tn.test(i) || V(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1758
|
+
try {
|
|
1759
|
+
i = decodeURIComponent(i);
|
|
1760
|
+
} catch {
|
|
1761
|
+
V(e, "tag prefix is malformed: " + i);
|
|
1762
|
+
}
|
|
1763
|
+
e.tagMap[r] = i;
|
|
1764
|
+
}
|
|
1765
|
+
};
|
|
1766
|
+
function H(e, t, n, r) {
|
|
1767
|
+
var i, a, o, s;
|
|
1768
|
+
if (t < n) {
|
|
1769
|
+
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 || V(e, "expected valid JSON character");
|
|
1770
|
+
else xn.test(s) && V(e, "the stream contains non-printable characters");
|
|
1771
|
+
e.result += s;
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
function zn(e, t, n, r) {
|
|
1775
|
+
var i, a, o, s;
|
|
1776
|
+
for (M.isObject(n) || V(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], F.call(t, a) || (Mn(t, a, n[a]), r[a] = !0);
|
|
1777
|
+
}
|
|
1778
|
+
function U(e, t, n, r, i, a, o, s, c) {
|
|
1779
|
+
var l, u;
|
|
1780
|
+
if (Array.isArray(i)) for (i = Array.prototype.slice.call(i), l = 0, u = i.length; l < u; l += 1) Array.isArray(i[l]) && V(e, "nested arrays are not supported inside keys"), typeof i == "object" && En(i[l]) === "[object Object]" && (i[l] = "[object Object]");
|
|
1781
|
+
if (typeof i == "object" && En(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) zn(e, t, a[l], n);
|
|
1782
|
+
else zn(e, t, a, n);
|
|
1783
|
+
else !e.json && !F.call(n, i) && F.call(t, i) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = c || e.position, V(e, "duplicated mapping key")), Mn(t, i, a), delete n[i];
|
|
1784
|
+
return t;
|
|
1785
|
+
}
|
|
1786
|
+
function Bn(e) {
|
|
1787
|
+
var t = e.input.charCodeAt(e.position);
|
|
1788
|
+
t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : V(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1789
|
+
}
|
|
1790
|
+
function W(e, t, n) {
|
|
1791
|
+
for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0;) {
|
|
1792
|
+
for (; L(i);) i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1793
|
+
if (t && i === 35) do
|
|
1794
|
+
i = e.input.charCodeAt(++e.position);
|
|
1795
|
+
while (i !== 10 && i !== 13 && i !== 0);
|
|
1796
|
+
if (I(i)) for (Bn(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32;) e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1797
|
+
else break;
|
|
1798
|
+
}
|
|
1799
|
+
return n !== -1 && r !== 0 && e.lineIndent < n && Ln(e, "deficient indentation"), r;
|
|
1800
|
+
}
|
|
1801
|
+
function Vn(e) {
|
|
1802
|
+
var t = e.position, n = e.input.charCodeAt(t);
|
|
1803
|
+
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 || R(n)));
|
|
1804
|
+
}
|
|
1805
|
+
function Hn(e, t) {
|
|
1806
|
+
t === 1 ? e.result += " " : t > 1 && (e.result += M.repeat("\n", t - 1));
|
|
1807
|
+
}
|
|
1808
|
+
function Un(e, t, n) {
|
|
1809
|
+
var r, i, a, o, s, c, l, u, d = e.kind, f = e.result, p = e.input.charCodeAt(e.position);
|
|
1810
|
+
if (R(p) || z(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), R(i) || n && z(i))) return !1;
|
|
1811
|
+
for (e.kind = "scalar", e.result = "", a = o = e.position, s = !1; p !== 0;) {
|
|
1812
|
+
if (p === 58) {
|
|
1813
|
+
if (i = e.input.charCodeAt(e.position + 1), R(i) || n && z(i)) break;
|
|
1814
|
+
} else if (p === 35) {
|
|
1815
|
+
if (r = e.input.charCodeAt(e.position - 1), R(r)) break;
|
|
1816
|
+
} else if (e.position === e.lineStart && Vn(e) || n && z(p)) break;
|
|
1817
|
+
else if (I(p)) if (c = e.line, l = e.lineStart, u = e.lineIndent, W(e, !1, -1), e.lineIndent >= t) {
|
|
1818
|
+
s = !0, p = e.input.charCodeAt(e.position);
|
|
1819
|
+
continue;
|
|
1820
|
+
} else {
|
|
1821
|
+
e.position = o, e.line = c, e.lineStart = l, e.lineIndent = u;
|
|
1822
|
+
break;
|
|
1823
|
+
}
|
|
1824
|
+
s &&= (H(e, a, o, !1), Hn(e, e.line - c), a = o = e.position, !1), L(p) || (o = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1825
|
+
}
|
|
1826
|
+
return H(e, a, o, !1), e.result ? !0 : (e.kind = d, e.result = f, !1);
|
|
1827
|
+
}
|
|
1828
|
+
function Wn(e, t) {
|
|
1829
|
+
var n = e.input.charCodeAt(e.position), r, i;
|
|
1830
|
+
if (n !== 39) return !1;
|
|
1831
|
+
for (e.kind = "scalar", e.result = "", e.position++, r = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0;) if (n === 39) if (H(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39) r = e.position, e.position++, i = e.position;
|
|
1832
|
+
else return !0;
|
|
1833
|
+
else I(n) ? (H(e, r, i, !0), Hn(e, W(e, !1, t)), r = i = e.position) : e.position === e.lineStart && Vn(e) ? V(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1834
|
+
V(e, "unexpected end of the stream within a single quoted scalar");
|
|
1835
|
+
}
|
|
1836
|
+
function Gn(e, t) {
|
|
1837
|
+
var n, r, i, a, o, s = e.input.charCodeAt(e.position);
|
|
1838
|
+
if (s !== 34) return !1;
|
|
1839
|
+
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0;) if (s === 34) return H(e, n, e.position, !0), e.position++, !0;
|
|
1840
|
+
else if (s === 92) {
|
|
1841
|
+
if (H(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), I(s)) W(e, !1, t);
|
|
1842
|
+
else if (s < 256 && Nn[s]) e.result += Pn[s], e.position++;
|
|
1843
|
+
else if ((o = On(s)) > 0) {
|
|
1844
|
+
for (i = o, a = 0; i > 0; i--) s = e.input.charCodeAt(++e.position), (o = Dn(s)) >= 0 ? a = (a << 4) + o : V(e, "expected hexadecimal character");
|
|
1845
|
+
e.result += jn(a), e.position++;
|
|
1846
|
+
} else V(e, "unknown escape sequence");
|
|
1847
|
+
n = r = e.position;
|
|
1848
|
+
} else I(s) ? (H(e, n, r, !0), Hn(e, W(e, !1, t)), n = r = e.position) : e.position === e.lineStart && Vn(e) ? V(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1849
|
+
V(e, "unexpected end of the stream within a double quoted scalar");
|
|
1850
|
+
}
|
|
1851
|
+
function Kn(e, t) {
|
|
1852
|
+
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);
|
|
1853
|
+
if (v === 91) u = 93, p = !1, s = [];
|
|
1854
|
+
else if (v === 123) u = 125, p = !0, s = {};
|
|
1855
|
+
else return !1;
|
|
1856
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), v = e.input.charCodeAt(++e.position); v !== 0;) {
|
|
1857
|
+
if (W(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;
|
|
1858
|
+
n ? v === 44 && V(e, "expected the node content, but found ','") : V(e, "missed comma between flow collection entries"), g = h = _ = null, d = f = !1, v === 63 && (l = e.input.charCodeAt(e.position + 1), R(l) && (d = f = !0, e.position++, W(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, G(e, t, mn, !1, !0), g = e.tag, h = e.result, W(e, !0, t), v = e.input.charCodeAt(e.position), (f || e.line === r) && v === 58 && (d = !0, v = e.input.charCodeAt(++e.position), W(e, !0, t), G(e, t, mn, !1, !0), _ = e.result), p ? U(e, s, m, g, h, _, r, i, a) : d ? s.push(U(e, null, m, g, h, _, r, i, a)) : s.push(h), W(e, !0, t), v = e.input.charCodeAt(e.position), v === 44 ? (n = !0, v = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1859
|
+
}
|
|
1860
|
+
V(e, "unexpected end of the stream within a flow collection");
|
|
1861
|
+
}
|
|
1862
|
+
function qn(e, t) {
|
|
1863
|
+
var n, r, i = vn, a = !1, o = !1, s = t, c = 0, l = !1, u, d = e.input.charCodeAt(e.position);
|
|
1864
|
+
if (d === 124) r = !1;
|
|
1865
|
+
else if (d === 62) r = !0;
|
|
1866
|
+
else return !1;
|
|
1867
|
+
for (e.kind = "scalar", e.result = ""; d !== 0;) if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45) vn === i ? i = d === 43 ? bn : yn : V(e, "repeat of a chomping mode identifier");
|
|
1868
|
+
else if ((u = kn(d)) >= 0) u === 0 ? V(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? V(e, "repeat of an indentation width identifier") : (s = t + u - 1, o = !0);
|
|
1869
|
+
else break;
|
|
1870
|
+
if (L(d)) {
|
|
1871
|
+
do
|
|
1872
|
+
d = e.input.charCodeAt(++e.position);
|
|
1873
|
+
while (L(d));
|
|
1874
|
+
if (d === 35) do
|
|
1875
|
+
d = e.input.charCodeAt(++e.position);
|
|
1876
|
+
while (!I(d) && d !== 0);
|
|
1877
|
+
}
|
|
1878
|
+
for (; d !== 0;) {
|
|
1879
|
+
for (Bn(e), e.lineIndent = 0, d = e.input.charCodeAt(e.position); (!o || e.lineIndent < s) && d === 32;) e.lineIndent++, d = e.input.charCodeAt(++e.position);
|
|
1880
|
+
if (!o && e.lineIndent > s && (s = e.lineIndent), I(d)) {
|
|
1881
|
+
c++;
|
|
1882
|
+
continue;
|
|
1883
|
+
}
|
|
1884
|
+
if (e.lineIndent < s) {
|
|
1885
|
+
i === bn ? e.result += M.repeat("\n", a ? 1 + c : c) : i === vn && a && (e.result += "\n");
|
|
1886
|
+
break;
|
|
1887
|
+
}
|
|
1888
|
+
for (r ? L(d) ? (l = !0, e.result += M.repeat("\n", a ? 1 + c : c)) : l ? (l = !1, e.result += M.repeat("\n", c + 1)) : c === 0 ? a && (e.result += " ") : e.result += M.repeat("\n", c) : e.result += M.repeat("\n", a ? 1 + c : c), a = !0, o = !0, c = 0, n = e.position; !I(d) && d !== 0;) d = e.input.charCodeAt(++e.position);
|
|
1889
|
+
H(e, n, e.position, !1);
|
|
1890
|
+
}
|
|
1891
|
+
return !0;
|
|
1892
|
+
}
|
|
1893
|
+
function Jn(e, t) {
|
|
1894
|
+
var n, r = e.tag, i = e.anchor, a = [], o, s = !1, c;
|
|
1895
|
+
if (e.firstTabInLine !== -1) return !1;
|
|
1896
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, V(e, "tab characters must not be used in indentation")), !(c !== 45 || (o = e.input.charCodeAt(e.position + 1), !R(o))));) {
|
|
1897
|
+
if (s = !0, e.position++, W(e, !0, -1) && e.lineIndent <= t) {
|
|
1898
|
+
a.push(null), c = e.input.charCodeAt(e.position);
|
|
1899
|
+
continue;
|
|
1900
|
+
}
|
|
1901
|
+
if (n = e.line, G(e, t, gn, !1, !0), a.push(e.result), W(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && c !== 0) V(e, "bad indentation of a sequence entry");
|
|
1902
|
+
else if (e.lineIndent < t) break;
|
|
1903
|
+
}
|
|
1904
|
+
return s ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1905
|
+
}
|
|
1906
|
+
function Yn(e, t, n) {
|
|
1907
|
+
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;
|
|
1908
|
+
if (e.firstTabInLine !== -1) return !1;
|
|
1909
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = d), v = e.input.charCodeAt(e.position); v !== 0;) {
|
|
1910
|
+
if (!g && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, V(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (v === 63 || v === 58) && R(r)) v === 63 ? (g && (U(e, d, f, p, m, null, o, s, c), p = m = h = null), _ = !0, g = !0, i = !0) : g ? (g = !1, i = !0) : V(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = r;
|
|
1911
|
+
else {
|
|
1912
|
+
if (o = e.line, s = e.lineStart, c = e.position, !G(e, n, hn, !1, !0)) break;
|
|
1913
|
+
if (e.line === a) {
|
|
1914
|
+
for (v = e.input.charCodeAt(e.position); L(v);) v = e.input.charCodeAt(++e.position);
|
|
1915
|
+
if (v === 58) v = e.input.charCodeAt(++e.position), R(v) || V(e, "a whitespace character is expected after the key-value separator within a block mapping"), g && (U(e, d, f, p, m, null, o, s, c), p = m = h = null), _ = !0, g = !1, i = !1, p = e.tag, m = e.result;
|
|
1916
|
+
else if (_) V(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1917
|
+
else return e.tag = l, e.anchor = u, !0;
|
|
1918
|
+
} else if (_) V(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1919
|
+
else return e.tag = l, e.anchor = u, !0;
|
|
1920
|
+
}
|
|
1921
|
+
if ((e.line === a || e.lineIndent > t) && (g && (o = e.line, s = e.lineStart, c = e.position), G(e, t, _n, !0, i) && (g ? m = e.result : h = e.result), g || (U(e, d, f, p, m, h, o, s, c), p = m = h = null), W(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && v !== 0) V(e, "bad indentation of a mapping entry");
|
|
1922
|
+
else if (e.lineIndent < t) break;
|
|
1923
|
+
}
|
|
1924
|
+
return g && U(e, d, f, p, m, null, o, s, c), _ && (e.tag = l, e.anchor = u, e.kind = "mapping", e.result = d), _;
|
|
1925
|
+
}
|
|
1926
|
+
function Xn(e) {
|
|
1927
|
+
var t, n = !1, r = !1, i, a, o = e.input.charCodeAt(e.position);
|
|
1928
|
+
if (o !== 33) return !1;
|
|
1929
|
+
if (e.tag !== null && V(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) {
|
|
1930
|
+
do
|
|
1931
|
+
o = e.input.charCodeAt(++e.position);
|
|
1932
|
+
while (o !== 0 && o !== 62);
|
|
1933
|
+
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : V(e, "unexpected end of the stream within a verbatim tag");
|
|
1934
|
+
} else {
|
|
1935
|
+
for (; o !== 0 && !R(o);) o === 33 && (r ? V(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), wn.test(i) || V(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
1936
|
+
a = e.input.slice(t, e.position), Cn.test(a) && V(e, "tag suffix cannot contain flow indicator characters");
|
|
1937
|
+
}
|
|
1938
|
+
a && !Tn.test(a) && V(e, "tag name cannot contain such characters: " + a);
|
|
1939
|
+
try {
|
|
1940
|
+
a = decodeURIComponent(a);
|
|
1941
|
+
} catch {
|
|
1942
|
+
V(e, "tag name is malformed: " + a);
|
|
1943
|
+
}
|
|
1944
|
+
return n ? e.tag = a : F.call(e.tagMap, i) ? e.tag = e.tagMap[i] + a : i === "!" ? e.tag = "!" + a : i === "!!" ? e.tag = "tag:yaml.org,2002:" + a : V(e, "undeclared tag handle \"" + i + "\""), !0;
|
|
1945
|
+
}
|
|
1946
|
+
function Zn(e) {
|
|
1947
|
+
var t, n = e.input.charCodeAt(e.position);
|
|
1948
|
+
if (n !== 38) return !1;
|
|
1949
|
+
for (e.anchor !== null && V(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !R(n) && !z(n);) n = e.input.charCodeAt(++e.position);
|
|
1950
|
+
return e.position === t && V(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1951
|
+
}
|
|
1952
|
+
function Qn(e) {
|
|
1953
|
+
var t, n, r = e.input.charCodeAt(e.position);
|
|
1954
|
+
if (r !== 42) return !1;
|
|
1955
|
+
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !R(r) && !z(r);) r = e.input.charCodeAt(++e.position);
|
|
1956
|
+
return e.position === t && V(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), F.call(e.anchorMap, n) || V(e, "unidentified alias \"" + n + "\""), e.result = e.anchorMap[n], W(e, !0, -1), !0;
|
|
1957
|
+
}
|
|
1958
|
+
function G(e, t, n, r, i) {
|
|
1959
|
+
var a, o, s, c = 1, l = !1, u = !1, d, f, p, m, h, g;
|
|
1960
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = s = _n === n || gn === n, r && W(e, !0, -1) && (l = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1) for (; Xn(e) || Zn(e);) W(e, !0, -1) ? (l = !0, s = a, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : s = !1;
|
|
1961
|
+
if (s &&= l || i, (c === 1 || _n === n) && (h = mn === n || hn === n ? t : t + 1, g = e.position - e.lineStart, c === 1 ? s && (Jn(e, g) || Yn(e, g, h)) || Kn(e, h) ? u = !0 : (o && qn(e, h) || Wn(e, h) || Gn(e, h) ? u = !0 : Qn(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && V(e, "alias node should not have any properties")) : Un(e, h, mn === n) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (u = s && Jn(e, g))), e.tag === null) e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1962
|
+
else if (e.tag === "?") {
|
|
1963
|
+
for (e.result !== null && e.kind !== "scalar" && V(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)) {
|
|
1964
|
+
e.result = m.construct(e.result), e.tag = m.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1965
|
+
break;
|
|
1966
|
+
}
|
|
1967
|
+
} else if (e.tag !== "!") {
|
|
1968
|
+
if (F.call(e.typeMap[e.kind || "fallback"], e.tag)) m = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1969
|
+
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) {
|
|
1970
|
+
m = p[d];
|
|
1971
|
+
break;
|
|
1972
|
+
}
|
|
1973
|
+
m || V(e, "unknown tag !<" + e.tag + ">"), e.result !== null && m.kind !== e.kind && V(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)) : V(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1974
|
+
}
|
|
1975
|
+
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || u;
|
|
1976
|
+
}
|
|
1977
|
+
function $n(e) {
|
|
1978
|
+
var t = e.position, n, r, i, a = !1, o;
|
|
1979
|
+
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 && (W(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37));) {
|
|
1980
|
+
for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !R(o);) o = e.input.charCodeAt(++e.position);
|
|
1981
|
+
for (r = e.input.slice(n, e.position), i = [], r.length < 1 && V(e, "directive name must not be less than one character in length"); o !== 0;) {
|
|
1982
|
+
for (; L(o);) o = e.input.charCodeAt(++e.position);
|
|
1983
|
+
if (o === 35) {
|
|
1984
|
+
do
|
|
1985
|
+
o = e.input.charCodeAt(++e.position);
|
|
1986
|
+
while (o !== 0 && !I(o));
|
|
1987
|
+
break;
|
|
1988
|
+
}
|
|
1989
|
+
if (I(o)) break;
|
|
1990
|
+
for (n = e.position; o !== 0 && !R(o);) o = e.input.charCodeAt(++e.position);
|
|
1991
|
+
i.push(e.input.slice(n, e.position));
|
|
1992
|
+
}
|
|
1993
|
+
o !== 0 && Bn(e), F.call(Rn, r) ? Rn[r](e, r, i) : Ln(e, "unknown document directive \"" + r + "\"");
|
|
1994
|
+
}
|
|
1995
|
+
if (W(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, W(e, !0, -1)) : a && V(e, "directives end mark is expected"), G(e, e.lineIndent - 1, _n, !1, !0), W(e, !0, -1), e.checkLineBreaks && Sn.test(e.input.slice(t, e.position)) && Ln(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Vn(e)) {
|
|
1996
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, W(e, !0, -1));
|
|
1997
|
+
return;
|
|
1998
|
+
}
|
|
1999
|
+
if (e.position < e.length - 1) V(e, "end of the stream or a document separator is expected");
|
|
2000
|
+
else return;
|
|
2001
|
+
}
|
|
2002
|
+
function er(e, t) {
|
|
2003
|
+
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)));
|
|
2004
|
+
var n = new Fn(e, t), r = e.indexOf("\0");
|
|
2005
|
+
for (r !== -1 && (n.position = r, V(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32;) n.lineIndent += 1, n.position += 1;
|
|
2006
|
+
for (; n.position < n.length - 1;) $n(n);
|
|
2007
|
+
return n.documents;
|
|
2008
|
+
}
|
|
2009
|
+
function tr(e, t, n) {
|
|
2010
|
+
typeof t == "object" && t && n === void 0 && (n = t, t = null);
|
|
2011
|
+
var r = er(e, n);
|
|
2012
|
+
if (typeof t != "function") return r;
|
|
2013
|
+
for (var i = 0, a = r.length; i < a; i += 1) t(r[i]);
|
|
2014
|
+
}
|
|
2015
|
+
function nr(e, t) {
|
|
2016
|
+
var n = er(e, t);
|
|
2017
|
+
if (n.length !== 0) {
|
|
2018
|
+
if (n.length === 1) return n[0];
|
|
2019
|
+
throw new N("expected a single document in the stream, but found more");
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
var rr = {
|
|
2023
|
+
loadAll: tr,
|
|
2024
|
+
load: nr
|
|
2025
|
+
}, ir = Object.prototype.toString, ar = Object.prototype.hasOwnProperty, or = 65279, sr = 9, K = 10, cr = 13, lr = 32, ur = 33, dr = 34, fr = 35, pr = 37, mr = 38, hr = 39, gr = 42, _r = 44, vr = 45, yr = 58, br = 61, xr = 62, Sr = 63, Cr = 64, wr = 91, Tr = 93, Er = 96, Dr = 123, Or = 124, kr = 125, q = {};
|
|
2026
|
+
q[0] = "\\0", q[7] = "\\a", q[8] = "\\b", q[9] = "\\t", q[10] = "\\n", q[11] = "\\v", q[12] = "\\f", q[13] = "\\r", q[27] = "\\e", q[34] = "\\\"", q[92] = "\\\\", q[133] = "\\N", q[160] = "\\_", q[8232] = "\\L", q[8233] = "\\P";
|
|
2027
|
+
var Ar = [
|
|
2028
|
+
"y",
|
|
2029
|
+
"Y",
|
|
2030
|
+
"yes",
|
|
2031
|
+
"Yes",
|
|
2032
|
+
"YES",
|
|
2033
|
+
"on",
|
|
2034
|
+
"On",
|
|
2035
|
+
"ON",
|
|
2036
|
+
"n",
|
|
2037
|
+
"N",
|
|
2038
|
+
"no",
|
|
2039
|
+
"No",
|
|
2040
|
+
"NO",
|
|
2041
|
+
"off",
|
|
2042
|
+
"Off",
|
|
2043
|
+
"OFF"
|
|
2044
|
+
], jr = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2045
|
+
function Mr(e, t) {
|
|
2046
|
+
var n, r, i, a, o, s, c;
|
|
2047
|
+
if (t === null) return {};
|
|
2048
|
+
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 && ar.call(c.styleAliases, s) && (s = c.styleAliases[s]), n[o] = s;
|
|
2049
|
+
return n;
|
|
2050
|
+
}
|
|
2051
|
+
function Nr(e) {
|
|
2052
|
+
var t = e.toString(16).toUpperCase(), n, r;
|
|
2053
|
+
if (e <= 255) n = "x", r = 2;
|
|
2054
|
+
else if (e <= 65535) n = "u", r = 4;
|
|
2055
|
+
else if (e <= 4294967295) n = "U", r = 8;
|
|
2056
|
+
else throw new N("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2057
|
+
return "\\" + n + M.repeat("0", r - t.length) + t;
|
|
2058
|
+
}
|
|
2059
|
+
var Pr = 1, J = 2;
|
|
2060
|
+
function Fr(e) {
|
|
2061
|
+
this.schema = e.schema || pn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = M.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Mr(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 === "\"" ? J : Pr, 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;
|
|
2062
|
+
}
|
|
2063
|
+
function Ir(e, t) {
|
|
2064
|
+
for (var n = M.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;
|
|
2065
|
+
return a;
|
|
2066
|
+
}
|
|
2067
|
+
function Lr(e, t) {
|
|
2068
|
+
return "\n" + M.repeat(" ", e.indent * t);
|
|
2069
|
+
}
|
|
2070
|
+
function Rr(e, t) {
|
|
2071
|
+
var n, r, i;
|
|
2072
|
+
for (n = 0, r = e.implicitTypes.length; n < r; n += 1) if (i = e.implicitTypes[n], i.resolve(t)) return !0;
|
|
2073
|
+
return !1;
|
|
2074
|
+
}
|
|
2075
|
+
function zr(e) {
|
|
2076
|
+
return e === lr || e === sr;
|
|
2077
|
+
}
|
|
2078
|
+
function Br(e) {
|
|
2079
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== or || 65536 <= e && e <= 1114111;
|
|
2080
|
+
}
|
|
2081
|
+
function Vr(e) {
|
|
2082
|
+
return Br(e) && e !== or && e !== cr && e !== K;
|
|
2083
|
+
}
|
|
2084
|
+
function Hr(e, t, n) {
|
|
2085
|
+
var r = Vr(e), i = r && !zr(e);
|
|
2086
|
+
return (n ? r : r && e !== _r && e !== wr && e !== Tr && e !== Dr && e !== kr) && e !== fr && !(t === yr && !i) || Vr(t) && !zr(t) && e === fr || t === yr && i;
|
|
2087
|
+
}
|
|
2088
|
+
function Ur(e) {
|
|
2089
|
+
return Br(e) && e !== or && !zr(e) && e !== vr && e !== Sr && e !== yr && e !== _r && e !== wr && e !== Tr && e !== Dr && e !== kr && e !== fr && e !== mr && e !== gr && e !== ur && e !== Or && e !== br && e !== xr && e !== hr && e !== dr && e !== pr && e !== Cr && e !== Er;
|
|
2090
|
+
}
|
|
2091
|
+
function Wr(e) {
|
|
2092
|
+
return !zr(e) && e !== yr;
|
|
2093
|
+
}
|
|
2094
|
+
function Y(e, t) {
|
|
2095
|
+
var n = e.charCodeAt(t), r;
|
|
2096
|
+
return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
|
|
2097
|
+
}
|
|
2098
|
+
function Gr(e) {
|
|
2099
|
+
return /^\n* /.test(e);
|
|
2100
|
+
}
|
|
2101
|
+
var Kr = 1, qr = 2, Jr = 3, Yr = 4, X = 5;
|
|
2102
|
+
function Xr(e, t, n, r, i, a, o, s) {
|
|
2103
|
+
var c, l = 0, u = null, d = !1, f = !1, p = r !== -1, m = -1, h = Ur(Y(e, 0)) && Wr(Y(e, e.length - 1));
|
|
2104
|
+
if (t || o) for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
2105
|
+
if (l = Y(e, c), !Br(l)) return X;
|
|
2106
|
+
h &&= Hr(l, u, s), u = l;
|
|
2107
|
+
}
|
|
2108
|
+
else {
|
|
2109
|
+
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
2110
|
+
if (l = Y(e, c), l === K) d = !0, p && (f ||= c - m - 1 > r && e[m + 1] !== " ", m = c);
|
|
2111
|
+
else if (!Br(l)) return X;
|
|
2112
|
+
h &&= Hr(l, u, s), u = l;
|
|
2113
|
+
}
|
|
2114
|
+
f ||= p && c - m - 1 > r && e[m + 1] !== " ";
|
|
2115
|
+
}
|
|
2116
|
+
return !d && !f ? h && !o && !i(e) ? Kr : a === J ? X : qr : n > 9 && Gr(e) ? X : o ? a === J ? X : qr : f ? Yr : Jr;
|
|
2117
|
+
}
|
|
2118
|
+
function Zr(e, t, n, r, i) {
|
|
2119
|
+
e.dump = function() {
|
|
2120
|
+
if (t.length === 0) return e.quotingType === J ? "\"\"" : "''";
|
|
2121
|
+
if (!e.noCompatMode && (Ar.indexOf(t) !== -1 || jr.test(t))) return e.quotingType === J ? "\"" + t + "\"" : "'" + t + "'";
|
|
2122
|
+
var a = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2123
|
+
function c(t) {
|
|
2124
|
+
return Rr(e, t);
|
|
2125
|
+
}
|
|
2126
|
+
switch (Xr(t, s, e.indent, o, c, e.quotingType, e.forceQuotes && !r, i)) {
|
|
2127
|
+
case Kr: return t;
|
|
2128
|
+
case qr: return "'" + t.replace(/'/g, "''") + "'";
|
|
2129
|
+
case Jr: return "|" + Qr(t, e.indent) + $r(Ir(t, a));
|
|
2130
|
+
case Yr: return ">" + Qr(t, e.indent) + $r(Ir(ei(t, o), a));
|
|
2131
|
+
case X: return "\"" + ni(t) + "\"";
|
|
2132
|
+
default: throw new N("impossible error: invalid scalar style");
|
|
2133
|
+
}
|
|
2134
|
+
}();
|
|
2135
|
+
}
|
|
2136
|
+
function Qr(e, t) {
|
|
2137
|
+
var n = Gr(e) ? String(t) : "", r = e[e.length - 1] === "\n";
|
|
2138
|
+
return n + (r && (e[e.length - 2] === "\n" || e === "\n") ? "+" : r ? "" : "-") + "\n";
|
|
2139
|
+
}
|
|
2140
|
+
function $r(e) {
|
|
2141
|
+
return e[e.length - 1] === "\n" ? e.slice(0, -1) : e;
|
|
2142
|
+
}
|
|
2143
|
+
function ei(e, t) {
|
|
2144
|
+
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2145
|
+
var r = e.indexOf("\n");
|
|
2146
|
+
return r = r === -1 ? e.length : r, n.lastIndex = r, ti(e.slice(0, r), t);
|
|
2147
|
+
}(), i = e[0] === "\n" || e[0] === " ", a, o; o = n.exec(e);) {
|
|
2148
|
+
var s = o[1], c = o[2];
|
|
2149
|
+
a = c[0] === " ", r += s + (!i && !a && c !== "" ? "\n" : "") + ti(c, t), i = a;
|
|
2150
|
+
}
|
|
2151
|
+
return r;
|
|
2152
|
+
}
|
|
2153
|
+
function ti(e, t) {
|
|
2154
|
+
if (e === "" || e[0] === " ") return e;
|
|
2155
|
+
for (var n = / [^ ]/g, r, i = 0, a, o = 0, s = 0, c = ""; r = n.exec(e);) s = r.index, s - i > t && (a = o > i ? o : s, c += "\n" + e.slice(i, a), i = a + 1), o = s;
|
|
2156
|
+
return c += "\n", e.length - i > t && o > i ? c += e.slice(i, o) + "\n" + e.slice(o + 1) : c += e.slice(i), c.slice(1);
|
|
2157
|
+
}
|
|
2158
|
+
function ni(e) {
|
|
2159
|
+
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++) n = Y(e, i), r = q[n], !r && Br(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || Nr(n);
|
|
2160
|
+
return t;
|
|
2161
|
+
}
|
|
2162
|
+
function ri(e, t, n) {
|
|
2163
|
+
var r = "", i = e.tag, a, o, s;
|
|
2164
|
+
for (a = 0, o = n.length; a < o; a += 1) s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (Z(e, t, s, !1, !1) || s === void 0 && Z(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2165
|
+
e.tag = i, e.dump = "[" + r + "]";
|
|
2166
|
+
}
|
|
2167
|
+
function ii(e, t, n, r) {
|
|
2168
|
+
var i = "", a = e.tag, o, s, c;
|
|
2169
|
+
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 += Lr(e, t)), e.dump && K === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2170
|
+
e.tag = a, e.dump = i || "[]";
|
|
2171
|
+
}
|
|
2172
|
+
function ai(e, t, n) {
|
|
2173
|
+
var r = "", i = e.tag, a = Object.keys(n), o, s, c, l, u;
|
|
2174
|
+
for (o = 0, s = a.length; o < s; o += 1) u = "", r !== "" && (u += ", "), e.condenseFlow && (u += "\""), c = a[o], l = n[c], e.replacer && (l = e.replacer.call(n, c, l)), Z(e, t, c, !1, !1) && (e.dump.length > 1024 && (u += "? "), u += e.dump + (e.condenseFlow ? "\"" : "") + ":" + (e.condenseFlow ? "" : " "), Z(e, t, l, !1, !1) && (u += e.dump, r += u));
|
|
2175
|
+
e.tag = i, e.dump = "{" + r + "}";
|
|
2176
|
+
}
|
|
2177
|
+
function oi(e, t, n, r) {
|
|
2178
|
+
var i = "", a = e.tag, o = Object.keys(n), s, c, l, u, d, f;
|
|
2179
|
+
if (e.sortKeys === !0) o.sort();
|
|
2180
|
+
else if (typeof e.sortKeys == "function") o.sort(e.sortKeys);
|
|
2181
|
+
else if (e.sortKeys) throw new N("sortKeys must be a boolean or a function");
|
|
2182
|
+
for (s = 0, c = o.length; s < c; s += 1) f = "", (!r || i !== "") && (f += Lr(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 && K === e.dump.charCodeAt(0) ? f += "?" : f += "? "), f += e.dump, d && (f += Lr(e, t)), Z(e, t + 1, u, !0, d) && (e.dump && K === e.dump.charCodeAt(0) ? f += ":" : f += ": ", f += e.dump, i += f));
|
|
2183
|
+
e.tag = a, e.dump = i || "{}";
|
|
2184
|
+
}
|
|
2185
|
+
function si(e, t, n) {
|
|
2186
|
+
var r, i = n ? e.explicitTypes : e.implicitTypes, a, o, s, c;
|
|
2187
|
+
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))) {
|
|
2188
|
+
if (n ? s.multi && s.representName ? e.tag = s.representName(t) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2189
|
+
if (c = e.styleMap[s.tag] || s.defaultStyle, ir.call(s.represent) === "[object Function]") r = s.represent(t, c);
|
|
2190
|
+
else if (ar.call(s.represent, c)) r = s.represent[c](t, c);
|
|
2191
|
+
else throw new N("!<" + s.tag + "> tag resolver accepts not \"" + c + "\" style");
|
|
2192
|
+
e.dump = r;
|
|
2193
|
+
}
|
|
2194
|
+
return !0;
|
|
2195
|
+
}
|
|
2196
|
+
return !1;
|
|
2197
|
+
}
|
|
2198
|
+
function Z(e, t, n, r, i, a, o) {
|
|
2199
|
+
e.tag = null, e.dump = n, si(e, n, !1) || si(e, n, !0);
|
|
2200
|
+
var s = ir.call(e.dump), c = r, l;
|
|
2201
|
+
r &&= e.flowLevel < 0 || e.flowLevel > t;
|
|
2202
|
+
var u = s === "[object Object]" || s === "[object Array]", d, f;
|
|
2203
|
+
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;
|
|
2204
|
+
else {
|
|
2205
|
+
if (u && f && !e.usedDuplicates[d] && (e.usedDuplicates[d] = !0), s === "[object Object]") r && Object.keys(e.dump).length !== 0 ? (oi(e, t, e.dump, i), f && (e.dump = "&ref_" + d + e.dump)) : (ai(e, t, e.dump), f && (e.dump = "&ref_" + d + " " + e.dump));
|
|
2206
|
+
else if (s === "[object Array]") r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? ii(e, t - 1, e.dump, i) : ii(e, t, e.dump, i), f && (e.dump = "&ref_" + d + e.dump)) : (ri(e, t, e.dump), f && (e.dump = "&ref_" + d + " " + e.dump));
|
|
2207
|
+
else if (s === "[object String]") e.tag !== "?" && Zr(e, e.dump, t, a, c);
|
|
2208
|
+
else if (s === "[object Undefined]") return !1;
|
|
2209
|
+
else {
|
|
2210
|
+
if (e.skipInvalid) return !1;
|
|
2211
|
+
throw new N("unacceptable kind of an object to dump " + s);
|
|
2212
|
+
}
|
|
2213
|
+
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);
|
|
2214
|
+
}
|
|
2215
|
+
return !0;
|
|
2216
|
+
}
|
|
2217
|
+
function ci(e, t) {
|
|
2218
|
+
var n = [], r = [], i, a;
|
|
2219
|
+
for (li(e, n, r), i = 0, a = r.length; i < a; i += 1) t.duplicates.push(n[r[i]]);
|
|
2220
|
+
t.usedDuplicates = Array(a);
|
|
2221
|
+
}
|
|
2222
|
+
function li(e, t, n) {
|
|
2223
|
+
var r, i, a;
|
|
2224
|
+
if (typeof e == "object" && e) if (i = t.indexOf(e), i !== -1) n.indexOf(i) === -1 && n.push(i);
|
|
2225
|
+
else if (t.push(e), Array.isArray(e)) for (i = 0, a = e.length; i < a; i += 1) li(e[i], t, n);
|
|
2226
|
+
else for (r = Object.keys(e), i = 0, a = r.length; i < a; i += 1) li(e[r[i]], t, n);
|
|
2227
|
+
}
|
|
2228
|
+
function ui(e, t) {
|
|
2229
|
+
t ||= {};
|
|
2230
|
+
var n = new Fr(t);
|
|
2231
|
+
n.noRefs || ci(e, n);
|
|
2232
|
+
var r = e;
|
|
2233
|
+
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), Z(n, 0, r, !0, !0) ? n.dump + "\n" : "";
|
|
2234
|
+
}
|
|
2235
|
+
var di = { dump: ui };
|
|
2236
|
+
function fi(e, t) {
|
|
2237
|
+
return function() {
|
|
2238
|
+
throw Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2239
|
+
};
|
|
2240
|
+
}
|
|
2241
|
+
var pi = {
|
|
2242
|
+
Type: P,
|
|
2243
|
+
Schema: ut,
|
|
2244
|
+
FAILSAFE_SCHEMA: mt,
|
|
2245
|
+
JSON_SCHEMA: Lt,
|
|
2246
|
+
CORE_SCHEMA: Rt,
|
|
2247
|
+
DEFAULT_SCHEMA: pn,
|
|
2248
|
+
load: rr.load,
|
|
2249
|
+
loadAll: rr.loadAll,
|
|
2250
|
+
dump: di.dump,
|
|
2251
|
+
YAMLException: N,
|
|
2252
|
+
types: {
|
|
2253
|
+
binary: Qt,
|
|
2254
|
+
float: It,
|
|
2255
|
+
map: pt,
|
|
2256
|
+
null: vt,
|
|
2257
|
+
pairs: cn,
|
|
2258
|
+
set: fn,
|
|
2259
|
+
timestamp: Wt,
|
|
2260
|
+
bool: St,
|
|
2261
|
+
int: kt,
|
|
2262
|
+
merge: Kt,
|
|
2263
|
+
omap: rn,
|
|
2264
|
+
seq: ft,
|
|
2265
|
+
str: dt
|
|
2266
|
+
},
|
|
2267
|
+
safeLoad: fi("safeLoad", "load"),
|
|
2268
|
+
safeLoadAll: fi("safeLoadAll", "loadAll"),
|
|
2269
|
+
safeDump: fi("safeDump", "dump")
|
|
2270
|
+
}, mi = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), hi = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), gi = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), _i = (e) => {
|
|
2271
|
+
let t = gi(e);
|
|
2272
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2273
|
+
}, vi = {
|
|
2274
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2275
|
+
width: 24,
|
|
2276
|
+
height: 24,
|
|
2277
|
+
viewBox: "0 0 24 24",
|
|
2278
|
+
fill: "none",
|
|
2279
|
+
stroke: "currentColor",
|
|
2280
|
+
strokeWidth: 2,
|
|
2281
|
+
strokeLinecap: "round",
|
|
2282
|
+
strokeLinejoin: "round"
|
|
2283
|
+
}, yi = (e) => {
|
|
2284
|
+
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
2285
|
+
return !1;
|
|
2286
|
+
}, bi = c({}), xi = () => p(bi), Si = u(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...s }, c) => {
|
|
2287
|
+
let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: f = !1, color: p = "currentColor", className: m = "" } = xi() ?? {}, h = r ?? f ? Number(n ?? d) * 24 / Number(t ?? u) : n ?? d;
|
|
2288
|
+
return l("svg", {
|
|
2289
|
+
ref: c,
|
|
2290
|
+
...vi,
|
|
2291
|
+
width: t ?? u ?? vi.width,
|
|
2292
|
+
height: t ?? u ?? vi.height,
|
|
2293
|
+
stroke: e ?? p,
|
|
2294
|
+
strokeWidth: h,
|
|
2295
|
+
className: mi("lucide", m, i),
|
|
2296
|
+
...!a && !yi(s) && { "aria-hidden": "true" },
|
|
2297
|
+
...s
|
|
2298
|
+
}, [...o.map(([e, t]) => l(e, t)), ...Array.isArray(a) ? a : [a]]);
|
|
2299
|
+
}), Ci = (e, t) => {
|
|
2300
|
+
let n = u(({ className: n, ...r }, i) => l(Si, {
|
|
2301
|
+
ref: i,
|
|
2302
|
+
iconNode: t,
|
|
2303
|
+
className: mi(`lucide-${hi(_i(e))}`, `lucide-${e}`, n),
|
|
2304
|
+
...r
|
|
2305
|
+
}));
|
|
2306
|
+
return n.displayName = _i(e), n;
|
|
2307
|
+
}, wi = Ci("check", [["path", {
|
|
2308
|
+
d: "M20 6 9 17l-5-5",
|
|
2309
|
+
key: "1gmf2c"
|
|
2310
|
+
}]]), Ti = Ci("minus", [["path", {
|
|
2311
|
+
d: "M5 12h14",
|
|
2312
|
+
key: "1ays0h"
|
|
2313
|
+
}]]), Ei = Ci("plus", [["path", {
|
|
2314
|
+
d: "M5 12h14",
|
|
2315
|
+
key: "1ays0h"
|
|
2316
|
+
}], ["path", {
|
|
2317
|
+
d: "M12 5v14",
|
|
2318
|
+
key: "s699le"
|
|
2319
|
+
}]]), Di = {
|
|
2320
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2321
|
+
$id: "https://seedfinder.app/jaml.schema.json",
|
|
2322
|
+
title: "JAML — Jimbo's Ante Markup Language",
|
|
2323
|
+
description: "Declarative filter language for Balatro seed searches. A JAML document specifies the criteria a seed must satisfy; the Motely engine compiles and runs it.",
|
|
2324
|
+
version: "17.4.5",
|
|
2325
|
+
type: "object",
|
|
2326
|
+
additionalProperties: !1,
|
|
2327
|
+
properties: {
|
|
2328
|
+
id: { type: "string" },
|
|
2329
|
+
name: { type: "string" },
|
|
2330
|
+
author: { type: "string" },
|
|
2331
|
+
dateCreated: { type: "string" },
|
|
2332
|
+
description: { type: "string" },
|
|
2333
|
+
deck: { $ref: "#/$defs/MotelyDeck" },
|
|
2334
|
+
stake: { $ref: "#/$defs/MotelyStake" },
|
|
2335
|
+
defaults: { $ref: "#/$defs/JamlDefaults" },
|
|
2336
|
+
must: {
|
|
2337
|
+
type: "array",
|
|
2338
|
+
items: { $ref: "#/$defs/JamlClauseUnion" }
|
|
2339
|
+
},
|
|
2340
|
+
should: {
|
|
2341
|
+
type: "array",
|
|
2342
|
+
items: { $ref: "#/$defs/JamlClauseUnion" }
|
|
2343
|
+
},
|
|
2344
|
+
mustNot: {
|
|
2345
|
+
type: "array",
|
|
2346
|
+
items: { $ref: "#/$defs/JamlClauseUnion" }
|
|
2347
|
+
},
|
|
2348
|
+
hashtags: {
|
|
2349
|
+
type: "array",
|
|
2350
|
+
items: { type: "string" }
|
|
2351
|
+
},
|
|
2352
|
+
seeds: {
|
|
2353
|
+
type: "array",
|
|
2354
|
+
items: { type: "string" }
|
|
2355
|
+
}
|
|
2356
|
+
},
|
|
2357
|
+
$defs: /* @__PURE__ */ JSON.parse("{\"JamlDefaults\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"antes\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"boosterPacks\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"shopItems\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"score\":{\"type\":\"integer\"}}},\"JamlClauseUnion\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"joker\":{\"oneOf\":[{\"const\":\"any\"},{\"$ref\":\"#/$defs/MotelyJoker\"}]},\"jokers\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/MotelyJoker\"}},\"commonJoker\":{\"oneOf\":[{\"const\":\"any\"},{\"$ref\":\"#/$defs/MotelyJokerCommon\"}]},\"commonJokers\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/MotelyJokerCommon\"}},\"uncommonJoker\":{\"oneOf\":[{\"const\":\"any\"},{\"$ref\":\"#/$defs/MotelyJokerUncommon\"}]},\"uncommonJokers\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/MotelyJokerUncommon\"}},\"rareJoker\":{\"oneOf\":[{\"const\":\"any\"},{\"$ref\":\"#/$defs/MotelyJokerRare\"}]},\"rareJokers\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/MotelyJokerRare\"}},\"legendaryJoker\":{\"oneOf\":[{\"const\":\"any\"},{\"$ref\":\"#/$defs/MotelyJokerLegendary\"}]},\"legendaryJokers\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/MotelyJokerLegendary\"}},\"voucher\":{\"$ref\":\"#/$defs/MotelyVoucher\"},\"vouchers\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/MotelyVoucher\"}},\"tarotCard\":{\"$ref\":\"#/$defs/MotelyTarotCard\"},\"tarotCards\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/MotelyTarotCard\"}},\"spectralCard\":{\"$ref\":\"#/$defs/MotelySpectralCard\"},\"spectralCards\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/MotelySpectralCard\"}},\"planetCard\":{\"$ref\":\"#/$defs/MotelyPlanetCard\"},\"boss\":{\"$ref\":\"#/$defs/MotelyBossBlind\"},\"tag\":{\"$ref\":\"#/$defs/MotelyTag\"},\"smallBlindTag\":{\"$ref\":\"#/$defs/MotelyTag\"},\"bigBlindTag\":{\"$ref\":\"#/$defs/MotelyTag\"},\"standardCard\":{\"oneOf\":[{\"type\":\"string\"},{\"$ref\":\"#/$defs/StandardCardConfig\"}]},\"standardCards\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"$ref\":\"#/$defs/StandardCardConfig\"}]}},\"erraticRank\":{\"type\":\"string\"},\"erraticSuit\":{\"type\":\"string\"},\"erraticCard\":{\"type\":\"string\"},\"startingDraw\":{\"type\":\"string\"},\"event\":{\"$ref\":\"#/$defs/MotelyEventType\"},\"luckyMoney\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"luckyMult\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"misprintMult\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"wheelOfFortune\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"cavendishExtinct\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"grosMichelExtinct\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"spaceLevelup\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"businessPayout\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"bloodstoneTrigger\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"parkingPayout\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"glassDestroy\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"wheelStaysFlipped\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"antes\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"score\":{\"type\":\"integer\"},\"min\":{\"type\":\"integer\"},\"max\":{\"type\":\"integer\"},\"label\":{\"type\":\"string\"},\"edition\":{\"$ref\":\"#/$defs/MotelyItemEdition\"},\"stickers\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/MotelyJokerSticker\"}},\"seal\":{\"$ref\":\"#/$defs/MotelyItemSeal\"},\"enhancement\":{\"$ref\":\"#/$defs/MotelyItemEnhancement\"},\"rank\":{\"type\":\"string\"},\"suit\":{\"type\":\"string\"},\"rolls\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"soulEditionRolls\":{\"type\":\"integer\"},\"soulCardOnly\":{\"type\":\"boolean\"},\"and\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/JamlClauseUnion\"}},\"or\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/JamlClauseUnion\"}},\"clauses\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/JamlClauseUnion\"}},\"mode\":{\"type\":\"string\"},\"judgement\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"wraith\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"rareTag\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"uncommonTag\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"shopItems\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"boosterPacks\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"minShopItem\":{\"type\":\"integer\"},\"maxShopItem\":{\"type\":\"integer\"},\"sources\":{\"$ref\":\"#/$defs/JamlSources\"}}},\"MotelyJoker\":{\"type\":\"string\",\"enum\":[\"Joker\",\"GreedyJoker\",\"LustyJoker\",\"WrathfulJoker\",\"GluttonousJoker\",\"JollyJoker\",\"ZanyJoker\",\"MadJoker\",\"CrazyJoker\",\"DrollJoker\",\"SlyJoker\",\"WilyJoker\",\"CleverJoker\",\"DeviousJoker\",\"CraftyJoker\",\"HalfJoker\",\"CreditCard\",\"Banner\",\"MysticSummit\",\"EightBall\",\"Misprint\",\"RaisedFist\",\"ChaostheClown\",\"ScaryFace\",\"AbstractJoker\",\"DelayedGratification\",\"GrosMichel\",\"EvenSteven\",\"OddTodd\",\"Scholar\",\"BusinessCard\",\"Supernova\",\"RideTheBus\",\"Egg\",\"Runner\",\"IceCream\",\"Splash\",\"BlueJoker\",\"FacelessJoker\",\"GreenJoker\",\"Superposition\",\"ToDoList\",\"Cavendish\",\"RedCard\",\"SquareJoker\",\"RiffRaff\",\"Photograph\",\"ReservedParking\",\"MailInRebate\",\"Hallucination\",\"FortuneTeller\",\"Juggler\",\"Drunkard\",\"GoldenJoker\",\"Popcorn\",\"WalkieTalkie\",\"SmileyFace\",\"GoldenTicket\",\"Swashbuckler\",\"HangingChad\",\"ShootTheMoon\",\"JokerStencil\",\"FourFingers\",\"Mime\",\"CeremonialDagger\",\"MarbleJoker\",\"LoyaltyCard\",\"Dusk\",\"Fibonacci\",\"SteelJoker\",\"Hack\",\"Pareidolia\",\"SpaceJoker\",\"Burglar\",\"Blackboard\",\"SixthSense\",\"Constellation\",\"Hiker\",\"CardSharp\",\"Madness\",\"Seance\",\"Vampire\",\"Shortcut\",\"Hologram\",\"Cloud9\",\"Rocket\",\"MidasMask\",\"Luchador\",\"GiftCard\",\"TurtleBean\",\"Erosion\",\"ToTheMoon\",\"StoneJoker\",\"LuckyCat\",\"Bull\",\"DietCola\",\"TradingCard\",\"FlashCard\",\"SpareTrousers\",\"Ramen\",\"Seltzer\",\"Castle\",\"MrBones\",\"Acrobat\",\"SockAndBuskin\",\"Troubadour\",\"Certificate\",\"SmearedJoker\",\"Throwback\",\"RoughGem\",\"Bloodstone\",\"Arrowhead\",\"OnyxAgate\",\"GlassJoker\",\"Showman\",\"FlowerPot\",\"MerryAndy\",\"OopsAll6s\",\"TheIdol\",\"SeeingDouble\",\"Matador\",\"Satellite\",\"Cartomancer\",\"Astronomer\",\"Bootstraps\",\"DNA\",\"Vagabond\",\"Baron\",\"Obelisk\",\"BaseballCard\",\"AncientJoker\",\"Campfire\",\"Blueprint\",\"WeeJoker\",\"HitTheRoad\",\"TheDuo\",\"TheTrio\",\"TheFamily\",\"TheOrder\",\"TheTribe\",\"Stuntman\",\"InvisibleJoker\",\"Brainstorm\",\"DriversLicense\",\"BurntJoker\",\"Canio\",\"Triboulet\",\"Yorick\",\"Chicot\",\"Perkeo\"]},\"MotelyJokerCommon\":{\"type\":\"string\",\"enum\":[\"Joker\",\"GreedyJoker\",\"LustyJoker\",\"WrathfulJoker\",\"GluttonousJoker\",\"JollyJoker\",\"ZanyJoker\",\"MadJoker\",\"CrazyJoker\",\"DrollJoker\",\"SlyJoker\",\"WilyJoker\",\"CleverJoker\",\"DeviousJoker\",\"CraftyJoker\",\"HalfJoker\",\"CreditCard\",\"Banner\",\"MysticSummit\",\"EightBall\",\"Misprint\",\"RaisedFist\",\"ChaostheClown\",\"ScaryFace\",\"AbstractJoker\",\"DelayedGratification\",\"GrosMichel\",\"EvenSteven\",\"OddTodd\",\"Scholar\",\"BusinessCard\",\"Supernova\",\"RideTheBus\",\"Egg\",\"Runner\",\"IceCream\",\"Splash\",\"BlueJoker\",\"FacelessJoker\",\"GreenJoker\",\"Superposition\",\"ToDoList\",\"Cavendish\",\"RedCard\",\"SquareJoker\",\"RiffRaff\",\"Photograph\",\"ReservedParking\",\"MailInRebate\",\"Hallucination\",\"FortuneTeller\",\"Juggler\",\"Drunkard\",\"GoldenJoker\",\"Popcorn\",\"WalkieTalkie\",\"SmileyFace\",\"GoldenTicket\",\"Swashbuckler\",\"HangingChad\",\"ShootTheMoon\"]},\"MotelyJokerUncommon\":{\"type\":\"string\",\"enum\":[\"JokerStencil\",\"FourFingers\",\"Mime\",\"CeremonialDagger\",\"MarbleJoker\",\"LoyaltyCard\",\"Dusk\",\"Fibonacci\",\"SteelJoker\",\"Hack\",\"Pareidolia\",\"SpaceJoker\",\"Burglar\",\"Blackboard\",\"SixthSense\",\"Constellation\",\"Hiker\",\"CardSharp\",\"Madness\",\"Seance\",\"Vampire\",\"Shortcut\",\"Hologram\",\"Cloud9\",\"Rocket\",\"MidasMask\",\"Luchador\",\"GiftCard\",\"TurtleBean\",\"Erosion\",\"ToTheMoon\",\"StoneJoker\",\"LuckyCat\",\"Bull\",\"DietCola\",\"TradingCard\",\"FlashCard\",\"SpareTrousers\",\"Ramen\",\"Seltzer\",\"Castle\",\"MrBones\",\"Acrobat\",\"SockAndBuskin\",\"Troubadour\",\"Certificate\",\"SmearedJoker\",\"Throwback\",\"RoughGem\",\"Bloodstone\",\"Arrowhead\",\"OnyxAgate\",\"GlassJoker\",\"Showman\",\"FlowerPot\",\"MerryAndy\",\"OopsAll6s\",\"TheIdol\",\"SeeingDouble\",\"Matador\",\"Satellite\",\"Cartomancer\",\"Astronomer\",\"Bootstraps\"]},\"MotelyJokerRare\":{\"type\":\"string\",\"enum\":[\"DNA\",\"Vagabond\",\"Baron\",\"Obelisk\",\"BaseballCard\",\"AncientJoker\",\"Campfire\",\"Blueprint\",\"WeeJoker\",\"HitTheRoad\",\"TheDuo\",\"TheTrio\",\"TheFamily\",\"TheOrder\",\"TheTribe\",\"Stuntman\",\"InvisibleJoker\",\"Brainstorm\",\"DriversLicense\",\"BurntJoker\"]},\"MotelyJokerLegendary\":{\"type\":\"string\",\"enum\":[\"Canio\",\"Triboulet\",\"Yorick\",\"Chicot\",\"Perkeo\"]},\"MotelyVoucher\":{\"type\":\"string\",\"enum\":[\"Overstock\",\"OverstockPlus\",\"ClearanceSale\",\"Liquidation\",\"Hone\",\"GlowUp\",\"RerollSurplus\",\"RerollGlut\",\"CrystalBall\",\"OmenGlobe\",\"Telescope\",\"Observatory\",\"Grabber\",\"NachoTong\",\"Wasteful\",\"Recyclomancy\",\"TarotMerchant\",\"TarotTycoon\",\"PlanetMerchant\",\"PlanetTycoon\",\"SeedMoney\",\"MoneyTree\",\"Blank\",\"Antimatter\",\"MagicTrick\",\"Illusion\",\"Hieroglyph\",\"Petroglyph\",\"DirectorsCut\",\"Retcon\",\"PaintBrush\",\"Palette\"]},\"MotelyTarotCard\":{\"type\":\"string\",\"enum\":[\"TheFool\",\"TheMagician\",\"TheHighPriestess\",\"TheEmpress\",\"TheEmperor\",\"TheHierophant\",\"TheLovers\",\"TheChariot\",\"Justice\",\"TheHermit\",\"TheWheelOfFortune\",\"Strength\",\"TheHangedMan\",\"Death\",\"Temperance\",\"TheDevil\",\"TheTower\",\"TheStar\",\"TheMoon\",\"TheSun\",\"Judgement\",\"TheWorld\"]},\"MotelySpectralCard\":{\"type\":\"string\",\"enum\":[\"Familiar\",\"Grim\",\"Incantation\",\"Talisman\",\"Aura\",\"Wraith\",\"Sigil\",\"Ouija\",\"Ectoplasm\",\"Immolate\",\"Ankh\",\"DejaVu\",\"Hex\",\"Trance\",\"Medium\",\"Cryptid\",\"TheSoul\",\"BlackHole\"]},\"MotelyPlanetCard\":{\"type\":\"string\",\"enum\":[\"Mercury\",\"Venus\",\"Earth\",\"Mars\",\"Jupiter\",\"Saturn\",\"Uranus\",\"Neptune\",\"Pluto\",\"PlanetX\",\"Ceres\",\"Eris\"]},\"MotelyBossBlind\":{\"type\":\"string\",\"enum\":[\"TheClub\",\"TheGoad\",\"TheHead\",\"TheHook\",\"TheManacle\",\"ThePillar\",\"ThePsychic\",\"TheWindow\",\"TheArm\",\"TheFish\",\"TheFlint\",\"TheHouse\",\"TheMark\",\"TheMouth\",\"TheNeedle\",\"TheWall\",\"TheWater\",\"TheWheel\",\"TheEye\",\"TheTooth\",\"ThePlant\",\"TheSerpent\",\"TheOx\",\"AmberAcorn\",\"CeruleanBell\",\"CrimsonHeart\",\"VerdantLeaf\",\"VioletVessel\"]},\"MotelyTag\":{\"type\":\"string\",\"enum\":[\"UncommonTag\",\"RareTag\",\"NegativeTag\",\"FoilTag\",\"HolographicTag\",\"PolychromeTag\",\"InvestmentTag\",\"VoucherTag\",\"BossTag\",\"StandardTag\",\"CharmTag\",\"MeteorTag\",\"BuffoonTag\",\"HandyTag\",\"GarbageTag\",\"EtherealTag\",\"CouponTag\",\"DoubleTag\",\"JuggleTag\",\"D6Tag\",\"TopupTag\",\"SpeedTag\",\"OrbitalTag\",\"EconomyTag\"]},\"StandardCardConfig\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"rank\":{\"type\":\"string\"},\"suit\":{\"type\":\"string\"},\"seal\":{\"$ref\":\"#/$defs/MotelyItemSeal\"},\"enhancement\":{\"$ref\":\"#/$defs/MotelyItemEnhancement\"},\"edition\":{\"$ref\":\"#/$defs/MotelyItemEdition\"},\"sources\":{\"$ref\":\"#/$defs/JamlSources\"}}},\"MotelyItemSeal\":{\"type\":\"string\",\"enum\":[\"None\",\"Gold\",\"Red\",\"Blue\",\"Purple\"]},\"MotelyItemEnhancement\":{\"type\":\"string\",\"enum\":[\"None\",\"Bonus\",\"Mult\",\"Wild\",\"Glass\",\"Steel\",\"Stone\",\"Gold\",\"Lucky\"]},\"MotelyItemEdition\":{\"type\":\"string\",\"enum\":[\"None\",\"Foil\",\"Holographic\",\"Polychrome\",\"Negative\"]},\"JamlSources\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"shopItems\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"boosterPacks\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"minShopItem\":{\"type\":\"integer\"},\"maxShopItem\":{\"type\":\"integer\"},\"tags\":{\"type\":\"boolean\"},\"requireMega\":{\"type\":\"boolean\"},\"charmTag\":{\"type\":\"boolean\"},\"etherealTag\":{\"type\":\"boolean\"},\"judgement\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"rareTag\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"uncommonTag\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"wraith\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"soulCard\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"arcanaPacks\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"spectralPacks\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"riffRaff\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"purpleSealOrEightBall\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"emperor\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"sixthSense\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"seance\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"certificate\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"incantation\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"familiar\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"grim\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"deckDraw\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"uncommonShopJokers\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"rareShopJokers\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"commonShopJokers\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}},\"allShopJokers\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"}}}},\"MotelyEventType\":{\"type\":\"string\",\"enum\":[\"LuckyMoney\",\"LuckyMult\",\"MisprintMult\",\"WheelOfFortune\",\"CavendishExtinct\",\"GrosMichelExtinct\",\"SpaceLevelup\",\"BusinessPayout\",\"BloodstoneTrigger\",\"ParkingPayout\",\"GlassDestroy\",\"WheelStaysFlipped\"]},\"MotelyJokerSticker\":{\"type\":\"string\",\"enum\":[\"None\",\"Eternal\",\"Perishable\",\"Rental\"]},\"MotelyDeck\":{\"type\":\"string\",\"enum\":[\"Red\",\"Blue\",\"Yellow\",\"Green\",\"Black\",\"Magic\",\"Nebula\",\"Ghost\",\"Abandoned\",\"Checkered\",\"Zodiac\",\"Painted\",\"Anaglyph\",\"Plasma\",\"Erratic\"]},\"MotelyStake\":{\"type\":\"string\",\"enum\":[\"White\",\"Red\",\"Green\",\"Black\",\"Blue\",\"Purple\",\"Orange\",\"Gold\"]}}")
|
|
2358
|
+
}, Oi = Di.definitions?.clause?.properties ?? {};
|
|
2359
|
+
Di.version;
|
|
2360
|
+
var ki = [
|
|
2361
|
+
"id",
|
|
2362
|
+
"name",
|
|
2363
|
+
"description",
|
|
2364
|
+
"author",
|
|
2365
|
+
"dateCreated",
|
|
2366
|
+
"deck",
|
|
2367
|
+
"stake",
|
|
2368
|
+
"seeds",
|
|
2369
|
+
"hashtags",
|
|
2370
|
+
"aesthetics",
|
|
2371
|
+
"defaults"
|
|
2372
|
+
], Ai = [
|
|
2373
|
+
"must",
|
|
2374
|
+
"should",
|
|
2375
|
+
"mustNot"
|
|
2376
|
+
], ji = Oi.type?.enum ?? [], Mi = Object.keys(Oi), Ni = (() => {
|
|
2377
|
+
let e = Oi.sources?.properties;
|
|
2378
|
+
return e ? Object.keys(e) : ["shopItems", "boosterPacks"];
|
|
2379
|
+
})();
|
|
2380
|
+
function Q(e) {
|
|
2381
|
+
let t = Di.properties?.[e];
|
|
2382
|
+
if (t?.enum) return t.enum;
|
|
2383
|
+
if (t?.items?.enum) return t.items.enum;
|
|
2384
|
+
let n = Oi[e];
|
|
2385
|
+
return n?.enum ? n.enum : n?.items?.enum ? n.items.enum : null;
|
|
2386
|
+
}
|
|
2387
|
+
Q("deck"), Q("stake"), Q("edition"), Q("seal"), Q("enhancement"), Q("rank"), Q("suit"), Q("stickers"), [
|
|
2388
|
+
...Ai,
|
|
2389
|
+
...ki,
|
|
2390
|
+
...ji,
|
|
2391
|
+
...Mi,
|
|
2392
|
+
...Ni
|
|
2393
|
+
];
|
|
2394
|
+
//#endregion
|
|
2395
|
+
//#region src/lib/jaml/jamlData.ts
|
|
2396
|
+
var Pi = [...ji], Fi = [
|
|
2397
|
+
"antes",
|
|
2398
|
+
"tags",
|
|
2399
|
+
"labels"
|
|
2400
|
+
], Ii = [
|
|
2401
|
+
"must",
|
|
2402
|
+
"should",
|
|
2403
|
+
"mustNot",
|
|
2404
|
+
"any",
|
|
2405
|
+
"Any",
|
|
2406
|
+
...Pi,
|
|
2407
|
+
...Fi
|
|
2408
|
+
], Li = class {
|
|
2409
|
+
static getCompletions(e) {
|
|
2410
|
+
let t = e.toLowerCase();
|
|
2411
|
+
return Ii.filter((e) => e.toLowerCase().includes(t)).map((e) => ({
|
|
2412
|
+
text: e,
|
|
2413
|
+
displayText: e,
|
|
2414
|
+
type: "keyword"
|
|
2415
|
+
}));
|
|
2416
|
+
}
|
|
2417
|
+
}, $ = {
|
|
2418
|
+
white: "#FFFFFF",
|
|
2419
|
+
black: "#000000",
|
|
2420
|
+
red: "#ff5e5e",
|
|
2421
|
+
blue: "#4bb1ff",
|
|
2422
|
+
green: "#46bc77",
|
|
2423
|
+
purple: "#9074ff",
|
|
2424
|
+
orange: "#ff9d4d",
|
|
2425
|
+
yellow: "#ffcf4d",
|
|
2426
|
+
gold: "#efb82d",
|
|
2427
|
+
editorBg: "#0f1416",
|
|
2428
|
+
editorBgAlt: "#1c2629"
|
|
2429
|
+
}, Ri = "# My JAML Filter\nname: My Filter\ndeck: Red\nstake: White\n\nmust:\n - joker: Blueprint\n edition: Negative\n antes: [1, 2, 3]\n\nshould:\n - soulJoker: Any\n score: 5\n", zi = [
|
|
2430
|
+
"name",
|
|
2431
|
+
"author",
|
|
2432
|
+
"description",
|
|
2433
|
+
"deck",
|
|
2434
|
+
"stake",
|
|
2435
|
+
"label"
|
|
2436
|
+
], Bi = [
|
|
2437
|
+
"joker",
|
|
2438
|
+
"soulJoker",
|
|
2439
|
+
"voucher",
|
|
2440
|
+
"tarotCard",
|
|
2441
|
+
"planetCard",
|
|
2442
|
+
"spectralCard",
|
|
2443
|
+
"standardCard",
|
|
2444
|
+
"tag",
|
|
2445
|
+
"boss",
|
|
2446
|
+
"event"
|
|
2447
|
+
];
|
|
2448
|
+
function Vi({ suggestions: e, selectedIndex: t, onSelect: n, onHover: r }) {
|
|
2449
|
+
return e.length === 0 ? /* @__PURE__ */ b("div", {
|
|
2450
|
+
className: "p-2 text-xs text-white/40 italic",
|
|
2451
|
+
children: "No suggestions..."
|
|
2452
|
+
}) : /* @__PURE__ */ b("div", {
|
|
2453
|
+
className: "flex flex-col max-h-[200px] overflow-y-auto",
|
|
2454
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
2455
|
+
children: e.map((e, i) => {
|
|
2456
|
+
let a = i === t;
|
|
2457
|
+
return /* @__PURE__ */ x("div", {
|
|
2458
|
+
onClick: () => n(e.text),
|
|
2459
|
+
onMouseEnter: () => r(i),
|
|
2460
|
+
className: `
|
|
2461
|
+
flex items-center justify-between px-3 py-1.5 cursor-pointer font-mono text-[13px] transition-colors
|
|
2462
|
+
${a ? "bg-[var(--balatro-gold)] text-black" : "text-white hover:bg-white/10"}
|
|
2463
|
+
`,
|
|
2464
|
+
children: [/* @__PURE__ */ b("span", { children: e.displayText }), a && /* @__PURE__ */ b("span", {
|
|
2465
|
+
className: "opacity-50 text-[11px] ml-2",
|
|
2466
|
+
children: "↵"
|
|
2467
|
+
})]
|
|
2468
|
+
}, `${e.text}-${i}`);
|
|
2469
|
+
})
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
function Hi({ values: e, onToggle: t, color: n }) {
|
|
2473
|
+
let [r, i] = v(!1), a = new Set(e.map((e) => parseInt(e, 10)).filter((e) => !isNaN(e)));
|
|
2474
|
+
return r ? /* @__PURE__ */ x("div", {
|
|
2475
|
+
className: "flex flex-row items-center",
|
|
2476
|
+
children: [Array.from({ length: 9 }, (e, t) => t).map((e) => {
|
|
2477
|
+
let r = a.has(e);
|
|
2478
|
+
return /* @__PURE__ */ b("div", {
|
|
2479
|
+
onClick: (n) => {
|
|
2480
|
+
n.stopPropagation(), t(e.toString());
|
|
2481
|
+
},
|
|
2482
|
+
className: `jaml-block ${e === 0 ? "jaml-ante-btn--first" : e === 8 ? "jaml-ante-btn--last" : "jaml-ante-btn"}`,
|
|
2483
|
+
style: {
|
|
2484
|
+
"--jaml-min-w": "28px",
|
|
2485
|
+
"--jaml-bg": r ? `${n}40` : "transparent",
|
|
2486
|
+
"--jaml-border": `1px solid ${r ? n : "rgba(255,255,255,0.2)"}`,
|
|
2487
|
+
"--jaml-color": r ? n : "rgba(255,255,255,0.4)",
|
|
2488
|
+
borderRight: e < 8 ? "none" : void 0
|
|
2489
|
+
},
|
|
2490
|
+
children: e
|
|
2491
|
+
}, e);
|
|
2492
|
+
}), /* @__PURE__ */ b("div", {
|
|
2493
|
+
onClick: () => i(!1),
|
|
2494
|
+
className: "jaml-block jaml-antes-confirm",
|
|
2495
|
+
children: /* @__PURE__ */ b(wi, {
|
|
2496
|
+
size: 16,
|
|
2497
|
+
strokeWidth: 3
|
|
2498
|
+
})
|
|
2499
|
+
})]
|
|
2500
|
+
}) : /* @__PURE__ */ b("div", {
|
|
2501
|
+
onClick: () => i(!0),
|
|
2502
|
+
className: "jaml-block",
|
|
2503
|
+
style: {
|
|
2504
|
+
"--jaml-bg": a.size > 0 ? `${n}20` : `${$.red}15`,
|
|
2505
|
+
"--jaml-border": `1px solid ${a.size > 0 ? n : $.red}`,
|
|
2506
|
+
"--jaml-color": a.size > 0 ? n : $.red,
|
|
2507
|
+
"--jaml-min-w": "100px",
|
|
2508
|
+
"--jaml-shadow": a.size > 0 ? `0 0 10px ${n}20` : "none"
|
|
2509
|
+
},
|
|
2510
|
+
children: (() => {
|
|
2511
|
+
if (a.size === 0) return "tap to select";
|
|
2512
|
+
let e = Array.from(a).sort((e, t) => e - t);
|
|
2513
|
+
if (e.length === 1) return `Ante ${e[0]}`;
|
|
2514
|
+
let t = e[0], n = e[e.length - 1];
|
|
2515
|
+
return e.every((t, n) => n === 0 || t === e[n - 1] + 1) ? `Antes ${t}-${n}` : `Antes ${e.join(", ")}`;
|
|
2516
|
+
})()
|
|
2517
|
+
});
|
|
2518
|
+
}
|
|
2519
|
+
function Ui(e, t) {
|
|
2520
|
+
let [n, r] = v(null);
|
|
2521
|
+
return m(() => {
|
|
2522
|
+
if (!t || !e.current) {
|
|
2523
|
+
r(null);
|
|
2524
|
+
return;
|
|
2525
|
+
}
|
|
2526
|
+
let n = () => {
|
|
2527
|
+
if (!e.current) return;
|
|
2528
|
+
let t = e.current.getBoundingClientRect(), n = window.innerHeight - t.bottom, i = t.top, a = n > 220 || n > i;
|
|
2529
|
+
r({
|
|
2530
|
+
left: t.left,
|
|
2531
|
+
top: a ? t.bottom + 4 : t.top - 4,
|
|
2532
|
+
position: a ? "bottom" : "top"
|
|
2533
|
+
});
|
|
2534
|
+
};
|
|
2535
|
+
return n(), window.addEventListener("scroll", n, !0), window.addEventListener("resize", n), () => {
|
|
2536
|
+
window.removeEventListener("scroll", n, !0), window.removeEventListener("resize", n);
|
|
2537
|
+
};
|
|
2538
|
+
}, [t, e]), n;
|
|
2539
|
+
}
|
|
2540
|
+
function Wi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
2541
|
+
let [r, i] = v([]), [a, o] = v(null), [s, c] = v(null), [l, u] = v(null), d = _(null), p = f((e) => {
|
|
2542
|
+
let t = e.split("\n"), n;
|
|
2543
|
+
return t.map((e, t) => {
|
|
2544
|
+
let r = e.search(/\S|$/), i = e.trim(), a = i.startsWith("#"), o = i.startsWith("- "), s, c, l = !1, u;
|
|
2545
|
+
if (!a && i.includes(":")) {
|
|
2546
|
+
let e = i.indexOf(":"), t = i.slice(o ? 2 : 0, e).trim(), n = i.slice(e + 1).trim();
|
|
2547
|
+
s = t, c = n || void 0, c && c.startsWith("[") && c.endsWith("]") && (l = !0, u = c.slice(1, -1).split(",").map((e) => e.trim()).filter((e) => e));
|
|
2548
|
+
}
|
|
2549
|
+
r === 0 && !o && (n = void 0), o && s && Bi.includes(s) && (n = s);
|
|
2550
|
+
let d = "complete", f = !1;
|
|
2551
|
+
return s && (zi.includes(s) ? d = "metadata" : Bi.includes(s) ? d = c ? "complete" : "required-incomplete" : !c && s !== "must" && s !== "should" && s !== "mustNot" && (d = "optional-incomplete"), c && c.startsWith("~") && c.endsWith("~") && (f = !0, d = "invalid")), {
|
|
2552
|
+
id: `line-${t}`,
|
|
2553
|
+
raw: e,
|
|
2554
|
+
indent: r,
|
|
2555
|
+
key: s,
|
|
2556
|
+
value: c,
|
|
2557
|
+
isComment: a,
|
|
2558
|
+
isArrayItem: o,
|
|
2559
|
+
lineNumber: t,
|
|
2560
|
+
clauseType: n,
|
|
2561
|
+
validationState: d,
|
|
2562
|
+
isInvalidValue: f,
|
|
2563
|
+
isArrayValue: l,
|
|
2564
|
+
arrayValues: u
|
|
2565
|
+
};
|
|
2566
|
+
});
|
|
2567
|
+
}, []), m = f((e) => e.map((e) => e.raw).join("\n"), []), [h, y] = v(e);
|
|
2568
|
+
if (e !== h) {
|
|
2569
|
+
y(e);
|
|
2570
|
+
let t = e || Ri;
|
|
2571
|
+
(r.length === 0 || m(r) !== t) && i(p(t));
|
|
2572
|
+
}
|
|
2573
|
+
let S = f((e, n, a) => {
|
|
2574
|
+
let o = r.map((t) => {
|
|
2575
|
+
if (t.id !== e) return t;
|
|
2576
|
+
let r = " ".repeat(t.indent), i = t.isArrayItem ? "- " : "", o = t.raw;
|
|
2577
|
+
n === "value" && t.key ? o = `${r}${i}${t.key}: ${a}` : n === "key" && (o = `${r}${i}${a}${t.value ? `: ${t.value}` : ":"}`);
|
|
2578
|
+
let s = !1, c;
|
|
2579
|
+
return a && a.startsWith("[") && a.endsWith("]") && (s = !0, c = a.slice(1, -1).split(",").map((e) => e.trim()).filter((e) => e)), {
|
|
2580
|
+
...t,
|
|
2581
|
+
raw: o,
|
|
2582
|
+
[n]: a,
|
|
2583
|
+
isArrayValue: s,
|
|
2584
|
+
arrayValues: c
|
|
2585
|
+
};
|
|
2586
|
+
});
|
|
2587
|
+
i(o);
|
|
2588
|
+
let s = m(o);
|
|
2589
|
+
if (t) try {
|
|
2590
|
+
t(s, pi.load(s), !0);
|
|
2591
|
+
} catch {
|
|
2592
|
+
t(s, null, !1);
|
|
2593
|
+
}
|
|
2594
|
+
}, [
|
|
2595
|
+
r,
|
|
2596
|
+
m,
|
|
2597
|
+
t
|
|
2598
|
+
]), ee = f((e, n, a) => {
|
|
2599
|
+
let o = r.map((t) => {
|
|
2600
|
+
if (t.id !== e || !t.arrayValues) return t;
|
|
2601
|
+
let r = [...t.arrayValues];
|
|
2602
|
+
r[n] = a;
|
|
2603
|
+
let i = `[${r.join(", ")}]`, o = `${" ".repeat(t.indent)}${t.isArrayItem ? "- " : ""}${t.key}: ${i}`;
|
|
2604
|
+
return {
|
|
2605
|
+
...t,
|
|
2606
|
+
raw: o,
|
|
2607
|
+
value: i,
|
|
2608
|
+
arrayValues: r
|
|
2609
|
+
};
|
|
2610
|
+
});
|
|
2611
|
+
i(o);
|
|
2612
|
+
let s = m(o);
|
|
2613
|
+
if (t) try {
|
|
2614
|
+
t(s, pi.load(s), !0);
|
|
2615
|
+
} catch {
|
|
2616
|
+
t(s, null, !1);
|
|
2617
|
+
}
|
|
2618
|
+
}, [
|
|
2619
|
+
r,
|
|
2620
|
+
m,
|
|
2621
|
+
t
|
|
2622
|
+
]), te = f((e, n) => {
|
|
2623
|
+
let a = r.map((t) => {
|
|
2624
|
+
if (t.id !== e) return t;
|
|
2625
|
+
let r = [...t.arrayValues || [], n], i = `[${r.join(", ")}]`, a = `${" ".repeat(t.indent)}${t.isArrayItem ? "- " : ""}${t.key}: ${i}`;
|
|
2626
|
+
return {
|
|
2627
|
+
...t,
|
|
2628
|
+
raw: a,
|
|
2629
|
+
value: i,
|
|
2630
|
+
arrayValues: r,
|
|
2631
|
+
isArrayValue: !0
|
|
2632
|
+
};
|
|
2633
|
+
});
|
|
2634
|
+
i(a);
|
|
2635
|
+
let o = m(a);
|
|
2636
|
+
if (t) try {
|
|
2637
|
+
t(o, pi.load(o), !0);
|
|
2638
|
+
} catch {
|
|
2639
|
+
t(o, null, !1);
|
|
2640
|
+
}
|
|
2641
|
+
}, [
|
|
2642
|
+
r,
|
|
2643
|
+
m,
|
|
2644
|
+
t
|
|
2645
|
+
]), C = f((e, n) => {
|
|
2646
|
+
let a = r.map((t) => {
|
|
2647
|
+
if (t.id !== e || !t.arrayValues) return t;
|
|
2648
|
+
let r = t.arrayValues.filter((e, t) => t !== n), i = r.length > 0 ? `[${r.join(", ")}]` : "", a = `${" ".repeat(t.indent)}${t.isArrayItem ? "- " : ""}${t.key}: ${i}`;
|
|
2649
|
+
return {
|
|
2650
|
+
...t,
|
|
2651
|
+
raw: a,
|
|
2652
|
+
value: i || void 0,
|
|
2653
|
+
arrayValues: r.length > 0 ? r : void 0,
|
|
2654
|
+
isArrayValue: r.length > 0
|
|
2655
|
+
};
|
|
2656
|
+
});
|
|
2657
|
+
i(a);
|
|
2658
|
+
let o = m(a);
|
|
2659
|
+
if (t) try {
|
|
2660
|
+
t(o, pi.load(o), !0);
|
|
2661
|
+
} catch {
|
|
2662
|
+
t(o, null, !1);
|
|
2663
|
+
}
|
|
2664
|
+
}, [
|
|
2665
|
+
r,
|
|
2666
|
+
m,
|
|
2667
|
+
t
|
|
2668
|
+
]), ne = f((e) => {
|
|
2669
|
+
let n = r.filter((t) => t.id !== e).map((e, t) => ({
|
|
2670
|
+
...e,
|
|
2671
|
+
lineNumber: t,
|
|
2672
|
+
id: `line-${t}`
|
|
2673
|
+
}));
|
|
2674
|
+
i(n);
|
|
2675
|
+
let a = m(n);
|
|
2676
|
+
if (t) try {
|
|
2677
|
+
t(a, pi.load(a), !0);
|
|
2678
|
+
} catch {
|
|
2679
|
+
t(a, null, !1);
|
|
2680
|
+
}
|
|
2681
|
+
}, [
|
|
2682
|
+
r,
|
|
2683
|
+
m,
|
|
2684
|
+
t
|
|
2685
|
+
]), w = g(() => {
|
|
2686
|
+
let e = {};
|
|
2687
|
+
for (let t of r) t.key && (e[t.indent] = Math.min(Math.max(e[t.indent] || 0, t.key.length), 12));
|
|
2688
|
+
return e;
|
|
2689
|
+
}, [r]);
|
|
2690
|
+
return /* @__PURE__ */ x("div", {
|
|
2691
|
+
ref: d,
|
|
2692
|
+
className: `flex flex-col bg-[#0f1416] text-white font-mono text-[13px] leading-[1.8] outline-none rounded-md p-4 overflow-auto min-h-[500px] border border-white/5 ${n}`,
|
|
2693
|
+
tabIndex: 0,
|
|
2694
|
+
children: [/* @__PURE__ */ b("div", {
|
|
2695
|
+
className: "flex flex-col gap-0.5",
|
|
2696
|
+
children: r.map((e) => /* @__PURE__ */ b(Gi, {
|
|
2697
|
+
line: e,
|
|
2698
|
+
keyWidth: w[e.indent] || 8,
|
|
2699
|
+
isEditing: a === e.id,
|
|
2700
|
+
editingPart: a === e.id ? s : null,
|
|
2701
|
+
editingArrayIndex: a === e.id ? l : null,
|
|
2702
|
+
onStartEdit: (t, n) => {
|
|
2703
|
+
o(e.id), c(t), u(n ?? null);
|
|
2704
|
+
},
|
|
2705
|
+
onEndEdit: () => {
|
|
2706
|
+
o(null), c(null), u(null);
|
|
2707
|
+
},
|
|
2708
|
+
onChange: (t, n) => S(e.id, t, n),
|
|
2709
|
+
onArrayItemChange: (t, n) => ee(e.id, t, n),
|
|
2710
|
+
onArrayItemAdd: (t) => te(e.id, t),
|
|
2711
|
+
onArrayItemRemove: (t) => C(e.id, t),
|
|
2712
|
+
onDelete: () => ne(e.id)
|
|
2713
|
+
}, e.id))
|
|
2714
|
+
}), /* @__PURE__ */ x("div", {
|
|
2715
|
+
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",
|
|
2716
|
+
children: [
|
|
2717
|
+
/* @__PURE__ */ x("span", {
|
|
2718
|
+
className: "flex items-center gap-1.5",
|
|
2719
|
+
children: [/* @__PURE__ */ b("span", { className: "jaml-legend-dot jaml-legend-dot--red" }), " required"]
|
|
2720
|
+
}),
|
|
2721
|
+
/* @__PURE__ */ x("span", {
|
|
2722
|
+
className: "flex items-center gap-1.5",
|
|
2723
|
+
children: [/* @__PURE__ */ b("span", { className: "jaml-legend-dot jaml-legend-dot--blue" }), " optional"]
|
|
2724
|
+
}),
|
|
2725
|
+
/* @__PURE__ */ x("span", {
|
|
2726
|
+
className: "flex items-center gap-1.5",
|
|
2727
|
+
children: [/* @__PURE__ */ b("span", { className: "jaml-legend-dot jaml-legend-dot--green" }), " complete"]
|
|
2728
|
+
}),
|
|
2729
|
+
/* @__PURE__ */ x("span", {
|
|
2730
|
+
className: "flex items-center gap-1.5",
|
|
2731
|
+
children: [/* @__PURE__ */ b("span", { className: "jaml-legend-dot jaml-legend-dot--purple" }), " metadata"]
|
|
2732
|
+
}),
|
|
2733
|
+
/* @__PURE__ */ b("span", {
|
|
2734
|
+
className: "ml-auto opacity-40",
|
|
2735
|
+
children: "Click to edit • Tab to navigate"
|
|
2736
|
+
})
|
|
2737
|
+
]
|
|
2738
|
+
})]
|
|
2739
|
+
});
|
|
2740
|
+
}
|
|
2741
|
+
function Gi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIndex: i, onStartEdit: a, onEndEdit: o, onChange: s, onArrayItemChange: c, onArrayItemAdd: l, onArrayItemRemove: u, onDelete: d }) {
|
|
2742
|
+
let [f, p] = v(0), [h, y] = v(""), [ee, te] = v(""), [C, ne] = v({
|
|
2743
|
+
isEditing: n,
|
|
2744
|
+
editingPart: r,
|
|
2745
|
+
editingArrayIndex: i,
|
|
2746
|
+
lineRaw: e.raw
|
|
2747
|
+
});
|
|
2748
|
+
(n !== C.isEditing || r !== C.editingPart || i !== C.editingArrayIndex || e.raw !== C.lineRaw) && (ne({
|
|
2749
|
+
isEditing: n,
|
|
2750
|
+
editingPart: r,
|
|
2751
|
+
editingArrayIndex: i,
|
|
2752
|
+
lineRaw: e.raw
|
|
2753
|
+
}), n && y(r === "key" ? e.key || "" : r === "value" ? (e.value || "").replace(/^~|~$/g, "") : r === "arrayItem" && i !== null && e.arrayValues?.[i] || ""));
|
|
2754
|
+
let w = g(() => !n || !r ? "" : r === "value" && e.key ? `${e.key}: ${h}` : r === "key" ? h : e.raw, [
|
|
2755
|
+
n,
|
|
2756
|
+
r,
|
|
2757
|
+
h,
|
|
2758
|
+
e.raw,
|
|
2759
|
+
e.key
|
|
2760
|
+
]), T = g(() => w ? Li.getCompletions(w).slice(0, 10) : [], [w]);
|
|
2761
|
+
w !== ee && (te(w), p(0));
|
|
2762
|
+
let E = _(null), re = _(null), D = Ui(re, n && T.length > 0), O = () => {
|
|
2763
|
+
switch (e.validationState) {
|
|
2764
|
+
case "required-incomplete": return $.red;
|
|
2765
|
+
case "optional-incomplete": return $.blue;
|
|
2766
|
+
case "complete": return $.green;
|
|
2767
|
+
case "invalid": return $.red;
|
|
2768
|
+
case "metadata": return $.purple;
|
|
2769
|
+
default: return "#888";
|
|
2770
|
+
}
|
|
2771
|
+
}, ie = () => {
|
|
2772
|
+
switch (e.validationState) {
|
|
2773
|
+
case "required-incomplete": return $.red;
|
|
2774
|
+
case "optional-incomplete": return $.blue;
|
|
2775
|
+
case "complete": return $.green;
|
|
2776
|
+
case "invalid": return $.red;
|
|
2777
|
+
case "metadata": return $.purple;
|
|
2778
|
+
default: return "#FFF";
|
|
2779
|
+
}
|
|
2780
|
+
};
|
|
2781
|
+
m(() => {
|
|
2782
|
+
n && E.current && E.current.focus();
|
|
2783
|
+
}, [n]);
|
|
2784
|
+
let ae = (t) => {
|
|
2785
|
+
if (t.key === "Enter") {
|
|
2786
|
+
t.preventDefault();
|
|
2787
|
+
let n = T.length > 0 && f >= 0 ? T[f].text : h;
|
|
2788
|
+
r === "key" ? s("key", n) : r === "value" ? s("value", n) : r === "arrayItem" && (i >= (e.arrayValues?.length || 0) ? l(n) : c(i, n)), o();
|
|
2789
|
+
} else t.key === "ArrowDown" ? (t.preventDefault(), p(Math.min(f + 1, T.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());
|
|
2790
|
+
};
|
|
2791
|
+
if (e.isComment) return /* @__PURE__ */ b("div", {
|
|
2792
|
+
className: "pl-8 text-stone-400 italic text-xs py-0.5",
|
|
2793
|
+
children: e.raw
|
|
2794
|
+
});
|
|
2795
|
+
if (!e.key && !e.raw.trim()) return /* @__PURE__ */ b("div", { className: "h-5" });
|
|
2796
|
+
if ((e.key === "must" || e.key === "should" || e.key === "mustNot") && !e.value) return /* @__PURE__ */ b("div", {
|
|
2797
|
+
className: "jaml-clause-header pl-8 py-1 text-[16px] border-b border-white/10 mt-4 mb-2 tracking-widest",
|
|
2798
|
+
style: { "--jaml-color": e.key === "must" ? $.red : $.blue },
|
|
2799
|
+
children: e.raw
|
|
2800
|
+
});
|
|
2801
|
+
let oe = " ".repeat(e.indent), k = e.isArrayItem ? "- " : "", A = D ? {
|
|
2802
|
+
"--popover-top": `${D.top}px`,
|
|
2803
|
+
"--popover-left": `${D.left}px`,
|
|
2804
|
+
"--popover-transform": D.position === "top" ? "translateY(-100%)" : "none"
|
|
2805
|
+
} : {};
|
|
2806
|
+
return /* @__PURE__ */ x("div", {
|
|
2807
|
+
className: "relative flex items-center py-0.5 group",
|
|
2808
|
+
children: [
|
|
2809
|
+
/* @__PURE__ */ b("div", {
|
|
2810
|
+
className: "w-6 h-full flex items-center justify-center cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2811
|
+
onClick: (e) => {
|
|
2812
|
+
e.stopPropagation(), d();
|
|
2813
|
+
},
|
|
2814
|
+
children: /* @__PURE__ */ b(Ti, {
|
|
2815
|
+
size: 12,
|
|
2816
|
+
className: "text-orange-500 hover:bg-orange-100 rounded"
|
|
2817
|
+
})
|
|
2818
|
+
}),
|
|
2819
|
+
/* @__PURE__ */ x("span", {
|
|
2820
|
+
className: "whitespace-pre text-stone-400",
|
|
2821
|
+
children: [oe, k]
|
|
2822
|
+
}),
|
|
2823
|
+
e.key && /* @__PURE__ */ x("div", {
|
|
2824
|
+
className: "relative",
|
|
2825
|
+
children: [/* @__PURE__ */ b("div", {
|
|
2826
|
+
ref: r === "key" ? re : null,
|
|
2827
|
+
onClick: (e) => {
|
|
2828
|
+
e.stopPropagation(), a("key");
|
|
2829
|
+
},
|
|
2830
|
+
className: "jaml-block jaml-block--start",
|
|
2831
|
+
style: {
|
|
2832
|
+
"--jaml-min-w": `${t}ch`,
|
|
2833
|
+
"--jaml-color": n && r === "key" ? ie() : O(),
|
|
2834
|
+
"--jaml-bg": n && r === "key" ? `${ie()}15` : "transparent"
|
|
2835
|
+
},
|
|
2836
|
+
children: n && r === "key" ? /* @__PURE__ */ b("input", {
|
|
2837
|
+
ref: E,
|
|
2838
|
+
title: "Edit key",
|
|
2839
|
+
value: h,
|
|
2840
|
+
onChange: (e) => y(e.target.value),
|
|
2841
|
+
onKeyDown: ae,
|
|
2842
|
+
onBlur: () => setTimeout(o, 200),
|
|
2843
|
+
className: "jaml-inline-input",
|
|
2844
|
+
style: { "--jaml-color": ie() }
|
|
2845
|
+
}) : e.key
|
|
2846
|
+
}), n && r === "key" && T.length > 0 && D && S(/* @__PURE__ */ b("div", {
|
|
2847
|
+
className: "jaml-suggestion-popover",
|
|
2848
|
+
style: A,
|
|
2849
|
+
children: /* @__PURE__ */ b(Vi, {
|
|
2850
|
+
suggestions: T,
|
|
2851
|
+
selectedIndex: f,
|
|
2852
|
+
onHover: p,
|
|
2853
|
+
onSelect: (e) => {
|
|
2854
|
+
s("key", e), o();
|
|
2855
|
+
}
|
|
2856
|
+
})
|
|
2857
|
+
}), document.body)]
|
|
2858
|
+
}),
|
|
2859
|
+
e.key && /* @__PURE__ */ b("span", {
|
|
2860
|
+
className: "text-stone-400 mr-1",
|
|
2861
|
+
children: ":"
|
|
2862
|
+
}),
|
|
2863
|
+
e.key && (e.isArrayValue && e.arrayValues ? e.key === "antes" ? /* @__PURE__ */ b(Hi, {
|
|
2864
|
+
values: e.arrayValues,
|
|
2865
|
+
onToggle: (t) => {
|
|
2866
|
+
let n = e.arrayValues.indexOf(t);
|
|
2867
|
+
n >= 0 ? u(n) : l(t);
|
|
2868
|
+
},
|
|
2869
|
+
color: ie()
|
|
2870
|
+
}) : /* @__PURE__ */ x("div", {
|
|
2871
|
+
className: "flex gap-0.5 items-center",
|
|
2872
|
+
children: [e.arrayValues.map((e, t) => /* @__PURE__ */ b("div", {
|
|
2873
|
+
onClick: (e) => {
|
|
2874
|
+
e.stopPropagation(), a("arrayItem", t);
|
|
2875
|
+
},
|
|
2876
|
+
className: "jaml-block",
|
|
2877
|
+
style: {
|
|
2878
|
+
"--jaml-min-w": "24px",
|
|
2879
|
+
"--jaml-bg": `${O()}15`,
|
|
2880
|
+
"--jaml-border": `1px solid ${O()}40`,
|
|
2881
|
+
"--jaml-color": O()
|
|
2882
|
+
},
|
|
2883
|
+
children: n && r === "arrayItem" && i === t ? /* @__PURE__ */ b("input", {
|
|
2884
|
+
ref: E,
|
|
2885
|
+
title: "Edit array item",
|
|
2886
|
+
value: h,
|
|
2887
|
+
onChange: (e) => y(e.target.value),
|
|
2888
|
+
onKeyDown: ae,
|
|
2889
|
+
onBlur: () => setTimeout(o, 200),
|
|
2890
|
+
className: "bg-transparent w-[3ch] text-center outline-none"
|
|
2891
|
+
}) : e
|
|
2892
|
+
}, t)), /* @__PURE__ */ b("div", {
|
|
2893
|
+
onClick: (t) => {
|
|
2894
|
+
t.stopPropagation(), a("arrayItem", e.arrayValues.length);
|
|
2895
|
+
},
|
|
2896
|
+
className: "jaml-block",
|
|
2897
|
+
style: {
|
|
2898
|
+
"--jaml-min-w": "24px",
|
|
2899
|
+
"--jaml-bg": `${$.green}15`,
|
|
2900
|
+
"--jaml-border": `1px solid ${$.green}40`,
|
|
2901
|
+
"--jaml-color": $.green
|
|
2902
|
+
},
|
|
2903
|
+
children: /* @__PURE__ */ b(Ei, { size: 12 })
|
|
2904
|
+
})]
|
|
2905
|
+
}) : /* @__PURE__ */ x("div", {
|
|
2906
|
+
className: "relative",
|
|
2907
|
+
children: [/* @__PURE__ */ b("div", {
|
|
2908
|
+
ref: r === "value" ? re : null,
|
|
2909
|
+
onClick: (e) => {
|
|
2910
|
+
e.stopPropagation(), a("value");
|
|
2911
|
+
},
|
|
2912
|
+
className: "jaml-block",
|
|
2913
|
+
style: {
|
|
2914
|
+
"--jaml-min-w": e.value ? void 0 : "60px",
|
|
2915
|
+
"--jaml-color": e.isInvalidValue ? $.red : e.value ? O() : $.red,
|
|
2916
|
+
"--jaml-bg": e.isInvalidValue ? `${$.red}15` : e.value ? `${O()}10` : `${$.red}08`,
|
|
2917
|
+
"--jaml-border": `1px solid ${e.isInvalidValue ? `${$.red}60` : e.value ? `${O()}40` : `${$.red}40`}`,
|
|
2918
|
+
"--jaml-text-decoration": e.isInvalidValue ? "line-through" : "none"
|
|
2919
|
+
},
|
|
2920
|
+
children: n && r === "value" ? /* @__PURE__ */ b("input", {
|
|
2921
|
+
ref: E,
|
|
2922
|
+
title: "Edit value",
|
|
2923
|
+
value: h,
|
|
2924
|
+
onChange: (e) => y(e.target.value),
|
|
2925
|
+
onKeyDown: ae,
|
|
2926
|
+
onBlur: () => setTimeout(o, 200),
|
|
2927
|
+
className: "jaml-inline-input jaml-inline-input--sized",
|
|
2928
|
+
style: {
|
|
2929
|
+
"--jaml-color": O(),
|
|
2930
|
+
"--jaml-input-w": `${Math.max(h.length, 4)}ch`
|
|
2931
|
+
}
|
|
2932
|
+
}) : e.isInvalidValue ? e.value?.replace(/~/g, "") : e.value || "???"
|
|
2933
|
+
}), n && r === "value" && T.length > 0 && D && S(/* @__PURE__ */ b("div", {
|
|
2934
|
+
className: "jaml-suggestion-popover",
|
|
2935
|
+
style: A,
|
|
2936
|
+
children: /* @__PURE__ */ b(Vi, {
|
|
2937
|
+
suggestions: T,
|
|
2938
|
+
selectedIndex: f,
|
|
2939
|
+
onHover: p,
|
|
2940
|
+
onSelect: (e) => {
|
|
2941
|
+
s("value", e), o();
|
|
2942
|
+
}
|
|
2943
|
+
})
|
|
2944
|
+
}), document.body)]
|
|
2945
|
+
}))
|
|
2946
|
+
]
|
|
2947
|
+
});
|
|
2948
|
+
}
|
|
2949
|
+
//#endregion
|
|
2950
|
+
//#region src/ui/JimboIconButton.tsx
|
|
2951
|
+
var Ki = t;
|
|
2952
|
+
function qi({ onClick: e, title: t, "aria-label": n, disabled: r = !1, size: i = "md", children: a }) {
|
|
2953
|
+
let [o, s] = v(!1), c = i === "sm" ? 26 : 30;
|
|
2954
|
+
return /* @__PURE__ */ b("button", {
|
|
2955
|
+
"aria-label": n ?? t,
|
|
2956
|
+
disabled: r,
|
|
2957
|
+
onClick: () => !r && e?.(),
|
|
2958
|
+
onMouseEnter: () => s(!0),
|
|
2959
|
+
onMouseLeave: () => s(!1),
|
|
2960
|
+
style: {
|
|
2961
|
+
width: c,
|
|
2962
|
+
height: c,
|
|
2963
|
+
display: "inline-flex",
|
|
2964
|
+
alignItems: "center",
|
|
2965
|
+
justifyContent: "center",
|
|
2966
|
+
background: o && !r ? Ki.DARK_GREY : Ki.DARKEST,
|
|
2967
|
+
color: Ki.WHITE,
|
|
2968
|
+
border: `1px solid ${Ki.PANEL_EDGE}`,
|
|
2969
|
+
borderRadius: 4,
|
|
2970
|
+
cursor: r ? "not-allowed" : "pointer",
|
|
2971
|
+
opacity: r ? .55 : 1,
|
|
2972
|
+
padding: 0,
|
|
2973
|
+
fontSize: 14,
|
|
2974
|
+
lineHeight: 1,
|
|
2975
|
+
transition: "background 80ms ease"
|
|
2976
|
+
},
|
|
2977
|
+
title: t,
|
|
2978
|
+
type: "button",
|
|
2979
|
+
children: a
|
|
2980
|
+
});
|
|
2981
|
+
}
|
|
2982
|
+
//#endregion
|
|
2983
|
+
//#region src/ui/JimboInputModal.tsx
|
|
2984
|
+
var Ji = t;
|
|
2985
|
+
function Yi({ open: e, title: t, message: n, placeholder: r, initialValue: i = "", confirmLabel: a = "Confirm", cancelLabel: o = "Cancel", validate: s, onConfirm: c, onCancel: l }) {
|
|
2986
|
+
let [u, d] = v(i), [f, p] = v(null), h = _(null), [g, y] = v(e);
|
|
2987
|
+
e !== g && (y(e), e && (d(i), p(null))), m(() => {
|
|
2988
|
+
if (e) {
|
|
2989
|
+
let e = setTimeout(() => h.current?.focus(), 30);
|
|
2990
|
+
return () => clearTimeout(e);
|
|
2991
|
+
}
|
|
2992
|
+
}, [e]);
|
|
2993
|
+
function S() {
|
|
2994
|
+
let e = s?.(u) ?? null;
|
|
2995
|
+
if (e) {
|
|
2996
|
+
p(e);
|
|
2997
|
+
return;
|
|
2998
|
+
}
|
|
2999
|
+
c(u);
|
|
3000
|
+
}
|
|
3001
|
+
return /* @__PURE__ */ x(le, {
|
|
3002
|
+
onClose: l,
|
|
3003
|
+
open: e,
|
|
3004
|
+
title: t,
|
|
3005
|
+
children: [
|
|
3006
|
+
n && /* @__PURE__ */ b(k, {
|
|
3007
|
+
size: "sm",
|
|
3008
|
+
style: {
|
|
3009
|
+
display: "block",
|
|
3010
|
+
marginBottom: 8
|
|
3011
|
+
},
|
|
3012
|
+
tone: "grey",
|
|
3013
|
+
children: n
|
|
3014
|
+
}),
|
|
3015
|
+
/* @__PURE__ */ b("input", {
|
|
3016
|
+
"aria-invalid": !!f,
|
|
3017
|
+
onChange: (e) => {
|
|
3018
|
+
d(e.target.value), f && p(null);
|
|
3019
|
+
},
|
|
3020
|
+
onKeyDown: (e) => {
|
|
3021
|
+
e.key === "Enter" && S(), e.key === "Escape" && l();
|
|
3022
|
+
},
|
|
3023
|
+
placeholder: r,
|
|
3024
|
+
ref: h,
|
|
3025
|
+
style: {
|
|
3026
|
+
width: "100%",
|
|
3027
|
+
padding: "8px 10px",
|
|
3028
|
+
background: Ji.DARKEST,
|
|
3029
|
+
color: Ji.WHITE,
|
|
3030
|
+
border: `1px solid ${f ? Ji.RED : Ji.PANEL_EDGE}`,
|
|
3031
|
+
borderRadius: 4,
|
|
3032
|
+
fontSize: 13,
|
|
3033
|
+
fontFamily: "m6x11plus, monospace",
|
|
3034
|
+
letterSpacing: 1,
|
|
3035
|
+
outline: "none",
|
|
3036
|
+
boxSizing: "border-box"
|
|
3037
|
+
},
|
|
3038
|
+
type: "text",
|
|
3039
|
+
value: u
|
|
3040
|
+
}),
|
|
3041
|
+
f && /* @__PURE__ */ b(k, {
|
|
3042
|
+
size: "sm",
|
|
3043
|
+
style: {
|
|
3044
|
+
display: "block",
|
|
3045
|
+
marginTop: 6
|
|
3046
|
+
},
|
|
3047
|
+
tone: "red",
|
|
3048
|
+
children: f
|
|
3049
|
+
}),
|
|
3050
|
+
/* @__PURE__ */ x("div", {
|
|
3051
|
+
style: {
|
|
3052
|
+
display: "flex",
|
|
3053
|
+
justifyContent: "flex-end",
|
|
3054
|
+
gap: 8,
|
|
3055
|
+
marginTop: 14
|
|
3056
|
+
},
|
|
3057
|
+
children: [/* @__PURE__ */ b(j, {
|
|
3058
|
+
onClick: l,
|
|
3059
|
+
size: "sm",
|
|
3060
|
+
tone: "red",
|
|
3061
|
+
children: o
|
|
3062
|
+
}), /* @__PURE__ */ b(j, {
|
|
3063
|
+
onClick: S,
|
|
3064
|
+
size: "sm",
|
|
3065
|
+
tone: "blue",
|
|
3066
|
+
children: a
|
|
3067
|
+
})]
|
|
3068
|
+
})
|
|
3069
|
+
]
|
|
3070
|
+
});
|
|
3071
|
+
}
|
|
3072
|
+
//#endregion
|
|
3073
|
+
//#region src/ui/JimboPanelSpinner.tsx
|
|
3074
|
+
function Xi({ label: e, title: t, description: n, media: r, meta: i, className: a = "", style: o, onPrev: s, onNext: c, prevDisabled: l = !1, nextDisabled: u = !1 }) {
|
|
3075
|
+
return /* @__PURE__ */ x("div", {
|
|
3076
|
+
className: `j-panel-spinner ${a}`.trim(),
|
|
3077
|
+
style: o,
|
|
3078
|
+
children: [e ? /* @__PURE__ */ b("div", {
|
|
3079
|
+
className: "j-panel-spinner__label",
|
|
3080
|
+
children: /* @__PURE__ */ b(k, {
|
|
3081
|
+
size: "xs",
|
|
3082
|
+
tone: "grey",
|
|
3083
|
+
children: e
|
|
3084
|
+
})
|
|
3085
|
+
}) : null, /* @__PURE__ */ x("div", {
|
|
3086
|
+
className: "j-panel-spinner__row",
|
|
3087
|
+
children: [
|
|
3088
|
+
/* @__PURE__ */ b(j, {
|
|
3089
|
+
tone: "red",
|
|
3090
|
+
size: "sm",
|
|
3091
|
+
onClick: s,
|
|
3092
|
+
disabled: l,
|
|
3093
|
+
children: "<"
|
|
3094
|
+
}),
|
|
3095
|
+
/* @__PURE__ */ x("div", {
|
|
3096
|
+
className: "j-panel-spinner__panel",
|
|
3097
|
+
children: [
|
|
3098
|
+
r ? /* @__PURE__ */ b("div", {
|
|
3099
|
+
className: "j-panel-spinner__media",
|
|
3100
|
+
children: r
|
|
3101
|
+
}) : null,
|
|
3102
|
+
/* @__PURE__ */ b("div", {
|
|
3103
|
+
className: "j-panel-spinner__title",
|
|
3104
|
+
children: /* @__PURE__ */ b(k, {
|
|
3105
|
+
size: "md",
|
|
3106
|
+
tone: "white",
|
|
3107
|
+
children: t
|
|
3108
|
+
})
|
|
3109
|
+
}),
|
|
3110
|
+
i ? /* @__PURE__ */ b("div", {
|
|
3111
|
+
className: "j-panel-spinner__meta",
|
|
3112
|
+
children: i
|
|
3113
|
+
}) : null,
|
|
3114
|
+
n ? /* @__PURE__ */ b("div", {
|
|
3115
|
+
className: "j-panel-spinner__description",
|
|
3116
|
+
children: /* @__PURE__ */ b(k, {
|
|
3117
|
+
size: "micro",
|
|
3118
|
+
tone: "grey",
|
|
3119
|
+
children: n
|
|
3120
|
+
})
|
|
3121
|
+
}) : null
|
|
3122
|
+
]
|
|
3123
|
+
}),
|
|
3124
|
+
/* @__PURE__ */ b(j, {
|
|
3125
|
+
tone: "red",
|
|
3126
|
+
size: "sm",
|
|
3127
|
+
onClick: c,
|
|
3128
|
+
disabled: u,
|
|
3129
|
+
children: ">"
|
|
3130
|
+
})
|
|
3131
|
+
]
|
|
3132
|
+
})]
|
|
3133
|
+
});
|
|
3134
|
+
}
|
|
3135
|
+
//#endregion
|
|
3136
|
+
//#region src/ui/JimboSelect.tsx
|
|
3137
|
+
var Zi = t;
|
|
3138
|
+
function Qi({ value: e, options: t, onChange: n, placeholder: r, disabled: i = !1, fullWidth: a = !0, size: o = "md", style: s, "aria-label": c }) {
|
|
3139
|
+
let l;
|
|
3140
|
+
l = t.length === 0 ? [] : typeof t[0] == "string" ? t.map((e) => ({ value: e })) : t;
|
|
3141
|
+
let u = o === "sm" ? "4px 8px" : "6px 10px", d = o === "sm" ? 11 : 12;
|
|
3142
|
+
return /* @__PURE__ */ x("select", {
|
|
3143
|
+
"aria-label": c,
|
|
3144
|
+
disabled: i,
|
|
3145
|
+
onChange: (e) => n(e.target.value),
|
|
3146
|
+
style: {
|
|
3147
|
+
width: a ? "100%" : void 0,
|
|
3148
|
+
padding: u,
|
|
3149
|
+
background: Zi.DARKEST,
|
|
3150
|
+
color: Zi.WHITE,
|
|
3151
|
+
border: `1px solid ${Zi.PANEL_EDGE}`,
|
|
3152
|
+
borderRadius: 4,
|
|
3153
|
+
fontSize: d,
|
|
3154
|
+
fontFamily: "m6x11plus, monospace",
|
|
3155
|
+
cursor: i ? "not-allowed" : "pointer",
|
|
3156
|
+
opacity: i ? .55 : 1,
|
|
3157
|
+
appearance: "none",
|
|
3158
|
+
backgroundImage: "linear-gradient(45deg, transparent 50%, " + Zi.GOLD_TEXT + " 50%), linear-gradient(135deg, " + Zi.GOLD_TEXT + " 50%, transparent 50%)",
|
|
3159
|
+
backgroundPosition: "calc(100% - 12px) 50%, calc(100% - 7px) 50%",
|
|
3160
|
+
backgroundSize: "5px 5px, 5px 5px",
|
|
3161
|
+
backgroundRepeat: "no-repeat",
|
|
3162
|
+
paddingRight: 22,
|
|
3163
|
+
...s
|
|
3164
|
+
},
|
|
3165
|
+
value: e,
|
|
3166
|
+
children: [r !== void 0 && /* @__PURE__ */ b("option", {
|
|
3167
|
+
disabled: !0,
|
|
3168
|
+
value: "",
|
|
3169
|
+
children: r
|
|
3170
|
+
}), l.map((e) => /* @__PURE__ */ b("option", {
|
|
3171
|
+
disabled: e.disabled,
|
|
3172
|
+
value: e.value,
|
|
3173
|
+
children: e.label ?? e.value
|
|
3174
|
+
}, e.value))]
|
|
3175
|
+
});
|
|
3176
|
+
}
|
|
3177
|
+
//#endregion
|
|
3178
|
+
//#region src/ui/PanelSplitter.tsx
|
|
3179
|
+
var $i = t;
|
|
3180
|
+
function ea({ orientation: e = "vertical", onDrag: t, onKeyAdjust: n, "aria-label": r }) {
|
|
3181
|
+
let i = _(!1), a = _(0), o = _(t);
|
|
3182
|
+
h(() => {
|
|
3183
|
+
o.current = t;
|
|
3184
|
+
});
|
|
3185
|
+
let s = f((t) => {
|
|
3186
|
+
t.preventDefault(), t.target.setPointerCapture(t.pointerId), i.current = !0, a.current = e === "vertical" ? t.clientX : t.clientY;
|
|
3187
|
+
}, [e]);
|
|
3188
|
+
m(() => {
|
|
3189
|
+
function t(t) {
|
|
3190
|
+
if (!i.current) return;
|
|
3191
|
+
let n = e === "vertical" ? t.clientX : t.clientY, r = n - a.current;
|
|
3192
|
+
r !== 0 && (a.current = n, o.current(r));
|
|
3193
|
+
}
|
|
3194
|
+
function n() {
|
|
3195
|
+
i.current = !1;
|
|
3196
|
+
}
|
|
3197
|
+
return window.addEventListener("pointermove", t), window.addEventListener("pointerup", n), window.addEventListener("pointercancel", n), () => {
|
|
3198
|
+
window.removeEventListener("pointermove", t), window.removeEventListener("pointerup", n), window.removeEventListener("pointercancel", n);
|
|
3199
|
+
};
|
|
3200
|
+
}, [e]);
|
|
3201
|
+
let c = e === "vertical";
|
|
3202
|
+
return /* @__PURE__ */ b("button", {
|
|
3203
|
+
"aria-label": r ?? "Resize panel",
|
|
3204
|
+
onKeyDown: (e) => {
|
|
3205
|
+
n && (c && e.key === "ArrowLeft" && n(-16), c && e.key === "ArrowRight" && n(16), !c && e.key === "ArrowUp" && n(-16), !c && e.key === "ArrowDown" && n(16));
|
|
3206
|
+
},
|
|
3207
|
+
onPointerDown: s,
|
|
3208
|
+
style: {
|
|
3209
|
+
all: "unset",
|
|
3210
|
+
display: "block",
|
|
3211
|
+
flex: "0 0 auto",
|
|
3212
|
+
width: c ? 6 : void 0,
|
|
3213
|
+
height: c ? void 0 : 6,
|
|
3214
|
+
cursor: c ? "col-resize" : "row-resize",
|
|
3215
|
+
background: $i.PANEL_EDGE,
|
|
3216
|
+
borderLeft: c ? `1px solid ${$i.BLACK}` : void 0,
|
|
3217
|
+
borderRight: c ? `1px solid ${$i.BLACK}` : void 0,
|
|
3218
|
+
borderTop: c ? void 0 : `1px solid ${$i.BLACK}`,
|
|
3219
|
+
borderBottom: c ? void 0 : `1px solid ${$i.BLACK}`,
|
|
3220
|
+
touchAction: "none",
|
|
3221
|
+
userSelect: "none"
|
|
3222
|
+
},
|
|
3223
|
+
type: "button"
|
|
3224
|
+
});
|
|
3225
|
+
}
|
|
3226
|
+
//#endregion
|
|
3227
|
+
export { ue as A, ie as B, De as C, _e as D, ve as E, le as F, T as H, A as I, k as L, ce as M, j as N, me as O, se as P, oe as R, ke as S, ye as T, re as U, E as V, Pe as _, qi as a, Me as b, Ue as c, Be as d, Fe as f, Le as g, Re as h, Yi as i, fe as j, pe as k, He as l, Ie as m, Qi as n, Wi as o, ze as p, Xi as r, We as s, ea as t, Ve as u, je as v, Ee as w, Ae as x, Ne as y, D as z };
|
|
3228
|
+
|
|
3229
|
+
//# sourceMappingURL=ui-BEtq_JNg.js.map
|