PageSourceSearch

https://hunter.io/assets/card_form_display-CNB6zkhP.js

js hunter.io collected 2026-09-24 07:51:32 UTC 5,996 bytes, 164 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] = "644c5c7b-d31c-40b4-a5d1-f4ed7da1b381", e._sentryDebugIdIdentifier = "sentry-dbid-644c5c7b-d31c-40b4-a5d1-f4ed7da1b381");
7	} catch (e) {}
8})();
9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js";
10import { A as init_form_helper, As as Input, Xt as init_label, Yt as Label, js as init_input, k as FormHelper } 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 { a as init_visa, i as mastercard_default, l as init_react_stripe_esm, n as init_amex, o as visa_default, r as init_mastercard, s as CardElement, t as amex_default } from "./amex-BqugFW5P.js";
16//#region app/frontend/react/components/email_accounts_center/add_email_account_slots_modal/constants.ts
17var STRIPE_CARD_FONT_SIZE;
18function init_constants() {
19	return (init_constants = __esmMin((() => {
20		STRIPE_CARD_FONT_SIZE = "15px";
21	})))();
22}
23//#endregion
24//#region app/frontend/react/components/email_accounts_center/add_email_account_slots_modal/card_form_display.tsx
25function CardFormDisplay({ cardholderName, setCardholderName, onCancel, showBackButton, showCardElement = false }) {
26	const cardElementOptions = (0, import_react.useMemo)(() => FormHelper.elementStyles(STRIPE_CARD_FONT_SIZE), []);
27	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
28		className: "new-card-form",
29		children: [
30			showBackButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
31				className: "mb-3",
32				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
33					variant: "linkGrey",
34					size: "sm",
35					type: "button",
36					onClick: onCancel,
37					className: "p-0",
38					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
39						icon: "arrow-left",
40						size: "sm"
41					}), i18n.t("js.email_accounts_center.add_slots.use_existing_card")]
42				})
43			}),
44			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, {
45				htmlFor: "cardholder-name",
46				className: "mb-1",
47				children: i18n.t("js.email_accounts_center.add_slots.cardholder_name")
48			}),
49			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
50				fullWidth: true,
51				id: "cardholder-name",
52				type: "text",
53				value: cardholderName,
54				onChange: (e) => setCardholderName(e.target.value),
55				required: true,
56				autoComplete: "cc-name"
57			}),
58			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("fieldset", {
59				className: "form-group mt-4",
60				children: [
61					/* @__PURE__ */ (0, import_jsx_runtime.jsx)("legend", {
62						className: "h-label",
63						children: i18n.t("js.email_accounts_center.add_slots.credit_card")
64					}),
65					/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
66						className: "stripe-card-field mt-2",
67						children: showCardElement ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
68							id: "card-field",
69							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardElement, { options: cardElementOptions })
70						}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
71							className: "text-hint text-sm",
72							children: i18n.t("js.email_accounts_center.add_slots.stripe_loading")
73						})
74					}),
75					/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
76						className: "text-2xs text-hint mt-2 d-flex align-items-center gap-1",
77						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
78							icon: "lock-alt",
79							variant: "regular",
80							size: "xs"
81						}), i18n.t("js.email_accounts_center.add_slots.secured_and_encrypted")]
82					})
83				]
84			})
85		]
86	});
87}
88function CardLogo(t0) {
89	const $ = (0, import_compiler_runtime.c)(7);
90	const { cardType } = t0;
91	const type = cardType?.toLowerCase();
92	if (type === "visa") {
93		let t1;
94		if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
95			t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
96				src: visa_default,
97				alt: "Visa",
98				className: "card-logo"
99			});
100			$[0] = t1;
101		} else t1 = $[0];
102		return t1;
103	}
104	if (type === "mastercard") {
105		let t1;
106		if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
107			t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
108				src: mastercard_default,
109				alt: "Mastercard",
110				className: "card-logo"
111			});
112			$[1] = t1;
113		} else t1 = $[1];
114		return t1;
115	}
116	if (type === "amex" || type === "american express" || type === "american_express") {
117		let t1;
118		if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
119			t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
120				src: amex_default,
121				alt: "American Express",
122				className: "card-logo"
123			});
124			$[2] = t1;
125		} else t1 = $[2];
126		return t1;
127	}
128	let t1;
129	if ($[3] !== cardType) {
130		t1 = cardType?.slice(0, 4) || "Card";
131		$[3] = cardType;
132		$[4] = t1;
133	} else t1 = $[4];
134	let t2;
135	if ($[5] !== t1) {
136		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
137			className: "card-logo-fallback text-xs-medium",
138			children: t1
139		});
140		$[5] = t1;
141		$[6] = t2;
142	} else t2 = $[6];
143	return t2;
144}
145var import_compiler_runtime, import_react, import_jsx_runtime;
146function init_card_form_display() {
147	return (init_card_form_display = __esmMin((() => {
148		import_compiler_runtime = require_compiler_runtime();
149		import_react = require_react();
150		init_react_stripe_esm();
151		init_button();
152		init_icon();
153		init_input();
154		init_label();
155		init_form_helper();
156		init_constants();
157		init_visa();
158		init_mastercard();
159		init_amex();
160		import_jsx_runtime = require_jsx_runtime();
161	})))();
162}
163//#endregion
164export { CardLogo as n, init_card_form_display as r, CardFormDisplay 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.