@launchsecure/launch-kit 0.0.30 → 0.0.32

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 (106) hide show
  1. package/dist/beacon/beacon.mjs +1027 -929
  2. package/dist/beacon/beacon.mjs.map +1 -1
  3. package/dist/beacon/beacon.umd.js +9 -9
  4. package/dist/beacon/beacon.umd.js.map +1 -1
  5. package/dist/beacon/types/internal/pick-mode-overlay.d.ts.map +1 -1
  6. package/dist/beacon/types/internal/picker.d.ts.map +1 -1
  7. package/dist/beacon/types/internal/pin-popover.d.ts.map +1 -1
  8. package/dist/beacon/types/internal/screenshot.d.ts +19 -1
  9. package/dist/beacon/types/internal/screenshot.d.ts.map +1 -1
  10. package/dist/beacon/types/internal/selector.d.ts.map +1 -1
  11. package/dist/beacon/types/plugins/domEle.d.ts.map +1 -1
  12. package/dist/chart-client/assets/{index-CJ4mgRRF.css → index-CDIhdgWg.css} +1 -1
  13. package/dist/chart-client/index.html +2 -2
  14. package/dist/client/assets/{index-DI5qSR_w.css → index-CfW4n40I.css} +1 -1
  15. package/dist/client/index.html +2 -2
  16. package/dist/council-client/assets/{index-C_-vAM9L.css → index-CZim6x1u.css} +1 -1
  17. package/dist/council-client/index.html +2 -2
  18. package/dist/deck-client/assets/{_baseUniq-DCt2IMRR.js → _baseUniq-C7GsHvgg.js} +1 -1
  19. package/dist/deck-client/assets/{arc-h-ifqmNR.js → arc-CSrZRINY.js} +1 -1
  20. package/dist/deck-client/assets/{architectureDiagram-Q4EWVU46-C9dITSPv.js → architectureDiagram-Q4EWVU46-zoB-G17J.js} +1 -1
  21. package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-BHuJT34t.js → blockDiagram-DXYQGD6D-BRjjtYH6.js} +1 -1
  22. package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-CpvMGtDG.js → c4Diagram-AHTNJAMY-C3D3sd2U.js} +1 -1
  23. package/dist/deck-client/assets/channel-8ReQnQfH.js +1 -0
  24. package/dist/deck-client/assets/{chunk-4BX2VUAB-B6md1VIm.js → chunk-4BX2VUAB-DhpDMOPO.js} +1 -1
  25. package/dist/deck-client/assets/{chunk-4TB4RGXK-BmEnX8ik.js → chunk-4TB4RGXK-BIRgPXRl.js} +1 -1
  26. package/dist/deck-client/assets/{chunk-55IACEB6-BZPUyZAZ.js → chunk-55IACEB6-BF24dwDZ.js} +1 -1
  27. package/dist/deck-client/assets/{chunk-EDXVE4YY-BWwNUK-l.js → chunk-EDXVE4YY-CW75Y61B.js} +1 -1
  28. package/dist/deck-client/assets/{chunk-FMBD7UC4-o7gSppGI.js → chunk-FMBD7UC4-B5-oyL79.js} +1 -1
  29. package/dist/deck-client/assets/{chunk-OYMX7WX6-C4KoTL5p.js → chunk-OYMX7WX6-BB2bHe_Q.js} +1 -1
  30. package/dist/deck-client/assets/{chunk-QZHKN3VN-jkf68sDs.js → chunk-QZHKN3VN-D80eZO4B.js} +1 -1
  31. package/dist/deck-client/assets/{chunk-YZCP3GAM-Cd4yBE7o.js → chunk-YZCP3GAM-Dz9787p_.js} +1 -1
  32. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-cRxTeGkK.js +1 -0
  33. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-cRxTeGkK.js +1 -0
  34. package/dist/deck-client/assets/clone-LSHZ3K6R.js +1 -0
  35. package/dist/deck-client/assets/{cose-bilkent-S5V4N54A-DeGFUgAV.js → cose-bilkent-S5V4N54A-MQjiZLcL.js} +1 -1
  36. package/dist/deck-client/assets/{dagre-KV5264BT-ekcYJuUV.js → dagre-KV5264BT-DG4EcLpJ.js} +1 -1
  37. package/dist/deck-client/assets/{diagram-5BDNPKRD-YHPk4rV2.js → diagram-5BDNPKRD-1n7hM3Gc.js} +1 -1
  38. package/dist/deck-client/assets/{diagram-G4DWMVQ6-DM-JCd_B.js → diagram-G4DWMVQ6-CYMarncV.js} +1 -1
  39. package/dist/deck-client/assets/{diagram-MMDJMWI5-l5FK1ybk.js → diagram-MMDJMWI5-DSisoipe.js} +1 -1
  40. package/dist/deck-client/assets/{diagram-TYMM5635-CIN4_1-j.js → diagram-TYMM5635-Btnq49OJ.js} +1 -1
  41. package/dist/deck-client/assets/{erDiagram-SMLLAGMA-MyinSkEl.js → erDiagram-SMLLAGMA-Cu2Hb_Tz.js} +1 -1
  42. package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-Dk8nn42x.js → flowDiagram-DWJPFMVM-CGJzUzsO.js} +1 -1
  43. package/dist/deck-client/assets/{ganttDiagram-T4ZO3ILL-BU1ihicu.js → ganttDiagram-T4ZO3ILL-D9sqGUBT.js} +1 -1
  44. package/dist/deck-client/assets/{gitGraphDiagram-UUTBAWPF-BjsTL13C.js → gitGraphDiagram-UUTBAWPF-C0QwX2od.js} +1 -1
  45. package/dist/deck-client/assets/{graph-DJmh-xi7.js → graph-CcBjOQCl.js} +1 -1
  46. package/dist/deck-client/assets/index-0arwoc0z.js +1195 -0
  47. package/dist/deck-client/assets/index-6sdqbm2o.js +2 -0
  48. package/dist/deck-client/assets/{index-DsIZ3LqL.css → index-BlTlhxFW.css} +1 -1
  49. package/dist/deck-client/assets/{infoDiagram-42DDH7IO-Dxvy_RB4.js → infoDiagram-42DDH7IO-DTimhhhS.js} +1 -1
  50. package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-DPOaNF1l.js → ishikawaDiagram-UXIWVN3A-DxOxg_B4.js} +1 -1
  51. package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-DMew3K5c.js → journeyDiagram-VCZTEJTY-Bpq0qa4j.js} +1 -1
  52. package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-csciJFuk.js → kanban-definition-6JOO6SKY-aTIrpcVO.js} +1 -1
  53. package/dist/deck-client/assets/{layout-Dg4yyms2.js → layout-DqglLR2E.js} +1 -1
  54. package/dist/deck-client/assets/{linear-BA3zU6gq.js → linear-D5GxehPc.js} +1 -1
  55. package/dist/deck-client/assets/{min-lz-Ird-p.js → min-DXLfSREq.js} +1 -1
  56. package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-CCEN8OQV.js → mindmap-definition-QFDTVHPH-mO5Vys7I.js} +1 -1
  57. package/dist/deck-client/assets/{pieDiagram-DEJITSTG-DM6n1HY7.js → pieDiagram-DEJITSTG-Dm0gzdAr.js} +1 -1
  58. package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-_ULoR66n.js → quadrantDiagram-34T5L4WZ-Daq7j3qD.js} +1 -1
  59. package/dist/deck-client/assets/{requirementDiagram-MS252O5E-BuwJs7Tn.js → requirementDiagram-MS252O5E-CmwV95um.js} +1 -1
  60. package/dist/deck-client/assets/{sankeyDiagram-XADWPNL6-BEsuzkW4.js → sankeyDiagram-XADWPNL6-BOYl3Nkf.js} +1 -1
  61. package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-CP2H0YWf.js → sequenceDiagram-FGHM5R23-BuUjhIcW.js} +1 -1
  62. package/dist/deck-client/assets/{stateDiagram-FHFEXIEX-B5Gw_NNL.js → stateDiagram-FHFEXIEX-LUZ_uwio.js} +1 -1
  63. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CnnRwE5D.js +1 -0
  64. package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-DsoYydQa.js → timeline-definition-GMOUNBTQ-CDUxCCAW.js} +1 -1
  65. package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-Dz8JT_ob.js → vennDiagram-DHZGUBPP-BRb24Tf7.js} +1 -1
  66. package/dist/deck-client/assets/{wardley-RL74JXVD-DGHQ_Ijv.js → wardley-RL74JXVD-B0BYyVBY.js} +1 -1
  67. package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-DN1LJMB1.js → wardleyDiagram-NUSXRM2D-BLGlYrQz.js} +1 -1
  68. package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-nb0oSfrQ.js → xychartDiagram-5P7HB3ND-De31MSnk.js} +1 -1
  69. package/dist/deck-client/index.html +2 -2
  70. package/dist/server/cli.js +666 -12
  71. package/dist/server/council-entry.js +0 -0
  72. package/dist/server/deck-mcp-entry.js +224 -61
  73. package/dist/server/deck-serve.js +195 -41
  74. package/dist/server/fb-wizard.js +0 -0
  75. package/dist/server/graph-mcp-entry.js +666 -12
  76. package/dist/server/init-entry.js +231 -82
  77. package/package.json +23 -21
  78. package/scaffolds/ls-marketplace/plugins/kit/skills/analyse/SKILL.md +180 -0
  79. package/scaffolds/ls-marketplace/plugins/kit/skills/{blast-radius.md → blast-radius/SKILL.md} +28 -12
  80. package/scaffolds/ls-marketplace/plugins/kit/skills/{debug.md → debug/SKILL.md} +2 -9
  81. package/scaffolds/ls-marketplace/plugins/kit/skills/diagram/SKILL.md +174 -0
  82. package/scaffolds/ls-marketplace/plugins/kit/skills/{prototype.md → prototype/SKILL.md} +21 -1
  83. package/scaffolds/ls-marketplace/plugins/kit/skills/recovery/SKILL.md +95 -0
  84. package/scaffolds/ls-marketplace/plugins/kit/skills/{wireframe.md → wireframe/SKILL.md} +21 -1
  85. package/scaffolds/migrate-safety/scripts/migrate-with-backup.sh +0 -0
  86. package/scaffolds/recall-hook/scripts/ensure-recall.sh +0 -0
  87. package/dist/deck-client/assets/channel-2PZVMiXf.js +0 -1
  88. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-Bt8xBAof.js +0 -1
  89. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-Bt8xBAof.js +0 -1
  90. package/dist/deck-client/assets/clone-BHQryoDl.js +0 -1
  91. package/dist/deck-client/assets/index-KsShfCV-.js +0 -476
  92. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-4T4wMDXr.js +0 -1
  93. package/scaffolds/ls-marketplace/plugins/kit/skills/diagram.md +0 -134
  94. package/scaffolds/ls-marketplace/plugins/kit/skills/recall.md +0 -83
  95. /package/dist/chart-client/assets/{index-Ccy-DpI-.js → index-B__ARB8k.js} +0 -0
  96. /package/dist/client/assets/{index-Dp0_okva.js → index-h8kMzVtG.js} +0 -0
  97. /package/dist/council-client/assets/{index-Dt4zWKSj.js → index-CWaDcsFR.js} +0 -0
  98. /package/scaffolds/ls-marketplace/plugins/kit/skills/{beacon-array.md → beacon-array/SKILL.md} +0 -0
  99. /package/scaffolds/ls-marketplace/plugins/kit/skills/{beacon-clear.md → beacon-clear/SKILL.md} +0 -0
  100. /package/scaffolds/ls-marketplace/plugins/kit/skills/{beacon-pulse.md → beacon-pulse/SKILL.md} +0 -0
  101. /package/scaffolds/ls-marketplace/plugins/kit/skills/{beacon-scan.md → beacon-scan/SKILL.md} +0 -0
  102. /package/scaffolds/ls-marketplace/plugins/kit/skills/{brief.md → brief/SKILL.md} +0 -0
  103. /package/scaffolds/ls-marketplace/plugins/kit/skills/{course.md → course/SKILL.md} +0 -0
  104. /package/scaffolds/ls-marketplace/plugins/kit/skills/{deploy-check.md → deploy-check/SKILL.md} +0 -0
  105. /package/scaffolds/ls-marketplace/plugins/kit/skills/{orbit.md → orbit/SKILL.md} +0 -0
  106. /package/scaffolds/ls-marketplace/plugins/kit/skills/{show-mcp-status.md → show-mcp-status/SKILL.md} +0 -0
