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;QAC7C;IACF;AAEJ;AACA,SAAS,gBAAgB,CAAC,SAAS,SAAU,CAAC;IAC5C,MAAM,SAAS,EAAE,MAAM;IACvB,IAAI,UAAU,OAAO,IAAI,KAAK,UAC5B,OAAO,IAAI;AAEf;AAEA,MAAM,eAAe,SAAS,cAAc,CAAC;AAC7C,cAAc,iBAAiB,SAAS;IACtC,MAAM,OAAO,SAAS,cAAc,CAAC;IACrC,KAAK,KAAK;AACZ","sources":["src/ts/components/intermediaryAffordabilityCalc.ts"],"sourcesContent":["document.addEventListener('DOMContentLoaded', () => {\n interface FormValue {\n [key: string]: string | number;\n }\n var formValue: FormValue = {\n AdultsWorking: '0',\n AdultsRetired: '0',\n Children: '0',\n NumberOfApplicants: 1,\n NetIncomeApplicant1PY: '0',\n NetIncomeApplicant2PY: '0',\n NetIncomeApplicant3PY: '0',\n NetIncomeApplicant4PY: '0',\n GrossIncomeApplicant1PY: '0',\n GrossIncomeApplicant2PY: '0',\n GrossIncomeApplicant3PY: '0',\n GrossIncomeApplicant4PY: '0',\n HouseholdExpenditurePY: '0',\n MortgageTerm: '40',\n PropertyPurchasePrice: '0',\n MortgageAmount: '0',\n RepaymentType: '0',\n TotalIncomePerYear: '0',\n MonthlyDispensibleIncome: '0',\n LoanToValue: '0',\n PersonsExpenditurePM: '0',\n IncomeMultiple: '0',\n creditCommitmentsPY: '0',\n PropertyType: '0',\n energyCostsPY: '0',\n };\n\n //ONS Data\n let oneAR = '416.88';\n let twoAR = '736.49';\n let oneA = '417.14';\n let twoA = '813.29';\n let oneAoneC = '554.74';\n let oneAtwoC = '543.14';\n let twoAoneC = '887.17';\n let twoAtwoC = '1145.35';\n let twoAthreeC = '1040';\n let threeA = '1105.08';\n let threeAoneC = '1053.76';\n\n //Energy Costs\n let onsdetached = '217.25';\n let onssemi = '174.59';\n let onsend = '161.16';\n let onsmid = '154.84';\n let onsbungalow = '161.16';\n let onsflat = '128.77';\n interface FamilyGroups {\n [key: string]: string | number;\n }\n const familyGroups: FamilyGroups = {\n '0AW1AR0C': oneAR,\n '0AW1AR1C': oneAoneC,\n '0AW1AR2C': oneAtwoC,\n '0AW1AR3C': oneAtwoC,\n '0AW2AR0C': twoAR,\n '0AW2AR1C': twoAoneC,\n '0AW2AR2C': twoAtwoC,\n '0AW2AR3C': twoAthreeC,\n '0AW3AR0C': threeA,\n '0AW3AR1C': threeAoneC,\n '0AW3AR2C': threeAoneC,\n '0AW3AR3C': threeAoneC,\n\n '1AW0AR0C': oneA,\n '1AW0AR1C': oneAoneC,\n '1AW0AR2C': oneAtwoC,\n '1AW0AR3C': oneAtwoC,\n '1AW1AR0C': twoA,\n '1AW1AR1C': twoAoneC,\n '1AW1AR2C': twoAtwoC,\n '1AW1AR3C': twoAthreeC,\n '1AW2AR0C': threeA,\n '1AW2AR1C': threeAoneC,\n '1AW2AR2C': threeAoneC,\n '1AW2AR3C': threeAoneC,\n '1AW3AR0C': threeA,\n '1AW3AR1C': threeAoneC,\n '1AW3AR2C': threeAoneC,\n '1AW3AR3C': threeAoneC,\n\n '2AW0AR0C': twoA,\n '2AW0AR1C': twoAoneC,\n '2AW0AR2C': twoAtwoC,\n '2AW0AR3C': twoAthreeC,\n '2AW1AR0C': threeA,\n '2AW1AR1C': threeAoneC,\n '2AW1AR2C': threeAoneC,\n '2AW1AR3C': threeAoneC,\n '2AW2AR0C': threeA,\n '2AW2AR1C': threeAoneC,\n '2AW2AR2C': threeAoneC,\n '2AW2AR3C': threeAoneC,\n '2AW3AR0C': threeA,\n '2AW3AR1C': threeAoneC,\n '2AW3AR2C': threeAoneC,\n '2AW3AR3C': threeAoneC,\n\n '3AW0AR0C': threeA,\n '3AW0AR1C': threeAoneC,\n '3AW0AR2C': threeAoneC,\n '3AW0AR3C': threeAoneC,\n '3AW1AR0C': threeA,\n '3AW1AR1C': threeAoneC,\n '3AW1AR2C': threeAoneC,\n '3AW1AR3C': threeAoneC,\n '3AW2AR0C': threeA,\n '3AW2AR1C': threeAoneC,\n '3AW2AR2C': threeAoneC,\n '3AW2AR3C': threeAoneC,\n '3AW3AR0C': threeA,\n '3AW3AR1C': threeAoneC,\n '3AW3AR2C': threeAoneC,\n '3AW3AR3C': threeAoneC,\n };\n\n // Info Modals in the label\n const modalBtns = document.querySelectorAll('.open-modal-window');\n modalBtns.forEach((modalBtn) => {\n modalBtn.addEventListener('click', () => {\n const modalId = modalBtn.getAttribute('data-modal-id');\n if (modalId) {\n const modalItem = document.getElementById(modalId);\n if (modalItem) {\n modalItem.classList.add('active');\n }\n }\n });\n });\n\n const modalBtnClose = document.querySelectorAll('.close-modal-window');\n modalBtnClose.forEach((closeBtn) => {\n closeBtn.addEventListener('click', () => {\n const modalItem = closeBtn.closest('.modal-window');\n if (modalItem) {\n modalItem.classList.remove('active');\n }\n });\n });\n\n // Slider range\n const range = document.querySelector('.modal--affordability__range');\n const bubble = document.querySelector('.bubble ');\n\n if (range && bubble) {\n range.addEventListener('input', () => {\n setBubble(range, bubble);\n });\n setBubble(range, bubble);\n }\n function setBubble(range: HTMLInputElement, bubble: HTMLOutputElement) {\n const val = range.value;\n const min = range.min ? parseFloat(range.min) : 0;\n const max = range.max ? parseFloat(range.max) : 40;\n const newVal = Number(((parseFloat(val) - min) * 100) / (max - min));\n bubble.innerHTML = val + ' Years';\n bubble.style.left = `calc(${newVal}% + (${8 - newVal * 0.15}px))`;\n formValue.MortgageTerm = val;\n }\n function updateNetIncome(): void {\n const inpNetIncomeA1: HTMLInputElement | null = document.querySelector('#inpNetIncomeA1');\n const inpNetIncomeA2: HTMLInputElement | null = document.querySelector('#inpNetIncomeA2');\n const inpNetIncomeA3: HTMLInputElement | null = document.querySelector('#inpNetIncomeA3');\n const inpNetIncomeA4: HTMLInputElement | null = document.querySelector('#inpNetIncomeA4');\n const inpNetIncomeA1YM: HTMLInputElement | null = document.querySelector('#inpNetIncomeA1YM');\n const inpNetIncomeA2YM: HTMLInputElement | null = document.querySelector('#inpNetIncomeA2YM');\n const inpNetIncomeA3YM: HTMLInputElement | null = document.querySelector('#inpNetIncomeA3YM');\n const inpNetIncomeA4YM: HTMLInputElement | null = document.querySelector('#inpNetIncomeA4YM');\n if (\n !inpNetIncomeA1 ||\n !inpNetIncomeA2 ||\n !inpNetIncomeA3 ||\n !inpNetIncomeA4 ||\n !inpNetIncomeA1YM ||\n !inpNetIncomeA2YM ||\n !inpNetIncomeA3YM ||\n !inpNetIncomeA4YM\n ) {\n console.error('One or more input elements not found!');\n return;\n }\n let incomeA1: number = parseFloat(inpNetIncomeA1.value) || 0;\n let incomeA2: number = parseFloat(inpNetIncomeA2.value) || 0;\n let incomeA3: number = parseFloat(inpNetIncomeA3.value) || 0;\n let incomeA4: number = parseFloat(inpNetIncomeA4.value) || 0;\n const incomeA1YM: string = inpNetIncomeA1YM.value;\n const incomeA2YM: string = inpNetIncomeA2YM.value;\n const incomeA3YM: string = inpNetIncomeA3YM.value;\n const incomeA4YM: string = inpNetIncomeA4YM.value;\n if (incomeA1YM === 'm') {\n incomeA1 *= 12;\n }\n if (incomeA2YM === 'm') {\n incomeA2 *= 12;\n }\n if (incomeA3YM === 'm') {\n incomeA3 *= 12;\n }\n if (incomeA4YM === 'm') {\n incomeA4 *= 12;\n }\n const totalIncome: number = incomeA1 + incomeA2 + incomeA3 + incomeA4;\n formValue.NetIncomeApplicant1PY = incomeA1.toString();\n formValue.NetIncomeApplicant2PY = incomeA2.toString();\n formValue.NetIncomeApplicant3PY = incomeA3.toString();\n formValue.NetIncomeApplicant4PY = incomeA4.toString();\n formValue.TotalIncomePerYear = totalIncome.toString();\n }\n function updateGrossIncome(): void {\n const inpGrossIncomeA1: HTMLInputElement | null = document.querySelector('#inpGrossIncomeA1');\n const inpGrossIncomeA2: HTMLInputElement | null = document.querySelector('#inpGrossIncomeA2');\n const inpGrossIncomeA3: HTMLInputElement | null = document.querySelector('#inpGrossIncomeA3');\n const inpGrossIncomeA4: HTMLInputElement | null = document.querySelector('#inpGrossIncomeA4');\n const inpGrossIncomeA1YM: HTMLInputElement | null = document.querySelector('#inpGrossIncomeA1YM');\n const inpGrossIncomeA2YM: HTMLInputElement | null = document.querySelector('#inpGrossIncomeA2YM');\n const inpGrossIncomeA3YM: HTMLInputElement | null = document.querySelector('#inpGrossIncomeA3YM');\n const inpGrossIncomeA4YM: HTMLInputElement | null = document.querySelector('#inpGrossIncomeA4YM');\n\n if (\n !inpGrossIncomeA1 ||\n !inpGrossIncomeA2 ||\n !inpGrossIncomeA3 ||\n !inpGrossIncomeA4 ||\n !inpGrossIncomeA1YM ||\n !inpGrossIncomeA2YM ||\n !inpGrossIncomeA3YM ||\n !inpGrossIncomeA4YM\n ) {\n console.error('One or more input elements not found!');\n return;\n }\n\n let incomeA1: number = parseFloat(inpGrossIncomeA1.value) || 0;\n let incomeA2: number = parseFloat(inpGrossIncomeA2.value) || 0;\n let incomeA3: number = parseFloat(inpGrossIncomeA3.value) || 0;\n let incomeA4: number = parseFloat(inpGrossIncomeA4.value) || 0;\n const incomeA1YM: string = inpGrossIncomeA1YM.value;\n const incomeA2YM: string = inpGrossIncomeA2YM.value;\n const incomeA3YM: string = inpGrossIncomeA3YM.value;\n const incomeA4YM: string = inpGrossIncomeA4YM.value;\n\n if (incomeA1YM === 'm') {\n incomeA1 *= 12;\n }\n if (incomeA2YM === 'm') {\n incomeA2 *= 12;\n }\n if (incomeA3YM === 'm') {\n incomeA3 *= 12;\n }\n if (incomeA4YM === 'm') {\n incomeA4 *= 12;\n }\n\n const totalIncome: number = incomeA1 + incomeA2 + incomeA3 + incomeA4;\n\n // Assuming formValue is defined somewhere in your code\n formValue.GrossIncomeApplicant1PY = incomeA1.toString();\n formValue.GrossIncomeApplicant2PY = incomeA2.toString();\n formValue.GrossIncomeApplicant3PY = incomeA3.toString();\n formValue.GrossIncomeApplicant4PY = incomeA4.toString();\n }\n\n // Toggle NET income and Gross income according to number of applicants\n\n document.getElementById('inpNumberOfApplicants')?.addEventListener('change', function () {\n const numberOfApplicants: number = parseFloat(\n (document.getElementById('inpNumberOfApplicants') as HTMLInputElement).value,\n );\n\n switch (numberOfApplicants) {\n case 1:\n hideApplicantFields(2, 4);\n showApplicantFields(1);\n break;\n case 2:\n hideApplicantFields(3, 4);\n showApplicantFields(1, 2);\n break;\n case 3:\n hideApplicantFields(4);\n showApplicantFields(1, 2, 3);\n break;\n case 4:\n showApplicantFields(1, 2, 3, 4);\n break;\n }\n\n formValue.NumberOfApplicants = numberOfApplicants;\n updateNetIncome();\n updateGrossIncome();\n });\n hideApplicantFields(2, 4);\n\n function hideApplicantFields(startIndex: number, endIndex?: number) {\n for (let i = startIndex; i <= (endIndex || startIndex); i++) {\n const netIncomeElem = document.getElementById(`cnNetIncomeA${i}`);\n const grossIncomeElem = document.getElementById(`cnGrossIncomeA${i}`);\n\n if (netIncomeElem && grossIncomeElem) {\n netIncomeElem.style.display = 'none';\n grossIncomeElem.style.display = 'none';\n\n // Disable input fields and select elements\n netIncomeElem.querySelectorAll('input, select').forEach((element: Element) => {\n if (element instanceof HTMLInputElement || element instanceof HTMLSelectElement) {\n element.disabled = true;\n }\n });\n grossIncomeElem.querySelectorAll('input, select').forEach((element: Element) => {\n if (element instanceof HTMLInputElement || element instanceof HTMLSelectElement) {\n element.disabled = true;\n }\n });\n }\n }\n }\n\n function showApplicantFields(...indices: number[]) {\n indices.forEach((index) => {\n const netIncomeElem = document.getElementById(`cnNetIncomeA${index}`);\n const grossIncomeElem = document.getElementById(`cnGrossIncomeA${index}`);\n\n if (netIncomeElem && grossIncomeElem) {\n netIncomeElem.style.display = 'block';\n grossIncomeElem.style.display = 'block';\n\n // Enable input fields and select elements\n netIncomeElem.querySelectorAll('input, select').forEach((element: Element) => {\n if (element instanceof HTMLInputElement || element instanceof HTMLSelectElement) {\n element.disabled = false;\n }\n });\n grossIncomeElem.querySelectorAll('input, select').forEach((element: Element) => {\n if (element instanceof HTMLInputElement || element instanceof HTMLSelectElement) {\n element.disabled = false;\n }\n });\n }\n });\n }\n\n // Update Net Income\n (document.getElementById('inpNetIncomeA1') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n updateNetIncome();\n });\n\n (document.getElementById('inpNetIncomeA2') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n updateNetIncome();\n });\n\n (document.getElementById('inpNetIncomeA3') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n updateNetIncome();\n });\n\n (document.getElementById('inpNetIncomeA4') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n updateNetIncome();\n });\n\n (document.getElementById('inpNetIncomeA1YM') as HTMLSelectElement)?.addEventListener('change', function () {\n updateNetIncome();\n });\n\n (document.getElementById('inpNetIncomeA2YM') as HTMLSelectElement)?.addEventListener('change', function () {\n updateNetIncome();\n });\n\n (document.getElementById('inpNetIncomeA3YM') as HTMLSelectElement)?.addEventListener('change', function () {\n updateNetIncome();\n });\n\n (document.getElementById('inpNetIncomeA4YM') as HTMLSelectElement)?.addEventListener('change', function () {\n updateNetIncome();\n });\n\n // Update Gross Income\n (document.getElementById('inpGrossIncomeA1') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n updateGrossIncome();\n });\n\n (document.getElementById('inpGrossIncomeA2') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n updateGrossIncome();\n });\n\n (document.getElementById('inpGrossIncomeA3') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n updateGrossIncome();\n });\n\n (document.getElementById('inpGrossIncomeA4') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n updateGrossIncome();\n });\n\n (document.getElementById('inpGrossIncomeA1YM') as HTMLSelectElement)?.addEventListener('change', function () {\n updateGrossIncome();\n });\n\n (document.getElementById('inpGrossIncomeA2YM') as HTMLSelectElement)?.addEventListener('change', function () {\n updateGrossIncome();\n });\n\n (document.getElementById('inpGrossIncomeA3YM') as HTMLSelectElement)?.addEventListener('change', function () {\n updateGrossIncome();\n });\n\n (document.getElementById('inpGrossIncomeA4YM') as HTMLSelectElement)?.addEventListener('change', function () {\n updateGrossIncome();\n });\n\n // Update Household Expenditure\n (document.getElementById('formInput_expenditureA1') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n\n const expenditureA1: number = parseFloat(inputElement.value) || 0;\n const expenditureA1YM: string | null = (document.getElementById('formInput_expenditureA1YM') as HTMLSelectElement)\n ?.value;\n\n let totalExpenditure: number = expenditureA1;\n if (expenditureA1YM === 'm') {\n totalExpenditure *= 12;\n }\n\n formValue.HouseholdExpenditurePY = totalExpenditure.toString();\n });\n\n (document.getElementById('formInput_expenditureA1YM') as HTMLSelectElement)?.addEventListener('change', function () {\n const expenditureA1: number =\n parseFloat((document.getElementById('formInput_expenditureA1') as HTMLInputElement).value) || 0;\n const expenditureA1YM: string | null = (this as HTMLSelectElement).value;\n\n let totalExpenditure: number = expenditureA1;\n if (expenditureA1YM === 'm') {\n totalExpenditure *= 12;\n }\n\n formValue.HouseholdExpenditurePY = totalExpenditure.toString();\n });\n\n // Update Credit Commitments\n (document.getElementById('formInput_creditCommitments') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n\n const expenditureCC: number = parseFloat(inputElement.value) || 0;\n const creditCommitmentsYM: string | null = (\n document.getElementById('formInput_creditCommitmentsYM') as HTMLSelectElement\n )?.value;\n\n let totalExpenditureCC: number = expenditureCC;\n if (creditCommitmentsYM === 'm') {\n totalExpenditureCC *= 12;\n }\n\n formValue.creditCommitmentsPY = totalExpenditureCC.toString();\n });\n\n (document.getElementById('formInput_creditCommitmentsYM') as HTMLSelectElement)?.addEventListener(\n 'change',\n function () {\n const expenditureCC: number =\n parseFloat((document.getElementById('formInput_creditCommitments') as HTMLInputElement).value) || 0;\n const creditCommitmentsYM: string | null = (this as HTMLSelectElement).value;\n\n let totalExpenditureCC: number = expenditureCC;\n if (creditCommitmentsYM === 'm') {\n totalExpenditureCC *= 12;\n }\n\n formValue.creditCommitmentsPY = totalExpenditureCC.toString();\n },\n );\n\n // Update Energy Costs\n (document.getElementById('formInput_energyCosts') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n\n const energyCostsCC: number = parseFloat(inputElement.value) || 0;\n const energyCostsYM: string | null = (document.getElementById('formInput_energyCostsYM') as HTMLSelectElement)\n ?.value;\n\n let totalenergyCostsCC: number = energyCostsCC;\n if (energyCostsYM === 'm') {\n totalenergyCostsCC *= 12;\n }\n\n formValue.energyCostsPY = totalenergyCostsCC.toString();\n });\n\n (document.getElementById('formInput_energyCostsYM') as HTMLSelectElement)?.addEventListener('change', function () {\n const energyCostsCC: number =\n parseFloat((document.getElementById('formInput_energyCosts') as HTMLInputElement).value) || 0;\n const energyCostsYM: string | null = (this as HTMLSelectElement).value;\n\n let totalenergyCostsCC: number = energyCostsCC;\n if (energyCostsYM === 'm') {\n totalenergyCostsCC *= 12;\n }\n\n formValue.energyCostsPY = totalenergyCostsCC.toString();\n });\n\n // Update Property Purchase Price and Mortgage Amount\n (document.getElementById('inpPropertyPurchasePrice') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n\n const propertyPurchasePrice: number = parseFloat(inputElement.value) || 0;\n const mortgageAmount: number =\n parseFloat((document.getElementById('inpMortgageAmount') as HTMLInputElement).value) || 0;\n\n const loanToValue: number = (mortgageAmount / propertyPurchasePrice) * 100;\n\n formValue.PropertyPurchasePrice = propertyPurchasePrice.toString();\n formValue.MortgageAmount = mortgageAmount.toString();\n formValue.LoanToValue = loanToValue.toString();\n });\n\n (document.getElementById('inpMortgageAmount') as HTMLInputElement)?.addEventListener('keyup', function () {\n const inputElement = this as HTMLInputElement;\n inputElement.value = inputElement.value.replace(/[^0-9.]/g, '').replace(/(\\..*)\\./g, '$1');\n\n const propertyPurchasePrice: number =\n parseFloat((document.getElementById('inpPropertyPurchasePrice') as HTMLInputElement).value) || 0;\n const mortgageAmount: number = parseFloat(inputElement.value) || 0;\n\n const loanToValue: number = (mortgageAmount / propertyPurchasePrice) * 100;\n\n formValue.PropertyPurchasePrice = propertyPurchasePrice.toString();\n formValue.MortgageAmount = mortgageAmount.toString();\n formValue.LoanToValue = loanToValue.toString();\n });\n\n // Update Repayment Type\n (document.getElementById('inpRepaymentType') as HTMLSelectElement)?.addEventListener('change', function () {\n const repaymentType: string = (this as HTMLSelectElement).value;\n formValue.RepaymentType = repaymentType;\n });\n\n // Update Property Type\n (document.getElementById('inpPropertyType') as HTMLSelectElement)?.addEventListener('change', function () {\n const propertyType: string = (this as HTMLSelectElement).value;\n formValue.PropertyType = propertyType;\n });\n\n // Select all input elements and bind \"keyup\" and \"change\" events\n document.querySelectorAll('input, select').forEach((input) => {\n input.addEventListener('keyup', handleInputChange);\n input.addEventListener('change', handleInputChange);\n });\n var adultsWorking = 0;\n var adultsRetired = 0;\n var children = 0;\n var familyString = '';\n\n const inpWorkingAdult = document.getElementById('inpWorkingAdult') as HTMLInputElement;\n const inpRetiredAdult = document.getElementById('inpRetiredAdult') as HTMLInputElement;\n const inpChildren = document.getElementById('inpChildren') as HTMLInputElement;\n\n const updateFamilyStringAndValidate = () => {\n adultsWorking = parseFloat(inpWorkingAdult.value) || 0;\n adultsRetired = parseFloat(inpRetiredAdult.value) || 0;\n children = parseFloat(inpChildren.value) || 0;\n\n familyString = `${adultsWorking}AW${adultsRetired}AR${children}C`;\n\n if (familyString.includes('NaN')) {\n return; // Exit if any input is empty or invalid\n }\n\n if (familyGroups[familyString]) {\n // Valid family string; update form values and UI\n formValue.AdultsWorking = adultsWorking;\n formValue.AdultsRetired = adultsRetired;\n formValue.Children = children;\n formValue.PersonsExpenditurePM = familyGroups[familyString];\n\n document.querySelector('.sNOA')!.textContent = String(formValue.AdultsWorking);\n document.querySelector('.sNOAR')!.textContent = String(formValue.AdultsRetired);\n document.querySelector('.sNOC')!.textContent = String(formValue.Children);\n } else {\n // Invalid family string; alert and clear invalid field\n alert('Sorry, this is not a valid selection');\n if (!adultsWorking) inpWorkingAdult.value = '';\n if (!adultsRetired) inpRetiredAdult.value = '';\n if (!children) inpChildren.value = '';\n }\n };\n\n inpWorkingAdult.addEventListener('input', updateFamilyStringAndValidate);\n inpRetiredAdult.addEventListener('input', updateFamilyStringAndValidate);\n inpChildren.addEventListener('input', updateFamilyStringAndValidate);\n\n function handleInputChange(e: Event) {\n const energyCostPY: number =\n typeof formValue.energyCostsPY === 'string' ? parseFloat(formValue.energyCostsPY) : formValue.energyCostsPY || 0;\n\n const energyCostPM: number = energyCostPY / 12;\n var EnergyCost: number;\n\n switch (formValue.PropertyType) {\n case 'detached':\n EnergyCost = Math.max(energyCostPM, parseFloat(onsdetached));\n break;\n case 'semi':\n EnergyCost = Math.max(energyCostPM, parseFloat(onssemi));\n break;\n case 'end':\n EnergyCost = Math.max(energyCostPM, parseFloat(onsend));\n break;\n case 'mid':\n EnergyCost = Math.max(energyCostPM, parseFloat(onsmid));\n break;\n case 'bungalow':\n EnergyCost = Math.max(energyCostPM, parseFloat(onsbungalow));\n break;\n case 'flat':\n EnergyCost = Math.max(energyCostPM, parseFloat(onsflat));\n break;\n default:\n EnergyCost = energyCostPM;\n }\n var MonthlyDispensibleIncome =\n (parseFloat(formValue.TotalIncomePerYear.toString()) -\n (parseFloat(formValue.HouseholdExpenditurePY.toString()) +\n parseFloat(formValue.creditCommitmentsPY.toString()) +\n parseFloat(formValue?.PersonsExpenditurePM?.toString()) * 12 +\n EnergyCost * 12)) /\n 12;\n var CombinedGrossIncome =\n parseFloat(formValue.GrossIncomeApplicant1PY.toString()) +\n (parseFloat(formValue.GrossIncomeApplicant2PY.toString()) +\n (parseFloat(formValue.GrossIncomeApplicant3PY.toString()) +\n parseFloat(formValue.GrossIncomeApplicant4PY.toString())));\n formValue.MonthlyDispensibleIncome = MonthlyDispensibleIncome;\n var StressRate = 8.14; // Stress rate\n var sr = StressRate / 12 / 100;\n var n = parseFloat(formValue.MortgageTerm.toString()) * 12;\n\n var p = parseFloat(formValue.MortgageAmount.toString());\n var sp = p * 0.5;\n var m = parseFloat(formValue.MonthlyDispensibleIncome.toString());\n var sm = m + m * 0.1;\n\n var IncomeMultiple: number = 0;\n var MaxLoan = 0;\n var GrossMaxLoan = 0;\n var RepaymentTypeText: string = '';\n\n switch (formValue.NumberOfApplicants) {\n case 1:\n IncomeMultiple = 4.49;\n GrossMaxLoan = CombinedGrossIncome * IncomeMultiple;\n break;\n case 2:\n IncomeMultiple = 4.49;\n GrossMaxLoan = CombinedGrossIncome * IncomeMultiple;\n break;\n case 3:\n IncomeMultiple = 3.25;\n GrossMaxLoan = CombinedGrossIncome * IncomeMultiple;\n break;\n case 4:\n IncomeMultiple = 3.25;\n GrossMaxLoan = CombinedGrossIncome * IncomeMultiple;\n break;\n }\n formValue.IncomeMultiple = IncomeMultiple;\n\n switch (formValue.RepaymentType) {\n case 'c':\n MaxLoan = Math.floor((m / sr) * (1 - 1 / Math.pow(1 + sr, n)));\n RepaymentTypeText = 'Capital & Interest';\n break;\n case 'i':\n MaxLoan = (12 * m) / (sr * 12);\n RepaymentTypeText = 'Interest Only';\n break;\n case '0':\n MaxLoan = 0;\n RepaymentTypeText = 'x';\n break;\n }\n var LowestMaxLoan = GrossMaxLoan;\n if (MaxLoan < GrossMaxLoan) {\n LowestMaxLoan = MaxLoan;\n }\n var Statement =\n 'This enquiry passes our automated check for the loan size requested. Based on the income and expenditure you have input, the maximum loan size would be £' +\n LowestMaxLoan.toFixed(2) +\n ', subject to lending criteria and loan to value eligibility. Please call an Underwriter on 01257 235001 to discuss your specific case or email intermediaries@chorleybs.co.uk or you can send us a request for a Decision in Principle. Details of how to do this can be found in the How to Apply section below';\n var HardFail = 0;\n var SoftFail = 0;\n var OverOM = 0;\n if (p > 1000000) {\n SoftFail = 1;\n Statement =\n 'For loans over £1m please call an Underwriter on 01257 235001 to discuss your specific case or email intermediaries@chorleybs.co.uk';\n OverOM = 1;\n }\n var eligibility = parseFloat(((LowestMaxLoan / p) * 100).toFixed(1));\n if (eligibility > 100) {\n eligibility = 100;\n }\n if (MaxLoan < sp) {\n HardFail = 1;\n } else if (MaxLoan < p) {\n SoftFail = 1;\n }\n\n if (GrossMaxLoan < sp) {\n HardFail = 1;\n } else if (GrossMaxLoan < p) {\n SoftFail = 1;\n }\n if (OverOM == 0) {\n if (HardFail == 1) {\n Statement =\n 'Based on the income and expenditure you have input, the maximum loan size would be £' +\n LowestMaxLoan.toFixed(2) +\n \". This does not appear to meet your customer's requirements, please call an Underwriter on 01257 235001 to discuss your specific case or email intermediaries@chorleybs.co.uk\";\n }\n if (SoftFail == 1) {\n Statement =\n 'Based on the income and expenditure you have input, the maximum loan size would be £' +\n LowestMaxLoan.toFixed(2) +\n \". This does not appear to meet your customer's requirements, please call an Underwriter on 01257 235001 to discuss your specific case or email intermediaries@chorleybs.co.uk\";\n }\n if (formValue.RepaymentType == 'i') {\n if (p > 500000) {\n Statement =\n 'Unfortunately we do not provide Interest Only Mortgages over the value of £500,000. Please call an Underwriter on 01257 235001 to discuss your specific case or email intermediaries@chorleybs.co.uk';\n }\n }\n }\n if (p < 50000) {\n Statement =\n 'Based on the income and expenditure you have input, this does not meet our minimum loan requirements of £50,000. please call an Underwriter on 01257 235001 to discuss your specific case or email intermediaries@chorleybs.co.uk';\n }\n if (GrossMaxLoan < 50000) {\n Statement =\n 'Based on the income and expenditure you have input, the maximum loan size would be £' +\n LowestMaxLoan.toFixed(2) +\n '. This does not meet our minimum loan requirements of £50,000. please call an Underwriter on 01257 235001 to discuss your specific case or email intermediaries@chorleybs.co.uk';\n }\n\n const sBQOL = document.querySelector('.sBQOL');\n const sHBE = document.querySelector('.sHBE');\n const sTCOL = document.querySelector('.sTCOL');\n const sCNI = document.querySelector('.sCNI');\n const sMDI = document.querySelector('.sMDI');\n const sML = document.querySelector('.sML');\n const sMLG = document.querySelector('.sMLG');\n const sSR = document.querySelector('.sSR');\n const sRT = document.querySelector('.sRT');\n const sIM = document.querySelector('.sIM');\n const sCGI = document.querySelector('.sCGI');\n const sMT = document.querySelector('.sMT');\n const sIR = document.querySelector('.sIR');\n const sMA = document.querySelector('.sMA');\n const sLML = document.querySelector('.sLML');\n const sStmt = document.querySelector('.sStmt');\n const sMCC = document.querySelector('.sMCC');\n const sMEC = document.querySelector('.sMEC');\n\n if (sBQOL) sBQOL.textContent = formValue?.PersonsExpenditurePM?.toString();\n\n if (sHBE) sHBE.textContent = (parseFloat(formValue.HouseholdExpenditurePY.toString()) / 12).toFixed(2);\n let combinedExpenditure: number =\n parseFloat(formValue.HouseholdExpenditurePY.toString()) / 12 +\n parseFloat(formValue?.PersonsExpenditurePM?.toString()) +\n parseFloat(formValue.creditCommitmentsPY.toString()) / 12 +\n EnergyCost;\n if (sTCOL) sTCOL.textContent = combinedExpenditure.toFixed(2);\n if (sCNI) sCNI.textContent = parseFloat(String(Number(formValue.TotalIncomePerYear) / 12)).toFixed(2);\n if (sMDI) sMDI.textContent = parseFloat(String(formValue.MonthlyDispensibleIncome)).toFixed(2);\n if (sML) sML.textContent = parseFloat(String(MaxLoan)).toFixed(2);\n if (sMLG) sMLG.textContent = String(GrossMaxLoan);\n if (sSR) sSR.textContent = StressRate.toFixed(2);\n if (sRT) sRT.textContent = RepaymentTypeText;\n if (sIM) sIM.textContent = String(formValue.IncomeMultiple);\n if (sCGI) sCGI.textContent = parseFloat(String(CombinedGrossIncome)).toFixed(2);\n if (sMT) sMT.textContent = formValue.MortgageTerm.toString();\n if (sIR) sIR.textContent = formValue.InterestRate.toString();\n if (sMA) sMA.textContent = formValue.MortgageAmount.toString();\n if (sLML) sLML.textContent = String(parseInt(LowestMaxLoan.toString()));\n if (sStmt) sStmt.textContent = Statement;\n if (sMCC) {\n const creditCommitmentsPYValue = parseFloat(formValue.creditCommitmentsPY.toString());\n if (!isNaN(creditCommitmentsPYValue)) {\n sMCC.textContent = String(creditCommitmentsPYValue / 12);\n } else {\n console.error('Invalid creditCommitmentsPY value:', formValue.creditCommitmentsPY);\n }\n }\n\n if (sMEC) sMEC.textContent = String(EnergyCost);\n }\n\n const form = document.getElementById('form');\n\n form?.addEventListener('submit', function (e) {\n e.preventDefault();\n\n form.style.display = 'none';\n const summaryRow = document.getElementById('summaryRow');\n if (summaryRow) {\n summaryRow.style.display = 'block';\n }\n\n const uid = function () {\n return Date.now().toString(36) + Math.random().toString(36).substr(2);\n };\n\n const calReferenceElement = document.getElementById('calReference');\n\n if (calReferenceElement !== null && calReferenceElement !== undefined) {\n if (!calReferenceElement.dataset.generatedUid) {\n let currentText = calReferenceElement.textContent?.trim() || '';\n const generatedUid = uid();\n const strongElement = document.createElement('strong');\n strongElement.textContent = generatedUid;\n calReferenceElement.appendChild(strongElement);\n calReferenceElement.dataset.generatedUid = 'true';\n }\n }\n return false;\n });\n\n const backToFormBtn = document.getElementById('close-summary');\n if (form) {\n backToFormBtn?.addEventListener('click', function () {\n form.style.display = 'block';\n const summaryRow = document.getElementById('summaryRow');\n if (summaryRow) {\n summaryRow.style.display = 'none';\n }\n var resetForm = document.getElementById('form');\n resetForm?.reset();\n const numberOfApplicants = document.getElementById('inpNumberOfApplicants') as HTMLSelectElement;\n if (numberOfApplicants) {\n numberOfApplicants.value = '1';\n numberOfApplicants.dispatchEvent(new Event('change'));\n }\n });\n }\n});\ndocument.addEventListener('wheel', function (e) {\n const target = e.target as HTMLInputElement;\n if (target && target.type === 'number') {\n target.blur();\n }\n});\n\nconst calcCloseBtn = document.getElementById('btn--close');\ncalcCloseBtn?.addEventListener('click', function () {\n const form = document.getElementById('myForm') as HTMLFormElement;\n form.reset();\n});\n"],"names":[],"version":3,"file":"index.26d961f9.js.map"}