@har-analyzer/components 0.0.10 → 0.0.12

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 (60) hide show
  1. package/README.md +126 -43
  2. package/dist/chunks/har.js +27 -27
  3. package/dist/chunks/index.js +187 -44
  4. package/dist/chunks/json.js +10 -0
  5. package/dist/components/collapsible-key-value-list.d.ts +9 -0
  6. package/dist/components/collapsible-section.d.ts +5 -0
  7. package/dist/components/enhanced-board/constants/i18n.d.ts +21 -0
  8. package/dist/components/enhanced-board/index.d.ts +15 -0
  9. package/dist/components/enhanced-table.d.ts +47 -0
  10. package/dist/components/enhanced-top-navigation.d.ts +7 -0
  11. package/dist/components/error-boundary.d.ts +1 -0
  12. package/dist/components/horizontal-gap.d.ts +6 -0
  13. package/dist/components/json-viewer.d.ts +3 -0
  14. package/dist/components/simple-app-layout.d.ts +6 -0
  15. package/dist/components/simple-app-preferences/content-width-switcher.d.ts +1 -0
  16. package/dist/components/simple-app-preferences/index.d.ts +1 -0
  17. package/dist/components/simple-app-preferences/theme-switcher.d.ts +1 -0
  18. package/dist/components/vertical-gap.d.ts +6 -0
  19. package/dist/features/har-analyzer/index.d.ts +5 -0
  20. package/dist/features/har-analyzer-preferences/index.d.ts +7 -0
  21. package/dist/features/har-entries-viewer/components/har-entries-filters/components/content-type-filter.d.ts +7 -0
  22. package/dist/features/har-entries-viewer/components/har-entries-filters/components/errors-filter.d.ts +6 -0
  23. package/dist/features/har-entries-viewer/components/har-entries-filters/index.d.ts +1 -0
  24. package/dist/features/har-entries-viewer/hooks/preferences.d.ts +2 -0
  25. package/dist/features/har-entries-viewer/index.d.ts +7 -0
  26. package/dist/features/har-file-uploader/file-upload-error.d.ts +5 -0
  27. package/dist/features/har-file-uploader/index.d.ts +8 -0
  28. package/dist/features/list-har-entries/index.d.ts +8 -0
  29. package/dist/features/view-har-entry/components/content-viewer.d.ts +7 -0
  30. package/dist/features/view-har-entry/components/headers-viewer.d.ts +6 -0
  31. package/dist/features/view-har-entry/components/payload-viewer.d.ts +6 -0
  32. package/dist/features/view-har-entry/components/response-viewer.d.ts +6 -0
  33. package/dist/features/view-har-entry/index.d.ts +5 -0
  34. package/dist/har-analyzer-preferences.js +21 -92
  35. package/dist/har-analyzer.js +72 -75
  36. package/dist/har-entries-viewer.js +7 -2117
  37. package/dist/har-file-uploader.js +18 -18
  38. package/dist/hooks/app-preferences.d.ts +2 -0
  39. package/dist/hooks/table-preferences.d.ts +12 -0
  40. package/dist/index.d.ts +8 -77
  41. package/dist/index.js +17 -16
  42. package/dist/list-har-entries.js +2128 -0
  43. package/dist/utils/common.d.ts +2 -0
  44. package/dist/utils/content-type.d.ts +4 -0
  45. package/dist/utils/date.d.ts +2 -0
  46. package/dist/utils/file-upload.d.ts +3 -0
  47. package/dist/utils/har.d.ts +17 -0
  48. package/dist/utils/json.d.ts +1 -0
  49. package/dist/view-har-entry.js +3130 -0
  50. package/package.json +3 -3
  51. package/dist/har-analyzer-preferences.d.ts +0 -18
  52. package/dist/har-analyzer.d.ts +0 -11
  53. package/dist/har-content-viewer.d.ts +0 -14
  54. package/dist/har-content-viewer.js +0 -150
  55. package/dist/har-entries-filters.d.ts +0 -23
  56. package/dist/har-entries-filters.js +0 -7
  57. package/dist/har-entries-viewer.d.ts +0 -26
  58. package/dist/har-entry-viewer.d.ts +0 -24
  59. package/dist/har-entry-viewer.js +0 -1145
  60. package/dist/har-file-uploader.d.ts +0 -16
