@react-perfscope/ui 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -105,6 +105,9 @@ var en = {
105
105
  sort: "Sort",
106
106
  sortChronological: "chronological",
107
107
  sortSeverity: "severity (worst first)",
108
+ filterPlaceholder: "Filter\u2026",
109
+ filterAria: "Filter signals",
110
+ filterNoMatches: "No signals match the filter.",
108
111
  groupBy: "Group by",
109
112
  groupChronological: "chronological",
110
113
  groupComponent: "component",
@@ -175,7 +178,8 @@ var en = {
175
178
  inputDelay: "input delay",
176
179
  processingTime: "processing",
177
180
  presentation: "presentation",
178
- interactionThresholdHint: "Only interactions \u226540ms are shown \u2014 INP surfaces the slow ones; fast clicks are omitted."
181
+ interactionThresholdHint: "Only interactions \u226540ms are shown \u2014 INP surfaces the slow ones; fast clicks are omitted.",
182
+ layoutShiftHint: "Every layout shift, including ones triggered by your interactions. The CLS metric excludes input-driven shifts, so this is not a CLS score."
179
183
  };
180
184
  var KIND_LABELS_KO = {
181
185
  render: "\uB80C\uB354",
@@ -195,6 +199,9 @@ var ko = {
195
199
  sort: "\uC815\uB82C",
196
200
  sortChronological: "\uC2DC\uAC04\uC21C",
197
201
  sortSeverity: "\uC2EC\uAC01\uB3C4\uC21C (\uB192\uC740 \uAC83\uBD80\uD130)",
202
+ filterPlaceholder: "\uD544\uD130\u2026",
203
+ filterAria: "\uC2DC\uADF8\uB110 \uD544\uD130",
204
+ filterNoMatches: "\uD544\uD130\uC640 \uC77C\uCE58\uD558\uB294 \uC2DC\uADF8\uB110\uC774 \uC5C6\uC5B4\uC694.",
198
205
  groupBy: "\uADF8\uB8F9\uD654",
199
206
  groupChronological: "\uC2DC\uAC04\uC21C",
200
207
  groupComponent: "\uCEF4\uD3EC\uB10C\uD2B8",
@@ -265,7 +272,8 @@ var ko = {
265
272
  inputDelay: "\uC785\uB825 \uC9C0\uC5F0",
266
273
  processingTime: "\uCC98\uB9AC",
267
274
  presentation: "\uD654\uBA74 \uBC18\uC601",
268
- interactionThresholdHint: "40ms \uC774\uC0C1 \uAC78\uB9B0 \uC0C1\uD638\uC791\uC6A9\uB9CC \uD45C\uC2DC\uB3FC\uC694 \u2014 \uB290\uB9B0 \uAC83\uB9CC INP\uB85C \uC7A1\uACE0, \uBE60\uB978 \uD074\uB9AD\uC740 \uC0DD\uB7B5\uD574\uC694."
275
+ interactionThresholdHint: "40ms \uC774\uC0C1 \uAC78\uB9B0 \uC0C1\uD638\uC791\uC6A9\uB9CC \uD45C\uC2DC\uB3FC\uC694 \u2014 \uB290\uB9B0 \uAC83\uB9CC INP\uB85C \uC7A1\uACE0, \uBE60\uB978 \uD074\uB9AD\uC740 \uC0DD\uB7B5\uD574\uC694.",
276
+ layoutShiftHint: "\uC0AC\uC6A9\uC790 \uC778\uD130\uB799\uC158\uC73C\uB85C \uC0DD\uAE34 \uAC83\uAE4C\uC9C0 \uD3EC\uD568\uD55C \uBAA8\uB4E0 \uB808\uC774\uC544\uC6C3 \uC2DC\uD504\uD2B8\uC608\uC694. CLS \uC9C0\uD45C\uB294 \uC785\uB825\uC73C\uB85C \uC778\uD55C \uC2DC\uD504\uD2B8\uB97C \uC81C\uC678\uD558\uBBC0\uB85C, \uC774\uAC74 CLS \uC810\uC218\uAC00 \uC544\uB2C8\uC5D0\uC694."
269
277
  };
270
278
  var STRINGS = { en, ko };
271
279
  function isLang(v) {
@@ -1887,8 +1895,218 @@ function RenderInsights({ signals, onSelect }) {
1887
1895
  );
1888
1896
  }
1889
1897
 
1890
- // src/panel.tsx
1898
+ // src/inp-episode.tsx
1899
+ var import_core2 = require("@react-perfscope/core");
1900
+
1901
+ // src/episode-shared.tsx
1891
1902
  var import_jsx_runtime5 = require("preact/jsx-runtime");
1903
+ function memberLabel(m) {
1904
+ const s = m.signal;
1905
+ if (s.kind === "render") return `${s.component} (${s.reason})`;
1906
+ if (s.kind === "forced-reflow") {
1907
+ const top = s.stack[0];
1908
+ return top ? `forced reflow \xB7 ${top.file}:${top.line}` : "forced reflow";
1909
+ }
1910
+ return `layout shift ${s.value.toFixed(3)}`;
1911
+ }
1912
+ function EpisodeMemberRow({ member }) {
1913
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1914
+ "div",
1915
+ {
1916
+ "data-member-kind": member.signal.kind,
1917
+ style: { display: "flex", alignItems: "center", gap: "6px", padding: "1px 0", color: "#ccc" },
1918
+ children: [
1919
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: memberLabel(member) }),
1920
+ member.causedBy && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { flex: "0 0 auto", color: "#888" }, children: [
1921
+ "\u2190 ",
1922
+ member.causedBy.component
1923
+ ] }),
1924
+ member.confidence === "caused" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1925
+ "span",
1926
+ {
1927
+ style: {
1928
+ flex: "0 0 auto",
1929
+ fontSize: "9px",
1930
+ color: "#e0a030",
1931
+ border: "1px solid #5a4410",
1932
+ borderRadius: "3px",
1933
+ padding: "0 4px"
1934
+ },
1935
+ children: "caused"
1936
+ }
1937
+ )
1938
+ ]
1939
+ }
1940
+ );
1941
+ }
1942
+ function EpisodeMemberList({ members }) {
1943
+ if (members.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#555" }, children: "\u2014" });
1944
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: members.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EpisodeMemberRow, { member: m }, i)) });
1945
+ }
1946
+
1947
+ // src/inp-episode.tsx
1948
+ var import_jsx_runtime6 = require("preact/jsx-runtime");
1949
+ var PHASES = [
1950
+ { phase: "input-delay", labelKey: "inputDelay" },
1951
+ { phase: "processing", labelKey: "processingTime" },
1952
+ { phase: "presentation", labelKey: "presentation" }
1953
+ ];
1954
+ function worstInteractionEpisode(signals) {
1955
+ let worst = null;
1956
+ for (const ep of (0, import_core2.correlate)(signals)) {
1957
+ if (ep.anchor.kind !== "interaction") continue;
1958
+ if (!worst || ep.anchor.duration > worst.anchor.duration) worst = ep;
1959
+ }
1960
+ return worst;
1961
+ }
1962
+ function phaseMs(episode, phase) {
1963
+ const a = episode.anchor;
1964
+ if (a.kind !== "interaction") return 0;
1965
+ return phase === "input-delay" ? a.inputDelay : phase === "processing" ? a.processing : a.presentation;
1966
+ }
1967
+ function InpEpisode({ signals }) {
1968
+ const { t } = useI18n();
1969
+ const episode = worstInteractionEpisode(signals);
1970
+ if (!episode || episode.anchor.kind !== "interaction") return null;
1971
+ const a = episode.anchor;
1972
+ const target = a.target ? ` on ${a.target}` : "";
1973
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1974
+ "div",
1975
+ {
1976
+ "data-inp-episode": true,
1977
+ style: {
1978
+ margin: "0 0 8px",
1979
+ border: "1px solid #1f1f1f",
1980
+ borderRadius: "6px",
1981
+ background: "#121212",
1982
+ fontFamily: "SF Mono, Menlo, Consolas, monospace",
1983
+ fontSize: "11px",
1984
+ overflow: "hidden"
1985
+ },
1986
+ children: [
1987
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { padding: "6px 8px", borderBottom: "1px solid #1f1f1f", color: "#ddd" }, children: [
1988
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("strong", { children: a.eventType }),
1989
+ target,
1990
+ " \u2014 ",
1991
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("strong", { children: [
1992
+ Math.round(a.duration),
1993
+ "ms"
1994
+ ] }),
1995
+ " ",
1996
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: { color: "#888" }, children: "INP" })
1997
+ ] }),
1998
+ PHASES.map(({ phase, labelKey }) => {
1999
+ const members = episode.members.filter((m) => m.phase === phase);
2000
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
2001
+ "div",
2002
+ {
2003
+ "data-inp-phase": phase,
2004
+ style: { display: "flex", gap: "8px", padding: "5px 8px", borderTop: "1px solid #1a1a1a" },
2005
+ children: [
2006
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { flex: "0 0 92px", color: "#aaa" }, children: [
2007
+ t[labelKey],
2008
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { color: "#666", fontSize: "10px" }, children: [
2009
+ Math.round(phaseMs(episode, phase)),
2010
+ "ms"
2011
+ ] })
2012
+ ] }),
2013
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EpisodeMemberList, { members }) })
2014
+ ]
2015
+ },
2016
+ phase
2017
+ );
2018
+ })
2019
+ ]
2020
+ }
2021
+ );
2022
+ }
2023
+
2024
+ // src/long-task-episode.tsx
2025
+ var import_core3 = require("@react-perfscope/core");
2026
+ var import_jsx_runtime7 = require("preact/jsx-runtime");
2027
+ function worstLongTaskEpisode(signals) {
2028
+ let worst = null;
2029
+ for (const ep of (0, import_core3.correlate)(signals)) {
2030
+ if (ep.anchor.kind !== "long-task") continue;
2031
+ if (!worst || ep.anchor.duration > worst.anchor.duration) worst = ep;
2032
+ }
2033
+ return worst;
2034
+ }
2035
+ function LongTaskEpisode({ signals }) {
2036
+ const { t } = useI18n();
2037
+ const episode = worstLongTaskEpisode(signals);
2038
+ if (!episode || episode.anchor.kind !== "long-task") return null;
2039
+ if (episode.members.length === 0) return null;
2040
+ const a = episode.anchor;
2041
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2042
+ "div",
2043
+ {
2044
+ "data-long-task-episode": true,
2045
+ style: {
2046
+ margin: "0 0 8px",
2047
+ border: "1px solid #1f1f1f",
2048
+ borderRadius: "6px",
2049
+ background: "#121212",
2050
+ fontFamily: "SF Mono, Menlo, Consolas, monospace",
2051
+ fontSize: "11px",
2052
+ overflow: "hidden"
2053
+ },
2054
+ children: [
2055
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { padding: "6px 8px", borderBottom: "1px solid #1f1f1f", color: "#ddd" }, children: [
2056
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("strong", { children: t.kindLabel("long-task") }),
2057
+ " \u2014 ",
2058
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("strong", { children: [
2059
+ Math.round(a.duration),
2060
+ "ms"
2061
+ ] })
2062
+ ] }),
2063
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { padding: "5px 8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(EpisodeMemberList, { members: episode.members }) })
2064
+ ]
2065
+ }
2066
+ );
2067
+ }
2068
+
2069
+ // src/filter.ts
2070
+ function signalSearchText(signal) {
2071
+ switch (signal.kind) {
2072
+ case "render": {
2073
+ const parts = [signal.component];
2074
+ if (signal.changedProps) parts.push(...signal.changedProps);
2075
+ if (signal.members) for (const m of signal.members) parts.push(m.component);
2076
+ return parts.join(" ").toLowerCase();
2077
+ }
2078
+ case "network":
2079
+ return signal.url.toLowerCase();
2080
+ case "web-vital":
2081
+ return signal.name.toLowerCase();
2082
+ case "interaction":
2083
+ return [signal.eventType, signal.target ?? ""].join(" ").toLowerCase();
2084
+ case "forced-reflow": {
2085
+ const f = signal.stack[0];
2086
+ return f ? [f.fnName ?? "", f.file].join(" ").toLowerCase() : "";
2087
+ }
2088
+ case "long-task": {
2089
+ const parts = [];
2090
+ if (signal.scripts)
2091
+ for (const s of signal.scripts) parts.push(s.sourceFunctionName, s.invoker, s.sourceURL);
2092
+ if (signal.attribution)
2093
+ for (const a of signal.attribution) parts.push(a.frame.fnName ?? "", a.frame.file);
2094
+ return parts.join(" ").toLowerCase();
2095
+ }
2096
+ case "layout-shift":
2097
+ return "layout-shift";
2098
+ default:
2099
+ return "";
2100
+ }
2101
+ }
2102
+ function signalMatchesFilter(signal, query) {
2103
+ const q = query.trim().toLowerCase();
2104
+ if (!q) return true;
2105
+ return signalSearchText(signal).includes(q);
2106
+ }
2107
+
2108
+ // src/panel.tsx
2109
+ var import_jsx_runtime8 = require("preact/jsx-runtime");
1892
2110
  var RENDER_REASON_COLOR = {
1893
2111
  mount: "#5ac8fa",
1894
2112
  state: "#34c759",
@@ -1912,7 +2130,7 @@ function RenderReasonTag({ reason, changedProps }) {
1912
2130
  const color = RENDER_REASON_COLOR[reason];
1913
2131
  const label = renderReasonLabel(t, reason);
1914
2132
  const keys = reason === "props" && changedProps && changedProps.length > 0 ? `: ${changedProps.join(", ")}` : "";
1915
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2133
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1916
2134
  "span",
1917
2135
  {
1918
2136
  style: {
@@ -1968,7 +2186,7 @@ var WEB_VITAL_UNIT2 = {
1968
2186
  };
1969
2187
  function RatingDot({ rating }) {
1970
2188
  const { t } = useI18n();
1971
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2189
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1972
2190
  "span",
1973
2191
  {
1974
2192
  "data-rating": rating,
@@ -2026,18 +2244,18 @@ var monoStyle = {
2026
2244
  };
2027
2245
  function LayoutShiftDetail({ s }) {
2028
2246
  const { t } = useI18n();
2029
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2030
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2031
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.value }),
2032
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: s.value.toFixed(4) })
2247
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2248
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2249
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.value }),
2250
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: s.value.toFixed(4) })
2033
2251
  ] }),
