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EACTA,GAAyB,GAEzBzS,EAAMN,KAAK4T,QACRlY,cAAcmX,GACd5R,UAAUI,IAAI,YACjBwS,KACF,IAGFpY,SAAS2E,iBAAiB,qBAAqB,KAC7C3E,SAASqY,cAAc,IAAIC,MAAM,2BACjCd,YAAW,KACT,MAAMe,EAAYvY,SAASC,cAAc,QACrCsY,EAAU/S,UAAUT,SAAS,gBAC/BwT,EAAU/S,UAAUC,OAAO,cAC7B,GACC,KACH8K,uBACAC,cAAcC,gBAAgB2G,EAAoB,IAGpD,MAAMgB,EAAuBA,KAC3BZ,YAAW,KACT,MAAMgB,EAAuBxY,SAASC,cAAcmX,GAChDoB,EAAqBhT,UAAUT,SAAS,aAC1CyT,EAAqBhT,UAAUC,OAAO,WACxC,GACC,IAAI,C","sources":["webpack://hnry-rails/./app/javascript/utilities/ sync ^\\.\\/.*$","webpack://hnry-rails/./app/javascript/API/config/fetch.api.ts","webpack://hnry-rails/./app/javascript/admin/utilities/user_attributes.ts","webpack://hnry-rails/./app/javascript/utilities.js","webpack://hnry-rails/./app/javascript/utilities/Toastr.tsx","webpack://hnry-rails/./app/javascript/utilities/admin/amplitude_analytics.js","webpack://hnry-rails/./app/javascript/utilities/admin/expense_categories.js","webpack://hnry-rails/./app/javascript/utilities/admin/notes.js","webpack://hnry-rails/./app/javascript/utilities/admin/offboarding.js","webpack://hnry-rails/./app/javascript/utilities/admin/onboarding.js","webpack://hnry-rails/./app/javascript/utilities/admin/sales_tax_filing.js","webpack://hnry-rails/./app/javascript/utilities/allocation_preferences.js","webpack://hnry-rails/./app/javascript/API/bank_account_validation.api.ts","webpack://hnry-rails/./app/javascript/utilities/bank_account_validation.ts","webpack://hnry-rails/./app/javascript/utilities/checkbox_enabler.js","webpack://hnry-rails/./app/javascript/utilities/custom_scrollbars.js","webpack://hnry-rails/./app/javascript/utilities/dialog.js","webpack://hnry-rails/./app/javascript/utilities/ellipsis_menus.js","webpack://hnry-rails/./app/javascript/utilities/form/disable_rails_form_button.ts","webpack://hnry-rails/./app/javascript/utilities/forms.js","webpack://hnry-rails/./app/javascript/utilities/index.js","webpack://hnry-rails/./app/javascript/utilities/invoices.js","webpack://hnry-rails/./app/javascript/utilities/onboarding_tour.js","webpack://hnry-rails/./app/javascript/utilities/profile.js","webpack://hnry-rails/./app/javascript/utilities/random_uuid_polyfill.js","webpack://hnry-rails/./app/javascript/utilities/request_submit_polyfill.js","webpack://hnry-rails/./app/javascript/utilities/search_filter_events.ts","webpack://hnry-rails/./app/javascript/utilities/set_country_cookie.js","webpack://hnry-rails/./app/javascript/utilities/sharesheet.js","webpack://hnry-rails/./app/javascript/utilities/show_element.js","webpack://hnry-rails/./app/javascript/utilities/turbolinks_transitions.js"],"sourcesContent":["var map = {\n\t\"./\": 33458,\n\t\"./Toastr\": 16927,\n\t\"./Toastr.tsx\": 16927,\n\t\"./admin/amplitude_analytics\": 56464,\n\t\"./admin/amplitude_analytics.js\": 56464,\n\t\"./admin/expense_categories\": 61905,\n\t\"./admin/expense_categories.js\": 61905,\n\t\"./admin/notes\": 58907,\n\t\"./admin/notes.js\": 58907,\n\t\"./admin/offboarding\": 26624,\n\t\"./admin/offboarding.js\": 26624,\n\t\"./admin/onboarding\": 31865,\n\t\"./admin/onboarding.js\": 31865,\n\t\"./admin/sales_tax_filing\": 50090,\n\t\"./admin/sales_tax_filing.js\": 50090,\n\t\"./allocation_preferences\": 66819,\n\t\"./allocation_preferences.js\": 66819,\n\t\"./bank_account_validation\": 49048,\n\t\"./bank_account_validation.ts\": 49048,\n\t\"./base_logic/cleanValueToNumbers\": 71518,\n\t\"./base_logic/cleanValueToNumbers.ts\": 71518,\n\t\"./base_logic/convertStringToNumber\": 48939,\n\t\"./base_logic/convertStringToNumber.ts\": 48939,\n\t\"./base_logic/globalRegexValues\": 75721,\n\t\"./base_logic/globalRegexValues.ts\": 75721,\n\t\"./base_logic/replaceAt\": 28728,\n\t\"./base_logic/replaceAt.ts\": 28728,\n\t\"./base_logic/setCaretPosition\": 29609,\n\t\"./base_logic/setCaretPosition.ts\": 29609,\n\t\"./case-conversions/camelCase\": 5063,\n\t\"./case-conversions/camelCase.ts\": 5063,\n\t\"./case-conversions/snakeCase\": 78473,\n\t\"./case-conversions/snakeCase.ts\": 78473,\n\t\"./checkbox_enabler\": 67001,\n\t\"./checkbox_enabler.js\": 67001,\n\t\"./cryptography/aes\": 56128,\n\t\"./cryptography/aes.ts\": 56128,\n\t\"./cryptography/rsa\": 75797,\n\t\"./cryptography/rsa.ts\": 75797,\n\t\"./currency/convert_element_input_to_currency\": 47299,\n\t\"./currency/convert_element_input_to_currency.ts\": 47299,\n\t\"./currency/currency_format\": 19833,\n\t\"./currency/currency_format.ts\": 19833,\n\t\"./currency/currency_jurisdiction_values\": 95036,\n\t\"./currency/currency_jurisdiction_values.ts\": 95036,\n\t\"./custom_scrollbars\": 13161,\n\t\"./custom_scrollbars.js\": 13161,\n\t\"./debounce\": 76165,\n\t\"./debounce.ts\": 76165,\n\t\"./dialog\": 2252,\n\t\"./dialog.js\": 2252,\n\t\"./dismissive\": 49224,\n\t\"./dismissive.ts\": 49224,\n\t\"./ellipsis_menus\": 78368,\n\t\"./ellipsis_menus.js\": 78368,\n\t\"./feature_flags\": 95358,\n\t\"./feature_flags.ts\": 95358,\n\t\"./form/disable_rails_form_button\": 73597,\n\t\"./form/disable_rails_form_button.ts\": 73597,\n\t\"./forms\": 4081,\n\t\"./forms.js\": 4081,\n\t\"./income_estimates\": 53331,\n\t\"./income_estimates.js\": 53331,\n\t\"./income_forecast_rates\": 59354,\n\t\"./income_forecast_rates.ts\": 59354,\n\t\"./index\": 33458,\n\t\"./index.js\": 33458,\n\t\"./invoices\": 53312,\n\t\"./invoices.js\": 53312,\n\t\"./isValidEmail\": 9300,\n\t\"./isValidEmail.ts\": 9300,\n\t\"./onDateChange\": 91267,\n\t\"./onDateChange.ts\": 91267,\n\t\"./onboarding_tour\": 98518,\n\t\"./onboarding_tour.js\": 98518,\n\t\"./polyfills\": 75894,\n\t\"./polyfills.js\": 75894,\n\t\"./profile\": 45131,\n\t\"./profile.js\": 45131,\n\t\"./random_uuid_polyfill\": 38515,\n\t\"./random_uuid_polyfill.js\": 38515,\n\t\"./redirect\": 98358,\n\t\"./redirect.ts\": 98358,\n\t\"./request_submit_polyfill\": 38734,\n\t\"./request_submit_polyfill.js\": 38734,\n\t\"./search_filter_events\": 11883,\n\t\"./search_filter_events.ts\": 11883,\n\t\"./set_country_cookie\": 70156,\n\t\"./set_country_cookie.js\": 70156,\n\t\"./sharesheet\": 60582,\n\t\"./sharesheet.js\": 60582,\n\t\"./show_element\": 14558,\n\t\"./show_element.js\": 14558,\n\t\"./translations\": 71439,\n\t\"./translations.ts\": 71439,\n\t\"./turbolinks_transitions\": 83226,\n\t\"./turbolinks_transitions.js\": 83226,\n\t\"./user_attributes\": 73233,\n\t\"./user_attributes.ts\": 73233\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 53596;","/**\n * create a helper method that enables sub methods to just call the route they desire and go!\n *\n * This should be only consumed at the \"API\" layer!\n */\n\ntype mimeTypes =\n | \"application/json\"\n | \"multipart/form-data\"\n | \"application/x-www-form-urlencoded\"\n | \"text/plain\";\n\nexport interface ResponseBody {\n status?: string;\n data: Record | string;\n}\n\nexport interface ApiResponseBody extends ResponseBody {\n apiVersion: number;\n context: Record;\n method: HttpMethod;\n}\n\nexport interface ApiErrorResponse {\n error: {\n apiVersion: number;\n method: string;\n error: {\n error: string;\n }[];\n };\n}\n\nconst constructRequest = (\n path: RequestInfo | URL,\n method: HttpMethod,\n body?: BodyInit,\n contentType?: mimeTypes,\n accept?: mimeTypes,\n): { input: RequestInfo | URL; init?: RequestInit } => {\n const csrfToken: HTMLMetaElement | undefined = document.querySelector(\n \"meta[name='csrf-token']\",\n );\n const contentTypeHeader = contentType ? { \"Content-Type\": contentType } : {};\n const acceptHeaders = accept ? { Accept: accept } : {};\n\n return {\n input: path,\n init: {\n method,\n headers: {\n \"X-CSRF-Token\": csrfToken?.content || \"\",\n ...contentTypeHeader,\n ...acceptHeaders,\n },\n body: body || undefined,\n credentials: \"same-origin\",\n },\n };\n};\n\nconst localFetch = async (\n input: RequestInfo | URL,\n method: HttpMethod,\n body?: BodyInit,\n contentType?: mimeTypes,\n accept?: mimeTypes,\n errorOnFailure = true,\n) => {\n try {\n const val = constructRequest(input, method, body, contentType, accept);\n const response = await fetch(val.input, val.init);\n if (!response.ok && errorOnFailure) throw new Error(response.statusText);\n return await response.json();\n } catch (err) {\n throw new Error(err);\n }\n};\n\nexport const post = async (\n input: RequestInfo | URL,\n body: BodyInit,\n contentType?: mimeTypes,\n errorOnFailure?: boolean,\n) => localFetch(input, \"POST\", body, contentType, contentType, errorOnFailure);\n\nexport const postJson = async (\n input: RequestInfo | URL,\n body: BodyInit,\n errorOnFailure?: boolean,\n) =>\n localFetch(\n input,\n \"POST\",\n body,\n \"application/json\",\n \"application/json\",\n errorOnFailure,\n );\n\nexport const putJson = async (\n input: RequestInfo | URL,\n body: BodyInit,\n errorOnFailure?: boolean,\n) =>\n localFetch(\n input,\n \"PUT\",\n body,\n \"application/json\",\n \"application/json\",\n errorOnFailure,\n );\n\nexport const patchJson = async (\n input: RequestInfo | URL,\n body: BodyInit,\n errorOnFailure?: boolean,\n) =>\n localFetch(\n input,\n \"PATCH\",\n body,\n \"application/json\",\n \"application/json\",\n errorOnFailure,\n );\n\nexport const get = async (input: RequestInfo | URL) => localFetch(input, \"GET\");\n\nexport const put = async (input: RequestInfo | URL, body: BodyInit) =>\n localFetch(input, \"PUT\", body);\n\nexport const patch = async (input: RequestInfo | URL, body: BodyInit) =>\n localFetch(input, \"PATCH\", body);\n\n/**\n * can't be called delete as that's a protected word\n * @param input\n * @returns\n */\nexport const deleteReq = async (input: RequestInfo | URL, errorOnFailure?: boolean) =>\n localFetch(\n input,\n \"DELETE\",\n null,\n \"application/json\",\n \"application/json\",\n errorOnFailure\n );\n","import { AdminConfig } from \"../../types/config.type\";\n\nexport const getAdminUser = () => window.Hnry?.AdminUser;\nexport const getAdminUserId = (): number | null => getAdminUser()?.id;\n\nconst getConfig = () => window.Hnry?.Config as AdminConfig;\nexport const getEnvironment = (): AdminConfig[\"environment\"] | null =>\n getConfig()?.environment;\nexport const getAmplitudeAdminApiKey = ():\n | AdminConfig[\"amplitudeAdminApiKey\"]\n | null => getConfig()?.amplitudeAdminApiKey;\n\nconst AdminUserAttributes = getAdminUser();\n\nexport default AdminUserAttributes;\n","import \"jquery\";\n\nconst importAll = (r) => r.keys().forEach(r);\nimportAll(require.context(\"./utilities\", true));\n","import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport Toastr from \"../components/toastr/Toastr\";\n\nconst mountComponent = (type: string, message: string) => {\n // Create target to attach component to DOM\n let mountingPoint = document.querySelector(\".toastr-mount\");\n if (!mountingPoint) {\n mountingPoint = document.createElement(\"div\");\n mountingPoint.className = \"toastr-mount\";\n document.body.append(mountingPoint);\n const root = createRoot(mountingPoint);\n root.render();\n } else {\n mountingPoint.parentElement.removeChild(mountingPoint);\n mountComponent(type, message);\n }\n};\n\nwindow.toastr = {\n success: (message) => mountComponent(\"success\", message),\n error: (message) => mountComponent(\"error\", message),\n warning: (message) => mountComponent(\"warning\", message),\n info: (message) => mountComponent(\"info\", message),\n};\n","import * as amplitude from \"@amplitude/analytics-browser\";\nimport { getEnvironment, getAmplitudeAdminApiKey, getAdminUserId } from \"../../admin/utilities/user_attributes\";\n\nconst AMPLITUDE_API_KEY = getAmplitudeAdminApiKey();\n\nconst getAmplitudeInstance = () => {\n\n const options = {\n minIdLength: 1,\n userId: getAdminUserId(),\n defaultTracking: true\n }\n\n amplitude.init(AMPLITUDE_API_KEY, options);\n return amplitude\n};\n\nconst acceptableEnvironments = [\"production\", \"uat\", \"staging\"];\nexport default () => {\n // If segment is present, we don't want to load amplitude\n if (typeof window.analytics === \"object\") {\n return;\n }\n\n if (AMPLITUDE_API_KEY && acceptableEnvironments.includes(getEnvironment())) {\n const amplitudeInstance = getAmplitudeInstance();\n // explose amplitude to the window\n window.amplitude = amplitudeInstance;\n }\n};\n","function autoPopulatePlatformCode() {\n $(document).on(\"change\", \"#expense_category_name\", () => {\n const persisted = $(\"#expense_category_platform_code\").prop(\"readonly\");\n const jurisdictionCode = $(\"#expense_category_name\").data(\"jurisdiction-code\");\n\n if (!persisted) {\n const platformCode = `${$(\"#expense_category_name\").val().toLowerCase().replace(/ /g, \"-\")\n .replace(/[^a-z\\d-]/g, \"\")}-${jurisdictionCode}`;\n $(\"#expense_category_platform_code\").val(platformCode);\n }\n });\n}\n\n$(document).on(\"turbolinks:load\", function () {\n autoPopulatePlatformCode();\n});\n","function uncheckAutoReconcileBlocking() {\n $(document).on(\"change\", \"#note_supplementary_user_show_on_reconciliation\", () => {\n if (!$(\"#note_supplementary_user_show_on_reconciliation\").is(\":checked\")) {\n $(\"#note_supplementary_user_block_auto_reconciliation\").prop(\"checked\", false);\n }\n });\n}\n\ndocument.addEventListener(\"turbolinks:load\", function () {\n uncheckAutoReconcileBlocking();\n});\n","function handleOffBoardingReasonChange() {\n\n const offboardReason = document.getElementById(\"off-board-reason-input\").value;\n const secondaryReasonWrapper = document.getElementById(\"secondary_reason_wrapper\");\n const secondaryReasonSelect = document.getElementById(\"secondary_reason_select\");\n const secondaryReasonInput = secondaryReasonWrapper.querySelector(\"input\");\n\n const button = document.getElementById(\"off-board-submit-btn\");\n\n if (offboardReason === \"hnry_initiated\") {\n button.setAttribute(\"disabled\", \"true\");\n secondaryReasonWrapper.classList.remove(\"tw-hidden\");\n if (secondaryReasonSelect.selectedIndex !== 0){\n button.removeAttribute(\"disabled\");\n }\n } else {\n secondaryReasonWrapper.classList.add(\"tw-hidden\");\n secondaryReasonSelect.selectedIndex = 0;\n secondaryReasonInput.value = \"Please select\";\n button.removeAttribute(\"disabled\");\n }\n}\n\ndocument.addEventListener(\"click\", event => {\n if (document.getElementById(\"offboarding-form\")?.contains(event.target)){\n handleOffBoardingReasonChange()\n }\n})","// Place all the behaviors and hooks related to the matching controller here.\n// All this logic will automatically be available in application.js.\n\nfunction toggleMinimumPaymentCriteriaAlert() {\n $(document).on(\"change\", \".toggles-minimum-payment-criteria-alert\", () => {\n showHideMinimumPaymentCriteriaAlert();\n });\n}\n\nfunction showHideMinimumPaymentCriteriaAlert() {\n const canProcessPaymentsOverride = $(\"#can-process-payments\").html() !== undefined;\n const linkedToAgencyCheck = $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_linked_to_agency\")).is(\":checked\") || $(document.querySelector(\"#user_onboarding_pending_linking\")).is(\":checked\")\n const gstAccount = $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_gst_account_yes\")).is(\":checked\")\n || $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_gst_account_no\")).is(\":checked\")\n || $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_gst_account_previously_registered\")).is(\":checked\");\n const vatAccount = $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_vat_account_yes\")).is(\":checked\")\n || $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_vat_account_no\")).is(\":checked\")\n || $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_vat_account_previously_registered\")).is(\":checked\");\n const studentLoan = $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_student_loan_account_true\")).is(\":checked\")\n || $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_student_loan_account_false\")).is(\":checked\");\n\n if (canProcessPaymentsOverride || (linkedToAgencyCheck && (gstAccount || vatAccount) && studentLoan)) {\n $(\"#minimum-payment-processing-criteria-alert\").hide();\n } else {\n $(\"#minimum-payment-processing-criteria-alert\").show();\n }\n}\n\nfunction fetchUserDetailsFromAto() {\n $(document).on(\"change\", \"#onboarding_jurisdiction_fields_attributes_linked_to_agency\", () => {\n const linkedToAgencyCheck = $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_linked_to_agency\")).is(\":checked\");\n const auJurisdiction = document.body.getAttribute(\"data-jurisdiction-code\") === \"au\"\n\n if (linkedToAgencyCheck && auJurisdiction) {\n const onboardingId = document.getElementById(\"onboarding-id\").value\n const animation = $(document.getElementById(\"ato-linked-info\"))\n\n $.rails.ajax({\n type: \"GET\",\n url: Routes.admin_onboardings_fetch_user_details_from_ato_path(),\n data: {\n id: onboardingId,\n },\n beforeSend() {\n animation.show()\n },\n success(data) {\n document.getElementById(\"au_financial_income_tax_payment_reference_number\").value = data.income_tax_prn\n document.getElementById(\"au_financial_sales_tax_payment_reference_number\").value = data.activity_statement_prn\n toastr.success(\"PRNs fetched from ATO\")\n },\n complete() {\n animation.hide();\n },\n }).fail(r => {\n document.getElementById(\"au_financial_income_tax_payment_reference_number\").value = r.responseJSON.data.income_tax_prn\n document.getElementById(\"au_financial_sales_tax_payment_reference_number\").value = r.responseJSON.data.activity_statement_prn\n toastr.error(r.responseJSON.errors)\n });\n }\n });\n}\n\nfunction toggleChangingUserSpecifiedSalesTaxAlert() {\n $(document).on(\"change\", \".toggles-changing-user-specified-sales-tax-alert\", () => {\n showHideChangingUserSalesTaxAlert();\n });\n}\n\nfunction showHideChangingUserSalesTaxAlert() {\n const userSalesTax = $(\"#original_sales_tax_registration\").data(\"original-sales-tax-registration\");\n let adminSalesTaxAccount = \"\";\n\n if ($(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_gst_account_yes\")).is(\":checked\")\n || $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_vat_account_yes\")).is(\":checked\")) {\n adminSalesTaxAccount = \"yes\";\n } else if ($(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_gst_account_no\")).is(\":checked\")\n || $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_gst_account_previously_registered\")).is(\":checked\")\n || $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_vat_account_no\")).is(\":checked\")\n || $(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_vat_account_previously_registered\")).is(\":checked\")) {\n adminSalesTaxAccount = \"no\";\n }\n\n if (userSalesTax != \"\" && adminSalesTaxAccount != \"\" && userSalesTax != adminSalesTaxAccount) {\n $(\".overriding-sales-tax-registration-status\").show();\n } else {\n $(\".overriding-sales-tax-registration-status\").hide();\n }\n}\n\nfunction toggleChangingUserSpecifiedStudentLoanAlert() {\n $(document).on(\"change\", \".toggles-changing-user-specified-student-loan-alert\", () => {\n showHideChangingUserStudentLoanAlert();\n });\n}\n\nfunction showHideChangingUserStudentLoanAlert() {\n const userStudentLoan = $(\"#original_student_loan_registration\").data(\"original-student-loan-registration\");\n let adminStudentLoanAccount = \"\";\n\n if ($(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_student_loan_account_true\")).is(\":checked\")) {\n adminStudentLoanAccount = true;\n } else if ($(document.querySelector(\"#onboarding_jurisdiction_fields_attributes_student_loan_account_false\")).is(\":checked\")) {\n adminStudentLoanAccount = false;\n }\n\n if (adminStudentLoanAccount !== \"\" && adminStudentLoanAccount != userStudentLoan) {\n $(\".overriding-student-loan-registration-status\").show();\n } else {\n $(\".overriding-student-loan-registration-status\").hide();\n }\n}\n\n$(document).ready(function () {\n showHideMinimumPaymentCriteriaAlert();\n fetchUserDetailsFromAto();\n});\n\ndocument.addEventListener(\"turbolinks:load\", function () {\n showHideMinimumPaymentCriteriaAlert();\n toggleMinimumPaymentCriteriaAlert();\n toggleChangingUserSpecifiedSalesTaxAlert();\n toggleChangingUserSpecifiedStudentLoanAlert();\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n document.querySelectorAll(\".calculates-sales-tax\").forEach((field) => addSalesTaxCalculator(field));\n});\n\nconst addSalesTaxCalculator = (field) => {\n field.addEventListener(\"change\", (event) => {\n const including = document.querySelector(`input[name^='sales_tax_filing[${field.dataset.amountIncludingSalesTaxField}']`);\n including.value = Number(field.value) * field.dataset.salesTaxToAmountIncludingConverter;\n });\n};\n","import {\n toggleMobileActionMenu,\n} from \"./ellipsis_menus\";\n\nconst BILLER_CODE = \"biller_code\";\nconst CRN = \"crn\";\nconst NOT_VALID = \"not-valid\";\nconst VALID = \"valid\";\nconst NO_VALUE = \"no-value\";\n\n$(document).on(\"keyup\", \"#allocationTemplateSearchInput\", function () {\n const input = document.getElementById(\"allocationTemplateSearchInput\");\n const filter = input.value.toUpperCase().trim();\n\n $(\".allocation-card\").each(function (_, element) {\n const txtValue = element.id.toUpperCase().replaceAll(\"_\", \" \");\n\n if (txtValue.indexOf(filter) > -1) {\n $(element).css(\"display\", \"flex\");\n } else {\n $(element).css(\"display\", \"none\");\n }\n });\n});\n\n$(document).on(\"blur\", \"#allocation_preference_bpay_biller_code\", function (event) {\n normalizeBPAYBillerCode();\n validateBPAYCRN();\n validateBPAYBillerCode();\n});\n\n$(document).on(\"blur\", \"#allocation_preference_bpay_crn\", function (event) {\n normalizeBPAYCRN();\n validateBPAYCRN();\n validateBPAYBillerCode();\n});\n\n// using turbolinks means that \"$(document).ready()\" doesn't always fire\ndocument.addEventListener(\"turbolinks:load\", function () {\n toggleMobileActionMenu();\n});\n\n\n// run BPAY field validation when the 'BPAY Payment' toggle is toggled on, but (re)enable the submit button if it is toggled off\n$(document).on(\"change\", \"#allocation_preference_for_bpay\", function () {\n if ($(\"#allocation_preference_for_bpay\").prop(\"checked\")) {\n toggleSaveButtonState();\n normalizeBPAYBillerCode();\n normalizeBPAYCRN();\n validateBPAYBillerCode();\n validateBPAYCRN();\n toggleReferenceLabel();\n } else {\n toggleReferenceLabel();\n $(\"#allocation-preference-form-submit\").attr(\"disabled\", false);\n $(\"#bpay-minimum-maximum-amounts-warning\").addClass(\"hidden\");\n }\n});\n\n// when BPAY toggle is on, the label should be \"Description\"\nfunction toggleReferenceLabel() {\n const ref = $(\"label[for='allocation_preference_payee_reference']\");\n\n if ($(\"#allocation_preference_for_bpay\").prop(\"checked\")) {\n ref.attr(\"data-original-label\", ref.text());\n ref[0].innerHTML = \"Description\";\n } else {\n // eslint-disable-next-line xss/no-mixed-html\n ref[0].innerHTML = ref.data(\"original-label\");\n }\n}\n\n$(window).resize(function () {\n toggleMobileActionMenu();\n});\n\n$(document).on(\"change\", \"#allocation_preference_cap\", function () {\n if ($(\"#allocation_preference_cap_frequency\").val() == \"\") {\n $(\"#allocation_preference_cap_frequency\").val(\"In total\");\n $(\"#allocation_preference_cap_frequency\").siblings(\"input\").val(\"In total\");\n }\n});\n\nfunction normalizeBPAYBillerCode() {\n const billerCode = $(\"#allocation_preference_bpay_biller_code\").val();\n $(\"#allocation_preference_bpay_biller_code\").val(billerCode.replace(/[^0-9]/g, \"\"));\n}\n\nfunction normalizeBPAYCRN() {\n const customer_reference_number = $(\"#allocation_preference_bpay_crn\").val();\n $(\"#allocation_preference_bpay_crn\").val(customer_reference_number.replace(/[^0-9]/g, \"\"));\n}\n\nfunction validateBPAYBillerCode() {\n $(\"#bpay-minimum-maximum-amounts-warning\").addClass(\"hidden\");\n if ($(\"#allocation_preference_bpay_biller_code\").val() != \"\") {\n $.rails.ajax({\n type: \"GET\",\n url: Routes.validate_bpay_biller_code_allocation_preferences_path(),\n data: {\n bpay_biller_code: $(\"#allocation_preference_bpay_biller_code\").val(),\n },\n success(data) {\n $(\"#allocation_preference_bpay_biller_code\").attr(\"valid\", data.valid);\n if (data.valid) {\n toggleBPAYIconValidity(BILLER_CODE, VALID);\n toggleBPAYInputValidity(BILLER_CODE, VALID);\n updateBPAYMinimumMaximumWarningText(data.biller_name, data.minimum_payment_amount);\n updateMinimumAndMaximumPaymentHiddenFields(data.minimum_payment_amount, data.maximum_payment_amount);\n } else {\n toggleBPAYIconValidity(BILLER_CODE, NOT_VALID);\n toggleBPAYInputValidity(BILLER_CODE, NOT_VALID);\n }\n toggleSaveButtonState();\n toggleBPAYMinimumMaximumWarning();\n },\n error() {\n toastr.error(\"We could not validate your BPAY Biller Code, please try again in a moment\");\n toggleBPAYIconValidity(BILLER_CODE, NOT_VALID);\n toggleBPAYInputValidity(BILLER_CODE, NOT_VALID);\n },\n });\n } else {\n toggleBPAYIconValidity(BILLER_CODE, NO_VALUE);\n toggleBPAYInputValidity(BILLER_CODE, NO_VALUE);\n }\n}\n\nfunction validateBPAYCRN() {\n if (($(\"#allocation_preference_bpay_crn\").val() != \"\") && $(\"#allocation_preference_bpay_biller_code\").val() != \"\") {\n $.rails.ajax({\n type: \"GET\",\n url: Routes.validate_bpay_crn_allocation_preferences_path(),\n data: {\n bpay_biller_code: $(\"#allocation_preference_bpay_biller_code\").val(),\n bpay_crn: $(\"#allocation_preference_bpay_crn\").val(),\n },\n success(data) {\n $(\"#allocation_preference_bpay_crn\").attr(\"valid\", data.valid);\n if (data.valid) {\n toggleBPAYIconValidity(CRN, VALID);\n toggleBPAYInputValidity(CRN, VALID);\n } else {\n toggleBPAYIconValidity(CRN, NOT_VALID);\n toggleBPAYInputValidity(CRN, NOT_VALID);\n }\n toggleSaveButtonState();\n toggleBPAYMinimumMaximumWarning();\n },\n error() {\n toastr.error(\"We could not validate your BPAY CRN, please try again in a moment\");\n toggleBPAYIconValidity(CRN, NOT_VALID);\n toggleBPAYInputValidity(CRN, NOT_VALID);\n },\n });\n } else {\n toggleBPAYIconValidity(CRN, NO_VALUE);\n toggleBPAYInputValidity(CRN, NO_VALUE);\n }\n}\n\nfunction toggleSaveButtonState() {\n const bpayBillerCodeValid = (($(\"#allocation_preference_bpay_biller_code\")).attr(\"valid\") === \"true\");\n const bpayCrnValid = (($(\"#allocation_preference_bpay_crn\").attr(\"valid\")) === \"true\");\n const editable = $(\"#allocation_preference_locked\")[0].value != \"true\";\n if (bpayBillerCodeValid && bpayCrnValid && editable) {\n $(\"#allocation-preference-form-submit\").attr(\"disabled\", false);\n } else {\n $(\"#allocation-preference-form-submit\").attr(\"disabled\", true);\n }\n}\n\nfunction toggleBPAYIconValidity(bpayField, validity) {\n // hide all 3 icons then show the correct one\n const bpayFieldIconClassSelector = `.bpay-${bpayField}-icon`;\n $(bpayFieldIconClassSelector).addClass(\"hidden\");\n $(`#bpay-${bpayField}-${validity}-icon`).removeClass(\"hidden\");\n}\n\nfunction toggleBPAYInputValidity(bpayField, validity) {\n const bpayFieldInputSelector = `#allocation_preference_bpay_${bpayField}`;\n $(bpayFieldInputSelector).removeClass(\"valid\")\n $(bpayFieldInputSelector).removeClass(\"hnry-input--invalid\")\n\n $(bpayFieldInputSelector).attr(\"valid\", false);\n switch (validity) {\n case VALID:\n $(bpayFieldInputSelector).addClass(\"valid\");\n $(bpayFieldInputSelector).attr(\"valid\", true);\n break;\n case NOT_VALID:\n $(bpayFieldInputSelector).addClass(\"hnry-input--invalid\");\n break;\n }\n}\n\nfunction toggleBPAYMinimumMaximumWarning(){\n const bpayBillerCodeValid = (($(\"#allocation_preference_bpay_biller_code\")).attr(\"valid\") === \"true\");\n const bpayCrnValid = (($(\"#allocation_preference_bpay_crn\").attr(\"valid\")) === \"true\");\n if (bpayBillerCodeValid && bpayCrnValid) {\n $(\"#bpay-minimum-maximum-amounts-warning\").removeClass(\"hidden\");\n }\n}\n\nfunction updateMinimumAndMaximumPaymentHiddenFields(minimumPaymentAmount, maximumPaymentAmount) {\n $(\"#allocation_preference_bpay_minimum_payment\").val(Number(minimumPaymentAmount.replace(/[^0-9\\.]+/g, \"\")));\n $(\"#allocation_preference_bpay_maximum_payment\").val(Number(maximumPaymentAmount.replace(/[^0-9\\.]+/g, \"\")));\n}\n\nfunction updateBPAYMinimumMaximumWarningText(billerName, minimumPaymentAmount) {\n $(\"#bpay-minimum-maximum-amounts-warning #bpay-alert-body\").text(\n `These allocation payments will be sent to ${billerName}. Their minimum payment amount is ${minimumPaymentAmount}. Any payments below that amount will be sent to your personal bank account instead.`\n );\n\n}\n","import { postJson } from \"./config/fetch.api\";\n\nexport interface iBankAccountValidation {\n bank_branch_code?: string,\n account_number: string,\n}\n\nexport interface iBankAccountValidationResult {\n success: boolean,\n bank_branch_code: {\n valid: boolean,\n },\n account_number: {\n valid: boolean,\n },\n status: string\n}\n\nexport const checkBankValidation = async (body: iBankAccountValidation):Promise => postJson(Routes.api_bank_account_number_validation_validate_bank_account_number_path(), JSON.stringify(body));","import { checkBankValidation, iBankAccountValidation } from \"../API/bank_account_validation.api\";\nimport { toggleNextBtnDisabled } from \"./form/disable_rails_form_button\";\nimport updateIncomeForecastRates from \"./income_forecast_rates\";\n\nconst INVALID = \"invalid\";\nconst VALID = \"valid\";\n\nconst NZ_BANK_ACCOUNT_NUMBER_ID_SELECTOR = \"bank-account-number\";\nconst BANK_BRANCH_CODE_ID_SELECTOR = \"bank-account-bank-branch-code\";\nconst ACCOUNT_NUMBER_ID_SELECTOR = \"bank-account-account-number\";\n\nconst NZ_BANK_ACCOUNT_NUMBER_INPUT_SELECTOR = \"#user_financial_attributes_bank_account_number\";\nconst BANK_BRANCH_CODE_INPUT_SELECTOR = \"#user_financial_attributes_bank_account_number_bank_branch_code\";\nconst ACCOUNT_NUMBER_INPUT_SELECTOR = \"#user_financial_attributes_bank_account_number_account_number\";\n\nconst TOUR_NEXT_BUTTON = \"tour-next-btn\";\n\n/**\n * Make various class and attribute changes to show or indicators if a field is valid.\n *\n * @param bankAccountFieldSelector string fragment to identify icon images\n * @param bankAccountFieldInputSelector input field id selector\n * @param isValid true if the field value is valid\n */\nfunction toggleBankAccountValidity(bankAccountFieldSelector: string, bankAccountFieldInputSelector: string, isValid: boolean) {\n const addClass = isValid ? VALID : INVALID;\n const removeClass = isValid ? INVALID : VALID;\n const bankAccountFieldFeedbackSelector = `#${bankAccountFieldSelector}-feedback`;\n\n // icon\n $(`.${bankAccountFieldSelector}-icon`).addClass(\"hidden\");\n $(`#${bankAccountFieldSelector}-${addClass}-icon`).removeClass(\"hidden\");\n\n // field\n $(bankAccountFieldInputSelector).removeClass(removeClass);\n $(bankAccountFieldInputSelector).addClass(addClass);\n $(bankAccountFieldInputSelector).attr(\"valid\", isValid.toString());\n\n // feedback\n if (isValid) {\n $(bankAccountFieldFeedbackSelector).addClass(\"hidden\");\n } else {\n $(bankAccountFieldFeedbackSelector).removeClass(\"hidden\");\n }\n}\n\n/**\n * Clear all indications if a field is valid or not\n * \n * @param bankAccountFieldSelector string fragment to identify icon images\n * @param bankAccountFieldInputSelector input field id selector\n */\nfunction clearBankAccountValidity(bankAccountFieldSelector: string, bankAccountFieldInputSelector: string) {\n const bankAccountFieldFeedbackSelector = `#${bankAccountFieldSelector}-feedback`;\n $(`.${bankAccountFieldSelector}-icon`).addClass(\"hidden\");\n $(bankAccountFieldInputSelector).removeClass(`${INVALID} ${VALID}`);\n $(bankAccountFieldInputSelector).removeAttr(\"valid\");\n $(bankAccountFieldFeedbackSelector).addClass(\"hidden\");\n}\n\nasync function isBankBranchCodeValid(body: iBankAccountValidation) {\n const { bank_branch_code } = await checkBankValidation(body);\n return bank_branch_code.valid;\n}\n\nasync function isAccountNumberValid(body: iBankAccountValidation) {\n const { account_number } = await checkBankValidation(body);\n return account_number.valid;\n}\n\n/**\n * Validate the Bank and Branch section of the Bank Account Number (BSB in AU, Sort Code in UK etc)\n */\nasync function validateBankBranchCode() {\n // eslint-disable-next-line xss/no-mixed-html\n const bankBranchField = document.querySelector(BANK_BRANCH_CODE_INPUT_SELECTOR);\n // eslint-disable-next-line xss/no-mixed-html\n const accountField = document.querySelector(ACCOUNT_NUMBER_INPUT_SELECTOR);\n if (bankBranchField.value === \"\") {\n clearBankAccountValidity(BANK_BRANCH_CODE_ID_SELECTOR, bankBranchField.id);\n return;\n }\n const body = {\n bank_branch_code: bankBranchField.value.replaceAll(\"-\", \"\"),\n account_number: accountField.value,\n };\n\n const isValid = await isBankBranchCodeValid(body)\n toggleBankAccountValidity(BANK_BRANCH_CODE_ID_SELECTOR, BANK_BRANCH_CODE_INPUT_SELECTOR, isValid);\n toggleNextBtnDisabled(!isValid, TOUR_NEXT_BUTTON);\n}\n\n/**\n * Validate the Account Number section of the Bank Account Number\n */\nasync function validateAccountNumber() {\n // eslint-disable-next-line xss/no-mixed-html\n const bankBranchField = document.querySelector(BANK_BRANCH_CODE_INPUT_SELECTOR);\n // eslint-disable-next-line xss/no-mixed-html\n const accountField = document.querySelector(ACCOUNT_NUMBER_INPUT_SELECTOR);\n if (accountField.value === \"\") {\n clearBankAccountValidity(ACCOUNT_NUMBER_ID_SELECTOR, ACCOUNT_NUMBER_INPUT_SELECTOR);\n return;\n }\n const body = {\n bank_branch_code: bankBranchField.value.replace(\"-\", \"\"),\n account_number: accountField.value,\n };\n\n const isValid = await isAccountNumberValid(body);\n toggleBankAccountValidity(ACCOUNT_NUMBER_ID_SELECTOR, ACCOUNT_NUMBER_INPUT_SELECTOR, isValid);\n toggleNextBtnDisabled(!isValid, TOUR_NEXT_BUTTON);\n}\n\n/**\n * Validate an NZ Bank Account Number (this is entered as one number in the form)\n */\nasync function validateNzBankAccountNumber() {\n // eslint-disable-next-line xss/no-mixed-html\n const accountField = document.querySelector(NZ_BANK_ACCOUNT_NUMBER_INPUT_SELECTOR);\n if (accountField.value === \"\") {\n clearBankAccountValidity(NZ_BANK_ACCOUNT_NUMBER_ID_SELECTOR, ACCOUNT_NUMBER_INPUT_SELECTOR);\n return;\n }\n const body = {\n account_number: accountField.value,\n };\n\n const isValid = await isAccountNumberValid(body);\n toggleBankAccountValidity(NZ_BANK_ACCOUNT_NUMBER_ID_SELECTOR, ACCOUNT_NUMBER_INPUT_SELECTOR, isValid);\n toggleNextBtnDisabled(!isValid, TOUR_NEXT_BUTTON);\n}\n\n/**\n * Invoke validation based on any field with a value\n */\nfunction validateBankAccountNumber() {\n updateIncomeForecastRates();\n\n if ($(NZ_BANK_ACCOUNT_NUMBER_INPUT_SELECTOR).length > 0) {\n validateNzBankAccountNumber();\n }\n\n if ($(BANK_BRANCH_CODE_INPUT_SELECTOR).length > 0) {\n validateBankBranchCode();\n }\n\n if ($(ACCOUNT_NUMBER_INPUT_SELECTOR).length > 0) {\n validateAccountNumber();\n }\n}\n\n// Listen for a modal show event or a modal next event to validate bank account number\n// i.e: validate NZ bank account number\n$(document).on(\"shown.bs.modal\", validateBankAccountNumber);\n\n$(document).on(\"next.bs.modal\", validateBankAccountNumber);\n\n// Change events for various Bank Account Input fields\n$(document).on(\"change\", NZ_BANK_ACCOUNT_NUMBER_INPUT_SELECTOR, validateNzBankAccountNumber);\n\n$(document).on(\"change\", BANK_BRANCH_CODE_INPUT_SELECTOR, validateBankBranchCode);\n\n$(document).on(\"change\", ACCOUNT_NUMBER_INPUT_SELECTOR, validateAccountNumber);\n","$(document).ready(function () {\n $(document).on(\"change\", \".checkbox-enabler\", function () {\n enableDisableSubmitButtons(this);\n });\n\n function enableDisableSubmitButtons(trigger) {\n if ($(trigger).is(\":checked\")) {\n $(trigger).closest(\".modal-content\").find(\".checkbox-enable-disable\").each(function () {\n $(this).prop(\"disabled\", false);\n });\n } else {\n $(trigger).closest(\".modal-content\").find(\".checkbox-enable-disable\").each(function () {\n $(this).prop(\"disabled\", true);\n });\n }\n }\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n // Scrollbars are set to always show (ie. Windows and with the \"always\" setting on Mac)\n const windowHasScrollbars = window.innerWidth > document.documentElement.clientWidth;\n const anyElementHasScrollbars = checkIfAnyElementsAreScrollable();\n if (anyElementHasScrollbars && windowHasScrollbars) {\n document.querySelector(\"html\").classList.add(\"custom-scrollers\");\n }\n});\n\nconst checkIfAnyElementsAreScrollable = () => {\n const allElements = Array.from(document.body.querySelectorAll(\"*\"));\n return allElements.some((element) => element.offsetWidth < element.scrollWidth);\n};\n","import disableFormSubmitUntilValid from \"../es_utilities/disableFormSubmitUntilValid\";\n\nconst dialogId = \"#dialog\";\n\n/**\n * Reveals a modal with provided title and content.\n *\n * Usage:\n * - The title:\n * - This is the title of the modal, ideally keep it short as it looks better when it fits on a single line.\n * - The content:\n * - Add a div with class \"modal-body\" for the main content\n * - Add a div with class \"modal-footer\" for the footer content\n * - For a form in a modal you probably want to wrap both the modal-body and modal-footer in the form\n *\n * @param {Object} options - options\n * @param {string} options.title - the modal title\n * @param {string} options.content - the modal content\n * @param {boolean} options.focus - set focus to first form input\n * @param {\"modal-lg\" | \"modal-md\" | \"modal-sm\"} options.size - the modal width, depends a bit on device, options: modal-lg, modal-md, modal-sm\n * @param {(boolean | \"reload\")} options.header_close - truthy value enables the modal close X, value of \"reload\" will reload the page vs simply closing the modal\n * @param {string} options.virtual_page_url - records a virtual page view of this dialog\n * @param {boolean} options.centered - vertically centre the modal, for tall modals you may prefer aligned to top\n * @param {boolean} options.scrollable - lets the body of the modal be scrollable. Usually a modal-body should grow to fit the content, but for very lnog text-only modals you may choose for it to be scrollable so it's not a huge wall of text\n * @param {boolean} options.hideHeader - hide the hidder from the modal\n * @param {string} options.customiseClasses - set customise classes\n */\nfunction showDialog({\n title,\n content,\n focus = false,\n size = \"modal-md\",\n header_close = false,\n virtual_page_url = window.location.pathname + title.replace(/\\s/g, \"\"),\n centered = true,\n scrollable = false,\n hideHeader,\n customiseClasses,\n}) {\n const $dialog = $(dialogId);\n $dialog\n .find(\".modal-dialog\")\n .removeClass(\"modal-lg modal-md modal-sm\")\n .addClass(size);\n\n if (customiseClasses) {\n $dialog.find(\".modal-dialog\").addClass(customiseClasses);\n if (!hideHeader) {\n $dialog.find(\".modal-header\").addClass(`${customiseClasses}__header`);\n }\n }\n\n // Remove centered class if required.\n // Usually for tall modals\n if (!centered) {\n $dialog\n .find(\".modal-dialog\")\n .removeClass(\"centered\");\n }\n\n // When a remote form in a dialog leads to another remote form in the same\n // dialog, e.g. in the tour, then for the ajax success event to fire\n // correctly the form that triggered the request must remain on the page.\n if (content) {\n $dialog.find(\".modal-dialog form\").addClass(\"hidden\");\n }\n // Add the dialog title\n $dialog.find(\".modal-header p.heading\").html(title);\n // Add the cross\n $dialog.find(\".close\").remove();\n /* eslint-disable xss/no-mixed-html */\n if (header_close) {\n let $cross;\n if (header_close === \"reload\") {\n $cross = '';\n } else {\n $cross = ``;\n }\n\n $dialog.find(\".modal-header p.heading\").after($cross);\n }\n /* eslint-enable xss/no-mixed-html */\n if (hideHeader) {\n $dialog.find(\".modal-header\").addClass(\"hidden\");\n } else {\n $dialog.find(\".modal-header\").removeClass(\"hidden\");\n }\n\n // Render the edit form\n if (content) {\n // else assume it's pre-loaded\n $dialog.find(\".modal-footer\").remove();\n $dialog.find(\".modal-body\").remove();\n $dialog.find(\".modal-dialog .modal-content\").append(content);\n\n // Add hook for transitions in multi-page modals\n $dialog.trigger(\"next.bs.modal\");\n }\n\n disableFormSubmitUntilValid();\n\n // Show the dynamic dialog\n $dialog.modal(\"show\");\n\n disableFormSubmitUntilValid();\n\n if (focus) {\n // Set focus to the first element\n $dialog.on(\"shown.bs.modal\", function () {\n $dialog.find(\"input, textarea\").first().focus();\n });\n }\n\n // record a virtual page view of this dialog\n if (typeof (dataLayer) !== \"undefined\") {\n dataLayer.push({\n event: \"VirtualPageview\",\n virtualPageURL: virtual_page_url,\n virtualPageTitle: `Dialog: ${title}`,\n });\n }\n\n $('.modal-dialog [data-toggle=\"tooltip\"]').tooltip({\n html: true,\n trigger: \"focus\",\n });\n\n // Apply the scrollable class if required\n // This should be used if you need the modal-body to be scrollable rather than\n // growing to fit the content\n if (scrollable) {\n $dialog\n .find(\".modal-body\")\n .addClass(\"scrollable\");\n }\n\n initializeComponents();\n ReactRailsUJS.mountComponents(dialogId);\n\n return $dialog;\n}\n\nfunction dismissDialog() {\n const $dialog = $(\".modal.show\");\n $dialog.modal(\"hide\");\n Materialize.updateTextFields();\n}\n\ndocument.addEventListener(\"turbolinks:load\", function () {\n // If the page is rendered with content in the dialog then show it\n // Only needs to run on first page load\n if (typeof show_dialog !== \"undefined\") {\n $(dialogId).modal(\"show\");\n show_dialog = undefined;\n }\n});\n\n$(document).on(\"turbolinks:load\", function () {\n if (!document.querySelector(\"body\").classList.contains(\"modal-open\")) {\n unfreezePageScrolling();\n }\n});\n\n$(document).on(\"click\", \".modal .close.reload\", () => window.location.reload());\n\n$(document).on(\"shown.bs.modal\", function () {\n freezePageScrolling();\n});\n\n$(document).on(\"hidden.bs.modal\", function () {\n unfreezePageScrolling();\n});\n\nfunction unfreezePageScrolling() {\n // eslint-disable-next-line xss/no-mixed-html\n const htmlElement = document.querySelector(\"html\");\n if (htmlElement.classList.contains(\"overflow-hidden\")) {\n htmlElement.classList.remove(\"overflow-hidden\");\n }\n}\n\nfunction freezePageScrolling() {\n // eslint-disable-next-line xss/no-mixed-html\n const htmlElement = document.querySelector(\"html\");\n if (!htmlElement.classList.contains(\"overflow-hidden\")) {\n htmlElement.classList.add(\"overflow-hidden\");\n }\n}\n\nwindow.showDialog = showDialog;\nwindow.dismissDialog = dismissDialog;\n","const toggleMobileActionMenu = function () {\n const tableRowWithEllipsisMenu = $(\".table-row-with-ellipsis-menu\");\n const width = $(\"body\").width();\n const td = tableRowWithEllipsisMenu.find(\".mobile-only\");\n if (width <= 989) {\n if (td) {\n td.removeClass(\"hidden\");\n }\n } else {\n td.addClass(\"hidden\");\n }\n};\nexport { toggleMobileActionMenu };\n","/**\n * Function to dynamically disable/enable any rails form button\n * @param disabled\n * @param btnElementId // don't include the #\n */\n\nexport const toggleNextBtnDisabled = (disabled: boolean, btnElementId: string) => {\n // eslint-disable-next-line xss/no-mixed-html\n const nextButton = document.getElementById(btnElementId) as HTMLButtonElement\n if(nextButton) {\n nextButton.disabled = disabled;\n }\n};\n\nexport default toggleNextBtnDisabled;\n","/**\n * Toggles the \"required\" attribute for an Array of input elements.\n * This is usually used when a toggle has been activated in response to a question\n * that now requires extra inputs to be make compulsory - or not compulsory - for\n * the user.\n *\n * @param {boolean} requiredness Whether the fields should be required or not\n * @param {string[]} selectors CSS selectors of form elements to toggle requiredness of\n */\nconst changeRequirednessForSelectors = function (requiredness, selectors) {\n selectors.forEach(function (selector) {\n const selectedElement = $(selector);\n if (requiredness) {\n selectedElement.prop(\"required\", true);\n } else {\n selectedElement.removeProp(\"required\");\n selectedElement.val(null);\n }\n });\n};\n\n/**\n * Disables the closest submit button if an input with the `validate-email` class\n * does not have one or more valid emails\n *\n * TODO: DELETE this. It is only used in app/views/tour/_template_email.html.erb\n *\n * @param {InputEvent} event - Event emitted from the input element\n */\nconst validateEmail = ({ target }) => {\n // Get the input that needs validation\n const inputNeedsValidation = target.classList.contains(\"validate-email\");\n const EMAIL_REGEX = /^(([^<>()[\\]\\\\.,;:\\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,}))$/;\n if (inputNeedsValidation) {\n // If there is an input, test the value typed against the regex\n // and set the disabled-ness of the forms submit button accordingly\n const submitButton = target.form.querySelector(\"button[type='submit']\");\n const inputValue = target.value;\n const emails = inputValue\n .split(/\\;|\\,/);\n const emailsAreValid = emails\n .map((email) => EMAIL_REGEX.test(email.trim()))\n .every((email) => email);\n\n submitButton.disabled = !emailsAreValid;\n }\n};\n\n// Detect change on Switch in Tour/Income Forecast\n$(document).on(\"change\", \"#user_financial_attributes_paye\", (event) => {\n changeRequirednessForSelectors(event.currentTarget.checked, [\n \"[name='user\\[financial_attributes\\]\\[annual_salary_start_date\\]']\",\n ]);\n});\n\ndocument.addEventListener(\"input\", (event) => validateEmail(event));\n\n/**\n * Trigger for option buttons. When a radio input (which is really what the option\n * buttons are) changes, the change event will bubble to the `document`. We\n * check if the change event came from a option button component, and then call\n * the function that handles that logic.\n */\ndocument.addEventListener(\"change\", (event) => {\n const { target } = event;\n if (target.matches(\".option-buttons input[type='radio']\")) {\n handleDuoButtonChange(target);\n }\n});\n\n/**\n * Runs when the user changes the selected value of a option button component.\n * If the option button has feedback associated with it, then this function\n * will show the correct feedback, hide the other ones, as well as clear their\n * inputs so that we don't accidentally send some inputs to the server.\n *\n * @param {HTMLElement} target - The input that has been selected\n */\nconst handleDuoButtonChange = (target) => {\n // Grab the feedbackId (identifies which feedbackElement the selected value controls)\n // and the text of the button for the selected option button, and find the relevant feedbackElement\n const { feedbackid, text } = target.dataset;\n const feedbackElement = document.querySelector(`#${feedbackid}-feedback`);\n // Some option buttons do no trigger feedback, so nothing more needs to be done in this case\n if (!feedbackElement) return;\n\n // Get all the feedbackElements for this option button component as well as the one to show\n const allFeedbacks = feedbackElement.querySelectorAll(\".inner-feedback\");\n const feedbackToShow = feedbackElement.querySelector(`[data-value='${text}']`);\n\n // For each feedbackElement\n allFeedbacks.forEach((element) => {\n // As long as it's not the one to show\n if (element && element !== feedbackToShow) {\n // Hide it\n const cls = [\"hidden\", \"feedback__text\"];\n element.classList.add(...cls);\n\n // Then reset any inputs as required\n const inputsToClear = element.querySelectorAll(\"input:not(.keep-input)\");\n if (inputsToClear.length) {\n inputsToClear.forEach((input) => {\n if (input.matches(\"[type='checkbox']\") || input.matches(\"[type='radio']\")) {\n input.checked = false;\n } else if (input.classList.contains(\"select-dropdown\")) {\n // For MDB select dropdowns: if the user navigates back, we want the default option to be selected again.\n const dropdown = document.querySelector(\"select.mdb-select\");\n const defaultOption = dropdownDefaultOption(dropdown);\n input.value = defaultOption || \"\";\n } else {\n input.value = \"\";\n }\n });\n }\n } else {\n // Show the feedback that needs to be shown\n feedbackToShow.classList.remove(\"hidden\");\n }\n });\n};\n","require(\"./admin/expense_categories\");\nrequire(\"./admin/onboarding\");\nrequire(\"./admin/notes\");\nrequire(\"./admin/sales_tax_filing\");\nrequire(\"./sharesheet\");\nrequire(\"./show_element\");\nrequire(\"./set_country_cookie\");\nrequire(\"./Toastr\");\nrequire(\"./turbolinks_transitions\");\nrequire(\"./custom_scrollbars\");\nrequire(\"./allocation_preferences\");\nrequire(\"./forms\");\nrequire(\"./ellipsis_menus\");\nrequire(\"./invoices\");\nrequire(\"./dialog\");\nrequire(\"./income_estimates\");\nrequire(\"./onboarding_tour\");\nrequire(\"./checkbox_enabler\");\nrequire(\"what-input\");\nrequire(\"./profile\");\nrequire(\"./request_submit_polyfill\");\n","// Place all the behaviors and hooks related to the matching controller here.\n// All this logic will automatically be available in application.js.\n\nconst toggleMobileActionMenu = require(\"./ellipsis_menus\").toggleMobileActionMenu;\n\nfunction scaleInvoicePreviewEvent() {\n $(document).on(\"shown.bs.modal\", function () {\n windowWidth = $(\"#modal-preview-invoice .body-preview\").width();\n elementWidth = $(\"#modal-preview-invoice #inv-tmpl\").width();\n scale = windowWidth / elementWidth;\n $(\"#modal-preview-invoice #inv-tmpl\").css({\n transform: `scale(${scale})`,\n });\n $(\"#modal-preview-invoice .modal-body\").css({\n height: $(\"#modal-preview-invoice .inv-tmpl\").height() * scale,\n });\n });\n}\n\nfunction togglePaidDirectInvoiceWarning() {\n $(document).on(\"change\", \".edit_invoice input[name='status']\", function () {\n if ($(\"#status_PENDING\")[0].checked) {\n $(\"#paid_direct_invoice_warning\").collapse(\"show\");\n } else {\n $(\"#paid_direct_invoice_warning\").collapse(\"hide\");\n }\n });\n}\n\nfunction showConfirmationModal() {\n // the modal is only included on the page when we have been redirected to the show action\n // with a 'complete' param\n $(\"#payment-complete\").modal(\"show\");\n}\n\n$(document).ready(function () {\n scaleInvoicePreviewEvent();\n togglePaidDirectInvoiceWarning();\n showConfirmationModal();\n});\n\n$(window).resize(function () {\n toggleMobileActionMenu();\n});\n\n// using turbolinks means that \"$(document).ready()\" doesn't always fire\ndocument.addEventListener(\"turbolinks:load\", function () {\n toggleMobileActionMenu();\n});\n","// Checks whether an element (modal) has been scrolled most of the way to the\n// bottom and then disableds the agree button if it has\nfunction handleScrolling(modal) {\n const agreeButton = document.querySelector(\"#consent-to-act-agree-button\");\n if (agreeButton) {\n const { scrollTop, scrollHeight } = modal;\n const { height } = modal.getBoundingClientRect();\n const threshold = scrollHeight - height - 50; // Buffer of 50px\n\n if (scrollTop >= threshold) {\n if (agreeButton.hasAttribute(\"disabled\")) {\n agreeButton.removeAttribute(\"disabled\");\n }\n }\n }\n}\n\nconst replaceFormWithLoader = () => {\n const form = document.querySelector(\"#sign-up-tour-form.has-loader\");\n const loaderDiv = document.querySelector(\"#loader-div\");\n\n form.hidden = true;\n loaderDiv.hidden = false;\n}\n\n// On scroll, if the scrolling element is the modal-body (which is case on desktop)\n// or modal-content (on mobile), then check if the user has reached the bottom yet\ndocument.addEventListener(\"scroll\", (event) => {\n const { target } = event;\n if (target.classList && (target.classList.contains(\"modal-body\") || target.classList.contains(\"modal-content\"))) {\n handleScrolling(target);\n }\n}, true);\n\n\nwindow.addEventListener(\"transitionend\", () => {\n const tourNextBtn = document.querySelector(\"#tour-next-btn\");\n const form = document.querySelector(\".has-loader\");\n\n if (tourNextBtn && form) {\n tourNextBtn.removeEventListener(\"click\", replaceFormWithLoader);\n tourNextBtn.addEventListener(\"click\", replaceFormWithLoader);\n };\n});\n","$(document).on(\"keyup\", (e) => {\n const { id, value } = e.target;\n\n if (id === \"user_home_office_percent\") {\n const homeOfficePercent = value;\n const homeOfficePercentHighMessage = document.querySelector(\"#home-office-percent-over-message\");\n\n if (homeOfficePercent > 25) {\n homeOfficePercentHighMessage.classList.remove(\"hidden\");\n } else {\n homeOfficePercentHighMessage.classList.add(\"hidden\");\n }\n }\n});\n","if (!(\"randomUUID\" in crypto)) {\n crypto.randomUUID = function randomUUID() {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) => (\n // eslint-disable-next-line no-bitwise\n (c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)\n ));\n };\n}\n","/*\n * MIT License\n * https://github.com/javan/form-request-submit-polyfill/\n */\n\n(function (prototype) {\n if (typeof prototype.requestSubmit == \"function\") return\n\n prototype.requestSubmit = function (submitter) {\n if (submitter) {\n validateSubmitter(submitter, this)\n submitter.click()\n } else {\n submitter = document.createElement(\"input\")\n submitter.type = \"submit\"\n submitter.hidden = true\n this.appendChild(submitter)\n submitter.click()\n this.removeChild(submitter)\n }\n }\n\n function validateSubmitter(submitter, form) {\n submitter instanceof HTMLElement || raise(TypeError, \"parameter 1 is not of type 'HTMLElement'\")\n submitter.type == \"submit\" || raise(TypeError, \"The specified element is not a submit button\")\n submitter.form == form || raise(DOMException, \"The specified element is not owned by this form element\", \"NotFoundError\")\n }\n\n function raise(ErrorConstructor, message, name) {\n throw new ErrorConstructor(`Failed to execute 'requestSubmit' on 'HTMLFormElement': ${message}.`, name)\n }\n})(HTMLFormElement.prototype);","document.addEventListener(\"submit\", event => {\n // eslint-disable-next-line xss/no-mixed-html\n const form = event.target;\n\n if (form instanceof HTMLFormElement && form.matches(\"#page_list_search[data-search-event-name]\")) {\n const input: HTMLInputElement = form.querySelector('input[type=\"search\"]');\n\n if (input.value !== form.dataset.previousSearch && input.value !== \"\") {\n window.analytics.track(form.dataset.searchEventName, { search_query: input.value });\n }\n }\n});\n","// Functions on this page are used to track the \"referrer_source\" cookie in the Users browser\n// The Cookie will hold the URL of the default referrer for a given jurisdiction, i.e.:\n// for Australian users, they would come to the app from hnry.co, and in New Zealand the referrer\n// would be hnry.co.nz. By determining what their referrer is, we can find out which Jurisdiction\n// they will be using for the Hnry app.\n\n// Set a default cookie on pageload if there isn't one already.\n// This wouldn't usually be needed, but it's here for if a user\n// somehow comes straight to app.hnry.io without first going through\n// one of the marketing sites\n$(document).ready(function () {\n const existingCookie = getCookie(\"referral_source\");\n if (!existingCookie || existingCookie.includes(\"https://\")) {\n setCookie(\"referral_source\", \"hnry.co.nz\", 365 * 2);\n }\n});\n\n// Set the referral_source cookie when the user selects an option from the\n// country select dropdown list\n$(document).on(\"click\", \".jurisdiction-selector .dropdown-menu .dropdown-item\", function (event) {\n const referrerURL = $(event.currentTarget).data(\"referrer\");\n setReferrerCookie(referrerURL, true);\n});\n\n// Set the referral_source cookie when the user selects which jurisdiction they're\n// on when using the mobile app\n$(document).on(\"click\", \"#pick-jurisdiction .jurisdiction-button\", function (event) {\n const referrerURL = $(event.currentTarget).data(\"referrer\");\n setReferrerCookie(referrerURL, false);\n\n // Sneaky change the how-it-work class to display a different background image\n const code = $(event.currentTarget).data(\"code\");\n $(\"#how-it-works\").removeClass(\"how-it-works-nz\");\n $(\"#how-it-works\").removeClass(\"how-it-works-au\");\n $(\"#how-it-works\").addClass(`how-it-works-${code}`);\n});\n\nfunction setReferrerCookie(url, redirect) {\n setCookie(\"referral_source\", url, 365 * 2);\n if (redirect) {\n Turbolinks.visit();\n }\n}\n\n/**\n * Utility for setting a cookie\n *\n * @param {string} name - name of the cookie\n * @param {string} value - intended value for cookie\n * @param {number} days - how many days the cookie is valid for\n */\nfunction setCookie(name, value, days) {\n let expires = \"\";\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n\n expires = `; expires=${date.toUTCString()}`;\n }\n document.cookie = `${name}=${value || \"\"}${expires}; path=/; Domain=hnry.io;`;\n}\n\n/**\n * Utility for getting the value of a cookie by name\n *\n * @param {string} name - name of the cookie\n */\nfunction getCookie(name) {\n const v = document.cookie.match(`(^|;) ?${name}=([^;]*)(;|$)`);\n return v ? v[2] : null;\n}\n","// Attach event listener to listen for Trigger clicks\n$(document).on(\"click\", \".share-trigger\", function (event) {\n const { currentTarget } = event;\n shareContent(currentTarget);\n});\n/**\n * Utility function for adding Native Sharesheet triggering to a button element.\n *\n * Usage:\n * - The trigger:\n * - Add an id as an identifier, this could be anything but something like \"share-[whatever]\" to avoid any conflicts.\n * - Add the class \"share-trigger\".\n * - Add the onclick attribute with \"shareContent(this)\" as the value. This will activate the share when the trigger is clicked.\n * - The content:\n * - Add a \"data-share-trigger\" attribute to the content. The value to this attribute should be the id of the trigger.\n * - Add the class \"shareable\"\n *\n * Notes:\n * - Native sharing is for the most part only supported on iOS and Safari on desktop. Use a device helper to conditionally apply this functionlity when required.\n *\n * @param {HTMLButtonElement} currentTrigger the trigger element\n */\nconst shareContent = function (currentTrigger) {\n currentTrigger = $(currentTrigger);\n const triggerName = currentTrigger.attr(\"id\");\n const currentTargets = $(`[data-share-trigger=\"${triggerName}\"]`);\n let shareContent = [];\n currentTargets.each(function (index, target) {\n const currentTarget = $(target);\n const currentTargetContent = currentTarget.text();\n shareContent = [...shareContent, currentTargetContent];\n });\n shareContent = shareContent[0];\n openShareSheet(shareContent);\n};\n\n/**\n * Opens the Native ShareSheet on the device if supported.\n * If web-share isn't supported natively then it will fail silently.\n *\n * @param {string} content content to be shared\n */\nconst openShareSheet = function (content) {\n if (navigator.share !== undefined) {\n navigator.share({\n text: content,\n })\n .catch((error) => content);\n }\n};\n","$(document).on(\"click\", \"[data-show]\", function (event) {\n const selector = event.currentTarget.getAttribute(\"data-show\");\n const targetElement = document.querySelector(selector);\n if (targetElement.classList.contains(\"hidden\")) {\n targetElement.classList.remove(\"hidden\");\n }\n\n const targetElements = document.querySelectorAll(\".hide-me\");\n targetElements.forEach(function (item, index) {\n if (item != targetElement) {\n item.classList.add(\"hidden\");\n }\n });\n});\n","const turboContainerClass = \".main-container\";\n\nconst setLoadingMessage = () => {\n const body = document.body;\n const numbers = [...Array(6).keys()];\n // Remove existing loading ID\n numbers.forEach((number) => removeExistingLoadingMessage(number));\n\n // Add new random ID\n const newID = Math.floor(Math.random() * numbers.length);\n body.classList.add(`loading-style-${newID}`);\n};\n\nconst removeExistingLoadingMessage = (id) => {\n if (document.body.classList.contains(`loading-style-${id}`)) {\n document.body.classList.remove(`loading-style-${id}`);\n }\n};\n\n// Slide out content when a link is clicked\ndocument.addEventListener(\"turbolinks:request-start\", () => {\n const page = document.querySelector(turboContainerClass);\n\n if (page == null) return;\n\n if (page.classList.contains(\"entering\")) {\n page.classList.remove(\"entering\");\n }\n page.classList.add(\"leaving\");\n document.querySelector(\"html\").classList.add(\"hide-scroll\");\n setTimeout(() => {\n page.classList.remove(\"leaving\");\n page.classList.add(\"loading\");\n setLoadingMessage();\n }, 600);\n});\n\ndocument.addEventListener(\"turbolinks:before-cache\", () => {\n // Remove any styles that might have been added to head by libraries such as react-remove-scroll-bar\n document.querySelectorAll(\"head style\").forEach((el) => el.remove());\n document.body.style = \"\";\n});\n\n// Slide in content when it's loaded\nlet wasPageLoadedFromCache;\ndocument.addEventListener(\"turbolinks:before-render\", (event) => {\n const page = document.querySelector(turboContainerClass);\n\n if (page == null) return;\n ReactRailsUJS.unmountComponents(turboContainerClass);\n if (page.classList.contains(\"leaving\")) {\n page.classList.remove(\"leaving\");\n }\n if (page.classList.contains(\"loading\")) {\n page.classList.remove(\"loading\");\n }\n if (document.querySelector(\"html\").hasAttribute(\"data-turbolinks-preview\")) {\n wasPageLoadedFromCache = true;\n event.data.newBody\n .querySelector(turboContainerClass)\n .classList.add(\"entering\");\n removeAnimationClass();\n } else if (wasPageLoadedFromCache) {\n wasPageLoadedFromCache = false;\n } else {\n event.data.newBody\n .querySelector(turboContainerClass)\n .classList.add(\"entering\");\n removeAnimationClass();\n }\n});\n\ndocument.addEventListener(\"turbolinks:render\", () => {\n document.dispatchEvent(new Event(\"hnry:turbolinks-render\"));\n setTimeout(() => {\n const wholePage = document.querySelector(\"html\");\n if (wholePage.classList.contains(\"hide-scroll\")) {\n wholePage.classList.remove(\"hide-scroll\");\n }\n }, 200);\n initializeComponents();\n ReactRailsUJS.mountComponents(turboContainerClass);\n});\n\nconst removeAnimationClass = () => {\n setTimeout(() => {\n const currentMainContainer = document.querySelector(turboContainerClass);\n if (currentMainContainer.classList.contains(\"entering\")) {\n currentMainContainer.classList.remove(\"entering\");\n }\n }, 300);\n};\n"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","localFetch","async","input","method","body","contentType","accept","errorOnFailure","arguments","length","undefined","val","constructRequest","path","csrfToken","document","querySelector","contentTypeHeader","acceptHeaders","Accept","init","headers","content","credentials","response","fetch","ok","statusText","json","err","post","postJson","putJson","patchJson","get","deleteReq","getAdminUser","window","Hnry","AdminUser","getAdminUserId","getConfig","Config","getEnvironment","environment","getAmplitudeAdminApiKey","amplitudeAdminApiKey","AdminUserAttributes","r","require","forEach","mountComponent","type","message","mountingPoint","parentElement","removeChild","createElement","className","append","root","createRoot","render","React","Toastr","toastr","success","error","warning","info","AMPLITUDE_API_KEY","acceptableEnvironments","analytics","includes","amplitudeInstance","getAmplitudeInstance","options","minIdLength","userId","defaultTracking","amplitude","$","on","persisted","prop","jurisdictionCode","data","platformCode","toLowerCase","replace","addEventListener","is","event","getElementById","contains","target","offboardReason","value","secondaryReasonWrapper","secondaryReasonSelect","secondaryReasonInput","button","setAttribute","classList","remove","selectedIndex","removeAttribute","add","handleOffBoardingReasonChange","showHideMinimumPaymentCriteriaAlert","canProcessPaymentsOverride","html","linkedToAgencyCheck","gstAccount","vatAccount","studentLoan","hide","show","toggleChangingUserSpecifiedSalesTaxAlert","userSalesTax","adminSalesTaxAccount","showHideChangingUserSalesTaxAlert","toggleChangingUserSpecifiedStudentLoanAlert","userStudentLoan","adminStudentLoanAccount","showHideChangingUserStudentLoanAlert","ready","auJurisdiction","getAttribute","onboardingId","animation","rails","ajax","url","Routes","admin_onboardings_fetch_user_details_from_ato_path","beforeSend","income_tax_prn","activity_statement_prn","complete","fail","responseJSON","errors","querySelectorAll","field","addSalesTaxCalculator","dataset","amountIncludingSalesTaxField","Number","salesTaxToAmountIncludingConverter","BILLER_CODE","CRN","NOT_VALID","VALID","NO_VALUE","toggleReferenceLabel","ref","attr","text","innerHTML","normalizeBPAYBillerCode","billerCode","normalizeBPAYCRN","customer_reference_number","validateBPAYBillerCode","addClass","validate_bpay_biller_code_allocation_preferences_path","bpay_biller_code","billerName","minimumPaymentAmount","valid","toggleBPAYIconValidity","toggleBPAYInputValidity","biller_name","minimum_payment_amount","maximumPaymentAmount","updateMinimumAndMaximumPaymentHiddenFields","maximum_payment_amount","toggleSaveButtonState","toggleBPAYMinimumMaximumWarning","validateBPAYCRN","validate_bpay_crn_allocation_preferences_path","bpay_crn","bpayBillerCodeValid","bpayCrnValid","editable","bpayField","validity","removeClass","bpayFieldInputSelector","filter","toUpperCase","trim","each","_","element","replaceAll","indexOf","css","toggleMobileActionMenu","resize","siblings","checkBankValidation","api_bank_account_number_validation_validate_bank_account_number_path","JSON","stringify","INVALID","NZ_BANK_ACCOUNT_NUMBER_ID_SELECTOR","BANK_BRANCH_CODE_ID_SELECTOR","ACCOUNT_NUMBER_ID_SELECTOR","NZ_BANK_ACCOUNT_NUMBER_INPUT_SELECTOR","BANK_BRANCH_CODE_INPUT_SELECTOR","ACCOUNT_NUMBER_INPUT_SELECTOR","TOUR_NEXT_BUTTON","toggleBankAccountValidity","bankAccountFieldSelector","bankAccountFieldInputSelector","isValid","bankAccountFieldFeedbackSelector","toString","clearBankAccountValidity","removeAttr","isAccountNumberValid","account_number","validateBankBranchCode","bankBranchField","accountField","bank_branch_code","isBankBranchCodeValid","toggleNextBtnDisabled","validateAccountNumber","validateNzBankAccountNumber","validateBankAccountNumber","updateIncomeForecastRates","trigger","this","closest","find","windowHasScrollbars","innerWidth","documentElement","clientWidth","checkIfAnyElementsAreScrollable","Array","from","some","offsetWidth","scrollWidth","dialogId","unfreezePageScrolling","htmlElement","show_dialog","modal","location","reload","freezePageScrolling","showDialog","_ref","title","focus","size","header_close","virtual_page_url","pathname","centered","scrollable","hideHeader","customiseClasses","$dialog","$cross","after","disableFormSubmitUntilValid","first","dataLayer","push","virtualPageURL","virtualPageTitle","tooltip","initializeComponents","ReactRailsUJS","mountComponents","dismissDialog","Materialize","updateTextFields","tableRowWithEllipsisMenu","width","td","disabled","btnElementId","nextButton","requiredness","currentTarget","checked","selector","selectedElement","removeProp","inputNeedsValidation","EMAIL_REGEX","submitButton","form","emailsAreValid","split","email","test","every","validateEmail","matches","handleDuoButtonChange","feedbackid","feedbackElement","allFeedbacks","feedbackToShow","cls","inputsToClear","dropdown","defaultOption","dropdownDefaultOption","windowWidth","elementWidth","scale","transform","height","collapse","replaceFormWithLoader","loaderDiv","hidden","agreeButton","scrollTop","scrollHeight","getBoundingClientRect","hasAttribute","handleScrolling","tourNextBtn","removeEventListener","homeOfficePercent","homeOfficePercentHighMessage","crypto","randomUUID","c","getRandomValues","Uint8Array","prototype","raise","ErrorConstructor","name","requestSubmit","submitter","HTMLElement","TypeError","DOMException","validateSubmitter","click","appendChild","HTMLFormElement","previousSearch","track","searchEventName","search_query","setReferrerCookie","redirect","setCookie","Turbolinks","visit","days","expires","date","Date","setTime","getTime","toUTCString","cookie","existingCookie","v","match","getCookie","shareContent","currentTrigger","triggerName","currentTargets","index","currentTargetContent","openShareSheet","navigator","share","catch","targetElement","item","turboContainerClass","removeExistingLoadingMessage","wasPageLoadedFromCache","page","setTimeout","setLoadingMessage","numbers","number","newID","Math","floor","random","el","style","unmountComponents","newBody","removeAnimationClass","dispatchEvent","Event","wholePage","currentMainContainer"],"sourceRoot":""}