{"version":3,"sources":["components/shared/Column/Column.tsx","components/shared/Grid/Grid.tsx","utils/assetPrefix.ts","utils/classnames.ts","components/shared/Button/Button.tsx","components/shared/Container/Container.tsx","components/features/Header/Header.tsx","components/template/BaseLayout.tsx","icons/components/ArrowDown.tsx","icons/components/ArrowLongDown.tsx","icons/components/Calc.tsx","icons/components/Check.tsx","icons/components/Close.tsx","icons/components/LoaderDots.tsx","icons/components/Stripe.tsx","utils/hooks/use-media.ts","store/stepper/StepperContext.tsx","utils/hooks/use-stepper.ts","components/shared/Stepper/Stepper.tsx","components/shared/Text/Text.tsx","utils/validations.ts","components/shared/Input/Input.tsx","components/features/MaxLoanCalculator/formItems.ts","services/index.ts","services/HTTPClient.ts","services/apiUrls.ts","store/context/formContext.tsx","utils/prices.ts","components/shared/MortgageTypeCard/MortgageTypeCard.tsx","components/shared/InputHolder/InputHolder.tsx","components/shared/Radio/Radio.tsx","services/calculationsApi.js","components/shared/Select/Select.tsx","services/helpers.js","components/features/MaxLoanCalculator/steps/Step-2.tsx","components/features/MaxLoanCalculator/MaxLoanCalculator.tsx","components/features/MaxLoanCalculator/steps/Step-1.tsx","utils/params.ts","services/shareHelper.ts","components/modals/OverviewModal.tsx","components/features/MaxLoanCalculatorInformation/MaxLoanCalculatorInformation.tsx","components/shared/Loader/Loader.tsx","pages/home.tsx","serviceWorker.ts","index.tsx"],"names":["breakpoints","createClasses","prefix","cols","reduce","classes","col","i","push","Column","extraClass","children","pull","pre","post","join","className","Grid","assetPrefix","process","parseClassFromArg","arg","classToAppend","Array","isArray","length","classNames","objPrototype","Object","prototype","toString","key","hasOwnProperty","call","classNameArgs","classAttr","parsed","Button","variant","url","label","extraClasses","disabled","isLoading","onClick","rest","href","Container","Header","src","alt","BaseLayout","id","role","ArrowDownIcon","props","viewBox","fill","xmlns","d","ArrowLongDownIcon","stroke","CalcIcon","fillRule","CheckIcon","CloseIcon","LoaderDotsIcon","style","margin","background","preserveAspectRatio","display","transform","r","attributeName","type","begin","calcMode","keySplines","values","keyTimes","dur","repeatCount","StripeIcon","x","y","width","height","rx","useMediaQuery","mediaQuery","isSsr","window","useState","matchMedia","matches","setMatches","useLayoutEffect","mediaQueryList","listener","e","addListener","removeListener","defaultStepperState","steps","currentStep","reducer","state","action","payload","map","content","isActive","isTouched","isValid","StepperContext","createContext","dispatch","context","StepperProvider","useReducer","Provider","value","useStepper","useContext","Error","setCurrentStep","useCallback","setSteps","setStepActive","setStepValid","StepperStep","StepperContent","StepperHeader","title","completedText","Check","ArrowDown","Stripe","StepperSubmit","isValidated","isLastStep","onStepChange","setNextStep","ArrowLongDown","Stepper","defaultUrl","defaultPreviousText","previousButtonTexts","activeStep","isScreenTabletAndLower","hasCurrentStep","useEffect","stepperSteps","React","Children","toArray","step","location","Text","Component","as","isNumber","isNaN","Number","currencyToNumber","mustBeNumber","replace","parseFloat","Math","round","toFixed","Input","viewValue","name","defaultValue","placeholder","icon","onIconClick","register","min","max","validation","hasError","setType","$event","target","setValueAs","v","validate","htmlFor","autoComplete","onFocus","onBlurCapture","undefined","Calc","formItems","API","baseUrl","config","method","this","endpoint","request","data","defaultConfig","headers","Accept","body","JSON","stringify","fetch","then","response","a","json","ok","Promise","reject","version","hostname","api","indexOf","getApiUrl","FormContext","form","nhg","hasServerError","isNhg","selectedMortgageType","calculatedMortgageType","selectedInterest","selectedPeriod","updateForm","items","setIsLoading","setIsNhg","setServerError","updateData","setSelectedMortgageType","setCalculatedMortgageType","setSelectedInterest","rate","setSelectedPeriod","period","FormProvider","setForm","setNhg","setData","storedState","localStorage","getItem","get","res","storedStateObj","parse","interest","mortgageType","getStateFromSession","formObj","setItem","info","numberToCurrency","number","format","Intl","NumberFormat","currency","minimumFractionDigits","maximumFractionDigits","MortgageTypeCard","description","checked","defaultChecked","MortgageTypeCardWrapper","InputHolder","isCentered","InputHolderItem","isSmall","Radio","getShortUrl","addOn","group_guid","domain","long_url","Authorization","getMortgageProviders","MortgageType","IsNieuwbouw","RenteBasis","RentevastePeriode","Select","defaultOption","options","hasValue","option","dotsToComma","PeriodOptions","mortgageTypeCards","component","useForm","mode","handleSubmit","setValue","getValues","formState","errors","setCompletedText","bedrag","searchString","result","entriesIterator","URLSearchParams","entries","from","forEach","param","parseSearchQuery","search","item","shouldValidate","onSubmit","required","changeinterestSettings","setChangeInterestSettings","mortgageTypeFormat","riskClass","providers","producten","rentestand","getInterestRate","parseInt","formData","monthlyCost","interestRate","fixedInterestPeriod","filter","catch","error","maximumMortgageForMonthlyPayment","finally","scrollTo","top","behavior","data-tip","place","effect","data-iscapture","clickable","textColor","html","onChange","currentTarget","MaxLoanCalculator","getWhatsAppShareText","shareUrl","shareText","OverviewModal","toggleOverview","componentRef","mediaMatches","Close","ref","MaxLoanCalculatorInformation","isOverviewOpened","setIsOverviewOpened","isCalculated","setIsCalculated","useRef","handlePrint","useReactToPrint","current","shareWhatsApp","shortUrl","link","open","console","log","existingBuilding","setTimeout","ReactDOM","createPortal","document","getElementById","Loader","LoaderDots","Home","Boolean","match","render","StrictMode","navigator","serviceWorker","ready","registration","unregister","message"],"mappings":"kNAEMA,EAAwB,CAAC,KAAM,KAAM,KAAM,KAAM,OAEjDC,EAAgB,SAACC,EAAgBC,GACnC,OAAOA,EAAKC,QAAO,SAACC,EAAmBC,EAAKC,GAGxC,OAFAF,EAAQG,KAAW,IAAND,EAAA,UAAaL,EAAb,YAAuBI,GAAvB,UAAkCJ,EAAlC,YAA4CI,EAA5C,aAAoDN,EAAYO,KAEtEF,IACR,KAYMI,EAA0C,SAAC,GAQjD,IAAD,IAPFC,kBAOE,MAPW,GAOX,EANFC,EAME,EANFA,SAME,IALFR,YAKE,MALK,GAKL,MAJFK,YAIE,MAJK,GAIL,MAHFI,YAGE,MAHK,GAGL,MAFFC,WAEE,MAFI,GAEJ,MADFC,YACE,MADK,GACL,EACIT,EAAkB,sBACjBJ,EAAc,QAASE,IADN,YAEjBF,EAAc,SAAUO,IAFP,YAGjBP,EAAc,SAAUW,IAHP,YAIjBX,EAAc,QAAS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chunk.js","sourcesContent":["import React, { FunctionComponent } from 'react';\n\nconst breakpoints: string[] = ['xs', 'sm', 'md', 'lg', 'xlg'];\n\nconst createClasses = (prefix: string, cols: (number | null)[]) => {\n return cols.reduce((classes: string[], col, i) => {\n classes.push(i === 0 ? `${prefix}-${col}` : `${prefix}-${col}--${breakpoints[i]}`);\n\n return classes;\n }, []);\n};\n\ninterface ColInterface {\n extraClass?: string;\n cols?: (number | null)[];\n push?: (number | null)[];\n pull?: (number | null)[];\n pre?: (number | null)[];\n post?: (number | null)[];\n}\n\nexport const Column: FunctionComponent = ({\n extraClass = '',\n children,\n cols = [],\n push = [],\n pull = [],\n pre = [],\n post = [],\n}) => {\n const classes: string = [\n ...createClasses('o-col', cols),\n ...createClasses('u-push', push),\n ...createClasses('u-pull', pull),\n ...createClasses('u-pre', pre),\n ...createClasses('u-post', post),\n ].join(' ');\n\n return
{children}
;\n};\n","import React, { FunctionComponent } from 'react';\n\ninterface GridInterface {\n extraClass?: string;\n}\n\nexport const Grid: FunctionComponent = ({ extraClass = '', children }) => (\n
{children}
\n);\n","export const assetPrefix = process.env.PUBLIC_URL;\n","export type ClassDictionary = Record;\n\nexport type ClassValue =\n | string\n | number\n | boolean\n | undefined\n | null\n | ClassDictionary\n | ClassValue[];\n\n/**\n * Parses a class value from a single mixed-type argument.\n *\n * @param {*} arg The argument to parse.\n * @returns {string} The value to append to the class attribute value.\n * @ignore\n */\nconst parseClassFromArg = (arg: ClassValue): string => {\n let classToAppend = '';\n\n if (arg) {\n if (Array.isArray(arg)) {\n if (arg.length) {\n classToAppend = classNames(...arg);\n }\n } else if (typeof arg === 'object') {\n const objPrototype = Object.prototype;\n\n if (objPrototype.toString !== arg.toString) {\n classToAppend = arg.toString();\n } else {\n // using `for...in` over `Object.keys()` and string append over\n // template literals for improved performance\n // eslint-disable-next-line no-restricted-syntax\n for (const key in arg) {\n if (objPrototype.hasOwnProperty.call(arg, key) && arg[key]) {\n classToAppend += (classToAppend ? ' ' : '') + key;\n }\n }\n }\n } else {\n classToAppend += arg;\n }\n }\n\n return classToAppend;\n};\n\n/**\n * Reduces a list of arguments into a single class attribute value.\n *\n * @param {...*} classNameArgs A list of mixed-type arguments to reduce.\n * @returns {string} A class attribute value.\n */\nexport default function classNames(...classNameArgs: ClassValue[]): string {\n return classNameArgs.reduce((classAttr, arg) => {\n const parsed = parseClassFromArg(arg);\n return classAttr + (parsed ? (classAttr ? ' ' : '') + parsed : '');\n }, '');\n}\n","import React, { FunctionComponent, Fragment } from 'react';\nimport classNames from '../../../utils/classnames';\n\nexport interface ButtonProps {\n variant?: 'tertiary' | 'ghost' | 'secondary';\n isLoading?: boolean;\n extraClasses?: string;\n url?: string;\n label?: string;\n disabled?: boolean;\n onClick?: (e?: any) => void;\n}\n\nexport const Button: FunctionComponent = ({\n variant = '',\n url = null,\n label,\n extraClasses,\n disabled = false,\n isLoading,\n onClick = () => {},\n ...rest\n}) => {\n const classes = classNames(\n {\n 'c-button': !variant,\n 'c-button--tertiary': variant === 'tertiary',\n 'c-button--secondary': variant === 'secondary',\n 'c-button--ghost': variant === 'ghost',\n 'button--disabled': disabled,\n 'button--is-loading': isLoading,\n },\n extraClasses,\n );\n\n return (\n \n {!url && (\n \n )}\n {url && (\n \n {label && {label}}\n \n )}\n \n );\n};\n","import React, { FunctionComponent } from 'react';\n\ninterface ContainerInterface {\n extraClass?: string;\n}\n\nexport const Container: FunctionComponent = ({ extraClass = '', children }) => (\n
{children}
\n);\n","import React from 'react';\nimport { assetPrefix } from '../../../utils/assetPrefix';\nimport { Button } from '../../shared/Button';\nimport { Container } from '../../shared/Container';\n\nexport const Header = () => {\n return (\n
\n \n \n \"De\n \n\n
\n \n \n
\n
\n
\n );\n};\n","import React, { ReactNode, Fragment } from 'react';\nimport { Header } from '../features/Header';\n\ninterface BaseLayoutProps {\n children?: ReactNode;\n}\n\nexport function BaseLayout({ children }: BaseLayoutProps) {\n return (\n \n
\n\n
\n {children}\n
\n \n );\n}\n","import React from 'react';\ninterface IconProps {\n width?: number;\n height?: number;\n}\n\nconst ArrowDownIcon = (props: IconProps) => {\n return (\n \n \n \n );\n};\n\nexport default ArrowDownIcon;\n","import React from 'react';\ninterface IconProps {\n width?: number;\n height?: number;\n}\n\nconst ArrowLongDownIcon = (props: IconProps) => {\n return (\n \n \n \n );\n};\n\nexport default ArrowLongDownIcon;\n","import React from 'react';\ninterface IconProps {\n width?: number;\n height?: number;\n}\n\nconst CalcIcon = (props: IconProps) => {\n return (\n \n \n \n );\n};\n\nexport default CalcIcon;\n","import React from 'react';\ninterface IconProps {\n width?: number;\n height?: number;\n}\n\nconst CheckIcon = (props: IconProps) => {\n return (\n \n \n \n );\n};\n\nexport default CheckIcon;\n","import React from 'react';\ninterface IconProps {\n width?: number;\n height?: number;\n}\n\nconst CloseIcon = (props: IconProps) => {\n return (\n \n \n \n );\n};\n\nexport default CloseIcon;\n","import React from 'react';\ninterface IconProps {\n width?: number;\n height?: number;\n}\n\nconst LoaderDotsIcon = (props: IconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default LoaderDotsIcon;\n","import React from 'react';\ninterface IconProps {\n width?: number;\n height?: number;\n}\n\nconst StripeIcon = (props: IconProps) => {\n return (\n \n \n \n );\n};\n\nexport default StripeIcon;\n","import { useLayoutEffect, useState } from 'react';\n\nexport const mainMediaMobile = '(max-width: 1024px)';\n\nexport default function useMediaQuery(mediaQuery: string) {\n const isSsr = typeof window === 'undefined';\n\n const [matches, setMatches] = useState(() =>\n isSsr ? false : window.matchMedia(mediaQuery).matches,\n );\n useLayoutEffect(() => {\n if (isSsr) {\n return;\n }\n const mediaQueryList = window.matchMedia(mediaQuery);\n const listener = (e: any) => setMatches(e.matches);\n mediaQueryList.addListener(listener);\n return () => mediaQueryList.removeListener(listener);\n }, [isSsr, mediaQuery]);\n return matches;\n}\n","import React, { createContext, useReducer } from 'react';\n\nexport const SET_STEPS = 'SET_STEPS';\nexport const SET_CURRENT_STEP = 'SET_CURRENT_STEP';\nexport const SET_STEP_ACTIVE = 'SET_STEP_ACTIVE';\nexport const SET_STEP_VALID = 'SET_STEP_VALID';\n\ninterface StepperPayload {\n type: 'SET_STEPS' | 'SET_CURRENT_STEP' | 'SET_STEP_ACTIVE' | 'SET_STEP_VALID';\n payload?: StepState;\n}\n\ntype Step = {\n isActive: boolean;\n isTouched: boolean;\n isValid: boolean;\n};\n\ninterface StepState {\n steps: Step[];\n currentStep?: number;\n validationId?: number;\n isActive?: boolean;\n isValid?: boolean;\n}\n\ninterface StepContext {\n state: StepState;\n dispatch: (context: StepperPayload) => void;\n}\n\nexport const defaultStepperState: StepState = {\n steps: [],\n currentStep: 0,\n};\n\nexport const reducer = (state = defaultStepperState, action: StepperPayload) => {\n const { steps } = state;\n const { type, payload } = action;\n\n switch (type) {\n case SET_CURRENT_STEP:\n return {\n ...state,\n currentStep: payload!.currentStep,\n steps:\n steps &&\n steps.map((content, i) =>\n i === payload!.currentStep\n ? { ...content, isActive: true, isTouched: true }\n : content,\n ),\n };\n case SET_STEP_ACTIVE:\n return {\n ...state,\n steps:\n steps &&\n steps.map((content, i) =>\n i === payload!.currentStep\n ? {\n ...content,\n isActive: payload?.isActive || false,\n }\n : content,\n ),\n };\n\n case SET_STEP_VALID:\n return {\n ...state,\n steps:\n steps &&\n steps.map((content, i) =>\n i === payload!.currentStep\n ? {\n ...content,\n isValid: payload?.isValid || false,\n }\n : content,\n ),\n };\n case SET_STEPS:\n return {\n ...state,\n steps: payload!.steps,\n };\n\n default:\n return state;\n }\n};\n\nexport const StepperContext = createContext({\n state: defaultStepperState,\n dispatch: (context) => {},\n});\n\nexport const StepperProvider: React.FC = ({ children }) => {\n const [state, dispatch] = useReducer(reducer, defaultStepperState);\n\n return (\n {children}\n );\n};\n","import { SET_STEP_VALID } from './../../store/stepper/StepperContext';\nimport { useCallback, useContext } from 'react';\nimport {\n SET_CURRENT_STEP,\n SET_STEPS,\n SET_STEP_ACTIVE,\n StepperContext,\n} from '../../store/stepper/StepperContext';\n\nexport const useStepper = () => {\n const { state, dispatch } = useContext(StepperContext);\n const { currentStep, steps } = state;\n\n if (!StepperContext) {\n throw new Error('useStepper should be used inside StepperProvider');\n }\n\n const setCurrentStep = useCallback(\n (currentStep) =>\n dispatch({ type: SET_CURRENT_STEP, payload: { currentStep, steps: state.steps } }),\n [dispatch, state.steps],\n );\n\n const setSteps = useCallback(\n (steps) => dispatch({ type: SET_STEPS, payload: { steps } }),\n [dispatch],\n );\n\n const setStepActive = useCallback(\n (currentStep, isActive) =>\n dispatch({\n type: SET_STEP_ACTIVE,\n payload: { currentStep, steps: state.steps, isActive },\n }),\n [dispatch, state.steps],\n );\n\n const setStepValid = useCallback(\n (currentStep, isValid) =>\n dispatch({\n type: SET_STEP_VALID,\n payload: { currentStep, steps: state.steps, isValid },\n }),\n [dispatch, state.steps],\n );\n\n return {\n setSteps,\n currentStep,\n setStepActive,\n setStepValid,\n steps,\n setCurrentStep,\n };\n};\n","import React, { FunctionComponent, useEffect, Fragment } from 'react';\nimport { ArrowDown, ArrowLongDown, Check, Stripe } from '../../../icons/components';\nimport classNames from '../../../utils/classnames';\nimport { useStepper } from '../../../utils/hooks';\nimport useMediaQuery from '../../../utils/hooks/use-media';\nimport { Button } from '../Button';\n\ninterface StepperStep {\n id: number;\n}\n\nexport const StepperStep: FunctionComponent = ({ children, id }) => {\n const { steps } = useStepper();\n const { isActive, isTouched, isValid } = steps[id];\n\n const classes = classNames('stepper__step', {\n 'stepper__step--is-active': isActive,\n 'stepper__step--is-valid': isValid,\n 'stepper__step--is-touched': isTouched,\n });\n\n return
{children}
;\n};\n\nexport const StepperContent: FunctionComponent = ({ children }) => (\n
{children}
\n);\n\nexport const StepperHeader: FunctionComponent<{\n id: number;\n title: string;\n completedText?: string;\n}> = ({ id, title, completedText }) => {\n const { steps } = useStepper();\n const { isActive, isTouched, isValid } = steps[id];\n const { setStepActive } = useStepper();\n\n return (\n {\n setStepActive(id, !isActive);\n }}>\n
\n \n \n \n {title}\n
\n\n
\n {completedText && (\n {completedText}\n )}\n\n {(isActive || isTouched || isValid) && (\n \n {!isActive && }\n {isActive && }\n \n )}\n
\n \n );\n};\n\nexport const StepperSubmit: FunctionComponent<{\n isValidated?: boolean;\n id: number;\n variant?: 'primary';\n isLastStep?: boolean;\n isLoading?: boolean;\n onStepChange?: () => void;\n}> = ({ isValidated = true, id, variant, isLastStep, isLoading, onStepChange }) => {\n const { setCurrentStep, setStepActive, setStepValid } = useStepper();\n\n function setNextStep() {\n if (!isValidated) return;\n setStepValid(id, true);\n if (!isLastStep) setCurrentStep(id + 1);\n setStepActive(id, false);\n if (onStepChange) onStepChange();\n }\n return (\n \n {variant === 'primary' && (\n
\n \n
\n )}\n {!variant && (\n
\n
\n
Ga verder
\n \n \n \n
\n
\n )}\n
\n );\n};\n\nexport const Stepper: FunctionComponent<{\n defaultUrl: string;\n previousButtonTexts: string[];\n defaultPreviousText: string;\n activeStep?: number;\n}> = ({ children, defaultUrl, defaultPreviousText, previousButtonTexts, activeStep }) => {\n const { setSteps, steps, currentStep, setCurrentStep, setStepActive } = useStepper();\n const isScreenTabletAndLower = useMediaQuery('(max-width: 63.96875em)');\n\n const hasCurrentStep = currentStep && currentStep !== 0;\n\n function handleBackClick() {\n if (currentStep && currentStep !== 0) {\n const id = currentStep - 1;\n setStepActive(currentStep, false);\n setCurrentStep(id);\n } else {\n window.location.href = defaultUrl;\n }\n }\n\n useEffect(() => {\n const stepperSteps = React.Children.toArray(children).map((step: any) => {\n return {\n ...step.props,\n isValid: false,\n isActive: activeStep ? activeStep === step.props.id : currentStep === step.props.id,\n isTouched: activeStep\n ? activeStep === step.props.id\n : currentStep === step.props.id,\n };\n });\n setSteps(stepperSteps);\n }, []); // eslint-disable-line\n\n return (\n
\n
\n {steps.length > 0 &&\n steps.map((step, key) => (\n \n ))}\n
\n
\n \n {steps.length > 0 && children}\n
\n
\n );\n};\n","import React, { FunctionComponent } from 'react';\n\ninterface TextProps {\n as: 'h1' | 'h2' | 'h3' | 'p';\n}\nexport const Text: FunctionComponent = (props) => {\n const { as: Component, children } = props;\n return {children};\n};\n","export const isValidpostalCode = (value: any) => /^[1-9][0-9]{3}\\s*[a-z]{2}$/i.test(value);\nexport const isNumber = (value: any) => !isNaN(Number(value));\nexport const isEmail = (value: any) =>\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/i.test(\n value,\n );\nexport const isValidDate = (value: any) =>\n /^(0?[1-9]|[12][0-9]|3[01])[/-](0?[1-9]|1[012])[/-]\\d{4}$/.test(value);\n","import React, { FunctionComponent } from 'react';\nimport { Calc } from '../../../icons/components';\nimport { isNumber } from '../../../utils/validations';\n\ninterface InputProps {\n label?: string;\n name: string;\n defaultValue?: any;\n id: string;\n min?: number;\n icon?: boolean;\n onIconClick?: () => void;\n max?: number;\n placeholder?: string;\n register: any;\n value?: any;\n validation?: any;\n hasError?: any;\n type?: string;\n}\n\nconst currencyToNumber = (value: any, mustBeNumber?: boolean) => {\n if (typeof value === 'number') return value;\n value = value ? value.replace('€ ', '').replace(/\\./g, '') : null;\n\n if (value) {\n value = parseFloat(value);\n if (Math.round(value) !== value) {\n value = value.toFixed(2);\n }\n\n return Math.round(value);\n }\n return !mustBeNumber ? value : 0;\n};\n\nexport const Input: FunctionComponent = ({\n label,\n name,\n defaultValue,\n id,\n placeholder,\n value,\n icon,\n onIconClick,\n register,\n min,\n max,\n validation,\n hasError,\n type = 'text',\n}) => {\n let viewValue;\n\n validation = validation ? validation : {};\n\n if (type === 'currency') {\n validation.setValueAs = (v: any) => currencyToNumber(v);\n validation.validate = isNumber;\n }\n\n function setType(\n $event: React.FocusEvent,\n type: string,\n action: string,\n ) {\n viewValue = value;\n\n if (type === 'currency') {\n // if it is a int (even 0) on blur we return it and Math.round\n // if it is not an int we return null\n // always round up\n\n if (action === 'blur') {\n viewValue = $event.target.value;\n } else {\n viewValue = currencyToNumber($event.target.value);\n }\n $event.target.type = action === 'focus' ? 'number' : 'text';\n $event.target.value =\n action === 'blur'\n ? viewValue\n ? '€ ' + viewValue.replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1.')\n : null\n : viewValue;\n }\n }\n return (\n \n {label && (\n \n )}\n setType(e, type, 'focus')}\n onBlurCapture={(e) => setType(e, type, 'blur')}\n type={type}\n min={type === 'number' || type === 'currency' ? min : undefined}\n max={type === 'number' || type === 'currency' ? max : undefined}\n id={id}\n placeholder={placeholder}\n defaultValue={defaultValue}\n {...register(name, validation)}\n />\n\n {icon && (\n
\n ;\n
\n )}\n \n );\n};\n","import { FormItem } from '../../../store/context/formContext';\n\nexport const formItems = {\n monthlyCost: 'monthlyCost',\n mortgageType: 'mortgageType',\n period: 'period',\n interest: 'interest',\n isNhg: 'isNhg',\n};\n\nexport const getPostData = (values: FormItem) => {\n let postData: { [id: string]: any } = {\n monthlyCost: parseInt(values.monthlyCost),\n mortgageType: parseInt(values.mortgageType),\n interestRate: parseFloat(values.interest),\n fixedInterestPeriod: parseInt(values.period),\n isNhg: values.isNhg === 'true' ? true : false,\n };\n\n return postData;\n};\n","import { getApiUrl } from './apiUrls';\nimport HTTPGetClient from './HTTPClient';\n\nexport const API = new HTTPGetClient({ baseUrl: getApiUrl(2) });\n","/**\n * Simple HTTPGet client wrapped around window.fetch\n * @export\n * @class HTTPGetClient\n */\nexport default class HTTPGetClient {\n config: RequestInit = {\n method: 'GET',\n };\n\n baseUrl = '/';\n\n constructor({ baseUrl }: { baseUrl: string }) {\n this.baseUrl = baseUrl;\n }\n\n get(endpoint: string, config: RequestInit = {}) {\n return this.request(endpoint, { ...this.config, ...config });\n }\n\n post(endpoint: string, data: D) {\n const defaultConfig = {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n\n body: JSON.stringify(data),\n };\n return this.request(endpoint, defaultConfig);\n }\n\n private request(endpoint: string, config: RequestInit) {\n return fetch(`${this.baseUrl}/${endpoint}`, config).then(async (response) => {\n const data = await response.json();\n if (response.ok) {\n return data as T;\n } else {\n return Promise.reject(data);\n }\n });\n }\n}\n","export const getApiUrl = (version: number) => {\n const { hostname } = window.location;\n let api = version !== 2 ? 'https://api.hypotheker.nl' : 'https://api.hypotheker.nl/v2';\n\n if (hostname.indexOf('staging') !== -1) {\n api = version !== 2 ? 'https://api.hypotheker.nl' : 'https://staging-api.hypotheker.nl/v2';\n }\n\n if (hostname.indexOf('test') !== -1) {\n api = version !== 2 ? 'https://testapi.hypotheker.nl' : 'https://test-api.hypotheker.nl/v2';\n }\n\n if (hostname.indexOf('acc') !== -1) {\n api = version !== 2 ? 'https://acpapi.hypotheker.nl' : 'https://acc-api.hypotheker.nl/v2';\n }\n\n if (hostname.indexOf('localhost') !== -1) {\n api = version !== 2 ? 'https://api.hypotheker.nl' : 'https://acc-api.hypotheker.nl/v2';\n }\n\n return api;\n};\n\nexport const assetsBaseUrl = process.env.NODE_ENV === 'production' ? '/calculator' : '';\n","import React, { useEffect, useState } from 'react';\nimport { MaxLoanCalculatorInformation } from '../../components/features/MaxLoanCalculatorInformation';\nimport { NhgResponse } from '../../models/NhgResponse';\nimport { API } from '../../services';\n\nexport type FormItem = { [key: string]: any };\n\nexport interface InterestProvider {\n logoUrl: string;\n hypotheekNaam: string;\n aanbiederId: string;\n aanbiederNaam: string;\n rentestand: number;\n hypotheekVorm: string;\n trend: string;\n uitgelicht: boolean;\n lookupId: string;\n rentevastePeriode: number;\n}\n\ninterface FormContextProps {\n form: FormItem;\n\t\tnhg: NhgResponse | null;\n isLoading: boolean;\n hasServerError: boolean;\n selectedMortgageType: number;\n calculatedMortgageType: number;\n selectedPeriod: number;\n isNhg: boolean;\n selectedInterest: number;\n data: MaxLoanCalculatorInformation | null;\n updateForm: (items: FormItem) => void;\n setIsLoading: (state: boolean) => void;\n setIsNhg: (state: boolean) => void;\n setServerError: (state: boolean) => void;\n updateData: (data: MaxLoanCalculatorInformation) => void;\n setSelectedMortgageType: (id: number) => void;\n setCalculatedMortgageType: (id: number) => void;\n setSelectedInterest: (rate: number) => void;\n setSelectedPeriod: (period: number) => void;\n}\n\nexport const saveStateToSession = (state: any) => {\n window.localStorage.setItem(`state.maxloancalculator`, JSON.stringify(state));\n};\n\nexport const FormContext = React.createContext({\n form: {},\n\t\tnhg: null,\n isLoading: false,\n hasServerError: false,\n data: null,\n isNhg: false,\n selectedMortgageType: 4,\n calculatedMortgageType: 4,\n selectedInterest: 0,\n selectedPeriod: 10,\n\n updateForm: (items: FormItem) => {},\n setIsLoading: (state: boolean) => {},\n setIsNhg: (state: boolean) => {},\n setServerError: (state: boolean) => {},\n updateData: (data: MaxLoanCalculatorInformation) => {},\n setSelectedMortgageType: (id: number) => {},\n setCalculatedMortgageType: (id: number) => {},\n setSelectedInterest: (rate: number) => {},\n setSelectedPeriod: (period: number) => {},\n});\n\nexport const FormProvider: React.FC = ({ children }) => {\n const [form, setForm] = useState({});\n\t\tconst [nhg, setNhg] = useState(null);\n\t\tconst [isLoading, setIsLoading] = useState(false);\n const [hasServerError, setServerError] = useState(false);\n const [data, setData] = useState(null);\n const [selectedMortgageType, setSelectedMortgageType] = useState(4);\n const [calculatedMortgageType, setCalculatedMortgageType] = useState(4);\n const [selectedInterest, setSelectedInterest] = useState(0);\n const [selectedPeriod, setSelectedPeriod] = useState(10);\n const [isNhg, setIsNhg] = useState(false);\n\n const storedState = window.localStorage.getItem(`state.maxloancalculator`);\n\n\t\t// debug\n\t\tuseEffect(() => {\n\t\t\tAPI.get('nhg').then((res) => setNhg(res))\n\t\t}, [setNhg])\n\n function updateForm(items: FormItem) {\n const formObj = {\n ...form,\n ...items,\n };\n saveStateToSession(formObj);\n setForm(formObj);\n }\n\n function updateData(info: MaxLoanCalculatorInformation) {\n setData({ ...info });\n }\n\n useEffect(() => {\n const getStateFromSession = () => {\n if (storedState && form) {\n if (storedState !== JSON.stringify(form)) {\n const storedStateObj = JSON.parse(storedState);\n setSelectedInterest(storedStateObj.interest);\n setSelectedMortgageType(storedStateObj.mortgageType);\n setIsNhg(storedStateObj.isNhg);\n setForm(storedStateObj);\n }\n }\n };\n if (storedState) {\n getStateFromSession();\n }\n });\n\n return (\n \n {children}\n \n );\n};\n","export const numberToCurrency = (number: number, format: boolean) => {\n if (number && format) {\n var formatter = new Intl.NumberFormat('nl-NL', {\n style: 'currency',\n currency: 'EUR',\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n });\n return formatter.format(number);\n } else {\n return `€${number}`;\n }\n};\n","import React, { FunctionComponent } from 'react';\n\nexport type MortgageType = 'Annuïteiten' | 'Linear';\n\nexport interface MortgageTypeCardProps {\n label: string;\n description: string;\n name: string;\n checked?: boolean;\n defaultValue?: any;\n id: string;\n register?: any;\n validation?: any;\n onClick?: (value: any, label: string, name: string) => void;\n}\n\nexport const MortgageTypeCard: FunctionComponent = ({\n id,\n name,\n description,\n validation,\n register,\n checked,\n defaultValue,\n label,\n onClick = () => {},\n}) => {\n return (\n
\n \n\n onClick(defaultValue, label, name)}>\n {label}\n {description}\n \n
\n );\n};\n\nexport const MortgageTypeCardWrapper: FunctionComponent = ({ children }) => (\n
{children}
\n);\n","import React, { FunctionComponent } from 'react';\nimport classNames from '../../../utils/classnames';\n\nexport const InputHolder: FunctionComponent<{ isCentered?: boolean }> = ({\n children,\n isCentered,\n}) => {\n const classes = classNames('c-input-holder', {\n 'input-holder--centered': isCentered,\n });\n\n return
{children}
;\n};\n\nexport const InputHolderItem: FunctionComponent<{ isSmall?: boolean }> = ({\n children,\n isSmall,\n}) => {\n return (\n
\n {children}\n
\n );\n};\n","import React, { FunctionComponent } from 'react';\n\ninterface RadioProps {\n label: string;\n name: string;\n checked?: boolean;\n defaultValue?: any;\n id: string;\n register: any;\n validation?: any;\n hasError?: boolean;\n}\n\nexport const Radio: FunctionComponent = ({\n id,\n name,\n checked = false,\n defaultValue,\n label,\n register,\n validation,\n hasError,\n}) => {\n return (\n
\n \n \n
\n );\n};\n","export const assetsBaseUrl = process.env.NODE_ENV === 'production' ? '/calculator' : '';\n\nconst getApiUrl = (version) => {\n const { hostname } = window.location;\n let api = version !== 2 ? 'https://api.hypotheker.nl' : 'https://api.hypotheker.nl/v2';\n\n if (hostname.indexOf('staging') !== -1) {\n api = version !== 2 ? 'https://api.hypotheker.nl' : 'https://staging-api.hypotheker.nl/v2';\n }\n\n if (hostname.indexOf('test') !== -1) {\n api = version !== 2 ? 'https://testapi.hypotheker.nl' : 'https://test-api.hypotheker.nl/v2';\n }\n\n if (hostname.indexOf('acc') !== -1) {\n api = version !== 2 ? 'https://acpapi.hypotheker.nl' : 'https://test-api.hypotheker.nl/v2';\n }\n\n if (hostname.indexOf('localhost') !== -1) {\n api = version !== 2 ? 'https://api.hypotheker.nl' : 'https://test-api.hypotheker.nl/v2';\n }\n\n return api;\n};\n\nexport const getShortUrl = async (url, addOn) => {\n if (!addOn) {\n addOn = '';\n }\n\n let data = {\n group_guid: 'Be33b2VNMyq',\n domain: 'berekenen.hypotheker.nl',\n long_url: `${url}${addOn}`,\n };\n\n let response = await fetch('https://api-ssl.bitly.com/v4/shorten', {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n //Authorization: \"Bearer f8c2e48062804025e994e7d98d37e2ad0517812e\"\n Authorization: 'Bearer b4916c1b36fb25378359c58936862bfc3d1e3d15',\n },\n body: JSON.stringify(data),\n });\n\n return response.json();\n};\n\nexport const getMortgageProviders = async (\n MortgageType,\n IsNieuwbouw,\n RenteBasis,\n RentevastePeriode,\n) => {\n let response = await fetch(\n `${getApiUrl(\n 2,\n )}/interestrates/hypotheekaanbieders?HypotheekVorm=${MortgageType}&IsNieuwbouw=${IsNieuwbouw}&RenteBasis=${RenteBasis}&RentevastePeriode=${RentevastePeriode}`,\n {\n method: 'GET',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n },\n );\n\n return response.json();\n};\n","import React from 'react';\nimport { ArrowDown } from '../../../icons/components';\n\nexport interface SelectOption {\n value: string | number;\n name: string;\n}\n\nexport interface SelectProps {\n label: string;\n id?: string;\n defaultOption?: string | number;\n options?: SelectOption[];\n name: string;\n value?: string;\n register: any;\n validation?: any;\n}\n\nexport const Select = ({\n label,\n id,\n defaultOption,\n options,\n name,\n register,\n validation,\n value = '',\n}: SelectProps) => {\n const hasValue = typeof value === 'string' && value !== '';\n return (\n
\n
\n \n
\n \n {defaultOption && !hasValue && (\n \n )}\n\n {options &&\n options.map((option) => (\n \n ))}\n \n
\n \n
\n
\n
\n
\n );\n};\n","export const mainMediaMobile = '(max-width: 1024px)';\n\nexport const dotsToComma = (value) => {\n return value && value.toString().replace(/\\./g, ',');\n};\n","import React, { Fragment, FunctionComponent, useState, useContext, useEffect } from 'react';\n\nimport { Text } from '../../../shared/Text';\nimport { StepperContent, StepperHeader, StepperSubmit } from '../../../shared/Stepper';\nimport { useForm } from 'react-hook-form';\nimport { formItems, getPostData } from '../formItems';\nimport { FormContext } from '../../../../store/context/formContext';\nimport {\n MortgageTypeCard,\n MortgageTypeCardProps,\n MortgageTypeCardWrapper,\n} from '../../../shared/MortgageTypeCard';\nimport { Input } from '../../../shared/Input';\nimport { InputHolder, InputHolderItem } from '../../../shared/InputHolder';\nimport { API } from '../../../../services';\nimport { Radio } from '../../../shared/Radio';\nimport ReactTooltip from 'react-tooltip';\nimport { assetPrefix } from '../../../../utils/assetPrefix';\nimport { getMortgageProviders } from '../../../../services/calculationsApi';\nimport { Select, SelectOption } from '../../../shared/Select';\nimport { Button } from '../../../shared/Button';\nimport { dotsToComma } from '../../../../services/helpers';\nconst PeriodOptions: SelectOption[] = [\n {\n name: '5 jaar',\n value: 5,\n },\n {\n name: '10 jaar',\n value: 10,\n },\n {\n name: '15 jaar',\n value: 15,\n },\n {\n name: '20 jaar',\n value: 20,\n },\n {\n name: '30 jaar',\n value: 30,\n },\n];\nconst mortgageTypeCards: MortgageTypeCardProps[] = [\n {\n label: 'Annuïteiten',\n description:\n 'Een annuïteitenhypotheek is een hypotheek waarbij het totale maandbedrag (bestaande uit rente en aflossing) gedurende de rentevaste periode gelijk blijft.',\n name: formItems.mortgageType,\n id: formItems.mortgageType,\n checked: true,\n defaultValue: '4',\n },\n {\n label: 'Lineair',\n description:\n 'Een lineaire hypotheek is een hypotheek waarbij je gedurende de looptijd elke maand hetzelfde bedrag aflost. De rente is in het begin het hoogst en loopt gedurende de looptijd af. Je start dus met een hoog maandbedrag.',\n name: formItems.mortgageType,\n id: formItems.mortgageType,\n defaultValue: '9',\n },\n];\n\nexport const Step2: FunctionComponent<{ id: number }> = ({ id }) => {\n const {\n register,\n setValue,\n handleSubmit,\n formState: { errors, isValid },\n } = useForm({ mode: 'onBlur' });\n\n const [completedText, setCompletedText] = useState('');\n const [changeinterestSettings, setChangeInterestSettings] = useState(false);\n\n const {\n updateForm,\n form,\n isNhg,\n updateData,\n setIsLoading,\n setIsNhg,\n setCalculatedMortgageType,\n setServerError,\n selectedPeriod,\n setSelectedPeriod,\n selectedInterest,\n selectedMortgageType,\n setSelectedMortgageType,\n setSelectedInterest,\n } = useContext(FormContext);\n\n useEffect(() => {\n const getInterestRate = async (\n mortgageType: number,\n isNhg: boolean,\n RentevastePeriode: number,\n ) => {\n const mortgageTypeFormat =\n mortgageType === 4 ? 'Annuïteitenhypotheek' : 'Lineaire_hypotheek';\n const riskClass = isNhg === true ? 0 : 100;\n const providers = await getMortgageProviders(\n mortgageTypeFormat,\n false,\n riskClass,\n RentevastePeriode,\n );\n return providers.producten[0].rentestand;\n };\n getInterestRate(selectedMortgageType, isNhg, selectedPeriod).then((interest) => {\n setSelectedInterest(interest);\n setValue('interest', interest);\n });\n\n if (isNhg) {\n setValue('isNhg', 'true');\n } else {\n setValue('isNhg', 'false');\n }\n }, [\n form,\n isNhg,\n selectedInterest,\n selectedMortgageType,\n selectedPeriod,\n setSelectedInterest,\n setIsNhg,\n setValue,\n ]);\n\n const onSubmit = (data: any) => {\n setCalculatedMortgageType(parseInt(data.mortgageType));\n updateForm(data);\n setServerError(false);\n setIsLoading(true);\n\n const formData = {\n ...form,\n ...data,\n };\n\n API.post('calculator/maximummortgageformonthlypayment', getPostData(formData))\n .then((res) => {\n updateData({\n ...res,\n });\n setIsLoading(false);\n setCompletedText(\n mortgageTypeCards.filter(\n (type) => type.defaultValue === data[formItems.mortgageType],\n )[0].label,\n );\n })\n .catch((error) => {\n setServerError(true);\n updateData({\n maximumMortgageForMonthlyPayment: 0,\n });\n setIsLoading(false);\n })\n .finally(() => {\n window.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n });\n };\n\n return (\n \n \n\n \n Kies je hypotheekvorm\n\n
\n \n {mortgageTypeCards.map((mortgageType, key) => (\n setSelectedMortgageType(parseInt(value))}\n />\n ))}\n \n
\n
\n Nationale Hypotheek Garantie\n

\n Wil je de hypotheek berekenen met of zonder Nationale Hypotheek Garantie*\n Nationale Hypotheek Garantie (NHG) is een garantie op hypotheken tot 355.000 euro.
Sluit je een NHG-hypotheek af, dan leen je verantwoord en betaalbaar.
Met een NHG-hypotheek loop je als woningeigenaar minder risico en profiteer je van een rentekorting.\"\n src={`${assetPrefix}/assets/svg/info.svg`}\n alt=\"info\"\n />\n

\n \n \n \n \n \n \n \n setIsNhg(e.currentTarget.value === 'true'),\n }}\n />\n \n \n
\n
\n Adviesrente en rentevaste periode\n