2034
- s.sources.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: "#666" }, children: t.noSourceRects }) : s.sources.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...detailRowStyle, ...monoStyle }, children: [
2035
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: "#888" }, children: [
2252
+ s.sources.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "#666" }, children: t.noSourceRects }) : s.sources.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { ...detailRowStyle, ...monoStyle }, children: [
2253
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: "#888" }, children: [
2036
2254
  t.rect,
2037
2255
  " ",
2038
2256
  i + 1
2039
2257
  ] }),
2040
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2258
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2041
2259
  "x=",
2042
2260
  r.x.toFixed(0),
2043
2261
  " y=",
@@ -2052,25 +2270,25 @@ function LayoutShiftDetail({ s }) {
2052
2270
  }
2053
2271
  function NetworkDetail({ s }) {
2054
2272
  const { t } = useI18n();
2055
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2056
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { ...detailRowStyle, ...monoStyle, wordBreak: "break-all" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: s.url }) }),
2057
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2058
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.started }),
2059
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2273
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2274
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { ...detailRowStyle, ...monoStyle, wordBreak: "break-all" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: s.url }) }),
2275
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2276
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.started }),
2277
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2060
2278
  s.startedAt.toFixed(0),
2061
2279
  "ms"
2062
2280
  ] })
2063
2281
  ] }),
