PageSourceSearch

https://hunter.io/assets/Index-B3tc6mqs.js

js hunter.io collected 2026-09-24 07:52:39 UTC 42,833 bytes, 1,236 lines download raw bytes

1(function() {
2	try {
3		var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
4		e.SENTRY_RELEASE = { id: "b96dc26" };
5		var n = new e.Error().stack;
6		n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "50afa20c-80d3-408c-875b-98166c1b1294", e._sentryDebugIdIdentifier = "sentry-dbid-50afa20c-80d3-408c-875b-98166c1b1294");
7	} catch (e) {}
8})();
9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js";
10import { Et as DropdownMenuTrigger, M as init_currency_helper, Os as Checkbox, bt as DropdownMenuItem, fn as formatNumber, ft as DropdownMenu, j as CurrencyHelper, ks as init_checkbox, kt as init_dropdown_menu, mt as DropdownMenuContent, pn as init_text_helpers, pt as DropdownMenuAction } from "./controllers-jdPQjaCB.js";
11import { a as isNumber, o as isObject } from "./type-guards-DVyG5ljW.js";
12import { a as cn, i as require_compiler_runtime, t as require_jsx_runtime, u as init_utils } from "./jsx-runtime-CHSMGLHp.js";
13import { t as require_react } from "./react-CrLPhuc5.js";
14import { n as init_icon, t as Icon } from "./icon-BNzYbsdJ.js";
15import { r as init_button, t as Button } from "./button-DOiPZHfy.js";
16import { a as init_tooltip, i as TooltipTrigger, n as TooltipContent, r as TooltipProvider, t as Tooltip } from "./tooltip-HHfiWInP.js";
17import { i as init_tag, n as Tag } from "./tag-j7SWTISf.js";
18import { an as data_no_data_default, dn as PageHeaderBreadcrumbLink, fn as PageHeaderHeading, hn as init_page_header, in as init_data_no_results, ln as PageHeaderBreadcrumb, mn as PageHeaderTitle, on as init_data_no_data, rn as data_no_results_default, sn as PageHeader, un as PageHeaderBreadcrumbItem } from "./turbo-mount-DM0tFk1M.js";
19import { a as DialogFooter, i as DialogContent, n as DialogBody, o as DialogHeader, r as DialogCloseButton, s as DialogTitle, t as Dialog, u as init_dialog } from "./dialog-XgiZyeRA.js";
20import { c as EmptyStateImage, d as init_empty_state, i as EmptyStateContent, l as EmptyStateTitle, n as EmptyStateActions, t as EmptyState } from "./empty-state-Crv2GUlN.js";
21import { n as init_loading_spinner, t as LoadingSpinner } from "./loading-spinner-Ati6dit1.js";
22import { a as DataTableCheckboxCell, c as DataTableHeader, d as init_data_table, l as DataTableHeaderCell, n as DataTableBody, t as DataTable, u as DataTableRow } from "./data-table-DoMOEGfF.js";
23import { a as init_dist, l as router, s as usePage, t as Head_default } from "./dist-ZlUHm0R7.js";
24import { r as init_AppLayout, t as AppLayout } from "./AppLayout-KSwds5qH.js";
25import { n as useBulkSelection, t as init_useBulkSelection } from "./useBulkSelection-CP_rgTwY.js";
26import { n as useFlashToasts, t as init_useFlashToasts } from "./useFlashToasts-vBid9_dr.js";
27import { n as useScopedBodyClass, t as init_useScopedBodyClass } from "./useScopedBodyClass-DZ-bIKpP.js";
28//#region app/frontend/pages/DiscoverSavedSearches/BulkActionsBar.tsx
29function tc(key) {
30	const value = t$4(key);
31	if (value.length === 0) return value;
32	return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
33}
34function BulkActionsBar({ selectedCount, totalCount, onClearSelection, onSelectAll, onDelete, onMarkAsSeen, markAsSeenEnabled, disabled = false }) {
35	return /* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)("header", {
36		className: cn("h-table-bulk-actions", selectedCount > 0 && "is-visible"),
37		children: [
38			/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Button, {
39				size: "sm",
40				iconOnly: true,
41				type: "button",
42				onClick: onClearSelection,
43				title: t$4("js.data_table.bulk_actions.clear_selection"),
44				"aria-label": t$4("js.data_table.bulk_actions.clear_selection"),
45				children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Icon, {
46					icon: "times",
47					"aria-hidden": "true"
48				})
49			}),
50			/* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)(DropdownMenu, { children: [/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(DropdownMenuTrigger, {
51				asChild: true,
52				children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)(Button, {
53					size: "sm",
54					type: "button",
55					children: [/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("div", { children: t$4("js.data_table.bulk_actions.count_selected", { count: selectedCount.toLocaleStr
55ing("en-US") }) }), /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Icon, {
56						icon: "angle-down",
57						"aria-hidden": "true"
58					})]
59				})
60			}), /* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)(DropdownMenuContent, { children: [/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)(DropdownMenuAction, {
61				type: "button",
62				onClick: onSelectAll,
63				children: [t$4("js.data_table.bulk_actions.select_all"), /* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)("small", {
64					className: "grey ml-auto",
65					children: [
66						"(",
67						totalCount.toLocaleString("en-US"),
68						")"
69					]
70				})]
71			}) }), /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(DropdownMenuItem, {
72				className: "h-table-bulk-actions__unselect",
73				children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(DropdownMenuAction, {
74					type: "button",
75					onClick: onClearSelection,
76					children: t$4("js.data_table.bulk_actions.unselect_all")
77				})
78			})] })] }),
79			/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("hr", { className: "h-table-bulks-actions__separator" }),
80			/* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)(DropdownMenu, { children: [/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(DropdownMenuTrigger, {
81				asChild: true,
82				children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Button, {
83					size: "sm",
84					iconOnly: true,
85					variant: "ghost",
86					type: "button",
87					disabled,
88					"aria-busy": disabled,
89					"aria-label": tc("more_actions"),
90					children: disabled ? /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Icon, {
91						loading: true,
92						size: "sm",
93						"aria-hidden": "true"
94					}) : /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Icon, {
95						icon: "ellipsis-h",
96						size: "sm",
97						variant: "regular",
98						"aria-hidden": "true"
99					})
100				})
101			}), /* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)(DropdownMenuContent, { children: [markAsSeenEnabled && /* @__P
101URE__ */ (0, import_jsx_runtime$4.jsx)(DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)(DropdownMenuAction, {
102				type: "button",
103				onClick: onMarkAsSeen,
104				disabled,
105				children: [/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Icon, {
106					icon: "check-double",
107					size: "sm",
108					variant: "regular",
109					"aria-hidden": "true"
110				}), t$4("discover.saved_searches.index.mark_as_seen")]
111			}) }), /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)(DropdownMenuAction, {
112				type: "button",
113				variant: "danger",
114				onClick: onDelete,
115				disabled,
116				children: [/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Icon, {
117					icon: "trash-alt",
118					size: "sm",
119					variant: "regular",
120					"aria-hidden": "true"
121				}), tc("delete")]
122			}) })] })] })
123		]
124	});
125}
126var import_jsx_runtime$4, t$4;
127function init_BulkActionsBar() {
128	return (init_BulkActionsBar = __esmMin((() => {
129		init_button();
130		init_icon();
131		init_dropdown_menu();
132		init_utils();
133		import_jsx_runtime$4 = require_jsx_runtime();
134		t$4 = (key, options) => window.i18n.t(key, options);
135	})))();
136}
137//#endregion
138//#region app/frontend/pages/DiscoverSavedSearches/ConfirmDeleteModal.tsx
139function ConfirmDeleteModal({ open, onClose, onConfirm, selectedCount, submitting = false }) {
140	const dialogRef = (0, import_react$1.useRef)(null);
141	(0, import_react$1.useEffect)(() => {
142		const dialog = dialogRef.current;
143		if (!dialog) return;
144		if (open) {
145			if (!dialog.open) dialog.showModal();
146		} else if (dialog.open) dialog.close();
147	}, [open]);
148	(0, import_react$1.useEffect)(() => {
149		const dialog_0 = dialogRef.current;
150		if (!dialog_0) return;
151		dialog_0.addEventListener("close", onClose);
152		return () => dialog_0.removeEventListener("close", onClose);
153	}, [onClose]);
154	function handleSubmit(event) {
155		event.preventDefault();
156		if (submitting) return;
157		onConfirm();
158	}
159	return /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(Dialog, {
160		ref: dialogRef,
161		children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)("form", {
162			onSubmit: handleSubmit,
163			children: [
164				/* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)(DialogHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(DialogTitle, { children: t$3("confirm_delete.title", {
165					count: selectedCount,
166					formatted_count: CurrencyHelper.numberWithDelimiter(selectedCount)
167				}) }), /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(DialogCloseButton, {
168					type: "button",
169					onClick: onClose
170				})] }),
171				/* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(DialogBody, { children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("p", { children: t$3("confirm_delete.body") }) }),
172				/* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)(DialogFooter, { children: [/* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(Button, {
173					type: "button",
174					onClick: onClose,
175					children: t$3("confirm_delete.cancel")
176				}), /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(Button, {
177					type: "submit",
178					variant: "danger",
179					disabled: submitting,
180					"data-loading": "none",
181					children: t$3("confirm_delete.confirm")
182				})] })
183			]
184		}) })
185	});
186}
187var import_react$1, import_jsx_runtime$3, t$3;
188function init_ConfirmDeleteModal() {
189	return (init_ConfirmDeleteModal = __esmMin((() => {
190		import_react$1 = require_react();
191		init_dialog();
192		init_button();
193		init_currency_helper();
194		import_jsx_runtime$3 = require_jsx_runtime();
195		t$3 = (key, options) => window.i18n.t(`discover.saved_searches.index.${key}`, options);
196	})))();
197}
198//#endregion
199//#region app/frontend/pages/DiscoverSavedSearches/EmptyStates.tsx
200function SavedSearchesNoResultsState(t0) {
201	const $ = (0, import_compiler_runtime$2.c)(6);
202	const { indexHref } = t0;
203	let t1;
204	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
205		t1 = /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(EmptyStateImage, { children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("img", {
206			src: data_no_results_default,
207			alt: ""
208		}) });
209		$[0] = t1;
210	} else t1 = $[0];
211	let t2;
212	let t3;
213	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
214		t2 = /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(EmptyStateTitle, { children: t$2("no_results.title") });
215		t3 = /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("p", { children: t$2("no_results.subtitle") });
216		$[1] = t2;
217		$[2] = t3;
218	} else {
219		t2 = $[1];
220		t3 = $[2];
221	}
222	let t4;
223	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
224		t4 = t$2("no_results.reset_search");
225		$[3] = t4;
226	} else t4 = $[3];
227	let t5;
228	if ($[4] !== indexHref) {
229		t5 = /* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)(EmptyState, {
230			orientation: "horizontal",
231			children: [t1, /* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)(EmptyStateContent, { children: [
232				t2,
233				t3,
234				/* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(EmptyStateActions, { children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(Button, {
235					variant: "primary",
236					size: "sm",
237					asChild: true,
238					children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("a", {
239						href: indexHref,
240						children: t4
241					})
242				}) })
243			] })]
244		});
245		$[4] = indexHref;
246		$[5] = t5;
247	} else t5 = $[5];
248	return t5;
249}
250function SavedSearchesEmptyState(t0) {
251	const $ = (0, import_compiler_runtime$2.c)(6);
252	const { discoverHref } = t0;
253	let t1;
254	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
255		t1 = /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(EmptyStateImage, { children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("img", {
256			src: data_no_data_default,
257			alt: ""
258		}) });
259		$[0] = t1;
260	} else t1 = $[0];
261	let t2;
262	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
263		t2 = /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(EmptyStateTitle, {
264			as: "h2",
265			children: t$2("empty_state.title")
266		});
267		$[1] = t2;
268	} else t2 = $[1];
269	let t3;
270	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
271		t3 = /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("p", {
272			className: "text-balance",
273			dangerouslySetInnerHTML: { __html: t$2("empty_state.description_html") }
274		});
275		$[2] = t3;
276	} else t3 = $[2];
277	let t4;
278	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
279		t4 = t$2("empty_state.cta");
280		$[3] = t4;
281	} else t4 = $[3];
282	let t5;
283	if ($[4] !== discoverHref) {
284		t5 = /* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)(EmptyState, { children: [t1, /* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)(EmptyStateContent, { children: [
285			t2,
286			t3,
287			/* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(EmptyStateActions, { children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(Button, {
288				variant: "primary",
289				size: "sm",
290				asChild: true,
291				children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("a", {
292					href: discoverHref,
293					children: t4
294				})
295			}) })
296		] })] });
297		$[4] = discoverHref;
298		$[5] = t5;
299	} else t5 = $[5];
300	return t5;
301}
302var import_compiler_runtime$2, import_jsx_runtime$2, t$2;
303function init_EmptyStates() {
304	return (init_EmptyStates = __esmMin((() => {
305		import_compiler_runtime$2 = require_compiler_runtime();
306		init_empty_state();
307		init_button();
308		init_data_no_results();
309		init_data_no_data();
310		import_jsx_runtime$2 = require_jsx_runtime();
311		t$2 = (key) => window.i18n.t(`discover.saved_searches.index.${key}`);
312	})))();
313}
314//#endregion
315//#region app/frontend/pages/DiscoverSavedSearches/SavedSearchesTable.tsx
316function DateCell(t0) {
317	const $ = (0, import_compiler_runtime$1.c)(7);
318	const { label, tooltip } = t0;
319	let t1;
320	if ($[0] !== label) {
321		t1 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(TooltipTrigger, {
322			asChild: true,
323			children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("span", { children: label })
324		});
325		$[0] = label;
326		$[1] = t1;
327	} else t1 = $[1];
328	let t2;
329	if ($[2] !== tooltip) {
330		t2 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(TooltipContent, { children: tooltip });
331		$[2] = tooltip;
332		$[3] = t2;
333	} else t2 = $[3];
334	let t3;
335	if ($[4] !== t1 || $[5] !== t2) {
336		t3 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("div", {
337			className: "h-data-table-cell",
338			children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)(Tooltip, { children: [t1, t2] }) })
339		});
340		$[4] = t1;
341		$[5] = t2;
342		$[6] = t3;
343	} else t3 = $[6];
344	return t3;
345}
346function ResultsCell(t0) {
347	const $ = (0, import_compiler_runtime$1.c)(19);
348	const { row, state, newResultsEnabled, onRetry } = t0;
349	if (state.status === "loading") {
350		let t1;
351		if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
352			t1 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(LoadingSpinner, {
353				variant: "inline",
354				text: tp("results_calculating")
355			});
356			$[0] = t1;
357		} else t1 = $[0];
358		return t1;
359	}
360	if (state.status === "error") {
361		let t1;
362		if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
363			t1 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Tag, {
364				variant: "danger",
365				size: "none",
366				role: "alert",
367				label: tp("results_error")
368			});
369			$[1] = t1;
370		} else t1 = $[1];
371		let t2;
372		if ($[2] !== row.name) {
373			t2 = tp("retry_count_aria", { name: row.name });
374			$[2] = row.name;
375			$[3] = t2;
376		} else t2 = $[3];
377		let t3;
378		if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
379			t3 = tp("retry_count");
380			$[4] = t3;
381		} else t3 = $[4];
382		let t4;
383		if ($[5] !== onRetry || $[6] !== t2) {
384			t4 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)("div", {
385				className: "d-flex align-items-center gap-2",
386				children: [t1, /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Button, {
387					type: "button",
388					size: "xs",
389					"aria-label": t2,
390					onClick: onRetry,
391					children: t3
392				})]
393			});
394			$[5] = onRetry;
395			$[6] = t2;
396			$[7] = t4;
397		} else t4 = $[7];
398		return t4;
399	}
400	let t1;
401	if ($[8] !== state.count) {
402		t1 = formatNumber(state.count);
403		$[8] = state.count;
404		$[9] = t1;
405	} else t1 = $[9];
406	const t2 = `${t1}${state.countApproximate ? "+" : ""}`;
407	let t3;
408	if ($[10] !== t2) {
409		t3 = tp("results_label", { count: t2 });
410		$[10] = t2;
411		$[11] = t3;
412	} else t3 = $[11];
413	let t4;
414	if ($[12] !== newResultsEnabled || $[13] !== state.newCount || $[14] !== state.newCountApproximate) {
415		t4 = newResultsEnabled && state.newCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)(import_jsx_runtime$1.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("span", {
416			className: "h-tag__separator",
417			children: "·"
418		}), /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("span", {
419			className: "h-tag__secondary",
420			children: tp("new_label", { count: `${formatNumber(state.newCount)}${state.newCountApproximate ? "+" : ""}` })
421		})] }) : null;
422		$[12] = newResultsEnabled;
423		$[13] = state.newCount;
424		$[14] = state.newCountApproximate;
425		$[15] = t4;
426	} else t4 = $[15];
427	let t5;
428	if ($[16] !== t3 || $[17] !== t4) {
429		t5 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Tag, {
430			size: "none",
431			label: /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)(import_jsx_runtime$1.Fragment, { children: [t3, t4] })
432		});
433		$[16] = t3;
434		$[17] = t4;
435		$[18] = t5;
436	} else t5 = $[18];
437	return t5;
438}
439function SavedSearchesTable(t0) {
440	const $ = (0, import_compiler_runtime$1.c)(48);
441	const { rows, countStates, onRetryCount, newResultsEnabled, totalCount, isSelected, onToggleRow, allSelected, onToggleAll, bulkActionsBar } = t0;
442	let t1;
443	if ($[0] !== totalCount) {
444		t1 = totalCount.toLocaleString("en-US");
445		$[0] = totalCount;
446		$[1] = t1;
447	} else t1 = $[1];
448	let t2;
449	if ($[2] !== t1) {
450		t2 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)("span", {
451			className: "fw-medium",
452			children: ["1 - ", t1]
453		});
454		$[2] = t1;
455		$[3] = t2;
456	} else t2 = $[3];
457	let t3;
458	if ($[4] !== totalCount) {
459		t3 = totalCount.toLocaleString("en-US");
460		$[4] = totalCount;
461		$[5] = t3;
462	} else t3 = $[5];
463	let t4;
464	if ($[6] !== t3) {
465		t4 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)("span", {
466			className: "text-hint",
467			children: [" of ", t3]
468		});
469		$[6] = t3;
470		$[7] = t4;
471	} else t4 = $[7];
472	let t5;
473	if ($[8] !== t2 || $[9] !== t4) {
474		t5 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)("div", {
475			className: "h-data-table__footer-range",
476			children: [t2, t4]
477		});
478		$[8] = t2;
479		$[9] = t4;
480		$[10] = t5;
481	} else t5 = $[10];
482	let t6;
483	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
484		t6 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Button, {
485			type: "button",
486			size: "sm",
487			iconOnly: true,
488			className: "disabled",
489			disabled: true,
490			"aria-label": "Previous page",
491			children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Icon, {
492				icon: "angle-left",
493				"aria-hidden": "true"
494			})
495		});
496		$[11] = t6;
497	} else t6 = $[11];
498	let t7;
499	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
500		t7 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)("div", {
501			className: "h-data-table__footer-pagination",
502			children: [t6, /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Button, {
503				type: "button",
504				size: "sm",
505				iconOnly: true,
506				className: "disabled",
507				disabled: true,
508				"aria-label": "Next page",
509				children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Icon, {
510					icon: "angle-right",
511					"aria-hidden": "true"
512				})
513			})]
514		});
515		$[12] = t7;
516	} else t7 = $[12];
517	let t8;
518	if ($[13] !== t5) {
519		t8 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)("div", {
520			className: "h-data-table__footer",
521			children: [t5, t7]
522		});
523		$[13] = t5;
524		$[14] = t8;
525	} else t8 = $[14];
526	const footer = t8;
527	let t9;
528	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
529		t9 = t$1("js.data_table.bulk_actions.select_all");
530		$[15] = t9;
531	} else t9 = $[15];
532	let t10;
533	if ($[16] !== allSelected || $[17] !== onToggleAll) {
534		t10 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("th", {
535			className: "h-data-table__checkbox",
536			children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("div", {
537				className: "h-data-table-cell h-data-table-cell--checkbox",
538				children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Checkbox, {
539					checked: allSelected,
540					onChange: onToggleAll,
541					"aria-label": t9
542				})
543			})
544		});
545		$[16] = allSelected;
546		$[17] = onToggleAll;
547		$[18] = t10;
548	} else t10 = $[18];
549	let t11;
550	if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
551		t11 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DataTableHeaderCell, {
552			"data-column-name": "name",
553			children: tp("name")
554		});
555		$[19] = t11;
556	} else t11 = $[19];
557	let t12;
558	if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
559		t12 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DataTableHeaderCell, {
560			"data-column-name": "created_at",
561			children: tp("date_created")
562		});
563		$[20] = t12;
564	} else t12 = $[20];
565	let t13;
566	if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
567		t13 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DataTableHeaderCell, {
568			"data-column-name": "last_run_at",
569			children: tp("last_run_at")
570		});
571		$[21] = t13;
572	} else t13 = $[21];
573	let t14;
574	if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
575		t14 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DataTableHeaderCell, {
576			"data-column-name": "source",
577			children: tp("source")
578		});
579		$[22] = t14;
580	} else t14 = $[22];
581	let t15;
582	if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
583		t15 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DataTableHeaderCell, {
584			"data-column-name": "results",
585			children: tp("results")
586		});
587		$[23] = t15;
588	} else t15 = $[23];
589	let t16;
590	let t17;
591	if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
592		t16 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("th", {
593			className: "h-data-table__thead-actions",
594			children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("div", {
595				className: "h-data-table-cell h-data-table-cell--heading is-disabled",
596				children: t$1("js.leads.page.actions")
597			})
598		});
599		t17 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("th", { className: "h-data-table__columns-management" });
600		$[24] = t16;
601		$[25] = t17;
602	} else {
603		t16 = $[24];
604		t17 = $[25];
605	}
606	let t18;
607	if ($[26] !== t10) {
608		t18 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)(DataTableHeader, { children: [
609			t10,
610			t11,
611			t12,
612			t13,
613			t14,
614			t15,
615			t16,
616			t17
617		] });
618		$[26] = t10;
619		$[27] = t18;
620	} else t18 = $[27];
621	let t19;
622	if ($[28] !== countStates || $[29] !== isSelected || $[30] !== newResultsEnabled || $[31] !== onRetryCount || $[32] !== onToggleRow || $[33] !== rows) {
623		let t20;
624		if ($[35] !== countStates || $[36] !== isSelected || $[37] !== newResultsEnabled || $[38] !== onRetryCount || $[39] !== onToggleRow) {
625			t20 = (row) => /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)(DataTableRow, {
626				id: row.id,
627				children: [
628					/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DataTableCheckboxCell, {
629						checked: isSelected(row.id),
630						recordId: row.id,
631						onChange: () => onToggleRow(row.id)
632					}),
633					/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("td", {
634						"data-column-name": "name",
635						children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("a", {
636							className: "h-data-table-cell h-data-table-cell--link saved-searches-table__name-cell",
637							href: row.runHref,
638							children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("strong", {
639								className: "fw-medium",
640								children: row.name
641							})
642						})
643					}),
644					/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("td", {
645						"data-column-name": "created_at",
646						children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DateCell, {
647							label: row.createdAtLabel,
648							tooltip: row.createdAtTooltip
649						})
650					}),
651					/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("td", {
652						"data-column-name": "last_run_at",
653						children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DateCell, {
654							label: row.lastRunAtLabel,
655							tooltip: row.lastRunAtTooltip
656						})
657					}),
658					/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("td", {
659						"data-column-name": "source",
660						children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("div", {
661							className: "h-data-table-cell",
662							children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Tag, {
663								size: "none",
664								label: "Discover"
665							})
666						})
667					}),
668					/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("td", {
669						"data-column-name": "results",
670						children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("div", {
671							className: "h-data-table-cell",
672							children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(ResultsCell, {
673								row,
674								state: countStates[row.id] ?? { status: "loading" },
675								newResultsEnabled,
676								onRetry: () => onRetryCount(row.id)
677							})
678						})
679					}),
680					/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("td", {
681						colSpan: 2,
682						children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("div", {
683							className: "h-data-table-cell h-data-table-cell--actions",
684							children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Button, {
685								size: "xs",
686								asChild: true,
687								children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("a", {
688									href: row.runHref,
689									children: tp("run_search")
690								})
691							})
692						})
693					})
694				]
695			}, row.id);
696			$[35] = countStates;
697			$[36] = isSelected;
698			$[37] = newResultsEnabled;
699			$[38] = onRetryCount;
700			$[39] = onToggleRow;
701			$[40] = t20;
702		} else t20 = $[40];
703		t19 = rows.map(t20);
704		$[28] = countStates;
705		$[29] = isSelected;
706		$[30] = newResultsEnabled;
707		$[31] = onRetryCount;
708		$[32] = onToggleRow;
709		$[33] = rows;
710		$[34] = t19;
711	} else t19 = $[34];
712	let t20;
713	if ($[41] !== t19) {
714		t20 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DataTableBody, { children: t19 });
715		$[41] = t19;
716		$[42] = t20;
717	} else t20 = $[42];
718	let t21;
719	if ($[43] !== bulkActionsBar || $[44] !== footer || $[45] !== t18 || $[46] !== t20) {
720		t21 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)(DataTable, {
721			className: "saved-searches-table",
722			bulkActionsBar,
723			footer,
724			children: [t18, t20]
725		});
726		$[43] = bulkActionsBar;
727		$[44] = footer;
728		$[45] = t18;
729		$[46] = t20;
730		$[47] = t21;
731	} else t21 = $[47];
732	return t21;
733}
734var import_compiler_runtime$1, import_jsx_runtime$1, t$1, tp;
735function init_SavedSearchesTable() {
736	return (init_SavedSearchesTable = __esmMin((() => {
737		import_compiler_runtime$1 = require_compiler_runtime();
738		init_data_table();
739		init_button();
740		init_checkbox();
741		init_icon();
742		init_loading_spinner();
743		init_tag();
744		init_tooltip();
745		init_text_helpers();
746		import_jsx_runtime$1 = require_jsx_runtime();
747		t$1 = (key) => window.i18n.t(key);
748		tp = (key, options) => window.i18n.t(`discover.saved_searches.index.${key}`, options);
749	})))();
750}
751//#endregion
752//#region app/frontend/pages/DiscoverSavedSearches/Index.tsx
753function bulkActionFailed(page) {
754	const flash = page.props.flash;
755	return Boolean(flash?.error);
756}
757function parseCountResults(payload) {
758	const results = /* @__PURE__ */ new Map();
759	if (!isObject(payload) || !("saved_searches" in payload)) return results;
760	const savedSearches = payload.saved_searches;
761	if (!Array.isArray(savedSearches)) return results;
762	for (const savedSearch of savedSearches) {
763		if (!isObject(savedSearch)) continue;
764		const { id, results_count: count, results_count_approximate: countApproximate, results_count_status: status, new_results_count: newCount, new_results_count_approximate: newCountApproximate } = savedSearch;
765		if (!isNumber(id) || !Number.isInteger(id)) continue;
766		if (status === "success" && isNumber(count) && Number.isInteger(count) && count >= 0 && isNumber(newCount) && Number.isInteger(newCount) && newCount >= 0) results.set(id, {
767			status: "success",
768			count,
769			countApproximate: countApproximate === true,
770			newCount,
771			newCountApproximate: newCountApproximate === true
772		});
773		else if (status === "error") results.set(id, { status: "error" });
774	}
775	return results;
776}
777function fetchCountBatch(url, ids, signal) {
778	const queryParams = new URLSearchParams();
779	for (const id of ids) queryParams.append("ids[]", String(id));
780	return fetch(`${url}?${queryParams}`, {
781		headers: { Accept: "application/json" },
782		signal
783	}).then((response) => {
784		if (!response.ok) throw new Error(`Count request failed with status ${response.status}`);
785		return response.json();
786	}).then(parseCountResults);
787}
788function Index() {
789	const $ = (0, import_compiler_runtime.c)(92);
790	const { props } = usePage();
791	const { rows, totalCount, countLabel, query, savedSearchUpdatesEnabled, urls } = props;
792	useFlashToasts();
793	useScopedBodyClass("pb-0");
794	const [searchValue, setSearchValue] = (0, import_react.useState)(query ?? "");
795	const [pending, setPending] = (0, import_react.useState)(false);
796	const [confirmingDelete, setConfirmingDelete] = (0, import_react.useState)(false);
797	let t0;
798	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
799		t0 = {};
800		$[0] = t0;
801	} else t0 = $[0];
802	const [countStates, setCountStates] = (0, import_react.useState)(t0);
803	let t1;
804	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
805		t1 = /* @__PURE__ */ new Set();
806		$[1] = t1;
807	} else t1 = $[1];
808	const activeCountRequests = (0, import_react.useRef)(t1);
809	let t2;
810	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
811		t2 = /* @__PURE__ */ new Map();
812		$[2] = t2;
813	} else t2 = $[2];
814	const latestCountRequestTokens = (0, import_react.useRef)(t2);
815	let t3;
816	let t4;
817	if ($[3] !== query) {
818		t3 = () => setSearchValue(query ?? "");
819		t4 = [query];
820		$[3] = query;
821		$[4] = t3;
822		$[5] = t4;
823	} else {
824		t3 = $[4];
825		t4 = $[5];
826	}
827	(0, import_react.useEffect)(t3, t4);
828	const { selection, selectedCount, isSelected, toggleRow, selectPage, clearSelection, removeId } = useBulkSelection(totalCount);
829	let t5;
830	if ($[6] !== rows) {
831		t5 = rows.map(_temp);
832		$[6] = rows;
833		$[7] = t5;
834	} else t5 = $[7];
835	const rowIds = t5;
836	let t6;
837	if ($[8] !== urls.counts) {
838		t6 = (ids) => {
839			if (ids.length === 0) return Promise.resolve();
840			const requestToken = Symbol("saved-search-count-request");
841			for (const id of ids) latestCountRequestTokens.current.set(id, requestToken);
842			setCountStates((current) => {
843				const next = { ...current };
844				for (const id_0 of ids) next[id_0] = { status: "loading" };
845				return next;
846			});
847			const controller = new AbortController();
848			activeCountRequests.current.add(controller);
849			return Array.from({ length: Math.ceil(ids.length / COUNT_BATCH_SIZE) }, (_, index) => ids.slice(index * COUNT_BATCH_SIZE, (index + 1) * COUNT_BATCH_SIZE)).reduce((sequence, batchIds) => sequence.then(() => fetchCountBatch(urls.counts, batchIds, controller.signal).then((results) => {
850				setCountStates((current_0) => {
851					const next_0 = { ...current_0 };
852					for (const id_1 of batchIds) {
853						if (latestCountRequestTokens.current.get(id_1) !== requestToken) continue;
854						next_0[id_1] = results.get(id_1) ?? { status: "error" };
855					}
856					return next_0;
857				});
858			}).catch((error) => {
859				if (error instanceof Error && error.name === "AbortError") throw error;
860				setCountStates((current_1) => {
861					const next_1 = { ...current_1 };
862					for (const id_2 of batchIds) {
863						if (latestCountRequestTokens.current.get(id_2) !== requestToken) continue;
864						next_1[id_2] = { status: "error" };
865					}
866					return next_1;
867				});
868			})), Promise.resolve()).catch(_temp2).finally(() => activeCountRequests.current.delete(controller));
869		};
870		$[8] = urls.counts;
871		$[9] = t6;
872	} else t6 = $[9];
873	const loadCounts = t6;
874	let t7;
875	let t8;
876	if ($[10] !== loadCounts || $[11] !== rowIds) {
877		t7 = () => {
878			loadCounts(rowIds);
879			return () => {
880				for (const controller_0 of activeCountRequests.current) controller_0.abort();
881				activeCountRequests.current.clear();
882			};
883		};
884		t8 = [loadCounts, rowIds];
885		$[10] = loadCounts;
886		$[11] = rowIds;
887		$[12] = t7;
888		$[13] = t8;
889	} else {
890		t7 = $[12];
891		t8 = $[13];
892	}
893	(0, import_react.useEffect)(t7, t8);
894	let t9;
895	if ($[14] !== selection.mode || $[15] !== selection.selectedIds) {
896		t9 = selection.mode === "partial" ? Array.from(selection.selectedIds) : [];
897		$[14] = selection.mode;
898		$[15] = selection.selectedIds;
899		$[16] = t9;
900	} else t9 = $[16];
901	const selectedIds = t9;
902	const selectionRef = (0, import_react.useRef)(selection);
903	let t10;
904	let t11;
905	if ($[17] !== selection) {
906		t10 = () => {
907			selectionRef.current = selection;
908		};
909		t11 = [selection];
910		$[17] = selection;
911		$[18] = t10;
912		$[19] = t11;
913	} else {
914		t10 = $[18];
915		t11 = $[19];
916	}
917	(0, import_react.useEffect)(t10, t11);
918	let t12;
919	let t13;
920	if ($[20] !== removeId || $[21] !== rowIds) {
921		t12 = () => {
922			const current_2 = selectionRef.current;
923			if (current_2.mode !== "partial") return;
924			const visible = new Set(rowIds);
925			for (const id_3 of current_2.selectedIds) if (!visible.has(id_3)) removeId(id_3);
926		};
927		t13 = [rowIds, removeId];
928		$[20] = removeId;
929		$[21] = rowIds;
930		$[22] = t12;
931		$[23] = t13;
932	} else {
933		t12 = $[22];
934		t13 = $[23];
935	}
936	(0, import_react.useEffect)(t12, t13);
937	let t14;
938	if ($[24] !== isSelected || $[25] !== rowIds || $[26] !== rows.length) {
939		t14 = rows.length > 0 && rowIds.every((id_4) => isSelected(id_4));
940		$[24] = isSelected;
941		$[25] = rowIds;
942		$[26] = rows.length;
943		$[27] = t14;
944	} else t14 = $[27];
945	const allSelected = t14;
946	let t15;
947	if ($[28] !== searchValue || $[29] !== urls.index) {
948		t15 = (event) => {
949			event.preventDefault();
950			router.get(urls.index, searchValue ? { query: searchValue } : {}, {
951				preserveState: false,
952				onStart: () => setPending(true),
953				onFinish: () => setPending(false)
954			});
955		};
956		$[28] = searchValue;
957		$[29] = urls.index;
958		$[30] = t15;
959	} else t15 = $[30];
960	const handleSearchSubmit = t15;
961	let t16;
962	if ($[31] !== allSelected || $[32] !== clearSelection || $[33] !== rowIds || $[34] !== selectPage) {
963		t16 = () => {
964			if (allSelected) clearSelection();
965			else selectPage(rowIds);
966		};
967		$[31] = allSelected;
968		$[32] = clearSelection;
969		$[33] = rowIds;
970		$[34] = selectPage;
971		$[35] = t16;
972	} else t16 = $[35];
973	const handleToggleAll = t16;
974	let t17;
975	if ($[36] !== loadCounts) {
976		t17 = (id_5) => void loadCounts([id_5]);
977		$[36] = loadCounts;
978		$[37] = t17;
979	} else t17 = $[37];
980	const handleRetryCount = t17;
981	let t18;
982	if ($[38] !== clearSelection || $[39] !== selectedIds || $[40] !== urls.bulkDestroy) {
983		t18 = () => {
984			router.delete(urls.bulkDestroy, {
985				data: { ids: selectedIds },
986				preserveScroll: true,
987				onStart: () => setPending(true),
988				onSuccess: (page) => {
989					if (bulkActionFailed(page)) return;
990					setConfirmingDelete(false);
991					clearSelection();
992				},
993				onFinish: () => setPending(false)
994			});
995		};
996		$[38] = clearSelection;
997		$[39] = selectedIds;
998		$[40] = urls.bulkDestroy;
999		$[41] = t18;
1000	} else t18 = $[41];
1001	const handleDelete = t18;
1002	let t19;
1003	if ($[42] !== clearSelection || $[43] !== selectedIds || $[44] !== urls.bulkMarkAsSeen) {
1004		t19 = () => {
1005			router.post(urls.bulkMarkAsSeen, { ids: selectedIds }, {
1006				preserveScroll: true,
1007				onStart: () => setPending(true),
1008				onSuccess: (page_0) => {
1009					if (bulkActionFailed(page_0)) return;
1010					clearSelection();
1011				},
1012				onFinish: () => setPending(false)
1013			});
1014		};
1015		$[42] = clearSelection;
1016		$[43] = selectedIds;
1017		$[44] = urls.bulkMarkAsSeen;
1018		$[45] = t19;
1019	} else t19 = $[45];
1020	const handleMarkAsSeen = t19;
1021	const hasQuery = Boolean(query);
1022	let t20;
1023	if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
1024		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Head_default, { title: t("title") });
1025		$[46] = t20;
1026	} else t20 = $[46];
1027	let t21;
1028	if ($[47] !== urls.discover) {
1029		t21 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderBreadcrumb, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderBreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderBreadcrumbLink, {
1030			href: urls.discover,
1031			children: "Discover"
1032		}) }) });
1033		$[47] = urls.discover;
1034		$[48] = t21;
1035	} else t21 = $[48];
1036	let t22;
1037	if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
1038		t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderTitle, { children: "Saved searches" });
1039		$[49] = t22;
1040	} else t22 = $[49];
1041	let t23;
1042	if ($[50] !== t21) {
1043		t23 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageHeaderHeading, { children: [t21, t22] }) });
1044		$[50] = t21;
1045		$[51] = t23;
1046	} else t23 = $[51];
1047	let t24;
1048	if ($[52] !== countLabel || $[53] !== handleSearchSubmit || $[54] !== hasQuery || $[55] !== pending || $[56] !== rows.length || $[57] !== searchValue || $[58] !== urls.index) {
1049		t24 = (rows.length > 0 || hasQuery) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1050			className: "main-heading",
1051			children: [
1052				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
1053					className: "main-heading__count",
1054					children: countLabel
1055				}),
1056				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", { className: "main-heading__separator" }),
1057				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1058					className: "main-heading__filtering",
1059					children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
1060						className: "h-search-form",
1061						onSubmit: handleSearchSubmit,
1062						role: "search",
1063						children: [
1064							/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
1065								className: "h-search-form__input",
1066								type: "search",
1067								name: "query",
1068								value: searchValue,
1069								onChange: (event_0) => setSearchValue(event_0.target.value),
1070								placeholder: t("search_placeholder"),
1071								"aria-label": t("search_placeholder")
1072							}),
1073							hasQuery && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
1074								className: "h-search-form__reset",
1075								href: urls.index,
1076								"aria-label": t("no_results.reset_search"),
1077								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
1078									icon: "times",
1079									size: "sm",
1080									"aria-hidden": "true"
1081								})
1082							}),
1083							/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
1084								className: "h-search-form__submit",
1085								type: "submit",
1086								disabled: pending,
1087								"aria-label": t("search"),
1088								"data-loading": "none",
1089								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
1090									icon: "search",
1091									size: "sm",
1092									"aria-hidden": "true"
1093								})
1094							})
1095						]
1096					})
1097				})
1098			]
1099		});
1100		$[52] = countLabel;
1101		$[53] = handleSearchSubmit;
1102		$[54] = hasQuery;
1103		$[55] = pending;
1104		$[56] = rows.length;
1105		$[57] = searchValue;
1106		$[58] = urls.index;
1107		$[59] = t24;
1108	} else t24 = $[59];
1109	let t25;
1110	if ($[60] !== allSelected || $[61] !== clearSelection || $[62] !== countStates || $[63] !== handleMarkAsSeen || $[64] !== handleRetryCount || $[65] !== handleToggleAll || $[66] !== hasQuery || $[67] !== isSelected || $[68] !== pending || $[69] !== rowIds || $[70] !== rows || $[71] !== savedSearchUpdatesEnabled || $[72] !== selectPage || $[73] !== selectedCount || $[74] !== toggleRow || $[75] !== totalCount || $[76] !== urls.discover || $[77] !== urls.index) {
1111		t25 = rows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SavedSearchesTable, {
1112			rows,
1113			countStates,
1114			onRetryCount: handleRetryCount,
1115			newResultsEnabled: savedSearchUpdatesEnabled,
1116			totalCount,
1117			isSelected,
1118			onToggleRow: toggleRow,
1119			allSelected,
1120			onToggleAll: handleToggleAll,
1121			bulkActionsBar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BulkActionsBar, {
1122				selectedCount,
1123				totalCount,
1124				onClearSelection: clearSelection,
1125				onSelectAll: () => selectPage(rowIds),
1126				onDelete: () => setConfirmingDelete(true),
1127				onMarkAsSeen: handleMarkAsSeen,
1128				markAsSeenEnabled: savedSearchUpdatesEnabled,
1129				disabled: pending
1130			})
1131		}) : hasQuery ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SavedSearchesNoResultsState, { indexHref: urls.index }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SavedSearchesEmptyState, { discoverHref: urls.discover });
1132		$[60] = allSelected;
1133		$[61] = clearSelection;
1134		$[62] = countStates;
1135		$[63] = handleMarkAsSeen;
1136		$[64] = handleRetryCount;
1137		$[65] = handleToggleAll;
1138		$[66] = hasQuery;
1139		$[67] = isSelected;
1140		$[68] = pending;
1141		$[69] = rowIds;
1142		$[70] = rows;
1143		$[71] = savedSearchUpdatesEnabled;
1144		$[72] = selectPage;
1145		$[73] = selectedCount;
1146		$[74] = toggleRow;
1147		$[75] = totalCount;
1148		$[76] = urls.discover;
1149		$[77] = urls.index;
1150		$[78] = t25;
1151	} else t25 = $[78];
1152	let t26;
1153	if ($[79] !== t23 || $[80] !== t24 || $[81] !== t25) {
1154		t26 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", {
1155			className: "dashboard-main",
1156			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1157				className: "dashboard-main__content",
1158				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1159					className: "board-box",
1160					children: [
1161						t23,
1162						t24,
1163						t25
1164					]
1165				})
1166			})
1167		});
1168		$[79] = t23;
1169		$[80] = t24;
1170		$[81] = t25;
1171		$[82] = t26;
1172	} else t26 = $[82];
1173	let t27;
1174	if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
1175		t27 = () => setConfirmingDelete(false);
1176		$[83] = t27;
1177	} else t27 = $[83];
1178	let t28;
1179	if ($[84] !== confirmingDelete || $[85] !== handleDelete || $[86] !== pen
1179ding || $[87] !== selectedCount) {
1180		t28 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmDeleteModal, {
1181			open: confirmingDelete,
1182			onClose: t27,
1183			onConfirm: handleDelete,
1184			selectedCount,
1185			submitting: pending
1186		});
1187		$[84] = confirmingDelete;
1188		$[85] = handleDelete;
1189		$[86] = pending;
1190		$[87] = selectedCount;
1191		$[88] = t28;
1192	} else t28 = $[88];
1193	let t29;
1194	if ($[89] !== t26 || $[90] !== t28) {
1195		t29 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1196			t20,
1197			t26,
1198			t28
1199		] });
1200		$[89] = t26;
1201		$[90] = t28;
1202		$[91] = t29;
1203	} else t29 = $[91];
1204	return t29;
1205}
1206function _temp2(error_0) {
1207	if (!(error_0 instanceof Error && error_0.name === "AbortError")) throw error_0;
1208}
1209function _temp(row) {
1210	return row.id;
1211}
1212var import_compiler_runtime, import_react, import_jsx_runtime, t, COUNT_BATCH_SIZE;
1213function init_Index() {
1214	return (init_Index = __esmMin((() => {
1215		import_compiler_runtime = require_compiler_runtime();
1216		import_react = require_react();
1217		init_dist();
1218		init_AppLayout();
1219		init_icon();
1220		init_page_header();
1221		init_useBulkSelection();
1222		init_useFlashToasts();
1223		init_useScopedBodyClass();
1224		init_BulkActionsBar();
1225		init_ConfirmDeleteModal();
1226		init_EmptyStates();
1227		init_SavedSearchesTable();
1228		import_jsx_runtime = require_jsx_runtime();
1229		t = (key) => window.i18n.t(`discover.saved_searches.index.${key}`);
1230		COUNT_BATCH_SIZE = 10;
1231		Index.layout = (page) => (0, import_react.createElement)(AppLayout, { navCollapsed: false }, page);
1232	})))();
1233}
1234//#endregion
1235init_Index();
1236export { Index as default };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.