{"version":3,"sources":["webpack:///./guest-payment-components/DonateGiftAidHowItWorksOverlay.js","webpack:///./guest-payment-components/DonateGiftAid.js","webpack:///./components/amount/amountValidationError.js","webpack:///./components/amount/calculator.js","webpack:///./components/amount/PresetAmountRow.js","webpack:///./components/amountWrapper.js","webpack:///./react-card-security-code/index.js","webpack:////home/jenkins/agent/workspace/donate-gro-release/node_modules/lodash/throttle.js","webpack:///./components/recurring-checkbox/RecurringInfo.js","webpack:///./components/recurring-checkbox/recurring-checkbox.js","webpack:///./utility/fixPpReactToolTip.js","webpack:////home/jenkins/agent/workspace/donate-gro-release/node_modules/lodash/now.js","webpack:////home/jenkins/agent/workspace/donate-gro-release/node_modules/react-portal/es/utils.js","webpack:////home/jenkins/agent/workspace/donate-gro-release/node_modules/react-portal/es/Portal.js","webpack:////home/jenkins/agent/workspace/donate-gro-release/node_modules/react-portal/es/LegacyPortal.js","webpack:////home/jenkins/agent/workspace/donate-gro-release/node_modules/react-portal/es/PortalCompat.js","webpack:///./components/threeDS/ThreeDSSpinner.js","webpack:///./components/threeDS/ThreeDSDeviceDataCollection.js","webpack:///./components/threeDS/ThreeDSIframe.js","webpack:///./components/threeDS/ThreeDSContainer.js","webpack:////home/jenkins/agent/workspace/donate-gro-release/node_modules/lodash/debounce.js","webpack:///./components/guest/WithDonate.js","webpack:///./utility/card-utils.js","webpack:///./components/NoteFieldError.js","webpack:///./components/note.js","webpack:///./components/anonymousDonation/anonymousCheckbox.js","webpack:///./utility/bootstrap.js","webpack:///./components/nextButton.js","webpack:///./components/landing/OneTouchNextButton.js","webpack:///./components/guestButton.js","webpack:///./components/programs/Programs.js","webpack:///./components/recurring-checkbox/RecurringOverlay.js","webpack:///./components/NotTaxDeductibleLegalText.js","webpack:///./components/coverFee/coverFeeCheckbox.js","webpack:///./pages/landing/landing.js","webpack:///./components/WhosDonatedBanner.js","webpack:///./components/Flyout.js","webpack:///./components/hooks/useInterval.js","webpack:///./utility/donorWall.js","webpack:///./pages/landing/campaignLanding.js","webpack:///./setup/clientConstants.js","webpack:///./components/currencyConversion/CurrencyConversionModal.js","webpack:///./utility/accessibilityUtils.js","webpack:///./containers/cvv-component.js","webpack:///./pages/guest/CrossBorder/PaymentInformation.js","webpack:///./pages/guest/crossBorder.js","webpack:///./pages/guest/confirmation.js","webpack:///./pages/error/FullPageError.js","webpack:///./pages/error/paymentError.js","webpack:///./pages/error/UnilateralError.js","webpack:///./pages/error/threeDSError.js","webpack:///./components/CaptureOrder.js","webpack:///./components/CancelAndRedirectOrder.js","webpack:///./routes/router.js","webpack:///./utility/lazyLoader.js","webpack:////home/jenkins/agent/workspace/donate-gro-release/node_modules/prop-validators/dist/index.js"],"names":["styles","StyleSheet","create","modalContent","maxWidth","margin","okButton","marginTop","msgMargin","DonateGiftAidHowItWorksOverlay","props","content","className","overpanel","title","isOpen","onClose","closeOverlay","hideLogo","closeOnBackgroundClick","id","css","size","howitworks","modalp1","modalp2","modalp3","modalp4","onClick","ok","propTypes","PropTypes","object","bool","func","DonateGiftAid","isAlreadyEnrolled","isChecked","handleGiftAidOption","contentMsg","addressData","showAddress","useState","showHelp","setShowHelp","checked","setChecked","isHowItWorksOverlayOpen","setIsHowItWorksOverlayOpen","useEffect","openHowItWorksOverlay","src","appendCdnHostName","alt","extraCost","type","tertiary","learnMore","alreadyDone","label","optGiftaid","name","onChange","env","checkedValue","target","applyGiftAid","strong","taxpayer","fullName","address1","address2","city","state","zip","confirmNote","openOverlay","any","isMember","STYLES","error","color","grey700","fontSize","criticalIcon","position","marginRight","AmountValidationError","this","errorSourceField","errorString","errorCode","trackErrorIM","errorMessage","fieldName","style","role","data-testid","Component","string","donationAmount","messages","localsMessages","container","padding","zIndex","calcRow","display","width","verticalAlign","calcRowLeft","calcRowRight","calcLabel","inputCol","input","outlineOffset","paddingLeft","inputLeft","paddingRight","inputRight","fromCode","right","top","height","borderTop","borderRight","borderBottom","toCode","lineHeight","conversion","textAlign","paddingTop","disabled","opacity","inputCurrencyLeft","marginLeft","hasError","Calculator","symbol","currencySymbols","setState","fromSymbol","length","document","getElementById","ev","callback","val","value","match","validateAmount","handleFromChange","handleToChange","handleFromCurrencyChange","setFromSymbol","event","handleAmountFocus","amount","replace","decimalPoint","youDonate","charityGet","youDonateLabel","charityGetLabel","conversionLabel","placeholder","getLocalizedAmount","fromAmount","toAmount","conversionRate","calcLabelStyle","toError","fromDisabled","bind","onFocus","availableCurrencies","map","c","key","toDisabled","charityAmountSymbol","toErrorMessage","React","array","isRequired","presetOther","placeholderOtherAmount","PresetAmountRow","templateData","presetAmounts","setPresetAmounts","AppStore","getDonationAmountType","getDonationAmount","selectedOption","setSelectedOption","showOtherAmount","setShowOtherAmount","handlePresetAmountClick","handleAmountChange","hideValidationError","AppActions","amountBeforeFee","getAmountBeforeFee","isOptInCoverFee","shouldSelectPresetAmount","values","charityAmountCode","rightSymbol","result","amountFieldValue","charityAmount","presetOptions","getCurrencyParts","$","formatAmountFromServerDNW","noDecimals","secondaryLabel","isAmountEditable","showValidationError","validationErrorMessage","checkValue","parseFloat","trackLinkClick","LINK_NAME","PRESET_AMOUNT","additionalData","FPTI_TAGS","SELECTED_PRESET_BUTTON_ID","griffin","getGriffin","clientMetadata","__getInitialData","coverFeeOptInStatus","getCoverFeeOptInStatus","isPreview","validationErrorCode","amountLabel","AmountWrapper","dispatcherCharityAmount","AppDispatcher","register","payload","action","actionType","item","unregister","window","location","pathname","includes","undefined","getParameterByName","isNaN","exchangeRate","base_currency_code","userAmountCode","quote_amount","toFixed","params","getConversionRequest","_debounce","st","par","fn","queryParams","fromCountry","userCountry","fromCurrency","toCurrency","normalizeAmount","conversionStatus","Promise","resolve","fetcher","method","body","JSON","stringify","then","response","json","catch","source","exchange_rate","isCalculator","setAppAmount","isAtLandingPage","setFeeAmountInStore","updateFeeAmount","optOutCoverFee","snapshot","userAmount","charityDisabled","getConversion","getConversionRate","currencyCode","userDisabled","TemplateData","enablePresetAmounts","isGuestReviewPage","validateDonationAmount","parse","innerHTML","currencyLists","currencies","symbols","donorIpCountry","US","getDonationCode","isEditable","donationAmountEditable","getDonationSymbol","donationDecimalPoint","nextProps","shouldShowPresetAmounts","renderPresetAmounts","handleUserAmountChange","handleUserCurrencyChange","handleCharityAmountChange","getAmountPlaceHolder","handleAmount","handleTrackError","addShake","CardSecurityCode","showIsRequiredError","securityCode","handleCheckForValue","handleChangeSecurityCode","cardSpec","fields","csc","required","handleFocus","handleBlur","cscSpecs","maxLength","maxlength","pattern","onBlur","errorText","dir","helperText","cardSpecPropType","debounce","isObject","module","exports","wait","options","leading","trailing","TypeError","getRecurringInfoContent","getContent","RecurringInfo","orgName","useHTML","orgname","donationName","isLTR","isLeftToRight","texts","isContinue","wrapper","centered","justifyContent","toolWrapper","paddingBottom","animationWrapper","animationContainer","transform","recurringButton","borderRadius","marginBottom","borderOnly","background","divider","dividerContent","backgroundColor","verticalCentered","alignItems","RecurringCheckBox","tooltipButton","dispatcherToken","updateAmount","getElementsByClassName","Object","btn","continue","currency","formatedAmount","formatAmount","showhelp","chkBxStatus","loadAnimation","recurring","RECURRING_CHECKBOX","CHECKBOX","handleChange","__html","status","loadBodyMovin","isAnimating","animationData","heartsAnimationData","bodymovinLibrary","bodymovin","renderer","loop","autoplay","setTimeout","destroy","rp","recurring_label","perMonth","sanitizeOrgName","defaultProps","root","Date","now","canUseDOM","createElement","_createClass","defineProperties","i","descriptor","enumerable","configurable","writable","defineProperty","Constructor","protoProps","staticProps","prototype","_classCallCheck","instance","_possibleConstructorReturn","self","call","ReferenceError","_React$Component","Portal","__proto__","getPrototypeOf","apply","arguments","subClass","superClass","constructor","setPrototypeOf","_inherits","defaultNode","removeChild","node","appendChild","createPortal","children","renderPortal","unmountComponentAtNode","portal","cloneElement","unstable_renderSubtreeIntoContainer","LegacyPortal","threeDSText","LOADING_GIF_SOURCE","spinnerAlign","cardImg","wontTakeLong","DoNotCloseOrRefresh","ThreeDSSpinner","fundingOptions","getFundingOptions","_get","network","getPaymentCardNetwork","myData","getAllData","_isEmpty","cardType","toLowerCase","hideSpinnerOverlay","setNetworkDetails","confirmingWith","RegExp","withTheme","ThreeDSDeviceDataCollection","data","exception","messageType","onDDCComplete","trackThreeDsDdcFailure","STATUS","console","log","onThreeDSDDCComplete","contingencies","_find","addEventListener","handleDDCEvent","threeDS2ReferenceId","getThreeDSParams","three_ds_reference_id","refs","submit","e","removeEventListener","deviceDataCollectionUrl","device_data_collection_url","jwt","ref","withRouter","ThreeDSIframe","handleIframeMessage","confirmationStatus","CHALLENGE_STATUS","trackThreeDSIframeIM","threeDSRespDuration","CHALLENGE_END_TIME","getTime","onStepUpAuthComplete","hideModal","element","formRef","threeDS2Contingency","getThreeDSContingency","redirectLink","md","redirectMethod","requestText","frameBorder","setFormRef","submitForm","CHALLENGE_START_TIME","hideTitle","getModalBody","icon","ThreeDSContainer","showThreeDSDeviceDataCollection","threeDSDCCEndTime","fptiData","THREE_DS_DCC_START_TIME","threeDSDCCStartTime","THREE_DS_DCC_END_TIME","THREE_DS_SPINNER_START_TIME","THREE_DS_SPINNER_END_TIME","trackThreeDsDdcComplete","resolveThreeDSContingency","trackThreeDsLookupStart","THREE_DS_LOOKUP_START_TIME","token","hideThreeDSSpinner","threeDSContingency","resolved","trackThreeDsLookupComplete","timestamp","THREE_DS_LOOKUP_END_TIME","CONTINGENCY_RESOLVED","URL","ACTION","onThreeDSStepUpAuthNotRequired","showThreeDSIframe","hideThreeDSIframe","onThreeDSFailure","onThreeDSStepUpAuthSuccess","onThreeDSStepUpAuthFailure","showThreeDSSpinner","onRef","startTime","trackThreeDsDdcStart","handleThreeDSDDCComplete","handleThreeDSStepUpAuthComplete","toggleSpinner","toNumber","nativeMax","Math","max","nativeMin","min","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","maxing","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","clearTimeout","cancel","flush","initialData","getInitialData","serviceErrorMessages","ERROR_ELEMENT_SELECTOR","join","withDonate","WrappedComponent","country","DonateAppActions","CHANGE_COUNTRY","COUNTRY","signUp","url","handleGuestCountryChange","isSpinner","showSpinnerOverlay","scrollElementIntoView","language","note","getDonationNote","fundingOptionId","email","getEmail","billingAddress","getBillingAddress","giftAidItFlag","getGiftaidItFlagStatus","card","code","history","push","href","clientState","encodeURIComponent","confirmationData","startCustomCPLTrackingForConfirmationPage","objectOrArrayToQueryString","confirmation","isOfacPending","isEmpty","cartUrl","orderToken","donateToken","payerID","selectedCountry","getFormData","formData","getParametersFromUrl","showErrorOnLoad","errorMsgs","serverErrors","handleCountryChange","handleScrollToError","getDonateGuestUrl","getInitialFormData","saveFormData","doFulfilment","captureOrder","createOrder","fundingTypes","defaultCardSpec","ccNumber","expirationDate","minlength","getSpecificCardSpec","cardNumber","cardTypes","autodetect","test","PAYMENT_CARDS","NoteFieldError","NoteComponent","lengthLimit","campaigns","campaignsLabel","providedLabel","isCampaigns","charityNoteEnabled","charityNoteLabel","donationNote","setDonationNote","initialNoteLabel","showLabel","setShowLabel","showError","setShowError","noteLabel","setNoteLabel","textAreaEl","useRef","isNoteTextPresent","current","focus","isNotePreview","directionality","contextLocalityDir","isExternalFlow","htmlFor","NOTE_PAD","eventName","EVENT_NAME","DW_GIVING_DONATE_SETUP_COMMENT_PRESSED","iconName","buttonType","aria-hidden","maxRows","minRows","showCharacterCounter","maxCharacters","addClass","removeClass","trim","AnonymousCheckbox","optInStatus","handleAnonymousDonationChange","tooltip","checkboxStatus","anonymousStatus","labelIcon","description","onOpen","ANONYMOUS_TOOLTIP","DW_GIVING_DONATE_SETUP_TOOLTIP_PRESSED","getElementsByTagName","setAttribute","NextButtonComponent","buttonnext","button","next","handleNext","branded","iconComponent","OneTouchNextButton","GuestButton","debitorcredit","secondary","handleGuest","Programs","programNames","isDisabled","selectedIdx","handleSelect","Array","isArray","getProgramOptions","forEach","programName","primaryText","programOption","findIndex","program","appStore","getSelectedProgram","programs","optional","selectedItemIndex","onSelection","index","selectedProgram","PROGRAM_SELECTED","CAMPAIGN","RecurringOverlay","closeRecurringOverlay","onMakeOneTimeDonation","onContinue","signupHeader","dialogp1","dialogp2","dialogp3","continueBtn","noThanksBtn","center","isInContext","BackButton","handleClose","noCloseButton","containerClassName","noThanks_closeModal","disclaimerWrapper","border","disclaimer","disclaimerCaptionText","NotTaxDeductibleLegalText","landing","mayNotBeTaxDeductible","CoverFeeCheckbox","handleCoverFeeChange","formatedFeeAmount","checkbox_content","coverFee","errorMessages","getCampaignContent","LandingPageComponent","onload","cpl","CPL_PAGE_SPEC","LANDING_PAGE","currentPage","paymentStatus","getDonationRecurring","recurringStatus","restoreDonationAmount","trackLandingPageIM","noteFieldDisplayed","shouldShowNote","recurringEnabled","isLoggedInUser","registerAppDispatcherMessages","dispatcherMessages","amountUtils","trackDonateWithCardClick","is_recurring","fee_type","coverFeeEnabled","preventDefault","recurringModalStatus","memberMandatory","openRecurringOverlay","validateAmountAndNavigateToGuestPage","PAYPAL","analytics","startCPLTracking","page","uicomp","uitype","trackDonateWithPayPalClick","handleLogIn","trackNextClickForCheckout","orderParams","prepareOrderParams","feeAmount","getFeeAmount","computeAmountAfterFee","updateDonationAmount","validationResult","donateDisabled","rpContinue","anonymousOptInStatus","trackAnonymousCheckboxClick","trackCoverFeeCheckboxClick","getFormatedFeeAmount","isRecurringOverlayOpen","isOldButtonFactory","isCheckoutRail","handleNextForCheckout","isAuthenticated","personalizedMessages","getPersonalizedMessages","GN_CONTENT_TOUCHPOINT","amountRaised","campaignTotalAmountRaised","campaignStatus","campaignTargetAmount","campaignEndTime","anonymousStatusInStore","getAnonymousStatus","hasLogo","subHeaderLabel","charityName","donationId","guestRedirectUrl","recurringHelpText","recurringLabel","isAuthenticatedUser","donateContext","program_names","isVoucherFlow","offerProgram","feePayer","anonymousEnabled","hasDisclaimer","hasPersonalizedMessages","getPPCCStatus","classNames","gn_donate_wrapper","bannerUrl","donate_wrapper","context_gn_wrapper","shouldShowUserBanner","mobile_view","isMobileOrInContext","showUserBanner","showSupportText","shouldShowSupportText","showNoDonationText","shouldShowNoDonationText","receiverCountryEligible","landingClass","UserDetailsBanner","userDetails","CloseButton","inverse","DonateHeader","isLanding","updateConversionSataus","renderProgramsDropdown","getPersonalizedAnonymousContent","getPersonalizedNoteToPayeeLabel","handleRecurringChange","showNote","success","renderDonateButtons","hasPartnerSource","getPPCCConfirmation","handleRecurringOverlayContinue","handleRecurringOverlayMakeOneTimeDonation","Disclaimer","getPersonalizedContent","organizationName","returnUrl","charityReturnUrl","LandingPage","Landing","displayLanding","currentState","business","hostedButtonId","campaignId","search","handleTokenReuse","addTokenToUrlIfMissing","WhosDonatedBanner","numberOfContributors","contributionsList","isLoading","donorName","donor_name","donatedAmount","donor","donorOneName","donorTwoName","slice","showAnonymousAvatar","shareDonorInfo","photo","photos","isAnonymousAvatar","number","getFlyoutContent","Flyout","delay","intervalRef","savedCallback","startShowing","setStartShowing","showFlyouts","setShowFlyouts","randomContribution","setRandomContribution","getRandomContribution","floor","random","flyoutTimer","setInterval","clearInterval","hideInterval","formatNumber","currency_code","formatFeatured","contributions","totalContributions","formattedList","first","find","badge","toUpperCase","selfItem","contributor_id","LandingDonorWall","reactLazy","LandingRichTextDisplay","getSocialContent","campaignsText","isPaymentCardOpen","setIsPaymentCardOpen","targetAmount","campaignTotalNumberOfTxn","amountRaisedWithCurrencySymbol","roundUpAndFormatCurrency","donationCode","featured","list","setContributionsList","contributionsError","setContributionsError","setCurrentPage","setIsLoading","retry","setRetry","enableReadMore","setEnableReadMore","descriptionHeight","setDescriptionHeight","originalDescriptionHeight","setOriginalDescriptionHeight","stickToTop","isMobile","setIsMobile","checkDeviceType","innerWidth","throttle","fetchData","a","productId","handleShowMore","goalAmtWithCurrencySymbol","campaignGoalTitle","goalAmount","renderEndDateBadge","endTime","getBadgeContent","currentTime","formatDate","parseDateOnly","renderTitle","campaignTitle","renderGoalProgressMeter","round","steps","headerClasses","sticky","renderDonorWall","endDate","totalNumberOfTransactions","setHours","renderContributionsError","stickyHeader","social_title","incrementDescription","incrementedHeight","Header","Content","maxHeight","descriptionContainer","clientHeight","fallback","campaignDescription","social","shareGeneric","ConfirmationSocialShare","donationEmail","lg","trackDonateLandingButtonClick","mobileFixedHeight","wrapperClassName","CurrencyConversionOption","isSelected","aria-checked","tabIndex","handleOptionSelection","onKeyDown","doFunction","which","KEY_DOWN","SPACE","ENTER","checkKeyPressed","spotImage","rate","as","CurrencyConversionModal","CURRENCY_CONVERSION_OPTIONS","isPayPalSelected","setPaypalSelected","modalTitle","modalSubTitle","withPaypal","withPayPal","message","withCard","ISSUER","modalButton","guestMessages","guestLocalsMessages","CVVComponent","getCardSpec","errorMessageCSC","handleSecurityCodeChange","fieldRequired","fieldInvalid","newErrorState","validateInputValue","cscLen","cscMax","guestLabels","cscplaceholder","cscLabel","cscnote","handleFieldFocus","handleFieldBlur","PaymentInformation","paymentDigits","paymentType","issuer","isPaypalCurrencyConversion","funds","crossBorderContent","paymentInformation","preferred","paymentLogo","setPaymentLogo","transformText","str","charAt","payment_card","thumbnail_logo_url","CDN_HOST_NAME","split","giftAidText","donateGiftPercentage","getGiftAidItExtraAmount","giftAidTextObj","giftAidIt","CrossBorder","spinnerOverlay","endCPLTracking","observeUntilEventObserved","attributes","observer","disconnect","formatCurrencyAsString","CURRENCY_CONVERSION","pageSpec","PAGE_SPEC","CROSS_BORDER_PAGE","showCurrencyConversionModal","isCurrencyConversionModalOpen","showCVVField","cvv","childCVVInfo","processDonation","threeDSContainer","initializeThreeDS","giftAidState","extraCostText","outSymbol","outAmount","extraAmount","option","beforeOption","currencyConversionOption","hideCurrencyConversionModal","finally","lastFundingSource","getLastFundingSource","tags","_includes","isRecurring","stateConversionWithPayPal","getStateForConversionWithPayPal","amountDecimalPoint","endCustomCPLTracking","sources","fundingSources","paymentNetwork","last_4","currency_conversion","toString","fundsIn","funds_in","fundsOut","funds_out","paymentCard","issuerName","inAmount","inCurrency","inSymbol","outCurrency","getStateForConversionWithIssuer","paymentCardId","currencyConversionType","normalizeNumber","preferences","payment_card_id","validity","consentShareAddress","getShareAddress","hasCvvContingency","isCvvContingencyResolved","showCVVComponent","hideCVVComponent","updateFundingOptionsState","getLocalizedCurrency","exchangeRateDecimalPoints","donateNowRecurring","formattedDonationAmount","giftaidFlag","updateGiftAidComponent","cscwarning","getUserCountry","isGiftaiditEnabled","donatingFrom","youllDonate","handleCurrencyConversionClick","changeCurrencyButton","shouldShowCurrencyConversionOptions","spread","fee","handleDonateClick","donatenow","handleThreeDSStepUpAuthSuccess","handleThreeDSFailure","GuestConfirmationPending","withPageTrack","withPostTransactionRequest","PendingView","GuestConfirmationSuccess","SuccessView","illustrationType","body2","linkLabel","handleLinkClick","buttonLabel","handleButtonClick","showCloseButton","centerBody","Illustration","PaymentError","ERROR_CODE","getPaymentError","trackErrorPageIM","GUEST_FAILURE_PAGE","WSM_CANNOT_PAY_SELF","WENT_WRONG","TEMP_GLITCH","tryagain","DID_NOT_WORK","DIFF_CREDIT_DEBIT","trydiffcard","L2","WSM_CANNOT_PAY_SELF_H","AmountLimitBreachError","customerServiceLink","handleTryAgain","noAccountErrorMessage","UnilateralError","UNILATERAL_ERROR_PAGE","ConfirmationBody","ThreeDSError","ConfirmationTitle","tryAgain","tryCard","CaptureOrder","orderStatus","getOrderStatus","isMemberFlow","isOneTouchUser","handlePaymentSuccess","handleConfirmation","flow","trackCaptureOrderPageIM","accessToken","isSubmitted","backBtnVisible","responseData","wTransactionEntry","requestError","timerCount","locality","setShouldRTL","currentUserState","isUnilateralAccount","GuestPage","reactLazyPreload","FallbackSpinner","userCookied","isOneTouch","isGNC","isGN","onboardingEnabled","preload","parseUrlQuery","signup","getPageToRender","ReactDOM","render","exact","path","component","waitForXProps","xprops","close","charityCancelUrl","MemberConfirmationSuccess","MemberConfirmationPending","all","loadScript","loadSlickProgressiveOnboarding","scriptPath","reject","nonce","script","onerror","importStatement","lazyComponent","genericPropType","propName","componentName","Error","cardSpecsPropType","cardSpecs","keys","stateListPropType","state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,EAASC,SAAWD,EAASlR,KACxC,OAAO,IAAI6tC,MAAM,iBAAmBF,EAAW,kBAAoBC,EAAgB,qEAEpF,OAAO,MApDRx7B,EAAQ67B,kBA8DR,SAA2B9wC,EAAOwwC,EAAUC,GAC3C,IAAIM,EAAY/wC,EAAMwwC,GAGtB,IAAKO,EACJ,OAAO,IAAIL,MAAM,kBAAoBF,EAAW,2BAA6BC,EAAgB,+EACvF,IAAK3iB,MAAMC,QAAQgjB,IAAcA,EAAU3oC,SAAW2oC,EAAU,GAAGC,IACzE,OAAO,IAAIN,MAAM,iBAAmBF,EAAW,kBAAoBC,EAAgB,+EAEpF,OAAO,Q","file":"donate.3387662a1753c739683e.bundle.js","sourcesContent":["import React from 'react';\nimport { Modal, BodyText, Button, HeadingText } from '@paypalcorp/pp-react';\nimport { StyleSheet, css } from 'aphrodite';\nimport PropTypes from 'prop-types';\n\nconst styles = StyleSheet.create({\n modalContent: {\n maxWidth: 600,\n margin: '0 auto',\n },\n okButton: {\n marginTop: 36,\n },\n msgMargin: {\n marginTop: '24px',\n },\n});\n\nexport default function DonateGiftAidHowItWorksOverlay(props) {\n const { content } = props;\n\n return (\n \n
\n
\n
\n
\n
\n {content.howitworks}\n
\n
\n
\n
\n \n {content.modalp1}\n \n
\n
\n
\n
\n \n {content.modalp2}\n \n
\n
\n
\n
\n \n {content.modalp3}\n \n
\n
\n
\n
\n \n {content.modalp4}\n \n
\n
\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n \n );\n}\n\nDonateGiftAidHowItWorksOverlay.propTypes = {\n content: PropTypes.object,\n isOpen: PropTypes.bool,\n closeOverlay: PropTypes.func,\n};\n","import PropTypes from 'prop-types';\nimport React, { useState, useEffect } from 'react';\nimport { Checkbox, CaptionText, Button } from '@paypalcorp/pp-react';\nimport DonateGiftAidHowItWorksOverlay from './DonateGiftAidHowItWorksOverlay';\nimport { appendCdnHostName } from '../utility/geoUtils';\nimport { BodyText } from '@paypalcorp/pp-react-text';\n\nconst DonateGiftAid = ({\n isAlreadyEnrolled,\n isChecked,\n handleGiftAidOption,\n contentMsg,\n addressData,\n showAddress,\n}) => {\n const [showHelp, setShowHelp] = useState(isChecked);\n const [checked, setChecked] = useState(isChecked);\n const [isHowItWorksOverlayOpen, setIsHowItWorksOverlayOpen] = useState(false);\n\n useEffect(() => {\n if (isAlreadyEnrolled) {\n setShowHelp(false);\n }\n }, [isAlreadyEnrolled]);\n\n const handleCheckbox = (env) => {\n let checkedValue = env.target.checked;\n setChecked(checkedValue);\n setShowHelp(checkedValue);\n handleGiftAidOption(checkedValue);\n };\n\n const openHowItWorksOverlay = () => {\n setIsHowItWorksOverlayOpen(true);\n };\n\n const closeHowItWorksOverlay = () => {\n setIsHowItWorksOverlayOpen(false);\n };\n\n return (\n
\n
\n \n \n {contentMsg.extraCost}\n \n {contentMsg.learnMore}\n \n \n\n {isAlreadyEnrolled && (\n
\n \n {contentMsg.alreadyDone}\n
\n )}\n {!isAlreadyEnrolled && (\n \n )}\n\n {showHelp && (\n
\n
\n \n {contentMsg.applyGiftAid}\n \n
\n {showAddress && (\n
\n {contentMsg.taxpayer}\n
    \n
  • {addressData.fullName}
  • \n
  • {addressData.address1}
  • \n
  • {addressData.address2}
  • \n
  • {addressData.city}
  • \n
  • \n {addressData.state}, {addressData.zip}\n
  • \n
\n
\n )}\n
\n {contentMsg.confirmNote}\n
\n
\n )}\n\n \n
\n
\n );\n};\n\nDonateGiftAid.propTypes = {\n isAlreadyEnrolled: PropTypes.bool,\n showAddress: PropTypes.bool,\n addressData: PropTypes.any,\n isChecked: PropTypes.bool,\n handleGiftAidOption: PropTypes.func,\n contentMsg: PropTypes.object,\n isMember: PropTypes.bool,\n};\n\nexport default DonateGiftAid;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Icon } from '@paypalcorp/pp-react-icons';\nimport { grey700 } from '@paypalcorp/pp-react-colors';\nimport { trackErrorIM } from '../../fpti/fpti';\n\nconst STYLES = {\n error: {\n color: grey700,\n fontSize: '13px',\n },\n criticalIcon: {\n color: '#D20000',\n position: 'relative',\n fontSize: 'unset',\n marginRight: '5px',\n },\n};\n\n/**\n * Component for displaying amount validation error message\n */\nclass AmountValidationError extends Component {\n componentDidMount() {\n const { errorSourceField, errorString, errorCode } = this.props;\n\n trackErrorIM({\n errorCode: errorCode || 'DONATION_AMOUNT_VALIDATION_ERROR',\n errorMessage: errorString,\n fieldName: errorSourceField,\n });\n }\n render() {\n const { errorString } = this.props;\n\n if (!errorString) {\n return null;\n }\n\n return (\n \n \n \n {errorString}\n \n \n );\n }\n}\n\nAmountValidationError.propTypes = {\n errorString: PropTypes.string,\n errorSourceField: PropTypes.string,\n errorCode: PropTypes.string,\n donationAmount: PropTypes.string,\n};\n\nexport default AmountValidationError;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { localsMessages } from '../../utility/getTemplateData';\nimport AmountValidationError from './amountValidationError.js';\n\nconst messages = localsMessages('guest/crossBorder');\n\nconst STYLES = {\n container: {\n padding: '30px 0 30px 0',\n zIndex: 1,\n },\n calcRow: {\n display: 'inline-block',\n width: '40%',\n verticalAlign: 'top',\n },\n calcRowLeft: {\n margin: '0 1% 0 9%',\n },\n calcRowRight: {\n margin: '0 9% 0 1%',\n },\n calcLabel: {\n padding: '0 0 8px 5px',\n },\n inputCol: {\n position: 'relative',\n },\n input: {\n outlineOffset: '-1px',\n fontSize: 14,\n paddingLeft: 20,\n },\n inputLeft: {\n paddingRight: '100px',\n },\n inputRight: {\n paddingRight: '60px',\n },\n fromCode: {\n position: 'absolute',\n right: '1px',\n top: '1px',\n height: '40px',\n width: '90px',\n borderTop: 0,\n borderRight: 0,\n borderBottom: 0,\n },\n toCode: {\n position: 'absolute',\n right: '15px',\n top: 0,\n lineHeight: '42px',\n },\n conversion: {\n textAlign: 'center',\n paddingTop: '30px',\n },\n disabled: {\n opacity: '0.5',\n },\n inputCurrencyLeft: {\n position: 'absolute',\n marginTop: 12,\n marginLeft: 10,\n fontSize: 14,\n },\n hasError: {\n color: 'red',\n },\n};\n\nclass Calculator extends React.Component {\n constructor() {\n super();\n const { label: { youDonate, charityGet, conversion } = {} } =\n messages || {};\n this.state = {\n youDonateLabel: youDonate,\n charityGetLabel: charityGet,\n conversionLabel: conversion,\n };\n }\n\n componentDidMount() {\n this.setFromSymbol(this.props.toCode);\n }\n\n setFromSymbol = (toCode) => {\n const symbol =\n (this.props.currencySymbols && this.props.currencySymbols[toCode]) || '';\n this.setState({\n fromSymbol: symbol,\n });\n\n let padding = symbol.length * 10 + 10;\n document.getElementById('fromAmount').style.paddingLeft = `${padding}px`;\n };\n\n validateAmount = (ev, callback) => {\n let val = ev.target.value;\n let rgx = /^[0-9]*[.|,]?[0-9]?[0-9]?$/;\n\n if (val === '.' || val === ',' || !val.match(rgx)) {\n return;\n }\n callback(val);\n };\n\n handleFromChange = (ev) => {\n this.validateAmount(ev, this.props.handleFromChange);\n };\n\n handleToChange = (ev) => {\n this.validateAmount(ev, this.props.handleToChange);\n };\n\n handleFromCurrencyChange = (ev) => {\n let val = ev.target.value;\n this.props.handleFromCurrencyChange(val);\n this.setFromSymbol(val);\n };\n\n handleAmountFocus = (event) => {\n this.props.handleAmountFocus(event);\n };\n\n getLocalizedAmount = (amount) => {\n return `${amount}`.replace(/[.|,]/i, this.props.decimalPoint);\n };\n\n render() {\n const placeholder = this.getLocalizedAmount('0.00');\n const fromAmount = this.getLocalizedAmount(this.props.fromAmount);\n const toAmount = this.getLocalizedAmount(this.props.toAmount);\n const conversionRate = `${this.getLocalizedAmount('1.00')} ${\n this.props.fromCode\n } = ${this.getLocalizedAmount(this.props.conversionRate)} ${\n this.props.toCode\n }`;\n\n const calcLabelStyle = {\n ...STYLES.calcLabel,\n ...(this.props.toError ? STYLES.hasError : {}),\n };\n\n return (\n \n
\n \n
{this.state.youDonateLabel}
\n
\n
\n \n {this.state.fromSymbol}\n \n \n
\n \n {this.props.availableCurrencies.map((c) => (\n \n ))}\n \n
\n
\n \n
{this.state.charityGetLabel}
\n
\n
\n \n {this.props.charityAmountSymbol}\n \n \n
\n {this.props.toCode}\n
\n {this.props.toError && (\n \n )}\n \n \n\n {this.props.conversionRate && (\n \n {this.state.conversionLabel} {conversionRate}\n \n )}\n \n );\n }\n}\n\nCalculator.propTypes = {\n availableCurrencies: PropTypes.array.isRequired,\n currencySymbols: PropTypes.object.isRequired,\n decimalPoint: PropTypes.string.isRequired,\n conversionRate: PropTypes.string.isRequired,\n fromAmount: PropTypes.string.isRequired,\n fromCode: PropTypes.string.isRequired,\n fromDisabled: PropTypes.bool.isRequired,\n toAmount: PropTypes.string.isRequired,\n toCode: PropTypes.string.isRequired,\n toDisabled: PropTypes.bool.isRequired,\n handleFromChange: PropTypes.func.isRequired,\n handleFromCurrencyChange: PropTypes.func.isRequired,\n handleToChange: PropTypes.func.isRequired,\n charityAmountSymbol: PropTypes.string,\n handleAmountFocus: PropTypes.func,\n toError: PropTypes.bool,\n toErrorMessage: PropTypes.string,\n};\n\nexport default Calculator;\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { PresetAmounts } from '@paypalcorp/donate-react';\nimport templateData from '../../utility/getTemplateData';\nimport * as AppActions from '../../actions/AppActions';\nimport AppStore from '../../stores/AppStore';\nimport {\n isOptInCoverFee,\n shouldSelectPresetAmount,\n} from '../coverFee/feeUtils';\nimport { getCurrencyParts } from '../../utility/formator';\nimport { formatAmountFromServerDNW } from './amountUtils';\nimport { localsMessages } from '../../utility/getTemplateData';\nimport { getGriffin, __getInitialData } from '../../utility/formator';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { FPTI_TAGS, LINK_NAME } from '../../fpti/fptiConstants';\n\nlet {\n amount: { presetOther, placeholderOtherAmount },\n} = localsMessages('common/amount');\n\nfunction PresetAmountRow(props) {\n const getSelectedOption = () => {\n if (AppStore.getDonationAmountType() === 'preset') {\n return AppStore.getDonationAmount();\n } else if (AppStore.getDonationAmountType() === 'userinput') {\n return 'Other';\n }\n return '';\n };\n\n const [presetAmounts, setPresetAmounts] = useState(\n templateData.presetAmounts\n ),\n [selectedOption, setSelectedOption] = useState(getSelectedOption()),\n [showOtherAmount, setShowOtherAmount] = useState(\n AppStore.getDonationAmountType() === 'userinput' ? true : false\n );\n\n const handlePresetAmountClick = (value) => {\n setSelectedOption(value);\n if (value !== 'Other') {\n const selectedAmount = value;\n props.handleAmountChange(`${selectedAmount}`);\n // Highlight the selected button\n setShowOtherAmount(false);\n setPresetAmounts(templateData.presetAmounts);\n // Clear the errors from amount field\n props.hideValidationError();\n\n AppActions.updateDonationAmountType('preset');\n } else {\n props.handleAmountChange('');\n setShowOtherAmount(true);\n }\n };\n\n useEffect(() => {\n // In case user opts in for cover fee and goes back to\n // landing page from guest page, we need to restore back\n // user's original entered amount\n const amountBeforeFee = AppStore.getAmountBeforeFee();\n if (amountBeforeFee && isOptInCoverFee()) {\n if (shouldSelectPresetAmount(amountBeforeFee)) {\n handlePresetAmountClick(amountBeforeFee);\n }\n }\n }, []);\n\n const handleAmountChange = (amount) => {\n let checkValue = parseFloat(amount.replace(',', '.').replace(' ', ''));\n\n if (AppStore.getDonationAmountType() === 'preset' && checkValue > 0) {\n AppActions.updateSelectedPresetButtonId('other');\n AppActions.updateDonationAmountType('userinput');\n props.handleAmountChange('0.00');\n trackLinkClick(LINK_NAME.PRESET_AMOUNT, {\n additionalData: {\n [FPTI_TAGS.SELECTED_PRESET_BUTTON_ID]: 'other',\n },\n });\n }\n if (checkValue > 0) {\n AppActions.updateDonationAmountType('userinput');\n props.handleAmountChange(amount);\n }\n };\n\n const handleAmountFocus = () => {\n props.handleAmountFocus();\n };\n\n const getPresetOptions = (values, symbol, charityAmountCode) => {\n const [firstParts = {}] = getCurrencyParts();\n const rightSymbol = firstParts.$ !== 'symbol';\n const result = values.map((value) => {\n let amountDisplayValue;\n if (rightSymbol) {\n amountDisplayValue = symbol\n ? `${formatAmountFromServerDNW(value, charityAmountCode, {\n noDecimals: true,\n })} ${symbol}`\n : `${formatAmountFromServerDNW(value, charityAmountCode, {\n noDecimals: true,\n })}`;\n } else {\n amountDisplayValue = symbol\n ? `${symbol}${formatAmountFromServerDNW(value, charityAmountCode, {\n noDecimals: true,\n })}`\n : `${formatAmountFromServerDNW(value, charityAmountCode, {\n noDecimals: true,\n })}`;\n }\n return {\n label: amountDisplayValue,\n secondaryLabel: charityAmountCode,\n value: formatAmountFromServerDNW(value, charityAmountCode),\n };\n });\n return [...result, { label: presetOther, value: 'Other' }];\n };\n\n const amountFieldValue =\n AppStore.getDonationAmountType() === 'preset' ? '' : props.charityAmount;\n const presetOptions = getPresetOptions(\n presetAmounts,\n props.charityAmountSymbol,\n props.charityAmountCode\n );\n\n return (\n <>\n \n \n );\n}\n\nPresetAmountRow.propTypes = {\n hideValidationError: PropTypes.func,\n handleAmountChange: PropTypes.func,\n handleAmountFocus: PropTypes.func,\n charityAmount: PropTypes.string,\n showValidationError: PropTypes.bool,\n charityAmountSymbol: PropTypes.string,\n charityAmountCode: PropTypes.string,\n decimalPoint: PropTypes.string,\n isAmountEditable: PropTypes.bool,\n validationErrorMessage: PropTypes.string,\n validationErrorCode: PropTypes.string,\n};\nexport default PresetAmountRow;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport _debounce from 'lodash/debounce';\nimport AppStore from '../stores/AppStore';\nimport * as AppActions from '../actions/AppActions';\nimport TemplateData from '../utility/getTemplateData';\nimport { fetcher } from '../utility/domUtils';\nimport { SingleAmount } from '@paypalcorp/donate-react';\nimport Calculator from '../components/amount/calculator';\nimport PresetAmountRow from './amount/PresetAmountRow';\nimport {\n setFeeAmountInStore,\n optOutCoverFee,\n isAtLandingPage,\n isOptInCoverFee,\n} from './coverFee/feeUtils';\nimport AppDispatcher from '../dispatcher/AppDispatcher';\nimport { getParameterByName } from '../utility/queryStringHelper';\nimport { addShake } from '../utility/helper';\nimport {\n getGriffin,\n __getInitialData,\n getAmountPlaceHolder,\n} from '../utility/formator';\nimport { localsMessages } from '../utility/getTemplateData';\nimport { trackErrorIM } from '../fpti/fpti';\n\nlet griffin = getGriffin();\nlet {\n amount: { label: amountLabel = '' },\n} = localsMessages('common/amount');\nclass AmountWrapper extends React.Component {\n constructor(props) {\n super(props);\n\n const currencyObj = JSON.parse(\n document.getElementById('currencyLists').innerHTML || {}\n );\n const { currencies: currencyLists, symbols: currencySymbols } =\n currencyObj || {};\n\n let userCountry = TemplateData.donorIpCountry;\n let availableCurrencies = currencyLists[userCountry] || currencyLists.US;\n let userAmountCode = availableCurrencies[0];\n let charityAmountCode = AppStore.getDonationCode();\n let isEditable = !!TemplateData.donationAmountEditable;\n // let showCBCalculator = TemplateData.pxp && TemplateData.pxp.calculator && TemplateData.pxp.calculator.experiment || false;\n\n let isCalculator = false;\n // Disabled Calculator\n // let isCalculator =\n // \tisEditable &&\n // \tuserAmountCode !== charityAmountCode &&\n // \t(showCBCalculator || TemplateData.isCorpIp);\n\n this.state = {\n charityAmountCode,\n charityAmount: AppStore.getDonationAmount() || '',\n charityAmountSymbol: AppStore.getDonationSymbol(),\n charityDisabled: false,\n\n userCountry,\n userAmountCode,\n userAmount: '',\n userDisabled: false,\n\n availableCurrencies,\n currencySymbols,\n isCalculator,\n decimalPoint: TemplateData.donationDecimalPoint || '.',\n conversionRate: '',\n isAmountEditable: isEditable,\n\n showValidationError: props.showValidationError || false,\n validationErrorMessage: props.validationErrorMessage || '',\n validationErrorCode: props.validationErrorCode || '',\n };\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state.showValidationError !== nextProps.showValidationError) {\n this.setState({\n showValidationError: nextProps.showValidationError,\n validationErrorMessage: nextProps.validationErrorMessage,\n validationErrorCode: nextProps.validationErrorCode,\n });\n }\n }\n\n componentDidMount = () => {\n // Watch for amount change for the case that donor opts in to cover fee\n // and clicks back button to go back to landing page\n // as we need to restore donor's original entered amount\n this.dispatcherCharityAmount = AppDispatcher.register((payload) => {\n if (payload.action && payload.action.actionType === 'CHANGE_AMOUNT') {\n const { action: { item: { amount = 0 } = {} } = {} } = payload;\n this.setState({\n charityAmount: amount,\n });\n }\n });\n };\n\n componentWillUnmount = () => {\n AppDispatcher.unregister(this.dispatcherCharityAmount);\n };\n\n isGuestReviewPage = () => {\n return (\n window.location.pathname.includes('guest') ||\n ![undefined, null].includes(getParameterByName('signup'))\n );\n };\n\n normalizeAmount = (amount) => {\n return isNaN(amount) ? 0 : amount;\n };\n\n setAppAmount = (amount) => {\n AppActions.changeAmount({\n amount,\n });\n };\n\n getConversionRate = (state, exchangeRate) => {\n let rate =\n exchangeRate.base_currency_code === state.userAmountCode\n ? exchangeRate.quote_amount\n : 1 / exchangeRate.quote_amount;\n return rate.toFixed(2);\n };\n\n getConversionRequest = (state, params, callback) => {\n this.getConversionRequest = _debounce((st, par, fn) => {\n const queryParams = {\n fromCountry: st.userCountry,\n fromCurrency: st.userAmountCode,\n toCurrency: st.charityAmountCode,\n ...par,\n };\n\n if (queryParams.fromAmount) {\n queryParams.fromAmount = this.normalizeAmount(queryParams.fromAmount);\n } else {\n queryParams.toAmount = this.normalizeAmount(queryParams.toAmount);\n }\n const url = '/donate/calculate-foreign-exchange';\n this.props.conversionStatus(true);\n Promise.resolve(\n fetcher(url, {\n method: 'POST',\n body: JSON.stringify(queryParams),\n })\n )\n .then((response) => response.json())\n .then(({ result }) => {\n this.props.conversionStatus(false);\n fn(result);\n })\n .catch(() => {\n this.props.conversionStatus(false);\n let amount = queryParams.fromAmount || queryParams.toAmount || '';\n amount += '';\n fn({\n target: { value: amount },\n source: { value: amount },\n exchange_rate: {\n base_currency_code: queryParams.userAmountCode,\n quote_amount: 1,\n },\n });\n });\n }, 500);\n\n this.getConversionRequest(state, params, callback);\n };\n\n /*\n * getConversion\n * Getting conversion rate for calculator\n */\n getConversion = (state, params, fn) => {\n // Conversion is only required for calculator\n if (state.isCalculator) {\n this.getConversionRequest(state, params, fn);\n } else {\n const amount = params.fromAmount || params.toAmount || '';\n fn({\n target: { value: amount },\n source: { value: amount },\n exchange_rate: {\n base_currency_code: state.userAmountCode,\n quote_amount: 1,\n },\n });\n }\n };\n\n handleAmountChange = (amount) => {\n this.setState({ charityAmount: amount });\n this.setAppAmount(amount);\n\n // let recurringStatus = AppStore.getDonationRecurring() === 'checked';\n // if (recurringStatus) {\n // if (isAmountGreaterThanZero(amount)) {\n // $('#donateNowAmt').html(this.state.charityAmountSymbol + amount);\n // } else {\n // $('#donateNowAmt').html(' ');\n // }\n // }\n\n if (isAtLandingPage()) {\n // Compute fee amount and update store\n setFeeAmountInStore();\n // Let landing page know that fee amount displayed needs to be updated\n this.props.updateFeeAmount();\n } else {\n // Since user updates the amount in the guest page\n // we should opt user out for cover the fee in case\n // they go back to landing page\n if (isOptInCoverFee()) {\n optOutCoverFee();\n }\n\n // In case user selects a preset button but update the amount\n // in review page, the donation amount type should now be\n // \"userinput\"\n if (AppStore.getDonationAmountType() === 'preset') {\n AppActions.updateDonationAmountType('userinput');\n }\n }\n };\n\n handleAmountFocus() {\n this.props.onFocus();\n }\n\n handleUserAmountChange = (amount) => {\n let snapshot = {\n userAmount: amount,\n charityDisabled: true,\n };\n let state = { ...this.state, ...snapshot };\n this.setState(snapshot);\n\n this.getConversion(\n state,\n {\n fromAmount: state.userAmount,\n },\n ({ target, exchange_rate }) => {\n this.setState({\n conversionRate: this.getConversionRate(state, exchange_rate),\n charityAmount: target.value,\n charityDisabled: false,\n });\n this.setAppAmount(target.value);\n }\n );\n };\n\n handleUserCurrencyChange = (currencyCode) => {\n let snapshot = {\n userAmountCode: currencyCode,\n charityDisabled: true,\n };\n let state = { ...this.state, ...snapshot };\n this.setState(snapshot);\n\n this.getConversion(\n state,\n {\n fromAmount: state.userAmount,\n },\n ({ target, exchange_rate }) => {\n state.charityAmount = target.value;\n this.setState({\n conversionRate: this.getConversionRate(state, exchange_rate),\n charityAmount: state.charityAmount,\n charityDisabled: false,\n });\n this.setAppAmount(target.value);\n }\n );\n };\n\n handleCharityAmountChange = (amount) => {\n let snapshot = {\n charityAmount: amount,\n userDisabled: true,\n };\n let state = { ...this.state, ...snapshot };\n this.setState(snapshot);\n\n this.getConversion(\n state,\n {\n toAmount: state.charityAmount,\n },\n ({ source, exchange_rate }) => {\n this.setState({\n conversionRate: this.getConversionRate(state, exchange_rate),\n userAmount: source.value,\n userDisabled: false,\n });\n this.setAppAmount(state.charityAmount);\n }\n );\n };\n\n handleTrackError = (errorCode, errorString, errorSourceField) => {\n trackErrorIM({\n errorCode: errorCode || 'DONATION_AMOUNT_VALIDATION_ERROR',\n errorMessage: errorString,\n fieldName: errorSourceField,\n });\n };\n\n shouldShowPresetAmounts = () => {\n // Should only show preset amount options in landing\n // page not review page to make the experience consistent\n // with member flow. It works better for cover the fees as well\n return (\n TemplateData.enablePresetAmounts &&\n !this.state.isCalculator &&\n !this.isGuestReviewPage()\n );\n };\n\n renderPresetAmounts = () => {\n return (\n \n );\n };\n\n render() {\n if (this.shouldShowPresetAmounts()) {\n return (\n
\n {this.renderPresetAmounts()}\n
\n );\n }\n\n return (\n
\n {this.state.isCalculator ? (\n \n ) : (\n \n )}\n
\n );\n }\n}\n\nAmountWrapper.propTypes = {\n conversionStatus: PropTypes.func,\n showValidationError: PropTypes.bool,\n hideValidationError: PropTypes.func,\n validationErrorMessage: PropTypes.string,\n validationErrorCode: PropTypes.string,\n validateDonationAmount: PropTypes.func,\n onFocus: PropTypes.func,\n updateFeeAmount: PropTypes.func,\n};\n\nexport default AmountWrapper;\n","/**\n * Card security code input used for adding a card\n */\nimport React from 'react';\nimport { TextInput } from '@paypalcorp/pp-react';\nimport PropTypes from 'prop-types';\n\nimport { cardSpecPropType } from 'prop-validators';\n\nclass CardSecurityCode extends React.Component {\n static propTypes = {\n cardSpec: cardSpecPropType,\n label: PropTypes.string.isRequired,\n errorMessage: PropTypes.string,\n handleChangeSecurityCode: PropTypes.func.isRequired,\n handleFocus: PropTypes.func,\n handleBlur: PropTypes.func,\n dir: PropTypes.string,\n helperText: PropTypes.string,\n };\n\n static defaultProps = {\n handleFocus: () => {},\n handleBlur: () => {},\n };\n\n state = { value: '', showIsRequiredError: false };\n\n /**\n * Handle changing the csc\n * @param {String} securityCode - the csc\n * @return {String} securityCode - numbers only\n */\n handleChangeSecurityCode = ({ target: { value: securityCode } }) => {\n securityCode = securityCode.replace(/\\D+/g, '');\n this.setState({ value: securityCode });\n this.handleCheckForValue(securityCode);\n this.props.handleChangeSecurityCode(securityCode);\n return securityCode;\n };\n\n /**\n * Check for a security code value\n * If the field is required, we should show that this field needs a value\n * @param {String} securityCode - the csc\n */\n handleCheckForValue = (securityCode) => {\n const cscSpecs = this.props.cardSpec.fields.csc;\n const isRequired = cscSpecs.required;\n this.setState({ showIsRequiredError: isRequired && !securityCode });\n };\n\n /**\n * Call parent's handleFocus\n * @param {String} securityCode - the csc\n */\n handleFocus = (securityCode) => {\n this.props.handleFocus(securityCode);\n };\n\n /**\n * Check for a security code value and call parent's handleBlur\n * @param {String} securityCode - the csc\n */\n handleBlur = ({ target: { value: securityCode } }) => {\n this.handleCheckForValue(securityCode);\n this.props.handleBlur(securityCode);\n };\n\n render() {\n const cscSpecs = this.props.cardSpec.fields.csc;\n // let helpText = '●'.repeat(cscSpecs.maxlength)\n let { errorMessage } = this.props;\n\n return (\n
\n \n
\n );\n }\n}\n\nexport default CardSecurityCode;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { BodyText, Alert } from '@paypalcorp/pp-react';\nimport getContent from 'pp-react-l10n';\n\nconst getRecurringInfoContent = getContent('locals')(\n 'common/recurring-checkbox'\n);\n\nexport default function RecurringInfo({ orgName, amount }) {\n return (\n \n \n {getRecurringInfoContent(\n 'rp.helpText1',\n { orgName: orgName, amount: amount },\n { useHTML: true }\n )}\n \n \n );\n}\n\nRecurringInfo.propTypes = {\n orgName: PropTypes.string,\n amount: PropTypes.string,\n};\n","/* eslint-disable */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { StyleSheet, css } from '../../utility/paypalAphrodite';\nimport * as AppActions from '../../actions/AppActions';\nimport AppStore from '../../stores/AppStore';\nimport AppDispatcher from '../../dispatcher/AppDispatcher';\nimport TemplateData, { localsMessages } from '../../utility/getTemplateData';\nimport { isLTR as isLeftToRight } from '../../utility/helper';\nimport { loadBodyMovin } from '../../utility/lazyLoader';\nimport { formatAmount } from '../../utility/formator';\nimport { sanitizeOrgName } from '../../utility/domUtils';\nimport RecurringInfo from './RecurringInfo';\nimport { Checkbox, Tooltip, Modal } from '@paypalcorp/pp-react';\nimport { preventFormSubmitOnTooltipClick } from '../../utility/fixPpReactToolTip';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { FPTI_TAGS, LINK_NAME } from '../../fpti/fptiConstants';\n\nconst orgname = TemplateData.donationName ? TemplateData.donationName : '';\nconst isLTR = isLeftToRight();\nlet texts = localsMessages('common/recurring-checkbox');\nlet isContinue = false;\n\nconst styles = StyleSheet.create({\n wrapper: {},\n centered: {\n display: 'flex',\n justifyContent: 'center',\n },\n toolWrapper: {\n display: 'inline-block',\n position: 'relative',\n margin: '0',\n paddingBottom: '10px',\n },\n animationWrapper: {\n width: '100%',\n position: 'absolute',\n height: 125,\n marginTop: -125,\n },\n animationContainer: {\n transform: isLTR ? 'scaleX(1)' : 'scaleX(-1)',\n height: 250,\n width: 250,\n marginLeft: -35,\n },\n recurringButton: {\n width: '100%',\n padding: 20,\n borderRadius: '3rem',\n fontSize: 15,\n marginBottom: 0,\n },\n borderOnly: {\n background: 'transparent',\n color: '#0070ba',\n },\n divider: {\n position: 'relative',\n borderBottom: '1px solid #ccc',\n textAlign: 'center',\n margin: '0 0 20px',\n },\n dividerContent: {\n position: 'relative',\n textAlign: 'center',\n backgroundColor: '#fff',\n display: 'inline-block',\n margin: 0,\n top: 9,\n padding: '0 10px',\n fontSize: 18,\n },\n verticalCentered: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\nclass RecurringCheckBox extends React.Component {\n constructor(props) {\n super(props);\n const amount = AppStore.getDonationAmount() || '';\n const currency = AppStore.getDonationCode() || '';\n this.state = {\n showhelp: this.props.status,\n formatedAmount: formatAmount({ currency: currency, value: amount }),\n };\n }\n\n componentDidMount = () => {\n this.dispatcherToken = AppDispatcher.register((payload) => {\n if (payload.action && payload.action.actionType === 'CHANGE_AMOUNT') {\n const { action: { item: { amount = 0 } = {} } = {} } = payload;\n this.updateAmount(amount);\n }\n });\n\n preventFormSubmitOnTooltipClick();\n };\n\n componentWillUnmount = () => {\n isContinue = this.props.continue;\n AppDispatcher.unregister(this.dispatcherToken);\n };\n\n loadAnimation(display) {\n if (!display) {\n return;\n }\n loadBodyMovin().then(() => {\n // Animation is displayed after bodymovin files are downloaded\n // On slow connections, user may click the checkbox a few times before\n // the JS files are downloaded\n if (this.state.isAnimating) {\n return;\n }\n const animationData = window.heartsAnimationData;\n const bodymovinLibrary = window.bodymovin;\n if (!bodymovinLibrary || !animationData) {\n return;\n }\n this.setState({\n isAnimating: true,\n });\n\n bodymovinLibrary.loadAnimation({\n // eslint-disable-line\n container: document.getElementById('animationContainer'),\n renderer: 'svg',\n loop: 1,\n autoplay: true,\n animationData,\n });\n // Destroying with timeout\n setTimeout(() => {\n bodymovinLibrary.destroy(); // eslint-disable-line\n this.setState({\n isAnimating: false,\n });\n }, 1000);\n });\n }\n\n updateAmount = (value) => {\n const currency = AppStore.getDonationCode() || '';\n this.setState({ formatedAmount: formatAmount({ currency, value }) });\n };\n\n handleChange = (ev) => {\n let { showhelp } = this.state;\n let isChecked = ev.target.checked;\n let chkBxStatus = isChecked ? 'checked' : 'unchecked';\n\n this.loadAnimation(isChecked);\n\n AppActions.changeRecurring({\n recurring: chkBxStatus,\n });\n trackLinkClick(LINK_NAME.RECURRING_CHECKBOX, {\n additionalData: {\n [FPTI_TAGS.CHECKBOX]: chkBxStatus,\n },\n });\n\n this.props.handleChange(isChecked);\n\n this.setState({ showhelp: (showhelp = !showhelp) });\n };\n\n createMarkup = (content) => {\n return { __html: content };\n };\n\n render() {\n let { recurring_label, perMonth } = texts.rp;\n\n const checked = { checked: false };\n if (this.props.status) {\n checked.checked = true;\n }\n\n return (\n \n
\n {isContinue ? (\n
\n {perMonth}\n
\n ) : (\n
\n
\n \n
\n
\n
\n \n
\n
\n \n )}\n \n {this.props.status && !isContinue && (\n
\n \n
\n )}\n \n );\n }\n}\n\nRecurringCheckBox.propTypes = {\n handleChange: PropTypes.func,\n status: PropTypes.bool,\n continue: PropTypes.bool,\n};\n\nRecurringCheckBox.defaultProps = {\n handleChange: () => {},\n};\n\nexport default RecurringCheckBox;\n","export function preventFormSubmitOnTooltipClick() {\n let tooltipButton = document.getElementsByClassName('ppvx_tooltip__icon');\n Object.values(tooltipButton).map((btn) => {\n btn.type = 'button';\n });\n}\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","export var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport { canUseDOM } from './utils';\n\nvar Portal = function (_React$Component) {\n _inherits(Portal, _React$Component);\n\n function Portal() {\n _classCallCheck(this, Portal);\n\n return _possibleConstructorReturn(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments));\n }\n\n _createClass(Portal, [{\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.defaultNode) {\n document.body.removeChild(this.defaultNode);\n }\n this.defaultNode = null;\n }\n }, {\n key: 'render',\n value: function render() {\n if (!canUseDOM) {\n return null;\n }\n if (!this.props.node && !this.defaultNode) {\n this.defaultNode = document.createElement('div');\n document.body.appendChild(this.defaultNode);\n }\n return ReactDOM.createPortal(this.props.children, this.props.node || this.defaultNode);\n }\n }]);\n\n return Portal;\n}(React.Component);\n\nPortal.propTypes = {\n children: PropTypes.node.isRequired,\n node: PropTypes.any\n};\n\nexport default Portal;","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// This file is a fallback for a consumer who is not yet on React 16\n// as createPortal was introduced in React 16\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\n\nvar Portal = function (_React$Component) {\n _inherits(Portal, _React$Component);\n\n function Portal() {\n _classCallCheck(this, Portal);\n\n return _possibleConstructorReturn(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments));\n }\n\n _createClass(Portal, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.renderPortal();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(props) {\n this.renderPortal();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n ReactDOM.unmountComponentAtNode(this.defaultNode || this.props.node);\n if (this.defaultNode) {\n document.body.removeChild(this.defaultNode);\n }\n this.defaultNode = null;\n this.portal = null;\n }\n }, {\n key: 'renderPortal',\n value: function renderPortal(props) {\n if (!this.props.node && !this.defaultNode) {\n this.defaultNode = document.createElement('div');\n document.body.appendChild(this.defaultNode);\n }\n\n var children = this.props.children;\n // https://gist.github.com/jimfb/d99e0678e9da715ccf6454961ef04d1b\n if (typeof this.props.children.type === 'function') {\n children = React.cloneElement(this.props.children);\n }\n\n this.portal = ReactDOM.unstable_renderSubtreeIntoContainer(this, children, this.props.node || this.defaultNode);\n }\n }, {\n key: 'render',\n value: function render() {\n return null;\n }\n }]);\n\n return Portal;\n}(React.Component);\n\nexport default Portal;\n\n\nPortal.propTypes = {\n children: PropTypes.node.isRequired,\n node: PropTypes.any\n};","import ReactDOM from 'react-dom';\n\nimport Portalv4 from './Portal';\nimport LegacyPortal from './LegacyPortal';\n\nvar Portal = void 0;\n\nif (ReactDOM.createPortal) {\n Portal = Portalv4;\n} else {\n Portal = LegacyPortal;\n}\n\nexport default Portal;","import React, { Component } from 'react';\nimport AppStore from '../../stores/AppStore';\nimport _get from 'lodash/get';\nimport { getPaymentCardNetwork } from '../../utility/card-utils';\nimport { localsMessages } from '../../utility/getTemplateData';\nimport { StyleSheet, css } from 'aphrodite';\nimport _isEmpty from 'lodash/isEmpty';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport { appendCdnHostName } from '../../utility/geoUtils';\nimport withTheme from '../../components/withTheme';\nimport { BodyText, HeadingText } from '@paypalcorp/pp-react';\n\nlet threeDSText = localsMessages('common/threeDSecure');\n\nconst LOADING_GIF_SOURCE = appendCdnHostName(\n '/ui-web/money-icons/partnerships/mbLoader_256_sm.gif'\n);\n\nconst STYLES = StyleSheet.create({\n spinnerAlign: {\n margin: '30px auto 30px',\n },\n cardImg: {\n marginTop: '24px',\n },\n});\n\nconst { wontTakeLong, DoNotCloseOrRefresh } = localsMessages(\n 'common/threeDSecure'\n);\n\nclass ThreeDSSpinner extends Component {\n constructor(props) {\n super(props);\n this.state = {\n cardImg: null,\n network: null,\n };\n }\n\n setNetworkDetails = () => {\n const fundingOptions = AppStore.getFundingOptions();\n let cardImg = _get(\n fundingOptions,\n 'sources[0].payment_card.issuer.thumbnail_logo_url'\n );\n let network = getPaymentCardNetwork(\n _get(fundingOptions, 'sources[0].payment_card')\n );\n let myData = AppStore.getAllData() || {};\n if (\n cardImg === null ||\n _isEmpty(cardImg) ||\n typeof cardImg === 'undefined'\n ) {\n const cardType = _get(myData, 'cardSpec.cardSpec.type', '')\n .replace(/[.,_]|\\s\\(.*\\)/g, '')\n .replace(/[\\s_]/g, '-')\n .toLowerCase();\n cardImg = appendCdnHostName(\n `/digitalassets/c/consumer/p2p/funding-sources/${cardType}.png`\n );\n }\n if (\n network === null ||\n _isEmpty(network) ||\n typeof network === 'undefined'\n ) {\n network = myData.cardSpec.cardSpec.type.replace(/[_]/g, ' ');\n }\n this.setState({ cardImg, network });\n };\n\n componentDidMount() {\n // Hide the donate spinner in the background\n // to prevent double spinners\n hideSpinnerOverlay();\n this.setNetworkDetails();\n }\n\n render() {\n let confirmingWithText = _get(\n threeDSText,\n 'confirmingWith',\n \"We're confirming your info with {network}\"\n );\n const confirmingWith = confirmingWithText.replace(\n new RegExp('{network}', 'g'),\n this.state.network\n );\n\n return (\n
\n
\n
\n {/*
*/}\n
\n \n
\n \n {confirmingWith}\n \n
\n {this.state.cardImg ? (\n \"Card\n ) : (\n ''\n )}\n
\n
\n {wontTakeLong}\n {DoNotCloseOrRefresh}\n
\n
\n
\n
\n );\n }\n}\n\nexport default withTheme(ThreeDSSpinner);\n","import React, { Component } from 'react';\nimport AppStore from '../../stores/AppStore';\nimport { withRouter } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport _get from 'lodash/get';\nimport _find from 'lodash/find';\nimport { trackThreeDsDdcFailure } from '../../fpti/fpti';\nimport { FPTI_TAGS } from '../../fpti/fptiConstants';\n\nclass ThreeDSDeviceDataCollection extends Component {\n static propTypes = {\n onThreeDSDDCComplete: PropTypes.func,\n };\n\n getThreeDSParams() {\n const fundingOptions = AppStore.getFundingOptions();\n const contingencies = _get(fundingOptions, 'contingencies') || [];\n const threeDSContingency =\n _find(contingencies, { action: '3D_SECURE_DATA_COLLECTION_REQUIRED' }) ||\n {};\n\n return threeDSContingency;\n }\n\n componentDidMount() {\n // 'message' is passed after 3DS Submit is completed\n window.addEventListener('message', this.handleDDCEvent);\n\n const { three_ds_reference_id: threeDS2ReferenceId } =\n this.getThreeDSParams();\n\n if (this.refs[threeDS2ReferenceId]) {\n try {\n this.refs[threeDS2ReferenceId].submit();\n } catch (e) {\n console.log('e ', e);\n }\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('message', this.handleDDCEvent);\n }\n\n handleDDCEvent = (event) => {\n const eventOrigin = _get(event, 'origin', '');\n if (eventOrigin.includes('cardinalcommerce.com')) {\n let data = null;\n try {\n data = JSON.parse(event.data);\n } catch (exception) {\n // Error handler incase parsing goes wrong\n data = {};\n }\n\n const messageType = _get(data, 'MessageType', '');\n if (messageType === 'profile.completed') {\n this.onDDCComplete(event);\n } else {\n trackThreeDsDdcFailure({\n [FPTI_TAGS.STATUS]: messageType,\n });\n console.log('DDC not completed with message type: ', messageType);\n }\n }\n };\n\n onDDCComplete = (event) => {\n this.props.onThreeDSDDCComplete(event);\n };\n\n render() {\n const {\n device_data_collection_url: deviceDataCollectionUrl,\n jwt,\n three_ds_reference_id: threeDS2ReferenceId,\n } = this.getThreeDSParams();\n\n if (!deviceDataCollectionUrl) {\n return null;\n }\n\n return (\n
\n \n
\n \n );\n };\n\n render() {\n return (\n \n {this.getModalBody()}\n \n );\n }\n}\n\nThreeDSIframe.propTypes = {\n onStepUpAuthComplete: PropTypes.func,\n icon: PropTypes.string,\n hideModal: PropTypes.func,\n isOpen: PropTypes.bool,\n onClose: PropTypes.func,\n};\nexport default withTheme(ThreeDSIframe);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Portal } from 'react-portal';\nimport ThreeDSSpinner from './ThreeDSSpinner';\nimport ThreeDSDeviceDataCollection from './ThreeDSDeviceDataCollection';\nimport ThreeDSIframe from './ThreeDSIframe';\nimport * as AppActions from '../../actions/AppActions';\nimport _get from 'lodash/get';\nimport { fetcher } from '../../utility/domUtils';\nimport { FPTI_TAGS } from '../../fpti/fptiConstants';\nimport templateData from '../../utility/getTemplateData';\nimport {\n trackThreeDsDdcComplete,\n trackThreeDsDdcStart,\n trackThreeDsLookupComplete,\n trackThreeDsLookupStart,\n} from '../../fpti/fpti';\n\nclass ThreeDSContainer extends Component {\n constructor(props) {\n super(props);\n this.state = {\n showThreeDSIframe: false,\n showThreeDSSpinner: false,\n showThreeDSDeviceDataCollection: false,\n threeDSDCCStartTime: null,\n };\n }\n\n componentDidMount() {\n this.props.onRef(this);\n }\n\n componentWillUnmount() {\n this.props.onRef(undefined);\n }\n\n initializeThreeDS() {\n let startTime = new Date().getTime();\n this.setState({\n showThreeDSDeviceDataCollection: true,\n showThreeDSSpinner: true,\n threeDSDCCStartTime: startTime,\n });\n\n const fptiData = {\n [FPTI_TAGS.THREE_DS_DCC_START_TIME]: startTime,\n [FPTI_TAGS.THREE_DS_SPINNER_START_TIME]: startTime,\n };\n trackThreeDsDdcStart(fptiData);\n }\n\n handleThreeDSDDCComplete = () => {\n this.setState({\n showThreeDSDeviceDataCollection: false,\n });\n\n const threeDSDCCEndTime = new Date().getTime();\n const fptiData = {\n [FPTI_TAGS.THREE_DS_DCC_START_TIME]: this.state.threeDSDCCStartTime,\n [FPTI_TAGS.THREE_DS_DCC_END_TIME]: threeDSDCCEndTime,\n [FPTI_TAGS.THREE_DS_SPINNER_START_TIME]: this.state.threeDSDCCStartTime,\n [FPTI_TAGS.THREE_DS_SPINNER_END_TIME]: threeDSDCCEndTime,\n };\n trackThreeDsDdcComplete(fptiData);\n this.resolveThreeDSContingency();\n };\n\n resolveThreeDSContingency = () => {\n trackThreeDsLookupStart({\n [FPTI_TAGS.THREE_DS_LOOKUP_START_TIME]: new Date().getTime(),\n });\n\n fetcher('/donate/guest/resolve-threeds-contingency', {\n method: 'POST',\n body: JSON.stringify({\n token: templateData.token,\n }),\n })\n .then((response) => response.json())\n .then((result) => {\n this.hideThreeDSSpinner();\n\n const threeDSContingency = _get(result, 'data.threeDSContingency');\n const resolved = _get(threeDSContingency, 'threeDSContingencyResolved');\n\n trackThreeDsLookupComplete({\n timestamp: {\n [FPTI_TAGS.THREE_DS_LOOKUP_END_TIME]: new Date().getTime(),\n },\n [FPTI_TAGS.CONTINGENCY_RESOLVED]: resolved,\n [FPTI_TAGS.URL]: _get(\n threeDSContingency,\n 'threeDS2Contingency.3d_secure_redirect_link'\n ),\n [FPTI_TAGS.ACTION]: _get(\n threeDSContingency,\n 'threeDS2Contingency.action'\n ),\n });\n\n if (resolved) {\n // 3DS Contingency resolved without StepUp Auth\n this.props.onThreeDSStepUpAuthNotRequired();\n\n return;\n }\n // Save threeDS data and show 3DS iframe\n AppActions.updateThreeDSData(threeDSContingency);\n this.showThreeDSIframe();\n })\n .catch((e) => {\n // Clear 3DS data\n AppActions.updateThreeDSData({});\n this.hideThreeDSIframe();\n this.props.onThreeDSFailure();\n });\n };\n\n handleThreeDSStepUpAuthComplete = ({ confirmationStatus = false, error }) => {\n if (confirmationStatus && confirmationStatus === 'threeDS-success') {\n this.props.onThreeDSStepUpAuthSuccess();\n } else {\n this.props.onThreeDSStepUpAuthFailure();\n return;\n }\n };\n\n showThreeDSIframe = () => {\n this.setState({\n showThreeDSIframe: true,\n });\n };\n\n hideThreeDSIframe = () => {\n this.setState({\n showThreeDSIframe: false,\n });\n };\n\n showThreeDSSpinner = () => {\n this.setState({\n showThreeDSSpinner: true,\n });\n };\n hideThreeDSSpinner = () => {\n this.setState({\n showThreeDSSpinner: false,\n });\n };\n\n render() {\n return (\n
\n {this.state.showThreeDSSpinner && (\n \n \n \n )}\n\n {this.state.showThreeDSDeviceDataCollection && (\n \n )}\n\n {this.state.showThreeDSIframe && (\n \n )}\n
\n );\n }\n}\n\nThreeDSContainer.propTypes = {\n onThreeDSStepUpAuthNotRequired: PropTypes.func,\n onThreeDSStepUpAuthSuccess: PropTypes.func,\n onThreeDSStepUpAuthFailure: PropTypes.func,\n onThreeDSFailure: PropTypes.func,\n onRef: PropTypes.func,\n toggleSpinner: PropTypes.func,\n};\n\nexport default ThreeDSContainer;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import React, { Component } from 'react';\nimport templateData, { localsMessages } from '../../utility/getTemplateData';\nimport {\n handleGuestCountryChange,\n hideSpinnerOverlay,\n showSpinnerOverlay,\n} from '../../utility/helper';\nimport * as DonateAppActions from '../../actions/AppActions';\nimport { getInitialData } from '../../utility/formator';\nimport AppStore from '../../stores/AppStore';\nimport { getParametersFromUrl } from '../../utility/queryStringHelper';\nimport PropTypes from 'prop-types';\nimport { startCustomCPLTrackingForConfirmationPage } from '../../utility/cpl';\nimport {\n fetcher,\n scrollElementIntoView,\n objectOrArrayToQueryString,\n} from '../../utility/domUtils';\nimport isEmpty from 'lodash/isEmpty';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { FPTI_TAGS, LINK_NAME } from '../../fpti/fptiConstants';\n\nconst initialData = getInitialData();\nconst serviceErrorMessages = localsMessages('errors/service');\n\nconst ERROR_ELEMENT_SELECTOR = [\n '.vx_has-error-with-message',\n '.service_error_holder',\n].join();\n\nfunction withDonate(WrappedComponent) {\n return class extends Component {\n static propTypes = {\n history: PropTypes.object,\n };\n\n constructor(props) {\n super(props);\n this.country = initialData.selectedCountry;\n }\n\n handleCountryChange = (country) => {\n if (country !== this.country) {\n this.toggleSpinner(true);\n DonateAppActions.changeCountry({\n country: country,\n });\n this.country = country;\n\n // Beacons for country change\n trackLinkClick(LINK_NAME.CHANGE_COUNTRY, {\n additionalData: {\n [FPTI_TAGS.COUNTRY]: country,\n },\n });\n\n let { token, signUp = false } = templateData;\n let url = signUp\n ? `/donate?token=${token}&signup=true&country.x=${country}&locale.x=${country}`\n : `/donate?token=${token}&country.x=${country}&locale.x=${country}&countryChange=true&clientState=/donate/guest?token=${token}`;\n\n handleGuestCountryChange(url);\n }\n };\n\n /*\n * showing and hiding spinner\n */\n toggleSpinner = (isSpinner = false) => {\n if (isSpinner) {\n showSpinnerOverlay();\n } else {\n hideSpinnerOverlay();\n }\n };\n\n // handles scrolling screen to the error\n handleScrollToError = () => {\n scrollElementIntoView(ERROR_ELEMENT_SELECTOR);\n return;\n };\n\n getDonateGuestUrl = () => {\n const { token, country, language } = templateData;\n\n let url = `/donate/guest?token=${token}`;\n if (country) {\n url = url + `&country.x=${country}`;\n }\n\n if (country && language) {\n url = url + `&locale.x=${country}_${language}`;\n }\n\n return url;\n };\n\n getFormData() {\n return AppStore.getFormData();\n }\n\n saveFormData(formData) {\n DonateAppActions.saveFormData(formData);\n }\n\n showErrorOnLoad() {\n const url = window.location.href;\n let params = getParametersFromUrl(url);\n\n if (params.showErrorOnLoad) {\n if (params.showErrorOnLoad === 'fulfillment') {\n // TODO: update error code to the actual fullfilment error code\n let errorCode = 'WSM_TRANSACTION_FAILED_DUE_TO_INVALID_CARD_DATA';\n let errorMsgs = [\n {\n key: 0,\n value: serviceErrorMessages[errorCode],\n },\n ];\n\n // adding delay to wait for the dispatcher to get registered in ServerErrors\n setTimeout(\n () =>\n DonateAppActions.updateServerErrors({ serverErrors: errorMsgs }),\n 250\n );\n }\n // delete params.showErrorOnLoad;\n\n // const query = $.param(params);\n // const cleanedUrl = `/donate/guest/?${query}`;\n // window.history.replaceState({}, document.title, cleanedUrl);\n }\n }\n\n doFulfilment = (params = {}) => {\n const { securityCode } = params;\n this.toggleSpinner(true);\n\n fetcher('/donate/guest/fullfilment', {\n method: 'POST',\n body: JSON.stringify({\n token: templateData.token,\n note: AppStore.getDonationNote(),\n fundingOptionId: AppStore.getFundingOptions().id,\n email: AppStore.getEmail(),\n billingAddress: AppStore.getBillingAddress(),\n giftAidItFlag: AppStore.getGiftaidItFlagStatus() || false,\n card: { securityCode },\n }),\n })\n .then((response) => response.json())\n .then((result) => {\n if (result.code === 'WSM_PAYMENT_DENIED') {\n this.toggleSpinner(false);\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n return;\n } else if (result.status === 'redirect') {\n this.toggleSpinner(false);\n window.location.href = result.url;\n return;\n } else if (\n result.code === 'WSM_TRANSACTION_FAILED_DUE_TO_INVALID_CARD_DATA'\n ) {\n // fulfillment error\n const { token, country } = templateData;\n\n let clientState = encodeURIComponent(\n `/donate/guest?token=${token}&showErrorOnLoad=fulfillment`\n );\n window.location.href = `/donate?token=${token}&country.x=${country}&locale.x=${country}&clientState=${clientState}`;\n return;\n } else if (result.data && result.data.confirmationData) {\n startCustomCPLTrackingForConfirmationPage();\n this.toggleSpinner(false);\n const { token } = templateData;\n const queryParams = objectOrArrayToQueryString({ token });\n let confirmationData = result.data.confirmationData || {};\n DonateAppActions.updateConfirmation({\n confirmation: confirmationData,\n });\n if (confirmationData.isOfacPending) {\n this.props.history.push(`/donate/guest/pending?${queryParams}`);\n } else {\n this.props.history.push(\n `/donate/guest/confirmation?${queryParams}`\n );\n }\n } else {\n this.toggleSpinner(false);\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n }\n })\n .catch(() => {\n this.toggleSpinner(false);\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n });\n };\n\n createOrder = (params) => {\n const token = templateData.token;\n\n fetcher(`/donate/orders?dtoken=${token}`, {\n method: 'POST',\n body: JSON.stringify(params),\n })\n .then((response) => response.json())\n .then((result) => {\n console.log('result ', result);\n\n if (!isEmpty(result.cartUrl)) {\n window.location.href = result.cartUrl;\n } else {\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n }\n })\n .catch(() => {\n this.toggleSpinner(false);\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n });\n };\n\n captureOrder = (orderToken, donateToken, payerID) => {\n return fetcher(\n `/donate/orders/${orderToken}/capture?dtoken=${donateToken}&PayerID=${payerID}`,\n {\n method: 'POST',\n }\n );\n };\n\n render() {\n return (\n \n );\n }\n };\n}\n\nexport default withDonate;\n","/**\n * Card Utilities\n * For use with linking a card\n *\n * - get card type [visa, mastercard, amex, discover, maestro, unionpay] based on the card number\n */\nimport { localsMessages } from './getTemplateData';\nimport _get from 'lodash/get';\n\nconst fundingTypes = localsMessages('common/fundingTypes');\n\nexport const defaultCardSpec = {\n type: 'card',\n fields: {\n ccNumber: {\n required: true,\n pattern: '4[0-9]{12}(?:[0-9]{3})?',\n maxlength: 19,\n },\n expirationDate: {\n required: true,\n pattern: '(0[1-9]|1[012])[/]((20)[0-9]{2}|[0-9]{2})',\n maxlength: 7,\n },\n csc: {\n required: true,\n pattern: '[0-9]*',\n maxlength: 3,\n minlength: 3,\n },\n },\n};\n\n/**\n * Get the card type based on the card number\n * @param {Object} cardSpecs - the card specifications based on user's locale\n * @param {String} cardNumber - the valid card number (numbers only)\n * @return {Object} cardType - the card type specs for a specific card\n */\nexport function getSpecificCardSpec({ cardTypes }, cardNumber) {\n cardNumber = cardNumber.replace(/\\D+/g, '');\n\n for (let card in cardTypes) {\n let cardSpec = cardTypes[card];\n if (\n new RegExp(`^${cardSpec.fields.ccNumber.autodetect}$`).test(cardNumber)\n ) {\n return cardSpec;\n }\n }\n return defaultCardSpec;\n}\n\nconst PAYMENT_CARDS = {\n VISA: 'VISA',\n MASTERCARD: 'MASTERCARD',\n MASTER_CARD: 'MASTER_CARD',\n MAESTRO: 'MAESTRO',\n AMEX: 'AMEX',\n DISCOVER: 'DISCOVER',\n JCB: 'JCB',\n CHINA_UNION_PAY: 'CHINA_UNION_PAY',\n};\n\nexport function getPaymentCardNetwork(source) {\n switch (source.network) {\n case PAYMENT_CARDS.VISA:\n return _get(fundingTypes, 'fundingType.visa');\n case PAYMENT_CARDS.MASTERCARD:\n case PAYMENT_CARDS.MASTER_CARD:\n return _get(fundingTypes, 'fundingType.mastercard');\n case PAYMENT_CARDS.MAESTRO:\n return _get(fundingTypes, 'fundingType.maestro');\n case PAYMENT_CARDS.AMEX:\n return _get(fundingTypes, 'fundingType.amex');\n case PAYMENT_CARDS.DISCOVER:\n return _get(fundingTypes, 'fundingType.discover');\n case PAYMENT_CARDS.CHINA_UNION_PAY:\n return _get(fundingTypes, 'fundingType.china_union_pay');\n default:\n return source.network;\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Icon } from '@paypalcorp/pp-react';\n\nexport default function NoteFieldError(props) {\n const errorText = props.errorText;\n\n if (!errorText) {\n return null;\n }\n return (\n
\n \n \n \n {errorText}\n \n \n
\n );\n}\n\nNoteFieldError.propTypes = {\n errorText: PropTypes.string,\n};\n","import React, { useState, useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport templateData, { localsMessages } from '../utility/getTemplateData';\nimport * as AppActions from '../actions/AppActions';\nimport AppStore from '../stores/AppStore';\nimport { addClass, removeClass } from '../utility/domUtils';\nimport {\n isExternalFlow,\n isCampaigns,\n} from '../utility/productIntegrationUtils';\nimport isEmpty from 'lodash/isEmpty';\nimport { EVENT_NAME } from '../utility/constants';\nimport { IconButton, TextArea, BodyText } from '@paypalcorp/pp-react';\nimport NoteFieldError from './NoteFieldError';\nimport { trackLinkClick } from '../fpti/fpti';\nimport { LINK_NAME } from '../fpti/fptiConstants';\n\nlet messages = localsMessages('common/note');\nconst MAX_CHAR_LIMIT = 250;\n\nfunction NoteComponent(props) {\n let {\n label = '',\n error: { lengthLimit = '' } = {},\n campaigns: { label: campaignsLabel = '' } = {},\n } = messages.note;\n\n let providedLabel = isCampaigns() ? campaignsLabel : label;\n if (templateData.charityNoteEnabled && templateData.charityNoteLabel) {\n providedLabel = templateData.charityNoteLabel;\n }\n\n if (props.label) {\n providedLabel = props.label;\n }\n\n const [donationNote, setDonationNote] = useState(\n AppStore.getDonationNote() || templateData.donationNote || ''\n );\n const initialNoteLabel = isEmpty(donationNote) ? providedLabel : donationNote;\n\n const [showLabel, setShowLabel] = useState(true);\n const [showError, setShowError] = useState(false);\n const [noteLabel, setNoteLabel] = useState(initialNoteLabel);\n const textAreaEl = useRef(null);\n\n const isNoteTextPresent = donationNote.length > 0 ? true : false;\n\n useEffect(() => {\n if (!showLabel && !isEmpty(textAreaEl)) {\n textAreaEl.current.focus();\n }\n }, [showLabel]);\n useEffect(() => {\n if (isNoteTextPresent) {\n setShowLabel(false);\n }\n }, []);\n useEffect(() => {\n if (props.isNotePreview) {\n setNoteLabel(initialNoteLabel);\n }\n }, [initialNoteLabel]);\n\n const directionality = templateData.contextLocalityDir;\n\n const handleClick = () => {\n trackLinkClick(LINK_NAME.NOTE_PAD, {\n eventName: isExternalFlow()\n ? EVENT_NAME.DW_GIVING_DONATE_SETUP_COMMENT_PRESSED\n : '',\n });\n setShowLabel(false);\n };\n\n const handleBlur = (event) => {\n const note = event.target.value;\n\n // Remove all whitespaces\n if (!isEmpty(note) && !isEmpty(note.trim())) {\n AppActions.changeNote({ note });\n setNoteLabel(note);\n } else {\n AppActions.changeNote({ note: '' });\n setNoteLabel(providedLabel);\n setShowLabel(true);\n }\n };\n\n const showNoteFieldError = () => {\n setShowError(true);\n };\n\n const hideNoteFieldError = () => {\n setShowError(false);\n };\n\n const handleOnChange = (event) => {\n const value = event.target.value;\n setDonationNote(value);\n\n if (value && value.length >= MAX_CHAR_LIMIT) {\n addClass('.note_wrap', ['animated', 'shake']);\n setTimeout(() => {\n removeClass('.note_wrap', ['animated', 'shake']);\n }, 1000);\n showNoteFieldError();\n } else {\n hideNoteFieldError();\n }\n };\n\n return (\n
\n \n {showLabel ? (\n \n ) : (\n
\n \n
\n )}\n\n {showError && showLabel && }\n
\n \n );\n}\n\nNoteComponent.propTypes = {\n label: PropTypes.string,\n isNotePreview: PropTypes.bool,\n};\n\nexport default NoteComponent;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as AppActions from '../../actions/AppActions';\nimport { Checkbox, Tooltip } from '@paypalcorp/pp-react';\nimport { EVENT_NAME } from '../../utility/constants';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { LINK_NAME } from '../../fpti/fptiConstants';\n\nconst AnonymousCheckbox = ({\n content,\n optInStatus,\n handleAnonymousDonationChange,\n}) => {\n const handleChange = (event) => {\n const isChecked = event.target.checked,\n checkboxStatus = isChecked ? 'checked' : 'unchecked';\n\n AppActions.changeAnonymousStatus({\n anonymousStatus: checkboxStatus,\n });\n\n handleAnonymousDonationChange(isChecked);\n };\n\n const trackTooltipOpen = () => {\n trackLinkClick(LINK_NAME.ANONYMOUS_TOOLTIP, {\n eventName: EVENT_NAME.DW_GIVING_DONATE_SETUP_TOOLTIP_PRESSED,\n });\n };\n\n return (\n \n \n )\n }\n />\n \n );\n};\n\nAnonymousCheckbox.propTypes = {\n content: PropTypes.object,\n optInStatus: PropTypes.bool,\n handleAnonymousDonationChange: PropTypes.func,\n};\n\nexport default AnonymousCheckbox;\n","function setDonateLoaded() {\n document.getElementsByTagName('body')[0].setAttribute('donate-loaded', true);\n}\n\nsetDonateLoaded();\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { localsMessages } from '../utility/getTemplateData';\nimport { Button, V2PaypalIcon } from '@paypalcorp/pp-react';\nimport { isExternalFlow } from '../utility/productIntegrationUtils';\nconst messages = localsMessages('common/nextButton');\n\nclass NextButtonComponent extends React.Component {\n render() {\n const buttonnext = messages.button && messages.button.next;\n\n return (\n <>\n {isExternalFlow() ? (\n \n {buttonnext}\n \n ) : (\n \n {buttonnext}\n \n )}\n \n );\n }\n}\n\nNextButtonComponent.propTypes = {\n label: PropTypes.string,\n disabled: PropTypes.bool,\n handleNext: PropTypes.func,\n};\n\nexport default NextButtonComponent;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { localsMessages } from '../../utility/getTemplateData';\nimport { Button } from '@paypalcorp/pp-react';\nconst messages = localsMessages('common/oneTouch');\n\nclass OneTouchNextButton extends React.Component {\n render() {\n const buttonnext = messages.button && messages.button.next;\n\n return (\n \n {buttonnext}\n \n );\n }\n}\n\nOneTouchNextButton.propTypes = {\n label: PropTypes.string,\n disabled: PropTypes.bool,\n handleNext: PropTypes.func,\n};\n\nexport default OneTouchNextButton;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { localsMessages } from '../utility/getTemplateData';\nimport { Button } from '@paypalcorp/pp-react';\nconst messages = localsMessages('guest/guestButton');\n\nclass GuestButton extends React.Component {\n render() {\n const { label: { debitorcredit = '' } = {} } = messages;\n return (\n \n {debitorcredit}\n \n );\n }\n}\n\nGuestButton.propTypes = {\n label: PropTypes.string,\n disabled: PropTypes.bool,\n handleGuest: PropTypes.func,\n};\n\nexport default GuestButton;\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { localsMessages } from '../../utility/getTemplateData';\nimport { DropdownMenu } from '@paypalcorp/pp-react-dropdown-menu';\nimport * as AppActions from '../../actions/AppActions';\nimport appStore from '../../stores/AppStore';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { FPTI_TAGS, LINK_NAME } from '../../fpti/fptiConstants';\nconst messages = localsMessages('common/programs');\n\nconst Programs = ({ programNames, isDisabled }) => {\n const [selectedIdx, handleSelect] = useState(0);\n\n // programNames is coming as a string sometimes\n // Convert it to an array\n if (programNames && !Array.isArray(programNames)) {\n programNames = [programNames];\n }\n\n const getProgramOptions = () => {\n const options = [];\n programNames.forEach((programName) => {\n options.push({\n primaryText: programName,\n });\n });\n\n return options;\n };\n\n const updateProgramId = (index) => {\n handleSelect(index);\n const selectedProgram = index === -1 ? '' : programNames[index];\n AppActions.updateSelectedProgram(selectedProgram);\n trackLinkClick(LINK_NAME.PROGRAM_SELECTED, {\n additionalData: {\n [FPTI_TAGS.CAMPAIGN]: selectedProgram,\n },\n });\n };\n\n useEffect(() => {\n let programOption = getProgramOptions().findIndex(\n (program) => program.primaryText === appStore.getSelectedProgram()\n );\n programOption = programOption === -1 ? 0 : programOption;\n handleSelect(programOption);\n AppActions.updateSelectedProgram(programNames[programOption]);\n }, []);\n\n return (\n \n );\n};\n\nPrograms.propTypes = {\n programNames: PropTypes.array,\n isDisabled: PropTypes.bool,\n};\n\nexport default Programs;\n","import React, { Component } from 'react';\nimport { Button, Sheet, HeadingText, BodyText } from '@paypalcorp/pp-react';\nimport TemplateData, { localsMessages } from '../../utility/getTemplateData';\nimport PropTypes from 'prop-types';\nimport { appendCdnHostName } from '../../utility/geoUtils';\nimport { sanitizeOrgName } from '../../utility/domUtils';\nimport BackButton from '../../components/BackButton';\nimport { isInContext } from '../../utility/inContextDonation';\n\nlet texts = localsMessages('common/recurring-checkbox');\n\nconst orgname = TemplateData.donationName ? TemplateData.donationName : '';\n\nexport class RecurringOverlay extends Component {\n handleClose = () => {\n this.props.closeRecurringOverlay();\n };\n\n noThanks_closeModal = (event) => {\n this.props.onMakeOneTimeDonation();\n };\n\n onContinue = (event) => {\n this.props.onContinue();\n };\n\n render() {\n let {\n rp: {\n signupHeader,\n dialogp1,\n dialogp2,\n dialogp3,\n continueBtn,\n noThanksBtn,\n } = {},\n } = texts || {};\n\n dialogp1 =\n dialogp1 && dialogp1.replace('{orgName}', sanitizeOrgName(orgname));\n\n return (\n : null\n }\n noCloseButton={isInContext()}\n isOpen={this.props.isOpen}\n onClose={this.handleClose}\n closeOnBackgroundClick={false}\n className=\"recurring-signup-overpanel\"\n containerClassName={`${\n isInContext() ? 'incontext-guest-recurring' : ''\n }`}\n >\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n {signupHeader}\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n {dialogp1}\n
\n
\n
\n {dialogp2}\n
\n
\n
\n {dialogp3}\n
\n
\n
\n
\n\n
\n
\n
\n \n
\n
\n\n
\n
\n \n {noThanksBtn}\n \n
\n
\n
\n
\n
\n \n );\n }\n}\n\nRecurringOverlay.propTypes = {\n closeRecurringOverlay: PropTypes.func,\n onMakeOneTimeDonation: PropTypes.func,\n onContinue: PropTypes.func,\n isOpen: PropTypes.bool,\n};\n\nexport default RecurringOverlay;\n","import React from 'react';\nimport { CaptionText } from '@paypalcorp/pp-react';\nimport { StyleSheet, css } from 'aphrodite';\nimport { localsMessages } from '../utility/getTemplateData';\n\nconst messages = localsMessages('buttons/partner') || {};\n\nconst styles = StyleSheet.create({\n disclaimerWrapper: {\n maxWidth: 350,\n margin: 'auto',\n '.ppvx_accordion__row': { border: 'none' },\n },\n disclaimer: {\n margin: 'auto',\n },\n disclaimerCaptionText: {\n marginTop: 12,\n color: '#687173',\n textAlign: 'center',\n },\n});\n\nexport default function NotTaxDeductibleLegalText() {\n return (\n
\n \n {messages.landing.mayNotBeTaxDeductible}\n \n
\n );\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as AppActions from '../../actions/AppActions';\nimport getContent from 'pp-react-l10n';\nimport { DonateCheckbox } from '@paypalcorp/donate-react';\n\nconst CoverFeeCheckbox = ({\n handleCoverFeeChange,\n optInStatus,\n formatedFeeAmount,\n isDisabled,\n}) => {\n const handleChange = (event) => {\n const isChecked = event.target.checked,\n checkboxStatus = isChecked ? 'checked' : 'unchecked';\n\n AppActions.changeCoverFee({\n coverFee: checkboxStatus,\n });\n\n handleCoverFeeChange(isChecked);\n };\n\n return (\n \n );\n};\n\nCoverFeeCheckbox.propTypes = {\n handleCoverFeeChange: PropTypes.func,\n optInStatus: PropTypes.bool,\n formatedFeeAmount: PropTypes.string,\n isDisabled: PropTypes.bool,\n};\n\nexport default CoverFeeCheckbox;\n","import React from 'react';\nimport '../../utility/csrf';\nimport AmountWrapper from '../../components/amountWrapper';\nimport NextButton from '../../components/nextButton';\nimport OneTouchNextButton from '../../components/landing/OneTouchNextButton';\nimport CancelAndReturn from '../../components/cancelAndReturn';\nimport GuestButton from '../../components/guestButton';\nimport RecurringCheckBox from '../../components/recurring-checkbox/recurring-checkbox';\nimport UserDetailsBanner from '../../components/onetouch/UserDetailsBanner';\nimport OfferDetail from '../../components/offerDetail';\nimport Disclaimer from '../../components/Disclaimer';\nimport VoucherFlowDisclaimer from '../../components/voucherFlowDisclaimer';\nimport CloseButton from '../../components/CloseButton';\nimport ReceiverEligibilityErrorTile from '../error/receiverEligibilityError';\nimport {\n isInContext,\n isMobileOrInContext,\n} from '../../utility/inContextDonation';\nimport DonateHeader from '../../components/common/DonateHeader';\n\nimport templateData from '../../utility/getTemplateData';\nimport {\n hasPersonalizedMessages,\n getPersonalizedMessages,\n} from '../../utility/personalizedMessages';\n\nimport AppStore from '../../stores/AppStore';\nimport * as AppActions from '../../actions/AppActions';\nimport AppDispatcher from '../../dispatcher/AppDispatcher';\nimport * as cpl from '../../utility/cpl';\nimport { GN_CONTENT_TOUCHPOINT } from '../../utility/constants';\n\nimport {\n handleLogIn,\n addShake,\n handleTokenReuse,\n hideSpinnerOverlay,\n getPPCCStatus,\n showSpinnerOverlay,\n} from '../../utility/helper';\nimport {\n isAuthenticatedUser,\n shouldShowUserBanner,\n isLoggedInUser,\n} from '../../utility/authUtils';\nimport * as amountUtils from '../../components/amount/amountUtils';\n\nimport { withRouter } from 'react-router-dom';\nimport {\n localsMessages,\n isOldButtonFactory,\n hasPartnerSource,\n} from '../../utility/getTemplateData';\nimport { isCampaigns } from '../../utility/productIntegrationUtils';\nimport { loadBodyMovin } from '../../utility/lazyLoader';\nimport _isEmpty from 'lodash/isEmpty';\nimport Programs from '../../components/programs/Programs';\nimport RecurringOverlay from '../../components/recurring-checkbox/RecurringOverlay';\nimport _get from 'lodash/get';\nimport NotTaxDeductibleLegalText from '../../components/NotTaxDeductibleLegalText';\nimport { getParameterByName } from '../../utility/queryStringHelper';\nimport CoverFeeCheckbox from '../../components/coverFee/coverFeeCheckbox';\nimport {\n computeAmountAfterFee,\n isOptInCoverFee,\n restoreDonationAmount,\n updateDonationAmount,\n setFeeAmountInStore,\n} from '../../components/coverFee/feeUtils';\nimport withDonate from '../../components/guest/WithDonate';\nimport withTheme from '../../components/withTheme';\nimport AnonymousCheckbox from '../../components/anonymousDonation/anonymousCheckbox';\nimport {\n getPersonalizedAnonymousContent,\n getPersonalizedNoteToPayeeLabel,\n isCheckoutRail,\n isExternalFlow,\n prepareOrderParams,\n} from '../../utility/productIntegrationUtils';\nimport NoteComponent from '../../components/note';\nimport isEmpty from 'lodash/isEmpty';\nimport {\n trackAnonymousCheckboxClick,\n trackCoverFeeCheckboxClick,\n trackDonateWithCardClick,\n trackDonateWithPayPalClick,\n trackLandingPageIM,\n trackNextClickForCheckout,\n} from '../../fpti/fpti';\nimport { CPL_PAGE_SPEC } from '../../fpti/fptiConstants';\nimport classNames from 'classnames';\nimport { BodyText, HeadingText } from '@paypalcorp/pp-react';\nimport getContent from 'pp-react-l10n';\n\nconst messages = localsMessages('common/amount');\nconst errorMessages = localsMessages('errors/landingerror');\nconst MERCHANT_PPCC_CONFIRMED_STATUS = 'CONFIRMED';\nconst getCampaignContent = getContent('locals')('landing')('campaigns');\n\nclass LandingPageComponent extends React.Component {\n constructor(props) {\n super(props);\n const optInStatus = AppStore.getCoverFeeOptInStatus();\n const anonymousStatusInStore = AppStore.getAnonymousStatus();\n const anonymousOptInStatus = !isEmpty(anonymousStatusInStore)\n ? anonymousStatusInStore === 'checked'\n : templateData.anonymousStatus || false;\n\n this.state = {\n hasLogo: templateData.hasLogo,\n subHeaderLabel: templateData.donationName,\n orgName: templateData.charityName,\n donationId: templateData.donationId,\n guestRedirectUrl: templateData.guestRedirectUrl,\n donateDisabled: false,\n recurringEnabled: templateData.recurringEnabled,\n recurringStatus: templateData.recurringStatus === 'checked',\n recurringHelpText: '',\n recurringLabel: 'Make this a monthly donation',\n rpContinue: false,\n isAuthenticated: isAuthenticatedUser(),\n memberMandatory: templateData.memberMandatory,\n programNames:\n templateData.donateContext?.program_names || templateData.programNames,\n isRecurringOverlayOpen: false,\n isVoucherFlow: templateData.isVoucherFlow,\n offerProgram: templateData.offerProgram,\n coverFeeEnabled: templateData.coverFeeEnabled,\n coverFeeOptInStatus:\n optInStatus !== undefined\n ? optInStatus === 'checked'\n : templateData.feePayer === 'consumer',\n feeAmount: '',\n formatedFeeAmount: '',\n anonymousEnabled: templateData.anonymousEnabled,\n anonymousOptInStatus,\n hasDisclaimer: hasPersonalizedMessages(GN_CONTENT_TOUCHPOINT),\n };\n }\n\n getPPCCConfirmation() {\n return getPPCCStatus() === MERCHANT_PPCC_CONFIRMED_STATUS;\n }\n\n componentDidMount = () => {\n window.onload = function () {\n setTimeout(function () {\n cpl.logPerformance(CPL_PAGE_SPEC.LANDING_PAGE);\n }, 0);\n };\n\n AppActions.updateCurrentPage({ currentPage: 'landing' });\n\n // Do not hide spinner if coming to page with already completed payment token\n if (templateData.paymentStatus !== 'complete') {\n hideSpinnerOverlay();\n }\n\n // Checking for recurring status if coming from guest page\n if (AppStore.getDonationRecurring() === 'checked') {\n this.setState({ recurringStatus: true });\n }\n\n // Checking for cover fee preference if coming from guest page\n if (isOptInCoverFee()) {\n this.setState({ coverFeeOptInStatus: true });\n restoreDonationAmount();\n }\n\n setFeeAmountInStore();\n this.updateFeeAmount();\n\n trackLandingPageIM({ noteFieldDisplayed: this.shouldShowNote() });\n\n // Pre-load bodyMovin\n if (templateData.recurringEnabled) {\n loadBodyMovin();\n }\n\n if (!isLoggedInUser()) {\n AppActions.showLanguageSelector(true);\n }\n\n // Register for App Dispatcher Messages\n this.registerAppDispatcherMessages();\n };\n\n componentWillUnmount() {\n AppDispatcher.unregister(this.dispatcherMessages);\n }\n\n registerAppDispatcherMessages = () => {\n this.dispatcherMessages = AppDispatcher.register((payload) => {\n if (payload.action && payload.action.actionType === 'CHANGE_RECURRING') {\n const checked = _get(payload.action, 'item', 'unchecked');\n this.setState({\n recurringStatus: checked === 'checked',\n });\n }\n });\n };\n\n getFPTDATA = () => {\n return {\n amount: AppStore.getDonationAmount(),\n code: AppStore.getDonationCode(),\n symbol: AppStore.getDonationSymbol(),\n };\n };\n\n validateAmountAndNavigateToGuestPage = () => {\n let donationAmount = AppStore.getDonationAmount();\n\n if (amountUtils.isAmountGreaterThanZero(donationAmount)) {\n trackDonateWithCardClick({\n noteFieldDisplayed: this.shouldShowNote(),\n fptiData: {\n is_recurring: this.state.recurringStatus ? 'on' : 'off',\n fee_type: this.state.coverFeeEnabled ? 'offset' : 'none',\n },\n });\n this.props.history.push(`/donate/guest?token=${templateData.token}`);\n } else {\n addShake();\n }\n };\n\n handleGuest = (event) => {\n event.preventDefault();\n AppActions.changeRecurringModalStatus({\n recurringModalStatus: 'notclosed',\n });\n let donationAmount = this.getDonationAmount();\n if (!this.validateDonationAmount()) {\n return;\n }\n\n if (amountUtils.isAmountGreaterThanZero(donationAmount)) {\n const isRecurringChecked = this.state.recurringStatus;\n\n if (isRecurringChecked && !this.state.memberMandatory) {\n this.openRecurringOverlay();\n } else {\n this.validateAmountAndNavigateToGuestPage();\n }\n\n // Start CPL tracking to get measurements to load guest form\n window.PAYPAL.analytics.startCPLTracking({\n page: 'main:donate:wps:guest:guestform:guestFormComponent:web::',\n action: 'guest_form_loaded',\n uicomp: 'guestForm',\n uitype: 'component',\n });\n }\n };\n\n handleNext = (event) => {\n event.preventDefault();\n if (!this.validateDonationAmount()) {\n return;\n }\n\n let donationAmount = this.getDonationAmount();\n if (amountUtils.isAmountGreaterThanZero(donationAmount)) {\n trackDonateWithPayPalClick({\n noteFieldDisplayed: this.shouldShowNote(),\n fptiData: {\n is_recurring: this.state.recurringStatus ? 'on' : 'off',\n fee_type: this.state.coverFeeEnabled ? 'offset' : 'none',\n },\n });\n handleLogIn();\n }\n };\n\n handleNextForCheckout = (event) => {\n event.preventDefault();\n if (!this.validateDonationAmount()) {\n return;\n }\n\n trackNextClickForCheckout({ noteFieldDisplayed: this.shouldShowNote() });\n showSpinnerOverlay();\n const orderParams = prepareOrderParams();\n this.props.createOrder(orderParams);\n };\n\n getDonationAmount = () => {\n let donationAmount = AppStore.getDonationAmount();\n\n if (isOptInCoverFee()) {\n const feeAmount = AppStore.getFeeAmount();\n // backup user's original entered amount in store\n AppActions.changeAmountBeforeFee({ amountBeforeFee: donationAmount });\n\n if (feeAmount) {\n donationAmount = computeAmountAfterFee(donationAmount, feeAmount);\n updateDonationAmount(donationAmount);\n }\n }\n\n return donationAmount;\n };\n\n hideValidationError = () => {\n this.setState({\n showValidationError: false,\n });\n };\n\n validateDonationAmount = () => {\n let validationResult = amountUtils.validateMinimumDonationAmount(messages);\n if (validationResult?.showValidationError) {\n this.setState(validationResult);\n addShake();\n return false;\n }\n\n validationResult = amountUtils.validateMaximumDonationAmount();\n if (validationResult?.showValidationError) {\n this.setState(validationResult);\n addShake();\n return false;\n }\n\n this.setState(validationResult);\n return true;\n };\n\n handleAmountFocus = () => {\n if (this.state.showValidationError) {\n this.hideValidationError();\n }\n };\n\n updateConversionSataus = (status = false) => {\n this.setState({ donateDisabled: status });\n };\n\n handleRecurringChange = (status = false) => {\n this.setState({ recurringStatus: status });\n console.log('status ', status);\n };\n\n handleRecurringOverlayContinue = () => {\n this.setState({ rpContinue: true });\n this.validateAmountAndNavigateToGuestPage();\n };\n\n handleRecurringOverlayMakeOneTimeDonation = () => {\n AppActions.changeRecurring({\n recurring: 'unchecked',\n });\n this.validateAmountAndNavigateToGuestPage();\n };\n\n handleAnonymousDonationChange = (status = false) => {\n this.setState({ anonymousOptInStatus: status });\n trackAnonymousCheckboxClick(status);\n };\n\n handleCoverFeeChange = (status = false) => {\n this.setState({ coverFeeOptInStatus: status });\n trackCoverFeeCheckboxClick(status);\n };\n\n updateFeeAmount = () => {\n this.setState({\n feeAmount: AppStore.getFeeAmount(),\n formatedFeeAmount: AppStore.getFormatedFeeAmount(),\n });\n };\n\n openRecurringOverlay = () => {\n this.setState({\n isRecurringOverlayOpen: true,\n });\n };\n\n closeRecurringOverlay = () => {\n this.setState({\n isRecurringOverlayOpen: false,\n });\n };\n\n renderProgramsDropdown = () => {\n if (isOldButtonFactory() || _isEmpty(this.state.programNames)) {\n return null;\n }\n\n return ;\n };\n\n renderDonateButtons = () => {\n if (isCheckoutRail()) {\n return (\n \n );\n }\n\n if (this.state.isAuthenticated) {\n return (\n \n );\n }\n\n return (\n
\n
\n \n
\n \n
\n );\n };\n\n /**\n * Should show note on landing page when charityNote is enabled\n * and recurring is disabled for client flows\n * @return {Boolean} true to show note field\n */\n shouldShowNote = () => {\n return (\n templateData.charityNoteEnabled &&\n !this.state.recurringStatus &&\n isExternalFlow()\n );\n };\n\n getPersonalizedContent = () => {\n if (isExternalFlow()) {\n const personalizedMessages = getPersonalizedMessages(\n GN_CONTENT_TOUCHPOINT\n );\n return personalizedMessages?.disclaimer;\n }\n };\n\n landingClass() {\n return classNames({\n gn_donate_wrapper: templateData.bannerUrl,\n donate_wrapper: !templateData.bannerUrl,\n context_gn_wrapper: isInContext(),\n 'user-banner': shouldShowUserBanner(),\n mobile_view: isMobileOrInContext(),\n });\n }\n\n shouldShowSupportText = () => {\n const amountRaised = templateData.campaignTotalAmountRaised || '0';\n const campaignStatus = templateData.campaignStatus;\n return (\n campaignStatus === 'INACTIVE' &&\n +amountRaised >= +templateData.campaignTargetAmount\n );\n };\n\n shouldShowNoDonationText = () => {\n const amountRaised = templateData.campaignTotalAmountRaised || '0';\n const campaignStatus = templateData.campaignStatus;\n return (\n campaignStatus === 'INACTIVE' &&\n ((!templateData.campaignEndTime && amountRaised === '0') ||\n templateData.campaignEndTime !== '')\n );\n };\n\n render() {\n const showUserBanner = shouldShowUserBanner();\n const showSupportText = this.shouldShowSupportText();\n const showNoDonationText = this.shouldShowNoDonationText();\n\n if (!templateData.receiverCountryEligible) {\n return (\n \n \n \n );\n }\n\n return (\n
\n
\n {showUserBanner && !showNoDonationText && !showSupportText ? (\n \n ) : null}\n {isExternalFlow() && }\n \n {(() => {\n switch (true) {\n case showSupportText:\n return (\n \n {getCampaignContent('supportText')}\n \n );\n case showNoDonationText:\n return (\n \n {getCampaignContent('noDonationText')}\n \n );\n default:\n return (\n \n \n {this.renderProgramsDropdown()}\n {!isCampaigns() && this.state.anonymousEnabled && (\n \n )}\n {this.shouldShowNote() && (\n \n )}\n {this.state.coverFeeEnabled && (\n \n )}\n {this.state.recurringEnabled && (\n \n )}\n {this.state.isVoucherFlow && (\n \n )}\n {this.renderDonateButtons()}\n {this.state.isVoucherFlow && }\n {hasPartnerSource() &&\n !this.getPPCCConfirmation() &&\n !this.state.isVoucherFlow && (\n \n )}\n \n {this.state.hasDisclaimer && (\n \n )}\n
\n );\n }\n })()}\n
\n \n \n );\n }\n}\n\nconst LandingPage = withRouter(withDonate(withTheme(LandingPageComponent)));\n\nclass Landing extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n displayLanding: !templateData.currentState,\n };\n }\n\n /**\n * For DIRECT(nonWebscr) and POST integrations, there will not be a token in the URL\n * This will break page refresh.\n * Hence adding token here\n */\n addTokenToUrlIfMissing() {\n const token = getParameterByName('token');\n const business = getParameterByName('business');\n const hostedButtonId = getParameterByName('hosted_button_id');\n const campaignId = getParameterByName('campaign_id');\n\n if (!token && !business && !hostedButtonId && !campaignId) {\n this.props.history.replace({\n pathname: '/donate',\n search: `?token=${templateData.token}`,\n });\n }\n }\n\n componentDidMount() {\n if (!this.state.displayLanding) {\n this.props.history.push(templateData.currentState);\n } else {\n handleTokenReuse();\n }\n this.addTokenToUrlIfMissing();\n }\n\n render() {\n return
{this.state.displayLanding ? : null}
;\n }\n}\n\nexport default withRouter(Landing);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { AvatarStack } from '@paypalcorp/pp-react';\nimport { DonorAvatar } from '@paypalcorp/donate-react';\nimport getContent from 'pp-react-l10n';\nimport _isEmpty from 'lodash/isEmpty';\n\nconst WhosDonatedBanner = ({\n numberOfContributors,\n contributionsList,\n isLoading,\n}) => {\n const getCampaignContent = getContent('locals')('landing')('campaigns');\n let label;\n\n if (numberOfContributors === 1) {\n const donorName = contributionsList?.[0]?.donor_name;\n const donatedAmount = contributionsList?.[0]?.amount;\n // checking for anonymous contributor\n label = _isEmpty(donorName)\n ? getCampaignContent('oneAnonymousDonorMessage')\n : getCampaignContent('oneDonorMessage', {\n donor: donorName,\n amount: donatedAmount,\n });\n } else if (numberOfContributors === 2) {\n const donorOneName = contributionsList?.[0]?.donor_name;\n const donorTwoName = contributionsList?.[1]?.donor_name;\n // checking if any one of contributors is an anonymous contributor\n label =\n _isEmpty(donorOneName) || _isEmpty(donorTwoName)\n ? getCampaignContent('donorMessage', {\n numberOfContributors: numberOfContributors,\n })\n : getCampaignContent('twoDonorsMessage', {\n donorOneName: donorOneName,\n donorTwoName: donorTwoName,\n });\n } else {\n label = getCampaignContent('donorMessage', {\n numberOfContributors: numberOfContributors,\n });\n contributionsList = contributionsList.slice(0, 3);\n }\n return (\n <>\n {!isLoading && contributionsList?.length > 0 && (\n \n {contributionsList.map((data, index) => {\n const showAnonymousAvatar = !data.shareDonorInfo;\n return (\n \n );\n })}\n \n )}\n \n );\n};\n\nWhosDonatedBanner.propTypes = {\n numberOfContributors: PropTypes.number,\n contributionsList: PropTypes.array,\n isLoading: PropTypes.bool,\n};\n\nexport default WhosDonatedBanner;\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport isEmpty from 'lodash/isEmpty';\nimport useInterval from './hooks/useInterval';\nimport { formatAmount, formatNumber } from '../utility/formator';\nimport { BodyText } from '@paypalcorp/pp-react';\nimport { DonorAvatar } from '@paypalcorp/donate-react';\nimport getContent from 'pp-react-l10n';\n\nconst getFlyoutContent = getContent('locals')('landing')('campaigns')('flyout');\n\nfunction getRandomInt(max) {\n return Math.floor(Math.random() * max);\n}\n\nfunction Flyout({ contributionsList }) {\n const [startShowing, setStartShowing] = useState(false);\n const [showFlyouts, setShowFlyouts] = useState(false);\n const [randomContribution, setRandomContribution] = useState({});\n\n function getRandomContribution() {\n return contributionsList[getRandomInt(contributionsList.length)];\n }\n\n // Start showing flyouts after 10s\n useEffect(() => {\n const flyoutTimer = setTimeout(() => {\n setStartShowing(true);\n setShowFlyouts(true);\n setRandomContribution(getRandomContribution());\n }, 10000);\n return () => clearTimeout(flyoutTimer);\n }, []);\n\n // Get a new contribution and show flyout every 90s\n // Needs useInterval so that the contributionsList gets updated when more are loaded\n useInterval(\n () => {\n setShowFlyouts(true);\n setRandomContribution(getRandomContribution());\n },\n startShowing ? 90000 : null\n );\n\n // Hide flyout every 10s after setting showFlyouts to true\n useEffect(() => {\n if (showFlyouts) {\n const hideInterval = setTimeout(() => {\n setShowFlyouts(false);\n }, 10000);\n return () => clearTimeout(hideInterval);\n }\n }, [showFlyouts]);\n\n function getFlyoutText() {\n if (randomContribution.donor_name) {\n return getFlyoutContent(\n 'contribution',\n {\n donorName: randomContribution.donor_name,\n amount: formatAmount({\n value: formatNumber(randomContribution.amount),\n currency: randomContribution.currency_code,\n }),\n },\n { useHTML: true }\n );\n } else if (randomContribution.shareDonorInfo === false) {\n return getFlyoutContent(\n 'anonymous',\n {\n amount: formatAmount({\n value: formatNumber(randomContribution.amount),\n currency: randomContribution.currency_code,\n }),\n },\n { useHTML: true }\n );\n }\n }\n\n if (!startShowing || isEmpty(randomContribution)) {\n return null;\n }\n\n return (\n
\n
\n \n
\n {getFlyoutText()}\n
\n );\n}\n\nFlyout.propTypes = {\n contributionsList: PropTypes.array,\n};\n\nexport default Flyout;\n","import React, { useRef, useEffect } from 'react';\n\nexport default function useInterval(callback, delay) {\n const intervalRef = useRef(null);\n const savedCallback = useRef(callback);\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n const tick = () => savedCallback.current();\n if (typeof delay === 'number') {\n intervalRef.current = window.setInterval(tick, delay);\n return () => window.clearInterval(intervalRef.current);\n }\n }, [delay]);\n return intervalRef;\n}\n","/*\n Regular order is: SELF > TOP > FIRST.\n For donations > 10, if TOP is by the same person as SELF or FIRST then order is: TOP > SELF > FIRST\n For donations <= 10, if SELF is by the same person as FIRST then order is: FIRST > SELF\n*/\nexport function formatFeatured(contributions, totalContributions) {\n let formattedList = [];\n\n if (contributions.length === 0) {\n return formattedList;\n }\n\n const first = contributions.find((c) => c.badge.toUpperCase() === 'FIRST');\n const top = contributions.find((c) => c.badge.toUpperCase() === 'TOP');\n const selfItem = contributions.find((c) => c.badge.toUpperCase() === 'SELF');\n\n if (\n totalContributions > 10 &&\n (top?.contributor_id === first?.contributor_id ||\n top?.contributor_id === selfItem?.contributor_id)\n ) {\n if (top) {\n formattedList.push(top);\n }\n if (selfItem) {\n formattedList.push(selfItem);\n }\n if (first) {\n formattedList.push(first);\n }\n } else if (first?.contributor_id === selfItem?.contributor_id) {\n if (first) {\n formattedList.push(first);\n }\n if (selfItem) {\n formattedList.push(selfItem);\n }\n } else {\n if (selfItem) {\n formattedList.push(selfItem);\n }\n if (top) {\n formattedList.push(top);\n }\n if (first) {\n formattedList.push(first);\n }\n }\n\n return formattedList;\n}\n","import React, { Suspense, useEffect, useState, useRef } from 'react';\nimport templateData from '../../utility/getTemplateData';\nimport { getPPCCStatus } from '../../utility/helper';\nimport PPCC from '../../components/ppcc';\nimport {\n Tile,\n Col,\n Button,\n Sheet,\n LoadingSpinner,\n BodyText,\n HeadingText,\n} from '@paypalcorp/pp-react';\nimport classNames from 'classnames';\n\nimport {\n GoalProgressMeter,\n useHasScrolledToPosition,\n CampaignImage,\n Title,\n AdvancedEndDateBadge,\n} from '@paypalcorp/donate-react';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport Landing from './landing';\nimport withTheme from '../../components/withTheme';\nimport {\n roundUpAndFormatCurrency,\n parseDateOnly,\n} from '../../utility/formator';\nimport { lazy as reactLazy } from 'react';\nimport { addClass } from '../../utility/domUtils';\nimport getContent from 'pp-react-l10n';\nimport WhosDonatedBanner from '../../components/WhosDonatedBanner';\nimport Flyout from '../../components/Flyout';\nimport { fetcher } from '../../utility/domUtils';\nimport { formatFeatured } from '../../utility/donorWall';\nimport ConfirmationSocialShare from '../../confirmation/ConfirmationSocialShare';\nimport { localsMessages } from '../../utility/getTemplateData';\nimport { MAX_MOBILE_WIDTH } from '../../setup/clientConstants';\nimport throttle from 'lodash/throttle';\nimport { trackDonateLandingButtonClick } from '../../fpti/fpti';\n\nconst LandingDonorWall = reactLazy(() =>\n import(\n /* webpackChunkName: \"LandingDonorWall\" */ '../../components/LandingDonorWall'\n )\n);\n\nconst LandingRichTextDisplay = reactLazy(() =>\n import(\n /* webpackChunkName: \"LandingRichTextDisplay\" */ '../../components/LandingRichTextDisplay'\n )\n);\n\nconst getCampaignContent = getContent('locals')('landing')('campaigns');\nconst getSocialContent = getContent('locals')('landing')('social');\nlet campaignsText = getContent('locals')('common/campaigns');\n\nconst messages = localsMessages('landing') || {};\n\nconst MAX_HEIGHT_BANNER = 380;\nconst MAX_HEIGHT_DESCRIPTION = 800;\n\nconst MERCHANT_PPCC_CONFIRMED_STATUS = 'CONFIRMED';\n\nfunction isCampaignEnded(endDate) {\n return (\n endDate && new Date().setHours(0, 0, 0, 0) > endDate?.setHours(0, 0, 0, 0)\n );\n}\n\nconst CampaignLanding = () => {\n const [isPaymentCardOpen, setIsPaymentCardOpen] = useState(false);\n const amountRaised = templateData.campaignTotalAmountRaised || '0';\n const campaignStatus = templateData.campaignStatus;\n const targetAmount = templateData.campaignTargetAmount;\n const campaignEndTime = templateData.campaignEndTime;\n const campaignTotalNumberOfTxn = templateData.campaignTotalNumberOfTxn;\n const amountRaisedWithCurrencySymbol = roundUpAndFormatCurrency(\n amountRaised,\n templateData.donationCode\n );\n const donationName = templateData.donationName ?? '';\n const [contributionsList, setContributionsList] = useState({\n featured: [],\n list: [],\n });\n const [contributionsError, setContributionsError] = useState(false);\n const [currentPage, setCurrentPage] = useState(1);\n const [isLoading, setIsLoading] = useState(true);\n const [retry, setRetry] = useState(0);\n const [enableReadMore, setEnableReadMore] = useState(true);\n const [descriptionHeight, setDescriptionHeight] = useState(\n MAX_HEIGHT_DESCRIPTION\n );\n const [originalDescriptionHeight, setOriginalDescriptionHeight] = useState(0);\n\n const stickToTop = useHasScrolledToPosition(650);\n\n const [isMobile, setIsMobile] = useState(false);\n\n const checkDeviceType = () => {\n setIsMobile(window.innerWidth < MAX_MOBILE_WIDTH, 200);\n };\n\n useEffect(() => {\n checkDeviceType();\n window.addEventListener('resize', throttle(checkDeviceType, 200));\n return () => {\n window.removeEventListener('resize', throttle(checkDeviceType, 200));\n };\n }, []);\n\n useEffect(() => {\n const fetchData = async () => {\n const result = await fetcher(\n `/donate/api/donorwall/${templateData.productId}/${currentPage}/10`\n ).then((response) => response.json());\n if (result.contributions) {\n setContributionsList({\n featured:\n contributionsList.featured.length !== 0\n ? contributionsList.featured\n : formatFeatured(\n result?.contributions?.contributions?.featured,\n campaignTotalNumberOfTxn\n ),\n list: [\n ...contributionsList.list,\n ...(result?.contributions?.contributions?.list ?? []),\n ],\n });\n } else {\n setContributionsError(true);\n }\n setIsLoading(false);\n };\n\n setIsLoading(true);\n setContributionsError(false);\n fetchData();\n }, [currentPage, retry]);\n\n const handleShowMore = () => {\n setCurrentPage(currentPage + 1);\n };\n\n useEffect(() => {\n addClass('#mainWrapper header.donate_global_nav', ['hide-header']);\n addClass('#donateWrapper', ['is-landing']);\n hideSpinnerOverlay();\n }, []);\n\n const goalAmtWithCurrencySymbol = roundUpAndFormatCurrency(\n targetAmount,\n templateData.donationCode\n );\n\n let campaignGoalTitle = campaignsText('campaignGoal.title', {\n goalAmount: goalAmtWithCurrencySymbol,\n });\n\n const renderEndDateBadge = () => (\n
\n \n
\n );\n\n const renderTitle = (size) => (\n
\n \n </div>\n );\n\n const renderGoalProgressMeter = () => (\n <div className=\"wrapper-progress-meter\">\n <GoalProgressMeter\n max={targetAmount}\n value={Math.round(amountRaised)}\n steps={amountRaisedWithCurrencySymbol}\n title={campaignGoalTitle}\n className=\"goal-progress-meter\"\n />\n </div>\n );\n\n const renderAvatarStack = () => (\n <div className=\"wrapper-avatar-stack\">\n <WhosDonatedBanner\n numberOfContributors={campaignTotalNumberOfTxn}\n contributionsList={contributionsList.list}\n isLoading={isLoading}\n />\n </div>\n );\n\n const renderDonationName = () => (\n <div className=\"wrapper-donation-name\">\n <BodyText>\n {donationName}\n {getPPCCStatus() === MERCHANT_PPCC_CONFIRMED_STATUS && <PPCC />}\n </BodyText>\n </div>\n );\n\n const headerClasses = classNames({\n 'preview-header': true,\n sticky: stickToTop,\n });\n\n const renderHeader = () => (\n <div className=\"wrapper-header\">\n {renderEndDateBadge()}\n {renderTitle('lg')}\n {renderAvatarStack()}\n {renderDonationName()}\n {renderGoalProgressMeter()}\n </div>\n );\n\n const renderDonorWall = () => {\n return (\n <>\n <LandingDonorWall\n contributionsList={contributionsList}\n isLoading={isLoading}\n currentPage={currentPage}\n handleShowMore={handleShowMore}\n totalNumberOfTransactions={campaignTotalNumberOfTxn}\n />\n {campaignStatus === 'ACTIVE' &&\n !isCampaignEnded(new Date(campaignEndTime)) &&\n contributionsList?.list?.length >= 10 ? (\n <Flyout contributionsList={contributionsList.list} />\n ) : null}\n </>\n );\n };\n\n const renderContributionsError = () => {\n return (\n <div style={{ textAlign: 'center' }}>\n <BodyText>{getCampaignContent('contributions.error.title')}</BodyText>\n <BodyText style={{ color: '#515354' }}>\n {getCampaignContent('contributions.error.body')}\n </BodyText>\n <Button\n tertiary\n onClick={() => {\n setRetry(retry + 1);\n }}\n >\n {getCampaignContent('contributions.error.cta')}\n </Button>\n </div>\n );\n };\n\n const renderContributions = () => {\n if (!contributionsError) {\n return renderDonorWall();\n } else if (currentPage === 1) {\n return renderContributionsError();\n } else {\n return (\n <>\n {renderDonorWall()}\n {renderContributionsError()}\n </>\n );\n }\n };\n\n const stickyHeader = stickToTop && (\n <div className={headerClasses}>\n <div className=\"wrapper-header\">\n {renderEndDateBadge()}\n {renderTitle('sm')}\n {renderGoalProgressMeter()}\n </div>\n </div>\n );\n\n const personalizedMessages = {\n social_title: getSocialContent('subheader'),\n };\n\n const socialContent = () => {\n return (\n <div className=\"social-share-wrapper\">\n <HeadingText\n size=\"sm\"\n style={{ textAlign: `${!isMobile ? 'left' : 'center'}` }}\n >\n {messages.social.shareGeneric}\n </HeadingText>\n <ConfirmationSocialShare\n campaignId={templateData.productId}\n messages={messages}\n personalizedMessages={personalizedMessages}\n email={templateData.donationEmail}\n orgName={templateData.charityName}\n isLanding={true}\n />\n </div>\n );\n };\n\n const incrementDescription = (event) => {\n event.preventDefault();\n setDescriptionHeight((height) => {\n const incrementedHeight = height + MAX_HEIGHT_DESCRIPTION;\n if (incrementedHeight >= originalDescriptionHeight)\n setEnableReadMore(false);\n return incrementedHeight;\n });\n };\n\n const renderReadMore = () =>\n originalDescriptionHeight >= MAX_HEIGHT_DESCRIPTION &&\n enableReadMore && (\n <div className=\"campaign-read-more\">\n <Button tertiary onClick={incrementDescription}>\n {getCampaignContent('readMore')}\n </Button>\n </div>\n );\n return (\n <div className=\"campaign-landing-container\">\n <CampaignImage\n className=\"campaign-landing-banner\"\n src={templateData.bannerUrl}\n />\n {!isMobile && stickyHeader}\n <div className=\"content-container\">\n <Tile.Header />\n <div className=\"campaignDetails\" data-testid=\"campaignDetails\">\n <Tile.Content>\n <div className=\"campaign-title\">{renderHeader()}</div>\n <div\n className=\"campaign-description\"\n style={{\n maxHeight:\n originalDescriptionHeight >= MAX_HEIGHT_DESCRIPTION\n ? descriptionHeight + 'px'\n : 'unset',\n }}\n >\n <div\n ref={(descriptionContainer) =>\n descriptionContainer &&\n setOriginalDescriptionHeight(\n descriptionContainer.clientHeight\n )\n }\n >\n <Suspense\n fallback={\n <LoadingSpinner size=\"md\" style={{ margin: '0 auto' }} />\n }\n >\n <LandingRichTextDisplay\n campaignDescription={templateData.campaignDescription}\n />\n </Suspense>\n </div>\n {renderReadMore()}\n </div>\n <Suspense\n fallback={\n <LoadingSpinner size=\"md\" style={{ margin: '0 auto' }} />\n }\n >\n {renderContributions()}\n </Suspense>\n {campaignTotalNumberOfTxn > 0 && socialContent()}\n </Tile.Content>\n </div>\n {!isMobile ? (\n <div className=\"paymentCard\">\n <Landing />\n </div>\n ) : (\n <>\n <Col lg=\"12\" className=\"mobileDonate\">\n <Button\n onClick={() => {\n setIsPaymentCardOpen(!isPaymentCardOpen);\n trackDonateLandingButtonClick({ noteFieldDisplayed: null });\n }}\n >\n {getCampaignContent('donateButton')}\n </Button>\n </Col>\n <Sheet\n isOpen={isPaymentCardOpen}\n onClose={() => {}}\n title={getCampaignContent('donateButton')}\n mobileFixedHeight=\"90\"\n className=\"mobilePreview darkBackground\"\n wrapperClassName=\"mobilePreview-wrapper\"\n >\n <Landing />\n </Sheet>\n </>\n )}\n </div>\n </div>\n );\n};\n\nexport default withTheme(CampaignLanding);\n","export const BTN_FACTORY_FORM = 'buttonFactory';\nexport const BTN_FACTORY_V3_FORM = 'buttonFactoryV3';\nexport const CAMPAIGNS_FORM = 'campaigns';\nexport const AUTH_STATE_ANONYMOUS = 'ANONYMOUS';\nexport const AUTH_STATE_LOGGEDIN = 'LOGGEDIN';\nexport const BTN_FACTORY_MAX_PROGRAMS = 10;\nexport const BTN_FACTORY_MAX_LENGTH_PROGRAMS = 127;\nexport const MAX_MOBILE_WIDTH = 1024;\nexport const MAX_CHARACTERS_RTE = 2500;\n\nexport const CAMPAIGN_STATUS = {\n ACTIVE: 'ACTIVE',\n INACTIVE: 'INACTIVE',\n};\n\nexport const COUNTRIES_AND_PERMIT_CURRENCY = {\n BR: 'BRL',\n};\n\nexport const ERRORS = {\n COUNTRY_NOT_SUPPORTED: 'COUNTRY_NOT_SUPPORTED',\n COMPLIANCE: 'COMPLIANCE',\n GENERIC: 'GENERIC',\n OFAC_HIT: 'OFAC_CAMPAIGN_SCAN_HIT',\n RESTRICTED_ACCOUNT: 'RESTRICTED_ACCOUNT',\n RESTRICTED_IMAGE: 'RESTRICTED_IMAGE',\n};\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { CURRENCY_CONVERSION_OPTIONS } from '../../pages/guest/crossBorder';\nimport { localsMessages } from '../../utility/getTemplateData';\nimport { Tile } from '@paypalcorp/pp-react-tile';\nimport { Sheet } from '@paypalcorp/pp-react-sheet';\nimport { BodyText, CaptionText, HeadingText } from '@paypalcorp/pp-react-text';\nimport { Spot } from '@paypalcorp/pp-react-spot';\nimport { V2CheckmarkBackgroundIcon } from '@paypalcorp/pp-react-icons';\nimport { Button } from '@paypalcorp/pp-react-buttons';\nimport { checkKeyPressed } from '../../utility/accessibilityUtils';\nconst messages = localsMessages('guest/crossBorder');\n\nconst CurrencyConversionOption = (props) => {\n return (\n <Tile\n className={`${props.className} ${\n props.isSelected ? 'show-highlight' : 'border-default'\n }`}\n role=\"checkbox\"\n aria-checked={props.isSelected}\n tabIndex=\"0\"\n onClick={props.handleOptionSelection}\n onKeyDown={(e) =>\n checkKeyPressed(e, () => {\n props.handleOptionSelection();\n })\n }\n >\n <Tile.Content>\n <div className=\"conversion-tile\">\n <Spot aria-hidden=\"true\" name={props.spotImage} size=\"lg\" />\n <div className=\"content\">\n <BodyText className=\"title\" strong>\n {props.title}\n </BodyText>\n {props.rate && <CaptionText strong>{props.rate}</CaptionText>}\n <CaptionText as=\"span\">{props.description}</CaptionText>\n </div>\n <V2CheckmarkBackgroundIcon\n className={`icon-check ${!props.isSelected && 'hide-icon'}`}\n size=\"sm\"\n />\n </div>\n </Tile.Content>\n </Tile>\n );\n};\n\nCurrencyConversionOption.propTypes = {\n isSelected: PropTypes.bool,\n title: PropTypes.string,\n rate: PropTypes.string,\n description: PropTypes.string,\n className: PropTypes.string,\n handleOptionSelection: PropTypes.func,\n spotImage: PropTypes.string,\n};\n\nconst CurrencyConversionModal = (props) => {\n const { label } = messages;\n const { selectedOption, exchangeRate } = props;\n const [isPayPalSelected, setPaypalSelected] = useState(\n selectedOption === CURRENCY_CONVERSION_OPTIONS.PAYPAL\n );\n\n const handleClose = () => {\n props.hideModal();\n };\n\n const handleNextButton = () => {\n props.handleOptionSelection(\n isPayPalSelected\n ? CURRENCY_CONVERSION_OPTIONS.PAYPAL\n : CURRENCY_CONVERSION_OPTIONS.ISSUER\n );\n };\n\n return (\n <Sheet\n className=\"currency-conversion-modal\"\n title=\"\"\n hideTitle={true}\n isOpen={props.isOpen}\n onClose={handleClose}\n >\n <HeadingText size=\"lg\" className=\"text-center title\">\n {label.modalTitle}\n </HeadingText>\n <BodyText className=\"text-center subTitle\">\n {label.modalSubTitle}\n </BodyText>\n\n <CurrencyConversionOption\n isSelected={isPayPalSelected}\n title={label.withPaypal.title}\n rate={label.withPayPal.rate.replace(/{amount}/i, exchangeRate)}\n description={label.withPayPal.message}\n handleOptionSelection={() => setPaypalSelected(true)}\n className=\"option-paypal\"\n spotImage=\"paypal-app\"\n />\n <CurrencyConversionOption\n isSelected={!isPayPalSelected}\n title={label.withCard.title}\n description={label.withCard.message}\n handleOptionSelection={() => setPaypalSelected(false)}\n className=\"option-card\"\n spotImage=\"credit-cards\"\n />\n <div className=\"text-center\">\n <Button className=\"btn-sheet-wide\" onClick={handleNextButton}>\n {label.modalButton}\n </Button>\n </div>\n </Sheet>\n );\n};\n\nCurrencyConversionModal.propTypes = {\n handleOptionSelection: PropTypes.func.isRequired,\n hideModal: PropTypes.func,\n selectedOption: PropTypes.string,\n exchangeRate: PropTypes.string,\n isOpen: PropTypes.bool,\n};\n\nexport default CurrencyConversionModal;\n","import { KEY_DOWN } from './constants';\n\nexport function checkKeyPressed(event, doFunction) {\n if (event.which === KEY_DOWN.SPACE || event.which === KEY_DOWN.ENTER) {\n return doFunction();\n }\n}\n","import React from 'react';\nimport CardSecurityCode from '../react-card-security-code';\nimport AppStore from '../stores/AppStore';\nimport * as AppActions from '../actions/AppActions';\nimport {\n localsMessages,\n guestLocalsMessages,\n} from '../utility/getTemplateData';\n\nconst guestMessages = guestLocalsMessages('guest/guestForm');\nconst errorMessages = localsMessages('errors/service');\n\nclass CVVComponent extends React.Component {\n constructor() {\n super();\n this.state = {\n securityCode: '',\n cardSpec: AppStore.getCardSpec().cardSpec,\n errorMessageCSC: '',\n };\n }\n\n componentDidMount() {\n this.props.onRef(this);\n }\n\n componentWillUnmount() {\n this.props.onRef(undefined);\n }\n\n handleChangeSecurityCode(securityCode) {\n this.setState({ securityCode: securityCode });\n this.props.handleSecurityCodeChange(securityCode);\n }\n\n handleFieldFocus(fieldName) {\n this.setState({ [fieldName]: '' });\n }\n\n /*\n * Handle error message for selected field\n */\n handleFieldBlur(value, fieldName, fieldRequired, fieldInvalid) {\n let newErrorState = {};\n\n if (value) {\n newErrorState = {\n [fieldName]: this.validateInputValue(value, fieldName, fieldInvalid),\n };\n } else {\n newErrorState = { [fieldName]: errorMessages[fieldRequired] };\n }\n\n this.setState(newErrorState);\n }\n\n /*\n * Validate input\n */\n validateInputValue(value, fieldName, fieldInvalid) {\n let {\n cardSpec: {\n fields: { csc = {} },\n },\n } = this.state;\n\n if (fieldName === 'errorMessageCSC') {\n let cscLen = value && value.length;\n let cscMax = csc.maxlength;\n let cscMin = csc.minlength || cscMax;\n\n if (!(cscLen >= cscMin && cscLen <= cscMax)) {\n return errorMessages[fieldInvalid];\n }\n }\n\n return '';\n }\n\n render() {\n let { cscplaceholder, csc: cscLabel, cscnote } = guestMessages.guestLabels;\n cscnote = cscnote && cscnote.replace('{csc}', cscLabel.toLowerCase());\n\n return (\n <div className=\"cvv_component\" id=\"cvv_component\">\n <div className=\"cvv_field\">\n <CardSecurityCode\n showIsRequiredError={true}\n label={cscLabel}\n placeholder={cscplaceholder}\n errorMessage={this.state.errorMessageCSC}\n handleChangeSecurityCode={(value) =>\n this.handleChangeSecurityCode(value)\n }\n handleFocus={(value) => this.handleFieldFocus('errorMessageCSC')}\n handleBlur={(value) =>\n this.handleFieldBlur(\n value,\n 'errorMessageCSC',\n 'REQUIRED_SECURITY_CODE',\n 'INVALID_SECURITY_CODE'\n )\n }\n cardSpec={this.state.cardSpec}\n helperText={cscnote}\n />\n </div>\n </div>\n );\n }\n}\n\nexport default CVVComponent;\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport getContent from 'pp-react-l10n';\nimport { CDN_HOST_NAME } from '../../../utility/constants';\nimport { BodyText, CaptionText } from '@paypalcorp/pp-react-text';\nimport { V2CreditcardIcon } from '@paypalcorp/pp-react-icons';\nimport _isEmpty from 'lodash/isEmpty';\nimport { Badge } from '@paypalcorp/pp-react-badge';\n\nconst PaymentInformation = ({\n source,\n paymentDigits,\n paymentType,\n issuer,\n isPaypalCurrencyConversion,\n funds,\n cardType,\n}) => {\n const crossBorderContent = getContent('locals')('guest/crossBorder');\n const paymentInformation = crossBorderContent(\n 'label.paymentInformation',\n { type: paymentType, number: paymentDigits },\n { useHTML: true }\n );\n const preferred = crossBorderContent('label.preferred');\n const [paymentLogo, setPaymentLogo] = useState('');\n\n const transformText = (str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n };\n\n const getIssuer = () => {\n return issuer?.toLowerCase().split(' ').map(transformText).join(' ');\n };\n\n useEffect(() => {\n let cardImg = source?.payment_card?.issuer?.thumbnail_logo_url ?? null;\n if (\n cardImg === null ||\n _isEmpty(cardImg) ||\n typeof cardImg === 'undefined'\n ) {\n cardImg = `${CDN_HOST_NAME}/digitalassets/c/consumer/p2p/funding-sources/${cardType}.png`;\n }\n setPaymentLogo(cardImg);\n }, []);\n\n return (\n <div className=\"cb-payment-information ppvx_justify-content-between\">\n <div className=\"payment-info\">\n {!_isEmpty(paymentLogo) ? (\n <img src={paymentLogo} className=\"payment-logo\" aria-hidden=\"true\" />\n ) : (\n <V2CreditcardIcon size=\"xl2\" />\n )}\n <div className=\"pay-info\">\n {issuer && <BodyText>{getIssuer()}</BodyText>}\n <CaptionText className=\"funding-info\">\n {paymentInformation}\n </CaptionText>\n {!isPaypalCurrencyConversion && (\n <Badge type=\"success\">{preferred}</Badge>\n )}\n </div>\n </div>\n <BodyText>{funds}</BodyText>\n </div>\n );\n};\n\nPaymentInformation.propTypes = {\n fundingOptions: PropTypes.object,\n paymentDigits: PropTypes.number,\n paymentType: PropTypes.string,\n issuer: PropTypes.string,\n funds: PropTypes.string,\n isPaypalCurrencyConversion: PropTypes.string,\n source: PropTypes.object,\n cardType: PropTypes.string,\n};\n\nexport default PaymentInformation;\n","import React from 'react';\nimport AppStore from '../../stores/AppStore';\nimport * as AppActions from '../../actions/AppActions';\nimport TemplateData, {\n localsMessages,\n guestLocalsMessages,\n} from '../../utility/getTemplateData';\nimport { showSpinnerOverlay, hideSpinnerOverlay } from '../../utility/helper';\nimport CancelAndReturn from '../../components/cancelAndReturn';\nimport _get from 'lodash/get';\nimport _includes from 'lodash/includes';\nimport _isEmpty from 'lodash/isEmpty';\nimport _find from 'lodash/find';\nimport DonateGiftAid from '../../guest-payment-components/DonateGiftAid';\nimport CurrencyConversionModal from '../../components/currencyConversion/CurrencyConversionModal';\nimport {\n normalizeNumber,\n formatCurrencyAsString,\n exchangeRateDecimalPoints,\n} from '../../utility/formator';\nimport { withRouter } from 'react-router-dom';\nimport { observeUntilEventObserved } from '../../utility/helper';\nimport { fetcher } from '../../utility/domUtils';\nimport CVVComponent from '../../containers/cvv-component';\nimport withDonate from '../../components/guest/WithDonate';\nimport withTheme from '../../components/withTheme';\nimport ThreeDSContainer from '../../components/threeDS/ThreeDSContainer';\nimport { Alert, Button, CaptionText, BodyText } from '@paypalcorp/pp-react';\nimport getContent from 'pp-react-l10n';\nimport CloseButton from '../../components/CloseButton';\nimport BackButton from '../../components/BackButton';\nimport DonateHeader from '../../components/common/DonateHeader';\nimport PaymentInformation from './CrossBorder/PaymentInformation';\nimport { isExternalFlow } from '../../utility/productIntegrationUtils';\nimport { isInContext } from '../../utility/inContextDonation';\nimport { trackErrorIM, trackLinkClick } from '../../fpti/fpti';\nimport { LINK_NAME, PAGE_SPEC } from '../../fpti/fptiConstants';\n\nlet giftAidText = localsMessages('common/giftAidIt');\nconst donateGiftPercentage = AppStore.getGiftAidItExtraAmount();\nlet giftAidTextObj = (giftAidText && giftAidText.giftAidIt) || {};\nconst guestMessages = guestLocalsMessages('guest/guestForm');\nconst messages = localsMessages('guest/crossBorder');\n\nconst DYNAMIC_CURRENCY_CONVERSION_TAG = 'DYNAMIC_CURRENCY_CONVERSION';\nexport const CURRENCY_CONVERSION_OPTIONS = {\n PAYPAL: 'PAYPAL',\n ISSUER: 'ISSUER',\n};\n\nclass CrossBorder extends React.Component {\n constructor(props) {\n super(props);\n\n let isRecurring = AppStore.getDonationRecurring() === 'checked';\n const stateConversionWithPayPal = this.getStateForConversionWithPayPal();\n\n this.state = {\n subHeaderLabel: TemplateData.donationName,\n donationId: AppStore.getSelectedProgram() || TemplateData.donationId,\n orgName: TemplateData.charityName,\n amountDecimalPoint: TemplateData.donationDecimalPoint || '.',\n decimalPoint: TemplateData.donationDecimalPoint || '.',\n isRecurring,\n ...stateConversionWithPayPal,\n showCVVField: false,\n securityCode: '',\n isCurrencyConversionModalOpen: false,\n };\n }\n\n endCustomCPLTracking = () => {\n const spinnerOverlay = document.getElementById('spinnerOverlay');\n\n if (spinnerOverlay.style.display === 'none') {\n // From tesla flow we don't have the spinner\n window.PAYPAL.analytics.endCPLTracking({\n page: 'main:donate:wps:guest:crossBorder:web::',\n action: 'crossborder_page_loaded',\n uicomp: 'crossBorder',\n uitype: 'page',\n });\n } else {\n // From guest form we need to wait for the spinner to disappear\n observeUntilEventObserved(\n spinnerOverlay,\n { attributes: true },\n (observer) => {\n if (spinnerOverlay.style.display === 'none') {\n window.PAYPAL.analytics.endCPLTracking({\n page: 'main:donate:wps:guest:crossBorder:web::',\n action: 'crossborder_page_loaded',\n uicomp: 'crossBorder',\n uitype: 'page',\n });\n\n observer.disconnect();\n return;\n }\n }\n );\n }\n };\n\n componentDidMount() {\n this.endCustomCPLTracking();\n }\n\n getStateForConversionWithPayPal() {\n let fundingOptions = AppStore.getFundingOptions();\n let myData = AppStore.getAllData() || {};\n const cardType = _get(myData, 'cardSpec.cardSpec.type', '')\n .replace(/[.,_]|\\s\\(.*\\)/g, '')\n .replace(/[\\s_]/g, '-')\n .toLowerCase();\n let [fundingSources] = fundingOptions ? fundingOptions.sources : [];\n let paymentNetwork = fundingSources.payment_card.network.toLowerCase();\n paymentNetwork =\n paymentNetwork.charAt(0).toUpperCase() + paymentNetwork.slice(1);\n let paymentDigits = fundingSources.payment_card.last_4;\n let paymentType = fundingSources.payment_card.type.toLowerCase();\n paymentType = paymentType.charAt(0).toUpperCase() + paymentType.slice(1);\n let issuer = fundingSources.payment_card.issuer.name;\n let exchangeRate = parseFloat(\n fundingOptions.currency_conversion.exchange_rate\n ).toString();\n let fundsIn = fundingOptions.currency_conversion.funds_in;\n let fundsOut = fundingOptions.currency_conversion.funds_out;\n\n return {\n exchangeRate,\n paymentCard: `${paymentNetwork} x-${paymentDigits}`,\n paymentDigits,\n paymentType,\n source: fundingSources,\n issuerName: issuer,\n inAmount: fundsIn.value,\n inCurrency: fundsIn.currency,\n inSymbol: fundsIn.symbol,\n outAmount: fundsOut.value,\n outCurrency: fundsOut.currency,\n outSymbol: fundsOut.symbol,\n currencyConversionOption: CURRENCY_CONVERSION_OPTIONS.PAYPAL,\n cardType,\n };\n }\n\n getStateForConversionWithIssuer() {\n let amount = AppStore.getDonationAmount();\n let symbol = AppStore.getDonationSymbol();\n let currency = AppStore.getDonationCode();\n\n // No currency_conversion. fundsIn and fundsOut will not be available.\n return {\n amount,\n symbol,\n currency,\n currencyConversionOption: CURRENCY_CONVERSION_OPTIONS.ISSUER,\n };\n }\n\n updateFundingOptionsState() {\n let fundingOptions = AppStore.getFundingOptions();\n if (!fundingOptions.currency_conversion) {\n this.setState(this.getStateForConversionWithIssuer());\n } else {\n this.setState(this.getStateForConversionWithPayPal());\n }\n }\n\n getLocalizedCurrency = (amount, currency) => {\n let formatedAmount = {\n value: parseFloat(amount).toFixed(2),\n currency: currency,\n };\n let newAmount = formatCurrencyAsString(formatedAmount);\n return newAmount;\n };\n\n handleCurrencyConversionClick = () => {\n trackLinkClick(LINK_NAME.CURRENCY_CONVERSION, {\n pageSpec: PAGE_SPEC.CROSS_BORDER_PAGE,\n });\n this.showCurrencyConversionModal();\n };\n\n showCurrencyConversionModal = () => {\n this.setState({\n isCurrencyConversionModalOpen: true,\n });\n };\n\n hideCurrencyConversionModal = () => {\n this.setState({\n isCurrencyConversionModalOpen: false,\n });\n };\n\n handleDonateClick = () => {\n if (this.state.showCVVField) {\n const cvv = document.getElementById('securityCode').value;\n this.childCVVInfo.handleFieldBlur(\n cvv,\n 'errorMessageCSC',\n 'REQUIRED_SECURITY_CODE',\n 'INVALID_SECURITY_CODE'\n );\n\n let hasError =\n document.getElementsByClassName('vx_has-error-with-message').length > 0;\n if (!cvv || hasError) {\n return;\n }\n }\n const fundingOptions = AppStore.getFundingOptions();\n const contingencies = _get(fundingOptions, 'contingencies') || [];\n const threeDSContingency =\n _find(contingencies, { action: '3D_SECURE_DATA_COLLECTION_REQUIRED' }) ||\n {};\n\n if (!_isEmpty(threeDSContingency)) {\n this.threeDSContainer.initializeThreeDS();\n return;\n }\n\n // All contingencies resolved\n this.processDonation();\n };\n\n processDonation = () => {\n showSpinnerOverlay();\n\n return this.props.doFulfilment({\n securityCode: this.state.securityCode,\n });\n };\n\n handleGiftAidOption = (giftAidState) => {\n AppActions.updateGiftaidItFlag({ giftAidItFlag: giftAidState });\n };\n\n updateGiftAidComponent = (state) => {\n const extraCostText = getContent('locals')('common/giftAidIt')(\n 'giftAidIt.extraCost',\n {\n currency: state.outSymbol,\n amount: state.outAmount,\n extraAmount: (donateGiftPercentage * state.outAmount).toFixed(2),\n },\n {\n useHTML: true,\n }\n );\n\n let modalp1 = (giftAidTextObj && giftAidTextObj.modalp1) || '',\n modalp2 = (giftAidTextObj && giftAidTextObj.modalp2) || '',\n applyGiftAid = (giftAidTextObj && giftAidTextObj.applyGiftAid) || '';\n\n modalp1 = modalp1 && modalp1.replace('{orgName}', state.subHeaderLabel);\n modalp2 = modalp2 && modalp2.replace('{orgName}', state.subHeaderLabel);\n applyGiftAid =\n applyGiftAid && applyGiftAid.replace('{orgName}', state.subHeaderLabel);\n\n giftAidTextObj.extraCost = extraCostText;\n giftAidTextObj.modalp1 = modalp1;\n giftAidTextObj.modalp2 = modalp2;\n giftAidTextObj.applyGiftAid = applyGiftAid;\n };\n\n handleOptionSelection = (option) => {\n const beforeOption = this.state.currencyConversionOption;\n this.setState(\n {\n currencyConversionOption: option,\n },\n () => {\n // Do Planning if the option has changed\n if (beforeOption !== option) {\n this.hideCurrencyConversionModal();\n showSpinnerOverlay();\n this.getFundingOptions().finally(() => {\n hideSpinnerOverlay();\n });\n } else {\n setTimeout(() => {\n this.hideCurrencyConversionModal();\n }, 300);\n }\n }\n );\n };\n\n showCVVComponent() {\n this.setState({\n showCVVField: true,\n });\n }\n\n hideCVVComponent() {\n this.setState({\n showCVVField: false,\n });\n }\n\n getFundingOptions() {\n const lastFundingSource = this.getLastFundingSource();\n const paymentCardId = _get(lastFundingSource, 'payment_card.id');\n\n const currencyConversionType = this.state.currencyConversionOption;\n\n return fetcher('/donate/guest/fundingOptions', {\n method: 'POST',\n body: JSON.stringify({\n amount: normalizeNumber(AppStore.getDonationAmount()),\n code: AppStore.getDonationCode(),\n fundingOptionId: AppStore.getFundingOptions().id,\n preferences: {\n currency_conversion: [\n {\n payment_card_id: paymentCardId,\n type: currencyConversionType,\n validity: 'TRANSACTION',\n },\n ],\n },\n consentShareAddress: AppStore.getShareAddress(),\n token: TemplateData.token,\n }),\n })\n .then((response) => response.json())\n .then((result) => {\n console.log('getFundingOptions result :: ', result);\n\n let fundingOptions;\n // The funding options data format returned by the server is\n // different for ISSUER and PAYPAL. Handle it appropriately.\n\n // For conversion with 'ISSUER'\n if (currencyConversionType === CURRENCY_CONVERSION_OPTIONS.ISSUER) {\n fundingOptions = _get(result, 'data.fundingOpt[0]');\n } else {\n // For conversion with 'PAYPAL'\n fundingOptions = _get(result, 'fundingOpts[0]');\n }\n\n // Handle error case where fundingOptions call succeeds\n // but no data is returned\n if (_isEmpty(fundingOptions)) {\n trackErrorIM({\n errorCode: currencyConversionType,\n errorMessage: 'FUNDING_OPTIONS_EMPTY_CROSSBORDER',\n });\n this.props.history.push(\n `/donate/error/payment?token=${TemplateData.token}`\n );\n return;\n }\n\n // If CVV contingencies are present and has not been resolved,\n // then display cvv component\n const contingencies = _get(fundingOptions, 'contingencies');\n const hasCvvContingency = _find(contingencies, {\n action: 'CVV_REQUIRED',\n });\n const isCvvContingencyResolved = _get(\n result,\n 'data.contingencyResolutionStatus.cvvContingencyResolved',\n false\n );\n\n if (hasCvvContingency && !isCvvContingencyResolved) {\n this.showCVVComponent();\n } else {\n this.hideCVVComponent();\n }\n\n // Updating store with funding options\n AppActions.updateFundingOptions({ fundingOptions });\n\n this.updateFundingOptionsState();\n\n console.log(result);\n })\n .catch(() => {\n console.log('FAILED');\n this.props.history.push(\n `/donate/error/payment?token=${TemplateData.token}`\n );\n })\n .finally(() => {\n hideSpinnerOverlay();\n });\n }\n\n getLastFundingSource() {\n let fundingOptions = AppStore.getFundingOptions();\n const fundingSources = fundingOptions.sources || [];\n return fundingSources[fundingSources.length - 1];\n }\n\n /**\n * Returns true if currency conversion options should be displayed\n * @param {Array} fundingSources Funding Sources\n * @return {Boolean} True if currency conversion options should be displayed\n */\n shouldShowCurrencyConversionOptions = () => {\n const lastFundingSource = this.getLastFundingSource();\n const tags = _get(lastFundingSource, 'tags');\n return _includes(tags, DYNAMIC_CURRENCY_CONVERSION_TAG);\n };\n\n handleSecurityCodeChange = (securityCode) => {\n this.setState({\n securityCode: securityCode,\n });\n };\n\n handleThreeDSStepUpAuthSuccess = () => {\n this.props.toggleSpinner(true);\n this.props.doFulfilment({\n securityCode: this.state.securityCode,\n });\n };\n\n handleThreeDSStepUpAuthFailure = () => {\n // Unrecoverable error !!\n this.props.history.push('/donate/error/payment');\n };\n\n handleThreeDSFailure = () => {\n // Unrecoverable error !!\n this.props.history.push('/donate/error/threeDS');\n };\n\n render() {\n const inAmount = this.getLocalizedCurrency(\n this.state.inAmount,\n this.state.inCurrency\n );\n const outAmount = this.getLocalizedCurrency(\n this.state.outAmount,\n this.state.outCurrency\n );\n const fundsIn = _includes(inAmount, this.state.inCurrency)\n ? `${inAmount}`\n : `${inAmount} ${this.state.inCurrency}`;\n const fundsOut = _includes(outAmount, this.state.outCurrency)\n ? `${outAmount}`\n : `${outAmount} ${this.state.outCurrency}`;\n const exchangeRate = `${this.getLocalizedCurrency(\n '1.00',\n this.state.inCurrency\n )} = ${exchangeRateDecimalPoints(\n this.state.exchangeRate,\n this.state.amountDecimalPoint,\n this.state.inSymbol\n )} ${this.state.outCurrency}`;\n const { label = {} } = messages || {};\n let donateNowRecurring = _get(guestMessages, 'guestLabels.donatenowrec');\n donateNowRecurring =\n donateNowRecurring && donateNowRecurring.replace('{amount}', fundsOut);\n\n const formattedDonationAmount = `${\n this.state.symbol ? this.state.symbol : ''\n }${this.state.amount} ${this.state.currency}`;\n\n let giftaidFlag = AppStore.getGiftaidItFlagStatus();\n this.updateGiftAidComponent(this.state);\n\n let { csc: cscLabel, cscwarning } = guestMessages.guestLabels;\n cscwarning =\n cscwarning && cscwarning.replace('{csc}', cscLabel.toLowerCase());\n\n const { showCVVField } = this.state;\n const userCountry = AppStore.getUserCountry();\n\n return (\n <div\n className={`${\n TemplateData.bannerUrl ? 'gn_donate_wrapper' : 'donate_wrapper'\n } ${isInContext() ? 'context_gn_wrapper' : ''}`}\n >\n <DonateHeader />\n {showCVVField && (\n <div className=\"ppvx_row alert-container mb-8\">\n <Alert type=\"warning\">{cscwarning}</Alert>\n </div>\n )}\n {isExternalFlow() && (\n <>\n <BackButton inverse />\n <CloseButton inverse />\n </>\n )}\n\n <div id=\"crossBorderContainer\" className=\"cross-border\">\n {TemplateData.isGiftaiditEnabled && (\n <DonateGiftAid\n isAlreadyEnrolled={giftaidFlag}\n showAddress={false}\n addressData=\"\"\n isChecked={giftaidFlag}\n handleGiftAidOption={this.handleGiftAidOption}\n contentMsg={giftAidTextObj}\n />\n )}\n\n <div className=\"ppvx_row\">\n <div className=\"ppvx_col-12\">\n <BodyText style={{ margin: '28px 0' }}>\n {label.donatingFrom}\n </BodyText>\n </div>\n </div>\n\n <PaymentInformation\n fundingOptions={AppStore.getFundingOptions()}\n paymentDigits={this.state.paymentDigits}\n paymentType={this.state.paymentType}\n source={this.state.source}\n issuer={this.state.issuerName}\n isPaypalCurrencyConversion={\n this.state.currencyConversionOption ===\n CURRENCY_CONVERSION_OPTIONS.PAYPAL\n }\n funds={\n this.state.currencyConversionOption ===\n CURRENCY_CONVERSION_OPTIONS.PAYPAL\n ? fundsIn\n : formattedDonationAmount\n }\n cardType={this.state.cardType}\n />\n\n {showCVVField && (\n <CVVComponent\n onRef={(ref) => (this.childCVVInfo = ref)}\n handleSecurityCodeChange={this.handleSecurityCodeChange}\n />\n )}\n\n <div className=\"ppvx_d-flex ppvx_justify-content-between ppvx_align-items-center total-donation\">\n <BodyText strong>{label.youllDonate}</BodyText>\n <BodyText strong>\n {this.state.currencyConversionOption ===\n CURRENCY_CONVERSION_OPTIONS.PAYPAL\n ? fundsIn\n : formattedDonationAmount}\n </BodyText>\n </div>\n\n <div className=\"ppvx_d-flex ppvx_justify-content-between ppvx_align-items-center change-conversion\">\n <BodyText>\n {this.state.currencyConversionOption ===\n CURRENCY_CONVERSION_OPTIONS.PAYPAL\n ? label.withPaypal.title\n : label.withCard.title}\n </BodyText>\n <Button tertiary onClick={this.handleCurrencyConversionClick}>\n {label.changeCurrencyButton}\n </Button>\n </div>\n\n {this.state.currencyConversionOption ===\n CURRENCY_CONVERSION_OPTIONS.PAYPAL && (\n <CaptionText>\n {label.conversion.replace(/{amount}/i, exchangeRate)}\n </CaptionText>\n )}\n\n {this.shouldShowCurrencyConversionOptions() && (\n <div className=\"conversion-message\">\n {this.state.currencyConversionOption ===\n CURRENCY_CONVERSION_OPTIONS.PAYPAL ? (\n <CaptionText>\n {userCountry === 'US' ? label.spread : label.fee}\n </CaptionText>\n ) : null}\n </div>\n )}\n\n <div className=\"legal-text text-center\">\n <CaptionText>\n {getContent('locals')('guest/crossBorder')(\n 'label.policies',\n { country: TemplateData.country },\n { useHTML: true }\n )}\n </CaptionText>\n </div>\n\n <div className=\"text-center\">\n <Button\n className=\"btn-wide\"\n id=\"donate-button\"\n disabled={this.props.disabled}\n onClick={this.handleDonateClick}\n >\n {this.state.isRecurring ? donateNowRecurring : label.donatenow}\n </Button>\n </div>\n <div className=\"cross-border-cancel-return\">\n <CancelAndReturn />\n </div>\n\n <CurrencyConversionModal\n isOpen={this.state.isCurrencyConversionModalOpen}\n exchangeRate={exchangeRate}\n handleOptionSelection={this.handleOptionSelection}\n hideModal={this.hideCurrencyConversionModal}\n selectedOption={this.state.currencyConversionOption}\n />\n\n <ThreeDSContainer\n onThreeDSStepUpAuthNotRequired={this.handleThreeDSStepUpAuthSuccess}\n onThreeDSStepUpAuthSuccess={this.handleThreeDSStepUpAuthSuccess}\n onThreeDSStepUpAuthFailure={this.handleThreeDSFailure}\n onThreeDSFailure={this.handleThreeDSFailure}\n onRef={(ref) => (this.threeDSContainer = ref)}\n />\n </div>\n </div>\n );\n }\n}\n\nexport default withRouter(withDonate(withTheme(CrossBorder)));\n","import withPageTrack from '../../confirmation/withPageTrack';\nimport withPostTransactionRequest from '../../confirmation/withPostTransactionRequest';\nimport PendingView from '../../confirmation/PendingView';\nimport SuccessView from '../../confirmation/SuccessView';\n\nconst FLOW = 'guest';\nconst POST_TRANSACTION_URL = '/donate/guest/postTransaction';\n\nexport const GuestConfirmationPending = withPageTrack(\n withPostTransactionRequest(PendingView, POST_TRANSACTION_URL),\n FLOW,\n 'pending'\n);\n\nexport const GuestConfirmationSuccess = withPageTrack(\n withPostTransactionRequest(SuccessView, POST_TRANSACTION_URL),\n FLOW,\n 'success'\n);\n","import React, { useEffect } from 'react';\nimport { HeadingText, BodyText, Link, Button } from '@paypalcorp/pp-react';\nimport Illustration from '../../components/illustrations/Illustration';\nimport CloseButton from '../../components/CloseButton';\nimport {\n isInContext,\n isMobileOrInContext,\n} from '../../utility/inContextDonation';\nimport withTheme from '../../components/withTheme';\nimport { isExternalFlow } from '../../utility/productIntegrationUtils';\nimport { addClass } from '../../utility/domUtils';\n\nfunction FullPageError({\n illustrationType = 'critical',\n title,\n body,\n body2,\n linkLabel,\n handleLinkClick,\n buttonLabel,\n handleButtonClick,\n showCloseButton = false,\n centerBody = false,\n}) {\n useEffect(() => {\n if (isInContext()) {\n addClass('#mainWrapper header.donate_global_nav', ['hide-header']);\n }\n }, []);\n return (\n <div\n className={`donate_wrapper ${\n isMobileOrInContext() ? 'mobile_view' : ''\n } ${isInContext() ? 'gn_donate_wrapper' : ''} fullPageError`}\n >\n {isExternalFlow() && showCloseButton && <CloseButton />}\n <Illustration size=\"short\" type={illustrationType} />\n <HeadingText size=\"sm\" className=\"title\">\n {title}\n </HeadingText>\n {body ? (\n <BodyText className={`body ${centerBody ? 'text-center' : ''}`}>\n {body}\n </BodyText>\n ) : null}\n {body2 ? (\n <BodyText className={`body ${centerBody ? 'text-center' : ''}`}>\n {body2}\n </BodyText>\n ) : null}\n\n {buttonLabel ? (\n <Button secondary onClick={handleButtonClick} className=\"cta\">\n {buttonLabel}\n </Button>\n ) : null}\n\n {linkLabel ? (\n <Link className=\"cta\" onClick={handleLinkClick}>\n {linkLabel}\n </Link>\n ) : null}\n </div>\n );\n}\n\nexport default withTheme(FullPageError);\n","import React from 'react';\nimport getContent from 'pp-react-l10n';\nimport AppStore from '../../stores/AppStore';\nimport { withRouter } from 'react-router-dom';\nimport withTheme from '../../components/withTheme';\nimport templateData, { localsMessages } from '../../utility/getTemplateData';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport { trackErrorPageIM } from '../../fpti/fpti';\nimport { PAGE_SPEC } from '../../fpti/fptiConstants';\nimport { addClass, removeClass } from '../../utility/domUtils';\nimport FullPageError from './FullPageError';\n\nclass PaymentError extends React.Component {\n constructor() {\n super();\n this.state = {};\n }\n\n componentDidMount = () => {\n addClass('#mainWrapper', ['full-page-error']);\n hideSpinnerOverlay();\n const ERROR_CODE = AppStore.getPaymentError() || '';\n trackErrorPageIM({\n pageSpec: PAGE_SPEC.GUEST_FAILURE_PAGE,\n errorCode: ERROR_CODE,\n });\n };\n\n componentWillUnmount() {\n removeClass('#mainWrapper', ['full-page-error']);\n }\n\n handleTryAgain = () => {\n this.props.history.push(`/donate?token=${templateData.token}`);\n };\n\n render() {\n const { error = {}, label = {} } = localsMessages('errors/paymentError');\n const ERROR_CODE = AppStore.getPaymentError() || '';\n\n let { WSM_CANNOT_PAY_SELF = '', WENT_WRONG, TEMP_GLITCH } = error;\n let { tryagain } = label;\n\n const hideButton = ERROR_CODE === 'WSM_PAYER_LIMIT_EXCEEDED';\n\n switch (ERROR_CODE) {\n case 'WSM_PAYMENT_DENIED':\n WENT_WRONG = error.DID_NOT_WORK;\n TEMP_GLITCH = error.DIFF_CREDIT_DEBIT;\n tryagain = label.trydiffcard;\n break;\n case 'WSM_CANNOT_PAY_SELF':\n const L2 =\n WSM_CANNOT_PAY_SELF &&\n WSM_CANNOT_PAY_SELF.replace(\n '{data.dataMerchant.name}',\n templateData.donationName\n );\n WENT_WRONG = error.WSM_CANNOT_PAY_SELF_H;\n TEMP_GLITCH = L2;\n break;\n case 'WSM_PAYER_LIMIT_EXCEEDED':\n WENT_WRONG = error.AmountLimitBreachError;\n TEMP_GLITCH = getContent('locals')('errors/paymentError')(\n 'error.CustomerCareMessage',\n {\n customerServiceLink: '/selfhelp/home',\n },\n {\n useHTML: true,\n }\n );\n break;\n default:\n break;\n }\n\n return (\n <div>\n <FullPageError\n title={WENT_WRONG}\n body={TEMP_GLITCH}\n buttonLabel={hideButton ? null : tryagain}\n handleButtonClick={this.handleTryAgain}\n showCloseButton={true}\n />\n </div>\n );\n }\n}\n\nexport default withRouter(withTheme(PaymentError));\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport withTheme from '../../components/withTheme';\nimport { localsMessages } from '../../utility/getTemplateData';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport Illustration from '../../components/illustrations/Illustration';\nimport ConfirmationBody from '../../confirmation/ConfirmationBody';\nimport _get from 'lodash/get';\nimport { isMobileOrInContext } from '../../utility/inContextDonation';\nimport { trackErrorPageIM } from '../../fpti/fpti';\nimport { PAGE_SPEC } from '../../fpti/fptiConstants';\n\nconst messages = localsMessages('errors/paymentError');\nconst noAccountErrorMessage = _get(\n messages,\n 'noAccountError',\n \"We can't complete this donation. The receiver doesn't have a valid PayPal account.\"\n);\n\nclass UnilateralError extends React.Component {\n constructor() {\n super();\n this.state = {};\n }\n\n componentDidMount = () => {\n hideSpinnerOverlay();\n\n trackErrorPageIM({\n pageSpec: PAGE_SPEC.UNILATERAL_ERROR_PAGE,\n errorCode: 'UNILATERAL_ERROR',\n });\n };\n\n render() {\n return (\n <div\n className={`donate_wrapper confirmation ${\n isMobileOrInContext() ? 'mobile_view' : ''\n }`}\n >\n <div className=\"ppvx_row\">\n <div className=\"ppvx_col-12 ppvx_d-flex ppvx_justify-content-center\">\n <Illustration type=\"warning\" />\n </div>\n </div>\n <div className=\"ppvx_row\">\n <div className=\"ppvx_col-12 text-center\">\n <ConfirmationBody message={noAccountErrorMessage} />\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default withRouter(withTheme(UnilateralError));\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport withTheme from '../../components/withTheme';\nimport templateData, { localsMessages } from '../../utility/getTemplateData';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport { Button } from '@paypalcorp/pp-react';\nimport Illustration from '../../components/illustrations/Illustration';\nimport ConfirmationTitle from '../../confirmation/ConfirmationTitle';\nimport ConfirmationBody from '../../confirmation/ConfirmationBody';\nimport { isMobileOrInContext } from '../../utility/inContextDonation';\nimport { isExternalFlow } from '../../utility/productIntegrationUtils';\nimport CloseButton from '../../components/CloseButton';\n\nclass ThreeDSError extends React.Component {\n componentDidMount = () => {\n hideSpinnerOverlay();\n };\n\n handleTryAgain = () => {\n this.props.history.push(`/donate?token=${templateData.token}`);\n };\n\n render() {\n const error = localsMessages('errors/threeDSError');\n\n return (\n <div>\n <div\n className={`donate_wrapper confirmation ${\n isMobileOrInContext() ? 'mobile_view' : ''\n }`}\n >\n {isExternalFlow() && <CloseButton />}\n <div className=\"ppvx_row\">\n <div className=\"ppvx_col-12 ppvx_d-flex ppvx_justify-content-center\">\n <Illustration type=\"warning\" />\n </div>\n </div>\n <div className=\"ppvx_row\">\n <div className=\"ppvx_col-12 text-center\">\n <ConfirmationTitle message={error.errorMessage} />\n </div>\n </div>\n <div className=\"ppvx_row\">\n <div className=\"ppvx_col-12 text-center\">\n <ConfirmationBody message={error.tryAgain} />\n </div>\n </div>\n\n <div className=\"ppvx_row\">\n <div className=\"ppvx_col-12 text-center\">\n <Button\n className=\"btn-wide\"\n id=\"tryAgain\"\n onClick={this.handleTryAgain}\n >\n {error.tryCard}\n </Button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default withRouter(withTheme(ThreeDSError));\n","import { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { getParameterByName } from '../utility/queryStringHelper';\nimport withDonate from './guest/WithDonate';\nimport * as AppActions from '../actions/AppActions';\nimport AppStore from '../stores/AppStore';\nimport _get from 'lodash/get';\nimport templateData from '../utility/getTemplateData';\nimport { isLoggedInUser, isOneTouchUser } from '../utility/authUtils';\nimport { trackCaptureOrderPageIM } from '../fpti/fpti';\n\nclass CaptureOrder extends Component {\n constructor(props) {\n super(props);\n this.state = {\n token: '',\n accessToken: '',\n isSubmitted: false,\n backBtnVisible: false,\n responseData: '',\n wTransactionEntry: '',\n requestError: '',\n };\n }\n\n componentDidMount() {\n this.props.toggleSpinner(true);\n const donateToken = getParameterByName('dtoken');\n const orderToken = getParameterByName('token');\n const payerID = getParameterByName('PayerID');\n\n this.captureOrder(orderToken, donateToken, payerID);\n }\n\n captureOrder = (orderToken, donateToken, payerID) => {\n const { orderStatus } = AppStore.getOrderStatus() || {};\n const { token } = templateData;\n\n if (orderStatus === 'COMPLETED') {\n window.location.href = `/donate/paymentComplete?token=${token}`;\n return;\n }\n\n this.props\n .captureOrder(orderToken, donateToken, payerID)\n .then((response) => response.json())\n .then((result) => {\n const confirmationNumber =\n _get(result, 'data.confirmationData.confirmationNumber') ||\n _get(result, 'data.confirmationData.postBackData.txn_id');\n if (!confirmationNumber) {\n this.props.history.push(`/donate/error/payment?token=${token}`);\n return;\n }\n\n AppActions.updateOrderStatus({ orderStatus: 'COMPLETED' });\n\n const isMemberFlow = isLoggedInUser() || isOneTouchUser();\n const confirmationData = _get(result, 'data.confirmationData', {});\n this.handlePaymentSuccess(confirmationData, isMemberFlow);\n })\n .catch(() => {\n this.props.history.push(`/donate/error/payment?token=${token}`);\n });\n };\n\n handlePaymentSuccess = (response, isMemberFlow) => {\n AppActions.updateConfirmation({ confirmation: response });\n this.handleConfirmation(response, isMemberFlow);\n };\n\n handleConfirmation = (response, isMemberFlow) => {\n const { token } = templateData;\n const flow = isMemberFlow ? 'member' : 'guest';\n const page = response.isOfacPending ? 'pending' : 'confirmation';\n const url = token\n ? `/donate/${flow}/${page}/?token=${token}`\n : `/donate/${flow}/${page}`;\n\n trackCaptureOrderPageIM({\n flow,\n confirmationData: response,\n });\n\n this.props.history.push(url);\n };\n\n render() {\n return null;\n }\n}\n\nCaptureOrder.propTypes = {\n toggleSpinner: PropTypes.func,\n captureOrder: PropTypes.func,\n history: PropTypes.object,\n};\n\nexport default withDonate(CaptureOrder);\n","import { useEffect } from 'react';\nimport templateData from '../utility/getTemplateData';\n\nlet timerCount = 0;\nexport default function CancelAndReturnOrder() {\n const redirectToCancelUrl = () => {\n const { charityCancelUrl } = templateData;\n if (charityCancelUrl) {\n window.location.href = charityCancelUrl;\n }\n };\n\n useEffect(() => {\n // xprops takes a few miliseconds to be populated\n // because it has to set up the communication with host window\n // Wait a maximum of 2 seconds for the value\n waitForXProps(() => {\n // No xprops for 2 seconds\n // Maybe we are not inContext?\n // Redirect to cancel url\n redirectToCancelUrl();\n });\n }, []);\n\n function waitForXProps(callback) {\n timerCount++;\n if (timerCount > 10) {\n callback();\n return;\n }\n if (!window.xprops) {\n setTimeout(() => {\n waitForXProps(callback);\n }, 200);\n } else {\n window.xprops.close();\n }\n }\n\n return null;\n}\n","import './publicPath';\n\nimport 'consumerweb-shim';\nimport 'core-js/stable';\nimport 'regenerator-runtime/runtime';\nimport '../utility/bootstrap';\nimport React, { Component, Suspense, useEffect } from 'react';\nimport ReactDOM from 'react-dom';\nimport { Route, Switch, Router } from 'react-router-dom';\nimport history from './configureHistory';\nimport CookiedUserPage from './../pages/landing/landing';\nimport CampaignLanding from '../pages/landing/campaignLanding';\nimport CrossBorder from './../pages/guest/crossBorder';\nimport {\n GuestConfirmationPending,\n GuestConfirmationSuccess,\n} from '../pages/guest/confirmation';\nimport PaymentError from './../pages/error/paymentError';\nimport UnilateralError from '../pages/error/UnilateralError';\nimport templateData from './../utility/getTemplateData';\nimport { isOneTouchUser, isAuthenticatedUser } from 'utility/authUtils';\nimport { parseUrlQuery } from '../utility/urlUtils';\nimport { setShouldRTL } from '../utility/paypalAphrodite';\nimport { showSpinnerOverlay, hideSpinnerOverlay } from '../utility/helper';\nimport ThreeDSError from '../pages/error/threeDSError';\nimport { reactLazyPreload } from '../utility/lazyLoader';\nimport CaptureOrder from '../components/CaptureOrder';\nimport CancelAndRedirectOrder from '../components/CancelAndRedirectOrder';\nimport {\n MemberConfirmationPending,\n MemberConfirmationSuccess,\n} from '../pages/member/confirmation';\nimport Footer from '../components/footer/footer';\n\nimport '../../css/ppvx.less';\nimport '../../css/ppvx-app.less';\nimport '../../css/portable-onboarding.less';\nimport { addClass, removeClass } from '../utility/domUtils';\nimport { isGNC, isGN, isCampaigns } from '../utility/productIntegrationUtils';\n\n// set the direction for styles (whether to convert them to RTL)\nconst { locality: { directionality = 'ltr' } = {} } = templateData;\nsetShouldRTL(directionality !== 'rtl');\n\nconst { currentUserState, isUnilateralAccount, paymentStatus } = templateData;\n\nconst GuestPage = reactLazyPreload(() =>\n import(/* webpackChunkName: \"GuestPage\" */ './../pages/guest/guest')\n);\n\nfunction FallbackSpinner() {\n useEffect(() => {\n showSpinnerOverlay();\n }, []);\n\n return <></>;\n}\n\nclass LandingPage extends Component {\n constructor(props) {\n super(props);\n this.state = {\n userCookied: currentUserState === 'cookied',\n isOneTouch: isOneTouchUser(),\n };\n }\n\n componentDidMount() {\n if (!(isGNC() || isGN())) {\n addClass('#mainWrapper', ['landing-page']);\n }\n\n if (isUnilateralAccount) {\n history.push('/donate/error/noaccount');\n return;\n }\n // Only hiding spinner for cookied user and if payment token status is not complete\n if (this.state.userCookied && paymentStatus !== 'complete') {\n // In case of onboarding, guest.js will hide the spinner\n if (!templateData.onboardingEnabled) {\n hideSpinnerOverlay();\n }\n }\n\n if (!isAuthenticatedUser()) {\n GuestPage.preload();\n }\n }\n componentWillUnmount() {\n if (!(isGNC() || isGN())) {\n removeClass('#mainWrapper', ['landing-page']);\n }\n }\n\n getPageToRender() {\n // If `signup` param is present, render GuestPage\n const isSignupRoute = !!parseUrlQuery().signup;\n if (isSignupRoute) {\n return <GuestPage />;\n }\n return <CookiedUserPage />;\n }\n\n render() {\n return <div>{this.getPageToRender()}</div>;\n }\n}\n\nfunction CampaignLandingPage() {\n const getPageToRender = () => {\n // If `signup` param is present, render GuestPage\n const isSignupRoute = !!parseUrlQuery().signup;\n if (isSignupRoute) {\n return <GuestPage />;\n }\n return <CampaignLanding />;\n };\n\n return <>{getPageToRender()}</>;\n}\n\nReactDOM.render(\n <Router history={history}>\n <Suspense fallback={<FallbackSpinner />}>\n <Switch>\n <Route\n exact\n path=\"/donate\"\n component={isCampaigns() ? CampaignLandingPage : LandingPage}\n />\n <Route exact path=\"/donate/capture\" component={CaptureOrder} />\n <Route\n exact\n path=\"/donate/orders/cancel\"\n component={CancelAndRedirectOrder}\n />\n <Route exact path=\"/donate/guest\" component={GuestPage} />\n <Route exact path=\"/donate/guest/crossborder\" component={CrossBorder} />\n <Route\n exact\n path=\"/donate/guest/confirmation\"\n component={GuestConfirmationSuccess}\n />\n <Route\n exact\n path=\"/donate/guest/pending\"\n component={GuestConfirmationPending}\n />\n <Route\n exact\n path=\"/donate/member/confirmation\"\n component={MemberConfirmationSuccess}\n />\n <Route\n exact\n path=\"/donate/member/pending\"\n component={MemberConfirmationPending}\n />\n <Route exact path=\"/donate/error/payment\" component={PaymentError} />\n <Route\n exact\n path=\"/donate/error/noaccount\"\n component={UnilateralError}\n />\n <Route exact path=\"/donate/error/threeDS\" component={ThreeDSError} />\n </Switch>\n </Suspense>\n <Footer />\n </Router>,\n document.getElementById('donateWrapper')\n);\n","import TemplateData from './getTemplateData';\nimport { lazy as reactLazy } from 'react';\nimport { trackErrorIM } from '../fpti/fpti';\n\n/**\n * Loads bodymovin and hearts animation json\n */\nexport function loadBodyMovin() {\n if (\n typeof window.bodymovin !== 'undefined' &&\n typeof window.heartsAnimationData !== 'undefined'\n ) {\n return Promise.resolve([window.bodymovin, window.heartsAnimationData]);\n }\n return Promise.all([\n loadScript(\n 'https://www.paypalobjects.com/donate/bodymovin/bodymovin.min.js'\n ),\n loadScript('https://www.paypalobjects.com/donate/bodymovin/hearts.js'),\n ]).catch((error) => {\n trackErrorIM({\n errorCode: 'LAZY_LOAD_FAILED',\n errorMessage: error,\n fieldName: 'bodymovin',\n });\n });\n}\n\n/**\n * Load Progressive Onboarding component (Slick Version)\n */\nexport function loadSlickProgressiveOnboarding() {\n return Promise.all([\n import(\n /* webpackChunkName: 'ProgressiveonboardingSlick' */ 'portableonboarding'\n ),\n ]).catch((error) => {\n trackErrorIM({\n errorCode: 'LAZY_LOAD_FAILED',\n errorMessage: error,\n fieldName: 'progressive_slick',\n });\n });\n}\n\n// eslint-disable-next-line\nfunction loadScript(scriptPath) {\n return new Promise((resolve, reject) => {\n const nonce = TemplateData.nonce;\n var script = document.createElement('script');\n document.getElementsByTagName('head')[0].appendChild(script);\n script.onload = function (params) {\n resolve(params);\n };\n script.onerror = function (params) {\n reject(params);\n };\n script.nonce = nonce;\n script.src = scriptPath;\n });\n}\n\n/**\n * Lazy load a React component and add preload option\n */\nexport function reactLazyPreload(importStatement) {\n const lazyComponent = reactLazy(importStatement);\n lazyComponent.preload = importStatement;\n return lazyComponent;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.genericPropType = genericPropType;\nexports.cardSpecsPropType = cardSpecsPropType;\nexports.cardSpecPropType = cardSpecPropType;\nexports.stateListPropType = stateListPropType;\n/**\n * PropType Validators\n */\n\n/**\n * Awesome generic PropType validator\n * Basically just checks if the prop provided is defined\n * - needed for checking connected components passed as props\n * @param {Object} props component props\n * @param {String} propName propName we're validating\n * @param {String} componentName the component\n * @return {Error} a new error or null if there's no error\n */\nfunction genericPropType(props, propName, componentName) {\n\tif (props[propName] === undefined) {\n\t\treturn new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + componentName + \"`. Validation failed.\");\n\t}\n\treturn null;\n}\n\n/**\n * cardSpecs PropType validator\n * @param {Object} props - component props\n * @param {String} propName - propName we're validating (cardSpec)\n * @param {String} componentName - the component\n * @return {Error} - a new error or null if there's no error\n */\nfunction cardSpecsPropType(props, propName, componentName) {\n\tvar cardSpecs = props[propName];\n\tif (!cardSpecs) {\n\t\treturn new Error(\"Required prop `\" + propName + \"` was not specified in `\" + componentName + \"`. Please supply the config object you get back consumerweb-card.\");\n\t} else if (!cardSpecs.cardTypes || cardSpecs.cardTypes && !Object.keys(cardSpecs.cardTypes).length) {\n\t\treturn new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + componentName + \"`. Please supply the config object you get back consumerweb-card.\");\n\t}\n\treturn null;\n}\n\n/**\n * cardSpec PropType validator\n * @param {Object} props - component props\n * @param {String} propName - propName we're validating (cardSpec)\n * @param {String} componentName - the component\n * @return {Error} - a new error or null if there's no error\n */\nfunction cardSpecPropType(props, propName, componentName) {\n\tvar cardSpec = props[propName];\n\tif (!cardSpec) {\n\t\treturn new Error(\"Required prop `\" + propName + \"` was not specified in `\" + componentName + \"`. Please supply the config object you get back consumerweb-card.\");\n\t} else if (!cardSpec.fields || !cardSpec.type) {\n\t\treturn new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + componentName + \"`. Please supply the config object you get back consumerweb-card.\");\n\t}\n\treturn null;\n}\n\n/**\n * stateList PropType validator\n * @param {Object} props - component props\n * @param {String} propName - propName we're validating (stateList)\n * @param {String} componentName - the component\n * @return {Error} - a new error or null if there's no error\n */\nfunction stateListPropType(props, propName, componentName) {\n\tvar stateList = props[propName];\n\n\t// if we don't get the array of states we're expecting from Griffin, return an error\n\tif (!stateList) {\n\t\treturn new Error(\"Required prop `\" + propName + \"` was not specified in `\" + componentName + \"`. Please supply the array you get back from griffin.formatCoarseAddress().\");\n\t} else if (!Array.isArray(stateList) || stateList.length && !stateList[0].$id) {\n\t\treturn new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + componentName + \"`. Please supply the array you get back from griffin.formatCoarseAddress().\");\n\t}\n\treturn null;\n}"],"sourceRoot":""}