\n De rentevaste periode is de afgesproken periode dat de rente gelijk blijft.\n Het rentepercentage voor jouw hypotheek kun je voor verschillende rentevaste\n perioden vastzetten. Dit kan variëren van een maand tot 30 jaar.
\n \n Leef meer over rentevaste periode\n \n

\n {!changeinterestSettings ? (\n <>\n
\n
\n
\n Rente van {dotsToComma(selectedInterest)}%\n
\n
Looptijd van 30 Jaar
\n
Rentevaste periode van {selectedPeriod} Jaar
\n
\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n setChangeInterestSettings(true)}>\n
\n \n \n \n ) : (\n \n \n \n setSelectedPeriod(e.currentTarget.value),\n }}\n />\n {errors[formItems.period] && (\n Vul een geldige looptijd in\n )}\n \n \n setChangeInterestSettings(false)}>\n \n \n )}\n\n \n \n
\n
\n );\n};\n","import React, { FunctionComponent } from 'react';\nimport { Stepper, StepperStep } from '../../shared/Stepper';\nimport { Step1, Step2 } from './steps';\n\ninterface StepsArray {\n component: FunctionComponent<{ id: number }>;\n}\n\nconst steps: StepsArray[] = [\n {\n component: Step1,\n },\n {\n component: Step2,\n },\n];\n\nexport const MaxLoanCalculator = () => {\n return (\n \n {steps &&\n steps.map((step, key) => (\n \n \n \n ))}\n \n );\n};\n","import React, { Fragment, FunctionComponent, useState, useContext, useEffect } from 'react';\n\nimport { Text } from '../../../shared/Text';\nimport { StepperContent, StepperHeader, StepperSubmit } from '../../../shared/Stepper';\nimport { useForm } from 'react-hook-form';\nimport { Input } from '../../../shared/Input/Input';\nimport { formItems } from '../formItems';\nimport { FormContext } from '../../../../store/context/formContext';\nimport { numberToCurrency } from '../../../../utils/prices';\nimport { parseSearchQuery } from '../../../../utils/params';\n\nexport const Step1: FunctionComponent<{ id: number }> = ({ id }) => {\n const {\n register,\n handleSubmit,\n setValue,\n getValues,\n formState: { errors, isValid },\n } = useForm({\n mode: 'onBlur',\n });\n\n const [completedText, setCompletedText] = useState('');\n\n const { updateForm, form } = useContext(FormContext);\n\n const { bedrag } = parseSearchQuery(window.location.search);\n\n const onSubmit = (data: any) => {\n updateForm(data);\n setCompletedText(numberToCurrency(data[formItems.monthlyCost], true));\n };\n\n useEffect(() => {\n if (form) {\n Object.entries(form).forEach((item: any[]) => {\n setValue(item[0], item[1], { shouldValidate: true });\n });\n }\n if (bedrag) {\n setValue(formItems.monthlyCost, bedrag)\n }\n }, [form, setValue]);\n\n return (\n \n \n\n \n
\n Hoeveel wil je maximaal lenen?\n\n \n\n {errors[formItems.monthlyCost] && (\n Vul een geldig bedrag in\n )}\n\n \n \n
\n
\n );\n};\n","interface RequestParams {\n\t[key: string]: string\n}\n\nexport const parseSearchQuery = (searchString: string): RequestParams => {\n\tconst result: RequestParams = {};\n\tconst entriesIterator = new URLSearchParams(searchString).entries();\n\tconst entries = Array.from(entriesIterator);\n\n\tentries.forEach((param) => {\n\t\t\tresult[param[0]] = param[1];\n\t\t}\n\t);\n\n\treturn result;\n};\n","import { numberToCurrency } from '../utils/prices';\n\ninterface getWhatsAppShareTexState {\n monthlyCost: any;\n maximumMortgageForMonthlyPayment: number | undefined;\n}\n\nexport const getWhatsAppShareText = (state: getWhatsAppShareTexState, shareUrl: any) => {\n let shareText = '';\n\n shareText =\n shareText +\n `Ik heb mijn maximale hypotheek berekend op hypotheker.nl. Ik mag maximaal ${numberToCurrency(\n state?.maximumMortgageForMonthlyPayment || 0,\n true,\n )} lenen. Dat kost bruto per maand ${numberToCurrency(state.monthlyCost, true)}.`;\n\n shareText += ` Bekijk de berekening ${shareUrl}`;\n return shareText;\n};\n","import React, { FunctionComponent, useContext } from 'react';\nimport useMediaQuery from '../../utils/hooks/use-media';\nimport { dotsToComma, mainMediaMobile } from '../../services/helpers';\nimport { Close } from '../../icons/components';\nimport { FormContext } from '../../store/context/formContext';\nimport { numberToCurrency } from '../../utils/prices';\n\ninterface OverviewModalProps {\n toggleOverview: any;\n componentRef: any;\n}\nconst OverviewModal: FunctionComponent = ({ toggleOverview, componentRef }) => {\n const mediaMatches = useMediaQuery(mainMediaMobile);\n const { form, calculatedMortgageType, data, selectedPeriod } = useContext(FormContext);\n\n return (\n
\n \n
\n \n
\n\n
\n
\n
Jouw berekening
\n\n
\n
Maximale hypotheekbedrag
\n
\n {numberToCurrency(\n data?.maximumMortgageForMonthlyPayment || 0,\n true,\n )}\n
\n
\n
\n

Deze berekening is gebaseerd op:

\n
\n
\n
\n
Gewenste bruto maandlasten
\n
{numberToCurrency(form?.monthlyCost || 0, true)}
\n
\n
\n
Hypotheekvorm
\n\n
{calculatedMortgageType === 4 ? 'Annuïteiten' : 'Linear'}
\n
\n\n
\n
Looptijd
\n\n
30 jaar
\n
\n\n
\n
Rente
\n\n
{dotsToComma(form?.interest)} %
\n
\n\n
\n
Rentevaste periode
\n\n
{selectedPeriod} jaar rentevast
\n
\n
\n
Nationale Hypotheek Garantie (NHG)
\n\n
{form.isNhg === 'true' ? 'Ja' : 'Nee'}
\n
\n
\n
\n
\n
\n \n );\n};\n\nexport default OverviewModal;\n","import React, { FunctionComponent, useContext, useEffect, useRef, useState } from 'react';\nimport { getShortUrl } from '../../../services/calculationsApi';\nimport { useReactToPrint } from 'react-to-print';\nimport { FormContext } from '../../../store/context/formContext';\nimport { numberToCurrency } from '../../../utils/prices';\nimport { Button } from '../../shared/Button';\nimport { Text } from '../../shared/Text';\nimport { getWhatsAppShareText } from '../../../services/shareHelper';\nimport ReactDOM from 'react-dom';\nimport OverviewModal from '../../modals/OverviewModal';\n// import SharePdfModal from '../../modals/SharePdfModal';\nimport { assetPrefix } from '../../../utils/assetPrefix';\nimport { dotsToComma } from '../../../services/helpers';\n\nexport interface MaxLoanCalculatorInformation {\n maximumMortgageForMonthlyPayment: number;\n}\n\nexport const MaxLoanCalculatorInformation: FunctionComponent<{\n data: MaxLoanCalculatorInformation | null;\n}> = ({ data }) => {\n const { hasServerError, form, nhg, selectedInterest, selectedPeriod, calculatedMortgageType } =\n useContext(FormContext);\n const [isOverviewOpened, setIsOverviewOpened] = useState(false);\n const [isCalculated, setIsCalculated] = useState(false);\n\n const componentRef: any = useRef();\n const handlePrint = useReactToPrint({\n content: () => componentRef.current,\n });\n\n useEffect(() => {\n if (data?.maximumMortgageForMonthlyPayment !== undefined) {\n data?.maximumMortgageForMonthlyPayment > 0\n ? setIsCalculated(true)\n : setIsCalculated(false);\n }\n }, [data]);\n\n const toggleOverview = () => {\n setIsOverviewOpened(!isOverviewOpened);\n };\n\n const print = () => {\n toggleOverview();\n\n setTimeout(() => {\n handlePrint();\n }, 200);\n };\n\n const shareWhatsApp = async () => {\n const url = 'url';\n const { hostname } = window.location;\n const state = {\n monthlyCost: form?.monthlyCost,\n maximumMortgageForMonthlyPayment: data?.maximumMortgageForMonthlyPayment,\n };\n\n if (hostname.indexOf('localhost') === -1) {\n const shortUrl = await getShortUrl(url, '&utm_source=berekening&utm_medium=whatsapp');\n const shareText = getWhatsAppShareText(state, shortUrl.link);\n window.open(`https://api.whatsapp.com/send?text=${shareText}`);\n } else {\n console.log(url);\n console.log(getWhatsAppShareText(state, window.location));\n }\n };\n\n return (\n
\n Hoeveel wil je lenen?\n\n {hasServerError ? (\n
\n \n Er is een onverwacht probleem opgetreden, probeer het later opnieuw.\n \n
\n ) : (\n <>\n
\n
Maximale hypotheek
\n
\n {numberToCurrency(data?.maximumMortgageForMonthlyPayment || 0, true)}\n
\n
\n {data?.maximumMortgageForMonthlyPayment && nhg &&\n data?.maximumMortgageForMonthlyPayment > nhg.existingBuilding &&\n form?.isNhg === 'true' && (\n
\n \n Je hebt gekozen voor een hypotheek met NHG. Op basis van deze\n maandlasten komt het hypotheekbedrag echter boven de NHG grens\n ({numberToCurrency(nhg?.existingBuilding, true)}) uit. Bereken opnieuw zonder NHG.\n \n
\n )}\n \n )}\n
\n\n
\n
\n \n \n \n\n \n \n \n
\n\n \n Toon volledige berekening\n \n
\n\n
\n {isCalculated && (\n
\n

Over deze berekening

\n

\n De maximale hypotheek is gebaseerd op de door jou ingevoerde gewenste bruto\n maandlasten, de laagste hypotheekrente op dit moment{' '}\n {dotsToComma(selectedInterest)}%, (\n {calculatedMortgageType === 4\n ? 'Annuïteitenhypotheek'\n : 'Lineaire hypotheek'}\n , {selectedPeriod} jaar vast). Maak gebruik van onze maximale hypotheek\n berekening om een goed beeld te krijgen van je daadwerkelijke leencapaciteit\n op basis van je inkomen en eventuele andere financiële verplichtingen.\n

\n \n
\n
\n )}\n\n

