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A,EAAMP,EAAWnP,KAAK,GAClE,GANO,CASX,EAsFa4P,EAAqB,SAACzD,GACjC,IAAK8C,MAAMC,QAAQ/C,GACjB,OAAO,KAGT,IAAMgD,EAAahD,EAAY0D,MAC7B,SAACV,GAAU,OAAKA,EAAWhL,OAASuK,CAAU,IAGhD,OAAKS,GAAeA,EAAWC,MAIxBD,EAAWC,MAHT,IAIX,EAEalC,EAA2B,SAACf,GACvC,IAAK8C,MAAMC,QAAQ/C,GACjB,OAAO,KAGT,IAAMgD,EAAahD,EAAY0D,MAC7B,SAACV,GAAU,OAAKA,EAAWhL,OAASwK,CAAe,IAGrD,OAAKQ,GAAeA,EAAWrD,YAIxBqD,EAAWrD,YAHT,IAIX,C","sources":["webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/lib/components/utils/validate.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/donations/components/common/StyledComponents.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/donations/components/common/api.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/front/components/genericComponents/PageFadeIn.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/front/components/genericComponents/themes/LFI.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/donations/components/common/config.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/front/components/genericComponents/LogoFI.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/donations/components/common/form.config.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/donations/components/common/allocations.config.js"],"sourcesContent":["import parsePhoneNumber from \"libphonenumber-js\";\nimport { validate } from \"validate.js\";\nimport {DateTime} from \"luxon\";\n\nvalidate.formatters.cleanMessage = (errors) => {\n const result = {};\n const formattedError = errors.reverse().reduce(\n (obj, error) => ({\n ...obj,\n [error.attribute]: error && error.error,\n }),\n {},\n );\n for (var i in formattedError) {\n var keys = i.split(\".\");\n keys.reduce(function (r, e, j) {\n return (\n r[e] ||\n (r[e] = isNaN(Number(keys[j + 1]))\n ? keys.length - 1 == j\n ? formattedError[i]\n : {}\n : [])\n );\n }, result);\n }\n return result;\n};\n\nvalidate.extend(validate.validators.datetime, {\n parse: (value) => {\n return new Date(value).valueOf();\n },\n format: (value) => {\n return new Date(value).toISOString();\n },\n});\n\nvalidate.validators.phone = (value, { message }) => {\n let phoneNumber;\n try {\n phoneNumber = parsePhoneNumber(value, \"FR\");\n } catch (e) {\n return message;\n }\n if (phoneNumber && !phoneNumber.isValid()) {\n return message;\n }\n};\n\nvalidate.validators.dateOfBirth = (value, { message}) => {\n if (!value) {\n return message\n }\n const selectedDate = DateTime.fromISO(value)\n const diff = selectedDate.diffNow([\"years\"])\n\n if (diff?.values?.years > -18) {\n return message\n }\n}\n\nvalidate.validators.bool = (value, { message }) => {\n if (!value) {\n return message;\n }\n}\n\nvalidate.validators.optionalUrl = function (\n value,\n options,\n attribute,\n attributes,\n) {\n if (validate.isEmpty(value)) {\n return;\n }\n return validate.validators.url(value, options, attribute, attributes);\n};\n\nexport default validate;\n","import PropTypes from \"prop-types\";\nimport React from \"react\";\nimport styled, { useTheme } from \"styled-components\";\n\nimport AppLink from \"@agir/front/app/Link\";\nimport BaseButton from \"@agir/front/genericComponents/Button\";\nimport { RawFeatherIcon } from \"@agir/front/genericComponents/FeatherIcon\";\nimport ThemeProvider from \"@agir/front/theme/ThemeProvider\";\n\nimport CONFIG from \"@agir/donations/common/config\";\n\nexport const Link = styled(AppLink)`\n color: ${(props) => props.theme.primary500};\n text-decoration: underline;\n\n &:hover,\n &:focus,\n &:active {\n color: ${(props) => props.theme.primary600};\n }\n\n &[disabled],\n &[disabled]:hover,\n &[disabled]:focus,\n &[disabled]:active {\n color: ${(props) => props.theme.primary500};\n }\n`;\n\nexport const Button = styled(BaseButton)`\n font-weight: 600;\n\n ${RawFeatherIcon} {\n margin-right: 0.5rem;\n\n @media (max-width: ${(props) => props.theme.collapseSmallMobile}px) {\n display: none;\n }\n }\n`;\n\nexport const StepButton = styled(BaseButton).attrs(() => ({\n color: \"secondary\",\n}))`\n background-color: ${(props) => props.theme.secondary500};\n border-color: ${(props) => props.theme.secondary500};\n color: ${(props) => props.theme.background0};\n font-size: 1.5rem;\n\n &:hover,\n &:focus,\n &:active {\n color: ${(props) => props.theme.background0};\n background-color: ${(props) => props.theme.secondary600};\n border-color: ${(props) => props.theme.secondary600};\n }\n\n &[disabled],\n &[disabled]:hover,\n &[disabled]:focus,\n &[disabled]:active {\n background-color: ${(props) => props.theme.secondary500};\n border-color: ${(props) => props.theme.secondary500};\n opacity: 0.5;\n }\n\n margin: 0 auto;\n width: 100%;\n max-width: 25rem;\n height: 5rem;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4.5rem;\n\n & > span {\n font-weight: 400;\n font-size: 0.875rem;\n\n strong {\n font-weight: 600;\n font-size: 1.25rem;\n }\n }\n\n ${RawFeatherIcon} {\n position: absolute;\n right: 1.5rem;\n }\n`;\n\nexport const SelectedButton = styled(Button).attrs(() => ({\n color: \"primary\",\n}))`\n background-color: ${(props) => props.theme.primary500};\n border-color: ${(props) => props.theme.primary500};\n color: ${(props) => props.theme.background0};\n\n &:hover,\n &:focus,\n &:active {\n color: ${(props) => props.theme.background0};\n background-color: ${(props) => props.theme.primary600};\n border-color: ${(props) => props.theme.primary600};\n }\n\n &[disabled],\n &[disabled]:hover,\n &[disabled]:focus,\n &[disabled]:active {\n background-color: ${(props) => props.theme.primary500};\n border-color: ${(props) => props.theme.primary500};\n opacity: 0.5;\n }\n`;\n\nexport const StyledButtonLabel = styled.label`\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n border-radius: ${(props) => props.theme.borderRadius};\n background-color: ${(props) =>\n props.$empty ? props.theme.text50 : props.theme.primary500};\n opacity: ${(props) => (props.$disabled ? 0.5 : 1)};\n\n input {\n font-weight: inherit;\n border-radius: ${(props) => props.theme.borderRadius} 0 0\n ${(props) => props.theme.borderRadius};\n border: none;\n outline: none;\n display: block;\n width: 3rem;\n height: 2.25rem;\n text-align: right;\n -moz-appearance: textfield;\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n &,\n &[disabled] {\n background-color: ${(props) => props.theme.background0};\n }\n }\n\n &::after {\n display: flex;\n content: \"€\";\n background-color: ${(props) => props.theme.background0};\n height: 2.25rem;\n align-items: center;\n padding-right: 0.75rem;\n padding-left: 0.1rem;\n font-weight: inherit;\n border-radius: 0 ${(props) => props.theme.borderRadius}\n ${(props) => props.theme.borderRadius} 0;\n }\n`;\n\nexport const StyledIllustration = styled.div``;\nexport const StyledBody = styled.div``;\nexport const StyledPage = styled.div`\n @media (min-width: ${(props) => props.theme.collapse}px) {\n display: flex;\n width: 100vw;\n height: 100vh;\n overflow: hidden;\n }\n ${StyledIllustration} {\n flex: 0 0 32.75rem;\n height: 100%;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center center;\n background-image: url(${(props) => props.theme.illustration?.large});\n @media (max-width: ${(props) => props.theme.collapse}px) {\n content: url(${(props) => props.theme.illustration?.small});\n width: 100%;\n height: auto;\n }\n }\n ${StyledBody} {\n @media (min-width: ${(props) => props.theme.collapse}px) {\n flex: 1 1 auto;\n min-height: 100%;\n overflow: auto;\n }\n }\n`;\n\nexport const StyledMain = styled.main`\n margin: 0 auto;\n padding: 0 1.5rem;\n\n @media (min-width: ${(props) => props.theme.collapse}px) {\n max-width: 1200px;\n justify-content: center;\n }\n @media (max-width: ${(props) => props.theme.collapse}px) {\n padding: 0;\n }\n\n`;\n\nconst Logo = (props) => {\n const theme = useTheme();\n\n return theme.Logo ? (\n \n \n \n ) : (\n \n );\n};\n\nexport const StyledLogo = styled(Logo)`\n display: flex;\n justify-content: center;\n height: ${(props) => props.theme.logoHeight};\n width: 100%;\n padding: 1rem 1rem;\n \n &::before,\n svg, img {\n height: 100%;\n max-width: 100%;\n }\n\n &:empty::before {\n content: \"\";\n display: block;\n width: 100%;\n background-image: url(${(props) => props.theme.logo});\n background-repeat: no-repeat;\n background-position: center center;\n background-size: contain;\n }\n\n @media (max-width: ${(props) => props.theme.collapse}px) {\n border-bottom: 0.0625rem solid ${(props) => props.theme.text100};\n }\n`;\n\nexport const Title = styled.h1`\n font-size: 1.75rem;\n margin: 0;\n`;\n\nexport const Theme = ({ type, ...rest }) => (\n \n);\n\nTheme.propTypes = {\n type: PropTypes.oneOf(Object.keys(CONFIG)),\n};\n","import axios from \"@agir/lib/utils/axios\";\n\nimport useSWRImmutable from \"swr/immutable\";\nexport const ENDPOINT = {\n createDonation: \"/api/dons/\",\n getActiveContribution: \"/api/dons/ma-contribution/\",\n};\n\nexport const getDonationEndpoint = (key, params) => {\n let endpoint = ENDPOINT[key] || \"\";\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n endpoint = endpoint.replace(`:${key}`, value);\n });\n }\n return endpoint;\n};\n\nexport const usePayment = (paymentId) => useSWRImmutable(`/api/paiement/${paymentId}`)\n\nexport const useActiveContributionAPI = () => useSWRImmutable(ENDPOINT.getActiveContribution)\n\nexport const createDonation = async (data) => {\n const result = {\n data: null,\n error: null,\n };\n const url = getDonationEndpoint(\"createDonation\");\n const body = {\n ...data,\n };\n try {\n const response = await axios.post(url, body);\n result.data = response.data;\n } catch (e) {\n result.error = (e.response && e.response.data) || e.message;\n }\n\n return result;\n};\n","import { animated, useSpring } from \"@react-spring/web\";\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\n\nexport const PageFadeIn = ({ ready, wait, children, className }) => {\n const transition = useSpring({ opacity: 1, from: { opacity: 0 } });\n\n return ready ? (\n \n {children}\n \n ) : (\n <>{wait}\n );\n};\n\nPageFadeIn.propTypes = {\n ready: PropTypes.any,\n wait: PropTypes.node,\n children: PropTypes.node,\n className: PropTypes.string,\n};\n\nexport default PageFadeIn;\n","import illustrationLFIBGD from \"./images/illustration_FI_BG_D.jpg\";\nimport illustrationLFIBGM from \"./images/illustration_FI_BG_M.jpg\";\n\nimport Logo from \"@agir/front/genericComponents/LogoFI\";\n\nimport * as light from \"@agir/front/genericComponents/_variables-light.scss\";\nimport * as dark from \"@agir/front/genericComponents/_variables-dark.scss\";\n\nconst theme = {\n light: {\n secondary600: light.LFIsecondary600,\n secondary500: light.LFIsecondary500,\n secondary150: light.LFIsecondary150,\n secondary100: light.LFIsecondary100,\n\n primary600: light.LFIprimary600,\n primary500: light.LFIprimary500,\n primary150: light.LFIprimary150,\n primary100: light.LFIprimary100,\n\n Logo,\n logoHeight: \"6rem\",\n illustration: {\n small: illustrationLFIBGM,\n large: illustrationLFIBGD,\n },\n },\n\n dark: {\n secondary600: dark.LFIsecondary600,\n secondary500: dark.LFIsecondary500,\n secondary150: dark.LFIsecondary150,\n secondary100: dark.LFIsecondary100,\n\n primary600: dark.LFIprimary600,\n primary500: dark.LFIprimary500,\n primary150: dark.LFIprimary150,\n primary100: dark.LFIprimary100,\n\n Logo,\n logoHeight: \"80px\",\n illustration: {\n small: illustrationLFIBGM,\n large: illustrationLFIBGD,\n },\n },\n};\n\nexport default theme;\n","import React from \"react\";\n\nimport themeLFI from \"@agir/front/genericComponents/themes/LFI\";\n\nimport { MONTHLY_PAYMENT, SINGLE_TIME_PAYMENT } from \"./form.config\";\nimport * as api from \"./api\";\n\nimport ILBLogoImage from \"@agir/front/genericComponents/logos/ilb.png\";\n\nexport const don = {\n type: \"don\",\n maxAmount: 750000,\n maxAmountWarning: (\n \n Erreur de montant : les dons versés par une personne physique ne\n peuvent excéder 7500 € par an pour un ou des partis ou\n groupements politiques\n \n ),\n thankYouNote: (\n <>\n

