@usgb/forms 1.0.2 → 1.0.4
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 +131 -142
- package/dist/forms-manifest.1.0.4.json +439 -0
- package/dist/forms-manifest.json +218 -84
- package/dist/index.js +636 -559
- 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 +15 -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.4.js +44 -0
- package/dist/usgb-forms.css +141 -45
- 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 T from "classnames";
|
|
6
|
+
const ie = "1.1.0", ae = { version: "1.0.0", transport: "server-proxy" }, oe = { 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: "3", required: !0 }], editor: { label: "Magento FIK Blog Rail", description: "First name, last name, email, and phone required. Required automated text-message consent checkbox with linked terms of service and privacy policy (lead-tcpa v3).", 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:
|
|
10
|
-
trackingRegistry:
|
|
9
|
+
submissionContract: ae,
|
|
10
|
+
trackingRegistry: oe,
|
|
11
|
+
editorOptions: se,
|
|
11
12
|
forms: le,
|
|
12
13
|
hostAdapterContract: ce
|
|
13
|
-
},
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
}, x = de;
|
|
15
|
+
function z(t) {
|
|
16
|
+
return x.forms[t];
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
return Object.entries(
|
|
18
|
+
function ze() {
|
|
19
|
+
return Object.entries(x.forms).map(([t, e]) => ({
|
|
19
20
|
formId: t,
|
|
20
21
|
definition: e
|
|
21
22
|
}));
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function We(t) {
|
|
25
|
+
const e = z(t);
|
|
26
|
+
if (!e)
|
|
27
|
+
return [];
|
|
28
|
+
const n = [];
|
|
29
|
+
for (const i of e.editor.options) {
|
|
30
|
+
const a = x.editorOptions[i];
|
|
31
|
+
if (!a)
|
|
32
|
+
continue;
|
|
33
|
+
const r = a.valuesFrom ? [...e.editor[a.valuesFrom]] : void 0;
|
|
34
|
+
r && !r.length || n.push({
|
|
35
|
+
...a,
|
|
36
|
+
key: i,
|
|
37
|
+
values: r,
|
|
38
|
+
defaultValue: a.defaultFrom ? e[a.defaultFrom] : a.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 H(t, e) {
|
|
27
47
|
return `${t}@${e}`;
|
|
28
48
|
}
|
|
29
|
-
function
|
|
49
|
+
function E(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,6 +80,36 @@ 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"
|
|
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: E([
|
|
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 = {
|
|
99
|
+
definitionId: "lead-tcpa",
|
|
100
|
+
definitionVersion: "3",
|
|
101
|
+
type: "checkbox",
|
|
102
|
+
name: "tcpa_form_consent_granted",
|
|
103
|
+
grantDateField: "tcpa_form_opt_in_date",
|
|
104
|
+
requiredLegalUrls: ["userAgreement", "privacyPolicy"],
|
|
105
|
+
languageKey: "tcpa_consent_language",
|
|
106
|
+
copy: E([
|
|
107
|
+
"I agree to receive automated text messages from the US Gold Bureau at the phone number provided. Msg & data rates may apply. Msg frequency varies. Reply HELP for help and STOP to cancel. View our ",
|
|
108
|
+
{ href: "userAgreement", label: "Terms of Service" },
|
|
109
|
+
" and ",
|
|
110
|
+
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
111
|
+
"."
|
|
112
|
+
])
|
|
57
113
|
}, fe = {
|
|
58
114
|
definitionId: "lead-sms",
|
|
59
115
|
definitionVersion: "1",
|
|
@@ -69,14 +125,14 @@ const me = {
|
|
|
69
125
|
name: "tospp_form_consent_granted",
|
|
70
126
|
requiredLegalUrls: ["userAgreement", "privacyPolicy"],
|
|
71
127
|
languageKey: "tospp_consent_language",
|
|
72
|
-
copy:
|
|
128
|
+
copy: E([
|
|
73
129
|
"By checking, I accept ",
|
|
74
130
|
{ href: "userAgreement", label: "Terms of Conditions" },
|
|
75
131
|
" & ",
|
|
76
132
|
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
77
133
|
"."
|
|
78
134
|
])
|
|
79
|
-
},
|
|
135
|
+
}, he = {
|
|
80
136
|
definitionId: "lead-clickwrap",
|
|
81
137
|
definitionVersion: "1",
|
|
82
138
|
type: "notice",
|
|
@@ -88,7 +144,7 @@ const me = {
|
|
|
88
144
|
"termsOfSale"
|
|
89
145
|
],
|
|
90
146
|
languageKey: "clickwrap_consent_language",
|
|
91
|
-
copy:
|
|
147
|
+
copy: E([
|
|
92
148
|
"By clicking the button, I agree to be bound by your ",
|
|
93
149
|
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
94
150
|
", ",
|
|
@@ -101,30 +157,46 @@ const me = {
|
|
|
101
157
|
{ href: "termsOfSale", label: "Terms & Conditions of Sale" },
|
|
102
158
|
"."
|
|
103
159
|
])
|
|
160
|
+
}, be = {
|
|
161
|
+
definitionId: "lead-clickwrap",
|
|
162
|
+
definitionVersion: "2",
|
|
163
|
+
type: "notice",
|
|
164
|
+
requiredLegalUrls: ["privacyPolicy", "userAgreement"],
|
|
165
|
+
languageKey: "clickwrap_consent_language",
|
|
166
|
+
copy: E([
|
|
167
|
+
"By submitting, you agree to United States Gold Bureau’s ",
|
|
168
|
+
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
169
|
+
" and ",
|
|
170
|
+
{ href: "userAgreement", label: "Terms & Conditions" },
|
|
171
|
+
", 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."
|
|
172
|
+
])
|
|
104
173
|
};
|
|
105
|
-
function
|
|
174
|
+
function ye(...t) {
|
|
106
175
|
return Object.fromEntries(
|
|
107
176
|
t.map((e) => [
|
|
108
|
-
|
|
177
|
+
H(e.definitionId, e.definitionVersion),
|
|
109
178
|
e
|
|
110
179
|
])
|
|
111
180
|
);
|
|
112
181
|
}
|
|
113
|
-
const
|
|
182
|
+
const ve = ye(
|
|
183
|
+
ue,
|
|
114
184
|
me,
|
|
185
|
+
pe,
|
|
115
186
|
fe,
|
|
116
187
|
ge,
|
|
117
|
-
|
|
188
|
+
he,
|
|
189
|
+
be
|
|
118
190
|
);
|
|
119
|
-
function
|
|
120
|
-
return
|
|
191
|
+
function ke(t, e) {
|
|
192
|
+
return ve[H(t, e)];
|
|
121
193
|
}
|
|
122
|
-
function
|
|
194
|
+
function Y(t) {
|
|
123
195
|
if (!(t != null && t.length))
|
|
124
196
|
return [];
|
|
125
197
|
const e = [];
|
|
126
198
|
for (const n of t) {
|
|
127
|
-
const i =
|
|
199
|
+
const i = ke(
|
|
128
200
|
n.definitionId,
|
|
129
201
|
n.definitionVersion
|
|
130
202
|
);
|
|
@@ -136,148 +208,109 @@ function W(t) {
|
|
|
136
208
|
}
|
|
137
209
|
return e;
|
|
138
210
|
}
|
|
139
|
-
function
|
|
211
|
+
function we(t, e, n, i) {
|
|
140
212
|
if (!t.length)
|
|
141
213
|
return;
|
|
142
214
|
const a = {};
|
|
143
|
-
for (const
|
|
144
|
-
const { language:
|
|
145
|
-
if (a[
|
|
146
|
-
const o = !!e[
|
|
147
|
-
a[
|
|
215
|
+
for (const r of t) {
|
|
216
|
+
const { language: l } = W(r.copy, n);
|
|
217
|
+
if (a[r.languageKey] = l, r.type === "checkbox") {
|
|
218
|
+
const o = !!e[r.name];
|
|
219
|
+
a[r.name] = o, o && r.grantDateField && (a[r.grantDateField] = i);
|
|
148
220
|
}
|
|
149
221
|
}
|
|
150
222
|
return a;
|
|
151
223
|
}
|
|
152
|
-
function
|
|
224
|
+
function _e(t) {
|
|
153
225
|
const e = /* @__PURE__ */ new Set();
|
|
154
226
|
for (const n of t)
|
|
155
227
|
for (const i of n.requiredLegalUrls)
|
|
156
228
|
e.add(i);
|
|
157
229
|
return [...e];
|
|
158
230
|
}
|
|
159
|
-
function
|
|
231
|
+
function qe(t) {
|
|
160
232
|
return t.type === "checkbox";
|
|
161
233
|
}
|
|
162
|
-
function
|
|
234
|
+
function $(t) {
|
|
163
235
|
return (e, n) => n ? e.trim().length > 0 || `${t} is required` : !0;
|
|
164
236
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
237
|
+
const Le = /^[2-9]\d{2}[2-9]\d{6}$/;
|
|
238
|
+
function Z(t) {
|
|
167
239
|
let e = t.replace(/\D/g, "");
|
|
168
|
-
return e.length === 11 && e.startsWith("1") && (e = e.slice(1)), e.length !== 10 || !
|
|
240
|
+
return e.length === 11 && e.startsWith("1") && (e = e.slice(1)), e.length !== 10 || !Le.test(e) ? null : e;
|
|
169
241
|
}
|
|
170
242
|
function Se(t) {
|
|
171
243
|
const e = t.trim();
|
|
172
244
|
if (!e) return "";
|
|
173
|
-
const n =
|
|
245
|
+
const n = Z(e);
|
|
174
246
|
if (!n) return e;
|
|
175
247
|
const i = e.replace(/\D/g, "");
|
|
176
248
|
return i.length === 11 && i.startsWith("1") ? `1${n}` : n;
|
|
177
249
|
}
|
|
178
|
-
const
|
|
250
|
+
const Ce = {
|
|
179
251
|
firstname: {
|
|
180
252
|
name: "firstname",
|
|
181
253
|
control: "text",
|
|
182
254
|
label: "First name",
|
|
183
255
|
autoComplete: "given-name",
|
|
184
|
-
validate:
|
|
256
|
+
validate: $("First name")
|
|
185
257
|
},
|
|
186
258
|
lastname: {
|
|
187
259
|
name: "lastname",
|
|
188
260
|
control: "text",
|
|
189
261
|
label: "Last name",
|
|
190
262
|
autoComplete: "family-name",
|
|
191
|
-
validate:
|
|
263
|
+
validate: $("Last name")
|
|
192
264
|
},
|
|
193
265
|
email: {
|
|
194
266
|
name: "email",
|
|
195
267
|
control: "email",
|
|
196
|
-
label: "Email",
|
|
268
|
+
label: "Email address",
|
|
197
269
|
autoComplete: "email",
|
|
198
270
|
validate: (t, e) => {
|
|
199
271
|
const n = t.trim();
|
|
200
|
-
return n ?
|
|
272
|
+
return n ? ne(n) || "Enter a valid email address" : e ? "Email address is required" : !0;
|
|
201
273
|
}
|
|
202
274
|
},
|
|
203
275
|
phone: {
|
|
204
276
|
name: "phone",
|
|
205
277
|
control: "tel",
|
|
206
|
-
label: "Phone",
|
|
278
|
+
label: "Phone number",
|
|
207
279
|
autoComplete: "tel",
|
|
208
280
|
validate: (t, e) => {
|
|
209
281
|
const n = t.trim();
|
|
210
|
-
return n ?
|
|
282
|
+
return n ? Z(n) ? !0 : "Enter a valid phone number" : e ? "Phone number is required" : !0;
|
|
211
283
|
},
|
|
212
284
|
serialize: Se
|
|
213
285
|
}
|
|
214
286
|
};
|
|
215
287
|
function B(t) {
|
|
216
|
-
return
|
|
288
|
+
return Ce[t];
|
|
217
289
|
}
|
|
218
|
-
function
|
|
290
|
+
function J({
|
|
219
291
|
className: t,
|
|
220
292
|
appearance: e,
|
|
221
293
|
variantValue: n,
|
|
222
|
-
|
|
223
|
-
|
|
294
|
+
twoColumn: i,
|
|
295
|
+
kind: a,
|
|
296
|
+
children: r
|
|
224
297
|
}) {
|
|
225
|
-
return /* @__PURE__ */
|
|
298
|
+
return /* @__PURE__ */ s(
|
|
226
299
|
"div",
|
|
227
300
|
{
|
|
228
301
|
className: `usgb-form ${t ?? ""}`,
|
|
229
302
|
"data-appearance": e,
|
|
230
303
|
...n ? { "data-variant": n } : {},
|
|
231
|
-
"data-
|
|
232
|
-
|
|
304
|
+
...i ? { "data-layout": "two-column" } : {},
|
|
305
|
+
"data-kind": a,
|
|
306
|
+
children: r
|
|
233
307
|
}
|
|
234
308
|
);
|
|
235
309
|
}
|
|
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() {
|
|
310
|
+
function Ue() {
|
|
278
311
|
return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `usgb-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
279
312
|
}
|
|
280
|
-
function
|
|
313
|
+
function Pe(t, e) {
|
|
281
314
|
const n = {};
|
|
282
315
|
for (const i of t)
|
|
283
316
|
n[i.name] = "";
|
|
@@ -285,124 +318,120 @@ function Ee(t, e) {
|
|
|
285
318
|
n[i] = !1;
|
|
286
319
|
return n;
|
|
287
320
|
}
|
|
288
|
-
function
|
|
321
|
+
function M(t) {
|
|
289
322
|
const e = t == null ? void 0 : t.trim();
|
|
290
323
|
return e || void 0;
|
|
291
324
|
}
|
|
292
325
|
function De({
|
|
293
326
|
formId: t,
|
|
294
327
|
definition: e,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
onAccepted: c,
|
|
302
|
-
onFailed: u
|
|
328
|
+
legalUrls: n,
|
|
329
|
+
successUrl: i,
|
|
330
|
+
adapter: a,
|
|
331
|
+
analytics: r,
|
|
332
|
+
onAccepted: l,
|
|
333
|
+
onFailed: o
|
|
303
334
|
}) {
|
|
304
|
-
const
|
|
305
|
-
() =>
|
|
335
|
+
const d = K(), u = D(
|
|
336
|
+
() => Y(e.consents) ?? [],
|
|
306
337
|
[e.consents]
|
|
307
|
-
),
|
|
308
|
-
() =>
|
|
309
|
-
[
|
|
310
|
-
),
|
|
311
|
-
() =>
|
|
312
|
-
[e.fields,
|
|
338
|
+
), f = D(
|
|
339
|
+
() => u.filter(qe).map((p) => p.name),
|
|
340
|
+
[u]
|
|
341
|
+
), b = D(
|
|
342
|
+
() => Pe(e.fields, f),
|
|
343
|
+
[e.fields, f]
|
|
313
344
|
), {
|
|
314
|
-
register:
|
|
315
|
-
handleSubmit:
|
|
316
|
-
formState: { errors:
|
|
345
|
+
register: g,
|
|
346
|
+
handleSubmit: C,
|
|
347
|
+
formState: { errors: w }
|
|
317
348
|
} = 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
|
-
|
|
349
|
+
defaultValues: b
|
|
350
|
+
}), [m, q] = te({ kind: "idle" }), y = G(!1);
|
|
351
|
+
j(() => {
|
|
352
|
+
r == null || r({ type: "view", formId: t });
|
|
353
|
+
}, [r, t]);
|
|
354
|
+
const c = D(() => {
|
|
355
|
+
const p = {};
|
|
356
|
+
for (const k of e.fields)
|
|
357
|
+
p[k.name] = `${d}-${k.name}`;
|
|
358
|
+
for (const k of f)
|
|
359
|
+
p[k] = `${d}-${k}`;
|
|
360
|
+
return p;
|
|
361
|
+
}, [d, e.fields, f]), v = D(() => {
|
|
362
|
+
const p = {};
|
|
363
|
+
for (const k of u)
|
|
364
|
+
k.type === "notice" && (p[k.definitionId] = `${d}-notice-${k.definitionId}`);
|
|
365
|
+
return p;
|
|
366
|
+
}, [d, u]), U = C(
|
|
367
|
+
async (p) => {
|
|
368
|
+
if (y.current)
|
|
369
|
+
return;
|
|
370
|
+
y.current = !0, q({ kind: "submitting" }), r == null || r({ type: "submit_attempt", formId: t });
|
|
371
|
+
const _ = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), P = {};
|
|
372
|
+
for (const L of e.fields) {
|
|
373
|
+
const S = p[L.name];
|
|
374
|
+
if (typeof S != "string") {
|
|
375
|
+
P[L.name] = !!S;
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
const N = B(L.name);
|
|
379
|
+
P[L.name] = N != null && N.serialize ? N.serialize(S) : S.trim();
|
|
380
|
+
}
|
|
381
|
+
const I = we(
|
|
382
|
+
u,
|
|
383
|
+
p,
|
|
384
|
+
n ?? {},
|
|
385
|
+
_
|
|
386
|
+
), F = {
|
|
387
|
+
formId: t,
|
|
388
|
+
definitionVersion: e.definitionVersion,
|
|
389
|
+
submissionContractVersion: x.submissionContract.version,
|
|
390
|
+
idempotencyKey: Ue(),
|
|
391
|
+
data: P,
|
|
392
|
+
consents: I
|
|
393
|
+
};
|
|
394
|
+
try {
|
|
395
|
+
const L = await a.submit(F);
|
|
396
|
+
if (L.status === "accepted") {
|
|
397
|
+
r == null || r({ type: "success", formId: t, status: "accepted" }), l == null || l(F), q({ kind: "accepted" });
|
|
398
|
+
const S = M(i);
|
|
399
|
+
S && typeof window < "u" && window.location.assign(S);
|
|
400
|
+
} else
|
|
401
|
+
y.current = !1, q({
|
|
402
|
+
kind: "failed",
|
|
403
|
+
message: L.message ?? "Submission failed"
|
|
404
|
+
}), r == null || r({
|
|
405
|
+
type: "failure",
|
|
406
|
+
formId: t,
|
|
407
|
+
message: L.message
|
|
408
|
+
}), o == null || o(F, L.message);
|
|
409
|
+
} catch (L) {
|
|
410
|
+
y.current = !1;
|
|
411
|
+
const S = L instanceof Error ? L.message : "Submission failed";
|
|
412
|
+
q({ kind: "failed", message: S }), r == null || r({ type: "failure", formId: t, message: S }), o == null || o(F, S);
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
(p) => {
|
|
416
|
+
r == null || r({
|
|
334
417
|
type: "validation_failure",
|
|
335
418
|
formId: t,
|
|
336
|
-
fields:
|
|
419
|
+
fields: Object.keys(p)
|
|
337
420
|
});
|
|
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
421
|
}
|
|
394
|
-
|
|
422
|
+
);
|
|
395
423
|
return {
|
|
396
|
-
register:
|
|
397
|
-
errors:
|
|
398
|
-
fieldIds:
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
424
|
+
register: g,
|
|
425
|
+
errors: w,
|
|
426
|
+
fieldIds: c,
|
|
427
|
+
noticeIds: v,
|
|
428
|
+
consentDefs: u,
|
|
429
|
+
uiState: m,
|
|
430
|
+
onSubmit: U
|
|
402
431
|
};
|
|
403
432
|
}
|
|
404
|
-
function
|
|
405
|
-
return /* @__PURE__ */
|
|
433
|
+
function Ae() {
|
|
434
|
+
return /* @__PURE__ */ h(
|
|
406
435
|
"svg",
|
|
407
436
|
{
|
|
408
437
|
className: "usgb-field-error-icon",
|
|
@@ -414,7 +443,7 @@ function Pe() {
|
|
|
414
443
|
"aria-hidden": "true",
|
|
415
444
|
focusable: "false",
|
|
416
445
|
children: [
|
|
417
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ s(
|
|
418
447
|
"path",
|
|
419
448
|
{
|
|
420
449
|
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 +452,7 @@ function Pe() {
|
|
|
423
452
|
strokeWidth: "0.7"
|
|
424
453
|
}
|
|
425
454
|
),
|
|
426
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ s(
|
|
427
456
|
"path",
|
|
428
457
|
{
|
|
429
458
|
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 +463,8 @@ function Pe() {
|
|
|
434
463
|
}
|
|
435
464
|
);
|
|
436
465
|
}
|
|
437
|
-
function
|
|
438
|
-
return /* @__PURE__ */
|
|
466
|
+
function Te() {
|
|
467
|
+
return /* @__PURE__ */ s(
|
|
439
468
|
"svg",
|
|
440
469
|
{
|
|
441
470
|
className: "usgb-form-checkbox-mark",
|
|
@@ -446,7 +475,7 @@ function xe() {
|
|
|
446
475
|
xmlns: "http://www.w3.org/2000/svg",
|
|
447
476
|
"aria-hidden": "true",
|
|
448
477
|
focusable: "false",
|
|
449
|
-
children: /* @__PURE__ */
|
|
478
|
+
children: /* @__PURE__ */ s(
|
|
450
479
|
"path",
|
|
451
480
|
{
|
|
452
481
|
d: "M1 3.5L2.33333 4.75L3.66667 6L9 1",
|
|
@@ -459,176 +488,197 @@ function xe() {
|
|
|
459
488
|
}
|
|
460
489
|
);
|
|
461
490
|
}
|
|
462
|
-
function
|
|
491
|
+
function O({
|
|
463
492
|
id: t,
|
|
464
493
|
message: e,
|
|
465
494
|
className: n
|
|
466
495
|
}) {
|
|
467
|
-
return e ? /* @__PURE__ */
|
|
496
|
+
return e ? /* @__PURE__ */ h(
|
|
468
497
|
"span",
|
|
469
498
|
{
|
|
470
499
|
id: t,
|
|
471
500
|
role: "alert",
|
|
472
|
-
className:
|
|
501
|
+
className: T("usgb-field-error", n),
|
|
473
502
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ s(Ae, {}),
|
|
475
504
|
e
|
|
476
505
|
]
|
|
477
506
|
}
|
|
478
507
|
) : null;
|
|
479
508
|
}
|
|
480
|
-
const
|
|
481
|
-
function({ id: e, label: n, errorMessage: i, required: a, className:
|
|
482
|
-
const
|
|
483
|
-
return /* @__PURE__ */
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
/* @__PURE__ */
|
|
509
|
+
const Ee = R(
|
|
510
|
+
function({ id: e, label: n, errorMessage: i, required: a, className: r, ...l }, o) {
|
|
511
|
+
const d = i ? `${e}-error` : void 0;
|
|
512
|
+
return /* @__PURE__ */ h("div", { className: "usgb-form-group usgb-consent", children: [
|
|
513
|
+
/* @__PURE__ */ h("div", { className: "usgb-consent-row", children: [
|
|
514
|
+
/* @__PURE__ */ h("span", { className: "usgb-form-checkbox-wrap", children: [
|
|
515
|
+
/* @__PURE__ */ s(
|
|
487
516
|
"input",
|
|
488
517
|
{
|
|
518
|
+
...l,
|
|
489
519
|
ref: o,
|
|
490
520
|
id: e,
|
|
491
521
|
type: "checkbox",
|
|
492
|
-
className:
|
|
522
|
+
className: T("usgb-form-checkbox", r),
|
|
493
523
|
"aria-invalid": i ? !0 : void 0,
|
|
494
|
-
"aria-describedby":
|
|
495
|
-
"aria-required": a || void 0
|
|
496
|
-
...r
|
|
524
|
+
"aria-describedby": d,
|
|
525
|
+
"aria-required": a || void 0
|
|
497
526
|
}
|
|
498
527
|
),
|
|
499
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ s(Te, {})
|
|
500
529
|
] }),
|
|
501
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ h("label", { htmlFor: e, className: "usgb-consent-copy", children: [
|
|
531
|
+
n,
|
|
532
|
+
a ? /* @__PURE__ */ s(
|
|
533
|
+
"span",
|
|
534
|
+
{
|
|
535
|
+
className: "usgb-field-label-asterisk",
|
|
536
|
+
"aria-hidden": "true",
|
|
537
|
+
children: "*"
|
|
538
|
+
}
|
|
539
|
+
) : null
|
|
540
|
+
] })
|
|
502
541
|
] }),
|
|
503
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ s(O, { id: d, message: i })
|
|
504
543
|
] });
|
|
505
544
|
}
|
|
506
|
-
),
|
|
545
|
+
), Q = R(
|
|
507
546
|
function({
|
|
508
547
|
className: e,
|
|
509
548
|
variant: n = "primary",
|
|
510
549
|
loading: i = !1,
|
|
511
550
|
disabled: a = !1,
|
|
512
|
-
children:
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
551
|
+
children: r,
|
|
552
|
+
onClick: l,
|
|
553
|
+
type: o = "button",
|
|
554
|
+
...d
|
|
555
|
+
}, u) {
|
|
556
|
+
const f = a || i, b = a && !i ? !0 : void 0;
|
|
557
|
+
return /* @__PURE__ */ s(
|
|
516
558
|
"button",
|
|
517
559
|
{
|
|
518
|
-
ref:
|
|
519
|
-
type:
|
|
520
|
-
className:
|
|
560
|
+
ref: u,
|
|
561
|
+
type: o,
|
|
562
|
+
className: T(
|
|
521
563
|
"usgb-btn",
|
|
522
564
|
n === "primary" && "usgb-btn-primary",
|
|
523
565
|
e
|
|
524
566
|
),
|
|
525
|
-
|
|
567
|
+
...d,
|
|
568
|
+
disabled: b,
|
|
569
|
+
"aria-disabled": f || void 0,
|
|
526
570
|
"aria-busy": i || void 0,
|
|
527
|
-
|
|
528
|
-
|
|
571
|
+
onClick: (g) => {
|
|
572
|
+
if (f) {
|
|
573
|
+
g.preventDefault();
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
l == null || l(g);
|
|
577
|
+
},
|
|
578
|
+
children: i ? "Submitting…" : r
|
|
529
579
|
}
|
|
530
580
|
);
|
|
531
581
|
}
|
|
532
582
|
);
|
|
533
|
-
function
|
|
583
|
+
function Ie(t) {
|
|
534
584
|
const e = [];
|
|
535
585
|
let n = 0;
|
|
536
586
|
for (; n < t.length; ) {
|
|
537
587
|
const i = t[n];
|
|
538
588
|
if (i.group) {
|
|
539
|
-
const a = i.group,
|
|
589
|
+
const a = i.group, r = [];
|
|
540
590
|
for (; n < t.length && t[n].group === a; )
|
|
541
|
-
|
|
542
|
-
e.push({ type: "group", group: a, fields:
|
|
591
|
+
r.push(t[n]), n += 1;
|
|
592
|
+
e.push({ type: "group", group: a, fields: r });
|
|
543
593
|
continue;
|
|
544
594
|
}
|
|
545
595
|
e.push({ type: "field", field: i }), n += 1;
|
|
546
596
|
}
|
|
547
597
|
return e;
|
|
548
598
|
}
|
|
549
|
-
function
|
|
599
|
+
function Fe({
|
|
550
600
|
htmlFor: t,
|
|
551
601
|
children: e,
|
|
552
602
|
className: n,
|
|
553
603
|
required: i
|
|
554
604
|
}) {
|
|
555
|
-
return /* @__PURE__ */
|
|
605
|
+
return /* @__PURE__ */ h("label", { htmlFor: t, className: T("usgb-field-label", n), children: [
|
|
556
606
|
e,
|
|
557
|
-
i ? /* @__PURE__ */
|
|
607
|
+
i ? /* @__PURE__ */ s("span", { className: "usgb-field-label-asterisk", "aria-hidden": "true", children: "*" }) : null
|
|
558
608
|
] });
|
|
559
609
|
}
|
|
560
|
-
function
|
|
610
|
+
function Ne(t) {
|
|
561
611
|
return t.replace(/\b\w/g, (e) => e.toUpperCase());
|
|
562
612
|
}
|
|
563
|
-
const
|
|
613
|
+
const xe = R(
|
|
564
614
|
function({
|
|
565
615
|
id: e,
|
|
566
616
|
label: n,
|
|
567
617
|
type: i = "text",
|
|
568
618
|
errorMessage: a,
|
|
569
|
-
required:
|
|
570
|
-
hideLabel:
|
|
619
|
+
required: r,
|
|
620
|
+
hideLabel: l = !1,
|
|
571
621
|
placeholderCase: o = "upper",
|
|
572
|
-
showError:
|
|
622
|
+
showError: d = !0,
|
|
573
623
|
className: u,
|
|
574
624
|
placeholder: f,
|
|
575
625
|
...b
|
|
576
|
-
},
|
|
577
|
-
const
|
|
578
|
-
return /* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
-
|
|
626
|
+
}, g) {
|
|
627
|
+
const C = a ? `${e}-error` : void 0, w = l ? `${n}${r ? "*" : ""}` : f, m = l && w ? o === "title" ? Ne(w) : w.toUpperCase() : w;
|
|
628
|
+
return /* @__PURE__ */ h("div", { className: "usgb-form-group", children: [
|
|
629
|
+
/* @__PURE__ */ s(
|
|
630
|
+
Fe,
|
|
581
631
|
{
|
|
582
632
|
htmlFor: e,
|
|
583
|
-
required:
|
|
584
|
-
className:
|
|
633
|
+
required: r,
|
|
634
|
+
className: l ? "usgb-field-label--sr-only" : void 0,
|
|
585
635
|
children: n
|
|
586
636
|
}
|
|
587
637
|
),
|
|
588
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ s(
|
|
589
639
|
"input",
|
|
590
640
|
{
|
|
591
|
-
ref:
|
|
641
|
+
ref: g,
|
|
592
642
|
id: e,
|
|
593
643
|
type: i,
|
|
594
|
-
className:
|
|
644
|
+
className: T(
|
|
595
645
|
"usgb-field-control",
|
|
596
646
|
a && "usgb-field-invalid",
|
|
597
647
|
u
|
|
598
648
|
),
|
|
599
649
|
placeholder: m,
|
|
600
650
|
"aria-invalid": a ? !0 : void 0,
|
|
601
|
-
"aria-describedby":
|
|
602
|
-
"aria-required":
|
|
651
|
+
"aria-describedby": C,
|
|
652
|
+
"aria-required": r || void 0,
|
|
603
653
|
...b
|
|
604
654
|
}
|
|
605
655
|
),
|
|
606
|
-
|
|
656
|
+
d ? /* @__PURE__ */ s(O, { id: C, message: a }) : null
|
|
607
657
|
] });
|
|
608
658
|
}
|
|
609
659
|
);
|
|
610
|
-
function
|
|
660
|
+
function V({
|
|
611
661
|
fieldRef: t,
|
|
612
662
|
fieldIds: e,
|
|
613
663
|
register: n,
|
|
614
664
|
errors: i,
|
|
615
665
|
hideLabel: a,
|
|
616
|
-
placeholderCase:
|
|
617
|
-
showError:
|
|
666
|
+
placeholderCase: r,
|
|
667
|
+
showError: l = !0
|
|
618
668
|
}) {
|
|
619
669
|
const o = B(t.name);
|
|
620
670
|
if (!o) return null;
|
|
621
|
-
const
|
|
622
|
-
return /* @__PURE__ */
|
|
623
|
-
|
|
671
|
+
const d = i[t.name], u = typeof (d == null ? void 0 : d.message) == "string" ? d.message : void 0;
|
|
672
|
+
return /* @__PURE__ */ s(
|
|
673
|
+
xe,
|
|
624
674
|
{
|
|
625
675
|
id: e[t.name],
|
|
626
676
|
label: o.label,
|
|
627
677
|
type: o.control,
|
|
628
678
|
required: t.required,
|
|
629
679
|
hideLabel: a,
|
|
630
|
-
placeholderCase:
|
|
631
|
-
showError:
|
|
680
|
+
placeholderCase: r,
|
|
681
|
+
showError: l,
|
|
632
682
|
autoComplete: o.autoComplete,
|
|
633
683
|
errorMessage: u,
|
|
634
684
|
...n(t.name, {
|
|
@@ -640,380 +690,402 @@ function M({
|
|
|
640
690
|
}
|
|
641
691
|
);
|
|
642
692
|
}
|
|
643
|
-
function
|
|
693
|
+
function Me({
|
|
644
694
|
definition: t,
|
|
645
|
-
|
|
695
|
+
variant: e,
|
|
646
696
|
ctaLabel: n,
|
|
647
697
|
legalUrls: i,
|
|
648
|
-
session: a
|
|
698
|
+
session: a,
|
|
699
|
+
headingId: r
|
|
649
700
|
}) {
|
|
650
|
-
const {
|
|
651
|
-
|
|
701
|
+
const {
|
|
702
|
+
register: l,
|
|
703
|
+
errors: o,
|
|
704
|
+
fieldIds: d,
|
|
705
|
+
noticeIds: u,
|
|
706
|
+
consentDefs: f,
|
|
707
|
+
uiState: b,
|
|
708
|
+
onSubmit: g
|
|
709
|
+
} = a, C = D(
|
|
710
|
+
() => Ie(t.fields),
|
|
652
711
|
[t.fields]
|
|
653
|
-
),
|
|
654
|
-
return /* @__PURE__ */
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
712
|
+
), w = e === "sidebar", m = e === "dense" || w, q = w ? "title" : "upper", y = Object.values(u).join(" ");
|
|
713
|
+
return /* @__PURE__ */ h(
|
|
714
|
+
"form",
|
|
715
|
+
{
|
|
716
|
+
onSubmit: g,
|
|
717
|
+
noValidate: !0,
|
|
718
|
+
...r ? { "aria-labelledby": r } : {},
|
|
719
|
+
children: [
|
|
720
|
+
C.map((c) => c.type === "group" ? /* @__PURE__ */ s(
|
|
721
|
+
"div",
|
|
661
722
|
{
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
723
|
+
className: "usgb-form-grid",
|
|
724
|
+
children: c.fields.map((v) => /* @__PURE__ */ s(
|
|
725
|
+
V,
|
|
726
|
+
{
|
|
727
|
+
fieldRef: v,
|
|
728
|
+
fieldIds: d,
|
|
729
|
+
register: l,
|
|
730
|
+
errors: o,
|
|
731
|
+
hideLabel: m,
|
|
732
|
+
placeholderCase: q
|
|
733
|
+
},
|
|
734
|
+
v.name
|
|
735
|
+
))
|
|
668
736
|
},
|
|
669
|
-
|
|
670
|
-
)
|
|
671
|
-
|
|
672
|
-
`group-${m.group}-${m.fields.map((d) => d.name).join("-")}`
|
|
673
|
-
) : /* @__PURE__ */ l(
|
|
674
|
-
M,
|
|
675
|
-
{
|
|
676
|
-
fieldRef: m.field,
|
|
677
|
-
fieldIds: o,
|
|
678
|
-
register: s,
|
|
679
|
-
errors: r,
|
|
680
|
-
hideLabel: p,
|
|
681
|
-
placeholderCase: _
|
|
682
|
-
},
|
|
683
|
-
m.field.name
|
|
684
|
-
)),
|
|
685
|
-
c.map((m) => {
|
|
686
|
-
const { content: d } = j(
|
|
687
|
-
m.copy,
|
|
688
|
-
i ?? {}
|
|
689
|
-
);
|
|
690
|
-
if (m.type === "notice")
|
|
691
|
-
return /* @__PURE__ */ l(
|
|
692
|
-
"p",
|
|
737
|
+
`group-${c.group}-${c.fields.map((v) => v.name).join("-")}`
|
|
738
|
+
) : /* @__PURE__ */ s(
|
|
739
|
+
V,
|
|
693
740
|
{
|
|
694
|
-
|
|
695
|
-
|
|
741
|
+
fieldRef: c.field,
|
|
742
|
+
fieldIds: d,
|
|
743
|
+
register: l,
|
|
744
|
+
errors: o,
|
|
745
|
+
hideLabel: m,
|
|
746
|
+
placeholderCase: q
|
|
696
747
|
},
|
|
697
|
-
|
|
698
|
-
)
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
748
|
+
c.field.name
|
|
749
|
+
)),
|
|
750
|
+
f.map((c) => {
|
|
751
|
+
const { content: v } = W(
|
|
752
|
+
c.copy,
|
|
753
|
+
i ?? {}
|
|
754
|
+
);
|
|
755
|
+
if (c.type === "notice")
|
|
756
|
+
return /* @__PURE__ */ s(
|
|
757
|
+
"p",
|
|
758
|
+
{
|
|
759
|
+
id: u[c.definitionId],
|
|
760
|
+
className: "usgb-consent usgb-consent-copy usgb-consent-notice",
|
|
761
|
+
children: v
|
|
762
|
+
},
|
|
763
|
+
c.definitionId
|
|
764
|
+
);
|
|
765
|
+
const U = o[c.name], p = typeof (U == null ? void 0 : U.message) == "string" ? U.message : void 0;
|
|
766
|
+
return /* @__PURE__ */ s(
|
|
767
|
+
Ee,
|
|
768
|
+
{
|
|
769
|
+
id: d[c.name],
|
|
770
|
+
label: v,
|
|
771
|
+
required: c.required,
|
|
772
|
+
errorMessage: p,
|
|
773
|
+
...l(c.name, {
|
|
774
|
+
required: c.required ? "This field is required" : !1
|
|
775
|
+
})
|
|
776
|
+
},
|
|
777
|
+
c.name
|
|
778
|
+
);
|
|
779
|
+
}),
|
|
780
|
+
/* @__PURE__ */ s(
|
|
781
|
+
Q,
|
|
782
|
+
{
|
|
783
|
+
type: "submit",
|
|
784
|
+
loading: b.kind === "submitting",
|
|
785
|
+
"aria-describedby": y || void 0,
|
|
786
|
+
children: n
|
|
787
|
+
}
|
|
788
|
+
),
|
|
789
|
+
b.kind === "failed" ? /* @__PURE__ */ s(
|
|
790
|
+
"p",
|
|
791
|
+
{
|
|
792
|
+
className: "usgb-form-status usgb-form-status-error",
|
|
793
|
+
role: "alert",
|
|
794
|
+
children: b.message ?? "Something went wrong. Please try again."
|
|
795
|
+
}
|
|
796
|
+
) : null
|
|
797
|
+
]
|
|
798
|
+
}
|
|
799
|
+
);
|
|
724
800
|
}
|
|
725
|
-
function
|
|
801
|
+
function Ve({
|
|
726
802
|
definition: t,
|
|
727
803
|
ctaLabel: e,
|
|
728
|
-
session: n
|
|
804
|
+
session: n,
|
|
805
|
+
headingId: i
|
|
729
806
|
}) {
|
|
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
|
-
|
|
807
|
+
var b;
|
|
808
|
+
const { register: a, errors: r, fieldIds: l, uiState: o, 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;
|
|
809
|
+
return u ? /* @__PURE__ */ h(
|
|
810
|
+
"form",
|
|
811
|
+
{
|
|
812
|
+
onSubmit: d,
|
|
813
|
+
noValidate: !0,
|
|
814
|
+
...i ? { "aria-labelledby": i } : {},
|
|
815
|
+
children: [
|
|
816
|
+
/* @__PURE__ */ h("div", { className: "usgb-form-inline", children: [
|
|
817
|
+
/* @__PURE__ */ s(
|
|
818
|
+
V,
|
|
819
|
+
{
|
|
820
|
+
fieldRef: u,
|
|
821
|
+
fieldIds: l,
|
|
822
|
+
register: a,
|
|
823
|
+
errors: r,
|
|
824
|
+
hideLabel: !0,
|
|
825
|
+
placeholderCase: "upper",
|
|
826
|
+
showError: !1
|
|
827
|
+
}
|
|
828
|
+
),
|
|
829
|
+
/* @__PURE__ */ s(Q, { type: "submit", loading: o.kind === "submitting", children: e })
|
|
830
|
+
] }),
|
|
831
|
+
/* @__PURE__ */ s(
|
|
832
|
+
O,
|
|
833
|
+
{
|
|
834
|
+
id: f ? `${l.email}-error` : void 0,
|
|
835
|
+
message: f
|
|
836
|
+
}
|
|
837
|
+
),
|
|
838
|
+
o.kind === "failed" ? /* @__PURE__ */ s(
|
|
839
|
+
"p",
|
|
840
|
+
{
|
|
841
|
+
className: "usgb-form-status usgb-form-status-error",
|
|
842
|
+
role: "alert",
|
|
843
|
+
children: o.message ?? "Something went wrong. Please try again."
|
|
844
|
+
}
|
|
845
|
+
) : null
|
|
846
|
+
]
|
|
847
|
+
}
|
|
848
|
+
) : /* @__PURE__ */ s("p", { className: "usgb-form-status usgb-form-status-error", role: "alert", children: "Newsletter kind requires an email field" });
|
|
764
849
|
}
|
|
765
|
-
const
|
|
766
|
-
lead:
|
|
767
|
-
newsletter:
|
|
768
|
-
},
|
|
769
|
-
function
|
|
850
|
+
const X = {
|
|
851
|
+
lead: Me,
|
|
852
|
+
newsletter: Ve
|
|
853
|
+
}, Re = "Thank you. Your request has been accepted and is being processed.";
|
|
854
|
+
function A({
|
|
770
855
|
className: t,
|
|
771
856
|
appearance: e,
|
|
772
857
|
variantValue: n,
|
|
773
|
-
|
|
774
|
-
|
|
858
|
+
twoColumn: i,
|
|
859
|
+
kind: a,
|
|
860
|
+
children: r
|
|
775
861
|
}) {
|
|
776
|
-
return /* @__PURE__ */
|
|
777
|
-
|
|
862
|
+
return /* @__PURE__ */ s(
|
|
863
|
+
J,
|
|
778
864
|
{
|
|
779
865
|
className: t,
|
|
780
866
|
appearance: e,
|
|
781
867
|
variantValue: n,
|
|
782
|
-
|
|
783
|
-
|
|
868
|
+
twoColumn: i,
|
|
869
|
+
kind: a,
|
|
870
|
+
children: /* @__PURE__ */ s("p", { className: "usgb-form-status usgb-form-status-error", role: "alert", children: r })
|
|
784
871
|
}
|
|
785
872
|
);
|
|
786
873
|
}
|
|
787
|
-
function
|
|
874
|
+
function Be({
|
|
788
875
|
formId: t,
|
|
789
876
|
definition: e,
|
|
790
877
|
appearance: n,
|
|
791
|
-
|
|
878
|
+
variant: i,
|
|
792
879
|
variantValue: a,
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
onAccepted: d,
|
|
880
|
+
twoColumn: r,
|
|
881
|
+
heading: l,
|
|
882
|
+
subheading: o,
|
|
883
|
+
ctaLabel: d,
|
|
884
|
+
legalUrls: u,
|
|
885
|
+
successMessage: f,
|
|
886
|
+
successUrl: b,
|
|
887
|
+
adapter: g,
|
|
888
|
+
analytics: C,
|
|
889
|
+
className: w,
|
|
890
|
+
onAccepted: m,
|
|
805
891
|
onFailed: q
|
|
806
892
|
}) {
|
|
807
|
-
const
|
|
893
|
+
const y = K(), c = l ? `${y}-heading` : void 0, v = G(null), U = De({
|
|
808
894
|
formId: t,
|
|
809
895
|
definition: e,
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
adapter: p,
|
|
816
|
-
analytics: _,
|
|
817
|
-
onAccepted: d,
|
|
896
|
+
legalUrls: u,
|
|
897
|
+
successUrl: b,
|
|
898
|
+
adapter: g,
|
|
899
|
+
analytics: C,
|
|
900
|
+
onAccepted: m,
|
|
818
901
|
onFailed: q
|
|
819
|
-
});
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
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,
|
|
902
|
+
}), p = U.uiState.kind === "accepted", k = p && !!M(b), _ = p && !k ? M(f) ?? Re : "";
|
|
903
|
+
j(() => {
|
|
904
|
+
var I;
|
|
905
|
+
_ && ((I = v.current) == null || I.focus());
|
|
906
|
+
}, [_]);
|
|
907
|
+
const P = X[e.kind];
|
|
908
|
+
return /* @__PURE__ */ h(
|
|
909
|
+
J,
|
|
846
910
|
{
|
|
847
|
-
className:
|
|
911
|
+
className: w,
|
|
848
912
|
appearance: n,
|
|
849
913
|
variantValue: a,
|
|
914
|
+
twoColumn: r,
|
|
850
915
|
kind: e.kind,
|
|
851
916
|
children: [
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
|
|
917
|
+
l ? /* @__PURE__ */ s("h2", { id: c, className: "usgb-form-heading", children: l }) : null,
|
|
918
|
+
!p && o ? /* @__PURE__ */ s("p", { className: "usgb-form-subheading", children: o }) : null,
|
|
919
|
+
p ? null : /* @__PURE__ */ s(
|
|
920
|
+
P,
|
|
856
921
|
{
|
|
857
922
|
definition: e,
|
|
858
|
-
|
|
859
|
-
ctaLabel:
|
|
860
|
-
legalUrls:
|
|
861
|
-
session:
|
|
923
|
+
variant: i,
|
|
924
|
+
ctaLabel: d,
|
|
925
|
+
legalUrls: u,
|
|
926
|
+
session: U,
|
|
927
|
+
headingId: c
|
|
928
|
+
}
|
|
929
|
+
),
|
|
930
|
+
/* @__PURE__ */ s(
|
|
931
|
+
"p",
|
|
932
|
+
{
|
|
933
|
+
ref: v,
|
|
934
|
+
className: _ ? "usgb-form-status usgb-form-status-success" : "usgb-field-label--sr-only",
|
|
935
|
+
role: "status",
|
|
936
|
+
"aria-live": "polite",
|
|
937
|
+
tabIndex: _ ? -1 : void 0,
|
|
938
|
+
children: _
|
|
862
939
|
}
|
|
863
940
|
)
|
|
864
941
|
]
|
|
865
942
|
}
|
|
866
943
|
);
|
|
867
944
|
}
|
|
868
|
-
function
|
|
945
|
+
function He({
|
|
869
946
|
formId: t,
|
|
870
947
|
appearance: e = "on-light",
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
onFailed: m
|
|
948
|
+
variant: n = "dense",
|
|
949
|
+
twoColumn: i = !1,
|
|
950
|
+
heading: a,
|
|
951
|
+
subheading: r,
|
|
952
|
+
ctaLabel: l,
|
|
953
|
+
legalUrls: o,
|
|
954
|
+
successMessage: d,
|
|
955
|
+
successUrl: u,
|
|
956
|
+
adapter: f,
|
|
957
|
+
analytics: b,
|
|
958
|
+
className: g,
|
|
959
|
+
onAccepted: C,
|
|
960
|
+
onFailed: w
|
|
885
961
|
}) {
|
|
886
|
-
const
|
|
887
|
-
if (!
|
|
888
|
-
return /* @__PURE__ */
|
|
889
|
-
|
|
962
|
+
const m = z(t), q = (m == null ? void 0 : m.kind) === "newsletter", y = q ? "" : n, c = !q && i;
|
|
963
|
+
if (!m)
|
|
964
|
+
return /* @__PURE__ */ h(
|
|
965
|
+
A,
|
|
890
966
|
{
|
|
891
|
-
className:
|
|
967
|
+
className: g,
|
|
892
968
|
appearance: e,
|
|
893
|
-
variantValue:
|
|
969
|
+
variantValue: y,
|
|
970
|
+
twoColumn: c,
|
|
894
971
|
children: [
|
|
895
972
|
"Unknown form definition: ",
|
|
896
973
|
t
|
|
897
974
|
]
|
|
898
975
|
}
|
|
899
976
|
);
|
|
900
|
-
const
|
|
901
|
-
if (
|
|
902
|
-
return /* @__PURE__ */
|
|
903
|
-
|
|
977
|
+
const v = Y(m.consents);
|
|
978
|
+
if (v === null)
|
|
979
|
+
return /* @__PURE__ */ h(
|
|
980
|
+
A,
|
|
904
981
|
{
|
|
905
|
-
className:
|
|
982
|
+
className: g,
|
|
906
983
|
appearance: e,
|
|
907
|
-
variantValue:
|
|
908
|
-
|
|
984
|
+
variantValue: y,
|
|
985
|
+
twoColumn: c,
|
|
986
|
+
kind: m.kind,
|
|
909
987
|
children: [
|
|
910
988
|
"Missing consent definition for ",
|
|
911
989
|
t
|
|
912
990
|
]
|
|
913
991
|
}
|
|
914
992
|
);
|
|
915
|
-
const
|
|
916
|
-
(
|
|
917
|
-
var
|
|
918
|
-
return !((
|
|
993
|
+
const p = _e(v).filter(
|
|
994
|
+
(_) => {
|
|
995
|
+
var P;
|
|
996
|
+
return !((P = o == null ? void 0 : o[_]) != null && P.trim());
|
|
919
997
|
}
|
|
920
998
|
);
|
|
921
|
-
if (
|
|
922
|
-
return /* @__PURE__ */
|
|
923
|
-
|
|
999
|
+
if (p.length)
|
|
1000
|
+
return /* @__PURE__ */ h(
|
|
1001
|
+
A,
|
|
924
1002
|
{
|
|
925
|
-
className:
|
|
1003
|
+
className: g,
|
|
926
1004
|
appearance: e,
|
|
927
|
-
variantValue:
|
|
928
|
-
|
|
1005
|
+
variantValue: y,
|
|
1006
|
+
twoColumn: c,
|
|
1007
|
+
kind: m.kind,
|
|
929
1008
|
children: [
|
|
930
1009
|
"Missing legal URL(s) for ",
|
|
931
1010
|
t,
|
|
932
1011
|
": ",
|
|
933
|
-
|
|
1012
|
+
p.join(", ")
|
|
934
1013
|
]
|
|
935
1014
|
}
|
|
936
1015
|
);
|
|
937
|
-
const
|
|
938
|
-
(
|
|
1016
|
+
const k = m.fields.filter(
|
|
1017
|
+
(_) => !B(_.name)
|
|
939
1018
|
);
|
|
940
|
-
return
|
|
941
|
-
|
|
1019
|
+
return k.length ? /* @__PURE__ */ h(
|
|
1020
|
+
A,
|
|
942
1021
|
{
|
|
943
|
-
className:
|
|
1022
|
+
className: g,
|
|
944
1023
|
appearance: e,
|
|
945
|
-
variantValue:
|
|
946
|
-
|
|
1024
|
+
variantValue: y,
|
|
1025
|
+
twoColumn: c,
|
|
1026
|
+
kind: m.kind,
|
|
947
1027
|
children: [
|
|
948
1028
|
"Unknown field(s) in ",
|
|
949
1029
|
t,
|
|
950
1030
|
":",
|
|
951
1031
|
" ",
|
|
952
|
-
|
|
1032
|
+
k.map((_) => _.name).join(", ")
|
|
953
1033
|
]
|
|
954
1034
|
}
|
|
955
|
-
) :
|
|
956
|
-
|
|
1035
|
+
) : m.kind in X ? /* @__PURE__ */ s(
|
|
1036
|
+
Be,
|
|
957
1037
|
{
|
|
958
1038
|
formId: t,
|
|
959
|
-
definition:
|
|
1039
|
+
definition: m,
|
|
960
1040
|
appearance: e,
|
|
961
|
-
|
|
962
|
-
variantValue:
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
onFailed: m
|
|
1041
|
+
variant: n,
|
|
1042
|
+
variantValue: y,
|
|
1043
|
+
twoColumn: c,
|
|
1044
|
+
heading: a,
|
|
1045
|
+
subheading: r,
|
|
1046
|
+
ctaLabel: l ?? m.ctaLabel,
|
|
1047
|
+
legalUrls: o,
|
|
1048
|
+
successMessage: d,
|
|
1049
|
+
successUrl: u,
|
|
1050
|
+
adapter: f,
|
|
1051
|
+
analytics: b,
|
|
1052
|
+
className: g,
|
|
1053
|
+
onAccepted: C,
|
|
1054
|
+
onFailed: w
|
|
976
1055
|
}
|
|
977
|
-
) : /* @__PURE__ */
|
|
978
|
-
|
|
1056
|
+
) : /* @__PURE__ */ h(
|
|
1057
|
+
A,
|
|
979
1058
|
{
|
|
980
|
-
className:
|
|
1059
|
+
className: g,
|
|
981
1060
|
appearance: e,
|
|
982
|
-
variantValue:
|
|
983
|
-
|
|
1061
|
+
variantValue: y,
|
|
1062
|
+
twoColumn: c,
|
|
1063
|
+
kind: m.kind,
|
|
984
1064
|
children: [
|
|
985
1065
|
"Missing renderer for kind: ",
|
|
986
|
-
|
|
1066
|
+
m.kind
|
|
987
1067
|
]
|
|
988
1068
|
}
|
|
989
1069
|
);
|
|
990
1070
|
}
|
|
991
|
-
function
|
|
1071
|
+
function Ye(t = {}) {
|
|
992
1072
|
const e = typeof t == "string" ? { host: t } : t, n = e.host ?? "pwa", i = e.delayMs ?? 400, a = e.result ?? { status: "accepted" };
|
|
993
1073
|
return {
|
|
994
1074
|
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;
|
|
1075
|
+
async submit(r) {
|
|
1076
|
+
var l;
|
|
1077
|
+
return (l = e.onSubmit) == null || l.call(e, r), await new Promise((o) => setTimeout(o, i)), a;
|
|
1013
1078
|
}
|
|
1014
1079
|
};
|
|
1015
1080
|
}
|
|
1016
|
-
const
|
|
1081
|
+
const Ze = {
|
|
1082
|
+
clientAgreement: "client-agreement-url",
|
|
1083
|
+
privacyPolicy: "privacy-policy-url",
|
|
1084
|
+
userAgreement: "user-agreement-url",
|
|
1085
|
+
marketLossPolicy: "market-loss-policy-url",
|
|
1086
|
+
electronicDisclaimer: "electronic-disclaimer-url",
|
|
1087
|
+
termsOfSale: "terms-of-sale-url"
|
|
1088
|
+
}, Je = {
|
|
1017
1089
|
clientAgreement: "/content/client-agreement",
|
|
1018
1090
|
privacyPolicy: "/content/privacy-policy",
|
|
1019
1091
|
userAgreement: "/content/user-agreement",
|
|
@@ -1021,34 +1093,39 @@ const Ye = {
|
|
|
1021
1093
|
electronicDisclaimer: "/content/electronic-disclaimer",
|
|
1022
1094
|
termsOfSale: "/content/terms-of-sale"
|
|
1023
1095
|
};
|
|
1024
|
-
function
|
|
1096
|
+
function Qe(t, e) {
|
|
1025
1097
|
return e.every((n) => {
|
|
1026
1098
|
var i;
|
|
1027
1099
|
return !!((i = t == null ? void 0 : t[n]) != null && i.trim());
|
|
1028
1100
|
});
|
|
1029
1101
|
}
|
|
1030
1102
|
export {
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1103
|
+
Q as Button,
|
|
1104
|
+
Ee as ConsentField,
|
|
1105
|
+
Ce as FIELD_REGISTRY,
|
|
1106
|
+
O as FieldError,
|
|
1107
|
+
Fe as FieldLabel,
|
|
1108
|
+
he as LEAD_CLICKWRAP,
|
|
1109
|
+
be as LEAD_CLICKWRAP_V2,
|
|
1037
1110
|
fe as LEAD_SMS,
|
|
1038
|
-
|
|
1111
|
+
ue as LEAD_TCPA,
|
|
1112
|
+
me as LEAD_TCPA_V2,
|
|
1113
|
+
pe as LEAD_TCPA_V3,
|
|
1039
1114
|
ge as LEAD_TOSPP,
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1115
|
+
Ze as LEGAL_URL_ATTRS,
|
|
1116
|
+
Je as PWA_LEGAL_URLS,
|
|
1117
|
+
xe as TextField,
|
|
1118
|
+
He as UsgbForm,
|
|
1119
|
+
_e as collectRequiredLegalUrls,
|
|
1120
|
+
Ue as createIdempotencyKey,
|
|
1121
|
+
Ye as createStubAdapter,
|
|
1122
|
+
x as formsManifest,
|
|
1123
|
+
ke as getConsentDefinition,
|
|
1048
1124
|
B as getFieldDefinition,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
W as
|
|
1125
|
+
z as getFormDefinition,
|
|
1126
|
+
Qe as isCompleteLegalUrls,
|
|
1127
|
+
We as listEditorOptions,
|
|
1128
|
+
ze as listFormDefinitions,
|
|
1129
|
+
W as resolveConsentCopy,
|
|
1130
|
+
Y as resolveFormConsents
|
|
1054
1131
|
};
|