Afspraak maken met onze hypotheekadviseur?

\n

\n Meer weten over de mogelijkheden voor jouw persoonlijke situatie? Maak een afspraak\n bij een van onze onafhankelijke hypotheekadviseurs. Het eerste gesprek is op onze\n kosten.\n

\n \n\n {isOverviewOpened\n ? ReactDOM.createPortal(\n ,\n (document as any).getElementById('overview-modal-portal'),\n )\n : null}\n
\n );\n};\n","import React, { FunctionComponent } from 'react';\nimport LoaderDotsIcon from '../../../icons/components/LoaderDots';\n\nimport { Text } from '../Text';\n\nexport const Loader: FunctionComponent<{ isLoading: boolean }> = ({ isLoading }) => {\n return (\n
\n
\n \n We zijn nu de maximale
hypotheek aan het berekenen\n
\n \n
\n
\n );\n};\n","import React, { useContext } from 'react';\nimport { Column } from '../components/shared/Column';\nimport { Grid } from '../components/shared/Grid';\n\nimport { BaseLayout } from '../components/template/BaseLayout';\nimport { MaxLoanCalculator } from '../components/features/MaxLoanCalculator';\nimport { Container } from '../components/shared/Container';\nimport { MaxLoanCalculatorInformation } from '../components/features/MaxLoanCalculatorInformation';\nimport { FormContext } from '../store/context/formContext';\nimport { Loader } from '../components/shared/Loader';\n\nexport const Home = () => {\n const { data, isLoading } = useContext(FormContext);\n return (\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n
\n \n );\n};\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Home } from './pages/home';\n\nimport * as serviceWorker from './serviceWorker';\nimport { StepperProvider } from './store/stepper/StepperContext';\nimport { FormProvider } from './store/context/formContext';\n\nimport './styles/main.scss';\n\nReactDOM.render(\n \n \n \n \n \n \n ,\n document.getElementById('root'),\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}