@@ -1,4 +1,4 @@
1
- const Te = String.raw`
1
+ const Ie = String.raw`
2
2
  :host {
3
3
  --beacon-accent: #0ea5e9;
4
4
  --beacon-bg: #ffffff;
@@ -693,24 +693,24 @@ dialog.beacon-dialog::backdrop {
693
693
  text-overflow: ellipsis;
694
694
  max-width: 100%;
695
695
  }
696
- `, se = "launch-kit-beacon-portal-styles";
697
- function Ye() {
698
- if (typeof document > "u" || !document.head || document.getElementById(se)) return;
696
+ `, ce = "launch-kit-beacon-portal-styles";
697
+ function Xe() {
698
+ if (typeof document > "u" || !document.head || document.getElementById(ce)) return;
699
699
  const e = document.createElement("style");
700
- e.id = se, e.textContent = Te, document.head.appendChild(e);
700
+ e.id = ce, e.textContent = Ie, document.head.appendChild(e);
701
701
  }
702
- const V = "http://www.w3.org/2000/svg";
702
+ const W = "http://www.w3.org/2000/svg";
703
703
  function Ke() {
704
- const e = document.createElementNS(V, "svg");
704
+ const e = document.createElementNS(W, "svg");
705
705
  e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round");
706
- const t = document.createElementNS(V, "path");
706
+ const t = document.createElementNS(W, "path");
707
707
  t.setAttribute("d", "M3 11l18-5v12L3 14v-3z");
708
- const n = document.createElementNS(V, "path");
708
+ const n = document.createElementNS(W, "path");
709
709
  return n.setAttribute("d", "M11.6 16.8a3 3 0 1 1-5.8-1.6"), e.appendChild(t), e.appendChild(n), e;
710
710
  }
711
- const B = "launch-kit-beacon", Xe = typeof HTMLElement < "u" ? HTMLElement : class {
711
+ const z = "launch-kit-beacon", Ge = typeof HTMLElement < "u" ? HTMLElement : class {
712
712
  };
713
- class Ge extends Xe {
713
+ class Je extends Ge {
714
714
  constructor() {
715
715
  super(...arguments), this.onTriggerClick = null;
716
716
  }
@@ -718,7 +718,7 @@ class Ge extends Xe {
718
718
  if (this.shadow) return;
719
719
  this.shadow = this.attachShadow({ mode: "open" });
720
720
  const t = document.createElement("style");
721
- t.textContent = Te, this.shadow.appendChild(t), this.triggerSlot = document.createElement("slot"), this.triggerSlot.name = "trigger", this.shadow.appendChild(this.triggerSlot), this.defaultTrigger = document.createElement("button"), this.defaultTrigger.type = "button", this.defaultTrigger.className = "beacon-default-trigger", this.defaultTrigger.appendChild(Ke());
721
+ t.textContent = Ie, this.shadow.appendChild(t), this.triggerSlot = document.createElement("slot"), this.triggerSlot.name = "trigger", this.shadow.appendChild(this.triggerSlot), this.defaultTrigger = document.createElement("button"), this.defaultTrigger.type = "button", this.defaultTrigger.className = "beacon-default-trigger", this.defaultTrigger.appendChild(Ke());
722
722
  const n = document.createElement("span");
723
723
  n.textContent = "Feedback", this.defaultTrigger.appendChild(n), this.healthDot = document.createElement("span"), this.healthDot.className = "beacon-health-dot", this.defaultTrigger.appendChild(this.healthDot), this.shadow.appendChild(this.defaultTrigger), this.defaultTrigger.addEventListener("click", () => {
724
724
  var o;
@@ -727,10 +727,10 @@ class Ge extends Xe {
727
727
  const o = this.triggerSlot.assignedElements();
728
728
  if (o.length > 0) {
729
729
  this.defaultTrigger.style.display = "none";
730
- for (const r of o)
731
- r.addEventListener("click", () => {
732
- var a;
733
- return (a = this.onTriggerClick) == null ? void 0 : a.call(this);
730
+ for (const a of o)
731
+ a.addEventListener("click", () => {
732
+ var r;
733
+ return (r = this.onTriggerClick) == null ? void 0 : r.call(this);
734
734
  });
735
735
  } else
736
736
  this.defaultTrigger.style.display = "";
@@ -746,10 +746,10 @@ class Ge extends Xe {
746
746
  (n = this.healthDot) == null || n.classList.toggle("visible", t);
747
747
  }
748
748
  }
749
- function Me() {
750
- typeof window > "u" || typeof customElements > "u" || customElements.get(B) || customElements.define(B, Ge);
749
+ function Re() {
750
+ typeof window > "u" || typeof customElements > "u" || customElements.get(z) || customElements.define(z, Je);
751
751
  }
752
- function Je(e, t) {
752
+ function Ze(e, t) {
753
753
  return {
754
754
  pluginName: e,
755
755
  captured: (n) => t.getCaptured(n),
@@ -765,15 +765,15 @@ function Je(e, t) {
765
765
  captureSignal: () => t.getCaptureSignal()
766
766
  };
767
767
  }
768
- class Ze extends Error {
768
+ class Qe extends Error {
769
769
  constructor(t) {
770
770
  super(`Duplicate plugin name: "${t}"`), this.name = "DuplicatePluginNameError";
771
771
  }
772
772
  }
773
- function Qe(e) {
773
+ function et(e) {
774
774
  const t = /* @__PURE__ */ new Set();
775
775
  for (const o of e) {
776
- if (t.has(o.name)) throw new Ze(o.name);
776
+ if (t.has(o.name)) throw new Qe(o.name);
777
777
  t.add(o.name);
778
778
  }
779
779
  const n = e.map((o) => ({
@@ -784,171 +784,171 @@ function Qe(e) {
784
784
  }));
785
785
  return {
786
786
  entries: n,
787
- install(o, r) {
788
- for (const a of n)
789
- if (a.ctx = o(a.plugin.name), !!a.plugin.setupOnce)
787
+ install(o, a) {
788
+ for (const r of n)
789
+ if (r.ctx = o(r.plugin.name), !!r.plugin.setupOnce)
790
790
  try {
791
- const i = a.plugin.setupOnce(a.ctx);
792
- typeof i == "function" && (a.teardown = i);
791
+ const i = r.plugin.setupOnce(r.ctx);
792
+ typeof i == "function" && (r.teardown = i);
793
793
  } catch (i) {
794
794
  const s = i instanceof Error ? i : new Error(String(i));
795
- a.status = {
795
+ r.status = {
796
796
  state: "failed",
797
- failures: a.status.failures + 1,
797
+ failures: r.status.failures + 1,
798
798
  error: { message: s.message, ...s.stack ? { stack: s.stack } : {}, at: "setupOnce" }
799
- }, r({ plugin: a.plugin.name, error: s, at: "setupOnce" });
799
+ }, a({ plugin: r.plugin.name, error: s, at: "setupOnce" });
800
800
  }
801
801
  },
802
802
  destroy() {
803
803
  var o;
804
- for (const r of n) {
804
+ for (const a of n) {
805
805
  try {
806
- (o = r.teardown) == null || o.call(r);
806
+ (o = a.teardown) == null || o.call(a);
807
807
  } catch {
808
808
  }
809
- r.teardown = void 0;
809
+ a.teardown = void 0;
810
810
  }
811
811
  },
812
- async capture(o, r) {
813
- const a = {};
812
+ async capture(o, a) {
813
+ const r = {};
814
814
  for (const i of n)
815
815
  if (i.plugin.capture)
816
816
  try {
817
- const s = await i.plugin.capture(i.ctx), c = et(s, i.plugin.version);
818
- c !== null && (a[i.plugin.name] = c);
817
+ const s = await i.plugin.capture(i.ctx), c = tt(s, i.plugin.version);
818
+ c !== null && (r[i.plugin.name] = c);
819
819
  } catch (s) {
820
820
  const c = s instanceof Error ? s : new Error(String(s));
821
- a[i.plugin.name] = tt(c), i.status = {
821
+ r[i.plugin.name] = nt(c), i.status = {
822
822
  state: "failed",
823
823
  failures: i.status.failures + 1,
824
824
  error: { message: c.message, ...c.stack ? { stack: c.stack } : {}, at: "capture" }
825
- }, r({ plugin: i.plugin.name, error: c, at: "capture" });
825
+ }, a({ plugin: i.plugin.name, error: c, at: "capture" });
826
826
  }
827
- return a;
827
+ return r;
828
828
  },
829
829
  status() {
830
830
  const o = {};
831
- for (const r of n)
832
- o[r.plugin.name] = r.status;
831
+ for (const a of n)
832
+ o[a.plugin.name] = a.status;
833
833
  return o;
834
834
  }
835
835
  };
836
836
  }
837
- function et(e, t) {
837
+ function tt(e, t) {
838
838
  if (e == null) return null;
839
839
  const n = t ?? 1;
840
840
  return Array.isArray(e) || typeof e != "object" ? { v: n, value: e } : { ...e, v: n };
841
841
  }
842
- function tt(e) {
842
+ function nt(e) {
843
843
  return {
844
844
  error: e.message,
845
845
  ...e.stack ? { stack: e.stack } : {}
846
846
  };
847
847
  }
848
- async function nt(e, t, n, o, r = "omit") {
849
- const a = await ot(n), i = await fetch(e, {
848
+ async function ot(e, t, n, o, a = "omit") {
849
+ const r = await rt(n), i = await fetch(e, {
850
850
  method: "POST",
851
- credentials: r,
852
- headers: { "Content-Type": "application/json", ...a },
851
+ credentials: a,
852
+ headers: { "Content-Type": "application/json", ...r },
853
853
  body: JSON.stringify(t),
854
854
  signal: o
855
855
  }), c = (i.headers.get("content-type") ?? "").includes("application/json") ? await i.json().catch(() => null) : await i.text();
856
856
  return { ok: i.ok, status: i.status, body: c };
857
857
  }
858
- async function ot(e) {
858
+ async function rt(e) {
859
859
  return e ? typeof e == "function" ? await e() ?? {} : e : {};
860
860
  }
861
- function rt(e, t, n) {
861
+ function at(e, t, n) {
862
862
  for (const o of t) {
863
- const r = document.createElement("div");
864
- if (r.className = "beacon-field", o.label) {
863
+ const a = document.createElement("div");
864
+ if (a.className = "beacon-field", o.label) {
865
865
  const i = document.createElement("label");
866
- i.className = "beacon-label", i.textContent = o.label, r.appendChild(i);
866
+ i.className = "beacon-label", i.textContent = o.label, a.appendChild(i);
867
867
  }
868
868
  if (o.description) {
869
869
  const i = document.createElement("div");
870
- i.className = "beacon-description", i.textContent = o.description, r.appendChild(i);
870
+ i.className = "beacon-description", i.textContent = o.description, a.appendChild(i);
871
871
  }
872
- const a = at(o, n);
873
- r.appendChild(a), e.appendChild(r);
872
+ const r = it(o, n);
873
+ a.appendChild(r), e.appendChild(a);
874
874
  }
875
875
  }
876
- function at(e, t) {
877
- var o, r;
876
+ function it(e, t) {
877
+ var o, a;
878
878
  const n = t.get(e.name);
879
879
  switch (e.type) {
880
880
  case "toggle": {
881
- const a = document.createElement("label");
882
- a.className = "beacon-toggle";
881
+ const r = document.createElement("label");
882
+ r.className = "beacon-toggle";
883
883
  const i = document.createElement("input");
884
- return i.type = "checkbox", i.checked = n ?? e.defaultValue ?? !1, i.addEventListener("change", () => t.set(e.name, i.checked)), a.appendChild(i), t.set(e.name, i.checked), a;
884
+ return i.type = "checkbox", i.checked = n ?? e.defaultValue ?? !1, i.addEventListener("change", () => t.set(e.name, i.checked)), r.appendChild(i), t.set(e.name, i.checked), r;
885
885
  }
886
886
  case "text": {
887
- const a = document.createElement("input");
888
- a.type = "text", a.className = "beacon-input";
887
+ const r = document.createElement("input");
888
+ r.type = "text", r.className = "beacon-input";
889
889
  const i = n ?? e.defaultValue ?? "";
890
- return a.value = i, e.placeholder && (a.placeholder = e.placeholder), a.addEventListener("input", () => t.set(e.name, a.value)), t.set(e.name, i), a;
890
+ return r.value = i, e.placeholder && (r.placeholder = e.placeholder), r.addEventListener("input", () => t.set(e.name, r.value)), t.set(e.name, i), r;
891
891
  }
892
892
  case "textarea": {
893
- const a = document.createElement("textarea");
894
- a.className = "beacon-textarea";
893
+ const r = document.createElement("textarea");
894
+ r.className = "beacon-textarea";
895
895
  const i = n ?? e.defaultValue ?? "";
896
- return a.value = i, e.placeholder && (a.placeholder = e.placeholder), e.rows && (a.rows = e.rows), a.addEventListener("input", () => t.set(e.name, a.value)), t.set(e.name, i), a;
896
+ return r.value = i, e.placeholder && (r.placeholder = e.placeholder), e.rows && (r.rows = e.rows), r.addEventListener("input", () => t.set(e.name, r.value)), t.set(e.name, i), r;
897
897
  }
898
898
  case "select": {
899
- const a = document.createElement("select");
900
- a.className = "beacon-select";
899
+ const r = document.createElement("select");
900
+ r.className = "beacon-select";
901
901
  const i = n ?? e.defaultValue ?? ((o = e.options[0]) == null ? void 0 : o.value) ?? "";
902
902
  for (const s of e.options) {
903
903
  const c = document.createElement("option");
904
- c.value = s.value, c.textContent = s.label ?? s.value, s.value === i && (c.selected = !0), a.appendChild(c);
904
+ c.value = s.value, c.textContent = s.label ?? s.value, s.value === i && (c.selected = !0), r.appendChild(c);
905
905
  }
906
- return a.addEventListener("change", () => t.set(e.name, a.value)), t.set(e.name, i), a;
906
+ return r.addEventListener("change", () => t.set(e.name, r.value)), t.set(e.name, i), r;
907
907
  }
908
908
  case "radio": {
909
- const a = document.createElement("div");
910
- a.className = "beacon-radio-group";
911
- const i = n ?? e.defaultValue ?? ((r = e.options[0]) == null ? void 0 : r.value) ?? "";
909
+ const r = document.createElement("div");
910
+ r.className = "beacon-radio-group";
911
+ const i = n ?? e.defaultValue ?? ((a = e.options[0]) == null ? void 0 : a.value) ?? "";
912
912
  for (const s of e.options) {
913
913
  const c = document.createElement("label");
914
914
  c.className = "beacon-radio-opt";
915
915
  const d = document.createElement("input");
916
916
  d.type = "radio", d.name = e.name, d.value = s.value, s.value === i && (d.checked = !0), d.addEventListener("change", () => t.set(e.name, s.value));
917
917
  const l = document.createElement("span");
918
- l.textContent = s.label ?? s.value, c.appendChild(d), c.appendChild(l), a.appendChild(c);
918
+ l.textContent = s.label ?? s.value, c.appendChild(d), c.appendChild(l), r.appendChild(c);
919
919
  }
920
- return t.set(e.name, i), a;
920
+ return t.set(e.name, i), r;
921
921
  }
922
922
  case "number": {
923
- const a = document.createElement("input");
924
- a.type = "number", a.className = "beacon-input";
923
+ const r = document.createElement("input");
924
+ r.type = "number", r.className = "beacon-input";
925
925
  const i = n ?? e.defaultValue;
926
- return i !== void 0 && (a.value = String(i)), e.min !== void 0 && (a.min = String(e.min)), e.max !== void 0 && (a.max = String(e.max)), e.step !== void 0 && (a.step = String(e.step)), a.addEventListener("input", () => {
927
- const s = a.value === "" ? void 0 : Number(a.value);
926
+ return i !== void 0 && (r.value = String(i)), e.min !== void 0 && (r.min = String(e.min)), e.max !== void 0 && (r.max = String(e.max)), e.step !== void 0 && (r.step = String(e.step)), r.addEventListener("input", () => {
927
+ const s = r.value === "" ? void 0 : Number(r.value);
928
928
  t.set(e.name, s);
929
- }), i !== void 0 && t.set(e.name, i), a;
929
+ }), i !== void 0 && t.set(e.name, i), r;
930
930
  }
931
931
  }
932
932
  }
933
- const W = "http://www.w3.org/2000/svg";
934
- function it() {
935
- const e = document.createElementNS(W, "svg");
933
+ const Y = "http://www.w3.org/2000/svg";
934
+ function st() {
935
+ const e = document.createElementNS(Y, "svg");
936
936
  e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round");
937
- const t = document.createElementNS(W, "line");
937
+ const t = document.createElementNS(Y, "line");
938
938
  t.setAttribute("x1", "18"), t.setAttribute("y1", "6"), t.setAttribute("x2", "6"), t.setAttribute("y2", "18");
939
- const n = document.createElementNS(W, "line");
939
+ const n = document.createElementNS(Y, "line");
940
940
  return n.setAttribute("x1", "6"), n.setAttribute("y1", "6"), n.setAttribute("x2", "18"), n.setAttribute("y2", "18"), e.appendChild(t), e.appendChild(n), e;
941
941
  }
942
- class st {
942
+ class ct {
943
943
  constructor(t, n, o) {
944
944
  this.labels = t, this.severities = n, this.callbacks = o, this.severitySelected = "bug", this.modeCounts = { minimize: 0, hide: 0, pickElement: 0 }, this.pluginCleanups = [], this.lastActive = null, this.submitSucceeded = !1, this.expectedSuppressedCloses = 0, this.root = document.createElement("dialog"), this.root.className = "beacon-dialog", this.inner = document.createElement("div"), this.inner.className = "beacon-dialog-inner", this.root.appendChild(this.inner);
945
- const r = document.createElement("div");
946
- r.className = "beacon-drawer-header";
947
945
  const a = document.createElement("div");
948
- a.className = "beacon-drawer-title", a.textContent = t.drawerTitle, r.appendChild(a);
946
+ a.className = "beacon-drawer-header";
947
+ const r = document.createElement("div");
948
+ r.className = "beacon-drawer-title", r.textContent = t.drawerTitle, a.appendChild(r);
949
949
  const i = document.createElement("button");
950
- i.type = "button", i.className = "beacon-icon-btn", i.setAttribute("aria-label", t.closeButton), i.appendChild(it()), i.addEventListener("click", () => this.userCloseAttempt()), r.appendChild(i), this.inner.appendChild(r), this.root.addEventListener("cancel", (b) => {
951
- this.submitSucceeded || this.hasUnsavedInput() && (b.preventDefault(), window.confirm("You have unsaved feedback. Discard?") && this.root.close());
950
+ i.type = "button", i.className = "beacon-icon-btn", i.setAttribute("aria-label", t.closeButton), i.appendChild(st()), i.addEventListener("click", () => this.userCloseAttempt()), a.appendChild(i), this.inner.appendChild(a), this.root.addEventListener("cancel", (g) => {
951
+ this.submitSucceeded || this.hasUnsavedInput() && (g.preventDefault(), window.confirm("You have unsaved feedback. Discard?") && this.root.close());
952
952
  });
953
953
  const s = document.createElement("div");
954
954
  s.className = "beacon-drawer-body", this.inner.appendChild(s);
@@ -958,17 +958,17 @@ class st {
958
958
  d.className = "beacon-label", d.textContent = t.descriptionLabel, this.descTextarea = document.createElement("textarea"), this.descTextarea.className = "beacon-textarea", this.descTextarea.placeholder = t.descriptionPlaceholder, this.descTextarea.rows = 4, c.appendChild(d), c.appendChild(this.descTextarea), s.appendChild(c);
959
959
  const l = document.createElement("div");
960
960
  l.className = "beacon-field";
961
- const p = document.createElement("label");
962
- p.className = "beacon-label", p.textContent = t.severityLabel, this.severitiesContainer = document.createElement("div"), this.severitiesContainer.className = "beacon-severity";
963
- for (const b of n) {
964
- const m = document.createElement("label");
965
- m.className = "beacon-severity-opt", m.dataset.sev = b;
966
- const x = document.createElement("input");
967
- x.type = "radio", x.name = "beacon-severity", x.value = b, b === this.severitySelected && (x.checked = !0, m.classList.add("selected")), x.addEventListener("change", () => this.setSeverity(b)), m.appendChild(x), m.appendChild(document.createTextNode(this.severityLabel(b))), this.severitiesContainer.appendChild(m);
968
- }
969
- l.appendChild(p), l.appendChild(this.severitiesContainer), s.appendChild(l), this.pluginSlot = document.createElement("div"), this.pluginSlot.className = "beacon-plugin-panels", s.appendChild(this.pluginSlot), this.statusEl = document.createElement("div"), this.statusEl.className = "beacon-status", s.appendChild(this.statusEl);
970
- const f = document.createElement("div");
971
- f.className = "beacon-actions", this.submitBtn = document.createElement("button"), this.submitBtn.type = "button", this.submitBtn.className = "beacon-btn primary", this.submitBtn.textContent = t.send, this.submitBtn.addEventListener("click", () => this.callbacks.onSubmit()), f.appendChild(this.submitBtn), s.appendChild(f), this.root.addEventListener("close", () => {
961
+ const m = document.createElement("label");
962
+ m.className = "beacon-label", m.textContent = t.severityLabel, this.severitiesContainer = document.createElement("div"), this.severitiesContainer.className = "beacon-severity";
963
+ for (const g of n) {
964
+ const u = document.createElement("label");
965
+ u.className = "beacon-severity-opt", u.dataset.sev = g;
966
+ const v = document.createElement("input");
967
+ v.type = "radio", v.name = "beacon-severity", v.value = g, g === this.severitySelected && (v.checked = !0, u.classList.add("selected")), v.addEventListener("change", () => this.setSeverity(g)), u.appendChild(v), u.appendChild(document.createTextNode(this.severityLabel(g))), this.severitiesContainer.appendChild(u);
968
+ }
969
+ l.appendChild(m), l.appendChild(this.severitiesContainer), s.appendChild(l), this.pluginSlot = document.createElement("div"), this.pluginSlot.className = "beacon-plugin-panels", s.appendChild(this.pluginSlot), this.statusEl = document.createElement("div"), this.statusEl.className = "beacon-status", s.appendChild(this.statusEl);
970
+ const p = document.createElement("div");
971
+ p.className = "beacon-actions", this.submitBtn = document.createElement("button"), this.submitBtn.type = "button", this.submitBtn.className = "beacon-btn primary", this.submitBtn.textContent = t.send, this.submitBtn.addEventListener("click", () => this.callbacks.onSubmit()), p.appendChild(this.submitBtn), s.appendChild(p), this.root.addEventListener("close", () => {
972
972
  if (this.expectedSuppressedCloses > 0) {
973
973
  this.expectedSuppressedCloses -= 1;
974
974
  return;
@@ -985,10 +985,10 @@ class st {
985
985
  };
986
986
  }
987
987
  applyMode(t, n) {
988
- var o, r;
988
+ var o, a;
989
989
  switch (t) {
990
990
  case "pickElement": {
991
- n ? (this.lastActive = document.activeElement instanceof HTMLElement ? document.activeElement : null, this.root.open && (this.expectedSuppressedCloses += 1, this.root.close())) : (this.root.open || this.tryShowModal(), (r = (o = this.lastActive) == null ? void 0 : o.focus) == null || r.call(o));
991
+ n ? (this.lastActive = document.activeElement instanceof HTMLElement ? document.activeElement : null, this.root.open && (this.expectedSuppressedCloses += 1, this.root.close())) : (this.root.open || this.tryShowModal(), (a = (o = this.lastActive) == null ? void 0 : o.focus) == null || a.call(o));
992
992
  break;
993
993
  }
994
994
  case "hide": {
@@ -996,8 +996,8 @@ class st {
996
996
  break;
997
997
  }
998
998
  case "minimize": {
999
- const a = this.inner.querySelector(".beacon-drawer-body");
1000
- a && (a.style.display = n ? "none" : "");
999
+ const r = this.inner.querySelector(".beacon-drawer-body");
1000
+ r && (r.style.display = n ? "none" : "");
1001
1001
  break;
1002
1002
  }
1003
1003
  }
@@ -1049,21 +1049,21 @@ class st {
1049
1049
  installPluginPanels(t, n) {
1050
1050
  this.clearPluginPanels();
1051
1051
  for (const o of t) {
1052
- const r = document.createElement("div");
1053
- if (r.className = "beacon-plugin-panel", o.form.title) {
1054
- const a = document.createElement("div");
1055
- a.className = "beacon-plugin-panel-title", a.textContent = o.form.title, r.appendChild(a);
1052
+ const a = document.createElement("div");
1053
+ if (a.className = "beacon-plugin-panel", o.form.title) {
1054
+ const r = document.createElement("div");
1055
+ r.className = "beacon-plugin-panel-title", r.textContent = o.form.title, a.appendChild(r);
1056
1056
  }
1057
1057
  if ("fields" in o.form)
1058
- rt(r, o.form.fields, {
1059
- get: (a) => n.get(o.name, a),
1060
- set: (a, i) => n.set(o.name, a, i)
1058
+ at(a, o.form.fields, {
1059
+ get: (r) => n.get(o.name, r),
1060
+ set: (r, i) => n.set(o.name, r, i)
1061
1061
  });
1062
1062
  else {
1063
- const a = o.form.render(r, o.ctx);
1064
- typeof a == "function" && this.pluginCleanups.push(a);
1063
+ const r = o.form.render(a, o.ctx);
1064
+ typeof r == "function" && this.pluginCleanups.push(r);
1065
1065
  }
1066
- this.pluginSlot.appendChild(r);
1066
+ this.pluginSlot.appendChild(a);
1067
1067
  }
1068
1068
  }
1069
1069
  clearPluginPanels() {
@@ -1094,7 +1094,7 @@ class st {
1094
1094
  }
1095
1095
  }
1096
1096
  }
1097
- function ct() {
1097
+ function lt() {
1098
1098
  return {
1099
1099
  triggerButton: "Feedback",
1100
1100
  drawerTitle: "Send feedback",
@@ -1111,18 +1111,18 @@ function ct() {
1111
1111
  severityA11y: "a11y"
1112
1112
  };
1113
1113
  }
1114
- function lt(e) {
1114
+ function dt(e) {
1115
1115
  const t = document.createElement("div");
1116
1116
  return t.className = "beacon-overlay-layer", e.appendChild(t), { layer: t };
1117
1117
  }
1118
- function dt(e, t) {
1118
+ function ut(e, t) {
1119
1119
  const n = document.createElement("div");
1120
1120
  e.layer.appendChild(n);
1121
1121
  let o;
1122
1122
  try {
1123
1123
  o = t(n);
1124
- } catch (r) {
1125
- throw n.remove(), r;
1124
+ } catch (a) {
1125
+ throw n.remove(), a;
1126
1126
  }
1127
1127
  return () => {
1128
1128
  try {
@@ -1132,55 +1132,55 @@ function dt(e, t) {
1132
1132
  n.parentNode && n.parentNode.removeChild(n);
1133
1133
  };
1134
1134
  }
1135
- function ut() {
1135
+ function pt() {
1136
1136
  var n, o;
1137
1137
  const e = navigator;
1138
1138
  return e.userAgentData ? {
1139
- brand: ((n = e.userAgentData.brands.find((r) => !/Not[.\-]?A.?Brand/i.test(r.brand))) == null ? void 0 : n.brand) ?? ((o = e.userAgentData.brands[0]) == null ? void 0 : o.brand) ?? "unknown",
1139
+ brand: ((n = e.userAgentData.brands.find((a) => !/Not[.\-]?A.?Brand/i.test(a.brand))) == null ? void 0 : n.brand) ?? ((o = e.userAgentData.brands[0]) == null ? void 0 : o.brand) ?? "unknown",
1140
1140
  mobile: e.userAgentData.mobile,
1141
1141
  platform: e.userAgentData.platform
1142
1142
  } : void 0;
1143
1143
  }
1144
- function pt() {
1144
+ function ft() {
1145
1145
  return {
1146
1146
  name: "metadata",
1147
1147
  capture() {
1148
- const e = ut();
1148
+ const e = pt();
1149
1149
  return e ? { uaData: e } : null;
1150
1150
  }
1151
1151
  };
1152
1152
  }
1153
- const ft = 30, K = 500, ce = 2e3, mt = 500, ht = 5e3, bt = /launch-kit-beacon|beacon\.(?:es|umd|mjs)|\/beacon\//i;
1154
- function R(e, t) {
1153
+ const mt = 30, K = 500, le = 2e3, ht = 500, bt = 5e3, gt = /launch-kit-beacon|beacon\.(?:es|umd|mjs)|\/beacon\//i;
1154
+ function _(e, t) {
1155
1155
  if (e)
1156
1156
  return e.length > t ? e.slice(0, t) : e;
1157
1157
  }
1158
- function gt(e, t) {
1158
+ function yt(e, t) {
1159
1159
  const n = (t == null ? void 0 : t.split(`
1160
1160
  `).slice(0, 3).join("|")) ?? "";
1161
1161
  return `${e}::${n}`;
1162
1162
  }
1163
- function yt(e) {
1164
- return !!e && bt.test(e);
1165
- }
1166
1163
  function vt(e) {
1164
+ return !!e && gt.test(e);
1165
+ }
1166
+ function xt(e) {
1167
1167
  try {
1168
1168
  return JSON.stringify(e).slice(0, K);
1169
1169
  } catch {
1170
1170
  return String(e);
1171
1171
  }
1172
1172
  }
1173
- function Ie() {
1173
+ function Pe() {
1174
1174
  const e = [], t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
1175
- let o = !1, r, a;
1175
+ let o = !1, a, r;
1176
1176
  function i(s) {
1177
- if (yt(s.stack) || s.kind === "unhandledrejection" && /AbortError/i.test(s.message)) return;
1178
- const c = gt(s.message, s.stack), d = t.get(c);
1179
- if (d !== void 0 && s.ts - d < ht) {
1177
+ if (vt(s.stack) || s.kind === "unhandledrejection" && /AbortError/i.test(s.message)) return;
1178
+ const c = yt(s.message, s.stack), d = t.get(c);
1179
+ if (d !== void 0 && s.ts - d < bt) {
1180
1180
  t.set(c, s.ts);
1181
1181
  return;
1182
1182
  }
1183
- t.set(c, s.ts), e.push(s), e.length > ft && e.shift();
1183
+ t.set(c, s.ts), e.push(s), e.length > mt && e.shift();
1184
1184
  for (const l of n)
1185
1185
  try {
1186
1186
  l();
@@ -1191,33 +1191,33 @@ function Ie() {
1191
1191
  install() {
1192
1192
  return o ? () => {
1193
1193
  } : typeof window > "u" ? () => {
1194
- } : (o = !0, r = (s) => {
1194
+ } : (o = !0, a = (s) => {
1195
1195
  try {
1196
1196
  const c = s.error instanceof Error ? s.error.message : void 0, d = s.error instanceof Error ? s.error.stack : void 0;
1197
1197
  i({
1198
1198
  ts: Date.now(),
1199
1199
  kind: "error",
1200
- message: R(s.message || c || "Unknown error", K) ?? "Unknown error",
1201
- ...d ? { stack: R(d, ce) } : {},
1202
- ...s.filename ? { source: R(s.filename, mt) } : {},
1200
+ message: _(s.message || c || "Unknown error", K) ?? "Unknown error",
1201
+ ...d ? { stack: _(d, le) } : {},
1202
+ ...s.filename ? { source: _(s.filename, ht) } : {},
1203
1203
  ...Number.isFinite(s.lineno) ? { line: s.lineno } : {},
1204
1204
  ...Number.isFinite(s.colno) ? { col: s.colno } : {}
1205
1205
  });
1206
1206
  } catch {
1207
1207
  }
1208
- }, a = (s) => {
1208
+ }, r = (s) => {
1209
1209
  try {
1210
- const c = s.reason, d = c instanceof Error ? c.message : typeof c == "string" ? c : vt(c), l = c instanceof Error ? c.stack : void 0;
1210
+ const c = s.reason, d = c instanceof Error ? c.message : typeof c == "string" ? c : xt(c), l = c instanceof Error ? c.stack : void 0;
1211
1211
  i({
1212
1212
  ts: Date.now(),
1213
1213
  kind: "unhandledrejection",
1214
- message: R(d || "Unknown rejection", K) ?? "Unknown rejection",
1215
- ...l ? { stack: R(l, ce) } : {}
1214
+ message: _(d || "Unknown rejection", K) ?? "Unknown rejection",
1215
+ ...l ? { stack: _(l, le) } : {}
1216
1216
  });
1217
1217
  } catch {
1218
1218
  }
1219
- }, window.addEventListener("error", r), window.addEventListener("unhandledrejection", a), () => {
1220
- r && window.removeEventListener("error", r), a && window.removeEventListener("unhandledrejection", a), o = !1, n.clear();
1219
+ }, window.addEventListener("error", a), window.addEventListener("unhandledrejection", r), () => {
1220
+ a && window.removeEventListener("error", a), r && window.removeEventListener("unhandledrejection", r), o = !1, n.clear();
1221
1221
  });
1222
1222
  },
1223
1223
  snapshot() {
@@ -1230,12 +1230,12 @@ function Ie() {
1230
1230
  }
1231
1231
  };
1232
1232
  }
1233
- function xt() {
1233
+ function wt() {
1234
1234
  let e = null;
1235
1235
  return {
1236
1236
  name: "errors",
1237
1237
  setupOnce(t) {
1238
- e = Ie();
1238
+ e = Pe();
1239
1239
  const n = e.install();
1240
1240
  return t.signal.addEventListener("abort", n, { once: !0 }), n;
1241
1241
  },
@@ -1246,10 +1246,10 @@ function xt() {
1246
1246
  n.className = "beacon-events";
1247
1247
  const o = document.createElement("summary");
1248
1248
  o.className = "beacon-events-summary";
1249
- const r = document.createElement("span");
1250
- r.className = "beacon-events-dot", r.textContent = "●";
1251
1249
  const a = document.createElement("span");
1252
- a.className = "beacon-events-label", o.appendChild(r), o.appendChild(a), n.appendChild(o);
1250
+ a.className = "beacon-events-dot", a.textContent = "●";
1251
+ const r = document.createElement("span");
1252
+ r.className = "beacon-events-label", o.appendChild(a), o.appendChild(r), n.appendChild(o);
1253
1253
  const i = document.createElement("ul");
1254
1254
  i.className = "beacon-events-list", n.appendChild(i), t.appendChild(n);
1255
1255
  function s() {
@@ -1258,14 +1258,14 @@ function xt() {
1258
1258
  t.style.display = "none";
1259
1259
  return;
1260
1260
  }
1261
- t.style.display = "", a.textContent = `${l} runtime error${l !== 1 ? "s" : ""} captured`, i.innerHTML = "";
1262
- for (const p of d) {
1263
- const f = document.createElement("li");
1264
- f.className = "beacon-events-item";
1265
- const b = document.createElement("span");
1266
- b.className = `beacon-events-kind ${p.kind === "unhandledrejection" ? "rejection" : "error"}`, b.textContent = p.kind === "unhandledrejection" ? "REJ" : "ERR";
1267
- const m = document.createElement("span");
1268
- m.className = "beacon-events-msg", m.textContent = p.message, f.appendChild(b), f.appendChild(m), i.appendChild(f);
1261
+ t.style.display = "", r.textContent = `${l} runtime error${l !== 1 ? "s" : ""} captured`, i.innerHTML = "";
1262
+ for (const m of d) {
1263
+ const p = document.createElement("li");
1264
+ p.className = "beacon-events-item";
1265
+ const g = document.createElement("span");
1266
+ g.className = `beacon-events-kind ${m.kind === "unhandledrejection" ? "rejection" : "error"}`, g.textContent = m.kind === "unhandledrejection" ? "REJ" : "ERR";
1267
+ const u = document.createElement("span");
1268
+ u.className = "beacon-events-msg", u.textContent = m.message, p.appendChild(g), p.appendChild(u), i.appendChild(p);
1269
1269
  }
1270
1270
  }
1271
1271
  s();
@@ -1282,8 +1282,8 @@ function xt() {
1282
1282
  }
1283
1283
  };
1284
1284
  }
1285
- const wt = 8;
1286
- function le(e, t = document) {
1285
+ const Et = 8, St = " >> ";
1286
+ function de(e, t = document) {
1287
1287
  if (!e) return !1;
1288
1288
  try {
1289
1289
  return t.querySelectorAll(`#${CSS.escape(e)}`).length === 1;
@@ -1291,70 +1291,79 @@ function le(e, t = document) {
1291
1291
  return !1;
1292
1292
  }
1293
1293
  }
1294
- function Et(e) {
1294
+ function Ct(e) {
1295
1295
  const t = e.tagName.toLowerCase(), n = Array.from(e.classList).filter((o) => o.length > 0 && o.length < 40).slice(0, 3).map((o) => `.${CSS.escape(o)}`).join("");
1296
1296
  return t + n;
1297
1297
  }
1298
- function St(e) {
1298
+ function kt(e) {
1299
1299
  const t = e.parentElement;
1300
1300
  return t ? Array.from(t.children).filter((o) => o.tagName === e.tagName).indexOf(e) + 1 : 1;
1301
1301
  }
1302
- function Ct(e) {
1302
+ function At(e) {
1303
1303
  if (!e || e.nodeType !== Node.ELEMENT_NODE) return "";
1304
- if (e.id && le(e.id))
1304
+ if (e.id && de(e.id))
1305
1305
  return `#${CSS.escape(e.id)}`;
1306
- const t = [];
1307
- let n = e, o = 0;
1308
- for (; n && n.tagName.toLowerCase() !== "body" && o < wt; ) {
1309
- const r = n;
1310
- if (r.id && le(r.id)) {
1311
- t.unshift(`#${CSS.escape(r.id)}`);
1306
+ const t = [], n = [];
1307
+ let o = e, a = 0;
1308
+ for (; o && o.tagName.toLowerCase() !== "body" && a < Et; ) {
1309
+ const i = o;
1310
+ if (i.id && de(i.id)) {
1311
+ t.unshift(`#${CSS.escape(i.id)}`);
1312
1312
  break;
1313
1313
  }
1314
- const a = Et(r), i = r.parentElement;
1315
- let s = a;
1316
- if (i)
1314
+ const s = Ct(i), c = i.parentElement;
1315
+ let d = s;
1316
+ if (c)
1317
1317
  try {
1318
- const c = Array.from(r.classList).join(" ");
1319
- Array.from(i.children).filter(
1320
- (l) => l.tagName === r.tagName && Array.from(l.classList).join(" ") === c
1321
- ).length > 1 && (s = `${r.tagName.toLowerCase()}:nth-of-type(${St(r)})`);
1318
+ const l = Array.from(i.classList).join(" ");
1319
+ Array.from(c.children).filter(
1320
+ (p) => p.tagName === i.tagName && Array.from(p.classList).join(" ") === l
1321
+ ).length > 1 && (d = `${i.tagName.toLowerCase()}:nth-of-type(${kt(i)})`);
1322
1322
  } catch {
1323
1323
  }
1324
- t.unshift(s), n = i, o++;
1324
+ if (t.unshift(d), t.length > 1 && n.unshift(" > "), c)
1325
+ o = c;
1326
+ else {
1327
+ const l = i.getRootNode();
1328
+ l instanceof ShadowRoot ? (o = l.host, t.length > 0 && (n[0] = St)) : o = null;
1329
+ }
1330
+ a++;
1325
1331
  }
1326
- return t.join(" > ");
1332
+ let r = t[0] ?? "";
1333
+ for (let i = 1; i < t.length; i++)
1334
+ r += (n[i - 1] ?? " > ") + t[i];
1335
+ return r;
1327
1336
  }
1328
- function kt(e) {
1337
+ function Lt(e) {
1329
1338
  const t = Object.keys(e).filter(
1330
1339
  (o) => o.startsWith("__reactFiber$") || o.startsWith("__reactInternalInstance$")
1331
1340
  );
1332
1341
  if (t.length === 0) return null;
1333
1342
  let n = e[t[0]];
1334
1343
  for (let o = 0; o < 10 && n; o++) {
1335
- const r = n, a = r.type;
1336
- if (typeof a == "function") {
1337
- const i = a.displayName ?? a.name;
1344
+ const a = n, r = a.type;
1345
+ if (typeof r == "function") {
1346
+ const i = r.displayName ?? r.name;
1338
1347
  if (i && i !== "_default") return { lib: "react", name: i };
1339
1348
  }
1340
- if (typeof a == "object" && a !== null) {
1341
- const i = a.displayName ?? a.name;
1349
+ if (typeof r == "object" && r !== null) {
1350
+ const i = r.displayName ?? r.name;
1342
1351
  if (i) return { lib: "react", name: i };
1343
1352
  }
1344
- n = r.return;
1353
+ n = a.return;
1345
1354
  }
1346
1355
  return { lib: "react" };
1347
1356
  }
1348
- function At(e) {
1349
- var o, r;
1357
+ function Tt(e) {
1358
+ var o, a;
1350
1359
  const t = e, n = t.__vueParentComponent;
1351
1360
  if (n) {
1352
- const a = ((o = n.type) == null ? void 0 : o.name) ?? ((r = n.type) == null ? void 0 : r.__name);
1353
- return { lib: "vue", ...a ? { name: a } : {} };
1361
+ const r = ((o = n.type) == null ? void 0 : o.name) ?? ((a = n.type) == null ? void 0 : a.__name);
1362
+ return { lib: "vue", ...r ? { name: r } : {} };
1354
1363
  }
1355
1364
  return t.__vue__ ? { lib: "vue" } : null;
1356
1365
  }
1357
- function Lt(e) {
1366
+ function Nt(e) {
1358
1367
  const t = window.ng;
1359
1368
  if (!(t != null && t.getComponent)) return null;
1360
1369
  try {
@@ -1366,13 +1375,13 @@ function Lt(e) {
1366
1375
  return null;
1367
1376
  }
1368
1377
  }
1369
- function Nt(e) {
1378
+ function Mt(e) {
1370
1379
  return "__svelte_meta" in e ? { lib: "svelte" } : null;
1371
1380
  }
1372
- function Tt(e) {
1373
- return kt(e) ?? At(e) ?? Lt(e) ?? Nt(e) ?? void 0;
1381
+ function It(e) {
1382
+ return Lt(e) ?? Tt(e) ?? Nt(e) ?? Mt(e) ?? void 0;
1374
1383
  }
1375
- const Mt = 5e3, It = 1e3, de = 1e3, ue = 200, Rt = 50, pe = 200, _t = 500, Pt = [
1384
+ const Rt = 5e3, Pt = 1e3, ue = 1e3, pe = 200, _t = 50, fe = 200, Dt = 500, $t = [
1376
1385
  "display",
1377
1386
  "position",
1378
1387
  "top",
@@ -1411,60 +1420,60 @@ const Mt = 5e3, It = 1e3, de = 1e3, ue = 200, Rt = 50, pe = 200, _t = 500, Pt =
1411
1420
  "grid-template-columns",
1412
1421
  "grid-template-rows"
1413
1422
  ];
1414
- function fe(e, t) {
1423
+ function me(e, t) {
1415
1424
  return e.length <= t ? e : e.slice(0, t) + `
1416
1425
 
1417
1426
  /* … truncated, original was ${e.length} chars */`;
1418
1427
  }
1419
- function Dt(e) {
1428
+ function Bt(e) {
1420
1429
  const t = getComputedStyle(e), n = {};
1421
- for (const o of Pt) {
1422
- const r = t.getPropertyValue(o);
1423
- r && r !== "normal" && r !== "none" && r !== "auto" && r !== "0px" && (n[o] = r.trim().slice(0, _t));
1430
+ for (const o of $t) {
1431
+ const a = t.getPropertyValue(o);
1432
+ a && a !== "normal" && a !== "none" && a !== "auto" && a !== "0px" && (n[o] = a.trim().slice(0, Dt));
1424
1433
  }
1425
1434
  return n;
1426
1435
  }
1427
- function $t(e) {
1428
- return Array.from(e.classList).slice(0, Rt).map((t) => t.length > pe ? t.slice(0, pe) : t);
1436
+ function zt(e) {
1437
+ return Array.from(e.classList).slice(0, _t).map((t) => t.length > fe ? t.slice(0, fe) : t);
1429
1438
  }
1430
- function Bt(e) {
1431
- const t = e.getBoundingClientRect(), n = Ct(e), o = e.id || null, r = Tt(e);
1439
+ function Ot(e) {
1440
+ const t = e.getBoundingClientRect(), n = At(e), o = e.id || null, a = It(e);
1432
1441
  return {
1433
- selector: n.length > de ? n.slice(0, de) : n,
1442
+ selector: n.length > ue ? n.slice(0, ue) : n,
1434
1443
  tagName: e.tagName.toLowerCase(),
1435
- id: o && o.length > ue ? o.slice(0, ue) : o,
1436
- classList: $t(e),
1437
- outerHTML: fe(e.outerHTML, Mt),
1438
- ...e.parentElement ? { parentOuterHTML: fe(e.parentElement.outerHTML, It) } : {},
1439
- computedStyles: Dt(e),
1444
+ id: o && o.length > pe ? o.slice(0, pe) : o,
1445
+ classList: zt(e),
1446
+ outerHTML: me(e.outerHTML, Rt),
1447
+ ...e.parentElement ? { parentOuterHTML: me(e.parentElement.outerHTML, Pt) } : {},
1448
+ computedStyles: Bt(e),
1440
1449
  boundingRect: {
1441
1450
  x: Math.round(t.x),
1442
1451
  y: Math.round(t.y),
1443
1452
  w: Math.round(t.width),
1444
1453
  h: Math.round(t.height)
1445
1454
  },
1446
- ...r ? { framework: r } : {}
1455
+ ...a ? { framework: a } : {}
1447
1456
  };
1448
1457
  }
1449
- const zt = 14, Ot = "#ffffff", Ht = "#ffffff", qt = 3, Ut = "#0ea5e9";
1450
- async function Re(e, t, n, o = Ut) {
1451
- const r = await jt(e), a = document.createElement("canvas");
1452
- a.width = r.naturalWidth, a.height = r.naturalHeight;
1453
- const i = a.getContext("2d");
1458
+ const Ht = 14, Ut = "#ffffff", qt = "#ffffff", Ft = 3, jt = "#0ea5e9";
1459
+ async function _e(e, t, n, o = jt) {
1460
+ const a = await Wt(e), r = document.createElement("canvas");
1461
+ r.width = a.naturalWidth, r.height = a.naturalHeight;
1462
+ const i = r.getContext("2d");
1454
1463
  if (!i) throw new Error("Could not get 2D canvas context");
1455
- i.drawImage(r, 0, 0);
1456
- const s = a.width / n.w, c = a.height / n.h;
1464
+ i.drawImage(a, 0, 0);
1465
+ const s = r.width / n.w, c = r.height / n.h;
1457
1466
  for (const d of t) {
1458
- const l = Ft(d);
1467
+ const l = Vt(d);
1459
1468
  if (!l) continue;
1460
- const p = l.x * s, f = l.y * c, b = l.w * s, m = l.h * c;
1461
- i.lineWidth = qt, i.strokeStyle = o, i.strokeRect(p, f, b, m);
1462
- const x = p + b, g = f;
1463
- i.beginPath(), i.fillStyle = o, i.arc(x, g, zt, 0, Math.PI * 2), i.fill(), i.lineWidth = 3, i.strokeStyle = Ot, i.stroke(), i.fillStyle = Ht, i.font = "bold 16px system-ui, -apple-system, sans-serif", i.textAlign = "center", i.textBaseline = "middle", i.fillText(String(d.number), x, g + 1);
1469
+ const m = l.x * s, p = l.y * c, g = l.w * s, u = l.h * c;
1470
+ i.lineWidth = Ft, i.strokeStyle = o, i.strokeRect(m, p, g, u);
1471
+ const v = m + g, S = p;
1472
+ i.beginPath(), i.fillStyle = o, i.arc(v, S, Ht, 0, Math.PI * 2), i.fill(), i.lineWidth = 3, i.strokeStyle = Ut, i.stroke(), i.fillStyle = qt, i.font = "bold 16px system-ui, -apple-system, sans-serif", i.textAlign = "center", i.textBaseline = "middle", i.fillText(String(d.number), v, S + 1);
1464
1473
  }
1465
- return a.toDataURL("image/jpeg", 0.85);
1474
+ return r.toDataURL("image/jpeg", 0.85);
1466
1475
  }
1467
- function Ft(e) {
1476
+ function Vt(e) {
1468
1477
  if (e.liveElement && document.contains(e.liveElement)) {
1469
1478
  const t = e.liveElement.getBoundingClientRect();
1470
1479
  if (t.width > 0 || t.height > 0)
@@ -1482,21 +1491,21 @@ function Ft(e) {
1482
1491
  }
1483
1492
  return e.boundingRect;
1484
1493
  }
1485
- function jt(e) {
1494
+ function Wt(e) {
1486
1495
  return new Promise((t, n) => {
1487
1496
  const o = new Image();
1488
- o.onload = () => t(o), o.onerror = (r) => n(r), o.src = e;
1497
+ o.onload = () => t(o), o.onerror = (a) => n(a), o.src = e;
1489
1498
  });
1490
1499
  }
1491
- const _ = "beacon-no-capture", Vt = "#0ea5e9", me = "Click any element to pin it · Press Esc to finish";
1492
- function he(e, t) {
1500
+ const D = "beacon-no-capture", Yt = "#0ea5e9", he = "Click any element to pin it · Press Esc to finish";
1501
+ function be(e, t) {
1493
1502
  return /^#[0-9a-fA-F]{6}$/.test(e) ? `${e}${t}` : e;
1494
1503
  }
1495
- function Wt(e = {}) {
1496
- const t = e.accent ?? Vt, n = he(t, "b3"), o = he(t, "2e"), r = document.createElement("style");
1497
- r.className = _, r.textContent = "@keyframes beacon-spin { to { transform: rotate(360deg); } }", document.head.appendChild(r);
1498
- const a = document.createElement("div");
1499
- a.className = _, a.setAttribute("aria-hidden", "true"), a.style.cssText = [
1504
+ function Xt(e = {}) {
1505
+ const t = e.accent ?? Yt, n = be(t, "b3"), o = be(t, "2e"), a = document.createElement("style");
1506
+ a.className = D, a.textContent = "@keyframes beacon-spin { to { transform: rotate(360deg); } }", document.head.appendChild(a);
1507
+ const r = document.createElement("div");
1508
+ r.className = D, r.setAttribute("aria-hidden", "true"), r.style.cssText = [
1500
1509
  "position: fixed",
1501
1510
  "inset: 0",
1502
1511
  "pointer-events: none",
@@ -1507,7 +1516,7 @@ function Wt(e = {}) {
1507
1516
  "box-sizing: border-box"
1508
1517
  ].join("; ");
1509
1518
  const i = document.createElement("div");
1510
- i.className = _, i.setAttribute("role", "status"), i.style.cssText = [
1519
+ i.className = D, i.setAttribute("role", "status"), i.style.cssText = [
1511
1520
  "position: fixed",
1512
1521
  "top: 16px",
1513
1522
  "left: 50%",
@@ -1522,7 +1531,7 @@ function Wt(e = {}) {
1522
1531
  "pointer-events: none",
1523
1532
  "white-space: nowrap",
1524
1533
  "z-index: 2147483646"
1525
- ].join("; "), i.textContent = me;
1534
+ ].join("; "), i.textContent = he;
1526
1535
  const s = `<span style="
1527
1536
  display: inline-block;
1528
1537
  width: 12px;
@@ -1534,14 +1543,14 @@ function Wt(e = {}) {
1534
1543
  vertical-align: middle;
1535
1544
  margin-right: 8px;
1536
1545
  "></span>`;
1537
- function c(u) {
1538
- return u.replace(/[<>&]/g, (y) => ({ "<": "&lt;", ">": "&gt;", "&": "&amp;" })[y]);
1546
+ function c(h) {
1547
+ return h.replace(/[<>&]/g, (f) => ({ "<": "&lt;", ">": "&gt;", "&": "&amp;" })[f]);
1539
1548
  }
1540
- document.body.appendChild(a), document.body.appendChild(i);
1549
+ document.body.appendChild(r), document.body.appendChild(i);
1541
1550
  const d = /* @__PURE__ */ new Map();
1542
- function l(u) {
1543
- const y = document.createElement("div");
1544
- return y.className = _, y.setAttribute("aria-hidden", "true"), y.style.cssText = [
1551
+ function l(h) {
1552
+ const f = document.createElement("div");
1553
+ return f.className = D, f.setAttribute("aria-hidden", "true"), f.style.cssText = [
1545
1554
  "position: fixed",
1546
1555
  "width: 24px",
1547
1556
  "height: 24px",
@@ -1556,67 +1565,75 @@ function Wt(e = {}) {
1556
1565
  "box-shadow: 0 2px 8px hsl(0 0% 0% / 0.4)",
1557
1566
  "pointer-events: none",
1558
1567
  "z-index: 2147483646"
1559
- ].join("; "), y.textContent = String(u), document.body.appendChild(y), y;
1568
+ ].join("; "), f.textContent = String(h), document.body.appendChild(f), f;
1560
1569
  }
1561
- function p() {
1562
- const u = document.createElement("div");
1563
- return u.className = _, u.setAttribute("aria-hidden", "true"), u.style.cssText = [
1570
+ function m() {
1571
+ const h = document.createElement("div");
1572
+ return h.className = D, h.setAttribute("aria-hidden", "true"), h.style.cssText = [
1564
1573
  "position: fixed",
1565
1574
  "pointer-events: none",
1566
1575
  `border: 2px solid ${t}`,
1567
1576
  "border-radius: 2px",
1568
1577
  "box-sizing: border-box",
1569
1578
  "z-index: 2147483645"
1570
- ].join("; "), document.body.appendChild(u), u;
1579
+ ].join("; "), document.body.appendChild(h), h;
1571
1580
  }
1572
- function f(u, y, h) {
1573
- const v = h ? "0.5" : "1";
1574
- u.outline.style.display = "block", u.outline.style.opacity = v, u.outline.style.left = `${y.x}px`, u.outline.style.top = `${y.y}px`, u.outline.style.width = `${y.w}px`, u.outline.style.height = `${y.h}px`, u.marker.style.display = "flex", u.marker.style.opacity = v, u.marker.style.left = `${y.x + y.w - 12}px`, u.marker.style.top = `${Math.max(2, y.y - 12)}px`;
1581
+ function p(h, f, E) {
1582
+ const b = E ? "0.5" : "1";
1583
+ h.outline.style.display = "block", h.outline.style.opacity = b, h.outline.style.left = `${f.x}px`, h.outline.style.top = `${f.y}px`, h.outline.style.width = `${f.w}px`, h.outline.style.height = `${f.h}px`, h.marker.style.display = "flex", h.marker.style.opacity = b, h.marker.style.left = `${f.x + f.w - 12}px`, h.marker.style.top = `${Math.max(2, f.y - 12)}px`;
1575
1584
  }
1576
- function b(u) {
1577
- u.marker.style.display = "none", u.outline.style.display = "none";
1585
+ function g(h) {
1586
+ h.marker.style.display = "none", h.outline.style.display = "none";
1578
1587
  }
1579
- function m() {
1580
- d.forEach((u) => {
1581
- let y = u.anchor.target;
1582
- if (document.contains(y) || (y = null), !y && u.anchor.selector && (y = document.querySelector(u.anchor.selector), y && (u.anchor.target = y)), y) {
1583
- const v = y.getBoundingClientRect();
1584
- if (v.width > 0 || v.height > 0) {
1585
- f(u, { x: v.left, y: v.top, w: v.width, h: v.height }, !1);
1588
+ function u() {
1589
+ d.forEach((h) => {
1590
+ let f = h.anchor.target;
1591
+ if (f && !f.isConnected && (f = null), !f && h.anchor.selector) {
1592
+ try {
1593
+ f = document.querySelector(h.anchor.selector);
1594
+ } catch {
1595
+ f = null;
1596
+ }
1597
+ f && (h.anchor.target = f);
1598
+ }
1599
+ if (f) {
1600
+ const b = f.getBoundingClientRect();
1601
+ if (b.width > 0 || b.height > 0) {
1602
+ p(h, { x: b.left, y: b.top, w: b.width, h: b.height }, !1);
1586
1603
  return;
1587
1604
  }
1588
1605
  }
1589
- const h = u.anchor.fallbackRect;
1590
- if (h && (h.w > 0 || h.h > 0)) {
1591
- f(u, h, !0);
1606
+ const E = h.anchor.fallbackRect;
1607
+ if (E && (E.w > 0 || E.h > 0)) {
1608
+ p(h, E, !0);
1592
1609
  return;
1593
1610
  }
1594
- b(u);
1611
+ g(h);
1595
1612
  });
1596
1613
  }
1597
- let x = null;
1598
- function g() {
1599
- x === null && (x = requestAnimationFrame(() => {
1600
- x = null, m();
1614
+ let v = null;
1615
+ function S() {
1616
+ v === null && (v = requestAnimationFrame(() => {
1617
+ v = null, u();
1601
1618
  }));
1602
1619
  }
1603
- return window.addEventListener("scroll", g, !0), window.addEventListener("resize", g), {
1604
- addPin(u, y) {
1605
- const h = l(u), v = p();
1606
- d.set(u, { anchor: y, marker: h, outline: v }), m();
1620
+ return window.addEventListener("scroll", S, !0), window.addEventListener("resize", S), {
1621
+ addPin(h, f) {
1622
+ const E = l(h), b = m();
1623
+ d.set(h, { anchor: f, marker: E, outline: b }), u();
1607
1624
  },
1608
- setLoading(u) {
1609
- u ? i.innerHTML = s + c(u) : i.textContent = me;
1625
+ setLoading(h) {
1626
+ h ? i.innerHTML = s + c(h) : i.textContent = he;
1610
1627
  },
1611
1628
  destroy() {
1612
- window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g), x !== null && cancelAnimationFrame(x), a.remove(), i.remove(), r.remove(), d.forEach(({ marker: u, outline: y }) => {
1613
- u.remove(), y.remove();
1629
+ window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S), v !== null && cancelAnimationFrame(v), r.remove(), i.remove(), a.remove(), d.forEach(({ marker: h, outline: f }) => {
1630
+ h.remove(), f.remove();
1614
1631
  }), d.clear();
1615
1632
  }
1616
1633
  };
1617
1634
  }
1618
- const Yt = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', Kt = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>';
1619
- function Xt(e) {
1635
+ const Kt = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', Gt = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>';
1636
+ function Jt(e) {
1620
1637
  return new Promise((t) => {
1621
1638
  const n = document.createElement("div");
1622
1639
  n.className = "beacon-pin-popover open beacon-no-capture beacon-theme-auto", n.innerHTML = `
@@ -1625,15 +1642,15 @@ function Xt(e) {
1625
1642
  <span class="beacon-pin-num">${e.pinNumber}</span>
1626
1643
  <span>Note for this pin</span>
1627
1644
  </div>
1628
- <button type="button" class="beacon-icon-btn" data-action="cancel" aria-label="Discard this pin">${Yt}</button>
1645
+ <button type="button" class="beacon-icon-btn" data-action="cancel" aria-label="Discard this pin">${Kt}</button>
1629
1646
  </div>
1630
1647
  <textarea class="beacon-textarea" rows="2" placeholder="Optional — describe what's wrong here…" style="min-height:48px;"></textarea>
1631
1648
  <div class="beacon-pin-popover-actions">
1632
- <button type="button" class="beacon-btn primary" data-action="save">${Kt} Save</button>
1649
+ <button type="button" class="beacon-btn primary" data-action="save">${Gt} Save</button>
1633
1650
  </div>
1634
1651
  `;
1635
- const o = 240, r = 160, a = Math.min(Math.max(8, e.anchor.x), window.innerWidth - o - 8), i = Math.min(Math.max(8, e.anchor.y + 12), window.innerHeight - r - 8);
1636
- n.style.left = `${a}px`, n.style.top = `${i}px`, document.body.appendChild(n);
1652
+ const o = 240, a = 160, r = Math.min(Math.max(8, e.anchor.x), window.innerWidth - o - 8), i = Math.min(Math.max(8, e.anchor.y + 12), window.innerHeight - a - 8);
1653
+ n.style.left = `${r}px`, n.style.top = `${i}px`, document.body.appendChild(n);
1637
1654
  const s = n.querySelector("textarea");
1638
1655
  s.focus();
1639
1656
  function c(l) {
@@ -1643,37 +1660,37 @@ function Xt(e) {
1643
1660
  l.key === "Escape" && (l.preventDefault(), l.stopPropagation(), c({ cancelled: "all" }));
1644
1661
  }
1645
1662
  document.addEventListener("keydown", d, !0), n.addEventListener("click", (l) => {
1646
- var b;
1647
- const f = (b = l.target.closest("[data-action]")) == null ? void 0 : b.getAttribute("data-action");
1648
- if (f === "cancel" && c({ cancelled: "pin" }), f === "save") {
1649
- const m = s.value.trim();
1650
- c({ ...m ? { note: m } : {}, cancelled: !1 });
1663
+ var g;
1664
+ const p = (g = l.target.closest("[data-action]")) == null ? void 0 : g.getAttribute("data-action");
1665
+ if (p && (l.stopPropagation(), p === "cancel" && c({ cancelled: "pin" }), p === "save")) {
1666
+ const u = s.value.trim();
1667
+ c({ ...u ? { note: u } : {}, cancelled: !1 });
1651
1668
  }
1652
1669
  }), s.addEventListener("keydown", (l) => {
1653
1670
  if (l.key === "Enter" && (l.metaKey || l.ctrlKey)) {
1654
1671
  l.preventDefault();
1655
- const p = s.value.trim();
1656
- c({ ...p ? { note: p } : {}, cancelled: !1 });
1672
+ const m = s.value.trim();
1673
+ c({ ...m ? { note: m } : {}, cancelled: !1 });
1657
1674
  }
1658
1675
  });
1659
1676
  });
1660
1677
  }
1661
- const Gt = "#0ea5e9";
1662
- function Jt(e, t) {
1678
+ const Zt = "#0ea5e9";
1679
+ function Qt(e, t) {
1663
1680
  return /^#[0-9a-fA-F]{6}$/.test(e) ? `${e}${t}` : e;
1664
1681
  }
1665
- function Zt(e) {
1666
- const { shadowRoot: t, onHover: n } = e, o = e.accent ?? Gt, r = Jt(o, "14"), a = document.createElement("div");
1667
- a.style.cssText = [
1682
+ function en(e) {
1683
+ const { shadowRoot: t, onHover: n } = e, o = e.accent ?? Zt, a = Qt(o, "14"), r = document.createElement("div");
1684
+ r.style.cssText = [
1668
1685
  "position: fixed",
1669
1686
  "pointer-events: none",
1670
1687
  "z-index: 2147483646",
1671
1688
  `border: 2px solid ${o}`,
1672
- `background: ${r}`,
1689
+ `background: ${a}`,
1673
1690
  "transition: all 60ms ease-out",
1674
1691
  "box-sizing: border-box",
1675
1692
  "border-radius: 2px"
1676
- ].join("; "), document.body.appendChild(a);
1693
+ ].join("; "), document.body.appendChild(r);
1677
1694
  const i = document.createElement("div");
1678
1695
  i.style.cssText = [
1679
1696
  "position: fixed",
@@ -1693,64 +1710,76 @@ function Zt(e) {
1693
1710
  document.body.style.cursor = "crosshair";
1694
1711
  let c = !1, d = () => {
1695
1712
  };
1696
- const l = new Promise((h) => {
1697
- d = h;
1713
+ const l = new Promise((b) => {
1714
+ d = b;
1698
1715
  });
1699
- function p(h) {
1700
- if (!h || !(h instanceof Node)) return !1;
1701
- let v = h;
1702
- for (; v; ) {
1703
- if (v === t || v === t.host) return !0;
1704
- v = v.parentNode ?? v.host ?? null;
1716
+ function m(b) {
1717
+ if (!b || !(b instanceof Node)) return !1;
1718
+ let x = b;
1719
+ for (; x; ) {
1720
+ if (x === t || x === t.host) return !0;
1721
+ x = x.parentNode ?? x.host ?? null;
1705
1722
  }
1706
1723
  return !1;
1707
1724
  }
1708
- function f(h, v) {
1709
- a.style.display = "none", i.style.display = "none";
1710
- const C = document.elementsFromPoint(h, v);
1711
- a.style.display = "block", i.style.display = "block";
1712
- for (const S of C)
1713
- if (!p(S)) return S;
1725
+ function p(b) {
1726
+ return b.tagName.includes("-");
1727
+ }
1728
+ function g(b, x) {
1729
+ var C, k;
1730
+ r.style.display = "none", i.style.display = "none";
1731
+ const A = document.elementsFromPoint(b, x);
1732
+ r.style.display = "block", i.style.display = "block";
1733
+ for (const T of A) {
1734
+ if (m(T)) continue;
1735
+ let y = T, L = 16;
1736
+ for (; y.shadowRoot && !p(y) && L-- > 0; ) {
1737
+ const M = (((k = (C = y.shadowRoot).elementsFromPoint) == null ? void 0 : k.call(C, b, x)) ?? []).find((O) => !m(O) && O !== y);
1738
+ if (!M) break;
1739
+ y = M;
1740
+ }
1741
+ return y;
1742
+ }
1714
1743
  return null;
1715
1744
  }
1716
- function b(h) {
1717
- const v = h.getBoundingClientRect();
1718
- a.style.left = `${v.left}px`, a.style.top = `${v.top}px`, a.style.width = `${v.width}px`, a.style.height = `${v.height}px`;
1719
- const C = h.tagName.toLowerCase(), S = h.classList.length > 0 ? "." + Array.from(h.classList).slice(0, 2).join(".") : "";
1720
- i.textContent = C + S;
1721
- const L = v.top - 22;
1722
- i.style.left = `${v.left}px`, i.style.top = `${L >= 0 ? L : v.bottom + 4}px`;
1745
+ function u(b) {
1746
+ const x = b.getBoundingClientRect();
1747
+ r.style.left = `${x.left}px`, r.style.top = `${x.top}px`, r.style.width = `${x.width}px`, r.style.height = `${x.height}px`;
1748
+ const A = b.tagName.toLowerCase(), C = b.classList.length > 0 ? "." + Array.from(b.classList).slice(0, 2).join(".") : "";
1749
+ i.textContent = A + C;
1750
+ const k = x.top - 22;
1751
+ i.style.left = `${x.left}px`, i.style.top = `${k >= 0 ? k : x.bottom + 4}px`;
1723
1752
  }
1724
- function m(h) {
1725
- const v = f(h.clientX, h.clientY);
1726
- v ? (b(v), n == null || n(v)) : (a.style.display = "none", i.style.display = "none", n == null || n(null));
1753
+ function v(b) {
1754
+ const x = g(b.clientX, b.clientY);
1755
+ x ? (u(x), n == null || n(x)) : (r.style.display = "none", i.style.display = "none", n == null || n(null));
1727
1756
  }
1728
- function x(h) {
1729
- if (h.button !== 0) return;
1730
- h.preventDefault(), h.stopPropagation();
1731
- const v = f(h.clientX, h.clientY);
1732
- v && y(v);
1757
+ function S(b) {
1758
+ if (b.button !== 0) return;
1759
+ b.preventDefault(), b.stopPropagation();
1760
+ const x = g(b.clientX, b.clientY);
1761
+ x && E(x);
1733
1762
  }
1734
- function g(h) {
1735
- h.preventDefault(), h.stopPropagation();
1763
+ function h(b) {
1764
+ b.preventDefault(), b.stopPropagation();
1736
1765
  }
1737
- function u(h) {
1738
- h.key === "Escape" && (h.preventDefault(), y(null));
1766
+ function f(b) {
1767
+ b.key === "Escape" && (b.preventDefault(), E(null));
1739
1768
  }
1740
- function y(h) {
1741
- c || (c = !0, document.removeEventListener("mousemove", m, !0), document.removeEventListener("pointerdown", x, !0), document.removeEventListener("click", g, !0), document.removeEventListener("mouseup", g, !0), document.removeEventListener("keydown", u, !0), a.remove(), i.remove(), document.body.style.cursor = s, d(h));
1769
+ function E(b) {
1770
+ c || (c = !0, document.removeEventListener("mousemove", v, !0), document.removeEventListener("pointerdown", S, !0), document.removeEventListener("click", h, !0), document.removeEventListener("mouseup", h, !0), document.removeEventListener("keydown", f, !0), r.remove(), i.remove(), document.body.style.cursor = s, d(b));
1742
1771
  }
1743
- return document.addEventListener("mousemove", m, !0), document.addEventListener("pointerdown", x, !0), document.addEventListener("click", g, !0), document.addEventListener("mouseup", g, !0), document.addEventListener("keydown", u, !0), {
1744
- cancel: () => y(null),
1772
+ return document.addEventListener("mousemove", v, !0), document.addEventListener("pointerdown", S, !0), document.addEventListener("click", h, !0), document.addEventListener("mouseup", h, !0), document.addEventListener("keydown", f, !0), {
1773
+ cancel: () => E(null),
1745
1774
  promise: l
1746
1775
  };
1747
1776
  }
1748
- let Y = null;
1749
- async function Qt() {
1750
- return Y || (Y = await import("./index-DAIDnjfR.mjs")), Y;
1777
+ let X = null;
1778
+ async function tn() {
1779
+ return X || (X = await import("./index-DAIDnjfR.mjs")), X;
1751
1780
  }
1752
1781
  const q = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=";
1753
- function be(e, t) {
1782
+ function ge(e, t) {
1754
1783
  if (!e || e.startsWith("data:") || e.startsWith("blob:") || e.startsWith("/") || e.startsWith("#")) return !0;
1755
1784
  try {
1756
1785
  if (new URL(e, window.location.href).origin === window.location.origin) return !0;
@@ -1759,61 +1788,119 @@ function be(e, t) {
1759
1788
  }
1760
1789
  return t === "anonymous" || t === "use-credentials";
1761
1790
  }
1762
- function en() {
1791
+ function nn() {
1763
1792
  const e = [], t = [];
1764
1793
  return document.querySelectorAll("img").forEach((n) => {
1765
- be(n.src, n.crossOrigin) || (e.push({ el: n, src: n.src }), n.src = q);
1794
+ ge(n.src, n.crossOrigin) || (e.push({ el: n, src: n.src }), n.src = q);
1766
1795
  }), document.querySelectorAll("image").forEach((n) => {
1767
- const o = n, r = o.getAttribute("href"), a = o.getAttributeNS("http://www.w3.org/1999/xlink", "href"), i = r || a || "";
1768
- i && !be(i) && (t.push({ el: o, href: r, xlink: a }), r !== null && o.setAttribute("href", q), a !== null && o.setAttributeNS("http://www.w3.org/1999/xlink", "href", q));
1796
+ const o = n, a = o.getAttribute("href"), r = o.getAttributeNS("http://www.w3.org/1999/xlink", "href"), i = a || r || "";
1797
+ i && !ge(i) && (t.push({ el: o, href: a, xlink: r }), a !== null && o.setAttribute("href", q), r !== null && o.setAttributeNS("http://www.w3.org/1999/xlink", "href", q));
1769
1798
  }), () => {
1770
1799
  for (const { el: n, src: o } of e) n.src = o;
1771
- for (const { el: n, href: o, xlink: r } of t)
1772
- o !== null && n.setAttribute("href", o), r !== null && n.setAttributeNS("http://www.w3.org/1999/xlink", "href", r);
1800
+ for (const { el: n, href: o, xlink: a } of t)
1801
+ o !== null && n.setAttribute("href", o), a !== null && n.setAttributeNS("http://www.w3.org/1999/xlink", "href", a);
1802
+ };
1803
+ }
1804
+ function on() {
1805
+ const e = [];
1806
+ document.querySelectorAll("*").forEach((r) => {
1807
+ const i = getComputedStyle(r), s = (i.overflowY === "auto" || i.overflowY === "scroll") && r.scrollHeight > r.clientHeight, c = (i.overflowX === "auto" || i.overflowX === "scroll") && r.scrollWidth > r.clientWidth;
1808
+ (s || c) && e.push(r);
1809
+ });
1810
+ const t = window.scrollX, n = window.scrollY, o = e.map((r) => ({
1811
+ el: r,
1812
+ scrollLeft: r.scrollLeft,
1813
+ scrollTop: r.scrollTop
1814
+ })), a = /* @__PURE__ */ new Map();
1815
+ for (const r of e) {
1816
+ let i = r;
1817
+ for (; i && i !== document.documentElement.parentElement; )
1818
+ a.has(i) || a.set(i, i.style.cssText), i = i.parentElement;
1819
+ }
1820
+ for (const r of a.keys())
1821
+ r.style.setProperty("overflow", "visible", "important"), r.style.setProperty("overflow-x", "visible", "important"), r.style.setProperty("overflow-y", "visible", "important"), r.style.setProperty("max-height", "none", "important"), r.style.setProperty("height", "auto", "important"), r.style.setProperty("min-height", "0", "important");
1822
+ return () => {
1823
+ for (const [r, i] of a)
1824
+ r.style.cssText = i;
1825
+ for (const { el: r, scrollLeft: i, scrollTop: s } of o)
1826
+ r.scrollLeft = i, r.scrollTop = s;
1827
+ window.scrollTo(t, n);
1773
1828
  };
1774
1829
  }
1775
- async function _e(e = {}) {
1830
+ let ye = Promise.resolve();
1831
+ async function De(e = {}) {
1832
+ const t = ye;
1833
+ let n;
1834
+ ye = new Promise((o) => {
1835
+ n = o;
1836
+ });
1837
+ try {
1838
+ return await t, await rn(e, n);
1839
+ } catch (o) {
1840
+ throw n(), o;
1841
+ }
1842
+ }
1843
+ async function rn(e, t) {
1776
1844
  const {
1777
- quality: t = 0.7,
1778
- pixelRatio: n = Math.min(window.devicePixelRatio || 1, 2),
1779
- excludeShadowRoot: o,
1780
- excludeHosts: r
1781
- } = e, a = await Qt(), i = o || r != null && r.length ? (c) => {
1782
- let d = c;
1783
- for (; d; ) {
1784
- if (o && d === o.host || r && d instanceof Element && r.includes(d) || d instanceof Element && d.classList.contains("beacon-no-capture")) return !1;
1785
- d = d.parentNode;
1845
+ quality: n = 0.7,
1846
+ pixelRatio: o = Math.min(window.devicePixelRatio || 1, 2),
1847
+ excludeShadowRoot: a,
1848
+ excludeHosts: r,
1849
+ fullPage: i = !0
1850
+ } = e, s = await tn(), c = a || r != null && r.length ? (g) => {
1851
+ let u = g;
1852
+ for (; u; ) {
1853
+ if (a && u === a.host || r && u instanceof Element && r.includes(u) || u instanceof Element && u.classList.contains("beacon-no-capture")) return !1;
1854
+ u = u.parentNode;
1786
1855
  }
1787
1856
  return !0;
1788
- } : void 0, s = en();
1857
+ } : void 0, d = nn(), l = i ? on() : () => {
1858
+ };
1859
+ let m = !1;
1860
+ const p = () => {
1861
+ if (!m) {
1862
+ m = !0;
1863
+ try {
1864
+ l();
1865
+ } finally {
1866
+ try {
1867
+ d();
1868
+ } finally {
1869
+ t();
1870
+ }
1871
+ }
1872
+ }
1873
+ };
1789
1874
  try {
1790
- return await a.toJpeg(document.documentElement, {
1791
- quality: t,
1792
- pixelRatio: n,
1875
+ i && await new Promise((h) => requestAnimationFrame(() => h()));
1876
+ const g = document.documentElement, u = i ? Math.max(g.scrollWidth, window.innerWidth) : window.innerWidth, v = i ? Math.max(g.scrollHeight, window.innerHeight) : window.innerHeight;
1877
+ return { dataUrl: await s.toJpeg(g, {
1878
+ quality: n,
1879
+ pixelRatio: o,
1793
1880
  cacheBust: !0,
1794
- ...i ? { filter: i } : {},
1881
+ ...c ? { filter: c } : {},
1795
1882
  imagePlaceholder: q,
1796
- width: window.innerWidth,
1797
- height: window.innerHeight,
1883
+ width: u,
1884
+ height: v,
1798
1885
  style: { transform: "none" }
1799
- });
1800
- } finally {
1801
- s();
1886
+ }), width: u, height: v, pixelRatio: o, dispose: p };
1887
+ } catch (g) {
1888
+ throw p(), g;
1802
1889
  }
1803
1890
  }
1804
- let Q = null;
1805
- function tn(e) {
1806
- Q = e;
1891
+ let ee = null;
1892
+ function an(e) {
1893
+ ee = e;
1807
1894
  }
1808
- function nn() {
1809
- return Q;
1895
+ function sn() {
1896
+ return ee;
1810
1897
  }
1811
- function D() {
1812
- Q = null;
1898
+ function R() {
1899
+ ee = null;
1813
1900
  }
1814
- const ge = "http://www.w3.org/2000/svg";
1815
- function on() {
1816
- const e = document.createElementNS(ge, "svg");
1901
+ const ve = "http://www.w3.org/2000/svg";
1902
+ function cn() {
1903
+ const e = document.createElementNS(ve, "svg");
1817
1904
  e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("aria-hidden", "true");
1818
1905
  const t = [
1819
1906
  "M3 6h18",
@@ -1821,35 +1908,35 @@ function on() {
1821
1908
  "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
1822
1909
  ];
1823
1910
  for (const n of t) {
1824
- const o = document.createElementNS(ge, "path");
1911
+ const o = document.createElementNS(ve, "path");
1825
1912
  o.setAttribute("d", n), e.appendChild(o);
1826
1913
  }
1827
1914
  return e;
1828
1915
  }
1829
- function rn(e = {}) {
1916
+ function ln(e = {}) {
1830
1917
  const t = e.maxPins ?? 20;
1831
- let n = [], o = /* @__PURE__ */ new WeakMap(), r = null, a = null, i = null, s = null, c = null;
1832
- function d() {
1833
- n = [], o = /* @__PURE__ */ new WeakMap(), r = null, D(), m(), x();
1834
- }
1918
+ let n = [], o = /* @__PURE__ */ new WeakMap(), a = null, r = 0, i = null, s = null, c = null, d = null;
1835
1919
  function l() {
1836
- const g = document.querySelector("launch-kit-beacon");
1837
- return (g == null ? void 0 : g.shadowRoot) ?? null;
1920
+ n = [], o = /* @__PURE__ */ new WeakMap(), a = null, r += 1, R(), S(), h();
1921
+ }
1922
+ function m() {
1923
+ const f = document.querySelector("launch-kit-beacon");
1924
+ return (f == null ? void 0 : f.shadowRoot) ?? null;
1838
1925
  }
1839
1926
  function p() {
1840
1927
  if (typeof window > "u") return e.accent ?? "#0ea5e9";
1841
1928
  if (e.accent) return e.accent;
1842
- const g = document.querySelector("launch-kit-beacon");
1843
- return g && getComputedStyle(g).getPropertyValue("--beacon-accent").trim() || "#0ea5e9";
1929
+ const f = document.querySelector("launch-kit-beacon");
1930
+ return f && getComputedStyle(f).getPropertyValue("--beacon-accent").trim() || "#0ea5e9";
1844
1931
  }
1845
- async function f(g) {
1846
- const u = l();
1847
- if (!u) return;
1848
- const y = p(), h = await g.requestMode("pickElement"), v = Wt({ accent: y });
1932
+ async function g(f) {
1933
+ const E = m();
1934
+ if (!E) return;
1935
+ const b = p(), x = await f.requestMode("pickElement"), A = Xt({ accent: b });
1849
1936
  for (const C of n) {
1850
- const S = o.get(C);
1851
- S && v.addPin(C.number, {
1852
- target: S,
1937
+ const k = o.get(C);
1938
+ k && A.addPin(C.number, {
1939
+ target: k,
1853
1940
  selector: C.selector,
1854
1941
  fallbackRect: C.boundingRect
1855
1942
  });
@@ -1857,93 +1944,103 @@ function rn(e = {}) {
1857
1944
  try {
1858
1945
  let C = !0;
1859
1946
  for (; C && !(n.length >= t); ) {
1860
- const L = await Zt({ shadowRoot: u, accent: y }).promise;
1861
- if (!L) break;
1862
- const T = L.getBoundingClientRect(), N = await Xt({
1863
- anchor: { x: T.left, y: T.bottom },
1947
+ const T = await en({ shadowRoot: E, accent: b }).promise;
1948
+ if (!T) break;
1949
+ const y = T.getBoundingClientRect(), L = await Jt({
1950
+ anchor: { x: y.left, y: y.bottom },
1864
1951
  pinNumber: n.length + 1
1865
1952
  });
1866
- if (N.cancelled === "all") {
1953
+ if (L.cancelled === "all") {
1867
1954
  C = !1;
1868
1955
  break;
1869
1956
  }
1870
- if (N.cancelled === "pin") continue;
1871
- const w = Bt(L), k = {
1957
+ if (L.cancelled === "pin") continue;
1958
+ const I = Ot(T), M = {
1872
1959
  number: n.length + 1,
1873
- ...w,
1874
- ...N.note ? { note: N.note } : {}
1960
+ ...I,
1961
+ ...L.note ? { note: L.note } : {}
1875
1962
  };
1876
- n.push(k), o.set(k, L), v.addPin(k.number, {
1877
- target: L,
1878
- selector: w.selector,
1879
- fallbackRect: w.boundingRect
1963
+ n.push(M), o.set(M, T), A.addPin(M.number, {
1964
+ target: T,
1965
+ selector: I.selector,
1966
+ fallbackRect: I.boundingRect
1880
1967
  });
1881
1968
  }
1882
- if (n.length > 0) {
1883
- v.setLoading("Capturing screenshot…"), await new Promise((S) => requestAnimationFrame(() => S()));
1884
- try {
1885
- const S = Array.from(document.querySelectorAll("launch-kit-beacon")), L = await _e({ excludeHosts: S }), T = n.map((k) => ({
1886
- number: k.number,
1887
- selector: k.selector,
1888
- boundingRect: k.boundingRect,
1889
- ...o.get(k) ? { liveElement: o.get(k) } : {}
1890
- })), N = {
1891
- w: window.innerWidth,
1892
- h: window.innerHeight,
1893
- dpr: window.devicePixelRatio || 1
1894
- }, w = await Re(L, T, N, y);
1895
- r = w, tn({ dataUrl: w, mime: "image/jpeg" });
1896
- } catch {
1897
- r = null, D();
1898
- }
1899
- } else
1900
- r = null, D();
1969
+ n.length > 0 ? (A.setLoading("Capturing screenshot…"), await new Promise((k) => requestAnimationFrame(() => k())), await u()) : (a = null, R());
1901
1970
  } finally {
1902
- v.destroy(), h();
1971
+ A.destroy(), x();
1903
1972
  }
1904
- m(), x();
1905
- }
1906
- function b(g) {
1907
- const u = n.findIndex((y) => y.number === g);
1908
- u !== -1 && (n.splice(u, 1), n.forEach((y, h) => {
1909
- y.number = h + 1;
1910
- }), r = null, D(), m(), x());
1973
+ S(), h();
1911
1974
  }
1912
- function m() {
1913
- if (a && (a.textContent = `Pins (${n.length})`, a.style.display = n.length === 0 ? "none" : ""), c && (c.textContent = n.length === 0 ? "Annotate elements" : "Add another pin"), !!i) {
1914
- i.innerHTML = "", i.style.display = n.length === 0 ? "none" : "";
1915
- for (const g of n) {
1916
- const u = document.createElement("div");
1917
- u.className = "beacon-pin-item", u.dataset.pin = String(g.number);
1918
- const y = document.createElement("span");
1919
- y.className = "beacon-pin-num", y.textContent = String(g.number);
1920
- const h = document.createElement("div");
1921
- h.className = "beacon-pin-meta";
1922
- const v = document.createElement("div");
1923
- v.className = "beacon-pin-selector", v.title = g.selector, v.textContent = g.selector || g.tagName;
1975
+ async function u() {
1976
+ const f = ++r;
1977
+ if (n.length === 0) {
1978
+ a = null, R(), h();
1979
+ return;
1980
+ }
1981
+ const E = p();
1982
+ try {
1983
+ const b = Array.from(document.querySelectorAll("launch-kit-beacon")), x = await De({ excludeHosts: b });
1984
+ try {
1985
+ if (f !== r) return;
1986
+ const A = n.map((T) => ({
1987
+ number: T.number,
1988
+ selector: T.selector,
1989
+ boundingRect: T.boundingRect,
1990
+ ...o.get(T) ? { liveElement: o.get(T) } : {}
1991
+ })), C = { w: x.width, h: x.height, dpr: x.pixelRatio }, k = await _e(x.dataUrl, A, C, E);
1992
+ if (f !== r) return;
1993
+ a = k, an({ dataUrl: k, mime: "image/jpeg" });
1994
+ } finally {
1995
+ x.dispose();
1996
+ }
1997
+ } catch {
1998
+ if (f !== r) return;
1999
+ a = null, R();
2000
+ }
2001
+ f === r && h();
2002
+ }
2003
+ function v(f) {
2004
+ const E = n.findIndex((b) => b.number === f);
2005
+ E !== -1 && (n.splice(E, 1), n.forEach((b, x) => {
2006
+ b.number = x + 1;
2007
+ }), a = null, R(), S(), h(), u());
2008
+ }
2009
+ function S() {
2010
+ if (i && (i.textContent = `Pins (${n.length})`, i.style.display = n.length === 0 ? "none" : ""), d && (d.textContent = n.length === 0 ? "Annotate elements" : "Add another pin"), !!s) {
2011
+ s.innerHTML = "", s.style.display = n.length === 0 ? "none" : "";
2012
+ for (const f of n) {
2013
+ const E = document.createElement("div");
2014
+ E.className = "beacon-pin-item", E.dataset.pin = String(f.number);
2015
+ const b = document.createElement("span");
2016
+ b.className = "beacon-pin-num", b.textContent = String(f.number);
2017
+ const x = document.createElement("div");
2018
+ x.className = "beacon-pin-meta";
2019
+ const A = document.createElement("div");
2020
+ A.className = "beacon-pin-selector", A.title = f.selector, A.textContent = f.selector || f.tagName;
1924
2021
  const C = document.createElement("input");
1925
- C.type = "text", C.className = "beacon-pin-note-input", C.placeholder = "Add a note (optional)", C.value = g.note ?? "", C.addEventListener("input", () => {
1926
- C.value.trim() ? g.note = C.value : delete g.note;
1927
- }), h.appendChild(v), h.appendChild(C);
1928
- const S = document.createElement("button");
1929
- S.type = "button", S.className = "beacon-icon-btn", S.setAttribute("aria-label", `Remove pin ${g.number}`), S.appendChild(on()), S.addEventListener("click", () => b(g.number)), u.appendChild(y), u.appendChild(h), u.appendChild(S), i.appendChild(u);
2022
+ C.type = "text", C.className = "beacon-pin-note-input", C.placeholder = "Add a note (optional)", C.value = f.note ?? "", C.addEventListener("input", () => {
2023
+ C.value.trim() ? f.note = C.value : delete f.note;
2024
+ }), x.appendChild(A), x.appendChild(C);
2025
+ const k = document.createElement("button");
2026
+ k.type = "button", k.className = "beacon-icon-btn", k.setAttribute("aria-label", `Remove pin ${f.number}`), k.appendChild(cn()), k.addEventListener("click", () => v(f.number)), E.appendChild(b), E.appendChild(x), E.appendChild(k), s.appendChild(E);
1930
2027
  }
1931
2028
  }
1932
2029
  }
1933
- function x() {
1934
- s && (r ? (s.src = r, s.style.display = "block") : (s.removeAttribute("src"), s.style.display = "none"));
2030
+ function h() {
2031
+ c && (a ? (c.src = a, c.style.display = "block") : (c.removeAttribute("src"), c.style.display = "none"));
1935
2032
  }
1936
2033
  return {
1937
2034
  name: "domEle",
1938
- setupOnce(g) {
1939
- return g.on("close", () => d());
2035
+ setupOnce(f) {
2036
+ return f.on("close", () => l());
1940
2037
  },
1941
- form(g) {
2038
+ form(f) {
1942
2039
  return {
1943
- render: (u) => (a = document.createElement("div"), a.className = "beacon-pin-list-header", u.appendChild(a), i = document.createElement("div"), i.className = "beacon-pin-list", u.appendChild(i), c = document.createElement("button"), c.type = "button", c.className = "beacon-btn secondary beacon-pin-annotate", c.addEventListener("click", () => {
1944
- f(g);
1945
- }), u.appendChild(c), s = document.createElement("img"), s.className = "beacon-thumb", s.alt = "Annotated screenshot preview", s.style.display = "none", u.appendChild(s), m(), x(), () => {
1946
- a = null, i = null, s = null, c = null;
2040
+ render: (E) => (i = document.createElement("div"), i.className = "beacon-pin-list-header", E.appendChild(i), s = document.createElement("div"), s.className = "beacon-pin-list", E.appendChild(s), d = document.createElement("button"), d.type = "button", d.className = "beacon-btn secondary beacon-pin-annotate", d.addEventListener("click", () => {
2041
+ g(f);
2042
+ }), E.appendChild(d), c = document.createElement("img"), c.className = "beacon-thumb", c.alt = "Annotated screenshot preview", c.style.display = "none", E.appendChild(c), S(), h(), () => {
2043
+ i = null, s = null, c = null, d = null;
1947
2044
  })
1948
2045
  };
1949
2046
  },
@@ -1952,37 +2049,38 @@ function rn(e = {}) {
1952
2049
  }
1953
2050
  };
1954
2051
  }
1955
- function an(e) {
2052
+ function dn(e) {
1956
2053
  return !!e && typeof e == "object" && !("v" in e) && "error" in e;
1957
2054
  }
1958
- function sn(e = {}) {
2055
+ function un(e = {}) {
1959
2056
  return {
1960
2057
  name: "domSS",
1961
2058
  async capture(t) {
1962
- const n = nn();
2059
+ const n = sn();
1963
2060
  if (n)
1964
2061
  return { dataUrl: n.dataUrl, mime: n.mime };
1965
2062
  const o = await t.requestMode("hide");
1966
2063
  try {
1967
- await new Promise((p) => requestAnimationFrame(() => p()));
1968
- const r = Array.from(document.querySelectorAll("launch-kit-beacon")), a = await _e({
2064
+ await new Promise((i) => requestAnimationFrame(() => i()));
2065
+ const a = Array.from(document.querySelectorAll("launch-kit-beacon")), r = await De({
1969
2066
  quality: e.quality,
1970
2067
  pixelRatio: e.pixelRatio,
1971
- excludeHosts: r
1972
- }), i = t.captured("domEle"), s = cn(i), c = {
1973
- w: window.innerWidth,
1974
- h: window.innerHeight,
1975
- dpr: window.devicePixelRatio || 1
1976
- }, d = e.accent ?? ln();
1977
- return { dataUrl: s.length > 0 ? await Re(a, s, c, d) : a, mime: "image/jpeg" };
2068
+ excludeHosts: a
2069
+ });
2070
+ try {
2071
+ const i = t.captured("domEle"), s = pn(i), c = { w: r.width, h: r.height, dpr: r.pixelRatio }, d = e.accent ?? fn();
2072
+ return { dataUrl: s.length > 0 ? await _e(r.dataUrl, s, c, d) : r.dataUrl, mime: "image/jpeg" };
2073
+ } finally {
2074
+ r.dispose();
2075
+ }
1978
2076
  } finally {
1979
2077
  o();
1980
2078
  }
1981
2079
  }
1982
2080
  };
1983
2081
  }
1984
- function cn(e) {
1985
- if (!e || an(e)) return [];
2082
+ function pn(e) {
2083
+ if (!e || dn(e)) return [];
1986
2084
  const t = e.pins;
1987
2085
  return Array.isArray(t) ? t.filter((n) => !!n && typeof n == "object").map((n) => ({
1988
2086
  number: Number(n.number) || 0,
@@ -1990,19 +2088,19 @@ function cn(e) {
1990
2088
  boundingRect: n.boundingRect ?? { x: 0, y: 0, w: 0, h: 0 }
1991
2089
  })) : [];
1992
2090
  }
1993
- function ln() {
2091
+ function fn() {
1994
2092
  if (typeof window > "u") return "#0ea5e9";
1995
2093
  const e = document.querySelector("launch-kit-beacon");
1996
2094
  return e && getComputedStyle(e).getPropertyValue("--beacon-accent").trim() || "#0ea5e9";
1997
2095
  }
1998
- const ye = "beacon-no-capture", ve = "__lsBeaconMonitorChipPos", dn = "#10b981";
1999
- function un(e) {
2000
- const t = e.accent ?? dn, n = e.startedAt ?? Date.now(), o = document.createElement("div");
2001
- o.className = `${ye} beacon-monitor-overlay-frame`, o.setAttribute("aria-hidden", "true"), o.style.setProperty("--beacon-monitor-accent", t), document.body.appendChild(o);
2002
- const r = document.createElement("div");
2003
- r.className = `${ye} beacon-monitor-overlay-chip`, r.setAttribute("role", "status"), r.setAttribute("aria-label", "Recording — drag to move"), r.style.setProperty("--beacon-monitor-accent", t);
2096
+ const xe = "beacon-no-capture", we = "__lsBeaconMonitorChipPos", mn = "#10b981";
2097
+ function hn(e) {
2098
+ const t = e.accent ?? mn, n = e.startedAt ?? Date.now(), o = document.createElement("div");
2099
+ o.className = `${xe} beacon-monitor-overlay-frame`, o.setAttribute("aria-hidden", "true"), o.style.setProperty("--beacon-monitor-accent", t), document.body.appendChild(o);
2004
2100
  const a = document.createElement("div");
2005
- a.className = "beacon-monitor-overlay-chip-row";
2101
+ a.className = `${xe} beacon-monitor-overlay-chip`, a.setAttribute("role", "status"), a.setAttribute("aria-label", "Recording — drag to move"), a.style.setProperty("--beacon-monitor-accent", t);
2102
+ const r = document.createElement("div");
2103
+ r.className = "beacon-monitor-overlay-chip-row";
2006
2104
  const i = document.createElement("span");
2007
2105
  i.className = "beacon-monitor-overlay-rec-dot", i.setAttribute("aria-hidden", "true");
2008
2106
  const s = document.createElement("span");
@@ -2012,176 +2110,176 @@ function un(e) {
2012
2110
  const d = document.createElement("span");
2013
2111
  d.className = "beacon-monitor-overlay-timer", d.textContent = "00:00";
2014
2112
  const l = document.createElement("button");
2015
- l.type = "button", l.className = "beacon-monitor-overlay-stop", l.textContent = "Stop", l.setAttribute("aria-label", "Stop monitoring"), a.appendChild(i), a.appendChild(s), a.appendChild(c), a.appendChild(d), a.appendChild(l), r.appendChild(a);
2016
- const p = document.createElement("div");
2017
- p.className = "beacon-monitor-overlay-url", e.url ? (p.textContent = e.url, p.title = e.url) : p.style.display = "none", r.appendChild(p), document.body.appendChild(r);
2018
- const f = b() ?? m();
2019
- g(x(f));
2020
- function b() {
2113
+ l.type = "button", l.className = "beacon-monitor-overlay-stop", l.textContent = "Stop", l.setAttribute("aria-label", "Stop monitoring"), r.appendChild(i), r.appendChild(s), r.appendChild(c), r.appendChild(d), r.appendChild(l), a.appendChild(r);
2114
+ const m = document.createElement("div");
2115
+ m.className = "beacon-monitor-overlay-url", e.url ? (m.textContent = e.url, m.title = e.url) : m.style.display = "none", a.appendChild(m), document.body.appendChild(a);
2116
+ const p = g() ?? u();
2117
+ S(v(p));
2118
+ function g() {
2021
2119
  try {
2022
- const w = localStorage.getItem(ve);
2023
- if (!w) return null;
2024
- const k = JSON.parse(w), I = typeof k.x == "number" ? k.x : NaN, z = typeof k.y == "number" ? k.y : NaN;
2025
- return !Number.isFinite(I) || !Number.isFinite(z) ? null : { x: I, y: z };
2120
+ const y = localStorage.getItem(we);
2121
+ if (!y) return null;
2122
+ const L = JSON.parse(y), I = typeof L.x == "number" ? L.x : NaN, M = typeof L.y == "number" ? L.y : NaN;
2123
+ return !Number.isFinite(I) || !Number.isFinite(M) ? null : { x: I, y: M };
2026
2124
  } catch {
2027
2125
  return null;
2028
2126
  }
2029
2127
  }
2030
- function m() {
2031
- const k = r.getBoundingClientRect().width || 200;
2032
- return { x: Math.max(8, Math.floor((window.innerWidth - k) / 2)), y: 16 };
2128
+ function u() {
2129
+ const L = a.getBoundingClientRect().width || 200;
2130
+ return { x: Math.max(8, Math.floor((window.innerWidth - L) / 2)), y: 16 };
2033
2131
  }
2034
- function x(w) {
2035
- const I = r.getBoundingClientRect(), z = I.width || 200, je = I.height || 40, Ve = Math.max(8, window.innerWidth - z - 8), We = Math.max(8, window.innerHeight - je - 8);
2132
+ function v(y) {
2133
+ const I = a.getBoundingClientRect(), M = I.width || 200, O = I.height || 40, We = Math.max(8, window.innerWidth - M - 8), Ye = Math.max(8, window.innerHeight - O - 8);
2036
2134
  return {
2037
- x: Math.min(Math.max(8, w.x), Ve),
2038
- y: Math.min(Math.max(8, w.y), We)
2135
+ x: Math.min(Math.max(8, y.x), We),
2136
+ y: Math.min(Math.max(8, y.y), Ye)
2039
2137
  };
2040
2138
  }
2041
- function g(w) {
2042
- r.style.left = `${w.x}px`, r.style.top = `${w.y}px`;
2139
+ function S(y) {
2140
+ a.style.left = `${y.x}px`, a.style.top = `${y.y}px`;
2043
2141
  }
2044
- let u = !1, y = null, h = { x: 0, y: 0 };
2045
- function v(w) {
2046
- if (w.target instanceof Element && w.target.closest(".beacon-monitor-overlay-stop")) return;
2047
- w.preventDefault(), u = !0, y = w.pointerId;
2142
+ let h = !1, f = null, E = { x: 0, y: 0 };
2143
+ function b(y) {
2144
+ if (y.target instanceof Element && y.target.closest(".beacon-monitor-overlay-stop")) return;
2145
+ y.preventDefault(), h = !0, f = y.pointerId;
2048
2146
  try {
2049
- r.setPointerCapture(w.pointerId);
2147
+ a.setPointerCapture(y.pointerId);
2050
2148
  } catch {
2051
2149
  }
2052
- r.setAttribute("data-dragging", "true");
2053
- const k = r.getBoundingClientRect();
2054
- h = { x: w.clientX - k.left, y: w.clientY - k.top };
2150
+ a.setAttribute("data-dragging", "true");
2151
+ const L = a.getBoundingClientRect();
2152
+ E = { x: y.clientX - L.left, y: y.clientY - L.top };
2055
2153
  }
2056
- function C(w) {
2057
- !u || w.pointerId !== y || g(x({ x: w.clientX - h.x, y: w.clientY - h.y }));
2154
+ function x(y) {
2155
+ !h || y.pointerId !== f || S(v({ x: y.clientX - E.x, y: y.clientY - E.y }));
2058
2156
  }
2059
- function S(w) {
2060
- if (!u || w.pointerId !== y) return;
2061
- u = !1, y = null, r.removeAttribute("data-dragging");
2157
+ function A(y) {
2158
+ if (!h || y.pointerId !== f) return;
2159
+ h = !1, f = null, a.removeAttribute("data-dragging");
2062
2160
  try {
2063
- r.releasePointerCapture(w.pointerId);
2161
+ a.releasePointerCapture(y.pointerId);
2064
2162
  } catch {
2065
2163
  }
2066
- const k = r.getBoundingClientRect();
2164
+ const L = a.getBoundingClientRect();
2067
2165
  try {
2068
- localStorage.setItem(ve, JSON.stringify({ x: k.left, y: k.top }));
2166
+ localStorage.setItem(we, JSON.stringify({ x: L.left, y: L.top }));
2069
2167
  } catch {
2070
2168
  }
2071
2169
  }
2072
- r.addEventListener("pointerdown", v), r.addEventListener("pointermove", C), r.addEventListener("pointerup", S), r.addEventListener("pointercancel", S), l.addEventListener("click", (w) => {
2073
- w.stopPropagation(), e.onStop();
2170
+ a.addEventListener("pointerdown", b), a.addEventListener("pointermove", x), a.addEventListener("pointerup", A), a.addEventListener("pointercancel", A), l.addEventListener("click", (y) => {
2171
+ y.stopPropagation(), e.onStop();
2074
2172
  });
2075
- function L() {
2076
- const w = r.getBoundingClientRect();
2077
- g(x({ x: w.left, y: w.top }));
2173
+ function C() {
2174
+ const y = a.getBoundingClientRect();
2175
+ S(v({ x: y.left, y: y.top }));
2078
2176
  }
2079
- window.addEventListener("resize", L);
2080
- function T() {
2081
- const w = Math.max(0, Math.floor((Date.now() - n) / 1e3));
2082
- d.textContent = pn(w);
2177
+ window.addEventListener("resize", C);
2178
+ function k() {
2179
+ const y = Math.max(0, Math.floor((Date.now() - n) / 1e3));
2180
+ d.textContent = bn(y);
2083
2181
  }
2084
- T();
2085
- const N = window.setInterval(T, 1e3);
2182
+ k();
2183
+ const T = window.setInterval(k, 1e3);
2086
2184
  return {
2087
- updateUrl(w) {
2088
- w ? (p.textContent = w, p.title = w, p.style.display = "") : p.style.display = "none";
2185
+ updateUrl(y) {
2186
+ y ? (m.textContent = y, m.title = y, m.style.display = "") : m.style.display = "none";
2089
2187
  },
2090
2188
  destroy() {
2091
- window.clearInterval(N), window.removeEventListener("resize", L), r.removeEventListener("pointerdown", v), r.removeEventListener("pointermove", C), r.removeEventListener("pointerup", S), r.removeEventListener("pointercancel", S), o.remove(), r.remove();
2189
+ window.clearInterval(T), window.removeEventListener("resize", C), a.removeEventListener("pointerdown", b), a.removeEventListener("pointermove", x), a.removeEventListener("pointerup", A), a.removeEventListener("pointercancel", A), o.remove(), a.remove();
2092
2190
  }
2093
2191
  };
2094
2192
  }
2095
- function pn(e) {
2193
+ function bn(e) {
2096
2194
  const t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), o = e % 60;
2097
- return t > 0 ? `${P(t)}:${P(n)}:${P(o)}` : `${P(n)}:${P(o)}`;
2195
+ return t > 0 ? `${$(t)}:${$(n)}:${$(o)}` : `${$(n)}:${$(o)}`;
2098
2196
  }
2099
- function P(e) {
2197
+ function $(e) {
2100
2198
  return e < 10 ? `0${e}` : String(e);
2101
2199
  }
2102
- const O = 80, fn = 'button, a, input[type="submit"], input[type="button"], [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="option"]', mn = 1024, hn = 5;
2103
- function bn(e, t) {
2200
+ const H = 80, gn = 'button, a, input[type="submit"], input[type="button"], [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="option"]', yn = 1024, vn = 5;
2201
+ function xn(e, t) {
2104
2202
  return e.length > t ? e.slice(0, t) : e;
2105
2203
  }
2106
- function ee(e) {
2204
+ function te(e) {
2107
2205
  if (e.id) return `#${CSS.escape(e.id)}`;
2108
2206
  const t = [];
2109
2207
  let n = e;
2110
2208
  for (let o = 0; o < 5 && n; o++) {
2111
- const r = n.tagName.toLowerCase(), a = n.id ? `#${CSS.escape(n.id)}` : "", i = n.classList.length > 0 ? "." + Array.from(n.classList).slice(0, 3).map(CSS.escape).join(".") : "";
2112
- if (t.unshift(`${r}${a}${i}`), a) break;
2209
+ const a = n.tagName.toLowerCase(), r = n.id ? `#${CSS.escape(n.id)}` : "", i = n.classList.length > 0 ? "." + Array.from(n.classList).slice(0, 3).map(CSS.escape).join(".") : "";
2210
+ if (t.unshift(`${a}${r}${i}`), r) break;
2113
2211
  n = n.parentElement;
2114
2212
  }
2115
2213
  return t.join(" > ");
2116
2214
  }
2117
- function H(e, t) {
2215
+ function U(e, t) {
2118
2216
  if (!e) return;
2119
2217
  const n = e.replace(/\s+/g, " ").trim();
2120
2218
  if (n)
2121
2219
  return n.length > t ? n.slice(0, t) : n;
2122
2220
  }
2123
- function xe(e) {
2124
- const t = H(e.textContent, O), n = H(e.getAttribute("aria-label"), O), o = e.getAttribute("data-testid") || void 0, r = e.getAttribute("name") || void 0;
2125
- let a = n || t;
2126
- if (!a) {
2127
- const i = e.closest(fn);
2128
- i && i !== e && (a = H(i.getAttribute("aria-label"), O) || H(i.textContent, O));
2221
+ function Ee(e) {
2222
+ const t = U(e.textContent, H), n = U(e.getAttribute("aria-label"), H), o = e.getAttribute("data-testid") || void 0, a = e.getAttribute("name") || void 0;
2223
+ let r = n || t;
2224
+ if (!r) {
2225
+ const i = e.closest(gn);
2226
+ i && i !== e && (r = U(i.getAttribute("aria-label"), H) || U(i.textContent, H));
2129
2227
  }
2130
2228
  return {
2131
2229
  tag: e.tagName.toLowerCase(),
2132
2230
  id: e.id || null,
2133
2231
  classes: Array.from(e.classList).slice(0, 10),
2134
2232
  role: e.getAttribute("role"),
2135
- selector: ee(e),
2233
+ selector: te(e),
2136
2234
  ...t ? { text: t } : {},
2137
2235
  ...n ? { ariaLabel: n } : {},
2138
2236
  ...o ? { testid: o } : {},
2139
- ...r ? { name: r } : {},
2237
+ ...a ? { name: a } : {},
2140
2238
  // Only include label when it adds something beyond `text` (avoids dup).
2141
- ...a && a !== t ? { label: a } : {}
2239
+ ...r && r !== t ? { label: r } : {}
2142
2240
  };
2143
2241
  }
2144
- function gn(e, t) {
2242
+ function wn(e, t) {
2145
2243
  const n = [], o = document.querySelectorAll("body *");
2146
- for (const r of Array.from(o)) {
2147
- const a = getComputedStyle(r);
2148
- if (a.position !== "fixed" && a.position !== "sticky") continue;
2149
- const i = r.getBoundingClientRect();
2244
+ for (const a of Array.from(o)) {
2245
+ const r = getComputedStyle(a);
2246
+ if (r.position !== "fixed" && r.position !== "sticky") continue;
2247
+ const i = a.getBoundingClientRect();
2150
2248
  if (e < i.left || e > i.right || t < i.top || t > i.bottom) continue;
2151
- const s = parseInt(a.zIndex, 10);
2152
- !Number.isFinite(s) && a.zIndex !== "auto" || n.push({
2153
- tag: r.tagName.toLowerCase(),
2249
+ const s = parseInt(r.zIndex, 10);
2250
+ !Number.isFinite(s) && r.zIndex !== "auto" || n.push({
2251
+ tag: a.tagName.toLowerCase(),
2154
2252
  zIndex: Number.isFinite(s) ? s : 0,
2155
- pointerEvents: a.pointerEvents,
2156
- classes: Array.from(r.classList).slice(0, 5).join(" ")
2253
+ pointerEvents: r.pointerEvents,
2254
+ classes: Array.from(a.classList).slice(0, 5).join(" ")
2157
2255
  });
2158
2256
  }
2159
- return n.sort((r, a) => a.zIndex - r.zIndex).slice(0, hn);
2257
+ return n.sort((a, r) => r.zIndex - a.zIndex).slice(0, vn);
2160
2258
  }
2161
- function yn(e) {
2162
- const t = (r) => (a) => {
2163
- const i = a, s = i.target;
2259
+ function En(e) {
2260
+ const t = (a) => (r) => {
2261
+ const i = r, s = i.target;
2164
2262
  if (!(s instanceof Element)) return;
2165
- const c = i.clientX, d = i.clientY, l = document.elementFromPoint(c, d), p = l === s || (l ? s.contains(l) || l.contains(s) : !1), f = document.querySelectorAll('[role="dialog"][data-state="open"]').length, b = getComputedStyle(document.body).pointerEvents, m = p ? [] : gn(c, d);
2263
+ const c = i.clientX, d = i.clientY, l = document.elementFromPoint(c, d), m = l === s || (l ? s.contains(l) || l.contains(s) : !1), p = document.querySelectorAll('[role="dialog"][data-state="open"]').length, g = getComputedStyle(document.body).pointerEvents, u = m ? [] : wn(c, d);
2166
2264
  e.emitClick({
2167
- kind: r,
2168
- target: xe(s),
2169
- hitMatchesTarget: p,
2170
- ...!p && l instanceof Element ? { hitTarget: xe(l) } : {},
2265
+ kind: a,
2266
+ target: Ee(s),
2267
+ hitMatchesTarget: m,
2268
+ ...!m && l instanceof Element ? { hitTarget: Ee(l) } : {},
2171
2269
  coords: { x: c, y: d },
2172
- openDialogs: f,
2173
- bodyPointerEvents: b,
2174
- ...m.length > 0 ? { overlaysAtPoint: m } : {}
2270
+ openDialogs: p,
2271
+ bodyPointerEvents: g,
2272
+ ...u.length > 0 ? { overlaysAtPoint: u } : {}
2175
2273
  });
2176
2274
  }, n = t("click"), o = t("mousedown");
2177
2275
  return document.addEventListener("click", n, { capture: !0, passive: !0 }), document.addEventListener("mousedown", o, { capture: !0, passive: !0 }), () => {
2178
2276
  document.removeEventListener("click", n, { capture: !0 }), document.removeEventListener("mousedown", o, { capture: !0 });
2179
2277
  };
2180
2278
  }
2181
- function vn(e) {
2279
+ function Sn(e) {
2182
2280
  const t = history.pushState, n = history.replaceState;
2183
2281
  let o = window.location.href;
2184
- const r = (s) => {
2282
+ const a = (s) => {
2185
2283
  const c = window.location.href;
2186
2284
  if (c === o) return;
2187
2285
  const d = o;
@@ -2189,43 +2287,43 @@ function vn(e) {
2189
2287
  };
2190
2288
  history.pushState = function(...c) {
2191
2289
  const d = t.apply(this, c);
2192
- return r("pushState"), d;
2290
+ return a("pushState"), d;
2193
2291
  }, history.replaceState = function(...c) {
2194
2292
  const d = n.apply(this, c);
2195
- return r("replaceState"), d;
2293
+ return a("replaceState"), d;
2196
2294
  };
2197
- const a = () => r("popstate"), i = () => r("hashchange");
2198
- return window.addEventListener("popstate", a), window.addEventListener("hashchange", i), () => {
2199
- history.pushState = t, history.replaceState = n, window.removeEventListener("popstate", a), window.removeEventListener("hashchange", i);
2295
+ const r = () => a("popstate"), i = () => a("hashchange");
2296
+ return window.addEventListener("popstate", r), window.addEventListener("hashchange", i), () => {
2297
+ history.pushState = t, history.replaceState = n, window.removeEventListener("popstate", r), window.removeEventListener("hashchange", i);
2200
2298
  };
2201
2299
  }
2202
- function xn(e) {
2203
- const t = /* @__PURE__ */ new WeakSet(), n = (r, a) => {
2204
- const i = ee(r);
2300
+ function Cn(e) {
2301
+ const t = /* @__PURE__ */ new WeakSet(), n = (a, r) => {
2302
+ const i = te(a);
2205
2303
  e.emitDialog({
2206
2304
  kind: "dialog",
2207
- action: a,
2305
+ action: r,
2208
2306
  selector: i,
2209
- state: r.getAttribute("data-state"),
2210
- ...a === "mount" ? { outerHTML: bn(r.outerHTML, mn) } : {}
2307
+ state: a.getAttribute("data-state"),
2308
+ ...r === "mount" ? { outerHTML: xn(a.outerHTML, yn) } : {}
2211
2309
  });
2212
2310
  };
2213
- for (const r of Array.from(document.querySelectorAll('[role="dialog"]')))
2214
- t.add(r);
2215
- const o = new MutationObserver((r) => {
2216
- var a, i, s, c;
2217
- for (const d of r) {
2311
+ for (const a of Array.from(document.querySelectorAll('[role="dialog"]')))
2312
+ t.add(a);
2313
+ const o = new MutationObserver((a) => {
2314
+ var r, i, s, c;
2315
+ for (const d of a) {
2218
2316
  for (const l of Array.from(d.addedNodes)) {
2219
2317
  if (!(l instanceof Element)) continue;
2220
- const p = (a = l.matches) != null && a.call(l, '[role="dialog"]') ? [l] : Array.from(((i = l.querySelectorAll) == null ? void 0 : i.call(l, '[role="dialog"]')) ?? []);
2221
- for (const f of p)
2222
- t.has(f) || (t.add(f), n(f, "mount"));
2318
+ const m = (r = l.matches) != null && r.call(l, '[role="dialog"]') ? [l] : Array.from(((i = l.querySelectorAll) == null ? void 0 : i.call(l, '[role="dialog"]')) ?? []);
2319
+ for (const p of m)
2320
+ t.has(p) || (t.add(p), n(p, "mount"));
2223
2321
  }
2224
2322
  for (const l of Array.from(d.removedNodes)) {
2225
2323
  if (!(l instanceof Element)) continue;
2226
- const p = (s = l.matches) != null && s.call(l, '[role="dialog"]') ? [l] : Array.from(((c = l.querySelectorAll) == null ? void 0 : c.call(l, '[role="dialog"]')) ?? []);
2227
- for (const f of p)
2228
- t.has(f) && (t.delete(f), n(f, "unmount"));
2324
+ const m = (s = l.matches) != null && s.call(l, '[role="dialog"]') ? [l] : Array.from(((c = l.querySelectorAll) == null ? void 0 : c.call(l, '[role="dialog"]')) ?? []);
2325
+ for (const p of m)
2326
+ t.has(p) && (t.delete(p), n(p, "unmount"));
2229
2327
  }
2230
2328
  d.type === "attributes" && d.attributeName === "data-state" && d.target instanceof Element && d.target.getAttribute("role") === "dialog" && n(d.target, "state");
2231
2329
  }
@@ -2237,16 +2335,16 @@ function xn(e) {
2237
2335
  attributeFilter: ["data-state"]
2238
2336
  }), () => o.disconnect();
2239
2337
  }
2240
- function wn(e) {
2338
+ function kn(e) {
2241
2339
  const t = (n) => {
2242
2340
  const o = n.target;
2243
2341
  if (!(o instanceof HTMLFormElement)) return;
2244
- const r = [];
2245
- for (const a of Array.from(o.elements)) {
2246
- if (!(a instanceof HTMLInputElement || a instanceof HTMLTextAreaElement || a instanceof HTMLSelectElement)) continue;
2247
- const i = a.getAttribute("name") || "<unnamed>", s = a instanceof HTMLInputElement ? a.type : a.tagName.toLowerCase();
2342
+ const a = [];
2343
+ for (const r of Array.from(o.elements)) {
2344
+ if (!(r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement)) continue;
2345
+ const i = r.getAttribute("name") || "<unnamed>", s = r instanceof HTMLInputElement ? r.type : r.tagName.toLowerCase();
2248
2346
  let c;
2249
- a instanceof HTMLInputElement && (a.type === "checkbox" || a.type === "radio") ? c = a.checked : c = !!a.value, r.push({ name: i, type: s, hasValue: c });
2347
+ r instanceof HTMLInputElement && (r.type === "checkbox" || r.type === "radio") ? c = r.checked : c = !!r.value, a.push({ name: i, type: s, hasValue: c });
2250
2348
  }
2251
2349
  e.emitSubmit({
2252
2350
  kind: "submit",
@@ -2254,129 +2352,129 @@ function wn(e) {
2254
2352
  id: o.id || null,
2255
2353
  action: o.getAttribute("action") || null,
2256
2354
  method: (o.getAttribute("method") || "GET").toUpperCase(),
2257
- selector: ee(o),
2258
- fields: r
2355
+ selector: te(o),
2356
+ fields: a
2259
2357
  }
2260
2358
  });
2261
2359
  };
2262
2360
  return document.addEventListener("submit", t, { capture: !0 }), () => document.removeEventListener("submit", t, { capture: !0 });
2263
2361
  }
2264
- function En(e) {
2265
- const t = yn(e), n = vn(e), o = xn(e), r = wn(e);
2362
+ function An(e) {
2363
+ const t = En(e), n = Sn(e), o = Cn(e), a = kn(e);
2266
2364
  return {
2267
2365
  uninstall() {
2268
- t(), n(), o(), r();
2366
+ t(), n(), o(), a();
2269
2367
  }
2270
2368
  };
2271
2369
  }
2272
- const X = 1e3, we = 10 * 1024, Pe = "[REDACTED]", De = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]), Sn = [
2370
+ const G = 1e3, Se = 10 * 1024, $e = "[REDACTED]", Be = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]), Ln = [
2273
2371
  /Bearer\s+[A-Za-z0-9._\-+/=]+/gi,
2274
2372
  /\bls_pat_[A-Za-z0-9_]+/g,
2275
2373
  // JWT: three dot-separated base64url segments starting with eyJ (the b64
2276
2374
  // encoding of the JSON {"). Matches Auth0/Clerk/most providers' tokens.
2277
2375
  /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g
2278
- ], Cn = /^(password|passwd|secret|token|api[_-]?key|auth|access[_-]?token|refresh[_-]?token|client[_-]?secret|private[_-]?key)$/i;
2279
- function G(e, t) {
2376
+ ], Tn = /^(password|passwd|secret|token|api[_-]?key|auth|access[_-]?token|refresh[_-]?token|client[_-]?secret|private[_-]?key)$/i;
2377
+ function J(e, t) {
2280
2378
  return e.length > t ? e.slice(0, t) : e;
2281
2379
  }
2282
- function $e(e) {
2380
+ function ze(e) {
2283
2381
  let t = e;
2284
- for (const n of Sn)
2285
- t = t.replace(n, Pe);
2382
+ for (const n of Ln)
2383
+ t = t.replace(n, $e);
2286
2384
  return t;
2287
2385
  }
2288
- function J(e) {
2386
+ function Z(e) {
2289
2387
  if (e === null || typeof e != "object")
2290
- return typeof e == "string" ? $e(e) : e;
2291
- if (Array.isArray(e)) return e.map(J);
2388
+ return typeof e == "string" ? ze(e) : e;
2389
+ if (Array.isArray(e)) return e.map(Z);
2292
2390
  const t = {};
2293
2391
  for (const [n, o] of Object.entries(e))
2294
- t[n] = Cn.test(n) ? Pe : J(o);
2392
+ t[n] = Tn.test(n) ? $e : Z(o);
2295
2393
  return t;
2296
2394
  }
2297
- function Ee(e, t) {
2395
+ function Ce(e, t) {
2298
2396
  if (t && t.includes("application/json"))
2299
2397
  try {
2300
2398
  const n = JSON.parse(e);
2301
- return JSON.stringify(J(n));
2399
+ return JSON.stringify(Z(n));
2302
2400
  } catch {
2303
2401
  }
2304
- return $e(e);
2402
+ return ze(e);
2305
2403
  }
2306
- function U(e, t) {
2404
+ function F(e, t) {
2307
2405
  const n = e.length, o = { bodySize: n };
2308
- return n > we ? (o.body = Ee(e.slice(0, we), t), o.bodyTruncated = !0) : o.body = Ee(e, t), t && (o.contentType = t), o;
2406
+ return n > Se ? (o.body = Ce(e.slice(0, Se), t), o.bodyTruncated = !0) : o.body = Ce(e, t), t && (o.contentType = t), o;
2309
2407
  }
2310
- function kn(e, t) {
2408
+ function Nn(e, t) {
2311
2409
  const n = t == null ? void 0 : t.body;
2312
2410
  if (n != null) {
2313
2411
  if (typeof n == "string") return n;
2314
2412
  if (n instanceof URLSearchParams) return n.toString();
2315
2413
  if (n instanceof FormData) {
2316
2414
  const o = [];
2317
- return n.forEach((r, a) => {
2318
- o.push(`${a}=${typeof r == "string" ? `[${r.length}b]` : "[file]"}`);
2415
+ return n.forEach((a, r) => {
2416
+ o.push(`${r}=${typeof a == "string" ? `[${a.length}b]` : "[file]"}`);
2319
2417
  }), `[FormData] ${o.join("&")}`;
2320
2418
  }
2321
2419
  return n instanceof Blob ? `[Blob ${n.size}b ${n.type || "unknown"}]` : n instanceof ArrayBuffer ? `[binary ${n.byteLength}b]` : ArrayBuffer.isView(n) ? `[binary ${n.byteLength}b]` : null;
2322
2420
  }
2323
2421
  return e instanceof Request, null;
2324
2422
  }
2325
- function An(e, t) {
2326
- return !!(((o) => o ? o instanceof Headers ? o.has("authorization") : Array.isArray(o) ? o.some(([r]) => r.toLowerCase() === "authorization") : typeof o == "object" ? Object.keys(o).some((r) => r.toLowerCase() === "authorization") : !1 : !1)(t == null ? void 0 : t.headers) || e instanceof Request && e.headers.has("authorization"));
2423
+ function Mn(e, t) {
2424
+ return !!(((o) => o ? o instanceof Headers ? o.has("authorization") : Array.isArray(o) ? o.some(([a]) => a.toLowerCase() === "authorization") : typeof o == "object" ? Object.keys(o).some((a) => a.toLowerCase() === "authorization") : !1 : !1)(t == null ? void 0 : t.headers) || e instanceof Request && e.headers.has("authorization"));
2327
2425
  }
2328
- function Ln(e, t) {
2426
+ function In(e, t) {
2329
2427
  return ((o) => {
2330
2428
  if (o) {
2331
2429
  if (o instanceof Headers) return o.get("content-type") || void 0;
2332
2430
  if (Array.isArray(o)) {
2333
- const r = o.find(([a]) => a.toLowerCase() === "content-type");
2334
- return r ? r[1] : void 0;
2431
+ const a = o.find(([r]) => r.toLowerCase() === "content-type");
2432
+ return a ? a[1] : void 0;
2335
2433
  }
2336
2434
  if (typeof o == "object") {
2337
- for (const [r, a] of Object.entries(o))
2338
- if (r.toLowerCase() === "content-type") return a;
2435
+ for (const [a, r] of Object.entries(o))
2436
+ if (a.toLowerCase() === "content-type") return r;
2339
2437
  }
2340
2438
  }
2341
2439
  })(t == null ? void 0 : t.headers) ?? (e instanceof Request && e.headers.get("content-type") || void 0);
2342
2440
  }
2343
- function Nn(e, t, n) {
2344
- if (!De.has(n)) return;
2345
- const o = An(e, t), r = kn(e, t);
2346
- if (r == null && !o) return;
2347
- const a = Ln(e, t), i = r != null ? U(r, a) : {};
2441
+ function Rn(e, t, n) {
2442
+ if (!Be.has(n)) return;
2443
+ const o = Mn(e, t), a = Nn(e, t);
2444
+ if (a == null && !o) return;
2445
+ const r = In(e, t), i = a != null ? F(a, r) : {};
2348
2446
  return o && (i.hasAuth = !0), i;
2349
2447
  }
2350
- function Tn(e) {
2448
+ function Pn(e) {
2351
2449
  const t = window.fetch;
2352
2450
  if (typeof t != "function") return () => {
2353
2451
  };
2354
- const n = async (o, r) => {
2355
- const a = performance.now(), i = ((r == null ? void 0 : r.method) ?? (o instanceof Request ? o.method : "GET")).toUpperCase(), s = typeof o == "string" ? o : o instanceof URL ? o.toString() : o.url, c = Nn(o, r, i);
2452
+ const n = async (o, a) => {
2453
+ const r = performance.now(), i = ((a == null ? void 0 : a.method) ?? (o instanceof Request ? o.method : "GET")).toUpperCase(), s = typeof o == "string" ? o : o instanceof URL ? o.toString() : o.url, c = Rn(o, a, i);
2356
2454
  try {
2357
- const d = await t.call(window, o, r), l = Math.round(performance.now() - a), p = d.status >= 400;
2358
- let f;
2359
- if (p || e.verbose)
2455
+ const d = await t.call(window, o, a), l = Math.round(performance.now() - r), m = d.status >= 400;
2456
+ let p;
2457
+ if (m || e.verbose)
2360
2458
  try {
2361
- const b = await d.clone().text(), m = d.headers.get("content-type") || void 0;
2362
- f = U(b, m);
2459
+ const g = await d.clone().text(), u = d.headers.get("content-type") || void 0;
2460
+ p = F(g, u);
2363
2461
  } catch {
2364
2462
  }
2365
- return (p || e.verbose) && e.emit({
2463
+ return (m || e.verbose) && e.emit({
2366
2464
  kind: "fetch",
2367
- url: G(s, X),
2465
+ url: J(s, G),
2368
2466
  method: i,
2369
2467
  status: d.status,
2370
2468
  durationMs: l,
2371
- failed: p,
2469
+ failed: m,
2372
2470
  ...c ? { request: c } : {},
2373
- ...f ? { response: f } : {}
2471
+ ...p ? { response: p } : {}
2374
2472
  }), d;
2375
2473
  } catch (d) {
2376
- const l = Math.round(performance.now() - a);
2474
+ const l = Math.round(performance.now() - r);
2377
2475
  throw e.emit({
2378
2476
  kind: "fetch",
2379
- url: G(s, X),
2477
+ url: J(s, G),
2380
2478
  method: i,
2381
2479
  status: 0,
2382
2480
  durationMs: l,
@@ -2390,7 +2488,7 @@ function Tn(e) {
2390
2488
  window.fetch.__lsBeaconWrapped && (window.fetch = t);
2391
2489
  };
2392
2490
  }
2393
- function Mn(e) {
2491
+ function _n(e) {
2394
2492
  if (e == null) return null;
2395
2493
  if (typeof e == "string") return e;
2396
2494
  if (e instanceof URLSearchParams) return e.toString();
@@ -2402,88 +2500,88 @@ function Mn(e) {
2402
2500
  }
2403
2501
  return e instanceof Blob ? `[Blob ${e.size}b ${e.type || "unknown"}]` : e instanceof ArrayBuffer ? `[binary ${e.byteLength}b]` : ArrayBuffer.isView(e) ? `[binary ${e.byteLength}b]` : null;
2404
2502
  }
2405
- function In(e) {
2406
- const t = XMLHttpRequest.prototype, n = t.open, o = t.send, r = t.setRequestHeader, a = /* @__PURE__ */ new WeakMap();
2503
+ function Dn(e) {
2504
+ const t = XMLHttpRequest.prototype, n = t.open, o = t.send, a = t.setRequestHeader, r = /* @__PURE__ */ new WeakMap();
2407
2505
  return t.open = function(s, c, ...d) {
2408
- return a.set(this, {
2506
+ return r.set(this, {
2409
2507
  method: s.toUpperCase(),
2410
2508
  url: typeof c == "string" ? c : c.toString(),
2411
2509
  start: 0,
2412
2510
  hasAuth: !1
2413
2511
  }), n.call(this, s, c, ...d);
2414
2512
  }, t.setRequestHeader = function(s, c) {
2415
- const d = a.get(this);
2513
+ const d = r.get(this);
2416
2514
  if (d) {
2417
2515
  const l = s.toLowerCase();
2418
2516
  l === "authorization" ? d.hasAuth = !0 : l === "content-type" && (d.requestContentType = c);
2419
2517
  }
2420
- return r.call(this, s, c);
2518
+ return a.call(this, s, c);
2421
2519
  }, t.send = function(s) {
2422
- const c = a.get(this);
2520
+ const c = r.get(this);
2423
2521
  if (c)
2424
- if (c.start = performance.now(), De.has(c.method)) {
2425
- const l = Mn(s);
2426
- l != null ? c.request = U(l, c.requestContentType) : c.request = {}, c.hasAuth && (c.request.hasAuth = !0);
2522
+ if (c.start = performance.now(), Be.has(c.method)) {
2523
+ const l = _n(s);
2524
+ l != null ? c.request = F(l, c.requestContentType) : c.request = {}, c.hasAuth && (c.request.hasAuth = !0);
2427
2525
  } else c.hasAuth && (c.request = { hasAuth: !0 });
2428
2526
  const d = () => {
2429
2527
  this.removeEventListener("loadend", d);
2430
- const l = a.get(this);
2528
+ const l = r.get(this);
2431
2529
  if (!l) return;
2432
- const p = Math.round(performance.now() - l.start), f = this.status === 0 || this.status >= 400;
2433
- let b;
2434
- if ((f || e.verbose) && this.status > 0)
2530
+ const m = Math.round(performance.now() - l.start), p = this.status === 0 || this.status >= 400;
2531
+ let g;
2532
+ if ((p || e.verbose) && this.status > 0)
2435
2533
  try {
2436
- const m = this.responseType === "" || this.responseType === "text" ? this.responseText : "";
2437
- if (m) {
2438
- const x = this.getResponseHeader("content-type") || void 0;
2439
- b = U(m, x);
2534
+ const u = this.responseType === "" || this.responseType === "text" ? this.responseText : "";
2535
+ if (u) {
2536
+ const v = this.getResponseHeader("content-type") || void 0;
2537
+ g = F(u, v);
2440
2538
  }
2441
2539
  } catch {
2442
2540
  }
2443
- (f || e.verbose) && e.emit({
2541
+ (p || e.verbose) && e.emit({
2444
2542
  kind: "xhr",
2445
- url: G(l.url, X),
2543
+ url: J(l.url, G),
2446
2544
  method: l.method,
2447
2545
  status: this.status,
2448
- durationMs: p,
2449
- failed: f,
2546
+ durationMs: m,
2547
+ failed: p,
2450
2548
  ...l.request ? { request: l.request } : {},
2451
- ...b ? { response: b } : {}
2452
- }), a.delete(this);
2549
+ ...g ? { response: g } : {}
2550
+ }), r.delete(this);
2453
2551
  };
2454
2552
  return this.addEventListener("loadend", d), o.call(this, s);
2455
2553
  }, () => {
2456
- t.open = n, t.send = o, t.setRequestHeader = r;
2554
+ t.open = n, t.send = o, t.setRequestHeader = a;
2457
2555
  };
2458
2556
  }
2459
- function Rn(e) {
2460
- const t = Tn(e), n = In(e);
2557
+ function $n(e) {
2558
+ const t = Pn(e), n = Dn(e);
2461
2559
  return {
2462
2560
  uninstall() {
2463
2561
  t(), n();
2464
2562
  }
2465
2563
  };
2466
2564
  }
2467
- const _n = 1e3, Se = 50, Pn = 500;
2468
- class Dn {
2565
+ const Bn = 1e3, ke = 50, zn = 500;
2566
+ class On {
2469
2567
  constructor(t) {
2470
2568
  this.buffer = [], this.inflight = !1, this.timer = null, this.destroyed = !1, this.handleVisibilityChange = () => {
2471
2569
  document.visibilityState === "hidden" && this.flushSync();
2472
2570
  }, this.url = t.url, this.sessionId = t.sessionId, this.onError = t.onError, this.timer = setInterval(() => {
2473
2571
  this.flush();
2474
- }, _n), this.pagehideHandler = () => this.flushSync(), window.addEventListener("pagehide", this.pagehideHandler), document.addEventListener("visibilitychange", this.handleVisibilityChange);
2572
+ }, Bn), this.pagehideHandler = () => this.flushSync(), window.addEventListener("pagehide", this.pagehideHandler), document.addEventListener("visibilitychange", this.handleVisibilityChange);
2475
2573
  }
2476
2574
  enqueue(t) {
2477
- this.destroyed || (this.buffer.push(t), this.buffer.length > Pn && this.buffer.shift(), this.buffer.length >= Se && this.flush());
2575
+ this.destroyed || (this.buffer.push(t), this.buffer.length > zn && this.buffer.shift(), this.buffer.length >= ke && this.flush());
2478
2576
  }
2479
2577
  /** Async flush via fetch. No-op when in-flight or empty. */
2480
2578
  async flush() {
2481
- var o, r;
2579
+ var o, a;
2482
2580
  if (this.destroyed || this.inflight || this.buffer.length === 0) return;
2483
- const t = this.buffer.splice(0, Se), n = this.makeBatch(t);
2581
+ const t = this.buffer.splice(0, ke), n = this.makeBatch(t);
2484
2582
  this.inflight = !0;
2485
2583
  try {
2486
- const a = await fetch(this.url, {
2584
+ const r = await fetch(this.url, {
2487
2585
  method: "POST",
2488
2586
  // credentials:'omit' — going to the dev's local server, not the app
2489
2587
  // backend; avoid leaking session cookies cross-origin.
@@ -2494,9 +2592,9 @@ class Dn {
2494
2592
  // pagehide didn't fire (e.g. a window.location.assign from script).
2495
2593
  keepalive: !0
2496
2594
  });
2497
- a.ok || (o = this.onError) == null || o.call(this, new Error(`monitor flush: HTTP ${a.status}`));
2498
- } catch (a) {
2499
- (r = this.onError) == null || r.call(this, a instanceof Error ? a : new Error(String(a)));
2595
+ r.ok || (o = this.onError) == null || o.call(this, new Error(`monitor flush: HTTP ${r.status}`));
2596
+ } catch (r) {
2597
+ (a = this.onError) == null || a.call(this, r instanceof Error ? r : new Error(String(r)));
2500
2598
  } finally {
2501
2599
  this.inflight = !1;
2502
2600
  }
@@ -2534,26 +2632,26 @@ class Dn {
2534
2632
  };
2535
2633
  }
2536
2634
  }
2537
- const te = "__lsBeaconMonitorUrl", Be = "__lsBeaconMonitorSession", ne = "__lsBeaconMonitorVerbose", oe = "__lsBeaconMonitorDeadline", ze = 30 * 6e4, Ce = 4096;
2538
- let E = null;
2539
- const Z = /* @__PURE__ */ new Set();
2540
- function $n() {
2635
+ const ne = "__lsBeaconMonitorUrl", Oe = "__lsBeaconMonitorSession", oe = "__lsBeaconMonitorVerbose", re = "__lsBeaconMonitorDeadline", He = 30 * 6e4, Ae = 4096;
2636
+ let w = null;
2637
+ const Q = /* @__PURE__ */ new Set();
2638
+ function Hn() {
2541
2639
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID().slice(0, 8) : Math.random().toString(36).slice(2, 10);
2542
2640
  }
2543
- function Bn(e) {
2641
+ function Un(e) {
2544
2642
  const t = /* @__PURE__ */ new WeakSet(), n = (o) => {
2545
2643
  if (o === null || typeof o != "object")
2546
- return typeof o == "string" && o.length > Ce ? o.slice(0, Ce) : o;
2644
+ return typeof o == "string" && o.length > Ae ? o.slice(0, Ae) : o;
2547
2645
  if (t.has(o)) return "[cyclic]";
2548
2646
  if (t.add(o), Array.isArray(o)) return o.map(n);
2549
- const r = {};
2550
- for (const a of Object.keys(o).slice(0, 50))
2647
+ const a = {};
2648
+ for (const r of Object.keys(o).slice(0, 50))
2551
2649
  try {
2552
- r[a] = n(o[a]);
2650
+ a[r] = n(o[r]);
2553
2651
  } catch {
2554
- r[a] = "[unreadable]";
2652
+ a[r] = "[unreadable]";
2555
2653
  }
2556
- return r;
2654
+ return a;
2557
2655
  };
2558
2656
  try {
2559
2657
  return n(e);
@@ -2561,19 +2659,19 @@ function Bn(e) {
2561
2659
  return "[unserialisable]";
2562
2660
  }
2563
2661
  }
2564
- function re() {
2565
- for (const e of Z)
2662
+ function ae() {
2663
+ for (const e of Q)
2566
2664
  try {
2567
- e(E !== null, (E == null ? void 0 : E.url) ?? null);
2665
+ e(w !== null, (w == null ? void 0 : w.url) ?? null);
2568
2666
  } catch {
2569
2667
  }
2570
2668
  }
2571
- function zn(e) {
2572
- return E ? (E.seq += 1, {
2669
+ function qn(e) {
2670
+ return w ? (w.seq += 1, {
2573
2671
  ...e,
2574
2672
  ts: Date.now(),
2575
- sessionId: E.sessionId,
2576
- seq: E.seq
2673
+ sessionId: w.sessionId,
2674
+ seq: w.seq
2577
2675
  }) : {
2578
2676
  ...e,
2579
2677
  ts: Date.now(),
@@ -2581,40 +2679,40 @@ function zn(e) {
2581
2679
  seq: 0
2582
2680
  };
2583
2681
  }
2584
- function M(e) {
2585
- if (!E) return;
2586
- const t = zn(e);
2587
- E.transport.enqueue(t);
2682
+ function P(e) {
2683
+ if (!w) return;
2684
+ const t = qn(e);
2685
+ w.transport.enqueue(t);
2588
2686
  }
2589
- function On() {
2590
- if (E)
2687
+ function Fn() {
2688
+ if (w)
2591
2689
  try {
2592
- sessionStorage.setItem(te, E.url), sessionStorage.setItem(Be, E.sessionId), sessionStorage.setItem(ne, E.verbose ? "1" : "0"), sessionStorage.setItem(oe, String(E.deadlineMs));
2690
+ sessionStorage.setItem(ne, w.url), sessionStorage.setItem(Oe, w.sessionId), sessionStorage.setItem(oe, w.verbose ? "1" : "0"), sessionStorage.setItem(re, String(w.deadlineMs));
2593
2691
  } catch {
2594
2692
  }
2595
2693
  }
2596
- function Oe() {
2694
+ function Ue() {
2597
2695
  try {
2598
- sessionStorage.removeItem(te), sessionStorage.removeItem(Be), sessionStorage.removeItem(ne), sessionStorage.removeItem(oe);
2696
+ sessionStorage.removeItem(ne), sessionStorage.removeItem(Oe), sessionStorage.removeItem(oe), sessionStorage.removeItem(re);
2599
2697
  } catch {
2600
2698
  }
2601
2699
  }
2602
- function Hn() {
2700
+ function jn() {
2603
2701
  try {
2604
- const e = sessionStorage.getItem(te);
2702
+ const e = sessionStorage.getItem(ne);
2605
2703
  if (!e) return null;
2606
- const t = sessionStorage.getItem(ne) === "1", n = sessionStorage.getItem(oe), o = n ? Number(n) : Date.now() + ze;
2607
- return Number.isFinite(o) && o <= Date.now() ? (Oe(), null) : { url: e, verbose: t, deadlineMs: o };
2704
+ const t = sessionStorage.getItem(oe) === "1", n = sessionStorage.getItem(re), o = n ? Number(n) : Date.now() + He;
2705
+ return Number.isFinite(o) && o <= Date.now() ? (Ue(), null) : { url: e, verbose: t, deadlineMs: o };
2608
2706
  } catch {
2609
2707
  return null;
2610
2708
  }
2611
2709
  }
2612
- function ke(e) {
2613
- E && (E.seq += 1, E.transport.enqueue({
2710
+ function Le(e) {
2711
+ w && (w.seq += 1, w.transport.enqueue({
2614
2712
  kind: e.kind,
2615
2713
  ts: e.ts,
2616
- sessionId: E.sessionId,
2617
- seq: E.seq,
2714
+ sessionId: w.sessionId,
2715
+ seq: w.seq,
2618
2716
  message: e.message,
2619
2717
  ...e.stack ? { stack: e.stack } : {},
2620
2718
  ...e.source ? { source: e.source } : {},
@@ -2622,102 +2720,102 @@ function ke(e) {
2622
2720
  ...typeof e.col == "number" ? { col: e.col } : {}
2623
2721
  }));
2624
2722
  }
2625
- function He(e) {
2626
- if (E && F(), !e.url) return;
2627
- const t = e.maxSessionMs ?? ze, n = Date.now() + t, o = $n(), r = !!e.verbose, a = new Dn({
2723
+ function qe(e) {
2724
+ if (w && j(), !e.url) return;
2725
+ const t = e.maxSessionMs ?? He, n = Date.now() + t, o = Hn(), a = !!e.verbose, r = new On({
2628
2726
  url: e.url,
2629
2727
  sessionId: o,
2630
- onError: (m) => {
2631
- console.warn("[launch-kit-beacon] monitor transport error:", m.message);
2728
+ onError: (u) => {
2729
+ console.warn("[launch-kit-beacon] monitor transport error:", u.message);
2632
2730
  }
2633
- }), i = Ie(), s = i.install(), c = i.snapshot();
2634
- for (const m of c) ke(m);
2731
+ }), i = Pe(), s = i.install(), c = i.snapshot();
2732
+ for (const u of c) Le(u);
2635
2733
  let d = c.length;
2636
2734
  const l = i.subscribe(() => {
2637
- if (!E) return;
2638
- const m = E.errorsBuffer.snapshot();
2639
- for (; E.drainedThrough < m.length; ) {
2640
- const x = m[E.drainedThrough];
2641
- x && ke(x), E.drainedThrough += 1;
2642
- }
2643
- }), p = Rn({
2644
- emit: (m) => M(m),
2645
- verbose: r
2646
- }), f = En({
2647
- emitClick: (m) => M(m),
2648
- emitRoute: (m) => M(m),
2649
- emitDialog: (m) => M(m),
2650
- emitSubmit: (m) => M(m)
2651
- }), b = setTimeout(() => {
2652
- console.info("[launch-kit-beacon] monitor session expired (max duration reached)"), F();
2735
+ if (!w) return;
2736
+ const u = w.errorsBuffer.snapshot();
2737
+ for (; w.drainedThrough < u.length; ) {
2738
+ const v = u[w.drainedThrough];
2739
+ v && Le(v), w.drainedThrough += 1;
2740
+ }
2741
+ }), m = $n({
2742
+ emit: (u) => P(u),
2743
+ verbose: a
2744
+ }), p = An({
2745
+ emitClick: (u) => P(u),
2746
+ emitRoute: (u) => P(u),
2747
+ emitDialog: (u) => P(u),
2748
+ emitSubmit: (u) => P(u)
2749
+ }), g = setTimeout(() => {
2750
+ console.info("[launch-kit-beacon] monitor session expired (max duration reached)"), j();
2653
2751
  }, Math.max(0, n - Date.now()));
2654
- E = {
2752
+ w = {
2655
2753
  url: e.url,
2656
2754
  sessionId: o,
2657
- verbose: r,
2755
+ verbose: a,
2658
2756
  deadlineMs: n,
2659
2757
  seq: 0,
2660
- transport: a,
2758
+ transport: r,
2661
2759
  errorsBuffer: i,
2662
- uninstallNetwork: p.uninstall,
2663
- uninstallDom: f.uninstall,
2760
+ uninstallNetwork: m.uninstall,
2761
+ uninstallDom: p.uninstall,
2664
2762
  uninstallErrors: s,
2665
2763
  errorsUnsub: l,
2666
- deadlineTimer: b,
2764
+ deadlineTimer: g,
2667
2765
  drainedThrough: d
2668
- }, On(), re();
2766
+ }, Fn(), ae();
2669
2767
  }
2670
- function F() {
2671
- qe(), Oe(), re();
2768
+ function j() {
2769
+ Fe(), Ue(), ae();
2672
2770
  }
2673
- function qn() {
2674
- E && (qe(), re());
2771
+ function Vn() {
2772
+ w && (Fe(), ae());
2675
2773
  }
2676
- function qe() {
2677
- E && (clearTimeout(E.deadlineTimer), E.errorsUnsub(), E.uninstallErrors(), E.uninstallNetwork(), E.uninstallDom(), E.transport.destroy(), E = null);
2774
+ function Fe() {
2775
+ w && (clearTimeout(w.deadlineTimer), w.errorsUnsub(), w.uninstallErrors(), w.uninstallNetwork(), w.uninstallDom(), w.transport.destroy(), w = null);
2678
2776
  }
2679
- function Qn(e, t) {
2680
- E && M({
2777
+ function oo(e, t) {
2778
+ w && P({
2681
2779
  kind: "probe",
2682
2780
  label: e.slice(0, 200),
2683
- data: Bn(t)
2781
+ data: Un(t)
2684
2782
  });
2685
2783
  }
2686
- function Ae() {
2687
- return E !== null;
2784
+ function Te() {
2785
+ return w !== null;
2688
2786
  }
2689
- function Le() {
2690
- return (E == null ? void 0 : E.url) ?? null;
2787
+ function Ne() {
2788
+ return (w == null ? void 0 : w.url) ?? null;
2691
2789
  }
2692
- function Ne(e) {
2693
- return Z.add(e), () => {
2694
- Z.delete(e);
2790
+ function Me(e) {
2791
+ return Q.add(e), () => {
2792
+ Q.delete(e);
2695
2793
  };
2696
2794
  }
2697
- function Un() {
2698
- if (E || typeof window > "u") return;
2699
- const e = Hn();
2700
- e && He({
2795
+ function Wn() {
2796
+ if (w || typeof window > "u") return;
2797
+ const e = jn();
2798
+ e && qe({
2701
2799
  url: e.url,
2702
2800
  verbose: e.verbose,
2703
2801
  maxSessionMs: Math.max(6e4, e.deadlineMs - Date.now())
2704
2802
  });
2705
2803
  }
2706
- function eo(e = {}) {
2707
- let t = null, n = null, o = "", r = null;
2708
- function a() {
2709
- r || (r = un({
2710
- onStop: () => F(),
2711
- url: Le()
2804
+ function ro(e = {}) {
2805
+ let t = null, n = null, o = "", a = null;
2806
+ function r() {
2807
+ a || (a = hn({
2808
+ onStop: () => j(),
2809
+ url: Ne()
2712
2810
  }));
2713
2811
  }
2714
2812
  function i() {
2715
- if (r) {
2813
+ if (a) {
2716
2814
  try {
2717
- r.destroy();
2815
+ a.destroy();
2718
2816
  } catch {
2719
2817
  }
2720
- r = null;
2818
+ a = null;
2721
2819
  }
2722
2820
  }
2723
2821
  function s() {
@@ -2725,31 +2823,31 @@ function eo(e = {}) {
2725
2823
  t.innerHTML = "";
2726
2824
  const l = document.createElement("div");
2727
2825
  l.className = "beacon-monitor-title", l.textContent = "Monitor — paste a stream URL", t.appendChild(l);
2728
- const p = document.createElement("div");
2729
- p.className = "beacon-monitor-row";
2730
- const f = document.createElement("input");
2731
- f.type = "url", f.className = "beacon-monitor-input", f.placeholder = "http://localhost:9876/m/…", f.value = o, f.autocomplete = "off", f.spellcheck = !1, p.appendChild(f);
2732
- const b = document.createElement("button");
2733
- b.type = "button", b.className = "beacon-monitor-btn", b.textContent = "Start", b.disabled = !o.trim(), p.appendChild(b), t.appendChild(p);
2734
- const m = document.createElement("label");
2735
- m.className = "beacon-monitor-verbose";
2736
- const x = document.createElement("input");
2737
- x.type = "checkbox", x.dataset.role = "verbose", m.appendChild(x), m.appendChild(document.createTextNode(" verbose (capture successful network too)")), t.appendChild(m);
2738
- const g = document.createElement("div");
2739
- g.className = "beacon-monitor-help", g.textContent = "Streams clicks, failed network, errors, route + dialog changes.", t.appendChild(g), f.addEventListener("input", () => {
2740
- o = f.value, b.disabled = !f.value.trim();
2741
- }), b.addEventListener("click", () => {
2742
- const u = f.value.trim();
2743
- if (u) {
2826
+ const m = document.createElement("div");
2827
+ m.className = "beacon-monitor-row";
2828
+ const p = document.createElement("input");
2829
+ p.type = "url", p.className = "beacon-monitor-input", p.placeholder = "http://localhost:9876/m/…", p.value = o, p.autocomplete = "off", p.spellcheck = !1, m.appendChild(p);
2830
+ const g = document.createElement("button");
2831
+ g.type = "button", g.className = "beacon-monitor-btn", g.textContent = "Start", g.disabled = !o.trim(), m.appendChild(g), t.appendChild(m);
2832
+ const u = document.createElement("label");
2833
+ u.className = "beacon-monitor-verbose";
2834
+ const v = document.createElement("input");
2835
+ v.type = "checkbox", v.dataset.role = "verbose", u.appendChild(v), u.appendChild(document.createTextNode(" verbose (capture successful network too)")), t.appendChild(u);
2836
+ const S = document.createElement("div");
2837
+ S.className = "beacon-monitor-help", S.textContent = "Streams clicks, failed network, errors, route + dialog changes.", t.appendChild(S), p.addEventListener("input", () => {
2838
+ o = p.value, g.disabled = !p.value.trim();
2839
+ }), g.addEventListener("click", () => {
2840
+ const h = p.value.trim();
2841
+ if (h) {
2744
2842
  try {
2745
- new URL(u);
2843
+ new URL(h);
2746
2844
  } catch {
2747
- f.setCustomValidity("Enter a valid URL (e.g. http://localhost:9876/m/abc)"), f.reportValidity();
2845
+ p.setCustomValidity("Enter a valid URL (e.g. http://localhost:9876/m/abc)"), p.reportValidity();
2748
2846
  return;
2749
2847
  }
2750
- f.setCustomValidity(""), He({
2751
- url: u,
2752
- verbose: x.checked,
2848
+ p.setCustomValidity(""), qe({
2849
+ url: h,
2850
+ verbose: v.checked,
2753
2851
  ...e.maxSessionMs !== void 0 ? { maxSessionMs: e.maxSessionMs } : {}
2754
2852
  });
2755
2853
  }
@@ -2758,40 +2856,40 @@ function eo(e = {}) {
2758
2856
  function c() {
2759
2857
  if (!t) return;
2760
2858
  t.innerHTML = "";
2761
- const l = Le() ?? "", p = document.createElement("div");
2762
- p.className = "beacon-monitor-title";
2763
- const f = document.createElement("span");
2764
- f.className = "beacon-monitor-rec", f.setAttribute("aria-hidden", "true"), p.appendChild(f), p.appendChild(document.createTextNode(" Monitor — recording")), t.appendChild(p);
2765
- const b = document.createElement("div");
2766
- b.className = "beacon-monitor-active-url", b.title = l, b.textContent = l, t.appendChild(b);
2767
- const m = document.createElement("div");
2768
- m.className = "beacon-monitor-row";
2769
- const x = document.createElement("button");
2770
- x.type = "button", x.className = "beacon-monitor-btn stop", x.textContent = "Stop monitoring", x.addEventListener("click", () => F()), m.appendChild(x), t.appendChild(m);
2859
+ const l = Ne() ?? "", m = document.createElement("div");
2860
+ m.className = "beacon-monitor-title";
2861
+ const p = document.createElement("span");
2862
+ p.className = "beacon-monitor-rec", p.setAttribute("aria-hidden", "true"), m.appendChild(p), m.appendChild(document.createTextNode(" Monitor — recording")), t.appendChild(m);
2771
2863
  const g = document.createElement("div");
2772
- g.className = "beacon-monitor-help", g.textContent = "Events stream to the URL above. Auto-stops after 30 min.", t.appendChild(g);
2864
+ g.className = "beacon-monitor-active-url", g.title = l, g.textContent = l, t.appendChild(g);
2865
+ const u = document.createElement("div");
2866
+ u.className = "beacon-monitor-row";
2867
+ const v = document.createElement("button");
2868
+ v.type = "button", v.className = "beacon-monitor-btn stop", v.textContent = "Stop monitoring", v.addEventListener("click", () => j()), u.appendChild(v), t.appendChild(u);
2869
+ const S = document.createElement("div");
2870
+ S.className = "beacon-monitor-help", S.textContent = "Events stream to the URL above. Auto-stops after 30 min.", t.appendChild(S);
2773
2871
  }
2774
2872
  function d() {
2775
- Ae() ? c() : s();
2873
+ Te() ? c() : s();
2776
2874
  }
2777
2875
  return {
2778
2876
  name: "liveMonitor",
2779
2877
  setupOnce(l) {
2780
- Un(), Ae() && a();
2781
- const p = Ne((b, m) => {
2782
- b ? (a(), r == null || r.updateUrl(m)) : i();
2783
- }), f = () => {
2784
- i(), p();
2878
+ Wn(), Te() && r();
2879
+ const m = Me((g, u) => {
2880
+ g ? (r(), a == null || a.updateUrl(u)) : i();
2881
+ }), p = () => {
2882
+ i(), m();
2785
2883
  try {
2786
- qn();
2884
+ Vn();
2787
2885
  } catch {
2788
2886
  }
2789
2887
  };
2790
- l.signal.addEventListener("abort", f, { once: !0 });
2888
+ l.signal.addEventListener("abort", p, { once: !0 });
2791
2889
  },
2792
2890
  form() {
2793
2891
  return {
2794
- render: (l) => (t = document.createElement("div"), t.className = "beacon-monitor", l.appendChild(t), d(), n = Ne(() => d()), () => {
2892
+ render: (l) => (t = document.createElement("div"), t.className = "beacon-monitor", l.appendChild(t), d(), n = Me(() => d()), () => {
2795
2893
  n == null || n(), n = null, t = null;
2796
2894
  })
2797
2895
  };
@@ -2799,38 +2897,38 @@ function eo(e = {}) {
2799
2897
  // No capture(): liveMonitor is a side-channel, not a feedback payload contributor.
2800
2898
  };
2801
2899
  }
2802
- let A = null;
2803
- const ae = {
2900
+ let N = null;
2901
+ const ie = {
2804
2902
  "plugin:error": /* @__PURE__ */ new Set(),
2805
2903
  "submit:success": /* @__PURE__ */ new Set(),
2806
2904
  "submit:error": /* @__PURE__ */ new Set(),
2807
2905
  ready: /* @__PURE__ */ new Set()
2808
2906
  };
2809
- function to(e) {
2907
+ function ao(e) {
2810
2908
  if (typeof window > "u") return;
2811
2909
  if (!e.endpoint) throw new Error("init: endpoint is required");
2812
- Me(), jn();
2813
- const t = { ...ct(), ...e.labels ?? {} }, n = new AbortController(), o = Yn(e), r = e.position ?? "bottom-right", a = e.theme ?? "auto";
2814
- Ye(), Wn(e, r, a);
2815
- const i = document.querySelector(B);
2910
+ Re(), Xn();
2911
+ const t = { ...lt(), ...e.labels ?? {} }, n = new AbortController(), o = Jn(e), a = e.position ?? "bottom-right", r = e.theme ?? "auto";
2912
+ Xe(), Gn(e, a, r);
2913
+ const i = document.querySelector(z);
2816
2914
  if (!i)
2817
2915
  throw new Error("init: failed to acquire <launch-kit-beacon> host");
2818
2916
  if (!i.shadow)
2819
2917
  throw new Error("init: host element shadow root not initialized");
2820
- const s = lt(i.shadow), c = new st(
2918
+ const s = dt(i.shadow), c = new ct(
2821
2919
  t,
2822
2920
  ["bug", "idea", "ux", "a11y"],
2823
2921
  {
2824
2922
  onSubmit: () => {
2825
- Gn();
2923
+ eo();
2826
2924
  },
2827
- onClose: (p) => {
2828
- j("close", {}), p === "user" && Fe();
2925
+ onClose: (m) => {
2926
+ V("close", {}), m === "user" && Ve();
2829
2927
  }
2830
2928
  }
2831
2929
  );
2832
2930
  i.shadow.appendChild(c.root), i.classList.add("beacon-no-capture");
2833
- const d = Qe(o), l = {
2931
+ const d = et(o), l = {
2834
2932
  endpoint: e.endpoint,
2835
2933
  headers: e.headers,
2836
2934
  context: e.context,
@@ -2842,10 +2940,10 @@ function to(e) {
2842
2940
  hostElement: i,
2843
2941
  initAbort: n,
2844
2942
  labels: t,
2845
- debug: !!e.debug || Xn(),
2943
+ debug: !!e.debug || Qn(),
2846
2944
  healthIndicator: e.healthIndicator ?? "never",
2847
- position: r,
2848
- theme: a,
2945
+ position: a,
2946
+ theme: r,
2849
2947
  currentSubmit: null,
2850
2948
  capturedEntries: {},
2851
2949
  formValues: {},
@@ -2857,23 +2955,23 @@ function to(e) {
2857
2955
  },
2858
2956
  panelSources: []
2859
2957
  };
2860
- A = l, i.onTriggerClick = () => Fn(), d.install(
2861
- (p) => Ue(p),
2862
- (p) => ie(p)
2863
- ), $("ready", { ready: !0 }), l.debug && console.info("[beacon] ready", l.endpoint);
2958
+ N = l, i.onTriggerClick = () => Yn(), d.install(
2959
+ (m) => je(m),
2960
+ (m) => se(m)
2961
+ ), B("ready", { ready: !0 }), l.debug && console.info("[beacon] ready", l.endpoint);
2864
2962
  }
2865
- function Fn() {
2866
- const e = A;
2963
+ function Yn() {
2964
+ const e = N;
2867
2965
  e && (e.currentSubmit || (e.panelSources = e.plugins.map((t) => {
2868
2966
  if (!t.form) return null;
2869
- const n = Ue(t.name);
2967
+ const n = je(t.name);
2870
2968
  let o;
2871
2969
  try {
2872
2970
  o = t.form(n);
2873
- } catch (r) {
2874
- return ie({
2971
+ } catch (a) {
2972
+ return se({
2875
2973
  plugin: t.name,
2876
- error: r instanceof Error ? r : new Error(String(r)),
2974
+ error: a instanceof Error ? a : new Error(String(a)),
2877
2975
  at: "form"
2878
2976
  }), null;
2879
2977
  }
@@ -2884,57 +2982,57 @@ function Fn() {
2884
2982
  return (o = e.formValues[t]) == null ? void 0 : o[n];
2885
2983
  },
2886
2984
  set: (t, n, o) => {
2887
- var a;
2888
- const r = (a = e.formValues)[t] ?? (a[t] = {});
2889
- r[n] = o;
2985
+ var r;
2986
+ const a = (r = e.formValues)[t] ?? (r[t] = {});
2987
+ a[n] = o;
2890
2988
  }
2891
- }), e.dialog.open(), j("open", {})));
2989
+ }), e.dialog.open(), V("open", {})));
2892
2990
  }
2893
- function no() {
2894
- const e = A;
2991
+ function io() {
2992
+ const e = N;
2895
2993
  e && e.dialog.close("user");
2896
2994
  }
2897
- function jn() {
2995
+ function Xn() {
2898
2996
  var t;
2899
- const e = A;
2997
+ const e = N;
2900
2998
  if (e) {
2901
- e.initAbort.abort(), (t = e.currentSubmit) == null || t.abort(), e.registry.destroy(), D();
2999
+ e.initAbort.abort(), (t = e.currentSubmit) == null || t.abort(), e.registry.destroy(), R();
2902
3000
  try {
2903
3001
  e.dialog.root.remove(), e.overlayHost.layer.remove();
2904
3002
  } catch {
2905
3003
  }
2906
- e.hostElement.onTriggerClick = null, A = null;
3004
+ e.hostElement.onTriggerClick = null, N = null;
2907
3005
  }
2908
3006
  }
2909
- function oo() {
2910
- const e = A;
3007
+ function so() {
3008
+ const e = N;
2911
3009
  return e ? {
2912
3010
  ready: !0,
2913
3011
  transport: "idle",
2914
3012
  plugins: e.registry.status()
2915
3013
  } : { ready: !1, transport: "idle", plugins: {} };
2916
3014
  }
2917
- function ro(e, t) {
2918
- return ae[e].add(t), () => Vn(e, t);
3015
+ function co(e, t) {
3016
+ return ie[e].add(t), () => Kn(e, t);
2919
3017
  }
2920
- function Vn(e, t) {
2921
- ae[e].delete(t);
3018
+ function Kn(e, t) {
3019
+ ie[e].delete(t);
2922
3020
  }
2923
- function Wn(e, t, n) {
2924
- let o = document.querySelector(B);
3021
+ function Gn(e, t, n) {
3022
+ let o = document.querySelector(z);
2925
3023
  if (!o) {
2926
- o = document.createElement(B), o.setAttribute("position", t), o.setAttribute("theme", n), t === "hidden" && (o.style.position = "absolute", o.style.left = "-9999px"), (document.body ?? document.documentElement).appendChild(o);
3024
+ o = document.createElement(z), o.setAttribute("position", t), o.setAttribute("theme", n), t === "hidden" && (o.style.position = "absolute", o.style.left = "-9999px"), (document.body ?? document.documentElement).appendChild(o);
2927
3025
  return;
2928
3026
  }
2929
3027
  e.position !== void 0 && o.setAttribute("position", t), e.theme !== void 0 && o.setAttribute("theme", n);
2930
3028
  }
2931
- function Yn(e) {
2932
- return e.plugins ? e.plugins : e.defaultPlugins === !1 ? [] : Kn();
3029
+ function Jn(e) {
3030
+ return e.plugins ? e.plugins : e.defaultPlugins === !1 ? [] : Zn();
2933
3031
  }
2934
- function Kn() {
2935
- return [pt(), xt(), rn(), sn()];
3032
+ function Zn() {
3033
+ return [ft(), wt(), ln(), un()];
2936
3034
  }
2937
- function Xn() {
3035
+ function Qn() {
2938
3036
  if (typeof window > "u") return !1;
2939
3037
  try {
2940
3038
  return new URLSearchParams(window.location.search).has("lsbeacon-debug");
@@ -2942,13 +3040,13 @@ function Xn() {
2942
3040
  return !1;
2943
3041
  }
2944
3042
  }
2945
- function Ue(e) {
2946
- const t = A;
2947
- return Je(e, {
3043
+ function je(e) {
3044
+ const t = N;
3045
+ return Ze(e, {
2948
3046
  getCaptured: (o) => t == null ? void 0 : t.capturedEntries[o],
2949
3047
  getFormValues: (o) => {
2950
- var r;
2951
- return t ? (r = t.formValues)[o] ?? (r[o] = {}) : {};
3048
+ var a;
3049
+ return t ? (a = t.formValues)[o] ?? (a[o] = {}) : {};
2952
3050
  },
2953
3051
  getCaptureSignal: () => {
2954
3052
  var o;
@@ -2957,45 +3055,45 @@ function Ue(e) {
2957
3055
  getInitSignal: () => t.initAbort.signal,
2958
3056
  requestMode: async (o) => t ? t.dialog.requestMode(o) : () => {
2959
3057
  },
2960
- overlay: (o) => t ? dt(t.overlayHost, o.render) : () => {
3058
+ overlay: (o) => t ? ut(t.overlayHost, o.render) : () => {
2961
3059
  },
2962
- onLifecycle: (o, r) => {
3060
+ onLifecycle: (o, a) => {
2963
3061
  if (!t) return () => {
2964
3062
  };
2965
- const a = t.lifecycleHandlers[o];
2966
- return a.add(r), () => a.delete(r);
3063
+ const r = t.lifecycleHandlers[o];
3064
+ return r.add(a), () => r.delete(a);
2967
3065
  }
2968
3066
  });
2969
3067
  }
2970
- function j(e, t) {
2971
- const n = A;
3068
+ function V(e, t) {
3069
+ const n = N;
2972
3070
  if (n)
2973
3071
  for (const o of n.lifecycleHandlers[e])
2974
3072
  try {
2975
3073
  o(t);
2976
- } catch (r) {
2977
- n.debug && console.error("[beacon] lifecycle handler threw:", r);
3074
+ } catch (a) {
3075
+ n.debug && console.error("[beacon] lifecycle handler threw:", a);
2978
3076
  }
2979
3077
  }
2980
- function $(e, t) {
2981
- for (const n of ae[e])
3078
+ function B(e, t) {
3079
+ for (const n of ie[e])
2982
3080
  try {
2983
3081
  n(t);
2984
3082
  } catch (o) {
2985
- A != null && A.debug && console.error("[beacon] system handler threw:", o);
3083
+ N != null && N.debug && console.error("[beacon] system handler threw:", o);
2986
3084
  }
2987
3085
  }
2988
- function ie(e) {
2989
- $("plugin:error", { plugin: e.plugin, error: e.error, at: e.at });
2990
- const t = A;
3086
+ function se(e) {
3087
+ B("plugin:error", { plugin: e.plugin, error: e.error, at: e.at });
3088
+ const t = N;
2991
3089
  t && ((t.healthIndicator === "always" || t.healthIndicator === "dev" && t.debug) && t.hostElement.setHealthIndicator(!0), t.debug && console.warn(`[beacon] plugin "${e.plugin}" ${e.at} failed:`, e.error));
2992
3090
  }
2993
- function Fe() {
2994
- const e = A;
3091
+ function Ve() {
3092
+ const e = N;
2995
3093
  e && (e.dialog.resetState(), e.dialog.clearPluginPanels(), e.formValues = {});
2996
3094
  }
2997
- async function Gn() {
2998
- const e = A;
3095
+ async function eo() {
3096
+ const e = N;
2999
3097
  if (!e || e.currentSubmit) return;
3000
3098
  const t = e.dialog.getDescription().trim();
3001
3099
  if (!t) {
@@ -3007,47 +3105,47 @@ async function Gn() {
3007
3105
  try {
3008
3106
  const o = await e.registry.capture(
3009
3107
  (s) => e.capturedEntries[s],
3010
- (s) => ie(s)
3108
+ (s) => se(s)
3011
3109
  );
3012
- e.capturedEntries = o, n = Jn(e, t, o);
3013
- let r = null;
3014
- if (j("beforeSubmit", { payload: n, cancel: (s) => {
3015
- r === null && (r = s);
3016
- } }), r !== null) {
3017
- e.dialog.setSubmitting(!1), e.dialog.setStatus(`Cancelled: ${r}`, "error");
3110
+ e.capturedEntries = o, n = to(e, t, o);
3111
+ let a = null;
3112
+ if (V("beforeSubmit", { payload: n, cancel: (s) => {
3113
+ a === null && (a = s);
3114
+ } }), a !== null) {
3115
+ e.dialog.setSubmitting(!1), e.dialog.setStatus(`Cancelled: ${a}`, "error");
3018
3116
  return;
3019
3117
  }
3020
3118
  e.dialog.setStatus("Sending…");
3021
- const i = await nt(
3119
+ const i = await ot(
3022
3120
  e.endpoint,
3023
3121
  n,
3024
3122
  e.headers,
3025
3123
  e.currentSubmit.signal,
3026
3124
  e.credentials
3027
3125
  );
3028
- j("afterSubmit", { payload: n, response: i }), e.dialog.setSubmitting(!1), i.ok ? ($("submit:success", { payload: n, response: i }), e.dialog.setSubmitSucceeded(!0), e.dialog.setStatus(e.labels.sentSuccess, "success"), window.setTimeout(() => {
3029
- A === e && e.dialog.close("submitted"), Fe();
3030
- }, 1500)) : ($("submit:error", { payload: n, error: new Error(`HTTP ${i.status}`) }), e.dialog.setStatus(`Failed (${i.status})`, "error"));
3126
+ V("afterSubmit", { payload: n, response: i }), e.dialog.setSubmitting(!1), i.ok ? (B("submit:success", { payload: n, response: i }), e.dialog.setSubmitSucceeded(!0), e.dialog.setStatus(e.labels.sentSuccess, "success"), window.setTimeout(() => {
3127
+ N === e && e.dialog.close("submitted"), Ve();
3128
+ }, 1500)) : (B("submit:error", { payload: n, error: new Error(`HTTP ${i.status}`) }), e.dialog.setStatus(`Failed (${i.status})`, "error"));
3031
3129
  } catch (o) {
3032
3130
  e.dialog.setSubmitting(!1);
3033
- const r = o instanceof Error ? o : new Error(String(o));
3034
- n && $("submit:error", { payload: n, error: r }), e.dialog.setStatus(`Failed: ${r.message}`, "error");
3131
+ const a = o instanceof Error ? o : new Error(String(o));
3132
+ n && B("submit:error", { payload: n, error: a }), e.dialog.setStatus(`Failed: ${a.message}`, "error");
3035
3133
  } finally {
3036
3134
  e.currentSubmit = null;
3037
3135
  }
3038
3136
  }
3039
- function Jn(e, t, n) {
3040
- var a;
3041
- const o = Zn(), r = (a = e.context) == null ? void 0 : a.call(e);
3137
+ function to(e, t, n) {
3138
+ var r;
3139
+ const o = no(), a = (r = e.context) == null ? void 0 : r.call(e);
3042
3140
  return {
3043
3141
  description: t,
3044
3142
  severity: e.dialog.getSeverity(),
3045
3143
  metadata: o,
3046
- ...r ? { context: r } : {},
3144
+ ...a ? { context: a } : {},
3047
3145
  plugins: n
3048
3146
  };
3049
3147
  }
3050
- function Zn() {
3148
+ function no() {
3051
3149
  const e = window.location.href, t = document.referrer, n = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
3052
3150
  return {
3053
3151
  url: e,
@@ -3068,25 +3166,25 @@ function Zn() {
3068
3166
  capturedAt: (/* @__PURE__ */ new Date()).toISOString()
3069
3167
  };
3070
3168
  }
3071
- Me();
3169
+ Re();
3072
3170
  export {
3073
- Le as currentMonitorUrl,
3074
- jn as destroy,
3075
- rn as domEle,
3076
- sn as domSS,
3077
- xt as errors,
3078
- no as hide,
3079
- to as init,
3080
- Ae as isMonitorActive,
3081
- an as isPluginFailure,
3082
- eo as liveMonitor,
3083
- pt as metadata,
3084
- Vn as off,
3085
- ro as on,
3086
- Qn as probe,
3087
- Fn as show,
3088
- He as startMonitor,
3089
- oo as status,
3090
- F as stopMonitor
3171
+ Ne as currentMonitorUrl,
3172
+ Xn as destroy,
3173
+ ln as domEle,
3174
+ un as domSS,
3175
+ wt as errors,
3176
+ io as hide,
3177
+ ao as init,
3178
+ Te as isMonitorActive,
3179
+ dn as isPluginFailure,
3180
+ ro as liveMonitor,
3181
+ ft as metadata,
3182
+ Kn as off,
3183
+ co as on,
3184
+ oo as probe,
3185
+ Yn as show,
3186
+ qe as startMonitor,
3187
+ so as status,
3188
+ j as stopMonitor
3091
3189
  };
3092
3190
  //# sourceMappingURL=beacon.mjs.map