2064
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2065
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2066
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2282
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2283
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2284
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2067
2285
  s.duration.toFixed(0),
2068
2286
  "ms"
2069
2287
  ] })
2070
2288
  ] }),
2071
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2072
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.size }),
2073
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2289
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2290
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.size }),
2291
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2074
2292
  (s.size / 1024).toFixed(2),
2075
2293
  "KB (",
2076
2294
  s.size,
@@ -2079,69 +2297,69 @@ function NetworkDetail({ s }) {
2079
2297
  ")"
2080
2298
  ] })
2081
2299
  ] }),
2082
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2083
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.renderBlocking }),
2084
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: s.blocking ? t.yes : t.no })
2300
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2301
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.renderBlocking }),
2302
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: s.blocking ? t.yes : t.no })
2085
2303
  ] })
2086
2304
  ] });
2087
2305
  }
2088
2306
  function WebVitalDetail({ s }) {
2089
2307
  const { t } = useI18n();
2090
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2091
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2092
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.metric }),
2093
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: s.name })
2308
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2309
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2310
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.metric }),
2311
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: s.name })
2094
2312
  ] }),
2095
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2096
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.value }),
2097
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: s.value.toFixed(2) })
2313
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2314
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.value }),
2315
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: s.value.toFixed(2) })
2098
2316
  ] })
2099
2317
  ] });
2100
2318
  }
2101
2319
  function RenderDetail({ s }) {
2102
2320
  const { t } = useI18n();
2103
2321
  if (s.members && s.members.length > 0) {
2104
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2105
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2106
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2107
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2322
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2323
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2324
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2325
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2108
2326
  s.duration.toFixed(3),
2109
2327
  "ms"
2110
2328
  ] })
2111
2329
  ] }),
2112
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2113
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.at }),
2114
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2330
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2331
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.at }),
2332
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2115
2333
  s.at.toFixed(2),
2116
2334
  "ms"
2117
2335
  ] })
2118
2336
  ] }),
2119
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { marginTop: "6px" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CascadeMembers, { members: s.members }) })
2337
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginTop: "6px" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CascadeMembers, { members: s.members }) })
2120
2338
  ] });
2121
2339
  }
2122
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2123
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2124
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.component }),
2125
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: s.component })
2340
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2341
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2342
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.component }),
2343
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: s.component })
2126
2344
  ] }),
2127
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2128
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.reason }),
2129
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RenderReasonTag, { reason: s.reason, changedProps: s.changedProps })
2345
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2346
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.reason }),
2347
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RenderReasonTag, { reason: s.reason, changedProps: s.changedProps })
2130
2348
  ] }),
2131
- s.reason === "props" && s.changedProps && s.changedProps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...detailRowStyle, ...monoStyle }, children: [
2132
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.changedProps }),
2133
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: s.changedProps.join(", ") })
2349
+ s.reason === "props" && s.changedProps && s.changedProps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { ...detailRowStyle, ...monoStyle }, children: [
2350
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.changedProps }),
2351
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: s.changedProps.join(", ") })
2134
2352
  ] }),
2135
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2136
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2137
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2353
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2354
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2355
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2138
2356
  s.duration.toFixed(3),
2139
2357
  "ms"
2140
2358
  ] })
2141
2359
  ] }),
2142
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2143
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.at }),
2144
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2360
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2361
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.at }),
2362
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2145
2363
  s.at.toFixed(2),
2146
2364
  "ms"
2147
2365
  ] })
@@ -2171,11 +2389,11 @@ function StackFrames({
2171
2389
  cancelled = true;
2172
2390
  };
2173
2391
  }, [raw]);
2174
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
2175
- resolving && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: "#666", fontSize: "10px", marginBottom: "4px" }, children: t.resolvingSourceMaps }),
2176
- frames.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: "#666" }, children: t.noStack }) : frames.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...detailRowStyle, ...monoStyle }, children: [
2177
- f.fnName ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: f.fnName }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#666" }, children: t.anonymous }),
2178
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: "#888" }, children: [
2392
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
2393
+ resolving && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "#666", fontSize: "10px", marginBottom: "4px" }, children: t.resolvingSourceMaps }),
2394
+ frames.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "#666" }, children: t.noStack }) : frames.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { ...detailRowStyle, ...monoStyle }, children: [
2395
+ f.fnName ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: f.fnName }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: "#666" }, children: t.anonymous }),
2396
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: "#888" }, children: [
2179
2397
  f.file,
2180
2398
  ":",
2181
2399
  f.line,
@@ -2189,7 +2407,7 @@ function ForcedReflowDetail({
2189
2407
  s,
2190
2408
  resolveFrame
2191
2409
  }) {
2192
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { paddingLeft: "12px" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StackFrames, { raw: s.stack, resolveFrame }) });
2410
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { paddingLeft: "12px" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(StackFrames, { raw: s.stack, resolveFrame }) });
2193
2411
  }
