PageSourceSearch

https://hunter.io/assets/Index-DPwPR-z7.js

js hunter.io collected 2026-09-24 07:52:57 UTC 11,269 bytes, 364 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] = "bf7c0a27-1451-4d3b-b5a3-b4810ad584a8", e._sentryDebugIdIdentifier = "sentry-dbid-bf7c0a27-1451-4d3b-b5a3-b4810ad584a8");
7	} catch (e) {}
8})();
9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js";
10import { Mi as init_routes, Mo as settings_leads_path, Os as Checkbox, ks as init_checkbox } from "./controllers-jdPQjaCB.js";
11import { a as cn, i as require_compiler_runtime, t as require_jsx_runtime, u as init_utils } from "./jsx-runtime-CHSMGLHp.js";
12import { t as require_react } from "./react-CrLPhuc5.js";
13import { n as init_icon, t as Icon } from "./icon-BNzYbsdJ.js";
14import { r as init_button, t as Button } from "./button-DOiPZHfy.js";
15import { A as isInertiaPath, D as init_inertia_bridge } from "./turbo-mount-DM0tFk1M.js";
16import { n as init_toast, r as toast } from "./toast-DdFPY0Ky.js";
17import { a as init_dist$1, l as router, t as Head_default } from "./dist-ZlUHm0R7.js";
18import { r as init_AppLayout, t as AppLayout } from "./AppLayout-KSwds5qH.js";
19import { n as useFlashToasts, t as init_useFlashToasts } from "./useFlashToasts-vBid9_dr.js";
20import { n as useScopedBodyClass, t as init_useScopedBodyClass } from "./useScopedBodyClass-DZ-bIKpP.js";
21import { n as init_LeadsListSidebar, t as LeadsListSidebar } from "./LeadsListSidebar-DMsre0SF.js";
22//#region app/frontend/react/components/back-button.tsx
23/**
24* React port of `controllers_back/back-button_controller.js` (rendered by the
25* `components/_back_button` partial).
26*
27* Same rule as the Stimulus original: if the user arrived from a parameterised
28* view of the fallback page (`/leads?…`), go back there so pagination and
29* filters survive; otherwise go to the fallback itself.
30*/
31function BackButton(t0) {
32	const $ = (0, import_compiler_runtime$1.c)(11);
33	const { fallbackPath, referrer, size, label, className } = t0;
34	let t1;
35	if ($[0] !== fallbackPath || $[1] !== referrer) {
36		t1 = function handleClick() {
37			const parameterisedParent = `${window.location.origin}${fallbackPath}?`;
38			const destination = referrer?.includes(parameterisedParent) ? referrer : fallbackPath;
39			if (isInertiaPath(new URL(destination, window.location.origin).pathname)) router.visit(destination);
40			else window.location.assign(destination);
41		};
42		$[0] = fallbackPath;
43		$[1] = referrer;
44		$[2] = t1;
45	} else t1 = $[2];
46	const handleClick = t1;
47	const t2 = size && `back-box--${size}`;
48	let t3;
49	if ($[3] !== className || $[4] !== t2) {
50		t3 = cn("back-box", "btn-empty", t2, className);
51		$[3] = className;
52		$[4] = t2;
53		$[5] = t3;
54	} else t3 = $[5];
55	let t4;
56	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
57		t4 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Icon, {
58			icon: "arrow-left",
59			"aria-hidden": "true"
60		});
61		$[6] = t4;
62	} else t4 = $[6];
63	let t5;
64	if ($[7] !== handleClick || $[8] !== label || $[9] !== t3) {
65		t5 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("button", {
66			type: "button",
67			className: t3,
68			"aria-label": label,
69			onClick: handleClick,
70			children: t4
71		});
72		$[7] = handleClick;
73		$[8] = label;
74		$[9] = t3;
75		$[10] = t5;
76	} else t5 = $[10];
77	return t5;
78}
79var import_compiler_runtime$1, import_jsx_runtime$1;
80function init_back_button() {
81	return (init_back_button = __esmMin((() => {
82		import_compiler_runtime$1 = require_compiler_runtime();
83		init_dist$1();
84		init_utils();
85		init_icon();
86		init_inertia_bridge();
87		import_jsx_runtime$1 = require_jsx_runtime();
88	})))();
89}
90//#endregion
91//#region app/frontend/pages/LeadsSettings/Index.tsx
92function Index(t0) {
93	const $ = (0, import_compiler_runtime.c)(47);
94	const { automaticLeadVerification, sidebar, backFallbackPath, referrer } = t0;
95	const [checked, setChecked] = (0, import_react.useState)(automaticLeadVerification);
96	const [saving, setSaving] = (0, import_react.useState)(false);
97	useFlashToasts();
98	useScopedBodyClass("leads settings index pb-0");
99	let t1;
100	if ($[0] !== automaticLeadVerification || $[1] !== checked) {
101		t1 = function handleSubmit(event) {
102			event.preventDefault();
103			setSaving(true);
104			router.patch(settings_leads_path(), { user: { automatic_lead_verification: checked } }, {
105				onFinish: () => setSaving(false),
106				onError: () => {
107					setChecked(automaticLeadVerification);
108					toast.danger(t("js.leads.settings.save_error"));
109				}
110			});
111		};
112		$[0] = automaticLeadVerification;
113		$[1] = checked;
114		$[2] = t1;
115	} else t1 = $[2];
116	const handleSubmit = t1;
117	let t2;
118	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
119		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Head_default, { title: t("js.leads.settings.title") });
120		$[3] = t2;
121	} else t2 = $[3];
122	let t3;
123	if ($[4] !== sidebar) {
124		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
125			className: "dashboard-main__submenu",
126			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LeadsListSidebar, {
127				sidebar,
128				currentListId: 0,
129				activeTab: "people",
130				activeTabNavigates: true,
131				activeConfigEntry: "automatic-verifications",
132				onListCreated: _temp,
133				onFolderCreated: _temp2,
134				onReorder: _temp3
135			})
136		});
137		$[4] = sidebar;
138		$[5] = t3;
139	} else t3 = $[5];
140	let t4;
141	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
142		t4 = t("js.leads.settings.go_back");
143		$[6] = t4;
144	} else t4 = $[6];
145	let t5;
146	if ($[7] !== backFallbackPath || $[8] !== referrer) {
147		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BackButton, {
148			fallbackPath: backFallbackPath,
149			referrer,
150			size: "sm",
151			label: t4
152		});
153		$[7] = backFallbackPath;
154		$[8] = referrer;
155		$[9] = t5;
156	} else t5 = $[9];
157	let t6;
158	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
159		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
160			className: "board-box__title board-box__title--lg",
161			children: t("js.leads.settings.title")
162		});
163		$[10] = t6;
164	} else t6 = $[10];
165	let t7;
166	if ($[11] !== t5) {
167		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
168			className: "board-box__header",
169			children: [t5, t6]
170		});
171		$[11] = t5;
172		$[12] = t7;
173	} else t7 = $[12];
174	const t8 = checked && "active";
175	let t9;
176	if ($[13] !== t8) {
177		t9 = cn("block-checkbox-container", "checkbox-container", "block-lg", t8);
178		$[13] = t8;
179		$[14] = t9;
180	} else t9 = $[14];
181	let t10;
182	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
183		t10 = (event_0) => setChecked(event_0.target.checked);
184		$[15] = t10;
185	} else t10 = $[15];
186	let t11;
187	if ($[16] !== checked || $[17] !== saving) {
188		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Checkbox, {
189			id: "automatic-lead-verification-field",
190			name: "user[automatic_lead_verification]",
191			checked,
192			disabled: saving,
193			onChange: t10
194		});
195		$[16] = checked;
196		$[17] = saving;
197		$[18] = t11;
198	} else t11 = $[18];
199	let t12;
200	let t13;
201	if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
202		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
203			className: "checkbox-icon fas fa-check-square",
204			"aria-hidden": "true"
205		});
206		t13 = t("js.leads.settings.automatic_lead_verification");
207		$[19] = t12;
208		$[20] = t13;
209	} else {
210		t12 = $[19];
211		t13 = $[20];
212	}
213	let t14;
214	if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
215		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("strong", { children: [
216			t13,
217			" ",
218			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
219				className: "fas fa-shield-check",
220				"aria-hidden": "true"
221			})
222		] });
223		$[21] = t14;
224	} else t14 = $[21];
225	const t15 = checked ? "fa-check-square" : "fa-square";
226	let t16;
227	if ($[22] !== t15) {
228		t16 = cn("checkbox-icon", "fas", t15);
229		$[22] = t15;
230		$[23] = t16;
231	} else t16 = $[23];
232	let t17;
233	if ($[24] !== t16) {
234		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
235			className: t16,
236			"aria-hidden": "true"
237		});
238		$[24] = t16;
239		$[25] = t17;
240	} else t17 = $[25];
241	let t18;
242	let t19;
243	if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
244		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {});
245		t19 = t("js.leads.settings.description");
246		$[26] = t18;
247		$[27] = t19;
248	} else {
249		t18 = $[26];
250		t19 = $[27];
251	}
252	let t20;
253	if ($[28] !== t11 || $[29] !== t17 || $[30] !== t9) {
254		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
255			className: "form-group",
256			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
257				className: t9,
258				htmlFor: "automatic-lead-verification-field",
259				children: [
260					t11,
261					t12,
262					t14,
263					t17,
264					t18,
265					t19
266				]
267			})
268		});
269		$[28] = t11;
270		$[29] = t17;
271		$[30] = t9;
272		$[31] = t20;
273	} else t20 = $[31];
274	let t21;
275	if ($[32] !== saving) {
276		t21 = saving ? t("js.leads.settings.saving") : t("js.leads.settings.save");
277		$[32] = saving;
278		$[33] = t21;
279	} else t21 = $[33];
280	let t22;
281	if ($[34] !== saving || $[35] !== t21) {
282		t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
283			className: "mt-8",
284			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
285				type: "submit",
286				variant: "primary",
287				disabled: saving,
288				"data-loading": "none",
289				children: t21
290			})
291		});
292		$[34] = saving;
293		$[35] = t21;
294		$[36] = t22;
295	} else t22 = $[36];
296	let t23;
297	if ($[37] !== handleSubmit || $[38] !== t20 || $[39] !== t22) {
298		t23 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
299			onSubmit: handleSubmit,
300			children: [t20, t22]
301		});
302		$[37] = handleSubmit;
303		$[38] = t20;
304		$[39] = t22;
305		$[40] = t23;
306	} else t23 = $[40];
307	let t24;
308	if ($[41] !== t23 || $[42] !== t7) {
309		t24 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
310			className: "dashboard-main__content",
311			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
312				className: "board-box board-box--standalone mt-2",
313				children: [t7, t23]
314			})
315		});
316		$[41] = t23;
317		$[42] = t7;
318		$[43] = t24;
319	} else t24 = $[43];
320	let t25;
321	if ($[44] !== t24 || $[45] !== t3) {
322		t25 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t2, /* @__P
322URE__ */ (0, import_jsx_runtime.jsxs)("main", {
323			className: "dashboard-main",
324			children: [t3, t24]
325		})] });
326		$[44] = t24;
327		$[45] = t3;
328		$[46] = t25;
329	} else t25 = $[46];
330	return t25;
331}
332function _temp3() {
333	return router.reload({ only: ["sidebar", "flash"] });
334}
335function _temp2() {
336	return router.reload({ only: ["sidebar", "flash"] });
337}
338function _temp() {
339	return router.reload({ only: ["sidebar", "flash"] });
340}
341var import_compiler_runtime, import_react, import_jsx_runtime, t;
342function init_Index() {
343	return (init_Index = __esmMin((() => {
344		import_compiler_runtime = require_compiler_runtime();
345		import_react = require_react();
346		init_dist$1();
347		init_AppLayout();
348		init_button();
349		init_checkbox();
350		init_back_button();
351		init_useFlashToasts();
352		init_toast();
353		init_useScopedBodyClass();
354		init_LeadsListSidebar();
355		init_routes();
356		init_utils();
357		import_jsx_runtime = require_jsx_runtime();
358		t = (key) => window.i18n.t(key);
359		Index.layout = (page) => (0, import_react.createElement)(AppLayout, { navCollapsed: true }, page);
360	})))();
361}
362//#endregion
363init_Index();
364export { 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.