Chère donatrice, Cher donateur,

\n
\n

Vous venez d'apporter votre appui financier à la France insoumise.

\n

\n Je vous remercie très chaleureusement. Cet appui est crucial pour nous.\n En effet, nous ne pouvons pas compter comme nos adversaires sur le\n soutien des oligarques ni de la finance. Notre force, c'est notre\n nombre. Ils ont les millions, mais nous sommes des millions !\n

\n

\n Je mesure combien donner quelques euros est souvent un effort financier\n important tant les temps sont durs pour beaucoup de Français. Votre\n argent ne sera pas gaspillé. Il sera utilisé avec rigueur et un souci\n constant de le rendre utile à notre action commune. Je m'y engage.\n

\n

Courage, les mauvais jours finiront.

\n
\n

Jean-Luc Mélenchon

\n \n ),\n hasAllocations: true,\n beneficiary: \"la France insoumise\",\n externalLinkRoute: \"lafranceinsoumise\",\n title: \"Faire un don - La France insoumise\",\n theme: themeLFI,\n allowedPaymentModes: {\n [SINGLE_TIME_PAYMENT]: [\"system_pay\", \"check_donations\"],\n [MONTHLY_PAYMENT]: [\"system_pay\"],\n },\n legalParagraph:\n \"Les dons seront versés à L'Association de financement de La France insoumise (AFLFI). Premier alinéa de l’article 11-4 de la loi 88-227 du 11 mars 1988 modifiée : une personne physique peut verser un don à un parti ou groupement politique si elle est de nationalité française ou si elle réside en France.\",\n};\n\nconst n = {\n ...don,\n hasAllocations: false,\n};\n\nconst ILBLogo = () => \"Logo\nconst don_ilb = {\n ...don,\n type: \"don_ilb\",\n title: \"Faire un don - Institut La Boétie\",\n beneficiary: \"Institut La Boétie\",\n theme: {...themeLFI, ...{light: {Logo: ILBLogo, logoHeight: \"7rem\",}, dark: { Logo: ILBLogo, logoHeight: \"7rem\",}}}\n}\n\nconst don_mensuel = {\n ...don,\n // Contribution ends in december :\n // - of the current year until august\n // - of the next year from september on\n getEndDate: () =>\n `${\n new Date().getMonth() < 8\n ? new Date().getFullYear()\n : new Date().getFullYear() + 1\n }-12-31T22:59:59Z`,\n type: \"don_mensuel\",\n title: \"Devenir donateur·rice mensuel de La France insoumise\",\n fixedRatio: 0.2,\n allowedPaymentModes: {\n [MONTHLY_PAYMENT]: [\"system_pay\", \"check_donations\"],\n },\n existingDonationEndpoint: api.getDonationEndpoint(\"getActiveContribution\"),\n};\n\nconst CONFIG = {\n don,\n n,\n don_mensuel: don_mensuel,\n contribution: don_mensuel,\n default: don,\n don_ilb: don_ilb\n};\n\nexport default CONFIG;\n","import PropTypes from \"prop-types\";\nimport React from \"react\";\nimport styled, { useTheme } from \"styled-components\";\n\nconst Logo = (props) => {\n const theme = useTheme();\n\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n\nconst LogoFI = styled(Logo)`\n height: ${(props) => props.height || \"auto\"};\n width: ${(props) => props.width || \"auto\"};\n`;\nLogoFI.propTypes = {\n width: PropTypes.string,\n height: PropTypes.string,\n};\n\nexport default LogoFI;\n","import validate from \"@agir/lib/utils/validate\";\nimport { getAllocationDepartement } from \"./allocations.config\";\n\nexport const SINGLE_TIME_PAYMENT = \"S\";\nexport const MONTHLY_PAYMENT = \"M\";\n\nexport const GENDER_OPTIONS = [\n { label: \"\", value: \"\" },\n { label: \"Madame\", value: \"F\" },\n { label: \"Monsieur\", value: \"M\" },\n];\n\nexport const INITIAL_DATA = {\n email: \"\",\n firstName: \"\",\n lastName: \"\",\n contactPhone: \"\",\n gender: \"\",\n locationAddress1: \"\",\n locationAddress2: \"\",\n locationCity: \"\",\n locationCountry: \"FR\",\n nationality: \"FR\",\n frenchResident: true,\n departement: \"\",\n\n paymentType: \"\",\n paymentMode: \"\",\n amount: 0,\n paymentTiming: \"\",\n allocations: [],\n consentCertification: false,\n};\n\nexport const setFormDataForUser = (user) => (data) => ({\n ...data,\n email: data.email || user.email || INITIAL_DATA.email,\n firstName: data.firstName || user.firstName || INITIAL_DATA.firstName,\n lastName: data.lastName || user.lastName || INITIAL_DATA.lastName,\n contactPhone:\n data.contactPhone || user.contactPhone || INITIAL_DATA.contactPhone,\n locationAddress1:\n data.locationAddress1 || user.address1 || INITIAL_DATA.locationAddress1,\n locationAddress2:\n data.locationAddress2 || user.address2 || INITIAL_DATA.locationAddress2,\n locationZip: data.locationZip || user.zip || INITIAL_DATA.locationZip,\n locationCity: data.locationCity || user.city || INITIAL_DATA.locationCity,\n locationCountry: data.locationCountry || user.country || INITIAL_DATA.country,\n departement: data.departement || user.departement || INITIAL_DATA.departement,\n gender: data.gender\n ? data.gender\n : GENDER_OPTIONS.includes(user.gender)\n ? user.gender\n : INITIAL_DATA.gender,\n});\n\nexport const setFormDataFromExistingDonation = (existingDonation) => (data) => {\n if (!existingDonation) {\n return data;\n }\n const newData = { ...data };\n\n Object.entries(existingDonation).forEach(([key, value]) => {\n switch (key) {\n case \"id\":\n case \"created\":\n case \"renewable\":\n case \"allocations\":\n return;\n case \"endDate\":\n newData.effectDate = value;\n break;\n default:\n newData[key] = value || data[value] || INITIAL_DATA[value];\n }\n });\n\n const departement = getAllocationDepartement(existingDonation.allocations);\n if (departement) {\n newData[\"departement\"] = departement.id;\n }\n\n return newData;\n};\n\nexport const DONATION_DATA_CONSTRAINTS = (config) => ({\n email: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n email: {\n message: \"Saisissez une adresse e-mail valide.\",\n },\n },\n firstName: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ est obligatoire\",\n },\n length: {\n maximum: 255,\n tooLong:\n \"La valeur de ce champ ne peut pas dépasser les %{count} caractères\",\n },\n },\n lastName: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n length: {\n maximum: 255,\n tooLong:\n \"La valeur de ce champ ne peut pas dépasser les %{count} caractères\",\n },\n },\n dateOfBirth: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n dateOfBirth: {\n message:\n \"Vous devez être une personne majeure pour pouvoir faire un don.\",\n },\n },\n contactPhone: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n phone: {\n message: \"Saisissez un numéro de téléphone valide.\",\n },\n },\n gender: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n inclusion: {\n within: GENDER_OPTIONS.map((option) => option.value).filter(Boolean),\n message: \"Veuillez choisir une des options.\",\n },\n },\n locationAddress1: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n },\n locationCity: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n },\n locationCountry: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n },\n nationality: {\n presence: {\n allowEmpty: false,\n message:\n \"Votre nationalité fait partie des informations que nous devons déclarer aux autorités de régulation.\",\n },\n },\n paymentMode: {\n presence: {\n allowEmpty: false,\n message: \"Indiquez le mode de paiement à utiliser\",\n },\n },\n amount: {\n presence: {\n allowEmpty: false,\n message: \"Choisissez le montant de votre don.\",\n },\n numericality: {\n onlyInteger: true,\n greaterThan: 0,\n lessThan: (config?.maxAmount ?? 0) + 1,\n message: \"Merci de sélectionner un montant entre 1 et 7500 €.\",\n },\n },\n paymentTiming: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n },\n honorCertified: {\n presence: {\n allowEmpty: false,\n message:\n \"Nous devons impérativement recueillir votre engagement que ce don ne provient pas d'une personne morale.\",\n },\n bool: {\n message:\n \"Nous devons impérativement recueillir votre engagement que ce don ne provient pas d'une personne morale.\",\n },\n },\n});\n\nconst NEW_DONATION_DATA_CONSTRAINTS = (config) => ({\n ...DONATION_DATA_CONSTRAINTS(config),\n departement: {\n presence: {\n allowEmpty: false,\n message: \"Ce champ ne peut pas être vide.\",\n },\n },\n frenchResident: {\n inclusion: {\n within: [true],\n message:\n \"Si vous n'avez pas la nationalité française, vous devez être résident fiscalement en France pour faire une donation\",\n },\n },\n consentCertification: {\n inclusion: {\n within: [true],\n message: \"Vous devez cocher la case précédente pour continuer\",\n },\n },\n});\n\nexport const validateDonationData = (data, config) =>\n validate(data, NEW_DONATION_DATA_CONSTRAINTS(config), {\n format: \"cleanMessage\",\n fullMessages: false,\n });\n\nexport const validateContributionRenewal = (data, config) =>\n validate(data, DONATION_DATA_CONSTRAINTS(config), {\n format: \"cleanMessage\",\n fullMessages: false,\n });\n","export const TYPE_CNS = \"cns\";\nexport const TYPE_GROUP = \"group\";\nexport const TYPE_DEPARTMENT = \"departement\";\nexport const TYPE_NATIONAL = \"national\";\n\nexport const TYPE_LABEL = {\n [TYPE_CNS]: \"à la caisse nationale de solidarité\",\n [TYPE_NATIONAL]:\n \"aux actions et campagnes nationales, ainsi qu'aux outils mis à la disposition des insoumis⋅es (comme Action populaire !)\",\n [TYPE_GROUP]: \"au groupe d'action\",\n [TYPE_DEPARTMENT]:\n \"aux activités de votre département (ou circonscription législative pour les français·es de l'étranger)\",\n};\n\nexport const parseAllocations = (data) => {\n let parsedAllocations = [];\n let nonRenewableGroupAllocation = null;\n\n if (!data || !Array.isArray(data.allocations)) {\n return [parsedAllocations, nonRenewableGroupAllocation];\n }\n\n data.allocations\n .map((allocation) => ({\n ...allocation,\n value: allocation.amount,\n }))\n .forEach((allocation) => {\n if (\n !allocation.group ||\n (allocation.group.isPublished && allocation.group.isCertified)\n ) {\n parsedAllocations.push(allocation);\n return;\n }\n nonRenewableGroupAllocation = allocation;\n });\n\n parsedAllocations.push({\n type: TYPE_NATIONAL,\n value: getReminder(parsedAllocations, data.amount),\n });\n\n return [parsedAllocations, nonRenewableGroupAllocation];\n};\n\nexport const getReminder = (value, totalAmount) => {\n if (!value) {\n return 0;\n }\n value = Array.isArray(value) ? value : Object.values(value);\n const sum = value.reduce(\n (tot, allocation) =>\n isNaN(parseInt(allocation.value)) ? tot : tot + allocation.value,\n 0,\n );\n return totalAmount - sum;\n};\n\nexport const distributeInteger = (total, divider) => {\n total = total / 100;\n let result = [];\n let remainder = total;\n for (let i = 0; i < divider; i++) {\n result[i] =\n total > 1\n ? Math.floor(total / divider) + Number(i < total % divider)\n : total / divider;\n remainder = remainder - result[i];\n }\n result[result.length - 1] += remainder;\n\n return result.map((item) => Math.round(item * 100));\n};\n\nexport const getDefaultAllocations = (totalAmount, options) => {\n let result = {};\n options\n .filter((option) => !!option.fixedRatio)\n .forEach((option) => {\n result[option.type] = Math.round(totalAmount * option.fixedRatio);\n totalAmount -= result[option.type];\n });\n\n if (totalAmount === 0) {\n return result;\n }\n\n const remainingTargets = options.filter((option) => !option.fixedRatio);\n\n remainingTargets.forEach(\n (option, i) => (result[option.type] = i === 0 ? totalAmount : 0),\n );\n\n return result;\n};\n\nexport const getAllocationOptions = (\n totalAmount = 0,\n groupId = null,\n fixedRatio = 0,\n) => {\n const options = [\n fixedRatio\n ? {\n type: TYPE_CNS,\n label: TYPE_LABEL[TYPE_CNS],\n fixedRatio,\n defaultValue: 0,\n }\n : undefined,\n {\n type: TYPE_NATIONAL,\n label: TYPE_LABEL[TYPE_NATIONAL],\n defaultValue: 0,\n },\n {\n type: TYPE_DEPARTMENT,\n label: TYPE_LABEL[TYPE_DEPARTMENT],\n defaultValue: 0,\n },\n groupId\n ? {\n type: TYPE_GROUP,\n label: TYPE_LABEL[TYPE_GROUP],\n group: groupId,\n defaultValue: 0,\n }\n : undefined,\n ].filter(Boolean);\n\n if (!totalAmount) {\n return options;\n }\n\n const defaults = getDefaultAllocations(totalAmount, options);\n\n return options.map((option) => ({\n ...option,\n defaultValue: defaults[option.type] || option.defaultValue,\n }));\n};\n\nexport const getAllocationGroup = (allocations) => {\n if (!Array.isArray(allocations)) {\n return null;\n }\n\n const allocation = allocations.find(\n (allocation) => allocation.type === TYPE_GROUP,\n );\n\n if (!allocation || !allocation.group) {\n return null;\n }\n\n return allocation.group;\n};\n\nexport const getAllocationDepartement = (allocations) => {\n if (!Array.isArray(allocations)) {\n return null;\n }\n\n const allocation = allocations.find(\n (allocation) => allocation.type === TYPE_DEPARTMENT,\n );\n\n if (!allocation || !allocation.departement) {\n return null;\n }\n\n return allocation.departement;\n};\n"],"names":["validate","formatters","cleanMessage","errors","result","formattedError","reverse","reduce","obj","error","_objectSpread","_defineProperty","attribute","i","keys","split","r","e","j","isNaN","Number","length","extend","validators","datetime","parse","value","Date","valueOf","format","toISOString","phone","_ref","phoneNumber","message","parsePhoneNumber","isValid","dateOfBirth","_ref2","_diff$values","diff","DateTime","fromISO","diffNow","values","years","bool","_ref3","optionalUrl","options","attributes","isEmpty","url","Link","styled","AppLink","props","theme","primary500","primary600","Button","BaseButton","RawFeatherIcon","collapseSmallMobile","StepButton","attrs","color","secondary500","background0","secondary600","StyledIllustration","div","StyledBody","StyledPage","collapse","_props$theme$illustra","illustration","large","_props$theme$illustra2","small","StyledMain","main","Logo","useTheme","React","StyledLogo","logoHeight","logo","text100","Title","h1","Theme","_CONFIG$type","type","rest","_objectWithoutProperties","_excluded","ThemeProvider","_extends","CONFIG","ENDPOINT","createDonation","getActiveContribution","getDonationEndpoint","key","params","endpoint","Object","entries","forEach","_slicedToArray","replace","concat","usePayment","paymentId","useSWRImmutable","useActiveContributionAPI","_asyncToGenerator","_regeneratorRuntime","_callee","data","body","response","_context","prev","next","axios","post","sent","t0","abrupt","stop","_x","apply","arguments","PageFadeIn","ready","wait","children","className","transition","useSpring","opacity","from","animated","style","light","secondary150","secondary100","primary150","primary100","illustrationLFIBGM","illustrationLFIBGD","dark","don","maxAmount","maxAmountWarning","thankYouNote","textAlign","hasAllocations","beneficiary","externalLinkRoute","title","themeLFI","allowedPaymentModes","SINGLE_TIME_PAYMENT","MONTHLY_PAYMENT","legalParagraph","n","ILBLogo","alt","src","ILBLogoImage","don_ilb","don_mensuel","getEndDate","getMonth","getFullYear","fixedRatio","existingDonationEndpoint","api","contribution","default","width","height","viewBox","id","x1","y1","x2","y2","gradientUnits","offset","stopColor","LFIsecondary500","LFIprimary500","fill","strokeWidth","d","LogoFI","propTypes","PropTypes","GENDER_OPTIONS","label","INITIAL_DATA","email","firstName","lastName","contactPhone","gender","locationAddress1","locationAddress2","locationCity","locationCountry","nationality","frenchResident","departement","paymentType","paymentMode","amount","paymentTiming","allocations","consentCertification","setFormDataForUser","user","address1","address2","locationZip","zip","city","country","includes","setFormDataFromExistingDonation","existingDonation","newData","effectDate","getAllocationDepartement","DONATION_DATA_CONSTRAINTS","config","_config$maxAmount","presence","allowEmpty","maximum","tooLong","inclusion","within","map","option","filter","Boolean","numericality","onlyInteger","greaterThan","lessThan","honorCertified","validateDonationData","NEW_DONATION_DATA_CONSTRAINTS","fullMessages","validateContributionRenewal","TYPE_CNS","TYPE_GROUP","TYPE_DEPARTMENT","TYPE_NATIONAL","TYPE_LABEL","parseAllocations","parsedAllocations","nonRenewableGroupAllocation","Array","isArray","allocation","group","isPublished","isCertified","push","getReminder","totalAmount","tot","parseInt","getAllocationGroup","find"],"sourceRoot":""}