jaml-ui 0.27.0 → 0.29.0

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