diff --git a/dist/engrid.css b/dist/engrid.css index 94abb82..02f9aa3 100644 --- a/dist/engrid.css +++ b/dist/engrid.css @@ -19,10 +19,10 @@ * * ENGRID PAGE TEMPLATE ASSETS * - * Date: Friday, March 1, 2024 @ 18:35:58 ET + * Date: Tuesday, March 5, 2024 @ 11:22:09 ET * By: michael - * ENGrid styles: v0.17.16 - * ENGrid scripts: v0.17.18 + * ENGrid styles: v0.17.19 + * ENGrid scripts: v0.17.20 * * Created by 4Site Studios * Come work with us or join our team, we would love to hear from you @@ -2076,6 +2076,13 @@ input.en__field__input:focus,input.en__field__input:hover,input:focus,input:hove } .en__field__input--vgs{ + --en-vgs-width:100%; + --en-vgs-borderWidth:var(--input_border-width); + --en-vgs-borderStyle:solid; + --en-vgs-borderColor:var(--input_border-color); + --en-vgs-borderRadius:var(--input_border-radius); + --en-vgs-backgroundColor:var(--input_background-color); + --en-vgs-fontSize:var(--input_font-size); transition:box-shadow .25s,border-color .25s ease-in-out; width:100%; } diff --git a/dist/engrid.js b/dist/engrid.js index 8831239..8caf48c 100644 --- a/dist/engrid.js +++ b/dist/engrid.js @@ -17,10 +17,10 @@ * * ENGRID PAGE TEMPLATE ASSETS * - * Date: Friday, March 1, 2024 @ 18:35:58 ET + * Date: Tuesday, March 5, 2024 @ 11:22:09 ET * By: michael - * ENGrid styles: v0.17.16 - * ENGrid scripts: v0.17.18 + * ENGrid styles: v0.17.19 + * ENGrid scripts: v0.17.20 * * Created by 4Site Studios * Come work with us or join our team, we would love to hear from you @@ -14051,10 +14051,10 @@ class Autocomplete { this.logger = new EngridLogger("Autocomplete", "#330033", "#f0f0f0", "πŸ“‡"); this.autoCompleteField('[name="supporter.firstName"]', "given-name"); this.autoCompleteField('[name="supporter.lastName"]', "family-name"); - this.autoCompleteField('[name="transaction.ccnumber"]', "cc-number"); + // this.autoCompleteField('[name="transaction.ccnumber"]', "cc-number"); this.autoCompleteField("#en__field_transaction_ccexpire", "cc-exp-month"); this.autoCompleteField('[name="transaction.ccexpire"]:not(#en__field_transaction_ccexpire)', "cc-exp-year"); - this.autoCompleteField('[name="transaction.ccvv"]', "cc-csc"); + // this.autoCompleteField('[name="transaction.ccvv"]', "cc-csc"); this.autoCompleteField('[name="supporter.emailAddress"]', "email"); this.autoCompleteField('[name="supporter.phoneNumber"]', "tel"); this.autoCompleteField('[name="supporter.country"]', "country"); @@ -21686,10 +21686,21 @@ class VGS { return true; } setDefaults() { - const placeholderStyles = { - color: getComputedStyle(document.body).getPropertyValue("--input_placeholder-color") || "#a9a9a9", - opacity: getComputedStyle(document.body).getPropertyValue("--input_placeholder-opacity") || "1", - fontWeight: getComputedStyle(document.body).getPropertyValue("--input_placeholder-font-weight") || "normal", + //EN attempts to define a few default styles for VGS fields based on our text field styling + //This does not always work, so we will provide our own defaults + const bodyStyles = getComputedStyle(document.body); + const styles = { + fontFamily: bodyStyles.getPropertyValue("--input_font-family") || + "-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'", + fontSize: bodyStyles.getPropertyValue("--input_font-size") || "16px", + color: bodyStyles.getPropertyValue("--input_color") || "#000", + padding: bodyStyles.getPropertyValue("--input_padding") || "10px", + "&::placeholder": { + color: bodyStyles.getPropertyValue("--input_placeholder-color") || "#a9a9a9", + opacity: bodyStyles.getPropertyValue("--input_placeholder-opacity") || "1", + fontWeight: bodyStyles.getPropertyValue("--input_placeholder-font-weight") || + "normal", + }, }; const options = this.options; const defaultOptions = { @@ -21699,9 +21710,7 @@ class VGS { icons: { cardPlaceholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAABMCAYAAADHl1ErAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB8ElEQVR4nO2c4W3CMBBGz1H/NyNkAzoCo2SDrkI3YJSOABt0g9IJXBnOqUkMyifUqkrek04RlvMjT2c7sc6EGKPBfBpcaSBMBGEiCBNBmAjCRBAmgjARhIkgTARhIggTQZhK2q0Yh5l1ZrYzs0PqsrI4+LN3VTeThkvntUm6Fbuxn2E/LITQmtm7mW08Sb/MbO9tpxhjui6WEMLWzJKDdO3N7Nmf9ZjaYoyn8y8X1o6GXxLV1lJyDeE+9oWPQ/ZRG4b9WkVVpqe+8LLLo7ErM6t248qllZnWBc+uV5+zumGsQjm3f/ic9tb4JGeeXcga4U723rptilVx0avgg2Q3m/JNn+y6zeAm+GSWUi/c7L5yfB77RJhACOHs6WnuLfmGpTI3YditEEGYCMJEECaCMJHZqySvHRfIMBGEiSBMBGEiCBNBmAjCRBAmgjARhIkgTGT2t+R/59EdYXZcfwmEiSBMBGEiCBNZzCr5VzvCZJjIIMxrPKFC6abMsHbaFcZuGq8StqKwDqZkN8emKBbrvawHCtxJ7y1nVxQF34lxUXBupOy8EtWy88jBhknUDjbkPhyd+Xn2l9lHZ8rgcNZVTA5nTYRFjv/dPf7HvzuJ8C0pgjARhIkgTARhIggTQZgIwkQQJoIwEYSJIEwEYQpm9g2Ro5zhLcuLBwAAAABJRU5ErkJggg==", }, - css: { - "&::placeholder": placeholderStyles, - }, + css: styles, // Autocomplete is not customizable autoComplete: "cc-number", validations: ["required", "validCardNumber"], @@ -21713,9 +21722,7 @@ class VGS { // Autocomplete is not customizable autoComplete: "cc-csc", validations: ["required", "validCardSecurityCode"], - css: { - "&::placeholder": placeholderStyles, - }, + css: styles, }, }; // Deep merge the default options with the options set in the theme @@ -22078,7 +22085,7 @@ class EcardToTarget { } ;// CONCATENATED MODULE: ./node_modules/@4site/engrid-common/dist/version.js -const AppVersion = "0.17.18"; +const AppVersion = "0.17.20"; ;// CONCATENATED MODULE: ./node_modules/@4site/engrid-common/dist/index.js // Runs first so it can change the DOM markup before any markup dependent code fires diff --git a/dist/engrid.min.css b/dist/engrid.min.css index 90b1a2d..cceda2f 100644 --- a/dist/engrid.min.css +++ b/dist/engrid.min.css @@ -18,10 +18,10 @@ * * ENGRID PAGE TEMPLATE ASSETS * - * Date: Friday, March 1, 2024 @ 18:35:58 ET + * Date: Tuesday, March 5, 2024 @ 11:22:09 ET * By: michael - * ENGrid styles: v0.17.16 - * ENGrid scripts: v0.17.18 + * ENGrid styles: v0.17.19 + * ENGrid scripts: v0.17.20 * * Created by 4Site Studios * Come work with us or join our team, we would love to hear from you @@ -35,7 +35,7 @@ --p_font-weight );--radio_line-height:var( --p_line-height - );--radio_width:20px;--radio_height:20px;--radio_top:0px;--radio_text-transform:initial;--radio_box-shadow_hover:inset 0 0 0 6px #f5f5f5;--radio_box-shadow_selected:inset 0 0 0 6px #000;--checkbox_border-width:var(--input_border-width);--checkbox_border-radius:var(--input_border-radius);--checkbox_font-family:var(--radio_font-family);--checkbox_font-size:var(--radio_font-size);--checkbox_font-weight:var(--radio_font-weight);--checkbox_line-height:var(--radio_line-height);--checkbox_width:var(--radio_width);--checkbox_height:var(--radio_height);--checkbox_top:0px;--checkbox_padding-top:0px;--checkbox_padding-left:0px;--checkbox_text-transform:var(--radio_text-transform);--checkbox_check_font-size:var(--radio_font-size);--checkbox_content_checked:"βœ“";--select_font-family:var(--input_font-family);--select_font-size:var(--input_font-size);--select_font-weight:initial;--select_line-height:var(--input_line-height);--select_border-width:var(--input_border-width);--select_border-radius:var(--input_border-radius);--select_placeholder-opacity:var(--input_placeholder-opacity);--select_placeholder-font-weight:var(--input_placeholder-font-weight);--select_box-shadow:var(--input_box-shadow);--select_padding:var(--input_padding);--select_padding-right:2.4ch;--select_box-shadow_hover:var(--input_box-shadow_hover);--textarea_font-family:var(--input_font-family);--textarea_font-size:var(--input_font-size);--textarea_font-weight:initial;--textarea_line-height:initial;--textarea_border-width:var(--input_border-width);--textarea_border-radius:var(--input_border-radius);--textarea_box-shadow:var(--input_box-shadow);--textarea_padding:var(--input_padding);--textarea_min-height:calc(1ch + var(--textarea_font-size)*10);--textarea_box-shadow_hover:var(--input_box-shadow_hover)}.en__component--formblock,.en__component--svblock,.en__registrants__registrantDetails{display:flex;flex-wrap:wrap;justify-content:flex-start;margin-left:calc(var(--fields_spacing-inline)*-1);margin-right:calc(var(--fields_spacing-inline)*-1)}.en__component--formblock>*,.en__component--svblock>*,.en__registrants__registrantDetails>*{padding-left:var(--fields_spacing-inline);padding-right:var(--fields_spacing-inline)}.en__component--formblock .en__field,.en__component--svblock .en__field,.en__registrants__registrantDetails .en__field{display:flex;flex-basis:100%;flex-direction:column;margin-bottom:var(--fields_spacing-block);padding-bottom:0}.en__component--formblock .en__field .en__field__helpText,.en__component--formblock .en__field .en__field__label:not(.en__field__label--item):not([for*=svquestion]),.en__component--svblock .en__field .en__field__helpText,.en__component--svblock .en__field .en__field__label:not(.en__field__label--item):not([for*=svquestion]),.en__registrants__registrantDetails .en__field .en__field__helpText,.en__registrants__registrantDetails .en__field .en__field__label:not(.en__field__label--item):not([for*=svquestion]){align-items:center;display:flex;justify-content:space-between;position:relative}.en__component--formblock .en__field .en__field__element,.en__component--svblock .en__field .en__field__element,.en__registrants__registrantDetails .en__field .en__field__element{align-items:center;display:flex;flex-wrap:wrap}.en__component--formblock .en__field .en__field__element .en__submit,.en__component--svblock .en__field .en__field__element .en__submit,.en__registrants__registrantDetails .en__field .en__field__element .en__submit{padding-left:var(--fields_spacing-inline);padding-right:var(--fields_spacing-inline)}.en__component--formblock .en__field .en__field__element .en__submit.en__rangeFieldLabels,.en__component--svblock .en__field .en__field__element .en__submit.en__rangeFieldLabels,.en__registrants__registrantDetails .en__field .en__field__element .en__submit.en__rangeFieldLabels{margin-bottom:var(--fields_spacing-block);padding-left:0;padding-right:0}.en__component--formblock .en__field .en__field__element.en__field__element--checkbox,.en__component--formblock .en__field .en__field__element.en__field__element--imgselect,.en__component--formblock .en__field .en__field__element.en__field__element--radio,.en__component--formblock .en__field .en__field__element.en__field__element--rating,.en__component--formblock .en__field .en__field__element.en__field__element--splitselect,.en__component--formblock .en__field .en__field__element.en__field__element--splittext,.en__component--formblock .en__field .en__field__element.en__field__element--tripleselect,.en__component--formblock .en__field .en__field__element.en__field__element--tripletext,.en__component--formblock .en__field .en__field__element.en__field__element--withOther,.en__component--svblock .en__field .en__field__element.en__field__element--checkbox,.en__component--svblock .en__field .en__field__element.en__field__element--imgselect,.en__component--svblock .en__field .en__field__element.en__field__element--radio,.en__component--svblock .en__field .en__field__element.en__field__element--rating,.en__component--svblock .en__field .en__field__element.en__field__element--splitselect,.en__component--svblock .en__field .en__field__element.en__field__element--splittext,.en__component--svblock .en__field .en__field__element.en__field__element--tripleselect,.en__component--svblock .en__field .en__field__element.en__field__element--tripletext,.en__component--svblock .en__field .en__field__element.en__field__element--withOther,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--checkbox,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--imgselect,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--radio,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--rating,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splitselect,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splittext,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripleselect,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripletext,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--withOther{margin-left:calc(var(--fields_spacing-inline)*-1);margin-right:calc(var(--fields_spacing-inline)*-1)}.en__component--formblock .en__field .en__field__element.en__field__element--checkbox .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--checkbox>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--imgselect .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--imgselect>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--radio .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--radio>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--rating .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--rating>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--splitselect .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--splitselect>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--splittext .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--splittext>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--tripleselect .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--tripleselect>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--tripletext .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--tripletext>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--withOther .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--withOther>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--checkbox .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--checkbox>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--imgselect .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--imgselect>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--radio .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--radio>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--rating .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--rating>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--splitselect .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--splitselect>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--splittext .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--splittext>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--tripleselect .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--tripleselect>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--tripletext .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--tripletext>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--withOther .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--withOther>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--checkbox .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--checkbox>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--imgselect .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--imgselect>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--radio .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--radio>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--rating .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--rating>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splitselect .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splitselect>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splittext .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splittext>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripleselect .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripleselect>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripletext .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripletext>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--withOther .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--withOther>[data-unhidden]{padding:calc(var(--fields_spacing-block)*.5) var(--fields_spacing-inline) var(--fields_spacing-block)}.en__component--formblock .en__field .en__field__element>.en__field__input--vgs,.en__component--formblock .en__field .en__field__element>input,.en__component--formblock .en__field .en__field__element>select,.en__component--formblock .en__field .en__field__element>textarea,.en__component--svblock .en__field .en__field__element>.en__field__input--vgs,.en__component--svblock .en__field .en__field__element>input,.en__component--svblock .en__field .en__field__element>select,.en__component--svblock .en__field .en__field__element>textarea,.en__registrants__registrantDetails .en__field .en__field__element>.en__field__input--vgs,.en__registrants__registrantDetails .en__field .en__field__element>input,.en__registrants__registrantDetails .en__field .en__field__element>select,.en__registrants__registrantDetails .en__field .en__field__element>textarea{margin-bottom:var(--fields_spacing-block);margin-top:calc(var(--fields_spacing-inline)*.5)}.en__component--formblock .en__field.en__field--withOther .en__field__element,.en__component--svblock .en__field.en__field--withOther .en__field__element,.en__registrants__registrantDetails .en__field.en__field--withOther .en__field__element{margin-left:calc(var(--fields_spacing-inline)*-1);margin-right:calc(var(--fields_spacing-inline)*-1)}.en__component--formblock .en__field.en__field--withOther .en__field__element .en__field__item,.en__component--svblock .en__field.en__field--withOther .en__field__element .en__field__item,.en__registrants__registrantDetails .en__field.en__field--withOther .en__field__element .en__field__item{padding-left:var(--fields_spacing-inline);padding-right:var(--fields_spacing-inline)}.en__component--eccheckout__additional .en__field__element--radio.en__field__element,.en__component--formblock .en__field.en__field--checkbox.en__field--question .en__field__element,.en__component--formblock .en__field.en__field--checkbox.en__field--survey .en__field__element,.en__component--formblock .en__field.en__field--radio.en__field--question .en__field__element,.en__component--formblock .en__field.en__field--radio.en__field--survey .en__field__element,.en__component--formblock.direction-column .en__field--checkbox .en__field__element,.en__component--formblock.direction-column .en__field--radio .en__field__element,.en__component--svblock .en__field.en__field--checkbox.en__field--question .en__field__element,.en__component--svblock .en__field.en__field--checkbox.en__field--survey .en__field__element,.en__component--svblock .en__field.en__field--radio.en__field--question .en__field__element,.en__component--svblock .en__field.en__field--radio.en__field--survey .en__field__element,.en__component--svblock.direction-column .en__field--checkbox .en__field__element,.en__component--svblock.direction-column .en__field--radio .en__field__element,.en__registrants__registrantDetails .en__field.en__field--checkbox.en__field--question .en__field__element,.en__registrants__registrantDetails .en__field.en__field--checkbox.en__field--survey .en__field__element,.en__registrants__registrantDetails .en__field.en__field--radio.en__field--question .en__field__element,.en__registrants__registrantDetails .en__field.en__field--radio.en__field--survey .en__field__element,.en__registrants__registrantDetails.direction-column .en__field--checkbox .en__field__element,.en__registrants__registrantDetails.direction-column .en__field--radio .en__field__element{align-items:center;display:grid;grid-auto-rows:auto;margin-bottom:var(--fields_spacing-block);max-width:100%;width:fit-content}.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__element,.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__element,.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__element,.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__element,.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__element,.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__element{grid-template-columns:min-content}.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item,.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item,.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item,.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item,.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item,.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__item{grid-column:span 2}.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:last-child,.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2),.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:last-child,.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2),.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:last-child,.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2),.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:last-child,.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2),.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:last-child,.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2),.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__item:last-child,.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2){grid-column:span 1}.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2) label{word-break:keep-all}label{color:var(--label_color);display:flex;font-family:var(--label_font-family);font-size:var(--label_font-size);font-weight:var(--label_font-weight);letter-spacing:var(--label_letter-spacing);line-height:var(--label_line-height);text-transform:var(--label_text-transform)}label a.label-tooltip{color:var(--label_color);font-weight:400;margin-left:var(--fields_spacing-inline);margin-right:var(--fields_spacing-inline);right:0;-webkit-text-decoration:underline;text-decoration:underline;text-transform:none}label a.label-tooltip:last-child{margin-right:0}.label-wrapper{align-content:center;display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--fields_spacing-inline)/2) calc(var(--fields_spacing-inline)*2);justify-content:space-between}.label-wrapper a.label-tooltip{color:var(--a_color);font-family:var(--label_font-family);font-size:var(--label_font-size);font-weight:var(--a_font-weight);letter-spacing:var(--label_letter-spacing);line-height:var(--label_line-height);margin-left:0;margin-right:0;-webkit-text-decoration:var(--a_text-decoration);text-decoration:var(--a_text-decoration);text-transform:var(--label_text-transform)}input,input.en__field__input{background-color:var(--input_background-color);border:var(--input_border-width) solid var(--input_border-color);border-radius:var(--input_border-radius);box-sizing:border-box;color:var(--input_color);display:block;font-family:var(--input_font-family);font-size:var(--input_font-size);font-weight:var(--input_font-weight);height:auto;line-height:var(--input_line-height);margin:0;max-width:100%;min-width:auto;padding:var(--input_padding);transition:box-shadow .25s,border-color .25s ease-in-out;width:100%}input.en__field__input:focus,input.en__field__input:hover,input:focus,input:hover{background-color:var(--input_background-color_hover);border-bottom-color:var(--input_border-color_hover);border-color:var(--input_border-color_hover) var(--input_border-color_hover) var(--input_border-bottom-color_hover);color:var(--input_color_hover)}.en__field__input--vgs{transition:box-shadow .25s,border-color .25s ease-in-out;width:100%}.en__field__input--vgs.vgs-collect-container__focused,.en__field__input--vgs:hover{background-color:var(--input_background-color_hover);border-bottom-color:var(--input_border-color_hover);border-color:var(--input_border-color_hover) var(--input_border-color_hover) var(--input_border-bottom-color_hover)}.en__field__input--vgs.vgs-collect-container__focused{outline-color:-webkit-focus-ring-color;outline-style:auto}@-moz-document url-prefix(){.en__field__input--vgs.vgs-collect-container__focused{outline:1px dotted #000}}.en__field__input--vgs iframe{border-radius:var(--input_border-radius)}input[type=date],input[type=email],input[type=number],input[type=password],input[type=tel],input[type=text],input[type=textarea]{box-shadow:var(--input_box-shadow)}input[type=date]:focus,input[type=date]:hover,input[type=email]:focus,input[type=email]:hover,input[type=number]:focus,input[type=number]:hover,input[type=password]:focus,input[type=password]:hover,input[type=tel]:focus,input[type=tel]:hover,input[type=text]:focus,input[type=text]:hover,input[type=textarea]:focus,input[type=textarea]:hover{box-shadow:var(--input_box-shadow_hover)}input[type=range]{border:0;box-shadow:none;padding-left:0;padding-right:0}:not(#EN__RootElement) input[type=email],:not(#EN__RootElement) input[type=number],:not(#EN__RootElement) input[type=tel],input[type=text]{-webkit-appearance:textfield;appearance:textfield}input[type=radio]+label{align-items:center;cursor:pointer;display:flex;font-family:var(--radio_font-family);font-size:var(--radio_font-size);font-weight:var(--radio_font-weight);line-height:var(--radio_line-height);padding-top:max(0px,var(--radio_top) * -1);text-transform:var(--radio_text-transform)}input[type=radio]+label:before{align-items:center;background-color:var(--radio_background-color);border:var(--radio_border-width) solid var(--radio_border-color);border-radius:var(--radio_border-radius);box-shadow:var(--radio_box-shadow);color:var(--radio_color);content:var(--radio_content);display:flex;height:var(--radio_height);justify-content:center;margin-right:max(var(--fields_spacing-inline),1ch,.5rem);min-width:var(--radio_width);position:relative;top:var(--radio_top);width:var(--radio_width)}input[type=radio]:focus+label:before,input[type=radio]:hover+label:before{background-color:var(--radio_background-color_hover);border-color:var(--radio_border-color_hover);box-shadow:var(--radio_box-shadow_hover);color:var(--radio_color_hover)}input[type=radio]:not(:checked)+label:before{color:#0000}input[type=radio]:checked+label:before{background-color:var(--radio_background-color_selected);border-color:var(--radio_border-color_selected);box-shadow:var(--radio_box-shadow_selected);color:var(--radio_color_selected)}input[type=checkbox]+label{align-items:center;content:"";cursor:pointer;display:flex;font-family:var(--checkbox_font-family);font-size:var(--checkbox_font-size);font-weight:var(--checkbox_font-weight);line-height:var(--checkbox_line-height);padding-top:max(0px,var(--checkbox_top) * -1);text-transform:var(--checkbox_text-transform)}input[type=checkbox]+label:before{align-items:center;background-color:var(--checkbox_background-color);border:var(--checkbox_border-width) solid var(--checkbox_border-color);border-radius:var(--checkbox_border-radius);color:var(--checkbox_color);content:"";display:flex;flex:0 0 auto;height:var(--checkbox_height);justify-content:center;margin-right:max(var(--fields_spacing-inline),1ch,.5rem);min-width:var(--checkbox_width);padding-left:var(--checkbox_padding-left);padding-top:var(--checkbox_padding-top);position:relative;top:var(--checkbox_top);width:var(--checkbox_width)}input[type=checkbox]:focus+label:before,input[type=checkbox]:hover+label:before{background-color:var(--checkbox_background-color_hover);border-color:var(--checkbox_border-color_hover);color:var(--checkbox_color_hover)}input[type=checkbox]:not(:checked)+label:before{color:#0000}input[type=checkbox]:checked+label:before{background-color:var(--checkbox_background-color_checked);border-color:var(--checkbox_border-color_checked);color:var(--checkbox_color_checked);content:var(--checkbox_content_checked)}.en__twitterTarget__select{content:"";cursor:pointer;max-width:min-content;padding-top:max(0px,var(--checkbox_top) * -1);visibility:hidden}.en__twitterTarget__select:before{align-items:center;background-color:var(--checkbox_background-color);border:var(--checkbox_border-width) solid var(--checkbox_border-color);border-radius:var(--checkbox_border-radius);color:var(--checkbox_color);content:"";display:flex;height:var(--checkbox_height);justify-content:center;min-width:var(--checkbox_width);padding-left:var(--checkbox_padding-left);padding-top:var(--checkbox_padding-top);position:relative;top:var(--checkbox_top);visibility:visible;width:var(--checkbox_width)}.en__twitterTarget__select:focus:before,.en__twitterTarget__select:hover:before{background-color:var(--checkbox_background-color_hover);border-color:var(--checkbox_border-color_hover);color:var(--checkbox_color_hover)}.en__twitterTarget__select:not(:checked):before{color:#0000}.en__twitterTarget__select:checked:before{background-color:var(--checkbox_background-color_checked);border-color:var(--checkbox_border-color_checked);color:var(--checkbox_color_checked);content:var(--checkbox_content_checked)}.en__pg__select input{content:"";cursor:pointer;left:-9999px;max-width:min-content;min-height:var(--radio_height);position:relative}.en__pg__select input:before{align-items:center;background-color:var(--radio_background-color);border:var(--radio_border-width) solid var(--radio_border-color);border-radius:var(--radio_border-radius);box-shadow:var(--radio_box-shadow);color:var(--radio_color);content:var(--radio_content);display:flex;height:var(--radio_height);justify-content:center;left:9999px;min-width:var(--radio_width);position:relative;width:var(--radio_width)}.en__pg__select input:focus:before,.en__pg__select input:hover:before{background-color:var(--radio_background-color_hover);border-color:var(--radio_border-color_hover);box-shadow:var(--radio_box-shadow_hover);color:var(--radio_color_hover)}.en__pg__select input:not(:checked):before{color:#0000}.en__pg__select input:checked:before{background-color:var(--radio_background-color_selected);border-color:var(--radio_border-color_selected);box-shadow:var(--radio_box-shadow_selected);color:var(--radio_color_selected)}.en__pg--selected .en__pg__select input[type=radio]{outline:none}@-moz-document url-prefix(){.en__pg__select input[type=radio]{accent-color:var(--radio_color_selected);appearance:auto;background:#0000;border:none;outline:none;position:static;visibility:visible!important;width:var(--radio_height)}.en__pg__select input[type=radio]:before{position:static}}input.en__contactDetails__select,input.en__field__input--checkbox,input.en__field__input--radio{clip:rect(0 0 0 0);border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.en__contactDetails__select:focus+.en__contactDetails__rows,.en__field__input--checkbox:focus+.en__field__label,.en__field__input--radio:focus+.en__field__label{outline:1px auto -webkit-focus-ring-color;outline-offset:calc(max(var(--fields_spacing-inline), var(--fields_spacing-block)) - 3px)}.en__field--checkbox[class*=en__field--NOT_TAGGED_] .en__field__element,.en__field--radio[class*=en__field--NOT_TAGGED_] .en__field__element{align-items:flex-start;flex-direction:column}select,select.en__field__input--select,select.en__field__input--splitselect,select.en__field__input--tripleselect{-webkit-appearance:none;appearance:none;background-color:var(--select_background-color);background-image:url("data:image/svg+xml;utf8,");background-origin:content-box;background-position:calc(100% + 1.2ch + .1875rem);background-repeat:no-repeat;background-size:.5625rem .375rem;border:var(--select_border-width) solid var(--select_border-color);border-radius:var(--select_border-radius);box-shadow:var(--select_box-shadow);box-sizing:border-box;color:var(--select_color);cursor:pointer;display:block;font-family:var(--select_font-family);font-size:var(--select_font-size);font-weight:var(--select_font-weight);height:auto;line-height:var(--select_line-height);margin:0;max-width:100%;min-width:auto;padding:var(--select_padding);padding-right:var(--select_padding-right);transition:box-shadow .25s,border-color .25s ease-in-out;width:100%}select.en__field__input--select:focus,select.en__field__input--select:hover,select.en__field__input--splitselect:focus,select.en__field__input--splitselect:hover,select.en__field__input--tripleselect:focus,select.en__field__input--tripleselect:hover,select:focus,select:hover{background-color:var(--select_background-color_hover);background-image:url("data:image/svg+xml;utf8,");border-bottom-color:var(--select_border-color_hover);border-color:var(--select_border-color_hover) var(--select_border-color_hover) var(--select_border-bottom-color_hover);box-shadow:var(--select_box-shadow_hover);color:var(--select_color_hover)}.en__contactMessage__plainText,.en__field__input--textarea,textarea{background-color:var(--textarea_background-color);border:var(--textarea_border-width) solid var(--textarea_border-color);border-radius:var(--textarea_border-radius);box-shadow:var(--textarea_box-shadow);box-sizing:border-box;color:var(--textarea_color);display:block;font-family:var(--textarea_font-family);font-size:var(--textarea_font-size);font-weight:var(--textarea_font-weight);height:auto;line-height:var(--textarea_line-height);margin:0;max-width:100%;min-height:var(--textarea_min-height);min-width:auto;padding:var(--textarea_padding);resize:vertical;transition:box-shadow .25s,border-color .25s ease-in-out;width:100%}.en__contactMessage__plainText:focus,.en__contactMessage__plainText:hover,.en__field__input--textarea:focus,.en__field__input--textarea:hover,textarea:focus,textarea:hover{background-color:var(--textarea_background-color_hover);border-bottom-color:var(--textarea_border-color_hover);border-color:var(--textarea_border-color_hover) var(--textarea_border-color_hover) var(--textarea_border-bottom-color_hover);box-shadow:var(--textarea_box-shadow_hover);color:var(--textarea_color_hover)}.en__field__element--splitselect .en__field__item,.en__field__element--splittext .en__field__item{flex-basis:50%}.en__field__element--tripleselect .en__field__item,.en__field__element--tripletext .en__field__item{flex-basis:33.3333333333%}.en__imageSelectField__image{padding-bottom:var(--fields_spacing-block)}.en__field__element--imgselect{display:flex;flex-wrap:wrap}.en__field--imgselect .en__field__item{flex-basis:33.3333333333%}.en__imageSelectField__control{align-items:center;display:flex;flex-direction:column}.en__imageSelectField__control .en__field__input--imageSelectField{width:auto}.en__field--imgselect .en__imageSelectField{display:flex;flex-direction:column}.en__contactDetails__rows{align-items:flex-start;flex-basis:100%;flex-direction:column;margin-left:calc(var(--checkbox_width) + var(--fields_spacing-inline));width:100%}.en__contacts:not(.en__contacts--hideCheck) .en__contactDetails__rows:before{background-color:var(--color_white);border:1px solid var(--color_black);box-shadow:inset 0 0 0 5px var(--color_white);content:"";cursor:pointer;display:inline-block;height:var(--checkbox_height);left:0;min-width:var(--checkbox_width);position:absolute;top:5px;transition-duration:.25s;transition-property:border-color,background-color;vertical-align:middle;width:var(--checkbox_width)}.en__contactDetails__rows:before{background-color:var(--checkbox_background-color);border-radius:var(--checkbox_border-radius);border-width:var(--checkbox_border-width);box-shadow:none;color:var(--checkbox_color)}.en__contacts:not(.en__contacts--hideCheck) .en__contactDetails__select:checked+.en__contactDetails__rows:before{background-color:var(--checkbox_background-color_checked);border-color:var(--checkbox_border-color_checked);border-width:var(--checkbox_border-width);box-shadow:inset 0 0 0 0 var(--checkbox_background-color);color:var(--checkbox_color_checked)}.en__contacts:not(.en__contacts--hideCheck) .en__contactDetails__select:checked+.en__contactDetails__rows:after{color:var(--checkbox_color_checked);content:var(--checkbox_content_checked);cursor:pointer;font-family:var(--checkbox_font-family);font-size:var(--checkbox_font-size);font-weight:var(--checkbox_font-weight);left:3px;line-height:var(--checkbox_line-height);position:absolute;top:5px}.en__field__notice{order:3}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}::-webkit-input-placeholder{color:var(--input_placeholder-color);font-weight:var(--input_placeholder-font-weight);opacity:var(--input_placeholder-opacity)}::placeholder{color:var(--input_placeholder-color);font-weight:var(--input_placeholder-font-weight);opacity:var(--input_placeholder-opacity)}:-ms-input-placeholder{color:var(--input_placeholder-color);font-weight:var(--input_placeholder-font-weight);opacity:var(--input_placeholder-opacity)}::-ms-input-placeholder{color:var(--input_placeholder-color);font-weight:var(--input_placeholder-font-weight);opacity:var(--input_placeholder-opacity)}[data-engrid-theme] select[data-selected-value=""]{color:var(--select_placeholder-color);font-weight:var(--select_placeholder-font-weight);opacity:var(--select_placeholder-opacity)}.en__hidden{display:none!important}.en__field--hidden{display:block;width:100%!important}input[disabled],input[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed}.en__captcha{display:flex;flex-direction:column;margin-bottom:1rem;padding-bottom:0;position:relative}body[data-engrid-live-currency=active] .en__field--donationAmt .en__field__item:not([data-engrid-currency-symbol-updated=true]) label{color:#0000!important}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{-apple-pay-button-type:donate;-webkit-appearance:-apple-pay-button;display:inline-block}.apple-pay-button,.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.en__field__input.en__field__input--radio[value=applepay]+label{border-width:0!important}.en__field__input.en__field__input--radio[value=applepay]:checked+label{background-color:initial!important}.en__field__input.en__field__input--radio[value=applepay]:checked+label .apple-pay-button{-apple-pay-button-style:inherit!important}}@supports not (-webkit-appearance:-apple-pay-button){.apple-pay-button,.apple-pay-container,.en__field__input.en__field__input--radio[value=applepay]+label{display:none}}input:-webkit-autofill,select:-webkit-autofill,textarea:-webkit-autofill{animation-name:onAutoFillStart;-webkit-transition:background-color 50000s ease-in-out 0s;transition:background-color 50000s ease-in-out 0s}input:not(:-webkit-autofill){animation-name:onAutoFillCancel}.is-autofilled,.is-autofilled label{transition:none!important}input:-webkit-autofill:first-line{font-size:var(--input_font-size)}textarea:-webkit-autofill:first-line{font-size:var(--textarea_font-size)}select:-webkit-autofill:first-line{font-size:var(--select_font-size)}[data-engrid-theme]{--engrid__page-backgroundImage_url:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}body:not(#en__pagebuilder) .page-backgroundImage img{display:none}body[data-engrid-page-background=image] .page-backgroundImage{overflow:hidden;position:relative}body[data-engrid-page-background=image] .page-backgroundImage:before{background-image:var(--engrid__page-backgroundImage_url);background-repeat:no-repeat;background-size:cover;content:" ";height:100%;left:0;position:fixed;top:0;width:100%;will-change:transform}body[data-engrid-page-background=image] .page-backgroundImage figure.media-with-attribution{background-image:var(--engrid__page-backgroundImage_url);background-position:100% 0;background-size:cover;height:100vh;left:0;position:fixed;top:0;width:100vw}body[data-engrid-page-background=image][data-engrid-layout=centerleft1col] .page-backgroundImage:before,body[data-engrid-page-background=image][data-engrid-layout=leftleft1col] .page-backgroundImage:before{background-position:100% 0}body[data-engrid-page-background=image][data-engrid-layout=centercenter1col] .page-backgroundImage:before,body[data-engrid-page-background=image][data-engrid-layout=centercenter2col] .page-backgroundImage:before{background-position:top}body[data-engrid-page-background=image][data-engrid-layout=centerright1col] .page-backgroundImage:before,body[data-engrid-page-background=image][data-engrid-layout=rightright1col] .page-backgroundImage:before{background-position:0 0}body .page-backgroundImage video{min-height:100vh;min-width:100vw;object-fit:cover;position:fixed}body .page-backgroundImage video:not(.crop-on-right):not(.crop-on-left){left:50%;top:50%;transform:translate(-50%,-50%)}body .page-backgroundImage video.crop-on-left{right:0;top:50%;transform:translateY(-50%)}body .page-backgroundImage video.crop-on-right{left:0;top:50%;transform:translateY(-50%)}.body-banner>.en__component--copyblock>p:only-child{margin:0}.body-banner img{min-width:100%}.body-banner img[data-src]{background-color:var(--engrid__body-banner_background-color)}.body-banner img[height]{height:auto!important}body{background-color:var(--engrid__page_background-color);min-height:100vh;min-width:min(100vw,100%)}[data-engrid-theme]{--button_font-family:var(--default_font-family);--button_font-size:var(--default_font-size);--button_font-weight:initial;--button_line-height:normal;--button_border-width:1px;--button_border-radius:6px;--button_padding:1ch 1.2ch;--button_text-transform:none;--submit__button_padding-top:1ch;--submit__button_padding-bottom:1ch;--submit__button_font-size:var(--button_font-size);--submit__button_text-transform:var(--button_text-transform)}.button,.en__button,.pseduo__en__submit_button,button,button.en__eventOccurrence__select,button.en__ticketRecurring__select,button.en__ticketSummary__checkout{-webkit-appearance:none;appearance:none;background-color:var(--button_background-color);border:var(--button_border-width) solid var(--button_border-color);border-radius:var(--button_border-radius);color:var(--button_color);cursor:pointer;display:block;font-family:var(--button_font-family);font-size:var(--button_font-size);font-weight:var(--button_font-weight);line-height:var(--button_line-height);margin:0 0 1rem;padding:var(--button_padding);text-align:center;text-transform:var(--button_text-transform);transition:background-color .2s ease-out,color .2s ease-out,border-color .2s ease-out}.button:focus,.button:hover,.en__button:focus,.en__button:hover,.pseduo__en__submit_button:focus,.pseduo__en__submit_button:hover,button.en__eventOccurrence__select:focus,button.en__eventOccurrence__select:hover,button.en__ticketRecurring__select:focus,button.en__ticketRecurring__select:hover,button.en__ticketSummary__checkout:focus,button.en__ticketSummary__checkout:hover,button:focus,button:hover{background-color:var(--button_background-color_hover);border-color:var(--button_border-color_hover);color:var(--button_color_hover)}.button.active,.button:active,.en__button.active,.en__button:active,.pseduo__en__submit_button.active,.pseduo__en__submit_button:active,button.active,button.en__eventOccurrence__select.active,button.en__eventOccurrence__select:active,button.en__ticketRecurring__select.active,button.en__ticketRecurring__select:active,button.en__ticketSummary__checkout.active,button.en__ticketSummary__checkout:active,button:active{background-color:var(--button_background-color_checked);border-color:var(--button_border-color_checked);color:var(--button_color_checked)}a.button,a.button.active,a.button:active,a.button:focus,a.button:hover{-webkit-text-decoration:none;text-decoration:none}.en__submit{width:100%}.en__submit .button,.en__submit button,.pseduo__en__submit_button,button.primary{background-color:var(--submit__button_background-color);border-color:var(--submit__button_border-color);color:var(--submit__button_color);font-size:var(--submit__button_font-size);margin-top:2rem;max-width:var(--submit__button_max-width);padding-bottom:var(--submit__button_padding-bottom);padding-top:var(--submit__button_padding-top);text-transform:var(--submit__button_text-transform);width:100%}.en__submit .button:focus,.en__submit .button:hover,.en__submit button:focus,.en__submit button:hover,.pseduo__en__submit_button:focus,.pseduo__en__submit_button:hover,button.primary:focus,button.primary:hover{background-color:var(--submit__button_background-color_hover);border-color:var(--submit__button_border-color_hover);color:var(--submit__button_color_hover)}.en__submit .button:active,.en__submit button:active,.pseduo__en__submit_button:active,button.primary:active{background-color:var(--submit__button_background-color_checked);border-color:var(--submit__button_border-color_checked);color:var(--submit__button_color_checked)}.arrow .en__submit .button:after,.arrow .en__submit button:after{content:"β†’";float:right;margin-right:1rem;opacity:.9}.arrow .en__submit .button:disabled:after,.arrow .en__submit button:disabled:after{display:none}.next-step .en__submit .button,.next-step .en__submit button{margin-left:auto;width:auto}.button[disabled]:focus,.button[disabled]:hover,button[disabled],button[disabled]:focus .button[disabled],button[disabled]:hover{content:"Processing..."}.button[disabled],button[disabled]{cursor:not-allowed;filter:grayscale(1);opacity:.5}[data-engrid-theme] .en__component--callcontactblock{margin-left:auto;margin-right:auto;width:100%}[data-engrid-theme] .en__component--callcontactblock .en__contact__detail{flex-wrap:wrap}[data-engrid-theme] .en__component--callcontactblock .en__contact__detail .en__overlay{position:static}[data-engrid-theme] .en__component--callcontactblock .en__contacts{background-color:initial;padding:0}[data-engrid-theme] .en__component--callcontactblock .en__contact__main{display:flex;flex-wrap:wrap;justify-content:space-between}[data-engrid-theme] .en__component--callcontactblock .en__overlay--callcontact{width:100%}[data-engrid-theme] .en__component--callsurveyblock .en__c2c__survey__rate{gap:1rem;max-width:100%}[data-engrid-theme] .en__component--callsurveyblock .en__field__element--textarea{width:100%}[data-engrid-theme] .en__component--callsurveyblock .en__c2c__survey__rate .en__button{margin-bottom:0;opacity:1}@media screen and (max-width:768px){[data-engrid-theme] .en__component--callsurveyblock .en__c2c__survey__rate{flex-direction:column}[data-engrid-theme] .en__component--callsurveyblock .en__button{width:100%}}[data-engrid-theme]{--click-to-expand__copy-area_height:450px;--click-to-expand__cta-image_url:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAALVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBoCg+AAAAD3RSTlMA8fqeDQWopG9ku5d/fFeqbhOLAAAASElEQVQI12PAA9ZBqFcMSRNANKcaA7skiDGxgIHVsJWBIUI4gIHBWYKBodEEKMpieIFX2AEk765zqASskzVJLQBiBvcGBuIAAGXcCweYv+y6AAAAAElFTkSuQmCC);--click-to-expand__cta-image_width:16px;--click-to-expand__cta-image_height:16px}body:not(#en__pagebuilder) .click-to-expand .click-to-expand-text-wrapper>:first-child{margin-top:0}body:not(#en__pagebuilder) .click-to-expand:not(.expanded){cursor:pointer;max-height:var(--click-to-expand__copy-area_height);overflow:hidden}body:not(#en__pagebuilder) .click-to-expand:not(.expanded) .click-to-expand-text-wrapper{-webkit-mask-image:linear-gradient(to bottom,#000 50%,#fff0 calc(100% - var(--click-to-expand__cta-image_height)));mask-image:linear-gradient(to bottom,#000 50%,#fff0 calc(100% - var(--click-to-expand__cta-image_height)));max-height:calc(var(--click-to-expand__copy-area_height) - var(--click-to-expand__cta-image_height) - 35px)}body:not(#en__pagebuilder) .click-to-expand:not(.expanded) .click-to-expand-cta{background:var(--click-to-expand__cta-image_url);background-position:bottom;background-repeat:no-repeat;background-size:var(--click-to-expand__cta-image_width) var(--click-to-expand__cta-image_height);bottom:0;height:var(--click-to-expand__cta-image_height);left:0;margin-left:auto;margin-right:auto;position:absolute;right:0;width:var(--click-to-expand__cta-image_width)}body:not(#en__pagebuilder) .click-to-expand.expanded .click-to-expand-text-wrapper{outline:none}[data-engrid-theme]{--color_transparent:#0000;--color_white:#fff;--color_off-white:#d4d4d4;--color_light-gray:#ababab;--color_gray:grey;--color_dark-gray:#545454;--color_off-black:#2b2b2b;--color_black:#000;--color_primary:#22a3cb;--color_primary_overlay:#fff;--color_primary_accent:#000;--color_secondary:#000;--color_secondary_overlay:#fff;--color_secondary_accent:#000;--color_tertiary:#fff;--color_tertiary_overlay:#000;--color_tertiary_accent:#fff;--default_color:initial;--h1_color:var(--default_color);--h2_color:var(--h1_color);--h3_color:var(--h1_color);--h4_color:var(--h1_color);--h5_color:var(--h1_color);--h6_color:var(--h1_color);--a_color:initial;--a_color_hover:var(--a_color);--highlight__background-color:var(--color_primary);--highlight__color:var(--color_primary_overlay);--media-attribution__color:#ffffffe6;--media-attribution__background-color:#0000004d;--error__color:#ff530a;--error__color_grayscale:#949494;--error__color_faded:#fff8f4;--error__background-color:#fff8f4;--label_color:initial;--input_color:#000;--input_background-color:#fafafa;--input_border-color:#dfdfe1;--input_placeholder-color:#ababab;--input_color_hover:var(--input_color);--input_background-color_hover:var(--input_background-color);--input_border-color_hover:#767677;--input_border-bottom-color_hover:var(--input_border-color_hover);--radio_color:var(--input_color);--radio_background-color:var(--input_background-color);--radio_border-color:var(--input_border-color);--radio_color_hover:var(--radio_color);--radio_background-color_hover:var(--radio_background-color);--radio_border-color_hover:var(--input_border-color_hover);--radio_color_selected:var(--radio_color_hover);--radio_background-color_selected:var(--radio_background-color_hover);--radio_border-color_selected:var(--input_border-color_hover);--checkbox_color:var(--color_black);--checkbox_background-color:var(--radio_background-color);--checkbox_border-color:var(--radio_border-color);--checkbox_color_hover:var(--checkbox_color);--checkbox_background-color_hover:var(--radio_background-color_hover);--checkbox_border-color_hover:var(--radio_border-color_hover);--checkbox_color_checked:var(--checkbox_color_hover);--checkbox_background-color_checked:var(--radio_background-color_hover);--checkbox_border-color_checked:var(--color_black);--select_color:var(--input_color);--select_background-color:var(--input_background-color);--select_border-color:var(--input_border-color);--select_background-color_hover:var(--select_background-color);--select_border-color_hover:var(--input_border-color_hover);--select_border-bottom-color_hover:var(--select_border-color_hover);--select_placeholder-color:var(--input_placeholder-color);--textarea_color:var(--input_color);--textarea_background-color:var(--input_background-color);--textarea_border-color:var(--input_border-color);--textarea_placeholder-color:var(--color_light-gray);--textarea_color_hover:var(--textarea_color);--textarea_background-color_hover:var(--textarea_background-color);--textarea_border-color_hover:var(--input_border-color_hover);--textarea_border-bottom-color_hover:var(--textarea_border-color_hover);--button_color:var(--color_primary_overlay);--button_background-color:var(--color_primary);--button_border-color:var(--button_background-color);--button_color_hover:var(--button_color);--button_background-color_hover:var(--color_black);--button_border-color_hover:var(--button_background-color_hover);--button_color_checked:var(--button_color_hover);--button_background-color_checked:var(--button_background-color_hover);--button_border-color_checked:var(--button_border-color_hover);--submit__button_color:var(--button_color);--submit__button_border-color:var(--button_border-color);--submit__button_background-color:var(--button_background-color);--submit__button_color_hover:var(--button_color);--submit__button_background-color_hover:var(--button_background-color_hover);--submit__button_border-color_hover:var(--button_background-color_hover);--submit__button_color_checked:var(--button_color_hover);--submit__button_background-color_checked:var( + );--radio_width:20px;--radio_height:20px;--radio_top:0px;--radio_text-transform:initial;--radio_box-shadow_hover:inset 0 0 0 6px #f5f5f5;--radio_box-shadow_selected:inset 0 0 0 6px #000;--checkbox_border-width:var(--input_border-width);--checkbox_border-radius:var(--input_border-radius);--checkbox_font-family:var(--radio_font-family);--checkbox_font-size:var(--radio_font-size);--checkbox_font-weight:var(--radio_font-weight);--checkbox_line-height:var(--radio_line-height);--checkbox_width:var(--radio_width);--checkbox_height:var(--radio_height);--checkbox_top:0px;--checkbox_padding-top:0px;--checkbox_padding-left:0px;--checkbox_text-transform:var(--radio_text-transform);--checkbox_check_font-size:var(--radio_font-size);--checkbox_content_checked:"βœ“";--select_font-family:var(--input_font-family);--select_font-size:var(--input_font-size);--select_font-weight:initial;--select_line-height:var(--input_line-height);--select_border-width:var(--input_border-width);--select_border-radius:var(--input_border-radius);--select_placeholder-opacity:var(--input_placeholder-opacity);--select_placeholder-font-weight:var(--input_placeholder-font-weight);--select_box-shadow:var(--input_box-shadow);--select_padding:var(--input_padding);--select_padding-right:2.4ch;--select_box-shadow_hover:var(--input_box-shadow_hover);--textarea_font-family:var(--input_font-family);--textarea_font-size:var(--input_font-size);--textarea_font-weight:initial;--textarea_line-height:initial;--textarea_border-width:var(--input_border-width);--textarea_border-radius:var(--input_border-radius);--textarea_box-shadow:var(--input_box-shadow);--textarea_padding:var(--input_padding);--textarea_min-height:calc(1ch + var(--textarea_font-size)*10);--textarea_box-shadow_hover:var(--input_box-shadow_hover)}.en__component--formblock,.en__component--svblock,.en__registrants__registrantDetails{display:flex;flex-wrap:wrap;justify-content:flex-start;margin-left:calc(var(--fields_spacing-inline)*-1);margin-right:calc(var(--fields_spacing-inline)*-1)}.en__component--formblock>*,.en__component--svblock>*,.en__registrants__registrantDetails>*{padding-left:var(--fields_spacing-inline);padding-right:var(--fields_spacing-inline)}.en__component--formblock .en__field,.en__component--svblock .en__field,.en__registrants__registrantDetails .en__field{display:flex;flex-basis:100%;flex-direction:column;margin-bottom:var(--fields_spacing-block);padding-bottom:0}.en__component--formblock .en__field .en__field__helpText,.en__component--formblock .en__field .en__field__label:not(.en__field__label--item):not([for*=svquestion]),.en__component--svblock .en__field .en__field__helpText,.en__component--svblock .en__field .en__field__label:not(.en__field__label--item):not([for*=svquestion]),.en__registrants__registrantDetails .en__field .en__field__helpText,.en__registrants__registrantDetails .en__field .en__field__label:not(.en__field__label--item):not([for*=svquestion]){align-items:center;display:flex;justify-content:space-between;position:relative}.en__component--formblock .en__field .en__field__element,.en__component--svblock .en__field .en__field__element,.en__registrants__registrantDetails .en__field .en__field__element{align-items:center;display:flex;flex-wrap:wrap}.en__component--formblock .en__field .en__field__element .en__submit,.en__component--svblock .en__field .en__field__element .en__submit,.en__registrants__registrantDetails .en__field .en__field__element .en__submit{padding-left:var(--fields_spacing-inline);padding-right:var(--fields_spacing-inline)}.en__component--formblock .en__field .en__field__element .en__submit.en__rangeFieldLabels,.en__component--svblock .en__field .en__field__element .en__submit.en__rangeFieldLabels,.en__registrants__registrantDetails .en__field .en__field__element .en__submit.en__rangeFieldLabels{margin-bottom:var(--fields_spacing-block);padding-left:0;padding-right:0}.en__component--formblock .en__field .en__field__element.en__field__element--checkbox,.en__component--formblock .en__field .en__field__element.en__field__element--imgselect,.en__component--formblock .en__field .en__field__element.en__field__element--radio,.en__component--formblock .en__field .en__field__element.en__field__element--rating,.en__component--formblock .en__field .en__field__element.en__field__element--splitselect,.en__component--formblock .en__field .en__field__element.en__field__element--splittext,.en__component--formblock .en__field .en__field__element.en__field__element--tripleselect,.en__component--formblock .en__field .en__field__element.en__field__element--tripletext,.en__component--formblock .en__field .en__field__element.en__field__element--withOther,.en__component--svblock .en__field .en__field__element.en__field__element--checkbox,.en__component--svblock .en__field .en__field__element.en__field__element--imgselect,.en__component--svblock .en__field .en__field__element.en__field__element--radio,.en__component--svblock .en__field .en__field__element.en__field__element--rating,.en__component--svblock .en__field .en__field__element.en__field__element--splitselect,.en__component--svblock .en__field .en__field__element.en__field__element--splittext,.en__component--svblock .en__field .en__field__element.en__field__element--tripleselect,.en__component--svblock .en__field .en__field__element.en__field__element--tripletext,.en__component--svblock .en__field .en__field__element.en__field__element--withOther,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--checkbox,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--imgselect,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--radio,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--rating,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splitselect,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splittext,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripleselect,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripletext,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--withOther{margin-left:calc(var(--fields_spacing-inline)*-1);margin-right:calc(var(--fields_spacing-inline)*-1)}.en__component--formblock .en__field .en__field__element.en__field__element--checkbox .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--checkbox>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--imgselect .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--imgselect>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--radio .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--radio>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--rating .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--rating>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--splitselect .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--splitselect>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--splittext .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--splittext>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--tripleselect .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--tripleselect>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--tripletext .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--tripletext>[data-unhidden],.en__component--formblock .en__field .en__field__element.en__field__element--withOther .en__field__item,.en__component--formblock .en__field .en__field__element.en__field__element--withOther>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--checkbox .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--checkbox>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--imgselect .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--imgselect>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--radio .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--radio>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--rating .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--rating>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--splitselect .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--splitselect>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--splittext .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--splittext>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--tripleselect .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--tripleselect>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--tripletext .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--tripletext>[data-unhidden],.en__component--svblock .en__field .en__field__element.en__field__element--withOther .en__field__item,.en__component--svblock .en__field .en__field__element.en__field__element--withOther>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--checkbox .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--checkbox>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--imgselect .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--imgselect>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--radio .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--radio>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--rating .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--rating>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splitselect .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splitselect>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splittext .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--splittext>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripleselect .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripleselect>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripletext .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--tripletext>[data-unhidden],.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--withOther .en__field__item,.en__registrants__registrantDetails .en__field .en__field__element.en__field__element--withOther>[data-unhidden]{padding:calc(var(--fields_spacing-block)*.5) var(--fields_spacing-inline) var(--fields_spacing-block)}.en__component--formblock .en__field .en__field__element>.en__field__input--vgs,.en__component--formblock .en__field .en__field__element>input,.en__component--formblock .en__field .en__field__element>select,.en__component--formblock .en__field .en__field__element>textarea,.en__component--svblock .en__field .en__field__element>.en__field__input--vgs,.en__component--svblock .en__field .en__field__element>input,.en__component--svblock .en__field .en__field__element>select,.en__component--svblock .en__field .en__field__element>textarea,.en__registrants__registrantDetails .en__field .en__field__element>.en__field__input--vgs,.en__registrants__registrantDetails .en__field .en__field__element>input,.en__registrants__registrantDetails .en__field .en__field__element>select,.en__registrants__registrantDetails .en__field .en__field__element>textarea{margin-bottom:var(--fields_spacing-block);margin-top:calc(var(--fields_spacing-inline)*.5)}.en__component--formblock .en__field.en__field--withOther .en__field__element,.en__component--svblock .en__field.en__field--withOther .en__field__element,.en__registrants__registrantDetails .en__field.en__field--withOther .en__field__element{margin-left:calc(var(--fields_spacing-inline)*-1);margin-right:calc(var(--fields_spacing-inline)*-1)}.en__component--formblock .en__field.en__field--withOther .en__field__element .en__field__item,.en__component--svblock .en__field.en__field--withOther .en__field__element .en__field__item,.en__registrants__registrantDetails .en__field.en__field--withOther .en__field__element .en__field__item{padding-left:var(--fields_spacing-inline);padding-right:var(--fields_spacing-inline)}.en__component--eccheckout__additional .en__field__element--radio.en__field__element,.en__component--formblock .en__field.en__field--checkbox.en__field--question .en__field__element,.en__component--formblock .en__field.en__field--checkbox.en__field--survey .en__field__element,.en__component--formblock .en__field.en__field--radio.en__field--question .en__field__element,.en__component--formblock .en__field.en__field--radio.en__field--survey .en__field__element,.en__component--formblock.direction-column .en__field--checkbox .en__field__element,.en__component--formblock.direction-column .en__field--radio .en__field__element,.en__component--svblock .en__field.en__field--checkbox.en__field--question .en__field__element,.en__component--svblock .en__field.en__field--checkbox.en__field--survey .en__field__element,.en__component--svblock .en__field.en__field--radio.en__field--question .en__field__element,.en__component--svblock .en__field.en__field--radio.en__field--survey .en__field__element,.en__component--svblock.direction-column .en__field--checkbox .en__field__element,.en__component--svblock.direction-column .en__field--radio .en__field__element,.en__registrants__registrantDetails .en__field.en__field--checkbox.en__field--question .en__field__element,.en__registrants__registrantDetails .en__field.en__field--checkbox.en__field--survey .en__field__element,.en__registrants__registrantDetails .en__field.en__field--radio.en__field--question .en__field__element,.en__registrants__registrantDetails .en__field.en__field--radio.en__field--survey .en__field__element,.en__registrants__registrantDetails.direction-column .en__field--checkbox .en__field__element,.en__registrants__registrantDetails.direction-column .en__field--radio .en__field__element{align-items:center;display:grid;grid-auto-rows:auto;margin-bottom:var(--fields_spacing-block);max-width:100%;width:fit-content}.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__element,.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__element,.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__element,.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__element,.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__element,.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__element{grid-template-columns:min-content}.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item,.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item,.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item,.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item,.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item,.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__item{grid-column:span 2}.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:last-child,.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2),.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:last-child,.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2),.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:last-child,.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2),.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:last-child,.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2),.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:last-child,.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2),.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__item:last-child,.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2){grid-column:span 1}.en__component--formblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__component--formblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__component--svblock.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__component--svblock.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__registrants__registrantDetails.inline-other .en__field--checkbox.en__field--withOther--active .en__field__item:nth-last-child(2) label,.en__registrants__registrantDetails.inline-other .en__field--radio.en__field--withOther--active .en__field__item:nth-last-child(2) label{word-break:keep-all}label{color:var(--label_color);display:flex;font-family:var(--label_font-family);font-size:var(--label_font-size);font-weight:var(--label_font-weight);letter-spacing:var(--label_letter-spacing);line-height:var(--label_line-height);text-transform:var(--label_text-transform)}label a.label-tooltip{color:var(--label_color);font-weight:400;margin-left:var(--fields_spacing-inline);margin-right:var(--fields_spacing-inline);right:0;-webkit-text-decoration:underline;text-decoration:underline;text-transform:none}label a.label-tooltip:last-child{margin-right:0}.label-wrapper{align-content:center;display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--fields_spacing-inline)/2) calc(var(--fields_spacing-inline)*2);justify-content:space-between}.label-wrapper a.label-tooltip{color:var(--a_color);font-family:var(--label_font-family);font-size:var(--label_font-size);font-weight:var(--a_font-weight);letter-spacing:var(--label_letter-spacing);line-height:var(--label_line-height);margin-left:0;margin-right:0;-webkit-text-decoration:var(--a_text-decoration);text-decoration:var(--a_text-decoration);text-transform:var(--label_text-transform)}input,input.en__field__input{background-color:var(--input_background-color);border:var(--input_border-width) solid var(--input_border-color);border-radius:var(--input_border-radius);box-sizing:border-box;color:var(--input_color);display:block;font-family:var(--input_font-family);font-size:var(--input_font-size);font-weight:var(--input_font-weight);height:auto;line-height:var(--input_line-height);margin:0;max-width:100%;min-width:auto;padding:var(--input_padding);transition:box-shadow .25s,border-color .25s ease-in-out;width:100%}input.en__field__input:focus,input.en__field__input:hover,input:focus,input:hover{background-color:var(--input_background-color_hover);border-bottom-color:var(--input_border-color_hover);border-color:var(--input_border-color_hover) var(--input_border-color_hover) var(--input_border-bottom-color_hover);color:var(--input_color_hover)}.en__field__input--vgs{--en-vgs-width:100%;--en-vgs-borderWidth:var(--input_border-width);--en-vgs-borderStyle:solid;--en-vgs-borderColor:var(--input_border-color);--en-vgs-borderRadius:var(--input_border-radius);--en-vgs-backgroundColor:var(--input_background-color);--en-vgs-fontSize:var(--input_font-size);transition:box-shadow .25s,border-color .25s ease-in-out;width:100%}.en__field__input--vgs.vgs-collect-container__focused,.en__field__input--vgs:hover{background-color:var(--input_background-color_hover);border-bottom-color:var(--input_border-color_hover);border-color:var(--input_border-color_hover) var(--input_border-color_hover) var(--input_border-bottom-color_hover)}.en__field__input--vgs.vgs-collect-container__focused{outline-color:-webkit-focus-ring-color;outline-style:auto}@-moz-document url-prefix(){.en__field__input--vgs.vgs-collect-container__focused{outline:1px dotted #000}}.en__field__input--vgs iframe{border-radius:var(--input_border-radius)}input[type=date],input[type=email],input[type=number],input[type=password],input[type=tel],input[type=text],input[type=textarea]{box-shadow:var(--input_box-shadow)}input[type=date]:focus,input[type=date]:hover,input[type=email]:focus,input[type=email]:hover,input[type=number]:focus,input[type=number]:hover,input[type=password]:focus,input[type=password]:hover,input[type=tel]:focus,input[type=tel]:hover,input[type=text]:focus,input[type=text]:hover,input[type=textarea]:focus,input[type=textarea]:hover{box-shadow:var(--input_box-shadow_hover)}input[type=range]{border:0;box-shadow:none;padding-left:0;padding-right:0}:not(#EN__RootElement) input[type=email],:not(#EN__RootElement) input[type=number],:not(#EN__RootElement) input[type=tel],input[type=text]{-webkit-appearance:textfield;appearance:textfield}input[type=radio]+label{align-items:center;cursor:pointer;display:flex;font-family:var(--radio_font-family);font-size:var(--radio_font-size);font-weight:var(--radio_font-weight);line-height:var(--radio_line-height);padding-top:max(0px,var(--radio_top) * -1);text-transform:var(--radio_text-transform)}input[type=radio]+label:before{align-items:center;background-color:var(--radio_background-color);border:var(--radio_border-width) solid var(--radio_border-color);border-radius:var(--radio_border-radius);box-shadow:var(--radio_box-shadow);color:var(--radio_color);content:var(--radio_content);display:flex;height:var(--radio_height);justify-content:center;margin-right:max(var(--fields_spacing-inline),1ch,.5rem);min-width:var(--radio_width);position:relative;top:var(--radio_top);width:var(--radio_width)}input[type=radio]:focus+label:before,input[type=radio]:hover+label:before{background-color:var(--radio_background-color_hover);border-color:var(--radio_border-color_hover);box-shadow:var(--radio_box-shadow_hover);color:var(--radio_color_hover)}input[type=radio]:not(:checked)+label:before{color:#0000}input[type=radio]:checked+label:before{background-color:var(--radio_background-color_selected);border-color:var(--radio_border-color_selected);box-shadow:var(--radio_box-shadow_selected);color:var(--radio_color_selected)}input[type=checkbox]+label{align-items:center;content:"";cursor:pointer;display:flex;font-family:var(--checkbox_font-family);font-size:var(--checkbox_font-size);font-weight:var(--checkbox_font-weight);line-height:var(--checkbox_line-height);padding-top:max(0px,var(--checkbox_top) * -1);text-transform:var(--checkbox_text-transform)}input[type=checkbox]+label:before{align-items:center;background-color:var(--checkbox_background-color);border:var(--checkbox_border-width) solid var(--checkbox_border-color);border-radius:var(--checkbox_border-radius);color:var(--checkbox_color);content:"";display:flex;flex:0 0 auto;height:var(--checkbox_height);justify-content:center;margin-right:max(var(--fields_spacing-inline),1ch,.5rem);min-width:var(--checkbox_width);padding-left:var(--checkbox_padding-left);padding-top:var(--checkbox_padding-top);position:relative;top:var(--checkbox_top);width:var(--checkbox_width)}input[type=checkbox]:focus+label:before,input[type=checkbox]:hover+label:before{background-color:var(--checkbox_background-color_hover);border-color:var(--checkbox_border-color_hover);color:var(--checkbox_color_hover)}input[type=checkbox]:not(:checked)+label:before{color:#0000}input[type=checkbox]:checked+label:before{background-color:var(--checkbox_background-color_checked);border-color:var(--checkbox_border-color_checked);color:var(--checkbox_color_checked);content:var(--checkbox_content_checked)}.en__twitterTarget__select{content:"";cursor:pointer;max-width:min-content;padding-top:max(0px,var(--checkbox_top) * -1);visibility:hidden}.en__twitterTarget__select:before{align-items:center;background-color:var(--checkbox_background-color);border:var(--checkbox_border-width) solid var(--checkbox_border-color);border-radius:var(--checkbox_border-radius);color:var(--checkbox_color);content:"";display:flex;height:var(--checkbox_height);justify-content:center;min-width:var(--checkbox_width);padding-left:var(--checkbox_padding-left);padding-top:var(--checkbox_padding-top);position:relative;top:var(--checkbox_top);visibility:visible;width:var(--checkbox_width)}.en__twitterTarget__select:focus:before,.en__twitterTarget__select:hover:before{background-color:var(--checkbox_background-color_hover);border-color:var(--checkbox_border-color_hover);color:var(--checkbox_color_hover)}.en__twitterTarget__select:not(:checked):before{color:#0000}.en__twitterTarget__select:checked:before{background-color:var(--checkbox_background-color_checked);border-color:var(--checkbox_border-color_checked);color:var(--checkbox_color_checked);content:var(--checkbox_content_checked)}.en__pg__select input{content:"";cursor:pointer;left:-9999px;max-width:min-content;min-height:var(--radio_height);position:relative}.en__pg__select input:before{align-items:center;background-color:var(--radio_background-color);border:var(--radio_border-width) solid var(--radio_border-color);border-radius:var(--radio_border-radius);box-shadow:var(--radio_box-shadow);color:var(--radio_color);content:var(--radio_content);display:flex;height:var(--radio_height);justify-content:center;left:9999px;min-width:var(--radio_width);position:relative;width:var(--radio_width)}.en__pg__select input:focus:before,.en__pg__select input:hover:before{background-color:var(--radio_background-color_hover);border-color:var(--radio_border-color_hover);box-shadow:var(--radio_box-shadow_hover);color:var(--radio_color_hover)}.en__pg__select input:not(:checked):before{color:#0000}.en__pg__select input:checked:before{background-color:var(--radio_background-color_selected);border-color:var(--radio_border-color_selected);box-shadow:var(--radio_box-shadow_selected);color:var(--radio_color_selected)}.en__pg--selected .en__pg__select input[type=radio]{outline:none}@-moz-document url-prefix(){.en__pg__select input[type=radio]{accent-color:var(--radio_color_selected);appearance:auto;background:#0000;border:none;outline:none;position:static;visibility:visible!important;width:var(--radio_height)}.en__pg__select input[type=radio]:before{position:static}}input.en__contactDetails__select,input.en__field__input--checkbox,input.en__field__input--radio{clip:rect(0 0 0 0);border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.en__contactDetails__select:focus+.en__contactDetails__rows,.en__field__input--checkbox:focus+.en__field__label,.en__field__input--radio:focus+.en__field__label{outline:1px auto -webkit-focus-ring-color;outline-offset:calc(max(var(--fields_spacing-inline), var(--fields_spacing-block)) - 3px)}.en__field--checkbox[class*=en__field--NOT_TAGGED_] .en__field__element,.en__field--radio[class*=en__field--NOT_TAGGED_] .en__field__element{align-items:flex-start;flex-direction:column}select,select.en__field__input--select,select.en__field__input--splitselect,select.en__field__input--tripleselect{-webkit-appearance:none;appearance:none;background-color:var(--select_background-color);background-image:url("data:image/svg+xml;utf8,");background-origin:content-box;background-position:calc(100% + 1.2ch + .1875rem);background-repeat:no-repeat;background-size:.5625rem .375rem;border:var(--select_border-width) solid var(--select_border-color);border-radius:var(--select_border-radius);box-shadow:var(--select_box-shadow);box-sizing:border-box;color:var(--select_color);cursor:pointer;display:block;font-family:var(--select_font-family);font-size:var(--select_font-size);font-weight:var(--select_font-weight);height:auto;line-height:var(--select_line-height);margin:0;max-width:100%;min-width:auto;padding:var(--select_padding);padding-right:var(--select_padding-right);transition:box-shadow .25s,border-color .25s ease-in-out;width:100%}select.en__field__input--select:focus,select.en__field__input--select:hover,select.en__field__input--splitselect:focus,select.en__field__input--splitselect:hover,select.en__field__input--tripleselect:focus,select.en__field__input--tripleselect:hover,select:focus,select:hover{background-color:var(--select_background-color_hover);background-image:url("data:image/svg+xml;utf8,");border-bottom-color:var(--select_border-color_hover);border-color:var(--select_border-color_hover) var(--select_border-color_hover) var(--select_border-bottom-color_hover);box-shadow:var(--select_box-shadow_hover);color:var(--select_color_hover)}.en__contactMessage__plainText,.en__field__input--textarea,textarea{background-color:var(--textarea_background-color);border:var(--textarea_border-width) solid var(--textarea_border-color);border-radius:var(--textarea_border-radius);box-shadow:var(--textarea_box-shadow);box-sizing:border-box;color:var(--textarea_color);display:block;font-family:var(--textarea_font-family);font-size:var(--textarea_font-size);font-weight:var(--textarea_font-weight);height:auto;line-height:var(--textarea_line-height);margin:0;max-width:100%;min-height:var(--textarea_min-height);min-width:auto;padding:var(--textarea_padding);resize:vertical;transition:box-shadow .25s,border-color .25s ease-in-out;width:100%}.en__contactMessage__plainText:focus,.en__contactMessage__plainText:hover,.en__field__input--textarea:focus,.en__field__input--textarea:hover,textarea:focus,textarea:hover{background-color:var(--textarea_background-color_hover);border-bottom-color:var(--textarea_border-color_hover);border-color:var(--textarea_border-color_hover) var(--textarea_border-color_hover) var(--textarea_border-bottom-color_hover);box-shadow:var(--textarea_box-shadow_hover);color:var(--textarea_color_hover)}.en__field__element--splitselect .en__field__item,.en__field__element--splittext .en__field__item{flex-basis:50%}.en__field__element--tripleselect .en__field__item,.en__field__element--tripletext .en__field__item{flex-basis:33.3333333333%}.en__imageSelectField__image{padding-bottom:var(--fields_spacing-block)}.en__field__element--imgselect{display:flex;flex-wrap:wrap}.en__field--imgselect .en__field__item{flex-basis:33.3333333333%}.en__imageSelectField__control{align-items:center;display:flex;flex-direction:column}.en__imageSelectField__control .en__field__input--imageSelectField{width:auto}.en__field--imgselect .en__imageSelectField{display:flex;flex-direction:column}.en__contactDetails__rows{align-items:flex-start;flex-basis:100%;flex-direction:column;margin-left:calc(var(--checkbox_width) + var(--fields_spacing-inline));width:100%}.en__contacts:not(.en__contacts--hideCheck) .en__contactDetails__rows:before{background-color:var(--color_white);border:1px solid var(--color_black);box-shadow:inset 0 0 0 5px var(--color_white);content:"";cursor:pointer;display:inline-block;height:var(--checkbox_height);left:0;min-width:var(--checkbox_width);position:absolute;top:5px;transition-duration:.25s;transition-property:border-color,background-color;vertical-align:middle;width:var(--checkbox_width)}.en__contactDetails__rows:before{background-color:var(--checkbox_background-color);border-radius:var(--checkbox_border-radius);border-width:var(--checkbox_border-width);box-shadow:none;color:var(--checkbox_color)}.en__contacts:not(.en__contacts--hideCheck) .en__contactDetails__select:checked+.en__contactDetails__rows:before{background-color:var(--checkbox_background-color_checked);border-color:var(--checkbox_border-color_checked);border-width:var(--checkbox_border-width);box-shadow:inset 0 0 0 0 var(--checkbox_background-color);color:var(--checkbox_color_checked)}.en__contacts:not(.en__contacts--hideCheck) .en__contactDetails__select:checked+.en__contactDetails__rows:after{color:var(--checkbox_color_checked);content:var(--checkbox_content_checked);cursor:pointer;font-family:var(--checkbox_font-family);font-size:var(--checkbox_font-size);font-weight:var(--checkbox_font-weight);left:3px;line-height:var(--checkbox_line-height);position:absolute;top:5px}.en__field__notice{order:3}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}::-webkit-input-placeholder{color:var(--input_placeholder-color);font-weight:var(--input_placeholder-font-weight);opacity:var(--input_placeholder-opacity)}::placeholder{color:var(--input_placeholder-color);font-weight:var(--input_placeholder-font-weight);opacity:var(--input_placeholder-opacity)}:-ms-input-placeholder{color:var(--input_placeholder-color);font-weight:var(--input_placeholder-font-weight);opacity:var(--input_placeholder-opacity)}::-ms-input-placeholder{color:var(--input_placeholder-color);font-weight:var(--input_placeholder-font-weight);opacity:var(--input_placeholder-opacity)}[data-engrid-theme] select[data-selected-value=""]{color:var(--select_placeholder-color);font-weight:var(--select_placeholder-font-weight);opacity:var(--select_placeholder-opacity)}.en__hidden{display:none!important}.en__field--hidden{display:block;width:100%!important}input[disabled],input[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed}.en__captcha{display:flex;flex-direction:column;margin-bottom:1rem;padding-bottom:0;position:relative}body[data-engrid-live-currency=active] .en__field--donationAmt .en__field__item:not([data-engrid-currency-symbol-updated=true]) label{color:#0000!important}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{-apple-pay-button-type:donate;-webkit-appearance:-apple-pay-button;display:inline-block}.apple-pay-button,.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.en__field__input.en__field__input--radio[value=applepay]+label{border-width:0!important}.en__field__input.en__field__input--radio[value=applepay]:checked+label{background-color:initial!important}.en__field__input.en__field__input--radio[value=applepay]:checked+label .apple-pay-button{-apple-pay-button-style:inherit!important}}@supports not (-webkit-appearance:-apple-pay-button){.apple-pay-button,.apple-pay-container,.en__field__input.en__field__input--radio[value=applepay]+label{display:none}}input:-webkit-autofill,select:-webkit-autofill,textarea:-webkit-autofill{animation-name:onAutoFillStart;-webkit-transition:background-color 50000s ease-in-out 0s;transition:background-color 50000s ease-in-out 0s}input:not(:-webkit-autofill){animation-name:onAutoFillCancel}.is-autofilled,.is-autofilled label{transition:none!important}input:-webkit-autofill:first-line{font-size:var(--input_font-size)}textarea:-webkit-autofill:first-line{font-size:var(--textarea_font-size)}select:-webkit-autofill:first-line{font-size:var(--select_font-size)}[data-engrid-theme]{--engrid__page-backgroundImage_url:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}body:not(#en__pagebuilder) .page-backgroundImage img{display:none}body[data-engrid-page-background=image] .page-backgroundImage{overflow:hidden;position:relative}body[data-engrid-page-background=image] .page-backgroundImage:before{background-image:var(--engrid__page-backgroundImage_url);background-repeat:no-repeat;background-size:cover;content:" ";height:100%;left:0;position:fixed;top:0;width:100%;will-change:transform}body[data-engrid-page-background=image] .page-backgroundImage figure.media-with-attribution{background-image:var(--engrid__page-backgroundImage_url);background-position:100% 0;background-size:cover;height:100vh;left:0;position:fixed;top:0;width:100vw}body[data-engrid-page-background=image][data-engrid-layout=centerleft1col] .page-backgroundImage:before,body[data-engrid-page-background=image][data-engrid-layout=leftleft1col] .page-backgroundImage:before{background-position:100% 0}body[data-engrid-page-background=image][data-engrid-layout=centercenter1col] .page-backgroundImage:before,body[data-engrid-page-background=image][data-engrid-layout=centercenter2col] .page-backgroundImage:before{background-position:top}body[data-engrid-page-background=image][data-engrid-layout=centerright1col] .page-backgroundImage:before,body[data-engrid-page-background=image][data-engrid-layout=rightright1col] .page-backgroundImage:before{background-position:0 0}body .page-backgroundImage video{min-height:100vh;min-width:100vw;object-fit:cover;position:fixed}body .page-backgroundImage video:not(.crop-on-right):not(.crop-on-left){left:50%;top:50%;transform:translate(-50%,-50%)}body .page-backgroundImage video.crop-on-left{right:0;top:50%;transform:translateY(-50%)}body .page-backgroundImage video.crop-on-right{left:0;top:50%;transform:translateY(-50%)}.body-banner>.en__component--copyblock>p:only-child{margin:0}.body-banner img{min-width:100%}.body-banner img[data-src]{background-color:var(--engrid__body-banner_background-color)}.body-banner img[height]{height:auto!important}body{background-color:var(--engrid__page_background-color);min-height:100vh;min-width:min(100vw,100%)}[data-engrid-theme]{--button_font-family:var(--default_font-family);--button_font-size:var(--default_font-size);--button_font-weight:initial;--button_line-height:normal;--button_border-width:1px;--button_border-radius:6px;--button_padding:1ch 1.2ch;--button_text-transform:none;--submit__button_padding-top:1ch;--submit__button_padding-bottom:1ch;--submit__button_font-size:var(--button_font-size);--submit__button_text-transform:var(--button_text-transform)}.button,.en__button,.pseduo__en__submit_button,button,button.en__eventOccurrence__select,button.en__ticketRecurring__select,button.en__ticketSummary__checkout{-webkit-appearance:none;appearance:none;background-color:var(--button_background-color);border:var(--button_border-width) solid var(--button_border-color);border-radius:var(--button_border-radius);color:var(--button_color);cursor:pointer;display:block;font-family:var(--button_font-family);font-size:var(--button_font-size);font-weight:var(--button_font-weight);line-height:var(--button_line-height);margin:0 0 1rem;padding:var(--button_padding);text-align:center;text-transform:var(--button_text-transform);transition:background-color .2s ease-out,color .2s ease-out,border-color .2s ease-out}.button:focus,.button:hover,.en__button:focus,.en__button:hover,.pseduo__en__submit_button:focus,.pseduo__en__submit_button:hover,button.en__eventOccurrence__select:focus,button.en__eventOccurrence__select:hover,button.en__ticketRecurring__select:focus,button.en__ticketRecurring__select:hover,button.en__ticketSummary__checkout:focus,button.en__ticketSummary__checkout:hover,button:focus,button:hover{background-color:var(--button_background-color_hover);border-color:var(--button_border-color_hover);color:var(--button_color_hover)}.button.active,.button:active,.en__button.active,.en__button:active,.pseduo__en__submit_button.active,.pseduo__en__submit_button:active,button.active,button.en__eventOccurrence__select.active,button.en__eventOccurrence__select:active,button.en__ticketRecurring__select.active,button.en__ticketRecurring__select:active,button.en__ticketSummary__checkout.active,button.en__ticketSummary__checkout:active,button:active{background-color:var(--button_background-color_checked);border-color:var(--button_border-color_checked);color:var(--button_color_checked)}a.button,a.button.active,a.button:active,a.button:focus,a.button:hover{-webkit-text-decoration:none;text-decoration:none}.en__submit{width:100%}.en__submit .button,.en__submit button,.pseduo__en__submit_button,button.primary{background-color:var(--submit__button_background-color);border-color:var(--submit__button_border-color);color:var(--submit__button_color);font-size:var(--submit__button_font-size);margin-top:2rem;max-width:var(--submit__button_max-width);padding-bottom:var(--submit__button_padding-bottom);padding-top:var(--submit__button_padding-top);text-transform:var(--submit__button_text-transform);width:100%}.en__submit .button:focus,.en__submit .button:hover,.en__submit button:focus,.en__submit button:hover,.pseduo__en__submit_button:focus,.pseduo__en__submit_button:hover,button.primary:focus,button.primary:hover{background-color:var(--submit__button_background-color_hover);border-color:var(--submit__button_border-color_hover);color:var(--submit__button_color_hover)}.en__submit .button:active,.en__submit button:active,.pseduo__en__submit_button:active,button.primary:active{background-color:var(--submit__button_background-color_checked);border-color:var(--submit__button_border-color_checked);color:var(--submit__button_color_checked)}.arrow .en__submit .button:after,.arrow .en__submit button:after{content:"β†’";float:right;margin-right:1rem;opacity:.9}.arrow .en__submit .button:disabled:after,.arrow .en__submit button:disabled:after{display:none}.next-step .en__submit .button,.next-step .en__submit button{margin-left:auto;width:auto}.button[disabled]:focus,.button[disabled]:hover,button[disabled],button[disabled]:focus .button[disabled],button[disabled]:hover{content:"Processing..."}.button[disabled],button[disabled]{cursor:not-allowed;filter:grayscale(1);opacity:.5}[data-engrid-theme] .en__component--callcontactblock{margin-left:auto;margin-right:auto;width:100%}[data-engrid-theme] .en__component--callcontactblock .en__contact__detail{flex-wrap:wrap}[data-engrid-theme] .en__component--callcontactblock .en__contact__detail .en__overlay{position:static}[data-engrid-theme] .en__component--callcontactblock .en__contacts{background-color:initial;padding:0}[data-engrid-theme] .en__component--callcontactblock .en__contact__main{display:flex;flex-wrap:wrap;justify-content:space-between}[data-engrid-theme] .en__component--callcontactblock .en__overlay--callcontact{width:100%}[data-engrid-theme] .en__component--callsurveyblock .en__c2c__survey__rate{gap:1rem;max-width:100%}[data-engrid-theme] .en__component--callsurveyblock .en__field__element--textarea{width:100%}[data-engrid-theme] .en__component--callsurveyblock .en__c2c__survey__rate .en__button{margin-bottom:0;opacity:1}@media screen and (max-width:768px){[data-engrid-theme] .en__component--callsurveyblock .en__c2c__survey__rate{flex-direction:column}[data-engrid-theme] .en__component--callsurveyblock .en__button{width:100%}}[data-engrid-theme]{--click-to-expand__copy-area_height:450px;--click-to-expand__cta-image_url:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAALVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBoCg+AAAAD3RSTlMA8fqeDQWopG9ku5d/fFeqbhOLAAAASElEQVQI12PAA9ZBqFcMSRNANKcaA7skiDGxgIHVsJWBIUI4gIHBWYKBodEEKMpieIFX2AEk765zqASskzVJLQBiBvcGBuIAAGXcCweYv+y6AAAAAElFTkSuQmCC);--click-to-expand__cta-image_width:16px;--click-to-expand__cta-image_height:16px}body:not(#en__pagebuilder) .click-to-expand .click-to-expand-text-wrapper>:first-child{margin-top:0}body:not(#en__pagebuilder) .click-to-expand:not(.expanded){cursor:pointer;max-height:var(--click-to-expand__copy-area_height);overflow:hidden}body:not(#en__pagebuilder) .click-to-expand:not(.expanded) .click-to-expand-text-wrapper{-webkit-mask-image:linear-gradient(to bottom,#000 50%,#fff0 calc(100% - var(--click-to-expand__cta-image_height)));mask-image:linear-gradient(to bottom,#000 50%,#fff0 calc(100% - var(--click-to-expand__cta-image_height)));max-height:calc(var(--click-to-expand__copy-area_height) - var(--click-to-expand__cta-image_height) - 35px)}body:not(#en__pagebuilder) .click-to-expand:not(.expanded) .click-to-expand-cta{background:var(--click-to-expand__cta-image_url);background-position:bottom;background-repeat:no-repeat;background-size:var(--click-to-expand__cta-image_width) var(--click-to-expand__cta-image_height);bottom:0;height:var(--click-to-expand__cta-image_height);left:0;margin-left:auto;margin-right:auto;position:absolute;right:0;width:var(--click-to-expand__cta-image_width)}body:not(#en__pagebuilder) .click-to-expand.expanded .click-to-expand-text-wrapper{outline:none}[data-engrid-theme]{--color_transparent:#0000;--color_white:#fff;--color_off-white:#d4d4d4;--color_light-gray:#ababab;--color_gray:grey;--color_dark-gray:#545454;--color_off-black:#2b2b2b;--color_black:#000;--color_primary:#22a3cb;--color_primary_overlay:#fff;--color_primary_accent:#000;--color_secondary:#000;--color_secondary_overlay:#fff;--color_secondary_accent:#000;--color_tertiary:#fff;--color_tertiary_overlay:#000;--color_tertiary_accent:#fff;--default_color:initial;--h1_color:var(--default_color);--h2_color:var(--h1_color);--h3_color:var(--h1_color);--h4_color:var(--h1_color);--h5_color:var(--h1_color);--h6_color:var(--h1_color);--a_color:initial;--a_color_hover:var(--a_color);--highlight__background-color:var(--color_primary);--highlight__color:var(--color_primary_overlay);--media-attribution__color:#ffffffe6;--media-attribution__background-color:#0000004d;--error__color:#ff530a;--error__color_grayscale:#949494;--error__color_faded:#fff8f4;--error__background-color:#fff8f4;--label_color:initial;--input_color:#000;--input_background-color:#fafafa;--input_border-color:#dfdfe1;--input_placeholder-color:#ababab;--input_color_hover:var(--input_color);--input_background-color_hover:var(--input_background-color);--input_border-color_hover:#767677;--input_border-bottom-color_hover:var(--input_border-color_hover);--radio_color:var(--input_color);--radio_background-color:var(--input_background-color);--radio_border-color:var(--input_border-color);--radio_color_hover:var(--radio_color);--radio_background-color_hover:var(--radio_background-color);--radio_border-color_hover:var(--input_border-color_hover);--radio_color_selected:var(--radio_color_hover);--radio_background-color_selected:var(--radio_background-color_hover);--radio_border-color_selected:var(--input_border-color_hover);--checkbox_color:var(--color_black);--checkbox_background-color:var(--radio_background-color);--checkbox_border-color:var(--radio_border-color);--checkbox_color_hover:var(--checkbox_color);--checkbox_background-color_hover:var(--radio_background-color_hover);--checkbox_border-color_hover:var(--radio_border-color_hover);--checkbox_color_checked:var(--checkbox_color_hover);--checkbox_background-color_checked:var(--radio_background-color_hover);--checkbox_border-color_checked:var(--color_black);--select_color:var(--input_color);--select_background-color:var(--input_background-color);--select_border-color:var(--input_border-color);--select_background-color_hover:var(--select_background-color);--select_border-color_hover:var(--input_border-color_hover);--select_border-bottom-color_hover:var(--select_border-color_hover);--select_placeholder-color:var(--input_placeholder-color);--textarea_color:var(--input_color);--textarea_background-color:var(--input_background-color);--textarea_border-color:var(--input_border-color);--textarea_placeholder-color:var(--color_light-gray);--textarea_color_hover:var(--textarea_color);--textarea_background-color_hover:var(--textarea_background-color);--textarea_border-color_hover:var(--input_border-color_hover);--textarea_border-bottom-color_hover:var(--textarea_border-color_hover);--button_color:var(--color_primary_overlay);--button_background-color:var(--color_primary);--button_border-color:var(--button_background-color);--button_color_hover:var(--button_color);--button_background-color_hover:var(--color_black);--button_border-color_hover:var(--button_background-color_hover);--button_color_checked:var(--button_color_hover);--button_background-color_checked:var(--button_background-color_hover);--button_border-color_checked:var(--button_border-color_hover);--submit__button_color:var(--button_color);--submit__button_border-color:var(--button_border-color);--submit__button_background-color:var(--button_background-color);--submit__button_color_hover:var(--button_color);--submit__button_background-color_hover:var(--button_background-color_hover);--submit__button_border-color_hover:var(--button_background-color_hover);--submit__button_color_checked:var(--button_color_hover);--submit__button_background-color_checked:var( --button_background-color_hover );--submit__button_border-color_checked:var(--button_border-color_hover);--recurring-frequency__button_color:var(--button_color);--recurring-frequency__button_background-color:var( --button_background-color diff --git a/dist/engrid.min.js b/dist/engrid.min.js index e577293..58ab8c2 100644 --- a/dist/engrid.min.js +++ b/dist/engrid.min.js @@ -17,10 +17,10 @@ * * ENGRID PAGE TEMPLATE ASSETS * - * Date: Friday, March 1, 2024 @ 18:35:58 ET + * Date: Tuesday, March 5, 2024 @ 11:22:09 ET * By: michael - * ENGrid styles: v0.17.16 - * ENGrid scripts: v0.17.18 + * ENGrid styles: v0.17.19 + * ENGrid scripts: v0.17.20 * * Created by 4Site Studios * Come work with us or join our team, we would love to hear from you @@ -107,4 +107,4 @@ t.nz=t.FK=void 0;var i=n(4844);var s=n(3111);var r=n(5931);Object.defineProperty * * Copyright Kees C. Bakker / KeesTalksTech * Released under the MIT license - */Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionChangeEventDispatcher=t.HandlingBase=t.PromiseDispatcherBase=t.PromiseSubscription=t.DispatchError=t.EventManagement=t.EventListBase=t.DispatcherWrapper=t.DispatcherBase=t.Subscription=void 0;const i=n(3040);Object.defineProperty(t,"DispatcherBase",{enumerable:!0,get:function(){return i.DispatcherBase}});const s=n(8181);Object.defineProperty(t,"DispatchError",{enumerable:!0,get:function(){return s.DispatchError}});const r=n(3122);Object.defineProperty(t,"DispatcherWrapper",{enumerable:!0,get:function(){return r.DispatcherWrapper}});const o=n(7955);Object.defineProperty(t,"EventListBase",{enumerable:!0,get:function(){return o.EventListBase}});const a=n(2234);Object.defineProperty(t,"EventManagement",{enumerable:!0,get:function(){return a.EventManagement}});const l=n(1605);Object.defineProperty(t,"HandlingBase",{enumerable:!0,get:function(){return l.HandlingBase}});const c=n(2490);Object.defineProperty(t,"PromiseDispatcherBase",{enumerable:!0,get:function(){return c.PromiseDispatcherBase}});const u=n(9347);Object.defineProperty(t,"PromiseSubscription",{enumerable:!0,get:function(){return u.PromiseSubscription}});const d=n(2229);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return d.Subscription}});const h=n(1002);Object.defineProperty(t,"SubscriptionChangeEventDispatcher",{enumerable:!0,get:function(){return h.SubscriptionChangeEventDispatcher}})},2234:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventManagement=void 0;t.EventManagement=class{constructor(e){this.unsub=e,this.propagationStopped=!1}stopPropagation(){this.propagationStopped=!0}}},3861:(e,t,n)=>{"use strict";function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function s(e){return e instanceof i(e).Element||e instanceof Element}function r(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}n.d(t,{ZP:()=>ot});var a=Math.max,l=Math.min,c=Math.round;function u(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),i=1,s=1;if(r(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(i=c(n.width)/a||1),o>0&&(s=c(n.height)/o||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function d(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function h(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((s(e)?e.ownerDocument:e.document)||window.document).documentElement}function g(e){return u(p(e)).left+d(e).scrollLeft}function m(e){return i(e).getComputedStyle(e)}function f(e){var t=m(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function b(e,t,n){void 0===n&&(n=!1);var s,o,a=r(t),l=r(t)&&function(e){var t=e.getBoundingClientRect(),n=c(t.width)/e.offsetWidth||1,i=c(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),m=p(t),b=u(e,l),v={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(a||!a&&!n)&&(("body"!==h(t)||f(m))&&(v=(s=t)!==i(s)&&r(s)?{scrollLeft:(o=s).scrollLeft,scrollTop:o.scrollTop}:d(s)),r(t)?((y=u(t,!0)).x+=t.clientLeft,y.y+=t.clientTop):m&&(y.x=g(m))),{x:b.left+v.scrollLeft-y.x,y:b.top+v.scrollTop-y.y,width:b.width,height:b.height}}function v(e){var t=u(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function y(e){return"html"===h(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||p(e)}function _(e){return["html","body","#document"].indexOf(h(e))>=0?e.ownerDocument.body:r(e)&&f(e)?e:_(y(e))}function S(e,t){var n;void 0===t&&(t=[]);var s=_(e),r=s===(null==(n=e.ownerDocument)?void 0:n.body),o=i(s),a=r?[o].concat(o.visualViewport||[],f(s)?s:[]):s,l=t.concat(a);return r?l:l.concat(S(y(a)))}function w(e){return["table","td","th"].indexOf(h(e))>=0}function E(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function C(e){for(var t=i(e),n=E(e);n&&w(n)&&"static"===m(n).position;)n=E(n);return n&&("html"===h(n)||"body"===h(n)&&"static"===m(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&r(e)&&"fixed"===m(e).position)return null;for(var n=y(e);r(n)&&["html","body"].indexOf(h(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}var A="top",L="bottom",x="right",D="left",k="auto",F=[A,L,x,D],N="start",T="end",P="viewport",O="popper",M=F.reduce((function(e,t){return e.concat([t+"-"+N,t+"-"+T])}),[]),q=[].concat(F,[k]).reduce((function(e,t){return e.concat([t,t+"-"+N,t+"-"+T])}),[]),I=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function B(e){var t=new Map,n=new Set,i=[];function s(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&s(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||s(e)})),i}var R={placement:"bottom",modifiers:[],strategy:"absolute"};function j(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function G(e){var t,n=e.reference,i=e.element,s=e.placement,r=s?U(s):null,o=s?$(s):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(r){case A:t={x:a,y:n.y-i.height};break;case L:t={x:a,y:n.y+n.height};break;case x:t={x:n.x+n.width,y:l};break;case D:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=r?W(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case N:t[c]=t[c]-(n[u]/2-i[u]/2);break;case T:t[c]=t[c]+(n[u]/2-i[u]/2)}}return t}var z={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Y(e){var t,n=e.popper,s=e.popperRect,r=e.placement,o=e.variation,a=e.offsets,l=e.position,u=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,g=e.isFixed,f=a.x,b=void 0===f?0:f,v=a.y,y=void 0===v?0:v,_="function"==typeof h?h({x:b,y}):{x:b,y};b=_.x,y=_.y;var S=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),E=D,k=A,F=window;if(d){var N=C(n),P="clientHeight",O="clientWidth";if(N===i(n)&&"static"!==m(N=p(n)).position&&"absolute"===l&&(P="scrollHeight",O="scrollWidth"),N=N,r===A||(r===D||r===x)&&o===T)k=L,y-=(g&&F.visualViewport?F.visualViewport.height:N[P])-s.height,y*=u?1:-1;if(r===D||(r===A||r===L)&&o===T)E=x,b-=(g&&F.visualViewport?F.visualViewport.width:N[O])-s.width,b*=u?1:-1}var M,q=Object.assign({position:l},d&&z),I=!0===h?function(e){var t=e.x,n=e.y,i=window.devicePixelRatio||1;return{x:c(t*i)/i||0,y:c(n*i)/i||0}}({x:b,y}):{x:b,y};return b=I.x,y=I.y,u?Object.assign({},q,((M={})[k]=w?"0":"",M[E]=S?"0":"",M.transform=(F.devicePixelRatio||1)<=1?"translate("+b+"px, "+y+"px)":"translate3d("+b+"px, "+y+"px, 0)",M)):Object.assign({},q,((t={})[k]=w?y+"px":"",t[E]=S?b+"px":"",t.transform="",t))}const J={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},s=t.elements[e];r(s)&&h(s)&&(Object.assign(s.style,n),Object.keys(i).forEach((function(e){var t=i[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],s=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(i)&&h(i)&&(Object.assign(i.style,o),Object.keys(s).forEach((function(e){i.removeAttribute(e)})))}))}},requires:["computeStyles"]};const K={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,s=n.offset,r=void 0===s?[0,0]:s,o=q.reduce((function(e,n){return e[n]=function(e,t,n){var i=U(e),s=[D,A].indexOf(i)>=0?-1:1,r="function"==typeof n?n(Object.assign({},t,{placement:e})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[D,x].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}(n,t.rects,r),e}),{}),a=o[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=o}};var X={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(e){return e.replace(/left|right|bottom|top/g,(function(e){return X[e]}))}var Z={start:"end",end:"start"};function ee(e){return e.replace(/start|end/g,(function(e){return Z[e]}))}function te(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ne(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ie(e,t){return t===P?ne(function(e){var t=i(e),n=p(e),s=t.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,l=0;return s&&(r=s.width,o=s.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=s.offsetLeft,l=s.offsetTop)),{width:r,height:o,x:a+g(e),y:l}}(e)):s(t)?function(e){var t=u(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):ne(function(e){var t,n=p(e),i=d(e),s=null==(t=e.ownerDocument)?void 0:t.body,r=a(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=a(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-i.scrollLeft+g(e),c=-i.scrollTop;return"rtl"===m(s||n).direction&&(l+=a(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:l,y:c}}(p(e)))}function se(e,t,n){var i="clippingParents"===t?function(e){var t=S(y(e)),n=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?C(e):e;return s(n)?t.filter((function(e){return s(e)&&te(e,n)&&"body"!==h(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),c=o[0],u=o.reduce((function(t,n){var i=ie(e,n);return t.top=a(i.top,t.top),t.right=l(i.right,t.right),t.bottom=l(i.bottom,t.bottom),t.left=a(i.left,t.left),t}),ie(e,c));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function re(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function oe(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ae(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=void 0===i?e.placement:i,o=n.boundary,a=void 0===o?"clippingParents":o,l=n.rootBoundary,c=void 0===l?P:l,d=n.elementContext,h=void 0===d?O:d,g=n.altBoundary,m=void 0!==g&&g,f=n.padding,b=void 0===f?0:f,v=re("number"!=typeof b?b:oe(b,F)),y=h===O?"reference":O,_=e.rects.popper,S=e.elements[m?y:h],w=se(s(S)?S:S.contextElement||p(e.elements.popper),a,c),E=u(e.elements.reference),C=G({reference:E,element:_,strategy:"absolute",placement:r}),D=ne(Object.assign({},_,C)),k=h===O?D:E,N={top:w.top-k.top+v.top,bottom:k.bottom-w.bottom+v.bottom,left:w.left-k.left+v.left,right:k.right-w.right+v.right},T=e.modifiersData.offset;if(h===O&&T){var M=T[r];Object.keys(N).forEach((function(e){var t=[x,L].indexOf(e)>=0?1:-1,n=[A,L].indexOf(e)>=0?"y":"x";N[e]+=M[n]*t}))}return N}function le(e,t,n){return a(e,l(t,n))}const ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,r=void 0===s||s,o=n.altAxis,c=void 0!==o&&o,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.padding,g=n.tether,m=void 0===g||g,f=n.tetherOffset,b=void 0===f?0:f,y=ae(t,{boundary:u,rootBoundary:d,padding:p,altBoundary:h}),_=U(t.placement),S=$(t.placement),w=!S,E=W(_),k="x"===E?"y":"x",F=t.modifiersData.popperOffsets,T=t.rects.reference,P=t.rects.popper,O="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,M="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(F){if(r){var B,R="y"===E?A:D,j="y"===E?L:x,V="y"===E?"height":"width",H=F[E],G=H+y[R],z=H-y[j],Y=m?-P[V]/2:0,J=S===N?T[V]:P[V],K=S===N?-P[V]:-T[V],X=t.elements.arrow,Q=m&&X?v(X):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=Z[R],te=Z[j],ne=le(0,T[V],Q[V]),ie=w?T[V]/2-Y-ne-ee-M.mainAxis:J-ne-ee-M.mainAxis,se=w?-T[V]/2+Y+ne+te+M.mainAxis:K+ne+te+M.mainAxis,re=t.elements.arrow&&C(t.elements.arrow),oe=re?"y"===E?re.clientTop||0:re.clientLeft||0:0,ce=null!=(B=null==q?void 0:q[E])?B:0,ue=H+se-ce,de=le(m?l(G,H+ie-ce-oe):G,H,m?a(z,ue):z);F[E]=de,I[E]=de-H}if(c){var he,pe="x"===E?A:D,ge="x"===E?L:x,me=F[k],fe="y"===k?"height":"width",be=me+y[pe],ve=me-y[ge],ye=-1!==[A,D].indexOf(_),_e=null!=(he=null==q?void 0:q[k])?he:0,Se=ye?be:me-T[fe]-P[fe]-_e+M.altAxis,we=ye?me+T[fe]+P[fe]-_e-M.altAxis:ve,Ee=m&&ye?function(e,t,n){var i=le(e,t,n);return i>n?n:i}(Se,me,we):le(m?Se:be,me,m?we:ve);F[k]=Ee,I[k]=Ee-me}t.modifiersData[i]=I}},requiresIfExists:["offset"]};const ue={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,s=e.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=U(n.placement),l=W(a),c=[D,x].indexOf(a)>=0?"height":"width";if(r&&o){var u=function(e,t){return re("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:oe(e,F))}(s.padding,n),d=v(r),h="y"===l?A:D,p="y"===l?L:x,g=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],m=o[l]-n.rects.reference[l],f=C(r),b=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,y=g/2-m/2,_=u[h],S=b-d[c]-u[p],w=b/2-d[c]/2+y,E=le(_,w,S),k=l;n.modifiersData[i]=((t={})[k]=E,t.centerOffset=E-w,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&te(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function de(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function he(e){return[A,x,L,D].some((function(t){return e[t]>=0}))}var pe=V({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,s=e.options,r=s.scroll,o=void 0===r||r,a=s.resize,l=void 0===a||a,c=i(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,H)})),l&&c.addEventListener("resize",n.update,H),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,H)})),l&&c.removeEventListener("resize",n.update,H)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=G({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=void 0===i||i,r=n.adaptive,o=void 0===r||r,a=n.roundOffsets,l=void 0===a||a,c={placement:U(t.placement),variation:$(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Y(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Y(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},J,K,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,r=void 0===s||s,o=n.altAxis,a=void 0===o||o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,g=void 0===p||p,m=n.allowedAutoPlacements,f=t.options.placement,b=U(f),v=l||(b===f||!g?[Q(f)]:function(e){if(U(e)===k)return[];var t=Q(e);return[ee(e),t,ee(t)]}(f)),y=[f].concat(v).reduce((function(e,n){return e.concat(U(n)===k?function(e,t){void 0===t&&(t={});var n=t,i=n.placement,s=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?q:l,u=$(i),d=u?a?M:M.filter((function(e){return $(e)===u})):F,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=ae(e,{placement:n,boundary:s,rootBoundary:r,padding:o})[U(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:m}):n)}),[]),_=t.rects.reference,S=t.rects.popper,w=new Map,E=!0,C=y[0],T=0;T=0,R=B?"width":"height",j=ae(t,{placement:P,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),V=B?I?x:D:I?L:A;_[R]>S[R]&&(V=Q(V));var H=Q(V),W=[];if(r&&W.push(j[O]<=0),a&&W.push(j[V]<=0,j[H]<=0),W.every((function(e){return e}))){C=P,E=!1;break}w.set(P,W)}if(E)for(var G=function(e){var t=y.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},z=g?3:1;z>0;z--){if("break"===G(z))break}t.placement!==C&&(t.modifiersData[i]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ce,ue,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,o=ae(t,{elementContext:"reference"}),a=ae(t,{altBoundary:!0}),l=de(o,i),c=de(a,s,r),u=he(l),d=he(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),ge="tippy-content",me="tippy-backdrop",fe="tippy-arrow",be="tippy-svg-arrow",ve={passive:!0,capture:!0},ye=function(){return document.body};function _e(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function Se(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function we(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Ee(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function Ce(e){return[].concat(e)}function Ae(e,t){-1===e.indexOf(t)&&e.push(t)}function Le(e){return e.split("-")[0]}function xe(e){return[].slice.call(e)}function De(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function ke(){return document.createElement("div")}function Fe(e){return["Element","Fragment"].some((function(t){return Se(e,t)}))}function Ne(e){return Se(e,"MouseEvent")}function Te(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function Pe(e){return Fe(e)?[e]:function(e){return Se(e,"NodeList")}(e)?xe(e):Array.isArray(e)?e:xe(document.querySelectorAll(e))}function Oe(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Me(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function qe(e){var t,n=Ce(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function Ie(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[i](t,n)}))}function Be(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var Re={isTouch:!1},je=0;function Ve(){Re.isTouch||(Re.isTouch=!0,window.performance&&document.addEventListener("mousemove",He))}function He(){var e=performance.now();e-je<20&&(Re.isTouch=!1,document.removeEventListener("mousemove",He)),je=e}function Ue(){var e=document.activeElement;if(Te(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var $e=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var We={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ge=Object.assign({appendTo:ye,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},We,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),ze=Object.keys(Ge);function Ye(e){var t=(e.plugins||[]).reduce((function(t,n){var i,s=n.name,r=n.defaultValue;s&&(t[s]=void 0!==e[s]?e[s]:null!=(i=Ge[s])?i:r);return t}),{});return Object.assign({},e,t)}function Je(e,t){var n=Object.assign({},t,{content:we(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ye(Object.assign({},Ge,{plugins:t}))):ze).reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Ge.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Ke(e,t){e.innerHTML=t}function Xe(e){var t=ke();return!0===e?t.className=fe:(t.className=be,Fe(e)?t.appendChild(e):Ke(t,e)),t}function Qe(e,t){Fe(t.content)?(Ke(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Ke(e,t.content):e.textContent=t.content)}function Ze(e){var t=e.firstElementChild,n=xe(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ge)})),arrow:n.find((function(e){return e.classList.contains(fe)||e.classList.contains(be)})),backdrop:n.find((function(e){return e.classList.contains(me)}))}}function et(e){var t=ke(),n=ke();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=ke();function s(n,i){var s=Ze(t),r=s.box,o=s.content,a=s.arrow;i.theme?r.setAttribute("data-theme",i.theme):r.removeAttribute("data-theme"),"string"==typeof i.animation?r.setAttribute("data-animation",i.animation):r.removeAttribute("data-animation"),i.inertia?r.setAttribute("data-inertia",""):r.removeAttribute("data-inertia"),r.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?r.setAttribute("role",i.role):r.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||Qe(o,e.props),i.arrow?a?n.arrow!==i.arrow&&(r.removeChild(a),r.appendChild(Xe(i.arrow))):r.appendChild(Xe(i.arrow)):a&&r.removeChild(a)}return i.className=ge,i.setAttribute("data-state","hidden"),Qe(i,e.props),t.appendChild(n),n.appendChild(i),s(e.props,e.props),{popper:t,onUpdate:s}}et.$$tippy=!0;var tt=1,nt=[],it=[];function st(e,t){var n,i,s,r,o,a,l,c,u=Je(e,Object.assign({},Ge,Ye(De(t)))),d=!1,h=!1,p=!1,g=!1,m=[],f=Ee(z,u.interactiveDebounce),b=tt++,v=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),y={id:b,reference:e,popper:ke(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(s)},setProps:function(t){0;if(y.state.isDestroyed)return;P("onBeforeUpdate",[y,t]),W();var n=y.props,i=Je(e,Object.assign({},n,De(t),{ignoreAttributes:!0}));y.props=i,$(),n.interactiveDebounce!==i.interactiveDebounce&&(q(),f=Ee(z,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?Ce(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):i.triggerTarget&&e.removeAttribute("aria-expanded");M(),T(),w&&w(n,i);y.popperInstance&&(X(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));P("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){0;var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=Re.isTouch&&!y.props.touch,s=_e(y.props.duration,0,Ge.duration);if(e||t||n||i)return;if(D().hasAttribute("disabled"))return;if(P("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,x()&&(S.style.visibility="visible");T(),j(),y.state.isMounted||(S.style.transition="none");if(x()){var r=F(),o=r.box,l=r.content;Oe([o,l],0)}a=function(){var e;if(y.state.isVisible&&!g){if(g=!0,S.offsetHeight,S.style.transition=y.props.moveTransition,x()&&y.props.animation){var t=F(),n=t.box,i=t.content;Oe([n,i],s),Me([n,i],"visible")}O(),M(),Ae(it,y),null==(e=y.popperInstance)||e.forceUpdate(),P("onMount",[y]),y.props.animation&&x()&&function(e,t){H(e,t)}(s,(function(){y.state.isShown=!0,P("onShown",[y])}))}},function(){var e,t=y.props.appendTo,n=D();e=y.props.interactive&&t===ye||"parent"===t?n.parentNode:we(t,[n]);e.contains(S)||e.appendChild(S);y.state.isMounted=!0,X(),!1}()},hide:function(){0;var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=_e(y.props.duration,1,Ge.duration);if(e||t||n)return;if(P("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,g=!1,d=!1,x()&&(S.style.visibility="hidden");if(q(),V(),T(!0),x()){var s=F(),r=s.box,o=s.content;y.props.animation&&(Oe([r,o],i),Me([r,o],"hidden"))}O(),M(),y.props.animation?x()&&function(e,t){H(e,(function(){!y.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&t()}))}(i,y.unmount):y.unmount()},hideWithInteractivity:function(e){0;k().addEventListener("mousemove",f),Ae(nt,f),f(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){0;y.state.isVisible&&y.hide();if(!y.state.isMounted)return;Q(),Z().forEach((function(e){e._tippy.unmount()})),S.parentNode&&S.parentNode.removeChild(S);it=it.filter((function(e){return e!==y})),y.state.isMounted=!1,P("onHidden",[y])},destroy:function(){0;if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),W(),delete e._tippy,y.state.isDestroyed=!0,P("onDestroy",[y])}};if(!u.render)return y;var _=u.render(y),S=_.popper,w=_.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+y.id,y.popper=S,e._tippy=y,S._tippy=y;var E=v.map((function(e){return e.fn(y)})),C=e.hasAttribute("aria-expanded");return $(),M(),T(),P("onCreate",[y]),u.showOnCreate&&ee(),S.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),S.addEventListener("mouseleave",(function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&k().addEventListener("mousemove",f)})),y;function A(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===A()[0]}function x(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function D(){return l||e}function k(){var e=D().parentNode;return e?qe(e):document}function F(){return Ze(S)}function N(e){return y.state.isMounted&&!y.state.isVisible||Re.isTouch||r&&"focus"===r.type?0:_e(y.props.delay,e?0:1,Ge.delay)}function T(e){void 0===e&&(e=!1),S.style.pointerEvents=y.props.interactive&&!e?"":"none",S.style.zIndex=""+y.props.zIndex}function P(e,t,n){var i;(void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(i=y.props)[e].apply(i,t)}function O(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,i=S.id;Ce(y.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var s=t&&t.replace(i,"").trim();s?e.setAttribute(n,s):e.removeAttribute(n)}}))}}function M(){!C&&y.props.aria.expanded&&Ce(y.props.triggerTarget||e).forEach((function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===D()?"true":"false"):e.removeAttribute("aria-expanded")}))}function q(){k().removeEventListener("mousemove",f),nt=nt.filter((function(e){return e!==f}))}function I(t){if(!Re.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!Be(S,n)){if(Ce(y.props.triggerTarget||e).some((function(e){return Be(e,n)}))){if(Re.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else P("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),h=!0,setTimeout((function(){h=!1})),y.state.isMounted||V())}}}function B(){p=!0}function R(){p=!1}function j(){var e=k();e.addEventListener("mousedown",I,!0),e.addEventListener("touchend",I,ve),e.addEventListener("touchstart",R,ve),e.addEventListener("touchmove",B,ve)}function V(){var e=k();e.removeEventListener("mousedown",I,!0),e.removeEventListener("touchend",I,ve),e.removeEventListener("touchstart",R,ve),e.removeEventListener("touchmove",B,ve)}function H(e,t){var n=F().box;function i(e){e.target===n&&(Ie(n,"remove",i),t())}if(0===e)return t();Ie(n,"remove",o),Ie(n,"add",i),o=i}function U(t,n,i){void 0===i&&(i=!1),Ce(y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,i),m.push({node:e,eventType:t,handler:n,options:i})}))}function $(){var e;L()&&(U("touchstart",G,{passive:!0}),U("touchend",Y,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(U(e,G),e){case"mouseenter":U("mouseleave",Y);break;case"focus":U($e?"focusout":"blur",J);break;case"focusin":U("focusout",J)}}))}function W(){m.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,s=e.options;t.removeEventListener(n,i,s)})),m=[]}function G(e){var t,n=!1;if(y.state.isEnabled&&!K(e)&&!h){var i="focus"===(null==(t=r)?void 0:t.type);r=e,l=e.currentTarget,M(),!y.state.isVisible&&Ne(e)&&nt.forEach((function(t){return t(e)})),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||d)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!i&&te(e)}}function z(e){var t=e.target,n=D().contains(t)||S.contains(t);if("mousemove"!==e.type||!n){var i=Z().concat(S).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,i=t.clientY;return e.every((function(e){var t=e.popperRect,s=e.popperState,r=e.props.interactiveBorder,o=Le(s.placement),a=s.modifiersData.offset;if(!a)return!0;var l="bottom"===o?a.top.y:0,c="top"===o?a.bottom.y:0,u="right"===o?a.left.x:0,d="left"===o?a.right.x:0,h=t.top-i+l>r,p=i-t.bottom-c>r,g=t.left-n+u>r,m=n-t.right-d>r;return h||p||g||m}))})(i,e)&&(q(),te(e))}}function Y(e){K(e)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function J(e){y.props.trigger.indexOf("focusin")<0&&e.target!==D()||y.props.interactive&&e.relatedTarget&&S.contains(e.relatedTarget)||te(e)}function K(e){return!!Re.isTouch&&L()!==e.type.indexOf("touch")>=0}function X(){Q();var t=y.props,n=t.popperOptions,i=t.placement,s=t.offset,r=t.getReferenceClientRect,o=t.moveTransition,l=x()?Ze(S).arrow:null,c=r?{getBoundingClientRect:r,contextElement:r.contextElement||D()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(x()){var n=F().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:s}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!o}},u];x()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),y.popperInstance=pe(c,S,Object.assign({},n,{placement:i,onFirstUpdate:a,modifiers:d}))}function Q(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Z(){return xe(S.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&P("onTrigger",[y,e]),j();var t=N(!0),i=A(),s=i[0],r=i[1];Re.isTouch&&"hold"===s&&r&&(t=r),t?n=setTimeout((function(){y.show()}),t):y.show()}function te(e){if(y.clearDelayTimeouts(),P("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=N(!1);t?i=setTimeout((function(){y.state.isVisible&&y.hide()}),t):s=requestAnimationFrame((function(){y.hide()}))}}else V()}}function rt(e,t){void 0===t&&(t={});var n=Ge.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Ve,ve),window.addEventListener("blur",Ue);var i=Object.assign({},t,{plugins:n}),s=Pe(e).reduce((function(e,t){var n=t&&st(t,i);return n&&e.push(n),e}),[]);return Fe(e)?s[0]:s}rt.defaultProps=Ge,rt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Ge[t]=e[t]}))},rt.currentInput=Re;Object.assign({},J,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});rt.setDefaultProps({render:et});const ot=rt},5042:()=>{}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.amdD=function(){throw new Error("define cannot be used indirect")},n.amdO={},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e={backgroundImage:"",MediaAttribution:!0,applePay:!1,CapitalizeFields:!1,ClickToExpand:!0,CurrencySymbol:"$",CurrencyCode:"USD",AddCurrencySymbol:!0,ThousandsSeparator:"",DecimalSeparator:".",DecimalPlaces:2,MinAmount:1,MaxAmount:1e5,MinAmountMessage:"Amount must be at least $1",MaxAmountMessage:"Amount must be less than $100,000",SkipToMainContentLink:!0,SrcDefer:!0,NeverBounceAPI:null,NeverBounceDateField:null,NeverBounceStatusField:null,NeverBounceDateFormat:"MM/DD/YYYY",FreshAddress:!1,ProgressBar:!1,AutoYear:!1,TranslateFields:!0,Debug:!1,RememberMe:!1,TidyContact:!1,RegionLongFormat:"",CountryDisable:[],Plaid:!1,Placeholders:!1,ENValidators:!1,MobileCTA:!1,CustomCurrency:!1,VGS:!1,PostalCodeValidator:!1,CountryRedirect:!1,WelcomeBack:!1,PageLayouts:["leftleft1col","centerleft1col","centercenter1col","centercenter2col","centerright1col","rightright1col","none"]},t={image:"https://picsum.photos/480/650",imagePosition:"left",title:"Will you change your gift to just {new-amount} a month to boost your impact?",paragraph:"Make a monthly pledge today to support us with consistent, reliable resources during emergency moments.",yesLabel:"Yes! Process My
{new-amount} monthly gift",noLabel:"No, thanks. Continue with my
{old-amount} one-time gift",otherAmount:!0,otherLabel:"Or enter a different monthly amount:",upsellOriginalGiftAmountFieldName:"",amountRange:[{max:10,suggestion:5},{max:15,suggestion:7},{max:20,suggestion:8},{max:25,suggestion:9},{max:30,suggestion:10},{max:35,suggestion:11},{max:40,suggestion:12},{max:50,suggestion:14},{max:100,suggestion:15},{max:200,suggestion:19},{max:300,suggestion:29},{max:500,suggestion:"Math.ceil((amount / 12)/5)*5"}],minAmount:0,canClose:!0,submitOnClose:!1,oneTime:!0,annual:!1,disablePaymentMethods:[],skipUpsell:!1},i=[{field:"supporter.firstName",translation:"Nome"},{field:"supporter.lastName",translation:"Sobrenome"},{field:"supporter.phoneNumber",translation:"Celular"},{field:"supporter.address1",translation:"EndereΓ§o"},{field:"supporter.address2",translation:"Complemento"},{field:"supporter.postcode",translation:"CEP"},{field:"supporter.city",translation:"Cidade"},{field:"supporter.region",translation:"Estado"},{field:"supporter.country",translation:"PaΓ­s"}],s=[{field:"supporter.address1",translation:"Straße, Hausnummer"},{field:"supporter.postcode",translation:"Postleitzahl"},{field:"supporter.city",translation:"Ort"},{field:"supporter.region",translation:"Bundesland"},{field:"supporter.country",translation:"Land"}],r=[{field:"supporter.address1",translation:"Adresse"},{field:"supporter.postcode",translation:"Code Postal"},{field:"supporter.city",translation:"Ville"},{field:"supporter.region",translation:"RΓ©gion"},{field:"supporter.country",translation:"Country"}],o=[{field:"supporter.address1",translation:"Adres"},{field:"supporter.postcode",translation:"Postcode"},{field:"supporter.city",translation:"Woonplaats"},{field:"supporter.region",translation:"Provincie"},{field:"supporter.country",translation:"Country"}],a={BR:i,BRA:i,DE:s,DEU:s,FR:r,FRA:r,NL:o,NLD:o},l={enabled:!1,title:"We are sad that you are leaving",text:"Would you mind telling us why you are leaving this page?",buttonText:"Send us your comments",buttonLink:"https://www.4sitestudios.com/",cookieName:"engrid-exit-intent-lightbox",cookieDuration:30,triggers:{visibilityState:!0,mousePosition:!0}};class c{constructor(){this.logger=new be("Loader","gold","black","πŸ”"),this.cssElement=document.querySelector('link[href*="engrid."][rel="stylesheet"]'),this.jsElement=document.querySelector('script[src*="engrid."]')}reload(){var e,t,n;const i=this.getOption("assets"),s=p.getBodyData("loaded");let r="false"===this.getOption("engridcss"),o="false"===this.getOption("engridjs");if(s||!i)return r&&this.cssElement&&(this.logger.log("engridcss=false | Removing original stylesheet:",this.cssElement),this.cssElement.remove()),o&&this.jsElement&&(this.logger.log("engridjs=false | Removing original script:",this.jsElement),this.jsElement.remove()),r&&(this.logger.log("engridcss=false | adding top banner CSS"),this.addENgridCSSUnloadedCSS()),o?(this.logger.log("engridjs=false | Skipping JS load."),this.logger.success("LOADED"),!0):(this.logger.success("LOADED"),!1);this.logger.log("RELOADING"),p.setBodyData("loaded","true");const a=p.getBodyData("theme"),l=null!==(e=this.getOption("repo-name"))&&void 0!==e?e:`engrid-${a}`;let c="",u="";switch(i){case"local":this.logger.log("LOADING LOCAL"),p.setBodyData("assets","local"),c=`https://${l}.test/dist/engrid.js`,u=`https://${l}.test/dist/engrid.css`;break;case"flush":this.logger.log("FLUSHING CACHE");const e=Date.now(),s=new URL((null===(t=this.jsElement)||void 0===t?void 0:t.getAttribute("src"))||"");s.searchParams.set("v",e.toString()),c=s.toString();const r=new URL((null===(n=this.cssElement)||void 0===n?void 0:n.getAttribute("href"))||"");r.searchParams.set("v",e.toString()),u=r.toString();break;default:this.logger.log("LOADING EXTERNAL"),c=`https://s3.amazonaws.com/engrid-dev.4sitestudios.com/${l}/${i}/engrid.js`,u=`https://s3.amazonaws.com/engrid-dev.4sitestudios.com/${l}/${i}/engrid.css`}return r&&this.cssElement&&(this.logger.log("engridcss=false | Removing original stylesheet:",this.cssElement),this.cssElement.remove()),r&&u&&""!==u&&this.logger.log("engridcss=false | Skipping injection of stylesheet:",u),r?(this.logger.log("engridcss=false | adding top banner CSS"),this.addENgridCSSUnloadedCSS()):this.setCssFile(u),o&&this.jsElement&&(this.logger.log("engridjs=false | Removing original script:",this.jsElement),this.jsElement.remove()),o&&c&&""!==c&&this.logger.log("engridjs=false | Skipping injection of script:",c),o||this.setJsFile(c),!!i}getOption(e){const t=p.getUrlParameter(e);return t&&["assets","engridcss","engridjs"].includes(e)?t:window.EngridLoader&&window.EngridLoader.hasOwnProperty(e)?window.EngridLoader[e]:this.jsElement&&this.jsElement.hasAttribute("data-"+e)?this.jsElement.getAttribute("data-"+e):null}setCssFile(e){if(""!==e)if(this.cssElement)this.logger.log("Replacing stylesheet:",e),this.cssElement.setAttribute("href",e);else{this.logger.log("Injecting stylesheet:",e);const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("media","all"),t.setAttribute("href",e),document.head.appendChild(t)}}setJsFile(e){if(""===e)return;this.logger.log("Injecting script:",e);const t=document.createElement("script");t.setAttribute("src",e),document.head.appendChild(t)}addENgridCSSUnloadedCSS(){document.body.insertAdjacentHTML("beforeend",'')}}var u=n(5363);class d{constructor(){this.logger=new be("EnForm"),this._onSubmit=new u.nz,this._onValidate=new u.nz,this._onError=new u.nz,this.submit=!0,this.submitPromise=!1,this.validate=!0,this.validatePromise=!1}static getInstance(){return d.instance||(d.instance=new d),d.instance}dispatchSubmit(){this._onSubmit.dispatch(),this.logger.log("dispatchSubmit")}dispatchValidate(){this._onValidate.dispatch(),this.logger.log("dispatchValidate")}dispatchError(){this._onError.dispatch(),this.logger.log("dispatchError")}submitForm(){const e=document.querySelector("form .en__submit button");if(e){const t=document.getElementById("enModal");t&&t.classList.add("is-submitting"),e.click(),this.logger.log("submitForm")}}get onSubmit(){return this._onSubmit.asEvent()}get onError(){return this._onError.asEvent()}get onValidate(){return this._onValidate.asEvent()}}class h{constructor(e="transaction.donationAmt",t="transaction.donationAmt.other"){this._onAmountChange=new u.FK,this._amount=0,this._radios="",this._other="",this._dispatch=!0,this._other=t,this._radios=e,document.addEventListener("change",(n=>{const i=n.target;if(i)if(i.name==e)this.amount=parseFloat(i.value);else if(i.name==t){const e=p.cleanAmount(i.value);i.value=e%1!=0?e.toFixed(2):e.toString(),this.amount=e}}));const n=document.querySelector(`[name='${this._other}']`);n&&n.addEventListener("keyup",(e=>{this.amount=p.cleanAmount(n.value)}))}static getInstance(e="transaction.donationAmt",t="transaction.donationAmt.other"){return h.instance||(h.instance=new h(e,t)),h.instance}get amount(){return this._amount}set amount(e){this._amount=e||0,this._dispatch&&this._onAmountChange.dispatch(this._amount)}get onAmountChange(){return this._onAmountChange.asEvent()}load(){const e=document.querySelector('input[name="'+this._radios+'"]:checked');if(e){let t=parseFloat(e.value||"");if(t>0)this.amount=parseFloat(e.value);else{const e=document.querySelector('input[name="'+this._other+'"]');t=p.cleanAmount(e.value),this.amount=t}}else if(p.checkNested(window.EngagingNetworks,"require","_defined","enjs","getDonationTotal")&&p.checkNested(window.EngagingNetworks,"require","_defined","enjs","getDonationFee")){const e=window.EngagingNetworks.require._defined.enjs.getDonationTotal()-window.EngagingNetworks.require._defined.enjs.getDonationFee();e&&(this.amount=e)}}setAmount(e,t=!0){if(!document.getElementsByName(this._radios).length)return;this._dispatch=t;let n=Array.from(document.querySelectorAll('input[name="'+this._radios+'"]')).filter((t=>t instanceof HTMLInputElement&&parseInt(t.value)==e));if(n.length){n[0].checked=!0,this.clearOther()}else{const t=document.querySelector('input[name="'+this._other+'"]');if(t){const n=document.querySelector(`.en__field--donationAmt.en__field--withOther .en__field__item:nth-last-child(2) input[name="${this._radios}"]`);n&&(n.checked=!0),t.value=parseFloat(e.toString()).toFixed(2);t.parentNode.classList.remove("en__field__item--hidden")}}this.amount=e,this._dispatch=!0}clearOther(){const e=document.querySelector('input[name="'+this._other+'"]');e.value="";e.parentNode.classList.add("en__field__item--hidden")}}class p{constructor(){if(!p.enForm)throw new Error("Engaging Networks Form Not Found!")}static get enForm(){return document.querySelector("form.en__component")}static get debug(){return!!this.getOption("Debug")}static get demo(){return"DEMO"===this.getUrlParameter("mode")}static getUrlParameter(e){const t=new URLSearchParams(window.location.search);if(e.endsWith("[]")){let n=[];return t.forEach(((t,i)=>{i.startsWith(e.replace("[]",""))&&n.push(new Object({[i]:t}))})),n.length>0?n:null}return t.has(e)?t.get(e)||!0:null}static getField(e){return document.querySelector(`[name="${e}"]`)}static getFieldValue(e){return new FormData(this.enForm).getAll(e).join(",")}static setFieldValue(e,t,n=!0,i=!1){t!==p.getFieldValue(e)&&(document.getElementsByName(e).forEach((e=>{if("type"in e){switch(e.type){case"select-one":case"select-multiple":for(const n of e.options)n.value==t&&(n.selected=!0,i&&e.dispatchEvent(new Event("change",{bubbles:!0})));break;case"checkbox":case"radio":e.value==t&&(e.checked=!0,i&&e.dispatchEvent(new Event("change",{bubbles:!0})));break;default:e.value=t,i&&(e.dispatchEvent(new Event("change",{bubbles:!0})),e.dispatchEvent(new Event("blur",{bubbles:!0})))}e.setAttribute("engrid-value-changed","")}})),n&&this.enParseDependencies())}static createHiddenInput(e,t=""){var n;const i=document.createElement("div");i.classList.add("en__component","en__component--formblock","hide");const s=document.createElement("div");s.classList.add("en__field","en__field--text");const r=document.createElement("div");r.classList.add("en__field__element","en__field__element--text");const o=document.createElement("input");o.classList.add("en__field__input","en__field__input--text","engrid-added-input"),o.setAttribute("name",e),o.setAttribute("type","hidden"),o.setAttribute("value",t),r.appendChild(o),s.appendChild(r),i.appendChild(s);const a=document.querySelector(".en__submit");if(a){const e=a.closest(".en__component");e&&(null===(n=e.parentNode)||void 0===n||n.insertBefore(i,e.nextSibling))}else p.enForm.appendChild(i);return o}static enParseDependencies(){var e,t,n,i,s,r;if(window.EngagingNetworks&&"function"==typeof(null===(s=null===(i=null===(n=null===(t=null===(e=window.EngagingNetworks)||void 0===e?void 0:e.require)||void 0===t?void 0:t._defined)||void 0===n?void 0:n.enDependencies)||void 0===i?void 0:i.dependencies)||void 0===s?void 0:s.parseDependencies)){const e=[];if("dependencies"in window.EngagingNetworks){const t=document.querySelector(".en__field--donationAmt");if(t){let n=(null===(r=[...t.classList.values()].filter((e=>e.startsWith("en__field--")&&Number(e.substring(11))>0)).toString().match(/\d/g))||void 0===r?void 0:r.join(""))||"";n&&(window.EngagingNetworks.dependencies.forEach((t=>{if("actions"in t&&t.actions.length>0){let i=!1;t.actions.forEach((e=>{"target"in e&&e.target==n&&(i=!0)})),i||e.push(t)}})),e.length>0&&(window.EngagingNetworks.require._defined.enDependencies.dependencies.parseDependencies(e),p.getOption("Debug")&&console.log("EN Dependencies Triggered",e)))}}}}static getGiftProcess(){return"pageJson"in window?window.pageJson.giftProcess:null}static getPageCount(){return"pageJson"in window?window.pageJson.pageCount:null}static getPageNumber(){return"pageJson"in window?window.pageJson.pageNumber:null}static getPageID(){return"pageJson"in window?window.pageJson.campaignPageId:0}static getClientID(){return"pageJson"in window?window.pageJson.clientId:0}static getDataCenter(){return p.getClientID()>=1e4?"us":"ca"}static getPageType(){if(!("pageJson"in window)||!("pageType"in window.pageJson))return"UNKNOWN";switch(window.pageJson.pageType){case"donation":case"premiumgift":return"DONATION";case"e-card":return"ECARD";case"otherdatacapture":case"survey":return"SURVEY";case"emailtotarget":return"EMAILTOTARGET";case"advocacypetition":return"ADVOCACY";case"emailsubscribeform":return"SUBSCRIBEFORM";case"supporterhub":return"SUPPORTERHUB";case"unsubscribe":return"UNSUBSCRIBE";case"tweetpage":return"TWEETPAGE";default:return"UNKNOWN"}}static setBodyData(e,t){const n=document.querySelector("body");"boolean"!=typeof t||!1!==t?n.setAttribute(`data-engrid-${e}`,t.toString()):n.removeAttribute(`data-engrid-${e}`)}static getBodyData(e){return document.querySelector("body").getAttribute(`data-engrid-${e}`)}static hasBodyData(e){return document.querySelector("body").hasAttribute(`data-engrid-${e}`)}static getOption(e){return window.EngridOptions[e]||null}static loadJS(e,t=null,n=!0){const i=document.createElement("script");i.src=e,i.onload=t,n?document.head.appendChild(i):document.body.appendChild(i)}static formatNumber(e,t=2,n=".",i=","){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");const s=isFinite(+e)?+e:0,r=isFinite(+t)?Math.abs(t):0,o=void 0===i?",":i,a=void 0===n?".":n;let l=[];return l=(r?function(e,t){const n=Math.pow(10,t);return""+Math.round(e*n)/n}(s,r):""+Math.round(s)).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)),(l[1]||"").lengthn>0&&n+1!==t.length&&3!==e.length)).includes(!0))return 0;if(n.length>1&&!n.includes("."))return 0;if([...new Set(n.slice(0,-1))].length>1)return 0;if(t[t.length-1].length<=2){const e=t.pop()||"00";return parseInt(e)>0?parseFloat(Number(parseInt(t.join(""))+"."+e).toFixed(2)):parseInt(t.join(""))}return parseInt(t.join(""))}static disableSubmit(e=""){const t=document.querySelector(".en__submit button");t.dataset.originalText=t.innerHTML;let n=""+e+"";return!!t&&(t.disabled=!0,t.innerHTML=n,!0)}static enableSubmit(){const e=document.querySelector(".en__submit button");return!!e.dataset.originalText&&(e.disabled=!1,e.innerHTML=e.dataset.originalText,delete e.dataset.originalText,!0)}static formatDate(e,t="MM/DD/YYYY"){const n=e.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}).split("/");return t.replace(/YYYY/g,n[2]).replace(/MM/g,n[0]).replace(/DD/g,n[1]).replace(/YY/g,n[2].substr(2,2))}static checkNested(e,...t){for(let n=0;n0&&(n=n.substring(0,n.indexOf("("))),n=n.replace(/[^a-zA-Z0-9]/g,""),n=n.substring(0,20),n="engrid"+((i=n).charAt(0).toUpperCase()+i.slice(1)),t&&!t.dataset[n]){t.dataset[n]="true";new MutationObserver((function(t){t.forEach((function(t){"childList"===t.type&&t.addedNodes.length>0&&e()}))})).observe(t,{childList:!0})}}static getPaymentType(){return p.getFieldValue("transaction.paymenttype")}static setPaymentType(e){const t=p.getField("transaction.paymenttype");if(t){const n=Array.from(t.options).find((t=>t.value.toLowerCase()===e.toLowerCase()));n?n.selected=!0:t.value=e;const i=new Event("change");t.dispatchEvent(i)}}static isInViewport(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}}class g{constructor(){this._onFrequencyChange=new u.FK,this._frequency="onetime",this._recurring="n",this._dispatch=!0,document.addEventListener("change",(e=>{const t=e.target;t&&"transaction.recurrpay"==t.name&&(this.recurring=t.value,"radio"==t.type&&(this.frequency="n"==t.value.toLowerCase()?"onetime":"monthly",p.setFieldValue("transaction.recurrfreq",this.frequency.toUpperCase()))),t&&"transaction.recurrfreq"==t.name&&(this.frequency=t.value)})),p.getGiftProcess()&&(p.setBodyData("transaction-recurring-frequency",sessionStorage.getItem("engrid-transaction-recurring-frequency")||"onetime"),p.setBodyData("transaction-recurring",window.pageJson.recurring?"y":"n"))}static getInstance(){return g.instance||(g.instance=new g),g.instance}get frequency(){return this._frequency}set frequency(e){this._frequency=e.toLowerCase()||"onetime",this._dispatch&&this._onFrequencyChange.dispatch(this._frequency),p.setBodyData("transaction-recurring-frequency",this._frequency),sessionStorage.setItem("engrid-transaction-recurring-frequency",this._frequency)}get recurring(){return this._recurring}set recurring(e){this._recurring=e.toLowerCase()||"n",p.setBodyData("transaction-recurring",this._recurring)}get onFrequencyChange(){return this._onFrequencyChange.asEvent()}load(){var e;this.frequency=p.getFieldValue("transaction.recurrfreq")||sessionStorage.getItem("engrid-transaction-recurring-frequency")||"onetime";p.getField("transaction.recurrpay")?this.recurring=p.getFieldValue("transaction.recurrpay"):p.checkNested(window.EngagingNetworks,"require","_defined","enjs","getSupporterData")&&(this.recurring=(null===(e=window.EngagingNetworks.require._defined.enjs.getSupporterData("recurrpay"))||void 0===e?void 0:e.toLowerCase())||"n")}setRecurrency(e,t=!0){document.getElementsByName("transaction.recurrpay").length&&(this._dispatch=t,p.setFieldValue("transaction.recurrpay",e.toUpperCase()),this._dispatch=!0)}setFrequency(e,t=!0){if(!document.getElementsByName("transaction.recurrfreq").length)return;this._dispatch=t;let n=Array.from(document.querySelectorAll('input[name="transaction.recurrfreq"]')).filter((t=>t instanceof HTMLInputElement&&t.value==e.toUpperCase()));if(n.length){n[0].checked=!0,this.frequency=e.toLowerCase(),"onetime"===this.frequency?this.setRecurrency("N",t):this.setRecurrency("Y",t)}this._dispatch=!0}}class m{constructor(){this._onFeeChange=new u.FK,this._amount=h.getInstance(),this._form=d.getInstance(),this._fee=0,this._field=null,document.getElementsByName("transaction.donationAmt").length&&(this._field=this.isENfeeCover()?document.querySelector("#en__field_transaction_feeCover"):document.querySelector('input[name="supporter.processing_fees"]'),this._field instanceof HTMLInputElement&&this._field.addEventListener("change",(e=>{this._field instanceof HTMLInputElement&&this._field.checked&&!this._subscribe&&(this._subscribe=this._form.onSubmit.subscribe((()=>this.addFees()))),this._onFeeChange.dispatch(this.fee)})))}static getInstance(){return m.instance||(m.instance=new m),m.instance}get onFeeChange(){return this._onFeeChange.asEvent()}get fee(){return this.calculateFees()}set fee(e){this._fee=e,this._onFeeChange.dispatch(this._fee)}calculateFees(e=0){var t;if(this._field instanceof HTMLInputElement&&this._field.checked){if(this.isENfeeCover())return e>0?window.EngagingNetworks.require._defined.enjs.feeCover.fee(e):window.EngagingNetworks.require._defined.enjs.getDonationFee();const n=Object.assign({processingfeepercentadded:"0",processingfeefixedamountadded:"0"},null===(t=this._field)||void 0===t?void 0:t.dataset),i=e>0?e:this._amount.amount,s=parseFloat(n.processingfeepercentadded)/100*i+parseFloat(n.processingfeefixedamountadded);return Math.round(100*s)/100}return 0}addFees(){this._form.submit&&!this.isENfeeCover()&&this._amount.setAmount(this._amount.amount+this.fee,!1)}removeFees(){this.isENfeeCover()||this._amount.setAmount(this._amount.amount-this.fee)}isENfeeCover(){if("feeCover"in window.EngagingNetworks)for(const e in window.EngagingNetworks.feeCover)if(window.EngagingNetworks.feeCover.hasOwnProperty(e))return!0;return!1}}class f{constructor(){this.logger=new be("RememberMeEvents"),this._onLoad=new u.FK,this._onClear=new u.nz,this.hasData=!1}static getInstance(){return f.instance||(f.instance=new f),f.instance}dispatchLoad(e){this.hasData=e,this._onLoad.dispatch(e),this.logger.log(`dispatchLoad: ${e}`)}dispatchClear(){this._onClear.dispatch(),this.logger.log("dispatchClear")}get onLoad(){return this._onLoad.asEvent()}get onClear(){return this._onClear.asEvent()}}class b{constructor(){this._onCountryChange=new u.FK,this._country="",this._field=null,this._field=document.getElementById("en__field_supporter_country"),this._field&&(document.addEventListener("change",(e=>{const t=e.target;t&&"supporter.country"==t.name&&(this.country=t.value)})),this.country=p.getFieldValue("supporter.country"))}static getInstance(){return b.instance||(b.instance=new b),b.instance}get countryField(){return this._field}get onCountryChange(){return this._onCountryChange.asEvent()}get country(){return this._country}set country(e){this._country=e,this._onCountryChange.dispatch(this._country)}}class v extends p{constructor(t){super(),this._form=d.getInstance(),this._fees=m.getInstance(),this._amount=h.getInstance("transaction.donationAmt","transaction.donationAmt.other"),this._frequency=g.getInstance(),this._country=b.getInstance(),this.logger=new be("App","black","white","🍏");const n=new c;this.options=Object.assign(Object.assign({},e),t),window.EngridOptions=this.options,this._dataLayer=_e.getInstance(),n.reload()||("local"===p.getBodyData("assets")&&"false"!==p.getUrlParameter("debug")&&"log"!==p.getUrlParameter("debug")&&(window.EngridOptions.Debug=!0),"loading"!==document.readyState?this.run():document.addEventListener("DOMContentLoaded",(()=>{this.run()})),window.onresize=()=>{this.onResize()})}run(){if(!p.checkNested(window.EngagingNetworks,"require","_defined","enjs"))return this.logger.danger("Engaging Networks JS Framework NOT FOUND"),void setTimeout((()=>{this.run()}),100);window.hasOwnProperty("EngridPageOptions")&&(this.options=Object.assign(Object.assign({},this.options),window.EngridPageOptions),window.EngridOptions=this.options),(this.options.Debug||"true"==v.getUrlParameter("debug"))&&v.setBodyData("debug",""),new U,new z,new G,new Q("transaction.giveBySelect","giveBySelect-"),new Q("transaction.inmem","inmem-"),new Q("transaction.recurrpay","recurrpay-");let e=[];document.querySelectorAll("input[type=radio]").forEach((t=>{"name"in t&&!1===e.includes(t.name)&&e.push(t.name)})),e.forEach((e=>{new Q(e,"engrid__"+e.replace(/\./g,"")+"-")}));document.querySelectorAll("input[type=checkbox]").forEach((e=>{"name"in e&&new Q(e.name,"engrid__"+e.name.replace(/\./g,"")+"-")})),this._form.onSubmit.subscribe((()=>this.onSubmit())),this._form.onError.subscribe((()=>this.onError())),this._form.onValidate.subscribe((()=>this.onValidate())),this._amount.onAmountChange.subscribe((e=>this.logger.success(`Live Amount: ${e}`))),this._frequency.onFrequencyChange.subscribe((e=>{this.logger.success(`Live Frequency: ${e}`),setTimeout((()=>{this._amount.load()}),150)})),this._form.onSubmit.subscribe((e=>this.logger.success("Submit: "+JSON.stringify(e)))),this._form.onError.subscribe((e=>this.logger.danger("Error: "+JSON.stringify(e)))),this._country.onCountryChange.subscribe((e=>this.logger.success(`Country: ${e}`))),window.enOnSubmit=()=>(this._form.submit=!0,this._form.submitPromise=!1,this._form.dispatchSubmit(),p.watchForError(p.enableSubmit),!!this._form.submit&&(this._form.submitPromise?this._form.submitPromise:(this.logger.success("enOnSubmit Success"),!0))),window.enOnError=()=>{this._form.dispatchError()},window.enOnValidate=()=>(this._form.validate=!0,this._form.validatePromise=!1,this._form.dispatchValidate(),!!this._form.validate&&(this._form.validatePromise?this._form.validatePromise:(this.logger.success("Validation Passed"),!0))),new tt,new W,new K(this.options),new le,new X,new y,new Se,new we,new Ne,new Te,new Pe,window.setTimeout((()=>{this._frequency.load()}),150),new Je,new ke,new Fe,new re,this.options.MediaAttribution&&new J,this.options.applePay&&new O,this.options.CapitalizeFields&&new q,this.options.AutoYear&&new R,new B,new j,new V,this.options.ClickToExpand&&new H,this.options.SkipToMainContentLink&&new oe,this.options.SrcDefer&&new ae,this.options.ProgressBar&&new he;try{this.options.RememberMe&&"object"==typeof this.options.RememberMe&&window.localStorage&&new ge(this.options.RememberMe)}catch(e){}this.options.NeverBounceAPI&&new ue(this.options.NeverBounceAPI,this.options.NeverBounceDateField,this.options.NeverBounceStatusField,this.options.NeverBounceDateFormat),this.options.FreshAddress&&new de,new me,new fe,new ve,new ye,new M,new Ee,new Ce,new ce,new Ae,new Le,new Qe,this.options.Debug&&new Me,this.options.TidyContact&&new De,this.options.TranslateFields&&new se,new Be,new Re,new Ye,"DONATION"===p.getPageType()&&new je,new Ve,new He,new Ue,this.options.Plaid&&new $e,new We,new $,new ze,new Ge,new Ke,new Xe,new Ze,new et,new nt,new st;let t=this.options.Debug;try{!t&&window.sessionStorage.hasOwnProperty(Oe.debugSessionStorageKey)&&(t=!0)}catch(e){}t&&new Oe(this.options.PageLayouts),"branding"===p.getUrlParameter("development")&&(new Ie).show(),p.setBodyData("data-engrid-scripts-js-loading","finished"),window.EngridVersion=rt,this.logger.success(`VERSION: ${rt}`);let n="function"==typeof window.onload?window.onload:null;"loading"!==document.readyState?this.onLoad():window.onload=e=>{this.onLoad(),n&&n.bind(window,e)}}onLoad(){this.options.onLoad&&this.options.onLoad()}onResize(){this.options.onResize&&this.options.onResize()}onValidate(){this.options.onValidate&&(this.logger.log("Client onValidate Triggered"),this.options.onValidate())}onSubmit(){this.options.onSubmit&&(this.logger.log("Client onSubmit Triggered"),this.options.onSubmit())}onError(){this.options.onError&&(this.logger.danger("Client onError Triggered"),this.options.onError())}static log(e){new be("Client","brown","aliceblue","πŸͺ").log(e)}}class y{constructor(){this._frequency=g.getInstance(),this.shouldRun()&&(this._frequency.onFrequencyChange.subscribe((e=>window.setTimeout(this.fixAmountLabels.bind(this),100))),window.setTimeout(this.fixAmountLabels.bind(this),300))}shouldRun(){return!("DONATION"!==p.getPageType()||!p.getOption("AddCurrencySymbol"))}fixAmountLabels(){let e=document.querySelectorAll(".en__field--donationAmt label");const t=p.getCurrencySymbol()||"";e.forEach((e=>{isNaN(e.innerText)||(e.innerText=t+e.innerText)}))}}var _=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};const S=window.ApplePaySession,w=window.merchantIdentifier,E=window.merchantDomainName,C=window.merchantDisplayName,A=window.merchantSessionIdentifier,L=window.merchantNonce,x=window.merchantEpochTimestamp,D=window.merchantSignature,k=window.merchantCountryCode,F=window.merchantCurrencyCode,N=window.merchantSupportedNetworks,T=window.merchantCapabilities,P=window.merchantTotalLabel;class O{constructor(){this.applePay=document.querySelector('.en__field__input.en__field__input--radio[value="applepay"]'),this._amount=h.getInstance(),this._fees=m.getInstance(),this._form=d.getInstance(),this.checkApplePay()}checkApplePay(){return _(this,void 0,void 0,(function*(){const e=document.querySelector("form.en__component--page");if(!this.applePay||!window.hasOwnProperty("ApplePaySession")){const e=document.querySelector(".en__field__item.applepay");return e&&e.remove(),p.debug&&console.log("Apple Pay DISABLED"),!1}const t=S.canMakePaymentsWithActiveCard(w);let n=!1;yield t.then((t=>{if(n=t,t){let t=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name","PkPaymentToken"),t.setAttribute("id","applePayToken"),e.appendChild(t),this._form.onSubmit.subscribe((()=>this.onPayClicked()))}})),p.debug&&console.log("applePayEnabled",n);let i=this.applePay.closest(".en__field__item");return n?null==i||i.classList.add("applePayWrapper"):i&&(i.style.display="none"),n}))}performValidation(e){return new Promise((function(t,n){var i={};i.merchantIdentifier=w,i.merchantSessionIdentifier=A,i.nonce=L,i.domainName=E,i.epochTimestamp=x,i.signature=D;var s="/ea-dataservice/rest/applepay/validateurl?url="+e+("&merchantIdentifier="+w+"&merchantDomain="+E+"&displayName="+C),r=new XMLHttpRequest;r.onload=function(){var e=JSON.parse(this.responseText);p.debug&&console.log("Apple Pay Validation",e),t(e)},r.onerror=n,r.open("GET",s),r.send()}))}log(e,t){var n=new XMLHttpRequest;n.open("GET","/ea-dataservice/rest/applepay/log?name="+e+"&msg="+t),n.send()}sendPaymentToken(e){return new Promise((function(e,t){e(!0)}))}onPayClicked(){if(!this._form.submit)return;const e=document.querySelector("#en__field_transaction_paymenttype"),t=document.getElementById("applePayToken"),n=this._form;if("applepay"==e.value&&""==t.value)try{let e=this._amount.amount+this._fees.fee;var i=new S(1,{supportedNetworks:N,merchantCapabilities:T,countryCode:k,currencyCode:F,total:{label:P,amount:e}}),s=this;return i.onvalidatemerchant=function(e){s.performValidation(e.validationURL).then((function(e){p.debug&&console.log("Apple Pay merchantSession",e),i.completeMerchantValidation(e)}))},i.onpaymentauthorized=function(e){s.sendPaymentToken(e.payment.token).then((function(t){p.debug&&console.log("Apple Pay Token",e.payment.token),document.getElementById("applePayToken").value=JSON.stringify(e.payment.token),n.submitForm()}))},i.oncancel=function(e){p.debug&&console.log("Cancelled",e),alert("You cancelled. Sorry it didn't work out."),n.dispatchError()},i.begin(),this._form.submit=!1,!1}catch(e){alert("Developer mistake: '"+e.message+"'"),n.dispatchError()}return this._form.submit=!0,!0}}class M{constructor(){this.addRequired(),this.addLabel(),this.addGroupRole()}addGroupRole(){document.querySelectorAll(".en__field--radio").forEach((e=>{e.setAttribute("role","group");const t=e.querySelector("label");t&&(t.setAttribute("id",`en__field__label--${Math.random().toString(36).slice(2,7)}`),e.setAttribute("aria-labelledby",t.id))}))}addRequired(){document.querySelectorAll(".en__mandatory .en__field__input").forEach((e=>{e.setAttribute("aria-required","true")}))}addLabel(){const e=document.querySelector(".en__field__input--otheramount");e&&e.setAttribute("aria-label","Enter your custom donation amount");document.querySelectorAll(".en__field__input--splitselect").forEach((e=>{var t,n,i,s;const r=e.querySelector("option");!r||""!==r.value||(null===(n=null===(t=r.textContent)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("select"))||(null===(s=null===(i=r.textContent)||void 0===i?void 0:i.toLowerCase())||void 0===s?void 0:s.includes("choose"))||e.setAttribute("aria-label",r.textContent||"")}))}}class q{constructor(){this._form=d.getInstance(),this._form.onSubmit.subscribe((()=>this.capitalizeFields("en__field_supporter_firstName","en__field_supporter_lastName","en__field_supporter_address1","en__field_supporter_city")))}capitalizeFields(...e){e.forEach((e=>this.capitalize(e)))}capitalize(e){let t=document.getElementById(e);return t&&(t.value=t.value.replace(/\w\S*/g,(e=>e.replace(/^\w/,(e=>e.toUpperCase())))),p.debug&&console.log("Capitalized",t.value)),!0}}var I=n(3548);class B{constructor(){if(this.logger=new be("CreditCard","#ccc84a","#333","πŸ’³"),this._form=d.getInstance(),this.vgsField=document.querySelector(".en__field--vgs"),this.ccField=p.getField("transaction.ccnumber"),this.ccValues={"american-express":["amex","american express","americanexpress","american-express","amx","ax"],visa:["visa","vi"],mastercard:["mastercard","master card","mc"],discover:["discover","di"],"diners-club":["diners","diners club","dinersclub","dc"],jcb:["jcb"],unionpay:["unionpay","union pay","up"],maestro:["maestro"],elo:["elo"],mir:["mir"],hiper:["hiper","hipercard"]},this.isPotentiallyValid=!1,this.isValid=!1,this.field_expiration_month=null,this.field_expiration_year=null,this.paymentTypeField=p.getField("transaction.paymenttype"),this.handleExpUpdate=e=>{if(!this.field_expiration_month||!this.field_expiration_year)return;const t=new Date,n=t.getMonth()+1,i=parseInt(this.field_expiration_year[this.field_expiration_year.length-1].value)>2e3?t.getFullYear():t.getFullYear()-2e3;if("month"==e){let e=parseInt(this.field_expiration_month.value),t=ethis.onlyNumbersCC())),this._form.onValidate.subscribe((()=>{this._form.validate&&(p.debug&&console.log("Engrid Credit Cards: onValidate"),this._form.validate=this.validate())})),this.addEventListeners(),this.handleCCUpdate()}addEventListeners(){["keyup","paste"].forEach((e=>{this.ccField.addEventListener(e,(()=>this.handleCCUpdate()))})),this.ccField.addEventListener("keydown",(e=>{" "===e.key&&e.preventDefault()})),this.field_expiration_month&&this.field_expiration_year&&["change"].forEach((e=>{var t,n;null===(t=this.field_expiration_month)||void 0===t||t.addEventListener(e,(()=>{this.handleExpUpdate("month")})),null===(n=this.field_expiration_year)||void 0===n||n.addEventListener(e,(()=>{this.handleExpUpdate("year")}))}));const e=document.getElementsByName("transaction.giveBySelect");e&&e.forEach((e=>{e.addEventListener("change",(()=>{"card"===e.value.toLowerCase()&&(this.logger.log("Handle credit card auto-update"),window.setTimeout((()=>{this.handleCCUpdate()}),100))}))}))}onlyNumbersCC(){const e=this.ccField.value.replace(/\D/g,"");return this.ccField.value=e,!0}handleCCUpdate(){var e,t;const n=this.ccField.closest(".en__field--ccnumber")||document.querySelector(".en__field--ccnumber");if(!n)return void this.logger.log("Card Container Not Found");if(p.removeError(n),this.ccField.value.length<2)return this.removeLiveCardTypeClasses(),void this.clearPaymentTypeField();const i=I.number(this.ccField.value),s=null===(e=i.card)||void 0===e?void 0:e.type,r=null===(t=i.card)||void 0===t?void 0:t.niceType;if(this.isPotentiallyValid=i.isPotentiallyValid||!1,this.isValid=i.isValid||!1,this.removeLiveCardTypeClasses(),!this.isPotentiallyValid)return p.setError(n,"Invalid Credit Card Number"),void this.addLiveCardTypeClasses("invalid");if(!s)return this.removeLiveCardTypeClasses(),void this.clearPaymentTypeField();const o=this.getCardTypeFromPaymentTypeField(s);if(!o)return p.setError(n,`Unsupported Credit Card Type: ${r}`),void this.addLiveCardTypeClasses("invalid");if(this.addLiveCardTypeClasses(s),this.ccField.value=this.formatCCNumber(i.card),this.paymentTypeField.value!=o){this.logger.log(`card type ${s}`),this.paymentTypeField.value=o||"";const e=new Event("change",{bubbles:!0});this.paymentTypeField.dispatchEvent(e)}}formatCCNumber(e){const t=this.ccField.value.replace(/\D/g,""),n=e.gaps;let i="";for(let e=0;e!e.startsWith("live-card-type-")));this.ccField.className=e.join(" ").trim()}addLiveCardTypeClasses(e){this.ccField.classList.add(`live-card-type-${e}`),"invalid"==e&&this.clearPaymentTypeField()}clearPaymentTypeField(){this.paymentTypeField.value="";const e=new Event("change",{bubbles:!0});this.paymentTypeField.dispatchEvent(e)}isCardSupported(e){return e in this.ccValues&&Array.from(this.paymentTypeField.options).filter((t=>this.ccValues[e].includes(t.value.toLowerCase()))).length>0}getCardTypeFromPaymentTypeField(e){return this.isCardSupported(e)&&Array.from(this.paymentTypeField.options).filter((t=>this.ccValues[e].includes(t.value.toLowerCase())))[0].value||!1}isPaymentTypeCard(){const e=this.paymentTypeField.value.toLowerCase();return""===e||Object.keys(this.ccValues).some((t=>this.ccValues[t].includes(e)))}validate(){if(this.isPaymentTypeCard()&&!this.isValid){const e=this.ccField.closest(".en__field--ccnumber")||document.querySelector(".en__field--ccnumber");return e&&window.setTimeout((()=>{p.setError(e,"Invalid Credit Card Number"),this.ccField.focus()}),100),!1}return!0}}class R{constructor(){if(this.yearField=document.querySelector("select[name='transaction.ccexpire']:not(#en__field_transaction_ccexpire)"),this.years=20,this.yearLength=2,this.yearField){this.clearFieldOptions();for(let e=0;e{var t;if(""!==e.value&&!isNaN(Number(e.value))){const n=[...this.yearField.options].findIndex((t=>t.value===e.value));null===(t=this.yearField)||void 0===t||t.remove(n)}})))}}class j{constructor(){this.logger=new be("Autocomplete","#330033","#f0f0f0","πŸ“‡"),this.autoCompleteField('[name="supporter.firstName"]',"given-name"),this.autoCompleteField('[name="supporter.lastName"]',"family-name"),this.autoCompleteField('[name="transaction.ccnumber"]',"cc-number"),this.autoCompleteField("#en__field_transaction_ccexpire","cc-exp-month"),this.autoCompleteField('[name="transaction.ccexpire"]:not(#en__field_transaction_ccexpire)',"cc-exp-year"),this.autoCompleteField('[name="transaction.ccvv"]',"cc-csc"),this.autoCompleteField('[name="supporter.emailAddress"]',"email"),this.autoCompleteField('[name="supporter.phoneNumber"]',"tel"),this.autoCompleteField('[name="supporter.country"]',"country"),this.autoCompleteField('[name="supporter.address1"]',"address-line1"),this.autoCompleteField('[name="supporter.address2"]',"address-line2"),this.autoCompleteField('[name="supporter.city"]',"address-level2"),this.autoCompleteField('[name="supporter.region"]',"address-level1"),this.autoCompleteField('[name="supporter.postcode"]',"postal-code"),this.autoCompleteField('[name="transaction.honname"]',"none"),this.autoCompleteField('[name="transaction.infemail"]',"none"),this.autoCompleteField('[name="transaction.infname"]',"none"),this.autoCompleteField('[name="transaction.infadd1"]',"none"),this.autoCompleteField('[name="transaction.infadd2"]',"none"),this.autoCompleteField('[name="transaction.infcity"]',"none"),this.autoCompleteField('[name="transaction.infpostcd"]',"none")}autoCompleteField(e,t){let n=document.querySelector(e);return n?(n.autocomplete=t,!0):("none"!==t&&this.logger.log("Field Not Found",e),!1)}}class V{constructor(){if(this._form=d.getInstance(),this.logger=new be("Ecard","red","#f5f5f5","πŸͺͺ"),!this.shouldRun())return;this._form.onValidate.subscribe((()=>this.checkRecipientFields()));const e=p.getUrlParameter("engrid_ecard.schedule"),t=p.getField("ecard.schedule"),n=p.getUrlParameter("engrid_ecard.name"),i=document.querySelector(".en__ecardrecipients__name input"),s=p.getUrlParameter("engrid_ecard.email"),r=document.querySelector(".en__ecardrecipients__email input");if(e&&t){const n=new Date(e.toString()),i=new Date;n.setHours(0,0,0,0){const t='
'+e.innerHTML+"
";e.innerHTML=t,e.addEventListener("click",(t=>{t&&(p.debug&&console.log("A click-to-expand div was clicked"),e.classList.add("expanded"))})),e.addEventListener("keydown",(t=>{"Enter"===t.key?(p.debug&&console.log("A click-to-expand div had the 'Enter' key pressed on it"),e.classList.add("expanded")):" "===t.key&&(p.debug&&console.log("A click-to-expand div had the 'Spacebar' key pressed on it"),e.classList.add("expanded"),t.preventDefault(),t.stopPropagation())}))}))}}class U{constructor(){this.logger=new be("Advocacy","#232323","#f7b500","πŸ‘¨β€βš–οΈ"),this.shoudRun()&&this.setClickableLabels()}shoudRun(){return["ADVOCACY","EMAILTOTARGET"].includes(p.getPageType())}setClickableLabels(){const e=document.querySelectorAll(".en__contactDetails__rows");e&&e.forEach((e=>{e.addEventListener("click",(t=>{this.toggleCheckbox(e)}))}))}toggleCheckbox(e){const t=e.closest(".en__contactDetails");if(!t)return;const n=t.querySelector("input[type='checkbox']");n&&(this.logger.log("toggleCheckbox",n.checked),n.checked=!n.checked)}}class ${constructor(){this._country=b.getInstance(),this.setDataAttributes()}setDataAttributes(){p.checkNested(window,"pageJson","pageType")&&p.setBodyData("page-type",window.pageJson.pageType),p.setBodyData("currency-code",p.getCurrencyCode()),document.querySelector(".body-banner img, .body-banner video")||p.setBodyData("body-banner","empty"),document.querySelector(".page-alert *")||p.setBodyData("no-page-alert",""),document.querySelector(".content-header *")||p.setBodyData("no-content-header",""),document.querySelector(".body-headerOutside *")||p.setBodyData("no-body-headerOutside",""),document.querySelector(".body-header *")||p.setBodyData("no-body-header",""),document.querySelector(".body-title *")||p.setBodyData("no-body-title",""),document.querySelector(".body-banner *")||p.setBodyData("no-body-banner",""),document.querySelector(".body-bannerOverlay *")||p.setBodyData("no-body-bannerOverlay",""),document.querySelector(".body-top *")||p.setBodyData("no-body-top",""),document.querySelector(".body-main *")||p.setBodyData("no-body-main",""),document.querySelector(".body-bottom *")||p.setBodyData("no-body-bottom",""),document.querySelector(".body-footer *")||p.setBodyData("no-body-footer",""),document.querySelector(".body-footerOutside *")||p.setBodyData("no-body-footerOutside",""),document.querySelector(".content-footerSpacer *")||p.setBodyData("no-content-footerSpacer",""),document.querySelector(".content-preFooter *")||p.setBodyData("no-content-preFooter",""),document.querySelector(".content-footer *")||p.setBodyData("no-content-footer",""),document.querySelector(".page-backgroundImage img, .page-backgroundImage video")||p.setBodyData("no-page-backgroundImage",""),document.querySelector(".page-backgroundImageOverlay *")||p.setBodyData("no-page-backgroundImageOverlay",""),document.querySelector(".page-customCode *")||p.setBodyData("no-page-customCode",""),this._country.country&&(p.setBodyData("country",this._country.country),this._country.onCountryChange.subscribe((e=>{p.setBodyData("country",e)})));const e=document.querySelector(".en__field--donationAmt .en__field__item--other");e&&e.setAttribute("data-currency-symbol",p.getCurrencySymbol());const t=p.getField("transaction.paymenttype");t&&(p.setBodyData("payment-type",t.value),t.addEventListener("change",(()=>{p.setBodyData("payment-type",t.value)})));const n=document.querySelector(".content-footer");n&&p.isInViewport(n)?p.setBodyData("footer-above-fold",""):p.setBodyData("footer-below-fold",""),p.demo&&p.setBodyData("demo","")}}class W{constructor(){if(this._form=d.getInstance(),this.logger=new be("iFrame","brown","gray","πŸ“‘"),this.inIframe()){p.setBodyData("embedded",""),this.logger.log("iFrame Event - Begin Resizing"),window.addEventListener("load",(e=>{this.logger.log("iFrame Event - window.onload"),this.sendIframeHeight(),window.parent.postMessage({scroll:this.shouldScroll()},"*"),document.addEventListener("click",(e=>{this.logger.log("iFrame Event - click"),setTimeout((()=>{this.sendIframeHeight()}),100)}))})),window.setTimeout((()=>{this.sendIframeHeight()}),300),window.addEventListener("resize",this.debounceWithImmediate((()=>{this.logger.log("iFrame Event - window resized"),this.sendIframeHeight()}))),this._form.onSubmit.subscribe((e=>{this.logger.log("iFrame Event - onSubmit"),this.sendIframeFormStatus("submit")})),this.isChained()&&this.hasPayment()&&(this.logger.log("iFrame Event - Chained iFrame"),this.sendIframeFormStatus("chained"),this.hideFormComponents(),this.addChainedBanner());const e=document.querySelector(".skip-link");e&&e.remove(),this._form.onError.subscribe((()=>{const e=document.querySelector(".en__field--validationFailed"),t=e?e.getBoundingClientRect().top:0;this.logger.log(`iFrame Event 'scrollTo' - Position of top of first error ${t} px`),window.parent.postMessage({scrollTo:t},"*")}))}else this._form.onError.subscribe((()=>{const e=document.querySelector(".en__field--validationFailed");e&&e.scrollIntoView({behavior:"smooth"})})),window.addEventListener("message",(e=>{const t=this.getIFrameByEvent(e);if(t)if(e.data.hasOwnProperty("frameHeight"))t.style.height=e.data.frameHeight+"px";else if(e.data.hasOwnProperty("scroll")&&e.data.scroll>0){let n=window.pageYOffset+t.getBoundingClientRect().top+e.data.scroll;window.scrollTo({top:n,left:0,behavior:"smooth"}),this.logger.log("iFrame Event - Scrolling Window to "+n)}else if(e.data.hasOwnProperty("scrollTo")){const n=e.data.scrollTo+window.scrollY+t.getBoundingClientRect().top;window.scrollTo({top:n,left:0,behavior:"smooth"}),this.logger.log("iFrame Event - Scrolling Window to "+n)}}))}sendIframeHeight(){let e=document.body.offsetHeight;this.logger.log("iFrame Event - Sending iFrame height of: "+e+"px"),window.parent.postMessage({frameHeight:e,pageNumber:p.getPageNumber(),pageCount:p.getPageCount(),giftProcess:p.getGiftProcess()},"*")}sendIframeFormStatus(e){window.parent.postMessage({status:e,pageNumber:p.getPageNumber(),pageCount:p.getPageCount(),giftProcess:p.getGiftProcess()},"*")}getIFrameByEvent(e){return[].slice.call(document.getElementsByTagName("iframe")).filter((t=>t.contentWindow===e.source))[0]}shouldScroll(){if(document.querySelector(".en__errorHeader"))return!0;if(this.isChained())return!1;let e=document.referrer;return new RegExp(/^(.*)\/(page)\/(\d+.*)/).test(e)}inIframe(){try{return window.self!==window.top}catch(e){return!0}}isChained(){return!!p.getUrlParameter("chain")}hasPayment(){const e=p.getFieldValue("transaction.paymenttype"),t=p.getFieldValue("transaction.ccnumber");return e||t}hideFormComponents(){this.logger.log("iFrame Event - Hiding Form Components");const e=document.querySelectorAll(".body-main > div");e.forEach(((t,n)=>{!1===t.classList.contains("hide")&&!1===t.classList.contains("hide-iframe")&&!1===t.classList.contains("radio-to-buttons_donationAmt")&&n div.hide-chained").forEach((e=>{e.classList.remove("hide-iframe"),e.classList.remove("hide-chained")})),this.sendIframeHeight()}addChainedBanner(){var e,t;this.logger.log("iFrame Event - Adding Chained Banner");const n=document.createElement("div"),i=document.querySelector(".body-main > div:last-of-type");n.classList.add("en__component"),n.classList.add("en__component--banner"),n.classList.add("en__component--banner--chained"),n.innerHTML=`

\n Giving as ${p.getFieldValue("supporter.firstName")} ${p.getFieldValue("supporter.lastName")} \n with ${p.getFieldValue("transaction.paymenttype").toUpperCase()}\n (change)

`,null===(e=null==i?void 0:i.parentNode)||void 0===e||e.insertBefore(n,i),null===(t=n.querySelector(".en__component__content__link"))||void 0===t||t.addEventListener("click",(e=>{e.preventDefault(),this.showFormComponents(),n.remove()}))}debounceWithImmediate(e,t=1e3){let n,i=!0;return(...s)=>{clearTimeout(n),i&&(e.apply(this,s),i=!1),n=setTimeout((()=>{e.apply(this,s),i=!0}),t)}}}class G{constructor(){this.logger=new be("InputHasValueAndFocus","yellow","#333","🌈"),this.formInputs=document.querySelectorAll(".en__field--text, .en__field--email:not(.en__field--checkbox), .en__field--telephone, .en__field--number, .en__field--textarea, .en__field--select, .en__field--checkbox"),this.shouldRun()&&this.run()}shouldRun(){return this.formInputs.length>0}run(){this.formInputs.forEach((e=>{const t=e.querySelector("input, textarea, select");t&&t.value&&e.classList.add("has-value"),this.bindEvents(e)}))}bindEvents(e){const t=e.querySelector("input, textarea, select");t&&(t.addEventListener("focus",(()=>{this.log("Focus added",t),e.classList.add("has-focus")})),t.addEventListener("blur",(()=>{this.log("Focus removed",t),e.classList.remove("has-focus")})),t.addEventListener("input",(()=>{t.value?(this.log("Value added",t),e.classList.add("has-value")):(this.log("Value removed",t),e.classList.remove("has-value"))})))}log(e,t){this.logger.log(`${e} on ${t.name}: ${t.value}`)}}class z{constructor(){if(this.defaultPlaceholders={"input#en__field_supporter_firstName":"First Name","input#en__field_supporter_lastName":"Last Name","input#en__field_supporter_emailAddress":"Email Address","input#en__field_supporter_phoneNumber":"Phone Number (Optional)",".en__mandatory input#en__field_supporter_phoneNumber":"Phone Number","input#en__field_supporter_phoneNumber2":"000-000-0000 (Optional)",".en__mandatory input#en__field_supporter_phoneNumber2":"000-000-0000","input#en__field_supporter_country":"Country","input#en__field_supporter_address1":"Street Address","input#en__field_supporter_address2":"Apt., Ste., Bldg.","input#en__field_supporter_city":"City","input#en__field_supporter_region":"Region","input#en__field_supporter_postcode":"ZIP Code",".en__field--donationAmt.en__field--withOther .en__field__input--other":"Other","input#en__field_transaction_ccnumber":"β€’β€’β€’β€’ β€’β€’β€’β€’ β€’β€’β€’β€’ β€’β€’β€’β€’","input#en__field_transaction_ccexpire":"MM / YY","input#en__field_transaction_ccvv":"CVV","input#en__field_supporter_bankAccountNumber":"Bank Account Number","input#en__field_supporter_bankRoutingNumber":"Bank Routing Number","input#en__field_transaction_honname":"Honoree Name","input#en__field_transaction_infname":"Recipient Name","input#en__field_transaction_infemail":"Recipient Email Address","input#en__field_transaction_infcountry":"Country","input#en__field_transaction_infadd1":"Recipient Street Address","input#en__field_transaction_infadd2":"Recipient Apt., Ste., Bldg.","input#en__field_transaction_infcity":"Recipient City","input#en__field_transaction_infpostcd":"Recipient Postal Code","input#en__field_transaction_gftrsn":"Reason for your gift","input#en__field_transaction_shipfname":"Shipping First Name","input#en__field_transaction_shiplname":"Shipping Last Name","input#en__field_transaction_shipemail":"Shipping Email Address","input#en__field_transaction_shipcountry":"Shipping Country","input#en__field_transaction_shipadd1":"Shipping Street Address","input#en__field_transaction_shipadd2":"Shipping Apt., Ste., Bldg.","input#en__field_transaction_shipcity":"Shipping City","input#en__field_transaction_shipregion":"Shipping Region","input#en__field_transaction_shippostcode":"Shipping Postal Code","input#en__field_supporter_billingCountry":"Billing Country","input#en__field_supporter_billingAddress1":"Billing Street Address","input#en__field_supporter_billingAddress2":"Billing Apt., Ste., Bldg.","input#en__field_supporter_billingCity":"Billing City","input#en__field_supporter_billingRegion":"Billing Region","input#en__field_supporter_billingPostcode":"Billing Postal Code"},this.shouldRun()){const e=p.getOption("Placeholders");e&&(this.defaultPlaceholders=Object.assign(Object.assign({},this.defaultPlaceholders),e)),this.run()}}shouldRun(){return p.hasBodyData("add-input-placeholders")}run(){Object.keys(this.defaultPlaceholders).forEach((e=>{e in this.defaultPlaceholders&&this.addPlaceholder(e,this.defaultPlaceholders[e])}))}addPlaceholder(e,t){const n=document.querySelector(e);n&&(n.placeholder=t)}}const Y=n(3861).ZP;class J{constructor(){this.mediaWithAttribution=document.querySelectorAll("img[data-attribution-source]:not([data-attribution-hide-overlay]), video[data-attribution-source]:not([data-attribution-hide-overlay])"),this.mediaWithAttribution.forEach((e=>{p.debug&&console.log("The following image was found with data attribution fields on it. It's markup will be changed to add caption support.",e);let t=document.createElement("figure");t.classList.add("media-with-attribution");let n=e.parentNode;if(n){n.insertBefore(t,e),t.appendChild(e);let i=e,s=i.dataset.attributionSource;if(s){let e=i.dataset.attributionSourceLink;e?i.insertAdjacentHTML("afterend",''+s+""):i.insertAdjacentHTML("afterend",""+s+"");const t="attributionSourceTooltip"in i.dataset&&i.dataset.attributionSourceTooltip;t&&Y(i.nextSibling,{content:t,arrow:!0,arrowType:"default",placement:"left",trigger:"click mouseenter focus",interactive:!0})}}}))}}class K{constructor(t){var n;this._amount=h.getInstance(),this._fees=m.getInstance(),this._frequency=g.getInstance(),this._form=d.getInstance(),this.multiplier=1/12,this.options=Object.assign(Object.assign({},e),t),this.submitLabel=(null===(n=document.querySelector(".en__submit button"))||void 0===n?void 0:n.innerHTML)||"Donate",this._amount.onAmountChange.subscribe((()=>this.changeSubmitButton())),this._amount.onAmountChange.subscribe((()=>this.changeLiveAmount())),this._amount.onAmountChange.subscribe((()=>this.changeLiveUpsellAmount())),this._fees.onFeeChange.subscribe((()=>this.changeLiveAmount())),this._fees.onFeeChange.subscribe((()=>this.changeLiveUpsellAmount())),this._fees.onFeeChange.subscribe((()=>this.changeSubmitButton())),this._frequency.onFrequencyChange.subscribe((()=>this.changeLiveFrequency())),this._frequency.onFrequencyChange.subscribe((()=>this.changeRecurrency())),this._frequency.onFrequencyChange.subscribe((()=>this.changeSubmitButton())),this._form.onSubmit.subscribe((()=>{"SUPPORTERHUB"!==p.getPageType()&&p.disableSubmit("Processing...")})),this._form.onError.subscribe((()=>p.enableSubmit())),document.addEventListener("click",(e=>{const t=e.target;t&&(t.classList.contains("monthly-upsell")?this.upsold(e):t.classList.contains("form-submit")&&(e.preventDefault(),this._form.submitForm()))}))}getAmountTxt(e=0){var t,n,i,s;const r=null!==(t=p.getCurrencySymbol())&&void 0!==t?t:"$",o=null!==(n=this.options.DecimalSeparator)&&void 0!==n?n:".",a=null!==(i=this.options.ThousandsSeparator)&&void 0!==i?i:"",l=e%1==0?0:null!==(s=this.options.DecimalPlaces)&&void 0!==s?s:2,c=p.formatNumber(e,l,o,a);return e>0?`${r}${c}`:""}getUpsellAmountTxt(e=0){var t,n,i,s;const r=null!==(t=p.getCurrencySymbol())&&void 0!==t?t:"$",o=null!==(n=this.options.DecimalSeparator)&&void 0!==n?n:".",a=null!==(i=this.options.ThousandsSeparator)&&void 0!==i?i:"",l=e%1==0?0:null!==(s=this.options.DecimalPlaces)&&void 0!==s?s:2,c=p.formatNumber(5*Math.ceil(e/5),l,o,a);return e>0?r+c:""}getUpsellAmountRaw(e=0){const t=5*Math.ceil(e/5);return e>0?t.toString():""}changeSubmitButton(){const e=document.querySelector(".en__submit button"),t=this.getAmountTxt(this._amount.amount+this._fees.fee),n="onetime"==this._frequency.frequency?"":"annual"==this._frequency.frequency?"annually":this._frequency.frequency;let i=this.submitLabel;t?(i=i.replace("$AMOUNT",t),i=i.replace("$FREQUENCY",`${n}`)):(i=i.replace("$AMOUNT",""),i=i.replace("$FREQUENCY","")),e&&i&&(e.innerHTML=i)}changeLiveAmount(){const e=this._amount.amount+this._fees.fee;document.querySelectorAll(".live-giving-amount").forEach((t=>t.innerHTML=this.getAmountTxt(e)))}changeLiveUpsellAmount(){const e=(this._amount.amount+this._fees.fee)*this.multiplier;document.querySelectorAll(".live-giving-upsell-amount").forEach((t=>t.innerHTML=this.getUpsellAmountTxt(e)));document.querySelectorAll(".live-giving-upsell-amount-raw").forEach((t=>t.innerHTML=this.getUpsellAmountRaw(e)))}changeLiveFrequency(){document.querySelectorAll(".live-giving-frequency").forEach((e=>e.innerHTML="onetime"==this._frequency.frequency?"":this._frequency.frequency))}changeRecurrency(){const e=document.querySelector("[name='transaction.recurrpay']");if(e&&"radio"!=e.type){e.value="onetime"==this._frequency.frequency?"N":"Y",this._frequency.recurring=e.value,p.getOption("Debug")&&console.log("Recurpay Changed!");const t=new Event("change",{bubbles:!0});e.dispatchEvent(t)}}upsold(e){const t=document.querySelector(".en__field--recurrpay input[value='Y']");t&&(t.checked=!0);const n=document.querySelector(".en__field--donationAmt input[value='other']");n&&(n.checked=!0);const i=document.querySelector("input[name='transaction.donationAmt.other']");i&&(i.value=this.getUpsellAmountRaw(this._amount.amount*this.multiplier),this._amount.load(),this._frequency.load(),i.parentElement&&i.parentElement.classList.remove("en__field__item--hidden"));const s=e.target;s&&s.classList.contains("form-submit")&&(e.preventDefault(),this._form.submitForm())}}class X{constructor(){this.overlay=document.createElement("div"),this._form=d.getInstance(),this._amount=h.getInstance(),this._fees=m.getInstance(),this._frequency=g.getInstance(),this._dataLayer=_e.getInstance(),this.logger=new be("UpsellLightbox","black","pink","πŸͺŸ");let e="EngridUpsell"in window?window.EngridUpsell:{};this.options=Object.assign(Object.assign({},t),e),this.options.disablePaymentMethods.push("applepay"),this.shouldRun()?(this.overlay.id="enModal",this.overlay.classList.add("is-hidden"),this.overlay.classList.add("image-"+this.options.imagePosition),this.renderLightbox(),this._form.onSubmit.subscribe((()=>this.open()))):this.logger.log("Upsell script should NOT run")}renderLightbox(){const e=this.options.title.replace("{new-amount}","").replace("{old-amount}","").replace("{old-frequency}",""),t=this.options.paragraph.replace("{new-amount}","").replace("{old-amount}","").replace("{old-frequency}",""),n=this.options.yesLabel.replace("{new-amount}","").replace("{old-amount}","").replace("{old-frequency}",""),i=this.options.noLabel.replace("{new-amount}","").replace("{old-amount}","").replace("{old-frequency}",""),s=`\n
\n \x3c!-- ideal image size is 480x650 pixels --\x3e\n
\n
\n ${this.options.canClose?'':""}\n

\n ${e}\n

\n ${this.options.otherAmount?`\n
\n
\n

\n ${this.options.otherLabel}\n

\n
\n
\n \n Minimum ${this.getAmountTxt(this.options.minAmount)}\n
\n
\n `:""}\n\n

\n ${t}\n

\n \x3c!-- YES BUTTON --\x3e\n \n \x3c!-- NO BUTTON --\x3e\n
\n \n
\n
\n
\n `;this.overlay.innerHTML=s;const r=this.overlay.querySelector("#goMonthlyClose"),o=this.overlay.querySelector("#upsellYesButton a"),a=this.overlay.querySelector("#upsellNoButton button");o.addEventListener("click",this.continue.bind(this)),a.addEventListener("click",this.continue.bind(this)),r&&r.addEventListener("click",this.close.bind(this)),this.overlay.addEventListener("click",(e=>{e.target instanceof Element&&e.target.id==this.overlay.id&&this.options.canClose&&this.close(e)})),document.addEventListener("keyup",(e=>{"Escape"===e.key&&r&&r.click()})),document.body.appendChild(this.overlay);const l=document.querySelector("#secondOtherField");l&&l.addEventListener("keyup",this.popupOtherField.bind(this)),this.logger.log("Upsell script rendered")}shouldRun(){return!this.shouldSkip()&&"EngridUpsell"in window&&!!window.pageJson&&1==window.pageJson.pageNumber&&["donation","premiumgift"].includes(window.pageJson.pageType)}shouldSkip(){return!(!("EngridUpsell"in window)||!window.EngridUpsell.skipUpsell)||this.options.skipUpsell}popupOtherField(){var e,t;const n=parseFloat(null!==(t=null===(e=this.overlay.querySelector("#secondOtherField"))||void 0===e?void 0:e.value)&&void 0!==t?t:""),i=document.querySelectorAll("#upsellYesButton .upsell_suggestion"),s=this.getUpsellAmount();!isNaN(n)&&n>0?this.checkOtherAmount(n):this.checkOtherAmount(s),i.forEach((e=>e.innerHTML=this.getAmountTxt(s+this._fees.calculateFees(s))))}liveAmounts(){const e=document.querySelectorAll(".upsell_suggestion"),t=document.querySelectorAll(".upsell_amount"),n=this.getUpsellAmount(),i=n+this._fees.calculateFees(n);e.forEach((e=>e.innerHTML=this.getAmountTxt(i))),t.forEach((e=>e.innerHTML=this.getAmountTxt(this._amount.amount+this._fees.fee)))}liveFrequency(){document.querySelectorAll(".upsell_frequency").forEach((e=>e.innerHTML=this.getFrequencyTxt()))}getUpsellAmount(){var e,t;const n=this._amount.amount,i=parseFloat(null!==(t=null===(e=this.overlay.querySelector("#secondOtherField"))||void 0===e?void 0:e.value)&&void 0!==t?t:"");if(i>0)return i>this.options.minAmount?i:this.options.minAmount;let s=0;for(let e=0;ethis.options.minAmount?s:this.options.minAmount}shouldOpen(){const e=this.getUpsellAmount(),t=p.getFieldValue("transaction.paymenttype")||"";return!(!this.freqAllowed()||this.shouldSkip()||this.options.disablePaymentMethods.includes(t.toLowerCase())||this.overlay.classList.contains("is-submitting")||!(e>0))&&(this.logger.log("Upsell Frequency "+this._frequency.frequency),this.logger.log("Upsell Amount "+this._amount.amount),this.logger.log("Upsell Suggested Amount "+e),!0)}freqAllowed(){const e=this._frequency.frequency,t=[];return this.options.oneTime&&t.push("onetime"),this.options.annual&&t.push("annual"),t.includes(e)}open(){if(this.logger.log("Upsell script opened"),!this.shouldOpen()){let e=window.sessionStorage.getItem("original");return e&&document.querySelectorAll(".en__errorList .en__error").length>0&&this.setOriginalAmount(e),this._form.submit=!0,!0}return this.liveAmounts(),this.liveFrequency(),this.overlay.classList.remove("is-hidden"),this._form.submit=!1,p.setBodyData("has-lightbox",""),!1}setOriginalAmount(e){if(this.options.upsellOriginalGiftAmountFieldName){let t=document.querySelector(".en__field__input.en__field__input--hidden[name='"+this.options.upsellOriginalGiftAmountFieldName+"']");if(!t){let e=document.querySelector("form.en__component--page");if(e){let n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",this.options.upsellOriginalGiftAmountFieldName),n.classList.add("en__field__input","en__field__input--hidden"),e.appendChild(n),t=document.querySelector('.en__field__input.en__field__input--hidden[name="'+this.options.upsellOriginalGiftAmountFieldName+'"]')}}t&&(window.sessionStorage.setItem("original",e),t.setAttribute("value",e))}}continue(e){var t;if(e.preventDefault(),e.target instanceof Element&&(null===(t=document.querySelector("#upsellYesButton"))||void 0===t?void 0:t.contains(e.target))){this.logger.success("Upsold"),this.setOriginalAmount(this._amount.amount.toString());const e=this.getUpsellAmount(),t=this._amount.amount;this._frequency.setFrequency("monthly"),this._amount.setAmount(e),this._dataLayer.addEndOfGiftProcessEvent("ENGRID_UPSELL",{eventValue:!0,originalAmount:t,upsoldAmount:e,frequency:"monthly"}),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL",!0),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL_ORIGINAL_AMOUNT",t),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL_DONATION_FREQUENCY","MONTHLY")}else this.setOriginalAmount(""),window.sessionStorage.removeItem("original"),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL",!1),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL_DONATION_FREQUENCY","ONE-TIME");this._form.submitForm()}close(e){e.preventDefault(),this.overlay.classList.add("is-hidden"),p.setBodyData("has-lightbox",!1),this.options.submitOnClose?this._form.submitForm():this._form.dispatchError()}getAmountTxt(e=0){var t,n,i,s;const r=null!==(t=p.getCurrencySymbol())&&void 0!==t?t:"$",o=null!==(n=p.getOption("DecimalSeparator"))&&void 0!==n?n:".",a=null!==(i=p.getOption("ThousandsSeparator"))&&void 0!==i?i:"",l=e%1==0?0:null!==(s=p.getOption("DecimalPlaces"))&&void 0!==s?s:2,c=p.formatNumber(e,l,o,a);return e>0?r+c:""}getFrequencyTxt(){const e={onetime:"one-time",monthly:"monthly",annual:"annual"},t=this._frequency.frequency;return t in e?e[t]:t}checkOtherAmount(e){const t=document.querySelector(".upsellOtherAmountInput");t&&(e>=this.options.minAmount?t.classList.remove("is-invalid"):t.classList.add("is-invalid"))}}class Q{constructor(e,t){this.logger=new be("ShowHideRadioCheckboxes","black","lightblue","πŸ‘"),this.elements=document.getElementsByName(e),this.classes=t,this.createDataAttributes(),this.hideAll();for(let e=0;e{this.hideAll(),this.show(t)}))}}createDataAttributes(){this.elements.forEach((e=>{if(e instanceof HTMLInputElement){let t=e.value.replace(/\W/g,"");document.querySelectorAll("."+this.classes+t).forEach((e=>{if(e instanceof HTMLElement){const t=e.querySelectorAll("input[type='text'], input[type='number'], input[type='email'], select, textarea");t.length>0&&t.forEach((e=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)&&(e.hasAttribute("data-original-value")||e.setAttribute("data-original-value",e.value),e.hasAttribute("data-value")||e.setAttribute("data-value",e.value))}))}}))}}))}hideAll(){this.elements.forEach(((e,t)=>{e instanceof HTMLInputElement&&this.hide(e)}))}hide(e){let t=e.value.replace(/\W/g,"");document.querySelectorAll("."+this.classes+t).forEach((e=>{e instanceof HTMLElement&&(this.toggleValue(e,"hide"),e.style.display="none",this.logger.log("Hiding",e))}))}show(e){let t=e.value.replace(/\W/g,"");document.querySelectorAll("."+this.classes+t).forEach((e=>{e instanceof HTMLElement&&(this.toggleValue(e,"show"),e.style.display="",this.logger.log("Showing",e))})),"checkbox"!=e.type||e.checked||this.hide(e)}toggleValue(e,t){if("hide"==t&&!p.isVisible(e))return;this.logger.log(`toggleValue: ${t}`);const n=e.querySelectorAll("input[type='text'], input[type='number'], input[type='email'], select, textarea");n.length>0&&n.forEach((e=>{var n;if((e instanceof HTMLInputElement||e instanceof HTMLSelectElement)&&e.name){const i=p.getFieldValue(e.name),s=e.getAttribute("data-original-value"),r=null!==(n=e.getAttribute("data-value"))&&void 0!==n?n:"";"hide"===t?(e.setAttribute("data-value",i),p.setFieldValue(e.name,s)):p.setFieldValue(e.name,r)}}))}}function Z(e,t){if(!t)return"";let n="; "+e;return!0===t?n:n+"="+t}function ee(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){let t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return Z("Expires",e.expires?e.expires.toUTCString():"")+Z("Domain",e.domain)+Z("Path",e.path)+Z("Secure",e.secure)+Z("SameSite",e.sameSite)}(n)}function te(){return function(e){let t={},n=e?e.split("; "):[],i=/(%[\dA-F]{2})+/gi;for(let e=0;e{e.addEventListener("change",this.translateFields.bind(this,e.name)),e.value&&(t[e.name]=e.value);const n=document.querySelector(`select[name="${this.countryToStateFields[e.name]}"]`);n&&(n.addEventListener("change",this.rememberState.bind(this,e.name)),n.value&&(t[n.name]=n.value))})),this.translateFields("supporter.country");if(!!(!p.checkNested(window.EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")||!window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()))for(let e in t)p.setFieldValue(e,t[e],!1)}}translateFields(e="supporter.country"){this.resetTranslatedFields();const t=p.getFieldValue(e);if(this.setStateField(t,this.countryToStateFields[e]),"supporter.country"===e){t in this.options&&this.options[t].forEach((e=>{this.translateField(e.field,e.translation)}));const e=document.querySelectorAll(".recipient-block");if(e.length)switch(t){case"FR":case"FRA":case"France":e.forEach((e=>e.innerHTML="Γ€:"));break;case"DE":case"DEU":case"Germany":e.forEach((e=>e.innerHTML="Zu:"));break;case"NL":case"NLD":case"Netherlands":e.forEach((e=>e.innerHTML="Aan:"))}}}translateField(e,t){const n=document.querySelector(`[name="${e}"]`);if(n){const e=n.closest(".en__field");if(e){const i=e.querySelector(".en__field__label"),s=i.querySelector(".engrid-simple-country");let r=s?s.cloneNode(!0):null;n instanceof HTMLInputElement&&""!=n.placeholder&&(i&&i.innerHTML!=n.placeholder||(n.dataset.original=n.placeholder,n.placeholder=t)),i&&(i.dataset.original=i.innerHTML,i.innerHTML=t,r&&i.appendChild(r))}}}resetTranslatedFields(){document.querySelectorAll("[data-original]").forEach((e=>{if(e instanceof HTMLInputElement&&e.dataset.original)e.placeholder=e.dataset.original;else{const t=e.querySelector(".engrid-simple-country");let n=t?t.cloneNode(!0):null;e.innerHTML=e.dataset.original,n&&e.appendChild(n)}e.removeAttribute("data-original")}))}setStateField(e,t){switch(e){case"ES":case"ESP":case"Spain":this.setStateValues(t,"Provincia",null);break;case"BR":case"BRA":case"Brazil":this.setStateValues(t,"Estado",null);break;case"FR":case"FRA":case"France":this.setStateValues(t,"RΓ©gion",null);break;case"GB":case"GBR":case"United Kingdom":this.setStateValues(t,"State/Region",null);break;case"DE":case"DEU":case"Germany":this.setStateValues(t,"Bundesland",null);break;case"NL":case"NLD":case"Netherlands":this.setStateValues(t,"Provincie",null);break;case"AU":case"AUS":this.setStateValues(t,"Province / State",[{label:"Select",value:""},{label:"New South Wales",value:"NSW"},{label:"Victoria",value:"VIC"},{label:"Queensland",value:"QLD"},{label:"South Australia",value:"SA"},{label:"Western Australia",value:"WA"},{label:"Tasmania",value:"TAS"},{label:"Northern Territory",value:"NT"},{label:"Australian Capital Territory",value:"ACT"}]);break;case"Australia":this.setStateValues(t,"Province / State",[{label:"Select",value:""},{label:"New South Wales",value:"New South Wales"},{label:"Victoria",value:"Victoria"},{label:"Queensland",value:"Queensland"},{label:"South Australia",value:"South Australia"},{label:"Western Australia",value:"Western Australia"},{label:"Tasmania",value:"Tasmania"},{label:"Northern Territory",value:"Northern Territory"},{label:"Australian Capital Territory",value:"Australian Capital Territory"}]);break;case"US":case"USA":this.setStateValues(t,"State",[{label:"Select State",value:""},{label:"Alabama",value:"AL"},{label:"Alaska",value:"AK"},{label:"Arizona",value:"AZ"},{label:"Arkansas",value:"AR"},{label:"California",value:"CA"},{label:"Colorado",value:"CO"},{label:"Connecticut",value:"CT"},{label:"Delaware",value:"DE"},{label:"District of Columbia",value:"DC"},{label:"Florida",value:"FL"},{label:"Georgia",value:"GA"},{label:"Hawaii",value:"HI"},{label:"Idaho",value:"ID"},{label:"Illinois",value:"IL"},{label:"Indiana",value:"IN"},{label:"Iowa",value:"IA"},{label:"Kansas",value:"KS"},{label:"Kentucky",value:"KY"},{label:"Louisiana",value:"LA"},{label:"Maine",value:"ME"},{label:"Maryland",value:"MD"},{label:"Massachusetts",value:"MA"},{label:"Michigan",value:"MI"},{label:"Minnesota",value:"MN"},{label:"Mississippi",value:"MS"},{label:"Missouri",value:"MO"},{label:"Montana",value:"MT"},{label:"Nebraska",value:"NE"},{label:"Nevada",value:"NV"},{label:"New Hampshire",value:"NH"},{label:"New Jersey",value:"NJ"},{label:"New Mexico",value:"NM"},{label:"New York",value:"NY"},{label:"North Carolina",value:"NC"},{label:"North Dakota",value:"ND"},{label:"Ohio",value:"OH"},{label:"Oklahoma",value:"OK"},{label:"Oregon",value:"OR"},{label:"Pennsylvania",value:"PA"},{label:"Rhode Island",value:"RI"},{label:"South Carolina",value:"SC"},{label:"South Dakota",value:"SD"},{label:"Tennessee",value:"TN"},{label:"Texas",value:"TX"},{label:"Utah",value:"UT"},{label:"Vermont",value:"VT"},{label:"Virginia",value:"VA"},{label:"Washington",value:"WA"},{label:"West Virginia",value:"WV"},{label:"Wisconsin",value:"WI"},{label:"Wyoming",value:"WY"},{label:"── US Territories ──",value:"",disabled:!0},{label:"American Samoa",value:"AS"},{label:"Guam",value:"GU"},{label:"Northern Mariana Islands",value:"MP"},{label:"Puerto Rico",value:"PR"},{label:"US Minor Outlying Islands",value:"UM"},{label:"Virgin Islands",value:"VI"},{label:"── Armed Forces ──",value:"",disabled:!0},{label:"Armed Forces Americas",value:"AA"},{label:"Armed Forces Africa",value:"AE"},{label:"Armed Forces Canada",value:"AE"},{label:"Armed Forces Europe",value:"AE"},{label:"Armed Forces Middle East",value:"AE"},{label:"Armed Forces Pacific",value:"AP"}]);break;case"United States":this.setStateValues(t,"State",[{label:"Select State",value:""},{label:"Alabama",value:"Alabama"},{label:"Alaska",value:"Alaska"},{label:"Arizona",value:"Arizona"},{label:"Arkansas",value:"Arkansas"},{label:"California",value:"California"},{label:"Colorado",value:"Colorado"},{label:"Connecticut",value:"Connecticut"},{label:"Delaware",value:"Delaware"},{label:"District of Columbia",value:"District of Columbia"},{label:"Florida",value:"Florida"},{label:"Georgia",value:"Georgia"},{label:"Hawaii",value:"Hawaii"},{label:"Idaho",value:"Idaho"},{label:"Illinois",value:"Illinois"},{label:"Indiana",value:"Indiana"},{label:"Iowa",value:"Iowa"},{label:"Kansas",value:"Kansas"},{label:"Kentucky",value:"Kentucky"},{label:"Louisiana",value:"Louisiana"},{label:"Maine",value:"Maine"},{label:"Maryland",value:"Maryland"},{label:"Massachusetts",value:"Massachusetts"},{label:"Michigan",value:"Michigan"},{label:"Minnesota",value:"Minnesota"},{label:"Mississippi",value:"Mississippi"},{label:"Missouri",value:"Missouri"},{label:"Montana",value:"Montana"},{label:"Nebraska",value:"Nebraska"},{label:"Nevada",value:"Nevada"},{label:"New Hampshire",value:"New Hampshire"},{label:"New Jersey",value:"New Jersey"},{label:"New Mexico",value:"New Mexico"},{label:"New York",value:"New York"},{label:"North Carolina",value:"North Carolina"},{label:"North Dakota",value:"North Dakota"},{label:"Ohio",value:"Ohio"},{label:"Oklahoma",value:"Oklahoma"},{label:"Oregon",value:"Oregon"},{label:"Pennsylvania",value:"Pennsylvania"},{label:"Rhode Island",value:"Rhode Island"},{label:"South Carolina",value:"South Carolina"},{label:"South Dakota",value:"South Dakota"},{label:"Tennessee",value:"Tennessee"},{label:"Texas",value:"Texas"},{label:"Utah",value:"Utah"},{label:"Vermont",value:"Vermont"},{label:"Virginia",value:"Virginia"},{label:"Washington",value:"Washington"},{label:"West Virginia",value:"West Virginia"},{label:"Wisconsin",value:"Wisconsin"},{label:"Wyoming",value:"Wyoming"},{label:"── US Territories ──",value:"",disabled:!0},{label:"American Samoa",value:"American Samoa"},{label:"Guam",value:"Guam"},{label:"Northern Mariana Islands",value:"Northern Mariana Islands"},{label:"Puerto Rico",value:"Puerto Rico"},{label:"US Minor Outlying Islands",value:"US Minor Outlying Islands"},{label:"Virgin Islands",value:"Virgin Islands"},{label:"── Armed Forces ──",value:"",disabled:!0},{label:"Armed Forces Americas",value:"Armed Forces Americas"},{label:"Armed Forces Africa",value:"Armed Forces Africa"},{label:"Armed Forces Canada",value:"Armed Forces Canada"},{label:"Armed Forces Europe",value:"Armed Forces Europe"},{label:"Armed Forces Middle East",value:"Armed Forces Middle East"},{label:"Armed Forces Pacific",value:"Armed Forces Pacific"}]);break;case"CA":case"CAN":this.setStateValues(t,"Province / Territory",[{label:"Select",value:""},{label:"Alberta",value:"AB"},{label:"British Columbia",value:"BC"},{label:"Manitoba",value:"MB"},{label:"New Brunswick",value:"NB"},{label:"Newfoundland and Labrador",value:"NL"},{label:"Northwest Territories",value:"NT"},{label:"Nova Scotia",value:"NS"},{label:"Nunavut",value:"NU"},{label:"Ontario",value:"ON"},{label:"Prince Edward Island",value:"PE"},{label:"Quebec",value:"QC"},{label:"Saskatchewan",value:"SK"},{label:"Yukon",value:"YT"}]);break;case"Canada":this.setStateValues(t,"Province / Territory",[{label:"Select",value:""},{label:"Alberta",value:"Alberta"},{label:"British Columbia",value:"British Columbia"},{label:"Manitoba",value:"Manitoba"},{label:"New Brunswick",value:"New Brunswick"},{label:"Newfoundland and Labrador",value:"Newfoundland and Labrador"},{label:"Northwest Territories",value:"Northwest Territories"},{label:"Nova Scotia",value:"Nova Scotia"},{label:"Nunavut",value:"Nunavut"},{label:"Ontario",value:"Ontario"},{label:"Prince Edward Island",value:"Prince Edward Island"},{label:"Quebec",value:"Quebec"},{label:"Saskatchewan",value:"Saskatchewan"},{label:"Yukon",value:"Yukon"}]);break;case"MX":case"MEX":this.setStateValues(t,"Estado",[{label:"Seleccione Estado",value:""},{label:"Aguascalientes",value:"AGU"},{label:"Baja California",value:"BCN"},{label:"Baja California Sur",value:"BCS"},{label:"Campeche",value:"CAM"},{label:"Chiapas",value:"CHP"},{label:"Ciudad de Mexico",value:"CMX"},{label:"Chihuahua",value:"CHH"},{label:"Coahuila",value:"COA"},{label:"Colima",value:"COL"},{label:"Durango",value:"DUR"},{label:"Guanajuato",value:"GUA"},{label:"Guerrero",value:"GRO"},{label:"Hidalgo",value:"HID"},{label:"Jalisco",value:"JAL"},{label:"Michoacan",value:"MIC"},{label:"Morelos",value:"MOR"},{label:"Nayarit",value:"NAY"},{label:"Nuevo Leon",value:"NLE"},{label:"Oaxaca",value:"OAX"},{label:"Puebla",value:"PUE"},{label:"Queretaro",value:"QUE"},{label:"Quintana Roo",value:"ROO"},{label:"San Luis Potosi",value:"SLP"},{label:"Sinaloa",value:"SIN"},{label:"Sonora",value:"SON"},{label:"Tabasco",value:"TAB"},{label:"Tamaulipas",value:"TAM"},{label:"Tlaxcala",value:"TLA"},{label:"Veracruz",value:"VER"},{label:"Yucatan",value:"YUC"},{label:"Zacatecas",value:"ZAC"}]);break;case"Mexico":this.setStateValues(t,"Estado",[{label:"Seleccione Estado",value:""},{label:"Aguascalientes",value:"Aguascalientes"},{label:"Baja California",value:"Baja California"},{label:"Baja California Sur",value:"Baja California Sur"},{label:"Campeche",value:"Campeche"},{label:"Chiapas",value:"Chiapas"},{label:"Ciudad de Mexico",value:"Ciudad de Mexico"},{label:"Chihuahua",value:"Chihuahua"},{label:"Coahuila",value:"Coahuila"},{label:"Colima",value:"Colima"},{label:"Durango",value:"Durango"},{label:"Guanajuato",value:"Guanajuato"},{label:"Guerrero",value:"Guerrero"},{label:"Hidalgo",value:"Hidalgo"},{label:"Jalisco",value:"Jalisco"},{label:"Michoacan",value:"Michoacan"},{label:"Morelos",value:"Morelos"},{label:"Nayarit",value:"Nayarit"},{label:"Nuevo Leon",value:"Nuevo Leon"},{label:"Oaxaca",value:"Oaxaca"},{label:"Puebla",value:"Puebla"},{label:"Queretaro",value:"Queretaro"},{label:"Quintana Roo",value:"Quintana Roo"},{label:"San Luis Potosi",value:"San Luis Potosi"},{label:"Sinaloa",value:"Sinaloa"},{label:"Sonora",value:"Sonora"},{label:"Tabasco",value:"Tabasco"},{label:"Tamaulipas",value:"Tamaulipas"},{label:"Tlaxcala",value:"Tlaxcala"},{label:"Veracruz",value:"Veracruz"},{label:"Yucatan",value:"Yucatan"},{label:"Zacatecas",value:"Zacatecas"}]);break;default:this.setStateValues(t,"Province / State",null)}}setStateValues(e,t,n){const i=p.getField(e),s=i?i.closest(".en__field"):null;if(s){const i=s.querySelector(".en__field__label"),r=s.querySelector(".en__field__element");if(i&&(i.innerHTML=t),r){const i=ne(`engrid-state-${e}`);if(null==n?void 0:n.length){const t=document.createElement("select");t.name=e,t.id="en__field_"+e.toLowerCase().replace(".","_"),t.classList.add("en__field__input"),t.classList.add("en__field__input--select"),t.autocomplete="address-level1";let s=!1;n.forEach((e=>{const n=document.createElement("option");n.value=e.value,n.innerHTML=e.label,i!==e.value||s||(n.selected=!0,s=!0),e.disabled&&(n.disabled=!0),t.appendChild(n)})),r.innerHTML="",r.appendChild(t),t.addEventListener("change",this.rememberState.bind(this,e)),t.dispatchEvent(new Event("change",{bubbles:!0}))}else{r.innerHTML="";const n=document.createElement("input");n.type="text",n.name=e,n.placeholder=t,n.id="en__field_"+e.toLowerCase().replace(".","_"),n.classList.add("en__field__input"),n.classList.add("en__field__input--text"),n.autocomplete="address-level1",i&&(n.value=i),r.appendChild(n),n.addEventListener("change",this.rememberState.bind(this,e))}}}}rememberState(e){const t=p.getField(e);t&&ie(`engrid-state-${t.name}`,t.value,{expires:1,sameSite:"none",secure:!0})}}class re{constructor(){this._countryEvent=b.getInstance(),this.countryWrapper=document.querySelector(".simple_country_select"),this.countrySelect=this._countryEvent.countryField,this.country=null;const e=ne("engrid-autofill"),t=!(!p.checkNested(window.EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")||!window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()),n=!!p.checkNested(window.Intl,"DisplayNames"),i=p.getUrlParameter("supporter.country")||p.getUrlParameter("supporter.region")||p.getUrlParameter("ea.url.id")&&!p.getUrlParameter("forwarded");e||t||!n||i?this.init():fetch(`https://${window.location.hostname}/cdn-cgi/trace`).then((e=>e.text())).then((e=>{let t=e.replace(/[\r\n]+/g,'","').replace(/\=+/g,'":"');t='{"'+t.slice(0,t.lastIndexOf('","'))+'"}';const n=JSON.parse(t);this.country=n.loc,this.init()}))}init(){if(this.countrySelect&&this.country){const e=new Intl.DisplayNames(["en"],{type:"region"});this.setCountryByName(e.of(this.country))}}setCountryByName(e){if(this.countrySelect){let t=this.countrySelect.options;for(let n=0;n'),this.insertSkipLinkSpan()):t&&t.parentElement?(t.parentElement.insertAdjacentHTML("beforebegin",''),this.insertSkipLinkSpan()):n&&n.parentElement?(n.parentElement.insertAdjacentHTML("beforebegin",''),this.insertSkipLinkSpan()):i&&i.parentElement?(i.parentElement.insertAdjacentHTML("beforebegin",''),this.insertSkipLinkSpan()):p.debug&&console.log("This page contains no or <h1> and a 'Skip to main content' link was not added")}insertSkipLinkSpan(){document.body.insertAdjacentHTML("afterbegin",'<a class="skip-link" href="#skip-link">Skip to main content</a>')}}class ae{constructor(){this.imgSrcDefer=document.querySelectorAll("img[data-src]"),this.videoBackground=document.querySelectorAll("video"),this.videoBackgroundSource=document.querySelectorAll("video source");for(let e=0;e<this.imgSrcDefer.length;e++){let t=this.imgSrcDefer[e];if(t){t.setAttribute("decoding","async"),t.setAttribute("loading","lazy");let e=t.getAttribute("data-src");e&&t.setAttribute("src",e),t.setAttribute("data-engrid-data-src-processed","true"),t.removeAttribute("data-src")}}for(let e=0;e<this.videoBackground.length;e++){let t=this.videoBackground[e];if(this.videoBackgroundSource=t.querySelectorAll("source"),this.videoBackgroundSource){for(let e=0;e<this.videoBackgroundSource.length;e++){let t=this.videoBackgroundSource[e];if(t){let e=t.getAttribute("data-src");e&&(t.setAttribute("src",e),t.setAttribute("data-engrid-data-src-processed","true"),t.removeAttribute("data-src"))}}let e=t.parentNode,n=t;e&&n&&(e.replaceChild(n,t),t.muted=!0,t.controls=!1,t.loop=!0,t.playsInline=!0,t.play())}}}}class le{constructor(){this._frequency=g.getInstance(),this._amount=h.getInstance(),this.linkClass="setRecurrFreq-",this.checkboxName="engrid.recurrfreq",document.querySelectorAll(`a[class^="${this.linkClass}"]`).forEach((e=>{e.addEventListener("click",(t=>{const n=e.className.split(" ").filter((e=>e.startsWith(this.linkClass)));p.debug&&console.log(n),n.length&&(t.preventDefault(),p.setFieldValue("transaction.recurrfreq",n[0].substring(this.linkClass.length).toUpperCase()),this._frequency.load())}))}));const e=p.getFieldValue("transaction.recurrfreq").toUpperCase();document.getElementsByName(this.checkboxName).forEach((t=>{const n=t.value.toUpperCase();t.checked=n===e,t.addEventListener("change",(()=>{const e=t.value.toUpperCase();t.checked?(p.setFieldValue("transaction.recurrfreq",e),p.setFieldValue("transaction.recurrpay","Y"),this._frequency.load(),this._amount.setAmount(this._amount.amount,!1)):"ONETIME"!==e&&(p.setFieldValue("transaction.recurrfreq","ONETIME"),p.setFieldValue("transaction.recurrpay","N"),this._frequency.load(),this._amount.setAmount(this._amount.amount,!1))}))})),this._frequency.onFrequencyChange.subscribe((()=>{const e=this._frequency.frequency.toUpperCase();document.getElementsByName(this.checkboxName).forEach((t=>{const n=t.value.toUpperCase();t.checked&&n!==e?t.checked=!1:t.checked||n!==e||(t.checked=!0)}))}))}}class ce{constructor(){if(this.pageBackground=document.querySelector(".page-backgroundImage"),this.pageBackground){const e=this.pageBackground.querySelector("img");let t=null==e?void 0:e.getAttribute("data-src"),n=null==e?void 0:e.src;this.pageBackground&&t?(p.debug&&console.log("A background image set in the page was found with a data-src value, setting it as --engrid__page-backgroundImage_url",t),t="url('"+t+"')",this.pageBackground.style.setProperty("--engrid__page-backgroundImage_url",t)):this.pageBackground&&n?(p.debug&&console.log("A background image set in the page was found with a src value, setting it as --engrid__page-backgroundImage_url",n),n="url('"+n+"')",this.pageBackground.style.setProperty("--engrid__page-backgroundImage_url",n)):e?p.debug&&console.log("A background image set in the page was found but without a data-src or src value, no action taken",e):p.debug&&console.log("A background image set in the page was not found, any default image set in the theme on --engrid__page-backgroundImage_url will be used")}else p.debug&&console.log("A background image set in the page was not found, any default image set in the theme on --engrid__page-backgroundImage_url will be used");this.setDataAttributes()}setDataAttributes(){return this.hasVideoBackground()?p.setBodyData("page-background","video"):this.hasImageBackground()?p.setBodyData("page-background","image"):p.setBodyData("page-background","empty")}hasVideoBackground(){if(this.pageBackground)return!!this.pageBackground.querySelector("video")}hasImageBackground(){if(this.pageBackground)return!this.hasVideoBackground()&&!!this.pageBackground.querySelector("img")}}class ue{constructor(e,t=null,n=null,i){this.apiKey=e,this.dateField=t,this.statusField=n,this.dateFormat=i,this.form=d.getInstance(),this.emailField=null,this.emailWrapper=document.querySelector(".en__field--emailAddress"),this.nbDate=null,this.nbStatus=null,this.logger=new be("NeverBounce","#039bc4","#dfdfdf","πŸ“§"),this.shouldRun=!0,this.nbLoaded=!1,this.emailField=document.getElementById("en__field_supporter_emailAddress"),window._NBSettings={apiKey:this.apiKey,autoFieldHookup:!1,inputLatency:1500,displayPoweredBy:!1,loadingMessage:"Validating...",softRejectMessage:"Invalid email",acceptedMessage:"Email validated!",feedback:!1},p.loadJS("https://cdn.neverbounce.com/widget/dist/NeverBounce.js"),this.emailField&&(this.emailField.value&&(this.logger.log("E-mail Field Found"),this.shouldRun=!1),this.emailField.addEventListener("change",(e=>{var t;this.nbLoaded||(this.shouldRun=!0,this.init(),(null===(t=this.emailField)||void 0===t?void 0:t.value)&&setTimeout((function(){window._nb.fields.get(document.querySelector("[data-nb-id]"))[0].forceUpdate()}),100))})),window.setTimeout((()=>{this.emailField&&this.emailField.value&&(this.logger.log("E-mail Filled Programatically"),this.shouldRun=!1),this.init()}),1e3)),this.form.onValidate.subscribe(this.validate.bind(this))}init(){if(!this.shouldRun)return void this.logger.log("Should Not Run");if(this.nbLoaded)return void this.logger.log("Already Loaded");if(this.logger.log("Init Function"),this.dateField&&document.getElementsByName(this.dateField).length&&(this.nbDate=document.querySelector("[name='"+this.dateField+"']")),this.statusField&&document.getElementsByName(this.statusField).length&&(this.nbStatus=document.querySelector("[name='"+this.statusField+"']")),!this.emailField)return void this.logger.log("E-mail Field Not Found");this.wrap(this.emailField,document.createElement("div"));this.emailField.parentNode.id="nb-wrapper";const e=document.createElement("div");e.innerHTML='<div id="nb-feedback" class="en__field__error nb-hidden">Enter a valid email.</div>',this.insertAfter(e,this.emailField);const t=this;document.body.addEventListener("nb:registered",(function(e){const n=document.querySelector('[data-nb-id="'+e.detail.id+'"]');n.addEventListener("nb:loading",(function(e){p.disableSubmit("Validating Your Email")})),n.addEventListener("nb:clear",(function(e){t.setEmailStatus("clear"),p.enableSubmit(),t.nbDate&&(t.nbDate.value=""),t.nbStatus&&(t.nbStatus.value="")})),n.addEventListener("nb:soft-result",(function(e){t.setEmailStatus("soft-result"),t.nbDate&&(t.nbDate.value=""),t.nbStatus&&(t.nbStatus.value=""),p.enableSubmit()})),n.addEventListener("nb:result",(function(e){e.detail.result.is(window._nb.settings.getAcceptedStatusCodes())?(t.setEmailStatus("valid"),t.nbDate&&(t.nbDate.value=p.formatDate(new Date,t.dateFormat)),t.nbStatus&&(t.nbStatus.value=e.detail.result.response.result)):(t.setEmailStatus("invalid"),t.nbDate&&(t.nbDate.value=""),t.nbStatus&&(t.nbStatus.value="")),p.enableSubmit()}))})),window._nb.fields.registerListener(t.emailField,!0),this.nbLoaded=!0}clearStatus(){if(!this.emailField)return void this.logger.log("E-mail Field Not Found");this.emailField.classList.remove("rm-error");const e=document.getElementById("nb-wrapper"),t=document.getElementById("nb-feedback");e.className="",t.className="en__field__error nb-hidden",t.innerHTML="",this.emailWrapper.classList.remove("en__field--validationFailed")}deleteENFieldError(){const e=document.querySelector(".en__field--emailAddress>div.en__field__error");e&&e.remove()}setEmailStatus(e){if(this.logger.log("Status:",e),!this.emailField)return void this.logger.log("E-mail Field Not Found");const t=document.getElementById("nb-wrapper");let n=document.getElementById("nb-feedback");const i="nb-hidden",s="nb-loading",r="rm-error";if(!n){const e=t.querySelector("div");e&&(e.innerHTML='<div id="nb-feedback" class="en__field__error nb-hidden">Enter a valid email.</div>'),n=document.getElementById("nb-feedback")}if("valid"==e)this.clearStatus();else switch(t.classList.remove("nb-success"),t.classList.add("nb-error"),e){case"required":this.deleteENFieldError(),n.innerHTML="A valid email is required",n.classList.remove(s),n.classList.remove(i),this.emailField.classList.add(r);break;case"soft-result":this.emailField.value?(this.deleteENFieldError(),n.innerHTML="Invalid email",n.classList.remove(i),this.emailField.classList.add(r)):this.clearStatus();break;case"invalid":this.deleteENFieldError(),n.innerHTML="Invalid email",n.classList.remove(s),n.classList.remove(i),this.emailField.classList.add(r);break;default:this.clearStatus()}}insertAfter(e,t){var n;null===(n=null==t?void 0:t.parentNode)||void 0===n||n.insertBefore(e,t.nextSibling)}wrap(e,t){var n;null===(n=e.parentNode)||void 0===n||n.insertBefore(t,e),t.appendChild(e)}validate(){var e;if(!this.form.validate)return;const t=p.getFieldValue("nb-result");this.emailField&&this.shouldRun&&this.nbLoaded&&t?(this.nbStatus&&(this.nbStatus.value=t),["catchall","unknown","valid"].includes(t)||(this.setEmailStatus("required"),null===(e=this.emailField)||void 0===e||e.focus(),this.logger.log("NB-Result:",p.getFieldValue("nb-result")),this.form.validate=!1)):this.logger.log("validate(): Should Not Run. Returning true.")}}class de{constructor(){this.form=d.getInstance(),this.emailField=null,this.emailWrapper=document.querySelector(".en__field--emailAddress"),this.faDate=null,this.faStatus=null,this.faMessage=null,this.logger=new be("FreshAddress","#039bc4","#dfdfdf","πŸ“§"),this.shouldRun=!0,this.options=p.getOption("FreshAddress"),!1!==this.options&&window.FreshAddress&&(this.emailField=document.getElementById("en__field_supporter_emailAddress"),this.emailField?(this.createFields(),this.addEventListeners(),window.FreshAddressStatus="idle",this.emailField.value&&(this.logger.log("E-mail Field Found"),this.shouldRun=!1),window.setTimeout((()=>{this.emailField&&this.emailField.value&&(this.logger.log("E-mail Filled Programatically"),this.shouldRun=!1)}),1e3)):this.logger.log("E-mail Field Not Found"))}createFields(){this.options&&(this.options.dateField=this.options.dateField||"fa_date",this.faDate=p.getField(this.options.dateField),this.faDate||(this.logger.log("Date Field Not Found. Creating..."),p.createHiddenInput(this.options.dateField,""),this.faDate=p.getField(this.options.dateField)),this.options.statusField=this.options.statusField||"fa_status",this.faStatus=p.getField(this.options.statusField),this.faStatus||(this.logger.log("Status Field Not Found. Creating..."),p.createHiddenInput(this.options.statusField,""),this.faStatus=p.getField(this.options.statusField)),this.options.messageField=this.options.messageField||"fa_message",this.faMessage=p.getField(this.options.messageField),this.faMessage||(this.logger.log("Message Field Not Found. Creating..."),p.createHiddenInput(this.options.messageField,""),this.faMessage=p.getField(this.options.messageField)))}writeToFields(e,t){this.options&&(this.faDate.value=p.formatDate(new Date,this.options.dateFieldFormat||"yyyy-MM-dd"),this.faStatus.value=e,this.faMessage.value=t,this.emailWrapper.dataset.freshaddressSafetosendstatus=e.toLowerCase())}addEventListeners(){var e;this.options&&(null===(e=this.emailField)||void 0===e||e.addEventListener("change",(()=>{var e,t;if(!this.shouldRun||(null===(e=this.emailField)||void 0===e?void 0:e.value.includes("@4sitestudios.com")))return p.removeError(this.emailWrapper),this.writeToFields("Valid","Skipped"),void this.logger.log("Skipping E-mail Validation");this.logger.log("Validating "+(null===(t=this.emailField)||void 0===t?void 0:t.value)),this.callAPI()})),this.form.onValidate.subscribe(this.validate.bind(this)))}callAPI(){var e;if(!this.options||!window.FreshAddress)return;if(!this.shouldRun)return;window.FreshAddressStatus="validating";const t=null===(e=this.emailField)||void 0===e?void 0:e.value;window.FreshAddress.validateEmail(t,{emps:!1,rtc_timeout:1200}).then((e=>(this.logger.log("Validate API Response",JSON.parse(JSON.stringify(e))),this.validateResponse(e))))}validateResponse(e){var t;if(e.isServiceError())return this.logger.log("Service Error"),this.writeToFields("Service Error",e.getErrorResponse()),!0;e.isValid()?(this.writeToFields("Valid",e.getComment()),p.removeError(this.emailWrapper),e.hasSuggest()&&(p.setError(this.emailWrapper,`Did you mean ${e.getSuggEmail()}?`),this.emailField.value=e.getSuggEmail())):e.isError()?(this.writeToFields("Invalid",e.getErrorResponse()),p.setError(this.emailWrapper,e.getErrorResponse()),null===(t=this.emailField)||void 0===t||t.focus(),e.hasSuggest()&&(p.setError(this.emailWrapper,`Did you mean ${e.getSuggEmail()}?`),this.emailField.value=e.getSuggEmail(),this.writeToFields("Error",e.getErrorResponse()))):e.isWarning()?(this.writeToFields("Invalid",e.getErrorResponse()),p.setError(this.emailWrapper,e.getErrorResponse()),e.hasSuggest()&&(p.setError(this.emailWrapper,`Did you mean ${e.getSuggEmail()}?`),this.emailField.value=e.getSuggEmail(),this.writeToFields("Warning",e.getErrorResponse()))):this.writeToFields("API Error","Unknown Error"),window.FreshAddressStatus="idle",p.enableSubmit()}validate(){var e;if(p.removeError(this.emailWrapper),this.form.validate)if(this.options)if(this.shouldRun){if("validating"!==window.FreshAddressStatus)return"Invalid"===this.faStatus.value?(this.form.validate=!1,window.setTimeout((()=>{p.setError(this.emailWrapper,this.faMessage.value)}),100),null===(e=this.emailField)||void 0===e||e.focus(),p.enableSubmit(),!1):(this.form.validate=!0,!0);{this.logger.log("Waiting for API Response");const e=new Promise(((e,t)=>{setTimeout((()=>{var n;const i=this.faStatus.value;if(""===i||"Invalid"===i)return this.logger.log("Promise Rejected"),null===(n=this.emailField)||void 0===n||n.focus(),void t(!1);this.logger.log("Promise Resolved"),e(!0)}),700)}));this.form.validatePromise=e}}else this.form.validate=!0;else this.form.validate=!0}}class he{constructor(){var e,t;const n=document.querySelector("span[data-engrid-progress-indicator]"),i=p.getPageCount(),s=p.getPageNumber();if(!n||!i||!s)return;let r=null!==(e=n.getAttribute("max"))&&void 0!==e?e:100;"string"==typeof r&&(r=parseInt(r));let o=null!==(t=n.getAttribute("amount"))&&void 0!==t?t:0;"string"==typeof o&&(o=parseInt(o));const a=1===s?0:Math.ceil((s-1)/i*r);let l=1===s?0:Math.ceil(s/i*r);const c=a/100;let u=l/100;if(o&&(l=Math.ceil(o)>Math.ceil(r)?r:o,u=l/100),n.innerHTML=`\n\t\t\t<div class="indicator__wrap">\n\t\t\t\t<span class="indicator__progress" style="transform: scaleX(${c});"></span>\n\t\t\t\t<span class="indicator__percentage">${l}<span class="indicator__percentage-sign">%</span></span>\n\t\t\t</div>`,l!==a){const e=document.querySelector(".indicator__progress");requestAnimationFrame((function(){e.style.transform=`scaleX(${u})`}))}}}const pe=n(3861).ZP;class ge{constructor(e){if(this._form=d.getInstance(),this._events=f.getInstance(),this.iframe=null,this.remoteUrl=e.remoteUrl?e.remoteUrl:null,this.cookieName=e.cookieName?e.cookieName:"engrid-autofill",this.cookieExpirationDays=e.cookieExpirationDays?e.cookieExpirationDays:365,this.rememberMeOptIn=!!e.checked&&e.checked,this.fieldNames=e.fieldNames?e.fieldNames:[],this.fieldDonationAmountRadioName=e.fieldDonationAmountRadioName?e.fieldDonationAmountRadioName:"transaction.donationAmt",this.fieldDonationAmountOtherName=e.fieldDonationAmountOtherName?e.fieldDonationAmountOtherName:"transaction.donationAmt.other",this.fieldDonationRecurrPayRadioName=e.fieldDonationRecurrPayRadioName?e.fieldDonationRecurrPayRadioName:"transaction.recurrpay",this.fieldDonationAmountOtherCheckboxID=e.fieldDonationAmountOtherCheckboxID?e.fieldDonationAmountOtherCheckboxID:"#en__field_transaction_donationAmt4",this.fieldOptInSelectorTarget=e.fieldOptInSelectorTarget?e.fieldOptInSelectorTarget:".en__field--emailAddress.en__field",this.fieldOptInSelectorTargetLocation=e.fieldOptInSelectorTargetLocation?e.fieldOptInSelectorTargetLocation:"after",this.fieldClearSelectorTarget=e.fieldClearSelectorTarget?e.fieldClearSelectorTarget:'label[for="en__field_supporter_firstName"]',this.fieldClearSelectorTargetLocation=e.fieldClearSelectorTargetLocation?e.fieldClearSelectorTargetLocation:"before",this.fieldData={},this.useRemote())this.createIframe((()=>{this.iframe&&this.iframe.contentWindow&&(this.iframe.contentWindow.postMessage(JSON.stringify({key:this.cookieName,operation:"read"}),"*"),this._form.onSubmit.subscribe((()=>{this.rememberMeOptIn&&(this.readFields(),this.saveCookieToRemote())})))}),(e=>{let t;if(e.data&&"string"==typeof e.data&&this.isJson(e.data)&&(t=JSON.parse(e.data)),t&&t.key&&void 0!==t.value&&t.key===this.cookieName){this.updateFieldData(t.value),this.writeFields(),Object.keys(this.fieldData).length>0?this.insertClearRememberMeLink():this.insertRememberMeOptin()}}));else{this.readCookie(),Object.keys(this.fieldData).length>0?(this.insertClearRememberMeLink(),this.rememberMeOptIn=!0):(this.insertRememberMeOptin(),this.rememberMeOptIn=!1),this.writeFields(),this._form.onSubmit.subscribe((()=>{this.rememberMeOptIn&&(this.readFields(),this.saveCookie())}))}}updateFieldData(e){if(e){let t=JSON.parse(e);for(let e=0;e<this.fieldNames.length;e++)void 0!==t[this.fieldNames[e]]&&(this.fieldData[this.fieldNames[e]]=decodeURIComponent(t[this.fieldNames[e]]))}}insertClearRememberMeLink(){if(!document.getElementById("clear-autofill-data")){const e="clear autofill",t=document.createElement("a");t.setAttribute("id","clear-autofill-data"),t.classList.add("label-tooltip"),t.setAttribute("style","cursor: pointer;"),t.innerHTML=`(${e})`;const n=this.getElementByFirstSelector(this.fieldClearSelectorTarget);n&&("after"===this.fieldClearSelectorTargetLocation?n.appendChild(t):n.prepend(t),t.addEventListener("click",(e=>{e.preventDefault(),this.clearFields(["supporter.country"]),this.useRemote()?this.clearCookieOnRemote():this.clearCookie();let t=document.getElementById("clear-autofill-data");t&&(t.style.display="none"),this.rememberMeOptIn=!1,this._events.dispatchClear()})))}this._events.dispatchLoad(!0)}getElementByFirstSelector(e){let t=null;const n=e.split(",");for(let e=0;e<n.length&&(t=document.querySelector(n[e]),!t);e++);return t}insertRememberMeOptin(){let e=document.getElementById("remember-me-opt-in");if(e)this.rememberMeOptIn&&(e.checked=!0);else{const e="Remember Me",t="\n\t\t\t\tCheck β€œRemember me” to complete forms on this device faster. \n\t\t\t\tWhile your financial information won’t be stored, you should only check this box from a personal device. \n\t\t\t\tClick β€œClear autofill” to remove the information from your device at any time.\n\t\t\t",n=this.rememberMeOptIn?"checked":"",i=document.createElement("div");i.classList.add("en__field","en__field--checkbox","en__field--question","rememberme-wrapper"),i.setAttribute("id","remember-me-opt-in"),i.setAttribute("style","overflow-x: hidden;"),i.innerHTML=`\n <div class="en__field__element en__field__element--checkbox">\n <div class="en__field__item">\n <input id="remember-me-checkbox" type="checkbox" class="en__field__input en__field__input--checkbox" ${n} />\n <label for="remember-me-checkbox" class="en__field__label en__field__label--item" style="white-space: nowrap;">\n <div class="rememberme-content" style="display: inline-flex; align-items: center;">\n ${e}\n <a id="rememberme-learn-more-toggle" style="display: inline-block; display: inline-flex; align-items: center; cursor: pointer; margin-left: 10px; margin-top: var(--rememberme-learn-more-toggle_margin-top)">\n <svg style="height: 14px; width: auto; z-index: 1;" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 7H9V5H11V7ZM11 9H9V15H11V9ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C14.41 18 18 14.41 18 10C18 5.59 14.41 2 10 2ZM10 0C15.523 0 20 4.477 20 10C20 15.523 15.523 20 10 20C4.477 20 0 15.523 0 10C0 4.477 4.477 0 10 0Z" fill="currentColor"/></svg>\n </a>\n </div>\n </label>\n </div>\n </div>\n\t\t\t`;const s=this.getElementByFirstSelector(this.fieldOptInSelectorTarget);if(s&&s.parentNode){s.parentNode.insertBefore(i,"before"==this.fieldOptInSelectorTargetLocation?s:s.nextSibling);const e=document.getElementById("remember-me-checkbox");e&&e.addEventListener("change",(()=>{e.checked?this.rememberMeOptIn=!0:this.rememberMeOptIn=!1})),pe("#rememberme-learn-more-toggle",{content:t})}}this._events.dispatchLoad(!1)}useRemote(){return!!this.remoteUrl&&"function"==typeof window.postMessage&&window.JSON&&window.localStorage}createIframe(e,t){if(this.remoteUrl){let n=document.createElement("iframe");n.style.cssText="position:absolute;width:1px;height:1px;left:-9999px;",n.src=this.remoteUrl,n.setAttribute("sandbox","allow-same-origin allow-scripts"),this.iframe=n,document.body.appendChild(this.iframe),this.iframe.addEventListener("load",(()=>e()),!1),window.addEventListener("message",(e=>{var n;(null===(n=this.iframe)||void 0===n?void 0:n.contentWindow)===e.source&&t(e)}),!1)}}clearCookie(){this.fieldData={},this.saveCookie()}clearCookieOnRemote(){this.fieldData={},this.saveCookieToRemote()}saveCookieToRemote(){this.iframe&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage(JSON.stringify({key:this.cookieName,value:this.fieldData,operation:"write",expires:this.cookieExpirationDays}),"*")}readCookie(){this.updateFieldData(ne(this.cookieName)||"")}saveCookie(){ie(this.cookieName,JSON.stringify(this.fieldData),{expires:this.cookieExpirationDays})}readFields(){for(let e=0;e<this.fieldNames.length;e++){let t="[name='"+this.fieldNames[e]+"']",n=document.querySelector(t);if(n)if("INPUT"===n.tagName){let i=n.getAttribute("type");"radio"!==i&&"checkbox"!==i||(n=document.querySelector(t+":checked")),this.fieldData[this.fieldNames[e]]=encodeURIComponent(n.value)}else"SELECT"===n.tagName&&(this.fieldData[this.fieldNames[e]]=encodeURIComponent(n.value))}}setFieldValue(e,t,n=!1){e&&void 0!==t&&(e.value&&n||!e.value)&&(e.value=t)}clearFields(e){for(let t in this.fieldData)e.includes(t)||""===this.fieldData[t]?delete this.fieldData[t]:this.fieldData[t]="";this.writeFields(!0)}writeFields(e=!1){for(let t=0;t<this.fieldNames.length;t++){let n="[name='"+this.fieldNames[t]+"']",i=document.querySelector(n);i&&("INPUT"===i.tagName?this.fieldNames[t]===this.fieldDonationRecurrPayRadioName?"Y"===this.fieldData[this.fieldNames[t]]&&i.click():this.fieldDonationAmountRadioName===this.fieldNames[t]?(i=document.querySelector(n+"[value='"+this.fieldData[this.fieldNames[t]]+"']"),i?i.click():(i=document.querySelector("input[name='"+this.fieldDonationAmountOtherName+"']"),this.setFieldValue(i,this.fieldData[this.fieldNames[t]],!0))):this.setFieldValue(i,this.fieldData[this.fieldNames[t]],e):"SELECT"===i.tagName&&this.setFieldValue(i,this.fieldData[this.fieldNames[t]],!0))}}isJson(e){try{JSON.parse(e)}catch(e){return!1}return!0}}class me{constructor(){if(this._amount=h.getInstance(),this.logger=new be("ShowIfAmount","yellow","black","πŸ‘€"),this._elements=document.querySelectorAll('[class*="showifamount"]'),this._elements.length>0)return this._amount.onAmountChange.subscribe((()=>this.init())),void this.init();this.logger.log("Show If Amount: NO ELEMENTS FOUND")}init(){const e=p.getGiftProcess()?window.pageJson.amount:this._amount.amount;this._elements.forEach((t=>{this.lessthan(e,t),this.lessthanorequalto(e,t),this.equalto(e,t),this.greaterthanorequalto(e,t),this.greaterthan(e,t),this.between(e,t)}))}getClassNameByOperand(e,t){let n=null;return e.forEach((e=>{e.includes(`showifamount-${t}-`)&&(n=e)})),n}lessthan(e,t){const n=this.getClassNameByOperand(t.classList,"lessthan");if(n){let i=n.split("-").slice(-1)[0];e<Number(i)?(this.logger.log("(lessthan):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}lessthanorequalto(e,t){const n=this.getClassNameByOperand(t.classList,"lessthanorequalto");if(n){let i=n.split("-").slice(-1)[0];e<=Number(i)?(this.logger.log("(lessthanorequalto):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}equalto(e,t){const n=this.getClassNameByOperand(t.classList,"equalto");if(n){let i=n.split("-").slice(-1)[0];e==Number(i)?(this.logger.log("(equalto):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}greaterthanorequalto(e,t){const n=this.getClassNameByOperand(t.classList,"greaterthanorequalto");if(n){let i=n.split("-").slice(-1)[0];e>=Number(i)?(this.logger.log("(greaterthanorequalto):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}greaterthan(e,t){const n=this.getClassNameByOperand(t.classList,"greaterthan");if(n){let i=n.split("-").slice(-1)[0];e>Number(i)?(this.logger.log("(greaterthan):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}between(e,t){const n=this.getClassNameByOperand(t.classList,"between");if(n){let i=n.split("-").slice(-2,-1)[0],s=n.split("-").slice(-1)[0];e>Number(i)&&e<Number(s)?(this.logger.log("(between):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}}class fe{constructor(){this.logger=new be("OtherAmount","green","black","πŸ’°"),this._amount=h.getInstance(),"focusin input".split(" ").forEach((e=>{var t;null===(t=document.querySelector("body"))||void 0===t||t.addEventListener(e,(e=>{e.target.classList.contains("en__field__input--other")&&(this.logger.log("Other Amount Field Focused"),this.setRadioInput())}))}));const e=document.querySelector("[name='transaction.donationAmt.other'");e&&(e.setAttribute("inputmode","decimal"),e.setAttribute("aria-label","Enter your custom donation amount"),e.setAttribute("autocomplete","off"),e.setAttribute("data-lpignore","true"),e.addEventListener("change",(e=>{const t=e.target,n=t.value,i=p.cleanAmount(n);n!==i.toString()&&(this.logger.log(`Other Amount Field Changed: ${n} => ${i}`),"dataLayer"in window&&window.dataLayer.push({event:"otherAmountTransformed",otherAmountTransformation:`${n} => ${i}`}),t.value=i%1!=0?i.toFixed(2):i.toString())})),e.addEventListener("blur",(e=>{const t=e.target.value;if(0===p.cleanAmount(t)){this.logger.log("Other Amount Field Blurred with 0 amount");const e=this._amount.amount;e>0&&this._amount.setAmount(e,!1)}})))}setRadioInput(){const e=document.querySelector(".en__field--donationAmt .en__field__input--other");if(e&&e.parentNode&&e.parentNode.parentNode){const t=e.parentNode;if(t.classList.remove("en__field__item--hidden"),t.parentNode){t.parentNode.querySelector(".en__field__item:nth-last-child(2) input").checked=!0}}}}class be{constructor(e,t,n,i){if(this.prefix="",this.color="black",this.background="white",this.emoji="",i)this.emoji=i;else switch(t){case"red":this.emoji="πŸ”΄";break;case"green":this.emoji="🟒";break;case"blue":this.emoji="πŸ”΅";break;case"yellow":this.emoji="🟑",this.background="black";break;case"purple":this.emoji="🟣";break;default:this.emoji="⚫"}e&&(this.prefix=`[ENgrid ${e}]`),t&&(this.color=t),n&&(this.background=n)}get log(){return p.debug||"log"===p.getUrlParameter("debug")?console.log.bind(window.console,"%c"+this.emoji+" "+this.prefix+" %s",`color: ${this.color}; background-color: ${this.background}; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;`):()=>{}}get success(){return p.debug?console.log.bind(window.console,"%c βœ… "+this.prefix+" %s","color: green; background-color: white; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;"):()=>{}}get danger(){return p.debug?console.log.bind(window.console,"%c ⛔️ "+this.prefix+" %s","color: red; background-color: white; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;"):()=>{}}get warn(){return p.debug?console.warn.bind(window.console,"%c"+this.emoji+" "+this.prefix+" %s",`color: ${this.color}; background-color: ${this.background}; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;`):()=>{}}get dir(){return p.debug?console.dir.bind(window.console,"%c"+this.emoji+" "+this.prefix+" %s",`color: ${this.color}; background-color: ${this.background}; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;`):()=>{}}get error(){return p.debug?console.error.bind(window.console,"%c"+this.emoji+" "+this.prefix+" %s",`color: ${this.color}; background-color: ${this.background}; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;`):()=>{}}}class ve{constructor(){var e,t;this._form=d.getInstance(),this._amount=h.getInstance(),this.minAmount=null!==(e=p.getOption("MinAmount"))&&void 0!==e?e:1,this.maxAmount=null!==(t=p.getOption("MaxAmount"))&&void 0!==t?t:1e5,this.minAmountMessage=p.getOption("MinAmountMessage"),this.maxAmountMessage=p.getOption("MaxAmountMessage"),this.logger=new be("MinMaxAmount","white","purple","πŸ”’"),this.shouldRun()&&(this._amount.onAmountChange.subscribe((e=>window.setTimeout(this.liveValidate.bind(this),1e3))),this._form.onValidate.subscribe(this.enOnValidate.bind(this)))}shouldRun(){return"DONATION"===p.getPageType()}enOnValidate(){if(!this._form.validate)return;const e=document.querySelector("[name='transaction.donationAmt.other']");this._amount.amount<this.minAmount?(this.logger.log("Amount is less than min amount: "+this.minAmount),e&&e.focus(),this._form.validate=!1):this._amount.amount>this.maxAmount&&(this.logger.log("Amount is greater than max amount: "+this.maxAmount),e&&e.focus(),this._form.validate=!1),window.setTimeout(this.liveValidate.bind(this),300)}liveValidate(){const e=p.cleanAmount(this._amount.amount.toString()),t=document.activeElement;t&&"INPUT"===t.tagName&&"name"in t&&"transaction.donationAmt.other"===t.name&&0===e||(this.logger.log(`Amount: ${e}`),e<this.minAmount?(this.logger.log("Amount is less than min amount: "+this.minAmount),p.setError(".en__field--withOther",this.minAmountMessage||"Invalid Amount")):e>this.maxAmount?(this.logger.log("Amount is greater than max amount: "+this.maxAmount),p.setError(".en__field--withOther",this.maxAmountMessage||"Invalid Amount")):p.removeError(".en__field--withOther"))}}class ye{constructor(){if(this.shuffleSeed=n(7650),this.items=[],this.tickerElement=document.querySelector(".engrid-ticker"),this.logger=new be("Ticker","black","beige","πŸ”"),!this.shouldRun())return void this.logger.log("Not running");const e=document.querySelectorAll(".engrid-ticker li");if(e.length>0)for(let t=0;t<e.length;t++)this.items.push(e[t].innerText);this.render()}shouldRun(){return null!==this.tickerElement}getSeed(){return(new Date).getDate()+p.getPageID()}getItems(){const e=this.tickerElement.getAttribute("data-total")||"50";this.logger.log("Getting "+e+" items");const t=this.getSeed(),n=this.shuffleSeed.shuffle(this.items,t),i=new Date,s=i.getHours(),r=i.getMinutes();let o=Math.round((60*s+r)/5);o>=n.length&&(o=0);return n.slice(o,o+e).reverse()}render(){var e,t,n;this.logger.log("Rendering");const i=this.getItems();let s=document.createElement("div");s.classList.add("en__component"),s.classList.add("en__component--ticker");let r='<div class="ticker">';for(let e=0;e<i.length;e++)r+='<div class="ticker__item">'+i[e]+"</div>";r='<div id="engrid-ticker">'+r+"</div></div>",s.innerHTML=r,null===(t=null===(e=this.tickerElement)||void 0===e?void 0:e.parentElement)||void 0===t||t.insertBefore(s,this.tickerElement),null===(n=this.tickerElement)||void 0===n||n.remove();const o=document.querySelector(".ticker").offsetWidth.toString();s.style.setProperty("--ticker-size",o),this.logger.log("Ticker Size: "+s.style.getPropertyValue("--ticker-size")),this.logger.log("Ticker Width: "+o)}}class _e{constructor(){this.logger=new be("DataLayer","#f1e5bc","#009cdc","πŸ“Š"),this.dataLayer=window.dataLayer||[],this._form=d.getInstance(),this.endOfGiftProcessStorageKey="ENGRID_END_OF_GIFT_PROCESS_EVENTS",this.excludedFields=["transaction.ccnumber","transaction.ccexpire.delimiter","transaction.ccexpire","transaction.ccvv","supporter.creditCardHolderName","supporter.bankAccountNumber","supporter.bankAccountType","transaction.bankname","supporter.bankRoutingNumber"],this.hashedFields=["supporter.emailAddress","supporter.phoneNumber","supporter.phoneNumber2","supporter.address1","supporter.address2","supporter.address3","transaction.infemail","transaction.infadd1","transaction.infadd2","transaction.infadd3","supporter.billingAddress1","supporter.billingAddress2","supporter.billingAddress3"],p.getOption("RememberMe")?f.getInstance().onLoad.subscribe((e=>{this.logger.log("Remember me - onLoad",e),this.onLoad()})):this.onLoad(),this._form.onSubmit.subscribe((()=>this.onSubmit()))}static getInstance(){return _e.instance||(_e.instance=new _e,window._dataLayer=_e.instance),_e.instance}transformJSON(e){return"string"==typeof e?e.toUpperCase().split(" ").join("-").replace(":-","-"):"boolean"==typeof e?e=e?"TRUE":"FALSE":""}onLoad(){if(p.getGiftProcess()?(this.logger.log("EN_SUCCESSFUL_DONATION"),this.dataLayer.push({event:"EN_SUCCESSFUL_DONATION"}),this.addEndOfGiftProcessEventsToDataLayer()):(this.logger.log("EN_PAGE_VIEW"),this.dataLayer.push({event:"EN_PAGE_VIEW"})),window.pageJson){const e=window.pageJson;for(const t in e)Number.isNaN(e[t])?(this.dataLayer.push({event:`EN_PAGEJSON_${t.toUpperCase()}-${this.transformJSON(e[t])}`}),this.dataLayer.push({[`'EN_PAGEJSON_${t.toUpperCase()}'`]:this.transformJSON(e[t])})):(this.dataLayer.push({event:`EN_PAGEJSON_${t.toUpperCase()}-${e[t]}`}),this.dataLayer.push({[`'EN_PAGEJSON_${t.toUpperCase()}'`]:e[t]})),this.dataLayer.push({event:"EN_PAGEJSON_"+t.toUpperCase(),eventValue:e[t]});p.getPageCount()===p.getPageNumber()&&(this.dataLayer.push({event:"EN_SUBMISSION_SUCCESS_"+e.pageType.toUpperCase()}),this.dataLayer.push({[`'EN_SUBMISSION_SUCCESS_${e.pageType.toUpperCase()}'`]:"TRUE"}))}if(new URLSearchParams(window.location.search).forEach(((e,t)=>{this.dataLayer.push({event:`EN_URLPARAM_${t.toUpperCase()}-${this.transformJSON(e)}`}),this.dataLayer.push({[`'EN_URLPARAM_${t.toUpperCase()}'`]:this.transformJSON(e)})})),"DONATION"===p.getPageType()){const e=[...document.querySelectorAll('[name="transaction.recurrfreq"]')].map((e=>e.value));this.dataLayer.push({event:"EN_RECURRING_FREQUENCIES","'EN_RECURRING_FREQEUENCIES'":e})}let e=!1;const t=document.querySelector(".en__component--formblock.fast-personal-details");if(t){const n=Je.allMandatoryInputsAreFilled(t),i=Je.someMandatoryInputsAreFilled(t);n?(this.dataLayer.push({event:"EN_FASTFORMFILL_PERSONALINFO_SUCCESS"}),e=!0):i?this.dataLayer.push({event:"EN_FASTFORMFILL_PERSONALINFO_PARTIALSUCCESS"}):this.dataLayer.push({event:"EN_FASTFORMFILL_PERSONALINFO_FAILURE"})}const n=document.querySelector(".en__component--formblock.fast-address-details");if(n){const t=Je.allMandatoryInputsAreFilled(n),i=Je.someMandatoryInputsAreFilled(n);t?(this.dataLayer.push({event:"EN_FASTFORMFILL_ADDRESS_SUCCESS"}),e=!!e):i?this.dataLayer.push({event:"EN_FASTFORMFILL_ADDRESS_PARTIALSUCCESS"}):this.dataLayer.push({event:"EN_FASTFORMFILL_ADDRESS_FAILURE"})}e?this.dataLayer.push({event:"EN_FASTFORMFILL_ALL_SUCCESS"}):this.dataLayer.push({event:"EN_FASTFORMFILL_ALL_FAILURE"}),this.attachEventListeners()}onSubmit(){document.querySelector(".en__field__item:not(.en__field--question) input[name^='supporter.questions'][type='checkbox']:checked")?(this.logger.log("EN_SUBMISSION_WITH_EMAIL_OPTIN"),this.dataLayer.push({event:"EN_SUBMISSION_WITH_EMAIL_OPTIN"})):(this.logger.log("EN_SUBMISSION_WITHOUT_EMAIL_OPTIN"),this.dataLayer.push({event:"EN_SUBMISSION_WITHOUT_EMAIL_OPTIN"}))}attachEventListeners(){document.querySelectorAll(".en__component--advrow input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=hidden]):not([unhidden]), .en__component--advrow textarea").forEach((e=>{e.addEventListener("blur",(e=>{this.handleFieldValueChange(e.target)}))}));document.querySelectorAll(".en__component--advrow input[type=checkbox], .en__component--advrow input[type=radio]").forEach((e=>{e.addEventListener("change",(e=>{this.handleFieldValueChange(e.target)}))}));document.querySelectorAll(".en__component--advrow select").forEach((e=>{e.addEventListener("change",(e=>{this.handleFieldValueChange(e.target)}))}))}handleFieldValueChange(e){var t,n,i;if(""===e.value||this.excludedFields.includes(e.name))return;const s=this.hashedFields.includes(e.name)?this.hash(e.value):e.value;["checkbox","radio"].includes(e.type)?e.checked&&("en__pg"===e.name?this.dataLayer.push({event:"EN_FORM_VALUE_UPDATED",enFieldName:e.name,enFieldLabel:"Premium Gift",enFieldValue:null===(n=null===(t=e.closest(".en__pg__body"))||void 0===t?void 0:t.querySelector(".en__pg__name"))||void 0===n?void 0:n.textContent,enProductId:null===(i=document.querySelector('[name="transaction.selprodvariantid"]'))||void 0===i?void 0:i.value}):this.dataLayer.push({event:"EN_FORM_VALUE_UPDATED",enFieldName:e.name,enFieldLabel:this.getFieldLabel(e),enFieldValue:s})):this.dataLayer.push({event:"EN_FORM_VALUE_UPDATED",enFieldName:e.name,enFieldLabel:this.getFieldLabel(e),enFieldValue:s})}hash(e){return btoa(e)}getFieldLabel(e){var t,n;return(null===(n=null===(t=e.closest(".en__field"))||void 0===t?void 0:t.querySelector("label"))||void 0===n?void 0:n.textContent)||""}addEndOfGiftProcessEvent(e,t={}){this.storeEndOfGiftProcessData(Object.assign({event:e},t))}addEndOfGiftProcessVariable(e,t=""){this.storeEndOfGiftProcessData({[`'${e.toUpperCase()}'`]:t})}storeEndOfGiftProcessData(e){const t=this.getEndOfGiftProcessData();t.push(e),window.sessionStorage.setItem(this.endOfGiftProcessStorageKey,JSON.stringify(t))}addEndOfGiftProcessEventsToDataLayer(){this.getEndOfGiftProcessData().forEach((e=>{this.dataLayer.push(e)})),window.sessionStorage.removeItem(this.endOfGiftProcessStorageKey)}getEndOfGiftProcessData(){let e=window.sessionStorage.getItem(this.endOfGiftProcessStorageKey);return e?JSON.parse(e):[]}}class Se{constructor(){this.logger=new be("DataReplace","#333333","#00f3ff","‡️"),this.enElements=new Array,this.searchElements(),this.shouldRun()&&(this.logger.log("Elements Found:",this.enElements),this.replaceAll())}searchElements(){const e=document.querySelectorAll("\n .en__component--copyblock,\n .en__component--codeblock,\n .en__field\n ");e.length>0&&e.forEach((e=>{e instanceof HTMLElement&&e.innerHTML.includes("{engrid_data~")&&this.enElements.push(e)}))}shouldRun(){return this.enElements.length>0}replaceAll(){const e=/{engrid_data~\[([\w-]+)\]~?\[?(.+?)?\]?}/g;this.enElements.forEach((t=>{const n=t.innerHTML.matchAll(e);for(const e of n)this.replaceItem(t,e)})),p.setBodyData("merge-tags-processed","")}replaceItem(e,[t,n,i]){var s;let r=null!==(s=p.getUrlParameter(`engrid_data[${n}]`))&&void 0!==s?s:i;r="string"==typeof r?r.replace(/\r?\\n|\n|\r/g,"<br>"):"",this.logger.log("Replacing",n,r),e.innerHTML=e.innerHTML.replace(t,r)}}class we{constructor(){this.logger=new be("DataHide","#333333","#f0f0f0","πŸ™ˆ"),this.enElements=new Array,this.logger.log("Constructor"),this.enElements=p.getUrlParameter("engrid_hide[]"),this.enElements&&0!==this.enElements.length?(this.logger.log("Elements Found:",this.enElements),this.hideAll()):this.logger.log("No Elements Found")}hideAll(){this.enElements.forEach((e=>{const t=Object.keys(e)[0],n=Object.values(e)[0];this.hideItem(t,n)}))}hideItem(e,t){const n=[...e.matchAll(/engrid_hide\[([\w-]+)\]/g)].map((e=>e[1]))[0];if("id"===t){const e=document.getElementById(n);e?(this.logger.log("Hiding By ID",n,e),e.setAttribute("hidden-via-url-argument","")):this.logger.error("Element Not Found By ID",n)}else{const e=document.getElementsByClassName(n);if(e.length>0)for(let t=0;t<e.length;t++)this.logger.log("Hiding By Class",n,e[t]),e[t].setAttribute("hidden-via-url-argument","");else this.logger.log("No Elements Found By Class",n)}}}class Ee{constructor(){this.shouldRun()&&this.replaceNameShortcode("#en__field_supporter_firstName","#en__field_supporter_lastName")}shouldRun(){return"EMAILTOTARGET"===p.getPageType()}replaceNameShortcode(e,t){const n=document.querySelector(e),i=document.querySelector(t);let s=document.querySelector('[name="contact.message"]'),r=!1,o=!1;if(s){if(s.value.includes("{user_data~First Name")||s.value.includes("{user_data~Last Name"))return;!s.value.includes("{user_data~First Name")&&n&&n.addEventListener("blur",(e=>{const t=e.target;s&&!r&&(r=!0,s.value=s.value.concat("\n"+t.value))})),!s.value.includes("{user_data~Last Name")&&i&&i.addEventListener("blur",(e=>{const t=e.target;s&&!o&&(o=!0,s.value=s.value.concat(" "+t.value))}))}}}class Ce{constructor(){if(this._form=d.getInstance(),this.logger=new be("ExpandRegionName","#333333","#00eb65","🌍"),this.shouldRun()){const e=p.getOption("RegionLongFormat");console.log("expandedRegionField",e);document.querySelector(`[name="${e}"]`)||(this.logger.log(`CREATED field ${e}`),p.createHiddenInput(e)),this._form.onSubmit.subscribe((()=>this.expandRegion()))}}shouldRun(){return!!p.getOption("RegionLongFormat")}expandRegion(){const e=document.querySelector('[name="supporter.region"]'),t=p.getOption("RegionLongFormat"),n=document.querySelector(`[name="${t}"]`);if(e){if("SELECT"===e.tagName&&"options"in e){const t=e.options[e.selectedIndex].innerText;n.value=t,this.logger.log("Populated field",n.value)}else if("INPUT"===e.tagName){const t=e.value;n.value=t,this.logger.log("Populated field",n.value)}return!0}this.logger.log("No region field to populate the hidden region field with")}}class Ae{constructor(){this.logger=new be("UrlToForm","white","magenta","πŸ”—"),this.urlParams=new URLSearchParams(document.location.search),this.shouldRun()&&this.urlParams.forEach(((e,t)=>{const n=document.getElementsByName(t)[0];n&&(["text","textarea"].includes(n.type)&&n.value||(p.setFieldValue(t,e),this.logger.log(`Set: ${t} to ${e}`)))}))}shouldRun(){return!!document.location.search&&this.hasFields()}hasFields(){return[...this.urlParams.keys()].map((e=>document.getElementsByName(e).length>0)).includes(!0)}}class Le{constructor(){this.logger=new be("RequiredIfVisible","#FFFFFF","#811212","πŸš₯"),this._form=d.getInstance(),this.requiredIfVisibleElements=document.querySelectorAll("\n .i-required .en__field,\n .i1-required .en__field:nth-of-type(1),\n .i2-required .en__field:nth-of-type(2),\n .i3-required .en__field:nth-of-type(3),\n .i4-required .en__field:nth-of-type(4),\n .i5-required .en__field:nth-of-type(5),\n .i6-required .en__field:nth-of-type(6),\n .i7-required .en__field:nth-of-type(7),\n .i8-required .en__field:nth-of-type(8),\n .i9-required .en__field:nth-of-type(9),\n .i10-required .en__field:nth-of-type(10),\n .i11-required .en__field:nth-of-type(11)\n "),this.shouldRun()&&this._form.onValidate.subscribe(this.validate.bind(this))}shouldRun(){return this.requiredIfVisibleElements.length>0}validate(){Array.from(this.requiredIfVisibleElements).reverse().forEach((e=>{if(p.removeError(e),p.isVisible(e)){this.logger.log(`${e.getAttribute("class")} is visible`);const t=e.querySelector("input:not([type=hidden]) , select, textarea");if(t&&null===t.closest("[data-unhidden]")&&!p.getFieldValue(t.getAttribute("name"))){const n=e.querySelector(".en__field__label");n?(this.logger.log(`${n.innerText} is required`),window.setTimeout((()=>{p.setError(e,`${n.innerText} is required`)}),100)):(this.logger.log(`${t.getAttribute("name")} is required`),window.setTimeout((()=>{p.setError(e,"This field is required")}),100)),t.focus(),this._form.validate=!1}}}))}}var xe=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};class De{constructor(){var e,t,n,i,s;if(this.logger=new be("TidyContact","#FFFFFF","#4d9068","πŸ“§"),this.endpoint="https://api.tidycontact.io",this.wasCalled=!1,this.httpStatus=0,this.timeout=5,this.isDirty=!1,this._form=d.getInstance(),this.countries_list=[["Afghanistan","af","93","070 123 4567"],["Albania","al","355","067 212 3456"],["Algeria","dz","213","0551 23 45 67"],["American Samoa","as","1","(684) 733-1234"],["Andorra","ad","376","312 345"],["Angola","ao","244","923 123 456"],["Anguilla","ai","1","(264) 235-1234"],["Antigua and Barbuda","ag","1","(268) 464-1234"],["Argentina","ar","54","011 15-2345-6789"],["Armenia","am","374","077 123456"],["Aruba","aw","297","560 1234"],["Australia","au","61","0412 345 678"],["Austria","at","43","0664 123456"],["Azerbaijan","az","994","040 123 45 67"],["Bahamas","bs","1","(242) 359-1234"],["Bahrain","bh","973","3600 1234"],["Bangladesh","bd","880","01812-345678"],["Barbados","bb","1","(246) 250-1234"],["Belarus","by","375","8 029 491-19-11"],["Belgium","be","32","0470 12 34 56"],["Belize","bz","501","622-1234"],["Benin","bj","229","90 01 12 34"],["Bermuda","bm","1","(441) 370-1234"],["Bhutan","bt","975","17 12 34 56"],["Bolivia","bo","591","71234567"],["Bosnia and Herzegovina","ba","387","061 123 456"],["Botswana","bw","267","71 123 456"],["Brazil","br","55","(11) 96123-4567"],["British Indian Ocean Territory","io","246","380 1234"],["British Virgin Islands","vg","1","(284) 300-1234"],["Brunei","bn","673","712 3456"],["Bulgaria","bg","359","048 123 456"],["Burkina Faso","bf","226","70 12 34 56"],["Burundi","bi","257","79 56 12 34"],["Cambodia","kh","855","091 234 567"],["Cameroon","cm","237","6 71 23 45 67"],["Canada","ca","1","(506) 234-5678"],["Cape Verde","cv","238","991 12 34"],["Caribbean Netherlands","bq","599","318 1234"],["Cayman Islands","ky","1","(345) 323-1234"],["Central African Republic","cf","236","70 01 23 45"],["Chad","td","235","63 01 23 45"],["Chile","cl","56","(2) 2123 4567"],["China","cn","86","131 2345 6789"],["Christmas Island","cx","61","0412 345 678"],["Cocos Islands","cc","61","0412 345 678"],["Colombia","co","57","321 1234567"],["Comoros","km","269","321 23 45"],["Congo","cd","243","0991 234 567"],["Congo","cg","242","06 123 4567"],["Cook Islands","ck","682","71 234"],["Costa Rica","cr","506","8312 3456"],["CΓ΄te d’Ivoire","ci","225","01 23 45 6789"],["Croatia","hr","385","092 123 4567"],["Cuba","cu","53","05 1234567"],["CuraΓ§ao","cw","599","9 518 1234"],["Cyprus","cy","357","96 123456"],["Czech Republic","cz","420","601 123 456"],["Denmark","dk","45","32 12 34 56"],["Djibouti","dj","253","77 83 10 01"],["Dominica","dm","1","(767) 225-1234"],["Dominican Republic","do","1","(809) 234-5678"],["Ecuador","ec","593","099 123 4567"],["Egypt","eg","20","0100 123 4567"],["El Salvador","sv","503","7012 3456"],["Equatorial Guinea","gq","240","222 123 456"],["Eritrea","er","291","07 123 456"],["Estonia","ee","372","5123 4567"],["Eswatini","sz","268","7612 3456"],["Ethiopia","et","251","091 123 4567"],["Falkland Islands","fk","500","51234"],["Faroe Islands","fo","298","211234"],["Fiji","fj","679","701 2345"],["Finland","fi","358","041 2345678"],["France","fr","33","06 12 34 56 78"],["French Guiana","gf","594","0694 20 12 34"],["French Polynesia","pf","689","87 12 34 56"],["Gabon","ga","241","06 03 12 34"],["Gambia","gm","220","301 2345"],["Georgia","ge","995","555 12 34 56"],["Germany","de","49","01512 3456789"],["Ghana","gh","233","023 123 4567"],["Gibraltar","gi","350","57123456"],["Greece","gr","30","691 234 5678"],["Greenland","gl","299","22 12 34"],["Grenada","gd","1","(473) 403-1234"],["Guadeloupe","gp","590","0690 00 12 34"],["Guam","gu","1","(671) 300-1234"],["Guatemala","gt","502","5123 4567"],["Guernsey","gg","44","07781 123456"],["Guinea","gn","224","601 12 34 56"],["Guinea-Bissau","gw","245","955 012 345"],["Guyana","gy","592","609 1234"],["Haiti","ht","509","34 10 1234"],["Honduras","hn","504","9123-4567"],["Hong Kong","hk","852","5123 4567"],["Hungary","hu","36","06 20 123 4567"],["Iceland","is","354","611 1234"],["India","in","91","081234 56789"],["Indonesia","id","62","0812-345-678"],["Iran","ir","98","0912 345 6789"],["Iraq","iq","964","0791 234 5678"],["Ireland","ie","353","085 012 3456"],["Isle of Man","im","44","07924 123456"],["Israel","il","972","050-234-5678"],["Italy","it","39","312 345 6789"],["Jamaica","jm","1","(876) 210-1234"],["Japan","jp","81","090-1234-5678"],["Jersey","je","44","07797 712345"],["Jordan","jo","962","07 9012 3456"],["Kazakhstan","kz","7","8 (771) 000 9998"],["Kenya","ke","254","0712 123456"],["Kiribati","ki","686","72001234"],["Kosovo","xk","383","043 201 234"],["Kuwait","kw","965","500 12345"],["Kyrgyzstan","kg","996","0700 123 456"],["Laos","la","856","020 23 123 456"],["Latvia","lv","371","21 234 567"],["Lebanon","lb","961","71 123 456"],["Lesotho","ls","266","5012 3456"],["Liberia","lr","231","077 012 3456"],["Libya","ly","218","091-2345678"],["Liechtenstein","li","423","660 234 567"],["Lithuania","lt","370","(8-612) 34567"],["Luxembourg","lu","352","628 123 456"],["Macau","mo","853","6612 3456"],["North Macedonia","mk","389","072 345 678"],["Madagascar","mg","261","032 12 345 67"],["Malawi","mw","265","0991 23 45 67"],["Malaysia","my","60","012-345 6789"],["Maldives","mv","960","771-2345"],["Mali","ml","223","65 01 23 45"],["Malta","mt","356","9696 1234"],["Marshall Islands","mh","692","235-1234"],["Martinique","mq","596","0696 20 12 34"],["Mauritania","mr","222","22 12 34 56"],["Mauritius","mu","230","5251 2345"],["Mayotte","yt","262","0639 01 23 45"],["Mexico","mx","52","222 123 4567"],["Micronesia","fm","691","350 1234"],["Moldova","md","373","0621 12 345"],["Monaco","mc","377","06 12 34 56 78"],["Mongolia","mn","976","8812 3456"],["Montenegro","me","382","067 622 901"],["Montserrat","ms","1","(664) 492-3456"],["Morocco","ma","212","0650-123456"],["Mozambique","mz","258","82 123 4567"],["Myanmar","mm","95","09 212 3456"],["Namibia","na","264","081 123 4567"],["Nauru","nr","674","555 1234"],["Nepal","np","977","984-1234567"],["Netherlands","nl","31","06 12345678"],["New Caledonia","nc","687","75.12.34"],["New Zealand","nz","64","021 123 4567"],["Nicaragua","ni","505","8123 4567"],["Niger","ne","227","93 12 34 56"],["Nigeria","ng","234","0802 123 4567"],["Niue","nu","683","888 4012"],["Norfolk Island","nf","672","3 81234"],["North Korea","kp","850","0192 123 4567"],["Northern Mariana Islands","mp","1","(670) 234-5678"],["Norway","no","47","406 12 345"],["Oman","om","968","9212 3456"],["Pakistan","pk","92","0301 2345678"],["Palau","pw","680","620 1234"],["Palestine","ps","970","0599 123 456"],["Panama","pa","507","6123-4567"],["Papua New Guinea","pg","675","7012 3456"],["Paraguay","py","595","0961 456789"],["Peru","pe","51","912 345 678"],["Philippines","ph","63","0905 123 4567"],["Poland","pl","48","512 345 678"],["Portugal","pt","351","912 345 678"],["Puerto Rico","pr","1","(787) 234-5678"],["Qatar","qa","974","3312 3456"],["RΓ©union","re","262","0692 12 34 56"],["Romania","ro","40","0712 034 567"],["Russia","ru","7","8 (912) 345-67-89"],["Rwanda","rw","250","0720 123 456"],["Saint BarthΓ©lemy","bl","590","0690 00 12 34"],["Saint Helena","sh","290","51234"],["Saint Kitts and Nevis","kn","1","(869) 765-2917"],["Saint Lucia","lc","1","(758) 284-5678"],["Saint Martin","mf","590","0690 00 12 34"],["Saint Pierre and Miquelon","pm","508","055 12 34"],["Saint Vincent and the Grenadines","vc","1","(784) 430-1234"],["Samoa","ws","685","72 12345"],["San Marino","sm","378","66 66 12 12"],["SΓ£o TomΓ© and PrΓ­ncipe","st","239","981 2345"],["Saudi Arabia","sa","966","051 234 5678"],["Senegal","sn","221","70 123 45 67"],["Serbia","rs","381","060 1234567"],["Seychelles","sc","248","2 510 123"],["Sierra Leone","sl","232","(025) 123456"],["Singapore","sg","65","8123 4567"],["Sint Maarten","sx","1","(721) 520-5678"],["Slovakia","sk","421","0912 123 456"],["Slovenia","si","386","031 234 567"],["Solomon Islands","sb","677","74 21234"],["Somalia","so","252","7 1123456"],["South Africa","za","27","071 123 4567"],["South Korea","kr","82","010-2000-0000"],["South Sudan","ss","211","0977 123 456"],["Spain","es","34","612 34 56 78"],["Sri Lanka","lk","94","071 234 5678"],["Sudan","sd","249","091 123 1234"],["Suriname","sr","597","741-2345"],["Svalbard and Jan Mayen","sj","47","412 34 567"],["Sweden","se","46","070-123 45 67"],["Switzerland","ch","41","078 123 45 67"],["Syria","sy","963","0944 567 890"],["Taiwan","tw","886","0912 345 678"],["Tajikistan","tj","992","917 12 3456"],["Tanzania","tz","255","0621 234 567"],["Thailand","th","66","081 234 5678"],["Timor-Leste","tl","670","7721 2345"],["Togo","tg","228","90 11 23 45"],["Tokelau","tk","690","7290"],["Tonga","to","676","771 5123"],["Trinidad and Tobago","tt","1","(868) 291-1234"],["Tunisia","tn","216","20 123 456"],["Turkey","tr","90","0501 234 56 78"],["Turkmenistan","tm","993","8 66 123456"],["Turks and Caicos Islands","tc","1","(649) 231-1234"],["Tuvalu","tv","688","90 1234"],["U.S. Virgin Islands","vi","1","(340) 642-1234"],["Uganda","ug","256","0712 345678"],["Ukraine","ua","380","050 123 4567"],["United Arab Emirates","ae","971","050 123 4567"],["United Kingdom","gb","44","07400 123456"],["United States","us","1","(201) 555-0123"],["Uruguay","uy","598","094 231 234"],["Uzbekistan","uz","998","8 91 234 56 78"],["Vanuatu","vu","678","591 2345"],["Vatican City","va","39","312 345 6789"],["Venezuela","ve","58","0412-1234567"],["Vietnam","vn","84","091 234 56 78"],["Wallis and Futuna","wf","681","82 12 34"],["Western Sahara","eh","212","0650-123456"],["Yemen","ye","967","0712 345 678"],["Zambia","zm","260","095 5123456"],["Zimbabwe","zw","263","071 234 5678"],["Γ…land Islands","ax","358","041 2345678"]],this.countries_dropdown=null,this.country_ip=null,this.options=p.getOption("TidyContact"),!1!==this.options&&(null===(e=this.options)||void 0===e?void 0:e.cid))if(this.loadOptions(),this.hasAddressFields()||this.phoneEnabled()){if(this.createFields(),this.addEventListeners(),p.checkNested(window.EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")&&!window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()&&""!=p.getFieldValue(null===(n=null===(t=this.options)||void 0===t?void 0:t.address_fields)||void 0===n?void 0:n.address1)&&(this.logger.log("Address Field is not empty"),this.isDirty=!0),this.phoneEnabled()){this.createPhoneFields(),this.createPhoneMarginVariable(),this.logger.log("Phone Standardization is enabled"),this.countryDropDownEnabled()&&this.renderFlagsDropDown();const e=p.getField(null===(s=null===(i=this.options)||void 0===i?void 0:i.address_fields)||void 0===s?void 0:s.phone);e&&(e.addEventListener("keyup",(e=>{this.handlePhoneInputKeydown(e)})),this.setDefaultPhoneCountry())}}else this.logger.log("No address fields found")}loadOptions(){var e,t,n,i;this.options&&(this.options.address_fields||(this.options.address_fields={address1:"supporter.address1",address2:"supporter.address2",address3:"supporter.address3",city:"supporter.city",region:"supporter.region",postalCode:"supporter.postcode",country:"supporter.country",phone:"supporter.phoneNumber2"}),this.options.address_enable=null===(e=this.options.address_enable)||void 0===e||e,this.options.phone_enable&&(this.options.phone_flags=null===(t=this.options.phone_flags)||void 0===t||t,this.options.phone_country_from_ip=null===(n=this.options.phone_country_from_ip)||void 0===n||n,this.options.phone_preferred_countries=null!==(i=this.options.phone_preferred_countries)&&void 0!==i?i:[]))}createFields(){var e,t,n,i,s,r;if(!this.options||!this.hasAddressFields())return;const o=p.getField("supporter.geo.latitude"),a=p.getField("supporter.geo.longitude");if(o||(p.createHiddenInput("supporter.geo.latitude",""),this.logger.log("Creating Hidden Field: supporter.geo.latitude")),a||(p.createHiddenInput("supporter.geo.longitude",""),this.logger.log("Creating Hidden Field: supporter.geo.longitude")),this.options.record_field){p.getField(this.options.record_field)||(p.createHiddenInput(this.options.record_field,""),this.logger.log("Creating Hidden Field: "+this.options.record_field))}if(this.options.date_field){p.getField(this.options.date_field)||(p.createHiddenInput(this.options.date_field,""),this.logger.log("Creating Hidden Field: "+this.options.date_field))}if(this.options.status_field){p.getField(this.options.status_field)||(p.createHiddenInput(this.options.status_field,""),this.logger.log("Creating Hidden Field: "+this.options.status_field))}p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.address2)||(p.createHiddenInput(null===(t=this.options.address_fields)||void 0===t?void 0:t.address2,""),this.logger.log("Creating Hidden Field: "+(null===(n=this.options.address_fields)||void 0===n?void 0:n.address2))),p.getField(null===(i=this.options.address_fields)||void 0===i?void 0:i.address3)||(p.createHiddenInput(null===(s=this.options.address_fields)||void 0===s?void 0:s.address3,""),this.logger.log("Creating Hidden Field: "+(null===(r=this.options.address_fields)||void 0===r?void 0:r.address3)))}createPhoneFields(){if(this.options){if(p.createHiddenInput("tc.phone.country",""),this.logger.log("Creating hidden field: tc.phone.country"),this.options.phone_record_field){p.getField(this.options.phone_record_field)||(p.createHiddenInput(this.options.phone_record_field,""),this.logger.log("Creating hidden field: "+this.options.phone_record_field))}if(this.options.phone_date_field){p.getField(this.options.phone_date_field)||(p.createHiddenInput(this.options.phone_date_field,""),this.logger.log("Creating hidden field: "+this.options.phone_date_field))}if(this.options.phone_status_field){p.getField(this.options.phone_status_field)||(p.createHiddenInput(this.options.phone_status_field,""),this.logger.log("Creating hidden field: "+this.options.phone_status_field))}}}createPhoneMarginVariable(){var e;if(!this.options)return;const t=p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.phone);if(t){const e=window.getComputedStyle(t),n=e.marginTop,i=e.marginBottom;document.documentElement.style.setProperty("--tc-phone-margin-top",n),document.documentElement.style.setProperty("--tc-phone-margin-bottom",i)}}addEventListeners(){if(this.options){if(this.options.address_fields)for(const[e,t]of Object.entries(this.options.address_fields)){const e=p.getField(t);e&&e.addEventListener("change",(()=>{this.logger.log("Changed "+e.name,!0),this.isDirty=!0}))}this._form.onSubmit.subscribe(this.callAPI.bind(this))}}checkSum(e){return xe(this,void 0,void 0,(function*(){const t=(new TextEncoder).encode(e),n=yield crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map((e=>("00"+e.toString(16)).slice(-2))).join("")}))}todaysDate(){return(new Date).toLocaleString("en-ZA",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(/\/+/g,"")}countryAllowed(e){var t;return!!this.options&&(!this.options.countries||0===this.options.countries.length||!!(null===(t=this.options.countries)||void 0===t?void 0:t.includes(e.toLowerCase())))}fetchTimeOut(e,t){const n=new AbortController,i=n.signal;t=Object.assign(Object.assign({},t),{signal:i});const s=fetch(e,t);i&&i.addEventListener("abort",(()=>n.abort()));const r=setTimeout((()=>n.abort()),1e3*this.timeout);return s.finally((()=>clearTimeout(r)))}writeError(e){if(!this.options)return;const t=p.getField(this.options.record_field),n=p.getField(this.options.date_field),i=p.getField(this.options.status_field);if(t){let n="";switch(this.httpStatus){case 400:n="Bad Request";break;case 401:n="Unauthorized";break;case 403:n="Forbidden";break;case 404:n="Not Found";break;case 408:n="API Request Timeout";break;case 500:n="Internal Server Error";break;case 503:n="Service Unavailable";break;default:n="Unknown Error"}const i={status:this.httpStatus,error:"string"==typeof e?e:n.toUpperCase()};t.value=JSON.stringify(i)}n&&(n.value=this.todaysDate()),i&&(i.value="ERROR-API")}setFields(e){var t,n,i,s,r;if(!this.options||!this.options.address_enable)return{};let o={};const a=this.getCountry(),l=p.getFieldValue(null===(t=this.options.address_fields)||void 0===t?void 0:t.postalCode),c=null!==(n=this.options.us_zip_divider)&&void 0!==n?n:"+",u=p.getField(null===(i=this.options.address_fields)||void 0===i?void 0:i.address2);if("address2"in e&&!u){p.getFieldValue(null===(s=this.options.address_fields)||void 0===s?void 0:s.address1)==e.address1+" "+e.address2?(delete e.address1,delete e.address2):(e.address1=e.address1+" "+e.address2,delete e.address2)}"postalCode"in e&&l.replace("+",c)===e.postalCode.replace("+",c)&&delete e.postalCode;for(const t in e){const n=this.options.address_fields&&Object.keys(this.options.address_fields).includes(t)?this.options.address_fields[t]:t,i=p.getField(n);if(i){let s=e[t];"postalCode"===t&&["US","USA","United States"].includes(a)&&(s=null!==(r=s.replace("+",c))&&void 0!==r?r:""),o[t]={from:i.value,to:s},this.logger.log(`Set ${i.name} to ${s} (${i.value})`),p.setFieldValue(n,s,!1)}else this.logger.log(`Field ${t} not found`)}return o}hasAddressFields(){var e,t,n,i,s,r;if(!this.options||!this.options.address_enable)return!1;const o=p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.address1),a=p.getField(null===(t=this.options.address_fields)||void 0===t?void 0:t.address2),l=p.getField(null===(n=this.options.address_fields)||void 0===n?void 0:n.city),c=p.getField(null===(i=this.options.address_fields)||void 0===i?void 0:i.region),u=p.getField(null===(s=this.options.address_fields)||void 0===s?void 0:s.postalCode),d=p.getField(null===(r=this.options.address_fields)||void 0===r?void 0:r.country);return!!(o||a||l||c||u||d)}canUseAPI(){var e,t,n,i;if(!this.options||!this.hasAddressFields())return!1;const s=!!this.getCountry(),r=!!p.getFieldValue(null===(e=this.options.address_fields)||void 0===e?void 0:e.address1),o=!!p.getFieldValue(null===(t=this.options.address_fields)||void 0===t?void 0:t.city),a=!!p.getFieldValue(null===(n=this.options.address_fields)||void 0===n?void 0:n.region),l=!!p.getFieldValue(null===(i=this.options.address_fields)||void 0===i?void 0:i.postalCode);return!(!s||!r)&&(o&&a||l)}canUsePhoneAPI(){var e;if(!this.options)return!1;if(this.phoneEnabled()){const t=!!p.getFieldValue(null===(e=this.options.address_fields)||void 0===e?void 0:e.phone),n=!!p.getFieldValue("tc.phone.country");return t&&n}return!1}getCountry(){var e,t;if(!this.options)return"";const n=null!==(e=this.options.country_fallback)&&void 0!==e?e:"";return p.getFieldValue(null===(t=this.options.address_fields)||void 0===t?void 0:t.country)||n.toUpperCase()}getCountryByCode(e){var t;const n=null!==(t=this.countries_list.find((t=>t.includes(e))))&&void 0!==t?t:"";return n?{name:n[0],code:n[1],dialCode:n[2],placeholder:n[3]}:null}phoneEnabled(){return!(!this.options||!this.options.phone_enable)}countryDropDownEnabled(){return!(!this.options||!this.options.phone_flags)}getCountryFromIP(){return xe(this,void 0,void 0,(function*(){return fetch(`https://${window.location.hostname}/cdn-cgi/trace`).then((e=>e.text())).then((e=>{let t=e.replace(/[\r\n]+/g,'","').replace(/\=+/g,'":"');t='{"'+t.slice(0,t.lastIndexOf('","'))+'"}';const n=JSON.parse(t);return this.country_ip=n.loc,this.country_ip}))}))}renderFlagsDropDown(){var e;if(!this.options)return;const t=p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.phone);if(!t)return;this.countries_dropdown=document.createElement("div"),this.countries_dropdown.classList.add("tc-flags-container");const n=document.createElement("div");n.classList.add("tc-selected-flag"),n.setAttribute("role","combobox"),n.setAttribute("aria-haspopup","listbox"),n.setAttribute("aria-expanded","false"),n.setAttribute("aria-owns","tc-flags-list"),n.setAttribute("aria-label","Select Country"),n.setAttribute("tabindex","0");const i=document.createElement("div");i.classList.add("tc-flag");const s=document.createElement("div");s.classList.add("tc-flag-arrow"),n.appendChild(i),n.appendChild(s),n.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),n.classList.contains("tc-open")?this.closeCountryDropDown():this.openCountryDropDown()}));const r=document.createElement("ul");if(r.classList.add("tc-country-list"),r.classList.add("tc-hide"),r.setAttribute("id","tc-country-list"),r.setAttribute("role","listbox"),r.setAttribute("aria-label","List of Countries"),r.setAttribute("aria-hidden","true"),this.options.phone_preferred_countries.length>0){const e=[];this.options.phone_preferred_countries.forEach((t=>{const n=this.getCountryByCode(t);n&&e.push(n)})),this.appendCountryItems(r,e,"tc-country-list-item",!0);const t=document.createElement("li");t.classList.add("tc-divider"),t.setAttribute("role","separator"),t.setAttribute("aria-disabled","true"),r.appendChild(t),this.logger.log("Rendering preferred countries",JSON.stringify(e))}const o=[];this.countries_list.forEach((e=>{o.push({name:e[0],code:e[1],dialCode:e[2],placeholder:e[3]})})),this.appendCountryItems(r,o,"tc-country-list-item"),r.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const t=e.target.closest("li");if(t.classList.contains("tc-country-list-item")){const e=this.getCountryByCode(t.getAttribute("data-country-code"));e&&this.setPhoneCountry(e)}})),r.addEventListener("mouseover",(e=>{e.preventDefault(),e.stopPropagation();const t=e.target.closest("li.tc-country-list-item");t&&this.highlightCountry(t.getAttribute("data-country-code"))})),this.countries_dropdown.appendChild(n),this.countries_dropdown.appendChild(r),t.parentNode.insertBefore(this.countries_dropdown,t),t.parentNode.classList.add("tc-has-country-flags"),this.countries_dropdown.addEventListener("keydown",(e=>{var t,n;(null===(n=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-country-list"))||void 0===n?void 0:n.classList.contains("tc-hide"))&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(e.key)&&(e.preventDefault(),e.stopPropagation(),this.openCountryDropDown()),"Tab"===e.key&&this.closeCountryDropDown()})),document.addEventListener("keydown",(e=>{var t,n;(null===(n=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-country-list"))||void 0===n?void 0:n.classList.contains("tc-hide"))||(e.preventDefault(),"ArrowUp"===e.key||"Up"===e.key||"ArrowDown"===e.key||"Down"===e.key?this.handleUpDownKey(e.key):"Enter"===e.key?this.handleEnterKey():"Escape"===e.key&&this.closeCountryDropDown())})),document.addEventListener("click",(e=>{var t,n;(null===(n=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-country-list"))||void 0===n?void 0:n.classList.contains("tc-hide"))||e.target.closest(".tc-country-list")||this.closeCountryDropDown()}))}handleUpDownKey(e){var t;const n=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-highlight");if(n){let t="ArrowUp"===e||"Up"===e?n.previousElementSibling:n.nextElementSibling;t&&(t.classList.contains("tc-divider")&&(t="ArrowUp"===e||"Up"===e?t.previousElementSibling:t.nextElementSibling),this.highlightCountry(null==t?void 0:t.getAttribute("data-country-code")))}}handleEnterKey(){var e;const t=null===(e=this.countries_dropdown)||void 0===e?void 0:e.querySelector(".tc-highlight");if(t){const e=this.getCountryByCode(null==t?void 0:t.getAttribute("data-country-code"));this.setPhoneCountry(e)}}handlePhoneInputKeydown(e){const t=e.target.value;if("+"===t.charAt(0)&&t.length>2){const e=this.getCountryByCode(t.substring(1,3));e?this.setPhoneCountry(e):this.setDefaultPhoneCountry()}}openCountryDropDown(){if(!this.countries_dropdown)return;const e=this.countries_dropdown.querySelector(".tc-country-list"),t=this.countries_dropdown.querySelector(".tc-selected-flag");e&&t&&(e.classList.remove("tc-hide"),t.setAttribute("aria-expanded","true"),t.classList.add("tc-open"))}closeCountryDropDown(){var e;if(!this.options)return;if(!this.countries_dropdown)return;const t=this.countries_dropdown.querySelector(".tc-country-list"),n=this.countries_dropdown.querySelector(".tc-selected-flag");t&&n&&(t.classList.add("tc-hide"),n.setAttribute("aria-expanded","false"),n.classList.remove("tc-open"));p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.phone).focus()}getFlagImage(e,t){return`<picture>\n <source\n loading="lazy"\n type="image/webp"\n srcset="https://flagcdn.com/h20/${e}.webp,\n https://flagcdn.com/h40/${e}.webp 2x,\n https://flagcdn.com/h60/${e}.webp 3x">\n <source\n loading="lazy"\n type="image/png"\n srcset="https://flagcdn.com/h20/${e}.png,\n https://flagcdn.com/h40/${e}.png 2x,\n https://flagcdn.com/h60/${e}.png 3x">\n <img\n loading="lazy"\n src="https://flagcdn.com/h20/${e}.png"\n height="20"\n alt="${t}">\n </picture>`}appendCountryItems(e,t,n,i=!1){let s="";for(let e=0;e<t.length;e++){const r=t[e],o=i?"-preferred":"";s+=`<li class='tc-country ${n}' tabIndex='-1' id='tc-item-${r.code}${o}' role='option' data-dial-code='${r.dialCode}' data-country-code='${r.code}' aria-selected='false'>`,s+=`<div class='tc-flag-box'><div class='tc-flag tc-${r.code}'>${this.getFlagImage(r.code,r.name)}</div></div>`,s+=`<span class='tc-country-name'>${r.name}</span>`,s+=`<span class='tc-dial-code'>+${r.dialCode}</span>`,s+="</li>"}e.insertAdjacentHTML("beforeend",s)}setDefaultPhoneCountry(){var e;if(!this.options)return;if(this.options.phone_country_from_ip)return void this.getCountryFromIP().then((e=>{this.logger.log("Country from IP:",e),this.setPhoneCountry(this.getCountryByCode((null!=e?e:"us").toLowerCase()))})).catch((e=>{this.setPhoneCountry(this.getCountryByCode("us"))}));const t=p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.country);if(t){const e=t.options[t.selectedIndex].text,n=this.getCountryByCode(e);if(n)return void this.setPhoneCountry(n);if(this.options.phone_preferred_countries.length>0)return void this.setPhoneCountry(this.getCountryByCode(this.options.phone_preferred_countries[0]))}this.setPhoneCountry(this.getCountryByCode("us"))}setPhoneCountry(e){var t,n,i,s,r,o;if(!this.options||!e)return;const a=p.getField("tc.phone.country");if(a.value===e.code)return;const l=p.getField(null===(t=this.options.address_fields)||void 0===t?void 0:t.phone);if(this.countryDropDownEnabled()){const t=null===(n=this.countries_dropdown)||void 0===n?void 0:n.querySelector(".tc-selected-flag"),a=null===(i=this.countries_dropdown)||void 0===i?void 0:i.querySelector(".tc-flag");t&&a&&(a.innerHTML=this.getFlagImage(e.code,e.name),t.setAttribute("data-country",e.code));const l=null===(s=this.countries_dropdown)||void 0===s?void 0:s.querySelector(".tc-country-list-item[aria-selected='true']");l&&(l.classList.remove("tc-selected"),l.setAttribute("aria-selected","false"));const c=null===(r=this.countries_dropdown)||void 0===r?void 0:r.querySelector(".tc-highlight");c&&c.classList.remove("tc-highlight");const u=null===(o=this.countries_dropdown)||void 0===o?void 0:o.querySelector(`.tc-country-list-item[data-country-code='${e.code}']`);u&&(u.classList.add("tc-selected"),u.setAttribute("aria-selected","true"),u.classList.add("tc-highlight")),(null==t?void 0:t.classList.contains("tc-open"))&&this.closeCountryDropDown()}l.setAttribute("placeholder",e.placeholder),a.value=e.code,this.logger.log(`Setting phone country to ${e.code} - ${e.name}`)}highlightCountry(e){var t,n;if(!e)return;const i=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-highlight");i&&i.classList.remove("tc-highlight");const s=null===(n=this.countries_dropdown)||void 0===n?void 0:n.querySelector(".tc-country-list");if(s){const t=s.querySelector(`.tc-country[data-country-code='${e}']`);t&&(t.classList.add("tc-highlight"),t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))}}setPhoneDataFromAPI(e,t){var n;return xe(this,void 0,void 0,(function*(){if(!this.options)return;const i=p.getField(null===(n=this.options.address_fields)||void 0===n?void 0:n.phone),s=p.getField(this.options.phone_record_field),r=p.getField(this.options.phone_date_field),o=p.getField(this.options.phone_status_field);let a={};a.formData={[i.name]:i.value},a.formatted=e.formatted,a.number_type=e.number_type,!0===e.valid?(i.value!==e.formatted.e164&&(a.phone={from:i.value,to:e.formatted.e164},i.value=e.formatted.e164),yield this.checkSum(JSON.stringify(a)).then((e=>{this.logger.log("Phone Checksum",e),a.requestId=t,a.checksum=e})),s&&(a=Object.assign({date:this.todaysDate(),status:"SUCCESS"},a),s.value=JSON.stringify(a)),r&&(r.value=this.todaysDate()),o&&(o.value="SUCCESS")):(yield this.checkSum(JSON.stringify(a)).then((e=>{this.logger.log("Phone Checksum",e),a.requestId=t,a.checksum=e})),s&&(a=Object.assign({date:this.todaysDate(),status:"ERROR"},a),s.value=JSON.stringify(a)),r&&(r.value=this.todaysDate()),o&&(o.value="error"in e?"ERROR: "+e.error:"INVALIDPHONE"))}))}callAPI(){var e,t,n,i,s,r;if(!this.options)return;if(!this.isDirty||this.wasCalled)return;if(!this._form.submit)return void this.logger.log("Form Submission Interrupted by Other Component");const o=p.getField(this.options.record_field),a=p.getField(this.options.date_field),l=p.getField(this.options.status_field),c=p.getField("supporter.geo.latitude"),u=p.getField("supporter.geo.longitude");if(!this.canUseAPI()&&!this.canUsePhoneAPI())return this.logger.log("Not Enough Data to Call API"),a&&(a.value=this.todaysDate()),l&&(l.value="PARTIALADDRESS"),!0;const d=p.getFieldValue(null===(e=this.options.address_fields)||void 0===e?void 0:e.address1),h=p.getFieldValue(null===(t=this.options.address_fields)||void 0===t?void 0:t.address2),g=p.getFieldValue(null===(n=this.options.address_fields)||void 0===n?void 0:n.city),m=p.getFieldValue(null===(i=this.options.address_fields)||void 0===i?void 0:i.region),f=p.getFieldValue(null===(s=this.options.address_fields)||void 0===s?void 0:s.postalCode),b=this.getCountry();if(!this.countryAllowed(b)){if(this.logger.log("Country not allowed: "+b),o){let e={};e=Object.assign({date:this.todaysDate(),status:"DISALLOWED"},e),o.value=JSON.stringify(e)}return a&&(a.value=this.todaysDate()),l&&(l.value="DISALLOWED"),!0}let v={url:window.location.href,cid:this.options.cid};this.canUseAPI()&&(v=Object.assign(v,{address1:d,address2:h,city:g,region:m,postalCode:f,country:b})),this.canUsePhoneAPI()&&(v.phone=p.getFieldValue(null===(r=this.options.address_fields)||void 0===r?void 0:r.phone),v.phoneCountry=p.getFieldValue("tc.phone.country")),this.wasCalled=!0,this.logger.log("FormData",JSON.parse(JSON.stringify(v)));const y=this.fetchTimeOut(this.endpoint,{headers:{"Content-Type":"application/json; charset=utf-8"},method:"POST",body:JSON.stringify(v)}).then((e=>(this.httpStatus=e.status,e.json()))).then((e=>xe(this,void 0,void 0,(function*(){if(this.logger.log("callAPI response",JSON.parse(JSON.stringify(e))),!0===e.valid){let t={};"changed"in e&&(t=this.setFields(e.changed)),t.formData=v,yield this.checkSum(JSON.stringify(t)).then((n=>{this.logger.log("Checksum",n),t.requestId=e.requestId,t.checksum=n})),"latitude"in e&&(c.value=e.latitude,t.latitude=e.latitude),"longitude"in e&&(u.value=e.longitude,t.longitude=e.longitude),o&&(t=Object.assign({date:this.todaysDate(),status:"SUCCESS"},t),o.value=JSON.stringify(t)),a&&(a.value=this.todaysDate()),l&&(l.value="SUCCESS")}else{let t={};t.formData=v,yield this.checkSum(JSON.stringify(t)).then((n=>{this.logger.log("Checksum",n),t.requestId=e.requestId,t.checksum=n})),o&&(t=Object.assign({date:this.todaysDate(),status:"ERROR"},t),o.value=JSON.stringify(t)),a&&(a.value=this.todaysDate()),l&&(l.value="error"in e?"ERROR: "+e.error:"INVALIDADDRESS")}this.phoneEnabled()&&"phone"in e&&(yield this.setPhoneDataFromAPI(e.phone,e.requestId))})))).catch((e=>{e.toString().includes("AbortError")&&(this.logger.log("Fetch aborted"),this.httpStatus=408),this.writeError(e)}));return this._form.submitPromise=y,y}}class ke{constructor(){this.logger=new be("LiveCurrency","#1901b1","#feb47a","πŸ’²"),this.elementsFound=!1,this.isUpdating=!1,this._amount=h.getInstance(),this._frequency=g.getInstance(),this._fees=m.getInstance(),this.searchElements(),this.shouldRun()&&(p.setBodyData("live-currency","active"),this.updateCurrency(),this.addEventListeners(),document.querySelectorAll(".en__field--donationAmt .en__field__element--radio .en__field__item").forEach((e=>{e.setAttribute("data-engrid-currency-symbol-updated","true")})))}searchElements(){const e=document.querySelectorAll("\n .en__component--copyblock,\n .en__component--codeblock,\n .en__field label,\n .en__submit\n ");if(e.length>0){this.elementsFound=!0;const t=p.getCurrencySymbol(),n=p.getCurrencyCode(),i=`<span class="engrid-currency-symbol">${t}</span>`,s=`<span class="engrid-currency-code">${n}</span>`;e.forEach((e=>{if(!(e instanceof HTMLElement&&e.innerHTML.startsWith("<script"))&&e instanceof HTMLElement&&(e.innerHTML.includes("[$]")||e.innerHTML.includes("[$$$]"))){this.logger.log("Old Value:",e.innerHTML);const t=/\[\$\]/g,n=/\[\$\$\$\]/g;e.innerHTML=e.innerHTML.replace(n,s),e.innerHTML=e.innerHTML.replace(t,i),this.logger.log("New Value:",e.innerHTML)}}))}}shouldRun(){return this.elementsFound}addMutationObserver(){const e=document.querySelector(".en__field--donationAmt .en__field__element--radio");if(!e)return;new MutationObserver((t=>{t.forEach((t=>{if("childList"===t.type){if(this.isUpdating)return;this.isUpdating=!0,setTimeout((()=>{this.searchElements(),this.updateCurrency(),e.querySelectorAll(".en__field__item").forEach((e=>{e.setAttribute("data-engrid-currency-symbol-updated","true")})),this.isUpdating=!1}),20)}}))})).observe(e,{childList:!0})}addEventListeners(){this._fees.onFeeChange.subscribe((()=>{setTimeout((()=>{this.updateCurrency()}),10)})),this._amount.onAmountChange.subscribe((()=>{setTimeout((()=>{this.updateCurrency()}),10)})),this._frequency.onFrequencyChange.subscribe((()=>{this.isUpdating||(this.isUpdating=!0,setTimeout((()=>{this.searchElements(),this.updateCurrency(),document.querySelectorAll(".en__field--donationAmt .en__field__element--radio .en__field__item").forEach((e=>{e.setAttribute("data-engrid-currency-symbol-updated","true")})),this.isUpdating=!1}),10))}));const e=p.getField("transaction.paycurrency");e&&e.addEventListener("change",(()=>{setTimeout((()=>{this.updateCurrency(),this._amount.load();const e=document.querySelector(".en__field--donationAmt .en__field__item--other");e&&e.setAttribute("data-currency-symbol",p.getCurrencySymbol()),p.setBodyData("currency-code",p.getCurrencyCode())}),10)})),this.addMutationObserver()}updateCurrency(){const e=document.querySelectorAll(".engrid-currency-symbol"),t=document.querySelectorAll(".engrid-currency-code");e.length>0&&e.forEach((e=>{e.innerHTML=p.getCurrencySymbol()})),t.length>0&&t.forEach((e=>{e.innerHTML=p.getCurrencyCode()})),this.logger.log(`Currency updated for ${e.length+t.length} elements`)}}class Fe{constructor(){this.logger=new be("CustomCurrency","#1901b1","#00cc95","πŸ€‘"),this.currencyElement=document.querySelector("[name='transaction.paycurrency']"),this._country=b.getInstance(),this.shouldRun()&&(this.addEventListeners(),this.loadCurrencies())}shouldRun(){return!(!this.currencyElement||!p.getOption("CustomCurrency"))}addEventListeners(){this._country.countryField&&this._country.onCountryChange.subscribe((e=>{this.loadCurrencies(e)}))}loadCurrencies(e="default"){const t=p.getOption("CustomCurrency");if(!t)return;const n=t.label||"Give with [$$$]";let i=t.default;if(t.countries&&t.countries[e]&&(i=t.countries[e]),!i)return void this.logger.log(`No currencies found for ${e}`);this.logger.log(`Loading currencies for ${e}`),this.currencyElement.innerHTML="";for(const e in i){const t=document.createElement("option");t.value=e,t.text=n.replace("[$$$]",e).replace("[$]",i[e]),t.setAttribute("data-currency-code",e),t.setAttribute("data-currency-symbol",i[e]),this.currencyElement.appendChild(t)}this.currencyElement.selectedIndex=0;const s=new Event("change",{bubbles:!0});this.currencyElement.dispatchEvent(s)}}class Ne{constructor(){this.logger=new be("Autosubmit","#f0f0f0","#ff0000","πŸš€"),this._form=d.getInstance(),p.checkNested(window.EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")&&!window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()&&"Y"===p.getUrlParameter("autosubmit")&&(this.logger.log("Autosubmitting Form"),this._form.submitForm())}}class Te{constructor(){const e=document.getElementsByClassName("en__ticket__field--cost"),t=document.getElementsByClassName("en__ticket__currency");for(const e of t)e.classList.add("en__ticket__currency__hidden");for(const t of e){const e=t.getElementsByClassName("en__ticket__price")[0],n={style:"currency",currency:t.getElementsByClassName("en__ticket__currency")[0].innerText};let i=Intl.NumberFormat(void 0,n).format(Number(e.innerText));".00"===i.slice(-3)&&(i=i.slice(0,-3)),e.innerText=i}}}class Pe{constructor(){this.logger=new be("SwapAmounts","purple","white","πŸ’°"),this._amount=h.getInstance(),this._frequency=g.getInstance(),this.defaultChange=!1,this.swapped=!1,this.shouldRun()&&(this._frequency.onFrequencyChange.subscribe((()=>this.swapAmounts())),this._amount.onAmountChange.subscribe((()=>{this._frequency.frequency in window.EngridAmounts!=!1&&(this.defaultChange=!1,this.swapped&&this._amount.amount!=window.EngridAmounts[this._frequency.frequency].default&&(this.defaultChange=!0))})))}swapAmounts(){this._frequency.frequency in window.EngridAmounts&&(window.EngagingNetworks.require._defined.enjs.swapList("donationAmt",this.loadEnAmounts(window.EngridAmounts[this._frequency.frequency]),{ignoreCurrentValue:this.ignoreCurrentValue()}),this._amount.load(),this.logger.log("Amounts Swapped To",window.EngridAmounts[this._frequency.frequency]),this.swapped=!0)}loadEnAmounts(e){let t=[];for(let n in e.amounts)t.push({selected:e.amounts[n]===e.default,label:n,value:e.amounts[n].toString()});return t}shouldRun(){return"EngridAmounts"in window}ignoreCurrentValue(){return!(window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()||null!==p.getUrlParameter("transaction.donationAmt")||this.defaultChange)}}class Oe{constructor(e){var t,n;this.logger=new be("Debug Panel","#f0f0f0","#ff0000","πŸ’₯"),this.brandingHtml=new Ie,this.element=null,this.currentTimestamp=this.getCurrentTimestamp(),this.quickFills={"pi-general":[{name:"supporter.title",value:"Ms"},{name:"supporter.firstName",value:"4Site"},{name:"supporter.lastName",value:"Studio"},{name:"supporter.emailAddress",value:"en-test@4sitestudios.com"},{name:"supporter.phoneNumber",value:"555-555-5555"}],"pi-unique":[{name:"supporter.title",value:"Ms"},{name:"supporter.firstName",value:`4Site ${this.currentTimestamp}`},{name:"supporter.lastName",value:"Studio"},{name:"supporter.emailAddress",value:`en-test+${this.currentTimestamp}@4sitestudios.com`},{name:"supporter.phoneNumber",value:"555-555-5555"}],"us-address":[{name:"supporter.address1",value:"3431 14th St NW"},{name:"supporter.address2",value:"Suite 1"},{name:"supporter.city",value:"Washington"},{name:"supporter.region",value:"DC"},{name:"supporter.postcode",value:"20010"},{name:"supporter.country",value:"US"}],"us-address-senate-rep":[{name:"supporter.address1",value:"20 W 34th Street"},{name:"supporter.address2",value:""},{name:"supporter.city",value:"New York"},{name:"supporter.region",value:"NY"},{name:"supporter.postcode",value:"10001"},{name:"supporter.country",value:"US"}],"us-address-nonexistent":[{name:"supporter.address1",value:"12345 Main Street"},{name:"supporter.address2",value:""},{name:"supporter.city",value:"New York"},{name:"supporter.region",value:"TX"},{name:"supporter.postcode",value:"90210"},{name:"supporter.country",value:"US"}],"cc-paysafe-visa":[{name:"transaction.ccnumber",value:"4530910000012345"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}],"cc-paysafe-visa-invalid":[{name:"transaction.ccnumber",value:"411111"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}],"cc-paysafe-mastercard":[{name:"transaction.ccnumber",value:"5036150000001115"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}],"cc-stripe-visa":[{name:"transaction.ccnumber",value:"4242424242424242"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}],"quick-fill-pi-unique-us-address-senate-rep-cc-stripe-visa":[{name:"supporter.title",value:"Ms"},{name:"supporter.firstName",value:`4Site ${this.currentTimestamp}`},{name:"supporter.lastName",value:"Studio"},{name:"supporter.emailAddress",value:`en-test+${this.currentTimestamp}@4sitestudios.com`},{name:"supporter.phoneNumber",value:"555-555-5555"},{name:"supporter.address1",value:"20 W 34th Street"},{name:"supporter.address2",value:""},{name:"supporter.city",value:"New York"},{name:"supporter.region",value:"NY"},{name:"supporter.postcode",value:"10001"},{name:"supporter.country",value:"US"},{name:"transaction.ccnumber",value:"4242424242424242"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}]},this.logger.log("Adding debug panel and starting a debug session"),this.pageLayouts=e,this.loadDebugPanel(),this.element=document.querySelector(".debug-panel"),null===(t=this.element)||void 0===t||t.addEventListener("click",(()=>{var e;null===(e=this.element)||void 0===e||e.classList.add("debug-panel--open")}));const i=document.querySelector(".debug-panel__close");null==i||i.addEventListener("click",(e=>{var t;e.stopPropagation(),null===(t=this.element)||void 0===t||t.classList.remove("debug-panel--open")})),"local"===p.getUrlParameter("assets")&&(null===(n=this.element)||void 0===n||n.classList.add("debug-panel--local")),window.sessionStorage.setItem(Oe.debugSessionStorageKey,"active")}loadDebugPanel(){document.body.insertAdjacentHTML("beforeend",'<div class="debug-panel">\n <div class="debug-panel__container">\n <div class="debug-panel__closed-title">Debug</div>\n <div class="debug-panel__title">\n <h2>Debug</h2>\n <div class="debug-panel__close">X</div>\n </div>\n <div class="debug-panel__options">\n <div class="debug-panel__option">\n <label class="debug-panel__link-label link-left">\n <a class="debug-panel__edit-link">Edit page</a>\n </label>\n </div>\n <div class="debug-panel__option">\n <label for="engrid-form-quickfill">Quick-fill</label>\n <select name="engrid-form-quickfill" id="engrid-form-quickfill">\n <option disabled selected>Choose an option</option>\n <option value="quick-fill-pi-unique-us-address-senate-rep-cc-stripe-visa">Quick-fill - Unique w/ Senate Address - Stripe Visa</option>\n <option value="pi-general">Personal Info - General</option>\n <option value="pi-unique">Personal Info - Unique</option>\n <option value="us-address-senate-rep">US Address - w/ Senate Rep</option>\n <option value="us-address">US Address - w/o Senate Rep</option>\n <option value="us-address-nonexistent">US Address - Nonexistent</option>\n <option value="cc-paysafe-visa">CC - Paysafe - Visa</option>\n <option value="cc-paysafe-visa-invalid">CC - Paysafe - Visa (Invalid)</option>\n <option value="cc-paysafe-mastercard">CC - Paysafe - Mastercard</option>\n <option value="cc-stripe-visa">CC - Stripe - Visa</option>\n </select>\n </div>\n <div class="debug-panel__option">\n <label for="engrid-layout-switch">Layout</label>\n <select name="engrid-layout" id="engrid-layout-switch">\n </select>\n </div>\n <div class="debug-panel__option debug-panel__option--local">\n <div class="debug-panel__checkbox">\n <input type="checkbox" name="engrid-embedded-layout" id="engrid-embedded-layout">\n <label for="engrid-embedded-layout">Embedded layout</label> \n </div>\n </div>\n <div class="debug-panel__option debug-panel__option--local">\n <div class="debug-panel__checkbox">\n <input type="checkbox" name="engrid-debug-layout" id="engrid-debug-layout">\n <label for="engrid-debug-layout">Debug layout</label> \n </div>\n </div>\n <div class="debug-panel__option debug-panel__option--local">\n <div class="debug-panel__checkbox">\n <input type="checkbox" name="engrid-branding" id="engrid-branding">\n <label for="engrid-branding">Branding HTML</label> \n </div>\n </div>\n <div class="debug-panel__option">\n <label for="engrid-theme">Theme</label>\n <input type="text" id="engrid-theme">\n </div>\n <div class="debug-panel__option debug-panel__option--local">\n <label for="engrid-theme">Sub-theme</label>\n <input type="text" id="engrid-subtheme">\n </div>\n <div class="debug-panel__option">\n <button class="btn debug-panel__btn debug-panel__btn--submit" type="button">Submit form</button>\n </div>\n <div class="debug-panel__option">\n <label class="debug-panel__link-label">\n <a class="debug-panel__force-submit-link">Force submit form</a>\n </label>\n </div>\n <div class="debug-panel__option">\n <label class="debug-panel__link-label">\n <a class="debug-panel__end-debug-link">End debug</a>\n </label>\n </div>\n </div>\n </div>\n </div>'),this.setupLayoutSwitcher(),this.setupThemeSwitcher(),this.setupSubThemeSwitcher(),this.setupFormQuickfill(),this.createDebugSessionEndHandler(),this.setupEmbeddedLayoutSwitcher(),this.setupDebugLayoutSwitcher(),this.setupBrandingHtmlHandler(),this.setupEditBtnHandler(),this.setupForceSubmitLinkHandler(),this.setupSubmitBtnHandler()}switchENGridLayout(e){p.setBodyData("layout",e)}setupLayoutSwitcher(){var e,t;const n=document.getElementById("engrid-layout-switch");n&&(null===(e=this.pageLayouts)||void 0===e||e.forEach((e=>{n.insertAdjacentHTML("beforeend",`<option value="${e}">${e}</option>`)})),n.value=null!==(t=p.getBodyData("layout"))&&void 0!==t?t:"",n.addEventListener("change",(e=>{const t=e.target;this.switchENGridLayout(t.value)})))}setupThemeSwitcher(){var e;const t=document.getElementById("engrid-theme");t&&(t.value=null!==(e=p.getBodyData("theme"))&&void 0!==e?e:"",["keyup","blur"].forEach((e=>{t.addEventListener(e,(e=>{const t=e.target;this.switchENGridTheme(t.value)}))})))}switchENGridTheme(e){p.setBodyData("theme",e)}setupSubThemeSwitcher(){var e;const t=document.getElementById("engrid-subtheme");t&&(t.value=null!==(e=p.getBodyData("subtheme"))&&void 0!==e?e:"",["keyup","blur"].forEach((e=>{t.addEventListener(e,(e=>{const t=e.target;this.switchENGridSubtheme(t.value)}))})))}switchENGridSubtheme(e){p.setBodyData("subtheme",e)}setupFormQuickfill(){const e=document.getElementById("engrid-form-quickfill");null==e||e.addEventListener("change",(e=>{const t=e.target;this.quickFills[t.value].forEach((e=>{this.setFieldValue(e)}))}))}setFieldValue(e){if("transaction.ccexpire"!==e.name)p.setFieldValue(e.name,e.value,!0,!0);else{const t=document.getElementsByName("transaction.ccexpire");if(t.length>0){const n=e.value.split("/");t[0].value=n[0],t[1].value=n[1],t[0].dispatchEvent(new Event("change",{bubbles:!0})),t[1].dispatchEvent(new Event("change",{bubbles:!0}))}else t[0].value=e.value,t[0].dispatchEvent(new Event("change",{bubbles:!0}))}}getCurrentTimestamp(){const e=new Date;return`${e.getFullYear()}${String(e.getMonth()+1).padStart(2,"0")}${String(e.getDate()).padStart(2,"0")}-${String(e.getHours()).padStart(2,"0")}${String(e.getMinutes()).padStart(2,"0")}`}createDebugSessionEndHandler(){const e=document.querySelector(".debug-panel__end-debug-link");null==e||e.addEventListener("click",(()=>{var e;this.logger.log("Removing panel and ending debug session"),null===(e=this.element)||void 0===e||e.remove(),window.sessionStorage.removeItem(Oe.debugSessionStorageKey)}))}setupEmbeddedLayoutSwitcher(){const e=document.getElementById("engrid-embedded-layout");e&&(e.checked=!!p.getBodyData("embedded"),e.addEventListener("change",(e=>{const t=e.target;p.setBodyData("embedded",t.checked)})))}setupDebugLayoutSwitcher(){const e=document.getElementById("engrid-debug-layout");e&&(e.checked="layout"===p.getBodyData("debug"),e.addEventListener("change",(e=>{e.target.checked?p.setBodyData("debug","layout"):p.setBodyData("debug","")})))}setupBrandingHtmlHandler(){const e=document.getElementById("engrid-branding");e.checked="branding"===p.getUrlParameter("development"),e.addEventListener("change",(t=>{e.checked?this.brandingHtml.show():this.brandingHtml.hide()}))}setupEditBtnHandler(){const e=document.querySelector(".debug-panel__edit-link");null==e||e.addEventListener("click",(()=>{window.open(`https://${p.getDataCenter()}.engagingnetworks.app/index.html#pages/${p.getPageID()}/edit`,"_blank")}))}setupForceSubmitLinkHandler(){const e=document.querySelector(".debug-panel__force-submit-link");null==e||e.addEventListener("click",(()=>{const e=document.querySelector("form.en__component");null==e||e.submit()}))}setupSubmitBtnHandler(){const e=document.querySelector(".debug-panel__btn--submit");null==e||e.addEventListener("click",(()=>{const e=document.querySelector(".en__submit button");null==e||e.click()}))}}Oe.debugSessionStorageKey="engrid_debug_panel";class Me{constructor(){this.logger=new be("Debug hidden fields","#f0f0f0","#ff0000","🫣");const e=document.querySelectorAll(".en__component--row [type='hidden'][class*='en_'], .engrid-added-input[type='hidden']");e.length>0&&(this.logger.log(`Switching the following type 'hidden' fields to type 'text': ${[...e].map((e=>e.name)).join(", ")}`),e.forEach((e=>{e.type="text",e.classList.add("en__field__input","en__field__input--text");const t=document.createElement("label");t.textContent="Hidden field: "+e.name,t.classList.add("en__field__label");const n=document.createElement("div");n.classList.add("en__field__element","en__field__element--text");const i=document.createElement("div");i.classList.add("en__field","en__field--text","hide"),i.dataset.unhidden="",i.appendChild(t),i.appendChild(n),e.parentNode&&(e.parentNode.insertBefore(i,e),n.appendChild(e))})))}}var qe=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};class Ie{constructor(){this.assetBaseUrl="https://cdn.jsdelivr.net/gh/4site-interactive-studios/engrid-scripts@main/reference-materials/html/brand-guide-markup/",this.brandingHtmlFiles=["html5-tags.html","en-common-fields.html","survey.html","donation-page.html","premium-donation.html","ecards.html","email-to-target.html","tweet-to-target.html","petition.html","event.html","styles.html"],this.bodyMain=document.querySelector(".body-main"),this.htmlFetched=!1}fetchHtml(){return qe(this,void 0,void 0,(function*(){const e=this.brandingHtmlFiles.map((e=>qe(this,void 0,void 0,(function*(){return(yield fetch(this.assetBaseUrl+e)).text()}))));return yield Promise.all(e)}))}appendHtml(){this.fetchHtml().then((e=>e.forEach((e=>{var t;const n=document.createElement("div");n.classList.add("brand-guide-section"),n.innerHTML=e,null===(t=this.bodyMain)||void 0===t||t.insertAdjacentElement("beforeend",n)})))),this.htmlFetched=!0}show(){if(!this.htmlFetched)return void this.appendHtml();const e=document.querySelectorAll(".brand-guide-section");null==e||e.forEach((e=>e.style.display="block"))}hide(){const e=document.querySelectorAll(".brand-guide-section");null==e||e.forEach((e=>e.style.display="none"))}}class Be{constructor(){this.logger=new be("CountryDisable","#f0f0f0","#333333","🌎");const e=document.querySelectorAll('select[name="supporter.country"], select[name="transaction.shipcountry"], select[name="supporter.billingCountry"], select[name="transaction.infcountry"]'),t=p.getOption("CountryDisable");if(e.length>0&&t.length>0){const n=t.map((e=>e.toLowerCase()));e.forEach((e=>{e.querySelectorAll("option").forEach((t=>{(n.includes(t.value.toLowerCase())||n.includes(t.text.toLowerCase()))&&(this.logger.log(`Removing ${t.text} from ${e.getAttribute("name")}`),t.remove())}))}))}}}class Re{constructor(){this.logger=new be("PremiumGift","#232323","#f7b500","🎁"),this.enElements=new Array,this.shoudRun()&&(this.searchElements(),this.addEventListeners(),this.checkPremiumGift())}shoudRun(){return"pageJson"in window&&"pageType"in window.pageJson&&"premiumgift"===window.pageJson.pageType}addEventListeners(){["click","change"].forEach((e=>{document.addEventListener(e,(e=>{const t=e.target,n=t.closest(".en__pg__body");if(n){const e=n.querySelector('[name="en__pg"]');if("type"in t==!1){const t=e.value;window.setTimeout((()=>{const e=document.querySelector('[name="en__pg"][value="'+t+'"]');e&&(e.checked=!0,e.dispatchEvent(new Event("change")))}),100)}window.setTimeout((()=>{this.checkPremiumGift()}),110)}}))}));const e=document.querySelector(".en__component--premiumgiftblock");if(e){new MutationObserver((t=>{for(const n of t)"attributes"===n.type&&"style"===n.attributeName&&"none"===e.style.display&&(this.logger.log("Premium Gift Section hidden - removing premium gift body data attributes and premium title."),p.setBodyData("premium-gift-maximize",!1),p.setBodyData("premium-gift-name",!1),this.setPremiumTitle(""))})).observe(e,{attributes:!0})}}checkPremiumGift(){const e=document.querySelector('[name="en__pg"]:checked');if(e){const t=e.value;this.logger.log("Premium Gift Value: "+t);const n=e.closest(".en__pg");if("0"!==t){const e=n.querySelector(".en__pg__name");p.setBodyData("premium-gift-maximize","false"),p.setBodyData("premium-gift-name",p.slugify(e.innerText)),this.setPremiumTitle(e.innerText)}else p.setBodyData("premium-gift-maximize","true"),p.setBodyData("premium-gift-name",!1),this.setPremiumTitle("");if(!n.classList.contains("en__pg--selected")){const e=document.querySelector(".en__pg--selected");e&&e.classList.remove("en__pg--selected"),n.classList.add("en__pg--selected")}}}searchElements(){const e=document.querySelectorAll("\n .en__component--copyblock,\n .en__component--codeblock,\n .en__field\n ");e.length>0&&e.forEach((e=>{e instanceof HTMLElement&&e.innerHTML.includes("{$PREMIUMTITLE}")&&(e.innerHTML=e.innerHTML.replace("{$PREMIUMTITLE}",'<span class="engrid_premium_title"></span>'),this.enElements.push(e))}))}setPremiumTitle(e){this.enElements.forEach((t=>{const n=t.querySelector(".engrid_premium_title");n&&(n.innerHTML=e)}))}}class je{constructor(){if(!document.getElementById("en__digitalWallet"))return p.setBodyData("payment-type-option-apple-pay","false"),p.setBodyData("payment-type-option-google-pay","false"),p.setBodyData("payment-type-option-paypal-one-touch","false"),void p.setBodyData("payment-type-option-venmo","false");const e=document.getElementById("en__digitalWallet__stripeButtons__container");e&&(e.classList.add("giveBySelect-stripedigitalwallet"),e.classList.add("showif-stripedigitalwallet-selected"));const t=document.getElementById("en__digitalWallet__paypalTouch__container");if(t&&(t.classList.add("giveBySelect-paypaltouch"),t.classList.add("showif-paypaltouch-selected")),document.querySelector("#en__digitalWallet__stripeButtons__container > *"))this.addStripeDigitalWallets();else{p.setBodyData("payment-type-option-apple-pay","false"),p.setBodyData("payment-type-option-google-pay","false");const e=document.getElementById("en__digitalWallet__stripeButtons__container");e&&this.checkForWalletsBeingAdded(e,"stripe")}if(document.querySelector("#en__digitalWallet__paypalTouch__container > *"))this.addPaypalTouchDigitalWallets();else{p.setBodyData("payment-type-option-paypal-one-touch","false"),p.setBodyData("payment-type-option-venmo","false");const e=document.getElementById("en__digitalWallet__paypalTouch__container");e&&this.checkForWalletsBeingAdded(e,"paypalTouch")}}addStripeDigitalWallets(){this.addOptionToPaymentTypeField("stripedigitalwallet","GooglePay / ApplePay"),p.setBodyData("payment-type-option-apple-pay","true"),p.setBodyData("payment-type-option-google-pay","true")}addPaypalTouchDigitalWallets(){this.addOptionToPaymentTypeField("paypaltouch","Paypal / Venmo"),p.setBodyData("payment-type-option-paypal-one-touch","true"),p.setBodyData("payment-type-option-venmo","true")}addOptionToPaymentTypeField(e,t){const n=document.querySelector('[name="transaction.paymenttype"]');if(n&&!n.querySelector(`[value=${e}]`)){const i=document.createElement("option");i.value=e,i.innerText=t,n.appendChild(i)}}checkForWalletsBeingAdded(e,t){new MutationObserver(((e,n)=>{for(const i of e)"childList"===i.type&&i.addedNodes.length&&("stripe"===t?this.addStripeDigitalWallets():"paypalTouch"===t&&this.addPaypalTouchDigitalWallets(),n.disconnect())})).observe(e,{childList:!0,subtree:!0})}}class Ve{constructor(){var e,t,n;this.options=null!==(e=p.getOption("MobileCTA"))&&void 0!==e&&e,this.buttonLabel="",this.options&&(null===(t=this.options.pages)||void 0===t?void 0:t.includes(p.getPageType()))&&1===p.getPageNumber()&&(this.buttonLabel=null!==(n=this.options.label)&&void 0!==n?n:"Take Action",this.renderButton(),this.addEventListeners())}renderButton(){const e=document.querySelector("#engrid"),t=document.querySelector(".body-main .en__component--widgetblock:first-child, .en__component--formblock");if(!e||!t)return;const n=document.createElement("div"),i=document.createElement("button");n.classList.add("engrid-mobile-cta-container"),n.style.display="none",i.classList.add("primary"),i.innerHTML=this.buttonLabel,i.addEventListener("click",(()=>{t.scrollIntoView({behavior:"smooth"})})),n.appendChild(i),e.appendChild(n)}addEventListeners(){const e=document.querySelector(".body-main");if(!e)return;const t=()=>{e.getBoundingClientRect().top<=window.innerHeight-100?this.hideButton():this.showButton()};window.addEventListener("load",t),window.addEventListener("resize",t),window.addEventListener("scroll",t)}hideButton(){const e=document.querySelector(".engrid-mobile-cta-container");e&&(e.style.display="none")}showButton(){const e=document.querySelector(".engrid-mobile-cta-container");e&&(e.style.display="block")}}class He{constructor(){this.logger=new be("LiveFrequency","#00ff00","#000000","🧾"),this.elementsFound=!1,this._amount=h.getInstance(),this._frequency=g.getInstance(),this.searchElements(),this.shouldRun()&&(this.updateFrequency(),this.addEventListeners())}searchElements(){const e=document.querySelectorAll("\n .en__component--copyblock,\n .en__component--codeblock,\n .en__field label,\n .en__submit\n ");if(e.length>0){const t=/\[\[(frequency)\]\]/gi;let n=0;e.forEach((e=>{const i=e.innerHTML.match(t);e instanceof HTMLElement&&i&&(this.elementsFound=!0,i.forEach((t=>{n++,this.replaceMergeTags(t,e)})))})),n>0&&this.logger.log(`Found ${n} merge tag${n>1?"s":""} in the page.`)}}shouldRun(){return!!this.elementsFound||(this.logger.log("No merge tags found. Skipping."),!1)}addEventListeners(){this._amount.onAmountChange.subscribe((()=>{setTimeout((()=>{this.updateFrequency()}),10)})),this._frequency.onFrequencyChange.subscribe((()=>{setTimeout((()=>{this.searchElements(),this.updateFrequency()}),10)}))}updateFrequency(){const e="onetime"===this._frequency.frequency?"one-time":this._frequency.frequency;document.querySelectorAll(".engrid-frequency").forEach((t=>{t.classList.contains("engrid-frequency--lowercase")?t.innerHTML=e.toLowerCase():t.classList.contains("engrid-frequency--capitalized")?t.innerHTML=e.charAt(0).toUpperCase()+e.slice(1):t.classList.contains("engrid-frequency--uppercase")?t.innerHTML=e.toUpperCase():t.innerHTML=e}))}replaceMergeTags(e,t){const n="onetime"===this._frequency.frequency?"one-time":this._frequency.frequency,i=document.createElement("span");switch(i.classList.add("engrid-frequency"),i.innerHTML=n,e){case"[[frequency]]":i.classList.add("engrid-frequency--lowercase"),i.innerHTML=i.innerHTML.toLowerCase(),t.innerHTML=t.innerHTML.replace(e,i.outerHTML);break;case"[[Frequency]]":i.classList.add("engrid-frequency--capitalized"),i.innerHTML=i.innerHTML.charAt(0).toUpperCase()+i.innerHTML.slice(1),t.innerHTML=t.innerHTML.replace(e,i.outerHTML);break;case"[[FREQUENCY]]":i.classList.add("engrid-frequency--uppercase"),i.innerHTML=i.innerHTML.toUpperCase(),t.innerHTML=t.innerHTML.replace(e,i.outerHTML)}}}class Ue{constructor(){this.logger=new be("UniversalOptIn","#f0f0f0","#d2691e","πŸͺž"),this._elements=document.querySelectorAll(".universal-opt-in, .universal-opt-in_null"),this.shouldRun()&&this.addEventListeners()}shouldRun(){return 0===this._elements.length?(this.logger.log("No universal opt-in elements found. Skipping."),!1):(this.logger.log(`Found ${this._elements.length} universal opt-in elements.`),!0)}addEventListeners(){this._elements.forEach((e=>{const t=e.querySelectorAll(".en__field__input--radio, .en__field__input--checkbox");t.length>0&&t.forEach((n=>{n.addEventListener("click",(()=>{if(n instanceof HTMLInputElement&&"checkbox"===n.getAttribute("type")){return void(n.checked?(this.logger.log("Yes/No "+n.getAttribute("type")+" is checked"),t.forEach((e=>{n!==e&&e instanceof HTMLInputElement&&"checkbox"===e.getAttribute("type")&&(e.checked=!0)}))):(this.logger.log("Yes/No "+n.getAttribute("type")+" is unchecked"),t.forEach((e=>{n!==e&&e instanceof HTMLInputElement&&"checkbox"===e.getAttribute("type")&&(e.checked=!1)}))))}"Y"===n.getAttribute("value")?(this.logger.log("Yes/No "+n.getAttribute("type")+" is checked"),t.forEach((e=>{const t=e.getAttribute("name"),i=n.getAttribute("name");t&&t!==i&&p.setFieldValue(t,"Y")}))):(this.logger.log("Yes/No "+n.getAttribute("type")+" is unchecked"),t.forEach((t=>{const i=t.getAttribute("name"),s=n.getAttribute("name");i&&i!==s&&(e.classList.contains("universal-opt-in")?p.setFieldValue(i,"N"):t.checked=!1)})))}))}))}))}}class $e{constructor(){this.logger=new be("Plaid","peru","yellow","πŸ”—"),this._form=d.getInstance(),this.logger.log("Enabled"),this._form.onSubmit.subscribe((()=>this.submit()))}submit(){const e=document.querySelector("#plaid-link-button");if(e&&"Link Account"===e.textContent){this.logger.log("Clicking Link"),e.click(),this._form.submit=!1;new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{e.nodeType===Node.TEXT_NODE&&("Account Linked"===e.nodeValue?(this.logger.log("Plaid Linked"),this._form.submit=!0,this._form.submitForm()):this._form.submit=!0)}))}))})).observe(e,{childList:!0,subtree:!0}),window.setTimeout((()=>{this.logger.log("Enabling Submit"),p.enableSubmit()}),1e3)}}}class We{constructor(){if(this.logger=new be("GiveBySelect","#FFF","#333","πŸ‡"),this.transactionGiveBySelect=document.getElementsByName("transaction.giveBySelect"),this.vgsField=document.querySelector(".en__field--vgs"),!this.transactionGiveBySelect)return;this.transactionGiveBySelect.forEach((e=>{e.addEventListener("change",(()=>{this.logger.log("Changed to "+e.value),"card"===e.value.toLowerCase()?this.vgsField?p.setPaymentType("visa"):p.setPaymentType(""):p.setPaymentType(e.value)}))}));const e=p.getPaymentType();if(e){this.logger.log("Setting giveBySelect to "+e);const t=["visa","mastercard","amex","discover","diners","jcb","vi","mc","ax","dc","di","jc"].includes(e.toLowerCase());this.transactionGiveBySelect.forEach((n=>{(t&&"card"===n.value.toLowerCase()||n.value.toLowerCase()===e.toLowerCase())&&(n.checked=!0)}))}}}class Ge{constructor(){this.logger=new be("UrlParamsToBodyAttrs","white","magenta","πŸ“Œ"),this.urlParams=new URLSearchParams(document.location.search),this.urlParams.forEach(((e,t)=>{t.startsWith("data-engrid-")&&(p.setBodyData(t.split("data-engrid-")[1],e),this.logger.log(`Set "${t}" on body to "${e}" from URL params`))}))}}class ze{constructor(){this.opened=!1,this.dataLayer=window.dataLayer||[],this.logger=new be("ExitIntentLightbox","yellow","black","πŸšͺ"),this.triggerDelay=1e3,this.triggerTimeout=null;let e="EngridExitIntent"in window?window.EngridExitIntent:{};if(this.options=Object.assign(Object.assign({},l),e),!this.options.enabled)return void this.logger.log("Not enabled");if(ne(this.options.cookieName))return void this.logger.log("Not showing - cookie found.");const t=Object.keys(this.options.triggers).filter((e=>this.options.triggers[e])).join(", ");this.logger.log("Enabled, waiting for trigger. Active triggers: "+t),this.watchForTriggers()}watchForTriggers(){window.addEventListener("load",(()=>{setTimeout((()=>{this.options.triggers.mousePosition&&this.watchMouse(),this.options.triggers.visibilityState&&this.watchDocumentVisibility()}),this.triggerDelay)}))}watchMouse(){document.addEventListener("mouseout",(e=>{if("input"==e.target.tagName.toLowerCase())return;const t=Math.max(document.documentElement.clientWidth,window.innerWidth||0);if(e.clientX>=t-50)return;if(e.clientY>=50)return;const n=e.relatedTarget;n||(this.logger.log("Triggered by mouse position"),this.open()),this.triggerTimeout||(this.triggerTimeout=window.setTimeout((()=>{n||(this.logger.log("Triggered by mouse position"),this.open()),this.triggerTimeout=null}),this.triggerDelay))}))}watchDocumentVisibility(){const e=()=>{"hidden"===document.visibilityState&&(this.triggerTimeout||(this.triggerTimeout=window.setTimeout((()=>{this.logger.log("Triggered by visibilityState is hidden"),this.open(),document.removeEventListener("visibilitychange",e),this.triggerTimeout=null}),this.triggerDelay)))};document.addEventListener("visibilitychange",e)}open(){var e,t,n;this.opened||(p.setBodyData("exit-intent-lightbox","open"),ie(this.options.cookieName,"1",{expires:this.options.cookieDuration}),document.body.insertAdjacentHTML("beforeend",`\n <div class="ExitIntent">\n <div class="ExitIntent__overlay">\n <div class="ExitIntent__container">\n <div class="ExitIntent__close">X</div>\n <div class="ExitIntent__body">\n <h2>${this.options.title}</h2>\n <p>${this.options.text}</p>\n <button type="button" class="ExitIntent__button">\n ${this.options.buttonText}\n </button>\n </div>\n </div>\n </div>\n </div>\n `),this.opened=!0,this.dataLayer.push({event:"exit_intent_lightbox_shown"}),null===(e=document.querySelector(".ExitIntent__close"))||void 0===e||e.addEventListener("click",(()=>{this.dataLayer.push({event:"exit_intent_lightbox_closed"}),this.close()})),null===(t=document.querySelector(".ExitIntent__overlay"))||void 0===t||t.addEventListener("click",(e=>{e.target===e.currentTarget&&(this.dataLayer.push({event:"exit_intent_lightbox_closed"}),this.close())})),null===(n=document.querySelector(".ExitIntent__button"))||void 0===n||n.addEventListener("click",(()=>{this.dataLayer.push({event:"exit_intent_lightbox_cta_clicked"}),this.close();const e=this.options.buttonLink;if(e.startsWith(".")||e.startsWith("#")){const t=document.querySelector(e);t&&t.scrollIntoView({behavior:"smooth"})}else window.open(e,"_blank")})))}close(){var e;null===(e=document.querySelector(".ExitIntent"))||void 0===e||e.remove(),p.setBodyData("exit-intent-lightbox","closed")}}class Ye{constructor(){this.logger=new be("SupporterHub","black","pink","πŸ›–"),this._form=d.getInstance(),this.shoudRun()&&(this.logger.log("Enabled"),this.watch())}shoudRun(){return"pageJson"in window&&"pageType"in window.pageJson&&"supporterhub"===window.pageJson.pageType}watch(){const e=p.enForm;new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{if("DIV"===e.nodeName){const t=e;(t.classList.contains("en__hubOverlay")||t.classList.contains("en__hubPledge__panels"))&&(this.logger.log("Overlay found"),this.creditCardUpdate(e),this.amountLabelUpdate(e))}}))}))})).observe(e,{childList:!0,subtree:!0});const t=document.querySelector(".en__hubOverlay");t&&(this.creditCardUpdate(t),this.amountLabelUpdate(t))}creditCardUpdate(e){window.setTimeout((()=>{const t=e.querySelector("#en__hubPledge__field--ccnumber"),n=e.querySelector(".en__hubUpdateCC__toggle");t&&n&&t.addEventListener("focus",(()=>{this.logger.log("Credit Card field focused"),n.click()}))}),300)}amountLabelUpdate(e){window.setTimeout((()=>{const t=e.querySelector(".en__field--donationAmt");t&&t.querySelectorAll(".en__field__element--radio .en__field__item").forEach((e=>{e.setAttribute("data-engrid-currency-symbol-updated","true")}))}),300)}}class Je{constructor(){this.logger=new be("FastFormFill","white","magenta","πŸ“Œ"),this.rememberMeEvents=f.getInstance(),p.getOption("RememberMe")?(this.rememberMeEvents.onLoad.subscribe((e=>{this.logger.log("Remember me - onLoad",e),this.run()})),this.rememberMeEvents.onClear.subscribe((()=>{this.logger.log("Remember me - onClear")}))):this.run()}run(){const e=document.querySelector(".en__component--formblock.fast-personal-details");e&&(Je.allMandatoryInputsAreFilled(e)?(this.logger.log("Personal details - All mandatory inputs are filled"),p.setBodyData("hide-fast-personal-details","true")):(this.logger.log("Personal details - Not all mandatory inputs are filled"),p.setBodyData("hide-fast-personal-details","false")));const t=document.querySelector(".en__component--formblock.fast-address-details");t&&(Je.allMandatoryInputsAreFilled(t)?(this.logger.log("Address details - All mandatory inputs are filled"),p.setBodyData("hide-fast-address-details","true")):(this.logger.log("Address details - Not all mandatory inputs are filled"),p.setBodyData("hide-fast-address-details","false")))}static allMandatoryInputsAreFilled(e){return[...e.querySelectorAll(".en__mandatory input, .en__mandatory select, .en__mandatory textarea")].every((e=>{if("radio"===e.type||"checkbox"===e.type){return[...document.querySelectorAll('[name="'+e.name+'"]')].some((e=>e.checked))}return null!==e.value&&""!==e.value.trim()}))}static someMandatoryInputsAreFilled(e){return[...e.querySelectorAll(".en__mandatory input, .en__mandatory select, .en__mandatory textarea")].some((e=>{if("radio"===e.type||"checkbox"===e.type){return[...document.querySelectorAll('[name="'+e.name+'"]')].some((e=>e.checked))}return null!==e.value&&""!==e.value.trim()}))}}class Ke{constructor(){this.logger=new be("SetAttr","black","yellow","πŸ“Œ");const e=document.getElementById("engrid");e&&e.addEventListener("click",(e=>{const t=e.target;if("string"!=typeof t.className)return;t.className.split(" ").some((e=>e.startsWith("setattr--")))&&t.classList.forEach((e=>{const t=e.match(/^setattr--(.+)--(.+)$/i);t&&t[1]&&t[2]&&(this.logger.log(`Clicked element with class "${e}". Setting body attribute "${t[1]}" to "${t[2]}"`),p.setBodyData(t[1].replace("data-engrid-",""),t[2]))}))}))}}class Xe{constructor(){this.logger=new be("ShowIfPresent","yellow","black","πŸ‘€"),this.elements=[],this.shouldRun()&&this.run()}shouldRun(){return this.elements=[...document.querySelectorAll('[class*="engrid__supporterquestions"]')].filter((e=>e.className.split(" ").some((e=>/^engrid__supporterquestions\d+(__supporterquestions\d+)*-(present|absent)$/.test(e))))),this.elements.length>0}run(){const e=[];this.elements.forEach((t=>{const n=t.className.split(" ").find((e=>/^engrid__supporterquestions\d+(__supporterquestions\d+)*-(present|absent)$/.test(e)));if(!n)return null;const i=n.lastIndexOf("-"),s=n.substring(i+1),r=n.substring(8,i).split("__").map((e=>`supporter.questions.${e.substring(18)}`));e.push({class:n,fieldNames:r,type:s})})),e.forEach((e=>{const t=e.fieldNames.map((e=>document.getElementsByName(e)[0])),n=document.querySelectorAll(`.${e.class}`),i=t.every((e=>!!e)),s=t.every((e=>!e));("present"===e.type&&s||"absent"===e.type&&i)&&(this.logger.log(`Conditions not met, hiding elements with class ${e.class}`),n.forEach((e=>{e.style.display="none"})))}))}}class Qe{constructor(){this._form=d.getInstance(),this._enElements=null,this.logger=new be("ENValidators","white","darkolivegreen","🧐"),this.loadValidators()?this.shouldRun()?this._form.onValidate.subscribe(this.enOnValidate.bind(this)):this.logger.log("Not Needed"):this.logger.error("Not Loaded")}loadValidators(){if(!p.checkNested(window.EngagingNetworks,"require","_defined","enValidation","validation","validators"))return!1;const e=window.EngagingNetworks.require._defined.enValidation.validation.validators;return this._enElements=e.reduce(((e,t)=>{if("type"in t&&"CUST"===t.type){const n=document.querySelector(".en__field--"+t.field),i=n?n.querySelector("input, select, textarea"):null;i&&(i.addEventListener("input",this.liveValidate.bind(this,n,i,t.regex,t.message)),e.push({container:n,field:i,regex:t.regex,message:t.message}))}return e}),[]),!0}shouldRun(){return p.getOption("ENValidators")&&this._enElements&&this._enElements.length>0}enOnValidate(){this._enElements&&!1!==this._form.validate&&(this._enElements.forEach((e=>{if(!this.liveValidate(e.container,e.field,e.regex,e.message))return this._form.validate=!1,void e.field.focus()})),this._form.validate=!0)}liveValidate(e,t,n,i){const s=p.getFieldValue(t.getAttribute("name")||"");return""===s||(this.logger.log(`Live Validate ${t.getAttribute("name")} with ${n}`),s.match(n)?(p.removeError(e),!0):(p.setError(e,i),!1))}}class Ze{constructor(){var e,t;this.postalCodeField=p.getField("supporter.postcode"),this._form=d.getInstance(),this.logger=new be("Postal Code Validator","white","red","πŸ“¬"),this.supportedSeparators=["+","-"," "],this.separator=this.getSeparator(),this.regexSeparator=this.getRegexSeparator(this.separator),this.shouldRun()&&(null===(e=this.postalCodeField)||void 0===e||e.addEventListener("blur",(()=>this.validate())),null===(t=this.postalCodeField)||void 0===t||t.addEventListener("input",(()=>this.liveValidate())),this._form.onValidate.subscribe((()=>{if(!this._form.validate)return;this.liveValidate(),setTimeout((()=>{this.validate()}),100);const e=!this.shouldValidateUSZipCode()||this.isValidUSZipCode();return this._form.validate=e,e||(this.logger.log(`Invalid Zip Code ${this.postalCodeField.value}`),this.postalCodeField.scrollIntoView({behavior:"smooth"})),e})))}shouldRun(){return!(!p.getOption("PostalCodeValidator")||!this.postalCodeField)}validate(){this.shouldValidateUSZipCode()&&!this.isValidUSZipCode()?p.setError(".en__field--postcode",`Please enter a valid ZIP Code of ##### or #####${this.separator}####`):p.removeError(".en__field--postcode")}isValidUSZipCode(){var e,t;if(!!!document.querySelector(".en__field--postcode.en__mandatory")&&""===(null===(e=this.postalCodeField)||void 0===e?void 0:e.value))return!0;const n=new RegExp(`^\\d{5}(${this.regexSeparator}\\d{4})?$`);return!!(null===(t=this.postalCodeField)||void 0===t?void 0:t.value.match(n))}liveValidate(){var e;if(!this.shouldValidateUSZipCode())return;let t=null===(e=this.postalCodeField)||void 0===e?void 0:e.value;t.length<=5?t=t.replace(/\D/g,""):6===t.length&&this.supportedSeparators.includes(t[5])?t=t.replace(/\D/g,"")+this.separator:(t=t.replace(/\D/g,""),t=t.replace(/(\d{5})(\d)/,`$1${this.separator}$2`)),this.postalCodeField.value=t.slice(0,10)}shouldValidateUSZipCode(){const e=p.getField("supporter.country")?p.getFieldValue("supporter.country"):"US";return["us","united states","usa",""].includes(e.toLowerCase())}getSeparator(){const e=p.getOption("TidyContact");return e&&e.us_zip_divider&&this.supportedSeparators.includes(e.us_zip_divider)?e.us_zip_divider:"-"}getRegexSeparator(e){switch(e){case"+":return"\\+";case"-":return"-";case" ":return"\\s";default:return this.logger.log(`Invalid separator "${e}" provided to PostalCodeValidator, falling back to "-".`),"-"}}}class et{constructor(){this.logger=new be("VGS","black","pink","πŸ’³"),this.vgsField=document.querySelector(".en__field--vgs"),this.options=p.getOption("VGS"),this.paymentTypeField=document.querySelector("#en__field_transaction_paymenttype"),this._form=d.getInstance(),this.shouldRun()&&(this.setPaymentType(),this.setDefaults(),this.dumpGlobalVar(),this._form.onValidate.subscribe((()=>{if(this._form.validate){const e=this.validate();this.logger.log(`Form Validation: ${e}`),this._form.validate=e}})))}shouldRun(){return!!this.vgsField}setDefaults(){const e={color:getComputedStyle(document.body).getPropertyValue("--input_placeholder-color")||"#a9a9a9",opacity:getComputedStyle(document.body).getPropertyValue("--input_placeholder-opacity")||"1",fontWeight:getComputedStyle(document.body).getPropertyValue("--input_placeholder-font-weight")||"normal"},t=this.options,n={"transaction.ccnumber":{showCardIcon:!0,placeholder:"β€’β€’β€’β€’ β€’β€’β€’β€’ β€’β€’β€’β€’ β€’β€’β€’β€’",icons:{cardPlaceholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAABMCAYAAADHl1ErAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB8ElEQVR4nO2c4W3CMBBGz1H/NyNkAzoCo2SDrkI3YJSOABt0g9IJXBnOqUkMyifUqkrek04RlvMjT2c7sc6EGKPBfBpcaSBMBGEiCBNBmAjCRBAmgjARhIkgTARhIggTQZhK2q0Yh5l1ZrYzs0PqsrI4+LN3VTeThkvntUm6Fbuxn2E/LITQmtm7mW08Sb/MbO9tpxhjui6WEMLWzJKDdO3N7Nmf9ZjaYoyn8y8X1o6GXxLV1lJyDeE+9oWPQ/ZRG4b9WkVVpqe+8LLLo7ErM6t248qllZnWBc+uV5+zumGsQjm3f/ic9tb4JGeeXcga4U723rptilVx0avgg2Q3m/JNn+y6zeAm+GSWUi/c7L5yfB77RJhACOHs6WnuLfmGpTI3YditEEGYCMJEECaCMJHZqySvHRfIMBGEiSBMBGEiCBNBmAjCRBAmgjARhIkgTGT2t+R/59EdYXZcfwmEiSBMBGEiCBNZzCr5VzvCZJjIIMxrPKFC6abMsHbaFcZuGq8StqKwDqZkN8emKBbrvawHCtxJ7y1nVxQF34lxUXBupOy8EtWy88jBhknUDjbkPhyd+Xn2l9lHZ8rgcNZVTA5nTYRFjv/dPf7HvzuJ8C0pgjARhIkgTARhIggTQZgIwkQQJoIwEYSJIEwEYQpm9g2Ro5zhLcuLBwAAAABJRU5ErkJggg=="},css:{"&::placeholder":e},autoComplete:"cc-number",validations:["required","validCardNumber"]},"transaction.ccvv":{showCardIcon:!1,placeholder:"CVV",hideValue:!1,autoComplete:"cc-csc",validations:["required","validCardSecurityCode"],css:{"&::placeholder":e}}};this.options=p.deepMerge(n,t),this.logger.log("Theme Options",t),this.logger.log("Merged Options",this.options)}setPaymentType(){if(this.paymentTypeField)for(let e=0;e<this.paymentTypeField.options.length;e++)if("visa"===this.paymentTypeField.options[e].value.toLowerCase()||"vi"===this.paymentTypeField.options[e].value.toLowerCase()){this.paymentTypeField.selectedIndex=e;break}}dumpGlobalVar(){window.enVGSFields=this.options,window.setTimeout((()=>{const e=document.querySelectorAll(".en__field__input--vgs");if(e.length>0){const t=new MutationObserver((e=>{e.forEach((e=>{var t;if("childList"===e.type&&e.addedNodes.length>0&&e.addedNodes.forEach((t=>{"IFRAME"===t.nodeName&&e.previousSibling&&"IFRAME"===e.previousSibling.nodeName&&e.previousSibling.remove()})),"attributes"===e.type&&"class"===e.attributeName){const n=e.target;if(n.classList.contains("vgs-collect-container__valid")){const e=n.closest(".en__field--vgs");null==e||e.classList.remove("en__field--validationFailed"),null===(t=null==e?void 0:e.querySelector(".en__field__error"))||void 0===t||t.remove()}}}))}));e.forEach((e=>{t.observe(e,{childList:!0,attributeFilter:["class"]})})),p.checkNested(window.EngagingNetworks,"require","_defined","enjs","vgs")?window.EngagingNetworks.require._defined.enjs.vgs.init():this.logger.log("VGS is not defined")}}),1e3)}validate(){if("visa"===this.paymentTypeField.value.toLowerCase()||"vi"===this.paymentTypeField.value.toLowerCase()){const e=document.querySelector(".en__field--vgs.en__field--ccnumber"),t=e.querySelector(".vgs-collect-container__empty"),n=document.querySelector(".en__field--vgs.en__field--ccvv"),i=n.querySelector(".vgs-collect-container__empty");if(e&&t)return window.setTimeout((()=>{p.setError(e,"Please enter a valid card number"),e.scrollIntoView({behavior:"smooth"})}),100),!1;if(n&&i)return window.setTimeout((()=>{p.setError(n,"Please enter a valid CVV"),n.scrollIntoView({behavior:"smooth"})}),100),!1}return!0}}class tt{constructor(){this.logger=new be("CountryRedirect","white","brown","πŸ›«"),this._country=b.getInstance(),this.shouldRun()&&(this._country.onCountryChange.subscribe((e=>{this.checkRedirect(e)})),this.checkRedirect(this._country.country))}shouldRun(){return!(!p.getOption("CountryRedirect")||!this._country.countryField)}checkRedirect(e){const t=p.getOption("CountryRedirect");if(t&&e in t&&!1===window.location.href.includes(t[e])){this.logger.log(`${e}: Redirecting to ${t[e]}`);let n=new URL(t[e]);n.search.includes("chain")||(n.search+=(n.search?"&":"?")+"chain"),window.location.href=n.href}}}class nt{constructor(){var e;this.supporterDetails={},this.options=null!==(e=p.getOption("WelcomeBack"))&&void 0!==e&&e,this.shouldRun()&&(this.supporterDetails={firstName:p.getFieldValue("supporter.firstName"),lastName:p.getFieldValue("supporter.lastName"),emailAddress:p.getFieldValue("supporter.emailAddress"),address1:p.getFieldValue("supporter.address1"),address2:p.getFieldValue("supporter.address2"),city:p.getFieldValue("supporter.city"),region:p.getFieldValue("supporter.region"),postcode:p.getFieldValue("supporter.postcode"),country:p.getFieldValue("supporter.country")},this.addWelcomeBack(),this.addPersonalDetailsSummary(),this.addEventListeners())}shouldRun(){return!!document.querySelector(".fast-personal-details")&&!1!==this.options}addWelcomeBack(){var e;if("object"!=typeof this.options||!this.options.welcomeBackMessage.display)return;const t=this.options.welcomeBackMessage,n=document.createElement("div");n.classList.add("engrid-welcome-back","showif-fast-personal-details");const i=t.title.replace("{firstName}",this.supporterDetails.firstName);n.innerHTML=`<p>\n ${i}\n <span class="engrid-reset-welcome-back">${t.editText}</span>\n </p>`,null===(e=document.querySelector(t.anchor))||void 0===e||e.insertAdjacentElement(t.placement,n)}resetWelcomeBack(){var e;document.querySelectorAll(".fast-personal-details .en__field__input").forEach((e=>{"checkbox"===e.type||"radio"===e.type?e.checked=!1:e.value=""})),this.supporterDetails={},p.setBodyData("hide-fast-personal-details",!1),ie("engrid-autofill","",Object.assign(Object.assign({},e),{expires:-1}))}addPersonalDetailsSummary(){var e;if("object"!=typeof this.options||!this.options.personalDetailsSummary.display)return;let t=this.options.personalDetailsSummary;const n=document.createElement("div");n.classList.add("engrid-personal-details-summary","showif-fast-personal-details"),n.innerHTML=`<h3>${t.title}</h3>`,n.insertAdjacentHTML("beforeend",`\n <p>\n ${this.supporterDetails.firstName} ${this.supporterDetails.lastName}\n <br>\n ${this.supporterDetails.emailAddress}\n </p>\n `),this.supporterDetails.address1&&this.supporterDetails.city&&this.supporterDetails.region&&this.supporterDetails.postcode&&n.insertAdjacentHTML("beforeend",`\n <p>\n ${this.supporterDetails.address1} ${this.supporterDetails.address2}\n <br>\n ${this.supporterDetails.city}, ${this.supporterDetails.region} \n ${this.supporterDetails.postcode}\n </p>\n `),n.insertAdjacentHTML("beforeend",`\n <p class="engrid-welcome-back-clear setattr--data-engrid-hide-fast-personal-details--false">${t.editText}<svg viewbox="0 0 528.899 528.899" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M328.883,89.125l107.59,107.589l-272.34,272.34L56.604,361.465L328.883,89.125z M518.113,63.177l-47.981-47.981 c-18.543-18.543-48.653-18.543-67.259,0l-45.961,45.961l107.59,107.59l53.611-53.611 C532.495,100.753,532.495,77.559,518.113,63.177z M0.3,512.69c-1.958,8.812,5.998,16.708,14.811,14.565l119.891-29.069 L27.473,390.597L0.3,512.69z"></path></g></svg></p>\n `),null===(e=document.querySelector(t.anchor))||void 0===e||e.insertAdjacentElement(t.placement,n)}addEventListeners(){document.querySelectorAll(".engrid-reset-welcome-back").forEach((e=>{e.addEventListener("click",(()=>{this.resetWelcomeBack()}))}))}}const it={targetName:"",targetEmail:"",hideSendDate:!0,hideTarget:!0,hideMessage:!0,addSupporterNameToMessage:!1};class st{constructor(){this.options=it,this.logger=new be("EcardToTarget","DarkBlue","Azure","πŸ“§"),this._form=d.getInstance(),this.supporterNameAddedToMessage=!1,this.shouldRun()&&(this.options=Object.assign(Object.assign({},this.options),window.EngridEcardToTarget),this.logger.log("EcardToTarget running. Options:",this.options),this.setTarget(),this.hideElements(),this.addSupporterNameToMessage())}shouldRun(){return window.hasOwnProperty("EngridEcardToTarget")&&"object"==typeof window.EngridEcardToTarget&&window.EngridEcardToTarget.hasOwnProperty("targetName")&&window.EngridEcardToTarget.hasOwnProperty("targetEmail")}setTarget(){const e=document.querySelector(".en__ecardrecipients__name input"),t=document.querySelector(".en__ecardrecipients__email input"),n=document.querySelector(".en__ecarditems__addrecipient");e&&t&&n?(e.value=this.options.targetName,t.value=this.options.targetEmail,null==n||n.click(),this.logger.log("Added recipient",this.options.targetName,this.options.targetEmail)):this.logger.error("Could not add recipient. Required elements not found.")}hideElements(){const e=document.querySelector(".en__ecardmessage"),t=document.querySelector(".en__ecardrecipients__futureDelivery"),n=document.querySelector(".en__ecardrecipients");this.options.hideMessage&&e&&e.classList.add("hide"),this.options.hideSendDate&&t&&t.classList.add("hide"),this.options.hideTarget&&n&&n.classList.add("hide")}addSupporterNameToMessage(){this.options.addSupporterNameToMessage&&this._form.onSubmit.subscribe((()=>{if(this._form.submit&&!this.supporterNameAddedToMessage){this.supporterNameAddedToMessage=!0;const e=`${p.getFieldValue("supporter.firstName")} ${p.getFieldValue("supporter.lastName")}`,t=document.querySelector("[name='transaction.comments']");if(!t)return;t.value=`${t.value}\n${e}`,this.logger.log("Added supporter name to personalized message",e)}}))}}const rt="0.17.18";var ot=n(523),at=n.n(ot);/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&(window.__forceSmoothScrollPolyfill__=!0),at().polyfill();class lt{constructor(e,t){if(!this.isIframe())return;if(this.amount=e,this.frequency=t,this.ipCountry="",this.isDonation=["donation","premiumgift"].includes(window.pageJson.pageType),console.log("DonationLightboxForm: constructor"),this.sections=document.querySelectorAll("form.en__component > .en__component"),pageJson.pageNumber===pageJson.pageCount){this.sendMessage("status","loaded"),this.isDonation&&this.sendMessage("status","celebrate"),this.sendMessage("class","thank-you"),document.querySelector("body").dataset.thankYou="true";const e=new URLSearchParams(window.location.search);if(e.get("name")){let t=document.querySelector("#engrid");if(t){let n=t.innerHTML;n=n.replace("{user_data~First Name}",e.get("name")),n=n.replace("{receipt_data~recurringFrequency}",e.get("frequency")),n=n.replace("{receipt_data~amount}","$"+e.get("amount")),t.innerHTML=n,this.sendMessage("firstname",e.get("name"))}}else{const e=this,t=location.protocol+"//"+location.host+location.pathname+"/pagedata";fetch(t).then((function(e){return e.json()})).then((function(t){t.hasOwnProperty("firstName")&&null!==t.firstName?e.sendMessage("firstname",t.firstName):e.sendMessage("firstname","Friend")})).catch((e=>{console.error("PageData Error:",e)}))}return!1}if(!this.sections.length)return this.sendMessage("error","No sections found"),!1;if(console.log(this.sections),this.isIframe()){if(this.buildSectionNavigation(),this.checkNested(EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")&&EngagingNetworks.require._defined.enjs.checkSubmissionFailed()&&(console.log("DonationLightboxForm: Submission Failed"),this.validateForm())){const e=document.querySelector("li.en__error");e&&(e.innerHTML.toLowerCase().indexOf("problem processing")>-1?(this.sendMessage("error","Sorry! There's a problem processing your donation."),this.scrollToElement(document.querySelector(".en__field--ccnumber"))):this.sendMessage("error",e.textContent),(e.innerHTML.toLowerCase().indexOf("payment")>-1||e.innerHTML.toLowerCase().indexOf("account")>-1)&&this.scrollToElement(document.querySelector(".en__field--ccnumber")))}document.querySelectorAll("form.en__component input.en__field__input").forEach((e=>{e.addEventListener("focus",(t=>{const n=this.getSectionId(e);setTimeout((()=>{n>0&&this.validateForm(n-1)&&this.scrollToElement(e)}),50)}))}))}let n=document.querySelector(".payment-options");n&&this.clickPaymentOptions(n),this.addTabIndexToLabels(),t.getInstance().onFrequencyChange.subscribe((()=>this.changeSubmitButton())),e.getInstance().onAmountChange.subscribe((()=>this.changeSubmitButton())),this.changeSubmitButton(),this.sendMessage("status","loaded");const i=new URLSearchParams(window.location.search);i.get("color")&&document.body.style.setProperty("--color_primary",i.get("color")),fetch("https://www.cloudflare.com/cdn-cgi/trace").then((e=>e.text())).then((e=>{let t=e.replace(/[\r\n]+/g,'","').replace(/\=+/g,'":"');t='{"'+t.slice(0,t.lastIndexOf('","'))+'"}';const n=JSON.parse(t);this.ipCountry=n.loc,this.canadaOnly(),console.log("Country:",this.ipCountry)}));const s=document.querySelector("#en__field_supporter_country");s&&s.addEventListener("change",(e=>{this.canadaOnly()}))}sendMessage(e,t){const n={key:e,value:t};window.parent.postMessage(n,"*")}isIframe(){return window.self!==window.top}buildSectionNavigation(){console.log("DonationLightboxForm: buildSectionNavigation"),this.sections.forEach(((e,t)=>{var n,i,s;e.dataset.sectionId=t;const r=document.createElement("div");r.classList.add("section-navigation");const o=document.createElement("div");o.classList.add("section-count");const a=this.sections.length;if(a>1)0==t?r.innerHTML=`\n <button class="section-navigation__next" data-section-id="${t}">\n <span>Let’s Do It!</span>\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="currentColor" d="M7.687 13.313c-.38.38-.995.38-1.374 0-.38-.38-.38-.996 0-1.375L10 8.25H1.1c-.608 0-1.1-.493-1.1-1.1 0-.608.492-1.1 1.1-1.1h9.2L6.313 2.062c-.38-.38-.38-.995 0-1.375s.995-.38 1.374 0L14 7l-6.313 6.313z"/>\n </svg>\n </button>\n `:t==this.sections.length-1?r.innerHTML=`\n <button class="section-navigation__previous" data-section-id="${t}">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <path fill="currentColor" d="M7.214.786c.434-.434 1.138-.434 1.572 0 .433.434.433 1.137 0 1.571L4.57 6.572h10.172c.694 0 1.257.563 1.257 1.257s-.563 1.257-1.257 1.257H4.229l4.557 4.557c.433.434.433 1.137 0 1.571-.434.434-1.138.434-1.572 0L0 8 7.214.786z"/>\n </svg>\n </button>\n <button class="section-navigation__submit" data-section-id="${t}" type="submit" data-label="Give $AMOUNT$FREQUENCY">\n <span>Give Now</span>\n </button>\n `:r.innerHTML=`\n <button class="section-navigation__previous" data-section-id="${t}">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <path fill="currentColor" d="M7.214.786c.434-.434 1.138-.434 1.572 0 .433.434.433 1.137 0 1.571L4.57 6.572h10.172c.694 0 1.257.563 1.257 1.257s-.563 1.257-1.257 1.257H4.229l4.557 4.557c.433.434.433 1.137 0 1.571-.434.434-1.138.434-1.572 0L0 8 7.214.786z"/>\n </svg>\n </button>\n <button class="section-navigation__next" data-section-id="${t}">\n <span>Continue</span>\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="currentColor" d="M7.687 13.313c-.38.38-.995.38-1.374 0-.38-.38-.38-.996 0-1.375L10 8.25H1.1c-.608 0-1.1-.493-1.1-1.1 0-.608.492-1.1 1.1-1.1h9.2L6.313 2.062c-.38-.38-.38-.995 0-1.375s.995-.38 1.374 0L14 7l-6.313 6.313z"/>\n </svg>\n </button>\n `,o.innerHTML=`\n <span class="section-count__current">${t+1}</span> of\n <span class="section-count__total">${a}</span>\n `;else{var l;const e=(null===(l=document.querySelector(".en__submit button"))||void 0===l?void 0:l.innerText)||"Submit";r.innerHTML=`\n <button class="section-navigation__submit" data-section-id="${t}" type="submit" data-label="${e}">\n <span>${e}</span>\n </button>\n `}null===(n=r.querySelector(".section-navigation__previous"))||void 0===n||n.addEventListener("click",(e=>{e.preventDefault(),this.scrollToSection(t-1)})),null===(i=r.querySelector(".section-navigation__next"))||void 0===i||i.addEventListener("click",(e=>{e.preventDefault(),this.validateForm(t)&&this.scrollToSection(t+1)})),null===(s=r.querySelector(".section-navigation__submit"))||void 0===s||s.addEventListener("click",(e=>{if(e.preventDefault(),this.validateForm())if(this.isDonation){this.sendMessage("donationinfo",JSON.stringify({name:document.querySelector("#en__field_supporter_firstName").value,amount:EngagingNetworks.require._defined.enjs.getDonationTotal(),frequency:this.frequency.getInstance().frequency}));if("paypal"!=document.querySelector("#en__field_transaction_paymenttype").value)this.sendMessage("status","loading");else{const e=this;document.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState?e.sendMessage("status","submitted"):e.sendMessage("status","loading")})),document.querySelector("form.en__component").target="_blank"}document.querySelector("form.en__component").submit()}else this.sendMessage("status","loading"),document.querySelector("form.en__component").submit()})),e.querySelector(".en__component").append(r),e.querySelector(".en__component").append(o)}))}scrollToSection(e){console.log("DonationLightboxForm: scrollToSection",e);const t=document.querySelector(`[data-section-id="${e}"]`);this.sections[e]&&(console.log(t),this.sections[e].scrollIntoView({behavior:"smooth"}))}scrollToElement(e){if(e){const t=this.getSectionId(e);t&&this.scrollToSection(t)}}getSectionId(e){return!!e&&e.closest("[data-section-id]").dataset.sectionId}validateForm(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=document.querySelector("form.en__component"),n=t.querySelector("[name='transaction.recurrfreq']:checked"),i=t.querySelector(".en__field--recurrfreq"),s=this.getSectionId(i);if(this.isDonation){if(!1===e||e==s){if(!n||!n.value)return this.scrollToElement(t.querySelector("[name='transaction.recurrfreq']:checked")),this.sendMessage("error","Please select a frequency"),i&&i.classList.add("has-error"),!1;i&&i.classList.remove("has-error")}const r=EngagingNetworks.require._defined.enjs.getDonationTotal(),o=t.querySelector(".en__field--donationAmt"),a=this.getSectionId(o);if(!1===e||e==a){if(!r||r<=0)return this.scrollToElement(o),this.sendMessage("error","Please enter a valid amount"),o&&o.classList.add("has-error"),!1;if(r<5)return this.sendMessage("error","Amount must be at least $5 - Contact us for assistance"),o&&o.classList.add("has-error"),!1;if(r>3e4)return this.sendMessage("error","Amount must be less than $30,000 - Contact us for assistance"),o&&o.classList.add("has-error"),!1;o&&o.classList.remove("has-error")}const l=t.querySelector("#en__field_transaction_paymenttype"),c=t.querySelector("#en__field_transaction_ccnumber"),u=t.querySelector(".en__field--ccnumber"),d=this.getSectionId(u);if(console.log("DonationLightboxForm: validateForm",u,d),!1===e||e==d){if(!l||!l.value)return this.scrollToElement(l),this.sendMessage("error","Please add your credit card information"),u&&u.classList.add("has-error"),!1;if("paypal"!==l.value){if(!c||!c.value)return this.scrollToElement(c),this.sendMessage("error","Please add your credit card information"),u&&u.classList.add("has-error"),!1;if(u&&u.classList.remove("has-error"),!1===/^\d+$/.test(c.value))return this.scrollToElement(c),this.sendMessage("error","Only numbers are allowed on credit card"),u&&u.classList.add("has-error"),!1;u&&u.classList.remove("has-error");const e=t.querySelectorAll("[name='transaction.ccexpire']"),n=t.querySelector(".en__field--ccexpire");let i=!0;if(e.forEach((e=>{if(!e.value)return this.scrollToElement(n),this.sendMessage("error","Please enter a valid expiration date"),n&&n.classList.add("has-error"),i=!1,!1})),!i&&n)return!1;n&&n.classList.remove("has-error");const s=t.querySelector("#en__field_transaction_ccvv"),r=t.querySelector(".en__field--ccvv");if(!s||!s.value)return this.scrollToElement(s),this.sendMessage("error","Please enter a valid CVV"),r&&r.classList.add("has-error"),!1;r&&r.classList.remove("has-error")}}}const r=t.querySelectorAll(".en__mandatory");let o=!1;if(r.forEach((t=>{if(o)return;const n=t.querySelector(".en__field__input"),i=t.querySelector(".en__field__label"),s=this.getSectionId(n);if(!1===e||e==s){if(!n.value)return this.scrollToElement(n),this.sendMessage("error","Please enter "+i.textContent),t.classList.add("has-error"),o=!0,!1;if(t.classList.remove("has-error"),"supporter.emailAddress"===n.name&&!1===/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.value))return this.scrollToElement(n),this.sendMessage("error","Please enter a valid email address"),t.classList.add("has-error"),o=!0,!1}})),o)return!1;const a=t.querySelector("#en__field_supporter_city"),l=t.querySelector(".en__field--city");if(!this.checkCharsLimit("#en__field_supporter_city",100))return this.scrollToElement(a),this.sendMessage("error","This field only allows up to 100 characters"),l&&l.classList.add("has-error"),!1;l&&l.classList.remove("has-error");const c=t.querySelector("#en__field_supporter_address1"),u=t.querySelector(".en__field--address1");if(!this.checkCharsLimit("#en__field_supporter_address1",35))return this.scrollToElement(c),this.sendMessage("error","This field only allows up to 35 characters. Longer street addresses can be broken up between Lines 1 and 2."),u&&u.classList.add("has-error"),!1;u&&u.classList.remove("has-error");const d=t.querySelector("#en__field_supporter_address2"),h=t.querySelector(".en__field--address2");if(!this.checkCharsLimit("#en__field_supporter_address2",35))return this.scrollToElement(d),this.sendMessage("error","This field only allows up to 35 characters. Longer street addresses can be broken up between Lines 1 and 2."),h&&h.classList.add("has-error"),!1;h&&h.classList.remove("has-error");const p=t.querySelector("#en__field_supporter_postcode"),g=t.querySelector(".en__field--postcode");if(!this.checkCharsLimit("#en__field_supporter_postcode",20))return this.scrollToElement(p),this.sendMessage("error","This field only allows up to 20 characters"),g&&g.classList.add("has-error"),!1;g&&g.classList.remove("has-error");const m=t.querySelector("#en__field_supporter_firstName"),f=t.querySelector(".en__field--firstName");if(!this.checkCharsLimit("#en__field_supporter_firstName",100))return this.scrollToElement(m),this.sendMessage("error","This field only allows up to 100 characters"),f&&f.classList.add("has-error"),!1;f&&f.classList.remove("has-error");const b=t.querySelector("#en__field_supporter_lastName"),v=t.querySelector(".en__field--lastName");return this.checkCharsLimit("#en__field_supporter_lastName",100)?(v&&v.classList.remove("has-error"),console.log("DonationLightboxForm: validateForm PASSED"),!0):(this.scrollToElement(b),this.sendMessage("error","This field only allows up to 100 characters"),v&&v.classList.add("has-error"),!1)}checkCharsLimit(e,t){const n=document.querySelector(e);return!(n&&n.value.length>t)}changeSubmitButton(){const e=document.querySelector(".section-navigation__submit"),t=this.checkNested(window.EngagingNetworks,"require","_defined","enjs","getDonationTotal")?"$"+window.EngagingNetworks.require._defined.enjs.getDonationTotal():null;let n=this.frequency.getInstance().frequency,i=e?e.dataset.label:"";n="onetime"===n?"":"<small>/mo</small>",t?(i=i.replace("$AMOUNT",t),i=i.replace("$FREQUENCY",n)):(i=i.replace("$AMOUNT",""),i=i.replace("$FREQUENCY","")),e&&i&&(e.innerHTML=`<span>${i}</span>`)}clickPaymentOptions(e){e.querySelectorAll("button").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const n=document.querySelector("#en__field_transaction_paymenttype");n&&(n.value=e.className.substr(15),this.scrollToSection(parseInt(e.closest("[data-section-id]").dataset.sectionId)+1))}))}))}isCanada(){const e=document.querySelector("#en__field_supporter_country");if(e&&"CA"===e.value)return!0;return"en-CA"===(window.navigator.userLanguage||window.navigator.language)||"CA"===this.ipCountry}canadaOnly(){const e=document.querySelectorAll(".canada-only");e.length&&(this.isCanada()?e.forEach((e=>{e.style.display="";const t=e.querySelectorAll("input[type='checkbox']");t.length&&t.forEach((e=>{e.checked=!1}))})):e.forEach((e=>{e.style.display="none";const t=e.querySelectorAll("input[type='checkbox']");t.length&&t.forEach((e=>{e.checked=!0}))})))}checkNested(e,t){if(void 0===e)return!1;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return!(0!=i.length||!e.hasOwnProperty(t))||this.checkNested(e[t],...i)}addTabIndexToLabels(){document.querySelectorAll(".en__field__label.en__field__label--item").forEach((e=>{e.tabIndex=0}))}}const ct={applePay:!1,CapitalizeFields:!0,ClickToExpand:!0,CurrencySymbol:"$",CurrencyCode:"USD",DecimalSeparator:".",ThousandsSeparator:",",MinAmount:5,MaxAmount:1e5,MinAmountMessage:"Amount must be at least $5 - Contact us for assistance",MaxAmountMessage:"Amount must be less than $100,000 - Contact us for assistance",MediaAttribution:!0,SkipToMainContentLink:!0,SrcDefer:!0,ProgressBar:!0,TidyContact:{cid:"659b7129-73d0-4601-af4c-8942c4730f65",us_zip_divider:"+",record_field:"supporter.NOT_TAGGED_41",date_field:"supporter.NOT_TAGGED_39",status_field:"supporter.NOT_TAGGED_40",countries:["us"],phone_enable:!0,phone_preferred_countries:["us","ca","gb","jp","au"],phone_record_field:"supporter.NOT_TAGGED_45",phone_date_field:"supporter.NOT_TAGGED_44",phone_status_field:"supporter.NOT_TAGGED_43"},RememberMe:{checked:!0,remoteUrl:"https://www.ran.org/wp-content/themes/ran-2020/data-remember.html",fieldOptInSelectorTarget:"div.en__field--postcode, div.en__field--telephone, div.en__field--email, div.en__field--lastName",fieldOptInSelectorTargetLocation:"after",fieldClearSelectorTarget:"div.en__field--firstName div, div.en__field--email div",fieldClearSelectorTargetLocation:"after",fieldNames:["supporter.firstName","supporter.lastName","supporter.address1","supporter.address2","supporter.city","supporter.country","supporter.region","supporter.postcode","supporter.emailAddress"]},Plaid:!0,Debug:"true"==v.getUrlParameter("debug"),onLoad:()=>{window.DonationLightboxForm=lt,new lt(h,g),function(e,t){if(e.log("ENGrid client scripts are executing"),e.getPageNumber()===e.getPageCount()||document.referrer.includes("act.ran.org")){const e=document.createElement("iframe");e.src="https://act.ran.org/page/51899/data/1?chain",e.style.width="0",e.style.height="0",e.style.visibility="hidden",e.style.display="none",e.width="0",e.height="0",e.name="cohortIframe",e.visibility="hidden";const t=document.querySelector("#endgrid, form");t&&t.appendChild(e)}let n=document.querySelectorAll(".radio-to-buttons_donationAmt .en__field--radio.en__field--donationAmt .en__field__input--other")[0];n&&(n.placeholder="Custom Amount");let i=document.querySelectorAll("input#en__field_supporter_phoneNumber")[0];i&&(i.placeholder="000-000-0000 (optional)");const s=e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),r=document.querySelectorAll("[name='transaction.recurrfreq']"),o=document.querySelector("[name='transaction.paycurrency']"),a=document.querySelectorAll(".give-by-select .en__field__item");r&&o&&a&&[...r,o].forEach((t=>{t.addEventListener("change",(()=>{e.log("CHANGING"),window.setTimeout((()=>{const t=document.querySelector("[name='transaction.giveBySelect']:checked");if(t){const n=t.closest(".en__field__item");s(n)||[...a].every((t=>{if(s(t))return e.log(`Clicking on ${t.querySelector("label").innerText}`),t.querySelector("label").click(),!1}))}}),500)}))}));const l=document.querySelector(".media-with-attribution figattribution");if(l){const e=l._tippy;e&&e.setProps({allowHTML:!0,theme:"RAN",placement:"right-end"})}document.body.removeAttribute("data-engrid-errors");const c=document.querySelector('[name="transaction.paymenttype"] [value="ACH"]');c&&(c.value="ach");const u=document.querySelector(".en__submit");if(u&&u.classList.add("hideif-stripedigitalwallet-selected","hideif-paypaltouch-selected"),"UNSUBSCRIBE"===e.getPageType()){const n=document.querySelector(".en__submit button"),i=e.getField("supporter.questions.341509"),s=e.getField("supporter.questions.102600"),r=e.getFieldValue("supporter.emailAddress");if(r){e.getField("supporter.emailAddress").setAttribute("readonly","true");const t=document.createElement("a");t.href=window.location.href.split("?")[0]+"?redirect=cold",t.innerText=`Not ${r}?`,e.addHtml(t,".en__field--emailAddress","beforeend")}const o=document.querySelector(".fewer-emails-block");i&&i.checked&&o&&(o.style.display="none");const a=document.querySelector(".fewer-emails-block button");a&&a.addEventListener("click",(()=>{i.checked=!0,s.checked=!1,e.enParseDependencies(),n.click()}));const l=document.querySelector(".sub-emails-block button");l&&l.addEventListener("click",(()=>{i.checked=!1,s.checked=!0,e.enParseDependencies(),n.click()}));const c=document.querySelector(".unsub-emails-block button");if(c&&c.addEventListener("click",(()=>{i.checked=!1,s.checked=!1,e.enParseDependencies(),n.click()})),t.getInstance().onSubmit.subscribe((()=>{s.checked||sessionStorage.setItem("unsub_details",JSON.stringify({email:e.getFieldValue("supporter.emailAddress")}))})),2===e.getPageNumber()){const t=JSON.parse(sessionStorage.getItem("unsub_details"));if(t){e.setBodyData("recent-unsubscribe","true");const n=document.querySelector(".resubscribe-block a.button");n&&(n.href=n.href+`?supporter.emailAddress=${t.email}&autosubmit=Y&engrid_hide[engrid]=id`),sessionStorage.removeItem("unsub_details")}}}const d=document.querySelector("button.en__ecarditems__button.en__ecarditems__addrecipient");d&&(d.innerHTML="Add Recipient")}(v,d)},onResize:()=>console.log("Starter Theme Window Resized"),onValidate:()=>{const e=v.getFieldValue("supporter.country");["us","usa","united states","ca","canada"].includes(e.toLowerCase())||(v.setFieldValue("supporter.region",""),v.log("Region field cleared"))}};new v(ct)})()})(); \ No newline at end of file + */Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionChangeEventDispatcher=t.HandlingBase=t.PromiseDispatcherBase=t.PromiseSubscription=t.DispatchError=t.EventManagement=t.EventListBase=t.DispatcherWrapper=t.DispatcherBase=t.Subscription=void 0;const i=n(3040);Object.defineProperty(t,"DispatcherBase",{enumerable:!0,get:function(){return i.DispatcherBase}});const s=n(8181);Object.defineProperty(t,"DispatchError",{enumerable:!0,get:function(){return s.DispatchError}});const r=n(3122);Object.defineProperty(t,"DispatcherWrapper",{enumerable:!0,get:function(){return r.DispatcherWrapper}});const o=n(7955);Object.defineProperty(t,"EventListBase",{enumerable:!0,get:function(){return o.EventListBase}});const a=n(2234);Object.defineProperty(t,"EventManagement",{enumerable:!0,get:function(){return a.EventManagement}});const l=n(1605);Object.defineProperty(t,"HandlingBase",{enumerable:!0,get:function(){return l.HandlingBase}});const c=n(2490);Object.defineProperty(t,"PromiseDispatcherBase",{enumerable:!0,get:function(){return c.PromiseDispatcherBase}});const u=n(9347);Object.defineProperty(t,"PromiseSubscription",{enumerable:!0,get:function(){return u.PromiseSubscription}});const d=n(2229);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return d.Subscription}});const h=n(1002);Object.defineProperty(t,"SubscriptionChangeEventDispatcher",{enumerable:!0,get:function(){return h.SubscriptionChangeEventDispatcher}})},2234:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventManagement=void 0;t.EventManagement=class{constructor(e){this.unsub=e,this.propagationStopped=!1}stopPropagation(){this.propagationStopped=!0}}},3861:(e,t,n)=>{"use strict";function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function s(e){return e instanceof i(e).Element||e instanceof Element}function r(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}n.d(t,{ZP:()=>ot});var a=Math.max,l=Math.min,c=Math.round;function u(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),i=1,s=1;if(r(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(i=c(n.width)/a||1),o>0&&(s=c(n.height)/o||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function d(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function h(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((s(e)?e.ownerDocument:e.document)||window.document).documentElement}function g(e){return u(p(e)).left+d(e).scrollLeft}function m(e){return i(e).getComputedStyle(e)}function f(e){var t=m(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function b(e,t,n){void 0===n&&(n=!1);var s,o,a=r(t),l=r(t)&&function(e){var t=e.getBoundingClientRect(),n=c(t.width)/e.offsetWidth||1,i=c(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),m=p(t),b=u(e,l),v={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(a||!a&&!n)&&(("body"!==h(t)||f(m))&&(v=(s=t)!==i(s)&&r(s)?{scrollLeft:(o=s).scrollLeft,scrollTop:o.scrollTop}:d(s)),r(t)?((y=u(t,!0)).x+=t.clientLeft,y.y+=t.clientTop):m&&(y.x=g(m))),{x:b.left+v.scrollLeft-y.x,y:b.top+v.scrollTop-y.y,width:b.width,height:b.height}}function v(e){var t=u(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function y(e){return"html"===h(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||p(e)}function _(e){return["html","body","#document"].indexOf(h(e))>=0?e.ownerDocument.body:r(e)&&f(e)?e:_(y(e))}function S(e,t){var n;void 0===t&&(t=[]);var s=_(e),r=s===(null==(n=e.ownerDocument)?void 0:n.body),o=i(s),a=r?[o].concat(o.visualViewport||[],f(s)?s:[]):s,l=t.concat(a);return r?l:l.concat(S(y(a)))}function w(e){return["table","td","th"].indexOf(h(e))>=0}function E(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function C(e){for(var t=i(e),n=E(e);n&&w(n)&&"static"===m(n).position;)n=E(n);return n&&("html"===h(n)||"body"===h(n)&&"static"===m(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&r(e)&&"fixed"===m(e).position)return null;for(var n=y(e);r(n)&&["html","body"].indexOf(h(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}var A="top",L="bottom",x="right",D="left",k="auto",F=[A,L,x,D],N="start",T="end",P="viewport",O="popper",M=F.reduce((function(e,t){return e.concat([t+"-"+N,t+"-"+T])}),[]),q=[].concat(F,[k]).reduce((function(e,t){return e.concat([t,t+"-"+N,t+"-"+T])}),[]),I=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function B(e){var t=new Map,n=new Set,i=[];function s(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&s(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||s(e)})),i}var R={placement:"bottom",modifiers:[],strategy:"absolute"};function j(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function V(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?R:r;return function(e,t,n){void 0===n&&(n=o);var r,a,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},R,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,d={state:l,setOptions:function(n){var r="function"==typeof n?n(l.options):n;h(),l.options=Object.assign({},o,l.options,r),l.scrollParents={reference:s(e)?S(e):e.contextElement?S(e.contextElement):[],popper:S(t)};var a=function(e){var t=B(e);return I.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(i,l.options.modifiers)));return l.orderedModifiers=a.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,s=e.effect;if("function"==typeof s){var r=s({state:l,name:t,instance:d,options:i}),o=function(){};c.push(r||o)}})),d.update()},forceUpdate:function(){if(!u){var e=l.elements,t=e.reference,n=e.popper;if(j(t,n)){l.rects={reference:b(t,C(n),"fixed"===l.options.strategy),popper:v(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<l.orderedModifiers.length;i++)if(!0!==l.reset){var s=l.orderedModifiers[i],r=s.fn,o=s.options,a=void 0===o?{}:o,c=s.name;"function"==typeof r&&(l=r({state:l,options:a,name:c,instance:d})||l)}else l.reset=!1,i=-1}}},update:(r=function(){return new Promise((function(e){d.forceUpdate(),e(l)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(r())}))}))),a}),destroy:function(){h(),u=!0}};if(!j(e,t))return d;function h(){c.forEach((function(e){return e()})),c=[]}return d.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),d}}var H={passive:!0};function U(e){return e.split("-")[0]}function $(e){return e.split("-")[1]}function W(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function G(e){var t,n=e.reference,i=e.element,s=e.placement,r=s?U(s):null,o=s?$(s):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(r){case A:t={x:a,y:n.y-i.height};break;case L:t={x:a,y:n.y+n.height};break;case x:t={x:n.x+n.width,y:l};break;case D:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=r?W(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case N:t[c]=t[c]-(n[u]/2-i[u]/2);break;case T:t[c]=t[c]+(n[u]/2-i[u]/2)}}return t}var z={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Y(e){var t,n=e.popper,s=e.popperRect,r=e.placement,o=e.variation,a=e.offsets,l=e.position,u=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,g=e.isFixed,f=a.x,b=void 0===f?0:f,v=a.y,y=void 0===v?0:v,_="function"==typeof h?h({x:b,y}):{x:b,y};b=_.x,y=_.y;var S=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),E=D,k=A,F=window;if(d){var N=C(n),P="clientHeight",O="clientWidth";if(N===i(n)&&"static"!==m(N=p(n)).position&&"absolute"===l&&(P="scrollHeight",O="scrollWidth"),N=N,r===A||(r===D||r===x)&&o===T)k=L,y-=(g&&F.visualViewport?F.visualViewport.height:N[P])-s.height,y*=u?1:-1;if(r===D||(r===A||r===L)&&o===T)E=x,b-=(g&&F.visualViewport?F.visualViewport.width:N[O])-s.width,b*=u?1:-1}var M,q=Object.assign({position:l},d&&z),I=!0===h?function(e){var t=e.x,n=e.y,i=window.devicePixelRatio||1;return{x:c(t*i)/i||0,y:c(n*i)/i||0}}({x:b,y}):{x:b,y};return b=I.x,y=I.y,u?Object.assign({},q,((M={})[k]=w?"0":"",M[E]=S?"0":"",M.transform=(F.devicePixelRatio||1)<=1?"translate("+b+"px, "+y+"px)":"translate3d("+b+"px, "+y+"px, 0)",M)):Object.assign({},q,((t={})[k]=w?y+"px":"",t[E]=S?b+"px":"",t.transform="",t))}const J={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},s=t.elements[e];r(s)&&h(s)&&(Object.assign(s.style,n),Object.keys(i).forEach((function(e){var t=i[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],s=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(i)&&h(i)&&(Object.assign(i.style,o),Object.keys(s).forEach((function(e){i.removeAttribute(e)})))}))}},requires:["computeStyles"]};const K={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,s=n.offset,r=void 0===s?[0,0]:s,o=q.reduce((function(e,n){return e[n]=function(e,t,n){var i=U(e),s=[D,A].indexOf(i)>=0?-1:1,r="function"==typeof n?n(Object.assign({},t,{placement:e})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[D,x].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}(n,t.rects,r),e}),{}),a=o[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=o}};var X={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(e){return e.replace(/left|right|bottom|top/g,(function(e){return X[e]}))}var Z={start:"end",end:"start"};function ee(e){return e.replace(/start|end/g,(function(e){return Z[e]}))}function te(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ne(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ie(e,t){return t===P?ne(function(e){var t=i(e),n=p(e),s=t.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,l=0;return s&&(r=s.width,o=s.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=s.offsetLeft,l=s.offsetTop)),{width:r,height:o,x:a+g(e),y:l}}(e)):s(t)?function(e){var t=u(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):ne(function(e){var t,n=p(e),i=d(e),s=null==(t=e.ownerDocument)?void 0:t.body,r=a(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=a(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-i.scrollLeft+g(e),c=-i.scrollTop;return"rtl"===m(s||n).direction&&(l+=a(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:l,y:c}}(p(e)))}function se(e,t,n){var i="clippingParents"===t?function(e){var t=S(y(e)),n=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?C(e):e;return s(n)?t.filter((function(e){return s(e)&&te(e,n)&&"body"!==h(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),c=o[0],u=o.reduce((function(t,n){var i=ie(e,n);return t.top=a(i.top,t.top),t.right=l(i.right,t.right),t.bottom=l(i.bottom,t.bottom),t.left=a(i.left,t.left),t}),ie(e,c));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function re(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function oe(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ae(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=void 0===i?e.placement:i,o=n.boundary,a=void 0===o?"clippingParents":o,l=n.rootBoundary,c=void 0===l?P:l,d=n.elementContext,h=void 0===d?O:d,g=n.altBoundary,m=void 0!==g&&g,f=n.padding,b=void 0===f?0:f,v=re("number"!=typeof b?b:oe(b,F)),y=h===O?"reference":O,_=e.rects.popper,S=e.elements[m?y:h],w=se(s(S)?S:S.contextElement||p(e.elements.popper),a,c),E=u(e.elements.reference),C=G({reference:E,element:_,strategy:"absolute",placement:r}),D=ne(Object.assign({},_,C)),k=h===O?D:E,N={top:w.top-k.top+v.top,bottom:k.bottom-w.bottom+v.bottom,left:w.left-k.left+v.left,right:k.right-w.right+v.right},T=e.modifiersData.offset;if(h===O&&T){var M=T[r];Object.keys(N).forEach((function(e){var t=[x,L].indexOf(e)>=0?1:-1,n=[A,L].indexOf(e)>=0?"y":"x";N[e]+=M[n]*t}))}return N}function le(e,t,n){return a(e,l(t,n))}const ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,r=void 0===s||s,o=n.altAxis,c=void 0!==o&&o,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.padding,g=n.tether,m=void 0===g||g,f=n.tetherOffset,b=void 0===f?0:f,y=ae(t,{boundary:u,rootBoundary:d,padding:p,altBoundary:h}),_=U(t.placement),S=$(t.placement),w=!S,E=W(_),k="x"===E?"y":"x",F=t.modifiersData.popperOffsets,T=t.rects.reference,P=t.rects.popper,O="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,M="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(F){if(r){var B,R="y"===E?A:D,j="y"===E?L:x,V="y"===E?"height":"width",H=F[E],G=H+y[R],z=H-y[j],Y=m?-P[V]/2:0,J=S===N?T[V]:P[V],K=S===N?-P[V]:-T[V],X=t.elements.arrow,Q=m&&X?v(X):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=Z[R],te=Z[j],ne=le(0,T[V],Q[V]),ie=w?T[V]/2-Y-ne-ee-M.mainAxis:J-ne-ee-M.mainAxis,se=w?-T[V]/2+Y+ne+te+M.mainAxis:K+ne+te+M.mainAxis,re=t.elements.arrow&&C(t.elements.arrow),oe=re?"y"===E?re.clientTop||0:re.clientLeft||0:0,ce=null!=(B=null==q?void 0:q[E])?B:0,ue=H+se-ce,de=le(m?l(G,H+ie-ce-oe):G,H,m?a(z,ue):z);F[E]=de,I[E]=de-H}if(c){var he,pe="x"===E?A:D,ge="x"===E?L:x,me=F[k],fe="y"===k?"height":"width",be=me+y[pe],ve=me-y[ge],ye=-1!==[A,D].indexOf(_),_e=null!=(he=null==q?void 0:q[k])?he:0,Se=ye?be:me-T[fe]-P[fe]-_e+M.altAxis,we=ye?me+T[fe]+P[fe]-_e-M.altAxis:ve,Ee=m&&ye?function(e,t,n){var i=le(e,t,n);return i>n?n:i}(Se,me,we):le(m?Se:be,me,m?we:ve);F[k]=Ee,I[k]=Ee-me}t.modifiersData[i]=I}},requiresIfExists:["offset"]};const ue={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,s=e.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=U(n.placement),l=W(a),c=[D,x].indexOf(a)>=0?"height":"width";if(r&&o){var u=function(e,t){return re("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:oe(e,F))}(s.padding,n),d=v(r),h="y"===l?A:D,p="y"===l?L:x,g=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],m=o[l]-n.rects.reference[l],f=C(r),b=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,y=g/2-m/2,_=u[h],S=b-d[c]-u[p],w=b/2-d[c]/2+y,E=le(_,w,S),k=l;n.modifiersData[i]=((t={})[k]=E,t.centerOffset=E-w,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&te(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function de(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function he(e){return[A,x,L,D].some((function(t){return e[t]>=0}))}var pe=V({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,s=e.options,r=s.scroll,o=void 0===r||r,a=s.resize,l=void 0===a||a,c=i(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,H)})),l&&c.addEventListener("resize",n.update,H),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,H)})),l&&c.removeEventListener("resize",n.update,H)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=G({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=void 0===i||i,r=n.adaptive,o=void 0===r||r,a=n.roundOffsets,l=void 0===a||a,c={placement:U(t.placement),variation:$(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Y(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Y(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},J,K,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,r=void 0===s||s,o=n.altAxis,a=void 0===o||o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,g=void 0===p||p,m=n.allowedAutoPlacements,f=t.options.placement,b=U(f),v=l||(b===f||!g?[Q(f)]:function(e){if(U(e)===k)return[];var t=Q(e);return[ee(e),t,ee(t)]}(f)),y=[f].concat(v).reduce((function(e,n){return e.concat(U(n)===k?function(e,t){void 0===t&&(t={});var n=t,i=n.placement,s=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?q:l,u=$(i),d=u?a?M:M.filter((function(e){return $(e)===u})):F,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=ae(e,{placement:n,boundary:s,rootBoundary:r,padding:o})[U(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:m}):n)}),[]),_=t.rects.reference,S=t.rects.popper,w=new Map,E=!0,C=y[0],T=0;T<y.length;T++){var P=y[T],O=U(P),I=$(P)===N,B=[A,L].indexOf(O)>=0,R=B?"width":"height",j=ae(t,{placement:P,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),V=B?I?x:D:I?L:A;_[R]>S[R]&&(V=Q(V));var H=Q(V),W=[];if(r&&W.push(j[O]<=0),a&&W.push(j[V]<=0,j[H]<=0),W.every((function(e){return e}))){C=P,E=!1;break}w.set(P,W)}if(E)for(var G=function(e){var t=y.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},z=g?3:1;z>0;z--){if("break"===G(z))break}t.placement!==C&&(t.modifiersData[i]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ce,ue,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,o=ae(t,{elementContext:"reference"}),a=ae(t,{altBoundary:!0}),l=de(o,i),c=de(a,s,r),u=he(l),d=he(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),ge="tippy-content",me="tippy-backdrop",fe="tippy-arrow",be="tippy-svg-arrow",ve={passive:!0,capture:!0},ye=function(){return document.body};function _e(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function Se(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function we(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Ee(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function Ce(e){return[].concat(e)}function Ae(e,t){-1===e.indexOf(t)&&e.push(t)}function Le(e){return e.split("-")[0]}function xe(e){return[].slice.call(e)}function De(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function ke(){return document.createElement("div")}function Fe(e){return["Element","Fragment"].some((function(t){return Se(e,t)}))}function Ne(e){return Se(e,"MouseEvent")}function Te(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function Pe(e){return Fe(e)?[e]:function(e){return Se(e,"NodeList")}(e)?xe(e):Array.isArray(e)?e:xe(document.querySelectorAll(e))}function Oe(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Me(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function qe(e){var t,n=Ce(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function Ie(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[i](t,n)}))}function Be(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var Re={isTouch:!1},je=0;function Ve(){Re.isTouch||(Re.isTouch=!0,window.performance&&document.addEventListener("mousemove",He))}function He(){var e=performance.now();e-je<20&&(Re.isTouch=!1,document.removeEventListener("mousemove",He)),je=e}function Ue(){var e=document.activeElement;if(Te(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var $e=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var We={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ge=Object.assign({appendTo:ye,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},We,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),ze=Object.keys(Ge);function Ye(e){var t=(e.plugins||[]).reduce((function(t,n){var i,s=n.name,r=n.defaultValue;s&&(t[s]=void 0!==e[s]?e[s]:null!=(i=Ge[s])?i:r);return t}),{});return Object.assign({},e,t)}function Je(e,t){var n=Object.assign({},t,{content:we(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ye(Object.assign({},Ge,{plugins:t}))):ze).reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Ge.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Ke(e,t){e.innerHTML=t}function Xe(e){var t=ke();return!0===e?t.className=fe:(t.className=be,Fe(e)?t.appendChild(e):Ke(t,e)),t}function Qe(e,t){Fe(t.content)?(Ke(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Ke(e,t.content):e.textContent=t.content)}function Ze(e){var t=e.firstElementChild,n=xe(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ge)})),arrow:n.find((function(e){return e.classList.contains(fe)||e.classList.contains(be)})),backdrop:n.find((function(e){return e.classList.contains(me)}))}}function et(e){var t=ke(),n=ke();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=ke();function s(n,i){var s=Ze(t),r=s.box,o=s.content,a=s.arrow;i.theme?r.setAttribute("data-theme",i.theme):r.removeAttribute("data-theme"),"string"==typeof i.animation?r.setAttribute("data-animation",i.animation):r.removeAttribute("data-animation"),i.inertia?r.setAttribute("data-inertia",""):r.removeAttribute("data-inertia"),r.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?r.setAttribute("role",i.role):r.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||Qe(o,e.props),i.arrow?a?n.arrow!==i.arrow&&(r.removeChild(a),r.appendChild(Xe(i.arrow))):r.appendChild(Xe(i.arrow)):a&&r.removeChild(a)}return i.className=ge,i.setAttribute("data-state","hidden"),Qe(i,e.props),t.appendChild(n),n.appendChild(i),s(e.props,e.props),{popper:t,onUpdate:s}}et.$$tippy=!0;var tt=1,nt=[],it=[];function st(e,t){var n,i,s,r,o,a,l,c,u=Je(e,Object.assign({},Ge,Ye(De(t)))),d=!1,h=!1,p=!1,g=!1,m=[],f=Ee(z,u.interactiveDebounce),b=tt++,v=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),y={id:b,reference:e,popper:ke(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(s)},setProps:function(t){0;if(y.state.isDestroyed)return;P("onBeforeUpdate",[y,t]),W();var n=y.props,i=Je(e,Object.assign({},n,De(t),{ignoreAttributes:!0}));y.props=i,$(),n.interactiveDebounce!==i.interactiveDebounce&&(q(),f=Ee(z,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?Ce(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):i.triggerTarget&&e.removeAttribute("aria-expanded");M(),T(),w&&w(n,i);y.popperInstance&&(X(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));P("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){0;var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=Re.isTouch&&!y.props.touch,s=_e(y.props.duration,0,Ge.duration);if(e||t||n||i)return;if(D().hasAttribute("disabled"))return;if(P("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,x()&&(S.style.visibility="visible");T(),j(),y.state.isMounted||(S.style.transition="none");if(x()){var r=F(),o=r.box,l=r.content;Oe([o,l],0)}a=function(){var e;if(y.state.isVisible&&!g){if(g=!0,S.offsetHeight,S.style.transition=y.props.moveTransition,x()&&y.props.animation){var t=F(),n=t.box,i=t.content;Oe([n,i],s),Me([n,i],"visible")}O(),M(),Ae(it,y),null==(e=y.popperInstance)||e.forceUpdate(),P("onMount",[y]),y.props.animation&&x()&&function(e,t){H(e,t)}(s,(function(){y.state.isShown=!0,P("onShown",[y])}))}},function(){var e,t=y.props.appendTo,n=D();e=y.props.interactive&&t===ye||"parent"===t?n.parentNode:we(t,[n]);e.contains(S)||e.appendChild(S);y.state.isMounted=!0,X(),!1}()},hide:function(){0;var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=_e(y.props.duration,1,Ge.duration);if(e||t||n)return;if(P("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,g=!1,d=!1,x()&&(S.style.visibility="hidden");if(q(),V(),T(!0),x()){var s=F(),r=s.box,o=s.content;y.props.animation&&(Oe([r,o],i),Me([r,o],"hidden"))}O(),M(),y.props.animation?x()&&function(e,t){H(e,(function(){!y.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&t()}))}(i,y.unmount):y.unmount()},hideWithInteractivity:function(e){0;k().addEventListener("mousemove",f),Ae(nt,f),f(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){0;y.state.isVisible&&y.hide();if(!y.state.isMounted)return;Q(),Z().forEach((function(e){e._tippy.unmount()})),S.parentNode&&S.parentNode.removeChild(S);it=it.filter((function(e){return e!==y})),y.state.isMounted=!1,P("onHidden",[y])},destroy:function(){0;if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),W(),delete e._tippy,y.state.isDestroyed=!0,P("onDestroy",[y])}};if(!u.render)return y;var _=u.render(y),S=_.popper,w=_.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+y.id,y.popper=S,e._tippy=y,S._tippy=y;var E=v.map((function(e){return e.fn(y)})),C=e.hasAttribute("aria-expanded");return $(),M(),T(),P("onCreate",[y]),u.showOnCreate&&ee(),S.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),S.addEventListener("mouseleave",(function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&k().addEventListener("mousemove",f)})),y;function A(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===A()[0]}function x(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function D(){return l||e}function k(){var e=D().parentNode;return e?qe(e):document}function F(){return Ze(S)}function N(e){return y.state.isMounted&&!y.state.isVisible||Re.isTouch||r&&"focus"===r.type?0:_e(y.props.delay,e?0:1,Ge.delay)}function T(e){void 0===e&&(e=!1),S.style.pointerEvents=y.props.interactive&&!e?"":"none",S.style.zIndex=""+y.props.zIndex}function P(e,t,n){var i;(void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(i=y.props)[e].apply(i,t)}function O(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,i=S.id;Ce(y.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var s=t&&t.replace(i,"").trim();s?e.setAttribute(n,s):e.removeAttribute(n)}}))}}function M(){!C&&y.props.aria.expanded&&Ce(y.props.triggerTarget||e).forEach((function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===D()?"true":"false"):e.removeAttribute("aria-expanded")}))}function q(){k().removeEventListener("mousemove",f),nt=nt.filter((function(e){return e!==f}))}function I(t){if(!Re.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!Be(S,n)){if(Ce(y.props.triggerTarget||e).some((function(e){return Be(e,n)}))){if(Re.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else P("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),h=!0,setTimeout((function(){h=!1})),y.state.isMounted||V())}}}function B(){p=!0}function R(){p=!1}function j(){var e=k();e.addEventListener("mousedown",I,!0),e.addEventListener("touchend",I,ve),e.addEventListener("touchstart",R,ve),e.addEventListener("touchmove",B,ve)}function V(){var e=k();e.removeEventListener("mousedown",I,!0),e.removeEventListener("touchend",I,ve),e.removeEventListener("touchstart",R,ve),e.removeEventListener("touchmove",B,ve)}function H(e,t){var n=F().box;function i(e){e.target===n&&(Ie(n,"remove",i),t())}if(0===e)return t();Ie(n,"remove",o),Ie(n,"add",i),o=i}function U(t,n,i){void 0===i&&(i=!1),Ce(y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,i),m.push({node:e,eventType:t,handler:n,options:i})}))}function $(){var e;L()&&(U("touchstart",G,{passive:!0}),U("touchend",Y,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(U(e,G),e){case"mouseenter":U("mouseleave",Y);break;case"focus":U($e?"focusout":"blur",J);break;case"focusin":U("focusout",J)}}))}function W(){m.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,s=e.options;t.removeEventListener(n,i,s)})),m=[]}function G(e){var t,n=!1;if(y.state.isEnabled&&!K(e)&&!h){var i="focus"===(null==(t=r)?void 0:t.type);r=e,l=e.currentTarget,M(),!y.state.isVisible&&Ne(e)&&nt.forEach((function(t){return t(e)})),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||d)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!i&&te(e)}}function z(e){var t=e.target,n=D().contains(t)||S.contains(t);if("mousemove"!==e.type||!n){var i=Z().concat(S).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,i=t.clientY;return e.every((function(e){var t=e.popperRect,s=e.popperState,r=e.props.interactiveBorder,o=Le(s.placement),a=s.modifiersData.offset;if(!a)return!0;var l="bottom"===o?a.top.y:0,c="top"===o?a.bottom.y:0,u="right"===o?a.left.x:0,d="left"===o?a.right.x:0,h=t.top-i+l>r,p=i-t.bottom-c>r,g=t.left-n+u>r,m=n-t.right-d>r;return h||p||g||m}))})(i,e)&&(q(),te(e))}}function Y(e){K(e)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function J(e){y.props.trigger.indexOf("focusin")<0&&e.target!==D()||y.props.interactive&&e.relatedTarget&&S.contains(e.relatedTarget)||te(e)}function K(e){return!!Re.isTouch&&L()!==e.type.indexOf("touch")>=0}function X(){Q();var t=y.props,n=t.popperOptions,i=t.placement,s=t.offset,r=t.getReferenceClientRect,o=t.moveTransition,l=x()?Ze(S).arrow:null,c=r?{getBoundingClientRect:r,contextElement:r.contextElement||D()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(x()){var n=F().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:s}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!o}},u];x()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),y.popperInstance=pe(c,S,Object.assign({},n,{placement:i,onFirstUpdate:a,modifiers:d}))}function Q(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Z(){return xe(S.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&P("onTrigger",[y,e]),j();var t=N(!0),i=A(),s=i[0],r=i[1];Re.isTouch&&"hold"===s&&r&&(t=r),t?n=setTimeout((function(){y.show()}),t):y.show()}function te(e){if(y.clearDelayTimeouts(),P("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=N(!1);t?i=setTimeout((function(){y.state.isVisible&&y.hide()}),t):s=requestAnimationFrame((function(){y.hide()}))}}else V()}}function rt(e,t){void 0===t&&(t={});var n=Ge.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Ve,ve),window.addEventListener("blur",Ue);var i=Object.assign({},t,{plugins:n}),s=Pe(e).reduce((function(e,t){var n=t&&st(t,i);return n&&e.push(n),e}),[]);return Fe(e)?s[0]:s}rt.defaultProps=Ge,rt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Ge[t]=e[t]}))},rt.currentInput=Re;Object.assign({},J,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});rt.setDefaultProps({render:et});const ot=rt},5042:()=>{}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.amdD=function(){throw new Error("define cannot be used indirect")},n.amdO={},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e={backgroundImage:"",MediaAttribution:!0,applePay:!1,CapitalizeFields:!1,ClickToExpand:!0,CurrencySymbol:"$",CurrencyCode:"USD",AddCurrencySymbol:!0,ThousandsSeparator:"",DecimalSeparator:".",DecimalPlaces:2,MinAmount:1,MaxAmount:1e5,MinAmountMessage:"Amount must be at least $1",MaxAmountMessage:"Amount must be less than $100,000",SkipToMainContentLink:!0,SrcDefer:!0,NeverBounceAPI:null,NeverBounceDateField:null,NeverBounceStatusField:null,NeverBounceDateFormat:"MM/DD/YYYY",FreshAddress:!1,ProgressBar:!1,AutoYear:!1,TranslateFields:!0,Debug:!1,RememberMe:!1,TidyContact:!1,RegionLongFormat:"",CountryDisable:[],Plaid:!1,Placeholders:!1,ENValidators:!1,MobileCTA:!1,CustomCurrency:!1,VGS:!1,PostalCodeValidator:!1,CountryRedirect:!1,WelcomeBack:!1,PageLayouts:["leftleft1col","centerleft1col","centercenter1col","centercenter2col","centerright1col","rightright1col","none"]},t={image:"https://picsum.photos/480/650",imagePosition:"left",title:"Will you change your gift to just {new-amount} a month to boost your impact?",paragraph:"Make a monthly pledge today to support us with consistent, reliable resources during emergency moments.",yesLabel:"Yes! Process My <br> {new-amount} monthly gift",noLabel:"No, thanks. Continue with my <br> {old-amount} one-time gift",otherAmount:!0,otherLabel:"Or enter a different monthly amount:",upsellOriginalGiftAmountFieldName:"",amountRange:[{max:10,suggestion:5},{max:15,suggestion:7},{max:20,suggestion:8},{max:25,suggestion:9},{max:30,suggestion:10},{max:35,suggestion:11},{max:40,suggestion:12},{max:50,suggestion:14},{max:100,suggestion:15},{max:200,suggestion:19},{max:300,suggestion:29},{max:500,suggestion:"Math.ceil((amount / 12)/5)*5"}],minAmount:0,canClose:!0,submitOnClose:!1,oneTime:!0,annual:!1,disablePaymentMethods:[],skipUpsell:!1},i=[{field:"supporter.firstName",translation:"Nome"},{field:"supporter.lastName",translation:"Sobrenome"},{field:"supporter.phoneNumber",translation:"Celular"},{field:"supporter.address1",translation:"EndereΓ§o"},{field:"supporter.address2",translation:"Complemento"},{field:"supporter.postcode",translation:"CEP"},{field:"supporter.city",translation:"Cidade"},{field:"supporter.region",translation:"Estado"},{field:"supporter.country",translation:"PaΓ­s"}],s=[{field:"supporter.address1",translation:"Straße, Hausnummer"},{field:"supporter.postcode",translation:"Postleitzahl"},{field:"supporter.city",translation:"Ort"},{field:"supporter.region",translation:"Bundesland"},{field:"supporter.country",translation:"Land"}],r=[{field:"supporter.address1",translation:"Adresse"},{field:"supporter.postcode",translation:"Code Postal"},{field:"supporter.city",translation:"Ville"},{field:"supporter.region",translation:"RΓ©gion"},{field:"supporter.country",translation:"Country"}],o=[{field:"supporter.address1",translation:"Adres"},{field:"supporter.postcode",translation:"Postcode"},{field:"supporter.city",translation:"Woonplaats"},{field:"supporter.region",translation:"Provincie"},{field:"supporter.country",translation:"Country"}],a={BR:i,BRA:i,DE:s,DEU:s,FR:r,FRA:r,NL:o,NLD:o},l={enabled:!1,title:"We are sad that you are leaving",text:"Would you mind telling us why you are leaving this page?",buttonText:"Send us your comments",buttonLink:"https://www.4sitestudios.com/",cookieName:"engrid-exit-intent-lightbox",cookieDuration:30,triggers:{visibilityState:!0,mousePosition:!0}};class c{constructor(){this.logger=new be("Loader","gold","black","πŸ”"),this.cssElement=document.querySelector('link[href*="engrid."][rel="stylesheet"]'),this.jsElement=document.querySelector('script[src*="engrid."]')}reload(){var e,t,n;const i=this.getOption("assets"),s=p.getBodyData("loaded");let r="false"===this.getOption("engridcss"),o="false"===this.getOption("engridjs");if(s||!i)return r&&this.cssElement&&(this.logger.log("engridcss=false | Removing original stylesheet:",this.cssElement),this.cssElement.remove()),o&&this.jsElement&&(this.logger.log("engridjs=false | Removing original script:",this.jsElement),this.jsElement.remove()),r&&(this.logger.log("engridcss=false | adding top banner CSS"),this.addENgridCSSUnloadedCSS()),o?(this.logger.log("engridjs=false | Skipping JS load."),this.logger.success("LOADED"),!0):(this.logger.success("LOADED"),!1);this.logger.log("RELOADING"),p.setBodyData("loaded","true");const a=p.getBodyData("theme"),l=null!==(e=this.getOption("repo-name"))&&void 0!==e?e:`engrid-${a}`;let c="",u="";switch(i){case"local":this.logger.log("LOADING LOCAL"),p.setBodyData("assets","local"),c=`https://${l}.test/dist/engrid.js`,u=`https://${l}.test/dist/engrid.css`;break;case"flush":this.logger.log("FLUSHING CACHE");const e=Date.now(),s=new URL((null===(t=this.jsElement)||void 0===t?void 0:t.getAttribute("src"))||"");s.searchParams.set("v",e.toString()),c=s.toString();const r=new URL((null===(n=this.cssElement)||void 0===n?void 0:n.getAttribute("href"))||"");r.searchParams.set("v",e.toString()),u=r.toString();break;default:this.logger.log("LOADING EXTERNAL"),c=`https://s3.amazonaws.com/engrid-dev.4sitestudios.com/${l}/${i}/engrid.js`,u=`https://s3.amazonaws.com/engrid-dev.4sitestudios.com/${l}/${i}/engrid.css`}return r&&this.cssElement&&(this.logger.log("engridcss=false | Removing original stylesheet:",this.cssElement),this.cssElement.remove()),r&&u&&""!==u&&this.logger.log("engridcss=false | Skipping injection of stylesheet:",u),r?(this.logger.log("engridcss=false | adding top banner CSS"),this.addENgridCSSUnloadedCSS()):this.setCssFile(u),o&&this.jsElement&&(this.logger.log("engridjs=false | Removing original script:",this.jsElement),this.jsElement.remove()),o&&c&&""!==c&&this.logger.log("engridjs=false | Skipping injection of script:",c),o||this.setJsFile(c),!!i}getOption(e){const t=p.getUrlParameter(e);return t&&["assets","engridcss","engridjs"].includes(e)?t:window.EngridLoader&&window.EngridLoader.hasOwnProperty(e)?window.EngridLoader[e]:this.jsElement&&this.jsElement.hasAttribute("data-"+e)?this.jsElement.getAttribute("data-"+e):null}setCssFile(e){if(""!==e)if(this.cssElement)this.logger.log("Replacing stylesheet:",e),this.cssElement.setAttribute("href",e);else{this.logger.log("Injecting stylesheet:",e);const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("media","all"),t.setAttribute("href",e),document.head.appendChild(t)}}setJsFile(e){if(""===e)return;this.logger.log("Injecting script:",e);const t=document.createElement("script");t.setAttribute("src",e),document.head.appendChild(t)}addENgridCSSUnloadedCSS(){document.body.insertAdjacentHTML("beforeend",'<style>\n html,\n body {\n background-color: #ffffff;\n }\n\n body {\n opacity: 1;\n margin: 0;\n }\n\n body:before {\n content: "ENGRID CSS UNLOADED";\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n background-color: #ffff00;\n padding: 1rem;\n margin-bottom: 1rem;\n font-family: sans-serif;\n font-weight: 600;\n }\n\n .en__component--advrow {\n flex-direction: column;\n max-width: 600px;\n margin: 0 auto;\n }\n\n .en__component--advrow * {\n max-width: 100%;\n height: auto;\n }\n </style>')}}var u=n(5363);class d{constructor(){this.logger=new be("EnForm"),this._onSubmit=new u.nz,this._onValidate=new u.nz,this._onError=new u.nz,this.submit=!0,this.submitPromise=!1,this.validate=!0,this.validatePromise=!1}static getInstance(){return d.instance||(d.instance=new d),d.instance}dispatchSubmit(){this._onSubmit.dispatch(),this.logger.log("dispatchSubmit")}dispatchValidate(){this._onValidate.dispatch(),this.logger.log("dispatchValidate")}dispatchError(){this._onError.dispatch(),this.logger.log("dispatchError")}submitForm(){const e=document.querySelector("form .en__submit button");if(e){const t=document.getElementById("enModal");t&&t.classList.add("is-submitting"),e.click(),this.logger.log("submitForm")}}get onSubmit(){return this._onSubmit.asEvent()}get onError(){return this._onError.asEvent()}get onValidate(){return this._onValidate.asEvent()}}class h{constructor(e="transaction.donationAmt",t="transaction.donationAmt.other"){this._onAmountChange=new u.FK,this._amount=0,this._radios="",this._other="",this._dispatch=!0,this._other=t,this._radios=e,document.addEventListener("change",(n=>{const i=n.target;if(i)if(i.name==e)this.amount=parseFloat(i.value);else if(i.name==t){const e=p.cleanAmount(i.value);i.value=e%1!=0?e.toFixed(2):e.toString(),this.amount=e}}));const n=document.querySelector(`[name='${this._other}']`);n&&n.addEventListener("keyup",(e=>{this.amount=p.cleanAmount(n.value)}))}static getInstance(e="transaction.donationAmt",t="transaction.donationAmt.other"){return h.instance||(h.instance=new h(e,t)),h.instance}get amount(){return this._amount}set amount(e){this._amount=e||0,this._dispatch&&this._onAmountChange.dispatch(this._amount)}get onAmountChange(){return this._onAmountChange.asEvent()}load(){const e=document.querySelector('input[name="'+this._radios+'"]:checked');if(e){let t=parseFloat(e.value||"");if(t>0)this.amount=parseFloat(e.value);else{const e=document.querySelector('input[name="'+this._other+'"]');t=p.cleanAmount(e.value),this.amount=t}}else if(p.checkNested(window.EngagingNetworks,"require","_defined","enjs","getDonationTotal")&&p.checkNested(window.EngagingNetworks,"require","_defined","enjs","getDonationFee")){const e=window.EngagingNetworks.require._defined.enjs.getDonationTotal()-window.EngagingNetworks.require._defined.enjs.getDonationFee();e&&(this.amount=e)}}setAmount(e,t=!0){if(!document.getElementsByName(this._radios).length)return;this._dispatch=t;let n=Array.from(document.querySelectorAll('input[name="'+this._radios+'"]')).filter((t=>t instanceof HTMLInputElement&&parseInt(t.value)==e));if(n.length){n[0].checked=!0,this.clearOther()}else{const t=document.querySelector('input[name="'+this._other+'"]');if(t){const n=document.querySelector(`.en__field--donationAmt.en__field--withOther .en__field__item:nth-last-child(2) input[name="${this._radios}"]`);n&&(n.checked=!0),t.value=parseFloat(e.toString()).toFixed(2);t.parentNode.classList.remove("en__field__item--hidden")}}this.amount=e,this._dispatch=!0}clearOther(){const e=document.querySelector('input[name="'+this._other+'"]');e.value="";e.parentNode.classList.add("en__field__item--hidden")}}class p{constructor(){if(!p.enForm)throw new Error("Engaging Networks Form Not Found!")}static get enForm(){return document.querySelector("form.en__component")}static get debug(){return!!this.getOption("Debug")}static get demo(){return"DEMO"===this.getUrlParameter("mode")}static getUrlParameter(e){const t=new URLSearchParams(window.location.search);if(e.endsWith("[]")){let n=[];return t.forEach(((t,i)=>{i.startsWith(e.replace("[]",""))&&n.push(new Object({[i]:t}))})),n.length>0?n:null}return t.has(e)?t.get(e)||!0:null}static getField(e){return document.querySelector(`[name="${e}"]`)}static getFieldValue(e){return new FormData(this.enForm).getAll(e).join(",")}static setFieldValue(e,t,n=!0,i=!1){t!==p.getFieldValue(e)&&(document.getElementsByName(e).forEach((e=>{if("type"in e){switch(e.type){case"select-one":case"select-multiple":for(const n of e.options)n.value==t&&(n.selected=!0,i&&e.dispatchEvent(new Event("change",{bubbles:!0})));break;case"checkbox":case"radio":e.value==t&&(e.checked=!0,i&&e.dispatchEvent(new Event("change",{bubbles:!0})));break;default:e.value=t,i&&(e.dispatchEvent(new Event("change",{bubbles:!0})),e.dispatchEvent(new Event("blur",{bubbles:!0})))}e.setAttribute("engrid-value-changed","")}})),n&&this.enParseDependencies())}static createHiddenInput(e,t=""){var n;const i=document.createElement("div");i.classList.add("en__component","en__component--formblock","hide");const s=document.createElement("div");s.classList.add("en__field","en__field--text");const r=document.createElement("div");r.classList.add("en__field__element","en__field__element--text");const o=document.createElement("input");o.classList.add("en__field__input","en__field__input--text","engrid-added-input"),o.setAttribute("name",e),o.setAttribute("type","hidden"),o.setAttribute("value",t),r.appendChild(o),s.appendChild(r),i.appendChild(s);const a=document.querySelector(".en__submit");if(a){const e=a.closest(".en__component");e&&(null===(n=e.parentNode)||void 0===n||n.insertBefore(i,e.nextSibling))}else p.enForm.appendChild(i);return o}static enParseDependencies(){var e,t,n,i,s,r;if(window.EngagingNetworks&&"function"==typeof(null===(s=null===(i=null===(n=null===(t=null===(e=window.EngagingNetworks)||void 0===e?void 0:e.require)||void 0===t?void 0:t._defined)||void 0===n?void 0:n.enDependencies)||void 0===i?void 0:i.dependencies)||void 0===s?void 0:s.parseDependencies)){const e=[];if("dependencies"in window.EngagingNetworks){const t=document.querySelector(".en__field--donationAmt");if(t){let n=(null===(r=[...t.classList.values()].filter((e=>e.startsWith("en__field--")&&Number(e.substring(11))>0)).toString().match(/\d/g))||void 0===r?void 0:r.join(""))||"";n&&(window.EngagingNetworks.dependencies.forEach((t=>{if("actions"in t&&t.actions.length>0){let i=!1;t.actions.forEach((e=>{"target"in e&&e.target==n&&(i=!0)})),i||e.push(t)}})),e.length>0&&(window.EngagingNetworks.require._defined.enDependencies.dependencies.parseDependencies(e),p.getOption("Debug")&&console.log("EN Dependencies Triggered",e)))}}}}static getGiftProcess(){return"pageJson"in window?window.pageJson.giftProcess:null}static getPageCount(){return"pageJson"in window?window.pageJson.pageCount:null}static getPageNumber(){return"pageJson"in window?window.pageJson.pageNumber:null}static getPageID(){return"pageJson"in window?window.pageJson.campaignPageId:0}static getClientID(){return"pageJson"in window?window.pageJson.clientId:0}static getDataCenter(){return p.getClientID()>=1e4?"us":"ca"}static getPageType(){if(!("pageJson"in window)||!("pageType"in window.pageJson))return"UNKNOWN";switch(window.pageJson.pageType){case"donation":case"premiumgift":return"DONATION";case"e-card":return"ECARD";case"otherdatacapture":case"survey":return"SURVEY";case"emailtotarget":return"EMAILTOTARGET";case"advocacypetition":return"ADVOCACY";case"emailsubscribeform":return"SUBSCRIBEFORM";case"supporterhub":return"SUPPORTERHUB";case"unsubscribe":return"UNSUBSCRIBE";case"tweetpage":return"TWEETPAGE";default:return"UNKNOWN"}}static setBodyData(e,t){const n=document.querySelector("body");"boolean"!=typeof t||!1!==t?n.setAttribute(`data-engrid-${e}`,t.toString()):n.removeAttribute(`data-engrid-${e}`)}static getBodyData(e){return document.querySelector("body").getAttribute(`data-engrid-${e}`)}static hasBodyData(e){return document.querySelector("body").hasAttribute(`data-engrid-${e}`)}static getOption(e){return window.EngridOptions[e]||null}static loadJS(e,t=null,n=!0){const i=document.createElement("script");i.src=e,i.onload=t,n?document.head.appendChild(i):document.body.appendChild(i)}static formatNumber(e,t=2,n=".",i=","){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");const s=isFinite(+e)?+e:0,r=isFinite(+t)?Math.abs(t):0,o=void 0===i?",":i,a=void 0===n?".":n;let l=[];return l=(r?function(e,t){const n=Math.pow(10,t);return""+Math.round(e*n)/n}(s,r):""+Math.round(s)).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)),(l[1]||"").length<r&&(l[1]=l[1]||"",l[1]+=new Array(r-l[1].length+1).join("0")),l.join(a)}static cleanAmount(e){const t=e.replace(/[^0-9,\.]/g,"").split(/[,.]+/),n=e.replace(/[^.,]/g,"").split("");if(1===t.length)return parseInt(t[0])||0;if(t.map(((e,n)=>n>0&&n+1!==t.length&&3!==e.length)).includes(!0))return 0;if(n.length>1&&!n.includes("."))return 0;if([...new Set(n.slice(0,-1))].length>1)return 0;if(t[t.length-1].length<=2){const e=t.pop()||"00";return parseInt(e)>0?parseFloat(Number(parseInt(t.join(""))+"."+e).toFixed(2)):parseInt(t.join(""))}return parseInt(t.join(""))}static disableSubmit(e=""){const t=document.querySelector(".en__submit button");t.dataset.originalText=t.innerHTML;let n="<span class='loader-wrapper'><span class='loader loader-quart'></span><span class='submit-button-text-wrapper'>"+e+"</span></span>";return!!t&&(t.disabled=!0,t.innerHTML=n,!0)}static enableSubmit(){const e=document.querySelector(".en__submit button");return!!e.dataset.originalText&&(e.disabled=!1,e.innerHTML=e.dataset.originalText,delete e.dataset.originalText,!0)}static formatDate(e,t="MM/DD/YYYY"){const n=e.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}).split("/");return t.replace(/YYYY/g,n[2]).replace(/MM/g,n[0]).replace(/DD/g,n[1]).replace(/YY/g,n[2].substr(2,2))}static checkNested(e,...t){for(let n=0;n<t.length;n++){if(!e||!e.hasOwnProperty(t[n]))return!1;e=e[t[n]]}return!0}static deepMerge(e,t){for(const n in t)t[n]instanceof Object&&Object.assign(t[n],p.deepMerge(e[n],t[n]));return Object.assign(e||{},t),e}static setError(e,t){const n="string"==typeof e?document.querySelector(e):e;if(n){n.classList.add("en__field--validationFailed");let e=n.querySelector(".en__field__error");e?e.innerHTML=t:(e=document.createElement("div"),e.classList.add("en__field__error"),e.innerHTML=t,n.insertBefore(e,n.firstChild))}}static removeError(e){const t="string"==typeof e?document.querySelector(e):e;if(t){t.classList.remove("en__field--validationFailed");const e=t.querySelector(".en__field__error");e&&t.removeChild(e)}}static isVisible(e){return!!e&&!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}static getCurrencySymbol(){const e=p.getField("transaction.paycurrency");if(e){const t="SELECT"===e.tagName?e.options[e.selectedIndex]:e;if(t.dataset.currencySymbol)return t.dataset.currencySymbol;return{USD:"$",EUR:"€",GBP:"Β£",AUD:"$",CAD:"$",JPY:"Β₯"}[e.value]||"$"}return p.getOption("CurrencySymbol")||"$"}static getCurrencyCode(){const e=p.getField("transaction.paycurrency");return e?e.value||"USD":p.getOption("CurrencyCode")||"USD"}static addHtml(e,t="body",n="before"){var i,s;const r=document.querySelector(t);if("object"==typeof e&&(e=e.outerHTML),r){const t=document.createRange().createContextualFragment(e);"before"===n?null===(i=r.parentNode)||void 0===i||i.insertBefore(t,r):null===(s=r.parentNode)||void 0===s||s.insertBefore(t,r.nextSibling)}}static removeHtml(e){const t=document.querySelector(e);t&&t.remove()}static slugify(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}static watchForError(e){const t=document.querySelector(".en__errorList");let n=e.toString();var i;if(0===n.indexOf("function")&&(n=n.replace("function ","")),n.indexOf("(")>0&&(n=n.substring(0,n.indexOf("("))),n=n.replace(/[^a-zA-Z0-9]/g,""),n=n.substring(0,20),n="engrid"+((i=n).charAt(0).toUpperCase()+i.slice(1)),t&&!t.dataset[n]){t.dataset[n]="true";new MutationObserver((function(t){t.forEach((function(t){"childList"===t.type&&t.addedNodes.length>0&&e()}))})).observe(t,{childList:!0})}}static getPaymentType(){return p.getFieldValue("transaction.paymenttype")}static setPaymentType(e){const t=p.getField("transaction.paymenttype");if(t){const n=Array.from(t.options).find((t=>t.value.toLowerCase()===e.toLowerCase()));n?n.selected=!0:t.value=e;const i=new Event("change");t.dispatchEvent(i)}}static isInViewport(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}}class g{constructor(){this._onFrequencyChange=new u.FK,this._frequency="onetime",this._recurring="n",this._dispatch=!0,document.addEventListener("change",(e=>{const t=e.target;t&&"transaction.recurrpay"==t.name&&(this.recurring=t.value,"radio"==t.type&&(this.frequency="n"==t.value.toLowerCase()?"onetime":"monthly",p.setFieldValue("transaction.recurrfreq",this.frequency.toUpperCase()))),t&&"transaction.recurrfreq"==t.name&&(this.frequency=t.value)})),p.getGiftProcess()&&(p.setBodyData("transaction-recurring-frequency",sessionStorage.getItem("engrid-transaction-recurring-frequency")||"onetime"),p.setBodyData("transaction-recurring",window.pageJson.recurring?"y":"n"))}static getInstance(){return g.instance||(g.instance=new g),g.instance}get frequency(){return this._frequency}set frequency(e){this._frequency=e.toLowerCase()||"onetime",this._dispatch&&this._onFrequencyChange.dispatch(this._frequency),p.setBodyData("transaction-recurring-frequency",this._frequency),sessionStorage.setItem("engrid-transaction-recurring-frequency",this._frequency)}get recurring(){return this._recurring}set recurring(e){this._recurring=e.toLowerCase()||"n",p.setBodyData("transaction-recurring",this._recurring)}get onFrequencyChange(){return this._onFrequencyChange.asEvent()}load(){var e;this.frequency=p.getFieldValue("transaction.recurrfreq")||sessionStorage.getItem("engrid-transaction-recurring-frequency")||"onetime";p.getField("transaction.recurrpay")?this.recurring=p.getFieldValue("transaction.recurrpay"):p.checkNested(window.EngagingNetworks,"require","_defined","enjs","getSupporterData")&&(this.recurring=(null===(e=window.EngagingNetworks.require._defined.enjs.getSupporterData("recurrpay"))||void 0===e?void 0:e.toLowerCase())||"n")}setRecurrency(e,t=!0){document.getElementsByName("transaction.recurrpay").length&&(this._dispatch=t,p.setFieldValue("transaction.recurrpay",e.toUpperCase()),this._dispatch=!0)}setFrequency(e,t=!0){if(!document.getElementsByName("transaction.recurrfreq").length)return;this._dispatch=t;let n=Array.from(document.querySelectorAll('input[name="transaction.recurrfreq"]')).filter((t=>t instanceof HTMLInputElement&&t.value==e.toUpperCase()));if(n.length){n[0].checked=!0,this.frequency=e.toLowerCase(),"onetime"===this.frequency?this.setRecurrency("N",t):this.setRecurrency("Y",t)}this._dispatch=!0}}class m{constructor(){this._onFeeChange=new u.FK,this._amount=h.getInstance(),this._form=d.getInstance(),this._fee=0,this._field=null,document.getElementsByName("transaction.donationAmt").length&&(this._field=this.isENfeeCover()?document.querySelector("#en__field_transaction_feeCover"):document.querySelector('input[name="supporter.processing_fees"]'),this._field instanceof HTMLInputElement&&this._field.addEventListener("change",(e=>{this._field instanceof HTMLInputElement&&this._field.checked&&!this._subscribe&&(this._subscribe=this._form.onSubmit.subscribe((()=>this.addFees()))),this._onFeeChange.dispatch(this.fee)})))}static getInstance(){return m.instance||(m.instance=new m),m.instance}get onFeeChange(){return this._onFeeChange.asEvent()}get fee(){return this.calculateFees()}set fee(e){this._fee=e,this._onFeeChange.dispatch(this._fee)}calculateFees(e=0){var t;if(this._field instanceof HTMLInputElement&&this._field.checked){if(this.isENfeeCover())return e>0?window.EngagingNetworks.require._defined.enjs.feeCover.fee(e):window.EngagingNetworks.require._defined.enjs.getDonationFee();const n=Object.assign({processingfeepercentadded:"0",processingfeefixedamountadded:"0"},null===(t=this._field)||void 0===t?void 0:t.dataset),i=e>0?e:this._amount.amount,s=parseFloat(n.processingfeepercentadded)/100*i+parseFloat(n.processingfeefixedamountadded);return Math.round(100*s)/100}return 0}addFees(){this._form.submit&&!this.isENfeeCover()&&this._amount.setAmount(this._amount.amount+this.fee,!1)}removeFees(){this.isENfeeCover()||this._amount.setAmount(this._amount.amount-this.fee)}isENfeeCover(){if("feeCover"in window.EngagingNetworks)for(const e in window.EngagingNetworks.feeCover)if(window.EngagingNetworks.feeCover.hasOwnProperty(e))return!0;return!1}}class f{constructor(){this.logger=new be("RememberMeEvents"),this._onLoad=new u.FK,this._onClear=new u.nz,this.hasData=!1}static getInstance(){return f.instance||(f.instance=new f),f.instance}dispatchLoad(e){this.hasData=e,this._onLoad.dispatch(e),this.logger.log(`dispatchLoad: ${e}`)}dispatchClear(){this._onClear.dispatch(),this.logger.log("dispatchClear")}get onLoad(){return this._onLoad.asEvent()}get onClear(){return this._onClear.asEvent()}}class b{constructor(){this._onCountryChange=new u.FK,this._country="",this._field=null,this._field=document.getElementById("en__field_supporter_country"),this._field&&(document.addEventListener("change",(e=>{const t=e.target;t&&"supporter.country"==t.name&&(this.country=t.value)})),this.country=p.getFieldValue("supporter.country"))}static getInstance(){return b.instance||(b.instance=new b),b.instance}get countryField(){return this._field}get onCountryChange(){return this._onCountryChange.asEvent()}get country(){return this._country}set country(e){this._country=e,this._onCountryChange.dispatch(this._country)}}class v extends p{constructor(t){super(),this._form=d.getInstance(),this._fees=m.getInstance(),this._amount=h.getInstance("transaction.donationAmt","transaction.donationAmt.other"),this._frequency=g.getInstance(),this._country=b.getInstance(),this.logger=new be("App","black","white","🍏");const n=new c;this.options=Object.assign(Object.assign({},e),t),window.EngridOptions=this.options,this._dataLayer=_e.getInstance(),n.reload()||("local"===p.getBodyData("assets")&&"false"!==p.getUrlParameter("debug")&&"log"!==p.getUrlParameter("debug")&&(window.EngridOptions.Debug=!0),"loading"!==document.readyState?this.run():document.addEventListener("DOMContentLoaded",(()=>{this.run()})),window.onresize=()=>{this.onResize()})}run(){if(!p.checkNested(window.EngagingNetworks,"require","_defined","enjs"))return this.logger.danger("Engaging Networks JS Framework NOT FOUND"),void setTimeout((()=>{this.run()}),100);window.hasOwnProperty("EngridPageOptions")&&(this.options=Object.assign(Object.assign({},this.options),window.EngridPageOptions),window.EngridOptions=this.options),(this.options.Debug||"true"==v.getUrlParameter("debug"))&&v.setBodyData("debug",""),new U,new z,new G,new Q("transaction.giveBySelect","giveBySelect-"),new Q("transaction.inmem","inmem-"),new Q("transaction.recurrpay","recurrpay-");let e=[];document.querySelectorAll("input[type=radio]").forEach((t=>{"name"in t&&!1===e.includes(t.name)&&e.push(t.name)})),e.forEach((e=>{new Q(e,"engrid__"+e.replace(/\./g,"")+"-")}));document.querySelectorAll("input[type=checkbox]").forEach((e=>{"name"in e&&new Q(e.name,"engrid__"+e.name.replace(/\./g,"")+"-")})),this._form.onSubmit.subscribe((()=>this.onSubmit())),this._form.onError.subscribe((()=>this.onError())),this._form.onValidate.subscribe((()=>this.onValidate())),this._amount.onAmountChange.subscribe((e=>this.logger.success(`Live Amount: ${e}`))),this._frequency.onFrequencyChange.subscribe((e=>{this.logger.success(`Live Frequency: ${e}`),setTimeout((()=>{this._amount.load()}),150)})),this._form.onSubmit.subscribe((e=>this.logger.success("Submit: "+JSON.stringify(e)))),this._form.onError.subscribe((e=>this.logger.danger("Error: "+JSON.stringify(e)))),this._country.onCountryChange.subscribe((e=>this.logger.success(`Country: ${e}`))),window.enOnSubmit=()=>(this._form.submit=!0,this._form.submitPromise=!1,this._form.dispatchSubmit(),p.watchForError(p.enableSubmit),!!this._form.submit&&(this._form.submitPromise?this._form.submitPromise:(this.logger.success("enOnSubmit Success"),!0))),window.enOnError=()=>{this._form.dispatchError()},window.enOnValidate=()=>(this._form.validate=!0,this._form.validatePromise=!1,this._form.dispatchValidate(),!!this._form.validate&&(this._form.validatePromise?this._form.validatePromise:(this.logger.success("Validation Passed"),!0))),new tt,new W,new K(this.options),new le,new X,new y,new Se,new we,new Ne,new Te,new Pe,window.setTimeout((()=>{this._frequency.load()}),150),new Je,new ke,new Fe,new re,this.options.MediaAttribution&&new J,this.options.applePay&&new O,this.options.CapitalizeFields&&new q,this.options.AutoYear&&new R,new B,new j,new V,this.options.ClickToExpand&&new H,this.options.SkipToMainContentLink&&new oe,this.options.SrcDefer&&new ae,this.options.ProgressBar&&new he;try{this.options.RememberMe&&"object"==typeof this.options.RememberMe&&window.localStorage&&new ge(this.options.RememberMe)}catch(e){}this.options.NeverBounceAPI&&new ue(this.options.NeverBounceAPI,this.options.NeverBounceDateField,this.options.NeverBounceStatusField,this.options.NeverBounceDateFormat),this.options.FreshAddress&&new de,new me,new fe,new ve,new ye,new M,new Ee,new Ce,new ce,new Ae,new Le,new Qe,this.options.Debug&&new Me,this.options.TidyContact&&new De,this.options.TranslateFields&&new se,new Be,new Re,new Ye,"DONATION"===p.getPageType()&&new je,new Ve,new He,new Ue,this.options.Plaid&&new $e,new We,new $,new ze,new Ge,new Ke,new Xe,new Ze,new et,new nt,new st;let t=this.options.Debug;try{!t&&window.sessionStorage.hasOwnProperty(Oe.debugSessionStorageKey)&&(t=!0)}catch(e){}t&&new Oe(this.options.PageLayouts),"branding"===p.getUrlParameter("development")&&(new Ie).show(),p.setBodyData("data-engrid-scripts-js-loading","finished"),window.EngridVersion=rt,this.logger.success(`VERSION: ${rt}`);let n="function"==typeof window.onload?window.onload:null;"loading"!==document.readyState?this.onLoad():window.onload=e=>{this.onLoad(),n&&n.bind(window,e)}}onLoad(){this.options.onLoad&&this.options.onLoad()}onResize(){this.options.onResize&&this.options.onResize()}onValidate(){this.options.onValidate&&(this.logger.log("Client onValidate Triggered"),this.options.onValidate())}onSubmit(){this.options.onSubmit&&(this.logger.log("Client onSubmit Triggered"),this.options.onSubmit())}onError(){this.options.onError&&(this.logger.danger("Client onError Triggered"),this.options.onError())}static log(e){new be("Client","brown","aliceblue","πŸͺ").log(e)}}class y{constructor(){this._frequency=g.getInstance(),this.shouldRun()&&(this._frequency.onFrequencyChange.subscribe((e=>window.setTimeout(this.fixAmountLabels.bind(this),100))),window.setTimeout(this.fixAmountLabels.bind(this),300))}shouldRun(){return!("DONATION"!==p.getPageType()||!p.getOption("AddCurrencySymbol"))}fixAmountLabels(){let e=document.querySelectorAll(".en__field--donationAmt label");const t=p.getCurrencySymbol()||"";e.forEach((e=>{isNaN(e.innerText)||(e.innerText=t+e.innerText)}))}}var _=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};const S=window.ApplePaySession,w=window.merchantIdentifier,E=window.merchantDomainName,C=window.merchantDisplayName,A=window.merchantSessionIdentifier,L=window.merchantNonce,x=window.merchantEpochTimestamp,D=window.merchantSignature,k=window.merchantCountryCode,F=window.merchantCurrencyCode,N=window.merchantSupportedNetworks,T=window.merchantCapabilities,P=window.merchantTotalLabel;class O{constructor(){this.applePay=document.querySelector('.en__field__input.en__field__input--radio[value="applepay"]'),this._amount=h.getInstance(),this._fees=m.getInstance(),this._form=d.getInstance(),this.checkApplePay()}checkApplePay(){return _(this,void 0,void 0,(function*(){const e=document.querySelector("form.en__component--page");if(!this.applePay||!window.hasOwnProperty("ApplePaySession")){const e=document.querySelector(".en__field__item.applepay");return e&&e.remove(),p.debug&&console.log("Apple Pay DISABLED"),!1}const t=S.canMakePaymentsWithActiveCard(w);let n=!1;yield t.then((t=>{if(n=t,t){let t=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name","PkPaymentToken"),t.setAttribute("id","applePayToken"),e.appendChild(t),this._form.onSubmit.subscribe((()=>this.onPayClicked()))}})),p.debug&&console.log("applePayEnabled",n);let i=this.applePay.closest(".en__field__item");return n?null==i||i.classList.add("applePayWrapper"):i&&(i.style.display="none"),n}))}performValidation(e){return new Promise((function(t,n){var i={};i.merchantIdentifier=w,i.merchantSessionIdentifier=A,i.nonce=L,i.domainName=E,i.epochTimestamp=x,i.signature=D;var s="/ea-dataservice/rest/applepay/validateurl?url="+e+("&merchantIdentifier="+w+"&merchantDomain="+E+"&displayName="+C),r=new XMLHttpRequest;r.onload=function(){var e=JSON.parse(this.responseText);p.debug&&console.log("Apple Pay Validation",e),t(e)},r.onerror=n,r.open("GET",s),r.send()}))}log(e,t){var n=new XMLHttpRequest;n.open("GET","/ea-dataservice/rest/applepay/log?name="+e+"&msg="+t),n.send()}sendPaymentToken(e){return new Promise((function(e,t){e(!0)}))}onPayClicked(){if(!this._form.submit)return;const e=document.querySelector("#en__field_transaction_paymenttype"),t=document.getElementById("applePayToken"),n=this._form;if("applepay"==e.value&&""==t.value)try{let e=this._amount.amount+this._fees.fee;var i=new S(1,{supportedNetworks:N,merchantCapabilities:T,countryCode:k,currencyCode:F,total:{label:P,amount:e}}),s=this;return i.onvalidatemerchant=function(e){s.performValidation(e.validationURL).then((function(e){p.debug&&console.log("Apple Pay merchantSession",e),i.completeMerchantValidation(e)}))},i.onpaymentauthorized=function(e){s.sendPaymentToken(e.payment.token).then((function(t){p.debug&&console.log("Apple Pay Token",e.payment.token),document.getElementById("applePayToken").value=JSON.stringify(e.payment.token),n.submitForm()}))},i.oncancel=function(e){p.debug&&console.log("Cancelled",e),alert("You cancelled. Sorry it didn't work out."),n.dispatchError()},i.begin(),this._form.submit=!1,!1}catch(e){alert("Developer mistake: '"+e.message+"'"),n.dispatchError()}return this._form.submit=!0,!0}}class M{constructor(){this.addRequired(),this.addLabel(),this.addGroupRole()}addGroupRole(){document.querySelectorAll(".en__field--radio").forEach((e=>{e.setAttribute("role","group");const t=e.querySelector("label");t&&(t.setAttribute("id",`en__field__label--${Math.random().toString(36).slice(2,7)}`),e.setAttribute("aria-labelledby",t.id))}))}addRequired(){document.querySelectorAll(".en__mandatory .en__field__input").forEach((e=>{e.setAttribute("aria-required","true")}))}addLabel(){const e=document.querySelector(".en__field__input--otheramount");e&&e.setAttribute("aria-label","Enter your custom donation amount");document.querySelectorAll(".en__field__input--splitselect").forEach((e=>{var t,n,i,s;const r=e.querySelector("option");!r||""!==r.value||(null===(n=null===(t=r.textContent)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("select"))||(null===(s=null===(i=r.textContent)||void 0===i?void 0:i.toLowerCase())||void 0===s?void 0:s.includes("choose"))||e.setAttribute("aria-label",r.textContent||"")}))}}class q{constructor(){this._form=d.getInstance(),this._form.onSubmit.subscribe((()=>this.capitalizeFields("en__field_supporter_firstName","en__field_supporter_lastName","en__field_supporter_address1","en__field_supporter_city")))}capitalizeFields(...e){e.forEach((e=>this.capitalize(e)))}capitalize(e){let t=document.getElementById(e);return t&&(t.value=t.value.replace(/\w\S*/g,(e=>e.replace(/^\w/,(e=>e.toUpperCase())))),p.debug&&console.log("Capitalized",t.value)),!0}}var I=n(3548);class B{constructor(){if(this.logger=new be("CreditCard","#ccc84a","#333","πŸ’³"),this._form=d.getInstance(),this.vgsField=document.querySelector(".en__field--vgs"),this.ccField=p.getField("transaction.ccnumber"),this.ccValues={"american-express":["amex","american express","americanexpress","american-express","amx","ax"],visa:["visa","vi"],mastercard:["mastercard","master card","mc"],discover:["discover","di"],"diners-club":["diners","diners club","dinersclub","dc"],jcb:["jcb"],unionpay:["unionpay","union pay","up"],maestro:["maestro"],elo:["elo"],mir:["mir"],hiper:["hiper","hipercard"]},this.isPotentiallyValid=!1,this.isValid=!1,this.field_expiration_month=null,this.field_expiration_year=null,this.paymentTypeField=p.getField("transaction.paymenttype"),this.handleExpUpdate=e=>{if(!this.field_expiration_month||!this.field_expiration_year)return;const t=new Date,n=t.getMonth()+1,i=parseInt(this.field_expiration_year[this.field_expiration_year.length-1].value)>2e3?t.getFullYear():t.getFullYear()-2e3;if("month"==e){let e=parseInt(this.field_expiration_month.value),t=e<n;this.logger.log(`month disable ${t}`),this.logger.log(`selected_month ${e}`);for(let e=0;e<this.field_expiration_year.options.length;e++)parseInt(this.field_expiration_year.options[e].value)<=i&&(t?this.field_expiration_year.options[e].setAttribute("disabled","disabled"):this.field_expiration_year.options[e].disabled=!1)}else if("year"==e){let e=parseInt(this.field_expiration_year.value),t=e==i;this.logger.log(`year disable ${t}`),this.logger.log(`selected_year ${e}`);for(let e=0;e<this.field_expiration_month.options.length;e++)parseInt(this.field_expiration_month.options[e].value)<n&&(t?this.field_expiration_month.options[e].setAttribute("disabled","disabled"):this.field_expiration_month.options[e].disabled=!1)}},this.vgsField)return void this.logger.log("The Page is Using VGS. Exiting Credit Card Handler");if(!this.ccField)return;"hidden"!==this.ccField.type&&(this.ccField.type="tel");const e=document.getElementsByName("transaction.ccexpire");e&&(this.field_expiration_month=e[0],this.field_expiration_year=e[1]),this._form.onSubmit.subscribe((()=>this.onlyNumbersCC())),this._form.onValidate.subscribe((()=>{this._form.validate&&(p.debug&&console.log("Engrid Credit Cards: onValidate"),this._form.validate=this.validate())})),this.addEventListeners(),this.handleCCUpdate()}addEventListeners(){["keyup","paste"].forEach((e=>{this.ccField.addEventListener(e,(()=>this.handleCCUpdate()))})),this.ccField.addEventListener("keydown",(e=>{" "===e.key&&e.preventDefault()})),this.field_expiration_month&&this.field_expiration_year&&["change"].forEach((e=>{var t,n;null===(t=this.field_expiration_month)||void 0===t||t.addEventListener(e,(()=>{this.handleExpUpdate("month")})),null===(n=this.field_expiration_year)||void 0===n||n.addEventListener(e,(()=>{this.handleExpUpdate("year")}))}));const e=document.getElementsByName("transaction.giveBySelect");e&&e.forEach((e=>{e.addEventListener("change",(()=>{"card"===e.value.toLowerCase()&&(this.logger.log("Handle credit card auto-update"),window.setTimeout((()=>{this.handleCCUpdate()}),100))}))}))}onlyNumbersCC(){const e=this.ccField.value.replace(/\D/g,"");return this.ccField.value=e,!0}handleCCUpdate(){var e,t;const n=this.ccField.closest(".en__field--ccnumber")||document.querySelector(".en__field--ccnumber");if(!n)return void this.logger.log("Card Container Not Found");if(p.removeError(n),this.ccField.value.length<2)return this.removeLiveCardTypeClasses(),void this.clearPaymentTypeField();const i=I.number(this.ccField.value),s=null===(e=i.card)||void 0===e?void 0:e.type,r=null===(t=i.card)||void 0===t?void 0:t.niceType;if(this.isPotentiallyValid=i.isPotentiallyValid||!1,this.isValid=i.isValid||!1,this.removeLiveCardTypeClasses(),!this.isPotentiallyValid)return p.setError(n,"Invalid Credit Card Number"),void this.addLiveCardTypeClasses("invalid");if(!s)return this.removeLiveCardTypeClasses(),void this.clearPaymentTypeField();const o=this.getCardTypeFromPaymentTypeField(s);if(!o)return p.setError(n,`Unsupported Credit Card Type: ${r}`),void this.addLiveCardTypeClasses("invalid");if(this.addLiveCardTypeClasses(s),this.ccField.value=this.formatCCNumber(i.card),this.paymentTypeField.value!=o){this.logger.log(`card type ${s}`),this.paymentTypeField.value=o||"";const e=new Event("change",{bubbles:!0});this.paymentTypeField.dispatchEvent(e)}}formatCCNumber(e){const t=this.ccField.value.replace(/\D/g,""),n=e.gaps;let i="";for(let e=0;e<t.length;e++)n.includes(e)&&(i+=" "),i+=t[e];return i}removeLiveCardTypeClasses(){const e=this.ccField.className.split(" ").filter((e=>!e.startsWith("live-card-type-")));this.ccField.className=e.join(" ").trim()}addLiveCardTypeClasses(e){this.ccField.classList.add(`live-card-type-${e}`),"invalid"==e&&this.clearPaymentTypeField()}clearPaymentTypeField(){this.paymentTypeField.value="";const e=new Event("change",{bubbles:!0});this.paymentTypeField.dispatchEvent(e)}isCardSupported(e){return e in this.ccValues&&Array.from(this.paymentTypeField.options).filter((t=>this.ccValues[e].includes(t.value.toLowerCase()))).length>0}getCardTypeFromPaymentTypeField(e){return this.isCardSupported(e)&&Array.from(this.paymentTypeField.options).filter((t=>this.ccValues[e].includes(t.value.toLowerCase())))[0].value||!1}isPaymentTypeCard(){const e=this.paymentTypeField.value.toLowerCase();return""===e||Object.keys(this.ccValues).some((t=>this.ccValues[t].includes(e)))}validate(){if(this.isPaymentTypeCard()&&!this.isValid){const e=this.ccField.closest(".en__field--ccnumber")||document.querySelector(".en__field--ccnumber");return e&&window.setTimeout((()=>{p.setError(e,"Invalid Credit Card Number"),this.ccField.focus()}),100),!1}return!0}}class R{constructor(){if(this.yearField=document.querySelector("select[name='transaction.ccexpire']:not(#en__field_transaction_ccexpire)"),this.years=20,this.yearLength=2,this.yearField){this.clearFieldOptions();for(let e=0;e<this.years;e++){const t=(new Date).getFullYear()+e,n=document.createElement("option"),i=document.createTextNode(t.toString());n.appendChild(i),n.value=2==this.yearLength?t.toString().substr(-2):t.toString(),this.yearField.appendChild(n)}}}clearFieldOptions(){this.yearField&&(this.yearLength=this.yearField.options[this.yearField.options.length-1].value.length,[...this.yearField.options].forEach((e=>{var t;if(""!==e.value&&!isNaN(Number(e.value))){const n=[...this.yearField.options].findIndex((t=>t.value===e.value));null===(t=this.yearField)||void 0===t||t.remove(n)}})))}}class j{constructor(){this.logger=new be("Autocomplete","#330033","#f0f0f0","πŸ“‡"),this.autoCompleteField('[name="supporter.firstName"]',"given-name"),this.autoCompleteField('[name="supporter.lastName"]',"family-name"),this.autoCompleteField("#en__field_transaction_ccexpire","cc-exp-month"),this.autoCompleteField('[name="transaction.ccexpire"]:not(#en__field_transaction_ccexpire)',"cc-exp-year"),this.autoCompleteField('[name="supporter.emailAddress"]',"email"),this.autoCompleteField('[name="supporter.phoneNumber"]',"tel"),this.autoCompleteField('[name="supporter.country"]',"country"),this.autoCompleteField('[name="supporter.address1"]',"address-line1"),this.autoCompleteField('[name="supporter.address2"]',"address-line2"),this.autoCompleteField('[name="supporter.city"]',"address-level2"),this.autoCompleteField('[name="supporter.region"]',"address-level1"),this.autoCompleteField('[name="supporter.postcode"]',"postal-code"),this.autoCompleteField('[name="transaction.honname"]',"none"),this.autoCompleteField('[name="transaction.infemail"]',"none"),this.autoCompleteField('[name="transaction.infname"]',"none"),this.autoCompleteField('[name="transaction.infadd1"]',"none"),this.autoCompleteField('[name="transaction.infadd2"]',"none"),this.autoCompleteField('[name="transaction.infcity"]',"none"),this.autoCompleteField('[name="transaction.infpostcd"]',"none")}autoCompleteField(e,t){let n=document.querySelector(e);return n?(n.autocomplete=t,!0):("none"!==t&&this.logger.log("Field Not Found",e),!1)}}class V{constructor(){if(this._form=d.getInstance(),this.logger=new be("Ecard","red","#f5f5f5","πŸͺͺ"),!this.shouldRun())return;this._form.onValidate.subscribe((()=>this.checkRecipientFields()));const e=p.getUrlParameter("engrid_ecard.schedule"),t=p.getField("ecard.schedule"),n=p.getUrlParameter("engrid_ecard.name"),i=document.querySelector(".en__ecardrecipients__name input"),s=p.getUrlParameter("engrid_ecard.email"),r=document.querySelector(".en__ecardrecipients__email input");if(e&&t){const n=new Date(e.toString()),i=new Date;n.setHours(0,0,0,0)<i.setHours(0,0,0,0)?t.value=p.formatDate(i,"YYYY-MM-DD"):t.value=e.toString(),this.logger.log("Schedule set to "+t.value)}n&&i&&(i.value=n.toString(),this.logger.log("Name set to "+i.value)),s&&r&&(r.value=s.toString(),this.logger.log("Email set to "+r.value));const o=document.querySelector(".en__ecardrecipients__futureDelivery label");if(o){const e=document.createElement("h2");e.innerText=o.innerText,o.replaceWith(e)}r&&(r.setAttribute("type","email"),r.setAttribute("autocomplete","off"))}shouldRun(){return"ECARD"===p.getPageType()}checkRecipientFields(){const e=document.querySelector(".en__ecarditems__addrecipient");return e&&!document.querySelector(".ecardrecipient__email")&&e.click(),!0}}class H{constructor(){this.clickToExpandWrapper=document.querySelectorAll("div.click-to-expand"),this.clickToExpandWrapper.length&&this.clickToExpandWrapper.forEach((e=>{const t='<div class="click-to-expand-cta"></div><div class="click-to-expand-text-wrapper" tabindex="0">'+e.innerHTML+"</div>";e.innerHTML=t,e.addEventListener("click",(t=>{t&&(p.debug&&console.log("A click-to-expand div was clicked"),e.classList.add("expanded"))})),e.addEventListener("keydown",(t=>{"Enter"===t.key?(p.debug&&console.log("A click-to-expand div had the 'Enter' key pressed on it"),e.classList.add("expanded")):" "===t.key&&(p.debug&&console.log("A click-to-expand div had the 'Spacebar' key pressed on it"),e.classList.add("expanded"),t.preventDefault(),t.stopPropagation())}))}))}}class U{constructor(){this.logger=new be("Advocacy","#232323","#f7b500","πŸ‘¨β€βš–οΈ"),this.shoudRun()&&this.setClickableLabels()}shoudRun(){return["ADVOCACY","EMAILTOTARGET"].includes(p.getPageType())}setClickableLabels(){const e=document.querySelectorAll(".en__contactDetails__rows");e&&e.forEach((e=>{e.addEventListener("click",(t=>{this.toggleCheckbox(e)}))}))}toggleCheckbox(e){const t=e.closest(".en__contactDetails");if(!t)return;const n=t.querySelector("input[type='checkbox']");n&&(this.logger.log("toggleCheckbox",n.checked),n.checked=!n.checked)}}class ${constructor(){this._country=b.getInstance(),this.setDataAttributes()}setDataAttributes(){p.checkNested(window,"pageJson","pageType")&&p.setBodyData("page-type",window.pageJson.pageType),p.setBodyData("currency-code",p.getCurrencyCode()),document.querySelector(".body-banner img, .body-banner video")||p.setBodyData("body-banner","empty"),document.querySelector(".page-alert *")||p.setBodyData("no-page-alert",""),document.querySelector(".content-header *")||p.setBodyData("no-content-header",""),document.querySelector(".body-headerOutside *")||p.setBodyData("no-body-headerOutside",""),document.querySelector(".body-header *")||p.setBodyData("no-body-header",""),document.querySelector(".body-title *")||p.setBodyData("no-body-title",""),document.querySelector(".body-banner *")||p.setBodyData("no-body-banner",""),document.querySelector(".body-bannerOverlay *")||p.setBodyData("no-body-bannerOverlay",""),document.querySelector(".body-top *")||p.setBodyData("no-body-top",""),document.querySelector(".body-main *")||p.setBodyData("no-body-main",""),document.querySelector(".body-bottom *")||p.setBodyData("no-body-bottom",""),document.querySelector(".body-footer *")||p.setBodyData("no-body-footer",""),document.querySelector(".body-footerOutside *")||p.setBodyData("no-body-footerOutside",""),document.querySelector(".content-footerSpacer *")||p.setBodyData("no-content-footerSpacer",""),document.querySelector(".content-preFooter *")||p.setBodyData("no-content-preFooter",""),document.querySelector(".content-footer *")||p.setBodyData("no-content-footer",""),document.querySelector(".page-backgroundImage img, .page-backgroundImage video")||p.setBodyData("no-page-backgroundImage",""),document.querySelector(".page-backgroundImageOverlay *")||p.setBodyData("no-page-backgroundImageOverlay",""),document.querySelector(".page-customCode *")||p.setBodyData("no-page-customCode",""),this._country.country&&(p.setBodyData("country",this._country.country),this._country.onCountryChange.subscribe((e=>{p.setBodyData("country",e)})));const e=document.querySelector(".en__field--donationAmt .en__field__item--other");e&&e.setAttribute("data-currency-symbol",p.getCurrencySymbol());const t=p.getField("transaction.paymenttype");t&&(p.setBodyData("payment-type",t.value),t.addEventListener("change",(()=>{p.setBodyData("payment-type",t.value)})));const n=document.querySelector(".content-footer");n&&p.isInViewport(n)?p.setBodyData("footer-above-fold",""):p.setBodyData("footer-below-fold",""),p.demo&&p.setBodyData("demo","")}}class W{constructor(){if(this._form=d.getInstance(),this.logger=new be("iFrame","brown","gray","πŸ“‘"),this.inIframe()){p.setBodyData("embedded",""),this.logger.log("iFrame Event - Begin Resizing"),window.addEventListener("load",(e=>{this.logger.log("iFrame Event - window.onload"),this.sendIframeHeight(),window.parent.postMessage({scroll:this.shouldScroll()},"*"),document.addEventListener("click",(e=>{this.logger.log("iFrame Event - click"),setTimeout((()=>{this.sendIframeHeight()}),100)}))})),window.setTimeout((()=>{this.sendIframeHeight()}),300),window.addEventListener("resize",this.debounceWithImmediate((()=>{this.logger.log("iFrame Event - window resized"),this.sendIframeHeight()}))),this._form.onSubmit.subscribe((e=>{this.logger.log("iFrame Event - onSubmit"),this.sendIframeFormStatus("submit")})),this.isChained()&&this.hasPayment()&&(this.logger.log("iFrame Event - Chained iFrame"),this.sendIframeFormStatus("chained"),this.hideFormComponents(),this.addChainedBanner());const e=document.querySelector(".skip-link");e&&e.remove(),this._form.onError.subscribe((()=>{const e=document.querySelector(".en__field--validationFailed"),t=e?e.getBoundingClientRect().top:0;this.logger.log(`iFrame Event 'scrollTo' - Position of top of first error ${t} px`),window.parent.postMessage({scrollTo:t},"*")}))}else this._form.onError.subscribe((()=>{const e=document.querySelector(".en__field--validationFailed");e&&e.scrollIntoView({behavior:"smooth"})})),window.addEventListener("message",(e=>{const t=this.getIFrameByEvent(e);if(t)if(e.data.hasOwnProperty("frameHeight"))t.style.height=e.data.frameHeight+"px";else if(e.data.hasOwnProperty("scroll")&&e.data.scroll>0){let n=window.pageYOffset+t.getBoundingClientRect().top+e.data.scroll;window.scrollTo({top:n,left:0,behavior:"smooth"}),this.logger.log("iFrame Event - Scrolling Window to "+n)}else if(e.data.hasOwnProperty("scrollTo")){const n=e.data.scrollTo+window.scrollY+t.getBoundingClientRect().top;window.scrollTo({top:n,left:0,behavior:"smooth"}),this.logger.log("iFrame Event - Scrolling Window to "+n)}}))}sendIframeHeight(){let e=document.body.offsetHeight;this.logger.log("iFrame Event - Sending iFrame height of: "+e+"px"),window.parent.postMessage({frameHeight:e,pageNumber:p.getPageNumber(),pageCount:p.getPageCount(),giftProcess:p.getGiftProcess()},"*")}sendIframeFormStatus(e){window.parent.postMessage({status:e,pageNumber:p.getPageNumber(),pageCount:p.getPageCount(),giftProcess:p.getGiftProcess()},"*")}getIFrameByEvent(e){return[].slice.call(document.getElementsByTagName("iframe")).filter((t=>t.contentWindow===e.source))[0]}shouldScroll(){if(document.querySelector(".en__errorHeader"))return!0;if(this.isChained())return!1;let e=document.referrer;return new RegExp(/^(.*)\/(page)\/(\d+.*)/).test(e)}inIframe(){try{return window.self!==window.top}catch(e){return!0}}isChained(){return!!p.getUrlParameter("chain")}hasPayment(){const e=p.getFieldValue("transaction.paymenttype"),t=p.getFieldValue("transaction.ccnumber");return e||t}hideFormComponents(){this.logger.log("iFrame Event - Hiding Form Components");const e=document.querySelectorAll(".body-main > div");e.forEach(((t,n)=>{!1===t.classList.contains("hide")&&!1===t.classList.contains("hide-iframe")&&!1===t.classList.contains("radio-to-buttons_donationAmt")&&n<e.length-1&&(t.classList.add("hide-iframe"),t.classList.add("hide-chained"))})),this.sendIframeHeight()}showFormComponents(){this.logger.log("iFrame Event - Showing Form Components");document.querySelectorAll(".body-main > div.hide-chained").forEach((e=>{e.classList.remove("hide-iframe"),e.classList.remove("hide-chained")})),this.sendIframeHeight()}addChainedBanner(){var e,t;this.logger.log("iFrame Event - Adding Chained Banner");const n=document.createElement("div"),i=document.querySelector(".body-main > div:last-of-type");n.classList.add("en__component"),n.classList.add("en__component--banner"),n.classList.add("en__component--banner--chained"),n.innerHTML=`<div class="en__component__content"><div class="en__component__content__inner"><div class="en__component__content__text"><p>\n Giving as <strong>${p.getFieldValue("supporter.firstName")} ${p.getFieldValue("supporter.lastName")}</strong> \n with <strong>${p.getFieldValue("transaction.paymenttype").toUpperCase()}</strong>\n (<a href="#" class="en__component__content__link">change</a>)</p></div></div></div>`,null===(e=null==i?void 0:i.parentNode)||void 0===e||e.insertBefore(n,i),null===(t=n.querySelector(".en__component__content__link"))||void 0===t||t.addEventListener("click",(e=>{e.preventDefault(),this.showFormComponents(),n.remove()}))}debounceWithImmediate(e,t=1e3){let n,i=!0;return(...s)=>{clearTimeout(n),i&&(e.apply(this,s),i=!1),n=setTimeout((()=>{e.apply(this,s),i=!0}),t)}}}class G{constructor(){this.logger=new be("InputHasValueAndFocus","yellow","#333","🌈"),this.formInputs=document.querySelectorAll(".en__field--text, .en__field--email:not(.en__field--checkbox), .en__field--telephone, .en__field--number, .en__field--textarea, .en__field--select, .en__field--checkbox"),this.shouldRun()&&this.run()}shouldRun(){return this.formInputs.length>0}run(){this.formInputs.forEach((e=>{const t=e.querySelector("input, textarea, select");t&&t.value&&e.classList.add("has-value"),this.bindEvents(e)}))}bindEvents(e){const t=e.querySelector("input, textarea, select");t&&(t.addEventListener("focus",(()=>{this.log("Focus added",t),e.classList.add("has-focus")})),t.addEventListener("blur",(()=>{this.log("Focus removed",t),e.classList.remove("has-focus")})),t.addEventListener("input",(()=>{t.value?(this.log("Value added",t),e.classList.add("has-value")):(this.log("Value removed",t),e.classList.remove("has-value"))})))}log(e,t){this.logger.log(`${e} on ${t.name}: ${t.value}`)}}class z{constructor(){if(this.defaultPlaceholders={"input#en__field_supporter_firstName":"First Name","input#en__field_supporter_lastName":"Last Name","input#en__field_supporter_emailAddress":"Email Address","input#en__field_supporter_phoneNumber":"Phone Number (Optional)",".en__mandatory input#en__field_supporter_phoneNumber":"Phone Number","input#en__field_supporter_phoneNumber2":"000-000-0000 (Optional)",".en__mandatory input#en__field_supporter_phoneNumber2":"000-000-0000","input#en__field_supporter_country":"Country","input#en__field_supporter_address1":"Street Address","input#en__field_supporter_address2":"Apt., Ste., Bldg.","input#en__field_supporter_city":"City","input#en__field_supporter_region":"Region","input#en__field_supporter_postcode":"ZIP Code",".en__field--donationAmt.en__field--withOther .en__field__input--other":"Other","input#en__field_transaction_ccnumber":"β€’β€’β€’β€’ β€’β€’β€’β€’ β€’β€’β€’β€’ β€’β€’β€’β€’","input#en__field_transaction_ccexpire":"MM / YY","input#en__field_transaction_ccvv":"CVV","input#en__field_supporter_bankAccountNumber":"Bank Account Number","input#en__field_supporter_bankRoutingNumber":"Bank Routing Number","input#en__field_transaction_honname":"Honoree Name","input#en__field_transaction_infname":"Recipient Name","input#en__field_transaction_infemail":"Recipient Email Address","input#en__field_transaction_infcountry":"Country","input#en__field_transaction_infadd1":"Recipient Street Address","input#en__field_transaction_infadd2":"Recipient Apt., Ste., Bldg.","input#en__field_transaction_infcity":"Recipient City","input#en__field_transaction_infpostcd":"Recipient Postal Code","input#en__field_transaction_gftrsn":"Reason for your gift","input#en__field_transaction_shipfname":"Shipping First Name","input#en__field_transaction_shiplname":"Shipping Last Name","input#en__field_transaction_shipemail":"Shipping Email Address","input#en__field_transaction_shipcountry":"Shipping Country","input#en__field_transaction_shipadd1":"Shipping Street Address","input#en__field_transaction_shipadd2":"Shipping Apt., Ste., Bldg.","input#en__field_transaction_shipcity":"Shipping City","input#en__field_transaction_shipregion":"Shipping Region","input#en__field_transaction_shippostcode":"Shipping Postal Code","input#en__field_supporter_billingCountry":"Billing Country","input#en__field_supporter_billingAddress1":"Billing Street Address","input#en__field_supporter_billingAddress2":"Billing Apt., Ste., Bldg.","input#en__field_supporter_billingCity":"Billing City","input#en__field_supporter_billingRegion":"Billing Region","input#en__field_supporter_billingPostcode":"Billing Postal Code"},this.shouldRun()){const e=p.getOption("Placeholders");e&&(this.defaultPlaceholders=Object.assign(Object.assign({},this.defaultPlaceholders),e)),this.run()}}shouldRun(){return p.hasBodyData("add-input-placeholders")}run(){Object.keys(this.defaultPlaceholders).forEach((e=>{e in this.defaultPlaceholders&&this.addPlaceholder(e,this.defaultPlaceholders[e])}))}addPlaceholder(e,t){const n=document.querySelector(e);n&&(n.placeholder=t)}}const Y=n(3861).ZP;class J{constructor(){this.mediaWithAttribution=document.querySelectorAll("img[data-attribution-source]:not([data-attribution-hide-overlay]), video[data-attribution-source]:not([data-attribution-hide-overlay])"),this.mediaWithAttribution.forEach((e=>{p.debug&&console.log("The following image was found with data attribution fields on it. It's markup will be changed to add caption support.",e);let t=document.createElement("figure");t.classList.add("media-with-attribution");let n=e.parentNode;if(n){n.insertBefore(t,e),t.appendChild(e);let i=e,s=i.dataset.attributionSource;if(s){let e=i.dataset.attributionSourceLink;e?i.insertAdjacentHTML("afterend",'<figattribution><a href="'+decodeURIComponent(e)+'" target="_blank" tabindex="-1">'+s+"</a></figure>"):i.insertAdjacentHTML("afterend","<figattribution>"+s+"</figure>");const t="attributionSourceTooltip"in i.dataset&&i.dataset.attributionSourceTooltip;t&&Y(i.nextSibling,{content:t,arrow:!0,arrowType:"default",placement:"left",trigger:"click mouseenter focus",interactive:!0})}}}))}}class K{constructor(t){var n;this._amount=h.getInstance(),this._fees=m.getInstance(),this._frequency=g.getInstance(),this._form=d.getInstance(),this.multiplier=1/12,this.options=Object.assign(Object.assign({},e),t),this.submitLabel=(null===(n=document.querySelector(".en__submit button"))||void 0===n?void 0:n.innerHTML)||"Donate",this._amount.onAmountChange.subscribe((()=>this.changeSubmitButton())),this._amount.onAmountChange.subscribe((()=>this.changeLiveAmount())),this._amount.onAmountChange.subscribe((()=>this.changeLiveUpsellAmount())),this._fees.onFeeChange.subscribe((()=>this.changeLiveAmount())),this._fees.onFeeChange.subscribe((()=>this.changeLiveUpsellAmount())),this._fees.onFeeChange.subscribe((()=>this.changeSubmitButton())),this._frequency.onFrequencyChange.subscribe((()=>this.changeLiveFrequency())),this._frequency.onFrequencyChange.subscribe((()=>this.changeRecurrency())),this._frequency.onFrequencyChange.subscribe((()=>this.changeSubmitButton())),this._form.onSubmit.subscribe((()=>{"SUPPORTERHUB"!==p.getPageType()&&p.disableSubmit("Processing...")})),this._form.onError.subscribe((()=>p.enableSubmit())),document.addEventListener("click",(e=>{const t=e.target;t&&(t.classList.contains("monthly-upsell")?this.upsold(e):t.classList.contains("form-submit")&&(e.preventDefault(),this._form.submitForm()))}))}getAmountTxt(e=0){var t,n,i,s;const r=null!==(t=p.getCurrencySymbol())&&void 0!==t?t:"$",o=null!==(n=this.options.DecimalSeparator)&&void 0!==n?n:".",a=null!==(i=this.options.ThousandsSeparator)&&void 0!==i?i:"",l=e%1==0?0:null!==(s=this.options.DecimalPlaces)&&void 0!==s?s:2,c=p.formatNumber(e,l,o,a);return e>0?`<span class="live-variable-currency">${r}</span><span class="live-variable-amount">${c}</span>`:""}getUpsellAmountTxt(e=0){var t,n,i,s;const r=null!==(t=p.getCurrencySymbol())&&void 0!==t?t:"$",o=null!==(n=this.options.DecimalSeparator)&&void 0!==n?n:".",a=null!==(i=this.options.ThousandsSeparator)&&void 0!==i?i:"",l=e%1==0?0:null!==(s=this.options.DecimalPlaces)&&void 0!==s?s:2,c=p.formatNumber(5*Math.ceil(e/5),l,o,a);return e>0?r+c:""}getUpsellAmountRaw(e=0){const t=5*Math.ceil(e/5);return e>0?t.toString():""}changeSubmitButton(){const e=document.querySelector(".en__submit button"),t=this.getAmountTxt(this._amount.amount+this._fees.fee),n="onetime"==this._frequency.frequency?"":"annual"==this._frequency.frequency?"annually":this._frequency.frequency;let i=this.submitLabel;t?(i=i.replace("$AMOUNT",t),i=i.replace("$FREQUENCY",`<span class="live-variable-frequency">${n}</span>`)):(i=i.replace("$AMOUNT",""),i=i.replace("$FREQUENCY","")),e&&i&&(e.innerHTML=i)}changeLiveAmount(){const e=this._amount.amount+this._fees.fee;document.querySelectorAll(".live-giving-amount").forEach((t=>t.innerHTML=this.getAmountTxt(e)))}changeLiveUpsellAmount(){const e=(this._amount.amount+this._fees.fee)*this.multiplier;document.querySelectorAll(".live-giving-upsell-amount").forEach((t=>t.innerHTML=this.getUpsellAmountTxt(e)));document.querySelectorAll(".live-giving-upsell-amount-raw").forEach((t=>t.innerHTML=this.getUpsellAmountRaw(e)))}changeLiveFrequency(){document.querySelectorAll(".live-giving-frequency").forEach((e=>e.innerHTML="onetime"==this._frequency.frequency?"":this._frequency.frequency))}changeRecurrency(){const e=document.querySelector("[name='transaction.recurrpay']");if(e&&"radio"!=e.type){e.value="onetime"==this._frequency.frequency?"N":"Y",this._frequency.recurring=e.value,p.getOption("Debug")&&console.log("Recurpay Changed!");const t=new Event("change",{bubbles:!0});e.dispatchEvent(t)}}upsold(e){const t=document.querySelector(".en__field--recurrpay input[value='Y']");t&&(t.checked=!0);const n=document.querySelector(".en__field--donationAmt input[value='other']");n&&(n.checked=!0);const i=document.querySelector("input[name='transaction.donationAmt.other']");i&&(i.value=this.getUpsellAmountRaw(this._amount.amount*this.multiplier),this._amount.load(),this._frequency.load(),i.parentElement&&i.parentElement.classList.remove("en__field__item--hidden"));const s=e.target;s&&s.classList.contains("form-submit")&&(e.preventDefault(),this._form.submitForm())}}class X{constructor(){this.overlay=document.createElement("div"),this._form=d.getInstance(),this._amount=h.getInstance(),this._fees=m.getInstance(),this._frequency=g.getInstance(),this._dataLayer=_e.getInstance(),this.logger=new be("UpsellLightbox","black","pink","πŸͺŸ");let e="EngridUpsell"in window?window.EngridUpsell:{};this.options=Object.assign(Object.assign({},t),e),this.options.disablePaymentMethods.push("applepay"),this.shouldRun()?(this.overlay.id="enModal",this.overlay.classList.add("is-hidden"),this.overlay.classList.add("image-"+this.options.imagePosition),this.renderLightbox(),this._form.onSubmit.subscribe((()=>this.open()))):this.logger.log("Upsell script should NOT run")}renderLightbox(){const e=this.options.title.replace("{new-amount}","<span class='upsell_suggestion'></span>").replace("{old-amount}","<span class='upsell_amount'></span>").replace("{old-frequency}","<span class='upsell_frequency'></span>"),t=this.options.paragraph.replace("{new-amount}","<span class='upsell_suggestion'></span>").replace("{old-amount}","<span class='upsell_amount'></span>").replace("{old-frequency}","<span class='upsell_frequency'></span>"),n=this.options.yesLabel.replace("{new-amount}","<span class='upsell_suggestion'></span>").replace("{old-amount}","<span class='upsell_amount'></span>").replace("{old-frequency}","<span class='upsell_frequency'></span>"),i=this.options.noLabel.replace("{new-amount}","<span class='upsell_suggestion'></span>").replace("{old-amount}","<span class='upsell_amount'></span>").replace("{old-frequency}","<span class='upsell_frequency'></span>"),s=`\n <div class="upsellLightboxContainer" id="goMonthly">\n \x3c!-- ideal image size is 480x650 pixels --\x3e\n <div class="background" style="background-image: url('${this.options.image}');"></div>\n <div class="upsellLightboxContent">\n ${this.options.canClose?'<span id="goMonthlyClose"></span>':""}\n <h1>\n ${e}\n </h1>\n ${this.options.otherAmount?`\n <div class="upsellOtherAmount">\n <div class="upsellOtherAmountLabel">\n <p>\n ${this.options.otherLabel}\n </p>\n </div>\n <div class="upsellOtherAmountInput">\n <input href="#" id="secondOtherField" name="secondOtherField" type="text" value="" inputmode="decimal" aria-label="Enter your custom donation amount" autocomplete="off" data-lpignore="true" aria-required="true" size="12">\n <small>Minimum ${this.getAmountTxt(this.options.minAmount)}</small>\n </div>\n </div>\n `:""}\n\n <p>\n ${t}\n </p>\n \x3c!-- YES BUTTON --\x3e\n <div id="upsellYesButton">\n <a class="pseduo__en__submit_button" href="#">\n <div>\n <span class='loader-wrapper'><span class='loader loader-quart'></span></span>\n <span class='label'>${n}</span>\n </div>\n </a>\n </div>\n \x3c!-- NO BUTTON --\x3e\n <div id="upsellNoButton">\n <button title="Close (Esc)" type="button">\n <div>\n <span class='loader-wrapper'><span class='loader loader-quart'></span></span>\n <span class='label'>${i}</span>\n </div>\n </button>\n </div>\n </div>\n </div>\n `;this.overlay.innerHTML=s;const r=this.overlay.querySelector("#goMonthlyClose"),o=this.overlay.querySelector("#upsellYesButton a"),a=this.overlay.querySelector("#upsellNoButton button");o.addEventListener("click",this.continue.bind(this)),a.addEventListener("click",this.continue.bind(this)),r&&r.addEventListener("click",this.close.bind(this)),this.overlay.addEventListener("click",(e=>{e.target instanceof Element&&e.target.id==this.overlay.id&&this.options.canClose&&this.close(e)})),document.addEventListener("keyup",(e=>{"Escape"===e.key&&r&&r.click()})),document.body.appendChild(this.overlay);const l=document.querySelector("#secondOtherField");l&&l.addEventListener("keyup",this.popupOtherField.bind(this)),this.logger.log("Upsell script rendered")}shouldRun(){return!this.shouldSkip()&&"EngridUpsell"in window&&!!window.pageJson&&1==window.pageJson.pageNumber&&["donation","premiumgift"].includes(window.pageJson.pageType)}shouldSkip(){return!(!("EngridUpsell"in window)||!window.EngridUpsell.skipUpsell)||this.options.skipUpsell}popupOtherField(){var e,t;const n=parseFloat(null!==(t=null===(e=this.overlay.querySelector("#secondOtherField"))||void 0===e?void 0:e.value)&&void 0!==t?t:""),i=document.querySelectorAll("#upsellYesButton .upsell_suggestion"),s=this.getUpsellAmount();!isNaN(n)&&n>0?this.checkOtherAmount(n):this.checkOtherAmount(s),i.forEach((e=>e.innerHTML=this.getAmountTxt(s+this._fees.calculateFees(s))))}liveAmounts(){const e=document.querySelectorAll(".upsell_suggestion"),t=document.querySelectorAll(".upsell_amount"),n=this.getUpsellAmount(),i=n+this._fees.calculateFees(n);e.forEach((e=>e.innerHTML=this.getAmountTxt(i))),t.forEach((e=>e.innerHTML=this.getAmountTxt(this._amount.amount+this._fees.fee)))}liveFrequency(){document.querySelectorAll(".upsell_frequency").forEach((e=>e.innerHTML=this.getFrequencyTxt()))}getUpsellAmount(){var e,t;const n=this._amount.amount,i=parseFloat(null!==(t=null===(e=this.overlay.querySelector("#secondOtherField"))||void 0===e?void 0:e.value)&&void 0!==t?t:"");if(i>0)return i>this.options.minAmount?i:this.options.minAmount;let s=0;for(let e=0;e<this.options.amountRange.length;e++){let t=this.options.amountRange[e];if(0==s&&n<=t.max){if(s=t.suggestion,0===s)return 0;if("number"!=typeof s){const e=s.replace("amount",n.toFixed(2));s=parseFloat(Function('"use strict";return ('+e+")")())}break}}return s>this.options.minAmount?s:this.options.minAmount}shouldOpen(){const e=this.getUpsellAmount(),t=p.getFieldValue("transaction.paymenttype")||"";return!(!this.freqAllowed()||this.shouldSkip()||this.options.disablePaymentMethods.includes(t.toLowerCase())||this.overlay.classList.contains("is-submitting")||!(e>0))&&(this.logger.log("Upsell Frequency "+this._frequency.frequency),this.logger.log("Upsell Amount "+this._amount.amount),this.logger.log("Upsell Suggested Amount "+e),!0)}freqAllowed(){const e=this._frequency.frequency,t=[];return this.options.oneTime&&t.push("onetime"),this.options.annual&&t.push("annual"),t.includes(e)}open(){if(this.logger.log("Upsell script opened"),!this.shouldOpen()){let e=window.sessionStorage.getItem("original");return e&&document.querySelectorAll(".en__errorList .en__error").length>0&&this.setOriginalAmount(e),this._form.submit=!0,!0}return this.liveAmounts(),this.liveFrequency(),this.overlay.classList.remove("is-hidden"),this._form.submit=!1,p.setBodyData("has-lightbox",""),!1}setOriginalAmount(e){if(this.options.upsellOriginalGiftAmountFieldName){let t=document.querySelector(".en__field__input.en__field__input--hidden[name='"+this.options.upsellOriginalGiftAmountFieldName+"']");if(!t){let e=document.querySelector("form.en__component--page");if(e){let n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",this.options.upsellOriginalGiftAmountFieldName),n.classList.add("en__field__input","en__field__input--hidden"),e.appendChild(n),t=document.querySelector('.en__field__input.en__field__input--hidden[name="'+this.options.upsellOriginalGiftAmountFieldName+'"]')}}t&&(window.sessionStorage.setItem("original",e),t.setAttribute("value",e))}}continue(e){var t;if(e.preventDefault(),e.target instanceof Element&&(null===(t=document.querySelector("#upsellYesButton"))||void 0===t?void 0:t.contains(e.target))){this.logger.success("Upsold"),this.setOriginalAmount(this._amount.amount.toString());const e=this.getUpsellAmount(),t=this._amount.amount;this._frequency.setFrequency("monthly"),this._amount.setAmount(e),this._dataLayer.addEndOfGiftProcessEvent("ENGRID_UPSELL",{eventValue:!0,originalAmount:t,upsoldAmount:e,frequency:"monthly"}),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL",!0),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL_ORIGINAL_AMOUNT",t),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL_DONATION_FREQUENCY","MONTHLY")}else this.setOriginalAmount(""),window.sessionStorage.removeItem("original"),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL",!1),this._dataLayer.addEndOfGiftProcessVariable("ENGRID_UPSELL_DONATION_FREQUENCY","ONE-TIME");this._form.submitForm()}close(e){e.preventDefault(),this.overlay.classList.add("is-hidden"),p.setBodyData("has-lightbox",!1),this.options.submitOnClose?this._form.submitForm():this._form.dispatchError()}getAmountTxt(e=0){var t,n,i,s;const r=null!==(t=p.getCurrencySymbol())&&void 0!==t?t:"$",o=null!==(n=p.getOption("DecimalSeparator"))&&void 0!==n?n:".",a=null!==(i=p.getOption("ThousandsSeparator"))&&void 0!==i?i:"",l=e%1==0?0:null!==(s=p.getOption("DecimalPlaces"))&&void 0!==s?s:2,c=p.formatNumber(e,l,o,a);return e>0?r+c:""}getFrequencyTxt(){const e={onetime:"one-time",monthly:"monthly",annual:"annual"},t=this._frequency.frequency;return t in e?e[t]:t}checkOtherAmount(e){const t=document.querySelector(".upsellOtherAmountInput");t&&(e>=this.options.minAmount?t.classList.remove("is-invalid"):t.classList.add("is-invalid"))}}class Q{constructor(e,t){this.logger=new be("ShowHideRadioCheckboxes","black","lightblue","πŸ‘"),this.elements=document.getElementsByName(e),this.classes=t,this.createDataAttributes(),this.hideAll();for(let e=0;e<this.elements.length;e++){let t=this.elements[e];t.checked&&this.show(t),t.addEventListener("change",(e=>{this.hideAll(),this.show(t)}))}}createDataAttributes(){this.elements.forEach((e=>{if(e instanceof HTMLInputElement){let t=e.value.replace(/\W/g,"");document.querySelectorAll("."+this.classes+t).forEach((e=>{if(e instanceof HTMLElement){const t=e.querySelectorAll("input[type='text'], input[type='number'], input[type='email'], select, textarea");t.length>0&&t.forEach((e=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)&&(e.hasAttribute("data-original-value")||e.setAttribute("data-original-value",e.value),e.hasAttribute("data-value")||e.setAttribute("data-value",e.value))}))}}))}}))}hideAll(){this.elements.forEach(((e,t)=>{e instanceof HTMLInputElement&&this.hide(e)}))}hide(e){let t=e.value.replace(/\W/g,"");document.querySelectorAll("."+this.classes+t).forEach((e=>{e instanceof HTMLElement&&(this.toggleValue(e,"hide"),e.style.display="none",this.logger.log("Hiding",e))}))}show(e){let t=e.value.replace(/\W/g,"");document.querySelectorAll("."+this.classes+t).forEach((e=>{e instanceof HTMLElement&&(this.toggleValue(e,"show"),e.style.display="",this.logger.log("Showing",e))})),"checkbox"!=e.type||e.checked||this.hide(e)}toggleValue(e,t){if("hide"==t&&!p.isVisible(e))return;this.logger.log(`toggleValue: ${t}`);const n=e.querySelectorAll("input[type='text'], input[type='number'], input[type='email'], select, textarea");n.length>0&&n.forEach((e=>{var n;if((e instanceof HTMLInputElement||e instanceof HTMLSelectElement)&&e.name){const i=p.getFieldValue(e.name),s=e.getAttribute("data-original-value"),r=null!==(n=e.getAttribute("data-value"))&&void 0!==n?n:"";"hide"===t?(e.setAttribute("data-value",i),p.setFieldValue(e.name,s)):p.setFieldValue(e.name,r)}}))}}function Z(e,t){if(!t)return"";let n="; "+e;return!0===t?n:n+"="+t}function ee(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){let t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return Z("Expires",e.expires?e.expires.toUTCString():"")+Z("Domain",e.domain)+Z("Path",e.path)+Z("Secure",e.secure)+Z("SameSite",e.sameSite)}(n)}function te(){return function(e){let t={},n=e?e.split("; "):[],i=/(%[\dA-F]{2})+/gi;for(let e=0;e<n.length;e++){let s=n[e].split("="),r=s.slice(1).join("=");'"'===r.charAt(0)&&(r=r.slice(1,-1));try{t[s[0].replace(i,decodeURIComponent)]=r.replace(i,decodeURIComponent)}catch(e){}}return t}(document.cookie)}function ne(e){return te()[e]}function ie(e,t,n){document.cookie=ee(e,t,Object.assign({path:"/"},n))}class se{constructor(){this.countryToStateFields={"supporter.country":"supporter.region","transaction.shipcountry":"transaction.shipregion","supporter.billingCountry":"supporter.billingRegion","transaction.infcountry":"transaction.infreg"},this.countriesSelect=document.querySelectorAll('select[name="supporter.country"], select[name="transaction.shipcountry"], select[name="supporter.billingCountry"], select[name="transaction.infcountry"]');let e="EngridTranslate"in window?window.EngridTranslate:{};if(this.options=a,e)for(let t in e)this.options[t]=this.options[t]?[...this.options[t],...e[t]]:e[t];let t={};if(this.countriesSelect){this.countriesSelect.forEach((e=>{e.addEventListener("change",this.translateFields.bind(this,e.name)),e.value&&(t[e.name]=e.value);const n=document.querySelector(`select[name="${this.countryToStateFields[e.name]}"]`);n&&(n.addEventListener("change",this.rememberState.bind(this,e.name)),n.value&&(t[n.name]=n.value))})),this.translateFields("supporter.country");if(!!(!p.checkNested(window.EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")||!window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()))for(let e in t)p.setFieldValue(e,t[e],!1)}}translateFields(e="supporter.country"){this.resetTranslatedFields();const t=p.getFieldValue(e);if(this.setStateField(t,this.countryToStateFields[e]),"supporter.country"===e){t in this.options&&this.options[t].forEach((e=>{this.translateField(e.field,e.translation)}));const e=document.querySelectorAll(".recipient-block");if(e.length)switch(t){case"FR":case"FRA":case"France":e.forEach((e=>e.innerHTML="Γ€:"));break;case"DE":case"DEU":case"Germany":e.forEach((e=>e.innerHTML="Zu:"));break;case"NL":case"NLD":case"Netherlands":e.forEach((e=>e.innerHTML="Aan:"))}}}translateField(e,t){const n=document.querySelector(`[name="${e}"]`);if(n){const e=n.closest(".en__field");if(e){const i=e.querySelector(".en__field__label"),s=i.querySelector(".engrid-simple-country");let r=s?s.cloneNode(!0):null;n instanceof HTMLInputElement&&""!=n.placeholder&&(i&&i.innerHTML!=n.placeholder||(n.dataset.original=n.placeholder,n.placeholder=t)),i&&(i.dataset.original=i.innerHTML,i.innerHTML=t,r&&i.appendChild(r))}}}resetTranslatedFields(){document.querySelectorAll("[data-original]").forEach((e=>{if(e instanceof HTMLInputElement&&e.dataset.original)e.placeholder=e.dataset.original;else{const t=e.querySelector(".engrid-simple-country");let n=t?t.cloneNode(!0):null;e.innerHTML=e.dataset.original,n&&e.appendChild(n)}e.removeAttribute("data-original")}))}setStateField(e,t){switch(e){case"ES":case"ESP":case"Spain":this.setStateValues(t,"Provincia",null);break;case"BR":case"BRA":case"Brazil":this.setStateValues(t,"Estado",null);break;case"FR":case"FRA":case"France":this.setStateValues(t,"RΓ©gion",null);break;case"GB":case"GBR":case"United Kingdom":this.setStateValues(t,"State/Region",null);break;case"DE":case"DEU":case"Germany":this.setStateValues(t,"Bundesland",null);break;case"NL":case"NLD":case"Netherlands":this.setStateValues(t,"Provincie",null);break;case"AU":case"AUS":this.setStateValues(t,"Province / State",[{label:"Select",value:""},{label:"New South Wales",value:"NSW"},{label:"Victoria",value:"VIC"},{label:"Queensland",value:"QLD"},{label:"South Australia",value:"SA"},{label:"Western Australia",value:"WA"},{label:"Tasmania",value:"TAS"},{label:"Northern Territory",value:"NT"},{label:"Australian Capital Territory",value:"ACT"}]);break;case"Australia":this.setStateValues(t,"Province / State",[{label:"Select",value:""},{label:"New South Wales",value:"New South Wales"},{label:"Victoria",value:"Victoria"},{label:"Queensland",value:"Queensland"},{label:"South Australia",value:"South Australia"},{label:"Western Australia",value:"Western Australia"},{label:"Tasmania",value:"Tasmania"},{label:"Northern Territory",value:"Northern Territory"},{label:"Australian Capital Territory",value:"Australian Capital Territory"}]);break;case"US":case"USA":this.setStateValues(t,"State",[{label:"Select State",value:""},{label:"Alabama",value:"AL"},{label:"Alaska",value:"AK"},{label:"Arizona",value:"AZ"},{label:"Arkansas",value:"AR"},{label:"California",value:"CA"},{label:"Colorado",value:"CO"},{label:"Connecticut",value:"CT"},{label:"Delaware",value:"DE"},{label:"District of Columbia",value:"DC"},{label:"Florida",value:"FL"},{label:"Georgia",value:"GA"},{label:"Hawaii",value:"HI"},{label:"Idaho",value:"ID"},{label:"Illinois",value:"IL"},{label:"Indiana",value:"IN"},{label:"Iowa",value:"IA"},{label:"Kansas",value:"KS"},{label:"Kentucky",value:"KY"},{label:"Louisiana",value:"LA"},{label:"Maine",value:"ME"},{label:"Maryland",value:"MD"},{label:"Massachusetts",value:"MA"},{label:"Michigan",value:"MI"},{label:"Minnesota",value:"MN"},{label:"Mississippi",value:"MS"},{label:"Missouri",value:"MO"},{label:"Montana",value:"MT"},{label:"Nebraska",value:"NE"},{label:"Nevada",value:"NV"},{label:"New Hampshire",value:"NH"},{label:"New Jersey",value:"NJ"},{label:"New Mexico",value:"NM"},{label:"New York",value:"NY"},{label:"North Carolina",value:"NC"},{label:"North Dakota",value:"ND"},{label:"Ohio",value:"OH"},{label:"Oklahoma",value:"OK"},{label:"Oregon",value:"OR"},{label:"Pennsylvania",value:"PA"},{label:"Rhode Island",value:"RI"},{label:"South Carolina",value:"SC"},{label:"South Dakota",value:"SD"},{label:"Tennessee",value:"TN"},{label:"Texas",value:"TX"},{label:"Utah",value:"UT"},{label:"Vermont",value:"VT"},{label:"Virginia",value:"VA"},{label:"Washington",value:"WA"},{label:"West Virginia",value:"WV"},{label:"Wisconsin",value:"WI"},{label:"Wyoming",value:"WY"},{label:"── US Territories ──",value:"",disabled:!0},{label:"American Samoa",value:"AS"},{label:"Guam",value:"GU"},{label:"Northern Mariana Islands",value:"MP"},{label:"Puerto Rico",value:"PR"},{label:"US Minor Outlying Islands",value:"UM"},{label:"Virgin Islands",value:"VI"},{label:"── Armed Forces ──",value:"",disabled:!0},{label:"Armed Forces Americas",value:"AA"},{label:"Armed Forces Africa",value:"AE"},{label:"Armed Forces Canada",value:"AE"},{label:"Armed Forces Europe",value:"AE"},{label:"Armed Forces Middle East",value:"AE"},{label:"Armed Forces Pacific",value:"AP"}]);break;case"United States":this.setStateValues(t,"State",[{label:"Select State",value:""},{label:"Alabama",value:"Alabama"},{label:"Alaska",value:"Alaska"},{label:"Arizona",value:"Arizona"},{label:"Arkansas",value:"Arkansas"},{label:"California",value:"California"},{label:"Colorado",value:"Colorado"},{label:"Connecticut",value:"Connecticut"},{label:"Delaware",value:"Delaware"},{label:"District of Columbia",value:"District of Columbia"},{label:"Florida",value:"Florida"},{label:"Georgia",value:"Georgia"},{label:"Hawaii",value:"Hawaii"},{label:"Idaho",value:"Idaho"},{label:"Illinois",value:"Illinois"},{label:"Indiana",value:"Indiana"},{label:"Iowa",value:"Iowa"},{label:"Kansas",value:"Kansas"},{label:"Kentucky",value:"Kentucky"},{label:"Louisiana",value:"Louisiana"},{label:"Maine",value:"Maine"},{label:"Maryland",value:"Maryland"},{label:"Massachusetts",value:"Massachusetts"},{label:"Michigan",value:"Michigan"},{label:"Minnesota",value:"Minnesota"},{label:"Mississippi",value:"Mississippi"},{label:"Missouri",value:"Missouri"},{label:"Montana",value:"Montana"},{label:"Nebraska",value:"Nebraska"},{label:"Nevada",value:"Nevada"},{label:"New Hampshire",value:"New Hampshire"},{label:"New Jersey",value:"New Jersey"},{label:"New Mexico",value:"New Mexico"},{label:"New York",value:"New York"},{label:"North Carolina",value:"North Carolina"},{label:"North Dakota",value:"North Dakota"},{label:"Ohio",value:"Ohio"},{label:"Oklahoma",value:"Oklahoma"},{label:"Oregon",value:"Oregon"},{label:"Pennsylvania",value:"Pennsylvania"},{label:"Rhode Island",value:"Rhode Island"},{label:"South Carolina",value:"South Carolina"},{label:"South Dakota",value:"South Dakota"},{label:"Tennessee",value:"Tennessee"},{label:"Texas",value:"Texas"},{label:"Utah",value:"Utah"},{label:"Vermont",value:"Vermont"},{label:"Virginia",value:"Virginia"},{label:"Washington",value:"Washington"},{label:"West Virginia",value:"West Virginia"},{label:"Wisconsin",value:"Wisconsin"},{label:"Wyoming",value:"Wyoming"},{label:"── US Territories ──",value:"",disabled:!0},{label:"American Samoa",value:"American Samoa"},{label:"Guam",value:"Guam"},{label:"Northern Mariana Islands",value:"Northern Mariana Islands"},{label:"Puerto Rico",value:"Puerto Rico"},{label:"US Minor Outlying Islands",value:"US Minor Outlying Islands"},{label:"Virgin Islands",value:"Virgin Islands"},{label:"── Armed Forces ──",value:"",disabled:!0},{label:"Armed Forces Americas",value:"Armed Forces Americas"},{label:"Armed Forces Africa",value:"Armed Forces Africa"},{label:"Armed Forces Canada",value:"Armed Forces Canada"},{label:"Armed Forces Europe",value:"Armed Forces Europe"},{label:"Armed Forces Middle East",value:"Armed Forces Middle East"},{label:"Armed Forces Pacific",value:"Armed Forces Pacific"}]);break;case"CA":case"CAN":this.setStateValues(t,"Province / Territory",[{label:"Select",value:""},{label:"Alberta",value:"AB"},{label:"British Columbia",value:"BC"},{label:"Manitoba",value:"MB"},{label:"New Brunswick",value:"NB"},{label:"Newfoundland and Labrador",value:"NL"},{label:"Northwest Territories",value:"NT"},{label:"Nova Scotia",value:"NS"},{label:"Nunavut",value:"NU"},{label:"Ontario",value:"ON"},{label:"Prince Edward Island",value:"PE"},{label:"Quebec",value:"QC"},{label:"Saskatchewan",value:"SK"},{label:"Yukon",value:"YT"}]);break;case"Canada":this.setStateValues(t,"Province / Territory",[{label:"Select",value:""},{label:"Alberta",value:"Alberta"},{label:"British Columbia",value:"British Columbia"},{label:"Manitoba",value:"Manitoba"},{label:"New Brunswick",value:"New Brunswick"},{label:"Newfoundland and Labrador",value:"Newfoundland and Labrador"},{label:"Northwest Territories",value:"Northwest Territories"},{label:"Nova Scotia",value:"Nova Scotia"},{label:"Nunavut",value:"Nunavut"},{label:"Ontario",value:"Ontario"},{label:"Prince Edward Island",value:"Prince Edward Island"},{label:"Quebec",value:"Quebec"},{label:"Saskatchewan",value:"Saskatchewan"},{label:"Yukon",value:"Yukon"}]);break;case"MX":case"MEX":this.setStateValues(t,"Estado",[{label:"Seleccione Estado",value:""},{label:"Aguascalientes",value:"AGU"},{label:"Baja California",value:"BCN"},{label:"Baja California Sur",value:"BCS"},{label:"Campeche",value:"CAM"},{label:"Chiapas",value:"CHP"},{label:"Ciudad de Mexico",value:"CMX"},{label:"Chihuahua",value:"CHH"},{label:"Coahuila",value:"COA"},{label:"Colima",value:"COL"},{label:"Durango",value:"DUR"},{label:"Guanajuato",value:"GUA"},{label:"Guerrero",value:"GRO"},{label:"Hidalgo",value:"HID"},{label:"Jalisco",value:"JAL"},{label:"Michoacan",value:"MIC"},{label:"Morelos",value:"MOR"},{label:"Nayarit",value:"NAY"},{label:"Nuevo Leon",value:"NLE"},{label:"Oaxaca",value:"OAX"},{label:"Puebla",value:"PUE"},{label:"Queretaro",value:"QUE"},{label:"Quintana Roo",value:"ROO"},{label:"San Luis Potosi",value:"SLP"},{label:"Sinaloa",value:"SIN"},{label:"Sonora",value:"SON"},{label:"Tabasco",value:"TAB"},{label:"Tamaulipas",value:"TAM"},{label:"Tlaxcala",value:"TLA"},{label:"Veracruz",value:"VER"},{label:"Yucatan",value:"YUC"},{label:"Zacatecas",value:"ZAC"}]);break;case"Mexico":this.setStateValues(t,"Estado",[{label:"Seleccione Estado",value:""},{label:"Aguascalientes",value:"Aguascalientes"},{label:"Baja California",value:"Baja California"},{label:"Baja California Sur",value:"Baja California Sur"},{label:"Campeche",value:"Campeche"},{label:"Chiapas",value:"Chiapas"},{label:"Ciudad de Mexico",value:"Ciudad de Mexico"},{label:"Chihuahua",value:"Chihuahua"},{label:"Coahuila",value:"Coahuila"},{label:"Colima",value:"Colima"},{label:"Durango",value:"Durango"},{label:"Guanajuato",value:"Guanajuato"},{label:"Guerrero",value:"Guerrero"},{label:"Hidalgo",value:"Hidalgo"},{label:"Jalisco",value:"Jalisco"},{label:"Michoacan",value:"Michoacan"},{label:"Morelos",value:"Morelos"},{label:"Nayarit",value:"Nayarit"},{label:"Nuevo Leon",value:"Nuevo Leon"},{label:"Oaxaca",value:"Oaxaca"},{label:"Puebla",value:"Puebla"},{label:"Queretaro",value:"Queretaro"},{label:"Quintana Roo",value:"Quintana Roo"},{label:"San Luis Potosi",value:"San Luis Potosi"},{label:"Sinaloa",value:"Sinaloa"},{label:"Sonora",value:"Sonora"},{label:"Tabasco",value:"Tabasco"},{label:"Tamaulipas",value:"Tamaulipas"},{label:"Tlaxcala",value:"Tlaxcala"},{label:"Veracruz",value:"Veracruz"},{label:"Yucatan",value:"Yucatan"},{label:"Zacatecas",value:"Zacatecas"}]);break;default:this.setStateValues(t,"Province / State",null)}}setStateValues(e,t,n){const i=p.getField(e),s=i?i.closest(".en__field"):null;if(s){const i=s.querySelector(".en__field__label"),r=s.querySelector(".en__field__element");if(i&&(i.innerHTML=t),r){const i=ne(`engrid-state-${e}`);if(null==n?void 0:n.length){const t=document.createElement("select");t.name=e,t.id="en__field_"+e.toLowerCase().replace(".","_"),t.classList.add("en__field__input"),t.classList.add("en__field__input--select"),t.autocomplete="address-level1";let s=!1;n.forEach((e=>{const n=document.createElement("option");n.value=e.value,n.innerHTML=e.label,i!==e.value||s||(n.selected=!0,s=!0),e.disabled&&(n.disabled=!0),t.appendChild(n)})),r.innerHTML="",r.appendChild(t),t.addEventListener("change",this.rememberState.bind(this,e)),t.dispatchEvent(new Event("change",{bubbles:!0}))}else{r.innerHTML="";const n=document.createElement("input");n.type="text",n.name=e,n.placeholder=t,n.id="en__field_"+e.toLowerCase().replace(".","_"),n.classList.add("en__field__input"),n.classList.add("en__field__input--text"),n.autocomplete="address-level1",i&&(n.value=i),r.appendChild(n),n.addEventListener("change",this.rememberState.bind(this,e))}}}}rememberState(e){const t=p.getField(e);t&&ie(`engrid-state-${t.name}`,t.value,{expires:1,sameSite:"none",secure:!0})}}class re{constructor(){this._countryEvent=b.getInstance(),this.countryWrapper=document.querySelector(".simple_country_select"),this.countrySelect=this._countryEvent.countryField,this.country=null;const e=ne("engrid-autofill"),t=!(!p.checkNested(window.EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")||!window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()),n=!!p.checkNested(window.Intl,"DisplayNames"),i=p.getUrlParameter("supporter.country")||p.getUrlParameter("supporter.region")||p.getUrlParameter("ea.url.id")&&!p.getUrlParameter("forwarded");e||t||!n||i?this.init():fetch(`https://${window.location.hostname}/cdn-cgi/trace`).then((e=>e.text())).then((e=>{let t=e.replace(/[\r\n]+/g,'","').replace(/\=+/g,'":"');t='{"'+t.slice(0,t.lastIndexOf('","'))+'"}';const n=JSON.parse(t);this.country=n.loc,this.init()}))}init(){if(this.countrySelect&&this.country){const e=new Intl.DisplayNames(["en"],{type:"region"});this.setCountryByName(e.of(this.country))}}setCountryByName(e){if(this.countrySelect){let t=this.countrySelect.options;for(let n=0;n<t.length;n++)if(t[n].innerHTML.toLowerCase()==e.toLowerCase()){this.countrySelect.selectedIndex=n;break}const n=new Event("change",{bubbles:!0});this.countrySelect.dispatchEvent(n)}}}class oe{constructor(){const e=document.querySelector("div[class*='body-'] title"),t=document.querySelector("div[class*='body-'] h1"),n=document.querySelector("title"),i=document.querySelector("h1");e&&e.parentElement?(e.parentElement.insertAdjacentHTML("beforebegin",'<span id="skip-link"></span>'),this.insertSkipLinkSpan()):t&&t.parentElement?(t.parentElement.insertAdjacentHTML("beforebegin",'<span id="skip-link"></span>'),this.insertSkipLinkSpan()):n&&n.parentElement?(n.parentElement.insertAdjacentHTML("beforebegin",'<span id="skip-link"></span>'),this.insertSkipLinkSpan()):i&&i.parentElement?(i.parentElement.insertAdjacentHTML("beforebegin",'<span id="skip-link"></span>'),this.insertSkipLinkSpan()):p.debug&&console.log("This page contains no <title> or <h1> and a 'Skip to main content' link was not added")}insertSkipLinkSpan(){document.body.insertAdjacentHTML("afterbegin",'<a class="skip-link" href="#skip-link">Skip to main content</a>')}}class ae{constructor(){this.imgSrcDefer=document.querySelectorAll("img[data-src]"),this.videoBackground=document.querySelectorAll("video"),this.videoBackgroundSource=document.querySelectorAll("video source");for(let e=0;e<this.imgSrcDefer.length;e++){let t=this.imgSrcDefer[e];if(t){t.setAttribute("decoding","async"),t.setAttribute("loading","lazy");let e=t.getAttribute("data-src");e&&t.setAttribute("src",e),t.setAttribute("data-engrid-data-src-processed","true"),t.removeAttribute("data-src")}}for(let e=0;e<this.videoBackground.length;e++){let t=this.videoBackground[e];if(this.videoBackgroundSource=t.querySelectorAll("source"),this.videoBackgroundSource){for(let e=0;e<this.videoBackgroundSource.length;e++){let t=this.videoBackgroundSource[e];if(t){let e=t.getAttribute("data-src");e&&(t.setAttribute("src",e),t.setAttribute("data-engrid-data-src-processed","true"),t.removeAttribute("data-src"))}}let e=t.parentNode,n=t;e&&n&&(e.replaceChild(n,t),t.muted=!0,t.controls=!1,t.loop=!0,t.playsInline=!0,t.play())}}}}class le{constructor(){this._frequency=g.getInstance(),this._amount=h.getInstance(),this.linkClass="setRecurrFreq-",this.checkboxName="engrid.recurrfreq",document.querySelectorAll(`a[class^="${this.linkClass}"]`).forEach((e=>{e.addEventListener("click",(t=>{const n=e.className.split(" ").filter((e=>e.startsWith(this.linkClass)));p.debug&&console.log(n),n.length&&(t.preventDefault(),p.setFieldValue("transaction.recurrfreq",n[0].substring(this.linkClass.length).toUpperCase()),this._frequency.load())}))}));const e=p.getFieldValue("transaction.recurrfreq").toUpperCase();document.getElementsByName(this.checkboxName).forEach((t=>{const n=t.value.toUpperCase();t.checked=n===e,t.addEventListener("change",(()=>{const e=t.value.toUpperCase();t.checked?(p.setFieldValue("transaction.recurrfreq",e),p.setFieldValue("transaction.recurrpay","Y"),this._frequency.load(),this._amount.setAmount(this._amount.amount,!1)):"ONETIME"!==e&&(p.setFieldValue("transaction.recurrfreq","ONETIME"),p.setFieldValue("transaction.recurrpay","N"),this._frequency.load(),this._amount.setAmount(this._amount.amount,!1))}))})),this._frequency.onFrequencyChange.subscribe((()=>{const e=this._frequency.frequency.toUpperCase();document.getElementsByName(this.checkboxName).forEach((t=>{const n=t.value.toUpperCase();t.checked&&n!==e?t.checked=!1:t.checked||n!==e||(t.checked=!0)}))}))}}class ce{constructor(){if(this.pageBackground=document.querySelector(".page-backgroundImage"),this.pageBackground){const e=this.pageBackground.querySelector("img");let t=null==e?void 0:e.getAttribute("data-src"),n=null==e?void 0:e.src;this.pageBackground&&t?(p.debug&&console.log("A background image set in the page was found with a data-src value, setting it as --engrid__page-backgroundImage_url",t),t="url('"+t+"')",this.pageBackground.style.setProperty("--engrid__page-backgroundImage_url",t)):this.pageBackground&&n?(p.debug&&console.log("A background image set in the page was found with a src value, setting it as --engrid__page-backgroundImage_url",n),n="url('"+n+"')",this.pageBackground.style.setProperty("--engrid__page-backgroundImage_url",n)):e?p.debug&&console.log("A background image set in the page was found but without a data-src or src value, no action taken",e):p.debug&&console.log("A background image set in the page was not found, any default image set in the theme on --engrid__page-backgroundImage_url will be used")}else p.debug&&console.log("A background image set in the page was not found, any default image set in the theme on --engrid__page-backgroundImage_url will be used");this.setDataAttributes()}setDataAttributes(){return this.hasVideoBackground()?p.setBodyData("page-background","video"):this.hasImageBackground()?p.setBodyData("page-background","image"):p.setBodyData("page-background","empty")}hasVideoBackground(){if(this.pageBackground)return!!this.pageBackground.querySelector("video")}hasImageBackground(){if(this.pageBackground)return!this.hasVideoBackground()&&!!this.pageBackground.querySelector("img")}}class ue{constructor(e,t=null,n=null,i){this.apiKey=e,this.dateField=t,this.statusField=n,this.dateFormat=i,this.form=d.getInstance(),this.emailField=null,this.emailWrapper=document.querySelector(".en__field--emailAddress"),this.nbDate=null,this.nbStatus=null,this.logger=new be("NeverBounce","#039bc4","#dfdfdf","πŸ“§"),this.shouldRun=!0,this.nbLoaded=!1,this.emailField=document.getElementById("en__field_supporter_emailAddress"),window._NBSettings={apiKey:this.apiKey,autoFieldHookup:!1,inputLatency:1500,displayPoweredBy:!1,loadingMessage:"Validating...",softRejectMessage:"Invalid email",acceptedMessage:"Email validated!",feedback:!1},p.loadJS("https://cdn.neverbounce.com/widget/dist/NeverBounce.js"),this.emailField&&(this.emailField.value&&(this.logger.log("E-mail Field Found"),this.shouldRun=!1),this.emailField.addEventListener("change",(e=>{var t;this.nbLoaded||(this.shouldRun=!0,this.init(),(null===(t=this.emailField)||void 0===t?void 0:t.value)&&setTimeout((function(){window._nb.fields.get(document.querySelector("[data-nb-id]"))[0].forceUpdate()}),100))})),window.setTimeout((()=>{this.emailField&&this.emailField.value&&(this.logger.log("E-mail Filled Programatically"),this.shouldRun=!1),this.init()}),1e3)),this.form.onValidate.subscribe(this.validate.bind(this))}init(){if(!this.shouldRun)return void this.logger.log("Should Not Run");if(this.nbLoaded)return void this.logger.log("Already Loaded");if(this.logger.log("Init Function"),this.dateField&&document.getElementsByName(this.dateField).length&&(this.nbDate=document.querySelector("[name='"+this.dateField+"']")),this.statusField&&document.getElementsByName(this.statusField).length&&(this.nbStatus=document.querySelector("[name='"+this.statusField+"']")),!this.emailField)return void this.logger.log("E-mail Field Not Found");this.wrap(this.emailField,document.createElement("div"));this.emailField.parentNode.id="nb-wrapper";const e=document.createElement("div");e.innerHTML='<div id="nb-feedback" class="en__field__error nb-hidden">Enter a valid email.</div>',this.insertAfter(e,this.emailField);const t=this;document.body.addEventListener("nb:registered",(function(e){const n=document.querySelector('[data-nb-id="'+e.detail.id+'"]');n.addEventListener("nb:loading",(function(e){p.disableSubmit("Validating Your Email")})),n.addEventListener("nb:clear",(function(e){t.setEmailStatus("clear"),p.enableSubmit(),t.nbDate&&(t.nbDate.value=""),t.nbStatus&&(t.nbStatus.value="")})),n.addEventListener("nb:soft-result",(function(e){t.setEmailStatus("soft-result"),t.nbDate&&(t.nbDate.value=""),t.nbStatus&&(t.nbStatus.value=""),p.enableSubmit()})),n.addEventListener("nb:result",(function(e){e.detail.result.is(window._nb.settings.getAcceptedStatusCodes())?(t.setEmailStatus("valid"),t.nbDate&&(t.nbDate.value=p.formatDate(new Date,t.dateFormat)),t.nbStatus&&(t.nbStatus.value=e.detail.result.response.result)):(t.setEmailStatus("invalid"),t.nbDate&&(t.nbDate.value=""),t.nbStatus&&(t.nbStatus.value="")),p.enableSubmit()}))})),window._nb.fields.registerListener(t.emailField,!0),this.nbLoaded=!0}clearStatus(){if(!this.emailField)return void this.logger.log("E-mail Field Not Found");this.emailField.classList.remove("rm-error");const e=document.getElementById("nb-wrapper"),t=document.getElementById("nb-feedback");e.className="",t.className="en__field__error nb-hidden",t.innerHTML="",this.emailWrapper.classList.remove("en__field--validationFailed")}deleteENFieldError(){const e=document.querySelector(".en__field--emailAddress>div.en__field__error");e&&e.remove()}setEmailStatus(e){if(this.logger.log("Status:",e),!this.emailField)return void this.logger.log("E-mail Field Not Found");const t=document.getElementById("nb-wrapper");let n=document.getElementById("nb-feedback");const i="nb-hidden",s="nb-loading",r="rm-error";if(!n){const e=t.querySelector("div");e&&(e.innerHTML='<div id="nb-feedback" class="en__field__error nb-hidden">Enter a valid email.</div>'),n=document.getElementById("nb-feedback")}if("valid"==e)this.clearStatus();else switch(t.classList.remove("nb-success"),t.classList.add("nb-error"),e){case"required":this.deleteENFieldError(),n.innerHTML="A valid email is required",n.classList.remove(s),n.classList.remove(i),this.emailField.classList.add(r);break;case"soft-result":this.emailField.value?(this.deleteENFieldError(),n.innerHTML="Invalid email",n.classList.remove(i),this.emailField.classList.add(r)):this.clearStatus();break;case"invalid":this.deleteENFieldError(),n.innerHTML="Invalid email",n.classList.remove(s),n.classList.remove(i),this.emailField.classList.add(r);break;default:this.clearStatus()}}insertAfter(e,t){var n;null===(n=null==t?void 0:t.parentNode)||void 0===n||n.insertBefore(e,t.nextSibling)}wrap(e,t){var n;null===(n=e.parentNode)||void 0===n||n.insertBefore(t,e),t.appendChild(e)}validate(){var e;if(!this.form.validate)return;const t=p.getFieldValue("nb-result");this.emailField&&this.shouldRun&&this.nbLoaded&&t?(this.nbStatus&&(this.nbStatus.value=t),["catchall","unknown","valid"].includes(t)||(this.setEmailStatus("required"),null===(e=this.emailField)||void 0===e||e.focus(),this.logger.log("NB-Result:",p.getFieldValue("nb-result")),this.form.validate=!1)):this.logger.log("validate(): Should Not Run. Returning true.")}}class de{constructor(){this.form=d.getInstance(),this.emailField=null,this.emailWrapper=document.querySelector(".en__field--emailAddress"),this.faDate=null,this.faStatus=null,this.faMessage=null,this.logger=new be("FreshAddress","#039bc4","#dfdfdf","πŸ“§"),this.shouldRun=!0,this.options=p.getOption("FreshAddress"),!1!==this.options&&window.FreshAddress&&(this.emailField=document.getElementById("en__field_supporter_emailAddress"),this.emailField?(this.createFields(),this.addEventListeners(),window.FreshAddressStatus="idle",this.emailField.value&&(this.logger.log("E-mail Field Found"),this.shouldRun=!1),window.setTimeout((()=>{this.emailField&&this.emailField.value&&(this.logger.log("E-mail Filled Programatically"),this.shouldRun=!1)}),1e3)):this.logger.log("E-mail Field Not Found"))}createFields(){this.options&&(this.options.dateField=this.options.dateField||"fa_date",this.faDate=p.getField(this.options.dateField),this.faDate||(this.logger.log("Date Field Not Found. Creating..."),p.createHiddenInput(this.options.dateField,""),this.faDate=p.getField(this.options.dateField)),this.options.statusField=this.options.statusField||"fa_status",this.faStatus=p.getField(this.options.statusField),this.faStatus||(this.logger.log("Status Field Not Found. Creating..."),p.createHiddenInput(this.options.statusField,""),this.faStatus=p.getField(this.options.statusField)),this.options.messageField=this.options.messageField||"fa_message",this.faMessage=p.getField(this.options.messageField),this.faMessage||(this.logger.log("Message Field Not Found. Creating..."),p.createHiddenInput(this.options.messageField,""),this.faMessage=p.getField(this.options.messageField)))}writeToFields(e,t){this.options&&(this.faDate.value=p.formatDate(new Date,this.options.dateFieldFormat||"yyyy-MM-dd"),this.faStatus.value=e,this.faMessage.value=t,this.emailWrapper.dataset.freshaddressSafetosendstatus=e.toLowerCase())}addEventListeners(){var e;this.options&&(null===(e=this.emailField)||void 0===e||e.addEventListener("change",(()=>{var e,t;if(!this.shouldRun||(null===(e=this.emailField)||void 0===e?void 0:e.value.includes("@4sitestudios.com")))return p.removeError(this.emailWrapper),this.writeToFields("Valid","Skipped"),void this.logger.log("Skipping E-mail Validation");this.logger.log("Validating "+(null===(t=this.emailField)||void 0===t?void 0:t.value)),this.callAPI()})),this.form.onValidate.subscribe(this.validate.bind(this)))}callAPI(){var e;if(!this.options||!window.FreshAddress)return;if(!this.shouldRun)return;window.FreshAddressStatus="validating";const t=null===(e=this.emailField)||void 0===e?void 0:e.value;window.FreshAddress.validateEmail(t,{emps:!1,rtc_timeout:1200}).then((e=>(this.logger.log("Validate API Response",JSON.parse(JSON.stringify(e))),this.validateResponse(e))))}validateResponse(e){var t;if(e.isServiceError())return this.logger.log("Service Error"),this.writeToFields("Service Error",e.getErrorResponse()),!0;e.isValid()?(this.writeToFields("Valid",e.getComment()),p.removeError(this.emailWrapper),e.hasSuggest()&&(p.setError(this.emailWrapper,`Did you mean ${e.getSuggEmail()}?`),this.emailField.value=e.getSuggEmail())):e.isError()?(this.writeToFields("Invalid",e.getErrorResponse()),p.setError(this.emailWrapper,e.getErrorResponse()),null===(t=this.emailField)||void 0===t||t.focus(),e.hasSuggest()&&(p.setError(this.emailWrapper,`Did you mean ${e.getSuggEmail()}?`),this.emailField.value=e.getSuggEmail(),this.writeToFields("Error",e.getErrorResponse()))):e.isWarning()?(this.writeToFields("Invalid",e.getErrorResponse()),p.setError(this.emailWrapper,e.getErrorResponse()),e.hasSuggest()&&(p.setError(this.emailWrapper,`Did you mean ${e.getSuggEmail()}?`),this.emailField.value=e.getSuggEmail(),this.writeToFields("Warning",e.getErrorResponse()))):this.writeToFields("API Error","Unknown Error"),window.FreshAddressStatus="idle",p.enableSubmit()}validate(){var e;if(p.removeError(this.emailWrapper),this.form.validate)if(this.options)if(this.shouldRun){if("validating"!==window.FreshAddressStatus)return"Invalid"===this.faStatus.value?(this.form.validate=!1,window.setTimeout((()=>{p.setError(this.emailWrapper,this.faMessage.value)}),100),null===(e=this.emailField)||void 0===e||e.focus(),p.enableSubmit(),!1):(this.form.validate=!0,!0);{this.logger.log("Waiting for API Response");const e=new Promise(((e,t)=>{setTimeout((()=>{var n;const i=this.faStatus.value;if(""===i||"Invalid"===i)return this.logger.log("Promise Rejected"),null===(n=this.emailField)||void 0===n||n.focus(),void t(!1);this.logger.log("Promise Resolved"),e(!0)}),700)}));this.form.validatePromise=e}}else this.form.validate=!0;else this.form.validate=!0}}class he{constructor(){var e,t;const n=document.querySelector("span[data-engrid-progress-indicator]"),i=p.getPageCount(),s=p.getPageNumber();if(!n||!i||!s)return;let r=null!==(e=n.getAttribute("max"))&&void 0!==e?e:100;"string"==typeof r&&(r=parseInt(r));let o=null!==(t=n.getAttribute("amount"))&&void 0!==t?t:0;"string"==typeof o&&(o=parseInt(o));const a=1===s?0:Math.ceil((s-1)/i*r);let l=1===s?0:Math.ceil(s/i*r);const c=a/100;let u=l/100;if(o&&(l=Math.ceil(o)>Math.ceil(r)?r:o,u=l/100),n.innerHTML=`\n\t\t\t<div class="indicator__wrap">\n\t\t\t\t<span class="indicator__progress" style="transform: scaleX(${c});"></span>\n\t\t\t\t<span class="indicator__percentage">${l}<span class="indicator__percentage-sign">%</span></span>\n\t\t\t</div>`,l!==a){const e=document.querySelector(".indicator__progress");requestAnimationFrame((function(){e.style.transform=`scaleX(${u})`}))}}}const pe=n(3861).ZP;class ge{constructor(e){if(this._form=d.getInstance(),this._events=f.getInstance(),this.iframe=null,this.remoteUrl=e.remoteUrl?e.remoteUrl:null,this.cookieName=e.cookieName?e.cookieName:"engrid-autofill",this.cookieExpirationDays=e.cookieExpirationDays?e.cookieExpirationDays:365,this.rememberMeOptIn=!!e.checked&&e.checked,this.fieldNames=e.fieldNames?e.fieldNames:[],this.fieldDonationAmountRadioName=e.fieldDonationAmountRadioName?e.fieldDonationAmountRadioName:"transaction.donationAmt",this.fieldDonationAmountOtherName=e.fieldDonationAmountOtherName?e.fieldDonationAmountOtherName:"transaction.donationAmt.other",this.fieldDonationRecurrPayRadioName=e.fieldDonationRecurrPayRadioName?e.fieldDonationRecurrPayRadioName:"transaction.recurrpay",this.fieldDonationAmountOtherCheckboxID=e.fieldDonationAmountOtherCheckboxID?e.fieldDonationAmountOtherCheckboxID:"#en__field_transaction_donationAmt4",this.fieldOptInSelectorTarget=e.fieldOptInSelectorTarget?e.fieldOptInSelectorTarget:".en__field--emailAddress.en__field",this.fieldOptInSelectorTargetLocation=e.fieldOptInSelectorTargetLocation?e.fieldOptInSelectorTargetLocation:"after",this.fieldClearSelectorTarget=e.fieldClearSelectorTarget?e.fieldClearSelectorTarget:'label[for="en__field_supporter_firstName"]',this.fieldClearSelectorTargetLocation=e.fieldClearSelectorTargetLocation?e.fieldClearSelectorTargetLocation:"before",this.fieldData={},this.useRemote())this.createIframe((()=>{this.iframe&&this.iframe.contentWindow&&(this.iframe.contentWindow.postMessage(JSON.stringify({key:this.cookieName,operation:"read"}),"*"),this._form.onSubmit.subscribe((()=>{this.rememberMeOptIn&&(this.readFields(),this.saveCookieToRemote())})))}),(e=>{let t;if(e.data&&"string"==typeof e.data&&this.isJson(e.data)&&(t=JSON.parse(e.data)),t&&t.key&&void 0!==t.value&&t.key===this.cookieName){this.updateFieldData(t.value),this.writeFields(),Object.keys(this.fieldData).length>0?this.insertClearRememberMeLink():this.insertRememberMeOptin()}}));else{this.readCookie(),Object.keys(this.fieldData).length>0?(this.insertClearRememberMeLink(),this.rememberMeOptIn=!0):(this.insertRememberMeOptin(),this.rememberMeOptIn=!1),this.writeFields(),this._form.onSubmit.subscribe((()=>{this.rememberMeOptIn&&(this.readFields(),this.saveCookie())}))}}updateFieldData(e){if(e){let t=JSON.parse(e);for(let e=0;e<this.fieldNames.length;e++)void 0!==t[this.fieldNames[e]]&&(this.fieldData[this.fieldNames[e]]=decodeURIComponent(t[this.fieldNames[e]]))}}insertClearRememberMeLink(){if(!document.getElementById("clear-autofill-data")){const e="clear autofill",t=document.createElement("a");t.setAttribute("id","clear-autofill-data"),t.classList.add("label-tooltip"),t.setAttribute("style","cursor: pointer;"),t.innerHTML=`(${e})`;const n=this.getElementByFirstSelector(this.fieldClearSelectorTarget);n&&("after"===this.fieldClearSelectorTargetLocation?n.appendChild(t):n.prepend(t),t.addEventListener("click",(e=>{e.preventDefault(),this.clearFields(["supporter.country"]),this.useRemote()?this.clearCookieOnRemote():this.clearCookie();let t=document.getElementById("clear-autofill-data");t&&(t.style.display="none"),this.rememberMeOptIn=!1,this._events.dispatchClear()})))}this._events.dispatchLoad(!0)}getElementByFirstSelector(e){let t=null;const n=e.split(",");for(let e=0;e<n.length&&(t=document.querySelector(n[e]),!t);e++);return t}insertRememberMeOptin(){let e=document.getElementById("remember-me-opt-in");if(e)this.rememberMeOptIn&&(e.checked=!0);else{const e="Remember Me",t="\n\t\t\t\tCheck β€œRemember me” to complete forms on this device faster. \n\t\t\t\tWhile your financial information won’t be stored, you should only check this box from a personal device. \n\t\t\t\tClick β€œClear autofill” to remove the information from your device at any time.\n\t\t\t",n=this.rememberMeOptIn?"checked":"",i=document.createElement("div");i.classList.add("en__field","en__field--checkbox","en__field--question","rememberme-wrapper"),i.setAttribute("id","remember-me-opt-in"),i.setAttribute("style","overflow-x: hidden;"),i.innerHTML=`\n <div class="en__field__element en__field__element--checkbox">\n <div class="en__field__item">\n <input id="remember-me-checkbox" type="checkbox" class="en__field__input en__field__input--checkbox" ${n} />\n <label for="remember-me-checkbox" class="en__field__label en__field__label--item" style="white-space: nowrap;">\n <div class="rememberme-content" style="display: inline-flex; align-items: center;">\n ${e}\n <a id="rememberme-learn-more-toggle" style="display: inline-block; display: inline-flex; align-items: center; cursor: pointer; margin-left: 10px; margin-top: var(--rememberme-learn-more-toggle_margin-top)">\n <svg style="height: 14px; width: auto; z-index: 1;" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 7H9V5H11V7ZM11 9H9V15H11V9ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C14.41 18 18 14.41 18 10C18 5.59 14.41 2 10 2ZM10 0C15.523 0 20 4.477 20 10C20 15.523 15.523 20 10 20C4.477 20 0 15.523 0 10C0 4.477 4.477 0 10 0Z" fill="currentColor"/></svg>\n </a>\n </div>\n </label>\n </div>\n </div>\n\t\t\t`;const s=this.getElementByFirstSelector(this.fieldOptInSelectorTarget);if(s&&s.parentNode){s.parentNode.insertBefore(i,"before"==this.fieldOptInSelectorTargetLocation?s:s.nextSibling);const e=document.getElementById("remember-me-checkbox");e&&e.addEventListener("change",(()=>{e.checked?this.rememberMeOptIn=!0:this.rememberMeOptIn=!1})),pe("#rememberme-learn-more-toggle",{content:t})}}this._events.dispatchLoad(!1)}useRemote(){return!!this.remoteUrl&&"function"==typeof window.postMessage&&window.JSON&&window.localStorage}createIframe(e,t){if(this.remoteUrl){let n=document.createElement("iframe");n.style.cssText="position:absolute;width:1px;height:1px;left:-9999px;",n.src=this.remoteUrl,n.setAttribute("sandbox","allow-same-origin allow-scripts"),this.iframe=n,document.body.appendChild(this.iframe),this.iframe.addEventListener("load",(()=>e()),!1),window.addEventListener("message",(e=>{var n;(null===(n=this.iframe)||void 0===n?void 0:n.contentWindow)===e.source&&t(e)}),!1)}}clearCookie(){this.fieldData={},this.saveCookie()}clearCookieOnRemote(){this.fieldData={},this.saveCookieToRemote()}saveCookieToRemote(){this.iframe&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage(JSON.stringify({key:this.cookieName,value:this.fieldData,operation:"write",expires:this.cookieExpirationDays}),"*")}readCookie(){this.updateFieldData(ne(this.cookieName)||"")}saveCookie(){ie(this.cookieName,JSON.stringify(this.fieldData),{expires:this.cookieExpirationDays})}readFields(){for(let e=0;e<this.fieldNames.length;e++){let t="[name='"+this.fieldNames[e]+"']",n=document.querySelector(t);if(n)if("INPUT"===n.tagName){let i=n.getAttribute("type");"radio"!==i&&"checkbox"!==i||(n=document.querySelector(t+":checked")),this.fieldData[this.fieldNames[e]]=encodeURIComponent(n.value)}else"SELECT"===n.tagName&&(this.fieldData[this.fieldNames[e]]=encodeURIComponent(n.value))}}setFieldValue(e,t,n=!1){e&&void 0!==t&&(e.value&&n||!e.value)&&(e.value=t)}clearFields(e){for(let t in this.fieldData)e.includes(t)||""===this.fieldData[t]?delete this.fieldData[t]:this.fieldData[t]="";this.writeFields(!0)}writeFields(e=!1){for(let t=0;t<this.fieldNames.length;t++){let n="[name='"+this.fieldNames[t]+"']",i=document.querySelector(n);i&&("INPUT"===i.tagName?this.fieldNames[t]===this.fieldDonationRecurrPayRadioName?"Y"===this.fieldData[this.fieldNames[t]]&&i.click():this.fieldDonationAmountRadioName===this.fieldNames[t]?(i=document.querySelector(n+"[value='"+this.fieldData[this.fieldNames[t]]+"']"),i?i.click():(i=document.querySelector("input[name='"+this.fieldDonationAmountOtherName+"']"),this.setFieldValue(i,this.fieldData[this.fieldNames[t]],!0))):this.setFieldValue(i,this.fieldData[this.fieldNames[t]],e):"SELECT"===i.tagName&&this.setFieldValue(i,this.fieldData[this.fieldNames[t]],!0))}}isJson(e){try{JSON.parse(e)}catch(e){return!1}return!0}}class me{constructor(){if(this._amount=h.getInstance(),this.logger=new be("ShowIfAmount","yellow","black","πŸ‘€"),this._elements=document.querySelectorAll('[class*="showifamount"]'),this._elements.length>0)return this._amount.onAmountChange.subscribe((()=>this.init())),void this.init();this.logger.log("Show If Amount: NO ELEMENTS FOUND")}init(){const e=p.getGiftProcess()?window.pageJson.amount:this._amount.amount;this._elements.forEach((t=>{this.lessthan(e,t),this.lessthanorequalto(e,t),this.equalto(e,t),this.greaterthanorequalto(e,t),this.greaterthan(e,t),this.between(e,t)}))}getClassNameByOperand(e,t){let n=null;return e.forEach((e=>{e.includes(`showifamount-${t}-`)&&(n=e)})),n}lessthan(e,t){const n=this.getClassNameByOperand(t.classList,"lessthan");if(n){let i=n.split("-").slice(-1)[0];e<Number(i)?(this.logger.log("(lessthan):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}lessthanorequalto(e,t){const n=this.getClassNameByOperand(t.classList,"lessthanorequalto");if(n){let i=n.split("-").slice(-1)[0];e<=Number(i)?(this.logger.log("(lessthanorequalto):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}equalto(e,t){const n=this.getClassNameByOperand(t.classList,"equalto");if(n){let i=n.split("-").slice(-1)[0];e==Number(i)?(this.logger.log("(equalto):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}greaterthanorequalto(e,t){const n=this.getClassNameByOperand(t.classList,"greaterthanorequalto");if(n){let i=n.split("-").slice(-1)[0];e>=Number(i)?(this.logger.log("(greaterthanorequalto):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}greaterthan(e,t){const n=this.getClassNameByOperand(t.classList,"greaterthan");if(n){let i=n.split("-").slice(-1)[0];e>Number(i)?(this.logger.log("(greaterthan):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}between(e,t){const n=this.getClassNameByOperand(t.classList,"between");if(n){let i=n.split("-").slice(-2,-1)[0],s=n.split("-").slice(-1)[0];e>Number(i)&&e<Number(s)?(this.logger.log("(between):",t),t.classList.add("engrid-open")):t.classList.remove("engrid-open")}}}class fe{constructor(){this.logger=new be("OtherAmount","green","black","πŸ’°"),this._amount=h.getInstance(),"focusin input".split(" ").forEach((e=>{var t;null===(t=document.querySelector("body"))||void 0===t||t.addEventListener(e,(e=>{e.target.classList.contains("en__field__input--other")&&(this.logger.log("Other Amount Field Focused"),this.setRadioInput())}))}));const e=document.querySelector("[name='transaction.donationAmt.other'");e&&(e.setAttribute("inputmode","decimal"),e.setAttribute("aria-label","Enter your custom donation amount"),e.setAttribute("autocomplete","off"),e.setAttribute("data-lpignore","true"),e.addEventListener("change",(e=>{const t=e.target,n=t.value,i=p.cleanAmount(n);n!==i.toString()&&(this.logger.log(`Other Amount Field Changed: ${n} => ${i}`),"dataLayer"in window&&window.dataLayer.push({event:"otherAmountTransformed",otherAmountTransformation:`${n} => ${i}`}),t.value=i%1!=0?i.toFixed(2):i.toString())})),e.addEventListener("blur",(e=>{const t=e.target.value;if(0===p.cleanAmount(t)){this.logger.log("Other Amount Field Blurred with 0 amount");const e=this._amount.amount;e>0&&this._amount.setAmount(e,!1)}})))}setRadioInput(){const e=document.querySelector(".en__field--donationAmt .en__field__input--other");if(e&&e.parentNode&&e.parentNode.parentNode){const t=e.parentNode;if(t.classList.remove("en__field__item--hidden"),t.parentNode){t.parentNode.querySelector(".en__field__item:nth-last-child(2) input").checked=!0}}}}class be{constructor(e,t,n,i){if(this.prefix="",this.color="black",this.background="white",this.emoji="",i)this.emoji=i;else switch(t){case"red":this.emoji="πŸ”΄";break;case"green":this.emoji="🟒";break;case"blue":this.emoji="πŸ”΅";break;case"yellow":this.emoji="🟑",this.background="black";break;case"purple":this.emoji="🟣";break;default:this.emoji="⚫"}e&&(this.prefix=`[ENgrid ${e}]`),t&&(this.color=t),n&&(this.background=n)}get log(){return p.debug||"log"===p.getUrlParameter("debug")?console.log.bind(window.console,"%c"+this.emoji+" "+this.prefix+" %s",`color: ${this.color}; background-color: ${this.background}; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;`):()=>{}}get success(){return p.debug?console.log.bind(window.console,"%c βœ… "+this.prefix+" %s","color: green; background-color: white; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;"):()=>{}}get danger(){return p.debug?console.log.bind(window.console,"%c ⛔️ "+this.prefix+" %s","color: red; background-color: white; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;"):()=>{}}get warn(){return p.debug?console.warn.bind(window.console,"%c"+this.emoji+" "+this.prefix+" %s",`color: ${this.color}; background-color: ${this.background}; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;`):()=>{}}get dir(){return p.debug?console.dir.bind(window.console,"%c"+this.emoji+" "+this.prefix+" %s",`color: ${this.color}; background-color: ${this.background}; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;`):()=>{}}get error(){return p.debug?console.error.bind(window.console,"%c"+this.emoji+" "+this.prefix+" %s",`color: ${this.color}; background-color: ${this.background}; font-size: 1.2em; padding: 4px; border-radius: 2px; font-family: monospace;`):()=>{}}}class ve{constructor(){var e,t;this._form=d.getInstance(),this._amount=h.getInstance(),this.minAmount=null!==(e=p.getOption("MinAmount"))&&void 0!==e?e:1,this.maxAmount=null!==(t=p.getOption("MaxAmount"))&&void 0!==t?t:1e5,this.minAmountMessage=p.getOption("MinAmountMessage"),this.maxAmountMessage=p.getOption("MaxAmountMessage"),this.logger=new be("MinMaxAmount","white","purple","πŸ”’"),this.shouldRun()&&(this._amount.onAmountChange.subscribe((e=>window.setTimeout(this.liveValidate.bind(this),1e3))),this._form.onValidate.subscribe(this.enOnValidate.bind(this)))}shouldRun(){return"DONATION"===p.getPageType()}enOnValidate(){if(!this._form.validate)return;const e=document.querySelector("[name='transaction.donationAmt.other']");this._amount.amount<this.minAmount?(this.logger.log("Amount is less than min amount: "+this.minAmount),e&&e.focus(),this._form.validate=!1):this._amount.amount>this.maxAmount&&(this.logger.log("Amount is greater than max amount: "+this.maxAmount),e&&e.focus(),this._form.validate=!1),window.setTimeout(this.liveValidate.bind(this),300)}liveValidate(){const e=p.cleanAmount(this._amount.amount.toString()),t=document.activeElement;t&&"INPUT"===t.tagName&&"name"in t&&"transaction.donationAmt.other"===t.name&&0===e||(this.logger.log(`Amount: ${e}`),e<this.minAmount?(this.logger.log("Amount is less than min amount: "+this.minAmount),p.setError(".en__field--withOther",this.minAmountMessage||"Invalid Amount")):e>this.maxAmount?(this.logger.log("Amount is greater than max amount: "+this.maxAmount),p.setError(".en__field--withOther",this.maxAmountMessage||"Invalid Amount")):p.removeError(".en__field--withOther"))}}class ye{constructor(){if(this.shuffleSeed=n(7650),this.items=[],this.tickerElement=document.querySelector(".engrid-ticker"),this.logger=new be("Ticker","black","beige","πŸ”"),!this.shouldRun())return void this.logger.log("Not running");const e=document.querySelectorAll(".engrid-ticker li");if(e.length>0)for(let t=0;t<e.length;t++)this.items.push(e[t].innerText);this.render()}shouldRun(){return null!==this.tickerElement}getSeed(){return(new Date).getDate()+p.getPageID()}getItems(){const e=this.tickerElement.getAttribute("data-total")||"50";this.logger.log("Getting "+e+" items");const t=this.getSeed(),n=this.shuffleSeed.shuffle(this.items,t),i=new Date,s=i.getHours(),r=i.getMinutes();let o=Math.round((60*s+r)/5);o>=n.length&&(o=0);return n.slice(o,o+e).reverse()}render(){var e,t,n;this.logger.log("Rendering");const i=this.getItems();let s=document.createElement("div");s.classList.add("en__component"),s.classList.add("en__component--ticker");let r='<div class="ticker">';for(let e=0;e<i.length;e++)r+='<div class="ticker__item">'+i[e]+"</div>";r='<div id="engrid-ticker">'+r+"</div></div>",s.innerHTML=r,null===(t=null===(e=this.tickerElement)||void 0===e?void 0:e.parentElement)||void 0===t||t.insertBefore(s,this.tickerElement),null===(n=this.tickerElement)||void 0===n||n.remove();const o=document.querySelector(".ticker").offsetWidth.toString();s.style.setProperty("--ticker-size",o),this.logger.log("Ticker Size: "+s.style.getPropertyValue("--ticker-size")),this.logger.log("Ticker Width: "+o)}}class _e{constructor(){this.logger=new be("DataLayer","#f1e5bc","#009cdc","πŸ“Š"),this.dataLayer=window.dataLayer||[],this._form=d.getInstance(),this.endOfGiftProcessStorageKey="ENGRID_END_OF_GIFT_PROCESS_EVENTS",this.excludedFields=["transaction.ccnumber","transaction.ccexpire.delimiter","transaction.ccexpire","transaction.ccvv","supporter.creditCardHolderName","supporter.bankAccountNumber","supporter.bankAccountType","transaction.bankname","supporter.bankRoutingNumber"],this.hashedFields=["supporter.emailAddress","supporter.phoneNumber","supporter.phoneNumber2","supporter.address1","supporter.address2","supporter.address3","transaction.infemail","transaction.infadd1","transaction.infadd2","transaction.infadd3","supporter.billingAddress1","supporter.billingAddress2","supporter.billingAddress3"],p.getOption("RememberMe")?f.getInstance().onLoad.subscribe((e=>{this.logger.log("Remember me - onLoad",e),this.onLoad()})):this.onLoad(),this._form.onSubmit.subscribe((()=>this.onSubmit()))}static getInstance(){return _e.instance||(_e.instance=new _e,window._dataLayer=_e.instance),_e.instance}transformJSON(e){return"string"==typeof e?e.toUpperCase().split(" ").join("-").replace(":-","-"):"boolean"==typeof e?e=e?"TRUE":"FALSE":""}onLoad(){if(p.getGiftProcess()?(this.logger.log("EN_SUCCESSFUL_DONATION"),this.dataLayer.push({event:"EN_SUCCESSFUL_DONATION"}),this.addEndOfGiftProcessEventsToDataLayer()):(this.logger.log("EN_PAGE_VIEW"),this.dataLayer.push({event:"EN_PAGE_VIEW"})),window.pageJson){const e=window.pageJson;for(const t in e)Number.isNaN(e[t])?(this.dataLayer.push({event:`EN_PAGEJSON_${t.toUpperCase()}-${this.transformJSON(e[t])}`}),this.dataLayer.push({[`'EN_PAGEJSON_${t.toUpperCase()}'`]:this.transformJSON(e[t])})):(this.dataLayer.push({event:`EN_PAGEJSON_${t.toUpperCase()}-${e[t]}`}),this.dataLayer.push({[`'EN_PAGEJSON_${t.toUpperCase()}'`]:e[t]})),this.dataLayer.push({event:"EN_PAGEJSON_"+t.toUpperCase(),eventValue:e[t]});p.getPageCount()===p.getPageNumber()&&(this.dataLayer.push({event:"EN_SUBMISSION_SUCCESS_"+e.pageType.toUpperCase()}),this.dataLayer.push({[`'EN_SUBMISSION_SUCCESS_${e.pageType.toUpperCase()}'`]:"TRUE"}))}if(new URLSearchParams(window.location.search).forEach(((e,t)=>{this.dataLayer.push({event:`EN_URLPARAM_${t.toUpperCase()}-${this.transformJSON(e)}`}),this.dataLayer.push({[`'EN_URLPARAM_${t.toUpperCase()}'`]:this.transformJSON(e)})})),"DONATION"===p.getPageType()){const e=[...document.querySelectorAll('[name="transaction.recurrfreq"]')].map((e=>e.value));this.dataLayer.push({event:"EN_RECURRING_FREQUENCIES","'EN_RECURRING_FREQEUENCIES'":e})}let e=!1;const t=document.querySelector(".en__component--formblock.fast-personal-details");if(t){const n=Je.allMandatoryInputsAreFilled(t),i=Je.someMandatoryInputsAreFilled(t);n?(this.dataLayer.push({event:"EN_FASTFORMFILL_PERSONALINFO_SUCCESS"}),e=!0):i?this.dataLayer.push({event:"EN_FASTFORMFILL_PERSONALINFO_PARTIALSUCCESS"}):this.dataLayer.push({event:"EN_FASTFORMFILL_PERSONALINFO_FAILURE"})}const n=document.querySelector(".en__component--formblock.fast-address-details");if(n){const t=Je.allMandatoryInputsAreFilled(n),i=Je.someMandatoryInputsAreFilled(n);t?(this.dataLayer.push({event:"EN_FASTFORMFILL_ADDRESS_SUCCESS"}),e=!!e):i?this.dataLayer.push({event:"EN_FASTFORMFILL_ADDRESS_PARTIALSUCCESS"}):this.dataLayer.push({event:"EN_FASTFORMFILL_ADDRESS_FAILURE"})}e?this.dataLayer.push({event:"EN_FASTFORMFILL_ALL_SUCCESS"}):this.dataLayer.push({event:"EN_FASTFORMFILL_ALL_FAILURE"}),this.attachEventListeners()}onSubmit(){document.querySelector(".en__field__item:not(.en__field--question) input[name^='supporter.questions'][type='checkbox']:checked")?(this.logger.log("EN_SUBMISSION_WITH_EMAIL_OPTIN"),this.dataLayer.push({event:"EN_SUBMISSION_WITH_EMAIL_OPTIN"})):(this.logger.log("EN_SUBMISSION_WITHOUT_EMAIL_OPTIN"),this.dataLayer.push({event:"EN_SUBMISSION_WITHOUT_EMAIL_OPTIN"}))}attachEventListeners(){document.querySelectorAll(".en__component--advrow input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=hidden]):not([unhidden]), .en__component--advrow textarea").forEach((e=>{e.addEventListener("blur",(e=>{this.handleFieldValueChange(e.target)}))}));document.querySelectorAll(".en__component--advrow input[type=checkbox], .en__component--advrow input[type=radio]").forEach((e=>{e.addEventListener("change",(e=>{this.handleFieldValueChange(e.target)}))}));document.querySelectorAll(".en__component--advrow select").forEach((e=>{e.addEventListener("change",(e=>{this.handleFieldValueChange(e.target)}))}))}handleFieldValueChange(e){var t,n,i;if(""===e.value||this.excludedFields.includes(e.name))return;const s=this.hashedFields.includes(e.name)?this.hash(e.value):e.value;["checkbox","radio"].includes(e.type)?e.checked&&("en__pg"===e.name?this.dataLayer.push({event:"EN_FORM_VALUE_UPDATED",enFieldName:e.name,enFieldLabel:"Premium Gift",enFieldValue:null===(n=null===(t=e.closest(".en__pg__body"))||void 0===t?void 0:t.querySelector(".en__pg__name"))||void 0===n?void 0:n.textContent,enProductId:null===(i=document.querySelector('[name="transaction.selprodvariantid"]'))||void 0===i?void 0:i.value}):this.dataLayer.push({event:"EN_FORM_VALUE_UPDATED",enFieldName:e.name,enFieldLabel:this.getFieldLabel(e),enFieldValue:s})):this.dataLayer.push({event:"EN_FORM_VALUE_UPDATED",enFieldName:e.name,enFieldLabel:this.getFieldLabel(e),enFieldValue:s})}hash(e){return btoa(e)}getFieldLabel(e){var t,n;return(null===(n=null===(t=e.closest(".en__field"))||void 0===t?void 0:t.querySelector("label"))||void 0===n?void 0:n.textContent)||""}addEndOfGiftProcessEvent(e,t={}){this.storeEndOfGiftProcessData(Object.assign({event:e},t))}addEndOfGiftProcessVariable(e,t=""){this.storeEndOfGiftProcessData({[`'${e.toUpperCase()}'`]:t})}storeEndOfGiftProcessData(e){const t=this.getEndOfGiftProcessData();t.push(e),window.sessionStorage.setItem(this.endOfGiftProcessStorageKey,JSON.stringify(t))}addEndOfGiftProcessEventsToDataLayer(){this.getEndOfGiftProcessData().forEach((e=>{this.dataLayer.push(e)})),window.sessionStorage.removeItem(this.endOfGiftProcessStorageKey)}getEndOfGiftProcessData(){let e=window.sessionStorage.getItem(this.endOfGiftProcessStorageKey);return e?JSON.parse(e):[]}}class Se{constructor(){this.logger=new be("DataReplace","#333333","#00f3ff","‡️"),this.enElements=new Array,this.searchElements(),this.shouldRun()&&(this.logger.log("Elements Found:",this.enElements),this.replaceAll())}searchElements(){const e=document.querySelectorAll("\n .en__component--copyblock,\n .en__component--codeblock,\n .en__field\n ");e.length>0&&e.forEach((e=>{e instanceof HTMLElement&&e.innerHTML.includes("{engrid_data~")&&this.enElements.push(e)}))}shouldRun(){return this.enElements.length>0}replaceAll(){const e=/{engrid_data~\[([\w-]+)\]~?\[?(.+?)?\]?}/g;this.enElements.forEach((t=>{const n=t.innerHTML.matchAll(e);for(const e of n)this.replaceItem(t,e)})),p.setBodyData("merge-tags-processed","")}replaceItem(e,[t,n,i]){var s;let r=null!==(s=p.getUrlParameter(`engrid_data[${n}]`))&&void 0!==s?s:i;r="string"==typeof r?r.replace(/\r?\\n|\n|\r/g,"<br>"):"",this.logger.log("Replacing",n,r),e.innerHTML=e.innerHTML.replace(t,r)}}class we{constructor(){this.logger=new be("DataHide","#333333","#f0f0f0","πŸ™ˆ"),this.enElements=new Array,this.logger.log("Constructor"),this.enElements=p.getUrlParameter("engrid_hide[]"),this.enElements&&0!==this.enElements.length?(this.logger.log("Elements Found:",this.enElements),this.hideAll()):this.logger.log("No Elements Found")}hideAll(){this.enElements.forEach((e=>{const t=Object.keys(e)[0],n=Object.values(e)[0];this.hideItem(t,n)}))}hideItem(e,t){const n=[...e.matchAll(/engrid_hide\[([\w-]+)\]/g)].map((e=>e[1]))[0];if("id"===t){const e=document.getElementById(n);e?(this.logger.log("Hiding By ID",n,e),e.setAttribute("hidden-via-url-argument","")):this.logger.error("Element Not Found By ID",n)}else{const e=document.getElementsByClassName(n);if(e.length>0)for(let t=0;t<e.length;t++)this.logger.log("Hiding By Class",n,e[t]),e[t].setAttribute("hidden-via-url-argument","");else this.logger.log("No Elements Found By Class",n)}}}class Ee{constructor(){this.shouldRun()&&this.replaceNameShortcode("#en__field_supporter_firstName","#en__field_supporter_lastName")}shouldRun(){return"EMAILTOTARGET"===p.getPageType()}replaceNameShortcode(e,t){const n=document.querySelector(e),i=document.querySelector(t);let s=document.querySelector('[name="contact.message"]'),r=!1,o=!1;if(s){if(s.value.includes("{user_data~First Name")||s.value.includes("{user_data~Last Name"))return;!s.value.includes("{user_data~First Name")&&n&&n.addEventListener("blur",(e=>{const t=e.target;s&&!r&&(r=!0,s.value=s.value.concat("\n"+t.value))})),!s.value.includes("{user_data~Last Name")&&i&&i.addEventListener("blur",(e=>{const t=e.target;s&&!o&&(o=!0,s.value=s.value.concat(" "+t.value))}))}}}class Ce{constructor(){if(this._form=d.getInstance(),this.logger=new be("ExpandRegionName","#333333","#00eb65","🌍"),this.shouldRun()){const e=p.getOption("RegionLongFormat");console.log("expandedRegionField",e);document.querySelector(`[name="${e}"]`)||(this.logger.log(`CREATED field ${e}`),p.createHiddenInput(e)),this._form.onSubmit.subscribe((()=>this.expandRegion()))}}shouldRun(){return!!p.getOption("RegionLongFormat")}expandRegion(){const e=document.querySelector('[name="supporter.region"]'),t=p.getOption("RegionLongFormat"),n=document.querySelector(`[name="${t}"]`);if(e){if("SELECT"===e.tagName&&"options"in e){const t=e.options[e.selectedIndex].innerText;n.value=t,this.logger.log("Populated field",n.value)}else if("INPUT"===e.tagName){const t=e.value;n.value=t,this.logger.log("Populated field",n.value)}return!0}this.logger.log("No region field to populate the hidden region field with")}}class Ae{constructor(){this.logger=new be("UrlToForm","white","magenta","πŸ”—"),this.urlParams=new URLSearchParams(document.location.search),this.shouldRun()&&this.urlParams.forEach(((e,t)=>{const n=document.getElementsByName(t)[0];n&&(["text","textarea"].includes(n.type)&&n.value||(p.setFieldValue(t,e),this.logger.log(`Set: ${t} to ${e}`)))}))}shouldRun(){return!!document.location.search&&this.hasFields()}hasFields(){return[...this.urlParams.keys()].map((e=>document.getElementsByName(e).length>0)).includes(!0)}}class Le{constructor(){this.logger=new be("RequiredIfVisible","#FFFFFF","#811212","πŸš₯"),this._form=d.getInstance(),this.requiredIfVisibleElements=document.querySelectorAll("\n .i-required .en__field,\n .i1-required .en__field:nth-of-type(1),\n .i2-required .en__field:nth-of-type(2),\n .i3-required .en__field:nth-of-type(3),\n .i4-required .en__field:nth-of-type(4),\n .i5-required .en__field:nth-of-type(5),\n .i6-required .en__field:nth-of-type(6),\n .i7-required .en__field:nth-of-type(7),\n .i8-required .en__field:nth-of-type(8),\n .i9-required .en__field:nth-of-type(9),\n .i10-required .en__field:nth-of-type(10),\n .i11-required .en__field:nth-of-type(11)\n "),this.shouldRun()&&this._form.onValidate.subscribe(this.validate.bind(this))}shouldRun(){return this.requiredIfVisibleElements.length>0}validate(){Array.from(this.requiredIfVisibleElements).reverse().forEach((e=>{if(p.removeError(e),p.isVisible(e)){this.logger.log(`${e.getAttribute("class")} is visible`);const t=e.querySelector("input:not([type=hidden]) , select, textarea");if(t&&null===t.closest("[data-unhidden]")&&!p.getFieldValue(t.getAttribute("name"))){const n=e.querySelector(".en__field__label");n?(this.logger.log(`${n.innerText} is required`),window.setTimeout((()=>{p.setError(e,`${n.innerText} is required`)}),100)):(this.logger.log(`${t.getAttribute("name")} is required`),window.setTimeout((()=>{p.setError(e,"This field is required")}),100)),t.focus(),this._form.validate=!1}}}))}}var xe=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};class De{constructor(){var e,t,n,i,s;if(this.logger=new be("TidyContact","#FFFFFF","#4d9068","πŸ“§"),this.endpoint="https://api.tidycontact.io",this.wasCalled=!1,this.httpStatus=0,this.timeout=5,this.isDirty=!1,this._form=d.getInstance(),this.countries_list=[["Afghanistan","af","93","070 123 4567"],["Albania","al","355","067 212 3456"],["Algeria","dz","213","0551 23 45 67"],["American Samoa","as","1","(684) 733-1234"],["Andorra","ad","376","312 345"],["Angola","ao","244","923 123 456"],["Anguilla","ai","1","(264) 235-1234"],["Antigua and Barbuda","ag","1","(268) 464-1234"],["Argentina","ar","54","011 15-2345-6789"],["Armenia","am","374","077 123456"],["Aruba","aw","297","560 1234"],["Australia","au","61","0412 345 678"],["Austria","at","43","0664 123456"],["Azerbaijan","az","994","040 123 45 67"],["Bahamas","bs","1","(242) 359-1234"],["Bahrain","bh","973","3600 1234"],["Bangladesh","bd","880","01812-345678"],["Barbados","bb","1","(246) 250-1234"],["Belarus","by","375","8 029 491-19-11"],["Belgium","be","32","0470 12 34 56"],["Belize","bz","501","622-1234"],["Benin","bj","229","90 01 12 34"],["Bermuda","bm","1","(441) 370-1234"],["Bhutan","bt","975","17 12 34 56"],["Bolivia","bo","591","71234567"],["Bosnia and Herzegovina","ba","387","061 123 456"],["Botswana","bw","267","71 123 456"],["Brazil","br","55","(11) 96123-4567"],["British Indian Ocean Territory","io","246","380 1234"],["British Virgin Islands","vg","1","(284) 300-1234"],["Brunei","bn","673","712 3456"],["Bulgaria","bg","359","048 123 456"],["Burkina Faso","bf","226","70 12 34 56"],["Burundi","bi","257","79 56 12 34"],["Cambodia","kh","855","091 234 567"],["Cameroon","cm","237","6 71 23 45 67"],["Canada","ca","1","(506) 234-5678"],["Cape Verde","cv","238","991 12 34"],["Caribbean Netherlands","bq","599","318 1234"],["Cayman Islands","ky","1","(345) 323-1234"],["Central African Republic","cf","236","70 01 23 45"],["Chad","td","235","63 01 23 45"],["Chile","cl","56","(2) 2123 4567"],["China","cn","86","131 2345 6789"],["Christmas Island","cx","61","0412 345 678"],["Cocos Islands","cc","61","0412 345 678"],["Colombia","co","57","321 1234567"],["Comoros","km","269","321 23 45"],["Congo","cd","243","0991 234 567"],["Congo","cg","242","06 123 4567"],["Cook Islands","ck","682","71 234"],["Costa Rica","cr","506","8312 3456"],["CΓ΄te d’Ivoire","ci","225","01 23 45 6789"],["Croatia","hr","385","092 123 4567"],["Cuba","cu","53","05 1234567"],["CuraΓ§ao","cw","599","9 518 1234"],["Cyprus","cy","357","96 123456"],["Czech Republic","cz","420","601 123 456"],["Denmark","dk","45","32 12 34 56"],["Djibouti","dj","253","77 83 10 01"],["Dominica","dm","1","(767) 225-1234"],["Dominican Republic","do","1","(809) 234-5678"],["Ecuador","ec","593","099 123 4567"],["Egypt","eg","20","0100 123 4567"],["El Salvador","sv","503","7012 3456"],["Equatorial Guinea","gq","240","222 123 456"],["Eritrea","er","291","07 123 456"],["Estonia","ee","372","5123 4567"],["Eswatini","sz","268","7612 3456"],["Ethiopia","et","251","091 123 4567"],["Falkland Islands","fk","500","51234"],["Faroe Islands","fo","298","211234"],["Fiji","fj","679","701 2345"],["Finland","fi","358","041 2345678"],["France","fr","33","06 12 34 56 78"],["French Guiana","gf","594","0694 20 12 34"],["French Polynesia","pf","689","87 12 34 56"],["Gabon","ga","241","06 03 12 34"],["Gambia","gm","220","301 2345"],["Georgia","ge","995","555 12 34 56"],["Germany","de","49","01512 3456789"],["Ghana","gh","233","023 123 4567"],["Gibraltar","gi","350","57123456"],["Greece","gr","30","691 234 5678"],["Greenland","gl","299","22 12 34"],["Grenada","gd","1","(473) 403-1234"],["Guadeloupe","gp","590","0690 00 12 34"],["Guam","gu","1","(671) 300-1234"],["Guatemala","gt","502","5123 4567"],["Guernsey","gg","44","07781 123456"],["Guinea","gn","224","601 12 34 56"],["Guinea-Bissau","gw","245","955 012 345"],["Guyana","gy","592","609 1234"],["Haiti","ht","509","34 10 1234"],["Honduras","hn","504","9123-4567"],["Hong Kong","hk","852","5123 4567"],["Hungary","hu","36","06 20 123 4567"],["Iceland","is","354","611 1234"],["India","in","91","081234 56789"],["Indonesia","id","62","0812-345-678"],["Iran","ir","98","0912 345 6789"],["Iraq","iq","964","0791 234 5678"],["Ireland","ie","353","085 012 3456"],["Isle of Man","im","44","07924 123456"],["Israel","il","972","050-234-5678"],["Italy","it","39","312 345 6789"],["Jamaica","jm","1","(876) 210-1234"],["Japan","jp","81","090-1234-5678"],["Jersey","je","44","07797 712345"],["Jordan","jo","962","07 9012 3456"],["Kazakhstan","kz","7","8 (771) 000 9998"],["Kenya","ke","254","0712 123456"],["Kiribati","ki","686","72001234"],["Kosovo","xk","383","043 201 234"],["Kuwait","kw","965","500 12345"],["Kyrgyzstan","kg","996","0700 123 456"],["Laos","la","856","020 23 123 456"],["Latvia","lv","371","21 234 567"],["Lebanon","lb","961","71 123 456"],["Lesotho","ls","266","5012 3456"],["Liberia","lr","231","077 012 3456"],["Libya","ly","218","091-2345678"],["Liechtenstein","li","423","660 234 567"],["Lithuania","lt","370","(8-612) 34567"],["Luxembourg","lu","352","628 123 456"],["Macau","mo","853","6612 3456"],["North Macedonia","mk","389","072 345 678"],["Madagascar","mg","261","032 12 345 67"],["Malawi","mw","265","0991 23 45 67"],["Malaysia","my","60","012-345 6789"],["Maldives","mv","960","771-2345"],["Mali","ml","223","65 01 23 45"],["Malta","mt","356","9696 1234"],["Marshall Islands","mh","692","235-1234"],["Martinique","mq","596","0696 20 12 34"],["Mauritania","mr","222","22 12 34 56"],["Mauritius","mu","230","5251 2345"],["Mayotte","yt","262","0639 01 23 45"],["Mexico","mx","52","222 123 4567"],["Micronesia","fm","691","350 1234"],["Moldova","md","373","0621 12 345"],["Monaco","mc","377","06 12 34 56 78"],["Mongolia","mn","976","8812 3456"],["Montenegro","me","382","067 622 901"],["Montserrat","ms","1","(664) 492-3456"],["Morocco","ma","212","0650-123456"],["Mozambique","mz","258","82 123 4567"],["Myanmar","mm","95","09 212 3456"],["Namibia","na","264","081 123 4567"],["Nauru","nr","674","555 1234"],["Nepal","np","977","984-1234567"],["Netherlands","nl","31","06 12345678"],["New Caledonia","nc","687","75.12.34"],["New Zealand","nz","64","021 123 4567"],["Nicaragua","ni","505","8123 4567"],["Niger","ne","227","93 12 34 56"],["Nigeria","ng","234","0802 123 4567"],["Niue","nu","683","888 4012"],["Norfolk Island","nf","672","3 81234"],["North Korea","kp","850","0192 123 4567"],["Northern Mariana Islands","mp","1","(670) 234-5678"],["Norway","no","47","406 12 345"],["Oman","om","968","9212 3456"],["Pakistan","pk","92","0301 2345678"],["Palau","pw","680","620 1234"],["Palestine","ps","970","0599 123 456"],["Panama","pa","507","6123-4567"],["Papua New Guinea","pg","675","7012 3456"],["Paraguay","py","595","0961 456789"],["Peru","pe","51","912 345 678"],["Philippines","ph","63","0905 123 4567"],["Poland","pl","48","512 345 678"],["Portugal","pt","351","912 345 678"],["Puerto Rico","pr","1","(787) 234-5678"],["Qatar","qa","974","3312 3456"],["RΓ©union","re","262","0692 12 34 56"],["Romania","ro","40","0712 034 567"],["Russia","ru","7","8 (912) 345-67-89"],["Rwanda","rw","250","0720 123 456"],["Saint BarthΓ©lemy","bl","590","0690 00 12 34"],["Saint Helena","sh","290","51234"],["Saint Kitts and Nevis","kn","1","(869) 765-2917"],["Saint Lucia","lc","1","(758) 284-5678"],["Saint Martin","mf","590","0690 00 12 34"],["Saint Pierre and Miquelon","pm","508","055 12 34"],["Saint Vincent and the Grenadines","vc","1","(784) 430-1234"],["Samoa","ws","685","72 12345"],["San Marino","sm","378","66 66 12 12"],["SΓ£o TomΓ© and PrΓ­ncipe","st","239","981 2345"],["Saudi Arabia","sa","966","051 234 5678"],["Senegal","sn","221","70 123 45 67"],["Serbia","rs","381","060 1234567"],["Seychelles","sc","248","2 510 123"],["Sierra Leone","sl","232","(025) 123456"],["Singapore","sg","65","8123 4567"],["Sint Maarten","sx","1","(721) 520-5678"],["Slovakia","sk","421","0912 123 456"],["Slovenia","si","386","031 234 567"],["Solomon Islands","sb","677","74 21234"],["Somalia","so","252","7 1123456"],["South Africa","za","27","071 123 4567"],["South Korea","kr","82","010-2000-0000"],["South Sudan","ss","211","0977 123 456"],["Spain","es","34","612 34 56 78"],["Sri Lanka","lk","94","071 234 5678"],["Sudan","sd","249","091 123 1234"],["Suriname","sr","597","741-2345"],["Svalbard and Jan Mayen","sj","47","412 34 567"],["Sweden","se","46","070-123 45 67"],["Switzerland","ch","41","078 123 45 67"],["Syria","sy","963","0944 567 890"],["Taiwan","tw","886","0912 345 678"],["Tajikistan","tj","992","917 12 3456"],["Tanzania","tz","255","0621 234 567"],["Thailand","th","66","081 234 5678"],["Timor-Leste","tl","670","7721 2345"],["Togo","tg","228","90 11 23 45"],["Tokelau","tk","690","7290"],["Tonga","to","676","771 5123"],["Trinidad and Tobago","tt","1","(868) 291-1234"],["Tunisia","tn","216","20 123 456"],["Turkey","tr","90","0501 234 56 78"],["Turkmenistan","tm","993","8 66 123456"],["Turks and Caicos Islands","tc","1","(649) 231-1234"],["Tuvalu","tv","688","90 1234"],["U.S. Virgin Islands","vi","1","(340) 642-1234"],["Uganda","ug","256","0712 345678"],["Ukraine","ua","380","050 123 4567"],["United Arab Emirates","ae","971","050 123 4567"],["United Kingdom","gb","44","07400 123456"],["United States","us","1","(201) 555-0123"],["Uruguay","uy","598","094 231 234"],["Uzbekistan","uz","998","8 91 234 56 78"],["Vanuatu","vu","678","591 2345"],["Vatican City","va","39","312 345 6789"],["Venezuela","ve","58","0412-1234567"],["Vietnam","vn","84","091 234 56 78"],["Wallis and Futuna","wf","681","82 12 34"],["Western Sahara","eh","212","0650-123456"],["Yemen","ye","967","0712 345 678"],["Zambia","zm","260","095 5123456"],["Zimbabwe","zw","263","071 234 5678"],["Γ…land Islands","ax","358","041 2345678"]],this.countries_dropdown=null,this.country_ip=null,this.options=p.getOption("TidyContact"),!1!==this.options&&(null===(e=this.options)||void 0===e?void 0:e.cid))if(this.loadOptions(),this.hasAddressFields()||this.phoneEnabled()){if(this.createFields(),this.addEventListeners(),p.checkNested(window.EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")&&!window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()&&""!=p.getFieldValue(null===(n=null===(t=this.options)||void 0===t?void 0:t.address_fields)||void 0===n?void 0:n.address1)&&(this.logger.log("Address Field is not empty"),this.isDirty=!0),this.phoneEnabled()){this.createPhoneFields(),this.createPhoneMarginVariable(),this.logger.log("Phone Standardization is enabled"),this.countryDropDownEnabled()&&this.renderFlagsDropDown();const e=p.getField(null===(s=null===(i=this.options)||void 0===i?void 0:i.address_fields)||void 0===s?void 0:s.phone);e&&(e.addEventListener("keyup",(e=>{this.handlePhoneInputKeydown(e)})),this.setDefaultPhoneCountry())}}else this.logger.log("No address fields found")}loadOptions(){var e,t,n,i;this.options&&(this.options.address_fields||(this.options.address_fields={address1:"supporter.address1",address2:"supporter.address2",address3:"supporter.address3",city:"supporter.city",region:"supporter.region",postalCode:"supporter.postcode",country:"supporter.country",phone:"supporter.phoneNumber2"}),this.options.address_enable=null===(e=this.options.address_enable)||void 0===e||e,this.options.phone_enable&&(this.options.phone_flags=null===(t=this.options.phone_flags)||void 0===t||t,this.options.phone_country_from_ip=null===(n=this.options.phone_country_from_ip)||void 0===n||n,this.options.phone_preferred_countries=null!==(i=this.options.phone_preferred_countries)&&void 0!==i?i:[]))}createFields(){var e,t,n,i,s,r;if(!this.options||!this.hasAddressFields())return;const o=p.getField("supporter.geo.latitude"),a=p.getField("supporter.geo.longitude");if(o||(p.createHiddenInput("supporter.geo.latitude",""),this.logger.log("Creating Hidden Field: supporter.geo.latitude")),a||(p.createHiddenInput("supporter.geo.longitude",""),this.logger.log("Creating Hidden Field: supporter.geo.longitude")),this.options.record_field){p.getField(this.options.record_field)||(p.createHiddenInput(this.options.record_field,""),this.logger.log("Creating Hidden Field: "+this.options.record_field))}if(this.options.date_field){p.getField(this.options.date_field)||(p.createHiddenInput(this.options.date_field,""),this.logger.log("Creating Hidden Field: "+this.options.date_field))}if(this.options.status_field){p.getField(this.options.status_field)||(p.createHiddenInput(this.options.status_field,""),this.logger.log("Creating Hidden Field: "+this.options.status_field))}p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.address2)||(p.createHiddenInput(null===(t=this.options.address_fields)||void 0===t?void 0:t.address2,""),this.logger.log("Creating Hidden Field: "+(null===(n=this.options.address_fields)||void 0===n?void 0:n.address2))),p.getField(null===(i=this.options.address_fields)||void 0===i?void 0:i.address3)||(p.createHiddenInput(null===(s=this.options.address_fields)||void 0===s?void 0:s.address3,""),this.logger.log("Creating Hidden Field: "+(null===(r=this.options.address_fields)||void 0===r?void 0:r.address3)))}createPhoneFields(){if(this.options){if(p.createHiddenInput("tc.phone.country",""),this.logger.log("Creating hidden field: tc.phone.country"),this.options.phone_record_field){p.getField(this.options.phone_record_field)||(p.createHiddenInput(this.options.phone_record_field,""),this.logger.log("Creating hidden field: "+this.options.phone_record_field))}if(this.options.phone_date_field){p.getField(this.options.phone_date_field)||(p.createHiddenInput(this.options.phone_date_field,""),this.logger.log("Creating hidden field: "+this.options.phone_date_field))}if(this.options.phone_status_field){p.getField(this.options.phone_status_field)||(p.createHiddenInput(this.options.phone_status_field,""),this.logger.log("Creating hidden field: "+this.options.phone_status_field))}}}createPhoneMarginVariable(){var e;if(!this.options)return;const t=p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.phone);if(t){const e=window.getComputedStyle(t),n=e.marginTop,i=e.marginBottom;document.documentElement.style.setProperty("--tc-phone-margin-top",n),document.documentElement.style.setProperty("--tc-phone-margin-bottom",i)}}addEventListeners(){if(this.options){if(this.options.address_fields)for(const[e,t]of Object.entries(this.options.address_fields)){const e=p.getField(t);e&&e.addEventListener("change",(()=>{this.logger.log("Changed "+e.name,!0),this.isDirty=!0}))}this._form.onSubmit.subscribe(this.callAPI.bind(this))}}checkSum(e){return xe(this,void 0,void 0,(function*(){const t=(new TextEncoder).encode(e),n=yield crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map((e=>("00"+e.toString(16)).slice(-2))).join("")}))}todaysDate(){return(new Date).toLocaleString("en-ZA",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(/\/+/g,"")}countryAllowed(e){var t;return!!this.options&&(!this.options.countries||0===this.options.countries.length||!!(null===(t=this.options.countries)||void 0===t?void 0:t.includes(e.toLowerCase())))}fetchTimeOut(e,t){const n=new AbortController,i=n.signal;t=Object.assign(Object.assign({},t),{signal:i});const s=fetch(e,t);i&&i.addEventListener("abort",(()=>n.abort()));const r=setTimeout((()=>n.abort()),1e3*this.timeout);return s.finally((()=>clearTimeout(r)))}writeError(e){if(!this.options)return;const t=p.getField(this.options.record_field),n=p.getField(this.options.date_field),i=p.getField(this.options.status_field);if(t){let n="";switch(this.httpStatus){case 400:n="Bad Request";break;case 401:n="Unauthorized";break;case 403:n="Forbidden";break;case 404:n="Not Found";break;case 408:n="API Request Timeout";break;case 500:n="Internal Server Error";break;case 503:n="Service Unavailable";break;default:n="Unknown Error"}const i={status:this.httpStatus,error:"string"==typeof e?e:n.toUpperCase()};t.value=JSON.stringify(i)}n&&(n.value=this.todaysDate()),i&&(i.value="ERROR-API")}setFields(e){var t,n,i,s,r;if(!this.options||!this.options.address_enable)return{};let o={};const a=this.getCountry(),l=p.getFieldValue(null===(t=this.options.address_fields)||void 0===t?void 0:t.postalCode),c=null!==(n=this.options.us_zip_divider)&&void 0!==n?n:"+",u=p.getField(null===(i=this.options.address_fields)||void 0===i?void 0:i.address2);if("address2"in e&&!u){p.getFieldValue(null===(s=this.options.address_fields)||void 0===s?void 0:s.address1)==e.address1+" "+e.address2?(delete e.address1,delete e.address2):(e.address1=e.address1+" "+e.address2,delete e.address2)}"postalCode"in e&&l.replace("+",c)===e.postalCode.replace("+",c)&&delete e.postalCode;for(const t in e){const n=this.options.address_fields&&Object.keys(this.options.address_fields).includes(t)?this.options.address_fields[t]:t,i=p.getField(n);if(i){let s=e[t];"postalCode"===t&&["US","USA","United States"].includes(a)&&(s=null!==(r=s.replace("+",c))&&void 0!==r?r:""),o[t]={from:i.value,to:s},this.logger.log(`Set ${i.name} to ${s} (${i.value})`),p.setFieldValue(n,s,!1)}else this.logger.log(`Field ${t} not found`)}return o}hasAddressFields(){var e,t,n,i,s,r;if(!this.options||!this.options.address_enable)return!1;const o=p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.address1),a=p.getField(null===(t=this.options.address_fields)||void 0===t?void 0:t.address2),l=p.getField(null===(n=this.options.address_fields)||void 0===n?void 0:n.city),c=p.getField(null===(i=this.options.address_fields)||void 0===i?void 0:i.region),u=p.getField(null===(s=this.options.address_fields)||void 0===s?void 0:s.postalCode),d=p.getField(null===(r=this.options.address_fields)||void 0===r?void 0:r.country);return!!(o||a||l||c||u||d)}canUseAPI(){var e,t,n,i;if(!this.options||!this.hasAddressFields())return!1;const s=!!this.getCountry(),r=!!p.getFieldValue(null===(e=this.options.address_fields)||void 0===e?void 0:e.address1),o=!!p.getFieldValue(null===(t=this.options.address_fields)||void 0===t?void 0:t.city),a=!!p.getFieldValue(null===(n=this.options.address_fields)||void 0===n?void 0:n.region),l=!!p.getFieldValue(null===(i=this.options.address_fields)||void 0===i?void 0:i.postalCode);return!(!s||!r)&&(o&&a||l)}canUsePhoneAPI(){var e;if(!this.options)return!1;if(this.phoneEnabled()){const t=!!p.getFieldValue(null===(e=this.options.address_fields)||void 0===e?void 0:e.phone),n=!!p.getFieldValue("tc.phone.country");return t&&n}return!1}getCountry(){var e,t;if(!this.options)return"";const n=null!==(e=this.options.country_fallback)&&void 0!==e?e:"";return p.getFieldValue(null===(t=this.options.address_fields)||void 0===t?void 0:t.country)||n.toUpperCase()}getCountryByCode(e){var t;const n=null!==(t=this.countries_list.find((t=>t.includes(e))))&&void 0!==t?t:"";return n?{name:n[0],code:n[1],dialCode:n[2],placeholder:n[3]}:null}phoneEnabled(){return!(!this.options||!this.options.phone_enable)}countryDropDownEnabled(){return!(!this.options||!this.options.phone_flags)}getCountryFromIP(){return xe(this,void 0,void 0,(function*(){return fetch(`https://${window.location.hostname}/cdn-cgi/trace`).then((e=>e.text())).then((e=>{let t=e.replace(/[\r\n]+/g,'","').replace(/\=+/g,'":"');t='{"'+t.slice(0,t.lastIndexOf('","'))+'"}';const n=JSON.parse(t);return this.country_ip=n.loc,this.country_ip}))}))}renderFlagsDropDown(){var e;if(!this.options)return;const t=p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.phone);if(!t)return;this.countries_dropdown=document.createElement("div"),this.countries_dropdown.classList.add("tc-flags-container");const n=document.createElement("div");n.classList.add("tc-selected-flag"),n.setAttribute("role","combobox"),n.setAttribute("aria-haspopup","listbox"),n.setAttribute("aria-expanded","false"),n.setAttribute("aria-owns","tc-flags-list"),n.setAttribute("aria-label","Select Country"),n.setAttribute("tabindex","0");const i=document.createElement("div");i.classList.add("tc-flag");const s=document.createElement("div");s.classList.add("tc-flag-arrow"),n.appendChild(i),n.appendChild(s),n.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),n.classList.contains("tc-open")?this.closeCountryDropDown():this.openCountryDropDown()}));const r=document.createElement("ul");if(r.classList.add("tc-country-list"),r.classList.add("tc-hide"),r.setAttribute("id","tc-country-list"),r.setAttribute("role","listbox"),r.setAttribute("aria-label","List of Countries"),r.setAttribute("aria-hidden","true"),this.options.phone_preferred_countries.length>0){const e=[];this.options.phone_preferred_countries.forEach((t=>{const n=this.getCountryByCode(t);n&&e.push(n)})),this.appendCountryItems(r,e,"tc-country-list-item",!0);const t=document.createElement("li");t.classList.add("tc-divider"),t.setAttribute("role","separator"),t.setAttribute("aria-disabled","true"),r.appendChild(t),this.logger.log("Rendering preferred countries",JSON.stringify(e))}const o=[];this.countries_list.forEach((e=>{o.push({name:e[0],code:e[1],dialCode:e[2],placeholder:e[3]})})),this.appendCountryItems(r,o,"tc-country-list-item"),r.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const t=e.target.closest("li");if(t.classList.contains("tc-country-list-item")){const e=this.getCountryByCode(t.getAttribute("data-country-code"));e&&this.setPhoneCountry(e)}})),r.addEventListener("mouseover",(e=>{e.preventDefault(),e.stopPropagation();const t=e.target.closest("li.tc-country-list-item");t&&this.highlightCountry(t.getAttribute("data-country-code"))})),this.countries_dropdown.appendChild(n),this.countries_dropdown.appendChild(r),t.parentNode.insertBefore(this.countries_dropdown,t),t.parentNode.classList.add("tc-has-country-flags"),this.countries_dropdown.addEventListener("keydown",(e=>{var t,n;(null===(n=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-country-list"))||void 0===n?void 0:n.classList.contains("tc-hide"))&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(e.key)&&(e.preventDefault(),e.stopPropagation(),this.openCountryDropDown()),"Tab"===e.key&&this.closeCountryDropDown()})),document.addEventListener("keydown",(e=>{var t,n;(null===(n=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-country-list"))||void 0===n?void 0:n.classList.contains("tc-hide"))||(e.preventDefault(),"ArrowUp"===e.key||"Up"===e.key||"ArrowDown"===e.key||"Down"===e.key?this.handleUpDownKey(e.key):"Enter"===e.key?this.handleEnterKey():"Escape"===e.key&&this.closeCountryDropDown())})),document.addEventListener("click",(e=>{var t,n;(null===(n=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-country-list"))||void 0===n?void 0:n.classList.contains("tc-hide"))||e.target.closest(".tc-country-list")||this.closeCountryDropDown()}))}handleUpDownKey(e){var t;const n=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-highlight");if(n){let t="ArrowUp"===e||"Up"===e?n.previousElementSibling:n.nextElementSibling;t&&(t.classList.contains("tc-divider")&&(t="ArrowUp"===e||"Up"===e?t.previousElementSibling:t.nextElementSibling),this.highlightCountry(null==t?void 0:t.getAttribute("data-country-code")))}}handleEnterKey(){var e;const t=null===(e=this.countries_dropdown)||void 0===e?void 0:e.querySelector(".tc-highlight");if(t){const e=this.getCountryByCode(null==t?void 0:t.getAttribute("data-country-code"));this.setPhoneCountry(e)}}handlePhoneInputKeydown(e){const t=e.target.value;if("+"===t.charAt(0)&&t.length>2){const e=this.getCountryByCode(t.substring(1,3));e?this.setPhoneCountry(e):this.setDefaultPhoneCountry()}}openCountryDropDown(){if(!this.countries_dropdown)return;const e=this.countries_dropdown.querySelector(".tc-country-list"),t=this.countries_dropdown.querySelector(".tc-selected-flag");e&&t&&(e.classList.remove("tc-hide"),t.setAttribute("aria-expanded","true"),t.classList.add("tc-open"))}closeCountryDropDown(){var e;if(!this.options)return;if(!this.countries_dropdown)return;const t=this.countries_dropdown.querySelector(".tc-country-list"),n=this.countries_dropdown.querySelector(".tc-selected-flag");t&&n&&(t.classList.add("tc-hide"),n.setAttribute("aria-expanded","false"),n.classList.remove("tc-open"));p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.phone).focus()}getFlagImage(e,t){return`<picture>\n <source\n loading="lazy"\n type="image/webp"\n srcset="https://flagcdn.com/h20/${e}.webp,\n https://flagcdn.com/h40/${e}.webp 2x,\n https://flagcdn.com/h60/${e}.webp 3x">\n <source\n loading="lazy"\n type="image/png"\n srcset="https://flagcdn.com/h20/${e}.png,\n https://flagcdn.com/h40/${e}.png 2x,\n https://flagcdn.com/h60/${e}.png 3x">\n <img\n loading="lazy"\n src="https://flagcdn.com/h20/${e}.png"\n height="20"\n alt="${t}">\n </picture>`}appendCountryItems(e,t,n,i=!1){let s="";for(let e=0;e<t.length;e++){const r=t[e],o=i?"-preferred":"";s+=`<li class='tc-country ${n}' tabIndex='-1' id='tc-item-${r.code}${o}' role='option' data-dial-code='${r.dialCode}' data-country-code='${r.code}' aria-selected='false'>`,s+=`<div class='tc-flag-box'><div class='tc-flag tc-${r.code}'>${this.getFlagImage(r.code,r.name)}</div></div>`,s+=`<span class='tc-country-name'>${r.name}</span>`,s+=`<span class='tc-dial-code'>+${r.dialCode}</span>`,s+="</li>"}e.insertAdjacentHTML("beforeend",s)}setDefaultPhoneCountry(){var e;if(!this.options)return;if(this.options.phone_country_from_ip)return void this.getCountryFromIP().then((e=>{this.logger.log("Country from IP:",e),this.setPhoneCountry(this.getCountryByCode((null!=e?e:"us").toLowerCase()))})).catch((e=>{this.setPhoneCountry(this.getCountryByCode("us"))}));const t=p.getField(null===(e=this.options.address_fields)||void 0===e?void 0:e.country);if(t){const e=t.options[t.selectedIndex].text,n=this.getCountryByCode(e);if(n)return void this.setPhoneCountry(n);if(this.options.phone_preferred_countries.length>0)return void this.setPhoneCountry(this.getCountryByCode(this.options.phone_preferred_countries[0]))}this.setPhoneCountry(this.getCountryByCode("us"))}setPhoneCountry(e){var t,n,i,s,r,o;if(!this.options||!e)return;const a=p.getField("tc.phone.country");if(a.value===e.code)return;const l=p.getField(null===(t=this.options.address_fields)||void 0===t?void 0:t.phone);if(this.countryDropDownEnabled()){const t=null===(n=this.countries_dropdown)||void 0===n?void 0:n.querySelector(".tc-selected-flag"),a=null===(i=this.countries_dropdown)||void 0===i?void 0:i.querySelector(".tc-flag");t&&a&&(a.innerHTML=this.getFlagImage(e.code,e.name),t.setAttribute("data-country",e.code));const l=null===(s=this.countries_dropdown)||void 0===s?void 0:s.querySelector(".tc-country-list-item[aria-selected='true']");l&&(l.classList.remove("tc-selected"),l.setAttribute("aria-selected","false"));const c=null===(r=this.countries_dropdown)||void 0===r?void 0:r.querySelector(".tc-highlight");c&&c.classList.remove("tc-highlight");const u=null===(o=this.countries_dropdown)||void 0===o?void 0:o.querySelector(`.tc-country-list-item[data-country-code='${e.code}']`);u&&(u.classList.add("tc-selected"),u.setAttribute("aria-selected","true"),u.classList.add("tc-highlight")),(null==t?void 0:t.classList.contains("tc-open"))&&this.closeCountryDropDown()}l.setAttribute("placeholder",e.placeholder),a.value=e.code,this.logger.log(`Setting phone country to ${e.code} - ${e.name}`)}highlightCountry(e){var t,n;if(!e)return;const i=null===(t=this.countries_dropdown)||void 0===t?void 0:t.querySelector(".tc-highlight");i&&i.classList.remove("tc-highlight");const s=null===(n=this.countries_dropdown)||void 0===n?void 0:n.querySelector(".tc-country-list");if(s){const t=s.querySelector(`.tc-country[data-country-code='${e}']`);t&&(t.classList.add("tc-highlight"),t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))}}setPhoneDataFromAPI(e,t){var n;return xe(this,void 0,void 0,(function*(){if(!this.options)return;const i=p.getField(null===(n=this.options.address_fields)||void 0===n?void 0:n.phone),s=p.getField(this.options.phone_record_field),r=p.getField(this.options.phone_date_field),o=p.getField(this.options.phone_status_field);let a={};a.formData={[i.name]:i.value},a.formatted=e.formatted,a.number_type=e.number_type,!0===e.valid?(i.value!==e.formatted.e164&&(a.phone={from:i.value,to:e.formatted.e164},i.value=e.formatted.e164),yield this.checkSum(JSON.stringify(a)).then((e=>{this.logger.log("Phone Checksum",e),a.requestId=t,a.checksum=e})),s&&(a=Object.assign({date:this.todaysDate(),status:"SUCCESS"},a),s.value=JSON.stringify(a)),r&&(r.value=this.todaysDate()),o&&(o.value="SUCCESS")):(yield this.checkSum(JSON.stringify(a)).then((e=>{this.logger.log("Phone Checksum",e),a.requestId=t,a.checksum=e})),s&&(a=Object.assign({date:this.todaysDate(),status:"ERROR"},a),s.value=JSON.stringify(a)),r&&(r.value=this.todaysDate()),o&&(o.value="error"in e?"ERROR: "+e.error:"INVALIDPHONE"))}))}callAPI(){var e,t,n,i,s,r;if(!this.options)return;if(!this.isDirty||this.wasCalled)return;if(!this._form.submit)return void this.logger.log("Form Submission Interrupted by Other Component");const o=p.getField(this.options.record_field),a=p.getField(this.options.date_field),l=p.getField(this.options.status_field),c=p.getField("supporter.geo.latitude"),u=p.getField("supporter.geo.longitude");if(!this.canUseAPI()&&!this.canUsePhoneAPI())return this.logger.log("Not Enough Data to Call API"),a&&(a.value=this.todaysDate()),l&&(l.value="PARTIALADDRESS"),!0;const d=p.getFieldValue(null===(e=this.options.address_fields)||void 0===e?void 0:e.address1),h=p.getFieldValue(null===(t=this.options.address_fields)||void 0===t?void 0:t.address2),g=p.getFieldValue(null===(n=this.options.address_fields)||void 0===n?void 0:n.city),m=p.getFieldValue(null===(i=this.options.address_fields)||void 0===i?void 0:i.region),f=p.getFieldValue(null===(s=this.options.address_fields)||void 0===s?void 0:s.postalCode),b=this.getCountry();if(!this.countryAllowed(b)){if(this.logger.log("Country not allowed: "+b),o){let e={};e=Object.assign({date:this.todaysDate(),status:"DISALLOWED"},e),o.value=JSON.stringify(e)}return a&&(a.value=this.todaysDate()),l&&(l.value="DISALLOWED"),!0}let v={url:window.location.href,cid:this.options.cid};this.canUseAPI()&&(v=Object.assign(v,{address1:d,address2:h,city:g,region:m,postalCode:f,country:b})),this.canUsePhoneAPI()&&(v.phone=p.getFieldValue(null===(r=this.options.address_fields)||void 0===r?void 0:r.phone),v.phoneCountry=p.getFieldValue("tc.phone.country")),this.wasCalled=!0,this.logger.log("FormData",JSON.parse(JSON.stringify(v)));const y=this.fetchTimeOut(this.endpoint,{headers:{"Content-Type":"application/json; charset=utf-8"},method:"POST",body:JSON.stringify(v)}).then((e=>(this.httpStatus=e.status,e.json()))).then((e=>xe(this,void 0,void 0,(function*(){if(this.logger.log("callAPI response",JSON.parse(JSON.stringify(e))),!0===e.valid){let t={};"changed"in e&&(t=this.setFields(e.changed)),t.formData=v,yield this.checkSum(JSON.stringify(t)).then((n=>{this.logger.log("Checksum",n),t.requestId=e.requestId,t.checksum=n})),"latitude"in e&&(c.value=e.latitude,t.latitude=e.latitude),"longitude"in e&&(u.value=e.longitude,t.longitude=e.longitude),o&&(t=Object.assign({date:this.todaysDate(),status:"SUCCESS"},t),o.value=JSON.stringify(t)),a&&(a.value=this.todaysDate()),l&&(l.value="SUCCESS")}else{let t={};t.formData=v,yield this.checkSum(JSON.stringify(t)).then((n=>{this.logger.log("Checksum",n),t.requestId=e.requestId,t.checksum=n})),o&&(t=Object.assign({date:this.todaysDate(),status:"ERROR"},t),o.value=JSON.stringify(t)),a&&(a.value=this.todaysDate()),l&&(l.value="error"in e?"ERROR: "+e.error:"INVALIDADDRESS")}this.phoneEnabled()&&"phone"in e&&(yield this.setPhoneDataFromAPI(e.phone,e.requestId))})))).catch((e=>{e.toString().includes("AbortError")&&(this.logger.log("Fetch aborted"),this.httpStatus=408),this.writeError(e)}));return this._form.submitPromise=y,y}}class ke{constructor(){this.logger=new be("LiveCurrency","#1901b1","#feb47a","πŸ’²"),this.elementsFound=!1,this.isUpdating=!1,this._amount=h.getInstance(),this._frequency=g.getInstance(),this._fees=m.getInstance(),this.searchElements(),this.shouldRun()&&(p.setBodyData("live-currency","active"),this.updateCurrency(),this.addEventListeners(),document.querySelectorAll(".en__field--donationAmt .en__field__element--radio .en__field__item").forEach((e=>{e.setAttribute("data-engrid-currency-symbol-updated","true")})))}searchElements(){const e=document.querySelectorAll("\n .en__component--copyblock,\n .en__component--codeblock,\n .en__field label,\n .en__submit\n ");if(e.length>0){this.elementsFound=!0;const t=p.getCurrencySymbol(),n=p.getCurrencyCode(),i=`<span class="engrid-currency-symbol">${t}</span>`,s=`<span class="engrid-currency-code">${n}</span>`;e.forEach((e=>{if(!(e instanceof HTMLElement&&e.innerHTML.startsWith("<script"))&&e instanceof HTMLElement&&(e.innerHTML.includes("[$]")||e.innerHTML.includes("[$$$]"))){this.logger.log("Old Value:",e.innerHTML);const t=/\[\$\]/g,n=/\[\$\$\$\]/g;e.innerHTML=e.innerHTML.replace(n,s),e.innerHTML=e.innerHTML.replace(t,i),this.logger.log("New Value:",e.innerHTML)}}))}}shouldRun(){return this.elementsFound}addMutationObserver(){const e=document.querySelector(".en__field--donationAmt .en__field__element--radio");if(!e)return;new MutationObserver((t=>{t.forEach((t=>{if("childList"===t.type){if(this.isUpdating)return;this.isUpdating=!0,setTimeout((()=>{this.searchElements(),this.updateCurrency(),e.querySelectorAll(".en__field__item").forEach((e=>{e.setAttribute("data-engrid-currency-symbol-updated","true")})),this.isUpdating=!1}),20)}}))})).observe(e,{childList:!0})}addEventListeners(){this._fees.onFeeChange.subscribe((()=>{setTimeout((()=>{this.updateCurrency()}),10)})),this._amount.onAmountChange.subscribe((()=>{setTimeout((()=>{this.updateCurrency()}),10)})),this._frequency.onFrequencyChange.subscribe((()=>{this.isUpdating||(this.isUpdating=!0,setTimeout((()=>{this.searchElements(),this.updateCurrency(),document.querySelectorAll(".en__field--donationAmt .en__field__element--radio .en__field__item").forEach((e=>{e.setAttribute("data-engrid-currency-symbol-updated","true")})),this.isUpdating=!1}),10))}));const e=p.getField("transaction.paycurrency");e&&e.addEventListener("change",(()=>{setTimeout((()=>{this.updateCurrency(),this._amount.load();const e=document.querySelector(".en__field--donationAmt .en__field__item--other");e&&e.setAttribute("data-currency-symbol",p.getCurrencySymbol()),p.setBodyData("currency-code",p.getCurrencyCode())}),10)})),this.addMutationObserver()}updateCurrency(){const e=document.querySelectorAll(".engrid-currency-symbol"),t=document.querySelectorAll(".engrid-currency-code");e.length>0&&e.forEach((e=>{e.innerHTML=p.getCurrencySymbol()})),t.length>0&&t.forEach((e=>{e.innerHTML=p.getCurrencyCode()})),this.logger.log(`Currency updated for ${e.length+t.length} elements`)}}class Fe{constructor(){this.logger=new be("CustomCurrency","#1901b1","#00cc95","πŸ€‘"),this.currencyElement=document.querySelector("[name='transaction.paycurrency']"),this._country=b.getInstance(),this.shouldRun()&&(this.addEventListeners(),this.loadCurrencies())}shouldRun(){return!(!this.currencyElement||!p.getOption("CustomCurrency"))}addEventListeners(){this._country.countryField&&this._country.onCountryChange.subscribe((e=>{this.loadCurrencies(e)}))}loadCurrencies(e="default"){const t=p.getOption("CustomCurrency");if(!t)return;const n=t.label||"Give with [$$$]";let i=t.default;if(t.countries&&t.countries[e]&&(i=t.countries[e]),!i)return void this.logger.log(`No currencies found for ${e}`);this.logger.log(`Loading currencies for ${e}`),this.currencyElement.innerHTML="";for(const e in i){const t=document.createElement("option");t.value=e,t.text=n.replace("[$$$]",e).replace("[$]",i[e]),t.setAttribute("data-currency-code",e),t.setAttribute("data-currency-symbol",i[e]),this.currencyElement.appendChild(t)}this.currencyElement.selectedIndex=0;const s=new Event("change",{bubbles:!0});this.currencyElement.dispatchEvent(s)}}class Ne{constructor(){this.logger=new be("Autosubmit","#f0f0f0","#ff0000","πŸš€"),this._form=d.getInstance(),p.checkNested(window.EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")&&!window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()&&"Y"===p.getUrlParameter("autosubmit")&&(this.logger.log("Autosubmitting Form"),this._form.submitForm())}}class Te{constructor(){const e=document.getElementsByClassName("en__ticket__field--cost"),t=document.getElementsByClassName("en__ticket__currency");for(const e of t)e.classList.add("en__ticket__currency__hidden");for(const t of e){const e=t.getElementsByClassName("en__ticket__price")[0],n={style:"currency",currency:t.getElementsByClassName("en__ticket__currency")[0].innerText};let i=Intl.NumberFormat(void 0,n).format(Number(e.innerText));".00"===i.slice(-3)&&(i=i.slice(0,-3)),e.innerText=i}}}class Pe{constructor(){this.logger=new be("SwapAmounts","purple","white","πŸ’°"),this._amount=h.getInstance(),this._frequency=g.getInstance(),this.defaultChange=!1,this.swapped=!1,this.shouldRun()&&(this._frequency.onFrequencyChange.subscribe((()=>this.swapAmounts())),this._amount.onAmountChange.subscribe((()=>{this._frequency.frequency in window.EngridAmounts!=!1&&(this.defaultChange=!1,this.swapped&&this._amount.amount!=window.EngridAmounts[this._frequency.frequency].default&&(this.defaultChange=!0))})))}swapAmounts(){this._frequency.frequency in window.EngridAmounts&&(window.EngagingNetworks.require._defined.enjs.swapList("donationAmt",this.loadEnAmounts(window.EngridAmounts[this._frequency.frequency]),{ignoreCurrentValue:this.ignoreCurrentValue()}),this._amount.load(),this.logger.log("Amounts Swapped To",window.EngridAmounts[this._frequency.frequency]),this.swapped=!0)}loadEnAmounts(e){let t=[];for(let n in e.amounts)t.push({selected:e.amounts[n]===e.default,label:n,value:e.amounts[n].toString()});return t}shouldRun(){return"EngridAmounts"in window}ignoreCurrentValue(){return!(window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed()||null!==p.getUrlParameter("transaction.donationAmt")||this.defaultChange)}}class Oe{constructor(e){var t,n;this.logger=new be("Debug Panel","#f0f0f0","#ff0000","πŸ’₯"),this.brandingHtml=new Ie,this.element=null,this.currentTimestamp=this.getCurrentTimestamp(),this.quickFills={"pi-general":[{name:"supporter.title",value:"Ms"},{name:"supporter.firstName",value:"4Site"},{name:"supporter.lastName",value:"Studio"},{name:"supporter.emailAddress",value:"en-test@4sitestudios.com"},{name:"supporter.phoneNumber",value:"555-555-5555"}],"pi-unique":[{name:"supporter.title",value:"Ms"},{name:"supporter.firstName",value:`4Site ${this.currentTimestamp}`},{name:"supporter.lastName",value:"Studio"},{name:"supporter.emailAddress",value:`en-test+${this.currentTimestamp}@4sitestudios.com`},{name:"supporter.phoneNumber",value:"555-555-5555"}],"us-address":[{name:"supporter.address1",value:"3431 14th St NW"},{name:"supporter.address2",value:"Suite 1"},{name:"supporter.city",value:"Washington"},{name:"supporter.region",value:"DC"},{name:"supporter.postcode",value:"20010"},{name:"supporter.country",value:"US"}],"us-address-senate-rep":[{name:"supporter.address1",value:"20 W 34th Street"},{name:"supporter.address2",value:""},{name:"supporter.city",value:"New York"},{name:"supporter.region",value:"NY"},{name:"supporter.postcode",value:"10001"},{name:"supporter.country",value:"US"}],"us-address-nonexistent":[{name:"supporter.address1",value:"12345 Main Street"},{name:"supporter.address2",value:""},{name:"supporter.city",value:"New York"},{name:"supporter.region",value:"TX"},{name:"supporter.postcode",value:"90210"},{name:"supporter.country",value:"US"}],"cc-paysafe-visa":[{name:"transaction.ccnumber",value:"4530910000012345"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}],"cc-paysafe-visa-invalid":[{name:"transaction.ccnumber",value:"411111"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}],"cc-paysafe-mastercard":[{name:"transaction.ccnumber",value:"5036150000001115"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}],"cc-stripe-visa":[{name:"transaction.ccnumber",value:"4242424242424242"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}],"quick-fill-pi-unique-us-address-senate-rep-cc-stripe-visa":[{name:"supporter.title",value:"Ms"},{name:"supporter.firstName",value:`4Site ${this.currentTimestamp}`},{name:"supporter.lastName",value:"Studio"},{name:"supporter.emailAddress",value:`en-test+${this.currentTimestamp}@4sitestudios.com`},{name:"supporter.phoneNumber",value:"555-555-5555"},{name:"supporter.address1",value:"20 W 34th Street"},{name:"supporter.address2",value:""},{name:"supporter.city",value:"New York"},{name:"supporter.region",value:"NY"},{name:"supporter.postcode",value:"10001"},{name:"supporter.country",value:"US"},{name:"transaction.ccnumber",value:"4242424242424242"},{name:"transaction.ccexpire",value:"12/27"},{name:"transaction.ccvv",value:"111"}]},this.logger.log("Adding debug panel and starting a debug session"),this.pageLayouts=e,this.loadDebugPanel(),this.element=document.querySelector(".debug-panel"),null===(t=this.element)||void 0===t||t.addEventListener("click",(()=>{var e;null===(e=this.element)||void 0===e||e.classList.add("debug-panel--open")}));const i=document.querySelector(".debug-panel__close");null==i||i.addEventListener("click",(e=>{var t;e.stopPropagation(),null===(t=this.element)||void 0===t||t.classList.remove("debug-panel--open")})),"local"===p.getUrlParameter("assets")&&(null===(n=this.element)||void 0===n||n.classList.add("debug-panel--local")),window.sessionStorage.setItem(Oe.debugSessionStorageKey,"active")}loadDebugPanel(){document.body.insertAdjacentHTML("beforeend",'<div class="debug-panel">\n <div class="debug-panel__container">\n <div class="debug-panel__closed-title">Debug</div>\n <div class="debug-panel__title">\n <h2>Debug</h2>\n <div class="debug-panel__close">X</div>\n </div>\n <div class="debug-panel__options">\n <div class="debug-panel__option">\n <label class="debug-panel__link-label link-left">\n <a class="debug-panel__edit-link">Edit page</a>\n </label>\n </div>\n <div class="debug-panel__option">\n <label for="engrid-form-quickfill">Quick-fill</label>\n <select name="engrid-form-quickfill" id="engrid-form-quickfill">\n <option disabled selected>Choose an option</option>\n <option value="quick-fill-pi-unique-us-address-senate-rep-cc-stripe-visa">Quick-fill - Unique w/ Senate Address - Stripe Visa</option>\n <option value="pi-general">Personal Info - General</option>\n <option value="pi-unique">Personal Info - Unique</option>\n <option value="us-address-senate-rep">US Address - w/ Senate Rep</option>\n <option value="us-address">US Address - w/o Senate Rep</option>\n <option value="us-address-nonexistent">US Address - Nonexistent</option>\n <option value="cc-paysafe-visa">CC - Paysafe - Visa</option>\n <option value="cc-paysafe-visa-invalid">CC - Paysafe - Visa (Invalid)</option>\n <option value="cc-paysafe-mastercard">CC - Paysafe - Mastercard</option>\n <option value="cc-stripe-visa">CC - Stripe - Visa</option>\n </select>\n </div>\n <div class="debug-panel__option">\n <label for="engrid-layout-switch">Layout</label>\n <select name="engrid-layout" id="engrid-layout-switch">\n </select>\n </div>\n <div class="debug-panel__option debug-panel__option--local">\n <div class="debug-panel__checkbox">\n <input type="checkbox" name="engrid-embedded-layout" id="engrid-embedded-layout">\n <label for="engrid-embedded-layout">Embedded layout</label> \n </div>\n </div>\n <div class="debug-panel__option debug-panel__option--local">\n <div class="debug-panel__checkbox">\n <input type="checkbox" name="engrid-debug-layout" id="engrid-debug-layout">\n <label for="engrid-debug-layout">Debug layout</label> \n </div>\n </div>\n <div class="debug-panel__option debug-panel__option--local">\n <div class="debug-panel__checkbox">\n <input type="checkbox" name="engrid-branding" id="engrid-branding">\n <label for="engrid-branding">Branding HTML</label> \n </div>\n </div>\n <div class="debug-panel__option">\n <label for="engrid-theme">Theme</label>\n <input type="text" id="engrid-theme">\n </div>\n <div class="debug-panel__option debug-panel__option--local">\n <label for="engrid-theme">Sub-theme</label>\n <input type="text" id="engrid-subtheme">\n </div>\n <div class="debug-panel__option">\n <button class="btn debug-panel__btn debug-panel__btn--submit" type="button">Submit form</button>\n </div>\n <div class="debug-panel__option">\n <label class="debug-panel__link-label">\n <a class="debug-panel__force-submit-link">Force submit form</a>\n </label>\n </div>\n <div class="debug-panel__option">\n <label class="debug-panel__link-label">\n <a class="debug-panel__end-debug-link">End debug</a>\n </label>\n </div>\n </div>\n </div>\n </div>'),this.setupLayoutSwitcher(),this.setupThemeSwitcher(),this.setupSubThemeSwitcher(),this.setupFormQuickfill(),this.createDebugSessionEndHandler(),this.setupEmbeddedLayoutSwitcher(),this.setupDebugLayoutSwitcher(),this.setupBrandingHtmlHandler(),this.setupEditBtnHandler(),this.setupForceSubmitLinkHandler(),this.setupSubmitBtnHandler()}switchENGridLayout(e){p.setBodyData("layout",e)}setupLayoutSwitcher(){var e,t;const n=document.getElementById("engrid-layout-switch");n&&(null===(e=this.pageLayouts)||void 0===e||e.forEach((e=>{n.insertAdjacentHTML("beforeend",`<option value="${e}">${e}</option>`)})),n.value=null!==(t=p.getBodyData("layout"))&&void 0!==t?t:"",n.addEventListener("change",(e=>{const t=e.target;this.switchENGridLayout(t.value)})))}setupThemeSwitcher(){var e;const t=document.getElementById("engrid-theme");t&&(t.value=null!==(e=p.getBodyData("theme"))&&void 0!==e?e:"",["keyup","blur"].forEach((e=>{t.addEventListener(e,(e=>{const t=e.target;this.switchENGridTheme(t.value)}))})))}switchENGridTheme(e){p.setBodyData("theme",e)}setupSubThemeSwitcher(){var e;const t=document.getElementById("engrid-subtheme");t&&(t.value=null!==(e=p.getBodyData("subtheme"))&&void 0!==e?e:"",["keyup","blur"].forEach((e=>{t.addEventListener(e,(e=>{const t=e.target;this.switchENGridSubtheme(t.value)}))})))}switchENGridSubtheme(e){p.setBodyData("subtheme",e)}setupFormQuickfill(){const e=document.getElementById("engrid-form-quickfill");null==e||e.addEventListener("change",(e=>{const t=e.target;this.quickFills[t.value].forEach((e=>{this.setFieldValue(e)}))}))}setFieldValue(e){if("transaction.ccexpire"!==e.name)p.setFieldValue(e.name,e.value,!0,!0);else{const t=document.getElementsByName("transaction.ccexpire");if(t.length>0){const n=e.value.split("/");t[0].value=n[0],t[1].value=n[1],t[0].dispatchEvent(new Event("change",{bubbles:!0})),t[1].dispatchEvent(new Event("change",{bubbles:!0}))}else t[0].value=e.value,t[0].dispatchEvent(new Event("change",{bubbles:!0}))}}getCurrentTimestamp(){const e=new Date;return`${e.getFullYear()}${String(e.getMonth()+1).padStart(2,"0")}${String(e.getDate()).padStart(2,"0")}-${String(e.getHours()).padStart(2,"0")}${String(e.getMinutes()).padStart(2,"0")}`}createDebugSessionEndHandler(){const e=document.querySelector(".debug-panel__end-debug-link");null==e||e.addEventListener("click",(()=>{var e;this.logger.log("Removing panel and ending debug session"),null===(e=this.element)||void 0===e||e.remove(),window.sessionStorage.removeItem(Oe.debugSessionStorageKey)}))}setupEmbeddedLayoutSwitcher(){const e=document.getElementById("engrid-embedded-layout");e&&(e.checked=!!p.getBodyData("embedded"),e.addEventListener("change",(e=>{const t=e.target;p.setBodyData("embedded",t.checked)})))}setupDebugLayoutSwitcher(){const e=document.getElementById("engrid-debug-layout");e&&(e.checked="layout"===p.getBodyData("debug"),e.addEventListener("change",(e=>{e.target.checked?p.setBodyData("debug","layout"):p.setBodyData("debug","")})))}setupBrandingHtmlHandler(){const e=document.getElementById("engrid-branding");e.checked="branding"===p.getUrlParameter("development"),e.addEventListener("change",(t=>{e.checked?this.brandingHtml.show():this.brandingHtml.hide()}))}setupEditBtnHandler(){const e=document.querySelector(".debug-panel__edit-link");null==e||e.addEventListener("click",(()=>{window.open(`https://${p.getDataCenter()}.engagingnetworks.app/index.html#pages/${p.getPageID()}/edit`,"_blank")}))}setupForceSubmitLinkHandler(){const e=document.querySelector(".debug-panel__force-submit-link");null==e||e.addEventListener("click",(()=>{const e=document.querySelector("form.en__component");null==e||e.submit()}))}setupSubmitBtnHandler(){const e=document.querySelector(".debug-panel__btn--submit");null==e||e.addEventListener("click",(()=>{const e=document.querySelector(".en__submit button");null==e||e.click()}))}}Oe.debugSessionStorageKey="engrid_debug_panel";class Me{constructor(){this.logger=new be("Debug hidden fields","#f0f0f0","#ff0000","🫣");const e=document.querySelectorAll(".en__component--row [type='hidden'][class*='en_'], .engrid-added-input[type='hidden']");e.length>0&&(this.logger.log(`Switching the following type 'hidden' fields to type 'text': ${[...e].map((e=>e.name)).join(", ")}`),e.forEach((e=>{e.type="text",e.classList.add("en__field__input","en__field__input--text");const t=document.createElement("label");t.textContent="Hidden field: "+e.name,t.classList.add("en__field__label");const n=document.createElement("div");n.classList.add("en__field__element","en__field__element--text");const i=document.createElement("div");i.classList.add("en__field","en__field--text","hide"),i.dataset.unhidden="",i.appendChild(t),i.appendChild(n),e.parentNode&&(e.parentNode.insertBefore(i,e),n.appendChild(e))})))}}var qe=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};class Ie{constructor(){this.assetBaseUrl="https://cdn.jsdelivr.net/gh/4site-interactive-studios/engrid-scripts@main/reference-materials/html/brand-guide-markup/",this.brandingHtmlFiles=["html5-tags.html","en-common-fields.html","survey.html","donation-page.html","premium-donation.html","ecards.html","email-to-target.html","tweet-to-target.html","petition.html","event.html","styles.html"],this.bodyMain=document.querySelector(".body-main"),this.htmlFetched=!1}fetchHtml(){return qe(this,void 0,void 0,(function*(){const e=this.brandingHtmlFiles.map((e=>qe(this,void 0,void 0,(function*(){return(yield fetch(this.assetBaseUrl+e)).text()}))));return yield Promise.all(e)}))}appendHtml(){this.fetchHtml().then((e=>e.forEach((e=>{var t;const n=document.createElement("div");n.classList.add("brand-guide-section"),n.innerHTML=e,null===(t=this.bodyMain)||void 0===t||t.insertAdjacentElement("beforeend",n)})))),this.htmlFetched=!0}show(){if(!this.htmlFetched)return void this.appendHtml();const e=document.querySelectorAll(".brand-guide-section");null==e||e.forEach((e=>e.style.display="block"))}hide(){const e=document.querySelectorAll(".brand-guide-section");null==e||e.forEach((e=>e.style.display="none"))}}class Be{constructor(){this.logger=new be("CountryDisable","#f0f0f0","#333333","🌎");const e=document.querySelectorAll('select[name="supporter.country"], select[name="transaction.shipcountry"], select[name="supporter.billingCountry"], select[name="transaction.infcountry"]'),t=p.getOption("CountryDisable");if(e.length>0&&t.length>0){const n=t.map((e=>e.toLowerCase()));e.forEach((e=>{e.querySelectorAll("option").forEach((t=>{(n.includes(t.value.toLowerCase())||n.includes(t.text.toLowerCase()))&&(this.logger.log(`Removing ${t.text} from ${e.getAttribute("name")}`),t.remove())}))}))}}}class Re{constructor(){this.logger=new be("PremiumGift","#232323","#f7b500","🎁"),this.enElements=new Array,this.shoudRun()&&(this.searchElements(),this.addEventListeners(),this.checkPremiumGift())}shoudRun(){return"pageJson"in window&&"pageType"in window.pageJson&&"premiumgift"===window.pageJson.pageType}addEventListeners(){["click","change"].forEach((e=>{document.addEventListener(e,(e=>{const t=e.target,n=t.closest(".en__pg__body");if(n){const e=n.querySelector('[name="en__pg"]');if("type"in t==!1){const t=e.value;window.setTimeout((()=>{const e=document.querySelector('[name="en__pg"][value="'+t+'"]');e&&(e.checked=!0,e.dispatchEvent(new Event("change")))}),100)}window.setTimeout((()=>{this.checkPremiumGift()}),110)}}))}));const e=document.querySelector(".en__component--premiumgiftblock");if(e){new MutationObserver((t=>{for(const n of t)"attributes"===n.type&&"style"===n.attributeName&&"none"===e.style.display&&(this.logger.log("Premium Gift Section hidden - removing premium gift body data attributes and premium title."),p.setBodyData("premium-gift-maximize",!1),p.setBodyData("premium-gift-name",!1),this.setPremiumTitle(""))})).observe(e,{attributes:!0})}}checkPremiumGift(){const e=document.querySelector('[name="en__pg"]:checked');if(e){const t=e.value;this.logger.log("Premium Gift Value: "+t);const n=e.closest(".en__pg");if("0"!==t){const e=n.querySelector(".en__pg__name");p.setBodyData("premium-gift-maximize","false"),p.setBodyData("premium-gift-name",p.slugify(e.innerText)),this.setPremiumTitle(e.innerText)}else p.setBodyData("premium-gift-maximize","true"),p.setBodyData("premium-gift-name",!1),this.setPremiumTitle("");if(!n.classList.contains("en__pg--selected")){const e=document.querySelector(".en__pg--selected");e&&e.classList.remove("en__pg--selected"),n.classList.add("en__pg--selected")}}}searchElements(){const e=document.querySelectorAll("\n .en__component--copyblock,\n .en__component--codeblock,\n .en__field\n ");e.length>0&&e.forEach((e=>{e instanceof HTMLElement&&e.innerHTML.includes("{$PREMIUMTITLE}")&&(e.innerHTML=e.innerHTML.replace("{$PREMIUMTITLE}",'<span class="engrid_premium_title"></span>'),this.enElements.push(e))}))}setPremiumTitle(e){this.enElements.forEach((t=>{const n=t.querySelector(".engrid_premium_title");n&&(n.innerHTML=e)}))}}class je{constructor(){if(!document.getElementById("en__digitalWallet"))return p.setBodyData("payment-type-option-apple-pay","false"),p.setBodyData("payment-type-option-google-pay","false"),p.setBodyData("payment-type-option-paypal-one-touch","false"),void p.setBodyData("payment-type-option-venmo","false");const e=document.getElementById("en__digitalWallet__stripeButtons__container");e&&(e.classList.add("giveBySelect-stripedigitalwallet"),e.classList.add("showif-stripedigitalwallet-selected"));const t=document.getElementById("en__digitalWallet__paypalTouch__container");if(t&&(t.classList.add("giveBySelect-paypaltouch"),t.classList.add("showif-paypaltouch-selected")),document.querySelector("#en__digitalWallet__stripeButtons__container > *"))this.addStripeDigitalWallets();else{p.setBodyData("payment-type-option-apple-pay","false"),p.setBodyData("payment-type-option-google-pay","false");const e=document.getElementById("en__digitalWallet__stripeButtons__container");e&&this.checkForWalletsBeingAdded(e,"stripe")}if(document.querySelector("#en__digitalWallet__paypalTouch__container > *"))this.addPaypalTouchDigitalWallets();else{p.setBodyData("payment-type-option-paypal-one-touch","false"),p.setBodyData("payment-type-option-venmo","false");const e=document.getElementById("en__digitalWallet__paypalTouch__container");e&&this.checkForWalletsBeingAdded(e,"paypalTouch")}}addStripeDigitalWallets(){this.addOptionToPaymentTypeField("stripedigitalwallet","GooglePay / ApplePay"),p.setBodyData("payment-type-option-apple-pay","true"),p.setBodyData("payment-type-option-google-pay","true")}addPaypalTouchDigitalWallets(){this.addOptionToPaymentTypeField("paypaltouch","Paypal / Venmo"),p.setBodyData("payment-type-option-paypal-one-touch","true"),p.setBodyData("payment-type-option-venmo","true")}addOptionToPaymentTypeField(e,t){const n=document.querySelector('[name="transaction.paymenttype"]');if(n&&!n.querySelector(`[value=${e}]`)){const i=document.createElement("option");i.value=e,i.innerText=t,n.appendChild(i)}}checkForWalletsBeingAdded(e,t){new MutationObserver(((e,n)=>{for(const i of e)"childList"===i.type&&i.addedNodes.length&&("stripe"===t?this.addStripeDigitalWallets():"paypalTouch"===t&&this.addPaypalTouchDigitalWallets(),n.disconnect())})).observe(e,{childList:!0,subtree:!0})}}class Ve{constructor(){var e,t,n;this.options=null!==(e=p.getOption("MobileCTA"))&&void 0!==e&&e,this.buttonLabel="",this.options&&(null===(t=this.options.pages)||void 0===t?void 0:t.includes(p.getPageType()))&&1===p.getPageNumber()&&(this.buttonLabel=null!==(n=this.options.label)&&void 0!==n?n:"Take Action",this.renderButton(),this.addEventListeners())}renderButton(){const e=document.querySelector("#engrid"),t=document.querySelector(".body-main .en__component--widgetblock:first-child, .en__component--formblock");if(!e||!t)return;const n=document.createElement("div"),i=document.createElement("button");n.classList.add("engrid-mobile-cta-container"),n.style.display="none",i.classList.add("primary"),i.innerHTML=this.buttonLabel,i.addEventListener("click",(()=>{t.scrollIntoView({behavior:"smooth"})})),n.appendChild(i),e.appendChild(n)}addEventListeners(){const e=document.querySelector(".body-main");if(!e)return;const t=()=>{e.getBoundingClientRect().top<=window.innerHeight-100?this.hideButton():this.showButton()};window.addEventListener("load",t),window.addEventListener("resize",t),window.addEventListener("scroll",t)}hideButton(){const e=document.querySelector(".engrid-mobile-cta-container");e&&(e.style.display="none")}showButton(){const e=document.querySelector(".engrid-mobile-cta-container");e&&(e.style.display="block")}}class He{constructor(){this.logger=new be("LiveFrequency","#00ff00","#000000","🧾"),this.elementsFound=!1,this._amount=h.getInstance(),this._frequency=g.getInstance(),this.searchElements(),this.shouldRun()&&(this.updateFrequency(),this.addEventListeners())}searchElements(){const e=document.querySelectorAll("\n .en__component--copyblock,\n .en__component--codeblock,\n .en__field label,\n .en__submit\n ");if(e.length>0){const t=/\[\[(frequency)\]\]/gi;let n=0;e.forEach((e=>{const i=e.innerHTML.match(t);e instanceof HTMLElement&&i&&(this.elementsFound=!0,i.forEach((t=>{n++,this.replaceMergeTags(t,e)})))})),n>0&&this.logger.log(`Found ${n} merge tag${n>1?"s":""} in the page.`)}}shouldRun(){return!!this.elementsFound||(this.logger.log("No merge tags found. Skipping."),!1)}addEventListeners(){this._amount.onAmountChange.subscribe((()=>{setTimeout((()=>{this.updateFrequency()}),10)})),this._frequency.onFrequencyChange.subscribe((()=>{setTimeout((()=>{this.searchElements(),this.updateFrequency()}),10)}))}updateFrequency(){const e="onetime"===this._frequency.frequency?"one-time":this._frequency.frequency;document.querySelectorAll(".engrid-frequency").forEach((t=>{t.classList.contains("engrid-frequency--lowercase")?t.innerHTML=e.toLowerCase():t.classList.contains("engrid-frequency--capitalized")?t.innerHTML=e.charAt(0).toUpperCase()+e.slice(1):t.classList.contains("engrid-frequency--uppercase")?t.innerHTML=e.toUpperCase():t.innerHTML=e}))}replaceMergeTags(e,t){const n="onetime"===this._frequency.frequency?"one-time":this._frequency.frequency,i=document.createElement("span");switch(i.classList.add("engrid-frequency"),i.innerHTML=n,e){case"[[frequency]]":i.classList.add("engrid-frequency--lowercase"),i.innerHTML=i.innerHTML.toLowerCase(),t.innerHTML=t.innerHTML.replace(e,i.outerHTML);break;case"[[Frequency]]":i.classList.add("engrid-frequency--capitalized"),i.innerHTML=i.innerHTML.charAt(0).toUpperCase()+i.innerHTML.slice(1),t.innerHTML=t.innerHTML.replace(e,i.outerHTML);break;case"[[FREQUENCY]]":i.classList.add("engrid-frequency--uppercase"),i.innerHTML=i.innerHTML.toUpperCase(),t.innerHTML=t.innerHTML.replace(e,i.outerHTML)}}}class Ue{constructor(){this.logger=new be("UniversalOptIn","#f0f0f0","#d2691e","πŸͺž"),this._elements=document.querySelectorAll(".universal-opt-in, .universal-opt-in_null"),this.shouldRun()&&this.addEventListeners()}shouldRun(){return 0===this._elements.length?(this.logger.log("No universal opt-in elements found. Skipping."),!1):(this.logger.log(`Found ${this._elements.length} universal opt-in elements.`),!0)}addEventListeners(){this._elements.forEach((e=>{const t=e.querySelectorAll(".en__field__input--radio, .en__field__input--checkbox");t.length>0&&t.forEach((n=>{n.addEventListener("click",(()=>{if(n instanceof HTMLInputElement&&"checkbox"===n.getAttribute("type")){return void(n.checked?(this.logger.log("Yes/No "+n.getAttribute("type")+" is checked"),t.forEach((e=>{n!==e&&e instanceof HTMLInputElement&&"checkbox"===e.getAttribute("type")&&(e.checked=!0)}))):(this.logger.log("Yes/No "+n.getAttribute("type")+" is unchecked"),t.forEach((e=>{n!==e&&e instanceof HTMLInputElement&&"checkbox"===e.getAttribute("type")&&(e.checked=!1)}))))}"Y"===n.getAttribute("value")?(this.logger.log("Yes/No "+n.getAttribute("type")+" is checked"),t.forEach((e=>{const t=e.getAttribute("name"),i=n.getAttribute("name");t&&t!==i&&p.setFieldValue(t,"Y")}))):(this.logger.log("Yes/No "+n.getAttribute("type")+" is unchecked"),t.forEach((t=>{const i=t.getAttribute("name"),s=n.getAttribute("name");i&&i!==s&&(e.classList.contains("universal-opt-in")?p.setFieldValue(i,"N"):t.checked=!1)})))}))}))}))}}class $e{constructor(){this.logger=new be("Plaid","peru","yellow","πŸ”—"),this._form=d.getInstance(),this.logger.log("Enabled"),this._form.onSubmit.subscribe((()=>this.submit()))}submit(){const e=document.querySelector("#plaid-link-button");if(e&&"Link Account"===e.textContent){this.logger.log("Clicking Link"),e.click(),this._form.submit=!1;new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{e.nodeType===Node.TEXT_NODE&&("Account Linked"===e.nodeValue?(this.logger.log("Plaid Linked"),this._form.submit=!0,this._form.submitForm()):this._form.submit=!0)}))}))})).observe(e,{childList:!0,subtree:!0}),window.setTimeout((()=>{this.logger.log("Enabling Submit"),p.enableSubmit()}),1e3)}}}class We{constructor(){if(this.logger=new be("GiveBySelect","#FFF","#333","πŸ‡"),this.transactionGiveBySelect=document.getElementsByName("transaction.giveBySelect"),this.vgsField=document.querySelector(".en__field--vgs"),!this.transactionGiveBySelect)return;this.transactionGiveBySelect.forEach((e=>{e.addEventListener("change",(()=>{this.logger.log("Changed to "+e.value),"card"===e.value.toLowerCase()?this.vgsField?p.setPaymentType("visa"):p.setPaymentType(""):p.setPaymentType(e.value)}))}));const e=p.getPaymentType();if(e){this.logger.log("Setting giveBySelect to "+e);const t=["visa","mastercard","amex","discover","diners","jcb","vi","mc","ax","dc","di","jc"].includes(e.toLowerCase());this.transactionGiveBySelect.forEach((n=>{(t&&"card"===n.value.toLowerCase()||n.value.toLowerCase()===e.toLowerCase())&&(n.checked=!0)}))}}}class Ge{constructor(){this.logger=new be("UrlParamsToBodyAttrs","white","magenta","πŸ“Œ"),this.urlParams=new URLSearchParams(document.location.search),this.urlParams.forEach(((e,t)=>{t.startsWith("data-engrid-")&&(p.setBodyData(t.split("data-engrid-")[1],e),this.logger.log(`Set "${t}" on body to "${e}" from URL params`))}))}}class ze{constructor(){this.opened=!1,this.dataLayer=window.dataLayer||[],this.logger=new be("ExitIntentLightbox","yellow","black","πŸšͺ"),this.triggerDelay=1e3,this.triggerTimeout=null;let e="EngridExitIntent"in window?window.EngridExitIntent:{};if(this.options=Object.assign(Object.assign({},l),e),!this.options.enabled)return void this.logger.log("Not enabled");if(ne(this.options.cookieName))return void this.logger.log("Not showing - cookie found.");const t=Object.keys(this.options.triggers).filter((e=>this.options.triggers[e])).join(", ");this.logger.log("Enabled, waiting for trigger. Active triggers: "+t),this.watchForTriggers()}watchForTriggers(){window.addEventListener("load",(()=>{setTimeout((()=>{this.options.triggers.mousePosition&&this.watchMouse(),this.options.triggers.visibilityState&&this.watchDocumentVisibility()}),this.triggerDelay)}))}watchMouse(){document.addEventListener("mouseout",(e=>{if("input"==e.target.tagName.toLowerCase())return;const t=Math.max(document.documentElement.clientWidth,window.innerWidth||0);if(e.clientX>=t-50)return;if(e.clientY>=50)return;const n=e.relatedTarget;n||(this.logger.log("Triggered by mouse position"),this.open()),this.triggerTimeout||(this.triggerTimeout=window.setTimeout((()=>{n||(this.logger.log("Triggered by mouse position"),this.open()),this.triggerTimeout=null}),this.triggerDelay))}))}watchDocumentVisibility(){const e=()=>{"hidden"===document.visibilityState&&(this.triggerTimeout||(this.triggerTimeout=window.setTimeout((()=>{this.logger.log("Triggered by visibilityState is hidden"),this.open(),document.removeEventListener("visibilitychange",e),this.triggerTimeout=null}),this.triggerDelay)))};document.addEventListener("visibilitychange",e)}open(){var e,t,n;this.opened||(p.setBodyData("exit-intent-lightbox","open"),ie(this.options.cookieName,"1",{expires:this.options.cookieDuration}),document.body.insertAdjacentHTML("beforeend",`\n <div class="ExitIntent">\n <div class="ExitIntent__overlay">\n <div class="ExitIntent__container">\n <div class="ExitIntent__close">X</div>\n <div class="ExitIntent__body">\n <h2>${this.options.title}</h2>\n <p>${this.options.text}</p>\n <button type="button" class="ExitIntent__button">\n ${this.options.buttonText}\n </button>\n </div>\n </div>\n </div>\n </div>\n `),this.opened=!0,this.dataLayer.push({event:"exit_intent_lightbox_shown"}),null===(e=document.querySelector(".ExitIntent__close"))||void 0===e||e.addEventListener("click",(()=>{this.dataLayer.push({event:"exit_intent_lightbox_closed"}),this.close()})),null===(t=document.querySelector(".ExitIntent__overlay"))||void 0===t||t.addEventListener("click",(e=>{e.target===e.currentTarget&&(this.dataLayer.push({event:"exit_intent_lightbox_closed"}),this.close())})),null===(n=document.querySelector(".ExitIntent__button"))||void 0===n||n.addEventListener("click",(()=>{this.dataLayer.push({event:"exit_intent_lightbox_cta_clicked"}),this.close();const e=this.options.buttonLink;if(e.startsWith(".")||e.startsWith("#")){const t=document.querySelector(e);t&&t.scrollIntoView({behavior:"smooth"})}else window.open(e,"_blank")})))}close(){var e;null===(e=document.querySelector(".ExitIntent"))||void 0===e||e.remove(),p.setBodyData("exit-intent-lightbox","closed")}}class Ye{constructor(){this.logger=new be("SupporterHub","black","pink","πŸ›–"),this._form=d.getInstance(),this.shoudRun()&&(this.logger.log("Enabled"),this.watch())}shoudRun(){return"pageJson"in window&&"pageType"in window.pageJson&&"supporterhub"===window.pageJson.pageType}watch(){const e=p.enForm;new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{if("DIV"===e.nodeName){const t=e;(t.classList.contains("en__hubOverlay")||t.classList.contains("en__hubPledge__panels"))&&(this.logger.log("Overlay found"),this.creditCardUpdate(e),this.amountLabelUpdate(e))}}))}))})).observe(e,{childList:!0,subtree:!0});const t=document.querySelector(".en__hubOverlay");t&&(this.creditCardUpdate(t),this.amountLabelUpdate(t))}creditCardUpdate(e){window.setTimeout((()=>{const t=e.querySelector("#en__hubPledge__field--ccnumber"),n=e.querySelector(".en__hubUpdateCC__toggle");t&&n&&t.addEventListener("focus",(()=>{this.logger.log("Credit Card field focused"),n.click()}))}),300)}amountLabelUpdate(e){window.setTimeout((()=>{const t=e.querySelector(".en__field--donationAmt");t&&t.querySelectorAll(".en__field__element--radio .en__field__item").forEach((e=>{e.setAttribute("data-engrid-currency-symbol-updated","true")}))}),300)}}class Je{constructor(){this.logger=new be("FastFormFill","white","magenta","πŸ“Œ"),this.rememberMeEvents=f.getInstance(),p.getOption("RememberMe")?(this.rememberMeEvents.onLoad.subscribe((e=>{this.logger.log("Remember me - onLoad",e),this.run()})),this.rememberMeEvents.onClear.subscribe((()=>{this.logger.log("Remember me - onClear")}))):this.run()}run(){const e=document.querySelector(".en__component--formblock.fast-personal-details");e&&(Je.allMandatoryInputsAreFilled(e)?(this.logger.log("Personal details - All mandatory inputs are filled"),p.setBodyData("hide-fast-personal-details","true")):(this.logger.log("Personal details - Not all mandatory inputs are filled"),p.setBodyData("hide-fast-personal-details","false")));const t=document.querySelector(".en__component--formblock.fast-address-details");t&&(Je.allMandatoryInputsAreFilled(t)?(this.logger.log("Address details - All mandatory inputs are filled"),p.setBodyData("hide-fast-address-details","true")):(this.logger.log("Address details - Not all mandatory inputs are filled"),p.setBodyData("hide-fast-address-details","false")))}static allMandatoryInputsAreFilled(e){return[...e.querySelectorAll(".en__mandatory input, .en__mandatory select, .en__mandatory textarea")].every((e=>{if("radio"===e.type||"checkbox"===e.type){return[...document.querySelectorAll('[name="'+e.name+'"]')].some((e=>e.checked))}return null!==e.value&&""!==e.value.trim()}))}static someMandatoryInputsAreFilled(e){return[...e.querySelectorAll(".en__mandatory input, .en__mandatory select, .en__mandatory textarea")].some((e=>{if("radio"===e.type||"checkbox"===e.type){return[...document.querySelectorAll('[name="'+e.name+'"]')].some((e=>e.checked))}return null!==e.value&&""!==e.value.trim()}))}}class Ke{constructor(){this.logger=new be("SetAttr","black","yellow","πŸ“Œ");const e=document.getElementById("engrid");e&&e.addEventListener("click",(e=>{const t=e.target;if("string"!=typeof t.className)return;t.className.split(" ").some((e=>e.startsWith("setattr--")))&&t.classList.forEach((e=>{const t=e.match(/^setattr--(.+)--(.+)$/i);t&&t[1]&&t[2]&&(this.logger.log(`Clicked element with class "${e}". Setting body attribute "${t[1]}" to "${t[2]}"`),p.setBodyData(t[1].replace("data-engrid-",""),t[2]))}))}))}}class Xe{constructor(){this.logger=new be("ShowIfPresent","yellow","black","πŸ‘€"),this.elements=[],this.shouldRun()&&this.run()}shouldRun(){return this.elements=[...document.querySelectorAll('[class*="engrid__supporterquestions"]')].filter((e=>e.className.split(" ").some((e=>/^engrid__supporterquestions\d+(__supporterquestions\d+)*-(present|absent)$/.test(e))))),this.elements.length>0}run(){const e=[];this.elements.forEach((t=>{const n=t.className.split(" ").find((e=>/^engrid__supporterquestions\d+(__supporterquestions\d+)*-(present|absent)$/.test(e)));if(!n)return null;const i=n.lastIndexOf("-"),s=n.substring(i+1),r=n.substring(8,i).split("__").map((e=>`supporter.questions.${e.substring(18)}`));e.push({class:n,fieldNames:r,type:s})})),e.forEach((e=>{const t=e.fieldNames.map((e=>document.getElementsByName(e)[0])),n=document.querySelectorAll(`.${e.class}`),i=t.every((e=>!!e)),s=t.every((e=>!e));("present"===e.type&&s||"absent"===e.type&&i)&&(this.logger.log(`Conditions not met, hiding elements with class ${e.class}`),n.forEach((e=>{e.style.display="none"})))}))}}class Qe{constructor(){this._form=d.getInstance(),this._enElements=null,this.logger=new be("ENValidators","white","darkolivegreen","🧐"),this.loadValidators()?this.shouldRun()?this._form.onValidate.subscribe(this.enOnValidate.bind(this)):this.logger.log("Not Needed"):this.logger.error("Not Loaded")}loadValidators(){if(!p.checkNested(window.EngagingNetworks,"require","_defined","enValidation","validation","validators"))return!1;const e=window.EngagingNetworks.require._defined.enValidation.validation.validators;return this._enElements=e.reduce(((e,t)=>{if("type"in t&&"CUST"===t.type){const n=document.querySelector(".en__field--"+t.field),i=n?n.querySelector("input, select, textarea"):null;i&&(i.addEventListener("input",this.liveValidate.bind(this,n,i,t.regex,t.message)),e.push({container:n,field:i,regex:t.regex,message:t.message}))}return e}),[]),!0}shouldRun(){return p.getOption("ENValidators")&&this._enElements&&this._enElements.length>0}enOnValidate(){this._enElements&&!1!==this._form.validate&&(this._enElements.forEach((e=>{if(!this.liveValidate(e.container,e.field,e.regex,e.message))return this._form.validate=!1,void e.field.focus()})),this._form.validate=!0)}liveValidate(e,t,n,i){const s=p.getFieldValue(t.getAttribute("name")||"");return""===s||(this.logger.log(`Live Validate ${t.getAttribute("name")} with ${n}`),s.match(n)?(p.removeError(e),!0):(p.setError(e,i),!1))}}class Ze{constructor(){var e,t;this.postalCodeField=p.getField("supporter.postcode"),this._form=d.getInstance(),this.logger=new be("Postal Code Validator","white","red","πŸ“¬"),this.supportedSeparators=["+","-"," "],this.separator=this.getSeparator(),this.regexSeparator=this.getRegexSeparator(this.separator),this.shouldRun()&&(null===(e=this.postalCodeField)||void 0===e||e.addEventListener("blur",(()=>this.validate())),null===(t=this.postalCodeField)||void 0===t||t.addEventListener("input",(()=>this.liveValidate())),this._form.onValidate.subscribe((()=>{if(!this._form.validate)return;this.liveValidate(),setTimeout((()=>{this.validate()}),100);const e=!this.shouldValidateUSZipCode()||this.isValidUSZipCode();return this._form.validate=e,e||(this.logger.log(`Invalid Zip Code ${this.postalCodeField.value}`),this.postalCodeField.scrollIntoView({behavior:"smooth"})),e})))}shouldRun(){return!(!p.getOption("PostalCodeValidator")||!this.postalCodeField)}validate(){this.shouldValidateUSZipCode()&&!this.isValidUSZipCode()?p.setError(".en__field--postcode",`Please enter a valid ZIP Code of ##### or #####${this.separator}####`):p.removeError(".en__field--postcode")}isValidUSZipCode(){var e,t;if(!!!document.querySelector(".en__field--postcode.en__mandatory")&&""===(null===(e=this.postalCodeField)||void 0===e?void 0:e.value))return!0;const n=new RegExp(`^\\d{5}(${this.regexSeparator}\\d{4})?$`);return!!(null===(t=this.postalCodeField)||void 0===t?void 0:t.value.match(n))}liveValidate(){var e;if(!this.shouldValidateUSZipCode())return;let t=null===(e=this.postalCodeField)||void 0===e?void 0:e.value;t.length<=5?t=t.replace(/\D/g,""):6===t.length&&this.supportedSeparators.includes(t[5])?t=t.replace(/\D/g,"")+this.separator:(t=t.replace(/\D/g,""),t=t.replace(/(\d{5})(\d)/,`$1${this.separator}$2`)),this.postalCodeField.value=t.slice(0,10)}shouldValidateUSZipCode(){const e=p.getField("supporter.country")?p.getFieldValue("supporter.country"):"US";return["us","united states","usa",""].includes(e.toLowerCase())}getSeparator(){const e=p.getOption("TidyContact");return e&&e.us_zip_divider&&this.supportedSeparators.includes(e.us_zip_divider)?e.us_zip_divider:"-"}getRegexSeparator(e){switch(e){case"+":return"\\+";case"-":return"-";case" ":return"\\s";default:return this.logger.log(`Invalid separator "${e}" provided to PostalCodeValidator, falling back to "-".`),"-"}}}class et{constructor(){this.logger=new be("VGS","black","pink","πŸ’³"),this.vgsField=document.querySelector(".en__field--vgs"),this.options=p.getOption("VGS"),this.paymentTypeField=document.querySelector("#en__field_transaction_paymenttype"),this._form=d.getInstance(),this.shouldRun()&&(this.setPaymentType(),this.setDefaults(),this.dumpGlobalVar(),this._form.onValidate.subscribe((()=>{if(this._form.validate){const e=this.validate();this.logger.log(`Form Validation: ${e}`),this._form.validate=e}})))}shouldRun(){return!!this.vgsField}setDefaults(){const e=getComputedStyle(document.body),t={fontFamily:e.getPropertyValue("--input_font-family")||"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",fontSize:e.getPropertyValue("--input_font-size")||"16px",color:e.getPropertyValue("--input_color")||"#000",padding:e.getPropertyValue("--input_padding")||"10px","&::placeholder":{color:e.getPropertyValue("--input_placeholder-color")||"#a9a9a9",opacity:e.getPropertyValue("--input_placeholder-opacity")||"1",fontWeight:e.getPropertyValue("--input_placeholder-font-weight")||"normal"}},n=this.options,i={"transaction.ccnumber":{showCardIcon:!0,placeholder:"β€’β€’β€’β€’ β€’β€’β€’β€’ β€’β€’β€’β€’ β€’β€’β€’β€’",icons:{cardPlaceholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAABMCAYAAADHl1ErAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB8ElEQVR4nO2c4W3CMBBGz1H/NyNkAzoCo2SDrkI3YJSOABt0g9IJXBnOqUkMyifUqkrek04RlvMjT2c7sc6EGKPBfBpcaSBMBGEiCBNBmAjCRBAmgjARhIkgTARhIggTQZhK2q0Yh5l1ZrYzs0PqsrI4+LN3VTeThkvntUm6Fbuxn2E/LITQmtm7mW08Sb/MbO9tpxhjui6WEMLWzJKDdO3N7Nmf9ZjaYoyn8y8X1o6GXxLV1lJyDeE+9oWPQ/ZRG4b9WkVVpqe+8LLLo7ErM6t248qllZnWBc+uV5+zumGsQjm3f/ic9tb4JGeeXcga4U723rptilVx0avgg2Q3m/JNn+y6zeAm+GSWUi/c7L5yfB77RJhACOHs6WnuLfmGpTI3YditEEGYCMJEECaCMJHZqySvHRfIMBGEiSBMBGEiCBNBmAjCRBAmgjARhIkgTGT2t+R/59EdYXZcfwmEiSBMBGEiCBNZzCr5VzvCZJjIIMxrPKFC6abMsHbaFcZuGq8StqKwDqZkN8emKBbrvawHCtxJ7y1nVxQF34lxUXBupOy8EtWy88jBhknUDjbkPhyd+Xn2l9lHZ8rgcNZVTA5nTYRFjv/dPf7HvzuJ8C0pgjARhIkgTARhIggTQZgIwkQQJoIwEYSJIEwEYQpm9g2Ro5zhLcuLBwAAAABJRU5ErkJggg=="},css:t,autoComplete:"cc-number",validations:["required","validCardNumber"]},"transaction.ccvv":{showCardIcon:!1,placeholder:"CVV",hideValue:!1,autoComplete:"cc-csc",validations:["required","validCardSecurityCode"],css:t}};this.options=p.deepMerge(i,n),this.logger.log("Theme Options",n),this.logger.log("Merged Options",this.options)}setPaymentType(){if(this.paymentTypeField)for(let e=0;e<this.paymentTypeField.options.length;e++)if("visa"===this.paymentTypeField.options[e].value.toLowerCase()||"vi"===this.paymentTypeField.options[e].value.toLowerCase()){this.paymentTypeField.selectedIndex=e;break}}dumpGlobalVar(){window.enVGSFields=this.options,window.setTimeout((()=>{const e=document.querySelectorAll(".en__field__input--vgs");if(e.length>0){const t=new MutationObserver((e=>{e.forEach((e=>{var t;if("childList"===e.type&&e.addedNodes.length>0&&e.addedNodes.forEach((t=>{"IFRAME"===t.nodeName&&e.previousSibling&&"IFRAME"===e.previousSibling.nodeName&&e.previousSibling.remove()})),"attributes"===e.type&&"class"===e.attributeName){const n=e.target;if(n.classList.contains("vgs-collect-container__valid")){const e=n.closest(".en__field--vgs");null==e||e.classList.remove("en__field--validationFailed"),null===(t=null==e?void 0:e.querySelector(".en__field__error"))||void 0===t||t.remove()}}}))}));e.forEach((e=>{t.observe(e,{childList:!0,attributeFilter:["class"]})})),p.checkNested(window.EngagingNetworks,"require","_defined","enjs","vgs")?window.EngagingNetworks.require._defined.enjs.vgs.init():this.logger.log("VGS is not defined")}}),1e3)}validate(){if("visa"===this.paymentTypeField.value.toLowerCase()||"vi"===this.paymentTypeField.value.toLowerCase()){const e=document.querySelector(".en__field--vgs.en__field--ccnumber"),t=e.querySelector(".vgs-collect-container__empty"),n=document.querySelector(".en__field--vgs.en__field--ccvv"),i=n.querySelector(".vgs-collect-container__empty");if(e&&t)return window.setTimeout((()=>{p.setError(e,"Please enter a valid card number"),e.scrollIntoView({behavior:"smooth"})}),100),!1;if(n&&i)return window.setTimeout((()=>{p.setError(n,"Please enter a valid CVV"),n.scrollIntoView({behavior:"smooth"})}),100),!1}return!0}}class tt{constructor(){this.logger=new be("CountryRedirect","white","brown","πŸ›«"),this._country=b.getInstance(),this.shouldRun()&&(this._country.onCountryChange.subscribe((e=>{this.checkRedirect(e)})),this.checkRedirect(this._country.country))}shouldRun(){return!(!p.getOption("CountryRedirect")||!this._country.countryField)}checkRedirect(e){const t=p.getOption("CountryRedirect");if(t&&e in t&&!1===window.location.href.includes(t[e])){this.logger.log(`${e}: Redirecting to ${t[e]}`);let n=new URL(t[e]);n.search.includes("chain")||(n.search+=(n.search?"&":"?")+"chain"),window.location.href=n.href}}}class nt{constructor(){var e;this.supporterDetails={},this.options=null!==(e=p.getOption("WelcomeBack"))&&void 0!==e&&e,this.shouldRun()&&(this.supporterDetails={firstName:p.getFieldValue("supporter.firstName"),lastName:p.getFieldValue("supporter.lastName"),emailAddress:p.getFieldValue("supporter.emailAddress"),address1:p.getFieldValue("supporter.address1"),address2:p.getFieldValue("supporter.address2"),city:p.getFieldValue("supporter.city"),region:p.getFieldValue("supporter.region"),postcode:p.getFieldValue("supporter.postcode"),country:p.getFieldValue("supporter.country")},this.addWelcomeBack(),this.addPersonalDetailsSummary(),this.addEventListeners())}shouldRun(){return!!document.querySelector(".fast-personal-details")&&!1!==this.options}addWelcomeBack(){var e;if("object"!=typeof this.options||!this.options.welcomeBackMessage.display)return;const t=this.options.welcomeBackMessage,n=document.createElement("div");n.classList.add("engrid-welcome-back","showif-fast-personal-details");const i=t.title.replace("{firstName}",this.supporterDetails.firstName);n.innerHTML=`<p>\n ${i}\n <span class="engrid-reset-welcome-back">${t.editText}</span>\n </p>`,null===(e=document.querySelector(t.anchor))||void 0===e||e.insertAdjacentElement(t.placement,n)}resetWelcomeBack(){var e;document.querySelectorAll(".fast-personal-details .en__field__input").forEach((e=>{"checkbox"===e.type||"radio"===e.type?e.checked=!1:e.value=""})),this.supporterDetails={},p.setBodyData("hide-fast-personal-details",!1),ie("engrid-autofill","",Object.assign(Object.assign({},e),{expires:-1}))}addPersonalDetailsSummary(){var e;if("object"!=typeof this.options||!this.options.personalDetailsSummary.display)return;let t=this.options.personalDetailsSummary;const n=document.createElement("div");n.classList.add("engrid-personal-details-summary","showif-fast-personal-details"),n.innerHTML=`<h3>${t.title}</h3>`,n.insertAdjacentHTML("beforeend",`\n <p>\n ${this.supporterDetails.firstName} ${this.supporterDetails.lastName}\n <br>\n ${this.supporterDetails.emailAddress}\n </p>\n `),this.supporterDetails.address1&&this.supporterDetails.city&&this.supporterDetails.region&&this.supporterDetails.postcode&&n.insertAdjacentHTML("beforeend",`\n <p>\n ${this.supporterDetails.address1} ${this.supporterDetails.address2}\n <br>\n ${this.supporterDetails.city}, ${this.supporterDetails.region} \n ${this.supporterDetails.postcode}\n </p>\n `),n.insertAdjacentHTML("beforeend",`\n <p class="engrid-welcome-back-clear setattr--data-engrid-hide-fast-personal-details--false">${t.editText}<svg viewbox="0 0 528.899 528.899" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M328.883,89.125l107.59,107.589l-272.34,272.34L56.604,361.465L328.883,89.125z M518.113,63.177l-47.981-47.981 c-18.543-18.543-48.653-18.543-67.259,0l-45.961,45.961l107.59,107.59l53.611-53.611 C532.495,100.753,532.495,77.559,518.113,63.177z M0.3,512.69c-1.958,8.812,5.998,16.708,14.811,14.565l119.891-29.069 L27.473,390.597L0.3,512.69z"></path></g></svg></p>\n `),null===(e=document.querySelector(t.anchor))||void 0===e||e.insertAdjacentElement(t.placement,n)}addEventListeners(){document.querySelectorAll(".engrid-reset-welcome-back").forEach((e=>{e.addEventListener("click",(()=>{this.resetWelcomeBack()}))}))}}const it={targetName:"",targetEmail:"",hideSendDate:!0,hideTarget:!0,hideMessage:!0,addSupporterNameToMessage:!1};class st{constructor(){this.options=it,this.logger=new be("EcardToTarget","DarkBlue","Azure","πŸ“§"),this._form=d.getInstance(),this.supporterNameAddedToMessage=!1,this.shouldRun()&&(this.options=Object.assign(Object.assign({},this.options),window.EngridEcardToTarget),this.logger.log("EcardToTarget running. Options:",this.options),this.setTarget(),this.hideElements(),this.addSupporterNameToMessage())}shouldRun(){return window.hasOwnProperty("EngridEcardToTarget")&&"object"==typeof window.EngridEcardToTarget&&window.EngridEcardToTarget.hasOwnProperty("targetName")&&window.EngridEcardToTarget.hasOwnProperty("targetEmail")}setTarget(){const e=document.querySelector(".en__ecardrecipients__name input"),t=document.querySelector(".en__ecardrecipients__email input"),n=document.querySelector(".en__ecarditems__addrecipient");e&&t&&n?(e.value=this.options.targetName,t.value=this.options.targetEmail,null==n||n.click(),this.logger.log("Added recipient",this.options.targetName,this.options.targetEmail)):this.logger.error("Could not add recipient. Required elements not found.")}hideElements(){const e=document.querySelector(".en__ecardmessage"),t=document.querySelector(".en__ecardrecipients__futureDelivery"),n=document.querySelector(".en__ecardrecipients");this.options.hideMessage&&e&&e.classList.add("hide"),this.options.hideSendDate&&t&&t.classList.add("hide"),this.options.hideTarget&&n&&n.classList.add("hide")}addSupporterNameToMessage(){this.options.addSupporterNameToMessage&&this._form.onSubmit.subscribe((()=>{if(this._form.submit&&!this.supporterNameAddedToMessage){this.supporterNameAddedToMessage=!0;const e=`${p.getFieldValue("supporter.firstName")} ${p.getFieldValue("supporter.lastName")}`,t=document.querySelector("[name='transaction.comments']");if(!t)return;t.value=`${t.value}\n${e}`,this.logger.log("Added supporter name to personalized message",e)}}))}}const rt="0.17.20";var ot=n(523),at=n.n(ot);/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&(window.__forceSmoothScrollPolyfill__=!0),at().polyfill();class lt{constructor(e,t){if(!this.isIframe())return;if(this.amount=e,this.frequency=t,this.ipCountry="",this.isDonation=["donation","premiumgift"].includes(window.pageJson.pageType),console.log("DonationLightboxForm: constructor"),this.sections=document.querySelectorAll("form.en__component > .en__component"),pageJson.pageNumber===pageJson.pageCount){this.sendMessage("status","loaded"),this.isDonation&&this.sendMessage("status","celebrate"),this.sendMessage("class","thank-you"),document.querySelector("body").dataset.thankYou="true";const e=new URLSearchParams(window.location.search);if(e.get("name")){let t=document.querySelector("#engrid");if(t){let n=t.innerHTML;n=n.replace("{user_data~First Name}",e.get("name")),n=n.replace("{receipt_data~recurringFrequency}",e.get("frequency")),n=n.replace("{receipt_data~amount}","$"+e.get("amount")),t.innerHTML=n,this.sendMessage("firstname",e.get("name"))}}else{const e=this,t=location.protocol+"//"+location.host+location.pathname+"/pagedata";fetch(t).then((function(e){return e.json()})).then((function(t){t.hasOwnProperty("firstName")&&null!==t.firstName?e.sendMessage("firstname",t.firstName):e.sendMessage("firstname","Friend")})).catch((e=>{console.error("PageData Error:",e)}))}return!1}if(!this.sections.length)return this.sendMessage("error","No sections found"),!1;if(console.log(this.sections),this.isIframe()){if(this.buildSectionNavigation(),this.checkNested(EngagingNetworks,"require","_defined","enjs","checkSubmissionFailed")&&EngagingNetworks.require._defined.enjs.checkSubmissionFailed()&&(console.log("DonationLightboxForm: Submission Failed"),this.validateForm())){const e=document.querySelector("li.en__error");e&&(e.innerHTML.toLowerCase().indexOf("problem processing")>-1?(this.sendMessage("error","Sorry! There's a problem processing your donation."),this.scrollToElement(document.querySelector(".en__field--ccnumber"))):this.sendMessage("error",e.textContent),(e.innerHTML.toLowerCase().indexOf("payment")>-1||e.innerHTML.toLowerCase().indexOf("account")>-1)&&this.scrollToElement(document.querySelector(".en__field--ccnumber")))}document.querySelectorAll("form.en__component input.en__field__input").forEach((e=>{e.addEventListener("focus",(t=>{const n=this.getSectionId(e);setTimeout((()=>{n>0&&this.validateForm(n-1)&&this.scrollToElement(e)}),50)}))}))}let n=document.querySelector(".payment-options");n&&this.clickPaymentOptions(n),this.addTabIndexToLabels(),t.getInstance().onFrequencyChange.subscribe((()=>this.changeSubmitButton())),e.getInstance().onAmountChange.subscribe((()=>this.changeSubmitButton())),this.changeSubmitButton(),this.sendMessage("status","loaded");const i=new URLSearchParams(window.location.search);i.get("color")&&document.body.style.setProperty("--color_primary",i.get("color")),fetch("https://www.cloudflare.com/cdn-cgi/trace").then((e=>e.text())).then((e=>{let t=e.replace(/[\r\n]+/g,'","').replace(/\=+/g,'":"');t='{"'+t.slice(0,t.lastIndexOf('","'))+'"}';const n=JSON.parse(t);this.ipCountry=n.loc,this.canadaOnly(),console.log("Country:",this.ipCountry)}));const s=document.querySelector("#en__field_supporter_country");s&&s.addEventListener("change",(e=>{this.canadaOnly()}))}sendMessage(e,t){const n={key:e,value:t};window.parent.postMessage(n,"*")}isIframe(){return window.self!==window.top}buildSectionNavigation(){console.log("DonationLightboxForm: buildSectionNavigation"),this.sections.forEach(((e,t)=>{var n,i,s;e.dataset.sectionId=t;const r=document.createElement("div");r.classList.add("section-navigation");const o=document.createElement("div");o.classList.add("section-count");const a=this.sections.length;if(a>1)0==t?r.innerHTML=`\n <button class="section-navigation__next" data-section-id="${t}">\n <span>Let’s Do It!</span>\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="currentColor" d="M7.687 13.313c-.38.38-.995.38-1.374 0-.38-.38-.38-.996 0-1.375L10 8.25H1.1c-.608 0-1.1-.493-1.1-1.1 0-.608.492-1.1 1.1-1.1h9.2L6.313 2.062c-.38-.38-.38-.995 0-1.375s.995-.38 1.374 0L14 7l-6.313 6.313z"/>\n </svg>\n </button>\n `:t==this.sections.length-1?r.innerHTML=`\n <button class="section-navigation__previous" data-section-id="${t}">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <path fill="currentColor" d="M7.214.786c.434-.434 1.138-.434 1.572 0 .433.434.433 1.137 0 1.571L4.57 6.572h10.172c.694 0 1.257.563 1.257 1.257s-.563 1.257-1.257 1.257H4.229l4.557 4.557c.433.434.433 1.137 0 1.571-.434.434-1.138.434-1.572 0L0 8 7.214.786z"/>\n </svg>\n </button>\n <button class="section-navigation__submit" data-section-id="${t}" type="submit" data-label="Give $AMOUNT$FREQUENCY">\n <span>Give Now</span>\n </button>\n `:r.innerHTML=`\n <button class="section-navigation__previous" data-section-id="${t}">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <path fill="currentColor" d="M7.214.786c.434-.434 1.138-.434 1.572 0 .433.434.433 1.137 0 1.571L4.57 6.572h10.172c.694 0 1.257.563 1.257 1.257s-.563 1.257-1.257 1.257H4.229l4.557 4.557c.433.434.433 1.137 0 1.571-.434.434-1.138.434-1.572 0L0 8 7.214.786z"/>\n </svg>\n </button>\n <button class="section-navigation__next" data-section-id="${t}">\n <span>Continue</span>\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="currentColor" d="M7.687 13.313c-.38.38-.995.38-1.374 0-.38-.38-.38-.996 0-1.375L10 8.25H1.1c-.608 0-1.1-.493-1.1-1.1 0-.608.492-1.1 1.1-1.1h9.2L6.313 2.062c-.38-.38-.38-.995 0-1.375s.995-.38 1.374 0L14 7l-6.313 6.313z"/>\n </svg>\n </button>\n `,o.innerHTML=`\n <span class="section-count__current">${t+1}</span> of\n <span class="section-count__total">${a}</span>\n `;else{var l;const e=(null===(l=document.querySelector(".en__submit button"))||void 0===l?void 0:l.innerText)||"Submit";r.innerHTML=`\n <button class="section-navigation__submit" data-section-id="${t}" type="submit" data-label="${e}">\n <span>${e}</span>\n </button>\n `}null===(n=r.querySelector(".section-navigation__previous"))||void 0===n||n.addEventListener("click",(e=>{e.preventDefault(),this.scrollToSection(t-1)})),null===(i=r.querySelector(".section-navigation__next"))||void 0===i||i.addEventListener("click",(e=>{e.preventDefault(),this.validateForm(t)&&this.scrollToSection(t+1)})),null===(s=r.querySelector(".section-navigation__submit"))||void 0===s||s.addEventListener("click",(e=>{if(e.preventDefault(),this.validateForm())if(this.isDonation){this.sendMessage("donationinfo",JSON.stringify({name:document.querySelector("#en__field_supporter_firstName").value,amount:EngagingNetworks.require._defined.enjs.getDonationTotal(),frequency:this.frequency.getInstance().frequency}));if("paypal"!=document.querySelector("#en__field_transaction_paymenttype").value)this.sendMessage("status","loading");else{const e=this;document.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState?e.sendMessage("status","submitted"):e.sendMessage("status","loading")})),document.querySelector("form.en__component").target="_blank"}document.querySelector("form.en__component").submit()}else this.sendMessage("status","loading"),document.querySelector("form.en__component").submit()})),e.querySelector(".en__component").append(r),e.querySelector(".en__component").append(o)}))}scrollToSection(e){console.log("DonationLightboxForm: scrollToSection",e);const t=document.querySelector(`[data-section-id="${e}"]`);this.sections[e]&&(console.log(t),this.sections[e].scrollIntoView({behavior:"smooth"}))}scrollToElement(e){if(e){const t=this.getSectionId(e);t&&this.scrollToSection(t)}}getSectionId(e){return!!e&&e.closest("[data-section-id]").dataset.sectionId}validateForm(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=document.querySelector("form.en__component"),n=t.querySelector("[name='transaction.recurrfreq']:checked"),i=t.querySelector(".en__field--recurrfreq"),s=this.getSectionId(i);if(this.isDonation){if(!1===e||e==s){if(!n||!n.value)return this.scrollToElement(t.querySelector("[name='transaction.recurrfreq']:checked")),this.sendMessage("error","Please select a frequency"),i&&i.classList.add("has-error"),!1;i&&i.classList.remove("has-error")}const r=EngagingNetworks.require._defined.enjs.getDonationTotal(),o=t.querySelector(".en__field--donationAmt"),a=this.getSectionId(o);if(!1===e||e==a){if(!r||r<=0)return this.scrollToElement(o),this.sendMessage("error","Please enter a valid amount"),o&&o.classList.add("has-error"),!1;if(r<5)return this.sendMessage("error","Amount must be at least $5 - Contact us for assistance"),o&&o.classList.add("has-error"),!1;if(r>3e4)return this.sendMessage("error","Amount must be less than $30,000 - Contact us for assistance"),o&&o.classList.add("has-error"),!1;o&&o.classList.remove("has-error")}const l=t.querySelector("#en__field_transaction_paymenttype"),c=t.querySelector("#en__field_transaction_ccnumber"),u=t.querySelector(".en__field--ccnumber"),d=this.getSectionId(u);if(console.log("DonationLightboxForm: validateForm",u,d),!1===e||e==d){if(!l||!l.value)return this.scrollToElement(l),this.sendMessage("error","Please add your credit card information"),u&&u.classList.add("has-error"),!1;if("paypal"!==l.value){if(!c||!c.value)return this.scrollToElement(c),this.sendMessage("error","Please add your credit card information"),u&&u.classList.add("has-error"),!1;if(u&&u.classList.remove("has-error"),!1===/^\d+$/.test(c.value))return this.scrollToElement(c),this.sendMessage("error","Only numbers are allowed on credit card"),u&&u.classList.add("has-error"),!1;u&&u.classList.remove("has-error");const e=t.querySelectorAll("[name='transaction.ccexpire']"),n=t.querySelector(".en__field--ccexpire");let i=!0;if(e.forEach((e=>{if(!e.value)return this.scrollToElement(n),this.sendMessage("error","Please enter a valid expiration date"),n&&n.classList.add("has-error"),i=!1,!1})),!i&&n)return!1;n&&n.classList.remove("has-error");const s=t.querySelector("#en__field_transaction_ccvv"),r=t.querySelector(".en__field--ccvv");if(!s||!s.value)return this.scrollToElement(s),this.sendMessage("error","Please enter a valid CVV"),r&&r.classList.add("has-error"),!1;r&&r.classList.remove("has-error")}}}const r=t.querySelectorAll(".en__mandatory");let o=!1;if(r.forEach((t=>{if(o)return;const n=t.querySelector(".en__field__input"),i=t.querySelector(".en__field__label"),s=this.getSectionId(n);if(!1===e||e==s){if(!n.value)return this.scrollToElement(n),this.sendMessage("error","Please enter "+i.textContent),t.classList.add("has-error"),o=!0,!1;if(t.classList.remove("has-error"),"supporter.emailAddress"===n.name&&!1===/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.value))return this.scrollToElement(n),this.sendMessage("error","Please enter a valid email address"),t.classList.add("has-error"),o=!0,!1}})),o)return!1;const a=t.querySelector("#en__field_supporter_city"),l=t.querySelector(".en__field--city");if(!this.checkCharsLimit("#en__field_supporter_city",100))return this.scrollToElement(a),this.sendMessage("error","This field only allows up to 100 characters"),l&&l.classList.add("has-error"),!1;l&&l.classList.remove("has-error");const c=t.querySelector("#en__field_supporter_address1"),u=t.querySelector(".en__field--address1");if(!this.checkCharsLimit("#en__field_supporter_address1",35))return this.scrollToElement(c),this.sendMessage("error","This field only allows up to 35 characters. Longer street addresses can be broken up between Lines 1 and 2."),u&&u.classList.add("has-error"),!1;u&&u.classList.remove("has-error");const d=t.querySelector("#en__field_supporter_address2"),h=t.querySelector(".en__field--address2");if(!this.checkCharsLimit("#en__field_supporter_address2",35))return this.scrollToElement(d),this.sendMessage("error","This field only allows up to 35 characters. Longer street addresses can be broken up between Lines 1 and 2."),h&&h.classList.add("has-error"),!1;h&&h.classList.remove("has-error");const p=t.querySelector("#en__field_supporter_postcode"),g=t.querySelector(".en__field--postcode");if(!this.checkCharsLimit("#en__field_supporter_postcode",20))return this.scrollToElement(p),this.sendMessage("error","This field only allows up to 20 characters"),g&&g.classList.add("has-error"),!1;g&&g.classList.remove("has-error");const m=t.querySelector("#en__field_supporter_firstName"),f=t.querySelector(".en__field--firstName");if(!this.checkCharsLimit("#en__field_supporter_firstName",100))return this.scrollToElement(m),this.sendMessage("error","This field only allows up to 100 characters"),f&&f.classList.add("has-error"),!1;f&&f.classList.remove("has-error");const b=t.querySelector("#en__field_supporter_lastName"),v=t.querySelector(".en__field--lastName");return this.checkCharsLimit("#en__field_supporter_lastName",100)?(v&&v.classList.remove("has-error"),console.log("DonationLightboxForm: validateForm PASSED"),!0):(this.scrollToElement(b),this.sendMessage("error","This field only allows up to 100 characters"),v&&v.classList.add("has-error"),!1)}checkCharsLimit(e,t){const n=document.querySelector(e);return!(n&&n.value.length>t)}changeSubmitButton(){const e=document.querySelector(".section-navigation__submit"),t=this.checkNested(window.EngagingNetworks,"require","_defined","enjs","getDonationTotal")?"$"+window.EngagingNetworks.require._defined.enjs.getDonationTotal():null;let n=this.frequency.getInstance().frequency,i=e?e.dataset.label:"";n="onetime"===n?"":"<small>/mo</small>",t?(i=i.replace("$AMOUNT",t),i=i.replace("$FREQUENCY",n)):(i=i.replace("$AMOUNT",""),i=i.replace("$FREQUENCY","")),e&&i&&(e.innerHTML=`<span>${i}</span>`)}clickPaymentOptions(e){e.querySelectorAll("button").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const n=document.querySelector("#en__field_transaction_paymenttype");n&&(n.value=e.className.substr(15),this.scrollToSection(parseInt(e.closest("[data-section-id]").dataset.sectionId)+1))}))}))}isCanada(){const e=document.querySelector("#en__field_supporter_country");if(e&&"CA"===e.value)return!0;return"en-CA"===(window.navigator.userLanguage||window.navigator.language)||"CA"===this.ipCountry}canadaOnly(){const e=document.querySelectorAll(".canada-only");e.length&&(this.isCanada()?e.forEach((e=>{e.style.display="";const t=e.querySelectorAll("input[type='checkbox']");t.length&&t.forEach((e=>{e.checked=!1}))})):e.forEach((e=>{e.style.display="none";const t=e.querySelectorAll("input[type='checkbox']");t.length&&t.forEach((e=>{e.checked=!0}))})))}checkNested(e,t){if(void 0===e)return!1;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return!(0!=i.length||!e.hasOwnProperty(t))||this.checkNested(e[t],...i)}addTabIndexToLabels(){document.querySelectorAll(".en__field__label.en__field__label--item").forEach((e=>{e.tabIndex=0}))}}const ct={applePay:!1,CapitalizeFields:!0,ClickToExpand:!0,CurrencySymbol:"$",CurrencyCode:"USD",DecimalSeparator:".",ThousandsSeparator:",",MinAmount:5,MaxAmount:1e5,MinAmountMessage:"Amount must be at least $5 - Contact us for assistance",MaxAmountMessage:"Amount must be less than $100,000 - Contact us for assistance",MediaAttribution:!0,SkipToMainContentLink:!0,SrcDefer:!0,ProgressBar:!0,TidyContact:{cid:"659b7129-73d0-4601-af4c-8942c4730f65",us_zip_divider:"+",record_field:"supporter.NOT_TAGGED_41",date_field:"supporter.NOT_TAGGED_39",status_field:"supporter.NOT_TAGGED_40",countries:["us"],phone_enable:!0,phone_preferred_countries:["us","ca","gb","jp","au"],phone_record_field:"supporter.NOT_TAGGED_45",phone_date_field:"supporter.NOT_TAGGED_44",phone_status_field:"supporter.NOT_TAGGED_43"},RememberMe:{checked:!0,remoteUrl:"https://www.ran.org/wp-content/themes/ran-2020/data-remember.html",fieldOptInSelectorTarget:"div.en__field--postcode, div.en__field--telephone, div.en__field--email, div.en__field--lastName",fieldOptInSelectorTargetLocation:"after",fieldClearSelectorTarget:"div.en__field--firstName div, div.en__field--email div",fieldClearSelectorTargetLocation:"after",fieldNames:["supporter.firstName","supporter.lastName","supporter.address1","supporter.address2","supporter.city","supporter.country","supporter.region","supporter.postcode","supporter.emailAddress"]},Plaid:!0,Debug:"true"==v.getUrlParameter("debug"),onLoad:()=>{window.DonationLightboxForm=lt,new lt(h,g),function(e,t){if(e.log("ENGrid client scripts are executing"),e.getPageNumber()===e.getPageCount()||document.referrer.includes("act.ran.org")){const e=document.createElement("iframe");e.src="https://act.ran.org/page/51899/data/1?chain",e.style.width="0",e.style.height="0",e.style.visibility="hidden",e.style.display="none",e.width="0",e.height="0",e.name="cohortIframe",e.visibility="hidden";const t=document.querySelector("#endgrid, form");t&&t.appendChild(e)}let n=document.querySelectorAll(".radio-to-buttons_donationAmt .en__field--radio.en__field--donationAmt .en__field__input--other")[0];n&&(n.placeholder="Custom Amount");let i=document.querySelectorAll("input#en__field_supporter_phoneNumber")[0];i&&(i.placeholder="000-000-0000 (optional)");const s=e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),r=document.querySelectorAll("[name='transaction.recurrfreq']"),o=document.querySelector("[name='transaction.paycurrency']"),a=document.querySelectorAll(".give-by-select .en__field__item");r&&o&&a&&[...r,o].forEach((t=>{t.addEventListener("change",(()=>{e.log("CHANGING"),window.setTimeout((()=>{const t=document.querySelector("[name='transaction.giveBySelect']:checked");if(t){const n=t.closest(".en__field__item");s(n)||[...a].every((t=>{if(s(t))return e.log(`Clicking on ${t.querySelector("label").innerText}`),t.querySelector("label").click(),!1}))}}),500)}))}));const l=document.querySelector(".media-with-attribution figattribution");if(l){const e=l._tippy;e&&e.setProps({allowHTML:!0,theme:"RAN",placement:"right-end"})}document.body.removeAttribute("data-engrid-errors");const c=document.querySelector('[name="transaction.paymenttype"] [value="ACH"]');c&&(c.value="ach");const u=document.querySelector(".en__submit");if(u&&u.classList.add("hideif-stripedigitalwallet-selected","hideif-paypaltouch-selected"),"UNSUBSCRIBE"===e.getPageType()){const n=document.querySelector(".en__submit button"),i=e.getField("supporter.questions.341509"),s=e.getField("supporter.questions.102600"),r=e.getFieldValue("supporter.emailAddress");if(r){e.getField("supporter.emailAddress").setAttribute("readonly","true");const t=document.createElement("a");t.href=window.location.href.split("?")[0]+"?redirect=cold",t.innerText=`Not ${r}?`,e.addHtml(t,".en__field--emailAddress","beforeend")}const o=document.querySelector(".fewer-emails-block");i&&i.checked&&o&&(o.style.display="none");const a=document.querySelector(".fewer-emails-block button");a&&a.addEventListener("click",(()=>{i.checked=!0,s.checked=!1,e.enParseDependencies(),n.click()}));const l=document.querySelector(".sub-emails-block button");l&&l.addEventListener("click",(()=>{i.checked=!1,s.checked=!0,e.enParseDependencies(),n.click()}));const c=document.querySelector(".unsub-emails-block button");if(c&&c.addEventListener("click",(()=>{i.checked=!1,s.checked=!1,e.enParseDependencies(),n.click()})),t.getInstance().onSubmit.subscribe((()=>{s.checked||sessionStorage.setItem("unsub_details",JSON.stringify({email:e.getFieldValue("supporter.emailAddress")}))})),2===e.getPageNumber()){const t=JSON.parse(sessionStorage.getItem("unsub_details"));if(t){e.setBodyData("recent-unsubscribe","true");const n=document.querySelector(".resubscribe-block a.button");n&&(n.href=n.href+`?supporter.emailAddress=${t.email}&autosubmit=Y&engrid_hide[engrid]=id`),sessionStorage.removeItem("unsub_details")}}}const d=document.querySelector("button.en__ecarditems__button.en__ecarditems__addrecipient");d&&(d.innerHTML="Add Recipient")}(v,d)},onResize:()=>console.log("Starter Theme Window Resized"),onValidate:()=>{const e=v.getFieldValue("supporter.country");["us","usa","united states","ca","canada"].includes(e.toLowerCase())||(v.setFieldValue("supporter.region",""),v.log("Region field cleared"))}};new v(ct)})()})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e514fc0..406db8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,9 +48,9 @@ } }, "node_modules/@4site/engrid-common": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@4site/engrid-common/-/engrid-common-0.17.18.tgz", - "integrity": "sha512-e6HU26K4BXf4gtMur6/JzbMGsCpzSpm1vo8vRp0MzT8wHRyJztoMQAQAHolwPHtLwlVrbK08W6tf73V2V1L7pA==", + "version": "0.17.20", + "resolved": "https://registry.npmjs.org/@4site/engrid-common/-/engrid-common-0.17.20.tgz", + "integrity": "sha512-tTu0IK8cqrhkYlcpHhFqgdZoikNUaRp51Xh8jrdWtxvF93eo3Zy2u47giyDMOsBWVW514xHWLyuSEdBGEQfBDg==", "dev": true, "dependencies": { "shuffle-seed": "^1.1.6", @@ -121,9 +121,9 @@ } }, "node_modules/@4site/engrid-styles": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@4site/engrid-styles/-/engrid-styles-0.17.16.tgz", - "integrity": "sha512-uFL/R/Stj/jZ6wWISzivc2w8ION/ZsGoYBOeTWVnck1tYuxG6S6aCq7bMY2qyTrlTdzVasDh4TF1ZmIWKZsshQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@4site/engrid-styles/-/engrid-styles-0.17.19.tgz", + "integrity": "sha512-VBv3SAvarTF5sfefZgLKdAojd5UkdLMEnUbKxukH6aO/5Gkd5OVym8RvHjcGUzz74BuRRtlzix/cMLcrT1CA4g==", "dev": true, "dependencies": { "sanitize.css": "^11.0.1", @@ -7779,9 +7779,9 @@ }, "dependencies": { "@4site/engrid-common": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@4site/engrid-common/-/engrid-common-0.17.18.tgz", - "integrity": "sha512-e6HU26K4BXf4gtMur6/JzbMGsCpzSpm1vo8vRp0MzT8wHRyJztoMQAQAHolwPHtLwlVrbK08W6tf73V2V1L7pA==", + "version": "0.17.20", + "resolved": "https://registry.npmjs.org/@4site/engrid-common/-/engrid-common-0.17.20.tgz", + "integrity": "sha512-tTu0IK8cqrhkYlcpHhFqgdZoikNUaRp51Xh8jrdWtxvF93eo3Zy2u47giyDMOsBWVW514xHWLyuSEdBGEQfBDg==", "dev": true, "requires": { "shuffle-seed": "^1.1.6", @@ -7839,9 +7839,9 @@ } }, "@4site/engrid-styles": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@4site/engrid-styles/-/engrid-styles-0.17.16.tgz", - "integrity": "sha512-uFL/R/Stj/jZ6wWISzivc2w8ION/ZsGoYBOeTWVnck1tYuxG6S6aCq7bMY2qyTrlTdzVasDh4TF1ZmIWKZsshQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@4site/engrid-styles/-/engrid-styles-0.17.19.tgz", + "integrity": "sha512-VBv3SAvarTF5sfefZgLKdAojd5UkdLMEnUbKxukH6aO/5Gkd5OVym8RvHjcGUzz74BuRRtlzix/cMLcrT1CA4g==", "dev": true, "requires": { "sanitize.css": "^11.0.1",