PageSourceSearch

https://hunter.io/assets/LegacyDownloadModal-Bqqisilv.js

js hunter.io collected 2026-09-24 07:52:17 UTC 10,284 bytes, 344 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] = "63993dbb-2910-424a-9e86-343261807eea", e._sentryDebugIdIdentifier = "sentry-dbid-63993dbb-2910-424a-9e86-343261807eea");
7	} catch (e) {}
8})();
9import { n as __esmMin, r as __exportAll } from "./rolldown-runtime-sLwMD6dS.js";
10import { a as cn, i as require_compiler_runtime, t as require_jsx_runtime, u as init_utils } from "./jsx-runtime-CHSMGLHp.js";
11import { t as require_react } from "./react-CrLPhuc5.js";
12import { n as init_icon, t as Icon } from "./icon-BNzYbsdJ.js";
13import { r as init_button, t as Button } from "./button-DOiPZHfy.js";
14//#region app/frontend/pages/BulkVerifications/LegacyDownloadModal.tsx
15var LegacyDownloadModal_exports = /* @__PURE__ */ __exportAll({ LegacyDownloadModal: () => LegacyDownloadModal });
16function LegacyDownloadModal(t0) {
17	const $ = (0, import_compiler_runtime.c)(61);
18	const { open, onClose, modal, rowReconciliation } = t0;
19	const allEmailsOnly = modal.validCount === 0;
20	const [selected, setSelected] = (0, import_react.useState)(allEmailsOnly ? "all" : "valid");
21	const [downloading, setDownloading] = (0, import_react.useState)(false);
22	let t1;
23	let t2;
24	if ($[0] !== onClose || $[1] !== open) {
25		t1 = () => {
26			if (!open) return;
27			const onKeyDown = function onKeyDown(event) {
28				if (event.key === "Escape") onClose();
29			};
30			document.addEventListener("keydown", onKeyDown);
31			return () => document.removeEventListener("keydown", onKeyDown);
32		};
33		t2 = [open, onClose];
34		$[0] = onClose;
35		$[1] = open;
36		$[2] = t1;
37		$[3] = t2;
38	} else {
39		t1 = $[2];
40		t2 = $[3];
41	}
42	(0, import_react.useEffect)(t1, t2);
43	if (!open) return null;
44	let t3;
45	if ($[4] !== downloading || $[5] !== modal.allHref || $[6] !== modal.validHref || $[7] !== onClose || $[8] !== selected) {
46		t3 = function onDownload() {
47			if (downloading) return;
48			setDownloading(true);
49			window.location.assign(selected === "valid" ? modal.validHref : modal.allHref);
50			setTimeout(() => {
51				setDownloading(false);
52				onClose();
53			}, 3e3);
54		};
55		$[4] = downloading;
56		$[5] = modal.allHref;
57		$[6] = modal.validHref;
58		$[7] = onClose;
59		$[8] = selected;
60		$[9] = t3;
61	} else t3 = $[9];
62	const onDownload = t3;
63	let t4;
64	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
65		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
66			className: "modal-title",
67			children: "Download the results in CSV"
68		});
69		$[10] = t4;
70	} else t4 = $[10];
71	let t5;
72	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
73		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
74			"aria-hidden": "true",
75			children: "×"
76		});
77		$[11] = t5;
78	} else t5 = $[11];
79	let t6;
80	if ($[12] !== onClose) {
81		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
82			className: "modal-header",
83			children: [t4, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
84				type: "button",
85				className: "modal-close",
86				"aria-label": "Close",
87				onClick: onClose,
88				children: t5
89			})]
90		});
91		$[12] = onClose;
92		$[13] = t6;
93	} else t6 = $[13];
94	let t7;
95	if ($[14] !== allEmailsOnly || $[15] !== modal.validCountLabel || $[16] !== selected) {
96		t7 = !allEmailsOnly && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
97			className: "form-group",
98			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
99				className: cn("radio-container block-radio-container block-lg", selected === "valid" && "active"),
100				htmlFor: "download-valid-statuses",
101				children: [
102					/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
103						className: "float-end light-grey",
104						children: modal.validCountLabel
105					}),
106					/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("strong", { children: ["Valid only ", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
107						variant: "solid",
108						icon: "shield-check"
109					})] }),
110					/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
111						className: "black",
112						children: "Only the email addresses found valid."
113					}),
114					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
115						variant: "solid",
116						icon: selected === "valid" ? "check-circle" : "circle",
117						className: "radio-icon"
118					}),
119					/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
120						id: "download-valid-statuses",
121						type: "radio",
122						name: "statuses",
123						value: "valid",
124						checked: selected === "valid",
125						onChange: () => setSelected("valid")
126					})
127				]
128			})
129		});
130		$[14] = allEmailsOnly;
131		$[15] = modal.validCountLabel;
132		$[16] = selected;
133		$[17] = t7;
134	} else t7 = $[17];
135	const t8 = selected === "all" && "active";
136	let t9;
137	if ($[18] !== t8) {
138		t9 = cn("radio-container block-radio-container block-lg", t8);
139		$[18] = t8;
140		$[19] = t9;
141	} else t9 = $[19];
142	let t10;
143	if ($[20] !== modal.fullCountLabel) {
144		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
145			className: "float-end light-grey",
146			children: modal.fullCountLabel
147		});
148		$[20] = modal.fullCountLabel;
149		$[21] = t10;
150	} else t10 = $[21];
151	let t11;
152	let t12;
153	if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
154		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "Full list" });
155		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
156			className: "black",
157			children: "Get the full results with the verification statuses."
158		});
159		$[22] = t11;
160		$[23] = t12;
161	} else {
162		t11 = $[22];
163		t12 = $[23];
164	}
165	const t13 = selected === "all" ? "check-circle" : "circle";
166	let t14;
167	if ($[24] !== t13) {
168		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
169			variant: "solid",
170			icon: t13,
171			className: "radio-icon"
172		});
173		$[24] = t13;
174		$[25] = t14;
175	} else t14 = $[25];
176	const t15 = selected === "all";
177	let t16;
178	if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
179		t16 = () => setSelected("all");
180		$[26] = t16;
181	} else t16 = $[26];
182	let t17;
183	if ($[27] !== t15) {
184		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
185			id: "download-all-statuses",
186			type: "radio",
187			name: "statuses",
188			value: ALL_STATUSES,
189			checked: t15,
190			onChange: t16
191		});
192		$[27] = t15;
193		$[28] = t17;
194	} else t17 = $[28];
195	let t18;
196	if ($[29] !== t10 || $[30] !== t14 || $[31] !== t17 || $[32] !== t9) {
197		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
198			className: "form-group",
199			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
200				className: t9,
201				htmlFor: "download-all-statuses",
202				children: [
203					t10,
204					t11,
205					t12,
206					t14,
207					t17
208				]
209			})
210		});
211		$[29] = t10;
212		$[30] = t14;
213		$[31] = t17;
214		$[32] = t9;
215		$[33] = t18;
216	} else t18 = $[33];
217	let t19;
218	if ($[34] !== t18 || $[35] !== t7) {
219		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
220			className: "block-radios-container radios-container",
221			children: [t7, t18]
222		});
223		$[34] = t18;
224		$[35] = t7;
225		$[36] = t19;
226	} else t19 = $[36];
227	let t20;
228	if ($[37] !== rowReconciliation) {
229		t20 = rowReconciliation && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
230			className: "text-size-sm text-hint mt-3",
231			children: rowReconciliation
232		});
233		$[37] = rowReconciliation;
234		$[38] = t20;
235	} else t20 = $[38];
236	let t21;
237	if ($[39] !== t19 || $[40] !== t20) {
238		t21 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
239			className: "modal-body",
240			children: [t19, t20]
241		});
242		$[39] = t19;
243		$[40] = t20;
244		$[41] = t21;
245	} else t21 = $[41];
246	let t22;
247	if ($[42] !== onClose) {
248		t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
249			type: "button",
250			onClick: onClose,
251			children: "Cancel"
252		});
253		$[42] = onClose;
254		$[43] = t22;
255	} else t22 = $[43];
256	const t23 = downloading ? "Downloading…" : "Download";
257	let t24;
258	if ($[44] !== downloading || $[45] !== onDownload || $[46] !== t23) {
259		t24 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
260			variant: "primary",
261			type: "button",
262			disabled: downloading,
263			onClick: onDownload,
264			children: t23
265		});
266		$[44] = downloading;
267		$[45] = onDownload;
268		$[46] = t23;
269		$[47] = t24;
270	} else t24 = $[47];
271	let t25;
272	if ($[48] !== t22 || $[49] !== t24) {
273		t25 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
274			className: "modal-footer",
275			children: [t22, t24]
276		});
277		$[48] = t22;
278		$[49] = t24;
279		$[50] = t25;
280	} else t25 = $[50];
281	let t26;
282	if ($[51] !== t21 || $[52] !== t25 || $[53] !== t6) {
283		t26 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
284			className: "modal-dialog",
285			role: "document",
286			onClick: _temp,
287			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
288				className: "modal-content",
289				children: [
290					t6,
291					t21,
292					t25
293				]
294			})
295		});
296		$[51] = t21;
297		$[52] = t25;
298		$[53] = t6;
299		$[54] = t26;
300	} else t26 = $[54];
301	let t27;
302	if ($[55] !== onClose || $[56] !== t26) {
303		t27 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
304			className: "modal fade show d-block",
305			id: "download-modal",
306			role: "dialog",
307			tabIndex: -1,
308			onClick: onClose,
309			children: t26
310		});
311		$[55] = onClose;
312		$[56] = t26;
313		$[57] = t27;
314	} else t27 = $[57];
315	let t28;
316	if ($[58] === Symbol.for("react.memo_cache_sentinel")) {
317		t28 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "modal-backdrop fade show" });
318		$[58] = t28;
319	} else t28 = $[58];
320	let t29;
321	if ($[59] !== t27) {
322		t29 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t27, t28] });
323		$[59] = t27;
324		$[60] = t29;
325	} else t29 = $[60];
326	return t29;
327}
328function _temp(event_0) {
329	return event_0.stopPropagation();
330}
331var import_compiler_runtime, import_react, import_jsx_runtime, ALL_STATUSES;
332function init_LegacyDownloadModal() {
333	return (init_LegacyDownloadModal = __esmMin((() => {
334		import_compiler_runtime = require_compiler_runtime();
335		import_react = require_react();
336		init_button();
337		init_icon();
338		init_utils();
339		import_jsx_runtime = require_jsx_runtime();
340		ALL_STATUSES = "valid,accept_all,unknown,webmail,disposable,invalid";
341	})))();
342}
343//#endregion
344export { LegacyDownloadModal_exports as n, init_LegacyDownloadModal as r, LegacyDownloadModal as t };

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.