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mBAAoB,CACnD,OAAQ,CACN,QAAS,KAAK,QACd,KAAM,KAAK,IACb,CACF,CAAC,EAED,SAAS,KAAK,cAAcA,CAAU,CACxC,CACF,CAEA,IAAeD,C,iRCdR,SAAe/N,EAAiB,EAAwD,mCAAxDwE,EAAczX,EAA0B,CAAC,EAAe,CAC7F,MAAMkhB,EAAWlhB,EAAQ,IAAuB,MAE1CmhB,EAA4B,CAChC,OAAQnhB,EAAQ,OAChB,QAAS,CACP,eAAgBohB,EAAU,CAC5B,CACF,EAOA,GALIphB,EAAQ,OACVmhB,EAAa,QAAQ,cAAc,EAAI,mBACvCA,EAAa,KAAO,KAAK,UAAUnhB,EAAQ,IAAI,GAG7CA,EAAQ,OAAQ,CAClB,MAAMqhB,EAAS,mBACTC,EAAQ,OAAO,KAAKthB,EAAQ,MAAM,EACrC,IAAI0J,GAAO,GAAG2X,EAAO3X,CAAG,CAAC,IAAI2X,EAAOrhB,EAAQ,OAAO0J,CAAG,CAAC,CAAC,EAAE,EAC1D,KAAK,GAAG,EACX+N,EAAO,GAAGA,CAAI,IAAI6J,CAAK,EACzB,CAEA,MAAMrX,EAAW,MAAMiX,EAAQzJ,EAAM0J,CAAY,EAE3CI,EAActX,EAAS,QAAQ,IAAI,cAAc,EAEvD,OAAIsX,GAAeA,EAAY,YAAY,EAAE,QAAQ,kBAAkB,IAAM,GACpE,MAAMtX,EAAS,KAAK,EAEtBA,EAAS,GAIN,MAAMA,EAAS,KAAK,EAHnBA,CAKb,CAAC,CAAD,CAEA,MAAMmX,EAAY,IACH,SAAS,kBAAkB,YAAY,EAAE,CAAC,EAC3C,O","sources":["webpack://dot-com/./app/assets/javascript/controllers/ sync .js$%7C.ts$","webpack://dot-com/./app/assets/javascript/components/shared/addressCompletion.js","webpack://dot-com/./app/assets/javascript/components/shared/utils/utils.ts","webpack://dot-com/./app/assets/javascript/components/shared/validation/display/mask.ts","webpack://dot-com/./app/assets/javascript/components/shared/validation/utilities/date.ts","webpack://dot-com/./app/assets/javascript/components/shared/validation/validators/constants.ts","webpack://dot-com/./app/assets/javascript/services/vehicle_form_characteristics.service.ts","webpack://dot-com/./app/assets/javascript/services/vehicle_risk_data_service.ts","webpack://dot-com/./app/assets/javascript/controllers/auto/characteristics_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/auto/quotes_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/claims/first_notice_controller.js","webpack://dot-com/./app/assets/javascript/utils/animation_helper.ts","webpack://dot-com/./app/assets/javascript/controllers/claims/mobile_menu_controller.js","webpack://dot-com/./app/assets/javascript/controllers/datetime_ampm_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/accordion_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/add_ledger_entry_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/add_policy_contact_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/additionals_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/address_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/anchor_tags_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/animal_liability_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/applicant_mailing_address_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/applicants_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/backdate_endorsement_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/billing_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/compare_ratings_tool_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/confetti_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/confirm_void_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/construction_type_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/corrector_alert_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/corrector_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/coverage_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/coverage_options_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/crm_accounts_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/developer_tools_document_list_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/document_upload_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/document_verification_controller.js","webpack://dot-com/./app/assets/javascript/components/shared/utils/restricted_coverages_handler.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/earthquake_addon_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/edit_payment_method_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/edit_payment_method_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/endorsement_date_toggle_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/endorsement_one_time_payment_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/expand_content_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/fax_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/five_nine_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/flash_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/golf_cart_liability_addon_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/income_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/inspection_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/json_editor_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/kustomer_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/lead_lost_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/ledger_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/mail_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/manual_payment_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/moratoria_map_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/mortgagee_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/opportunities_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/opportunity_lost_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/password_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/payment_amount_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/payment_data_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/payment_method_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/payment_type_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/people_dev_tools_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/policy_cancellation_reason_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/policy_payments_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/policy_term_selection_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/preferences_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/previous_insurance_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/process_refund_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/product_rules_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/products_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/products_sync_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/property_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/quote_menu_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/revert_ledger_entry_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/rule_multi_delete_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/salesperson_lead_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/salesperson_opportunity_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/search_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/send_otp_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/send_quote_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/sideloading_subnav_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/sort_dropdown_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/task_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/third_party_sales_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/toggle_target_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/underwriting_override_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/underwriting_renewal_flag_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/update_ledger_entry_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/kintranet/view_check_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/water_backup_controller.js","webpack://dot-com/./app/assets/javascript/controllers/kintranet/windmit_discount_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/address_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/authentication_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/compares_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/coverage_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/credit_cards_controller.js","webpack://dot-com/./app/assets/javascript/utils/create_new_event.js","webpack://dot-com/./app/assets/javascript/network_requests/funnel_property_updater.js","webpack://dot-com/./app/assets/javascript/components/checkbox_toggle.js","webpack://dot-com/./app/assets/javascript/controllers/nok/discounts_controller.js","webpack://dot-com/./app/assets/javascript/utils/all_settled.js","webpack://dot-com/./app/assets/javascript/controllers/nok/document_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/documents_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/email_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/flood_modal_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/loading_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/mortgages_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/payment_schedule_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/policy_application_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/policy_information_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/preferences_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/premium_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/properties_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/property_details_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/property_information_controller.js","webpack://dot-com/./app/assets/javascript/utils/sanitize_helper.ts","webpack://dot-com/./app/assets/javascript/controllers/nok/screenshot_controller.js","webpack://dot-com/./app/assets/javascript/controllers/nok/signing_controller.js","webpack://dot-com/./app/assets/javascript/utils/to_array.js","webpack://dot-com/./app/assets/javascript/controllers/nok/your_info_controller.js","webpack://dot-com/./app/assets/javascript/controllers/portal/add_credit_card_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/portal/claims_controller.ts","webpack://dot-com/./app/assets/javascript/utils/fetch_helpers/patch_request.ts","webpack://dot-com/./app/assets/javascript/controllers/portal/mailing_address_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/portal/make_payment_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/portal/policy_details_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/portal/summary_controller.js","webpack://dot-com/./app/assets/javascript/controllers/shared/kin_user_controller.js","webpack://dot-com/./app/assets/javascript/controllers/shared/loading_controller.js","webpack://dot-com/./app/assets/javascript/controllers/shared/one_time_password_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/shared/premium_poller_controller.js","webpack://dot-com/./app/assets/javascript/controllers/srf/insurance_scores_controller.js","webpack://dot-com/./app/assets/javascript/controllers/srf/mortgagee_controller.js","webpack://dot-com/./app/assets/javascript/controllers/srf/page_selector_controller.js","webpack://dot-com/./app/assets/javascript/controllers/srf/payments_controller.js","webpack://dot-com/./app/assets/javascript/controllers/srf/policy_applications_controller.js","webpack://dot-com/./app/assets/javascript/controllers/srf/policy_information_controller.js","webpack://dot-com/./app/assets/javascript/controllers/srf/policy_loading_controller.js","webpack://dot-com/./app/assets/javascript/controllers/srf/property_information_controller.js","webpack://dot-com/./app/assets/javascript/controllers/srf/quotes_controller.ts","webpack://dot-com/./app/assets/javascript/controllers/visibility_controller.js","webpack://dot-com/./app/assets/javascript/network_requests/funnel_event.js","webpack://dot-com/./app/assets/javascript/network_requests/status_poller.js","webpack://dot-com/./app/assets/javascript/store/store.ts","webpack://dot-com/./app/assets/javascript/store/quote/premium.ts","webpack://dot-com/./app/assets/javascript/utils/create_card_token.ts","webpack://dot-com/./app/assets/javascript/utils/fetch_client_details.ts","webpack://dot-com/./app/assets/javascript/utils/fetch_helpers/post_request.ts","webpack://dot-com/./app/assets/javascript/utils/flasher.js","webpack://dot-com/./app/assets/javascript/utils/request.ts"],"sourcesContent":["var map = {\n\t\"./auto/characteristics_controller.ts\": 1885,\n\t\"./auto/quotes_controller.ts\": 798,\n\t\"./claims/first_notice_controller.js\": 4660,\n\t\"./claims/mobile_menu_controller.js\": 3508,\n\t\"./datetime_ampm_controller.ts\": 6200,\n\t\"./kintranet/accordion_controller.ts\": 5540,\n\t\"./kintranet/add_ledger_entry_controller.js\": 9690,\n\t\"./kintranet/add_policy_contact_controller.js\": 975,\n\t\"./kintranet/additionals_controller.js\": 7590,\n\t\"./kintranet/address_controller.js\": 2168,\n\t\"./kintranet/anchor_tags_controller.js\": 7201,\n\t\"./kintranet/animal_liability_controller.ts\": 2486,\n\t\"./kintranet/applicant_mailing_address_controller.js\": 1325,\n\t\"./kintranet/applicants_controller.js\": 8073,\n\t\"./kintranet/backdate_endorsement_controller.ts\": 4278,\n\t\"./kintranet/billing_controller.js\": 4841,\n\t\"./kintranet/compare_ratings_tool_controller.ts\": 7053,\n\t\"./kintranet/confetti_controller.js\": 7736,\n\t\"./kintranet/confirm_void_controller.js\": 2917,\n\t\"./kintranet/construction_type_controller.js\": 7826,\n\t\"./kintranet/corrector_alert_controller.js\": 3070,\n\t\"./kintranet/corrector_controller.ts\": 4067,\n\t\"./kintranet/coverage_controller.js\": 6394,\n\t\"./kintranet/coverage_options_controller.js\": 2033,\n\t\"./kintranet/crm_accounts_controller.js\": 2771,\n\t\"./kintranet/developer_tools_document_list_controller.ts\": 7843,\n\t\"./kintranet/document_upload_controller.js\": 2557,\n\t\"./kintranet/document_verification_controller.js\": 8219,\n\t\"./kintranet/earthquake_addon_controller.ts\": 3135,\n\t\"./kintranet/edit_payment_method_controller.js\": 5845,\n\t\"./kintranet/edit_payment_method_controller.ts\": 8407,\n\t\"./kintranet/endorsement_date_toggle_controller.js\": 3326,\n\t\"./kintranet/endorsement_one_time_payment_controller.ts\": 5278,\n\t\"./kintranet/expand_content_controller.js\": 6558,\n\t\"./kintranet/fax_controller.js\": 1857,\n\t\"./kintranet/five_nine_controller.js\": 4999,\n\t\"./kintranet/flash_controller.js\": 898,\n\t\"./kintranet/golf_cart_liability_addon_controller.ts\": 1952,\n\t\"./kintranet/income_controller.js\": 237,\n\t\"./kintranet/inspection_controller.js\": 2210,\n\t\"./kintranet/interfaces.ts\": 3875,\n\t\"./kintranet/json_editor_controller.js\": 1886,\n\t\"./kintranet/kustomer_controller.js\": 8496,\n\t\"./kintranet/lead_lost_controller.js\": 7275,\n\t\"./kintranet/ledger_controller.js\": 9955,\n\t\"./kintranet/mail_controller.js\": 8821,\n\t\"./kintranet/manual_payment_controller.js\": 5905,\n\t\"./kintranet/moratoria_map_controller.ts\": 7673,\n\t\"./kintranet/mortgagee_controller.js\": 2635,\n\t\"./kintranet/opportunities_controller.js\": 7907,\n\t\"./kintranet/opportunity_lost_controller.js\": 8808,\n\t\"./kintranet/password_controller.js\": 5039,\n\t\"./kintranet/payment_amount_controller.ts\": 3167,\n\t\"./kintranet/payment_data_controller.js\": 4785,\n\t\"./kintranet/payment_method_controller.js\": 1938,\n\t\"./kintranet/payment_type_controller.js\": 4153,\n\t\"./kintranet/people_dev_tools_controller.js\": 1889,\n\t\"./kintranet/policy_cancellation_reason_controller.js\": 5515,\n\t\"./kintranet/policy_payments_controller.js\": 5312,\n\t\"./kintranet/policy_term_selection_controller.js\": 6272,\n\t\"./kintranet/preferences_controller.js\": 8762,\n\t\"./kintranet/previous_insurance_controller.js\": 222,\n\t\"./kintranet/process_refund_controller.js\": 4720,\n\t\"./kintranet/product_rules_controller.js\": 5385,\n\t\"./kintranet/products_controller.js\": 6676,\n\t\"./kintranet/products_sync_controller.ts\": 6968,\n\t\"./kintranet/property_controller.js\": 7303,\n\t\"./kintranet/quote_menu_controller.ts\": 4384,\n\t\"./kintranet/revert_ledger_entry_controller.ts\": 4513,\n\t\"./kintranet/rule_multi_delete_controller.ts\": 6980,\n\t\"./kintranet/salesperson_lead_controller.js\": 592,\n\t\"./kintranet/salesperson_opportunity_controller.js\": 2357,\n\t\"./kintranet/search_controller.js\": 5920,\n\t\"./kintranet/send_otp_controller.ts\": 6718,\n\t\"./kintranet/send_quote_controller.js\": 4343,\n\t\"./kintranet/sideloading_subnav_controller.js\": 7543,\n\t\"./kintranet/sort_dropdown_controller.js\": 3396,\n\t\"./kintranet/task_controller.js\": 4463,\n\t\"./kintranet/third_party_sales_controller.js\": 9263,\n\t\"./kintranet/toggle_target_controller.js\": 4928,\n\t\"./kintranet/underwriting_override_controller.js\": 7709,\n\t\"./kintranet/underwriting_renewal_flag_controller.js\": 4888,\n\t\"./kintranet/update_ledger_entry_controller.ts\": 1458,\n\t\"./kintranet/view_check_controller.js\": 7582,\n\t\"./kintranet/water_backup_controller.js\": 9994,\n\t\"./kintranet/windmit_discount_controller.js\": 5810,\n\t\"./nok/address_controller.js\": 7678,\n\t\"./nok/authentication_controller.js\": 1042,\n\t\"./nok/compares_controller.js\": 2978,\n\t\"./nok/coverage_controller.js\": 4855,\n\t\"./nok/credit_cards_controller.js\": 2221,\n\t\"./nok/discounts_controller.js\": 730,\n\t\"./nok/document_controller.js\": 6133,\n\t\"./nok/documents_controller.js\": 7592,\n\t\"./nok/email_controller.js\": 6454,\n\t\"./nok/flood_modal_controller.js\": 1604,\n\t\"./nok/loading_controller.js\": 5450,\n\t\"./nok/mortgages_controller.js\": 4575,\n\t\"./nok/payment_schedule_controller.js\": 388,\n\t\"./nok/policy_application_controller.js\": 2603,\n\t\"./nok/policy_information_controller.js\": 2359,\n\t\"./nok/preferences_controller.js\": 36,\n\t\"./nok/premium_controller.js\": 4409,\n\t\"./nok/properties_controller.js\": 4837,\n\t\"./nok/property_details_controller.js\": 1182,\n\t\"./nok/property_information_controller.js\": 290,\n\t\"./nok/screenshot_controller.js\": 7615,\n\t\"./nok/signing_controller.js\": 224,\n\t\"./nok/your_info_controller.js\": 539,\n\t\"./portal/add_credit_card_controller.ts\": 4136,\n\t\"./portal/claims_controller.ts\": 9303,\n\t\"./portal/mailing_address_controller.ts\": 5338,\n\t\"./portal/make_payment_controller.ts\": 469,\n\t\"./portal/policy_details_controller.ts\": 2041,\n\t\"./portal/summary_controller.js\": 689,\n\t\"./shared/kin_user_controller.js\": 3841,\n\t\"./shared/loading_controller.js\": 9387,\n\t\"./shared/one_time_password_controller.ts\": 2489,\n\t\"./shared/premium_poller_controller.js\": 9893,\n\t\"./srf/insurance_scores_controller.js\": 8581,\n\t\"./srf/mortgagee_controller.js\": 374,\n\t\"./srf/page_selector_controller.js\": 914,\n\t\"./srf/payments_controller.js\": 2514,\n\t\"./srf/policy_applications_controller.js\": 6413,\n\t\"./srf/policy_information_controller.js\": 4118,\n\t\"./srf/policy_loading_controller.js\": 1924,\n\t\"./srf/property_information_controller.js\": 575,\n\t\"./srf/quotes_controller.ts\": 6746,\n\t\"./visibility_controller.js\": 3457,\n\t\"javascript/controllers/auto/characteristics_controller.ts\": 1885,\n\t\"javascript/controllers/auto/quotes_controller.ts\": 798,\n\t\"javascript/controllers/claims/first_notice_controller.js\": 4660,\n\t\"javascript/controllers/claims/mobile_menu_controller.js\": 3508,\n\t\"javascript/controllers/datetime_ampm_controller.ts\": 6200,\n\t\"javascript/controllers/kintranet/accordion_controller.ts\": 5540,\n\t\"javascript/controllers/kintranet/add_ledger_entry_controller.js\": 9690,\n\t\"javascript/controllers/kintranet/add_policy_contact_controller.js\": 975,\n\t\"javascript/controllers/kintranet/additionals_controller.js\": 7590,\n\t\"javascript/controllers/kintranet/address_controller.js\": 2168,\n\t\"javascript/controllers/kintranet/anchor_tags_controller.js\": 7201,\n\t\"javascript/controllers/kintranet/animal_liability_controller.ts\": 2486,\n\t\"javascript/controllers/kintranet/applicant_mailing_address_controller.js\": 1325,\n\t\"javascript/controllers/kintranet/applicants_controller.js\": 8073,\n\t\"javascript/controllers/kintranet/backdate_endorsement_controller.ts\": 4278,\n\t\"javascript/controllers/kintranet/billing_controller.js\": 4841,\n\t\"javascript/controllers/kintranet/compare_ratings_tool_controller.ts\": 7053,\n\t\"javascript/controllers/kintranet/confetti_controller.js\": 7736,\n\t\"javascript/controllers/kintranet/confirm_void_controller.js\": 2917,\n\t\"javascript/controllers/kintranet/construction_type_controller.js\": 7826,\n\t\"javascript/controllers/kintranet/corrector_alert_controller.js\": 3070,\n\t\"javascript/controllers/kintranet/corrector_controller.ts\": 4067,\n\t\"javascript/controllers/kintranet/coverage_controller.js\": 6394,\n\t\"javascript/controllers/kintranet/coverage_options_controller.js\": 2033,\n\t\"javascript/controllers/kintranet/crm_accounts_controller.js\": 2771,\n\t\"javascript/controllers/kintranet/developer_tools_document_list_controller.ts\": 7843,\n\t\"javascript/controllers/kintranet/document_upload_controller.js\": 2557,\n\t\"javascript/controllers/kintranet/document_verification_controller.js\": 8219,\n\t\"javascript/controllers/kintranet/earthquake_addon_controller.ts\": 3135,\n\t\"javascript/controllers/kintranet/edit_payment_method_controller.js\": 5845,\n\t\"javascript/controllers/kintranet/edit_payment_method_controller.ts\": 8407,\n\t\"javascript/controllers/kintranet/endorsement_date_toggle_controller.js\": 3326,\n\t\"javascript/controllers/kintranet/endorsement_one_time_payment_controller.ts\": 5278,\n\t\"javascript/controllers/kintranet/expand_content_controller.js\": 6558,\n\t\"javascript/controllers/kintranet/fax_controller.js\": 1857,\n\t\"javascript/controllers/kintranet/five_nine_controller.js\": 4999,\n\t\"javascript/controllers/kintranet/flash_controller.js\": 898,\n\t\"javascript/controllers/kintranet/golf_cart_liability_addon_controller.ts\": 1952,\n\t\"javascript/controllers/kintranet/income_controller.js\": 237,\n\t\"javascript/controllers/kintranet/inspection_controller.js\": 2210,\n\t\"javascript/controllers/kintranet/interfaces.ts\": 3875,\n\t\"javascript/controllers/kintranet/json_editor_controller.js\": 1886,\n\t\"javascript/controllers/kintranet/kustomer_controller.js\": 8496,\n\t\"javascript/controllers/kintranet/lead_lost_controller.js\": 7275,\n\t\"javascript/controllers/kintranet/ledger_controller.js\": 9955,\n\t\"javascript/controllers/kintranet/mail_controller.js\": 8821,\n\t\"javascript/controllers/kintranet/manual_payment_controller.js\": 5905,\n\t\"javascript/controllers/kintranet/moratoria_map_controller.ts\": 7673,\n\t\"javascript/controllers/kintranet/mortgagee_controller.js\": 2635,\n\t\"javascript/controllers/kintranet/opportunities_controller.js\": 7907,\n\t\"javascript/controllers/kintranet/opportunity_lost_controller.js\": 8808,\n\t\"javascript/controllers/kintranet/password_controller.js\": 5039,\n\t\"javascript/controllers/kintranet/payment_amount_controller.ts\": 3167,\n\t\"javascript/controllers/kintranet/payment_data_controller.js\": 4785,\n\t\"javascript/controllers/kintranet/payment_method_controller.js\": 1938,\n\t\"javascript/controllers/kintranet/payment_type_controller.js\": 4153,\n\t\"javascript/controllers/kintranet/people_dev_tools_controller.js\": 1889,\n\t\"javascript/controllers/kintranet/policy_cancellation_reason_controller.js\": 5515,\n\t\"javascript/controllers/kintranet/policy_payments_controller.js\": 5312,\n\t\"javascript/controllers/kintranet/policy_term_selection_controller.js\": 6272,\n\t\"javascript/controllers/kintranet/preferences_controller.js\": 8762,\n\t\"javascript/controllers/kintranet/previous_insurance_controller.js\": 222,\n\t\"javascript/controllers/kintranet/process_refund_controller.js\": 4720,\n\t\"javascript/controllers/kintranet/product_rules_controller.js\": 5385,\n\t\"javascript/controllers/kintranet/products_controller.js\": 6676,\n\t\"javascript/controllers/kintranet/products_sync_controller.ts\": 6968,\n\t\"javascript/controllers/kintranet/property_controller.js\": 7303,\n\t\"javascript/controllers/kintranet/quote_menu_controller.ts\": 4384,\n\t\"javascript/controllers/kintranet/revert_ledger_entry_controller.ts\": 4513,\n\t\"javascript/controllers/kintranet/rule_multi_delete_controller.ts\": 6980,\n\t\"javascript/controllers/kintranet/salesperson_lead_controller.js\": 592,\n\t\"javascript/controllers/kintranet/salesperson_opportunity_controller.js\": 2357,\n\t\"javascript/controllers/kintranet/search_controller.js\": 5920,\n\t\"javascript/controllers/kintranet/send_otp_controller.ts\": 6718,\n\t\"javascript/controllers/kintranet/send_quote_controller.js\": 4343,\n\t\"javascript/controllers/kintranet/sideloading_subnav_controller.js\": 7543,\n\t\"javascript/controllers/kintranet/sort_dropdown_controller.js\": 3396,\n\t\"javascript/controllers/kintranet/task_controller.js\": 4463,\n\t\"javascript/controllers/kintranet/third_party_sales_controller.js\": 9263,\n\t\"javascript/controllers/kintranet/toggle_target_controller.js\": 4928,\n\t\"javascript/controllers/kintranet/underwriting_override_controller.js\": 7709,\n\t\"javascript/controllers/kintranet/underwriting_renewal_flag_controller.js\": 4888,\n\t\"javascript/controllers/kintranet/update_ledger_entry_controller.ts\": 1458,\n\t\"javascript/controllers/kintranet/view_check_controller.js\": 7582,\n\t\"javascript/controllers/kintranet/water_backup_controller.js\": 9994,\n\t\"javascript/controllers/kintranet/windmit_discount_controller.js\": 5810,\n\t\"javascript/controllers/nok/address_controller.js\": 7678,\n\t\"javascript/controllers/nok/authentication_controller.js\": 1042,\n\t\"javascript/controllers/nok/compares_controller.js\": 2978,\n\t\"javascript/controllers/nok/coverage_controller.js\": 4855,\n\t\"javascript/controllers/nok/credit_cards_controller.js\": 2221,\n\t\"javascript/controllers/nok/discounts_controller.js\": 730,\n\t\"javascript/controllers/nok/document_controller.js\": 6133,\n\t\"javascript/controllers/nok/documents_controller.js\": 7592,\n\t\"javascript/controllers/nok/email_controller.js\": 6454,\n\t\"javascript/controllers/nok/flood_modal_controller.js\": 1604,\n\t\"javascript/controllers/nok/loading_controller.js\": 5450,\n\t\"javascript/controllers/nok/mortgages_controller.js\": 4575,\n\t\"javascript/controllers/nok/payment_schedule_controller.js\": 388,\n\t\"javascript/controllers/nok/policy_application_controller.js\": 2603,\n\t\"javascript/controllers/nok/policy_information_controller.js\": 2359,\n\t\"javascript/controllers/nok/preferences_controller.js\": 36,\n\t\"javascript/controllers/nok/premium_controller.js\": 4409,\n\t\"javascript/controllers/nok/properties_controller.js\": 4837,\n\t\"javascript/controllers/nok/property_details_controller.js\": 1182,\n\t\"javascript/controllers/nok/property_information_controller.js\": 290,\n\t\"javascript/controllers/nok/screenshot_controller.js\": 7615,\n\t\"javascript/controllers/nok/signing_controller.js\": 224,\n\t\"javascript/controllers/nok/your_info_controller.js\": 539,\n\t\"javascript/controllers/portal/add_credit_card_controller.ts\": 4136,\n\t\"javascript/controllers/portal/claims_controller.ts\": 9303,\n\t\"javascript/controllers/portal/mailing_address_controller.ts\": 5338,\n\t\"javascript/controllers/portal/make_payment_controller.ts\": 469,\n\t\"javascript/controllers/portal/policy_details_controller.ts\": 2041,\n\t\"javascript/controllers/portal/summary_controller.js\": 689,\n\t\"javascript/controllers/shared/kin_user_controller.js\": 3841,\n\t\"javascript/controllers/shared/loading_controller.js\": 9387,\n\t\"javascript/controllers/shared/one_time_password_controller.ts\": 2489,\n\t\"javascript/controllers/shared/premium_poller_controller.js\": 9893,\n\t\"javascript/controllers/srf/insurance_scores_controller.js\": 8581,\n\t\"javascript/controllers/srf/mortgagee_controller.js\": 374,\n\t\"javascript/controllers/srf/page_selector_controller.js\": 914,\n\t\"javascript/controllers/srf/payments_controller.js\": 2514,\n\t\"javascript/controllers/srf/policy_applications_controller.js\": 6413,\n\t\"javascript/controllers/srf/policy_information_controller.js\": 4118,\n\t\"javascript/controllers/srf/policy_loading_controller.js\": 1924,\n\t\"javascript/controllers/srf/property_information_controller.js\": 575,\n\t\"javascript/controllers/srf/quotes_controller.ts\": 6746,\n\t\"javascript/controllers/visibility_controller.js\": 3457\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 = 441;","/*\n Fiddle for this: https://jsfiddle.net/pr29monk/32/\n*/\n\nwindow.app = window.app || {}\nwindow.app.kinAddressCompletion = (function () {\n var CONTAINER_SELECTOR = \".pac-container\"\n function AddressCompletion() {\n \"use strict\"\n var _this = this\n\n var hashifyAddressComponents = function (addressComponents) {\n var hash = {}\n var getType = function (addressComponent) {\n return addressComponent.types[0]\n }\n\n if (addressComponents) {\n addressComponents.forEach(function (item, i) {\n hash[getType(item)] = item\n })\n }\n return hash\n }\n\n var setValue = function (selectorKey, value) {\n var el = document.querySelector(_this.selectors[selectorKey])\n if (el) {\n el.value = value\n }\n }\n\n _this.addressInputEl = function () {\n return document.querySelector(_this.selectors.display)\n }\n\n _this.pageHasDropdown = function () {\n var containers = document.querySelectorAll(CONTAINER_SELECTOR)\n\n if (containers.length === 0) {\n return false\n }\n\n var i\n for (i = 0; i < containers.length; i += 1) {\n if (containers[i].offsetParent) {\n return true\n }\n }\n\n return false\n }\n\n _this.blankFields = function () {\n setValue(\"streetName\", \"\")\n setValue(\"streetNumber\", \"\")\n setValue(\"zipPlus4\", \"\")\n setValue(\"street\", \"\")\n setValue(\"city\", \"\")\n setValue(\"state\", \"\")\n setValue(\"zip\", \"\")\n setValue(\"lat\", \"\")\n setValue(\"lon\", \"\")\n }\n\n _this.setCanonicalAddress = function (e) {\n var addressComps, city, state, streetName, streetNumber, zip, lat, lon\n var place = _this.autocomplete.getPlace()\n\n let unsuitableAddress =\n (place && place.types && place.types[0] !== \"street_address\" && place.types[0] !== \"premise\") ||\n place.address_components === undefined\n if (unsuitableAddress) {\n return\n }\n\n addressComps = hashifyAddressComponents(place.address_components)\n streetNumber = addressComps.street_number.short_name\n streetName = addressComps.route.short_name\n city = addressComps.locality.short_name\n state = addressComps.administrative_area_level_1.short_name\n zip = addressComps.postal_code.short_name\n _this.element.value = streetNumber + \" \" + streetName + \", \" + city + \", \" + state + \" \" + zip\n\n lat = place.geometry.location.lat()\n lon = place.geometry.location.lng()\n\n if (_this.callbacks && _this.callbacks.place_changed) {\n _this.callbacks.place_changed({ lat: lat, lon: lon, zip: zip })\n }\n }\n\n _this.onPlaceChanged = function (e) {\n var addressComps, city, display, state, streetName, streetNumber, zip, zipPlus4, lat, lon\n var place = _this.autocomplete.getPlace()\n\n if (\n (place && place.types && place.types[0] !== \"street_address\" && place.types[0] !== \"premise\") ||\n place.address_components === undefined\n ) {\n return\n }\n\n addressComps = hashifyAddressComponents(place.address_components)\n streetNumber = addressComps.street_number.short_name\n streetName = addressComps.route.short_name\n city = addressComps.locality.short_name\n state = addressComps.administrative_area_level_1.short_name\n zip = addressComps.postal_code.short_name\n zipPlus4 = \"\"\n if (addressComps.postal_code_suffix) {\n zipPlus4 = addressComps.postal_code_suffix.short_name\n }\n display = streetNumber + \" \" + streetName + \", \" + city + \", \" + state + \" \" + zip\n lat = place.geometry.location.lat()\n lon = place.geometry.location.lng()\n\n setValue(\"streetName\", streetName)\n setValue(\"streetNumber\", streetNumber)\n setValue(\"zipPlus4\", zipPlus4)\n setValue(\"city\", city)\n setValue(\"state\", state)\n setValue(\"zip\", zip)\n setValue(\"lat\", lat)\n setValue(\"lon\", lon)\n setValue(\"display\", display)\n\n if (_this.callbacks && _this.callbacks.place_changed) {\n _this.callbacks.place_changed({ lat: lat, lon: lon, zip: zip })\n }\n }\n\n _this.addressInputHandler = function (e) {\n if (e.keyCode === 13 && _this.pageHasDropdown()) {\n e.stopPropagation()\n return e.preventDefault()\n }\n }\n }\n\n var initialize = function (options) {\n var addressCompletion = new AddressCompletion()\n addressCompletion.selectors = {\n display: \"#js-address\",\n unit: \"#js-address-unit\",\n streetName: \"#js-address-street-name\",\n streetNumber: \"#js-address-street-number\",\n zipPlus4: \"#js-address-zip-plus4\",\n city: \"#js-address-city\",\n state: \"#js-address-state\",\n zip: \"#js-address-zip\",\n lat: \"#js-address-lat\",\n lon: \"#js-address-lon\"\n }\n\n if (options && options.selectors) {\n addressCompletion.selectors = options.selectors\n }\n\n if (options && options.callbacks) {\n addressCompletion.callbacks = options.callbacks\n }\n\n if (addressCompletion.addressInputEl()) {\n addressCompletion.autocomplete = new google.maps.places.Autocomplete(addressCompletion.addressInputEl(), {\n types: [\"geocode\"],\n country: \"us\"\n })\n\n google.maps.event.addDomListener(addressCompletion.addressInputEl(), \"keydown\", addressCompletion.addressInputHandler)\n\n addressCompletion.autocomplete.addListener(\"place_changed\", addressCompletion.onPlaceChanged)\n addressCompletion.addressInputEl().addEventListener(\"input\", addressCompletion.blankFields)\n }\n\n var multiSelects = document.querySelectorAll(\".js-address-full\")\n if (multiSelects && multiSelects.length > 0) {\n multiSelects.forEach(function (el) {\n var completion = new AddressCompletion()\n completion.element = el\n completion.selectors = {\n display: \".js-address-full\"\n }\n\n if (options && options.selectors) {\n completion.selectors = options.selectors\n }\n\n if (options && options.callbacks) {\n completion.callbacks = options.callbacks\n }\n\n completion.autocomplete = new google.maps.places.Autocomplete(el, {\n types: [\"geocode\"],\n country: \"us\"\n })\n\n google.maps.event.addDomListener(el, \"keydown\", completion.addressInputHandler)\n\n completion.autocomplete.addListener(\"place_changed\", completion.setCanonicalAddress)\n el.addEventListener(\"input\", completion.blankFields)\n })\n }\n }\n\n return {\n initialize: initialize\n }\n})()\n","import { ModalComponent } from \"../modal/modal\"\nimport { DatePickerComponent } from \"../datepicker/datepicker\"\nimport Flasher from \"../../../utils/flasher\"\nimport { AutocompleteComponent } from \"../autocomplete/autocomplete\"\nimport { FormValidationComponent } from \"../validation/form-validation\"\nimport { ModalViewComponent } from \"../modal/modal-view-component\"\nimport type KinDialog from \"@kin/web-components/dist/internal/kin-dialog/kin-dialog\"\n\ninterface DecimalOptions {\n minDecimals: number\n maxDecimals: number\n}\n\n// TODO: Make this more specific to the things they're doing.\n// window.kin.utils.openModal(this, 'id of modal')\nexport function openModal(id: string, e?: HTMLElement) {\n const modal = document.getElementById(\"modal__\" + id) as ModalComponent | ModalViewComponent\n modal.open(e ? e : null)\n}\n\n// window.kin.utils.closeModal('id of modal')\nexport function closeModal(id: string) {\n const modal = document.getElementById(\"modal__\" + id) as ModalComponent | ModalViewComponent\n // Til LitElements are linked by a \"service\", this will do.\n modal.querySelectorAll(\"kin-autocomplete\").forEach((el: AutocompleteComponent) => {\n el.fillInputs()\n el.requestUpdate()\n })\n modal.close()\n}\n\nexport function showDialog(id: string) {\n const dialog = document.getElementById(id) as KinDialog\n dialog.show()\n}\n\nexport function hideDialog(id: string) {\n const dialog = document.getElementById(id) as KinDialog\n dialog.hide()\n}\n\nexport function handleSuccess() {\n Flasher.success(\"Success‼ 💯\")\n window.location.reload()\n}\n\nexport function handleAjax() {\n document.body.addEventListener(\"ajax:success\", function (e: any) {\n Flasher.success(\"Success‼ 💯\")\n setTimeout(() => {\n window.location.reload()\n }, 1000)\n })\n\n document.body.addEventListener(\"ajax:error\", function (e: any) {\n Flasher.error(e.error)\n })\n}\n\nexport function handleError(e: ErrorEvent) {\n Flasher.error(e.error)\n}\n\nexport function selection() {\n let reason = (document.querySelector('[data-valid=\"disable-select\"]')).value\n if (reason == \"other\") {\n ;(document.querySelector('[data-valid=\"disable-text')).setAttribute(\"required\", \"true\")\n } else {\n ;(document.querySelector('[data-valid=\"disable-text')).removeAttribute(\"required\")\n }\n}\n\nexport function toggleDatePicker(id: string) {\n const datepicker = document.getElementById(id) as DatePickerComponent\n datepicker.toggle()\n}\n\n// Need a better way of doing below.\nexport function autocompleteOnChange(id: string, callback: Function) {\n document.addEventListener(\"kin-autocomplete:change\", (e: CustomEvent) => {\n if (id === e.detail.id) {\n callback(e.detail)\n let autocomplete = document.querySelector(e.detail.id) as HTMLInputElement\n if (autocomplete !== null) {\n ;(autocomplete.closest(\"form\").querySelector(\"kin-form-validation\") as FormValidationComponent).triggerRefresh()\n }\n }\n })\n\n window.onbeforeunload = () => {\n document.removeEventListener(\"kin-autocomplete:change\", (e: CustomEvent) => {\n if (id === e.detail.id) {\n callback(e.detail)\n let autocomplete = document.querySelector(e.detail.id) as HTMLInputElement\n if (autocomplete !== null) {\n ;(autocomplete.closest(\"form\").querySelector(\"kin-form-validation\") as FormValidationComponent).triggerRefresh()\n }\n }\n })\n }\n}\n\nexport function refreshVisibleFields(selector?: string | HTMLElement) {\n let formValidation: FormValidationComponent\n if (typeof selector === \"string\") {\n let parent = selector ? document.querySelector(selector) : document.querySelector(\"body\")\n formValidation = parent.querySelector(\"kin-form-validation\")\n } else if (selector instanceof HTMLElement) {\n formValidation = selector.querySelector(\"kin-form-validation\")\n } else {\n formValidation = document.querySelector(\"kin-form-validation\")\n }\n\n formValidation.triggerRefresh()\n}\n\nexport function formatMoney(value: number, options: DecimalOptions = { minDecimals: 2, maxDecimals: 2 }) {\n return new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: \"USD\",\n minimumFractionDigits: options.minDecimals,\n maximumFractionDigits: options.minDecimals\n }).format(value)\n}\n\nexport function refreshField(id: string) {\n if (!id) {\n return\n }\n\n let formValidation: FormValidationComponent\n formValidation = document.getElementById(id).closest(\"form\").querySelector(\"kin-form-validation\")\n formValidation.triggerFieldRefresh(id)\n}\n\nexport function isObjEmpty(obj: unknown) {\n if (!obj) {\n return true\n } else if (typeof obj === \"object\") {\n return Object.keys(obj).length === 0\n }\n}\n\nexport function makeEditable(id): void {\n document.querySelectorAll(`.editable-${id}`).forEach(element => (element.disabled = false))\n document.querySelectorAll(`.edit-controller-${id}`).forEach(element => (element.style.display = \"none\"))\n document.querySelectorAll(`.save-controller-${id}`).forEach(element => (element.style.display = \"block\"))\n}\n","import { FormField } from \"../validators/utils\"\n\nconst ALLOWABLE_CHARACTERS = [\"/\", \"-\", \"(\", \")\", \" \", \"+\", \"$\", \",\"]\n\nexport function mask(f: FormField, selectionStart?: number, alpha?: boolean) {\n let field = f.field as HTMLInputElement\n let mask = f.field.dataset.mask.split(\"\")\n let separatingCharacter = []\n let maskIndicies = []\n\n let alphaReplace = /[^a-zA-Z0-9]/g\n let numericReplace = /[^0-9]/g\n\n mask.filter((m: string, i: number) => {\n if (ALLOWABLE_CHARACTERS.indexOf(m) !== -1) {\n maskIndicies.push(i)\n separatingCharacter.push(mask[i])\n }\n })\n\n if (field.value.length > 0) {\n field.value = field.value.replace(alpha ? alphaReplace : numericReplace, \"\")\n if (maskIndicies && field.value.length > 0) {\n maskIndicies.forEach((maskPosition: number, i: number) => {\n if (field.value.length > maskPosition) {\n field.value = [field.value.slice(0, maskPosition), separatingCharacter[i], field.value.slice(maskPosition)].join(\"\")\n }\n })\n }\n }\n\n if (selectionStart) {\n // Verify cursor stays in the position the user expects.\n field.selectionEnd = selectionStart\n }\n}\n","export function accountForUTC(date: Date, resetHours: boolean = false): Date {\n let dateString = date.toUTCString()\n let offset: number = date.getTimezoneOffset() / 60\n\n if (Number.isInteger(offset)) {\n let offsetString = offset < 10 && offset > 0 ? \"0\" + offset : offset\n dateString = dateString + (offset < 0 ? \"+\" : \"-\") + offsetString + \"00\"\n }\n\n let newDate = new Date(dateString)\n\n if (resetHours) {\n newDate.setHours(0)\n newDate.setMinutes(0)\n newDate.setSeconds(0)\n newDate.setMilliseconds(0)\n }\n\n return newDate\n}\n\nexport function getDifferenceInDays(date1: Date, date2: Date): number {\n const dayInSeconds = 1000 * 60 * 60 * 24\n\n let difference = Math.abs(date1.valueOf() - date2.valueOf())\n\n let differenceInDays = Math.round(difference / dayInSeconds)\n\n return differenceInDays\n}\n\nexport function getLastMonth(month: number, year: number): Date {\n let date = new Date(year, month, 14)\n\n if (month !== 0) {\n date.setMonth(month - 1)\n } else {\n date.setFullYear(year - 1)\n date.setMonth(11)\n }\n\n date.setDate(1)\n\n return date\n}\n\nexport function getNextMonth(month: number, year: number): Date {\n let date = new Date(year, month, 14)\n\n if (month !== 11) {\n date.setMonth(month + 1)\n date.setDate(1)\n } else {\n date.setFullYear(year + 1)\n date.setMonth(0)\n date.setDate(1)\n }\n\n return date\n}\n\nexport function calculateLastDayOfMonth(month: number, year: number): number {\n let date = new Date(year, month, 14)\n\n if (month !== 11) {\n date.setFullYear(year)\n date.setMonth(month + 1)\n } else {\n date.setFullYear(year + 1)\n date.setMonth(0)\n }\n\n date.setDate(0)\n\n return date.getDay()\n}\n\nexport function daysInMonth(month: number, year: number): number {\n // Since we're really dealing with UNIX timestamps,\n // let's set the date to the middle of the month to avoid\n // issues relating to \"February doesn't have 30 days!\" bugs.\n let date = new Date(year, month, 14)\n\n if (month !== 11) {\n date.setFullYear(year)\n date.setMonth(month + 1)\n } else {\n date.setFullYear(year + 1)\n date.setMonth(0)\n }\n\n date.setDate(0)\n\n return date.getDate()\n}\n\nexport function getFirstDayOfMonth(month: number, year: number): number {\n let date = new Date()\n date.setDate(1)\n date.setMonth(month)\n date.setFullYear(year)\n\n return date.getDay()\n}\n\n// This expects the following format: MM/DD/YYYY\nexport function checkDate(value: string | Date) {\n if (typeof value === \"string\") {\n let date = new Date(value)\n let temp = value.split(\"/\")\n let dateParts: number[] = []\n\n temp.forEach((part, i) => (dateParts[i] = Number.parseInt(part)))\n if (dateParts[0] !== 0) {\n dateParts[0] = dateParts[0] - 1\n }\n\n // Even though 198 AD happened, we don't care.\n if (date.getFullYear() < 1000) {\n return false\n }\n\n return date.getMonth() === dateParts[0] && date.getFullYear() === dateParts[2] && date.getDate() === dateParts[1]\n } else {\n return !isNaN(Number(value))\n }\n}\n\nexport function padMonth(value) {\n const expiration = \"00\" + value\n return expiration.slice(expiration.length - 2, expiration.length)\n}\n\nexport function parseDates(datesRaw: string[]): Date[] {\n return datesRaw.reduce((datesParsed: Date[], dateRaw: string): Date[] => {\n const date = new Date(dateRaw)\n if (date instanceof Date && !isNaN(date.getTime())) {\n datesParsed.push(date)\n }\n\n return datesParsed\n }, [])\n}\n\nexport function includesDate(haystack: Date[], needle: Date): boolean {\n for (let date of haystack) {\n if (needle.getTime() === date.getTime()) {\n return true\n }\n }\n\n return false\n}\n","export const CONSTANTS = {\n phonePattern: /^\\(?([2-9][0-9]{2})\\)?[-. ]?([2-9](?!11)[0-9]{2})[-. ]?([0-9]{4})$/,\n // Adapted from https://stackoverflow.com/a/1373724 but adds capital letters to the mix.\n emailPattern:\n /[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?/\n}\n","export type Category = string[]\nexport interface DataService {\n getYears(): string[]\n getMakes(year: string): string[]\n getModels(make: string): string[]\n}\nexport interface VehicleData {\n year: string\n make: string\n model: string\n}\n\n/**\n * Interface for filtering vehicle category data\n *\n * @param dataService - The data service to use for fetching vehicle data\n */\nexport class VehicleFormCharacteristicsService {\n dataService: DataService\n categories: Category[] = []\n\n constructor(dataService: DataService) {\n if (!dataService) {\n throw new Error(\"dataService is required\")\n }\n this.dataService = dataService\n }\n\n /**\n *\n * @returns - The years of the vehicles to fetch\n */\n fetchYears(): string[] {\n return this.dataService.getYears()\n }\n\n /**\n *\n * @param year - The year of the vehicles to fetch\n * @param model - The model of the vehicles to fetch\n * @returns - The makes for the given year and model\n */\n fetchMakes(year: string): string[] {\n return this.dataService.getMakes(year)\n }\n\n /**\n *\n * @param year - The year of the vehicles to fetch\n * @returns - The models for the given year\n */\n fetchModels(make: string): string[] {\n // Will eventuall call the data service to fetch the models\n // May need to be asychronous\n // Dependent on the interface for the data service it could look like:\n return this.dataService.getModels(make)\n }\n}\n","import { DataService, VehicleData } from \"./vehicle_form_characteristics.service\"\n\nexport class VehicleRiskDataService implements DataService {\n private data: VehicleData[] = []\n private yearList: VehicleData[] = []\n private makeList: VehicleData[] = []\n\n constructor(data: VehicleData[]) {\n this.initialize(data)\n }\n\n initialize(data: VehicleData[]): void {\n this.data = data\n }\n\n getYears(): string[] {\n const years = this.data.map(vehicle => vehicle.year)\n const uniqeYears: Array = Array.from(new Set(years))\n\n return uniqeYears\n }\n\n getMakes(year: string): string[] {\n this.yearList = this.data.filter(vehicle => vehicle.year === year)\n\n const makes = this.yearList.map(vehicle => vehicle.make)\n const uniqeMakes: Array = Array.from(new Set(makes))\n\n return uniqeMakes\n }\n\n getModels(make: string): string[] {\n this.makeList = this.yearList.filter(vehicle => vehicle.make === make)\n\n const models = this.makeList.map(vehicle => vehicle.model)\n const uniqeModels: Array = Array.from(new Set(models))\n\n return uniqeModels\n }\n}\n","import { Controller } from \"stimulus\"\nimport { VehicleData, VehicleFormCharacteristicsService } from \"../../services/vehicle_form_characteristics.service\"\nimport { VehicleRiskDataService } from \"../../services/vehicle_risk_data_service\"\n\nexport default class extends Controller {\n formTarget: HTMLFormElement\n formSubmitTarget: HTMLButtonElement\n\n dataService: VehicleFormCharacteristicsService\n\n formData: VehicleData[]\n\n year: string\n make: string\n model: string\n vin: string\n\n years: string[]\n makes: string[]\n models: string[]\n\n static targets: string[] = [\"form\", \"formSubmit\"]\n\n initialize(): void {\n this.formData = JSON.parse((this.element as HTMLElement).dataset[\"auto-CharacteristicsFormDataValue\"]!)\n }\n\n connect(): void {\n this.dataService = new VehicleFormCharacteristicsService(new VehicleRiskDataService(this.formData))\n if (this.dataService) {\n this.renderOptions(\"year\", this.dataService.fetchYears())\n }\n }\n\n onSubmit = (event: Event): void => {\n event.preventDefault()\n\n this.formTarget.submit()\n }\n\n /**\n * Renders the options for the select element with the given id.\n *\n * @param {string} id\n * @param {array} data\n */\n private renderOptions(id, data) {\n const select = document.querySelector(`#${id}`)\n if (!select) return\n\n // Clearing previous options so the function is idempotent\n select.innerHTML = \"\"\n\n // Adding back the default by category\n const defaultOption = document.createElement(\"option\")\n defaultOption.value = \"\"\n defaultOption.disabled = true\n defaultOption.selected = true\n defaultOption.text = `Select a ${id}`\n select.appendChild(defaultOption)\n\n data.forEach(item => {\n const option = document.createElement(\"option\")\n option.value = item\n option.text = item\n select.appendChild(option)\n })\n }\n\n /**\n * Updates the value of the property that corresponds to the input element\n *\n * @param {Event} event\n * @returns {void}\n */\n handleChange(event: Event): void {\n const target = event.target as HTMLInputElement | HTMLSelectElement\n const { name, value } = target\n this[name] = value\n\n switch (name) {\n case \"vehicles[][characteristics][year]\":\n this.year = value\n this.makes = this.dataService.fetchMakes(this.year)\n this.renderOptions(\"make\", this.makes)\n this.renderOptions(\"model\", [])\n break\n case \"vehicles[][characteristics][make]\":\n this.make = value\n this.models = this.dataService.fetchModels(this.make)\n this.renderOptions(\"model\", this.models)\n break\n case \"vehicles[][characteristics][model]\":\n break\n default:\n break\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport { openModal, closeModal } from \"../../components/shared/utils/utils\"\n\ninterface VehicleData {\n year: string\n make: string\n model: string\n vin: string\n}\n\nexport default class extends Controller {\n formTarget: HTMLFormElement\n formSubmitTarget: HTMLButtonElement\n vehiclesListTarget: HTMLElement\n\n static targets: string[] = [\"form\", \"formSubmit\", \"vehiclesList\"]\n\n connect(): void {\n this.setupModalToggleListeners()\n }\n\n addVehicle = (event: Event): void => {\n openModal(\"add-vehicle-form\")\n }\n\n onSubmit = (event: Event): void => {\n this.formTarget.submit()\n }\n\n // Handles disabling/enabling of form submit button when modals are opened and closed\n setupModalToggleListeners(): void {\n document.addEventListener(\"kin-modal:close\", e => {\n Rails.enableElement(this.formSubmitTarget)\n })\n\n document.addEventListener(\"kin-modal:open\", e => {\n Rails.disableElement(this.formSubmitTarget)\n })\n }\n\n /**\n * Adds a new vehicle to the list of vehicles using the input values\n * provided from the add-vehicle-form-modal-component.\n *\n * If the input values are invalid, it returns for now. In the future,\n * this will display a message to the user.\n */\n addNewVehicle(event: Event): void {\n const { year, make, model, vin } = event[\"detail\"] as VehicleData\n\n const newVehicle = {\n year: this.stripSpecialCharacters(year),\n make: this.stripSpecialCharacters(make),\n model: this.stripSpecialCharacters(model),\n vin: this.stripSpecialCharacters(vin)\n }\n\n this.vehiclesListTarget.appendChild(this.newVehicleFieldTemplate(newVehicle))\n\n closeModal(\"add-vehicle-form\")\n }\n\n /**\n * Creates a duplicate of the existing vehicle select boxes and populates\n * it with the new vehicle data.\n *\n * @param {VehicleData} vehicleData - The vehicle data.\n * @returns {HTMLLIElement} The new vehicle field template.\n */\n newVehicleFieldTemplate({ year, make, model, vin }: VehicleData): HTMLLIElement {\n const li = document.createElement(\"li\")\n const id = this.newVehicleId()\n const template = document.createElement(\"template\")\n\n template.innerHTML = `\n \n \n \n \n \n `\n\n li.appendChild(template.content.cloneNode(true))\n\n return li\n }\n\n // Generates a number 2 greater than the current number of vehicles in the list\n // @note The notes at the beginning of the vehicle list are included in the count; if this ever is moved\n // this method will still create an appropriate ID without needing to be updated.\n newVehicleId(): number {\n return this.vehiclesListTarget.querySelectorAll(\"li\").length + 1\n }\n\n // Capitalizes the first letter of a string\n capitalize(string: string): string {\n return string?.replace(/^./, string[0]?.toUpperCase())\n }\n\n /**\n * Strips special characters from strings to prevent XSS attacks.\n * @note This function is borrowed from OWASP's XSS Prevention Cheat Sheet.\n *\n * @param {string} string - The string to be processed.\n * @returns {string} The stripped string.\n */\n private stripSpecialCharacters(string: string): string {\n const reg = /[&<>\"'/]/gi\n\n return string.replace(reg, \"\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport { checkDate } from \"../../components/shared/validation/utilities/date\"\nimport { mask } from \"../../components/shared/validation/display/mask\"\n\n/**\n * This introduces recaptcha so the expected form submission flow is different. Callbacks run\n * in this specific order:\n *\n * - onSubmit\n * - onRecaptcha\n */\nexport default class extends Controller {\n static targets = [\"submit\", \"autocomplete\"]\n\n hasAddress = false\n\n connect() {\n // Expose a callback for Recaptcha to execute once it has finished it's things.\n window.__recaptchaHandler = this.onRecaptcha\n\n // Autocomplete is loaded from the marketing page JS. This widget will emit the resulting address that was autocompleted.\n this.autocompleteTarget.addEventListener(\"autocomplete\", this.onAddressAutocomplete)\n\n // Our current date picker assumes we're using the FormValidation logic, but that may not work correctly with our externally loaded autocomplete.\n this.listenToDatePicker()\n }\n\n // When a form is submitted, execute the reCaptcha call.\n onSubmit = event => {\n grecaptcha.execute()\n event.preventDefault()\n }\n\n // When recaptcha completes, submit the actual form.\n onRecaptcha = token => {\n this.setHidden(\"recaptcha\", token)\n this.element.submit()\n }\n\n // Rerun validations on every change.\n onChange = () => {\n this.submitTarget.disabled = !this.isValid\n }\n\n // Handler for when the Autocomplete emits.\n onAddressAutocomplete = ({ detail: { display, street, city, state, zip, lat, lon } }) => {\n this.hasAddress = !!display\n\n this.setHidden(\"display\", display)\n this.setHidden(\"street_name\", street)\n this.setHidden(\"city\", city)\n this.setHidden(\"state\", state)\n this.setHidden(\"zipcode\", zip)\n this.setHidden(\"google_lon\", lon)\n this.setHidden(\"google_lat\", lat)\n\n this.onChange()\n }\n\n setHidden(name, value) {\n findOrCreateNode(name, this.element).value = value\n }\n\n listenToDatePicker = () => {\n if (!this.dateOfLossTarget) {\n setTimeout(this.listenToDatePicker, 100)\n return\n }\n\n this.dateOfLossTarget.addEventListener(\"input\", () => {\n let field = { field: this.dateOfLossTarget, valid: null } // Mock interface FormField to use mask()\n mask(field)\n this.onChange()\n })\n document.addEventListener(\"kin-date-input:change\", this.onChange)\n document.addEventListener(\"kin-datepicker:change\", this.onChange)\n }\n\n get isValid() {\n return this.hasAddress && this.dateOfLoss.length === 10 && checkDate(this.dateOfLoss)\n }\n\n get dateOfLoss() {\n return this.dateOfLossTarget.value\n }\n\n get dateOfLossTarget() {\n return document.querySelector(\"kin-date-input-mask input\")\n }\n}\n\nconst inputNameFor = name => {\n if (name === \"recaptcha\") {\n return \"recaptcha\"\n } else {\n return `fields[address__${name}]`\n }\n}\n\nconst findOrCreateNode = (name, parent) => findNode(name) || createNode(name, parent)\n\nconst findNode = name => document.querySelector(`input[name=\"${inputNameFor(name)}\"]`)\n\nconst createNode = (name, parent) => {\n const node = document.createElement(\"input\")\n\n node.type = \"hidden\"\n node.name = inputNameFor(name)\n\n parent.appendChild(node)\n\n return node\n}\n","export class AnimationHelper {\n private static runningTimeouts: number[] = []\n\n static clearPending() {\n this.runningTimeouts.forEach(id => {\n window.clearTimeout(id)\n })\n this.runningTimeouts = []\n }\n\n static waitForAnimation(funcRef: Function, duration?: number, args?: any[]) {\n const id = window.setTimeout(funcRef, duration ?? 300, args)\n this.runningTimeouts.push(id)\n }\n}\n","import { Controller } from \"stimulus\"\nimport { AnimationHelper } from \"../../utils/animation_helper\"\n\n/**\n * This controller handles animating the full page navigation drawer open and closed on mobile views\n *\n */\nexport default class extends Controller {\n static targets = [\"drawer\", \"toggle\"]\n\n onKeydown(e) {\n if ((e.keyCode === 27 || e.code === \"Escape\") && this.drawerTarget.classList.contains(\"fs-drawer__active\")) {\n this.onToggleClick()\n this.toggleTarget.focus()\n }\n }\n\n onToggleClick() {\n AnimationHelper.clearPending()\n if (this.drawerTarget.classList.contains(\"fs-drawer__active\")) {\n document.body.classList.remove(\"body--scroll-lock\")\n } else {\n AnimationHelper.waitForAnimation(() => {\n document.body.classList.add(\"body--scroll-lock\")\n })\n }\n this.toggleDrawer(this.drawerTarget)\n }\n\n toggleDrawer(element) {\n if (element) {\n if (element.classList.contains(\"fs-drawer__active\")) {\n element.classList.remove(\"fs-drawer__active\")\n // wait to toggle visiblity so animation can complete\n AnimationHelper.waitForAnimation(() => {\n element.classList.remove(\"fs-drawer__visible\")\n })\n } else {\n element.classList.add(\"fs-drawer__active\", \"fs-drawer__visible\")\n }\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport { FormValidationComponent } from \"../components/shared/validation/form-validation\"\nimport { FormError } from \"../components/shared/validation/validators/utils\"\n\nexport default class extends Controller {\n static targets = [\"validationError\", \"date\"]\n\n readonly dateTarget!: HTMLSelectElement\n readonly validationErrorTarget!: HTMLSelectElement\n\n validateDueDatetime(e) {\n const dueDatetime = new Date(this.dateTarget.value)\n const currentDate = new Date()\n if (dueDatetime < currentDate) {\n this.showErrors(true, e.target)\n } else {\n this.showErrors(false, e.target)\n }\n }\n\n showErrors(error: boolean, target: HTMLSelectElement) {\n let formValidationElement = target.form.querySelector(\"kin-form-validation\") as FormValidationComponent\n\n if (error) {\n let formError: FormError = { type: \"DateTimeError\", message: \"Please select a date / time in the future.\" }\n formValidationElement.throwError(target.id, formError, \".datetime\")\n } else {\n ;[this.dateTarget].forEach(target => {\n formValidationElement.clearError(target.id, \".datetime\")\n })\n formValidationElement.triggerRefresh()\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static values = { id: String }\n\n static targets: string[] = [\"hidable\", \"rotatable\"]\n hidableTargets: HTMLElement[]\n rotatableTargets: HTMLElement[]\n hidableTarget: HTMLElement\n rotatableTarget: HTMLElement\n\n toggle(event) {\n let element = event.currentTarget\n let elementId = element.dataset.idValue\n this.hidableTargets.find(target => target.dataset.idValue === elementId).classList.toggle(\"hidden\")\n this.rotatableTargets.find(target => target.dataset.idValue === elementId).classList.toggle(\"rotate\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"entryForm\", \"submit\"]\n\n connect() {\n if (this.hasEntryFormTarget) {\n this.entryFormTarget.addEventListener(\"kin-form-validation:change\", e => {\n this.appendLedgerEntry(e.detail.field)\n })\n }\n }\n\n appendLedgerEntry(e) {\n const button = e.srcElement.closest(\"button\")\n const newEntry = button.nextElementSibling.cloneNode(true)\n button.parentElement.appendChild(newEntry)\n }\n}\n","import { Controller } from \"stimulus\"\nimport Flasher from \"../../utils/flasher\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"addContactModal\",\n \"associateContactModal\",\n \"associateExistingContactForm\",\n \"existingContactId\",\n \"existingContactType\",\n \"existingDob\",\n \"existingName\",\n \"existingPhone\"\n ]\n\n handleSuccessfulAddition(event) {\n window.location.reload()\n }\n\n handleUpdateError(e) {\n let message = e.detail[0].error\n Flasher.error(message || \"Error\")\n }\n\n handleError(event) {\n let error = event.detail[0]\n let existingUser = error.existing_users[0]\n\n if (existingUser) {\n this.updateAssociateContactModal(existingUser)\n this.showAssociateContactModal()\n } else {\n Flasher.error(error.errors)\n }\n }\n\n showAddContactModal() {\n utils.openModal(\"add-co-applicant\")\n }\n\n hideAddContactModal() {\n utils.closeModal(\"add-co-applicant\")\n }\n\n updateAssociateContactModal(user) {\n this.existingNameTarget.innerHTML = user.name\n this.existingDobTarget.innerHTML = user.dob\n this.existingPhoneTarget.innerHTML = user.phone\n this.existingContactIdTarget.value = user.person_id\n this.existingContactTypeTarget.value = \"Person\" // TODO: update with actual type?\n }\n\n showAssociateContactModal() {\n utils.openModal(\"existing-contact\")\n }\n\n hideAssociateContactModal() {\n utils.closeModal(\"existing-contact\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"subFormType\", \"subForms\"]\n\n connect() {\n this.selectSubForm()\n }\n\n selectSubForm() {\n var controller = this\n var subFormType = this.subFormTypeTarget.value\n var forms = this.subFormsTarget\n forms.querySelectorAll(\"fieldset\").forEach(function (fieldset) {\n if (fieldset.getAttribute(\"data-subform\") == subFormType) {\n fieldset.classList.remove(\"hidden\")\n controller.toggleSubFormPresence(fieldset, true)\n } else {\n fieldset.classList.add(\"hidden\")\n controller.toggleSubFormPresence(fieldset, false)\n }\n })\n }\n\n toggleSubFormPresence(form, visible) {\n form.disabled = !visible\n form.querySelectorAll(\"input\").forEach(function (node) {\n node.disabled = !visible\n })\n setTimeout(() => refreshVisibleFields(form.closest(\"form\")))\n }\n}\n","import { Controller } from \"stimulus\"\nimport \"../../components/shared/addressCompletion\"\nconst AddressCompletion = window.app.kinAddressCompletion\n\nexport default class extends Controller {\n initialize() {\n AddressCompletion.initialize()\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n connect() {\n if (window.location.hash) {\n let anchor = document.querySelector(window.location.hash)\n anchor.classList.add(\"scroll-outline\")\n anchor.scrollIntoView({ behavior: \"smooth\", block: \"start\" })\n setTimeout(() => anchor.classList.remove(\"scroll-outline\"), 1500)\n }\n }\n\n follow(event) {\n event.preventDefault()\n let anchor = event.target.getAttribute(\"href\")\n document.querySelector(anchor).classList.add(\"scroll-outline\")\n document.querySelector(anchor).scrollIntoView({ behavior: \"smooth\", block: \"start\" })\n setTimeout(() => document.querySelector(anchor).classList.remove(\"scroll-outline\"), 1500)\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n readonly animalBreedTarget: HTMLInputElement\n readonly dangerousDogTarget: HTMLInputElement\n readonly submitTarget: HTMLButtonElement\n readonly animalTier1Target: HTMLInputElement\n readonly animalTypeTarget: HTMLInputElement\n\n static targets: string[] = [\n \"form\",\n \"animalType\",\n \"animalTier1\",\n \"animalBreed\",\n \"animalLiabilityAmount\",\n \"animalBreedKnownOptions\",\n \"dangerousDog\",\n \"submit\"\n ]\n\n animalTypeSelection() {\n if (this.isDog()) {\n this.animalBreedTarget.classList.remove(\"hidden\")\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n } else {\n this.animalBreedTarget.classList.add(\"hidden\")\n this.animalTier1Target.checked = true\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n }\n }\n\n dangerousDogSelection(e: Event) {\n if ((e.target as HTMLInputElement).value != \"0\") {\n this.dangerousDogTarget.classList.remove(\"hidden\")\n ;(document.querySelector(\"#bright_coverage_dangerous_dog_false\") as HTMLInputElement).required = true\n ;(document.querySelector(\"#bright_coverage_dangerous_dog_true\") as HTMLInputElement).required = true\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n } else {\n this.dangerousDogTarget.classList.add(\"hidden\")\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n }\n }\n\n isDog() {\n return this.animalTypeTarget.value === \"dog\"\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"toggle\", \"input\"]\n\n connect() {\n if (this.hasToggleTarget || this.hasInputTarget) {\n this.toggleMailingAddress()\n }\n }\n\n toggleMailingAddress() {\n if (this.hasInputTarget) {\n if (this.hasToggleTarget && this.toggleTarget.checked) {\n this.inputTarget.querySelectorAll(\"input\").forEach(function (node) {\n node.disabled = false\n })\n this.inputTarget.querySelector('[data-js-toggle=\"property-address\"]').required = true\n this.inputTarget.classList.remove(\"hidden\")\n setTimeout(() => refreshVisibleFields(this.inputTarget.closest(\"form\")))\n } else {\n this.inputTarget.querySelectorAll(\"input\").forEach(function (node) {\n node.disabled = true\n })\n this.inputTarget.querySelector('[data-js-toggle=\"property-address\"]').required = false\n this.inputTarget.classList.add(\"hidden\")\n setTimeout(() => refreshVisibleFields(this.inputTarget.closest(\"form\")))\n }\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport Flasher from \"../../utils/flasher\"\nimport Rails from \"rails-ujs\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"coApplicantFieldset\",\n \"coapplicantContactFieldset\",\n \"coapplicantEmailCollisionDetails\",\n \"contactId\",\n \"emailCollisionModal\",\n \"emailField\",\n \"existingCoapplicantContactId\",\n \"existingCoapplicantContactType\",\n \"existingPrimaryContactId\",\n \"existingPrimaryContactType\",\n \"form\",\n \"primaryApplicantFieldset\",\n \"primaryContactFieldset\",\n \"primaryEmailCollisionDetails\",\n \"toggle\"\n ]\n\n connect() {\n this.toggleCoApplicantInput(true)\n\n if (this.hasPrimaryContactFieldsetTarget) {\n var disabled = this.primaryContactFieldsetTarget.disabled\n this.primaryContactFieldsetTarget.querySelectorAll(\"input\").forEach(function (node) {\n node.disabled = disabled\n })\n setTimeout(() => utils.refreshVisibleFields(this.primaryContactFieldsetTarget.closest(\"form\")))\n }\n }\n\n toggleCoApplicantInput(shouldDisable) {\n this.coApplicantFieldsetTarget.querySelectorAll(\"input\").forEach(function (node) {\n node.disabled = shouldDisable\n })\n setTimeout(() => utils.refreshVisibleFields(this.coApplicantFieldsetTarget.closest(\"form\")))\n }\n\n toggleCoApplicant() {\n if (this.toggleTarget.checked) {\n this.toggleCoApplicantInput(false)\n this.coApplicantFieldsetTarget.querySelectorAll(\"input, select, textarea\").forEach(node => {\n node.disabled = false\n })\n this.coApplicantFieldsetTarget.classList.remove(\"hidden\")\n setTimeout(() => utils.refreshVisibleFields(this.coApplicantFieldsetTarget.closest(\"form\")))\n } else {\n this.toggleCoApplicantInput(true)\n this.coApplicantFieldsetTarget.querySelectorAll(\"input, select, textarea\").forEach(node => {\n node.disabled = true\n })\n this.coApplicantFieldsetTarget.classList.add(\"hidden\")\n setTimeout(() => utils.refreshVisibleFields(this.coApplicantFieldsetTarget.closest(\"form\")))\n }\n }\n\n toggleFieldSet(disabled) {\n this.coApplicantFieldsetTarget.disabled = disabled\n this.coApplicantFieldsetTarget.querySelectorAll(\"input\").forEach(function (node) {\n node.disabled = disabled\n })\n setTimeout(() => utils.refreshVisibleFields(this.coApplicantFieldsetTarget.closest(\"form\")))\n }\n\n handleSuccess(e) {\n window.location = e.detail[0].redirect\n }\n\n handleFailure(e) {\n var errors = e.detail[0].errors\n this.existingUsers = e.detail[0].existing_users\n\n if (this.existingUsers && this.existingUsers.length > 0) {\n this.showEmailCollisionModal()\n } else {\n Flasher.error(e.detail[0].errors)\n }\n }\n\n // updates the DOM with the person ID to be submitted\n updateEmailCollisionModal() {\n let emails = this.existingUsers.map(user => user.email)\n let bodyCopy = \"\"\n this.updatePrimary = false\n this.updateCoapplicant = false\n let conflictedUser = this.existingUsers[0]\n let secondConflictedUser = this.existingUsers[1]\n\n if (emails.length > 1) {\n this.updatePrimary = true\n this.updateCoapplicant = true\n\n bodyCopy = `Both emails ${emails[0]} and ${emails[1]} already exist in our system. Would you like to add both applicants to the policy?\"`\n } else {\n var match = this.emailFieldTargets.find(target => target.value == conflictedUser.email)\n\n if (match.dataset.coapplicant == \"true\") {\n this.updateCoapplicant = true\n } else {\n this.updatePrimary = true\n }\n\n bodyCopy =\n \"A customer with the email \" +\n conflictedUser.email +\n \" already exists in our system. Would you like \" +\n \"to add the following applicant to the policy?\"\n }\n\n this.primaryEmailCollisionDetailsTarget.querySelector(\"p\").innerText = bodyCopy\n this.primaryEmailCollisionDetailsTarget.querySelector(\"ul li.name\").innerText = conflictedUser.name\n this.primaryEmailCollisionDetailsTarget.querySelector(\"ul li.birthday\").innerText = \"Birthday: \" + conflictedUser.dob\n this.primaryEmailCollisionDetailsTarget.querySelector(\"ul li.phone\").innerText = \"Phone: \" + conflictedUser.phone\n\n if (secondConflictedUser) {\n this.coapplicantEmailCollisionDetailsTarget.querySelector(\"ul li.name\").innerText = secondConflictedUser.name\n this.coapplicantEmailCollisionDetailsTarget.querySelector(\"ul li.birthday\").innerText = \"Birthday: \" + secondConflictedUser.dob\n this.coapplicantEmailCollisionDetailsTarget.querySelector(\"ul li.phone\").innerText = \"Phone: \" + secondConflictedUser.phone\n }\n }\n\n showEmailCollisionModal() {\n this.updateEmailCollisionModal()\n utils.openModal(\"email-collision\")\n }\n\n hideEmailCollisionModal() {\n utils.closeModal(\"email-collision\")\n }\n\n addExistingPeopleToPolicy() {\n if (this.existingUsers.length == 2) {\n let primary = this.existingUsers[0]\n let coapplicant = this.existingUsers[1]\n\n this.existingPrimaryContactIdTarget.value = primary.person_id\n this.existingPrimaryContactTypeTarget.value = \"Person\"\n this.primaryContactFieldsetTarget.disabled = true\n\n this.existingCoapplicantContactIdTarget.value = coapplicant.person_id\n this.existingCoapplicantContactType = \"Person\"\n this.coapplicantContactFieldsetTarget.disabled = true\n setTimeout(() => utils.refreshVisibleFields(this.existingPrimaryContactIdTarget.closest(\"form\")))\n } else {\n let user = this.existingUsers[0]\n\n if (this.updatePrimary) {\n this.existingPrimaryContactIdTarget.value = user.person_id\n this.existingPrimaryContactTypeTarget.value = \"Person\"\n this.primaryContactFieldsetTarget.disabled = true\n }\n\n if (this.updateCoapplicant) {\n this.existingCoapplicantContactIdTarget.value = user.person_id\n this.existingCoapplicantContactTypeTarget.value = \"Person\"\n this.coapplicantContactFieldsetTarget.disabled = true\n }\n }\n setTimeout(() => utils.refreshVisibleFields(this.existingPrimaryContactIdTarget.closest(\"form\")))\n\n this.formTarget.submit()\n }\n}\n","import { Controller } from \"stimulus\"\nimport Flasher from \"../../utils/flasher\"\n\nexport default class extends Controller {\n static targets = [\n \"changeset\",\n \"modalChangeset\",\n \"form\",\n \"inputRows\",\n \"attributes\",\n \"submitButton\",\n \"effectiveDate\",\n \"modalEffectiveDate\",\n \"urlValue\",\n \"currentRating\"\n ]\n\n rowNumber = 0\n state = {}\n filingInputs = {}\n currentRating = {}\n\n attributesTarget: HTMLInputElement\n changesetTarget: HTMLInputElement\n protected modalChangesetTarget: HTMLInputElement\n inputRowsTarget: any\n formTarget: HTMLFormElement\n effectiveDateTarget: HTMLInputElement\n modalEffectiveDateTarget: HTMLInputElement\n submitButtonTarget: HTMLElement\n urlValueTarget: HTMLElement\n\n connect(): void {\n this.addRow()\n }\n\n updateState(row, category, attribute, value): void {\n let newState = { [row]: { category: category, attribute: attribute, value: value } }\n this.state = Object.assign(this.state, newState)\n }\n\n // returns { category: category, attribute: attribute, value: value }\n getRowFromState(rowNumber): Object {\n return this.state[`row${rowNumber}`]\n }\n\n dataSet(): JSON {\n return JSON.parse(this.attributesTarget.getAttribute(\"data-value\"))\n }\n\n categoryOptions(): String[] {\n let categories = Object.keys(this.dataSet())\n\n categories.unshift(\"\") // This is to add a blank option at the top\n\n return categories.map(category => {\n return ``\n })\n }\n\n attributeOptions(category): any[] {\n if (!!category === false) {\n return []\n }\n\n let attributes = this.dataSet()[category]\n attributes.unshift(\"\") // This is to add a blank option at the top\n\n return attributes.map(attribute => {\n return ``\n })\n }\n\n // After selecting a category, this function sets the category-specific attributes\n // to the select field.\n setAttributeOptions(rowNumber, category, isDisabled): void {\n let attributesField = this.inputRowsTarget.querySelector(`#bright_policy_attribute${rowNumber}`)\n\n attributesField.innerHTML = this.attributeOptions(category)\n attributesField.disabled = isDisabled\n }\n\n valueOptionsForCategoryType(filingAttribute): any[] {\n let currentRating = this.urlValueTarget.dataset.currentRating\n let ratingInputs = JSON.parse(currentRating)[\"input\"]\n\n if (filingAttribute.restricted_values && typeof filingAttribute.restricted_values[0].input.key != \"undefined\") {\n let index = filingAttribute.restricted_values.findIndex(ele => ele.input.value === ratingInputs[ele.input.key])\n return filingAttribute.restricted_values[index].config.values\n } else {\n return filingAttribute.values\n }\n }\n\n valueOptions(attribute, rowNumber): any[] {\n if (!!attribute === false) {\n return []\n }\n\n let filingAttribute = this.filingInputs[attribute]\n let filingType = filingAttribute.type\n let values: any[]\n\n if (filingType === \"category\") {\n values = this.valueOptionsForCategoryType(filingAttribute)\n } else if (filingType === \"boolean\") {\n values = [true, false]\n }\n\n values.unshift(\"\") // This is to add a blank option at the top\n\n return values.map(value => {\n return ``\n })\n }\n\n setValueField(rowNumber, attribute, isDisabled): void {\n let valueField = this.inputRowsTarget.querySelector(`#bright_policy_value${rowNumber}`)\n let currentFiling = this.urlValueTarget.dataset.currentFiling\n\n this.filingInputs = JSON.parse(currentFiling)\n let filingAttribute = this.filingInputs[attribute]\n let filingType = this.filingInputs[attribute]?.type\n let inputNode: any\n\n if (filingType === \"category\" || filingType === \"boolean\") {\n inputNode = this.createSelectNode(rowNumber, attribute, isDisabled)\n } else if (filingType === \"range\") {\n inputNode = this.createRangeInputNode(rowNumber, filingAttribute, isDisabled)\n } else if (filingType === \"date\") {\n inputNode = this.createDateInputNode(rowNumber, filingAttribute, isDisabled)\n } else {\n inputNode = this.createInputNode(rowNumber, isDisabled)\n }\n\n valueField.replaceWith(inputNode)\n valueField.disabled = isDisabled\n valueField.value = \"\"\n }\n\n createSelectNode(rowNumber, attribute, isDisabled) {\n let newNode = document.createElement(\"select\")\n this.addValueEventListener(newNode, rowNumber)\n\n newNode.id = `bright_policy_value${rowNumber}`\n newNode.className = \"input-textbox--select\"\n newNode.required = true\n newNode.disabled = isDisabled\n newNode.innerHTML = \"\"\n\n return newNode\n }\n\n createInputNode(rowNumber, isDisabled) {\n let newNode: HTMLInputElement = document.createElement(\"input\")\n this.addValueEventListener(newNode, rowNumber)\n\n newNode.id = `bright_policy_value${rowNumber}`\n newNode.className = \"input-textbox--input\"\n newNode.required = true\n newNode.disabled = isDisabled\n newNode.placeholder = \"Place Correct Value Here\"\n\n return newNode\n }\n\n createRangeInputNode(rowNumber, filingAttribute, isDisabled) {\n let inputNode = this.createInputNode(rowNumber, isDisabled)\n\n inputNode.step = \"any\"\n inputNode.max = filingAttribute.maximum\n inputNode.min = filingAttribute.minimum\n inputNode.type = \"number\"\n\n return inputNode\n }\n\n createDateInputNode(rowNumber, filingAttribute, isDisabled) {\n let inputNode: HTMLInputElement = this.createInputNode(rowNumber, isDisabled)\n\n inputNode.type = \"date\"\n inputNode.max = filingAttribute.maximum\n inputNode.min = filingAttribute.minimum\n\n return inputNode\n }\n\n selectCategory(rowNumber): void {\n this.inputRowsTarget.querySelector(`#bright_policy_category${rowNumber}`).addEventListener(\"change\", e => {\n let category = e.target.value\n this.updateState(`row${rowNumber}`, category, \"\", \"\")\n\n if (category === \"\") {\n this.setAttributeOptions(rowNumber, category, true)\n } else {\n this.setAttributeOptions(rowNumber, category, false)\n }\n\n this.setValueField(rowNumber, \"\", true)\n })\n }\n\n getCategory(rowNumber): string {\n return this.getRowFromState(rowNumber)[\"category\"]\n }\n\n getAttribute(rowNumber): string {\n return this.getRowFromState(rowNumber)[\"attribute\"]\n }\n\n selectAttribute(rowNumber): void {\n this.inputRowsTarget.querySelector(`#bright_policy_attribute${rowNumber}`).addEventListener(\"change\", e => {\n let attribute = e.target.value\n let category: string = this.getCategory(rowNumber)\n\n this.updateState(`row${rowNumber}`, category, attribute, \"\")\n\n if (attribute === \"\") {\n this.setValueField(rowNumber, attribute, true)\n } else {\n this.setValueField(rowNumber, attribute, false)\n }\n })\n }\n\n inputAttributeValue(rowNumber): void {\n let node = this.inputRowsTarget.querySelector(`#bright_policy_value${rowNumber}`)\n this.addValueEventListener(node, rowNumber)\n }\n\n addValueEventListener(node, rowNumber): void {\n node.addEventListener(\"input\", e => {\n let text_value = e.target.value\n let category = this.getCategory(rowNumber)\n let attribute = this.getAttribute(rowNumber)\n\n this.updateState(`row${rowNumber}`, category, attribute, text_value)\n })\n }\n\n changesetParser(): string {\n let stateData = this.state\n let newObject = {\n coverage: {},\n property: {},\n policy: {}\n }\n\n Object.values(stateData).forEach(row => {\n let rowData = this.addRowData(newObject, row)\n Object.assign(newObject, rowData)\n })\n\n Object.keys(newObject).forEach(category => {\n if (Object.values(newObject[category]).length === 0) {\n delete newObject[category]\n }\n })\n\n return JSON.stringify(newObject)\n }\n\n onModalOpen(): boolean {\n this.modalChangesetTarget.innerHTML = \"\"\n\n this.changesetTarget.value = this.changesetParser()\n\n Object.values(JSON.parse(this.changesetTarget.value)).forEach(item => {\n Object.entries(item).forEach(([key, value]) => {\n let changes = `
  • Changes ${key} to ${value}
  • `\n this.modalChangesetTarget.insertAdjacentHTML(\"beforeend\", changes)\n })\n })\n\n this.modalEffectiveDateTarget.innerHTML = this.effectiveDateTarget.value\n\n return true\n }\n\n spinner(): string {\n return ``\n }\n\n disableSubmitButton(): void {\n setTimeout(() => {\n ;(this.submitButtonTarget as HTMLButtonElement).disabled = true\n }, 10)\n }\n\n showSpinner(): void {\n this.disableSubmitButton()\n this.modalChangesetTarget.innerHTML = this.spinner()\n }\n\n hideSpinner(): void {\n ;(this.submitButtonTarget as HTMLButtonElement).disabled = false\n this.onModalOpen()\n }\n\n onSubmit() {\n const url: string = this.urlValueTarget.dataset.urlValue\n\n this.showSpinner()\n\n setTimeout(() => {\n this.hideSpinner()\n Flasher.error(\"Backdate Endorsement Tool has Timed-out\")\n }, 20000)\n\n fetch(url, {\n method: \"POST\",\n headers: {\n Accept: \"text/html\",\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n changeset_params: this.changesetParser(),\n effective_date: this.effectiveDateTarget.value\n })\n })\n .then(res => {\n if (!res.ok) {\n this.hideSpinner()\n Flasher.error(\"Unable to Backdate Endorsement\")\n throw new Error(res.statusText)\n }\n return res.text()\n })\n .catch(error => {\n this.hideSpinner()\n alert(\"An error has occurred: \" + error)\n })\n }\n\n addRowData(newObject, row): void {\n Object.assign(newObject[row.category], { [row.attribute]: row.value })\n }\n\n addRow(): void {\n let inputRow = document.createRange().createContextualFragment(this.inputRow(this.rowNumber))\n\n this.inputRowsTarget.appendChild(inputRow)\n this.selectCategory(this.rowNumber)\n this.selectAttribute(this.rowNumber)\n this.inputAttributeValue(this.rowNumber)\n this.removeRow(this.rowNumber)\n this.rowNumber++\n }\n\n removeRow(rowNumber): void {\n this.inputRowsTarget.querySelector(`#bright_policy_delete_button${rowNumber}`).addEventListener(\"click\", e => {\n e.preventDefault()\n\n let rowToRemove = this.inputRowsTarget.querySelector(`#backdate-endorsement-row${rowNumber}`)\n\n delete this.state[`row${rowNumber}`]\n\n this.inputRowsTarget.removeChild(rowToRemove)\n })\n }\n\n inputRow(rowNumber): string {\n return `\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n `\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport Flasher from \"../../utils/flasher\"\n\nexport default class extends Controller {\n static targets = [\"creditCardForm\", \"form\", \"savedCreditCard\", \"writeOffReason\", \"writeOffReasonGroup\", \"reason\"]\n\n submitForm = () => {\n Rails.fire(this.formTarget, \"submit\")\n }\n\n handleSuccess(e) {\n if (e.detail[0].has_saved_credit_card && e.detail[0].payment_type_card) {\n this.savedCreditCardTarget.classList.remove(\"hidden\")\n } else if (e.detail[0].payment_type_card) {\n this.creditCardFormTarget.classList.remove(\"hidden\")\n } else {\n if (this.hasSavedCreditCardTarget) {\n this.savedCreditCardTarget.classList.add(\"hidden\")\n }\n\n this.creditCardFormTarget.classList.add(\"hidden\")\n }\n Flasher.success(\"Payment information has been updated and window will auto refresh\")\n setTimeout(() => {\n window.location.reload()\n }, 1500)\n }\n\n handleError(e) {\n let message = e.detail[0].error\n Flasher.error(message || \"Error\")\n }\n\n connect() {\n this.toggleGroups()\n }\n\n toggleGroups() {\n const writeOffReason = this.writeOffReasonTarget.value\n if (writeOffReason == \"Other\") {\n this.showReasonGroup()\n } else {\n this.hideReasonGroup()\n }\n }\n\n hideReasonGroup() {\n this.reasonTarget.value = \"\"\n this.writeOffReasonGroupTarget.classList.add(\"hidden\")\n this.reasonTarget.required = false\n }\n\n showReasonGroup() {\n this.writeOffReasonGroupTarget.classList.remove(\"hidden\")\n this.reasonTarget.required = true\n }\n}\n","import { Controller } from \"stimulus\"\nimport Flasher from \"../../utils/flasher\"\n\nexport default class extends Controller {\n static targets = [\n \"ratingOneSelectField\",\n \"ratingTwoSelectField\",\n \"hashDiffDisplay\",\n \"ratingOneDisplay\",\n \"ratingTwoDisplay\",\n \"ratingInputButton\",\n \"ratingOutputButton\"\n ]\n\n readonly ratingOneSelectFieldTarget: HTMLInputElement\n readonly ratingTwoSelectFieldTarget: HTMLInputElement\n readonly hashDiffDisplayTarget: HTMLElement\n readonly ratingOneDisplayTarget: HTMLElement\n readonly ratingTwoDisplayTarget: HTMLElement\n readonly ratingInputButtonTarget: HTMLInputElement\n readonly ratingOutputButtonTarget: HTMLInputElement\n\n urlValue(): string {\n return this.data.get(\"urlValue\")\n }\n\n spinner(): string {\n return ``\n }\n\n // Matching anything in item[1] that starts with \"claims[x]\"\n // or anything in item[2] or item[3] that is an object\n shouldStringify(item: any[]): boolean {\n return (\n new RegExp(/^claims[\\d\\D]*/).test(item[1]) ||\n (item[2] !== null && typeof item[2] === \"object\") ||\n (item[3] !== null && typeof item[3] === \"object\")\n )\n }\n\n onCompare(displayType: string): void {\n fetch(this.urlValue(), {\n method: \"POST\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n rating_one: this.ratingOneSelectFieldTarget.value,\n rating_two: this.ratingTwoSelectFieldTarget.value,\n display_type: displayType\n })\n })\n .then(response => {\n if (!response.ok) {\n this.handleError()\n throw new Error(response.statusText)\n }\n return response.json()\n })\n .then(response => {\n if (response.length != 0) {\n this.handleSuccess(response)\n } else {\n this.handleNoChange()\n }\n })\n }\n\n ratingInputButtonClick(): void {\n this.ratingInputButtonTarget.innerHTML = this.spinner()\n this.ratingInputButtonTarget.disabled = true\n let displayType = \"rating_input_display\"\n this.onCompare(displayType)\n setTimeout(() => {\n this.ratingInputButtonTarget.disabled = false\n this.ratingInputButtonTarget.innerHTML = \"Rating Input\"\n }, 900)\n }\n\n ratingOutputButtonClick(): void {\n this.ratingOutputButtonTarget.innerHTML = this.spinner()\n this.ratingOutputButtonTarget.disabled = true\n let displayType = \"rating_output_display\"\n this.onCompare(displayType)\n setTimeout(() => {\n this.ratingOutputButtonTarget.disabled = false\n this.ratingOutputButtonTarget.innerHTML = \"Rating Output\"\n }, 900)\n }\n\n handleSuccess(response): void {\n Flasher.success(\"Ratings have been compared.\")\n this.displayRating(response)\n }\n\n handleNoChange(): void {\n setTimeout(() => {}, 2000)\n Flasher.info(\"The two ratings are the same.\")\n }\n\n handleError(): void {\n setTimeout(() => {}, 2000)\n Flasher.error(\"Ratings were NOT compared.\")\n }\n\n displayRating(response): void {\n let diff = response.map(item => this.buildDiffRow(item))\n\n // The setTimeout is purely for visual purposes for the spinner\n setTimeout(() => {\n this.hashDiffDisplayTarget.innerHTML = diff.join(\"\")\n this.ratingOneDisplayTarget.textContent = \"\"\n this.ratingOneDisplayTarget.appendChild(document.createTextNode(`Rating ID: ${this.ratingOneSelectFieldTarget.value}`))\n this.ratingTwoDisplayTarget.textContent = \"\"\n this.ratingTwoDisplayTarget.appendChild(document.createTextNode(`Rating ID: ${this.ratingTwoSelectFieldTarget.value}`))\n }, 300)\n }\n\n symbolToWord(item: any[]) {\n switch (item[0]) {\n case \"+\":\n return {\n text: \"Added\",\n backgroundColor: \"bg-success-100\"\n }\n case \"-\":\n return {\n text: \"Removed\",\n backgroundColor: \"bg-warning-200\"\n }\n case \"~\":\n return {\n text: \"Changed\",\n backgroundColor: \"bg-primary-200\"\n }\n default:\n return {\n text: \"Unknown\",\n backgroundColor: \"bg-tertiary-200\"\n }\n }\n }\n\n buildDiffRow(response: any[]): string {\n let rating: any = new Object(this.symbolToWord(response))\n\n return `\n \n \n ${rating.text}\n \n \n ${response[1]}\n \n \n ${this.shouldStringify(response) ? JSON.stringify(response[2]) : response[2]}\n \n \n ${this.shouldStringify(response) ? JSON.stringify(response[3]) : response[3]}\n \n \n `\n }\n}\n","import { Controller } from \"stimulus\"\nimport \"confetti-js\"\n\nexport default class extends Controller {\n static targets = [\"confetti\"]\n\n connect() {\n setTimeout(\n function () {\n this.show()\n }.bind(this),\n 500\n )\n }\n\n show(e) {\n if (this.confettiTarget && this.confettiTarget.getAttribute(\"data-active\")) {\n this.renderConfetti()\n }\n }\n\n renderConfetti() {\n var k_icon = this.confettiTarget.getAttribute(\"data-asset-path\")\n\n var confettiSettings = {\n target: \"confetti\",\n size: 1.8,\n clock: 50,\n max: parseInt(this.confettiTarget.getAttribute(\"data-max-confetti\")),\n props: [\"circle\", \"square\", \"triangle\", { type: \"svg\", src: k_icon }],\n colors: [\n [251, 192, 45],\n [251, 192, 45],\n [251, 192, 45],\n [0, 205, 155],\n [153, 76, 169]\n ],\n rotate: true\n }\n\n var confetti = new ConfettiGenerator(confettiSettings)\n\n confetti.render()\n\n setTimeout(function () {\n var confetti_el = document.getElementById(\"confetti\")\n confetti_el.style.opacity = 0\n setTimeout(function () {\n confetti_el.style.height = 0\n confetti.clear()\n }, 1000)\n }, 3000)\n }\n}\n","import { Controller } from \"stimulus\"\nimport Flasher from \"../../utils/flasher\"\nexport default class extends Controller {\n static targets = [\"voidConfirm\", \"voidShow\", \"voidActions\", \"checkStatus\"]\n\n connect() {\n const button = document.querySelector('[data-controller=\"kintranet--confirm-void\"] [data-modal-close]')\n button.onclick = this.reset.bind(this)\n\n const button_view_check = document.querySelectorAll('[data-controller=\"kintranet--view-check\"]')\n\n for (var i = 0, len = button_view_check.length; i < len; i++) button_view_check[i].onclick = this.getCheckStatus.bind(this)\n }\n\n toggle() {\n const allTargets = [...this.voidConfirmTargets, ...this.voidShowTargets]\n allTargets.forEach(target => target.classList.toggle(\"hidden\"))\n }\n\n reset() {\n this.voidShowTargets.forEach(target => target.classList.remove(\"hidden\"))\n this.voidConfirmTargets.forEach(target => target.classList.add(\"hidden\"))\n }\n\n getCheckStatus(e) {\n const modal_id = e.target.dataset[\"id\"]\n const url = e.target.dataset[\"kintranet-ViewCheckUrlValue\"]\n\n fetch(url)\n .then(response => response.json())\n .then(data => {\n if (data.success) {\n this.checkStatusTarget.innerHTML = data.message_text.check_status.toLowerCase().replace(\"_\", \" \")\n window.kin.utils.openModal(modal_id)\n\n if (this.hasVoidActionsTarget) {\n const voidable = data.message_text.check_status == \"UNPAID\"\n this.voidActionsTarget.classList.toggle(\"hidden\", !voidable)\n }\n } else {\n Flasher.error(data.error_text)\n }\n })\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"exteriorWallFinishGroup\", \"exteriorWallFinish\"]\n\n changeConstructionType(event) {\n if (event.target.value == \"frame\") {\n this.exteriorWallFinishGroupTarget.classList.remove(\"hidden\")\n this.exteriorWallFinishTarget.classList.remove(\"hidden\")\n this.exteriorWallFinishTarget.disabled = false\n } else {\n this.exteriorWallFinishGroupTarget.classList.add(\"hidden\")\n this.exteriorWallFinishTarget.classList.add(\"hidden\")\n this.exteriorWallFinishTarget.disabled = true\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static values = { id: String }\n\n connect() {\n this.queryApi()\n }\n\n queryApi() {\n let id = this.element.dataset.idValue\n let url = `/api/v3/policies/${id}/financial_alerts.json`\n\n fetch(url)\n .then(response => {\n if (response.ok)\n response.json().then(data => {\n if (data.correction_needed) this.element.setAttribute(\"open\", \"\")\n this.element.setAttribute(\"variant\", \"warning\")\n this.element.innerHTML =\n \"Corrector : Attention Needed
    Accounting Details\"\n })\n else this.element.setAttribute(\"open\", \"\")\n this.element.setAttribute(\"variant\", \"danger\")\n this.element.innerHTML = \"Corrector : Error
    \" + response.statusText\n })\n .catch(error => {\n this.element.setAttribute(\"open\", \"\")\n this.element.setAttribute(\"variant\", \"danger\")\n this.element.innerHTML = \"Corrector : Error
    \" + error\n })\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static values = { correctionsNeeded: String }\n\n static targets: string[] = [\"alertable\", \"expandable\"]\n alertableTarget: HTMLElement\n expandableTarget: HTMLElement\n\n connect() {\n let correctionsNeeded = (this.element as HTMLElement).dataset.correctionsNeededValue\n\n if (correctionsNeeded == \"true\") {\n this.alertableTarget.classList.toggle(\"hidden\")\n this.expandableTarget.classList.toggle(\"hidden\")\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport Flasher from \"../../utils/flasher\"\nimport debounce from \"lodash.debounce\"\nimport { refreshVisibleFields, formatMoney, openModal, closeModal, isObjEmpty } from \"../../components/shared/utils/utils\"\nimport { datadogLogs } from \"@datadog/browser-logs\"\n\nexport default class extends Controller {\n static targets = [\n \"coverageA\",\n \"error\",\n \"floodCost\",\n \"form\",\n \"fields\",\n \"loading\",\n \"lowerCoverageARange\",\n \"minimumPremiumReached\",\n \"percentInput\",\n \"premium\",\n \"premiumDiff\",\n \"replacementCostContents\",\n \"totalPremium\",\n \"upperCoverageARange\",\n \"floodValue\",\n \"onePayValue\",\n \"twoPayValue\",\n \"fourPayValue\",\n \"premiumWithoutFlood\",\n \"scheduledChangeLoading\",\n \"scheduledChangeSuccess\",\n \"coveragesPath\",\n \"statusPath\",\n \"coverageInputs\"\n ]\n\n connect() {\n this.orderCoverages()\n this.updatePercents()\n this.setUpFieldCurrentValues()\n this.loadCoverageInputs()\n\n this.getCoverageRecommendationRules()\n .then(response => {\n this.coverageRecommendationRules = response.rules\n })\n .catch(error => {\n reject(error)\n })\n\n if (this.hasPremiumDiffTarget) {\n this.formatPremiumDiff(parseFloat(this.premiumDiffTarget.innerText))\n }\n\n if (this.hasPremiumTarget) {\n if (this.premiumTarget.dataset.pendingNewRating == \"true\") {\n this.pollForPremium()\n this.displayState(\"loading\")\n }\n\n this.formTarget.addEventListener(\"kin-form-validation:change\", e => {\n if (e && e.detail.form.valid && e.detail.fields) {\n e.detail.fields.forEach(field => (field !== undefined || null ? this.showDiff(field) : null))\n }\n })\n }\n\n // Debounce the submit to prevent a race condition when trying to create multiple ratings\n this.checkAndSubmit = debounce(this.checkAndSubmit, 2000).bind(this)\n\n this.formTarget.addEventListener(\"click\", e => {\n if (e.target.id.includes(\"-needs-acknowledgment\")) {\n const associatedInput = document.querySelector(`#${e.target.dataset.associatedInputId}`)\n this.prepareCoverageAcknowledgementModel(false, associatedInput)\n openModal(\"coverage_acknowledgement\")\n }\n })\n\n this.formTarget.addEventListener(\"change\", e => {\n if ([\"input\", \"select\"].includes(e.target.tagName.toLowerCase())) {\n if (this.needAcknowledgement(e.target)) {\n this.prepareCoverageAcknowledgementModel(true, e.target)\n openModal(\"coverage_acknowledgement\")\n } else {\n this.storageOnChangeData(true, e.target)\n this.updateStyling(e.target, false, false)\n this.checkAndSubmit()\n }\n }\n })\n\n this.formTarget.addEventListener(\"keydown\", e => {\n if (e.key === \"Enter\" && [\"input\", \"select\"].includes(e.target.tagName.toLowerCase())) {\n e.preventDefault()\n if (this.needAcknowledgement(e.target)) {\n this.prepareCoverageAcknowledgementModel(true, e.target)\n openModal(\"coverage_acknowledgement\")\n } else {\n this.checkAndSubmit()\n }\n }\n })\n }\n\n setUpFieldCurrentValues() {\n const selects = this.formTarget.querySelectorAll(\"select, input\")\n selects.forEach(el => {\n el.setAttribute(\"data-current-value\", el.value)\n })\n }\n\n getCoverageRecommendationRules() {\n const url = `/kintranet/coverages/${this.getCoverageId()}/coverage_recommendation_rules`\n\n return new Promise((resolve, reject) => {\n Rails.ajax({\n url: url,\n type: \"GET\",\n success: response => {\n resolve(response)\n },\n error: err => {\n reject(err)\n }\n })\n })\n }\n\n prettyCoverageName(el) {\n return document.querySelector(`label[for=\"${el.id}\"]`).firstChild.textContent.trim()\n }\n\n ruleValid(rule) {\n let REQUIRED_RULE_KEYS = [\"recommended_amount\", \"alert_rule\", \"hazard_script\"]\n\n if (isObjEmpty(rule)) {\n return false\n }\n // Rules is valid if it has all needed keys\n if (Object.keys(rule).filter(n => REQUIRED_RULE_KEYS.includes(n)).length === 3) {\n return true\n } else {\n datadogLogs.logger.error(`Invalid Rule found. Rule: ${rule}`, {\n rule: rule,\n coverageId: this.getCoverageId()\n })\n return false\n }\n }\n\n convertPercentToFloat(percentOfCoverageA) {\n percentOfCoverageA = percentOfCoverageA.replace(\"%\", \"\")\n\n const coverageA = document.getElementById(\"bright_coverage_coverage_a\").value\n return (Number(percentOfCoverageA) * Number(coverageA)) / 100.0\n }\n\n needAcknowledgement(el) {\n const coverageName = el.id.replace(\"bright_coverage_\", \"\")\n const rule = this.coverageRecommendationRules[coverageName]\n let coverageValue = el.value.toString()\n\n try {\n if (!this.ruleValid(rule)) {\n return false\n }\n\n let recommendedAmount = rule.recommended_amount.toString()\n const alertRule = rule.alert_rule\n\n // The limited_fungi recommended amount contains two values, which are also stored as strings\n // so we need to get the actual selected value from the select options and\n // split and replace '$' and ',' to be able to parse and compare the values correctly\n if (coverageName === \"limited_fungi\") {\n coverageValue = el.options[el.selectedIndex].text.split(\"/\").map(val => val.replace(/\\$/g, \"\").replace(/,/g, \"\").trim())\n recommendedAmount = recommendedAmount.split(\"/\")\n const results = coverageValue.map((cv, idx) => {\n return this.validateCoverageValue(alertRule, cv, recommendedAmount[idx])\n })\n return results.includes(true)\n } else {\n // If one includes a percent but not the other, we convert them both to numbers\n // The (!a != !b) is the shortest way to do an XOR in JS\n if (!coverageValue.includes(\"%\") != !recommendedAmount.includes(\"%\")) {\n coverageValue = this.convertPercentToFloat(coverageValue)\n recommendedAmount = this.convertPercentToFloat(recommendedAmount)\n }\n\n coverageValue = coverageValue.replace(\"%\", \"\")\n recommendedAmount = recommendedAmount.replace(\"%\", \"\")\n\n return this.validateCoverageValue(alertRule, coverageValue, recommendedAmount)\n }\n } catch (err) {\n datadogLogs.logger.error(\n \"needsAcknowledgement function errored. Please see error and data for details.\",\n {\n coverageName: coverageName,\n coverageValue: coverageValue,\n rule: rule,\n coverageId: this.getCoverageId()\n },\n err\n )\n return false\n }\n }\n\n prepareCoverageAcknowledgementModel(changedInPas, el) {\n if (!el.getAttribute(\"data-needs-acknowledgement\")) {\n el.setAttribute(\"data-needs-acknowledgement\", true)\n }\n this.storageOnChangeData(changedInPas, el)\n this.buildModal(changedInPas, el)\n }\n\n storageOnChangeData(changedInPas, el) {\n const coverageName = el.id.replace(\"bright_coverage_\", \"\")\n // If it was changed in the PAS, we want to use the previous value and the one the user just selected\n if (changedInPas) {\n el.setAttribute(\"data-previous-value\", el.getAttribute(\"data-current-value\"))\n el.setAttribute(\"data-current-value\", el.value)\n } else {\n el.setAttribute(\"data-previous-value\", this.coverageRecommendationRules[coverageName].recommended_amount)\n el.setAttribute(\"data-current-value\", el.value)\n }\n }\n\n buildModal(changedInPas, el) {\n const title = document.getElementById(\"coverage_acknowledgement_modal_title\")\n const small_print = document.getElementById(\"coverage_acknowledgement_modal_small_print\")\n const revertButton = document.getElementById(\"coverage_acknowledgement_modal_revert_button\")\n const modal = document.querySelector('[data-controller=\"kintranet--coverage\"] kin-view-modal#modal__coverage_acknowledgement')\n const coverage = this.prettyCoverageName(el)\n const coverageName = this.getCoverageName(el)\n const rule = this.coverageRecommendationRules[coverageName]\n const recommendedAmount = rule.recommended_amount\n const alertRule = rule.alert_rule\n\n modal.addEventListener(\"kin-modal:close-button-click\", () => {\n this.handleNotAcknowledged()\n })\n\n title.textContent = this.getTitle(\n coverage,\n this.formatValue(el.getAttribute(\"data-current-value\")),\n this.formatValue(recommendedAmount),\n changedInPas,\n alertRule\n )\n revertButton.textContent = this.getRevertText(changedInPas)\n small_print.textContent = rule.hazard_script\n }\n\n getTitle(coverageName, currentValue, recommendedAmount, changedInPas, alertRule) {\n if (!changedInPas) {\n return `\n ${coverageName} has changed\n from our recommended ${recommendedAmount}\n to ${currentValue}.\n `\n }\n return `\n You've changed ${coverageName}\n ${this.getChangeWord(alertRule)} our recommended ${recommendedAmount}\n to ${currentValue}.\n `\n }\n\n getChangeWord(alertRule) {\n if (alertRule === \"minimum\") {\n return \"below\"\n } else if (alertRule === \"maximum\") {\n return \"above\"\n } else return \"from\"\n }\n\n getRevertText(changedInPas) {\n if (changedInPas) {\n return \"Revert to Previous\"\n } else {\n return \"Reset to Recommended\"\n }\n }\n\n formatValue(value) {\n if (!isNaN(value) && typeof value !== \"boolean\") {\n return parseFloat(value).toLocaleString(\"en-US\", { style: \"currency\", currency: \"USD\", maximumFractionDigits: 0 })\n } else {\n return value.toString().charAt(0).toUpperCase() + value.toString().slice(1)\n }\n }\n\n handleAcknowledgement() {\n closeModal(\"coverage_acknowledgement\")\n\n let el = document.querySelector(\"[data-needs-acknowledgement='true']\")\n this.customerAcknowledged(el)\n this.resolveValues(\"acknowledged\")\n this.checkAndSubmit()\n }\n\n customerAcknowledged(el) {\n const coverageId = this.getCoverageId()\n const url = `/kintranet/coverages/${coverageId}/customer_acknowledgement`\n const params = new URLSearchParams({ id: coverageId, coverage_name: this.getCoverageName(el), acknowledged: true }).toString()\n Rails.ajax({\n url: url,\n type: \"PATCH\",\n data: params,\n success: () => {\n this.updateStyling(el, true, true)\n }\n })\n }\n\n handleNotAcknowledged() {\n closeModal(\"coverage_acknowledgement\")\n\n let el = document.querySelector(\"[data-needs-acknowledgement='true']\")\n this.notAcknowledged(el)\n this.resolveValues(\"unacknowledged\")\n this.checkAndSubmit()\n }\n\n notAcknowledged(el) {\n const coverageId = this.getCoverageId()\n const url = `/kintranet/coverages/${coverageId}/customer_acknowledgement`\n const params = new URLSearchParams({ id: coverageId, coverage_name: this.getCoverageName(el), acknowledged: false }).toString()\n Rails.ajax({\n url: url,\n type: \"PATCH\",\n data: params,\n success: () => {\n this.updateStyling(el, this.needAcknowledgement(el), false)\n }\n })\n }\n\n handleRevert() {\n closeModal(\"coverage_acknowledgement\")\n\n let el = document.querySelector(\"[data-needs-acknowledgement='true']\")\n this.resolveValues(\"reverted\")\n this.revert(el)\n this.checkAndSubmit()\n }\n\n revert(el) {\n this.updateStyling(el, this.needAcknowledgement(el), false)\n }\n\n updateStyling(el, needsAcknowledgement, customerAcknowledged) {\n const { currentField, coverageReview, needsAckMessage, customerAckMessage, coverageName } = this.getCoverageData(el)\n\n // Remove styling on the box so we can add the correct styling (or add none)\n currentField.classList.remove(this.inputBoxStyling(coverageName, false))\n currentField.classList.remove(this.inputBoxStyling(coverageName, true))\n\n if (!needsAcknowledgement) {\n coverageReview.classList.add(\"hidden\")\n return\n }\n\n coverageReview.classList.remove(\"hidden\")\n\n if (customerAcknowledged) {\n customerAckMessage.classList.remove(\"hidden\")\n needsAckMessage.classList.add(\"hidden\")\n currentField.classList.add(this.inputBoxStyling(coverageName, true))\n } else {\n customerAckMessage.classList.add(\"hidden\")\n needsAckMessage.classList.remove(\"hidden\")\n currentField.classList.add(this.inputBoxStyling(coverageName, false))\n }\n }\n\n inputBoxStyling(coverageName, customerAcknowledged) {\n let style = \"\"\n style += coverageName == \"coverage_a\" ? \"input\" : \"select\"\n style += customerAcknowledged ? \"--success\" : \"--error\"\n return style\n }\n\n getCoverageName(el) {\n return el.id.replace(\"bright_coverage_\", \"\")\n }\n\n getCoverageId() {\n return document.getElementById(\"coverage_options_header\").getAttribute(\"data-coverage-id\")\n }\n\n getCoverageData(el) {\n const currentField = el ? el : document.querySelector(\"[data-needs-acknowledgement='true']\")\n const coverageName = this.getCoverageName(el)\n const coverageReview = document.getElementById(`${coverageName}-coverage-review`)\n const needsAckMessage = document.getElementById(`${coverageName}-needs-acknowledgment`)\n const customerAckMessage = document.getElementById(`${coverageName}-acknowledged`)\n\n return {\n currentField,\n coverageReview,\n needsAckMessage,\n customerAckMessage,\n coverageName\n }\n }\n\n resolveValues(status) {\n // This is the select or input that's used to create the modal\n const elementLinkedToModal = document.querySelector(\"[data-needs-acknowledgement='true']\")\n const ACKNOWLEDGED = \"acknowledged\"\n const REVERTED = \"reverted\"\n const UNACKNOWLEDGED = \"unacknowledged\"\n\n let valueToSetTo\n if (status === ACKNOWLEDGED) {\n valueToSetTo = elementLinkedToModal.getAttribute(\"data-current-value\")\n } else if (status === REVERTED) {\n valueToSetTo = elementLinkedToModal.getAttribute(\"data-previous-value\")\n } else if (status === UNACKNOWLEDGED) {\n // If the agent clicked the X, we don't want to revert the value\n valueToSetTo = elementLinkedToModal.getAttribute(\"data-current-value\")\n }\n\n if (elementLinkedToModal.nodeName === \"SELECT\") {\n ;[...elementLinkedToModal.options].forEach(option => {\n if (option.value == valueToSetTo) {\n elementLinkedToModal.value = valueToSetTo\n option.selected = true\n option.defaultSelected = true\n } else {\n option.selected = false\n }\n })\n } else {\n elementLinkedToModal.value = valueToSetTo\n }\n\n elementLinkedToModal.removeAttribute(\"data-needs-acknowledgement\")\n elementLinkedToModal.setAttribute(\"data-current-value\", elementLinkedToModal.value)\n }\n\n checkAndSubmit() {\n refreshVisibleFields(this.formTarget)\n if (this.formValidation.valid && !this.formTarget.disabled) {\n this.checkValidation()\n\n Rails.fire(this.formTarget, \"submit\")\n this.formTarget.disabled = true\n }\n }\n\n checkValidation(e) {\n this.formTarget.querySelectorAll(\"input:not([type=hidden]), select\").forEach(field => (field.readonly = true))\n if (this.formValidation.valid) {\n // show the user a loading spinner\n this.displayState(\"loading\")\n this.updatePercents()\n } else {\n e.preventDefault()\n this.formTarget.querySelectorAll(\"input:not([type=hidden]), select\").forEach(field => (field.readonly = false))\n }\n }\n\n showDiff(target = null) {\n if (target === null || target === undefined || !(target instanceof HTMLElement)) {\n return\n } else {\n if (\"effectiveValue\" in target.dataset === false) {\n return\n }\n\n // Remove any prior diffs\n const diffEl = document.getElementById(target.id + \"_diff\")\n if (diffEl) diffEl.parentNode.removeChild(diffEl)\n\n if (isNaN(target.dataset.effectiveValue) && !target.dataset.effectiveValue.includes(\"%\")) {\n if (target.dataset.effectiveValue === target.value) return\n const display = this.buildDiffElement(target)\n display.classList.add(\"success\")\n display.innerHTML = 'Prev: \"' + target.dataset.effectiveValue + '\"'\n } else {\n const diff = Number(target.value.replace(/[^0-9.-]+/g, \"\")) - Number(target.dataset.effectiveValue.replace(/[^0-9.-]+/g, \"\"))\n if (diff == 0) return null\n const display = this.buildDiffElement(target)\n diff > 0 ? display.classList.add(\"success\") : display.classList.add(\"warning\")\n\n const diffValue = \"\"\n if (target.dataset.effectiveValue.includes(\"%\")) {\n diffValue = diff > 0 ? \"+\" + diff + \"%\" : diff + \"%\"\n } else {\n const symbol = diff > 0 ? \"+\" : \"-\"\n diffValue = symbol + formatMoney(diff)\n }\n display.innerHTML = diffValue\n }\n }\n }\n\n orderCoverages() {\n // CSS Grid has to know how many rows to create. So we give it that info here.\n let coverages = Array.from(this.fieldsTarget.querySelectorAll(\".input__external\"))\n let rows = Math.round(coverages.length / 3)\n let remainder = coverages.length % 3\n\n if (remainder) rows = rows + 1\n\n this.fieldsTarget.style.gridTemplateRows = `repeat(${rows}, auto)`\n }\n\n buildDiffElement(target) {\n const display = document.createElement(\"p\")\n display.id = target.id + \"_diff\"\n display.classList.add(\"input__external--update\")\n target.insertAdjacentElement(\"beforebegin\", display)\n return display\n }\n\n formatPremiumDiff(enforcement_premium_diff) {\n if (enforcement_premium_diff === undefined) return null\n\n if (enforcement_premium_diff !== 0) {\n this.premiumDiffTarget.classList.remove(\"hidden\")\n this.premiumDiffTarget.classList.remove(\"success\")\n this.premiumDiffTarget.classList.remove(\"warning\")\n\n const symbol = enforcement_premium_diff > 0 ? \"+\" : \"-\"\n const diff = formatMoney(enforcement_premium_diff)\n this.premiumDiffTarget.innerText = symbol + diff\n\n if (enforcement_premium_diff && enforcement_premium_diff > 0) {\n this.premiumDiffTarget.classList.add(\"success\")\n } else {\n this.premiumDiffTarget.classList.add(\"warning\")\n }\n } else {\n this.premiumDiffTarget.classList.add(\"hidden\")\n }\n }\n\n handleSuccess(e) {\n let customMessage = e.detail[0].qualification_message\n let defaultedCoverages = e.detail[0].defaulted_coverages\n if (defaultedCoverages) {\n if (customMessage) {\n Flasher.success(customMessage)\n }\n for (const coverage in defaultedCoverages) {\n document.getElementsByName(`bright_coverage[${coverage}]`)[0].value = e.detail[0].defaulted_coverages[coverage]\n }\n }\n if (e.detail[0].pending_new_rating) {\n this.pollForPremium()\n } else {\n fetch(this.coveragesPathTarget.dataset.path, {\n headers: {\n \"X-Load-Partial\": true,\n Accept: \"application/json\"\n }\n })\n .then(response => {\n if (!response.ok) {\n Flasher.error(\"There was an issue.\")\n this.handleError()\n throw new Error(\"Loading new partial for coverages failed.\")\n }\n return response.json()\n })\n .then(data => {\n Flasher.success(\"The coverage has been updated.\")\n this.premiumResponse = data\n const premium = data.rating.premium\n\n if (this.hasPremiumDiffTarget) {\n this.formatPremiumDiff(data.endorsement_premium_diff)\n }\n this.updateCoverageARange(data)\n if (data.hasOwnProperty(\"flood_premium\") && this.hasFloodValueTarget) {\n this.updateFloodPremium()\n }\n if (data.premium_without_flood && this.hasPremiumWithoutFloodTarget) {\n this.premiumWithoutFloodTarget.innerText = formatMoney(data.premium_without_flood)\n }\n\n if (this.hasMinimumPremiumReachedTarget) {\n this.toggleMinimumPremiumReached()\n }\n\n if (data.may_bind !== undefined) {\n document.dispatchEvent(new CustomEvent(\"updateEndorseText\", { detail: data }))\n }\n if (this.hasTotalPremiumTarget) {\n this.updatePremiumValue(premium)\n }\n if (this.hasOnePayValueTarget) {\n this.updatePaymentBreakdown()\n }\n this.renderSuccess()\n })\n }\n }\n\n /**\n * Toggles restricted coverages based on a triggering coverage change.\n * @param {Event} e - The event object from the triggering coverage change.\n * @param {Set} [processedFields=new Set()] - Set of already processed coverage names to prevent infinite recursion.\n */\n toggleRestrictedCoverages(e, processedFields = new Set()) {\n const triggeringElement = e.target\n const triggeringCoverageName = (e.target.name.match(/\\[([A-Za-z_]*)\\]/) || [])[1] || e.target.name\n let triggeringCoverageValue = this.getSelectedValue(triggeringElement)\n\n // Prevent infinite recursion by tracking processed coverages\n if (processedFields.has(triggeringCoverageName)) return\n processedFields.add(triggeringCoverageName)\n\n Object.keys(this.coverageInputs).forEach(dependentCoverageName => {\n // Checks if dependentCoverageName is a dependent of triggeringCoverageName\n if (this.isRestrictedDependent(triggeringCoverageName, dependentCoverageName)) {\n const dependentElement = document.querySelector(`#bright_coverage_${dependentCoverageName}`)\n const previousDependentValue = dependentElement.value\n this.assignCoverageDefault(dependentElement, dependentCoverageName, triggeringCoverageName, triggeringCoverageValue)\n this.toggleDisabledCoverageSelectOptions(dependentElement, dependentCoverageName, triggeringCoverageName, triggeringCoverageValue)\n\n if (String(triggeringCoverageValue) === \"true\") {\n dependentElement.parentElement.classList.add(\"disabled\")\n } else {\n dependentElement.parentElement.classList.remove(\"disabled\")\n }\n\n // If the value of the dependent coverage has changed, we need to check if that change affects other coverages\n if (previousDependentValue !== dependentElement.value && this.hasRestrictedDependents(dependentCoverageName)) {\n this.toggleRestrictedCoverages({ target: dependentElement }, processedFields)\n }\n }\n })\n }\n\n /**\n * Gets the selected value from an input element.\n * @param {HTMLElement} inputElement - The input element to get the value from.\n * @returns {boolean|string|null} The selected value of the input element.\n * For checkboxes, returns a boolean indicating if it's checked.\n * For select elements, returns true, false, or the string value.\n * For other elements, returns null.\n */\n getSelectedValue(inputElement) {\n if (inputElement.type === \"checkbox\") {\n return inputElement.checked\n } else if (inputElement.tagName === \"SELECT\") {\n const value = inputElement.value.toLowerCase()\n if (value === \"true\") return true\n if (value === \"false\") return false\n return inputElement.value\n } else {\n return null\n }\n }\n\n /**\n * Checks if a coverage has any restricted dependents.\n * @param {string} coverageName - The name of the coverage to check.\n * @returns {boolean} True if the coverage has any restricted dependents, false otherwise.\n */\n hasRestrictedDependents(coverageName) {\n return Object.keys(this.coverageInputs).some(dependentCoverageName => this.isRestrictedDependent(coverageName, dependentCoverageName))\n }\n\n /**\n * Checks if one coverage is a restricted dependent of another.\n * @param {string} coverageName - The name of the potential parent coverage.\n * @param {string} dependentCoverageName - The name of the potential dependent coverage.\n * @returns {boolean} True if dependentCoverageName is a restricted dependent of coverageName, false otherwise.\n */\n isRestrictedDependent(coverageName, dependentCoverageName) {\n const metadata = this.coverageInputs[dependentCoverageName]\n return metadata.restricted_values && metadata.restricted_values.some(rule => rule.input.key === coverageName)\n }\n\n renderSuccess() {\n this.formTarget.querySelectorAll(\"input:not([type=hidden]), select\").forEach(field => (field.readonly = false))\n this.displayState(\"success\")\n this.formTarget.disabled = false\n }\n\n toggleMinimumPremiumReached() {\n const premiumChanged = this.premiumResponse.minimum_premium_reached\n if (premiumChanged) {\n this.minimumPremiumReachedTarget.classList.remove(\"hidden\")\n } else {\n this.minimumPremiumReachedTarget.classList.add(\"hidden\")\n }\n }\n\n updatePremiumValue(premium) {\n this.totalPremiumTarget.querySelector(\"#premium-value\").innerText = formatMoney(parseFloat(premium))\n }\n\n updateCoverageARange() {\n this.lowerCoverageARangeTarget.innerText = formatMoney(this.premiumResponse.coverage_a_min, { minDecimals: 0, maxDecimals: 0 })\n this.upperCoverageARangeTarget.innerText = formatMoney(this.premiumResponse.coverage_a_max, { minDecimals: 0, maxDecimals: 0 })\n }\n\n updateFloodPremium() {\n if (this.floodValueTargets.length > 0) {\n this.floodValueTarget.innerText = formatMoney(this.premiumResponse.flood_premium)\n }\n }\n\n updatePaymentBreakdown() {\n this.onePayValueTarget.innerText = formatMoney(this.premiumResponse.one_pay)\n this.twoPayValueTarget.innerText = formatMoney(this.premiumResponse.two_pay)\n this.fourPayValueTarget.innerText = formatMoney(this.premiumResponse.four_pay)\n }\n\n pollForPremium() {\n fetch(this.statusPathTarget.dataset.statusPath)\n .then(response => {\n if (!response.ok) {\n this.handleError()\n throw new Error(\"Polling for premium had an issue.\")\n }\n return response.json()\n })\n .then(data => {\n if (data.pending_new_rating) {\n setTimeout(this.pollForPremium.bind(this), 500)\n } else {\n this.handleSuccess({ detail: [data] })\n }\n })\n }\n\n handleError(e) {\n this.formTarget.disabled = false\n let message = e.detail[0].error\n Flasher.error(message || \"There was an error updating the premium.\")\n this.displayState(\"error\")\n }\n\n displayState(state) {\n if (state === \"loading\") {\n if (this.hasPremiumTarget) {\n this.premiumTargets.forEach(element => element.classList.add(\"hidden\"))\n this.hasErrorTarget ? this.errorTarget.classList.add(\"hidden\") : null\n this.loadingTargets.forEach(element => element.classList.remove(\"hidden\"))\n } else {\n this.scheduledChangeSuccessTarget.classList.add(\"hidden\")\n this.scheduledChangeLoadingTarget.classList.remove(\"hidden\")\n setTimeout(() => (this.scheduledChangeLoadingTarget.querySelector(\"p\").innerText = \"Waiting for response...\"), 1000)\n }\n } else if (state === \"success\") {\n if (this.hasPremiumTarget) {\n this.loadingTargets.forEach(element => element.classList.add(\"hidden\"))\n this.hasErrorTarget ? this.errorTarget.classList.add(\"hidden\") : null\n this.premiumTargets.forEach(element => element.classList.remove(\"hidden\"))\n } else {\n this.scheduledChangeSuccessTarget.classList.remove(\"hidden\")\n setTimeout(() => this.scheduledChangeSuccessTarget.classList.add(\"hidden\"), 4000)\n this.scheduledChangeLoadingTarget.classList.add(\"hidden\")\n this.scheduledChangeLoadingTarget.querySelector(\"p\").innerText = \"Sending data to server...\"\n }\n } else if (state === \"error\") {\n if (this.hasPremiumTarget) {\n this.loadingTargets.forEach(element => element.classList.add(\"hidden\"))\n this.premiumTargets.forEach(element => element.classList.add(\"hidden\"))\n }\n this.hasErrorTarget ? this.errorTarget.classList.remove(\"hidden\") : null\n }\n }\n\n updatePercents() {\n let base = this.coverageATarget.value.replace(/[^0-9.-]+/g, \"\") // strip $ , . characters\n this.percentInputTargets.forEach(el => {\n let amount = base * parseFloat(el.value) * 0.01\n let dollars = formatMoney(amount, { minDecimals: 0, maxDecimals: 0 })\n el.dataset.amount = amount\n el.text = `${el.value} (${dollars})`\n })\n }\n\n changeReplacementCostContents(e) {\n if (this.hasReplacementCostContentsTarget) {\n if (e.target.dataset.isCondo === \"true\" && e.target.value === \"0%\") {\n this.replacementCostContentsTarget.value = \"false\"\n } else {\n this.replacementCostContentsTarget.value = \"true\"\n }\n }\n }\n\n loadCoverageInputs() {\n const coverageInputsString = this.coverageInputsTarget.getAttribute(\"data-kintranet--coverage-inputs\")\n this.coverageInputs = JSON.parse(coverageInputsString)\n }\n\n assignCoverageDefault(element, coverageName, coverageDependencyName, coverageDependencyValue) {\n const coverage_metadata = this.coverageInputs[coverageName]\n\n if (coverage_metadata.restricted_values) {\n const rule = coverage_metadata.restricted_values.find(rule => {\n return rule.input.key === coverageDependencyName && rule.input.value === coverageDependencyValue\n })\n\n element.value = rule.config.default\n } else {\n element.value = coverage_metadata.default\n }\n }\n\n toggleDisabledCoverageSelectOptions(element, coverageName, coverageDependencyName, coverageDependencyValue) {\n if (element.nodeName !== \"SELECT\") {\n return\n }\n\n const coverage_metadata = this.coverageInputs[coverageName]\n\n if (coverage_metadata.restricted_values) {\n const rule = coverage_metadata.restricted_values.find(rule => {\n return rule.input.key === coverageDependencyName && rule.input.value === coverageDependencyValue\n })\n\n const coverageOptions = coverage_metadata.type === \"boolean\" ? [true, false] : coverage_metadata.values\n\n const allowed_values = coverageOptions.filter(value => !rule.config.values.includes(value))\n\n for (let selectOption of element.options) {\n if (allowed_values.includes(selectOption.value)) {\n selectOption.setAttribute(\"disabled\", true)\n } else {\n selectOption.removeAttribute(\"disabled\")\n }\n }\n }\n }\n\n get formValidation() {\n return this.formTarget?.querySelector(\"kin-form-validation\")\n }\n\n validateCoverageValue(alertRule, coverageValue, recommendedAmount) {\n if (alertRule === \"minimum\") {\n return parseFloat(coverageValue) < parseFloat(recommendedAmount)\n } else if (alertRule === \"maximum\") {\n return parseFloat(coverageValue) > parseFloat(recommendedAmount)\n } else if (alertRule === \"equal\") {\n return coverageValue.toString() !== recommendedAmount.toString()\n } else {\n return false\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport { openModal } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"rspsInput\"]\n\n connect() {\n let dataRspsAcknowledgeEndpoint = this.rspsInputTarget.getAttribute(\"data-url\")\n let isRspsAcknowledged = false\n fetch(dataRspsAcknowledgeEndpoint).then(response => {\n response.json().then(data => {\n isRspsAcknowledged = data.rsps_acknowledged\n let hasRsps = this.rspsInputTarget.value === \"true\"\n if (!isRspsAcknowledged && hasRsps) {\n openModal(\"rsps_disclosures_modal\")\n }\n })\n })\n this.rspsInputTarget.addEventListener(\"change\", function (event) {\n if (event.target.value === \"true\" && isRspsAcknowledged === false) {\n openModal(\"rsps_disclosures_modal\")\n }\n })\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"lostHiddenField\"]\n\n toggleHot(e) {\n const url = e.target.href\n e.preventDefault()\n let hotOrNot = e.target.classList.contains(\"active\")\n if (hotOrNot) {\n e.target.classList.remove(\"active\")\n } else {\n e.target.classList.add(\"active\")\n }\n Rails.ajax({\n url: url,\n type: \"PUT\",\n data: `crm_account[hot]=${!hotOrNot}&block_redirect=${true}`,\n complete: () => {}\n })\n }\n\n toggleLeadStatus(e) {\n const lostField = document.querySelector(`#crm_id_${e.target.dataset.account}`)\n if (e.target.value == \"lost\") {\n const accountId = e.target.dataset.account\n utils.openModal(\"lost-reason-information-\" + accountId)\n lostField.value = \"lost\"\n } else {\n lostField.value = lostField.dataset.value\n let params = {\n status: e.target.value\n }\n Rails.ajax({\n url: e.target.dataset[\"url\"],\n type: \"PUT\",\n data: `crm_account[status]=${e.target.value}`,\n complete: () => {\n window.location.reload(true)\n }\n })\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\n\nexport default class extends Controller {\n containerTarget: HTMLElement\n checkboxTarget: HTMLInputElement\n checkboxTargets: HTMLInputElement[]\n checkAllTarget: HTMLElement\n buttonsTarget: HTMLElement\n documentsListTarget: HTMLElement\n\n static targets: string[] = [\"container\", \"checkbox\", \"checkAll\", \"buttons\", \"documentsList\"]\n loaded: Boolean = false\n\n loadDocuments() {\n if (!this.loaded) {\n Rails.ajax({\n url: this.documentsListTarget.dataset.documentsUrl,\n type: \"GET\",\n success: response => {\n //We tested this and values from the database are escaped in the same way that they are when using a normal render.\n this.containerTarget.innerHTML = response.html\n this.loaded = true\n },\n error: err => {\n console.log(err)\n }\n })\n }\n this.showButtons()\n }\n\n showButtons() {\n let accordion: HTMLElement = document.getElementById(\"block-accordion-document-list__trigger\")\n if (accordion.ariaExpanded === \"true\") {\n this.buttonsTarget.hidden = false\n } else {\n this.buttonsTarget.hidden = true\n }\n }\n\n selectAll() {\n if (this.checkAllTarget.innerText === \"Select All\") {\n this.checkboxTargets.forEach(checkbox => (checkbox.checked = true))\n this.checkAllTarget.innerText = \"Unselect All\"\n } else {\n this.checkboxTargets.forEach(checkbox => (checkbox.checked = false))\n this.checkAllTarget.innerText = \"Select All\"\n }\n }\n\n deleteSelected() {\n let ids: string[] = []\n const url: string = this.documentsListTarget.dataset.destroyUrl\n const property_id: string = this.documentsListTarget.dataset.propertyId\n\n this.checkboxTargets.forEach(checkbox => {\n if (checkbox.checked === true) {\n ids.push(checkbox.value)\n }\n })\n\n Rails.ajax({\n url: url,\n type: \"DELETE\",\n data: new URLSearchParams(Object.entries({ document_ids: JSON.stringify(ids), property_id: property_id })),\n complete: () => {\n location.reload()\n }\n })\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport Flasher from \"../../utils/flasher\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"chooseFileButton\",\n \"displayInPortal\",\n \"displayNameOverrideField\",\n \"docsetForm\",\n \"fileForm\",\n \"label\",\n \"note\",\n \"uploadDocumentTerm\",\n \"notifyCustomer\",\n \"progressIndicator\",\n \"progressWrapper\",\n \"removeFile\",\n \"showInPortalToggle\",\n \"uploadButton\",\n \"autocomplete\"\n ]\n\n notAllowToShowHumanLabel = [\n \"Competitor Declaration Page\",\n \"Customer Cancellation Form\",\n \"Electronic Funds Transfer\",\n \"Replacement Cost Estimate\",\n \"Unsigned Subscriber Agreement\"\n ]\n\n notAllowToShowLabel = [\n \"competitor_declaration_page\",\n \"customer_cancellation_form\",\n \"electronic_funds_transfer\",\n \"replacement_cost_estimate\",\n \"unsigned_subscriber_agreement\"\n ]\n\n connect() {\n try {\n addEventListener(\"direct-upload:progress\", this.handleUploadProgress.bind(this))\n addEventListener(\"direct-upload:error\", this.handleUploadError.bind(this))\n addEventListener(\"kin-autocomplete:change\", this.handleLabelSelection.bind(this))\n } catch (err) {}\n\n utils.autocompleteOnChange(\"bright_policy_documents_attributes_0_label\", e => this.toggleDisplayNameInput(e))\n }\n\n handleUploadError(e) {\n e.preventDefault()\n const { id, error } = e.detail\n\n if (this.hasProgressWrapperTarget) this.progressWrapperTarget.classList.add(\"hidden\")\n\n if (this.hasLabelTarget) {\n this.labelTarget.classList.add(\"hidden\")\n this.labelTarget.innerText = \"\"\n }\n\n alert(e.detail + \". Please try again.\")\n }\n\n handleUploadProgress(e) {\n if (this.hasProgressWrapperTarget) {\n const { progress } = e.detail\n this.progressWrapperTarget.classList.remove(\"hidden\")\n this.progressIndicatorTarget.style.width = `${progress}%`\n }\n }\n\n handleLabelSelection(e) {\n if (!this.hasUploadDocumentTermTarget) return\n if ([\"Notice Of Renewal\", \"Notice Of Non Renewal\"].includes(this.autocomplete.value)) {\n this.uploadDocumentTermTarget.classList.remove(\"hidden\")\n } else {\n this.uploadDocumentTermTarget.classList.add(\"hidden\")\n }\n\n if (this.notAllowToShowHumanLabel.includes(this.autocomplete.value)) {\n this.displayInPortalTarget.checked = false\n this.displayInPortalTarget.disabled = true\n this.notifyCustomerTarget.checked = false\n this.notifyCustomerTarget.disabled = true\n } else {\n this.displayInPortalTarget.disabled = false\n this.notifyCustomerTarget.disabled = false\n this.displayInPortalTarget.checked = true\n this.notifyCustomerTarget.checked = true\n }\n }\n\n handleFile(e) {\n if (this.hasChooseFileButtonTarget) this.chooseFileButtonTarget.classList.add(\"hidden\")\n if (this.hasUploadButtonTarget) {\n this.uploadButtonTarget.classList.remove(\"hidden\")\n this.uploadButtonTarget.disabled = false\n }\n\n const filename = e.target.value.split(\"\\\\\").pop()\n\n if (this.hasRemoveFileTarget) this.removeFileTarget.classList.remove(\"hidden\")\n\n if (this.hasLabelTarget) {\n this.labelTarget.classList.remove(\"hidden\")\n this.labelTarget.innerText = \"File name: \" + filename\n }\n }\n\n resetFile() {\n if (this.hasChooseFileButtonTarget) this.chooseFileButtonTarget.classList.remove(\"hidden\")\n utils.refreshVisibleFields(this.chooseFileButtonTarget.closest(\"form\"))\n\n if (this.hasRemoveFileTarget) this.removeFileTarget.classList.add(\"hidden\")\n if (this.hasLabelTarget) {\n this.labelTarget.classList.add(\"hidden\")\n this.labelTarget.innerText = \"\"\n }\n }\n\n handleShowInPortalToggle(e) {\n if (e.target.checked) this.notifyCustomerTarget.checked = true\n else this.notifyCustomerTarget.checked = false\n }\n\n renderSuccess() {\n Flasher.success(\"Success!\")\n }\n\n renderError() {\n Flasher.error(\"Failed!\")\n }\n\n removeFile() {\n if (this.fileFormTarget) {\n this.resetFile()\n }\n }\n\n fillAutocomplete(e) {\n if (!e.target.dataset.docLabel) {\n return\n }\n\n this.autocomplete.setValueFromExternalSource(e.target.dataset.docLabel)\n }\n\n toggleDisplayNameInput(e) {\n if (e.value == \"other\") {\n this.displayNameOverrideFieldTarget.querySelector(\"fieldset\").removeAttribute(\"disabled\")\n this.displayNameOverrideFieldTarget.classList.remove(\"hidden\")\n } else {\n this.displayNameOverrideFieldTarget.querySelector(\"fieldset\").setAttribute(\"disabled\", true)\n this.displayNameOverrideFieldTarget.classList.add(\"hidden\")\n }\n\n if (this.notAllowToShowLabel.find(item => item == e.value)) {\n this.displayInPortalTarget.checked = false\n this.displayInPortalTarget.disabled = true\n this.notifyCustomerTarget.checked = false\n this.notifyCustomerTarget.disabled = true\n } else {\n this.displayInPortalTarget.disabled = false\n this.notifyCustomerTarget.disabled = false\n }\n }\n\n updateDocset(e) {\n Rails.fire(e.target.closest(\"form\"), \"submit\")\n }\n\n get autocomplete() {\n return this.autocompleteTarget.querySelector(\"kin-autocomplete\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"dropdown\", \"button\", \"textArea\"]\n\n dropdownSelect(e) {\n let value = e.target.value\n\n if (value) {\n this.buttonTarget.disabled = false\n if (value === \"accepted\") {\n this.buttonTarget.value = \"Accept\"\n this.buttonTarget.classList.remove(\"btn__warning\")\n this.textAreaTarget.required = false\n this.textAreaTarget.minLength = 0\n } else if (value === \"rejected\") {\n this.buttonTarget.value = \"Reject\"\n this.buttonTarget.classList.add(\"btn__warning\")\n this.textAreaTarget.required = true\n this.textAreaTarget.minLength = 3\n }\n } else {\n this.buttonTarget.disabled = true\n }\n\n refreshVisibleFields(this.buttonTarget.closest(\"form\"))\n }\n}\n","/**\n * RestrictedCoveragesHandler\n *\n * This class manages the behavior of restricted coverages in a form.\n * It handles the toggling of coverage options based on dependencies and restrictions defined\n * in the coverageInputs configuration received from the filing metadata.\n *\n * Key features:\n * - Toggles restricted coverages based on selected values\n * - Manages disabled states of coverage select options\n * - Assigns default values to coverages based on dependencies\n */\nexport class RestrictedCoveragesHandler {\n private coverageInputs: any\n\n constructor(coverageInputs: any) {\n this.coverageInputs = coverageInputs\n }\n\n /**\n * Toggles restricted coverages based on the selected coverage\n * @param e - The change event\n */\n toggleRestrictedCoverages(e: Event): void {\n const target = e.target as HTMLSelectElement\n const isSelected = this.getSelectedValue(target)\n const coverageName = (target.name.match(/\\[([A-Za-z_]*)\\]/) || [])[1] || target.name\n\n Object.keys(this.coverageInputs).forEach(coverage => {\n if (this.coverageInputs[coverage].restricted_values) {\n const element = document.querySelector(`#bright_coverage_${coverage}`) as HTMLSelectElement\n this.assignCoverageDefault(element, coverage, coverageName, isSelected)\n this.toggleDisabledCoverageSelectOptions(element, coverage, coverageName, isSelected)\n }\n })\n }\n\n /**\n * Gets the selected value from an input element\n * @param inputElement - The input element\n * @returns The selected value\n */\n private getSelectedValue(inputElement: HTMLInputElement | HTMLSelectElement): boolean | string {\n const value = inputElement.value.toLowerCase()\n if (value === \"true\") return true\n if (value === \"false\") return false\n return inputElement.value\n }\n\n /**\n * Toggles disabled state of coverage select options\n * @param element - The select element\n * @param coverageName - The name of the coverage\n * @param coverageDependencyName - The name of the dependency coverage\n * @param coverageDependencyValue - The value of the dependency coverage\n */\n private toggleDisabledCoverageSelectOptions(\n element: HTMLSelectElement,\n coverageName: string,\n coverageDependencyName: string,\n coverageDependencyValue: boolean | string\n ): void {\n const coverage_metadata = this.coverageInputs[coverageName]\n\n if (coverage_metadata.restricted_values) {\n const rule = coverage_metadata.restricted_values.find((rule: any) => {\n return rule.input.key === coverageDependencyName && rule.input.value === coverageDependencyValue\n })\n\n const coverageOptions = coverage_metadata.type === \"boolean\" ? [\"true\", \"false\"] : coverage_metadata.values\n\n const allowed_values = coverageOptions.filter((value: string) => !rule.config.values.includes(value))\n\n Array.from(element.options).forEach((selectOption: HTMLOptionElement) => {\n selectOption.disabled = allowed_values.includes(selectOption.value)\n })\n }\n }\n\n /**\n * Assigns default value to coverage based on dependency\n * @param element - The select element\n * @param coverageName - The name of the coverage\n * @param coverageDependencyName - The name of the dependency coverage\n * @param coverageDependencyValue - The value of the dependency coverage\n */\n private assignCoverageDefault(\n element: HTMLSelectElement,\n coverageName: string,\n coverageDependencyName: string,\n coverageDependencyValue: boolean | string\n ): void {\n const coverage_metadata = this.coverageInputs[coverageName]\n\n if (coverage_metadata.restricted_values) {\n const rule = coverage_metadata.restricted_values.find((rule: any) => {\n return rule.input.key === coverageDependencyName && rule.input.value === coverageDependencyValue\n })\n\n element.value = rule.config.default\n } else {\n element.value = coverage_metadata.default\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport { RestrictedCoveragesHandler } from \"../../components/shared/utils/restricted_coverages_handler\"\n\n/**\n * Controller for handling earthquake addon functionality\n */\nexport default class extends Controller {\n declare readonly coverageSelectTarget: HTMLSelectElement\n declare readonly deductibleSelectTarget: HTMLSelectElement\n declare readonly countTarget: HTMLElement\n declare readonly formTarget: HTMLFormElement\n declare coverageInputs: any\n private restrictedCoveragesHandler: RestrictedCoveragesHandler\n\n static targets: string[] = [\"deductibleSelect\", \"coverageSelect\", \"form\", \"handleCoverageChange\"]\n\n /**\n * Initializes the controller\n */\n connect(): void {\n this.initializeCoverageInputs()\n this.toggleDeductible(this.coverageSelectTarget.value)\n this.restrictedCoveragesHandler = new RestrictedCoveragesHandler(this.coverageInputs)\n }\n\n /**\n * Initializes coverage inputs from data attribute\n */\n initializeCoverageInputs(): void {\n const coverageInputsString = this.formTarget.getAttribute(\"data-earthquake-coverage-inputs\")\n this.coverageInputs = JSON.parse(coverageInputsString)\n }\n\n /**\n * Toggles deductible visibility based on coverage value\n * @param value - The coverage value\n */\n toggleDeductible(value: string): void {\n if (value === \"true\") {\n this.showDeductible()\n } else {\n this.hideDeductible()\n }\n }\n\n /**\n * Shows the deductible select element\n */\n showDeductible(): void {\n this.deductibleSelectTarget.classList.remove(\"hidden\")\n }\n\n /**\n * Hides the deductible select element\n */\n hideDeductible(): void {\n this.deductibleSelectTarget.classList.add(\"hidden\")\n }\n\n /**\n * Handles coverage change event\n * @param e - The change event\n */\n handleCoverageChange(e: Event): void {\n const target = e.target as HTMLSelectElement\n this.toggleDeductible(target.value)\n this.restrictedCoveragesHandler.toggleRestrictedCoverages(e)\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"formField\", \"paymentSchedule\", \"scheduleSelection\"]\n\n connect() {\n this.selectSchedule()\n }\n\n selectSchedule() {\n if (!this.formFieldTarget.value.endsWith(\"card\")) {\n this.paymentScheduleTarget.value = \"full\"\n this.scheduleSelectionTarget.classList.add(\"disabled\")\n } else {\n this.scheduleSelectionTarget.classList.remove(\"disabled\")\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport { datadogLogs } from \"@datadog/browser-logs\"\n\nexport default class extends Controller {\n static targets = [\"paymentType\", \"paymentSchedule\", \"scheduleSelection\", \"billingTables\", \"proposedBillingTable\", \"currentBillingTable\"]\n declare readonly paymentTypeTarget: HTMLInputElement\n declare readonly paymentScheduleTarget: HTMLInputElement\n declare readonly scheduleSelectionTarget: HTMLElement\n declare readonly currentBillingTableTarget: HTMLElement\n declare readonly proposedBillingTableTarget: HTMLElement\n declare readonly billingTablesTarget: HTMLElement\n\n connect() {\n this.selectSchedule()\n }\n\n get token(): string {\n const metaEl = document.querySelector('meta[name=\"csrf-token\"]') as HTMLMetaElement\n return metaEl.content\n }\n fetchDiff() {\n fetch(this.sourceUrl(this.scheduleSelectionTarget.dataset.urlValue), {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-Csrf-Token\": this.token\n }\n })\n .then(response => {\n if (!response.ok) {\n throw new Error(response.statusText ? response.statusText : \"Response status not Ok\")\n }\n return response.json()\n })\n .then(response => {\n this.handleSuccess(response)\n })\n .catch(e => {\n this.handleError(e)\n })\n }\n\n sourceUrl(baseUrl) {\n let policyTerm = this.scheduleSelectionTarget.dataset.policyTerm\n let paymentSchedule = this.paymentScheduleTarget.value\n let paymentType = this.paymentTypeTarget.value\n\n return `${baseUrl}?policy_term=${policyTerm}&payment_schedule=${paymentSchedule}&payment_type=${paymentType}`\n }\n\n handleSuccess(response) {\n this.billingTablesTarget.classList.remove(\"hidden\")\n let currentBilling = response.old.map(transaction => this.buildDiffRow(transaction)).join(\"\")\n let proposedBilling = response.new.map(transaction => this.buildDiffRow(transaction)).join(\"\")\n\n this.currentBillingTableTarget.innerHTML = currentBilling\n this.proposedBillingTableTarget.innerHTML = proposedBilling\n }\n\n buildDiffRow(item) {\n return `\n \n \n ${item.installment_number} of ${item.installments}\n \n \n ${item.amount}\n \n \n ${item.due_date}\n \n \n ${item.term}\n \n \n `\n }\n handleError(error: Error) {\n const message = error.message ? error.message : \"Unknown error\"\n datadogLogs.logger.error(`Could not access proposed billing. Error message: ${message}`)\n console.error(`Could not access proposed billing. Error message: ${message}`)\n }\n\n selectSchedule() {\n if (!this.paymentTypeTarget.value.endsWith(\"card\")) {\n this.paymentScheduleTarget.value = \"full\"\n this.scheduleSelectionTarget.classList.add(\"disabled\")\n } else {\n this.scheduleSelectionTarget.classList.remove(\"disabled\")\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"datepicker\", \"backDate\"]\n\n setEffectiveDate() {\n const dateOptions = { month: \"2-digit\", day: \"2-digit\", year: \"numeric\" }\n const today = new Date().toLocaleDateString(\"en-US\", dateOptions)\n\n if (this.backDateTarget.checked === true) {\n this.dateInput.value = new Date(this.datepicker.startDate).toLocaleDateString(\"en-US\", dateOptions)\n } else {\n this.dateInput.value = today\n }\n }\n\n unCheckBackDate() {\n if (this.dateTarget.value != this.dateTarget.getAttribute(\"min\")) {\n this.backDateTarget.checked = false\n } else {\n this.backDateTarget.checked = true\n }\n }\n\n get datepicker() {\n return this.datepickerTarget.querySelector(\"kin-datepicker\")\n }\n\n get dateInput() {\n return this.datepickerTarget.querySelector(\"kin-date-input-mask input\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport createCardToken from \"../../utils/create_card_token\"\nimport postRequest from \"../../utils/fetch_helpers/post_request\"\nimport Flasher from \"../../utils/flasher\"\nimport { closeModal } from \"../../components/shared/utils/utils\"\n\ninterface Token {\n dataDescriptor: string\n dataValue: string\n}\n\nexport default class extends Controller {\n static targets = [\"form\", \"creditCardNumber\", \"expirationMonth\", \"expirationYear\", \"formSubmitButton\", \"numberOfTokensToGenerate\"]\n\n declare formTarget: HTMLFormElement\n declare creditCardNumberTarget: HTMLInputElement\n declare expirationMonthTarget: HTMLInputElement\n declare expirationYearTarget: HTMLInputElement\n declare formSubmitButtonTarget: HTMLButtonElement\n declare numberOfTokensToGenerateTarget: HTMLElement\n\n number(): string {\n return this.creditCardNumberTarget.value.replace(/[^\\d]/g, \"\")\n }\n\n expirationMonth(): string {\n return this.expirationMonthTarget.value\n }\n\n expirationYear(): string {\n return this.expirationYearTarget.value\n }\n\n getClientDetailsUrl(): { login_id: string; generate_public_client_key: string } {\n return {\n login_id: this.data.get(\"get-login-id\"),\n generate_public_client_key: this.data.get(\"get-client-key\")\n }\n }\n\n async submitDetail(event: Event) {\n event.preventDefault()\n\n try {\n this.formSubmitButtonTarget.disabled = true\n\n let tokens = await this.getTokens()\n\n if (tokens.length) {\n const url = this.formTarget.action\n const body = {\n endorsement_transaction: {\n tokens\n }\n }\n\n const response = await postRequest(url, body)\n const result = await response.json()\n\n if (response.ok) {\n this.handleSuccess(result)\n } else {\n this.handleFailure(result)\n }\n }\n } catch (_error) {\n this.handleFailure({ flash: { error: \"An error occurred while processing your payment.\" } })\n }\n }\n\n async getCardToken(): Promise {\n const { login_id, generate_public_client_key } = this.getClientDetailsUrl()\n const token = await createCardToken({\n month: this.expirationMonth(),\n year: this.expirationYear(),\n number: this.number(),\n cvv: \"\",\n name: \"\",\n zip: \"\",\n clientID: login_id,\n clientKey: generate_public_client_key\n })\n return token\n }\n\n /**\n * Returns an array of tokens\n * This is because it is possible for a policy have more then one endorsement payment to be made\n */\n async getTokens(): Promise {\n const numberOfTokensToGenerate = parseInt(this.numberOfTokensToGenerateTarget.textContent.trim(), 10)\n\n const tokens: Token[] = []\n\n for (let i = 0; i < numberOfTokensToGenerate; i++) {\n const token = await this.getCardToken()\n tokens.push(token)\n }\n\n return tokens\n }\n\n handleSuccess(result): void {\n const message = `🎉 ${result.flash.bound} 🎉`\n\n ;(this.confettiController as any).renderConfetti()\n\n Flasher.success(message)\n this.handleRequestComplete()\n }\n\n handleFailure(result): void {\n const message = `⛔️ ${result.flash.error} ⛔️`\n\n Flasher.error(message)\n this.handleRequestComplete()\n }\n\n handleRequestComplete(): void {\n closeModal(\"customer-request-endorse-policy-payment\")\n\n setTimeout(() => {\n window.location.reload()\n }, 2000)\n }\n\n get confettiController() {\n return this.application.getControllerForElementAndIdentifier(\n document.querySelector(\"[data-controller='kintranet--confetti']\"),\n \"kintranet--confetti\"\n )\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"expand\"]\n\n addMore(event) {\n this.expandTarget.classList.remove(\"hidden\")\n event.target.setAttribute(\"aria-expanded\", \"true\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"mortgageContainer\", \"otherContainer\"]\n\n onRecipientChange(event) {\n if (event.target.value === \"mortgage_company\") {\n this.mortgageContainerTarget.classList.remove(\"hidden\")\n this.otherContainerTarget.classList.add(\"hidden\")\n } else {\n this.otherContainerTarget.classList.remove(\"hidden\")\n this.mortgageContainerTarget.classList.add(\"hidden\")\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport Flasher from \"../../utils/flasher\"\n\nexport default class extends Controller {\n static targets = [\"fiveNineNumber\"]\n\n call() {\n let campaign = event.target.dataset.campaign\n let phone = event.target.dataset.phone\n this.getLoginMetadata()\n .then(response => response.json())\n .then(config => this.makeExternalCall(campaign, phone)(config), this.handleAuthError)\n }\n\n handleAuthError(error) {\n var message, ref, ref1\n message = \"Error getting session.\"\n if (\n error != null\n ? (ref = error.responseJSON) != null\n ? (ref1 = ref.five9ExceptionDetail) != null\n ? ref1.message\n : void 0\n : void 0\n : void 0\n ) {\n message = \"Five9 says: \" + error.responseJSON.five9ExceptionDetail.message\n }\n\n Flasher.error(message)\n }\n\n makeExternalCall(campaign, phone) {\n let controller = this\n return function (config) {\n window.fiveNineUserId || (window.fiveNineUserId = config.userId)\n window.fiveNineHost || (window.fiveNineHost = config.metadata.dataCenters[0].apiUrls[0].host)\n return fetch(\n \"https://\" + window.fiveNineHost + \"/appsvcs/rs/svc/agents/\" + window.fiveNineUserId + \"/interactions/make_external_call\",\n {\n credentials: \"include\",\n headers: {\n \"content-Type\": \"application/json\"\n },\n referrer: \"https://\" + window.fiveNineHost + \"/clients/agent/main.html?role=Agent\",\n referrerPolicy: \"no-referrer-when-downgrade\",\n body: JSON.stringify({\n number: phone,\n skipDNCCheck: false,\n checkMultipleContacts: true,\n campaignId: campaign\n }),\n method: \"POST\",\n mode: \"cors\"\n }\n ).then(function (response) {\n if (!response.ok) {\n return response.json().then(data => {\n return controller.handleAuthError({\n responseJSON: data\n })\n })\n }\n })\n }\n }\n\n getLoginMetadata() {\n if (window.fiveNineUserId && window.fiveNineHost) {\n return Promise.resolve()\n }\n\n return fetch(\"https://app.five9.com/appsvcs/rs/svc/auth/metadata?role=Agent\", {\n method: \"GET\",\n credentials: \"include\",\n headers: {\n \"Content-Type\": \"application/json\"\n }\n })\n }\n}\n","import { Controller } from \"stimulus\"\nimport \"confetti-js\"\nimport Flasher from \"../../utils/flasher\"\n\nexport default class extends Controller {\n static targets = [\"flash\", \"content\"]\n\n connect() {\n if (this.contentTarget.textContent != \"\") {\n this.toggleFlash()\n }\n\n if (this.flashTarget.classList.contains(\"dismiss-initially\")) {\n this.hide()\n }\n\n document.body.addEventListener(\"kin:flasherEvent\", this.handleFlasher.bind(this))\n }\n\n handleFlasher(e) {\n this.flashTarget.classList.add(e.detail.type)\n this.contentTarget.innerText = e.detail.message\n this.toggleFlash()\n }\n\n toggleFlash() {\n setTimeout(this.show.bind(this), 250)\n setTimeout(this.hide.bind(this), 6000)\n }\n\n show() {\n this.flashTarget.classList.remove(\"dismiss\")\n }\n\n hide() {\n this.flashTarget.classList.add(\"dismiss\")\n this.flashTarget.classList.remove(\"info\", \"success\", \"error\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n countSelectTarget: HTMLSelectElement\n limitsSelectTarget: HTMLSelectElement\n countTarget: HTMLElement\n\n static targets: string[] = [\"count\", \"countSelect\", \"form\", \"limitsSelect\"]\n\n initialize(): void {\n this.hide_zero_option()\n if (this.limits_set_to_none()) {\n this.hide_counts()\n }\n }\n\n hide_zero_option(): void {\n this.countSelectTarget.options[0].hidden = true\n }\n\n toggleLimits(e: Event): void {\n if (this.limits_set_to_none()) {\n return this.zero_out_golf_cart_count()\n }\n\n this.handle_limits_value_change()\n }\n\n handle_limits_value_change(): void {\n if (this.countSelectTarget.value === \"0\") {\n this.countSelectTarget.value = \"1\"\n this.show_counts()\n }\n }\n\n zero_out_golf_cart_count(): void {\n this.countSelectTarget.value = \"0\"\n this.hide_counts()\n }\n\n show_counts(): void {\n this.countTarget.classList.remove(\"hidden\")\n }\n\n hide_counts(): void {\n this.countTarget.classList.add(\"hidden\")\n }\n\n limits_set_to_none(): boolean {\n return this.limitsSelectTarget.value === \"None\"\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport Flasher from \"../../utils/flasher\"\n\nexport default class extends Controller {\n static targets = [\"partial\"]\n\n connect() {\n document.addEventListener(\"kin-datepicker:change\", e => {\n if (e.detail.id === \"bright_policy_from_date__mask\") {\n let toDate = document.getElementById(\"datepicker__to_date\")\n toDate.updateStartDate(e.detail.dateString)\n }\n\n if (e.detail.id === \"bright_policy_to_date__mask\") {\n let fromDate = document.getElementById(\"datepicker__from_date\")\n fromDate.updateEndDate(e.detail.dateString)\n }\n\n setTimeout(() => {\n document.getElementById(\"datepicker__to_date\").closest(\"form\").querySelector(\"kin-form-validation\").triggerRefresh()\n }, 5)\n })\n }\n\n handleSuccess(e) {\n this.partialTarget.children[0].innerHTML = e.detail[0].documentElement.children[1].children[0].innerHTML\n Flasher.success(\"Lookin' gucci\")\n }\n\n handleError(e) {\n Flasher.error(\"Not lookin' gucci, fix your dates\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"link\"]\n connect() {}\n\n disableLinks() {\n this.linkTargets.forEach(link => {\n link.style.pointerEvents = \"none\"\n link.style.opacity = \"0.5\"\n link.textContent = \"Processing...\"\n })\n\n // delay to give the job a chance to finish\n this.delay(3000).then(() => {\n location.reload()\n })\n }\n\n delay(ms) {\n return new Promise(resolve => setTimeout(resolve, ms))\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"originalCode\", \"code\", \"editorTree\", \"json\", \"form\"]\n\n connect() {\n const options = {\n modes: [\"tree\", \"code\"],\n onChangeText: s => this.outputJSON(s)\n }\n this.treeEditor = new JSONEditor(this.editorTreeTarget, options)\n\n const json = this.jsonTarget.value\n const originalJson = JSON.parse(json)\n\n this.originalCodeTarget.innerText = JSON.stringify(originalJson, null, 4)\n\n this.treeEditor.set(originalJson)\n this.outputJSON(json)\n }\n\n outputJSON(jsonString) {\n this.jsonTarget.value = jsonString\n this.codeTarget.innerText = JSON.stringify(JSON.parse(jsonString), null, 4)\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\n\nexport default class extends Controller {\n static targets = [\"link\"]\n\n connect() {\n let link = this.linkTarget\n Rails.ajax({\n url: this.linkTarget.href,\n type: \"GET\",\n success: function (data) {\n if (data[\"kustomer_link\"]) {\n link.classList.remove(\"hidden\")\n link.href = data[\"kustomer_link\"]\n }\n }\n })\n }\n}\n","import { Controller } from \"stimulus\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"form\", \"status\", \"lostGroup\", \"exitReasonPath\", \"lostHiddenField\"]\n\n connect() {\n if (this.hasExitReasonPathTarget) {\n this.updateExitReason()\n }\n setTimeout(() => {\n this.updateLostGroup()\n }, 1000)\n }\n\n updateExitReason() {\n var exitReason = this.statusTarget.value\n var exitPath = this.exitReasonPathTarget.dataset.exitPath\n this.exitReasonPathTarget.value = exitPath + exitReason\n utils.refreshVisibleFields(this.formTarget)\n }\n\n updateLostGroup() {\n if (this.hasStatusTarget && (this.statusTarget.getAttribute(\"data-value\") === \"lost\" || this.statusTarget.value == \"lost\")) {\n if (this.hasExitReasonPathTarget) {\n this.lostHiddenFieldTarget.value = \"lost\"\n }\n this.showLostGroup()\n } else {\n if (this.hasExitReasonPathTarget) {\n this.lostHiddenFieldTarget.value = this.lostHiddenFieldTarget.dataset.value\n }\n this.hideLostGroup()\n }\n utils.refreshVisibleFields(this.formTarget)\n }\n\n hideLostGroup() {\n this.lostGroupTarget.classList.add(\"hidden\")\n this.lostGroupTarget.querySelectorAll(\"[required]\").forEach(field => {\n field.disabled = true\n })\n }\n\n showLostGroup() {\n this.lostGroupTarget.classList.remove(\"hidden\")\n this.lostGroupTarget.querySelector(\"kin-magic-fieldset\").requestUpdate()\n this.lostGroupTarget.querySelectorAll(\"[required]\").forEach(field => {\n field.disabled = false\n })\n utils.refreshVisibleFields(this.formTarget)\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"rating\", \"accounting\", \"option\"]\n\n connect() {\n const currentlySelected = this.optionTarget.querySelector(`[value='${this.ledgerType()}']`)\n if (currentlySelected) {\n currentlySelected.selected = true\n }\n this.showLedger()\n }\n\n toggle() {\n const params = new URLSearchParams(window.location.search)\n params.set(\"ledger_type\", this.optionTarget.value)\n history.pushState(\"\", \"\", `?${params.toString()}`)\n this.showLedger()\n }\n\n ledgerType() {\n return new URLSearchParams(window.location.search).get(\"ledger_type\")\n }\n\n showLedger() {\n if (this.ledgerType() == \"rating\") {\n this.showRating()\n refreshVisibleFields(this.accountingTarget.querySelector(\"form\"))\n } else {\n this.showAccounting()\n }\n }\n\n showRating() {\n this.ratingTarget.classList.remove(\"hidden\")\n this.accountingTarget.classList.add(\"hidden\")\n }\n\n showAccounting() {\n this.ratingTarget.classList.add(\"hidden\")\n this.accountingTarget.classList.remove(\"hidden\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\n \"address1\",\n \"address2\",\n \"addressCompletionContainer\",\n \"mailingAddress\",\n \"mortgageeAddress\",\n \"otherAddressContainer\",\n \"otherRecipientPreview\",\n \"policyAddress\",\n \"policyAddressesContainer\",\n \"unitNumber\"\n ]\n\n onRecipientChange(event) {\n let selectedText = event.target.options[event.target.selectedIndex].text\n\n if (selectedText.match(/Policy/)) {\n this.policyAddressTarget.classList.remove(\"hidden\")\n this.toggleMailingAddressPreview(selectedText)\n this.toggleMortgageeAddressPreview(selectedText)\n } else if (selectedText.match(/Mailing/)) {\n this.toggleMailingAddressPreview(selectedText)\n this.hidePolicyAddress()\n this.toggleMortgageeAddressPreview(selectedText)\n } else if (selectedText.match(/Mortgagee/)) {\n this.hidePolicyAddress()\n this.toggleMailingAddressPreview(selectedText)\n this.toggleMortgageeAddressPreview(selectedText)\n } else {\n this.hidePolicyAddress()\n this.toggleMailingAddressPreview(\"no address selected\")\n this.toggleMortgageeAddressPreview(\"no address selected\")\n }\n }\n\n toggleMailingAddressPreview(selectedText) {\n let addressText = selectedText.substring(17).replace(/(\\s|,)/g, \"\")\n\n if (this.hasMailingAddressTarget) {\n for (let addressTarget of this.mailingAddressTargets) {\n let preview = addressTarget.textContent.replace(/(\\s|,)/g, \"\")\n\n if (selectedText != \"no address selected\" && preview.includes(addressText)) {\n addressTarget.classList.remove(\"hidden\")\n } else {\n addressTarget.classList.add(\"hidden\")\n }\n }\n }\n }\n\n toggleMortgageeAddressPreview(selectedText) {\n let addressText = selectedText.substring(18).replace(/(\\s|,)/g, \"\")\n\n if (this.hasMortgageeAddressTarget) {\n for (let addressTarget of this.mortgageeAddressTargets) {\n let preview = addressTarget.textContent.replace(/(\\s|,)/g, \"\")\n\n if (selectedText != \"no address selected\" && preview.includes(addressText)) {\n addressTarget.classList.remove(\"hidden\")\n } else {\n addressTarget.classList.add(\"hidden\")\n }\n }\n }\n }\n\n hidePolicyAddress() {\n if (this.hasPolicyAddressTarget) this.policyAddressTarget.classList.add(\"hidden\")\n }\n\n onAddressContainerChange(event) {\n this.policyAddressesContainerTarget.classList.toggle(\"hidden\")\n this.otherAddressContainerTarget.classList.toggle(\"hidden\")\n }\n\n onAddressCompletion(event) {\n // We need this delay to get the value after selecting an address from\n // address completion helper\n setTimeout(async () => {\n let address = event.target.value\n\n await fetch(`/kintranet/address_auto_completions?address=${address}`)\n .then(response => {\n return response.json()\n })\n .then(data => {\n let { streetAddress, city, state, zipcode } = data\n\n this.address1Target.textContent = streetAddress\n this.address2Target.textContent = `${city}, ${state} ${zipcode}`\n this.createUnitNumberSpan(this.unitNumberTarget.value)\n\n this.addressCompletionContainerTarget.classList.remove(\"hidden\")\n\n // Don't show the container if autocompletion doesn't return data needed\n if (/null/.test(this.address2Target.textContent)) {\n this.addressCompletionContainerTarget.classList.add(\"hidden\")\n }\n })\n }, 1000)\n }\n\n setOtherRecipientPreview(event) {\n this.otherRecipientPreviewTarget.textContent = event.target.value === \"\" ? event.target.dataset.default : event.target.value\n }\n\n onUnitNumberChange(event) {\n let unitNumber = event.target.value\n\n if (!!document.getElementById(\"unit_number\")) {\n const spanElement = document.getElementById(\"unit_number\")\n spanElement.textContent = ` ${unitNumber}`\n } else {\n this.createUnitNumberSpan(unitNumber)\n }\n }\n\n createUnitNumberSpan(unitNumber) {\n if (document.getElementById(\"unit_number\") === null) {\n const spanElement = document.createElement(\"span\")\n spanElement.id = \"unit_number\"\n spanElement.textContent = ` ${unitNumber}`\n\n this.address1Target.appendChild(spanElement)\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nconst paymentTypes = {\n \"-1\": \"Shortpayment\",\n 1: \"Overpayment\",\n 0: \"Exactpayment\"\n}\n\nexport default class extends Controller {\n static targets = [\"amount\", \"paymentType\", \"transactionStatusSelect\", \"transactionStatusLabel\"]\n\n detectPaymentType(event, b) {\n if (!event.target.value) {\n this.paymentTypeTarget.classList.toggle(\"hidden\", true)\n this.disableSelect()\n return\n }\n\n let difference = Math.sign(event.target.value - event.target.dataset.transactionAmount)\n\n this.paymentTypeTarget.innerHTML = paymentTypes[difference]\n this.paymentTypeTarget.classList.toggle(\"hidden\", !difference)\n\n if (difference) {\n this.transactionStatusSelectTarget.value = \"approved\"\n }\n\n this.disableSelect(difference)\n }\n\n validateAmount(event) {\n if (!event.target.value) {\n return\n }\n\n const sanitizedValue = this.sanitizeAmount(event.target.value)\n if (sanitizedValue !== event.target.value) {\n event.target.value = sanitizedValue\n }\n }\n\n disableSelect(disable = false) {\n this.transactionStatusLabelTarget.classList.toggle(\"readonly\", disable)\n this.transactionStatusLabelTarget.classList.toggle(\"disabled\", disable)\n }\n\n sanitizeAmount(value) {\n // Allow only numbers with up to two decimal places\n const match = value.match(/^\\d*(\\.\\d{0,2})?/)\n return match ? match[0] : \"\"\n }\n}\n","import { Controller } from \"stimulus\"\nimport { GeoData, Geometry } from \"./interfaces\"\nimport { request } from \"../../utils/request\"\nimport {} from \"googlemaps\"\n\nexport default class extends Controller {\n errorTarget: HTMLElement\n mapContainerTarget: HTMLElement\n spinnerTarget: HTMLElement\n dataUrl: string\n geoData: GeoData\n\n static targets: string[] = [\"error\", \"mapContainer\", \"spinner\"]\n\n initialize() {\n this.dataUrl = this.mapContainerTarget.getAttribute(\"data-url\")\n }\n\n connect() {\n this.getGeoJSON()\n }\n\n getGeoJSON() {\n const response = request(this.dataUrl)\n response.then(json => {\n this.geoData = json.geojson\n try {\n this.makeMap()\n this.mapContainerTarget.classList.remove(\"hidden\")\n this.spinnerTarget.classList.add(\"hidden\")\n } catch (e) {\n console.log(e)\n this.displayErrorMessage()\n }\n })\n }\n\n displayErrorMessage() {\n this.spinnerTarget.classList.add(\"hidden\")\n this.errorTarget.classList.remove(\"hidden\")\n }\n\n makeMap() {\n if (this.geoData.geometry) {\n new google.maps.Map(this.mapContainerTarget, {\n zoom: 7,\n center: this.calculateCenter(this.geoData.geometry)\n }).data.addGeoJson(this.geoData)\n } else {\n // When there are no regions to render, show an empty map\n // that approximately covers the contiguous 48 US states.\n new google.maps.Map(this.mapContainerTarget, {\n zoom: 5,\n center: { lng: -95, lat: 39 }\n })\n }\n }\n\n calculateCenter(geometry: Geometry) {\n const depth = geometry.type == \"Polygon\" ? 1 : 2\n const polygonCoords = geometry.coordinates.flat(depth)\n\n let i: number\n // Setup the min/max outside of valid lat/lon range:\n // Valid ranges are -90 to 90 for latitude and -180 to 180 for longitude.\n let lngMin = 181\n let lngMax = -181\n let latMin = 91\n let latMax = -91\n\n for (i = 0; i < polygonCoords.length; i++) {\n lngMin = Math.min(lngMin, polygonCoords[i][0])\n lngMax = Math.max(lngMax, polygonCoords[i][0])\n latMin = Math.min(latMin, polygonCoords[i][1])\n latMax = Math.max(latMax, polygonCoords[i][1])\n }\n let centerLng = lngMin + (lngMax - lngMin) / 2\n let centerLat = latMin + (latMax - latMin) / 2\n\n return { lng: centerLng, lat: centerLat }\n }\n}\n","import { Controller } from \"stimulus\"\nimport * as utils from \"../../components/shared/utils/utils\"\nexport default class extends Controller {\n static targets = [\n \"loanFields\",\n \"loanNumber\",\n \"noMortgageeId\",\n \"mortgageeClause\",\n \"clauseList\",\n \"fax\",\n \"email\",\n \"form\",\n \"otherMortgageeName\",\n \"otherMortgageeNameField\"\n ]\n\n connect() {\n let autocompleteID = this.formTarget.querySelector(\"[data-mortgagee-id]\").dataset.mortgageeId\n if (autocompleteID) {\n utils.autocompleteOnChange(`mortgagee_${autocompleteID}_policy_contact_contact_id`, e => this.otherMortgageeNameDisplay(e))\n } else {\n utils.autocompleteOnChange(`mortgagee__policy_contact_contact_id`, e => this.otherMortgageeNameDisplay(e))\n }\n }\n\n otherMortgageeNameDisplay(e) {\n if (e) {\n if (Number(e.value) == 2) {\n this.otherMortgageeNameTarget.classList.remove(\"hidden\")\n this.otherMortgageeNameFieldTarget.disabled = false\n\n utils.refreshVisibleFields(this.loanFieldsTarget.closest(\"form\"))\n return\n }\n this.updateClause(e.value)\n }\n }\n\n setHasMortgage(e) {\n if (e.target.checked) {\n this.loanFieldsTarget.querySelectorAll(\"input, select, textarea\").forEach(f => {\n f.disabled = true\n })\n this.noMortgageeIdTarget.disabled = false\n utils.refreshVisibleFields(this.loanFieldsTarget.closest(\"form\"))\n } else {\n this.noMortgageeIdTarget.disabled = true\n this.loanFieldsTarget.querySelectorAll(\"input, select, textarea\").forEach(f => {\n f.disabled = false\n })\n utils.refreshVisibleFields(this.loanFieldsTarget.closest(\"form\"))\n }\n }\n\n updateClause(mortgageeId) {\n var data = this.clauseListTarget.querySelector(\"option[value='\" + mortgageeId + \"']\").dataset\n this.mortgageeClauseTarget.value = data.clause\n this.faxTarget.value = data.fax\n this.emailTarget.value = data.email\n\n this.otherMortgageeNameTarget.classList.add(\"hidden\")\n this.otherMortgageeNameFieldTarget.disabled = true\n utils.refreshVisibleFields(this.loanFieldsTarget.closest(\"form\"))\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport * as utils from \"../../components/shared/utils/utils\"\nimport Flasher from \"../../utils/flasher\"\n\nexport default class extends Controller {\n static targets = [\"lostHiddenField\"]\n\n connect() {\n document.addEventListener(\"kin-modal:close\", () => location.reload())\n }\n\n toggleOpportunityStatus(e) {\n if (e.target.value == \"lost\") {\n const opportunityId = e.target.dataset.opportunity\n utils.openModal(\"lost-reason-information-\" + opportunityId)\n } else {\n Rails.ajax({\n url: e.target.dataset[\"url\"],\n type: \"PUT\",\n data: `opportunity[status]=${e.target.value}`,\n complete: request => {\n const message = JSON.parse(request.response).message\n Flasher.success(message)\n setTimeout(() => {\n window.location.reload(true)\n }, 1000)\n }\n })\n }\n }\n\n undoDuplicate(e) {\n Rails.ajax({\n url: e.target.dataset[\"url\"],\n type: \"PUT\",\n data: `opportunity[status]=${e.target.dataset[\"previous_status\"]}`,\n complete: request => {\n const message = JSON.parse(request.response).message\n Flasher.success(message)\n setTimeout(() => {\n window.location.reload(true)\n }, 1000)\n }\n })\n }\n\n handleStatusModal() {\n window.location.reload(true)\n }\n\n capitalize(word) {\n return word.charAt(0).toUpperCase() + word.slice(1)\n }\n\n getUpdatedIntentToPurchase(currentIntentToPurchase, intentToPurchaseList) {\n const indexOfIntentToPurchase = intentToPurchaseList.indexOf(currentIntentToPurchase)\n\n let updatedIntentToPurchase\n if (indexOfIntentToPurchase + 1 > intentToPurchaseList.length - 1) {\n updatedIntentToPurchase = intentToPurchaseList[0]\n } else {\n updatedIntentToPurchase = intentToPurchaseList[indexOfIntentToPurchase + 1]\n }\n return updatedIntentToPurchase\n }\n\n changeOpportunityIntentToPurchase(e) {\n const url = e.target.dataset[\"url\"]\n const currentIntentToPurchase = e.target.dataset[\"intentToPurchase\"]\n const intentToPurchaseList = JSON.parse(e.target.dataset[\"intentToPurchaseList\"])\n\n const updatedIntentToPurchase = this.getUpdatedIntentToPurchase(currentIntentToPurchase, intentToPurchaseList)\n\n e.target.dataset[\"intentToPurchase\"] = updatedIntentToPurchase\n e.target.textContent = this.capitalize(updatedIntentToPurchase)\n\n Rails.ajax({\n url: url,\n type: \"PUT\",\n data: `opportunity[intent_to_purchase]=${updatedIntentToPurchase}`\n })\n }\n}\n","import { Controller } from \"stimulus\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"otherReason\"]\n\n handleChange(e) {\n const { value } = e.target\n if (value === \"other\") {\n this.otherReasonTarget.classList.remove(\"hidden\")\n this.otherReasonTarget.querySelectorAll(\"[required]\").forEach(field => {\n field.disabled = false\n })\n } else {\n this.otherReasonTarget.classList.add(\"hidden\")\n this.otherReasonTarget.querySelectorAll(\"[required]\").forEach(field => {\n field.disabled = true\n })\n }\n utils.refreshVisibleFields(this.formTarget)\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\n\nexport default class extends Controller {\n static targets = [\"resetLink\"]\n\n refreshToken(e) {\n e.preventDefault()\n\n const url = e.target.href\n const destination = e.target.dataset.destination\n\n Rails.ajax({\n url: url,\n type: \"POST\",\n data: new URLSearchParams(Object.entries({ destination: destination })).toString(),\n success: result => {\n const resetLink = result.recovery_url\n let linkElement = document.createElement(\"a\")\n linkElement.href = resetLink\n linkElement.appendChild(document.createTextNode(\"(Customer Link)\"))\n this.resetLinkTarget.appendChild(linkElement)\n }\n })\n }\n}\n","import { Controller } from \"stimulus\"\nimport { datadogLogs } from \"@datadog/browser-logs\"\nimport Rails from \"rails-ujs\"\n\nexport default class extends Controller {\n static targets = [\n \"paymentAmountForm\",\n \"paymentAmountEntry\",\n \"declineProposalAmount\",\n \"paymentAmount\",\n \"proposedActions\",\n \"proposedActionsTable\",\n \"proposedActionsConfirmation\",\n \"checkNumber\",\n \"checkNumberValue\",\n \"depositedOn\",\n \"depositedOnValue\",\n \"lockboxReference\",\n \"lockboxReferenceValue\"\n ]\n\n declare readonly paymentAmountFormTarget: HTMLFormElement\n declare readonly proposedActionsTarget: HTMLElement\n declare readonly proposedActionsTableTarget: HTMLElement\n declare paymentAmountEntryTarget: HTMLInputElement\n declare paymentAmountTarget: HTMLInputElement\n declare declineProposalAmountTarget: HTMLInputElement\n declare readonly proposedActionsConfirmationTarget: HTMLElement\n declare checkNumberTarget: HTMLInputElement\n declare checkNumberValueTarget: HTMLInputElement\n declare depositedOnTarget: HTMLInputElement\n declare depositedOnValueTarget: HTMLInputElement\n declare lockboxReferenceTarget: HTMLInputElement\n declare lockboxReferenceValueTarget: HTMLInputElement\n\n get token(): string {\n const metaEl = document.querySelector('input[name=\"authenticity_token\"]') as HTMLInputElement\n return metaEl.value\n }\n\n fetchPreview(e) {\n e.preventDefault()\n\n fetch(this.sourceUrl(this.paymentAmountFormTarget.action), {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-Csrf-Token\": this.token\n }\n })\n .then(response => {\n if (!response.ok) {\n throw new Error(response.statusText ? response.statusText : \"Response status not Ok\")\n }\n return response.json()\n })\n .then(response => {\n this.handleSuccess(response)\n })\n .catch(e => {\n this.handleError(e)\n })\n }\n\n sourceUrl(baseUrl) {\n let paymentAmount = this.paymentAmountEntryTarget.value\n let checkNumber = this.checkNumberValueTarget.value\n let depositedOn = this.depositedOnValueTarget.value\n let lockboxReference = this.lockboxReferenceValueTarget.value\n\n return `${baseUrl}?payment_amount=${paymentAmount}&external_id=${checkNumber}&deposited_on=${depositedOn}&lockbox_reference=${lockboxReference}`\n }\n\n handleError(error) {\n const message = error.message ? error.message : \"Unknown error\"\n datadogLogs.logger.error(`Could not generate proposed payment actions. Error message: ${message}`)\n console.error(`Could not generate proposed payment actions. Error message: ${message}`)\n }\n\n handleSuccess(response) {\n this.paymentAmountFormTarget.classList.add(\"hidden\")\n this.proposedActionsTarget.classList.remove(\"hidden\")\n this.proposedActionsConfirmationTarget.classList.remove(\"hidden\")\n this.declineProposalAmountTarget.value = this.paymentAmountEntryTarget.value\n this.paymentAmountTarget.value = this.paymentAmountEntryTarget.value\n\n this.checkNumberValueTarget.value = this.checkNumberTarget.value\n this.depositedOnValueTarget.value = this.depositedOnTarget.value\n this.lockboxReferenceValueTarget.value = this.lockboxReferenceTarget.value\n\n const proposedActions = response.billing_transactions.map(transaction => this.buildTransactionRow(transaction))\n this.proposedActionsTableTarget.innerHTML = proposedActions.join(\"\")\n }\n\n buildTransactionRow(item) {\n return `\n \n \n ${item.payment_type}\n \n \n ${item.amount || item.amount_cents / 100}\n \n \n ${item.status}\n \n \n `\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport debounce from \"lodash.debounce\"\n\nexport default class extends Controller {\n static targets = [\n \"cardNumber\",\n \"expMonth\",\n \"expYear\",\n \"clientKey\",\n \"loginId\",\n \"dataValue\",\n \"dataDescriptor\",\n \"form\",\n \"submitButton\",\n \"errors\",\n \"formHeader\",\n \"loading\",\n \"paymentForm\",\n \"paymentSuccess\",\n \"paymentError\",\n \"processPayment\",\n \"errorBody\",\n \"errorHeader\",\n \"formBody\",\n \"formHeader\",\n \"successBody\",\n \"successHeader\"\n ]\n\n submitForm = debounce(() => {\n this.formTarget.submit()\n }, 1000)\n\n submitCreditCardInfo(e) {\n e.preventDefault()\n Rails.disableElement(this.submitButtonTarget)\n var authData = {}\n authData.clientKey = this.clientKeyTarget.value\n authData.apiLoginID = this.loginIdTarget.value\n var cardData = {}\n\n cardData.cardNumber = this.cardNumberTarget.value.replace(/[^\\d]/g, \"\")\n cardData.month = this.expMonthTarget.value\n cardData.year = this.expYearTarget.value\n\n var secureData = {}\n secureData.authData = authData\n secureData.cardData = cardData\n\n Accept.dispatchData(secureData, this.responseHandler.bind(this))\n }\n\n responseHandler(response) {\n if (response.messages.resultCode === \"Error\") {\n response.messages.message.forEach(message => {\n this.errorsTarget.innerText = message.text\n Rails.enableElement(this.submitButtonTarget)\n })\n } else {\n this.paymentFormUpdate(response.opaqueData)\n }\n }\n\n paymentFormUpdate(opaqueData) {\n this.dataValueTarget.value = opaqueData.dataValue\n this.dataDescriptorTarget.value = opaqueData.dataDescriptor\n this.cardNumberTarget.value = \"\"\n this.expMonthTarget.value = \"\"\n this.expYearTarget.value = \"\"\n this.submitForm()\n }\n\n onCreditCardPaymentSubmit(e) {\n this.displayState(\"loading\")\n }\n\n displayState(state) {\n if (state === \"loading\") {\n this.loadingTarget.classList.remove(\"hidden\")\n } else if (state === \"success\") {\n this.loadingTarget.classList.add(\"hidden\")\n this.successBodyTarget.classList.remove(\"hidden\")\n this.successHeaderTarget.classList.remove(\"hidden\")\n\n this.errorBodyTarget.classList.add(\"hidden\")\n this.errorHeaderTarget.classList.add(\"hidden\")\n this.formBodyTarget.classList.add(\"hidden\")\n this.formHeaderTarget.classList.add(\"hidden\")\n } else if (state === \"error\") {\n this.loadingTarget.classList.add(\"hidden\")\n this.errorBodyTarget.classList.remove(\"hidden\")\n this.errorHeaderTarget.classList.remove(\"hidden\")\n\n this.formBodyTarget.classList.add(\"hidden\")\n this.formHeaderTarget.classList.add(\"hidden\")\n this.successBodyTarget.classList.add(\"hidden\")\n this.successHeaderTarget.classList.add(\"hidden\")\n }\n }\n\n handleSuccess(e) {\n this.reloadBillingStatus()\n this.displayState(\"success\")\n }\n\n handleError(e) {\n this.displayState(\"error\")\n }\n\n reloadBillingStatus() {\n window.location.reload()\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"formField\", \"fieldToggle\"]\n\n connect() {\n this.selectField()\n }\n\n selectField() {\n let toggle\n if (this.formFieldTarget.value.endsWith(\"card\")) {\n toggle = \"card\"\n } else {\n toggle = this.formFieldTarget.value\n }\n this.fieldToggleTargets.forEach(entry => {\n entry.classList.toggle(\"hidden\", entry.getAttribute(\"data-formfield\") != toggle)\n })\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"paymentType\", \"paymentSchedule\"]\n\n connect() {\n this.select()\n }\n\n select() {\n var options = Array.from(this.paymentScheduleTarget.options)\n if (this.paymentTypeTarget.value == \"escrow\") {\n options.filter(option => option.value != \"full\").forEach(option => (option.disabled = true))\n options.find(option => option.value == \"full\").selected = true\n this.billingState()\n } else {\n options.forEach(option => (option.disabled = false))\n this.billingState()\n }\n }\n\n billingState() {\n if (this.paymentTypeTarget.closest(\"#billing\").querySelector(\"#js--payment-type\")) {\n this.paymentTypeTarget.closest(\"#billing\").querySelector(\"#js--payment-type\").classList.remove(\"hidden\")\n } else {\n window.location.reload()\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"status\", \"firstPayment\", \"paymentType\", \"missedInstallment\"]\n\n connect() {\n this.renewEffectiveDate = this.data.get(\"renew-effective-date\")\n this.nonRenewEffectiveDate = this.data.get(\"non-renew-effective-date\")\n\n this.statusOnChange()\n }\n\n statusOnChange() {\n let date\n\n if (this.statusTarget.value == \"create_renewal_event\" || this.statusTarget.value == \"renewed\") {\n date = this.renewEffectiveDate\n } else {\n date = this.nonRenewEffectiveDate\n }\n\n this.missedInstallmentTarget.classList.add(\"hidden\")\n\n if (this.statusTarget.value == \"create_non_pay_installment_cancellation\") {\n this.firstPaymentTarget.value = \"Yes\"\n this.paymentTypeTarget.value = \"quarterly\"\n this.missedInstallmentTarget.classList.remove(\"hidden\")\n }\n document.getElementById(\"effective_date\").value = date\n document.getElementById(\"effective_date__mask\").value = date\n }\n}\n","import { Controller } from \"stimulus\"\nimport { getDifferenceInDays, accountForUTC } from \"../../components/shared/validation/utilities/date\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"category\",\n \"policyEventDate\",\n \"repairsAllowedLabel\",\n \"repairsAllowedSelect\",\n \"reasonsAutocomplete\",\n \"cancellationScript\",\n \"dependentFields\",\n \"insuredRequestLa\",\n \"uploadSet\",\n \"uploadField\",\n \"uploadFieldInput\",\n \"duplicateCoverage\",\n \"documentLabel\",\n \"dateDisplay\",\n \"sale\",\n \"cancelDateDisclaimer\"\n ]\n static values = { hasOpenClaims: Boolean }\n\n connect() {\n this.policyEffectiveDate = this.data.get(\"effective-date\")\n this.termEffectiveDate = this.data.get(\"term-effective-date\")\n this.cancellationButtonText = this.data.get(\"cancellation-button-text\")\n this.scheduledTerminationUrl = this.data.get(\"scheduled-termination-url\")\n this.cancellationUrl = this.data.get(\"cancellation-url\")\n this.uwCancellationDate = this.data.get(\"uw-cancellation-date\")\n this.uwCancellationProtectionPeriodProtected = this.data.get(\"uw-cancellation-protection-period-protected\")\n this.hasOpenClaimsValue = this.data.get(\"has-open-claims\") === \"true\"\n this.formValidation = this.categoryTarget.closest(\"form\").querySelector(\"kin-form-validation\")\n this.freeLookExpired = this.data.get(\"uw-free-look-expired\")\n this.updateRepairsAllowed()\n document.addEventListener(\"kin-form-validation:ready\", e => {\n if (e.detail.validationElement === this.formValidation) {\n // When Form Validation is ready to accept calls, we run this.\n this.categoryOnChange()\n }\n })\n\n document.addEventListener(\"kin-modal:close\", e => {\n if (e.detail.id === \"modal__cancellation-form\") {\n // Tell Form Validation that we can remove the error to prevent duplicates.\n this.formValidation.enableSubmit()\n }\n })\n\n if (this.uploadSetTarget.getAttribute(\"data-payment-made\") === \"true\") {\n utils.autocompleteOnChange(\"policy_event_event_reason_ids\", e => this.onDateSelect(e))\n } else if (this.uploadSetTarget.getAttribute(\"data-payment-made\") === \"false\") {\n this.uploadFieldInputTarget.required = false\n }\n }\n\n onDateSelect(e) {\n let completePayment = this.uploadSetTarget.getAttribute(\"data-payment-made\") === \"true\"\n let proofOfSale = this.uploadSetTarget.getAttribute(\"data-proof-of-sale\") === \"true\"\n let proofOfDuplicateCoverage = this.uploadSetTarget.getAttribute(\"data-proof-of-duplicate-coverage\") === \"true\"\n let cancellationRequestDoc = this.uploadSetTarget.getAttribute(\"data-cancellation-request-doc\") === \"true\"\n let today = accountForUTC(new Date(), true)\n let dateSelection = null\n if (this.policyEventDateTarget.valueAsDate) {\n dateSelection = accountForUTC(this.policyEventDateTarget.valueAsDate, true)\n }\n let backDateSelection = dateSelection ? dateSelection < today : false\n let autocompleteSelect = this.dependentFieldsTarget.querySelector(\".autocomplete__container select\")\n let itemsToSearchFor = [\"9\", \"10\", \"13\", \"14\"]\n let selectedReasons = Array.from(autocompleteSelect.selectedOptions).some(item => itemsToSearchFor.includes(item.value))\n\n if (this.hasInsuredRequestLaTarget && this.categoryTarget.value == \"Insured request\" && !cancellationRequestDoc) {\n this.insuredRequestLaTarget.classList.remove(\"hidden\")\n this.duplicateCoverageTarget.classList.add(\"hidden\")\n this.saleTarget.classList.add(\"hidden\")\n this.documentLabelTarget.value = \"cancellation_request\"\n this.uploadSetTarget.classList.remove(\"hidden\")\n this.uploadFieldTarget.classList.remove(\"hidden\")\n this.uploadFieldInputTarget.required = true\n } else if (\n Array.from(autocompleteSelect.selectedOptions).find(item => item.value === \"8\") &&\n backDateSelection &&\n completePayment &&\n !proofOfSale\n ) {\n this.saleTarget.classList.remove(\"hidden\")\n this.duplicateCoverageTarget.classList.add(\"hidden\")\n if (this.hasInsuredRequestLaTarget) {\n this.insuredRequestLaTarget.classList.add(\"hidden\")\n }\n this.documentLabelTarget.value = \"proof_of_sale\"\n this.uploadSetTarget.classList.remove(\"hidden\")\n this.uploadFieldTarget.classList.remove(\"hidden\")\n this.uploadFieldInputTarget.required = true\n } else if (selectedReasons === true && backDateSelection && completePayment && !proofOfDuplicateCoverage) {\n this.duplicateCoverageTarget.classList.remove(\"hidden\")\n this.saleTarget.classList.add(\"hidden\")\n if (this.hasInsuredRequestLaTarget) {\n this.insuredRequestLaTarget.classList.add(\"hidden\")\n }\n this.documentLabelTarget.value = \"proof_of_duplicate_coverage\"\n this.uploadSetTarget.classList.remove(\"hidden\")\n this.uploadFieldTarget.classList.remove(\"hidden\")\n this.uploadFieldInputTarget.required = true\n } else {\n this.duplicateCoverageTarget.classList.add(\"hidden\")\n this.saleTarget.classList.add(\"hidden\")\n this.documentLabelTarget.value = \"\"\n this.uploadSetTarget.classList.add(\"hidden\")\n this.uploadFieldTarget.classList.add(\"hidden\")\n this.uploadFieldInputTarget.required = false\n }\n\n if (this.policyEventDateTarget.valueAsDate && this.hasDateDisplayTarget) {\n this.dateDisplayTarget.innerHTML = dateSelection.toLocaleDateString()\n } else if (this.hasDateDisplayTarget) {\n this.dateDisplayTarget.innerHTML = \"[CANCELLATION DATE]\"\n }\n }\n\n categoryOnChange() {\n this.onDateSelect(null)\n let category = this.categoryTarget.value\n let insuredRequestCat = this.categoryTarget.value === \"Insured request\"\n\n category ? this.dependentFieldsTarget.classList.remove(\"hidden\") : this.dependentFieldsTarget.classList.add(\"hidden\")\n\n this.policyEventDateTarget.parentElement.classList.remove(\"disabled\")\n this.cancelDateDisclaimerTarget.classList.add(\"hidden\")\n\n insuredRequestCat ? this.cancellationScriptTarget.classList.remove(\"hidden\") : this.cancellationScriptTarget.classList.add(\"hidden\")\n category.length > 0 ? this.autocomplete.toggleDisabledState(false) : this.autocomplete.toggleDisabledState(true)\n\n Array.from(this.reasonsAutocompleteTarget.querySelectorAll(\"select option\")).forEach(opt => {\n opt.disabled = false\n if (opt.dataset.category !== category) {\n opt.disabled = true\n }\n })\n\n this.autocomplete.reinitialize()\n\n this.updateRepairsAllowed()\n this.updateEffectiveDate()\n this.checkIfEligible()\n }\n\n updateRepairsAllowed() {\n if (this.categoryTarget.value !== \"Underwriting\") {\n this.repairsAllowedSelectTarget.value = \"\"\n this.repairsAllowedLabelTarget.classList.add(\"hidden\")\n this.repairsAllowedSelectTarget.classList.add(\"hidden\")\n this.repairsAllowedSelectTarget.required = false\n } else if (this.categoryTarget.value == \"Underwriting\") {\n this.repairsAllowedLabelTarget.classList.remove(\"hidden\")\n this.repairsAllowedSelectTarget.classList.remove(\"hidden\")\n this.repairsAllowedSelectTarget.required = true\n }\n }\n\n updateEffectiveDate() {\n this.policyEventDateTarget.parentElement.classList.remove(\"hidden\")\n if (this.categoryTarget.value === \"Rescission\") {\n this.policyEventDateTarget.valueAsDate = new Date(this.policyEffectiveDate)\n this.policyEventDateTarget.readOnly = true\n } else if (this.uwCancellationProtectionPeriodProtected === \"true\") {\n this.policyEventDateTarget.valueAsDate = new Date(this.uwCancellationDate)\n this.policyEventDateTarget.parentElement.classList.add(\"hidden\")\n } else if (this.categoryTarget.value === \"Underwriting\") {\n this.policyEventDateTarget.valueAsDate = new Date(this.uwCancellationDate)\n this.policyEventDateTarget.readOnly = true\n } else if (this.categoryTarget.value === \"Insured request\" && this.policyEventDateTarget.getAttribute(\"data-locked\") === \"true\") {\n this.policyEventDateTarget.valueAsDate = new Date(this.termEffectiveDate)\n this.policyEventDateTarget.readOnly = true\n this.policyEventDateTarget.parentElement.classList.add(\"disabled\")\n this.cancelDateDisclaimerTarget.classList.remove(\"hidden\")\n } else {\n this.policyEventDateTarget.valueAsDate = null\n this.policyEventDateTarget.readOnly = false\n }\n this.onDateSelect(null)\n }\n\n checkIfEligible() {\n if (this.categoryTarget.value === \"Underwriting\" && this.freeLookExpired === \"true\") {\n let disableSubmitMessage =\n \"Warning: Cannot process cancellation for Underwriting category because current date is outside of cancellation window\"\n this.formValidation.disableSubmit(disableSubmitMessage)\n } else if (this.uwCancellationProtectionPeriodProtected === \"true\") {\n let submitMessage =\n \"Warning: Cannot process cancellation for Underwriting category during a Protection Period. This cancellation will process after the Protection Period ends.\"\n this.formValidation.enableSubmit()\n this.formValidation.displayGlobalError(submitMessage, \"warning\")\n this.formValidation.submit.value = \"Schedule Policy Cancellation\"\n this.formValidation.form.action = this.scheduledTerminationUrl\n this.formValidation.pauseValidation = true\n this.formValidation.requestUpdate()\n } else if (this.categoryTarget.value === \"Underwriting\" && this.freeLookExpired === \"false\" && this.hasOpenClaims()) {\n let disableSubmitMessage = `Warning: Cannot cancel a policy with an open claim`\n this.formValidation.disableSubmit(disableSubmitMessage)\n } else {\n this.formValidation.form.action = this.cancellationUrl\n this.formValidation.submit.value = this.cancellationButtonText\n this.formValidation.enableSubmit()\n }\n }\n\n get autocomplete() {\n return this.reasonsAutocompleteTarget.querySelector(\"kin-autocomplete\")\n }\n\n hasOpenClaims() {\n return this.hasOpenClaimsValue\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"paymentTypeInput\", \"transactionForm\"]\n\n changeRequiredFields(e) {\n this.transactionFormTarget.querySelectorAll(\"input, select\").forEach(el => {\n var requiredDuplicateFields = [\"billing_scheduled_transaction[refunds_payable]\", \"billing_scheduled_transaction[amount]\"]\n var standardRequiredFields = [\"billing_scheduled_transaction[accounting_premium]\", \"billing_scheduled_transaction[surplus]\"]\n if (e.target.value == \"duplicate\" && requiredDuplicateFields.includes(el.name)) {\n el.required = true\n } else if (e.target.value == \"duplicate\" && el.name !== \"billing_scheduled_transaction[due_date]\") {\n el.required = false\n } else if (standardRequiredFields.includes(el.name)) {\n el.required = true\n } else if (el.name !== \"billing_scheduled_transaction[due_date]\") {\n el.required = false\n }\n })\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"snapshotDate\"]\n connect() {}\n\n select() {\n var asOfUrl = this.snapshotDateTarget.value\n window.location.replace(asOfUrl)\n }\n}\n","import Flasher from \"../../utils/flasher\"\nimport Rails from \"rails-ujs\"\nimport { Controller } from \"stimulus\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"select\", \"updateEnotice\", \"policyForm\"]\n\n handleChange(e) {\n if (e.target.value == \"0\") {\n utils.openModal(\"preferences\")\n } else {\n this.updateEnotice()\n }\n }\n\n cancelEnotice() {\n this.selectTarget.value = \"1\"\n utils.closeModal(\"preferences\")\n }\n\n updateEnotice() {\n event.preventDefault()\n let url = this.policyFormTarget.action\n\n let data = new FormData(this.policyFormTarget)\n Rails.ajax({\n // Updated to Rails.ajax() from $.ajax() to remove jQuery\n url: url,\n type: \"post\",\n data: data,\n success: function (data) {\n Flasher.success(\"E-Notice Status Changed!\")\n },\n error: function (data) {\n Flasher.error(\"Status not changed 😢\")\n }\n })\n utils.closeModal(\"preferences\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"expiry\", \"noPrior\", \"select\"]\n\n connect() {\n this.noPriorTarget.onchange = this.toggleDisabled.bind(this)\n }\n\n toggleDisabled(event) {\n if (event.target.checked === true) {\n this.expiryTarget.querySelectorAll(\"input\").forEach(f => {\n f.disabled = true\n f.required = false\n })\n } else {\n this.expiryTarget.querySelectorAll(\"input\").forEach(f => {\n f.disabled = false\n f.required = true\n })\n }\n refreshVisibleFields(this.noPriorTarget.closest(\"form\"))\n }\n}\n","import { Controller } from \"stimulus\"\nexport default class extends Controller {\n static targets = [\"selectTransaction\"]\n\n toggle(event) {\n const isCreditCard = event.target.value === \"credit_card\"\n this.selectTransactionTargets.forEach(target => target.classList.toggle(\"hidden\", !isCreditCard))\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"header\",\n \"ruleSelection\",\n \"successIcon\",\n \"errorIcon\",\n \"responseMessage\",\n \"closeModal\",\n \"submitBtn\",\n \"rulesPageBtn\",\n \"viewRuleBtn\",\n \"form\",\n \"product\",\n \"rulesDropdown\",\n \"ruleToCopy\"\n ]\n\n connect() {}\n\n updateForm(e) {\n if (!this.productTarget.value) {\n this.rulesDropdownTarget.classList.add(\"hidden\")\n } else {\n this.rulesDropdownTarget.classList.remove(\"hidden\")\n let blankOption = this.ruleToCopyTarget.options[0]\n this.ruleToCopyTarget.innerText = \"\"\n let dropdown = this.ruleToCopyTarget\n Rails.ajax({\n url: `${this.productTarget.value}/rules`,\n type: \"GET\",\n data: \"\",\n success: function (data) {\n dropdown.options.add(blankOption)\n data.rules.forEach(rule => {\n dropdown.options.add(new Option(rule[0], rule[1]))\n })\n }\n })\n }\n }\n\n resetModal(e) {\n this.headerTarget.innerText = \"Add New Rule\"\n this.ruleSelectionTarget.classList.remove(\"hidden\")\n this.rulesDropdownTarget.classList.add(\"hidden\")\n this.submitBtnTarget.classList.remove(\"hidden\")\n this.rulesPageBtnTarget.classList.add(\"hidden\")\n this.responseMessageTarget.classList.add(\"hidden\")\n this.successIconTarget.classList.add(\"hidden\")\n this.errorIconTarget.classList.add(\"hidden\")\n this.productTarget.selectedIndex = 0\n }\n\n toggleSubmit(e) {\n if (this.ruleToCopyTarget.value !== \"\" && this.productTarget.value !== \"\") {\n this.submitBtnTarget.classList.remove(\"disabled\")\n } else {\n this.submitBtnTarget.classList.add(\"disabled\")\n }\n }\n\n handleSuccess(e) {\n this.ruleSelectionTarget.classList.add(\"hidden\")\n this.headerTarget.innerText = \"Success!\"\n let index = this.ruleToCopyTarget.options.selectedIndex\n let successText = this.ruleToCopyTarget.options[index].innerText + \" rule has been created\"\n this.responseMessageTarget.innerText = successText\n this.successIconTarget.classList.remove(\"hidden\")\n this.submitBtnTarget.classList.add(\"hidden\")\n this.closeModalTarget.innerText = \"Done\"\n this.viewRuleBtnTarget.classList.remove(\"hidden\")\n let url = this.viewRuleBtnTarget.href.replace(\"---\", e.detail[0].id)\n this.viewRuleBtnTarget.href = url\n }\n\n handleError(e) {\n this.ruleSelectionTarget.classList.add(\"hidden\")\n this.headerTarget.innerText = \"Error!\"\n this.submitBtnTarget.disabled == true\n this.submitBtnTarget.classList.add(\"hidden\")\n this.rulesPageBtnTarget.classList.remove(\"hidden\")\n let index = this.ruleToCopyTarget.options.selectedIndex\n let errorText = this.ruleToCopyTarget.options[index].innerText + \" already exists.\"\n this.errorIconTarget.classList.remove(\"hidden\")\n this.responseMessageTarget.innerText = errorText\n this.responseMessageTarget.classList.remove(\"hidden\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"form\",\n \"nextBtn\",\n \"submitBtn\",\n \"submitUpdateBtn\",\n \"productToCopy\",\n \"customizedProductFields\",\n \"productSelectionSection\",\n \"backBtn\",\n \"closeModal\",\n \"errorResponse\",\n \"selectedProduct\",\n \"documentCopyProductLabel\",\n \"documentCopyProduct\",\n \"packetDocumentsCheckbox\",\n \"successResponse\",\n \"state\",\n \"line\",\n \"header\",\n \"productBtn\"\n ]\n\n connect() {\n if (this.hasSubmitBtnTarget) {\n this.submitBtnTarget.classList.add(\"hidden\")\n }\n\n if (this.hasBackBtnTarget) {\n this.backBtnTarget.classList.add(\"hidden\")\n }\n }\n\n toggle() {\n this.documentCopyProductLabelTarget.classList.toggle(\"hidden\")\n }\n\n enableNextStep() {\n if (this.productToCopyTarget.value) {\n this.nextBtnTarget.disabled = false\n } else {\n this.nextBtnTarget.disabled = true\n }\n }\n\n nextStep(e) {\n e.preventDefault()\n this.submitBtnTarget.classList.remove(\"hidden\")\n this.backBtnTarget.classList.remove(\"hidden\")\n this.customizedProductFieldsTarget.classList.remove(\"hidden\")\n\n const selectedProductName = this.productToCopyTarget.options[this.productToCopyTarget.selectedIndex].text\n this.selectedProductTarget.innerText = \"You have copied from \" + selectedProductName\n\n this.nextBtnTarget.classList.add(\"hidden\")\n this.productSelectionSectionTarget.classList.add(\"hidden\")\n this.closeModalTarget.classList.add(\"hidden\")\n this.stateTarget.required = true\n this.lineTarget.required = true\n this.customizedProductFieldsTarget.querySelector(\"#product_effective_date__mask\").required = true\n this.documentCopyProductTarget.selectedIndex = this.productToCopyTarget.selectedIndex - 1\n\n refreshVisibleFields(this.formTarget)\n }\n\n reverseStep(e) {\n e.preventDefault()\n this.submitBtnTarget.classList.add(\"hidden\")\n this.backBtnTarget.classList.add(\"hidden\")\n this.customizedProductFieldsTarget.classList.add(\"hidden\")\n this.stateTarget.required = false\n this.lineTarget.required = false\n this.customizedProductFieldsTarget.querySelector(\"#product_effective_date__mask\").required = false\n this.documentCopyProductTarget.selectedIndex = null\n\n this.nextBtnTarget.classList.remove(\"hidden\")\n this.productSelectionSectionTarget.classList.remove(\"hidden\")\n this.closeModalTarget.classList.remove(\"hidden\")\n refreshVisibleFields(this.formTarget)\n }\n\n handleSuccess(e) {\n this.customizedProductFieldsTarget.classList.add(\"hidden\")\n this.errorResponseTarget.classList.add(\"hidden\")\n this.successResponseTarget.classList.remove(\"hidden\")\n\n const newParagraph = this.successResponseTarget.querySelector(\"h3\")\n const span = document.createElement(\"span\")\n span.setAttribute(\"class\", \"hdg hdg-3 hdg--secondary-600\")\n span.innerText = `${e.detail[0].state} ${e.detail[0].line} `\n newParagraph.appendChild(span)\n const newParagraphText = document.createTextNode(`${e.detail[0].effective_date} ${e.detail[0].action}`)\n newParagraph.appendChild(newParagraphText)\n this.headerTarget.innerText = \"Success!\"\n\n // logic on both edit/new forms\n if (this.hasBackBtnTarget) {\n this.closeModalTarget.innerText = \"Done\"\n this.closeModalTarget.classList.remove(\"hidden\")\n this.submitBtnTarget.classList.add(\"hidden\")\n this.backBtnTarget.classList.add(\"hidden\")\n } else {\n this.closeModalTarget.classList.add(\"hidden\")\n this.submitUpdateBtnTarget.classList.add(\"hidden\")\n }\n\n this.productBtnTarget.href = e.detail[0].url\n this.productBtnTarget.classList.remove(\"hidden\")\n }\n\n handleError(e) {\n const newParagraph = document.createTextNode(e.detail[0].errors)\n this.errorResponseTarget.appendChild(newParagraph)\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n headerTarget: HTMLElement\n loadingTarget: HTMLElement\n successTarget: HTMLElement\n textTarget: HTMLElement\n syncUrl = \"/kintranet/products/sync\"\n startTime: number\n pollingTimeoutMilliseconds: number = 7 * 60 * 1000 // 7 minutes in milliseconds\n pollingInterval: number = 3000\n pollingUrl: string\n submitTarget: HTMLButtonElement\n syncButtonsTarget: HTMLButtonElement\n dismissButtonTarget: HTMLButtonElement\n\n static targets = [\"error\", \"loading\", \"header\", \"text\", \"submit\", \"success\", \"syncButtons\", \"dismissButton\"]\n\n bootstrapAll(): void {\n this.startTime = performance.now()\n this.displayLoading()\n this.startSync()\n }\n\n startSync(): void {\n this.request(this.syncUrl)\n .then(res => {\n this.pollingUrl = res.url\n return this.pollStatus()\n })\n .catch(err => this.handleErrors(err))\n }\n\n pollStatus(): void {\n if (this.timedOut()) {\n return this.displayTimeoutMessage()\n }\n\n this.request(this.pollingUrl)\n .then(res => {\n if (res.finished) {\n return this.displaySuccessMessage()\n }\n setTimeout(() => this.pollStatus(), this.pollingInterval)\n })\n .catch(err => this.handleErrors(err))\n }\n\n request(url: string) {\n return fetch(url).then(res => {\n if (!res.ok) {\n throw Error(`${url} status: ${res.status}`)\n }\n return res.json()\n })\n }\n\n timedOut(): boolean {\n return performance.now() - this.startTime >= this.pollingTimeoutMilliseconds\n }\n\n handleErrors(err) {\n console.warn(err)\n return this.displayErrorMessage()\n }\n\n displayLoading() {\n this.loadingTarget.classList.remove(\"d-none\")\n this.textTarget.classList.add(\"d-none\")\n this.headerTarget.innerText = \"Synching in progress.\" + \"\\n\" + \"This might take a few minutes, please don’t close this page\"\n this.submitTarget.disabled = true\n }\n\n displaySuccessMessage(): void {\n this.syncButtonsTarget.classList.add(\"d-none\")\n this.dismissButtonTarget.classList.remove(\"d-none\")\n this.successTarget.classList.remove(\"d-none\")\n this.loadingTarget.classList.add(\"d-none\")\n this.headerTarget.innerText = \"Sync complete\"\n }\n\n displayTimeoutMessage(): void {\n this.loadingTarget.classList.add(\"d-none\")\n this.textTarget.classList.remove(\"d-none\")\n this.textTarget.innerText = `Sync checking stopped because it took longer than\n ${this.pollingTimeoutMilliseconds / 1000 / 60} minutes. It's possible the job is\n still running in the background. We just decided ${this.pollingTimeoutMilliseconds / 1000 / 60}\n minutes should be enough.`\n this.headerTarget.innerText = \"Sync Polling Timed Out\"\n }\n\n displayErrorMessage(): void {\n this.loadingTarget.classList.add(\"d-none\")\n this.textTarget.classList.remove(\"d-none\")\n this.textTarget.innerText = \"Contact developer to see what happened\"\n this.headerTarget.innerText = \"Error in synching products\"\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"returnAnchor\"]\n\n setReturnAnchor(e) {\n this.returnAnchorTarget.value = window.location.hash.substr(1)\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport Flasher from \"../../utils/flasher\"\nimport { closeModal, openModal } from \"../../components/shared/utils/utils\"\nimport type { CopierComponent } from \"../../components/shared/copier/copier\"\nimport type { Quote } from \"../../components/quotes-table/quote.model\"\n\ninterface QuotesCreateResponse {\n id: number\n poll_url: string\n}\n\ninterface QuotesShowResponse {\n id: number\n document_url: string\n presenter: Quote\n}\n\nexport default class extends Controller {\n static targets = [\n \"characterLimitCount\",\n \"saveQuoteForm\",\n \"saveRenewalQuoteForm\",\n \"saveQuoteFormSubmit\",\n \"saveRenewalFormSubmit\",\n \"reviewQuoteButton\",\n \"copyQuoteLinkButton\",\n \"quotePendingSection\",\n \"quoteCompleteSection\",\n \"quoteCompleteMessageSection\",\n \"quoteSaveDynamicHeading\"\n ]\n\n declare readonly characterLimitCountTarget: HTMLElement\n declare readonly saveQuoteFormTarget: HTMLFormElement\n declare readonly saveRenewalQuoteFormTarget: HTMLFormElement\n declare readonly saveQuoteFormSubmitTarget: HTMLInputElement\n declare readonly saveRenewalQuoteFormSubmitTarget: HTMLInputElement\n declare readonly reviewQuoteButtonTarget: HTMLAnchorElement\n declare readonly copyQuoteLinkButtonTarget: CopierComponent\n declare readonly quotePendingSectionTarget: HTMLDivElement\n declare readonly quoteCompleteSectionTarget: HTMLDivElement\n declare readonly quoteCompleteMessageSectionTarget: HTMLDivElement\n declare readonly quoteSaveDynamicHeadingTarget: HTMLHeadingElement\n\n get saveQuoteEnabled() {\n return this.saveQuoteFormSubmitTarget.dataset.saveQuote !== undefined\n }\n\n connect(): void {\n this.clearInternalNoteField()\n }\n\n createQuote(e: Event): void {\n e.preventDefault()\n closeModal(\"save-quote-modal-form\")\n this.cleanUpInternalNoteField(e)\n this.resetQuoteModal()\n Rails.fire(this.saveQuoteFormTarget, \"submit\")\n openModal(\"download-quote\")\n }\n\n handleQuoteFormSuccess(e: CustomEvent<[QuotesCreateResponse]>): void {\n this.clearInternalNoteField()\n this.saveQuoteEnabled\n ? Flasher.success(\"The quote is being generated. Your file will be available for download shortly!\")\n : Flasher.success(\"Your quote is being generated. It will save to the Quotes tab and be available to review shortly!\")\n this.pollForQuoteDocument(e.detail[0].poll_url)\n }\n\n handleQuoteFormError(): void {\n Flasher.error(\"There was an error generating the quote\")\n }\n\n updateCharacterCount(): void {\n const internalNoteField = this.saveQuoteFormTarget.querySelector('[name=\"csr_quote[internal_note]\"]') as HTMLTextAreaElement\n const characterCountElement = this.characterLimitCountTarget as HTMLSpanElement\n\n const currentLength = internalNoteField.value.length\n characterCountElement.textContent = `${currentLength} / 100`\n }\n\n private clearInternalNoteField(): void {\n const internalNoteField = this.saveQuoteFormTarget.querySelector('[name=\"csr_quote[internal_note]\"]') as HTMLTextAreaElement\n internalNoteField.value = \"\"\n this.updateCharacterCount()\n }\n\n private cleanUpInternalNoteField(e: Event): void {\n const button = e.target as HTMLButtonElement\n const noteAction = button.dataset.noteAction\n const internalNoteField = this.saveQuoteFormTarget.querySelector('[name=\"csr_quote[internal_note]\"]') as HTMLTextAreaElement\n internalNoteField.value = internalNoteField.value.trim()\n\n if (noteAction === \"skip\") {\n this.clearInternalNoteField()\n }\n }\n\n private pollForQuoteDocument(url: string): void {\n fetch(url)\n .then(response => {\n if (!response.ok) {\n this.handleQuoteFormError()\n throw new Error(\"Can't download document.\")\n }\n return response.json()\n })\n .then(response => {\n if (response.document_url) {\n this.setQuoteModalComplete(response)\n } else {\n setTimeout(this.pollForQuoteDocument.bind(this, url), 2500)\n }\n })\n }\n\n private setQuoteModalComplete(response: QuotesShowResponse): void {\n const {\n presenter: { id, premium_display, preview_url, share_html, share_text }\n } = response\n\n if (this.saveQuoteEnabled) {\n if (!share_html) {\n this.copyQuoteLinkButtonTarget.classList.add(\"hidden\")\n } else {\n this.copyQuoteLinkButtonTarget.copy = share_html\n this.copyQuoteLinkButtonTarget.copyFallback = share_text\n }\n\n const dynamicContent = document.createElement(\"p\")\n dynamicContent.id = \"quote-dynamic-content\"\n dynamicContent.classList.add(\"vr\", \"text__bold\")\n dynamicContent.textContent = `Quote ${id} - ${premium_display} Premium`\n\n this.quoteSaveDynamicHeadingTarget.textContent = \"Your quote has been generated.\"\n this.quoteCompleteMessageSectionTarget.insertAdjacentElement(\"beforeend\", dynamicContent)\n }\n\n this.reviewQuoteButtonTarget.href = preview_url\n this.quotePendingSectionTarget.classList.add(\"hidden\")\n this.quoteCompleteSectionTarget.classList.remove(\"hidden\")\n }\n\n private resetQuoteModal() {\n document.querySelector(\"#quote-dynamic-content\")?.remove()\n this.quotePendingSectionTarget.classList.remove(\"hidden\")\n this.quoteCompleteSectionTarget.classList.add(\"hidden\")\n this.quoteSaveDynamicHeadingTarget.textContent = \"Your quote is being generated.\"\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"entry\", \"term\", \"description\", \"date\", \"credits\", \"debits\"]\n entryTarget: HTMLElement\n termTarget: HTMLInputElement\n descriptionTarget: HTMLInputElement\n dateTarget: HTMLInputElement\n creditsTarget: HTMLElement\n debitsTarget: HTMLElement\n\n onRevertEntryModalOpen(e: PointerEvent): void {\n if (!(e.target instanceof HTMLButtonElement)) {\n return\n }\n\n let entry = JSON.parse(e.target.dataset.value)\n\n this.termTarget.value = entry.term\n this.descriptionTarget.value = entry.description\n this.dateTarget.value = entry.date\n\n this.debitsTarget.innerHTML = entry.credit_amounts.map(item => this.lineItem(\"debits\", item)).join(\"\")\n this.creditsTarget.innerHTML = entry.debit_amounts.map(item => this.lineItem(\"credits\", item)).join(\"\")\n }\n\n lineItem(action, { amount, default_account }): String {\n return `\n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n `\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\n\nexport default class extends Controller {\n hasCheckboxAllTarget: boolean\n checkboxTargets: HTMLInputElement[]\n checkboxAllTarget: HTMLInputElement\n checkboxCounterTarget: HTMLElement\n actionBtnTarget: HTMLElement\n ruleTableTarget: HTMLElement\n\n static targets: string[] = [\"checkboxAll\", \"checkbox\", \"checkboxCounter\", \"actionBtn\", \"ruleTable\"]\n\n initialize() {\n this.toggle = this.toggle.bind(this)\n this.refresh = this.refresh.bind(this)\n }\n\n connect() {\n if (!this.hasCheckboxAllTarget) return\n\n this.checkboxAllTarget.addEventListener(\"change\", this.toggle)\n this.checkboxTargets.forEach(checkbox => checkbox.addEventListener(\"change\", this.refresh))\n this.refresh()\n }\n\n disconnect() {\n if (!this.hasCheckboxAllTarget) return\n\n this.checkboxAllTarget.removeEventListener(\"change\", this.toggle)\n this.checkboxTargets.forEach(checkbox => checkbox.removeEventListener(\"change\", this.refresh))\n }\n\n toggle(e: Event) {\n e.preventDefault()\n //TODO: refactor to use a class, or some less fragile selector - https://github.com/kin/dot-com/issues/27979\n let visibleRows = this.ruleTableTarget.querySelectorAll('tbody tr:not([style=\"display: none;\"])')\n\n visibleRows.forEach((visibleRow: HTMLElement) => {\n let visibleCheckbox = visibleRow.querySelector('input[type=\"checkbox\"]') as HTMLInputElement\n //@ts-ignore\n visibleCheckbox.checked = e.target.checked\n this.triggerInputEvent(visibleCheckbox)\n this.displayCheckedCount()\n })\n }\n\n refresh() {\n let checkboxesCount = this.checkboxTargets.length\n let checkboxesCheckedCount = this.checked.length\n\n this.checkboxAllTarget.checked = checkboxesCheckedCount > 0\n this.checkboxAllTarget.indeterminate = checkboxesCheckedCount > 0 && checkboxesCheckedCount < checkboxesCount\n this.displayCheckedCount()\n }\n\n unCheckAll(e) {\n e.preventDefault()\n this.checkboxAllTarget.checked = false\n this.checkboxTargets.forEach(checkbox => {\n checkbox.checked = false\n this.triggerInputEvent(checkbox)\n this.displayCheckedCount()\n })\n }\n\n triggerInputEvent(checkbox: HTMLInputElement) {\n let event = new Event(\"input\", { bubbles: false, cancelable: true })\n\n checkbox.dispatchEvent(event)\n }\n\n displayCheckedCount() {\n let checkboxesCheckedCount = this.checked.length.toString()\n this.checkboxCounterTarget.innerText = checkboxesCheckedCount\n this.displayActionBar(checkboxesCheckedCount, this.checkboxCounterTarget)\n }\n\n displayActionBar(elementCount, element) {\n if (elementCount > \"0\") {\n element.closest(\".action-bar\").classList.remove(\"action-bar--hidden\")\n } else {\n element.closest(\".action-bar\").classList.add(\"action-bar--hidden\")\n }\n }\n\n submitData(e) {\n e.preventDefault()\n\n let selectedIds = []\n\n this.checked.forEach((el: HTMLInputElement) => {\n let dataRow = el.closest(\"tr\")\n selectedIds.push(JSON.parse(dataRow.dataset.id.replace(/'/g, '\"')))\n })\n\n let dataUrl = this.ruleTableTarget.getAttribute(\"data-url\")\n\n Rails.ajax({\n url: dataUrl,\n type: \"DELETE\",\n data: new URLSearchParams(Object.entries({ rule_ids: JSON.stringify(selectedIds) })),\n complete: () => {\n location.reload()\n }\n })\n }\n\n get checked(): HTMLInputElement[] {\n return this.checkboxTargets.filter(checkbox => checkbox.checked)\n }\n\n get unchecked(): HTMLInputElement[] {\n return this.checkboxTargets.filter(checkbox => !checkbox.checked)\n }\n}\n","import { Controller } from \"stimulus\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"selector\", \"form\"]\n\n connect() {\n utils.autocompleteOnChange(\"view_salesperson\", e => this.redirectToURL(e))\n this.fillValue()\n }\n\n redirectToURL(e) {\n if (e && e.value) {\n let value = e.value\n const href = new URL(window.location.href)\n href.searchParams.set(\"salesperson_id\", value)\n window.location = href\n }\n }\n\n fillValue() {\n const href = new URL(window.location.href)\n if (href.searchParams.get(\"salesperson_id\")) {\n let value = href.searchParams.get(\"salesperson_id\")\n let agent = document.querySelector(`#view_salesperson option[value=\"${value}\"]`).textContent\n document.getElementById(\"view_salesperson__input\").value = agent\n document.querySelector(\"kin-autocomplete\").requestUpdate()\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"form\", \"loading\"]\n\n connect() {\n utils.autocompleteOnChange(\"view_salesperson\", e => this.redirectToURL(e))\n this.fillValue()\n }\n\n redirectToURL(e) {\n if (e && e.value) {\n this.loadingTarget.classList.remove(\"hidden\")\n\n let value = e.value\n const href = new URL(window.location.href)\n href.searchParams.set(\"salesperson_id\", value)\n window.location = href\n }\n }\n\n fillValue() {\n const href = new URL(window.location.href)\n if (href.searchParams.get(\"salesperson_id\")) {\n let value = href.searchParams.get(\"salesperson_id\")\n let agent = document.querySelector(`#view_salesperson option[value=\"${value}\"]`).textContent\n document.getElementById(\"view_salesperson__input\").value = agent\n document.querySelector(\"kin-autocomplete\").requestUpdate()\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport { CONSTANTS } from \"../../components/shared/validation/validators/constants\"\n\nexport default class extends Controller {\n static targets = [\"name\", \"other\", \"phone\", \"submit\"]\n\n connect() {\n this.skipValidation = this.data.get(\"skip-validation\") === \"true\"\n this.formChange()\n }\n\n formChange() {\n this.submitTarget.disabled = !(this.isFormValid() || this.skipValidation)\n }\n\n isFormValid() {\n return (\n this.nameTargets.some(target => target.value.length > 1) ||\n this.otherTargets.some(target => target.value.length > 0) ||\n CONSTANTS.phonePattern.test(this.phoneTarget.value)\n )\n }\n}\n","import { Controller } from \"stimulus\"\nimport postRequest from \"../../utils/fetch_helpers/post_request\"\nimport Flasher from \"../../utils/flasher\"\n\ninterface OtpResult {\n status: string\n message: string\n code: string\n}\n\nexport default class extends Controller {\n static targets = [\"sendOtpButton\", \"otpCode\", \"dialogBodyMessage\", \"dialogHeaderMessage\", \"openDialogButton\", \"dialog\"]\n\n declare sendOtpButtonTarget: HTMLButtonElement\n declare otpCodeTarget: HTMLInputElement\n declare dialogHeaderMessageTarget: HTMLElement\n declare dialogBodyMessageTarget: HTMLElement\n declare openDialogButtonTarget: HTMLButtonElement\n declare dialogTarget: HTMLElement\n\n connect() {\n this.dialogTarget.addEventListener(\"kin-dialog-hide\", this.handleDialogHide.bind(this))\n }\n\n async onClickSendButton() {\n this.sendOtpButtonTarget.disabled = true\n const url = this.data.get(\"generate-otp-url-value\")\n const personId = this.data.get(\"person-id-value\")\n\n try {\n const response = await postRequest(url, { id: personId })\n const result = await response.json()\n\n this.flashAuthorizationErrorMessage(response, result)\n if (!response.ok) throw new Error(result.message)\n\n this.handleSuccess(result)\n } catch (error) {\n this.handleError(error)\n return null\n }\n }\n\n resetDialog() {\n this.dialogHeaderMessageTarget.innerHTML = \"Send OTP to User?\"\n this.dialogBodyMessageTarget.innerHTML =\n \"By clicking Send OTP, you will be sending OTP to user's E-Mail and SMS. Do you wish to continue?\"\n }\n\n handleDialogHide(event: Event) {\n this.resetDialog()\n }\n\n handleSuccess(result: OtpResult) {\n this.dialogHeaderMessageTarget.innerHTML = \"One Time Password sent!\"\n this.dialogBodyMessageTarget.innerHTML = `\n

    Have the customer verify the following code to you:

    \n

    ${result.code}

    \n

    Do not refresh or navigate away from the Contact Info page or the verification code will disappear. A new code can be sent after 30 seconds, if needed.

    \n `\n this.otpCodeTarget.innerHTML = \"Code: \" + result.code\n this.disableOtpGeneration()\n }\n\n handleError(error: Error) {\n this.dialogBodyMessageTarget.innerHTML = \"Failed to send OTP!

    \" + error\n this.otpCodeTarget.innerHTML = \"\"\n }\n\n flashAuthorizationErrorMessage(response, result) {\n if (response.status === 401) {\n Flasher.error(result.message)\n }\n }\n\n disableOtpGeneration() {\n this.openDialogButtonTarget.disabled = true\n setTimeout(() => {\n this.openDialogButtonTarget.disabled = false\n this.sendOtpButtonTarget.disabled = false\n }, 30000)\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport Flasher from \"../../utils/flasher\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"form\"]\n\n createQuote(event) {\n event.preventDefault()\n Rails.fire(this.formTarget, \"submit\")\n }\n\n handleSuccess(e) {\n this.pollForQuoteDocument(e.detail[0].poll_url, e)\n }\n\n handleError(e) {\n var message = e.detail[0].error\n Flasher.error(message || \"There was an error generating the quote\")\n }\n\n pollForQuoteDocument(url, e) {\n fetch(url)\n .then(response => {\n if (!response.ok) {\n this.handleError()\n throw new Error(\"Can't download document.\")\n }\n return response.json()\n })\n .then(data => {\n if (data.document_url) {\n if (e.target.id == \"link-email\") {\n utils.closeModal(\"link-email\")\n }\n Flasher.success(\"📠 Quote has been sent to client. 📠\")\n } else {\n setTimeout(this.pollForQuoteDocument.bind(this, url, e), 2500)\n }\n })\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\n \"anchor\",\n \"bind\",\n \"content\",\n \"endorse\",\n \"endorseErrorText\",\n \"endorseSummary\",\n \"endorseText\",\n \"policyStatus\",\n \"premiumChangeAsSentence\",\n \"requiredForEndorsementBind\",\n \"tabs\",\n \"underwritingTab\"\n ]\n\n connect() {\n document.addEventListener(\"updateEndorseText\", this.handleUpdateEndorseText, false)\n window.onpopstate = this.navigateBack.bind(this)\n if (this.hasTabsTarget) {\n const desiredTab = this.getDesiredTab(location.pathname)\n this.setActiveTab(desiredTab.dataset.route, desiredTab, false)\n }\n }\n\n tabSelected(e) {\n e.preventDefault()\n this.setActiveTab(e.target.dataset.route, e.target, true)\n }\n\n navigateBack(e) {\n const desiredTab = this.getDesiredTab(location.pathname)\n this.setActiveTab(desiredTab.dataset.route, desiredTab, false)\n }\n\n currentLocation() {\n if (location.hash === \"\") {\n const firstTab = document.querySelector(\"#tabs a\").hash\n return firstTab.replace(\"#\", \"\")\n } else {\n return location.hash.replace(\"#\", \"\")\n }\n }\n\n getBasePath(pathname) {\n return pathname.match(/.+?([0-9]+)/)[0]\n }\n\n getRoute(pathname) {\n const matches = pathname.match(/([0-9]\\/)([^0-9]+)/)\n if (matches) {\n return matches[2]\n } else {\n return this.tabsTarget.querySelector(\"a\").dataset.route\n }\n }\n\n getDesiredTab(pathname) {\n return this.tabsTarget.querySelector('a[data-route=\"' + this.getRoute(pathname) + '\"]')\n }\n\n setActiveTab(route, element, pushState) {\n this.contentTarget.innerHTML = \"
    \"\n let activeTab = this.tabsTarget.querySelector(\"li.active\")\n if (activeTab) {\n activeTab.classList.remove(\"active\")\n }\n element.parentElement.classList.add(\"active\")\n const path = this.getBasePath(location.pathname) + \"/\" + route + location.search\n if (pushState) {\n history.pushState(path, \"\", path)\n }\n this.replaceContent(path)\n }\n\n handleUpdateEndorseText(e) {\n this.endorseErrorTextTarget = document.body.querySelector('[data-target=\"kintranet--sideloading-subnav.endorseErrorText\"]')\n this.endorseTextTarget = document.body.querySelector('[data-target=\"kintranet--sideloading-subnav.endorseText\"]')\n this.endorse = document.body.querySelectorAll('[data-target=\"kintranet--sideloading-subnav.endorse\"]')\n this.endorseButton = document.body.querySelector('[data-target=\"kintranet--sideloading-subnav.endorseButton\"]')\n this.endorseSummaryTarget = document.body.querySelector('[data-target=\"kintranet--sideloading-subnav.endorseSummary\"]')\n this.requiredForEndorsementBind = document.body.querySelectorAll(\n '[data-target=\"kintranet--sideloading-subnav.requiredForEndorsementBind\"]'\n )\n\n this.requiresPayment = document.body.querySelectorAll('[data-target=\"kintranet--sideloading-subnav.requiresPayment\"]')\n this.notRequiresPayment = document.body.querySelectorAll('[data-target=\"kintranet--sideloading-subnav.notRequiresPayment\"]')\n\n this.policyStatusTarget = document.body.querySelector('[data-target=\"kintranet--sideloading-subnav.policyStatus\"]')\n this.underwritingTabTarget = document.body.querySelector('[data-target=\"kintranet--sideloading-subnav.underwritingTab\"]')\n\n this.premiumChangeAsSentenceTarget = document.body.querySelectorAll(\n '[data-target=\"kintranet--sideloading-subnav.premiumChangeAsSentence\"]'\n )\n this.endoChangeAsSentenceTarget = document.body.querySelectorAll('[data-target=\"kintranet--sideloading-subnav.endoChangeAsSentence\"]')\n this.numberOfTokensToGenerate = document.body.querySelector('[data-target~=\"kintranet--sideloading-subnav.numberOfTokens\"]')\n\n if (e.detail.premium_change_as_sentence) {\n this.premiumChangeAsSentenceTarget.forEach(elem => {\n elem.innerText = e.detail.premium_change_as_sentence\n })\n }\n\n if (e.detail.required_for_endorsement_bind) {\n this.endoChangeAsSentenceTarget.forEach(elem => {\n elem.innerText = e.detail.required_for_endorsement_bind\n })\n }\n\n if (e.detail.number_of_tokens) {\n this.numberOfTokensToGenerate.textContent = e.detail.number_of_tokens\n }\n\n if (e.detail.payment_required) {\n this.requiredForEndorsementBind.forEach(elem => elem.removeAttribute(\"hidden\"))\n this.requiresPayment.forEach(elem => elem.removeAttribute(\"hidden\"))\n this.notRequiresPayment.forEach(elem => elem.setAttribute(\"hidden\", \"hidden\"))\n }\n\n if (!e.detail.payment_required) {\n this.requiredForEndorsementBind.forEach(elem => elem.setAttribute(\"hidden\", \"hidden\"))\n this.requiresPayment.forEach(elem => elem.setAttribute(\"hidden\", \"hidden\"))\n this.notRequiresPayment.forEach(elem => elem.removeAttribute(\"hidden\"))\n }\n\n this.endorseSummaryTarget.innerHTML = \"\"\n e.detail.changeset.forEach(elem => {\n const li = document.createElement(\"li\")\n const text = document.createTextNode(elem)\n li.appendChild(text)\n li.classList.add(\"list--bullet\")\n this.endorseSummaryTarget.appendChild(li)\n })\n\n if (e.detail.underwriting_decision_status == \"action_required\") {\n this.policyStatusTarget.className = \"policy-status kin row middle-xs declined\"\n } else {\n this.policyStatusTarget.className = \"policy-status kin row middle-xs in-progress-endorsement\"\n }\n\n this.underwritingTabTarget.className = e.detail.underwriting_tab_class\n this.endorseErrorTextTarget.className = \"error-\" + (!e.detail.may_bind).toString()\n this.endorseTextTarget.className = \"endorse-\" + e.detail.may_bind.toString()\n this.endorse.forEach(elem => (elem.disabled = !e.detail.may_bind))\n if (e.detail.may_bind) {\n this.endorse.forEach(elem => elem.removeAttribute(\"disabled\"))\n } else {\n this.endorse.forEach(elem => elem.setAttribute(\"disabled\", \"disabled\"))\n }\n }\n\n addAnchorToUpdateButton() {\n let locationField = document.createElement(\"input\")\n locationField.type = \"hidden\"\n locationField.name = \"anchor\"\n locationField.value = this.currentLocation()\n this.bindTarget.parentElement.appendChild(locationField)\n }\n\n async replaceContent(url) {\n try {\n var content = await fetch(url, {\n headers: {\n \"X-Load-Partial\": true\n },\n cache: \"no-cache\"\n })\n if (content.ok) {\n this.contentTarget.innerHTML = await content.text()\n } else {\n if (window.location.href.match(\"localhost\")) {\n document.write(await content.text())\n } else {\n this.contentTarget.innerHTML = `There was an error. ${content.status}`\n }\n }\n } catch (err) {\n this.contentTarget.innerHTML = `There was a really intense error. ${err}`\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"element\"]\n\n connect() {\n const href = new URL(window.location.href)\n const value = href.searchParams.get(this.elementTarget.id)\n if (value) {\n this.elementTarget.value = value\n }\n }\n\n redirectToURL(e) {\n if (e && e.target) {\n const href = new URL(window.location.href)\n href.searchParams.set(this.elementTarget.id, this.elementTarget.value)\n window.location = href\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport Flasher from \"../../utils/flasher\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"form\",\n \"taskModal\",\n \"deleteTaskModal\",\n \"deleteButton\",\n \"outcomeCheckbox\",\n \"policySelect\",\n \"policyType\",\n \"completeTaskModal\",\n \"completedTasks\",\n \"taskTray\"\n ]\n\n handleSuccess(e) {\n location.reload()\n }\n\n handleFailure(e) {\n Flasher.error(e.detail[0].errors)\n }\n\n showTaskModal() {\n utils.openModal(\"add-follow-up\")\n }\n\n hideTaskModal() {\n utils.openModal(\"add-follow-up\")\n }\n\n showConfirmCompleteModal() {\n this.hideTaskModal()\n utils.openModal(\"follow-up-complete\")\n }\n\n hideConfirmCompleteModal() {\n utils.closeModal(\"follow-up-complete\")\n }\n\n showConfirmDeleteModal() {\n utils.openModal(\"delete-follow-up\")\n }\n\n hideConfirmDeleteModal() {\n utils.closeModal(\"delete-follow-up\")\n }\n\n cancelDeleteModal() {\n this.hideConfirmDeleteModal()\n this.showTaskModal()\n }\n\n deleteTask() {\n let params = {\n _method: \"destroy\"\n }\n Rails.ajax({\n url: this.deleteButtonTarget.dataset.deleteUrl,\n type: \"DELETE\",\n data: new URLSearchParams(Object.entries(params)).toString(),\n complete: () => {\n location.reload()\n }\n })\n }\n\n markComplete() {\n this.outcomeCheckboxTarget.checked = true\n Rails.fire(this.formTarget, \"submit\")\n }\n\n syncPolicyType() {\n let selectedOptionIndex = this.policySelectTarget.options.selectedIndex\n let selectedOption = this.policySelectTarget.options[selectedOptionIndex]\n this.policyTypeTarget.value = selectedOption.dataset.policyType\n }\n\n showCompleted(e) {\n this.completedTasksTarget.classList.remove(\"hidden\")\n e.target.classList.add(\"hidden\")\n }\n\n toggleTray() {\n this.taskTrayTarget.classList.toggle(\"expanded\")\n if (this.taskTrayTarget.classList.contains(\"expanded\")) {\n this.taskTrayTarget.querySelector(\"#follow-ups-wrapper\").setAttribute(\"aria-expanded\", \"true\")\n this.taskTrayTarget.querySelector(\"#follow-ups-wrapper\").setAttribute(\"aria-hidden\", \"false\")\n } else {\n this.taskTrayTarget.querySelector(\"#follow-ups-wrapper\").setAttribute(\"aria-expanded\", \"false\")\n this.taskTrayTarget.querySelector(\"#follow-ups-wrapper\").setAttribute(\"aria-hidden\", \"true\")\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"automotiveForm\", \"homeForm\", \"policyType\"]\n\n connect() {\n utils.autocompleteOnChange(\"bright_third_party_sale_product_id\", e => this.enableRelativeFieldset(e))\n let policyType = document.querySelector(\"kin-autocomplete input\").value.split(\"-\")[0].replace(\" \", \"\")\n this.initalizeFieldsets(policyType)\n this.policyTypeTarget.value = `BrightThirdPartySale::${policyType}`\n }\n\n enableRelativeFieldset(e) {\n const currentName = e.name\n const policyType = currentName !== undefined ? currentName.split(\"-\")[0].replace(\" \", \"\") : \"Automotive\"\n this.policyTypeTarget.value = `BrightThirdPartySale::${policyType}`\n this.initalizeFieldsets(policyType)\n }\n\n initalizeFieldsets(value = \"Automotive\") {\n if (value == \"Automotive\") {\n this.disableFieldset(this.homeFormTarget)\n this.enableFieldset(this.automotiveFormTarget)\n } else if (value == \"Home\") {\n this.disableFieldset(this.automotiveFormTarget)\n this.enableFieldset(this.homeFormTarget)\n }\n }\n\n disableFieldset(target) {\n target.classList.add(\"hidden\")\n target.querySelectorAll(\"input\").forEach(function (node) {\n node.disabled = true\n })\n utils.refreshVisibleFields(target.closest(\"form\"))\n }\n\n enableFieldset(target) {\n target.classList.remove(\"hidden\")\n target.querySelectorAll(\"input\").forEach(function (node) {\n node.disabled = false\n })\n utils.refreshVisibleFields(target.closest(\"form\"))\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"select\", \"submit\", \"other\", \"otherTextArea\"]\n\n connect() {\n if (this.hasSelectTarget && this.selectTarget.value.length) {\n if (this.selectTarget.value === \"other\") {\n const submitTarget = this.selectTarget.closest(\"form\").querySelector(\"input[type='submit']\")\n this.otherTarget.hidden = false\n this.enable(submitTarget)\n } else {\n this.otherTarget.hidden = true\n }\n }\n }\n\n optionSelected() {\n if (this.selectTarget.value.length && this.selectTarget.value !== \"other\") {\n this.enable(this.submitTarget)\n if (this.hasOtherTextAreaTarget && !this.otherTextAreaTarget.hidden) {\n this.otherTarget.hidden = true\n this.otherTextAreaTarget.required = false\n }\n } else {\n if (this.selectTarget.value === \"other\") {\n this.otherTarget.hidden = false\n this.otherTextAreaTarget.required = true\n } else {\n this.disable(this.submitTarget)\n }\n }\n }\n\n handleChange(e) {\n const submitTarget = e.target.closest(\"form\").querySelector(\"input[type='submit']\")\n if (e.target.value.length) {\n this.enable(submitTarget)\n } else {\n this.disable(submitTarget)\n }\n }\n\n enable(target) {\n target.disabled = false\n }\n\n disable(target) {\n target.disabled = true\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"dropdown\", \"translationContainer\"]\n\n dropdownSelect() {\n const rule = this.dropdownTarget.value\n this.translationContainerTarget.childNodes.forEach(el => el.classList.add(\"hidden\"))\n if (rule !== \"\") {\n this.translationContainerTarget.querySelector(`.${rule}`).classList.remove(\"hidden\")\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"status\", \"reason\", \"category\", \"reasonGroup\", \"doNotRenewGroup\", \"reasonsAutocomplete\"]\n static values = { hasOpenClaims: Boolean }\n\n connect() {\n this.toggleGroups()\n this.formValidation = this.categoryTarget.closest(\"form\").querySelector(\"kin-form-validation\")\n this.hasOpenClaimsValue = this.data.get(\"has-open-claims\") === \"true\"\n\n this.categoryTarget.addEventListener(\"change\", this.checkIfEligible.bind(this))\n }\n\n toggleGroups() {\n const flagStatus = this.statusTarget.value\n\n if (flagStatus == \"do_not_renew\") {\n this.showDoNotRenewGroup()\n this.hideReasonGroup()\n } else {\n this.hideDoNotRenewGroup()\n\n if (flagStatus == \"renew\" || flagStatus == \"\") {\n this.hideReasonGroup()\n } else {\n this.showReasonGroup()\n }\n }\n\n let modal = document.querySelector(\"#modal__renewal-flag\")\n\n document.addEventListener(\"kin-view-modal:open\", e => {\n if (e.detail.id == \"modal__renewal-flag\") {\n let autocomplete = modal.querySelector(\"kin-autocomplete\")\n autocomplete.updateComplete.then(() => {\n if (flagStatus == \"do_not_renew\") {\n autocomplete.querySelector(\"input\").required = true\n } else {\n autocomplete.querySelector(\"input\").required = false\n }\n })\n }\n })\n\n utils.refreshVisibleFields(this.statusTarget.closest(\"form\"))\n }\n\n hideReasonGroup() {\n this.reasonTarget.value = \"\"\n this.reasonGroupTarget.classList.add(\"hidden\")\n this.reasonTarget.required = false\n }\n\n showReasonGroup() {\n this.reasonGroupTarget.classList.remove(\"hidden\")\n this.reasonTarget.required = true\n }\n\n hideDoNotRenewGroup() {\n this.doNotRenewGroupTarget.classList.add(\"hidden\")\n this.doNotRenewGroupTarget.querySelectorAll(\"select\").forEach(select => (select.required = false))\n let autocomplete = this.reasonsAutocompleteTarget.querySelector(\".autocomplete input\")\n if (autocomplete) {\n autocomplete.closest(\"kin-autocomplete\").toggleDisabledState(true)\n autocomplete.required = false\n }\n }\n\n showDoNotRenewGroup() {\n this.doNotRenewGroupTarget.classList.remove(\"hidden\")\n this.doNotRenewGroupTarget.querySelectorAll(\"select\").forEach(select => (select.required = true))\n let autocomplete = this.reasonsAutocompleteTarget.querySelector(\".autocomplete input\")\n if (autocomplete) {\n autocomplete.closest(\"kin-autocomplete\").toggleDisabledState(false)\n autocomplete.required = true\n }\n this.categoryOnChange(true)\n }\n\n checkIfEligible() {\n let disableSubmitMessage = `Warning: Cannot nonrenew a policy with an open claim`\n if (this.hasOpenClaims() && this.category === \"Underwriting\") {\n this.formValidation.disableSubmit(disableSubmitMessage)\n } else {\n this.formValidation.enableSubmit()\n }\n }\n\n categoryOnChange(keepInput = false) {\n this.category = this.categoryTarget.value\n\n Array.from(this.reasonsAutocompleteTarget.querySelectorAll(\"select option\")).forEach(opt => {\n opt.disabled = false\n if (opt.dataset.category !== this.category) {\n opt.disabled = true\n }\n })\n\n let autocomplete = this.reasonsAutocompleteTarget.querySelector(\"kin-autocomplete\")\n\n autocomplete.updateComplete.then(() => {\n if (keepInput) {\n autocomplete.reinitialize(keepInput)\n } else {\n autocomplete.reinitialize()\n }\n })\n }\n\n hasOpenClaims() {\n return this.hasOpenClaimsValue\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"entry\", \"description\", \"date\", \"updateForm\", \"authenticityToken\"]\n entryTarget: HTMLElement\n descriptionTarget: HTMLInputElement\n dateTarget: HTMLInputElement\n updateFormTarget: HTMLFormElement\n authenticityTokenTarget: HTMLInputElement\n\n onUpdateEntryModalOpen(e: PointerEvent): void {\n if (!(e.target instanceof HTMLButtonElement)) {\n return\n }\n\n let entry = JSON.parse(e.target.dataset.value)\n\n this.updateFormTarget.action = entry.url\n this.descriptionTarget.value = entry.description\n this.dateTarget.value = entry.date\n this.authenticityTokenTarget.value = entry.auth_token\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\n\nexport default class extends Controller {\n static targets = [\n \"form\",\n \"floodAndWaterBackup\",\n \"elevationCertificateLabel\",\n \"elevationCertificate\",\n \"elevationAMSLLabel\",\n \"elevationAMSL\"\n ]\n\n connect() {\n this.toggleFloodAndWaterBackup()\n }\n\n toggleFloodAndWaterBackup() {\n this.elevationCertificateLabelTarget.classList.toggle(\"hidden\", this.floodAndWaterDisabled())\n this.toggleElevationCertificate()\n if (this.floodAndWaterDisabled()) {\n this.elevationCertificateTarget.value = \"false\"\n this.elevationAMSLTarget.value = \"\"\n }\n }\n\n toggleElevationCertificate() {\n this.elevationAMSLLabelTarget.classList.toggle(\"hidden\", this.elevationCertificateDisabled())\n }\n\n floodAndWaterDisabled() {\n return this.floodAndWaterBackupTarget.value == \"false\"\n }\n\n elevationCertificateDisabled() {\n return this.elevationCertificateTarget.value == \"false\"\n }\n\n onSubmit(e) {\n e.preventDefault()\n\n this.coveragesController.displayState(\"loading\")\n this.formTarget.submit()\n }\n\n get coveragesController() {\n return this.application.getControllerForElementAndIdentifier(\n document.querySelector(\"[data-controller='kintranet--coverage']\"),\n \"kintranet--coverage\"\n )\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\n \"roofCover\",\n \"roofShape\",\n \"roofDeck\",\n \"roofDeckAttachment\",\n \"roofWallConnection\",\n \"secondaryWaterResistance\",\n \"formState\"\n ]\n\n connect() {\n this.form = this.element.closest(\"form\")\n this.formValidation = this.form.querySelector(\"kin-form-validation\")\n this.submitButton = this.form.querySelector('input[type=\"submit\"]')\n this.roofCoverOrDeck = this.roofCoverTargets[0] || this.roofDeckTargets[0]\n this.otherFields = Array.from(this.element.querySelectorAll(\"input, select\")).filter(el => {\n return el !== this.roofCoverOrDeck\n })\n\n document.addEventListener(\"kin-modal:open\", e => {\n if (e.detail.id === \"modal__edit-discount--windstorm-mitigation\") {\n if (this.formStateTarget && this.formStateTarget.dataset.editable == \"false\") {\n this.formValidation.disableForm()\n }\n\n // Only allow submission and wire up listeners if we know the year built\n if (parseInt(this.element.dataset[\"yearBuilt\"]) > 0) {\n this.form.addEventListener(\"change\", this.updateForm.bind(this))\n } else {\n this.formValidation.triggerRefresh()\n this.formValidation.disableSubmit()\n }\n this.form.addEventListener(\"submit\", this.submitForm.bind(this))\n this.updateForm()\n }\n })\n }\n\n updateForm() {\n if (this.roofCoverOrDeck.value === \"\") {\n // Disable everything until Roof Cover/Deck is selected\n this.otherFields.forEach(el => {\n el.disabled = true\n })\n\n this.formValidation.triggerRefresh()\n this.formValidation.disableSubmit()\n } else {\n // Once Roof Cover/Deck is selected, re-enable everything\n this.otherFields.forEach(el => {\n el.removeAttribute(\"disabled\")\n })\n this.formValidation.triggerRefresh()\n this.formValidation.enableSubmit()\n\n // Unless Roof Cover is Reinforced Concrete, in which case set and disable some fields accordingly\n if (this.roofCoverOrDeck.value === \"reinforced_concrete_roof_deck\") {\n this.setConcreteFields()\n }\n }\n }\n\n setConcreteFields() {\n this.roofShapeTarget.value = \"flat\"\n this.roofShapeTarget.disabled = true\n if (this.hasRoofDeckAttachmentTarget) {\n this.roofDeckAttachmentTarget.value = \"reinforced_concrete_roof_deck\"\n this.roofDeckAttachmentTarget.disabled = true\n this.formValidation.triggerRefresh()\n }\n if (this.roofWallConnectionTargets[0]) {\n this.roofWallConnectionTarget.value = \"reinforced_concrete_roof_deck\"\n this.roofWallConnectionTarget.disabled = true\n this.formValidation.triggerRefresh()\n }\n this.secondaryWaterResistanceTarget.value = \"yes\"\n this.secondaryWaterResistanceTarget.disabled = true\n }\n\n submitForm(e) {\n e.preventDefault()\n // Make sure to re-enable all fields before submission, e.g. the ones that are set automatically by `setConcreteFields`\n this.otherFields.forEach(el => {\n el.removeAttribute(\"disabled\")\n })\n this.form.submit()\n }\n}\n","import { Controller } from \"stimulus\"\nimport \"../../components/shared/addressCompletion\"\nconst AddressCompletion = window.app.kinAddressCompletion\n\nexport default class extends Controller {\n initialize() {\n AddressCompletion.initialize()\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"stepOne\",\n \"stepTwo\",\n \"phoneForm\",\n \"emailForm\",\n \"codeForm\",\n \"emailBlurb\",\n \"phoneBlurb\",\n \"ajaxError\",\n \"ajaxErrorText\",\n \"tokenField\",\n \"phoneSubmit\",\n \"emailSubmit\"\n ]\n\n handleError() {\n this.ajaxErrorTarget.classList.remove(\"hidden\")\n }\n\n showAuthCodeInput(e) {\n this.ajaxErrorTarget.classList.add(\"hidden\")\n\n let target = e.target.dataset.target\n\n if (target.includes(\"email\")) {\n this.emailBlurbTarget.classList.remove(\"hidden\")\n } else {\n this.phoneBlurbTarget.classList.remove(\"hidden\")\n this.phoneBlurbTarget.textContent = e.target.form.dataset.phone\n }\n\n this.stepOneTarget.classList.add(\"hidden\")\n this.stepTwoTarget.classList.remove(\"hidden\")\n\n refreshVisibleFields(this.codeFormTarget)\n\n setTimeout(() => {\n this.tokenFieldTarget.focus()\n }, 10)\n }\n\n handleVerifyError() {\n this.ajaxErrorTarget.classList.remove(\"hidden\")\n this.ajaxErrorTextTarget.textContent = \"The code you entered does not match. Please try again or call us at (855) 717-0022.\"\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport { trackEvent } from \"../../network_requests/funnel_event\"\n\nexport default class extends Controller {\n static targets = [\"windmitModalButton\"]\n\n __eventTriggered = false\n\n initialize() {\n if (this.hasWindmitModalButtonTarget) {\n this.windmitModalButtonTarget.addEventListener(\"click\", () => {\n if (this.__eventTriggered) return\n\n this.__eventTriggered = true\n trackEvent(\"windmit_view\")\n })\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport { formatMoney } from \"../../components/shared/utils/utils\"\nimport { store } from \"../../store/quote/premium\"\nimport { request } from \"../../utils/request\"\n\nconst NON_DIGITS = /[^0-9%]/g\n\nexport default class extends Controller {\n static targets = [\"coverages\", \"coverageA\", \"coverageLML\", \"roofSurfacePaymentSchedule\", \"form\"]\n\n connect() {\n this.onChange()\n store.subscribe(this.onStoreChange)\n }\n\n onStoreChange = ({ waiting }) => {\n if (waiting) {\n this.formValidation.disableForm()\n } else {\n this.formValidation.enableForm()\n }\n }\n\n onChange = () => {\n const amount = parseInt(this.coverageATarget.value)\n\n this.coveragesTargets.forEach(element => {\n element.getElementsByTagName(\"option\").forEach(option => {\n const isPercentage = option.value.indexOf(\"%\") > -1\n if (isPercentage) {\n const percentage = parseInt(option.value) / 100\n const total = formatMoney(amount * percentage, { minDecimals: 0, maxDecimals: 0 })\n option.text = `${total} (${option.value})`\n } else {\n option.text = formatMoney(option.value, { minDecimals: 0, maxDecimals: 0 })\n }\n })\n })\n }\n\n updateCoverageA = event => {\n this.updatePremium(event)\n this.onChange()\n }\n\n updatePremium = event => {\n const value = event.target.value\n const name = event.target.name\n\n if (event.target.type === \"radio\" || this.hasCoverageLMLTarget || this.hasRoofSurfacePaymentScheduleTarget) {\n this.updateCoverage(name, value)\n } else {\n this.updateCoverage(name, value.replace(NON_DIGITS, \"\"))\n }\n }\n\n updateCoverage = (key, value) => {\n store.disable()\n\n request(this.formTarget.action, { method: \"PATCH\", params: { [key]: value } })\n .then(store.refresh)\n .catch(store.refresh)\n }\n\n get formValidation() {\n return this.formTarget.querySelector(\"kin-form-validation\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport createCardToken from \"../../utils/create_card_token\"\nimport { padMonth } from \"../../components/shared/validation/utilities/date\"\n\nexport default class extends Controller {\n static targets = [\n \"cvv\",\n \"errors\",\n \"expiration\",\n \"expirationMonth\",\n \"expirationYear\",\n \"firstName\",\n \"form\",\n \"lastName\",\n \"number\",\n \"submit\",\n \"submitOpenModal\",\n \"tokenDescriptor\",\n \"tokenValue\",\n \"zip\"\n ]\n\n _loading = false\n _submitting = false\n\n connect() {\n this.formTarget.addEventListener(\"submit\", this.onSubmit)\n\n if (this.submitOpenModalTarget) {\n this.formTarget.addEventListener(\"change\", () => this.onBlur())\n }\n }\n\n disconnect() {\n this.formTarget.removeEventListener(\"submit\", this.onSubmit)\n\n if (this.submitOpenModalTarget) {\n this.formTarget.removeEventListener(\"change\", () => this.onBlur())\n }\n }\n\n onBlur() {\n if (this.validAttributes()) {\n this.submitOpenModalTarget.disabled = false\n } else {\n this.submitOpenModalTarget.disabled = true\n }\n }\n\n onSubmit = event => {\n if (this._submitting || this.loading()) {\n event.preventDefault()\n return\n }\n\n this._submitting = true\n this._loading = true\n\n event.preventDefault()\n\n createCardToken({\n month: this.expirationMonth(),\n year: this.expirationYear(),\n number: this.number(),\n cvv: this.cvv(),\n name: this.name(),\n zip: this.zip(),\n clientID: this.data.get(\"client-id\"),\n clientKey: this.data.get(\"client-key\")\n })\n .then(({ dataDescriptor, dataValue }) => {\n this.tokenValueTarget.value = dataValue\n this.tokenDescriptorTarget.value = dataDescriptor\n this.formTarget.submit()\n })\n .catch(messages => {\n this._submitting = false\n this._loading = false\n this.onError(messages)\n })\n }\n\n onError(messages) {\n this.errorsTarget.children.forEach(child => child.remove())\n\n messages.forEach(({ text }) => {\n let error = document.createElement(\"p\")\n error.innerText = text\n this.errorsTarget.append(error)\n })\n }\n\n loading() {\n return this._loading\n }\n\n validAttributes() {\n return (\n this.validCardNumber() &&\n this.validExpirationDate() &&\n this.validCVV() &&\n this.validZipCode() &&\n this.validFirstName() &&\n this.validLastName()\n )\n }\n\n number() {\n return this.numberTarget.value.replace(/[^\\d]/g, \"\")\n }\n\n expirationMonth() {\n if (this.expirationTarget) {\n let month = this.expirationTarget.value.split(\"/\")[0]\n return month\n }\n return padMonth(this.expirationMonthTarget.value)\n }\n\n expirationYear() {\n if (this.expirationTarget) {\n let year = this.expirationTarget.value.split(\"/\")[1]\n return year\n }\n return this.expirationYearTarget.value\n }\n\n cvv() {\n return this.cvvTarget.value\n }\n\n firstName() {\n return this.firstNameTarget.value\n }\n\n lastName() {\n return this.lastNameTarget.value\n }\n\n name() {\n return `${this.firstName()} ${this.lastName()}`\n }\n\n zip() {\n return this.zipTarget.value\n }\n\n validCardNumber() {\n return this.number().length == 16\n }\n\n validExpirationDate() {\n return this.expirationMonth().length == 2 && this.expirationYear().length == 4\n }\n\n validCVV() {\n return this.cvv().length == 3\n }\n\n validZipCode() {\n return this.zip().length == 5\n }\n\n validFirstName() {\n return this.firstName() != \"\"\n }\n\n validLastName() {\n return this.lastName() != \"\"\n }\n}\n","export default function createNewEvent(eventName) {\n if (typeof Event === \"function\") {\n var event = new Event(eventName)\n } else {\n var event = document.createEvent(\"Event\")\n event.initEvent(eventName, true, true)\n }\n\n return event\n}\n","import Rails from \"rails-ujs\"\nimport debounce from \"lodash.debounce\"\nimport createNewEvent from \"../utils/create_new_event\"\n\nexport default class {\n static debounced = debounce(() => {\n let form = document.querySelector(\"form.edit_bright_policy\")\n form.dataset.remote = true\n Rails.fire(form, \"submit\")\n form.dataset.remote = false\n }, 750)\n\n static updatePremium() {\n const event = createNewEvent(\"kin:premium-update\")\n document.body.dispatchEvent(event)\n this.debounced()\n }\n}\n","const handleClick = (e, valueTransformer) => {\n const toggle = e.target.closest(\".toggle\")\n return flip(toggle, valueTransformer)\n}\n\nconst flip = (toggle, valueTransformer) => {\n const boundCheckbox = toggle.querySelector(\"input[type='checkbox']\")\n const newValue = !boundCheckbox.checked\n set(toggle, newValue, valueTransformer)\n return newValue\n}\n\nconst disable = toggle => {\n const boundCheckbox = toggle.querySelector(\"input[type='checkbox']\")\n const newValue = false\n set(toggle, newValue)\n return newValue\n}\n\nconst enable = toggle => {\n const boundCheckbox = toggle.querySelector(\"input[type='checkbox']\")\n const newValue = true\n set(toggle, newValue)\n return newValue\n}\n\nconst set = (toggle, value, valueTransformer) => {\n const boundCheckbox = toggle.querySelector(\"input[type='checkbox']\")\n boundCheckbox.checked = value\n const formValue = boundCheckbox.closest(\".response\").querySelector(\".checkbox-value\")\n if (formValue) {\n const newValue = valueTransformer ? valueTransformer(value) : value\n formValue.value = newValue\n }\n setStyle(toggle, value)\n}\n\nconst setStyle = (toggle, value) => {\n if (value) {\n toggle.classList.add(\"yes\")\n toggle.classList.remove(\"no\")\n } else {\n toggle.classList.add(\"no\")\n toggle.classList.remove(\"yes\")\n }\n}\n\nexport default { flip, handleClick, set, disable, enable }\n","import { Controller } from \"stimulus\"\nimport PremiumUpdater from \"../../network_requests/funnel_property_updater\"\nimport toggle from \"../../components/checkbox_toggle\"\n\nexport default class extends Controller {\n static targets = [\n \"windstormFields\",\n \"burglarAlarmField\",\n \"fireAlarmField\",\n \"fireSprinklerSection\",\n \"fireSprinklerRadios\",\n \"securedCommunitySection\",\n \"securedCommunityRadios\",\n \"securedCommunityHiddenField\",\n \"withinPark\",\n \"vacancyPermission\"\n ]\n\n toggleWindstorm(e) {\n const newValue = toggle.handleClick(e)\n this.windstormFieldsTargets.forEach(field => {\n if (field.disabled) {\n field.removeAttribute(\"disabled\")\n } else field.setAttribute(\"disabled\", \"true\")\n })\n PremiumUpdater.updatePremium()\n }\n\n toggleBurglar(e) {\n const newValue = toggle.handleClick(e)\n this.burglarAlarmFieldTarget.value = newValue ? \"central\" : \"none\"\n PremiumUpdater.updatePremium()\n }\n\n toggleFireAlarm(e) {\n const newValue = toggle.handleClick(e)\n this.fireAlarmFieldTarget.value = newValue ? \"central\" : \"none\"\n if (this.hasFireSprinklerSectionTarget) {\n this.fireSprinklerSectionTarget.classList.toggle(\"collapsed\")\n }\n PremiumUpdater.updatePremium()\n }\n\n toggleSecuredCommunity(e) {\n const newValue = toggle.handleClick(e)\n this.securedCommunitySectionTarget.classList.toggle(\"collapsed\")\n if (newValue) {\n this.findSecuredCommunityRadio(\"single_entry\").checked = true\n } else {\n this.findSecuredCommunityRadio(\"no\").checked = true\n }\n PremiumUpdater.updatePremium()\n }\n\n toggleGatedCommunity(e) {\n const target = this.securedCommunityHiddenFieldTarget\n const valueTransformer = isGated => {\n if (isGated) {\n return \"gated_key_card\"\n }\n return target.dataset.initialValue\n }\n toggle.handleClick(e, valueTransformer)\n PremiumUpdater.updatePremium()\n }\n\n fireSprinklersChanged() {\n PremiumUpdater.updatePremium()\n }\n\n findSecuredCommunityRadio(value) {\n return this.securedCommunityRadiosTargets.find(el => el.value == value)\n }\n\n setVacancy() {\n if (this.withinParkTarget.value == \"yes\") {\n this.vacancyPermissionTarget.value = \"true\"\n }\n }\n}\n","const captureSuccess = result => ({ state: \"fulfilled\", result })\nconst captureFail = error => ({ state: \"rejected\", error })\n\nexport default (promises, { onlyFulfilled = false, onlyRejected = false } = {}) => {\n const settled = Promise.all(promises.map(p => p.then(captureSuccess).catch(captureFail)))\n\n if (onlyFulfilled) {\n return settled.then(results => results.filter(r => r.state === \"fulfilled\").map(r => r.result))\n }\n\n if (onlyRejected) {\n return settled.then(results => results.filter(r => r.state === \"rejected\").map(r => r.error))\n }\n\n return settled\n}\n","import { Controller } from \"stimulus\"\nimport { DirectUpload } from \"activestorage\"\nimport Rails from \"rails-ujs\"\nimport allSettled from \"../../utils/all_settled\"\nimport { closeModal } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"fileInput\", \"fileLabel\", \"loading\", \"clientError\", \"serverError\", \"fileList\"]\n\n connect() {\n this.fileInputTarget.addEventListener(\"dragenter\", e => this.handleDrag(e))\n this.fileInputTarget.addEventListener(\"dragleave\", e => this.handleDrag(e))\n this.fileInputTarget.addEventListener(\"drop\", e => this.fileSelected(e))\n if (this.fileListTarget.closest(\"section\").querySelectorAll(\".uploaded-files--item\").length !== 0) {\n this.fileInputTarget.closest(\"label\").classList.add(\"file-upload__has-uploads\")\n }\n }\n\n handleDrag(e) {\n if (e.type === \"dragenter\") {\n this.fileLabelTarget.classList.add(\"file-upload--label__active\")\n } else {\n this.fileLabelTarget.classList.remove(\"file-upload--label__active\")\n }\n }\n\n clearErrors() {\n this.clientErrorTarget.classList.add(\"hidden\")\n this.serverErrorTarget.classList.add(\"hidden\")\n document.getElementById(\"continue-button-message\").classList.add(\"hidden\")\n }\n\n showServerError() {\n this.serverErrorTarget.classList.remove(\"hidden\")\n document.getElementById(\"continue-button-error\").classList.remove(\"hidden\")\n }\n\n showClientError() {\n this.clientErrorTarget.classList.remove(\"hidden\")\n document.getElementById(\"continue-button-error\").classList.remove(\"hidden\")\n }\n\n removeFile(e) {\n e.preventDefault()\n e.stopPropagation()\n Rails.ajax({\n url: e.currentTarget.dataset.url,\n type: \"DELETE\",\n data: new URLSearchParams(Object.entries({ _method: \"destroy\" })).toString(),\n success: (response, statusCode, request) => {\n this.fileListTarget.querySelector(`[data-document-id='${response.id}']`).remove()\n document.getElementById(\"continue-button-final-steps\").classList.remove(\"hidden\")\n document.getElementById(\"continue-button-error\").classList.add(\"hidden\")\n this.clearErrors()\n if (this.fileListTarget.closest(\"section\").querySelectorAll(\".uploaded-files--item\").length === 0) {\n this.fileInputTarget.closest(\"label\").classList.remove(\"file-upload__has-uploads\")\n }\n },\n error: response => {\n this.showServerError()\n },\n complete: () => {}\n })\n closeModal(`remove-file-${e.currentTarget.dataset.documentId}`)\n }\n\n fileSelected() {\n this.loadingTarget.classList.remove(\"hidden\")\n this.clearErrors()\n this.fileLabelTarget.classList.remove(\"file-upload--label__active\")\n document.getElementById(\"continue-button-error\").classList.remove(\"hidden\")\n document.getElementById(\"continue-button-final-steps\").classList.add(\"hidden\")\n const url = this.fileInputTarget.dataset.directUploadUrl\n let promises = []\n for (let index = 0; index < this.fileInputTarget.files.length; index++) {\n promises.push(\n new Promise((resolve, reject) => {\n let file = this.fileInputTarget.files[index]\n if (file.size > 10 * 1000 * 1000 || !file.type.match(/(image)|(pdf)/)) {\n this.clientErrorTarget.classList.remove(\"hidden\")\n document.getElementById(\"continue-button-final-steps\").classList.add(\"hidden\")\n return reject()\n }\n const upload = new DirectUpload(file, url)\n const fileName = upload.file.name.substring(0, 13)\n const fileType = upload.file.name.slice(upload.file.name.length - 3)\n this.uploadName = fileName + \"...\" + fileType\n\n upload.create((error, blob) => {\n if (error) {\n reject(error)\n } else {\n let params = {\n blob: blob.signed_id,\n label: this.fileInputTarget.dataset.documentLabel\n }\n let data = new URLSearchParams(Object.entries(params)).toString()\n Rails.ajax({\n url: this.fileListTarget.dataset.url,\n type: \"POST\",\n data: data,\n success: (response, statusCode, request) => {\n this.fileListTarget.outerHTML = request.response\n if (this.fileListTarget.querySelectorAll(\".uploaded-files--item\").length !== 0) {\n this.fileInputTarget.closest(\"label\").classList.add(\"file-upload__has-uploads\")\n }\n resolve(response)\n },\n error: response => {\n reject(response)\n }\n })\n }\n })\n })\n )\n }\n this.fileInputTarget.value = \"\"\n allSettled(promises).then(results => {\n // if you hit a stimulus error, this will fail as result.error is an object\n if (results.find(result => result.state == \"rejected\" && result.error && result.error.endsWith(\" 0\"))) {\n document.getElementById(\"continue-button-message\").classList.remove(\"hidden\")\n document.getElementById(\"continue-button-error\").classList.add(\"hidden\")\n document.getElementById(\"continue-button-final-steps\").classList.remove(\"hidden\")\n this.showServerError()\n }\n if (results.find(result => result.state == \"rejected\" && result.error == undefined)) {\n document.getElementById(\"continue-button-message\").classList.remove(\"hidden\")\n document.getElementById(\"continue-button-error\").classList.add(\"hidden\")\n document.getElementById(\"continue-button-final-steps\").classList.remove(\"hidden\")\n this.showClientError()\n }\n this.loadingTarget.classList.add(\"hidden\")\n document.getElementById(\"continue-button-error\").classList.add(\"hidden\")\n document.getElementById(\"continue-button-final-steps\").classList.remove(\"hidden\")\n })\n }\n\n get documentsController() {\n return this.application.getControllerForElementAndIdentifier(document.querySelector(\"section.documents\"), \"nok--documents\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"uploadedCount\", \"next\", \"totalCount\", \"skipModal\", \"moreNeeded\"]\n\n connect() {\n this.updateUploadedCount()\n }\n\n get uploadedCount() {\n return document.querySelectorAll(\".files-missing.hidden\").length\n }\n\n get totalCount() {\n return parseInt(this.totalCountTarget.textContent, 10)\n }\n\n updateUploadedCount() {\n this.uploadedCountTarget.textContent = this.uploadedCount\n let moreNeeded = this.uploadedCount < this.totalCount\n moreNeeded ? this.showMoreNeeded() : this.hideMoreNeeded()\n this.nextTarget.disabled = moreNeeded\n document.querySelector(\".label-wrapper input\").disabled = moreNeeded\n }\n\n showMoreNeeded() {\n this.moreNeededTarget.classList.remove(\"hidden\")\n }\n\n hideMoreNeeded() {\n this.moreNeededTarget.classList.add(\"hidden\")\n }\n\n showSkipModal() {\n this.skipModalTarget.classList.remove(\"hidden\")\n }\n\n hideSkipModal() {\n this.skipModalTarget.classList.add(\"hidden\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"form\"]\n\n connect() {\n function addExitIntentListener(obj, evt, fn) {\n if (obj.addEventListener) {\n obj.addEventListener(evt, fn, false)\n } else if (obj.attachEvent) {\n obj.attachEvent(\"on\" + evt, fn)\n }\n }\n addExitIntentListener(document, \"mouseout\", function (evt) {\n const email_input = document.getElementById(\"property_household_attributes_users_attributes_0_email\").value\n if (evt.toElement === null && evt.relatedTarget === null && !localStorage.getItem(\"exit_intent_shown_email\") && email_input === \"\") {\n if (document.getElementById(\"exit-intent-eligible\") != null) {\n document.getElementById(\"exit-intent\").style.display = \"block\"\n localStorage.setItem(\"exit_intent_shown_email\", true)\n }\n }\n })\n }\n\n dismissExitIntentModal() {\n var modal = document.getElementById(\"exit-intent\")\n modal.style.display = \"none\"\n }\n}\n","import { Controller } from \"stimulus\"\nimport { openModal } from \"../../components/shared/utils/utils\"\nimport Rails from \"rails-ujs\"\n\nexport default class extends Controller {\n connect() {\n openModal(\"flood_modal\")\n document.addEventListener(\"kin-modal:close\", this.handleClose)\n }\n\n handleClose = event => {\n Rails.ajax({\n url: \"/quote/flood.json\",\n type: \"PATCH\",\n data: \"decision=false\"\n })\n }\n}\n","import { Controller } from \"stimulus\"\nimport { trackEvent } from \"../../network_requests/funnel_event\"\n\nconst INTERVAL = 2 * 1000\n\nexport default class extends Controller {\n static targets = [\"spinner\", \"timeoutHelp\"]\n\n initialize() {\n this.poll()\n setTimeout(this.showHelpText, this.helpAfter())\n }\n\n poll = () => {\n fetch(this.pollingURL())\n .then(response => {\n if (!response.ok) {\n throw new Error(\"There was an issue loading the next page.\")\n }\n return response.json()\n })\n .then(data => {\n if (data.hasOwnProperty(\"blocked\")) {\n if (data.blocked) {\n setTimeout(this.poll, INTERVAL)\n } else {\n window.location.href = window.location.pathname\n }\n }\n })\n }\n\n showHelpText = () => {\n trackEvent(\"loading_timeout\", { metadata: { timeout: `${this.helpAfter()} milliseconds` } })\n this.timeoutHelpTarget.style.display = \"\"\n this.spinnerTarget.style.display = \"none\"\n }\n\n helpAfter() {\n return Number(this.data.get(\"help-after\")) * 1000\n }\n\n pollingURL() {\n return window.location.pathname + \".json\"\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"form\", \"loanNumber\", \"noMortgage\", \"submit\"]\n\n connect() {\n this.noMortgageTarget.addEventListener(\"change\", this.updateState)\n\n this.updateState(false)\n }\n\n disconnect() {\n this.noMortgageTarget.removeEventListener(\"change\", this.updateState)\n }\n\n updateState = (validate = true) => {\n if (this.noMortgageChecked()) {\n this.disableInputs()\n } else {\n this.enableInputs()\n }\n\n if (validate) {\n this.formValidation.triggerRefresh()\n }\n }\n\n enableInputs() {\n this.companyName.toggleDisabledState(false)\n this.loanNumberTarget.disabled = false\n }\n\n disableInputs() {\n this.companyName.reinitialize()\n this.companyName.toggleDisabledState(true)\n\n this.loanNumberTarget.disabled = true\n this.loanNumberTarget.value = \"\"\n }\n\n noMortgageChecked() {\n return this.noMortgageTarget.checked\n }\n\n get companyName() {\n return this.formTarget.querySelector(\"kin-remote-autocomplete\")\n }\n\n get formValidation() {\n return this.formTarget.querySelector(\"kin-form-validation\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nconst valueToTextMap = {\n full: \"1-Pay\",\n two_pay: \"2-Pay\",\n quarterly: \"4-Pay\"\n}\n\nexport default class extends Controller {\n static targets = [\"firstPayment\", \"paymentChoiceText\"]\n\n onPaymentSelect(e) {\n let target = e.target\n let tableRow = []\n // select event from input and turn into an array\n Array.from(target.parentElement.querySelectorAll(\"table tbody tr:first-child td\")).map(f => {\n tableRow.push(f.innerText)\n })\n // display text for selected payment\n this.firstPaymentTarget.innerText = `First payment occurs on ${tableRow[0]} in the amount of ${tableRow[1]}.`\n //change text based on radio input state\n let paymentChoice = target.parentElement.querySelector(\"label\")\n let paymentInput = target.parentElement.querySelector(\"input\")\n let previousPaymentChoice = this.paymentChoiceTextTargets.filter(target => target.innerHTML.includes(\"Chosen\"))\n if (paymentInput.checked) {\n paymentChoice.innerText = valueToTextMap[paymentInput.value] + \" Chosen\"\n\n // push event to GTM\n delete window.kinterested[\"gtm.uniqueEventId\"]\n let newPremium = target.parentElement.querySelector(\"table tfoot td\").innerText.replace(/[^\\d.]/g, \"\")\n\n window.kinterested = {\n ...window.kinterested,\n payment_schedule: valueToTextMap[paymentInput.value],\n policy_purchase_amount: newPremium,\n event: \"self_serve_quote_signing_page_modified\"\n }\n\n window.dataLayer.push(window.kinterested)\n }\n if (previousPaymentChoice.length) {\n previousPaymentChoice[0].innerText = \"Choose \" + valueToTextMap[previousPaymentChoice[0].parentElement.querySelector(\"input\").value]\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"modal\", \"loading\", \"pdf\", \"pdfWrapper\"]\n\n connect() {\n this.pdfTarget.onload = this.pdfLoaded.bind(this)\n this.element.querySelector(\"form\").oninput = this.checkValidity.bind(this)\n }\n\n pdfLoaded() {\n this.loadingTarget.classList.add(\"hidden\")\n this.pdfWrapperTarget.classList.remove(\"hidden\")\n }\n\n initial(e) {\n let wrapper = e.target.closest(\".initials\")\n wrapper.querySelector(\".unsigned\").classList.add(\"hidden\")\n wrapper.querySelector(\".signed\").classList.remove(\"hidden\")\n wrapper.querySelector(\"input[type='checkbox']\").checked = true\n }\n\n show() {\n this.modalTarget.classList.remove(\"hidden\")\n }\n\n hide() {\n window.scrollTo(0, 0)\n this.modalTarget.classList.add(\"hidden\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"form\",\n \"purchaseDateField\",\n \"currentInsuranceStatusInput\",\n \"addCoapplicantInput\",\n \"addCoapplicantsContainer\",\n \"timesRentedNext12MonthsQuestion\",\n \"timesRentedPast12MonthsQuestion\",\n \"monthsOccupiedNext12MonthsQuestion\",\n \"monthsOccupiedPast12MonthsQuestion\"\n ]\n\n connect() {\n setTimeout(() => {\n this.initializeState()\n }, 50)\n refreshVisibleFields(\"form\")\n }\n\n initializeState() {\n this.state = {}\n\n this.changeState({\n add_coapplicant: this.addCoapplicantInputTarget.checked,\n current_insurance_status: this.currentInsuranceStatusInputTarget.value\n })\n }\n\n addCoapplicantInputOnChange = event => {\n this.changeState({ add_coapplicant: event.target.checked })\n }\n\n currentInsuranceStatusOnChange = event => {\n this.changeState({ current_insurance_status: event.target.value })\n }\n\n changeState(newState) {\n this.state = Object.assign(this.state, newState)\n this.stateOnChange()\n }\n\n stateOnChange() {\n if (this.state.add_coapplicant) {\n this.showCoApplicantInputs()\n } else {\n this.hideCoApplicantInputs()\n }\n\n if (this.state.current_insurance_status == \"new_purchase_new_policy\") {\n this.showNext12MonthsQuestions()\n this.hidePast12MonthsQuestions()\n } else {\n this.showPast12MonthsQuestions()\n this.hideNext12MonthsQuestions()\n }\n\n refreshVisibleFields(\"form\")\n }\n\n showPast12MonthsQuestions() {\n this.timesRentedPast12MonthsQuestionTarget.classList.remove(\"hidden\")\n this.monthsOccupiedPast12MonthsQuestionTarget.classList.remove(\"hidden\")\n }\n\n hidePast12MonthsQuestions() {\n this.timesRentedPast12MonthsQuestionTarget.classList.add(\"hidden\")\n this.monthsOccupiedPast12MonthsQuestionTarget.classList.add(\"hidden\")\n }\n\n showNext12MonthsQuestions() {\n this.timesRentedNext12MonthsQuestionTarget.classList.remove(\"hidden\")\n this.monthsOccupiedNext12MonthsQuestionTarget.classList.remove(\"hidden\")\n }\n\n hideNext12MonthsQuestions() {\n this.timesRentedNext12MonthsQuestionTarget.classList.add(\"hidden\")\n this.monthsOccupiedNext12MonthsQuestionTarget.classList.add(\"hidden\")\n }\n\n showCoApplicantInputs() {\n this.addCoapplicantsContainerTarget.classList.remove(\"hidden\")\n this.addCoapplicantsContainerTarget.querySelectorAll(\"input\").forEach(f => (f.required = true))\n }\n\n hideCoApplicantInputs() {\n this.addCoapplicantsContainerTarget.querySelectorAll(\"input\").forEach(f => (f.required = false))\n this.addCoapplicantsContainerTarget.classList.add(\"hidden\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"optOut\", \"unsubscribeAll\"]\n\n // When \"Unsubscribe from all\" is selected/unselected, change opt-outs to match.\n onUnsubscribeAllSelect() {\n this.optOutTargets.forEach(opt => (opt.checked = this.unsubscribeAllTarget.checked))\n }\n\n // If an individual opt-out checkboxes is unselected, unselect \"Unsubscribe from all\".\n onOptOutSelect() {\n if (this.optOutTargets.some(opt => opt.checked === false)) {\n this.unsubscribeAllTarget.checked = false\n } else {\n this.unsubscribeAllTarget.checked = true\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport { formatMoney } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"difference\", \"premium\", \"annually\", \"biannually\", \"quarterly\", \"monthly\", \"spinner\"]\n\n connect() {\n this.premiumTarget.dataset.pendingCount = 0\n this.form = document.querySelector(\"form.edit_bright_policy\")\n document.body.addEventListener(\"kin:premium-update\", () => {\n this.resetAnimation()\n this.displaySpinner()\n })\n this.displayPaymentFrequency(window.localStorage.getItem(\"paymentFrequency\"))\n if (this.form) {\n this.form.addEventListener(\"ajax:success\", event => {\n this.handleSuccess(event)\n })\n }\n }\n\n handleSuccess(event) {\n const selected_payment = document.getElementsByClassName(\"selected-payment\")[0].getElementsByTagName(\"p\")[0]\n const org_premium = Number.parseInt(selected_payment.dataset.premium)\n const new_annual_premium = event.detail[0].premium\n this.updateAllPremiums(new_annual_premium)\n\n const new_premium = this.calculateNewPremiumForPaymentSchedule(new_annual_premium)\n\n this.displayDifference(new_premium - org_premium)\n window.setTimeout(() => {\n this.displayPremium()\n }, 1250)\n }\n\n setMonthlyFrequency() {\n const frequency = \"monthly\"\n this.displayPaymentFrequency(frequency)\n window.localStorage.setItem(\"paymentFrequency\", frequency)\n }\n\n setQuarterlyFrequency() {\n const frequency = \"quarterly\"\n this.displayPaymentFrequency(frequency)\n window.localStorage.setItem(\"paymentFrequency\", frequency)\n }\n\n setBiannualFrequency() {\n const frequency = \"biannual\"\n this.displayPaymentFrequency(frequency)\n window.localStorage.setItem(\"paymentFrequency\", frequency)\n }\n\n setAnnualFrequency() {\n this.displayPaymentFrequency(\"annual\")\n window.localStorage.removeItem(\"paymentFrequency\")\n }\n\n displayPaymentFrequency(frequency) {\n if (frequency == null) {\n return false\n }\n\n // Remove selected class from any elements\n var els = document.getElementsByClassName(\"payment-options\")[0].children\n for (var i = 0; i < els.length; i++) {\n els[i].classList.remove(\"selected-payment\")\n }\n\n // Add selected class to new payment frequency\n document.getElementById(frequency).classList.add(\"selected-payment\")\n\n // Remove the hover class\n document.getElementsByClassName(\"payment-options\")[0].classList.remove(\"hoverable\")\n window.setTimeout(() => {\n document.getElementsByClassName(\"payment-options\")[0].classList.add(\"hoverable\")\n }, 1000)\n }\n\n displaySpinner() {\n var selectedPremium = document.getElementsByClassName(\"selected-payment\")[0].getElementsByTagName(\"p\")[0]\n selectedPremium.classList.add(\"down\")\n this.spinnerTarget.classList.remove(\"up\")\n window.setTimeout(() => {\n selectedPremium.classList.remove(\"down\")\n selectedPremium.classList.add(\"up\")\n }, 1250)\n }\n\n displayDifference(difference) {\n var selectedPremium = document.getElementsByClassName(\"selected-payment\")[0].getElementsByTagName(\"p\")[0]\n if (difference < 0) {\n this.differenceTarget.innerText = \"- \" + formatMoney(difference * -1)\n this.differenceTarget.classList.add(\"negative\")\n this.differenceTarget.classList.remove(\"positive\")\n } else {\n if (difference == 0) {\n this.differenceTarget.classList.remove(\"negative\")\n this.differenceTarget.classList.remove(\"positive\")\n } else {\n this.differenceTarget.classList.add(\"positive\")\n this.differenceTarget.classList.remove(\"negative\")\n }\n this.differenceTarget.innerText = \"+\" + formatMoney(difference)\n }\n this.differenceTarget.classList.remove(\"up\")\n this.spinnerTarget.classList.add(\"down\")\n }\n\n displayPremium() {\n this.differenceTarget.classList.add(\"down\")\n document.getElementsByClassName(\"selected-payment\")[0].getElementsByTagName(\"p\")[0].classList.remove(\"up\")\n window.setTimeout(() => {\n this.resetAnimation()\n }, 1250)\n }\n\n updateAllPremiums(new_annual_premium) {\n this.premiumTarget.dataset.premium = new_annual_premium\n this.monthlyTarget.dataset.premium = new_annual_premium / 12\n this.quarterlyTarget.dataset.premium = new_annual_premium / 4\n this.biannuallyTarget.dataset.premium = new_annual_premium / 2\n this.premiumTarget.innerText = formatMoney(new_annual_premium)\n this.quarterlyTarget.innerText = formatMoney(new_annual_premium / 4)\n this.biannuallyTarget.innerText = formatMoney(new_annual_premium / 2)\n this.monthlyTarget.innerText = formatMoney(new_annual_premium / 12)\n }\n\n calculateNewPremiumForPaymentSchedule(annual_premium) {\n const frequency = window.localStorage.getItem(\"paymentFrequency\")\n if (frequency == \"quarterly\") {\n return annual_premium / 4\n } else if (frequency == \"biannual\") {\n return annual_premium / 2\n } else if (frequency == \"monthly\") {\n return annual_premium / 12\n } else {\n return annual_premium\n }\n }\n\n resetAnimation() {\n document.getElementsByClassName(\"selected-payment\")[0].getElementsByTagName(\"p\")[0].classList.remove(\"up\")\n this.differenceTarget.classList.remove(\"down\")\n this.spinnerTarget.classList.remove(\"down\")\n this.differenceTarget.classList.add(\"up\")\n this.spinnerTarget.classList.add(\"up\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"storiesContainer\", \"storiesInput\"]\n\n connect() {\n this.evaluateRadioButtonValue()\n }\n\n displayStories(isDisplayed) {\n if (isDisplayed && this.storiesInputTarget.dataset.storiesPresent === \"false\") {\n this.storiesContainerTarget.classList.remove(\"hidden\")\n this.storiesInputTarget.required = true\n this.storiesInputTarget.disabled = false\n } else {\n this.storiesContainerTarget.classList.add(\"hidden\")\n this.storiesInputTarget.required = false\n this.storiesInputTarget.disabled = true\n }\n this.formValidation.triggerRefresh()\n }\n\n evaluateRadioButtonValue() {\n let condominiumRadio = this.element.querySelector('input[value=\"condominium\"]')\n let isDisplayed = condominiumRadio ? condominiumRadio.checked : false\n this.displayStories(isDisplayed)\n }\n\n get formValidation() {\n return this.element.closest(\"form\").querySelector(\"kin-form-validation\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"lineField\"]\n\n setHO6() {\n this.lineFieldTarget.value = \"HO6\"\n }\n\n setHO3() {\n this.lineFieldTarget.value = \"HO3\"\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"constructionTypeSelect\", \"exteriorWallFinishContainer\", \"exteriorWallFinish\"]\n\n connect() {\n if (this.hasConstructionTypeSelectTarget) {\n this.constructionTypeSelectOnChange()\n }\n\n if (this.hasExteriorWallFinishContainerTarget && !this.hasConstructionTypeSelectTarget) {\n this.exteriorWallFinishContainerTarget.classList.remove(\"hidden\")\n }\n }\n\n constructionTypeSelectOnChange(event) {\n if (this.constructionTypeSelectTarget.value == \"frame\") {\n this.exteriorWallFinishContainerTarget.classList.remove(\"hidden\")\n this.exteriorWallFinishTarget.required = true\n refreshVisibleFields(this.exteriorWallFinishTarget.closest(\"form\"))\n } else {\n this.exteriorWallFinishContainerTarget.classList.add(\"hidden\")\n this.exteriorWallFinishTarget.required = false\n refreshVisibleFields(this.exteriorWallFinishTarget.closest(\"form\"))\n }\n }\n}\n","/**\n * helper for formatting inputs, static methods\n */\n\nexport class SanitizeHelper {\n /**\n * escapes html tags\n */\n static escapeHTML(input: string): string {\n return input.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport { request } from \"../../utils/request\"\nimport { SanitizeHelper } from \"../../utils/sanitize_helper\"\n\nconst SELECTORS = [\n \"input[type='text']:not(.hidden):not([data-validate-credit-card]):not([data-fullstory-exclude]):not([autocomplete^=cc-])\",\n \"input[type='email']:not(.hidden):not([data-fullstory-exclude])\",\n \"input[type='tel']:not(.hidden):not([data-fullstory-exclude])\"\n]\n\nexport default class extends Controller {\n static targets = [\"form\"]\n\n screenshot(e) {\n document.querySelectorAll(\"script\").forEach(s => s.remove())\n\n this.formTarget.querySelectorAll(SELECTORS.toString()).forEach(input => {\n input.value = SanitizeHelper.escapeHTML(input.value)\n })\n\n this.formTarget.querySelectorAll(\"input[type='checkbox']\").forEach(input => {\n if (input.checked && input.getClientRects().length !== 0) {\n input.setAttribute(\"checked\", \"checked\")\n }\n })\n\n let radioGroupNames = new Set()\n this.formTarget.querySelectorAll(\"input[type='radio']\").forEach(input => {\n if (input.getClientRects().length !== 0) {\n radioGroupNames.add(input.name)\n }\n })\n radioGroupNames.forEach(name => {\n let group = Array.from(this.formTarget.querySelectorAll(`input[name=${name}]`))\n let selected = group.find(radio => radio.checked === true)\n let toDeselect = group.filter(radio => radio.getAttribute(\"checked\") !== null && radio.checked !== true)\n selected.setAttribute(\"checked\", \"checked\")\n toDeselect.forEach(radio => radio.removeAttribute(\"checked\"))\n })\n\n document.documentElement.querySelectorAll(\"img\").forEach(img => {\n img.setAttribute(\"src\", `https://app.kin.com/${img.getAttribute(\"src\")}`)\n })\n\n let url = e.target.dataset.url\n let markup = document.documentElement.outerHTML\n let styleSheetUrls = Array.from(document.styleSheets).map(sheet => sheet.href)\n let userEmail = this.formTarget.querySelector('[id*=\"email\"]') ? this.formTarget.querySelector('[id*=\"email\"]').value : null\n let pageUrl = window.location.href\n let category = e.target.dataset.category\n request(url, {\n method: \"POST\",\n json: { markup: markup, style_sheet_urls: styleSheetUrls, user_email: userEmail, page_url: pageUrl, category: category }\n })\n }\n on\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport createCardToken from \"../../utils/create_card_token\"\nimport { refreshVisibleFields, openModal, closeModal } from \"../../components/shared/utils/utils\"\nimport { isAfter, isEqual } from \"date-fns\"\n\nexport default class extends Controller {\n static targets = [\n \"errors\",\n \"form\",\n \"submit\",\n \"firstName\",\n \"lastName\",\n \"number\",\n \"expiration\",\n \"cvv\",\n \"zip\",\n \"tokenValue\",\n \"tokenDescriptor\",\n \"cardFormContainer\",\n \"creditCardPaymentRadio\",\n \"mortgagePaymentRadio\",\n \"policyExpiration\"\n ]\n\n _loading = false\n _submitting = false\n\n connect() {\n this.onStateChange()\n\n this.formTarget.addEventListener(\"submit\", this.onSubmit)\n\n if (this.hasMortgagePaymentRadioTarget) {\n this.mortgagePaymentRadioTarget.addEventListener(\"change\", this.onStateChange)\n }\n\n if (!this.hasCreditCardPaymentRadioTarget) return\n\n this.creditCardPaymentRadioTarget.addEventListener(\"change\", this.onStateChange)\n\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n\n this.setupModalToggleListeners()\n }\n\n disconnect() {\n this.mortgagePaymentRadioTarget.removeEventListener(\"change\", this.onStateChange)\n this.formTarget.removeEventListener(\"submit\", this.onSubmit)\n this.creditCardPaymentRadioTarget.removeEventListener(\"change\", this.onStateChange)\n }\n\n onSubmit = event => {\n if (this._submitting || this.loading()) {\n event.preventDefault()\n return\n }\n\n delete window.kinterested[\"gtm.uniqueEventId\"]\n\n window.kinterested = {\n ...window.kinterested,\n event: \"self_serve_quote_signing_page_submitted\"\n }\n\n window.dataLayer.push(window.kinterested)\n\n if (this.isCardPayment()) {\n event.preventDefault()\n\n if (this.upcomingExpiration()) {\n openModal(\"expiring-credit-card-notice\")\n return\n } else {\n this.finalizeCreditCard()\n }\n }\n }\n\n onStateChange = e => {\n if (this.hasCardFormContainerTarget) {\n if (this.isCardPayment()) {\n this.cardFormContainerTarget.classList.remove(\"hidden\")\n this.cardFormContainerTarget.querySelectorAll(\"input\").forEach(f => (f.disabled = false))\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n } else {\n this.cardFormContainerTarget.classList.add(\"hidden\")\n this.cardFormContainerTarget.querySelectorAll(\"input\").forEach(f => (f.disabled = true))\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n }\n }\n\n if (e !== undefined) {\n if (e.type === \"change\") {\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n }\n }\n }\n\n onError(messages) {\n this.errorsTarget.children.forEach(child => child.remove())\n let error = document.createElement(\"p\")\n error.innerText = messages\n this.errorsTarget.append(error)\n }\n\n setLoading(value) {\n this._loading = value\n this.onStateChange()\n }\n\n loading() {\n return this._loading\n }\n\n isCardPayment() {\n return this.hasCreditCardPaymentRadioTarget && this.creditCardPaymentRadioTarget.checked\n }\n\n validAttributes() {\n return this.validFirstName() && this.validLastName() && this.validZipCode()\n }\n\n number() {\n return this.numberTarget.value.replace(/[^\\d]/g, \"\")\n }\n\n expiration() {\n return this.expirationTarget.value.split(\"/\").map(str => str.replace(/ /g, \"\"))\n }\n\n cvv() {\n return this.cvvTarget.value\n }\n\n firstName() {\n return this.firstNameTarget.value\n }\n\n lastName() {\n return this.lastNameTarget.value\n }\n\n name() {\n return `${this.firstName()} ${this.lastName()}`\n }\n\n zip() {\n return this.zipTarget.value\n }\n\n validFirstName() {\n return this.firstName() != \"\"\n }\n\n validLastName() {\n return this.lastName() != \"\"\n }\n\n setupModalToggleListeners() {\n const expiringCreditCardNoticeId = \"modal__expiring-credit-card-notice\"\n\n document.addEventListener(\"kin-modal:close\", e => {\n if (![expiringCreditCardNoticeId].includes(e.detail?.id)) {\n return\n }\n Rails.enableElement(this.submitTarget)\n })\n\n document.addEventListener(\"kin-modal:open\", e => {\n if (e.detail?.id !== expiringCreditCardNoticeId) {\n return\n }\n\n Rails.disableElement(this.submitTarget)\n })\n }\n\n policyMonth() {\n return Number(this.policyExpirationTarget.dataset.policyExpirationMonth)\n }\n\n policyYear() {\n return Number(this.policyExpirationTarget.dataset.policyExpirationYear)\n }\n\n upcomingExpiration() {\n let policyMonth = this.policyMonth()\n let policyYear = this.policyYear()\n let cardMonth = Number(this.expiration()[0])\n let cardYear = Number(this.expiration()[1])\n\n const policyDate = new Date(policyYear, policyMonth - 1, 1)\n const cardDate = new Date(cardYear, cardMonth - 1, 1)\n\n if (isEqual(policyDate, cardDate) || isAfter(policyDate, cardDate)) {\n return true\n }\n\n return false\n }\n\n updateCard() {\n closeModal(\"expiring-credit-card-notice\")\n this.numberTarget.focus()\n }\n\n submitCardInfo() {\n closeModal(\"expiring-credit-card-notice\")\n refreshVisibleFields(this.formTarget)\n\n this.finalizeCreditCard()\n this.formTarget.disabled = true\n }\n\n finalizeCreditCard() {\n this._submitting = true\n this.setLoading(true)\n const [month, year] = this.expiration()\n\n createCardToken({\n month: month,\n year: year,\n number: this.number(),\n cvv: this.cvv(),\n name: this.name(),\n zip: this.zip(),\n clientID: this.data.get(\"client-id\"),\n clientKey: this.data.get(\"client-key\")\n })\n .then(({ dataDescriptor, dataValue }) => {\n this.tokenValueTarget.value = dataValue\n this.tokenDescriptorTarget.value = dataDescriptor\n this.formTarget.submit()\n })\n .catch(messages => {\n this._submitting = false\n this.setLoading(false)\n this.onError(messages)\n })\n }\n}\n","export default function toArray(arrayLike) {\n if (arrayLike && (arrayLike.length === undefined || arrayLike.call !== undefined)) {\n console.error(\"toArray must recielve a non-function object that implements length.\")\n return []\n }\n\n return Array.prototype.map.call(arrayLike, e => e)\n}\n","import { Controller } from \"stimulus\"\nimport \"../../components/shared/addressCompletion\"\nimport toArray from \"../../utils/to_array\"\nimport Rails from \"rails-ujs\"\n\nconst addressCompletion = window.app.kinAddressCompletion\n\nexport default class extends Controller {\n static targets = [\n \"primaryAddressSection\",\n \"primaryAddressId\",\n \"primaryAddressConfirmed\",\n \"primaryAddressFailed\",\n \"primaryAddressForm\",\n \"primaryAddressInput\",\n \"primaryUnitInput\",\n \"primaryAddressVisibleInput\",\n \"primaryConfirmAddress\",\n \"primaryMailingCheckbox\",\n \"secondaryAddressSection\",\n \"secondaryAddressId\",\n \"secondaryAddressConfirmed\",\n \"secondaryAddressFailed\",\n \"secondaryAddressForm\",\n \"secondaryAddressInput\",\n \"secondaryUnitInput\",\n \"secondaryAddressVisibleInput\",\n \"secondaryConfirmAddress\",\n \"secondaryMailingCheckbox\",\n \"coapplicantFields\",\n \"coapplicantCheckbox\",\n \"coapplicantDestroy\",\n \"dobField\",\n \"phoneField\"\n ]\n\n connect() {\n this.initAddressCompletion()\n this.handlecoapplicantChecked()\n }\n\n initAddressCompletion() {\n addressCompletion.initialize({\n selectors: {\n display: \"#js-address\",\n unit: \"#js-address-unit\",\n streetName: \"#js-address-street-name\",\n streetNumber: \"#js-address-street-number\",\n zipPlus4: \"#js-address-zip-plus4\",\n street: \"#js-address-street\",\n city: \"#js-address-city\",\n state: \"#js-address-state\",\n zip: \"#js-address-zip\",\n lat: \"#js-address-lat\",\n lon: \"#js-address-lon\"\n }\n })\n addressCompletion.initialize({\n selectors: {\n display: \"#js-address-secondary\",\n unit: \"#js-address-unit-secondary\",\n streetName: \"#js-address-street-name-secondary\",\n streetNumber: \"#js-address-street-number-secondary\",\n zipPlus4: \"#js-address-zip-plus4-secondary\",\n street: \"#js-address-street-secondary\",\n city: \"#js-address-city-secondary\",\n state: \"#js-address-state-secondary\",\n zip: \"#js-address-zip-secondary\",\n lat: \"#js-address-lat-secondary\",\n lon: \"#js-address-lon-secondary\"\n }\n })\n // Setup some onfocus listeners to update the autocomplete values on these inputs -\n // this is needed to prevent autofill from covering up the autocomplete results\n if (this.hasPrimaryAddressVisibleInputTarget) {\n this.primaryAddressVisibleInputTarget.addEventListener(\"focus\", () => {\n this.primaryAddressVisibleInputTarget.setAttribute(\"autocomplete\", \"new-email\")\n })\n }\n if (this.hasSecondaryAddressVisibleInputTarget) {\n this.secondaryAddressVisibleInputTarget.addEventListener(\"focus\", () => {\n this.secondaryAddressVisibleInputTarget.setAttribute(\"autocomplete\", \"new-email\")\n })\n }\n }\n\n handlePrimaryAddressChecked() {\n this.toggleAddress(this.primaryMailingCheckboxTarget.checked, this.primaryAddressSectionTarget, this.primaryAddressIdTarget)\n }\n\n handleSecondaryAddressChecked() {\n this.toggleAddress(this.secondaryMailingCheckboxTarget.checked, this.secondaryAddressSectionTarget, this.secondaryAddressIdTarget)\n }\n\n toggleAddress(checked, section, idElement) {\n if (checked) {\n section.classList.remove(\"hidden\")\n idElement.value = idElement.dataset.insuredAddressId\n } else {\n section.classList.add(\"hidden\")\n idElement.value = idElement.dataset.propertyAddressId\n }\n }\n\n preventKeydownSubmit(e) {\n if (e.keyCode === 13) {\n e.preventDefault()\n }\n }\n\n handlecoapplicantChecked() {\n if (!this.hasCoapplicantDestroyTarget) {\n return\n }\n if (!this.hasCoapplicantFieldsTarget) {\n return\n }\n if (!this.hasCoapplicantCheckboxTarget) {\n return\n }\n const isCoapplicantPersisted = this.coapplicantDestroyTarget.getAttribute(\"data-is-persisted\") === \"true\"\n if (this.coapplicantCheckboxTarget.checked) {\n this.coapplicantFieldsTarget.classList.remove(\"hidden\")\n toArray(this.coapplicantFieldsTarget.querySelectorAll(\"input\")).forEach(el => (el.disabled = false))\n this.coapplicantDestroyTarget.value = 0\n } else {\n this.coapplicantFieldsTarget.classList.add(\"hidden\")\n toArray(this.coapplicantFieldsTarget.querySelectorAll(\"input\")).forEach(el => (el.disabled = true))\n this.coapplicantDestroyTarget.value = 1\n }\n\n if (isCoapplicantPersisted) {\n this.coapplicantDestroyTarget.disabled = false\n } else {\n this.coapplicantDestroyTarget.disabled = true\n }\n\n const idEl = this.coapplicantFieldsTarget.querySelector(\"#property_household_attributes_insureds_attributes_1_id\")\n if (idEl) {\n idEl.disabled = false\n }\n }\n\n handleAddressSuccess(e) {\n if (e.target === this.primaryAddressFormTarget) {\n return this.processPrimaryAddressSuccess(e)\n } else if (e.target === this.secondaryAddressFormTarget) {\n return this.processSecondaryAddressSuccess(e)\n } else {\n console.error(\"unknown event.target in handleAddressSuccess\")\n }\n }\n\n processPrimaryAddressSuccess(e) {\n const id = e.detail[0].id\n this.primaryAddressIdTarget.value = id\n this.primaryAddressIdTarget.dataset.insuredAddressId = id\n this.primaryConfirmAddressTarget.classList.add(\"hidden\")\n this.primaryAddressFailedTarget.classList.add(\"hidden\")\n this.primaryAddressConfirmedTarget.classList.remove(\"hidden\")\n toArray(this.primaryAddressFormTarget.querySelectorAll(\"input\"))\n .concat(toArray(this.primaryAddressVisibleInputTargets))\n .forEach(el => (el.disabled = true))\n }\n\n processSecondaryAddressSuccess(e) {\n const id = e.detail[0].id\n this.secondaryAddressIdTarget.value = id\n this.secondaryAddressIdTarget.dataset.insuredAddressId = id\n this.secondaryConfirmAddressTarget.classList.add(\"hidden\")\n this.secondaryAddressFailedTarget.classList.add(\"hidden\")\n this.secondaryAddressConfirmedTarget.classList.remove(\"hidden\")\n toArray(this.secondaryAddressFormTarget.querySelectorAll(\"input\"))\n .concat(toArray(this.secondaryAddressVisibleInputTargets))\n .forEach(el => (el.disabled = true))\n }\n\n handleAddressFailure(e) {\n if (e.target === this.primaryAddressFormTarget) {\n return this.processPrimaryAddressFailure(e)\n } else if (e.target === this.secondaryAddressFormTarget) {\n return this.processSecondaryAddressFailure(e)\n } else {\n console.error(\"unknown event.target in handleAddressSuccess\")\n }\n }\n\n processPrimaryAddressFailure(e) {\n this.primaryAddressFailedTarget.classList.remove(\"hidden\")\n }\n\n processSecondaryAddressFailure(e) {\n this.secondaryAddressFailedTarget.classList.remove(\"hidden\")\n }\n\n handlePrimaryUnit(e) {\n this.primaryUnitInputTarget.value = e.target.value\n }\n\n handleSecondaryUnit(e) {\n this.secondaryUnitInputTarget.value = e.target.value\n }\n\n handlePrimaryAddress(e) {\n this.primaryAddressInputTarget.value = e.target.value\n }\n\n handleSecondaryAddress(e) {\n this.secondaryAddressInputTarget.value = e.target.value\n }\n\n handlePrimaryAddressButton(e) {\n e.stopPropagation()\n e.preventDefault()\n Rails.fire(this.primaryAddressFormTarget, \"submit\")\n }\n\n handleSecondaryAddressButton(e) {\n e.stopPropagation()\n e.preventDefault()\n Rails.fire(this.secondaryAddressFormTarget, \"submit\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport createCardToken from \"../../utils/create_card_token\"\nimport postRequest from \"../../utils/fetch_helpers/post_request\"\nimport fetchClientDetails from \"../../utils/fetch_client_details\"\n\ninterface Token {\n dataDescriptor: string\n dataValue: string\n}\n\nexport default class extends Controller {\n static targets = [\n \"form\",\n \"formBody\",\n \"formSubmitButton\",\n \"successMessage\",\n \"errorMessage\",\n \"header\",\n \"firstName\",\n \"lastName\",\n \"creditCardNumber\",\n \"expiration\",\n \"cvv\",\n \"zip\",\n \"dialog\"\n ]\n\n declare formTarget: HTMLFormElement\n declare formBodyTarget: HTMLElement\n declare formSubmitButtonTarget: HTMLButtonElement\n declare successMessageTarget: HTMLElement\n declare errorMessageTarget: HTMLElement\n declare headerTarget: HTMLElement\n declare firstNameTarget: HTMLInputElement\n declare lastNameTarget: HTMLInputElement\n declare creditCardNumberTarget: HTMLInputElement\n declare expirationTarget: HTMLInputElement\n declare cvvTarget: HTMLInputElement\n declare zipTarget: HTMLInputElement\n declare dialogTarget: HTMLElement\n\n private successState: boolean = false\n\n connect() {\n this.successState = false\n this.dialogTarget.addEventListener(\"kin-dialog-hide\", this.handleDialogHide.bind(this))\n }\n\n disconnect() {\n this.dialogTarget.removeEventListener(\"kin-dialog-hide\", this.handleDialogHide.bind(this))\n }\n\n submit(event: Event) {\n event.preventDefault()\n this.formSubmitButtonTarget.classList.add(\"disabled\")\n this.handleFormSubmission()\n }\n\n firstName(): string {\n return this.firstNameTarget.value\n }\n\n lastName(): string {\n return this.lastNameTarget.value\n }\n\n name(): string {\n return `${this.firstName()} ${this.lastName()}`\n }\n\n number(): string {\n return this.creditCardNumberTarget.value.replace(/[^\\d]/g, \"\")\n }\n\n expirationMonth(): string {\n const month = this.expirationTarget.value.split(\"/\")[0]\n return month\n }\n\n expirationYear(): string {\n const year = this.expirationTarget.value.split(\"/\")[1]\n return year\n }\n\n cvv(): string {\n return this.cvvTarget.value\n }\n\n zip(): string {\n return this.zipTarget.value\n }\n\n getUrlValue(): string {\n return this.data.get(\"url-value\") as string\n }\n\n getClientDetailsUrl(): string {\n return this.data.get(\"get-client-url\")\n }\n\n async getCardToken(): Promise {\n try {\n const { login_id, generate_public_client_key } = await fetchClientDetails(this.getClientDetailsUrl())\n\n const token = await createCardToken({\n month: this.expirationMonth(),\n year: this.expirationYear(),\n number: this.number(),\n cvv: this.cvv(),\n name: this.name(),\n zip: this.zip(),\n clientID: login_id,\n clientKey: generate_public_client_key\n })\n return token\n } catch (error) {\n this.showError()\n return null\n }\n }\n\n async handleFormSubmission() {\n const token = await this.getCardToken()\n if (token) {\n const body = {\n credit_card: {\n descriptor: token.dataDescriptor,\n value: token.dataValue\n }\n }\n\n try {\n const response = await postRequest(this.getUrlValue(), body)\n const result = await response.json()\n\n if (!response.ok) throw new Error(result.message)\n\n this.successState = true\n this.showSuccess()\n } catch (error) {\n this.successState = false\n this.showError()\n return null\n }\n }\n }\n\n showSuccess() {\n this.formBodyTarget.style.display = \"none\"\n this.headerTarget.innerHTML = \"Your card was added!\"\n this.successMessageTarget.style.display = \"block\"\n }\n\n showError() {\n this.formBodyTarget.style.display = \"none\"\n this.headerTarget.innerHTML = \"There was an issue adding your card\"\n this.errorMessageTarget.style.display = \"block\"\n }\n\n resetForm() {\n this.headerTarget.innerHTML = \"Add a Credit Card\"\n this.formBodyTarget.style.display = \"block\"\n this.errorMessageTarget.style.display = \"none\"\n this.successMessageTarget.style.display = \"none\"\n this.formSubmitButtonTarget.classList.remove(\"disabled\")\n this.formTarget.reset()\n }\n\n handleDialogHide(event: Event) {\n this.resetForm()\n if (this.successState) window.location.reload()\n }\n}\n","import { Controller } from \"stimulus\"\nimport { handleError } from \"../../components/shared/utils/utils\"\nimport Flasher from \"../../utils/flasher\"\n\nexport default class extends Controller {\n static targets = [\"uploader\", \"button\", \"message\"]\n\n docs: any[]\n uploaderTarget: HTMLDivElement\n buttonTarget: HTMLButtonElement\n messageTarget: HTMLParagraphElement\n\n connect() {\n document.addEventListener(\"kin-file-uploader-success\", (event: any) => {\n this.docs = event.detail\n if (this.docs.length > 20) {\n this.buttonTarget.setAttribute(\"disabled\", \"true\")\n this.messageTarget.removeAttribute(\"hidden\")\n } else {\n this.buttonTarget.removeAttribute(\"disabled\")\n }\n })\n document.addEventListener(\"kin-file-uploader-remove\", (event: any) => {\n this.docs = event.detail\n if (this.docs.length > 20 || this.docs.length == 0) {\n this.buttonTarget.setAttribute(\"disabled\", \"true\")\n } else {\n this.buttonTarget.removeAttribute(\"disabled\")\n this.messageTarget.setAttribute(\"hidden\", \"true\")\n }\n })\n }\n\n upload() {\n const formData = new FormData()\n this.docs.forEach(fileDetail => {\n formData.append(\"document[]\", fileDetail.file)\n })\n\n const options = {\n method: \"PATCH\",\n headers: { \"X-Csrf-Token\": this.token },\n body: formData\n }\n fetch(this.uploadUrl, options)\n .then(response => {\n response.json().then(result => {\n this.flashAuthorizationErrorMessage(response, result)\n if (!response.ok) {\n throw new Error(\"non-ok response\")\n }\n // we actually got a 200 response\n window.location.reload()\n })\n })\n .catch(e => {\n handleError(e)\n })\n }\n\n flashAuthorizationErrorMessage(response, result) {\n if (response.status === 401) {\n Flasher.error(result.message)\n }\n }\n\n get token(): string {\n const metaEl = document.querySelector('meta[name=\"csrf-token\"]') as HTMLMetaElement\n return metaEl.content\n }\n get uploadUrl(): string {\n const element = this.uploaderTarget\n return element.getAttribute(\"data-url\")\n }\n}\n","/**\n * Sends a PATCH request to the specified URL using the specified body.\n * @param url - The URL to send the request to.\n * @param body - The body of the request.\n * @returns A promise that resolves to the response to the request.\n */\nexport default function patchRequest(url: string, body: any): Promise {\n return fetch(url, {\n method: \"PATCH\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n \"X-CSRF-Token\": document.querySelector('meta[name=\"csrf-token\"]')?.getAttribute(\"content\") || \"\"\n },\n body: JSON.stringify(body)\n })\n}\n","import { Controller } from \"stimulus\"\nimport patchRequest from \"../../utils/fetch_helpers/patch_request\"\nimport KinDialog from \"@kin/web-components/dist/external/kin-dialog/kin-dialog\"\nimport KinAddressAutocomplete from \"@kin/web-components/dist/external/kin-address-autocomplete/kin-address-autocomplete\"\nimport Flasher from \"../../utils/flasher\"\n\nexport default class extends Controller {\n static targets = [\n \"cardStreetAddress\",\n \"cardCityState\",\n \"cardAddressNotFoundPill\",\n \"showDialogButton\",\n \"dialog\",\n \"form\",\n \"addressAutocomplete\",\n \"invalidAddressError\",\n \"addressNotFoundError\",\n \"submitButton\",\n \"cancelButton\"\n ]\n\n declare cardStreetAddressTarget: HTMLElement\n declare cardCityStateTarget: HTMLElement\n declare cardAddressNotFoundPillTarget: HTMLElement\n declare showDialogButtonTarget: HTMLButtonElement\n declare dialogTarget: KinDialog\n declare formTarget: HTMLFormElement\n declare addressAutocompleteTarget: KinAddressAutocomplete\n declare invalidAddressErrorTarget: HTMLInputElement\n declare addressNotFoundErrorTarget: HTMLInputElement\n declare submitButtonTarget: HTMLButtonElement\n declare cancelButtonTarget: HTMLButtonElement\n\n private autocompleteSuggestionsCount = 0\n private autocompleteSuggestionSelected = false\n private valueSetToAucompleteSuggestion = false\n private addressValueChanged = false\n\n getAddress(): string {\n return this.addressAutocompleteTarget.value\n }\n\n getSubmitUrl(): string {\n return this.data.get(\"submit-url\") as string\n }\n\n async handleSubmit(event: Event) {\n event.preventDefault()\n\n if (this.getAddress() === \"\") return\n\n this.disableDialogClose()\n\n try {\n const response = await patchRequest(this.getSubmitUrl(), { address: this.getAddress() })\n const result = await response.json()\n\n if (!response.ok) throw new Error(result.message)\n\n this.flashSuccess(result.message)\n this.updateAddressCard(result.address)\n this.updateAddressInForm(result.address)\n } catch (error) {\n this.flashError(error)\n }\n\n this.dialogTarget.hide()\n }\n\n handleCancel(event: Event) {\n event.preventDefault()\n this.dialogTarget.hide()\n }\n\n handleDialogShow(_event: Event) {\n // this.addressValueChanged must be reset separately from (after) resetting\n // the value (this.resetAddressValue), otherwise this.handleAddressValueChange\n // would be triggered and would change this.addressValueChanged back to true.\n this.resetAddressValueChanged()\n this.hideErrors()\n }\n\n handleDialogHide(_event: Event) {\n this.enableDialogClose()\n this.formTarget.reset()\n this.resetAddressValue()\n }\n\n handleAddressFocusOut(_event: Event) {\n if (!this.addressValueChanged && this.getAddress() !== \"\") return\n\n if (!this.autocompleteSuggestionSelected) {\n this.disableElement(this.submitButtonTarget)\n this.showInvalidAddressError()\n\n if (this.autocompleteSuggestionsCount === 0 && this.getAddress() !== \"\") {\n this.showAddressNotFoundError()\n }\n }\n }\n\n handleAddressSuggestionsChange(event: CustomEvent) {\n this.autocompleteSuggestionsCount = event.detail\n\n if (this.autocompleteSuggestionsCount > 0) {\n this.hideAddressNotFoundError()\n }\n }\n\n handleAddressSelect(_event: Event) {\n this.autocompleteSuggestionSelected = true\n this.valueSetToAucompleteSuggestion = false\n this.hideErrors()\n this.enableElement(this.submitButtonTarget)\n }\n\n handleAddressValueChange(_event: Event) {\n this.setAddressValueChanged()\n\n if (this.autocompleteSuggestionSelected) {\n if (this.valueSetToAucompleteSuggestion) {\n this.autocompleteSuggestionSelected = false\n } else {\n this.valueSetToAucompleteSuggestion = true\n }\n }\n }\n\n disableDialogClose() {\n this.disableElement(this.submitButtonTarget)\n this.disableElement(this.cancelButtonTarget)\n this.disableDismiss()\n }\n\n enableDialogClose() {\n this.enableElement(this.submitButtonTarget)\n this.enableElement(this.cancelButtonTarget)\n this.enableDismiss()\n }\n\n resetAddressValueChanged() {\n this.addressValueChanged = false\n // The \"no results\" hint is hidden as long as the initial address value\n // has not changed in order to avoid unexpected \"no results\" (and\n // consequently, error messages) in certain cases where the dialog\n // is re-opened and the address has not yet been changed.\n this.addressAutocompleteTarget.hideNoResultsHint = true\n }\n\n setAddressValueChanged() {\n this.addressValueChanged = true\n this.addressAutocompleteTarget.hideNoResultsHint = false\n }\n\n resetAddressValue() {\n this.addressAutocompleteTarget.value = this.addressAutocompleteTarget.getAttribute(\"value\")\n }\n\n hideErrors() {\n this.addressAutocompleteTarget.hasError = false\n this.invalidAddressErrorTarget.classList.add(\"d-none\")\n this.addressNotFoundErrorTarget.classList.add(\"d-none\")\n }\n\n hideAddressNotFoundError() {\n this.addressNotFoundErrorTarget.classList.add(\"d-none\")\n }\n\n disableElement(element) {\n element.setAttribute(\"disabled\", \"\")\n element.classList.add(\"disabled\")\n }\n\n enableElement(element) {\n element.removeAttribute(\"disabled\")\n element.classList.remove(\"disabled\")\n }\n\n disableDismiss() {\n this.dialogTarget.setAttribute(\"nonDismissable\", \"\")\n }\n\n enableDismiss() {\n this.dialogTarget.removeAttribute(\"nonDismissable\")\n }\n\n showInvalidAddressError() {\n this.addressAutocompleteTarget.hasError = true\n this.invalidAddressErrorTarget.classList.remove(\"d-none\")\n }\n\n showAddressNotFoundError() {\n this.addressAutocompleteTarget.hasError = true\n this.addressNotFoundErrorTarget.classList.remove(\"d-none\")\n }\n\n flashSuccess(message: string) {\n Flasher.success(message)\n }\n\n flashError(error) {\n Flasher.error(error.message || \"There was an error updating your mailing address.\")\n }\n\n updateAddressCard(address) {\n this.cardStreetAddressTarget.innerHTML = address.streetAddressWithUnit\n this.cardCityStateTarget.innerHTML = address.fullCityState\n this.cardAddressNotFoundPillTarget.classList.add(\"d-none\")\n }\n\n updateAddressInForm(address) {\n this.addressAutocompleteTarget.setAttribute(\"value\", address.fullAddress || \"\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport createCardToken from \"../../utils/create_card_token\"\nimport postRequest from \"../../utils/fetch_helpers/post_request\"\nimport fetchClientDetails from \"../../utils/fetch_client_details\"\nimport type { FormValidationComponent } from \"../../components/shared/validation/form-validation\"\nimport Flasher from \"../../utils/flasher\"\n\ninterface Token {\n dataDescriptor: string\n dataValue: string\n}\n\nexport default class extends Controller {\n static targets = [\n \"form\",\n \"paymentInfoBody\",\n \"paymentMethodInfoBody\",\n \"paymentMethodInfoCardNumber\",\n \"paymentSelectionBody\",\n \"formContainer\",\n \"formBody\",\n \"footerText\",\n \"savedCardFooterText\",\n \"paymentSelectionSubmit\",\n \"formSubmitButton\",\n \"formCancelButton\",\n \"errorMessage\",\n \"successOrErrorCloseButton\",\n \"paymentMethod\",\n \"header\",\n \"creditCardNumber\",\n \"expiration\",\n \"cvv\",\n \"zip\",\n \"saveCardCheckbox\",\n \"dialog\"\n ]\n\n declare formTarget: HTMLFormElement\n declare paymentInfoBodyTarget: HTMLElement\n declare paymentMethodInfoBodyTarget: HTMLElement\n declare paymentMethodInfoCardNumberTarget: HTMLElement\n declare paymentSelectionBodyTarget: HTMLElement\n declare formContainerTarget: HTMLElement\n declare formBodyTarget: HTMLElement\n declare footerTextTarget: HTMLElement\n declare savedCardFooterTextTarget: HTMLElement\n declare formSubmitButtonTarget: HTMLButtonElement\n declare formCancelButtonTarget: HTMLButtonElement\n declare errorMessageTarget: HTMLElement\n declare successOrErrorCloseButtonTarget: HTMLElement\n declare paymentMethodTarget: HTMLSelectElement\n declare headerTarget: HTMLElement\n declare creditCardNumberTarget: HTMLInputElement\n declare expirationTarget: HTMLInputElement\n declare cvvTarget: HTMLInputElement\n declare zipTarget: HTMLInputElement\n declare saveCardCheckboxTarget: HTMLInputElement\n declare dialogTarget: HTMLElement\n declare formValidation: FormValidationComponent\n\n private successState: boolean = false\n\n connect() {\n this.successState = false\n this.dialogTarget.addEventListener(\"kin-dialog-hide\", this.handleDialogHide.bind(this))\n this.formValidation = this.formTarget.querySelector(\"kin-form-validation\") as FormValidationComponent\n this.handlePaymentTypeSelection()\n }\n\n disconnect() {\n this.dialogTarget.removeEventListener(\"kin-dialog-hide\", this.handleDialogHide.bind(this))\n }\n\n submit(event: Event) {\n event.preventDefault()\n this.disableSubmitAndDialogClose()\n this.handleFormSubmission()\n }\n\n isCardPresent(): boolean {\n return this.data.get(\"card-present\") === \"true\"\n }\n\n getPaymentMethod(): string {\n return this.paymentMethodTarget.value\n }\n\n onChangePaymentMethod(event: Event) {\n this.handlePaymentTypeSelection()\n }\n\n handlePaymentTypeSelection() {\n this.showPrimaryForm()\n if (this.isCardPresent()) {\n this.showElement(this.paymentSelectionBodyTarget)\n if (this.getPaymentMethod() === \"true\") {\n this.showElement(this.savedCardFooterTextTarget)\n this.hideElement(this.footerTextTarget)\n this.hideElement(this.formBodyTarget)\n } else {\n this.showElement(this.footerTextTarget)\n this.hideElement(this.savedCardFooterTextTarget)\n this.showElement(this.formBodyTarget)\n }\n }\n this.formValidation.findFields()\n }\n\n number(): string {\n return this.creditCardNumberTarget.value.replace(/[^\\d]/g, \"\")\n }\n\n expirationMonth(): string {\n const month = this.expirationTarget.value.split(\"/\")[0]\n return month\n }\n\n expirationYear(): string {\n const year = this.expirationTarget.value.split(\"/\")[1]\n return year\n }\n\n cvv(): string {\n return this.cvvTarget.value\n }\n\n zip(): string {\n return this.zipTarget.value\n }\n\n saveCard(): string {\n return this.saveCardCheckboxTarget.checked == true ? \"true\" : \"false\"\n }\n\n getUrlValue(): string {\n return this.data.get(\"save-card-url-value\") as string\n }\n\n getClientDetailsUrl(): string {\n return this.data.get(\"get-client-url\")\n }\n\n async getCardToken(): Promise {\n try {\n const { login_id, generate_public_client_key } = await fetchClientDetails(this.getClientDetailsUrl())\n const token = await createCardToken({\n month: this.expirationMonth(),\n year: this.expirationYear(),\n number: this.number(),\n cvv: this.cvv(),\n name: \"\",\n zip: this.zip(),\n clientID: login_id,\n clientKey: generate_public_client_key\n })\n return token\n } catch (error) {\n this.showError(error)\n return null\n }\n }\n\n async handleFormSubmission() {\n this.successState = false\n\n let body = await this.buildBody()\n\n try {\n const response = await postRequest(this.getUrlValue(), body)\n const result = await response.json()\n\n this.flashAuthorizationErrorMessage(response, result)\n if (!response.ok) throw new Error(result.message)\n\n this.successState = true\n this.showSuccess()\n } catch (error) {\n this.successState = false\n this.showError(error)\n return null\n }\n }\n\n showSuccess() {\n this.hideElement(this.paymentSelectionBodyTarget)\n this.hideElement(this.formContainerTarget)\n if (this.saveCard() === \"true\") {\n this.headerTarget.textContent = \"Your card was saved and your payment was successful!\"\n } else {\n this.headerTarget.textContent = \"Your payment was successful!\"\n }\n this.paymentMethodInfoCardNumberTarget.textContent = this.getCardLast4()\n this.showElement(this.paymentMethodInfoBodyTarget)\n this.showElement(this.successOrErrorCloseButtonTarget)\n this.enableSubmitAndDialogClose()\n }\n\n showError(error) {\n this.hideElement(this.paymentInfoBodyTarget)\n this.hideElement(this.paymentSelectionBodyTarget)\n this.hideElement(this.formContainerTarget)\n this.headerTarget.textContent = \"Your credit card could not be charged.\"\n this.showElement(this.errorMessageTarget)\n this.showElement(this.successOrErrorCloseButtonTarget)\n this.enableSubmitAndDialogClose()\n }\n\n flashAuthorizationErrorMessage(response, result) {\n if (response.status === 401) {\n Flasher.error(result.message)\n }\n }\n\n resetForm() {\n this.headerTarget.textContent = \"Make a Payment\"\n this.saveCardCheckboxTarget.checked = false\n this.showElement(this.formContainerTarget)\n this.showElement(this.paymentInfoBodyTarget)\n this.hideElement(this.paymentMethodInfoBodyTarget)\n this.hideElement(this.errorMessageTarget)\n this.hideElement(this.successOrErrorCloseButtonTarget)\n this.enableSubmitAndDialogClose()\n this.formTarget.reset()\n }\n\n resetFormInput() {\n this.creditCardNumberTarget.value = \"\"\n this.expirationTarget.value = \"\"\n this.cvvTarget.value = \"\"\n this.zipTarget.value = \"\"\n this.saveCardCheckboxTarget.checked = false\n }\n\n handleDialogHide(event: Event) {\n this.resetForm()\n this.handlePaymentTypeSelection()\n if (this.successState) window.location.reload()\n }\n\n hideElement(element: HTMLElement) {\n element.classList.remove(\"d-block\")\n element.classList.add(\"d-none\")\n }\n\n showElement(element: HTMLElement) {\n element.classList.remove(\"d-none\")\n element.classList.add(\"d-block\")\n }\n\n showPrimaryForm() {\n this.resetFormInput()\n this.showElement(this.formBodyTarget)\n this.showElement(this.formContainerTarget)\n this.showElement(this.footerTextTarget)\n }\n\n async buildBody() {\n if (this.isCardPresent() && this.getPaymentMethod() === \"true\") {\n return this.useSavedCardBody()\n } else {\n let token = await this.getCardToken()\n if (token) {\n if (this.saveCard() === \"true\") {\n return this.saveCardBody(token)\n } else {\n return this.oneTimePaymentBody(token)\n }\n }\n }\n }\n\n useSavedCardBody() {\n return {\n credit_card_transaction: {\n transactionId: this.data.get(\"transaction-id\"),\n useSavedCard: \"true\"\n }\n }\n }\n\n saveCardBody(token) {\n return {\n credit_card_transaction: {\n descriptor: token.dataDescriptor,\n value: token.dataValue,\n transactionId: this.data.get(\"transaction-id\"),\n saveCard: this.saveCard()\n }\n }\n }\n\n oneTimePaymentBody(token) {\n return {\n credit_card_transaction: {\n descriptor: token.dataDescriptor,\n value: token.dataValue,\n transactionId: this.data.get(\"transaction-id\")\n }\n }\n }\n\n getCardLast4(): string {\n const cardNumber = this.creditCardNumberTarget.value\n return cardNumber ? `************${cardNumber.slice(-4)}` : this.data.get(\"card-details\")\n }\n\n disableSubmitAndDialogClose() {\n this.formValidation.disableSubmit()\n this.formSubmitButtonTarget.value = \"Processing...\"\n this.formCancelButtonTarget.setAttribute(\"disabled\", \"\")\n this.dialogTarget.setAttribute(\"nonDismissable\", \"\")\n }\n\n enableSubmitAndDialogClose() {\n this.formValidation.enableSubmit()\n this.formSubmitButtonTarget.value = \"Submit Payment\"\n this.formCancelButtonTarget.removeAttribute(\"disabled\")\n this.dialogTarget.removeAttribute(\"nonDismissable\")\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n submitForm() {\n ;(this.element as HTMLFormElement).requestSubmit()\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"toggleDetailButton\", \"detailList\"]\n\n onToggle() {\n if (this.detailListTarget.classList.contains(\"summary--list__active\")) {\n this.detailListTarget.classList.remove(\"summary--list__active\")\n } else {\n this.detailListTarget.classList.add(\"summary--list__active\")\n }\n\n if (this.toggleDetailButtonTarget.classList.contains(\"summary--toggle__active\")) {\n this.toggleDetailButtonTarget.classList.remove(\"summary--toggle__active\")\n this.toggleDetailButtonTarget.setAttribute(\"aria-expanded\", \"false\")\n this.toggleDetailButtonTarget.textContent = \"Show Details\"\n } else {\n this.toggleDetailButtonTarget.classList.add(\"summary--toggle__active\")\n this.toggleDetailButtonTarget.setAttribute(\"aria-expanded\", \"true\")\n this.toggleDetailButtonTarget.textContent = \"Hide Details\"\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"emailInput\", \"form\"]\n\n onSubmit(event) {\n const emailInputValue = this.emailInputTarget.value\n const regex = this.nonProduction ? this.nonProdRegex : this.regex\n\n if (regex.test(emailInputValue)) {\n event.preventDefault()\n window.kin.utils.openModal(\"kin-user-modal\")\n }\n }\n\n onModalConfirm() {\n this.formTarget.submit()\n }\n\n get nonProduction() {\n const domain = window.location.hostname\n return !domain.endsWith(\"kin.com\")\n }\n get regex() {\n return /kin\\.(com|us)$/\n }\n get nonProdRegex() {\n return /^[^+]+@kin\\.(com|us)$/\n }\n}\n","import { Controller } from \"stimulus\"\nimport statusPoller from \"../../network_requests/status_poller\"\n\nconst REFRESH_INTERVAL = 2 * 1000\nexport default class extends Controller {\n initialize() {\n setTimeout(this.startPolling.bind(this), REFRESH_INTERVAL)\n }\n\n startPolling() {\n const path = this.element.getAttribute(\"data-poll-path\"),\n fallback_path = this.element.getAttribute(\"data-fallback-path\")\n\n statusPoller.startPolling(path).then(\n data => {\n if (data.redirect_to) {\n window.location.replace(data.redirect_to)\n }\n },\n error => {\n window.location = fallback_path\n }\n )\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"otpInput\", \"otpForm\", \"spinner\"]\n\n otpInputTarget: HTMLInputElement\n otpFormTarget: HTMLFormElement\n spinnerTarget: HTMLElement\n\n checkOtp() {\n if (this.otpInputTarget.value.length === 6) {\n // disabling the form prevents the user from submitting the form multiple times which would throw an error\n this.otpFormTarget.disabled = true\n\n this.spinnerTarget.classList.remove(\"d-none\")\n\n setTimeout(() => {\n this.otpFormTarget.submit()\n }, 1000)\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport statusPoller from \"../../network_requests/status_poller\"\n\nconst REFRESH_INTERVAL = 3 * 1000\nexport default class extends Controller {\n static targets = [\"loading\", \"premium\", \"delta\"]\n firstLoad = false\n initialize() {\n setTimeout(this.startPolling.bind(this), REFRESH_INTERVAL)\n }\n\n startPolling() {\n let controller = this\n const path = this.element.getAttribute(\"data-poll-path\"),\n fallback_path = this.element.getAttribute(\"data-fallback-path\")\n\n statusPoller.startPolling(path).then(\n data => {\n this.firstLoad = true\n if (data.premium) {\n if (!controller.premiumTarget.dataset.oldValue) {\n controller.premiumTarget.dataset.oldValue = data.premium.replace(/[^0-9]/g, \"\")\n }\n let old = controller.premiumTarget.dataset.oldValue.replace(/[^0-9]/g, \"\")\n let difference = Number(data[\"premium\"].replace(/[^0-9]/g, \"\")) - Number(old)\n let className = Math.sign(difference) === -1 ? \"text--warning\" : \"text--success-600\"\n let sign = Math.sign(difference) === -1 ? \"-\" : \"+\"\n if (difference !== 0) {\n controller.premiumTarget.querySelector('[data-js-value=\"premium-value\"]').classList.add(className)\n controller.premiumTarget.querySelector('[data-js-value=\"premium-value\"]').innerText = `${sign} $${Math.abs(difference)}`\n controller.premiumTarget.classList.remove(\"hidden\")\n controller.loadingTarget.hidden = true\n controller.deltaTarget.classList.add(\"hidden\")\n setTimeout(() => {\n controller.premiumTarget.querySelector('[data-js-value=\"premium-value\"]').classList.remove(className)\n controller.premiumTarget.querySelector('[data-js-value=\"premium-value\"]').innerText = data[\"premium\"]\n }, 2000)\n controller.premiumTarget.dataset.oldValue = data.premium.replace(/[^0-9]/g, \"\")\n } else {\n controller.premiumTarget.querySelector('[data-js-value=\"premium-value\"]').innerText = data[\"premium\"]\n controller.premiumTarget.classList.remove(\"hidden\")\n controller.loadingTarget.hidden = true\n controller.deltaTarget.classList.add(\"hidden\")\n }\n }\n },\n error => {\n window.location = fallback_path\n }\n )\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"scoreList\"]\n\n connect() {\n document.addEventListener(\"kin-policy-application:generated\", event => this.pollForInsuranceScores(event))\n }\n\n pollForInsuranceScores(event) {\n let element = this.scoreListTarget\n let url = element.getAttribute(\"data-url\")\n\n fetch(url)\n .then(response => {\n if (!response.ok) {\n setTimeout(this.pollForInsuranceScores.bind(this, url), 2500)\n }\n\n return response.json()\n })\n .then(data => {\n let insuranceScoreItems = data.map(insured => {\n let label = \"\"\n\n if (data.length > 1) {\n label = insured.is_co_applicant ? \"Co-Applicant: \" : \"Main Applicant: \"\n }\n return `
  • \n

    ${label + insured.name}

    \n

    Lexis Prequal Score: ${insured.prequal_insurance_score || \"--\"}

    \n

    Lexis Full Score: ${insured.full_insurance_score || \"--\"}

    \n
  • `\n })\n\n return (element.innerHTML = insuranceScoreItems.join(\"\"))\n })\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"form\", \"noMortgagee\", \"noInsurance\", \"priorInsurance\", \"mortgageeInput\"]\n\n connect() {\n this.toggleMortgageeRequired()\n\n if (this.hasPriorInsuranceTarget) {\n this.togglePriorInsuranceRequired()\n }\n refreshVisibleFields(this.formTarget)\n }\n\n toggleMortgageeRequired() {\n this.toggleRequired(this.noMortgageeTarget, this.mortgageeInputTarget)\n }\n\n togglePriorInsuranceRequired() {\n this.toggleRequired(this.noInsuranceTarget, this.priorInsuranceTarget)\n }\n\n toggleRequired(checkbox, requiredFields) {\n requiredFields.querySelectorAll(\"input[type='text']\").forEach(input => {\n input.required = !checkbox.checked\n input.disabled = checkbox.checked\n })\n refreshVisibleFields(this.formTarget)\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"srfPath\"]\n connect() {}\n\n select() {\n var srfUrl = this.srfPathTarget.value\n window.location.replace(srfUrl)\n }\n}\n","import { Controller } from \"stimulus\"\nimport createCardToken from \"../../utils/create_card_token\"\nimport { refreshVisibleFields, openModal } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"errors\",\n \"form\",\n \"submit\",\n \"firstName\",\n \"lastName\",\n \"number\",\n \"expiration\",\n \"zip\",\n \"tokenValue\",\n \"tokenDescriptor\",\n \"cardFormContainer\",\n \"creditCardPaymentRadio\",\n \"mortgagePaymentRadio\",\n \"newCardInfo\",\n \"customerCCPaymentRadio\"\n ]\n\n _loading = false\n _submitting = false\n\n connect() {\n this.onStateChange()\n\n this.formTarget.addEventListener(\"submit\", this.onSubmit)\n\n if (this.hasMortgagePaymentRadioTarget) {\n this.mortgagePaymentRadioTarget.addEventListener(\"change\", this.onStateChange)\n }\n\n if (!this.hasCreditCardPaymentRadioTarget) return\n\n this.creditCardPaymentRadioTarget.addEventListener(\"change\", this.onStateChange)\n\n if (this.hasCustomerCCPaymentRadioTarget) {\n this.customerCCPaymentRadioTarget.addEventListener(\"change\", this.onStateChange)\n }\n\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n }\n\n disconnect() {\n this.mortgagePaymentRadioTarget.removeEventListener(\"change\", this.onStateChange)\n this.formTarget.removeEventListener(\"submit\", this.onSubmit)\n this.creditCardPaymentRadioTarget.removeEventListener(\"change\", this.onStateChange)\n this.customerCCPaymentRadioTarget.removeEventListener(\"change\", this.onStateChange)\n }\n\n onSubmit = event => {\n if (this._submitting || this.loading()) {\n event.preventDefault()\n return\n }\n\n this._submitting = true\n this.setLoading(true)\n\n if (this.isCardPayment() && this.hasNewCardInfoTarget) {\n event.preventDefault()\n\n const [month, year] = this.expiration()\n\n createCardToken({\n month: month,\n year: year,\n number: this.number(),\n cvv: null,\n name: this.name(),\n zip: this.zip(),\n clientID: this.data.get(\"client-id\"),\n clientKey: this.data.get(\"client-key\")\n })\n .then(({ dataDescriptor, dataValue }) => {\n this.tokenValueTarget.value = dataValue\n this.tokenDescriptorTarget.value = dataDescriptor\n this.formTarget.submit()\n })\n .catch(messages => {\n this._submitting = false\n this.setLoading(false)\n this.onError(messages)\n })\n }\n }\n\n onStateChange = e => {\n if (this.hasCardFormContainerTarget) {\n this.manipulateCardContainer(e)\n }\n }\n\n manipulateCardContainer() {\n if (this.isCardPayment()) {\n this.cardFormContainerTarget.classList.remove(\"hidden\")\n this.cardFormContainerTarget.querySelectorAll(\"input\").forEach(f => (f.disabled = false))\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n } else {\n this.cardFormContainerTarget.classList.add(\"hidden\")\n this.cardFormContainerTarget.querySelectorAll(\"input\").forEach(f => (f.disabled = true))\n refreshVisibleFields(this.submitTarget.closest(\"form\"))\n }\n }\n\n onError(messages) {\n this.errorsTarget.children.forEach(child => child.remove())\n let error = document.createElement(\"p\")\n error.innerText = messages.text\n this.errorsTarget.append(error)\n }\n\n setLoading(value) {\n this._loading = value\n this.onStateChange()\n }\n\n loading() {\n return this._loading\n }\n\n isCardPayment() {\n return this.hasCreditCardPaymentRadioTarget && this.creditCardPaymentRadioTarget.checked\n }\n\n isCustomerCardPayment() {\n return this.hasCustomerCCPaymentRadioTarget && this.customerCCPaymentRadioTarget.checked\n }\n\n validAttributes() {\n return this.validFirstName() && this.validLastName() && this.validZipCode()\n }\n\n number() {\n return this.numberTarget.value.replace(/[^\\d]/g, \"\")\n }\n\n expiration() {\n return this.expirationTarget.value.split(\"/\").map(str => str.replace(/ /g, \"\"))\n }\n\n firstName() {\n return this.firstNameTarget.value\n }\n\n lastName() {\n return this.lastNameTarget.value\n }\n\n name() {\n return `${this.firstName()} ${this.lastName()}`\n }\n\n zip() {\n return this.zipTarget.value\n }\n\n validFirstName() {\n return this.firstName() != \"\"\n }\n\n validLastName() {\n return this.lastName() != \"\"\n }\n}\n","import { Controller } from \"stimulus\"\nimport Flasher from \"../../utils/flasher\"\nimport * as utils from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\"smsButton\", \"emailButton\"]\n\n connect() {\n document.addEventListener(\"kin-policy-application:generated\", event => this.policyApplicationGenerated(event))\n document.addEventListener(\"ajax:success\", event => this.handleAjaxSuccess(event))\n document.addEventListener(\"ajax:error\", this.handleError())\n }\n\n policyApplicationGenerated(e) {\n this.smsButtonTarget.disabled = false\n this.emailButtonTarget.disabled = false\n document.getElementById(\"twilio_sms_message_body\").value = e.detail.customMessage\n }\n\n handleAjaxSuccess(e) {\n if (e.target.id === \"new_twilio_sms_message\") {\n this.handleSMSResponse(e.detail[0])\n } else if (e.target.id === \"link-email\") {\n this.handleEmailResponse()\n }\n }\n\n handleSMSResponse(response) {\n if (response.message_sent) {\n Flasher.success(\"Success! We’re working on sending your message!\")\n utils.closeModal(\"texting-\" + response.phone_id)\n } else {\n this.handleError()\n }\n }\n\n handleEmailResponse() {\n Flasher.success(\"Success! We're working on sending your email!\")\n utils.closeModal(\"link-email\")\n }\n\n handleError() {\n Flasher.error(\"Message Failed to send. Please try again.\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport { refreshVisibleFields, openModal } from \"../../components/shared/utils/utils\"\n\nexport default class extends Controller {\n static targets = [\n \"form\",\n \"purchaseDateField\",\n \"currentInsuranceStatusInput\",\n \"addCoapplicantInput\",\n \"addCoapplicantsContainer\",\n \"previousCarrierInputs\",\n \"addPreviousInsuranceContainer\",\n \"addCoapplicantRequiredField\",\n \"timesRentedNext12MonthsQuestion\",\n \"timesRentedPast12MonthsQuestion\",\n \"monthsOccupiedNext12MonthsQuestion\",\n \"monthsOccupiedPast12MonthsQuestion\"\n ]\n\n connect() {\n setTimeout(() => {\n this.initializeState()\n }, 50)\n\n refreshVisibleFields(this.formTarget)\n }\n\n initializeState() {\n this.state = {}\n\n this.changeState({\n add_coapplicant: this.addCoapplicantInputTarget.checked,\n current_insurance_status: this.currentInsuranceStatusInputTarget.value,\n event_data: this.addCoapplicantRequiredFieldTarget.value\n })\n }\n\n addCoapplicantInputOnChange = event => {\n this.changeState({\n add_coapplicant: event.target.checked\n })\n }\n\n currentInsuranceStatusOnChange = event => {\n this.changeState({\n current_insurance_status: event.target.value\n })\n }\n\n changeState(newState) {\n this.state = Object.assign(this.state, newState)\n this.stateOnChange()\n }\n\n stateOnChange() {\n if (this.state.add_coapplicant) {\n this.showCoApplicantInputs()\n } else {\n this.hideCoApplicantInputs()\n }\n\n if (this.state.add_coapplicant && !this.state.event_data) {\n this.showAddContactModal()\n }\n\n if (this.state.event_data) {\n this.addCoapplicantInputTarget.disabled = true\n }\n\n var insurance_status = this.state.current_insurance_status\n\n if (insurance_status === \"currently_insured\") {\n this.showPreviousInsuranceInputs()\n } else {\n this.hidePreviousInsuranceInputs()\n }\n\n if (insurance_status === \"new_purchase_new_policy\") {\n this.showNext12MonthsQuestions()\n this.hidePast12MonthsQuestions()\n } else {\n this.showPast12MonthsQuestions()\n this.hideNext12MonthsQuestions()\n }\n\n refreshVisibleFields(this.formTarget)\n }\n\n showPast12MonthsQuestions() {\n this.timesRentedPast12MonthsQuestionTarget.classList.remove(\"hidden\")\n this.monthsOccupiedPast12MonthsQuestionTarget.classList.remove(\"hidden\")\n }\n\n hidePast12MonthsQuestions() {\n this.timesRentedPast12MonthsQuestionTarget.classList.add(\"hidden\")\n this.monthsOccupiedPast12MonthsQuestionTarget.classList.add(\"hidden\")\n }\n\n showNext12MonthsQuestions() {\n this.timesRentedNext12MonthsQuestionTarget.classList.remove(\"hidden\")\n this.monthsOccupiedNext12MonthsQuestionTarget.classList.remove(\"hidden\")\n }\n\n hideNext12MonthsQuestions() {\n this.timesRentedNext12MonthsQuestionTarget.classList.add(\"hidden\")\n this.monthsOccupiedNext12MonthsQuestionTarget.classList.add(\"hidden\")\n }\n\n showAddContactModal() {\n openModal(\"add-co-applicant\")\n }\n\n showCoApplicantInputs() {\n this.addCoapplicantsContainerTarget.classList.remove(\"hidden\")\n this.addCoapplicantRequiredFieldTargets.forEach(f => (f.required = true))\n }\n\n hideCoApplicantInputs() {\n this.addCoapplicantRequiredFieldTargets.forEach(f => (f.required = false))\n this.addCoapplicantsContainerTarget.classList.add(\"hidden\")\n }\n\n showPreviousInsuranceInputs() {\n this.previousCarrierInputsTarget.querySelectorAll(\"input:not(.hidden)\").forEach(f => {\n f.required = f.dataset.requiredInitial === \"true\"\n })\n this.previousCarrierInputsTarget.querySelectorAll(\"input:not(.hidden), select\").forEach(f => (f.disabled = false))\n\n this.previousCarrierInputsTarget.classList.remove(\"hidden\")\n }\n\n hidePreviousInsuranceInputs() {\n this.previousCarrierInputsTarget.querySelectorAll(\"input:not(.hidden)\").forEach(f => (f.required = false))\n this.previousCarrierInputsTarget.querySelectorAll(\"input:not(.hidden), select\").forEach(f => (f.disabled = true))\n\n this.previousCarrierInputsTarget.classList.add(\"hidden\")\n }\n}\n","import { Controller } from \"stimulus\"\nimport statusPoller from \"../../network_requests/status_poller\"\n\nconst REFRESH_INTERVAL = 2 * 1000\n\nexport default class extends Controller {\n initialize() {\n setTimeout(this.startPolling.bind(this), REFRESH_INTERVAL)\n }\n\n startPolling() {\n const path = this.element.getAttribute(\"data-poll-path\"),\n fallback_path = this.element.getAttribute(\"data-fallback-path\")\n\n statusPoller.startPolling(path).then(\n data => {\n window.location.reload()\n },\n error => {\n window.location = fallback_path\n }\n )\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"form\", \"panel\", \"referenceImage\", \"helpText\"]\n\n connect() {\n this.handleSelectForm()\n this.handleAutoCompleteSelectForm()\n }\n\n handleSelectForm() {\n this.formTarget.querySelectorAll(\"input, select\").forEach(el => {\n el.addEventListener(\"change\", e => {\n this.changeSelectedPropertyDetailComponent(e)\n })\n })\n }\n\n handleAutoCompleteSelectForm() {\n document.addEventListener(\"kin-autocomplete:change\", e => {\n this.changeSelectedPropertyDetailComponent(e)\n })\n }\n\n changeSelectedPropertyDetailComponent(e) {\n this.toggleDisableSaveAndNextButton(e)\n this.changeSelectionLabel(e)\n this.changePropertyDetailInformation(this.url(e))\n }\n\n changePropertyDetailInformation(url) {\n fetch(url)\n .then(response => {\n return response.json()\n })\n .then(propertyDetail => {\n if (propertyDetail.text) {\n this.changeHelperText(propertyDetail.text)\n }\n\n this.changeReferenceImage(propertyDetail.image)\n })\n }\n\n changeReferenceImage(image) {\n this.referenceImageTarget.setAttribute(\"src\", image.img)\n }\n\n changeHelperText(text) {\n this.helpTextTarget.innerText = text\n }\n\n changeSelectionLabel(e) {\n let selectionElement = document.getElementById(\"selection\")\n let inputFormOptions = e.currentTarget.options\n let labelText = e.type === \"kin-autocomplete:change\" ? e.detail.name : inputFormOptions[inputFormOptions.selectedIndex].text\n\n selectionElement.innerText = labelText\n }\n\n toggleDisableSaveAndNextButton(e) {\n if (e.currentTarget.value === \"\" || (e.type === \"kin-autocomplete:change\" && e.detail.value === \"\")) {\n document.getElementById(\"save\").disabled = true\n } else {\n document.getElementById(\"save\").disabled = false\n }\n }\n\n url(e) {\n let dataUrl = this.panelTarget.getAttribute(\"data-url\")\n let propertyDetail = this.propertyDetail(e)\n let queryParam = `?attribute=${propertyDetail.attribute}&selection=${propertyDetail.option}`\n return `${dataUrl}${queryParam}`\n }\n\n propertyDetail(e) {\n if (e.type === \"kin-autocomplete:change\") {\n return {\n attribute: e.target.inputId.replace(\"property_\", \"\"),\n option: e.detail.value\n }\n } else {\n return {\n attribute: e.target.id.replace(\"property_\", \"\"),\n option: e.currentTarget.value\n }\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport Rails from \"rails-ujs\"\nimport * as utils from \"../../components/shared/utils/utils\"\nimport { KinModalEvent } from \"../../components/shared/modal/modal-view-component\"\n\nconst CONDO = \"condominium\"\n\nexport default class extends Controller {\n static targets = [\"form\", \"formSubmit\", \"unit\", \"policyType\", \"propertyType\", \"address\", \"confirmNewQuote\", \"confirmEmptyUnit\"]\n\n initialPolicyType = \"\"\n initialPropertyType = \"\"\n initialAddress = \"\"\n initialUnit = \"\"\n initialAction = \"\"\n\n declare formTarget: HTMLFormElement\n declare formSubmitTarget: HTMLElement\n declare unitTarget: HTMLInputElement\n declare policyTypeTarget: HTMLSelectElement\n declare propertyTypeTarget: HTMLSelectElement\n declare addressTarget: HTMLInputElement\n declare confirmNewQuoteTarget: HTMLButtonElement\n declare confirmEmptyUnitTarget: HTMLButtonElement\n\n connect() {\n // store initial values\n this.initialPolicyType = this.policyTypeTarget.value\n this.initialPropertyType = this.propertyTypeTarget.value\n this.initialAddress = this.addressTarget.value\n this.initialUnit = this.unitTarget.value\n this.initialAction = this.formTarget.action\n this.adjustPropertyType()\n this.setupModalToggleListeners()\n }\n\n onSubmit = event => {\n // If user selected condo insurance and left unit blank\n if (this.unitTarget.value === \"\" && this.policyTypeTarget.value === CONDO) {\n event.preventDefault()\n utils.openModal(\"confirm-empty-unit\")\n return\n }\n\n // If user changed either field, show them a modal informing them this will cause new quote creation\n if (this.infoChanged()) {\n event.preventDefault()\n utils.openModal(\"confirm-property-changes\")\n }\n }\n\n // Handles disabling/enabling of form submit button when modals are opened and closed\n setupModalToggleListeners() {\n const confirmPropertyChangesModalId = \"modal__confirm-property-changes\"\n const confirmEmptyUnitModalId = \"modal__confirm-empty-unit\"\n\n document.addEventListener(\"kin-modal:close\", (e: KinModalEvent) => {\n if (![confirmPropertyChangesModalId, confirmEmptyUnitModalId].includes(e.detail?.id)) {\n return\n }\n\n Rails.enableElement(this.formSubmitTarget)\n })\n\n document.addEventListener(\"kin-modal:open\", (e: KinModalEvent) => {\n if (e.detail?.id !== confirmPropertyChangesModalId) {\n return\n }\n\n Rails.disableElement(this.formSubmitTarget)\n })\n }\n\n // On unit modal confirm, if property, policy or address changed\n // show property changes modal, otherwise submit the form\n confirmEmptyUnit() {\n if (this.infoChanged()) {\n utils.closeModal(\"confirm-empty-unit\")\n utils.openModal(\"confirm-property-changes\")\n } else {\n this.confirmEmptyUnitTarget.disabled = true\n this.formTarget.submit()\n }\n }\n\n confirmNewQuote() {\n this.confirmNewQuoteTarget.disabled = true\n this.formTarget.submit()\n }\n\n infoChanged() {\n return (\n this.initialPropertyType != this.propertyTypeTarget.value ||\n this.initialAddress != this.addressTarget.value ||\n this.initialPolicyType != this.policyTypeTarget.value ||\n this.initialUnit != this.unitTarget.value\n )\n }\n\n adjustAutoOptions(option: HTMLOptionElement, method = \"add\") {\n if (method === \"add\") {\n // Send the form to the auto_quotes controller\n this.formTarget.action = \"/kintranet/auto/quotes\"\n\n if (option === null) {\n let _option = document.createElement(\"option\")\n _option.value = \"ppa\"\n _option.text = \"Private Passenger Auto\"\n _option.disabled = false\n this.propertyTypeTarget.appendChild(_option)\n } else {\n option.disabled = false\n }\n } else {\n // Reset the form\n this.formTarget.action = this.initialAction\n\n // Disallow auto being selected\n if (option) {\n option.remove()\n }\n }\n }\n\n adjustPropertyType() {\n let category: string = this.policyTypeTarget.value\n let autoOption: HTMLOptionElement = document.querySelector(\"option[value='ppa']\")\n\n this.propertyTypeTarget.querySelectorAll(\"select option\").forEach((opt: HTMLOptionElement) => {\n opt.disabled = true\n\n if (category == \"\") {\n return\n }\n\n if (opt.dataset.category?.includes(category)) {\n opt.disabled = false\n } else if (opt.dataset.category && !opt.dataset.category.includes(category)) {\n opt.selected = false\n }\n })\n\n if (category === \"auto\") {\n this.adjustAutoOptions(autoOption)\n } else {\n this.adjustAutoOptions(autoOption, \"remove\")\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"hidden\", \"shown\"]\n\n connect() {\n this.shownTarget.classList.add(\"hidden\")\n }\n\n show(e) {\n this.hiddenTarget.classList.add(\"hidden\")\n this.shownTarget.classList.remove(\"hidden\")\n }\n\n hide(e) {\n this.shownTarget.classList.add(\"hidden\")\n this.hiddenTarget.classList.remove(\"hidden\")\n }\n}\n","import Rails from \"rails-ujs\"\n\nexport const trackEvent = (name, { metadata, parameters } = {}) => {\n Rails.ajax({\n type: \"POST\",\n url: \"/quote/events\",\n beforeSend(xhr, options) {\n xhr.setRequestHeader(\"Content-Type\", \"application/json; charset=UTF-8\")\n options.data = JSON.stringify({ name, metadata, parameters })\n return true\n }\n })\n}\n","import Rails from \"rails-ujs\"\n\nconst TWO_SECONDS = 2 * 1000\n\nexport default {\n isWaitingForServer: false,\n\n hasStartedPolling: false,\n\n makeRequest(url, type = \"GET\") {\n if (this.isWaitingForServer) {\n return Promise.reject({\n requestOutstanding: true,\n error: \"Cannot make a new request while waiting for the old one to finish.\"\n })\n }\n this.isWaitingForServer = true\n\n return new Promise((resolve, reject) =>\n Rails.ajax({\n url: url,\n type,\n success: response => {\n resolve(response)\n },\n error: response => {\n reject(response)\n },\n complete: () => {\n this.isWaitingForServer = false\n }\n })\n )\n },\n\n startPolling(url) {\n if (this.hasStartedPolling) {\n return Promise.reject({\n alreadyPolling: true,\n error: \"Polling has already started.\"\n })\n }\n\n this.hasStartedPolling = true\n\n let failedRequests = 0\n let maxFailedRequests = 5\n\n return new Promise((resolve, reject) => {\n this.makeRequest(url).then(data => {\n if (data.finished === true) {\n this.stopPolling()\n resolve(data)\n }\n })\n\n this._intervalId = setInterval(() => {\n this.makeRequest(url).then(\n data => {\n if (data.finished === true) {\n this.stopPolling()\n resolve(data)\n }\n },\n error => {\n if (error && error.requestOutstanding === true) {\n return\n }\n failedRequests += 1\n\n if (failedRequests >= maxFailedRequests) {\n this.stopPolling()\n reject(error)\n }\n }\n )\n }, TWO_SECONDS)\n })\n\n return this\n },\n\n stopPolling() {\n clearInterval(this._intervalId)\n this.hasStartedPolling = false\n return this\n }\n}\n","export class Store {\n state: T\n private subscribers = []\n\n /** Subscribe to changes to the store via callback. This will invoke immediatley with the current store state */\n subscribe(callback: (state: T) => void) {\n this.subscribers = this.subscribers.concat([callback])\n callback(this.state)\n return this\n }\n\n /** Remove the listener of the store. Good for long living pages where memory leaks can occur due to dangling references and unmounted components */\n unsubscribe(callback: (state: T) => void) {\n this.subscribers = this.subscribers.filter(subscriber => subscriber != callback)\n }\n\n /** Set the internal state of the store. This will trigger a notificaiton to all subscribers */\n setState(state: Pick | T | null): T {\n if (state) {\n this.state = { ...this.state, ...state }\n }\n\n this.subscribers.forEach(callback => callback(this.state))\n\n return this.state\n }\n}\n","import { Store } from \"../store\"\nimport { request } from \"../../utils/request\"\nimport debounce from \"lodash.debounce\"\n\ntype Maybe = T | null | undefined\n\ninterface PremiumResponse {\n premium: string\n flood: string\n flood_enabled: boolean\n finished: boolean\n}\n\nexport interface PremiumStoreState {\n policy: Maybe\n flood: Maybe\n floodEnabled: boolean\n waiting: boolean\n}\n\nexport class PremiumStore extends Store {\n state = { policy: null, flood: null, waiting: true, floodEnabled: false }\n\n includeFlood = false\n processing = false\n\n refresh = (includeFlood = false) => {\n if (includeFlood) this.includeFlood = true\n this.execute()\n }\n\n disable = () => this.setState({ waiting: true })\n\n private execute = debounce(async () => {\n if (this.processing) return\n\n this.processing = true\n\n try {\n const response = await request(`/quote/policy_premium.json?flood=${this.includeFlood}`)\n\n if (response.finished) {\n this.setState({\n policy: response.premium,\n flood: response.flood,\n waiting: false,\n floodEnabled: response.flood_enabled\n })\n } else {\n this.setState({ waiting: true })\n setTimeout(this.refresh, 750)\n }\n } catch (err) {\n this.setState({ waiting: false, policy: \"...\", flood: \"...\", floodEnabled: false })\n }\n\n this.processing = false\n }, 0)\n}\n\nexport const store = new PremiumStore()\n","interface CreateCardTokenArguments {\n clientKey: string\n clientID: string\n number: string\n year: string\n month: string\n cvv: string\n zip?: string\n name?: string\n}\n\nexport interface AcceptResponseMessage {\n code: string\n text: string\n}\n\nexport interface AcceptResponseData {\n dataValue: string\n dataDescriptor: string\n}\n\ninterface AcceptResponse {\n opaqueData?: AcceptResponseData\n messages: {\n resultCode: \"Error\" | \"Ok\"\n message?: AcceptResponseMessage[]\n }\n}\n\nlet cardData\nconst createCardToken = ({\n number,\n year,\n month,\n cvv,\n zip,\n name,\n clientID,\n clientKey\n}: CreateCardTokenArguments): Promise =>\n new Promise((resolve, reject) => {\n cardData = {\n year,\n month,\n zip,\n cardNumber: number,\n cardCode: cvv,\n fullName: name\n }\n if (cvv == null) {\n delete cardData[\"cardCode\"]\n }\n const callback = ({ opaqueData, messages: { resultCode, message } }: AcceptResponse) => {\n if (resultCode === \"Error\") {\n const err = new Error(message.map(accept_response => ({ return: accept_response.text })).join(\", \"))\n ;(window as any).newrelic?.noticeError(err)\n reject(message)\n } else {\n resolve(opaqueData)\n }\n }\n ;(window as any).Accept.dispatchData(\n {\n cardData,\n authData: {\n clientKey,\n apiLoginID: clientID\n }\n },\n callback\n )\n })\n\nexport default createCardToken\n","import Flasher from \"./flasher\"\n\n/**\n * Sends a GET request to the specified URL to fetch client details.\n * @param url - The URL to send the request to.\n * @returns A promise that resolves to the fetched data.\n */\nexport default async function fetchClientDetails(url: string): Promise {\n try {\n const response = await fetch(url, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\"\n }\n })\n const result = await response.json()\n\n flashAuthorizationErrorMessage(response, result)\n if (!response.ok) {\n throw new Error(result.message || `HTTP error while fetching client data! status: ${response.status}`)\n }\n\n return result\n } catch (error) {\n throw new Error(error.message)\n }\n}\n\nfunction flashAuthorizationErrorMessage(response, result) {\n if (response.status === 401) {\n Flasher.error(result.message)\n }\n}\n","/**\n * Sends a POST request to the specified URL using the specified body.\n * @param url - The URL to send the request to.\n * @param body - The body of the request.\n * @returns A promise that resolves to the response to the request.\n */\nexport default function postRequest(url: string, body: any): Promise {\n return fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n \"X-CSRF-Token\": document.querySelector('meta[name=\"csrf-token\"]')?.getAttribute(\"content\") || \"\"\n },\n body: JSON.stringify(body)\n })\n}\n","class Flasher {\n constructor(type, message) {\n this.type = type\n this.message = message\n }\n\n static success(message) {\n new Flasher(\"success\", message).render()\n }\n\n static info(message) {\n new Flasher(\"info\", message).render()\n }\n\n static error(message) {\n new Flasher(\"error\", message).render()\n }\n\n render() {\n var flashEvent = new CustomEvent(\"kin:flasherEvent\", {\n detail: {\n message: this.message,\n type: this.type\n }\n })\n\n document.body.dispatchEvent(flashEvent)\n }\n}\n\nexport default Flasher\n","export interface RequestOptions {\n /** HTTP Method */\n method?: RequestInit[\"method\"]\n /** Arbitrary JSON Key/Value/Array set to be encoded and sent with the payload. Appropriate headers are set */\n json?: any\n /** Query string parameters to send with the request */\n params?: { [key: string]: string }\n /** In the scenario of testing, allow for passing in the underlying fetch mechanism */\n fn?: any\n}\n\n/**\n * Generic HTTP request executor. Allows passing either JSON or a set of params.\n * @param path Path to resource\n * @param options\n */\nexport async function request(path: string, options: RequestOptions = {}): Promise {\n const fetcher = (options.fn as typeof fetch) || fetch\n\n const fetchOptions: RequestInit = {\n method: options.method,\n headers: {\n \"X-CSRF-Token\": csrfToken()\n }\n }\n\n if (options.json) {\n fetchOptions.headers[\"Content-Type\"] = \"application/json\"\n fetchOptions.body = JSON.stringify(options.json)\n }\n\n if (options.params) {\n const encode = encodeURIComponent\n const query = Object.keys(options.params)\n .map(key => `${encode(key)}=${encode(options.params[key])}`)\n .join(\"&\")\n path = `${path}?${query}`\n }\n\n const response = await fetcher(path, fetchOptions)\n\n const contentType = response.headers.get(\"content-type\")\n\n if (contentType && contentType.toLowerCase().indexOf(\"application/json\") !== -1) {\n return await response.json()\n } else {\n if (!response.ok) {\n return response as unknown as T\n }\n\n return (await response.text()) as any as T\n }\n}\n\nconst csrfToken = () => {\n const node = document.getElementsByName(\"csrf-token\")[0] as HTMLMetaElement\n return node.content\n}\n"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","e","module","CONTAINER_SELECTOR","AddressCompletion","_this","hashifyAddressComponents","addressComponents","hash","getType","addressComponent","item","i","setValue","selectorKey","value","el","containers","addressComps","city","state","streetName","streetNumber","zip","lat","lon","place","display","zipPlus4","initialize","options","addressCompletion","multiSelects","completion","openModal","closeModal","modal","showDialog","hideDialog","handleSuccess","handleAjax","handleError","selection","toggleDatePicker","autocompleteOnChange","callback","autocomplete","refreshVisibleFields","selector","formValidation","formatMoney","refreshField","isObjEmpty","obj","makeEditable","element","ALLOWABLE_CHARACTERS","mask","f","selectionStart","alpha","field","separatingCharacter","maskIndicies","alphaReplace","numericReplace","m","maskPosition","accountForUTC","date","resetHours","dateString","offset","offsetString","newDate","getDifferenceInDays","date1","date2","difference","getLastMonth","month","year","getNextMonth","calculateLastDayOfMonth","daysInMonth","getFirstDayOfMonth","checkDate","temp","dateParts","part","padMonth","expiration","parseDates","datesRaw","datesParsed","dateRaw","includesDate","haystack","needle","CONSTANTS","VehicleFormCharacteristicsService","dataService","make","VehicleRiskDataService","data","years","vehicle","makes","models","event","select","defaultOption","option","target","name","model","vin","newVehicle","li","template","string","reg","token","street","findOrCreateNode","inputNameFor","parent","findNode","createNode","node","AnimationHelper","funcRef","duration","args","error","formValidationElement","formError","elementId","button","newEntry","message","existingUser","user","controller","subFormType","forms","fieldset","form","visible","anchor","disabled","shouldDisable","errors","emails","bodyCopy","conflictedUser","secondConflictedUser","match","primary","coapplicant","row","category","attribute","newState","rowNumber","categories","attributes","isDisabled","attributesField","filingAttribute","currentRating","ratingInputs","index","ele","filingType","values","valueField","currentFiling","inputNode","newNode","text_value","stateData","newObject","rowData","key","changes","url","res","inputRow","rowToRemove","displayType","response","diff","rating","k_icon","confettiSettings","confetti","confetti_el","button_view_check","len","modal_id","voidable","associatedInput","resolve","reject","err","rule","REQUIRED_RULE_KEYS","n","percentOfCoverageA","coverageA","coverageName","coverageValue","recommendedAmount","alertRule","val","cv","idx","changedInPas","title","small_print","revertButton","coverage","currentValue","coverageId","params","needsAcknowledgement","customerAcknowledged","currentField","coverageReview","needsAckMessage","customerAckMessage","style","status","elementLinkedToModal","ACKNOWLEDGED","REVERTED","UNACKNOWLEDGED","valueToSetTo","diffEl","diffValue","coverages","rows","enforcement_premium_diff","symbol","customMessage","defaultedCoverages","premium","processedFields","triggeringElement","triggeringCoverageName","triggeringCoverageValue","dependentCoverageName","dependentElement","previousDependentValue","inputElement","metadata","base","amount","dollars","coverageInputsString","coverageDependencyName","coverageDependencyValue","coverage_metadata","allowed_values","selectOption","dataRspsAcknowledgeEndpoint","isRspsAcknowledged","hasRsps","hotOrNot","lostField","accountId","checkbox","ids","property_id","progress","filename","RestrictedCoveragesHandler","coverageInputs","isSelected","baseUrl","policyTerm","paymentSchedule","paymentType","currentBilling","transaction","proposedBilling","dateOptions","today","tokens","body","result","_error","login_id","generate_public_client_key","numberOfTokensToGenerate","campaign","phone","config","ref","ref1","link","ms","s","json","originalJson","jsonString","exitReason","exitPath","currentlySelected","selectedText","addressText","addressTarget","preview","address","streetAddress","zipcode","unitNumber","spanElement","paymentTypes","b","sanitizedValue","disable","geometry","depth","polygonCoords","lngMin","lngMax","latMin","latMax","centerLng","centerLat","autocompleteID","mortgageeId","opportunityId","request","word","currentIntentToPurchase","intentToPurchaseList","indexOfIntentToPurchase","updatedIntentToPurchase","destination","resetLink","linkElement","paymentAmount","checkNumber","depositedOn","lockboxReference","proposedActions","authData","cardData","secureData","opaqueData","toggle","entry","completePayment","proofOfSale","proofOfDuplicateCoverage","cancellationRequestDoc","dateSelection","backDateSelection","autocompleteSelect","itemsToSearchFor","selectedReasons","insuredRequestCat","opt","submitMessage","requiredDuplicateFields","standardRequiredFields","asOfUrl","isCreditCard","blankOption","dropdown","successText","errorText","selectedProductName","newParagraph","span","newParagraphText","internalNoteField","characterCountElement","currentLength","noteAction","premium_display","preview_url","share_html","share_text","dynamicContent","action","default_account","visibleRow","visibleCheckbox","checkboxesCount","checkboxesCheckedCount","elementCount","selectedIds","dataRow","dataUrl","href","agent","personId","desiredTab","pathname","matches","route","pushState","activeTab","path","elem","text","locationField","content","selectedOptionIndex","selectedOption","policyType","currentName","submitTarget","flagStatus","keepInput","NON_DIGITS","waiting","percentage","total","dataDescriptor","dataValue","messages","child","createNewEvent","eventName","handleClick","valueTransformer","flip","newValue","set","boundCheckbox","enable","formValue","setStyle","isGated","captureSuccess","captureFail","promises","onlyFulfilled","onlyRejected","settled","p","results","r","statusCode","file","upload","fileName","fileType","blob","moreNeeded","addExitIntentListener","evt","fn","email_input","INTERVAL","validate","valueToTextMap","tableRow","paymentChoice","paymentInput","previousPaymentChoice","newPremium","wrapper","selected_payment","org_premium","new_annual_premium","new_premium","frequency","els","selectedPremium","annual_premium","isDisplayed","condominiumRadio","SanitizeHelper","input","SELECTORS","radioGroupNames","group","selected","radio","toDeselect","img","markup","styleSheetUrls","sheet","userEmail","pageUrl","str","expiringCreditCardNoticeId","policyMonth","policyYear","cardMonth","cardYear","policyDate","cardDate","toArray","arrayLike","checked","section","idElement","isCoapplicantPersisted","idEl","formData","fileDetail","patchRequest","_event","cardNumber","emailInputValue","REFRESH_INTERVAL","fallback_path","old","className","sign","insuranceScoreItems","insured","label","requiredFields","srfUrl","insurance_status","propertyDetail","image","selectionElement","inputFormOptions","labelText","queryParam","CONDO","confirmPropertyChangesModalId","confirmEmptyUnitModalId","method","_option","autoOption","trackEvent","parameters","xhr","TWO_SECONDS","type","failedRequests","maxFailedRequests","Store","subscriber","PremiumStore","includeFlood","store","createCardToken","number","cvv","clientID","clientKey","resultCode","accept_response","fetchClientDetails","flashAuthorizationErrorMessage","postRequest","Flasher","flashEvent","fetcher","fetchOptions","csrfToken","encode","query","contentType"],"sourceRoot":""}