2194
2412
  function HotFunctions({
2195
2413
  attribution,
@@ -2208,26 +2426,26 @@ function HotFunctions({
2208
2426
  cancelled = true;
2209
2427
  };
2210
2428
  }, [attribution]);
2211
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { marginTop: "6px" }, children: [
2212
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { ...detailLabelStyle, textTransform: "uppercase", fontSize: "10px", letterSpacing: "0.5px", marginBottom: "1px", color: "#ff9f0a" }, children: t.hotFunctions }),
2213
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: "#666", fontSize: "10px", marginBottom: "4px" }, children: t.hotFunctionsHint }),
2429
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { marginTop: "6px" }, children: [
2430
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { ...detailLabelStyle, textTransform: "uppercase", fontSize: "10px", letterSpacing: "0.5px", marginBottom: "1px", color: "#ff9f0a" }, children: t.hotFunctions }),
2431
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "#666", fontSize: "10px", marginBottom: "4px" }, children: t.hotFunctionsHint }),
2214
2432
  attribution.map((a, i) => {
2215
2433
  const f = frames[i] ?? a.frame;
2216
2434
  const pct = Math.round(a.selfRatio * 100);
2217
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...monoStyle, padding: "3px 0", borderTop: i > 0 ? "1px dashed #1f1f1f" : "none" }, children: [
2218
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
2219
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#ff9f0a", fontWeight: 600 }, children: f.fnName || /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#666" }, children: t.anonymous }) }),
2220
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: SEVERITY_COLOR.medium, marginLeft: "6px" }, children: [
2435
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { ...monoStyle, padding: "3px 0", borderTop: i > 0 ? "1px dashed #1f1f1f" : "none" }, children: [
2436
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
2437
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: "#ff9f0a", fontWeight: 600 }, children: f.fnName || /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: "#666" }, children: t.anonymous }) }),
2438
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: SEVERITY_COLOR.medium, marginLeft: "6px" }, children: [
2221
2439
  pct,
2222
2440
  "%"
2223
2441
  ] }),
2224
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: "#666", marginLeft: "6px" }, children: [
2442
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: "#666", marginLeft: "6px" }, children: [
2225
2443
  "(",
2226
2444
  a.sampleCount,
2227
2445
  ")"
2228
2446
  ] })
2229
2447
  ] }),
2230
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { color: "#888", wordBreak: "break-all" }, children: [
2448
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { color: "#888", wordBreak: "break-all" }, children: [
2231
2449
  f.file,
2232
2450
  ":",
2233
2451
  f.line,
@@ -2244,59 +2462,59 @@ function LongTaskDetail({
2244
2462
  }) {
2245
2463
  const { t } = useI18n();
2246
2464
  const scripts = s.scripts ? [...s.scripts].sort((a, b) => b.duration - a.duration) : [];
2247
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2248
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2249
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.started }),
2250
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2465
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2466
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2467
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.started }),
2468
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2251
2469
  s.at.toFixed(2),
2252
2470
  "ms"
2253
2471
  ] })
2254
2472
  ] }),
2255
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2256
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.ended }),
2257
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2473
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2474
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.ended }),
2475
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2258
2476
  (s.at + s.duration).toFixed(2),
2259
2477
  "ms"
2260
2478
  ] })
2261
2479
  ] }),
2262
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2263
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2264
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2480
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2481
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2482
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2265
2483
  s.duration.toFixed(2),
2266
2484
  "ms"
2267
2485
  ] })
2268
2486
  ] }),
2269
- typeof s.blockingDuration === "number" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2270
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.blockingTime }),
2271
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2487
+ typeof s.blockingDuration === "number" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2488
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.blockingTime }),
2489
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2272
2490
  s.blockingDuration.toFixed(2),
2273
2491
  "ms"
2274
2492
  ] })
2275
2493
  ] }),
2276
- s.attribution !== void 0 && s.attribution.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HotFunctions, { attribution: s.attribution, resolveFrame }),
2277
- s.scripts !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { marginTop: "6px" }, children: [
2278
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { ...detailLabelStyle, textTransform: "uppercase", fontSize: "10px", letterSpacing: "0.5px", marginBottom: "4px" }, children: t.scripts }),
2279
- scripts.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: "#666" }, children: t.noScripts }) : scripts.map((script, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...monoStyle, padding: "3px 0", borderTop: i > 0 ? "1px dashed #1f1f1f" : "none" }, children: [
2280
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
2281
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: script.sourceFunctionName || /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#666" }, children: t.anonymous }) }),
2282
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#5ac8fa", marginLeft: "6px" }, children: script.invokerType }),
2283
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: SEVERITY_COLOR.medium, marginLeft: "6px" }, children: [
2494
+ s.attribution !== void 0 && s.attribution.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(HotFunctions, { attribution: s.attribution, resolveFrame }),
2495
+ s.scripts !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { marginTop: "6px" }, children: [
2496
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { ...detailLabelStyle, textTransform: "uppercase", fontSize: "10px", letterSpacing: "0.5px", marginBottom: "4px" }, children: t.scripts }),
2497
+ scripts.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "#666" }, children: t.noScripts }) : scripts.map((script, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { ...monoStyle, padding: "3px 0", borderTop: i > 0 ? "1px dashed #1f1f1f" : "none" }, children: [
2498
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
2499
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: script.sourceFunctionName || /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: "#666" }, children: t.anonymous }) }),
2500
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: "#5ac8fa", marginLeft: "6px" }, children: script.invokerType }),
2501
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: SEVERITY_COLOR.medium, marginLeft: "6px" }, children: [
2284
2502
  script.duration.toFixed(1),
2285
2503
  "ms"
2286
2504
  ] })
2287
2505
  ] }),
2288
- script.sourceURL && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { color: "#888", wordBreak: "break-all" }, children: [
2506
+ script.sourceURL && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { color: "#888", wordBreak: "break-all" }, children: [
2289
2507
  script.sourceURL,
2290
2508
  script.charPosition >= 0 ? `@${script.charPosition}` : ""
2291
2509
  ] }),
2292
- script.invoker && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { color: "#666" }, children: [
2510
+ script.invoker && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { color: "#666" }, children: [
2293
2511
  t.invoker,
2294
2512
  ": ",
2295
2513
  script.invoker
2296
2514
  ] })
2297
2515
  ] }, i))
2298
2516
  ] }),
2299
- s.scripts === void 0 && s.stack.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { marginTop: "4px" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StackFrames, { raw: s.stack, resolveFrame, limit: 5 }) })
2517
+ s.scripts === void 0 && s.stack.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginTop: "4px" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(StackFrames, { raw: s.stack, resolveFrame, limit: 5 }) })
2300
2518
  ] });