@@ -0,0 +1,47 @@
1
+ interface BaseColumnDefinition {
2
+ header: string;
3
+ width?: number;
4
+ isVisibleByDefault?: boolean;
5
+ isSortable?: boolean;
6
+ }
7
+ interface DefaultColumnDefinition<TItem> {
8
+ type?: 'string';
9
+ cell: (item: TItem) => {
10
+ value: string;
11
+ content?: React.ReactNode;
12
+ };
13
+ }
14
+ interface NumericColumnDefinition<TItem> {
15
+ type: 'number';
16
+ cell: (item: TItem) => {
17
+ value: number;
18
+ content?: React.ReactNode;
19
+ };
20
+ }
21
+ interface DateColumnDefinition<TItem> {
22
+ type: 'date';
23
+ cell: (item: TItem) => {
24
+ value: Date;
25
+ content?: React.ReactNode;
26
+ };
27
+ }
28
+ interface ListColumnDefinition<TItem> {
29
+ type: 'list';
30
+ cell: (item: TItem) => {
31
+ value: string[];
32
+ content?: React.ReactNode;
33
+ };
34
+ }
35
+ type EnhancedColumnDefinition<TItem> = BaseColumnDefinition & (DefaultColumnDefinition<TItem> | NumericColumnDefinition<TItem> | DateColumnDefinition<TItem> | ListColumnDefinition<TItem>);
36
+ export type EnhancedTableColumnsDefinition<TItem> = Record<string, EnhancedColumnDefinition<TItem>>;
37
+ interface EnhancedTableProps<TItem> {
38
+ id: string;
39
+ items: TItem[];
40
+ getRowId: (item: TItem) => string;
41
+ columnsDefinition: EnhancedTableColumnsDefinition<TItem>;
42
+ empty?: React.ReactNode;
43
+ selectionType?: 'single' | 'multi';
44
+ onSelectionChange?: (selectedItems: TItem[]) => void;
45
+ }
46
+ export default function EnhancedTable<TItem>({ id, items: originalItems, getRowId, columnsDefinition: enhancedColumnDefinitions, empty, selectionType, onSelectionChange, }: EnhancedTableProps<TItem>): import("react/jsx-runtime").JSX.Element;
47
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare const ENHANCED_TOP_NAVIGATION_ID = "top-navigation";
2
+ export interface EnhancedTopNavigationProps {
3
+ logo?: React.ReactNode;
4
+ appName: string;
5
+ utilities?: React.ReactNode;
6
+ }
7
+ export default function EnhancedTopNavigation({ logo, appName, utilities, }: EnhancedTopNavigationProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function withCustomErrorBoundary<P>(Component: React.ComponentType<P>): import('react').ForwardRefExoticComponent<import('react').PropsWithoutRef<P> & import('react').RefAttributes<import('react').ComponentRef<import('react').ComponentType<P>>>>;
@@ -0,0 +1,6 @@
1
+ import { SpaceBetweenProps } from '@cloudscape-design/components/space-between';
2
+ type HorizontalGapProps = Omit<SpaceBetweenProps, 'size' | 'direction'> & {
3
+ size?: SpaceBetweenProps['size'];
4
+ };
5
+ export default function HorizontalGap({ children, ...props }: HorizontalGapProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ export default function JSONViewer({ data }: {
2
+ data: object | undefined;
3
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ export interface SimpleAppLayoutProps {
2
+ logo?: React.ReactNode;
3
+ appName: string;
4
+ content: React.ReactNode;
5
+ }
6
+ export default function SimpleAppLayout({ logo, appName, content, }: SimpleAppLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ContentWidthSwitcher(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function SimpleAppPreferences(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ThemeSwitcher(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SpaceBetweenProps } from '@cloudscape-design/components/space-between';
2
+ type VerticalGapProps = Omit<SpaceBetweenProps, 'size' | 'direction'> & {
3
+ size?: SpaceBetweenProps['size'];
4
+ };
5
+ export default function VerticalGap({ children, ...props }: VerticalGapProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface HARAnalyzerProps {
2
+ logo?: React.ReactNode;
3
+ appName?: string;
4
+ }
5
+ export default function HARAnalyzer({ logo, appName }: HARAnalyzerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type UsePreferenceStore = (key: string) => readonly [string | undefined, (preference: string) => void];
3
+ export default function HARAnalyzerPreferencesProvider({ usePreferenceStore, children }: PropsWithChildren<{
4
+ usePreferenceStore: UsePreferenceStore;
5
+ }>): import("react/jsx-runtime").JSX.Element;
6
+ export declare function useHARAnalyzerPreferences<T>(preferenceKey: string, defaultValue: T): readonly [T, (newPreference: T) => void];
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ContentTypeGroup } from '../../../../../utils/content-type';
2
+ interface ContentTypeFilterProps {
3
+ contentTypeFilters: ContentTypeGroup[];
4
+ onChange: (contentTypeFilters: ContentTypeGroup[]) => void;
5
+ }
6
+ export default function ContentTypeFilter({ contentTypeFilters, onChange }: ContentTypeFilterProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ interface ErrorsFilterProps {
2
+ shouldFilterErrors: boolean;
3
+ onChange: (shouldFilterErrors: boolean) => void;
4
+ }
5
+ export default function ErrorsFilter({ shouldFilterErrors, onChange }: ErrorsFilterProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export default function HAREntriesFilters(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare function useErrorsFilterPreference(): readonly [boolean, (newPreference: boolean) => void];
2
+ export declare function useContentTypeFiltersPreference(): readonly [("JSON" | "XML" | "JS" | "CSS" | "HTML" | "Doc" | "Img" | "Font" | "Media" | "Other")[], (newPreference: ("JSON" | "XML" | "JS" | "CSS" | "HTML" | "Doc" | "Img" | "Font" | "Media" | "Other")[]) => void];
@@ -0,0 +1,7 @@
1
+ import { HAREntry } from '../../utils/har';
2
+ interface HAREntriesViewerProps {
3
+ title?: string;
4
+ harEntries: HAREntry[];
5
+ }
6
+ export default function HAREntriesViewer(props: HAREntriesViewerProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ interface FileUploadErrorProps {
2
+ errors: string[];
3
+ }
4
+ export default function FileUploadError({ errors }: FileUploadErrorProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,8 @@
1
+ import { HAREntry } from '../../utils/har';
2
+ export interface HARFileUploaderProps {
3
+ onChange: (args: {
4
+ harEntries: HAREntry[];
5
+ harFileName?: string;
6
+ }) => void;
7
+ }
8
+ export default function HARFileUploader({ onChange }: HARFileUploaderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { HAREntry } from '../../utils/har';
2
+ interface ListHAREntriesProps {
3
+ id?: string;
4
+ harEntries: HAREntry[];
5
+ onChange: (selectedHAREntries: HAREntry[]) => void;
6
+ }
7
+ export default function ListHAREntries({ id, harEntries, onChange, }: ListHAREntriesProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ interface ContentViewerProps {
2
+ content: string;
3
+ encoding?: string;
4
+ mimeType?: string;
5
+ }
6
+ export default function ContentViewer({ content, encoding, mimeType, }: ContentViewerProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ interface HeadersViewerProps {
3
+ harEntry: HAREntry;
4
+ }
5
+ export default function HeadersViewer({ harEntry }: HeadersViewerProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ interface PayloadViewerProps {
3
+ harEntry: HAREntry;
4
+ }
5
+ export default function PayloadViewer({ harEntry }: PayloadViewerProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ interface ResponseViewerProps {
3
+ harEntry: HAREntry;
4
+ }
5
+ export default function ResponseViewer({ harEntry }: ResponseViewerProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ import { HAREntry } from '../../utils/har';
2
+ export interface ViewHAREntryProps {
3
+ harEntry: HAREntry;
4
+ }
5
+ export default function ViewHAREntry({ harEntry }: ViewHAREntryProps): import("react/jsx-runtime").JSX.Element;
@@ -1,96 +1,25 @@
1
- import { jsx as D } from "react/jsx-runtime";
2
- import { createContext as E, use as F, useMemo as x, useState as A, useCallback as m, useEffect as b } from "react";
3
- async function c(t, e) {
4
- return new Promise((r, n) => {
5
- t.addEventListener("success", () => {
6
- r(t.result);
7
- }), t.addEventListener("error", () => {
8
- n(e);
9
- });
10
- });
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { createContext as i, use as a, useMemo as u } from "react";
3
+ import { s as P } from "./chunks/json.js";
4
+ const o = i(void 0);
5
+ function z({ usePreferenceStore: e, children: r }) {
6
+ return /* @__PURE__ */ c(o, { value: e, children: r });
11
7
  }
12
- var S = function(t, e, r, n, a) {
13
- if (n === "m") throw new TypeError("Private method is not writable");
14
- if (n === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
15
- if (typeof e == "function" ? t !== e || !a : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
16
- return n === "a" ? a.call(t, r) : a ? a.value = r : e.set(t, r), r;
17
- }, o = function(t, e, r, n) {
18
- if (r === "a" && !n) throw new TypeError("Private accessor was defined without a getter");
19
- if (typeof e == "function" ? t !== e || !n : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
- return r === "m" ? n : r === "a" ? n.call(t) : n ? n.value : e.get(t);
21
- }, s, l, i, d, g, _;
22
- class C {
23
- constructor({ name: e }) {
24
- s.add(this), l.set(this, void 0), i.set(this, void 0), S(this, l, e, "f");
25
- }
26
- async getItem(e) {
27
- const r = await o(this, s, "m", d).call(this);
28
- return c(r.get(e), "Failed to get item");
29
- }
30
- async setItem(e, r) {
31
- const n = await o(this, s, "m", d).call(this);
32
- return c(n.put(r, e), "Failed to set item");
33
- }
34
- async removeItem(e) {
35
- const r = await o(this, s, "m", d).call(this);
36
- return c(r.delete(e), "Failed to remove item");
37
- }
38
- async clear() {
39
- const e = await o(this, s, "m", d).call(this);
40
- return c(e.clear(), "Failed to clear store");
41
- }
42
- }
43
- l = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakSet(), d = async function() {
44
- return (await o(this, s, "m", g).call(this)).transaction("store", "readwrite").objectStore("store");
45
- }, g = async function() {
46
- return o(this, i, "f") === void 0 && S(this, i, o(this, s, "m", _).call(this), "f"), o(this, i, "f");
47
- }, _ = async function() {
48
- const e = indexedDB.open(o(this, l, "f"), 1);
49
- return e.addEventListener("upgradeneeded", () => {
50
- e.result.createObjectStore("store");
51
- }), c(e, "Failed to open IndexedDB");
52
- };
53
- const p = new C({ name: "node_modules/local-db-storage" }), y = {
54
- get: async (t) => await p.getItem(t),
55
- set: async (t, e) => {
56
- await p.setItem(t, e);
57
- }
58
- };
59
- function I(t, e) {
60
- try {
61
- return JSON.parse(t ?? "");
62
- } catch (r) {
63
- return console.warn("Failed to parse JSON string:", t, "Error:", r), e;
64
- }
65
- }
66
- const P = E(void 0);
67
- function L({ store: t, children: e }) {
68
- return /* @__PURE__ */ D(P, { value: t, children: e });
69
- }
70
- const O = {
71
- getPreference: y.get,
72
- setPreference: y.set
73
- };
74
- function R(t, e) {
75
- const r = F(P), n = x(() => r || (console.warn("Invoked outside of HARAnalyzerPreferencesProvider. Falling back to use fallback preferences store."), O), [r]), [a, f] = A(e), w = m(async () => {
76
- const u = await n.getPreference(t), v = I(u, e);
77
- f(v);
78
- }, [n, t, e]);
79
- b(() => {
80
- w();
81
- }, [w]);
82
- const h = m(async () => {
83
- try {
84
- await n.setPreference(t, JSON.stringify(a));
85
- } catch (u) {
86
- console.error(`Failed to update preference for key ${t}:`, u);
87
- }
88
- }, [n, t, a]);
89
- return b(() => {
90
- h();
91
- }, [h]), [a, f];
8
+ function y(e, r) {
9
+ const s = a(o);
10
+ if (!s)
11
+ throw new Error("useHARAnalyzerPreferences must be used within a HARAnalyzerPreferencesProvider");
12
+ const [n, f] = s(e);
13
+ return [u(() => {
14
+ if (!n)
15
+ return;
16
+ const [t] = P(n);
17
+ return t;
18
+ }, [n]) ?? r, (t) => {
19
+ f(JSON.stringify(t));
20
+ }];
92
21
  }
93
22
  export {
94
- L as default,
95
- R as useHARAnalyzerPreferences
23
+ z as default,
24
+ y as useHARAnalyzerPreferences
96
25
  };
@@ -1,31 +1,28 @@
1
- import { jsx as e, jsxs as i, Fragment as F } from "react/jsx-runtime";
2
- import { useEffect as N, useState as a } from "react";
3
- import R from "@cloudscape-design/components/app-layout";
4
- import { I18nProvider as v } from "@cloudscape-design/components/i18n";
5
- import y from "@cloudscape-design/components/i18n/messages/all.en";
1
+ import { jsx as e, jsxs as i, Fragment as h } from "react/jsx-runtime";
2
+ import { useEffect as F, useState as a } from "react";
3
+ import N from "@cloudscape-design/components/app-layout";
6
4
  import { useHARAnalyzerPreferences as p } from "./har-analyzer-preferences.js";
7
- import D from "@cloudscape-design/components/header";
8
- import { borderWidthAlert as T, colorBorderDividerDefault as b } from "@cloudscape-design/design-tokens";
9
- import { H as E } from "./chunks/index.js";
10
- import c from "@cloudscape-design/components/box";
11
- import l from "@cloudscape-design/components/button";
12
- import M from "@cloudscape-design/components/modal";
13
- import { V as f } from "./chunks/vertical-gap.js";
14
- import u from "@cloudscape-design/components/toggle";
15
- import { Mode as m, applyMode as W } from "@cloudscape-design/global-styles";
16
- import I from "./har-file-uploader.js";
17
- import S from "./har-content-viewer.js";
5
+ import R from "@cloudscape-design/components/header";
6
+ import { borderWidthAlert as b, colorBorderDividerDefault as y } from "@cloudscape-design/design-tokens";
7
+ import { b as D, H as T } from "./chunks/index.js";
8
+ import s from "@cloudscape-design/components/box";
9
+ import c from "@cloudscape-design/components/button";
10
+ import v from "@cloudscape-design/components/modal";
11
+ import { V as u } from "./chunks/vertical-gap.js";
12
+ import f from "@cloudscape-design/components/toggle";
13
+ import { Mode as l, applyMode as W } from "@cloudscape-design/global-styles";
14
+ import M from "./har-file-uploader.js";
18
15
  function A() {
19
- return p("isFullContentWidth", !1);
16
+ return p("isFullContentWidth", !0);
20
17
  }
21
- function U() {
18
+ function S() {
22
19
  return p("isDarkTheme", !1);
23
20
  }
24
21
  const k = "top-navigation", d = "blur(16px)";
25
- function _({
26
- logo: t,
27
- appName: o,
28
- utilities: r
22
+ function U({
23
+ logo: r,
24
+ appName: n,
25
+ utilities: t
29
26
  }) {
30
27
  return /* @__PURE__ */ e(
31
28
  "nav",
@@ -36,96 +33,96 @@ function _({
36
33
  top: 0,
37
34
  zIndex: 1002,
38
35
  padding: "0.5rem 1rem",
39
- borderBlockEnd: `${T} solid ${b}`,
36
+ borderBlockEnd: `${b} solid ${y}`,
40
37
  backdropFilter: d,
41
38
  WebkitBackdropFilter: d
42
39
  // for Safari
43
40
  },
44
- children: /* @__PURE__ */ e(D, { actions: r, children: /* @__PURE__ */ i(E, { children: [
45
- t,
46
- o
41
+ children: /* @__PURE__ */ e(R, { actions: t, children: /* @__PURE__ */ i(D, { children: [
42
+ r,
43
+ n
47
44
  ] }) })
48
45
  }
49
46
  );
50
47
  }
51
- function x() {
52
- const [t, o] = A();
53
- return /* @__PURE__ */ e(u, { onChange: ({ detail: r }) => {
54
- o(r.checked);
55
- }, checked: t, children: "Use entire screen width" });
48
+ function _() {
49
+ const [r, n] = A();
50
+ return /* @__PURE__ */ e(f, { onChange: ({ detail: t }) => {
51
+ n(t.checked);
52
+ }, checked: r, children: "Use entire screen width" });
56
53
  }
57
- function L() {
58
- const [t, o] = U();
59
- return N(() => {
60
- const r = t ? m.Dark : m.Light;
61
- W(r);
62
- }, [t]), /* @__PURE__ */ e(u, { onChange: ({ detail: r }) => {
63
- o(r.checked);
64
- }, checked: t, children: "Use dark theme" });
54
+ function x() {
55
+ const [r, n] = S();
56
+ return F(() => {
57
+ const t = r ? l.Dark : l.Light;
58
+ W(t);
59
+ }, [r]), /* @__PURE__ */ e(f, { onChange: ({ detail: t }) => {
60
+ n(t.checked);
61
+ }, checked: r, children: "Use dark theme" });
65
62
  }
66
- function V() {
67
- const [t, o] = a(!1), r = () => {
68
- o(!0);
69
- }, n = () => {
70
- o(!1);
63
+ function I() {
64
+ const [r, n] = a(!1), t = () => {
65
+ n(!0);
66
+ }, o = () => {
67
+ n(!1);
71
68
  };
72
- return /* @__PURE__ */ i(F, { children: [
73
- /* @__PURE__ */ e(l, { iconName: "settings", variant: "icon", onClick: r }),
69
+ return /* @__PURE__ */ i(h, { children: [
70
+ /* @__PURE__ */ e(c, { iconName: "settings", variant: "icon", onClick: t }),
74
71
  /* @__PURE__ */ i(
75
- M,
72
+ v,
76
73
  {
77
- visible: t,
78
- onDismiss: n,
74
+ visible: r,
75
+ onDismiss: o,
79
76
  header: "Manage your preferences",
80
- footer: /* @__PURE__ */ e(c, { float: "right", children: /* @__PURE__ */ e(l, { variant: "primary", onClick: n, children: "Ok" }) }),
77
+ footer: /* @__PURE__ */ e(s, { float: "right", children: /* @__PURE__ */ e(c, { variant: "primary", onClick: o, children: "Ok" }) }),
81
78
  children: [
82
- /* @__PURE__ */ e(c, { margin: { top: "m" } }),
83
- /* @__PURE__ */ i(f, { size: "m", children: [
84
- /* @__PURE__ */ e(L, {}),
85
- /* @__PURE__ */ e(x, {})
79
+ /* @__PURE__ */ e(s, { margin: { top: "m" } }),
80
+ /* @__PURE__ */ i(u, { size: "m", children: [
81
+ /* @__PURE__ */ e(x, {}),
82
+ /* @__PURE__ */ e(_, {})
86
83
  ] })
87
84
  ]
88
85
  }
89
86
  )
90
87
  ] });
91
88
  }
92
- function w({
93
- logo: t,
94
- appName: o,
95
- content: r
89
+ function L({
90
+ logo: r,
91
+ appName: n,
92
+ content: t
96
93
  }) {
97
- const [n] = A();
98
- return /* @__PURE__ */ i(v, { locale: "en", messages: [y], children: [
99
- /* @__PURE__ */ e(_, { logo: t, appName: o, utilities: /* @__PURE__ */ e(V, {}) }),
94
+ const [o] = A();
95
+ return /* @__PURE__ */ i(h, { children: [
96
+ /* @__PURE__ */ e(U, { logo: r, appName: n, utilities: /* @__PURE__ */ e(I, {}) }),
100
97
  /* @__PURE__ */ e(
101
- R,
98
+ N,
102
99
  {
103
100
  headerSelector: `#${k}`,
104
101
  navigationHide: !0,
105
102
  toolsHide: !0,
106
- maxContentWidth: n ? Number.MAX_VALUE : void 0,
107
- content: r
103
+ maxContentWidth: o ? Number.MAX_VALUE : void 0,
104
+ content: t
108
105
  }
109
106
  )
110
107
  ] });
111
108
  }
112
- const h = "unknown.har";
113
- function ne({ logo: t, appName: o = "HAR Analyzer" }) {
114
- const [r, n] = a(h), [s, C] = a();
109
+ const m = "unknown.har";
110
+ function Z({ logo: r, appName: n = "HAR Analyzer" }) {
111
+ const [t, o] = a(m), [H, g] = a([]);
115
112
  return /* @__PURE__ */ e(
116
- w,
113
+ L,
117
114
  {
118
- logo: t,
119
- appName: o,
120
- content: /* @__PURE__ */ i(f, { children: [
121
- /* @__PURE__ */ e(I, { onChange: ({ harContent: g, harFileName: H }) => {
122
- C(g), n(H ?? h);
115
+ logo: r,
116
+ appName: n,
117
+ content: /* @__PURE__ */ i(u, { children: [
118
+ /* @__PURE__ */ e(M, { onChange: ({ harEntries: C, harFileName: E }) => {
119
+ g(C), o(E ?? m);
123
120
  } }),
124
- s && /* @__PURE__ */ e(S, { harFileName: r, harContent: s })
121
+ /* @__PURE__ */ e(T, { title: t, harEntries: H })
125
122
  ] })
126
123
  }
127
124
  );
128
125
  }
129
126
  export {
130
- ne as default
127
+ Z as default
131
128
  };