function public_affairs_definition(){var t={},n={url:"./",getTrackingDetail:null};return Object.defineProperty(t,"settings",{set:function(t){n=t}}),Object.defineProperty(t,"url",{get:function(){return n.url},set:function(t){n.url=t}}),Object.defineProperty(t,"getTrackingDetail",{get:function(){return n.getTrackingDetail},set:function(t){n.getTrackingDetail=t}}),t}function generate_uuidv4(){var n=window.crypto||window.msCrypto;return"xxxxxxxx-xxxx-4xxx-Vxxx-xxxxxxxxxxxx".replace(/[xV]/g,function(t){var i=n.getRandomValues(new Uint8Array(1))[0]&15,r;return t=="V"?(r=i&3,(8^r).toString(16)):i.toString(16)})}function pa_api_request(n,t,i,r){var u=new XMLHttpRequest,f,e;u.withCredentials=!0;u.open("POST",n,!0);u.setRequestHeader("Content-Type","application/json");PublicAffairs.getTrackingDetail().Identity!=undefined&&PublicAffairs.getTrackingDetail().Identity.TrackingId&&(f=PublicAffairs.getTrackingDetail().Identity.TrackingId,u.setRequestHeader("UI_Token",f));e=generate_uuidv4();u.setRequestHeader("PA-Event-Id",e);window.document.documentMode&&u.setRequestHeader("X-ORIGIN",window.location.protocol+"//"+window.location.hostname);u.send(JSON.stringify(t));u.onload=function(){var n;u.status>=200&&u.status<400?(n=u.responseText?JSON.parse(u.responseText):null,i(n)):u.status==400&&(n=JSON.parse(u.responseText),r(n))}}function ResetPasswordData(){this.id;this.newPassword;this.confirmNewPassword}function AdvocateProfile(){this.advocate;this.electedOfficials;this.actionRequestsAvailable;this.actionRequestsCompleted}function AdvocateProfileUpdateData(){this.advocate;this.currentCredentials;this.newCredentials}function Advocate(){this.id;this.otherId;this.socialMediaAccounts;this.prefix;this.firstName;this.middleName;this.lastName;this.suffix;this.homeEmail;this.workEmail;this.homePhone;this.workPhone;this.workPhoneExtension;this.mobilePhone;this.alternatePhone;this.occupation;this.company;this.title;this.partyCode;this.ethnicityCode;this.emailPreference;this.postalPreference;this.homeAddress;this.workAddress;this.otherAddress;this.subsetId;this.uDFs;this.groupAssociations}function Credentials(){this.userName;this.password}function AdvocateAddResult(){this.advocate;this.advocateAlreadyExisted}function GroupAssociation(){this.groupCode;this.groupDescription;this.subgroupCode;this.subgroupDescription}function UserDefinedFields(){this.field1;this.field2;this.field3;this.field4;this.field5;this.field6;this.field7;this.field8;this.field9;this.field10;this.field11;this.field12;this.field13;this.field14;this.field15;this.field16;this.field17;this.field18;this.field19;this.field20;this.field21;this.field22;this.field23;this.field24}function AlertPerformance(){this.activations;this.individuals;this.targetsContacted;this.facebookShares;this.activationBreakdown;this.targetBreakdown}function CampaignTreeLevels(){}function AlertActivation(){this.alertCount;this.activationDate}function AlertGraphDateSeries(){this.date;this.activationCount}function Asset(){this.name;this.value}function DistrictIdentity(){this.code;this.chamber;this.state}function CountyAsset(){this.countyCode;this.stateCode;this.assets}function County(){this.code;this.state}function DistrictAsset(){this.districtCode;this.chamberCode;this.stateCode;this.assets}function StateAsset(){this.stateCode;this.assets}function CallToActionSummary(){this.id;this.description;this.title;this.briefSummary;this.mobileSummary;this.isHotTopic;this.isPreview;this.actionFormat;this.channelTypes;this.displayType;this.sortOrder;this.campaignInformation;this.summary;this.textField1;this.textField2;this.textField3;this.takeActionImageUrl;this.tags}function CallToActionSearchData(){this.advocateId;this.subset;this.hotTopic;this.displayType;this.formats;this.tags;this.useTagAndOperator;this.preview}function CampaignTreePath(){this.issue;this.campaign;this.project}function CallToActionDisplayType(){}function CallToActionFormat(){}function CallToAction(){this.id;this.description;this.title;this.briefSummary;this.summary;this.mobileSummary;this.internalName;this.talkingPoints;this.lastResponseDate;this.actionFormat;this.recipientGroups;this.startDate;this.endDate;this.takeActionButtonText;this.takeActionImageUrl;this.showTakeActionImageUrl;this.tags}function CallToActionWithAdditionalInformation(){this.callToAction;this.additionalInformation}function CallToActionResponse(){this.id;this.title;this.briefSummary;this.summary;this.internalName;this.talkingPoints;this.date;this.lastResponseDate;this.responses}function ActionAlertChannelType(){}function TakeActionResult(){this.takeActionId;this.requiresAdditionalInformation;this.additionalInformation}function CallToActionData(){this.callToActionId;this.recipientGroupResponses}function AdditionalInformationResult(){this.takeActionId;this.success;this.generalAdvocateDataResult;this.recipientSolicitedAdvocateDataResultCollection}function AdditionalInformationData(){this.fieldId;this.value}function RecipientGroupResponseDetail(){this.recipientGroupId;this.letterId;this.letterBody;this.excludedRecipients;this.recipientId;this.clickToCallId;this.clickToCallAccountContext}function CompletedCallToActionResult(){this.id;this.advocateAddress;this.primaryCommunications;this.rolloverCommunications}function Facility(){this.id;this.otherId;this.name;this.phone;this.address;this.addressMetaData;this.contactId;this.description;this.disclosureType;this.email;this.fax;this.web;this.subset;this.facilityGroupTypes}function CaptchaData(){this.id;this.captcha;this.imageData;this.mimeType}function CaptchaResult(){this.result;this.message}function CaptchaResponse(){this.id;this.response}function Committee(){this.id;this.name;this.state;this.committeeType;this.subcommittees;this.fullcommittee;this.members}function DistrictResult(){this.correctedAddress;this.metaData}function Address(){this.address1;this.address2;this.city;this.state;this.zip;this.country;this.county;this.countyFips}function DistrictDetail(){this.id;this.state;this.code;this.name;this.districtType;this.chamber;this.shortPrefix;this.longPrefix;this.termLimit;this.termLength;this.seatCount;this.multiSeat;this.seats}function ElectedOfficialIdentity(){this.id;this.prefix;this.firstName;this.middleName;this.lastName;this.suffix;this.nickname;this.salutation;this.title;this.fullDisplayName;this.gender;this.dateOfBirth;this.party;this.district;this.picture}function ElectedOfficial(){this.id;this.prefix;this.firstName;this.middleName;this.lastName;this.suffix;this.nickname;this.salutation;this.title;this.leadershipPosition;this.fullDisplayName;this.gender;this.dateOfBirth;this.party;this.capitolAddress;this.capitolAddressMetadata;this.firstDistrictAddress;this.firstDistrictAddressMetadata;this.secondDistrictAddress;this.secondDistrictAddressMetadata;this.thirdDistrictAddress;this.thirdDistrictAddressMetadata;this.campaignAddress;this.campaignAddressMetadata;this.district;this.education;this.biography;this.picture;this.socialMediaAccounts;this.electYear;this.relectYear}function ElectedOfficialDetail(){this.committees;this.scorecard}function ElectedOfficialCommittee(){this.committee;this.position}function District(){this.state;this.code;this.name;this.districtType;this.chamber;this.termLimit;this.termLength}function ElectionType(){this.id;this.description}function Election(){this.state;this.electionType;this.electionYear;this.electionDate;this.note;this.electionDeadlines}function ElectionResources(){this.stateCode;this.stateElectionUrl;this.stateElectionPhone;this.earlyVoteNote;this.earlyVoteUrl;this.earlyVotePhone;this.pollingPlaceUrl;this.absenteeBallotInstructions;this.absenteeBallotUrl;this.absenteeBallotDownloadUrl;this.pollingPlaceOpensAt;this.pollingPlaceClosesAt;this.voterRegistrationDeadlineNote;this.voterRegistrationDeadlineUrl;this.voterRegistrationDownloadUrl;this.isSameDayRegistrationAllowed;this.voteByMailInstructions;this.voteByFaxInstructions;this.onlineVoterRegistrationUrl;this.contactMailingRecipient;this.contactMailingAddress1;this.contactMailingAddress2;this.contactMailingCity;this.contactMailingState;this.contactMailingZipCode;this.isNationalVoterRegistrationFormAccepted}function ElectionDeadlineType(){this.id;this.description}function EmailType(){}function MergeField(){this.token;this.mergeValue}function WebsiteEmail(){this.id;this.subject;this.name}function ValidationResult(){this.address;this.originalAddress;this.account;this.domain;this.isValid;this.message;this.validationCode;this.isDisposable;this.isSpamtrap;this.isRole;this.providerName;this.isCorrected}function AdvocateEngagement(){this.advocateId;this.rank;this.points;this.badges;this.nextRank}function AdvocateRank(){this.id;this.name;this.description;this.iconUrl;this.minPoints;this.individualTypeCode}function AdvocateBadge(){this.id;this.name;this.description;this.iconUrl;this.sortOrder;this.dateAwarded;this.individualTypeCode}function EngagementLeader(){this.firstName;this.lastName;this.address;this.addressType;this.engagement}function NewBadgeDefinitionData(){this.name;this.description;this.iconUrl;this.sortOrder;this.actionCount;this.individualTypeCode;this.iniUser}function NewRankDefinitionData(){this.name;this.description;this.iconUrl;this.minPoints;this.individualTypeCode;this.iniUser}function EngagementAction(){this.id;this.name;this.description}function Application(){this.id;this.description}function BadgeDefinitionData(){this.id;this.name;this.description;this.iconUrl;this.sortOrder;this.actionCount;this.isActive;this.individualTypeCode;this.iniUser;this.iniDate}function RankDefinitionData(){this.id;this.name;this.description;this.iconUrl;this.minPoints;this.isActive;this.individualTypeCode;this.iniUser;this.iniDate}function MapOfCitiesToFacilities(){this.comparer;this.count;this.keys;this.values;this.item}function City(){this.name;this.state}function MapOfCountiesToFacilities(){this.comparer;this.count;this.keys;this.values;this.item}function MapOfDistrictIdentitiesToFacilities(){this.comparer;this.count;this.keys;this.values;this.item}function MapOfStatesToFacilities(){this.comparer;this.count;this.keys;this.values;this.item}function MapOfZipCodesToFacilities(){this.comparer;this.count;this.keys;this.values;this.item}function GeolocationData(){this.latitude;this.longitude;this.city;this.region;this.regionCode;this.postalCode;this.country;this.countryCode;this.metroCode;this.timeZone;this.continent;this.continentCode}function KeyContactSurveyResult(){this.id;this.contact;this.electedOfficialId;this.text;this.date;this.affiliationLevel;this.affiliation}function KeyContactSurveyData(){this.advocateId;this.electedOfficialId;this.text;this.affiliationLevelId;this.affiliationId}function Participation(){this.id;this.date;this.activityId;this.activityName;this.advocateId}function CustomActivity(){this.id;this.path;this.name;this.description;this.startDate;this.endDate}function RegistrationResult(){this.registrant;this.advocateAlreadyExisted}function RegistrationData(){this.registrant;this.registrationDate;this.userName;this.password;this.registrationSourceId;this.campaignAdId;this.medium;this.termContent;this.adUnit;this.uRL;this.friendID;this.dedupeOperations}function SamlValidationResult(){this.advocate;this.destinationUrl}function SamlAuthenticationRequest(){this.consumerService;this.value;this.relayStateToken}function State(){this.code;this.name}function Ethnicity(){this.id;this.name}function Party(){this.id;this.name}function Subset(){this.id;this.compositeKey;this.name}function AdvocateGroup(){this.code;this.description;this.typeCollection}function AdvocateType(){this.code;this.description}function CommitteeType(){this.code;this.description}function Chamber(){this.code;this.description}function Affiliation(){this.id;this.description;this.sortOrder}function AffiliationLevel(){this.id;this.description;this.sortOrder}function UserDefinedFieldName(){this.fieldNumber;this.fieldLabel}function Note(){this.id;this.subject;this.text;this.date}function TellAFriendData(){this.emailBody;this.friendIdReplacementToken;this.subject;this.recipients}function Contact(){this.displayName;this.emailAddress}function RegistrationAdvocateAssignment(){this.friendId;this.individualId;this.activityId;this.reactionId;this.friendIndividualId}function TrackingDetail(){this.device;this.request;this.identity;this.customAttributes;this.userAgentString}function UdfEntityType(){this.name}function MapOfEntityIdsToUserDefinedFields(){this.comparer;this.count;this.keys;this.values;this.item}function MapOfEntityIdsToUdfValues(){this.comparer;this.count;this.keys;this.values;this.item}function UdfValue(){this.entityType;this.fieldNumber;this.entityId;this.value}function AdvocateParticipationActivityType(){}function OfflineActivity(){this.id;this.path;this.name;this.description;this.startDate;this.endDate;this.action}function Email(){this.fromAddress;this.replyTo;this.blindCarbonCopyRecipients;this.carbonCopyRecipients;this.recipients;this.subject;this.body}function EmailLocation(){}function AdditionalInformation(){this.generalAdvocateData;this.recipientSolicitedAdvocateDataCollection}function AddressMetaData(){this.congressionalDistrict;this.stateSenateDistrict;this.stateHouseDistrict;this.latitude;this.longitude;this.dmaCode;this.cityCode;this.cityCodeDescription;this.newCongressionalDistrict;this.newStateSenateDistrict;this.newStateHouseDistrict}function OfficeMetadata(){this.phoneNumber;this.phoneNumberExtension;this.faxNumber;this.emailAddress;this.contactWebForm;this.website}function Biography(){this.text;this.previousOccupation1;this.previousOccupation2;this.spouseName;this.maritalStatus;this.familyMembers;this.religion}function EmailValidationCode(){}function PostalLocation(){}function DedupeOperations(){this.typesToRemove}function TrackingDevice(){this.name;this.browser;this.language;this.supportedLanguages;this.operatingSystem}function TrackingBrowser(){this.name;this.codeName;this.fullVersion;this.versionMajor;this.versionMinor;this.versionPatch;this.doNotTrack;this.areCookiesEnabled}function TrackingOperatingSystem(){this.name;this.platform;this.cpuClass;this.oSCpu;this.versionMajor;this.versionMinor;this.versionPatch;this.versionPatchMinor}function TrackingRequest(){this.headers;this.ipAddress;this.forwardedForIp;this.referrer;this.url}function TrackingIdentity(){this.trackingId;this.advocateId}function Action(){this.id;this.name;this.type}function ActionType(){}function Content(){this.html;this.text}function AddressCorrectionService(){this.findStateCode=function(n,t,i){var r={},u;r.zip=n;u=PublicAffairs.url+"AddressCorrection/FindStateCode";pa_api_request(u,r,function(n){t(n.findStateCodeResult)},function(n){i(n)})}}function AdvocatePasswordResetService(){this.sendResetPasswordEmail=function(n,t,i,r,u,f){var e={},o;e.userName=n;e.resetPasswordURL=t;e.mergeFieldToReplace=i;e.websiteName=r;o=PublicAffairs.url+"AdvocatePasswordReset/SendResetPasswordEmail";pa_api_request(o,e,function(){u()},function(n){f(n)})};this.resetPassword=function(n,t,i){var r={},u;r.resetPasswordData=n;u=PublicAffairs.url+"AdvocatePasswordReset/ResetPassword";pa_api_request(u,r,function(){t()},function(n){i(n)})}}function AdvocateProfileService(){this.getAdvocateProfile=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"AdvocateProfile/GetAdvocateProfile";pa_api_request(u,r,function(n){t(n.getAdvocateProfileResult)},function(n){i(n)})};this.updateAdvocateProfile=function(n,t,i){var r={},u;r.update=n;u=PublicAffairs.url+"AdvocateProfile/UpdateAdvocateProfile";pa_api_request(u,r,function(n){t(n.updateAdvocateProfileResult)},function(n){i(n)})}}function AdvocateService(){this.findAdvocateById=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"Advocate/FindAdvocateById";pa_api_request(u,r,function(n){t(n.findAdvocateByIdResult)},function(n){i(n)})};this.findAdvocateByOtherId=function(n,t,i){var r={},u;r.otherId=n;u=PublicAffairs.url+"Advocate/FindAdvocateByOtherId";pa_api_request(u,r,function(n){t(n.findAdvocateByOtherIdResult)},function(n){i(n)})};this.findAdvocateByFacebookId=function(n,t,i){var r={},u;r.facebookId=n;u=PublicAffairs.url+"Advocate/FindAdvocateByFacebookId";pa_api_request(u,r,function(n){t(n.findAdvocateByFacebookIdResult)},function(n){i(n)})};this.findAdvocateByEmailAddress=function(n,t,i){var r={},u;r.emailAddress=n;u=PublicAffairs.url+"Advocate/FindAdvocateByEmailAddress";pa_api_request(u,r,function(n){t(n.findAdvocateByEmailAddressResult)},function(n){i(n)})};this.findAdvocateByUniqueUdf=function(n,t,i,r){var u={},f;u.udfValue=n;u.udfNumber=t;f=PublicAffairs.url+"Advocate/FindAdvocateByUniqueUdf";pa_api_request(f,u,function(n){i(n.findAdvocateByUniqueUdfResult)},function(n){r(n)})};this.validateAdvocateCredentials=function(n,t,i){var r={},u;r.credentials=n;u=PublicAffairs.url+"Advocate/ValidateAdvocateCredentials";pa_api_request(u,r,function(n){t(n.validateAdvocateCredentialsResult)},function(n){i(n)})};this.addAdvocate=function(n,t,i){var r={},u;r.advocate=n;u=PublicAffairs.url+"Advocate/AddAdvocate";pa_api_request(u,r,function(n){t(n.addAdvocateResult)},function(n){i(n)})};this.addGroupAssociationsToAdvocate=function(n,t,i,r){var u={},f;u.advocateId=n;u.groupAssociations=t;f=PublicAffairs.url+"Advocate/AddGroupAssociationsToAdvocate";pa_api_request(f,u,function(n){i(n.addGroupAssociationsToAdvocateResult)},function(n){r(n)})};this.removeGroupAssociationsFromAdvocate=function(n,t,i,r){var u={},f;u.advocateId=n;u.groupAssociations=t;f=PublicAffairs.url+"Advocate/RemoveGroupAssociationsFromAdvocate";pa_api_request(f,u,function(n){i(n.removeGroupAssociationsFromAdvocateResult)},function(n){r(n)})};this.setSingleUserDefinedFieldForAdvocate=function(n,t,i,r,u){var f={},e;f.advocateId=n;f.udfNumber=t;f.udfValue=i;e=PublicAffairs.url+"Advocate/SetSingleUserDefinedFieldForAdvocate";pa_api_request(e,f,function(n){r(n.setSingleUserDefinedFieldForAdvocateResult)},function(n){u(n)})};this.setUserDefinedFieldsForAdvocate=function(n,t,i,r){var u={},f;u.advocateId=n;u.udfs=t;f=PublicAffairs.url+"Advocate/SetUserDefinedFieldsForAdvocate";pa_api_request(f,u,function(n){i(n.setUserDefinedFieldsForAdvocateResult)},function(n){r(n)})};this.updateAdvocate=function(n,t,i){var r={},u;r.advocate=n;u=PublicAffairs.url+"Advocate/UpdateAdvocate";pa_api_request(u,r,function(n){t(n.updateAdvocateResult)},function(n){i(n)})};this.updateCredentialsForAdvocate=function(n,t,i,r,u){var f={},e;f.advocateId=n;f.currentCredentials=t;f.newCredentials=i;e=PublicAffairs.url+"Advocate/UpdateCredentialsForAdvocate";pa_api_request(e,f,function(){r()},function(n){u(n)})}}function AlertDashboardService(){this.getAlertPerformanceById=function(n,t,i){var r={},u;r.alertId=n;u=PublicAffairs.url+"AlertDashboard/GetAlertPerformanceById";pa_api_request(u,r,function(n){t(n.getAlertPerformanceByIdResult)},function(n){i(n)})};this.getAlertPerformancesByCampaignTreeLocation=function(n,t,i,r){var u={},f;u.campaignTreeLevel=n;u.id=t;f=PublicAffairs.url+"AlertDashboard/GetAlertPerformancesByCampaignTreeLocation";pa_api_request(f,u,function(n){i(n.getAlertPerformancesByCampaignTreeLocationResult)},function(n){r(n)})};this.getActivationsByDayForRecentAlerts=function(n,t,i,r,u){var f={},e;f.subsetCompositeKey=n;f.startDate=t;f.endDate=i;e=PublicAffairs.url+"AlertDashboard/GetActivationsByDayForRecentAlerts";pa_api_request(e,f,function(n){r(n.getActivationsByDayForRecentAlertsResult)},function(n){u(n)})};this.getAlertPerformanceGraphMetrics=function(n,t,i){var r={},u;r.alertId=n;u=PublicAffairs.url+"AlertDashboard/GetAlertPerformanceGraphMetrics";pa_api_request(u,r,function(n){t(n.getAlertPerformanceGraphMetricsResult)},function(n){i(n)})};this.getActivationsByDayForCampaign=function(n,t,i,r,u){var f={},e;f.campaignId=n;f.startDate=t;f.endDate=i;e=PublicAffairs.url+"AlertDashboard/GetActivationsByDayForCampaign";pa_api_request(e,f,function(n){r(n.getActivationsByDayForCampaignResult)},function(n){u(n)})}}function AssetService(){this.getAssetsByState=function(n,t,i){var r={},u;r.stateCode=n;u=PublicAffairs.url+"Asset/GetAssetsByState";pa_api_request(u,r,function(n){t(n.getAssetsByStateResult)},function(n){i(n)})};this.getAssetsByDistrict=function(n,t,i){var r={},u;r.district=n;u=PublicAffairs.url+"Asset/GetAssetsByDistrict";pa_api_request(u,r,function(n){t(n.getAssetsByDistrictResult)},function(n){i(n)})};this.getAssetsByCounties=function(n,t,i){var r={},u;r.counties=n;u=PublicAffairs.url+"Asset/GetAssetsByCounties";pa_api_request(u,r,function(n){t(n.getAssetsByCountiesResult)},function(n){i(n)})};this.getAssetsByCounty=function(n,t,i){var r={},u;r.county=n;u=PublicAffairs.url+"Asset/GetAssetsByCounty";pa_api_request(u,r,function(n){t(n.getAssetsByCountyResult)},function(n){i(n)})};this.getAssetByNameAndDistrict=function(n,t,i,r){var u={},f;u.assetName=n;u.district=t;f=PublicAffairs.url+"Asset/GetAssetByNameAndDistrict";pa_api_request(f,u,function(n){i(n.getAssetByNameAndDistrictResult)},function(n){r(n)})};this.getAssetsByDistricts=function(n,t,i){var r={},u;r.districts=n;u=PublicAffairs.url+"Asset/GetAssetsByDistricts";pa_api_request(u,r,function(n){t(n.getAssetsByDistrictsResult)},function(n){i(n)})};this.getAssetsByStates=function(n,t,i){var r={},u;r.states=n;u=PublicAffairs.url+"Asset/GetAssetsByStates";pa_api_request(u,r,function(n){t(n.getAssetsByStatesResult)},function(n){i(n)})};this.getActiveMembersCountByAddressTypeAndDistrict=function(n,t,i,r){var u={},f;u.addressType=n;u.district=t;f=PublicAffairs.url+"Asset/GetActiveMembersCountByAddressTypeAndDistrict";pa_api_request(f,u,function(n){i(n.getActiveMembersCountByAddressTypeAndDistrictResult)},function(n){r(n)})}}function CallToActionSearchService(){this.findCallsToActionBySearchData=function(n,t,i){var r={},u;r.searchData=n;u=PublicAffairs.url+"CallToActionSearch/FindCallsToActionBySearchData";pa_api_request(u,r,function(n){t(n.findCallsToActionBySearchDataResult)},function(n){i(n)})};this.findCallsToActionBySearchDataAndCampaignPaths=function(n,t,i,r){var u={},f;u.searchData=n;u.paths=t;f=PublicAffairs.url+"CallToActionSearch/FindCallsToActionBySearchDataAndCampaignPaths";pa_api_request(f,u,function(n){i(n.findCallsToActionBySearchDataAndCampaignPathsResult)},function(n){r(n)})};this.findCallsToAction=function(n,t){var i=PublicAffairs.url+"CallToActionSearch/FindCallsToAction";pa_api_request(i,{},function(t){n(t.findCallsToActionResult)},function(n){t(n)})};this.findCallsToActionByAdvocate=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"CallToActionSearch/FindCallsToActionByAdvocate";pa_api_request(u,r,function(n){t(n.findCallsToActionByAdvocateResult)},function(n){i(n)})};this.findCallsToActionByDisplayType=function(n,t,i){var r={},u;r.displayType=n;u=PublicAffairs.url+"CallToActionSearch/FindCallsToActionByDisplayType";pa_api_request(u,r,function(n){t(n.findCallsToActionByDisplayTypeResult)},function(n){i(n)})};this.findCallsToActionByAdvocateAndDisplayType=function(n,t,i,r){var u={},f;u.advocateId=n;u.displayType=t;f=PublicAffairs.url+"CallToActionSearch/FindCallsToActionByAdvocateAndDisplayType";pa_api_request(f,u,function(n){i(n.findCallsToActionByAdvocateAndDisplayTypeResult)},function(n){r(n)})};this.findCallsToActionByTags=function(n,t,i,r){var u={},f;u.tags=n;u.useAndOperator=t;f=PublicAffairs.url+"CallToActionSearch/FindCallsToActionByTags";pa_api_request(f,u,function(n){i(n.findCallsToActionByTagsResult)},function(n){r(n)})};this.findCallsToActionByFormat=function(n,t,i){var r={},u;r.formats=n;u=PublicAffairs.url+"CallToActionSearch/FindCallsToActionByFormat";pa_api_request(u,r,function(n){t(n.findCallsToActionByFormatResult)},function(n){i(n)})};this.findCallsToActionForAdvocateByFormat=function(n,t,i,r){var u={},f;u.advocateId=n;u.formats=t;f=PublicAffairs.url+"CallToActionSearch/FindCallsToActionForAdvocateByFormat";pa_api_request(f,u,function(n){i(n.findCallsToActionForAdvocateByFormatResult)},function(n){r(n)})};this.findCallsToActionWithPreview=function(n,t){var i=PublicAffairs.url+"CallToActionSearch/FindCallsToActionWithPreview";pa_api_request(i,{},function(t){n(t.findCallsToActionWithPreviewResult)},function(n){t(n)})};this.findCallsToActionWithPreviewByAdvocate=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"CallToActionSearch/FindCallsToActionWithPreviewByAdvocate";pa_api_request(u,r,function(n){t(n.findCallsToActionWithPreviewByAdvocateResult)},function(n){i(n)})};this.findCallsToActionByStateCampaign=function(n,t,i,r){var u={},f;u.issue=n;u.stateCode=t;f=PublicAffairs.url+"CallToActionSearch/FindCallsToActionByStateCampaign";pa_api_request(f,u,function(n){i(n.findCallsToActionByStateCampaignResult)},function(n){r(n)})};this.findCallsToActionByStateProject=function(n,t,i,r,u){var f={},e;f.issue=n;f.campaign=t;f.stateCode=i;e=PublicAffairs.url+"CallToActionSearch/FindCallsToActionByStateProject";pa_api_request(e,f,function(n){r(n.findCallsToActionByStateProjectResult)},function(n){u(n)})};this.findCallsToActionByAdvocateAndStateCampaign=function(n,t,i,r,u){var f={},e;f.issue=n;f.stateCode=t;f.advocateId=i;e=PublicAffairs.url+"CallToActionSearch/FindCallsToActionByAdvocateAndStateCampaign";pa_api_request(e,f,function(n){r(n.findCallsToActionByAdvocateAndStateCampaignResult)},function(n){u(n)})};this.findCallsToActionByAdvocateAndStateProject=function(n,t,i,r,u,f){var e={},o;e.issue=n;e.campaign=t;e.stateCode=i;e.advocateId=r;o=PublicAffairs.url+"CallToActionSearch/FindCallsToActionByAdvocateAndStateProject";pa_api_request(o,e,function(n){u(n.findCallsToActionByAdvocateAndStateProjectResult)},function(n){f(n)})}}function CallToActionService(){this.doesCallToActionExist=function(n,t,i){var r={},u;r.callToActionId=n;u=PublicAffairs.url+"CallToAction/DoesCallToActionExist";pa_api_request(u,r,function(n){t(n.doesCallToActionExistResult)},function(n){i(n)})};this.getCallToActionDetailForAdvocate=function(n,t,i,r){var u={},f;u.callToActionId=n;u.advocateId=t;f=PublicAffairs.url+"CallToAction/GetCallToActionDetailForAdvocate";pa_api_request(f,u,function(n){i(n.getCallToActionDetailForAdvocateResult)},function(n){r(n)})};this.getCallToActionDetailForAdvocateWithAdditionalInformation=function(n,t,i,r){var u={},f;u.callToActionId=n;u.advocateId=t;f=PublicAffairs.url+"CallToAction/GetCallToActionDetailForAdvocateWithAdditionalInformation";pa_api_request(f,u,function(n){i(n.getCallToActionDetailForAdvocateWithAdditionalInformationResult)},function(n){r(n)})};this.getCallToActionDetailForAdvocateByRecipients=function(n,t,i,r,u){var f={},e;f.callToActionId=n;f.advocateId=t;f.selectedRecipients=i;e=PublicAffairs.url+"CallToAction/GetCallToActionDetailForAdvocateByRecipients";pa_api_request(e,f,function(n){r(n.getCallToActionDetailForAdvocateByRecipientsResult)},function(n){u(n)})};this.getCallToAction=function(n,t,i){var r={},u;r.callToActionId=n;u=PublicAffairs.url+"CallToAction/GetCallToAction";pa_api_request(u,r,function(n){t(n.getCallToActionResult)},function(n){i(n)})};this.getCompletedCallsToActionForAdvocate=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"CallToAction/GetCompletedCallsToActionForAdvocate";pa_api_request(u,r,function(n){t(n.getCompletedCallsToActionForAdvocateResult)},function(n){i(n)})};this.findCallsToActionByCommunicationChannels=function(n,t,i,r){var u={},f;u.channelTypes=n;u.subset=t;f=PublicAffairs.url+"CallToAction/FindCallsToActionByCommunicationChannels";pa_api_request(f,u,function(n){i(n.findCallsToActionByCommunicationChannelsResult)},function(n){r(n)})};this.takeActionForAdvocate=function(n,t,i,r){var u={},f;u.advocateId=n;u.actionData=t;f=PublicAffairs.url+"CallToAction/TakeActionForAdvocate";pa_api_request(f,u,function(n){i(n.takeActionForAdvocateResult)},function(n){r(n)})};this.takeActionForAdvocateWithAdditionalInformation=function(n,t,i,r,u){var f={},e;f.advocateId=n;f.actionData=t;f.additionalInformationDataCollection=i;e=PublicAffairs.url+"CallToAction/TakeActionForAdvocateWithAdditionalInformation";pa_api_request(e,f,function(n){r(n.takeActionForAdvocateWithAdditionalInformationResult)},function(n){u(n)})};this.addResponse=function(n,t,i,r){var u={},f;u.takeActionId=n;u.response=t;f=PublicAffairs.url+"CallToAction/AddResponse";pa_api_request(f,u,function(){i()},function(n){r(n)})};this.getCompletedTakeActionResult=function(n,t,i){var r={},u;r.takeActionResultId=n;u=PublicAffairs.url+"CallToAction/GetCompletedTakeActionResult";pa_api_request(u,r,function(n){t(n.getCompletedTakeActionResultResult)},function(n){i(n)})};this.submitAdditionalCallToActionInformation=function(n,t,i,r){var u={},f;u.takeActionId=n;u.additionalInformationDataCollection=t;f=PublicAffairs.url+"CallToAction/SubmitAdditionalCallToActionInformation";pa_api_request(f,u,function(n){i(n.submitAdditionalCallToActionInformationResult)},function(n){r(n)})};this.getFacilitiesByCallToActionAndAdvocate=function(n,t,i,r){var u={},f;u.callToActionId=n;u.advocateId=t;f=PublicAffairs.url+"CallToAction/GetFacilitiesByCallToActionAndAdvocate";pa_api_request(f,u,function(n){i(n.getFacilitiesByCallToActionAndAdvocateResult)},function(n){r(n)})}}function CandidateService(){}function CaptchaService(){this.getCaptcha=function(n,t){var i=PublicAffairs.url+"Captcha/GetCaptcha";pa_api_request(i,{},function(t){n(t.getCaptchaResult)},function(n){t(n)})};this.getCaptchaByChallengeId=function(n,t,i){var r={},u;r.challengeId=n;u=PublicAffairs.url+"Captcha/GetCaptchaByChallengeId";pa_api_request(u,r,function(n){t(n.getCaptchaByChallengeIdResult)},function(n){i(n)})};this.submitResponseToCaptcha=function(n,t,i){var r={},u;r.captchaResponse=n;u=PublicAffairs.url+"Captcha/SubmitResponseToCaptcha";pa_api_request(u,r,function(n){t(n.submitResponseToCaptchaResult)},function(n){i(n)})}}function CommitteeService(){this.findFederalCommittees=function(n,t,i){var r={},u;r.committeeTypes=n;u=PublicAffairs.url+"Committee/FindFederalCommittees";pa_api_request(u,r,function(n){t(n.findFederalCommitteesResult)},function(n){i(n)})};this.findStateCommittees=function(n,t,i,r){var u={},f;u.committeeTypes=n;u.stateCode=t;f=PublicAffairs.url+"Committee/FindStateCommittees";pa_api_request(f,u,function(n){i(n.findStateCommitteesResult)},function(n){r(n)})};this.findCommitteeById=function(n,t,i){var r={},u;r.committeeId=n;u=PublicAffairs.url+"Committee/FindCommitteeById";pa_api_request(u,r,function(n){t(n.findCommitteeByIdResult)},function(n){i(n)})}}function DistrictService(){this.findDistrictResult=function(n,t,i){var r={},u;r.postalAddress=n;u=PublicAffairs.url+"District/FindDistrictResult";pa_api_request(u,r,function(n){t(n.findDistrictResultResult)},function(n){i(n)})};this.findDistrictDetailsByStates=function(n,t,i){var r={},u;r.stateCodes=n;u=PublicAffairs.url+"District/FindDistrictDetailsByStates";pa_api_request(u,r,function(n){t(n.findDistrictDetailsByStatesResult)},function(n){i(n)})};this.findDistrictDetailsByStatesAndChambers=function(n,t,i,r){var u={},f;u.stateCodes=n;u.chamberCodes=t;f=PublicAffairs.url+"District/FindDistrictDetailsByStatesAndChambers";pa_api_request(f,u,function(n){i(n.findDistrictDetailsByStatesAndChambersResult)},function(n){r(n)})}}function ElectedOfficialSearchService(){this.findElectedOfficialIdentitiesByPartialAddressAndChambers=function(n,t,i,r){var u={},f;u.address=n;u.chamberCodes=t;f=PublicAffairs.url+"ElectedOfficialSearch/FindElectedOfficialIdentitiesByPartialAddressAndChambers";pa_api_request(f,u,function(n){i(n.findElectedOfficialIdentitiesByPartialAddressAndChambersResult)},function(n){r(n)})};this.findElectedOfficialsByFullAddressAndChambers=function(n,t,i,r){var u={},f;u.address=n;u.chamberCodes=t;f=PublicAffairs.url+"ElectedOfficialSearch/FindElectedOfficialsByFullAddressAndChambers";pa_api_request(f,u,function(n){i(n.findElectedOfficialsByFullAddressAndChambersResult)},function(n){r(n)})};this.findElectedOfficialsByZipCodeAndChambers=function(n,t,i,r){var u={},f;u.zipCode=n;u.chamberCodes=t;f=PublicAffairs.url+"ElectedOfficialSearch/FindElectedOfficialsByZipCodeAndChambers";pa_api_request(f,u,function(n){i(n.findElectedOfficialsByZipCodeAndChambersResult)},function(n){r(n)})};this.findElectedOfficialsByStateCodeAndChambers=function(n,t,i,r){var u={},f;u.stateCode=n;u.chamberCodes=t;f=PublicAffairs.url+"ElectedOfficialSearch/FindElectedOfficialsByStateCodeAndChambers";pa_api_request(f,u,function(n){i(n.findElectedOfficialsByStateCodeAndChambersResult)},function(n){r(n)})}}function ElectedOfficialService(){this.getElectedOfficialFromMasterRepository=function(n,t,i){var r={},u;r.officialId=n;u=PublicAffairs.url+"ElectedOfficial/GetElectedOfficialFromMasterRepository";pa_api_request(u,r,function(n){t(n.getElectedOfficialFromMasterRepositoryResult)},function(n){i(n)})};this.getElectedOfficialsFromMasterRepository=function(n,t,i){var r={},u;r.address=n;u=PublicAffairs.url+"ElectedOfficial/GetElectedOfficialsFromMasterRepository";pa_api_request(u,r,function(n){t(n.getElectedOfficialsFromMasterRepositoryResult)},function(n){i(n)})};this.getElectedOfficialIdentities=function(n,t){var i=PublicAffairs.url+"ElectedOfficial/GetElectedOfficialIdentities";pa_api_request(i,{},function(t){n(t.getElectedOfficialIdentitiesResult)},function(n){t(n)})};this.getElectedOfficialIdentityById=function(n,t,i){var r={},u;r.electedOfficialId=n;u=PublicAffairs.url+"ElectedOfficial/GetElectedOfficialIdentityById";pa_api_request(u,r,function(n){t(n.getElectedOfficialIdentityByIdResult)},function(n){i(n)})};this.getElectedOfficialIdentitiesByIds=function(n,t,i){var r={},u;r.electedOfficialIds=n;u=PublicAffairs.url+"ElectedOfficial/GetElectedOfficialIdentitiesByIds";pa_api_request(u,r,function(n){t(n.getElectedOfficialIdentitiesByIdsResult)},function(n){i(n)})};this.getElectedOfficialIdentitiesFromMasterRepository=function(n,t,i){var r={},u;r.address=n;u=PublicAffairs.url+"ElectedOfficial/GetElectedOfficialIdentitiesFromMasterRepository";pa_api_request(u,r,function(n){t(n.getElectedOfficialIdentitiesFromMasterRepositoryResult)},function(n){i(n)})};this.findElectedOfficialIdentitiesByStates=function(n,t,i){var r={},u;r.stateCodes=n;u=PublicAffairs.url+"ElectedOfficial/FindElectedOfficialIdentitiesByStates";pa_api_request(u,r,function(n){t(n.findElectedOfficialIdentitiesByStatesResult)},function(n){i(n)})};this.findElectedOfficialIdentitiesByStatesAndChambers=function(n,t,i,r){var u={},f;u.stateCodes=n;u.chamberCodes=t;f=PublicAffairs.url+"ElectedOfficial/FindElectedOfficialIdentitiesByStatesAndChambers";pa_api_request(f,u,function(n){i(n.findElectedOfficialIdentitiesByStatesAndChambersResult)},function(n){r(n)})};this.getElectedOfficialUserDefinedFields=function(n,t,i){var r={},u;r.electedOfficialId=n;u=PublicAffairs.url+"ElectedOfficial/GetElectedOfficialUserDefinedFields";pa_api_request(u,r,function(n){t(n.getElectedOfficialUserDefinedFieldsResult)},function(n){i(n)})};this.getElectedOfficialDetail=function(n,t,i,r){var u={},f;u.electedOfficialId=n;u.advocateSubsetId=t;f=PublicAffairs.url+"ElectedOfficial/GetElectedOfficialDetail";pa_api_request(f,u,function(n){i(n.getElectedOfficialDetailResult)},function(n){r(n)})};this.findCommitteesAndPositionsByElectedOfficial=function(n,t,i){var r={},u;r.electedOfficialId=n;u=PublicAffairs.url+"ElectedOfficial/FindCommitteesAndPositionsByElectedOfficial";pa_api_request(u,r,function(n){t(n.findCommitteesAndPositionsByElectedOfficialResult)},function(n){i(n)})};this.listDistrictsByStateAndChamber=function(n,t,i,r){var u={},f;u.stateCode=n;u.chamberCode=t;f=PublicAffairs.url+"ElectedOfficial/ListDistrictsByStateAndChamber";pa_api_request(f,u,function(n){i(n.listDistrictsByStateAndChamberResult)},function(n){r(n)})}}function ElectionService(){this.listElectionTypes=function(n,t){var i=PublicAffairs.url+"Election/ListElectionTypes";pa_api_request(i,{},function(t){n(t.listElectionTypesResult)},function(n){t(n)})};this.findElection=function(n,t,i,r,u){var f={},e;f.stateCode=n;f.electionYear=t;f.electionTypeId=i;e=PublicAffairs.url+"Election/FindElection";pa_api_request(e,f,function(n){r(n.findElectionResult)},function(n){u(n)})};this.findElectionResourcesForState=function(n,t,i){var r={},u;r.stateCode=n;u=PublicAffairs.url+"Election/FindElectionResourcesForState";pa_api_request(u,r,function(n){t(n.findElectionResourcesForStateResult)},function(n){i(n)})};this.listElectionDeadlineTypes=function(n,t){var i=PublicAffairs.url+"Election/ListElectionDeadlineTypes";pa_api_request(i,{},function(t){n(t.listElectionDeadlineTypesResult)},function(n){t(n)})}}function EmailService(){this.sendEmailByTypeAndAdvocateIdWithMergeFields=function(n,t,i,r,u){var f={},e;f.emailType=n;f.advocateId=t;f.mergeFields=i;e=PublicAffairs.url+"Email/SendEmailByTypeAndAdvocateIdWithMergeFields";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.sendEmailByTypeAndAdvocateId=function(n,t,i,r){var u={},f;u.emailType=n;u.advocateId=t;f=PublicAffairs.url+"Email/SendEmailByTypeAndAdvocateId";pa_api_request(f,u,function(){i()},function(n){r(n)})};this.sendEmailByTypeAndEmailAddress=function(n,t,i,r,u){var f={},e;f.emailType=n;f.emailAddress=t;f.recipientDisplayName=i;e=PublicAffairs.url+"Email/SendEmailByTypeAndEmailAddress";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.listWebsiteEmails=function(n,t){var i=PublicAffairs.url+"Email/ListWebsiteEmails";pa_api_request(i,{},function(t){n(t.listWebsiteEmailsResult)},function(n){t(n)})};this.sendEmailByNameAndAdvocateIdWithMergeFields=function(n,t,i,r,u){var f={},e;f.name=n;f.advocateId=t;f.mergeFields=i;e=PublicAffairs.url+"Email/SendEmailByNameAndAdvocateIdWithMergeFields";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.sendEmailByIdAndAdvocateIdWithMergeFields=function(n,t,i,r,u){var f={},e;f.websiteEmailId=n;f.advocateId=t;f.mergeFields=i;e=PublicAffairs.url+"Email/SendEmailByIdAndAdvocateIdWithMergeFields";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.sendEmailByNameAndAdvocateId=function(n,t,i,r){var u={},f;u.name=n;u.advocateId=t;f=PublicAffairs.url+"Email/SendEmailByNameAndAdvocateId";pa_api_request(f,u,function(){i()},function(n){r(n)})}}function EmailValidationService(){this.validate=function(n,t,i){var r={},u;r.email=n;u=PublicAffairs.url+"EmailValidation/Validate";pa_api_request(u,r,function(n){t(n.validateResult)},function(n){i(n)})}}function EngagementService(){this.recordAction=function(n,t,i,r,u){var f={},e;f.advocateId=n;f.applicationId=t;f.trackedActionId=i;e=PublicAffairs.url+"Engagement/RecordAction";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.recordBadges=function(n,t,i,r,u){var f={},e;f.advocateId=n;f.applicationId=t;f.trackedActionId=i;e=PublicAffairs.url+"Engagement/RecordBadges";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.recordRankPoints=function(n,t,i,r,u){var f={},e;f.advocateId=n;f.applicationId=t;f.trackedActionId=i;e=PublicAffairs.url+"Engagement/RecordRankPoints";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.getAdvocateEngagement=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"Engagement/GetAdvocateEngagement";pa_api_request(u,r,function(n){t(n.getAdvocateEngagementResult)},function(n){i(n)})};this.getAdvocateRank=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"Engagement/GetAdvocateRank";pa_api_request(u,r,function(n){t(n.getAdvocateRankResult)},function(n){i(n)})};this.getNextAdvocateRank=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"Engagement/GetNextAdvocateRank";pa_api_request(u,r,function(n){t(n.getNextAdvocateRankResult)},function(n){i(n)})};this.getAdvocatePoints=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"Engagement/GetAdvocatePoints";pa_api_request(u,r,function(n){t(n.getAdvocatePointsResult)},function(n){i(n)})};this.getAdvocateBadges=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"Engagement/GetAdvocateBadges";pa_api_request(u,r,function(n){t(n.getAdvocateBadgesResult)},function(n){i(n)})};this.getEngagementLeaders=function(n,t,i){var r={},u;r.numberOfLeaders=n;u=PublicAffairs.url+"Engagement/GetEngagementLeaders";pa_api_request(u,r,function(n){t(n.getEngagementLeadersResult)},function(n){i(n)})}}function EngagementSetupService(){this.addBadgeDefinition=function(n,t,i){var r={},u;r.newBadgeData=n;u=PublicAffairs.url+"EngagementSetup/AddBadgeDefinition";pa_api_request(u,r,function(){t()},function(n){i(n)})};this.addRankDefinition=function(n,t,i){var r={},u;r.newRankData=n;u=PublicAffairs.url+"EngagementSetup/AddRankDefinition";pa_api_request(u,r,function(){t()},function(n){i(n)})};this.addTrackedAction=function(n,t,i,r){var u={},f;u.name=n;u.description=t;f=PublicAffairs.url+"EngagementSetup/AddTrackedAction";pa_api_request(f,u,function(){i()},function(n){r(n)})};this.getTrackedAction=function(n,t,i){var r={},u;r.id=n;u=PublicAffairs.url+"EngagementSetup/GetTrackedAction";pa_api_request(u,r,function(n){t(n.getTrackedActionResult)},function(n){i(n)})};this.getApplication=function(n,t,i){var r={},u;r.id=n;u=PublicAffairs.url+"EngagementSetup/GetApplication";pa_api_request(u,r,function(n){t(n.getApplicationResult)},function(n){i(n)})};this.getBadgeDefinition=function(n,t,i){var r={},u;r.id=n;u=PublicAffairs.url+"EngagementSetup/GetBadgeDefinition";pa_api_request(u,r,function(n){t(n.getBadgeDefinitionResult)},function(n){i(n)})};this.getRankDefinition=function(n,t,i){var r={},u;r.id=n;u=PublicAffairs.url+"EngagementSetup/GetRankDefinition";pa_api_request(u,r,function(n){t(n.getRankDefinitionResult)},function(n){i(n)})};this.getPointsForAction=function(n,t,i,r){var u={},f;u.applicationId=n;u.trackedActionId=t;f=PublicAffairs.url+"EngagementSetup/GetPointsForAction";pa_api_request(f,u,function(n){i(n.getPointsForActionResult)},function(n){r(n)})};this.getBadgesForAction=function(n,t,i,r){var u={},f;u.applicationId=n;u.trackedActionId=t;f=PublicAffairs.url+"EngagementSetup/GetBadgesForAction";pa_api_request(f,u,function(n){i(n.getBadgesForActionResult)},function(n){r(n)})};this.setPointsForAction=function(n,t,i,r,u){var f={},e;f.applicationId=n;f.trackedActionId=t;f.pointValue=i;e=PublicAffairs.url+"EngagementSetup/SetPointsForAction";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.addBadgeForAction=function(n,t,i,r,u){var f={},e;f.applicationId=n;f.trackedActionId=t;f.badgeDefinitionId=i;e=PublicAffairs.url+"EngagementSetup/AddBadgeForAction";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.removeBadgeForAction=function(n,t,i,r,u){var f={},e;f.applicationId=n;f.trackedActionId=t;f.badgeDefinitionId=i;e=PublicAffairs.url+"EngagementSetup/RemoveBadgeForAction";pa_api_request(e,f,function(){r()},function(n){u(n)})};this.setBadgeActive=function(n,t,i,r){var u={},f;u.badgeId=n;u.active=t;f=PublicAffairs.url+"EngagementSetup/SetBadgeActive";pa_api_request(f,u,function(){i()},function(n){r(n)})};this.setRankActive=function(n,t,i,r){var u={},f;u.rankId=n;u.active=t;f=PublicAffairs.url+"EngagementSetup/SetRankActive";pa_api_request(f,u,function(){i()},function(n){r(n)})}}function FacilityService(){this.findFacilityById=function(n,t,i){var r={},u;r.id=n;u=PublicAffairs.url+"Facility/FindFacilityById";pa_api_request(u,r,function(n){t(n.findFacilityByIdResult)},function(n){i(n)})};this.findFacilitiesByIds=function(n,t,i){var r={},u;r.ids=n;u=PublicAffairs.url+"Facility/FindFacilitiesByIds";pa_api_request(u,r,function(n){t(n.findFacilitiesByIdsResult)},function(n){i(n)})};this.findFacilityByOtherId=function(n,t,i){var r={},u;r.otherId=n;u=PublicAffairs.url+"Facility/FindFacilityByOtherId";pa_api_request(u,r,function(n){t(n.findFacilityByOtherIdResult)},function(n){i(n)})};this.findFacilitiesByCitiesWithFilters=function(n,t,i,r,u){var f={},e;f.cities=n;f.groupTypes=t;f.udfs=i;e=PublicAffairs.url+"Facility/FindFacilitiesByCitiesWithFilters";pa_api_request(e,f,function(n){r(n.findFacilitiesByCitiesWithFiltersResult)},function(n){u(n)})};this.findFacilitiesByCountiesWithFilters=function(n,t,i,r,u){var f={},e;f.counties=n;f.groupTypes=t;f.udfs=i;e=PublicAffairs.url+"Facility/FindFacilitiesByCountiesWithFilters";pa_api_request(e,f,function(n){r(n.findFacilitiesByCountiesWithFiltersResult)},function(n){u(n)})};this.findFacilitiesByDistrictsWithFilters=function(n,t,i,r,u){var f={},e;f.districts=n;f.groupTypes=t;f.udfs=i;e=PublicAffairs.url+"Facility/FindFacilitiesByDistrictsWithFilters";pa_api_request(e,f,function(n){r(n.findFacilitiesByDistrictsWithFiltersResult)},function(n){u(n)})};this.findFacilitiesByStatesWithFilters=function(n,t,i,r,u){var f={},e;f.stateCodes=n;f.groupTypes=t;f.udfs=i;e=PublicAffairs.url+"Facility/FindFacilitiesByStatesWithFilters";pa_api_request(e,f,function(n){r(n.findFacilitiesByStatesWithFiltersResult)},function(n){u(n)})};this.findFacilitiesByZipCodesWithFilters=function(n,t,i,r,u){var f={},e;f.zipCodes=n;f.groupTypes=t;f.udfs=i;e=PublicAffairs.url+"Facility/FindFacilitiesByZipCodesWithFilters";pa_api_request(e,f,function(n){r(n.findFacilitiesByZipCodesWithFiltersResult)},function(n){u(n)})};this.findFacilitiesByState=function(n,t,i){var r={},u;r.stateCode=n;u=PublicAffairs.url+"Facility/FindFacilitiesByState";pa_api_request(u,r,function(n){t(n.findFacilitiesByStateResult)},function(n){i(n)})};this.findFacilitiesByCounty=function(n,t,i){var r={},u;r.county=n;u=PublicAffairs.url+"Facility/FindFacilitiesByCounty";pa_api_request(u,r,function(n){t(n.findFacilitiesByCountyResult)},function(n){i(n)})};this.findFacilitiesByDistrict=function(n,t,i){var r={},u;r.district=n;u=PublicAffairs.url+"Facility/FindFacilitiesByDistrict";pa_api_request(u,r,function(n){t(n.findFacilitiesByDistrictResult)},function(n){i(n)})}}function IpGeolocationService(){this.findByIp=function(n,t,i){var r={},u;r.ipAddress=n;u=PublicAffairs.url+"IpGeolocation/FindByIp";pa_api_request(u,r,function(n){t(n.findByIpResult)},function(n){i(n)})}}function KeyContactSurveyService(){this.addKeyContactSurvey=function(n,t,i){var r={},u;r.keyContactSurvey=n;u=PublicAffairs.url+"KeyContactSurvey/AddKeyContactSurvey";pa_api_request(u,r,function(n){t(n.addKeyContactSurveyResult)},function(n){i(n)})};this.getKeyContactSurveyByAdvocateIdAndElectedOfficialId=function(n,t,i,r){var u={},f;u.advocateId=n;u.electedOfficialId=t;f=PublicAffairs.url+"KeyContactSurvey/GetKeyContactSurveyByAdvocateIdAndElectedOfficialId";pa_api_request(f,u,function(n){i(n.getKeyContactSurveyByAdvocateIdAndElectedOfficialIdResult)},function(n){r(n)})};this.getKeyContactSurveyByAdvocateId=function(n,t,i){var r={},u;r.advocateId=n;u=PublicAffairs.url+"KeyContactSurvey/GetKeyContactSurveyByAdvocateId";pa_api_request(u,r,function(n){t(n.getKeyContactSurveyByAdvocateIdResult)},function(n){i(n)})};this.getKeyContactSurveyByElectedOfficialId=function(n,t,i){var r={},u;r.electedOfficialId=n;u=PublicAffairs.url+"KeyContactSurvey/GetKeyContactSurveyByElectedOfficialId";pa_api_request(u,r,function(n){t(n.getKeyContactSurveyByElectedOfficialIdResult)},function(n){i(n)})}}function PacService(){this.getUserEligibility=function(n,t,i,r){var u={},f;u.userId=n;u.pacId=t;f=PublicAffairs.url+"Pac/GetUserEligibility";pa_api_request(f,u,function(n){i(n.getUserEligibilityResult)},function(n){r(n)})}}function ParticipationService(){this.addAdvocateParticipation=function(n,t,i,r){var u={},f;u.advocateId=n;u.activityIds=t;f=PublicAffairs.url+"Participation/AddAdvocateParticipation";pa_api_request(f,u,function(n){i(n.addAdvocateParticipationResult)},function(n){r(n)})};this.findAdvocateParticipation=function(n,t,i,r){var u={},f;u.advocateId=n;u.activityIds=t;f=PublicAffairs.url+"Participation/FindAdvocateParticipation";pa_api_request(f,u,function(n){i(n.findAdvocateParticipationResult)},function(n){r(n)})};this.findAvailableCustomActivities=function(n,t){var i=PublicAffairs.url+"Participation/FindAvailableCustomActivities";pa_api_request(i,{},function(t){n(t.findAvailableCustomActivitiesResult)},function(n){t(n)})};this.getAdvocateParticipationCount=function(n,t,i){var r={},u;r.activityId=n;u=PublicAffairs.url+"Participation/GetAdvocateParticipationCount";pa_api_request(u,r,function(n){t(n.getAdvocateParticipationCountResult)},function(n){i(n)})}}function ProfanityFilteringService(){this.filter=function(n,t,i){var r={},u;r.text=n;u=PublicAffairs.url+"ProfanityFiltering/Filter";pa_api_request(u,r,function(n){t(n.filterResult)},function(n){i(n)})};this.filterWithMask=function(n,t,i,r){var u={},f;u.text=n;u.mask=t;f=PublicAffairs.url+"ProfanityFiltering/FilterWithMask";pa_api_request(f,u,function(n){i(n.filterWithMaskResult)},function(n){r(n)})}}function RegistrationService(){this.register=function(n,t,i){var r={},u;r.data=n;u=PublicAffairs.url+"Registration/Register";pa_api_request(u,r,function(n){t(n.registerResult)},function(n){i(n)})}}function SamlAuthenticationService(){this.validateSAMLResponse=function(n,t,i){var r={},u;r.samlResponse=n;u=PublicAffairs.url+"SamlAuthentication/ValidateSAMLResponse";pa_api_request(u,r,function(n){t(n.validateSAMLResponseResult)},function(n){i(n)})};this.validateSAMLResponseWithRelayState=function(n,t,i,r){var u={},f;u.samlResponse=n;u.relayStateValue=t;f=PublicAffairs.url+"SamlAuthentication/ValidateSAMLResponseWithRelayState";pa_api_request(f,u,function(n){i(n.validateSAMLResponseWithRelayStateResult)},function(n){r(n)})};this.generateSAMLResponseWithAdvocateClaims=function(n,t,i,r,u,f,e,o){var s={},h;s.nameId=n;s.issuer=t;s.signingCertificateThumbPrint=i;s.consumerServiceUrl=r;s.inResponseTo=u;s.advocate=f;h=PublicAffairs.url+"SamlAuthentication/GenerateSAMLResponseWithAdvocateClaims";pa_api_request(h,s,function(n){e(n.generateSAMLResponseWithAdvocateClaimsResult)},function(n){o(n)})};this.generateAuthenticationRequest=function(n,t){var i=PublicAffairs.url+"SamlAuthentication/GenerateAuthenticationRequest";pa_api_request(i,{},function(t){n(t.generateAuthenticationRequestResult)},function(n){t(n)})};this.generateAuthenticationRequestWithRelayState=function(n,t,i){var r={},u;r.relayStateUri=n;u=PublicAffairs.url+"SamlAuthentication/GenerateAuthenticationRequestWithRelayState";pa_api_request(u,r,function(n){t(n.generateAuthenticationRequestWithRelayStateResult)},function(n){i(n)})};this.generateAuthenticationRequestWithRelayStateAndTargetIdp=function(n,t,i,r){var u={},f;u.relayStateUri=n;u.targetIdp=t;f=PublicAffairs.url+"SamlAuthentication/GenerateAuthenticationRequestWithRelayStateAndTargetIdp";pa_api_request(f,u,function(n){i(n.generateAuthenticationRequestWithRelayStateAndTargetIdpResult)},function(n){r(n)})}}function SelectionService(){this.listStates=function(n,t){var i=PublicAffairs.url+"Selection/ListStates";pa_api_request(i,{},function(t){n(t.listStatesResult)},function(n){t(n)})};this.listEthnicities=function(n,t){var i=PublicAffairs.url+"Selection/ListEthnicities";pa_api_request(i,{},function(t){n(t.listEthnicitiesResult)},function(n){t(n)})};this.listParties=function(n,t){var i=PublicAffairs.url+"Selection/ListParties";pa_api_request(i,{},function(t){n(t.listPartiesResult)},function(n){t(n)})};this.listSubsets=function(n,t){var i=PublicAffairs.url+"Selection/ListSubsets";pa_api_request(i,{},function(t){n(t.listSubsetsResult)},function(n){t(n)})};this.listGroupAssociations=function(n,t){var i=PublicAffairs.url+"Selection/ListGroupAssociations";pa_api_request(i,{},function(t){n(t.listGroupAssociationsResult)},function(n){t(n)})};this.listGroups=function(n,t){var i=PublicAffairs.url+"Selection/ListGroups";pa_api_request(i,{},function(t){n(t.listGroupsResult)},function(n){t(n)})};this.listTypes=function(n,t,i){var r={},u;r.groupCode=n;u=PublicAffairs.url+"Selection/ListTypes";pa_api_request(u,r,function(n){t(n.listTypesResult)},function(n){i(n)})};this.listNamePrefixes=function(n,t){var i=PublicAffairs.url+"Selection/ListNamePrefixes";pa_api_request(i,{},function(t){n(t.listNamePrefixesResult)},function(n){t(n)})};this.listCommitteeFederalChamberTypes=function(n,t){var i=PublicAffairs.url+"Selection/ListCommitteeFederalChamberTypes";pa_api_request(i,{},function(t){n(t.listCommitteeFederalChamberTypesResult)},function(n){t(n)})};this.listCommitteeStateChamberTypes=function(n,t){var i=PublicAffairs.url+"Selection/ListCommitteeStateChamberTypes";pa_api_request(i,{},function(t){n(t.listCommitteeStateChamberTypesResult)},function(n){t(n)})};this.listSearchableChambers=function(n,t){var i=PublicAffairs.url+"Selection/ListSearchableChambers";pa_api_request(i,{},function(t){n(t.listSearchableChambersResult)},function(n){t(n)})};this.listElectedOfficialAffiliations=function(n,t){var i=PublicAffairs.url+"Selection/ListElectedOfficialAffiliations";pa_api_request(i,{},function(t){n(t.listElectedOfficialAffiliationsResult)},function(n){t(n)})};this.listElectedOfficialAffiliationLevels=function(n,t){var i=PublicAffairs.url+"Selection/ListElectedOfficialAffiliationLevels";pa_api_request(i,{},function(t){n(t.listElectedOfficialAffiliationLevelsResult)},function(n){t(n)})};this.listUserDefinedFieldNamesForAdvocate=function(n,t){var i=PublicAffairs.url+"Selection/ListUserDefinedFieldNamesForAdvocate";pa_api_request(i,{},function(t){n(t.listUserDefinedFieldNamesForAdvocateResult)},function(n){t(n)})};this.getState=function(n,t,i){var r={},u;r.stateCode=n;u=PublicAffairs.url+"Selection/GetState";pa_api_request(u,r,function(n){t(n.getStateResult)},function(n){i(n)})};this.getEthnicity=function(n,t,i){var r={},u;r.ethnicityId=n;u=PublicAffairs.url+"Selection/GetEthnicity";pa_api_request(u,r,function(n){t(n.getEthnicityResult)},function(n){i(n)})};this.getParty=function(n,t,i){var r={},u;r.partyId=n;u=PublicAffairs.url+"Selection/GetParty";pa_api_request(u,r,function(n){t(n.getPartyResult)},function(n){i(n)})};this.getSubset=function(n,t,i){var r={},u;r.compositeKey=n;u=PublicAffairs.url+"Selection/GetSubset";pa_api_request(u,r,function(n){t(n.getSubsetResult)},function(n){i(n)})};this.getAvailableSubsets=function(n,t,i){var r={},u;r.compositeKey=n;u=PublicAffairs.url+"Selection/GetAvailableSubsets";pa_api_request(u,r,function(n){t(n.getAvailableSubsetsResult)},function(n){i(n)})};this.getAllowedContentKeys=function(n,t,i){var r={},u;r.compositeKey=n;u=PublicAffairs.url+"Selection/GetAllowedContentKeys";pa_api_request(u,r,function(n){t(n.getAllowedContentKeysResult)},function(n){i(n)})};this.getChamber=function(n,t,i){var r={},u;r.chamberCode=n;u=PublicAffairs.url+"Selection/GetChamber";pa_api_request(u,r,function(n){t(n.getChamberResult)},function(n){i(n)})};this.listAllValidStates=function(n,t){var i=PublicAffairs.url+"Selection/ListAllValidStates";pa_api_request(i,{},function(t){n(t.listAllValidStatesResult)},function(n){t(n)})};this.listChambersByLevels=function(n,t,i){var r={},u;r.levels=n;u=PublicAffairs.url+"Selection/ListChambersByLevels";pa_api_request(u,r,function(n){t(n.listChambersByLevelsResult)},function(n){i(n)})}}function ShareYourStoryService(){this.shareStoryForAdvocate=function(n,t,i,r,u){var f={},e;f.advocateId=n;f.subject=t;f.text=i;e=PublicAffairs.url+"ShareYourStory/ShareStoryForAdvocate";pa_api_request(e,f,function(n){r(n.shareStoryForAdvocateResult)},function(n){u(n)})}}function TellAFriendService(){this.sendEmailsForAdvocate=function(n,t,i,r){var u={},f;u.advocateId=n;u.tellAFriendData=t;f=PublicAffairs.url+"TellAFriend/SendEmailsForAdvocate";pa_api_request(f,u,function(n){i(n.sendEmailsForAdvocateResult)},function(n){r(n)})};this.sendEmailsWithCaptchaVerification=function(n,t,i,r,u){var f={},e;f.captchaResponse=n;f.sender=t;f.tellAFriendData=i;e=PublicAffairs.url+"TellAFriend/SendEmailsWithCaptchaVerification";pa_api_request(e,f,function(n){r(n.sendEmailsWithCaptchaVerificationResult)},function(n){u(n)})};this.trackFriendClick=function(n,t,i){var r={},u;r.friendId=n;u=PublicAffairs.url+"TellAFriend/TrackFriendClick";pa_api_request(u,r,function(n){t(n.trackFriendClickResult)},function(n){i(n)})};this.assignRegistrationToAdvocate=function(n,t,i,r,u){var f={},e;f.individualId=n;f.newRegistrantIndividualId=t;f.activityId=i;e=PublicAffairs.url+"TellAFriend/AssignRegistrationToAdvocate";pa_api_request(e,f,function(n){r(n.assignRegistrationToAdvocateResult)},function(n){u(n)})}}function TrackingService(){this.track=function(n,t,i){var r={},u;r.detail=n;u=PublicAffairs.url+"Tracking/Track";pa_api_request(u,r,function(){t()},function(n){i(n)})};this.trackTag=function(n,t,i,r){var u={},f;u.tag=n;u.detail=t;f=PublicAffairs.url+"Tracking/TrackTag";pa_api_request(f,u,function(){i()},function(n){r(n)})};this.trackApiCall=function(n,t,i,r){var u={},f;u.eventId=n;u.detail=t;f=PublicAffairs.url+"Tracking/TrackApiCall";pa_api_request(f,u,function(){i()},function(n){r(n)})}}function UdfService(){this.getSupportedEntityTypes=function(n,t){var i=PublicAffairs.url+"Udf/GetSupportedEntityTypes";pa_api_request(i,{},function(t){n(t.getSupportedEntityTypesResult)},function(n){t(n)})};this.findAllUdfValuesForEntities=function(n,t,i,r){var u={},f;u.type=n;u.entityIds=t;f=PublicAffairs.url+"Udf/FindAllUdfValuesForEntities";pa_api_request(f,u,function(n){i(n.findAllUdfValuesForEntitiesResult)},function(n){r(n)})};this.findAllUdfValuesForEntity=function(n,t,i,r){var u={},f;u.type=n;u.entityId=t;f=PublicAffairs.url+"Udf/FindAllUdfValuesForEntity";pa_api_request(f,u,function(n){i(n.findAllUdfValuesForEntityResult)},function(n){r(n)})};this.findMultipleUdfValuesForEntities=function(n,t,i,r,u){var f={},e;f.type=n;f.udfIndices=t;f.entityIds=i;e=PublicAffairs.url+"Udf/FindMultipleUdfValuesForEntities";pa_api_request(e,f,function(n){r(n.findMultipleUdfValuesForEntitiesResult)},function(n){u(n)})};this.findUdfValueForEntity=function(n,t,i,r,u){var f={},e;f.type=n;f.udfIndex=t;f.entityId=i;e=PublicAffairs.url+"Udf/FindUdfValueForEntity";pa_api_request(e,f,function(n){r(n.findUdfValueForEntityResult)},function(n){u(n)})};this.findUdfValuesForEntities=function(n,t,i,r,u){var f={},e;f.type=n;f.udfIndex=t;f.entityIds=i;e=PublicAffairs.url+"Udf/FindUdfValuesForEntities";pa_api_request(e,f,function(n){r(n.findUdfValuesForEntitiesResult)},function(n){u(n)})};this.findUdfValuesForEntity=function(n,t,i,r,u){var f={},e;f.type=n;f.udfIndices=t;f.entityId=i;e=PublicAffairs.url+"Udf/FindUdfValuesForEntity";pa_api_request(e,f,function(n){r(n.findUdfValuesForEntityResult)},function(n){u(n)})}}function WebsiteConfigurationService(){this.getTellAFriendSender=function(n,t){var i=PublicAffairs.url+"WebsiteConfiguration/GetTellAFriendSender";pa_api_request(i,{},function(t){n(t.getTellAFriendSenderResult)},function(n){t(n)})};this.setTellAFriendSender=function(n,t,i,r){var u={},f;u.displayName=n;u.emailAddress=t;f=PublicAffairs.url+"WebsiteConfiguration/SetTellAFriendSender";pa_api_request(f,u,function(){i()},function(n){r(n)})};this.setRecordReactionOnInformationOnlyAlert=function(n,t,i){var r={},u;r.record=n;u=PublicAffairs.url+"WebsiteConfiguration/SetRecordReactionOnInformationOnlyAlert";pa_api_request(u,r,function(){t()},function(n){i(n)})};this.setSendThankYouEmail=function(n,t,i,r){var u={},f;u.type=n;u.sendEmail=t;f=PublicAffairs.url+"WebsiteConfiguration/SetSendThankYouEmail";pa_api_request(f,u,function(){i()},function(n){r(n)})};this.isSendThankYouEmailSet=function(n,t,i){var r={},u;r.type=n;u=PublicAffairs.url+"WebsiteConfiguration/IsSendThankYouEmailSet";pa_api_request(u,r,function(n){t(n.isSendThankYouEmailSetResult)},function(n){i(n)})};this.setRecordReactionAgainstOfflineActivities=function(n,t,i,r){var u={},f;u.type=n;u.activityIds=t;f=PublicAffairs.url+"WebsiteConfiguration/SetRecordReactionAgainstOfflineActivities";pa_api_request(f,u,function(){i()},function(n){r(n)})};this.setRecordReactionAgainstOfflineActivityForTellAFriendTracking=function(n,t,i){var r={},u;r.activityId=n;u=PublicAffairs.url+"WebsiteConfiguration/SetRecordReactionAgainstOfflineActivityForTellAFriendTracking";pa_api_request(u,r,function(){t()},function(n){i(n)})};this.findOfflineActivityById=function(n,t,i){var r={},u;r.id=n;u=PublicAffairs.url+"WebsiteConfiguration/FindOfflineActivityById";pa_api_request(u,r,function(n){t(n.findOfflineActivityByIdResult)},function(n){i(n)})};this.getAllOfflineActivities=function(n,t){var i=PublicAffairs.url+"WebsiteConfiguration/GetAllOfflineActivities";pa_api_request(i,{},function(t){n(t.getAllOfflineActivitiesResult)},function(n){t(n)})};this.getAvailableOfflineActivities=function(n,t){var i=PublicAffairs.url+"WebsiteConfiguration/GetAvailableOfflineActivities";pa_api_request(i,{},function(t){n(t.getAvailableOfflineActivitiesResult)},function(n){t(n)})};this.getRecordOfflineActivityForTellAFriendTracking=function(n,t){var i=PublicAffairs.url+"WebsiteConfiguration/GetRecordOfflineActivityForTellAFriendTracking";pa_api_request(i,{},function(t){n(t.getRecordOfflineActivityForTellAFriendTrackingResult)},function(n){t(n)})};this.getOfflineActivitiesSetForType=function(n,t,i){var r={},u;r.type=n;u=PublicAffairs.url+"WebsiteConfiguration/GetOfflineActivitiesSetForType";pa_api_request(u,r,function(n){t(n.getOfflineActivitiesSetForTypeResult)},function(n){i(n)})};this.setIsWebsiteUsingCredentials=function(n,t,i){var r={},u;r.isSiteCredentialed=n;u=PublicAffairs.url+"WebsiteConfiguration/SetIsWebsiteUsingCredentials";pa_api_request(u,r,function(){t()},function(n){i(n)})};this.isWebsiteUsingCredentials=function(n,t){var i=PublicAffairs.url+"WebsiteConfiguration/IsWebsiteUsingCredentials";pa_api_request(i,{},function(t){n(t.isWebsiteUsingCredentialsResult)},function(n){t(n)})};this.setNotificationEmail=function(n,t,i,r){var u={},f;u.type=n;u.email=t;f=PublicAffairs.url+"WebsiteConfiguration/SetNotificationEmail";pa_api_request(f,u,function(){i()},function(n){r(n)})};this.setEngagementEnabledForWebsite=function(n,t,i){var r={},u;r.enable=n;u=PublicAffairs.url+"WebsiteConfiguration/SetEngagementEnabledForWebsite";pa_api_request(u,r,function(){t()},function(n){i(n)})}}typeof PublicAffairs=="undefined"&&(window.PublicAffairs=public_affairs_definition());PublicAffairs.url="https://web-library.gractions.com/api-browser/v1/";!function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};t.m=n;t.c=i;t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:r})};t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});Object.defineProperty(n,"__esModule",{value:!0})};t.t=function(n,i){var r,u;if((1&i&&(n=t(n)),8&i)||4&i&&"object"==typeof n&&n&&n.__esModule)return n;if(r=Object.create(null),t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&i&&"string"!=typeof n)for(u in n)t.d(r,u,function(t){return n[t]}.bind(null,u));return r};t.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(i,"a",i),i};t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};t.p="";t(t.s=62)}([function(n,t,i){"use strict";var u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.window="undefined"==typeof window?{}:window;this.app=null;this.config=null;this.errorLog=[];var t=i(2),r=i(1),u=i(5),f=i(9),e=i(4),o=i(3);this.APIService=new t;this.DOMHelper=new r;this.APIHelper=new u;this.advocateHelper=new f;this.validatorHelper=new o;this.TemplateHelper=new e;this.callbacksQueue=[];this.linkedInShareClass="IN-3bd69980-1fb4-47f6-b2a6-211e406565ad-1G9ISYhSF8XoOmdcl0yKDu";this.passedCustomValidation=!0;"undefined"!=typeof NodeList&&(NodeList.prototype.forEach=Array.prototype.forEach);String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};this.advocateInContext=null}return u(n,[{key:"log",value:function(n){"undefined"!=typeof advocacyComponents&&advocacyComponents.externalConfig&&advocacyComponents.externalConfig.debug&&console.info(n)}},{key:"mergeAdvocateInContext",value:function(n){var t;return this.advocate?(t=Object.assign(this.advocate,n),this.advocate=t,t):(this.advocate=n,n)}},{key:"genericOnSuccess",value:function(n,t,i,r){var u=r.validatingFormId,f=u?r.formsConfig[u]:r.externalConfig;f.hasOwnProperty(t)&&"InputValidationError"!==n.type?f[t](n):this.log(i)}},{key:"genericOnError",value:function(n,t,i,r){var u=r.validatingFormId;r.formsConfig[u].hasOwnProperty(t)?r.formsConfig[u][t](n):this.log(i)}},{key:"errorAppRuntime",value:function(n){var t=new Error;return t.name="AppRuntime",t.message=n||"App Runtime Error",t}},{key:"errorAppSystem",value:function(n){var t=new Error;return t.name="SystemError",t.message=n||"SYSTEM ERROR - Contact Support",t}},{key:"errorAppUsage",value:function(n){var t=new Error;return t.name="AppUsageError",t.message=n||"App Usage Error - Verify your settings",t}},{key:"checkForValidAdvocate",value:function(n){if(n)return!!this.advocate||(n({type:"UsageErrorAdvocate",currentURL:this.window.location.href,message:"Can't recognize an advocate in context"}),!1);throw this.errorAppRuntime("checkForValidAdvocate(onError) is missing an argument");}},{key:"composeTrackingDetail",value:function(n,t,i,r){var o=this,u=t||navigator,s=i||document,e=r||window,f=n||new TrackingDetail;return function(t){t.Device=n||new TrackingDevice,function(t){t.Device.Browser=n||new TrackingBrowser;t.Device.Browser.Name=u.appName;t.Device.Browser.CodeName=u.appCodeName;t.Device.Browser.FullVersion=u.appVersion;t.Device.Browser.DoNotTrack=e.advocacyComponents.evaluateDoNotTrack(u,e,s);t.Device.Browser.AreCookiesEnabled=u.cookieEnabled;t.Device.Browser.Language=u.language;t.Device.Browser.SupportedLanguages=JSON.stringify(u.languages);t.Device.OperatingSystem=u||new TrackingOperatingSystem;t.Device.OperatingSystem.Platform=u.platform;t.Device.OperatingSystem.CpuClass=u.cpuClass;t.Device.OperatingSystem.CpuClass=u.oscpu}(t)}(f),function(t){t.Request=n||new TrackingRequest;t.Request.Referrer=s.referrer;t.Request.Url=e.location.href}(f),function(t){t.Identity=n||new TrackingIdentity;t.Identity.TrackingId=e.advocacyComponents.getTrackingId();t.Identity.AdvocateId=o.advocate?o.advocate.id:""}(f),function(n){"undefined"!=typeof advocacyComponentsWPConfig&&(n.CustomAttributes=[],n.CustomAttributes.push({wp_version:advocacyComponentsWPConfig.wp_version}),n.CustomAttributes.push({wp_plugin_version:advocacyComponentsWPConfig.wp_plugin_version}))}(f),f.UserAgentString=u.userAgent,f}},{key:"evaluateDoNotTrack",value:function(n,t,i){var u=void 0!==t.safari,r=!1;return"1"===(r=i.documentMode||/Edge/.test(n.userAgent)||u?t.doNotTrack:n.doNotTrack)||"true"===r||1===r||!0===r}},{key:"getTrackingId",value:function(){var n=localStorage.getItem("PublicAffairs_Tracking");return"undefined"!==n&&""!==n&&null!==n||(n=generate_uuidv4(),localStorage.setItem("PublicAffairs_Tracking",n)),n}},{key:"validateEmail",value:function(n,t,r,u){function l(n,t,i,r){return{validator:n,status:t,message:i,field:r}}function o(n){return{account:n.account,address:n.address,domain:n.domain,isCorrected:n.isCorrected,isDisposable:n.isDisposable,isRole:n.isRole,isSpamtrap:n.isSpamtrap,isValid:n.isValid}}function s(n){var r=new(i(6)),t;r.validationResponse=l;f.log("Validating the Email Format.");t=r.validate(n);t.status&&v?(f.log("Email Format is correct."),f.log("DeepValidation :"),f.APIService.emailValidationService(n.value,function(n){var t=o(n);t.isValid?(f.log("OnSuccess:"),h(t)):(f.log("OnValidationError:"),c(t))},function(n){var t=o(n);a(t)})):t.status?(f.log("OnSuccess:"),h(t),f.DOMHelper.toggleErrorLabel(n,t)):(f.log("OnValidationError:"),f.DOMHelper.toggleErrorLabel(n,t),c(t))}var e,f=this,h=t&&t.onValidationSuccess?t.onValidationSuccess:this.log,c=t&&t.onValidationError?t.onValidationError:this.log,a=t&&t.onError?t.onError:this.log,v=void 0===r||r;try{e=void 0===n.value?this.DOMHelper.find(n):n}catch(r){throw this.errorAppUsage("The Field Or Field Selector was not specified. Please check your settings."+r);}void 0===u?this.DOMHelper.addEventListener(e,s,"change"):s(e)}},{key:"trackTag",value:function(n){var t=this.composeTrackingDetail();this.APIService.trackTag(n,t)}},{key:"onError",value:function(n){this.externalConfig&&this.externalConfig.onError?this.externalConfig.onError(n):this.log(n)}},{key:"removeAdvocateContext",value:function(){localStorage.removeItem("PublicAffairs_Advocate")}},{key:"getCaptcha",value:function(n){var t=n||this.log();this.APIService.getCaptcha(t)}},{key:"facebookShare",value:function(n,t,i,r,u){var e,f=this;if(void 0===n||"string"!=typeof n)throw this.errorAppUsage("Please check the selector that you are passing for the facebook share, it should be a valid selector");e=this.DOMHelper.findAll(n);var o=t.target?t.target:"Facebook Share Site",s=t.features?t.features:"toolbar=0, status=0, width=650, height=450",h=this.buildFacebookShareLink(t,"https://www.facebook.com/sharer.php?");e.forEach(function(n){f.DOMHelper.addEventListener("click",n,function(e){var c,a=e.jasmineTest?e:window,l;return n.hasAttribute("data-kindid-facebook")&&(c=n.getAttribute("data-kindid-facebook")),l=t.trackTag?t.trackTag:"ta-facebook-"+c,f.addTrackTagAndActivitiesToShare(l,t.activitiesId,f,"Facebook Share"),i&&i.takeActionForAdvocateCall(r,u,!1,c,"Facebook"),a.open(h,o,s),!1})})}},{key:"addLinkedInShareTracking",value:function(n){var t=this,i=setInterval(function(){var r=t.DOMHelper.find("."+t.linkedInShareClass);r&&(r.addEventListener("click",function(){t.addTrackTagAndActivitiesToShare(n.trackTag,n.activitiesId,t,"LinkedIn Share")}),clearInterval(i))},100)}},{key:"addTwitterShareTracking",value:function(n){var t=this,i=t.DOMHelper.find("#"+n.buttonId);i.addEventListener("click",function(r){var e,u,f;r.preventDefault();e="https://twitter.com/intent/tweet?url="+location.href;i.href=e;u="";(u=n.text?n.text:"",n.textFieldId)&&(f=t.DOMHelper.find("#"+n.textFieldId),f&&(u=f.value));t.changeShareButtonHref(encodeURIComponent(u),i);t.addTrackTagAndActivitiesToShare(n.trackTag,n.activitiesId,t,"Twitter Share");window.open(i.href,"ShareOnTwitter",t.getWindowOptions()).opener=null})}},{key:"getWindowOptions",value:function(){return["resizable,scrollbars,status","height=350","width=500","left="+(window.innerWidth/2-250),"top="+(window.innerHeight/2-175)].join()}},{key:"changeShareButtonHref",value:function(n,t){var i=t.getAttribute("href"),r;n&&""!==n.trim()&&(r=-1<i.indexOf("?")?"&":"?",t.href=i+r+"text="+n)}},{key:"addTrackTagAndActivitiesToShare",value:function(n,t,i,r){var u=r||"share";n&&""!==n.trim()?(i.log("Adding track Tag - "+u),i.trackTag(n)):i.log("Missing track Tag - "+u);t&&0<t.length&&i.advocateInContext&&(i.log("Sending offline activity's - "+u),i.APIHelper.addAdvocateParticipation(i.advocateInContext.id,t,function(){i.log("Participation added Successfully - "+u)},function(){i.log("An error occurs adding the participation to the Advocate - "+u)}))}},{key:"buildFacebookShareLink",value:function(n,t){return void 0!==n&&n.quotes?(void 0===n.quotes.u&&(n.quotes.u="u="+window.location.href),void 0!==n.quotes.app_id&&(t+="app_id="+n.quotes.app_id),Object.keys(n.quotes).forEach(function(i){"app_id"!==i&&(t+="&"+i+"="+n.quotes[i])})):t+="u="+window.location.href,t+="&display=popup"}},{key:"updateAdvocate",value:function(n,t,i){var u=void 0===t?this.log:t,r=void 0===i?this.log:i;return(this.log("Update Advocate has been call"),!n||"function"==typeof n)?r({type:"UpdateAdvocate",message:"The advocate object was empty, please add the keys: advocate or advocate, currentCredentials, newCredetentials"}):void(n.advocate&&this.advocate&&(n.advocate=this.mergeAdvocateInContext(n.advocate)),n.currentCredentials&&n.newCredentials?(this.log("Updating Advocate Credentials, sending the data"),this.APIService.updateAdvocate(n,u,r)):n.advocate&&(this.log("Updating Advocate information, sending the data"),this.APIService.advocateService("updateAdvocate",n.advocate,function(n){u(n)},function(n){r(n)})))}},{key:"deleteProcessedKeys",value:function(){this.log("Removing processed keys from the DOM");this.TemplateHelper.deleteProcessedKeys()}},{key:"advocate",get:function(){var n=JSON.parse(localStorage.getItem("PublicAffairs_Advocate"));return n?(this.advocateInContext=n,n):this.advocateInContext},set:function(n){if(void 0===n)throw new this.errorAppSystem("[Unexpected Object] You are trying to store an undefined object");localStorage.setItem("PublicAffairs_Advocate",JSON.stringify(n));this.advocateInContext=n}},{key:"captchaId",get:function(){return JSON.parse(localStorage.getItem("PublicAffairs_Captcha_Id"))}}]),n}();r.prototype.getUDFConfig=function(n,t){var i,r,u;if(this.udf=this.apiConfig.fieldSettings.udf,t.hasAttribute(n)&&(i=t.getAttribute(n),u=this.udf,r=this.udf.qty),parseInt(i)>parseInt(r))throw this.errorAppUsage("The UDF ID ("+i+") exceeds the limit ("+r+")");return u};r.prototype.getUTM=function(n,t){var r=this,u=t||advocacyComponents,i;return this.log("getUTM"),i=function(){var e="undefined"==typeof window?{location:{href:""}}:window,t=n||{source:{name:"utm_source",alias:"DDCA_RegSource"},campaign:{name:"utm_campaign",alias:"DDCA_CampaignAd"},medium:{name:"utm_medium",alias:"DDCA_Medium"},term:{name:"utm_term",alias:"DDCA_Term"},content:{name:"utm_content",alias:"DDCA_AdUnit"}},i,f;for(i in t)t.hasOwnProperty(i)&&(f=void 0,f=null===(f=r.DOMHelper.getURLParameterByName(t[i].name))?r.DOMHelper.getURLParameterByName(t[i].alias):f,t[i]=f);return t.url=e.location.href,u.setUTM(t),t}(),null===i.campaign?JSON.parse(localStorage.getItem("PublicAffairs_UTM")):i};r.prototype.setUTM=function(n){localStorage.setItem("PublicAffairs_UTM",JSON.stringify(n))};r.prototype.getSelection=function(n,t){var i=this;this.APIService.getSelection(n,function(r){n.forEach(function(n){n.data=r;0<r.length&&(n.excludeItemsList&&i.APIHelper.excludeDataFromSelectionData(n),void 0!==n.fieldsIDs&&void 0!==n.formFieldType&&i.DOMHelper.populateSelection(n,r));t&&t(r)})})};r.prototype.validateSingleField=function(n){function r(n,t,i,r){return{validator:n,status:t,message:i,field:r}}var i=this.advocateFieldsConfig.fieldSettings.advocateFields[n.name],t,u,f;return void 0!==i?(t=null,n.hasAttribute("required")&&(u=new this.validatorHelper.RequiredValidator,u.validationResponse=r,!(t=u.validate(n)).status))?t:0!==i.max_length&&(f=new this.validatorHelper.LengthValidator,f.validationResponse=r,!(t=f.validate(n,i)).status)?t:(i.validators.forEach(function(i){""===i.trim()&&(i="NoValidator");var u=new this.validatorHelper[i];if(u.validationResponse=r,"EmailPreferenceValidator"!==i&&"ZipOrStatePresenceValidator"!==i&&!(t=u.validate(n,this)).status)return t},this),t):!0};r.prototype.createModuleObjects=function(n,t){var r={};return t.keys().forEach(function(t){var u=t.replace(/\.\/|\.js/gi,"");r[u]="validators"===n?i(63)("./"+n+"/"+u):"services"===n?i(64)("./"+n+"/"+u):i(65)("./"+n+"/"+u)},this),r};n.exports=r},function(n){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},i=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n)}return i(n,[{key:"renderSubmit",value:function(n){var t=this.documentHelperCall("createElement","button");return t.id=n.id,t.className=n.classes,t.innerHTML=n.caption,t.addEventListener("click",function(n){n.preventDefault();t.disabled=!0;advocacyComponents.takeaction.submitMissingInfo(t)}),n.$parent.appendChild(t),t}},{key:"assignEventHandlers",value:function(n,t,i){if(t){var r=n.getAttribute("data-Validation");"blur"!==r&&"change"!==r&&"keyup"!==r||n.addEventListener(r,function(){i.validateField(this)})}else n.addEventListener("click",function(t){if(n.disabled=!0,"undefined"!=typeof advocacyComponents&&"RegistrationComponent"===i.config.name){var r=this.getAttribute("[data-FormId]"),u=i.formsConfig[r];i.register(u,t,r)}})}},{key:"populateSelection",value:function(n,i){var o=i||window,u=!1,f,r,e;if(!n||void 0===o)throw this.errorAppUsage("[populateSelection] serviceObjectConfig is not an array. Check your settings");return f="object"===t(n.data[0]),n.ordering&&this.orderingSelectionData(n,f),r=n.formFieldType,e=function(n){var t;return t="listTypes"===n?"groupAssociations":"listParties"===n?"partyCode":"listEthnicities"===n?"ethnicityCode":"listTypes"===n?"groupAssociations":"listNamePrefixes"===n?"prefix":"",t}(n.selectionKey),n.fieldsIDs.forEach(function(t){var s,i=this.documentHelperCall("getElementById",t),h=i.getAttribute("selected"),f,o;if(!r||!i)throw new advocacyComponents.errorAppUsage("[populateSelection] Cannot find the element with ID: "+t);if(i.innerHTML="",f=r.toUpperCase(),"SELECT"===f){for(i.setAttribute("data-groupCode",n.groupType),this.addEmptyOption(i,n.placeholder),this.populateSelectField(n.data,i),u=!0,o=0;o<i.options.length;o++)if((s=i.options[o]).value===h)return void(s.selected=!0)}else{if("CHECKBOX"!==f&&"RADIO"!==f)throw new advocacyComponents.errorAppUsage("[populateSelection] The form field type value "+r+" is incorrect, for the container "+t);u=!0;this.populateCheckBoxOrRadioField(n,i,e,f)}},this),u}},{key:"populateSelectField",value:function(n,i){var r=this;n.forEach(function(n){var u=r.documentHelperCall("createElement","option"),f,e;"object"===(void 0===n?"undefined":t(n))?(n.name?e=n.name:n.description&&(e=n.description),n.id?f=n.id:n.code&&(f=n.code),u.textContent=e,u.value=f):"string"==typeof n&&(u.textContent=n,u.value=n);i.appendChild(u)},this)}},{key:"populateCheckBoxOrRadioField",value:function(n,i,r,u){var s,e="",f=1,o=u.toLowerCase(),h=n.class||"",c=n.groupType?'data-groupCode="'+n.groupType+'"':"";n.data.forEach(function(n){if("object"===(void 0===n?"undefined":t(n))){var u;n.name?s=n.name:n.description&&(s=n.description);n.id?u=n.id:n.code&&(u=n.code);e+='<label for="'+r+f+'" class="formField_'+o+'"><input '+c+' class="'+h+'" type="'+o+'" value='+u+' name="'+r+'" id="'+r+f+'"> <span>'+s+"<\/span><\/label>";i.innerHTML=e}else"string"==typeof n&&(e+='<label for="'+r+f+'" class="formField_'+o+'"><input '+c+' class="'+h+'" type="'+o+'" value='+n+' name="'+r+'" id="'+r+f+'"> <span>'+n+"<\/span><\/label>",i.innerHTML=e);f++})}},{key:"addEmptyOption",value:function(n,t){if(!n.selected){n.innerHTML="";var i=this.documentHelperCall("createElement","option");i.textContent=t?"-- "+t+" --":"-- Select --";i.value="--";n.appendChild(i)}}},{key:"orderingSelectionData",value:function(n,i){switch(n.ordering.toLowerCase()){case"asc":i?n.data.sort(function(n,i){return n.code&&"object"===(void 0===n?"undefined":t(n))?n.code<i.code?-1:n.code>i.code?1:0:n.id<i.id?-1:n.id>i.id?1:0}):n.data.sort();break;case"desc":i?n.data.sort(function(n,i){return n.code&&"object"===(void 0===n?"undefined":t(n))?n.code>i.code?-1:n.code<i.code?1:0:n.id>i.id?-1:n.id<i.id?1:0}):(n.data.sort(),n.data.reverse());break;default:throw new this.RegistrationComponent.errorAppUsage("Error arranging the list. Allowed: 'asc', 'desc' or '' (empty).");}}},{key:"getURLParameterByName",value:function(n,t){void 0===t&&(t=window.location.href.toLowerCase());n=n.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&]"+n.toLowerCase()+"(=([^&#]*)|&|#|$)").exec(t.toLowerCase());return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}},{key:"interceptSubmit",value:function(n,t,i,r){var u=this.find(n),f;return u&&(f=u.cloneNode(!0),f.removeAttribute("onclick"),f.id=u.id+"_fake","submit"===u.getAttribute("type")?f.value=u.value:f.innerText=u.innerText,f.addEventListener("click",function(n){"registration"===i||"shareYourStory"===i?advocacyComponents[i][r](t,n):advocacyComponents[i][r](n)},!1),u.parentNode.insertBefore(f,u),u.setAttribute("style","display:none")),u}},{key:"toggleDisable",value:function(n){n.disabled=!n.hasAttribute("disabled")}},{key:"findAll",value:function(n,t){return t?t.querySelectorAll(n):document.querySelectorAll(n)}},{key:"find",value:function(n,t){return t?t.querySelector(n):document.querySelector(n)}},{key:"addEventListener",value:function(n,t,i){t.addEventListener(n,function(){i(t)})}},{key:"toggleErrorLabel",value:function(n,t){return this.findAll('label[for="'+n.id+'"].error-label').forEach(function(n){t.status?(n.classList.remove("invalid"),n.innerHTML=""):(n.classList.add("invalid"),n.innerHTML=t.message)}),t.status}},{key:"toggleInvalid",value:function(n,t){return t.status?n.classList.remove("invalid"):n.classList.add("invalid"),this.toggleErrorLabel(n,t),t.status}},{key:"getWindow",value:function(){return window}},{key:"getAttribute",value:function(n,t){return n.getAttribute(t)}},{key:"hasAttribute",value:function(n,t){return n.hasAttribute(t)}},{key:"onPageLoad",value:function(){document.addEventListener("DOMContentLoaded",function(){advocacyComponents.TemplateHelper.populateBinderElements()},!1)}},{key:"setAttributes",value:function(n,t){Object.keys(t).forEach(function(i){n.setAttribute(i,t[i])})}},{key:"isMobile",value:function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)}},{key:"documentHelperCall",value:function(n,t,i){return(i||document)[n](t)}},{key:"initForm",value:function(n,t){var i=this.findAll(n);if(i&&1===i.length)this.getFormFields(n,t),t.handleSubmitButton(n,!0);else{if(!i)throw t.errorAppUsage("[ConfigError] - Check the form selector, fields not found.");this.cacheDOMFields(n,t,n,i);t.handleSubmitButton(n)}}},{key:"getFormFields",value:function(n,t,i){var r=i||document,u=n.split(",");r.querySelectorAll(n).forEach(function(n,i){var r=u[i],f=n.querySelectorAll("input, select, checkbox, textarea, button");this.cacheDOMFields(n,t,r,f)},this)}},{key:"cacheDOMFields",value:function(n,t,i,r){t.forms[i]={};0<r.length&&r.forEach(function(n){var r,u,f,e;n.setAttribute("data-FormId",i);r=t.formsConfig[i].namingPrefix?n.name.replace(t.formsConfig[i].namingPrefix,""):n.name;(r=r.charAt(0).toUpperCase()+r.slice(1),"checkbox"===n.type||"radio"===n.type)?(t.forms[i][r]||(t.forms[i][r]=[]),t.forms[i][r].push(n)):n.hasAttribute("data-addressgroup")?(u=n.getAttribute("data-addressgroup"),t.forms[i][u.toLowerCase()+"Address"]||(t.forms[i][u.toLowerCase()+"Address"]={}),t.forms[i][u.toLowerCase()+"Address"][r]=n):"groupassociations"===r.toLowerCase()?(t.forms[i].groupAssociations||(t.forms[i].groupAssociations=[]),f={},f[r]=n,t.forms[i].groupAssociations.push(f)):n.hasAttribute("data-udf")?(t.forms[i].udf||(t.forms[i].udf={}),e=n.getAttribute("data-udf"),t.forms[i].udf["field"+e]=n):"submit"===n.type?(t.forms[i].submitButton=n,t.DOMHelper.assignEventHandlers(n,!1,t)):t.forms[i][r]=n;n.hasAttribute("data-Validation")&&t.DOMHelper.assignEventHandlers(n,!0,t)},this);t.formStatus[i]=!1}},{key:"getUrlQueryParams",value:function(n){var r=n.split("?")[1].split("&"),t=[],i={};return r.forEach(function(n){t=n.split("=");i[t[0]]=decodeURIComponent(t[1]).replace(/\+/g," ")}),i}}]),n}();n.exports=r},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n)}return t(n,[{key:"getSelection",value:function(n,t,i){var r=i||new SelectionService;return n.forEach(function(n){"LISTTYPES"===n.selectionKey.toUpperCase()?r[n.selectionKey](n.groupType,function(n){t(n)},function(n){throw new advocacyComponents.errorAppUsage(n.message);}):r[n.selectionKey](function(n){t(n)},function(n){throw new advocacyComponents.errorAppUsage(n.message);})},this),null}},{key:"trackTag",value:function(n,t,i,r){var f=i||new TrackingService,u=r||advocacyComponents;return f.trackTag(n,t,function(t){void 0===JSON.stringify(t)?(u.log("TrackTag: "+n),u.trackTagResponse=n):u.log(JSON.stringify(t))},function(n){u.log(n)}),!0}},{key:"updateAdvocate",value:function(n,t,i,r){(r||new AdvocateProfileService).updateAdvocateProfile(n,function(n){t(n)},function(n){i(n)})}},{key:"resetPassword",value:function(n,t,i,r){(r||new AdvocatePasswordResetService).resetPassword(n,function(n){t(n)},function(n){i(n)})}},{key:"advocateService",value:function(n,t,i,r,u){var f=u||new AdvocateService;f[n](t,function(n){i(n)},function(n){r(n)})}},{key:"emailValidationService",value:function(n,t,i,r){var u=r||new EmailValidationService;u.validate(n,function(n){t(n)},function(n){i(n)})}},{key:"getCaptcha",value:function(n,t){(t||new CaptchaService).getCaptcha(function(t){localStorage.setItem("PublicAffairs_Captcha_Id",JSON.stringify(t.id));n(t)},function(t){n(t)})}},{key:"validateLetterBodyService",value:function(n,t,i,r,u,f){var e=f||new ProfanityFilteringService;"filterWithMask"===n?e[n](t,u,function(n){i(n)},r):e[n](t,function(n){i(n)},r)}}]),n}();n.exports=i},function(n,t,i){"use strict";n.exports=function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.EmailPreferenceValidator=i(10);this.LengthValidator=i(11);this.IdValidator=i(12);this.RequiredValidator=i(13);this.EmailValidator=i(6);this.PhoneValidator=i(14);this.PostalPreferenceValidator=i(15);this.ZipCodeValidator=i(16);this.MultiLineBroadTextValidator=i(17);this.SingleLineAsciiAndForeignTextValidator=i(18);this.SingleLineAsciiTextValidator=i(19);this.GroupAssociationsValidator=i(20);this.ZipOrStatePresenceValidator=i(21);this.NoValidator=i(22);this.AdditionalFieldCheckBoxValidator=i(23);this.AdditionalCheckBoxGroupValidator=i(24)}},function(n,t,i){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),f=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);var t=i(1);this.DOMHelper=new t}return u(n,[{key:"processTemplateConditionals",value:function(){Array.prototype.slice.call(this.DOMHelper.findAll("pa-display-if")).forEach(function(n){-1<n.getAttribute("data-bind").indexOf("-processed")&&n.parentNode.removeChild(n)})}},{key:"deleteProcessedKeys",value:function(n){function i(n){n.childNodes.forEach(function(n){1<n.childNodes.length?i(n):t.test(n.innerText)?n.innerText=n.innerText.replace(t,""):t.test(n.nodeValue)?n.nodeValue=n.nodeValue.replace(t,""):t.test(n.value)?n.value=n.value.replace(t,""):n.attributes&&function(n){Object.keys(n.attributes).forEach(function(i){if(n.attributes[i]){var r=n.attributes[i].value?n.attributes[i].value:"";n.attributes[i].value=r.replace(t,"")}})}(n)},this)}var r,t=new RegExp(/{(.*?)-processed}/g);r=n||Array.prototype.slice.call(this.DOMHelper.findAll("data-binder"));Array.isArray(r)?r.forEach(function(n){i(n)}):n&&i(n)}},{key:"populateTemplateElements",value:function(n,t,i,r,u){var f=this,o=f.DOMHelper.find(t),e=f.DOMHelper.find(n);return!!e&&(i.forEach(function(n){var t=e.cloneNode(!0),i=t.innerHTML.match(/{(.*?)}/g);i&&i.forEach(function(i){var u=f.removeProcessedFromKeys(i,t).replace(/[{}]/g,""),e=f.accessAttributeInObject(n,u.replace(r+".",""));t.innerHTML=e?t.innerHTML.replace("{"+u+"}",e):(u="legislator.picture")?t.innerHTML.replace("{"+u+"}","https://online.gractions.com/pics/icon-no-photo-01.jpg"):t.innerHTML.replace("{"+u+"}","{"+u+"-processed}")});o.insertAdjacentHTML("beforeEnd",t.innerHTML)},this),u||void 0===u?(e.parentNode.removeChild(e),o.setAttribute("data-bind","filled-container"),this.processTemplateConditionals()):this.populateTemplateElements(n,t,i,r),!0)}},{key:"processTemplateCheckboxes",value:function(n,t,i,r,u){var f=this;n.forEach(function(n){var e=f.DOMHelper.find("["+u+"='"+n[i]+"']");e&&f.DOMHelper.setAttributes(e,{checked:"true"});n[t]===r&&e&&f.DOMHelper.setAttributes(e,{disabled:"true'",checked:"true"})})}},{key:"proccessImgSource",value:function(){var n=this.DOMHelper.findAll("[data-imagebind]"),t=/[{}]/g;n.forEach(function(n){n.dataset[n.dataset.imagebind].match(t)||(n[n.dataset.imagebind]=n.dataset[n.dataset.imagebind])})}},{key:"populateBinderElements",value:function(){var t=this.DOMHelper.findAll("data-binder"),n=this;t.forEach(function(t){var i=t.innerHTML.match(/{(.*?)}/g);i&&i.forEach(function(i){var r=n.removeProcessedFromKeys(i,t).replace(/[{}]/g,""),o=(r=r.replace("-processed","")).split("."),f,u,e;o.pop();f=o.join(".");u=n.getDataObject(f);u&&0!==Object.keys(u).length?(e=n.accessAttributeInObject(u,r.replace(f+".","")),t.innerHTML=e?t.innerHTML.replace("{"+r+"}",e):t.innerHTML.replace("{"+r+"}","{"+r+"-processed}")):t.innerHTML=t.innerHTML.replace("{"+r+"}","{"+r+"-processed}")})});this.processTemplateConditionals()}},{key:"getEmailArray",value:function(n){var t=[];return n.recipientGroups.forEach(function(n){"Email"===n.communicationChannel&&t.push(n)}),t}},{key:"getDataObject",value:function(n,t){var f,i=null,u=t||advocacyComponents,r=[];if(f=-1<n.indexOf("advocate")?"advocate":n,["alert.recipient","alert.letter","alert.letter.body","alert.recipient.address","alert.letter.sender.address"].includes(f))try{r=this.getEmailArray(u.takeaction.actionDetailResponse.callToAction)}catch(f){r=[]}switch(f){case"advocate":i=this.getObjectOrArraysFromDataObject(n,u.advocate);break;case"alert":try{i=u.takeaction.actionDetailResponse.callToAction}catch(f){i={}}break;case"alert.recipient":try{i=0<r.length?r[0].recipients[0]:u.takeaction.actionDetailResponse.callToAction.recipientGroups[0].recipients[0]}catch(f){i={}}break;case"alert.letter":try{i=0<r.length?r[0].letter:u.takeaction.actionDetailResponse.callToAction.recipientGroups[0].letter}catch(f){i={}}break;case"alert.letter.body":try{i=0<r.length?r[0].letter.body:u.takeaction.actionDetailResponse.callToAction.recipientGroups[0].letter.body}catch(f){i={}}break;case"alert.recipient.address":try{i=0<r.length?r[0].letter.addressee.address:u.takeaction.actionDetailResponse.callToAction.recipientGroups[0].letter.addressee.address}catch(f){i={}}break;case"alert.letter.sender.address":try{i=0<r.length?r[0].letter.sender.address:u.takeaction.actionDetailResponse.callToAction.recipientGroups[0].letter.sender.address}catch(f){i={}}break;default:i={}}return i}},{key:"getObjectOrArraysFromDataObject",value:function(n,t){var i=n.split("."),u,f;return 1>=i.length?t:Array.isArray(t[i[1]])?(u=i[2].replace(/[\[\]]/g,""),f=parseInt(u),t[i[1]][f]):"object"===r(t[i[1]])?t[i[1]]:void 0}},{key:"accessAttributeInObject",value:function(n,t){return t.split(".").reduce(function(n,t){return n&&void 0!==n[t]?n[t]:null},n)}},{key:"removeProcessedFromKeys",value:function(n,t){if(-1<n.indexOf("-processed")){var i=n.replace("-processed","");return t.innerHTML=t.innerHTML.replace(n,i),i}return n}}]),n}();n.exports=f},function(n){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},i=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n)}return i(n,[{key:"composeHomeOrWorkAddress",value:function(n,t,i,r){var u=i||new Address,e=r||advocacyComponents,o=e.registration.formsConfig[e.registration.validatingFormId],f;return void 0!==o&&(f=o.namingPrefix),t.forEach(function(t){switch((void 0!==f&&0<f.length?t.name.replace(f,""):t.name).toUpperCase()){case"ADDRESS1":u.address1=t.value;delete n[t.name];break;case"ADDRESS2":u.address2=t.value;delete n[t.name];break;case"CITY":u.city=t.value;delete n[t.name];break;case"STATE":t.options?"--"!==t.options[t.selectedIndex].value&&(u.state=t.options[t.selectedIndex].value):u.state=t.value;delete n[t.name];break;case"ZIP":u.zip=t.value;delete n[t.name]}},this),u}},{key:"assembleUtms",value:function(n,t){var i=n.UTM;return Object.keys(i).forEach(function(n){if(void 0!==i)switch(n.toLowerCase()){case"source":i[n]==parseInt(i[n],10)&&(t.registrationSourceId=parseInt(i[n],10));break;case"medium":t.medium=i[n];break;case"campaign":i[n]==parseInt(i[n],10)&&(t.campaignAdId=parseInt(i[n],10));break;case"term":t.termContent=i[n];break;case"content":t.adUnit=i[n];break;case"url":t.url=i[n]}}),t}},{key:"assembleGroupAssociation",value:function(n,t,i){"function"==typeof GroupAssociation&&(i=GroupAssociation);var r=[];return Array.isArray(n.advocate.groupAssociations.groupAssociation)?r=n.advocate.groupAssociations.groupAssociation:Array.isArray(n.advocate.groupAssociations)&&(r=n.advocate.groupAssociations),void 0!==n.advocate.groupAssociations&&(t.groupAssociations=[],r.forEach(function(n){var r=new i;r.groupCode=n.groupCode;r.subgroupCode=n.subgroupCode;t.groupAssociations.push(r)})),t}},{key:"assembleShare",value:function(n,i){return void 0!==n.object&&Object.keys(n.object).forEach(function(r){var u=n.object[r];Array.isArray(u)||"object"===(void 0===u?"undefined":t(u))||(i[r]=n.object[r])},this),i}},{key:"assembleAdvocate",value:function(n,t){return void 0!==n.advocate&&Object.keys(n.advocate).forEach(function(i){var r=n.advocate[i];"--"!==r&&""!==r&&(Array.isArray(r)||(t[i]="PostalPreference"===i||"EmailPreference"===i?n.advocate[i].toUpperCase():n.advocate[i]))},this),n.advocate.socialMediaAccounts&&(t.socialMediaAccounts=n.advocate.socialMediaAccounts),(n.advocate.groupAssociation||n.advocate.groupAssociations)&&this.assembleGroupAssociation(n,t,"GroupAssociation"),t}},{key:"assembleAddressGroup",value:function(n){Object.keys(n.advocate).forEach(function(t){if("homeAddress"===t||"workAddress"===t||"otherAddress"===t){var i=[];null!==n.advocate[t]&&(Object.keys(n.advocate[t]).forEach(function(r){var u={};u.name=r;u.value=n.advocate[t][r];i.push(u)}),n.advocate[t]=this.composeHomeOrWorkAddress(n.advocate,i))}},this)}},{key:"excludeDataFromSelectionData",value:function(n){var i;i="object"===t(n.data[0]);n.excludeItemsList.forEach(function(t){var r=t.toUpperCase();i?n.data.forEach(function(t){var i;t.name?i=t.name.toUpperCase():t.description&&(i=t.description.toUpperCase());i===r&&n.data.splice(n.data.indexOf(t),1)}):n.data.map(function(t){t.toUpperCase()===r&&n.data.splice(n.data.indexOf(t),1)})})}},{key:"composeAdditionalInformationData",value:function(n,t,i){var r=[];return n.forEach(function(n){var u=i||new AdditionalInformationData,f=t[n.name];u.fieldId=f.id;u.value=[];u.value.push(n.value);r.push(u)},this),r}},{key:"validateLetterBodyService",value:function(n,t,i,r,u,f){var e=f||new ProfanityFilteringService;"filterWithMask"===n?e[n](t,u,i,r):e[n](t,i,r)}},{key:"addAdvocateParticipation",value:function(n,t,i,r,u){(u||new ParticipationService).addAdvocateParticipation(n,t,i,r)}},{key:"addGroupAssociationsToAdvocate",value:function(n,t,i,r,u){(u||new AdvocateService).addGroupAssociationsToAdvocate(n,t,i,r)}},{key:"removeGroupAssociationsFromAdvocate",value:function(n,t,i,r,u){(u||new AdvocateService).removeGroupAssociationsFromAdvocate(n,t,i,r)}},{key:"setUserDefinedFields",value:function(n,t,i,r,u){(u||new AdvocateService).setUserDefinedFieldsForAdvocate(n,t,i,r)}}]),n}();n.exports=r},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.regex=/^[A-Za-z0-9!#$%&'*+/=?^_ `{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+(?:[A-Z]{2,4}|aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)$/;this.validationResponse}return t(n,[{key:"validate",value:function(n){return this.regex.test(n.value.trim())?this.validationResponse("EmailValidator",!0,[],n):this.validationResponse("EmailValidator",!1,["The email doesn't have the correct format"],n)}}]),n}();n.exports=i},function(n){"use strict";var t=function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n)};t.prototype.fieldSettings={advocateFields:{Id:{max_length:50,validators:["IdValidator"]},OtherId:{max_length:50,validators:["IdValidator"]},FacebookId:{max_length:100,validators:["IdValidator"]},Prefix:{max_length:20,validators:["SingleLineAsciiAndForeignTextValidator"]},FirstName:{max_length:40,validators:["RequiredValidator","SingleLineAsciiAndForeignTextValidator"]},AdditionalCheckboxField:{max_length:0,validators:["AdditionalFieldCheckBoxValidator"]},AdditionalCheckboxGroup:{max_length:0,validators:["AdditionalCheckBoxGroupValidator"]},MiddleName:{max_length:40,validators:["SingleLineAsciiAndForeignTextValidator"]},LastName:{max_length:40,validators:["RequiredValidator","SingleLineAsciiAndForeignTextValidator"]},Suffix:{max_length:40,validators:["SingleLineAsciiAndForeignTextValidator"]},HomeEmail:{max_length:100,validators:["EmailPreferenceValidator","EmailValidator"]},WorkEmail:{max_length:100,validators:["EmailPreferenceValidator","EmailValidator"]},HomePhone:{max_length:0,validators:["PhoneValidator"]},WorkPhone:{max_length:0,validators:["PhoneValidator"]},WorkPhoneExtension:{max_length:10,validators:["IdValidator"]},MobilePhone:{max_length:0,validators:["PhoneValidator"]},AlternatePhone:{max_length:0,validators:["PhoneValidator"]},Occupation:{max_length:100,validators:["SingleLineAsciiAndForeignTextValidator"]},PartyCode:{max_length:0,validators:[]},EthnicityCode:{max_length:0,validators:[]},Company:{max_length:100,validators:["SingleLineAsciiAndForeignTextValidator"]},Title:{max_length:100,validators:["SingleLineAsciiAndForeignTextValidator"]},EmailPreference:{max_length:0,validators:["RequiredValidator"]},PostalPreference:{max_length:0,validators:[]},HomeAddress:{max_length:0,validators:["PostalPreferenceValidator"]},WorkAddress:{max_length:0,validators:["PostalPreferenceValidator"]},OtherAddress:{max_length:0,validators:["PostalPreferenceValidator"]},Address1:{max_length:50,validators:["SingleLineAsciiAndForeignTextValidator"]},Address2:{max_length:50,validators:["SingleLineAsciiAndForeignTextValidator"]},City:{max_length:75,validators:["SingleLineAsciiAndForeignTextValidator"]},State:{max_length:2,validators:["ZipOrStatePresenceValidator"]},Zip:{max_length:10,validators:["ZipOrStatePresenceValidator","ZipCodeValidator"]},Country:{max_length:10,validators:[""]},SubsetId:{max_length:0,validators:[]},GroupAssociations:{max_length:0,validators:["GroupAssociationsValidator"]}},udf:{max_length:100,validators:["MultiLineBroadTextValidator"],qty:"24"},shareYourStoryFields:{Subject:{subject:100,validators:["RequiredValidator","SingleLineAsciiAndForeignTextValidator"]},Text:{subject:0,validators:["RequiredValidator","MultiLineBroadTextValidator"]}}};n.exports=t},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"populateRegistrationForm",value:function(n,t,i){var u=i||advocacyComponents,r;t&&(r=u.registration.forms[t],Object.keys(r).forEach(function(t){"FirstName"===t?r[t].value=n.first_name:"LastName"===t?r[t].value=n.last_name:"HomeEmail"===t?r[t].value=n.email:"State"===t?r[t].value=n.location.name.split(",")[0]:void 0}))}}]),t}(i(1));n.exports=u},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n)}return t(n,[{key:"addGroupAssociation",value:function(n,t){return n.groupAssociations.find(function(n){return n.subgroupCode===t.subgroupCode})||n.groupAssociations.push(t),n}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.$homeEmail;this.$workEmail;this.$emailPreference;this.validationResponse}return t(n,[{key:"validate",value:function(n){var t,i=this.isPreferenceValid(n);return i||("WORK"===this.$emailPreference?t=this.$workEmail:"HOME"===this.$emailPreference&&(t=this.$homeEmail),void 0!==t&&0<t.length?this.validationResponse("EmailPreferenceValidator",!0,"The preferred email matches the given email",n):this.validationResponse("EmailPreferenceValidator",!1,"The preferred email field is empty",n))}},{key:"isPreferenceValid",value:function(n){return void 0===this.$emailPreference||0===this.$emailPreference.length?this.validationResponse("EmailPreferenceValidator",!0,"No email preference was specified",n):(this.$emailPreference=this.$emailPreference.replace(" ","").toUpperCase(),"WORK"!==this.$emailPreference&&"HOME"!==this.$emailPreference?this.validationResponse("EmailPreferenceValidator",!1,"The preference can only be ‘WORKEMAIL’ or ‘HOMEEMAIL’.",n):void 0)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.validationResponse}return t(n,[{key:"validate",value:function(n,t){var u=n.value,i=n.maxlength,r=t.max_length;return void 0===i&&isNaN(i)&&(i=r),parseInt(i)>=r&&u.length<=parseInt(r)?this.validationResponse("LengthValidator",!0,"Validated against apiMaxLength",n):parseInt(i)<r&&u.length<=parseInt(i)?this.validationResponse("LengthValidator",!0,"Validated against custom maxLength",n):this.validationResponse("LengthValidator",!1,"The length of the field is greater than max length allowed",n)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.regex=/[a-zA-Z0-9.{}@_-]/gi;this.validationResponse}return t(n,[{key:"getInvalidCharacter",value:function(n){var t=n.replace(this.regex,"");return 0<t.length&&t}},{key:"validate",value:function(n){var i=n.value,t=this.getInvalidCharacter(i);return!1===t?this.validationResponse("IdValidator",!0,[],n):this.validationResponse("IdValidator",!1,["The id doesn't meet the requirements"],n,t)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.validationResponse}return t(n,[{key:"validate",value:function(n){var t=n.value.trim();return 0<t.length&&"--"!==t?this.validationResponse("RequiredValidator",!0,[],n):this.validationResponse("RequiredValidator",!1,"The field is empty and it is a required field.",n)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.regex=/^\(?(\d{3})\)?[\s-]?(\d{3})[\s-]?(\d{4})$/i;this.validationResponse}return t(n,[{key:"validate",value:function(n){return this.regex.test(n.value)?this.validationResponse("PhoneValidator",!0,"",n):this.validationResponse("PhoneValidator",!1,"The Phone Number is incorrect.",n)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.validationResponse;this.$addresfieldArray}return t(n,[{key:"isPreferenceValid",value:function(n,t){if(0>=n)return this.validationResponse("PostalPreferenceValidator",!1,"The Preference field is empty",t)}},{key:"validate",value:function(n){var t=n.value.toUpperCase().trim(),i=this.isPreferenceValid(t.length,n);return i||("WORK"===t||"HOME"===t||"OTHER"===t?void 0===this.$addresfieldArray?this.validationResponse("PostalPreferenceValidator",!1,"The postal preference doesn't match the selected options.",n):this.validationResponse("PostalPreferenceValidator",!0,"",n):this.validationResponse("PostalPreferenceValidator",!1,"The Preference setting doesn't match a known setting",n))}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.regex="(^\\d{5}(\\-\\d{4})?$)|(^\\d{9}?$)";this.validationResponse}return t(n,[{key:"validate",value:function(n){var t=n.value,i=new RegExp(this.regex).test(t);return 0===n.value.length||i?this.validationResponse("ZipCodeValidator",!0,"",n):this.validationResponse("ZipCodeValidator",!1,"The zip code doesn't have at least 5 characters",n)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.regex=/[\x20-\x7E\u00BF-\u00FF\t\n\r\u00A2\u00A3\u00A5\u00A9\u00AE\u00B0\u00B1\u00B2\u00B3\u00B9\u00BC\u00BD\u00BE]/gi;this.validationResponse}return t(n,[{key:"getInvalidCharacter",value:function(n){var t=n.replace(this.regex,"");return 0<t.length&&t}},{key:"validate",value:function(n){var t=this.getInvalidCharacter(n.value);return!1===t?this.validationResponse("MultiLineBroadTextValidator",!0,[],n,t):this.validationResponse("MultiLineBroadTextValidator",!1,["The field value has some invalid chars."],n,t)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.regex=/[\x20-\x7E\u00BF-\u00FF]/gi;this.validationResponse}return t(n,[{key:"getInvalidCharacter",value:function(n){var t=n.replace(this.regex,"");return 0<t.length&&t}},{key:"validate",value:function(n){var t=this.getInvalidCharacter(n.value);return!1===t?this.validationResponse("SingleLineAsciiAndForeignTextValidator",!0,"",n,t):this.validationResponse("SingleLineAsciiAndForeignTextValidator",!1,["The field value is empty."],n,t)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.regex=/[\x20-\x7E]/gi;this.validationResponse}return t(n,[{key:"getInvalidCharacter",value:function(n){var t=n.replace(this.regex,"");return 0<t.length&&t}},{key:"validate",value:function(n){var t=this.getInvalidCharacter(n.value);return!1===t?this.validationResponse("SingleLineAsciiTextValidator",!0,"",n,t):this.validationResponse("SingleLineAsciiTextValidator",!1,"The field value is empty.",n,t)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.validationResponse;this.valid=!1}return t(n,[{key:"validate",value:function(n){var t=n.groupCode,r=n.subgroupCode,i=!0,u;return(void 0===t&&(t=n.getAttribute("data-groupCode")),t=t.trim(),void 0===r)?(u=n.querySelectorAll("option:checked"),Array.from(u).map(function(n){return n.value}).forEach(function(n){0===n.length&&(i=!1)})):0===r.length&&(i=!1),i&&0<t.length?this.validationResponse("GroupAssociationsValidator",!0,"",n):this.validationResponse("GroupAssociationsValidator",!1,"Both groupCode and subgroupCode are required.",n)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.validationResponse;this.$zipField;this.$stateField}return t(n,[{key:"validate",value:function(n,t){var r,i=!1;return"STATE"===(r=t?n.name.replace(t,""):n.name).toUpperCase()?i=this.validateState(n,i):"ZIP"===r.toUpperCase()&&(i=this.validateZip(n,i)),i?this.validationResponse("ZipOrStatePresenceValidator",!0,"At least one value was given State or Zip "+n.name,n):this.validationResponse("ZipOrStatePresenceValidator",!1,"The zip code or state are required, both were empty",n)}},{key:"validateState",value:function(n){return!!("--"!==(n.options?void 0===n.options[n.selectedIndex]?"--":n.options[n.selectedIndex].value:n.value)||this.$zipField&&0<this.$zipField.value.length)}},{key:"validateZip",value:function(n){var t;return t=this.$stateField?this.$stateField.value?this.$stateField.value:void 0===this.$stateField.options[this.$stateField.selectedIndex]?"--":this.$stateField.options[this.$stateField.selectedIndex].value:"--",0<n.value.length||"--"!==t}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.validationResponse}return t(n,[{key:"validate",value:function(n){return this.validationResponse("NoValidator",!0,["This field has no validation rules"],n)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.validationResponse}return t(n,[{key:"validate",value:function(n){return n.checked?this.validationResponse("AdditionalFieldCheckBoxValidator",!0,[],n):this.validationResponse("AdditionalFieldCheckBoxValidator",!1,"This field is required.",n)}}]),n}();n.exports=i},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.validationResponse}return t(n,[{key:"validate",value:function(n){return this.isValid(n.name)?this.validationResponse("AdditionalCheckBoxGroupValidator",!0,[],n):this.validationResponse("AdditionalCheckBoxGroupValidator",!1,"This field is required.",n)}},{key:"getRelatedCheckbox",value:function(n){return document.getElementsByName(n)}},{key:"isValid",value:function(n){var i=this.getRelatedCheckbox(n),t=!1;return i.forEach(function(n){n.checked&&(t=!0)}),t}}]),n}();n.exports=i},function(n,t,i){"use strict";var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function(n){function t(){var n,r,u,f;return!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n.config={},n.forms={},n.errorLog=[],n.formStatus={},n.formsConfig=[],n.advocateFields=[],n.validatingFormId,r=i(26),n.APIService=new r,n.constructors=[],n.constructors.configs={ApiFieldsConfig:i(7),ValidationErrorConfig:i(30)},n.constructors.services={ValidationService:i(27),HeadlessValidationService:i(29)},u=i(3),n.constructors.validators=new u,f=i(8),n.HelperDomRegistration=new f,n}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),f(t,[{key:"init",value:function(n,t){if(this.log("Initializing the Registration Component ->"),this.apiConfig=new this.constructors.configs.ApiFieldsConfig,this.initValidationErrors(t),n)return this.validationService=new this.constructors.services.ValidationService(this.apiConfig,this),this.initForm(n,t);if(t&&"object"===(void 0===t?"undefined":u(t)))return this.formsConfig.headlessForm=t,this.headlessValidationService=new this.constructors.services.HeadlessValidationService(this.apiConfig),!0;throw this.errorAppRuntime("[ConfigError] - Missing argument registration.init(formSelector/null, formConfigObject)");}},{key:"initValidationErrors",value:function(n){var t,i,r;if(void 0!==this.constructors.configs.ValidationErrorConfig&&(t=new this.constructors.configs.ValidationErrorConfig),void 0!==n&&void 0!==n.errorSettings)try{i=t.errorSettings;r=n.errorSettings;this.errorSettingsOverride(i,r)}catch(i){throw this.errorAppUsage("Cannot read the Error Settings Object config. Please check your config.");}else this.errorSettings=t.errorSettings;this.log("Validation Error Messages");this.log(this.errorSettings)}},{key:"errorSettingsOverride",value:function(n,t){for(var i in n)t.hasOwnProperty(i)||(this.errorSettings=t,this.errorSettings[i]=n[i])}},{key:"autopopulateDropdowns",value:function(n){var t=[];this.forms[n]&&(this.forms[n].hasOwnProperty("homeAddress")&&this.forms[n].homeAddress.State&&t.push(this.forms[n].homeAddress.State),this.forms[n].hasOwnProperty("workAddress")&&this.forms[n].workAddress.State&&t.push(this.forms[n].workAddress.State),this.forms[n].hasOwnProperty("otherAddress")&&this.forms[n].otherAddress.State&&t.push(this.forms[n].otherAddress.State));0<t.length&&t.forEach(function(n){this.getSelection([{selectionKey:"listStates",fieldsIDs:[n.id],formFieldType:"select",ordering:"DESC"}])},this)}},{key:"initForm",value:function(n,t){return this.formsConfig[n]=t||{},this.DOMHelper.initForm(n,this),{}!==this.formsConfig[n]&&this.autopopulateDropdowns(n),this.errorLog[n]=[],this.TemplateHelper.deleteProcessedKeys(),this.log("Form Config ->"),this.log(this.formsConfig[n]),this.log("Form Fields ->"),this.log(this.forms[n]),!0}},{key:"handleSubmitButton",value:function(n,t){if(this.formsConfig[n]&&this.formsConfig[n].hasOwnProperty("submit")?!this.DOMHelper.interceptSubmit(this.formsConfig[n].submit,this.formsConfig[n],"registration","register"):t?!this.DOMHelper.interceptSubmit(n+" input[type=submit], "+n+" button",this.formsConfig[n],"registration","register"):!this.DOMHelper.interceptSubmit("input[type=submit]"+n+", button"+n,this.formsConfig[n],"registration","register"))throw this.errorAppRuntime("[Code: R1] Cannot find a submit button in the form.");return!0}},{key:"composingAdvocateAndUTMs",value:function(n,t,i,r,u){return this.log("composingAdvocateAndUTMs"),this.passedCustomValidation?i===r&&(u&&u.isValid&&this.log("Deep Validation was success"),void(n?(this.log("Validation Passed! Registering Advocate against API..."),this.setAddress(),this.validationService.validObject.UTM=this.getUTM(),this.assembleAdvocateAndUTMs(this.validationService.validObject,this.formsConfig[t])):this.onValidationError(this.errorLog[t],this.formsConfig[t]))):(this.forms[t].submitButton.disabled=!1,void this.log("custom validation did not pass"))}},{key:"callingEmailValidationService",value:function(n,t,i,r,u){this.log("callingEmailValidationService");var f=this;f.APIService.emailValidationService(n.value,function(n){if(n.isValid)f.composingAdvocateAndUTMs(r,u,i,t,n);else{var e={account:n.account,address:n.address,domain:n.domain,isCorrected:n.isCorrected,isDisposable:n.isDisposable,isRole:n.isRole,isSpamtrap:n.isSpamtrap,isValid:n.isValid};f.onValidationError(e,f.formsConfig[u])}},function(n){f.onError(n,f)})}},{key:"register",value:function(n,t){var f,i,r,o,s,u,e;if("function"==typeof t.preventDefault()&&t.preventDefault(),i=t.target.getAttribute("data-formid"),r=this,null===i||""===i||"undefined"===i)throw this.errorAppUsage("Missing form/container ID");void 0!==this.formsConfig[i].onClick&&this.formsConfig[i].onClick();this.forms[i].submitButton=t.target;this.DOMHelper.toggleDisable(t.target);this.validatingFormId=i;o=this.validationService.validateForm(i,this);(f=o.status[i],0!==this.validationService.validObject.object.length)?(s=this.validatingFormId,this.DOMHelper.toggleDisable(this.forms[s].submitButton),this.onValidationError(this.errorLog[i],this.formsConfig[i])):this.formsConfig[i].hasOwnProperty("deepValidateEmail")&&this.formsConfig[i].deepValidateEmail?(this.log("Deep Validation: True"),u=[],e=0,Object.keys(this.forms[i]).forEach(function(n){"HomeEmail"!==n&&"WorkEmail"!==n&&"OtherEmail"!==n||u.push(r.forms[i][n])},this),u.forEach(function(n){e++;r.callingEmailValidationService(n,e,u.length,f,i)})):r.composingAdvocateAndUTMs(f,i,0,0)}},{key:"headlessRegister",value:function(n){void 0!==this.formsConfig.headlessForm.onClick&&this.formsConfig.headlessForm.onClick();this.validatingFormId="headlessForm";try{var i=this.headlessValidationService.validateHeadLessObject(n,this)}catch(t){throw this.errorAppUsage("Problems Validating the Field -> "+t);}if(i.status.advocate){this.log("Validation Passed! Registering Advocate against API...");try{n.advocate.emailPreference&&(n.advocate.emailPreference=n.advocate.emailPreference.toUpperCase());n.advocate.postalPreference&&(n.advocate.postalPreference=n.advocate.postalPreference.toUpperCase());void 0===n.UTM?n.UTM=this.getUTM():this.setUTM(n.UTM);n.advocate&&this.APIHelper.assembleAddressGroup(n);this.assembleAdvocateAndUTMs(n)}catch(t){throw this.errorAppSystem("Problems contacting the API -> "+t.message);}}else this.onValidationError(this.errorLog.advocate,n)}},{key:"setAddress",value:function(){var n,t,i;void 0!==this.homeAddressGroup&&(8>this.homeAddressGroup.length&&this.log("Notice: The Address Object is incomplete, make sure all your address fields include a data-addressGroup attribute?"),n=this.APIHelper.composeHomeOrWorkAddress(this.validationService.validObject.object,this.homeAddressGroup),this.validationService.validObject.object.homeAddress=n);void 0!==this.workAddressGroup&&(8>this.workAddressGroup.length&&this.log("Notice: The Address Object is incomplete, make sure all your address fields include a data-addressGroup attribute?"),t=this.APIHelper.composeHomeOrWorkAddress(this.validationService.validObject.object,this.workAddressGroup),this.validationService.validObject.object.workAddress=t);void 0!==this.otherAddressGroup&&(8>this.otherAddressGroup.length&&this.log("Notice: The Address Object is incomplete, make sure all your address fields include a data-addressGroup attribute?"),i=this.APIHelper.composeHomeOrWorkAddress(this.validationService.validObject.object,this.otherAddressGroup),this.validationService.validObject.object.otherAddress=i)}},{key:"handleInputValidationErrorFromAPI",value:function(n,t){var i,r=n.message.split(" - "),u={status:!1,message:void 0===r[1]?n.message:r[1]};"100012"===n.errorCode?i=t.WorkEmail:"100011"===n.errorCode&&(i=t.HomeEmail);advocacyComponents.registration.DOMHelper.toggleInvalid(i,u)}},{key:"assembleAdvocateAndUTMs",value:function(n,t){n.advocate=n.object;var u,i,r=this;(t||(t={}),"undefined"==typeof Advocate?(u={},i={}):(u=new Advocate,i=new RegistrationData),n.UTM&&(this.APIHelper.assembleUtms(n,i),delete n.UTM),i.registrant=this.APIHelper.assembleAdvocate(n,u),this.socialMediaAccounts&&(i.registrant.advocate.socialMediaAccounts=this.socialMediaAccounts),void 0!==n.onSuccess&&(t=n),this.DOMHelper.find("[data-bind='multiSteps']"))?this.mergeAdvocateInContext(i.registrant)&&function(n,t){var i=t.validatingFormId;t.formsConfig[i].hasOwnProperty("onSuccess")&&t.formsConfig[i].onSuccess(n)}({type:"MultiStepsSuccess",status:!0},r):(i.registrant=this.mergeAdvocateInContext(i.registrant),i.registrant=this.cleanValidObject(i.registrant),this.APIService.registerAdvocate(i,function(n){"InputValidationError"===n.type?r.onError(n,r):r.onSuccess(n,r)},function(n){r.onError(n,r)},t))}},{key:"cleanValidObject",value:function(n){return["Address1","Address2","Zip","City","State"].forEach(function(t){n.hasOwnProperty(t)&&delete n[t]}),Object.keys(n).forEach(function(t){n[t]&&n[t].hasOwnProperty("key")&&(Object.keys(n[t]).forEach(function(i){Array.isArray(n[t][i])&&0===n[t][i].length&&delete n[t][i];""===n[t][i]&&delete n[t][i]}),0===n[t].length&&delete n[t]);""===n[t]&&0===n[t].length&&delete n[t]}),n}},{key:"onSuccess",value:function(n,t){t.advocate=n.registrant;var i=t.validatingFormId;t.formsConfig[i].hasOwnProperty("onSuccess")&&"InputValidationError"!==n.type?t.formsConfig[i].onSuccess(n):this.log("User was registered successfully")}},{key:"onError",value:function(n,t){var i=t.validatingFormId,r=t.formsConfig[i];r&&(t.DOMHelper.toggleDisable(t.forms[i].submitButton),("100012"===n.errorCode||"100011"===n.errorCode&&"0"===n.subcodes.int)&&t.handleInputValidationErrorFromAPI(n,t.forms[i]));r.hasOwnProperty("onError")?t.formsConfig[i].onError(n):console.info("Validation did not pass.")}},{key:"onValidationError",value:function(n,t){var r="undefined"==typeof advocacyComponents?this:advocacyComponents.registration,i=this.validatingFormId;void 0!==this.forms[i]&&(this.forms[i].submitButton.disabled=!1);void 0===t?console.info("Validation did not pass."):"function"==typeof t.onValidationError&&t.onValidationError(r.validatingFormId,n)}}]),t}(i(0));r.prototype.validateField=function(n){var t,i;return n.value=n.value.trim(),t=n.getAttribute("data-FormId"),this.validatingFormId=t,i=this.validationService.validateField(n,this,t),i&&(this.errorLog[t].length=0),i};n.exports=r},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"registerAdvocate",value:function(n,t,i,r,u){(u||new RegistrationService).register(n,function(n){t(n,r)},function(n){i(n,r)})}}]),t}(i(2));n.exports=u},function(n,t,i){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),f=function(n){function t(n,i){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t);var r=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.fields=n.fieldSettings.advocateFields,r.udf=n.fieldSettings.udf,r.validObject,r}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),u(t,[{key:"validateForm",value:function(n,t){var i,r;return this.component=t,this.resetObject(),this.component.errorLog[n]=[],this.component.formStatus[n]=!0,i=this.component.forms[n],Object.keys(i).forEach(function(n){var u=this,r=n.toLowerCase();"homeaddress"===r||"workaddress"===r||"otheraddress"===r||"udf"===r?Object.keys(i[n]).forEach(function(r){this.validateField(i[n][r],t)},this):Array.isArray(i[n])?i[n].forEach(function(n){n.GroupAssociations&&u.validateField(n.GroupAssociations,t);(n.checked||n.required)&&u.validateField(n,t)},this):"submitButton"!==n&&this.validateField(i[n],t)},this),r={},r.status=this.component.formStatus,r.log=this.component.errorLog,r}},{key:"applyValidators",value:function(n,t,i,r){var u=this.component.formsConfig[this.component.validatingFormId].namingPrefix;return n.forEach(function(n){var o,f,e;""===n.trim()&&(n="NoValidator");try{(f=new this.component.constructors.validators[n]).validationResponse=this.validationResponse.bind(this)}catch(l){throw this.component.errorSystem("The validator ("+n+") configured in the API is not matching any constructor");}switch(n){case"EmailPreferenceValidator":var s=this.component.DOMHelper.find('select[name="'+this.component.formsConfig[this.component.validatingFormId].namingPrefix+'EmailPreference"]'),h=this.component.DOMHelper.find('input[name="'+this.component.formsConfig[this.component.validatingFormId].namingPrefix+'HomeEmail"]'),c=this.component.DOMHelper.find('input[name="'+this.component.formsConfig[this.component.validatingFormId].namingPrefix+'WorkEmail"]');f.$homeEmail=h?h.value:"";f.$workEmail=c?c.value:"";f.$emailPreference=s?s.value:"";o=f.validate(i,r);break;case"ZipOrStatePresenceValidator":if(e=i.getAttribute("data-AddressGroup"),null===e)throw this.component.errorAppUsage('Field "'+i.name+'" is missing the data-AddressGroup attribute');this.component[e+"AddressGroup"]=this.component.DOMHelper.findAll('[data-AddressGroup="'+e+'"]');this.component[e+"AddressGroup"].forEach(function(n){u||(u="");n.name.toUpperCase()===u.toUpperCase()+"STATE"?f.$zipField=this.component.DOMHelper.find('[name="'+u+'zip"][data-AddressGroup="'+e+'"]'):n.name.toUpperCase()===u.toUpperCase()+"ZIP"&&(f.$stateField=this.component.DOMHelper.find('[name="'+u+'State"][data-AddressGroup="'+e+'"]'))},this);o=f.validate(i,u);break;default:o=f.validate(i,r)}!1===o.status&&(t=!1,this.component.DOMHelper.findAll('label.error-label[for="'+i.id+'"]').forEach(function(n){n.innerHTML=o.message}))},this),t}},{key:"addFieldToObj",value:function(n,t,i){var u,f;if(!0===t)u=i.getAttribute("data-udf"),"object"===r(this.validObject.object.uDFs)?this.validObject.object.uDFs:this.validObject.object.uDFs={},this.validObject.object.uDFs["field"+u]=i.value;else switch(n.toLowerCase()){case"groupassociations":"object"===r(this.validObject.object.groupAssociations)?this.validObject.object.groupAssociations:this.validObject.object.groupAssociations={};f=i.getAttribute("data-groupCode");this.addGroupAssociationToAdvocateObject(i,f);break;case"postalpreference":this.validObject.object[n]=i.options&&"--"!==i.options[i.selectedIndex].value?i.options[i.selectedIndex].value.toUpperCase():i.value.toUpperCase();break;default:this.addValueToValidObject(i,n)}}},{key:"addValueToValidObject",value:function(n,t){this.validObject.object[t]=n.options&&"--"!==n.options[n.selectedIndex].value?n.options[n.selectedIndex].value:"--"===n.value?"":n.value}},{key:"addGroupAssociationToAdvocateObject",value:function(n,t){if(Array.isArray(this.validObject.object.groupAssociations.groupAssociation)||(this.validObject.object.groupAssociations.groupAssociation=[]),"SELECT"===n.tagName){var i=n.querySelectorAll("option:checked");Array.from(i).map(function(n){return n.value}).forEach(function(n){"--"!==n&&this.validObject.object.groupAssociations.groupAssociation.push({groupCode:t,subgroupCode:n})},this)}else this.validObject.object.groupAssociations.groupAssociation.push({groupCode:t,subgroupCode:n.value})}},{key:"toggleErrorLabel",value:function(n,t,i,r){n?(this.addFieldToObj(t,r,i),i.classList.remove("invalid"),this.component.DOMHelper.findAll('label[for="'+i.id+'"]').forEach(function(n){n.classList.remove("invalid");n.classList.contains("error-label")&&(n.innerHTML="")})):(i.classList.add("invalid"),this.component.DOMHelper.findAll('label[for="'+i.id+'"]').forEach(function(n){n.classList.add("invalid")}))}},{key:"validateField",value:function(n,t){var c,s,h;this.component=t;var e,f,r,u,l=n.getAttribute("name"),o=!1,i={};void 0===this.validObject&&this.resetObject();try{if(f=l.replace(this.component.formsConfig[this.component.validatingFormId].namingPrefix,""),void 0===this.component.formsConfig[this.component.validatingFormId].fieldMap?f=f.capitalize():r=this.mapFieldName(this.component.formsConfig[this.component.validatingFormId].fieldMap,f),void 0===r&&(r=f),u=this.fields[r],c=n.getAttribute("data-validator")?n.getAttribute("data-validator"):"empty",void 0===(u=void 0===this.fields[r]?this.fields[c.capitalize()]:u)){if(s=this.component.getUDFConfig("data-udf",n),void 0===s)throw this.component.errorAppUsage("Field has no configuration. Please check the field name or namingPrefix");o=!0;u=s}e=u.validators}catch(e){return this.component.log("[R02] Ignored misconfigured field"),!1}return i=this.validateFieldsMetadata(n,u),h=!1,("checkbox"!==n.type&&"radio"!==n.type&&"--"!==n.value&&""!==n.value||0>e.indexOf("RequiredValidator")&&"RequiredValidator"!==i.validator&&(i.status=!0,i.validator="OptionalFieldValidator",i.message="Field is ignore because is an optional field and not require.",this.toggleErrorLabel(i.status,r,n),h=!0),!h)?!1===i.status?(this.toggleErrorLabel(i.status,r,n,o),i):(i=this.applyValidators(e,i,n,t),this.toggleErrorLabel(i.status,r,n,o),i):void 0}}]),t}(i(28));n.exports=f},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(t,i,r){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.fields=[];this.component=i;this.configObjectName=r||"formsConfig"}return t(n,[{key:"resetObject",value:function(){this.validObject=[];this.validObject.object=[]}},{key:"validateForm",value:function(n,t){var u=this,i,r;return this.component=t,this.resetObject(),this.component.errorLog[n]=[],this.component.formStatus[n]=!0,i=this.component.forms[n],Object.keys(i).forEach(function(n){"submitButton"!==n.toLowerCase()&&i[n].hasAttribute("name")&&u.validateField(i[n],t)},this),r={},r.status=this.component.formStatus,r.log=this.component.errorLog,r}},{key:"validateField",value:function(n,t){var e,u,i,f,r,o,s;this.component=t;o=n.getAttribute("name");void 0===this.validObject&&this.resetObject();try{if(u=o.replace(this.component[this.configObjectName][this.component.validatingFormId].namingPrefix,""),void 0===this.component[this.configObjectName][this.component.validatingFormId].fieldMap?u=u.capitalize():i=this.mapFieldName(this.component[this.configObjectName][this.component.validatingFormId].fieldMap,u),void 0===i&&(i=u),f=this.fields[i],s=n.getAttribute("data-validator")?n.getAttribute("data-validator"):"empty",void 0===(f=void 0===this.fields[i]?this.fields[s.capitalize()]:f))throw this.component.errorAppUsage("Field has no configuration. Please check the field name or namingPrefix");e=f.validators}catch(e){return this.component.log("[R02] Ignored misconfigured field"),!1}return!1===(r=this.validateFieldsMetadata(n,f)).status?(this.toggleErrorLabel(r.status,i,n),r):(r=this.applyValidators(e,r,n,t),this.toggleErrorLabel(r.status,i,n),r)}},{key:"validateFieldsMetadata",value:function(n,t){var i={status:!0},r,u;return n.hasAttribute("required")&&(r=new this.component.constructors.validators.RequiredValidator,r.validationResponse=this.validationResponse.bind(this),i=r.validate(n)),i.status&&(n.hasAttribute("maxlength")||0<t.max_length)&&(u=new this.component.constructors.validators.LengthValidator,u.validationResponse=this.validationResponse.bind(this),i=u.validate(n,t)),!1===i.status&&this.component.DOMHelper.findAll('label.error-label[for="'+n.id+'"]').forEach(function(n){n.innerHTML=i.message}),i}},{key:"applyValidators",value:function(n,t,i,r){return n.forEach(function(n){var u,f;""===n.trim()&&(n="NoValidator");try{(f=new this.component.constructors.validators[n]).validationResponse=this.validationResponse.bind(this)}catch(e){throw this.component.errorAppSystem("The validator ("+n+") configured in the API is not matching any constructor");}!1===(u=f.validate(i,r)).status&&(t=!1,this.component.DOMHelper.findAll('label.error-label[for="'+i.id+'"]').forEach(function(n){n.innerHTML=u.message}))},this),t}},{key:"addFieldToObj",value:function(n,t){this.validObject.object[n]=t.value}},{key:"toggleErrorLabel",value:function(n,t,i){n?(this.addFieldToObj(t,i),i.classList.remove("invalid"),this.component.DOMHelper.findAll('label[for="'+i.id+'"]').forEach(function(n){n.classList.remove("invalid");n.classList.contains("error-label")&&(n.innerHTML="")})):(i.classList.add("invalid"),this.component.DOMHelper.findAll('label[for="'+i.id+'"]').forEach(function(n){n.classList.add("invalid")}))}},{key:"mapFieldName",value:function(n,t){var i,r=JSON.stringify(n);return void 0!==(n=JSON.parse(r))&&n[t]&&(i=(i=n[t]).capitalize()),i}},{key:"validationResponse",value:function(n,t,i,r,u){var f,o,e;try{return f={},t||(o=this.component.errorSettings[n],i=this.setErrorLabel(o,r,i,u||"")),(f.field=r,f.status=t,f.validator=n,f.message=i,void 0!==r)&&(e=r.getAttribute("data-FormId"),t||(this.component.formStatus[e]=!1,this.component.errorLog[e].push(f),this.component.log(f.field.name+": "+f.message,"orange"))),f}catch(i){throw this.component.errorAppRuntime("Error composing the Validation Response: "+i.message);}}},{key:"setErrorLabel",value:function(n,t,i,r,u){var e=u||this.component,f;return n&&(f=e.DOMHelper.find('label[for="'+t.id+'"]'),null==f||f.classList.contains("error-label")?t.hasAttribute("placeholder")&&(i=n.errorMessage.replace("#FIELD_NAME#",t.placeholder)):i=n.errorMessage.replace("#FIELD_NAME#",f.innerText),i=i.replace("#CHARACTER#",r)),i}},{key:"validateProfanity",value:function(n,t,i,r){var u=this.component,f=t,e=u[this.configObjectName][this.component.validatingFormId].profanityFilterMask||"*";u[this.configObjectName][this.component.validatingFormId].allowSubmitWithMaskedSwearWords=u[this.configObjectName][this.component.validatingFormId].allowSubmitWithMaskedSwearWords||!1;u.log("[TakeAction] Validating letter..");void 0===u[u.validationService.configObjectName][this.component.validatingFormId].allowSubmitWithMaskedSwearWords&&(u[u.validationService.configObjectName][this.component.validatingFormId].allowSubmitWithMaskedSwearWords=!0);f&&0<f.value.length?u.APIService.validateLetterBodyService(u[u.validationService.configObjectName][this.component.validatingFormId].profanityFilterMask?"filterWithMask":"filter",f.value,function(t){!function(t){var o,s;f.value.trim()!==t.trim()?(f.value=t,u.validationService.validObject.object[n]=f.value,o=u.validationService.validationResponse("ContentValidation",!1,"Some words in your text did not pass our profanity filter and have been replaced with "+e,f),u.DOMHelper.toggleInvalid(o.field,o),u.isBodyValid=!0,u[u.validationService.configObjectName][u.validatingFormId].allowSubmitWithMaskedSwearWords||(u.isBodyValid=!1)):(s=u.validationService.validationResponse("ContentValidation",!0,"",f),u.DOMHelper.toggleInvalid(s.field,s),u.isBodyValid=!0);u.isBodyValidated=!0;u.evaluateValidation(i,r)}(t)},function(n){u.onError(n)},u[this.configObjectName][this.component.validatingFormId].profanityFilterMask):f&&0===f.value.length&&(u.isBodyValid=!1,u.isBodyValidated=!0)}}]),n}();n.exports=i},function(n){"use strict";function t(n){this.advocateFields=n.fieldSettings.advocateFields;this.uDFs=n.fieldSettings.udf}t.prototype.validateHeadLessObject=function(n,t){var r,i;return this.component=t,this.validAdvocateObject=[],r=this.createdVirtualForm(n),this.component.errorLog.advocate=[],this.component.formStatus.advocate=!0,Object.keys(n.advocate).forEach(function(n){if("homeAddress"===n||"workAddress"===n||"otherAddress"===n){var t={};t.name=n.charAt(0).toUpperCase()+n.slice(1);t.value="addressGroup";r.push(t)}}),r.forEach(function(i){var f=this.advocateFields[i.name],e,r,u;"udf"===i.name?this.validatedUDFfields(i,n,this.uDFs):f?(e=f.validators,r=n.advocate.postalPreference?n.advocate.postalPreference.toLowerCase():"home",e.forEach(function(u){var f,e;try{(f=new this.component.constructors.validators[u]).validationResponse=this.validationResponse.bind(this)}catch(o){throw new this.component.errorAppSystem("The validator ("+u+") configured in the API is not matching any constructor");}switch(u){case"GroupAssociationsValidator":i.value.forEach(function(n){f.validate(n,t)});break;case"EmailPreferenceValidator":f.$homeEmail={value:n.advocate.homeEmail};f.$workEmail={value:n.advocate.workEmail};f.$emailPreference=n.advocate.emailPreference;f.validate(i,t);break;case"PostalPreferenceValidator":"home"!==r&&"work"!==r&&"other"!==r||(f.$addresfieldArray=n.advocate[r+"Address"]);i={name:"postalPreference",value:r};f.validate(i,t);break;case"ZipOrStatePresenceValidator":e=i.addressGroup;f.$stateField={};f.$zipField={};f.$stateField.value=void 0===n.advocate[e].state?"":n.advocate[e].state;f.$zipField.value=void 0===n.advocate[e].zip?"":n.advocate[e].zip;f.validate(i);break;default:f.validate(i,t)}},this)):(u=new this.component.constructors.validators.NoValidator,u.validationResponse=this.validationResponse.bind(this),Array.isArray(i.value)?i.value.forEach(function(n){u.validate(n)}):u.validate(i))},this),this.component.log("Validation Complete!"),i={},i.status=this.component.formStatus,i.log=this.component.errorLog,this.component.log(i),i};t.prototype.validatedUDFfields=function(n,t,i){var u=i.validators,e=parseInt(i.qty),f=0,r;if(Object.keys(t.advocate.uDFs).forEach(function(){f++}),f>e)return this.validationResponse("UDFqtyValidator",!1,["The uDFs object exceeds the quantity allow"],{name:"udfs"});try{r=new this.component.constructors.validators[u];r.validationResponse=this.validationResponse.bind(this)}catch(i){throw new this.component.errorAppSystem("The validator ("+u+") configured in the API is not matching any constructor");}r.validate(n)};t.prototype.createdVirtualForm=function(n){var t={},i=[];return Object.keys(n.advocate).forEach(function(i){if("uDFs"===i)Object.keys(n.advocate[i]).forEach(function(r){var u=r.charAt(0).toUpperCase()+r.slice(1);t[i+u]=n.advocate[i][r]});else if("homeAddress"===i||"workAddress"===i||"otherAddress"===i)Object.keys(n.advocate[i]).forEach(function(r){var u=r.charAt(0).toUpperCase()+r.slice(1);t[i+u]=n.advocate[i][r]});else{var r=i.charAt(0).toUpperCase()+i.slice(1);t[r]=n.advocate[i]}}),Object.keys(t).forEach(function(n){var r={};-1<n.indexOf("homeAddress")?(r.name=n.replace("homeAddress",""),r.value=t[n],r.addressGroup="homeAddress"):-1<n.indexOf("workAddress")?(r.name=n.replace("workAddress",""),r.value=t[n],r.addressGroup="workAddress"):-1<n.indexOf("otherAddress")?(r.name=n.replace("otherAddress",""),r.value=t[n],r.addressGroup="otherAddress"):-1<n.indexOf("uDFsField")?(r.name="udf",r.value=t[n],r.field=n.replace("uDFs","")):(r.name=n,r.value=t[n]);i.push(r)}),i};t.prototype.validationResponse=function(n,t,i,r,u){var e=this.component.errorSettings[n],f;try{return!t&&e&&(i=(i=e.errorMessage.replace("#FIELD_NAME#",r.name)).replace("#CHARACTER#",u||"")),f={},f.field=r,f.status=t,f.validator=n,f.message=i,void 0===r||t||(this.component.formStatus.advocate=!1,this.component.errorLog.advocate.push(f)),f}catch(i){throw new this.component.errorAppSystem("Error composing the Validation Response: "+i.message);}};n.exports=t},function(n){"use strict";var t=function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n)};t.prototype.errorSettings={PhoneExtensionValidator:{errorMessage:"Invalid format. Extension can only contain numbers."},IdValidator:{errorMessage:"#FIELD_NAME# may not contain the following characters #CHARACTER#."},RequiredValidator:{errorMessage:"#FIELD_NAME# is a required field."},AdditionalFieldCheckBoxValidator:{errorMessage:"#FIELD_NAME# is required."},AdditionalCheckBoxGroupValidator:{errorMessage:"#FIELD_NAME# is required."},EmailValidator:{errorMessage:"#FIELD_NAME# is in an invalid format. Please try again."},EmailPreferenceValidator:{errorMessage:"Email Preference can only be ‘WORKEMAIL’ or ‘HOMEEMAIL’."},PhoneValidator:{errorMessage:"Phone number is an invalid format. (format: XXX-XXX-XXXX)."},PostalPreferenceValidator:{errorMessage:"#FIELD_NAME# is not a valid group code."},ZipCodeValidator:{errorMessage:"Zip code is an invalid format. Please try again (format: 55555 or 99999-9999)."},MultiLineBroadTextValidator:{errorMessage:"#FIELD_NAME# may not contain the following characters #CHARACTER#."},SingleLineAsciiAndForeignTextValidator:{errorMessage:"#FIELD_NAME# may not contain the following characters #CHARACTER#."},SingleLineAsciiTextValidator:{errorMessage:"#FIELD_NAME# may not contain the following characters #CHARACTER#."},LengthValidator:{errorMessage:"#FIELD_NAME# exceeds the maximum allowed length"},GroupAssociationsValidator:{errorMessage:"Both GroupCode and SubgroupCode are required fields."}};n.exports=t},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"composeSubsetId",value:function(n,t,i){var e=i||advocacyComponents;if("function"==typeof Subset&&(t=Subset),"function"==typeof t){var u=n.value.split(":"),r=new t,f={};return r.compositeKey=u[0],r.id=u[1],f.value=r,f}throw new e.errorAppSystem("[APIH-composeSubsetId] The Component Library did not load, please contact support and provide this line").message;}}]),t}(i(5));n.exports=u},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"advocateService",value:function(n,t,i,r,u){var f=u||new AdvocateService;f[n](t,function(n){i(n)},function(n){r(n)})}},{key:"getAdvocateChamberCodes",value:function(n,t,i,r){(r||new SelectionService)[n](function(n){t(n)},function(n){i(n)})}},{key:"getCompletedCallsToActionForAdvocate",value:function(n,t,i,r){(r||new CallToActionService).getCompletedCallsToActionForAdvocate(n,function(n){t(n)},function(n){i(n)})}},{key:"findCallsToActionByAdvocate",value:function(n,t,i,r){(r||new CallToActionSearchService).findCallsToActionByAdvocate(n,function(n){t(n)},function(n){i(n)})}},{key:"findCallsToAction",value:function(n,t,i){(i||new CallToActionSearchService).findCallsToAction(function(t){n(t)},function(n){t(n)})}},{key:"findElectedOfficialsByFullAddressAndChambers",value:function(n,t,i,r,u){(u||new ElectedOfficialSearchService).findElectedOfficialsByFullAddressAndChambers(n,t,function(n){i(n)},function(n){r(n)})}},{key:"findElectedOfficialsByZipCodeAndChambers",value:function(n,t,i,r,u){(u||new ElectedOfficialSearchService).findElectedOfficialsByZipCodeAndChambers(n,t,function(n){i(n)},function(n){r(n)})}},{key:"findElectedOfficialsByStateCodeAndChambers",value:function(n,t,i,r,u){(u||new ElectedOfficialSearchService).findElectedOfficialsByStateCodeAndChambers(n,t,function(n){i(n)},function(n){r(n)})}},{key:"findAdvocateByEmail",value:function(n,t){this.advocateService("findAdvocateByEmailAddress",n,function(n){t(n)},function(n){t(n)})}}]),t}(i(2));n.exports=u},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){var n,r,u,f,e,o;return!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n.CONST=i(34),r=i(32),n.APIService=new r,u=i(35),n.fbAPIService=new u,f=i(36),n.DOMHelper=new f,e=i(4),n.TemplateHelper=new e,o=i(37),n.helper=new o,n.googleLoginCount=0,n}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"getCompletedCallsToActionForAdvocate",value:function(n,t,i){var r=this;this.checkForValidAdvocate(i)&&(this.log("[AdvocateProfile] getCompletedCallsToActionForAdvocate -> "+this.advocate.id),this.APIService.getCompletedCallsToActionForAdvocate(this.advocate.id,function(i){r.DOMHelper.populateTakenActions(i,n);t(i)},function(n){i(n)}))}},{key:"findCallsToActionByAdvocate",value:function(n,t,i){var r=this;r.checkForValidAdvocate(i)&&(r.log("[AdvocateProfile] findCallsToActionByAdvocate -> "+this.advocate.id),r.APIService.findCallsToActionByAdvocate(this.advocate.id,function(i){r.DOMHelper.populateAvailableActions(i,n);t(i)},function(n){i(n)}))}},{key:"findCallsToAction",value:function(n,t,i){var r=this;r.log("[AdvocateProfile] findCallsToAction");r.APIService.findCallsToAction(function(i){r.DOMHelper.populateAvailableActions(i,n);t(i)},function(n){i(n)})}},{key:"getAdvocateProperty",value:function(n,t){return n[t]?n[t]:""}},{key:"findLegislatorsBasedOnAddressInfo",value:function(n,t){var f=t.onSuccess||this.log,e=t.chamberCodes||this.CONST.ADVOCATE_DEFAULT_CHAMBER_CODES,i=this,r=[],u=i.helper.getAdvocateAddressGroup(i.advocate),h=i.getAdvocateProperty(u,"address1"),o=i.getAdvocateProperty(u,"state"),s=i.getAdvocateProperty(u,"zip");1<h.length&&2===o.length&&5<=s.length?(i.log(i.CONST.COMPONENT_IDENTIFIER+"->getAdvocateLegislators BY FULL ADDRESS"),i.APIService.findElectedOfficialsByFullAddressAndChambers(u,e,function(n){return r=i.helper.sortChambers(i.helper.groupLegislatorsByChamber(n),i.CONST.DEFAULT_CHAMBER_CODES_ORDER),i.DOMHelper.populateAdvocateLegislators(r),i.TemplateHelper.proccessImgSource(),f(r),r},function(t){n(t)})):5<=s.length?r=i.APIService.findElectedOfficialsByZipCodeAndChambers(s,e,function(n){return r=i.helper.sortChambers(i.helper.groupLegislatorsByChamber(n),i.CONST.DEFAULT_CHAMBER_CODES_ORDER),i.DOMHelper.populateAdvocateLegislators(r),i.TemplateHelper.proccessImgSource(),f(n),r},function(t){n(t)}):2===o.length?r=i.APIService.findElectedOfficialsByStateCodeAndChambers(o,e,function(n){return r=i.helper.sortChambers(i.helper.groupLegislatorsByChamber(n),i.CONST.DEFAULT_CHAMBER_CODES_ORDER),i.DOMHelper.populateAdvocateLegislators(r),i.TemplateHelper.proccessImgSource(),f(n),r},function(t){n(t)}):n({type:"error",name:"getAdvocateLegislators",message:"[AdvocateProfile->getAdvocateLegislators(urlPattern, onSuccess, onError)] - Advocate doesn't have a valid Address)"})}},{key:"getAdvocateLegislators",value:function(n){var t=n.onError||this.log;this.checkForValidAdvocate(t)&&this.findLegislatorsBasedOnAddressInfo(t,n)}},{key:"initFacebookSDK",value:function(n,t){var r,i=this,e=t||window,u=i.DOMHelper.documentHelperCall("getElementsByTagName","script")[0],f;if(!i.DOMHelper.documentHelperCall("getElementById","facebook-jssdk"))return((r=i.DOMHelper.documentHelperCall("createElement","script")).id="facebook-jssdk",r.src="https://connect.facebook.net/en_US/sdk.js",u.parentNode.insertBefore(r,u),e.fbAsyncInit=function(){FB.init({appId:n.appId,cookie:!0,xfbml:!0,version:n.version});FB.AppEvents.logPageView()},n.loginBtnId&&""!==n.loginBtnId)?(i.log("FB Plugin: Using Custom Btn ID"),f=i.DOMHelper.find(n.loginBtnId),i.DOMHelper.addEventListener("click",f,function(){FB.login(i.facebookLogin,{scope:"email,public_profile",return_scopes:!0})})):i.log("Using Default FB button"),this.registrationFormSelector=n.formSelector,this.registrationFormGlueClass=n.glueClass,this.socialExternalConfig=n,!0}},{key:"facebookLogin",value:function(n){var t=n.authResponse?advocacyComponents.advocateProfile:n;t.fbAPIService.getFBProfile(function(n){n.provider="Facebook";t.verifySocialProfile(n,!0,t.socialExternalConfig)})}},{key:"verifySocialProfile",value:function(n,t,i){var u,r=this;u=i&&void 0!==i.onSuccess?i.onSuccess:r.log;r.APIService.findAdvocateByEmail(n.email,function(f){f&&f.firstName?(r.updateSocialMediaAccount(f,n),u({type:"SocialMediaProfile",message:"The user Email is already associated to an Advocate record. Log him in.",status:!0})):t?function(n){r.DOMHelper.hideSocialMediaButton(".fb-login-button");r.fbAPIService.findAdvocateByFacebookId(n.id,function(t){t&&t.firstName?(r.updateSocialMediaAccount(t,n),u({type:"SocialMediaProfile",message:"The user Email is already associated to an Advocate record. Log him in.",status:!0})):r.populateRegistrationForm(n,i)})}(n):r.populateRegistrationForm(n,i)})}},{key:"updateSocialMediaAccount",value:function(n,t){var i=this,r,u;t=i.prepareSocialProfileObject(t);Array.isArray(n.socialMediaAccounts)?(n.socialMediaAccounts=i.deleteSocialAccountByProvider(n.socialMediaAccounts,t.provider),n.socialMediaAccounts.push(t)):(n.socialMediaAccounts=[],n.socialMediaAccounts.push(t));r={advocate:n};u={};"undefined"!=typeof Advocate&&(u=new Advocate);r.advocate=this.APIHelper.assembleAdvocate(r,u);this.APIService.updateAdvocate(r,function(n){i.log("Advocate updated");i.advocate=n.advocate},function(n){i.onError(n)})}},{key:"prepareSocialProfileObject",value:function(n){return{accountId:n.id,accountUrl:n.link,displayName:n.first_name+" "+n.last_name,provider:n.provider}}},{key:"initGoogleSDK",value:function(n){var i,t=this,f=t.DOMHelper.documentHelperCall("getElementsByTagName","script")[0],r,u,e;((i=t.DOMHelper.documentHelperCall("createElement","script")).src="https://apis.google.com/js/platform.js",i.defer=!0,i.async=!0,f.parentNode.insertBefore(i,f),n)&&(u=t.DOMHelper.documentHelperCall("getElementsByTagName","meta")[0],(r=t.DOMHelper.documentHelperCall("createElement","meta")).name="google-signin-client_id",r.content=n.client_id,u.parentNode.insertBefore(r,u),this.externailInitConFigForGoogle=n);e=t.DOMHelper.find('[data-onsuccess="PAGoogleLogIn"]');t.DOMHelper.addEventListener("click",e,function(){t.googleLoginCount++})}},{key:"googleLogIn",value:function(n,t){var r=t||advocacyComponents.advocateProfile;if(0<r.googleLoginCount&&n){var u=n.getBasicProfile(),i={},f=u.getName().split(" ");i.id=u.getId();i.email=u.getEmail();i.first_name=f[0];i.last_name=f[1];i.link="https://www.google.com/";i.provider="Google";r.log("Verifying Social Profile:");r.DOMHelper.hideSocialMediaButton('[data-onsuccess="PAGoogleLogIn"]');r.verifySocialProfile(i,!1,r.externailInitConFigForGoogle)}}},{key:"populateRegistrationForm",value:function(n,t){var i=t.formSelector,r="function"==typeof t.onSuccess?t.onSuccess:this.log;this.DOMHelper.populateRegistrationForm(n,i);r({type:"SocialMediaProfile",message:"The account is not associated to an Advocate record.",status:!1})}},{key:"deleteSocialAccountByProvider",value:function(n,t){return n.filter(function(n){return n.provider!==t})}},{key:"addGroupAssociationsToAdvocate",value:function(n,t,i){this.checkForValidAdvocate(i)&&this.APIHelper.addGroupAssociationsToAdvocate(this.advocate.id,n,function(n){t(n)},function(n){i(n)})}},{key:"removeGroupAssociationsFromAdvocate",value:function(n,t,i){this.checkForValidAdvocate(i)&&this.APIHelper.removeGroupAssociationsFromAdvocate(this.advocate.id,n,function(n){t(n)},function(n){i(n)})}},{key:"cleanProcessedKeys",value:function(n){var t=this;Array.isArray(n)?n.forEach(function(n){var i=t.DOMHelper.find(n);t.TemplateHelper.deleteProcessedKeys(i)}):this.TemplateHelper.deleteProcessedKeys()}}]),t}(i(0));n.exports=u},function(n){"use strict";n.exports={COMPONENT_NAME:"Advocate Profile Component",COMPONENT_IDENTIFIER:"[AdvocateProfile]",ADVOCATE_DEFAULT_CHAMBER_CODES:["FS","FH","GV","SS","SH"],DEFAULT_CHAMBER_CODES_ORDER:["FS","FH","SS","SH","G"],ERROR_MISSING_ARGUMENTS:"Missing an Argument"}},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"getFBProfile",value:function(n,t){var i=t||FB;i.getLoginStatus(function(t){"connected"===t.status&&i.api("/me",{fields:"first_name, last_name, email, link, location, address"},function(t){n(t)})})}},{key:"findAdvocateByFacebookId",value:function(n,t){this.advocateService("findAdvocateByFacebookId",n,function(n){t(n)},function(n){t(n)})}}]),t}(i(32));n.exports=u},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t);var n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=i(4);return n.TemplateHelper=new r,n}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"populateTakenActions",value:function(n,t){n=this.addCustomKeysToCallToActionObject(n,t);this.TemplateHelper.populateTemplateElements('pa-template[data-module="alerts-taken"]','[data-advocateProfile-bind="alerts-taken"]',n,"alertsTaken")}},{key:"populateAvailableActions",value:function(n,t){n=this.addCustomKeysToCallToActionObject(n,t);this.TemplateHelper.populateTemplateElements('pa-template[data-module="alerts-available"]','[data-advocateProfile-bind="alerts-available"]',n,"availableAlert")}},{key:"populateAdvocateLegislators",value:function(n){var t=1,r=Object.keys(n).length,i=!1;Object.keys(n).forEach(function(u){t===r?i=!0:t++;this.TemplateHelper.populateTemplateElements('pa-template[data-module="advocate-legislators"]','[data-advocateProfile-bind="advocate-legislators"]',n[u],"legislator",i,t)},this)}},{key:"addCustomKeysToCallToActionObject",value:function(n,t){return n.forEach(function(n){n.url=t.replace("{alertId}",n.id);n.alertId="alert-"+n.id},this),n}},{key:"hideSocialMediaButton",value:function(n){this.findAll(n).forEach(function(n){n.style.display="none"})}}]),t}(i(8));n.exports=u},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n)}return t(n,[{key:"getAdvocateAddressGroup",value:function(n){var t=n.postalPreference.toLowerCase();return n[t+"Address"]}},{key:"groupLegislatorsByChamber",value:function(n){var t=[];return n.forEach(function(n){void 0===t[n.district.chamber.code]?t[n.district.chamber.code]=[n]:t[n.district.chamber.code].push(n)}),t}},{key:"sortChambers",value:function(n,t){var i=[],r=this;return t.forEach(function(t){void 0!==n[t]&&(i[t]=r.sortAlphabetical(n[t]))}),i}},{key:"sortAlphabetical",value:function(n){return n.sort(function(n,t){var i=n.fullDisplayName.toUpperCase(),r=t.fullDisplayName.toUpperCase();return i<r?-1:i>r?1:0}),n}}]),n}();n.exports=i},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t);var n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=i(39);return n.APIService=new r,n}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"trackSession",value:function(){var n=this.composeTrackingDetail();return this.APIService.track(n)}}]),t}(i(0));n.exports=u},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"track",value:function(n,t,i){var r=i||advocacyComponents;return(t||new TrackingService).track(n,function(t){return void 0===JSON.stringify(t)?r.log("TrackSession: "+n.Identity.TrackingId):r.log(JSON.stringify(t)),!0},function(){return!1}),!0}}]),t}(i(2));n.exports=u},function(n,t,i){"use strict";var u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function(n){function t(){var n,r,u,f;return!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n.config={},n.forms={},n.errorLog=[],n.formStatus={},n.formsConfig=[],n.shareYourStoryFields=[],n.validatingFormId,r=i(41),n.APIService=new r,n.constructors=[],n.constructors.configs={ApiFieldsConfig:i(7),ValidationErrorConfig:i(30)},n.constructors.services={ValidationService:i(42)},u=i(3),n.constructors.validators=new u,f=i(43),n.HelperDomShareYourStory=new f,n}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),u(t,[{key:"init",value:function(n,t){if(this.apiConfig=new this.constructors.configs.ApiFieldsConfig,this.initValidationErrors(t),!this.checkForValidAdvocate(t.onError))return!1;if(n)return this.validationService=new this.constructors.services.ValidationService(this.apiConfig,this),this.initForm(n,t);throw this.errorAppRuntime("[ConfigError] - Missing argument shareYourStory.init(formSelector/null, formConfigObject)");}},{key:"initValidationErrors",value:function(n){var t={},i,r;if(void 0!==this.constructors.configs.ValidationErrorConfig&&(t=new this.constructors.configs.ValidationErrorConfig),void 0!==n&&void 0!==n.errorSettings)try{i=t.errorSettings;r=n.errorSettings;this.errorSettingsOverride(i,r)}catch(u){throw this.errorAppUsage("Cannot read the Error Settings Object config. Please check your config.");}else this.errorSettings=t.errorSettings}},{key:"errorSettingsOverride",value:function(n,t){for(var i in n)t.hasOwnProperty(i)||(this.errorSettings=t,this.errorSettings[i]=n[i])}},{key:"initForm",value:function(n,t){this.formsConfig[n]=t||{};var i=this.DOMHelper.findAll(n);if(i&&1===i.length)this.HelperDomShareYourStory.getFields(n,this);else{if(!i)throw this.errorAppUsage("[ConfigError] - Check the form selector, fields not found.");this.HelperDomShareYourStory.cacheDOMFields(n,this,n,i)}return this.errorLog[n]=[],this.TemplateHelper.deleteProcessedKeys(),!0}},{key:"composingShare",value:function(n,t,i,r){if(this.log("composingShare"),i!==r)return!1;if(n){this.log("Validation Passed!  ShareStory against API...");try{this.assembleShare(this.validationService.validObject,this.formsConfig[t])}catch(i){throw this.errorAppSystem("Problems contacting the API -> "+i.message);}}else this.onValidationError(this.errorLog[t],this.formsConfig[t])}},{key:"assembleShare",value:function(n,t){var i,u,r=this;t||(t={});"undefined"==typeof Share?(i={},u={}):(i=new Share,u=new ShareYourStoryData);u.share=this.APIHelper.assembleShare(n,i);void 0!==n.onSuccess&&(t=n);u.share=i;this.APIService.shareYourStory(this.advocate.id,i.Subject,i.Text,function(n){"InputValidationError"===n.type?r.onError(n,r):r.onSuccess(n,r)},function(n){r.onError(n,r)})}},{key:"share",value:function(n,t){var r,i,u,f;if("function"==typeof t.preventDefault()&&t.preventDefault(),i=t.target.getAttribute("data-formid"),null===i||""===i||"undefined"===i)throw this.errorAppUsage("Missing form/container ID");void 0!==this.formsConfig[i].onClick&&this.formsConfig[i].onClick();this.forms[i].submitButton=t.target;this.DOMHelper.toggleDisable(t.target);this.validatingFormId=i;r=this.validationService.validateForm(i,this).status[i];u=this.formsConfig[i].namingPrefix||"";f=this.DOMHelper.find('textarea[name="'+u+'text"]');this.validationService.validateProfanity("Text",f,r,i)}},{key:"evaluateValidation",value:function(n,t){if(0!==this.validationService.validObject.object.length||!0!==this.isBodyValid){var i=this.validatingFormId;this.DOMHelper.toggleDisable(this.forms[i].submitButton);this.onValidationError(this.errorLog[t],this.formsConfig[t])}else this.composingShare(n,t,0,0)}},{key:"handleInputValidationErrorFromAPI",value:function(n){var t=n.message.split(" - "),i={status:!1,message:void 0===t[1]?n.message:t[1]};advocacyComponents.shareYourStory.DOMHelper.toggleInvalid(void 0,i)}},{key:"onSuccess",value:function(n,t){var r=t.validatingFormId,i=t.formsConfig[r];i.hasOwnProperty("groupAssociations")&&(t.log("Updating Advocate with groupAssociations"),t.APIHelper.addGroupAssociationsToAdvocate(t.advocate.id,i.groupAssociations,function(n){t.genericOnSuccess(n,"onSuccessAssociation","Added Group Associations",t)},function(n){t.genericOnError(n,"onErrorAssociation","An error occurs adding the Group Associations",t)}));i.hasOwnProperty("activityIds")&&(t.log("Sending offline activity's"),t.APIHelper.addAdvocateParticipation(t.advocate.id,i.activityIds,function(n){t.genericOnSuccess(n,"onSuccessParticipation","Added Advocate Participation",t)},function(n){t.genericOnError(n,"onErrorParticipation","An error occurs adding the Advocate Participation",t)}));i.hasOwnProperty("onSuccess")&&"InputValidationError"!==n.type?t.formsConfig[r].onSuccess(n):t.log("Story shared successfully")}},{key:"onError",value:function(n,t){var i=t.validatingFormId,r=t.formsConfig[i];r&&(t.DOMHelper.toggleDisable(t.forms[i].submitButton),("100012"===n.errorCode||"100011"===n.errorCode&&"0"===n.subcodes.int)&&t.handleInputValidationErrorFromAPI(n));r.hasOwnProperty("onError")?t.formsConfig[i].onError(n):console.info("Validation did not pass.")}},{key:"onValidationError",value:function(n,t){var r="undefined"==typeof advocacyComponents?this:advocacyComponents.shareYourStory,i=this.validatingFormId;void 0!==this.forms[i]&&(this.forms[i].submitButton.disabled=!1);void 0===t?console.info("Validation did not pass."):"function"==typeof t.onValidationError&&t.onValidationError(r.validatingFormId,n)}}]),t}(i(0));r.prototype.validateField=function(n){var t,i;return n.value=n.value.trim(),t=n.getAttribute("data-FormId"),this.validatingFormId=t,i=this.validationService.validateField(n,this,t),i&&(this.errorLog[t].length=0),i};n.exports=r},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"shareYourStory",value:function(n,t,i,r,u,f){(f||new ShareYourStoryService).shareStoryForAdvocate(n,t,i,function(n){r(n)},function(n){u(n)})}}]),t}(i(2));n.exports=u},function(n,t,i){"use strict";var r=function(n){function t(n,i,r){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t);var u=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i,r));return u.fields=n.fieldSettings.shareYourStoryFields,u.component=i,u.validObject=[],u.validObject.object=[],u}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),t}(i(28));n.exports=r},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"getFields",value:function(n,t){return this.getFormFields(n,t)}}]),t}(i(1));n.exports=u},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){var n,r,u;return!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n.CONSTANTS=i(45),r=i(46),n.APIService=new r,u=i(47),n.ssoDOMHelper=new u,n}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"init",value:function(n){var t=this,u=n.onSuccess||this.log,i=n.onError||this.log,f=n.idp||"",r;(this.log("[SingleSingOn]  UserInvoked: init()"),this.advocate)?this.log("[SingleSingOn]  Advocate is in Context: Showing private page."):(this.log("[SingleSingOn]  Generate Authentication Request"),r=this.DOMHelper.getWindow().location.href,0<f.length?this.APIService.generateAuthenticationRequestWithRelayStateAndTargetIdp(r,f,function(n){t.log("[SingleSingOn]  Generating SAML Request");t.validateSAMLResponseWithRelayState(n,u,i)},function(n){i(n)}):this.APIService.generateAuthenticationRequestWithRelayState(r,function(n){t.log("[SingleSingOn]  Generating SAML Request");t.validateSAMLResponseWithRelayState(n,u,i)},function(n){i(n)}));this.TemplateHelper.deleteProcessedKeys()}},{key:"validateSAMLResponseWithRelayState",value:function(n,t,i,r){(r||this.APIService).validateSAMLResponseWithRelayState(n.samlResponse,n.value,function(n){t(n)},function(n){i(n)})}}]),t}(i(0));n.exports=u},function(n){"use strict";n.exports={INITIAL_CONFIGURATION_MESSAGE:"[SingleSignOn] Initial Configuration ->"}},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"generateAuthenticationRequestWithRelayState",value:function(n,t,i,r){(r||new SamlAuthenticationService).generateAuthenticationRequestWithRelayState(n,function(n){t(n)},function(n){i(n)})}},{key:"generateAuthenticationRequestWithRelayStateAndTargetIdp",value:function(n,t,i,r,u){(u||new SamlAuthenticationService).generateAuthenticationRequestWithRelayStateAndTargetIdp(n,t,function(n){i(n)},function(n){r(n)})}},{key:"validateSAMLResponseWithRelayState",value:function(n,t,i,r,u){(u||new SamlAuthenticationService).validateSAMLResponseWithRelayState(n,t,function(n){i(n)},function(n){r(n)})}}]),t}(i(2));n.exports=u},function(n,t,i){"use strict";n.exports=function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);var t=i(1);this.DOMHelper=new t}},function(n,t,i){"use strict";var u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function(n){function t(){var n,r;!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t);n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.externalConfig=null;n.alertinContext=0;n.missingInfoForm=[];n.missingInfoRendered=!1;n.CONSTANTS=i(49);r=i(50);n.APIService=new r;n.recipientGroupData=null;n.recipientGroupDataArray={email:[],twitter:[],phone:[]};n.recipientGroupPhone=null;n.recipientGroupTwitter=null;n.renderedTwitterChannel=!1;n.renderedPhoneChannel=!1;var u=i(7),f=i(51),e=i(52),o=i(4);return n.advocateFieldsConfig=new u,n.takeActionDomHelper=new f,n.validationService=new e(n),n.TemplateHelper=new o,n}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),u(t,[{key:"initValidators",value:function(){var n=i(3);this.Validators=new n}},{key:"getAlertInContext",value:function(n){var u,t=this,i=this.window.location.href.toLowerCase(),r;return(t.alertinContext=function(n){var t=n.match(/\/composeletters\/(\d+)/);return t&&2===t.length?t[1]:0}(i),0===t.alertinContext&&n.alertIDKeyRegex)&&(r=i.match(n.alertIDKeyRegex),r&&(t.alertinContext=r[1])),0===t.alertinContext&&n.alertIDKey&&-1!==i.indexOf(n.alertIDKey.toLowerCase())&&(t.alertinContext=t.DOMHelper.getURLParameterByName(n.alertIDKey,i)),0===t.alertinContext&&(t.alertinContext=(u=t.DOMHelper.find("PublicAffairs-AlertID"))?u.value:0),t.alertinContext=parseInt(t.alertinContext),t.alertinContext}},{key:"getCallToActionDetailForAdvocateWithAdditionalInformation",value:function(){var n=this;n.actionDetailResponse||n.APIService.executeMethodInCallToActionService("getCallToActionDetailForAdvocateWithAdditionalInformation",n.advocate.id,n.alertinContext,function(t){var i;i=t;n.actionDetailResponse=i;i.callToAction.recipientGroups.forEach(function(t){switch(t.communicationChannel){case"Email":n.recipientGroupDataArray.email.push(t);break;case"Phone":n.recipientGroupDataArray.phone.push(t);break;case"Twitter":n.recipientGroupDataArray.twitter.push(t)}});n.recipientGroupData=0<n.recipientGroupDataArray.email.length?n.recipientGroupDataArray.email[0]:i.callToAction.recipientGroups[0];n.validationService.validatePublishDate()&&(0<=n.findIndex(n.actionDetailResponse.callToAction.recipientGroups,"communicationChannel","Email")?function(){n.TemplateHelper.populateBinderElements();var t=n.getRecipientsList(n.actionDetailResponse.callToAction.recipientGroups,"Email");n.TemplateHelper.populateTemplateElements('pa-template[data-component="takeAction"][data-module="legislators"]','[data-component="takeAction"][data-module="legislators"][data-bind="container"]',t,"legislator");n.TemplateHelper.processTemplateCheckboxes(t,"optional","kindID",!1,"data-kindId");n.DOMHelper.interceptSubmit('[data-takeAction-bind="submit"]',n.externalConfig,"takeaction","submitCallToAction")}():n.TemplateHelper.populateBinderElements(),0<Object.keys(i.additionalInformation.generalAdvocateData).length?(n.renderAdditionalInformationFields(i),n.requiresAdditionalInformation=!0,n.trackTag("CallToAction.ViewedAdditionalInformation")):n.requiresAdditionalInformation=!1,n.renderChannels(i.callToAction.recipientGroups),n.TemplateHelper.deleteProcessedKeys(),n.onSuccess({type:"RenderLetter",success:!0,requiresAdditionalInformation:n.requiresAdditionalInformation,alertData:i.callToAction}))},function(t){var i;"30002"===t.errorCode&&n.trackTag("CallToActionAdvocateFilterException ");"30003"===t.errorCode&&n.trackTag("MultipleAlertParticipationException ");"30004"===t.errorCode&&n.trackTag("MissingRecipientsException ");"MissingInformationException"===(i=t).type&&30001===i.errorCode&&(n.renderMissingInfoFields(i),n.trackTag("CallToAction.ViewedMissingInformation"));n.onError(i)})}},{key:"findIndex",value:function(n,t,i){var e,r=-1,o=0,f=!0,s=!1,h,u;try{for(u=n[Symbol.iterator]();!(f=(h=u.next()).done);f=!0)h.value[t]===i&&(r=0>r?o:r),o+=1}catch(i){s=!0;e=i}finally{try{!f&&u.return&&u.return()}finally{if(s)throw e;}}return r}},{key:"getCustomChannelData",value:function(n,t){var u=this,r=[],i=[];return t.forEach(function(t){t.communicationChannel===n&&(r.push(t),t.recipients.forEach(function(n){0>u.findIndex(i,"kindID",n.kindID)&&i.push(n)}))}),{filteredChannel:r,filteredRecipients:i}}},{key:"renderChannels",value:function(n){var t=this;["Email","Twitter","Phone","Facebook"].forEach(function(i){var r=n.filter(function(n){return n.communicationChannel===i}),u;if(0===r.length)t.log("No data for channel:"+i),t.DOMHelper.findAll('[data-channel="'+i.toLowerCase()+'"]').forEach(function(n){n.parentNode.removeChild(n)});else switch(t.log(r),i){case"Email":void 0===r[0].letter||void 0===r[0].letter.body||r[0].letter.body.isBodyEditable||(u=t.DOMHelper.find('[data-takeAction-bind="body"]'),u&&(u.readOnly=!0));t.log("The Email binding is executed before the switch. Case only to validate the channel value.");break;case"Facebook":t.renderFacebookChannel(r[0]);break;case"Phone":case"Twitter":break;default:throw"[Code: TA-Channel-1: Unrecognized Channel on API Response. Get the latest version of the JS Library.";}t.recipientGroupTwitter=t.getCustomChannelData("Twitter",n);t.recipientGroupPhone=t.getCustomChannelData("Phone",n);0<t.recipientGroupPhone.filteredChannel.length&&!t.renderedPhoneChannel&&(t.renderedPhoneChannel=!0,t.renderPhoneChannel(t.recipientGroupPhone.filteredChannel,t.recipientGroupPhone.filteredRecipients));0<t.recipientGroupTwitter.filteredChannel.length&&!t.renderedTwitterChannel&&(t.renderedTwitterChannel=!0,t.renderTwitterChannel(t.recipientGroupTwitter.filteredChannel,t.recipientGroupTwitter.filteredRecipients));t.TemplateHelper.proccessImgSource()})}},{key:"renderPhoneChannel",value:function(n,t){var i=this;i.log("[Phone] Initializing ->");i.TemplateHelper.populateTemplateElements('pa-template[data-module="phone-channel-legislators"]','[data-takeAction-bind="phone-channel-legislators"]',t,"legislator"),function(){var r=i.DOMHelper.findAll('[data-bind="phoneNumber"]'),u,t;0<r.length&&(u=i.DOMHelper.isMobile(),t=!1,r.forEach(function(r){return!!r.href&&void(u?(i.takeActionDomHelper.revealPhoneNumber(r),t=!0):r.innerHTML="Show number",i.DOMHelper.addEventListener("click",r,function(){t||i.takeActionDomHelper.revealPhoneNumber(r);i.trackTag(r.getAttribute("data-ta-track"));var u=r.getAttribute("data-ta-track");i.takeActionForAdvocateCall(n[0],null,!1,u.replace("ta-phone-",""),"Phone")}))},this))}()}},{key:"renderTwitterChannel",value:function(n,t,i){function f(n){var t=r.DOMHelper.find('[data-bind="remaining-characters"]'),i=n.value.length;t.textContent=280-i}function e(){var t,i,e;u.value=n[0].letter.body.body;t=0<n[0].socialMediaMetaData.imageReferences.length?n[0].socialMediaMetaData.imageReferences[0].imageUrl:"";t&&(u.value+=" "+t,i=r.DOMHelper.find('[data-bind="image-url"]'),i&&(i.src=t),e=r.DOMHelper.find('meta[name="twitter:image"]'),e&&(e.content=t));!function(n){f(n);r.DOMHelper.addEventListener("keyup",n,function(n){f(n)})}(u)}var r=this,o=i||window,u=r.DOMHelper.find('[data-bind="tweet"]');if(o.twttr)try{this.log("[Twitter] Initializing ->"),function(){e();var i=r.DOMHelper.find('[data-bind="restore-text"]');r.DOMHelper.addEventListener("click",i,function(){e()});r.TemplateHelper.populateTemplateElements('pa-template[data-module="twitter-channel-legislators"]','[data-takeAction-bind="twitter-channel-legislators"]',t,"legislator");r.takeActionDomHelper.initTwitterButtons(n[0],r.takeActionForAdvocateCall)}()}catch(i){throw this.errorAppUsage(i);}}},{key:"renderFacebookChannel",value:function(n){var t=this,i;this.log("[Facebook] Initializing ->");i=t.DOMHelper.find('[data-bind="facebook-share"]');i?(function(){var r,u,f,e;i.value=n.letter.body.body;r=0<n.socialMediaMetaData.imageReferences.length?n.socialMediaMetaData.imageReferences[0].imageUrl:"";(r=void 0!==t.externalConfig.facebook_share&&void 0!==t.externalConfig.facebook_share.image_url&&t.externalConfig.facebook_share.image_url?t.externalConfig.facebook_share.image_url:r)&&(u=t.DOMHelper.find('[data-bind="facebook-image-url"]'),u&&(u.src=r),f=t.DOMHelper.find('meta[property="og:image"]'),f?f.content=r:(e='<meta property="og:image" content="'+r+'">',document.getElementsByTagName("head")[0].innerHTML+=e))}(),function(){if(t.TemplateHelper.populateTemplateElements('pa-template[data-module="facebook-channel-legislators"]','[data-takeAction-bind="facebook-channel-legislators"]',n.recipients,"legislator"),t.externalConfig.facebook_share){t.externalConfig.facebook_share.trackTag||(t.externalConfig.facebook_share.trackTag="Facebook share");var i=t.DOMHelper.find('[data-bind="facebook-share"]');t.externalConfig.facebook_share.btn_selector?t.facebookShare(t.externalConfig.facebook_share.btn_selector,t.externalConfig.facebook_share,t,n,i.value):t.errorAppUsage("A facebook selector is needed")}t.genericOnSuccess({type:"FacebookShare",imageObjectInfo:n.socialMediaMetaData.imageReferences[0]},"onSuccess",n.socialMediaMetaData.imageReferences[0],t)}()):this.onError({type:"FacebookChannel",message:"There is no share btn in the DOM, please add one."})}},{key:"init",value:function(n){var t,i;if(n){if(this.externalConfig=n,!this.checkForValidAdvocate(this.onError))return!1;this.log(this.CONSTANTS.INITIAL_CONFIGURATION_MESSAGE);this.log(n);n.alertID?this.alertinContext=n.alertID:this.getAlertInContext(n)}else this.getAlertInContext({});if(0===this.alertinContext)return t={type:"UnknownAlert",currentURL:this.window.location.href,message:"Can't recognize the Alert in context"},this.onError(t),t;i=this;this.window.onbeforeunload=function(){i.trackTag("CallToAction.UserLeavingPage");i.log("TrackTagLog: CallToAction.UserLeavingPage")};this.getCallToActionDetailForAdvocateWithAdditionalInformation()}},{key:"renderAdditionalInformationFields",value:function(n){this.additionalInformationData={};var i=n.additionalInformation.generalAdvocateData,t='[data-takeAction-bind="'+this.CONSTANTS.ADDITIONAL_INFO_CONTAINER+'"]';if(this.additionalInformationContainer=this.DOMHelper.find(t),!this.additionalInformationContainer)throw this.errorAppUsage("Additional information container is required");if(void 0===this.additionalInformationContainer)throw this.errorAppUsage("There is no Additional Information Container Available, and it is required");i.forEach(function(n){this.additionalInformationData[n.name]=n;var i={name:n.name,type:n.type.toLowerCase(),fieldId:"TAC-additionalInfo-"+n.name.capitalize(),attributes:{placeholder:n.name.capitalize().split(/(?=[A-Z])/).join(" "),classes:"form-control",required:"required",data:{addressGroup:-1===n.name.indexOf("Home")?"":"Home"}}};this.additionalInformationContainer&&this.takeActionDomHelper.renderField(this.additionalInformationContainer,i,t)},this)}},{key:"renderMissingInfoFields",value:function(n){var t=this,s,f,e,h,o;if(!t.missingInfoRendered){s=function(n){var t=[];return n.forEach(function(n){return t.push(n)}),t};f=i(53);t.errorFieldSettings=f.prototype.errorFieldSettings.MissingRequiredInformation;var c=f.prototype.errorFieldSettings.HomeAddressGroup,l=f.prototype.errorFieldSettings.WorkAddressGroup,a=n.message,r=n.subcodes,u=a.match(/\(([a-zA-Z]+)\)/g);if(u="(home)"===u[0].toLowerCase()?"Home":"Work",Array.isArray(r)&&r.every(function(n){var t=n.toString();return-1<c.indexOf(t)?r.int=s(c):-1<l.indexOf(t)?r.int=s(l):(r.int||(r.int=[]),r.int.push(n))},this),n.addressGroup=u,e='[data-takeAction-bind="'+t.CONSTANTS.MISSING_INFO_CONTAINER+'"]',!e)throw this.errorAppUsage("Missing Information container is required");return h=this.DOMHelper.find(e),(r.int?r.int:r).forEach(function(n){var r,i=t.errorFieldSettings[n],f,o;r=null===t.advocateInContext[u.toLowerCase()+"Address"]?t.advocateInContext[i.field]:t.advocateInContext[u.toLowerCase()+"Address"][i.field];f=i.field.capitalize();o={name:f,type:i.type,value:r,attributes:{placeholder:i.field.capitalize(),classes:"form-control",data:{addressGroup:i.addressGroup?u:""},selected:r}};"Address2"!==f&&(o.attributes.required=!0);t.missingInfoForm.push(this.takeActionDomHelper.renderField(h,o,e))},this),o=this.DOMHelper.find('[data-takeAction-bind="'+t.CONSTANTS.MISSING_INFO_SUBMIT+'"]'),o?(this.DOMHelper.addEventListener("click",o,function(n){n.disabled=!0;t.submitMissingInfo(n)}),t.$submit=o):t.$submit=this.DOMHelper.renderSubmit({id:t.CONSTANTS.MISSING_INFO_SUBMIT,classes:t.CONSTANTS.MISSING_INFO_SUBMIT_CLASSES,$parent:h,caption:t.CONSTANTS.MISSING_INFO_SUBMIT_CAPTION,onClick:t.submitMissingInfo}),t.missingInfoRendered=!0,t.missingInfoForm}}},{key:"submitCallToAction",value:function(n){void 0!==this.externalConfig.onClick&&this.externalConfig.onClick();"function"==typeof n.preventDefault()&&n.preventDefault();void 0===this.submitTakeActionBtn&&(this.submitTakeActionBtn=n.target);this.DOMHelper.toggleDisable(n.target);this.isBodyValid=!1;this.isBodyValidated=!1;this.isAdditionalInfoValidated=!1;this.isAdditionalInfoValid=!1;this.errorLog=[];var t=this.DOMHelper.find('[data-takeAction-bind="body"]');this.recipientGroupData.letter.body.isBodyEditable?this.validationService.validateLetterBody(this.recipientGroupData,t):(this.isBodyValid=!0,this.isBodyValidated=!0);this.validationService.validateAdditionalInformation()&&this.sendCallToAction(t)}},{key:"sendCallToAction",value:function(n){var t=this;if(t.isBodyValidated&&t.isAdditionalInfoValidated){if(!t.passedCustomValidation)return t.log("Custom validation did not pass"),void t.DOMHelper.toggleDisable(t.submitTakeActionBtn);t.isBodyValid&&t.isAdditionalInfoValid?(t.onValidationSuccess({type:"letterValidation",message:"Letter and Additional Information Validation Passed!"}),t.log("[TakeAction] - Sending Letter information"),t.takeActionForAdvocateCall(t.recipientGroupData,n.value,!0,"","Email")):0<t.errorLog.length&&(t.errorLog.forEach(function(n){return t.DOMHelper.toggleInvalid(n.field,n)},t),t.onValidationError({type:"TakeActionValidation",message:"Missing Info Validation failed, please check your info"}),t.DOMHelper.toggleDisable(t.submitTakeActionBtn))}}},{key:"getUnCheckedRecipients",value:function(n,t,i){var r=this,u=[];n.forEach(function(n){r.DOMHelper.find("["+i+"='"+n[t]+"']").checked||u.push(n[t])})}},{key:"getRecipientsList",value:function(n,t){var i=[];return n.filter(function(n){return n.communicationChannel===t}).forEach(function(n){i=i.concat(n.recipients)}),i}},{key:"takeActionForAdvocateCall",value:function(n,t,i,r,u,f){var e=f||advocacyComponents.takeaction,o=i?e.buildRecipientGroupResponsesEmail(this.recipientGroupDataArray.email,t,r):e.buildRecipientGroupResponses(n,t,r,u),s=o.recipientGroupResponses[0].recipientGroupId,c="takeActionForAdvocate",h;i&&(c="takeActionForAdvocateWithAdditionalInformation");h=!1;!i&&e.reactions&&e.reactions[e.alertinContext][s]?e.reactions&&(h=!e.reactions[e.alertinContext][s].recipientGroupResponses[0].recipientId):h=!0;h?e.APIService.executeMethodInCallToActionService(c,e.advocate.id,o,function(n){e.onSuccess(n);e.recordReaction(o,n.takeActionId)},function(n){e.onError(n)},e.additionalInformationDataCollection):e.APIService.executeMethodInCallToActionService("addResponse",e.reactions[e.alertinContext][s].takeActionId,o.recipientGroupResponses[0],function(n){n?e.onSuccess(n):e.onSuccess({takeActionId:e.reactions[e.alertinContext][s].takeActionId,recipientGroupResponse:o.recipientGroupResponses[0],status:!0,message:"The reaction was successfully recorded"});e.recordReaction(o,e.reactions[e.alertinContext][s].takeActionId)},function(n){n||e.onError({takeActionId:e.reactions[e.alertinContext][s].takeActionId,recipientGroupResponse:o.recipientGroupResponses[0],status:!1,message:"An error occurred while trying to store the reaction. Contact the support team for more information."});e.onError(n)})}},{key:"isInRecipients",value:function(n,t){var i=!1;return n.forEach(function(n){n.kindID===t&&n.optional&&(i=!0)}),i}},{key:"buildRecipientGroupIdArray",value:function(n,t,i){var r=[];return"Twitter"===n?r=this.buildFilterRecipientGroupArray(this.recipientGroupDataArray.twitter,t):"Phone"===n?r=this.buildFilterRecipientGroupArray(this.recipientGroupDataArray.phone,t):"Facebook"===n?r.push(i.id):void 0,r}},{key:"buildFilterRecipientGroupArray",value:function(n,t){var i=[];return n.forEach(function(n){n.recipients.forEach(function(r){r.kindID===t&&i.push(n.id)})}),i}},{key:"buildRecipientGroupResponsesEmail",value:function(n,t,i){var r={},u=[],f=this,e;return"function"==typeof CallToActionData&&"function"==typeof RecipientResponseDetail&&(r=new CallToActionData,recipientResponseDetail=new RecipientResponseDetail),r.callToActionId=f.alertinContext,e=this.DOMHelper.findAll("input[name=recipient]"),n.forEach(function(n){var r={excludedRecipients:[]};e.forEach(function(t){t.checked||f.isInRecipients(n.recipients,t.getAttribute("data-kindid"))&&r.excludedRecipients.push(t.getAttribute("data-kindid"))});r.recipientGroupId=n.id;n.letter&&(r.letterId=n.letter.id,n.letter.body.isBodyEditable&&t&&(r.letterBody=t));i&&(r.recipientId=i);u.push(r)}),r.recipientGroupResponses=u,r}},{key:"buildRecipientGroupResponses",value:function(n,t,i,r){var u={},f=this,o=f.buildRecipientGroupIdArray(r,i,n),e=[];return o.forEach(function(r){var o={};"function"==typeof CallToActionData&&"function"==typeof RecipientResponseDetail&&(u=new CallToActionData,o=new RecipientResponseDetail);u.callToActionId=f.alertinContext;o.recipientGroupId=r;n.letter&&(o.letterId=n.letter.id,n.letter.body.isBodyEditable&&t&&(o.letterBody=t));i&&(o.recipientId=i);e.push(o)}),u.recipientGroupResponses=e,u}},{key:"recordReaction",value:function(n,t){if(n.recipientGroupResponses[0].recipientId){var i=n.recipientGroupResponses[0].recipientGroupId;this.reactions||(this.reactions={},this.reactions[n.callToActionId]={});this.reactions[n.callToActionId][i]?this.reactions[n.callToActionId][i].recipientGroupResponses.push(n.recipientGroupResponses[0]):this.reactions[n.callToActionId][i]={takeActionId:t,recipientGroupResponses:[n.recipientGroupResponses[0]]}}}},{key:"submitMissingInfo",value:function(n){var t=this,i;if(this.initValidators(),this.externalConfig&&this.externalConfig.onClick&&this.externalConfig.onClick({type:"MissingInformation",message:"Method call before evaluating the data"}),this.errorLog=[],i={},i.advocate=this.advocate,i=this.validationService.validateMissingInfoForm(i),0<this.errorLog.length)n.disabled=!1,this.onValidationError({type:"missingInformationValidation",message:"Missing Info Validation failed, please check your info"});else{if(this.onValidationSuccess({type:"missingInformationValidation",message:"Missing Info Validation Passed"}),!this.passedCustomValidation)return this.log("custom validation did not pass"),void(n.disabled=!1);this.APIService.updateAdvocate(i,function(n){if(n.advocate){try{t.advocate=n.advocate}catch(n){return t.onError({type:"APIError",message:"something went wrong when storing in the API."})}t.getCallToActionDetailForAdvocateWithAdditionalInformation();t.onSuccess({type:"missingInformation",status:"update"})}},function(n){t.onError(n)})}}},{key:"validationResponse",value:function(n,t,i,r,u){var f={};return f.validator=n,f.status=t,f.message=i,f.field=r,f.inValidChars=u,t||this.errorLog.push(f),f}}]),t}(i(0));r.prototype.getTargetData=function(n,t){this.actionDetailResponse.callToAction.recipientGroups.recipientGroup[0].recipients.recipient.forEach(function(i){if(i.kindID===n)return t(i)})};r.prototype.onSuccess=function(n){this.externalConfig&&this.externalConfig.onSuccess?this.externalConfig.onSuccess(n):this.log(n)};r.prototype.onError=function(n){this.externalConfig&&this.externalConfig.onError?this.externalConfig.onError(n):this.log(n)};r.prototype.onValidationError=function(n){this.externalConfig&&this.externalConfig.onValidationError?this.externalConfig.onValidationError(n):this.log(n)};r.prototype.onValidationSuccess=function(n){this.externalConfig&&this.externalConfig.onValidationSuccess?this.externalConfig.onValidationSuccess(n):this.log(n)};n.exports=r},function(n){"use strict";n.exports={INITIAL_CONFIGURATION_MESSAGE:"[TakeAction] Initial Configuration ->",MISSING_INFO_CONTAINER:"ta-missing-info-container",MISSING_INFO_SUBMIT:"ta-missing-info-submit",MISSING_INFO_SUBMIT_CAPTION:"NEXT: Submit missing Information",MISSING_INFO_SUBMIT_CLASSES:"btn btn-primary",ADDITIONAL_INFO_CONTAINER:"ta-additional-info-container"}},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"executeMethodInCallToActionService",value:function(n,t,i,r,u,f,e){var o=e||new CallToActionService;"takeActionForAdvocate"===n||"addResponse"===n?o[n](t,i,function(n){r(n)},function(n){u(n)}):"takeActionForAdvocateWithAdditionalInformation"===n?o[n](t,i,f,function(n){r(n)},function(n){u(n)}):o[n](i,t,function(n){r(n)},function(n){u(n)})}},{key:"validateLetterBodyService",value:function(n,t,i,r,u,f){var e=f||new ProfanityFilteringService;"filterWithMask"===n?e[n](t,u,function(n){i(n)},r):e[n](t,function(n){i(n)},r)}}]),t}(i(2));n.exports=u},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"renderField",value:function(n,t,i,r){var o,f=this,u={},s=r||advocacyComponents,e=f.documentHelperCall("createElement","div");switch(e.className="form-group","prefix"===t.name.toLowerCase()&&(t.type="selectone"),t.type){case"text":u=f.documentHelperCall("createElement","input");break;case"selectone":u=f.documentHelperCall("createElement","select");break;case"selectmultiple":(u=f.documentHelperCall("createElement","select")).multiple=!0;break;default:u=f.documentHelperCall("createElement",t.type)}return u.name=t.name,u.id=t.fieldId?t.fieldId:"TAC-missing-"+t.name,Object.keys(t.attributes).forEach(function(n){var r=t.attributes[n];"data"===n?(Object.keys(r).forEach(function(n){u.setAttribute("data-"+n,r[n])}),u.setAttribute("data-FormId",i)):"classes"===n?u.className+=r:void 0!==n&&u.setAttribute(n,r)}),u.className+=" form-control",(o=f.documentHelperCall("createElement","label")).innerHTML=t.name.charAt(0).toUpperCase()+t.name.slice(1),o.setAttribute("for",u.id),e.appendChild(o),e.appendChild(u),function(){var n=f.documentHelperCall("createElement","label");n.setAttribute("for",u.id);n.setAttribute("class","error-label control-label");e.appendChild(n)}(),n.appendChild(e),"state"===u.name.toLowerCase()&&"select-one"===u.type?s.getSelection([{selectionKey:"listStates",fieldsIDs:[u.id],formFieldType:"select",ordering:"DESC",selectValue:u.selected}]):"prefix"===u.name.toLowerCase()&&"select-one"===u.type&&s.getSelection([{selectionKey:"listNamePrefixes",fieldsIDs:[u.id],formFieldType:"select",ordering:"DESC",selectValue:u.selected,placeholder:t.attributes.placeholder}]),null!==t.value&&void 0!==t.value&&(u.value=t.value),u}},{key:"getObjectByProperty",value:function(n,t,i){return n.filter(function(n){return n[t]===i})[0]}},{key:"initTwitterButtons",value:function(n,t){var i=this,r=n.recipients;i.findAll("[data-kindId-twitter]").forEach(function(u){try{var f=i.getObjectByProperty(r,"kindID",u.getAttribute("data-kindId-twitter")),e=i.getObjectByProperty(f.socialMediaAccounts,"provider","Twitter");u.setAttribute("href","https://twitter.com/intent/tweet?");u.addEventListener("click",function(){var o=i.find('[data-bind="tweet"]'),r=i.getUrlQueryParams(u.href),s=u.href.split("?")[0],f;r.text=".@"+e.handle+" "+o.value;r=Object.keys(r).map(function(n){return n+"="+r[n]});u.href=s+"?"+r.join("&");f=this.getAttribute("data-kindid-twitter");advocacyComponents.trackTag("ta-twitter-"+f);t(n,o.value,!1,f,"Twitter")})}catch(i){advocacyComponents?advocacyComponents.log("[Code: TA-Twitter-1: Unrecognized KindID "+u.getAttribute("data-kindId-twitter")+". Please check your HTML Markup and verify your BinderKeys"):console.info("[Code: TA-Twitter-1: Unrecognized KindID "+u.getAttribute("data-kindId-twitter")+". Please check your HTML Markup and verify your BinderKeys")}})}},{key:"revealPhoneNumber",value:function(n){var t=n.href;n.innerHTML=t.replace("tel:","")}}]),t}(i(1));n.exports=u},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(t){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n);this.component=t}return t(n,[{key:"validateLetterBody",value:function(n,t){var i=this.component,u=n.letter.body.body,r=t,f=i.externalConfig.profanityFilterMask?i.externalConfig.profanityFilterMask:"";i.log("[TakeAction] Validating letter..");void 0===i.externalConfig.allowSubmitWithMaskedSwearWords&&(i.externalConfig.allowSubmitWithMaskedSwearWords=!0);r&&0<r.value.length&&u.replace(/\s/g,"")!==r.value.replace(/\s/g,"")?i.APIService.validateLetterBodyService(i.externalConfig.profanityFilterMask?"filterWithMask":"filter",r.value,function(n){!function(n){var u,e;r.value.trim()!==n.trim()?(r.value=n,u=i.validationResponse("LetterContentValidation",!1,"Some words in your letter did not pass our profanity filter and have been replaced with "+f,r),i.DOMHelper.toggleInvalid(u.field,u),i.externalConfig.allowSubmitWithMaskedSwearWords||(i.isBodyValid=!1)):(e=i.validationResponse("LetterContentValidation",!0,"",r),i.DOMHelper.toggleInvalid(e.field,e),i.isBodyValid=!0);i.isBodyValidated=!0;i.sendCallToAction(t)}(n)},function(n){i.onError(n)},i.externalConfig.profanityFilterMask):r&&0===r.value.length?(i.validationResponse("LetterContentValidation",!1,"The Letter content is empty and it is a required field",r),i.isBodyValid=!1,i.isBodyValidated=!0,i.sendCallToAction(t)):(i.log("[TakeAction]  The content of the letter has not changed, validation passed!"),i.isBodyValid=!0,i.isBodyValidated=!0,i.sendCallToAction(t))}},{key:"validateAdditionalInformation",value:function(){var n=this.component,t;return n.requiresAdditionalInformation?(n.log("[TakeAction] Validating the additional information fields.."),t=n.DOMHelper.findAll("input, select, textArea",n.additionalInformationContainer),t.forEach(function(t){var r=n.additionalInformationData[t.name],u=new RegExp(r.validationRegex),i;0!==t.value.length&&"--"!==t.value&&u.test(t.value)?(i=n.validationResponse("AdditionalInformationValidator",!0,"",t),n.DOMHelper.toggleInvalid(i.field,i)):n.validationResponse("AdditionalInformationValidator",!1,"The Field "+t.name+" did not pass validation",t)},n),0===n.errorLog.length?(n.additionalInformationDataCollection=[],n.additionalInformationDataCollection=n.APIHelper.composeAdditionalInformationData(t,n.additionalInformationData),n.isAdditionalInfoValid=!0):n.isAdditionalInfoValid=!1):n.isAdditionalInfoValid=!0,n.isAdditionalInfoValidated=!0}},{key:"validateMissingInfoForm",value:function(n){var i=this.component,r=!1,t=n;return i.missingInfoForm.forEach(function(n){var u={status:!0};switch(n.type){case"select-one":u={validator:"StateFieldValidator",status:"--"!==n.value.trim(),message:"This State field is require",field:n};break;case"text":u=i.validateSingleField(n)}u.status||"boolean"==typeof u||i.errorLog.push(u);(r=i.DOMHelper.toggleInvalid(n,u))&&(function(n){var u=i.DOMHelper.getAttribute(n,"data-hidden-bind"),r,f;switch(u=u?u.toUpperCase():null){case"GROUPASSOCIATIONS":r={};r.groupCode=i.DOMHelper.getAttribute(n,"data-groupcode");r.subgroupCode=n.value;t.advocate=i.advocateHelper.addGroupAssociation(t.advocate,r);break;case"UDF":t.advocate.uDFs||(t.advocate.uDFs={});f="field"+i.DOMHelper.getAttribute(n,"data-udf");t.advocate.uDFs[f]=n.value}}(n),function(n){var u=n.name.toUpperCase(),r=i.DOMHelper.getAttribute(n,"data-addressgroup"),f,e;"Home"===r||"Work"===r||"Other"===r?(f=n.name.toLowerCase(),null===t.advocate[r.toLowerCase()+"Address"]&&(t.advocate[r.toLowerCase()+"Address"]={}),t.advocate[r.toLowerCase()+"Address"][f]=n.value):"UDF"!==u&&"GROUPASSOCIATIONS"!==u&&(e=n.name.charAt(0).toLowerCase()+n.name.slice(1),t.advocate[e]=n.value)}(n))},this),!!r&&t}},{key:"validatePublishDate",value:function(){var n=this.component,t=n.actionDetailResponse.callToAction.startDate?new Date(n.actionDetailResponse.callToAction.startDate):null,i=n.actionDetailResponse.callToAction.endDate?new Date(n.actionDetailResponse.callToAction.endDate):null,r=new Date;return t&&t>=r?(n.onError({type:"UsageException",message:"The publish date for this alert has not been reached."}),!1):!(i&&i<=r)||(n.onError({type:"UsageException",message:"The publish date for this alert has ended."}),!1)}}]),n}();n.exports=i},function(n){"use strict";var t=function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n)};t.prototype.errorFieldSettings={MissingRequiredInformation:{1:{field:"firstName",type:"text"},2:{field:"lastName",type:"text"},3:{field:"address1",type:"text",addressGroup:"Home"},4:{field:"address2",type:"text",addressGroup:"Home"},5:{field:"city",type:"text",addressGroup:"Home"},6:{field:"state",type:"select",addressGroup:"Home"},7:{field:"zip",type:"text",addressGroup:"Home"},8:{field:"homePhone",type:"text"},9:{field:"homeEmail",type:"text"},10:{field:"address1",type:"text",addressGroup:"Work"},11:{field:"address2",type:"text",addressGroup:"Work"},12:{field:"city",type:"text",addressGroup:"Work"},13:{field:"state",type:"select",addressGroup:"Work"},14:{field:"Zip",type:"text",addressGroup:"Work"},15:{field:"workPhone",type:"text"},16:{field:"workPhoneExtension",type:"text"},17:{field:"workEmail",type:"text"},18:{field:"postalPreference",type:"text"},19:{field:"emailPreference",type:"text"},20:{field:"homeEmail",type:"text"}},HomeAddressGroup:["3","4","5","6","7"],WorkAddressGroup:["10","11","12","13","14"]};n.exports=t},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){var n,r,u;return!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n.TellAFriendValidationService=i(55),r=i(56),n.APIService=new r,n.formsConfig={},n.forms={},n.formStatus={},n.udfs=[],n.constructors=[],n.validationService=[],n.constructors.configs={ApiFieldsConfig:i(7)},u=i(3),n.constructors.validators=new u,n}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"init",value:function(n,t){this.apiConfig=new this.constructors.configs.ApiFieldsConfig;this.validationService=new this.TellAFriendValidationService(this.apiConfig,this);this.log("[TellAFriend] -> Initializing Tell A Friend Component");this.advocateInContext=this.advocate;var i=this;if(this.externalOnSuccess=t.onSuccess?t.onSuccess:this.log,this.externalOnError=t.onError?t.onError:this.log,this.externalOnValidationError=t.onValidationError?t.onValidationError:this.log,this.formsConfig[n]=t||{},!this.advocateInContext&&!this.captchaId)throw this.errorAppUsage('[Tell A Friend] - There is no advocate in context or captcha id in context"');this.formId=n;this.cacheRecipientsFields(n);0===function(){return["EmailBody","Recipients","Subject","submitButton"].forEach(function(n){i.forms[i.formId][n]||i.errorLog.push(i.validationService.validationResponse("RequireValidator",!1,["The fields is require and it is not present, please add the field"],n))},this),i.forms[i.formId].CaptchaResponse&&["DisplayName","EmailAddress","CaptchaResponse"].forEach(function(n){i.forms[i.formId][n]||i.errorLog.push(i.validationService.validationResponse("RequireValidator",!1,["The fields is require and it is not present, please add the field"],n))},this),i.errorLog}().length?(this.log("[TellAFriend] -> Initialize Complete:"),this.log(this.forms[n])):(this.log("[TellAFriend] -> Initialize inComplete there are some fields missing:"),this.externalOnError(this.errorLog));this.TemplateHelper.deleteProcessedKeys()}},{key:"cacheRecipientsFields",value:function(n){if(n){if(this.DOMHelper.initForm(n,this),!this.forms[n].Recipients)throw this.errorAppUsage('[Tell A Friend] - Add list one recipient should be present, please check you field name to be "Recipients"');this.forms[n].Recipients=[];this.DOMHelper.findAll('input[name="Recipients"]').forEach(function(t){this.forms[n].Recipients.push(t)},this)}}},{key:"tellAFriend",value:function(){var n=this,t,i,r;(this.validatingFormId=this.formId,this.DOMHelper.toggleDisable(this.forms[this.formId].submitButton),this.udfs={},this.validationService.validateFields(this))?(t=this.composeTellAFriendData(),this.forms[this.formId].CaptchaResponse?(i=this.composeCaptchaData(),r=this.composeSenderData(),this.APIService.sendEmailsWithCaptchaVerification(i,r,t,function(t){n.externalOnSuccess(t)},function(t){n.DOMHelper.toggleDisable(n.forms[n.formId].submitButton);n.externalOnError(t)})):this.APIService.sendEmailsForAdvocate(this.advocateInContext.id,t,function(t){n.externalOnSuccess(t);n.formsConfig.activityIds&&(n.log("Sending offline activity's"),n.APIHelper.addAdvocateParticipation(n.advocateInContext.id,n.formsConfig.activityIds,function(t){n.genericOnSuccess(t,"onSuccessParticipation","Added Advocate Participation",n)},function(t){n.genericOnError(t,"onErrorParticipation","An error occurs adding the Advocate Participation",n)}));n.formsConfig.groupAssociations&&(n.log("Updating Advocate with groupAssociations"),n.APIHelper.addGroupAssociationsToAdvocate(n.advocateInContext.id,n.formsConfig.groupAssociations,function(t){n.genericOnSuccess(t,"onSuccessAssociation","Added Group Associations",n)},function(t){n.genericOnError(t,"onErrorAssociation","An error occurs adding the Group Associations",n)}));0<Object.keys(n.udfs).length&&(n.log("Updating Advocate with UDFs"),n.APIHelper.setUserDefinedFields(n.advocateInContext.id,n.udfs,function(t){n.genericOnSuccess(t,"onSuccessUDF","Added UDFs",n)},function(t){n.genericOnError(t,"onErrorUDF","An error occurs adding the UDFs",n)}))},function(t){n.DOMHelper.toggleDisable(n.forms[n.formId].submitButton);n.externalOnError(t)})):(this.DOMHelper.toggleDisable(this.forms[this.formId].submitButton),this.externalOnValidationError(this.errorLog))}},{key:"composeTellAFriendData",value:function(){var n={Recipients:[]};return n.EmailBody=this.forms[this.formId].EmailBody.value,n.FriendIdReplacementToken=this.formsConfig[this.formId].friendIdReplacementToken,n.Subject=this.forms[this.formId].Subject?this.forms[this.formId].Subject.value:"",this.forms[this.formId].Recipients.forEach(function(t){0<t.value.length&&n.Recipients.push(t.value)},this),n}},{key:"composeSenderData",value:function(){return{DisplayName:this.forms[this.formId].DisplayName.value,EmailAddress:this.forms[this.formId].EmailAddress.value}}},{key:"composeCaptchaData",value:function(){var n=this.captchaId;if(n)return{id:n,response:this.forms[this.formId].CaptchaResponse.value};throw this.errorAppUsage("There is no captcha id present in the localStorage, review the guide.");}}]),t}(i(0));n.exports=u},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(n,i,r){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t);var u=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i,r));return u.fields=n.fieldSettings.shareYourStoryFields,u.component=i,u.validObject=[],u.validObject.object=[],u}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"validateFields",value:function(n){var t=n.forms[n.formId],i=this,r=!1,u={};return n.errorLog=[],Object.keys(t).forEach(function(f){"udf"===f?Object.keys(t[f]).forEach(function(e){var s=t[f][e],l=s.getAttribute("data-udf"),h=n.getUDFConfig("data-udf",s),c,o;if(void 0===h)throw n.errorAppUsage("Field has no configuration. Please check the field name or namingPrefix");u=h;(r=!0)&&(n.udfs["Field"+l]=s.value);c=u.validators;o=!0;o=i.applyValidators(c,o,s,n,i.component.formsConfig[i.component.validatingFormId]);i.toggleErrorLabel(o.status,"",s,r);o||n.errorLog.push(o)}):Array.isArray(t[f])||"submit"===t[f].type||"EmailAddress"===f?(Array.isArray(t[f])||"EmailAddress"==f)&&i.validateEmails(t[f],n):function(n){return 0!==n.value.length}(t[f])||n.errorLog.push(i.validationResponse("LengthValidation",!1,["The Field is empty please add a value"],t[f]))},this),0===n.errorLog.length||(n.errorLog.forEach(function(t){n.DOMHelper.toggleErrorLabel(t.field,t)}),!1)}},{key:"validateEmails",value:function(n,t){var i=new t.validatorHelper.EmailValidator,r;(i.validationResponse=this.validationResponse,Array.isArray(n))?n.forEach(function(n){var r=i.validate(n);r.status||t.errorLog.push(r)}):(r=i.validate(n),r.status||t.errorLog.push(r))}},{key:"validationResponse",value:function(n,t,i,r){return{validator:n,status:t,message:i,field:r}}}]),t}(i(28));n.exports=u},function(n){"use strict";var t=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,n)}return t(n,[{key:"sendEmailsForAdvocate",value:function(n,t,i,r,u){(u||new TellAFriendService).sendEmailsForAdvocate(n,t,function(n){i(n)},function(n){r(n)})}},{key:"sendEmailsWithCaptchaVerification",value:function(n,t,i,r,u,f){(f||new TellAFriendService).sendEmailsWithCaptchaVerification(n,t,i,function(n){r(n)},function(n){u(n)})}}]),n}();n.exports=i},function(n,t,i){"use strict";var u,r,f,e,o=i(0);"undefined"!=typeof window&&(Array.from||(Array.from=(u=Object.prototype.toString,r=function(n){return"function"==typeof n||"[object Function]"===u.call(n)},f=Math.pow(2,53)-1,e=function(n){var t=function(n){var t=+n;return isNaN(t)?0:0!=t&&isFinite(t)?(0<t?1:-1)*Math.floor(Math.abs(t)):t}(n);return Math.min(Math.max(t,0),f)},function(n){var h=this,c=Object(n),o,t;if(null==n)throw new TypeError("Array.from requires an array-like object - not null or undefined");if(t=1<arguments.length?arguments[1]:void 0,void 0!==t){if(!r(t))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(o=arguments[2])}for(var u,f=e(c.length),s=r(h)?Object(new h(f)):Array(f),i=0;i<f;)u=c[i],s[i]=t?void 0===o?t(u,i):t.call(o,u,i):u,i+=1;return s.length=f,s})),window.advocacyComponents=function(){var n=new o,t,r,u,f,e,s;return n.debug=function(){n.externalConfig={debug:!0}},n.socialConfig=function(t){t.facebook&&(n.advocateProfile.initFacebookSDK(t.facebook),window.PAFacebookLogin=n.advocateProfile.facebookLogin);t.google&&(n.advocateProfile.initGoogleSDK(t.google),window.PAGoogleLogIn=n.advocateProfile.googleLogIn)},n.initializeConfiguration=function(){if("undefined"!=typeof PublicAffairs){var t=i(38);n.robusttracking=new t;PublicAffairs.getTrackingDetail=n.robusttracking.composeTrackingDetail;"undefined"!=typeof trackAdvocate&&!0!==trackAdvocate||"1"===navigator.doNotTrack||n.robusttracking.trackSession()}void 0!==n.externalConfig&&void 0!==n.externalConfig.libReadyCallbacks&&n.externalConfig.libReadyCallbacks.forEach(function(n){if(void 0===window[n])throw new((new o).errorAppUsage)("[ConfigError] Your callback -> "+n+"() is not defined, please check your configSettings");window[n]()});n.DOMHelper.onPageLoad()},t=i(48),n.takeaction=new t,r=i(25),n.registration=new r,u=i(33),n.advocateProfile=new u,f=i(44),n.sso=new f,e=i(54),n.tellAFriend=new e,s=i(40),n.shareYourStory=new s,n}(),advocacyComponents.initializeConfiguration())},function(n,t,i){"use strict";var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(n){function t(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:n}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(t,n),r(t,[{key:"composeSubsetId",value:function(n,t,i){var e=i||advocacyComponents;if("function"==typeof Subset&&(t=Subset),"function"==typeof t){var u=n.value.split(":"),r=new t,f={};return r.compositeKey=u[0],r.id=u[1],f.value=r,f}throw new e.errorAppSystem("[APIH-composeSubsetId] The Component Library did not load, please contact support and provide this line").message;}}]),t}(i(5));n.exports=u},function(){"use strict";var t,n,i,r;Array.from||(Array.from=(t=Object.prototype.toString,n=function(n){return"function"==typeof n||"[object Function]"===t.call(n)},i=Math.pow(2,53)-1,r=function(n){var t=function(n){var t=+n;return isNaN(t)?0:0!=t&&isFinite(t)?(0<t?1:-1)*Math.floor(Math.abs(t)):t}(n);return Math.min(Math.max(t,0),i)},function(t){var h=this,c=Object(t),o,i;if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");if(i=1<arguments.length?arguments[1]:void 0,void 0!==i){if(!n(i))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(o=arguments[2])}for(var f,e=r(c.length),s=n(h)?Object(new h(e)):Array(e),u=0;u<e;)f=c[u],s[u]=i?void 0===o?i(f,u):i.call(o,f,u):f,u+=1;return s.length=e,s}))},function(){throw new Error("Module parse failed: Unexpected token (3:12)\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders\n| HELPERS\n| \n> Helpers, as the name suggests, help you with tasks. \n| Each helper file is simply a collection of functions in a particular category. \n| There are URL Helpers, that assist in creating links, there are Form Helpers that ");},function(){},function(n,t,i){i(57);i(33);i(34);i(36);i(37);i(32);i(35);i(0);i(8);i(31);i(25);i(29);i(26);i(27);i(38);i(39);i(43);i(58);i(41);i(42);i(40);i(45);i(47);i(46);i(44);i(49);i(53);i(51);i(50);i(52);i(48);i(56);i(55);i(54);i(7);i(30);i(9);i(5);i(1);i(4);i(3);i(24);i(23);i(10);i(6);i(20);i(12);i(11);i(17);i(22);i(14);i(15);i(13);i(18);i(19);i(16);i(21);i(59);i(2);n.exports=i(28)},function(n,t,i){function r(n){var t=f(n);return i(t)}function f(n){if(!i.o(u,n)){var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t;}return u[n]}var u={"./APIHelper":5,"./APIHelper.js":5,"./AdvocateHelper":9,"./AdvocateHelper.js":9,"./DOMHelper":1,"./DOMHelper.js":1,"./README.md":60,"./TemplateHelper":4,"./TemplateHelper.js":4,"./ValidatorHelper":3,"./ValidatorHelper.js":3,"./validators/AdditionalCheckBoxGroupValidator":24,"./validators/AdditionalCheckBoxGroupValidator.js":24,"./validators/AdditionalFieldCheckBoxValidator":23,"./validators/AdditionalFieldCheckBoxValidator.js":23,"./validators/EmailPreferenceValidator":10,"./validators/EmailPreferenceValidator.js":10,"./validators/EmailValidator":6,"./validators/EmailValidator.js":6,"./validators/GroupAssociationsValidator":20,"./validators/GroupAssociationsValidator.js":20,"./validators/IdValidator":12,"./validators/IdValidator.js":12,"./validators/LengthValidator":11,"./validators/LengthValidator.js":11,"./validators/MultiLineBroadTextValidator":17,"./validators/MultiLineBroadTextValidator.js":17,"./validators/NoValidator":22,"./validators/NoValidator.js":22,"./validators/PhoneValidator":14,"./validators/PhoneValidator.js":14,"./validators/PostalPreferenceValidator":15,"./validators/PostalPreferenceValidator.js":15,"./validators/RequiredValidator":13,"./validators/RequiredValidator.js":13,"./validators/SingleLineAsciiAndForeignTextValidator":18,"./validators/SingleLineAsciiAndForeignTextValidator.js":18,"./validators/SingleLineAsciiTextValidator":19,"./validators/SingleLineAsciiTextValidator.js":19,"./validators/ZipCodeValidator":16,"./validators/ZipCodeValidator.js":16,"./validators/ZipOrStatePresenceValidator":21,"./validators/ZipOrStatePresenceValidator.js":21};r.keys=function(){return Object.keys(u)};r.resolve=f;n.exports=r;r.id=63},function(n,t,i){function r(n){var t=f(n);return i(t)}function f(n){if(!i.o(u,n)){var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t;}return u[n]}var u={"./RegistrationComponent":25,"./RegistrationComponent.js":25,"./helpers/HelperDomRegistration":8,"./helpers/HelperDomRegistration.js":8,"./helpers/RegistrationAPIHelper":31,"./helpers/RegistrationAPIHelper.js":31,"./services/HeadlessValidationService":29,"./services/HeadlessValidationService.js":29,"./services/RegistrationAPIService":26,"./services/RegistrationAPIService.js":26,"./services/ValidationService":27,"./services/ValidationService.js":27,"./sonar-project.properties":61};r.keys=function(){return Object.keys(u)};r.resolve=f;n.exports=r;r.id=64},function(n,t,i){function r(n){var t=f(n);return i(t)}function f(n){if(!i.o(u,n)){var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t;}return u[n]}var u={"./AdvocacyComponent":57,"./AdvocacyComponent.js":57,"./components/Component":0,"./components/Component.js":0,"./components/advocateProfile/AdvocateProfileComponent":33,"./components/advocateProfile/AdvocateProfileComponent.js":33,"./components/advocateProfile/config/Constants":34,"./components/advocateProfile/config/Constants.js":34,"./components/advocateProfile/helpers/AdvocateProfileDOMHelper":36,"./components/advocateProfile/helpers/AdvocateProfileDOMHelper.js":36,"./components/advocateProfile/helpers/AdvocateProfileHelper":37,"./components/advocateProfile/helpers/AdvocateProfileHelper.js":37,"./components/advocateProfile/services/AdvocateProfileAPIService":32,"./components/advocateProfile/services/AdvocateProfileAPIService.js":32,"./components/advocateProfile/services/AdvocateProfileFacebookAPIService":35,"./components/advocateProfile/services/AdvocateProfileFacebookAPIService.js":35,"./components/advocateProfile/sonar-project.properties":66,"./components/registration/RegistrationComponent":25,"./components/registration/RegistrationComponent.js":25,"./components/registration/helpers/HelperDomRegistration":8,"./components/registration/helpers/HelperDomRegistration.js":8,"./components/registration/helpers/RegistrationAPIHelper":31,"./components/registration/helpers/RegistrationAPIHelper.js":31,"./components/registration/services/HeadlessValidationService":29,"./components/registration/services/HeadlessValidationService.js":29,"./components/registration/services/RegistrationAPIService":26,"./components/registration/services/RegistrationAPIService.js":26,"./components/registration/services/ValidationService":27,"./components/registration/services/ValidationService.js":27,"./components/registration/sonar-project.properties":61,"./components/robusttracking/RobustTrackingComponent":38,"./components/robusttracking/RobustTrackingComponent.js":38,"./components/robusttracking/services/RobustTrackingAPIServices":39,"./components/robusttracking/services/RobustTrackingAPIServices.js":39,"./components/robusttracking/sonar-project.properties":67,"./components/shareYourStory/ShareYourStoryComponent":40,"./components/shareYourStory/ShareYourStoryComponent.js":40,"./components/shareYourStory/helpers/HelperDomShareYourStory":43,"./components/shareYourStory/helpers/HelperDomShareYourStory.js":43,"./components/shareYourStory/helpers/ShareYourStoryAPIHelper":58,"./components/shareYourStory/helpers/ShareYourStoryAPIHelper.js":58,"./components/shareYourStory/services/ShareYourStoryAPIService":41,"./components/shareYourStory/services/ShareYourStoryAPIService.js":41,"./components/shareYourStory/services/ValidationService":42,"./components/shareYourStory/services/ValidationService.js":42,"./components/shareYourStory/sonar-project.properties":68,"./components/singleSignOn/SSOComponent":44,"./components/singleSignOn/SSOComponent.js":44,"./components/singleSignOn/config/Constants":45,"./components/singleSignOn/config/Constants.js":45,"./components/singleSignOn/helpers/SSODOMHelper":47,"./components/singleSignOn/helpers/SSODOMHelper.js":47,"./components/singleSignOn/services/SSOAPIService":46,"./components/singleSignOn/services/SSOAPIService.js":46,"./components/singleSignOn/sonar-project.properties":69,"./components/takeaction/TakeActionComponent":48,"./components/takeaction/TakeActionComponent.js":48,"./components/takeaction/config/Constants":49,"./components/takeaction/config/Constants.js":49,"./components/takeaction/config/MissingInfoFieldsMap":53,"./components/takeaction/config/MissingInfoFieldsMap.js":53,"./components/takeaction/helpers/TakeActionDOMHelper":51,"./components/takeaction/helpers/TakeActionDOMHelper.js":51,"./components/takeaction/services/TakeActionAPIService":50,"./components/takeaction/services/TakeActionAPIService.js":50,"./components/takeaction/services/ValidationService":52,"./components/takeaction/services/ValidationService.js":52,"./components/takeaction/sonar-project.properties":70,"./components/tellAFriend/TellAFriendComponent":54,"./components/tellAFriend/TellAFriendComponent.js":54,"./components/tellAFriend/services/TellAFriendAPIService":56,"./components/tellAFriend/services/TellAFriendAPIService.js":56,"./components/tellAFriend/services/TellAFriendValidationService":55,"./components/tellAFriend/services/TellAFriendValidationService.js":55,"./components/tellAFriend/sonar-project.properties":71,"./configs/ApiFieldsConfig":7,"./configs/ApiFieldsConfig.js":7,"./configs/ValidationErrorConfig":30,"./configs/ValidationErrorConfig.js":30,"./helpers/APIHelper":5,"./helpers/APIHelper.js":5,"./helpers/AdvocateHelper":9,"./helpers/AdvocateHelper.js":9,"./helpers/DOMHelper":1,"./helpers/DOMHelper.js":1,"./helpers/README.md":60,"./helpers/TemplateHelper":4,"./helpers/TemplateHelper.js":4,"./helpers/ValidatorHelper":3,"./helpers/ValidatorHelper.js":3,"./helpers/validators/AdditionalCheckBoxGroupValidator":24,"./helpers/validators/AdditionalCheckBoxGroupValidator.js":24,"./helpers/validators/AdditionalFieldCheckBoxValidator":23,"./helpers/validators/AdditionalFieldCheckBoxValidator.js":23,"./helpers/validators/EmailPreferenceValidator":10,"./helpers/validators/EmailPreferenceValidator.js":10,"./helpers/validators/EmailValidator":6,"./helpers/validators/EmailValidator.js":6,"./helpers/validators/GroupAssociationsValidator":20,"./helpers/validators/GroupAssociationsValidator.js":20,"./helpers/validators/IdValidator":12,"./helpers/validators/IdValidator.js":12,"./helpers/validators/LengthValidator":11,"./helpers/validators/LengthValidator.js":11,"./helpers/validators/MultiLineBroadTextValidator":17,"./helpers/validators/MultiLineBroadTextValidator.js":17,"./helpers/validators/NoValidator":22,"./helpers/validators/NoValidator.js":22,"./helpers/validators/PhoneValidator":14,"./helpers/validators/PhoneValidator.js":14,"./helpers/validators/PostalPreferenceValidator":15,"./helpers/validators/PostalPreferenceValidator.js":15,"./helpers/validators/RequiredValidator":13,"./helpers/validators/RequiredValidator.js":13,"./helpers/validators/SingleLineAsciiAndForeignTextValidator":18,"./helpers/validators/SingleLineAsciiAndForeignTextValidator.js":18,"./helpers/validators/SingleLineAsciiTextValidator":19,"./helpers/validators/SingleLineAsciiTextValidator.js":19,"./helpers/validators/ZipCodeValidator":16,"./helpers/validators/ZipCodeValidator.js":16,"./helpers/validators/ZipOrStatePresenceValidator":21,"./helpers/validators/ZipOrStatePresenceValidator.js":21,"./polyfills/array.from.polyfill":59,"./polyfills/array.from.polyfill.js":59,"./services/APIService":2,"./services/APIService.js":2,"./services/ValidationService":28,"./services/ValidationService.js":28,"./sonar-project.properties":72};r.keys=function(){return Object.keys(u)};r.resolve=f;n.exports=r;r.id=65},function(){},function(){},function(){},function(){},function(){},function(){},function(){}])