@usgb/forms 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +128 -142
- package/dist/forms-manifest.1.0.3.json +439 -0
- package/dist/forms-manifest.json +218 -84
- package/dist/index.js +642 -582
- package/dist/src/contract/createIdempotencyKey.d.ts +2 -0
- package/dist/src/contract/createIdempotencyKey.d.ts.map +1 -0
- package/dist/src/contract/createStubAdapter.d.ts.map +1 -1
- package/dist/src/contract/types.d.ts +15 -15
- package/dist/src/contract/types.d.ts.map +1 -1
- package/dist/src/definitions/consents.d.ts +10 -0
- package/dist/src/definitions/consents.d.ts.map +1 -1
- package/dist/src/definitions/index.d.ts +4 -3
- package/dist/src/definitions/index.d.ts.map +1 -1
- package/dist/src/definitions/manifest.d.ts +14 -1
- package/dist/src/definitions/manifest.d.ts.map +1 -1
- package/dist/src/definitions/types.d.ts +35 -5
- package/dist/src/definitions/types.d.ts.map +1 -1
- package/dist/src/form/FormShell.d.ts +2 -1
- package/dist/src/form/FormShell.d.ts.map +1 -1
- package/dist/src/form/UsgbForm.d.ts +5 -4
- package/dist/src/form/UsgbForm.d.ts.map +1 -1
- package/dist/src/form/chunkFields.d.ts +1 -1
- package/dist/src/form/kinds/LeadKindForm.d.ts +1 -1
- package/dist/src/form/kinds/LeadKindForm.d.ts.map +1 -1
- package/dist/src/form/kinds/NewsletterKindForm.d.ts +1 -1
- package/dist/src/form/kinds/NewsletterKindForm.d.ts.map +1 -1
- package/dist/src/form/kinds/types.d.ts +3 -1
- package/dist/src/form/kinds/types.d.ts.map +1 -1
- package/dist/src/form/useUsgbFormSession.d.ts +3 -4
- package/dist/src/form/useUsgbFormSession.d.ts.map +1 -1
- package/dist/src/index.d.ts +5 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/ui/Button.d.ts.map +1 -1
- package/dist/src/ui/ConsentField.d.ts.map +1 -1
- package/dist/usgb-forms.1.0.3.js +44 -0
- package/dist/usgb-forms.css +98 -15
- package/dist/usgb-forms.js +11 -11
- package/forms-manifest.json +218 -84
- package/package.json +1 -1
- package/dist/forms-manifest.1.0.2.json +0 -305
- package/dist/src/contract/collectContext.d.ts +0 -9
- package/dist/src/contract/collectContext.d.ts.map +0 -1
- package/dist/usgb-forms.1.0.2.js +0 -44
package/dist/index.js
CHANGED
|
@@ -1,51 +1,77 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as s, Fragment as ee, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useId as K, useMemo as D, useState as te, useRef as G, useEffect as j, forwardRef as R } from "react";
|
|
3
|
+
import { validate as ne } from "email-validator";
|
|
4
4
|
import { useForm as re } from "react-hook-form";
|
|
5
|
-
import
|
|
6
|
-
const oe = "1.0.0", se = { version: "1.0.0", transport: "server-proxy", payloadShape: "data-and-context" }, ae = { page_url: { destination: "form_submission_url", category: "page", collection: "server", required: !0, states: ["collected", "unavailable"], description: "Canonical landing-page URL at submission time" }, page_title: { destination: "pageName", category: "page", collection: "server", required: !1, states: ["collected", "unavailable"] }, referrer: { destination: "referrer", category: "page", collection: "browser", required: !1, states: ["collected", "unavailable"] }, first_touch_url: { destination: "crossDomain_landing_url", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_source: { destination: "utm_source", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_medium: { destination: "utm_medium", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_campaign: { destination: "utm_campaign", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_term: { destination: "utm_term", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_content: { destination: "utm_content", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gclid: { destination: "gclid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, msclkid: { destination: "msclkid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gbraid: { destination: "gbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, wbraid: { destination: "wbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, hubspot_utk: { destination: "hubspot_utk", category: "identity", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_client_id: { destination: "ga_client_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_session_id: { destination: "session_id_start", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, snowplow_id: { destination: "snowplow_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, vwo_uuid: { destination: "vwo_uuid", category: "experiment", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, user_agent: { destination: "header_http_client_details", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] }, ip_address: { destination: "ipAddress", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] } }, le = { "main-investors-kit": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, supportedHosts: ["pwa", "wordpress"], fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], trackingFields: ["page_url", "page_title", "referrer", "first_touch_url", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "gclid", "msclkid", "gbraid", "wbraid", "hubspot_utk", "ga_client_id", "ga_session_id", "snowplow_id", "vwo_uuid", "user_agent", "ip_address"], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "1", required: !1 }, { definitionId: "lead-sms", definitionVersion: "1", required: !1 }, { definitionId: "lead-tospp", definitionVersion: "1", required: !1 }], editor: { label: "Main Investors Kit", description: "Standard lead form: name, email, phone, plus optional TCPA, marketing SMS, and terms/privacy checkboxes. Use on full-width landing pages and PWA kit/sidebar placements.", whenToUse: "Default kit request with optional consent checkboxes. Do not use for affiliate landers or IRA-specific leads.", whenNotToUse: "Affiliate pages (separate definition). IRA kit (separate definition when added). Clickwrap-only kit (`main-investors-kit-notice`).", supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar", "two-column"] } }, "main-investors-kit-notice": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, supportedHosts: ["pwa", "wordpress"], fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], trackingFields: ["page_url", "page_title", "referrer", "first_touch_url", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "gclid", "msclkid", "gbraid", "wbraid", "hubspot_utk", "ga_client_id", "ga_session_id", "snowplow_id", "vwo_uuid", "user_agent", "ip_address"], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "1" }], editor: { label: "Main Investors Kit (clickwrap)", description: "Same fields as Main Investors Kit with a clickwrap notice only — no consent checkboxes.", whenToUse: "Kit request where submit acknowledges legal docs via notice copy instead of checkboxes.", whenNotToUse: "Placements that need TCPA / marketing SMS / terms checkboxes (`main-investors-kit`).", supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar", "two-column"] } }, newsletter: { definitionVersion: "1", kind: "newsletter", flow: { type: "single" }, supportedHosts: ["pwa"], fields: [{ name: "email", required: !0 }], trackingFields: ["page_url", "page_title", "referrer", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"], ctaLabel: "SUBSCRIBE", editor: { label: "Newsletter", description: "Email-only newsletter signup. No TCPA consent.", whenToUse: "Footer or landing newsletter capture where only an email is required.", whenNotToUse: "Lead kits that need name, phone, or TCPA consent.", supportedAppearances: ["on-light", "on-dark"], supportedVariants: [] } } }, ce = { hosts: ["pwa", "wordpress"], mayProvide: ["browser cookies", "URL parameters", "page and placement context", "host/store identity"], mustNotDefine: ["new tracking keys", "destination property names", "consent definitions", "form fields", "submission endpoints"] }, de = {
|
|
7
|
-
schemaVersion:
|
|
5
|
+
import A from "classnames";
|
|
6
|
+
const ie = "1.1.0", oe = { version: "1.0.0", transport: "server-proxy" }, ae = { page_url: { destination: "form_submission_url", category: "page", collection: "server", required: !0, states: ["collected", "unavailable"], description: "Canonical landing-page URL at submission time" }, page_title: { destination: "pageName", category: "page", collection: "server", required: !1, states: ["collected", "unavailable"] }, referrer: { destination: "referrer", category: "page", collection: "browser", required: !1, states: ["collected", "unavailable"] }, first_touch_url: { destination: "crossDomain_landing_url", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_source: { destination: "utm_source", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_medium: { destination: "utm_medium", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_campaign: { destination: "utm_campaign", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_term: { destination: "utm_term", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_content: { destination: "utm_content", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gclid: { destination: "gclid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, msclkid: { destination: "msclkid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gbraid: { destination: "gbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, wbraid: { destination: "wbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, hubspot_utk: { destination: "hubspot_utk", category: "identity", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_client_id: { destination: "ga_client_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_session_id: { destination: "session_id_start", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, snowplow_id: { destination: "snowplow_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, vwo_uuid: { destination: "vwo_uuid", category: "experiment", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, user_agent: { destination: "header_http_client_details", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] }, ip_address: { destination: "ipAddress", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] } }, se = { appearance: { label: "Appearance", control: "select", reactProp: "appearance", attribute: "appearance", required: !1, default: "on-light", valuesFrom: "supportedAppearances", description: "Recolors the form for a light or dark host surface. It never paints a background, padding, or radius — the host container owns those." }, variant: { label: "Size variant", control: "select", reactProp: "variant", attribute: "variant", required: !1, default: "dense", valuesFrom: "supportedVariants", description: "Select exactly one size treatment: `dense`, `large`, or `sidebar`." }, twoColumn: { label: "Two-column name row", control: "checkbox", reactProp: "twoColumn", attribute: "two-column", required: !1, default: !1, description: "Places grouped name fields in two columns when the form container is wide enough." }, heading: { label: "Heading", control: "text", reactProp: "heading", attribute: "heading", required: !1, description: "Placement copy above the fields. Omit to render no heading." }, subheading: { label: "Subheading", control: "text", reactProp: "subheading", attribute: "subheading", required: !1, description: "Supporting copy under the heading. Omit to render none." }, ctaLabel: { label: "Button label", control: "text", reactProp: "ctaLabel", attribute: "cta", required: !1, defaultFrom: "ctaLabel", description: "Overrides the catalog submit label for this placement." }, legalUrls: { label: "Legal document URLs", control: "url-group", reactProp: "legalUrls", attributes: { clientAgreement: "client-agreement-url", privacyPolicy: "privacy-policy-url", userAgreement: "user-agreement-url", marketLossPolicy: "market-loss-policy-url", electronicDisclaimer: "electronic-disclaimer-url", termsOfSale: "terms-of-sale-url" }, required: !0, valuesFrom: "requiredLegalUrls", description: "Host CMS hrefs for the documents named in this form's consent copy. Every key in `requiredLegalUrls` must be a non-empty URL or the form does not render." }, successMessage: { label: "Thank-you message", control: "text", reactProp: "successMessage", attribute: "success-message", required: !1, description: "Inline copy shown after accept. Ignored when a thank-you URL is set; omitted values fall back to a package default line." }, successUrl: { label: "Thank-you URL", control: "url", reactProp: "successUrl", attribute: "success-url", required: !1, description: "Redirect after accept. A full navigation can cut off analytics beacons — prefer measuring the conversion on the thank-you page." } }, le = { "magento-fik": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "1", required: !1 }, { definitionId: "lead-sms", definitionVersion: "1", required: !1 }, { definitionId: "lead-tospp", definitionVersion: "1", required: !1 }], editor: { label: "Magento FIK", description: "First name, last name, and email required; phone optional. Optional checkboxes: transactional SMS (lead-tcpa v1), marketing SMS (lead-sms v1), and terms and privacy (lead-tospp v1).", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["userAgreement", "privacyPolicy"] } }, "magento-ira-kick-article": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !0 }], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "2", required: !1 }], editor: { label: "Magento IRA Kick Article", description: "First name, last name, email, and phone required. Optional telephone and SMS consent checkbox with linked terms and privacy (lead-tcpa v2).", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["userAgreement", "privacyPolicy"] } }, "magento-fik-blog-rail": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !0 }], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "2", required: !1 }], editor: { label: "Magento FIK Blog Rail", description: "First name, last name, email, and phone required. Optional telephone and SMS consent checkbox with linked terms and privacy (lead-tcpa v2).", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["userAgreement", "privacyPolicy"] } }, "main-investors-kit-notice": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], ctaLabel: "CLAIM YOUR OFFER", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "Main Investors Kit (clickwrap)", description: "First name, last name, and email required; phone optional. Clickwrap notice only (lead-clickwrap v2); no consent checkboxes.", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["privacyPolicy", "userAgreement"] } }, newsletter: { definitionVersion: "1", kind: "newsletter", flow: { type: "single" }, fields: [{ name: "email", required: !0 }], ctaLabel: "SUBSCRIBE", editor: { label: "Newsletter", description: "Email only. No consent.", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "heading", "subheading", "ctaLabel", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: [], requiredLegalUrls: [] } } }, ce = { hosts: ["pwa", "wordpress"], mayProvide: ["legal document URLs", "host/store identity"], mustNotDefine: ["consent definitions", "form fields", "submission endpoints"] }, de = {
|
|
7
|
+
schemaVersion: ie,
|
|
8
8
|
package: { name: "@usgb/forms", compatiblePackageVersions: "^1.0.2" },
|
|
9
|
-
submissionContract:
|
|
9
|
+
submissionContract: oe,
|
|
10
10
|
trackingRegistry: ae,
|
|
11
|
+
editorOptions: se,
|
|
11
12
|
forms: le,
|
|
12
13
|
hostAdapterContract: ce
|
|
13
|
-
},
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
}, N = de;
|
|
15
|
+
function z(t) {
|
|
16
|
+
return N.forms[t];
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
return Object.entries(
|
|
18
|
+
function je() {
|
|
19
|
+
return Object.entries(N.forms).map(([t, e]) => ({
|
|
19
20
|
formId: t,
|
|
20
21
|
definition: e
|
|
21
22
|
}));
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function ze(t) {
|
|
25
|
+
const e = z(t);
|
|
26
|
+
if (!e)
|
|
27
|
+
return [];
|
|
28
|
+
const n = [];
|
|
29
|
+
for (const i of e.editor.options) {
|
|
30
|
+
const o = N.editorOptions[i];
|
|
31
|
+
if (!o)
|
|
32
|
+
continue;
|
|
33
|
+
const r = o.valuesFrom ? [...e.editor[o.valuesFrom]] : void 0;
|
|
34
|
+
r && !r.length || n.push({
|
|
35
|
+
...o,
|
|
36
|
+
key: i,
|
|
37
|
+
values: r,
|
|
38
|
+
defaultValue: o.defaultFrom ? e[o.defaultFrom] : o.default
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return n;
|
|
42
|
+
}
|
|
43
|
+
function W(t, e) {
|
|
24
44
|
return typeof t == "string" ? { content: t, language: t } : t(e);
|
|
25
45
|
}
|
|
26
|
-
function
|
|
46
|
+
function Y(t, e) {
|
|
27
47
|
return `${t}@${e}`;
|
|
28
48
|
}
|
|
29
|
-
function
|
|
49
|
+
function x(t) {
|
|
30
50
|
return (e) => ({
|
|
31
51
|
language: t.map(
|
|
32
52
|
(n) => typeof n == "string" ? n : `${n.label} (${e[n.href] ?? ""})`
|
|
33
53
|
).join(""),
|
|
34
|
-
content: /* @__PURE__ */
|
|
35
|
-
(n, i) => typeof n == "string" ? n : /* @__PURE__ */
|
|
54
|
+
content: /* @__PURE__ */ s(ee, { children: t.map(
|
|
55
|
+
(n, i) => typeof n == "string" ? n : /* @__PURE__ */ h(
|
|
36
56
|
"a",
|
|
37
57
|
{
|
|
38
58
|
href: e[n.href],
|
|
39
59
|
target: "_blank",
|
|
40
60
|
rel: "noreferrer",
|
|
41
|
-
children:
|
|
61
|
+
children: [
|
|
62
|
+
n.label,
|
|
63
|
+
/* @__PURE__ */ h("span", { className: "usgb-field-label--sr-only", children: [
|
|
64
|
+
" ",
|
|
65
|
+
"(opens in a new tab)"
|
|
66
|
+
] })
|
|
67
|
+
]
|
|
42
68
|
},
|
|
43
69
|
`${n.href}-${i}`
|
|
44
70
|
)
|
|
45
71
|
) })
|
|
46
72
|
});
|
|
47
73
|
}
|
|
48
|
-
const
|
|
74
|
+
const ue = {
|
|
49
75
|
definitionId: "lead-tcpa",
|
|
50
76
|
definitionVersion: "1",
|
|
51
77
|
type: "checkbox",
|
|
@@ -54,7 +80,22 @@ const me = {
|
|
|
54
80
|
requiredLegalUrls: [],
|
|
55
81
|
languageKey: "tcpa_consent_language",
|
|
56
82
|
copy: "By checking, you are allowing to receive transactional/informational SMS communications regarding account notifications, customer care, etc, from U.S. Gold Bureau. Messages frequency may vary. Data rates may apply, reply STOP to opt-out"
|
|
57
|
-
},
|
|
83
|
+
}, me = {
|
|
84
|
+
definitionId: "lead-tcpa",
|
|
85
|
+
definitionVersion: "2",
|
|
86
|
+
type: "checkbox",
|
|
87
|
+
name: "tcpa_form_consent_granted",
|
|
88
|
+
grantDateField: "tcpa_form_opt_in_date",
|
|
89
|
+
requiredLegalUrls: ["userAgreement", "privacyPolicy"],
|
|
90
|
+
languageKey: "tcpa_consent_language",
|
|
91
|
+
copy: x([
|
|
92
|
+
"By checking the box you authorize United States Gold Bureau to provide you with telephone calls or SMS messages at the phone number provided, including the use of automatic telephone dialing systems, and you agree to our ",
|
|
93
|
+
{ href: "userAgreement", label: "terms and conditions" },
|
|
94
|
+
" and ",
|
|
95
|
+
{ href: "privacyPolicy", label: "privacy policy" },
|
|
96
|
+
". Calls are recorded and may be monitored."
|
|
97
|
+
])
|
|
98
|
+
}, pe = {
|
|
58
99
|
definitionId: "lead-sms",
|
|
59
100
|
definitionVersion: "1",
|
|
60
101
|
type: "checkbox",
|
|
@@ -62,21 +103,21 @@ const me = {
|
|
|
62
103
|
requiredLegalUrls: [],
|
|
63
104
|
languageKey: "sms_consent_language",
|
|
64
105
|
copy: "By checking, you are allowing to receive promotional/marketing SMS communications from U.S. Gold Bureau. Frequency may vary. Data rates may apply. Reply HELP for help or STOP to opt-out."
|
|
65
|
-
},
|
|
106
|
+
}, fe = {
|
|
66
107
|
definitionId: "lead-tospp",
|
|
67
108
|
definitionVersion: "1",
|
|
68
109
|
type: "checkbox",
|
|
69
110
|
name: "tospp_form_consent_granted",
|
|
70
111
|
requiredLegalUrls: ["userAgreement", "privacyPolicy"],
|
|
71
112
|
languageKey: "tospp_consent_language",
|
|
72
|
-
copy:
|
|
113
|
+
copy: x([
|
|
73
114
|
"By checking, I accept ",
|
|
74
115
|
{ href: "userAgreement", label: "Terms of Conditions" },
|
|
75
116
|
" & ",
|
|
76
117
|
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
77
118
|
"."
|
|
78
119
|
])
|
|
79
|
-
},
|
|
120
|
+
}, ge = {
|
|
80
121
|
definitionId: "lead-clickwrap",
|
|
81
122
|
definitionVersion: "1",
|
|
82
123
|
type: "notice",
|
|
@@ -88,7 +129,7 @@ const me = {
|
|
|
88
129
|
"termsOfSale"
|
|
89
130
|
],
|
|
90
131
|
languageKey: "clickwrap_consent_language",
|
|
91
|
-
copy:
|
|
132
|
+
copy: x([
|
|
92
133
|
"By clicking the button, I agree to be bound by your ",
|
|
93
134
|
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
94
135
|
", ",
|
|
@@ -101,30 +142,45 @@ const me = {
|
|
|
101
142
|
{ href: "termsOfSale", label: "Terms & Conditions of Sale" },
|
|
102
143
|
"."
|
|
103
144
|
])
|
|
145
|
+
}, he = {
|
|
146
|
+
definitionId: "lead-clickwrap",
|
|
147
|
+
definitionVersion: "2",
|
|
148
|
+
type: "notice",
|
|
149
|
+
requiredLegalUrls: ["privacyPolicy", "userAgreement"],
|
|
150
|
+
languageKey: "clickwrap_consent_language",
|
|
151
|
+
copy: x([
|
|
152
|
+
"By submitting, you agree to United States Gold Bureau’s ",
|
|
153
|
+
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
154
|
+
" and ",
|
|
155
|
+
{ href: "userAgreement", label: "Terms & Conditions" },
|
|
156
|
+
", including dispute resolution, and consent to receive texts and calls for informational, marketing and sales purposes, even if your number is on a do not call list, using automated dialing, voice or AI tech. Consent not required for purchase. Msg & data rates may apply. Calls may be recorded and monitored. Opt out anytime."
|
|
157
|
+
])
|
|
104
158
|
};
|
|
105
|
-
function
|
|
159
|
+
function be(...t) {
|
|
106
160
|
return Object.fromEntries(
|
|
107
161
|
t.map((e) => [
|
|
108
|
-
|
|
162
|
+
Y(e.definitionId, e.definitionVersion),
|
|
109
163
|
e
|
|
110
164
|
])
|
|
111
165
|
);
|
|
112
166
|
}
|
|
113
|
-
const
|
|
167
|
+
const ye = be(
|
|
168
|
+
ue,
|
|
114
169
|
me,
|
|
170
|
+
pe,
|
|
115
171
|
fe,
|
|
116
172
|
ge,
|
|
117
|
-
|
|
173
|
+
he
|
|
118
174
|
);
|
|
119
|
-
function
|
|
120
|
-
return
|
|
175
|
+
function ve(t, e) {
|
|
176
|
+
return ye[Y(t, e)];
|
|
121
177
|
}
|
|
122
|
-
function
|
|
178
|
+
function H(t) {
|
|
123
179
|
if (!(t != null && t.length))
|
|
124
180
|
return [];
|
|
125
181
|
const e = [];
|
|
126
182
|
for (const n of t) {
|
|
127
|
-
const i =
|
|
183
|
+
const i = ve(
|
|
128
184
|
n.definitionId,
|
|
129
185
|
n.definitionVersion
|
|
130
186
|
);
|
|
@@ -136,59 +192,59 @@ function W(t) {
|
|
|
136
192
|
}
|
|
137
193
|
return e;
|
|
138
194
|
}
|
|
139
|
-
function
|
|
195
|
+
function ke(t, e, n, i) {
|
|
140
196
|
if (!t.length)
|
|
141
197
|
return;
|
|
142
|
-
const
|
|
143
|
-
for (const
|
|
144
|
-
const { language:
|
|
145
|
-
if (
|
|
146
|
-
const
|
|
147
|
-
|
|
198
|
+
const o = {};
|
|
199
|
+
for (const r of t) {
|
|
200
|
+
const { language: l } = W(r.copy, n);
|
|
201
|
+
if (o[r.languageKey] = l, r.type === "checkbox") {
|
|
202
|
+
const a = !!e[r.name];
|
|
203
|
+
o[r.name] = a, a && r.grantDateField && (o[r.grantDateField] = i);
|
|
148
204
|
}
|
|
149
205
|
}
|
|
150
|
-
return
|
|
206
|
+
return o;
|
|
151
207
|
}
|
|
152
|
-
function
|
|
208
|
+
function we(t) {
|
|
153
209
|
const e = /* @__PURE__ */ new Set();
|
|
154
210
|
for (const n of t)
|
|
155
211
|
for (const i of n.requiredLegalUrls)
|
|
156
212
|
e.add(i);
|
|
157
213
|
return [...e];
|
|
158
214
|
}
|
|
159
|
-
function
|
|
215
|
+
function qe(t) {
|
|
160
216
|
return t.type === "checkbox";
|
|
161
217
|
}
|
|
162
|
-
function
|
|
218
|
+
function $(t) {
|
|
163
219
|
return (e, n) => n ? e.trim().length > 0 || `${t} is required` : !0;
|
|
164
220
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
221
|
+
const _e = /^[2-9]\d{2}[2-9]\d{6}$/;
|
|
222
|
+
function Z(t) {
|
|
167
223
|
let e = t.replace(/\D/g, "");
|
|
168
|
-
return e.length === 11 && e.startsWith("1") && (e = e.slice(1)), e.length !== 10 || !
|
|
224
|
+
return e.length === 11 && e.startsWith("1") && (e = e.slice(1)), e.length !== 10 || !_e.test(e) ? null : e;
|
|
169
225
|
}
|
|
170
|
-
function
|
|
226
|
+
function Le(t) {
|
|
171
227
|
const e = t.trim();
|
|
172
228
|
if (!e) return "";
|
|
173
|
-
const n =
|
|
229
|
+
const n = Z(e);
|
|
174
230
|
if (!n) return e;
|
|
175
231
|
const i = e.replace(/\D/g, "");
|
|
176
232
|
return i.length === 11 && i.startsWith("1") ? `1${n}` : n;
|
|
177
233
|
}
|
|
178
|
-
const
|
|
234
|
+
const Se = {
|
|
179
235
|
firstname: {
|
|
180
236
|
name: "firstname",
|
|
181
237
|
control: "text",
|
|
182
238
|
label: "First name",
|
|
183
239
|
autoComplete: "given-name",
|
|
184
|
-
validate:
|
|
240
|
+
validate: $("First name")
|
|
185
241
|
},
|
|
186
242
|
lastname: {
|
|
187
243
|
name: "lastname",
|
|
188
244
|
control: "text",
|
|
189
245
|
label: "Last name",
|
|
190
246
|
autoComplete: "family-name",
|
|
191
|
-
validate:
|
|
247
|
+
validate: $("Last name")
|
|
192
248
|
},
|
|
193
249
|
email: {
|
|
194
250
|
name: "email",
|
|
@@ -197,7 +253,7 @@ const qe = {
|
|
|
197
253
|
autoComplete: "email",
|
|
198
254
|
validate: (t, e) => {
|
|
199
255
|
const n = t.trim();
|
|
200
|
-
return n ?
|
|
256
|
+
return n ? ne(n) || "Enter a valid email" : e ? "Email is required" : !0;
|
|
201
257
|
}
|
|
202
258
|
},
|
|
203
259
|
phone: {
|
|
@@ -207,77 +263,38 @@ const qe = {
|
|
|
207
263
|
autoComplete: "tel",
|
|
208
264
|
validate: (t, e) => {
|
|
209
265
|
const n = t.trim();
|
|
210
|
-
return n ?
|
|
266
|
+
return n ? Z(n) ? !0 : "Enter a valid phone number" : e ? "Phone is required" : !0;
|
|
211
267
|
},
|
|
212
|
-
serialize:
|
|
268
|
+
serialize: Le
|
|
213
269
|
}
|
|
214
270
|
};
|
|
215
271
|
function B(t) {
|
|
216
|
-
return
|
|
272
|
+
return Se[t];
|
|
217
273
|
}
|
|
218
|
-
function
|
|
274
|
+
function J({
|
|
219
275
|
className: t,
|
|
220
276
|
appearance: e,
|
|
221
277
|
variantValue: n,
|
|
222
|
-
|
|
223
|
-
|
|
278
|
+
twoColumn: i,
|
|
279
|
+
kind: o,
|
|
280
|
+
children: r
|
|
224
281
|
}) {
|
|
225
|
-
return /* @__PURE__ */
|
|
282
|
+
return /* @__PURE__ */ s(
|
|
226
283
|
"div",
|
|
227
284
|
{
|
|
228
285
|
className: `usgb-form ${t ?? ""}`,
|
|
229
286
|
"data-appearance": e,
|
|
230
287
|
...n ? { "data-variant": n } : {},
|
|
231
|
-
"data-
|
|
232
|
-
|
|
288
|
+
...i ? { "data-layout": "two-column" } : {},
|
|
289
|
+
"data-kind": o,
|
|
290
|
+
children: r
|
|
233
291
|
}
|
|
234
292
|
);
|
|
235
293
|
}
|
|
236
|
-
|
|
237
|
-
"hubspot_utk",
|
|
238
|
-
"ga_client_id",
|
|
239
|
-
"ga_session_id",
|
|
240
|
-
"snowplow_id",
|
|
241
|
-
"vwo_uuid"
|
|
242
|
-
];
|
|
243
|
-
function C(t, e) {
|
|
244
|
-
return t === "collected" && e != null && e !== "" ? { status: "collected", value: e } : { status: t };
|
|
245
|
-
}
|
|
246
|
-
function Le(t) {
|
|
247
|
-
const { trackingFields: e, trackingRegistry: n, adapter: i } = t, a = i.getTrackingHints(), s = {};
|
|
248
|
-
for (const r of e) {
|
|
249
|
-
const o = n[r];
|
|
250
|
-
if (!o) continue;
|
|
251
|
-
const c = new Set(o.states);
|
|
252
|
-
if (o.collection === "server") {
|
|
253
|
-
s[r] = C("unavailable");
|
|
254
|
-
continue;
|
|
255
|
-
}
|
|
256
|
-
if (o.collection === "browser") {
|
|
257
|
-
if (r === "referrer" && typeof document < "u") {
|
|
258
|
-
const f = document.referrer;
|
|
259
|
-
s[r] = f ? C("collected", f) : C("unavailable");
|
|
260
|
-
} else
|
|
261
|
-
s[r] = C("unavailable");
|
|
262
|
-
continue;
|
|
263
|
-
}
|
|
264
|
-
const u = a[r];
|
|
265
|
-
if (u != null && u !== "") {
|
|
266
|
-
s[r] = C("collected", u);
|
|
267
|
-
continue;
|
|
268
|
-
}
|
|
269
|
-
if (Ce.includes(r) && c.has("consent-withheld")) {
|
|
270
|
-
s[r] = C("unavailable");
|
|
271
|
-
continue;
|
|
272
|
-
}
|
|
273
|
-
s[r] = C("unavailable");
|
|
274
|
-
}
|
|
275
|
-
return s;
|
|
276
|
-
}
|
|
277
|
-
function Ne() {
|
|
294
|
+
function Ce() {
|
|
278
295
|
return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `usgb-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
279
296
|
}
|
|
280
|
-
function
|
|
297
|
+
function Ue(t, e) {
|
|
281
298
|
const n = {};
|
|
282
299
|
for (const i of t)
|
|
283
300
|
n[i.name] = "";
|
|
@@ -285,124 +302,120 @@ function Ee(t, e) {
|
|
|
285
302
|
n[i] = !1;
|
|
286
303
|
return n;
|
|
287
304
|
}
|
|
288
|
-
function
|
|
305
|
+
function M(t) {
|
|
289
306
|
const e = t == null ? void 0 : t.trim();
|
|
290
307
|
return e || void 0;
|
|
291
308
|
}
|
|
292
|
-
function
|
|
309
|
+
function Pe({
|
|
293
310
|
formId: t,
|
|
294
311
|
definition: e,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
onAccepted: c,
|
|
302
|
-
onFailed: u
|
|
312
|
+
legalUrls: n,
|
|
313
|
+
successUrl: i,
|
|
314
|
+
adapter: o,
|
|
315
|
+
analytics: r,
|
|
316
|
+
onAccepted: l,
|
|
317
|
+
onFailed: a
|
|
303
318
|
}) {
|
|
304
|
-
const
|
|
305
|
-
() =>
|
|
319
|
+
const d = K(), u = D(
|
|
320
|
+
() => H(e.consents) ?? [],
|
|
306
321
|
[e.consents]
|
|
307
|
-
),
|
|
308
|
-
() =>
|
|
309
|
-
[
|
|
310
|
-
),
|
|
311
|
-
() =>
|
|
312
|
-
[e.fields,
|
|
322
|
+
), f = D(
|
|
323
|
+
() => u.filter(qe).map((p) => p.name),
|
|
324
|
+
[u]
|
|
325
|
+
), b = D(
|
|
326
|
+
() => Ue(e.fields, f),
|
|
327
|
+
[e.fields, f]
|
|
313
328
|
), {
|
|
314
|
-
register:
|
|
315
|
-
handleSubmit:
|
|
316
|
-
formState: { errors:
|
|
329
|
+
register: g,
|
|
330
|
+
handleSubmit: C,
|
|
331
|
+
formState: { errors: w }
|
|
317
332
|
} = re({
|
|
318
|
-
defaultValues:
|
|
319
|
-
}), [
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}, [
|
|
323
|
-
const
|
|
324
|
-
const
|
|
325
|
-
for (const
|
|
326
|
-
|
|
327
|
-
for (const
|
|
328
|
-
|
|
329
|
-
return
|
|
330
|
-
}, [
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
333
|
+
defaultValues: b
|
|
334
|
+
}), [m, _] = te({ kind: "idle" }), y = G(!1);
|
|
335
|
+
j(() => {
|
|
336
|
+
r == null || r({ type: "view", formId: t });
|
|
337
|
+
}, [r, t]);
|
|
338
|
+
const c = D(() => {
|
|
339
|
+
const p = {};
|
|
340
|
+
for (const k of e.fields)
|
|
341
|
+
p[k.name] = `${d}-${k.name}`;
|
|
342
|
+
for (const k of f)
|
|
343
|
+
p[k] = `${d}-${k}`;
|
|
344
|
+
return p;
|
|
345
|
+
}, [d, e.fields, f]), v = D(() => {
|
|
346
|
+
const p = {};
|
|
347
|
+
for (const k of u)
|
|
348
|
+
k.type === "notice" && (p[k.definitionId] = `${d}-notice-${k.definitionId}`);
|
|
349
|
+
return p;
|
|
350
|
+
}, [d, u]), U = C(
|
|
351
|
+
async (p) => {
|
|
352
|
+
if (y.current)
|
|
353
|
+
return;
|
|
354
|
+
y.current = !0, _({ kind: "submitting" }), r == null || r({ type: "submit_attempt", formId: t });
|
|
355
|
+
const q = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), P = {};
|
|
356
|
+
for (const L of e.fields) {
|
|
357
|
+
const S = p[L.name];
|
|
358
|
+
if (typeof S != "string") {
|
|
359
|
+
P[L.name] = !!S;
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
const F = B(L.name);
|
|
363
|
+
P[L.name] = F != null && F.serialize ? F.serialize(S) : S.trim();
|
|
364
|
+
}
|
|
365
|
+
const E = ke(
|
|
366
|
+
u,
|
|
367
|
+
p,
|
|
368
|
+
n ?? {},
|
|
369
|
+
q
|
|
370
|
+
), I = {
|
|
371
|
+
formId: t,
|
|
372
|
+
definitionVersion: e.definitionVersion,
|
|
373
|
+
submissionContractVersion: N.submissionContract.version,
|
|
374
|
+
idempotencyKey: Ce(),
|
|
375
|
+
data: P,
|
|
376
|
+
consents: E
|
|
377
|
+
};
|
|
378
|
+
try {
|
|
379
|
+
const L = await o.submit(I);
|
|
380
|
+
if (L.status === "accepted") {
|
|
381
|
+
r == null || r({ type: "success", formId: t, status: "accepted" }), l == null || l(I), _({ kind: "accepted" });
|
|
382
|
+
const S = M(i);
|
|
383
|
+
S && typeof window < "u" && window.location.assign(S);
|
|
384
|
+
} else
|
|
385
|
+
y.current = !1, _({
|
|
386
|
+
kind: "failed",
|
|
387
|
+
message: L.message ?? "Submission failed"
|
|
388
|
+
}), r == null || r({
|
|
389
|
+
type: "failure",
|
|
390
|
+
formId: t,
|
|
391
|
+
message: L.message
|
|
392
|
+
}), a == null || a(I, L.message);
|
|
393
|
+
} catch (L) {
|
|
394
|
+
y.current = !1;
|
|
395
|
+
const S = L instanceof Error ? L.message : "Submission failed";
|
|
396
|
+
_({ kind: "failed", message: S }), r == null || r({ type: "failure", formId: t, message: S }), a == null || a(I, S);
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
(p) => {
|
|
400
|
+
r == null || r({
|
|
334
401
|
type: "validation_failure",
|
|
335
402
|
formId: t,
|
|
336
|
-
fields:
|
|
403
|
+
fields: Object.keys(p)
|
|
337
404
|
});
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
o == null || o({ type: "submit_attempt", formId: t }), h({ kind: "submitting" });
|
|
341
|
-
const F = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), J = Le({
|
|
342
|
-
trackingFields: e.trackingFields,
|
|
343
|
-
trackingRegistry: I.trackingRegistry,
|
|
344
|
-
adapter: r
|
|
345
|
-
}), A = {};
|
|
346
|
-
for (const k of e.fields) {
|
|
347
|
-
const S = w[k.name];
|
|
348
|
-
if (typeof S != "string") {
|
|
349
|
-
A[k.name] = !!S;
|
|
350
|
-
continue;
|
|
351
|
-
}
|
|
352
|
-
const U = B(k.name);
|
|
353
|
-
A[k.name] = U != null && U.serialize ? U.serialize(S) : S.trim();
|
|
354
|
-
}
|
|
355
|
-
const Q = _e(
|
|
356
|
-
b,
|
|
357
|
-
w,
|
|
358
|
-
a ?? {},
|
|
359
|
-
F
|
|
360
|
-
), T = {
|
|
361
|
-
formId: t,
|
|
362
|
-
definitionVersion: e.definitionVersion,
|
|
363
|
-
submissionContractVersion: I.submissionContract.version,
|
|
364
|
-
idempotencyKey: Ne(),
|
|
365
|
-
data: A,
|
|
366
|
-
consents: Q,
|
|
367
|
-
context: {
|
|
368
|
-
host: r.host,
|
|
369
|
-
source: n,
|
|
370
|
-
campaign: i,
|
|
371
|
-
page: typeof window < "u" ? window.location.href : void 0,
|
|
372
|
-
tracking: J
|
|
373
|
-
}
|
|
374
|
-
};
|
|
375
|
-
try {
|
|
376
|
-
const k = await r.submit(T);
|
|
377
|
-
if (k.status === "accepted") {
|
|
378
|
-
o == null || o({ type: "success", formId: t, status: "accepted" }), c == null || c(T), h({ kind: "accepted" });
|
|
379
|
-
const S = R(s);
|
|
380
|
-
S && typeof window < "u" && window.location.assign(S);
|
|
381
|
-
} else
|
|
382
|
-
h({
|
|
383
|
-
kind: "failed",
|
|
384
|
-
message: k.message ?? "Submission failed"
|
|
385
|
-
}), o == null || o({
|
|
386
|
-
type: "failure",
|
|
387
|
-
formId: t,
|
|
388
|
-
message: k.message
|
|
389
|
-
}), u == null || u(T, k.message);
|
|
390
|
-
} catch (k) {
|
|
391
|
-
const S = k instanceof Error ? k.message : "Submission failed";
|
|
392
|
-
h({ kind: "failed", message: S }), o == null || o({ type: "failure", formId: t, message: S }), u == null || u(T, S);
|
|
393
405
|
}
|
|
394
|
-
|
|
406
|
+
);
|
|
395
407
|
return {
|
|
396
|
-
register:
|
|
397
|
-
errors:
|
|
398
|
-
fieldIds:
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
408
|
+
register: g,
|
|
409
|
+
errors: w,
|
|
410
|
+
fieldIds: c,
|
|
411
|
+
noticeIds: v,
|
|
412
|
+
consentDefs: u,
|
|
413
|
+
uiState: m,
|
|
414
|
+
onSubmit: U
|
|
402
415
|
};
|
|
403
416
|
}
|
|
404
|
-
function
|
|
405
|
-
return /* @__PURE__ */
|
|
417
|
+
function De() {
|
|
418
|
+
return /* @__PURE__ */ h(
|
|
406
419
|
"svg",
|
|
407
420
|
{
|
|
408
421
|
className: "usgb-field-error-icon",
|
|
@@ -414,7 +427,7 @@ function Pe() {
|
|
|
414
427
|
"aria-hidden": "true",
|
|
415
428
|
focusable: "false",
|
|
416
429
|
children: [
|
|
417
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ s(
|
|
418
431
|
"path",
|
|
419
432
|
{
|
|
420
433
|
d: "M7 13C10.3137 13 13 10.3137 13 7C13 3.68629 10.3137 1 7 1C3.68629 1 1 3.68629 1 7C1 10.3137 3.68629 13 7 13Z",
|
|
@@ -423,7 +436,7 @@ function Pe() {
|
|
|
423
436
|
strokeWidth: "0.7"
|
|
424
437
|
}
|
|
425
438
|
),
|
|
426
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ s(
|
|
427
440
|
"path",
|
|
428
441
|
{
|
|
429
442
|
d: "M6.31724 3.75816L6.42662 8.16962H7.57506L7.68444 3.75816H6.31724ZM7.00084 10.4483C7.41555 10.4483 7.74367 10.1338 7.74367 9.73277C7.74367 9.33173 7.41555 9.01727 7.00084 9.01727C6.58613 9.01727 6.258 9.33173 6.258 9.73277C6.258 10.1338 6.58613 10.4483 7.00084 10.4483Z",
|
|
@@ -434,8 +447,8 @@ function Pe() {
|
|
|
434
447
|
}
|
|
435
448
|
);
|
|
436
449
|
}
|
|
437
|
-
function
|
|
438
|
-
return /* @__PURE__ */
|
|
450
|
+
function Te() {
|
|
451
|
+
return /* @__PURE__ */ s(
|
|
439
452
|
"svg",
|
|
440
453
|
{
|
|
441
454
|
className: "usgb-form-checkbox-mark",
|
|
@@ -446,7 +459,7 @@ function xe() {
|
|
|
446
459
|
xmlns: "http://www.w3.org/2000/svg",
|
|
447
460
|
"aria-hidden": "true",
|
|
448
461
|
focusable: "false",
|
|
449
|
-
children: /* @__PURE__ */
|
|
462
|
+
children: /* @__PURE__ */ s(
|
|
450
463
|
"path",
|
|
451
464
|
{
|
|
452
465
|
d: "M1 3.5L2.33333 4.75L3.66667 6L9 1",
|
|
@@ -459,180 +472,201 @@ function xe() {
|
|
|
459
472
|
}
|
|
460
473
|
);
|
|
461
474
|
}
|
|
462
|
-
function
|
|
475
|
+
function O({
|
|
463
476
|
id: t,
|
|
464
477
|
message: e,
|
|
465
478
|
className: n
|
|
466
479
|
}) {
|
|
467
|
-
return e ? /* @__PURE__ */
|
|
480
|
+
return e ? /* @__PURE__ */ h(
|
|
468
481
|
"span",
|
|
469
482
|
{
|
|
470
483
|
id: t,
|
|
471
484
|
role: "alert",
|
|
472
|
-
className:
|
|
485
|
+
className: A("usgb-field-error", n),
|
|
473
486
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ s(De, {}),
|
|
475
488
|
e
|
|
476
489
|
]
|
|
477
490
|
}
|
|
478
491
|
) : null;
|
|
479
492
|
}
|
|
480
|
-
const
|
|
481
|
-
function({ id: e, label: n, errorMessage: i, required:
|
|
482
|
-
const
|
|
483
|
-
return /* @__PURE__ */
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
/* @__PURE__ */
|
|
493
|
+
const Ae = R(
|
|
494
|
+
function({ id: e, label: n, errorMessage: i, required: o, className: r, ...l }, a) {
|
|
495
|
+
const d = i ? `${e}-error` : void 0;
|
|
496
|
+
return /* @__PURE__ */ h("div", { className: "usgb-form-group", children: [
|
|
497
|
+
/* @__PURE__ */ h("div", { className: "usgb-consent-row", children: [
|
|
498
|
+
/* @__PURE__ */ h("span", { className: "usgb-form-checkbox-wrap", children: [
|
|
499
|
+
/* @__PURE__ */ s(
|
|
487
500
|
"input",
|
|
488
501
|
{
|
|
489
|
-
|
|
502
|
+
...l,
|
|
503
|
+
ref: a,
|
|
490
504
|
id: e,
|
|
491
505
|
type: "checkbox",
|
|
492
|
-
className:
|
|
506
|
+
className: A("usgb-form-checkbox", r),
|
|
493
507
|
"aria-invalid": i ? !0 : void 0,
|
|
494
|
-
"aria-describedby":
|
|
495
|
-
"aria-required":
|
|
496
|
-
...r
|
|
508
|
+
"aria-describedby": d,
|
|
509
|
+
"aria-required": o || void 0
|
|
497
510
|
}
|
|
498
511
|
),
|
|
499
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ s(Te, {})
|
|
500
513
|
] }),
|
|
501
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ h("label", { htmlFor: e, className: "usgb-consent-copy", children: [
|
|
515
|
+
n,
|
|
516
|
+
o ? /* @__PURE__ */ s(
|
|
517
|
+
"span",
|
|
518
|
+
{
|
|
519
|
+
className: "usgb-field-label-asterisk",
|
|
520
|
+
"aria-hidden": "true",
|
|
521
|
+
children: "*"
|
|
522
|
+
}
|
|
523
|
+
) : null
|
|
524
|
+
] })
|
|
502
525
|
] }),
|
|
503
|
-
/* @__PURE__ */
|
|
526
|
+
/* @__PURE__ */ s(O, { id: d, message: i })
|
|
504
527
|
] });
|
|
505
528
|
}
|
|
506
|
-
),
|
|
529
|
+
), Q = R(
|
|
507
530
|
function({
|
|
508
531
|
className: e,
|
|
509
532
|
variant: n = "primary",
|
|
510
533
|
loading: i = !1,
|
|
511
|
-
disabled:
|
|
512
|
-
children:
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
534
|
+
disabled: o = !1,
|
|
535
|
+
children: r,
|
|
536
|
+
onClick: l,
|
|
537
|
+
type: a = "button",
|
|
538
|
+
...d
|
|
539
|
+
}, u) {
|
|
540
|
+
const f = o || i, b = o && !i ? !0 : void 0;
|
|
541
|
+
return /* @__PURE__ */ s(
|
|
516
542
|
"button",
|
|
517
543
|
{
|
|
518
|
-
ref:
|
|
519
|
-
type:
|
|
520
|
-
className:
|
|
544
|
+
ref: u,
|
|
545
|
+
type: a,
|
|
546
|
+
className: A(
|
|
521
547
|
"usgb-btn",
|
|
522
548
|
n === "primary" && "usgb-btn-primary",
|
|
523
549
|
e
|
|
524
550
|
),
|
|
525
|
-
|
|
551
|
+
...d,
|
|
552
|
+
disabled: b,
|
|
553
|
+
"aria-disabled": f || void 0,
|
|
526
554
|
"aria-busy": i || void 0,
|
|
527
|
-
|
|
528
|
-
|
|
555
|
+
onClick: (g) => {
|
|
556
|
+
if (f) {
|
|
557
|
+
g.preventDefault();
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
l == null || l(g);
|
|
561
|
+
},
|
|
562
|
+
children: i ? "Submitting…" : r
|
|
529
563
|
}
|
|
530
564
|
);
|
|
531
565
|
}
|
|
532
566
|
);
|
|
533
|
-
function
|
|
567
|
+
function Ee(t) {
|
|
534
568
|
const e = [];
|
|
535
569
|
let n = 0;
|
|
536
570
|
for (; n < t.length; ) {
|
|
537
571
|
const i = t[n];
|
|
538
572
|
if (i.group) {
|
|
539
|
-
const
|
|
540
|
-
for (; n < t.length && t[n].group ===
|
|
541
|
-
|
|
542
|
-
e.push({ type: "group", group:
|
|
573
|
+
const o = i.group, r = [];
|
|
574
|
+
for (; n < t.length && t[n].group === o; )
|
|
575
|
+
r.push(t[n]), n += 1;
|
|
576
|
+
e.push({ type: "group", group: o, fields: r });
|
|
543
577
|
continue;
|
|
544
578
|
}
|
|
545
579
|
e.push({ type: "field", field: i }), n += 1;
|
|
546
580
|
}
|
|
547
581
|
return e;
|
|
548
582
|
}
|
|
549
|
-
function
|
|
583
|
+
function Ie({
|
|
550
584
|
htmlFor: t,
|
|
551
585
|
children: e,
|
|
552
586
|
className: n,
|
|
553
587
|
required: i
|
|
554
588
|
}) {
|
|
555
|
-
return /* @__PURE__ */
|
|
589
|
+
return /* @__PURE__ */ h("label", { htmlFor: t, className: A("usgb-field-label", n), children: [
|
|
556
590
|
e,
|
|
557
|
-
i ? /* @__PURE__ */
|
|
591
|
+
i ? /* @__PURE__ */ s("span", { className: "usgb-field-label-asterisk", "aria-hidden": "true", children: "*" }) : null
|
|
558
592
|
] });
|
|
559
593
|
}
|
|
560
|
-
function
|
|
594
|
+
function Fe(t) {
|
|
561
595
|
return t.replace(/\b\w/g, (e) => e.toUpperCase());
|
|
562
596
|
}
|
|
563
|
-
const
|
|
597
|
+
const Ne = R(
|
|
564
598
|
function({
|
|
565
599
|
id: e,
|
|
566
600
|
label: n,
|
|
567
601
|
type: i = "text",
|
|
568
|
-
errorMessage:
|
|
569
|
-
required:
|
|
570
|
-
hideLabel:
|
|
571
|
-
placeholderCase:
|
|
572
|
-
showError:
|
|
602
|
+
errorMessage: o,
|
|
603
|
+
required: r,
|
|
604
|
+
hideLabel: l = !1,
|
|
605
|
+
placeholderCase: a = "upper",
|
|
606
|
+
showError: d = !0,
|
|
573
607
|
className: u,
|
|
574
608
|
placeholder: f,
|
|
575
609
|
...b
|
|
576
|
-
},
|
|
577
|
-
const
|
|
578
|
-
return /* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
-
|
|
610
|
+
}, g) {
|
|
611
|
+
const C = o ? `${e}-error` : void 0, w = l ? `${n}${r ? "*" : ""}` : f, m = l && w ? a === "title" ? Fe(w) : w.toUpperCase() : w;
|
|
612
|
+
return /* @__PURE__ */ h("div", { className: "usgb-form-group", children: [
|
|
613
|
+
/* @__PURE__ */ s(
|
|
614
|
+
Ie,
|
|
581
615
|
{
|
|
582
616
|
htmlFor: e,
|
|
583
|
-
required:
|
|
584
|
-
className:
|
|
617
|
+
required: r,
|
|
618
|
+
className: l ? "usgb-field-label--sr-only" : void 0,
|
|
585
619
|
children: n
|
|
586
620
|
}
|
|
587
621
|
),
|
|
588
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ s(
|
|
589
623
|
"input",
|
|
590
624
|
{
|
|
591
|
-
ref:
|
|
625
|
+
ref: g,
|
|
592
626
|
id: e,
|
|
593
627
|
type: i,
|
|
594
|
-
className:
|
|
628
|
+
className: A(
|
|
595
629
|
"usgb-field-control",
|
|
596
|
-
|
|
630
|
+
o && "usgb-field-invalid",
|
|
597
631
|
u
|
|
598
632
|
),
|
|
599
633
|
placeholder: m,
|
|
600
|
-
"aria-invalid":
|
|
601
|
-
"aria-describedby":
|
|
602
|
-
"aria-required":
|
|
634
|
+
"aria-invalid": o ? !0 : void 0,
|
|
635
|
+
"aria-describedby": C,
|
|
636
|
+
"aria-required": r || void 0,
|
|
603
637
|
...b
|
|
604
638
|
}
|
|
605
639
|
),
|
|
606
|
-
|
|
640
|
+
d ? /* @__PURE__ */ s(O, { id: C, message: o }) : null
|
|
607
641
|
] });
|
|
608
642
|
}
|
|
609
643
|
);
|
|
610
|
-
function
|
|
644
|
+
function V({
|
|
611
645
|
fieldRef: t,
|
|
612
646
|
fieldIds: e,
|
|
613
647
|
register: n,
|
|
614
648
|
errors: i,
|
|
615
|
-
hideLabel:
|
|
616
|
-
placeholderCase:
|
|
617
|
-
showError:
|
|
649
|
+
hideLabel: o,
|
|
650
|
+
placeholderCase: r,
|
|
651
|
+
showError: l = !0
|
|
618
652
|
}) {
|
|
619
|
-
const
|
|
620
|
-
if (!
|
|
621
|
-
const
|
|
622
|
-
return /* @__PURE__ */
|
|
623
|
-
|
|
653
|
+
const a = B(t.name);
|
|
654
|
+
if (!a) return null;
|
|
655
|
+
const d = i[t.name], u = typeof (d == null ? void 0 : d.message) == "string" ? d.message : void 0;
|
|
656
|
+
return /* @__PURE__ */ s(
|
|
657
|
+
Ne,
|
|
624
658
|
{
|
|
625
659
|
id: e[t.name],
|
|
626
|
-
label:
|
|
627
|
-
type:
|
|
660
|
+
label: a.label,
|
|
661
|
+
type: a.control,
|
|
628
662
|
required: t.required,
|
|
629
|
-
hideLabel:
|
|
630
|
-
placeholderCase:
|
|
631
|
-
showError:
|
|
632
|
-
autoComplete:
|
|
663
|
+
hideLabel: o,
|
|
664
|
+
placeholderCase: r,
|
|
665
|
+
showError: l,
|
|
666
|
+
autoComplete: a.autoComplete,
|
|
633
667
|
errorMessage: u,
|
|
634
668
|
...n(t.name, {
|
|
635
|
-
validate: (f) =>
|
|
669
|
+
validate: (f) => a.validate(
|
|
636
670
|
typeof f == "string" ? f : "",
|
|
637
671
|
t.required
|
|
638
672
|
)
|
|
@@ -640,225 +674,252 @@ function M({
|
|
|
640
674
|
}
|
|
641
675
|
);
|
|
642
676
|
}
|
|
643
|
-
function
|
|
677
|
+
function xe({
|
|
644
678
|
definition: t,
|
|
645
|
-
|
|
679
|
+
variant: e,
|
|
646
680
|
ctaLabel: n,
|
|
647
681
|
legalUrls: i,
|
|
648
|
-
session:
|
|
682
|
+
session: o,
|
|
683
|
+
headingId: r
|
|
649
684
|
}) {
|
|
650
|
-
const {
|
|
651
|
-
|
|
685
|
+
const {
|
|
686
|
+
register: l,
|
|
687
|
+
errors: a,
|
|
688
|
+
fieldIds: d,
|
|
689
|
+
noticeIds: u,
|
|
690
|
+
consentDefs: f,
|
|
691
|
+
uiState: b,
|
|
692
|
+
onSubmit: g
|
|
693
|
+
} = o, C = D(
|
|
694
|
+
() => Ee(t.fields),
|
|
652
695
|
[t.fields]
|
|
653
|
-
),
|
|
654
|
-
return /* @__PURE__ */
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
696
|
+
), w = e === "sidebar", m = e === "dense" || w, _ = w ? "title" : "upper", y = Object.values(u).join(" ");
|
|
697
|
+
return /* @__PURE__ */ h(
|
|
698
|
+
"form",
|
|
699
|
+
{
|
|
700
|
+
onSubmit: g,
|
|
701
|
+
noValidate: !0,
|
|
702
|
+
...r ? { "aria-labelledby": r } : {},
|
|
703
|
+
children: [
|
|
704
|
+
C.map((c) => c.type === "group" ? /* @__PURE__ */ s(
|
|
705
|
+
"div",
|
|
706
|
+
{
|
|
707
|
+
className: "usgb-form-grid",
|
|
708
|
+
children: c.fields.map((v) => /* @__PURE__ */ s(
|
|
709
|
+
V,
|
|
710
|
+
{
|
|
711
|
+
fieldRef: v,
|
|
712
|
+
fieldIds: d,
|
|
713
|
+
register: l,
|
|
714
|
+
errors: a,
|
|
715
|
+
hideLabel: m,
|
|
716
|
+
placeholderCase: _
|
|
717
|
+
},
|
|
718
|
+
v.name
|
|
719
|
+
))
|
|
720
|
+
},
|
|
721
|
+
`group-${c.group}-${c.fields.map((v) => v.name).join("-")}`
|
|
722
|
+
) : /* @__PURE__ */ s(
|
|
723
|
+
V,
|
|
661
724
|
{
|
|
662
|
-
fieldRef:
|
|
663
|
-
fieldIds:
|
|
664
|
-
register:
|
|
665
|
-
errors:
|
|
666
|
-
hideLabel:
|
|
725
|
+
fieldRef: c.field,
|
|
726
|
+
fieldIds: d,
|
|
727
|
+
register: l,
|
|
728
|
+
errors: a,
|
|
729
|
+
hideLabel: m,
|
|
667
730
|
placeholderCase: _
|
|
668
731
|
},
|
|
669
|
-
|
|
670
|
-
))
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
732
|
+
c.field.name
|
|
733
|
+
)),
|
|
734
|
+
f.map((c) => {
|
|
735
|
+
const { content: v } = W(
|
|
736
|
+
c.copy,
|
|
737
|
+
i ?? {}
|
|
738
|
+
);
|
|
739
|
+
if (c.type === "notice")
|
|
740
|
+
return /* @__PURE__ */ s(
|
|
741
|
+
"p",
|
|
742
|
+
{
|
|
743
|
+
id: u[c.definitionId],
|
|
744
|
+
className: "usgb-consent-copy usgb-consent-notice",
|
|
745
|
+
children: v
|
|
746
|
+
},
|
|
747
|
+
c.definitionId
|
|
748
|
+
);
|
|
749
|
+
const U = a[c.name], p = typeof (U == null ? void 0 : U.message) == "string" ? U.message : void 0;
|
|
750
|
+
return /* @__PURE__ */ s(
|
|
751
|
+
Ae,
|
|
752
|
+
{
|
|
753
|
+
id: d[c.name],
|
|
754
|
+
label: v,
|
|
755
|
+
required: c.required,
|
|
756
|
+
errorMessage: p,
|
|
757
|
+
...l(c.name, {
|
|
758
|
+
required: c.required ? "This field is required" : !1
|
|
759
|
+
})
|
|
760
|
+
},
|
|
761
|
+
c.name
|
|
762
|
+
);
|
|
763
|
+
}),
|
|
764
|
+
/* @__PURE__ */ s(
|
|
765
|
+
Q,
|
|
766
|
+
{
|
|
767
|
+
type: "submit",
|
|
768
|
+
loading: b.kind === "submitting",
|
|
769
|
+
"aria-describedby": y || void 0,
|
|
770
|
+
children: n
|
|
771
|
+
}
|
|
772
|
+
),
|
|
773
|
+
b.kind === "failed" ? /* @__PURE__ */ s(
|
|
692
774
|
"p",
|
|
693
775
|
{
|
|
694
|
-
className: "usgb-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
)
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
{
|
|
703
|
-
id: o[m.name],
|
|
704
|
-
label: d,
|
|
705
|
-
required: m.required,
|
|
706
|
-
errorMessage: h,
|
|
707
|
-
...s(m.name, {
|
|
708
|
-
required: m.required ? "This field is required" : !1
|
|
709
|
-
})
|
|
710
|
-
},
|
|
711
|
-
m.name
|
|
712
|
-
);
|
|
713
|
-
}),
|
|
714
|
-
/* @__PURE__ */ l(Y, { type: "submit", loading: u.kind === "submitting", children: n }),
|
|
715
|
-
u.kind === "failed" ? /* @__PURE__ */ l(
|
|
716
|
-
"p",
|
|
717
|
-
{
|
|
718
|
-
className: "usgb-form-status usgb-form-status-error",
|
|
719
|
-
role: "alert",
|
|
720
|
-
children: u.message ?? "Something went wrong. Please try again."
|
|
721
|
-
}
|
|
722
|
-
) : null
|
|
723
|
-
] });
|
|
776
|
+
className: "usgb-form-status usgb-form-status-error",
|
|
777
|
+
role: "alert",
|
|
778
|
+
children: b.message ?? "Something went wrong. Please try again."
|
|
779
|
+
}
|
|
780
|
+
) : null
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
);
|
|
724
784
|
}
|
|
725
|
-
function
|
|
785
|
+
function Me({
|
|
726
786
|
definition: t,
|
|
727
787
|
ctaLabel: e,
|
|
728
|
-
session: n
|
|
788
|
+
session: n,
|
|
789
|
+
headingId: i
|
|
729
790
|
}) {
|
|
730
|
-
var
|
|
731
|
-
const { register:
|
|
732
|
-
return
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
791
|
+
var b;
|
|
792
|
+
const { register: o, errors: r, fieldIds: l, uiState: a, onSubmit: d } = n, u = t.fields.find((g) => g.name === "email"), f = typeof ((b = r.email) == null ? void 0 : b.message) == "string" ? r.email.message : void 0;
|
|
793
|
+
return u ? /* @__PURE__ */ h(
|
|
794
|
+
"form",
|
|
795
|
+
{
|
|
796
|
+
onSubmit: d,
|
|
797
|
+
noValidate: !0,
|
|
798
|
+
...i ? { "aria-labelledby": i } : {},
|
|
799
|
+
children: [
|
|
800
|
+
/* @__PURE__ */ h("div", { className: "usgb-form-inline", children: [
|
|
801
|
+
/* @__PURE__ */ s(
|
|
802
|
+
V,
|
|
803
|
+
{
|
|
804
|
+
fieldRef: u,
|
|
805
|
+
fieldIds: l,
|
|
806
|
+
register: o,
|
|
807
|
+
errors: r,
|
|
808
|
+
hideLabel: !0,
|
|
809
|
+
placeholderCase: "upper",
|
|
810
|
+
showError: !1
|
|
811
|
+
}
|
|
812
|
+
),
|
|
813
|
+
/* @__PURE__ */ s(Q, { type: "submit", loading: a.kind === "submitting", children: e })
|
|
814
|
+
] }),
|
|
815
|
+
/* @__PURE__ */ s(
|
|
816
|
+
O,
|
|
817
|
+
{
|
|
818
|
+
id: f ? `${l.email}-error` : void 0,
|
|
819
|
+
message: f
|
|
820
|
+
}
|
|
821
|
+
),
|
|
822
|
+
a.kind === "failed" ? /* @__PURE__ */ s(
|
|
823
|
+
"p",
|
|
824
|
+
{
|
|
825
|
+
className: "usgb-form-status usgb-form-status-error",
|
|
826
|
+
role: "alert",
|
|
827
|
+
children: a.message ?? "Something went wrong. Please try again."
|
|
828
|
+
}
|
|
829
|
+
) : null
|
|
830
|
+
]
|
|
831
|
+
}
|
|
832
|
+
) : /* @__PURE__ */ s("p", { className: "usgb-form-status usgb-form-status-error", role: "alert", children: "Newsletter kind requires an email field" });
|
|
764
833
|
}
|
|
765
|
-
const
|
|
766
|
-
lead:
|
|
767
|
-
newsletter:
|
|
768
|
-
},
|
|
769
|
-
function
|
|
834
|
+
const X = {
|
|
835
|
+
lead: xe,
|
|
836
|
+
newsletter: Me
|
|
837
|
+
}, Ve = "Thank you. Your request has been accepted and is being processed.";
|
|
838
|
+
function T({
|
|
770
839
|
className: t,
|
|
771
840
|
appearance: e,
|
|
772
841
|
variantValue: n,
|
|
773
|
-
|
|
774
|
-
|
|
842
|
+
twoColumn: i,
|
|
843
|
+
kind: o,
|
|
844
|
+
children: r
|
|
775
845
|
}) {
|
|
776
|
-
return /* @__PURE__ */
|
|
777
|
-
|
|
846
|
+
return /* @__PURE__ */ s(
|
|
847
|
+
J,
|
|
778
848
|
{
|
|
779
849
|
className: t,
|
|
780
850
|
appearance: e,
|
|
781
851
|
variantValue: n,
|
|
782
|
-
|
|
783
|
-
|
|
852
|
+
twoColumn: i,
|
|
853
|
+
kind: o,
|
|
854
|
+
children: /* @__PURE__ */ s("p", { className: "usgb-form-status usgb-form-status-error", role: "alert", children: r })
|
|
784
855
|
}
|
|
785
856
|
);
|
|
786
857
|
}
|
|
787
|
-
function
|
|
858
|
+
function Re({
|
|
788
859
|
formId: t,
|
|
789
860
|
definition: e,
|
|
790
861
|
appearance: n,
|
|
791
|
-
|
|
792
|
-
variantValue:
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
onFailed: q
|
|
862
|
+
variant: i,
|
|
863
|
+
variantValue: o,
|
|
864
|
+
twoColumn: r,
|
|
865
|
+
heading: l,
|
|
866
|
+
subheading: a,
|
|
867
|
+
ctaLabel: d,
|
|
868
|
+
legalUrls: u,
|
|
869
|
+
successMessage: f,
|
|
870
|
+
successUrl: b,
|
|
871
|
+
adapter: g,
|
|
872
|
+
analytics: C,
|
|
873
|
+
className: w,
|
|
874
|
+
onAccepted: m,
|
|
875
|
+
onFailed: _
|
|
806
876
|
}) {
|
|
807
|
-
const
|
|
877
|
+
const y = K(), c = l ? `${y}-heading` : void 0, v = G(null), U = Pe({
|
|
808
878
|
formId: t,
|
|
809
879
|
definition: e,
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
{
|
|
825
|
-
className: m,
|
|
826
|
-
appearance: n,
|
|
827
|
-
variantValue: a,
|
|
828
|
-
kind: e.kind,
|
|
829
|
-
children: [
|
|
830
|
-
s ? /* @__PURE__ */ l("h2", { className: "usgb-form-heading", children: s }) : null,
|
|
831
|
-
x ? null : /* @__PURE__ */ l(
|
|
832
|
-
"p",
|
|
833
|
-
{
|
|
834
|
-
className: "usgb-form-status usgb-form-status-success",
|
|
835
|
-
role: "status",
|
|
836
|
-
children: R(b) ?? Me
|
|
837
|
-
}
|
|
838
|
-
)
|
|
839
|
-
]
|
|
840
|
-
}
|
|
841
|
-
);
|
|
842
|
-
}
|
|
843
|
-
const L = Z[e.kind];
|
|
844
|
-
return /* @__PURE__ */ g(
|
|
845
|
-
V,
|
|
880
|
+
legalUrls: u,
|
|
881
|
+
successUrl: b,
|
|
882
|
+
adapter: g,
|
|
883
|
+
analytics: C,
|
|
884
|
+
onAccepted: m,
|
|
885
|
+
onFailed: _
|
|
886
|
+
}), p = U.uiState.kind === "accepted", k = p && !!M(b), q = p && !k ? M(f) ?? Ve : "";
|
|
887
|
+
j(() => {
|
|
888
|
+
var E;
|
|
889
|
+
q && ((E = v.current) == null || E.focus());
|
|
890
|
+
}, [q]);
|
|
891
|
+
const P = X[e.kind];
|
|
892
|
+
return /* @__PURE__ */ h(
|
|
893
|
+
J,
|
|
846
894
|
{
|
|
847
|
-
className:
|
|
895
|
+
className: w,
|
|
848
896
|
appearance: n,
|
|
849
|
-
variantValue:
|
|
897
|
+
variantValue: o,
|
|
898
|
+
twoColumn: r,
|
|
850
899
|
kind: e.kind,
|
|
851
900
|
children: [
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
|
|
901
|
+
l ? /* @__PURE__ */ s("h2", { id: c, className: "usgb-form-heading", children: l }) : null,
|
|
902
|
+
!p && a ? /* @__PURE__ */ s("p", { className: "usgb-form-subheading", children: a }) : null,
|
|
903
|
+
p ? null : /* @__PURE__ */ s(
|
|
904
|
+
P,
|
|
856
905
|
{
|
|
857
906
|
definition: e,
|
|
858
|
-
|
|
859
|
-
ctaLabel:
|
|
860
|
-
legalUrls:
|
|
861
|
-
session:
|
|
907
|
+
variant: i,
|
|
908
|
+
ctaLabel: d,
|
|
909
|
+
legalUrls: u,
|
|
910
|
+
session: U,
|
|
911
|
+
headingId: c
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
/* @__PURE__ */ s(
|
|
915
|
+
"p",
|
|
916
|
+
{
|
|
917
|
+
ref: v,
|
|
918
|
+
className: q ? "usgb-form-status usgb-form-status-success" : "usgb-field-label--sr-only",
|
|
919
|
+
role: "status",
|
|
920
|
+
"aria-live": "polite",
|
|
921
|
+
tabIndex: q ? -1 : void 0,
|
|
922
|
+
children: q
|
|
862
923
|
}
|
|
863
924
|
)
|
|
864
925
|
]
|
|
@@ -868,152 +929,147 @@ function $e({
|
|
|
868
929
|
function We({
|
|
869
930
|
formId: t,
|
|
870
931
|
appearance: e = "on-light",
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
onFailed: m
|
|
932
|
+
variant: n = "dense",
|
|
933
|
+
twoColumn: i = !1,
|
|
934
|
+
heading: o,
|
|
935
|
+
subheading: r,
|
|
936
|
+
ctaLabel: l,
|
|
937
|
+
legalUrls: a,
|
|
938
|
+
successMessage: d,
|
|
939
|
+
successUrl: u,
|
|
940
|
+
adapter: f,
|
|
941
|
+
analytics: b,
|
|
942
|
+
className: g,
|
|
943
|
+
onAccepted: C,
|
|
944
|
+
onFailed: w
|
|
885
945
|
}) {
|
|
886
|
-
const
|
|
887
|
-
if (!
|
|
888
|
-
return /* @__PURE__ */
|
|
889
|
-
|
|
946
|
+
const m = z(t), _ = (m == null ? void 0 : m.kind) === "newsletter", y = _ ? "" : n, c = !_ && i;
|
|
947
|
+
if (!m)
|
|
948
|
+
return /* @__PURE__ */ h(
|
|
949
|
+
T,
|
|
890
950
|
{
|
|
891
|
-
className:
|
|
951
|
+
className: g,
|
|
892
952
|
appearance: e,
|
|
893
|
-
variantValue:
|
|
953
|
+
variantValue: y,
|
|
954
|
+
twoColumn: c,
|
|
894
955
|
children: [
|
|
895
956
|
"Unknown form definition: ",
|
|
896
957
|
t
|
|
897
958
|
]
|
|
898
959
|
}
|
|
899
960
|
);
|
|
900
|
-
const
|
|
901
|
-
if (
|
|
902
|
-
return /* @__PURE__ */
|
|
903
|
-
|
|
961
|
+
const v = H(m.consents);
|
|
962
|
+
if (v === null)
|
|
963
|
+
return /* @__PURE__ */ h(
|
|
964
|
+
T,
|
|
904
965
|
{
|
|
905
|
-
className:
|
|
966
|
+
className: g,
|
|
906
967
|
appearance: e,
|
|
907
|
-
variantValue:
|
|
908
|
-
|
|
968
|
+
variantValue: y,
|
|
969
|
+
twoColumn: c,
|
|
970
|
+
kind: m.kind,
|
|
909
971
|
children: [
|
|
910
972
|
"Missing consent definition for ",
|
|
911
973
|
t
|
|
912
974
|
]
|
|
913
975
|
}
|
|
914
976
|
);
|
|
915
|
-
const
|
|
916
|
-
(
|
|
917
|
-
var
|
|
918
|
-
return !((
|
|
977
|
+
const p = we(v).filter(
|
|
978
|
+
(q) => {
|
|
979
|
+
var P;
|
|
980
|
+
return !((P = a == null ? void 0 : a[q]) != null && P.trim());
|
|
919
981
|
}
|
|
920
982
|
);
|
|
921
|
-
if (
|
|
922
|
-
return /* @__PURE__ */
|
|
923
|
-
|
|
983
|
+
if (p.length)
|
|
984
|
+
return /* @__PURE__ */ h(
|
|
985
|
+
T,
|
|
924
986
|
{
|
|
925
|
-
className:
|
|
987
|
+
className: g,
|
|
926
988
|
appearance: e,
|
|
927
|
-
variantValue:
|
|
928
|
-
|
|
989
|
+
variantValue: y,
|
|
990
|
+
twoColumn: c,
|
|
991
|
+
kind: m.kind,
|
|
929
992
|
children: [
|
|
930
993
|
"Missing legal URL(s) for ",
|
|
931
994
|
t,
|
|
932
995
|
": ",
|
|
933
|
-
|
|
996
|
+
p.join(", ")
|
|
934
997
|
]
|
|
935
998
|
}
|
|
936
999
|
);
|
|
937
|
-
const
|
|
938
|
-
(
|
|
1000
|
+
const k = m.fields.filter(
|
|
1001
|
+
(q) => !B(q.name)
|
|
939
1002
|
);
|
|
940
|
-
return
|
|
941
|
-
|
|
1003
|
+
return k.length ? /* @__PURE__ */ h(
|
|
1004
|
+
T,
|
|
942
1005
|
{
|
|
943
|
-
className:
|
|
1006
|
+
className: g,
|
|
944
1007
|
appearance: e,
|
|
945
|
-
variantValue:
|
|
946
|
-
|
|
1008
|
+
variantValue: y,
|
|
1009
|
+
twoColumn: c,
|
|
1010
|
+
kind: m.kind,
|
|
947
1011
|
children: [
|
|
948
1012
|
"Unknown field(s) in ",
|
|
949
1013
|
t,
|
|
950
1014
|
":",
|
|
951
1015
|
" ",
|
|
952
|
-
|
|
1016
|
+
k.map((q) => q.name).join(", ")
|
|
953
1017
|
]
|
|
954
1018
|
}
|
|
955
|
-
) :
|
|
956
|
-
|
|
1019
|
+
) : m.kind in X ? /* @__PURE__ */ s(
|
|
1020
|
+
Re,
|
|
957
1021
|
{
|
|
958
1022
|
formId: t,
|
|
959
|
-
definition:
|
|
1023
|
+
definition: m,
|
|
960
1024
|
appearance: e,
|
|
961
|
-
|
|
962
|
-
variantValue:
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
onFailed: m
|
|
1025
|
+
variant: n,
|
|
1026
|
+
variantValue: y,
|
|
1027
|
+
twoColumn: c,
|
|
1028
|
+
heading: o,
|
|
1029
|
+
subheading: r,
|
|
1030
|
+
ctaLabel: l ?? m.ctaLabel,
|
|
1031
|
+
legalUrls: a,
|
|
1032
|
+
successMessage: d,
|
|
1033
|
+
successUrl: u,
|
|
1034
|
+
adapter: f,
|
|
1035
|
+
analytics: b,
|
|
1036
|
+
className: g,
|
|
1037
|
+
onAccepted: C,
|
|
1038
|
+
onFailed: w
|
|
976
1039
|
}
|
|
977
|
-
) : /* @__PURE__ */
|
|
978
|
-
|
|
1040
|
+
) : /* @__PURE__ */ h(
|
|
1041
|
+
T,
|
|
979
1042
|
{
|
|
980
|
-
className:
|
|
1043
|
+
className: g,
|
|
981
1044
|
appearance: e,
|
|
982
|
-
variantValue:
|
|
983
|
-
|
|
1045
|
+
variantValue: y,
|
|
1046
|
+
twoColumn: c,
|
|
1047
|
+
kind: m.kind,
|
|
984
1048
|
children: [
|
|
985
1049
|
"Missing renderer for kind: ",
|
|
986
|
-
|
|
1050
|
+
m.kind
|
|
987
1051
|
]
|
|
988
1052
|
}
|
|
989
1053
|
);
|
|
990
1054
|
}
|
|
991
|
-
function
|
|
992
|
-
const e = typeof t == "string" ? { host: t } : t, n = e.host ?? "pwa", i = e.delayMs ?? 400,
|
|
1055
|
+
function Ye(t = {}) {
|
|
1056
|
+
const e = typeof t == "string" ? { host: t } : t, n = e.host ?? "pwa", i = e.delayMs ?? 400, o = e.result ?? { status: "accepted" };
|
|
993
1057
|
return {
|
|
994
1058
|
host: n,
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
return {
|
|
999
|
-
utm_source: r("utm_source"),
|
|
1000
|
-
utm_medium: r("utm_medium"),
|
|
1001
|
-
utm_campaign: r("utm_campaign"),
|
|
1002
|
-
utm_term: r("utm_term"),
|
|
1003
|
-
utm_content: r("utm_content"),
|
|
1004
|
-
gclid: r("gclid"),
|
|
1005
|
-
msclkid: r("msclkid"),
|
|
1006
|
-
gbraid: r("gbraid"),
|
|
1007
|
-
wbraid: r("wbraid")
|
|
1008
|
-
};
|
|
1009
|
-
},
|
|
1010
|
-
async submit(s) {
|
|
1011
|
-
var r;
|
|
1012
|
-
return (r = e.onSubmit) == null || r.call(e, s), await new Promise((o) => setTimeout(o, i)), a;
|
|
1059
|
+
async submit(r) {
|
|
1060
|
+
var l;
|
|
1061
|
+
return (l = e.onSubmit) == null || l.call(e, r), await new Promise((a) => setTimeout(a, i)), o;
|
|
1013
1062
|
}
|
|
1014
1063
|
};
|
|
1015
1064
|
}
|
|
1016
|
-
const
|
|
1065
|
+
const He = {
|
|
1066
|
+
clientAgreement: "client-agreement-url",
|
|
1067
|
+
privacyPolicy: "privacy-policy-url",
|
|
1068
|
+
userAgreement: "user-agreement-url",
|
|
1069
|
+
marketLossPolicy: "market-loss-policy-url",
|
|
1070
|
+
electronicDisclaimer: "electronic-disclaimer-url",
|
|
1071
|
+
termsOfSale: "terms-of-sale-url"
|
|
1072
|
+
}, Ze = {
|
|
1017
1073
|
clientAgreement: "/content/client-agreement",
|
|
1018
1074
|
privacyPolicy: "/content/privacy-policy",
|
|
1019
1075
|
userAgreement: "/content/user-agreement",
|
|
@@ -1021,34 +1077,38 @@ const Ye = {
|
|
|
1021
1077
|
electronicDisclaimer: "/content/electronic-disclaimer",
|
|
1022
1078
|
termsOfSale: "/content/terms-of-sale"
|
|
1023
1079
|
};
|
|
1024
|
-
function
|
|
1080
|
+
function Je(t, e) {
|
|
1025
1081
|
return e.every((n) => {
|
|
1026
1082
|
var i;
|
|
1027
1083
|
return !!((i = t == null ? void 0 : t[n]) != null && i.trim());
|
|
1028
1084
|
});
|
|
1029
1085
|
}
|
|
1030
1086
|
export {
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1087
|
+
Q as Button,
|
|
1088
|
+
Ae as ConsentField,
|
|
1089
|
+
Se as FIELD_REGISTRY,
|
|
1090
|
+
O as FieldError,
|
|
1091
|
+
Ie as FieldLabel,
|
|
1092
|
+
ge as LEAD_CLICKWRAP,
|
|
1093
|
+
he as LEAD_CLICKWRAP_V2,
|
|
1094
|
+
pe as LEAD_SMS,
|
|
1095
|
+
ue as LEAD_TCPA,
|
|
1096
|
+
me as LEAD_TCPA_V2,
|
|
1097
|
+
fe as LEAD_TOSPP,
|
|
1098
|
+
He as LEGAL_URL_ATTRS,
|
|
1099
|
+
Ze as PWA_LEGAL_URLS,
|
|
1100
|
+
Ne as TextField,
|
|
1042
1101
|
We as UsgbForm,
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1102
|
+
we as collectRequiredLegalUrls,
|
|
1103
|
+
Ce as createIdempotencyKey,
|
|
1104
|
+
Ye as createStubAdapter,
|
|
1105
|
+
N as formsManifest,
|
|
1106
|
+
ve as getConsentDefinition,
|
|
1048
1107
|
B as getFieldDefinition,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
W as
|
|
1108
|
+
z as getFormDefinition,
|
|
1109
|
+
Je as isCompleteLegalUrls,
|
|
1110
|
+
ze as listEditorOptions,
|
|
1111
|
+
je as listFormDefinitions,
|
|
1112
|
+
W as resolveConsentCopy,
|
|
1113
|
+
H as resolveFormConsents
|
|
1054
1114
|
};
|