2301
2519
  }
2302
2520
  var INTERACTION_PHASE_COLOR = { input: "#8e8e93", processing: "#5ac8fa", presentation: "#34c759" };
@@ -2311,33 +2529,33 @@ function InteractionDetail({
2311
2529
  { label: t.processingTime, ms: s.processing, color: INTERACTION_PHASE_COLOR.processing },
2312
2530
  { label: t.presentation, ms: s.presentation, color: INTERACTION_PHASE_COLOR.presentation }
2313
2531
  ];
2314
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2315
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2316
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.interactionEvent }),
2317
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2532
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
2533
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2534
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.interactionEvent }),
2535
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2318
2536
  s.eventType,
2319
2537
  s.target ? ` \xB7 ${s.target}` : ""
2320
2538
  ] })
2321
2539
  ] }),
2322
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2323
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2324
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2540
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2541
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: detailLabelStyle, children: t.duration }),
2542
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2325
2543
  s.duration.toFixed(0),
2326
2544
  "ms"
2327
2545
  ] })
2328
2546
  ] }),
2329
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { display: "flex", height: "10px", borderRadius: "3px", overflow: "hidden", margin: "5px 0 7px", background: "#1a1a1a" }, children: phases.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { width: `${p.ms / total * 100}%`, background: p.color } }, i)) }),
2330
- phases.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: detailRowStyle, children: [
2331
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { ...detailLabelStyle, display: "inline-flex", alignItems: "center", gap: "5px" }, children: [
2332
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { width: "7px", height: "7px", borderRadius: "2px", background: p.color, flex: "0 0 7px" } }),
2547
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", height: "10px", borderRadius: "3px", overflow: "hidden", margin: "5px 0 7px", background: "#1a1a1a" }, children: phases.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { width: `${p.ms / total * 100}%`, background: p.color } }, i)) }),
2548
+ phases.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: detailRowStyle, children: [
2549
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { ...detailLabelStyle, display: "inline-flex", alignItems: "center", gap: "5px" }, children: [
2550
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { width: "7px", height: "7px", borderRadius: "2px", background: p.color, flex: "0 0 7px" } }),
2333
2551
  p.label
2334
2552
  ] }),
2335
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2553
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2336
2554
  p.ms.toFixed(0),
2337
2555
  "ms"
2338
2556
  ] })
2339
2557
  ] }, i)),
2340
- s.attribution !== void 0 && s.attribution.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HotFunctions, { attribution: s.attribution, resolveFrame })
2558
+ s.attribution !== void 0 && s.attribution.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(HotFunctions, { attribution: s.attribution, resolveFrame })
2341
2559
  ] });
2342
2560
  }
2343
2561
  function SignalDetail({
@@ -2346,24 +2564,24 @@ function SignalDetail({
2346
2564
  }) {
2347
2565
  switch (s.kind) {
2348
2566
  case "forced-reflow":
2349
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ForcedReflowDetail, { s, resolveFrame });
2567
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ForcedReflowDetail, { s, resolveFrame });
2350
2568
  case "layout-shift":
2351
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LayoutShiftDetail, { s });
2569
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LayoutShiftDetail, { s });
2352
2570
  case "long-task":
2353
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LongTaskDetail, { s, resolveFrame });
2571
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LongTaskDetail, { s, resolveFrame });
2354
2572
  case "interaction":
2355
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InteractionDetail, { s, resolveFrame });
2573
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(InteractionDetail, { s, resolveFrame });
2356
2574
  case "network":
2357
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(NetworkDetail, { s });
2575
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NetworkDetail, { s });
2358
2576
  case "web-vital":
2359
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(WebVitalDetail, { s });
2577
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(WebVitalDetail, { s });
2360
2578
  case "render":
2361
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RenderDetail, { s });
2579
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RenderDetail, { s });
2362
2580
  }
2363
2581
  }
2364
2582
  function SeverityDot({ sev, title }) {
2365
2583
  const { t } = useI18n();
2366
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2584
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2367
2585
  "span",
2368
2586
  {
2369
2587
  "data-severity": sev,
@@ -2386,9 +2604,9 @@ function SummaryLine({ signal }) {
2386
2604
  if (signal.kind === "web-vital") {
2387
2605
  const rating = webVitalRating(signal.name, signal.value);
2388
2606
  const unit = WEB_VITAL_UNIT2[signal.name];
2389
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2390
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RatingDot, { rating }),
2391
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: signal.name }),
2607
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2608
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RatingDot, { rating }),
2609
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: signal.name }),
2392
2610
  ": ",
2393
2611
  signal.value.toFixed(2),
2394
2612
  unit
@@ -2397,12 +2615,12 @@ function SummaryLine({ signal }) {
2397
2615
  const sev = severityForSignal(signal);
2398
2616
  const color = SEVERITY_COLOR[sev];
2399
2617
  if (signal.kind === "long-task") {
2400
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2618
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2401
2619
  "@ ",
2402
2620
  signal.at.toFixed(1),
2403
2621
  "ms \u2022 duration",
2404
2622
  " ",
2405
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color }, children: [
2623
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color }, children: [
2406
2624
  signal.duration.toFixed(1),
2407
2625
  "ms"
2408
2626
  ] })
@@ -2410,59 +2628,59 @@ function SummaryLine({ signal }) {
2410
2628
  }
2411
2629
  if (signal.kind === "forced-reflow") {
2412
2630
  const count = signal.count ?? 1;
2413
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2631
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2414
2632
  "@ ",
2415
2633
  signal.at.toFixed(1),
2416
2634
  "ms \u2022 duration",
2417
2635
  " ",
2418
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color }, children: [
2636
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color }, children: [
2419
2637
  signal.duration.toFixed(2),
2420
2638
  "ms"
2421
2639
  ] }),
2422
- count > 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: "#888" }, children: [
2640
+ count > 1 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: "#888" }, children: [
2423
2641
  " \u2022 ",
2424
2642
  t.coalescedReads(count)
2425
2643
  ] })
2426
2644
  ] });
2427
2645
  }
2428
2646
  if (signal.kind === "layout-shift") {
2429
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2647
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2430
2648
  "@ ",
2431
2649
  signal.at.toFixed(1),
2432
2650
  "ms \u2022 value",
2433
2651
  " ",
2434
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color }, children: formatCls(signal.value) }),
2652
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color }, children: formatCls(signal.value) }),
2435
2653
  " \u2022 ",
2436
2654
  t.sourceCount(signal.sources.length)
2437
2655
  ] });
2438
2656
  }
