jaml-ui 0.29.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -14267,45 +14267,14 @@ function Ig() {
14267
14267
  };
14268
14268
  }
14269
14269
  //#endregion
14270
- //#region src/hooks/useAnalyzer.ts
14271
- function Lg() {
14272
- let [e, t] = D(null), [n, r] = D("idle"), [i, a] = D(null), [o, s] = D([]), [c, l] = D(null);
14273
- return {
14274
- score: e,
14275
- status: n,
14276
- error: i,
14277
- analyze: T((e, n) => {
14278
- t(null), s([]), l(null), r("running"), a(null), (async () => {
14279
- try {
14280
- await Le();
14281
- let i = We.validateJaml(n);
14282
- if (i !== "valid") throw Error(i || "Invalid JAML.");
14283
- let a = We.analyzeJamlSeeds(n, [e]);
14284
- if (a.error) throw Error(a.error);
14285
- a.tallyLabels && s(a.tallyLabels);
14286
- let o = a.seeds[0];
14287
- o?.analysis && (l(o.analysis), t(o.score)), r("done");
14288
- } catch (e) {
14289
- a(e instanceof Error ? e.message : String(e)), r("error");
14290
- }
14291
- })();
14292
- }, []),
14293
- clearError: T(() => {
14294
- a(null), r((e) => e === "error" ? "idle" : e);
14295
- }, []),
14296
- tallyLabels: o,
14297
- rawAnalysis: c
14298
- };
14299
- }
14300
- //#endregion
14301
14270
  //#region src/components/JamlSpeedometer.tsx
