{"version":3,"file":"donation-page.js","sources":["../../Trilogy.Bundler.Site.ClientApp/src/donation-page/state.ts","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/common/currency.ts","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/donor-covered-fees.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/contact.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/employment.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/payment-credit-card.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/payment-electronic-check.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/payment.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/common/donation-buttons.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/tip.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/checkout-cart.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/event-attendance.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/custom-checkbox.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/common/terms.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/common/page-header.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/actions.ts","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/common/processing-indicator.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/mandatory-fee.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/attribution.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/pac-contact.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/checkout/checkout.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/confirmation/confirmation.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-goal.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-donation.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-helper.ts","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-teaser.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-photo.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-info.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-featured-banner.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-custom-fields.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-card.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-card-list.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-description.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/single-recipient-card.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/slate-cart.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/split-it.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/weighted-split-it.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/max-out.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/featured-toggle.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/slate-filters.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/extended-profile.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/recipient-dialog.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/notification-banner.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/pac-donation-toggle.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/slate/slate.tsx","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/cart-calculator.ts","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/reducers.ts","../../Trilogy.Bundler.Site.ClientApp/src/donation-page/donation-page.tsx"],"sourcesContent":["import { createContext, Dispatch } from \"react\";\r\nimport { ApiError } from \"../common\";\r\nimport { Action } from \"./actions\";\r\n\r\n// STATE\r\nexport class SuggestedAmount {\r\n constructor(public readonly amount: number) {\r\n this.kind = \"suggested\";\r\n }\r\n\r\n readonly kind: string;\r\n}\r\n\r\nexport class OtherAmount {\r\n constructor(public amt: number, public amtStr: string = \"\") {\r\n this.kind = \"other\";\r\n\r\n if (amtStr) {\r\n const decimalIndex = amtStr.indexOf(\".\");\r\n if (decimalIndex > -1) {\r\n // Don't allow more than 2 decimal points\r\n this.amountString = amtStr.substr(0, decimalIndex + 3);\r\n this.amount = parseFloat(this.amountString);\r\n } else {\r\n this.amountString = amtStr;\r\n this.amount = Math.round(amt * 100) / 100;\r\n }\r\n } else {\r\n this.amount = Math.round(amt * 100) / 100;\r\n this.amountString = amt.toFixed(2);\r\n }\r\n }\r\n\r\n readonly amount: number;\r\n readonly amountString: string;\r\n readonly kind: string;\r\n}\r\n\r\nexport type DonationAmount = SuggestedAmount | OtherAmount;\r\nexport type DonorType = \"Default\" | \"Individual\" | \"FederalPac\";\r\n\r\nexport interface DonationPageState {\r\n apiErrors: ApiError[];\r\n cartAmounts: CartAmounts;\r\n checkoutForm: CheckoutForm;\r\n configuration: {\r\n checkout: CheckoutConfiguration,\r\n slate: SlateConfiguration,\r\n conditionalDonating: ConditionalDonatingConfiguration,\r\n confirmation: ConfirmationConfiguration,\r\n earmarking: EarmarkingConfiguration,\r\n event: EventConfiguration,\r\n donationLimit: DonationLimitConfiguration,\r\n pacDonation: PacDonationConfiguration,\r\n status: \"Loading\" | \"NotFound\" | \"Published\" | \"Unpublished\" | \"Closed\" | \"Archived\" | \"ReadyForReview\",\r\n context: \"StandardPage\" | \"RecipientPage\",\r\n pagePermissionLevel: \"Everyone\" | \"Authenticated\" | \"VIP\" | \"Administrator\"\r\n };\r\n createSubscription: boolean;\r\n currentUser?: CurrentUser;\r\n donorType: DonorType;\r\n donorTypeUpdated: boolean;\r\n filters: Filters;\r\n donationLimit: DonationLimit;\r\n maxOut: {\r\n showDialog: boolean;\r\n };\r\n processingIndicator: ProcessingIndicator;\r\n recipients: Recipient[];\r\n recipientDialog: RecipientDialog;\r\n sourceCode: string;\r\n utmTracking: {\r\n campaign: string;\r\n content: string;\r\n medium: string;\r\n source: string;\r\n term: string;\r\n }\r\n terms: Term[];\r\n urlSlug: string;\r\n}\r\n\r\nexport interface DonationLimit {\r\n limitReached: boolean;\r\n donatedAmount: number;\r\n}\r\n\r\nexport interface CartAmounts {\r\n base: number;\r\n total: number;\r\n mandatoryFee: number;\r\n donorCoveredFees: number;\r\n tip: number;\r\n}\r\n\r\nexport interface ConditionalDonatingConfiguration {\r\n enabled: boolean;\r\n conditionContent: string;\r\n}\r\n\r\nexport interface EarmarkingConfiguration {\r\n enabled: boolean;\r\n}\r\n\r\nexport interface DonationLimitConfiguration {\r\n enabled: boolean;\r\n limit: number;\r\n remaining: number;\r\n donationTotal: number;\r\n}\r\n\r\nexport interface PacDonationConfiguration {\r\n enabled: boolean;\r\n defaultDonorType: DonorType;\r\n}\r\n\r\nexport interface SlateConfiguration {\r\n featuredRecipients: {\r\n enabled: boolean;\r\n defaultFilter: \"All\" | \"Featured\";\r\n viewAllText: string;\r\n viewFeaturedText: string;\r\n bannerText: string;\r\n }\r\n filters: {\r\n enabled: boolean;\r\n customField1: CustomFieldFilter;\r\n customField2: CustomFieldFilter;\r\n displayName: boolean;\r\n office: boolean;\r\n state: boolean;\r\n politicalParty: boolean;\r\n }\r\n goal: {\r\n enabled: boolean;\r\n }\r\n footerHtml: string;\r\n header: Header\r\n maxOut: {\r\n enabled: boolean;\r\n title: string;\r\n content: string;\r\n button: string;\r\n thresholdAmount: number;\r\n }\r\n recipientTemplate: {\r\n enableProfileTeaser: boolean;\r\n infoTemplate: string;\r\n layout: string;\r\n }\r\n recipientDialog: {\r\n enabled: boolean;\r\n showDialogLabel: string;\r\n extendedProfileTitle: string;\r\n }\r\n splitIt: {\r\n enabled: boolean;\r\n title: string;\r\n content: string;\r\n button: string;\r\n }\r\n weightedSplitIt: {\r\n enabled: boolean;\r\n title: string;\r\n content: string;\r\n button: string;\r\n }\r\n subscription: {\r\n enabled: boolean;\r\n }\r\n suggestedDonationAmounts: number[];\r\n}\r\n\r\nexport interface AttributionList {\r\n id: string,\r\n members: string[]\r\n}\r\n\r\nexport interface CheckoutConfiguration {\r\n header: Header,\r\n donationAttribution: {\r\n attributionLists: AttributionList[];\r\n content: string;\r\n enabled: boolean;\r\n required: boolean;\r\n title: string;\r\n },\r\n donorCoveredFees: {\r\n enabled: boolean;\r\n title: string;\r\n checkboxLabel: string;\r\n content: string;\r\n creditCardBase: number;\r\n creditCardRate: number;\r\n electronicCheckBase: number;\r\n electronicCheckRate: number;\r\n },\r\n tip: {\r\n content: string,\r\n enabled: boolean,\r\n suggestedAmounts: number[],\r\n title: string,\r\n recipient?: TipRecipient | null\r\n },\r\n customCheckbox: {\r\n checked: boolean,\r\n content: string | null,\r\n enabled: boolean,\r\n name: string | null,\r\n required: boolean,\r\n title: string | null\r\n },\r\n emailNote: string | null,\r\n employmentNote: string | null,\r\n textMessagingOptIn: {\r\n enabled: boolean,\r\n label: string | null\r\n },\r\n mandatoryFee: {\r\n enabled: boolean,\r\n baseAmount: number,\r\n rate: number,\r\n maximumAmount: number | null,\r\n title: string,\r\n content: string,\r\n lineItemText: string\r\n }\r\n}\r\n\r\nexport interface CurrentUser {\r\n address: string;\r\n city: string;\r\n displayName: string;\r\n email: string;\r\n employer: string;\r\n employerAddress: string;\r\n employerCity: string;\r\n employerPostalCode: string;\r\n employerState: string;\r\n firstName: string;\r\n id: string;\r\n lastName: string;\r\n occupation: string;\r\n paymentAuthorizationDisplayName: string;\r\n paymentAuthorizationSaved: boolean;\r\n phoneNumber: string;\r\n postalCode: string;\r\n state: string;\r\n}\r\n\r\nexport interface ConfirmationConfiguration {\r\n header: Header;\r\n}\r\n\r\nexport interface EventConfiguration {\r\n enabled: boolean;\r\n}\r\n\r\nexport interface QueryRecipient {\r\n identifier: string;\r\n amount?: number;\r\n}\r\n\r\nexport interface Header {\r\n title: string;\r\n content: string;\r\n html: string;\r\n}\r\n\r\nexport interface Term {\r\n id: string;\r\n content: string;\r\n}\r\n\r\nexport interface RecipientDialog {\r\n recipientId?: string | null;\r\n show: boolean;\r\n}\r\n\r\nexport interface ProcessingIndicator {\r\n message?: string;\r\n show: boolean;\r\n}\r\n\r\nexport interface Filters {\r\n featured: boolean;\r\n displayName: string;\r\n states: string[];\r\n offices: string[];\r\n politicalParties: string[];\r\n customField1: string[];\r\n customField2: string[];\r\n}\r\n\r\nexport interface CustomFieldFilter {\r\n enabled: boolean;\r\n label: string;\r\n}\r\n\r\nexport interface TipRecipient {\r\n contributionLimit: number;\r\n identifier: string;\r\n displayName: string;\r\n termIds: string[];\r\n}\r\n\r\nexport interface RecipientLinks {\r\n facebook?: string | null;\r\n instragram?: string | null;\r\n site?: string | null;\r\n twitter?: string | null;\r\n youTube?: string | null;\r\n}\r\n\r\nexport interface RecipientProfileField {\r\n name: string;\r\n order: number;\r\n value: string;\r\n}\r\n\r\nexport interface Recipient {\r\n attribution: string;\r\n attributionListId: string;\r\n customField1: string;\r\n customField2: string;\r\n cycle: string;\r\n displayName: string;\r\n extendedProfileFields: RecipientProfileField[];\r\n earmarked: boolean;\r\n identifier: string;\r\n state: string;\r\n district: string;\r\n disclaimer: string;\r\n links: RecipientLinks;\r\n office: string;\r\n politicalParty: string;\r\n description: string;\r\n contributionLimit: number;\r\n donationAmount: DonationAmount;\r\n weight: number;\r\n featured: boolean;\r\n order: number;\r\n profileTeaser: string;\r\n requireEmployerAddress: boolean;\r\n recipientType: string;\r\n termIds: string[];\r\n goal: {\r\n achieved: boolean,\r\n amount: number,\r\n percent: number,\r\n progress: number,\r\n remaining: number\r\n },\r\n legalName: string;\r\n pausedStatus: {\r\n paused: boolean,\r\n message: string\r\n };\r\n}\r\n\r\nexport interface CheckoutForm {\r\n attributionFields: string[];\r\n contact: {\r\n firstName: string;\r\n lastName: string;\r\n streetAddress: string;\r\n city: string;\r\n state: string;\r\n postalCode: string;\r\n email: string;\r\n phoneNumber: string;\r\n textMessagingOptIn: boolean;\r\n };\r\n employment: {\r\n status: \"Employed\" | \"Retired\" | \"NotEmployed\"\r\n employer: string;\r\n occupation: string\r\n streetAddress: string;\r\n city: string;\r\n state: string;\r\n postalCode: string;\r\n };\r\n donorCoveredFees: {\r\n enabled: boolean;\r\n amount?: number;\r\n };\r\n eventAttendance: {\r\n attending: boolean;\r\n numberOfAttendees: number;\r\n };\r\n payment: {\r\n paymentMethod: \"CreditCard\" | \"ElectronicCheck\";\r\n useStoredPaymentAuthorization: boolean;\r\n rememberPayment: boolean;\r\n password: string;\r\n confirmPassword: string;\r\n creditCard: {\r\n cardNumber: string;\r\n expirationMonth: string;\r\n expirationYear: string;\r\n securityCode: string;\r\n } | null;\r\n electronicCheck: {\r\n accountType: \"Checking\" | \"Savings\";\r\n accountNumber: string;\r\n routingNumber: string;\r\n } | null;\r\n paymentCheckbox: boolean;\r\n },\r\n tip: {\r\n amount: number;\r\n }\r\n}\r\n\r\n// INITIAL STATE\r\nconst getArrayFromQueryString = (field: string): string[] => {\r\n const value = new URLSearchParams(window.location.search).get(field);\r\n if (!value) {\r\n return [];\r\n }\r\n return value.split(\",\");\r\n}\r\n\r\nconst initialFilters = {\r\n featured: true,\r\n displayName: \"\",\r\n states: getArrayFromQueryString(\"state\"),\r\n offices: getArrayFromQueryString(\"office\"),\r\n politicalParties: getArrayFromQueryString(\"party\"),\r\n customField1: [],\r\n customField2: []\r\n}\r\n\r\nconst initialCheckoutForm: CheckoutForm = {\r\n attributionFields: [],\r\n contact: {\r\n firstName: \"\",\r\n lastName: \"\",\r\n streetAddress: \"\",\r\n city: \"\",\r\n state: \"\",\r\n postalCode: \"\",\r\n email: \"\",\r\n phoneNumber: \"\",\r\n textMessagingOptIn: false\r\n },\r\n employment: {\r\n status: \"Employed\",\r\n employer: \"\",\r\n streetAddress: \"\",\r\n city: \"\",\r\n state: \"\",\r\n postalCode: \"\",\r\n occupation: \"\"\r\n },\r\n donorCoveredFees: {\r\n enabled: false,\r\n amount: 0\r\n },\r\n eventAttendance: {\r\n attending: true,\r\n numberOfAttendees: 1\r\n },\r\n payment: {\r\n paymentMethod: \"CreditCard\",\r\n useStoredPaymentAuthorization: false,\r\n rememberPayment: false,\r\n password: \"\",\r\n confirmPassword: \"\",\r\n creditCard: {\r\n cardNumber: \"\",\r\n expirationMonth: \"\",\r\n expirationYear: \"\",\r\n securityCode: \"\"\r\n },\r\n electronicCheck: {\r\n accountType: \"Checking\",\r\n accountNumber: \"\",\r\n routingNumber: \"\"\r\n },\r\n paymentCheckbox: false\r\n },\r\n tip: {\r\n amount: 0\r\n }\r\n}\r\n\r\nconst initialCheckoutConfiguration = {\r\n header: {\r\n title: \"\",\r\n content: \"\",\r\n html: \"\"\r\n },\r\n donationAttribution: {\r\n enabled: false,\r\n required: false,\r\n content: \"\",\r\n title: \"\",\r\n attributionLists: []\r\n },\r\n donorCoveredFees: {\r\n enabled: false,\r\n title: \"\",\r\n checkboxLabel: \"\",\r\n content: \"\",\r\n creditCardBase: 0,\r\n creditCardRate: 0,\r\n electronicCheckBase: 0,\r\n electronicCheckRate: 0\r\n },\r\n tip: {\r\n content: \"\",\r\n enabled: false,\r\n suggestedAmounts: [],\r\n title: \"\",\r\n recipient: null\r\n },\r\n customCheckbox: {\r\n checked: false,\r\n content: \"\",\r\n enabled: false,\r\n name: \"\",\r\n required: true,\r\n title: \"\"\r\n },\r\n emailNote: \"\",\r\n employmentNote: \"\",\r\n textMessagingOptIn: {\r\n enabled: false,\r\n label: \"\"\r\n },\r\n terms: [],\r\n mandatoryFee: {\r\n enabled: false,\r\n baseAmount: 0,\r\n rate: 0,\r\n maximumAmount: null,\r\n title: \"\",\r\n content: \"\",\r\n lineItemText: \"\"\r\n }\r\n}\r\n\r\nconst initialConditionalDonatingConfiguration = {\r\n enabled: false,\r\n conditionContent: \"\"\r\n}\r\n\r\nconst initialEventConfiguration = {\r\n enabled: false\r\n}\r\n\r\nconst initialPacDonationConfiguration: PacDonationConfiguration = {\r\n enabled: false,\r\n defaultDonorType: \"Default\"\r\n}\r\n\r\nconst initialSlateConfiguration = {\r\n featuredRecipients: {\r\n enabled: true,\r\n defaultFilter: <\"All\" | \"Featured\">\"Featured\",\r\n viewAllText: \"\",\r\n viewFeaturedText: \"\",\r\n bannerText: \"\"\r\n },\r\n filters: {\r\n enabled: false,\r\n customField1: {\r\n enabled: false,\r\n label: \"\"\r\n },\r\n customField2: {\r\n enabled: false,\r\n label: \"\"\r\n },\r\n displayName: false,\r\n office: false,\r\n state: false,\r\n politicalParty: false\r\n },\r\n footerHtml: \"\",\r\n goal: {\r\n enabled: false\r\n },\r\n header: {\r\n title: \"\",\r\n content: \"\",\r\n html: \"\"\r\n },\r\n maxOut: {\r\n enabled: false,\r\n title: \"\",\r\n content: \"\",\r\n button: \"\",\r\n thresholdAmount: 0\r\n },\r\n recipientDialog: {\r\n enabled: false,\r\n showDialogLabel: \"\",\r\n extendedProfileTitle: \"\"\r\n },\r\n recipientTemplate: {\r\n enableProfileTeaser: false,\r\n enableGoal: false,\r\n infoTemplate: \"\",\r\n layout: \"\"\r\n },\r\n splitIt: {\r\n enabled: false,\r\n title: \"\",\r\n content: \"\",\r\n button: \"\"\r\n },\r\n weightedSplitIt: {\r\n enabled: false,\r\n title: \"\",\r\n content: \"\",\r\n button: \"\"\r\n },\r\n subscription: {\r\n enabled: false\r\n },\r\n suggestedDonationAmounts: [10, 25, 50, 100, 250],\r\n\r\n detailsTemplate: \"\"\r\n}\r\n\r\nexport const initialDonationPageState: DonationPageState = {\r\n configuration: {\r\n checkout: initialCheckoutConfiguration,\r\n context: \"StandardPage\",\r\n conditionalDonating: initialConditionalDonatingConfiguration,\r\n donationLimit: {\r\n enabled: false,\r\n limit: 0,\r\n remaining: 0,\r\n donationTotal: 0\r\n },\r\n earmarking: {\r\n enabled: false\r\n },\r\n event: initialEventConfiguration,\r\n pacDonation: initialPacDonationConfiguration,\r\n slate: initialSlateConfiguration,\r\n status: \"Loading\",\r\n confirmation: {\r\n header: {\r\n title: \"\",\r\n content: \"\",\r\n html: \"\"\r\n }\r\n },\r\n pagePermissionLevel: \"Everyone\"\r\n },\r\n cartAmounts: {\r\n base: 0,\r\n total: 0,\r\n mandatoryFee: 0,\r\n donorCoveredFees: 0,\r\n tip: 0\r\n },\r\n createSubscription: false,\r\n donorType: \"Default\",\r\n donorTypeUpdated: false,\r\n donationLimit: {\r\n limitReached: false,\r\n donatedAmount: 0\r\n },\r\n recipients: [],\r\n terms: [],\r\n filters: initialFilters,\r\n checkoutForm: initialCheckoutForm,\r\n recipientDialog: { recipientId: null, show: false },\r\n sourceCode: new URLSearchParams(window.location.search).get(\"sc\") || \"\",\r\n utmTracking: {\r\n campaign: new URLSearchParams(window.location.search).get(\"utm_campaign\") || \"\",\r\n content: new URLSearchParams(window.location.search).get(\"utm_content\") || \"\",\r\n medium: new URLSearchParams(window.location.search).get(\"utm_medium\") || \"\",\r\n source: new URLSearchParams(window.location.search).get(\"utm_source\") || \"\",\r\n term: new URLSearchParams(window.location.search).get(\"utm_term\") || \"\"\r\n },\r\n apiErrors: [],\r\n processingIndicator: { show: false, message: \"\" },\r\n urlSlug: \"\",\r\n maxOut: {\r\n showDialog: false\r\n }\r\n}\r\n\r\nexport const getFilteredRecipients = (state: DonationPageState) => {\r\n const filters = state.filters;\r\n let filteredRecipients = state.recipients\r\n .filter(r => !filters.displayName || r.displayName.toLowerCase().indexOf(filters.displayName.toLowerCase()) != -1)\r\n .filter(r => filters.states.length == 0 || filters.states.indexOf(r.state) != -1)\r\n .filter(r => filters.offices.length == 0 || filters.offices.indexOf(r.office) != -1)\r\n .filter(r => filters.politicalParties.length == 0 || filters.politicalParties.indexOf(r.politicalParty) != -1)\r\n .filter(r => filters.customField1.length == 0 || filters.customField1.indexOf(r.customField1) != -1)\r\n .filter(r => filters.customField2.length == 0 || filters.customField2.indexOf(r.customField2) != -1);\r\n\r\n const featuredFilterEnabled = state.configuration.slate.featuredRecipients.enabled || false;\r\n\r\n if (featuredFilterEnabled) {\r\n filteredRecipients = filteredRecipients.filter(r => filters.featured ? r.featured : true)\r\n }\r\n\r\n return filteredRecipients;\r\n}\r\n\r\n// CONTEXTS\r\nlet initialDonationPageStateContext = { state: initialDonationPageState, dispatch: (action: Action) => { } }\r\nexport const DonationPageStateContext = createContext<{ state: DonationPageState, dispatch: Dispatch }>(initialDonationPageStateContext);\r\n\r\nlet initialRecipientContext = initialDonationPageState.recipients[0];\r\nexport const RecipientContext = createContext(initialRecipientContext);\r\n\r\n","export const CurrencyFormatter = \r\n new Intl.NumberFormat(\"en-US\", {\r\n style: \"currency\",\r\n currency: \"USD\"\r\n });","import { useContext } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { CurrencyFormatter } from \"../common/currency\";\r\nimport { CheckoutForm, DonationPageStateContext } from \"../state\";\r\nimport \"./donor-covered-fees.scss\";\r\n\r\nexport const DonorCoveredFees = () => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const { register, formState: { errors } } = useFormContext();\r\n const config = state.configuration.checkout.donorCoveredFees;\r\n\r\n const feesAmount = state.cartAmounts.donorCoveredFees;\r\n\r\n return (\r\n
\r\n {config.title}\r\n {config.content &&

{config.content}

}\r\n
\r\n \r\n
\r\n
\r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport { useContext } from \"react\";\r\nimport { useFieldFormContext, ErrorMessage } from \"../../common\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport \"./contact.scss\";\r\n\r\nexport const Contact = () => {\r\n\r\n const { registerField, register } = useFieldFormContext();\r\n\r\n // Context\r\n const { state } = useContext(DonationPageStateContext);\r\n const checkoutConfiguration = state.configuration.checkout;\r\n const textMessagingOptions = checkoutConfiguration.textMessagingOptIn;\r\n const emailNote = checkoutConfiguration.emailNote;\r\n\r\n // Fields\r\n const fields = {\r\n firstName: {\r\n id: \"firstName\",\r\n name: \"contact.firstName\",\r\n options: {\r\n required: { value: true, message: \"Enter a first name\" },\r\n maxLength: 50,\r\n validate: (v:string) => (v.indexOf(' and ') == -1 && v.indexOf('&') == -1 && v.indexOf('/') == -1) || 'Correct First Name. Donation must be attributed to an single donor, as such, we do not allow the word “and” or the / or & symbols.'\r\n }\r\n },\r\n lastName: {\r\n id: \"lastName\",\r\n name: \"contact.lastName\",\r\n options: {\r\n required: { value: true, message: \"Enter a last name\" },\r\n maxLength: 50\r\n }\r\n },\r\n streetAddress: {\r\n id: \"streetAddress\",\r\n name: \"contact.streetAddress\",\r\n options: {\r\n required: { value: true, message: \"Enter a street address\" },\r\n maxLength: 50\r\n }\r\n },\r\n city: {\r\n id: \"city\",\r\n name: \"contact.city\",\r\n options: {\r\n required: { value: true, message: \"Enter a city\" },\r\n maxLength: 50\r\n }\r\n },\r\n state: {\r\n id: \"state\",\r\n name: \"contact.state\",\r\n options: {\r\n required: { value: true, message: \"Select a state\" },\r\n maxLength: 2\r\n }\r\n },\r\n postalCode: {\r\n id: \"postalCode\",\r\n name: \"contact.postalCode\",\r\n options: {\r\n required: { value: true, message: \"Enter a ZIP code\" },\r\n maxLength: 10\r\n }\r\n },\r\n email: {\r\n id: \"email\",\r\n name: \"contact.email\",\r\n options: {\r\n required: { value: true, message: \"Enter an email address\" },\r\n maxLength: 50,\r\n readOnly: [\"VIP\", \"Authenticated\"].includes(state.configuration.pagePermissionLevel),\r\n title: [\"VIP\", \"Authenticated\"].includes(state.configuration.pagePermissionLevel) ? \"Email address may be updated in the Account Profile page\" : null\r\n }\r\n },\r\n phoneNumber: {\r\n id: \"phoneNumber\",\r\n name: \"contact.phoneNumber\",\r\n options: {\r\n maxLength: 20\r\n }\r\n },\r\n textMessagingOptIn: {\r\n id: \"textMessagingOptIn\",\r\n name: \"contact.textMessagingOptIn\"\r\n }\r\n }\r\n\r\n return (\r\n
\r\n Contact\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {emailNote && {emailNote}}\r\n \r\n
\r\n
\r\n \r\n \r\n {textMessagingOptions.enabled && textMessagingOptions.label &&\r\n \r\n }\r\n \r\n
\r\n
\r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport { useContext } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { useFieldFormContext, ErrorMessage } from \"../../common\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport \"./employment.scss\";\r\n\r\nexport const Employment = () => {\r\n\r\n const { state } = useContext(DonationPageStateContext);\r\n const { watch } = useFormContext();\r\n const { registerField } = useFieldFormContext();\r\n const checkoutConfiguration = state.configuration.checkout;\r\n const employmentNote = checkoutConfiguration.employmentNote;\r\n\r\n const employmentStatus = watch(\"employment.status\");\r\n\r\n let requireEmployerAddress: boolean = false;\r\n\r\n if (employmentStatus == \"Employed\") {\r\n requireEmployerAddress = state.recipients.some(r => r.donationAmount?.amount > 0 && r.requireEmployerAddress == true);\r\n }\r\n\r\n const fields = {\r\n employmentStatus: {\r\n id: \"employmentStatus\",\r\n name: \"employment.status\"\r\n },\r\n employer: {\r\n id: \"employer\",\r\n name: \"employment.employer\",\r\n options: {\r\n required: { value: true, message: \"Enter an employer\" },\r\n maxLength: 50\r\n }\r\n },\r\n employerStreetAddress: {\r\n id: \"streetAddress\",\r\n name: \"employment.streetAddress\",\r\n options: {\r\n required: { value: requireEmployerAddress, message: \"Enter an employer address\" },\r\n maxLength: 50\r\n }\r\n },\r\n employerCity: {\r\n id: \"city\",\r\n name: \"employment.city\",\r\n options: {\r\n required: { value: requireEmployerAddress, message: \"Enter an employer city\" },\r\n maxLength: 50\r\n }\r\n },\r\n employerState: {\r\n id: \"state\",\r\n name: \"employment.state\",\r\n options: {\r\n required: { value: requireEmployerAddress, message: \"Select an employer state\" },\r\n maxLength: 2\r\n }\r\n },\r\n employerPostalCode: {\r\n id: \"postalCode\",\r\n name: \"employment.postalCode\",\r\n options: {\r\n required: { value: requireEmployerAddress, message: \"Enter an employer ZIP code\" },\r\n maxLength: 10\r\n }\r\n },\r\n occupation: {\r\n id: \"occupation\",\r\n name: \"employment.occupation\",\r\n options: {\r\n required: { value: true, message: \"Enter an occupation\" },\r\n maxLength: 50\r\n }\r\n }\r\n }\r\n\r\n const employerAddress = (\r\n <>\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n\r\n return (\r\n
\r\n Employment\r\n
\r\n \r\n \r\n {employmentNote && {employmentNote}}\r\n
\r\n {employmentStatus == \"Employed\" && (\r\n <>\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n {requireEmployerAddress && employerAddress}\r\n \r\n )}\r\n
\r\n );\r\n}","import * as React from \"react\";\r\n\r\nimport { useFieldFormContext, ErrorMessage } from \"../../common\";\r\n\r\nexport const PaymentCreditCard = () => {\r\n const { registerField } = useFieldFormContext();\r\n\r\n const fields = {\r\n cardNumber: {\r\n id: \"cardNumber\",\r\n name: \"payment.creditCard.cardNumber\",\r\n options: {\r\n required: { value: true, message: \"Enter a valid credit card number\" },\r\n maxLength: 25,\r\n minLength: 12\r\n }\r\n },\r\n securityCode: {\r\n id: \"securityCode\",\r\n name: \"payment.creditCard.securityCode\",\r\n options: {\r\n required: { value: true, message: \"Enter a security code\" },\r\n maxLength: 4,\r\n minLength: 3\r\n }\r\n },\r\n expirationMonth: {\r\n id: \"expirationMonth\",\r\n name: \"payment.creditCard.expirationMonth\",\r\n options: {\r\n required: { value: true, message: \"Enter an expiration month\" },\r\n }\r\n },\r\n expirationYear: {\r\n id: \"expirationYear\",\r\n name: \"payment.creditCard.expirationYear\",\r\n options: {\r\n required: { value: true, message: \"Enter an expiration year\" }\r\n },\r\n }\r\n }\r\n\r\n // Generate year options for expiration year select starting from the current year\r\n const getYearOptions = () => {\r\n const currentYear = new Date().getFullYear();\r\n const years = Array.from({ length: 7 }, (_, i) => {\r\n const year = currentYear + i;\r\n return ;\r\n });\r\n\r\n return years;\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n );\r\n}","import * as React from \"react\";\r\n\r\nimport { useFieldFormContext, ErrorMessage } from \"../../common\";\r\n\r\nexport const PaymentElectronicCheck = () => {\r\n const { registerField } = useFieldFormContext();\r\n\r\n const fields = {\r\n accountType: {\r\n id: \"accountType\",\r\n name: \"payment.electronicCheck.accountType\",\r\n options: {\r\n required: true\r\n }\r\n },\r\n accountNumber: {\r\n id: \"accountNumber\",\r\n name: \"payment.electronicCheck.accountNumber\",\r\n options: {\r\n required: { value: true, message: \"Enter an account number\" },\r\n }\r\n },\r\n routingNumber: {\r\n id: \"routingNumber\",\r\n name: \"payment.electronicCheck.routingNumber\",\r\n options: {\r\n required: { value: true, message: \"Enter a routing number\" },\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n );\r\n}","import * as React from \"react\";\r\nimport { get, useFormContext } from \"react-hook-form\";\r\n\r\nimport { useFieldFormContext, ErrorMessage } from \"../../common\";\r\n\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport { PaymentCreditCard } from \"./payment-credit-card\";\r\nimport { PaymentElectronicCheck } from \"./payment-electronic-check\";\r\n\r\nimport \"./payment.scss\";\r\n\r\nexport const Payment = () => {\r\n const { state } = React.useContext(DonationPageStateContext);\r\n const { register, watch } = useFormContext();\r\n const { registerField } = useFieldFormContext();\r\n\r\n const paymentAuthorizationSaved = state.currentUser?.paymentAuthorizationSaved;\r\n const useStoredPaymentAuthorization = watch(\"payment.useStoredPaymentAuthorization\");\r\n const paymentMethod = watch(\"payment.paymentMethod\");\r\n const rememberPayment = watch(\"payment.rememberPayment\");\r\n const password = watch(\"payment.password\");\r\n const userAuthenticated = state.currentUser != null;\r\n\r\n const fields = {\r\n rememberPayment: {\r\n id: \"rememberPayment\",\r\n name: \"payment.rememberPayment\"\r\n },\r\n useStoredPaymentAuthorization: {\r\n id: \"useStoredPaymentAuthorization\",\r\n name: \"payment.useStoredPaymentAuthorization\"\r\n },\r\n password: {\r\n id: \"password\",\r\n name: \"payment.password\",\r\n options: {\r\n maxLength: 40,\r\n minLength: { value: 10, message: \"Password must have at least 10 characters\" }\r\n }\r\n },\r\n confirmPassword: {\r\n id: \"confirmPassword\",\r\n name: \"payment.confirmPassword\",\r\n options: {\r\n validate: { match: (v: any) => v != password ? \"Passwords must match\": null }\r\n }\r\n }\r\n }\r\n\r\n const rememberPasswordText = paymentAuthorizationSaved\r\n ? \"Replace my saved payment information with the information above\"\r\n : \"Remember my payment information\";\r\n\r\n return (\r\n
\r\n Payment\r\n\r\n {paymentAuthorizationSaved &&\r\n
\r\n \r\n
}\r\n\r\n {!useStoredPaymentAuthorization && <>\r\n
\r\n \r\n \r\n
\r\n {paymentMethod == \"CreditCard\" && }\r\n {paymentMethod === \"ElectronicCheck\" && }\r\n
\r\n \r\n
\r\n {rememberPayment && !userAuthenticated &&\r\n <>\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n }\r\n }\r\n
\r\n );\r\n}","import { useContext } from \"react\";\r\nimport { DonationAmount, DonationPageStateContext, OtherAmount, SuggestedAmount } from \"../state\";\r\nimport \"./donation-buttons.css\";\r\n\r\nexport const DonationButtons = ({suggestedDonationAmounts, donationAmount, limit, onChange}:\r\n {suggestedDonationAmounts: number[],\r\n donationAmount: DonationAmount,\r\n limit: number,\r\n onChange: (donationAmount: DonationAmount) => void\r\n }) => {\r\n\r\n // State\r\n const { state } = useContext(DonationPageStateContext);\r\n \r\n // Handlers\r\n const selectAmount = (amt: string) => {\r\n onChange(new SuggestedAmount(parseFloat(amt)));\r\n }\r\n\r\n const onOtherAmountChange = (amt: string) => {\r\n const amountValue = parseFloat((amt || \"0\").trim());\r\n if (isNaN(amountValue)) {\r\n onChange(new OtherAmount(0));\r\n } else if (amountValue <= limit || limit == 0) {\r\n onChange(new OtherAmount(amountValue, amt));\r\n }\r\n }\r\n\r\n // Helpers\r\n const formatAmount = (amt: number) => {\r\n return new Intl\r\n .NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" })\r\n .format(amt)\r\n .replace(\".00\", \"\");\r\n }\r\n\r\n // Suggested Amount Buttons\r\n const suggestedAmountButtons = suggestedDonationAmounts\r\n .filter(a => limit == 0 || a <= limit)\r\n .map(amt => {\r\n const selected = donationAmount && donationAmount.kind == \"suggested\" && amt == donationAmount.amount;\r\n const classNames = \"amount-option\" + (selected ? \" selected\" : \"\");\r\n return (\r\n \r\n )});\r\n\r\n const classNames = `donation-buttons suggested-amounts-${suggestedAmountButtons.length}`;\r\n\r\n // Other Amount\r\n let otherAmountDisplayValue = \"\";\r\n if (donationAmount.kind == \"other\" && donationAmount.amount) {\r\n const oa = donationAmount as OtherAmount;\r\n otherAmountDisplayValue = oa.amountString;\r\n }\r\n\r\n let otherAmountCssClass = \"other-amount-option\";\r\n if (donationAmount.kind == \"other\" && donationAmount.amount > 0) {\r\n otherAmountCssClass += \" selected\";\r\n }\r\n\r\n // Limit\r\n const donationLimit = limit ? `Max ${formatAmount(limit)}` : \"No Max\";\r\n\r\n // Render\r\n return (\r\n
\r\n {suggestedAmountButtons}\r\n
onOtherAmountChange(e.target.value)} value={otherAmountDisplayValue}>
\r\n {state.donorType != \"FederalPac\" && {donationLimit}}\r\n
\r\n );\r\n}\r\n","import { useContext, useState } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { DonationButtons } from \"../common/donation-buttons\";\r\nimport { CheckoutForm, DonationAmount, DonationPageStateContext, OtherAmount } from \"../state\";\r\nimport \"./tip.scss\";\r\n\r\nexport const Tip = () => {\r\n // App state\r\n const { state } = useContext(DonationPageStateContext);\r\n const tipConfiguration = state.configuration.checkout.tip;\r\n\r\n // Form data\r\n const { setValue, getValues } = useFormContext();\r\n const checkoutForm = getValues();\r\n\r\n // Component state\r\n const [localDonationAmount, setLocalDonationAmount] = useState(new OtherAmount(checkoutForm.tip.amount));\r\n\r\n const onChangeHandler = (donationAmount: DonationAmount) => {\r\n setValue(\"tip.amount\", donationAmount.amount);\r\n setLocalDonationAmount(donationAmount);\r\n }\r\n\r\n const tipContent = tipConfiguration.content ?