2439
2657
  if (signal.kind === "render") {
2440
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px" }, children: [
2441
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: signal.component }),
2442
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RenderReasonTag, { reason: signal.reason, changedProps: signal.changedProps }),
2443
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color }, children: [
2658
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px" }, children: [
2659
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: signal.component }),
2660
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RenderReasonTag, { reason: signal.reason, changedProps: signal.changedProps }),
2661
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color }, children: [
2444
2662
  signal.duration.toFixed(2),
2445
2663
  "ms"
2446
2664
  ] }),
2447
- signal.count && signal.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#888" }, children: t.cascadeComponents(signal.count) })
2665
+ signal.count && signal.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: "#888" }, children: t.cascadeComponents(signal.count) })
2448
2666
  ] });
2449
2667
  }
2450
2668
  if (signal.kind === "network") {
2451
2669
  const url = signal.url.length > 60 ? signal.url.slice(0, 57) + "..." : signal.url;
2452
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2670
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
2453
2671
  url,
2454
2672
  " \u2022 ",
2455
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color }, children: [
2673
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color }, children: [
2456
2674
  signal.duration.toFixed(0),
2457
2675
  "ms"
2458
2676
  ] }),
2459
- signal.blocking && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: SEVERITY_COLOR.high }, children: [
2677
+ signal.blocking && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: SEVERITY_COLOR.high }, children: [
2460
2678
  " \u2022 ",
2461
2679
  t.blocking
2462
2680
  ] })
2463
2681
  ] });
2464
2682
  }
2465
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: summary(signal) });
2683
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: summary(signal) });
2466
2684
  }
2467
2685
  function tabSupportsGrouping(kind) {
2468
2686
  return kind === "render" || kind === "forced-reflow";
@@ -2536,7 +2754,7 @@ function groupSignals(signals, mode, kind) {
2536
2754
  function SignalRow({ signal, expanded, onToggleExpand, onHoverGeometry, resolveFrame }) {
2537
2755
  const hasGeometry = signal.kind === "layout-shift" && signal.sources.length > 0;
2538
2756
  const sev = severityForSignal(signal);
2539
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2757
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2540
2758
  "li",
2541
2759
  {
2542
2760
  "aria-expanded": expanded,
@@ -2558,22 +2776,22 @@ function SignalRow({ signal, expanded, onToggleExpand, onHoverGeometry, resolveF
2558
2776
  userSelect: "none"
2559
2777
  },
2560
2778
  children: [
2561
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
2562
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#888", width: "10px" }, children: expanded ? "\u25BC" : "\u25B6" }),
2563
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SeverityDot, { sev }),
2564
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SummaryLine, { signal })
2779
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
2780
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: "#888", width: "10px" }, children: expanded ? "\u25BC" : "\u25B6" }),
2781
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SeverityDot, { sev }),
2782
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SummaryLine, { signal })
2565
2783
  ] }),
2566
- expanded && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { marginTop: "6px", paddingTop: "6px", borderTop: "1px dashed #2a2a2a" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SignalDetail, { s: signal, resolveFrame }) })
2784
+ expanded && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginTop: "6px", paddingTop: "6px", borderTop: "1px dashed #2a2a2a" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SignalDetail, { s: signal, resolveFrame }) })
2567
2785
  ]
2568
2786
  }
2569
2787
  );
2570
2788
  }
2571
2789
  function CascadeMembers({ members }) {
2572
2790
  const minDepth = members.reduce((m, s) => Math.min(m, s.depth), Infinity);
2573
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: members.map((m, i) => {
2791
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children: members.map((m, i) => {
2574
2792
  const indent = (m.depth - minDepth) * 14;
2575
2793
  const isCascade = m.reason === "parent";
2576
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2794
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2577
2795
  "div",
2578
2796
  {
2579
2797
  style: {
@@ -2584,10 +2802,10 @@ function CascadeMembers({ members }) {
2584
2802
  gap: "6px"
2585
2803
  },
2586
2804
  children: [
2587
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: isCascade ? RENDER_REASON_COLOR.parent : "#555" }, children: m.depth > minDepth ? "\u2514" : "\u2022" }),
2588
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: m.component }),
2589
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RenderReasonTag, { reason: m.reason, changedProps: m.changedProps }),
2590
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: "#888" }, children: [
2805
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: isCascade ? RENDER_REASON_COLOR.parent : "#555" }, children: m.depth > minDepth ? "\u2514" : "\u2022" }),
2806
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: m.component }),
2807
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RenderReasonTag, { reason: m.reason, changedProps: m.changedProps }),
2808
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: "#888" }, children: [
2591
2809
  m.duration.toFixed(2),
2592
2810
  "ms"
2593
2811
  ] })
@@ -2601,7 +2819,7 @@ function LanguageToggle() {
2601
2819
  const { lang, setLang, t } = useI18n();
2602
2820
  const langs = ["en", "ko"];
2603
2821
  const labels = { en: "EN", ko: "\uD55C" };
2604
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2822
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2605
2823
  "div",
2606
2824
  {
2607
2825
  role: "group",
@@ -2614,7 +2832,7 @@ function LanguageToggle() {
2614
2832
  },
2615
2833
  children: langs.map((l) => {
2616
2834
  const active = lang === l;
2617
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2835
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2618
2836
  "button",
2619
2837
  {
2620
2838
  type: "button",
@@ -2652,6 +2870,7 @@ function Panel(props) {
2652
2870
  const [expandedKey, setExpandedKey] = (0, import_hooks3.useState)(null);
2653
2871
  const [groupMode, setGroupMode] = (0, import_hooks3.useState)({});
2654
2872
  const [sortMode, setSortMode] = (0, import_hooks3.useState)({});
2873
+ const [filterText, setFilterText] = (0, import_hooks3.useState)({});
2655
2874
  const activeOverlayCount = (0, import_hooks3.useRef)(0);
2656
2875
  (0, import_hooks3.useEffect)(() => () => hideAllOverlays(), []);
2657
2876
  function handleHover(signal) {
@@ -2707,12 +2926,12 @@ function Panel(props) {
2707
2926
  flexDirection: "column",
2708
2927
  overflow: "hidden"
2709
2928
  };
2710
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { role: "region", "aria-label": t.panelRegion, style: panelStyle, children: [
2711
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("header", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "8px" }, children: [
2712
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "react-perfscope" }),
2713
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
2714
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LanguageToggle, {}),
2715
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2929
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { role: "region", "aria-label": t.panelRegion, style: panelStyle, children: [
2930
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "8px" }, children: [
2931
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: "react-perfscope" }),
2932
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
2933
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LanguageToggle, {}),
2934
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2716
2935
  "button",
2717
2936
  {
2718
2937
  type: "button",
@@ -2731,7 +2950,7 @@ function Panel(props) {
2731
2950
  children: t.save
2732
2951
  }
2733
2952
  ),
2734
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2953
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2735
2954
  "button",
2736
2955
  {
2737
2956
  type: "button",
@@ -2743,9 +2962,9 @@ function Panel(props) {
2743
2962
  )
2744
2963
  ] })
2745
2964
  ] }),
2746
- kindsPresent.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: "#888" }, children: t.noSignals }),
2747
- kindsPresent.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
2748
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2965
+ kindsPresent.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "#888" }, children: t.noSignals }),
2966
+ kindsPresent.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
2967
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2749
2968
  SummaryHeader,