14302
- function Rg(e) {
14271
+ function Lg(e) {
14303
14272
  return Number(e).toLocaleString();
14304
14273
  }
14305
- function zg(e) {
14274
+ function Rg(e) {
14306
14275
  return !Number.isFinite(e) || e <= 0 ? "—" : e >= 1e6 ? `${(e / 1e6).toFixed(1)}M/s` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}K/s` : `${Math.round(e)}/s`;
14307
14276
  }
14308
- function Bg({ seedsPerSecond: e, totalSearched: t, matchingSeeds: n, status: r, className: i = "", style: a }) {
14277
+ function zg({ seedsPerSecond: e, totalSearched: t, matchingSeeds: n, status: r, className: i = "", style: a }) {
14309
14278
  let o = r === "running" || r === "booting", s = r === "error" ? "red" : r === "completed" ? "green" : r === "cancelled" ? "orange" : o ? "gold" : "grey", c = r === "booting" ? "booting" : r === "running" ? "searching" : r === "completed" ? "done" : r === "cancelled" ? "cancelled" : r === "error" ? "error" : "idle";
14310
14279
  return /* @__PURE__ */ k("div", {
14311
14280
  className: i,
@@ -14339,33 +14308,29 @@ function Bg({ seedsPerSecond: e, totalSearched: t, matchingSeeds: n, status: r,
14339
14308
  /* @__PURE__ */ O(p, {
14340
14309
  size: "sm",
14341
14310
  tone: o ? "gold" : "grey",
14342
- children: zg(e)
14311
+ children: Rg(e)
14343
14312
  }),
14344
14313
  /* @__PURE__ */ k(p, {
14345
14314
  size: "sm",
14346
14315
  tone: "white",
14347
- children: [Rg(t), " searched"]
14316
+ children: [Lg(t), " searched"]
14348
14317
  }),
14349
14318
  /* @__PURE__ */ k(p, {
14350
14319
  size: "sm",
14351
14320
  tone: Number(n) > 0 ? "green" : "grey",
14352
- children: [Rg(n), " matches"]
14321
+ children: [Lg(n), " matches"]
14353
14322
  })
14354
14323
  ]
14355
14324
  });
14356
14325
  }
14357
14326
  //#endregion
14358
14327
  //#region src/components/JamlCurator.tsx
14359
- var Vg = C;
14360
- function Hg() {
14361
- let [e, t] = D(""), n = Ig(), r = Lg(), [i, a] = D(0), o = n.status === "running", s = () => {
14362
- o ? n.cancel() : (a(0), n.startRandom(e, 1e6));
14363
- }, l = n.results[i]?.seed, u = E(e), d = E(r.analyze);
14364
- return Be(() => {
14365
- u.current = e, d.current = r.analyze;
14366
- }), ze(() => {
14367
- l && u.current && d.current(l, u.current);
14368
- }, [l]), /* @__PURE__ */ O("div", {
14328
+ var Bg = C;
14329
+ function Vg() {
14330
+ let [e, t] = D(""), n = Ig(), [r, i] = D(0), a = n.status === "running", o = () => {
14331
+ a ? n.cancel() : (i(0), n.startRandom(e, 1e6));
14332
+ }, s = n.results[r]?.seed;
14333
+ return /* @__PURE__ */ O("div", {
14369
14334
  style: {
14370
14335
  width: "100%",
14371
14336
  maxWidth: 375,
@@ -14373,10 +14338,10 @@ function Hg() {
14373
14338
  maxHeight: 667,
14374
14339
  margin: "0 auto",
14375
14340
  position: "relative",
14376
- background: Vg.DARKEST,
14341
+ background: Bg.DARKEST,
14377
14342
  overflow: "hidden",
14378
- borderLeft: `1px solid ${Vg.PANEL_EDGE}`,
14379
- borderRight: `1px solid ${Vg.PANEL_EDGE}`,
14343
+ borderLeft: `1px solid ${Bg.PANEL_EDGE}`,
14344
+ borderRight: `1px solid ${Bg.PANEL_EDGE}`,
14380
14345
  boxShadow: "0 0 20px rgba(0,0,0,0.5)",
14381
14346
  display: "flex",
14382
14347
  flexDirection: "column"
@@ -14389,7 +14354,7 @@ function Hg() {
14389
14354
  gap: 12,
14390
14355
  padding: "16px 12px 12px",
14391
14356
  boxSizing: "border-box",
14392
- borderBottom: `2px solid ${Vg.GOLD}`
14357
+ borderBottom: `2px solid ${Bg.GOLD}`
14393
14358
  },
14394
14359
  children: [
14395
14360
  /* @__PURE__ */ k("div", {
@@ -14403,10 +14368,10 @@ function Hg() {
14403
14368
  tone: "gold",
14404
14369
  children: "JAML Curator"
14405
14370
  }), /* @__PURE__ */ O(f, {
14406
- tone: o ? "red" : "green",
14371
+ tone: a ? "red" : "green",
14407
14372
  size: "sm",
14408
- onClick: s,
14409
- children: o ? "STOP" : "SEARCH"
14373
+ onClick: o,
14374
+ children: a ? "Stop" : "Search"
14410
14375
  })]
14411
14376
  }),
14412
14377
  /* @__PURE__ */ O("div", {
@@ -14419,7 +14384,7 @@ function Hg() {
14419
14384
  t(e);
14420
14385
  } })
14421
14386
  }),
14422
- /* @__PURE__ */ O(Bg, {
14387
+ /* @__PURE__ */ O(zg, {
14423
14388
  status: n.status,
14424
14389
  seedsPerSecond: n.seedsPerSecond,
14425
14390
  totalSearched: n.totalSearched,
@@ -14429,7 +14394,7 @@ function Hg() {
14429
14394
  size: "sm",
14430
14395
  tone: "grey",
14431
14396
  className: "j-text-center",
14432
- children: o ? "Searching..." : "No results yet."
14397
+ children: a ? "Searching..." : "No results yet."
14433
14398
  }) : /* @__PURE__ */ k("div", {
14434
14399
  className: "j-flex-col j-gap-sm",
14435
14400
  children: [/* @__PURE__ */ k("div", {
@@ -14444,20 +14409,23 @@ function Hg() {
14444
14409
  children: [n.matchingSeeds, " found"]
14445
14410
  })]
14446
14411
  }), /* @__PURE__ */ O(ae, {
14447
- canPrev: i > 0,
14448
- canNext: i < n.results.length - 1,
14449
- onPrev: () => a((e) => Math.max(0, e - 1)),
14450
- onNext: () => a((e) => Math.min(n.results.length - 1, e + 1)),
14412
+ canPrev: r > 0,
14413
+ canNext: r < n.results.length - 1,
14414
+ onPrev: () => i((e) => Math.max(0, e - 1)),
14415
+ onNext: () => i((e) => Math.min(n.results.length - 1, e + 1)),
14451
14416
  children: /* @__PURE__ */ k("div", {
14452
14417
  className: "j-flex-col j-items-center j-gap-xs",
14453
14418
  children: [/* @__PURE__ */ O(p, {
14454
14419
  size: "lg",
14455
14420
  tone: "gold",
14456
14421
  style: { letterSpacing: 2 },
14457
- children: l
14422
+ children: s
14458
14423
  }), /* @__PURE__ */ O(f, {
14459
14424
  tone: "blue",
14460
14425
  size: "xs",
14426
+ onClick: () => {
14427
+ s && typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(s);
14428
+ },
14461
14429
  children: "Copy Seed"
14462
14430
  })]
14463
14431
  })
@@ -14469,7 +14437,7 @@ function Hg() {
14469
14437
  }
14470
14438
  //#endregion
14471
14439
  //#region src/components/CardList.tsx
14472
- function Ug({ title: e, subtitle: t, children: n, className: r = "" }) {
14440
+ function Hg({ title: e, subtitle: t, children: n, className: r = "" }) {
14473
14441
  return /* @__PURE__ */ k("div", {
14474
14442
  className: r,
14475
14443
  children: [/* @__PURE__ */ k("div", {
@@ -14498,27 +14466,27 @@ function Ug({ title: e, subtitle: t, children: n, className: r = "" }) {
14498
14466
  }
14499
14467
  //#endregion
14500
14468
  //#region src/components/Standardcard.tsx
14501
- function Wg(...e) {
14469
+ function Ug(...e) {
14502
14470
  return e.filter(Boolean).join(" ");
14503
14471
  }
14504
- var Gg = 71, Kg = 95, qg = {
14472
+ var Wg = 71, Gg = 95, Kg = {
14505
14473
  A: "Ace",
14506
14474
  K: "King",
14507
14475
  Q: "Queen",
14508
14476
  J: "Jack"
14509
- }, Jg = (e) => e[0].toUpperCase() + e.slice(1).toLowerCase();
14510
- function Yg({ suit: e, rank: t, enhancement: n, seal: r, edition: i, className: a, size: o = 71, style: s }) {
14511
- let c = qg[t] ?? t, l = Jg(e), u = Te[c], d = Oe[l];
14477
+ }, qg = (e) => e[0].toUpperCase() + e.slice(1).toLowerCase();
14478
+ function Jg({ suit: e, rank: t, enhancement: n, seal: r, edition: i, className: a, size: o = 71, style: s }) {
14479
+ let c = Kg[t] ?? t, l = qg(e), u = Te[c], d = Oe[l];
14512
14480
  if (u === void 0 || d === void 0) return console.warn(`Invalid card: ${t} of ${e}`), null;
14513
- let f = o / Gg, p = Kg / Gg * o, m = -u * Gg, h = -d * Kg, g = n ? we[Jg(n)] ?? {
14481
+ let f = o / Wg, p = Gg / Wg * o, m = -u * Wg, h = -d * Gg, g = n ? we[qg(n)] ?? {
14514
14482
  x: 0,
14515
14483
  y: 0
14516
14484
  } : {
14517
14485
  x: 0,
14518
14486
  y: 0
14519
- }, _ = -g.x * Gg, v = -g.y * Kg, y = r ? Ee[Jg(r)] ?? null : null, b = y ? -y.x * Gg : 0, x = y ? -y.y * Kg : 0, S = i ? Ne[i] : void 0, ee = S === void 0 ? 0 : -S * Gg, te = i === "Negative", ne = te ? "invert(0.94)" : "none", re = xe("enhancers"), ie = xe("deck"), ae = xe("editions");
14487
+ }, _ = -g.x * Wg, v = -g.y * Gg, y = r ? Ee[qg(r)] ?? null : null, b = y ? -y.x * Wg : 0, x = y ? -y.y * Gg : 0, S = i ? Ne[i] : void 0, ee = S === void 0 ? 0 : -S * Wg, te = i === "Negative", ne = te ? "invert(0.94)" : "none", re = xe("enhancers"), ie = xe("deck"), ae = xe("editions");
14520
14488
  return /* @__PURE__ */ k("div", {
14521
- className: Wg("relative overflow-hidden inline-block select-none", a),
14489
+ className: Ug("relative overflow-hidden inline-block select-none", a),
14522
14490
  style: {
14523
14491
  width: o,
14524
14492
  height: p,
@@ -14532,8 +14500,8 @@ function Yg({ suit: e, rank: t, enhancement: n, seal: r, edition: i, className:
14532
14500
  style: {
14533
14501
  backgroundImage: `url(${re})`,
14534
14502
  backgroundPosition: `${_}px ${v}px`,
14535
- width: Gg,
14536
- height: Kg,
14503
+ width: Wg,
14504
+ height: Gg,
14537
14505
  transform: `scale(${f})`,
14538
14506
  transformOrigin: "top left",
14539
14507
  backgroundRepeat: "no-repeat"
@@ -14544,8 +14512,8 @@ function Yg({ suit: e, rank: t, enhancement: n, seal: r, edition: i, className:
14544
14512
  style: {
14545
14513
  backgroundImage: `url(${ie})`,
14546
14514
  backgroundPosition: `${m}px ${h}px`,
14547
- width: Gg,
14548
- height: Kg,
14515
+ width: Wg,
14516
+ height: Gg,
14549
14517
  transform: `scale(${f})`,
14550
14518
  transformOrigin: "top left",
14551
14519
  backgroundRepeat: "no-repeat",
@@ -14557,8 +14525,8 @@ function Yg({ suit: e, rank: t, enhancement: n, seal: r, edition: i, className:
14557
14525
  style: {
14558
14526
  backgroundImage: `url(${ae})`,
14559
14527
  backgroundPosition: `${ee}px 0px`,
14560
- width: Gg,
14561
- height: Kg,
14528
+ width: Wg,
14529
+ height: Gg,
14562
14530
  transform: `scale(${f})`,
14563
14531
  transformOrigin: "top left",
14564
14532
  backgroundRepeat: "no-repeat"
@@ -14569,8 +14537,8 @@ function Yg({ suit: e, rank: t, enhancement: n, seal: r, edition: i, className:
14569
14537
  style: {
14570
14538
  backgroundImage: `url(${re})`,
14571
14539
  backgroundPosition: `${b}px ${x}px`,
14572
- width: Gg,
14573
- height: Kg,
14540
+ width: Wg,
14541
+ height: Gg,
14574
14542
  transform: `scale(${f})`,
14575
14543
  transformOrigin: "top left",
14576
14544
  backgroundRepeat: "no-repeat"
@@ -14582,7 +14550,7 @@ function Yg({ suit: e, rank: t, enhancement: n, seal: r, edition: i, className:
14582
14550
  }
14583
14551
  //#endregion
14584
14552
  //#region src/components/CardFan.tsx
14585
- var Xg = {
14553
+ var Yg = {
14586
14554
  2: "2",
14587
14555
  3: "3",
14588
14556
  4: "4",
@@ -14596,20 +14564,20 @@ var Xg = {
14596
14564
  Q: "Queen",
14597
14565
  K: "King",
14598
14566
  A: "Ace"
14599
- }, Zg = {
14567
+ }, Xg = {
14600
14568
  H: "Hearts",
14601
14569
  C: "Clubs",
14602
14570
  D: "Diamonds",
14603
14571
  S: "Spades"
14604
14572
  };
14605
- function Qg(e) {
14573
+ function Zg(e) {
14606
14574
  let [t, n] = e.split("_");
14607
14575
  return {
14608
- rank: Xg[t] ?? "2",
14609
- suit: Zg[n] ?? "Clubs"
14576
+ rank: Yg[t] ?? "2",
14577
+ suit: Xg[n] ?? "Clubs"
14610
14578
  };
14611
14579
  }
14612
- function $g({ count: e = 0, cards: t, className: n = "", style: r, label: i, showLabel: a = !0 }) {
14580
+ function Qg({ count: e = 0, cards: t, className: n = "", style: r, label: i, showLabel: a = !0 }) {
14613
14581
  let o = t ? t.length : e, s = o > 40 ? 46 : o > 30 ? 32 : o > 12 ? 36 : o > 8 ? 42 : o > 5 ? 48 : 54, c = s * (1 - (o > 40 ? .88 : o > 30 ? .85 : o > 15 ? .75 : o > 6 ? .6 : .45)), l = o > 40 ? 40 : o > 20 ? 30 : o > 10 ? 15 : 25;
14614
14582
  return /* @__PURE__ */ k("div", {
14615
14583
  className: n,
@@ -14627,7 +14595,7 @@ function $g({ count: e = 0, cards: t, className: n = "", style: r, label: i, sho
14627
14595
  height: 120
14628
14596
  },
14629
14597
  children: o > 0 ? Array.from({ length: o }).map((e, n) => {
14630
- let r = (o - 1) / 2, i = n - r, a = i * c, u = Math.abs(i / (r || 1)) ** 2 * (o > 20 ? 20 : 10), d = i / (r || 1) * l, f = t ? Qg(t[n]) : {
14598
+ let r = (o - 1) / 2, i = n - r, a = i * c, u = Math.abs(i / (r || 1)) ** 2 * (o > 20 ? 20 : 10), d = i / (r || 1) * l, f = t ? Zg(t[n]) : {
14631
14599
  rank: "2",
14632
14600
  suit: "Clubs"
14633
14601
  };
@@ -14640,7 +14608,7 @@ function $g({ count: e = 0, cards: t, className: n = "", style: r, label: i, sho
14640
14608
  transformOrigin: "bottom center",
14641
14609
  zIndex: n
14642
14610
  },
14643
- children: /* @__PURE__ */ O(Yg, {
14611
+ children: /* @__PURE__ */ O(Jg, {
14644
14612
  rank: f.rank,
14645
14613
  suit: f.suit,
14646
14614
  size: s,
@@ -14673,7 +14641,7 @@ function $g({ count: e = 0, cards: t, className: n = "", style: r, label: i, sho
14673
14641
  }
14674
14642
  //#endregion
14675
14643
  //#region src/components/DeckSprite.tsx
14676
- var e_ = {
14644
+ var $g = {
14677
14645
  red: {
14678
14646
  x: 0,
14679
14647
  y: 0
@@ -14742,7 +14710,7 @@ var e_ = {
14742
14710
  x: 3,
14743
14711
  y: 4
14744
14712
  }
14745
- }, t_ = {
14713
+ }, e_ = {
14746
14714
  white: {
14747
14715
  x: 1,
14748
14716
  y: 0
@@ -14775,31 +14743,31 @@ var e_ = {
14775
14743
  x: 3,
14776
14744
  y: 1
14777
14745
  }
14778
- }, n_ = 142, r_ = 190, i_ = 7, a_ = 5, o_ = 5, s_ = 3;
14779
- function c_({ deck: e, stake: t, size: n = 50, className: r = "", style: i }) {
14780
- let a = e_[(e || "erratic").toLowerCase().replace(/\s*deck$/, "").trim()] ?? e_.erratic, o = t ? t_[t.toLowerCase().replace(/\s*stake$/, "").trim()] : null;
14746
+ }, t_ = 142, n_ = 190, r_ = 7, i_ = 5, a_ = 5, o_ = 3;
14747
+ function s_({ deck: e, stake: t, size: n = 50, className: r = "", style: i }) {
14748
+ let a = $g[(e || "erratic").toLowerCase().replace(/\s*deck$/, "").trim()] ?? $g.erratic, o = t ? e_[t.toLowerCase().replace(/\s*stake$/, "").trim()] : null;
14781
14749
  return /* @__PURE__ */ k("div", {
14782
14750
  className: r,
14783
14751
  style: {
14784
14752
  position: "relative",
14785
14753
  width: n,
14786
- height: n / n_ * r_,
14754
+ height: n / t_ * n_,
14787
14755
  ...i
14788
14756
  },
14789
14757
  children: [/* @__PURE__ */ O("div", { style: {
14790
14758
  position: "absolute",
14791
14759
  inset: 0,
14792
14760
  backgroundImage: `url(${xe("enhancers")})`,
14793
- backgroundSize: `${i_ * 100}% ${a_ * 100}%`,
14794
- backgroundPosition: `${a.x / (i_ - 1) * 100}% ${a.y / (a_ - 1) * 100}%`,
14761
+ backgroundSize: `${r_ * 100}% ${i_ * 100}%`,
14762
+ backgroundPosition: `${a.x / (r_ - 1) * 100}% ${a.y / (i_ - 1) * 100}%`,
14795
14763
  backgroundRepeat: "no-repeat",
14796
14764
  imageRendering: "pixelated"
14797
14765
  } }), o ? /* @__PURE__ */ O("div", { style: {
14798
14766
  position: "absolute",
14799
14767
  inset: 0,
14800
14768
  backgroundImage: `url(${xe("stickers")})`,
14801
- backgroundSize: `${o_ * 100}% ${s_ * 100}%`,
14802
- backgroundPosition: `${o.x / (o_ - 1) * 100}% ${o.y / (s_ - 1) * 100}%`,
14769
+ backgroundSize: `${a_ * 100}% ${o_ * 100}%`,
14770
+ backgroundPosition: `${o.x / (a_ - 1) * 100}% ${o.y / (o_ - 1) * 100}%`,
14803
14771
  backgroundRepeat: "no-repeat",
14804
14772
  imageRendering: "pixelated"
14805
14773
  } }) : null]
@@ -14807,7 +14775,7 @@ function c_({ deck: e, stake: t, size: n = 50, className: r = "", style: i }) {
14807
14775
  }
14808
14776
  //#endregion
14809
14777
  //#region src/components/MotelyVersionBadge.tsx
14810
- function l_({ caps: t, version: n, minimal: r = !1, loading: i = !1, className: a = "", style: o }) {
14778
+ function c_({ caps: t, version: n, minimal: r = !1, loading: i = !1, className: a = "", style: o }) {
14811
14779
  if (i) return /* @__PURE__ */ O("span", {
14812
14780
  className: `j-motely-badge ${a}`,
14813
14781
  style: o,
@@ -14866,8 +14834,8 @@ function l_({ caps: t, version: n, minimal: r = !1, loading: i = !1, className:
14866
14834
  }
14867
14835
  //#endregion
14868
14836
  //#region src/hooks/useShopStream.ts
14869
- var u_ = 12;
14870
- function d_(e, t, n, r = []) {
14837
+ var l_ = 12;
14838
+ function u_(e, t, n, r = []) {
14871
14839
  let [i, a] = D(() => r.map((e) => ({ ...e }))), [o, s] = D(null), [c, l] = D(!1), [u, d] = D(!0), [f, p] = D(!1), m = E(t);
14872
14840
  Be(() => {
14873
14841
  m.current = t;
@@ -14884,7 +14852,7 @@ function d_(e, t, n, r = []) {
14884
14852
  for (let e = 0; e < i.length; e++) t();
14885
14853
  if (i.length === 0) {
14886
14854
  let e = [];
14887
- for (let n = 0; n < u_; n++) e.push(t());
14855
+ for (let n = 0; n < l_; n++) e.push(t());
14888
14856
  if (n !== g.current) return;
14889
14857
  a(e);
14890
14858
  }
@@ -14901,7 +14869,7 @@ function d_(e, t, n, r = []) {
14901
14869
  loading: u,
14902
14870
  loadingMore: f,
14903
14871
  error: o,
14904
- pullMore: T((e = u_) => {
14872
+ pullMore: T((e = l_) => {
14905
14873
  let t = m.current;
14906
14874
  if (!(!t || e <= 0 || h.current)) {
14907
14875
  h.current = !0, p(!0), s(null);
@@ -14920,11 +14888,11 @@ function d_(e, t, n, r = []) {
14920
14888
  }
14921
14889
  //#endregion
14922
14890
  //#region src/hooks/useSearchPool.ts
14923
- var f_ = 1e3, p_ = 2e3;
14924
- function m_() {
14891
+ var d_ = 1e3, f_ = 2e3;
14892
+ function p_() {
14925
14893
  return typeof navigator < "u" && typeof navigator.hardwareConcurrency == "number" ? Math.max(1, Math.min(navigator.hardwareConcurrency, 8)) : 4;
14926
14894
  }
14927
- function h_(e) {
14895
+ function m_(e) {
14928
14896
  return {
14929
14897
  results: [],
14930
14898
  totalSearched: 0n,
@@ -14936,16 +14904,16 @@ function h_(e) {
14936
14904
  workerCount: e
14937
14905
  };
14938
14906
  }
14939
- function g_(e, t) {
14907
+ function h_(e, t) {
14940
14908
  let n = Math.floor(e / t), r = e - n * t;
14941
14909
  return Array.from({ length: t }, (e, t) => n + +(t < r));
14942
14910
  }
14943
- function __(e, t) {
14911
+ function g_(e, t) {
14944
14912
  let n = Array.from({ length: t }, () => []);
14945
14913
  for (let r = 0; r < e.length; r++) n[r % t].push(e[r]);
14946
14914
  return n;
14947
14915
  }
14948
- function v_(e, t) {
14916
+ function __(e, t) {
14949
14917
  let n = 35n ** BigInt(e), r = n / BigInt(t), i = n - r * BigInt(t), a = [], o = 0n;
14950
14918
  for (let e = 0; e < t; e++) {
14951
14919
  let t = r + (BigInt(e) < i ? 1n : 0n);
@@ -14956,18 +14924,18 @@ function v_(e, t) {
14956
14924
  }
14957
14925
  return a;
14958
14926
  }
14959
- var y_ = null;
14960
- async function b_() {
14961
- return y_ || (y_ = (await import("./chunks/searchPoolWorker-hVVM49SD.js")).default, y_);
14927
+ var v_ = null;
14928
+ async function y_() {
14929
+ return v_ || (v_ = (await import("./chunks/searchPoolWorker-hVVM49SD.js")).default, v_);
14962
14930
  }
14963
- function x_(e = {}) {
14964
- let t = e.workerCount ?? m_(), n = e.resultCap ?? f_, r = e.terminationGraceMs ?? p_, [i, a] = D(() => h_(t)), o = E([]), s = E(/* @__PURE__ */ new Map()), c = E(0), l = E(0), u = E(0), d = E(/* @__PURE__ */ new Set()), f = E(!1), p = T(() => {
14931
+ function b_(e = {}) {
14932
+ let t = e.workerCount ?? p_(), n = e.resultCap ?? d_, r = e.terminationGraceMs ?? f_, [i, a] = D(() => m_(t)), o = E([]), s = E(/* @__PURE__ */ new Map()), c = E(0), l = E(0), u = E(0), d = E(/* @__PURE__ */ new Set()), f = E(!1), p = T(() => {
14965
14933
  for (let e of o.current) try {
14966
14934
  e.worker.terminate();
14967
14935
  } catch {}
14968
14936
  o.current = [];
14969
14937
  }, []), m = T(() => {
14970
- f.current = !1, p(), s.current = /* @__PURE__ */ new Map(), d.current = /* @__PURE__ */ new Set(), c.current = 0, l.current = 0, a(h_(t));
14938
+ f.current = !1, p(), s.current = /* @__PURE__ */ new Map(), d.current = /* @__PURE__ */ new Set(), c.current = 0, l.current = 0, a(m_(t));
14971
14939
  }, [t, p]);
14972
14940
  ze(() => () => {
14973
14941
  p();
@@ -15050,7 +15018,7 @@ function x_(e = {}) {
15050
15018
  }, r);
15051
15019
  }, [p, r]), v = T(async (e, t) => {
15052
15020
  p(), s.current = /* @__PURE__ */ new Map(), d.current = /* @__PURE__ */ new Set(), c.current = 0, l.current = e, f.current = !1, u.current = Date.now();
15053
- let n = await b_(), r = [];
15021
+ let n = await y_(), r = [];
15054
15022
  for (let i = 0; i < e; i++) {
15055
15023
  let e = new n();
15056
15024
  e.onmessage = g, e.onerror = (e) => {
@@ -15091,14 +15059,14 @@ function x_(e = {}) {
15091
15059
  stake: r.stake
15092
15060
  }];
15093
15061
  a({
15094
- ...h_(1),
15062
+ ...m_(1),
15095
15063
  status: "running",
15096
15064
  workerCount: 1
15097
15065
  }), await v(1, t);
15098
15066
  return;
15099
15067
  }
15100
15068
  let o = Math.max(1, t), s = [];
15101
- if (n === "random") s = g_(Math.max(0, r.count ?? 0), o).map((t, n) => ({
15069
+ if (n === "random") s = h_(Math.max(0, r.count ?? 0), o).map((t, n) => ({
15102
15070
  type: "start",
15103
15071
  workerIndex: n,
15104
15072
  workerCount: o,
@@ -15108,7 +15076,7 @@ function x_(e = {}) {
15108
15076
  deck: r.deck,
15109
15077
  stake: r.stake
15110
15078
  }));
15111
- else if (n === "seedlist") s = __(r.seeds ?? [], o).map((t, n) => ({
15079
+ else if (n === "seedlist") s = g_(r.seeds ?? [], o).map((t, n) => ({
15112
15080
  type: "start",
15113
15081
  workerIndex: n,
15114
15082
  workerCount: o,
@@ -15120,7 +15088,7 @@ function x_(e = {}) {
15120
15088
  }));
15121
15089
  else if (n === "sequential") {
15122
15090
  let t = r.batchCharacterCount ?? 4;
15123
- s = v_(t, o).map((n, i) => ({
15091
+ s = __(t, o).map((n, i) => ({
15124
15092
  type: "start",
15125
15093
  workerIndex: i,
15126
15094
  workerCount: o,
@@ -15134,7 +15102,7 @@ function x_(e = {}) {
15134
15102
  }));
15135
15103
  }
15136
15104
  a({
15137
- ...h_(o),
15105
+ ...m_(o),
15138
15106
  status: "running",
15139
15107
  workerCount: o
15140
15108
  }), await v(o, s);
@@ -15178,6 +15146,37 @@ function x_(e = {}) {
15178
15146
  };
15179
15147
  }
15180
15148
  //#endregion
15149
+ //#region src/hooks/useAnalyzer.ts
15150
+ function x_() {
15151
+ let [e, t] = D(null), [n, r] = D("idle"), [i, a] = D(null), [o, s] = D([]), [c, l] = D(null);
15152
+ return {
15153
+ score: e,
15154
+ status: n,
15155
+ error: i,
15156
+ analyze: T((e, n) => {
15157
+ t(null), s([]), l(null), r("running"), a(null), (async () => {
15158
+ try {
15159
+ await Le();
15160
+ let i = We.validateJaml(n);
15161
+ if (i !== "valid") throw Error(i || "Invalid JAML.");
15162
+ let a = We.analyzeJamlSeeds(n, [e]);
15163
+ if (a.error) throw Error(a.error);
15164
+ a.tallyLabels && s(a.tallyLabels);
15165
+ let o = a.seeds[0];
15166
+ o?.analysis && (l(o.analysis), t(o.score)), r("done");
15167
+ } catch (e) {
15168
+ a(e instanceof Error ? e.message : String(e)), r("error");
15169
+ }
15170
+ })();
15171
+ }, []),
15172
+ clearError: T(() => {
15173
+ a(null), r((e) => e === "error" ? "idle" : e);
15174
+ }, []),
15175
+ tallyLabels: o,
15176
+ rawAnalysis: c
15177
+ };
15178
+ }
15179
+ //#endregion
15181
15180
  //#region src/components/PaginatedFilterBrowser.tsx
15182
15181
  function S_({ filters: e, itemsPerPage: t = 120, onSelectFilter: n, onMainAction: r, onSecondaryAction: i, onDeleteFilter: a, mainActionText: o = "Select", secondaryActionText: s = "Edit", showSecondary: l = !1, showDelete: u = !1, emptyText: d = "No items found." }) {
15183
15182
  let [m, h] = D(0), [g, _] = D(null), v = Math.max(1, Math.ceil(e.length / t)), y = Math.min(m, v - 1), b = e.slice(y * t, (y + 1) * t), x = e.find((e) => e.id === g) || null;
@@ -15414,6 +15413,6 @@ function M_() {
15414
15413
  return E_;
15415
15414
  }
15416
15415
  //#endregion
15417
- export { Pt as BOSS_PICKER_CONFIG, $g as CardFan, Ug as CardList, Ot as CategoryPicker, e_ as DECK_SPRITE_POS, c_ as DeckSprite, be as JIMBO_ANIMATIONS, w_ as JamlAestheticSelector, nt as JamlBoss, Ge as JamlCardRenderer, fg as JamlCodeEditor, Hg as JamlCurator, fe as JamlEditor, $e as JamlGameCard, Ng as JamlIde, qt as JamlIdeToolbar, tn as JamlIdeVisual, Wt as JamlMapEditor, mt as JamlMapPreview, mg as JamlSeedInput, hg as JamlSeedSpinner, Bg as JamlSpeedometer, tt as JamlTag, et as JamlVoucher, ve as JimboApp, b as JimboAppFooter, _e as JimboAppScroll, u as JimboBackButton, ge as JimboBackground, e as JimboBadge, h as JimboBalatroFooter, f as JimboButton, m as JimboCodeBlock, C as JimboColorOption, S as JimboCopyRow, i as JimboFilterBar, ae as JimboFlankNav, d as JimboFloating, le as JimboIconButton, ue as JimboInfoCard, se as JimboInfoCardAside, ne as JimboInfoCardBody, te as JimboInfoCardSub, v as JimboInfoCardTitle, a as JimboInnerPanel, re as JimboInputModal, x as JimboInset, s as JimboModal, c as JimboPanel, de as JimboPanelSpinner, he as JimboSectionHeader, ce as JimboSelect, t as JimboSprite, oe as JimboStatGrid, ie as JimboTabs, p as JimboText, y as JimboTextInput, r as JimboToggleList, n as JimboTooltip, l as JimboVerticalTabs, me as JimboWordmark, Et as JokerPicker, l_ as MotelyVersionBadge, _t as MysterySlot, Rt as PACK_PICKER_CONFIG, It as PLANET_PICKER_CONFIG, S_ as PaginatedFilterBrowser, pe as PanelSplitter, Yg as RealStandardcard, Lt as SPECTRAL_PICKER_CONFIG, t_ as STAKE_SPRITE_POS, ee as Showcase, _ as StakeSprite, Nt as TAG_PICKER_CONFIG, Ft as TAROT_PICKER_CONFIG, Mt as VOUCHER_PICKER_CONFIG, ct as extractVisualJamlItems, j_ as getJamlAssetBaseUrl, M_ as getMotelyEnums, pg as normalizeJamlSeed, Qe as resolveAnalyzerShopItem, D_ as setJamlAssetBaseUrl, A_ as setMotelyDecoderEnums, k_ as setMotelyDisplayEnums, Lg as useAnalyzer, d_ as useMotelyStream, Ig as useSearch, x_ as useSearchPool, ye as withAlpha };
15416
+ export { Pt as BOSS_PICKER_CONFIG, Qg as CardFan, Hg as CardList, Ot as CategoryPicker, $g as DECK_SPRITE_POS, s_ as DeckSprite, be as JIMBO_ANIMATIONS, w_ as JamlAestheticSelector, nt as JamlBoss, Ge as JamlCardRenderer, fg as JamlCodeEditor, Vg as JamlCurator, fe as JamlEditor, $e as JamlGameCard, Ng as JamlIde, qt as JamlIdeToolbar, tn as JamlIdeVisual, Wt as JamlMapEditor, mt as JamlMapPreview, mg as JamlSeedInput, hg as JamlSeedSpinner, zg as JamlSpeedometer, tt as JamlTag, et as JamlVoucher, ve as JimboApp, b as JimboAppFooter, _e as JimboAppScroll, u as JimboBackButton, ge as JimboBackground, e as JimboBadge, h as JimboBalatroFooter, f as JimboButton, m as JimboCodeBlock, C as JimboColorOption, S as JimboCopyRow, i as JimboFilterBar, ae as JimboFlankNav, d as JimboFloating, le as JimboIconButton, ue as JimboInfoCard, se as JimboInfoCardAside, ne as JimboInfoCardBody, te as JimboInfoCardSub, v as JimboInfoCardTitle, a as JimboInnerPanel, re as JimboInputModal, x as JimboInset, s as JimboModal, c as JimboPanel, de as JimboPanelSpinner, he as JimboSectionHeader, ce as JimboSelect, t as JimboSprite, oe as JimboStatGrid, ie as JimboTabs, p as JimboText, y as JimboTextInput, r as JimboToggleList, n as JimboTooltip, l as JimboVerticalTabs, me as JimboWordmark, Et as JokerPicker, c_ as MotelyVersionBadge, _t as MysterySlot, Rt as PACK_PICKER_CONFIG, It as PLANET_PICKER_CONFIG, S_ as PaginatedFilterBrowser, pe as PanelSplitter, Jg as RealStandardcard, Lt as SPECTRAL_PICKER_CONFIG, e_ as STAKE_SPRITE_POS, ee as Showcase, _ as StakeSprite, Nt as TAG_PICKER_CONFIG, Ft as TAROT_PICKER_CONFIG, Mt as VOUCHER_PICKER_CONFIG, ct as extractVisualJamlItems, j_ as getJamlAssetBaseUrl, M_ as getMotelyEnums, pg as normalizeJamlSeed, Qe as resolveAnalyzerShopItem, D_ as setJamlAssetBaseUrl, A_ as setMotelyDecoderEnums, k_ as setMotelyDisplayEnums, x_ as useAnalyzer, u_ as useMotelyStream, Ig as useSearch, b_ as useSearchPool, ye as withAlpha };
15418
15417
 
15419
15418
  //# sourceMappingURL=index.js.map