{tipConfiguration.content}

: <>;\r\n\r\n return (\r\n
\r\n {tipConfiguration.title}\r\n {tipContent}\r\n \r\n
\r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport { useContext, useEffect, useState } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { useNavigate } from \"react-location\";\r\nimport { CurrencyFormatter } from \"../common/currency\";\r\nimport { CheckoutForm, DonationPageStateContext } from \"../state\";\r\n\r\nimport \"./checkout-cart.css\";\r\n\r\nexport const CheckoutCart = () => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const { watch } = useFormContext();\r\n const navigate = useNavigate()\r\n\r\n // Local state for showing/hiding recipients\r\n const [showRecipients, setShowRecipients] = useState(false);\r\n\r\n // Get the cart amounts and fee value from state\r\n const checkoutForm = watch();\r\n const coveredFeesEnabled = checkoutForm.donorCoveredFees.enabled;\r\n const coveredFeesAmount = state.cartAmounts.donorCoveredFees;\r\n const tipAmount = state.cartAmounts.tip;\r\n const mandatoryFeeAmount = state.cartAmounts.mandatoryFee;\r\n\r\n useEffect(() => {\r\n if (window.innerWidth >= 768) {\r\n setShowRecipients(true);\r\n }\r\n }, []);\r\n\r\n // Event handlers\r\n const navigateToSlate = () => {\r\n navigate({ to: \"../\", replace: true });\r\n }\r\n\r\n const toggleRecipients = () => {\r\n setShowRecipients(!showRecipients);\r\n }\r\n\r\n // Build elements\r\n const recipientListItems = state.recipients\r\n .filter(r => r.donationAmount && r.donationAmount.amount > 0)\r\n .map(r =>\r\n
  • {r.displayName}: {CurrencyFormatter.format(r.donationAmount.amount)}
  • \r\n );\r\n\r\n if (tipAmount) {\r\n recipientListItems.push(
  • {state.configuration.checkout?.tip?.recipient?.displayName ?? \"Tip\"}: {CurrencyFormatter.format(tipAmount)}
  • );\r\n }\r\n\r\n if (coveredFeesEnabled && coveredFeesAmount) {\r\n recipientListItems.push(
  • Processing Fees: {CurrencyFormatter.format(coveredFeesAmount)}
  • );\r\n }\r\n\r\n if (mandatoryFeeAmount) {\r\n recipientListItems.push(
  • {state.configuration.checkout.mandatoryFee.lineItemText}: {CurrencyFormatter.format(mandatoryFeeAmount)}
  • );\r\n }\r\n\r\n const header =

    {CurrencyFormatter.format(state.cartAmounts.total)}

    ;\r\n\r\n const editButton = navigateToSlate()}>Edit;\r\n const toggleRecipientsButton = toggleRecipients()}>{showRecipients ? \"Hide Details\" : \"Show Details\"};\r\n\r\n const recurringNotification = state.configuration.slate.subscription.enabled\r\n ? (state.createSubscription ? : <>)\r\n : <>\r\n\r\n return (\r\n
    \r\n {header}\r\n {showRecipients &&
      \r\n {recipientListItems}\r\n
    \r\n }\r\n {recurringNotification}\r\n {editButton}\r\n {recipientListItems.length > 0 && toggleRecipientsButton}\r\n
    \r\n );\r\n}\r\n","import { useFormContext } from \"react-hook-form\";\r\nimport \"./event-attendance.scss\";\r\n\r\nexport const EventAttendance = () => {\r\n const {register, watch, setValue, formState: { errors } } = useFormContext();\r\n\r\n const attending = watch(\"eventAttendance.attending\", true);\r\n\r\n return (\r\n
    \r\n RSVP\r\n
    \r\n \r\n \r\n
    \r\n {attending == true &&
    \r\n \r\n
    }\r\n
    \r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport { useContext } from \"react\";\r\nimport { useFieldFormContext, ErrorMessage } from \"../../common\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport \"./custom-checkbox.scss\";\r\n\r\nexport const CustomCheckbox = () => {\r\n\r\n const { registerField, register } = useFieldFormContext();\r\n const { state: donationPageState } = useContext(DonationPageStateContext);\r\n\r\n const fields = {\r\n customCheckbox: {\r\n id: \"customCheckbox\",\r\n name: \"paymentCheckbox.checked\",\r\n options: {\r\n value: donationPageState.configuration.checkout.customCheckbox.checked,\r\n required: { value: donationPageState.configuration.checkout.customCheckbox.required, message: \"Checkbox is required\" }\r\n }\r\n },\r\n customCheckboxName: {\r\n id: \"customCheckbox\",\r\n name: \"paymentCheckbox.name\"\r\n }\r\n }\r\n\r\n const options = donationPageState.configuration.checkout.customCheckbox;\r\n\r\n const htmlInContent = (options.content || \"\").indexOf('>') > -1 || false;\r\n\r\n const labelContent = htmlInContent ? : options.content;\r\n\r\n return (\r\n
    \r\n {options.title}\r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n}","import { ConditionalDonatingConfiguration, Term } from \"../state\";\r\n\r\nimport \"./terms.css\";\r\n\r\ninterface TermsProps { \r\n terms?: Term[], \r\n conditionalDonatingConfig?: ConditionalDonatingConfiguration, \r\n showDeTerms?:boolean \r\n}\r\n\r\nexport const Terms = ({ terms = [], conditionalDonatingConfig = { enabled: false, conditionContent: \"\" }, showDeTerms = false }: TermsProps) => {\r\n\r\n const termParagraphs = terms.map((t) => {\r\n if (t.content?.indexOf(\"<\") >= 0) {\r\n return
    \r\n } else {\r\n return

    {t.content}

    ;\r\n }\r\n });\r\n\r\n // Conditional Donating Terms\r\n let conditionalDonatingContent = <>;\r\n\r\n if (conditionalDonatingConfig.enabled) {\r\n\r\n if (conditionalDonatingConfig.conditionContent?.indexOf(\"<\") >= 0) {\r\n conditionalDonatingContent =
    \r\n } else {\r\n conditionalDonatingContent =

    {conditionalDonatingConfig.conditionContent}

    \r\n }\r\n\r\n conditionalDonatingContent =

    I agree that my Pledge can be collected (and my payment method debited) when the following condition is met:

    {conditionalDonatingContent}
    \r\n }\r\n\r\n const donateText = conditionalDonatingConfig.enabled ? \"Pledge\" : \"Donate\";\r\n\r\n return (\r\n
    \r\n { showDeTerms &&

    I understand that my payment is being made to Democracy Engine, who accepts the responsibility of distributing the funds to my designated recipient(s) in accordance with applicable campaign finance laws. My card or bank statement will show a payment to “Democracy Engine” or “DEMENG” and if there are any issues or discrepancies with the payment or I wish to revoke the payment, I can contact Democracy Engine at support@democracyengine.com. Democracy Engine will charge each recipient an applicable service fee.

    }\r\n\r\n { conditionalDonatingContent }\r\n\r\n { termParagraphs.length > 0 &&

    By clicking on the “{donateText}” button you confirm that the following statements are true and accurate:

    }\r\n\r\n { termParagraphs }\r\n \r\n
    \r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport { useContext } from \"react\";\r\nimport { DonationPageStateContext, Header } from \"../state\";\r\nimport \"./page-header.css\";\r\n\r\nexport const PageHeader = ({ config, pageClassName }: { config: Header, pageClassName?: string }) => {\r\n\r\n const { state } = useContext(DonationPageStateContext);\r\n\r\n const unpublishedBanner = state.configuration.status == \"Unpublished\" || state.configuration.status == \"Archived\" || state.configuration.status == \"ReadyForReview\"\r\n ?
    THIS PAGE IS UNPUBLISHED. ONLY ADMINISTRATORS CAN VIEW.
    \r\n : <>;\r\n\r\n const fullHtmlHeader = config.html ? true : false;\r\n const className = `page-header ${pageClassName}`;\r\n\r\n // Return nothing if no header (useful on single recipient pages)\r\n if (!config.html && !config.title && !config.content) {\r\n return <>;\r\n }\r\n\r\n // Return full custom header if html is specified\r\n if (fullHtmlHeader) {\r\n return
    {unpublishedBanner}
    \r\n }\r\n\r\n // Return the standard title and content, checking to see if content itself has HTML\r\n const htmlInContent = config?.content?.indexOf(\">\") > -1 || false;\r\n\r\n const contentElement = htmlInContent ?\r\n
    \r\n : (config.content &&

    {config.content.replaceAll(\" \", \"\")}

    );\r\n\r\n return
    \r\n {unpublishedBanner}\r\n

    {config.title}

    \r\n {contentElement}\r\n
    ;\r\n}\r\n","import { ApiError } from \"../common\";\r\nimport { CheckoutForm, CurrentUser, DonationAmount, DonorType, Filters, QueryRecipient, Recipient } from \"./state\";\r\n\r\nexport enum ActionType {\r\n ChangeCurrentViewMode = \"CHANGE_CURRENT_VIEW_MODE\",\r\n ClearRecipientAmounts = \"CLEAR_RECIPIENT_AMOUNTS\",\r\n LoadCurrentUser = \"LOAD_CURRENT_USER\",\r\n LoadData = \"LOAD_DATA\",\r\n UpdateFilters = \"UPDATE_FILTERS\",\r\n MaxOut = \"MAX_OUT\",\r\n PageNotFound = \"PAGE_NOT_FOUND\",\r\n CancelMaxOut = \"CANCEL_MAX_OUT\",\r\n UpdateDonorType = \"UPDATE_DONOR_TYPE\",\r\n UpdateRecipient = \"UPDATE_RECIPIENT\",\r\n UpdateRecipientAmount = \"UPDATE_RECIPIENT_AMOUNT\",\r\n UpdateRecipientAttribution = \"UPDATE_RECIPIENT_ATTRIBUTION\",\r\n UpdateSingleRecipientAmount = \"UPDATE_SINGLE_RECIPIENT_AMOUNT\",\r\n UpdateSubscriptionStatus = \"UPDATE_SUBSCRIPTION_STATUS\",\r\n SplitAmount = \"SPLIT_AMOUNT\",\r\n UpdateCheckoutForm = \"UPDATE_CHECKOUT\",\r\n UpdateApiErrors = \"UPDATE_API_ERRORS\",\r\n ShowRecipientDialog = \"SHOW_RECIPIENT_DIALOG\",\r\n HideRecipientDialog = \"HIDE_RECIPIENT_DIALOG\",\r\n ShowProcessingIndicator = \"SHOW_PROCESSING_INDICATOR\",\r\n HideProcessingIndicator = \"HIDE_PROCESSING_INDICATOR\"\r\n}\r\n\r\nexport type Action =\r\n | { type: ActionType.LoadCurrentUser, currentUser: CurrentUser }\r\n | { type: ActionType.LoadData, data: any, queryRecipients: QueryRecipient[], urlSlug: string }\r\n | { type: ActionType.ClearRecipientAmounts }\r\n | { type: ActionType.UpdateFilters, filters: Filters }\r\n | { type: ActionType.UpdateDonorType, donorType: DonorType }\r\n | { type: ActionType.MaxOut, amount?: number }\r\n | { type: ActionType.CancelMaxOut }\r\n | { type: ActionType.UpdateApiErrors, apiErrors: ApiError[]; }\r\n | { type: ActionType.UpdateRecipient, recipient: Recipient; }\r\n | { type: ActionType.UpdateRecipientAttribution, identifier: string, attribution: string; }\r\n | { type: ActionType.UpdateRecipientAmount, identifier: string, amount: DonationAmount; }\r\n | { type: ActionType.UpdateSingleRecipientAmount, identifier: string, amount: DonationAmount; }\r\n | { type: ActionType.SplitAmount, amount: number; weighted: boolean; }\r\n | { type: ActionType.UpdateSubscriptionStatus, subscribe: boolean; }\r\n | { type: ActionType.UpdateCheckoutForm, checkoutForm: CheckoutForm }\r\n | { type: ActionType.ShowRecipientDialog, recipientId: string | null }\r\n | { type: ActionType.HideRecipientDialog }\r\n | { type: ActionType.ShowProcessingIndicator, message?: string }\r\n | { type: ActionType.HideProcessingIndicator }\r\n | { type: ActionType.PageNotFound }","import { Dialog } from \"@progress/kendo-react-dialogs\";\r\nimport React, { useContext } from \"react\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport { ActionType } from \"../actions\";\r\n\r\nexport const ProcessingIndicator = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n const indicator = state.processingIndicator;\r\n\r\n return (<>{indicator.show &&\r\n \r\n

    Processing

    \r\n {indicator.message &&\r\n

    {indicator.message}

    \r\n }\r\n
    \r\n \r\n
    \r\n
    }\r\n \r\n );\r\n}\r\n","import { useContext } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { CurrencyFormatter } from \"../common/currency\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport \"./mandatory-fee.scss\";\r\n\r\nexport const MandatoryFee = () => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const { formState: { errors } } = useFormContext();\r\n const config = state.configuration.checkout.mandatoryFee;\r\n\r\n const feesAmount = state.cartAmounts.mandatoryFee;\r\n\r\n return (\r\n
    \r\n {config.title}\r\n {config.content &&

    {config.content} ({CurrencyFormatter.format(feesAmount)})

    }\r\n
    \r\n );\r\n}\r\n","import { useContext } from \"react\";\r\nimport { FieldError, useFormContext } from \"react-hook-form\";\r\nimport { ErrorMessage } from \"../../common\";\r\nimport { ActionType } from \"../actions\";\r\nimport { AttributionList, CheckoutForm, DonationPageStateContext } from \"../state\";\r\nimport \"./attribution.scss\";\r\n\r\nexport const Attribution = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n const { register, formState: { errors } } = useFormContext();\r\n const config = state.configuration.checkout.donationAttribution;\r\n\r\n const recipientsWithDonationAmounts = state.recipients\r\n .filter(r => r.donationAmount && r.donationAmount.amount > 0);\r\n\r\n const recipientsWithAttributionListIds = recipientsWithDonationAmounts.filter(r => r.attributionListId);\r\n\r\n // HANDLERS\r\n const handleChange = (recipientId: string, attribution: string) => {\r\n dispatch({ type: ActionType.UpdateRecipientAttribution, identifier: recipientId, attribution: attribution });\r\n }\r\n\r\n // RENDER\r\n if (!config.enabled || recipientsWithAttributionListIds.length == 0) {\r\n return <>;\r\n }\r\n\r\n // Content\r\n const htmlInContent = config.content?.indexOf(\">\") > -1 || false;\r\n const contentElement = htmlInContent ?\r\n
    \r\n : (config.content &&

    {config.content.replaceAll(\" \", \"\")}

    );\r\n\r\n const recipientFormGroups = recipientsWithAttributionListIds\r\n .map((r, index) => {\r\n // Get the attribution list for this recipient and use its members\r\n const attributionList = config.attributionLists.find(al => al.id == r.attributionListId) as AttributionList;\r\n const members = attributionList?.members;\r\n const options = members.map(m => );\r\n\r\n // Get the error message to display below the select element\r\n let errorMessage = \"\";\r\n if (errors.attributionFields) {\r\n let fe: FieldError | undefined = errors.attributionFields[index];\r\n if (fe) {\r\n errorMessage = fe.message || \"\";\r\n }\r\n }\r\n\r\n return (
    \r\n \r\n \r\n {errorMessage && {errorMessage}}\r\n
    );\r\n }\r\n );\r\n\r\n return (\r\n
    \r\n {config.title}\r\n {contentElement}\r\n\r\n
    \r\n {recipientFormGroups}\r\n
    \r\n
    \r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport { useContext } from \"react\";\r\nimport { useFieldFormContext, ErrorMessage } from \"../../common\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport \"./pac-contact.scss\";\r\n\r\nexport const PacContact = () => {\r\n\r\n const { registerField, register } = useFieldFormContext();\r\n\r\n // Context\r\n const { state } = useContext(DonationPageStateContext);\r\n const checkoutConfiguration = state.configuration.checkout;\r\n const textMessagingOptions = checkoutConfiguration.textMessagingOptIn;\r\n const emailNote = checkoutConfiguration.emailNote;\r\n\r\n // Fields\r\n const fields = {\r\n pacName: {\r\n id: \"pacName\",\r\n name: \"contact.pacName\",\r\n options: {\r\n required: { value: true, message: \"Enter the PAC's name\" },\r\n maxLength: 50\r\n }\r\n },\r\n pacFecId: {\r\n id: \"pacFecId\",\r\n name: \"contact.pacFecId\",\r\n options: {\r\n required: { value: true, message: \"Enter the PAC's FEC ID\" },\r\n maxLength: 50\r\n }\r\n },\r\n firstName: {\r\n id: \"firstName\",\r\n name: \"contact.firstName\",\r\n options: {\r\n required: { value: true, message: \"Enter a first name\" },\r\n maxLength: 50,\r\n validate: (v:string) => v.indexOf(' and ') == -1 && v.indexOf(' & ') == -1 || 'Donations must be attributed to a single donor. Please use one first name or make two separate donations.'\r\n }\r\n },\r\n lastName: {\r\n id: \"lastName\",\r\n name: \"contact.lastName\",\r\n options: {\r\n required: { value: true, message: \"Enter a last name\" },\r\n maxLength: 50\r\n }\r\n },\r\n streetAddress: {\r\n id: \"streetAddress\",\r\n name: \"contact.streetAddress\",\r\n options: {\r\n required: { value: true, message: \"Enter a street address\" },\r\n maxLength: 50\r\n }\r\n },\r\n city: {\r\n id: \"city\",\r\n name: \"contact.city\",\r\n options: {\r\n required: { value: true, message: \"Enter a city\" },\r\n maxLength: 50\r\n }\r\n },\r\n state: {\r\n id: \"state\",\r\n name: \"contact.state\",\r\n options: {\r\n required: { value: true, message: \"Select a state\" },\r\n maxLength: 2\r\n }\r\n },\r\n postalCode: {\r\n id: \"postalCode\",\r\n name: \"contact.postalCode\",\r\n options: {\r\n required: { value: true, message: \"Enter a ZIP code\" },\r\n maxLength: 10\r\n }\r\n },\r\n email: {\r\n id: \"email\",\r\n name: \"contact.email\",\r\n options: {\r\n required: { value: true, message: \"Enter an email address\" },\r\n maxLength: 50,\r\n readOnly: [\"VIP\", \"Authenticated\"].includes(state.configuration.pagePermissionLevel),\r\n title: [\"VIP\", \"Authenticated\"].includes(state.configuration.pagePermissionLevel) ? \"Email address may be updated in the Account Profile page\" : null\r\n }\r\n },\r\n phoneNumber: {\r\n id: \"phoneNumber\",\r\n name: \"contact.phoneNumber\",\r\n options: {\r\n maxLength: 20\r\n }\r\n },\r\n textMessagingOptIn: {\r\n id: \"textMessagingOptIn\",\r\n name: \"contact.textMessagingOptIn\"\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n
    \r\n Federal PAC Information\r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n Contact\r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n {emailNote && {emailNote}}\r\n \r\n
    \r\n
    \r\n \r\n \r\n {textMessagingOptions.enabled && textMessagingOptions.label &&\r\n \r\n }\r\n \r\n
    \r\n
    \r\n \r\n \r\n );\r\n}\r\n","import { useContext, useEffect } from \"react\";\r\nimport { useNavigate } from \"react-location\";\r\nimport { FormProvider, SubmitHandler, useForm, useFormContext } from 'react-hook-form';\r\nimport { DonationPageStateContext, CheckoutForm } from \"../state\";\r\nimport { DonorCoveredFees } from \"./donor-covered-fees\";\r\nimport { CurrencyFormatter } from \"../common/currency\";\r\nimport { Contact } from \"./contact\";\r\nimport { Employment } from \"./employment\";\r\nimport { Payment } from \"./payment\";\r\nimport { Tip } from \"./tip\";\r\nimport { CheckoutCart } from \"./checkout-cart\";\r\nimport { EventAttendance } from \"./event-attendance\";\r\nimport { CustomCheckbox } from \"./custom-checkbox\";\r\nimport { Terms } from \"../common/terms\";\r\nimport { PageHeader } from \"../common/page-header\";\r\nimport { FetchResponse, ErrorSummary, useFetch } from \"../../common\";\r\nimport { ActionType } from \"../actions\";\r\nimport { ProcessingIndicator } from \"../common/processing-indicator\";\r\nimport { MandatoryFee } from \"./mandatory-fee\";\r\nimport { Attribution } from \"./attribution\";\r\nimport { PacContact } from \"./pac-contact\";\r\nimport \"./checkout.scss\";\r\n\r\nexport const Checkout = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n const apiErrors = state.apiErrors;\r\n const navigate = useNavigate();\r\n const eventConfig = state.configuration.event;\r\n const checkoutConfig = state.configuration.checkout;\r\n const donorType = state.donorType;\r\n const conditionConfig = state.configuration.conditionalDonating;\r\n const checkoutForm = state.checkoutForm;\r\n const donateButtonText = state.configuration.conditionalDonating.enabled ? \"Pledge\" : \"Donate\";\r\n\r\n const methods = useForm({\r\n defaultValues: {\r\n ...checkoutForm\r\n }\r\n });\r\n\r\n const {\r\n handleSubmit,\r\n watch,\r\n clearErrors\r\n } = methods;\r\n\r\n const pagePath = state.urlSlug;\r\n\r\n const apiUrl = state.configuration.conditionalDonating.enabled\r\n ? `/api/v2/donation-page/${pagePath}/conditional-donate`\r\n : `/api/v2/donation-page/${pagePath}/donate`\r\n const submitApi = useFetch(apiUrl);\r\n\r\n // Load effects\r\n useEffect(() => {\r\n // Clear any state errors\r\n dispatch({ type: ActionType.UpdateApiErrors, apiErrors: [] });\r\n\r\n // Clear local form errors\r\n clearErrors();\r\n\r\n // Scroll to top\r\n window.scrollTo(0, 0);\r\n }, []);\r\n\r\n // Filter the terms to only those needed in checkout, including any for the tip recipient\r\n const terms = state.terms;\r\n let recipientTermIds = state.recipients.filter(r => r.donationAmount?.amount).flatMap(r => r.termIds);\r\n if (checkoutConfig?.tip?.enabled && checkoutConfig?.tip?.recipient) {\r\n const tipTermIds = checkoutConfig.tip.recipient.termIds;\r\n recipientTermIds = recipientTermIds.concat(tipTermIds);\r\n }\r\n const checkoutTerms = terms.filter(t => recipientTermIds.indexOf(t.id) >= 0 || t.id == \"Default\" || t.id == \"Earmarking\");\r\n\r\n // Ensure the DonationPageStateContext has the updated CheckoutForm data\r\n useEffect(() => {\r\n const subscription = watch((d) => {\r\n dispatch({ type: ActionType.UpdateCheckoutForm, checkoutForm: d as CheckoutForm })\r\n });\r\n\r\n return () => subscription.unsubscribe();\r\n }, [watch]);\r\n\r\n const onSubmit: SubmitHandler = (data: CheckoutForm) => {\r\n // Ensure the state has the updated CheckoutForm data\r\n dispatch({ type: ActionType.UpdateCheckoutForm, checkoutForm: data });\r\n\r\n const body = {\r\n ...data,\r\n payment: {\r\n ...data.payment,\r\n creditCard: data.payment.useStoredPaymentAuthorization ? null : data.payment.creditCard,\r\n electronicCheck: data.payment.useStoredPaymentAuthorization ? null : data.payment.electronicCheck\r\n },\r\n donorCoveredFees: {\r\n enabled: data.donorCoveredFees.enabled,\r\n amount: state.cartAmounts.donorCoveredFees\r\n },\r\n mandatoryFee: {\r\n amount: state.cartAmounts.mandatoryFee\r\n },\r\n page: pagePath,\r\n recipients: state.recipients\r\n .filter(r => r.donationAmount != null && r.donationAmount.amount > 0)\r\n .map(r => { return { identifier: r.identifier, amount: r.donationAmount.amount, attribution: r.attribution } }),\r\n sourceCode: state.sourceCode,\r\n createSubscription: state.createSubscription,\r\n utmTracking: state.utmTracking\r\n }\r\n\r\n if (body.payment.paymentMethod == \"ElectronicCheck\") {\r\n body.payment.creditCard = null;\r\n }\r\n\r\n dispatch({ type: ActionType.ShowProcessingIndicator });\r\n\r\n submitApi.post(body)\r\n .then((response: FetchResponse) => {\r\n dispatch({ type: ActionType.HideProcessingIndicator });\r\n\r\n if (response.success) {\r\n dispatch({ type: ActionType.UpdateApiErrors, apiErrors: [] });\r\n navigate({ to: \"../confirmation\", replace: true });\r\n } else {\r\n dispatch({ type: ActionType.UpdateApiErrors, apiErrors: response.errors });\r\n }\r\n });\r\n }\r\n\r\n const contactForm = donorType == \"FederalPac\" ? : \r\n\r\n if (!checkoutConfig) {\r\n return <>No checkout;\r\n } else {\r\n return (\r\n <>\r\n \r\n \r\n
    \r\n
    \r\n \r\n {checkoutConfig?.customCheckbox?.enabled && }\r\n {eventConfig?.enabled && }\r\n \r\n {contactForm}\r\n { state.donorType != \"FederalPac\" && }\r\n \r\n {checkoutConfig?.tip?.enabled && }\r\n {checkoutConfig?.donorCoveredFees?.enabled && }\r\n {checkoutConfig?.mandatoryFee?.enabled && }\r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n );\r\n }\r\n}\r\n","import { useContext } from \"react\";\r\nimport { CurrencyFormatter } from \"../common/currency\";\r\nimport { PageHeader } from \"../common/page-header\";\r\nimport { DonationPageStateContext } from \"../state\";\r\n\r\nimport \"./confirmation.scss\";\r\n\r\nexport const Confirmation = () => {\r\n const { state } = useContext(DonationPageStateContext);\r\n\r\n const confirmationConfig = state.configuration.confirmation;\r\n\r\n const amounts = state.cartAmounts;\r\n const coveredFeesAmount = state.checkoutForm.donorCoveredFees.enabled ? amounts.donorCoveredFees : 0;\r\n const mandatoryFeeAmount = amounts.mandatoryFee;\r\n const totalAmount = amounts.total;\r\n const tipAmount = amounts.tip;\r\n\r\n const monthNames = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\r\n\r\n const currentDate = (): string => {\r\n const date = new Date();\r\n\r\n const monthName = monthNames[date.getMonth()];\r\n let day = date.getDate().toString();\r\n if (day.length < 2) {\r\n day = `0${day}`;\r\n }\r\n\r\n return `${monthName} ${day}, ${date.getFullYear()}`;\r\n }\r\n\r\n const lineItemRows = state.recipients\r\n .filter(r => r.donationAmount.amount > 0)\r\n .map(r => {\r\n return (\r\n {r.displayName} ({r.legalName})\r\n {CurrencyFormatter.format(r.donationAmount.amount)}\r\n )\r\n });\r\n\r\n if (tipAmount) {\r\n lineItemRows.push({state.configuration.checkout.tip.recipient?.displayName}{CurrencyFormatter.format(tipAmount)});\r\n }\r\n\r\n if (coveredFeesAmount) {\r\n lineItemRows.push(Processing Fees{CurrencyFormatter.format(coveredFeesAmount)});\r\n }\r\n\r\n if (mandatoryFeeAmount) {\r\n lineItemRows.push({state.configuration.checkout.mandatoryFee.lineItemText}{CurrencyFormatter.format(mandatoryFeeAmount)});\r\n }\r\n\r\n return (\r\n <>\r\n \r\n
    \r\n
    \r\n
    \r\n {CurrencyFormatter.format(totalAmount)} \r\n
    \r\n \r\n \r\n {lineItemRows}\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n );\r\n}\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport { RecipientContext, DonationPageStateContext, DonationPageState } from \"../state\";\r\nimport \"./recipient-goal.css\";\r\n\r\nexport const RecipientGoal = () => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const recipient = useContext(RecipientContext);\r\n\r\n if (!state.configuration.slate.goal.enabled || !recipient.goal) {\r\n return <>;\r\n } else {\r\n const progressBarPercent = `${Math.round(recipient.goal.percent)}%`\r\n\r\n return (\r\n
    \r\n
    \r\n
    Fundraising progress to goal ({progressBarPercent})
    \r\n
    \r\n
    \r\n
     
    \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import { useContext } from \"react\";\r\nimport { DonationButtons } from \"../common/donation-buttons\";\r\nimport { DonationAmount, DonationPageStateContext, RecipientContext } from \"../state\";\r\nimport { ActionType } from \"../actions\";\r\nimport \"./recipient-donation.css\";\r\n\r\nexport const RecipientDonation = () => {\r\n\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n const recipient = useContext(RecipientContext);\r\n\r\n const onChangeHandler = (donationAmount: DonationAmount) => {\r\n dispatch({ type: ActionType.UpdateRecipientAmount, identifier: recipient.identifier, amount: donationAmount });\r\n }\r\n\r\n //return useMemo(() => {\r\n return (\r\n
    \r\n {recipient.pausedStatus.paused &&
    }\r\n {!recipient.pausedStatus.paused &&\r\n \r\n }\r\n
    \r\n );\r\n //}, [selectedAmount]);\r\n}\r\n","import { Recipient, SlateConfiguration } from \"../state\";\r\n\r\nexport const shouldShowProfileDialog = (recipient: Recipient, slate: SlateConfiguration) => {\r\n // Only show the dialog if the recipient has a description or link\r\n\r\n let showDialog = false;\r\n\r\n if (slate.recipientDialog.enabled) {\r\n showDialog = recipient.description\r\n || recipient.links.facebook\r\n || recipient.links.instragram\r\n || recipient.links.site\r\n || recipient.links.twitter\r\n || recipient.links.youTube ? true : false;\r\n }\r\n\r\n return showDialog;\r\n}","import React, { useContext, useMemo } from \"react\";\r\nimport { ActionType } from \"../actions\";\r\nimport { RecipientContext, DonationPageStateContext } from \"../state\";\r\nimport { shouldShowProfileDialog } from \"./recipient-helper\";\r\nimport \"./recipient-teaser.css\";\r\n\r\nexport const RecipientTeaser = ({ show }: { show?: boolean }) => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const recipient = useContext(RecipientContext);\r\n const slateConfig = state.configuration.slate;\r\n const recipientTemplateConfig = slateConfig.recipientTemplate;\r\n\r\n // Only show the dialog if the recipient has a description or link\r\n const { dispatch } = useContext(DonationPageStateContext);\r\n\r\n let showDialog = shouldShowProfileDialog(recipient, slateConfig);\r\n\r\n const dialogHandler = () => {\r\n dispatch({ type: ActionType.ShowRecipientDialog, recipientId: recipient.identifier });\r\n }\r\n\r\n const showDialogHandler = showDialog ? dialogHandler : undefined;\r\n\r\n return useMemo(() => {\r\n if (!show && !recipientTemplateConfig.enableProfileTeaser) {\r\n return <>;\r\n } else {\r\n return (\r\n
    \r\n { recipient?.profileTeaser &&

    {recipient?.profileTeaser}

    }\r\n {showDialog &&

    {slateConfig.recipientDialog.showDialogLabel}

    }\r\n
    \r\n );\r\n }\r\n }, [recipientTemplateConfig.enableProfileTeaser])\r\n\r\n\r\n\r\n}\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport { ActionType } from \"../actions\";\r\nimport { DonationPageStateContext, RecipientContext } from \"../state\";\r\nimport { shouldShowProfileDialog } from \"./recipient-helper\";\r\nimport \"./recipient-photo.css\";\r\n\r\nexport const RecipientPhoto = ({ disableDialog = false }: { disableDialog?: boolean}) => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const { dispatch } = useContext(DonationPageStateContext);\r\n const recipient = useContext(RecipientContext);\r\n const pictureClass = disableDialog ? \"\" : \"clickable\";\r\n const slateConfig = state.configuration.slate;\r\n\r\n let showDialog = shouldShowProfileDialog(recipient, slateConfig) && !disableDialog;\r\n let showDialogLink = showDialog && !slateConfig.recipientTemplate.enableProfileTeaser;\r\n\r\n const dialogHandler = () => {\r\n dispatch({ type: ActionType.ShowRecipientDialog, recipientId: recipient.identifier });\r\n }\r\n\r\n const showDialogHandler = showDialog ? dialogHandler : undefined;\r\n\r\n return (\r\n \r\n \"Photo\"\r\n {showDialog && showDialogLink &&

    { slateConfig.recipientDialog.showDialogLabel }

    }\r\n
    \r\n );\r\n}\r\n","import React, { useContext } from \"react\";\r\nimport { ActionType } from \"../actions\";\r\nimport { DonationPageStateContext, RecipientContext } from \"../state\";\r\nimport \"./recipient-info.css\";\r\n\r\nconst interpolate = function(template: string, params: any) {\r\n const names = Object.keys(params);\r\n const vals = Object.values(params);\r\n return new Function(...names, `return \\`${template}\\`;`)(...vals);\r\n}\r\n\r\nexport const RecipientInfo = ({ disableDialog = false }: { disableDialog?: boolean }) => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const recipient = useContext(RecipientContext);\r\n const customTemplate = state.configuration.slate.recipientTemplate.infoTemplate;\r\n\r\n let infoTemplate: JSX.Element | null = null;\r\n\r\n const recipientInfoClass = disableDialog ? \"recipient-info\" : \"recipient-info clickable\";\r\n\r\n // Only show the dialog if the recipient has a description or link\r\n const { dispatch } = useContext(DonationPageStateContext);\r\n\r\n let showDialog = false;\r\n\r\n if (state.configuration.slate.recipientDialog.enabled && !disableDialog) {\r\n showDialog = recipient.description\r\n || recipient.links.facebook\r\n || recipient.links.instragram\r\n || recipient.links.site\r\n || recipient.links.twitter\r\n || recipient.links.youTube ? true : false;\r\n }\r\n\r\n const dialogHandler = () => {\r\n dispatch({ type: ActionType.ShowRecipientDialog, recipientId: recipient.identifier });\r\n }\r\n\r\n const showDialogHandler = showDialog ? dialogHandler : undefined;\r\n\r\n if (customTemplate) {\r\n const innerHtml = interpolate(customTemplate, { recipient: recipient });\r\n infoTemplate =
    ;\r\n } else {\r\n const partyClass = (recipient.politicalParty || \"\").toLowerCase();\r\n const party = recipient.politicalParty\r\n ? {recipient.politicalParty?.substring(0, 1)}\r\n : <>;\r\n infoTemplate =\r\n
    \r\n
    \r\n {recipient.displayName}\r\n {party}\r\n
    \r\n {recipient.office &&
    {recipient.office}
    }\r\n {recipient.district &&
    {recipient.district}
    }\r\n
    \r\n}\r\n\r\n return (\r\n infoTemplate\r\n );\r\n}\r\n","import { useContext } from \"react\";\r\nimport { DonationPageStateContext, RecipientContext } from \"../state\";\r\nimport \"./recipient-featured-banner.css\";\r\n\r\nexport const RecipientFeaturedBanner = () => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const recipient = useContext(RecipientContext);\r\n const bannerText = state.configuration.slate.featuredRecipients.bannerText;\r\n\r\n if (!recipient.featured) {\r\n return <>;\r\n } else {\r\n return (\r\n
    {bannerText}
    \r\n );\r\n }\r\n}\r\n","import React, { useContext } from \"react\";\r\nimport { RecipientContext } from \"../state\";\r\nimport \"./recipient-photo.css\";\r\n\r\nexport const RecipientCustomFields = () => {\r\n const recipient = useContext(RecipientContext);\r\n\r\n const customFields = [];\r\n\r\n if (recipient.customField1) {\r\n customFields.push(
    {recipient.customField1}
    );\r\n }\r\n\r\n if (recipient.customField2) {\r\n customFields.push(
    {recipient.customField2}
    );\r\n }\r\n\r\n if (customFields.length > 0) {\r\n return (\r\n
    \r\n {customFields}\r\n
    \r\n );\r\n } else {\r\n return <>;\r\n }\r\n}\r\n","import { useMemo } from \"react\";\r\nimport { RecipientGoal } from \"./recipient-goal\";\r\nimport { RecipientDonation } from \"./recipient-donation\";\r\nimport { RecipientTeaser } from \"./recipient-teaser\";\r\nimport { RecipientPhoto } from \"./recipient-photo\";\r\nimport { RecipientInfo } from \"./recipient-info\";\r\nimport { RecipientFeaturedBanner } from \"./recipient-featured-banner\";\r\nimport { RecipientCustomFields } from \"./recipient-custom-fields\";\r\nimport { Recipient, RecipientContext } from \"../state\";\r\nimport \"./recipient-card.css\";\r\n\r\nexport const RecipientCard = ({ recipient }: { recipient: Recipient }) => {\r\n return useMemo(() => {\r\n const partyClass = recipient.politicalParty?.toLowerCase().replaceAll(' ', '-') || \"\";\r\n const customField1Class = recipient.customField1?.toLocaleLowerCase().replaceAll(' ', '-') || \"\";\r\n const customField2Class = recipient.customField2?.toLocaleLowerCase().replaceAll(' ', '-') || \"\";\r\n const featuredClass = recipient.featured ? \"featured\" : \"\";\r\n const classes = [];\r\n if (partyClass) {\r\n classes.push(partyClass);\r\n }\r\n\r\n if (customField1Class) {\r\n classes.push(customField1Class);\r\n }\r\n\r\n if (customField2Class) {\r\n classes.push(customField2Class);\r\n }\r\n\r\n if (featuredClass) {\r\n classes.push(featuredClass);\r\n }\r\n\r\n return (\r\n \r\n
  • \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
  • \r\n
    \r\n );\r\n }, [recipient]);\r\n}\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport { RecipientCard } from \"./recipient-card\";\r\nimport { DonationPageStateContext, getFilteredRecipients } from \"../state\";\r\nimport \"./recipient-card-list.css\";\r\nimport { filter } from \"lodash\";\r\n\r\nexport const RecipientCardList = () => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const slateConfig = state.configuration.slate;\r\n const layoutClass = slateConfig.recipientTemplate.layout.toLowerCase();\r\n const filteredRecipients = getFilteredRecipients(state);\r\n const singleClass = filteredRecipients.length == 1 ? \"single\" : \"\";\r\n\r\n const recipientCards = filteredRecipients.map(recipient =>\r\n \r\n );\r\n\r\n const noRecipients = filteredRecipients.length == 0;\r\n if (noRecipients) {\r\n return

    No Matches

    ;\r\n } else {\r\n return (<>\r\n
      \r\n {recipientCards}\r\n
    \r\n );\r\n }\r\n}\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport { RecipientContext } from \"../state\";\r\nimport \"./recipient-description.css\";\r\n\r\nexport const RecipientDescription = ({ show }: { show?: boolean }) => {\r\n const recipient = useContext(RecipientContext);\r\n\r\n const isHtml = recipient.description?.indexOf('<') >= 0;\r\n const descriptionElement = isHtml && recipient?.description\r\n ?
    \r\n :

    {recipient?.description}

    ;\r\n\r\n return useMemo(() => {\r\n if (!show) {\r\n return <>;\r\n } else {\r\n return (\r\n
    \r\n {descriptionElement}\r\n
    \r\n );\r\n }\r\n }, [show]);\r\n}\r\n","import React, { useMemo } from \"react\";\r\nimport { RecipientGoal } from \"./recipient-goal\";\r\nimport { RecipientDonation } from \"./recipient-donation\";\r\nimport { RecipientDescription } from \"./recipient-description\";\r\nimport { RecipientPhoto } from \"./recipient-photo\";\r\nimport { RecipientInfo } from \"./recipient-info\";\r\nimport { RecipientFeaturedBanner } from \"./recipient-featured-banner\";\r\nimport { RecipientCustomFields } from \"./recipient-custom-fields\";\r\nimport { Recipient, RecipientContext } from \"../state\";\r\nimport \"./single-recipient-card.scss\";\r\n\r\nexport const SingleRecipientCard = ({ recipient, showDescription, showDonation, disableDialog = false }: { recipient: Recipient, showDescription: boolean, showDonation: boolean, disableDialog?: boolean }) => {\r\n return useMemo(() => {\r\n const partyClass = recipient.politicalParty?.toLowerCase() || \"\";\r\n const customField1Class = recipient.customField1?.toLocaleLowerCase().replaceAll(' ', '-') || \"\";\r\n const customField2Class = recipient.customField2?.toLocaleLowerCase().replaceAll(' ', '-') || \"\";\r\n const featuredClass = recipient.featured ? \"featured\" : \"\";\r\n\r\n const classes = [];\r\n if (partyClass) {\r\n classes.push(partyClass);\r\n }\r\n\r\n if (customField1Class) {\r\n classes.push(customField1Class);\r\n }\r\n\r\n if (customField2Class) {\r\n classes.push(customField2Class);\r\n }\r\n\r\n if (featuredClass) {\r\n classes.push(featuredClass);\r\n }\r\n\r\n return (\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n {showDonation && }\r\n \r\n {recipient.disclaimer &&
    }\r\n
    \r\n
    \r\n\r\n );\r\n }, [recipient]);\r\n}\r\n","import * as React from \"react\";\r\nimport { useContext } from \"react\";\r\nimport { CurrencyFormatter } from \"../common/currency\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport { ActionType } from \"../actions\";\r\nimport { useNavigate } from \"react-location\";\r\nimport { FetchResponse, useFetch } from \"../../common\";\r\nimport \"./slate-cart.css\";\r\n\r\nexport const SlateCart = ({detailed}: {detailed?: boolean}) => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n const navigate = useNavigate()\r\n\r\n const cartAmounts = state.cartAmounts;\r\n\r\n const showExpressDonate = state.currentUser?.paymentAuthorizationSaved\r\n && !state.configuration.event.enabled\r\n && !state.configuration.checkout.donationAttribution.enabled\r\n && !state.configuration.checkout.mandatoryFee.enabled\r\n && !state.configuration.conditionalDonating.enabled\r\n && state.donorType != \"FederalPac\";\r\n\r\n const donationLimitReached = state.donationLimit.limitReached;\r\n const validDonationAmount = !donationLimitReached && cartAmounts.total > 0;\r\n\r\n const recipientListItems = state.recipients\r\n .filter(r => r.donationAmount.amount > 0)\r\n .map(r =>\r\n
  • {r.displayName}: {CurrencyFormatter.format(r.donationAmount.amount)}
  • \r\n );\r\n\r\n if (cartAmounts.mandatoryFee) {\r\n recipientListItems.push(
  • {state.configuration.checkout.mandatoryFee.lineItemText}: {CurrencyFormatter.format(cartAmounts.mandatoryFee)}
  • );\r\n }\r\n\r\n const navigateToCheckout = () => {\r\n if (validDonationAmount) {\r\n navigate({ to: \"./checkout\", replace: false });\r\n }\r\n }\r\n\r\n const pagePath = window.location.pathname.split(\"/\").filter(p => p != \"\").pop();\r\n const expressApi = useFetch(`/api/v2/donation-page/${pagePath}/express-donate`);\r\n const expressDonate = () => {\r\n if (cartAmounts.total <= 0) {\r\n return;\r\n }\r\n\r\n const body = {\r\n createSubscription: state.createSubscription,\r\n page: pagePath,\r\n sourceCode: state.sourceCode,\r\n recipients: state.recipients.filter(r => r.donationAmount.amount > 0).map(r => { return { identifier: r.identifier, amount: r.donationAmount.amount } }),\r\n mandatoryFee: { amount: cartAmounts.mandatoryFee },\r\n utmTracking: state.utmTracking\r\n }\r\n\r\n dispatch({ type: ActionType.ShowProcessingIndicator });\r\n\r\n expressApi.post(body)\r\n .then((response: FetchResponse) => {\r\n if (response.success) {\r\n navigate({ to: \"../confirmation\", replace: true });\r\n } else {\r\n dispatch({ type: ActionType.UpdateApiErrors, apiErrors: response.errors });\r\n navigate({ to: \"./checkout\", replace: true });\r\n }\r\n\r\n dispatch({ type: ActionType.HideProcessingIndicator });\r\n });\r\n }\r\n\r\n const updateSubscriptionStatus = (subscribe: boolean) => {\r\n dispatch({ type: ActionType.UpdateSubscriptionStatus, subscribe: subscribe });\r\n }\r\n\r\n const formatAmount = (amt: number) => {\r\n return new Intl\r\n .NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" })\r\n .format(amt)\r\n .replace(\".00\", \"\");\r\n }\r\n\r\n const header =

    {formatAmount(cartAmounts.base)}

    ;\r\n\r\n const continueButton = \r\n\r\n const expressDonateButton = ;\r\n\r\n const clearButton = cartAmounts.total > 0\r\n ? dispatch({ type: ActionType.ClearRecipientAmounts })}>Clear\r\n : <>\r\n\r\n const subscriptionCheckbox = state.configuration.slate.subscription.enabled\r\n ? \r\n : <>\r\n\r\n if (showExpressDonate) {\r\n return (\r\n
    \r\n {header}\r\n {subscriptionCheckbox}\r\n {expressDonateButton}\r\n Continue without using Express Donate\r\n {clearButton}\r\n
    \r\n );\r\n }\r\n else {\r\n return (\r\n
    \r\n {header}\r\n {detailed &&
      \r\n {recipientListItems}\r\n
    }\r\n {continueButton}\r\n {subscriptionCheckbox}\r\n {clearButton}\r\n
    \r\n );\r\n }\r\n}\r\n","import { useContext, useState } from \"react\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport { ActionType } from \"../actions\";\r\nimport \"./split-it.css\";\r\n\r\nexport const SplitIt = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n const [amount, setAmount] = useState(\"\");\r\n const splitIt = state.configuration.slate.splitIt;\r\n const handleSplitIt = (e: any) => {\r\n e.preventDefault();\r\n dispatch({ type: ActionType.SplitAmount, amount: parseFloat(amount), weighted: false });\r\n setAmount(\"\");\r\n }\r\n\r\n const handleAmountChange = (e: any) => {\r\n if (e.target.value.length <= 9) {\r\n setAmount(e.target.value);\r\n } else {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n const splitButton = \r\n\r\n if (!splitIt.enabled) {\r\n return <>;\r\n } else {\r\n return (\r\n
    \r\n
    \r\n

    {splitIt.title}

    \r\n

    {splitIt.content}

    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n {splitButton}\r\n
    \r\n );\r\n }\r\n}\r\n","import { useContext, useState } from \"react\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport { ActionType } from \"../actions\";\r\nimport \"./weighted-split-it.css\";\r\n\r\nexport const WeightedSplitIt = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n const [amount, setAmount] = useState(\"\");\r\n const config = state.configuration.slate.weightedSplitIt;\r\n const handleSplitIt = (e: any) => {\r\n e.preventDefault();\r\n dispatch({ type: ActionType.SplitAmount, amount: parseFloat(amount), weighted: true });\r\n setAmount(\"\");\r\n }\r\n\r\n const handleAmountChange = (e: any) => {\r\n if (e.target.value.length <= 9) {\r\n setAmount(e.target.value);\r\n } else {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n const splitButton = \r\n\r\n if (!config.enabled) {\r\n return <>;\r\n } else {\r\n return (\r\n
    \r\n
    \r\n

    {config.title}

    \r\n

    {config.content}

    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n {splitButton}\r\n
    \r\n );\r\n }\r\n}\r\n","import { Dialog, DialogActionsBar } from \"@progress/kendo-react-dialogs\";\r\nimport * as React from \"react\";\r\nimport { useContext } from \"react\";\r\nimport { ActionType } from \"../actions\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport \"./max-out.css\";\r\n\r\nexport const MaxOut = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n const [input, setInput] = React.useState(0);\r\n\r\n const maxOut = state.configuration.slate.maxOut;\r\n const thresholdAmountDisplay = new Intl\r\n .NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" })\r\n .format(maxOut.thresholdAmount)\r\n .replace(\".00\", \"\");\r\n\r\n if (!maxOut.enabled) {\r\n return <>;\r\n } else {\r\n return (\r\n <>\r\n
    \r\n
    \r\n

    {maxOut.title}

    \r\n

    {maxOut.content}

    \r\n
    \r\n \r\n
    \r\n { state.maxOut.showDialog &&\r\n dispatch({ type: ActionType.CancelMaxOut }) }>\r\n

    One or more recipients on this page have no maximum donation limit or a limit above {thresholdAmountDisplay}. Please enter the amount you wish to donate to each of these recipients.

    Please note: the amount you enter will only be applied to recipients above the threshold, all other recipients on the page will receive their maximum donation (even if what you enter in this box is a lower amount).

    \r\n

    \r\n

    \r\n \r\n setInput(parseFloat(e.target.value))} />\r\n
    \r\n

    \r\n \r\n \r\n \r\n \r\n
    }\r\n \r\n );\r\n }\r\n}\r\n","import { useContext } from \"react\";\r\nimport { ActionType } from \"../actions\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport \"./featured-toggle.css\";\r\n\r\nexport const FeaturedToggle = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n\r\n const updateFilters = (filtered: boolean) => {\r\n const filters = {\r\n ...state.filters,\r\n featured: filtered\r\n };\r\n\r\n dispatch({ type: ActionType.UpdateFilters, filters: filters });\r\n }\r\n\r\n const featuredConfig = state.configuration.slate.featuredRecipients;\r\n\r\n const featuredClasses = state.filters.featured ? \"featured selected\" : \"featured\";\r\n const allClasses = state.filters.featured ? \"all\" : \"all selected\";\r\n\r\n if (!featuredConfig.enabled) {\r\n return <>;\r\n } else {\r\n return (\r\n
    \r\n \r\n \r\n
    \r\n );\r\n }\r\n}\r\n","import { useContext } from \"react\";\r\nimport { uniq, filter, map } from \"lodash\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport { ActionType } from \"../actions\";\r\nimport {\r\n MultiSelect,\r\n MultiSelectChangeEvent,\r\n} from \"@progress/kendo-react-dropdowns\";\r\nimport { TextBox, TextBoxChangeEvent } from \"@progress/kendo-react-inputs\";\r\nimport \"./slate-filters.css\";\r\n\r\nexport const SlateFilters = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n\r\n const handleChange = (event: MultiSelectChangeEvent) => {\r\n if (event.target.name) {\r\n const filters: any = {\r\n ...state.filters,\r\n };\r\n\r\n filters[event.target.name] = event.value;\r\n\r\n dispatch({ type: ActionType.UpdateFilters, filters: filters });\r\n }\r\n }\r\n\r\n const handleFilterByName = (event: TextBoxChangeEvent) => {\r\n if (event.target.element) {\r\n const filters: any = {\r\n ...state.filters,\r\n };\r\n\r\n filters[event.target.element.name] = event.value;\r\n dispatch({ type: ActionType.UpdateFilters, filters: filters });\r\n }\r\n }\r\n\r\n const filterConfig = state.configuration.slate.filters;\r\n\r\n if (!filterConfig.enabled) {\r\n return <>\r\n } else {\r\n const filters = [];\r\n\r\n const getOptions = (field: string) => {\r\n return uniq(filter(map(state.recipients, field), (p) => p != null)).sort();\r\n }\r\n\r\n const offices = getOptions(\"office\");\r\n const states = getOptions(\"state\");\r\n const politicalParties = getOptions(\"politicalParty\");\r\n const customField1Options = getOptions(\"customField1\");\r\n const customField2Options = getOptions(\"customField2\");\r\n\r\n if (filterConfig.displayName && state.recipients.length > 20) {\r\n filters.push();\r\n }\r\n\r\n if (filterConfig.office && offices.length > 0) {\r\n filters.push()\r\n }\r\n\r\n if (filterConfig.state && states.length > 0) {\r\n filters.push()\r\n }\r\n\r\n if (filterConfig.politicalParty && politicalParties.length > 0) {\r\n filters.push()\r\n }\r\n\r\n if (filterConfig.customField1 && customField1Options.length > 0) {\r\n filters.push()\r\n }\r\n\r\n if (filterConfig.customField2 && customField2Options.length > 0) {\r\n filters.push()\r\n }\r\n\r\n return (\r\n
    \r\n {filters}\r\n
    \r\n );\r\n }\r\n}\r\n","import React, { useContext } from \"react\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelContent,\r\n} from \"@progress/kendo-react-layout\";\r\nimport { Reveal } from \"@progress/kendo-react-animation\";\r\nimport { DonationPageStateContext, Recipient } from \"../state\";\r\nimport \"./extended-profile.css\";\r\n\r\nexport const ExtendedProfile = ({ recipient }: { recipient: Recipient }) => {\r\n\r\n const { state } = useContext(DonationPageStateContext);\r\n const recipientDialogConfig = state.configuration.slate.recipientDialog;\r\n const fields = recipient.extendedProfileFields || [];\r\n const [expanded, setExpanded] = React.useState(\"\");\r\n\r\n let expanders = fields.sort((f1, f2) => f1.order - f2.order).map(field => {\r\n let panel =\r\n {\r\n setExpanded(event.expanded ? \"\" : field.name);\r\n }}>\r\n \r\n {expanded === field.name && (\r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n \r\n\r\n return panel;\r\n });\r\n\r\n if (expanders.length == 0) {\r\n return <>;\r\n }\r\n\r\n return

    {recipientDialogConfig.extendedProfileTitle}

    \r\n {expanders}\r\n
    ;\r\n}","import React, { useContext } from \"react\";\r\nimport { Dialog } from \"@progress/kendo-react-dialogs\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport { ActionType } from \"../actions\";\r\nimport { SingleRecipientCard } from \"./single-recipient-card\";\r\nimport \"./recipient-dialog.css\";\r\nimport { ExtendedProfile } from \"./extended-profile\";\r\n\r\nexport const RecipientDialog = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n const dialog = state.recipientDialog;\r\n\r\n const recipient = state.recipients.find((r) => r.identifier === dialog.recipientId);\r\n\r\n // Links\r\n const links = [];\r\n\r\n if (recipient?.links?.facebook) {\r\n links.push( Facebook);\r\n }\r\n\r\n if (recipient?.links?.twitter) {\r\n links.push( x.com);\r\n }\r\n\r\n if (recipient?.links?.youTube) {\r\n links.push( YouTube);\r\n }\r\n\r\n if (recipient?.links?.site) {\r\n links.push( Web Site);\r\n }\r\n\r\n return (<>{recipient && dialog.show &&\r\n dispatch({type: ActionType.HideRecipientDialog})}>\r\n \r\n {links.length > 0 &&
    {links}
    }\r\n \r\n
    }\r\n \r\n );\r\n}\r\n","import { useContext } from \"react\";\r\nimport { DonationPageStateContext } from \"../state\";\r\n\r\nimport \"./notification-banner.css\";\r\n\r\nconst formatAmount = (amt: number) => {\r\n return new Intl\r\n .NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" })\r\n .format(amt)\r\n .replace(\".00\", \"\");\r\n}\r\n\r\nexport const NotificationBanner = () => {\r\n const { state } = useContext(DonationPageStateContext);\r\n\r\n if (!state.configuration.donationLimit.enabled) {\r\n return <>;\r\n }\r\n\r\n const donationLimitReached = state.donationLimit.limitReached;\r\n if (!donationLimitReached) {\r\n return <>\r\n }\r\n\r\n // This should be moved somewhere central, probably the reducer\r\n const donatedAmount = state.donationLimit.donatedAmount;\r\n\r\n let message = \"\";\r\n\r\n if (donatedAmount == 0) {\r\n message = `You are limited to donating ${formatAmount(state.configuration.donationLimit.limit)} via this page. Please adjust your donation amount accordingly.`;\r\n } else if (state.configuration.donationLimit.remaining > 0) {\r\n message = `You are limited to donating ${formatAmount(state.configuration.donationLimit.limit)} via this page and you have already donated ${ formatAmount(donatedAmount) }. Please adjust your donation amount accordingly.`;\r\n } else {\r\n message = `You are limited to donating ${formatAmount(state.configuration.donationLimit.limit)} via this page and you have already donated ${formatAmount(donatedAmount)}.`;\r\n }\r\n\r\n return (
    \r\n {message}\r\n
    )\r\n}\r\n","import { useContext, useEffect, useState } from \"react\";\r\nimport { ActionType } from \"../actions\";\r\nimport { DonationPageStateContext, DonorType } from \"../state\";\r\nimport \"./pac-donation-toggle.css\";\r\n\r\nexport const PacDonationToggle = () => {\r\n const { state, dispatch } = useContext(DonationPageStateContext);\r\n\r\n const toggleDonorType = (donorType: DonorType) => {\r\n dispatch({ type: ActionType.UpdateDonorType, donorType: donorType })\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n}\r\n","import { useContext } from \"react\";\r\nimport { DonationPageStateContext } from \"../state\";\r\nimport { Terms } from \"../common/terms\";\r\nimport { RecipientCardList } from \"./recipient-card-list\";\r\nimport { SingleRecipientCard } from \"./single-recipient-card\";\r\nimport { SlateCart } from \"./slate-cart\";\r\nimport { SplitIt } from \"./split-it\";\r\nimport { WeightedSplitIt } from \"./weighted-split-it\";\r\nimport { MaxOut } from \"./max-out\";\r\nimport { FeaturedToggle } from \"./featured-toggle\";\r\nimport { SlateFilters } from \"./slate-filters\";\r\nimport { RecipientDialog } from \"./recipient-dialog\";\r\nimport { PageHeader } from \"../common/page-header\";\r\nimport { ProcessingIndicator } from \"../common/processing-indicator\";\r\nimport { NotificationBanner } from \"./notification-banner\";\r\nimport { PacDonationToggle } from \"./pac-donation-toggle\";\r\nimport \"./slate.css\";\r\n\r\nexport const Slate = () => {\r\n const { state } = useContext(DonationPageStateContext);\r\n const isSingleRecipient = state.recipients.length == 1;\r\n const slateConfig = state.configuration.slate;\r\n const context = state.configuration.context;\r\n const recipientsLayout = isSingleRecipient\r\n ? <>\r\n {state.configuration.pacDonation.enabled && }\r\n \r\n \r\n :
    \r\n {state.configuration.pacDonation.enabled && }\r\n \r\n \r\n \r\n
    ;\r\n const slateLayoutClasses = isSingleRecipient ? \"slate single content\" : \"slate multiple content\";\r\n const tools = isSingleRecipient ? <>
    \r\n : <>
    \r\n\r\n\r\n const terms = state.currentUser?.paymentAuthorizationSaved ?
    :
    ;\r\n\r\n return (\r\n <>\r\n \r\n\r\n
    \r\n \r\n {recipientsLayout}\r\n
    \r\n {tools}\r\n
    \r\n {terms}\r\n \r\n \r\n
    \r\n\r\n
    \r\n \r\n );\r\n}\r\n","import { CartAmounts, DonationPageState } from \"./state\";\r\n\r\nexport const calculateCartAmounts = (state: DonationPageState): CartAmounts => {\r\n const checkoutForm = state.checkoutForm;\r\n const checkoutConfig = state.configuration.checkout;\r\n\r\n // Get and calculate base and tip amounts\r\n const baseAmount = state.recipients.reduce((acc, r) => acc + (r.donationAmount.amount || 0), 0);\r\n const tipAmount = checkoutForm.tip.amount || 0;\r\n const baseAndTipAmount = baseAmount + tipAmount;\r\n\r\n // Determine donor-covered fees amount and update form state value if needed\r\n const paymentMethod = checkoutForm.payment.paymentMethod;\r\n\r\n const donorCoveredFeeBase = paymentMethod === \"ElectronicCheck\" ? checkoutConfig.donorCoveredFees.electronicCheckBase\r\n : checkoutConfig.donorCoveredFees.creditCardBase;\r\n\r\n const donorCoveredFeeRate = paymentMethod === \"ElectronicCheck\" ? checkoutConfig.donorCoveredFees.electronicCheckRate\r\n : checkoutConfig.donorCoveredFees.creditCardRate;\r\n\r\n const donorCoveredFeesAmount = donorCoveredFeeBase + (baseAndTipAmount * donorCoveredFeeRate);\r\n\r\n // Determine mandatory fee amount and update form state value if needed\r\n const mandatoryFeeConfig = checkoutConfig.mandatoryFee;\r\n const includeMandatoryFee = mandatoryFeeConfig.enabled && baseAndTipAmount > 0;\r\n\r\n let mandatoryFeeAmount = mandatoryFeeConfig.baseAmount + (baseAndTipAmount * mandatoryFeeConfig.rate);\r\n if (mandatoryFeeConfig.maximumAmount && mandatoryFeeAmount > mandatoryFeeConfig.maximumAmount) {\r\n mandatoryFeeAmount = mandatoryFeeConfig.maximumAmount;\r\n }\r\n\r\n // Calculate the total amount and update form state value if needed\r\n let totalAmount = baseAndTipAmount;\r\n const includeDonorCoveredFees = checkoutForm.donorCoveredFees.enabled;\r\n\r\n if (includeDonorCoveredFees && baseAndTipAmount > 0) {\r\n totalAmount += donorCoveredFeesAmount\r\n }\r\n\r\n if (includeMandatoryFee && baseAndTipAmount > 0) {\r\n totalAmount += mandatoryFeeAmount\r\n }\r\n\r\n return {\r\n base: baseAmount,\r\n total: totalAmount,\r\n mandatoryFee: mandatoryFeeAmount,\r\n donorCoveredFees: donorCoveredFeesAmount,\r\n tip: tipAmount\r\n }\r\n}","import { DonationPageState, getFilteredRecipients, OtherAmount, QueryRecipient, Recipient, SuggestedAmount, Term, TipRecipient } from \"./state\";\r\nimport { Action, ActionType } from \"./actions\";\r\nimport { calculateCartAmounts } from \"./cart-calculator\";\r\nimport _ from \"lodash\";\r\n\r\n// REDUCERS\r\nconst getActiveFilteredRecipients = (state: any) => {\r\n return getFilteredRecipients(state).filter(r => !r.pausedStatus.paused);\r\n}\r\n\r\nexport const donationPageReducer = (state: DonationPageState, action: Action): DonationPageState => {\r\n const updatedState = donationPageReducerCore(state, action);\r\n\r\n // Get recalculated cart amounts\r\n const cartAmounts = calculateCartAmounts(updatedState);\r\n\r\n // Calculate donation limit\r\n const donationLimitReached = state.configuration.donationLimit.enabled ? cartAmounts.base > state.configuration.donationLimit.remaining : false;\r\n const donationTotal = state.configuration.donationLimit.donationTotal;\r\n\r\n const updatedDonationLimit = {\r\n limitReached: donationLimitReached,\r\n donatedAmount: donationTotal\r\n }\r\n\r\n return {\r\n ...updatedState,\r\n cartAmounts: cartAmounts,\r\n donationLimit: updatedDonationLimit\r\n }\r\n}\r\n\r\nconst donationPageReducerCore = (state: DonationPageState, action: Action) : DonationPageState => {\r\n switch (action.type) {\r\n case ActionType.LoadCurrentUser: {\r\n // Populate the currentUser and the checkoutForm\r\n const currentUser = action.currentUser;\r\n\r\n // Get current user's employment status\r\n const currentUserNotEmployed = currentUser?.employer == \"Not Employed\" && currentUser?.occupation == \"Not Employed\";\r\n const currentUserRetired = currentUser?.employer == \"Retired\" && currentUser?.occupation == \"Retired\";\r\n const employmentStatus = currentUserRetired ? \"Retired\" :\r\n (currentUserNotEmployed ? \"NotEmployed\" : \"Employed\");\r\n\r\n const checkoutForm = {\r\n ...state.checkoutForm,\r\n payment: {\r\n ...state.checkoutForm.payment,\r\n useStoredPaymentAuthorization: currentUser?.paymentAuthorizationSaved\r\n },\r\n contact: {\r\n firstName: currentUser?.firstName,\r\n lastName: currentUser?.lastName,\r\n streetAddress: currentUser.address,\r\n city: currentUser.city,\r\n state: currentUser.state,\r\n postalCode: currentUser.postalCode,\r\n email: currentUser.email,\r\n phoneNumber: currentUser.phoneNumber,\r\n textMessagingOptIn: false\r\n },\r\n employment: {\r\n status: <\"Employed\" | \"Retired\" | \"NotEmployed\">employmentStatus,\r\n employer: currentUser.employer,\r\n occupation: currentUser.occupation,\r\n streetAddress: currentUser.employerAddress,\r\n city: currentUser.employerCity,\r\n state: currentUser.employerState,\r\n postalCode: currentUser.employerPostalCode\r\n }\r\n }\r\n\r\n return {\r\n ...state,\r\n currentUser: currentUser,\r\n checkoutForm: checkoutForm\r\n };\r\n }\r\n case ActionType.PageNotFound: {\r\n return {\r\n ...state,\r\n configuration: {\r\n ...state.configuration,\r\n status: \"NotFound\"\r\n }\r\n }\r\n }\r\n case ActionType.LoadData: {\r\n\r\n // Figure out the new donor type. Only override with defaultDonorType if the state value\r\n // is still Default. Otherwise, it has been manually changed and shouldn't be updated with\r\n // the page default. Also, if still Default, set to Individual if PAC donating isn't enabled.\r\n let updatedDonorType = state.donorType;\r\n if (state.donorType == \"Default\") {\r\n if (action.data.configuration.pacDonation.enabled) {\r\n updatedDonorType = action.data.configuration.pacDonation.defaultDonorType || \"Individual\";\r\n }\r\n else {\r\n updatedDonorType = \"Individual\";\r\n }\r\n }\r\n\r\n let suggestedAmounts:number[] = action.data.configuration.slate.suggestedDonationAmounts;\r\n\r\n let dataLoadedState: DonationPageState = {\r\n ...state,\r\n configuration: action.data.configuration,\r\n recipients: action.data.recipients.map((r: any) => {\r\n return {\r\n ...r,\r\n donationAmount: _.includes(suggestedAmounts, r.amount) ? new SuggestedAmount(r.amount) : new OtherAmount(r.amount)\r\n }\r\n }),\r\n donorType: updatedDonorType,\r\n terms: action.data.terms,\r\n urlSlug: action.urlSlug\r\n };\r\n\r\n // Apply default values based on config\r\n if (dataLoadedState.configuration.slate.featuredRecipients.enabled) {\r\n dataLoadedState.filters.featured = dataLoadedState.configuration.slate.featuredRecipients.defaultFilter == \"Featured\";\r\n }\r\n\r\n // Apply query string recipients\r\n if (action.queryRecipients.length > 0) {\r\n dataLoadedState = applyQueryRecipients(dataLoadedState, action.queryRecipients);\r\n }\r\n\r\n // Add earmarking term\r\n if (dataLoadedState.configuration.earmarking.enabled) {\r\n const nonEarmarkedRecipients = dataLoadedState.recipients.filter(r => r.earmarked === false);\r\n if (nonEarmarkedRecipients.length > 0 && dataLoadedState.terms.every(t => t.id != \"Earmarking\")) {\r\n let termContent = \"Contributions to the following candidates are direct donations in accordance with FEC Advisory Opinion 2011-06 and do not constitute earmarked contributions within the meaning of 11 C.F.R. §110.6(b): \";\r\n termContent += nonEarmarkedRecipients.map(r => r.displayName).join(\", \") + \".\";\r\n dataLoadedState.terms.push({ id: \"Earmarking\", content: termContent });\r\n }\r\n }\r\n\r\n // Modify contact if PAC donation\r\n const pacDonation = state.donorType == \"FederalPac\";\r\n if (pacDonation) {\r\n dataLoadedState.checkoutForm.contact.streetAddress = \"\";\r\n dataLoadedState.checkoutForm.contact.city = \"\";\r\n dataLoadedState.checkoutForm.contact.state = \"\";\r\n dataLoadedState.checkoutForm.contact.postalCode = \"\";\r\n }\r\n\r\n return dataLoadedState;\r\n }\r\n case ActionType.ClearRecipientAmounts: {\r\n const updatedRecipients = state.recipients.map(r => {\r\n return { ...r, donationAmount: new OtherAmount(0) };\r\n });\r\n\r\n return {\r\n ...state,\r\n recipients: updatedRecipients\r\n };\r\n }\r\n case ActionType.MaxOut: {\r\n const filteredRecipientIds = getActiveFilteredRecipients(state).map(r => r.identifier);\r\n\r\n // Check if any recipients have no limit or a limit higher than the threshold\r\n const threshold = state.configuration.slate.maxOut.thresholdAmount;\r\n const promptForCustomMax = state.recipients.some(r => filteredRecipientIds.indexOf(r.identifier) >= 0 && (r.contributionLimit == 0 || r.contributionLimit > threshold));\r\n if (promptForCustomMax && !action.amount) {\r\n return {\r\n ...state,\r\n maxOut: {\r\n showDialog: true\r\n }\r\n };\r\n }\r\n\r\n // Apply max out amounts\r\n const updatedRecipients = maxOut(filteredRecipientIds, state.recipients, action.amount || 0, threshold);\r\n\r\n return {\r\n ...state,\r\n recipients: updatedRecipients,\r\n maxOut: {\r\n showDialog: false\r\n }\r\n };\r\n }\r\n case ActionType.CancelMaxOut: {\r\n return {\r\n ...state,\r\n maxOut: {\r\n showDialog: false\r\n }\r\n }\r\n }\r\n case ActionType.SplitAmount: {\r\n const filteredRecipientIds = getActiveFilteredRecipients(state).map(r => r.identifier);\r\n const updatedRecipients = action.weighted\r\n ? weightedSplitAmount(action.amount, filteredRecipientIds, state.recipients)\r\n : splitAmount(action.amount, filteredRecipientIds, state.recipients);\r\n\r\n return {\r\n ...state,\r\n recipients: updatedRecipients,\r\n };\r\n\r\n }\r\n case ActionType.UpdateDonorType:\r\n // Empty out the stored address if donation is a PAC since the address needs to be\r\n // the PAC address, not the user's address.\r\n let updatedContact = { ...state.checkoutForm.contact };\r\n if (action.donorType == \"FederalPac\") {\r\n updatedContact.streetAddress = \"\";\r\n updatedContact.city = \"\";\r\n updatedContact.state = \"\";\r\n updatedContact.postalCode = \"\";\r\n }\r\n\r\n return {\r\n ...state,\r\n donorType: action.donorType,\r\n donorTypeUpdated: true,\r\n checkoutForm: {\r\n ...state.checkoutForm,\r\n contact: updatedContact\r\n },\r\n configuration: {\r\n ...state.configuration,\r\n status: \"Loading\"\r\n }\r\n }; \r\n case ActionType.UpdateFilters:\r\n return {\r\n ...state,\r\n filters: action.filters\r\n };\r\n case ActionType.UpdateCheckoutForm:\r\n return {\r\n ...state,\r\n checkoutForm: { ...action.checkoutForm }\r\n };\r\n case ActionType.UpdateSubscriptionStatus:\r\n return {\r\n ...state,\r\n createSubscription: action.subscribe\r\n };\r\n case ActionType.UpdateApiErrors:\r\n return {\r\n ...state,\r\n apiErrors: action.apiErrors\r\n };\r\n case ActionType.UpdateRecipientAmount: {\r\n const updatedRecipients = state.recipients.map(r => {\r\n if (r.identifier == action.identifier) {\r\n return { ...r, donationAmount: action.amount };\r\n } else {\r\n return r;\r\n }\r\n });\r\n\r\n return {\r\n ...state,\r\n recipients: updatedRecipients\r\n };\r\n }\r\n case ActionType.UpdateSingleRecipientAmount: {\r\n const updatedRecipients = state.recipients.map(r => {\r\n if (r.identifier == action.identifier) {\r\n return { ...r, amount: action.amount };\r\n } else {\r\n return { ...r, amount: 0 };\r\n }\r\n });\r\n\r\n return {\r\n ...state,\r\n recipients: updatedRecipients\r\n };\r\n }\r\n case ActionType.UpdateRecipientAttribution: {\r\n const updatedRecipients = state.recipients.map(r => {\r\n if (r.identifier == action.identifier) {\r\n return { ...r, attribution: action.attribution };\r\n } else {\r\n return r;\r\n }\r\n });\r\n\r\n return {\r\n ...state,\r\n recipients: updatedRecipients\r\n };\r\n }\r\n case ActionType.ShowRecipientDialog: {\r\n return {\r\n ...state,\r\n recipientDialog: {\r\n ...state.recipientDialog,\r\n show: true,\r\n recipientId: action.recipientId\r\n }\r\n };\r\n }\r\n case ActionType.HideRecipientDialog: {\r\n return {\r\n ...state,\r\n recipientDialog: {\r\n ...state.recipientDialog,\r\n show: false,\r\n recipientId: null\r\n }\r\n };\r\n }\r\n case ActionType.ShowProcessingIndicator: {\r\n return {\r\n ...state,\r\n processingIndicator: {\r\n ...state.processingIndicator,\r\n show: true,\r\n message: action.message\r\n }\r\n };\r\n }\r\n case ActionType.HideProcessingIndicator: {\r\n return {\r\n ...state,\r\n processingIndicator: {\r\n ...state.processingIndicator,\r\n show: false,\r\n message: \"\"\r\n }\r\n };\r\n }\r\n default:\r\n console.error(\"Unknown action:\", action);\r\n return state;\r\n }\r\n};\r\n\r\nconst applyQueryRecipients = (state: DonationPageState, queryRecipients: QueryRecipient[]) => {\r\n const updatedConfiguration = {\r\n ...state.configuration,\r\n slate: {\r\n ...state.configuration.slate,\r\n featuredRecipients: {\r\n ...state.configuration.slate.featuredRecipients,\r\n enabled: false\r\n }\r\n }\r\n };\r\n\r\n const updatedFilters = {\r\n ...state.filters,\r\n featured: false\r\n }\r\n\r\n const updatedRecipients =\r\n state.recipients\r\n .filter(r => queryRecipients.some(qr => qr.identifier === r.identifier))\r\n .map(r => {\r\n const queryAmount = queryRecipients\r\n .find(qr => qr.identifier === r.identifier)\r\n ?.amount || 0;\r\n\r\n const baseAmount = r.contributionLimit ? Math.min(r.contributionLimit, queryAmount) : queryAmount;\r\n const normalizedAmount = Math.max(0, baseAmount);\r\n\r\n return {\r\n ...r,\r\n donationAmount: new OtherAmount(normalizedAmount)\r\n }\r\n });\r\n\r\n const updatedTerms = filterTerms(state.terms, updatedRecipients, updatedConfiguration.checkout.tip.recipient);\r\n\r\n return {\r\n ...state,\r\n configuration: updatedConfiguration,\r\n filters: updatedFilters,\r\n recipients: updatedRecipients,\r\n terms: updatedTerms\r\n }\r\n}\r\n\r\nconst filterTerms = (terms: Term[], recipients: Recipient[], tipRecipient?: TipRecipient) : Term[] => {\r\n let recipientTermIds = recipients.filter(r => r.donationAmount && r.donationAmount.amount).flatMap(r => r.termIds);\r\n if (tipRecipient) {\r\n const tipTermIds = tipRecipient.termIds;\r\n recipientTermIds = recipientTermIds.concat(tipTermIds);\r\n }\r\n\r\n return terms.filter(t => recipientTermIds.indexOf(t.id) >= 0);\r\n}\r\n\r\n// Maxes out all filtered recipients, leaving the others as-is and returning\r\n// all recipients\r\nconst maxOut = (filteredRecipientIds: string[], recipients: Recipient[], inputAmount: number, thresholdAmount: number) => {\r\n\r\n console.log(\"maxOut\", filteredRecipientIds);\r\n console.log(\"inputAmount\", inputAmount);\r\n console.log(\"thresholdAmount\", thresholdAmount);\r\n\r\n // Make a copy and zero-out all amounts in the filteredRecipients\r\n const recipientsCopy = recipients.map(r => {\r\n if (filteredRecipientIds.includes(r.identifier)) {\r\n return { ...r, donationAmount: new OtherAmount(0) };\r\n } else {\r\n return { ...r };\r\n }\r\n });\r\n\r\n return recipientsCopy.map((recipient: Recipient) => {\r\n if (filteredRecipientIds.includes(recipient.identifier)) {\r\n const contributionLimit = recipient.contributionLimit;\r\n if (contributionLimit == 0) { // If recipient doesn't have a contribution limit, set their amount to the input amount\r\n recipient.donationAmount = new OtherAmount(inputAmount);\r\n }\r\n else if (contributionLimit > thresholdAmount) { // If recipient's limit is above the threshold, set their amount to the input amount, not to exceed the limit\r\n if (inputAmount > contributionLimit) {\r\n recipient.donationAmount = new OtherAmount(contributionLimit);\r\n } else {\r\n recipient.donationAmount = new OtherAmount(inputAmount);\r\n }\r\n }\r\n else { // Set the amount to the limit of the recipient\r\n recipient.donationAmount = new OtherAmount(contributionLimit);\r\n }\r\n }\r\n\r\n return recipient;\r\n });\r\n}\r\n\r\n// Splits an amount between the given recipients\r\nconst splitAmount = (amount: number, filteredRecipientIds: string[], recipients: Recipient[]) => {\r\n if (!amount) {\r\n return recipients;\r\n }\r\n\r\n // Make a copy and zero-out all amounts in the filteredRecipients\r\n const recipientsCopy = recipients.map(r => {\r\n if (filteredRecipientIds.includes(r.identifier)) {\r\n return { ...r, donationAmount: new OtherAmount(0) };\r\n } else {\r\n return { ...r };\r\n }\r\n });\r\n\r\n const splitEvenlyToRecipients = function (recipients: Recipient[], total: number) {\r\n var divider = recipients.length;\r\n recipients.map(recipient => {\r\n recipient.donationAmount = new OtherAmount(0);\r\n });\r\n\r\n // $1 minimum amount\r\n var minimumAmount = 100;\r\n while (divider > 0 && total >= minimumAmount) {\r\n var dividedAmount = Math.max(minimumAmount, Math.round(total / divider));\r\n var recipient = recipients[divider - 1];\r\n\r\n recipient.donationAmount = new OtherAmount(dividedAmount / 100);\r\n divider--;\r\n total -= dividedAmount;\r\n }\r\n }\r\n\r\n var eligibleRecipients = recipientsCopy.filter(recipient => {\r\n // Can't split on recipients with goals achieved or contribution limit reached\r\n if (recipient.goal?.achieved) {\r\n return false;\r\n }\r\n\r\n // Don't include non-filtered recipients\r\n if (!filteredRecipientIds.includes(recipient.identifier)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n });\r\n\r\n var totalAmount = amount * 100;\r\n var averageAmount = Math.round(totalAmount / eligibleRecipients.length);\r\n var minimumContributionLimit = 100000000;\r\n\r\n // Calculate limits\r\n eligibleRecipients.map((recipient: Recipient) => {\r\n if (recipient.contributionLimit > 0 && recipient.contributionLimit * 100 < minimumContributionLimit) {\r\n minimumContributionLimit = recipient.contributionLimit * 100;\r\n }\r\n });\r\n\r\n if (minimumContributionLimit > averageAmount) {\r\n // Split amount evenly when the minimum limit is above the evenly divided amount\r\n splitEvenlyToRecipients(eligibleRecipients, totalAmount);\r\n } else {\r\n // Max all recipients with contribution limit below average amount, recalculating average\r\n let remainingTotal = totalAmount;\r\n let remainingRecipients = eligibleRecipients;\r\n let remainingRecipientsLength = 0;\r\n\r\n while (remainingRecipients.length != remainingRecipientsLength) {\r\n remainingRecipientsLength = remainingRecipients.length;\r\n let currentRecipients = remainingRecipients;\r\n remainingRecipients = [];\r\n\r\n currentRecipients.map(recipient => {\r\n if (recipient.contributionLimit * 100 < averageAmount && recipient.contributionLimit > 0) {\r\n recipient.donationAmount = new OtherAmount(recipient.contributionLimit);\r\n remainingTotal -= recipient.contributionLimit * 100;\r\n } else {\r\n remainingRecipients.push(recipient);\r\n }\r\n });\r\n\r\n // Recalculate average amount and repeat until the remaining recipients list doesn't change\r\n averageAmount = remainingTotal / remainingRecipients.length;\r\n }\r\n\r\n // Distribute the remaining amount evenly among the remaining recipients\r\n splitEvenlyToRecipients(remainingRecipients, remainingTotal);\r\n }\r\n\r\n return recipientsCopy;\r\n}\r\n\r\n// Splits an amount between the given recipients\r\nconst weightedSplitAmount = (amount: number, filteredRecipientIds: string[], recipients: Recipient[]) => {\r\n if (!amount) {\r\n return recipients;\r\n }\r\n\r\n // Make a copy and zero-out all amounts in the filteredRecipients\r\n const workingRecipients = recipients.map(r => {\r\n if (filteredRecipientIds.includes(r.identifier)) {\r\n return { ...r, donationAmount: new OtherAmount(0) };\r\n } else {\r\n return { ...r };\r\n }\r\n });\r\n\r\n const getEligibleRecipients = (recipients: Recipient[]) =>{\r\n return recipients.filter(recipient => {\r\n // Recipients with weights of 0 are omitted\r\n if (recipient.weight == 0) {\r\n return false;\r\n }\r\n\r\n // Can't split on recipients with goals achieved or contribution limit reached\r\n if (recipient.goal?.achieved) {\r\n return false;\r\n }\r\n\r\n // Don't include non-filtered recipients\r\n if (!filteredRecipientIds.includes(recipient.identifier)) {\r\n return false;\r\n }\r\n\r\n if (recipient.donationAmount.amount >= recipient.contributionLimit && recipient.contributionLimit != 0) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }).sort((r1, r2) => r2.weight - r1.weight);\r\n }\r\n\r\n // Initial conditions\r\n const splitAmount = amount;\r\n var remainingAmountToSplit = amount;\r\n var eligibleRecipients = getEligibleRecipients(workingRecipients);\r\n var previousAmountRemaining = remainingAmountToSplit;\r\n\r\n // Loop while there is a remaining amount to split\r\n while (remainingAmountToSplit > 0) {\r\n\r\n // Get the total weights for the current round of splitting\r\n const totalWeights = eligibleRecipients.reduce((partialSum, r) => partialSum + r.weight, 0);\r\n\r\n eligibleRecipients.forEach(r => {\r\n const recipientCopy = workingRecipients.find(rc => rc.identifier == r.identifier);\r\n const weightedRatio = r.weight / totalWeights;\r\n\r\n var weightedCents = Math.round(weightedRatio * remainingAmountToSplit * 100);\r\n\r\n if (Math.round(weightedCents) == 0) {\r\n weightedCents = 1;\r\n }\r\n\r\n const weightedAmount = weightedCents/100;\r\n\r\n var availableToRecipient = 0;\r\n if (recipientCopy.contributionLimit == 0) {\r\n availableToRecipient = weightedAmount;\r\n } else {\r\n const remainingBelowLimit = recipientCopy.contributionLimit - recipientCopy.donationAmount.amount;\r\n availableToRecipient = Math.min(remainingBelowLimit, weightedAmount);\r\n }\r\n\r\n // Check currently assigned total to make sure we don't go over due to rounding/division\r\n const totalAssigned = Math.round(100 * workingRecipients.reduce((partialSum, r) => partialSum + r.donationAmount.amount, 0)) / 100;\r\n if (totalAssigned + availableToRecipient > splitAmount) {\r\n availableToRecipient = splitAmount - totalAssigned;\r\n }\r\n\r\n // Assign and then round to prevent floating point issues\r\n const availableAmount = recipientCopy.donationAmount.amount + availableToRecipient;\r\n recipientCopy.donationAmount = new OtherAmount(Math.round(availableAmount * 100) / 100);\r\n });\r\n\r\n const remainder = splitAmount - workingRecipients.reduce((partialSum, r) => partialSum + r.donationAmount.amount, 0);\r\n remainingAmountToSplit = remainder;\r\n\r\n if (remainingAmountToSplit == 0 || previousAmountRemaining == remainingAmountToSplit) {\r\n break;\r\n } else {\r\n // Refilter the eligible recipients now that their amounts are updated\r\n previousAmountRemaining = remainingAmountToSplit;\r\n eligibleRecipients = getEligibleRecipients(workingRecipients);\r\n }\r\n }\r\n\r\n return workingRecipients;\r\n}","import ReactDOM from \"react-dom\";\r\nimport React, { useState } from \"react\";\r\nimport { useEffect, useReducer } from \"react\";\r\nimport { Loader } from \"@progress/kendo-react-indicators\";\r\nimport { DonationPageStateContext, initialDonationPageState, QueryRecipient } from \"./state\";\r\nimport { Checkout } from \"./checkout/checkout\";\r\nimport { Confirmation } from \"./confirmation/confirmation\";\r\nimport { Slate } from \"./slate/slate\";\r\nimport { useFetch } from \"../common\";\r\n\r\nimport {\r\n Router,\r\n Route,\r\n Outlet,\r\n ReactLocation\r\n } from \"react-location\";\r\n\r\nimport { donationPageReducer } from \"./reducers\";\r\nimport { ActionType } from \"./actions\";\r\n\r\nimport \"@progress/kendo-theme-default/dist/all.css\";\r\nimport \"./donation-page.scss\";\r\n\r\nconst routes: Route[] = [\r\n {\r\n path: \"/\",\r\n element: ,\r\n },\r\n {\r\n path: \"checkout\",\r\n element: ,\r\n },\r\n {\r\n path: \"confirmation\",\r\n element: ,\r\n }\r\n];\r\n\r\nconst location = new ReactLocation();\r\n\r\nexport const DonationPage = () => {\r\n\r\n const [state, dispatch] = useReducer(donationPageReducer, initialDonationPageState);\r\n const searchParams = new URLSearchParams(window.location.search);\r\n\r\n // Build the API url\r\n const automaticRecipientPage = window.location.pathname.indexOf(\"/recipient/\") > -1;\r\n const urlSlug = window.location.pathname.split('/').filter(x => x != '' && x != 'checkout').pop() || \"\";\r\n let dataApiUrl = automaticRecipientPage ? `/api/v2/recipient-page/${urlSlug}` : `/api/v2/donation-page/${urlSlug}`;\r\n\r\n if (state.donorType == \"FederalPac\") {\r\n dataApiUrl = dataApiUrl + \"?donorType=FederalPac\";\r\n } else if (state.donorType == \"Individual\") {\r\n dataApiUrl = dataApiUrl + \"?donorType=Individual\";\r\n }\r\n\r\n const dataApi = useFetch(dataApiUrl);\r\n const currentUserApi = useFetch(`/api/v2/me`);\r\n\r\n // Fetch the current user function\r\n const fetchCurrentUser = async () => {\r\n const currentUserResponse = await currentUserApi.get();\r\n\r\n // If there is no user, a 204 will be returned. Only process if a 200 is returned.\r\n if (currentUserResponse.status == 200) {\r\n dispatch({ type: ActionType.LoadCurrentUser, currentUser: currentUserResponse.result })\r\n }\r\n }\r\n\r\n // Fetch the page's data function\r\n const fetchPageData = async () => {\r\n // Check query string for recipients\r\n const queryStringRecipients = searchParams.get(\"recipients\");\r\n let queryRecipients: QueryRecipient[] = [];\r\n if (queryStringRecipients) {\r\n const kvps = queryStringRecipients.split(\";\");\r\n const qrs: QueryRecipient[] = kvps.map(kvp => {\r\n const parts = kvp.split(\":\");\r\n return {\r\n identifier: parts[0],\r\n amount: parts.length > 1 ? parseFloat(parts[1]) : 0\r\n }\r\n });\r\n queryRecipients = queryRecipients.concat(qrs);\r\n }\r\n\r\n const pageDataResponse = await dataApi.get()\r\n\r\n if (pageDataResponse.success) {\r\n if (pageDataResponse.result.configuration.slate.header.title) {\r\n document.title = pageDataResponse.result.configuration.slate.header.title + \" \" + document.title;\r\n } else if (pageDataResponse.result.recipients.length == 1) {\r\n document.title = pageDataResponse.result.recipients[0].displayName + \" \" + document.title;\r\n }\r\n dispatch({ type: ActionType.LoadData, data: pageDataResponse.result, queryRecipients: queryRecipients, urlSlug: urlSlug })\r\n } else if (pageDataResponse.status == 404) {\r\n dispatch({ type: ActionType.PageNotFound })\r\n }\r\n }\r\n\r\n // Effects\r\n useEffect(() => {\r\n if (state.donorTypeUpdated) {\r\n fetchCurrentUser().catch(console.error);\r\n fetchPageData().catch(console.error);\r\n }\r\n }, [state.donorType]);\r\n\r\n useEffect(() => {\r\n fetchCurrentUser().catch(console.error);\r\n fetchPageData().catch(console.error);\r\n }, []);\r\n\r\n if (state.configuration.status == \"NotFound\") {\r\n return

    Page Not Found

    ;\r\n } else if (state.configuration.status == \"Loading\") {\r\n return
    ;\r\n }\r\n\r\n // The base is the root donation page, without any sub-path like \"checkout\"\r\n const basepath = window.location.pathname.replace(\"checkout\", \"\");\r\n\r\n // Render\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"root\"))"],"names":["SuggestedAmount","amount","__publicField","OtherAmount","amt","amtStr","decimalIndex","getArrayFromQueryString","field","value","initialFilters","initialCheckoutForm","initialCheckoutConfiguration","initialConditionalDonatingConfiguration","initialEventConfiguration","initialPacDonationConfiguration","initialSlateConfiguration","initialDonationPageState","getFilteredRecipients","state","filters","filteredRecipients","r","initialDonationPageStateContext","action","DonationPageStateContext","createContext","initialRecipientContext","RecipientContext","CurrencyFormatter","DonorCoveredFees","useContext","register","formState","errors","useFormContext","config","configuration","checkout","donorCoveredFees","feesAmount","cartAmounts","className","children","_jsx","title","content","htmlFor","type","id","checkboxLabel","format","Contact","registerField","useFieldFormContext","checkoutConfiguration","textMessagingOptions","textMessagingOptIn","emailNote","fields","firstName","name","options","required","message","maxLength","validate","v","indexOf","lastName","streetAddress","city","postalCode","email","readOnly","includes","pagePermissionLevel","phoneNumber","_jsxs","ErrorMessage","enabled","label","Employment","watch","employmentNote","employmentStatus","requireEmployerAddress","recipients","some","donationAmount","employer","employerStreetAddress","employerCity","employerState","employerPostalCode","occupation","employerAddress","_Fragment","PaymentCreditCard","cardNumber","minLength","securityCode","expirationMonth","expirationYear","getYearOptions","currentYear","Date","getFullYear","years","Array","from","length","_","i","year","PaymentElectronicCheck","accountType","accountNumber","routingNumber","Payment","React","paymentAuthorizationSaved","currentUser","useStoredPaymentAuthorization","paymentMethod","rememberPayment","password","userAuthenticated","confirmPassword","match","rememberPasswordText","paymentAuthorizationDisplayName","DonationButtons","suggestedDonationAmounts","limit","onChange","selectAmount","parseFloat","onOtherAmountChange","amountValue","trim","isNaN","formatAmount","Intl","NumberFormat","style","currency","replace","suggestedAmountButtons","filter","a","map","selected","kind","classNames","onClick","toString","otherAmountDisplayValue","amountString","otherAmountCssClass","donationLimit","min","max","e","target","donorType","Tip","tipConfiguration","tip","setValue","getValues","checkoutForm","localDonationAmount","setLocalDonationAmount","useState","onChangeHandler","tipContent","suggestedAmounts","recipient","contributionLimit","CheckoutCart","navigate","useNavigate","showRecipients","setShowRecipients","coveredFeesEnabled","coveredFeesAmount","tipAmount","mandatoryFeeAmount","mandatoryFee","useEffect","window","innerWidth","navigateToSlate","to","toggleRecipients","recipientListItems","displayName","identifier","push","lineItemText","header","total","editButton","toggleRecipientsButton","recurringNotification","slate","subscription","createSubscription","EventAttendance","attending","checked","valueAsNumber","CustomCheckbox","donationPageState","customCheckbox","customCheckboxName","labelContent","dangerouslySetInnerHTML","__html","Terms","terms","conditionalDonatingConfig","conditionContent","showDeTerms","termParagraphs","t","conditionalDonatingContent","donateText","href","PageHeader","pageClassName","unpublishedBanner","status","fullHtmlHeader","html","contentElement","replaceAll","ActionType","ProcessingIndicator","dispatch","indicator","processingIndicator","show","Dialog","margin","textAlign","fontSize","MandatoryFee","Attribution","donationAttribution","recipientsWithAttributionListIds","attributionListId","handleChange","recipientId","attribution","UpdateRecipientAttribution","recipientFormGroups","index","attributionList","attributionLists","find","al","members","m","errorMessage","attributionFields","fe","PacContact","pacName","pacFecId","Checkout","apiErrors","eventConfig","event","checkoutConfig","conditionConfig","conditionalDonating","donateButtonText","methods","useForm","defaultValues","handleSubmit","clearErrors","pagePath","urlSlug","apiUrl","submitApi","useFetch","UpdateApiErrors","scrollTo","recipientTermIds","flatMap","termIds","tipTermIds","concat","checkoutTerms","d","UpdateCheckoutForm","unsubscribe","onSubmit","data","body","payment","creditCard","electronicCheck","page","sourceCode","utmTracking","ShowProcessingIndicator","post","then","response","HideProcessingIndicator","success","contactForm","FormProvider","ErrorSummary","disabled","isLoading","Confirmation","confirmationConfig","confirmation","amounts","totalAmount","monthNames","currentDate","date","monthName","getMonth","day","getDate","lineItemRows","legalName","RecipientGoal","goal","progressBarPercent","Math","round","percent","width","RecipientDonation","UpdateRecipientAmount","pausedStatus","paused","shouldShowProfileDialog","showDialog","RecipientTeaser","slateConfig","recipientTemplateConfig","recipientTemplate","showDialogHandler","dialogHandler","ShowRecipientDialog","undefined","useMemo","enableProfileTeaser","profileTeaser","recipientDialog","showDialogLabel","RecipientPhoto","disableDialog","pictureClass","showDialogLink","src","loading","alt","interpolate","template","params","names","Object","keys","vals","values","Function","RecipientInfo","customTemplate","infoTemplate","recipientInfoClass","description","links","facebook","instragram","site","twitter","youTube","innerHtml","partyClass","politicalParty","toLowerCase","party","substring","office","district","RecipientFeaturedBanner","bannerText","featuredRecipients","featured","RecipientCustomFields","customFields","customField1","customField2","RecipientCard","customField1Class","toLocaleLowerCase","customField2Class","featuredClass","classes","Provider","join","RecipientCardList","layoutClass","layout","singleClass","recipientCards","RecipientDescription","descriptionElement","SingleRecipientCard","showDescription","showDonation","disclaimer","SlateCart","detailed","showExpressDonate","validDonationAmount","limitReached","navigateToCheckout","location","pathname","split","p","pop","expressApi","expressDonate","updateSubscriptionStatus","subscribe","UpdateSubscriptionStatus","base","continueButton","expressDonateButton","clearButton","ClearRecipientAmounts","subscriptionCheckbox","SplitIt","setAmount","splitIt","handleSplitIt","preventDefault","SplitAmount","weighted","handleAmountChange","splitButton","button","step","WeightedSplitIt","weightedSplitIt","MaxOut","input","setInput","maxOut","thresholdAmountDisplay","thresholdAmount","onClose","CancelMaxOut","DialogActionsBar","FeaturedToggle","updateFilters","filtered","UpdateFilters","featuredConfig","featuredClasses","allClasses","viewFeaturedText","viewAllText","SlateFilters","handleFilterByName","element","filterConfig","getOptions","uniq","sort","offices","states","politicalParties","customField1Options","customField2Options","TextBox","size","rounded","placeholder","autoComplete","MultiSelect","ExtendedProfile","recipientDialogConfig","extendedProfileFields","expanded","setExpanded","expanders","f1","f2","order","ExpansionPanel","onAction","Reveal","ExpansionPanelContent","extendedProfileTitle","RecipientDialog","dialog","HideRecipientDialog","NotificationBanner","donatedAmount","remaining","PacDonationToggle","toggleDonorType","UpdateDonorType","Slate","isSingleRecipient","context","recipientsLayout","pacDonation","slateLayoutClasses","tools","footerHtml","calculateCartAmounts","baseAmount","acc","baseAndTipAmount","donorCoveredFeeBase","donorCoveredFeeRate","donorCoveredFeesAmount","mandatoryFeeConfig","includeMandatoryFee","getActiveFilteredRecipients","donationPageReducer","updatedState","donationPageReducerCore","donationLimitReached","donationTotal","currentUserNotEmployed","updatedDonorType","dataLoadedState","applyQueryRecipients","nonEarmarkedRecipients","termContent","updatedRecipients","filteredRecipientIds","threshold","weightedSplitAmount","splitAmount","updatedContact","queryRecipients","updatedConfiguration","updatedFilters","qr","queryAmount","_a","normalizedAmount","updatedTerms","filterTerms","tipRecipient","inputAmount","recipientsCopy","splitEvenlyToRecipients","divider","minimumAmount","dividedAmount","eligibleRecipients","averageAmount","minimumContributionLimit","remainingTotal","remainingRecipients","remainingRecipientsLength","currentRecipients","workingRecipients","getEligibleRecipients","r1","r2","remainingAmountToSplit","previousAmountRemaining","totalWeights","partialSum","recipientCopy","rc","weightedRatio","weightedCents","weightedAmount","availableToRecipient","remainingBelowLimit","totalAssigned","availableAmount","routes","path","ReactLocation","DonationPage","useReducer","searchParams","URLSearchParams","search","automaticRecipientPage","x","dataApiUrl","dataApi","currentUserApi","fetchCurrentUser","currentUserResponse","get","LoadCurrentUser","result","fetchPageData","queryStringRecipients","qrs","kvp","parts","pageDataResponse","document","LoadData","PageNotFound","donorTypeUpdated","catch","console","error","Loader","themeColor","basepath","Router","Outlet","ReactDOM","render","StrictMode","getElementById"],"mappings":"0dAKO,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