2750
2969
  {
2751
2970
  signals: result.signals,
@@ -2757,8 +2976,8 @@ function Panel(props) {
2757
2976
  }
2758
2977
  }
2759
2978
  ),
2760
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("nav", { style: { display: "flex", gap: "4px", flexWrap: "wrap", marginBottom: "8px" }, children: [
2761
- hasTimelineSignals && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2979
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("nav", { style: { display: "flex", gap: "4px", flexWrap: "wrap", marginBottom: "8px" }, children: [
2980
+ hasTimelineSignals && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2762
2981
  "button",
2763
2982
  {
2764
2983
  type: "button",
@@ -2783,7 +3002,7 @@ function Panel(props) {
2783
3002
  kindsPresent.map((kind) => {
2784
3003
  const worst = worstSeverity(grouped[kind]);
2785
3004
  const active = activeKind === kind;
2786
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3005
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2787
3006
  "button",
2788
3007
  {
2789
3008
  type: "button",
@@ -2806,7 +3025,7 @@ function Panel(props) {
2806
3025
  gap: "6px"
2807
3026
  },
2808
3027
  children: [
2809
- worst !== "low" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SeverityDot, { sev: worst, title: t.worstLabel(worst) }),
3028
+ worst !== "low" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SeverityDot, { sev: worst, title: t.worstLabel(worst) }),
2810
3029
  t.kindLabel(kind),
2811
3030
  " ",
2812
3031
  grouped[kind].length
@@ -2816,10 +3035,10 @@ function Panel(props) {
2816
3035
  );
2817
3036
  })
2818
3037
  ] }),
2819
- activeKind && activeTab !== "timeline" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "6px", fontSize: "11px", color: "#888", flexWrap: "wrap" }, children: [
2820
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
3038
+ activeKind && activeTab !== "timeline" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "6px", fontSize: "11px", color: "#888", flexWrap: "wrap" }, children: [
3039
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
2821
3040
  t.sort,
2822
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3041
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2823
3042
  "select",
2824
3043
  {
2825
3044
  "aria-label": t.sort,
@@ -2831,15 +3050,15 @@ function Panel(props) {
2831
3050
  },
2832
3051
  style: { background: "#1a1a1a", color: "#e6e6e6", border: "1px solid #2a2a2a", borderRadius: "4px", padding: "2px 6px", fontSize: "11px" },
2833
3052
  children: [
2834
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "chronological", children: t.sortChronological }),
2835
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "severity", children: t.sortSeverity })
3053
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "chronological", children: t.sortChronological }),
3054
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "severity", children: t.sortSeverity })
2836
3055
  ]
2837
3056
  }
2838
3057
  )
2839
3058
  ] }),
2840
- tabSupportsGrouping(activeKind) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
3059
+ tabSupportsGrouping(activeKind) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
2841
3060
  t.groupBy,
2842
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3061
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2843
3062
  "select",
2844
3063
  {
2845
3064
  "aria-label": t.groupBy,
@@ -2851,16 +3070,30 @@ function Panel(props) {
2851
3070
  },
2852
3071
  style: { background: "#1a1a1a", color: "#e6e6e6", border: "1px solid #2a2a2a", borderRadius: "4px", padding: "2px 6px", fontSize: "11px" },
2853
3072
  children: [
2854
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "chronological", children: t.groupChronological }),
2855
- activeKind === "render" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "commit", children: t.groupCommit }),
2856
- activeKind === "render" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "component", children: t.groupComponent }),
2857
- activeKind === "forced-reflow" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "source", children: t.groupSource })
3073
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "chronological", children: t.groupChronological }),
3074
+ activeKind === "render" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "commit", children: t.groupCommit }),
3075
+ activeKind === "render" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "component", children: t.groupComponent }),
3076
+ activeKind === "forced-reflow" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "source", children: t.groupSource })
2858
3077
  ]
2859
3078
  }
2860
3079
  )
2861
- ] })
3080
+ ] }),
3081
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3082
+ "input",
3083
+ {
3084
+ type: "text",
3085
+ "aria-label": t.filterAria,
3086
+ placeholder: t.filterPlaceholder,
3087
+ value: filterText[activeKind] ?? "",
3088
+ onInput: (e) => {
3089
+ setFilterText({ ...filterText, [activeKind]: e.target.value });
3090
+ setExpandedKey(null);
3091
+ },
3092
+ style: { marginLeft: "auto", background: "#1a1a1a", color: "#e6e6e6", border: "1px solid #2a2a2a", borderRadius: "4px", padding: "2px 6px", fontSize: "11px", width: "120px" }
3093
+ }
3094
+ )
2862
3095
  ] }),
2863
- activeTab === "timeline" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { flexGrow: 1, overflowY: "auto", paddingTop: "4px", paddingBottom: "24px" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3096
+ activeTab === "timeline" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { flexGrow: 1, overflowY: "auto", paddingTop: "4px", paddingBottom: "24px" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2864
3097
  Timeline,
2865
3098
  {
2866
3099
  signals: result.signals,
@@ -2876,19 +3109,18 @@ function Panel(props) {
2876
3109
  }
2877
3110
  }
2878
3111
  ) }),
2879
- activeKind === "render" && activeTab !== "timeline" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3112
+ activeKind === "render" && activeTab !== "timeline" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2880
3113
  RenderInsights,
2881
3114
  {
2882
- signals: grouped.render.flatMap(
2883
- (s) => s.kind === "render" ? s.members ?? [s] : []
2884
- ),
3115
+ signals: grouped.render.flatMap((s) => s.kind === "render" ? s.members ?? [s] : []).filter((s) => signalMatchesFilter(s, filterText.render ?? "")),
2885
3116
  onSelect: () => {
2886
3117
  setGroupMode({ ...groupMode, render: "component" });
2887
3118
  setExpandedKey(null);
2888
3119
  }
2889
3120
  }
2890
3121
  ),
2891
- activeKind === "interaction" && activeTab !== "timeline" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3122
+ activeKind === "long-task" && activeTab !== "timeline" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LongTaskEpisode, { signals: result.signals }),
3123
+ activeKind === "layout-shift" && activeTab !== "timeline" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2892
3124
  "div",
2893
3125
  {
2894
3126
  style: {
@@ -2900,17 +3132,38 @@ function Panel(props) {
2900
3132
  border: "1px solid #1f1f1f",
2901
3133
  borderRadius: "6px"
2902
3134
  },
2903
- children: t.interactionThresholdHint
3135
+ children: t.layoutShiftHint
2904
3136
  }
2905
3137
  ),
