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] = "9adec763-b8af-4746-958d-1945af6b4b0c", e._sentryDebugIdIdentifier = "sentry-dbid-9adec763-b8af-4746-958d-1945af6b4b0c"); 7 } catch (e) {} 8})(); 9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js"; 10import { As as Input, Mi as init_routes, Os as Checkbox, Rn as bulk_finders_path, Xt as init_label, Yt as Label, at as AlertDescription, it as AlertContent, js as init_input, ks as init_checkbox, lt as init_alert, nt as Alert, rt as AlertActions, zn as bulk_path } from "./controllers-jdPQjaCB.js"; 11import { i as require_compiler_runtime, t as require_jsx_runtime } 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 { dn as PageHeaderBreadcrumbLink, fn as PageHeaderHeading, hn as init_page_header, ln as PageHeaderBreadcrumb, mn as PageHeaderTitle, sn as PageHeader, un as PageHeaderBreadcrumbItem } from "./turbo-mount-DM0tFk1M.js"; 16import { a as init_dist, l as router, s as usePage, t as Head_default } from "./dist-ZlUHm0R7.js"; 17import { n as useFlashMessages, t as init_useFlashMessages } from "./useFlashMessages-CaMVzoCv.js"; 18import { n as useLegacyBodyClass, t as init_useLegacyBodyClass } from "./useLegacyBodyClass-D667Iu64.js"; 19import { n as init_FileUploadArea, t as FileUploadArea } from "./FileUploadArea-D1RqFAnU.js"; 20import { n as init_NativeNavLink, t as NativeNavLink } from "./NativeNavLink-2L6wNIdg.js"; 21//#region app/frontend/pages/BulkFinders/New.tsx 22function New() { 23 const $ = (0, import_compiler_runtime.c)(58); 24 const { props } = usePage(); 25 useFlashMessages(props.flash); 26 useLegacyBodyClass("bulk_finders new"); 27 const [name, setName] = (0, import_react.useState)(props.name ?? ""); 28 const [file, setFile] = (0, import_react.useState)(null); 29 const [withSources, setWithSources] = (0, import_react.useState)(false); 30 const [skipRowsWithEmail, setSkipRowsWithEmail] = (0, import_react.useState)(true); 31 const [processing, setProcessing] = (0, import_react.useState)(false); 32 let t0; 33 if ($[0] !== file || $[1] !== name || $[2] !== processing || $[3] !== skipRowsWithEmail || $[4] !== withSources) { 34 t0 = function onSubmit(event) { 35 event.preventDefault(); 36 if (processing) return; 37 window.App?.analytics?.ga_track("Bulk Email Finder", "Creation"); 38 setProcessing(true); 39 router.post(bulk_finders_path(), { bulk_finder: { 40 name, 41 file, 42 with_sources: withSources ? "1" : "0", 43 skip_rows_with_email: skipRowsWithEmail ? "1" : "0" 44 } }, { onFinish: () => setProcessing(false) }); 45 }; 46 $[0] = file; 47 $[1] = name; 48 $[2] = processing; 49 $[3] = skipRowsWithEmail; 50 $[4] = withSources; 51 $[5] = t0; 52 } else t0 = $[5]; 53 const onSubmit = t0; 54 let t1; 55 if ($[6] === Symbol.for("react.memo_cache_sentinel")) { 56 t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Head_default, { title: "New Bulk Email Finder" }); 57 $[6] = t1; 58 } else t1 = $[6]; 59 let t2; 60 if ($[7] === Symbol.for("react.memo_cache_sentinel")) { 61 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderBreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderBreadcrumbLink, { 62 href: bulk_path(), 63 children: "Bulks" 64 }) }); 65 $[7] = t2; 66 } else t2 = $[7]; 67 let t3; 68 if ($[8] === Symbol.for("react.memo_cache_sentinel")) { 69 t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, { 70 notFull: true, 71 className: "mb-2", 72 children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageHeaderHeading, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageHeaderBreadcrumb, { children: [t2, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderBreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderBreadcrumbLink, { 73 href: bulk_finders_path(), 74 children: "Email Finder" 75 }) })] }
75), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderTitle, { children: "New" })] }) 76 }); 77 $[8] = t3; 78 } else t3 = $[8]; 79 let t4; 80 if ($[9] === Symbol.for("react.memo_cache_sentinel")) { 81 t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, { 82 htmlFor: "list-name-field", 83 children: "List name" 84 }); 85 $[9] = t4; 86 } else t4 = $[9]; 87 let t5; 88 if ($[10] === Symbol.for("react.memo_cache_sentinel")) { 89 t5 = (event_0) => setName(event_0.target.value); 90 $[10] = t5; 91 } else t5 = $[10]; 92 let t6; 93 if ($[11] !== name) { 94 t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, { 95 type: "text", 96 fullWidth: true, 97 id: "list-name-field", 98 placeholder: "Enter a nameâ¦", 99 autoFocus: true, 100 required: true, 101 value: name, 102 onChange: t5 103 }); 104 $[11] = name; 105 $[12] = t6; 106 } else t6 = $[12]; 107 let t7; 108 if ($[13] === Symbol.for("react.memo_cache_sentinel")) { 109 t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { 110 className: "mb-4", 111 children: "Upload your file" 112 }); 113 $[13] = t7; 114 } else t7 = $[13]; 115 let t8; 116 if ($[14] === Symbol.for("react.memo_cache_sentinel")) { 117 t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 118 className: "h-alert__icon-wrapper", 119 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { 120 icon: "info-circle", 121 className: "h-alert__icon", 122 "aria-hidden": "true" 123 }) 124 }); 125 $[14] = t8; 126 } else t8 = $[14]; 127 let t9; 128 if ($[15] === Symbol.for("react.memo_cache_sentinel")) { 129 t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Your file must include these columns: First Name, Last Name (or Full Name in one column), and Company Website (recommended) or Company Name." }); 130 $[15] = t9; 131 } else t9 = $[15]; 132 let t10; 133 if ($[16] === Symbol.for("react.memo_cache_sentinel")) { 134 t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { 135 variant: "info", 136 size: "small", 137 className: "mb-4", 138 children: [t8, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AlertContent, { children: [t9, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertActions, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, { 139 size: "sm", 140 variant: "link", 141 className: "mb-2", 142 asChild: true, 143 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeNavLink, { 144 href: TEMPLATE_PATH, 145 children: "Download a sample" 146 }) 147 }) })] })] 148 }); 149 $[16] = t10; 150 } else t10 = $[16]; 151 let t11; 152 if ($[17] === Symbol.for("react.memo_cache_sentinel")) { 153 t11 = ["csv", "txt"]; 154 $[17] = t11; 155 } else t11 = $[17]; 156 let t12; 157 let t13; 158 let t14; 159 if ($[18] === Symbol.for("react.memo_cache_sentinel")) { 160 t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { 161 className: "file-area__icon", 162 "aria-hidden": "true", 163 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { icon: "upload" }) 164 }); 165 t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { 166 className: "file-area__title", 167 children: "Select a file" 168 }); 169 t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { 170 className: "file-area__hint", 171 children: "CSV or TXT" 172 }); 173 $[18] = t12; 174 $[19] = t13; 175 $[20] = t14; 176 } else { 177 t12 = $[18]; 178 t13 = $[19]; 179 t14 = $[20]; 180 } 181 let t15; 182 if ($[21] !== file) { 183 t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 184 id: "bulk-upload", 185 children: [ 186 t7, 187 t10,
188 /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FileUploadArea, { 189 file, 190 onFileChange: setFile, 191 acceptedExtensions: t11, 192 maxSize: 1e7, 193 inputId: "bulk-finder-file-field", 194 children: [ 195 t12, 196 t13, 197 t14 198 ] 199 }) 200 ] 201 }); 202 $[21] = file; 203 $[22] = t15; 204 } else t15 = $[22]; 205 let t16; 206 if ($[23] === Symbol.for("react.memo_cache_sentinel")) { 207 t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { 208 className: "mb-4", 209 children: "Options" 210 }); 211 $[23] = t16; 212 } else t16 = $[23]; 213 let t17; 214 if ($[24] === Symbol.for("react.memo_cache_sentinel")) { 215 t17 = (event_1) => setWithSources(event_1.target.checked); 216 $[24] = t17; 217 } else t17 = $[24]; 218 let t18; 219 if ($[25] !== withSources) { 220 t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 221 className: "h-form-group__input", 222 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Checkbox, { 223 id: "with-sources-field", 224 checked: withSources, 225 onChange: t17 226 }) 227 }); 228 $[25] = withSources; 229 $[26] = t18; 230 } else t18 = $[26]; 231 let t19; 232 if ($[27] === Symbol.for("react.memo_cache_sentinel")) { 233 t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 234 className: "h-form-group__infos", 235 children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, { 236 htmlFor: "with-sources-field", 237 children: "Include sources for the emails." 238 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 239 className: "h-hint", 240 children: "If this option is checked, the URLs of the sources will be included in additional columns. Only the active sources where the email address can still be found are returned." 241 })] 242 }); 243 $[27] = t19; 244 } else t19 = $[27]; 245 let t20; 246 if ($[28] !== t18) { 247 t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 248 className: "h-form-group mb-4", 249 children: [t18, t19] 250 }); 251 $[28] = t18; 252 $[29] = t20; 253 } else t20 = $[29]; 254 let t21; 255 if ($[30] === Symbol.for("react.memo_cache_sentinel")) { 256 t21 = (event_2) => setSkipRowsWithEmail(event_2.target.checked); 257 $[30] = t21; 258 } else t21 = $[30]; 259 let t22; 260 if ($[31] !== skipRowsWithEmail) { 261 t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 262 className: "h-form-group__input", 263 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Checkbox, { 264 id: "skip-rows-with-email-field", 265 checked: skipRowsWithEmail, 266 onChange: t21 267 }) 268 }); 269 $[31] = skipRowsWithEmail; 270 $[32] = t22; 271 } else t22 = $[32]; 272 let t23; 273 if ($[33] === Symbol.for("react.memo_cache_sentinel")) { 274 t23 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 275 className: "h-form-group__infos", 276 children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, { 277 htmlFor: "skip-rows-with-email-field", 278 children: "Skip rows that already have email addresses." 279 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 280 className: "h-hint", 281 children: "If this option is checked, the Email Finder won't run on rows where an email address is already present." 282 })] 283 }); 284 $[33] = t23; 285 } else t23 = $[33]; 286 let t24; 287 if ($[34] !== t22) { 288 t24 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 289 className: "h-form-group", 290 children: [t22, t23] 291 }); 292 $[34] = t22; 293 $[35] = t24; 294 } else t24 = $[35]; 295 let t25; 296 if ($[36] !== t20 || $[37] !== t24) { 297 t25 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 298 id: "bulk-filters", 299 children: [ 300 t16, 301 t20, 302 t24 303 ] 304 }); 305 $[36] = t20; 306 $[37] = t24; 307 $[38] = t25; 308 } else t25 = $[38]; 309 const t26 = processing ? "Uploadingâ¦" : "Upload"; 310 let t27; 311 if ($[39] !== processing || $[40] !== t26) { 312 t27 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, { 313 type: "submit", 314 variant: "primary", 315 size: "lg", 316 disabled: processing, 317 children: t26 318 }); 319 $[39] = processing; 320 $[40] = t26; 321 $[41] = t27; 322 } else t27 = $[41]; 323 let t28; 324 if ($[42] === Symbol.for("react.memo_cache_sentinel")) { 325 t28 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: "For better results, it's recommended to use the domain name instead of the company name." }); 326 $[42] = t28; 327 } else t28 = $[42]; 328 let t29; 329 if ($[43] !== props.rowsLimitHint) { 330 t29 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: props.rowsLimitHint }); 331 $[43] = props.rowsLimitHint; 332 $[44] = t29; 333 } else t29 = $[44]; 334 let t30; 335 let t31; 336 if ($[45] === Symbol.for("react.memo_cache_sentinel")) { 337 t30 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: "Some special or unex
337pected characters may be deleted in the file." }); 338 t31 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: "Duplicate rows will be skipped." }); 339 $[45] = t30; 340 $[46] = t31; 341 } else { 342 t30 = $[45]; 343 t31 = $[46]; 344 } 345 let t32; 346 if ($[47] !== t29) { 347 t32 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 348 className: "button-container-hint", 349 children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("ul", { children: [ 350 t28, 351 t29, 352 t30, 353 t31 354 ] }) 355 }); 356 $[47] = t29; 357 $[48] = t32; 358 } else t32 = $[48]; 359 let t33; 360 if ($[49] !== t27 || $[50] !== t32) { 361 t33 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 362 className: "button-container", 363 children: [t27, t32] 364 }); 365 $[49] = t27; 366 $[50] = t32; 367 $[51] = t33; 368 } else t33 = $[51]; 369 let t34; 370 if ($[52] !== onSubmit || $[53] !== t15 || $[54] !== t25 || $[55] !== t33 || $[56] !== t6) { 371 t34 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 372 className: "bulk_finders new", 373 children: [t1, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 374 className: "board-box board-box--unboxed mb-0", 375 children: [t3, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", { 376 id: "bulk-finder-form", 377 onSubmit, 378 children: [ 379 t4, 380 t6, 381 t15, 382 t25, 383 t33 384 ] 385 })] 386 })] 387 }); 388 $[52] = onSubmit; 389 $[53] = t15; 390 $[54] = t25; 391 $[55] = t33; 392 $[56] = t6; 393 $[57] = t34; 394 } else t34 = $[57]; 395 return t34; 396} 397var import_compiler_runtime, import_react, import_jsx_runtime, TEMPLATE_PATH; 398function init_New() { 399 return (init_New = __esmMin((() => { 400 import_compiler_runtime = require_compiler_runtime(); 401 init_dist(); 402 import_react = require_react(); 403 init_alert(); 404 init_button(); 405 init_checkbox(); 406 init_icon(); 407 init_input(); 408 init_label(); 409 init_page_header(); 410 init_routes(); 411 init_FileUploadArea(); 412 init_NativeNavLink(); 413 init_useFlashMessages(); 414 init_useLegacyBodyClass(); 415 import_jsx_runtime = require_jsx_runtime(); 416 TEMPLATE_PATH = "/files/bulk-finder-template.csv"; 417 })))(); 418} 419//#endregion 420init_New(); 421export { New 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.