2906
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("ul", { style: { listStyle: "none", margin: 0, padding: 0, overflowY: "auto", flexGrow: 1, display: activeTab === "timeline" ? "none" : void 0 }, children: activeKind && (() => {
2907
- const baseSignals = (sortMode[activeKind] ?? "chronological") === "severity" ? sortSignalsBySeverity(grouped[activeKind]) : grouped[activeKind];
3138
+ activeKind === "interaction" && activeTab !== "timeline" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
3139
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(InpEpisode, { signals: result.signals }),
3140
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3141
+ "div",
3142
+ {
3143
+ style: {
3144
+ padding: "6px 8px",
3145
+ marginBottom: "6px",
3146
+ fontSize: "11px",
3147
+ color: "#888",
3148
+ background: "#141414",
3149
+ border: "1px solid #1f1f1f",
3150
+ borderRadius: "6px"
3151
+ },
3152
+ children: t.interactionThresholdHint
3153
+ }
3154
+ )
3155
+ ] }),
3156
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { style: { listStyle: "none", margin: 0, padding: 0, overflowY: "auto", flexGrow: 1, display: activeTab === "timeline" ? "none" : void 0 }, children: activeKind && (() => {
3157
+ const filtered = grouped[activeKind].filter(
3158
+ (s) => signalMatchesFilter(s, filterText[activeKind] ?? "")
3159
+ );
3160
+ const baseSignals = (sortMode[activeKind] ?? "chronological") === "severity" ? sortSignalsBySeverity(filtered) : filtered;
2908
3161
  return groupSignals(baseSignals, groupMode[activeKind] ?? "chronological", activeKind);
2909
3162
  })().map((g, gi) => {
2910
3163
  const currentMode = groupMode[activeKind] ?? "chronological";
2911
3164
  if (currentMode === "chronological") {
2912
3165
  const key2 = `${activeKind}-${gi}`;
2913
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3166
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2914
3167
  SignalRow,
2915
3168
  {
2916
3169
  signal: g.signals[0],
@@ -2927,7 +3180,7 @@ function Panel(props) {
2927
3180
  const isCascade = activeKind === "render" && currentMode === "commit";
2928
3181
  const renderMembers = g.signals.filter((s) => s.kind === "render");
2929
3182
  const unnecessary = isCascade ? renderMembers.filter((s) => s.reason === "parent").length : 0;
2930
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3183
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2931
3184
  "li",
2932
3185
  {
2933
3186
  "aria-expanded": isOpen,
@@ -2942,33 +3195,34 @@ function Panel(props) {
2942
3195
  userSelect: "none"
2943
3196
  },
2944
3197
  children: [
2945
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" }, children: [
2946
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#888", width: "10px" }, children: isOpen ? "\u25BC" : "\u25B6" }),
2947
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
2948
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: g.label }),
3198
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" }, children: [
3199
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: "#888", width: "10px" }, children: isOpen ? "\u25BC" : "\u25B6" }),
3200
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
3201
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: g.label }),
2949
3202
  " \xD7",
2950
3203
  g.count
2951
3204
  ] }),
2952
- isCascade && unnecessary > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: RENDER_REASON_COLOR.parent, fontSize: "10px" }, children: [
3205
+ isCascade && unnecessary > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: RENDER_REASON_COLOR.parent, fontSize: "10px" }, children: [
2953
3206
  "\u26A0 ",
2954
3207
  t.unnecessaryRenders(unnecessary)
2955
3208
  ] })
2956
3209
  ] }),
2957
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { marginTop: "6px", paddingTop: "6px", borderTop: "1px dashed #2a2a2a", paddingLeft: "8px" }, children: isCascade ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CascadeMembers, { members: renderMembers }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
2958
- g.signals.slice(0, 20).map((s, si) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { padding: "2px 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SummaryLine, { signal: s }) }, si)),
2959
- g.signals.length > 20 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: "#888", marginTop: "4px" }, children: t.moreItems(g.signals.length - 20) })
3210
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginTop: "6px", paddingTop: "6px", borderTop: "1px dashed #2a2a2a", paddingLeft: "8px" }, children: isCascade ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CascadeMembers, { members: renderMembers }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
3211
+ g.signals.slice(0, 20).map((s, si) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { padding: "2px 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SummaryLine, { signal: s }) }, si)),
3212
+ g.signals.length > 20 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "#888", marginTop: "4px" }, children: t.moreItems(g.signals.length - 20) })
2960
3213
  ] }) })
2961
3214
  ]
2962
3215
  },
2963
3216
  key
2964
3217
  );
2965
- }) })
3218
+ }) }),
3219
+ activeKind && activeTab !== "timeline" && (filterText[activeKind] ?? "").trim() !== "" && grouped[activeKind].length > 0 && grouped[activeKind].every((s) => !signalMatchesFilter(s, filterText[activeKind] ?? "")) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { padding: "12px 8px", fontSize: "11px", color: "#888" }, children: t.filterNoMatches })
2966
3220
  ] })
2967
3221
  ] });
2968
3222
  }
2969
3223
 
2970
3224
  // src/app.tsx
2971
- var import_jsx_runtime6 = require("preact/jsx-runtime");
3225
+ var import_jsx_runtime9 = require("preact/jsx-runtime");
2972
3226
  function App(props) {
2973
3227
  const { recorder, position = "bottom-right", resolveFrame, finalize } = props;
2974
3228
  const [recording, setRecording] = (0, import_hooks4.useState)(false);
@@ -3014,8 +3268,8 @@ function App(props) {
3014
3268
  function onClose() {
3015
3269
  setResult(null);
3016
3270
  }
3017
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(I18nProvider, { children: [
3018
- result === null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3271
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(I18nProvider, { children: [
3272
+ result === null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3019
3273
  Widget,
3020
3274
  {
3021
3275
  recording,
@@ -3024,16 +3278,16 @@ function App(props) {
3024
3278
  position
3025
3279
  }
3026
3280
  ),
3027
- result !== null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Panel, { result, position, onClose, resolveFrame })
3281
+ result !== null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Panel, { result, position, onClose, resolveFrame })
3028
3282
  ] });
3029
3283
  }
3030
3284
 
3031
3285
  // src/mount.tsx
3032
- var import_jsx_runtime7 = require("preact/jsx-runtime");
3286
+ var import_jsx_runtime10 = require("preact/jsx-runtime");
3033
3287
  function mount(opts) {
3034
3288
  const { recorder, position = "bottom-right", host = document.body, resolveFrame, finalize } = opts;
3035
3289
  return mountShadow(
3036
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(App, { recorder, position, resolveFrame, finalize }),
3290
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(App, { recorder, position, resolveFrame, finalize }),
3037
3291
  { parent: host }
3038
3292
  );
3039
3293
  }