{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../django_apps/core/static/js/absolute_path.js","webpack:///../django_apps/core/static/js/resolvers.js","webpack:///../django_apps/users/js/accounts/controllers/account_settings_controller.js","webpack:///../django_apps/core/static/js/cdnify.js","webpack:///../django_apps/results_v2/js/controllers/report_v2_controller.js","webpack:///../django_apps/counseling/js/gc_tools/controllers/counseling_detail_controller.js","webpack:///../django_apps/counseling/js/schedulizer/services.js","webpack:///../django_apps/kit_orders/js/modals.js","webpack:///../django_apps/core/static/js/e164_regex.js","webpack:///../django_apps/core/static/js/bundles/www.js","webpack:///../django_apps/core/static/js/app.js","webpack:///../django_apps/benefits/js/index.js","webpack:///../django_apps/benefits/js/controllers/benefits_controller.js","webpack:///../django_apps/benefits/js/controllers/benefits_props.js","webpack:///../django_apps/benefits/js/modals/authentication_factors.js","webpack:///../django_apps/benefits/js/modals/email_authentication.js","webpack:///../django_apps/benefits/js/modals/upgrade_prompt.js","webpack:///../django_apps/benefits/js/modals/routing_authorization.js","webpack:///../django_apps/benefits/js/services/received_promo_code.js","webpack:///../django_apps/benefits/js/services/benefits_employee_page_options.js","webpack:///../django_apps/benefits/js/directives/routing_authorization.js","webpack:///../django_apps/home/js/index.js","webpack:///../django_apps/home/js/directives.js","webpack:///../django_apps/home/js/directives/mobile_footer.js","webpack:///../django_apps/home/js/directives/marketing_carousel.js","webpack:///../django_apps/home/js/directives/marketing_questions.js","webpack:///../django_apps/home/js/directives/design_white_body_background.js","webpack:///../django_apps/home/js/controllers.js","webpack:///../django_apps/home/js/controllers/client_stories_controller.js","webpack:///../django_apps/home/js/controllers/home_static_controller.js","webpack:///../django_apps/home/js/controllers/informed_consents_controller.js","webpack:///../django_apps/home/js/controllers/product_h30_controller.js","webpack:///../django_apps/home/js/filters.js","webpack:///../django_apps/home/js/filters/sort_jobs_by_department_first.js","webpack:///../django_apps/home/js/resources.js","webpack:///../django_apps/home/js/animation.js","webpack:///../django_apps/results/static/js/results/index.js","webpack:///../django_apps/results/static/js/results/controllers.js","webpack:///../django_apps/results/static/js/results/controllers/fax_list_controller.js","webpack:///../django_apps/results/static/js/results/controllers/pre-results_controller.js","webpack:///../django_apps/results/static/js/results/controllers/report_review_controller.js","webpack:///../django_apps/results/static/js/results/controllers/report_review_list_controller.js","webpack:///../django_apps/results/static/js/results/controllers/covid_report_list_controller.js","webpack:///../django_apps/results/static/js/results/controllers/report_controller.js","webpack:///../django_apps/results/static/js/results/controllers/report_wrapper_controller.js","webpack:///../django_apps/results/static/js/results/controllers/report_wrapper_v1_controller.js","webpack:///../django_apps/results/static/js/results/controllers/appointment_controller.js","webpack:///../django_apps/results/static/js/results/directive.js","webpack:///../django_apps/results/static/js/results/directives/clinical/called_diplotypes.js","webpack:///../django_apps/results/static/js/results/directives/clinical/diplotype_call_details.js","webpack:///../django_apps/results/static/js/results/directives/clinical/called_variants.js","webpack:///../django_apps/results/static/js/results/directives/clinical/reported_data.js","webpack:///../django_apps/results/static/js/results/directives/clinical/confirmation_info.js","webpack:///../django_apps/results/static/js/results/directives/clinical/family_testing_info.js","webpack:///../django_apps/results/static/js/results/directives/clinical/highlighted_health_history.js","webpack:///../django_apps/results/static/js/results/directives/clinical/known_variants.js","webpack:///../django_apps/results/static/js/results/directives/clinical/qc_metrics.js","webpack:///../django_apps/results/static/js/results/directives/clinical/reported_mutations.js","webpack:///../django_apps/results/static/js/results/directives/clinical/report_info.js","webpack:///../django_apps/results/static/js/results/directives/clinical/report_logs.js","webpack:///../django_apps/results/static/js/results/directives/clinical/report_v2_preview.js","webpack:///../django_apps/results/static/js/results/directives/clinical/report_revision.js","webpack:///../django_apps/results/static/js/results/directives/clinical/report_summary.js","webpack:///../django_apps/results/static/js/results/directives/clinical/report_tags.js","webpack:///../django_apps/results/static/js/results/directives/clinical/report_template.js","webpack:///../django_apps/results/static/js/results/directives/report_question.js","webpack:///../django_apps/results/static/js/results/directives/ltr_legend.js","webpack:///../django_apps/results/static/js/results/directives/ltr_table.js","webpack:///../django_apps/results/static/js/results/directives/ltr_timechart.js","webpack:///../django_apps/results/static/js/results/directives/report_about_cancer_risks.js","webpack:///../django_apps/results/static/js/results/directives/report_about_cancer_survivors.js","webpack:///../django_apps/results/static/js/results/directives/report_about_family.js","webpack:///../django_apps/results/static/js/results/directives/report_about_the_gene.js","webpack:///../django_apps/results/static/js/results/directives/report_additional_findings.js","webpack:///../django_apps/results/static/js/results/directives/report_additional_genes.js","webpack:///../django_apps/results/static/js/results/directives/report_affect_other_gender.js","webpack:///../django_apps/results/static/js/results/directives/report_connect_with_others.js","webpack:///../django_apps/results/static/js/results/directives/report_dropdown.js","webpack:///../django_apps/results/static/js/results/directives/report_family_testing_program.js","webpack:///../django_apps/results/static/js/results/directives/report_gene_details.js","webpack:///../django_apps/results/static/js/results/directives/report_general_questions.js","webpack:///../django_apps/results/static/js/results/directives/report_guidelines.js","webpack:///../django_apps/results/static/js/results/directives/report_lab_sendouts.js","webpack:///../django_apps/results/static/js/results/directives/report_mutation.js","webpack:///../django_apps/results/static/js/results/directives/report_open_order_details_modal.js","webpack:///../django_apps/results/static/js/results/directives/report_other_screening_guidelines.js","webpack:///../django_apps/results/static/js/results/directives/report_provide_health_history.js","webpack:///../django_apps/results/static/js/results/directives/report_provide_health_history_banner.js","webpack:///../django_apps/results/static/js/results/directives/report_revisions.js","webpack:///../django_apps/results/static/js/results/directives/report_risk_factors.js","webpack:///../django_apps/results/static/js/results/directives/report_risk_tooltip.js","webpack:///../django_apps/results/static/js/results/directives/report_share_family.js","webpack:///../django_apps/results/static/js/results/directives/report_share_your_results.js","webpack:///../django_apps/results/static/js/results/directives/report_speak_with_specialist.js","webpack:///../django_apps/results/static/js/results/directives/report_summary_chart.js","webpack:///../django_apps/results/static/js/results/directives/report_summary_extra.js","webpack:///../django_apps/results/static/js/results/directives/report_summary_text.js","webpack:///../django_apps/results/static/js/results/directives/report_summary_title.js","webpack:///../django_apps/results/static/js/results/directives/report_survivor_string_append.js","webpack:///../django_apps/results/static/js/results/directives/report_test_methodology.js","webpack:///../django_apps/results/static/js/results/directives/report_top_navigation.js","webpack:///../django_apps/results/static/js/results/directives/report_validity.js","webpack:///../django_apps/results/static/js/results/directives/report_vus.js","webpack:///../django_apps/results/static/js/results/directives/sample_letter_mailto.js","webpack:///../django_apps/results/static/js/results/directives/wisdom_report_summary_extra.js","webpack:///../django_apps/results/static/js/results/directives/wisdom_report_test_methodology.js","webpack:///../django_apps/results/static/js/results/directives/fh/about_the_gene.js","webpack:///../django_apps/results/static/js/results/directives/fh/connect_with_others.js","webpack:///../django_apps/results/static/js/results/directives/fh/coronary_heart_disease.js","webpack:///../django_apps/results/static/js/results/directives/fh/family_impact.js","webpack:///../django_apps/results/static/js/results/directives/fh/general_questions.js","webpack:///../django_apps/results/static/js/results/directives/fh/guidelines.js","webpack:///../django_apps/results/static/js/results/directives/fh/share_family.js","webpack:///../django_apps/results/static/js/results/directives/fh/summary_chart.js","webpack:///../django_apps/results/static/js/results/directives/fh/summary_text.js","webpack:///../django_apps/results/static/js/results/directives/fh/summary_title.js","webpack:///../django_apps/results/static/js/results/filter.js","webpack:///../django_apps/results/static/js/results/filters/risks_shaper.js","webpack:///../django_apps/results/static/js/results/filters/genes_with_mutation_name.js","webpack:///../django_apps/results/static/js/results/filters/numeric_allelicity.js","webpack:///../django_apps/results/static/js/results/filters/additional_finding_mutations.js","webpack:///../django_apps/results/static/js/results/filters/transcript_name.js","webpack:///../django_apps/results/static/js/results/filters/common_risk_age.js","webpack:///../django_apps/results/static/js/results/filters/insert_display_age.js","webpack:///../django_apps/results/static/js/results/filters/has_age_exceptions_at.js","webpack:///../django_apps/results/static/js/results/filters/custom_phenotypes.js","webpack:///../django_apps/results/static/js/results/filters/fh/guidelines.js","webpack:///../django_apps/results/static/js/results/modal.js","webpack:///../django_apps/core/static/js/clr_a11y.module.js","webpack:///../django_apps/users/js/index.js","webpack:///../django_apps/users/js/auth.js","webpack:///../django_apps/users/js/controllers.js","webpack:///../django_apps/users/js/controllers/resend_email_confirmation_email_controller.js","webpack:///../django_apps/users/js/controllers/routing_authorization_controller.js","webpack:///../django_apps/users/js/directives.js","webpack:///../django_apps/users/js/directives/clr_address.js","webpack:///../django_apps/users/js/directives/is_state_valid.js","webpack:///../django_apps/users/js/directives/state_field.js","webpack:///../django_apps/users/js/directives/clr_country_select.js","webpack:///../django_apps/users/js/directives/clr_us_state_select.js","webpack:///../django_apps/users/js/directives/clr_address_form.js","webpack:///../django_apps/users/js/directives/clr_phone_input.js","webpack:///../django_apps/users/js/directives/clr_birthday_input.js","webpack:///../django_apps/users/js/directives/clr_sex_input.js","webpack:///../django_apps/users/js/directives/clr_gender_input.js","webpack:///../django_apps/users/js/directives/create_account_form_v2.js","webpack:///../django_apps/users/js/filters.js","webpack:///../django_apps/users/js/filters/gender_or_sex_text.js","webpack:///../django_apps/users/js/filters/po_box_present.js","webpack:///../django_apps/users/js/resource.js","webpack:///../django_apps/users/js/services.js","webpack:///../django_apps/users/js/services/create_account.js","webpack:///../django_apps/users/js/services/get_email_provider.js","webpack:///../django_apps/users/js/services/has_completed_routing_authorization.js","webpack:///../django_apps/users/js/insights/insights_flow.js","webpack:///../django_apps/users/js/accounts/index.js","webpack:///../django_apps/users/js/accounts/controllers.js","webpack:///../django_apps/users/js/accounts/controllers/change_email_controller.js","webpack:///../django_apps/users/js/accounts/controllers/change_password_controller.js","webpack:///../django_apps/users/js/accounts/controllers/change_info_controller.js","webpack:///../django_apps/users/js/accounts/controllers/share_data_controller.js","webpack:///../django_apps/users/js/accounts/controllers/store_sample_controller.js","webpack:///../django_apps/users/js/accounts/controllers/email_confirmed_controller.js","webpack:///../django_apps/users/js/accounts/controllers/returned_data_controller.js","webpack:///../django_apps/users/js/accounts/services.js","webpack:///../django_apps/users/js/insights/index.js","webpack:///../django_apps/users/js/insights/controllers.js","webpack:///../django_apps/users/js/insights/insights_introduction_controller.js","webpack:///../django_apps/users/js/insights/insights_account_controller.js","webpack:///../django_apps/counseling/js/index.js","webpack:///../django_apps/counseling/js/resources.js","webpack:///../django_apps/counseling/js/directives.js","webpack:///../django_apps/counseling/js/filters.js","webpack:///../django_apps/counseling/js/gc_tools/index.js","webpack:///../django_apps/counseling/js/gc_tools/modal.js","webpack:///../django_apps/counseling/js/gc_tools/modals/add_event_modal.js","webpack:///../django_apps/counseling/js/gc_tools/modals/publish_counseling_note_modal.js","webpack:///../django_apps/counseling/js/gc_tools/modals/set_release_preferences_modal.js","webpack:///../django_apps/counseling/js/gc_tools/modals/release_results_modal.js","webpack:///../django_apps/counseling/js/gc_tools/modals/add_release_group_hold_modal.js","webpack:///../django_apps/counseling/js/gc_tools/modals/withdraw_release_group_modal.js","webpack:///../django_apps/counseling/js/gc_tools/modals/remove_release_group_hold_modal.js","webpack:///../django_apps/counseling/js/gc_tools/modals/release_group_results_modal.js","webpack:///../django_apps/counseling/js/gc_tools/filters.js","webpack:///../django_apps/counseling/js/gc_tools/controllers/counseling_results_controller.js","webpack:///../django_apps/counseling/js/gc_tools/controllers/citation_list_controller.js","webpack:///../django_apps/counseling/js/schedulizer/index.js","webpack:///../django_apps/counseling/js/schedulizer/controllers/schedulizer_iframe_controller.js","webpack:///../django_apps/kit_orders/js/index.js","webpack:///../django_apps/kit_orders/js/controllers.js","webpack:///../django_apps/kit_orders/js/modals/not_yet_available.js","webpack:///../django_apps/kit_orders/js/modals/no_p_o_boxes.js","webpack:///../django_apps/kit_orders/js/modals/promo_code_mismatch.js","webpack:///../django_apps/kit_orders/js/modals/signin.js","webpack:///../django_apps/kit_orders/js/modals/physician_order_cancellation.js","webpack:///../django_apps/kit_orders/js/modals/not_acwellness_member_modal.js","webpack:///../django_apps/kit_orders/js/controllers/kit_redirect_controller.js","webpack:///../django_apps/kit_orders/js/controllers/research_redirect_controller.js","webpack:///../django_apps/kit_orders/js/controllers/ordering_physician_controller.js","webpack:///../django_apps/kit_orders/js/controllers/kit_order_confirmation_controller.js","webpack:///../django_apps/kit_orders/js/controllers/onsite_benefit_controller.js","webpack:///../django_apps/kit_orders/js/controllers/sample_reuse_consent_controller.js","webpack:///../django_apps/kit_orders/js/controllers/sample_reuse_pay_controller.js","webpack:///../django_apps/kit_orders/js/controllers/share_controller.js","webpack:///../django_apps/kit_orders/js/controllers/sample_reuse_confirmation_controller.js","webpack:///../django_apps/kit_orders/js/directives.js","webpack:///../django_apps/kit_orders/js/directives/clr_credit_card_form.js","webpack:///../django_apps/kit_orders/js/directives/clr_kit_order_preview.js","webpack:///../django_apps/kit_orders/js/directives/clr_healthcare_provider_input.js","webpack:///../django_apps/kit_orders/js/directives/clr_healthcare_provider_share_results_input.js","webpack:///../django_apps/kit_orders/js/directives/clr_healthcare_provider.js","webpack:///../django_apps/kit_orders/js/directives/clr_healthcare_provider_share_results.js","webpack:///../django_apps/kit_orders/js/directives/clr_promocode_form.js","webpack:///../django_apps/kit_orders/js/directives/clr_promo_code_input.js","webpack:///../django_apps/kit_orders/js/directives/clr_ordering_physician_form.js","webpack:///../django_apps/kit_orders/js/directives/clr_checkout_breadcrumb.js","webpack:///../django_apps/kit_orders/js/directives/clr_referral_card.js","webpack:///../django_apps/kit_orders/js/directives/clr_campaign_token_form.js","webpack:///../django_apps/kit_orders/js/directives/clr_sample_reuse_breadcrumb.js","webpack:///../django_apps/kit_orders/js/directives/stripe_checkout_button.js","webpack:///../django_apps/kit_orders/js/resources.js","webpack:///../django_apps/kit_orders/js/services.js","webpack:///../django_apps/kit_orders/js/services/promo_code_store.js","webpack:///../django_apps/kit_orders/js/services/claim_store.js","webpack:///../django_apps/kit_orders/js/services/kit_price_service.js","webpack:///../django_apps/kit_orders/js/services/checkout.js","webpack:///../django_apps/kit_orders/js/services/kit_checkout.js","webpack:///../django_apps/kit_orders/js/services/js_lazy_loader.js","webpack:///../django_apps/kit_orders/js/services/can_add_dependents.js","webpack:///../django_apps/kit_orders/js/services/requisition_store.js","webpack:///../django_apps/kit_orders/js/services/associated_sample.js","webpack:///../django_apps/kit_orders/js/services/accession_number.js","webpack:///../django_apps/kit_orders/js/services/kit_barcode.js","webpack:///../django_apps/kit_orders/js/services/split_name.js","webpack:///../django_apps/kit_orders/js/services/healthcare_provider_store.js","webpack:///../django_apps/kit_orders/js/services/handle_payment_error.js","webpack:///../django_apps/kit_orders/js/services/kit_checkout_flow.js","webpack:///../django_apps/kit_orders/js/services/sample_reuse_flow.js","webpack:///../django_apps/kit_orders/js/services/dependents_claim_manager.js","webpack:///../django_apps/kit_orders/js/services/sample_reuse_service.js","webpack:///../django_apps/kit_orders/js/services/physician_order.js","webpack:///../django_apps/kit_orders/js/services/handle_intl_shipping.js","webpack:///../django_apps/kit_registrations/js/index.js","webpack:///../django_apps/kit_registrations/js/directives.js","webpack:///../django_apps/kit_registrations/js/modals.js","webpack:///../django_apps/kit_registrations/js/modals/activated_modal.js","webpack:///../django_apps/kit_registrations/js/modals/multiple_orders_modal.js","webpack:///../django_apps/kit_registrations/js/modals/wisdom_activate_modal.js","webpack:///../django_apps/kit_registrations/js/modals/incorrect_patient_info_modal.js","webpack:///../django_apps/kit_registrations/js/modals/new_york_modal.js","webpack:///../django_apps/kit_registrations/js/controllers.js","webpack:///../django_apps/kit_registrations/js/controllers/activation_complete_controller.js","webpack:///../django_apps/ordering_physicians/js/index.js","webpack:///../django_apps/ordering_physicians/js/controllers.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_sign_in_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_home_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_place_order_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_review_order_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_submit_payment_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_order_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_account_creation_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_existing_account_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/order_preferences_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_drafts_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_family_testing_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_family_testing_order_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_family_testing_reviewing_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_shared_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_shared_order_controller.js","webpack:///../django_apps/ordering_physicians/js/directives.js","webpack:///../django_apps/ordering_physicians/js/directives/clr_patient_profile.js","webpack:///../django_apps/ordering_physicians/js/directives/clr_provider_input.js","webpack:///../django_apps/ordering_physicians/js/directives/clr_provider_institution.js","webpack:///../django_apps/ordering_physicians/js/directives/clr_provider_profile.js","webpack:///../django_apps/ordering_physicians/js/directives/cpp_banner.js","webpack:///../django_apps/ordering_physicians/js/directives/insurance_checklist_affix.js","webpack:///../django_apps/ordering_physicians/js/directives/order_testing_button.js","webpack:///../django_apps/ordering_physicians/js/directives/physician_order_search_input.js","webpack:///../django_apps/ordering_physicians/js/directives/provider_create_account_form.js","webpack:///../django_apps/ordering_physicians/js/directives/provider_hiw.js","webpack:///../django_apps/ordering_physicians/js/directives/provider_order_tabs.js","webpack:///../django_apps/ordering_physicians/js/directives/provider_shared_order_tabs.js","webpack:///../django_apps/ordering_physicians/js/directives/provider_paginator.js","webpack:///../django_apps/ordering_physicians/js/directives/provider_sidebar.js","webpack:///../django_apps/ordering_physicians/js/directives/provider_uploader.js","webpack:///../django_apps/ordering_physicians/js/directives/submit_payment_form.js","webpack:///../django_apps/ordering_physicians/js/directives/shared_order_details.js","webpack:///../django_apps/ordering_physicians/js/directives/shared_order_results.js","webpack:///../django_apps/ordering_physicians/js/directives/select_enrollment_type.js","webpack:///../django_apps/ordering_physicians/js/services.js","webpack:///../django_apps/ordering_physicians/js/services/patient_is_minor.js","webpack:///../django_apps/ordering_physicians/js/services/show_medication_promo.js","webpack:///../django_apps/ordering_physicians/js/services/is_covid_sample.js","webpack:///../django_apps/ordering_physicians/js/modal.js","webpack:///../django_apps/ordering_physicians/js/modals/add_patient_payment_info.js","webpack:///../django_apps/ordering_physicians/js/modals/reattempt_insurance.js","webpack:///../django_apps/ordering_physicians/js/modals/override_oop_block.js","webpack:///../django_apps/ordering_physicians/js/order_directives.js","webpack:///../django_apps/ordering_physicians/js/order_directives/edit_test_requested.js","webpack:///../django_apps/ordering_physicians/js/order_directives/physician_order_details.js","webpack:///../django_apps/ordering_physicians/js/order_directives/physician_order_insurance_attempt_details.js","webpack:///../django_apps/ordering_physicians/js/order_directives/physician_order_log.js","webpack:///../django_apps/ordering_physicians/js/order_directives/physician_order_main_details.js","webpack:///../django_apps/ordering_physicians/js/order_directives/physician_order_payment_details.js","webpack:///../django_apps/ordering_physicians/js/order_directives/physician_order_results.js","webpack:///../django_apps/ordering_physicians/js/order_directives/refulfill_sample.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/additional_information_form.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/criteria_submission_card.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/eligibility_submission_card.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/hboc_insurance_criteria_form.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/health_history_diagnosis_form.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/health_history_genetic_test_result_form.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/icd_10_cm_code_selector.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/ordering_physician_selector.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/physician_order_breadcrumbs.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/place_credit_card.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/place_insurance_details.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/place_physician_order_kit.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/place_primary_contact.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/place_sample.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/place_testing_options.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/check_minor.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/place_test_type.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/save_draft.js","webpack:///../django_apps/ordering_physicians/js/place_order_directives/search_provider.js","webpack:///../django_apps/ordering_physicians/js/resource.js","webpack:///../django_apps/ordering_physicians/js/tutorials.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_forms_controller.js","webpack:///../django_apps/ordering_physicians/js/controllers/provider_platform_resubmit_payment_controller.js","webpack:///../django_apps/results_v2/js/index.js","webpack:///../django_apps/results_v2/js/modals.js","webpack:///../django_apps/results_v2/js/modals/ShareProviderModal.js","webpack:///../django_apps/results_v2/js/modals/ScheduleAppointmentModal.js","webpack:///../django_apps/results_v2/js/directives.js","webpack:///../django_apps/results_v2/js/directives/iframe_onload.js","webpack:///../django_apps/results_v2/js/directives/report_navbar.js","webpack:///../django_apps/results_v2/js/services.js","webpack:///../django_apps/results_v2/js/controllers/results_v2_report_picker_controller.js","webpack:///../django_apps/files/js/index.js","webpack:///../django_apps/files/js/filters.js","webpack:///../django_apps/files/js/services.js","webpack:///../django_apps/core/static/js/constants.js","webpack:///../django_apps/core/static/js/geo_constants.js","webpack:///../django_apps/core/static/js/controllers.js","webpack:///../django_apps/core/static/js/directives.js","webpack:///../django_apps/core/static/js/directives/clr_accordion_list_item.js","webpack:///../django_apps/core/static/js/directives/clr_breadcrumbs.js","webpack:///../django_apps/core/static/js/directives/clr_breadcrumb.js","webpack:///../django_apps/core/static/js/directives/clr_checkbox.js","webpack:///../django_apps/core/static/js/directives/clr_date_input.js","webpack:///../django_apps/core/static/js/directives/clr_email_spelling.js","webpack:///../django_apps/core/static/js/directives/clr_form.js","webpack:///../django_apps/core/static/js/directives/clr_form_error.js","webpack:///../django_apps/core/static/js/directives/clr_hoz_chart.js","webpack:///../django_apps/core/static/js/directives/clr_hoz_chart_legend_item.js","webpack:///../django_apps/core/static/js/directives/clr_hoz_chart_row.js","webpack:///../django_apps/core/static/js/directives/clr_marked.js","webpack:///../django_apps/core/static/js/directives/clr_pdf_viewer.js","webpack:///../django_apps/core/static/js/directives/clr_radio_row.js","webpack:///../django_apps/core/static/js/directives/clr_select_or_text.js","webpack:///../django_apps/core/static/js/directives/clr_set_focus.js","webpack:///../django_apps/core/static/js/directives/clr_spinner_text.js","webpack:///../django_apps/core/static/js/directives/clr_tab.js","webpack:///../django_apps/core/static/js/directives/clr_tab_custom.js","webpack:///../django_apps/core/static/js/directives/clr_tab_select.js","webpack:///../django_apps/core/static/js/directives/clr_tab_set.js","webpack:///../django_apps/core/static/js/directives/clr_tab_simple.js","webpack:///../django_apps/core/static/js/directives/clr_tab_simple_waypoint.js","webpack:///../django_apps/core/static/js/directives/clr_tab_underline.js","webpack:///../django_apps/core/static/js/directives/clr_toggle_on_input.js","webpack:///../django_apps/core/static/js/directives/clr_uploader.js","webpack:///../django_apps/core/static/js/directives/clr_video_block_player.js","webpack:///../django_apps/core/static/js/directives/clr_video_thumbnail.js","webpack:///../django_apps/core/static/js/directives/html_compile.js","webpack:///../django_apps/core/static/js/directives/confirmation_for.js","webpack:///../django_apps/core/static/js/directives/go_to.js","webpack:///../django_apps/core/static/js/directives/init_focus.js","webpack:///../django_apps/core/static/js/directives/kit_price_text.js","webpack:///../django_apps/core/static/js/directives/pop_toast.js","webpack:///../django_apps/core/static/js/directives/promo_banner.js","webpack:///../django_apps/core/static/js/directives/impersonation_banner.js","webpack:///../django_apps/core/static/js/directives/select_on_click.js","webpack:///../django_apps/core/static/js/directives/show_error_on_blur.js","webpack:///../django_apps/core/static/js/directives/stop_enter_submit.js","webpack:///../django_apps/core/static/js/directives/stop_propagation_on.js","webpack:///../django_apps/core/static/js/directives/tab_bar.js","webpack:///../django_apps/core/static/js/directives/tooltip.js","webpack:///../django_apps/core/static/js/directives/ui_select_required.js","webpack:///../django_apps/core/static/js/directives/unique.js","webpack:///../django_apps/core/static/js/directives/waffle_if_not_switch.js","webpack:///../django_apps/core/static/js/directives/waffle_if_switch.js","webpack:///../django_apps/core/static/js/directives/waffle_if_flag.js","webpack:///../django_apps/core/static/js/directives/popup_window.js","webpack:///../django_apps/core/static/js/directives/track.js","webpack:///../django_apps/core/static/js/directives/sticky_table_headers.js","webpack:///../django_apps/core/static/js/directives/reference.js","webpack:///../django_apps/core/static/js/directives/reference_sup.js","webpack:///../django_apps/core/static/js/directives/references.js","webpack:///../django_apps/core/static/js/directives/full_reference.js","webpack:///../django_apps/core/static/js/directives/input_field.js","webpack:///../django_apps/core/static/js/directives/html_injection_protection.js","webpack:///../django_apps/core/static/js/directives/progress_bar.js","webpack:///../django_apps/core/static/js/directives/uploaded_image.js","webpack:///../django_apps/core/static/js/event.js","webpack:///../django_apps/core/static/js/filter.js","webpack:///../django_apps/core/static/js/format_phone.js","webpack:///../django_apps/core/static/js/geo_constants_definitions.js","webpack:///../django_apps/core/static/js/location.js","webpack:///../django_apps/core/static/js/modal.js","webpack:///../django_apps/core/static/js/navigation.js","webpack:///../django_apps/core/static/js/phone_numbers.js","webpack:///../django_apps/core/static/js/providers.js","webpack:///../django_apps/core/static/js/raven.js","webpack:///../django_apps/core/static/js/resource.js","webpack:///../django_apps/core/static/js/request.js","webpack:///../django_apps/core/static/js/static_files.js","webpack:///../django_apps/core/static/js/stripe.js","webpack:///../django_apps/core/static/js/video.js","webpack:///../django_apps/core/static/js/waffle.js","webpack:///../django_apps/family_testing/static/js/family_testing/controllers.js","webpack:///../django_apps/family_testing/static/js/family_testing/directives.js","webpack:///../django_apps/family_testing/static/js/family_testing/filters.js","webpack:///../django_apps/family_testing/static/js/family_testing/services.js","webpack:///../django_apps/health_profiles/static/js/health_profiles/controllers.js","webpack:///../django_apps/health_profiles/static/js/health_profiles/directives.js","webpack:///../django_apps/health_profiles/static/js/health_profiles/filter.js","webpack:///../django_apps/health_profiles/static/js/health_profiles/resource.js","webpack:///../django_apps/physicians/static/js/physicians/resource.js","webpack:///../django_apps/results/static/js/results/report_modal.js","webpack:///../django_apps/results/static/js/results/resource.js","webpack:///../django_apps/results/static/js/results/service.js","webpack:///../django_apps/results/static/js/results/services/report_generic_screening_guidelines.js","webpack:///../django_apps/results/static/js/results/services/report_share_family_data.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","hostIsHomeApp","path","hostname","window","location","in_prod","indexOf","in_sync_staging","in_feature_staging","in_staging","is_eks_specific_path","reactRedirect","$location","$window","auth","reactPath","search","replace","healthHistory","HealthHistory","$promise","catch","res","status","results","$route","LatestReport","testType","current","params","resolvedPromise","kitStatus","KitStatus","userStatus","$http","then","data","familyTestingEligibility","ignoreAuthModule","response","applyAttributionRedirect","attribution","redirectPath","$cookies","put","startsWith","href","$scope","waffle","currentUser","is_provider","provider","provider_profile","retrieveOrganizationName","organization_name","imagePath","$translate","$sce","$document","$raven","marked","handleReportClick","reportRevisionsModal","orderingProviderNotesModal","newRevisions","report","revisions","filter","rv","opened_at","length","translations","open","iframe","angular","element","getIframeElementOffset","selector","contentDocument","querySelector","offsetTop","_$scope$report","reportID","id","kit_order","test_type","kitOrderNumber","order_number","is_hh_provided","is_hh_under_review","reportShareFamilyData","concat","_res$data","components","_res$data$report_info","report_info","sample","_res$data$report_info2","physician_order","show_ordering_provider_notes","relevant_history","additional_recipients","order_placed_by","ordering_physician","primary_contact","reportContent","msgMarkdownSampleLetter","share_family_letter","content","map","iframeNavSelector","navTop","handleSmoothScrollToTabRequest","event","reportFrame","$","anchorElement","contents","offset","scrollY","scrollToElementAnimated","selectedTabIndex","onNavigate","tabIndex","$applyAsync","scope","iframeRegisterNav","elementName","navLst","$apply","tabs","scrollPos","reportURL","trustAsResourceUrl","reportFrameOnload","iFrameResize","checkOrigin","heightCalculationMethod","resizedCallback","contentWindow","addEventListener","e","onerror","captureException","$filter","OrderLog","ngToast","releaseResultsModal","removeReleaseGroupHoldModal","releaseGroupResultsModal","setReleasePreferencesModal","addEventModal","clinicalDomains","FTP_INELIGIBLE_TEST_TYPES","newNote","buttons","health_guides","releaseGroup","release_group","refreshNotes","notes","getTraits","patient_id","cache","keys","traits","getAncestry","ancestry","getPolygenicScores","polygenic_scores","refreshLog","info","kit_order__order_number","ordering","logs","releaseGroupId","release_group_id","activeReleaseGroupHolds","active_holds","user","first_name","last_name","physician_order_id","releasePreferences","subtitles","gender","gender_identity","self_described_gender_identity","age","birthday","join","preferred_language","phone_number","email","includes","push","is_ftp","city","state","country","collection_state","collection_country","shipping_address","address","addressStrings","line1","line2","postal_code","addressStr","parseHeaderSubtitles","text","action","releaseResults","hold","hold_type","openRemoveHoldModal","openReleaseGroupResultsModal","handleAddButtons","health_profile","healthHistoryUrl","clinicalDomain","$on","result","geneticCounselingHold","reload","setReleasePreferences","addEvent","addNewNote","addingNote","post","finally","showBenignVariants","viewClassification","classification","isEmpty","equals","factory","upcomingAppointment","orderNumber","appointment","appointmentTypes","PgxTutorial","appointmentType","pgxOptions","title","appointmentName","specialistName","specialistNameLong","whatHappensDescription","howItWorksCta","showTutorial","pgx","howItWorksLink","require","E164Regex","cdnify","resolvers","app","config","colorRouteProvider","$httpProvider","$locationProvider","hashPrefix","html5Mode","enabled","setMetaTagDefaults","description","image","when","templateUrl","seo","requireLogin","requireEmailConfirmation","navigation","showLeft","showRight","layout","redirectTo","controller","blue","loginPath","subnavActive","resolve","subnavCompact","otherwise","defaults","headers","common","xsrfHeaderName","xsrfCookieName","val","$translateProvider","$translatePartialLoaderProvider","useLoader","urlTemplate","part","lang","document","getElementById","addPart","use","useSanitizeValueStrategy","useMissingTranslationHandler","uiMaskConfigProvider","device","clearOnBlur","clearOnBlurPlaceholder","isAndroid","eventsToHandle","run","$rootScope","$anchorScroll","KitCheckoutFlow","sampleReuseFlow","PhysicianOrderFormFlow","ProviderAccountFlow","FamilyTestingFlow","routeHistory","ProviderFamilyTestingFlow","a11y","referrer","split","isAds","yOffset","refresh","next","$$route","route","originalPath","reset","labelImages","authRouteFilter","associatedSample","ngToastProvider","configure","animation","maxNumber","timeout","$compileProvider","aHrefSanitizationWhitelist","preAssignBindingsEnabled","controllers","modals","services","service","directives","directive","props","$routeParams","requestErrorToast","benefitsEmployeePageOptions","AuthenticationFactorsModal","EmailAuthenticationModal","sku","testTypes","values","identifiers","getIdentifier","submitIdentifier","submitting","identifier","options","authFactors","concatAuthFactors","nonCovidSkus","covid19","skus","skipErrorToast","discountType","discount_type","identifierNotFound","auth_factors","claimBenefitsErrorHandler","paths","company","pathToCompanyMap","showMedications","assign","propsOverlay","metatags","routeTitle","routeDescription","url","hero","buttonText","sectionValuePropositions","subtitle","items","heading","paragraph","sectionHealthAreas","showHereditary","showCardio","sectionDiscovery","sectionFamily","reverse","backgroundImage","sectionClientVideos","quotes","kicker","author","video","cta","sectionHowItWorks","sectionPurchase","body","ctaHref","AuthenticationFactorsController","$modalInstance","claimStore","authFactorsNeeded","receivedPromoCode","submitAuthFactors","request","factors","code","token","receivedClaimToken","authFactorsInvalid","clearClaim","getClaim","claim","skuDiscounts","sku_discounts","hash","close","$modal","size","EmailAuthenticationController","submitCode","resendEmail","resentEmail","PurchaseForWhoController","pricingModifier","sampleReuseService","nonUpgradePrice","priceDollars","remaining_redemptions_count","discount","getNonUpgradeSkuDiscount","copay_cents","organizationName","isPricingModifier","upgradePrice","price_cents","noClaim","continue","upgrade","recipient","eligibleForReuse","purchase_for_myself","purchase_for_someone_else","dismiss","PossibleUpgradeController","isUndefined","remainingRedemptions","encodeURIComponent","choice","_this","this","openPurchaseForWhoModal","openPossibleUpgradeModal","checkAndOpen","isLoggedIn","modifier","pricing_modifiers","upgrades_available","RoutingConsentModalController","setMembershipAndGoToNext","employer","translateValues","submitConsent","isConsenting","consented","type","createSuccessfulConsentToast","err","className","authorize","notAuthorize","promoCodeStore","DependentsClaimManager","promoCode","clear","updateCode","promotionalCode","can_redeem","canAddFamilyMember","persistCode","skuList","sku_list","companyName","titles","defaultOptions","heroTitle","heroDescription","heroDescription2","isAcceptingEnrollments","inputPlaceholders","img","showValuePropositions","showHealthAreas","showDiscovery","showFamily","showClientVideos","showHowItWorks","showPurchase","extend","aetna","cadence","epicgames","organization","hbc","homedepot","levistrauss","sap","sapcanada","cdw","salesforce","mubadala","uhc","jefferson","alaskarailroad","sequoiaconsultinggroup","ejgallo","shamrockfoods","biltmore","biltmorefarms","accel","qualtrics","chicos","ncbiotech","daikin","arkema","teamsters","apple","projectbaseline","local9fund","acandrefrigerationfund","ocra","getOptions","$timeout","RoutingAuthorizationModal","organizationRelationship","restrict","goToNext","link","showSection","routingConsent","defaultRouting","relationship","scrollTo","animate","scrollTop","top","selectEmployee","EMPLOYEE","selectNone","NON_HEALTH_INSURANCE_BENEFICIARY","selectNonEmployee","HEALTH_INSURANCE_BENEFICIARY","sync","hasCompletedHealthHistory","has_health_history_completed","selectNo","selectYes","getAbsolutePath","$watch","mobileFooter","selectedClass","addClass","removeClass","geneCount","kitPriceService","submitted","subscribe","purpose","submit","core10Sku","testTypeNames","test_types","hereditary7","fh3","brca12","hereditary30","breastOvarian19","cardio30","pgxv1","jobs","department","preferredDepartmentJobs","otherJobs","forEach","job","sort","a","b","resource","format","method","isArray","enter","el","doneFn","slideDown","leave","slideUp","active","routeParams","testTypeIsPgx","resultIsCmsBased","cms_based","toLowerCase","resourcePaginator","FaxLog","retryFaxModal","states","stateTitles","searchPromise","initializeFaxLogs","queryParams","sampleId","kit_barcode","showCompleted","showResolved","retry","faxLog","faxLogs","newValue","oldValue","cancel","getNextPage","undefined","$translatePartialLoader","kitStatuses","schedulizerTextOptions","confirmPgxModal","promo_code","kitStatusFromParams","matchingKits","kit","videoScriptUrl","health_conditions","healthCondition","showTestType","titleError","showReorder","showActivate","showShipping","showTestTypeNav","order_status","showShippingIsIncorrect","showBarcode","showTracking","showBanner","showGetReady","showWhatToDoNext","showWhatToDoNextActivate","showWhatHappensNext","showAboutGeneticTesting","showPurchaseNumber","goToReport","goToPreResultsView","confirmPgx","timeline","msgStatusTitle","msgStatusDetails","msgQ1","msgQ2","msgQ3","cardLast4","msgBanner","shipDate","fulfillment","scanned_at","deliveredDate","shipping","delivered_at","deliveredTime","tatEstimate","tat_estimate","tatEstimateDataReuse","getResultsExpectedDate","purchased_at","accessionedDate","completed_at","naiveTatEstimate","naive_tat_estimate","phoneNumber","showScheduling","counseling","upcoming_appointment","appointment_type","appointmentTextOptions","videoPlaying","videoToPlay","playVideo","closeVideo","Report","approveReleaseModal","releaseToPhysicianModal","reportNotReadyState","reportNewState","reportContentReviewedState","reportQueuedforBoardReviewState","reportPreparedForBoardReviewState","reportBoardReviewedState","reportSignOutApprovedState","reportSignedOffState","reportReleaseGatedState","reportReleaseApprovedState","reportSentToPhysicianState","reportReleaseReadyState","reportReleasedState","testOutcome","pathologistReviewState","isPreSignoff","isPreRelease","stateToTitle","showApproveReleaseBtn","showReleaseToPhysician","showCheckboxColumn","showSampleColumn","showInQueueColumn","showPriorityColumn","showCreatedColumn","showOrderingColumn","showReportVersionColumn","showStatusColumn","showReleasedColumn","showSignificanceColumn","showClientColumn","showAgeColumn","showHistoryReadyColumn","showVariantClassificationReadyColumn","showReviewReadyColumn","showConfirmationReadyColumn","showHealthReadyFilter","showConfirmationReadyFilter","testOutcomeFilter","orderTypeFilter","reports","significance","hasNext","loadingNext","searchPage","initializeReports","viewReport","openApproveReleaseModal","modal","errorMsg","successMsg","selectedReports","selected","openModalForApprovingRelease","canSignOut","for_ny","is_ny_cq_holder","allSelected","page_size","is_covid","result_is_ready","sign_out_approved","kit_order__order_number__icontains","kit_order__samples__kit_barcode__iexact","isHistoryReady","is_health_history_ready","test_type__icontains","test_outcome","orderType","order_type","highPriority","high_priority","releaseToPhysician","reportsToSignOut","reportsToApprove","canBatchRelease","revision","has_incidental_findings","on_hold","is_secondary_confirmation_completed","has_classification_review_completed","non_reportable","negative","has_vusp","selectAllReports","covidReportRetractionPageEnabled","SWITCHES","goToCovidReportRetractionPage","total","noSearchExecuted","columns","label","ready_at_lab","released_at","reportGenericScreeningGuidelines","namedMutation","defaultLanguage","isPDF","template","showPdfSummaryRisks","is_negative","risks","hasElevatedRisks","risk","gene","reportReferences","removeReference","referenceId","index","splice","is_positive","genes_with_pathogenic_mutations","mutations","is_somatic","wisdom9","apc_i1307k","breast_cancer_survivor","ovarian_cancer_survivor","fallopian_tube_cancer_survivor","render_version","guideline","screening_guidelines","phenotype","references","languages","isFH3","generated_content","showV2","show_v2","showPDF","showShareWithProviderSection","chooseAppointment","diplotypeCalls","sample_sequence_run","loading","toggleNeutral","showNeutral","filterNeutral","variant","effect","sampleRunVariants","sangerDataModal","toggleAndReload","load","openSangerPlots","$event","confirmation","stopPropagation","ReportedData","showDetails","clinical_result","reportedData","toggleShowBenign","classification_id","validation","confirmations","invitee","elem","personalHistory","had_bone_marrow_transplant_or_blood_transfusion","had_bone_marrow_transplant","had_blood_transfusion","parts","had_blood_transfusion_in_the_week_before_providing_sample","appendAge","addMutations","had_liver_transplant","completed","cancer_completed","profile","female_health_profile","male_health_profile","had_breast_biopsy_with_atypical_hyperplasia","diagnosed_with_lobular_carcinoma_in_situ","cancers","diagnosed_age","affected_both","familyNone","family_relative_health_profiles","cardio_completed","cardio_history","cardio_mutations","medication_completed","medication_history","reviewKnownVariantModal","confirmTrueNegativeModal","reportId","reportedVariants","refreshReportedVariants","reviewVariant","reportedVariant","confirmTrueNegative","SampleSequenceRun","sampleSequences","isAnonymized","isCovidReport","isInOrderingPhysicianReview","showKeyInfoTab","showHealthHistoryTab","require_health_history_collection","showKnownVariants","showQCTab","showReportV1Tab","ready_for_v2_prod","showReportV2Tab","has_v2","eventLogs","forProd","iframeWidth","iframeHeight","show_react_web","reportErrors","canGenerate","generatingV2","regenerateReport","updateShareFamilyData","report_payload","setTimeout","handleError","error","msg","toJson","slice","substring","console","captureMessage","internalServerErrorToast","ignoreRequestErrorHandling","note","ReportStore","update","addReleaseGroupHoldModal","withdrawReleaseGroupModal","addReportReviewNoteModal","textSaveModal","releaseToPathologistModal","changeReportStateModal","rereleaseModal","isNonTerminalState","pathologistReview","showReleaseToPathologistBtn","showReleaseToGeneticsBoardBtn","showMarkAsReviewedByGeneticsBoardBtn","showReleaseToPhysicianBtn","showAddNoteBtn","showSendToOrderingPhysicianBtn","existing_physician_order","showReadyForReleaseBtn","showRereleaseBtn","release_to_patient","openAddNoteModal","provider_upload_s3_keys","uploaded_filenames","dropdownOpened","showRequestGeneticsBoardReviewBtn","showSendBackForContentReview","showReviewedHHChange","showPutOnHold","showTakeOffHold","showInstantReportTool","permissions","showQueueRetractionOption","showGenerateReportData","putOnHoldOption","show","onClick","put_on_hold","reason","putOffHoldOption","take_off_hold","$save","updateReportState","releasing","dropdownOptions","newWindow","opener","showDropdown","some","releaseToPathologist","releaseToGeneticsBoard","genetics_board_review_prepared","markAsReviewedByGeneticsBoard","genetics_board_reviewed","approveRelease","readyForRelease","sendToOrderingPhysician","toggleDropdown","tags","cssClass","reviewed_by_vcc","partner_name","is_minor","reportTags","indexedResource","Reference","setReportContentTemplateModal","isNonReportable","showReportTemplateHeader","showReportEditButton","_step","genes","_iterator","_createForOfIteratorHelper","gene_mutations","done","lp","ras","f","is_non_reportable","disableApplyTemplateButton","templates","selectedTemplate","changeActiveReportTemplateSection","section","activeReportTemplateSection","showPDFTab","changeTemplate","templateToCopy","newTemplate","onNewTemplateCreated","onNewTemplateCancelled","applyTemplate","applying","apply_template","$broadcast","question","controllerAs","bindToController","riskLabel","riskReferences","baselineLabel","baselineReferences","showCard","lowerAge","upperAge","phenotypes","primary_peritoneal_cancer_survivor","endometrial_cancer_survivor","gastric_cancer_survivor","melanoma_survivor","pancreatic_cancer_survivor","colorectal_cancer_survivor","prostate_cancer_survivor","showSeerCitation","tableData","lowerAgeRisk","upperAgeRisk","riskData","timechartRiskData","copy","showNegativeMultiChart","showNegativeSingleChart","hasAgeExceptionsAt","pathogenic","setHeight","num","adj","setLabelHeight","setHeightBottom","getBaselineRisk","baseline","isDefined","heightOverride","notElevatedRiskAge","surgeryGenes","apcMutations","allChildImpactGenes","childImpactGenes","childNonImpactGenes","reportIsSingleHomozygous","reportIsPotentiallyCompoundHeterozygous","showApcI1307k","showHighDeNovo","homGenes","isHomozygous","hetGenes","hasBothHomHet","Error","aboutString","isSomatic","descriptions","mutationName","gHGVS","brca1_r1699q","geneStringName","msg1","msg2","language","additionalFindingMutations","cnvMutations","nonCnvMutations","mutation","interpretedGenes","nonPathogenicGenes","g","listOfGenes","aboutGeneUrl","createGeneReport","allelicity","biallelicKnown","geneReport","mutationNoun","p1Exception","tableRisks","paragraphRisks","tableRiskReferences","tableBaselineReferences","commonRiskAge","allelicity_by_gene","isElevated","genderNoun","genderNounPlural","genderThirdPersonPronoun","genderPossessiveAdjective","msgIsLikelyPathogenic","cancersVerb","chanceNoun","anyCancerRisk","isSlightly","singleP1Text","biallelicP1Text2","biallelicP1Text1","withGeneNumMutation","isPotentiallyCompundHet","nonMutationSpecificRisks","classification_unit_id","allMutationSpecificRisks","nonMutationSpecificCancers","mutationSpecificRisks","mutationSpecificCancers","genders","geneReports","allelicities","showLfs","showKintalk","showForce","showBrightPink","showHcc","showLynch","showNoStomachForCancer","showKomen","showHisBreastCancer","showPtenFoundation","showOvarian","showAmericanMelanoma","showColonCancerAlliance","showNpf","showFarf","showIfar","showFanconiHope","showBmmrdConsortium","reportOrderDetailsModal","urlBuilder","uploadFileTypes","hideDownload","openOrderDetails","openRevisions","makeS3Url","buildUrl","file_type","geneticCounselingNote","pathogenicMutations","likelyPathogenicMutations","appendLower","studySubject","additionalMutationRefs","appendHigher","appendAnalyzedPositions","appendAnalyzedPositionsRefs","mutationsSet","isLikelyPathogenic","hasLikelyPathogenic","reportIsSingleGeneNoEffectPathogenic","hideZygosity","isVariant","guidelines","otherGuidelines","genderSingular","genderPlural","intro","healthHistoryStatus","risk_model","cardStyle","emailFamilyModal","sampleLetterModal","ctrl","openEmailFamilyModal","openSampleLetterModal","addProviderModal","healthcareProviders","sharing_providers","disclaimer","addProvider","isNumber","primaryRisks","primaryPathogenicRisks","primaryBaselineRisks","customPrimaryPhenotypes","pathogenicReferences","useSingleRiskLogic","showSingleAgeChartTitle","showDecadeAgeChartTitle","msgRiskLabel","msgBaselineLabel","subtitleReplace","createNegativeRisk","matchReportRiskAges","ageMax","matchedAgeReport","singleReportRiskAge","ageOnly","showRiskModelLanguageAppend","hasI1307K","isPotentiallyCompoundHeterozygousReport","isSingleHomozygousReport","subtitleAppend","showChek2SingleRiskCitation","negativeReport","lifetimeAgeRange","parseInt","biallelicRisksKnown","secondaryPhenotypes","primaryCancers","secondaryRisks","notDesignedForCancers","secondaryCancers1","secondaryCancers1Append","secondaryCancers2","panelNotDesignedForCancers","panelNotDesignedForRiskNoun","panelNotDesignedForCancerNoun","geneAppend","withR1699Q","uniqueRiskReferences","uniqueBaselineReferences","baselineData","showCompoundSentence","isSingleHomozygous","colorTestName","allSecondaryPhenotypeCount","allSecondaryCancersPronoun","showNotDesignedForText","showSummaryExtraCard","additionalFindingGenes","hasTrueNegatives","reported_variants_in_relatives","is_true_negative","msgReportTitle","showSecondary","survivorStrings","ovarianCancerGroup","primaryPhenotypes","survivorPhenotypes","filteredPhenotypes","survivorPhenotype","isPrimary","isSecondary","brCanIndex","ovCanIndex","output","isOvarianCancerGroup","affectedPhenotype","s1","s2","s3","h30NegativeString","version","genesToAsterisk","genesToDoubleAsterisk","asteriskedGenes","mType","conditionalNewYorkLabSentence","p1","p4","p3","p2","whitePaperMapping","whitePaper","$compile","attrs","sampleLetterMailto","stubElement","append","compiledContent","html","mailto","attr","summaryExtraString","showSummaryExtra","summaryExtras","questions","withGC","hasTrueNegative","v","singleMut","singleGene","geneMutations","toUpperCase","nounType","instant","mutationNounWithArticle","thisMutationNoun","mutationPredicate","q3","zygosity","introReferences","screeningGuidelines","phenotype_sub","translation","letter","letterValues","t1","nomenclature","nomenclatures","showTooltip","getHeightFromXTimesRisk","times","normalRisks","category","borderlineRisks","highRisks","ages","maxAge","reduce","Math","max","minAge","min","chart","showLegend","height","margin","right","bottom","left","pointRange","x","y","xDomain","yDomain","axisLabelDistance","xAxis","tickPadding","ticks","tickFormat","round","yAxis","tickValues","useInteractiveGuideline","callback","tooltip","contentGenerator","point","series","find","hide","color","legends","cls","bars","match","exec","bar","paragraphs","has_elevated_dutch_criteria_score","capitalizedClassification","report_id","objs","searchStr","obj","for_client","vus","lb","rai","interpretMutations","formatMutations","classificationName","mut","geneName","mutation_name","vusp","homozygous","formatMutation","gene_diplotypes","is_baseline","diplotypes","diplotype","interpreted_values","value_type","srv","variant_type","predictedToConfirm","sample_run_variant","quality_prediction","predicted_to_confirm","requested_at","is_present","vc","review","is_valid","requires_confirmation","details","isValid","solution","haplotype_1","haplotype_2","solutions","input","delimiter","bound","cleanRisk","test","parseFloat","hasVus","uniqueReferences","reference","apiPropertyToReportContentProperty","prop","survivorProperties","validApiProperties","unisex","female","male","cancer_survivor","had_breast_biopsy","classifications","targetGene","isInCis","variantTypes","allSomatic","hasBothPathogenic","isCommon","currentPositionCount","groupedGenes","uniqueGeneGroupsCount","groupedList","args","sortKey","arg","pow","group","likelyPathogenic","uniqueMutations","generateMutationString","isString","removeTranscriptReference","pos","getTranscriptReference","exon","is_primary","primaryNomenclature","cHGVS","pHGVS","secondary","isCNV","bic","bicNames","secondaryNomenclature","matchBracketedPercentage","matchArrowNotation","trim","others","combined","last","pop","generateCancerString","addPhenotypes","phenotypesToAdd","cancerTier","primaryPhenotypeOrder","sortedMutations","mutationsGenesOrder","setMutationsGenesOrder","independent_physician_order","presentGene","noWrap","isSinglePrefix","article","wrappedGenes","nounAppend","addReference","sortedRisks","summary_references","screening_guideline_intro_references","incidental_finding_references","additional_family_impact_references","removeNotIncreasedPathogenicRisks","negativePhenotypes","reportContentClone","ifGender","riskGene","ifGene","matchedPathogenicRisks","matchedPathogenicAges","matchedPathogenicRisk","pRisk","bRisk","riskGender","j","singleRisk","cancerToClinicalName","cancersCovered","history","had_mastectomy","had_oophorectomy","significant_polyps","clinicalCancerName","relatives","cancerName","fdr_count","count","_step2","_iterator2","relative","relativePhenotypes","female_relative_health_profile","male_relative_health_profile","_step3","_iterator3","relativePhenotype","relationship_is_first_degree","phenotypesList","fdrCount","significant","OVARIAN","PROSTATE","MELANOMA","COLORECTAL","PANCREATIC","pathogenicClassifications","benignClassifications","byClassification","variants","showBenign","variantCall","variantClassificationsToShow","minkey","variant_classifications","short_name","byGene","classification_unit","one_vc","test_methodology_version","backendTestVersionString","backendTestType","backendVersion","dates","Date","received_at","version1Cutoff","version2Cutoff","version3Cutoff","version4Cutoff","containsPhenotype","phenotypeToCheck","modifiedRisks","geneWithNonSpecRisks","mutationClassificationUnits","matchedRisks","unknownMutationSpecificRisks","namedMutations","thisMutation","transcript","ageGenes","geneSets","genesToMatch","stk11Age65Exceptions","displayAge","isAgeException","ageExceptions","tier","primary","TransitionReportController","$q","release","deferredReports","all","ReleaseReportToPhysicianController","actions","actionText","ChangeReportStateModal","placeholder","requesting","$inject","addNote","adding","saveReference","saving","fax","fax_log","isRetraction","arguments","revisionTypes","rt","rerelease","revisionType","revision_type","is_retraction","revised_report","reportedVariantId","resolved","variant_classification_id","variantClassificationId","resolveNotes","unresolvableNotes","multiPageModal","each","getComputedStyle","getPropertyValue","altText","processAriaLabel","redirectEmailConfirmed","AuthRouteFilter","redirect","textModal","defaultLoginPath","loggedInHomePath","emailConfirmationRequiredPath","permissionDeniedPath","sexSelectorPath","healthHistoryIncompletePath","providerLoggedInHomePath","benefitsRoutingAuthorizationPath","permissionTypes","hasCompletedRoutingAuthorization","_redirect","isFunction","apply","currentPath","requireAnonymous","requireSex","requireBenefitsRoutingAuthorization","requireHealthHistoryCompleted","requireSampleReviewer","requireVariantReviewer","requireVariantReviewerManager","requireOrderingPhysician","requireGeneticCounselor","requirePathologist","requireGeneticsBoardMember","requireLabStaff","requireColorEmployee","requireSupportStaff","requireProvider","requireSupportAdmin","requireExternalClassificationReviewer","requireAssociatedSample","requiredPermissions","authorizations","showProviderView","pathname","showLogoutModal","logout","hasOnlyCovidTests","is_proxy","is_email_confirmed","routing_organization","oldPath","authorized","hasAllPermissions","sessionAPIEndPoint","loginCheck","clrVersion","$emit","authService","Account","skipAuthSync","isSynced","hasSkippedSync","force","currentSync","$get","login","password","redirectUri","loginConfirmed","browserVersion","isWindows","keyboardShortcut","listener","serverVersion","dismissBanner","reloadPage","cacheBustedUrl","getTime","absUrl","getPrevPath","EmailConfirmationResend","getEmailProvider","emailProvider","lastPath","getUserPurpose","emailConfirmationResend","resending","resendConfirmationEmail","nextQueryParam","compact","showPhoneNumber","stateAcronyms","$validators","modelValue","viewValue","$isEmpty","usStateValidator","dummyFormatter","inputValue","uppercaseFormatter","uppercased","$setViewValue","$render","currentFormatter","formatter","$parsers","$formatters","$eval","ngModel","$setValidity","oldState","$viewValue","$interpolate","geographicalArea","topCountries","allCountries","entireCountryList","NotYetAvailableModal","countries","checkAvailable","countryFieldName","withIcons","withLabel","flexStyle","withEntireCountryList","displayTemplate","countryRenderer","display","floor","random","stateNames","NoPOBoxesModal","required","focus","checkout","autocomplete","fixedCountry","displayTooltip","checkBirthday","formCtrl","deliveryHint","pluralizedKit","getQuantity","carrier","shippingAddress","days","shippingCost","getShippingPriceDollars","toFixed","form","getAreaInfo","shippable","outboundShipperName","jurisdictionName","fields","postalCode","fillInAddress","place","component","addressParts","address_components","types","long","long_name","short","getAddressParts","getPlace","street_number","fieldRow","field","locality","administrative_area_level_1","google","maps","places","Autocomplete","componentRestrictions","addListener","initAutocomplete","newCountry","oldCountry","countryFields","k","phoneCountries","phoneCountry","addressCountry","phoneExtension","phoneFieldName","phoneFieldLabel","limitCountry","hasExtension","e164Match","number","extension","patientIsMinor","skipAgeCheck","shouldCheckAge","checkOverAge","birthdate","year","month","day","checkFutureDate","now","isoformat","birthdateModel","validate","date","onChange","dateModel","$error","overAge","futureDate","sexOptions","genderIdentities","ngChange","createAccount","SignInModal","account","creatingAccount","showLoginModal","selfDescribedGender","FEMALE","MALE","NON_BINARY","SELF_DESCRIBED","poBoxPattern","RegExp","line","constant","hasAnyPermission","permission","_this2","every","InsightsFlow","startEventName","init","message","domainProviderMap","domain","population_memberships","membership","population","relationships","flat","EMPLOYEE_RELATIONSHIPS","pathFlow","PATHS","flow","ROUTE_TO_TEXT","getRoutes","nextRoute","currentRoute","routes","currentIndex","getNextRoute","goTo","VerifyIdentityModal","EmailUpdateConfirmationResend","AlmostDoneController","changingEmail","verifyingIdentity","pendingEmailChange","unconfirmed_updated_email","changeEmail","instructions","verification_password","changeEmailSubmit","openAlmostDoneModal","cancelEmailForm","$modelValue","primaryActionText","secondaryActionText","thisUser","cancelEmailChange","resendVerificationEmail","patch","changingPassword","changePassword","cancelPasswordChange","changePasswordSubmit","currentPassword","Address","changingInfo","resetAddress","contactAddress","phone","phone_country","national_number","contact_address","changeInfoSubmit","full_name","firstName","lastName","cancelChangeInfo","changeInfo","shareDataChanging","shareDataChanged","preventDefault","can_use_for_research","shareData","storeSampleChanging","storeSampleChanged","allowed_to_store","storeSample","hasPurchased","has_purchased","iterator","Array","_arrayLikeToArray","toString","constructor","from","_unsupportedIterableToArray","_n","F","TypeError","u","return","RawDataFile","barcode_to_properties","returnedData","returned_data_info","barcode","to_return","returned_data","IdentityVerification","VerifyIdentityModalController","identityVerification","verifyPassword","$save_with_ignore_auth_module","InsightsFlowNavigation","showPromoBanner","Appointment","upcomingAppointments","staticText","onComplete","uploadedNotes","fileUploader","uploadedNoteKey","uploader","formData","autoUpload","queueLimit","queue","s3_key","answers","noteOptions","internalNote","discussion","nextSteps","otherTestsDiscussed","checkboxQuestions","propertyName","reports_for_other_test_types","isSpanish","latest_completed_appointment","isAouAcmg59Positive","aouAcmg59","positive","isAouAcmg59Uninformative","isAouPgxV1","aouPgxV1","publishCounselingNoteModal","environment","publishedNoteKey","view","supportedLanguages","English","Spanish","noteLanguages","_defineProperty","noteInfoByLanguage","supportedTestTypes","isAouTestType","canGenerateNote","switch_is_active","canUseRetoolGenerator","testName","retoolBaseURL","usingNoteGenerator","updateContent","activeLanguage","noteContent","draftNoteKey","trix","showOptions","noteIsGenerated","showPreview","generateAndPreviewNote","Promise","generateNoteContent","generatePdf","showEditor","editor","getDocument","setSelectedRange","deleteInDirection","insertHTML","saveEdits","publish","publishNote","addInternalNote","note_options","note_content","dateObj","start_time","getDate","hour","timezone","splitted","getTimezoneAbbreviation","modalInstance","eventTypes","logData","event_time","save","releaseDelayOptions","formInput","reportsInReleaseGroup","isFinishedLoading","openReport","addReleaseGroupHold","withdrawReleaseGroup","releaseGroupHold","removeReleaseGroupHold","release_group_hold_id","displayString","release_delay_in_days","require_counseling_if_positive","typeTitles","fields_to_request","loadResults","loadingResults","query","findResult","resultSorter","endTime","end_time","Number","POSITIVE_INFINITY","viewResult","host","SchedulizerServices","appointmentURL","iframeScrolling","noLoginOrConfirmation","showPromoBannerWhitelist","sampleReuseNavigation","NotYetAvailableModalController","Waitlist","stateFullNames","waitListName","waitlist","waitlist_type","waitlist_name","notify","saveWaitlist","$save_with_skip_error_toast","NoPOBoxesModalController","PromoCodeMismatchModalController","skuName","externalSkuListNames","clearPromoCode","changeSelection","loggingIn","PhysicianOrderCancellation","requisitionNumber","PhysicianOrderCancellationReasons","askReason","askingReason","cancelTest","cancelling","non_field_errors","accessionNumber","kitBarcode","requisitionStore","requisition","remove","storedRequisition","Purchase","deliveryTime","purchase","purchase_number","noReferral","no_referral","no_email","emailConfirmed","subscribed","enterpriseV2Campaigns","isOnsiteSetUp","setUpOnsite","submittingAddress","selectedCampaign","campaign","selectedCampaignName","selectedCampaignSkus","skuDiscount","checkEligibility","campaign_name","checkedEligibility","detail","enterpriseV1SubmissionForm","$setPristine","enterpriseV2EligibilityCheckForm","enterpriseV2SubmissionForm","return_tracking_number","returnScan","delivery_address","handlePaymentError","placePurchase","has_consented","existingPhysicianOrder","existing_physician","showOrderingPhysicianModal","onChangeSku","physicianOrder","shareLink","referral_code","senderFirstName","twitterStatus","copied","onCopySuccess","existingPhysician","creditCard","initFocus","orderFlowStyle","partnerRequestsPayment","healthcareProvider","hideRestrictions","popup","testRequested","ctlr","togglePromotionalCodeInput","showPromotionalCodeInput","removePromotionalCode","selectedSku","promoAppliesToSku","translatedTestName","canRedeem","PromoCodeMismatchModal","addAsyncValidator","modelVal","viewVal","external_sku_list_names","resetPromoCode","$commitViewValue","HealthcareProvider","PhysicianOrder","withoutHealthcareProviders","withColorOrderingPhysician","sendCopyToHealthcareProviders","onPurchase","onSubmit","skuTestTypes","msgUnknownRequisition","msgRedeemedRequisition","requisition_number","canAddHealthcareProvider","provider_id","addHealthcareProvider","removeHealthcareProvider","sendCopy","promocode","setClaim","applyRequisitionCode","setPhysicianOrder","skuTests","clearRequisitionCode","Set","test_requested","currentTest","productName","orderedTest","testDesc","tests","keepInput","oldRequisitionNumber","requisitionProviders","profiles","providers","formal_name","step","initialLoggedIn","showCopyLink","isSafari","referralCode","should_see_referral_card","campaignTokens","toggle","showInput","removeToken","applyCampaignToken","campaign_token","Stripe","handleIntlShipping","stripeHandler","StripeCheckout","locale","billingAddress","token_response","address_args","placePurchaseWithStripeCheckout","startStripe","zipCode","amount","getTotalPriceDollars","hideFailure","hide_failure","initFromQueryParams","claimToken","claim_token","is_redeemable","resetEventName","PromotionalCode","canAddDependents","_initializePromise","stopPersistingCode","silentSuccess","silentFailure","_onSuccessHandler","_onFailureHandler","setPromotionalCode","URLSearchParams","originIsFtpEmail","isEligibleForPricingModifiers","promo","is_family_testing_code","company_name","cookiePersistedObject","Claim","store","set","reject","givenSku","standalonePriceDollars","standaloneProviderServicePriceDollars","modifierBrcaUpgradePriceDollars","getAdvertisedKitPriceDollars","custom_price_dollars","getCustomKitPriceDollars","getProviderServicePriceDollars","providerServicePriceDollars","getDisplayedKitPrice","kitPrice","modifiedKitPrice","getModifierDiscountDollars","isFreeShippingPromoCode","getPromoCodeDiscountDollars","isZero","hasPromoCode","getValidPromoCode","baseKitPrice","discountCents","percent_discount","value_cents","custom_price_cents","custom_kit_price_cents","Checkout","_quantity","subclass","klass","super","getMaxKitCount","incrementKit","decrementKit","getShippingCountry","getUnitShippingPriceCents","isSampleReuse","getKitPriceDollarsAfterModifiers","getKitSubtotalDollars","getTestSubtotalDollars","getProviderServiceSubtotalDollars","getItemizedKitPriceDollars","unitShippingPriceDollars","itemizedKitPrices","item","kitPriceSubtotalDollars","appliedDiscountDollars","totalDollars","numRedemptions","kit_for_self","shipping_subsidy_cents","previousTotal","remaining_redemptions","maxPromoCodeDiscountDollars","appliedPromoCodeDollars","getKitPriceDollars","sum","getSubtotalPriceDollars","getAppliedDiscountDollars","isPaymentRequired","healthcareProviderFromProfile","institution_name","CreditCard","healthcareProviderStore","KitCheckout","start","skipReset","stripe_card_token","shared_providers","authorized_to_order","promotional_code","requireShipping","edit","paymentErrorsCount","_modifierPrice","_modifierName","heardAboutColorThrough","getHealthcareProvider","syncOrderingInformation","updateModifierPrice","removeModifier","quantity","modifier_price_cents","modifier_name","setKitForSelf","kitForSelf","setSku","is_verified","ordering_physician_profile","placed_by_profile","prepareOrderInfo","preparePurchase","heard_about_color_through","is_sample_reuse","consent_type","hasNewYorkOrderMismatch","physicianOrderState","hasPhysicianProfile","setCreditCardToken","setShippingAddress","placingPurchase","_placePurchase","cleanUp","hasAssociatedSample","placePurchaseWithApplePay","deferredResult","defer","colorTestLabel","lineItems","requiredShippingContactFields","countryCode","currencyCode","applePay","buildSession","completion","shippingContact","addressLines","administrativeArea","givenName","familyName","ApplePaySession","STATUS_FAILURE","promise","emailAddress","STATUS_SUCCESS","begin","shipping_address_line1","shipping_address_city","shipping_address_state","shipping_address_zip","shipping_name","shipping_address_country","scriptLoaded","lazyLoader","script_base_url","windowObject","deferred","createElement","src","head","appendChild","load_script","max_redemptions","simpleName","middleName","lowFrictionHealthcareProviders","storedValue","followup","capture","defaultSku","ui","alreadyHavePhysicianOrder","dependents","dependentsClaimManager","claimForSelf","onlySpouse","getFamilyMembers","addFamilyMember","removeMember","skus_qualified_for_data_reuse","purchasedAt","purchasedDate","setDate","test_types_covered_with_prev_orders","$parse","modelCtrl","uppercase","goToWisdom","canChangeOrderingPhysician","modalType","back","PhysicianOrderType","isWisdom","atLab","isSampleAtOffice","SAMPLE_AT_OFFICE","createAccountRouteConfig","showSignInAsButton","linkToProviderSignIn","showStore","forProviders","showSearchBar","draft","DraftPhysicianOrder","PhysicianOrderFormData","draftRequisitionNumber","enrollment","Enrollment","enrollmentId","ftp","showPhysicianOrderBreadcrumbs","ProviderHomeInitialMessages","cppHomeUrlPath","DetailedPhysicianOrder","directPurchasingFlowBannerIsVisible","getApiParamsFromLocation","orders","routeName","getRouteName","isEmailConfirmed","userEmail","showGroup","settings","show_group","viewOrder","order","project","ProviderPlatformModals","physicianOrderCheckout","testTypesBlockedInNewYork","PhysicianOrderNavigationService","testTypesAllowedInEU","euCountries","Navigation","isPatientInNY","patient_profile","isProviderInNy","setState","STATES","DETAILS","application","userProvider","patientFormLooseRequirement","getOrSetIfEmpty","initializeWithSettings","defaultCountry","physician_order_requisition_number","physicianOrderFiles","onSuccessItem","upload_files","showUSWarning","showNYBlock","showTestSpecificNyBlock","showNotYetAvailableBlockPatient","parse","is_kio","is_whitelisted_test","_checkMinorTestType","checkMinor","openUSProvidersForUSPatientsModal","openNYBlockModal","countryName","doneUploading","validateOrder","allow_ship_to_home_payment","skip_payment","URLS","PAYMENT","addAdditionalRecipient","removeAdditionalRecipient","loadFromDraft","loadFromEnrollment","Boolean","is_support_staff","PortalPaginator","ApplicationType","REVIEW","not_require_counseling_if_positive","show_vus_details","no_vus_details","_submitting","CLINICAL","anchor","submitOrder","stripe","openPaymentErrorModal","moveToReview","payment_code","promocode_for_payment","reviewOrder","payment","meetsInsuranceCheck","reviewPayment","locationSkipReload","modalShim","providerReleaseResultsForOrderModal","showMedicationPromo","showPgxBanner","getTestTypesWithReleasableReports","is_provider_owned","has_report","kit_orders","kitOrder","is_released","openPhysOrderReleaseModal","releaseResultModal","opened","add","loadOrder","ko","resp","checkShowPgxBanner","statusName","goToMedicationTool","onSaveOrder","$update","errorMessage","resultsPath","logPath","detailsPath","isPath","goToOrders","goToPath","shipKit","is_cancellable","ProviderAccount","ColorProviderPlatformInvitation","emailConfirmationToken","invitation","institution","providerProfile","log","prefill","payload","welcome","OrderingPhysicianProfile","ProviderSettings","editingField","editedValue","fieldName","setOrders","drafts","continueOrder","discard","openCancelOrderModal","enrollments","familyTestingGenes","for_physician_order","proband","document_key","SharedOrder","openOrder","orderCount","loadSharedOrder","resultIsAvailable","RESULTS","editing","onCancelEdit","onEdit","oldPatientProfile","orderingPhysicianRoles","npiOptionalRoles","externalProviderRoles","isOrderingPhysician","roles","role","showNpi","_","showPhone","showFax","showFaxNumber","fax_number","orderTestingButtonIsVisible","goToPlaceOrder","expanded","setPlaceholder","onKeyDown","searchQuery","encodedQuery","keyCode","btoa","getSearchQuery","providerHeardAboutColorThrough","invited","primaryRoles","npi","pageSize","currentPage","pageNum","currentItem","endItem","currentParams","getPreviousPage","activeNav","institutionName","draftsCount","goToMedicationReview","goToTutorials","removeFile","file","onRemoveFile","onBeforeUploadItem","fileItem","fileType","triggerUploadDialog","overrideOopBlockModal","resubmitting","paymentType","submitButtonText","INSURANCE","CASH_PAY","SWITCHED_TO_CASH_PAY","OVERRIDE_OOP_BLOCK","isSupportStaff","isInsuranceOn","isShipToHomePaymentEnabled","SAMPLE_ORDERED","patient","address_line1","openOverrideOopBlockModal","eligibility_submission","overriden","isCriteriaSectionVisible","insurancePredicate","switchedToCashPredicate","meetsOopCheck","overrideOutOfPocketPredicate","isCriteriaSectionActive","isCriteriaCardVisible","criteria_submission","isShippingAddressSectionValid","addressForm","$valid","isAdditionalInformationSectionActive","skipPayment","paymentForm","meetsCriteriaCheck","onEligibilityCheck","oopAmount","oopEstimate","hasValidInsurance","onCriteriaCheck","metCriteria","internal","prior","icdCodesRequired","toArray","formElement","model","$validate","handleSubmit","insuranceDetailsForm","hbocCriteriaForm","additionalInformationForm","consent_attestation","openNoAttestationModal","meets_insurance","resultsUrl","openFTPModal","openFTPOneClickModal","showMedicationToolLink","CPPTutorials","tutorials","directName","cascadeName","selectEnrollmentType","enrollmentType","openTutorialIfNotSeen","eighteenYearsAgo","setFullYear","getFullYear","isCovidSample","isCovidBarcode","ProviderReleaseResultsForPhysicianOrderModalController","testTypesWithReleasableReports","releaseResult","EditTestRequestedController","newTestRequested","oldTestRequested","newTestRequestedName","reloadDraft","cancelOrder","$delete","openWelcomeModal","openDraftUpdatedModal","backdrop","keyboard","openBarcodeAccessionModal","openEditTestRequestedModal","openChooseTestTypeModal","openTakeHomeNotAvailableModal","openKioOptionNotAvailableModal","email_confirmed","AddPatientPaymentInfoModalController","PhysicianOrderPayment","ReattemptInsuranceModalController","InsuranceEligibilitySubmission","eligibilitySubmissionId","endEditing","edited_order","reattemptInsuranceModal","editable","isClinical","watcher","canViewInsuranceAttemptDetails","attempted_insurance_submission","canReattemptInsurance","insurance_claim","openReattemptInsuranceModal","lastSubmission","diagnoses","hboc_criteria","geneticTestResults","genetic_test_results","hasPersonalHistory","hasFamilyHistory","hasPersonalPastGeneticTesting","hasFamilyPastGeneticTesting","detailedCovidSampleTypes","onSave","editableSections","PATIENT_PROFILE","TEST_TYPE","REFULFILLED_SAMPLE","canEditTestRequested","default_as_ordering_physician","displayedPlacedByProfile","toggleEditing","resetEditing","addPatientPaymentInfoModal","isAddPatientPaymentInfoModalOpen","openAddPatientPaymentInfoModal","SWITCHED_TO_CASH_REASON","DEFAULT","OOP_OVER","BLACKLIST","CRITERIA","getSwitchedToCashReason","eligibility_state","met_criteria","canEditPayment","orderPromiseReturned","changeTest","$$postDigest","defaultTestType","getResultsUrl","selectedKitOrderNumber","searchKitOrder","accession_number","collection_date","insurance","pre","testname","clearQueue","removeUploadFile","uploadFile","criteria","eligibility","met_criteria_unknown_eligibility","cancerTypes","criteriaRelationshipTypes","sideOfFamilyTypes","InsuranceCriteriaSubmission","removeElement","is_ashkenazi_jewish_descent","patientDiagnoses","familyDiagnoses","familyGeneticTestResults","hasHadCancer","hasFamilyHistoryOfCancer","hasFamilyWithPositiveMutation","isSupportUser","requiresCompleteForm","removePatientDiagnosis","removeFamilyDiagnosis","removeFamilyGeneticTestResult","checkCriteria","has_limited_or_unknown_family_history","diagnosis","icd_10_cm_codes","submission","patient_info","payer","attempted_submission","canRemove","isPatient","removeDiagnosis","ALL","CancerType","acc","onRemove","CancerGene","geneticTestResult","removeGeneticTestResult","cancerGenes","BILIARY_TRACT_OPTIONS","BRAIN_OPTIONS","BREAST_OPTIONS","CERVICAL_OPTIONS","COLORECTAL_OPTIONS","KIDNEY_OPTIONS","LEUKEMIA_OPTIONS","LIVER_OPTIONS","LUNG_OPTIONS","MELANOMA_OPTIONS","OSTEOSARCOMA_OPTIONS","OVARIAN_OPTIONS","PANCREATIC_OPTIONS","PROSTATE_OPTIONS","RENAL_PELVIS_OPTIONS","SEBACEOUS_GLAND_ADENOMAS_OPTIONS","SMALL_BOWEL_OPTIONS","SMALL_INTESTINE_OPTIONS","SOFT_TISSUE_SARCOMA_OPTIONS","STOMACH_OPTIONS","TESTICULAR_OPTIONS","THYROID_OPTIONS","URETER_OPTIONS","UTERINE_OPTIONS","FAMILY_OPTIONS","cancerTypeToOptions","biliary_tract_cancer","brain_cancer","breast_cancer","cervical_cancer","colorectal_cancer","kidney_cancer","leukemia","liver_cancer","lung_cancer","melanoma","osteosarcoma","ovarian_cancer","pancreatic_cancer","prostate_cancer","renal_pelvis_cancer","sebaceous_gland_adenomas","small_bowel_cancer","small_intestine","soft_tissue_sarcoma","stomach_cancer","testicular_cancer","thyroid_cancer","ureter","uterine_cancer","unknown","familyOptions","createNewCode","deselect","$selectMultiple","$select","option","removeChoice","DetailedProviderProfiles","physicianChoices","physicianChoicesCount","isVantari","distributor_name","showSelectedProvider","navService","skippable","InsurancePayers","isUsingCashPay","insurance_id","relationship_to_policy_holder","$watchGroup","policy_holder","placeInsuranceDetailsForm","eligibilitySubmission","get_as_array","insurance_companies","nonPrimaryContactRoles","searchable","canBePrimaryContact","primary_role","primary_contact_reference","kioCountries","mask","useModelViewValue","isNaN","accessionMask","postBlurCommitValue","setCollectionDateToToday","getMonth","covidSampleTypes","sampleType","externalName","chooseTestTypeModal","errorField","valid","empty","$digest","after","kioNotAllowed","TEST_TYPES","selectType","selectedType","$interval","currentDraftPhysicianOrderVersion","orderWatcher","dirty","isSaveDisabled","saveDraft","draft_requisition_number","existingDraft","updated_at","draft_updated_at","checkIfUpdatedSinceLastRead","wasUpdated","savePromise","watchOrder","updateDraftToDb","autoSaveHeartBeat","searchAndUpdateChoices","submitSearch","met_oop_check_for_insurance","estimated_oop_cost_cents","DetailedPhysicianOrderResource","BLANK_ORDER","providerSettings","blankOrder","default_require_counseling_if_positive","default_release_delay_in_days","default_test_requested","require_payment","limit_type","provider_owned_only","default_vus_option","show_collection_date","currentOrder","draftOrder","json_payload","applicant_first_name","applicant_last_name","applicant_email","applicant_promocode","getFromRequisitionNumber","toJSON","exclude_unverified","invite","verifiedPhysicianId","verified_physician","persistedObject","PhysicianOrderCheckout","totalPriceDollars","stripeResp","skipToEnd","defaultApiParams","routeNames","pathParams","currentUrl","atob","decodeURIComponent","newState","getState","refreshDataWithFlow","persistedData","family_testing_direct","cards","family_testing_cascade","BasicTutorialCardController","nextFn","prevFn","card","previous","isFirstCard","isLastCard","Tutorials","TutorialManager","_createClass","_classCallCheck","tutorialName","nextCard","openModalForCard","previousCard","apiParams","tutorial_name","event_type","self","seenTutorials","tutorials_started","openTutorial","h30KitPriceDollars","brcaKitPriceDollars","fhKitPriceDollars","goToOrderDetailsPage","showNav","released","confirming","confirmProvider","fetch","on","selectedTab","withCallback","fn","ticking","hideOnWeb","requestAnimationFrame","setTab","tab","width","clientWidth","css","offsetLeft","mobileToggleMenu","bool","mobileMenuOpen","ShareProviderModal","ScheduleAppointmentModal","target","tagName","classList","dummyNomenclature","initialData","testGenesCovered","setDefaultValues","sex","testMethodology","showVusDetails","updateGenes","schemaPromise","schema","initializeEditor","JSONEditor","collapsed","theme","disable_edit_json","required_by_default","disable_properties","pgxGenePhenotypes","pgxGenesCovered","geneDiplotypes","pgxGeneInterpretationsPromise","genesCovered","genePhenotype","gene_diplotype","setReportURL","reportVersion","pdf","evalValue","convertIntIfPossible","resetSelections","destroy","setValue","setSexSpecificProfile","generateReport","sourceReport","initialDataPromise","test_information","clinical_domain","genes_covered","root","refreshValue","getValue","iframeErrors","stack","framePromise","initialLoad","quickFinding","quickGene","relativeVariant","instantReportGene","addMutation","testTypeEditor","getEditor","testTypeValue","mutationEditor","is_carrier","updatedExisting","variant_id","addInstantReportContentForGene","instantReportContentEditor","instantReportContent","irc","addVUS","vuspNote","addIncidentalFinding","addTrueNegative","variantsEditor","profileSchema","definitions","FemaleHealthProfile","MaleHealthProfile","sexSpecificProfileEditor","updatePhenotype","geneDiplotypesEditor","newGeneDiplotype","geneDiplotype","currentGeneDiplotypes","_arguments","originalError","fullScreen","baselineGeneDiplotypes","thisEditor","thisValue","curValue","isArrayRegex","curPath","hadArray","propName","arrayIndex","MaleRelativeHealthProfile","FemaleRelativeHealthProfile","CommonCancerHistory","LabSendout","anyOf","validators","showVusDetailsOptions","quickAddInstantReportContent","quickAddMutation","quickAddVUS","quickSetTestType","testInfo","quickSetShowVusDetails","quickAddIncidentalFinding","quickAddTrueNegative","quickSetSex","quickSetTestMethodology","loadReport","reportNote","viewPdf","quickUpdatePhenotype","makeS3UrlFilter","uploadFileTypeLabels","fileTypeLabels","geneticTestReport","insuranceCard","medicalRecords","orderFormOrInformedConsent","otherPhysicianOrderFile","masterGeneTable","interpreted_by","footnote","interpretations","cardioConditionsCovered","ib","BREAST","ENDOMETRIAL","GASTRIC","covid19Antigen","hdr59","default","putSamplesOnHold","viewUsers","viewAppointments","viewHealthHistory","viewCovidReportsQueue","heterozygous","Device","isMsie","navigator","userAgent","platform","canPlayHls","canPlayType","isHighDensity","matchMedia","matches","devicePixelRatio","isIos","MSStream","extractValueFromElem","elemId","defaultVal","convertCentsToDollars","cents","entryPriceDollars","entryProviderServicePriceDollars","comboPriceDollars","comboBCAMPriceDollars","standardPriceDollars","comboProviderServicePriceDollars","hereditary30PriceDollars","hereditary30ProviderServicePriceDollars","modifierAddonPriceDollars","modifierFhUpgradePriceDollars","modifierEntryMultiUnitPriceDollars","modifierStandaloneMultiUnitPriceDollars","modifierComboMultiUnitPriceDollars","modifierOCComboMultiUnitPriceDollars","modifierHereditary30MultiUnitPriceDollars","brand","isEntry","host_url","logged_in_host_url","prod","officeManager","breastSurgeon","colorectalSurgeon","gc","gynOnc","internist","geneticist","geneticNursePractitioner","medicalOncologist","nurse","nursePractitioner","ob","otherPhysician","otherSurgeon","radiologist","surgicalOncologist","medicalAssistant","physicianAssistant","urologist","dermatologist","gastroenterologist","radiationOncologist","cardiologist","endocrinologist","lipidologist","heardOther","array","shuffleArray","is_low_friction","BILIARY_TRACT","BRAIN","CERVICAL","KERATOCANTHOMAS","KIDNEY","LEUKEMIA","LIVER","LUNG","OSTEOSARCOMA","RENAL_PELVIS","SEBACEOUS_GLAND_ADENOMAS","SMALL_BOWEL","SMALL_INTESTINE","SOFT_TISSUE_SARCOMA","STOMACH","TESTICULAR","THYROID","URETER","UTERINE","UNKNOWN","MOTHER","DAUGHTER","SISTER","GRANDMOTHER","AUNT","NIECE","GRANDDAUGHTER","HALF_SISTER","GREAT_GRANDMOTHER","GREAT_AUNT","FIRST_COUSIN_FEMALE","FATHER","SON","BROTHER","GRANDFATHER","UNCLE","NEPHEW","GRANDSON","HALF_BROTHER","GREAT_GRANDFATHER","GREAT_UNCLE","FIRST_COUSIN_MALE","SAMPLE_TAKEN_HOME","WWW","geneticLabOptions","conditions","lab","condition","PREFER_NOT_TO_RESPOND","covid_anterior_nares_swab","covid_dry_anterior_nares_swab","covid_nasopharyngeal_swab","covid_oropharyngeal_swab","getField","list","def","sort_countries","country_list","localeCompare","defaultAddressFieldOrder","defaultAddressOptionalFields","fieldOrder","AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","CV","KH","CM","CA","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","HR","CU","CW","CY","CZ","CI","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","SZ","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","XK","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","KP","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RO","RU","RW","RE","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","KR","SS","ES","LK","SD","SR","SJ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TM","TC","TV","TR","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","colorApp","isInClinicalIframe","frameElement","nodeName","getAttribute","locationHost","escape","protocol","$watchCollection","showSubNav","toggleSubNav","subNavName","isSubNavChanged","showCollapsedNav","toggleCollapsedNav","showSubnav","closeAllSubNav","collapseAllNav","openHomeDashboard","openProviderPortal","changePath","goToInstitution","goToConfigurator","medicalGeneticistReviewPageEnabled","goToMedicalGeneticistReviewPage","serverErrorTemplate","contentTemplate","itemTitle","itemSubtitle","itemSubtitleStrikeText","itemSubtitleText","itemIcon","itemNumber","startsOpen","transclude","openState","listeners","register","unregister","first","whenStep","linkWhenInactive","breadcrumbsCtrl","latestStepValue","watchedValue","actualValue","toggleClass","registration","stepValue","watchedStepValue","indent","tabindex","ngRequired","ngDisabled","isChar","months","contextPrefix","popupContent","showError","dateArray","_edit","$pristine","cutoff","numDays","formatDate","$setDirty","emailSuggestion","emailBlurhandler","Mailcheck","suggested","suggestion","suggestedEmailElement","suggestionClickhandler","full","unbind","emailFocushandler","scrollToTopOnError","toastOnError","showPartialError","sentryTrackValidationError","sentryTrackValidationErrorComponent","warnBeforeUnload","$set","showAllErrors","_pending","validatorName","validator","$asyncValidators","$pending","$invalid","validateAndSubmit","$dirty","culprit","sentryTrackErrorComponent","level","onbeforeunload","minlength","maxlength","chartName","$element","shiftBaselineGuide","setTitle","applyScope","riskValue","legendData","chartTicks","chartStyle","barHighlight","chartData","rowTitle","barLabel","barWidth","barHighlightWidth","baselineRisks","70","80","95","defaultBaselineRiskAge","defaultBaselineGuide","riskAge","hoverRisk","65","chartTickWidth","trunc","italicTitle","hoverTitle","hoverAverage","getBaselineAverage","getHoverRisk","hoverFootnote","shiftLabel","clrMarked","linksInNewWindow","pdfUrl","pdfHeight","embedPDF","PDFObject","embed","pdfDomId","fallbackLink","pdfOpenParams","zoom","navpanes","toolbar","scrollbar","pdfFrame","deregister","choices","$id","$observe","selection","yesNo","string","yesNoUnsure","attrName","selectDefaultText","textDefaultText","compile","initValue","other","selectedValue","enteredValue","optionsWithOther","copyOptionsWithOther","triggerOnSelect","triggerOnEnter","clrSetFocus","pathLastSegmentOnly","heroTemplateUrl","contentTemplateUrl","heroHeight","enableListener","tabCtrl","addTab","relativePath","select","setUnderline","position","setScroll","pathMatch","showOnDock","clrTabSelect","setViewportScroll","heroNotSwappable","inCard","disableScrollfix","hideTabs","tallHero","disable","enable","duplicateButton","tabBarButton","clone","$templateCache","preloadTemplates","setUrls","setHeroHeight","forceToTabs","windowScrollTop","tabSetOffsetTop","heroElement","heroBottom","outerHeight","scrollTopAnimated","heroPromise","contentPromise","activeTab","anchorAtLoad","tabUnderlineElement","setActiveTab","anchorName","activeTabParent","parent","goToAnchor","currentTarget","waypoint","Waypoint","handler","direction","clrTabSimpleWaypoint","ready","clrToggleOnInput","hideFiles","minFiles","formController","originalOnSuccessItem","originalOnErrorItem","onErrorItem","videoName","imageName","buttonSize","contentPadding","contentClass","ensureCompileRunsOnce","htmlCompile","confirmationFor","unshift","urlRegex","initFocusExpr","allClass","strikeClass","hideStrike","basePriceOnly","skuObj","basePrice","activePrice","showStrike","popToast","popToastTags","corporateLogos","PromoBanner","bannerType","fullWidth","topOfPage","banner","shouldShowGiftIcon","banner_type","getBannerClass","classes","getBannerType","stopImpersonating","getName","showErrorOnBlur","which","stopPropagationOn","tabBar","elm","uiSelectRequired","determineVal","unique","$animate","multiElement","switchName","waffleIfNotSwitch","tempClasses","waffleIfSwitch","waffleIfFlag","flag_is_active","popupName","attrKeys","trackData","attrKey","substr","txt","charAt","stickyTableHeaders","renderReferenceWatch","referencesResolved","ref","refs","id__in","markdownTitle","selectOnChange","injection","blacklist","routeToText","percentComplete","ceil","Image","onload","delayedScrollId","clearTimeout","trigger","formatPhone","suffixes","numStrs","specialCases","1","2","3","10","11","12","13","20","plural","numberFilter","words","capitalizedWords","word","oxComma","str","$1","trustAsHtml","collection","isObject","uniqueItems","member","arr1","arr2","limit","terms","resultsSinceDate","dateFilterString","searchTerm","wwwBaseHostUrl","wwwLoggedInBaseHostUrl","s3Key","internalProviderRoles","_map","curr","roleConstant","roleName","internalRole","phonePrefix","symbol","arr","cancerTypeToDisplayNameMap","tuple","displayName","cancerType","prependString","dateString","decimals","splittedInput","wholeNumber","fraction","end","set1","set2","el1","has","el2","tel","_typeof","prefix","formatted","defaultValue","phoneMask","daysToDeliver","shippingChargeCents","ourGovtOk","theirGovtOk","carrierOk","cityMaxlen","cityLabel","cityWidth","stateMaxlen","stateLabel","stateWidth","postalCodeMaxlen","postalCodeLabel","postalCodeWidth","postalCodeMask","addressFieldOrder","addressOptionalFields","flagFilename","outboundServiceName","deliveredDutyPaid","taxIdMaxlen","taxIdLabel","taxIdWidth","taxIdMask","fieldWidth","hasAddressField","isRequiredField","PathFlow","_flow","_pathInFlow","lastFlow","curFlow","optional","lastRoute","un","defaultPath","parser","MultiPageModalController","TextSaveModalController","TextModalController","TextareaInputModalController","isHtml","cancelButtonText","isMarkdown","showContactSupportText","showCloseButton","texts","buttonTexts","images","page","maxPage","getDotClass","dismissButton","iframeShim","affixed","showPromoBannerType","scrollButtonText","showRedcrossCta","logoLink","affixedButtonText","affixedButtonLink","affixedButtonSku","priority","hasParentTopNavigationElement","closest","mobileSublinks","hasClass","mobileToggleSublinks","mobileCloseAll","keepMobileSublinks","$routeProvider","MetaTagsProvider","metaTagDefaults","colorAuthRouteFilter","metaTagsWithPath","MetaTags","initialize","newVal","oldVal","translationID","uses","fingerprint","setUserContext","userId","setTagsContext","urlCleaners","setLevel","rejection","interceptors","responseError","Raven","debug","cleanedURL","patterns","pattern","trimHeadFrames","stacktrace","extra","originalURL","_originalSend","_send","setDSN","_globalOptions","defaultDSN","overrideUrls","override","ResourcePaginator","defaultParams","transform","_transform","_resolvedPromise","hasPrevious","loadingPrevious","loadingFailed","_nextParams","_prevParams","_defaultParams","_resource","PersistedObject","_obj","CookiePersistedObject","cookieName","paramValue","$resource","methods","update_with_ignore_auth_module","create_with_ignore_auth_module","save_with_skip_error_toast","get_with_ignore_auth_module","get_as_cached","param","$create","$update_with_ignore_auth_module","$create_with_ignore_auth_module","ignoreAuth","$get_with_ignore_auth_module","_updateResource","currentResource","getCurrentPage","hasItems","getFirstPage","_this3","_updateQueryParamWithMeta","getAllPages","removeItem","queryStr","parseUrl","pair","IndexedResource","itemsById","loaded","getById","setItem","paramName","encodeUriQuery","pctEncodeSpaces","FileUploader","csrfCookieName","alias","defaultOptionKeys","toastOnBlock","isUploading","uploadAll","getUploadedKeys","cachedScrollY","preventMotion","removeEventListener","httpErrorCodeToToast","hasFieldError","errors","getErrorMsgFromObject","errorHtml","rejected","actualStaticUrl","staticUrl","setPublishableKey","warn","creditCardPromise","exp_month","expiry","exp_year","createToken","videoIds","pretestBrca12","vimeoId","pretestBreastOvarian19","pretestHereditary30","preCounselCancer","preCounselCombo","preCounselFh","preCounselCardio30","preCounselCombo2","preCounselCore10","storiesRobin","benefitsNvidiaStory","benefitsMarissaStory","benefitsStoriesPam","VimeoModalController","vimeoUrl","videos","VideoService","vimeoEmbedPlayer","autoplay","vimeo","vimeoModal","vimeoModalPlayer","enrollment_token","flowState","initializeRelatives","initializeEnrollmentData","color_positive","resultsOwner","positive_genes","applicant","getProbandRelationship","originalProbandRelationship","onLearnMore","today","getAge","relativesNeeded","enrollRelative","enrolledRelativeCount","getRelatives","changeEnrollment","enroll","addRelative","getInviteeInfo","goToPage","pageUrl","invitees","mother","father","requestor","date_of_birth","toISOString","how_you_heard","heardAboutColor","requesting_test","isPreApproved","sisters","brothers","daughters","sons","family_info","relativeStub","prefilled","proband_relationship","showGenderIdentityOptions","identity","modalDisplayed","openGenderIdentityContent","sexClicked","displayModal","setSexAndGenderIdentity","addGeneticTestFieldName","mutationsField","hadMutationField","companyField","hadGeneticTestField","anyRelativeField","isAnswered","isGridRow","geneticLabsByCondition","withoutCompany","labs","companyPerformedGeneticTestOptions","resultsUploaders","createResultsUploader","resultsDocumentName","resultsDocumentKey","FileItem","isUploaded","hadMutation","setGene","selectedGene","removeMutation","checkboxName","ageInputName","checkboxLabel","ageModel","msgAgeQuestion","radioRowName","rowTranslateText","tooltipText","kidneyOrLiverProblemOptions","grandparentNationalitiesEnabled","known","hasRelatives","editedBy","healthProfile","hadGeneticTestMsg","hadGeneticTestTooltipMsg","toggleValue","heightInInches","height_in_inches","heightFeet","heightInches","heightCentimeters","weightInPounds","weight_in_pounds","weightKilograms","getInitialHeightAndWeight","ageDiagnosed","rowText","shouldDisplay","current_medications","itemSelected","medication","originalObject","drug_brand_name","medicationItem","medicationList","findIndex","atLeastOneOptionSelected","genderIdentityOptions","had_cancer","shortenForm","unknownText","birthYear","currentYear","anonymizedIndex","setYear","relationshipNames","relationshipOnly","age_at_death","birth_year","fullSentence","had_breast_cancer","had_ovarian_cancer","had_fallopian_tube_cancer","had_primary_peritoneal_cancer","had_other_cancer1","other_cancer1","had_other_cancer2","other_cancer2","relationshipPriorityList","indexA","indexB","femaleCancerAttrs","maleCancerAttrs","R_PARENTS","R_MATERNAL_GRANDPARENTS","R_PATERNAL_GRANDPARENTS","R_GRANDPARENTS","R_ANCESTORS","R_SIBLINGS","R_CHILDREN","R_MATERNAL_PARSIBS","R_PATERNAL_PARSIBS","R_PARSIBS","can_edit","can_delete","getRelative","hasChildren","removeAllRelatives","cleanUpBeforeSave","has_children","has_siblings","mother_has_siblings","father_has_siblings","cleanUpCancerFields","superSave","ReportRevisionsModal","ReportOrderDetailsModal","OrderingProviderNotesModal","AddProviderModal","SampleLetterModal","EmailFamilyModal","relevantHistory","checkIfDistinctProvider","compareTo","JSON","stringify","hasPrimaryContact","hasOrderPlacedBy","SampleRunVariant","VariantClassification","ClassificationReview","VariantConfirmation","SampleRunVariants","hideBenignUnreported","deferredConfirmations","sample__user","hide_benign","variantClassifications","classificationReviews","variantIds","for_report","classification_unit__variant__in","hide_unreported","is_internal","variant_classification__classification_unit__variant__in","variantIdToCuClassifications","cuToReviews","cur","curReview","variant_classification","created_at","sampleRunVariant","cuToClassifications","cus","cu","variantIdToConfirmations","variant_confirmations","is_updated","reviewer","signature","svg","recommendChildrenTested","mutationNames","showSomatic","showBiallelic","showCompoundHeterozygous","showInCis","showSinglePositive","homMutations","hetMutations","showHomozygousHeterozygous","hetGene","homGene","showMultiplePositives","showNegativeFemale","showNegativeMale","pathogenicNomenclature","femaleRisks","maleRisks","femaleCancersString","maleCancersString","sampleLetterTestType","phenotypeBiallelicRisks","singleMutationName","phenotypeBiallelicCancerString","addChildhoodTestingSentence","pathogenicNomenclature1","pathogenicNomenclature2","classification1","classification2","geneCondition","conditionPhenotypeRisks","monoallelicPhenotypeRisksF","monoallelicPhenotypeRisksM","translationKey","noConditionPhenotypeRisks","hetGeneReport","homGeneReport","hetClassification","homClassification","hetNomenclature","homNomenclature","hetFemaleCancersString","homFemaleCancersString","hetMaleCancersString","gene1","gene2","femaleCancers1String","femaleCancers2String","maleCancers1String","maleCancers2String","bothGenderCancersString","gene3","pathogenicNomenclature3","gene4","pathogenicNomenclature4"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,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ACxCmC,wBAAyBA,IACxBnvI,MAAK,SAAS0vC,GACjBjD,EAAOloC,wBAA0BmrC,UAE9B,GAAIprC,EAAcksB,aAAqC,GAAtBiU,EAAYtiC,OAAa,CAC/D,IAAIgtI,EAA0B,GAC9B5sI,QAAQsgB,QAAQ4hB,GAAa,SAAS/B,GAChC77B,EAAQ,sBAARA,CAA+B67B,EAAWuqG,YAAYttG,YACxDwvG,GAA2B,kBAAoBzsG,EAAWxS,KAAO,mFAEjEi/G,GAA2B,kBAAoBzsG,EAAWxS,KAAO,0DAA4DwS,EAAWyqG,oBAAsB,QAGlK5qI,QAAQsgB,QAAQ4hB,GAAa,SAAS/B,GACpCysG,GAA2BzsG,EAAW0qG,kBAAoB,QAE5D/rI,EAAW,6CACT,CACE7B,SAAU6tI,EACVwB,MAAOpqG,EAAY,GAAGvU,KACtB4+G,MAAOrqG,EAAY,GAAGvU,KACtBk/G,MAAO3qG,EAAY,GAAGvU,KACtBo/G,MAAO7qG,EAAY,GAAGvU,KACtBw9G,wBAAyBjpG,EAAY,GAAGuoG,uBACxCW,wBAAyBlpG,EAAY,GAAGuoG,uBACxCqC,wBAAyB5qG,EAAY,GAAGuoG,uBACxCuC,wBAAyB9qG,EAAY,GAAGuoG,uBACxCmC,wBAAyBA,IACxBnvI,MAAK,SAAS0vC,GACjBjD,EAAOloC,wBAA0BmrC","file":"www.bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"https://prod-static.color.com/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 19);\n","/**\n * @prettier\n */\n\n/**\n * All static logged-out pages are served by Marketing's CMS.\n * This function generates a URL for those hosts.\n * FIXME: the function name is confusing. As we move to React, we can kill this function off.\n * See more about the subdomain split here:\n * https://docs.google.com/document/d/1ugLUCE33LZMNhmMKYrTBRjOxnsVG0ngpvWEUu_2TFkQ/edit#\n * @param {boolean} hostIsHomeApp\n * @param {string} path path should have a backslash in front of it.\n\n */\nfunction getAbsolutePath(hostIsHomeApp, path) {\n const hostname = window.location.hostname;\n // TODO (evelyn) When we move to the CMS officially, will change all logged_out to point to www.color.com\n const in_prod = hostname.indexOf('www.color') > -1 || hostname.indexOf('home.color') > -1;\n const in_sync_staging = hostname.indexOf('sync.') > -1 && hostname.indexOf('.staging') > -1;\n const in_feature_staging = hostname.indexOf('www-') > -1 && hostname.indexOf('.staging') > -1;\n const in_staging = hostname.indexOf('staging') > -1 && !in_feature_staging && !in_sync_staging;\n const is_eks_specific_path = hostname.indexOf('use1-a.eks.') > -1;\n\n if (in_prod) {\n if (hostIsHomeApp) {\n if (is_eks_specific_path) {\n return 'https://home.use1-a.eks.color.com' + path;\n }\n return 'https://home.color.com' + path;\n }\n return 'https://www.color.com' + path;\n }\n\n if (in_staging) {\n if (hostIsHomeApp) {\n if (is_eks_specific_path) {\n return 'https://home.use1-a.eks.staging.color.com' + path;\n }\n return 'https://home.staging.color.com' + path;\n }\n return 'https://test-color-genomics.pantheonsite.io' + path;\n }\n // locally and feature staging\n if (hostIsHomeApp) {\n return path;\n }\n return 'https://test-color-genomics.pantheonsite.io' + path;\n}\n\nmodule.exports = getAbsolutePath;\n","module.exports = {\n reactRedirect: {\n '_reactRedirect_': function($location, $window, auth) {\n 'ngInject'\n // Reconstructs current path with parameters and removes the react url\n const currentPath = $location.path() + window.location.search\n const reactPath = currentPath.replace('/react', '')\n // .replace does not add to browser history for back button behavior\n $window.location.replace(reactPath)\n }\n },\n\n healthHistory: {\n 'healthHistory': function(HealthHistory) {\n 'ngInject'\n return HealthHistory.get().$promise\n .catch(function(res) {\n if (res.status == 404) {\n return new HealthHistory()\n }\n })\n }\n },\n\n results: {\n 'report': function($route, LatestReport) {\n 'ngInject'\n return LatestReport.get({testType: $route.current.params.testType}).$promise\n },\n 'isPDF': ['resolvedPromise', function(resolvedPromise) {\n return resolvedPromise(false)\n }]\n },\n\n kitStatus: {\n 'kitStatuses': function(KitStatus) {\n 'ngInject'\n return KitStatus.get().$promise\n }\n },\n\n userStatus: {\n 'userStatus': function($http) {\n 'ngInject'\n return $http.get('/api/v1/user_status')\n .then(function(res) {\n return res.data\n })\n }\n },\n\n familyTestingEligibility: {\n 'eligibility': function($http) {\n 'ngInject'\n return $http.get(\n '/api/v1/family_testing/eligibility',\n { ignoreAuthModule: true }\n )\n .then(function(response) {\n return response.data\n })\n }\n },\n\n // Used to set default heardAboutColorThrough for special URLs we distribute via ads media.\n applyAttributionRedirect: function(attribution, redirectPath) {\n return {\n '_AttributionRedirect_': function($window, $location, $cookies) {\n 'ngInject'\n $cookies.put('attribution', attribution)\n\n // Routes starting with /t/ are served from cache directly off the\n // Django server, and aren't mounted in the Angular app.\n if (redirectPath.startsWith('/t/')) {\n $window.location.href = redirectPath\n } else {\n $location.path(redirectPath);\n }\n return\n }\n }\n },\n}\n","'use strict'\n\nmodule.exports = function($scope, $location, $http, auth, waffle) {\n 'ngInject'\n\n $scope.auth = auth\n if (auth.currentUser.is_provider) {\n $scope.provider = auth.currentUser.provider_profile\n }\n\n $scope.retrieveOrganizationName = () => {\n $http.get('api/v1/get_routing_organization').then((response) => {\n $scope.organization_name = response.data\n })\n }\n}\n","/*\n * Make image paths point to prod CDN, required because js has\n * no knowledge of the fingerprinted django-pipeline assets.\n */\nmodule.exports = function cdnify(imagePath) {\n return \"https://prod-static.color.com/images/\" + imagePath\n}\n","module.exports = function ReportV2Controller($translate, $scope, $route, $sce, $http, $document, $window, $raven, marked, handleReportClick, reportRevisionsModal, orderingProviderNotesModal) {\n 'ngInject'\n\n // Show revision modal if revised report is opened for the first item.\n const newRevisions = $scope.report.revisions.filter(function(rv) { return !rv.opened_at })\n if (newRevisions && newRevisions.length) {\n $translate(['RESULT.NEW_REVISION_MODAL.TITLE', 'RESULT.NEW_REVISION_MODAL.BUTTON'])\n .then(function(translations) {\n const title = translations['RESULT.NEW_REVISION_MODAL.TITLE'];\n const btnText = translations['RESULT.NEW_REVISION_MODAL.BUTTON']\n reportRevisionsModal.open(newRevisions)\n })\n }\n\n const iframe = angular.element('#reportFrame')[0]\n\n function getIframeElementOffset(selector) {\n const innerDocument = iframe.contentDocument\n const element = innerDocument.querySelector(selector)\n if (element) {\n return element.offsetTop\n }\n }\n\n // $scope.report is LatestReport, serialized by ReleasedReportSerializer\n const {\n id: reportID,\n kit_order: { test_type: testType },\n kit_order: { order_number: kitOrderNumber },\n is_hh_provided,\n is_hh_under_review\n } = $scope.report\n const reportShareFamilyData = {}\n\n // load data used by health history banner and top nav\n $http.get(`/report/${reportID}/data.json`)\n .then((res) => {\n const {\n components,\n report_info: {\n sample,\n test_type,\n physician_order: {\n show_ordering_provider_notes,\n relevant_history,\n additional_recipients,\n order_placed_by,\n ordering_physician,\n primary_contact\n }\n }\n } = res.data;\n $scope.reportContent = {\n kit_order: {\n order_number: kitOrderNumber,\n test_type\n },\n sample,\n additional_recipients,\n order_placed_by,\n ordering_physician,\n show_ordering_provider_notes,\n relevant_history,\n primary_contact,\n\n // for banner\n is_hh_under_review,\n is_hh_provided\n }\n reportShareFamilyData.msgMarkdownSampleLetter = ''\n if (!!components.share_family_letter) {\n components.share_family_letter.content.map((c) => {\n reportShareFamilyData.msgMarkdownSampleLetter += marked(c)\n })\n }\n })\n .then(function() {\n // Show ordering provider notes if it's the first time opening.\n if ($scope.reportContent.show_ordering_provider_notes && !$scope.report.opened_at) {\n orderingProviderNotesModal.open($scope.reportContent)\n }\n })\n\n // logic for syncing navbar to iframe\n let navTop = 0;\n let iframeNavSelector;\n $scope.selectedTabIndex = 0\n window.onNavigate = (tabIndex) => {\n $scope.$applyAsync((scope) => {\n scope.selectedTabIndex = tabIndex\n })\n }\n window.iframeRegisterNav = function(elementName, navLst) {\n iframeNavSelector = elementName\n navTop = getIframeElementOffset(elementName)\n $scope.$apply(() => { $scope.tabs = navLst })\n }\n\n // scrollPos is a helper function that is passed to report_navbar for calculating\n // offset from top\n $scope.scrollPos = () => 0\n if (!!iframe) {\n $scope.scrollPos = () => iframe.offsetTop + navTop\n }\n\n // reportURL is loaded in iframe#reportFrame\n $scope.reportURL = $sce.trustAsResourceUrl(`/report/${reportID}/web_report`)\n\n function handleSmoothScrollToTabRequest(event) {\n const reportFrame = $('#reportFrame');\n const anchorElement = $('#v2-colortabs', reportFrame.contents());\n const offset = $window.scrollY - 40 // extra since our anchor div is above the horizontal nav\n\n $document.scrollToElementAnimated(anchorElement, offset)\n }\n\n // iframe#reportFrame onload callback\n $scope.reportFrameOnload = function() {\n // trigger iframe resize\n window.iFrameResize({\n checkOrigin: false,\n heightCalculationMethod: 'documentElementOffset',\n resizedCallback: (event) => {\n navTop = getIframeElementOffset(iframeNavSelector)\n }\n }, '#reportFrame')\n\n iframe.contentWindow.addEventListener(\n 'smoothScrollToTab', handleSmoothScrollToTabRequest, false\n );\n\n // event handler for clicks in the iframe\n iframe.contentWindow.addEventListener('click', function(e) {\n handleReportClick(\n e, reportShareFamilyData, testType,\n kitOrderNumber\n )\n })\n\n // Capture exceptions from inside the report iframe and passes them to Sentry\n // https://stackoverflow.com/questions/6327128/can-i-catch-exception-of-iframe-in-parent-window-of-iframe\n iframe.contentWindow.onerror = (e) => {\n $raven.captureException(e)\n }\n }\n}\n","module.exports = function CounselingDetailController(\n $scope,\n $window,\n $http,\n $filter,\n OrderLog,\n HealthHistory,\n ngToast,\n releaseResultsModal,\n removeReleaseGroupHoldModal,\n releaseGroupResultsModal,\n setReleasePreferencesModal,\n addEventModal,\n clinicalDomains,\n report\n) {\n \"ngInject\";\n const FTP_INELIGIBLE_TEST_TYPES = [\"aou acmg 59\", \"aou pgx v1\"];\n $scope.report = report;\n $scope.newNote = {};\n $scope.buttons = [];\n\n // Define health hub links\n $scope.health_guides = {\n \"Breast Cancer\": \"/insights/breast-cancer\",\n \"Type 2 Diabetes\": \"/insights/type-2-diabetes\"\n };\n\n const releaseGroup = report && report.release_group || null\n $scope.releaseGroup = releaseGroup;\n $scope.releaseGroupId = (releaseGroup && releaseGroup.release_group_id) || null\n $scope.activeReleaseGroupHolds = (releaseGroup && releaseGroup.active_holds) || []\n\n if (report.patient_id) {\n $scope.info = {\n user: {\n first_name: report.patient_id,\n last_name: \"Patient ID\",\n patient_id: report.patient_id\n }\n };\n getTraits($scope.info.user.patient_id);\n getAncestry($scope.info.user.patient_id);\n getPolygenicScores($scope.info.user.patient_id);\n } else {\n $http\n .get(\"/api/v1/counseling/info/\" + report.id)\n .then(function(res) {\n $scope.info = res.data;\n })\n .then(function() {\n const physician_order_id = $scope.info.physician_order_id;\n if (physician_order_id) {\n $http\n .get(\"/api/v1/counseling/release_preferences/\" + physician_order_id)\n .then(function(res) {\n $scope.releasePreferences = res.data;\n });\n }\n\n $scope.subtitles = parseHeaderSubtitles($scope.info);\n\n handleAddButtons()\n\n $scope.healthHistory = new HealthHistory(\n $scope.info.user.health_profile\n );\n if ($scope.info.user.health_profile) {\n $scope.healthHistoryUrl = \"/clinical/v2/support/generic-health-history/show/\" + $scope.info.user.health_profile.id + \"/summary\";\n }\n $scope.clinicalDomain = clinicalDomains[$scope.info.test_type];\n\n refreshLog();\n getTraits($scope.info.user.patient_id);\n getAncestry($scope.info.user.patient_id);\n getPolygenicScores($scope.info.user.patient_id);\n });\n }\n\n function handleAddButtons() {\n // Only add buttons if the report is in either of these states\n if ($scope.info.state !== \"sent_to_ordering_physician\" && $scope.info.state !== \"release_ready\") {\n return;\n }\n\n // Report is not in a release group, show default button to release individual report\n if (!$scope.releaseGroupId) {\n $scope.buttons = [\n { text: \"Release to Client\", action: $scope.releaseResults },\n ];\n return;\n }\n\n if ($scope.info.state === \"sent_to_ordering_physician\") {\n // For now, we will not permit GCs to manually bypass the sent_to_ordering_physician\n // state when manually releasing release groups. If this ends up being a blocker,\n // we will revisit\n return;\n }\n\n // We expect only one genetic counseling hold per release group\n const counselingHolds = $scope.activeReleaseGroupHolds.filter(hold => (hold.hold_type === 'genetic_counseling'))\n const geneticCounselingHold = counselingHolds[0]\n\n // The release group has a genetic counseling hold that needs to be removed in order to\n // permit releasing. If there are other, non genetic_counseling holds for this\n // release group, the backend will block the user from releasing this group\n // until the other holds have been removed.\n if (geneticCounselingHold) {\n $scope.buttons = [\n { text: \"Remove GC Hold From Release Group\", action: $scope.openRemoveHoldModal },\n ];\n return;\n }\n\n // Release all reports in the release group to the client\n $scope.buttons = [\n { text: \"Release Group to Client\", action: $scope.openReleaseGroupResultsModal }\n ];\n }\n\n function refreshNotes() {\n // ignore querying notes if no report is associated. e.g. AoU GEM results\n if (!report.id) {\n return;\n }\n\n $http\n .get(\"/api/v1/counseling/notes\", { params: { report: report.id } })\n .then(function(res) {\n $scope.notes = res.data.results;\n });\n }\n\n $scope.$on(\"internalNote:created\", refreshNotes);\n\n function parseHeaderSubtitles(info) {\n const subtitles = [\n [\n `Sex assigned at birth: ${$filter(\"capitalize\")(\n $filter(\"genderOrSexText\")(info.user.gender)\n )}`,\n `Gender Identity: ${$filter(\"capitalize\")(\n $filter(\"genderOrSexText\")(\n info.user.gender_identity,\n info.user.self_described_gender_identity\n )\n )}`,\n `${info.user.age} years old`,\n `born on ${$filter(\"date\")(info.user.birthday)}`\n ].join(\", \"),\n `Preferred Language: ${$filter(\"capitalize\")(\n info.user.preferred_language\n )}`,\n `P: ${$filter(\"tel\")(info.user.phone_number)}`,\n info.user.email\n ];\n if (!FTP_INELIGIBLE_TEST_TYPES.includes(info.test_type)) {\n subtitles.push(`FTP: ${$filter(\"booleanToYesNo\")(info.is_ftp)}`);\n }\n if (!info.user.city && !info.user.state) {\n subtitles.push(\n `Collected at: ${info.collection_state}, ${$filter(\"name\")(\n info.collection_country\n )}`\n );\n } else {\n subtitles.push(\n `Contact Address: ${info.user.city}, ${info.user.state}, ${$filter(\n \"name\"\n )(info.user.country)}`\n );\n }\n\n const shipping_address = addressStr(info.shipping_address);\n if (shipping_address) {\n subtitles.push(`Shipped to: ${shipping_address}`);\n }\n\n return subtitles;\n }\n\n function addressStr(address) {\n if (!address) {\n return \"\";\n }\n const addressStrings = [address.line1];\n if (address.line2) {\n addressStrings.push(address.line2);\n }\n addressStrings.push(\n [address.city, address.state, address.postal_code].join(\" \")\n );\n addressStrings.push(address.country);\n return addressStrings.join(\", \");\n }\n\n function getTraits(patient_id) {\n $http\n .get(\"/api/v1/trait_outcomes\", {\n cache: true,\n params: { patient_id: patient_id }\n })\n .then(function(res) {\n if (Object.keys(res.data).length != 0) {\n $scope.traits = res.data;\n }\n });\n }\n\n function getAncestry(patient_id) {\n $http\n .get(\"/api/v1/ancestry\", {\n cache: true,\n params: { patient_id: patient_id }\n })\n .then(function(res) {\n if (Object.keys(res.data).length != 0) {\n $scope.ancestry = res.data;\n }\n });\n }\n\n function getPolygenicScores(patient_id) {\n $http\n .get(\"/api/v1/polygenic_scores\", {\n cache: true,\n params: { patient_id: patient_id }\n })\n .then(function(res) {\n if (Object.keys(res.data).length != 0) {\n $scope.polygenic_scores = res.data;\n }\n });\n }\n\n function refreshLog() {\n if ($scope.info.order_number) {\n OrderLog.get({\n kit_order__order_number: $scope.info.order_number,\n ordering: \"-event_time\"\n }).$promise.then(function(res) {\n $scope.logs = res.results;\n });\n }\n }\n\n refreshNotes();\n\n $scope.releaseResults = function() {\n releaseResultsModal.open(report.id).result.then(function() {\n $scope.info.state = \"released\";\n ngToast.create(\"Results successfully released to client\");\n refreshLog();\n });\n };\n\n $scope.openRemoveHoldModal = function() {\n const holds = $scope.activeReleaseGroupHolds.filter(hold => (hold.hold_type === 'genetic_counseling'))\n\n // We expect only one genetic counseling hold per release group\n const geneticCounselingHold = holds[0]\n\n removeReleaseGroupHoldModal.open($scope.releaseGroup, geneticCounselingHold).result.then(function() {\n // refresh page so the \"Release Group to Client\" button shows up\n // TODO: Refresh the report object so we don't need to refresh the page\n window.location.reload()\n });\n };\n\n $scope.openReleaseGroupResultsModal = function() {\n const releaseGroupId = $scope.releaseGroupId;\n releaseGroupResultsModal.open(releaseGroupId).result.then(function() {\n $scope.info.state = \"released\";\n ngToast.create(`Released all results to client for release group ${releaseGroupId}`);\n refreshLog();\n });\n };\n\n $scope.setReleasePreferences = function() {\n setReleasePreferencesModal.open($scope.releasePreferences);\n };\n\n $scope.addEvent = function() {\n addEventModal.open(report.id).result.then(refreshLog);\n };\n\n $scope.addNewNote = function() {\n $scope.addingNote = true;\n const data = { report: report.id, text: $scope.newNote.text };\n $http\n .post(\"/api/v1/counseling/notes\", data)\n .then(function() {\n $scope.newNote = {};\n refreshNotes();\n })\n .finally(function() {\n $scope.addingNote = false;\n });\n };\n\n $scope.showBenignVariants = false;\n\n $scope.viewClassification = function(classification) {\n $window.open(\"/variant_classifications/\" + classification.id + \"/show\");\n };\n\n $scope.isEmpty = object => angular.equals(object, {});\n};\n","'use strict'\n\nmodule.exports = angular.module('SchedulizerService', [])\n /**\n * `chooseAppointment` appears to be used in Clinical support tools.\n */\n .factory('chooseAppointment', ($location, upcomingAppointment) => {\n return (orderNumber) => {\n return upcomingAppointment.get(orderNumber).then(appointment => {\n $location.path(`/react/schedule`).search({order_number: orderNumber})\n })\n }\n })\n\n /**\n * `schedulizerTextOptions` appears to be used in pending_gc_session. See also `appointmentTextOptions`\n */\n .factory('schedulizerTextOptions', (appointmentTypes, PgxTutorial) => {\n return (appointmentType) => {\n\n const defaultOptions = {\n title: 'Schedule Genetic Counseling Appointment - Color',\n appointmentName: 'genetic counseling appointment',\n specialistName: 'genetic counselor',\n specialistNameLong: 'board-certified genetic counselor',\n whatHappensDescription: 'Your genetic counselor may start by covering some of the the basics about genetic testing, as well as reviewing your personal results and answering any questions you may have. They may also ask clarifying questions about the personal and family health history that you provided.',\n howItWorksLink: 'https://support.color.com/genetic-counseling'\n }\n\n const pgxOptions = {\n title: 'Schedule Genetic Counselor Appointment - Color',\n appointmentName: 'genetic counseling appointment',\n specialistName: 'genetic counselor',\n specialistNameLong: 'genetic counselor',\n whatHappensDescription: 'Your pharmacist may start by covering some of the basics about how your body breaks down (metabolizes) certain medications, as well as reviewing your personal results and answering any questions you may have. They may also ask clarifying questions about your medication list and the personal and family history history that you provided.',\n howItWorksCta: PgxTutorial.showTutorial\n }\n\n switch (appointmentType) {\n case appointmentTypes.pgx:\n return pgxOptions\n default:\n return defaultOptions\n }\n }\n })\n","module.exports = angular.module('kitOrderModal', ['ui.bootstrap', 'ngToast'])\n .factory('NotYetAvailableModal', require('src/django_apps/kit_orders/js/modals/not_yet_available'))\n .factory('NoPOBoxesModal', require('src/django_apps/kit_orders/js/modals/no_p_o_boxes'))\n .factory('PromoCodeMismatchModal', require('src/django_apps/kit_orders/js/modals/promo_code_mismatch'))\n .factory('SignInModal', require('src/django_apps/kit_orders/js/modals/signin'))\n .factory('PhysicianOrderCancellation', require('src/django_apps/kit_orders/js/modals/physician_order_cancellation'))\n .factory('NotACWellnessMemberModal', require('./modals/not_acwellness_member_modal'))\n","module.exports = {\n E164Regex: /^\\+(1|2(?:0|1[12368]|2\\d|3\\d|4\\d|5[0-8]|6\\d|7|9[01789])|3(?:[0-4]|5\\d|6|7[0-8]|8[0125679]|9)|4(?:0|1|2[013]|[3-9])|5(?:0\\d|[1-8]|9\\d)|6(?:[0-6]|7[023456789]|8[012356789]|9[012])|7|8(?:0[08]|1|2|4|5[02356]|6|7[08]|8[012368])|9(?:[0-4]|5|6[0-8]|7[012345679]|8|9[234568]))(\\d+)(?:\\;ext=(\\d+))?$/\n};\n","require('src/django_apps/core/static/js/app.js')\nrequire('src/django_apps/core/static/js/constants.js')\nrequire('src/django_apps/core/static/js/geo_constants.js')\nrequire('src/django_apps/core/static/js/controllers.js')\nrequire('src/django_apps/core/static/js/directives.js')\nrequire('src/django_apps/core/static/js/event.js')\nrequire('src/django_apps/core/static/js/filter.js')\nrequire('src/django_apps/core/static/js/location.js')\nrequire('src/django_apps/core/static/js/modal.js')\nrequire('src/django_apps/core/static/js/navigation.js')\nrequire('src/django_apps/core/static/js/phone_numbers.js')\nrequire('src/django_apps/core/static/js/providers.js')\nrequire('src/django_apps/core/static/js/raven.js')\nrequire('src/django_apps/core/static/js/resource.js')\nrequire('src/django_apps/core/static/js/request.js')\nrequire('src/django_apps/core/static/js/static_files.js')\nrequire('src/django_apps/core/static/js/stripe.js')\nrequire('src/django_apps/core/static/js/video.js')\nrequire('src/django_apps/core/static/js/waffle.js')\n\nrequire('src/django_apps/family_testing/static/js/family_testing/controllers.js')\nrequire('src/django_apps/family_testing/static/js/family_testing/directives.js')\nrequire('src/django_apps/family_testing/static/js/family_testing/filters.js')\nrequire('src/django_apps/family_testing/static/js/family_testing/services.js')\n\nrequire('src/django_apps/health_profiles/static/js/health_profiles/controllers.js')\nrequire('src/django_apps/health_profiles/static/js/health_profiles/directives.js')\nrequire('src/django_apps/health_profiles/static/js/health_profiles/filter.js')\nrequire('src/django_apps/health_profiles/static/js/health_profiles/resource.js')\n\nrequire('src/django_apps/physicians/static/js/physicians/resource.js')\n\nrequire('src/django_apps/results/static/js/results/report_modal.js')\nrequire('src/django_apps/results/static/js/results/resource.js')\nrequire('src/django_apps/results/static/js/results/service.js')\n","const getAbsolutePath = require(\"src/django_apps/core/static/js/absolute_path\");\n\nconst cdnify = require(\"src/django_apps/core/static/js/cdnify\");\nconst resolvers = require(\"src/django_apps/core/static/js/resolvers\");\n\n!(function() {\n \"use strict\";\n\n const app = angular.module(\"colorApp\", [\n \"ngRoute\",\n \"ngAnimate\",\n \"ngAria\",\n \"ngSanitize\",\n \"ngToast\",\n \"nvd3\",\n \"angularPayments\",\n \"hc.marked\",\n \"http-auth-interceptor\",\n \"pascalprecht.translate\",\n \"fiestah.money\", //Angular monetary input validation\n \"duScroll\",\n \"ngclipboard\",\n \"rt.popup\",\n \"ui.bootstrap\",\n \"ui.scrollfix\",\n \"ui.mask\",\n \"ui.select\",\n \"accountServices\",\n \"angularFileUpload\",\n \"angucomplete-alt\",\n \"clrFilter\",\n \"clrStaticFiles\",\n \"clrNavigation\",\n \"clrPhoneNumbers\",\n \"clrLocation\",\n \"clrProvider\",\n \"clrRaven\",\n \"clrRequest\",\n \"clrConstant\",\n \"clrModal\",\n \"clrVideo\",\n \"clrStripe\",\n \"clrGeographical\",\n \"clrWaffle\",\n \"coreDirectives\",\n /**\n * benefits module are related to routes like `https://staging.color.com/go/jefferson`\n * Google Analytics:\n * https://analytics.google.com/analytics/web/#/report/content-engagement-flow/a50707607w93103344p96946678/_r.segment-0=~2Fgo~2F&_r.segment-0-matchType=BEGINS_WITH&_r.segment-0-name=~2Fgo~2F&_r.dimension=analytics.landingPagePath&_r.steps=13\n * The routes were referenced in `$COLOR_ROOT/src/django_apps/frontend/app/modules/marketing/marketing.module.js`\n */\n require(\"src/django_apps/benefits/js\").name,\n require(\"src/django_apps/home/js\").name,\n require(\"src/django_apps/results/static/js/results\").name,\n require(\"src/django_apps/core/static/js/clr_a11y.module\").name,\n require(\"src/django_apps/users/js\").name,\n require(\"src/django_apps/users/js/accounts\").name,\n require(\"src/django_apps/users/js/insights\").name,\n \"healthProfileDirectives\",\n \"healthProfileFilter\",\n \"healthProfileResource\",\n require(\"src/django_apps/counseling/js\").name,\n \"physicianResource\",\n \"reportModal\",\n \"resultResource\",\n \"resultService\",\n require(\"src/django_apps/kit_orders/js\").name,\n require(\"src/django_apps/kit_registrations/js\").name,\n require(\"src/django_apps/ordering_physicians/js\").name,\n require(\"src/django_apps/results_v2/js\").name,\n \"familyTestingDirectives\",\n \"familyTestingFilters\",\n \"familyTestingServices\",\n require(\"src/django_apps/files/js\").name,\n require(\"src/django_apps/counseling/js/schedulizer/services\").name\n ]);\n\n app.config([\n \"colorRouteProvider\",\n \"$httpProvider\",\n \"$locationProvider\",\n function(colorRouteProvider, $httpProvider, $locationProvider) {\n $locationProvider.hashPrefix(\"!\").html5Mode({\n enabled: true\n });\n\n // Set defaults for meta title/description/image\n colorRouteProvider.setMetaTagDefaults({\n title: \"Color | Realize the promise of population genomics\",\n description:\n \"Color Population Health is the industry leading, genetics-driven platform that enables personalized care delivery to improve health at scale.\",\n image: cdnify(\"social/logo_opaque_padded.png\")\n });\n\n /*\n * Route configs:\n * - auth:\n * - requireLogin (defualt: true)\n * - requireAnonymous (default: false)\n * - requireEmailConfirmation (default: requireLogin)\n * - requireSex (default: false)\n * - requireHealthHistoryCompleted (default: false)\n * - navigation:\n * - showRight (default: true)\n * - showLeft (default: true)\n * - affixed (default: false)\n * - showSignInAsButton (default: false)\n * - showStore (default: true)\n * - setCurrentProgress (default: false)\n * - currentStepProgress (default: false)\n * - active (default: false)\n * - subnavActive (default: false)\n * - showPromoBanner (default: false)\n * - showPromoBannerType (default: false)\n * - layout (default: standard)\n */\n\n colorRouteProvider\n // 404\n .when(\"/404\", {\n templateUrl: \"/404.html\",\n seo: {\n title: \"Page Not Found - Color\",\n description: \"\"\n },\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n }\n })\n\n // Video Scripts\n // FIXME: Google analytics show no access to `/video` routes. These probably can be deleted.\n // Search example, shows starts with `/go`, but nothing that starts with `/video`\n // https://analytics.google.com/analytics/web/#/report/content-engagement-flow/a50707607w93103344p96946678/_r.segment-0=~2Fgo~2F&_r.segment-0-matchType=BEGINS_WITH&_r.segment-0-name=~2Fgo~2F&_r.dimension=analytics.landingPagePath&_r.steps=13&_r.segment-1=~2Fvideo&_r.segment-1-matchType=BEGINS_WITH&_r.segment-1-name=video/\n .when(\n \"/video/about-genetic-testing-script/hereditary-high-cholesterol-test\",\n {\n templateUrl: \"/video/about_genetic_testing_script.html\",\n seo: {\n title:\n \"About Genetic Testing for Hereditary High Cholesterol Test - Color\",\n description:\n \"Useful information about genetic testing for hereditary high cholesterol test at Color.\"\n },\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n navigation: {\n showLeft: false,\n showRight: false,\n layout: \"minimum\"\n }\n }\n )\n .when(\"/video/about-genetic-testing-script/the-color-test\", {\n templateUrl: \"/video/about_genetic_testing_script.html\",\n seo: {\n title: \"About Genetic Testing for The Color Test - Color\",\n description:\n \"Useful information about genetic testing for the Color test at Color.\"\n },\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n navigation: {\n showLeft: false,\n showRight: false,\n layout: \"minimum\"\n }\n })\n .when(\"/video/about-genetic-testing-script/hereditary-cancer-test\", {\n templateUrl: \"/video/about_genetic_testing_script.html\",\n seo: {\n title: \"About Genetic Testing for Hereditary Cancer Test - Color\",\n description:\n \"Useful information about genetic testing for hereditary cancer test at Color.\"\n },\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n navigation: {\n showLeft: false,\n showRight: false,\n layout: \"minimum\"\n }\n })\n .when(\n \"/video/about-genetic-testing-script/breast-ovarian-cancer-test\",\n {\n templateUrl: \"/video/about_genetic_testing_script.html\",\n seo: {\n title:\n \"About Genetic Testing for Breast Ovarian Cancer Test - Color\",\n description:\n \"Useful information about genetic testing for breast and ovarian cancer test at Color.\"\n },\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n navigation: {\n showLeft: false,\n showRight: false,\n layout: \"minimum\"\n }\n }\n )\n .when(\"/video/about-genetic-testing-script/brca-test\", {\n templateUrl: \"/video/about_genetic_testing_script.html\",\n seo: {\n title: \"About Genetic Testing for BRCA Test - Color\",\n description:\n \"Useful information about genetic testing for BRCA Test at Color.\"\n },\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n navigation: {\n showLeft: false,\n showRight: false,\n layout: \"minimum\"\n }\n })\n .when(\n \"/video/about-genetic-testing-script/hereditary-heart-health-test\",\n {\n templateUrl: \"/video/about_genetic_testing_script.html\",\n seo: {\n title:\n \"About Genetic Testing for Hereditary Heart Health Test - Color\",\n description:\n \"Useful information about genetic testing for hereditary heart health test at Color.\"\n },\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n navigation: {\n showLeft: false,\n showRight: false,\n layout: \"minimum\"\n }\n }\n )\n .when(\n \"/video/about-genetic-testing-script/tier-1-hereditary-conditions-test\",\n {\n templateUrl: \"/video/about_genetic_testing_script.html\",\n seo: {\n title:\n \"About Genetic Testing for Tier 1 Hereidtary Conditions Test - Color\",\n description:\n \"Useful information about genetic testing for tier 1 hereditary conditions test at color.\"\n },\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n navigation: {\n showLeft: false,\n showRight: false,\n layout: \"minimum\"\n }\n }\n )\n // June, 2017: We changed video script paths so we are redirecting the following legacy paths.\n .when(\"/video/about-genetic-testing-script\", {\n redirectTo:\n \"/video/about-genetic-testing-script/hereditary-cancer-test\"\n })\n .when(\"/video/about-genetic-testing-script-breast-ovarian-19\", {\n redirectTo:\n \"/video/about-genetic-testing-script/breast-ovarian-cancer-test\"\n })\n\n .when(\"/consent/routing-authorization\", {\n templateUrl: \"/users/routing_authorization.html\",\n seo: {\n title: \"Employer Benefits - Consent\",\n description: \"\"\n },\n controller: \"RoutingAuthorizationController\",\n auth: {\n requireEmailConfirmation: false\n },\n navigation: { blue: true }\n })\n .when(\"/getkits\", {\n redirectTo: function() {\n return \"/support/question?issue=RequestKitsOffice\";\n }\n })\n .when(\"/wisdomstudy/informed-consent\", {\n templateUrl: \"/home/wisdom/consent.html\",\n seo: {\n title: \"Informed Consent - Color\",\n description: \"Read Color's informed consent.\"\n },\n controller: \"HomeStaticController\",\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n }\n })\n // This URL is used in actual kit package. Be careful if you are changing this.\n .when(\"/wisdomstudy\", {\n redirectTo: function() {\n return \"/react/genetics/activate\";\n }\n })\n .when(\"/wisdomstudy/complete\", {\n templateUrl: \"/kit_registrations/complete.html\",\n seo: {\n title: \"Activate your Color kit - Color\",\n description: \"\"\n },\n controller: \"ActivationCompleteController\",\n auth: { loginPath: \"/react/create-account\" },\n navigation: {\n blue: true,\n subnavActive: \"activate\"\n },\n resolve: resolvers.kitStatus\n })\n\n .when(\"/family-testing/create-account\", {\n templateUrl: \"/family_testing/account_creation.html\",\n controller: \"FamilyTestingAccountCreationController\",\n auth: {\n requireLogin: false\n }\n })\n .when(\"/family-testing/enroll\", {\n templateUrl: \"/family_testing/enroll_templates.html\",\n controller: \"FamilyTestingInitializationController\",\n auth: {\n loginPath: \"/react/create-account\",\n requireEmailConfirmation: false\n },\n navigation: {\n blue: true\n },\n resolve: resolvers.familyTestingEligibility\n })\n .when(\"/family-testing/enroll/results\", {\n templateUrl: \"/family_testing/results.html\",\n seo: {\n title: \"Enroll in Color's Family Testing Program - Color\",\n description: \"\"\n },\n controller: \"FamilyTestingResultsController\",\n auth: {\n loginPath: \"/react/create-account\",\n requireEmailConfirmation: false\n },\n navigation: {\n blue: true,\n subnavCompact: true,\n showLeft: false\n }\n })\n .when(\"/family-testing/enroll/relatives\", {\n templateUrl: \"/family_testing/relatives.html\",\n seo: {\n title: \"Enroll in Color's Family Testing Program - Color\",\n description: \"\"\n },\n controller: \"FamilyTestingRelativesController\",\n auth: {\n loginPath: \"/react/create-account\",\n requireEmailConfirmation: false\n },\n navigation: {\n blue: true,\n subnavCompact: true,\n showLeft: false\n }\n })\n .when(\"/family-testing/enroll/review\", {\n templateUrl: \"/family_testing/review.html\",\n seo: {\n title: \"Enroll in Color's Family Testing Program - Color\",\n description: \"\"\n },\n controller: \"FamilyTestingReviewController\",\n auth: {\n loginPath: \"/react/create-account\",\n requireEmailConfirmation: false\n },\n navigation: {\n blue: true,\n subnavCompact: true,\n showLeft: false\n }\n })\n .when(\"/family-testing/enroll/confirmation\", {\n templateUrl: \"/family_testing/confirmation.html\",\n seo: {\n title: \"Enroll in Color's Family Testing Program - Color\",\n description: \"\"\n },\n controller: \"FamilyTestingConfirmationController\",\n navigation: {\n blue: true\n },\n auth: {\n loginPath: \"/react/create-account\",\n requireEmailConfirmation: false\n }\n })\n .when(\"/family-testing/enroll/reviewing\", {\n templateUrl: \"/family_testing/reviewing.html\",\n seo: {\n title: \"Enroll in Color's Family Testing Program - Color\",\n description: \"\"\n },\n auth: { requireLogin: false }\n })\n .when(\"/family-testing/enroll/complete\", {\n templateUrl: \"/family_testing/complete.html\",\n seo: {\n title: \"Enroll in Color's Family Testing Program - Color\",\n description: \"\"\n },\n navigation: {\n blue: true\n },\n auth: { requireLogin: false }\n })\n .otherwise({ redirectTo: \"/react\" }); // Redirect to react page to route if not angular page\n // IE caches the XHR requests. In order to avoid this, we set an HTTP response header to mimic default behaviors of moderns browsers.\n $httpProvider.defaults.headers.common[\"Cache-Control\"] = \"no-cache\";\n // Configure CSRF.\n $httpProvider.defaults.xsrfHeaderName = \"X-CSRFToken\";\n $httpProvider.defaults.xsrfCookieName = angular\n .element(\"#csrf-cookie-name\")\n .val();\n }\n ]);\n\n app.config([\n \"$translateProvider\",\n \"$translatePartialLoaderProvider\",\n function($translateProvider, $translatePartialLoaderProvider) {\n $translateProvider.useLoader(\"$translatePartialLoader\", {\n urlTemplate: function(part, lang) {\n const elem = document.getElementById(\n \"i18n-\" + part + \"-\" + lang + \"-url\"\n );\n return elem.value;\n }\n });\n $translatePartialLoaderProvider.addPart(\"core\");\n $translatePartialLoaderProvider.addPart(\"static\");\n $translatePartialLoaderProvider.addPart(\"ordering_physicians\");\n $translateProvider.use(\"en\");\n $translateProvider.useSanitizeValueStrategy(\"sanitizeParameters\");\n $translateProvider.useMissingTranslationHandler(\n \"sentryTranslateExceptionHandler\"\n );\n }\n ]);\n\n // angular ui-mask settings\n app.config([\n \"uiMask.ConfigProvider\",\n \"device\",\n function(uiMaskConfigProvider, device) {\n uiMaskConfigProvider.clearOnBlur(false);\n uiMaskConfigProvider.clearOnBlurPlaceholder(true);\n // Fixes Android-only keyboard issues with cursor position while typing, happens on accession/barcode/telephone input (https://github.com/angular-ui/ui-mask/issues/141)\n // Backspace behind a masking character does not work, no idea how to fix (https://github.com/angular-ui/ui-mask/issues/123)\n if (device.isAndroid) {\n uiMaskConfigProvider.eventsToHandle([\"keyup\", \"click\", \"focus\"]);\n }\n }\n ]);\n\n // angular-scroll settings\n app.value(\"duScrollDuration\", 900).value(\"duScrollOffset\", 68);\n\n app.run([\n \"$rootScope\",\n \"$anchorScroll\",\n \"$document\",\n \"$filter\",\n \"$translate\",\n \"auth\",\n \"navigation\",\n \"KitCheckoutFlow\",\n \"sampleReuseFlow\",\n \"PhysicianOrderFormFlow\",\n \"ProviderAccountFlow\",\n \"FamilyTestingFlow\",\n \"routeHistory\",\n \"waffle\",\n \"ProviderFamilyTestingFlow\",\n \"a11y\",\n function(\n $rootScope,\n $anchorScroll,\n $document,\n $filter,\n $translate,\n auth,\n navigation,\n KitCheckoutFlow,\n sampleReuseFlow,\n PhysicianOrderFormFlow,\n ProviderAccountFlow,\n FamilyTestingFlow,\n routeHistory,\n waffle,\n ProviderFamilyTestingFlow,\n a11y\n ) {\n // Experimental stripped Turbo landing page needs to have an auth\n // set for the payment flow, so check referrer to match the navigation service\n // setter in our routes\n const referrerUrl = $document[0].referrer.split(\"/\");\n // All the Turbo experimental page routes begin with /t/\n if (referrerUrl[3] == \"t\") {\n // This property enables various flags inside the purchase flow\n auth.isAds = true;\n }\n\n // Comfortable offset that clears clr-tab navigation as well as card top padding/margin\n $anchorScroll.yOffset = 80;\n\n $rootScope.waffle = waffle;\n\n $rootScope[\"static\"] = $filter(\"static\");\n\n // Required event bind for async translation bundle loading\n // https://angular-translate.github.io/docs/#/guide/12_asynchronous-loading\n $rootScope.$on(\"$translatePartialLoaderStructureChanged\", function() {\n $translate.refresh();\n });\n\n $rootScope.$on(\"$routeChangeStart\", function(event, next) {\n /* eslint-disable angular/no-private-call */\n if (!next || !next.$$route) {\n return;\n }\n\n ProviderAccountFlow.route(next.$$route.originalPath);\n KitCheckoutFlow.route(next.$$route.originalPath);\n sampleReuseFlow.route(next.$$route.originalPath);\n PhysicianOrderFormFlow.route(next.$$route.originalPath);\n ProviderFamilyTestingFlow.route(next.$$route.originalPath);\n FamilyTestingFlow.route(next.$$route.originalPath);\n navigation.reset(next.$$route.navigation);\n routeHistory.push(next.$$route.originalPath);\n /* eslint-enable angular/no-private-call */\n });\n\n $rootScope.$on(\"$routeChangeSuccess\", function(event, next) {\n // add aria label and role to images on page load\n a11y.labelImages();\n });\n }\n ]);\n\n // TODO: refactor common services into a generic module to be included by\n // both www and clinical JS apps.\n\n app.factory(\"colorAuthRouteFilter\", [\n \"authRouteFilter\",\n \"associatedSample\",\n function(authRouteFilter, associatedSample) {\n return authRouteFilter(\n \"/sign-in\",\n \"/react/dashboard\",\n \"/react/email-confirmation-required\",\n \"/\",\n \"/select-sex\",\n \"/providers/home\",\n \"/consent/routing-authorization\",\n associatedSample\n );\n }\n ]);\n\n app.config([\n \"ngToastProvider\",\n function(ngToastProvider) {\n ngToastProvider.configure({\n animation: \"fade\",\n maxNumber: 1,\n timeout: 15000\n });\n }\n ]);\n\n // Angular prepends \"unsafe\" tag in ng-href to prevent XSS\n // Add blob to allow for blob downloads\n app.config(function($compileProvider) {\n \"ngInject\";\n $compileProvider.aHrefSanitizationWhitelist(\n /^\\s*(https?|ftp|mailto|blob):/\n );\n });\n\n // Due to Angularjs 1.6 upgrade, bindings are no longer available in controller contructors\n // when running $compile. Turn pre-assigned bindings back on.\n app.config(function($compileProvider) {\n \"ngInject\";\n $compileProvider.preAssignBindingsEnabled(true);\n });\n\n app.factory(\"routeHistory\", function() {\n return [];\n });\n})();\n","const controllers = angular.module('benefitsControllers', [])\n .controller('BenefitsController', require('./controllers/benefits_controller'))\n\nconst modals = angular.module('benefitsModal', ['ui.bootstrap', 'ngToast'])\n .factory('AuthenticationFactorsModal', require('./modals/authentication_factors'))\n .factory('EmailAuthenticationModal', require('./modals/email_authentication'))\n .factory('UpgradePromptModal', require('./modals/upgrade_prompt'))\n .factory('RoutingAuthorizationModal', require('./modals/routing_authorization'))\n\nconst services = angular.module('benefitsServices', [])\n .service('receivedPromoCode', require('./services/received_promo_code'))\n .service('benefitsEmployeePageOptions', require('./services/benefits_employee_page_options'))\n\nconst directives = angular.module('benefitsDirectives', [])\n .directive('routingAuthorization', require('./directives/routing_authorization'))\n\nmodule.exports = angular.module('benefits', [\n controllers.name,\n modals.name,\n services.name,\n directives.name\n])\n","const props = require('./benefits_props')\n\nmodule.exports = function($rootScope, $scope, $http, $location, $routeParams,\n requestErrorToast, benefitsEmployeePageOptions,\n AuthenticationFactorsModal, EmailAuthenticationModal, sku, testTypes) {\n 'ngInject'\n $scope.props = props\n\n $scope.values = {\n identifiers: []\n }\n\n const getIdentifier = () => {\n // Identifiers can be split into two different fields like first_name, last_name. Join them together before submitting\n return $scope.values.identifiers.join('').replace(/'/g, '')\n }\n\n const claimBenefitsErrorHandler = (response) => {\n const identifier = getIdentifier()\n\n // Employer does not cover Color Test\n if (response.status === 404) {\n $scope.values.identifierNotFound = true\n // Request authentication\n } else if (response.status === 400 && response.data.auth_factors) {\n delete $scope.values.identifierNotFound\n AuthenticationFactorsModal.open(\n identifier,\n response.data.auth_factors,\n $scope.options.concatAuthFactors,\n $scope.options.organization_name\n )\n // Show error\n } else {\n requestErrorToast(response)\n }\n }\n\n $scope.submitIdentifier = () => {\n $scope.submitting = true\n const identifier = getIdentifier()\n let organization_name = null\n if ('organization_name' in $scope.options){\n organization_name = $scope.options.organization_name\n }\n\n // PC-1449 Note: $scope.options.authFactors will always be null since no population\n // has this configured any longer. Leaving this code alone since it will be dead code\n // once populations are all migrated over to the new React-based genetics kit flow.\n if ($scope.options.authFactors) {\n AuthenticationFactorsModal.open(\n identifier,\n $scope.options.authFactors,\n $scope.options.concatAuthFactors,\n $scope.options.organization_name\n )\n $scope.submitting = false\n return\n }\n\n const nonCovidSkus = Object.keys(sku).filter((s) => s != testTypes.covid19)\n\n const data = { identifier, organization_name, skus: nonCovidSkus }\n\n return $http.post('api/v1/claim_benefits', data, { skipErrorToast: true })\n .then(response => {\n const discountType = response.data.discount_type\n EmailAuthenticationModal.open(identifier, discountType)\n }).catch(response => {\n claimBenefitsErrorHandler(response)\n }).finally(() => {\n $scope.submitting = false\n })\n }\n\n // Load email authentication w/ promo code input.\n const submitted = $location.path() == '/benefits/employees/code'\n if (submitted) {\n EmailAuthenticationModal.open()\n }\n\n // Variable page content based on the company\n const path = $location.path()\n const pathToCompanyMap = (path) => {\n const paths = {\n '/go/aetna': 'aetna',\n '/go/cadence': 'cadence',\n '/go/cdw': 'cdw',\n '/go/epicgames': 'epicgames',\n '/go/hbc': 'hbc',\n '/homedepot': 'homedepot',\n '/go/levistrauss': 'levistrauss',\n '/go/sap': 'sap',\n '/go/qualtrics': 'sap',\n '/go/sapcanada': 'sapcanada',\n '/go/mubadala': 'mubadala',\n '/go/jefferson': 'jefferson',\n '/go/alaskarailroad': 'alaskarailroad',\n '/go/sequoiaconsultinggroup': 'sequoiaconsultinggroup',\n '/ohana': 'salesforce',\n '/go/ohana': 'salesforce',\n '/go/totalrewards': 'ejgallo',\n '/go/shamrockfoods': 'shamrockfoods',\n '/go/biltmore': 'biltmore',\n '/go/biltmore-claim': 'biltmore_claim',\n '/go/ocra': 'ocra',\n }\n return paths.hasOwnProperty(path) ? paths[path] : $routeParams.company\n }\n\n $scope.options = benefitsEmployeePageOptions(pathToCompanyMap(path))\n $scope.showMedications = !$scope.options.sku || $scope.options.sku.testTypes.indexOf('pgx v1') != -1\n Object.assign($scope.props, $scope.options.propsOverlay)\n\n $rootScope.metatags['title'] = $scope.options.routeTitle\n $rootScope.metatags['description'] = $scope.options.routeDescription\n $rootScope.metatags['url'] = $location.url()\n // TODO: Do we do anything with layouts? There are 3, with cadence being unique\n // TODO: How do we handle Salesforce and Aetna?\n}\n","module.exports = {\n hero: {\n title: 'Color and Your Health',\n buttonText: 'Get Started'\n },\n sectionValuePropositions: {\n title: 'A personalized approach to prevention and health management',\n subtitle: 'Color’s confidential service helps you better understand your hereditary risks, helping you, and possibly your family, lead a healthier life.',\n items: [\n {\n image: 'illo_NegativeResults',\n heading: 'Actionable results',\n paragraph: 'Your results can help you and your doctor create a personalized screening and health management plan.'\n },\n {\n image: 'illo_GCTalk',\n heading: 'Personal guidance',\n paragraph: 'Get complimentary access to our board-certified genetic counselors to help you understand your results.'\n },\n {\n image: 'illo_ScreenLock',\n heading: 'Confidential information',\n paragraph: 'We take privacy very seriously and your personally identifiable information will not be shared with your employer without your consent.'\n },\n ],\n },\n sectionHealthAreas: {\n title: 'From a simple saliva sample, you can learn potentially life-changing information',\n subtitle: 'Clinical information to help make choices about your health with your doctor.',\n image: 'illo_CancerHeartMedication',\n showHereditary: true,\n showCardio: true,\n },\n\n sectionDiscovery: {\n title: 'Discover fun, genetic insights about yourself',\n subtitle: 'Take a glimpse into what your genes can reveal. Color Discovery is not yet available in countries outside the US.',\n items: [\n {\n heading: 'How well do you digest dairy products?',\n image: 'illo_Lactose',\n },\n {\n heading: 'Did you know that your genes determine earwax type?',\n image: 'illo_Earwax',\n },\n {\n heading: 'Are you likely to love or hate cilantro?',\n image: 'illo_Cilantro',\n },\n ]\n },\n sectionFamily: {\n reverse: true,\n title: 'When you learn, your family can benefit too',\n subtitle: 'Because genes are passed down through families, what you learn could also provide insights for your relatives.',\n backgroundImage: 'img_MomKidsTable',\n },\n sectionClientVideos: {\n title: '',\n quotes: [\n {\n image: 'img_Robin',\n kicker: 'Robin shares why he believes in the power of genetic testing for prostate cancer.',\n text: 'I want my whole family to be tested by Color, because I am interested in their futures and I want their futures to be bright.”',\n author: 'Robin Cole, Two-time Super Bowl champion, prostate cancer survivor',\n video: {\n cta: 'Hear Robin’s Story',\n name: 'storiesRobin',\n },\n },\n {\n image: 'img_Marissa',\n kicker: 'Marissa, who was adopted, put together missing pieces in her health history',\n text: 'The fact that my company offered this to employees is incredible. It really shows how much they care about employee well being.”',\n author: 'Marissa, employee, BRCA2 positive',\n video: {\n cta: 'Hear Marissa’s Story',\n name: 'benefitsMarissaStory',\n },\n },\n ],\n },\n sectionHowItWorks: {\n title: 'Here’s how Color works',\n items: [\n {\n heading: 'Claim your Color benefit online and create an account to request your kit.',\n },\n {\n heading: 'Provide a saliva sample and drop your kit in the mail.',\n },\n {\n heading: 'Get an email when your results are ready in 3-4 weeks.',\n },\n {\n heading: 'Meet with our genetic counselors.',\n },\n {\n heading: 'Create a screening and prevention plan with your healthcare provider.',\n },\n ],\n },\n sectionPurchase: {\n title: 'Ready to get Color?',\n body: 'Get to know what your genes say about your risk for common hereditary cancers and heart conditions, plus how your body processes certain medications. Questions? Get in touch at support@color.com.',\n cta: 'Get Started',\n ctaHref: '#email_action',\n },\n}\n","function AuthenticationFactorsController($scope, $http, $location, $modalInstance, requestErrorToast, claimStore, identifier, organization_name, authFactorsNeeded, concatAuthFactors, receivedPromoCode) {\n 'ngInject'\n $scope.authFactorsNeeded = authFactorsNeeded\n $scope.authFactors = {}\n\n $scope.submitAuthFactors = () => {\n // Teamsters doesn't give their employees emails so we have to de-dupe on first_name,\n // last_initial, zip, and dob by combining them into the identifier\n const request = {\n identifier: concatAuthFactors ? identifier + authFactorsNeeded.map(key => $scope.authFactors[key]).join('') : identifier,\n factors: $scope.authFactors,\n organization_name: organization_name,\n }\n\n $http.post('api/v1/claim_benefits', request, { skipErrorToast: true })\n .then(response => {\n if (response.data.code) {\n receivedPromoCode(response.data.code)\n }\n if (response.data.token) {\n receivedClaimToken(response.data.token)\n }\n }).catch(response => {\n if (response.status == 400) {\n $scope.authFactorsInvalid = true\n } else {\n requestErrorToast(response)\n }\n })\n }\n\n const receivedClaimToken = (token) => {\n claimStore.clearClaim()\n return claimStore.getClaim(token).then(claim => {\n if (!claim) {\n return\n }\n\n const skuDiscounts = claim.sku_discounts\n if (skuDiscounts && skuDiscounts.length === 1) {\n $location.path('/purchase').search({sku: skuDiscounts[0].sku})\n } else {\n $location.hash('pricing')\n $location.path('/product/compare-genetic-tests')\n }\n $modalInstance.close()\n })\n }\n}\n\nmodule.exports = ($modal) => {\n 'ngInject'\n\n return {\n open: (identifier, authFactorsNeeded, concatAuthFactors, organization_name) => {\n return $modal.open({\n templateUrl: '/benefits/modals/authentication_factors.html',\n controller: AuthenticationFactorsController,\n size: 'md',\n resolve: {\n identifier: () => identifier,\n authFactorsNeeded: () => authFactorsNeeded,\n concatAuthFactors: () => concatAuthFactors,\n organization_name: () => organization_name,\n }\n })\n }\n }\n}\n","function EmailAuthenticationController($scope, $http, $modalInstance, requestErrorToast, email, discountType, receivedPromoCode) {\n 'ngInject'\n $scope.values = {}\n $scope.email = email\n $scope.discountType = discountType\n\n $scope.submitCode = () => {\n $scope.submitting = true\n receivedPromoCode($scope.values.code)\n .then(response => {\n $modalInstance.close()\n })\n .catch(response => {\n requestErrorToast(response)\n })\n .finally(() => {\n $scope.submitting = false\n })\n }\n\n $scope.resendEmail = () => {\n $http.post('api/v1/claim_benefits', { identifier: email }, { skipErrorToast: true })\n .then(response => {\n $scope.resentEmail = true\n })\n .catch(response => {\n requestErrorToast(response)\n })\n }\n}\n\nmodule.exports = ($modal) => {\n 'ngInject'\n\n return {\n open: (email, discountType) => {\n return $modal.open({\n templateUrl: '/benefits/modals/email_authentication.html',\n controller: EmailAuthenticationController,\n size: 'md',\n resolve: {\n email: () => email,\n discountType: () => discountType\n }\n })\n }\n }\n}\n","function PurchaseForWhoController($scope, $http, $modalInstance, $location, claimStore, requestErrorToast, sku, pricingModifier, sampleReuseService) {\n 'ngInject'\n\n $scope.nonUpgradePrice = sku.priceDollars\n const claim = claimStore.claim\n if (claim && claim.remaining_redemptions_count > 0) {\n const discount = claimStore.getNonUpgradeSkuDiscount(sku)\n $scope.nonUpgradePrice = discount.copay_cents / 100.0\n $scope.organizationName = discount.organization_name\n } else if (pricingModifier) {\n $scope.isPricingModifier = true\n $scope.upgradePrice = sku.priceDollars + (pricingModifier.price_cents / 100)\n } else if (!claim && !pricingModifier) {\n $scope.noClaim = true\n }\n\n $scope.continue = function() {\n if ($scope.upgrade.recipient == 'self') {\n // If sample reuse is possible, go through that flow instead.\n if (sampleReuseService.eligibleForReuse(sku.name)) {\n $location.path('/sample-reuse/pay').search({sku: sku.name})\n } else {\n $location.path('/purchase/ordering-physician').search({sku: sku.name, purchase_for_myself: true})\n }\n } else {\n $location.path('/purchase/ordering-physician').search({sku: sku.name, purchase_for_someone_else: true})\n }\n $modalInstance.dismiss()\n }\n}\n\nfunction PossibleUpgradeController($scope, $http, $modalInstance, $location, $window, claimStore, requestErrorToast, sku) {\n 'ngInject'\n\n const claim = claimStore.claim\n\n if (!angular.isUndefined(claim.remaining_redemptions_count)) {\n $scope.remainingRedemptions = claim.remaining_redemptions_count\n }\n\n $scope.loginPath = '/react/sign-in' + '?next=' + encodeURIComponent($location.url())\n\n $scope.continue = function() {\n if ($scope.upgrade.choice == 'upgrade') {\n $location.url($scope.loginPath)\n $modalInstance.dismiss()\n } else {\n $modalInstance.dismiss()\n }\n }\n}\n\nmodule.exports = ($modal, $location, auth, claimStore) => {\n 'ngInject'\n\n const UpgradePromptFunction = function() {\n this.openPurchaseForWhoModal = (sku, pricingModifier) => {\n return $modal.open({\n templateUrl: '/benefits/modals/purchase_for_who.html',\n controller: PurchaseForWhoController,\n size: 'md',\n resolve: {\n sku: () => sku,\n pricingModifier: () => pricingModifier\n }\n })\n },\n\n this.openPossibleUpgradeModal = (sku) => {\n // Modal to show user they might have upgrade available if they sign-in\n return $modal.open({\n templateUrl: '/benefits/modals/upgrade_possible.html',\n controller: PossibleUpgradeController,\n size: 'md',\n resolve: {\n sku: () => sku,\n }\n })\n },\n\n this.checkAndOpen = (sku) => {\n const params = $location.search()\n // Check if data-upgrade is possible. If so: first do that\n if (!params.purchase_for_someone_else && !params.purchase_for_myself) {\n // For clients, see if they can upgrade to OC\n if (auth.isLoggedIn) {\n const modifier = auth.currentUser.pricing_modifiers[sku.name]\n if (modifier && (modifier.name == 'combo_upgrade_modifier' || modifier.name == 'entry_upgrade_modifier')) {\n this.openPurchaseForWhoModal(sku, modifier)\n return\n }\n }\n }\n\n // For logged out users with Benefits Claim. Offer modal suggesting there may be upgrade available\n if (!auth.isLoggedIn) {\n claimStore.getClaim().then( (claim) => {\n if (claim && claim.upgrades_available > 0) {\n this.openPossibleUpgradeModal(sku)\n return\n }\n })\n }\n }\n }\n return new UpgradePromptFunction()\n}\n","function RoutingConsentModalController($scope, setMembershipAndGoToNext, $modalInstance, employer, ngToast, $http) {\n $scope.translateValues = { employer }\n\n const submitConsent = (isConsenting) => {\n $http.post('/api/v1/user_consent', {\n consented: isConsenting, type: 'routing_authorization', scope: employer\n }).then(res => {\n createSuccessfulConsentToast(isConsenting)\n setMembershipAndGoToNext()\n }).catch(err => {\n ngToast.create({ className: 'error', content: \"There was an error. Please contact Support.\" })\n }).finally(() => {\n $modalInstance.close()\n })\n }\n\n $scope.authorize = () => {\n submitConsent(true)\n }\n\n $scope.notAuthorize = () => {\n submitConsent(false)\n }\n\n const createSuccessfulConsentToast = (isConsenting) => {\n if (isConsenting) {\n ngToast.create({ className: 'success', content: `You will receive recommended ${employer} benefits and services on your dashboard.` })\n } else {\n ngToast.create({ className: 'success', content: `You will not receive recommended ${employer} benefits and services on your dashboard.` })\n }\n }\n\n}\n\nmodule.exports = ($modal) => {\n 'ngInject'\n return {\n open: function(employer, setMembershipAndGoToNext) {\n return $modal.open({\n templateUrl: '/benefits/modals/routing_authorization.html',\n controller: RoutingConsentModalController,\n size: 'lg',\n resolve: {\n employer: () => {\n return employer\n },\n setMembershipAndGoToNext: () => {\n return setMembershipAndGoToNext\n }\n }\n })\n }\n }\n}\n","/**\n * @ngdoc service\n * @name receivedPromoCode\n *\n * @description\n * The `receivedPromoCode` handles promo code routing within the benefits flow.\n */\n\nmodule.exports = ($location, promoCodeStore, DependentsClaimManager) => {\n 'ngInject'\n\n return (promoCode) => {\n promoCodeStore.clear()\n return promoCodeStore.updateCode(promoCode, true)\n .then(() => {\n if (!promoCodeStore.promotionalCode.can_redeem && !DependentsClaimManager.canAddFamilyMember(false)) {\n return\n }\n\n promoCodeStore.persistCode(promoCode)\n\n const skuList = promoCodeStore.promotionalCode.sku_list\n if (skuList && skuList.length === 1) {\n $location.path('/purchase').search({sku: skuList[0]})\n } else {\n $location.hash('pricing')\n $location.path('/product/compare-genetic-tests')\n }\n })\n }\n}\n","/**\n * @ngdoc service\n * @name benefitsEmployeePageOptions\n *\n * @description\n * Returns values for benefits employee page based on the company\n */\n\nmodule.exports = (sku) => {\n 'ngInject'\n\n return (companyName) => {\n const titles = {\n default: \"Personalize your health\",\n hereditary: \"Get your Color Hereditary Cancer Test\",\n }\n\n const defaultOptions = {\n routeTitle: 'Get Your Color Test - Color Benefits Program',\n routeDescription: 'Ready to personalize your health? Please enter your work email address to claim your Color benefit at the special price supported by your employer.',\n heroTitle: titles.default,\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter your work email address to claim your Color benefit.',\n heroDescription2: '',\n isAcceptingEnrollments: true,\n buttonText: 'Get started',\n // Determines placeholder text of input element. If more than one placeholder is added, multiple inputs will be shown.\n inputPlaceholders: ['Enter your work email'],\n img: 'img--box_sleeve',\n // Teamsters doesn't give their employees emails so we have to de-dupe on first_name,\n // last_initial, zip, and dob by combining them into the identifier\n // setting authFactors avoids a backend call to a whitelist_entry if all whitelists use the same auth factor.\n authFactors: null,\n // concatAuthFactors appends the auth factors into the identifier to keep it unique\n concatAuthFactors: false,\n showValuePropositions: true,\n showHealthAreas: true,\n showDiscovery: true,\n showFamily: true,\n showClientVideos: true,\n showHowItWorks: true,\n showPurchase: true,\n // Overwrites page props via Object.assign\n propsOverlay: {},\n // Some employers want to show test specific information. Setting this shows a pop up video modal.\n sku: null\n }\n\n const getOptions = (companyName) => {\n const options = {\n aetna: {\n routeDescription: 'Aetna is offering you the Color Benefits Program.',\n heroTitle: titles.hereditary,\n heroDescription: 'Please enter your work email address to get your Color Test at the special price supported by The Aetna Harvest Program. When you create your Color account, you can use your personal email address.',\n },\n cadence: {\n routeDescription: 'UnitedHealthcare and Cadence are offering you the Color Benefits Program. Through the Program, UnitedHealthcare and Cadence are covering 100% of the cost of the Color Test.',\n heroDescription: 'This pilot is now closed, thank you for your interest.',\n isAcceptingEnrollments: false,\n },\n epicgames: {\n routeDescription: 'Epic Games is offering you the Color Benefits Program.',\n heroDescription: 'Please enter your work email address to redeem your complimentary Color Tests courtesy of Epic Games. This benefit is available to full-time employees in US, UK, Canada, Japan, Poland, Sweden, and Switzerland, and their spouses/partners. We recommend you provide your personal email address when creating your Color account.',\n organization: 'Epic Games',\n },\n hbc: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications?

Please enter your HBC email (\\'name@hbc.com\\' or \\'name@lordandtaylor.com\\') in the field below to claim your Color benefit. If you do not have an HBC email, please enter your associate ID.',\n inputPlaceholders: ['Enter your work email or associate ID'],\n organization_name: 'Hudson\\'s Bay Company',\n },\n homedepot: {\n routeDescription: 'Home Depot is offering you the Color Benefits Program. Through the Program, Home Depot is covering 100% of the cost of the Color Test.',\n heroDescription: 'This program is free for associates working in the Atlanta Store Support Center or other Atlanta area supporting offices. To get started, enter your work email address to authenticate that you are eligible for this benefit. When you create your Color account, you can use your personal email address. Your results are confidential and will not be shared with The Home Depot.',\n },\n levistrauss: {\n routeDescription: 'LS&Co. is offering you the Color Benefits Program.',\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications?

Please enter your work email address to claim your free Color benefit. This benefit only applies to full-time LS&Co. Home Office employees in the US. We recommend you use your personal email address when you create your Color account.',\n organization_name: 'Levi Strauss',\n },\n sap: {\n routeDescription: 'SAP is offering you the Color Benefits Program.',\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter your work email address to claim your Color benefit.

This benefit is available to US-based SAP, Qualtrics, and Concur employees on the SAP medical plan as well as their adult dependents (i.e. spouse/partner + children aged 18-26) on the SAP medical plan.',\n organization_name: 'SAP',\n },\n sapcanada: {\n routeDescription: 'SAP is offering you the Color Benefits Program.',\n heroDescription: 'Please enter your work email address to get your discounted Color test supported by SAP Canada. When you create a Color account, use your personal email address. To purchase additional kits for eligible dependents, simply visit this page again for each additional order.

Veuillez saisir votre adresse de courriel professionnelle pour obtenir votre test Color à prix réduit par SAP Canada. Lorsque vous créez un compte Color, utilisez votre adresse de courriel personnelle. Vous ne pouvez acheter qu’une seule trousse par ouverture de session. Pour acheter des trousses supplémentaires pour des personnes à charge admissibles, allez de nouveau sur cette page pour chaque commande additionnelle.',\n organization_name: 'SAP Canada',\n },\n cdw: {\n heroDescription: 'Please enter your work email address if you wish to claim your Color benefit. By clicking the \"I Consent\" button, you understand and agree that your name will be shared with your employer because they are subsidizing the cost of the test and require this information for tax reporting purposes. However, your personal test results, and whether you choose to use your test kit, will not be shared with your employer.',\n buttonText: 'I consent',\n organization_name: 'CDW',\n },\n salesforce: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter your work email address to claim your Color benefit.',\n img: 'img--salesforce_logo',\n isAcceptingEnrollments: true,\n },\n mubadala: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers to heart conditions? Please enter your work email address to claim your Color benefit.

Mubadala is generously covering 100% of the cost of a Color test for you and one family member.',\n organization_name: 'Mubadala',\n },\n uhc: {\n heroTitle: 'Personalize your health at no cost',\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter the email address that received the offer to claim your Color kit.

This offer is available at no cost to those invited.',\n inputPlaceholders: ['Enter the email address that received the offer'],\n },\n jefferson: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications?

To redeem your free Color kit, please enter your campus key followed by @jefferson.edu. For example, if your campus key is 1234ABCD, please enter: 1234ABCD@jefferson.edu',\n organization_name: 'Jefferson Health',\n },\n alaskarailroad: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications?

Please enter your Alaska Railroad Employee ID in the field below to claim the Color benefit for yourself.

To purchase a discounted Color test for your legal spouse with the AKRRCOLOR code, click here.',\n inputPlaceholders: ['Enter your Employee ID'],\n organization_name: 'Alaska Railroad',\n showValuePropositions: false,\n showHealthAreas: false,\n showDiscovery: false,\n showFamily: false,\n showClientVideos: false,\n showHowItWorks: false,\n showPurchase: false,\n },\n sequoiaconsultinggroup: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications?

Please enter your work email address in the field below to claim the Color benefit for yourself.

To purchase a discounted Color test for your spouse/partner or adult dependent(s) with the SCGCOLOR code, click here.',\n organization_name: 'Sequoia Consulting Group',\n },\n ejgallo: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications?

Please enter your employer issued ID number in the field below to claim the Color benefit for you and your dependents.',\n inputPlaceholders: ['Enter your Employee ID'],\n organization_name: 'E. & J. Gallo Winery and G3'\n },\n shamrockfoods: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications?

Please enter your Associate ID in the field below to claim the Color benefit for yourself and eligible adult dependents.',\n inputPlaceholders: ['Enter your Associate ID'],\n organization_name: 'Shamrock Foods'\n },\n biltmore: {\n heroTitle: 'Get your free Color test and help advance science',\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications?

To redeem your free Color kit, please enter your firstname and lastname in the field below, without capitalization or spaces. For example, if your name is Jane Doe, please enter \\'janedoe\\'.',\n heroDescription2: 'Color and the North Carolina Precision Health Collaborative (NCPHC) are conducting a research study to improve our understanding of the uptake and perception of genetic information. Look for an email with more information.',\n inputPlaceholders: ['Enter your name in lowercase, without spaces'],\n organization_name: 'Biltmore'\n },\n biltmorefarms: {\n heroTitle: 'Get your free Color test and help advance science',\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications?

To redeem your free Color kit, please enter your firstname and lastname in the field below, without capitalization or spaces. For example, if your name is Jane Doe, please enter \\'janedoe\\'.',\n heroDescription2: 'Color and the North Carolina Precision Health Collaborative (NCPHC) are conducting a research study to improve our understanding of the uptake and perception of genetic information. Look for an email with more information.',\n inputPlaceholders: ['Enter your name in lowercase, without spaces'],\n organization_name: 'Biltmore Farms'\n },\n accel: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter your work email address to claim your Color benefit.

Please note that this benefit is available for Accel employees only.',\n organization_name: 'Accel'\n },\n qualtrics: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter your work email address to claim your Color benefit.

Please use your @sap.com email address.',\n img: 'img--qualtrics_logo',\n inputPlaceholders: ['Enter your @sap.com email address'],\n organization_name: 'Qualtrics'\n },\n chicos: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter your work email address to claim your Color benefit.

By clicking the \"I Consent\" button, you have read and accept the Color Genomics Employee Benefit Consent and Release Agreement.',\n organization_name: 'Chicos',\n buttonText: 'I Consent'\n },\n ncbiotech: {\n heroTitle: 'Get your free Color test and help advance science',\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter your work email address to claim your Color.',\n heroDescription2: 'Color and the North Carolina Precision Health Collaborative (NCPHC) are conducting a research study to improve our understanding of the uptake and perception of genetic information. Look for an email with more information.',\n },\n daikin: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter your employee ID to claim your Color benefit.',\n inputPlaceholders: ['Enter your Employee ID'],\n organization_name: 'Daikin'\n },\n arkema: {\n heroDescription: 'Ready to better understand how your genes impact your health, from your risk for common hereditary cancers and heart conditions to how your body might process certain medications? Please enter your A number to claim your Color benefit.',\n inputPlaceholders: ['A number'],\n organization_name: 'Arkema'\n },\n teamsters: {\n heroDescription: '
This page has moved. Please go to https://color.com/teamsters.',\n inputPlaceholders: ['', ''],\n heroTitle: 'This page has moved',\n img: 'img--teamsters_logo',\n buttonText: 'This page has moved. Follow the link above to get started.',\n showValuePropositions: false,\n showFamily: false,\n showHealthAreas: false,\n showDiscovery: false,\n showClientVideos: false,\n showHowItWorks: false,\n showPurchase: false,\n },\n apple: {\n heroTitle: 'AC Wellness Primary Care patients are eligible for Color',\n heroDescription: 'Color is a genetics-based service that you and your AC Wellness provider can use to inform your care plan. Provide your work email address to get started.',\n sku: sku['core 10'],\n propsOverlay: {\n sectionValuePropositions: {\n title: 'A personalized approach to prevention and health management',\n subtitle: 'Color’s confidential service helps you better understand your hereditary risks, helping you, and possibly your family, lead a healthier life.',\n items: [\n {\n image: 'illo_NegativeResults',\n heading: 'Actionable results',\n paragraph: 'Your results can help you and your doctor create a personalized screening and health management plan.'\n },\n {\n image: 'illo_GCTalk',\n heading: 'Personal guidance',\n paragraph: 'Get complimentary access to our board-certified genetic counselors to help you understand your results.'\n },\n {\n image: 'illo_ScreenLock',\n heading: 'Confidential information',\n paragraph: 'We take privacy very seriously and your personally identifiable information will not be shared with your employer without your consent.'\n },\n ],\n },\n sectionHowItWorks: {\n title: 'Here’s how Color works',\n items: [\n {\n heading: 'Claim your Color benefit online and create an account to request your kit.',\n },\n {\n heading: 'Provide a saliva sample and drop your kit in the mail.',\n },\n {\n heading: 'Get an email when your results are ready in 3-4 weeks.',\n },\n {\n heading: 'Meet with our genetic counselors.',\n },\n {\n heading: 'Create a screening and prevention plan with your healthcare provider.',\n },\n ],\n },\n }\n },\n projectbaseline: {\n routeDescription: 'Project Baseline is offering you the Color Benefits Program.',\n heroTitle: 'Thank you for contributing to the Project Baseline Health Study! ',\n heroDescription: 'To redeem your free Color kit, please enter your Project Baseline email (this is what you used to sign up for Project Baseline and where you receive email reminders from Project Baseline).',\n img: 'img--projectbaseline_logo',\n organization_name: 'Verily\\'s Project Baseline',\n inputPlaceholders: ['Enter your email'],\n },\n local9fund: {\n heroDescription: 'Plumbers and Pipefitters of Local 9 Welfare Fund is offering eligible members and one (1) eligible adult dependent (max of 2) complimentary access to Color’s confidential health service to help you personalize your health with genetic insights. Send your test kit, including a saliva sample back to Color within 7 days of receiving your kit in the mail.',\n inputPlaceholders: ['First name', 'Last initial'],\n concatAuthFactors: true,\n },\n acandrefrigerationfund: {\n heroDescription: 'AC and Refrigeration Fund of New Jersey is offering eligible members and one (1) eligible adult dependent (max of 2) complimentary access to Color’s confidential health service to help you personalize your health with genetic insights. Send your test kit, including a saliva sample back to Color within 7 days of receiving your kit in the mail.',\n inputPlaceholders: ['First name', 'Last initial'],\n concatAuthFactors: true,\n },\n ocra: {\n routeTitle: 'Get Your OCRA Color Test',\n routeDescription: 'Ovarian Cancer Research Alliance (OCRA) is offering you free clinical hereditary cancer genetic testing.',\n heroTitle: '',\n heroDescription: 'Ovarian Cancer Research Alliance (OCRA) is partnering with Color Health to provide free clinical hereditary cancer genetic testing to those at increased risk who qualify.',\n heroDescription2: 'Ready to better understand how your genes impact your hereditary risk and management options for ovarian and other common hereditary cancers? To claim your genetic testing kit, please enter your email address (must be the same email address you used when you applied on the OCRA website). Learn more about the 29 genes included in Color\\'s Hereditary Cancer Test here.',\n inputPlaceholders: ['Enter your email'],\n img: 'img--ocra_logo',\n sku: sku['hereditary 30'],\n showHealthAreas: false,\n showDiscovery: false,\n showClientVideos: false,\n showHowItWorks: false,\n showPurchase: false,\n propsOverlay: {\n sectionValuePropositions: {\n title: 'A personalized approach to prevention and health management',\n subtitle: 'Color’s confidential service helps you better understand your hereditary risks, helping you, and possibly your family, lead a healthier life.',\n items: [\n {\n image: 'illo_NegativeResults',\n heading: 'Actionable results',\n paragraph: 'Your results can help you and your doctor create a personalized screening and health management plan.'\n },\n {\n image: 'illo_GCTalk',\n heading: 'Personal guidance',\n paragraph: 'Get complimentary access to our board-certified genetic counselors to help you understand your results.'\n },\n {\n image: 'illo_ScreenLock',\n heading: 'Confidential information',\n paragraph: 'We take privacy very seriously and your personally identifiable information will not be shared with anyone without your consent.'\n },\n ],\n },\n }\n },\n }\n return options.hasOwnProperty(companyName) ? options[companyName] : {};\n }\n return angular.extend({}, defaultOptions, getOptions(companyName));\n }\n}\n","'use strict'\n\nmodule.exports = ($timeout, auth, RoutingAuthorizationModal, ngToast, $http, organizationRelationship) => {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n employer: '=',\n goToNext: '=',\n },\n templateUrl: '/benefits/directives/routing_authorization.html',\n link: function(scope) {\n scope.showSection = {\n routingConsent: false,\n defaultRouting: false,\n }\n\n scope.translateValues = {\n employer: scope.employer\n }\n scope.relationship = { type: null }\n scope.organizationRelationship = organizationRelationship\n\n const scrollTo = (element) => {\n $timeout(() => {\n if (element) {\n $('html,body').animate({scrollTop: $(element).offset().top - 275} , \"slow\")\n }\n }, 0, false);\n }\n\n scope.selectEmployee = () => {\n scope.showSection.routingConsent = true\n scope.showSection.defaultRouting = false\n scope.relationship = { type: organizationRelationship.EMPLOYEE }\n scrollTo(\"#routingConsent\")\n }\n\n scope.selectNone = () => {\n scope.showSection.routingConsent = false\n scope.showSection.defaultRouting = true\n scope.relationship = { type: organizationRelationship.NON_HEALTH_INSURANCE_BENEFICIARY }\n scrollTo(\"#defaultRouting\")\n }\n\n scope.selectNonEmployee = () => {\n scope.showSection.routingConsent = false\n scope.showSection.defaultRouting = true\n scope.relationship = { type: organizationRelationship.HEALTH_INSURANCE_BENEFICIARY }\n scrollTo(\"#defaultRouting\")\n }\n\n scope.setMembershipAndGoToNext = () => {\n if (scope.relationship.type) {\n return $http.post('/api/v1/set_organization_membership', {\n organization_name: scope.employer, relationship: scope.relationship.type\n }).then(res => {\n return auth.sync(true)\n }).then(res => {\n scope.goToNext()\n })\n .catch(err => {\n ngToast.create({ className: 'error', content: \"There was an error. Please contact Support.\" })\n })\n } else {\n ngToast.create({ className: 'error', content: \"You must select a membership before continuing.\" })\n }\n }\n\n scope.hasCompletedHealthHistory = () => {\n return auth.currentUser.has_health_history_completed\n }\n\n scope.selectNo = () => {\n $http.post('/api/v1/user_consent', {\n consented: false, type: 'routing_authorization', scope: scope.employer\n }).then(res => {\n ngToast.create({ className: 'success', content: `You will not receive recommended ${scope.employer} benefits and services on your dashboard.`})\n scope.setMembershipAndGoToNext()\n }).catch(err => {\n ngToast.create({ className: 'error', content: \"There was an error. Please contact Support.\" })\n })\n }\n\n scope.selectYes = () => {\n RoutingAuthorizationModal.open(scope.employer, scope.setMembershipAndGoToNext)\n }\n }\n }\n}\n","const resolvers = require('src/django_apps/core/static/js/resolvers')\nconst getAbsolutePath = require('src/django_apps/core/static/js/absolute_path');\n\nmodule.exports = angular.module('home', [\n require('src/django_apps/home/js/directives').name,\n require('src/django_apps/home/js/controllers').name,\n require('src/django_apps/home/js/filters').name,\n require('src/django_apps/home/js/resources').name,\n require('src/django_apps/home/js/animation').name,\n]).config(function(colorRouteProvider) {\n\n 'ngInject'\n\n const brcacodeRedirect = {\n redirectTo: getAbsolutePath(true,'/providers/place-order'),\n caseInsensitiveMatch: true,\n mobileFooter: 'standard'\n }\n\n // TODO: Migrate this into the frontend/app/marketing folder\n colorRouteProvider\n // IMPORTANT: /go is taken by TV promo\n // RGB-212\n .when('/go', {\n auth: { requireLogin: false },\n resolve: resolvers.applyAttributionRedirect('tv', '/t/start?utm_source=tv')\n })\n\n /*\n * \"/react/path\" will directly set location.href to '/path'\n * This is used such that you can link directly to react pages through\n * /react prefix /react by itself or direct to react '/' page\n */\n .when('/react', {\n resolve: {\n '_reactRedirect2_': function($window) {\n 'ngInject'\n $window.location.replace('/')\n }\n },\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n })\n .when('/react/:reactPath*', {\n resolve: resolvers.reactRedirect,\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n })\n})\n","module.exports = angular\n .module(\"homeDirectives\", [])\n .directive(\n \"mobileFooter\",\n require(\"src/django_apps/home/js/directives/mobile_footer\")\n )\n .directive(\n \"marketingCarousel\",\n require(\"src/django_apps/home/js/directives/marketing_carousel\")\n )\n .directive(\n \"marketingQuestions\",\n require(\"src/django_apps/home/js/directives/marketing_questions\")\n )\n\n // Design-related directives\n .directive(\n \"designWhiteBodyBackground\",\n require(\"src/django_apps/home/js/directives/design_white_body_background\")\n );\n","const getAbsolutePath = require('src/django_apps/core/static/js/absolute_path');\nmodule.exports = function mobileFooter(navigation) {\n 'ngInject'\n return {\n restrict: 'E',\n scope: false,\n templateUrl: '/directives/mobileFooter.html',\n link: function(scope) {\n scope.getAbsolutePath = getAbsolutePath;\n scope.$watch(function() {\n return navigation.mobileFooter\n }, function() {\n scope.mobileFooter = navigation.mobileFooter\n })\n }\n }\n}\n","module.exports = function MarketingCarousel() {\n 'ngInject'\n return {\n restrict: 'E',\n replace: true,\n scope: {},\n templateUrl: '/marketing/_carousel.html',\n link: function(scope) {\n scope.selectedClass = 'img--carousel_01'\n }\n }\n}\n","module.exports = function MarketingQuestions() {\n 'ngInject'\n return {\n restrict: 'E',\n replace: true,\n scope: {},\n templateUrl: '/marketing/_questions.html',\n link: function(scope) { }\n }\n}\n","\nmodule.exports = function designWhiteBodyBackground(){\n 'ngInject'\n\n // Workaround to modify CSS styling of the tag per page\n // Usage in Jade: `design-white-body-background()`\n return {\n restrict: 'E',\n scope: false,\n link: function(scope) {\n angular.element('#ng-app').addClass('clear-layout');\n scope.$on('$destroy', () => {\n angular.element('#ng-app').removeClass('clear-layout');\n })\n }\n }\n}\n","module.exports = angular.module('homeControllers', [])\n .controller('ClientStoriesController', require('./controllers/client_stories_controller'))\n .controller('HomeStaticController', require('./controllers/home_static_controller'))\n .controller('InformedConsentsController', require('./controllers/informed_consents_controller'))\n .controller('ProductH30Controller', require('./controllers/product_h30_controller'))\n","/**\n * @prettier\n */\n\nmodule.exports = function ClientStoriesController($scope, $http, geneCount, kitPriceService) {\n 'ngInject';\n\n $scope.geneCount = geneCount;\n $scope.kitPriceService = kitPriceService;\n\n // This code is also in core/static/js/directives/clrQuiz.js, which has the\n // same newsletter signup form.\n $scope.submitted = false;\n $scope.subscribe = {\n email: null,\n purpose: 'health_notes',\n };\n\n $scope.submit = function(data) {\n return $http\n .post('/api/v1/marketing_email_contacts', data)\n .then(function() {\n $scope.submitted = true;\n })\n .catch(function() {\n $scope.submitting = false;\n });\n };\n};\n","module.exports = function($scope, $window) {\n 'ngInject'\n\n $window.scrollTo(0, 0)\n}\n","module.exports = function($scope, $location, testTypes, waffle) {\n 'ngInject'\n\n $scope.testTypes = testTypes\n // We want core 10 sku to appear as one test in informed consent\n // even though the sku is a combo sku\n $scope.core10Sku = 'core 10'\n\n const testTypeNames = $location.search().test_types\n if (testTypeNames) {\n $scope.testTypeNames = testTypeNames.split(',')\n if (testTypeNames.indexOf(testTypes.hereditary7) > -1 && testTypeNames.indexOf(testTypes.fh3) > -1) {\n $scope.testTypeNames = [$scope.core10Sku]\n }\n } else {\n // We have a link to this page from our website footer which does not have\n // context on which test types. In this case, we show all available ICs.\n $scope.testTypeNames = [\n testTypes.brca12,\n testTypes.hereditary30,\n testTypes.breastOvarian19,\n testTypes.fh3,\n testTypes.cardio30,\n $scope.core10Sku,\n testTypes.pgxv1\n ]\n }\n}\n","'use strict'\n\nmodule.exports = function ProductH30Controller() {\n 'ngInject'\n}\n","module.exports = angular.module('homeFilter', [])\n .filter('sortJobsByDepartmentFirst', require('src/django_apps/home/js/filters/sort_jobs_by_department_first'))\n","'use strict'\n\nmodule.exports = function() {\n\n return function(jobs, department) {\n\n function sortDepartmentAlphabetical(a, b) {\n if (a.department < b.department) {\n return -1\n } else if (a.department > b.department) {\n return 1\n }\n return 0\n }\n\n const preferredDepartmentJobs = [];\n const otherJobs = []\n\n // Break up jobs by preferred department first\n angular.forEach(jobs, function(job) {\n if (job.department == department) {\n preferredDepartmentJobs.push(job)\n } else {\n otherJobs.push(job)\n }\n })\n\n // Sort by other jobs to match department alphabetical order\n otherJobs.sort(sortDepartmentAlphabetical)\n\n return preferredDepartmentJobs.concat(otherJobs)\n }\n}\n","module.exports = angular.module('homeResource', ['clrResource'])\n\n .factory('MarketingEmailContact', function(resource) {\n 'ngInject'\n return resource(\n 'api/v1/marketing_email_contacts'\n , { format: 'json' }\n )\n })\n\n .factory('RawDataFile', function(resource) {\n 'ngInject'\n return resource(\n 'api/v1/raw_data_file'\n , { format: 'json' }, {\n get: {\n method: 'GET',\n isArray: true\n }\n }\n )\n })\n\n .factory('PromoBanner', function(resource) {\n 'ngInject'\n return resource(\n 'api/v1/promo_banner'\n , { format: 'json' }, {\n get: {\n method: 'GET',\n cache: true\n }\n }\n )\n })\n","module.exports = angular.module('homeAnimation', ['ngAnimate'])\n .animation('.clr-slide-in-out', function() {\n return {\n enter: function(el, doneFn) {\n angular.element(el).slideDown(300, doneFn);\n },\n\n leave: function(el, doneFn) {\n angular.element(el).slideUp(300, doneFn);\n }\n }\n })\n","const resolvers = require('src/django_apps/core/static/js/resolvers')\n\nmodule.exports = angular.module('results', [\n require('src/django_apps/results/static/js/results/controllers').name,\n require('src/django_apps/results/static/js/results/directive').name,\n require('src/django_apps/results/static/js/results/filter').name,\n require('src/django_apps/results/static/js/results/modal').name,\n]).config(function(colorRouteProvider) {\n const noLoginOrConfirmation = {\n requireLogin: false,\n requireEmailConfirmation: false\n }\n\n colorRouteProvider\n .when('/results', {\n templateUrl: '/results/pre-results/index.html',\n controller: 'PreResultsController',\n seo: {\n title: 'Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n resolve: resolvers.kitStatus,\n })\n\n // Redirect logic for backward compatibility.\n .when('/results/reminder', { redirectTo: '/results/breast-ovarian-19/reminder' })\n .when('/results/report', { redirectTo: '/results/breast-ovarian-19/report' })\n .when('/results/report/next-steps', { redirectTo: '/results/breast-ovarian-19/report/next-steps' })\n .when('/results/report/details', { redirectTo: '/results/breast-ovarian-19/details' })\n .when('/results/report/health-history', { redirectTo: '/results/breast-ovarian-19/health-history' })\n .when('/results/report/family', { redirectTo: '/results/breast-ovarian-19/family' })\n .when('/results/report/questions', { redirectTo: '/results/breast-ovarian-19/questions' })\n\n .when('/results/:testType', {\n templateUrl: '/results/pre-results/index.html',\n controller: 'PreResultsController',\n seo: {\n title: 'Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n resolve: resolvers.kitStatus,\n })\n .when('/results/:testType/reminder', {\n templateUrl: '/results/pre-results/results_ready.html',\n controller: 'PreResultsController',\n seo: {\n title: 'Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n resolve: resolvers.kitStatus,\n })\n\n // all the report URLs\n // goToReport in pre results controller\n // .when('/results/:testType/report'\n // .when('/results/:testType/report/next-steps'\n // .when('/results/:testType/report/details'\n // .when('/results/:testType/report/health-history'\n // .when('/results/:testType/report/family'\n // .when('/results/:testType/report/questions'\n .when('/results/:testType/report', {\n redirectTo: function(routeParams, path, search) {\n const testTypeIsPgx = routeParams.testType === 'pgx' || routeParams.testType === 'pgx-v1'\n const resultIsCmsBased = search.cms_based || 'false'\n\n if (testTypeIsPgx && resultIsCmsBased.toLowerCase() !== 'true') {\n /**\n * If the result is a PGx test AND\n * the PGx result was NOT generated using the CMS-based system\n * (we determine this by the presence of the 'cms_based' search param, which is\n * applied in the PreResultsPage.tsx),\n *\n * we should render the legacy React based PGx web report in\n * home/frontend/src/ui/App/ColorPortal.\n *\n * Otherwise, if the PGx report is CMS-based, we should redirect the user to\n * the Angular-based reports wrapper at /report/next-steps\n * which will render the user's CMS-based PGx report.\n *\n * This will allow us to gradually migrate users to the new CMS-based PGx reports.\n */\n return '/react/legacy/results/' + routeParams.testType\n }\n\n return '/results/' + routeParams.testType + '/report/next-steps'\n }\n })\n .when('/results/:testType/report/next-steps', {\n templateUrl: '/results/web_report.html',\n controller: 'ReportWrapperController',\n seo: {\n title: 'Next Steps - Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n resolve: resolvers.results,\n })\n .when('/results/:testType/report/details', {\n templateUrl: '/results/web_report.html',\n controller: 'ReportWrapperController',\n seo: {\n title: 'Details - Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n resolve: resolvers.results,\n })\n .when('/results/:testType/report/health-history', {\n templateUrl: '/results/web_report.html',\n controller: 'ReportWrapperController',\n seo: {\n title: 'Health History - Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n resolve: resolvers.results,\n })\n .when('/results/:testType/report/family', {\n templateUrl: '/results/web_report.html',\n controller: 'ReportWrapperController',\n seo: {\n title: 'Family - Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n resolve: resolvers.results,\n })\n .when('/results/:testType/report/questions', {\n templateUrl: '/results/web_report.html',\n controller: 'ReportWrapperController',\n seo: {\n title: 'Questions - Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n resolve: resolvers.results,\n })\n\n .when('/appointments/:order_number', {\n controller: 'AppointmentController',\n seo: {\n title: 'Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n })\n\n})\n","module.exports = angular.module('resultsControllers', [])\n .controller('FaxListController', require('./controllers/fax_list_controller'))\n .controller('PreResultsController', require('./controllers/pre-results_controller'))\n .controller('ReportReviewController', require('./controllers/report_review_controller'))\n .controller('ReportReviewListController', require('./controllers/report_review_list_controller'))\n .controller('CovidReportListController', require('./controllers/covid_report_list_controller'))\n .controller('ReportController', require('./controllers/report_controller'))\n .controller('ReportWrapperController', require('./controllers/report_wrapper_controller'))\n .controller('ReportWrapperV1Controller', require('./controllers/report_wrapper_v1_controller'))\n .controller('AppointmentController', require('./controllers/appointment_controller'))\n","module.exports = function FaxListController(\n $scope, $routeParams, $timeout, ngToast,\n resourcePaginator, FaxLog, retryFaxModal) {\n 'ngInject'\n\n $scope.states = ['all', 'requested', 'completed', 'failed']\n $scope.stateTitles = {\n 'all': 'All',\n 'requested': 'Pending',\n 'completed': 'Completed',\n 'failed': 'Failed'\n }\n const state = $routeParams.state\n $scope.state = state\n $scope.showCompleted = $scope.state == 'completed' || $scope.state == 'all'\n $scope.showResolved = $scope.state == 'failed'\n\n $scope.retry = function(faxLog) {\n retryFaxModal.open(faxLog).result\n .then(function() {\n ngToast.create(\"Fax retry requested.\")\n })\n }\n\n $scope.faxLogs = initializeFaxLogs()\n\n function initializeFaxLogs(search) {\n const queryParams = { ordering: '-created_at' }\n if (state != 'all') {\n queryParams.state = state\n }\n if (search && search.sampleId) {\n queryParams.kit_barcode = search.sampleId\n }\n return resourcePaginator(new FaxLog(), queryParams)\n }\n\n let searchPromise\n $scope.search = {}\n $scope.$watch('search', function(newValue, oldValue) {\n // Skip initial watch trigger.\n if (angular.isUndefined(oldValue) || newValue == oldValue) {\n return\n }\n if (searchPromise) {\n $timeout.cancel(searchPromise)\n }\n searchPromise = $timeout(function() {\n $scope.faxLogs = initializeFaxLogs(newValue)\n $scope.faxLogs.getNextPage()\n searchPromise = undefined\n }, 1000)\n }, true)\n};\n","'use strict'\n\nmodule.exports = function PreResultsController($rootScope, $scope, $translate\n , $translatePartialLoader, $filter, $location, $routeParams\n , $sce, $window, appointmentTypes, auth, promoCodeStore, kitStatuses, sampleReuseService\n , schedulizerTextOptions, testTypes, sku, PgxTutorial, confirmPgxModal) {\n 'ngInject'\n\n // Results Ready pages uses strings from this bundle\n $translatePartialLoader.addPart('report')\n $scope.promo_code = auth.currentUser.promo_code\n if ($scope.promo_code) {\n promoCodeStore.persistCode($scope.promo_code)\n promoCodeStore.updateCode($scope.promo_code, true)\n }\n\n let kitStatus = null\n if (kitStatuses.results.length) {\n if ($routeParams.testType) {\n const kitStatusFromParams = $routeParams.testType.replace(/-/g, ' ')\n const matchingKits = kitStatuses.results.filter(function(kit) {\n return kit.test_type === kitStatusFromParams\n })\n kitStatus = matchingKits.length ? matchingKits[0] : null\n }\n if (!$routeParams.testType || !kitStatus) {\n kitStatus = kitStatuses.results[0]\n $location.path('/react/dashboard')\n return\n }\n }\n if (!kitStatus) {\n kitStatus = {\"order_status\": \"no_order\"}\n }\n $scope.testTypes = testTypes\n $scope.testType = kitStatus.test_type\n $scope.video = sku[$scope.testType].video\n $scope.videoScriptUrl = sku[$scope.testType].videoScriptUrl\n $scope.orderNumber = kitStatus.order_number\n if (kitStatus.health_conditions && kitStatus.health_conditions.length > 0){\n $scope.healthCondition = kitStatus.health_conditions[0] // Take the first condition\n }\n $scope.kitStatus = kitStatus\n $scope.showTestType = false\n $scope.titleError = false\n $scope.showReorder = false\n $scope.showActivate = false\n $scope.showShipping = false\n $scope.showTestTypeNav = kitStatuses.results.length > 1 && kitStatus.order_status != 'no_order'\n $scope.showShippingIsIncorrect = false\n $scope.showBarcode = false\n $scope.showTracking = false\n $scope.showBanner = false\n $scope.showGetReady = false\n $scope.showWhatToDoNext = false\n $scope.showWhatToDoNextActivate = false\n $scope.showWhatHappensNext = false\n $scope.showAboutGeneticTesting = false\n $scope.showPurchaseNumber = false\n\n $scope.goToReport = function() {\n const testType = $routeParams.testType\n if (testType == 'pgx-v1') {\n // PGx Report uses react whereas other reports use iframe in Angular\n $window.location.replace('/results/pgx/dashboard')\n } else {\n $location.path(`/results/${testType}/report`).replace()\n }\n }\n\n $scope.goToPreResultsView = function() {\n const testType = $routeParams.testType\n $location.path(`/react/results-v3/${testType}`).replace()\n }\n\n $scope.confirmPgx = function() {\n confirmPgxModal.open($scope.goToReport).result\n }\n\n switch (kitStatus.order_status) {\n case \"no_order\":\n case \"wisdom_order\":\n break\n\n case \"not_shipped\":\n $scope.timeline = \"warehouse\"\n $scope.showShippingIsIncorrect = true\n $scope.showShipping = true\n $scope.showGetReady = true\n $scope.showPurchaseNumber = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.NOT_SHIPPED',\n 'PRE-RESULTS.STATUS.DETAILS.NOT_SHIPPED',\n 'PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING',\n 'PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE',\n 'PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS'\n ]).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.NOT_SHIPPED']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.NOT_SHIPPED']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE']\n $scope.msgQ3 = translations['PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS']\n })\n break\n\n // @todo endpoint doesn't return this state at the moment\n case \"payment_declined\":\n $scope.timeline = \"warehouse\"\n $scope.titleError = true\n $scope.showReorder = true\n $scope.showPurchaseNumber = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.PAYMENT_DECLINED',\n 'PRE-RESULTS.STATUS.DETAILS.PAYMENT_DECLINED'\n ], {\n cardLast4: 'cardLast4'\n }).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.PAYMENT_DECLINED']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.PAYMENT_DECLINED']\n })\n break\n\n case \"usps_lost_package\":\n $scope.timeline = \"warehouse\"\n $scope.showShippingIsIncorrect = true\n $scope.showShipping = true\n $scope.showGetReady = true\n $scope.showBanner = true\n $scope.showPurchaseNumber = true\n $translate([\n 'PRE-RESULTS.BANNERS.USPS_LOST_PACKAGE',\n 'PRE-RESULTS.STATUS.TITLE.NOT_SHIPPED',\n 'PRE-RESULTS.STATUS.DETAILS.NOT_SHIPPED',\n 'PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING',\n 'PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE',\n 'PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS'\n ]).then(function (translations) {\n $scope.msgBanner = translations['PRE-RESULTS.BANNERS.USPS_LOST_PACKAGE']\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.NOT_SHIPPED']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.NOT_SHIPPED']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE']\n $scope.msgQ3 = translations['PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS']\n })\n break\n\n case \"shipped_to_home\":\n $scope.timeline = \"to_home\"\n $scope.showShippingIsIncorrect = true\n $scope.showShipping = true\n $scope.showTracking = true\n $scope.showGetReady = true\n $scope.showPurchaseNumber = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.SHIPPED_TO_HOME',\n 'PRE-RESULTS.STATUS.DETAILS.SHIPPED_TO_HOME',\n 'PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING',\n 'PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE',\n 'PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS'\n ], {\n shipDate: $filter('date')(kitStatus.fulfillment.scanned_at, 'MMM ') + $filter('ordinalSuffix')($filter('date')(kitStatus.fulfillment.scanned_at, 'd'))\n }).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.SHIPPED_TO_HOME']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.SHIPPED_TO_HOME']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE']\n $scope.msgQ3 = translations['PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS']\n })\n break\n\n case \"shipped_to_home_failed\":\n $scope.timeline = null\n $scope.titleError = true\n $scope.showShipping = true\n $scope.showTracking = true\n $scope.showPurchaseNumber = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.SHIPPED_TO_HOME_FAILED',\n 'PRE-RESULTS.STATUS.DETAILS.SHIPPED_TO_HOME_FAILED',\n 'PRE-RESULTS.QUESTIONS.DOES_COLOR_SHIP_PO',\n 'PRE-RESULTS.QUESTIONS.DOES_COLOR_SHIP_INTERNATIONAL'\n ]).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.SHIPPED_TO_HOME_FAILED']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.SHIPPED_TO_HOME_FAILED']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.DOES_COLOR_SHIP_PO']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.DOES_COLOR_SHIP_INTERNATIONAL']\n })\n break\n\n case \"usps_lost_package_new_kit_shipped\":\n $scope.timeline = \"to_home\"\n $scope.showShippingIsIncorrect = true\n $scope.showShipping = true\n $scope.showTracking = true\n $scope.showGetReady = true\n $scope.showBanner = true\n $scope.showPurchaseNumber = true\n $translate([\n 'PRE-RESULTS.BANNERS.USPS_LOST_PACKAGE_NEW_KIT_SENT',\n 'PRE-RESULTS.STATUS.TITLE.SHIPPED_TO_HOME',\n 'PRE-RESULTS.STATUS.DETAILS.SHIPPED_TO_HOME',\n 'PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING',\n 'PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE',\n 'PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS'\n ], {\n shipDate: $filter('date')(kitStatus.fulfillment.scanned_at, 'MMM ') + $filter('ordinalSuffix')($filter('date')(kitStatus.fulfillment.scanned_at, 'd'))\n }).then(function (translations) {\n $scope.msgBanner = translations['PRE-RESULTS.BANNERS.USPS_LOST_PACKAGE_NEW_KIT_SENT'],\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.SHIPPED_TO_HOME']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.SHIPPED_TO_HOME']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE']\n $scope.msgQ3 = translations['PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS']\n })\n break\n\n case \"new_kit_shipped\":\n $scope.timeline = \"to_home\"\n $scope.showShipping = true\n $scope.showTracking = true\n $scope.showGetReady = true\n $scope.showBanner = true\n $scope.showPurchaseNumber = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.NEW_KIT_SHIPPED',\n 'PRE-RESULTS.STATUS.DETAILS.NEW_KIT_SHIPPED',\n 'PRE-RESULTS.BANNERS.ORIGINAL_SAMPLE_NOT_ENOUGH_SALIVA',\n 'PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING',\n 'PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE',\n 'PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS'\n ]).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.NEW_KIT_SHIPPED']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.NEW_KIT_SHIPPED']\n $scope.msgBanner = translations['PRE-RESULTS.BANNERS.ORIGINAL_SAMPLE_NOT_ENOUGH_SALIVA']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE']\n $scope.msgQ3 = translations['PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS']\n })\n break\n\n // @todo endpoint doesn't return this state at the moment\n // https://app.asana.com/0/11977858404233/29788045473163\n case \"new_kit_shipped_because_usps_lost_package\":\n $scope.timeline = \"to_home\"\n $scope.showShipping = true\n $scope.showTracking = true\n $scope.showGetReady = true\n $scope.showBanner = true\n $scope.showPurchaseNumber = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.NEW_KIT_SHIPPED',\n 'PRE-RESULTS.STATUS.DETAILS.NEW_KIT_SHIPPED',\n 'PRE-RESULTS.BANNERS.USPS_LOST_PACKAGE',\n 'PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING',\n 'PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE',\n 'PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS'\n ]).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.NEW_KIT_SHIPPED']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.NEW_KIT_SHIPPED']\n $scope.msgBanner = translations['PRE-RESULTS.BANNERS.USPS_LOST_PACKAGE']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.I_TYPED_INCORRECT_SHIPPING']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.WHEN_WILL_MY_KIT_ARRIVE']\n $scope.msgQ3 = translations['PRE-RESULTS.QUESTIONS.HOW_CAN_TRACK_STATUS']\n })\n break\n\n case \"delivered_to_home\":\n $scope.timeline = \"home\"\n if (kitStatus.shipping_address) {\n $scope.showShipping = true\n $scope.showTracking = true\n }\n $scope.showActivate = true\n $scope.showWhatToDoNextActivate = true\n $scope.showPurchaseNumber = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.DELIVERED_TO_HOME',\n 'PRE-RESULTS.STATUS.DETAILS.DELIVERED_TO_HOME',\n 'PRE-RESULTS.STATUS.DETAILS.DELIVERED_ONSITE',\n 'PRE-RESULTS.QUESTIONS.HAVE_KIT_WHAT_SHOULD_I_DO',\n 'PRE-RESULTS.QUESTIONS.HOW_QUICKLY_RETURN_SAMPLE',\n 'PRE-RESULTS.QUESTIONS.WHAT_DO_NEVER_RECEIVED'\n ], {\n deliveredDate: $filter('date')(kitStatus.shipping.delivered_at, 'MMM ') + $filter('ordinalSuffix')($filter('date')(kitStatus.shipping.delivered_at, 'd')),\n deliveredTime: $filter('date')(kitStatus.shipping.delivered_at, 'h:mma')\n }).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.DELIVERED_TO_HOME']\n $scope.msgStatusDetails = kitStatus.shipping_address ?\n translations['PRE-RESULTS.STATUS.DETAILS.DELIVERED_TO_HOME'] :\n translations['PRE-RESULTS.STATUS.DETAILS.DELIVERED_ONSITE']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.HAVE_KIT_WHAT_SHOULD_I_DO']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.HOW_QUICKLY_RETURN_SAMPLE']\n $scope.msgQ3 = translations['PRE-RESULTS.QUESTIONS.WHAT_DO_NEVER_RECEIVED']\n })\n break\n\n case \"delivered_to_home_activated\":\n $scope.timeline = \"home\"\n $scope.showBarcode = true\n $scope.showWhatToDoNext = true\n $scope.showTestType = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.DELIVERED_TO_HOME_ACTIVATED',\n 'PRE-RESULTS.STATUS.DETAILS.DELIVERED_TO_HOME_ACTIVATED',\n 'PRE-RESULTS.QUESTIONS.HOW_PROVIDE_SAMPLE',\n 'PRE-RESULTS.QUESTIONS.WHAT_DO_MISTAKE_PROVIDING_SAMPLE'\n ]).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.DELIVERED_TO_HOME_ACTIVATED']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.DELIVERED_TO_HOME_ACTIVATED']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.HOW_PROVIDE_SAMPLE']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.WHAT_DO_MISTAKE_PROVIDING_SAMPLE']\n })\n break\n\n case \"collected_onsite_activated\":\n $scope.timeline = \"home\"\n $scope.showBarcode = true\n $scope.showTestType = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.COLLECTED_ONSITE_ACTIVATED',\n 'PRE-RESULTS.STATUS.DETAILS.COLLECTED_ONSITE_ACTIVATED',\n 'PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY',\n 'PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS'\n ]).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.COLLECTED_ONSITE_ACTIVATED']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.COLLECTED_ONSITE_ACTIVATED']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS']\n })\n break\n\n case \"shipped_to_lab\":\n $scope.timeline = \"to_lab\"\n $scope.showWhatHappensNext = true\n $scope.showTestType = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.SHIPPED_TO_LAB',\n 'PRE-RESULTS.STATUS.DETAILS.SHIPPED_TO_LAB',\n 'PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY',\n 'PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS',\n 'PRE-RESULTS.QUESTIONS.FORGOT_TO_ACTIVATE_BEFORE_MAILING'\n ]).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.SHIPPED_TO_LAB']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.SHIPPED_TO_LAB']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS']\n $scope.msgQ3 = translations['PRE-RESULTS.QUESTIONS.FORGOT_TO_ACTIVATE_BEFORE_MAILING']\n })\n break\n\n case \"at_lab_not_activated\":\n $scope.timeline = \"lab\"\n $scope.titleError = true\n $scope.showActivate = true\n $scope.showAboutGeneticTesting = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.AT_LAB_NOT_ACTIVATED',\n 'PRE-RESULTS.STATUS.DETAILS.AT_LAB_NOT_ACTIVATED',\n 'PRE-RESULTS.QUESTIONS.HOW_TO_ACTIVATE_KIT',\n 'PRE-RESULTS.QUESTIONS.FORGOT_TO_ACTIVATE_BEFORE_MAILING'\n ]).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.AT_LAB_NOT_ACTIVATED']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.AT_LAB_NOT_ACTIVATED']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.HOW_TO_ACTIVATE_KIT']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.FORGOT_TO_ACTIVATE_BEFORE_MAILING']\n })\n break\n\n case \"at_lab_sequencing\":\n $scope.timeline = \"lab\"\n $scope.showBarcode = true\n $scope.showWhatHappensNext = true\n $scope.showTestType = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.AT_LAB_SEQUENCING',\n 'PRE-RESULTS.STATUS.DETAILS.AT_LAB_SEQUENCING',\n 'PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY',\n 'PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS'\n ], {\n tatEstimate: $filter('clrDate')(kitStatus.tat_estimate)\n }).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.AT_LAB_SEQUENCING']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.AT_LAB_SEQUENCING']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS']\n })\n break\n\n case \"at_lab_data_reuse\":\n $scope.timeline = \"lab\"\n $scope.showBarcode = true\n $scope.showWhatHappensNext = true\n $scope.showTestType = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.AT_LAB_SEQUENCING',\n 'PRE-RESULTS.STATUS.DETAILS.AT_LAB_SEQUENCING_DATA_REUSE',\n 'PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY',\n 'PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS'\n ], {\n tatEstimateDataReuse: $filter('clrDate')(sampleReuseService.getResultsExpectedDate(kitStatus.purchased_at))\n }).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.AT_LAB_SEQUENCING']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.AT_LAB_SEQUENCING_DATA_REUSE']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS']\n })\n break\n\n case \"at_lab_sequencing_known_delay\":\n $scope.timeline = \"lab\"\n $scope.showBarcode = true\n $scope.showWhatHappensNext = true\n $scope.showTestType = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.AT_LAB_SEQUENCING',\n 'PRE-RESULTS.STATUS.DETAILS.AT_LAB_SEQUENCING_KNOWN_DELAY',\n 'PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY',\n 'PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS'\n ], {\n accessionedDate : $filter('clrDate')(kitStatus.fulfillment && kitStatus.fulfillment.completed_at),\n tatEstimate: $filter('clrDate')(kitStatus.tat_estimate)\n }).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.AT_LAB_SEQUENCING']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.AT_LAB_SEQUENCING_KNOWN_DELAY']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS']\n })\n break\n\n case \"at_lab_sequencing_unknown_delay\":\n $scope.timeline = \"lab\"\n $scope.showBarcode = true\n $scope.showWhatHappensNext = true\n $scope.showTestType = true\n $translate([\n 'PRE-RESULTS.STATUS.TITLE.AT_LAB_SEQUENCING',\n 'PRE-RESULTS.STATUS.DETAILS.AT_LAB_SEQUENCING_UNKNOWN_DELAY',\n 'PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY',\n 'PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS'\n ], {\n naiveTatEstimate : $filter('clrDate')(kitStatus.naive_tat_estimate)\n }).then(function (translations) {\n $scope.msgStatusTitle = translations['PRE-RESULTS.STATUS.TITLE.AT_LAB_SEQUENCING']\n $scope.msgStatusDetails = translations['PRE-RESULTS.STATUS.DETAILS.AT_LAB_SEQUENCING_UNKNOWN_DELAY']\n $scope.msgQ1 = translations['PRE-RESULTS.QUESTIONS.WHEN_RESULTS_READY']\n $scope.msgQ2 = translations['PRE-RESULTS.QUESTIONS.HOW_PREPARE_RESULTS']\n })\n break\n\n case \"pending_gc_session\":\n case \"non_reportable\":\n $scope.showTestType = true\n $scope.phoneNumber = auth.currentUser.phone_number\n $scope.showScheduling = !kitStatus.counseling.upcoming_appointment\n $scope.appointmentTypes = appointmentTypes\n $scope.appointmentType = kitStatus.counseling.appointment_type\n $scope.appointmentTextOptions = schedulizerTextOptions(kitStatus.counseling.appointment_type)\n break\n case \"released_opened\":\n case \"rereleased_not_opened\":\n case \"rereleased_opened\":\n $scope.goToReport()\n break\n\n case \"released_not_opened\":\n $scope.goToPreResultsView()\n break\n\n default:\n break\n }\n\n // \"results_ready\" state\n $scope.videoPlaying = false\n if ($scope.testType == testTypes.breastOvarian19) {\n $scope.videoToPlay = 'pretestBreastOvarian19'\n } else {\n $scope.videoToPlay = 'preCounselCancer'\n }\n $scope.playVideo = function() {\n $scope.videoPlaying = true\n }\n $scope.closeVideo = function() {\n $scope.videoPlaying = false\n }\n\n $scope.showTutorial = PgxTutorial.showTutorial\n}\n","module.exports = function ReportReviewController($scope, report) {\n 'ngInject'\n $scope.report = report\n}\n","module.exports = function ReportReviewListController(\n $scope, $window, $routeParams, $timeout\n , $filter, ngToast, auth\n , resourcePaginator, testTypes, Report\n , approveReleaseModal, releaseToPhysicianModal\n , reportNotReadyState, reportNewState, reportContentReviewedState\n , reportQueuedforBoardReviewState, reportPreparedForBoardReviewState\n , reportBoardReviewedState, reportSignOutApprovedState, reportSignedOffState\n , reportReleaseGatedState, reportReleaseApprovedState, reportSentToPhysicianState\n , reportReleaseReadyState, reportReleasedState, testOutcome) {\n 'ngInject'\n\n const pageSize = 30\n const state = $routeParams.state;\n const pathologistReviewState = [reportContentReviewedState, reportBoardReviewedState].join(',');\n const isPreSignoff = [reportNotReadyState, reportNewState, reportQueuedforBoardReviewState, reportPreparedForBoardReviewState, pathologistReviewState, reportSignOutApprovedState].indexOf(state) != -1;\n const isPreReleaseApproval = isPreSignoff || state == reportSignedOffState;\n const isPreRelease = isPreReleaseApproval || [reportReleaseApprovedState, reportSentToPhysicianState, reportReleaseReadyState].indexOf(state) != -1\n\n $scope.states = [\n reportNotReadyState,\n reportNewState,\n reportQueuedforBoardReviewState,\n reportPreparedForBoardReviewState,\n pathologistReviewState,\n reportSignOutApprovedState,\n reportSignedOffState,\n reportReleaseGatedState,\n reportReleaseApprovedState,\n reportSentToPhysicianState,\n reportReleaseReadyState,\n reportReleasedState,\n 'all'\n ]\n\n $scope.stateToTitle = {}\n $scope.stateToTitle[reportNotReadyState] = 'Not Ready'\n $scope.stateToTitle[reportNewState] = 'GC Review'\n $scope.stateToTitle[reportQueuedforBoardReviewState] = 'Prepare Genetics Board Review'\n $scope.stateToTitle[reportPreparedForBoardReviewState] = 'Genetics Board Review'\n $scope.stateToTitle[pathologistReviewState] = 'Medical Geneticist Review'\n $scope.stateToTitle[reportSignOutApprovedState] = 'Approved for Sign-Out'\n $scope.stateToTitle[reportSignedOffState] = 'Ordering Physician Review'\n $scope.stateToTitle[reportReleaseGatedState] = 'Release Gated Reports'\n $scope.stateToTitle[reportReleaseApprovedState] = 'Release Approved Reports'\n $scope.stateToTitle[reportSentToPhysicianState] = 'Reports Sent to Physician'\n $scope.stateToTitle[reportReleaseReadyState] = 'Reports Ready for Release'\n $scope.stateToTitle[reportReleasedState] = 'Released Reports'\n $scope.stateToTitle['all'] = 'All Reports'\n\n $scope.auth = auth\n $scope.state = state\n\n $scope.showApproveReleaseBtn = state == reportSignedOffState\n $scope.showReleaseToPhysician = state == pathologistReviewState || state == reportSignOutApprovedState\n $scope.showCheckboxColumn = state == reportSignedOffState\n $scope.showSampleColumn = isPreSignoff\n $scope.showInQueueColumn = isPreSignoff\n $scope.showPriorityColumn = isPreSignoff\n $scope.showCreatedColumn = isPreRelease\n $scope.showOrderingColumn = isPreSignoff\n $scope.showReportVersionColumn = state != reportNewState && state != reportNotReadyState\n $scope.showStatusColumn = state == 'all'\n $scope.showReleasedColumn = !isPreRelease && state != 'all'\n $scope.showSignificanceColumn = state != reportNotReadyState\n $scope.showClientColumn = !isPreSignoff\n $scope.showAgeColumn = !!isPreSignoff\n $scope.showHistoryReadyColumn = state == reportNewState || state == reportNotReadyState\n $scope.showVariantClassificationReadyColumn = state == reportNotReadyState\n $scope.showReviewReadyColumn = state == reportNotReadyState\n $scope.showConfirmationReadyColumn = state == reportNotReadyState\n\n $scope.showHealthReadyFilter = state == reportNewState\n $scope.showConfirmationReadyFilter = state == reportNotReadyState\n $scope.testOutcomeFilter = state == pathologistReviewState || state == reportSignOutApprovedState\n $scope.orderTypeFilter = state == pathologistReviewState || state == reportSignOutApprovedState\n\n $scope.getNextPage = (reports) => {\n if (reports) {\n reports.getNextPage()\n .then(function() {\n // Assignn significance value to each report so that reports can be searched by it.\n reports.items.filter(report => !report.significance).forEach((report) => {\n report.significance = $filter('resultSignificance')(report)\n })\n // After fetching the next page, not enough reports may be available\n // to fill the table after applying frontend angular filters. In such\n // cases, infinite scroll loading doesn't load next page so we load\n // them manually here.\n if (reports.hasNext && !reports.loadingNext) {\n const filteredItems = $filter('filter')(reports.items, $scope.searchPage)\n if (filteredItems.length < pageSize) {\n $scope.getNextPage(reports)\n }\n }\n })\n }\n }\n\n $scope.testTypes = testTypes\n $scope.reports = initializeReports()\n\n $scope.viewReport = function(report) {\n $window.open('/reports/' + report.id)\n }\n\n $scope.openApproveReleaseModal = function(reports) {\n openModalForApprovingRelease(\n approveReleaseModal\n , reports\n , 'Please select reports to approve for release.'\n , 'Selected reports have been approved for release.'\n )\n }\n\n const canSignOut = (report) => !report.sample.for_ny || auth.currentUser.is_ny_cq_holder\n\n $scope.releaseToPhysician = function(reports) {\n const reportsToSignOut = reports.filter((r) => canSignOut(r))\n const reportsToApprove = reports.filter((r) => !canSignOut(r))\n\n releaseToPhysicianModal.open(reportsToSignOut, reportsToApprove).result\n .then(function() {\n $scope.reports = initializeReports()\n })\n }\n\n $scope.canBatchRelease = function(report) {\n return (!report.revision || report.kit_order.test_type == testTypes.pgxv1) &&\n !report.has_incidental_findings &&\n !report.on_hold &&\n report.is_secondary_confirmation_completed &&\n report.has_classification_review_completed &&\n $filter('hasSampleTag')([report], 'pt').length == 0 &&\n (report.test_outcome == testOutcome.non_reportable ||\n report.test_outcome == testOutcome.negative && !report.has_vusp)\n }\n\n function openModalForApprovingRelease(modal, reports, errorMsg, successMsg) {\n const selectedReports = $filter('filter')(reports, { selected: true })\n\n if (!selectedReports.length) {\n ngToast.create({ className: 'error', content: errorMsg })\n return\n }\n\n modal.open(selectedReports).result\n .then(function() {\n ngToast.create(successMsg)\n $scope.reports = initializeReports()\n })\n }\n\n $scope.selectAllReports = function(reports, allSelected) {\n angular.forEach(reports, function(report) {\n report.selected = allSelected\n })\n }\n\n function initializeReports(search) {\n $scope.allSelected = false\n const queryParams = { page_size: pageSize, is_covid: false }\n\n if (state == reportNotReadyState) {\n queryParams.states = reportNewState\n queryParams.result_is_ready = false\n } else if (state == reportNewState) {\n queryParams.states = reportNewState\n queryParams.result_is_ready = true\n } else if (state == pathologistReviewState) {\n queryParams.states = pathologistReviewState\n queryParams.sign_out_approved = false\n } else if (state == reportSignOutApprovedState) {\n queryParams.states = pathologistReviewState\n queryParams.sign_out_approved = true\n } else if (state != 'all') {\n queryParams.states = state\n }\n\n if (search) {\n if (search.orderNumber) {\n queryParams.kit_order__order_number__icontains = search.orderNumber\n }\n if (search.sampleId) {\n queryParams.kit_order__samples__kit_barcode__iexact = search.sampleId\n }\n if (search.isHistoryReady) {\n queryParams.is_health_history_ready = search.isHistoryReady\n }\n if (search.testType) {\n queryParams.test_type__icontains = search.testType\n }\n if (search.testOutcome) {\n queryParams.test_outcome = search.testOutcome\n }\n if (search.orderType) {\n queryParams.order_type = search.orderType\n }\n if (search.highPriority) {\n queryParams.high_priority = search.highPriority\n }\n }\n const reports = resourcePaginator(new Report(), queryParams)\n $scope.getNextPage(reports)\n return reports\n }\n\n let searchPromise\n $scope.search = {}\n $scope.refresh = function(search) {\n $scope.reports = initializeReports(search)\n }\n $scope.searchPage = {}\n $scope.$watch('search', function(newValue, oldValue) {\n // Skip initial watch trigger.\n if (angular.isUndefined(oldValue) || newValue == oldValue) {\n return\n }\n if (searchPromise) {\n $timeout.cancel(searchPromise)\n }\n searchPromise = $timeout(function() {\n $scope.refresh(newValue)\n searchPromise = undefined\n }, 1000)\n }, true)\n\n // Infinite scroll does not load next page when angular filters\n // are applied and not enough reports are available to fill\n // the table. We load the nenxt page manually in such cases.\n $scope.$watch('searchPage', function() {\n if ($scope.reports.hasNext && !$scope.reports.loadingNext) {\n $scope.getNextPage($scope.reports)\n }\n }, true)\n}\n","module.exports = function CovidReportListController(\n $scope,\n $window,\n $timeout,\n $filter,\n waffle,\n resourcePaginator,\n Report\n) {\n \"ngInject\";\n\n $scope.search = { is_covid: true };\n\n // NOTE(color-thenriod): If you change this code, you probably need to change the same code in\n // src/django_apps/core/static/js/controllers.js\n // ifchange\n $scope.covidReportRetractionPageEnabled = !!(\n waffle.SWITCHES &&\n waffle.SWITCHES[\"clinical-covid-report-retraction-2022-08\"]\n );\n // Why not just use the `href` attribute of an `` you ask? In short, because it won't work.\n // I don't have the full explanation, but if you are in Angular-land, and you use an in the\n // normal way to link to a page in React-land, you will end up on a blank page in Angular land\n // and you will have to manually refresh the page (which will have the correct url in the url\n // bar - so that's nice I guess). Forcing the redirection with a click handler that forcibly\n // updates the window location will cause a page reload that will actually put you in\n // React-land.\n $scope.goToCovidReportRetractionPage = function() {\n $window.location.assign(\"/covid_reports/retract\");\n };\n // endifchange\n\n // Set up a fake ResourcePaginator with the attributes expected by the\n // paginated-table component. This will display a message instructing\n // the user that no search results are displayed until they enter some\n // search terms in the boxes.\n $scope.reports = {\n items: [],\n total: 0,\n getNextPage: () => {},\n noSearchExecuted: true\n };\n\n $scope.viewReport = report => {\n return () => $window.open(\"/reports/\" + report.id);\n };\n\n $scope.columns = [\n {\n key: report => report.kit_order.order_number,\n label: \"Order #\"\n },\n {\n key: report => report.sample.kit_barcode,\n label: \"Sample\"\n },\n {\n key: report => $filter(\"resultSignificance\")(report),\n label: \"Significance\"\n },\n {\n key: report => $filter(\"capitalize\")(report.user.gender),\n label: \"Gender\"\n },\n {\n key: report => report.user.age,\n label: \"Age\"\n },\n {\n key: report =>\n $filter(\"date\")(report.kit_order.ready_at_lab, \"MMMM dd, yyyy\"),\n label: \"At Lab\"\n },\n {\n key: report => $filter(\"date\")(report.released_at, \"MMMM dd, yyyy\"),\n label: \"Released\"\n },\n {\n key: report => $filter(\"reportStatusText\")(report),\n label: \"Status\"\n }\n ];\n\n let searchPromise = null;\n $scope.$watch(\n \"search\",\n (newValue, oldValue) => {\n // Skip initial watch trigger.\n if (angular.isUndefined(oldValue) || newValue == oldValue) {\n return;\n }\n if (searchPromise) {\n $timeout.cancel(searchPromise);\n }\n searchPromise = $timeout(() => {\n $scope.reports = resourcePaginator(new Report(), $scope.search);\n $scope.reports.getNextPage();\n searchPromise = undefined;\n }, 1000);\n },\n true\n );\n};\n","module.exports = function ReportController(\n $scope,\n $filter,\n $translate,\n $translatePartialLoader,\n reportRevisionsModal,\n testTypes,\n reportContent,\n reportGenericScreeningGuidelines,\n namedMutation,\n defaultLanguage\n) {\n \"ngInject\";\n\n // from the parent\n const report = $scope.report;\n const isPDF = $scope.isPDF;\n\n $scope.reportContent = reportContent(report);\n $scope.testTypes = testTypes;\n\n $translatePartialLoader.addPart(\"report\");\n // Translated report strings (only contains of subset of report components shared between normal and abbreviated)\n $translatePartialLoader.addPart(\"translated_report\");\n\n // Translations for FH3 test type.\n if ($scope.reportContent.template.test_type == testTypes.fh3) {\n $translatePartialLoader.addPart(\"fh_report\");\n }\n\n // Show revision modal if revised report is opened for the first item.\n const newRevisions = $filter(\"filter\")(report.revisions, { opened_at: null });\n if (!isPDF && newRevisions && newRevisions.length) {\n $translate([\n \"RESULT.NEW_REVISION_MODAL.TITLE\",\n \"RESULT.NEW_REVISION_MODAL.BUTTON\"\n ]).then(function(translations) {\n const title = translations[\"RESULT.NEW_REVISION_MODAL.TITLE\"];\n const btnText = translations[\"RESULT.NEW_REVISION_MODAL.BUTTON\"];\n reportRevisionsModal.open(newRevisions);\n });\n }\n\n // If there is no risks to show for the report we will need to hide\n // risk section explicitly. We can't currently do this at directive\n // level since a card is responsible for showing multiple directives.\n $scope.showPdfSummaryRisks =\n isPDF &&\n ($scope.reportContent.is_negative ||\n $scope.reportContent.risks.filter(function(r) {\n const hasElevatedRisks = r.data.filter(function(d) {\n return d.risk != \"not elevated\";\n }).length;\n return (\n r.gender == $scope.reportContent.gender &&\n r.gene != \"\" &&\n hasElevatedRisks\n );\n }).length);\n\n // Process report references and what we anticipate the report to have\n let reportReferences = $filter(\"getReportReferences\")(\n $scope.reportContent,\n \"A\"\n );\n\n function removeReference(referenceId) {\n const index = reportReferences.indexOf(referenceId);\n if (index > -1) {\n reportReferences.splice(index, 1);\n }\n }\n\n // TODO: Refactor the following references logic into getReportReferences $filter\n if ($scope.reportContent.is_positive) {\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"BRCA2\"]\n )\n ) {\n // Check nomenclature for T2626C, if so, add ref 318\n if (\n $filter(\"containsMutation\")(\n $scope.reportContent.mutations,\n \"chr13.GRCh37:g.32936732G>C\"\n )\n ) {\n reportReferences.push(318);\n }\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"TP53\"]\n )\n ) {\n // Questions: Family\n // Showing female breast cancer screening guideline referece.\n if (\n $scope.gender == \"F\" &&\n !$scope.reportContent.is_somatic &&\n $scope.reportContent.template.test_type != testTypes.wisdom9\n ) {\n reportReferences.push(59);\n }\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"PTEN\"]\n )\n ) {\n // Questions: Family\n if (\n !$scope.reportContent.is_somatic &&\n $scope.reportContent.template.test_type != testTypes.wisdom9\n ) {\n if ($scope.reportContent.template.test_type == testTypes.hereditary30) {\n //- TODO: apply render_version upgrade next bump\n reportReferences.push(167);\n } else {\n reportReferences.push(59);\n }\n }\n }\n if (\n $scope.reportContent.template.test_type != testTypes.wisdom9 &&\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"STK11\"]\n )\n ) {\n // Questions: Family\n reportReferences.push(304);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"RAD51C\"]\n )\n ) {\n // About the gene\n reportReferences.push(81);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"RAD51D\"]\n )\n ) {\n // About the gene\n reportReferences.push(119, 120);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"CHEK2\"]\n )\n ) {\n // Questions: Family, About the Gene\n reportReferences.push(61);\n reportReferences.push(70);\n reportReferences.push(71);\n // Check nomenclature for I157T, if so, add ref 74\n if (\n $filter(\"containsMutation\")(\n $scope.reportContent.mutations,\n \"chr22.GRCh37:g.29121087A>G\"\n )\n ) {\n reportReferences.push(74);\n }\n if (\n ($scope.reportContent.gender == \"M\" &&\n $scope.reportContent.genes_with_pathogenic_mutations.length < 2) ||\n $scope.reportContent.template.test_type == testTypes.hereditary30\n ) {\n // Remove non-elevated ovarian cancer risk citation, only for single mutation reports, and for all H30 reports\n removeReference(72);\n }\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"BAP1\"]\n )\n ) {\n if ($scope.reportContent.template.test_type == testTypes.hereditary30) {\n reportReferences.push(186, 187, 217);\n }\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"BARD1\"]\n )\n ) {\n if ($scope.reportContent.template.test_type == testTypes.hereditary30) {\n // Remove non-elevated breast cancer risk citation for all H30 reports\n removeReference(123);\n }\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"BMPR1A\"]\n )\n ) {\n reportReferences.push(235); // About the Gene\n reportReferences.push(304); // Questions - About Family\n }\n // On BO19 reports we surface breast cancer risks even if not elevated by\n // that gene so we use citation 92 to support not elevated except for single MSH2 M and single PMS2 M.\n if ($scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"MSH2\", \"PMS2\"]\n )\n ) {\n if (\n $scope.reportContent.gender == \"M\" &&\n $scope.reportContent.genes_with_pathogenic_mutations.length < 2\n ) {\n // Remove breast cancer risk citation, only for single mutation reports of MSH2 and PMS2\n removeReference(92);\n }\n }\n } else {\n removeReference(92);\n }\n if (\n $scope.reportContent.template.test_type != testTypes.wisdom9 &&\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"ATM\"]\n )\n ) {\n // About the gene\n reportReferences.push(88, 89);\n // Check nomenclature for 7271T>G, if so, add ref 169, 170, 171\n if (\n $filter(\"containsMutation\")(\n $scope.reportContent.mutations,\n \"chr11.GRCh37:g.108199929T>G\"\n )\n ) {\n reportReferences.push(169, 170, 171);\n }\n }\n\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"TP53\"]\n ) &&\n !$scope.reportContent.is_somatic\n ) {\n // About the gene\n reportReferences.push(103);\n }\n // Likely Pathogenic\n if ($filter(\"hasLikelyPathogenic\")($scope.reportContent.mutations)) {\n reportReferences.push(77);\n }\n\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"APC\"]\n )\n ) {\n // APC I1307K\n // About the gene: Refs 218, 199 are added via risks\n\n // About the gene (for non-APC I1307K)\n if (\n !$filter(\"containsMutation\")(\n $scope.reportContent.mutations,\n namedMutation.apc_i1307k\n )\n ) {\n reportReferences.push(147, 155);\n } else {\n reportReferences.push(218);\n }\n }\n\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"MITF\"]\n )\n ) {\n // About the gene\n reportReferences.push(186, 187);\n }\n\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"MUTYH\"]\n )\n ) {\n // About the gene, monoallelic\n reportReferences.push(194);\n }\n\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"CDKN2A\"]\n )\n ) {\n // About the gene\n reportReferences.push(186);\n }\n\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"CDK4\"]\n )\n ) {\n // About the gene\n reportReferences.push(262);\n }\n\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"SMAD4\"]\n )\n ) {\n // About the gene\n reportReferences.push(235);\n reportReferences.push(316);\n }\n }\n\n // Questions: About Cancer Survivors added references, only for BO19\n if ($scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n // Survivor + F\n if ($scope.reportContent.gender == \"F\") {\n if ($scope.reportContent.breast_cancer_survivor) {\n reportReferences.push(55);\n }\n if ($scope.reportContent.ovarian_cancer_survivor) {\n reportReferences.push(56, 57);\n }\n if ($scope.reportContent.fallopian_tube_cancer_survivor) {\n reportReferences.push(56, 57);\n }\n }\n // Survivor + M\n if (\n $scope.reportContent.gender == \"M\" &&\n $scope.reportContent.breast_cancer_survivor\n ) {\n reportReferences.push(76);\n }\n }\n\n // VUS citations (also Wisdom9 never has VUS content)\n if (\n $filter(\"mutationsHaveVus\")($scope.reportContent.mutations) &&\n $scope.reportContent.template.test_type != testTypes.wisdom9\n ) {\n reportReferences.push(7, 8, 14);\n // render_version changes to VUS citation\n // <= 2: Use NCCN Genetic/Familial High-Risk Assessment: Breast and Ovarian V 2.2015\n // >= 3: Use V 1.2017\n if ($scope.reportContent.render_version <= 2) {\n reportReferences.push(59);\n } else if ($scope.reportContent.render_version >= 3) {\n reportReferences.push(225);\n }\n }\n\n // Wisdom-specific \"Increased risk for other cancers\" summary extra reference additions\n if ($scope.reportContent.template.test_type == testTypes.wisdom9) {\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"ATM\"]\n )\n ) {\n reportReferences.push(87);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"BRCA1\"]\n )\n ) {\n reportReferences.push(24, 38);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"BRCA2\"]\n )\n ) {\n reportReferences.push(24, 38, 64);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"CDH1\"]\n )\n ) {\n reportReferences.push(84, 85);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"CHEK2\"]\n )\n ) {\n reportReferences.push(73);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"PALB2\"]\n )\n ) {\n reportReferences.push(79, 82, 83, 123);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"PTEN\"]\n )\n ) {\n reportReferences.push(116, 117);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"STK11\"]\n )\n ) {\n reportReferences.push(124, 125, 126, 127);\n }\n if (\n $filter(\"containsAny\")(\n $scope.reportContent.genes_with_pathogenic_mutations,\n [\"TP53\"]\n )\n ) {\n reportReferences.push(96, 97, 98, 99, 100, 101);\n }\n }\n\n // BO19 Test Methodologies Version 3 and 4 citation addition\n if (\n ($filter(\"testMethodologyVersion\")($scope.reportContent) == 3 ||\n $filter(\"testMethodologyVersion\")($scope.reportContent) == 4) &&\n $scope.reportContent.template.test_type == testTypes.breastOvarian19\n ) {\n reportReferences.push(27);\n }\n\n // H30 positive other screening guidelines citations, currently only for Female\n if (\n $scope.reportContent.template.test_type == testTypes.hereditary30 &&\n $scope.reportContent.is_positive\n ) {\n angular.forEach(\n reportGenericScreeningGuidelines($scope.reportContent.render_version),\n function(guideline) {\n if (\n guideline.gender\n ? $scope.reportContent.gender == guideline.gender\n : true\n ) {\n if (\n !$filter(\"screeningGuidelinesContainPhenotype\")(\n $scope.reportContent.template.screening_guidelines,\n guideline.phenotype\n )\n ) {\n reportReferences = reportReferences.concat(guideline.references);\n }\n }\n }\n );\n }\n\n $scope.languages = [defaultLanguage];\n\n if ($scope.reportContent.template.test_type == testTypes.fh3) {\n // from risks\n reportReferences = $filter(\"uniqueReferences\")($scope.reportContent.risks);\n // from screening guidelines\n $filter(\"fhGuidelines\")($scope.reportContent).forEach(function(guideline) {\n reportReferences = reportReferences.concat(guideline.references);\n });\n // VUS\n if ($filter(\"mutationsHaveVus\")($scope.reportContent.mutations)) {\n reportReferences.push(283);\n }\n // Positive\n if ($scope.reportContent.is_positive) {\n // We currently don't show baseline risk for FH positive report\n // so we want to remove the reference here.\n const index = reportReferences.indexOf(284);\n if (index > -1) {\n reportReferences.splice(index, 1);\n }\n }\n }\n\n $scope.reportReferences = reportReferences.join(\",\");\n};\n","module.exports = function ReportWrapperController($scope, report, isPDF, $translatePartialLoader) {\n 'ngInject'\n $scope.report = report;\n $scope.isPDF = isPDF;\n $scope.isFH3 = false\n\n $translatePartialLoader.addPart('report')\n\n // in the near future, generated_content will be empty for v2 reports.\n if (!report.generated_content) {\n $scope.showV2 = true;\n $scope.showPDF = false;\n } else {\n $scope.showV2 = !!report.generated_content.show_v2;\n $scope.showPDF = report.generated_content.test_outcome == 'non-reportable';\n if (!$scope.showV2) {\n $scope.isFH3 = report.generated_content.template.test_type == 'fh 3';\n }\n }\n}\n","// ReportWrapperV1Controller is used in admin to show the old v1 report,\n// unless it does not even exist.\nmodule.exports = function ReportWrapperV1Controller($scope, report, isPDF, $translatePartialLoader) {\n 'ngInject'\n $scope.report = report;\n $scope.isPDF = isPDF;\n\n $translatePartialLoader.addPart('report')\n\n // in the near future, generated_content will be empty for v2 reports.\n if (!report.generated_content) {\n $scope.showV2 = true\n $scope.isFH3 = false\n } else {\n $scope.showV2 = false\n $scope.isFH3 = report.generated_content.template && report.generated_content.template.test_type == 'fh 3';\n }\n\n $scope.showShareWithProviderSection = true;\n}\n","module.exports = function AppointmentController($route, $http, chooseAppointment) {\n 'ngInject'\n\n const orderNumber = $route.current.params.order_number\n $http.get(`/api/v1/kit_orders/${orderNumber}/appointment`)\n .then((res) => {\n chooseAppointment(orderNumber)\n })\n}\n","module.exports = angular.module('resultDirective', ['clrAuth', 'clrConstant', 'clrFilter', 'hc.marked', 'pascalprecht.translate', 'resultFilter', 'resultModal', 'reportModal', 'resultResource', 'healthProfileFilter'])\n\n .directive('webReportFh', function() {\n return {\n templateUrl: '/results/fh/web_report.html',\n controller: 'ReportController',\n restrict: 'E',\n scope: false\n }\n })\n .directive('webReportH30', function() {\n return {\n templateUrl: '/results/cancer/web_report.html',\n controller: 'ReportController',\n restrict: 'E',\n scope: false\n }\n })\n .directive('webReportV2', function() {\n return {\n templateUrl: '/results/web_report_v2.html',\n controller: require('src/django_apps/results_v2/js/controllers/report_v2_controller'),\n restrict: 'E',\n scope: false\n }\n })\n\n // Clinical-only report tooling directives\n .directive('calledDiplotypes', require('./directives/clinical/called_diplotypes'))\n .directive('diplotypeCallDetails', require('./directives/clinical/diplotype_call_details'))\n .directive('calledVariants', require('./directives/clinical/called_variants'))\n .directive('reportedData', require('./directives/clinical/reported_data'))\n .directive('confirmationInfo', require('./directives/clinical/confirmation_info'))\n .directive('familyTestingInfo', require('./directives/clinical/family_testing_info'))\n .directive('highlightedHealthHistory', require('./directives/clinical/highlighted_health_history'))\n .directive('knownVariants', require('./directives/clinical/known_variants'))\n .directive('qcMetrics', require('./directives/clinical/qc_metrics'))\n .directive('reportedMutations', require('./directives/clinical/reported_mutations'))\n .directive('reportInfo', require('./directives/clinical/report_info'))\n .directive('reportLogs', require('./directives/clinical/report_logs'))\n .directive('reportNewPreview', require('./directives/clinical/report_v2_preview')) // inconsistent directive name and filename\n .directive('reportRevision', require('./directives/clinical/report_revision')) // points to inconsistent `rerelease.html`\n .directive('reportSummary', require('./directives/clinical/report_summary')) // confusing name\n .directive('reportTags', require('./directives/clinical/report_tags'))\n .directive('reportTemplate', require('./directives/clinical/report_template'))\n\n // Generic V1 report directives (used on both cancer and FH reports)\n .directive('reportQuestion', require('./directives/report_question'))\n\n // V1 cancer report directives\n .directive('ltrLegend', require('./directives/ltr_legend'))\n .directive('ltrTable', require('./directives/ltr_table'))\n .directive('ltrTimechart', require('./directives/ltr_timechart'))\n .directive('reportAboutCancerRisks', require('./directives/report_about_cancer_risks'))\n .directive('reportAboutCancerSurvivors', require('./directives/report_about_cancer_survivors'))\n .directive('reportAboutFamily', require('./directives/report_about_family'))\n .directive('reportAboutTheGene', require('./directives/report_about_the_gene'))\n .directive('reportAdditionalFindings', require('./directives/report_additional_findings'))\n .directive('reportAdditionalGenes', require('./directives/report_additional_genes'))\n .directive('reportAffectOtherGender', require('./directives/report_affect_other_gender'))\n .directive('reportConnectWithOthers', require('./directives/report_connect_with_others'))\n .directive('reportDropdown', require('./directives/report_dropdown'))\n .directive('reportFamilyTestingProgram', require('./directives/report_family_testing_program'))\n .directive('reportGeneDetails', require('./directives/report_gene_details'))\n .directive('reportGeneralQuestions', require('./directives/report_general_questions'))\n .directive('reportGuidelines', require('./directives/report_guidelines'))\n .directive('reportLabSendouts', require('./directives/report_lab_sendouts'))\n .directive('reportMutation', require('./directives/report_mutation'))\n .directive('reportOpenOrderDetailsModal', require('./directives/report_open_order_details_modal'))\n .directive('reportOtherScreeningGuidelines', require('./directives/report_other_screening_guidelines'))\n .directive('reportProvideHealthHistory', require('./directives/report_provide_health_history'))\n .directive('reportProvideHealthHistoryBanner', require('./directives/report_provide_health_history_banner'))\n .directive('reportRevisions', require('./directives/report_revisions'))\n .directive('reportRiskFactors', require('./directives/report_risk_factors'))\n .directive('reportRiskTooltip', require('./directives/report_risk_tooltip'))\n .directive('reportShareFamily', require('./directives/report_share_family'))\n .directive('reportShareYourResults', require('./directives/report_share_your_results'))\n .directive('reportSpeakWithSpecialist', require('./directives/report_speak_with_specialist'))\n .directive('reportSummaryChart', require('./directives/report_summary_chart'))\n .directive('reportSummaryExtra', require('./directives/report_summary_extra'))\n .directive('reportSummaryText', require('./directives/report_summary_text'))\n .directive('reportSummaryTitle', require('./directives/report_summary_title'))\n .directive('reportSurvivorStringAppend', require('./directives/report_survivor_string_append'))\n .directive('reportTestMethodology', require('./directives/report_test_methodology'))\n .directive('reportTopNavigation', require('./directives/report_top_navigation'))\n .directive('reportValidity', require('./directives/report_validity'))\n .directive('reportVus', require('./directives/report_vus'))\n .directive('sampleLetterMailto', require('./directives/sample_letter_mailto'))\n\n // Wisdom-specific directives\n .directive('wisdomReportSummaryExtra', require('./directives/wisdom_report_summary_extra'))\n .directive('wisdomReportTestMethodology', require('./directives/wisdom_report_test_methodology'))\n\n // FH report directives\n .directive('fhAboutTheGene', require('./directives/fh/about_the_gene'))\n .directive('fhConnectWithOthers', require('./directives/fh/connect_with_others'))\n .directive('fhCoronaryHeartDisease', require('./directives/fh/coronary_heart_disease'))\n .directive('fhFamilyImpact', require('./directives/fh/family_impact'))\n .directive('fhGeneralQuestions', require('./directives/fh/general_questions'))\n .directive('fhGuidelines', require('./directives/fh/guidelines'))\n .directive('fhShareFamily', require('./directives/fh/share_family'))\n .directive('fhSummaryChart', require('./directives/fh/summary_chart'))\n .directive('fhSummaryText', require('./directives/fh/summary_text'))\n .directive('fhSummaryTitle', require('./directives/fh/summary_title'))\n","/**\n * @prettier\n */\n\nmodule.exports = function($http) {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n report: '=',\n },\n templateUrl: '/results/called_diplotypes.html',\n link: function(scope) {\n scope.diplotypeCalls = [];\n if (scope.report.sample_sequence_run) {\n scope.loading = true;\n $http\n .get(`/api/v1/diplotype_calls?sample_sequence_run=${scope.report.sample_sequence_run.id}`)\n .then(res => {\n scope.diplotypeCalls = res.data.results;\n })\n .finally(() => {\n scope.loading = false;\n });\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function($filter, $http) {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n report: '=',\n },\n templateUrl: '/results/diplotype_call_details.html',\n link: function(scope) {\n scope.diplotypeCalls = [];\n if (scope.report.sample_sequence_run) {\n scope.loading = true;\n $http\n .get(`/api/v1/diplotype_calls?sample_sequence_run=${scope.report.sample_sequence_run.id}`)\n .then(res => {\n scope.diplotypeCalls = res.data.results;\n })\n .finally(() => {\n scope.loading = false;\n });\n }\n\n scope.toggleNeutral = () => {\n scope.showNeutral = !scope.showNeutral;\n };\n\n scope.filterNeutral = variant => {\n return scope.showNeutral || variant.effect != 'NEUTRAL';\n };\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function calledVariants($window, sampleRunVariants, sangerDataModal) {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n report: '=',\n },\n templateUrl: '/results/called_variants.html',\n link: function(scope) {\n scope.showBenignVariants = true;\n scope.toggleAndReload = function() {\n // Invert the value of `showBenignVariants` and reload sampleRunVariants.\n scope.showBenignVariants = !scope.showBenignVariants;\n if (scope.report.sample_sequence_run) {\n scope.sampleRunVariants = sampleRunVariants(\n scope.report,\n scope.showBenignVariants ? null : 'True'\n );\n scope.sampleRunVariants.load();\n }\n };\n\n scope.openSangerPlots = function($event, confirmation) {\n // Each row in the table is itself a link to a variant classification page. When\n // openSangerPlots is called, we only want to open a modal, not follow the link to\n // the classification page\n $event.stopPropagation();\n sangerDataModal.open(confirmation);\n };\n\n scope.toggleAndReload();\n scope.viewClassification = function(classification) {\n $window.open('/variant_classifications/' + classification.id + '/show');\n };\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportedData(\n $window,\n testOutcome,\n classification,\n ReportedData,\n sangerDataModal\n) {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n report: '=',\n showDetails: '=',\n },\n templateUrl: '/results/reported_data.html',\n link: function(scope) {\n scope.testOutcome = testOutcome;\n scope.classification = classification;\n scope.showBenignVariants = false;\n\n if (scope.report.clinical_result) {\n scope.loading = true;\n ReportedData.get({ id: scope.report.clinical_result }).$promise.then(function(res) {\n scope.reportedData = res;\n scope.loading = false;\n });\n }\n\n scope.toggleShowBenign = function() {\n scope.showBenignVariants = !scope.showBenignVariants;\n };\n scope.openSangerPlots = function($event, confirmation) {\n // Each row in the table is itself a link to a variant classification page. When\n // openSangerPlots is called, we only want to open a modal, not follow the link to\n // the classification page\n $event.stopPropagation();\n sangerDataModal.open(confirmation);\n };\n scope.viewClassification = function(classification_id) {\n $window.open('/variant_classifications/' + classification_id + '/show');\n };\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function confirmationInfo() {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n validation: '=',\n confirmations: '=',\n },\n templateUrl: '/results/confirmation_info.html',\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function familyTestingInfo() {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n invitee: '=',\n },\n templateUrl: '/results/family_testing_info.html',\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function highlightedHealthHistory($filter) {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n healthHistory: '=',\n clinicalDomain: '=',\n },\n templateUrl: '/results/highlighted_health_history.html',\n link: function(scope, elem) {\n scope.personalHistory = [];\n\n if (scope.healthHistory.had_bone_marrow_transplant_or_blood_transfusion) {\n if (\n !scope.healthHistory.had_bone_marrow_transplant &&\n !scope.healthHistory.had_blood_transfusion\n ) {\n scope.personalHistory.push('Had a bone marrow transplant or blood transfusion');\n } else {\n if (scope.healthHistory.had_bone_marrow_transplant) {\n scope.personalHistory.push('Had a bone marrow transplant');\n }\n if (scope.healthHistory.had_blood_transfusion) {\n const parts = ['Had blood transfusion'];\n if (scope.healthHistory.had_blood_transfusion_in_the_week_before_providing_sample) {\n parts.push('in the week before providing the sample');\n }\n if (\n scope.healthHistory.had_blood_transfusion_in_the_week_before_providing_sample ===\n false\n ) {\n parts.push('more than a week before providing the sample');\n }\n scope.personalHistory.push(parts.join(' '));\n }\n }\n }\n\n if (scope.healthHistory.had_liver_transplant) {\n scope.personalHistory.push('Had liver transplant');\n }\n\n function appendAge(text, age) {\n if (age !== undefined && age !== null) {\n return `${text} at ${age} ${age > 1 ? 'years' : 'year'} old`;\n }\n return text;\n }\n\n function addMutations(mutations) {\n if (mutations) {\n mutations.forEach(m => {\n let text = `A mutation was identified in ${m.gene}`;\n if (m.name) {\n text = `${text} (${m.name})`;\n }\n scope.personalHistory.push(text);\n });\n }\n }\n\n if (scope.clinicalDomain == 'cancer') {\n scope.completed = scope.healthHistory.cancer_completed;\n const profile =\n scope.healthHistory.female_health_profile || scope.healthHistory.male_health_profile;\n if (profile) {\n if (profile.had_breast_biopsy_with_atypical_hyperplasia == 'Y') {\n scope.personalHistory.push('Had breast biopsies with atypical hyperplasia');\n }\n if (profile.diagnosed_with_lobular_carcinoma_in_situ == 'Y') {\n scope.personalHistory.push('Diagnosed with LCIS');\n }\n profile.cancers.forEach(c => {\n let text = $filter('capitalize')(c.name);\n text = appendAge(text, c.diagnosed_age);\n if (c.affected_both === true) {\n text = `${text}, affecting both breasts`;\n } else if (c.affected_both === false) {\n text = `${text}, affecting one breasts`;\n }\n scope.personalHistory.push(text);\n });\n }\n\n addMutations(scope.healthHistory.mutations);\n\n scope.familyNone =\n scope.healthHistory.id &&\n scope.healthHistory.family_relative_health_profiles.length &&\n !$filter('anyRelativeHadMutation')(\n scope.healthHistory.family_relative_health_profiles,\n scope.clinicalDomain\n ) &&\n !$filter('anyRelativeHadCancer')(scope.healthHistory.family_relative_health_profiles);\n } else if (scope.clinicalDomain == 'cardio') {\n scope.completed = scope.healthHistory.cardio_completed;\n if (scope.healthHistory.cardio_history) {\n scope.healthHistory.cardio_history.forEach(c => {\n let text = $filter('capitalize')(c.name);\n text = appendAge(text, c.age);\n scope.personalHistory.push(text);\n });\n }\n\n addMutations(scope.healthHistory.cardio_mutations);\n\n scope.familyNone =\n scope.healthHistory.id &&\n scope.healthHistory.family_relative_health_profiles.length &&\n !$filter('anyRelativeHadMutation')(\n scope.healthHistory.family_relative_health_profiles,\n scope.clinicalDomain\n ) &&\n !$filter('anyRelativeHadCardioHistory')(\n scope.healthHistory.family_relative_health_profiles\n );\n } else if (scope.clinicalDomain == 'medication') {\n scope.completed = scope.healthHistory.medication_completed;\n if (scope.healthHistory.medication_history) {\n scope.healthHistory.medication_history.forEach(m => {\n scope.personalHistory.push(m);\n });\n }\n }\n },\n };\n};\n","module.exports = function knownVariants($http, reviewKnownVariantModal, confirmTrueNegativeModal) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n reportId: '=',\n reportedVariants: '=',\n },\n templateUrl: '/results/known_variants.html',\n link: function(scope) {\n const refreshReportedVariants = () => {\n $http.get(`/api/v1/reports/${scope.reportId}/reported_variants`)\n .then(response => scope.reportedVariants = response.data)\n }\n refreshReportedVariants()\n\n scope.reviewVariant = (reportedVariant) => {\n const modal = reviewKnownVariantModal.open(reportedVariant.id)\n modal.result.then(refreshReportedVariants)\n }\n\n scope.confirmTrueNegative = (reportedVariant) => {\n const modal = confirmTrueNegativeModal.open(reportedVariant.id)\n modal.result.then(refreshReportedVariants)\n }\n\n }\n }\n}\n","/**\n * @prettier\n */\n\nmodule.exports = function qcMetrics(SampleSequenceRun) {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n report: '=',\n },\n templateUrl: '/results/qc_metrics.html',\n link: function(scope) {\n scope.sampleSequences = [];\n SampleSequenceRun.get({\n sample: scope.report.sample.id,\n test_type__icontains: scope.report.kit_order.test_type,\n }).$promise.then(function(res) {\n scope.sampleSequences = res.results;\n });\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportedMutations() {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n mutations: '=',\n },\n templateUrl: '/results/reported_mutations.html',\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportInfo(\n $filter,\n testTypes,\n OrderLog,\n reportSignedOffState,\n HealthHistory,\n clinicalDomains\n) {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n report: '=',\n isAnonymized: '=',\n },\n templateUrl: '/results/report_info.html',\n link: function(scope) {\n const report = scope.report;\n const isCovidReport = report.kit_order.test_type == testTypes.covid19;\n const isInOrderingPhysicianReview = report.state == reportSignedOffState;\n scope.testTypes = testTypes;\n scope.sample = report.sample;\n scope.clinicalDomain = clinicalDomains[report.kit_order.test_type];\n scope.healthHistory = new HealthHistory(report.user.health_profile || {});\n if (report.user.health_profile) {\n scope.healthHistoryUrl =\n '/clinical/v2/support/generic-health-history/show/' +\n report.user.health_profile.id +\n '/summary';\n }\n\n // Key info tab\n scope.showKeyInfoTab = !isInOrderingPhysicianReview && !isCovidReport;\n // Health history tab\n scope.showHealthHistoryTab =\n !isInOrderingPhysicianReview && report.require_health_history_collection && !isCovidReport;\n // Known Variants tab\n scope.showKnownVariants =\n !scope.isAnonymized && !isInOrderingPhysicianReview && !isCovidReport;\n // QC tab\n scope.showQCTab = !scope.isAnonymized && !isInOrderingPhysicianReview && !isCovidReport;\n\n if (!scope.isAnonymized) {\n // Report tabs\n if (report.state == 'new') {\n // If it's in new state, show v2 if it qualifies.\n scope.showReportV1Tab = scope.report.result_is_ready && !report.ready_for_v2_prod;\n scope.showReportV2Tab = scope.report.result_is_ready && report.ready_for_v2_prod;\n } else {\n // If it's not in new state, show v2 if it has v2 contents.\n scope.showReportV1Tab = !report.has_v2;\n scope.showReportV2Tab = report.has_v2;\n }\n }\n\n // Log tab\n if (!scope.isAnonymized) {\n OrderLog.get({ kit_order__order_number: report.kit_order.order_number }).$promise.then(\n function(res) {\n scope.eventLogs = res.results;\n }\n );\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportLogs() {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n logs: '=',\n },\n templateUrl: '/results/report_event_logs.html',\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function(\n $sce,\n $http,\n $raven,\n ngToast,\n $routeParams,\n handleReportClick,\n marked,\n testTypes,\n waffle\n) {\n 'ngInject';\n\n return {\n restrict: 'E',\n scope: {\n report: '=',\n forProd: '=',\n },\n templateUrl: '/results/directives/report_v2_preview.html',\n link: function(scope) {\n // For web reports that are on `src/projects/home/frontend`, the web app itself fetches report payload.\n const requireFetchingPayload = true;\n scope.iframeWidth = '100%';\n scope.iframeHeight = '100%';\n // PGx web reports are implemented in www react app (src/projects/home/frontend).\n if (scope.report.kit_order.test_type === testTypes.pgxv1) {\n scope.reportURL = $sce.trustAsResourceUrl(`/report/${scope.report.id}/web_report`);\n } else if (scope.report.has_v2) {\n scope.reportURL = $sce.trustAsResourceUrl(`/report/${scope.report.id}/web_report`);\n } else {\n scope.reportURL = $sce.trustAsResourceUrl(`/report/sample_web_report`);\n }\n\n // Render the report using the new report page when the 'show_react_web=true'\n // query parameter is detected. This supports the ongoing integration of\n // src/reports from a separate project into the main codebase.\n // During the transition, it's necessary to maintain both the old and new\n // report views in clinical to ensure a smooth migration to the updated system.\n if ($routeParams.show_react_web && $routeParams.show_react_web === 'true') {\n scope.reportURL = $sce.trustAsResourceUrl(\n `/results-v3/report/view?reportId=${scope.report.id}`\n );\n scope.iframeHeight = '7500px';\n }\n\n scope.reportErrors = [];\n const reportShareFamilyData = {\n msgMarkdownSampleLetter: 'Sample letter.',\n };\n scope.canGenerate = scope.report.state == 'new';\n scope.generatingV2 = false;\n scope.regenerateReport = () => {\n scope.generatingV2 = true;\n $http\n .post(`api/v1/generate_report_v2/${scope.report.id}`)\n .then(() => {\n window.location.reload(true);\n })\n .catch(err => {\n scope.reportErrors.push(err);\n scope.generatingV2 = false;\n });\n };\n\n if (requireFetchingPayload) {\n scope.reportFrameOnload = () => {\n const iframe = angular.element('#reportFrame')[0];\n window.setTimeout(() => {\n window.iFrameResize(\n {\n checkOrigin: false,\n heightCalculationMethod: 'documentElementOffset',\n },\n '#reportFrame'\n );\n }, 500);\n\n iframe.contentWindow.addEventListener('click', e => {\n handleReportClick(e, reportShareFamilyData, scope.report.test_type, '1234', '');\n });\n\n function updateShareFamilyData(report_payload) {\n reportShareFamilyData.msgMarkdownSampleLetter = '';\n report_payload.components.share_family_letter.content.map(c => {\n reportShareFamilyData.msgMarkdownSampleLetter += marked(c);\n });\n }\n\n // handle report info\n const handleError = function(error) {\n let msg = '';\n if (!error || !error.data) {\n console.error('Unknown internal server error');\n } else {\n msg = angular.toJson(error.data);\n if (error.data['non_field_errors']) {\n // Truncate this msg's non-field errors because v2 report exceptions can be\n // massive due to the JSON Schema-based object it's based and Sentry rejects\n // large requests.\n // Related issue: https://getcolor.atlassian.net/browse/SUPPORT-6741\n msg = error.data['non_field_errors']\n .slice(0, 5)\n .join(', ')\n .substring(0, 1024);\n }\n }\n\n if (msg) {\n $raven.captureMessage(msg);\n scope.reportErrors.push(msg);\n }\n };\n if (!scope.report.has_v2) {\n $http\n .get(`api/v1/report_info/${scope.report.id}?preview=1`, {\n internalServerErrorToast: true,\n ignoreRequestErrorHandling: true,\n })\n .then(result => {\n delete result.data.note;\n return $http.post('api/v1/generate_v2_report_from_report_info', result.data, {\n internalServerErrorToast: true,\n ignoreRequestErrorHandling: true,\n });\n })\n .then(res => {\n if (res && res.data) {\n const store = iframe.contentWindow.ReportStore;\n store.update(res.data);\n updateShareFamilyData(res.data);\n }\n })\n .catch(handleError);\n } else {\n $http\n .get(`report/${scope.report.id}/data.json`, {\n internalServerErrorToast: true,\n ignoreRequestErrorHandling: true,\n })\n .then(res => {\n if (res && res.data) {\n updateShareFamilyData(res.data);\n }\n })\n .catch(handleError);\n }\n };\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportRevision() {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n revision: '=',\n },\n templateUrl: '/results/rerelease.html',\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportSummary(\n $filter,\n $location,\n $route,\n $http,\n auth,\n testTypes,\n ngToast,\n testOutcome,\n addReleaseGroupHoldModal,\n removeReleaseGroupHoldModal,\n withdrawReleaseGroupModal,\n addReportReviewNoteModal,\n releaseToPhysicianModal,\n textSaveModal,\n approveReleaseModal,\n releaseToPathologistModal,\n changeReportStateModal,\n rereleaseModal,\n reportNewState,\n reportContentReviewedState,\n reportQueuedforBoardReviewState,\n reportPreparedForBoardReviewState,\n reportBoardReviewedState,\n reportSignedOffState,\n reportReleaseGatedState,\n reportSentToPhysicianState,\n reportReleaseApprovedState,\n reportReleasedState,\n reportReleaseReadyState,\n clinicalDomains\n) {\n 'ngInject';\n\n return {\n restrict: 'AE',\n scope: {\n report: '=',\n isAnonymized: '=',\n },\n templateUrl: '/results/report_summary.html',\n link: function(scope) {\n const report = scope.report;\n const isPreRelease =\n [\n reportNewState,\n reportQueuedforBoardReviewState,\n reportPreparedForBoardReviewState,\n reportContentReviewedState,\n reportBoardReviewedState,\n reportSignedOffState,\n reportReleaseGatedState,\n reportReleaseApprovedState,\n ].indexOf(report.state) != -1;\n\n const isNonTerminalState =\n [\n reportNewState,\n reportQueuedforBoardReviewState,\n reportPreparedForBoardReviewState,\n reportContentReviewedState,\n reportBoardReviewedState,\n reportSignedOffState,\n reportReleaseGatedState,\n reportReleaseApprovedState,\n reportSentToPhysicianState,\n reportReleaseReadyState,\n ].indexOf(report.state) != -1;\n\n const pathologistReview =\n report.state == reportContentReviewedState || report.state == reportBoardReviewedState;\n\n const isAnonymized = scope.isAnonymized;\n\n scope.showReleaseToPathologistBtn =\n !isAnonymized && report.state == reportNewState && report.result_is_ready;\n scope.showReleaseToGeneticsBoardBtn =\n !isAnonymized && report.state == reportQueuedforBoardReviewState;\n scope.showMarkAsReviewedByGeneticsBoardBtn =\n !isAnonymized && report.state == reportPreparedForBoardReviewState;\n scope.showReleaseToPhysicianBtn = !isAnonymized && pathologistReview;\n if (scope.showReleaseToPhysicianBtn) {\n // Only NY CQ holders can sign out NY reports\n // But other pathologists can still approve the sign out\n scope.canSignOut = !report.sample.for_ny || auth.currentUser.is_ny_cq_holder;\n }\n scope.showApproveReleaseBtn = !isAnonymized && report.state == reportSignedOffState;\n scope.showAddNoteBtn = !isAnonymized && isPreRelease;\n scope.showSendToOrderingPhysicianBtn =\n !isAnonymized &&\n report.state == reportReleaseApprovedState &&\n report.existing_physician_order;\n scope.showReadyForReleaseBtn =\n !isAnonymized &&\n report.state == reportReleaseApprovedState &&\n !report.existing_physician_order;\n scope.showRereleaseBtn =\n report.state == reportReleasedState ||\n (!report.release_to_patient && report.state == reportSentToPhysicianState);\n\n scope.sample = report.sample;\n scope.healthHistory = report.user.health_profile || {};\n scope.testTypes = testTypes;\n scope.openAddNoteModal = function(report) {\n addReportReviewNoteModal.open(report).result.then(function() {\n ngToast.create('Note added');\n });\n };\n scope.rereleaseModal = rereleaseModal;\n\n scope.clinicalDomain = clinicalDomains[report.kit_order.test_type];\n\n // Format uploaded filenames. The elements in uploaded_s3_keys look like\n // 'documents/1/2016-02-19T15:09:48.212992_file_name.jpg'\n if (report.provider_upload_s3_keys) {\n scope.report.uploaded_filenames = report.provider_upload_s3_keys.map(\n $filter('getFileNameFromS3Key')\n );\n }\n\n scope.dropdownOpened = false;\n\n const showRequestGeneticsBoardReviewBtn = !isAnonymized && pathologistReview;\n const showSendBackForContentReview =\n !isAnonymized && isPreRelease && report.state != reportNewState;\n const showReviewedHHChange = report.state == reportReleasedState;\n const showPutOnHold = !isAnonymized && isNonTerminalState && !scope.report.on_hold;\n const showTakeOffHold = !isAnonymized && isNonTerminalState && scope.report.on_hold;\n const showInstantReportTool =\n !isAnonymized &&\n report.state == reportNewState &&\n auth.currentUser.permissions['results.can_use_instant_report'];\n // TODO(tally38): We are still figuring out who will get permissions for this tool.\n // For now, I am restricting it to can_use_instant_report, but I will create a new\n // permission class for retracting reports in a separate PR once i have more details.\n // There is a chance we will not need to limit permissions on this.\n const showQueueRetractionOption =\n !isAnonymized &&\n report.state == reportReleasedState &&\n auth.currentUser.permissions['results.can_use_instant_report'];\n const showGenerateReportData =\n !isAnonymized &&\n report.state == reportNewState &&\n report.test_outcome != testOutcome.non_reportable &&\n auth.currentUser.permissions['results.can_generate_clinical_results'];\n\n const putOnHoldOption = { show: showPutOnHold, onClick: putOnHold, label: 'Put on hold' };\n const putOffHoldOption = {\n show: showTakeOffHold,\n onClick: takeOffHold,\n label: 'Take off hold',\n };\n\n function requestGeneticsBoardReview(report) {\n const state = report.state;\n scope.dropdownOpened = false;\n changeReportStateModal\n .open(\n report,\n 'genetics_board_review_required',\n 'Request Genetics Board Review',\n 'Request',\n 'Review needed because...'\n )\n .result.then(function() {\n $location.path('/reports/content_reviewed,board_reviewed/list');\n });\n }\n\n function sendBackForContentReview(report) {\n const state = report.state;\n scope.dropdownOpened = false;\n changeReportStateModal\n .open(\n report,\n 'sent_back_for_content_review',\n 'Send Back for Content Review',\n 'Send',\n 'Send back because...'\n )\n .result.then(function() {\n $location.path('/reports/content_reviewed,board_reviewed/list');\n });\n }\n\n function putOnHold(report) {\n scope.dropdownOpened = false;\n\n // TODO (LABX-4368): Simplify this branching logic once we're using ReleaseGroups for all reports\n if (report.release_group.release_group_id) {\n addReleaseGroupHoldModal\n .open(report.release_group.release_group_id)\n .result.then(() =>\n ngToast.create(\n `ReleaseGroup ${report.release_group.release_group_id} has been put on hold.`\n )\n )\n .then($route.reload);\n } else {\n report.put_on_hold = true;\n report.reason = '';\n textSaveModal\n .open(\n 'Put report on hold',\n 'Put on hold',\n 'Please specify the reason...',\n report,\n 'reason'\n )\n .result.then(() => {\n ngToast.create('The report has been put on hold.');\n putOnHoldOption.show = false;\n putOffHoldOption.show = true;\n })\n .finally(() => {\n delete report.put_on_hold;\n });\n }\n }\n\n function takeOffHold(report) {\n // TODO (LABX-4368): Simplify this branching logic once we're using ReleaseGroups for all reports\n if (report.release_group.release_group_id && report.release_group.active_holds.length > 0) {\n removeReleaseGroupHoldModal\n .open(report.release_group, report.release_group.active_holds[0])\n .result.then(() =>\n ngToast.create(\n `A hold on Release Group ${report.release_group.release_group_id} has been removed.`\n )\n )\n .then($route.reload);\n } else {\n scope.dropdownOpened = false;\n report.take_off_hold = true;\n return report\n .$save()\n .then(function() {\n ngToast.create('The report has been taken off hold.');\n putOnHoldOption.show = true;\n putOffHoldOption.show = false;\n })\n .finally(function() {\n delete report.take_off_hold;\n });\n }\n }\n\n const generateReportedData = report => {\n scope.dropdownOpened = false;\n $http.put(`/api/v1/reports/${report.id}/generate_clinical_result`).then(() => {\n ngToast.create('The report data has been generated.');\n $route.reload();\n });\n };\n\n function goToInstantReportTool(report) {\n const newWindow = window.open('/adminresults/report/' + report.id + '/change/', '_blank');\n if (newWindow) {\n /**\n * See https://getcolor.atlassian.net/browse/ENG-584\n * ExternalLink opens in a new tab, while ensuring that the link protects from:\n * https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/\n * https://mathiasbynens.github.io/rel-noopener\n * See lint rule react/jsx-no-target-blank\n */\n newWindow.opener = null;\n }\n }\n\n function queueRetraction(report) {\n scope.rereleaseModal.open(report.id, true);\n }\n\n function markAsHHChangeReviewed(report) {\n scope.dropdownOpened = false;\n $http.put('/api/v1/reports/' + report.id + '/mark_as_hh_update_reviewed').then(function() {\n ngToast.create('Marked as health history reviewed no rerelease required.');\n });\n }\n\n function withdraw(report) {\n scope.dropdownOpened = false;\n\n // TODO (LABX-4368): Simplify this branching logic once we're using ReleaseGroups for all reports\n if (report.release_group.release_group_id) {\n withdrawReleaseGroupModal\n .open(report.release_group.release_group_id)\n .result.then(() =>\n ngToast.create(\n `ReleaseGroup ${report.release_group.release_group_id} has been withdrawn.`\n )\n )\n .then(function() {\n $location.path('/reports/new/list');\n });\n } else {\n $http.put('/api/v1/reports/' + report.id + '/withdraw').then(function() {\n ngToast.create('Withdrew the report.');\n $location.path('/reports/new/list');\n });\n }\n }\n\n scope.dropdownOptions = [\n {\n show: showRequestGeneticsBoardReviewBtn,\n onClick: requestGeneticsBoardReview,\n label: 'Request Genetics Board Review',\n },\n {\n show: showSendBackForContentReview,\n onClick: sendBackForContentReview,\n label: 'Send Back for Content Review',\n },\n putOnHoldOption,\n putOffHoldOption,\n {\n show: showReviewedHHChange,\n onClick: markAsHHChangeReviewed,\n label: 'Reviewed HH change and no rerelease required',\n },\n {\n show:\n (report.revision || auth.currentUser.permissions['results.withdraw_report']) &&\n isPreRelease,\n onClick: withdraw,\n label: 'Withdraw',\n },\n {\n show: showGenerateReportData,\n onClick: generateReportedData,\n label: 'Generate Report Data',\n },\n {\n show: showInstantReportTool,\n onClick: goToInstantReportTool,\n label: 'Instant Report Tool',\n },\n {\n show: showQueueRetractionOption,\n onClick: queueRetraction,\n label: 'Queue Retraction',\n },\n ];\n scope.showDropdown = scope.dropdownOptions.some(function(o) {\n return o.show;\n });\n\n scope.releaseToPathologist = function(report) {\n if (!report.generated_content) {\n ngToast.create({\n className: 'error',\n content: 'A template must be applied before releasing to pathologist.',\n });\n return;\n }\n releaseToPathologistModal.open([report]).result.then(function() {\n report.kit_order.test_type === testTypes.covid19\n ? $location.path('/covid_reports/list')\n : $location.path('/reports/new/list');\n });\n };\n\n scope.releaseToGeneticsBoard = function(report) {\n scope.releasing = true;\n report.genetics_board_review_prepared = true;\n report\n .$save()\n .then(function() {\n $location.path('/reports/queued_for_board_review/list');\n })\n .finally(function() {\n scope.releasing = false;\n });\n };\n\n scope.markAsReviewedByGeneticsBoard = function(report) {\n scope.releasing = true;\n report.genetics_board_reviewed = true;\n report\n .$save()\n .then(function() {\n $location.path('/reports/prepared_for_board_review/list');\n })\n .finally(function() {\n scope.releasing = false;\n });\n };\n\n scope.releaseToPhysician = function(report) {\n const reportsToSignOut = [];\n const reportsToApprove = [];\n if (scope.canSignOut) {\n reportsToSignOut.push(report);\n } else {\n reportsToApprove.push(report);\n }\n releaseToPhysicianModal.open(reportsToSignOut, reportsToApprove).result.then(function() {\n $location.path('/reports/content_reviewed,board_reviewed/list');\n });\n };\n\n scope.approveRelease = function(report) {\n const state = report.state;\n approveReleaseModal.open([report]).result.then(function() {\n $location.path('/reports/' + state + '/list');\n });\n };\n\n function updateReportState(report, state) {\n scope.releasing = true;\n report[state] = true;\n report\n .$save()\n .then(function() {\n $location.path(`/reports/${state}/list`);\n })\n .finally(function() {\n scope.releasing = false;\n });\n }\n\n scope.readyForRelease = function(report) {\n updateReportState(report, 'release_ready');\n };\n\n scope.sendToOrderingPhysician = function(report) {\n updateReportState(report, 'send_to_ordering_physician');\n };\n\n scope.toggleDropdown = function() {\n scope.dropdownOpened = !scope.dropdownOpened;\n };\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportTags() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_tags.html',\n scope: {\n report: '=',\n },\n link: function(scope) {\n const tags = [];\n if (scope.report.on_hold) {\n tags.push({ label: 'on hold', cssClass: 'tag-warning' });\n }\n if (scope.report.revision) {\n tags.push({ label: 'rerelease', cssClass: 'tag-rerelease' });\n }\n if (scope.report.sample.for_ny) {\n tags.push({ label: 'NY', cssClass: 'tag-ny' });\n }\n if (scope.report.is_ftp) {\n tags.push({ label: 'FTP', cssClass: 'tag-primary' });\n }\n if (scope.report.reviewed_by_vcc) {\n tags.push({ label: 'VCC', cssClass: 'tag-primary' });\n }\n if (scope.report.partner_name) {\n tags.push({ label: scope.report.partner_name, cssClass: 'tag-primary' });\n }\n if (scope.report.user.is_minor) {\n tags.push({ label: 'minor', cssClass: 'tag-primary' });\n }\n scope.tags = tags;\n scope.report.reportTags =\n tags.map(function(t) {\n return t.label;\n }) + [''];\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportTemplate(\n $rootScope,\n $filter,\n resourcePaginator,\n indexedResource,\n Reference,\n ngToast,\n setReportContentTemplateModal,\n reportNewState,\n reportSignedOffState,\n classification\n) {\n 'ngInject';\n\n // TODO: V1 reports are no longer supported. Delete this.\n return {\n restrict: 'AE',\n scope: {\n report: '=',\n },\n templateUrl: '/results/report_template.html',\n link: function(scope) {\n const report = scope.report;\n const isNonReportable =\n !report.sample_sequence_run || report.sample_sequence_run.state == 'rejected';\n\n scope.showReportTemplateHeader = report.state != reportSignedOffState;\n // We automatically apply template for non-reportable cases.\n scope.showReportEditButton = report.state == reportNewState && !isNonReportable;\n\n let genes = [];\n for (const m of report.gene_mutations) {\n if (\n m.classification == classification.p ||\n m.classification == classification.lp ||\n m.classification == classification.ras\n ) {\n if (!genes.includes(m.gene)) {\n genes.push(m.gene);\n }\n }\n }\n genes = genes.sort().join(',');\n const params = {\n gene: genes,\n is_negative: genes ? 'False' : 'True',\n is_non_reportable: isNonReportable ? 'True' : 'False',\n gender: report.user.gender,\n test_type: report.kit_order.test_type,\n };\n\n if (isNonReportable) {\n delete params.gene;\n delete params.gender;\n delete params.is_negative;\n }\n\n // Applying V1 templates is no longer supported. All of this code will be delted in the future.\n scope.disableApplyTemplateButton = true;\n\n scope.templates = [];\n scope.selectedTemplate = null;\n\n scope.changeActiveReportTemplateSection = function(section) {\n scope.activeReportTemplateSection = section;\n if (section == 'select') {\n scope.showPDFTab = false;\n }\n };\n\n scope.changeActiveReportTemplateSection(report.template ? 'show' : 'select');\n\n scope.references = indexedResource(new Reference());\n scope.references.load();\n\n scope.changeTemplate = function(selectedTemplate) {\n if (selectedTemplate.id == 'new') {\n scope.changeActiveReportTemplateSection('create');\n const options = scope.templates.slice(0, scope.templates.length - 1);\n setReportContentTemplateModal\n .open(options)\n .result.then(function(templateToCopy) {\n // We are in the process of deleting references to the Template model.\n scope.newTemplate = null;\n })\n .catch(function() {\n scope.changeActiveReportTemplateSection('select');\n scope.selectedTemplate = scope.templates[0];\n });\n }\n };\n\n scope.onNewTemplateCreated = function(template) {\n // Insert a new item one before the last item.\n scope.templates.splice(scope.templates.length - 1, 0, template);\n scope.changeTemplate(template);\n scope.selectedTemplate = template;\n scope.changeActiveReportTemplateSection('select');\n };\n\n scope.onNewTemplateCancelled = function() {\n scope.changeActiveReportTemplateSection('select');\n };\n\n scope.applyTemplate = function(report, selectedTemplate) {\n scope.applying = true;\n report.template = selectedTemplate.id;\n report.apply_template = true;\n return report\n .$save()\n .then(function() {\n ngToast.create('Template applied.');\n scope.changeActiveReportTemplateSection('show');\n scope.showPDFTab = true;\n $rootScope.$broadcast('pdf:reload');\n })\n .finally(function() {\n scope.applying = false;\n });\n };\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_question.html',\n replace: true,\n scope: {\n reportContent: '=',\n question: '=',\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function ltrLegend() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/ltr_legend.html',\n controllerAs: 'ctrl',\n replace: true,\n bindToController: true,\n scope: {\n riskLabel: '@',\n riskReferences: '=',\n baselineLabel: '@?',\n baselineReferences: '=?',\n },\n controller: function() {\n const ctrl = this;\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function ltrTable($filter, testTypes, testOutcome) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/ltrTable.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n // Card is only shown for H30 negative reports currently\n scope.showCard =\n scope.reportContent.template.test_type == testTypes.hereditary30 &&\n scope.reportContent.test_outcome == testOutcome.negative;\n if (scope.showCard) {\n scope.lowerAge = 50; // TODO: pick lower age based on subjects birthdate and report date, rounded up to nearest available risk stat\n scope.upperAge = 95;\n\n let phenotypes = [];\n if (scope.reportContent.gender == 'F') {\n phenotypes = [\n 'uterine cancer',\n 'melanoma',\n 'pancreatic cancer',\n 'ovarian cancer',\n 'stomach cancer',\n ];\n } else {\n phenotypes = ['male breast cancer', 'melanoma', 'pancreatic cancer', 'stomach cancer'];\n }\n\n // Adjust phenotypes for cancer survivors\n if (scope.reportContent.breast_cancer_survivor && scope.reportContent.gender == 'M') {\n phenotypes.splice(phenotypes.indexOf('male breast cancer'), 1);\n }\n if (\n scope.reportContent.ovarian_cancer_survivor ||\n scope.reportContent.fallopian_tube_cancer_survivor ||\n scope.reportContent.primary_peritoneal_cancer_survivor\n ) {\n // Ovarian, Fallopian Tube, and Primary Peritoneal affect ovarian cancer risks\n phenotypes.splice(phenotypes.indexOf('ovarian cancer'), 1);\n }\n if (scope.reportContent.endometrial_cancer_survivor) {\n phenotypes.splice(phenotypes.indexOf('uterine cancer'), 1);\n }\n if (scope.reportContent.gastric_cancer_survivor) {\n phenotypes.splice(phenotypes.indexOf('stomach cancer'), 1);\n }\n if (scope.reportContent.melanoma_survivor) {\n phenotypes.splice(phenotypes.indexOf('melanoma'), 1);\n }\n if (scope.reportContent.pancreatic_cancer_survivor) {\n phenotypes.splice(phenotypes.indexOf('pancreatic cancer'), 1);\n }\n\n // Forces how SEER citation if double survivor depending on each gender\n if (\n scope.reportContent.colorectal_cancer_survivor &&\n ((scope.reportContent.gender == 'F' && scope.reportContent.breast_cancer_survivor) ||\n (scope.reportContent.gender == 'M' && scope.reportContent.prostate_cancer_survivor))\n ) {\n scope.showSeerCitation = true;\n }\n\n scope.tableData = [];\n angular.forEach(phenotypes, function(phenotype) {\n scope.tableData.push({\n phenotype: phenotype,\n lowerAgeRisk: $filter('getSingleRisk')(\n scope.reportContent.risks,\n scope.reportContent.gender,\n phenotype,\n scope.lowerAge\n ),\n upperAgeRisk: $filter('getSingleRisk')(\n scope.reportContent.risks,\n scope.reportContent.gender,\n phenotype,\n scope.upperAge\n ),\n });\n });\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function ltrTimechart($filter, testTypes) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/ltr_timechart.html',\n replace: true,\n scope: {\n riskData: '=',\n testType: '=',\n },\n link: function(scope, elem) {\n // We potentially mangle data later for display purposes\n scope.timechartRiskData = angular.copy(scope.riskData);\n\n // Only negative reports\n if (scope.timechartRiskData.gene == '') {\n // All Female Negative, and H30 Male Negative\n scope.showNegativeMultiChart =\n scope.timechartRiskData.gender == 'F' || scope.testType == testTypes.hereditary30;\n // Only triggered for BO19 Male Negative\n scope.showNegativeSingleChart = !scope.showNegativeMultiChart;\n }\n\n // Add STK11-specific asterisk if age exception exists\n scope.hasAgeExceptionsAt = $filter('hasAgeExceptionsAt')(\n scope.timechartRiskData.risks.pathogenic\n );\n\n scope.setHeight = function(num, adj) {\n return $filter('barChartHeight')(num, adj) + '%';\n };\n scope.setLabelHeight = function(num) {\n return $filter('barChartHeight')(num, 2.5) + '%';\n };\n scope.setHeightBottom = function(num, adj) {\n return $filter('barChartHeight')(num, adj, 0) + '%';\n };\n // Used to get the baseline risk matching the pathogenic risk associated, by age\n scope.getBaselineRisk = function(risk) {\n const baseline = $filter('filter')(scope.timechartRiskData.risks.baseline.data, {\n age: risk.age,\n });\n if (baseline.length) {\n return baseline[0].risk;\n }\n };\n // Assumes a single-age pathogenic chart\n function heightOverride(phenotype) {\n const notElevatedRiskAge = scope.timechartRiskData.risks.pathogenic.data[0].age;\n if (phenotype == 'breast cancer') {\n if (notElevatedRiskAge == 70) {\n return '7.1%';\n } else if (notElevatedRiskAge == 80) {\n return '10%';\n } else if (notElevatedRiskAge == 95) {\n return '12%';\n }\n } else if (phenotype == 'ovarian cancer') {\n if (notElevatedRiskAge == 70) {\n return '1%';\n } else if (notElevatedRiskAge == 80) {\n return '1%';\n } else if (notElevatedRiskAge == 95) {\n return '1.3%';\n }\n } else if (phenotype == 'male breast cancer') {\n if (notElevatedRiskAge == 70) {\n return '<0.1%';\n } else if (notElevatedRiskAge == 80) {\n return '<0.1%';\n }\n }\n }\n if (angular.isDefined(scope.timechartRiskData.risks.pathogenic)) {\n // Reduce graph to a single column if risks don't have enough to populate an age-series, choosing the oldest age\n if (scope.timechartRiskData.risks.pathogenic.data.length <= 3) {\n scope.timechartRiskData.risks.pathogenic.data = $filter('filter')(\n scope.timechartRiskData.risks.pathogenic.data,\n {\n age:\n scope.timechartRiskData.risks.pathogenic.data[\n scope.timechartRiskData.risks.pathogenic.data.length - 1\n ].age,\n }\n );\n }\n\n // Layout var to control single-age vs. age-series chart layouts\n scope.columns = scope.timechartRiskData.risks.pathogenic.data.length;\n\n // isNotElevated height overrides for single pathogenic charts with a not-elevated pathogenic risk, used whenever breast or ovarian risk isn't elevated on BO19 reports\n // TODO: Improve this logic\n if (\n scope.columns == 1 &&\n ($filter('isNotElevated')(scope.timechartRiskData.risks.pathogenic.data[0].risk) ||\n $filter('isStudiesOngoing')(scope.timechartRiskData.risks.pathogenic.data[0].risk))\n ) {\n scope.heightOverride = heightOverride(scope.timechartRiskData.phenotype);\n }\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportAboutCancerRisks($filter, testTypes, namedMutation) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_about_cancer_risks.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n if (scope.reportContent.is_positive) {\n let surgeryGenes;\n if (scope.reportContent.gender == 'F') {\n surgeryGenes = ['BRCA1', 'BRCA2', 'PTEN', 'TP53', 'CDH1', 'PMS2', 'MSH2', 'MSH6', 'APC'];\n // TODO: Add these genes for the next BO19 render_version increment\n if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n surgeryGenes.push('BRIP1', 'RAD51C', 'RAD51D', 'PALB2', 'MLH1', 'EPCAM');\n }\n } else {\n surgeryGenes = ['APC', 'CDH1'];\n }\n const apcMutations = $filter('filter')(scope.reportContent.mutations, { gene: 'APC' });\n if (apcMutations.length) {\n if ($filter('containsMutation')(apcMutations, namedMutation.apc_i1307k)) {\n surgeryGenes.splice(surgeryGenes.indexOf('APC'), 1);\n }\n }\n scope.surgeryGenes = scope.reportContent.genes_with_pathogenic_mutations.filter(function(\n gene\n ) {\n return $filter('containsAny')([gene], surgeryGenes);\n });\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportAboutCancerSurvivors(testTypes) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_about_cancer_survivors.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.testTypes = testTypes;\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportAboutFamily($filter, testTypes, namedMutation) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_about_family.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.testTypes = testTypes;\n if (scope.reportContent.is_positive) {\n const allChildImpactGenes = [\n 'BRCA2',\n 'PALB2',\n 'RAD51C',\n 'BRIP1',\n 'MLH1',\n 'MSH2',\n 'MSH6',\n 'MUTYH',\n 'PMS2',\n 'ATM',\n 'CHEK2',\n ];\n (scope.childImpactGenes = []), (scope.childNonImpactGenes = []);\n angular.forEach(scope.reportContent.genes_with_pathogenic_mutations, function(gene) {\n if ($filter('containsAny')([gene], allChildImpactGenes)) {\n scope.childImpactGenes.push(gene);\n } else {\n scope.childNonImpactGenes.push(gene);\n }\n });\n scope.reportIsSingleHomozygous = $filter('isSingleHomozygousReport')(\n scope.reportContent.mutations\n );\n scope.reportIsPotentiallyCompoundHeterozygous = $filter(\n 'isPotentiallyCompoundHeterozygousReport'\n )(scope.reportContent);\n scope.showApcI1307k = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.apc_i1307k\n );\n scope.showHighDeNovo =\n !scope.showApcI1307k &&\n scope.reportContent.template.test_type == testTypes.hereditary30 &&\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'TP53',\n 'APC',\n 'BMPR1A',\n 'SMAD4',\n ]);\n // A case when there are one het and one hom mutations.\n scope.genes = $filter('genesWithMutationName')(scope.reportContent.mutations);\n scope.homGenes = $filter('filter')(scope.genes, { isHomozygous: true });\n scope.hetGenes = $filter('filter')(scope.genes, { isHomozygous: false });\n scope.hasBothHomHet = scope.homGenes.length && scope.hetGenes.length;\n if (scope.hasBothHomHet) {\n if (scope.homGenes.length != 1 || scope.hetGenes.length != 1) {\n throw new Error('We currently only support one hom and one het cases.');\n }\n }\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportAboutTheGene($filter, $translate, testTypes, namedMutation) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_about_the_gene.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.testTypes = testTypes;\n function aboutString(gene, paragraph) {\n // Conditionally apply `_SOMATIC` prefix since that content differs\n const isSomatic = scope.reportContent.is_somatic ? '_SOMATIC' : '';\n // render_version changes content, currently only 2 variations\n // 1: Initial launch version\n // < 7: Updated content, for BO19 and H30 reports\n // >= 7: Updated content, for ATM prostate cancer\n let contentVersion;\n if (scope.reportContent.render_version == 1) {\n contentVersion = 'V1.';\n } else if (scope.reportContent.render_version < 7) {\n contentVersion = 'V2.';\n } else {\n contentVersion = 'V3.';\n }\n return (\n 'RESULT.ABOUT_THE_GENE.' +\n contentVersion +\n gene.replace(/\\s/g, '_') +\n isSomatic +\n '_MD_' +\n paragraph\n );\n }\n if (scope.reportContent.genes_with_pathogenic_mutations.length) {\n scope.descriptions = [];\n angular.forEach($filter('genesWithMutationName')(scope.reportContent.mutations), function(\n gene\n ) {\n // For BRCA1 R1699Q mutation, we would like to show normal gene information.\n // We might be able to generalize this to say any spacial variants with lower risks\n // than normal.\n let mutationName = gene.mutationName;\n if (gene.gHGVS == namedMutation.brca1_r1699q) {\n mutationName = '';\n }\n const geneStringName = mutationName ? gene.name + '_' + gene.mutationName : gene.name;\n $translate([aboutString(geneStringName, 1), aboutString(geneStringName, 2)]).then(\n function(translations) {\n const description = {\n gene: gene.name,\n mutationName: mutationName,\n msg1: translations[aboutString(geneStringName, 1)],\n msg2: translations[aboutString(geneStringName, 2)],\n };\n scope.descriptions.push(description);\n }\n );\n });\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportAdditionalFindings($filter, defaultLanguage) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/reportAdditionalFindings.html',\n scope: {\n reportContent: '=',\n language: '@?',\n },\n link: function(scope) {\n if (angular.isUndefined(scope.language)) {\n scope.language = defaultLanguage;\n }\n\n scope.additionalFindingMutations = $filter('additionalFindingMutations')(\n scope.reportContent.mutations\n );\n scope.showCard = scope.additionalFindingMutations.length;\n if (scope.additionalFindingMutations.length) {\n scope.cnvMutations = [];\n scope.nonCnvMutations = [];\n angular.forEach(scope.additionalFindingMutations, function(mutation) {\n if (mutation.effect == 'CNV') {\n scope.cnvMutations.push(mutation);\n } else {\n scope.nonCnvMutations.push(mutation);\n }\n });\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportAdditionalGenes(\n $filter,\n interpretedGenes,\n testTypes,\n defaultLanguage\n) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_additional_genes.html',\n scope: {\n reportContent: '=',\n language: '@?',\n },\n link: function(scope) {\n scope.testTypes = testTypes;\n if (angular.isUndefined(scope.language)) {\n scope.language = defaultLanguage;\n }\n let nonPathogenicGenes = angular.copy(\n interpretedGenes[scope.reportContent.template.test_type]\n );\n // Remove pathogenic genes from whole gene list per test type\n angular.forEach(scope.reportContent.genes_with_pathogenic_mutations, function(gene) {\n // If gene is CDKN2A, remove both p14ARF and p16INK4a.\n if (gene == 'CDKN2A') {\n nonPathogenicGenes = nonPathogenicGenes.filter(function(g) {\n return g.indexOf('CDKN2A') != 0;\n });\n } else {\n nonPathogenicGenes.splice(nonPathogenicGenes.indexOf(gene), 1);\n }\n });\n // If testType is Hereditary 30, append asterisks on certain genes\n if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n nonPathogenicGenes = nonPathogenicGenes.map(function(gene) {\n if (\n gene == 'CDK4' ||\n gene == 'EPCAM' ||\n gene == 'GREM1' ||\n gene == 'MITF' ||\n gene == 'POLD1' ||\n gene == 'POLE'\n ) {\n return gene + '*';\n } else if (gene == 'PMS2') {\n return gene + '**';\n } else {\n return gene;\n }\n });\n }\n scope.listOfGenes = $filter('orderBy')(nonPathogenicGenes).join(', ');\n\n if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n scope.aboutGeneUrl =\n 'https://www.color.com/learn/can-cancer-be-inherited-learn-about-hereditary-cancer#gene-table';\n } else if (scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n scope.aboutGeneUrl =\n 'https://www.color.com/learn/can-cancer-be-inherited-learn-about-hereditary-cancer#gene-table';\n } else if (scope.reportContent.template.test_type == testTypes.wisdom9) {\n scope.aboutGeneUrl =\n 'https://www.color.com/learn/can-cancer-be-inherited-learn-about-hereditary-cancer#gene-table';\n } else if (scope.reportContent.template.test_type == testTypes.fh3) {\n scope.aboutGeneUrl =\n 'https://www.color.com/learn/what-is-familial-hypercholesterolemia#genes';\n } else {\n throw scope.reportContent.template.test_type + ' is not supported.';\n }\n },\n };\n};\n","'use strict'\n\nmodule.exports = function reportAffectOtherGender($filter, testTypes) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_affect_other_gender.html',\n scope: {\n reportContent: '='\n },\n link: function(scope) {\n\n function createGeneReport(report, gene, gender, allelicity, biallelicKnown) {\n const geneReport = {}\n geneReport.allelicity = $filter('numericAllelicity')(allelicity)\n geneReport.gene = gene.name\n geneReport.mutationName = gene.mutationName ? ' ' + gene.mutationName : ''\n geneReport.mutations = $filter('filter')(report.mutations, { gene: gene.name })\n geneReport.biallelicKnown = biallelicKnown\n geneReport.mutationNoun = 'mutation'\n geneReport.p1Exception = false\n // Table risks are different than paragraph risks, and when > 1 mutation, tables show both genders, necessitating a separate tableRisks. Also, if > 1 mutation and BO19, we need to show `not elevated` risks because breast or ovarian are marketed as such, therefore these tables need to show those `not elevated` risks.\n if (scope.reportContent.genes_with_pathogenic_mutations.length > 1 && scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n geneReport.tableRisks = $filter('sortedRisks')(report, gender, false, null, gene.name, geneReport.allelicity)\n if ($filter('allRisksNotElevated')(geneReport.tableRisks.pathogenic)) {\n // Workaround to get the `RESULT.AFFECTS_OTHERS.P1_NO_EFFECT` content to fire, ideally uses a `showCard...` value\n // Isolating right now to > 1 until more test coverage is added to cover the single pathogenic reports\n geneReport.tableRisks.pathogenic = []\n }\n } else {\n geneReport.tableRisks = $filter('sortedRisks')(report, gender, true, null, gene.name, geneReport.allelicity)\n }\n geneReport.tableRisks.pathogenic = $filter('sortRiskByPhenotype')(geneReport.tableRisks.pathogenic, 'all', [gene.name], scope.reportContent.template.test_type)\n geneReport.paragraphRisks = $filter('sortedRisks')(report, gender, true, null, gene.name, geneReport.allelicity)\n geneReport.paragraphRisks.pathogenic = $filter('sortRiskByPhenotype')(geneReport.paragraphRisks.pathogenic, 'all', [gene.name], scope.reportContent.template.test_type)\n\n geneReport.tableRiskReferences = $filter('uniqueReferences')(geneReport.tableRisks.pathogenic)\n geneReport.tableBaselineReferences = $filter('uniqueReferences')(geneReport.tableRisks.baseline)\n\n // Setting common risk age.\n geneReport.commonRiskAge = $filter('commonRiskAge')(scope.reportContent.genes_with_pathogenic_mutations, geneReport.tableRisks.pathogenic)\n // Following double muts requires different age buckets since they don't share common age.\n if ($filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['BRCA1', 'MSH6']) && geneReport.gene == 'MSH6') {\n geneReport.commonRiskAge = 70\n } else if ($filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['BRCA1', 'MSH2']) && geneReport.gene == 'MSH2') {\n geneReport.commonRiskAge = 70\n } else if ($filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['MUTYH', 'MSH2']) && geneReport.gene == 'MUTYH' && scope.reportContent.allelicity_by_gene['MUTYH'] == 'biallelic') {\n geneReport.commonRiskAge = 80\n } else if ($filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['CHEK2', 'RAD51D']) && geneReport.gene == 'RAD51D') {\n geneReport.commonRiskAge = 80\n } else if ($filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['APC', 'CHEK2']) && !geneReport.mutationName) {\n geneReport.commonRiskAge = 80\n } else if ($filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['BRIP1', 'MITF']) && geneReport.gene == 'BRIP1') {\n geneReport.commonRiskAge = 80\n }\n\n geneReport.isElevated = geneReport.tableRisks.pathogenic.filter(function(risk) {\n return $filter('isElevated')(risk.data[0].risk)\n })\n\n // Add STK11-specific age exceptions\n geneReport.tableRisks.pathogenic = $filter('insertDisplayAge')(geneReport.tableRisks.pathogenic, geneReport.commonRiskAge, scope.reportContent.render_version)\n geneReport.hasAgeExceptionsAt = $filter('hasAgeExceptionsAt')(geneReport.tableRisks.pathogenic)\n\n if (geneReport.tableRisks.pathogenic.length) {\n angular.forEach(geneReport.tableRisks.pathogenic, function(risk) {\n risk.baseline = geneReport.tableRisks.baseline.filter(function(baseline) {\n return risk.phenotype == baseline.phenotype\n })[0]\n })\n }\n\n // Start paragraph string generation here:\n if (gender == 'M') {\n geneReport.gender = 'M'\n geneReport.genderNoun = 'man'\n geneReport.genderNounPlural = 'men'\n geneReport.genderThirdPersonPronoun = 'he'\n geneReport.genderPossessiveAdjective = 'his'\n } else if (gender == 'F') {\n geneReport.gender = 'F'\n geneReport.genderNoun = 'woman'\n geneReport.genderNounPlural = 'women'\n geneReport.genderThirdPersonPronoun = 'she'\n geneReport.genderPossessiveAdjective = 'her'\n }\n if ($filter('isLikelyPathogenic')(geneReport.mutations)) {\n geneReport.msgIsLikelyPathogenic = 'likely pathogenic'\n }\n geneReport.cancers = $filter('cancerString')(geneReport.paragraphRisks.pathogenic)\n\n // CDH1-specific string replacement for this report, the phenotype to have this direct callout\n if (gene.name == 'CDH1' && geneReport.gender == 'M') {\n if (scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n geneReport.cancers = geneReport.cancers.replace('gastric cancer', 'stomach cancer, particularly a rare type of stomach cancer called diffuse gastric cancer,')\n } else if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n geneReport.cancers = geneReport.cancers.replace('gastric cancer', 'gastric (stomach) cancer, particularly a rare type of cancer called diffuse gastric cancer,')\n }\n }\n if (gene.name == 'CDH1' && geneReport.gender == 'F') {\n geneReport.cancers = geneReport.cancers.replace('breast and gastric cancer', 'developing breast cancer (particularly a type called lobular breast cancer) and gastric cancer (particularly a rare type called hereditary diffuse gastric cancer or HDGC)')\n }\n if (gene.name == 'BAP1') {\n geneReport.cancers = geneReport.cancers.replace('kidney, lung (mesothelioma) cancer and melanoma', 'melanoma of the eye (uveal) and skin (cutaneous), kidney, and lung (specifically a type called mesothelioma) cancer')\n }\n if (angular.isDefined(geneReport.paragraphRisks.pathogenic)) {\n geneReport.cancersVerb = geneReport.paragraphRisks.pathogenic.length > 1 ? 'are' : 'is'\n geneReport.chanceNoun = geneReport.paragraphRisks.pathogenic.length > 1 ? 'chances' : 'chance'\n }\n // MSH6-specific overrides\n if (gene.name == 'MSH6') {\n // MSH6 Homozygous (CMMR-D) reports have very unique scenarios, therefore none of the existing paragraph logic is applicable\n if (geneReport.allelicity == 2) {\n if (geneReport.gender == 'M') {\n geneReport.p1Exception = 'If a man has a mutation in each copy of the MSH6 gene, his chances of developing brain, blood, colorectal, small bowel, and other cancers are greater than that of the average US man. Most individuals with a mutation in each copy of the MSH6 gene will develop cancer, but the specific lifetime risks of developing each type of cancer is unknown. This does not mean that he has a diagnosis of cancer or that he will definitely develop cancer in his lifetime.'\n } else {\n // TODO: No MSH6 F Homozygous copy is currently available, fill when we have need for that report\n }\n } else {\n if (scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n geneReport.cancers = 'colorectal and other cancers'\n } else if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n if (gender == 'F') {\n geneReport.cancers = 'colorectal, ovarian, uterine, brain, hepatobiliary tract, pancreatic, sebaceous neoplasms, small bowel, stomach, and urinary tract cancer'\n } else if (gender == 'M') {\n geneReport.cancers = 'colorectal and other cancers'\n }\n }\n geneReport.cancersVerb = 'are'\n geneReport.chanceNoun = 'chances'\n }\n }\n // TP53-specific overrides\n if (gene.name == 'TP53') {\n if (gender == 'F') {\n geneReport.cancers = 'certain cancers, especially breast, and brain cancer and sarcoma,'\n geneReport.cancersVerb = 'are'\n geneReport.chanceNoun = 'chances'\n geneReport.anyCancerRisk = $filter('filter')(geneReport.tableRisks.pathogenic, { 'phenotype': 'any cancer' })[0]\n } else {\n geneReport.cancers = 'certain cancers, especially brain cancer and sarcoma,'\n geneReport.cancersVerb = 'are'\n geneReport.chanceNoun = 'chances'\n geneReport.anyCancerRisk = $filter('filter')(geneReport.tableRisks.pathogenic, { 'phenotype': 'any cancer' })[0]\n }\n }\n // APC-specific (non-I1307K) overrides\n if (gene.name == 'APC' && !gene.mutationName) {\n geneReport.cancers = 'colorectal and other cancers, including brain (medulloblastoma), pancreatic, small bowel (duodenal), stomach, and thyroid, as well as non-cancerous growths called desmoid tumors,'\n geneReport.cancersVerb = 'are'\n geneReport.chanceNoun = 'chances'\n }\n // APC-specific (I1307K) overrides\n if (gene.name == 'APC' && gene.mutationName == 'I1307K') {\n geneReport.isSlightly = 'slightly '\n }\n // MUTYH two variants with unknown phase overrides\n if (gene.name == 'MUTYH' && geneReport.allelicity == '2') {\n geneReport.cancers = 'colorectal and small bowel cancer (especially in the duodenum)'\n }\n // BMPR1A\n if (gene.name == 'BMPR1A') {\n geneReport.cancers = 'colorectal, stomach, pancreatic, and small bowel (especially in the duodenum) cancer'\n }\n // CHEK2 Homozygous F\n if (gene.name == 'CHEK2' && gene.isHomozygous && geneReport.gender == 'F') {\n geneReport.cancers = 'cancer'\n }\n // SMAD4\n if (gene.name == 'SMAD4') {\n geneReport.cancers = 'colorectal, stomach, pancreatic, and small bowel (especially in the duodenum) cancer'\n }\n // RV < 5: This is errant logic only applicable to RV 1-4\n // Specifically to handle RV1-4 BARD1 + CHEK2: BARD1 only had age 80 risks at the time\n if (gene.name == 'BARD1' && scope.reportContent.render_version < 5) {\n geneReport.commonRiskAge = 80\n }\n\n // If compound het or homozygous, show extra content\n if ($filter('useSingleRiskLogic')(scope.reportContent, geneReport.gene)) {\n // For P1\n if (geneReport.allelicity == '1') {\n geneReport.singleP1Text = 'single '\n // For single homozygous with known biallelic risks, we show\n // monoallelic and biallelic risks in a separate table.\n if (biallelicKnown && !$filter('isSingleHomozygousReport')(scope.reportContent.mutations)) {\n geneReport.biallelicP1Text2 = ', or two mutations in the same copy of the ' + gene.name + ' gene'\n }\n } else {\n geneReport.biallelicP1Text1 = 'each copy of '\n }\n // For risk table column header\n if (biallelicKnown) {\n if (geneReport.allelicity == '1') {\n geneReport.withGeneNumMutation = 'single '\n } else {\n geneReport.withGeneNumMutation = 'two '\n geneReport.mutationNoun = 'mutations'\n }\n }\n if (gene.isHomozygous) {\n geneReport.isHomozygous = true\n } else if (scope.reportContent.allelicity_by_gene[geneReport.gene] == 'biallelic' || scope.reportContent.allelicity_by_gene[geneReport.gene] == null) {\n geneReport.isPotentiallyCompundHet = true\n }\n }\n\n const nonMutationSpecificRisks = geneReport.tableRisks.pathogenic.filter(function(risk) {\n return !risk.classification_unit_id\n })\n geneReport.allMutationSpecificRisks = !nonMutationSpecificRisks.length\n\n if (geneReport.mutationName && !geneReport.allMutationSpecificRisks) {\n if (nonMutationSpecificRisks.length == geneReport.tableRisks.pathogenic.length) {\n geneReport.nonMutationSpecificCancers = 'these'\n } else {\n geneReport.nonMutationSpecificCancers = 'the ' + $filter('cancerString')(nonMutationSpecificRisks)\n const mutationSpecificRisks = geneReport.tableRisks.pathogenic.filter(function(risk) {\n return risk.classification_unit_id\n })\n geneReport.mutationSpecificCancers = 'the ' + $filter('cancerString')(mutationSpecificRisks)\n }\n }\n\n return geneReport\n } // End of createGeneReport\n\n if (scope.reportContent.is_positive && !scope.reportContent.is_somatic) {\n scope.geneReports = []\n // If single P/LP, only show opposite gender. If >1 P/LP of different\n // genes, show opposite gender first, then same gender\n let genders\n if (scope.reportContent.genes_with_pathogenic_mutations.length == 1) {\n genders = scope.reportContent.gender == 'F' ? ['M'] : ['F']\n } else if (scope.reportContent.genes_with_pathogenic_mutations.length > 1) {\n genders = scope.reportContent.gender == 'F' ? ['M', 'F'] : ['F', 'M']\n }\n angular.forEach($filter('genesWithMutationName')(scope.reportContent.mutations), function(mutation) {\n const allelicities = [];\n const allelicity = scope.reportContent.allelicity_by_gene[mutation.name];\n let biallelicKnown = false\n // For single homozygous reports (which are biallelic), for our current set of reports, there are none that have biallelic risks so we're only using the monoallelic risks\n if (allelicity && allelicity != 'biallelic') {\n allelicities.push(allelicity)\n } else { // Show both monoallelic and biallelic for unknown phase if exists.\n if ($filter('filter')(scope.reportContent.risks, { gene: mutation.name, allelicity: '2' }).length) {\n allelicities.push('biallelic')\n biallelicKnown = true\n }\n // MSH6 Homozygous (CMMR-D) has special condition where the biallelic mutation\n // has no risks associated but still needs a card to appear\n if (allelicity == 'biallelic' && mutation.name == 'MSH6' && mutation.isHomozygous) {\n allelicities.push('biallelic')\n }\n allelicities.push('monoallelic')\n }\n angular.forEach(genders, function(gender) {\n angular.forEach(allelicities, function(allelicity) {\n scope.geneReports.push(createGeneReport(scope.reportContent, mutation, gender, allelicity, biallelicKnown))\n })\n })\n\n // For single homozygous reports that have known biallelic risks,\n // we show biallelic risks only for client's gender in summary.\n // So we show monoallelic risks in the affect other gender section.\n // This only applies to MUTYH Homozygous currently.\n // Similarly for MSH6 Homozygous, no known risks exists for biallelic but because\n // of the known CMMR-D, we need to show copy here without a table\n if ((biallelicKnown || mutation.name == 'MSH6') && mutation.isHomozygous && genders.length == 1) {\n scope.geneReports.push(createGeneReport(scope.reportContent, mutation, scope.reportContent.gender, 'monoallelic', biallelicKnown))\n }\n })\n }\n }\n }\n}\n","/**\n * @prettier\n */\n\nmodule.exports = function reportConnectWithOthers($filter, namedMutation) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_connect_with_others.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n if (scope.reportContent.is_positive && !scope.reportContent.is_somatic) {\n scope.showCard = true;\n }\n let allelicity;\n if (scope.reportContent.genes_with_pathogenic_mutations.length == 1) {\n // Handle single mutations\n //- TP53\n if ($filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['TP53'])) {\n scope.showLfs = true;\n if (scope.reportContent.gender == 'M') {\n scope.showKintalk = true;\n }\n }\n //- All genes, except CHEK2, Lynch Syndrome, MUTYH\n if (\n $filter('containsNone')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'CDKN2A',\n 'CDK4',\n 'PMS2',\n 'MSH2',\n 'MSH6',\n 'APC',\n 'CDH1',\n 'MITF',\n 'MLH1',\n 'BAP1',\n 'MUTYH',\n 'BMPR1A',\n 'EPCAM',\n 'GREM1',\n 'SMAD4',\n 'STK11',\n ])\n ) {\n scope.showForce = true;\n }\n //- Default F\n if (\n scope.reportContent.gender == 'F' &&\n $filter('containsNone')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'ATM',\n 'RAD51C',\n 'RAD51D',\n 'CDH1',\n 'CDK4',\n 'PMS2',\n 'MSH2',\n 'MSH6',\n 'PTEN',\n 'APC',\n 'MITF',\n 'MLH1',\n 'BAP1',\n 'MUTYH',\n 'CDKN2A',\n 'BMPR1A',\n 'SMAD4',\n 'EPCAM',\n 'GREM1',\n ])\n ) {\n scope.showBrightPink = true;\n }\n //- PMS2, MSH2, MSH6\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'PMS2',\n 'MSH2',\n 'MSH6',\n 'MLH1',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n }\n //- CDKN2A, CHEK2, ATM, PMS2, MITF, MSH2, MSH6, RAD51C\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CDK4',\n 'CDKN2A',\n 'CHEK2',\n 'ATM',\n 'PMS2',\n 'MITF',\n 'MSH2',\n 'MSH6',\n 'RAD51C',\n 'RAD51D',\n 'MLH1',\n 'BAP1',\n ])\n ) {\n scope.showKintalk = true;\n }\n // CDH1\n if ($filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['CDH1'])) {\n scope.showNoStomachForCancer = true;\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKomen = true;\n } else {\n scope.showKintalk = true;\n }\n }\n //- BRCA1 and default M, except Lynch Syndrome\n if (\n scope.reportContent.gender == 'M' &&\n $filter('containsNone')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CDKN2A',\n 'APC',\n 'BAP1',\n 'CHEK2',\n 'BMPR1A',\n 'SMAD4',\n 'PMS2',\n 'MSH2',\n 'MSH6',\n 'CDH1',\n 'CDK4',\n 'MLH1',\n 'MITF',\n 'EPCAM',\n 'STK11',\n 'GREM1',\n 'TP53',\n ])\n ) {\n scope.showHisBreastCancer = true;\n }\n // PTEN\n if ($filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['PTEN'])) {\n scope.showForce = true;\n scope.showPtenFoundation = true;\n scope.showHcc = true;\n if (scope.reportContent.gender == 'M') {\n scope.showHisBreastCancer = false;\n }\n }\n // RAD51C, RAD51D\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'RAD51C',\n 'RAD51D',\n ])\n ) {\n scope.showOvarian = true;\n }\n // STK11\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['STK11'])\n ) {\n scope.showHcc = true;\n scope.showKintalk = true;\n }\n //- All genes, except CHEK2, Lynch Syndrome, TP53, RAD51C, MUTYH\n if (\n $filter('containsNone')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'CDKN2A',\n 'CDK4',\n 'PMS2',\n 'MSH2',\n 'MSH6',\n 'TP53',\n 'RAD51C',\n 'RAD51D',\n 'PTEN',\n 'APC',\n 'MITF',\n 'CDH1',\n 'MLH1',\n 'BAP1',\n 'MUTYH',\n 'BMPR1A',\n 'SMAD4',\n 'EPCAM',\n 'GREM1',\n 'STK11',\n ])\n ) {\n scope.showKomen = true;\n }\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CDK4',\n 'CDKN2A',\n 'MITF',\n 'BAP1',\n ])\n ) {\n scope.showAmericanMelanoma = true;\n }\n //- All genes, except Lynch Syndrome, TP53, RAD51C\n if ($filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['APC'])) {\n scope.showHcc = true;\n scope.showKintalk = true;\n scope.showColonCancerAlliance = true;\n }\n // Male + ATM, BRIP1, RAD51C, PALB2, BARD1 don't show the card\n if (\n scope.reportContent.gender == 'M' &&\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'BRIP1',\n 'RAD51C',\n 'PALB2',\n 'BARD1',\n 'RAD51D',\n ])\n ) {\n scope.showCard = false;\n }\n // CHEK2\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['CHEK2'])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKomen = true;\n } else {\n allelicity = scope.reportContent.allelicity_by_gene['CHEK2'];\n if (!allelicity) {\n // Unknown phase\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n } else if (allelicity == 'biallelic') {\n // homozygous\n scope.showKintalk = true;\n } else {\n scope.showCard = false;\n }\n }\n }\n // MUTYH\n if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['MUTYH'])\n ) {\n allelicity = scope.reportContent.allelicity_by_gene['MUTYH'];\n if (\n !allelicity ||\n allelicity == 'biallelic' ||\n $filter('isInCis')(scope.reportContent, 'MUTYH')\n ) {\n // Unknown phase or biallelic or in cis\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n scope.showHisBreastCancer = false; // negate above rule that's default for M\n } else {\n scope.showCard = false;\n }\n }\n // BMPR1A\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['BMPR1A'])\n ) {\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n }\n // SMAD4\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['SMAD4'])\n ) {\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n }\n // EPCAM\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['EPCAM'])\n ) {\n scope.showLynch = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n }\n // GREM1\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['GREM1'])\n ) {\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n }\n // APC II1307K show nothing, for heterozygous and homozygous\n if ($filter('containsMutation')(scope.reportContent.mutations, namedMutation.apc_i1307k)) {\n scope.showCard = false;\n }\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, ['CDKN2A'])\n ) {\n scope.showNpf = true;\n }\n // BRCA2 Homozygous\n if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['BRCA2']) &&\n ($filter('isPotentiallyCompoundHeterozygousReport')(scope.reportContent) ||\n $filter('isSingleHomozygousReport')(scope.reportContent.mutations))\n ) {\n scope.showFarf = true;\n scope.showIfar = true;\n scope.showFanconiHope = true;\n }\n // MSH6 Homozygous\n if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['MSH6']) &&\n $filter('isSingleHomozygousReport')(scope.reportContent.mutations)\n ) {\n scope.showLynch = false;\n scope.showKomen = false;\n scope.showForce = false;\n scope.showHisBreastCancer = false;\n scope.showBmmrdConsortium = true;\n scope.showKintalk = true;\n scope.showHcc = true;\n }\n } else {\n // multiple mutations\n // Handle double mutations, treated as one offs for now until a pattern is discovered\n if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'BARD1',\n 'CHEK2',\n 'MUTYH',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'MITF',\n 'MLH1',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showAmericanMelanoma = true;\n scope.showKintalk = true;\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKomen = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'CHEK2',\n 'MUTYH',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'EPCAM',\n 'MUTYH',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BMPR1A',\n 'CHEK2',\n ])\n ) {\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'BRCA2',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'BRIP1',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n scope.showKintalk = true;\n if (\n !$filter('containsMutation')(scope.reportContent.mutations, namedMutation.brca1_r1699q)\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'CHEK2',\n ])\n ) {\n scope.showForce = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n scope.showKomen = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'PMS2',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showLynch = true;\n scope.showKomen = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'PALB2',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'MITF',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n scope.showAmericanMelanoma = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n scope.showKintalk = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'CDKN2A',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n scope.showAmericanMelanoma = true;\n scope.showNpf = true;\n scope.showKintalk = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'MSH6',\n ]) ||\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'PMS2',\n ]) ||\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'MLH1',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'RAD51D',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'RAD51C',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n scope.showOvarian = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'MLH1',\n ])\n ) {\n scope.showForce = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n scope.showLynch = true;\n scope.showKomen = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'TP53',\n ]) ||\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'TP53',\n ])\n ) {\n scope.showLfs = true;\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'BRCA1',\n ])\n ) {\n // APC I1307K + BRCA1\n scope.showForce = true;\n scope.showKomen = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'BRCA1',\n ])\n ) {\n scope.showForce = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n scope.showKintalk = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n scope.showKomen = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'BRIP1',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'BRCA2',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'MITF',\n ])\n ) {\n scope.showAmericanMelanoma = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'MSH2',\n ])\n ) {\n scope.showLynch = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n scope.showForce = true;\n scope.showKomen = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'PMS2',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'MSH2',\n ])\n ) {\n scope.showLynch = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'MSH6',\n ])\n ) {\n scope.showLynch = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'TP53',\n ])\n ) {\n scope.showLfs = true;\n scope.showForce = true;\n scope.showBrightPink = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BAP1',\n 'MUTYH',\n ])\n ) {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n scope.showAmericanMelanoma = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'CHEK2',\n ])\n ) {\n // Also handles the APC I1307K inclusion\n scope.showForce = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n scope.showKomen = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'BRCA2',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n if (scope.reportContent.gender == 'F') {\n scope.showKintalk = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'MITF',\n ])\n ) {\n scope.showKintalk = true;\n scope.showAmericanMelanoma = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'BRIP1',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'CHEK2',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'CHEK2',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n if (\n $filter('containsMutation')(scope.reportContent.mutations, namedMutation.apc_i1307k)\n ) {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n } else {\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showForce = true;\n scope.showKomen = true;\n scope.showKintalk = true;\n }\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'MITF',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n scope.showAmericanMelanoma = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'RAD51D',\n ])\n ) {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n scope.showOvarian = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'PALB2',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n }\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'CDKN2A',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n scope.showAmericanMelanoma = true;\n scope.showNpf = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CDKN2A',\n 'PALB2',\n ])\n ) {\n scope.showAmericanMelanoma = true;\n scope.showNpf = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'MUTYH',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'RAD51C',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n scope.showOvarian = true;\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MSH2',\n 'MUTYH',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n if (scope.reportContent.allelicity_by_gene['MUTYH'] == 'biallelic') {\n scope.showColonCancerAlliance = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'PMS2',\n 'MUTYH',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'PMS2',\n 'MSH6',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'CDKN2A',\n ])\n ) {\n scope.showAmericanMelanoma = true;\n scope.showNpf = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'CHEK2',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'BRCA1',\n ])\n ) {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'MITF',\n ])\n ) {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n scope.showAmericanMelanoma = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'MUTYH',\n ])\n ) {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showKomen = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MLH1',\n 'MUTYH',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MLH1',\n 'RAD51D',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n if (scope.reportContent.gender == 'F') {\n scope.showOvarian = true;\n scope.showForce = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'MUTYH',\n ])\n ) {\n scope.showKomen = true;\n scope.showForce = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n if (scope.reportContent.allelicity_by_gene['MUTYH'] == 'biallelic') {\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRIP1',\n 'CHEK2',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRIP1',\n 'MUTYH',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'PALB2',\n 'MUTYH',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'MUTYH',\n ])\n ) {\n if (\n $filter('containsMutation')(scope.reportContent.mutations, namedMutation.apc_i1307k)\n ) {\n scope.showCard = false;\n } else {\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRIP1',\n 'MITF',\n ])\n ) {\n scope.showAmericanMelanoma = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRIP1',\n 'MSH6',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n }\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'PALB2',\n ]) ||\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRIP1',\n 'PALB2',\n ])\n ) {\n scope.showForce = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n scope.showKomen = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'MUTYH',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n if (scope.reportContent.gender == 'M') {\n scope.showHisBreastCancer = true;\n } else {\n scope.showBrightPink = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'GREM1',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'MSH2',\n ])\n ) {\n scope.showForce = true;\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'MUTYH',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKomen = true;\n scope.showKintalk = true;\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MSH6',\n 'PALB2',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'TP53',\n 'MUTYH',\n ])\n ) {\n scope.showLfs = true;\n scope.showForce = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'RAD51C',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showOvarian = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'BARD1',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'PMS2',\n ])\n ) {\n scope.showKintalk = true;\n scope.showHcc = true;\n scope.showLynch = true;\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'PALB2',\n ])\n ) {\n scope.showCard = false;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'RAD51D',\n ])\n ) {\n if (\n scope.reportContent.gender == 'F' &&\n $filter('containsMutation')(scope.reportContent.mutations, namedMutation.apc_i1307k)\n ) {\n scope.showForce = true;\n scope.showOvarian = true;\n scope.showKintalk = true;\n } else {\n scope.showCard = false;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'MITF',\n ])\n ) {\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n }\n scope.showKintalk = true;\n scope.showAmericanMelanoma = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'MSH6',\n ])\n ) {\n scope.showHcc = true;\n scope.showKintalk = true;\n scope.showLynch = true;\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showKomen = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'PMS2',\n ])\n ) {\n scope.showForce = true;\n scope.showKintalk = true;\n scope.showHcc = true;\n scope.showLynch = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'PALB2',\n ])\n ) {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'ATM',\n ])\n ) {\n scope.showKintalk = true;\n if (\n $filter('containsMutation')(scope.reportContent.mutations, namedMutation.apc_i1307k)\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n } else {\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'PMS2',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MSH6',\n 'MUTYH',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MITF',\n 'MLH1',\n ])\n ) {\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showAmericanMelanoma = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MITF',\n 'MUTYH',\n ])\n ) {\n scope.showAmericanMelanoma = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MITF',\n 'PALB2',\n ])\n ) {\n scope.showAmericanMelanoma = true;\n scope.showKintalk = true;\n if (scope.reportContent.gender == 'F') {\n scope.showForce = true;\n scope.showBrightPink = true;\n scope.showKomen = true;\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MITF',\n 'RAD51C',\n ])\n ) {\n scope.showForce = true;\n scope.showOvarian = true;\n scope.showKintalk = true;\n scope.showAmericanMelanoma = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MITF',\n 'RAD51D',\n ])\n ) {\n scope.showForce = true;\n scope.showOvarian = true;\n scope.showKintalk = true;\n scope.showAmericanMelanoma = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MUTYH',\n 'RAD51D',\n ])\n ) {\n scope.showForce = true;\n scope.showOvarian = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MUTYH',\n 'PTEN',\n ])\n ) {\n scope.showForce = true;\n scope.showPtenFoundation = true;\n scope.showHcc = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'GREM1',\n 'PMS2',\n ])\n ) {\n scope.showColonCancerAlliance = true;\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'MSH6',\n ]) ||\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'MSH2',\n ])\n ) {\n scope.showForce = true;\n scope.showKomen = true;\n scope.showHcc = true;\n scope.showLynch = true;\n scope.showKintalk = true;\n if (scope.reportContent.gender == 'F') {\n scope.showBrightPink = true;\n } else {\n scope.showHisBreastCancer = true;\n }\n }\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportDropdown(\n reportOrderDetailsModal,\n reportRevisionsModal,\n urlBuilder,\n uploadFileTypes\n) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_dropdown.html',\n replace: true,\n scope: {\n report: '=',\n reportContent: '=',\n hideDownload: '=?',\n },\n link: function(scope, elem) {\n scope.toggleDropdown = function() {\n scope.dropdownOpened = !scope.dropdownOpened;\n };\n scope.openOrderDetails = function() {\n reportOrderDetailsModal.open(scope.reportContent, scope.report);\n scope.toggleDropdown();\n };\n scope.openRevisions = function() {\n reportRevisionsModal.open(scope.report.revisions);\n scope.toggleDropdown();\n };\n scope.makeS3Url = function(key) {\n return urlBuilder.buildUrl('/api/v1/uploaded_file', {\n key: key,\n file_type: uploadFileTypes.geneticCounselingNote,\n });\n };\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportFamilyTestingProgram(clinicalDomains) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_family_testing_program.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.clinicalDomain = clinicalDomains[scope.reportContent.template.test_type];\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportGeneDetails($filter, namedMutation, testTypes) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_gene_details.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.testTypes = testTypes;\n // Order based on classifications so ng-repeat logically organizes summary paragraphs\n const pathogenicMutations = [];\n const likelyPathogenicMutations = [];\n angular.forEach(scope.reportContent.mutations, function(mutation) {\n // Check for lower/higher risk mutations and add checks accordingly\n // Lower: CHEK2 I157T\n if (\n $filter('containsAny')([mutation.gene], ['CHEK2']) &&\n $filter('containsMutation')([mutation], 'chr22.GRCh37:g.29121087A>G')\n ) {\n mutation.appendLower = true;\n mutation.studySubject = 'Some studies have';\n mutation.additionalMutationRefs = [74];\n }\n // Lower: BRCA2 T2626C\n if (\n $filter('containsAny')([mutation.gene], ['BRCA2']) &&\n $filter('containsMutation')([mutation], 'chr13.GRCh37:g.32936732G>C')\n ) {\n mutation.appendLower = true;\n mutation.studySubject = 'A study has';\n mutation.additionalMutationRefs = [318];\n }\n // Higher: ATM 7271T>G\n if (\n $filter('containsAny')([mutation.gene], ['ATM']) &&\n $filter('containsMutation')([mutation], 'chr11.GRCh37:g.108199929T>G')\n ) {\n mutation.appendHigher = true;\n mutation.additionalMutationRefs = [169, 170, 171];\n }\n if (\n $filter('containsAny')([mutation.gene], ['APC']) &&\n $filter('containsMutation')([mutation], namedMutation.apc_i1307k)\n ) {\n // APC I1307K-only condition\n mutation.appendAnalyzedPositions =\n ' Studies have shown that the risk of cancer associated with this particular mutation is significantly lower than that of other mutations in the APC gene.';\n mutation.appendAnalyzedPositionsRefs = [199, 200, 201]; // these are added by the risks\n }\n if ($filter('containsAny')([mutation.gene], ['EPCAM'])) {\n // EPCAM-only condition\n mutation.appendAnalyzedPositions =\n ' For EPCAM, only large deletions and duplications including 3’ end of the gene are analyzed, because other positions are not known to impact cancer risk.';\n }\n if (\n $filter('containsAny')([mutation.gene], ['MITF']) &&\n $filter('containsMutation')([mutation], 'chr3.GRCh37:g.70014091G>A')\n ) {\n // MITF-only condition\n mutation.appendAnalyzedPositions =\n ' For MITF, only chr3:g.70014091 (including c.952G>A) is analyzed, because other positions are not known to impact cancer risk.';\n }\n if ($filter('containsAny')([mutation.gene], ['GREM1'])) {\n // GREM1-only condition\n mutation.appendAnalyzedPositions =\n ' For GREM1, only duplications in the upstream regulatory region are analyzed, because other positions are not known to impact cancer risk.';\n }\n if ($filter('containsAny')([mutation.gene], ['PMS2'])) {\n // PMS2-only condition\n if (scope.reportContent.render_version < 8) {\n mutation.appendAnalyzedPositions = ' For PMS2, exons 12-15 are not analyzed.';\n }\n }\n if (mutation.classification == 'Pathogenic') {\n pathogenicMutations.push(mutation);\n } else if (mutation.classification == 'Likely Pathogenic') {\n likelyPathogenicMutations.push(mutation);\n }\n });\n scope.mutationsSet = [];\n if (pathogenicMutations.length) {\n scope.mutationsSet.push(pathogenicMutations);\n }\n if (likelyPathogenicMutations.length) {\n scope.mutationsSet.push(likelyPathogenicMutations);\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportGeneralQuestions($filter, testTypes) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_general_questions.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.testTypes = testTypes;\n scope.isLikelyPathogenic = $filter('isLikelyPathogenic')(scope.reportContent.mutations);\n scope.hasLikelyPathogenic = $filter('hasLikelyPathogenic')(scope.reportContent.mutations);\n scope.reportIsSingleHomozygous = $filter('isSingleHomozygousReport')(\n scope.reportContent.mutations\n );\n scope.reportIsPotentiallyCompoundHeterozygous = $filter(\n 'isPotentiallyCompoundHeterozygousReport'\n )(scope.reportContent);\n\n // Simplified logic to replace first question with no effect text if H30 + M + BARD1/BRIP1/RAD51C/RAD51D\n const noEffectMaleGenes = ['BARD1', 'BRIP1', 'RAD51C', 'RAD51D'];\n scope.reportIsSingleGeneNoEffectPathogenic = false;\n if (\n scope.reportContent.template.test_type == testTypes.hereditary30 &&\n scope.reportContent.gender == 'M' &&\n scope.reportContent.genes_with_pathogenic_mutations.length == 1 &&\n noEffectMaleGenes.indexOf(scope.reportContent.genes_with_pathogenic_mutations[0]) > -1\n ) {\n scope.reportIsSingleGeneNoEffectPathogenic = true;\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportGuidelines() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_guidelines.html',\n controllerAs: 'ctrl',\n replace: true,\n bindToController: true,\n scope: {\n reportContent: '=',\n },\n controller: function() {\n const ctrl = this;\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportLabSendouts() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_lab_sendouts.html',\n replace: true,\n scope: {\n reportContent: '=',\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportMutation(defaultLanguage) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_mutation.html',\n replace: true,\n scope: {\n mutation: '=',\n isSomatic: '=',\n hideZygosity: '=?',\n isVariant: '=?',\n language: '@?',\n },\n link: function(scope) {\n if (angular.isUndefined(scope.language)) {\n scope.language = defaultLanguage;\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportOpenOrderDetailsModal(reportOrderDetailsModal) {\n 'ngInject';\n\n return {\n restrict: 'A',\n scope: {\n report: '=',\n reportContent: '=',\n },\n link: function(scope, elem) {\n elem.bind('click', function() {\n reportOrderDetailsModal.open(scope.reportContent, scope.report);\n });\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function($filter, testTypes, reportGenericScreeningGuidelines) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/reportOtherScreeningGuidelines.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.showCard =\n scope.reportContent.is_positive &&\n scope.reportContent.template.test_type == testTypes.hereditary30;\n scope.guidelines = [];\n // Other guidelines content in this doc: https://docs.google.com/document/d/1OudkWQkx5YabGC7PBvTGq7VF9V5M9aOxni7XEuH5tVY/\n const otherGuidelines = reportGenericScreeningGuidelines(scope.reportContent.render_version);\n const genderSingular = scope.reportContent.gender == 'F' ? 'woman' : 'man';\n const genderPlural = scope.reportContent.gender == 'F' ? 'women' : 'men';\n if (scope.showCard) {\n scope.intro =\n 'In addition to the screening guidelines provided related to cancers that are increased by ' +\n $filter('geneArticle')(scope.reportContent.genes_with_pathogenic_mutations) +\n ' mutation, below are guidelines for ' +\n genderPlural +\n ' who have the same cancer risk as the average US ' +\n genderSingular +\n '. Your healthcare provider may use these American Cancer Society and NCCN Guidelines® in addition to those listed in the Next Steps section of your report to help create a customized screening plan for you.';\n angular.forEach(otherGuidelines, function(guideline) {\n if (guideline.gender ? scope.reportContent.gender == guideline.gender : true) {\n if (\n !$filter('screeningGuidelinesContainPhenotype')(\n scope.reportContent.template.screening_guidelines,\n guideline.phenotype\n )\n ) {\n scope.guidelines.push(guideline);\n }\n }\n });\n if (scope.guidelines.length == 0) {\n scope.showCard = false;\n }\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportProvideHealthHistory() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_provide_health_history.html',\n controllerAs: 'ctrl',\n replace: true,\n bindToController: true,\n scope: {\n reportContent: '=',\n },\n controller: function() {\n const ctrl = this;\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportProvideHealthHistoryBanner() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/banner_provide_health_history.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.healthHistoryStatus = 'completed';\n if (scope.reportContent.is_hh_under_review) {\n scope.healthHistoryStatus = 'updated';\n } else if (!scope.reportContent.is_hh_provided) {\n scope.healthHistoryStatus = 'not_provided';\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportRevisions() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_revisions.html',\n replace: true,\n scope: {\n revisions: '=',\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportRiskFactors(testTypes) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_risk_factors.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.testTypes = testTypes;\n // Only show if non-breast cancer survivor, is negative, is female, and has risk model, ADH, or LCIS\n scope.showCard =\n !scope.reportContent.breast_cancer_survivor &&\n scope.reportContent.is_negative &&\n scope.reportContent.gender == 'F' &&\n (scope.reportContent.template.risk_model ||\n scope.reportContent.had_breast_biopsy_with_atypical_hyperplasia ||\n scope.reportContent.diagnosed_with_lobular_carcinoma_in_situ);\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportRiskTooltip() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_risk_tooltip.html',\n scope: {\n risk: '=',\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportShareFamily() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_share_family.html',\n controllerAs: 'ctrl',\n replace: true,\n bindToController: true,\n scope: {\n cardStyle: '@',\n reportContent: '=',\n reportId: '=',\n },\n controller: function reportShareFamilyController(\n emailFamilyModal,\n sampleLetterModal,\n reportShareFamilyData\n ) {\n 'ngInject';\n\n const ctrl = this;\n reportShareFamilyData(ctrl.reportContent, ctrl);\n\n ctrl.openEmailFamilyModal = function() {\n emailFamilyModal.open(\n ctrl.msgMarkdownSampleLetter,\n ctrl.reportId,\n ctrl.reportContent.kit_order.test_type\n );\n };\n ctrl.openSampleLetterModal = function() {\n sampleLetterModal.open(ctrl.msgMarkdownSampleLetter);\n };\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportShareYourResults(addProviderModal) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_share_your_results.html',\n scope: {\n report: '=',\n reportContent: '=',\n },\n link: function(scope, elem) {\n scope.healthcareProviders = scope.report.sharing_providers;\n scope.disclaimer = false;\n scope.addProvider = function(provider) {\n addProviderModal\n .open(provider, scope.reportContent.kit_order.order_number)\n .result.then(function(res) {\n scope.healthcareProviders.push(res);\n });\n };\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportSpeakWithSpecialist() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_speak_with_specialist.html',\n replace: true,\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportSummaryChart($filter, testTypes, namedMutation) {\n 'ngInject';\n\n // render_version changes for compound heterozygous logic\n // <= 2: Only show monoallelic risks as a chart\n // >= 3: Show both mono and biallelic risks\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_summary_chart.html',\n replace: true,\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n let genderNoun = scope.reportContent.gender == 'F' ? 'women' : 'men';\n scope.testTypes = testTypes;\n\n //- Subtitle append if NOT a breast survivor, female, and (risk model exists || breast biopsy + atypical hyperplasia || breast biopsy + LCIS)\n scope.showRiskModelLanguageAppend =\n !scope.reportContent.breast_cancer_survivor &&\n scope.reportContent.gender == 'F' &&\n (scope.reportContent.template.risk_model ||\n scope.reportContent.had_breast_biopsy_with_atypical_hyperplasia ||\n scope.reportContent.diagnosed_with_lobular_carcinoma_in_situ);\n\n function createGeneReport(gene, allelicity) {\n const geneReport = {\n data: [],\n gene: gene.name,\n mutationName: gene.mutationName ? ' ' + gene.mutationName : '', // add a space for display purposes\n gender: scope.reportContent.gender,\n allelicity: angular.isNumber(allelicity) ? allelicity : 1, // default allelicity to 1/monoallelic if not set\n };\n\n // Only a one type of allelicity risks (either 1/monoallelic or 2/biallelic) are ever shown in any chart grouping. When more than one are shown, we depend on creating multiple geneReports, handled in the later logic that calls createGeneReport()\n const primaryRisks = $filter('sortedRisks')(\n scope.reportContent,\n scope.reportContent.gender,\n false,\n null,\n gene.name,\n geneReport.allelicity\n );\n\n // Create list of risk citations that get appended to the labels in the legend\n let primaryPathogenicRisks = $filter('sortRiskByPhenotype')(\n primaryRisks.pathogenic,\n 'primary',\n [gene.name],\n scope.reportContent.template.test_type\n );\n let primaryBaselineRisks = $filter('sortRiskByPhenotype')(\n primaryRisks.baseline,\n 'primary',\n [gene.name],\n scope.reportContent.template.test_type\n );\n const customPrimaryPhenotypes = $filter('customPhenotypes')(\n scope.reportContent,\n gene.name,\n 'primary'\n );\n if (angular.isDefined(customPrimaryPhenotypes)) {\n primaryPathogenicRisks = primaryPathogenicRisks.filter(function(r) {\n return customPrimaryPhenotypes.indexOf(r.phenotype) > -1;\n });\n primaryBaselineRisks = primaryBaselineRisks.filter(function(r) {\n return customPrimaryPhenotypes.indexOf(r.phenotype) > -1;\n });\n }\n geneReport.pathogenicReferences = $filter('uniqueReferences')(primaryPathogenicRisks);\n geneReport.baselineReferences = $filter('uniqueReferences')(primaryBaselineRisks);\n\n // Set \"age by x\" with commonRiskAge $filter\n geneReport.commonRiskAge = $filter('commonRiskAge')(\n scope.reportContent.genes_with_pathogenic_mutations,\n primaryPathogenicRisks\n );\n\n // Add STK11-specific age exceptions\n primaryPathogenicRisks = $filter('insertDisplayAge')(\n primaryPathogenicRisks,\n geneReport.commonRiskAge,\n scope.reportContent.render_version\n );\n\n // Determine whether or not various parts of the chart should have 'single' appearing before the gene name, as well as extra subtitle content. Only exists currently on CHEK2 Homozygous, CHEK2 Compound Het, and MUTYH Compound Het when geneReport.allelicity == 1\n if (geneReport.allelicity == 1) {\n geneReport.useSingleRiskLogic = $filter('useSingleRiskLogic')(\n scope.reportContent,\n geneReport.gene\n );\n } else {\n geneReport.useSingleRiskLogic = false;\n }\n\n // Decide whether to show single age charts vs decade-series charts\n if (\n $filter('containsNone')([geneReport.gene], ['BRCA1', 'BRCA2']) ||\n geneReport.gender == 'M' ||\n geneReport.mutationName ||\n (geneReport.gene == 'BRCA2' && allelicity == '2')\n ) {\n geneReport.showSingleAgeChartTitle = true;\n } else if (\n geneReport.gender == 'F' &&\n $filter('containsAny')([geneReport.gene], ['BRCA1', 'BRCA2']) &&\n !geneReport.mutationName\n ) {\n geneReport.showDecadeAgeChartTitle = true;\n }\n\n // BRCA1 R1699Q, M has unknown specific risks.\n if (\n gene.name == 'BRCA1' &&\n gene.mutationName == 'R1699Q' &&\n scope.reportContent.gender == 'M'\n ) {\n geneReport.mutationName = '';\n }\n\n // Legend label copy\n let msgRiskLabel = '';\n if (geneReport.allelicity == 2) {\n msgRiskLabel = ' with a mutation in both copies of ' + gene.name;\n } else {\n msgRiskLabel = ' with ' + (geneReport.useSingleRiskLogic ? 'a single ' : '') + gene.name;\n }\n if (geneReport.mutationName) {\n msgRiskLabel = msgRiskLabel + geneReport.mutationName;\n } else if (geneReport.allelicity != 2) {\n msgRiskLabel = msgRiskLabel + ' mutation';\n }\n const msgBaselineLabel = 'Average among US ';\n if (scope.reportContent.gender == 'F') {\n geneReport.msgRiskLabel = 'Women' + msgRiskLabel;\n geneReport.msgBaselineLabel = msgBaselineLabel + 'women';\n } else if (scope.reportContent.gender == 'M') {\n geneReport.msgRiskLabel = 'Men' + msgRiskLabel;\n geneReport.msgBaselineLabel = msgBaselineLabel + 'men';\n }\n\n // PTEN-specific Cowden syndrome append\n if (gene.name == 'PTEN' && scope.reportContent.gender == 'F') {\n geneReport.msgRiskLabel += ' and Cowden syndrome';\n geneReport.subtitleReplace =\n 'Risk among US women with a PTEN mutation and Cowden syndrome to develop specific cancers by the age of 70.';\n }\n // APC non-I1307K append\n if (gene.name == 'APC' && !geneReport.mutationName) {\n geneReport.subtitleReplace =\n 'Risk among US ' +\n genderNoun +\n ' with an APC mutation to develop specific cancers by the age of 80 without surgical intervention. In general, risk is higher for those with FAP compared to AFAP.';\n }\n\n // Reconstruct data that gets shown in main chart based on primaryPathogenicRisks\n for (let i = 0; i < primaryPathogenicRisks.length; i++) {\n geneReport.data.push({\n gene: gene.name,\n gender: scope.reportContent.gender,\n phenotype: primaryPathogenicRisks[i].phenotype,\n risks: {\n baseline: primaryBaselineRisks[i],\n pathogenic: primaryPathogenicRisks[i],\n },\n });\n }\n return geneReport;\n } // End of createGeneReport\n\n function createNegativeRisk(report, phenotype) {\n const negativeRisk = {\n gene: '',\n gender: report.gender,\n phenotype: phenotype,\n risks: {\n baseline: $filter('sortedRisks')(report, report.gender, false, phenotype).baseline[0],\n },\n };\n return negativeRisk;\n }\n\n function matchReportRiskAges(geneReport, ageMax) {\n // Double mutations need to have the same max age\n // TODO: Current logic doesn't look at the other mutation's max age\n const matchedAgeReport = angular.copy(geneReport);\n angular.forEach(matchedAgeReport.data, function(data) {\n data.risks.pathogenic.data = data.risks.pathogenic.data.filter(function(riskData) {\n return riskData.age <= ageMax;\n });\n });\n return matchedAgeReport;\n }\n\n function singleReportRiskAge(geneReport, ageOnly) {\n angular.forEach(geneReport.data, function(data) {\n data.risks.pathogenic.data = data.risks.pathogenic.data.filter(function(riskData) {\n return riskData.age == ageOnly;\n });\n data.risks.baseline.data = data.risks.baseline.data.filter(function(riskData) {\n return riskData.age == ageOnly;\n });\n });\n return geneReport;\n }\n\n // Ensure age range charts only display specific age groups, especially age 65 baseline ovarian F risks (used for STK11 reports)\n function filterlifetimeAgeRange(riskData) {\n const lifetimeAgeRange = [30, 40, 50, 60, 70, 80, 95];\n return riskData.filter(function(data) {\n return lifetimeAgeRange.indexOf(parseInt(data.age)) > -1;\n });\n }\n\n const isPotentiallyCompoundHeterozygousReport = $filter(\n 'isPotentiallyCompoundHeterozygousReport'\n )(scope.reportContent);\n const isSingleHomozygousReport = $filter('isSingleHomozygousReport')(\n scope.reportContent.mutations\n );\n\n let hasI1307K;\n if (scope.reportContent.is_positive) {\n scope.geneReports = [];\n angular.forEach($filter('genesWithMutationName')(scope.reportContent.mutations), function(\n gene\n ) {\n let geneReport = createGeneReport(gene);\n if (geneReport.data.length) {\n // Removes duplicate primaryPathogenicRisks when double mutations and controls what graphs show\n\n // CHEK2 F Compound Het subtitle\n if (\n isPotentiallyCompoundHeterozygousReport &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['CHEK2'])\n ) {\n if (scope.reportContent.gender == 'F') {\n geneReport.subtitleAppend =\n ' Please note that these numbers are for women with a single CHEK2 gene mutation. Breast cancer risk in women with a single mutation in each copy of the CHEK2 gene may be twice as high.';\n } else {\n geneReport.subtitleAppend =\n ' Please note that these numbers are for men with a single CHEK2 gene mutation. Prostate and colorectal cancer risk in men with a mutation in each copy of the CHEK2 gene is not yet known.';\n }\n geneReport.showChek2SingleRiskCitation = true;\n } else if (gene.isHomozygous) {\n if (gene.name == 'CHEK2' && scope.reportContent.gender == 'F') {\n geneReport.subtitleAppend =\n ' Please note that these numbers are for women with a single CHEK2 gene mutation. Breast cancer risk in women with two CHEK2 mutations may be twice as high.';\n geneReport.showChek2SingleRiskCitation = true;\n } else if (gene.name == 'CHEK2' && scope.reportContent.gender == 'M') {\n geneReport.subtitleAppend =\n ' Please note that these numbers are for men with a single CHEK2 gene mutation. Cancer risk in men with two CHEK2 mutations is currently unknown.';\n geneReport.showChek2SingleRiskCitation = false;\n } else if (gene.name == 'APC' && gene.gHGVS == namedMutation.apc_i1307k) {\n // H30 APC I1307K Homozygous subtitle\n geneReport.subtitleAppend =\n ' Please note that these numbers are for ' +\n genderNoun +\n ' with a single APC I1307K gene mutation. Research on the risk of colorectal cancer in ' +\n genderNoun +\n ' with this mutation in both copies of the APC gene is ongoing.';\n } else if (gene.name == 'MITF' && scope.reportContent.gender == 'F') {\n // H30 MITF F Homozygous subtitle\n geneReport.subtitleAppend =\n ' Research on the risk of melanoma in women with this mutation in both copies of the MITF gene is ongoing.';\n }\n }\n\n // TODO: Refactor this when good logic exists upon more reports\n // If there are two mutations in two different genes, the risk displayed should be for the lower of the two ages (if different).\n if (\n isPotentiallyCompoundHeterozygousReport &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MUTYH',\n ]) &&\n geneReport.gene != 'CHEK2'\n ) {\n // Check for compound heterozygous MUTYH reports, where we have split logic between primary risks existing and those that don't. When render_version 2 was in place, a MUTYH F Compound Het report was released without biallelic risks for colorectal, so excluding it for those versions, otherwise including it.\n scope.geneReports.push(matchReportRiskAges(createGeneReport(gene, 1), 80));\n if (scope.reportContent.render_version >= 3) {\n scope.geneReports.push(matchReportRiskAges(createGeneReport(gene, 2), 80));\n }\n } else if (\n // BRCA2 Homozygous / Compound Het\n (isPotentiallyCompoundHeterozygousReport || isSingleHomozygousReport) &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['BRCA2'])\n ) {\n scope.geneReports.push(singleReportRiskAge(createGeneReport(gene, 2), 50));\n scope.geneReports.push(geneReport);\n } else if (\n // MSH6 Homozygous\n isSingleHomozygousReport &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['MSH6'])\n ) {\n // Do nothing, no charts should appear for MSH6 Homozygous\n } else if (gene.name == 'CDKN2A') {\n geneReport.subtitleReplace =\n 'Risk among US ' +\n (geneReport.gender == 'F' ? 'women' : 'men') +\n ' with a CDKN2A mutation to develop specific cancers by the age of ' +\n geneReport.commonRiskAge +\n '. Melanoma has a wide risk range because of factors such as age, sun exposure, and ethnicity, among others.';\n scope.geneReports.push(matchReportRiskAges(geneReport, geneReport.commonRiskAge));\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'PALB2',\n ])\n ) {\n if (geneReport.gene == 'PALB2') {\n geneReport.subtitleReplace =\n 'Risk among US women with a PALB2 mutation to develop breast cancer by the age of 70 is highlighted because its impact is higher.';\n scope.geneReports.push(matchReportRiskAges(geneReport, geneReport.commonRiskAge));\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'CHEK2',\n ])\n ) {\n const hasR1699Q = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.brca1_r1699q\n );\n if (hasR1699Q) {\n if (geneReport.gene == 'BRCA1') {\n geneReport.subtitleReplace =\n 'Risk among US women with a BRCA1 R1699Q mutation to develop ovarian cancer by age 70.';\n geneReport.data = geneReport.data.filter(function(risk) {\n return !(risk.gene == 'BRCA1' && risk.phenotype == 'breast cancer');\n });\n } else {\n // CHEK2\n geneReport.subtitleReplace =\n 'Risk among US women with a CHEK2 mutation to develop breast cancer by age 70. With genes in shared cancer pathways like BRCA1 and CHEK2, it is believed that risk corresponds to the gene with the greater impact. Because the BRCA1 R1699Q mutation is associated with lower risks of breast cancer than other BRCA1 mutations, CHEK2 risk is highlighted.';\n }\n scope.geneReports.push(geneReport);\n } else {\n if (geneReport.gene == 'BRCA1') {\n if (scope.reportContent.gender == 'F') {\n geneReport.subtitleReplace =\n 'Risk among US women with a BRCA1 mutation to develop specific cancers by different ages in their lives is highlighted because its impact is higher.';\n scope.geneReports.push(matchReportRiskAges(geneReport, 70));\n } else {\n if (scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n // BO19 BRCA1 + CHEK2 M only shows BRCA1 charts\n // H30 uses standard subtitle because it shows both genes\n geneReport.subtitleReplace =\n 'Risk among US men with a BRCA1 mutation to develop specific cancers by the age of 70. CHEK2 mutations are not currently known to affect risk of male breast cancer.';\n }\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n }\n } else if (\n geneReport.gene == 'CHEK2' &&\n geneReport.gender == 'M' &&\n scope.reportContent.template.test_type == testTypes.hereditary30\n ) {\n // H30 BRCA1 + CHEK2 M\n geneReport.subtitleReplace =\n 'Risk among US men with a CHEK2 mutation to develop specific cancers by the age of 70. Prostate cancer risk associated with a CHEK2 mutation is highlighted because its impact is higher.';\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n }\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'BARD1',\n ])\n ) {\n if (geneReport.gene == 'BRCA1') {\n geneReport.subtitleReplace =\n 'Risk among US women with a BRCA1 mutation to develop specific cancers by different ages in their lives is highlighted because its impact is higher.';\n scope.geneReports.push(geneReport);\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'PMS2',\n ])\n ) {\n if (geneReport.gene == 'PMS2') {\n geneReport.subtitleAppend =\n ' Ovarian cancer risk is increased, but BRCA1 is highlighted because its impact is higher.';\n }\n if (geneReport.gene == 'BRCA1') {\n geneReport = matchReportRiskAges(geneReport, 70);\n }\n geneReport.data = geneReport.data.filter(function(risk) {\n return !(\n risk.gene == 'PMS2' &&\n (risk.phenotype == 'breast cancer' || risk.phenotype == 'ovarian cancer')\n );\n });\n // Remove reference 92 from the PMS chart references cause it's referring to breast cancer, no need to remove it from references because it's used in the family tab risk tables\n if (geneReport.gene == 'PMS2') {\n geneReport.pathogenicReferences.splice(geneReport.pathogenicReferences.indexOf(92));\n }\n scope.geneReports.push(geneReport);\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'BARD1',\n 'CHEK2',\n 'MUTYH',\n ])\n ) {\n if (geneReport.gene == 'CHEK2') {\n geneReport = singleReportRiskAge(geneReport, 70);\n scope.geneReports.push(geneReport);\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'RAD51C',\n ])\n ) {\n // RAD51C isn't shown because BRCA1's breast and ovarian cancer risk is higher\n if (geneReport.gene == 'BRCA1') {\n geneReport.subtitleReplace =\n 'Risk among US women with a BRCA1 mutation to develop specific cancers by different ages in their lives is highlighted because its impact is higher.';\n scope.geneReports.push(geneReport);\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'MUTYH',\n ])\n ) {\n if (geneReport.gene == 'BRCA1') {\n scope.geneReports.push(geneReport);\n // Special logic for BRCA1 + Homozygous/in-trans MUTYH\n } else if (\n geneReport.gene == 'MUTYH' &&\n scope.reportContent.allelicity_by_gene['MUTYH'] == 'biallelic'\n ) {\n geneReport = createGeneReport(gene, 2);\n geneReport.subtitleReplace =\n 'Risk among US ' +\n genderNoun +\n ' with a mutation in each copy of the MUTYH gene to develop specific cancers by the age of 80 without surgical intervention.';\n scope.geneReports.push(geneReport);\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'ATM',\n 'MSH6',\n ])\n ) {\n hasI1307K = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.apc_i1307k\n );\n // For APC I1307K + ATM + MSH6, only show ATM breast cancer risk\n if (hasI1307K && geneReport.gene != 'APC') {\n scope.geneReports.push(matchReportRiskAges(geneReport, geneReport.commonRiskAge));\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'ATM',\n ])\n ) {\n hasI1307K = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.apc_i1307k\n );\n // For APC I1307K + ATM, only show ATM breast cancer risk\n if (hasI1307K && geneReport.gene == 'ATM') {\n scope.geneReports.push(geneReport);\n } else if (!hasI1307K) {\n scope.geneReports.push(matchReportRiskAges(geneReport, geneReport.commonRiskAge));\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'APC',\n ])\n ) {\n hasI1307K = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.apc_i1307k\n );\n if (hasI1307K && geneReport.gene == 'BARD1' && geneReport.gender == 'F') {\n // For F, only show BARD1 breast cancer risk at age 80\n scope.geneReports.push(singleReportRiskAge(geneReport, 80));\n } else if (hasI1307K && geneReport.gene == 'APC' && geneReport.gender == 'M') {\n // For F, only show APC I1307K colorectal risk at age 80\n scope.geneReports.push(singleReportRiskAge(geneReport, 80));\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'PMS2',\n ])\n ) {\n if (geneReport.gene == 'BARD1') {\n geneReport = singleReportRiskAge(geneReport, 70);\n geneReport.commonRiskAge = 70;\n }\n scope.geneReports.push(geneReport);\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BARD1',\n 'CHEK2',\n ])\n ) {\n // BARD1 + CHEK2 only shows CHEK2 risks\n if (geneReport.gene == 'CHEK2') {\n geneReport = singleReportRiskAge(geneReport, 70);\n if (geneReport.gender == 'F') {\n geneReport.subtitleReplace =\n 'Risk among US women with a CHEK2 mutation to develop breast cancer by the age of 70 is highlighted because its impact is higher.';\n }\n scope.geneReports.push(geneReport);\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'MITF',\n ])\n ) {\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'MITF',\n ])\n ) {\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'RAD51D',\n ])\n ) {\n // CHEK2 and RAD51D do not share the common age.\n if (geneReport.gene == 'RAD51D') {\n geneReport = singleReportRiskAge(geneReport, 80);\n geneReport.commonRiskAge = 80;\n } else if (geneReport.gene == 'CHEK2') {\n geneReport = singleReportRiskAge(geneReport, 70);\n geneReport.commonRiskAge = 70;\n }\n scope.geneReports.push(geneReport);\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MLH1',\n 'MITF',\n ])\n ) {\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'BMPR1A',\n ])\n ) {\n scope.geneReports.push(matchReportRiskAges(geneReport, 80)); // Only CHEK2 double mut that uses age 80, most use age 70\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRIP1',\n 'MSH6',\n ])\n ) {\n scope.geneReports.push(matchReportRiskAges(geneReport, 70));\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'MUTYH',\n ]) &&\n scope.reportContent.genes_with_pathogenic_mutations.length == 2\n ) {\n if (geneReport.gene == 'CHEK2') {\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'BRCA2',\n ])\n ) {\n if (geneReport.gene == 'BRCA2') {\n if (scope.reportContent.gender == 'F') {\n if (scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n geneReport.subtitleReplace =\n 'Risk among US women with a BRCA2 mutation to develop specific cancers by the age of 70. With genes in shared cancer pathways like BRCA2 and ATM, it is believed that risk corresponds to the gene with the greater impact (BRCA2).';\n } else {\n geneReport.subtitleReplace =\n 'Risk among US women with a BRCA2 mutation to develop specific cancers by different ages in their lives is highlighted because its impact is higher.';\n }\n }\n scope.geneReports.push(geneReport);\n } else if (scope.reportContent.gender == 'M') {\n scope.geneReports.push(geneReport);\n }\n } else if (\n geneReport.gene == 'BRCA1' &&\n scope.reportContent.gender == 'M' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'BRCA1',\n ])\n ) {\n geneReport.subtitleReplace =\n 'Risk among US men with a BRCA1 mutation to develop specific cancers by the age of 70. ATM mutations are not currently known to affect risk of male breast cancer.';\n geneReport = matchReportRiskAges(geneReport, 70);\n scope.geneReports.push(geneReport);\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'ATM',\n 'CHEK2',\n ])\n ) {\n if (geneReport.gender == 'F') {\n if (geneReport.gene == 'CHEK2') {\n if (scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n geneReport.subtitleReplace =\n 'Risk among US women with a CHEK2 mutation to develop specific cancers by the age of 70. With genes in shared cancer pathways like CHEK2 and ATM, it is believed that risk corresponds to the gene with the greater impact (CHEK2).';\n }\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n }\n } else {\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'CHEK2',\n ])\n ) {\n // also handles the inclusion of APC I1307K\n // Only show BRCA2 charts. BRCA2 shows up as the only primary chart, so we need to alter that subtitle.\n if (geneReport.gene == 'BRCA2') {\n if (geneReport.gender == 'M') {\n geneReport.subtitleReplace =\n 'Risk among US men with a BRCA2 mutation to develop specific cancers by age 70 is highlighted because its impact is higher.';\n } else {\n geneReport.subtitleReplace =\n 'Risk among US women with a BRCA2 mutation to develop specific cancers by different ages in their lives is highlighted because its impact is higher.';\n }\n scope.geneReports.push(geneReport);\n }\n } else if (\n geneReport.gender == 'M' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'MSH6',\n ])\n ) {\n if (geneReport.gene == 'MSH6') {\n geneReport.commonRiskAge = 70;\n }\n scope.geneReports.push(geneReport);\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'MSH2',\n ])\n ) {\n if (geneReport.gene == 'MSH2') {\n geneReport.commonRiskAge = 70;\n }\n scope.geneReports.push(geneReport);\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'APC',\n ])\n ) {\n hasI1307K = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.apc_i1307k\n );\n if (hasI1307K && geneReport.gene != 'APC') {\n // Colorectal cancer risk is shown as a primary for APC I1307K but\n // since CHEK2 has much higher risk for breast cancer and has lower\n // risk for colorectal cancer, we want to show both colorectal cancer\n // as secondary.\n scope.geneReports.push(matchReportRiskAges(geneReport, 70));\n } else if (geneReport.gender == 'M' && hasI1307K && geneReport.gene == 'APC') {\n scope.geneReports.push(matchReportRiskAges(geneReport, 70));\n } else if (!hasI1307K && geneReport.gene == 'APC' && geneReport.gender == 'F') {\n geneReport.subtitleReplace =\n 'Risk among US women with an APC mutation to develop specific cancers by the age of 80 without surgical intervention. In general, risk is higher for those with FAP compared to AFAP.';\n geneReport.commonRiskAge = 80;\n scope.geneReports.push(matchReportRiskAges(geneReport, 80));\n } else if (!hasI1307K && geneReport.gene == 'CHEK2' && geneReport.gender == 'F') {\n geneReport.commonRiskAge = 80;\n scope.geneReports.push(matchReportRiskAges(geneReport, 80));\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'MUTYH',\n ]) &&\n scope.reportContent.genes_with_pathogenic_mutations.length == 2\n ) {\n // Omit MUTYH\n if (geneReport.gene == 'BRCA2') {\n if (scope.reportContent.gender == 'M') {\n geneReport = matchReportRiskAges(geneReport, 70);\n }\n scope.geneReports.push(geneReport);\n }\n } else if (\n scope.reportContent.gender == 'F' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'TP53',\n ])\n ) {\n if (geneReport.gene == 'BRCA2') {\n geneReport.commonRiskAge = 70;\n scope.geneReports.push(matchReportRiskAges(geneReport, 70));\n } else if (geneReport.gene == 'TP53') {\n geneReport.commonRiskAge = 95;\n scope.geneReports.push(matchReportRiskAges(geneReport, 95));\n }\n } else if (\n scope.reportContent.gender == 'F' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'TP53',\n ])\n ) {\n if (geneReport.gene == 'CHEK2') {\n geneReport.commonRiskAge = 70;\n scope.geneReports.push(matchReportRiskAges(geneReport, 70));\n } else if (geneReport.gene == 'TP53') {\n geneReport.commonRiskAge = 95;\n scope.geneReports.push(matchReportRiskAges(geneReport, 95));\n }\n } else if (\n scope.reportContent.gender == 'F' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MSH2',\n 'APC',\n ])\n ) {\n hasI1307K = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.apc_i1307k\n );\n if (hasI1307K && geneReport.gene == 'MSH2') {\n // omit colorectal from APC I1307K\n scope.geneReports.push(geneReport);\n }\n } else if (\n scope.reportContent.gender == 'F' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MSH6',\n 'APC',\n ])\n ) {\n hasI1307K = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.apc_i1307k\n );\n if (hasI1307K) {\n // omit colorectal from APC I1307K\n if (geneReport.gene == 'MSH6') {\n geneReport.subtitleReplace =\n 'Risk among US women with an MSH6 mutation to develop specific cancers by the age of 70 is highlighted because its impact is higher.';\n scope.geneReports.push(geneReport);\n }\n } else {\n scope.geneReports.push(geneReport);\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'APC',\n ])\n ) {\n hasI1307K = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.apc_i1307k\n );\n if (hasI1307K) {\n // omit colorectal from APC I1307K\n if (geneReport.gene == 'BRCA2') {\n scope.geneReports.push(geneReport);\n }\n } else {\n scope.geneReports.push(geneReport);\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'PALB2',\n ])\n ) {\n // omit PALB2 because BRCA2 prostate risk is higher\n if (geneReport.gene == 'BRCA2') {\n genderNoun = geneReport.gender == 'F' ? 'women' : 'men';\n geneReport.subtitleReplace =\n 'Risk among US ' +\n genderNoun +\n ' with a BRCA2 mutation to develop specific cancers by age 70 is highlighted because its impact is higher.';\n scope.geneReports.push(geneReport);\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MLH1',\n 'MUTYH',\n ])\n ) {\n if (geneReport.gene == 'MLH1') {\n // MLH1 has higher colorectal, so only show that\n scope.geneReports.push(geneReport);\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['MUTYH'])\n ) {\n if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['ATM'])\n ) {\n // MUTYH + ATM\n // Select age 70 risk for both genes.\n scope.geneReports.push(matchReportRiskAges(geneReport, 70));\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'TP53',\n ])\n ) {\n // MUTYH + TP53\n // TP53 should overwrite all MUTYH risks since it has higher risks for all cancers.\n if (geneReport.gene == 'TP53') {\n geneReport.subtitleReplace =\n 'Risk among US men with a TP53 mutation to develop specific cancers by the age of 95 is highlighted because its impact is higher.';\n scope.geneReports.push(matchReportRiskAges(geneReport, 95));\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BAP1',\n ]) ||\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'PTEN',\n ]) ||\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'PALB2',\n ])\n ) {\n scope.geneReports.push(matchReportRiskAges(geneReport, geneReport.commonRiskAge));\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MSH2',\n ])\n ) {\n // MUTYH Homozygous + MSH2 have split age (80 and 70 respectively) logic per:\n // https://docs.google.com/document/d/1yQ58Nrb90Ht0XWVxO8lf5hM_op_sWqTN9eGFsWTMUkQ/edit\n if (\n geneReport.gene == 'MUTYH' &&\n scope.reportContent.allelicity_by_gene['MUTYH'] == 'biallelic'\n ) {\n geneReport = createGeneReport(gene, 2);\n geneReport.commonRiskAge = 80;\n geneReport.subtitleReplace =\n 'Risk among US ' +\n genderNoun +\n ' with a mutation in each copy of the MUTYH gene to develop specific cancers by the age of 80 without surgical intervention.';\n scope.geneReports.push(singleReportRiskAge(geneReport, 80));\n } else {\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n }\n } else {\n // All other MUTYH\n if (isSingleHomozygousReport) {\n geneReport = createGeneReport(gene, 2);\n geneReport.subtitleReplace =\n 'Risk among US ' +\n genderNoun +\n ' with a mutation in each copy of the MUTYH gene to develop specific cancers by the age of 80 without surgical intervention.';\n }\n scope.geneReports.push(matchReportRiskAges(geneReport, 80));\n }\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'MSH2',\n ])\n ) {\n if (geneReport.gene == 'MSH2') {\n if (geneReport.gender == 'F') {\n geneReport.subtitleReplace =\n 'Risk among US women with an MSH2 mutation to develop specific cancers by the age of 70. Colorectal cancer risk associated with MSH2 is highlighted because its impact is higher.';\n } else {\n geneReport.subtitleReplace =\n 'Risk among US men with an MSH2 mutation to develop specific cancers by the age of 70. Colorectal cancer risk associated with MSH2 is highlighted because its impact is higher.';\n }\n }\n scope.geneReports.push(matchReportRiskAges(geneReport, 70));\n } else if (\n $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.brca1_r1699q\n ) &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, ['BRCA1'])\n ) {\n // BRCA1 R1699Q single mutation subtitle override\n if (geneReport.gene == 'BRCA1') {\n if (geneReport.gender == 'F') {\n geneReport.subtitleReplace =\n 'Risk among US women with a BRCA1 R1699Q mutation to develop specific cancers by age 80.';\n } else if (geneReport.gender == 'M') {\n geneReport.subtitleReplace =\n 'Risk among US men with a BRCA1 mutation to develop specific cancers by the age of 80. Please note that these risk estimates are generalized for a man with a BRCA1 gene mutation and are not specific to a BRCA1 R1699Q mutation. Research on this specific mutation is ongoing.';\n }\n }\n scope.geneReports.push(geneReport);\n } else if (\n geneReport.gender == 'M' &&\n $filter('containsAny')([geneReport.gene], ['BRCA1', 'BRCA2']) &&\n !$filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'BRCA2',\n ]) &&\n !$filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'PALB2',\n ])\n ) {\n // BRCA1/BRCA2 M-override to prevent chart logic from showing age 70 and 80\n // TODO: May need to apply this to more than BRCA1/BRCA2\n if (geneReport.gene == 'BRCA1') {\n scope.geneReports.push(singleReportRiskAge(geneReport, 80));\n } else if (geneReport.gene == 'BRCA2') {\n scope.geneReports.push(singleReportRiskAge(geneReport, 70));\n }\n } else {\n scope.geneReports.push(matchReportRiskAges(geneReport, geneReport.commonRiskAge));\n }\n }\n });\n } else if (scope.reportContent.is_negative) {\n let riskLabel = 'Average risk among US ';\n if (scope.reportContent.gender == 'F') {\n riskLabel += 'women';\n } else {\n riskLabel += 'men';\n }\n scope.negativeReport = {\n gender: scope.reportContent.gender,\n riskLabel: riskLabel,\n baselineReferences: $filter('uniqueReferences')(\n $filter('sortedRisks')(scope.reportContent, scope.reportContent.gender, false).baseline\n ),\n risks: [],\n };\n if (scope.reportContent.gender == 'F') {\n // Only add charts for non-survivor cases\n if (!scope.reportContent.breast_cancer_survivor) {\n scope.negativeReport.risks.push(\n createNegativeRisk(scope.reportContent, 'breast cancer')\n );\n }\n // Show ovarian if breast ovarian 19, otherwise show colorectal\n if (scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n // Fallopian tube cancer is linked to ovarian cancer, so don't show the chart in that case either\n if (\n !scope.reportContent.ovarian_cancer_survivor &&\n !scope.reportContent.fallopian_tube_cancer_survivor\n ) {\n // Due to STK11's addition of age 65 ovarian baseline risks, we need to omit them here because they'll mess the expected age range (30, 40, 50, 60, 70, 80, 95)\n angular.forEach(scope.reportContent.risks, function(risk) {\n if (risk.phenotype == 'ovarian cancer' && risk.gender == 'F') {\n risk.data = filterlifetimeAgeRange(risk.data);\n }\n });\n scope.negativeReport.risks.push(\n createNegativeRisk(scope.reportContent, 'ovarian cancer')\n );\n }\n } else if (\n scope.reportContent.template.test_type == testTypes.hereditary30 &&\n !scope.reportContent.colorectal_cancer_survivor\n ) {\n scope.negativeReport.risks.push(\n createNegativeRisk(scope.reportContent, 'colorectal cancer')\n );\n }\n } else if (scope.reportContent.gender == 'M') {\n if (\n !scope.reportContent.breast_cancer_survivor &&\n scope.reportContent.template.test_type == testTypes.breastOvarian19\n ) {\n scope.negativeReport.risks.push(\n createNegativeRisk(scope.reportContent, 'male breast cancer')\n );\n } else if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n if (!scope.reportContent.prostate_cancer_survivor) {\n scope.negativeReport.risks.push(\n createNegativeRisk(scope.reportContent, 'prostate cancer')\n );\n }\n if (!scope.reportContent.colorectal_cancer_survivor) {\n scope.negativeReport.risks.push(\n createNegativeRisk(scope.reportContent, 'colorectal cancer')\n );\n }\n }\n }\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportSummaryExtra($filter, testTypes, namedMutation) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_summary_extra.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n // render_version changes for scope.colorTestName\n // H30 >= v1: \"the Color hereditary cancer risk test\"\n // BO19 v5: \"the Color breast and ovarian cancer risk test\"\n // BO19 v2-4: \"Color\\'s breast and ovarian cancer risk test\"\n // BO19 v1: \"the Color test\"\n if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n scope.colorTestName = 'the Color hereditary cancer risk test';\n } else if (\n scope.reportContent.template.test_type == testTypes.breastOvarian19 &&\n (scope.reportContent.render_version == 2 ||\n scope.reportContent.render_version == 3 ||\n scope.reportContent.render_version == 4)\n ) {\n scope.colorTestName = \"Color's breast and ovarian cancer risk test\";\n } else if (\n scope.reportContent.template.test_type == testTypes.breastOvarian19 &&\n scope.reportContent.render_version >= 5\n ) {\n scope.colorTestName = 'the Color breast and ovarian cancer risk test';\n } else {\n scope.colorTestName = 'the Color test';\n }\n\n function createGeneReport(report, gene, gender, allelicity) {\n const geneReport = {};\n geneReport.gene = gene;\n geneReport.mutationNoun = 'mutation';\n let risks;\n if (allelicity) {\n risks = $filter('sortedRisks')(report, gender, true, null, gene, allelicity);\n } else {\n if (report.allelicity_by_gene[gene] == 'monoallelic') {\n risks = $filter('sortedRisks')(report, gender, true, null, gene, '1');\n } else {\n risks = $filter('sortedRisks')(report, gender, true, null, gene);\n }\n }\n geneReport.biallelicRisksKnown = $filter('sortedRisks')(\n report,\n gender,\n true,\n null,\n gene,\n '2'\n ).pathogenic.length;\n\n const customPrimaryPhenotypes = $filter('customPhenotypes')(\n scope.reportContent,\n gene,\n 'primary'\n );\n const customSecondaryPhenotypes = $filter('customPhenotypes')(\n scope.reportContent,\n gene,\n 'secondary'\n );\n const secondaryPhenotypes = customSecondaryPhenotypes || 'secondary';\n\n if (angular.isUndefined(customPrimaryPhenotypes)) {\n geneReport.primaryCancers = $filter('cancerString')(\n $filter('sortRiskByPhenotype')(\n risks.pathogenic,\n 'primary',\n [gene],\n scope.reportContent.template.test_type\n ),\n allelicity\n ); // Remove duplicate primary cancers here\n } else if (customPrimaryPhenotypes.length) {\n geneReport.primaryCancers = $filter('joinEnglishList')(customPrimaryPhenotypes);\n } else {\n geneReport.primaryCancers = null;\n }\n\n if (\n gene == 'APC' &&\n $filter('containsMutation')(scope.reportContent.mutations, namedMutation.apc_i1307k)\n ) {\n geneReport.mutationName = ' I1307K';\n }\n\n if (\n gene == 'MITF' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MITF',\n 'MUTYH',\n ])\n ) {\n // Special use-case for MITF + MUTYH, we want to show different age than primary\n geneReport.commonRiskAge = 95;\n } else if (\n gene == 'MSH6' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'MSH6',\n ])\n ) {\n geneReport.commonRiskAge = 70;\n } else if (\n gene == 'MSH2' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA1',\n 'MSH2',\n ])\n ) {\n geneReport.commonRiskAge = 70;\n } else if (\n gene == 'TP53' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'BRCA2',\n 'TP53',\n ])\n ) {\n geneReport.commonRiskAge = 95;\n } else if (\n gene == 'TP53' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'CHEK2',\n 'TP53',\n ])\n ) {\n geneReport.commonRiskAge = 95;\n } else if (\n gene == 'MUTYH' &&\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'MUTYH',\n 'MSH2',\n ]) &&\n scope.reportContent.allelicity_by_gene['MUTYH'] == 'biallelic'\n ) {\n geneReport.commonRiskAge = 80;\n } else if (\n $filter('containsAll')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'CHEK2',\n ]) & !$filter('containsMutation')(scope.reportContent.mutations, namedMutation.apc_i1307k)\n ) {\n // APC (non-i1307K) + CHEK2 Has a different common risk age than APC i1307K + CHEK2, so each\n // implementation requires a bit more unconventional logic\n geneReport.commonRiskAge = 80;\n }\n\n geneReport.secondaryRisks = $filter('sortRiskByPhenotype')(\n risks.pathogenic,\n secondaryPhenotypes,\n [gene],\n scope.reportContent.template.test_type\n );\n\n // notDesignedForCancers is only used on H30 reports and >= RV5 BO19 reports, removes the hereditary cancers marketed as being tested\n let notDesignedForCancers = [];\n if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n notDesignedForCancers = geneReport.secondaryRisks.filter(function(risk) {\n return (\n risk.phenotype != 'pancreatic cancer' &&\n risk.phenotype != 'ovarian cancer' &&\n risk.phenotype != 'uterine cancer' &&\n risk.phenotype != 'stomach cancer' &&\n risk.phenotype != 'breast cancer' &&\n risk.phenotype != 'colorectal cancer' &&\n risk.phenotype != 'melanoma' &&\n risk.phenotype != 'prostate cancer'\n );\n });\n } else if (\n scope.reportContent.template.test_type == testTypes.breastOvarian19 &&\n scope.reportContent.render_version >= 5\n ) {\n // >= RV5 BO19 reports need to correctly remove the 3 cancers covered there\n notDesignedForCancers = risks.pathogenic.filter(function(risk) {\n return (\n risk.phenotype != 'ovarian cancer' &&\n risk.phenotype != 'breast cancer' &&\n risk.phenotype != 'male breast cancer'\n );\n });\n }\n\n // Set allelicity\n geneReport.secondaryRisks.forEach(function(risk) {\n if (!geneReport.allelicity) {\n geneReport.allelicity = risk.allelicity;\n } else if (risk.allelicity && geneReport.allelicity != risk.allelicity) {\n throw new Error('All secondary risks need to have the same allelicity.');\n }\n });\n\n // Set defaults for these values first\n geneReport.secondaryCancers1 = $filter('cancerString')(\n geneReport.secondaryRisks,\n allelicity\n );\n geneReport.secondaryCancers1Append = '';\n // BO19 reports use \"secondaryCancers2\" in their 2nd paragraph string generation, and RV < 5 errantly doesn't include primary cancers that aren't breast or ovarian\n if (\n scope.reportContent.render_version >= 5 &&\n scope.reportContent.template.test_type == testTypes.breastOvarian19\n ) {\n geneReport.secondaryCancers2 = $filter('cancerString')(notDesignedForCancers);\n } else {\n geneReport.secondaryCancers2 = geneReport.secondaryCancers1;\n }\n\n // Override geneReport.secondaryCancers if necessary depending on the lower conditions\n if (gene == 'TP53') {\n if (\n scope.reportContent.template.test_type == testTypes.breastOvarian19 &&\n scope.reportContent.gender == 'F'\n ) {\n geneReport.primaryCancers =\n 'breast, ovarian, brain, sarcoma (bone) and sarcoma (soft tissue) cancer';\n geneReport.secondaryCancers1 =\n 'other Li-Fraumeni related cancers, including adrenocortical carcinoma, colorectal, leukemia, liver, lung, lymphoma, melanoma, pancreas and stomach';\n } else if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n if (scope.reportContent.gender == 'F') {\n geneReport.primaryCancers =\n 'breast, brain, and sarcoma (cancer of the bone and soft tissue)';\n geneReport.secondaryCancers1 =\n 'other Li-Fraumeni related cancers, including adrenocortical carcinoma, colorectal, leukemia, liver, lung, lymphoma, melanoma, ovarian, pancreatic, and stomach';\n } else {\n geneReport.primaryCancers =\n 'brain cancer and sarcoma (cancer of the bone and soft tissue)';\n geneReport.secondaryCancers1 =\n 'other Li-Fraumeni related cancers, including adrenocortical carcinoma, colorectal, leukemia, liver, lung, lymphoma, melanoma, pancreatic, and stomach';\n }\n geneReport.panelNotDesignedForCancers =\n 'adrenocortical carcinoma, leukemia, liver and lung cancer, and lymphoma';\n geneReport.panelNotDesignedForRiskNoun = 'risks';\n geneReport.panelNotDesignedForCancerNoun = 'these cancers';\n }\n geneReport.secondaryCancers2 = 'these cancers';\n } else if (gene == 'MSH6') {\n // The first wording is only applicable to BO19 MSH6 F reports\n if (\n gender == 'F' &&\n scope.reportContent.template.test_type == testTypes.breastOvarian19\n ) {\n geneReport.primaryCancers = 'ovarian, colorectal and uterine cancers';\n geneReport.secondaryCancers1 =\n 'other cancers related to Lynch syndrome, including brain/central nervous system, hepatobiliary tract, pancreas, sebaceous neoplasms, small bowel, stomach and urinary tract';\n } else {\n geneReport.secondaryCancers1 =\n 'other cancers related to Lynch syndrome, including brain, hepatobiliary tract, pancreatic, sebaceous neoplasms, small bowel, stomach, and urinary tract cancer';\n }\n geneReport.secondaryCancers2 = 'these cancers';\n geneReport.panelNotDesignedForCancers =\n 'brain, hepatobiliary tract, sebaceous neoplasms, small bowel, and urinary tract cancer';\n geneReport.panelNotDesignedForRiskNoun = 'risks';\n geneReport.panelNotDesignedForCancerNoun = 'these cancers';\n } else if (gene == 'MSH2') {\n geneReport.secondaryCancers2 = 'these cancers';\n geneReport.panelNotDesignedForCancers =\n 'brain, hepatobiliary tract, sebaceous neoplasms, small bowel, and urinary tract cancer';\n } else if (gene == 'APC') {\n if (\n !$filter('containsMutation')(scope.reportContent.mutations, namedMutation.apc_i1307k)\n ) {\n geneReport.primaryCancers = 'colorectal cancer';\n geneReport.secondaryCancers1 =\n 'brain (especially medulloblastoma), pancreatic, small bowel (especially in the duodenum), stomach, thyroid cancer and non-cancerous growths called desmoid tumors';\n geneReport.panelNotDesignedForCancers =\n 'brain, small bowel, and thyroid cancers and desmoid tumors';\n geneReport.panelNotDesignedForRiskNoun = 'risks';\n geneReport.panelNotDesignedForCancerNoun = 'these cancers or tumors';\n }\n } else if (gene == 'BAP1') {\n geneReport.secondaryCancers1 =\n 'kidney and lung (specifically a type called mesothelioma) cancer';\n geneReport.panelNotDesignedForCancers = $filter('cancerString')(notDesignedForCancers);\n } else if (gene == 'BMPR1A') {\n geneReport.secondaryCancers1 =\n 'pancreatic and small bowel (especially in the duodenum) cancer';\n geneReport.panelNotDesignedForCancers = 'small bowel cancer';\n } else if (gene == 'EPCAM') {\n geneReport.panelNotDesignedForCancers =\n 'brain, hepatobiliary tract, sebaceous neoplasms, small bowel, and urinary tract cancer';\n } else if (gene == 'MITF') {\n geneReport.secondaryCancers1 = $filter('cancerString')(geneReport.secondaryRisks);\n geneReport.panelNotDesignedForCancers = $filter('cancerString')(notDesignedForCancers);\n } else if (gene == 'MLH1') {\n geneReport.secondaryCancers1 = $filter('cancerString')(geneReport.secondaryRisks);\n geneReport.panelNotDesignedForCancers = $filter('cancerString')(notDesignedForCancers);\n } else if (gene == 'PMS2') {\n geneReport.secondaryCancers1 = $filter('cancerString')(geneReport.secondaryRisks);\n geneReport.panelNotDesignedForCancers = $filter('cancerString')(notDesignedForCancers);\n } else if (gene == 'PTEN') {\n geneReport.geneAppend = ' that cause Cowden syndrome (CS)';\n geneReport.secondaryCancers2 = 'these cancers';\n } else if (gene == 'SMAD4') {\n geneReport.secondaryCancers1 =\n 'pancreatic and small bowel (especially in the duodenum) cancer';\n geneReport.panelNotDesignedForCancers = 'small bowel cancer';\n } else if (gene == 'STK11') {\n geneReport.panelNotDesignedForCancers = $filter('cancerString')(notDesignedForCancers);\n // BO19 requires special handling due to STK specific logic that works around age 65 risks.\n if (\n scope.reportContent.template.test_type == testTypes.breastOvarian19 &&\n scope.reportContent.gender == 'F'\n ) {\n geneReport.secondaryCancers2 =\n 'colorectal, stomach, cervical, lung, pancreatic, small bowel, and uterine cancer';\n }\n } else if (gene == 'MUTYH' && geneReport.allelicity == '2') {\n geneReport.secondaryCancers1 = 'small bowel cancer';\n geneReport.secondaryCancers1Append = ' (especially in the duodenum)';\n } else if (gene == 'BRCA2' && geneReport.allelicity == '2') {\n geneReport.panelNotDesignedForCancerNoun = 'these cancers';\n } else if (gene == 'BRCA1') {\n geneReport.withR1699Q = $filter('containsMutation')(\n scope.reportContent.mutations,\n namedMutation.brca1_r1699q\n );\n }\n\n // Set panelNotDesignedForCancerNoun if not assigned by special cases above.\n if (!geneReport.panelNotDesignedForCancerNoun) {\n if (geneReport.panelNotDesignedForCancers) {\n if (notDesignedForCancers.length > 1) {\n geneReport.panelNotDesignedForRiskNoun = 'risks';\n geneReport.panelNotDesignedForCancerNoun = 'these cancers';\n } else {\n geneReport.panelNotDesignedForRiskNoun = 'risk';\n geneReport.panelNotDesignedForCancerNoun = 'this cancer';\n }\n } else {\n geneReport.panelNotDesignedForRiskNoun = 'risk';\n geneReport.panelNotDesignedForCancerNoun = 'this cancer';\n }\n }\n\n if (gender == 'F') {\n geneReport.genderNoun = 'woman';\n geneReport.genderNounPlural = 'women';\n } else {\n geneReport.genderNoun = 'man';\n geneReport.genderNounPlural = 'men';\n }\n geneReport.uniqueRiskReferences = $filter('uniqueReferences')(geneReport.secondaryRisks);\n geneReport.uniqueBaselineReferences = $filter('uniqueReferences')(\n $filter('sortRiskByPhenotype')(\n risks.baseline,\n secondaryPhenotypes,\n [gene],\n scope.reportContent.template.test_type\n )\n );\n if (!geneReport.commonRiskAge) {\n geneReport.commonRiskAge = $filter('commonRiskAge')(\n scope.reportContent.genes_with_pathogenic_mutations,\n geneReport.secondaryRisks\n );\n }\n geneReport.isElevated = geneReport.secondaryRisks.filter(function(risk) {\n return $filter('isElevated')(risk.data[0].risk);\n });\n if (geneReport.secondaryRisks.length) {\n angular.forEach(geneReport.secondaryRisks, function(risk) {\n risk.baselineData = risks.baseline.filter(function(baseline) {\n return risk.phenotype == baseline.phenotype;\n })[0].data;\n });\n }\n\n // If report should use singleRiskLogic (i.e. compound het or homozygous), show extra content\n if ($filter('useSingleRiskLogic')(scope.reportContent, geneReport.gene)) {\n // For P1\n if (geneReport.allelicity == '1') {\n geneReport.singleP1Text = 'single ';\n }\n // For risk table column header\n if (geneReport.allelicity == '2') {\n geneReport.withGeneNumMutation = 'two ';\n geneReport.mutationNoun = 'mutations';\n }\n geneReport.showCompoundSentence = true;\n if ($filter('isSingleHomozygousReport')(scope.reportContent.mutations)) {\n geneReport.isSingleHomozygous = true;\n }\n }\n\n // Add STK11-specific age exceptions\n geneReport.secondaryRisks = $filter('insertDisplayAge')(\n geneReport.secondaryRisks,\n geneReport.commonRiskAge,\n scope.reportContent.render_version\n );\n geneReport.hasAgeExceptionsAt = $filter('hasAgeExceptionsAt')(geneReport.secondaryRisks);\n\n return geneReport;\n } // End of createGeneReport\n\n if (scope.reportContent.is_positive) {\n scope.geneReports = [];\n angular.forEach(scope.reportContent.genes_with_pathogenic_mutations, function(gene) {\n // Special handling for BRCA2 where there are both monoallelic and biallelic risk tables.\n if (\n gene == 'BRCA2' &&\n ($filter('isPotentiallyCompoundHeterozygousReport')(scope.reportContent) ||\n $filter('isSingleHomozygousReport')(scope.reportContent.mutations))\n ) {\n scope.geneReports.push(\n createGeneReport(scope.reportContent, gene, scope.reportContent.gender, '2')\n );\n scope.geneReports.push(\n createGeneReport(scope.reportContent, gene, scope.reportContent.gender, '1')\n );\n } else if (\n gene == 'MUTYH' &&\n scope.reportContent.allelicity_by_gene['MUTYH'] == 'biallelic'\n ) {\n // Special handling for MUTYH where there are only biallelic risk tables.\n scope.geneReports.push(\n createGeneReport(scope.reportContent, gene, scope.reportContent.gender, '2')\n );\n } else {\n const geneReport = createGeneReport(\n scope.reportContent,\n gene,\n scope.reportContent.gender\n );\n if (geneReport.secondaryRisks.length) {\n scope.geneReports.push(geneReport);\n }\n }\n });\n }\n\n let allSecondaryPhenotypeCount = 0;\n angular.forEach(scope.geneReports, function(geneReport) {\n allSecondaryPhenotypeCount += geneReport.secondaryRisks.length;\n });\n if (\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'TP53',\n 'MSH2',\n 'MSH6',\n ]) ||\n allSecondaryPhenotypeCount > 1\n ) {\n scope.allSecondaryCancersPronoun = 'these cancers';\n } else {\n scope.allSecondaryCancersPronoun = 'this cancer';\n }\n\n // H30 Paragraph explaining what this panel doesn't fully cover\n scope.showNotDesignedForText =\n scope.reportContent.template.test_type == testTypes.hereditary30 &&\n $filter('containsAny')(scope.reportContent.genes_with_pathogenic_mutations, [\n 'APC',\n 'BAP1',\n 'MITF',\n 'MLH1',\n 'MSH2',\n 'MSH6',\n 'TP53',\n 'PMS2',\n 'BMPR1A',\n 'EPCAM',\n 'SMAD4',\n 'STK11',\n ]);\n\n scope.testTypes = testTypes;\n\n // Whether or not to show the card\n scope.showSummaryExtraCard =\n scope.reportContent.is_positive &&\n !scope.reportContent.is_somatic &&\n allSecondaryPhenotypeCount;\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportSummaryText($filter, interpretedGenes, testTypes) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_summary_text.html',\n replace: true,\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.testTypes = testTypes;\n scope.listOfGenes = $filter('orderBy')(\n interpretedGenes[scope.reportContent.template.test_type]\n ).join(', ');\n if (scope.reportContent.template.test_type == testTypes.wisdom9) {\n // We don't show low fraction variants for wisdom reports.\n scope.additionalFindingMutations = [];\n } else {\n // Curently, the only qualifications to show the Additional Findings blurb are low fraction/somatic mutations\n scope.additionalFindingMutations = $filter('additionalFindingMutations')(\n scope.reportContent.mutations\n );\n }\n if (scope.additionalFindingMutations.length) {\n scope.additionalFindingGenes = scope.additionalFindingMutations.map(function(mutation) {\n return mutation.gene;\n });\n scope.additionalFindingGenes = $filter('unique')(scope.additionalFindingGenes);\n }\n scope.hasTrueNegatives = $filter('filter')(\n scope.reportContent.reported_variants_in_relatives || [],\n { is_true_negative: true }\n ).length;\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportSummaryTitle($filter) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_summary_title.html',\n replace: true,\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.msgReportTitle = $filter('reportTitle')(scope.reportContent);\n },\n };\n};\n","'use strict'\n\nmodule.exports = function($filter, $translate, testTypes) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/reportSurvivorStringAppend.html',\n scope: {\n reportContent: '=',\n genes: '=?',\n showSecondary: '=?',\n allelicity: '=?'\n },\n link: function(scope, elem) {\n scope.testTypes = testTypes\n scope.survivorStrings = []\n\n // Fallopian tube and PP, we state ovarian cancer as the affected to relate to shown chart\n const ovarianCancerGroup = ['ovarian cancer', 'fallopian tube cancer', 'primary peritoneal cancer']\n\n // Generate the primary phenotype that are part of this report\n let primaryPhenotypes = []\n if (scope.reportContent.is_negative) {\n primaryPhenotypes = ['breast cancer', 'ovarian cancer', 'fallopian tube cancer', 'primary peritoneal cancer', 'male breast cancer', 'colorectal cancer', 'pancreatic cancer', 'melanoma', 'prostate cancer', 'uterine cancer', 'stomach cancer']\n } else {\n const genes = scope.genes || scope.reportContent.genes_with_pathogenic_mutations\n genes.forEach(function(gene) {\n const customPrimaryPhenotypes = $filter('customPhenotypes')(scope.reportContent, gene, 'primary')\n if (angular.isDefined(customPrimaryPhenotypes)) {\n primaryPhenotypes = primaryPhenotypes.concat(customPrimaryPhenotypes)\n } else {\n primaryPhenotypes = primaryPhenotypes.concat($filter('getPrimaryPhenotypeOrder')([gene], scope.reportContent.gender, scope.reportContent.template.test_type, scope.allelicity))\n }\n })\n\n if (primaryPhenotypes.indexOf('ovarian cancer') > -1) {\n // This is survivor-specific logic, where `fallopian tube` and `primary peritoneal` cancer affects your ovarian risk, but they themselves are not phenotypes with risk numbers attached. In other words, ovarian risk includes fallopian tube and primary peritoneal.\n primaryPhenotypes = primaryPhenotypes.concat(['fallopian tube cancer', 'primary peritoneal cancer'])\n }\n }\n\n // Generate the secondary phenotype that are part of this report\n const risks = $filter('sortedRisks')(scope.reportContent, scope.reportContent.gender, true)\n const secondaryPhenotypes = risks.pathogenic.filter(function(risk) {\n return primaryPhenotypes.indexOf(risk.phenotype) == -1\n }).map(function(risk) {\n return risk.phenotype\n })\n\n // Generate all the survivor phenotypes associated with this report, with special conditions around breast + ovarian cancer\n const survivorPhenotypes = []\n\n /** This is supposed to handle these cases:\n * - client is breast + ovarian survivor, `breast` primary phenotype, sentence says `because of prior history of breast cancer`\n * - client is breast survivor, `male breast` primary phenotype, sentence says `because of prior\n * history of male breast cancer`\n * - client is breast + ovarian survivor, `ovarian` primary phenotype, sentence says `because of prior history of ovarian cancer`\n * - client is breast + ovarian survivor, `breast` and `ovarian` primary phenotypes, sentence says `because of prior history of breast and ovarian cancer`\n **/\n if (scope.reportContent.breast_cancer_survivor && scope.reportContent.gender == 'M') {\n survivorPhenotypes.push('male breast cancer')\n }\n if (scope.reportContent.breast_cancer_survivor && scope.reportContent.gender == 'F') {\n survivorPhenotypes.push('breast cancer')\n }\n if (scope.reportContent.ovarian_cancer_survivor) {\n survivorPhenotypes.push('ovarian cancer')\n }\n\n // Continue through all the other survivor scenarios\n if (scope.reportContent.colorectal_cancer_survivor) {\n survivorPhenotypes.push('colorectal cancer')\n }\n if (scope.reportContent.pancreatic_cancer_survivor) {\n survivorPhenotypes.push('pancreatic cancer')\n }\n if (scope.reportContent.melanoma_survivor) {\n survivorPhenotypes.push('melanoma')\n }\n if (scope.reportContent.prostate_cancer_survivor) {\n survivorPhenotypes.push('prostate cancer')\n }\n if (scope.reportContent.endometrial_cancer_survivor) {\n survivorPhenotypes.push('uterine cancer')\n }\n if (scope.reportContent.gastric_cancer_survivor) {\n survivorPhenotypes.push('stomach cancer') // We have risks for stomach in APC cause that's the colloquial name\n survivorPhenotypes.push('gastric cancer') // We have risks for gastric in CDH1 cause HDGC is the affected condition\n }\n if (scope.reportContent.fallopian_tube_cancer_survivor) {\n survivorPhenotypes.push('fallopian tube cancer')\n }\n if (scope.reportContent.primary_peritoneal_cancer_survivor) {\n survivorPhenotypes.push('primary peritoneal cancer')\n }\n\n // Generate the string parts that get ng-repeat'ed in the template, handles all variations\n function generateSurvivorString(survivorPhenotype) {\n const output = {}\n const isOvarianCancerGroup = ovarianCancerGroup.indexOf(survivorPhenotype) > -1\n $translate([\n 'RESULT.CHART.SUBTITLE.SURVIVOR_APPEND_1_STANDARD',\n 'RESULT.CHART.SUBTITLE.SURVIVOR_APPEND_1_RISK_MODEL',\n 'RESULT.CHART.SUBTITLE.SURVIVOR_APPEND_2',\n 'RESULT.CHART.SUBTITLE.SURVIVOR_NEG_APPEND_3',\n 'RESULT.CHART.SUBTITLE.SURVIVOR_POS_OVARIAN_GROUP_APPEND_3',\n 'RESULT.CHART.SUBTITLE.SURVIVOR_POS_GENERAL_APPEND_3'\n ], {\n phenotype: survivorPhenotype,\n affectedPhenotype: isOvarianCancerGroup ? 'ovarian cancer' : survivorPhenotype\n }).then(function(translations) {\n if (scope.reportContent.template.risk_model) {\n output.s1 = translations['RESULT.CHART.SUBTITLE.SURVIVOR_APPEND_1_RISK_MODEL']\n } else {\n output.s1 = translations['RESULT.CHART.SUBTITLE.SURVIVOR_APPEND_1_STANDARD']\n }\n output.s2 = translations['RESULT.CHART.SUBTITLE.SURVIVOR_APPEND_2']\n if (scope.reportContent.is_negative) {\n output.s3 = translations['RESULT.CHART.SUBTITLE.SURVIVOR_NEG_APPEND_3']\n } else if (isOvarianCancerGroup && scope.reportContent.render_version < 8) {\n output.s3 = translations['RESULT.CHART.SUBTITLE.SURVIVOR_POS_OVARIAN_GROUP_APPEND_3']\n } else {\n output.s3 = translations['RESULT.CHART.SUBTITLE.SURVIVOR_POS_GENERAL_APPEND_3']\n }\n })\n return output\n }\n\n const filteredPhenotypes = []\n // Loop through each valid survivor phenotype and generate the string\n angular.forEach(survivorPhenotypes, function(survivorPhenotype) {\n const isPrimary = primaryPhenotypes.indexOf(survivorPhenotype) > -1;\n const isSecondary = secondaryPhenotypes.indexOf(survivorPhenotype) > -1\n if (scope.showSecondary && isSecondary || !scope.showSecondary && isPrimary) {\n filteredPhenotypes.push(survivorPhenotype)\n }\n })\n\n const brCanIndex = filteredPhenotypes.indexOf('breast cancer')\n const ovCanIndex = filteredPhenotypes.indexOf('ovarian cancer')\n if (brCanIndex > -1 && ovCanIndex > -1) {\n filteredPhenotypes.splice(brCanIndex > ovCanIndex ? brCanIndex : ovCanIndex, 1)\n filteredPhenotypes.splice(brCanIndex > ovCanIndex ? ovCanIndex : brCanIndex, 1)\n filteredPhenotypes.push('breast and ovarian cancer')\n }\n scope.survivorStrings = filteredPhenotypes.map(function(phenotype) {\n return generateSurvivorString(phenotype)\n })\n\n // To handle the last sentence that appears in H30 charts, only for negatives\n function generateNegativeH30String(reportContent) {\n if (reportContent.gender == 'F') {\n if (reportContent.breast_cancer_survivor && !reportContent.colorectal_cancer_survivor) {\n return ' Colorectal cancer is highlighted because it is more common.'\n } else if (!reportContent.breast_cancer_survivor && reportContent.colorectal_cancer_survivor) {\n return ' Breast cancer is highlighted because it is more common.'\n } else if (reportContent.breast_cancer_survivor && reportContent.colorectal_cancer_survivor) {\n return ''\n } else {\n return ' Breast and colorectal cancers are highlighted because they are more common.'\n }\n } else {\n if (reportContent.prostate_cancer_survivor && !reportContent.colorectal_cancer_survivor) {\n return ' Colorectal cancer is highlighted because it is more common.'\n } else if (!reportContent.prostate_cancer_survivor && reportContent.colorectal_cancer_survivor) {\n return ' Prostate cancer is highlighted because it is more common.'\n } else if (reportContent.prostate_cancer_survivor && reportContent.colorectal_cancer_survivor) {\n return ''\n } else {\n return ' Prostate and colorectal cancers are highlighted because they are more common.'\n }\n }\n }\n\n //- Hereditary 30 Negative append, with primary cancer survivor cases handled\n if (scope.reportContent.template.test_type == testTypes.hereditary30 && scope.reportContent.is_negative) {\n scope.h30NegativeString = generateNegativeH30String(scope.reportContent)\n }\n }\n }\n}\n","/**\n * @prettier\n */\n\nmodule.exports = function reportTestMethodology(\n $filter,\n $translate,\n interpretedGenes,\n testTypes,\n defaultLanguage\n) {\n 'ngInject';\n\n // This only covers breastOvarian19, hereditary30, and fh3. For wisdom9, see the wisdomReportTestMethodology directive\n // As of 9/20/2019, we are not allowing new v1 reports for BO19 and H30.\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_test_methodology.html',\n replace: true,\n link: function(scope) {\n scope.testTypes = testTypes;\n scope.version = $filter('testMethodologyVersion')(scope.reportContent);\n if (angular.isUndefined(scope.language)) {\n scope.language = defaultLanguage;\n }\n\n const genesToAsterisk = ['CDK4', 'EPCAM', 'GREM1', 'MITF', 'PMS2', 'POLD1', 'POLE', 'APOB'];\n\n // FH M&L with version less than 5 should have PCSK9 with asterisk.\n if (scope.reportContent.template.test_type == testTypes.fh3 && scope.version < 5) {\n genesToAsterisk.push('PCSK9');\n }\n\n const genesToDoubleAsterisk = scope.version < 7 ? ['LDLR'] : [];\n const asteriskedGenes = [];\n if (scope.reportContent.template.test_type != testTypes.breastOvarian19) {\n angular.forEach(\n $filter('orderBy')(interpretedGenes[scope.reportContent.template.test_type]),\n function(gene) {\n if (genesToAsterisk.indexOf(gene) > -1) {\n asteriskedGenes.push(gene + '*');\n } else if (genesToDoubleAsterisk.indexOf(gene) > -1) {\n asteriskedGenes.push(gene + '**');\n } else {\n asteriskedGenes.push(gene);\n }\n }\n );\n }\n\n const conditionalNewYorkLabSentence = '';\n // TODO: Add conditional New York Lab sentence to New York-only methodologies, currently empty string, please rewrite logic as needed (https://getcolor.atlassian.net/browse/ENG-72)\n // if(scope.reportContent.sample.isFromNewYork) { conditionalNewYorkLabSentence = 'Sanger confirmation studies were performed at Baylor College of Medicine, Medical Genetics Laboratories, 2450 Holcombe, Grand Blvd., Houston, TX 77021. ' }\n\n // BO19\n if (scope.reportContent.template.test_type == testTypes.breastOvarian19) {\n if (scope.version > 4) {\n angular.forEach(\n $filter('orderBy')(interpretedGenes[scope.reportContent.template.test_type]),\n function(gene) {\n if (genesToAsterisk.indexOf(gene) > -1) {\n asteriskedGenes.push(gene + '*');\n } else {\n asteriskedGenes.push(gene);\n }\n }\n );\n scope.listOfGenes = asteriskedGenes.join(', ');\n } else {\n scope.listOfGenes = $filter('orderBy')(\n interpretedGenes[scope.reportContent.template.test_type]\n ).join(', ');\n }\n $translate(\n [\n 'RESULT.METHODOLOGY.BO19.P1_V' + scope.version + '_MD',\n 'RESULT.METHODOLOGY.BO19.P4_V' + scope.version + '_MD',\n ],\n {\n conditionalNewYorkLabSentence: conditionalNewYorkLabSentence,\n }\n ).then(function(translations) {\n scope.p1 = translations['RESULT.METHODOLOGY.BO19.P1_V' + scope.version + '_MD'];\n scope.p4 = translations['RESULT.METHODOLOGY.BO19.P4_V' + scope.version + '_MD'];\n });\n\n // H30 and FH3\n } else {\n let mType;\n if (scope.reportContent.template.test_type == testTypes.hereditary30) {\n mType = 'H30';\n } else if (scope.reportContent.template.test_type == testTypes.fh3) {\n mType = 'FH3';\n }\n scope.listOfGenes = asteriskedGenes.join(', ');\n $translate(\n [\n 'RESULT.METHODOLOGY.' + mType + '.P1_V' + scope.version + '_MD',\n 'RESULT.METHODOLOGY.' + mType + '.P3_V' + scope.version + '_MD',\n 'RESULT.METHODOLOGY.' + mType + '.P4_V' + scope.version + '_MD',\n ],\n { conditionalNewYorkLabSentence: conditionalNewYorkLabSentence },\n undefined,\n undefined,\n scope.language // We need to force the language because this directive is used in both standard and abbreviated reports\n ).then(function(translations) {\n scope.p1 = translations['RESULT.METHODOLOGY.' + mType + '.P1_V' + scope.version + '_MD'];\n scope.p3 = translations['RESULT.METHODOLOGY.' + mType + '.P3_V' + scope.version + '_MD'];\n scope.p4 = translations['RESULT.METHODOLOGY.' + mType + '.P4_V' + scope.version + '_MD'];\n });\n\n if (scope.reportContent.template.test_type == testTypes.fh3 && scope.version > 5) {\n $translate(\n ['RESULT.METHODOLOGY.' + mType + '.P2_V' + scope.version + '_MD'],\n scope.language // We need to force the language because this directive is used in both standard and abbreviated reports\n ).then(function(translations) {\n scope.p2 =\n translations['RESULT.METHODOLOGY.' + mType + '.P2_V' + scope.version + '_MD'];\n });\n }\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportTopNavigation() {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_top_navigation.html',\n replace: true,\n scope: {\n report: '=',\n reportContent: '=',\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function(testTypes, waffle) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/reportValidity.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n const whitePaperMapping = {};\n whitePaperMapping[testTypes.hereditary30] = '/hereditarycancer';\n whitePaperMapping[testTypes.breastOvarian19] = '/hereditarycancer';\n whitePaperMapping[testTypes.wisdom9] = '/hereditarycancer';\n // TODO: [CONSUMER-5277] Uncomment this once FH white paper is available.\n whitePaperMapping[testTypes.fh3] = ''; // '/hereditaryhighcholesterol'\n scope.whitePaper = whitePaperMapping[scope.reportContent.template.test_type];\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function reportVus(auth, testTypes) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/report_vus.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n scope.testTypes = testTypes;\n scope.currentUser = auth.currentUser;\n const mutations = [];\n angular.forEach(scope.reportContent.mutations, function(mutation) {\n if (mutation.classification == 'Variant of Uncertain Significance') {\n mutations.push(mutation);\n }\n });\n scope.mutations = mutations;\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function sampleLetterMailto($compile, marked) {\n 'ngInject';\n\n return {\n restrict: 'A',\n scope: true,\n link: function(scope, elem, attrs) {\n const template = marked(attrs.sampleLetterMailto);\n const content = $compile(template)(scope);\n const stubElement = angular.element('
');\n stubElement.append(content);\n const compiledContent = stubElement.html();\n // Convert

to new lines, strip all html after\n const url = encodeURIComponent(\n compiledContent.replace(/<\\/p>/gi, '\\n').replace(/<(?:.|\\n)*?>/gm, '')\n );\n // Add mailto: prefix\n const mailto = 'mailto:?Body=' + url;\n elem.attr('href', mailto);\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function wisdomReportSummaryExtra($translate) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/wisdom_report_summary_extra.html',\n scope: {\n reportContent: '=',\n },\n link: function(scope) {\n function summaryExtraString(gene) {\n return 'RESULT.EXTRA.WISDOM.' + gene + '_MD';\n }\n if (scope.reportContent.genes_with_pathogenic_mutations.length) {\n scope.showSummaryExtra = true;\n const genes = scope.reportContent.genes_with_pathogenic_mutations;\n scope.summaryExtras = [];\n angular.forEach(genes, function(gene) {\n $translate([summaryExtraString(gene)]).then(function(translations) {\n scope.summaryExtras.push(translations[summaryExtraString(gene)]);\n });\n });\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function wisdomReportTestMethodology(\n $filter,\n $translate,\n interpretedGenes,\n testTypes\n) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/results/directives/wisdom_report_test_methodology.html',\n replace: true,\n link: function(scope) {\n scope.listOfGenes = $filter('orderBy')(interpretedGenes[testTypes.wisdom9]).join(', ');\n scope.version = $filter('testMethodologyVersion')(scope.reportContent);\n if (scope.version > 1) {\n $translate([\n 'RESULT.METHODOLOGY.WISDOM.V' + scope.version + '.P1_MD',\n 'RESULT.METHODOLOGY.WISDOM.V' + scope.version + '.P3_MD',\n 'RESULT.METHODOLOGY.WISDOM.V' + scope.version + '.P4_MD',\n ]).then(function(translations) {\n scope.p1 = translations['RESULT.METHODOLOGY.WISDOM.V' + scope.version + '.P1_MD'];\n scope.p3 = translations['RESULT.METHODOLOGY.WISDOM.V' + scope.version + '.P3_MD'];\n scope.p4 = translations['RESULT.METHODOLOGY.WISDOM.V' + scope.version + '.P4_MD'];\n });\n }\n if (scope.version >= 9) {\n $translate(['RESULT.METHODOLOGY.WISDOM.V' + scope.version + '.P2_MD']).then(function(\n translations\n ) {\n scope.p2 = translations['RESULT.METHODOLOGY.WISDOM.V' + scope.version + '.P2_MD'];\n });\n }\n },\n };\n};\n","'use strict'\n\nmodule.exports = function($filter) {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/about_the_gene.html',\n replace: true,\n scope: {\n reportContent: '='\n }\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/connect_with_others.html',\n replace: true\n }\n}\n","'use strict'\n\nmodule.exports = function($filter) {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/_questions.html',\n replace: true,\n scope: {\n reportContent: '='\n },\n link: function(scope) {\n scope.questions = []\n scope.title = 'FH_REPORT.QUESTIONS.CORONARY_HEART.TITLE'\n const genes = scope.reportContent.genes_with_pathogenic_mutations\n if (genes.length) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.CORONARY_HEART.T1',\n p: 'FH_REPORT.QUESTIONS.CORONARY_HEART.P1',\n withGC: true\n })\n }\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.CORONARY_HEART.T2',\n p: 'FH_REPORT.QUESTIONS.CORONARY_HEART.P2'\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($filter, $translate) {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/_questions.html',\n replace: true,\n scope: {\n reportContent: '='\n },\n link: function(scope) {\n scope.questions = []\n scope.title = 'RESULT.QUESTIONS.FAMILY_TITLE'\n const hasTrueNegative = (scope.reportContent.reported_variants_in_relatives || []).some(function(v) {\n return v.is_true_negative\n })\n if (scope.reportContent.is_negative) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.FAMILY.NEGATIVE.T1',\n p: 'FH_REPORT.QUESTIONS.FAMILY.NEGATIVE.P1',\n withGC: true\n })\n if (hasTrueNegative) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.FAMILY.TRUE_NEGATIVE.T1',\n p: 'FH_REPORT.QUESTIONS.FAMILY.TRUE_NEGATIVE.P1'\n })\n }\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.FAMILY.NEGATIVE.T2',\n p: 'FH_REPORT.QUESTIONS.FAMILY.NEGATIVE.P2'\n })\n if ($filter('mutationsHaveVus')(scope.reportContent.mutations)) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.FAMILY.VUS.T1',\n p: 'FH_REPORT.QUESTIONS.FAMILY.VUS.P1',\n references: [283]\n })\n }\n } else if (scope.reportContent.is_positive) {\n // TODO: Add unit tests once logic is finalized\n const mutations = $filter('pathogenicMutations')(scope.reportContent.mutations)\n const genes = scope.reportContent.genes_with_pathogenic_mutations\n const singleMut = mutations.length == 1\n const singleGene = genes.length == 1\n\n genes.forEach(function(gene) {\n const allelicity = scope.reportContent.allelicity_by_gene[gene]\n const geneMutations = mutations.filter(function(m) { return m.gene == gene })\n let p = 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.P1.'\n if (allelicity) {\n p += allelicity.toUpperCase()\n } else {\n p += 'UNKNOWN_PHASE'\n }\n let nounType = 'RESULT.MUTATION.'\n if (geneMutations.length == 1 && allelicity != 'biallelic') {\n nounType += 'SINGULAR.'\n } else {\n nounType += 'PLURAL.'\n }\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.T1',\n p: p,\n values: { gene: gene,\n mutationNoun: $translate.instant(nounType + 'NOUN'),\n mutationNounWithArticle: $translate.instant(nounType + 'WITH_ARTICLE'),\n thisMutationNoun: $translate.instant(nounType + 'THIS'),\n mutationPredicate: $translate.instant(nounType + 'PREDICATE') }\n })\n })\n\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.T2',\n p: 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.P2'\n })\n\n const q3 = {\n t: 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.T3',\n values: { gene: genes[0] }\n }\n if (singleMut) {\n if (mutations[0].zygosity == 'Heterozygous') {\n q3.p = 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.P3.SINGLE_HET'\n } else {\n q3.p = 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.P3.SINGLE_HOM'\n }\n } else {\n if (singleGene) { // multiple muts on the same gene.\n const gene = genes[0]\n if (!scope.reportContent.allelicity_by_gene[gene]) { // unknown phase\n q3.p = 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.P3.UNKNOWN_PHASE'\n }\n } else {\n q3.values = { genes: $filter('joinEnglishList')(genes) }\n }\n }\n if (q3.p) {\n scope.questions.push(q3)\n }\n\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.T4',\n p: 'FH_REPORT.QUESTIONS.FAMILY.POSITIVE.P4',\n references: [289]\n })\n\n if ($filter('mutationsHaveVus')(scope.reportContent.mutations)) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.FAMILY.VUS.T1',\n p: 'FH_REPORT.QUESTIONS.FAMILY.VUS.P1',\n references: [283]\n })\n }\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($filter) {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/_questions.html',\n replace: true,\n scope: {\n reportContent: '='\n },\n link: function(scope) {\n scope.questions = []\n scope.title = 'RESULT.QUESTIONS.GENERAL_TITLE'\n if (scope.reportContent.is_negative) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.NEGATIVE.T1',\n p: 'FH_REPORT.QUESTIONS.GENERAL.NEGATIVE.P1'\n })\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.NEGATIVE.T2',\n p: 'FH_REPORT.QUESTIONS.GENERAL.NEGATIVE.P2',\n withGC: true\n })\n if ($filter('mutationsHaveVus')(scope.reportContent.mutations)) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.VUS.T1',\n p: 'FH_REPORT.QUESTIONS.GENERAL.VUS.P1',\n references: [283]\n })\n }\n } else if (scope.reportContent.is_positive) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.POSITIVE.T1',\n p: 'FH_REPORT.QUESTIONS.GENERAL.POSITIVE.P1'\n })\n if (scope.reportContent.mutations.some(function(m) { return m.classification.toLowerCase() == 'pathogenic' })) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.P.T1',\n p: 'FH_REPORT.QUESTIONS.GENERAL.P.P1'\n })\n }\n if (scope.reportContent.mutations.some(function(m) { return m.classification.toLowerCase() == 'likely pathogenic' })) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.LP.T1',\n p: 'FH_REPORT.QUESTIONS.GENERAL.LP.P1'\n })\n }\n if ($filter('mutationsHaveVus')(scope.reportContent.mutations)) {\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.VUS.T1',\n p: 'FH_REPORT.QUESTIONS.GENERAL.VUS.P1',\n references: [283]\n })\n }\n }\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.ALL.T1',\n p: 'FH_REPORT.QUESTIONS.GENERAL.ALL.P1'\n })\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.ALL.T2',\n p: 'FH_REPORT.QUESTIONS.GENERAL.ALL.P2'\n })\n scope.questions.push({\n t: 'FH_REPORT.QUESTIONS.GENERAL.ALL.T3',\n p: 'FH_REPORT.QUESTIONS.GENERAL.ALL.P3'\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($filter, $translate) {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/guidelines.html',\n replace: true,\n scope: {\n reportContent: '='\n },\n link: function(scope) {\n scope.introReferences = []\n scope.screeningGuidelines = $filter('fhGuidelines')(scope.reportContent).map(function(guideline) {\n const res = { references: guideline.references }\n // Translates guideline content\n $translate([guideline.phenotype, guideline.content]).then(function(translations) {\n res.phenotype = translations[guideline.phenotype]\n res.content = translations[guideline.content]\n })\n if (guideline.phenotype_sub) {\n $translate(guideline.phenotype_sub).then(function(translation) {\n res.phenotype_sub = translation\n })\n }\n return res\n })\n\n if (scope.reportContent.is_negative) {\n scope.intro = 'FH_REPORT.GUIDELINES.INTRO.NEGATIVE'\n } else if (scope.reportContent.is_positive) {\n const mutations = $filter('pathogenicMutations')(scope.reportContent.mutations)\n const genes = scope.reportContent.genes_with_pathogenic_mutations\n if (genes.length > 1) {\n throw new Error(\"Only single gene is currently supported.\")\n }\n const allelicity = scope.reportContent.allelicity_by_gene[genes[0]]\n if (mutations.length == 1) {\n const mutation = mutations[0]\n if (mutation.zygosity == \"Heterozygous\") {\n scope.intro = 'FH_REPORT.GUIDELINES.INTRO.POSITIVE_HET'\n } else {\n scope.intro = 'FH_REPORT.GUIDELINES.INTRO.POSITIVE_HOM'\n }\n } else if (!allelicity) {\n scope.intro = 'FH_REPORT.GUIDELINES.INTRO.POSITIVE_UNKNOWN_PHASE'\n } else {\n throw new Error(\"Only single mutation or compund het unknown phase is currently supported.\")\n }\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($filter, $translate, emailFamilyModal, sampleLetterModal) {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/share_family.html',\n replace: true,\n scope: {\n reportId: '=',\n reportContent: '=',\n isSecondary: '='\n },\n link: function(scope) {\n scope.letter = ''\n scope.openEmailFamilyModal = function() {\n emailFamilyModal.open(scope.letter, scope.reportId, scope.reportContent.kit_order.test_type)\n }\n scope.openSampleLetterModal = function() {\n sampleLetterModal.open(scope.letter)\n }\n scope.items = []\n let letter\n let letterValues\n if (scope.reportContent.is_negative) {\n scope.t1 = 'RESULT.SHARE_FAMILY.NEG_T1'\n scope.p1 = 'RESULT.SHARE_FAMILY.NEG_P1'\n scope.items.push('FH_REPORT.SHARE_FAMILY.NEGATIVE.L1')\n scope.items.push('FH_REPORT.SHARE_FAMILY.NEGATIVE.L2')\n scope.items.push('FH_REPORT.SHARE_FAMILY.NEGATIVE.L3')\n scope.items.push('FH_REPORT.SHARE_FAMILY.NEGATIVE.L4')\n scope.items.push('FH_REPORT.SHARE_FAMILY.NEGATIVE.L5')\n letter = 'FH_REPORT.SHARE_FAMILY.NEGATIVE.LETTER'\n } else if (scope.reportContent.is_positive) {\n const mutations = $filter('pathogenicMutations')(scope.reportContent.mutations)\n const genes = scope.reportContent.genes_with_pathogenic_mutations\n if (genes.length != 1) {\n throw new Error(\"Only single gene is currently supported.\")\n }\n scope.gene = genes[0]\n if (mutations.length == 1) {\n const mutation = mutations[0]\n letterValues = {\n classification: mutation.classification.toLowerCase(),\n gene: scope.gene,\n nomenclature: $filter('nomenclature')(mutation, 'primary').replace(//g, '>')\n }\n if (mutation.zygosity == \"Heterozygous\") {\n scope.t1 = 'RESULT.SHARE_FAMILY.SINGLE_POSITIVE_T1'\n scope.p1 = 'RESULT.SHARE_FAMILY.POS_P1'\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_HET.L1')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_HET.L2')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_HET.L3')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_HET.L4')\n letter = 'FH_REPORT.SHARE_FAMILY.POSITIVE_HET.LETTER'\n } else { // Homozygous\n scope.t1 = 'RESULT.SHARE_FAMILY.2_POS_T1'\n scope.p1 = 'RESULT.SHARE_FAMILY.POS_P1'\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_HOM.L1')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_HOM.L2')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_HOM.L3')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_HOM.L4')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_HOM.L5')\n letter = 'FH_REPORT.SHARE_FAMILY.POSITIVE_HOM.LETTER'\n }\n } else if (!scope.reportContent.allelicity_by_gene[scope.gene]) {\n const nomenclatures = mutations.map(function(mutation) {\n return $filter('nomenclature')(mutation, 'primary').replace(//g, '>')\n })\n letterValues = {\n gene: scope.gene,\n nomenclatures: $filter('joinEnglishList')(nomenclatures)\n }\n scope.t1 = 'RESULT.SHARE_FAMILY.MULTI_POS_T1'\n scope.p1 = 'RESULT.SHARE_FAMILY.POS_P1'\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_UNKNOWN_PHASE.L1')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_UNKNOWN_PHASE.L2')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_UNKNOWN_PHASE.L3')\n scope.items.push('FH_REPORT.SHARE_FAMILY.POSITIVE_UNKNOWN_PHASE.L4')\n letter = 'FH_REPORT.SHARE_FAMILY.POSITIVE_UNKNOWN_PHASE.LETTER'\n } else {\n throw new Error(\"Only single mutation or unknown phase is currently supported.\")\n }\n }\n $translate(letter, letterValues)\n .then(function(translation) {\n scope.letter = translation\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($translate, $filter) {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/summary_chart.html',\n replace: true,\n scope: {\n reportContent: '='\n },\n link: function(scope, elem) {\n let showTooltip = false\n function toggleTooltip() {\n showTooltip = !showTooltip\n if (showTooltip) {\n elem.find('.vbar__hover').show()\n } else {\n elem.find('.vbar__hover').hide()\n }\n }\n function extractNumbersFromXTimesRisk(risk) {\n const re = /\\d+/g\n const match = re.exec(risk)\n if (match) {\n return parseInt(match[0])\n } else {\n return 1\n }\n }\n function getHeightFromXTimesRisk(times) {\n return times * 5\n }\n const risks = $filter('filter')(scope.reportContent.risks, {gender: scope.reportContent.gender, phenotype: 'coronary heart disease'})[0]\n scope.references = risks.references\n // Show line chart for negative\n if (scope.reportContent.is_negative) {\n showTooltip = false\n const normalRisks = $filter('filter')(risks.data, {category: 'normal'})\n const borderlineRisks = $filter('filter')(risks.data, {category: 'borderline'})\n const highRisks = $filter('filter')(risks.data, {category: 'high'})\n const ages = normalRisks.map(function(r) { return r.age; })\n const maxAge = ages.reduce(function(a, b) { return Math.max(a, b); })\n const minAge = ages.reduce(function(a, b) { return Math.min(a, b); })\n scope.options = {\n chart: {\n type: 'lineChart',\n showLegend: false,\n height: 200,\n margin: {top: 0, right: 0, bottom: 20, left: 35},\n pointRange: [50, 50],\n x: function(d) { return d.age; },\n y: function(d) { return parseInt(d.risk); },\n xDomain: [minAge - 1, maxAge + 1],\n yDomain: [0, 60],\n axisLabelDistance: 50,\n xAxis: {\n axisLabelDistance: 50,\n tickPadding: 10,\n ticks: 5,\n // We set x domain to min - 1 and max + 1\n // to get some spacing between axis and lines.\n // The following formatting shows nice rounded\n // number, e.g. 40 instead of 39.\n tickFormat: function(d) {\n return Math.round(d/10) * 10;\n }\n },\n yAxis: {\n tickPadding: 10,\n tickValues: [0, 15, 30, 45, 60],\n tickFormat: function(d) {\n return d + '%';\n }\n },\n useInteractiveGuideline: false,\n callback: function(chart) {\n chart.tooltip.contentGenerator(function(data) {\n scope.risk = data.point.risk\n scope.age = data.point.age\n scope.category = data.series[0].key.toLowerCase()\n // Call $apply since this callback is outside of angular context.\n scope.$apply()\n toggleTooltip()\n })\n return chart\n }\n }\n }\n scope.data = [\n {\n values: normalRisks,\n key: 'Normal cholesterol',\n color: '#256b88'\n },\n {\n values: borderlineRisks,\n key: 'Borderline cholesterol',\n color: '#256b88'\n },\n {\n values: highRisks,\n key: 'High cholesterol',\n color: '#256b88'\n }\n ]\n scope.legends = ['high', 'borderline', 'normal'].map(function(category) {\n return {\n text: 'FH_REPORT.CHART.NEGATIVE.' + category,\n type: 'line',\n cls: category\n }\n })\n } else if (scope.reportContent.is_positive) {\n if (scope.reportContent.genes_with_pathogenic_mutations.length != 1) {\n throw new Error(\"Only supports a single gene positive case.\")\n }\n scope.gene = scope.reportContent.genes_with_pathogenic_mutations[0]\n scope.risks = $filter('filter')(scope.reportContent.risks, {gender: scope.reportContent.gender, phenotype: 'coronary heart disease', gene: scope.gene})[0]\n if (scope.risks.data.length != 3) {\n throw new Error(\"# risk data is required to be 3.\")\n }\n\n scope.bars = scope.risks.data.reverse().map(function(data) {\n const times = extractNumbersFromXTimesRisk(data.risk)\n return {\n name: data.risk,\n category: data.category,\n times: times,\n height: getHeightFromXTimesRisk(times)\n }\n })\n scope.legends = scope.bars.map(function(bar) {\n return {\n text: 'FH_REPORT.CHART.POSITIVE.' + bar.category,\n type: 'square',\n cls: bar.category\n }\n })\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($filter, interpretedGenes) {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/summary_text.html',\n replace: true,\n scope: {\n reportContent: '='\n },\n link: function(scope) {\n scope.notes = []\n // Negative\n if (scope.reportContent.is_negative) {\n // Paragraphs\n scope.paragraphs = ['FH_REPORT.SUMMARY_TEXT.NEGATIVE.P1']\n // List of genes\n scope.listOfGenes = interpretedGenes[scope.reportContent.template.test_type].map(function(gene) {\n return '' + gene + ''\n }).join(', ')\n // Notes: All\n scope.notes.push('FH_REPORT.SUMMARY_TEXT.NOTES.NEGATIVE')\n // Notes: Dutch criteria score of 6 or greater\n const profile = scope.reportContent.health_profile\n if (profile && profile.has_elevated_dutch_criteria_score) {\n scope.notes.push('FH_REPORT.SUMMARY_TEXT.NOTES.DUTCH_CRITERIA')\n }\n // Positive\n } else if (scope.reportContent.is_positive) {\n const mutations = $filter('pathogenicMutations')(scope.reportContent.mutations)\n const genes = scope.reportContent.genes_with_pathogenic_mutations\n if (genes.length > 1) {\n throw new Error(\"Only single gene is currently supported.\")\n }\n\n const allelicity = scope.reportContent.allelicity_by_gene[genes[0]]\n scope.values = {\n gene: genes[0],\n classification: mutations[0].classification.toLowerCase(),\n capitalizedClassification: mutations[0].classification }\n\n // Paragraphs\n scope.paragraphs = []\n\n // Single het or hom\n if (mutations.length == 1) {\n if (mutations[0].zygosity == \"Heterozygous\") {\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P1_HET')\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P2_HET')\n } else {\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P1_HOM')\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P2_HOM')\n }\n // Compound het unknown phase\n } else if (mutations.length == 2 && genes.length == 1 && !allelicity) {\n if (mutations[0].classification == mutations[1].classification) {\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P1_UNKNOWN_PHASE_P_OR_LP')\n } else {\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P1_UNKNOWN_PHASE_P_AND_LP')\n }\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P2_HET')\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P3_UNKNOWN_PHASE')\n } else {\n throw new Error(\"Only single mutation or compound het unknown phase is currently supported.\")\n }\n\n if (['APOB', 'PCSK9'].indexOf(genes[0]) > -1) {\n // Known phase\n if (allelicity) {\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P4')\n // Unknown phase\n } else {\n scope.paragraphs.push('FH_REPORT.SUMMARY_TEXT.POSITIVE.P4_UNKNOWN_PHASE')\n }\n }\n\n // Notes: All\n const user = scope.reportContent.user\n if (user && user.is_minor) {\n scope.notes.push('FH_REPORT.SUMMARY_TEXT.NOTES.MINOR_POSITIVE')\n } else {\n scope.notes.push('FH_REPORT.SUMMARY_TEXT.NOTES.POSITIVE')\n }\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($filter) {\n 'ngInject'\n return {\n restrict: 'E',\n templateUrl: '/results/fh/summary_title.html',\n replace: true,\n scope: {\n reportContent: '='\n },\n link: function(scope) {\n scope.values = {}\n // Negative\n if (scope.reportContent.is_negative) {\n scope.title = 'FH_REPORT.SUMMARY_TITLE.NEGATIVE'\n // Positive\n } else {\n const mutations = $filter('pathogenicMutations')(scope.reportContent.mutations)\n const genes = scope.reportContent.genes_with_pathogenic_mutations\n if (genes.length > 1) {\n throw new Error(\"Only single gene is currently supported.\")\n }\n scope.values = {\n gene: genes[0],\n classification: mutations[0].classification.toLowerCase() }\n // Single het or hom\n if (mutations.length == 1) {\n if (mutations[0].zygosity == \"Heterozygous\") {\n scope.title = 'FH_REPORT.SUMMARY_TITLE.POSITIVE_HET'\n } else {\n scope.title = 'FH_REPORT.SUMMARY_TITLE.POSITIVE_HOM'\n }\n // Compound het unknown phase\n } else if (mutations.length == 2 && genes.length == 1 && !scope.reportContent.allelicity_by_gene[genes[0]]) {\n if (mutations[0].classification == mutations[1].classification) {\n scope.title = 'FH_REPORT.SUMMARY_TITLE.POSITIVE_UNKNOWN_PHASE_P_OR_LP'\n } else {\n scope.title = 'FH_REPORT.SUMMARY_TITLE.POSITIVE_UNKNOWN_PHASE_P_AND_LP'\n }\n } else {\n throw new Error(\"Only single mutation or compund het unknown phase is currently supported.\")\n }\n }\n }\n }\n}\n","/**\n * @ngdoc module\n * @name resultFilter\n *\n * @description\n * The `resultFilter` provides filters for results.\n */\nmodule.exports = angular.module('resultFilter', ['clrConstant', 'clrFilter'])\n\n /**\n * @ngdoc filter\n * @name pdfReportUrl\n * @memberof resultFilter\n *\n * @description\n * Generates a PDF report URL given a report id.\n */\n .filter('pdfReportUrl', function() {\n return function(report_id) {\n return '/pdf_reports/' + report_id\n }\n })\n\n /**\n * @ngdoc filter\n * @name webReportUrl\n * @memberof resultFilter\n *\n * @description\n * Generates a web report URL given a report id.\n */\n .filter('webReportUrl', function() {\n return function(report_id) {\n return '/web-report/' + report_id + '/next-steps'\n }\n })\n\n/**\n * @ngdoc filter\n * @name webReportV2Url\n * @memberof resultFilter\n *\n * @description\n * Generates a web report v2 URL given a report id.\n * should only be used for internal tools\n */\n .filter('webReportV2Url', function() {\n return function(reportId) {\n // Render the report using the new report page when the 'show_react_web=true'\n // query parameter is detected. This supports the ongoing integration of\n // src/reports from a separate project into the main codebase.\n // During the transition, it's necessary to maintain both the old and new\n // report views in clinical to ensure a smooth migration to the updated system.\n if (window.location.search.includes('show_react_web=true')) {\n return `/results-v3/report/view?reportId=${reportId}`\n }\n\n return `/results-v2/v/${reportId}/next-steps`\n }\n })\n\n /**\n * @ngdoc filter\n * @name hasSampleTag\n * @memberof resultFilter\n *\n * @description\n * Filters objects with a sample with a given tag.\n */\n .filter('hasSampleTag', function() {\n return function(objs, searchStr) {\n if (!objs) {\n return false\n }\n return objs.filter(function(obj) {\n if (searchStr == void 0 || searchStr == '') {\n return true\n }\n if (!obj.sample) {\n return false\n }\n if (obj.sample.for_client) {\n if ('client'.indexOf(searchStr.toLowerCase()) != -1) {\n return true\n }\n }\n const tags = obj.sample.tags\n if (!tags) {\n return false\n }\n for (let i = 0; i < tags.length; i++) {\n if (tags[i].name.toLowerCase().indexOf(searchStr.toLowerCase()) != -1) {\n return true\n }\n }\n return false\n })\n }\n })\n\n /**\n * @ngdoc filter\n * @name abbreviateClassification\n * @memberof resultFilter\n *\n * @description\n * Abbreviates variant classification name.\n */\n .filter('abbreviateClassification', function(classification) {\n return function(name) {\n if (name == classification.p) {\n return 'P'\n } else if (name == classification.lp) {\n return 'LP'\n } else if (name == classification.ras) {\n return 'RAS'\n } else if (name == classification.vus) {\n return 'VUS'\n } else if (name == classification.lb) {\n return 'LB'\n } else if (name == classification.b) {\n return 'B'\n } else if (name == classification.rai) {\n return 'RAI'\n } else if (classification) {\n throw 'Unexpected classification name: ' + name\n } else { // somatic variants don't have classification\n return ''\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name resultSignificance\n * @memberof resultFilter\n *\n * @description\n * Returns clinical significance of a given report.\n * e.g.\n * - P:BRCA1 + LP:MUTYH:Homozygous + VUS:APC + Additional Findings\n * - CYP2D6:*3/*9:intermediate metabolizer + CYP2C19:*1/*3:poor metabolizer\n */\n .filter('resultSignificance', function($filter, reportNewState, testOutcome, classification, zygosity) {\n function interpretMutations(geneMutations) {\n function formatMutation(mut) {\n let geneName = mut.gene\n if (mut.mutation_name) {\n geneName += ' (' + mut.mutation_name + ')'\n }\n let classificationName = $filter('abbreviateClassification')(mut.classification)\n if (mut.vusp) {\n classificationName += '-P'\n }\n const parts = [geneName, classificationName]\n // Note homozygous mutation\n if (mut.zygosity == zygosity.homozygous) {\n parts.push(mut.zygosity)\n }\n return parts.join(':')\n }\n\n function formatMutations(mutations, classificationName) {\n return mutations.filter(function(m) { return m.classification == classificationName }).map(function(m) { return formatMutation(m) })\n }\n\n let mutations = []\n mutations = mutations.concat(formatMutations(geneMutations, classification.p))\n mutations = mutations.concat(formatMutations(geneMutations, classification.lp))\n mutations = mutations.concat(formatMutations(geneMutations, classification.ras))\n mutations = mutations.concat(formatMutations(geneMutations, classification.vus))\n return mutations\n }\n\n function interpretDiplotypes(geneDiplotypes) {\n return geneDiplotypes.filter(function(gene) {\n return !gene.is_baseline\n }).map(function(gene) {\n let diplotypes\n if (gene.diplotypes.length) {\n diplotypes = gene.diplotypes.map(function(d) { return d.diplotype }).join(', ')\n } else {\n diplotypes = 'indeterminate'\n }\n return [gene.gene, diplotypes, gene.phenotype].join(':')\n })\n }\n\n function interpretValues(interpretedValues) {\n return interpretedValues.map(value => `${value.value_type}: ${value.significance}`).join(', ')\n }\n\n return function(report) {\n if (report.test_outcome == testOutcome.non_reportable) {\n return testOutcome.non_reportable\n } else if (report.state == reportNewState && !report.result_is_ready) {\n return 'Pending'\n } else {\n let parts = []\n // Interpret variants\n if (report.gene_mutations.length) {\n parts = parts.concat(interpretMutations(report.gene_mutations))\n }\n // Interpret diplotypes\n if (report.gene_diplotypes != null && report.gene_diplotypes.length) {\n // Check for null/undefined to handle a number of errors:\n // (TypeError: Cannot read property 'length' of null)\n parts = parts.concat(interpretDiplotypes(report.gene_diplotypes))\n }\n // Interpret values\n if (report.interpreted_values.length) {\n parts = parts.concat(interpretValues(report.interpreted_values))\n }\n if (!parts.length) {\n parts.push('Baseline')\n }\n if (report.has_incidental_findings) {\n parts.push('Additional Findings')\n }\n return parts.join(' + ')\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name variantType\n * @memberof resultFilter\n */\n .filter('variantType', function() {\n return function(srv) {\n if (srv.variant_type == 'germline') {\n return 'Germline'\n } else if (srv.variant_type == 'somatic') {\n return 'Low Fraction / Somatic'\n } else {\n throw 'variantType filter expects either germline or somatic type.'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name reportStatusText\n * @memberof resultFilter\n *\n * @description\n * Converts report to its status string.\n */\n .filter('reportStatusText', function() {\n return function(report) {\n if (report.state == 'new' && !report.result_is_ready) {\n return 'Variants pending'\n } else if (report.state == 'new' && report.result_is_ready) {\n return 'Under GC review'\n } else if (report.state == 'queued_for_board_review') {\n return 'Preparing for GBR'\n } else if (report.state == 'prepared_for_board_review') {\n return 'Under GBR'\n } else if (report.state == 'content_reviewed' || report.state == 'board_reviewed') {\n return 'Under pathologist review'\n } else if (report.state == 'signed_off') {\n return 'Under internal physician review'\n } else if (report.state == 'release_gated') {\n return 'Release gated'\n } else if (report.state == 'release_approved') {\n return 'Approved for release'\n } else if (report.state == 'sent_to_ordering_physician') {\n return 'Under external physician review'\n } else if (report.state == 'release_ready') {\n return 'Ready for release'\n } else if (report.state == 'released') {\n return 'Released to client'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name confirmationStatus\n * @memberof resultFilter\n *\n * @description\n * Returns a status of a given variant confirmation.\n */\n .filter('confirmationStatus', function($filter) {\n return function(confirmation) {\n if (angular.isUndefined(confirmation)) {\n return 'Not queued'\n }\n const predictedToConfirm = confirmation.sample_run_variant && confirmation.sample_run_variant.quality_prediction && confirmation.sample_run_variant.quality_prediction.predicted_to_confirm\n if (confirmation.state == 'new') {\n if (predictedToConfirm) {\n return 'In queue, predicted to confirm'\n }\n return 'In queue'\n }\n if (confirmation.state == 'pending') {\n let status\n if (predictedToConfirm) {\n status = 'Pending, predicted to confirm'\n } else {\n status = 'Pending'\n }\n return status + ' (Sent ' + $filter('date')(confirmation.requested_at, 'MM/dd/yy') + ')'\n }\n if (confirmation.state == 'completed') {\n if (angular.isUndefined(confirmation.is_present)) {\n return 'Completed'\n } else if (confirmation.is_present) {\n return 'Present'\n } else {\n return 'Not present'\n }\n }\n return $filter('capitalize')(confirmation.state).replace('_', ' ')\n }\n })\n\n /**\n * @ngdoc filter\n * @name reviewStatus\n * @memberof resultFilter\n *\n * @description\n * Determines the status of the review for a variant classification\n */\n .filter('reviewStatus', function() {\n // Note that this logic is the same as our backend's src/django_apps/results/is_classification_approved function.\n // Changes in logic here should reflect in changes there as well\n return function(vc) {\n const review = vc.review\n if (!review) {\n return 'Not queued'\n }\n if (review.state == 'reviewed' && review.classification == vc.classification.id) {\n return 'Approved'\n } else {\n return 'Pending'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name variantValidationStatus\n *\n * @description\n * Whether a variant was validated, through confirmation or via other methods. See BIOINF-2350.\n */\n .filter('variantValidationStatus', function() {\n return function(validation) {\n if (angular.isUndefined(validation)) {\n return 'Unknown'\n }\n if (validation.is_valid === true) {\n status = 'Present'\n } else if (validation.is_valid === false) {\n status = 'Absent'\n } else {\n if (validation.requires_confirmation) {\n status = 'Pending'\n } else {\n status = 'N/A'\n }\n }\n return status + ': ' + validation.details\n }\n })\n\n /**\n * @ngdoc filter\n * @name areConfirmationsInExceptionState\n * @memberof resultFilter\n *\n * @description\n * Returns true if any given variant confirmation in the list is in an exception state.\n */\n .filter('areConfirmationsInExceptionState', function() {\n return function(confirmations) {\n if (!confirmations || !confirmations.length) {\n return false\n }\n\n return confirmations.some(function(confirmation) {\n // Diplotype confirmations do not have is_present, so the result is considered valid\n // purely based on the confirmation state\n const isValid = angular.isUndefined(confirmation.is_present) || confirmation.is_present\n\n return confirmation.state == 'completed' && !isValid\n || ['cancelled', 'failed'].indexOf(confirmation.state) != -1\n || confirmation.for_ny && confirmation.state == 'pending'\n })\n }\n })\n\n .filter('displayDiplotype', () => {\n return (solution) => [solution.haplotype_1, solution.haplotype_2].join('/')\n })\n\n /**\n * @ngdoc filter\n * @name trustUrl\n * @memberof resultFilter\n *\n * @description\n * Allows a URL displayed in an iframe to be from another host\n */\n .filter('trustUrl', ($sce) => {\n return function(url) {\n return $sce.trustAsResourceUrl(url);\n }\n })\n\n .filter('diplotypeSummary', function($filter) {\n return (call) => {\n if (call.solutions.length) {\n return call.solutions.map(s => $filter('displayDiplotype')(s)).join(', ');\n } else {\n return 'Indeterminate';\n }\n }\n })\n\n .filter('joinBy', function() {\n return function(input, delimiter) {\n return (input || []).join(delimiter || ',')\n }\n })\n\n /**\n * @ngdoc filter\n * @name barChartHeight\n * @memberof resultFilter\n *\n * @description\n * Parses and manipulates the risk numbers to render more pleasantly on the report chart\n */\n .filter('barChartHeight', function($filter) {\n return function(risk, modifier, bound) {\n const matchBracketedPercentage = /\\[[0-9\\-\\.]*%\\]$/\n const matchMiscSymbols = /[%<>()\\[\\]\\s]/g\n const matchHasNumber = /[0-9]/\n\n if (angular.isDefined(risk)) {\n let cleanRisk = risk.replace(matchMiscSymbols, '')\n if (angular.isUndefined(modifier)) {\n modifier = 0\n }\n if ($filter('isNotElevated')(risk) || $filter('isStudiesOngoing')(risk)) {\n return 0\n } else if (cleanRisk.indexOf('elevated') > -1 && !matchHasNumber.test(cleanRisk) && cleanRisk.indexOf('-') == -1) {\n // Is elevated w/o range and doesn't contain a number\n // Return elevated height\n return 15 + modifier\n } else if (cleanRisk.indexOf('-') > -1) {\n // Is a range\n cleanRisk = cleanRisk.replace('elevated', '')\n // return upper bound unless bound is defined\n if (angular.isUndefined(bound)) {\n bound = 1\n }\n return parseFloat(cleanRisk.split('-')[bound]) + modifier\n } else {\n // Is a single value, needs to cover cases where elevated also exists, e.g. \"elevated (<1%)\" or \"elevated (9%)\"\n cleanRisk = parseFloat(cleanRisk.replace('elevated', ''))\n if (cleanRisk <= 0.5) {\n return 0.5 + modifier\n }\n if (cleanRisk <= 1) {\n return 1 + modifier\n }\n if (cleanRisk <= 1.5) {\n return 1.5 + modifier\n }\n }\n return cleanRisk + modifier\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name mutationsHaveVus\n * @memberof resultFilter\n *\n * @description\n * Looks at mutations to see if it contain a vus\n */\n .filter('mutationsHaveVus', function(classification) {\n return function(mutations) {\n let hasVus = false\n if (angular.isDefined(mutations)) {\n for (let i = 0; i < mutations.length; i++) {\n if (mutations[i].classification == classification.vus) {\n hasVus = true\n break\n }\n }\n }\n return hasVus\n }\n })\n\n /**\n * @ngdoc filter\n * @name pathogenicMutations\n * @memberof resultFilter\n *\n * @description\n * Filters only pathogenic or likely pathogenic mutations\n */\n .filter('pathogenicMutations', function(classification) {\n return function(mutations) {\n if (angular.isDefined(mutations)) {\n const pathogenicMutations = mutations.filter(function(mutation) {\n // Somatic variants will not have classification since all our classifications are for germline.\n // We used to apply germline classification to somatic variants. For backward compatibility,\n // we still want to include those variants in pathogenic mutations.\n return mutation.classification == classification.p || mutation.classification == classification.lp || mutation.classification == classification.ras\n })\n return pathogenicMutations\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name uniqueReferences\n * @memberof resultFilter\n *\n * @description\n * Create array of unique risk reference IDs\n */\n .filter('uniqueReferences', function() {\n return function(risks) {\n const uniqueReferences = []\n if (angular.isDefined(risks)) {\n angular.forEach(risks, function(risk) {\n angular.forEach(risk.references, function(reference) {\n if (uniqueReferences.indexOf(reference) == -1) {\n uniqueReferences.push(reference)\n }\n })\n })\n }\n return uniqueReferences\n }\n })\n\n /**\n * @ngdoc filter\n * @name isCancerSurvivor\n * @memberof resultFilter\n *\n * @description\n * Returns object fashioned with `_survivor` properties if applicable. Survivor logic is only shown for 8 cancers we cover in H30, and breast/ovarian/fallopian in BO19.\n */\n .filter('isCancerSurvivor', function(testTypes) {\n return function(healthHistory, testType) {\n\n function apiPropertyToReportContentProperty(prop) {\n // Converts 'had_foo_cancer' to 'foo_cancer_survivor'\n return prop.replace('had_', '') + '_survivor'\n }\n\n const survivorProperties = {};\n let validApiProperties = {}\n // Valid CancerProfile properties per src/django_apps/health_profiles/models.py\n if (testType == testTypes.hereditary30) {\n validApiProperties = {\n unisex: ['had_breast_cancer', 'had_colorectal_cancer', 'had_gastric_cancer', 'had_melanoma', 'had_pancreatic_cancer'],\n female: ['had_ovarian_cancer', 'had_fallopian_tube_cancer', 'had_primary_peritoneal_cancer', 'had_endometrial_cancer'],\n male: ['had_prostate_cancer']\n }\n } else if (testType == testTypes.breastOvarian19) {\n validApiProperties = {\n unisex: ['had_breast_cancer'],\n female: ['had_ovarian_cancer', 'had_fallopian_tube_cancer'],\n male: []\n }\n } else {\n validApiProperties = {\n unisex: [],\n female: [],\n male: []\n }\n }\n\n if (healthHistory && healthHistory.female_health_profile) {\n angular.forEach(validApiProperties.unisex.concat(validApiProperties.female), function(prop) {\n if (healthHistory.female_health_profile[prop]) {\n survivorProperties[apiPropertyToReportContentProperty(prop)] = true\n }\n })\n } else if (healthHistory && healthHistory.male_health_profile) {\n angular.forEach(validApiProperties.unisex.concat(validApiProperties.male), function(prop) {\n if (healthHistory.male_health_profile[prop]) {\n survivorProperties[apiPropertyToReportContentProperty(prop)] = true\n }\n })\n }\n\n // If any survivorProperties exist, add generic survivor property\n if (!angular.equals({}, survivorProperties)) {\n survivorProperties.cancer_survivor = true\n }\n\n return survivorProperties\n }\n })\n\n /**\n * @ngdoc filter\n * @name hadBiopsyWithAtypicalHyperplasia\n * @memberof resultFilter\n *\n * @description\n * Returns true if healthHistory had breast biopsy with atypical hyperplasia. o/w false.\n */\n .filter('hadBiopsyWithAtypicalHyperplasia', function() {\n return function(healthHistory) {\n if (healthHistory && healthHistory.female_health_profile && healthHistory.female_health_profile.had_breast_biopsy) {\n return healthHistory.female_health_profile.had_breast_biopsy_with_atypical_hyperplasia == 'Y'\n }\n return false\n }\n })\n\n /**\n * @ngdoc filter\n * @name diagnosedWithLcis\n * @memberof resultFilter\n *\n * @description\n * Returns true if healthHistory had breast biopsy and diagnosed with LCIS. o/w false.\n */\n .filter('diagnosedWithLcis', function() {\n return function(healthHistory) {\n if (healthHistory && healthHistory.female_health_profile && healthHistory.female_health_profile.had_breast_biopsy) {\n return healthHistory.female_health_profile.diagnosed_with_lobular_carcinoma_in_situ == 'Y'\n }\n return false\n }\n })\n\n /**\n * @ngdoc filter\n * @name isElevated\n * @memberof resultFilter\n *\n * @description\n * Returns true if risk is \"elevated\", with or without a range (and not \"not elevated\")\n */\n .filter('isElevated', function() {\n return function(risk) {\n if (angular.isDefined(risk)) {\n return risk.indexOf('elevated') > -1 && risk.indexOf('not') == -1\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name isNotElevated\n * @memberof resultFilter\n *\n * @description\n * Returns true if risk is \"not elevated\" or \"not currently elevated\"\n */\n .filter('isNotElevated', function() {\n return function(risk) {\n if (angular.isDefined(risk)) {\n return risk == 'not elevated' || risk == 'not currently elevated'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name isStudiesOngoing\n * @memberof resultFilter\n *\n * @description\n * Returns true if risk is \"studies ongoing\"\n */\n .filter('isStudiesOngoing', function() {\n return function(risk) {\n if (angular.isDefined(risk)) {\n return risk == 'studies ongoing'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name isLikelyPathogenic\n * @memberof resultFilter\n *\n * @description\n * Returns true if mutations only contain likely pathogenic mutation and no pathogenic mutations, or if a simple mutation is likely pathogenic\n */\n .filter('isLikelyPathogenic', function() {\n return function(mutations) {\n if (angular.isDefined(mutations)) {\n if (!angular.isArray(mutations)) {\n return mutations.classification.toLowerCase() == 'likely pathogenic'\n }\n const classifications = mutations.map(function(mutation) {\n return mutation.classification.toLowerCase()\n })\n return classifications.indexOf('likely pathogenic') > -1 && classifications.indexOf('pathogenic') == -1\n } else {\n return false\n }\n }\n })\n /**\n * @ngdoc filter\n * @name hasLikelyPathogenic\n * @memberof resultFilter\n *\n * @description\n * Returns true if mutations contain likely pathogenic mutations\n */\n .filter('hasLikelyPathogenic', function() {\n return function(mutations) {\n if (angular.isDefined(mutations)) {\n if (!angular.isArray(mutations)) {\n return mutations.classification.toLowerCase() == 'likely pathogenic'\n }\n const classifications = mutations.map(function(mutation) {\n return mutation.classification.toLowerCase()\n })\n return classifications.indexOf('likely pathogenic') > -1\n } else {\n return false\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name hasBothPathogenic\n * @memberof resultFilter\n *\n * @description\n * Returns true if mutations contain both pathogenic and likely pathogenic mutations\n */\n .filter('hasBothPathogenic', function() {\n return function(mutations) {\n if (angular.isDefined(mutations)) {\n if (!angular.isArray(mutations)) {\n return false\n }\n const classifications = mutations.map(function(mutation) {\n return mutation.classification.toLowerCase()\n })\n return classifications.indexOf('likely pathogenic') > -1 && classifications.indexOf('pathogenic') > -1\n } else {\n return false\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name isPotentiallyCompoundHeterozygousReport\n * @memberof resultFilter\n *\n * @description\n * Returns true if reportContent has mutations that make it a potentially compound heterozygous report\n */\n .filter('isPotentiallyCompoundHeterozygousReport', function(classification, zygosity) {\n return function(reportContent, gene) {\n let isPotentiallyCompoundHeterozygousReport = false\n angular.forEach(reportContent.allelicity_by_gene, function(allelicity, gene) {\n if (allelicity == 'biallelic') {\n const homozygousMutations = reportContent.mutations.filter(function(mutation) {\n return mutation.zygosity == zygosity.homozygous && mutation.gene == gene && (mutation.classification == classification.p || mutation.classification == classification.lp || mutation.classification == classification.ras)\n })\n if (homozygousMutations.length == 0) {\n isPotentiallyCompoundHeterozygousReport = true\n }\n } else if (allelicity == null) {\n isPotentiallyCompoundHeterozygousReport = true\n }\n })\n return isPotentiallyCompoundHeterozygousReport\n }\n })\n\n /**\n * @ngdoc filter\n * @name isInCis\n * @memberof resultFilter\n *\n * @description\n * Returns true if reportContent has mutations that make it in cis report\n */\n .filter('isInCis', function($filter) {\n return function(reportContent, targetGene) {\n let isInCis = false\n angular.forEach(reportContent.allelicity_by_gene, function(allelicity, gene) {\n if (allelicity == 'monoallelic' && (!targetGene || targetGene == gene)) {\n const pathogenicMutations = $filter('pathogenicMutations')(reportContent.mutations)\n if ($filter('filter')(pathogenicMutations, {gene: gene}).length > 1) {\n isInCis = true\n }\n }\n })\n return isInCis\n }\n })\n\n /**\n * @ngdoc filter\n * @name isHomozygous\n * @memberof resultFilter\n *\n * @description\n * Returns true if a given variant is homozygous\n */\n .filter('isHomozygous', function(zygosity) {\n return function(variant) {\n return variant.zygosity == zygosity.homozygous\n }\n })\n\n /**\n * @ngdoc filter\n * @name isSingleHomozygousReport\n * @memberof resultFilter\n *\n * @description\n * Returns true if only 1 L/LP mutation in this report and it's homozygous\n */\n .filter('isSingleHomozygousReport', function($filter, classification) {\n return function(mutations) {\n if (angular.isDefined(mutations)) {\n const pathogenicMutations = mutations.filter(function(mutation) {\n return mutation.classification == classification.p || mutation.classification == classification.lp || mutation.classification == classification.ras\n })\n if (!angular.isArray(pathogenicMutations) || pathogenicMutations.length != 1) {\n return false\n }\n return $filter('isHomozygous')(pathogenicMutations[0])\n }\n return false\n }\n })\n\n /**\n * @ngdoc filter\n * @name isBiallelic\n * @memberof resultFilter\n *\n * @description\n * Checks if any gene has biallelic mutations.\n */\n .filter('isBiallelic', function() {\n return function(reportContent) {\n for (const gene in reportContent.allelicity_by_gene) {\n if (reportContent.allelicity_by_gene[gene] == 'biallelic') {\n return true\n }\n }\n return false\n }\n })\n\n /**\n * @ngdoc filter\n * @name useSingleRiskLogic\n * @memberof resultFilter\n *\n * @description\n * Returns true if report should use singleRisk logic\n */\n .filter('useSingleRiskLogic', function($filter) {\n return function(report, gene) {\n if (angular.isDefined(report.mutations)) {\n if ($filter('isPotentiallyCompoundHeterozygousReport')(report, gene)) {\n return true\n }\n return report.mutations.some(function(m) { return $filter('isHomozygous')(m) && (!gene || gene == m.gene) })\n }\n return false\n }\n })\n\n /**\n * @ngdoc filter\n * @name isSomaticReport\n * @memberof resultFilter\n *\n * @description\n * Returns true report should be considered under 'somatic/low allele' flag and changes reportContent.is_somatic to true.\n * Currently returns true for reports with any number of somatic P/LP mutations AND no germline P/LP. Germline VUS don't factor into this determination.\n *\n * DEPRECATION NOTICE: Only used on render_version 1, returns false on render_version >= 2\n *\n */\n .filter('isSomaticReport', function(classification) {\n return function(report) {\n if (report.render_version != 1) {\n return false\n }\n if (angular.isDefined(report.mutations)) {\n const pathogenics = report.mutations.filter(function(mutation) {\n return mutation.classification == classification.p || mutation.classification == classification.lp || mutation.classification == classification.ras\n })\n const variantTypes = pathogenics.map(function(mutation) {\n if (angular.isDefined(mutation.variant_type)) {\n return mutation.variant_type.toLowerCase()\n }\n })\n let allSomatic = !!variantTypes.length\n angular.forEach(variantTypes, function(c) {\n allSomatic = allSomatic && c == 'somatic'\n })\n return allSomatic\n } else {\n return false\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name reportTitle\n * @memberof resultFilter\n *\n * @description\n * Returns proper report title based contents of reportContent\n */\n .filter('reportTitle', function($filter, namedMutation) {\n return function(report) {\n let title = \"\"\n const genes = $filter('genesWithMutationName')(report.mutations)\n\n if (report.is_negative) { // Negative\n title = 'No mutations were identified.'\n } else if (report.is_non_reportable) { // Non reportable\n title = 'Unable to return results for this sample.'\n } else if (($filter('isSingleHomozygousReport')(report.mutations) || $filter('isPotentiallyCompoundHeterozygousReport')(report) || $filter('isInCis')(report)) && genes.length == 1) { // If single homozygous or compound hetero\n const isLikelyPathogenic = $filter('isLikelyPathogenic')(report.mutations)\n const hasBothPathogenic = $filter('hasBothPathogenic')(report.mutations)\n // APC I1307K is currently the only 'common' mutation\n const isCommon = genes[0].name == 'APC' && genes[0].mutationName == 'I1307K'\n\n // RV < 5 homozygous errantly says two genes, later revisions say \"each copy of\"\n if (report.render_version >= 5 && $filter('isSingleHomozygousReport')(report.mutations)) {\n title = \"A \"\n if (isCommon) {\n // APC I1307K is currently the only 'common' mutation\n title += 'common '\n }\n title += isLikelyPathogenic ? 'likely pathogenic' : 'pathogenic'\n title += \" mutation was identified in each copy of the \"\n } else {\n if (hasBothPathogenic) {\n title = \"A pathogenic mutation and a likely pathogenic mutation\"\n } else {\n title = \"Two \" // Applies to Compound Het and Homozyg with RV < 5\n // If common and homozygous\n if (isCommon) {\n // APC I1307K is currently the only 'common' mutation\n title += 'common '\n }\n title += isLikelyPathogenic ? 'likely pathogenic' : 'pathogenic'\n title += \" mutations\"\n }\n title += ' were identified in the '\n }\n title += $filter('genesString')([genes[0].name], 'gene')\n title += '.'\n } else if (genes.length) { // Multiple P/LP gene mutations\n const pathogenicMutations = [];\n const likelyPathogenicMutations = [];\n const commonLikelyPathogenicMutations = [];\n const commonLikelyPathogenicHomoyzgousMutations = [];\n let currentPositionCount = 0\n const generateMutationString = function(genes, likelyPathogenic, isHomozygous, isCommon, uniqueGeneGroupsCount) {\n if (genes.length) {\n const uniqueMutations = $filter('unique')(genes)\n currentPositionCount++\n if (genes.length == 1) {\n title += \"a \"\n }\n title += isCommon ? \"common \" : \"\"\n title += likelyPathogenic ? \"likely \" : \"\"\n title += \"pathogenic mutation\"\n if (genes.length == 1) {\n title += \" was \"\n } else if (genes.length > 1) {\n title += \"s were \"\n }\n title += \"identified in \"\n if (isHomozygous) {\n title += \"each copy of \"\n }\n title += \"the \"\n title += $filter('genesString')(uniqueMutations)\n if (uniqueMutations.length > 1) {\n title += \" genes\"\n } else {\n title += \" gene\"\n }\n if (currentPositionCount < uniqueGeneGroupsCount) {\n // This comma is intentional as it adds a pause between each mutation designation and is not supposed to follow list comma grammar\n title += \", \"\n if (currentPositionCount == uniqueGeneGroupsCount - 1) {\n title += \"and \"\n }\n }\n }\n }\n\n const groupedGenes = {}\n // Group mutations by pathogenicity, zygosity, and frequency.\n angular.forEach($filter('pathogenicMutations')(report.mutations), function(mutation) {\n const key = [\n !$filter('isLikelyPathogenic')(mutation),\n $filter('isHomozygous')(mutation),\n // APC I1307K is the only named mutation currently that requires the \"common\" prefix\n !$filter('containsMutation')([mutation], namedMutation.apc_i1307k)\n ]\n if (!groupedGenes[key]) {\n groupedGenes[key] = [key, []]\n }\n groupedGenes[key][1].push(mutation.gene)\n })\n\n const uniqueGeneGroupsCount = Object.keys(groupedGenes).length\n // Converts grouped genes into a list with a sort key.\n const groupedList = Object.keys(groupedGenes).map(function(key) {\n const args = groupedGenes[key][0]\n // Sort group by pathogenicity, zygosity and then frequency.\n let sortKey = 0\n args.forEach(function(arg, index) {\n sortKey += arg ? Math.pow(10, (args.length - index)) : 0\n })\n return [groupedGenes[key], sortKey]\n })\n groupedList.sort(function(a, b) { return b[1] - a[1] })\n\n // Constructs report summary title.\n groupedList.forEach(function(group) {\n const args = group[0][0]\n const isLikelyPathogenic = !args[0]\n const isHomozygous = args[1]\n const isCommon = !args[2]\n const gene = group[0][1]\n generateMutationString(gene, isLikelyPathogenic, isHomozygous, isCommon, uniqueGeneGroupsCount)\n })\n\n // is_somatic is a rarely used flag, only exists in <5 reports total\n title += report.is_somatic ? ' in a small fraction of your DNA.' : '.'\n title = $filter('capitalize')(title, 'firstOnly')\n }\n\n return title\n }\n })\n\n /**\n * @ngdoc filter\n * @name tablePhenotypeString\n * @memberof resultFilter\n *\n * @description\n * Returns shortened phenotype strings for use in risk tables\n */\n .filter('tablePhenotypeString', function($filter) {\n return function(s) {\n if (angular.isString(s)) {\n if (/cancer$/.test(s) && s != 'any cancer') {\n s = s.replace(/\\s*[cC]ancer$/, '')\n }\n }\n return $filter('capitalize')(s, 'firstOnly')\n }\n })\n\n /**\n * @ngdoc filter\n * @name nomenclature\n * @memberof resultFilter\n *\n * @description\n * Returns the appropriate nomenclature string based on mutation and type of string desired either 'primary', 'secondary', or 'transcript'\n *\n * @example\n * $filter('nomenclature')(mutation, 'primary') => '{{ cHGVS }} ({{ pHGVS }})'\n * $filter('nomenclature')(mutation, 'secondary') => '{{ gHGVS }}, {{ BIC }}'\n * $filter('nomenclature')(mutation, 'transcript') => 'ENST00000265849'\n */\n .filter('nomenclature', function($filter) {\n function removeTranscriptReference(nomenclature) {\n // Note: we need to handle cases with multiple colons in the nomenclature, e.g.:\n // \"ENST00000342988:deletion of exons 1-10 (chr18.GRCh37:g.48400713_48599018delinsCAATTGT)\" ->\n // \"deletion of exons 1-10 (chr18.GRCh37:g.48400713_48599018delinsCAATTGT)\"\n const pos = nomenclature.indexOf(':')\n if (pos >= 0) {\n return nomenclature.substring(pos + 1)\n } else {\n return nomenclature\n }\n }\n\n function getTranscriptReference(nomenclature) {\n const split = nomenclature.split(':')\n if (split.length > 1) {\n return split[0]\n }\n }\n\n return function(mutation, type) {\n if (angular.isDefined(mutation)) {\n if (type == 'primary') {\n if (mutation.effect == 'CNV') {\n let exon = $filter('filter')(mutation.nomenclatures, { type: 'Exon', is_primary: true })[0].name\n exon = removeTranscriptReference(exon)\n return exon\n } else {\n const cHGVS = $filter('filter')(mutation.nomenclatures, { type: 'cHGVS', is_primary: true })[0].name;\n let pHGVS = $filter('filter')(mutation.nomenclatures, { type: 'pHGVS', is_primary: true });\n\n let primaryNomenclature\n\n primaryNomenclature = removeTranscriptReference(cHGVS)\n\n if (pHGVS.length) {\n pHGVS = removeTranscriptReference(pHGVS[0].name)\n primaryNomenclature += ' (' + pHGVS + ')'\n }\n return primaryNomenclature\n }\n } else if (type == 'secondary') {\n let secondary\n const isCNV = mutation.effect == 'CNV' ? true : false\n let bic = $filter('filter')(mutation.nomenclatures, { type: 'BIC' })\n bic = $filter('orderBy')(bic, '-is_primary')\n const bicNames = bic.map(function(b) {\n return b.name\n })\n const secondaryNomenclature = []\n const gHGVS = $filter('filter')(mutation.nomenclatures, { type: 'gHGVS', is_primary: true })\n if (gHGVS.length) {\n secondaryNomenclature.push(gHGVS[0].name)\n }\n if (secondaryNomenclature.length) {\n secondary = secondaryNomenclature.join(', ')\n }\n if (bicNames.length) {\n if (secondary) {\n secondary += isCNV ? ', BIC: ' : ', '\n secondary += bicNames.join(', ')\n } else {\n secondary = isCNV ? 'BIC: ' : ''\n secondary += bicNames.join(', ')\n }\n }\n return secondary\n } else if (type == 'transcript') {\n if (mutation.effect != 'CNV') {\n const cHGVS = $filter('filter')(mutation.nomenclatures, { type: 'cHGVS', is_primary: true })[0].name\n return getTranscriptReference(cHGVS)\n } else if (mutation.effect == 'CNV') {\n const exon = $filter('filter')(mutation.nomenclatures, { type: 'Exon', is_primary: true })[0].name\n return getTranscriptReference(exon)\n }\n }\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name riskString\n * @memberof resultFilter\n *\n * @description\n * Returns transformed risk value strings for frontend display purposes.\n */\n .filter('riskString', function($filter) {\n\n // Match for \"elevated [N%]\" and \"elevated [M-N%]\" risks\n const matchBracketedPercentage = /\\[[0-9\\-\\.]*%\\]$/\n const matchArrowNotation = /[\\d\\.]+->/\n\n return function(s) {\n if (angular.isString(s)) {\n // Add space around dash of ranges if not also \"Elevated\", \"10-24%\" -> \"10 - 24%\"\n if (s.indexOf('-') > -1 && s.indexOf('elevated') == -1) {\n s = s.replace('-', ' - ')\n }\n // Is \"elevated [N%]\", removes, the bracketed value\n if (matchBracketedPercentage.test(s)) {\n s = s.replace(matchBracketedPercentage, '').trim()\n }\n // If range has arrow notation, e.g. \"2->4%\", only show upper bound\n if (matchArrowNotation.test(s)) {\n s = s.replace(matchArrowNotation, '')\n }\n if (s == 'not elevated') {\n s = 'Not Known To Be Elevated'\n }\n if (s == 'not currently elevated') {\n s = 'Not Currently Known To Be Elevated'\n }\n if (s == 'studies ongoing') {\n s = 'Studies Ongoing'\n }\n s = $filter('capitalize')(s)\n }\n return s\n }\n })\n\n/**\n * @ngdoc filter\n * @name cancerString\n * @memberof resultFilter\n *\n * @description\n * Returns a grammatically correct string for phenotypes that exist in reportContent risks object.\n */\n\n/**\n * Sample expected outputs:\n * breast cancer\n * breast and ovarian cancer\n * breast, ovarian and prostate cancer\n * colorectal, urinary tract, gastric, central nervous system, small bowel, pancreatic, hepatobiliary tract cancer and sebaceous neoplasm\n */\n\n .filter('cancerString', function($filter) {\n const generateCancerString = function(cancers, others) {\n cancers[cancers.length - 1] = cancers[cancers.length - 1] + ' cancer'\n const combined = cancers.concat(others)\n if (combined.length == 2) {\n return combined.join(\" and \")\n } else if (combined.length > 2) {\n const last = combined.pop()\n return combined.join(\", \") + \" and \" + last\n } else {\n return combined[0]\n }\n }\n\n return function(risks, allelicity) {\n let cancers = []\n let others = []\n\n angular.forEach(risks, function(risk) {\n if (allelicity && risk.allelicity != allelicity) {\n return\n }\n if (risk.phenotype.indexOf('cancer') > -1) {\n cancers.push(risk.phenotype.replace(/\\s*cancer(s)?/, '').toLowerCase()) // remove ' cancer' from phenotype names because they're typically combined or displayed without their ' cancer' suffix\n } else {\n others.push(risk.phenotype.toLowerCase())\n }\n })\n\n // Some risks are duplicated from allelicity (like MUTYH), so when constructing a string, remove any duplicates\n cancers = $filter('unique')(cancers)\n others = $filter('unique')(others)\n\n return generateCancerString(cancers, others)\n }\n })\n\n/**\n * @ngdoc filter\n * @name getPrimaryPhenotypeOrder\n * @memberof resultFilter\n *\n * @description\n * Returns a array of phenotypes considered primary, basically what shows on the main parts of reports.\n */\n\n .filter('getPrimaryPhenotypeOrder', function($filter, testTypes) {\n return function(genes, gender, testType, allelicity) {\n if (!angular.isArray(genes)) {\n genes = [genes]\n }\n\n const phenotypes = []\n\n function addPhenotypes(phenotypesToAdd) {\n phenotypesToAdd.forEach(function(p) {\n if (phenotypes.indexOf(p) == -1) {\n phenotypes.push(p)\n }\n })\n }\n\n if (testType == testTypes.hereditary30) {\n if ($filter('containsAny')(genes, ['APC', 'GREM1', 'MUTYH'])) {\n addPhenotypes(['colorectal cancer'])\n }\n if ($filter('containsAny')(genes, ['ATM'])) {\n if (gender == 'F') {\n addPhenotypes(['breast cancer'])\n } else {\n addPhenotypes(['pancreatic cancer'])\n }\n }\n if ($filter('containsAny')(genes, ['BRCA1'])) {\n if (gender == 'F') {\n addPhenotypes(['breast cancer', 'ovarian cancer'])\n } else {\n addPhenotypes(['male breast cancer', 'pancreatic cancer'])\n }\n }\n if ($filter('containsAny')(genes, ['BRCA2'])) {\n if (!allelicity || allelicity == 1) {\n addPhenotypes(['breast cancer', 'ovarian cancer', 'male breast cancer', 'prostate cancer'])\n }\n if (!allelicity || allelicity == 2) {\n addPhenotypes(['acute myeloid leukemia'])\n }\n }\n if ($filter('containsAny')(genes, ['BAP1'])) {\n addPhenotypes(['melanoma'])\n }\n if ($filter('containsAny')(genes, ['BARD1'])) {\n addPhenotypes(['breast cancer'])\n }\n if ($filter('containsAny')(genes, ['BMPR1A'])) {\n addPhenotypes(['colorectal cancer', 'stomach cancer'])\n }\n if ($filter('containsAny')(genes, ['BRIP1'])) {\n addPhenotypes(['breast cancer', 'ovarian cancer'])\n }\n if ($filter('containsAny')(genes, ['CDH1'])) {\n addPhenotypes(['gastric cancer', 'breast cancer'])\n }\n if ($filter('containsAny')(genes, ['CDK4'])) {\n addPhenotypes(['melanoma'])\n }\n if ($filter('containsAny')(genes, ['CDKN2A'])) {\n addPhenotypes(['melanoma', 'pancreatic cancer'])\n }\n if ($filter('containsAny')(genes, ['EPCAM'])) {\n if (gender == 'F') {\n addPhenotypes(['ovarian cancer', 'colorectal cancer', 'uterine cancer', 'breast cancer'])\n } else {\n addPhenotypes(['colorectal cancer'])\n }\n }\n if ($filter('containsAny')(genes, ['MLH1'])) {\n if (gender == 'F') {\n addPhenotypes(['colorectal cancer', 'uterine cancer', 'ovarian cancer'])\n } else {\n addPhenotypes(['colorectal cancer', 'stomach cancer'])\n }\n }\n if ($filter('containsAny')(genes, ['MSH2'])) {\n if (gender == 'F') {\n addPhenotypes(['colorectal cancer', 'uterine cancer', 'ovarian cancer'])\n } else {\n addPhenotypes(['colorectal cancer'])\n }\n }\n if ($filter('containsAny')(genes, ['MSH6'])) {\n addPhenotypes(['colorectal cancer', 'uterine cancer', 'ovarian cancer'])\n }\n if ($filter('containsAny')(genes, ['CHEK2'])) {\n if (gender == 'F') {\n addPhenotypes(['breast cancer'])\n } else {\n addPhenotypes(['colorectal cancer', 'prostate cancer'])\n }\n }\n if ($filter('containsAny')(genes, ['RAD51C', 'RAD51D'])) {\n addPhenotypes(['ovarian cancer'])\n }\n if ($filter('containsAny')(genes, ['MITF'])) {\n addPhenotypes(['melanoma'])\n }\n if ($filter('containsAny')(genes, ['PALB2'])) {\n addPhenotypes(['breast cancer', 'male breast cancer'])\n }\n if ($filter('containsAny')(genes, ['PMS2'])) {\n addPhenotypes(['colorectal cancer', 'uterine cancer', 'ovarian cancer'])\n }\n if ($filter('containsAny')(genes, ['PTEN'])) {\n addPhenotypes(['breast cancer', 'thyroid cancer', 'kidney cancer', 'uterine cancer'])\n }\n if ($filter('containsAny')(genes, ['STK11'])) {\n addPhenotypes(['breast cancer', 'colorectal cancer', 'stomach cancer'])\n }\n if ($filter('containsAny')(genes, ['SMAD4'])) {\n addPhenotypes(['colorectal cancer', 'stomach cancer'])\n }\n if ($filter('containsAny')(genes, ['TP53'])) {\n addPhenotypes(['breast cancer', 'brain cancer', 'sarcoma (bone) cancer', 'sarcoma (soft tissue) cancer', 'any cancer'])\n }\n if (!phenotypes.length) {\n addPhenotypes(['breast cancer', 'prostate cancer', 'colorectal cancer'])\n }\n } else if (testType == testTypes.breastOvarian19) {\n if ($filter('containsAny')(genes, ['PMS2', 'MSH2', 'MSH6', 'MLH1', 'EPCAM'])) {\n addPhenotypes(['ovarian cancer', 'colorectal cancer', 'uterine cancer', 'breast cancer', 'male breast cancer'])\n }\n if ($filter('containsAny')(genes, ['CDH1'])) {\n addPhenotypes(['breast cancer', 'gastric cancer', 'ovarian cancer', 'male breast cancer'])\n }\n if ($filter('containsAny')(genes, ['PTEN'])) {\n addPhenotypes(['breast cancer', 'kidney cancer', 'thyroid cancer', 'uterine cancer', 'ovarian cancer'])\n }\n if ($filter('containsAny')(genes, ['RAD51C', 'RAD51D'])) {\n addPhenotypes(['ovarian cancer', 'breast cancer', 'male breast cancer'])\n }\n if ($filter('containsAny')(genes, ['TP53'])) {\n addPhenotypes(['breast cancer', 'ovarian cancer', 'brain cancer', 'sarcoma (bone) cancer', 'sarcoma (soft tissue) cancer', 'any cancer'])\n }\n if ($filter('containsAny')(genes, ['ATM']) && gender == 'M') {\n addPhenotypes(['pancreatic cancer', 'male breast cancer'])\n }\n if ($filter('containsAny')(genes, ['CHEK2']) && gender == 'M') {\n addPhenotypes(['colorectal cancer', 'prostate cancer', 'male breast cancer'])\n }\n if ($filter('containsAny')(genes, ['STK11']) && gender == 'F') {\n addPhenotypes(['breast cancer', 'colorectal cancer', 'stomach cancer'])\n }\n if (!phenotypes.length) {\n addPhenotypes(['breast cancer', 'ovarian cancer', 'male breast cancer'])\n }\n } else {\n throw 'sortRiskByPhenotype testType not defined'\n }\n return phenotypes\n }\n })\n\n/**\n * @ngdoc filter\n * @name sortRiskByPhenotype\n * @memberof resultFilter\n *\n * @description\n * Returns set of sorted risks based on risks and tier of cancers desired, useful on sample letter and result charts\n *\n * @param {object} risks - This is typically used in concert with `$filter('sortedRisks')` on the resulting `risks.pathogenic` or `risks.baseline`\n * @param {string or array} cancerTier - 'primary', 'secondary', 'all', or an array that constitutes as primary\n * @param {array} genes - A list of genes to sort against\n * @param {string} testType - 'breastOvarian19', 'hereditary30', 'wisdom9'\n */\n\n .filter('sortRiskByPhenotype', function($filter, testTypes) {\n return function(risks, cancerTier, genes, testType) {\n const primaryPhenotypeOrder = $filter('getPrimaryPhenotypeOrder')(genes, risks.length ? risks[0].gender : null, testType)\n function comparator(risk) {\n let val = primaryPhenotypeOrder.indexOf(risk.phenotype)\n if (val < 0) {\n val = primaryPhenotypeOrder.length\n val += risks.indexOf(risk)\n }\n return val\n }\n // Make copy of risks (avoid issues with mutability) then order with primaries first\n // Ideally we also order by alphabet before primaries first, but because of not wanting to re-issue non-impactful changes on released reports, this is not done.\n risks = $filter('orderBy')(angular.copy(risks), comparator)\n // On Hereditary 30, force alphabetical ordering first, then prefer primaryPhenotypes as needed, because this is the preferred order on everything but primary\n if (testType == testTypes.hereditary30 && cancerTier != 'primary') {\n risks = $filter('orderBy')(risks, 'phenotype')\n }\n return risks.filter(function(risk) {\n if (angular.isArray(cancerTier)) {\n return $filter('containsAny')([risk.phenotype], cancerTier)\n } else if (cancerTier == 'primary') {\n return $filter('containsAny')([risk.phenotype], primaryPhenotypeOrder)\n } else if (cancerTier == 'all') {\n return true\n } else {\n return $filter('containsNone')([risk.phenotype], primaryPhenotypeOrder)\n }\n })\n }\n })\n\n/**\n * @ngdoc filter\n * @name genesWithPathogenicMutations\n * @memberof resultFilter\n *\n * @description\n * Returns list of genes using sortMutations filter, which handles ordering based on classification and special use cases\n */\n\n .filter('genesWithPathogenicMutations', function($filter, classification) {\n return function(mutations) {\n mutations = mutations.filter(function(mutation) {\n return mutation.classification == classification.lp || mutation.classification == classification.p || mutation.classification == classification.ras\n })\n if (mutations.length == 0) {\n return []\n }\n const sortedMutations = $filter('sortMutations')(mutations)\n return $filter('unique')(sortedMutations.map(function(mutation) {\n return mutation.gene\n }))\n }\n })\n\n/**\n * @ngdoc filter\n * @name sortMutations\n * @memberof resultFilter\n *\n * @description\n * Returns reordered list of reportContent.mutations, sorted by classification and alphabetical (with respect to special gene combo use cases)\n */\n\n .filter('sortMutations', function($filter) {\n function setMutationsGenesOrder(genes) {\n if ($filter('containsAll')(genes, ['ATM', 'BRCA2'])) {\n return ['BRCA2', 'ATM']\n } else {\n return genes\n }\n }\n\n return function(mutations) {\n // Return mutations if there is 0 or 1, no need to sort\n if (mutations.length <= 1) {\n return mutations\n }\n // Initially order mutations by genes, alphabetically\n mutations = $filter('orderBy')(angular.copy(mutations), 'gene')\n const genes = []\n angular.forEach(mutations, function(mutation) {\n genes.push(mutation.gene)\n })\n // Then set order mutations by genes, alphabetically\n const mutationsGenesOrder = setMutationsGenesOrder(genes)\n function comparator(mutation) {\n let val = mutationsGenesOrder.indexOf(mutation.gene)\n if (val < 0) {\n val = mutationsGenesOrder.length\n val += mutations.indexOf(mutation.gene)\n }\n return val\n }\n // Order by genes first\n mutations = $filter('orderBy')(mutations, comparator)\n // Then order by classification (because only \"Pathogenic\" and \"Likely Pathogenic\" exist, order \"Pathogenic\" first)\n mutations = $filter('orderBy')(mutations, '-classification')\n return mutations\n }\n })\n\n/**\n * @ngdoc filter\n * @name containsMutation\n * @memberof resultFilter\n *\n * @description\n * Returns true if requested gHGVS mutation name exists inside mutations\n */\n\n .filter('containsMutation', function($filter) {\n return function(mutations, mutationName) {\n const count = 0\n for (let i = 0; i < mutations.length; i++) {\n if ($filter('filter')(mutations[i].nomenclatures, { type: 'gHGVS', name: mutationName }).length) {\n return true\n }\n }\n return false\n }\n })\n\n/**\n * @ngdoc filter\n * @name getRiskByAge\n * @memberof resultFilter\n *\n * @description\n * Get the risk number by age, defaults to 80\n */\n\n .filter('getRiskByAge', function($filter) {\n return function(risks, age) {\n if (angular.isDefined(risks)) {\n age = age ? age : 80\n const result = $filter('filter')(risks, { 'age': age })\n if (result.length) {\n return result[0].risk\n }\n }\n }\n })\n\n/**\n * @ngdoc filter\n * @name orderType\n * @memberof resultFilter\n */\n\n .filter('orderType', function() {\n return function(kit_order) {\n // TODO: Change return type once we integrate with other ordering networks\n if (kit_order.independent_physician_order) {\n return 'PWN'\n } else if (kit_order.physician_order) {\n return 'External'\n } else {\n return 'Internal'\n }\n }\n })\n\n/**\n * @ngdoc filter\n * @name geneArticle\n * @memberof resultFilter\n *\n * @description\n * Writes the proper \"a {{gene}}\" or \"an {{gene}}\", with default wrapper around gene\n */\n\n .filter('geneArticle', function($filter) {\n function presentGene(gene, noWrap, isSinglePrefix) {\n let article;\n const anArticleGenes = ['APC', 'APOB', 'ATM', 'EPCAM', 'LDLR', 'LDLRAP1', 'MLH1', 'MSH2', 'MSH6', 'STK11']\n if (isSinglePrefix) {\n article = 'a single '\n } else if (anArticleGenes.indexOf(gene) > -1) {\n article = 'an '\n } else {\n article = 'a '\n }\n return noWrap ? article + gene : article + '' + gene + ''\n }\n return function(genes, noWrap, isSinglePrefix) {\n if (angular.isString(genes)) {\n // Infers this is a single gene if it's a string, most common use case\n return presentGene(genes, noWrap, isSinglePrefix)\n } else if (angular.isArray(genes)) {\n const wrappedGenes = []\n angular.forEach(genes, function(gene) {\n wrappedGenes.push(presentGene(gene, noWrap, isSinglePrefix))\n })\n return $filter('genesString')(wrappedGenes, null, true)\n }\n }\n })\n\n/**\n * @ngdoc filter\n * @name genesString\n * @memberof resultFilter\n *\n * @description\n * Writes a collection of genes in string form, with optional wrappers\n */\n\n .filter('genesString', function() {\n return function(genes, nounAppend, noWrap) {\n let result = ''\n angular.forEach(genes, function(gene, index) {\n if (index == genes.length - 1 && genes.length != 1) {\n result += ' and '\n } else if (index != 0) {\n result += ', '\n }\n result += noWrap ? gene : '' + gene + ''\n })\n if (nounAppend) {\n result += ' ' + nounAppend\n if (genes.length > 1) {\n result += 's'\n }\n }\n return result\n }\n })\n\n /**\n * @ngdoc filter\n * @name getReportReferences\n * @memberof resultFilter\n *\n * @description\n * Returns array of references based on reportContent and gender, deduped and sorted.\n */\n .filter('getReportReferences', function($filter) {\n function addReference(references, reference) {\n if (references.indexOf(reference) == -1) {\n references.push(reference)\n }\n }\n return function(report, gender) {\n const reportReferences = []\n const sortedRisks = $filter('sortedRisks')(report, gender)\n\n if (report.is_positive) {\n angular.forEach(sortedRisks.pathogenic, function(risk) {\n if (risk.allelicity != '2' || report.allelicity_by_gene[risk.gene] != 'monoallelic') {\n angular.forEach(risk.references, function(r) {\n addReference(reportReferences, r)\n })\n }\n })\n }\n angular.forEach(sortedRisks.baseline, function(risk) {\n risk.references.map(function(r) {\n addReference(reportReferences, r)\n })\n })\n // New addition with Wisdom reports, not all reports have \"summary_references\"\n angular.forEach(report.template.summary_references, function(r) {\n addReference(reportReferences, r)\n })\n angular.forEach(report.template.screening_guideline_intro_references, function(r) {\n addReference(reportReferences, r)\n })\n angular.forEach(report.template.screening_guidelines, function(guideline) {\n guideline.references.map(function(r) {\n addReference(reportReferences, r)\n })\n })\n if (report.template.incidental_finding_references) {\n angular.forEach(report.template.incidental_finding_references, function(r) {\n addReference(reportReferences, r)\n })\n }\n if (report.template.additional_family_impact_references) {\n angular.forEach(report.template.additional_family_impact_references, function(r) {\n addReference(reportReferences, r)\n })\n }\n return reportReferences.sort()\n }\n })\n\n /**\n * @ngdoc filter\n * @name sortedRisks\n * @memberof resultFilter\n *\n * @description\n * Returns sorted set of risks, both pathogenic and baseline,\n * based on gender and the risk ages as defined in the pathogenic risks.\n * Can optionally, only show a specified phenotype, gene or allelicity.\n */\n .filter('sortedRisks', function($filter, testTypes) {\n return function(reportContent, gender, removeNotIncreasedPathogenicRisks, phenotype, gene, allelicity) {\n\n if (angular.isUndefined(reportContent)) {\n return\n }\n\n // Set gender to same as reportContent if none defined\n if (angular.isUndefined(gender)) {\n gender = reportContent.gender\n }\n // Allow both genders if 'A', else match against 'F' or 'M'\n function ifGender(riskGender, gender) {\n return gender == 'A' || riskGender == gender\n }\n\n // Returns true if undefined, which means it's processing baseline where gene is undefined\n function ifGene(riskGene, gene) {\n return angular.isUndefined(gene) || riskGene == gene\n }\n\n let negativePhenotypes = []\n if (reportContent.template.test_type == testTypes.breastOvarian19) {\n negativePhenotypes = ['breast cancer', 'ovarian cancer', 'pancreatic cancer', 'male breast cancer', 'prostate cancer']\n } else if (reportContent.template.test_type == testTypes.hereditary30) {\n negativePhenotypes = ['breast cancer', 'prostate cancer', 'colorectal cancer']\n }\n\n const risks = {}\n // DO NOT REMOVE: Funky mutability issue when using subsequent `.filter()`s, even though we don't touch the original `reportContent` object\n // TODO, Clean this up: https://getcolor.atlassian.net/browse/ENG-27\n const reportContentClone = angular.copy(reportContent)\n\n // List of risks based on gender (and optionally phenotype and/or gene and/or allelicity)\n risks.pathogenic = reportContentClone.risks.filter(function(risk) {\n if (risk.gene && ifGender(risk.gender, gender) && (!phenotype || risk.phenotype == phenotype) && ifGene(risk.gene, gene) && (!allelicity || risk.allelicity == allelicity)) {\n return risk\n }\n })\n\n // List of risks based on gender (and optionally phenotype and/or gene)\n // If pathogenic risks exist, match baseline risk ages against pathogenic risk ages\n risks.baseline = reportContentClone.risks.filter(function(risk) {\n // If risk is baseline risk and gender matches and phenotype matches\n if (!risk.gene && ifGender(risk.gender, gender) && (!phenotype || risk.phenotype == phenotype)) {\n // Basic check for undefined pathogenic risks existing for each baseline risk\n if (risks.pathogenic.length) {\n // Filter pathogenic risks for matching phenotype and gender\n const matchedPathogenicRisks = risks.pathogenic.filter(function(r) {\n return r.phenotype == risk.phenotype && r.gender == risk.gender\n })\n // Check if matched pathogenic risk exists\n if (matchedPathogenicRisks.length) {\n // Collect ages represented in pathogenic risks\n const matchedPathogenicAges = []\n angular.forEach(matchedPathogenicRisks, function(matchedPathogenicRisk) {\n angular.forEach(matchedPathogenicRisk.data, function(r) {\n if (matchedPathogenicAges.indexOf(r.age) == -1) {\n matchedPathogenicAges.push(r.age)\n }\n })\n })\n // Filter baseline risks to only ages that exist in the matched pathogenic risks\n risk.data = risk.data.filter(function(data) {\n return matchedPathogenicAges.indexOf(data.age) != -1\n })\n return risk\n }\n } else if (reportContentClone.is_negative && $filter('containsAny')([risk.phenotype], phenotype ? [phenotype] : negativePhenotypes)) {\n return risk\n }\n }\n })\n\n // Optionally remove pathogenic risks that have a single risk guideline that is 'not elevated' or have the same risks as baseline\n if (removeNotIncreasedPathogenicRisks) {\n risks.pathogenic = risks.pathogenic.filter(function(pRisk) {\n const bRisk = $filter('filter')(risks.baseline, { phenotype: pRisk.phenotype, age: pRisk.age })[0]\n // No pathogenic risks, cause none exist (like RAD51C M)\n if (!pRisk.data.length) {\n return false\n }\n // Check each risk number to see if it's `not elevated` or `studies ongoing`\n const notIncreasedPRisks = pRisk.data.filter(function(p) {\n return !($filter('isNotElevated')(p.risk) || $filter('isStudiesOngoing')(p.risk))\n })\n // Single pathogenic risk that is 'not elevated'\n if (!notIncreasedPRisks.length) {\n return false\n }\n\n // If same risk numbers are the same as baseline\n return !angular.equals(pRisk.data, bRisk.data)\n })\n }\n\n return {\n baseline: risks.baseline,\n pathogenic: risks.pathogenic\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name allRisksNotElevated\n * @memberof resultFilter\n *\n * @description\n * Return true if all risks in a risks object only contain `not elevated` or `not currentl elevated`\n */\n .filter('allRisksNotElevated', function($filter) {\n return function(risks) {\n if (risks.length) {\n for (let i = 0; i < risks.length; i++) {\n for (let j = 0; j < risks[i].data.length; j++) {\n if (!$filter('isNotElevated')(risks[i].data[j].risk)) {\n return false\n }\n }\n }\n }\n return true\n }\n })\n\n /**\n * @ngdoc filter\n * @name getSingleRisk\n * @memberof resultFilter\n *\n * @description\n * Get a single risk number from reportContent.risks\n */\n .filter('getSingleRisk', function() {\n return function(risks, gender, phenotype, age, gene) {\n let singleRisk\n angular.forEach(risks, function(risk) {\n if (risk.gender == gender && risk.phenotype == phenotype && (gene ? risk.gene == gene : risk.gene == \"\")) {\n angular.forEach(risk.data, function(r) {\n if (r.age == age) {\n singleRisk = r.risk\n }\n })\n }\n })\n return singleRisk\n }\n })\n\n /**\n * @ngdoc filter\n * @name clinicalCancerNames\n * @memberof resultFilter\n *\n * @description\n * Convert cancer constants used on the frontend to the clinical names that are used in the backend and are returned\n * by health profile serializers such as CancerProfileSerializerMixin\n */\n .filter('clinicalCancerNames', function(cancerToClinicalName) {\n return function(cancers) {\n return cancers.map((c) => cancerToClinicalName[c])\n }\n })\n\n .filter('cancerHistory', function($filter, cancersCovered) {\n return function(profile) {\n const history = profile.cancers.filter(\n (c) => $filter('clinicalCancerNames')(cancersCovered).indexOf(c.name) != -1\n ).map(\n (c) => c.name.replace(' cancer', '')\n )\n if (profile.had_breast_biopsy_with_atypical_hyperplasia == 'Y') {\n history.push('AH')\n }\n if (profile.diagnosed_with_lobular_carcinoma_in_situ == 'Y') {\n history.push('LCIS')\n }\n if (profile.had_mastectomy) {\n history.push('Mastectomy')\n }\n if (profile.had_oophorectomy) {\n history.push('Oophorectomy')\n }\n if (profile.significant_polyps) {\n history.push('Polyps')\n }\n return history.length == 0 ? 'None' : history.join(', ')\n }\n })\n\n .filter('relativesCancerHistory', function($filter, cancersCovered, clinicalCancerName) {\n return function(relatives) {\n const phenotypes = {}\n for (const cancerName of $filter('clinicalCancerNames')(cancersCovered)) {\n phenotypes[cancerName] = {fdr_count: 0, count: 0}\n }\n for (const relative of relatives) {\n let relativePhenotypes = []\n if (relative.female_relative_health_profile) {\n relativePhenotypes = relative.female_relative_health_profile.cancers\n } else if (relative.male_relative_health_profile) {\n relativePhenotypes = relative.male_relative_health_profile.cancers\n }\n for (const relativePhenotype of relativePhenotypes) {\n if (relativePhenotype.name in phenotypes) {\n phenotypes[relativePhenotype.name].count += 1\n if (relative.relationship_is_first_degree) {\n phenotypes[relativePhenotype.name].fdr_count += 1\n }\n }\n }\n }\n\n const phenotypesList = Object.keys(phenotypes).filter(\n (cancerName) => phenotypes[cancerName].count > 0\n ).map((cancerName) => {\n const fdrCount = phenotypes[cancerName].fdr_count\n const significant = (\n ([clinicalCancerName.OVARIAN, clinicalCancerName.PROSTATE, clinicalCancerName.MELANOMA, clinicalCancerName.COLORECTAL].indexOf(cancerName) != -1 && fdrCount >= 1)\n || (cancerName == clinicalCancerName.PANCREATIC && fdrCount >= 2)\n )\n // Remove the word 'cancer' from the cancer name in order to save space\n const shortName = cancerName.replace(' cancer', '')\n return {name: shortName, significant: significant}\n })\n\n return phenotypesList.length ? phenotypesList : [{name: 'None', significant: false}]\n }\n })\n\n .filter('relativesCardioHistory', function($filter) {\n return function(relatives) {\n let phenotypes = relatives.map(function(relative) {\n return relative.cardio_history.map(function(c) { return c.name })\n }).reduce(function(a, b) { return a.concat(b) })\n\n phenotypes = $filter('unique')(phenotypes)\n\n return phenotypes.length ? phenotypes.map(function(p) {\n return {name: p, significant: false}\n }) : [{name: 'None', significant: false}]\n }\n })\n\n /**\n * @ngdoc filter\n * @name orderReportedVariants\n * @memberof resultFilter\n *\n * @description\n * Order variants by classification and gene.\n */\n .filter('orderReportedVariants', function($filter, classification) {\n const pathogenicClassifications = [classification.p, classification.lp, classification.ras, classification.vus]\n const benignClassifications = [classification.lb, classification.b, classification.rai]\n\n const byClassification = function(variant) {\n // order pathogenic/vus variants by pathogenicity, and put all benign/likely benign variants at the end\n let sortKey = pathogenicClassifications.indexOf(variant.classification)\n if (sortKey == -1) {\n sortKey = pathogenicClassifications.length\n }\n return sortKey\n }\n\n return function(variants, showBenign) {\n if (!showBenign) {\n variants = $filter('filter')(variants, function(variantCall) {\n return benignClassifications.indexOf(variantCall.classification) == -1\n })\n }\n variants = $filter('orderBy')(variants, [byClassification, (variant) => variant.gene])\n return variants\n }\n })\n\n /**\n * @ngdoc filter\n * @name orderVariants\n * @memberof resultFilter\n *\n * @description\n * Order variants by classification and gene.\n */\n .filter('orderVariants', function($filter, classification) {\n const variantClassificationsToShow = [\n classification.p, classification.lp, classification.ras, 'VUS'];\n\n const benignClassifications = [classification.lb, classification.b, classification.rai]\n const byClassification = function(srv) {\n let minkey = -1\n // select the most severe classification for this variant\n for (let i = 0; i < srv.variant_classifications.length; i++) {\n if (srv.variant_classifications[i].state == 'reviewed') {\n const key = variantClassificationsToShow.indexOf(\n srv.variant_classifications[i].classification.short_name)\n if (minkey < 0 || key > -1 && key < minkey) {\n minkey = key\n }\n }\n }\n if (minkey == -1) {\n minkey = variantClassificationsToShow.length\n }\n return minkey\n }\n\n const byGene = function(srv) {\n return srv.variant_classifications[0].classification_unit.variant.gene\n }\n\n return function(variants, showBenign) {\n if (angular.isUndefined(variants)) {\n return []\n }\n\n variants = variants.filter(function(srv) {\n return angular.isDefined(srv.variant_classifications) && srv.variant_classifications.length > 0\n })\n\n variants = $filter('orderBy')(variants, [byClassification, byGene])\n if (!showBenign) {\n variants = $filter('filter')(variants, function(srv) {\n for (let i = 0; i < srv.variant_classifications.length; i++) {\n const one_vc = srv.variant_classifications[i]\n if (benignClassifications.indexOf(one_vc.classification.short_name) == -1 || one_vc.state != 'reviewed') {\n return true\n }\n }\n return false\n })\n }\n return variants\n }\n })\n\n /**\n * @ngdoc filter\n * @name testMethodologyVersion\n * @memberof resultFilter\n *\n * @description\n * Returns version of test methodologies based on sample.recieved_at date.\n */\n .filter('testMethodologyVersion', function(testTypes) {\n return function(reportContent) {\n /* Date comparison required to handle updated test methodologies section to reflect:\n * BO19:\n * Version 1: Initial release.\n * Version 2: Add CAP #, remove GATK version. Effective for kits received after Nov 7th, 2015 UTC.\n * Version 3: Changes required for NYC application.\n * Version 4: Add CE mark, match content structure of H30 reports.\n * Version 5: VUS content update, changes regarding structural variants, added asterisk below gene list.\n * Version 6: Should always be backend-set, has blood language along with NY Lab statement.\n * Version 7: Should always be backend-set, secondary confirmation languate updated for NY.\n * H30:\n * Version 1: Initial release.\n * Version 2: VUS content update, changes regarding structural variants.\n * Version 3: Should always be backend-set, has blood language along with NY Lab statement.\n * Version 4: Should always be backend-set, secondary confirmation languate updated for NY.\n * W9:\n * Version 1: Initial release.\n * Version 2: General language now conforms with equivalent BO19 and H30 versions.\n */\n\n // Use backend-set test methodology version if value exists in report object\n if (angular.isString(reportContent.test_methodology_version)) {\n const backendTestVersionString = reportContent.test_methodology_version.split(\"_\")\n // Check for existence of `_`\n if (backendTestVersionString.length == 2) {\n const backendTestType = backendTestVersionString[0]\n const backendVersion = backendTestVersionString[1]\n if (reportContent.template.test_type == testTypes.breastOvarian19 && backendTestType == \"bo19\" || reportContent.template.test_type == testTypes.hereditary30 && backendTestType == \"h30\" || reportContent.template.test_type == testTypes.wisdom9 && backendTestType == \"w9\" || reportContent.template.test_type == testTypes.fh3 && backendTestType == \"fh3\") {\n return parseInt(backendVersion)\n } else {\n throw 'Backend-set test methodology version does not match with reportContent.test_type'\n }\n }\n }\n\n // Otherwise use JS-derived test methodology version\n const dates = {\n sampleReceivedAt: new Date(reportContent.sample.received_at),\n bo19: {\n version1Cutoff: new Date(\"2015-11-07T00:00:00.000Z\"),\n version2Cutoff: new Date(\"2016-02-05T00:00:00.000Z\"),\n version3Cutoff: new Date(\"2016-06-03T00:00:00.000Z\"),\n version4Cutoff: new Date(\"2016-08-29T17:00:00.000Z\")\n // version5Cutoff is anything after V4\n },\n h30: {\n version1Cutoff: new Date(\"2016-08-29T17:00:00.000Z\")\n // version2Cutoff is anything after V1\n }\n }\n if (reportContent.template.test_type == testTypes.breastOvarian19) {\n if (dates.sampleReceivedAt <= dates.bo19.version1Cutoff) {\n return 1\n } else if (dates.sampleReceivedAt <= dates.bo19.version2Cutoff) {\n return 2\n } else if (dates.sampleReceivedAt <= dates.bo19.version3Cutoff) {\n return 3\n } else if (dates.sampleReceivedAt <= dates.bo19.version4Cutoff) {\n return 4\n } else {\n return 5\n }\n } else if (reportContent.template.test_type == testTypes.hereditary30) {\n if (dates.sampleReceivedAt <= dates.h30.version1Cutoff) {\n return 1\n } else {\n return 2\n }\n } else if (reportContent.template.test_type == testTypes.wisdom9) {\n // Only 1 version of the Wisdom Test Methodology exists\n return 1\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name screeningGuidelinesContainPhenotype\n * @memberof resultFilter\n *\n * @description\n * Returns bool if reportContent.template.screening_guidelines contains a particular phenotype,\n * with strict matching on phenotype value\n */\n .filter('screeningGuidelinesContainPhenotype', function() {\n return function(guidelines, phenotype) {\n\n function containsPhenotype(phenotypeToCheck) {\n return guidelines.some(function(guideline) {\n return guideline.phenotype.indexOf(phenotypeToCheck) == 0\n })\n }\n\n if (guidelines && phenotype) {\n switch (phenotype) {\n case 'breast cancer':\n return containsPhenotype('breast cancer') ||\n containsPhenotype('breast and ovarian cancer')\n case 'ovarian cancer':\n return containsPhenotype('ovarian cancer') ||\n containsPhenotype('breast and ovarian cancer') ||\n // MLH1 guideline\n containsPhenotype('uterine and ovarian cancer') ||\n // STK11 guideline\n containsPhenotype('cervical, ovarian, and uterine cancer') ||\n // MSH6 Homozygous (CMMR-D)\n containsPhenotype('other CMMR-D associated cancers')\n case 'colorectal cancer':\n return containsPhenotype('colorectal cancer')\n case 'pancreatic cancer':\n return containsPhenotype('pancreatic cancer')\n case 'uterine cancer':\n return containsPhenotype('uterine cancer') ||\n // MLH1 guideline\n containsPhenotype('uterine and ovarian cancer') ||\n // STK11 guideline\n containsPhenotype('cervical, ovarian, and uterine cancer') ||\n // MSH6 Homozygous (CMMR-D)\n containsPhenotype('other CMMR-D associated cancers')\n case 'stomach cancer':\n return containsPhenotype('stomach cancer') ||\n // MLH1 guideline\n containsPhenotype('stomach and small bowel cancer') ||\n // CDH1 guideline: https://getcolor.atlassian.net/browse/CONSUMER-4392\n containsPhenotype('gastric cancer')\n case phenotype:\n return containsPhenotype(phenotype)\n default:\n return false\n }\n return guidelines.filter(function(g) {\n return g.phenotype.indexOf(phenotype) == 0\n }).length > 0\n } else {\n return false\n }\n }\n })\n\n .filter('risksShaper', require('./filters/risks_shaper'))\n .filter('genesWithMutationName', require('./filters/genes_with_mutation_name'))\n .filter('numericAllelicity', require('./filters/numeric_allelicity'))\n .filter('additionalFindingMutations', require('./filters/additional_finding_mutations'))\n .filter('transcriptName', require('./filters/transcript_name'))\n .filter('commonRiskAge', require('./filters/common_risk_age'))\n .filter('insertDisplayAge', require('./filters/insert_display_age'))\n .filter('hasAgeExceptionsAt', require('./filters/has_age_exceptions_at'))\n .filter('customPhenotypes', require('./filters/custom_phenotypes'))\n\n // For FH Report\n .filter('fhGuidelines', require('./filters/fh/guidelines'))\n","/**\n * @ngdoc filter\n * @name risksShaper\n *\n * @description\n * Reshapes content of reportContent.risks to best fit how the template engine wants to work.\n */\n\n\"use strict\";\n\nmodule.exports = function($filter, testTypes) {\n \"ngInject\";\n\n return function(risks, testType, mutations) {\n let modifiedRisks = angular.copy(risks);\n\n if (testType == testTypes.hereditary30) {\n // Filter out 'ovarian cancer' for H30 TP53 reports\n modifiedRisks = modifiedRisks.filter(function(risk) {\n return !(risk.gene == \"TP53\" && risk.phenotype == \"ovarian cancer\");\n });\n }\n\n // Filter mutation specific risks.\n // If mutation specific risks exists for mutations found,\n // it includes the risks. o/w exclude them.\n const geneWithNonSpecRisks = {};\n const mutationClassificationUnits = {};\n mutations.forEach(function(mutation) {\n if (\n mutation.classification == \"Pathogenic\" ||\n mutation.classification == \"Likely Pathogenic\"\n ) {\n const matchedRisks = modifiedRisks.filter(function(risk) {\n return risk.classification_unit_id == mutation.classification_unit_id;\n });\n if (mutation.classification_unit_id && matchedRisks.length) {\n mutationClassificationUnits[mutation.classification_unit_id] = true;\n } else {\n geneWithNonSpecRisks[mutation.gene] = true;\n }\n }\n });\n\n // Mutation specific risks with unknown impact.\n // We replace these risks with non-mutation specific risks.\n const unknownMutationSpecificRisks = modifiedRisks.filter(function(risk) {\n return (\n risk.data &&\n risk.data.length == 1 &&\n risk.data[0].risk == \"unknown\" &&\n risk.classification_unit_id\n );\n });\n\n modifiedRisks = modifiedRisks.filter(function(risk) {\n if (risk.classification_unit_id) {\n if (!risk.data || risk.data[0].risk != \"unknown\") {\n return mutationClassificationUnits[risk.classification_unit_id];\n }\n } else {\n // if the risk is not mutation specific, we include them if they are:\n // * baseline risk,\n // * for gene with non mutation specific risks, or\n // * for gene with mutation specific risks but known impact.\n return (\n !risk.gene ||\n geneWithNonSpecRisks[risk.gene] ||\n $filter(\"filter\")(unknownMutationSpecificRisks, {\n gene: risk.gene,\n phenotype: risk.phenotype,\n gender: risk.gender\n }).length\n );\n }\n });\n\n return modifiedRisks;\n };\n};\n","/**\n * @ngdoc filter\n * @name genesWithMutationName\n *\n * @description\n * Returns array of P/LP mutations with display names when appropriate\n */\n\n'use strict'\n\nmodule.exports = function($filter, namedMutation) {\n 'ngInject'\n\n return function(mutations) {\n mutations = $filter('pathogenicMutations')(mutations)\n if (mutations.length == 0) {\n return []\n }\n mutations = $filter('sortMutations')(mutations)\n const namedMutations = []\n angular.forEach(mutations, function(mutation) {\n let gHGVS = '';\n let mutationName = ''\n // APC I1307K\n if (mutation.gene == 'APC' && $filter('containsMutation')([mutation], namedMutation.apc_i1307k)) {\n mutationName = 'I1307K'\n gHGVS = namedMutation.apc_i1307k\n // BRCA1 R1699Q\n } else if (mutation.gene == 'BRCA1' && $filter('containsMutation')([mutation], namedMutation.brca1_r1699q)) {\n mutationName = 'R1699Q'\n gHGVS = namedMutation.brca1_r1699q\n }\n // TODO: Handle TP53 R181H when those reports are needed/content is written\n // Check for dupes prior to adding to response, necessary for compound hets\n let thisMutation = $filter('filter')(namedMutations, { name: mutation.gene, mutationName: mutationName })\n if (thisMutation.length) {\n thisMutation = thisMutation[0]\n } else {\n thisMutation = { name: mutation.gene, mutationName: mutationName, gHGVS: gHGVS }\n namedMutations.push(thisMutation)\n }\n thisMutation.isHomozygous = thisMutation.isHomozygous || $filter('isHomozygous')(mutation)\n })\n\n return namedMutations\n }\n}\n","/**\n * @ngdoc filter\n * @name numericAllelicity\n *\n * @description\n * Changes alphabetic allelicity to numeric allelicity.\n */\n\n'use strict'\n\nmodule.exports = function() {\n return function(allelicity) {\n if (allelicity == 'monoallelic') {\n return '1'\n } else if (allelicity == 'biallelic') {\n return '2'\n } else {\n throw new Error('Only monoallelic and biallelic allelicity are supported.')\n }\n }\n}\n","/**\n * @ngdoc filter\n * @name additionalFindingMutations\n *\n * @description\n * Returns mutations considered as additional finding.\n */\n\n'use strict'\n\nmodule.exports = function($filter) {\n 'ngInject'\n\n return function(mutations) {\n // We used to report somatic variants with classification so we only pick variants with empty classification\n // here for backward compatibility.\n return mutations.filter(function(m) {\n return m.variant_type == 'somatic' && !m.classification\n })\n }\n}\n","/**\n * @ngdoc filter\n * @name transcriptName\n *\n * @description\n * Returns a name of a given transcript.\n */\n\n'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n return function(transcript) {\n if (transcript == 'ENST00000304494') {\n return 'p16INK4a'\n }\n if (transcript == 'ENST00000579755') {\n return 'p14ARF'\n }\n return ''\n }\n}\n","/**\n * @ngdoc filter\n * @name commonRiskAge\n *\n * @description\n * Returns common risk age for a given report.\n */\n\n'use strict'\n\nmodule.exports = function($filter) {\n 'ngInject'\n\n const ageGenes = [\n { age: 95, geneSets: [['APC', 'TP53'], ['MUTYH', 'TP53'], ['BRIP1', 'MITF']] },\n { age: 80, geneSets: [['APC'], ['MUTYH'], ['APC', 'ATM'], ['APC', 'MITF'], ['BARD1', 'CDKN2A'], ['BARD1', 'MITF'], ['BARD1', 'MUTYH'], ['BRCA1', 'BRIP1'], ['BRCA1', 'GREM1'], ['BRCA1', 'MITF'], ['BRCA1', 'MUTYH'], ['BRCA1', 'APC'], ['BARD1', 'APC'], ['BARD1', 'BRCA1'], ['BRIP1', 'MUTYH'], ['BRCA1', 'RAD51C'], ['CDKN2A', 'CHEK2'], ['CDKN2A', 'PALB2'], ['MITF', 'MUTYH'], ['MUTYH', 'RAD51D'], ['BRCA1', 'MSH6'], ['BRCA1', 'MSH2'], ['APC', 'RAD51D'], ['APC', 'ATM'], ['APC', 'MUTYH'], ['APC', 'BRIP1'], ['BMPR1A', 'CHEK2']] },\n { age: 70, geneSets: [['STK11'], ['ATM'], ['CHEK2'], ['BARD1', 'CHEK2'], ['BRCA2', 'CDKN2A'], ['APC', 'EPCAM', 'MUTYH'], ['APC', 'ATM', 'MSH6'], ['PALB2']] } // STK11 common age is 70, but it also needs special work to bring in age 65 risks, see \"hasAgeExceptionsAt\"\n ]\n\n return function(genes, risks) {\n for (let i = 0; i < ageGenes.length; i++) {\n const config = ageGenes[i];\n const geneMatches = config.geneSets.some(function(genesToMatch) {\n return $filter('containsAll')(genes, genesToMatch) && $filter('containsAll')(genesToMatch, genes)\n })\n if (geneMatches) {\n return config.age\n }\n }\n if (genes.length > 1) {\n return 70\n } else if (risks && risks.length) {\n return $filter('orderBy')(risks[0].data, '-age')[0].age\n }\n return null\n }\n}\n","/**\n * @ngdoc filter\n * @name insertDisplayAge\n *\n * @description\n * Returns inserts displayAge and age exceptions if necessary (STK11 is only use case right now)\n */\n\n'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n // STK11-specific age exceptions\n const stk11Age65Exceptions = ['cervical cancer', 'ovarian cancer', 'small bowel cancer', 'stomach cancer', 'testicular cancer', 'uterine cancer']\n\n return function(risks, commonRiskAge, render_version) {\n angular.forEach(risks, function(risk) {\n if (risk.gene == 'STK11' && stk11Age65Exceptions.indexOf(risk.phenotype) > -1) {\n risk.displayAge = 65\n risk.isAgeException = true\n } else if (risk.gene == 'BARD1') {\n // RV < 5: This is errant logic only applicable to RV 1-4\n // Specifically to handle RV1-4 BARD1 + CHEK2: BARD1 only had age 80 risks at the time\n if (render_version >= 5) {\n risk.displayAge = commonRiskAge\n } else {\n risk.displayAge = 80\n }\n } else {\n risk.displayAge = commonRiskAge\n }\n })\n return risks\n }\n}\n","/**\n * @ngdoc filter\n * @name hasAgeExceptionsAt\n *\n * @description\n * Returns the age that this set of risks has age exceptions at, assumes only a single age exists\n * Only use case is STK11 @ age 65\n */\n\n'use strict'\n\nmodule.exports = function($filter) {\n 'ngInject'\n\n return function(risks) {\n if (!angular.isArray(risks)) {\n risks = [risks]\n }\n const ageExceptions = $filter('filter')(risks, { isAgeException: true })\n if (ageExceptions.length) {\n return ageExceptions[0].displayAge\n } else {\n return false\n }\n }\n}\n","/**\n * @ngdoc filter\n * @name customPhenotypes\n *\n * @description\n * Returns custom phenotypes for a given gene and report types.\n * This is written so that this customization logic lives in one place.\n * TODO: This requires better design/logic so that we don't even need\n * to do the case by case customization.\n */\n\n'use strict'\n\nmodule.exports = function($filter, namedMutation, testTypes) {\n 'ngInject'\n\n return function(reportContent, gene, tier) {\n const gender = reportContent.gender\n let primary\n let secondary\n if (gene == 'CHEK2' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BRCA1', 'CHEK2'])) {\n if (gender == 'M' && reportContent.template.test_type == testTypes.breastOvarian19) {\n primary = []\n secondary = ['colorectal cancer', 'prostate cancer']\n }\n } else if (gene == 'CHEK2' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['CHEK2', 'MSH2'])) {\n if (gender == 'M') {\n primary = ['prostate cancer']\n secondary = ['colorectal cancer']\n }\n } else if (gene == 'CHEK2' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['CHEK2', 'MITF'])) {\n if (gender == 'M') {\n primary = ['prostate cancer']\n secondary = ['colorectal cancer']\n }\n } else if (gene == 'CHEK2' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BRCA2', 'CHEK2', 'MUTYH'])) {\n if (gender == 'F') {\n primary = []\n secondary = ['breast cancer', 'colorectal cancer']\n }\n } else if (gene == 'RAD51C' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BRCA1', 'RAD51C'])) {\n if (gender == 'F') {\n primary = []\n secondary = ['ovarian cancer']\n }\n } else if (gene == 'ATM' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['ATM', 'BRIP1']) && reportContent.template.test_type == testTypes.breastOvarian19) {\n // CONSUMER-6244: \"ovarian cancer\" is in risks as \"not elevated\" but appears as a primary unless manually removed\n if (gender == 'F') {\n primary = ['breast cancer']\n secondary = ['pancreatic cancer']\n }\n } else if (gene == 'ATM' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['ATM', 'BRCA1'])) {\n if (gender == 'M') {\n if (reportContent.template.test_type == testTypes.breastOvarian19) {\n primary = []\n secondary = ['pancreatic cancer']\n } else {\n primary = ['pancreatic cancer']\n secondary = ['prostate cancer']\n }\n }\n } else if (gene == 'ATM' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['ATM', 'PALB2'])) {\n if (gender == 'F') {\n primary = []\n secondary = ['breast cancer', 'pancreatic cancer']\n }\n } else if (gene == 'ATM' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['ATM', 'CHEK2'])) {\n if (gender == 'F') {\n primary = []\n secondary = ['breast cancer', 'pancreatic cancer']\n }\n } else if (gene == 'CHEK2' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BRCA2', 'CHEK2', 'APC'])) {\n if (gender == 'F') {\n primary = []\n secondary = ['breast cancer', 'colorectal cancer']\n }\n } else if (gene == 'PALB2' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BRCA2', 'PALB2'])) {\n primary = []\n if (gender == 'F') {\n secondary = ['breast cancer', 'ovarian cancer', 'pancreatic cancer']\n } else {\n secondary = ['male breast cancer', 'pancreatic cancer']\n }\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'BARD1']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n if (gender == 'F') {\n primary = []\n secondary = ['colorectal cancer']\n }\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['ATM', 'APC']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'CHEK2']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n if (gender == 'F') {\n primary = []\n secondary = ['colorectal cancer']\n }\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['MITF', 'APC']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'MSH2']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n if (gender == 'F') {\n primary = []\n secondary = ['colorectal cancer']\n }\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'MSH6']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n if (gender == 'F') {\n primary = []\n secondary = ['colorectal cancer']\n }\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'MUTYH']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k) && reportContent.render_version >= 10) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'MUTYH' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'MUTYH']) && !$filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'MUTYH' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'EPCAM', 'MUTYH']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'EPCAM' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'EPCAM', 'MUTYH']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n primary = ['ovarian cancer', 'colorectal cancer', 'uterine cancer']\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'BRCA2']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'PMS2']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n if (gender == 'F') {\n primary = []\n secondary = ['colorectal cancer']\n }\n } else if (gene == 'APC' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['APC', 'TP53']) && $filter('containsMutation')(reportContent.mutations, namedMutation.apc_i1307k)) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'BARD1' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BARD1', 'CHEK2'])) {\n if (gender == 'F') {\n primary = []\n secondary = ['breast cancer']\n }\n } else if (gene == 'BARD1' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BARD1', 'BRCA1'])) {\n if (gender == 'F') {\n primary = []\n secondary = ['breast cancer']\n }\n } else if (gene == 'MUTYH' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BRCA2', 'MUTYH'])) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'MUTYH' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['MSH6', 'MUTYH'])) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'MSH6' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['MSH6']) && reportContent.allelicity_by_gene['MSH6'] == 'biallelic' && reportContent.mutations.length == 1 && reportContent.mutations[0].zygosity == 'Homozygous') {\n // MSH6 Homozygous does not show any risks in the chart section or other cancers section\n primary = []\n secondary = []\n } else if (gene == 'MUTYH' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BRCA1', 'MUTYH']) && reportContent.allelicity_by_gene['MUTYH'] != 'biallelic') {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'MUTYH' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['CHEK2', 'MUTYH'])) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'MUTYH' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['MLH1', 'MUTYH'])) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'MUTYH' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['MSH2', 'MUTYH'])) {\n if (reportContent.allelicity_by_gene['MUTYH'] == 'biallelic') {\n primary = ['colorectal cancer']\n secondary = ['small bowel (duodenal) cancer']\n } else {\n primary = []\n secondary = ['colorectal cancer']\n }\n } else if (gene == 'MUTYH' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['PMS2', 'MUTYH'])) {\n primary = []\n secondary = ['colorectal cancer']\n } else if (gene == 'CHEK2' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BRCA2', 'CHEK2'])) {\n if (gender == 'M') {\n primary = []\n secondary = ['colorectal cancer', 'prostate cancer']\n }\n } else if (gene == 'CHEK2' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['BMPR1A', 'CHEK2'])) {\n if (gender == 'M') {\n primary = ['prostate cancer']\n secondary = ['colorectal cancer']\n }\n } else if (gene == 'STK11' && $filter('containsAll')(reportContent.genes_with_pathogenic_mutations, ['STK11']) && reportContent.template.test_type == testTypes.breastOvarian19) {\n if (gender == 'F') {\n primary = ['breast cancer', 'colorectal cancer', 'stomach cancer']\n secondary = ['cervical cancer', 'lung cancer', 'ovarian cancer', 'pancreatic cancer', 'small bowel cancer', 'uterine cancer']\n }\n }\n\n if (tier == 'primary' && angular.isDefined(primary)) {\n return primary\n }\n if (tier == 'secondary' && angular.isDefined(secondary)) {\n return secondary\n }\n return undefined\n }\n\n}\n","'use strict'\n\nmodule.exports = function($filter) {\n 'ngInject'\n\n return function(reportContent) {\n const guidelines = []\n if (reportContent.is_negative) {\n guidelines.push({\n phenotype: 'FH_REPORT.GUIDELINES.NEGATIVE.CORONARY.PHENOTYPE',\n content: 'FH_REPORT.GUIDELINES.NEGATIVE.CORONARY.' + reportContent.gender + '_CONTENT',\n references: reportContent.gender == 'F' ? [281, 285] : [281]\n })\n guidelines.push({\n phenotype: 'FH_REPORT.GUIDELINES.NEGATIVE.GENERAL.PHENOTYPE',\n content: 'FH_REPORT.GUIDELINES.NEGATIVE.GENERAL.CONTENT',\n references: [282]\n })\n } else if (reportContent.is_positive) {\n const genes = reportContent.genes_with_pathogenic_mutations\n const allelicities = reportContent.allelicity_by_gene\n // At least one gene with biallelic\n if (genes.some(function(gene) { return allelicities[gene] == '2' })) {\n guidelines.push({\n phenotype: 'FH_REPORT.GUIDELINES.POSITIVE_BIALLELIC.CORONARY.PHENOTYPE',\n content: 'FH_REPORT.GUIDELINES.POSITIVE_BIALLELIC.CORONARY.CONTENT',\n references: [291],\n })\n // At least one gene with unkonwn phase\n } else if (genes.some(function(gene) { return !allelicities[gene] })) {\n guidelines.push({\n phenotype: 'FH_REPORT.GUIDELINES.POSITIVE_MONOALLELIC.CORONARY.PHENOTYPE',\n phenotype_sub: 'FH_REPORT.GUIDELINES.POSITIVE_MONOALLELIC.CORONARY.PHENOTYPE_SUB',\n content: 'FH_REPORT.GUIDELINES.POSITIVE_MONOALLELIC.CORONARY.CONTENT',\n references: [287, 288, 285]\n })\n guidelines.push({\n phenotype: 'FH_REPORT.GUIDELINES.POSITIVE_BIALLELIC.CORONARY.PHENOTYPE',\n phenotype_sub: 'FH_REPORT.GUIDELINES.POSITIVE_BIALLELIC.CORONARY.PHENOTYPE_SUB',\n content: 'FH_REPORT.GUIDELINES.POSITIVE_BIALLELIC.CORONARY.CONTENT',\n references: [291],\n })\n // Monoallelic only\n } else {\n guidelines.push({\n phenotype: 'FH_REPORT.GUIDELINES.POSITIVE_MONOALLELIC.CORONARY.PHENOTYPE',\n content: 'FH_REPORT.GUIDELINES.POSITIVE_MONOALLELIC.CORONARY.CONTENT',\n references: [287, 288, 285]\n })\n }\n\n guidelines.push({\n phenotype: 'FH_REPORT.GUIDELINES.POSITIVE.GENERAL.PHENOTYPE',\n content: 'FH_REPORT.GUIDELINES.POSITIVE.GENERAL.CONTENT',\n references: [282]\n })\n }\n return guidelines\n }\n}\n","function TransitionReportController($scope, $modalInstance, $q, $http, ngToast, auth, Report, reports, action) {\n 'ngInject'\n\n $scope.releasing = false\n $scope.auth = auth\n $scope.reports = reports\n $scope.action = action\n\n $scope.release = function(reports) {\n $scope.releasing = true\n\n const deferredReports = reports.map(function(report) {\n report[action] = true\n return new Report(report).$save()\n })\n\n $q.all(deferredReports)\n .then(function() {\n return $modalInstance.close()\n })\n .finally(function(res) {\n $scope.releasing = false\n })\n }\n}\n\nfunction ReleaseReportToPhysicianController($scope, $modalInstance, $q, $http, auth, Report, reportsToSignOut, reportsToApprove) {\n 'ngInject'\n\n const actions = []\n if (reportsToSignOut.length > 0) {\n actions.push(\"Sign Out\")\n }\n if (reportsToApprove.length > 0) {\n actions.push(\"Approve for Sign-Out\")\n }\n $scope.actionText = actions.join(\"/\")\n\n $scope.releasing = false\n $scope.auth = auth\n $scope.reportsToSignOut = reportsToSignOut\n $scope.reportsToApprove = reportsToApprove\n\n $scope.release = (reportsToSignOut, reportsToApprove) => {\n $scope.releasing = true\n\n const deferredReports = reportsToSignOut.map((report) => {\n return $http.put(`api/v1/reports/${report.id}/sign_out`)\n })\n deferredReports.concat(reportsToApprove.map((report) => {\n report['approved_for_sign_out'] = true\n return new Report(report).$save()\n }))\n\n $q.all(deferredReports)\n .then(() => {\n return $modalInstance.close()\n })\n .finally((res) => {\n $scope.releasing = false\n })\n }\n}\n\n/**\n * @ngdoc module\n * @name resultModal\n *\n * @description\n * The `resultModal` provides result modals.\n */\nmodule.exports = angular.module('resultModal', ['ngToast', 'resultResource'])\n /**\n * @ngdoc service\n * @name changeReportStateModal\n * @memberof resultModal\n *\n * @description\n * A modal for changing report state.\n */\n .factory('changeReportStateModal', function($modal) {\n function ChangeReportStateModal($scope, $modalInstance, report, state, title, buttonText, placeholder) {\n 'ngInject'\n $scope.requesting = false\n $scope.report = report\n $scope.title = title\n $scope.buttonText = buttonText\n $scope.placeholder = placeholder\n\n $scope.request = function(report) {\n $scope.requesting = true\n\n report[state] = true\n\n report.$save()\n .then(function() {\n return $modalInstance.close()\n })\n .finally(function(res) {\n $scope.requesting = false\n })\n }\n }\n return {\n open: function(report, state, title, buttonText, placeholder) {\n return $modal.open({\n templateUrl: '/results/request_genetics_board_review_modal.html',\n controller: ChangeReportStateModal,\n size: 'lg',\n resolve: {\n report: function() {\n return report\n },\n state: function() {\n return state\n },\n title: function() {\n return title\n },\n buttonText: function() {\n return buttonText\n },\n placeholder: function() {\n return placeholder\n }\n }\n })\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name releaseToPathologistModal\n * @memberof resultModal\n *\n * @description\n * A modal for releasing reports to pathologist.\n */\n .factory('releaseToPathologistModal', function($modal) {\n\n return {\n open: function(reports) {\n return $modal.open({\n templateUrl: '/results/release_to_pathologist_modal.html',\n controller: TransitionReportController,\n size: 'lg',\n resolve: {\n reports: function() {\n return reports\n },\n action: function() {\n return 'content_reviewed'\n }\n }\n })\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name releaseToPhysicianModal\n * @memberof resultModal\n *\n * @description\n * A modal for releasing reports to signing physician.\n */\n .factory('releaseToPhysicianModal', function($modal) {\n return {\n open: function(reportsToSignOut, reportsToApprove) {\n return $modal.open({\n templateUrl: '/results/release_to_physician_modal.html',\n controller: ReleaseReportToPhysicianController,\n size: 'lg',\n resolve: {\n reportsToSignOut: function() {\n return reportsToSignOut\n },\n // Pathologists that can't sign out a report can still approve it for someone else to sign out\n reportsToApprove: function() {\n return reportsToApprove\n }\n }\n })\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name approveReleaseModal\n * @memberof resultModal\n *\n * @description\n * A modal for releasing reports to customer.\n */\n .factory('approveReleaseModal', function($modal) {\n return {\n open: function(reports) {\n return $modal.open({\n templateUrl: '/results/approve_release_modal.html',\n controller: TransitionReportController,\n size: 'lg',\n resolve: {\n reports: function() {\n return reports\n },\n action: function() {\n return 'release_approved'\n }\n }\n })\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name setReportContentTemplateModal\n * @memberof resultModal\n *\n * @description\n * A modal for creating new report templates.\n */\n .factory('setReportContentTemplateModal', function($modal) {\n return {\n open: function(templates) {\n return $modal.open({\n templateUrl: '/results/create_report_template_modal.html',\n controller: function($scope, $modalInstance, templates) {\n $scope.templates = templates\n\n $scope.continue = function(templateToCopy) {\n return $modalInstance.close(templateToCopy)\n }\n },\n size: 'md',\n resolve: {\n templates: function() {\n return templates\n }\n }\n })\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name addReportReviewNoteModal\n * @memberof resultModal\n *\n * @description\n * A modal for adding report review note.\n */\n .factory('addReportReviewNoteModal', function($modal) {\n return {\n open: function(report) {\n return $modal.open({\n templateUrl: '/results/add_note_modal.html',\n controller: function($scope, $modalInstance, report) {\n\n $scope.report = report\n\n $scope.addNote = function(report) {\n $scope.adding = true\n report.$save()\n .then(function() {\n return $modalInstance.close()\n })\n ['finally'](function() {\n $scope.adding = false\n })\n }\n },\n size: 'lg',\n resolve: {\n report: function() {\n return report\n }\n }\n })\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name saveReferenceModal\n * @memberof resultModal\n *\n * @description\n * A modal for saving a reference.\n */\n .factory('saveReferenceModal', function($modal) {\n return {\n open: function(reference) {\n return $modal.open({\n templateUrl: '/results/save_reference_modal.html',\n controller: function($scope, $modalInstance, reference, Reference) {\n\n $scope.reference = new Reference(reference)\n\n $scope.saveReference = function(reference) {\n $scope.saving = true\n reference.$save()\n .then(function() {\n return $modalInstance.close(reference)\n })\n ['finally'](function() {\n $scope.saving = false\n })\n }\n },\n size: 'md',\n resolve: {\n reference: function() {\n return reference\n }\n }\n })\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name retryFaxModal\n * @memberof resultModal\n *\n * @description\n * A modal for retrying fax.\n */\n .factory('retryFaxModal', function($modal) {\n return {\n open: function(fax) {\n return $modal.open({\n templateUrl: '/results/_modal-retry_fax.html',\n controller: function($scope, $modalInstance, $http, fax) {\n\n $scope.fax = fax\n\n $scope.request = function(fax) {\n $scope.requesting = true\n $http.post('/api/v1/retry_fax', { fax_log: fax.id })\n .then(function() {\n return $modalInstance.close()\n })\n .finally(function() {\n $scope.requesting = false\n })\n }\n },\n size: 'sm',\n resolve: {\n fax: function() {\n return fax\n }\n }\n })\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name rereleaseModal\n * @memberof resultModal\n */\n .factory('rereleaseModal', function($modal) {\n return {\n open: function(reportId, isRetraction = false) {\n return $modal.open({\n templateUrl: '/results/_modal-rerelease.html',\n controller: function RereleaseModal($scope, $modalInstance, $location, $http, ngToast, reportId) {\n $scope.isRetraction = isRetraction\n $scope.revisionTypes = []\n $http.get('/api/v1/revision_types?ordering=-updated_at&is_active=True&page_size=500')\n .then(function(res) {\n $scope.revisionTypes = res.data.results.map(function(rt) {\n return { label: '[ID ' + rt.id + '] ' + rt.reason, value: rt }\n })\n })\n $scope.rerelease = function(revisionType) {\n $scope.requesting = true\n $http.put('/api/v1/reports/' + reportId + '/queue_for_rerelease', { revision_type: revisionType.id, is_retraction: isRetraction })\n .then(function(res) {\n ngToast.create(\"Queued for rerelease.\")\n $location.path('/reports/' + res.data.revised_report)\n return $modalInstance.close()\n })\n .finally(function() {\n $scope.requesting = false\n })\n }\n },\n size: 'lg',\n resolve: {\n reportId: function() {\n return reportId\n },\n isRetraction: function() {\n return isRetraction\n }\n }\n })\n }\n }\n })\n\n .factory('reviewKnownVariantModal', function($modal) {\n return {\n open: (reportedVariantId) => {\n return $modal.open({\n templateUrl: '/results/_modal-review-known-variant.html',\n controller: function ReviewKnownVariantModal($scope, $modalInstance, $http, ngToast, reportedVariantId) {\n $scope.resolved = true\n\n $scope.submit = () => {\n $scope.submitting = true\n let url;\n let data\n if ($scope.resolved) {\n url = `/api/v1/reported_variants/${reportedVariantId}/resolve`\n data = {\n variant_classification_id: $scope.variantClassificationId,\n notes: $scope.resolveNotes\n }\n } else {\n url = `/api/v1/reported_variants/${reportedVariantId}/unresolvable`\n data = { notes: $scope.unresolvableNotes }\n }\n $http.put(url, data)\n .then((response) => {\n ngToast.create(\"Known variant reviewed.\")\n return $modalInstance.close()\n })\n .finally(() => $scope.submitting = false)\n }\n },\n resolve: {\n reportedVariantId: () => reportedVariantId\n }\n })\n }\n }\n })\n\n .factory('confirmTrueNegativeModal', function($modal) {\n return {\n open: (reportedVariantId) => {\n return $modal.open({\n templateUrl: '/results/_modal-confirm-true-negative.html',\n controller: function ConfirmTrueNegativeModal($scope, $modalInstance, $http, ngToast, reportedVariantId) {\n $scope.submit = () => {\n $scope.submitting = true\n $http.put(`/api/v1/reported_variants/${reportedVariantId}/confirm_true_negative`)\n .then((response) => {\n ngToast.create(\"True negative confirmed.\")\n return $modalInstance.close()\n })\n .finally(() => $scope.submitting = false)\n }\n },\n resolve: {\n reportedVariantId: () => reportedVariantId\n }\n })\n }\n }\n })\n\n .factory('PgxTutorial', function(multiPageModal) {\n 'ngInject'\n return {\n showTutorial: function() {\n multiPageModal.open(\n [\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.TITLE1\",\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.TITLE2\",\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.TITLE3\",\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.TITLE4\",\n ],\n [\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.TEXT1\",\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.TEXT2\",\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.TEXT3\",\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.TEXT4\",\n ],\n [\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.CONTINUE\",\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.CONTINUE\",\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.CONTINUE\",\n \"ACTIVATE.TEST_INFO.MEDICATION_MODAL.FINISH\",\n ],\n [\n \"img--benefits_and_limitations_results\",\n \"img--benefits_and_limitations_genes\",\n \"img--benefits_and_limitations_other_factors_pgx\",\n \"img--benefits_and_limitations_provider\",\n ]\n )\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name confirmPgxModal\n * @memberof resultModal\n *\n * @description\n * A modal for ensuring customers know to not change medications based on pgx report results.\n */\n .factory('confirmPgxModal', function($modal) {\n return {\n open: function(goToReport) {\n return $modal.open({\n templateUrl: '/results/_modal_confirm_pgx.html',\n controller: function confirmPgxModalController($scope) {\n $scope.submit = () => {\n goToReport()\n }\n },\n size: 'sm',\n resolve: {}\n })\n }\n }\n })\n","/**\n * @prettier\n */\n\nconst processAriaLabel = label => {\n return label\n .trim()\n .replace(/_/g, ' ')\n .replace(/([A-Z])/g, ' $1') // replace camelcase with spaces\n .replace(/\\s\\s+/g, ' '); // replace all whitespace with a single space\n};\n\nmodule.exports = angular\n .module('clrA11y', [])\n\n .factory('a11y', $timeout => {\n 'ngInject';\n const labelImages = () => {\n $timeout(() => {\n angular.element(\"*[class^='img']\").each(index => {\n const element = angular.element(\"*[class^='img']\")[index];\n const style = getComputedStyle(element);\n const label = style.getPropertyValue('--aria-label');\n if (label) {\n // process the label so it's more human readable\n const altText = processAriaLabel(label);\n angular.element(element).attr('aria-label', altText);\n angular.element(element).attr('role', 'img');\n angular.element(element).attr('alt', altText);\n }\n });\n });\n };\n return {\n labelImages: labelImages,\n };\n });\n","module.exports = angular\n .module(\"users\", [\n require(\"src/django_apps/users/js/auth\").name,\n require(\"src/django_apps/users/js/controllers\").name,\n require(\"src/django_apps/users/js/directives\").name,\n require(\"src/django_apps/users/js/filters\").name,\n require(\"src/django_apps/users/js/resource\").name,\n require(\"src/django_apps/users/js/services\").name\n ])\n .config(colorRouteProvider => {\n // Accounts\n colorRouteProvider\n .when(\"/email_confirmation_invalid\", {\n redirectTo: \"/email-confirmation-invalid\"\n })\n .when(\"/email-confirmation-invalid\", {\n templateUrl: \"/users/email_confirmation_invalid.html\",\n seo: {\n title: \"Verify Your Email Address - Color\",\n description: \"\"\n },\n controller: \"ResendEmailConfirmationEmailController\",\n auth: {\n requireEmailConfirmation: false,\n redirectEmailConfirmed: true\n },\n navigation: {\n blue: true,\n showLeft: false\n }\n });\n });\n","/**\n * @class AuthRouteFilter\n *\n * @description\n * Routes users depending on their authentication/authorization status.\n *\n * @param {Object} $location - A location service.\n * @param {Object} auth - An authentication service.\n * @param {string} defaultLoginPath - A path to a login page.\n * @param {string} loggedInHomePath - A path to a home page for logged in user.\n * @param {string} emailConfirmationRequiredPath\n * A path to a page for notifying user that they need to confirm their email.\n * @param {string/function} permissionDeniedPath\n * If string, it is a path to a page for notifying user that they are not authorized to access.\n * If function, it returns a path given auth object.\n * @param {string} sexSelectorPath\n * A path to a page for selecting user sex.\n * @param {string} benefitsRoutingAuthorizationPath\n * A path to a page for consenting to Employer benefits routing.\n * @param {string} healthHistoryIncompletePath\n * A path to a page that user gets redirected to\n * if health history is not complete and is required.\n * @param {string} providerLoggedInHomePath - A path to a home page for logged in providers.\n *\n * @returns {boolean} true if redirected; otherwise false.\n */\nfunction AuthRouteFilter($window, $location, auth, redirect, associatedSample, textModal,\n defaultLoginPath, loggedInHomePath,\n emailConfirmationRequiredPath, permissionDeniedPath,\n sexSelectorPath, healthHistoryIncompletePath,\n providerLoggedInHomePath, benefitsRoutingAuthorizationPath, permissionTypes, hasCompletedRoutingAuthorization) {\n function _redirect(path) {\n let next = path\n if (angular.isFunction(path)) {\n next = path(auth)\n }\n $location.path(next)\n $location.replace()\n }\n\n /**\n * @method apply\n * @memberof AuthRouteFilter#\n *\n * @description\n * Applies an auth route filter. The default configuration is as follow:\n * ```js\n * {\n * // Redirects to loginPath if user is not logged in.\n * // Otherwise, redirects to loggedInHomePath.\n * requireLogin: true\n * // Redirects to loggedInHomePath if user is logged in.\n * , requireAnonymous: false\n * // Redirects to emailConfirmationRequiredPath if user has confirmed email.\n * , requireEmailConfirmation: requireLogin\n * // Redirects to loggedInHomePath if user has confirmed email.\n * , redirectEmailConfirmed: requireLogin\n * // Redirects to sexSelectorPath if user has no sex selected.\n * , requireSex: false\n * // Redirects to healthHistoryIncompletePath if user has not completed\n * // health history.\n * , requireBenefitsRoutingAuthorization: false\n // Redirects to routingConsentPath if user has not provided consent\n // for routing.\n * , requireHealthHistoryCompleted: false\n * // Redirects to permissionDeniedPath if user is not sample reviewer.\n * , requireSampleReviewer: false\n * // Redirects to permissionDeniedPath if user is not variant reviewer.\n * , requireVariantReviewer: false\n * // Redirects to permissionDeniedPath if user is not variant reviewer manager.\n * , requireVariantReviewerManager: false\n * // Redirects to permissionDeniedPath if user is not ordering physician.\n * , requireOrderingPhysician: false\n * // Redirects to permissionDeniedPath if user is not genetic counselor.\n * , requireGeneticCounselor: false\n * // Redirects to permissionDeniedPath if user is not pathologist.\n * , requirePathologist: false\n * // Redirects to permissionDeniedPath if user is not genetics board member.\n * , requireLabStaff: false\n * // Redirects to permissionDeniedPath if user is not part of the lab staff.\n * , requireLabStaff: false\n * // Redirects to permissionDeniedPath if user is not color employee\n * , requireColorEmployee: false\n * // Redirects to permissionDeniedPath if user is not support staff.\n * , requireSupportStaff: false\n * // Redirects to permissionDeniedPath if user is not a provider.\n * , requireProvider: false\n * // Redirects to permissionDeniedPath if user is not support admin.\n * , requireSupportAdmin: false\n * // Redirects to loggedInHomePath if there is no associated sample.\n * , requireExternalClassificationReviewer: false\n * // Redirects to permissionDeniedPath if user is not external classification reviewer.\n * , requireAssociatedSample: false\n * }\n * ```\n *\n * @param {Object} config\n * @param {string} currentPath\n * Apparently unused, intended as current path used to set `next` query param in case of redirect.\n */\n this.apply = function(config, currentPath) {\n const defaults = {\n requireLogin: true,\n loginPath: defaultLoginPath,\n requireAnonymous: false,\n requireEmailConfirmation: void 0,\n redirectEmailConfirmed: false,\n requireSex: false,\n requireBenefitsRoutingAuthorization: false,\n requireHealthHistoryCompleted: false,\n requireSampleReviewer: false,\n requireVariantReviewer: false,\n requireVariantReviewerManager: false,\n requireOrderingPhysician: false,\n requireGeneticCounselor: false,\n requirePathologist: false,\n requireGeneticsBoardMember: false,\n requireLabStaff: false,\n requireColorEmployee: false,\n requireSupportStaff: false,\n requireProvider: false,\n requireSupportAdmin: false,\n requireExternalClassificationReviewer: false,\n requireAssociatedSample: false,\n requiredPermissions: []\n }\n\n config = config == void 0 ? {} : config\n\n config = angular.extend({}, defaults, config)\n\n if (angular.isUndefined(config.requireEmailConfirmation)) {\n config.requireEmailConfirmation = config.requireLogin\n }\n\n // Marks this session as ads traffic.\n if (config.isAds) {\n auth.isAds = true\n }\n\n // User is authorized if any of the following is satisfied.\n const authorizations = {\n requireSampleReviewer: 'is_sample_reviewer',\n requireVariantReviewer: 'is_variant_reviewer',\n requireVariantReviewerManager: 'is_variant_reviewer_manager',\n requireOrderingPhysician: 'is_ordering_physician',\n requireGeneticCounselor: 'is_genetic_counselor',\n requirePathologist: 'is_pathologist',\n requireGeneticsBoardMember: 'is_genetics_board_member',\n requireLabStaff: 'is_lab_staff',\n requireColorEmployee: 'is_color_employee',\n requireSupportStaff: 'is_support_staff',\n requireProvider: 'is_provider',\n requireSupportAdmin: 'is_support_admin',\n requireExternalClassificationReviewer: 'is_external_classification_reviewer'\n }\n\n const showProviderView = auth.currentUser.is_provider;\n if (config.requireLogin && !auth.isLoggedIn) {\n $window.$('.body-wrapper, .footer').addClass('u--force-hide')\n let loginPath = config.loginPath;\n currentPath = $location.path() + $window.location.search\n if (currentPath != loginPath && $window.location.pathname != loginPath) {\n loginPath += '?next=' + encodeURIComponent(currentPath)\n }\n $window.location.href = loginPath\n return true\n } else if (config.requireAnonymous && auth.isLoggedIn) {\n if (config.showLogoutModal) {\n const title = \"Do you want to sign out?\";\n const text = \"You are currently signed in as \" + auth.currentUser.first_name + \" \" + auth.currentUser.last_name + \". Would you like to sign out of this account?\";\n const buttonText = \"Sign Out\";\n const cancelButtonText = \"Return to Account\"\n textModal.open(title, text, buttonText, \"\", false, cancelButtonText).result\n .then(function() {\n auth.logout()\n .then(function() {\n $window.location.reload()\n })\n })\n .catch(function() {\n redirect(showProviderView ? providerLoggedInHomePath : loggedInHomePath)\n $location.replace()\n })\n return true\n } else {\n redirect(showProviderView ? providerLoggedInHomePath : loggedInHomePath)\n $location.replace()\n return true\n }\n } else if (config.requireLogin && auth.isLoggedIn && !showProviderView && auth.currentUser.hasOnlyCovidTests() && auth.currentUser.is_proxy) {\n // Proxy users are not full users and thus cannot activate a genetics test or use other Angular routes.\n // Just bring them back to their dashboard.\n // Full COVID users, on the other hand *can* use genetics and redirecting them back to the React portal is not desired\n redirect('/react/covid-test');\n return true;\n } else if (config.redirectEmailConfirmed && auth.isLoggedIn && auth.currentUser.is_email_confirmed) {\n redirect(showProviderView ? providerLoggedInHomePath : loggedInHomePath)\n $location.replace()\n return true\n } else if (config.requireBenefitsRoutingAuthorization && auth.isLoggedIn && auth.currentUser.routing_organization && !hasCompletedRoutingAuthorization(auth.currentUser)) {\n const oldPath = $location.path()\n _redirect(benefitsRoutingAuthorizationPath)\n $location.search('next', oldPath)\n return true\n } else if (config.requireSex && auth.isLoggedIn && !auth.currentUser.gender) {\n $window.location.href = sexSelectorPath;\n return true\n } else if (config.requireHealthHistoryCompleted && auth.isLoggedIn && !auth.currentUser.has_health_history_completed) {\n _redirect(healthHistoryIncompletePath)\n return true\n } else if (config.requireAssociatedSample && associatedSample && !associatedSample.get()) {\n _redirect(loggedInHomePath)\n return true\n } else {\n if (config.requireEmailConfirmation && !auth.currentUser.is_email_confirmed) {\n _redirect(emailConfirmationRequiredPath)\n return true\n } else {\n let authorized = undefined\n for (const key in authorizations) {\n const value = authorizations[key]\n if (config[key]) {\n if (angular.isUndefined(authorized)) {\n authorized = false\n }\n authorized = authorized || auth.currentUser[value]\n }\n }\n if (config.requiredPermissions.length > 0) {\n authorized = authorized || auth.currentUser.hasAllPermissions(config.requiredPermissions)\n }\n if (!angular.isUndefined(authorized) && !authorized) {\n _redirect(permissionDeniedPath)\n return true\n }\n }\n }\n return false\n }\n}\n\n/**\n * @class Auth\n *\n * @description\n * Provides user authentication service.\n *\n * @param {Object} resolvedPromise\n * @param {Object} $http - A http service.\n * @param {fn} $timeout - Angular's wrapper for window.setTimeout\n * @param {authService} authService - authService from http-auth-interceptor\n * @param {Account} Account - A Account resource class.\n * @param {string} sessionAPIEndPoint - An end point for session.\n */\nfunction Auth(resolvedPromise, $rootScope, $http, $window, authService, Account, sessionAPIEndPoint, skipAuthSync) {\n /**\n * @member {boolean} isLoggedIn - Indicates if user is logged in.\n * @memberof Auth#\n */\n this.isLoggedIn = void 0\n /**\n * @member {boolean} isSynced\n * Indicates if session and account are synced with server.\n * @default false\n * @memberof Auth#\n */\n this.isSynced = false\n /**\n * @member {Object} currentUser - An instance of `Account` resource.\n * @memberof Auth#\n */\n this.currentUser = new Account()\n /**\n * @member {boolean} hasSkippedSync\n * Indicates if we skipped sync at bootstrap.\n * @default false\n * @memberof Auth#\n */\n this.hasSkippedSync = false\n /**\n * @member {boolean} isAds\n * Indicates if this session visited ads landing page.\n * @default false\n * @memberof Auth#\n */\n this.isAds = false\n\n /**\n * @method sync\n * @memberof Auth#\n *\n * @description\n * Syncs session and account with server if it has not synced yet.\n *\n * @param {boolean} [force] - Forces sync if this value is true.\n */\n this.sync = function(force) {\n if (this.isSynced) {\n if (!force) {\n return resolvedPromise(this)\n }\n } else if (this.currentSync) {\n return this.currentSync\n } else if (skipAuthSync && !this.hasSkippedSync) {\n // If user is known to not authenticated at the load time,\n // we want to skip trying to authenticate the user to\n // avoid redundant round trip with our server.\n this.isLoggedIn = false\n this.currentUser = new Account()\n this.isSynced = true\n this.hasSkippedSync = true\n $rootScope.$broadcast('auth:synced', this.currentUser.id)\n return resolvedPromise(this)\n }\n\n this.currentSync = $http.get(sessionAPIEndPoint, { ignoreAuthModule: true })\n .then(angular.bind(this, function() {\n this.isLoggedIn = true\n return this.currentUser.$get()\n }))\n .catch(angular.bind(this, function(res) {\n this.isLoggedIn = false\n this.currentUser = new Account()\n return res\n }))\n .finally(angular.bind(this, function() {\n $rootScope.$broadcast('auth:synced', this.currentUser.id)\n this.isSynced = true\n this.currentSync = null\n return this\n }))\n\n return this.currentSync\n }\n\n /**\n * @method login\n * @memberof Auth#\n *\n * @description\n * Logs user in.\n *\n * @param {string} email\n * @param {string} password\n */\n this.login = function(email, password) {\n const params = {\n email: email,\n password: password,\n format: 'json'\n };\n return $http.post(sessionAPIEndPoint, params, { ignoreAuthModule: true })\n .then(angular.bind(this, function(res) {\n if (res.data && res.data.redirectUri) {\n // In order to log in, redirect the user to use MFA\n $window.location.assign(res.data.redirectUri);\n throw new Error('Redirected user to log in with MFA');\n }\n this.isLoggedIn = true;\n authService.loginConfirmed();\n return this.currentUser.$get();\n }))\n .then(angular.bind(this, function(res) {\n $rootScope.$broadcast('auth:loggedIn', this.currentUser.id);\n return res;\n }));\n }\n\n /**\n * @method logout\n * @memberof Auth#\n *\n * @description\n * Logs user out.\n */\n this.logout = function() {\n return $http[\"delete\"](sessionAPIEndPoint)\n .then(angular.bind(this, function(res) {\n this.isLoggedIn = false;\n this.currentUser = new Account();\n $rootScope.$broadcast('auth:loggedOut');\n }))\n }\n}\n\n/**\n * @ngdoc module\n * @name clrAuth\n *\n * @description\n * The `clrAuth` module provides tools for checking user and authentication status.\n */\nmodule.exports = angular.module('clrAuth', ['ngToast', 'userResource', 'orderingPhysicianResource', 'http-auth-interceptor', 'clrConstant'])\n\n /**\n * Configure angular app to prompt redirect to login page\n * if 'event:auth-loginRequired' event is triggered.\n */\n .run(function($rootScope, $window, $location) {\n $rootScope.$on('event:auth-loginRequired', function() {\n $window.$('.body-wrapper, .footer').addClass('u--force-hide')\n let loginPath = '/sign-in';\n const currentPath = $location.path() + $window.location.search\n if (currentPath != loginPath && $window.location.pathname != loginPath) {\n loginPath += '?&next=' + encodeURIComponent(currentPath)\n }\n $window.location.href = loginPath\n })\n })\n\n /**\n * Run a heartbeat check every minute to ensure that the user session is still active if the user is logged in\n */\n .run(function($rootScope, $timeout, $http, $window, $location, auth, sessionAPIEndPoint) {\n function loginCheck() {\n $timeout(\n function() {\n if (auth.isLoggedIn) {\n $http.get(sessionAPIEndPoint, { ignoreAuthModule: true })\n .then(function(res) {\n const clrVersion = res.headers('x-clr-version')\n $rootScope.$emit('clrVersionUpdate', clrVersion)\n })\n .catch(function(res) {\n if (res) {\n if (res.status === 401 || res.status === 403){\n $window.location.href = '/sign-in?forced=true&next=' + $location.path()\n }\n }\n })\n }\n loginCheck()\n },\n 60 * 1000\n )\n }\n loginCheck()\n })\n\n /**\n * @ngdoc service\n * @name auth\n * @memberof clrAuth\n *\n * @description\n * `auth` allows to you to interact with user authentication service.\n *\n * @returns {Auth} An instance of `Auth`.\n *\n * @example\n * auth.login(\"hi@color.com\", \"mypassword\")\n *\n * if (auth.isLoggedIn) {\n * var userEmail = auth.currentUser.email\n * }\n */\n .service('auth', [\n 'resolvedPromise', '$rootScope', '$http', '$window', 'authService', 'Account', 'sessionAPIEndPoint', 'skipAuthSync', Auth])\n\n /**\n * @ngdoc service\n * @name auth\n * @memberof clrAuth\n *\n * @description\n * `clrCodeVersionBanner` directive checks to make sure the browser's code version is the same\n * as what the server is currently serving.\n * Note: This will never show on dev environments because the `X-CLR-Version` header is always an empty string\n */\n .directive('clrCodeVersionBanner', function($rootScope, $window, $location, device) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {},\n template: '
',\n link: (scope, elem) => {\n // Don't show the banner initially\n scope.show = false;\n\n // Show different force refresh keyboard shortcuts if Windows or Mac\n if (device.isWindows) {\n scope.keyboardShortcut = 'Ctrl+Shift+R';\n } else {\n scope.keyboardShortcut = 'Cmd+Shift+R';\n }\n\n // Set initial browser version as undefined, which gets set upon the first heartbeat\n let browserVersion;\n\n // Leanest way to communicate between loginCheck() and this directive, as this module is used in www and clinical\n // On www, because this directive doesn't appear there, the $rootScope event from loginCheck() does nothing\n const checkVersion = (event, serverVersion) => {\n if (angular.isUndefined(browserVersion)) {\n // If this is the first heartbeat of this browser window's session, set it\n browserVersion = serverVersion\n } else if (browserVersion != serverVersion) { // Otherwise if the versions don't match\n // Show banner\n scope.show = true;\n // Now that the banner is shown, unregister the listener\n listener();\n } else {\n // Else continue not showing it\n scope.show = false;\n }\n }\n\n // Register listener\n const listener = $rootScope.$on('clrVersionUpdate', checkVersion)\n\n // Manual override for the banner showing and unregister the listener\n scope.dismissBanner = () => {\n elem.addClass('u--hide'); // `scope.show` takes awhile to propagate so manually hide so click feels fast\n scope.show = false;\n listener();\n return false;\n }\n\n // Manually bust the cache by reloading the page with a random query param at the end\n scope.reloadPage = () => {\n const cacheBustedUrl = $location.search('cachebust', new Date().getTime()).absUrl();\n $window.location = cacheBustedUrl;\n return false;\n }\n\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name authRouteFilter\n * @memberof clrAuth\n *\n * @description\n * A factory which creates an authentication/authorization routing filter.\n *\n * @param {string} defaultLoginPath - A path to a login page.\n * @param {string} loggedInHomePath - A path to a home page for logged in user.\n * @param {string} emailConfirmationRequiredPath\n * A path to a page for notifying user that they need to confirm their email.\n * @param {string} permissionDeniedPath\n * A path to a page for notifying user that they are not authorized to access.\n * @param {string} sexSelectorPath\n * A path to a page for selecting user sex.\n * @param {string} benefitsRoutingAuthorizationPath\n * A path to a page for consenting to Employer benefits routing.\n * @param {string} healthHistoryIncompletePath\n * A path to a page that user gets redirected to\n * if health history is not complete and is required.\n * @param {string} providerLoggedInHomePath - A path to a home page for logged in providers.\n *\n * @returns {AuthRouteFilter} An instance of `AuthRouteFilter`.\n *\n * @example\n * var colorAuthRouteFilter = authRouteFilter(\n * '/sign-in', '/', 'email-confirmation-required')\n *\n * // When `$routeChangeSuccess` event is triggered:\n * colorAuthRouteFilter.apply(config, next.$$route.originalPath)\n */\n .factory('authRouteFilter', function($window, $location, auth, redirect, textModal, permissionTypes, hasCompletedRoutingAuthorization) {\n return function(defaultLoginPath, loggedInHomePath,\n emailConfirmationRequiredPath, permissionDeniedPath,\n sexSelectorPath, healthHistoryIncompletePath,\n providerLoggedInHomePath, benefitsRoutingAuthorizationPath, associatedSample) {\n return new AuthRouteFilter(\n $window, $location, auth, redirect, associatedSample, textModal\n , defaultLoginPath, loggedInHomePath\n , emailConfirmationRequiredPath, permissionDeniedPath\n , sexSelectorPath, healthHistoryIncompletePath, providerLoggedInHomePath, benefitsRoutingAuthorizationPath, permissionTypes, hasCompletedRoutingAuthorization)\n }\n })\n","module.exports = angular.module('userControllers', [])\n .controller('ResendEmailConfirmationEmailController', require('./controllers/resend_email_confirmation_email_controller'))\n .controller('RoutingAuthorizationController', require('./controllers/routing_authorization_controller'))\n","'use strict'\n\nmodule.exports = function($scope, ngToast, auth, getPrevPath, EmailConfirmationResend, getEmailProvider) {\n 'ngInject'\n\n function getUserPurpose() {\n const lastPath = getPrevPath()\n if (lastPath) {\n if (lastPath == '/health-history' || lastPath == '/select-sex' || lastPath == '/health-history/health-check') {\n return 'health-history'\n }\n else if (lastPath.indexOf('/results') == 0) {\n return 'results'\n }\n else if (lastPath == '/account-settings') {\n return 'account'\n }\n else if (lastPath == '/account/settings') {\n return 'account'\n }\n else if (lastPath == '/react/account/settings') {\n return 'account'\n }\n else if (lastPath == '/genetics/activate/barcode') {\n return 'activate'\n }\n }\n return 'other'\n }\n\n $scope.email = auth.currentUser.email\n $scope.emailProvider = getEmailProvider()\n $scope.purpose = getUserPurpose()\n $scope.emailConfirmationResend = new EmailConfirmationResend()\n $scope.resending = false\n\n $scope.resendConfirmationEmail = function(emailConfirmationResend) {\n if (!$scope.resending) {\n $scope.resending = true\n emailConfirmationResend.next = getPrevPath()\n emailConfirmationResend.$save()\n .then(function() {\n ngToast.create('We have resent the email.')\n })\n .catch(function(res) {\n ngToast.create({ className: 'error', content: 'Something went wrong.' })\n })\n .finally(function() {\n $scope.resending = false\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($scope, auth, $location, redirect) {\n 'ngInject'\n\n $scope.employer = auth.currentUser.routing_organization\n $scope.goToNext = () => {\n const nextQueryParam = $location.search().next\n if (nextQueryParam === undefined) {\n if (auth.currentUser.has_health_history_completed) {\n redirect('/react/dashboard')\n return true\n } else {\n redirect('/health-history')\n return true\n }\n }\n redirect(nextQueryParam)\n }\n}\n","module.exports = angular.module('userDirectives', [])\n .directive('clrAddress', require('./directives/clr_address'))\n .directive('isStateValid', require('./directives/is_state_valid'))\n .directive('stateField', require('./directives/state_field'))\n .directive('clrCountrySelect', require('./directives/clr_country_select'))\n .directive('clrUsStateSelect', require('./directives/clr_us_state_select'))\n .directive('clrAddressForm', require('./directives/clr_address_form'))\n .directive('clrPhoneInput', require('./directives/clr_phone_input'))\n .directive('clrBirthdayInput', require('./directives/clr_birthday_input'))\n .directive('clrSexInput', require('./directives/clr_sex_input'))\n .directive('clrGenderInput', require('./directives/clr_gender_input'))\n /**\n * BE AWARE: References are hard to find:\n * https://github.com/color/color/blob/7de49e804f61409e92655b4c5ff780b74d02d278/src/django_apps/kit_orders/templates/angular/kit_orders/order_account.jade#L8\n * create-account-form-v2\n */\n .directive('createAccountFormV2', require('./directives/create_account_form_v2'))\n","'use strict'\n\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'AE',\n scope: {\n address: '=',\n compact: '=',\n showPhoneNumber: '=?'\n },\n templateUrl: '/users/address.html',\n link: function(scope) {\n if (angular.isUndefined(scope.showPhoneNumber)) {\n scope.showPhoneNumber = true\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function(stateAcronyms) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, elem, attr, ctrl) {\n ctrl.$validators.state = function(modelValue, viewValue) {\n if (ctrl.$isEmpty(modelValue)) {\n return true\n }\n return stateAcronyms.indexOf(viewValue) >= 0\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function(stateAcronyms) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n require: 'ngModel',\n scope: {\n country: '=stateCountry'\n },\n link: function(scope, element, attrs, ctrl) {\n const usStateValidator = function(modelValue, viewValue) {\n if (ctrl.$isEmpty(modelValue)) {\n return true\n }\n return stateAcronyms.indexOf(viewValue) >= 0\n }\n\n // Rather than trying to add/remove the specific formatters from\n // ngModelController.$parsers/$formatters, we use a single\n // `formatter` function and swap out the `currentFormatter`\n // reference when the country changes.\n const dummyFormatter = function(inputValue) {\n return inputValue\n }\n\n const uppercaseFormatter = function(inputValue) {\n if (inputValue === undefined) { inputValue = '' }\n const uppercased = inputValue.toUpperCase()\n if (uppercased !== inputValue) {\n ctrl.$setViewValue(uppercased)\n ctrl.$render()\n }\n return uppercased\n }\n\n let currentFormatter = dummyFormatter\n const formatter = function(inputValue) {\n return currentFormatter(inputValue)\n }\n\n ctrl.$parsers.push(formatter)\n ctrl.$formatters.push(formatter)\n\n scope.$watch('country', function(newValue, oldValue) {\n if (newValue == 'US') {\n ctrl.$validators.state = usStateValidator\n currentFormatter = uppercaseFormatter\n uppercaseFormatter(scope.$eval(attrs.ngModel))\n } else {\n delete ctrl.$validators['state']\n delete ctrl.$validators['shippableState']\n ctrl.$setValidity('state', true)\n ctrl.$setValidity('shippableState', true)\n currentFormatter = dummyFormatter\n }\n\n const oldState = ctrl.$viewValue\n if (oldState && oldState.length > 0) {\n ctrl.$setViewValue(\"\", \"default\")\n ctrl.$setViewValue(oldState, \"default\")\n }\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($interpolate, $filter, geographicalArea, topCountries, allCountries, entireCountryList, NotYetAvailableModal) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n country: '=',\n countries: '=?',\n topCountries: '=?',\n checkAvailable: '=?',\n countryFieldName: '@?',\n withIcons: '=?',\n withLabel: '=?',\n flexStyle: '=?',\n withEntireCountryList: '=?'\n },\n templateUrl: '/users/country_select.html',\n link: function(scope, element) {\n // We use element.attr() rather than attrs.countryDisplay here because\n // we want the unrendered template. Angular will attempt to render the\n // country display template otherwise.\n let displayTemplate = element.attr('country-display')\n if (!displayTemplate) {\n displayTemplate = \"{{ country | name }}\"\n }\n const countryRenderer = $interpolate(displayTemplate)\n scope.display = function(country) {\n return countryRenderer({country: country})\n }\n\n if (angular.isUndefined(scope.countryFieldName)) {\n scope.countryFieldName = \"country\" + Math.floor(Math.random() * 10000)\n }\n\n if (angular.isUndefined(scope.countries)) {\n scope.countries = allCountries\n if (scope.withEntireCountryList) {\n scope.countries = entireCountryList\n }\n }\n\n if (angular.isUndefined(scope.topCountries)) {\n scope.topCountries = topCountries\n }\n\n if (angular.isUndefined(scope.withIcons)) {\n scope.withIcons = false\n }\n\n if (angular.isUndefined(scope.withLabel)) {\n scope.withLabel = true\n }\n\n if (angular.isUndefined(scope.checkAvailable)) {\n scope.checkAvailable = true\n }\n\n // Toggle for new flex form styling, make this default once we switch over all form design\n if (angular.isUndefined(scope.flexStyle)) {\n scope.flexStyle = false\n }\n\n scope.$watch('country', function(newValue, oldValue) {\n if (scope.checkAvailable) {\n if (newValue && !$filter('shippable')(newValue)) {\n NotYetAvailableModal.open($filter('name')(newValue))\n scope.country = oldValue\n }\n }\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function(stateNames) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n ngModel: '='\n },\n templateUrl: '/users/us_state_select.html',\n link: function(scope, element) {\n scope.stateNames = stateNames\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($filter, geographicalArea, NotYetAvailableModal, NoPOBoxesModal, topCountries, allCountries, $timeout, $translate, $window) {\n \"ngInject\"\n\n return {\n restrict: 'AE',\n require: '^form',\n scope: {\n address: '=',\n required: '=',\n compact: '=',\n focus: '=',\n checkout: '=?',\n autocomplete: '=?',\n fixedCountry: '=?',\n flexStyle: '=?',\n showPhoneNumber: '=?',\n displayTooltip: '=?',\n checkBirthday: '=?',\n },\n templateUrl: '/users/address_form.html',\n link: function(scope, element, attrs, formCtrl) {\n // Toggle for new flex form styling, make this default once we switch over all form design\n if (angular.isUndefined(scope.flexStyle)) {\n scope.flexStyle = false\n }\n\n if (angular.isUndefined(scope.showPhoneNumber)) {\n scope.showPhoneNumber = true\n }\n\n if (angular.isUndefined(scope.displayTooltip)) {\n scope.displayTooltip = true\n }\n\n if (!scope.address.country) {\n scope.address.country = 'US'\n }\n\n scope.deliveryHint = function() {\n // Regenerate the translated hint when the page is re-rendered\n if (!angular.isUndefined(scope.checkout)) {\n return $translate.instant(\n 'SHIPPING.DELIVERY_HINT_INTL',\n {\n pluralizedKit : scope.checkout.getQuantity() == 1 ? 'kit' : 'kits',\n carrier : $filter('outboundShipperName')(scope.checkout.shippingAddress.country),\n service : $filter('outboundServiceName')(scope.checkout.shippingAddress.country),\n days : $filter('daysToDeliver')(scope.checkout.shippingAddress.country),\n shippingCost : scope.checkout.getShippingPriceDollars().toFixed(2)\n }\n )\n }\n }\n\n scope.form = formCtrl\n\n scope.geographicalArea = geographicalArea\n scope.NotYetAvailableModal = NotYetAvailableModal\n\n const getAreaInfo = function(country) {\n return {\n shippable: $filter('shippable')(country),\n outboundShipperName: $filter('outboundShipperName')(country),\n jurisdictionName: $filter('name')(country)\n }\n }\n\n // ensure that we clear out unused fields correctly\n const fields = {city: 'city', state: 'state', postalCode: 'postal_code'}\n let autocomplete;\n function initAutocomplete() {\n if (!$window.google || !$window.google.maps || !$window.google.maps.places || !$window.google.maps.places.Autocomplete) {\n return\n }\n const elem = element.find('input[name=line1]')[0];\n const options = { types: ['address'] }\n\n if (scope.fixedCountry) {\n options.componentRestrictions = { country: 'US' }\n }\n\n autocomplete = new google.maps.places.Autocomplete(elem, options)\n autocomplete.addListener('place_changed', fillInAddress);\n }\n\n function getAddressParts(place) {\n const addressParts = {};\n let i;\n let component\n for (i = 0; i < place.address_components.length; i++) {\n component = place.address_components[i]\n addressParts[component.types[0]] = { long: component.long_name, short: component.short_name }\n }\n return addressParts\n }\n\n function fillInAddress() {\n const place = autocomplete.getPlace();\n const parts = getAddressParts(place);\n const address = {};\n address.line1 = parts.street_number ? parts.street_number.short + ' ' + parts.route.long : parts.route.long\n address.country = parts.country.short\n $filter('addressFieldOrder')(parts.country.short).map(function (fieldRow) {\n fieldRow.map(function (field) {\n if (field === 'city') {\n address.city = parts.locality.long\n } else if (field === 'state') {\n address.state = parts.administrative_area_level_1.short\n } else if (field === 'postalCode') {\n address.postal_code = parts.postal_code ? parts.postal_code.short : ''\n }\n })\n })\n\n scope.$apply(function() {\n const fields = ['country', 'line1', 'line2', 'city', 'state', 'postal_code'];\n for (let i = 0; i < fields.length; i++) {\n if (address[fields[i]]) {\n scope.address[fields[i]] = address[fields[i]]\n } else {\n delete scope.address[fields[i]]\n }\n }\n })\n }\n\n // We want to initialize autocomplete on the next digest cycle, because\n // the `ng-if` in the template needs to process first.\n $timeout(function() {\n if (scope.autocomplete) {\n initAutocomplete();\n }\n })\n\n scope.$watch('address.country', function(newCountry, oldCountry) {\n // SUPPORT-2072: angular-ui-mask doesn't reset their validators/bindings when postalCode\n // changes due to the country value, so reset the mask validity manually.\n if (scope.form.postalCode) {\n $timeout(() => {\n scope.form.postalCode.$setValidity('mask', null)\n }, 250)\n }\n\n let countryFields = []\n\n // flatten countryFields into a 1-d array of fields\n $filter('addressFieldOrder')(newCountry).map(function(fieldRow) {\n countryFields = countryFields.concat(fieldRow)\n })\n\n Object.keys(fields).map(function(k) {\n if (countryFields.indexOf(k) == -1) {\n scope.address[fields[k]] = \"\"\n }\n })\n\n const info = getAreaInfo(newCountry)\n if (info.shippable &&\n info.outboundShipperName != 'USPS' &&\n ($filter('poBoxPresent')(scope.address.line1) ||\n $filter('poBoxPresent')(scope.address.line2))) {\n NoPOBoxesModal.open(info.outboundShipperName, info.jurisdictionName)\n }\n })\n\n // Ensure no PO Boxes for non-USPS addresses\n scope.$watch('address.line1', function(newValue) {\n const info = getAreaInfo(scope.address.country)\n if (info.shippable &&\n info.outboundShipperName != 'USPS' &&\n $filter('poBoxPresent')(scope.address.line1)) {\n NoPOBoxesModal.open(info.outboundShipperName, info.jurisdictionName)\n }\n })\n\n // Ensure no PO Boxes for non-USPS addresses\n scope.$watch('address.line2', function(newValue) {\n const info = getAreaInfo(scope.address.country)\n if (info.shippable &&\n info.outboundShipperName != 'USPS' &&\n $filter('poBoxPresent')(scope.address.line2)) {\n NoPOBoxesModal.open(info.outboundShipperName, info.jurisdictionName)\n }\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($filter, phoneCountries, E164Regex) {\n \"ngInject\"\n\n return {\n restrict: 'EA',\n require: '^form',\n scope: {\n phoneCountry: '=',\n phoneNumber: '=',\n addressCountry: '=?',\n phoneExtension: '=?',\n phoneFieldName: '@?',\n phoneFieldLabel: '@?',\n displayTooltip: '=?',\n required: '=?',\n limitCountry: '@?',\n flexStyle: '=?'\n },\n templateUrl: '/users/phone_input.html',\n link: function(scope, element, attrs, formCtrl) {\n scope.phoneCountries = phoneCountries\n scope.form = formCtrl\n\n if (!attrs.phoneFieldName) {\n scope.phoneFieldName = \"phone\"\n }\n\n if (!attrs.phoneFieldLabel) {\n scope.phoneFieldLabel = \"Phone number\"\n }\n\n if (!attrs.displayTooltip) {\n scope.displayTooltip = true\n }\n\n if (!attrs.required) {\n scope.required = true\n }\n\n // Toggle for new flex form styling, make this default once we switch over all form design\n if (angular.isUndefined(scope.flexStyle)) {\n scope.flexStyle = false\n }\n\n // Do not show country option and set it to the country value\n if (scope.limitCountry) {\n scope.addressCountry = scope.limitCountry\n }\n\n scope.hasExtension = !!attrs.phoneExtension\n\n // If phone number provided an is e164 format, set the input accordingly\n const e164Match = E164Regex.exec(scope.phoneNumber)\n if (e164Match) {\n const country = e164Match[1]\n const number = e164Match[2]\n const extension = e164Match[3]\n\n scope.phoneNumber = number\n scope.phoneExtension = extension\n if (!scope.phoneCountry && country) {\n scope.phoneCountry = $filter('phonePrefixToCountryCode')(country)\n }\n }\n\n // If the user hasn't entered a phone number, change the phone country\n // with the address country.\n scope.$watch('addressCountry', function(newValue) {\n if (!formCtrl[scope.phoneFieldName].$viewValue\n && !scope.phoneNumber\n && phoneCountries.indexOf(newValue) > -1) {\n scope.phoneCountry = newValue\n }\n })\n\n // If the user changes the phone country, empty the phone number and\n // extension.\n scope.$watch('phoneCountry', function(newValue, oldValue) {\n if (newValue != oldValue) {\n scope.phoneNumber = ''\n if (scope.hasExtension) {\n scope.phoneExtension = ''\n }\n }\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function(patientIsMinor) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n flexStyle: '@?',\n skipAgeCheck: '=?',\n displayTooltip: '@?'\n },\n require: ['^^form', 'ngModel'],\n templateUrl: '/users/birthday_input.html',\n link: function(scope, elem, attr, controllers) {\n scope.isoformat = angular.isDefined(attr.isoformat) ? attr.isoformat : 'false'\n scope.birthdateModel = controllers[1]\n scope.form = controllers[0]\n\n function shouldCheckAge() {\n if (angular.isDefined(scope.skipAgeCheck)) {\n return !scope.skipAgeCheck\n } else {\n return true\n }\n }\n\n function checkOverAge(birthdate) {\n const b = new Date(birthdate.year, birthdate.month - 1, birthdate.day)\n return !patientIsMinor(b)\n }\n\n function checkFutureDate(birthdate) {\n const now = new Date()\n const b = new Date(birthdate.year, birthdate.month - 1, birthdate.day)\n return b <= now\n }\n\n scope.validate = function(date) {\n if (shouldCheckAge()) {\n return checkOverAge(date) && checkFutureDate(date)\n } else {\n return checkFutureDate(date)\n }\n }\n\n scope.onChange = function(dateModel, date) {\n // We'd like to only show the date error OR the errors below.\n //\n // So, if there's an error caused by the date model, we won't set any\n // other errors.\n\n if (dateModel.$error.date) {\n return\n }\n\n if (shouldCheckAge()) {\n const overAge = checkOverAge(date)\n dateModel.$setValidity('underage', overAge)\n }\n\n const futureDate = checkFutureDate(date)\n dateModel.$setValidity('birthdate', futureDate)\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'E',\n require: '^^form',\n scope: { ngModel: '=' },\n templateUrl: '/users/sex_input.html',\n link: function(scope, elem, attr, controller) {\n scope.form = controller\n scope.sexOptions = [\n { value: \"F\", label: \"Female\" },\n { value: \"M\", label: \"Male\" }\n ]\n }\n }\n}\n","'use strict'\n\nmodule.exports = function(genderIdentities) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n ngModel: '=',\n ngChange: '=',\n },\n templateUrl: '/users/gender_input.html',\n link: function(scope, elem, attr, controller) {\n scope.genderIdentities = genderIdentities\n }\n }\n}\n","'use strict'\n\nmodule.exports = function(auth, createAccount, Account, SignInModal) {\n \"ngInject\"\n\n return {\n restrict: 'AE',\n scope: {\n goToNext: '&',\n title: '@',\n subtitle: '@',\n account: '='\n },\n templateUrl: '/users/create_account_form_v2.html',\n link: function(scope) {\n scope.creatingAccount = false\n\n scope.createAccount = () => {\n scope.creatingAccount = true\n createAccount(scope.account)\n .then((res) => {\n scope.goToNext()\n })\n .catch(() => {\n scope.creatingAccount = false\n })\n }\n\n scope.auth = auth\n\n // TODO: Update style on login modal\n scope.showLoginModal = () => {\n SignInModal.open(() => {\n scope.goToNext()\n })\n }\n }\n }\n}\n","/**\n * @ngdoc module\n * @name userFilter\n *\n * @description\n * The `userFilter` provides filters for users.\n */\nmodule.exports = angular.module('userFilter', [])\n .filter('genderOrSexText', require('./filters/gender_or_sex_text'))\n .filter('poBoxPresent', require('./filters/po_box_present'))\n","'use strict'\n\nmodule.exports = (genderIdentities) => {\n 'ngInject'\n\n return function(gender, selfDescribedGender) {\n if (gender == genderIdentities.FEMALE) {\n return 'female'\n } else if (gender == genderIdentities.MALE) {\n return 'male'\n } else if (gender == genderIdentities.NON_BINARY) {\n return 'non-binary'\n } else if (gender == genderIdentities.SELF_DESCRIBED) {\n return 'self-described - ' + selfDescribedGender\n } else {\n return 'n/a'\n }\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n // Beware of any unicode inside patterns and test thoroughly; e.g. \"(i|î)\" works but not \"[iî]\".\n const subPatterns = [\n \"G? *(P[.]?|post) *(O[.]?|office) *(B[.]?|box)\", // US, CA, UK, AU, NZ\n \"(Apartado|Apto)([. ]( *Postal)?)?\", // US, ES, MX\n \"(Bo(i|î)te|Case|Casella) +Postale|BP|CP\", // FR, CA, IT\n \"Postilokero|Box\", // FI\n \"Postfach\", // DE\n \"Bosca +Poist\", // IE\n \"Ta +Do'ar\", // IL\n \"Window +Delivery|Locked +Bag +Service\" // SG\n ]\n const poBoxPattern = new RegExp(\"\\\\b((\" + subPatterns.join(\")|(\") + \")) +\\\\d\", \"i\")\n return function(line) {\n return poBoxPattern.test(line)\n }\n}\n","module.exports = angular.module('userResource', ['clrResource'])\n .constant('sessionAPIEndPoint', '/api/v1/sessions')\n\n .factory('Account', function(resource) {\n const Account = resource(\n '/api/v1/accounts/:id',\n { id: '@id', format: 'json' }\n )\n Account.prototype.hasAnyPermission = function(permissions){\n return permissions.some(permission => {\n if (this.permissions) {\n return this.permissions[permission]\n }\n })\n }\n Account.prototype.hasAllPermissions = function(permissions){\n return permissions.every(permission => {\n if (this.permissions) {\n return this.permissions[permission]\n }\n })\n }\n Account.prototype.hasOnlyCovidTests = function() {\n if (!this.test_types || !this.test_types.length) {\n // COVID users cannot authenticate if they have no tests\n return false;\n }\n return this.test_types.every(testType => testType === 'covid-19')\n }\n\n return Account\n })\n\n .factory('Address', function(resource) {\n return resource(\n '/api/v1/addresses/:id',\n { id: '@id', format: 'json' }\n )\n })\n\n .factory('PasswordReset', function(resource) {\n return resource(\n '/api/v1/password_resets',\n { format: 'json' }\n )\n })\n\n .factory('EmailConfirmationResend', function(resource) {\n return resource(\n '/api/v1/email_confirmation_resends',\n { format: 'json' }\n )\n })\n\n .factory('EmailUpdateConfirmationResend', function(resource) {\n return resource(\n '/api/v1/email_update_confirmation_resends',\n { format: 'json' }\n )\n })\n\n .factory('PasswordResetConfirmation', function(resource) {\n return resource(\n '/api/v1/password_reset_confirmations',\n { format: 'json' }\n )\n })\n\n .factory('IdentityVerification', function(resource) {\n return resource(\n '/api/v1/identity_verification',\n { format: 'json' }\n )\n })\n","module.exports = angular.module('userServices', [])\n .factory('createAccount', require('./services/create_account'))\n .factory('getEmailProvider', require('./services/get_email_provider'))\n .factory('hasCompletedRoutingAuthorization', require('./services/has_completed_routing_authorization.js'))\n .service('InsightsFlow', require('./insights/insights_flow.js'))\n .run(function($rootScope, InsightsFlow) {\n $rootScope.$on(InsightsFlow.startEventName, function() {\n InsightsFlow.init(true)\n })\n })\n","module.exports = function createAccount(Account, $rootScope, auth, promoCodeStore, ngToast) {\n 'ngInject'\n\n return function(account) {\n if (promoCodeStore.promotionalCode) {\n // Submit promo code to backend to be sent in confirmation email.\n account.promoCode = promoCodeStore.promotionalCode.code\n }\n return new Account(account).$save()\n .then(function(res) {\n $rootScope.$broadcast('account:created', res)\n auth.isSynced = false\n })\n .catch(error => {\n if (error.data) {\n for (const field in error.data) {\n error.data[field].forEach(message => {\n ngToast.create({ className: 'error', content: `${message.message}` })\n })\n }\n } else {\n ngToast.create({ className: 'error', content: error })\n }\n })\n }\n}\n","module.exports = function getEmailProvider(auth) {\n 'ngInject'\n\n const domainProviderMap = {\n 'gmail.com': { name: 'Gmail', url: 'https://www.gmail.com' },\n 'yahoo.com': { name: 'Yahoo', url: 'https://mg.mail.yahoo.com' },\n 'hotmail.com': { name: 'Hotmail', url: 'https://www.hotmail.com' },\n 'aol.com': { name: 'AOL', url: 'https://mail.aol.com' },\n 'comcast.net': { name: 'Comcast', url: 'https://login.comcast.net' }\n }\n\n return function() {\n const domain = auth.currentUser.email.split('@')[1]\n return domainProviderMap[domain]\n }\n}\n","module.exports = (organizationRelationship) => {\n 'ngInject'\n\n return (currentUser) => {\n const populationMembershipRelationships = currentUser.population_memberships.filter(membership => membership.population.name === currentUser.routing_organization).map(membership => membership.relationships).flat()\n return populationMembershipRelationships.some((relationship) => {\n return organizationRelationship.EMPLOYEE_RELATIONSHIPS.indexOf(relationship) > -1\n })\n }\n}\n","'use strict'\n\nmodule.exports = function($location, pathFlow) {\n 'ngInject'\n\n const PATHS = {\n introduction: '/insights/introduction',\n account: '/insights/account',\n }\n const flow = pathFlow('insightsFlow', [\n {controller: 'InsightsIntroductionController', path: PATHS.introduction},\n {controller: 'InsightsAccountController', path: PATHS.account},\n ])\n\n flow.ROUTE_TO_TEXT = {}\n flow.ROUTE_TO_TEXT[PATHS.introduction] = 'Introduction'\n flow.ROUTE_TO_TEXT[PATHS.account] = 'Account'\n\n flow.getRoutes = () => {\n return [\n PATHS.introduction,\n PATHS.account,\n ]\n }\n\n const getNextRoute = (currentRoute) => {\n const routes = flow.getRoutes()\n const currentIndex = routes.indexOf(currentRoute)\n const nextRoute = routes[currentIndex + 1]\n if (nextRoute) {\n return nextRoute\n }\n throw 'No next route'\n }\n\n flow.goToNext = () => {\n const currentRoute = $location.path()\n const nextRoute = getNextRoute(currentRoute)\n flow.goTo(nextRoute, true)\n }\n\n return flow\n}\n","module.exports = angular.module('accounts', [\n require('src/django_apps/users/js/accounts/controllers').name,\n require('src/django_apps/users/js/accounts/services').name,\n]).config(function(colorRouteProvider) {\n colorRouteProvider\n .when('/returned_data', {redirectTo: '/returned-data'})\n .when('/returned-data', {\n templateUrl: '/accounts/returned_data.html',\n controller: 'ReturnedDataController',\n auth: { loginPath: '/react/create-account' } //todo test\n })\n})\n","module.exports = angular.module('accountControllers', [])\n .controller('AccountSettingsController', require('./controllers/account_settings_controller'))\n .controller('ChangeEmailController', require('./controllers/change_email_controller'))\n .controller('ChangePasswordController', require('./controllers/change_password_controller'))\n .controller('ChangeInfoController', require('./controllers/change_info_controller'))\n .controller('ShareDataController', require('./controllers/share_data_controller'))\n .controller('StoreSampleController', require('./controllers/store_sample_controller'))\n .controller('EmailConfirmedController', require('./controllers/email_confirmed_controller'))\n .controller('ReturnedDataController', require('./controllers/returned_data_controller'))\n","'use strict'\n\nmodule.exports = function($scope, $http, $modal, auth, ngToast, VerifyIdentityModal, EmailUpdateConfirmationResend) {\n 'ngInject'\n\n $scope.changingEmail = false\n $scope.verifyingIdentity = false\n $scope.pendingEmailChange = false\n\n if (!!auth.currentUser.unconfirmed_updated_email) {\n $scope.pendingEmailChange = true\n $scope.changingEmail = true\n }\n\n $scope.changeEmail = function() {\n $scope.verifyingIdentity = true\n $scope.instructions = \"Verify your password to change your email address.\"\n const verifyIdentityModal = VerifyIdentityModal.open($scope)\n verifyIdentityModal.result.then(function(res) {\n $scope.changingEmail = true\n $scope.verifyingIdentity = false\n auth.currentUser.verification_password = res.password\n })\n }\n $scope.changeEmailSubmit = function(form) {\n $scope.changingEmail = true\n $scope.openAlmostDoneModal(form)\n }\n $scope.cancelEmailForm = function() {\n $scope.changingEmail = false\n }\n\n function AlmostDoneController($scope, options) {\n $scope.options = options\n }\n\n $scope.openAlmostDoneModal = function(form) {\n const modalInstance = $modal.open({\n templateUrl: \"/generic_modal.html\",\n controller: AlmostDoneController,\n size: \"sm\",\n resolve: {\n options: function() {\n return {\n title: \"Almost done...\",\n body: \"To protect your privacy, we need to verify \" + form.email.$modelValue + \" \" +\n \"is your email address before your change takes effect. If you \" +\n \"don't see the email within 5 minutes, check your Spam folder.\",\n primaryActionText: \"Got it\",\n secondaryActionText: \"Cancel email address change\"\n }\n }\n }\n })\n\n modalInstance.result\n .then(function(scope) {\n $scope.thisUser = auth.currentUser\n $scope.thisUser.$save()\n .then(function(res) {\n auth.currentUser.unconfirmed_updated_email = res.unconfirmed_updated_email\n $scope.pendingEmailChange = true\n $scope.changingEmail = true\n })\n })\n .catch(function() {\n $scope.cancelEmailChange()\n })\n }\n\n $scope.resendVerificationEmail = function() {\n $scope.resending = true\n $scope.EmailUpdateConfirmationResend = new EmailUpdateConfirmationResend()\n $scope.EmailUpdateConfirmationResend.$save()\n .then(function() {\n ngToast.create('We have resent the email.')\n })\n .catch(function(res) {\n ngToast.create({ className: 'error', content: 'Something went wrong.' })\n })\n .finally(function() {\n $scope.resending = false\n })\n }\n\n $scope.cancelEmailChange = function() {\n $http.patch('/api/v1/accounts/' + auth.currentUser.id, { unconfirmed_updated_email: \"\" })\n .then(function(res) {\n auth.currentUser.unconfirmed_updated_email = \"\"\n $scope.pendingEmailChange = false\n $scope.changingEmail = false\n })\n .catch(function(res) {\n ngToast.create({ className: 'error', content: 'Email address change cancelled.' })\n })\n }\n}\n","'use strict'\n\nmodule.exports = function($scope, $http, auth, ngToast) {\n 'ngInject'\n\n $scope.changingPassword = false\n\n $scope.changePassword = function(){\n $scope.changingPassword = true\n }\n\n $scope.cancelPasswordChange = function() {\n $scope.changingPassword = false\n }\n\n $scope.changePasswordSubmit = function(form) {\n $scope.changingPassword = true\n $http.patch('/api/v1/accounts/' + auth.currentUser.id, { verification_password: form.currentPassword.$viewValue, password: form.password.$viewValue })\n .then(function(res) {\n ngToast.create('Password successfully changed.')\n $scope.changingPassword = false\n })\n .catch(function(res) {\n if (res.status == 403) {\n form.currentPassword.$setValidity('invalid', false)\n ngToast.create('Password change failed. The password you entered does not match your current password.')\n } else {\n ngToast.create('Something went wrong.')\n }\n })\n }\n}\n","'use strict'\n\nmodule.exports = function($scope, $http, auth, ngToast, Address) {\n 'ngInject'\n\n $scope.changingInfo = false\n\n const resetAddress = function() {\n const contactAddress = new Address()\n if (auth.currentUser.phone) {\n contactAddress.phone_country = auth.currentUser.phone.country\n contactAddress.phone_number = auth.currentUser.phone.national_number\n }\n if (auth.currentUser.contact_address) {\n contactAddress.$get({ id: auth.currentUser.contact_address })\n }\n $scope.contactAddress = contactAddress\n }\n resetAddress()\n $scope.changeInfoSubmit = function(user, contactAddress) {\n $scope.contactAddress = new Address()\n $scope.contactAddress.user = auth.currentUser.id\n $scope.contactAddress.line1 = contactAddress.line1\n $scope.contactAddress.line2 = contactAddress.line2\n $scope.contactAddress.city = contactAddress.city\n $scope.contactAddress.state = contactAddress.state\n $scope.contactAddress.postal_code = contactAddress.postal_code\n $scope.contactAddress.country = contactAddress.country\n $scope.contactAddress.full_name = user.firstName + \" \" + user.lastName\n $scope.contactAddress.phone_country = contactAddress.phone_country\n $scope.contactAddress.phone_number = contactAddress.phone_number\n $scope.contactAddress.$save()\n .then(function(res) {\n const data = {\n first_name: user.firstName,\n last_name: user.lastName,\n contact_address: res.id,\n phone_number: {\n national_number: contactAddress.phone_number,\n country: contactAddress.phone_country\n }\n }\n return $http.patch('/api/v1/accounts/' + auth.currentUser.id, data)\n .then(function(res) {\n return auth.sync(true)\n })\n .then(function(res) {\n ngToast.create('Your contact info has been successfully changed.')\n })\n })\n .then(function() {\n $scope.changingInfo = false\n })\n }\n\n $scope.cancelChangeInfo = function() {\n $scope.changingInfo = false\n if (!$scope.contactAddress.id) {\n resetAddress()\n }\n }\n\n $scope.changeInfo = function() {\n $scope.changingInfo = true\n }\n}\n","'use strict'\n\nmodule.exports = function($scope, $http, auth, ngToast, $modal) {\n 'ngInject'\n\n $scope.shareDataChanging = false\n $scope.form = {}\n\n $scope.shareDataChanged = function(event) {\n event.preventDefault()\n event.stopPropagation()\n\n $scope.shareDataChanging = true\n\n if (auth.currentUser.can_use_for_research) {\n const modalInstance = $modal.open({\n templateUrl: \"/generic_modal.html\",\n controller: function($scope, $modalInstance, options) {\n $scope.options = options\n },\n size: \"sm\",\n resolve: {\n options: function() {\n return {\n title: \"Are you sure?\",\n body: \"Your information is shared anonymously and it helps \" +\n \"researchers and research companies outside of Color develop \" +\n \"new consumer, medical and diagnostic products.\",\n primaryActionText: \"I don't want to share my data\",\n secondaryActionText: \"Cancel change\"\n }\n }\n }\n })\n modalInstance.result\n .then(function (scope) {\n $http.patch('/api/v1/accounts/' + auth.currentUser.id, { can_use_for_research: false })\n .then(function(res) {\n auth.currentUser.can_use_for_research = false\n ngToast.create('Your data will no longer be shared with researchers.')\n })\n .finally(function() {\n $scope.shareDataChanging = false\n })\n })\n .catch(function() {\n $scope.shareDataChanging = true\n $scope.form.shareData = true\n })\n } else {\n $http.patch('/api/v1/accounts/' + auth.currentUser.id, { can_use_for_research: true })\n .then(function(res) {\n auth.currentUser.can_use_for_research = true\n })\n .finally(function() {\n $scope.shareDataChanging = false\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($scope, $http, auth, ngToast, $modal) {\n 'ngInject'\n\n $scope.storeSampleChanging = false\n $scope.form = {}\n $scope.storeSampleChanged = function(event) {\n event.preventDefault()\n event.stopPropagation()\n\n $scope.storeSampleChanging = true\n\n if (auth.currentUser.allowed_to_store) {\n const modalInstance = $modal.open({\n templateUrl: \"/generic_modal.html\",\n controller: function($scope, $modalInstance, options) {\n $scope.options = options\n },\n size: \"sm\",\n resolve: {\n options: function() {\n return {\n title: \"Are you sure?\",\n body: \"If you choose not to store your sample, we will throw it \" +\n \"away. This can not be undone. You will have to pay for another \" +\n \"kit to utilize new genetic screens that are developed.\",\n primaryActionText: \"Throw my sample away\",\n secondaryActionText: \"Cancel change\"\n }\n }\n }\n })\n modalInstance.result\n .then(function (scope) {\n $http.patch('/api/v1/accounts/' + auth.currentUser.id, { allowed_to_store: false })\n .then(function(res) {\n auth.currentUser.allowed_to_store = false\n ngToast.create('Your sample will be thrown away.')\n })\n .finally(function() {\n $scope.storeSampleChanging = false\n })\n })\n .catch(function() {\n $scope.storeSampleChanging = true\n $scope.form.storeSample = true\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($scope, auth) {\n 'ngInject'\n\n $scope.hasPurchased = !!auth.currentUser.has_purchased\n}\n","'use strict'\n\n/**\n * @prettier\n */\n\nmodule.exports = function($scope, RawDataFile) {\n 'ngInject'\n const barcode_to_properties = {}\n $scope.returnedData = RawDataFile.get().$promise.then(function(res) {\n for (const returned_data_info of res) {\n const barcode = returned_data_info.kit_barcode\n if (barcode in barcode_to_properties) {\n barcode_to_properties[barcode].push(returned_data_info)\n } else {\n barcode_to_properties[barcode] = [returned_data_info]\n }\n }\n\n const to_return = []\n for (const barcode in barcode_to_properties) {\n if (barcode_to_properties.hasOwnProperty(barcode)) {\n to_return.push({'kit_barcode': barcode, 'items': barcode_to_properties[barcode]})\n }\n }\n $scope.returned_data = to_return\n })\n}\n","module.exports = angular.module('accountServices', ['ui.bootstrap', 'ngToast'])\n .factory('VerifyIdentityModal', function($modal, ngToast, IdentityVerification) {\n const VerifyIdentityModalController = function($scope, $modalInstance) {\n\n $scope.identityVerification = new IdentityVerification()\n $scope.verifyingIdentity = false\n\n $scope.verifyPassword = function(password) {\n $scope.verifyingIdentity = true\n $scope.identityVerification.password = password.password\n $scope.identityVerification.verification_password = password.password\n $scope.identityVerification.$save_with_ignore_auth_module()\n .then(function(res) {\n $modalInstance.close(res)\n })\n .catch(function(res) {\n ngToast.create({ className: \"error\", content: \"Wrong password.\" })\n })\n .finally(function() {\n $scope.verifyingIdentity = false\n })\n }\n\n $scope.dismiss = function() {\n $modalInstance.dismiss()\n }\n }\n\n return {\n open: function(scope) {\n return $modal.open({\n templateUrl: '/accounts/verify_identity_modal.html',\n scope: scope,\n controller: VerifyIdentityModalController,\n size: 'sm',\n resolve: {\n instructions: function() {\n return scope.instructions\n }\n }\n })\n }\n }\n })\n","const InsightsFlowNavigation = {\n blue: true,\n showLeft: false,\n showRight: false,\n showPromoBanner: false,\n active: 'buy',\n subnavCompact: true,\n layout: 'minimum'\n}\n\nmodule.exports = angular.module('insights', [\n require('src/django_apps/users/js/insights/controllers').name,\n]).config(function(colorRouteProvider) {\n colorRouteProvider\n .when('/insights/introduction', {\n templateUrl: '/insights/introduction.html',\n controller: 'InsightsIntroductionController',\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n navigation: InsightsFlowNavigation\n })\n .when('/insights/account', {\n templateUrl: '/insights/account.html',\n controller: 'InsightsAccountController',\n auth: {\n requireLogin: false,\n requireEmailConfirmation: false\n },\n navigation: InsightsFlowNavigation\n })\n})\n","module.exports = angular.module('insightsControllers', [])\n .controller('InsightsIntroductionController', require('./insights_introduction_controller'))\n .controller('InsightsAccountController', require('./insights_account_controller'))\n","'use strict'\n\nmodule.exports = function($scope, $location, InsightsFlow) {\n 'ngInject'\n\n $scope.flow = InsightsFlow\n\n $scope.routes = InsightsFlow.getRoutes()\n\n $scope.goToNext = function() {\n InsightsFlow.goToNext()\n }\n\n}\n","'use strict'\n\nmodule.exports = function($scope, $location, Account, InsightsFlow) {\n 'ngInject'\n\n $scope.flow = InsightsFlow\n\n $scope.routes = InsightsFlow.getRoutes()\n\n $scope.goToNext = function() {\n InsightsFlow.goToNext()\n }\n\n $scope.account = new Account()\n}\n","module.exports = angular.module('counseling', [\n require('src/django_apps/counseling/js/resources').name,\n require('src/django_apps/counseling/js/directives').name,\n require('src/django_apps/counseling/js/filters').name,\n require('src/django_apps/counseling/js/gc_tools').name,\n require('src/django_apps/counseling/js/schedulizer').name\n])\n","/**\n * @ngdoc module\n * @name counselingResource\n *\n * @description\n * The `counselingResource` provides resources for\n * Genetic Counseling Appointments\n */\nmodule.exports = angular.module('counselingResource', ['clrResource'])\n\n /**\n * @ngdoc service\n * @name Appointment\n * @memberof counselingResource\n *\n * @description\n * A resource for `counseling/appointment` REST API.\n */\n .factory('Appointment', function(resource) {\n return resource(\n '/api/v1/counseling/appointment/:id'\n , { format: 'json', id: '@id' },\n { update: { method: 'PATCH' } }\n )\n })\n\n /**\n * @ngdoc service\n * @name upcomingAppointment\n * @memberof counselingResource\n *\n * @description\n * A upcoming appointment.\n */\n .factory('upcomingAppointment', function($filter, Appointment) {\n return {\n get: function(orderNumber) {\n const params = {}\n if (orderNumber) {\n params['kit_order__order_number'] = orderNumber\n }\n return Appointment.get(params).$promise.then(function(res) {\n const upcomingAppointments = $filter('filter')(res.results, { 'is_upcoming': true })\n if (upcomingAppointments.length) {\n return $filter('orderBy')(upcomingAppointments, 'end_time')[0]\n }\n return null\n })\n }\n }\n })\n","module.exports = angular.module('counselingDirective', ['clrConstant'])\n .directive('gcSchedulizer', function(upcomingAppointment, chooseAppointment) {\n 'ngInject'\n\n return {\n restrict: 'A',\n scope: {\n staticText: '=',\n onComplete: '&?',\n orderNumber: '=',\n },\n controller: function() {\n const ctrl = this\n },\n replace: true,\n link: function(scope, elem, attrs, ctrl) {\n\n // Sets text\n loadUpcomingAppointment()\n\n elem.bind('click', function() {\n chooseAppointment(scope.orderNumber)\n })\n\n function loadUpcomingAppointment() {\n return upcomingAppointment.get(scope.orderNumber)\n .then(function(appointment) {\n if (appointment) {\n if (!scope.staticText) {\n elem.text(\"Reschedule Appointment\")\n }\n } else {\n if (!scope.staticText) {\n elem.text(\"Schedule Appointment\")\n }\n }\n })\n }\n }\n }\n })\n\n .directive('uploadedCounselingNotes', () => {\n return {\n restrict: 'E',\n templateUrl: '/angular_js_templates/gc_tools/uploaded_counseling_notes.html',\n scope: {\n uploadedNotes: '=',\n }\n }\n })\n\n .directive('counselingNoteUploader', (fileUploader) => {\n return {\n restrict: 'E',\n template: '',\n scope: {\n uploadedNoteKey: '=',\n reportId: '='\n },\n link: (scope, elem) => {\n scope.uploader = fileUploader(\n {\n url: '/api/v1/counseling/counseling_notes/upload',\n formData: [{\n report: scope.reportId\n }],\n autoUpload: true,\n queueLimit: 1,\n }\n )\n // We only allow users to upload one file at a time, so we only need to watch the 0th element of the uploader's queue\n scope.$watch('uploader.queue[0].s3_key', () => {\n if (scope.uploader.queue[0]) {\n scope.uploadedNoteKey = scope.uploader.queue[0].s3_key\n } else {\n scope.uploadedNoteKey = null\n }\n })\n }\n }\n })\n\n .directive('checkboxGroup', () => {\n return {\n restrict: 'E',\n templateUrl: '/angular_js_templates/gc_tools/checkbox_group.html',\n scope: {\n questions: '=',\n answers: '=',\n }\n }\n })\n\n .directive('counselingNoteQuestionnaire', ($filter) => {\n return {\n restrict: 'E',\n templateUrl: '/angular_js_templates/gc_tools/counseling_note_questionnaire.html',\n scope: {\n noteOptions: '=',\n internalNote: '=',\n report: '=',\n },\n link: (scope, elem) => {\n scope.noteOptions = {\n results: {},\n discussion: {},\n nextSteps: {},\n otherTestsDiscussed: {}\n }\n\n scope.checkboxQuestions = {\n results: [\n {\n question: \"Show VUS Details\",\n propertyName: \"showVusDetails\"\n }\n ],\n discussion: [\n {\n question: \"Discussed seeing a local GC\",\n propertyName: \"showLocalGCInfo\"\n },\n {\n question: \"Discussed lifestyle recommendations\",\n propertyName: \"showLifestyleRecommendations\"\n },\n {\n question: \"Discussed the Family Testing Program\",\n propertyName: \"showFamilyTestingProgramInfo\"\n },\n ],\n nextSteps: [\n {\n question: \"Share your results with providers and family.\",\n propertyName: \"showShareResultsSection\"\n },\n {\n question: \"Schedule an appointment with your provider.\",\n propertyName: \"showScheduleProviderAppointment\"\n },\n {\n question: \"Schedule an appointment with a genetic counselor in your area.\",\n propertyName: \"showScheduleGCAppointment\"\n },\n {\n question: \"Consider the Family Testing Program.\",\n propertyName: \"showFamilyTestingProgram\"\n },\n ]\n }\n\n // Add an \"Also discussed this patient's ___ results\" checkbox for each of the user's other test types\n scope.checkboxQuestions.otherTestsDiscussed = []\n for (const testType in scope.report.reports_for_other_test_types) {\n scope.checkboxQuestions.otherTestsDiscussed.push({\n question: `Also discussed this patient's ${$filter('testTypeName')(testType)} results`,\n propertyName: testType,\n })\n }\n }\n }\n })\n\n .directive('aouCounselingNoteQuestionnaire', (testTypes, testOutcome) => {\n return {\n restrict: 'E',\n templateUrl: '/angular_js_templates/gc_tools/aou_counseling_note_questionnaire.html',\n scope: {\n noteOptions: '=',\n report: '=',\n },\n link: (scope, elem) => {\n scope.isSpanish = (scope.report.latest_completed_appointment && scope.report.latest_completed_appointment.language == 'Spanish')\n scope.isAouAcmg59Positive = scope.report.kit_order.test_type == testTypes.aouAcmg59 && scope.report.test_outcome == testOutcome.positive\n scope.isAouAcmg59Uninformative = scope.report.kit_order.test_type == testTypes.aouAcmg59 && scope.report.test_outcome != testOutcome.positive\n scope.isAouPgxV1 = scope.report.kit_order.test_type == testTypes.aouPgxV1\n }\n }\n })\n\n .directive('addCounselingNote', ($http, ngToast, auth, testTypes, testOutcome, publishCounselingNoteModal, waffle, environment) => {\n return {\n restrict: 'E',\n templateUrl: '/angular_js_templates/gc_tools/add_counseling_note.html',\n scope: {\n report: '=',\n publishedNoteKey: '=',\n },\n link: (scope, elem) => {\n scope.view = 'options'\n scope.noteOptions = {}\n scope.internalNote = \"\"\n scope.supportedLanguages = {\n // should match the SupportedLanguages Enum in template tags\n English: 'English',\n Spanish: 'Spanish'\n }\n scope.isSpanish = (scope.report.latest_completed_appointment && scope.report.latest_completed_appointment.language == scope.supportedLanguages.Spanish)\n // Lists the supported languages for test_types that can generate notes\n const noteLanguages = {\n [testTypes.hereditary30]: [scope.supportedLanguages.English],\n [testTypes.cardio30]: [scope.supportedLanguages.English],\n [testTypes.aouAcmg59]: scope.isSpanish ? [scope.supportedLanguages.Spanish, scope.supportedLanguages.English] : [scope.supportedLanguages.English],\n [testTypes.aouPgxV1]: scope.isSpanish ? [scope.supportedLanguages.Spanish, scope.supportedLanguages.English] : [scope.supportedLanguages.English]\n }\n const test_type = scope.report.kit_order.test_type\n scope.noteInfoByLanguage = {}\n\n // Determine whether we can generate a note for this report\n const supportedTestTypes = [testTypes.hereditary30, testTypes.cardio30, testTypes.aouAcmg59, testTypes.aouPgxV1]\n scope.isAouTestType = [testTypes.aouAcmg59, testTypes.aouPgxV1].includes(test_type)\n scope.canGenerateNote = false\n if (auth.currentUser.permissions['files.can_use_counseling_note_generator']) {\n scope.canGenerateNote = (supportedTestTypes.includes(test_type) &&\n (scope.report.test_outcome == testOutcome.positive || test_type == testTypes.aouPgxV1))\n // HDR- reports are still gated by a waffle\n if (test_type == testTypes.aouAcmg59 && scope.report.test_outcome != testOutcome.positive) {\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n scope.canGenerateNote = waffle.switch_is_active('enable-aou-note-generation-11-2022')\n }\n }\n\n // Determines whether the user can be linked to the ReTool note generator\n scope.canUseRetoolGenerator = false;\n if (\n auth.currentUser.permissions[\"files.can_use_counseling_note_generator\"] &&\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n waffle.switch_is_active(\"enable-retool-note-generation-02-2024\")\n ) {\n const testName = test_type.replace(/\\s/g, \"\").toLowerCase()\n\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n if (waffle.switch_is_active(`enable-${testName}-note-generation`)) {\n scope.canUseRetoolGenerator = true;\n if (environment == \"prod\") {\n scope.retoolBaseURL = \"https://retool.color.com/apps/002d2ffe-eb7d-11ee-a8da-6778f5f0fdc5/Precision%20Care%20Tools/GC%20Note%20Generator\";\n } else {\n scope.retoolBaseURL = \"https://retool.staging.color.com/apps/002d2ffe-eb7d-11ee-a8da-6778f5f0fdc5/Precision%20Care%20Tools/GC%20Note%20Generator\";\n }\n }\n }\n\n // Whether the user is using the note generation flow or the note upload flow\n scope.usingNoteGenerator = false\n\n // Updates the content and draftKey to the language specific information\n scope.updateContent = (language) => {\n scope.activeLanguage = language\n scope.noteContent = scope.noteInfoByLanguage[language].noteContent\n scope.draftNoteKey = scope.noteInfoByLanguage[language].draftNoteKey\n }\n\n const trix = angular.element('#counseling-note-editor')[0]\n\n const getEditorContents = () => {\n return trix.value\n }\n\n const setEditorContents = (html) => {\n // Delete editor contents\n const text = trix.editor.getDocument().toString()\n trix.editor.setSelectedRange([0, text.length])\n trix.editor.deleteInDirection(\"forward\")\n\n // Insert new html\n trix.editor.setSelectedRange([0, 0])\n trix.editor.insertHTML(html)\n }\n\n /* Functions for transitioning between the different views in this component\n * State transitions:\n * options <---> preview <---> editor\n * |\n * |\n * v\n * published note\n */\n\n scope.showOptions = () => {\n scope.view = 'options'\n scope.noteIsGenerated = false\n }\n\n scope.showPreview = () => {\n scope.view = 'preview'\n }\n\n scope.generateAndPreviewNote = () => {\n scope.loading = true\n\n // Add test_type languages to noteInfoByLanguage\n noteLanguages[test_type].forEach((language) => {\n scope.noteInfoByLanguage[language] = {}\n })\n\n Promise.all(\n noteLanguages[test_type].map((language) => generateNoteContent(language))\n )\n .then(() =>\n Promise.all(\n noteLanguages[test_type].map((language) => generatePdf(language))\n )\n )\n .then(() => scope.updateContent(noteLanguages[test_type][0]))\n .then(scope.showPreview)\n .finally(() => {\n scope.loading = false\n scope.noteIsGenerated = true\n // Run one $digest cycle after generating notes in various languages\n scope.$apply()\n })\n }\n\n scope.showEditor = () => {\n setEditorContents(scope.noteContent)\n scope.view = 'editor'\n }\n\n /* Use the content in the text editor to generate a pdf, then display it */\n scope.saveEdits = () => {\n scope.loading = true\n scope.noteInfoByLanguage[scope.activeLanguage].noteContent = getEditorContents()\n\n generatePdf(scope.activeLanguage)\n .then(() => scope.updateContent(scope.activeLanguage))\n .then(scope.showPreview)\n .finally(() => {\n scope.loading = false\n })\n }\n\n scope.publish = () => {\n publishCounselingNoteModal.open(publishNote).result.then((response) => {\n scope.publishedNoteKey = response.data\n ngToast.create('Success! Your note has been published.')\n addInternalNote()\n })\n }\n\n /* Functions for making API calls */\n\n const generateNoteContent = (language) => {\n // makes a copy of the noteOptions and sets the language to be used by the templates\n const noteOptions = Object.assign({}, scope.noteOptions)\n noteOptions.language = language\n const data = {\n note_options: noteOptions,\n report: scope.report.id\n }\n return $http.post('api/v1/counseling/counseling_notes/generate_content', data)\n .then((res) => {\n // saves content information by language. Used by updateContent() to swap content in the UI\n scope.noteInfoByLanguage[language].noteContent = res.data\n })\n }\n\n const generatePdf = (language) => {\n const data = {\n note_content: scope.noteInfoByLanguage[language].noteContent,\n report: scope.report.id,\n language: language\n }\n return $http.post('api/v1/counseling/counseling_notes/generate_pdf', data)\n .then((res) => {\n // saves content information by language. Used by updateContent() to swap content in the UI\n scope.noteInfoByLanguage[language].draftNoteKey = res.data\n })\n }\n\n /* Make an api request to publish the counseling note draft. Returns a promise. */\n const publishNote = () => {\n let keys;\n // If note is generated get data from noteInfoByLanguage otherwise its a single note that has been uploaded\n if (scope.noteIsGenerated) {\n const languages = noteLanguages[test_type]\n keys = languages.map(language => scope.noteInfoByLanguage[language].draftNoteKey)\n } else {\n keys = [scope.draftNoteKey]\n }\n const data = {\n keys,\n report: scope.report.id,\n }\n return $http.post('api/v1/counseling/counseling_notes/publish', data)\n }\n\n /* Save the counselor's internal notes */\n const addInternalNote = () => {\n if (scope.internalNote) {\n const data = {\n report: scope.report.id,\n text: scope.internalNote\n }\n $http.post('/api/v1/counseling/notes', data).then(() => {\n scope.internalNote = \"\"\n scope.$emit('internalNote:created')\n })\n }\n }\n }\n }\n })\n","/**\n * @ngdoc module\n * @name counselingFilter\n *\n * @description\n * The `counselingFilter` provides filters for counseling.\n */\nmodule.exports = angular.module('counselingFilter', [])\n\n /**\n * `appointmentTimeStr` is used in `pending_gc_session.jade`\n * @ngdoc filter\n * @name appointmentTimeStr\n * @memberof counselingFilter\n *\n * @description\n * Returns appiontment time in following format:\n * June 3rd at 9am PDT\n */\n .filter('appointmentTimeStr', function($filter) {\n return function(appointment) {\n const dateObj = new Date(appointment.start_time);\n const month = $filter('date')(appointment.start_time, 'MMMM');\n const date = $filter('ordinalSuffix')(dateObj.getDate());\n const hour = $filter('date')(appointment.start_time, 'h:mm a').toLowerCase();\n const timezone = getTimezoneAbbreviation(dateObj);\n let result = month + ' ' + date + ' at ' + hour\n\n if (timezone) {\n result = result + ' ' + timezone\n }\n return result\n }\n\n function getTimezoneAbbreviation(dateObj) {\n let splitted = dateObj.toString().split('(');\n let timezone = null\n // date string is in the following format:\n // Mon Jul 20 2015 13:00:00 GMT-0700 (PDT)\n if (splitted.length > 1) {\n splitted = splitted[1].split(')')\n if (splitted.length > 1) {\n timezone = splitted[0]\n }\n }\n return timezone\n }\n })\n","module.exports = angular.module('gc_tools', [\n require('src/django_apps/counseling/js/gc_tools/modal').name,\n require('src/django_apps/counseling/js/gc_tools/filters').name\n]).config(function(colorRouteProvider) {\n\n const resolveResults = {\n 'report': ['$route', 'Report', function($route, Report) {\n return Report.get({ id: $route.current.params.id }).$promise\n }],\n }\n\n colorRouteProvider\n .when('/counseling', {\n redirectTo: '/counseling/results/upcoming'\n })\n .when('/counseling/results/:type', {\n templateUrl: '/angular_js_templates/gc_tools/results.html',\n controller: require('src/django_apps/counseling/js/gc_tools/controllers/counseling_results_controller'),\n auth: {\n requireGeneticCounselor: true\n }\n })\n .when('/counseling/patient/:patient_id', {\n templateUrl: '/angular_js_templates/gc_tools/detail.html',\n controller: require('src/django_apps/counseling/js/gc_tools/controllers/counseling_detail_controller'),\n auth: {\n requireGeneticCounselor: true\n },\n\n // normally the view is report-based, this forces using only patient ID\n resolve: {\n 'report': ['$route', 'Report', function($route, Report) {\n return { patient_id: $route.current.params.patient_id }\n }],\n }\n })\n .when('/counseling/:id', {\n templateUrl: '/angular_js_templates/gc_tools/detail.html',\n controller: require('src/django_apps/counseling/js/gc_tools/controllers/counseling_detail_controller'),\n auth: {\n requireGeneticCounselor: true\n },\n resolve: resolveResults\n })\n // Citation Cheatsheet\n .when('/citations', {\n templateUrl: '/angular_js_templates/gc_tools/citations.html',\n controller: require('src/django_apps/counseling/js/gc_tools/controllers/citation_list_controller')\n })\n})\n","module.exports = angular.module('gcToolModal', [])\n .factory('addEventModal', require('./modals/add_event_modal'))\n .factory('publishCounselingNoteModal', require('./modals/publish_counseling_note_modal'))\n .factory('setReleasePreferencesModal', require('./modals/set_release_preferences_modal'))\n .factory('releaseResultsModal', require('./modals/release_results_modal'))\n .factory('addReleaseGroupHoldModal', require('./modals/add_release_group_hold_modal'))\n .factory('withdrawReleaseGroupModal', require('./modals/withdraw_release_group_modal'))\n .factory('removeReleaseGroupHoldModal', require('./modals/remove_release_group_hold_modal'))\n .factory('releaseGroupResultsModal', require('./modals/release_group_results_modal'))\n","const template = pug`\n clinical-form-modal(modal-instance=\"modalInstance\", on-submit=\"addEvent\")\n modal-title Add Event\n modal-body\n .form-group\n select.form-control(ng-model=\"logData.event_type\", ng-options=\"type for type in eventTypes\", required)\n option(value=\"\", disabled=\"\") Select event type...\n .form-group\n input.form-control(type=\"date\", ng-model=\"logData.event_time\", required)\n .form-group\n input.form-control(type=\"text\", placeholder=\"Add a note\", ng-model=\"logData.note\")\n submit-button Add Event\n`;\n\nfunction controller($scope, $modalInstance, reportId, OrderLog) {\n $scope.modalInstance = $modalInstance;\n $scope.eventTypes = [\n \"No Show Counseling Session (AoU only)\",\n \"Counseling session\",\n \"Phone call to ordering physician\",\n \"Support call from client\",\n \"Support call from provider\"\n ].sort();\n\n $scope.logData = { report: reportId, event_time: new Date() };\n $scope.addEvent = () => OrderLog.save($scope.logData).$promise;\n}\n\nmodule.exports = $modal => {\n \"ngInject\";\n\n return {\n open: reportId => {\n return $modal.open({\n template: template,\n controller: controller,\n size: \"md\",\n resolve: {\n reportId: () => reportId\n }\n });\n }\n };\n};\n","const template = pug`\n clinical-form-modal(modal-instance=\"modalInstance\", on-submit=\"publish\")\n modal-title Are you ready to publish?\n modal-body\n p Once you hit “Publish” this note will be emailed to the patient.\n p If this is a Spanish GC note, the note will include the Spanish version first, followed by the English version on subsequent pages in the same file.\n p If this is a physician order, the note will also go out to the ordering physician, the primary contact, and any additional recipients.\n submit-button Publish\n`\n\nconst controller = ($scope, $modalInstance, publishNote) => {\n $scope.modalInstance = $modalInstance\n $scope.publish = publishNote\n}\n\nmodule.exports = ($modal) => {\n 'ngInject'\n\n return {\n open: (publishNote) => {\n return $modal.open({\n template: template,\n controller: controller,\n size: 'md',\n resolve: {\n publishNote: () => publishNote,\n }\n })\n }\n }\n}\n","const template = pug`\n clinical-form-modal(modal-instance=\"modalInstance\", on-submit=\"setReleasePreferences\")\n modal-title Provider Release Options\n modal-body\n .form-group\n select.form-control(ng-model=\"releasePreferences.release_delay_in_days\", ng-options=\"option.value as option.label for option in releaseDelayOptions\")\n option(value=\"\", disabled=\"\") Release results to client...\n .form-group\n .checkbox-icon.checkbox-icon--square\n input#gcBlock(type=\"checkbox\", ng-model=\"releasePreferences.require_counseling_if_positive\")\n label(for=\"gcBlock\") Require Color genetic counseling for positive results\n submit-button Set Release Options\n`\n\nfunction controller($scope, $modalInstance, $http, releasePreferences) {\n $scope.modalInstance = $modalInstance\n $scope.releasePreferences = angular.copy(releasePreferences)\n\n $scope.releaseDelayOptions = [\n {value: 0, label: 'Immediately'},\n {value: 5, label: 'After five days'},\n {value: 20, label: 'After twenty days'}\n ]\n\n $scope.setReleasePreferences = () => {\n return $http.put('/api/v1/counseling/release_preferences/' + releasePreferences.id, $scope.releasePreferences)\n .then((res) => {\n // Update the parent scope\n angular.copy(res.data, releasePreferences)\n })\n }\n}\n\nmodule.exports = ($modal) => {\n 'ngInject'\n\n return {\n open: (releasePreferences) => {\n return $modal.open({\n template: template,\n controller: controller,\n size: 'md',\n resolve: {\n releasePreferences: () => releasePreferences\n }\n })\n }\n }\n}\n","const template = pug`\n clinical-form-modal(modal-instance=\"modalInstance\", on-submit=\"releaseResults\")\n modal-title Release Results to Client?\n modal-body\n | Client will be able to view their results by signing into their Color account without scheduling further genetic counseling.\n .form-group\n input.form-control(type=\"text\", placeholder=\"Add a note\", ng-model=\"data.note\", required)\n submit-button Release Results\n`\n\nfunction controller($scope, $modalInstance, $http, reportId) {\n $scope.modalInstance = $modalInstance\n $scope.data = {}\n $scope.releaseResults = () => {\n return $http.put('/api/v1/counseling/info/' + reportId + '/release_report', $scope.data)\n }\n}\n\nmodule.exports = ($modal) => {\n 'ngInject'\n\n return {\n open: (reportId) => {\n return $modal.open({\n template: template,\n controller: controller,\n size: 'md',\n resolve: {\n reportId: () => reportId\n }\n })\n }\n }\n}\n","const template = pug`\n clinical-form-modal(modal-instance=\"modalInstance\", on-submit=\"addReleaseGroupHold\")\n modal-title Add Release Group Hold?\n modal-body\n span(clr-spinner-text, active=\"!isFinishedLoading\")\n\n div(ng-show=\"isFinishedLoading\")\n p This action will affect all reports in release group {{releaseGroupId}}.\n\n // Even if we failed to fetch the reports in the ReleaseGroup, we still want the\n // modal to be usable. So we simply hide the section where we'd normally list\n // out the reports.\n div(ng-show=\"reportsInReleaseGroup.length > 0\")\n p\n div The following report(s) are in this release group:\n ul\n li(ng-repeat=\"report in reportsInReleaseGroup\")\n a(ng-click=\"openReport(report.id)\") Report {{report.id}}\n\n input.form-control(\n type=\"text\",\n placeholder=\"Please describe why you're adding this hold.\",\n ng-model=\"formInput.description\",\n required\n )\n submit-button Add Hold\n`;\n\nfunction controller($scope, $http, $location, $modalInstance, releaseGroupId) {\n $scope.modalInstance = $modalInstance;\n $scope.releaseGroupId = releaseGroupId;\n $scope.formInput = { description: \"\" };\n\n // Fetch the reports in the ReleaseGroup so that we can display links to them\n $scope.reportsInReleaseGroup = [];\n $scope.isFinishedLoading = false;\n $http\n .get(\"/api/v1/color_hub/reports\", {\n params: { release_group_id: releaseGroupId },\n })\n .then((response) => {\n $scope.reportsInReleaseGroup = response.data;\n })\n .finally(() => {\n $scope.isFinishedLoading = true;\n });\n\n $scope.openReport = (reportId) => {\n $modalInstance.dismiss();\n $location.path(`/reports/${reportId}`);\n };\n\n $scope.addReleaseGroupHold = () =>\n $http.post(\"/api/v1/color_hub/release_group_holds\", {\n release_group_id: releaseGroupId,\n description: $scope.formInput.description,\n });\n}\n\nmodule.exports = ($modal) => {\n \"ngInject\";\n\n return {\n open: (releaseGroupId) =>\n $modal.open({\n size: \"md\",\n template,\n resolve: {\n releaseGroupId: () => releaseGroupId,\n },\n controller,\n }),\n };\n};\n","const template = pug`\n clinical-form-modal(modal-instance=\"modalInstance\", on-submit=\"withdrawReleaseGroup\")\n modal-title Withdraw Release Group?\n modal-body\n span(clr-spinner-text, active=\"!isFinishedLoading\")\n\n div(ng-show=\"isFinishedLoading\")\n p This action cannot be undone. It will affect all reports in release group {{releaseGroupId}}.\n\n // Even if we failed to fetch the reports in the ReleaseGroup, we still want the\n // modal to be usable. So we simply hide the section where we'd normally list\n // out the reports.\n div(ng-show=\"reportsInReleaseGroup.length > 0\")\n p\n div The following report(s) will be withdrawn:\n ul\n li(ng-repeat=\"report in reportsInReleaseGroup\")\n a(ng-click=\"openReport(report.id)\") Report {{report.id}}\n\n submit-button Withdraw Release Group\n`;\n\nfunction controller($scope, $http, $location, $modalInstance, releaseGroupId) {\n $scope.modalInstance = $modalInstance;\n $scope.releaseGroupId = releaseGroupId;\n $scope.formInput = { description: \"\" };\n\n // Fetch the reports in the ReleaseGroup so that we can display links to them\n $scope.reportsInReleaseGroup = [];\n $scope.isFinishedLoading = false;\n $http\n .get(\"/api/v1/color_hub/reports\", {\n params: { release_group_id: releaseGroupId },\n })\n .then((response) => {\n $scope.reportsInReleaseGroup = response.data;\n })\n .finally(() => {\n $scope.isFinishedLoading = true;\n });\n\n $scope.openReport = (reportId) => {\n $modalInstance.dismiss();\n $location.path(`/reports/${reportId}`);\n };\n\n $scope.withdrawReleaseGroup = () =>\n $http.post(`/api/v1/color_hub/release_groups/${releaseGroupId}/withdraw_reports`, {\n release_group_id: releaseGroupId,\n });\n}\n\nmodule.exports = ($modal) => {\n \"ngInject\";\n\n return {\n open: (releaseGroupId) =>\n $modal.open({\n size: \"md\",\n template,\n resolve: {\n releaseGroupId: () => releaseGroupId,\n },\n controller,\n }),\n };\n};\n","const template = pug`\n clinical-form-modal(modal-instance=\"modalInstance\", on-submit=\"removeReleaseGroupHold\")\n modal-title Remove Release Group Hold?\n modal-body\n span(clr-spinner-text, active=\"!isFinishedLoading\")\n\n div(ng-show=\"isFinishedLoading\")\n p Hold type: \n strong {{releaseGroupHold.hold_type}}\n p This action will affect all reports in release group {{releaseGroup.release_group_id}}.\n\n // Even if we failed to fetch the reports in the ReleaseGroup, we still want the\n // modal to be usable. So we simply hide the section where we'd normally list\n // out the reports.\n div(ng-show=\"reportsInReleaseGroup.length > 0\")\n p\n div The following report(s) are in this release group:\n ul\n li(ng-repeat=\"report in reportsInReleaseGroup\")\n a(href=\"/reports/{{report.id}}\") Report {{report.id}}\n\n input.form-control(\n type=\"text\",\n placeholder=\"Please describe why you're removing this hold.\",\n ng-model=\"data.note\",\n required\n )\n submit-button Remove Hold\n`\n\nfunction controller($scope, $modalInstance, $http, releaseGroup, releaseGroupHold) {\n $scope.modalInstance = $modalInstance\n $scope.releaseGroup = releaseGroup\n $scope.releaseGroupHold = releaseGroupHold\n $scope.data = {}\n $scope.removeReleaseGroupHold = () => {\n const url = `/api/v1/color_hub/release_group_holds/${releaseGroupHold.release_group_hold_id}/remove`\n return $http.post(url, $scope.data)\n }\n\n // Fetch the reports in the ReleaseGroup so that we can display links to them\n $scope.reportsInReleaseGroup = [];\n $scope.isFinishedLoading = false;\n $http\n .get(\"/api/v1/color_hub/reports\", {\n params: { release_group_id: releaseGroup.release_group_id },\n })\n .then((response) => {\n $scope.reportsInReleaseGroup = response.data;\n })\n .finally(() => {\n $scope.isFinishedLoading = true;\n });\n}\n\nmodule.exports = ($modal) => {\n 'ngInject'\n\n return {\n open: (releaseGroup, releaseGroupHold) => {\n return $modal.open({\n template: template,\n controller: controller,\n size: 'md',\n resolve: {\n releaseGroup: () => releaseGroup,\n releaseGroupHold: () => releaseGroupHold,\n }\n })\n }\n }\n}\n","const template = pug`\n clinical-form-modal(modal-instance=\"modalInstance\", on-submit=\"releaseResults\")\n modal-title Release All Results to Client?\n modal-body\n | Client will be able to view all results in this current report's release group by signing into their Color account without scheduling further genetic counseling.\n .form-group\n input.form-control(type=\"text\", placeholder=\"Add a note\", ng-model=\"data.note\", required)\n submit-button Release All Results\n`\n\nfunction controller($scope, $modalInstance, $http, releaseGroupId) {\n $scope.modalInstance = $modalInstance\n $scope.data = {}\n $scope.releaseResults = () => {\n const url = `/api/v1/color_hub/release_groups/${releaseGroupId}/release_to_patient`\n return $http.post(url, $scope.data)\n }\n}\n\nmodule.exports = ($modal) => {\n 'ngInject'\n\n return {\n open: (releaseGroupId) => {\n return $modal.open({\n template: template,\n controller: controller,\n size: 'md',\n resolve: {\n releaseGroupId: () => releaseGroupId\n }\n })\n }\n }\n}\n","/**\n * @ngdoc module\n * @name gcToolFilter\n *\n * @description\n * The `gcToolFilter` provides filters for GC tools.\n */\nmodule.exports = angular.module('gcToolFilter', [])\n\n /**\n * @ngdoc filter\n * @name gcToolReportStatus\n * @memberof gcToolFilter\n *\n * @description\n * Converts a report object with state and opened_at fields to its display string.\n */\n .filter('gcToolReportStatus', function () {\n return function (report) {\n if (!report) {\n return\n }\n if (report.state == 'sent_to_ordering_physician') {\n return \"Released to provider\"\n } else if (report.state == 'release_ready') {\n return \"Ready to release\"\n } else if (report.state == 'released') {\n return report.opened_at ? \"Viewed by client\" : \"Released to client\"\n } else {\n return report.state\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name releasePreferences\n * @memberof gcToolFilter\n *\n * @description\n * Formats physician release preferences for display.\n */\n .filter('releasePreferences', function () {\n return function (releasePreferences) {\n let displayString\n if (!releasePreferences) {\n return\n }\n\n if (releasePreferences.release_to_patient) {\n if (releasePreferences.release_delay_in_days === null) {\n displayString = \"Release delay not set\"\n } else if (releasePreferences.release_delay_in_days === 0) {\n displayString = \"Immediate release\"\n } else {\n displayString = releasePreferences.release_delay_in_days + ' day release'\n }\n displayString += ', '\n if (releasePreferences.require_counseling_if_positive) {\n displayString += 'GC Block'\n } else {\n displayString += 'No GC Block'\n }\n } else {\n displayString = 'No client release'\n }\n return displayString;\n }\n })\n","module.exports = function CounselingResultsController($scope, $routeParams, $http, $window) {\n \"ngInject\"\n\n $scope.types = ['upcoming', 'search', 'call_needed', 'positive_reminder']\n $scope.typeTitles = {\n 'upcoming': 'Upcoming Counseling',\n 'search': 'Find a Result',\n 'call_needed': 'External Order, Call Needed',\n 'positive_reminder': 'Positive, Reminder Needed'\n }\n $scope.type = $routeParams.type\n\n const fields_to_request = [\n 'id', 'sample_id', 'test_type', 'state', 'released_at', 'is_result_positive', 'appointment', 'opened_at',\n 'user__last_name', 'user__first_name', 'user__birthday',\n ]\n\n /** Query the counseling info endpoint with the specified queryparams **/\n $scope.loadResults = function(params) {\n $scope.loadingResults = true\n $scope.results = []\n // Use the 'fields' queryparam to request a subset of the fields that this endpoint returns by default\n params.fields = fields_to_request.join(',')\n $http.get('/api/v1/counseling/info', { params: params })\n .then((res) => {$scope.results = res.data.results})\n .finally(() => {$scope.loadingResults = false})\n }\n\n if ($scope.type == 'search') {\n $scope.query = ''\n $scope.findResult = function(query) {\n const params = { query: query }\n $scope.loadResults(params)\n }\n } else {\n const params = { filter: $scope.type }\n $scope.loadResults(params)\n }\n\n /**\n * Sort results by upcoming GC appointments\n * If there is no appointment or an appointment has happened in the past, place at the bottom\n **/\n $scope.resultSorter = function(result) {\n if (result.appointment) {\n const endTime = new Date(result.appointment.end_time)\n const now = new Date()\n if (endTime > now) {\n return endTime\n }\n }\n return Number.POSITIVE_INFINITY\n }\n\n $scope.viewResult = function(result) {\n $window.open('/counseling/' + result.id)\n }\n}\n","module.exports = function CitationListController($scope, $location, Reference, indexedResource) {\n \"ngInject\"\n\n $scope.references = indexedResource(new Reference())\n $scope.references.load()\n $scope.host = $location.host()\n}\n","const SchedulizerServices = require('src/django_apps/counseling/js/schedulizer/services')\n\nmodule.exports = angular.module('schedulizer', [\n SchedulizerServices.name\n])\n .config(function(colorRouteProvider) {\n const requireLoginAndConfirmation = {\n requireLogin: true,\n requireEmailConfirmation: true\n }\n\n colorRouteProvider\n .when('/counseling/schedulizer/iframe', {\n templateUrl: '/angular_js_templates/schedulizer/schedulizer_iframe.html',\n controller: require('src/django_apps/counseling/js/schedulizer/controllers/schedulizer_iframe_controller'),\n auth: requireLoginAndConfirmation,\n })\n })\n","module.exports = function($location, $scope, $sce) {\n 'ngInject'\n const orderNumber = $location.search().order_number\n if (orderNumber) {\n $scope.iframeWidth = '100%';\n // adaptive height doesn't work, so set a fixed height and allow scrolling\n $scope.iframeHeight = '1500px';\n $scope.appointmentURL = $sce.trustAsResourceUrl(`/schedule?order_number=${orderNumber}`);\n $scope.iframeScrolling = 'yes';\n } else {\n $location.path('/404')\n }\n}\n","const getAbsolutePath = require('src/django_apps/core/static/js/absolute_path');\nconst resolvers = require('src/django_apps/core/static/js/resolvers')\n\nmodule.exports = angular.module('kitOrders', [\n require('src/django_apps/kit_orders/js/controllers').name,\n require('src/django_apps/kit_orders/js/directives').name,\n require('src/django_apps/kit_orders/js/modals').name,\n require('src/django_apps/kit_orders/js/resources').name,\n require('src/django_apps/kit_orders/js/services').name\n]).config(function(colorRouteProvider) {\n const noLoginOrConfirmation = {\n requireLogin: false,\n requireEmailConfirmation: false\n }\n\n colorRouteProvider\n .when('/kit', {\n controller: 'KitRedirectController',\n template: ' ', // http://stackoverflow.com/questions/14411740/how-to-route-without-a-templateurl\n auth: noLoginOrConfirmation\n })\n .when('/research/activate', {\n controller: 'ResearchRedirectController',\n template: ' ',\n auth: {\n requireLogin: true,\n requireEmailConfirmation: true\n }\n })\n // Purchase Flow\n // Legacy redirects\n .when('/kit_orders/ordering_physician', { redirectTo: '/purchase/ordering-physician' })\n .when('/kit_orders/:order_number/confirmation', { redirectTo: '/purchase/:order_number/confirmation' })\n // TODO (UXTASK-1533): This was the angular order flow path that is still\n // referenced in emails sent to AC Wellness participants. Delete in two\n // weeks on 2023-03-09.\n .when('/order', { redirectTo: '/react/orders' })\n .when('/order/shipping', { redirectTo: '/react/orders/shipping' })\n\n .when('/purchase', { redirectTo: '/purchase/ordering-physician' })\n .when('/purchase/ordering-physician', {\n templateUrl: '/kit_orders/ordering_physician.html',\n seo: {\n title: 'Purchase your Color Test - Color',\n description: ''\n },\n controller: 'OrderingPhysicianController',\n auth: noLoginOrConfirmation,\n navigation: {\n showLeft: false,\n showRight: false,\n showPromoBanner: true,\n showPromoBannerWhitelist: [\n 'enterprise',\n 'familyTestingCode',\n ],\n active: 'buy',\n subnavCompact: true,\n layout: 'minimum'\n }\n })\n .when('/purchase/shipping', { redirectTo: '/react/orders' })\n .when('/purchase/billing', { redirectTo: '/react/orders' })\n .when('/purchase/account', { redirectTo: '/react/orders' })\n .when('/purchase/review', { redirectTo: '/react/orders' })\n .when('/purchase/:purchase_number/confirmation', {\n templateUrl: '/kit_orders/confirmation.html',\n seo: {\n title: 'Purchase your Color Test - Color',\n description: ''\n },\n controller: 'KitOrderConfirmationController',\n auth: {\n requireLogin: false\n },\n navigation: {\n blue: true,\n }\n })\n .when('/purchase/:purchase_number/activate', {\n templateUrl: '/kit_orders/confirmation_activate.html',\n seo: {\n title: 'Purchase your Color Test - Color',\n description: ''\n },\n controller: 'KitOrderConfirmationController',\n auth: {\n requireLogin: true,\n loginPath: '/react/create-account',\n requireEmailConfirmation: false\n },\n navigation: {\n active: 'buy'\n }\n })\n\n // Sample reuse flow\n const sampleReuseNavigation = {\n blue: true,\n showLeft: false,\n showPromoBanner: true,\n showPromoBannerWhitelist: [\n 'enterprise',\n 'familyTestingCode'\n ],\n active: 'buy',\n subnavCompact: true,\n layout: 'minimum'\n }\n colorRouteProvider\n .when('/sample-reuse', { redirectTo: '/sample-reuse/pay' })\n .when('/sample-reuse/pay', {\n templateUrl: '/kit_orders/sample_reuse/pay.html',\n controller: 'SampleReusePayController',\n auth: {\n requireLogin: true\n },\n navigation: sampleReuseNavigation\n })\n .when('/sample-reuse/consent', {\n templateUrl: '/kit_orders/sample_reuse/consent.html',\n controller: 'SampleReuseConsentController',\n auth: {\n requireLogin: true\n },\n navigation: sampleReuseNavigation\n })\n .when('/sample-reuse/confirmation', {\n templateUrl: '/kit_orders/sample_reuse/confirmation.html',\n controller: 'SampleReuseConfirmationController',\n auth: {\n requireLogin: true\n },\n navigation: sampleReuseNavigation\n })\n})\n","module.exports = angular.module('kitOrderControllers', [\n require('src/django_apps/kit_orders/js/modals').name\n])\n .controller('KitRedirectController', require('src/django_apps/kit_orders/js/controllers/kit_redirect_controller'))\n .controller('ResearchRedirectController', require('src/django_apps/kit_orders/js/controllers/research_redirect_controller'))\n .controller('OrderingPhysicianController', require('src/django_apps/kit_orders/js/controllers/ordering_physician_controller'))\n .controller('KitOrderConfirmationController', require('src/django_apps/kit_orders/js/controllers/kit_order_confirmation_controller'))\n .controller('OnsiteBenefitController', require('src/django_apps/kit_orders/js/controllers/onsite_benefit_controller'))\n .controller('SampleReuseConsentController', require('src/django_apps/kit_orders/js/controllers/sample_reuse_consent_controller'))\n .controller('SampleReusePayController', require('src/django_apps/kit_orders/js/controllers/sample_reuse_pay_controller'))\n .controller('ShareController', require('src/django_apps/kit_orders/js/controllers/share_controller'))\n .controller('SampleReuseConfirmationController', require('src/django_apps/kit_orders/js/controllers/sample_reuse_confirmation_controller'))\n","function NotYetAvailableModalController($scope, $modalInstance, $translate, ngToast, auth, Waitlist, stateFullNames, name, testName) {\n 'ngInject'\n\n $scope.saving = false\n if (name.length == 2) {\n $scope.type = 'STATE'\n $scope.jurisdictionName = stateFullNames[name]\n $scope.testName = testName\n } else if (testName) {\n $scope.type = 'SINGLE_KIT_COUNTRY'\n $scope.jurisdictionName = name\n $scope.testName = testName\n } else {\n $scope.type = 'COUNTRY'\n $scope.jurisdictionName = name\n }\n\n let waitListName = name\n if (testName) {\n waitListName = waitListName + ' (' + testName + ')'\n }\n $scope.waitlist = new Waitlist({\n waitlist_type: $scope.type.toLowerCase(),\n waitlist_name: waitListName})\n if (auth.isLoggedIn) {\n $scope.waitlist.email = auth.currentUser.email\n $scope.waitlist.user = auth.currentUser.id\n }\n $scope.notify = true\n\n $scope.saveWaitlist = function(notify, waitlist) {\n if (!notify) {\n $modalInstance.dismiss()\n return\n }\n $scope.saving = true\n // We don't show error even if api returns 400\n // to avoid showing error if user has added to the list\n // already.\n // Only validation error that can happen is email address\n // value but we do client side validation so it is ok.\n waitlist.$save_with_skip_error_toast()\n .finally(function(res) {\n if ($scope.testName){\n ngToast.create('You will be notified when ' + $scope.testName + ' is available in '+ $scope.jurisdictionName + '.')\n } else {\n ngToast.create('You will be notified when kits are available in '+ $scope.jurisdictionName + '.')\n }\n $modalInstance.close()\n $scope.saving = false\n })\n }\n\n $scope.dismiss = function() {\n $modalInstance.dismiss()\n }\n}\n\nmodule.exports = function NotYetAvailableModal($modal) {\n 'ngInject'\n\n return {\n open: function(name, testName) {\n return $modal.open({\n templateUrl: '/kit_orders/modals/not_yet_available.html',\n controller: NotYetAvailableModalController,\n size: 'sm',\n resolve: {\n name: function() {\n return name\n },\n testName: function() {\n return testName\n }\n }\n })\n }\n }\n}\n","const NoPOBoxesModalController = function($scope, outboundShipperName, jurisdictionName, $modalInstance) {\n 'ngInject'\n $scope.outboundShipperName = outboundShipperName\n $scope.jurisdictionName = jurisdictionName\n\n $scope.dismiss = function() {\n $modalInstance.dismiss()\n }\n}\n\nmodule.exports = function NoPOBoxesModal($modal) {\n 'ngInject'\n return {\n open: function(outboundShipperName, jurisdictionName) {\n return $modal.open({\n templateUrl: '/kit_orders/modals/no_p_o_boxes.html',\n controller: NoPOBoxesModalController,\n size: 'sm',\n resolve: {\n outboundShipperName: function() {\n return outboundShipperName\n },\n jurisdictionName: function() {\n return jurisdictionName\n }\n }\n })\n }\n }\n}\n","const PromoCodeMismatchModalController = function($scope, skuName, externalSkuListNames, $location, $modalInstance, promoCodeStore) {\n 'ngInject'\n $scope.skuName = skuName\n $scope.externalSkuListNames = externalSkuListNames\n $scope.clearPromoCode = function () {\n promoCodeStore.clear()\n $modalInstance.close(true)\n }\n $scope.changeSelection = function() {\n $location.path('/product/compare-genetic-tests')\n $modalInstance.dismiss('change selection')\n }\n}\n\nmodule.exports = function PromoCodeMismatchModal($modal) {\n 'ngInject'\n return {\n open: function(skuName, externalSkuListNames) {\n return $modal.open({\n templateUrl: '/kit_orders/modals/promo_code_mismatch.html',\n controller: PromoCodeMismatchModalController,\n size: 'sm',\n resolve: {\n skuName: function() {\n return skuName\n },\n externalSkuListNames: function() {\n return externalSkuListNames\n }\n }\n })\n }\n }\n}\n","module.exports = function SignInModal($modal) {\n 'ngInject'\n\n return {\n open: function(callback) {\n return $modal.open({\n templateUrl: '/kit_orders/modals/signin.html',\n controller: function($scope, $modalInstance, auth) {\n 'ngInject'\n $scope.loggingIn = false\n $scope.login = function() {\n return auth.login($scope.email, $scope.password)\n .then(function() {\n $modalInstance.dismiss()\n callback()\n })\n .catch(function(res) {\n $scope.loggingIn = false\n })\n }\n },\n size: 'sm'\n })\n }\n }\n}\n","function PhysicianOrderCancellation($scope, $rootScope, $http, $modalInstance, ngToast, requisitionNumber, firstName, lastName, PhysicianOrderCancellationReasons) {\n 'ngInject'\n $scope.firstName = firstName\n $scope.lastName = lastName\n $scope.PhysicianOrderCancellationReasons = PhysicianOrderCancellationReasons\n $scope.values = {}\n\n $scope.askReason = () => {\n $scope.askingReason = true\n }\n\n $scope.cancelTest = () => {\n $scope.cancelling = true\n $http.put(`/api/v1/detailed_physician_orders/${requisitionNumber}/cancel`, {\n reason: $scope.values.reason\n })\n .then(() => {\n $modalInstance.close()\n })\n .catch(response => {\n ngToast.create({ content: response.data.non_field_errors, className: 'error' })\n $modalInstance.dismiss()\n })\n }\n}\n\nmodule.exports = ($modal) => {\n 'ngInject'\n\n return {\n open: (requisitionNumber, firstName, lastName) => {\n return $modal.open({\n templateUrl: 'kit_orders/modals/physician_order_cancellation.html',\n controller: PhysicianOrderCancellation,\n size: 'md',\n resolve: {\n firstName: () => firstName,\n lastName: () => lastName,\n requisitionNumber: () => requisitionNumber\n }\n })\n }\n }\n}\n","module.exports = ($modal) => {\n 'ngInject'\n\n return {\n open: () => {\n return $modal.open({\n templateUrl: 'kit_orders/modals/not_acwellness_member_modal.html',\n size: 'md',\n })\n }\n }\n}\n","'use strict'\n\n// KitRedirectController is responsible for redirects for the /kit path\n// Old benefits emails contain a link to /kit, and if the sampleId\n// parameter is set then they should now be taken to the activation flow\n// instead of the purchase flow.\nmodule.exports = function($location, associatedSample) {\n 'ngInject'\n\n if (associatedSample.get()) {\n $location.path('/genetics/activate').replace()\n } else {\n $location.path('/product/hereditary-cancer-genetic-test').replace()\n }\n}\n","'use strict'\n\n// Research Redirect Controller is responsible for redirects for the /research/activate path\n// For Research Sample Activation, we have to verify we have a claim, generate a physician order, kit orders,\n// and the purchase. This request does that and takes them to activation.\nmodule.exports = function($location, $http, ngToast, accessionNumber, kitBarcode) {\n 'ngInject'\n $http.post('/api/v1/purchase_research_sample', {'kit_barcode': kitBarcode.get(), 'accession_number': accessionNumber.get()})\n .then(() => {\n $location.path('/genetics/activate');\n }).catch(err => {\n ngToast.create({ className: 'error', content: err.data })\n // We shouldn't surface activation to them (since patient may place a physician order, think they need to purchase the kit).\n $location.path('/');\n })\n}\n","'use strict'\n\nmodule.exports = function OrderingPhysicianController(\n $scope, $location, $modal, $cookies, auth, textModal, waffle, ngToast,\n KitCheckoutFlow, kitPriceService, associatedSample, claimStore,\n promoCodeStore, requisitionStore\n) {\n 'ngInject'\n\n let promoCode;\n if (promoCodeStore.promotionalCode) {\n promoCode = promoCodeStore.promotionalCode.code\n }\n\n // If the promoCodeStore doesn't have the code, try grabbing it from the cookies\n if (!promoCode) {\n promoCode = $cookies.get('code')\n }\n\n // Add the code to the query params\n if (promoCode){\n $location.search('code', promoCode)\n }\n\n // Clear the code from cookies once it's been added to the query params\n $cookies.remove('code')\n\n // Get requisition from local storage or cookies\n let requisition;\n const storedRequisition = requisitionStore.get();\n if (storedRequisition) {\n requisition = storedRequisition;\n } else {\n requisition = $cookies.get(\"requisition\");\n }\n\n // Add the requisition to the query params if it exists\n if (requisition) {\n $location.search(\"requisition\", requisition);\n }\n\n // Clear the requisition from cookies once it's been added to the query params\n $cookies.remove(\"requisition\");\n\n $location.path(`/react/orders`);\n}\n","'use strict'\n\nmodule.exports = function(\n $scope, $modal, $routeParams, $translate, $filter, $location, Purchase, $anchorScroll, auth) {\n 'ngInject'\n\n $translate('ORDER_CONFIRMATION.ABOUT_A_WEEK').then(function(translation) {\n $scope.deliveryTime = translation\n })\n $scope.purchase = new Purchase({ purchase_number: $routeParams.purchase_number })\n $scope.noReferral = $location.search().no_referral\n $scope.purchase.$get()\n .then(function(res) {\n if (auth.isLoggedIn && !$scope.noReferral) {\n $modal.open({\n templateUrl: '/kit_orders/modals/share_modal.html',\n size: 'md',\n controller: 'ShareController'\n })\n }\n\n if (res.shipping_address.country != 'US') {\n $scope.deliveryTime = 'about ' + $filter('daysToDeliver')(res.shipping_address.country) + ' days'\n }\n })\n\n // Users may purchase for emails other than whomever if logged in. If so, do not show email text\n if (!$location.search().no_email && auth.isLoggedIn) {\n $scope.user = auth.currentUser\n $scope.emailConfirmed = auth.currentUser.is_email_confirmed\n }\n\n $anchorScroll()\n\n $scope.subscribed = $location.search().subscribed\n}\n","'use strict'\n\nmodule.exports = function($scope, $http, ngToast, Address) {\n 'ngInject'\n\n $http.get('/api/v1/benefits/campaigns?page_size=1000')\n .then(function(res) {\n $scope.enterpriseV2Campaigns = res.data.results\n })\n .catch(function() {\n ngToast.create({ className: 'error', content: 'Unable to fetch campaign list' })\n })\n\n $scope.address = new Address()\n $scope.isOnsiteSetUp = false\n\n $scope.setUpOnsite = function() {\n $scope.submittingAddress = true\n\n const selectedCampaign = $scope.enterpriseV2Campaigns.find(campaign => campaign.name == $scope.selectedCampaignName)\n $scope.selectedCampaignName = selectedCampaign.name\n $scope.selectedCampaignSkus = selectedCampaign.sku_discounts.map(skuDiscount => skuDiscount.sku).join(', ')\n\n $scope.address.$save()\n .then(function() {\n $scope.isOnsiteSetUp = true\n })\n .catch(function() {\n ngToast.create({ className: 'error', content: 'Address creation failed' })\n })\n .finally(function() { $scope.submittingAddress = false })\n }\n\n $scope.values = {}\n $scope.checkEligibility = () => {\n const params = {\n identifier: $scope.values.identifier,\n campaign_name: $scope.selectedCampaignName\n }\n\n $http.put('api/v1/benefits/get_or_create_claim', params).then(response => {\n const claim = response.data\n $scope.claim = claim\n $scope.checkedEligibility = true\n\n }).catch(response => {\n ngToast.create({ className: 'error', content: response.data.detail })\n })\n }\n\n $scope.reset = () => {\n $scope.values = {}\n $scope.checkedEligibility = false\n $scope.claim = null\n $scope.enterpriseV1SubmissionForm.$setPristine()\n $scope.enterpriseV2EligibilityCheckForm.$setPristine()\n $scope.enterpriseV2SubmissionForm.$setPristine()\n }\n\n $scope.submit = function() {\n $scope.submitting = true\n const data = {\n identifier: $scope.values.identifier,\n // The tracking number is the last 22 digits of a USPS scan\n // Incident 3067 - we no longer want to truncate\n return_tracking_number: $scope.values.returnScan,\n delivery_address: $scope.address.id\n }\n\n const url = 'api/v1/onsite_benefits_enterprise_v2'\n data.campaign_name = $scope.selectedCampaignName\n\n $http.post(url, data)\n .then(function() {\n ngToast.create('Benefit claimed successfully. Instruct client to activate kit.')\n $scope.reset()\n })\n .catch(function(error) { ngToast.create({ className: 'error', content: 'Benefit claim failed: ' + error.data.detail }) })\n .finally(function() { $scope.submitting = false })\n }\n}\n","'use strict'\n\nmodule.exports = function($scope, $location, auth, sampleReuseFlow, ngToast, handlePaymentError) {\n 'ngInject'\n\n $scope.checkout = sampleReuseFlow.checkout\n $scope.auth = auth\n $scope.testTypes = sampleReuseFlow.checkout.sku.testTypes\n\n $scope.placePurchase = function() {\n if (!$scope.has_consented) {\n ngToast.create(\"We are unable to complete this purchase unless you check the Consent box.\")\n return\n }\n\n return $scope.checkout.placePurchase($scope.auth.currentUser)\n .then(function(res) {\n if ($scope.checkout.existingPhysicianOrder) {\n $location.path('/sample-reuse/confirmation').search({existing_physician: true})\n }\n else {\n $location.path('/sample-reuse/confirmation')\n }\n })\n .catch(function(res) {\n handlePaymentError(res, $scope.checkout, function() {\n sampleReuseFlow.goTo('/sample-reuse/pay', false)\n })\n })\n }\n}\n","'use strict'\n\nmodule.exports = function($scope, $modal, $location, sampleReuseFlow, waffle, sampleReuseService, testTypes) {\n 'ngInject'\n\n const sku = sampleReuseFlow.checkout.sku\n if (!sampleReuseService.eligibleForReuse(sku.name)) {\n // If sample reuse is not possible, go back to purchase flow\n $location.path('/purchase').search({sku: sku.name})\n }\n\n $scope.checkout = sampleReuseFlow.checkout\n $scope.goToNext = function() {\n sampleReuseFlow.goTo('/sample-reuse/consent', true)\n }\n\n $scope.showOrderingPhysicianModal = function() {\n $modal.open({\n templateUrl: '/kit_orders/modals/ordering_physician.html',\n size: 'md'\n })\n }\n\n $scope.onChangeSku = function(physicianOrder) {\n $location.path('/purchase').search({'sku': $scope.checkout.sku.name})\n }\n}\n","module.exports = function($scope, $translate, auth, $timeout) {\n \"ngInject\"\n\n $scope.shareLink = 'https://www.color.com/l/referral?code=' + auth.currentUser.referral_code\n $translate([\n 'ORDER_CONFIRMATION.SHARE_MODAL.SUBJECT',\n 'ORDER_CONFIRMATION.SHARE_MODAL.MAIL',\n 'ORDER_CONFIRMATION.SHARE_MODAL.TWEET'\n ], {\n shareLink: $scope.shareLink,\n senderFirstName: auth.currentUser.first_name\n }).then(function(translations) {\n $scope.twitterStatus = translations['ORDER_CONFIRMATION.SHARE_MODAL.TWEET']\n $scope.mailto = 'mailto:?subject='\n $scope.mailto += encodeURIComponent(translations['ORDER_CONFIRMATION.SHARE_MODAL.SUBJECT'])\n $scope.mailto += '&body=' + encodeURIComponent(translations['ORDER_CONFIRMATION.SHARE_MODAL.MAIL'])\n })\n\n $scope.copied = ''\n $scope.onCopySuccess = function(e) {\n $scope.$apply(function() {\n $scope.copied = 'Copied to clipboard'\n })\n $timeout(function() {\n $scope.copied = ''\n }, 2000)\n };\n}\n","'use strict'\n\nmodule.exports = function($scope, $location) {\n 'ngInject'\n\n $scope.existingPhysician = $location.search().existing_physician\n}\n","module.exports = angular.module('kitOrderDirectives', ['clrModal', 'clrRequest', 'kitOrderResource'])\n .directive('clrCreditCardForm', require('src/django_apps/kit_orders/js/directives/clr_credit_card_form'))\n .directive('clrKitOrderPreview', require('src/django_apps/kit_orders/js/directives/clr_kit_order_preview'))\n .directive('clrHealthcareProviderInput', require('src/django_apps/kit_orders/js/directives/clr_healthcare_provider_input'))\n .directive('clrHealthcareProviderShareResultsInput', require('src/django_apps/kit_orders/js/directives/clr_healthcare_provider_share_results_input'))\n .directive('clrHealthcareProvider', require('src/django_apps/kit_orders/js/directives/clr_healthcare_provider'))\n .directive('clrHealthcareProviderShareResults', require('src/django_apps/kit_orders/js/directives/clr_healthcare_provider_share_results'))\n .directive('clrPromocodeForm', require('src/django_apps/kit_orders/js/directives/clr_promocode_form'))\n .directive('clrPromoCodeInput', require('src/django_apps/kit_orders/js/directives/clr_promo_code_input'))\n .directive('clrOrderingPhysicianForm', require('src/django_apps/kit_orders/js/directives/clr_ordering_physician_form'))\n .directive('clrCheckoutBreadcrumb', require('src/django_apps/kit_orders/js/directives/clr_checkout_breadcrumb'))\n .directive('clrReferralCard', require('src/django_apps/kit_orders/js/directives/clr_referral_card'))\n .directive('clrCampaignTokenForm', require('src/django_apps/kit_orders/js/directives/clr_campaign_token_form'))\n .directive('clrSampleReuseBreadcrumb', require('src/django_apps/kit_orders/js/directives/clr_sample_reuse_breadcrumb'))\n .directive('stripeCheckoutButton', require('src/django_apps/kit_orders/js/directives/stripe_checkout_button'))\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n creditCard: '=',\n form: '=',\n initFocus: '='\n },\n templateUrl: '/kit_orders/directives/credit_card_form.html'\n }\n}\n","'use strict'\n\nmodule.exports = function(claimStore, promoCodeStore, kitPriceService) {\n 'ngInject'\n\n // TODO: remove orderFlowStyle when we merger order preview\n return {\n restrict: 'A',\n scope: {\n checkout: '=',\n orderFlowStyle: '=?',\n },\n templateUrl: '/kit_orders/order_preview.html',\n link: function(scope) {\n scope.claimStore = claimStore\n scope.promoCodeStore = promoCodeStore\n scope.kitPriceService = kitPriceService\n scope.partnerRequestsPayment = claimStore.claim && claimStore.claim.organization_name === 'NorthShore'\n }\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n healthcareProvider: \"=\"\n },\n require: '^form',\n templateUrl: '/kit_orders/directives/healthcare_provider_input.html',\n link: function(scope, elem, attr, ctrl) {\n scope.form = ctrl\n scope.hideRestrictions = attr.hasOwnProperty('hideRestrictions')\n }\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n healthcareProvider: \"=\"\n },\n require: '^form',\n templateUrl: '/kit_orders/directives/healthcare_provider_share_results_input.html',\n link: function(scope, elem, attr, ctrl) {\n scope.form = ctrl\n scope.hideRestrictions = attr.hasOwnProperty('hideRestrictions')\n }\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n provider: \"=\",\n popup: \"=\"\n },\n replace: true,\n templateUrl: '/kit_orders/healthcare_provider.html'\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n provider: \"=\",\n popup: \"=\"\n },\n replace: true,\n templateUrl: '/kit_orders/healthcare_provider_share_results.html'\n }\n}\n","'use strict'\n\nmodule.exports = function($translate, ngToast, promoCodeStore, sku) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/kit_orders/directives/promocode_form.html',\n scope: {\n flexStyle: '@',\n testRequested: '=?'\n },\n link: function(scope, elem, attr, ctlr) {\n scope.promoCodeStore = promoCodeStore\n scope.promoCode = {}\n\n scope.togglePromotionalCodeInput = function() {\n scope.showPromotionalCodeInput = !scope.showPromotionalCodeInput\n }\n\n scope.removePromotionalCode = function() {\n scope.promoCode.code = ''\n scope.showPromotionalCodeInput = false\n promoCodeStore.clear()\n }\n\n scope.updateCode = function() {\n promoCodeStore.clear()\n promoCodeStore.updateCode(scope.promoCode.code, true).then(function(code) {\n const selectedSku = sku[scope.testRequested]\n if (scope.testRequested && !promoCodeStore.promoAppliesToSku(selectedSku)) {\n $translate('SKU.' + selectedSku.name)\n .then(function(translatedTestName) {\n ngToast.create({ className: 'error', content: \"The promotion code you entered does not cover the \" + translatedTestName})\n })\n scope.removePromotionalCode()\n } else if (code.can_redeem) {\n $translate('BILLING.TOASTS.PROMO_CODE_APPLIED')\n .then(function(translation) {\n ngToast.create(translation)\n })\n }\n })\n }\n\n // Adjusts promocode input setting if promocodeStore is dynamically updated\n scope.$watch('promoCodeStore.promotionalCode.can_redeem', function(canRedeem) {\n if (canRedeem) {\n scope.showPromotionalCodeInput = true\n // this variable helps avoid editing promoCodeStore.promotionalCode directly\n scope.promoCode = { code: promoCodeStore.promotionalCode.code }\n }\n }, true)\n }\n }\n}\n","module.exports = function(promoCodeStore, $q, PromoCodeMismatchModal) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n require: '^form',\n templateUrl: '/kit_orders/directives/promo_code_input.html',\n scope: {\n sku: '=',\n },\n link: function(scope, element, attrs, formCtrl) {\n // promo code input is designed to register an async validator\n // so when the parent form is submitted, the promo code is validated\n // asynchronously. The addAsyncValidator method from clr-form is used to allow\n // the parent form to wait for all validator promises to resolve\n // before checking the validity of the form.\n\n scope.promoCodeStore = promoCodeStore\n scope.showPromotionalCodeInput = promoCodeStore.promotionalCode && promoCodeStore.promotionalCode.can_redeem\n scope.promoCode = { code: promoCodeStore.promotionalCode.code }\n // Adjusts promocode input setting if promocodeStore is dynamically updated\n scope.$watch('promoCodeStore.promotionalCode.can_redeem', function(canRedeem) {\n if (canRedeem) {\n scope.showPromotionalCodeInput = true\n // this variable helps avoid editing promoCodeStore.promotionalCode directly\n scope.promoCode.code = promoCodeStore.promotionalCode.code\n }\n }, true)\n\n formCtrl.addAsyncValidator('promo-code', 'isValidPromo', function(modelVal, viewVal) {\n const value = modelVal || viewVal\n\n if (promoCodeStore.promotionalCode && promoCodeStore.promotionalCode.can_redeem) {\n // valid if code has already been applied and is in the field\n if (promoCodeStore.promotionalCode.code == value) {\n return $q.when(true)\n }\n // if there is a code and it isn't the one in the field, clear the\n // promoCodeStore\n promoCodeStore.clear()\n }\n\n // valid if no input\n if (!scope.showPromotionalCodeInput) {\n return $q.when(true)\n }\n // valid if input is blank\n if (!value) {\n return $q.when(true)\n }\n\n // apply the code\n promoCodeStore.clear()\n return promoCodeStore.updateCode(value, false).then(function(code) {\n if (code.can_redeem && scope.sku && !promoCodeStore.promoAppliesToSku(scope.sku)) {\n const promoCodeMismatchPromise = PromoCodeMismatchModal.open(scope.sku.name, code.external_sku_list_names).result\n promoCodeMismatchPromise.then(function(resetPromoCode) {\n scope.removePromotionalCode()\n })\n }\n })\n })\n\n scope.removePromotionalCode = function() {\n scope.promoCode.code = ''\n scope.showPromotionalCodeInput = false\n promoCodeStore.clear()\n }\n\n scope.togglePromotionalCodeInput = function() {\n scope.showPromotionalCodeInput = !scope.showPromotionalCodeInput\n }\n\n scope.updateCode = function() {\n // triggers validation by committing the form values\n formCtrl.$commitViewValue()\n }\n }\n }\n}\n","/**\n * @prettier\n */\n\nmodule.exports = function(\n $q,\n $translate,\n $http,\n $filter,\n resolvedPromise,\n ngToast,\n claimStore,\n HealthcareProvider,\n PhysicianOrder,\n promoCodeStore,\n requisitionStore,\n sku,\n textModal\n) {\n 'ngInject';\n\n return {\n restrict: 'E',\n scope: {\n physicianOrder: '=',\n withoutHealthcareProviders: '=',\n healthcareProviders: '=',\n withColorOrderingPhysician: '=',\n sendCopyToHealthcareProviders: '=',\n onPurchase: '=?',\n onSubmit: '=',\n skuTestTypes: '=',\n onChangeSku: '=?',\n existingPhysicianOrder: '=?',\n },\n templateUrl: '/kit_orders/directives/clr_ordering_physician_form.html',\n link: function(scope, element, attrs, formCtrl) {\n // default to populated requisition number if cookie is present\n const storedRequisition = requisitionStore.get();\n if (storedRequisition) {\n scope.withColorOrderingPhysician = false;\n scope.physicianOrder.requisition_number = storedRequisition;\n scope.physicianOrder.$get();\n }\n\n // we allow up to two additional healthcare providers\n scope.canAddHealthcareProvider = function() {\n return (\n scope.healthcareProviders.filter(function(provider) {\n return !provider.id && !provider.provider_id;\n }).length < 2\n );\n };\n\n scope.addHealthcareProvider = function() {\n if (!scope.canAddHealthcareProvider()) {\n throw new Error('Cannot add another healthcare provider.');\n }\n scope.healthcareProviders.push(new HealthcareProvider());\n };\n\n scope.removeHealthcareProvider = function(index) {\n scope.healthcareProviders.splice(index, 1);\n if (scope.healthcareProviders.length == 0) {\n scope.addHealthcareProvider();\n }\n };\n\n // ensure there is at least one healthcare provider to edit when\n // sendCopyToHealthcareProviders is toggled.\n scope.$watch('sendCopyToHealthcareProviders', function(sendCopy) {\n if (sendCopy && scope.healthcareProviders.length == 0) {\n scope.addHealthcareProvider();\n }\n });\n\n scope.$watch('physicianOrder.promocode_for_payment', function(promocode) {\n if (promocode) {\n promoCodeStore.updateCode(promocode);\n }\n });\n\n scope.$watch('physicianOrder.claim_for_payment', function(claim) {\n if (claim) {\n claimStore.setClaim(claim);\n }\n });\n\n scope.applyRequisitionCode = function(callback) {\n if (!scope.physicianOrder.requisition_number || scope.withColorOrderingPhysician) {\n if (callback) {\n return $q.when(callback());\n }\n return resolvedPromise();\n }\n\n function setPhysicianOrder(data) {\n for (const key in data) {\n scope.physicianOrder[key] = data[key];\n }\n }\n\n function openTestTypeMismatchModal(testRequested) {\n const skuTests = $filter('joinEnglishList')(\n scope.skuTestTypes.map(function(testType) {\n return 'the ' + $filter('translate')('SKU.' + testType);\n })\n );\n return $translate(\n [\n 'ORDERING_PHYSICIAN.HEALTH_CONDITION_MISMATCH.T',\n 'ORDERING_PHYSICIAN.HEALTH_CONDITION_MISMATCH.P',\n 'ORDERING_PHYSICIAN.HEALTH_CONDITION_MISMATCH.BUTTON',\n ],\n {\n currentTest: sku[scope.skuTestTypes[0]].productName,\n orderedTest: sku[testRequested].productName,\n testDesc:\n /* eslint-disable indent */\n scope.skuTestTypes.length > 1\n ? $filter('translate')(\n 'ORDERING_PHYSICIAN.HEALTH_CONDITION_MISMATCH.P_TEST_DESC',\n { tests: skuTests }\n )\n : '',\n /* eslint-enable indent */\n }\n ).then(function(translations) {\n let buttonText = '';\n if (scope.onChangeSku) {\n buttonText = translations['ORDERING_PHYSICIAN.HEALTH_CONDITION_MISMATCH.BUTTON'];\n }\n return textModal.open(\n translations['ORDERING_PHYSICIAN.HEALTH_CONDITION_MISMATCH.T'],\n translations['ORDERING_PHYSICIAN.HEALTH_CONDITION_MISMATCH.P'],\n buttonText\n ).result;\n });\n }\n\n return $http\n .get('/api/v1/physician_orders/' + scope.physicianOrder.requisition_number)\n .then(function(res) {\n const data = res.data;\n if (data.state != 'claimable' || data.type != 'sample_ordered') {\n ngToast.create({ className: 'error', content: msgRedeemedRequisition });\n scope.clearRequisitionCode(true);\n } else if (\n !$filter('eqSet')(\n new Set(sku[data.test_requested].testTypes),\n new Set(scope.skuTestTypes)\n )\n ) {\n return openTestTypeMismatchModal(data.test_requested)\n .then(function() {\n if (scope.onChangeSku) {\n scope.onChangeSku(data);\n setPhysicianOrder(data);\n }\n })\n .catch(function() {\n scope.clearRequisitionCode(true);\n });\n } else {\n setPhysicianOrder(data);\n if (callback) {\n return callback();\n }\n }\n })\n .catch(() =>\n ngToast.create({\n className: 'error',\n content: msgUnknownRequisition,\n })\n );\n };\n\n scope.clearRequisitionCode = function(keepInput) {\n requisitionStore.clear();\n const oldRequisitionNumber = scope.physicianOrder.requisition_number;\n scope.physicianOrder = new PhysicianOrder();\n if (keepInput) {\n scope.physicianOrder.requisition_number = oldRequisitionNumber;\n }\n };\n\n // loops over profiles in physicianOrder and returns all formal names\n scope.requisitionProviders = function() {\n const profiles = ['placed_by_profile', 'ordering_physician_profile'];\n const providers = [];\n for (let i = 0; i < profiles.length; i++) {\n const profile = scope.physicianOrder[profiles[i]];\n if (profile && providers.indexOf(profile.formal_name) < 0) {\n providers.push(profile.formal_name);\n }\n }\n return providers;\n };\n\n scope.submitting = false;\n scope.goToNext = function() {\n scope.submitting = true;\n return scope.applyRequisitionCode(scope.onSubmit).finally(function() {\n scope.submitting = false;\n });\n };\n\n let msgUnknownRequisition;\n let msgRedeemedRequisition;\n $translate([\n 'ORDERING_PHYSICIAN.TOASTS.REDEEMED_REQUISITION',\n 'ORDERING_PHYSICIAN.TOASTS.UNKNOWN_REQUISITION',\n ]).then(function(translations) {\n msgRedeemedRequisition = translations['ORDERING_PHYSICIAN.TOASTS.REDEEMED_REQUISITION'];\n msgUnknownRequisition = translations['ORDERING_PHYSICIAN.TOASTS.UNKNOWN_REQUISITION'];\n });\n },\n };\n};\n","module.exports = function() {\n 'ngInject'\n return {\n scope: {\n step: '@'\n },\n templateUrl: '/kit_orders/_checkout_breadcrumb.html',\n controller: function($scope, KitCheckoutFlow) {\n 'ngInject'\n $scope.initialLoggedIn = KitCheckoutFlow.initialLoggedIn\n }\n }\n}\n","'use strict'\n\nmodule.exports = function (auth, device) {\n 'ngInject'\n\n return {\n restrict: 'EA',\n link: function(scope, elem, attr) {\n // Safari doesn't support Clipboard.js.\n scope.showCopyLink = !device.isSafari\n scope.referralCode = auth.currentUser.referral_code\n if (!auth.currentUser.should_see_referral_card) {\n elem.remove()\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($http, $translate, auth, ngToast, claimStore, promoCodeStore, sku) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/kit_orders/directives/campaign_token_form.html',\n scope: {\n requisitionNumber: '=?'\n },\n link: function(scope, elem, attr, ctlr) {\n scope.auth = auth\n\n claimStore.getClaim().then(claim => {\n scope.claim = claim\n })\n\n // The page_size here allows for more than the default 100. We have >= 109 results,\n // and this will continue to grow.\n // We can keep pulling more content, but eventually the UI dropdown will start failing.\n // In addition, the API request is becoming slower. (Currently takes 280 msec)\n // FIXME: Refactor to use typeahead in UI, along with async lookup.\n $http.get('/api/v1/campaign_tokens?page_size=1000').then(res => {\n scope.campaignTokens = res.data.results\n })\n\n scope.toggle = () => {\n scope.showInput = !scope.showInput\n }\n\n scope.removeToken = () => {\n scope.showInput = false\n scope.claim = null\n claimStore.clearClaim()\n }\n\n scope.applyCampaignToken = () => {\n $http.patch('/api/v1/benefits/get_or_create_claim_from_campaign', {\n identifier: scope.requisitionNumber,\n campaign_token: scope.data.campaign_token\n }).then(res => {\n scope.showInput = false\n scope.claim = res.data\n claimStore.setClaim(res.data)\n })\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n return {\n restrict: 'E',\n require: '^form',\n scope: {\n step: '@'\n },\n templateUrl: '/kit_orders/sample_reuse/breadcrumb.html',\n }\n}\n","'use strict'\n\nmodule.exports = function($location, $window, Stripe, handleIntlShipping) {\n 'ngInject'\n\n const stripeButton = 'stripe-button'\n\n return {\n restrict: 'E',\n scope: {\n checkout: '=',\n text: '@'\n },\n templateUrl: '/kit_orders/directives/stripe_checkout_button.html',\n link: function(scope, elem) {\n const stripeHandler = $window.StripeCheckout.configure({\n key: Stripe.key,\n locale: 'auto',\n shippingAddress: true,\n billingAddress: true,\n token: function(token_response, address_args) {\n scope.checkout.placePurchaseWithStripeCheckout(token_response, address_args).then(function(res) {\n $location.path('/purchase/' + res.purchase_number + '/confirmation')\n }).catch(function(res) {\n handleIntlShipping(res, 'StripeCheckout')\n })\n }\n })\n\n scope.startStripe = function() {\n stripeHandler.open({\n name: \"Color\",\n description: \"BRCA Test\",\n image: \"https://prod-static.color.com/images/site/box_sleeve_small.png\",\n zipCode: false,\n amount: scope.checkout.getTotalPriceDollars() * 100 // stripe takes cents\n });\n }\n }\n }\n}\n","/**\n * @ngdoc module\n * @name kitOrderResource\n *\n * @description\n * The `kitOrderResource` provides resources for\n * variant classification API.\n */\nmodule.exports = angular.module('kitOrderResource', ['clrResource'])\n\n /**\n * @ngdoc service\n * @name KitOrder\n * @memberof kitOrderResource\n *\n * @description\n * A resource for `kit_orders` REST API.\n */\n .factory('KitOrder', function(resource) {\n return resource(\n '/api/v1/kit_orders/:order_number'\n , { order_number: '@order_number', format: 'json' }\n )\n })\n\n .factory('Purchase', function(resource) {\n return resource(\n '/api/v1/purchases/:purchase_number'\n , { purchase_number: '@purchase_number', format: 'json' }\n )\n })\n\n /**\n * @ngdoc service\n * @name OrderPendingApproval\n * @memberof kitOrderResource\n *\n * @description\n * A resource for `orders_pending_approval` REST API.\n */\n .factory('OrderPendingApproval', function(resource) {\n return resource('/api/v1/orders_pending_approval', {format: 'json'})\n })\n\n /**\n * @ngdoc service\n * @name OrderLog\n * @memberof OrderLogResource\n *\n * @description\n * A resource for `order_logs` REST API.\n */\n .factory('OrderLog', function(resource) {\n return resource('/api/v1/order_logs', { format: 'json', page_size: 1000 })\n })\n\n /**\n * @ngdoc service\n * @name KitStatus\n * @memberof kitOrderResource\n *\n * @description\n * A resource for `kit_status` REST API.\n */\n .factory('KitStatus', function(resource) {\n return resource(\n '/api/v1/kit_status'\n , { format: 'json' }\n )\n })\n\n /**\n * @ngdoc service\n * @name HealthcareProvider\n * @memberof kitOrderResource\n *\n * @description\n * A resource for `healthcare_providers` REST API.\n */\n .factory('HealthcareProvider', function(resource) {\n return resource(\n '/api/v1/healthcare_providers/:id'\n , { id: '@id', format: 'json' }\n )\n })\n\n /**\n * @ngdoc service\n * @name PromotionalCode\n * @memberof kitOrderResource\n *\n * @description\n * A resource for `promotional_codes` REST API.\n */\n .factory('PromotionalCode', function(resource) {\n return resource(\n '/api/v1/promotional_codes/:code'\n , { code: '@code', format: 'json' }, {\n get: {\n method : 'GET',\n cache : true\n },\n sync: {\n method : 'GET'\n }\n }\n )\n })\n\n /**\n * @ngdoc service\n * @name Claim\n * @memberof kitOrderResource\n *\n * @description\n * A resource for Claims REST API.\n */\n .factory('Claim', function(resource) {\n return resource(\n '/api/v1/claims/:token'\n , { token: '@token', format: 'json' }\n , { get: { method : 'GET', cache : true }, sync: { method : 'GET' } }\n )\n })\n\n /**\n * @ngdoc service\n * @name Waitlist\n * @memberof kitOrderResource\n *\n * @description\n * A resource for `waitlists` REST API.\n */\n .factory('Waitlist', function(resource) {\n return resource(\n '/api/v1/waitlists/:id'\n , { id: '@id', format: 'json' }\n )\n })\n","module.exports = angular.module('kitOrderServices', [\n 'ngCookies', 'ngToast', 'pascalprecht.translate',\n 'clrAuth', 'clrConstant', 'clrLocation', 'clrModal',\n 'clrRequest', 'clrResource', 'clrStripe', 'clrGeographical',\n 'kitOrderResource', 'orderingPhysicianResource', 'userResource'])\n\n // Sets 'code' cookie if given in query params.\n .run(function($location, promoCodeStore, associatedSample, accessionNumber, kitBarcode, requisitionStore) {\n const search = $location.search()\n const promoCode = search.code\n const hideFailure = search.hide_failure\n if (promoCode) {\n $location.search('code', null)\n if (hideFailure) {\n $location.search('hide_failure', null)\n }\n promoCodeStore.persistCode(promoCode)\n }\n promoCodeStore.init(hideFailure)\n requisitionStore.initFromQueryParams()\n associatedSample.initFromQueryParams()\n accessionNumber.initFromQueryParams();\n kitBarcode.initFromQueryParams();\n })\n\n // Sets 'claimToken' cookie if given in query params.\n .run(function($location, claimStore, ngToast) {\n const search = $location.search();\n const claimToken = search.claim_token || claimStore.get();\n const hideFailure = search.hide_failure;\n\n if (claimToken) {\n $location.search('claim_token', null);\n if (hideFailure) {\n $location.search('hide_failure', null);\n }\n return claimStore.getClaim(claimToken).then(claim => {\n if (!hideFailure && (!claim || !claim.is_redeemable)) {\n ngToast.create('You are no longer eligible for this Color benefit. Please contact Color Support for assistance.');\n }\n })\n }\n })\n\n .run(function($rootScope, KitCheckoutFlow) {\n $rootScope.$on(KitCheckoutFlow.startEventName, function() {\n KitCheckoutFlow.init(true)\n })\n $rootScope.$on(KitCheckoutFlow.resetEventName, function() {\n KitCheckoutFlow.init(false)\n })\n })\n\n .run(function($rootScope, sampleReuseFlow) {\n $rootScope.$on(sampleReuseFlow.startEventName, function() {\n sampleReuseFlow.init(true)\n })\n $rootScope.$on(sampleReuseFlow.resetEventName, function() {\n sampleReuseFlow.init(false)\n })\n })\n\n .service('promoCodeStore', require('./services/promo_code_store'))\n .service('claimStore', require('./services/claim_store'))\n// kitPriceService provides methods for getting the current price, including\n// price promotions.\n .service('kitPriceService', require('./services/kit_price_service'))\n// Checkout provides a base Checkout implementation\n .service('Checkout', require('./services/checkout'))\n .factory('KitCheckout', require('./services/kit_checkout'))\n .factory('jsLazyLoader', require('./services/js_lazy_loader'))\n .service('canAddDependents', require('./services/can_add_dependents'))\n .service('requisitionStore', require('./services/requisition_store'))\n .service('associatedSample', require('./services/associated_sample'))\n .service('accessionNumber', require('./services/accession_number'))\n .service('kitBarcode', require('./services/kit_barcode'))\n .service('splitName', require('./services/split_name'))\n .service('healthcareProviderStore', require('./services/healthcare_provider_store'))\n .service('handlePaymentError', require('./services/handle_payment_error'))\n .service('KitCheckoutFlow', require('./services/kit_checkout_flow'))\n .service('sampleReuseFlow', require('./services/sample_reuse_flow'))\n .service('DependentsClaimManager', require('./services/dependents_claim_manager'))\n .service('sampleReuseService', require('./services/sample_reuse_service'))\n .service('physicianOrder', require('./services/physician_order'))\n .service('handleIntlShipping', require('./services/handle_intl_shipping'))\n","'use strict'\n\nmodule.exports = function($translate, $cookies, waffle, resolvedPromise, ngToast, PromotionalCode, canAddDependents) {\n 'ngInject'\n\n this.init = function(hideFailure) {\n if (!this._initializePromise) {\n if (!this.promotionalCode) {\n this.promotionalCode = new PromotionalCode()\n }\n this._initializePromise = resolvedPromise(this.promotionalCode)\n if ($cookies.get('code')) {\n this._initializePromise = this.updateCode($cookies.get('code'), true, !!hideFailure)\n }\n }\n return this._initializePromise\n }\n\n this.clear = function() {\n this.stopPersistingCode()\n this.promotionalCode = new PromotionalCode()\n }\n\n // bypass the cache to resync\n this.sync = function() {\n PromotionalCode.sync({ code: this.promotionalCode.code }, angular.bind(this, function(code) {\n this.promotionalCode = code\n }));\n }\n\n // re-fetches the existing code.\n this.updateCode = function(code, silentSuccess, silentFailure) {\n this.code = code\n this.promotionalCode = PromotionalCode.get(\n { code: code },\n this._onSuccessHandler(silentSuccess, silentFailure),\n this._onFailureHandler(silentFailure)\n )\n return this.promotionalCode.$promise\n }\n\n // Sets promotional code that's already fetched.\n this.setPromotionalCode = function(promoCode) {\n this.promotionalCode = new PromotionalCode(promoCode)\n this._onSuccessHandler(true)(promoCode)\n }\n\n this.canAddDependents = function() {\n return canAddDependents(this)\n }\n\n // Determine if the current promo code can be applied to a sku.\n // If no sku is specified, no sku-specific promo code is valid.\n this.promoAppliesToSku = function(sku) {\n const promoCode = this.promotionalCode\n if (!promoCode || !promoCode.can_redeem) {\n return false // promo code is not valid for any sku\n }\n if (!promoCode.sku_list || promoCode.sku_list.length < 1) {\n return true // promo code is valid for all skus\n }\n if (sku && promoCode.sku_list.indexOf(sku.name) >= 0) {\n return true // our sku matches sku-specific promo code\n }\n return false // promo code is sku-specific, but we have no matching sku\n }\n\n this._onSuccessHandler = function(silentSuccess, silentFailure) {\n return angular.bind(this, function(res) {\n if (!res.can_redeem) {\n this._onFailureHandler(silentFailure)(res)\n return\n }\n if (!silentSuccess) {\n $translate(['BILLING.TOASTS.PROMO_CODE_APPLIED'])\n .then(function(translations) {\n ngToast.create(translations['BILLING.TOASTS.PROMO_CODE_APPLIED'])\n })\n }\n })\n }\n\n this._onFailureHandler = function(silentFailure) {\n return angular.bind(this, function(res) {\n // reset the promoCodeStore\n this.clear()\n let msg\n // if status field is defined, it is http level error.\n if (res.status) {\n msg = 'BILLING.TOASTS.UNKNOWN_PROMO_CODE'\n } else if (res.remaining_redemptions_count === 0) {\n msg = 'BILLING.TOASTS.PROMO_CODE_ALREADY_REDEEM'\n } else {\n msg = 'BILLING.TOASTS.PROMO_CODE_UNUSABLE'\n }\n if (!silentFailure) {\n $translate([msg])\n .then(function(translations) {\n ngToast.create({ className: 'error', content: translations[msg] })\n })\n }\n })\n }\n\n this.persistCode = function(code) {\n $cookies.put('code', code)\n }\n\n this.stopPersistingCode = function() {\n // Do not clear the code from cookies even if it is unusable.\n // In ordering_physician_controller.js, we will place it in the query params\n // and then clear the code there instead, and let the React purchasing flow\n // handle the unusable code.\n const search = new URLSearchParams(window.location.search)\n const originIsFtpEmail = search.get('utm_content') === 'FTP_application_approved_(to_invitee)' && search.get('utm_source') === 'mailgun'\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n if (waffle.switch_is_active('use-react-genetics-purchasing-flow-2023-03-27') && originIsFtpEmail) {\n return\n }\n\n $cookies.remove('code')\n }\n\n this.isEligibleForPricingModifiers = function() {\n const promo = this.promotionalCode\n if (!promo) {\n return true\n }\n if (promo.is_family_testing_code) {\n return false\n }\n if (promo.campaign && promo.campaign.company_name) {\n return false\n }\n return true\n }\n}\n","'use strict';\n\nmodule.exports = function(cookiePersistedObject, $q, Claim, auth, requisitionStore, PhysicianOrder, sku) {\n 'ngInject';\n\n const store = cookiePersistedObject('claimToken');\n\n store.clearClaim = () => {\n store.clear()\n store.claim = null\n }\n\n store.setClaim = function(claim) {\n if (!claim.is_redeemable) {\n store.clear();\n return;\n }\n\n this.set(claim.token);\n this.claim = claim;\n }\n\n /**\n * Extract claim from token via api. Should never access claim directly\n * args: claimToken: nullable string\n */\n store.getClaim = function(claimToken) {\n const token = claimToken || store.get();\n\n if (!token || !token.length) {\n return $q.when();\n }\n\n this.set(token)\n if (store.claim && store.claim.token == token) {\n return $q.when(store.claim)\n }\n\n return Claim.get({ token }).$promise.then(claim => {\n store.setClaim(claim)\n return claim;\n }).catch($q.reject);\n }\n\n store.getNonUpgradeSkuDiscount = function(givenSku) {\n if (!store.claim) {\n return\n }\n const claim = store.claim\n\n for (const skuDiscount of claim.sku_discounts) {\n if (skuDiscount.sku === givenSku.name) {\n return skuDiscount\n }\n }\n }\n\n return store;\n}\n","'use strict'\n\n// kitPriceService provides methods for getting the current price.\n// This service does not have context about checkout, i.e. SKU, quantity.\nmodule.exports = function(standalonePriceDollars, promoCodeStore, claimStore, standaloneProviderServicePriceDollars, sampleReuseService, modifierBrcaUpgradePriceDollars, testTypes, auth) {\n 'ngInject'\n\n // returns kit price\n // If no SKU is given, it will show standalone test price.\n this.getAdvertisedKitPriceDollars = function(sku) {\n const custom_price_dollars = this.getCustomKitPriceDollars(sku)\n if (custom_price_dollars) {\n return custom_price_dollars\n }\n return sku ? sku.priceDollars : standalonePriceDollars\n }\n\n this.getProviderServicePriceDollars = function(sku) {\n return sku ? sku.providerServicePriceDollars : standaloneProviderServicePriceDollars\n }\n\n this.getDisplayedKitPrice = function(sku) {\n let kitPrice\n\n const claim = claimStore.claim\n\n const skuDiscount = claimStore.getNonUpgradeSkuDiscount(sku, false)\n if (skuDiscount) {\n kitPrice = skuDiscount.copay_cents / 100.0\n }\n\n if (kitPrice === undefined) {\n const baseKitPrice = this.getAdvertisedKitPriceDollars(sku)\n const modifiedKitPrice = baseKitPrice + this.getModifierDiscountDollars(sku)\n kitPrice = Math.max(0, modifiedKitPrice - (this.isFreeShippingPromoCode(sku) ? 0 : this.getPromoCodeDiscountDollars(sku, modifiedKitPrice)))\n }\n if (kitPrice % 1 != 0) {\n return kitPrice.toFixed(2)\n }\n return kitPrice.toFixed(0)\n }\n\n this.isFreeShippingPromoCode = function(sku) {\n return promoCodeStore.promoAppliesToSku(sku) && promoCodeStore.promotionalCode && promoCodeStore.promotionalCode.code == 'SHIPPING18'\n }\n\n this.isZero = function(sku) {\n return this.getDisplayedKitPrice(sku) == \"0\"\n }\n\n this.hasPromoCode = function(sku) {\n return this.getPromoCodeDiscountDollars(sku) > 0\n }\n\n // Get the current promo code, but only if it is redeemable\n // and can be applied to the specified sku.\n this.getValidPromoCode = function(sku) {\n if (promoCodeStore.promoAppliesToSku(sku)) {\n return promoCodeStore.promotionalCode\n } else {\n return null\n }\n }\n\n // Check if the current promo code is for free shipping, used primarily\n // to not show price adjustments for the free shipping Turbo experiment\n this.isFreeShippingPromoCode = function(sku) {\n return promoCodeStore.promoAppliesToSku(sku) && promoCodeStore.promotionalCode && promoCodeStore.promotionalCode.code == 'SHIPPING18'\n }\n\n // Get promo code discount amount. This can exceed the kit price amount,\n // e.g. the fixed discount amount is greater than the kit price amount, or\n // the percent discount is 100% and there is also a fixed discount amount.\n this.getPromoCodeDiscountDollars = function(sku, baseKitPrice) {\n const promo_code = this.getValidPromoCode(sku)\n if (!promo_code) {\n return 0\n }\n\n if (!baseKitPrice) {\n baseKitPrice = this.getAdvertisedKitPriceDollars(sku)\n }\n let discountCents = 0\n\n // percent discount is first applied to the advertised kit price\n if (promo_code.percent_discount) {\n // Math.floor mimics python integer division that's used on the server side\n discountCents += Math.floor(baseKitPrice * promo_code.percent_discount)\n }\n\n // finally the fixed portion of the promo code is applied.\n if (promo_code.value_cents) {\n discountCents += promo_code.value_cents\n }\n return discountCents / 100\n }\n\n this.getCustomKitPriceDollars = function(sku) {\n const promo_code = this.getValidPromoCode(sku)\n if (!promo_code) {\n return false\n }\n const custom_price_cents = promo_code.custom_kit_price_cents\n if (!custom_price_cents) {\n return false\n }\n return custom_price_cents / 100\n }\n\n // Get non promo code discounts that should be displayed\n this.getModifierDiscountDollars = function(sku) {\n const skuName = sku.name\n if (auth.isLoggedIn && skuName in auth.currentUser.pricing_modifiers) {\n return auth.currentUser.pricing_modifiers[skuName]['price_cents'] / 100\n }\n return 0\n }\n}\n","'use strict'\n\nmodule.exports = function($filter, promoCodeStore, claimStore, kitPriceService, testTypes, sku) {\n 'ngInject'\n\n function Checkout() {\n this.shippingAddress = null\n this._quantity = 1\n this.sku = sku[testTypes.hereditary30]\n }\n\n Checkout.subclass = function() {\n function klass() {\n Checkout.call(this)\n }\n klass.prototype = Object.create(Checkout.prototype)\n klass.prototype.super = Checkout\n return klass\n }\n\n Checkout.prototype.getMaxKitCount = function() {\n if (this.physicianOrder && this.physicianOrder.test_requested == testTypes.breastOvarian19) {\n return 1\n }\n return 6\n }\n\n Checkout.prototype.getQuantity = function() {\n if (this._quantity > this.getMaxKitCount()) {\n this._quantity = this.getMaxKitCount()\n }\n return this._quantity\n }\n\n Checkout.prototype.incrementKit = function() {\n if (this._quantity < this.getMaxKitCount()) {\n this._quantity += 1\n }\n }\n\n Checkout.prototype.decrementKit = function() {\n if (this._quantity > 1) {\n this._quantity -= 1\n }\n }\n\n Checkout.prototype.getShippingCountry = function() {\n if (this.shippingAddress && this.shippingAddress.country) {\n return this.shippingAddress.country\n }\n return \"US\" // default country\n }\n\n // price of shipping for one kit\n Checkout.prototype.getUnitShippingPriceCents = function() {\n if (this.isSampleReuse) {\n return 0;\n }\n return $filter('shippingChargeCents')(this.getShippingCountry())\n }\n\n // total shipping cost for this purchase\n Checkout.prototype.getShippingPriceDollars = function() {\n return this.getUnitShippingPriceCents() * this.getQuantity() / 100\n }\n\n Checkout.prototype.getKitPriceDollarsAfterModifiers = function() {\n // No modifiers get applied with Checkout. KitCheckout implements this.\n return kitPriceService.getAdvertisedKitPriceDollars(this.sku)\n }\n\n // total kit cost for this purchase\n Checkout.prototype.getKitSubtotalDollars = function() {\n return this.getKitPriceDollarsAfterModifiers() * this.getQuantity()\n }\n\n // total test cost for this purchase (a part of breakdown of total kit cost)\n Checkout.prototype.getTestSubtotalDollars = function() {\n return this.getKitSubtotalDollars() - this.getProviderServiceSubtotalDollars()\n }\n\n // total provider service cost for this purchase (a part of breakdown of total kit cost)\n Checkout.prototype.getProviderServiceSubtotalDollars = function() {\n if (this.existingPhysicianOrder) {\n return 0;\n }\n return kitPriceService.getProviderServicePriceDollars(this.sku) * this.getQuantity()\n }\n\n // kit subtotal\n Checkout.prototype.getItemizedKitPriceDollars = function() {\n if (this.getQuantity() == 0) {\n return 0\n }\n const total = 0\n const kitPrice = this.getKitPriceDollarsAfterModifiers()\n const unitShippingPriceDollars = this.getUnitShippingPriceCents() / 100\n const itemizedKitPrices = []\n for (let i = 0; i < this.getQuantity(); i++) {\n const item = {\n kitPriceSubtotalDollars: kitPrice,\n appliedDiscountDollars: 0,\n unitShippingPriceDollars: unitShippingPriceDollars,\n totalDollars: 0\n }\n item.totalDollars = item.kitPriceSubtotalDollars + unitShippingPriceDollars\n itemizedKitPrices.push(item)\n }\n\n // 2. discounts\n const sku = this.sku\n const claim = claimStore.claim\n if ((claim && claim.is_redeemable)) {\n // 2a. claim\n let numRedemptions = this.getQuantity();\n if (claim && claim.remaining_redemptions_count !== null) {\n numRedemptions = Math.min(numRedemptions, claim.remaining_redemptions_count);\n }\n itemizedKitPrices.reverse().forEach((item, index) => {\n let skuDiscount\n const isForSelf = this.purchase && this.purchase.kit_for_self\n if (numRedemptions != 0) {\n skuDiscount = claimStore.getNonUpgradeSkuDiscount(sku)\n numRedemptions -= 1;\n }\n\n if (!skuDiscount) {\n return;\n }\n\n const shipping = Math.max(\n 0,\n item.unitShippingPriceDollars - skuDiscount.shipping_subsidy_cents / 100.0\n );\n\n const previousTotal = item.totalDollars;\n\n item.kitPriceSubtotalDollars = skuDiscount.copay_cents / 100.0;\n item.totalDollars = item.kitPriceSubtotalDollars + shipping;\n item.appliedDiscountDollars = previousTotal - item.totalDollars;\n\n });\n } else {\n // 2b. promo code\n const promo_code = promoCodeStore.promotionalCode\n const remaining_redemptions = promo_code.remaining_redemptions_count\n let numRedemptions = this.getQuantity()\n if (!promo_code.can_redeem) {\n numRedemptions = 0\n } else if (remaining_redemptions !== null) {\n numRedemptions = Math.min(numRedemptions, remaining_redemptions)\n }\n\n itemizedKitPrices.reverse()\n .map(function(item) {\n if (numRedemptions == 0) {\n return\n }\n // family testing code does not stack\n if (promo_code.is_family_testing_code) {\n item.kitPriceSubtotalDollars = kitPrice\n item.totalDollars = kitPrice + item.unitShippingPriceDollars\n }\n const maxPromoCodeDiscountDollars = kitPriceService.getPromoCodeDiscountDollars(sku, item.kitPriceSubtotalDollars)\n const appliedPromoCodeDollars = Math.min(item.totalDollars, maxPromoCodeDiscountDollars)\n numRedemptions -= 1\n item.appliedDiscountDollars = appliedPromoCodeDollars\n item.totalDollars -= appliedPromoCodeDollars\n })\n }\n\n return itemizedKitPrices\n }\n\n // kit subtotal, less promo price discount if any (does not include promo code discount)\n Checkout.prototype.getKitPriceDollars = function() {\n return this.getItemizedKitPriceDollars().reduce(function(sum, item) {\n return sum + item.kitPriceSubtotalDollars\n }, 0)\n }\n\n // shipping + kit subtotal - promo price discount (does not include promo code discount)\n Checkout.prototype.getSubtotalPriceDollars = function() {\n return this.getKitPriceDollars() + this.getShippingPriceDollars()\n },\n\n // applied promo code amount\n Checkout.prototype.getAppliedDiscountDollars = function() {\n return this.getItemizedKitPriceDollars().reduce(function(sum, item) {\n return sum + item.appliedDiscountDollars\n }, 0)\n },\n\n // shipping + kit subtotal - promo price discount - promo code\n Checkout.prototype.getTotalPriceDollars = function() {\n const totalPriceDollars = this.getItemizedKitPriceDollars().reduce(function(sum, item) {\n return sum + item.totalDollars\n }, 0)\n return totalPriceDollars\n }\n\n Checkout.prototype.isPaymentRequired = function() {\n return this.getTotalPriceDollars() > 0.01 // small delta for float rounding errors\n }\n\n return Checkout\n}\n","'use strict'\n\n// extract a healthcare provider for the backend API\nfunction healthcareProviderFromProfile(profile) {\n return {\n provider_id: profile.id,\n formal_name: profile.formal_name,\n first_name: profile.first_name,\n last_name: profile.last_name,\n institution_name: profile.institution_name,\n city: profile.city,\n state: profile.state\n }\n}\n\nmodule.exports = function($window, $cookies, $q, $rootScope, $http, resolvedPromise, auth, Stripe,\n Checkout, CreditCard, Purchase, PhysicianOrder, KitStatus, HealthcareProvider,\n promoCodeStore, clinicalDomains, testTypes, associatedSample, requisitionStore,\n healthcareProviderStore, sku, kitPriceService, claimStore) {\n 'ngInject'\n\n const KitCheckout = Checkout.subclass()\n\n KitCheckout.prototype.init = function(start, skuName) {\n if (this.skipReset) {\n this.skipReset = false\n return\n }\n\n this._quantity = 1\n if (!skuName) {\n skuName = testTypes.hereditary30\n }\n this.sku = sku[skuName]\n this.purchase = new Purchase({\n stripe_card_token: null,\n shipping_address: null,\n shared_providers: [],\n physician_order: null,\n authorized_to_order: true, // set this to false if we are not asking ordering option.\n kit_barcode: false, // only set for payment-only controller\n promotional_code: null,\n claim_token: null,\n kit_for_self: true\n })\n this.shippingAddress = {}\n this.requireShipping = true\n\n this.creditCard = new CreditCard()\n this.withColorOrderingPhysician = true\n this.sendCopyToHealthcareProviders = false\n this.physicianOrder = new PhysicianOrder() // this is passed to and used in the clrOrderingPhysician directive\n this.skipReset = false\n this.edit = false\n this.paymentErrorsCount = 0\n this.currentUser = auth.currentUser\n this.isSampleReuse = false\n this.existingPhysicianOrder = false\n this._modifierPrice = 0\n this._modifierName = ''\n // default heardAboutColorThrough cookie might be set via applyAttributionRedirect resolver, usually via ads traffic\n this.heardAboutColorThrough = $cookies.get('attribution') || null\n\n // load all existing providers to prepopulate the ordering physician info\n const healthcareProvider = healthcareProviderStore.getHealthcareProvider()\n if (healthcareProvider) {\n this.purchase.shared_providers.push(new HealthcareProvider(healthcareProvider))\n this.sendCopyToHealthcareProviders = true\n }\n auth.sync().then(angular.bind(this, function() {\n if (!start || !auth.isLoggedIn || !auth.isSynced || this.sku.testTypes.length > 1) {\n return null\n }\n return KitStatus.get().$promise\n }))\n .then(angular.bind(this, function(res) {\n if (res) {\n const clinicalDomain = clinicalDomains[this.sku.testTypes[0]]\n res.results.filter(function(result) {\n return clinicalDomains[result.test_type] == clinicalDomain\n }).map(angular.bind(this, this.syncOrderingInformation))\n }\n }))\n if (start) {\n this.updateModifierPrice()\n }\n }\n\n KitCheckout.prototype.removeModifier = function() {\n this._modifierPrice = 0\n this._modifierName = ''\n }\n\n KitCheckout.prototype.updateModifierPrice = function() {\n const params = {\n sku: this.sku.name,\n quantity: this.getQuantity(),\n kit_for_self: this.purchase.kit_for_self\n }\n $http.get('api/v1/get_modifier_status', {params: params, cache: true})\n .then(angular.bind(this, function(res) {\n this.removeModifier()\n if (res.data) {\n this._modifierPrice = (parseInt(res.data.modifier_price_cents) / 100)\n this._modifierName = res.data.modifier_name\n }\n }))\n }\n\n KitCheckout.prototype.incrementKit = function() {\n Checkout.prototype.incrementKit.call(this)\n this.updateModifierPrice()\n }\n\n KitCheckout.prototype.decrementKit = function() {\n Checkout.prototype.decrementKit.call(this)\n this.updateModifierPrice()\n }\n\n KitCheckout.prototype.setKitForSelf = function(kitForSelf) {\n this.purchase.kit_for_self = kitForSelf\n this.updateModifierPrice()\n }\n\n KitCheckout.prototype.setSku = function(sku) {\n this.sku = sku\n this.updateModifierPrice()\n }\n\n KitCheckout.prototype.syncOrderingInformation = function(kitStatus) {\n if (kitStatus.shared_providers) {\n kitStatus.shared_providers.map(angular.bind(this, function(healthcareProvider) {\n if (healthcareProvider.is_verified) {\n this.purchase.shared_providers.push(\n new HealthcareProvider(healthcareProvider))\n }\n }))\n }\n if (kitStatus.physician_order &&\n kitStatus.physician_order.ordering_physician_profile &&\n kitStatus.physician_order.ordering_physician_profile.is_verified) {\n this.purchase.shared_providers.push(\n healthcareProviderFromProfile(kitStatus.physician_order.ordering_physician_profile))\n }\n if (kitStatus.physician_order &&\n kitStatus.physician_order.placed_by_profile &&\n kitStatus.physician_order.placed_by_profile.is_verified) {\n this.purchase.shared_providers.push(\n healthcareProviderFromProfile(kitStatus.physician_order.placed_by_profile))\n }\n if (this.purchase.shared_providers.length > 0) {\n this.sendCopyToHealthcareProviders = true\n }\n }\n\n KitCheckout.prototype.getKitPriceDollarsAfterModifiers = function() {\n const priceDollars = kitPriceService.getAdvertisedKitPriceDollars(this.sku)\n // exclude FTP codes and benefits channel from modifiers\n if (!promoCodeStore.isEligibleForPricingModifiers() || (claimStore.claim && claimStore.claim.is_redeemable)) {\n return priceDollars\n }\n return priceDollars + this._modifierPrice\n }\n\n KitCheckout.prototype.getTotalPriceDollars = function() {\n return Checkout.prototype.getTotalPriceDollars.call(this)\n }\n\n KitCheckout.prototype.isPaymentRequired = function() {\n return Checkout.prototype.isPaymentRequired.call(this)\n }\n\n KitCheckout.prototype.testTypes = function() {\n // It's an anti-pattern to modify states in getter methods.\n // We do similar thing in getQuantity().\n // physicianOrder gets set in different form directive\n // so it's a bit hard to udpate sku based on physician order\n // update.\n // TODO: Clean this logic and move this out from this method.\n // https://getcolor.atlassian.net/browse/ENG-169\n const testRequested = this.physicianOrder.test_requested\n if (testRequested && testRequested != this.sku.name) {\n this.sku = sku[testRequested]\n }\n return this.sku.testTypes\n }\n\n KitCheckout.prototype.prepareOrderInfo = function() {\n // Clear healthcare providers if clients decided:\n // * not to send copy to healthcare providers, or\n // * not to use color ordering physician.\n if (!this.sendCopyToHealthcareProviders || !this.withColorOrderingPhysician || !this.purchase.kit_for_self) {\n this.purchase.shared_providers = []\n }\n if (!this.withColorOrderingPhysician && this.purchase.kit_for_self) {\n this.purchase.physician_order = this.physicianOrder.id\n }\n }\n\n // prepare kitOrder for saving. This should be idempotent because it can\n // get called multiple times if the payment card is declined.\n KitCheckout.prototype.preparePurchase = function() {\n this.prepareOrderInfo()\n\n if (claimStore.claim && claimStore.claim.is_redeemable) {\n this.purchase.claim_token = claimStore.claim.token;\n } else if (promoCodeStore.promotionalCode.can_redeem) {\n this.purchase.promotional_code = promoCodeStore.promotionalCode.code\n }\n\n if (this.heardAboutColorThrough) {\n this.purchase.heard_about_color_through = this.heardAboutColorThrough\n }\n\n if (this.isSampleReuse) {\n this.purchase.is_sample_reuse = true\n this.purchase.phone_number = {\n 'country': this.currentUser.phone.country,\n 'national_number': this.currentUser.phone.national_number\n }\n // Sample reuse currently only supports ColorConsent\n this.purchase.consent_type = 'color'\n }\n\n this.purchase.items = [{sku: this.sku.name, quantity: this.getQuantity()}]\n }\n\n // NY address requires NY physician.\n KitCheckout.prototype.hasNewYorkOrderMismatch = function() {\n const country = this.shippingAddress.country\n const state = (this.shippingAddress.state || '').toUpperCase()\n let physicianOrderState = ''\n let hasPhysicianProfile = false\n if (\n // check that the physician order would be applied\n !this.withColorOrderingPhysician &&\n this.purchase.kit_for_self &&\n // check there is a physician order\n this.physicianOrder &&\n this.physicianOrder.ordering_physician_profile\n ) {\n hasPhysicianProfile = true\n physicianOrderState = this.physicianOrder.ordering_physician_profile.state\n }\n return country == 'US' && state == 'NY' && hasPhysicianProfile && physicianOrderState != 'NY'\n }\n\n KitCheckout.prototype.setCreditCardToken = function() {\n if (this.isPaymentRequired()) {\n return this.creditCard.$save()\n .then(angular.bind(this, function(res) {\n this.purchase.stripe_card_token = res.id\n }))\n } else {\n return resolvedPromise()\n }\n }\n\n KitCheckout.prototype.setShippingAddress = function() {\n if (this.requireShipping) {\n this.purchase.shipping_address = this.shippingAddress\n }\n }\n\n KitCheckout.prototype.placePurchase = function(currentUser) {\n // Prevent double submission of purchase. Not concurrency safe but should\n // be good enough.\n if (this.placingPurchase) {\n return $q.reject({\n message: 'Please wait, your purchase is being processed.'\n })\n }\n\n this.placingPurchase = true\n this.setShippingAddress()\n\n return this.setCreditCardToken()\n .then(angular.bind(this, function() {\n this.preparePurchase()\n return this._placePurchase()\n }))\n .finally(angular.bind(this, function() {\n this.placingPurchase = false\n }))\n }\n\n KitCheckout.prototype._placePurchase = function() {\n return this.purchase.$save()\n .then(angular.bind(this, function(res) {\n // re-sync the promo code instead of clearing if we can still add dependents.\n // this is executed after a route change so as to not modify the UI.\n const cleanUp = $rootScope.$on('$routeChangeSuccess', angular.bind(this, function() {\n if (promoCodeStore.canAddDependents()) {\n promoCodeStore.sync()\n } else {\n promoCodeStore.clear()\n }\n if (claimStore.claim) {\n claimStore.clearClaim();\n claimStore.getClaim();\n }\n cleanUp()\n }))\n requisitionStore.clear()\n res.hasAssociatedSample = !!this.purchase.kit_barcode\n associatedSample.clear()\n healthcareProviderStore.clear()\n return res\n }))\n .catch(function(res) {\n // If there was a problem finding the associated sample, clear the sample info\n if (res.data && res.data.kit_barcode) {\n associatedSample.clear()\n }\n // Propagate the error\n return $q.reject(res)\n })\n }\n\n // Instructions on how to test ApplePay locally:\n // https://gist.github.com/kn/b33a57b8f5b86617df0195e832fb0b70\n KitCheckout.prototype.placePurchaseWithApplePay = function() {\n const deferredResult = $q.defer()\n this.preparePurchase()\n let colorTestLabel = 'Color Test'\n if (this.getQuantity() > 1) {\n colorTestLabel += ' (' + this.getQuantity() + ')'\n }\n const lineItems = [\n { label: colorTestLabel, amount: this.getKitSubtotalDollars().toFixed(2) },\n { label: 'Shipping + handling', amount: this.getShippingPriceDollars().toFixed(2) }\n ]\n\n if (this.getAppliedDiscountDollars() > 0) {\n lineItems.push({ label: 'Discount', amount: '-' + this.getAppliedDiscountDollars().toFixed(2) })\n }\n\n const request = {\n requiredShippingContactFields: ['postalAddress', 'phone', 'email', 'name'],\n countryCode: this.getShippingCountry(),\n currencyCode: 'USD',\n total: {\n label: 'Color',\n amount: this.getTotalPriceDollars().toFixed(2)\n },\n lineItems: lineItems\n }\n const applePaySession = Stripe.applePay.buildSession(request, angular.bind(this, function(result, completion) {\n const shipping = result.shippingContact\n this.shippingAddress.line1 = shipping.addressLines[0]\n this.shippingAddress.line2 = shipping.addressLines[1]\n this.shippingAddress.city = shipping.locality\n this.shippingAddress.state = shipping.administrativeArea\n this.shippingAddress.postal_code = shipping.postalCode\n this.shippingAddress.country = shipping.countryCode.toUpperCase()\n this.shippingAddress.full_name = shipping.givenName + ' ' + shipping.familyName\n this.shippingAddress.phone_number = shipping.phoneNumber\n\n if (this.shippingAddress.country != 'US') {\n completion($window.ApplePaySession.STATUS_FAILURE)\n deferredResult.reject({ error: 'ApplePay is only available for US shipping addresses.' })\n return deferredResult.promise\n }\n\n this.purchase.email = shipping.emailAddress\n this.purchase.stripe_card_token = result.token.id\n this.setShippingAddress()\n this._placePurchase()\n .then(angular.bind(this, function(res) {\n completion($window.ApplePaySession.STATUS_SUCCESS)\n deferredResult.resolve(res)\n }))\n .catch(angular.bind(this, function(res) {\n completion($window.ApplePaySession.STATUS_FAILURE)\n deferredResult.reject(res)\n }))\n }))\n applePaySession.begin()\n return deferredResult.promise\n }\n\n KitCheckout.prototype.placePurchaseWithStripeCheckout = function(token_response, address) {\n const deferredResult = $q.defer()\n this.preparePurchase()\n\n this.shippingAddress.line1 = address.shipping_address_line1\n this.shippingAddress.line2 = ''\n this.shippingAddress.city = address.shipping_address_city\n this.shippingAddress.state = address.shipping_address_state\n this.shippingAddress.postal_code = address.shipping_address_zip\n this.shippingAddress.full_name = address.shipping_name\n\n if (address.shipping_address_country != 'United States') {\n deferredResult.reject({ error: 'Stripe checkout is only available for US shipping address.' })\n return deferredResult.promise\n }\n this.shippingAddress.country = 'US'\n\n this.purchase.email = token_response.email\n this.purchase.stripe_card_token = token_response.id\n this.setShippingAddress()\n this._placePurchase()\n .then(function(res) {\n deferredResult.resolve(res)\n })\n .catch(function(res) {\n deferredResult.reject(res)\n })\n\n return deferredResult.promise\n }\n\n function createIfNotPersisted(resource, resolved) {\n if (resolved || !!resource.id) {\n return resolvedPromise(resource)\n } else {\n return resource.$save()\n }\n }\n\n return KitCheckout\n}\n","'use strict'\n\nmodule.exports = function($window, $q, $timeout) {\n 'ngInject'\n let scriptLoaded = false\n\n function load_script(script_base_url) {\n const url = script_base_url\n const s = $window.document.createElement('script')\n s.src = url\n $window.document.head.appendChild(s)\n scriptLoaded = true\n }\n\n function lazyLoader(script_base_url, windowObject) {\n const deferred = $q.defer()\n if (!scriptLoaded) { // Not loaded yet\n $timeout(function() {\n load_script(script_base_url)\n }, 0, false)\n } else { // Already loaded\n deferred.resolve($window[windowObject])\n }\n return deferred.promise\n }\n\n return {\n get: function(script_base_url, windowObject) {\n return lazyLoader(script_base_url, windowObject)\n }\n }\n\n}\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n return function(promoCodeStore) {\n const code = promoCodeStore.promotionalCode\n if (!code.campaign || code.max_redemptions == 1) {\n return false\n }\n return code.remaining_redemptions_count > 0\n }\n}\n","'use strict'\n\nmodule.exports = function(cookiePersistedObject) {\n 'ngInject'\n\n return cookiePersistedObject(\"requisition\")\n}\n","'use strict'\n\nmodule.exports = function(cookiePersistedObject) {\n 'ngInject'\n\n return cookiePersistedObject(\"sampleId\")\n}\n","'use strict'\n\nmodule.exports = function(cookiePersistedObject) {\n 'ngInject'\n\n return cookiePersistedObject(\"accessionNumber\")\n}\n","'use strict'\n\nmodule.exports = function(cookiePersistedObject) {\n 'ngInject'\n\n return cookiePersistedObject(\"kitBarcode\")\n}\n","'use strict'\n\nmodule.exports = function() {\n return function(name) {\n const simpleName = /^([\\w\\-]+)(?: ([\\w\\-]+\\.?))? ([\\w\\-]+)$/.exec(name)\n if (simpleName) {\n return { firstName: simpleName[1], middleName: simpleName[2], lastName: simpleName[3] }\n } else {\n return null\n }\n }\n}\n","'use strict'\n\nmodule.exports = function(cookiePersistedObject, lowFrictionHealthcareProviders) {\n 'ngInject'\n\n const store = cookiePersistedObject(\"healthcareProvider\")\n // Search for provider with key equal to passed in param\n store.getHealthcareProvider = function() {\n const storedValue = store.get()\n if (storedValue) {\n return lowFrictionHealthcareProviders[storedValue.toLowerCase()]\n }\n return null\n }\n return store\n}\n","'use strict'\n\nmodule.exports = function($raven, ngToast, textModal) {\n 'ngInject'\n\n return function(res, checkout, followup) {\n /*\n Stripe docs: https://stripe.com/docs/testing\n Possible error messages and card numbers to test with:\n 4000000000000002 && 4100000000000019: \"Your card was declined.\"\n 4000000000000127: \"Your card's security code is incorrect.\"\n 4000000000000069: \"Your card has expired.\"\n 4000000000000119: \"An error occurred while processing your card. Try again in a little bit.\"\n */\n if (!res) {\n $raven.capture('handlePaymentError caught unknown error')\n ngToast.create({ className: 'error', content: 'Unknown error' })\n return\n\n } else if (res.status == 402 || res.error) {\n // Iterate KitCheckout.paymentErrorsCount up per payment error\n checkout.paymentErrorsCount++\n let reason\n if (res.status == 402) {\n // Error coming from our API/Django, returns what Stripe returns in\n // `error.message`, always a single string from them. DRF returns it\n // as a list of `non_field_errors`\n reason = res.data.non_field_errors[0]\n } else if (res.error) {\n // Error returning from https://api.stripe.com/v1/tokens\n reason = res.error.message\n } else {\n reason = \"Your payment authorization failed.\"\n }\n const modal = textModal.open(\n \"We couldn't process your payment\"\n , \"\" + reason + \" Please verify your information and try again, or try another credit or debit card.\"\n , \"Update Card\"\n , 'error'\n , true\n )\n if (followup) {\n modal.result.then(followup)\n }\n }\n\n // Stripe card token error.\n else if (res.message) {\n ngToast.create({ className: 'error', content: res.message })\n return\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($location, sku, pathFlow, auth, defaultSku, KitCheckout, waffle, testTypes) {\n 'ngInject'\n\n const flow = pathFlow('kitCheckoutFlow', [\n { controller: 'OrderingPhysicianController', path: '/purchase/ordering-physician' },\n ])\n\n flow.ui = {}\n flow.checkout = new KitCheckout()\n flow.initialLoggedIn = true\n flow.init = function(start) {\n const params = $location.search()\n let skuName = defaultSku\n if (params.sku && sku[params.sku]) {\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n const forbidCore = params.sku == 'core 10' && !waffle.switch_is_active('core_10')\n if (!forbidCore) {\n skuName = params.sku\n }\n }\n\n // [CONSUMER-5214] A hack to prevent checkout to get reset on purchase confirmation page.\n // This prevents brief flashes when going from /purchase/review to the confirmation page.\n\n if ($location.path().indexOf('/purchase') == -1 || $location.path().indexOf('/confirmation') == -1) {\n flow.checkout.init(start, skuName)\n }\n\n // record this value so know whether a user was created in this flow.\n auth.sync().then(function() {\n flow.initialLoggedIn = auth.isLoggedIn\n })\n }\n\n return flow\n}\n","'use strict'\n\nmodule.exports = function($location, sku, pathFlow, auth, KitCheckout, waffle, physicianOrder, testTypes) {\n 'ngInject'\n\n const flow = pathFlow('sampleReuseFlow', [\n { controller: 'SampleReusePayController', path: '/sample-reuse/pay' },\n { controller: 'SampleReuseConsentController', path: '/sample-reuse/consent' },\n ])\n\n flow.checkout = new KitCheckout()\n flow.init = function(start) {\n\n const params = $location.search()\n let skuName = 'combo 3'\n if (params.sku && sku[params.sku]) {\n skuName = params.sku\n }\n\n // Sample reuse only qualifies for H30\n flow.checkout.init(start, skuName)\n\n auth.sync().then(function() {\n // alreadyHavePhysicianOrder relies on information from currentUser\n if (physicianOrder.alreadyHavePhysicianOrder(flow.checkout.sku.name)) {\n flow.checkout.existingPhysicianOrder = true\n }\n })\n\n flow.checkout.isSampleReuse = true\n flow.checkout.requireShipping = false\n }\n\n return flow\n}\n","'use strict'\n\nmodule.exports = function(promoCodeStore, canAddDependents) {\n 'ngInject'\n\n let dependents = [{}]\n const dependentsClaimManager = {\n claimForSelf: true,\n onlySpouse: function() {\n return promoCodeStore.promotionalCode.max_redemptions == 2\n },\n canAddFamilyMember: function() {\n return canAddDependents(promoCodeStore)\n },\n getFamilyMembers: function() {\n return dependents\n },\n addFamilyMember: function() {\n dependents.push({})\n },\n removeMember: function(i) {\n dependents.splice(i, 1)\n }\n }\n\n dependentsClaimManager.init = function() {\n dependents = [{}]\n dependentsClaimManager.claimForSelf = true\n }\n\n return dependentsClaimManager\n}\n","'use strict'\n\nmodule.exports = function(auth, waffle, testTypes, promoCodeStore) {\n 'ngInject'\n\n this.eligibleForReuse = function(skuName) {\n return auth.currentUser.skus_qualified_for_data_reuse.indexOf(skuName) > -1\n }\n\n this.getResultsExpectedDate = function(purchasedAt) {\n // We expect results within a week of purchase\n const purchasedDate = new Date(purchasedAt)\n return purchasedDate.setDate(purchasedDate.getDate() + 7)\n }\n}\n","'use strict'\n\nmodule.exports = function(auth, testTypes, waffle) {\n 'ngInject'\n\n this.alreadyHavePhysicianOrder = function(skuName) {\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n if (!waffle.switch_is_active('reuse_physician_order') || !auth.isLoggedIn || !auth.currentUser.id) {\n return false\n }\n return auth.currentUser.test_types_covered_with_prev_orders.indexOf(skuName) > -1\n }\n}\n","module.exports = function($location, ngToast, KitCheckoutFlow) {\n 'ngInject'\n\n return function(res, method) {\n // non-US Shipping address.\n if (res.error) {\n ngToast.create({className: 'error', content: res.error})\n const url = $location.path()\n if ($location.path().indexOf('/purchase/ordering-physician') == -1) {\n // Hack around pathflow routing. We are not able to skip ordering-physician page\n // if coming from another path. This \"fakes\" the visit using pathFlow's internal variable\n KitCheckoutFlow.completed['/purchase/ordering-physician'] = true\n }\n KitCheckoutFlow.goTo('/purchase/shipping', true)\n }\n }\n}\n","const resolvers = require('src/django_apps/core/static/js/resolvers')\n\nmodule.exports = angular.module('kitRegistrations', [\n require('src/django_apps/kit_registrations/js/directives').name,\n require('src/django_apps/kit_registrations/js/modals').name,\n require('src/django_apps/kit_registrations/js/controllers').name\n])\n .config(function(colorRouteProvider) {\n colorRouteProvider\n // Legacy genetics activation routes (/genetics/activation/*) are exclusively served by React now\n })\n","module.exports = angular.module('kitRegistrationDirectives', [])\n .directive('uppercaseModel', function($parse) {\n return {\n require: 'ngModel',\n link: function(scope, element, attrs, modelCtrl) {\n const uppercase = function(inputValue) {\n if (angular.isUndefined(inputValue) || !inputValue.toUpperCase) {\n inputValue = ''\n }\n const uppercased = inputValue.toUpperCase()\n if (uppercased !== inputValue) {\n modelCtrl.$setViewValue(uppercased)\n modelCtrl.$render()\n }\n return uppercased\n }\n modelCtrl.$parsers.push(uppercase)\n modelCtrl.$formatters.push(uppercase)\n uppercase($parse(attrs.ngModel)(scope))\n }\n }\n })\n","module.exports = angular.module('kitRegistrationModal', ['ui.bootstrap'])\n .factory('ActivatedModal', require('src/django_apps/kit_registrations/js/modals/activated_modal'))\n .factory('MultipleOrdersModal', require('src/django_apps/kit_registrations/js/modals/multiple_orders_modal'))\n .factory('WisdomActivateModal', require('src/django_apps/kit_registrations/js/modals/wisdom_activate_modal'))\n .factory('incorrectPatientInfoModal', require('src/django_apps/kit_registrations/js/modals/incorrect_patient_info_modal'))\n .factory('NewYorkModal', require('src/django_apps/kit_registrations/js/modals/new_york_modal'))\n","module.exports = function ActivatedModal($modal) {\n 'ngInject'\n return {\n open: function(state) {\n return $modal.open({\n templateUrl: '/kit_registrations/activated_modal.html',\n controller: function($scope, $modalInstance, $location) {\n 'ngInject'\n $scope.continue = function() {\n $location.path('/activated')\n $modalInstance.close()\n }\n },\n size: 'sm'\n })\n }\n }\n}\n","module.exports = function MultipleOrdersModal($modal) {\n 'ngInject'\n return {\n open: function(state) {\n return $modal.open({\n templateUrl: '/kit_registrations/multiple_orders_modal.html',\n controller: function($scope, $modalInstance, $location) {\n 'ngInject'\n $scope.continue = function() {\n $location.path('/react/create-account').search({next: '/genetics/activate/barcode'})\n $modalInstance.close()\n }\n },\n size: 'sm'\n })\n }\n }\n}\n","module.exports = function WisdomActivateModal($modal) {\n 'ngInject'\n return {\n open: function(state) {\n return $modal.open({\n templateUrl: '/kit_registrations/_modal-go_to_wisdom.html',\n controller: function($scope, $modalInstance, $location) {\n 'ngInject'\n $scope.goToWisdom = function() {\n $location.path('/wisdomstudy')\n $modalInstance.close()\n }\n },\n size: 'sm'\n })\n }\n }\n}\n","module.exports = function incorrectPatientInfoModal($modal) {\n 'ngInject'\n return {\n open: function() {\n return $modal.open({\n templateUrl: '/kit_registrations/_modal-incorrect_patient_info.html',\n size: 'lg'\n })\n }\n }\n}\n","module.exports = function NewYorkModal($modal) {\n 'ngInject'\n return {\n open: function(canChangeOrderingPhysician, modalType, back) {\n return $modal.open({\n templateUrl: '/kit_registrations/new_york_modal.html',\n size: 'sm',\n controller: function($scope, $modalInstance, stateFullNames, back, canChangeOrderingPhysician, modalType) {\n 'ngInject'\n $scope.modalType = modalType\n $scope.canChangeOrderingPhysician = canChangeOrderingPhysician\n\n $scope.back = function() {\n $modalInstance.dismiss()\n if (back) {\n back()\n }\n };\n },\n resolve: {\n modalType: function() {\n return modalType\n },\n canChangeOrderingPhysician: function() {\n return canChangeOrderingPhysician\n },\n back: function() {\n return back\n }\n }\n })\n }\n }\n}\n","module.exports = angular.module('kitRegistrationControllers', [])\n .controller('ActivationCompleteController',\n require('src/django_apps/kit_registrations/js/controllers/activation_complete_controller'))\n","'use strict'\n\nmodule.exports = function(\n $filter, $scope, $anchorScroll, kitStatuses, PhysicianOrder,\n PhysicianOrderType, testTypes) {\n 'ngInject'\n $anchorScroll()\n\n // Take the latest activated test type.\n const kitStatus = $filter('orderBy')(kitStatuses.results, '-sample.activated_at')[0]\n $scope.isWisdom = kitStatus.test_type == testTypes.wisdom9\n $scope.kitStatus = kitStatus\n $scope.atLab = kitStatus.fulfillment.state == 'completed'\n\n $scope.isSampleAtOffice = kitStatus.physician_order &&\n kitStatus.physician_order.type === PhysicianOrderType.SAMPLE_AT_OFFICE\n}\n","const createAccountRouteConfig = {\n templateUrl: '/ordering_physicians/provider_account_creation.html',\n auth: {\n requireLogin: false\n },\n seo: {\n title: 'Create a Provider Online Account | Color Providers',\n description: 'Easy online ordering for your patient is available through our Color Provider Platform. Register today.'\n },\n controller: 'ProviderAccountCreationController',\n navigation: {\n showLeft: false,\n showRight: false,\n showSignInAsButton: true,\n linkToProviderSignIn: true,\n showStore: false,\n layout: 'minimum'\n }\n}\n\nmodule.exports = angular.module('providerPlatform', [\n require('src/django_apps/ordering_physicians/js/controllers').name,\n require('src/django_apps/ordering_physicians/js/directives').name,\n require('src/django_apps/ordering_physicians/js/services').name,\n require('src/django_apps/ordering_physicians/js/modal').name,\n require('src/django_apps/ordering_physicians/js/order_directives').name,\n require('src/django_apps/ordering_physicians/js/place_order_directives').name,\n require('src/django_apps/ordering_physicians/js/resource').name,\n require('src/django_apps/ordering_physicians/js/tutorials').name\n])\n .config(function(colorRouteProvider) {\n colorRouteProvider\n .when('/providers/sign-in', {\n templateUrl: '/ordering_physicians/signin.html',\n seo: {\n title: 'Sign in to Color - Color Providers',\n description: ''\n },\n controller: 'ProviderSignInController',\n auth: {\n requireLogin: false,\n requireAnonymous: true\n },\n navigation: {\n showLeft: false,\n showRight: false,\n showStore: false,\n layout: 'minimum'\n },\n forProviders: true\n })\n // [CONSUMER-2854] For marketing campaign to get GC's to open accounts.\n .when('/providers/create-account', createAccountRouteConfig)\n .when('/providers/verified-account/:token', createAccountRouteConfig)\n .when('/providers/existing-account', {\n templateUrl: '/ordering_physicians/existing_account.html',\n auth: {\n requireLogin: false\n },\n seo: {\n title: 'Create a Provider Online Account | Color Providers',\n description: 'Easy online ordering for your patient is available through our Color Provider Platform. Register today.'\n },\n controller: 'ProviderExistingAccountController',\n navigation: {\n showLeft: false,\n showRight: false,\n showSignInAsButton: true,\n showStore: false,\n layout: 'minimum'\n }\n })\n .when('/providers', { redirectTo: '/providers/home' })\n .when('/providers/home', {\n templateUrl: '/ordering_physicians/provider_platform_home.html',\n seo: {\n title: 'Color Provider Platform - Color',\n description: ''\n },\n auth: {\n requireProvider: true,\n requireEmailConfirmation: false\n },\n navigation: {\n active: 'orders',\n showSearchBar: true,\n layout: 'provider'\n },\n controller: 'ProviderPlatformHomeController'\n })\n .when('/providers/drafts', {\n templateUrl: '/ordering_physicians/provider_platform_drafts.html',\n seo: {\n title: 'Color Provider Platform - Color',\n description: ''\n },\n auth: {\n requireProvider: true,\n requireEmailConfirmation: false\n },\n navigation: {\n active: 'orders',\n showSearchBar: true,\n layout: 'provider'\n },\n controller: 'ProviderPlatformDraftsController'\n })\n .when('/providers/family-testing', {\n templateUrl: '/ordering_physicians/family_testing/home.html',\n controller: 'ProviderPlatformFamilyTestingController',\n seo: {\n title: 'Color Provider Platform - Color',\n description: ''\n },\n auth: {\n requireProvider: true\n },\n navigation: {\n layout: 'provider',\n showLeft: false,\n }\n })\n .when('/providers/family-testing-enrolling', {\n templateUrl: '/ordering_physicians/family_testing/family_testing_form.html',\n controller: 'ProviderPlatformFamilyTestingOrderController',\n seo: {\n title: 'Color Provider Platform - Color',\n description: ''\n },\n auth: {\n requireProvider: true\n },\n navigation: {\n layout: 'provider',\n showLeft: false,\n }\n })\n .when('/providers/family-testing-reviewing', {\n templateUrl: '/ordering_physicians/family_testing/reviewing.html',\n controller: 'ProviderPlatformFamilyTestingReviewingController',\n seo: {\n title: 'Color Provider Platform - Color',\n description: ''\n },\n auth: {\n requireProvider: true\n },\n navigation: {\n layout: 'provider',\n showLeft: false,\n }\n })\n .when('/providers/place-order', {\n templateUrl: '/ordering_physicians/place_order.html',\n seo: {\n title: 'Place an order - Color',\n description: ''\n },\n auth: {\n requireProvider: true\n },\n resolve: {\n draft: function($route, DraftPhysicianOrder, PhysicianOrderFormData) {\n 'ngInject'\n const draftRequisitionNumber = $route.current.params.draft\n if (draftRequisitionNumber) {\n return DraftPhysicianOrder.get({requisition_number: draftRequisitionNumber}).$promise\n .catch(() => undefined)\n }\n },\n enrollment: function($route, Enrollment) {\n 'ngInject'\n const enrollmentId = $route.current.params.ftp\n if (enrollmentId) {\n return Enrollment.get({id:enrollmentId}).$promise\n .catch(() => undefined)\n }\n }\n },\n navigation: {\n layout: 'provider',\n showLeft: false,\n showPhysicianOrderBreadcrumbs: true\n },\n controller: 'ProviderPlatformPlaceOrderController'\n\n })\n .when('/providers/submit-payment', {\n templateUrl: '/ordering_physicians/submit_payment.html',\n seo: {\n title: 'Provide payment - Color',\n description: ''\n },\n auth: {\n requireProvider: true\n },\n navigation: {\n layout: 'provider',\n showLeft: false,\n showPhysicianOrderBreadcrumbs: true\n },\n controller: 'ProviderPlatformSubmitPaymentController'\n })\n .when('/providers/review-order', {\n templateUrl: '/ordering_physicians/review_order.html',\n seo: {\n title: 'Review your order - Color',\n description: ''\n },\n auth: {\n requireProvider: true\n },\n navigation: {\n layout: 'provider',\n showLeft: false,\n showPhysicianOrderBreadcrumbs: true\n },\n controller: 'ProviderPlatformReviewOrderController'\n })\n // Provider physician order pages\n .when('/providers/order/results/:requisition_number', {\n templateUrl: '/ordering_physicians/order.html',\n seo: {\n title: 'Order details - Color',\n description: ''\n },\n auth: {\n requireProvider: true\n },\n navigation: {\n showSearchBar: true,\n layout: 'provider'\n },\n controller: 'ProviderPlatformOrderController'\n })\n .when('/providers/order/log/:requisition_number', {\n templateUrl: '/ordering_physicians/order.html',\n auth: {\n requireProvider: true\n },\n navigation: {\n showSearchBar: true,\n layout: 'provider'\n },\n controller: 'ProviderPlatformOrderController'\n })\n .when('/providers/order/details/:requisition_number', {\n templateUrl: '/ordering_physicians/order.html',\n auth: {\n requireProvider: true\n },\n navigation: {\n showSearchBar: true,\n layout: 'provider'\n },\n controller: 'ProviderPlatformOrderController'\n })\n\n // Provider shared order pages\n\n .when('/providers/shared_order/results/:order_number', {\n templateUrl: '/ordering_physicians/shared_order.html',\n auth: {\n requireProvider: true\n },\n navigation: {\n showSearchBar: true,\n layout: 'provider'\n },\n controller: 'ProviderPlatformSharedOrderController',\n controllerAs: '$ctrl'\n })\n .when('/providers/shared_order/details/:order_number', {\n templateUrl: '/ordering_physicians/shared_order.html',\n auth: {\n requireProvider: true\n },\n navigation: {\n showSearchBar: true,\n layout: 'provider'\n },\n controller: 'ProviderPlatformSharedOrderController',\n controllerAs: '$ctrl'\n })\n\n .when('/providers/forms', {\n templateUrl: '/ordering_physicians/forms.html',\n auth: {\n requireProvider: true,\n requireEmailConfirmation: false\n },\n seo: {\n title: 'Forms and information - Color',\n description: ''\n },\n controller: require('src/django_apps/ordering_physicians/js/controllers/provider_forms_controller.js'),\n navigation: {\n showSearchBar: true,\n active: 'forms',\n layout: 'provider'\n }\n })\n .when('/providers/account-settings', {\n templateUrl: '/accounts/settings.html',\n seo: {\n title: 'Account Management - Color',\n description: ''\n },\n controller: require('src/django_apps/users/js/accounts/controllers/account_settings_controller'),\n auth: { requireEmailConfirmation: false },\n navigation: {\n subnavActive: 'account',\n layout: 'provider'\n }\n })\n .when('/providers/order-preferences', {\n templateUrl: '/accounts/settings.html',\n seo: {\n title: 'Account Management - Color',\n description: ''\n },\n controller: require('src/django_apps/users/js/accounts/controllers/account_settings_controller'),\n auth: { requireEmailConfirmation: false },\n navigation: {\n subnavActive: 'account',\n layout: 'provider'\n }\n })\n .when('/providers/resubmit-payment/:requisition_number', {\n templateUrl: '/ordering_physicians/resubmit_payment.html',\n controller: require('src/django_apps/ordering_physicians/js/controllers/provider_platform_resubmit_payment_controller'),\n auth: {\n requireEmailConfirmation: true,\n requireSupportStaff: true\n },\n navigation: {\n layout: 'provider'\n }\n })\n .when('/providers/shared', {\n templateUrl: '/ordering_physicians/provider_platform_shared.html',\n seo: {\n title: 'Color Provider Platform - Color',\n },\n auth: {\n requireProvider: true,\n requireEmailConfirmation: false\n },\n navigation: {\n active: 'orders',\n showSearchBar: true,\n layout: 'provider'\n },\n controller: 'ProviderPlatformSharedController',\n controllerAs: '$ctrl'\n })\n })\n","module.exports = angular.module('orderingPhysiciansController', [])\n .controller('ProviderSignInController', require('./controllers/provider_sign_in_controller'))\n .controller('ProviderPlatformHomeController', require('./controllers/provider_platform_home_controller'))\n .controller('ProviderPlatformPlaceOrderController', require('./controllers/provider_platform_place_order_controller'))\n .controller('ProviderPlatformReviewOrderController', require('./controllers/provider_platform_review_order_controller'))\n .controller('ProviderPlatformSubmitPaymentController', require('./controllers/provider_platform_submit_payment_controller'))\n .controller('ProviderPlatformOrderController', require('./controllers/provider_platform_order_controller'))\n .controller('ProviderAccountCreationController', require('./controllers/provider_account_creation_controller'))\n .controller('ProviderExistingAccountController', require('./controllers/provider_existing_account_controller'))\n .controller('OrderPreferencesController', require('./controllers/order_preferences_controller'))\n .controller('ProviderPlatformDraftsController', require('./controllers/provider_platform_drafts_controller'))\n .controller('ProviderPlatformFamilyTestingController', require('./controllers/provider_platform_family_testing_controller'))\n .controller('ProviderPlatformFamilyTestingOrderController', require('./controllers/provider_platform_family_testing_order_controller'))\n .controller('ProviderPlatformFamilyTestingReviewingController', require('./controllers/provider_platform_family_testing_reviewing_controller'))\n .controller('ProviderPlatformSharedController', require('./controllers/provider_platform_shared_controller'))\n .controller('ProviderPlatformSharedOrderController', require('./controllers/provider_platform_shared_order_controller'))\n","module.exports = function ProviderSignInController($scope, auth, redirect) {\n 'ngInject'\n\n $scope.loggingIn = false\n\n $scope.login = function(email, password) {\n $scope.loggingIn = true\n auth.login(email, password)\n .then(function() {\n redirect('/')\n })\n .catch(function(res) {\n $scope.loggingIn = false\n })\n }\n}\n","module.exports = function ProviderPlatformHomeController($scope, $location, auth,\n EmailConfirmationResend, ngToast, ProviderHomeInitialMessages, cppHomeUrlPath,\n DetailedPhysicianOrder, waffle) {\n 'ngInject'\n\n function setOrders(promise) {\n $scope.loading = true\n promise.then(function(res) {\n $scope.orders = res\n }).finally(function(res) {\n $scope.loading = false\n })\n }\n\n $scope.directPurchasingFlowBannerIsVisible = false\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n if (waffle.switch_is_active('block-cpp-ordering-2024-11')) {\n $scope.directPurchasingFlowBannerIsVisible = true\n }\n\n const params = cppHomeUrlPath.getApiParamsFromLocation()\n setOrders(DetailedPhysicianOrder.get(params).$promise)\n $scope.routeName = cppHomeUrlPath.getRouteName()\n\n const user = auth.currentUser\n $scope.isEmailConfirmed = user.is_email_confirmed\n $scope.userEmail = user.email\n $scope.showGroup = user.provider_profile && user.provider_profile.settings.show_group\n\n $scope.viewOrder = function(order) {\n const showResultStatuses = ['released_to_provider', 'released_to_patient', 'viewed_by_patient']\n if (showResultStatuses.indexOf(order.status.name) != -1) {\n $location.path('/providers/order/results/' + order.requisition_number)\n } else {\n $location.path('/providers/order/log/' + order.requisition_number)\n }\n }\n\n $scope.resending = false\n\n $scope.resendConfirmationEmail = function() {\n if (!$scope.resending) {\n $scope.resending = true\n EmailConfirmationResend.save().$promise\n .then(function() {\n ngToast.create('We have resent the email.')\n })\n .finally(function() {\n $scope.resending = false\n })\n }\n }\n\n ProviderHomeInitialMessages.run()\n}\n","module.exports = function ProviderPlatformPlaceOrderController(\n $scope, $cookies, $filter, $location, project, auth, DetailedPhysicianOrder, ProviderPlatformModals,\n PhysicianOrderFormData, PhysicianOrderFormFlow, fileUploader,\n physicianOrderCheckout, NotYetAvailableModal, promoCodeStore, testTypesBlockedInNewYork,\n uploadFileTypes, PhysicianOrderNavigationService, draft, waffle, testTypes, enrollment,\n patientIsMinor, ngToast, PhysicianOrderType, testTypesAllowedInEU, euCountries, sku\n) {\n 'ngInject'\n\n const Navigation = PhysicianOrderNavigationService\n\n Navigation.setState(Navigation.STATES.DETAILS)\n\n $scope.modals = ProviderPlatformModals\n\n $scope.NotYetAvailableModal = NotYetAvailableModal\n\n $scope.settings = {}\n if (project.application != 'clinical') {\n $scope.userProvider = auth.currentUser.provider_profile\n $scope.settings = $scope.userProvider.settings\n } else {\n // loose requirement for patient form fields in support site\n $scope.patientFormLooseRequirement = true\n // Clear all promocodes when placing orders in clinical\n promoCodeStore.clear()\n }\n\n $scope.order = PhysicianOrderFormData.getOrSetIfEmpty(\n DetailedPhysicianOrder.initializeWithSettings($scope.settings)\n )\n\n $scope.checkout = new physicianOrderCheckout($scope.order, $scope.userProvider)\n\n if ($scope.userProvider) {\n $scope.defaultCountry = $scope.userProvider.country\n } else {\n $scope.defaultCountry = \"US\"\n }\n\n if (!$scope.order.patient_profile.country) {\n $scope.order.patient_profile.country = $scope.defaultCountry\n }\n\n $scope.uploader = fileUploader({\n formData:[{\n physician_order_requisition_number: $scope.order.requisition_number,\n file_type: uploadFileTypes.physicianOrderFiles\n }]\n })\n\n $scope.uploader.onSuccessItem = function(item, response, status, headers) {\n $scope.order.upload_files = $scope.order.upload_files || []\n $scope.order.upload_files.push({\n s3_key: response\n })\n }\n\n // Show a warning if a non-US physician tries to order for a US patient.\n $scope.showUSWarning = function () {\n const patientInUS = $scope.order.patient_profile && $scope.order.patient_profile.country == \"US\"\n return patientInUS && angular.isDefined($scope.order.ordering_physician_profile) && $scope.order.ordering_physician_profile.country != \"US\"\n }\n\n function isPatientInNY() {\n return $scope.order.patient_profile && $scope.order.patient_profile.country == \"US\" && $scope.order.patient_profile.state == \"NY\"\n }\n function isProviderInNy() {\n return $scope.order.ordering_physician_profile && $scope.order.ordering_physician_profile.state == 'NY'\n }\n // Show a focus ordering physician\n $scope.showNYBlock = function() {\n if ($scope.order.type && $scope.order.type != 'sample_ordered') {\n // For KIO orders, we expect the sample to provided outside of NY or the physician is in NY. CPP-1156\n return false\n }\n return isPatientInNY() && !isProviderInNy()\n }\n\n $scope.showTestSpecificNyBlock = function() {\n if (testTypesBlockedInNewYork.indexOf($scope.order.test_requested) < 0) {\n return false\n }\n // For Ship to home block if patient is in NY\n if ($scope.order.type && $scope.order.type == 'sample_ordered') {\n return isPatientInNY()\n } else {\n return isProviderInNy()\n }\n }\n\n $scope.showNotYetAvailableBlockPatient = () => {\n return euCountries.includes($scope.order.patient_profile.country) &&\n !testTypesAllowedInEU.includes($scope.order.test_requested) &&\n $scope.order.type == 'sample_ordered'\n }\n\n $scope.continue = function(order) {\n if (!validateOrder(order)) {\n return\n }\n\n if (order.type == 'sample_ordered' && !$scope.settings.allow_ship_to_home_payment) {\n order.skip_payment = true\n }\n\n PhysicianOrderFormData.set(order)\n\n PhysicianOrderFormFlow.goTo(\n Navigation.URLS[Navigation.STATES.PAYMENT],\n true\n )\n }\n\n function _checkMinorTestType(order) {\n //check whether trying to order a non-approved test for a minor\n const is_minor = patientIsMinor(new Date(Date.parse(order.patient_profile.birthday)))\n const is_kio = order.type === PhysicianOrderType.SAMPLE_AT_OFFICE\n const is_whitelisted_test = [testTypes.fh3, testTypes.cardio30].indexOf(order.test_requested) !== -1\n if (is_minor) {\n return is_kio && is_whitelisted_test\n } else {\n return true\n }\n }\n\n function validateOrder(order) {\n const testName = sku[order.test_requested].productName\n\n if (!_checkMinorTestType(order)) {\n // if the test_requested field was untouched, validity not yet have been checked\n return $scope.form.test_requested.checkMinor()\n }\n\n if ($scope.showUSWarning()) {\n ProviderPlatformModals.openUSProvidersForUSPatientsModal()\n return false\n }\n if ($scope.showNYBlock()) {\n ProviderPlatformModals.openNYBlockModal()\n return false\n }\n if ($scope.showTestSpecificNyBlock()) {\n NotYetAvailableModal.open('NY', testName)\n return false\n }\n if ($scope.showNotYetAvailableBlockPatient()) {\n const countryName = $filter('name')(order.patient_profile.country)\n NotYetAvailableModal.open(countryName, testName)\n return false\n }\n\n if (!$scope.form.validate()) {\n return false\n }\n if (!$scope.uploader.doneUploading(true)) {\n return false\n }\n return true\n }\n\n $scope.addAdditionalRecipient = function() {\n if ($scope.order.additional_recipients.length < 4) {\n $scope.order.additional_recipients.push({})\n }\n }\n\n $scope.removeAdditionalRecipient = function(index) {\n $scope.order.additional_recipients.splice(index, 1)\n }\n\n if (draft) {\n $scope.order = DetailedPhysicianOrder.loadFromDraft($scope.order, draft)\n PhysicianOrderFormData.set($scope.order)\n } else if (enrollment) {\n $scope.order = DetailedPhysicianOrder.loadFromEnrollment($scope.order, enrollment)\n PhysicianOrderFormData.set($scope.order)\n }\n\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n if (waffle.switch_is_active('block-cpp-ordering-2024-11')) {\n const isSupportStaff = Boolean(auth.currentUser.is_support_staff)\n // As of Nov 1 2024, we are blocking CPP orders for all external users\n if (!isSupportStaff) {\n return $location.url('/providers/home')\n }\n }\n}\n","module.exports = function ProviderPlatformReviewOrderController(\n $scope, $location, $anchorScroll, project, auth,\n DetailedPhysicianOrder, ProviderPlatformModals, PhysicianOrderFormData,\n PhysicianOrderFormFlow, PortalPaginator, ngToast,\n PhysicianOrderNavigationService, ApplicationType, waffle, claimStore,\n) {\n 'ngInject'\n\n PhysicianOrderNavigationService.setState(PhysicianOrderNavigationService.STATES.REVIEW)\n $scope.order = PhysicianOrderFormData.get()\n $scope.order.require_counseling_if_positive = !$scope.order.not_require_counseling_if_positive\n $scope.order.show_vus_details = !$scope.order.no_vus_details\n $scope.order._submitting = false\n\n // The current provider.\n $scope.userProvider = project.application === ApplicationType.CLINICAL\n ? undefined\n : auth.currentUser.provider_profile\n\n $scope.edit = function(anchor) {\n PhysicianOrderFormFlow.goTo('/providers/place-order')\n if (anchor) {\n $location.hash(anchor)\n $anchorScroll()\n }\n }\n\n $scope.submitOrder = function(order) {\n $scope.order._submitting = true\n\n if (order.skip_payment) {\n order.shipping_address = null\n }\n order.stripe = null\n\n new DetailedPhysicianOrder(order).$save()\n .then(function(res) {\n PortalPaginator.refresh()\n PhysicianOrderFormData.refresh()\n claimStore.clearClaim();\n $location.path('/providers/order/log/' + res.requisition_number).search()\n })\n .catch(function(res) {\n $scope.edit('#kit')\n if (res.status == 402) {\n // Error coming from our API/Django, returns what Stripe returns in `error.message`, always a single string from them. DRF returns it as a list of `non_field_errors`\n ProviderPlatformModals.openPaymentErrorModal(res.data.non_field_errors[0])\n } else if (res.error) {\n ProviderPlatformModals.openPaymentErrorModal(\"Your payment authorization failed.\")\n } else if (res.message) {\n ngToast.create({className: 'error', content: res.message})\n }\n })\n .finally(function(res) {\n $scope.order._submitting = false\n })\n }\n}\n","module.exports = function ProviderPlatformSubmitPaymentController(\n $scope,\n auth,\n project,\n promoCodeStore,\n testTypes,\n physicianOrderCheckout,\n DetailedPhysicianOrder,\n PhysicianOrderFormData,\n PhysicianOrderFormFlow,\n PhysicianOrderNavigationService\n) {\n 'ngInject'\n\n PhysicianOrderNavigationService.setState(PhysicianOrderNavigationService.STATES.PAYMENT)\n\n $scope.userProvider = auth.currentUser.provider_profile\n $scope.settings = $scope.userProvider ? $scope.userProvider.settings : {}\n\n $scope.order = PhysicianOrderFormData.getOrSetIfEmpty(\n DetailedPhysicianOrder.initializeWithSettings($scope.settings)\n )\n\n // Clear all promo-codes before the order\n promoCodeStore.clear()\n\n if ($scope.settings && $scope.settings.payment_code) {\n promoCodeStore.updateCode($scope.settings.payment_code, true)\n }\n if ($scope.order.promocode_for_payment) {\n promoCodeStore.updateCode($scope.order.promocode_for_payment, true)\n }\n\n $scope.checkout = new physicianOrderCheckout($scope.order, $scope.userProvider, $scope.order.test_requested)\n\n function moveToReview() {\n PhysicianOrderFormFlow.goTo(\n PhysicianOrderNavigationService.URLS.REVIEW,\n true\n )\n }\n\n $scope.store = promoCodeStore\n $scope.reviewOrder = function(order) {\n if (promoCodeStore.promotionalCode) {\n order.promocode_for_payment = promoCodeStore.promotionalCode.code\n }\n PhysicianOrderFormData.set(order)\n $scope.submitting = true\n if (!$scope.order.payment.meetsInsuranceCheck()) {\n $scope.checkout.reviewPayment()\n .then(moveToReview)\n .finally(function() {\n $scope.submitting = false\n })\n } else {\n moveToReview()\n }\n }\n}\n","module.exports = function ProviderPlatformOrderController($rootScope, $scope, $location, $routeParams, $timeout, $translate, $window, $http, auth, DetailedPhysicianOrder, PhysicianOrderCancellation, ngToast, locationSkipReload, modalShim, providerReleaseResultsForOrderModal, showMedicationPromo) {\n 'ngInject'\n\n $scope.showPgxBanner = false\n\n const checkShowPgxBanner = (order) => {\n const pgxOrder = order.kit_orders.find((ko) => ko.test_type === 'pgx v1')\n if (!!pgxOrder && order.status.has_report && showMedicationPromo()) {\n const PgxOnboardingEventLogAPI = '/api/v1/event_log?event_type=api:Tutorial Finished: PgxOnboarding'\n $http.get(PgxOnboardingEventLogAPI).then((resp) => {\n if (resp.data.count === 0) {\n $scope.showPgxBanner = true\n }\n })\n }\n }\n\n /*\n * Returns the test types of any reports that the provider can release to the patient.\n */\n $scope.getTestTypesWithReleasableReports = function() {\n // Order hasn't loaded yet.\n if (!$scope.order) {\n return [];\n }\n // If the order is provider-owned, we don't release results to the patient.\n if (!!$scope.order.is_provider_owned) {\n return [];\n }\n // Check if the order is in a state where results are available to the physician.\n if (!$scope.order.status.has_report) {\n return [];\n }\n // From the previous check, we know that all KitOrders have reports that are\n // available to the physician. Now we determine which ones haven't been released to\n // the patient yet.\n return $scope.order.kit_orders\n .filter((kitOrder) => !kitOrder.is_released)\n .map((kitOrder) => kitOrder.test_type);\n };\n\n $scope.openPhysOrderReleaseModal = function() {\n const releaseResultModal = providerReleaseResultsForOrderModal.open(\n $scope.order.requisition_number,\n $scope.getTestTypesWithReleasableReports(),\n );\n // Consumers may be using Windows + external PDF readers, so a shim is required\n releaseResultModal.result.finally(function() {\n modalShim.remove();\n });\n releaseResultModal.opened.then(function() {\n modalShim.add();\n });\n };\n\n $scope.loadOrder = function() {\n DetailedPhysicianOrder.get({ requisition_number: $routeParams.requisition_number }).$promise\n .then(function(res) {\n $scope.order = res\n checkShowPgxBanner($scope.order)\n $translate('PROVIDER_PORTAL.STATUSES.' + $scope.order.status.name + '.NAME')\n .then(function(translation) { $scope.order.statusName = translation })\n })\n .catch(function(res) {\n if (res.status == 404) {\n $location.path('/providers/home')\n ngToast.create({\n className: 'error',\n content: 'Order not available to this account'\n })\n }\n })\n }\n\n $scope.loadOrder()\n\n $scope.goToMedicationTool = () => {\n $window.location = '/providers/medication-tool'\n }\n\n $scope.onSaveOrder = function() {\n return $scope.order.$update()\n .then(function() {\n ngToast.create('Order has been successfully updated')\n $scope.loadOrder()\n })\n .catch((response) => {\n const errorMessage = (response.data && response.data.non_field_errors) ?\n response.data.non_field_errors.join(', ') :\n 'Update failed'\n\n ngToast.create({\n className: 'error',\n content: errorMessage\n })\n })\n }\n\n $scope.currentUser = auth.currentUser\n $scope.url = $location.path()\n $scope.resultsPath = '/providers/order/results/'\n $scope.logPath = '/providers/order/log/'\n $scope.detailsPath = '/providers/order/details/'\n\n $scope.isPath = function(url, path) {\n return url.indexOf(path) == 0\n }\n\n $scope.goToOrders = function() {\n $location.path('/providers/home')\n }\n\n $scope.goToPath = function(url, id) {\n locationSkipReload(url+ id)\n $scope.url = url\n }\n\n $scope.shipKit = function(order) {\n $scope.shipping = true\n $http.put('/api/v1/detailed_physician_orders/' + order.requisition_number + '/trigger_shipping')\n .then(function(){\n $rootScope.$broadcast('physicianOrderLog:updated')\n })\n .then(function() {\n ngToast.create(\"Queued for shipping.\")\n })\n .finally(function() {\n $scope.shipping = false\n })\n }\n\n $scope.cancelTest = (order) => {\n PhysicianOrderCancellation.open(order.requisition_number, order.patient_profile.first_name, order.patient_profile.last_name).result\n .then(() => {\n $scope.order.is_cancellable = false\n ngToast.create(\"Order has been cancelled.\")\n $rootScope.$broadcast('physicianOrderLog:updated')\n })\n }\n}\n","module.exports = function ProviderAccountCreationController(\n $rootScope, $scope, $location, $routeParams, auth, Account, ProviderAccountFlow,\n ProviderAccount, requestErrorToast, ColorProviderPlatformInvitation, waffle\n) {\n 'ngInject'\n\n $scope.account = ProviderAccount.get()\n\n if (!$scope.account.provider_profile) {\n $scope.account.provider_profile = {}\n }\n\n if (!$scope.account.provider_profile.country) {\n $scope.account.provider_profile.country = 'US'\n }\n\n // If there is a query param with key ``token``, then this is an invited\n // provider. The token is a unique key pointing to an invitation, and\n // the invitation is linked to an already-verified provider.\n\n const token = $location.search().token || $routeParams.token\n const emailConfirmationToken = $location.search().t\n\n if (token) {\n // Fetch account\n ColorProviderPlatformInvitation.get({ token: token.toLowerCase() }).$promise\n .then(function(invitation) {\n $scope.invitation = invitation\n $scope.institution = invitation.institution\n\n const providerProfile = invitation.provider_profile\n providerProfile // Accessing the variable somehow forces a repaint of the primaryRole select\n $scope.account.first_name = providerProfile.first_name\n $scope.account.last_name = providerProfile.last_name\n $scope.account.email = providerProfile.email\n $scope.account.provider_profile = providerProfile\n\n $scope.account.invitation = {\n token: invitation.token\n }\n })\n .catch(function(response) {\n // TODO: Alert the user in a better way\n console.log(response)\n })\n }\n\n if (emailConfirmationToken) {\n $scope.account.t = emailConfirmationToken\n }\n\n // The below behavior (prefilled provider form) is deprecated.\n\n if ($location.search().prefill) {\n const user_fields = ['first_name', 'last_name', 'email']\n const provider_profile_fields = ['primary_role', 'npi', 'institution_name', 'address_line1',\n 'city', 'state', 'country']\n\n const phone_fields = ['phone_number', 'fax_number']\n\n $scope.account.provider_profile = {}\n $location.search('prefill', null)\n\n user_fields.forEach(function(field) {\n $scope.account[field] = $location.search()[field]\n $location.search(field, null)\n })\n\n provider_profile_fields.forEach(function(field) {\n $scope.account.provider_profile[field] = $location.search()[field]\n $location.search(field, null)\n })\n\n phone_fields.forEach(function (field) {\n $scope.account.provider_profile[field] = {\n country: \"US\",\n national_number: $location.search()[field]\n }\n $location.search(field, null)\n })\n }\n\n $scope.createAccount = function() {\n // TODO: Copy original data so it is not modified.\n const payload = angular.copy($scope.account)\n\n if (payload.provider_profile) {\n payload.provider_profile['first_name'] = payload.first_name\n payload.provider_profile['last_name'] = payload.last_name\n }\n\n // Creating new resource so that password won't get wiped\n // on request fulfillment.\n\n return new Account(payload).$save()\n .then(function(account) {\n auth.isSynced = false\n $rootScope.$broadcast('account:created', account)\n $location.path('/providers/home').search({ welcome: 'true' })\n })\n .catch(function(res) {\n if (res.data.email) {\n ProviderAccount.set(payload)\n ProviderAccountFlow.goTo('/providers/existing-account', true)\n }\n // If the error is due to the password, show the error in a toast.\n if (res.data.password) {\n requestErrorToast({data: res.data.password[0]})\n }\n })\n }\n}\n","module.exports = function ProviderExistingAccountController($scope, $location, auth, ProviderAccount, OrderingPhysicianProfile) {\n 'ngInject'\n\n const account = ProviderAccount.get()\n $scope.email = account.email\n $scope.submitting = false\n $scope.login = function(password) {\n $scope.submitting = true\n auth.login($scope.email, password)\n .then(function(res) {\n return OrderingPhysicianProfile.save(account.provider_profile).$promise\n })\n .then(function(res) { return auth.sync(true) })\n .then(function(res) {\n $location.path('/providers/home').search({welcome:'true'})\n })\n .catch(function(res) {\n $location.path('/providers/create-account')\n })\n .finally(function(res) {\n $scope.submitting = false\n })\n }\n}\n","// note this is used in a different module:\n// src/django_apps/users/templates/angular/accounts/settings.jade\nmodule.exports = function OrderPreferencesController($scope, auth, ngToast, ProviderSettings) {\n 'ngInject'\n\n $scope.settings = new ProviderSettings(auth.currentUser.provider_profile.settings)\n $scope.provider = auth.currentUser.provider_profile\n $scope.editingField = \"\"\n $scope.editedValue = {}\n\n $scope.edit = function(fieldName) {\n $scope.editingField = fieldName\n }\n\n $scope.save = function(fieldName) {\n $scope.settings[fieldName] = $scope.editedValue[fieldName]\n $scope.cancel()\n }\n\n $scope.cancel = function () {\n $scope.editedValue = {}\n $scope.editingField = \"\"\n }\n\n $scope.$watch(\"settings\",\n function(newValue, oldValue) {\n if (oldValue && newValue != oldValue) {\n $scope.settings.$update()\n .then(function() { return auth.sync(true) })\n .then(function(res) {\n ngToast.create('Your preferences have been updated')\n })\n }\n },\n true\n )\n}\n","module.exports = function ProviderPlatformHomeController($scope, $location, $modal, auth,\n ngToast, cppHomeUrlPath, DraftPhysicianOrder, ProviderPlatformModals) {\n 'ngInject'\n\n function setOrders(promise) {\n $scope.loading = true\n promise.then(function(res) {\n $scope.drafts = res\n }).finally(function(res) {\n $scope.loading = false\n })\n }\n const params = cppHomeUrlPath.getApiParamsFromLocation()\n setOrders(DraftPhysicianOrder.get(params).$promise)\n $scope.routeName = cppHomeUrlPath.getRouteName()\n\n $scope.continueOrder = function(draft) {\n $location.path('/providers/place-order').search({draft: draft.requisition_number})\n }\n\n $scope.discard = function(draft, $event) {\n // Stops propogation of click into continuing the order\n $event.stopPropagation()\n ProviderPlatformModals.openCancelOrderModal(\n draft.requisition_number\n ).result.then(function() {\n setOrders(DraftPhysicianOrder.get({'ordering': '-created_at'}).$promise)\n })\n }\n}\n","/**\n * @prettier\n */\n\nmodule.exports = function ProviderPlatformFamilyTestingController(\n $scope,\n cppHomeUrlPath,\n Enrollment\n) {\n 'ngInject';\n\n $scope.loading = true;\n const params = cppHomeUrlPath.getApiParamsFromLocation();\n Enrollment.get(params)\n .$promise.then(function(enrollments) {\n $scope.enrollments = enrollments;\n })\n .finally(function() {\n $scope.loading = false;\n });\n};\n","/**\n * @prettier\n */\nmodule.exports = function ProviderPlatformFamilyTestingController(\n $scope,\n $location,\n $http,\n auth,\n project,\n fileUploader,\n familyTestingGenes,\n ProviderFamilyTestingFlow,\n waffle\n) {\n 'ngInject';\n\n if (project.application != 'clinical') {\n $scope.userProvider = auth.currentUser.provider_profile;\n }\n\n $scope.genes = familyTestingGenes;\n\n $scope.enrollment = {\n for_physician_order: undefined,\n proband: {\n relationship: 'self',\n genes: [],\n },\n test_type: 'combo 3',\n };\n if ($scope.userProvider) {\n $scope.enrollment.provider_id = $scope.userProvider.id;\n }\n\n $scope.uploader = fileUploader({\n url: '/api/v1/family_testing/upload',\n queueLimit: 1,\n });\n\n $scope.uploader.onSuccessItem = function(item, response) {\n $scope.enrollment.proband.document_key = response;\n };\n\n $scope.relationships = [\n [\"Patient's mother\", 'mother'],\n [\"Patient's father\", 'father'],\n [\"Patient's daughter\", 'daughter'],\n [\"Patient's son\", 'son'],\n [\"Patient's brother\", 'brother'],\n [\"Patient's sister\", 'sister'],\n ];\n\n $scope.submitting = false;\n\n $scope.submit = function(enrollment, form) {\n if (!form.validate()) {\n return;\n }\n $scope.submitting = true;\n $http\n .post('/api/v1/family_testing/request_discount', enrollment)\n .then(function() {\n if (enrollment.for_physician_order) {\n ProviderFamilyTestingFlow.goTo('/providers/family-testing-reviewing', true, {\n for_physician_order: 'true',\n });\n } else {\n ProviderFamilyTestingFlow.goTo('/providers/family-testing-reviewing', true);\n }\n })\n .finally(function() {\n $scope.submitting = false;\n });\n };\n};\n","module.exports = function ProviderPlatformReviewingController($scope, $location) {\n 'ngInject'\n $scope.for_physician_order = false\n if ($location.search()['for_physician_order'] == 'true') {\n $scope.for_physician_order = true\n }\n}\n","/**\n * @prettier\n */\nmodule.exports = function ProviderPlatformSharedController($scope, $location, SharedOrder) {\n 'ngInject';\n\n const setUp = () => {\n this.loading = true;\n SharedOrder.get()\n .$promise.then(response => {\n this.orders = response.results;\n this.orderCount = response.count;\n })\n .finally(() => (this.loading = false));\n };\n\n this.openOrder = order => {\n if (order.status.name == 'results_available') {\n $location.path(`/providers/shared_order/results/${order.order_number}`);\n } else {\n $location.path(`/providers/shared_order/details/${order.order_number}`);\n }\n };\n\n setUp();\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function ProviderPlatformSharedOrderController(\n $rootScope,\n $scope,\n $location,\n $routeParams,\n $translate,\n $http,\n $window,\n SharedOrder,\n ngToast,\n locationSkipReload,\n showMedicationPromo\n) {\n 'ngInject';\n\n this.showPgxBanner = false;\n\n this.loadSharedOrder = function() {\n SharedOrder.get({ order_number: $routeParams.order_number })\n .$promise.then(order => {\n this.order = order;\n this.resultIsAvailable = order.status.name === 'results_available';\n if (order.test_type === 'pgx v1' && this.resultIsAvailable) {\n if (showMedicationPromo()) {\n const PgxOnboardingEventLogAPI =\n '/api/v1/event_log?event_type=api:Tutorial Finished: PgxOnboarding';\n $http.get(PgxOnboardingEventLogAPI).then(resp => {\n if (resp.data.count === 0) {\n this.showPgxBanner = true;\n }\n });\n }\n }\n })\n .catch(response => {\n if (response.status == 404) {\n $location.path('/providers/home');\n ngToast.create({\n className: 'error',\n content: 'Order not available to this account',\n });\n }\n });\n };\n\n this.goToMedicationTool = () => {\n $window.location = '/providers/medication-tool';\n };\n\n this.loadSharedOrder();\n\n this.url = $location.path();\n\n this.isPath = path => {\n return this.url.indexOf(path) >= 0;\n };\n\n this.goToPath = url => {\n url = `${url}${this.order.order_number}`;\n locationSkipReload(url);\n this.url = url;\n };\n\n this.PATHS = {\n DETAILS: '/providers/shared_order/details/',\n RESULTS: '/providers/shared_order/results/',\n };\n};\n","module.exports = angular.module('orderingPhysicianDirectives', ['ngclipboard'])\n .directive('clrPatientProfile', require('./directives/clr_patient_profile'))\n .directive('clrProviderInput', require('./directives/clr_provider_input'))\n .directive('clrProviderInstitution', require('./directives/clr_provider_institution'))\n .directive('clrProviderProfile', require('./directives/clr_provider_profile'))\n .directive('cppBanner', require('./directives/cpp_banner'))\n .directive('insuranceChecklistAffix', require('./directives/insurance_checklist_affix'))\n .directive('orderTestingButton', require('./directives/order_testing_button'))\n .directive('physicianOrderSearchInput', require('./directives/physician_order_search_input'))\n .directive('providerCreateAccountForm', require('./directives/provider_create_account_form'))\n .directive('providerHiw', require('./directives/provider_hiw'))\n .directive('providerOrderTabs', require('./directives/provider_order_tabs'))\n .directive('providerSharedOrderTabs', require('./directives/provider_shared_order_tabs'))\n .directive('providerPaginator', require('./directives/provider_paginator'))\n .directive('providerSidebar', require('./directives/provider_sidebar'))\n .directive('providerUploader', require('./directives/provider_uploader'))\n .directive('submitPaymentForm', require('./directives/submit_payment_form'))\n .directive('sharedOrderDetails', require('./directives/shared_order_details'))\n .directive('sharedOrderResults', require('./directives/shared_order_results'))\n .directive('selectEnrollmentType', require('./directives/select_enrollment_type'))\n","module.exports = function clrPatientProfile() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n order: '=',\n editing: '=',\n onCancelEdit: '=?',\n onEdit: '=?'\n },\n templateUrl: '/ordering_physicians/directives/clr_patient_profile.html',\n link: function(scope) {\n let oldPatientProfile\n\n scope.$watch('order', function(order) {\n if (order) {\n oldPatientProfile = angular.copy(scope.order.patient_profile)\n }\n })\n\n scope.cancel = function() {\n scope.order.patient_profile = oldPatientProfile\n scope.onCancelEdit()\n }\n\n scope.edit = function() {\n scope.onEdit()\n }\n }\n }\n}\n","module.exports = function clrProviderInput(\n NotYetAvailableModal, orderingPhysicianRoles, npiOptionalRoles, externalProviderRoles\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/clr_provider_input.html',\n scope: {\n defaultCountry: '=',\n isOrderingPhysician: '=',\n provider: '='\n },\n require: '^form',\n link: function(scope, elem, attr, ctrl) {\n scope.roles = scope.isOrderingPhysician ? orderingPhysicianRoles : externalProviderRoles\n scope.npiOptionalRoles = npiOptionalRoles.map(function(role) { return role[0] })\n scope.NotYetAvailableModal = NotYetAvailableModal\n scope.form = ctrl\n\n scope.$watch('provider.country', function (newValue) {\n scope.showNpi = newValue == 'US'\n if (scope.provider && newValue != 'US') {\n delete scope.provider['npi']\n }\n })\n\n if (!scope.provider) {\n scope.provider = {\n country: scope.defaultCountry\n }\n }\n }\n }\n}\n","module.exports = function clrProviderInstitution() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n institution: '='\n },\n templateUrl: '/ordering_physicians/directives/clr_provider_institution.html',\n link: function(scope, _, attrs) {\n if (attrs.showPhone) {\n scope.showPhone = true\n }\n\n if (attrs.showFax) {\n scope.showFax = true\n }\n }\n }\n}\n","module.exports = function clrProviderProfile() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n provider: '='\n },\n templateUrl: '/ordering_physicians/directives/clr_provider_profile.html',\n link: function(scope, element) {\n scope.showPhoneNumber = false\n scope.showFaxNumber = false\n scope.$watch('provider', function(provider) {\n if (provider) {\n if (angular.isString(scope.provider.phone_number)) {\n scope.showPhoneNumber = scope.provider.phone_number\n } else {\n scope.showPhoneNumber = scope.provider.phone_number && scope.provider.phone_number.national_number\n }\n\n if (angular.isString(scope.provider.fax_number)) {\n scope.showFaxNumber = scope.provider.fax_number\n } else {\n scope.showFaxNumber = scope.provider.fax_number && scope.provider.fax_number.national_number\n }\n }\n })\n }\n }\n}\n","module.exports = function cppBanner() {\n 'ngInject'\n\n return {\n restrict: 'E',\n replace: true,\n templateUrl: '/ordering_physicians/cpp_banner.html',\n }\n}\n","module.exports = function insuranceChecklistAffix() {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/insurance_checklist_affix.html',\n scope: {\n },\n link: function(scope, elem, attr) {\n }\n }\n}\n","module.exports = function clrPatientProfile($location, $modal, auth, waffle) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/order_testing_button.html',\n link: function(scope) {\n\n // As of Nov 1 2024, we are blocking all CPP orders\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n scope.orderTestingButtonIsVisible = !waffle.switch_is_active('block-cpp-ordering-2024-11')\n\n scope.goToPlaceOrder = function() {\n if (auth.currentUser.is_email_confirmed) {\n $location.url('/providers/place-order/')\n } else {\n auth.sync(true)\n .then(function(account) {\n if (account.is_email_confirmed) {\n $location.url('/providers/place-order')\n } else {\n openEmailConfirmationModal()\n }\n })\n }\n }\n\n function openEmailConfirmationModal() {\n return $modal.open({\n templateUrl: \"/ordering_physicians/_confirm_email_modal.html\",\n size: \"md\"\n })\n }\n }\n }\n}\n","module.exports = function physicianOrderSearchInput($location, cppHomeUrlPath) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/search_bar.html',\n scope: {\n },\n link: function(scope, elem) {\n\n scope.expanded = false\n const input = elem.find('input')\n\n scope.onKeyDown = function($event) {\n // on hitting enter\n if ($event.keyCode == 13) {\n if (scope.searchQuery) {\n submitSearch(scope.searchQuery)\n } else {\n scope.dismiss()\n }\n $event.preventDefault()\n }\n }\n\n setPlaceholder()\n scope.$on('$locationChangeStart', setPlaceholder)\n\n function setPlaceholder() {\n if (cppHomeUrlPath.getRouteName() == 'drafts'){\n scope.placeholder = 'ORDERING_PHYSICIANS.SEARCH.DRAFTS'\n } else {\n scope.placeholder = 'ORDERING_PHYSICIANS.SEARCH.ALL_ORDERS'\n }\n }\n\n function submitSearch(searchQuery) {\n // Base 64 encode the query param to obfuscate any PHI in URL\n const encodedQuery = encodeURIComponent(btoa(searchQuery))\n if (cppHomeUrlPath.getRouteName() == 'all' || cppHomeUrlPath.getRouteName() == 'drafts') {\n $location.search({'search': encodedQuery})\n } else {\n $location.path('/providers/home').search({search: encodedQuery})\n }\n }\n\n scope.dismiss = function() {\n $location.search({})\n }\n\n if (cppHomeUrlPath.getSearchQuery()) {\n scope.searchQuery = cppHomeUrlPath.getSearchQuery()\n scope.expanded = true\n }\n }\n }\n}\n","module.exports = function providerCreateAccountForm(\n externalProviderRoles,\n npiOptionalRoles,\n providerHeardAboutColorThrough\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n account: '=',\n institution: '=?',\n invited: '=',\n onSubmit: '='\n },\n templateUrl: '/ordering_physicians/directives/provider_create_account_form.html',\n link: function(scope) {\n scope.heardAboutColorThrough = providerHeardAboutColorThrough\n scope.primaryRoles = externalProviderRoles\n scope.showNpi = true\n\n scope.$watch('account.provider_profile', function(providerProfile) {\n if (providerProfile) {\n if (scope.invited && !providerProfile.npi) {\n scope.showNpi = false\n }\n }\n })\n\n // International providers do not have an NPI.\n scope.$watch('account.provider_profile.country', function(country) {\n scope.showNpi = country === 'US'\n if (\n country !== 'US' &&\n scope.account.provider_profile &&\n scope.account.provider_profile.npi\n ) {\n delete scope.account.provider_profile.npi\n }\n })\n\n scope.creatingAccount = false\n scope.submit = function() {\n scope.creatingAccount = true\n scope.onSubmit().finally(function() {\n scope.creatingAccount = false\n })\n }\n }\n }\n}\n","module.exports = function providerHiw() {\n 'ngInject'\n\n return {\n restrict: 'E',\n replace: true,\n templateUrl: '/ordering_physicians/providers/_provider_hiw.html'\n }\n}\n","/**\n * @prettier\n */\n\nmodule.exports = function providerOrderTabs() {\n 'ngInject';\n\n return {\n restrict: 'E',\n replace: true,\n templateUrl: '/ordering_physicians/provider_order_tabs.html',\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function providerOrderTabs() {\n return {\n restrict: 'E',\n scope: {\n isPath: '=',\n goToPath: '=',\n paths: '=',\n },\n templateUrl: '/ordering_physicians/directives/provider_shared_order_tabs.html',\n controller: function() {\n 'ngInject';\n },\n controllerAs: '$ctrl',\n bindToController: true,\n };\n};\n","module.exports = function providerPaginator($window, $location) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n pageSize: '@',\n results: '='\n },\n templateUrl: '/ordering_physicians/_paginator.html',\n link: function(scope) {\n\n scope.pageSize = parseInt(scope.pageSize)\n let currentPage = 1\n const pageNum = $location.search()['page']\n if (pageNum) {\n currentPage = parseInt(pageNum)\n }\n\n scope.currentItem = 1 + (currentPage - 1) * scope.pageSize\n scope.endItem = Math.min(scope.currentItem + 15, scope.results.count)\n\n scope.getNextPage = function() {\n const currentParams = angular.copy($location.search())\n currentParams['page'] = currentPage + 1\n $location.search(currentParams)\n }\n\n scope.getPreviousPage = function() {\n const currentParams = angular.copy($location.search())\n currentParams['page'] = currentPage - 1\n $location.search(currentParams)\n }\n }\n }\n}\n","/**\n * @prettier\n */\nmodule.exports = function providerSidebar(\n $window,\n auth,\n cppHomeUrlPath,\n showMedicationPromo,\n DraftPhysicianOrder\n) {\n 'ngInject';\n\n return {\n restrict: 'E',\n replace: true,\n templateUrl: '/ordering_physicians/_sidebar.html',\n link: function(scope) {\n scope.activeNav = cppHomeUrlPath.getRouteName();\n\n function setUp() {\n // TODO(jw) think about heart beat for drafts\n DraftPhysicianOrder.get().$promise.then(function(response) {\n scope.draftsCount = response.count;\n });\n }\n\n if (auth.currentUser.provider_profile) {\n scope.institutionName = auth.currentUser.provider_profile.institution\n ? auth.currentUser.provider_profile.institution.name\n : auth.currentUser.provider_profile.institution_name;\n }\n\n setUp();\n\n scope.goToMedicationReview = function() {\n $window.location.assign('/providers/medication-tool');\n };\n\n scope.showMedicationPromo = showMedicationPromo;\n\n scope.goToTutorials = function() {\n $window.location.assign('/providers/tutorials');\n };\n },\n };\n};\n","\"use strict\"\n\n/**\n * File uploader.\n *\n * The uploader scope var must be a FileUploader.\n */\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/provider_uploader.html',\n scope: {\n uploader: '=',\n label: '@'\n },\n link: function(scope) {\n scope.removeFile = function(file) {\n file.cancel()\n file.remove()\n if (scope.uploader.onRemoveFile) {\n scope.uploader.onRemoveFile(file)\n }\n }\n\n // Set the uploaded file type to the currently selected fileType\n scope.uploader.onBeforeUploadItem = (fileItem) => {\n if (fileItem.formData.length == 0) {\n fileItem.formData = [{}]\n }\n fileItem.formData[0].file_type = scope.fileType\n fileItem.file_type = scope.fileType\n }\n\n scope.toggleDropdown = () => scope.dropdownOpened = !scope.dropdownOpened\n\n scope.triggerUploadDialog = (fileType) => {\n scope.dropdownOpened = false\n scope.fileType = fileType\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function submitPaymentForm(\n $cookies,\n $timeout,\n ApplicationType,\n PhysicianOrderType,\n ProviderPlatformModals,\n auth,\n project,\n overrideOopBlockModal,\n promoCodeStore,\n testTypes,\n waffle\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n checkout: '=',\n onSubmit: '=',\n order: '=',\n\n // Whether this form information is being submitted.\n submitting: '=',\n\n // Whether this form is being used to re-submit payment details.\n resubmitting: '=',\n\n // The initial payment type to show. Possible values are \"insurance\".\n paymentType: '@',\n\n // The text for the submit button. Possible values are\n // {\"review-order\", \"update-order\"}\n submitButtonText: '@'\n },\n templateUrl: '/ordering_physicians/directives/submit_payment_form.html',\n link: function(scope) {\n const STATES = {\n INSURANCE: 'INSURANCE',\n CASH_PAY: 'CASH_PAY',\n SWITCHED_TO_CASH_PAY: 'SWITCHED_TO_CASH_PAY',\n OVERRIDE_OOP_BLOCK: 'OVERRIDE_OOP_BLOCK'\n }\n\n scope.STATES = STATES\n\n scope.settings = { allow_ship_to_home_payment: true };\n\n if (project.application !== ApplicationType.CLINICAL) {\n scope.settings = auth.currentUser.provider_profile.settings\n } else {\n // Clear all promocodes when placing orders in clinical\n promoCodeStore.clear()\n }\n\n scope.isSupportStaff = auth.currentUser.is_support_staff\n\n // NOTE: We turned off the ability to bill to insurance in Aug 2024 by\n // setting following variable to false (we used to consider location,\n // provider settings, and test type), unless the user is support staff\n scope.isInsuranceOn = !!scope.isSupportStaff\n\n scope.PhysicianOrderType = PhysicianOrderType\n\n scope.isShipToHomePaymentEnabled = scope.settings.allow_ship_to_home_payment\n\n scope.order.ui.payment = scope.order.ui.payment || {}\n\n scope.ui = scope.order.ui.payment\n\n if (scope.paymentType === 'insurance') {\n scope.ui.state = STATES.INSURANCE\n }\n\n if (!scope.isInsuranceOn || scope.order.type === PhysicianOrderType.SAMPLE_ORDERED || scope.order.promocode_for_payment) {\n scope.ui.state = STATES.CASH_PAY\n }\n\n if (\n !scope.order.shipping_address &&\n scope.order.type === PhysicianOrderType.SAMPLE_ORDERED &&\n scope.isShipToHomePaymentEnabled\n ) {\n const patient = scope.order.patient_profile\n scope.order.shipping_address = {\n full_name: patient.first_name + ' ' + patient.last_name,\n line1: patient.address_line1,\n city: patient.city,\n state: patient.state,\n country: patient.country,\n postal_code: patient.postal_code,\n phone_country: patient.phone_number.country,\n phone_number: patient.phone_number.national_number,\n }\n }\n\n scope.setState = (state) => {\n scope.ui.state = state\n }\n\n scope.openOverrideOopBlockModal = () => {\n overrideOopBlockModal.open(scope.order.payment.eligibility_submission.id)\n .then(() => (scope.order.payment.eligibility_submission.overriden = true))\n .then(() => (scope.order.skip_payment = true))\n .then(() => scope.setState(STATES.OVERRIDE_OOP_BLOCK))\n }\n\n /**\n * The criteria section is visible if any of the following:\n * - we've selected insurance\n * - we've been switched to cash pay and passed the out of pocket check\n * - this lets you see the failed criteria submission card\n * - we've overriden the out of pocket block\n */\n scope.isCriteriaSectionVisible = () => {\n const insurancePredicate = scope.ui.state === STATES.INSURANCE\n const switchedToCashPredicate = (\n scope.ui.state === STATES.SWITCHED_TO_CASH_PAY &&\n scope.order.payment.meetsOopCheck()\n )\n const overrideOutOfPocketPredicate = (\n scope.ui.state === STATES.OVERRIDE_OOP_BLOCK\n )\n\n return insurancePredicate || switchedToCashPredicate || overrideOutOfPocketPredicate\n }\n\n /**\n * The criteria section is active if any of the following:\n * - we've selected insurance and passed the out of pocket check\n * - we've been switched to cash and passed the out of pocket check\n * - this lets you retry, if you failed the criteria check\n * - we've overriden the out of pocket block\n */\n scope.isCriteriaSectionActive = () => {\n const insurancePredicate = (\n scope.ui.state === STATES.INSURANCE &&\n scope.order.payment.meetsOopCheck()\n )\n const switchedToCashPredicate = (\n scope.ui.state === STATES.SWITCHED_TO_CASH_PAY &&\n scope.order.payment.meetsOopCheck()\n )\n const overrideOutOfPocketPredicate = (\n scope.ui.state === STATES.OVERRIDE_OOP_BLOCK\n )\n\n return insurancePredicate || switchedToCashPredicate || overrideOutOfPocketPredicate\n }\n\n /**\n * The criteria card is visible if the order has an attached criteria\n * submission.\n */\n scope.isCriteriaCardVisible = () => {\n return !!scope.order.payment.criteria_submission\n }\n\n scope.isShippingAddressSectionValid = () => {\n if (scope.order.type === PhysicianOrderType.SAMPLE_ORDERED && scope.isShipToHomePaymentEnabled) {\n const addressForm = angular.element('form[name=shippingAddressForm]').controller('form')\n return addressForm && addressForm.$valid\n }\n\n return true\n }\n\n // Checks if additional information section should active and editable after payment information given\n // For ship to home flow, it also makes shipping address field editable\n scope.isAdditionalInformationSectionActive = () => {\n if (!scope.ui.state) {\n return false\n }\n\n if (scope.ui.state === STATES.INSURANCE) {\n return scope.order.payment.meetsInsuranceCheck()\n }\n\n if (scope.ui.state === STATES.CASH_PAY || scope.ui.state === STATES.SWITCHED_TO_CASH_PAY) {\n if (scope.checkout.skipPayment()) {\n return true\n }\n\n const paymentForm = angular.element('form[name=submitPaymentForm]').controller('form')\n return paymentForm && paymentForm.$valid\n }\n\n if (scope.ui.state === STATES.OVERRIDE_OOP_BLOCK) {\n return scope.order.payment.meetsCriteriaCheck()\n }\n\n return false\n }\n\n scope.onEligibilityCheck = () => {\n if (scope.order.payment.meetsOopCheck()) {\n scope.setState(STATES.INSURANCE)\n } else {\n scope.setState(STATES.SWITCHED_TO_CASH_PAY)\n }\n\n scope.ui.oopAmount = scope.order.payment.oopEstimate()\n scope.ui.hasValidInsurance = !!scope.ui.oopAmount\n }\n\n /**\n * Performs any post-criteria state changes.\n */\n scope.onCriteriaCheck = () => {\n if (\n scope.ui.state === STATES.SWITCHED_TO_CASH_PAY &&\n scope.order.payment.meetsCriteriaCheck()\n ) {\n scope.setState(STATES.INSURANCE)\n } else if (!scope.order.payment.meetsCriteriaCheck()) {\n scope.setState(STATES.SWITCHED_TO_CASH_PAY)\n }\n }\n\n // The watcher below supports a specific workflow for support: they should\n // be able to submit criteria without having ICD codes The use case for this\n // is that a lot of fax insurance orders they receive are missing some\n // information, and ICD codes are a big part of that.\n\n // However, if the criteria isn't even passing, support would prefer not to\n // follow up and get the ICD codes just to get switched to cash.\n\n // Therefore, if we haven't met criteria and are support, then we don't need\n // to require ICD codes; but otherwise, we do. Of course, they should not\n // be able to submit a valid insurance order without having ICD codes, so\n // we need to validate that as well on the larger form.\n\n scope.$watch('order.payment.criteria_submission.met_criteria', (metCriteria) => {\n // Only support should be able to skip ICD codes.\n const internal = auth.currentUser.is_support_staff\n let required = true\n const prior = scope.icdCodesRequired\n\n if (internal && !metCriteria) {\n required = false\n }\n\n // Unfortunately, nested `NgModelController`s do not re-validate\n // themselves after this is changed; therefore, we must manually\n // re-validate them.\n\n scope.icdCodesRequired = required\n\n if (required !== prior) {\n $timeout(() => {\n // Grab all ICD 10 `NgModelController`s that are a part of a\n // `HealthHistoryDiagnosisForm` and revalidate them.\n // This has to be run after the digest is done updating.\n const healthHistoryDiagnosisForms = angular.element('form[name*=healthHistoryDiagnosisForm]')\n .toArray()\n .map((formElement) => angular.element(formElement).controller('form'))\n .forEach((form) => {\n const icd10CmCodesNgModels = Object.keys(form)\n .filter((key) => key.indexOf('icd10CmCodes') >= 0)\n .map((key) => form[key])\n\n icd10CmCodesNgModels.forEach(model => model.$validate())\n })\n }, 0)\n }\n })\n\n const validateOrder = (order) => {\n // Validate current form as well as insurance and hboc form if they are present\n const paymentForm = angular.element('form[name=submitPaymentForm]').controller('form')\n const addressForm = angular.element('form[name=shippingAddressForm]').controller('form')\n const insuranceDetailsForm = angular.element('form[name=placeInsuranceDetailsForm]').controller('form')\n const hbocCriteriaForm = angular.element('form[name=hbocInsuranceCriteriaForm]').controller('form')\n const additionalInformationForm = angular.element('form[name=additionalInformationForm]').controller('form')\n\n if (paymentForm && !paymentForm.validate()) {\n return false\n }\n if (addressForm && !addressForm.validate()) {\n return false\n }\n if (insuranceDetailsForm && !insuranceDetailsForm.validate()) {\n return false\n }\n\n if (hbocCriteriaForm && !hbocCriteriaForm.validate()) {\n return false\n }\n if (additionalInformationForm && !additionalInformationForm.validate()) {\n return false\n }\n\n if (\n order.type !== PhysicianOrderType.SAMPLE_ORDERED &&\n !order.patient_profile.consent_attestation &&\n !$cookies.get('seen_no_attestation')\n ) {\n ProviderPlatformModals.openNoAttestationModal().result\n .then(function() {\n scope.onSubmit(order)\n })\n return false\n }\n\n return true\n }\n\n scope.handleSubmit = () => {\n if (!validateOrder(scope.order)) {\n return\n }\n\n scope.order.payment.meets_insurance = (\n (scope.ui.state === STATES.INSURANCE && scope.order.payment.meetsInsuranceCheck()) ||\n (scope.ui.state === STATES.OVERRIDE_OOP_BLOCK && scope.order.payment.meetsCriteriaCheck())\n )\n\n if (scope.order.payment.meets_insurance) {\n scope.order.skip_payment = false;\n }\n\n return scope.onSubmit(scope.order)\n }\n }\n }\n}\n","/**\n * @prettier\n */\n\nmodule.exports = function sharedOrderDetails() {\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/shared_order_details.html',\n scope: {\n order: '=',\n },\n controller: function(testTypes) {\n 'ngInject';\n\n this.testTypes = testTypes;\n },\n controllerAs: '$ctrl',\n bindToController: true,\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function sharedOrderResults() {\n return {\n restrict: 'E',\n scope: {\n order: '=',\n },\n templateUrl: '/ordering_physicians/directives/shared_order_results.html',\n controller: function($scope, $http, ProviderPlatformModals, showMedicationPromo, $window) {\n 'ngInject';\n\n $scope.$watch('$ctrl.order', order => {\n if (order) {\n this.resultsUrl = `/color_results/${order.order_number}`;\n $scope.openFTPModal = function() {\n ProviderPlatformModals.openFTPOneClickModal(order.order_number);\n };\n\n $scope.showMedicationToolLink = () => {\n return order.test_type == 'pgx v1' && showMedicationPromo();\n };\n\n $scope.goToMedicationTool = function() {\n if ($scope.showMedicationToolLink()) {\n $window.location =\n '/providers/medication-tool/patient?order_number=' + order.order_number;\n }\n };\n }\n });\n },\n controllerAs: '$ctrl',\n bindToController: true,\n };\n};\n","/**\n * @prettier\n */\nmodule.exports = function selectEnrollmentType(CPPTutorials) {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/family_testing/select_enrollment_type.html',\n scope: {\n enrollment: '=',\n },\n link: function(scope) {\n scope.tutorials = CPPTutorials;\n\n scope.directName = 'family_testing_direct';\n scope.cascadeName = 'family_testing_cascade';\n\n scope.selectEnrollmentType = function(enrollmentType) {\n if (enrollmentType == scope.directName) {\n scope.enrollment.for_physician_order = true;\n CPPTutorials.openTutorialIfNotSeen(scope.directName);\n // 'self' is not an option for direct flow. We must reset if changed during order\n if (scope.enrollment.proband && scope.enrollment.proband.relationship == 'self') {\n scope.enrollment.proband.relationship = undefined;\n }\n } else if (enrollmentType == scope.cascadeName) {\n scope.enrollment.for_physician_order = false;\n // Cascade flow only supports enrollment type of self\n scope.enrollment.proband.relationship = 'self';\n CPPTutorials.openTutorialIfNotSeen(scope.cascadeName);\n } else if (enrollmentType == undefined) {\n scope.enrollment.for_physician_order = undefined;\n }\n };\n },\n };\n};\n","module.exports = angular.module('orderingPhysicianServices', [])\n .service('patientIsMinor', require('./services/patient_is_minor'))\n .service('showMedicationPromo', require('./services/show_medication_promo'))\n .service('isCovidSample', require('./services/is_covid_sample'))\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n return function(birthdate) {\n const eighteenYearsAgo = new Date()\n eighteenYearsAgo.setFullYear(eighteenYearsAgo.getFullYear() - 18)\n return birthdate > eighteenYearsAgo\n }\n}\n","'use strict'\n\nmodule.exports = function(waffle, auth) {\n 'ngInject'\n return function() {\n const { provider_profile } = auth.currentUser;\n /**\n * From @justinwang189 -\n * I think this returns true appropriately for support team viewing CPP.\n * So if a provider i viewing and US return false\n * The old logic was:\n * if (currentProvider && currentProvider.country !== 'US') {\n * return false\n * }\n * return true\n * This is now inverted to remove double negative logic.\n * It illuminates a little bit of an oddity:\n * If there is no `provider_profile`, then return true.\n * Based on @justinwang189 comment - this may be related to support team viewing a CPP user.\n *\n * FIXME - should we convert this to be explicitly dependent on the support team's permission?\n */\n return (!provider_profile || provider_profile.country === 'US');\n }\n}\n","'use strict'\n\nmodule.exports = () => {\n 'ngInject'\n\n const isCovidBarcode = (kitBarcode) => {\n // Covid barcodes look like this D-1234567890\n return /D-\\d{10}/.test(kitBarcode)\n }\n\n let isCovidSample = false;\n return {\n update: (kitBarcode) => {\n isCovidSample = isCovidBarcode(kitBarcode);\n },\n\n get: () => isCovidSample\n }\n}\n","function ProviderReleaseResultsForPhysicianOrderModalController(\n $scope,\n $modalInstance,\n $http,\n $route,\n ngToast,\n requisition_number,\n testTypesWithReleasableReports,\n) {\n $scope.testTypesWithReleasableReports = testTypesWithReleasableReports;\n $scope.releaseResult = function() {\n $scope.submitting = true\n $http.post('/api/v1/release_external_provider_results', {'requisition_number': requisition_number})\n .then(function() {\n $modalInstance.close()\n $route.reload()\n ngToast.create(\"Results have been released to patient\")\n })\n .finally(function() { $scope.submitting = false })\n }\n}\n\nfunction EditTestRequestedController($scope, $translate, $modalInstance, $http, ngToast, order, newTestRequested) {\n $scope.submitting = false\n\n const oldTestRequested = order.test_requested\n $translate('TEST_TYPES.LONG.' + newTestRequested).then(function(translation) {\n $scope.newTestRequestedName = translation\n })\n $scope.submit = function() {\n $scope.submitting = true\n order.test_requested = newTestRequested\n order.$update()\n .then(function() {\n ngToast.create(\"Order has been successfully updated\")\n })\n .catch(function() {\n order.test_requested = oldTestRequested\n ngToast.create({ className: 'error', content:'Update failed' })\n })\n .finally(function() {\n $scope.submitting = false\n $modalInstance.close()\n })\n }\n}\n\nmodule.exports = angular.module('orderingPhysicianModal', [])\n\n .factory('providerReleaseResultsForOrderModal', function($modal) {\n return {\n open: function(requisition_number, testTypesWithReleasableReports) {\n return $modal.open({\n templateUrl: \"/ordering_physicians/_release_modal.html\",\n controller: ProviderReleaseResultsForPhysicianOrderModalController,\n size: \"md\",\n resolve: {\n requisition_number: () => requisition_number,\n testTypesWithReleasableReports: () => testTypesWithReleasableReports,\n }\n })\n }\n }\n })\n\n .factory('kitOfficeModal', function($modal) {\n return {\n open: function() {\n return $modal.open({\n templateUrl: '/ordering_physicians/_modal_kit_office.html',\n size: 'md'\n })\n }\n }\n })\n\n .controller('NoAttestationController', function($scope, $modalInstance, $cookies) {\n $scope.submit = function() {\n $cookies.put('seen_no_attestation', 'y')\n $modalInstance.close()\n }\n })\n\n .controller('SubmitFTPController', function ($scope, $http, $modalInstance, $route, auth, ngToast, order_number) {\n const enrollment = {\n provider_id: auth.currentUser.provider_profile.id,\n order_number: order_number\n }\n $scope.submit = function() {\n $scope.submitting = true\n $http.post('/api/v1/family_testing/request_discount', enrollment)\n .then(function() {\n $modalInstance.dismiss()\n $route.reload()\n ngToast.create(\"Patient succesfully enrolled.\")\n })\n .catch(function() {\n ngToast.create({ className: 'error', content: 'There was an error with the enrollment' })\n })\n .finally(function() {\n $scope.submitting = false\n })\n }\n })\n\n .controller('DraftUpdatedModalController', function($scope, $window, DetailedPhysicianOrder, draftRequisitionNumber) {\n $scope.reloadDraft = function() {\n // If there is an actual order with that requisition number then take to that order\n // Otherwise force page refresh with same requisition number\n DetailedPhysicianOrder.get({requisition_number: draftRequisitionNumber}).$promise\n .then(function() {\n $window.location.href = '/providers/order/details/' + draftRequisitionNumber\n })\n .catch(function() {\n $window.location.href = '/providers/place-order?draft=' + draftRequisitionNumber\n })\n }\n })\n\n .controller('CancelOrderModalController', function ($scope, $modalInstance, DraftPhysicianOrder, draftRequisitionNumber) {\n $scope.cancelOrder = function() {\n if (draftRequisitionNumber) {\n new DraftPhysicianOrder().$delete({requisition_number: draftRequisitionNumber})\n .finally(function() {\n $modalInstance.close()\n })\n } else {\n $modalInstance.close()\n }\n }\n })\n\n .factory('ProviderPlatformModals', function($modal, textModal) {\n return new function() {\n this.openCancelOrderModal = function(draftRequisitionNumber) {\n return $modal.open({\n templateUrl: \"/ordering_physicians/_cancel_order_modal.html\",\n controller: 'CancelOrderModalController',\n resolve: {\n draftRequisitionNumber: function() { return draftRequisitionNumber },\n },\n size: \"md\"\n })\n }\n\n this.openWelcomeModal = function() {\n return $modal.open({\n templateUrl: \"/ordering_physicians/_welcome_modal.html\",\n size: \"md\"\n })\n }\n\n this.openDraftUpdatedModal = function(draftRequisitionNumber) {\n return $modal.open({\n templateUrl: \"/ordering_physicians/modals/draft_updated.html\",\n controller: 'DraftUpdatedModalController',\n backdrop: 'static',\n keyboard: false,\n size: \"md\",\n resolve: {\n draftRequisitionNumber: function() { return draftRequisitionNumber }\n }\n })\n }\n\n this.openBarcodeAccessionModal = function() {\n return $modal.open({\n templateUrl: '/ordering_physicians/_modal_barcode_accession.html',\n size: 'md'\n })\n }\n\n this.openPaymentErrorModal = function(reason) {\n return textModal.open(\n \"We could not process your patient’s payment.\"\n , reason + \" We were not able to process the payment information you provided for your patient. Please correct this information or try another payment method.\"\n , \"Update Payment Info\"\n , 'error'\n , true\n )\n }\n\n this.openNoAttestationModal = function() {\n return $modal.open({\n templateUrl: '/ordering_physicians/modals/no_attestation_modal.html',\n controller: 'NoAttestationController',\n size: 'sm',\n })\n }\n\n this.openEditTestRequestedModal = function(order, newTestRequested) {\n return $modal.open({\n templateUrl: '/ordering_physicians/modals/edit_test_requested_modal.html',\n controller: EditTestRequestedController,\n size: 'md',\n resolve: {\n order: function() { return order },\n newTestRequested: function() { return newTestRequested }\n }\n })\n }\n\n this.openUSProvidersForUSPatientsModal = function() {\n return $modal.open({\n templateUrl: '/ordering_physicians/modals/only_us_providers_for_us_patients.html',\n size: 'md'\n })\n }\n\n this.openNYBlockModal = function() {\n return $modal.open({\n templateUrl: '/ordering_physicians/modals/ny_block_modal.html',\n size: 'md'\n })\n }\n\n this.openChooseTestTypeModal = function() {\n return $modal.open({\n templateUrl: '/ordering_physicians/modals/choose_test_type_modal.html',\n size: 'md'\n })\n }\n\n this.openTakeHomeNotAvailableModal = function() {\n return $modal.open({\n templateUrl: '/ordering_physicians/modals/take_home_not_available_modal.html',\n size: 'md'\n })\n }\n\n this.openKioOptionNotAvailableModal = function() {\n return $modal.open({\n templateUrl: '/ordering_physicians/modals/kio_not_available_modal.html',\n size: 'md'\n })\n }\n\n this.openFTPOneClickModal = function(order_number) {\n return $modal.open({\n templateUrl: '/ordering_physicians/modals/ftp_one_click_modal.html',\n controller: 'SubmitFTPController',\n size: 'md',\n resolve: {\n order_number: function() { return order_number },\n }\n })\n }\n }()\n })\n\n .factory('ProviderHomeInitialMessages', function($location, $cookies, ngToast, ProviderPlatformModals) {\n // Loads initial welcome modals/announcements to providers\n return new function() {\n this.run = function() {\n if ($location.search().welcome) {\n ProviderPlatformModals.openWelcomeModal()\n $cookies.put('insurance_modal', 'y')\n }\n if ($location.search().email_confirmed) {\n ngToast.create(\"We have confirmed your email address\")\n $location.search('email_confirmed', null)\n }\n }\n }()\n })\n\n .factory('addPatientPaymentInfoModal', require('./modals/add_patient_payment_info'))\n .factory('reattemptInsuranceModal', require('./modals/reattempt_insurance'))\n .factory('overrideOopBlockModal', require('./modals/override_oop_block'))\n","'use strict'\n\nfunction AddPatientPaymentInfoModalController(\n $scope,\n $modalInstance,\n order,\n auth,\n project,\n physicianOrderCheckout,\n promoCodeStore,\n ApplicationType,\n PhysicianOrderPayment\n) {\n 'ngInject'\n\n $scope.order = order\n $scope.order.payment = $scope.order.payment || new PhysicianOrderPayment()\n\n $scope.userProvider = project.application === ApplicationType.CLINICAL\n ? undefined\n : auth.currentUser.provider_profile\n if ($scope.userProvider && $scope.userProvider.settings.payment_code) {\n promoCodeStore.updateCode($scope.userProvider.settings.payment_code, true)\n } else if ($scope.order.promocode_for_payment) {\n promoCodeStore.updateCode($scope.order.promocode_for_payment, true)\n }\n\n $scope.checkout = new physicianOrderCheckout($scope.order, $scope.userProvider, $scope.order.test_requested)\n\n $scope.onSubmit = function() {\n return $scope.checkout.reviewPayment()\n .then(function() {\n $modalInstance.close()\n })\n }\n}\n\nmodule.exports = function addPatientPaymentInfoModal(\n $modal\n) {\n 'ngInject'\n\n return {\n open: function(order) {\n return $modal.open({\n templateUrl: '/ordering_physicians/modals/add_patient_payment_info.html',\n controller: AddPatientPaymentInfoModalController,\n size: 'lg',\n resolve: {\n order: function() {\n return order\n }\n }\n })\n }\n }\n}\n","'use strict'\n\nfunction ReattemptInsuranceModalController(\n $scope,\n $modalInstance,\n $location,\n order\n) {\n 'ngInject'\n\n $scope.order = order\n $scope.continue = () => {\n $location.path('/providers/resubmit-payment/' + $scope.order.requisition_number)\n $modalInstance.close()\n }\n}\n\nmodule.exports = function reattemptInsuranceModal(\n $modal\n) {\n 'ngInject'\n\n return {\n open: (order) => (\n $modal.open({\n templateUrl: '/ordering_physicians/modals/reattempt_insurance.html',\n controller: ReattemptInsuranceModalController,\n size: 'lg',\n resolve: {\n order: function() {\n return order\n }\n }\n })\n )\n }\n}\n","'use strict'\n\nmodule.exports = function overrideOopBlockModal(\n $modal,\n $q,\n InsuranceEligibilitySubmission\n) {\n 'ngInject'\n\n return {\n open: (eligibilitySubmissionId) => {\n const result = $modal.open({\n templateUrl: '/ordering_physicians/modals/override_oop_block.html',\n size: 'lg',\n }).result\n\n return result.then(() => {\n return InsuranceEligibilitySubmission.update({\n id: eligibilitySubmissionId,\n overriden: true\n })\n })\n }\n }\n}\n","module.exports = angular.module('providerPlatformOrderDirectives', [])\n .directive('editTestRequested', require('./order_directives/edit_test_requested'))\n .directive('physicianOrderDetails', require('./order_directives/physician_order_details'))\n .directive('physicianOrderInsuranceAttemptDetails', require('./order_directives/physician_order_insurance_attempt_details'))\n .directive('physicianOrderLog', require('./order_directives/physician_order_log'))\n .directive('physicianOrderMainDetails', require('./order_directives/physician_order_main_details'))\n .directive('physicianOrderPaymentDetails', require('./order_directives/physician_order_payment_details'))\n .directive('physicianOrderResults', require('./order_directives/physician_order_results'))\n .directive('refulfillSample', require('./order_directives/refulfill_sample'))\n","module.exports = function editTestRequested(ProviderPlatformModals) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n order: '=',\n endEditing: '='\n },\n templateUrl: '/ordering_physicians/directives/edit_test_requested.html',\n link: function(scope) {\n scope.edited_order = { test_requested: scope.order.test_requested }\n\n scope.save = function() {\n if (scope.edited_order.test_requested != scope.order.test_requested) {\n ProviderPlatformModals.openEditTestRequestedModal(\n scope.order,\n scope.edited_order.test_requested\n ).result.then(function() {\n scope.endEditing()\n })\n } else {\n scope.endEditing()\n }\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function physicianOrderDetails(\n auth,\n project,\n reattemptInsuranceModal,\n ApplicationType\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n editable: '=?',\n onSaveOrder: '=?',\n order: '=',\n ordering: '=?'\n },\n templateUrl: '/ordering_physicians/directives/physician_order_details.html',\n link: function(scope) {\n scope.isClinical = project.application === ApplicationType.CLINICAL\n\n // Whether or not this set of details is editable.\n scope.editable = scope.editable || false\n\n // Whether or not this set of details is part of an order flow.\n scope.ordering = scope.ordering || false\n\n const watcher = scope.$watch('order', function() {\n if (scope.order) {\n scope.canViewInsuranceAttemptDetails = (\n !scope.ordering &&\n scope.order.attempted_insurance_submission\n )\n\n scope.canReattemptInsurance = (\n scope.isClinical &&\n auth.currentUser.is_support_staff &&\n scope.canViewInsuranceAttemptDetails &&\n !scope.order.insurance_claim\n )\n\n watcher()\n }\n })\n\n scope.openReattemptInsuranceModal = function() {\n reattemptInsuranceModal.open(scope.order)\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function physicianOrderInsuranceAttemptDetails() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n order: '=',\n },\n templateUrl: '/ordering_physicians/directives/physician_order_insurance_attempt_details.html',\n link: function(scope) {\n // Set a few convenience variables.\n scope.$watch('order', function(order) {\n if (order) {\n const lastSubmission = scope.order.attempted_insurance_submission\n if (lastSubmission && lastSubmission.criteria_submission) {\n const diagnoses = lastSubmission.criteria_submission.hboc_criteria.diagnoses\n const geneticTestResults = lastSubmission.criteria_submission.hboc_criteria.genetic_test_results\n scope.hasPersonalHistory = !!diagnoses.filter(function(d) {\n return !d.relationship\n }).length\n scope.hasFamilyHistory = !!diagnoses.filter(function(d) {\n return d.relationship\n }).length\n scope.hasPersonalPastGeneticTesting = !!geneticTestResults.filter(function(t) {\n return !t.relationship\n }).length\n scope.hasFamilyPastGeneticTesting = !!geneticTestResults.filter(function(t) {\n return t.relationship\n }).length\n }\n }\n });\n }\n }\n}\n","module.exports = function physicianOrderLog($rootScope, $routeParams, DetailedPhysicianOrder) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/order-log.html',\n link: function(scope) {\n function updateLog() {\n return DetailedPhysicianOrder.get({'requisition_number': $routeParams.requisition_number}).$promise\n .then(function(res) {\n scope.order = res\n })\n }\n $rootScope.$on('physicianOrderLog:updated', function() {\n updateLog()\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = function physicianOrderMainDetails(\n auth,\n detailedCovidSampleTypes,\n project,\n testTypes,\n ngToast,\n ApplicationType,\n PhysicianOrderType\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n editable: '=?',\n onSave: '=',\n order: '=',\n ordering: '=?'\n },\n templateUrl: '/ordering_physicians/directives/physician_order_main_details.html',\n link: function(scope) {\n // Constants to be used in the templates\n const isClinical = project.application === ApplicationType.CLINICAL\n scope.isClinical = isClinical\n\n scope.PhysicianOrderType = PhysicianOrderType\n\n scope.testTypes = testTypes\n\n // The current provider.\n scope.userProvider = isClinical ? undefined: auth.currentUser.provider_profile\n\n // The section which is currently being edited; if none, undefined.\n scope.editing = undefined\n\n // The set of sections which are editable.\n scope.editableSections = {\n PATIENT_PROFILE: 'PATIENT_PROFILE',\n TEST_TYPE: 'TEST_TYPE',\n REFULFILLED_SAMPLE: 'REFULFILLED_SAMPLE'\n }\n\n scope.detailedCovidSampleTypes = detailedCovidSampleTypes\n\n // Set a few convenience variables.\n scope.$watch('order', function(order) {\n if (order) {\n const editableStates = ['new', 'claimable']\n scope.canEditTestRequested = editableStates.indexOf(scope.order.state) > 0\n\n // Display profile of placing user if they are not also the ordering physician\n if (scope.userProvider && !scope.userProvider.default_as_ordering_physician) {\n scope.displayedPlacedByProfile = scope.userProvider\n } else if (\n scope.order.placed_by_profile &&\n !scope.order.placed_by_profile.default_as_ordering_physician\n ) {\n scope.displayedPlacedByProfile = scope.order.placed_by_profile\n }\n }\n });\n\n /**\n * Toggles on editing for a particular section.\n *\n * @param {string} section\n * The section to edit. Value should be in ``scope.editableSections``.\n */\n scope.toggleEditing = function(section) {\n scope.editing = section\n }\n\n /**\n * Toggles off editing for all sections.\n */\n scope.resetEditing = function() {\n scope.editing = undefined\n }\n\n /**\n * Saves an edited order.\n */\n scope.save = function() {\n scope.onSave()\n .then(scope.resetEditing)\n }\n\n scope.onCopySuccess = function() {\n ngToast.create('Copied!')\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function physicianOrderPaymentDetails(\n addPatientPaymentInfoModal,\n auth,\n fileUploader,\n uploadFileTypes,\n PhysicianOrderType\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n editable: '=?',\n order: '=',\n ordering: '=',\n onSave: '='\n },\n templateUrl: '/ordering_physicians/directives/physician_order_payment_details.html',\n link: function(scope) {\n scope.isAddPatientPaymentInfoModalOpen = false\n\n /**\n * Opens a modal to add credit card payment information.\n */\n scope.openAddPatientPaymentInfoModal = (order) => {\n scope.isAddPatientPaymentInfoModalOpen = true\n scope.order.skip_payment = false\n addPatientPaymentInfoModal.open(order).result\n .then(() => scope.onSave()) // save order\n .catch(() => scope.order.skip_payment = true) // reset\n .finally(() => scope.isAddPatientPaymentInfoModalOpen = false)\n }\n\n const SWITCHED_TO_CASH_REASON = {\n DEFAULT: 'DEFAULT',\n OOP_OVER: 'OOP_OVER',\n BLACKLIST: 'BLACKLIST',\n CRITERIA: 'CRITERIA'\n }\n\n scope.SWITCHED_TO_CASH_REASON = SWITCHED_TO_CASH_REASON\n\n scope.getSwitchedToCashReason = () => {\n const s = scope.order.attempted_insurance_submission\n if (s.eligibility_submission.eligibility_state === 'oop_over') {\n return SWITCHED_TO_CASH_REASON.OOP_OVER\n } else if (s.eligibility_submission.eligibility_state === 'payer_not_accepted') {\n return SWITCHED_TO_CASH_REASON.BLACKLIST\n } else if (s.criteria_submission) {\n if (!s.criteria_submission.met_criteria) {\n return SWITCHED_TO_CASH_REASON.CRITERIA\n }\n }\n\n return SWITCHED_TO_CASH_REASON.DEFAULT\n }\n\n // Set a few convenience variables.\n scope.$watch('order', (order) => {\n if (order) {\n scope.payment = scope.order.payment\n\n scope.canEditPayment = (\n scope.order.skip_payment &&\n !scope.order.payment &&\n scope.order.type == PhysicianOrderType.SAMPLE_AT_OFFICE &&\n scope.order.type !== 'new'\n )\n\n // All uploaded files on this page will be ``physicianOrderFiles``.\n scope.uploader = fileUploader({\n formData: [{\n physician_order_requisition_number: scope.order.requisition_number,\n file_type: uploadFileTypes.physicianOrderFiles\n }]\n })\n\n scope.uploader.onSuccessItem = scope.onSave\n }\n });\n }\n }\n}\n","module.exports = function physicianOrderResults($routeParams, $rootScope, $location, $translate, $window,\n auth, modalShim, ProviderPlatformModals, DetailedPhysicianOrder, waffle, showMedicationPromo) {\n\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n },\n templateUrl: '/ordering_physicians/order-results.html',\n link: function(scope) {\n\n scope.orderPromiseReturned = false\n\n scope.changeTest = function() {\n scope.$$postDigest(function () {\n $rootScope.$broadcast('pdf:reload');\n })\n }\n\n const defaultTestType = $location.search()['test_type']\n\n scope.ui = {}\n\n scope.getResultsUrl = (selectedKitOrderNumber) => {\n if (selectedKitOrderNumber) {\n return `/color_results/${selectedKitOrderNumber}`\n }\n return ''\n }\n\n DetailedPhysicianOrder.get({'requisition_number': $routeParams.requisition_number}).$promise\n .then(function(res) {\n scope.orderPromiseReturned = true\n scope.order = res\n $translate(\"PROVIDER_PORTAL.STATUSES.\" + scope.order.status.name + \".NAME\")\n .then(function(translation) {scope.order.statusName = translation })\n\n if (scope.order.kit_orders.length > 0) {\n if (defaultTestType) {\n const searchKitOrder = scope.ui.selectedKitOrderNumber = scope.order.kit_orders.find(\n (ko) => ko.test_type === defaultTestType\n )\n if (searchKitOrder) {\n scope.ui.selectedKitOrderNumber = searchKitOrder.order_number\n }\n }\n\n if (!scope.ui.selectedKitOrderNumber) {\n scope.ui.selectedKitOrderNumber = scope.order.kit_orders[0].order_number\n }\n }\n })\n\n const isPgxReport = () => {\n if (scope.ui.selectedKitOrderNumber) {\n if (scope.order.kit_orders.find((ko) =>\n ko.order_number === scope.ui.selectedKitOrderNumber).test_type === 'pgx v1') {\n return true\n }\n }\n return false\n }\n\n scope.showMedicationToolLink = () => { return isPgxReport() && showMedicationPromo() }\n\n scope.goToMedicationTool = function() {\n if (scope.showMedicationToolLink()) {\n $window.location = '/providers/medication-tool/patient?requisition_number=' + $routeParams.requisition_number\n }\n }\n\n scope.is_provider = !!auth.currentUser.provider_profile\n scope.openFTPModal = function() {\n ProviderPlatformModals.openFTPOneClickModal(scope.ui.selectedKitOrderNumber)\n }\n }\n }\n}\n","module.exports = function refulfillSample($http, $routeParams, $route, ngToast) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n order: '=',\n onEdit: '=?'\n },\n templateUrl: '/ordering_physicians/refulfill_sample.html',\n link: function(scope) {\n scope.cancel = function() {\n scope.onEdit && scope.onEdit()\n }\n\n scope.submitting = false\n\n scope.save = function() {\n const payload = {\n requisition_number: scope.order.requisition_number,\n kit_barcode: scope.order.sample.kit_barcode,\n accession_number: scope.order.sample.accession_number,\n collection_date: scope.order.sample.collection_date\n }\n\n scope.submitting = true\n $http.post('/api/v1/providers/refulfill_sample', payload)\n .then(function() {\n ngToast.create('New sample updated')\n $route.reload()\n }).catch(function() {\n ngToast.create({\n className: 'error',\n content: 'Update failed'\n })\n }).finally(function() {\n scope.submitting = false\n scope.cancel()\n })\n }\n }\n }\n}\n","module.exports = angular.module('providerPlatformPlaceOrderDirectives', [])\n .directive('additionalInformationForm', require('./place_order_directives/additional_information_form'))\n .directive('criteriaSubmissionCard', require('./place_order_directives/criteria_submission_card'))\n .directive('eligibilitySubmissionCard', require('./place_order_directives/eligibility_submission_card'))\n .directive('hbocInsuranceCriteriaForm', require('./place_order_directives/hboc_insurance_criteria_form'))\n .directive('healthHistoryDiagnosisForm', require('./place_order_directives/health_history_diagnosis_form'))\n .directive('healthHistoryGeneticTestResultForm', require('./place_order_directives/health_history_genetic_test_result_form'))\n .directive('icd10CmCodeSelector', require('./place_order_directives/icd_10_cm_code_selector'))\n .directive('orderingPhysicianSelector', require('./place_order_directives/ordering_physician_selector'))\n .directive('physicianOrderBreadcrumbs', require('./place_order_directives/physician_order_breadcrumbs'))\n .directive('placeCreditCard', require('./place_order_directives/place_credit_card'))\n .directive('placeInsuranceDetails', require('./place_order_directives/place_insurance_details'))\n .directive('placePhysicianOrderKit', require('./place_order_directives/place_physician_order_kit'))\n .directive('placePrimaryContact', require('./place_order_directives/place_primary_contact'))\n .directive('placeSample', require('./place_order_directives/place_sample'))\n .directive('placeTestingOptions', require('./place_order_directives/place_testing_options'))\n .directive('checkMinor', require('./place_order_directives/check_minor'))\n .directive('placeTestType', require('./place_order_directives/place_test_type'))\n .directive('saveDraft', require('./place_order_directives/save_draft'))\n .directive('searchProvider', require('./place_order_directives/search_provider'))\n","'use strict'\n\nmodule.exports = function additionalInformationForm(\n uploadFileTypes, fileUploader, patientIsMinor, sku\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/additional_information_form.html',\n scope: {\n order: '=',\n insurance: '=?'\n },\n link: {\n pre: function(scope) {\n scope.uploader = fileUploader(\n {\n formData: [{\n file_type: uploadFileTypes.physicianOrderFiles\n }]\n }\n )\n scope.testname = sku[scope.order.test_requested].productName\n\n scope.uploader.onSuccessItem = function(item, response) {\n scope.order.upload_files.push({\n s3_key: response,\n file_type: item.formData[0].file_type\n })\n scope.uploader.clearQueue()\n }\n\n scope.patientIsMinor = function() {\n const birthdate = new Date(scope.order.patient_profile.birthday)\n return patientIsMinor(birthdate)\n }\n },\n post: function(scope) {\n scope.removeUploadFile = function(uploadFile) {\n const i = scope.order.upload_files.indexOf(uploadFile)\n scope.order.upload_files.splice(i, 1)\n }\n }\n }\n }\n}\n","module.exports = function criteriaSubmissionCard() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n criteria: '=',\n eligibility: '='\n },\n templateUrl: '/ordering_physicians/directives/criteria_submission_card.html',\n link: function(scope) {\n scope.met_criteria_unknown_eligibility = scope.eligibility &&\n scope.eligibility.eligibility_state == 'unknown_pass' &&\n scope.criteria.met_criteria\n }\n }\n}\n","module.exports = function eligibilitySubmissionCard() {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n eligibility: '=',\n },\n templateUrl: '/ordering_physicians/directives/eligibility_submission_card.html',\n }\n}\n","'use strict'\n\nmodule.exports = function hbocInsuranceCriteriaForm(\n auth,\n cancerTypes,\n criteriaRelationshipTypes,\n fileUploader,\n ngToast,\n sideOfFamilyTypes,\n uploadFileTypes,\n InsuranceCriteriaSubmission\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/hboc_insurance_criteria_form.html',\n scope: {\n order: '=',\n onSubmit: '=?',\n userProvider: '=',\n checkout: '=',\n icdCodesRequired: '=',\n },\n require: '^form',\n link: function(scope, elem, attr, ctrl) {\n // Data models\n\n scope.order.ui.criteria = scope.order.ui.criteria || {\n criteria: {\n is_ashkenazi_jewish_descent: undefined,\n upload_files: []\n },\n patientDiagnoses: [],\n familyDiagnoses: [],\n familyGeneticTestResults: [],\n hasHadCancer: undefined,\n hasFamilyHistoryOfCancer: undefined,\n hasFamilyWithPositiveMutation: undefined,\n }\n\n scope.criteria = scope.order.ui.criteria.criteria\n scope.patientDiagnoses = scope.order.ui.criteria.patientDiagnoses\n scope.familyDiagnoses = scope.order.ui.criteria.familyDiagnoses\n scope.familyGeneticTestResults = scope.order.ui.criteria.familyGeneticTestResults\n\n // UI\n\n scope.isSupportUser = auth.currentUser.is_support_staff\n scope.ui = scope.order.ui.criteria\n scope.submitting = false\n scope.requiresCompleteForm = true\n\n // Add watchers to clear data if selections change.\n\n scope.$watch('ui.hasHadCancer', function(newValue) {\n if (newValue === false || newValue === 'unknown') {\n scope.patientDiagnoses = []\n } else if (newValue === true && scope.patientDiagnoses.length === 0) {\n scope.patientDiagnoses.push({})\n }\n })\n\n scope.$watch('ui.hasFamilyHistoryOfCancer', function(newValue) {\n if (newValue === false || newValue === 'unknown') {\n scope.familyDiagnoses = []\n } else if (newValue === true && scope.familyDiagnoses.length === 0) {\n scope.familyDiagnoses.push({})\n }\n })\n\n scope.$watch('ui.hasFamilyWithPositiveMutation', function(newValue) {\n if (newValue === false || newValue === 'unknown') {\n scope.familyGeneticTestResults = []\n } else if (newValue === true && scope.familyGeneticTestResults.length === 0) {\n scope.familyGeneticTestResults.push({})\n }\n })\n\n function removeElement(propertyName) {\n return function(element) {\n const index = scope[propertyName].indexOf(element)\n scope[propertyName].splice(index, 1)\n }\n }\n\n scope.removePatientDiagnosis = removeElement('patientDiagnoses')\n scope.removeFamilyDiagnosis = removeElement('familyDiagnoses')\n scope.removeFamilyGeneticTestResult = removeElement('familyGeneticTestResults')\n\n function isValid() {\n const hbocInsuranceCriteriaForm = elem.find('form[name=hbocInsuranceCriteriaForm]').controller('form')\n return hbocInsuranceCriteriaForm.validate()\n }\n\n scope.checkCriteria = function() {\n if (!isValid()) {\n return\n }\n\n // We set the value to the string \"Unknown\" because ``ng-model`` cannot\n // distinguish between ``null`` and ``undefined``, so we have to use\n // another value, otherwise some form inputs will be initially filled\n // out.\n const criteria = angular.copy(scope.criteria)\n criteria.diagnoses = []\n .concat(angular.copy(scope.patientDiagnoses))\n .concat(angular.copy(scope.familyDiagnoses))\n criteria.genetic_test_results = []\n .concat(angular.copy(scope.familyGeneticTestResults))\n\n if (criteria.is_ashkenazi_jewish_descent === 'unknown') {\n criteria.is_ashkenazi_jewish_descent = null\n }\n\n if (scope.hasFamilyHistoryOfCancer === 'unknown') {\n criteria.has_limited_or_unknown_family_history = true\n }\n\n // The ICD-10 code selector unfortunately offers no interface for\n // post-processing due to the UI, so we marshal the codes into the\n // right format here.\n for (let i = 0; i < criteria.diagnoses.length; i++) {\n const diagnosis = criteria.diagnoses[i]\n diagnosis.icd_10_cm_codes = diagnosis.icd_10_cm_codes.map(function(code) {\n return code.name\n })\n }\n\n const submission = new InsuranceCriteriaSubmission({\n patient_info: {\n first_name: scope.order.patient_profile.first_name,\n last_name: scope.order.patient_profile.last_name,\n birthday: scope.order.patient_profile.birthday,\n gender: scope.order.patient_profile.gender,\n },\n hboc_criteria: criteria,\n payer: scope.order.payment.eligibility_submission.payer\n })\n\n scope.submitting = true\n\n submission.$save()\n .then(function(response) {\n scope.order.payment.criteria_submission = response\n const attempted_submission = scope.order.attempted_insurance_submission\n attempted_submission.criteria_submission = {id: response.id}\n delete attempted_submission.id // Wipe ID if exists since the submission has now changed\n scope.onSubmit()\n })\n .finally(function() {\n scope.submitting = false\n })\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function healthHistoryDiagnosisForm(\n criteriaRelationshipTypes, cancerTypes, sideOfFamilyTypes\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/health_history_diagnosis_form.html',\n scope: {\n canRemove: '=?',\n diagnosis: '=',\n icdCodesRequired: '=',\n isPatient: '=',\n removeDiagnosis: '=?'\n },\n link: function(scope) {\n\n // Transform queryable maps into arrays for ``ng-repeat``\n\n scope.criteriaRelationshipTypes = Object.keys(criteriaRelationshipTypes.ALL).map(function(key) {\n return criteriaRelationshipTypes.ALL[key]\n })\n\n scope.cancerTypes = Object.keys(cancerTypes).map(function(key) {\n return cancerTypes[key]\n })\n scope.sideOfFamilyTypes = Object.keys(sideOfFamilyTypes).map(function(key) {\n return sideOfFamilyTypes[key]\n })\n\n // Transform ``cancerTypes`` into format Object for easy querying\n\n scope.CancerType = Object.keys(cancerTypes).reduce(function(acc, key) {\n acc[key] = cancerTypes[key][1]\n return acc\n }, {})\n\n scope.onRemove = function() {\n // TODO: Add confirmation logic here.\n scope.removeDiagnosis(scope.diagnosis)\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function healthHistoryGeneticTestResultForm(\n criteriaRelationshipTypes, sideOfFamilyTypes, CancerGene\n) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/health_history_genetic_test_result_form.html',\n scope: {\n geneticTestResult: '=',\n isPatient: '=',\n removeGeneticTestResult: '=?'\n },\n link: function(scope) {\n scope.criteriaRelationshipTypes = Object.keys(criteriaRelationshipTypes.ALL).map(function(key) {\n return criteriaRelationshipTypes.ALL[key]\n })\n scope.sideOfFamilyTypes = Object.keys(sideOfFamilyTypes).map(function(key) {\n return sideOfFamilyTypes[key]\n })\n scope.cancerGenes = Object.keys(CancerGene).map(function(key) {\n return CancerGene[key]\n })\n\n scope.onRemove = function() {\n // TODO: Add confirmation logic here.\n scope.removeGeneticTestResult(scope.geneticTestResult)\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function icd10CmCodeSelector(cancerTypes) {\n 'ngInject'\n\n const BILIARY_TRACT_OPTIONS = require('../../fixtures/icd_codes/biliary_tract.json')\n const BRAIN_OPTIONS = require('../../fixtures/icd_codes/brain.json')\n const BREAST_OPTIONS = require('../../fixtures/icd_codes/breast.json')\n const CERVICAL_OPTIONS = require('../../fixtures/icd_codes/cervical.json')\n const COLORECTAL_OPTIONS = require('../../fixtures/icd_codes/colorectal.json')\n const KERATOCANTHOMAS_OPTIONS = require('../../fixtures/icd_codes/keratocanthomas.json')\n const KIDNEY_OPTIONS = require('../../fixtures/icd_codes/kidney.json')\n const LEUKEMIA_OPTIONS = require('../../fixtures/icd_codes/leukemia.json')\n const LIVER_OPTIONS = require('../../fixtures/icd_codes/liver.json')\n const LUNG_OPTIONS = require('../../fixtures/icd_codes/lung.json')\n const MELANOMA_OPTIONS = require('../../fixtures/icd_codes/melanoma.json')\n const OSTEOSARCOMA_OPTIONS = require('../../fixtures/icd_codes/osteosarcoma.json')\n const OVARIAN_OPTIONS = require('../../fixtures/icd_codes/ovarian.json')\n const PANCREATIC_OPTIONS = require('../../fixtures/icd_codes/pancreatic.json')\n const PROSTATE_OPTIONS = require('../../fixtures/icd_codes/prostate.json')\n const RENAL_PELVIS_OPTIONS = require('../../fixtures/icd_codes/renal_pelvis.json')\n const SEBACEOUS_GLAND_ADENOMAS_OPTIONS = require('../../fixtures/icd_codes/sebaceous_gland_adenomas.json')\n const SMALL_BOWEL_OPTIONS = require('../../fixtures/icd_codes/small_bowel.json')\n const SMALL_INTESTINE_OPTIONS = require('../../fixtures/icd_codes/small_intestine.json')\n const SOFT_TISSUE_SARCOMA_OPTIONS = require('../../fixtures/icd_codes/soft_tissue_sarcoma.json')\n const STOMACH_OPTIONS = require('../../fixtures/icd_codes/stomach.json')\n const TESTICULAR_OPTIONS = require('../../fixtures/icd_codes/testicular.json')\n const THYROID_OPTIONS = require('../../fixtures/icd_codes/thyroid.json')\n const URETER_OPTIONS = require('../../fixtures/icd_codes/ureter.json')\n const UTERINE_OPTIONS = require('../../fixtures/icd_codes/uterine.json')\n const FAMILY_OPTIONS = require('../../fixtures/icd_codes/family.json')\n\n return {\n restrict: 'AE',\n templateUrl: '/ordering_physicians/directives/icd_10_cm_code_selector.html',\n scope: {\n diagnosis: '=',\n isPatient: '=',\n required: '=?'\n },\n require: '^form',\n link: function(scope, elem) {\n if (!scope.diagnosis.icd_10_cm_codes) {\n scope.diagnosis.icd_10_cm_codes = []\n }\n\n scope.cancerTypeToOptions = {\n biliary_tract_cancer: BILIARY_TRACT_OPTIONS,\n brain_cancer: BRAIN_OPTIONS,\n breast_cancer: BREAST_OPTIONS,\n cervical_cancer: CERVICAL_OPTIONS,\n colorectal_cancer: COLORECTAL_OPTIONS,\n kidney_cancer: KIDNEY_OPTIONS,\n leukemia: LEUKEMIA_OPTIONS,\n liver_cancer: LIVER_OPTIONS,\n lung_cancer: LUNG_OPTIONS,\n melanoma: MELANOMA_OPTIONS,\n osteosarcoma: OSTEOSARCOMA_OPTIONS,\n ovarian_cancer: OVARIAN_OPTIONS,\n pancreatic_cancer: PANCREATIC_OPTIONS,\n prostate_cancer: PROSTATE_OPTIONS,\n renal_pelvis_cancer: RENAL_PELVIS_OPTIONS,\n sebaceous_gland_adenomas: SEBACEOUS_GLAND_ADENOMAS_OPTIONS,\n small_bowel_cancer: SMALL_BOWEL_OPTIONS,\n small_intestine: SMALL_INTESTINE_OPTIONS,\n soft_tissue_sarcoma: SOFT_TISSUE_SARCOMA_OPTIONS,\n stomach_cancer: STOMACH_OPTIONS,\n testicular_cancer: TESTICULAR_OPTIONS,\n thyroid_cancer: THYROID_OPTIONS,\n ureter: URETER_OPTIONS,\n uterine_cancer: UTERINE_OPTIONS,\n unknown: [],\n undefined: []\n }\n\n scope.familyOptions = FAMILY_OPTIONS\n\n /**\n * Users are allowed to input any code they would like.\n */\n scope.createNewCode = function(code) {\n return {\n name: code,\n description: ''\n }\n }\n\n /**\n * ui-select does not have an explicit API for deselecting an option in\n * the choices directive, but thankfully it gives us enough primitives to\n * be able to construct this ourselves.\n *\n * We only need to have a handler for deselection, because the default\n * on-click behavior is selection.\n */\n scope.deselect = function($event, $selectMultiple, $select, option) {\n for (let i = 0; i < $select.selected.length; i++) {\n const selectedOption = $select.selected[i]\n if (option === selectedOption) {\n $selectMultiple.removeChoice(i)\n\n // NOTE: This is required so the click does not subsequently\n // trigger a reselection of the same option.\n $event.stopPropagation()\n\n return\n }\n }\n }\n }\n }\n}\n","module.exports = function orderingPhysicianSelector(DetailedProviderProfiles) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/select_ordering_physician.html',\n scope: {\n userProvider: '=',\n order: '='\n },\n link: function(scope) {\n // Only default to last ordering physician if total number of providers\n // is less than MaxProviderCountForDefault\n const maxProvidersForDefaultSelected = 5\n if (!scope.userProvider.default_as_ordering_physician && !scope.physicianChoices) {\n // Get all unique physicians listed in previous orders user had made\n DetailedProviderProfiles.get({'ordering': 'last_name'}).$promise\n .then(function(res) {\n scope.physicianChoices = res.results\n scope.physicianChoicesCount = scope.physicianChoices.length\n if (scope.physicianChoicesCount && scope.physicianChoicesCount <= maxProvidersForDefaultSelected) {\n scope.order.ordering_physician_profile = scope.physicianChoices[0]\n }\n })\n }\n\n scope.isVantari = scope.userProvider.settings.distributor_name == 'vantari'\n scope.defaultCountry = \"US\"\n\n if (scope.userProvider.default_as_ordering_physician) {\n scope.order.ordering_physician_profile = scope.userProvider\n }\n\n scope.showSelectedProvider = function() {\n return scope.order.ordering_physician_profile && scope.order.ordering_physician_profile.id\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function physicianOrderBreadcrumbs(PhysicianOrderNavigationService) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/physician_order_breadcrumbs.html',\n scope: {\n order: '='\n },\n link: function(scope) {\n scope.navService = PhysicianOrderNavigationService\n }\n }\n}\n","module.exports = function placeCreditCard() {\n 'ngInject'\n\n return {\n restrict: 'E',\n require: '^form',\n scope: {\n checkout: '=',\n order: '=',\n skippable: '='\n },\n templateUrl: '/ordering_physicians/place_credit_card.html',\n link: function(scope, element, attrs) {\n const item = scope.checkout.getItemizedKitPriceDollars()[0]\n scope.payment = scope.order.payment\n scope.$watch('checkout.isPaymentRequired()', function(val) {\n if (!scope.checkout.isPaymentRequired()) {\n scope.order.skip_payment = false\n }\n }, true)\n }\n }\n}\n","module.exports = function placeInsuranceDetails(InsurancePayers, InsuranceEligibilitySubmission) {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n onSubmit: '=',\n order: '='\n },\n require: '^form',\n templateUrl: '/ordering_physicians/place_insurance_details.html',\n link: function(scope, element, attrs) {\n // UI\n\n scope.submitting = false\n scope.isUsingCashPay = undefined\n\n // Helpers\n\n scope.payment = scope.order.payment\n\n // Data models\n\n scope.order.ui.eligibility = scope.order.ui.eligibility || {\n payer: undefined,\n insurance_id: undefined,\n relationship_to_policy_holder: 'self',\n submitted: false,\n submitting: false\n }\n\n scope.eligibility = scope.order.ui.eligibility\n\n scope.$watchGroup(['eligibility.payer', 'eligibility.insurance_id'], function() {\n scope.isUsingCashPay = undefined\n })\n\n scope.$watch('eligibility.relationship_to_policy_holder', function(newValue) {\n if (newValue == 'self') {\n delete scope.eligibility.policy_holder\n }\n })\n\n scope.checkEligibility = function() {\n if (!scope.placeInsuranceDetailsForm.validate()) {\n return\n }\n scope.eligibility.submitting = true\n scope.isUsingCashPay = undefined\n\n const payload = angular.copy(scope.eligibility)\n payload.patient_info = {\n first_name: scope.order.patient_profile.first_name,\n last_name: scope.order.patient_profile.last_name,\n birthday: scope.order.patient_profile.birthday\n }\n\n delete scope.order.payment.eligibility_submission\n\n new InsuranceEligibilitySubmission(payload).$save()\n .then(function(eligibilitySubmission) {\n scope.payment.eligibility_submission = eligibilitySubmission\n const attempted_submission = scope.order.attempted_insurance_submission\n attempted_submission.eligibility_submission = { id: eligibilitySubmission.id }\n attempted_submission.patient_info = {\n first_name: scope.order.patient_profile.first_name,\n last_name: scope.order.patient_profile.last_name,\n birthday: scope.order.patient_profile.birthday,\n gender: scope.order.patient_profile.gender,\n }\n attempted_submission.payer = scope.order.payment.eligibility_submission.payer\n delete attempted_submission.id // Wipe ID if exists since the submission has now changed\n\n scope.onSubmit()\n })\n .finally(function() {\n scope.eligibility.submitting = false\n scope.eligibility.submitted = true\n scope.eligibility_state = scope.payment.eligibility_submission.eligibility_state\n })\n }\n\n InsurancePayers.get_as_array().$promise.then(function(res) {\n scope.insurance_companies = res\n })\n }\n }\n}\n","module.exports = function placePhysicianOrderKit(ProviderPlatformModals, promoCodeStore, waffle) {\n 'ngInject'\n\n return {\n restrict: 'E',\n require: '^form',\n scope: {\n checkout: '=',\n userProvider: '=',\n order: '='\n },\n templateUrl: '/ordering_physicians/directives/place_physician_order_kit.html',\n link: function(scope) {\n scope.settings = scope.userProvider ? scope.userProvider.settings : {}\n }\n }\n}\n","module.exports = function placePrimaryContact(nonPrimaryContactRoles) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/place_primary_contact.html',\n scope: {\n userProvider: '=',\n order: '=',\n searchable: '@'\n },\n link: function(scope) {\n\n if (scope.userProvider) {\n scope.canBePrimaryContact = nonPrimaryContactRoles.indexOf(scope.userProvider.primary_role) == -1\n }\n\n if (!scope.order.primary_contact_reference) {\n if (scope.canBePrimaryContact) {\n scope.order.primary_contact_reference = \"placed_by\"\n } else {\n scope.order.primary_contact_reference = \"ordering_physician\"\n }\n }\n\n if (scope.userProvider) {\n scope.defaultCountry = scope.userProvider.country\n } else {\n scope.defaultCountry = \"US\"\n }\n\n scope.$watch('order.primary_contact_reference', function(value) {\n if (value != 'other') {\n delete scope.order['primary_contact']\n }\n })\n }\n }\n}\n","module.exports = function placeSample(auth, ProviderPlatformModals, detailedCovidSampleTypes, isCovidSample, kioCountries, project) {\n 'ngInject'\n\n return {\n restrict: 'E',\n require: '^form',\n scope: {\n order: '='\n },\n templateUrl: '/ordering_physicians/directives/place_sample.html',\n link: function(scope, element, attrs, formCtrl) {\n scope.form = formCtrl\n if (project.application != 'clinical') {\n scope.userProvider = auth.currentUser.provider_profile\n scope.settings = scope.userProvider.settings\n }\n scope.openBarcodeAccessionModal = ProviderPlatformModals.openBarcodeAccessionModal\n\n function formatDate(date) {\n return (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear()\n }\n\n const newSalivaBarcodeMask = \"*9999999\"\n const bloodBarcodeMask = \"*-9999999\"\n const covidSwabBarcodeMask = \"*-9999999999\"\n const flexibleBarcodeMask = \"*9-9999-9999-9999\"\n const salivaBarcodeMask = \"*9-9999-9999-9999\"\n\n const newSalivaAccessionNumberMask = \"C99999\"\n const defaultAccessionNumberMask = \"C-99999\"\n\n scope.mask = flexibleBarcodeMask\n scope.useModelViewValue = true\n\n // Dynamic adjustment of barcode ui-mask such that blood format will be used\n // if first letter is character while saliva is used when first letter is number\n scope.$watch('order.sample.kit_barcode', function(newValue) {\n\n if (newValue && newValue.length) {\n if (isNaN(newValue[0])) {\n if (newValue[0] === 'L' || newValue[0] === 'l') {\n scope.mask = newSalivaBarcodeMask\n scope.accessionMask = newSalivaAccessionNumberMask\n } else if (newValue[0] === 'D' || newValue[0] === 'd') {\n scope.mask = covidSwabBarcodeMask\n scope.accessionMask = defaultAccessionNumberMask\n } else {\n scope.mask = bloodBarcodeMask\n scope.accessionMask = defaultAccessionNumberMask\n }\n } else {\n scope.mask = salivaBarcodeMask\n scope.accessionMask = defaultAccessionNumberMask\n }\n isCovidSample.update(newValue)\n }\n // Temporary hack to strip dashes. Submitting bug fix to this line in ui-mask library\n // https://github.com/angular-ui/ui-mask/blob/master/src/mask.js#L125\n // which currently results in useModelViewValue not being able to dynamically be updated\n // from true to false (but false to true works)\n if (newValue && newValue.length == 17) {\n scope.order.sample.kit_barcode = newValue.replace(/-/g, '')\n }\n })\n\n scope.postBlurCommitValue = function() {\n // Commit values on blur for additional validation from pasting events\n scope.order.sample.kit_barcode = scope.form.kitBarcode.$viewValue\n }\n\n scope.setCollectionDateToToday = function() {\n scope.order.sample.collection_date = formatDate(new Date())\n }\n\n scope.isCovidSample = isCovidSample\n scope.covidSampleTypes = Object.keys(detailedCovidSampleTypes).map(sampleType => {\n return {\n sampleType,\n externalName: detailedCovidSampleTypes[sampleType]\n }\n })\n\n }\n }\n}\n","module.exports = function placeTestingOptions($cookies, isCovidSample, ProviderPlatformModals, testTypes, project, ApplicationType) {\n 'ngInject'\n\n return {\n restrict: 'E',\n require: '^form',\n scope: {\n userProvider: '=',\n order: '='\n },\n templateUrl: '/ordering_physicians/_place_release_options.html',\n link: function(scope, element, attrs, formCtrl) {\n if (!scope.order.test_requested) {\n scope.order.test_requested = testTypes.hereditary30\n }\n\n scope.form = formCtrl\n scope.testTypes = testTypes\n scope.isCovidSample = isCovidSample\n scope.isClinical = project.application === ApplicationType.CLINICAL\n\n scope.chooseTestTypeModal = function() {\n ProviderPlatformModals.openChooseTestTypeModal()\n }\n\n scope.settings = scope.userProvider ? scope.userProvider.settings : {}\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function checkMinor(testTypes, patientIsMinor) {\n 'ngInject'\n\n return {\n restrict: 'A',\n require: '^form',\n link: function(scope, elem, attrs, formCtrl) {\n scope.form = formCtrl\n const errorField = angular.element(\"\")\n const checkBirthday = function(day, month, year) {\n const birthdate = new Date(Date.parse(month + \" \" + day + \", \" + year))\n return !patientIsMinor(birthdate)\n }\n\n const checkMinor = function() {\n let valid = false;\n if ([testTypes.fh3, testTypes.cardio30].indexOf(formCtrl.test_requested.$modelValue) === -1) {\n valid = checkBirthday(formCtrl.day.$modelValue, formCtrl.month.$modelValue, formCtrl.year.$modelValue)\n if (!valid) {\n formCtrl.test_requested.$setValidity('test_requested', false)\n errorField.empty()\n errorField.append('Cannot order this test for a minor patient')\n }\n } else {\n formCtrl.test_requested.$setValidity('test_requested', true)\n errorField.empty()\n }\n return valid\n }\n\n const testTypeBlurHandler = function() {\n checkMinor()\n scope.$digest()\n }\n\n elem.bind('blur', testTypeBlurHandler)\n scope.form.test_requested.checkMinor = checkMinor\n elem.after(errorField)\n\n }\n }\n}\n","module.exports = function placeTestType(ProviderPlatformModals, kioCountries) {\n 'ngInject'\n\n return {\n restrict: 'E',\n require: '^form',\n scope: {\n userProvider: '=',\n order: '='\n },\n templateUrl: '/ordering_physicians/directives/place_test_type.html',\n link: function(scope, element, attrs, formCtrl) {\n const kioNotAllowed = scope.userProvider && kioCountries.indexOf(scope.userProvider.country) == -1\n const TEST_TYPES = {\n SAMPLE_ORDERED: 'sample_ordered',\n SAMPLE_AT_OFFICE: 'sample_at_office'\n }\n\n scope.types = [\n TEST_TYPES.SAMPLE_AT_OFFICE,\n TEST_TYPES.SAMPLE_ORDERED\n ]\n\n scope.selectType = function(selectedType) {\n if (kioNotAllowed && selectedType === TEST_TYPES.SAMPLE_AT_OFFICE) {\n ProviderPlatformModals.openKioOptionNotAvailableModal()\n } else {\n scope.order.type = selectedType\n }\n }\n }\n }\n}\n","module.exports = function saveDraft($location, $interval, $q, $route, $window, currentDraftPhysicianOrderVersion, DraftPhysicianOrder,\n ngToast, PhysicianOrderFormData, ProviderPlatformModals, waffle) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/directives/save_draft.html',\n link: function(scope, element, attrs, formCtrl) {\n\n let dirty = true\n let orderWatcher\n\n scope.isSaveDisabled = function() {\n const order = PhysicianOrderFormData.get()\n if (!order || !dirty || order._submitting)\n return true\n return !order.patient_profile.first_name || !order.patient_profile.last_name\n }\n\n scope.saveDraft = function() {\n const order = PhysicianOrderFormData.get()\n // Check if something has written over this.\n checkIfUpdatedSinceLastRead(order).then(function(wasUpdated) {\n if (wasUpdated) {\n return ProviderPlatformModals.openDraftUpdatedModal(order.draft_requisition_number)\n }\n if (scope.isSaveDisabled()) return\n updateDraftToDb(order)\n })\n }\n\n function checkIfUpdatedSinceLastRead(order) {\n // Check if there exists the draft has been updated since we last read it by looking at timestamp\n if (!order.draft_requisition_number) {\n return $q.when(false)\n }\n return DraftPhysicianOrder.get({requisition_number: order.draft_requisition_number}).$promise\n .then(function(existingDraft) {\n return existingDraft.updated_at != order.draft_updated_at\n })\n .catch(function() {\n // No drafts found means order must have been placed and therefore updated\n return true\n })\n }\n\n function updateDraftToDb(order) {\n const data = angular.copy(order)\n // Destroy watch on existing order while we save\n if (orderWatcher) orderWatcher()\n // Strip CC info\n delete data.payment['creditCard']\n const draft = {\n 'json_payload': data,\n 'patient_first_name': order.patient_profile.first_name,\n 'patient_last_name': order.patient_profile.last_name,\n 'version': currentDraftPhysicianOrderVersion,\n }\n if (order.patient_profile.birthday) {\n draft['patient_birthday'] = order.patient_profile.birthday\n }\n // If there is an existing provider in DB we want to store that in the draft\n if (order.ordering_physician_profile && order.ordering_physician_profile.id) {\n draft['ordering_physician'] = angular.copy(order.ordering_physician_profile)\n }\n if (order.primary_contact && order.primary_contact.id) {\n draft['ordering_physician'] = angular.copy(order.primary_contact)\n }\n // Update draft if already requisition number, otherwise create new one\n let savePromise = null\n if (order.draft_requisition_number) {\n //draft.requisition_number = order.draft_requisition_number\n savePromise = new DraftPhysicianOrder(draft).$update({requisition_number: order.draft_requisition_number})\n } else {\n savePromise = new DraftPhysicianOrder(draft).$save()\n }\n savePromise.then(function(res) {\n ngToast.create('Your progress has been saved')\n order.draft_requisition_number = res.requisition_number\n order.draft_updated_at = res.updated_at\n watchOrder(order)\n dirty = false\n })\n }\n\n scope.cancelOrder = function() {\n const order = PhysicianOrderFormData.get()\n ProviderPlatformModals.openCancelOrderModal(\n order.draft_requisition_number\n ).result.then(function() { $location.path('/providers/home') })\n }\n\n function watchOrder(order) {\n scope.order = order\n orderWatcher = scope.$watch('order', function(newValue, oldValue) {\n if (newValue != oldValue) { dirty = true }\n }, true)\n }\n\n const THIRTY_SECONDS_IN_MILLIS = 30 * 1000\n const autoSaveHeartBeat = $interval(function() {\n scope.saveDraft()\n }, THIRTY_SECONDS_IN_MILLIS)\n\n scope.$on('$destroy', function() {\n $interval.cancel(autoSaveHeartBeat);\n });\n }\n }\n}\n","module.exports = function searchProvider(DetailedProviderProfiles) {\n 'ngInject'\n\n return {\n restrict: 'E',\n templateUrl: '/ordering_physicians/search_provider.html',\n scope: {\n role: '@',\n order: '=',\n defaultCountry: '=',\n isOrderingPhysician: '='\n },\n link: function(scope, elem) {\n function searchAndUpdateChoices(query) {\n return DetailedProviderProfiles.get({'search': query}).$promise\n .then(function(res) { scope.physicianChoices = res.results })\n }\n\n scope.submitting = false\n\n scope.showInput = function() {\n return !(scope.order[scope.role] && scope.order[scope.role]['id'])\n }\n\n scope.submitSearch = function(query) {\n scope.submitting = true\n searchAndUpdateChoices(query)\n .then(function() {\n // if search limits to few choices then autoselect the first one\n if (scope.physicianChoices.length < 10) {\n scope.order[scope.role] = scope.physicianChoices[0]\n } else {\n scope.order[scope.role] = \"\"\n }\n })\n .finally(function() {\n scope.submitting = false\n })\n }\n\n searchAndUpdateChoices(\"\")\n }\n }\n\n}\n","/**\n * @ngdoc module\n * @name orderingPhysicianResource\n */\nmodule.exports = angular.module('orderingPhysicianResource', ['ngCookies', 'clrLocation', 'clrResource', 'clrStripe'])\n\n /**\n * @ngdoc service\n * @name OrderingPhysicianProfile\n * @memberof orderingPhysicianResource\n *\n * @description\n * A resource for `ordering_physicians` REST API.\n */\n .factory('OrderingPhysicianProfile', function(resource) {\n return resource(\n '/api/v1/ordering_physicians'\n , { format: 'json' }\n )\n })\n\n /**\n * @ngdoc service\n * @name PhysicianOrder\n * @memberof orderingPhysicianResource\n *\n * @description\n * A resource for `physician_orders` REST API to access basic information.\n */\n .factory('PhysicianOrder', function(resource) {\n return resource(\n '/api/v1/physician_orders/:requisition_number'\n , { format: 'json', requisition_number: '@requisition_number' }\n )\n })\n\n /**\n * @ngdoc service\n * @name ColorProviderPlatformInvitation\n * @memberof orderingPhysicianResource\n *\n * @description\n * A resource for `physician_orders` REST API to access basic information.\n */\n .factory('ColorProviderPlatformInvitation', function(resource) {\n return resource(\n '/api/v1/color_provider_platform_invitations/:token',\n { format: 'json', token: '@token' }\n )\n })\n\n /**\n * @ngdoc service\n * @name PhysicianOrderPayment\n * @memberof orderingPhysicianResource\n *\n * @description\n */\n .factory('PhysicianOrderPayment', function() {\n function PhysicianOrderPayment() {\n this.meetsOopCheck = function () {\n return (\n this.eligibility_submission && (\n this.eligibility_submission.met_oop_check_for_insurance ||\n this.eligibility_submission.overriden\n )\n )\n }\n\n this.meetsCriteriaCheck = function() {\n return this.criteria_submission && this.criteria_submission.met_criteria\n }\n\n this.meetsInsuranceCheck = function() {\n return this.meetsOopCheck() && this.meetsCriteriaCheck()\n }\n\n this.oopEstimate = function() {\n return this.eligibility_submission && this.eligibility_submission.estimated_oop_cost_cents\n }\n }\n\n return PhysicianOrderPayment\n })\n\n /**\n * @ngdoc service\n * @name DetailedPhysicianOrder\n * @memberof orderingPhysicianResource\n *\n * @description\n * A resource for `physician_orders` REST API to access detailed sensitive information.\n */\n .factory('DetailedPhysicianOrder', function($filter, resource, PhysicianOrderPayment) {\n const DetailedPhysicianOrderResource = resource(\n '/api/v1/detailed_physician_orders/:requisition_number'\n , { format: 'json', requisition_number: '@requisition_number'}\n )\n\n const BLANK_ORDER = {\n not_require_counseling_if_positive: false,\n release_delay_in_days: null,\n additional_recipients: [],\n type: null,\n patient_profile: {},\n upload_files: [],\n payment: new PhysicianOrderPayment(),\n attempted_insurance_submission: {},\n\n // This attribute is used solely for ui purposes, and is not intended\n // to be serialized.\n ui: {}\n }\n\n DetailedPhysicianOrderResource.initializeWithSettings = function(providerSettings) {\n const blankOrder = angular.copy(BLANK_ORDER)\n if (providerSettings && !angular.equals(providerSettings, {})) {\n blankOrder.not_require_counseling_if_positive = !providerSettings.default_require_counseling_if_positive\n if (providerSettings.default_release_delay_in_days != null) {\n blankOrder.release_delay_in_days = providerSettings.default_release_delay_in_days\n }\n blankOrder.test_requested = providerSettings.default_test_requested\n if (providerSettings.require_payment || providerSettings.payment_code) {\n blankOrder.skip_payment = false\n }\n blankOrder.type = providerSettings.limit_type\n blankOrder.is_provider_owned = providerSettings.provider_owned_only\n blankOrder.no_vus_details = !providerSettings.default_vus_option\n if (providerSettings.show_collection_date) {\n blankOrder.collection_date = $filter('date')(new Date(), 'M/d/yyyy')\n }\n }\n // Helper methods on the physician order object\n return new DetailedPhysicianOrderResource(blankOrder)\n }\n\n DetailedPhysicianOrderResource.loadFromDraft = function(currentOrder, draft) {\n const draftOrder = draft.json_payload\n draftOrder.draft_requisition_number = draft.requisition_number\n draftOrder.draft_updated_at = draft.updated_at\n // Methods on existing payment need to be copied over to draft payment\n draftOrder.payment = angular.extend(currentOrder.payment, draftOrder.payment)\n return draftOrder\n }\n\n DetailedPhysicianOrderResource.loadFromEnrollment= function(currentOrder, enrollment) {\n currentOrder.patient_profile.first_name = enrollment.applicant_first_name\n currentOrder.patient_profile.last_name = enrollment.applicant_last_name\n currentOrder.patient_profile.email = enrollment.applicant_email\n if (enrollment.applicant_promocode) {\n currentOrder.promocode_for_payment = enrollment.applicant_promocode.code\n currentOrder.test_requested = enrollment.applicant_promocode.sku_list[0]\n }\n return currentOrder\n }\n\n DetailedPhysicianOrderResource.getFromRequisitionNumber = (requisitionNumber) => {\n return DetailedPhysicianOrderResource.get({requisition_number: requisitionNumber}).$promise\n .then(r => r.toJSON())\n .then(order => {\n order.ui = {}\n order.payment = new PhysicianOrderPayment()\n\n return new DetailedPhysicianOrderResource(order)\n })\n }\n\n return DetailedPhysicianOrderResource\n })\n\n .factory('DetailedProviderProfiles', function(resource) {\n return resource(\n '/api/v1/detailed_provider_profiles'\n , { format: 'json', page_size: 100, exclude_unverified: true}\n )\n })\n\n .factory('ProviderSettings', function(resource) {\n return resource(\n '/api/v1/provider_settings/:id'\n , { format: 'json', id: '@id' }\n )\n })\n\n .factory('InsurancePayers', function(resource) {\n return resource(\n '/api/v1/payments/insurance_payers'\n )\n })\n\n .factory('InsuranceEligibilitySubmission', function(resource) {\n return resource('/api/v1/eligibility_submission/:id', {\n id: '@id',\n format: 'json'\n })\n })\n\n .factory('InsuranceCriteriaSubmission', function(resource) {\n return resource('/api/v1/insurance_criteria_submissions', { format: 'json' })\n })\n\n .factory('ProviderColorUser', function($http) {\n return {\n invite: function(verifiedPhysicianId) {\n return $http({\n method: 'POST',\n url: '/api/v1/invite_to_cpp',\n data: {\n verified_physician: verifiedPhysicianId\n }\n })\n }\n }\n })\n\n .factory('ProviderAccountFlow', function(pathFlow) {\n return pathFlow('providerAccountFlow', [\n { controller: 'ProviderAccountCreationController', path: '/providers/create-account' },\n { controller: 'ProviderExistingAccountController', path: '/providers/existing-account' }\n ])\n })\n\n .factory('DraftPhysicianOrder', function(resource) {\n return resource(\n '/api/v1/draft_physician_orders/:requisition_number'\n , { format: 'json', id: '@requisition_number' }\n )\n })\n\n .factory('SharedOrder', function(resource) {\n return resource(\n '/api/v1/shared_orders/:order_number'\n , { id: '@order_number', format: 'json' }\n )\n })\n\n .factory('Tutorials', function(resource) {\n return resource(\n '/api/v1/tutorials', { format: 'json' }\n )\n })\n\n .factory('Enrollment', function(resource) {\n 'ngInject';\n return resource('/api/v1/enrollments/:id', {\n format: 'json',\n page_size: 15,\n id: '@id'\n });\n })\n\n .service('ProviderAccount', function(Account, persistedObject) {\n return persistedObject(Account)\n })\n\n .service('PhysicianOrderFormData', function(persistedObject) {\n return persistedObject()\n })\n\n .service('PortalPaginator', function(persistedObject) {\n return persistedObject(function(){})\n })\n\n .service('physicianOrderCheckout', function(\n $q, Address, Checkout, CreditCard, claimStore, promoCodeStore, kioCountries, ngToast, sku\n ) {\n function PhysicianOrderCheckout(order, userProvider, testRequested) {\n Checkout.call(this)\n\n this.order = order\n this.payment = order.payment\n this.sku = sku[testRequested]\n\n if (!this.payment.creditCard) {\n this.payment.creditCard = new CreditCard()\n }\n\n if (userProvider && kioCountries.indexOf(userProvider.country) != -1) {\n this.shippingAddress = new Address({country: userProvider.country})\n }\n }\n\n PhysicianOrderCheckout.prototype = Object.create(Checkout.prototype)\n\n PhysicianOrderCheckout.prototype.skipPayment = function() {\n return Boolean(!this.isPaymentRequired() || this.order.skip_payment)\n }\n\n PhysicianOrderCheckout.prototype.reviewPayment = function() {\n this.payment.promotional_code = promoCodeStore.promotionalCode.code\n this.payment.totalPriceDollars = this.getTotalPriceDollars().toFixed(2)\n\n if (claimStore.claim) {\n this.payment.claim_token = claimStore.claim.token\n }\n if (this.skipPayment()) {\n return $q.when();\n }\n\n return this.payment.creditCard.$save()\n .then((stripeResp) => {\n this.payment.stripe = stripeResp\n })\n .catch((res) => {\n if (res.error && res.error.message) {\n ngToast.create({ className: 'error', content: res.error.message })\n }\n return $q.reject()\n })\n }\n return PhysicianOrderCheckout\n })\n\n .factory('PhysicianOrderFormFlow', function(pathFlow) {\n return pathFlow('physicianOrderFormFlow', [\n { controller: 'ProviderPlatformPlaceOrderController', path: '/providers/place-order' },\n { controller: 'ProviderPlatformSubmitPaymentController', path: '/providers/submit-payment' },\n { controller: 'ProviderPlatformReviewOrderController', path: '/providers/review-order' }\n ], { skipToEnd: false })\n })\n\n .factory('ProviderFamilyTestingFlow', function(pathFlow) {\n return pathFlow('providerFamilyTestingFlow', [\n { controller: 'ProviderPlatformFamilyTestingOrderController', path: '/providers/family-testing-enrolling' },\n { path: '/providers/family-testing-reviewing' }\n ], { skipToEnd: false })\n })\n\n/**\n * @ngdoc service\n * @name cppHomeUrlPath\n * @memberof orderingPhysicianResource\n *\n * @description\n * cppHomeUrlPath looks at the current URL and returns api parameters associated\n * and name of the 'route' the page is on.\n */\n .service('cppHomeUrlPath', function($location) {\n const defaultApiParams = {\n page_size: 15,\n ordering: '-created_at'\n }\n\n const routeNames = ['all', 'delayed', 'in_progress', 'released', 'institution']\n\n function cppHomeUrlPather() {\n this.getApiParamsFromLocation = function() {\n const pathParams = $location.search()\n const queryParams = angular.copy(defaultApiParams)\n\n if (pathParams['view']) {\n queryParams[pathParams['view']] = true\n }\n if (pathParams['test_outcome']) {\n queryParams['test_outcome'] = pathParams['test_outcome']\n }\n if (pathParams['covid_test_significance']) {\n queryParams['covid_test_significance'] = pathParams['covid_test_significance']\n }\n if (pathParams['page']) {\n queryParams['page'] = pathParams['page']\n }\n if (this.getSearchQuery()) {\n queryParams['search'] = this.getSearchQuery()\n }\n return queryParams\n }\n\n this.getRouteName = function() {\n const pathParams = $location.search()\n const currentUrl = $location.path()\n if (this.getSearchQuery()) {\n return 'search'\n } else if (currentUrl.indexOf('/providers/forms') >= 0) {\n return 'forms'\n } else if (currentUrl.indexOf('/providers/drafts') >= 0) {\n return 'drafts'\n } else if (currentUrl.indexOf('/providers/family-testing') >= 0) {\n return 'family_testing'\n } else if (pathParams['test_outcome'] && pathParams['test_outcome'] == 'positive') {\n return 'positive'\n } else if (pathParams['covid_test_significance'] && pathParams['covid_test_significance'] == 'inconclusive') {\n return 'covid_inconclusive'\n } else if (pathParams['view'] && routeNames.indexOf(pathParams['view']) > 0) {\n return pathParams['view']\n } else if (currentUrl.indexOf('/providers/shared') >= 0) {\n return 'shared'\n } else if (currentUrl.indexOf('/providers/home') >= 0) {\n return 'all'\n }\n return ''\n }\n\n this.getSearchQuery = function() {\n const params = $location.search()\n if (params['search']) {\n // Queries in URL are base 64 encoded to obfuscate PHI\n return atob(decodeURIComponent(params['search']))\n }\n return \"\"\n }\n }\n\n return new cppHomeUrlPather()\n })\n\n/**\n * @ngdoc service\n * @name PhysicianOrderNavigationService\n * @memberof orderingPhysicianResource\n *\n * @description\n * Manages the current states of the physician order flow.\n */\n .service('PhysicianOrderNavigationService', function() {\n const STATES = {\n DETAILS: 'DETAILS',\n PAYMENT: 'PAYMENT',\n REVIEW: 'REVIEW'\n }\n\n const URLS = {\n DETAILS: '/providers/place-order',\n PAYMENT: '/providers/submit-payment',\n REVIEW: '/providers/review-order'\n }\n\n let state = null\n\n function setState(newState) {\n if (!(newState in STATES)) {\n throw TypeError(newState + ' is not a valid state.')\n }\n\n state = newState\n }\n\n function getState() {\n return state\n }\n\n return {\n STATES: STATES,\n URLS: URLS,\n setState: setState,\n getState: getState\n }\n })\n\n .run(function($rootScope, PhysicianOrderFormData, PhysicianOrderFormFlow,\n ProviderAccount, ProviderAccountFlow) {\n // For refreshing data on entering and existing the flow\n const refreshDataWithFlow = function(flow, persistedData, $rootScope) {\n $rootScope.$on(flow.startEventName, function() { persistedData.refresh() })\n $rootScope.$on(flow.resetEventName, function() { persistedData.refresh() })\n }\n refreshDataWithFlow(PhysicianOrderFormFlow, PhysicianOrderFormData, $rootScope)\n refreshDataWithFlow(ProviderAccountFlow, ProviderAccount, $rootScope)\n })\n","const tutorials = {\n family_testing_direct: {\n cards: [\n {\n image: \"ftp_overview_provider\",\n title: \"Here’s what to expect\",\n description: \"Let's quickly walk you through the process for getting $199 testing for your patient through Color's Family Testing Program.\"\n },\n {\n image: \"submit_positive\",\n title: \"Submit the report\",\n description: \"Upload the positive report from your patient’s first-degree relative. We accept results from Color and also other genetic testing labs.\",\n },\n {\n image: \"color_computer\",\n title: \"Color will review the application\",\n description: \"When you submit the application, it will be sent to Color for review. This process takes 1-2 business days on average. \"\n },\n {\n image: \"provider_patient\",\n title: \"Place your patient’s order\",\n description: \"If the application is approved, we will send you an email with instructions on how you can place an order for your patient to receive $199 testing.\"\n },\n ]\n },\n family_testing_cascade: {\n cards: [\n {\n image: \"ftp_overview_patient\",\n title: \"Here’s what to expect\",\n description: \"Let's quickly walk you through the process for getting $199 testing for your patient’s relatives through Color's Family Testing Program.\",\n },\n {\n image: \"submit_positive\",\n title: \"Submit the report\",\n description: \"Upload the positive report from your patient. We accept results from Color and also other genetic testing labs.\"\n },\n {\n image: \"color_computer\",\n title: \"Color will review the application\",\n description: \"When you submit the application, it will be sent to Color for review. This process takes 1-2 business days on average.\"\n },\n {\n image: \"patients_talking\",\n title: \"Your patient will receive instructions\",\n description: \"If the application is approved, we will send your patient an email with instructions on how they can invite their relatives to get $199 testing.\"\n }\n ]\n }\n}\n\nfunction BasicTutorialCardController($scope, $modalInstance, nextFn, prevFn, card) {\n $scope.next = function() { nextFn($modalInstance) }\n $scope.previous = function() { prevFn($modalInstance) }\n $scope.title = card.title\n $scope.description = card.description\n $scope.image = card.image\n $scope.isFirstCard = card.isFirstCard\n $scope.isLastCard = card.isLastCard\n}\n\nmodule.exports = angular.module('CPPTutorials', [])\n\n .factory('CPPTutorials', function($modal, auth, Tutorials) {\n class TutorialManager {\n constructor(cards, name) {\n this.cards = cards\n this.tutorialName = name\n this.currentIndex = 0;\n\n this.nextCard = ($modalInstance) => {\n $modalInstance.dismiss()\n this.currentIndex += 1\n if (this.currentIndex >= this.cards.length) {\n return\n } else {\n this.openModalForCard(this.currentIndex)\n }\n }\n\n this.previousCard = ($modalInstance) => {\n $modalInstance.dismiss()\n this.currentIndex -= 1\n if (this.currentIndex < 0) {\n return\n } else {\n this.openModalForCard(this.currentIndex)\n }\n }\n }\n\n openModalForCard(index) {\n if (index == 0 ) {\n const apiParams = {tutorial_name: this.tutorialName, event_type: 'start'}\n Tutorials.create(apiParams).$promise.catch(() => undefined)\n } else if (index >= this.cards.length - 1) {\n const apiParams = {tutorial_name: this.tutorialName, event_type: 'end'}\n Tutorials.create(apiParams).$promise.catch(() => undefined)\n }\n\n const card = this.cards[index]\n const self = this\n return $modal.open({\n templateUrl: \"/ordering_physicians/modals/tutorial_basic_card.html\",\n controller: BasicTutorialCardController,\n size: \"skinny\",\n resolve: {\n nextFn: function() { return self.nextCard },\n prevFn: function() { return self.previousCard },\n card: function() {\n return {\n title: card.title,\n description: card.description,\n image: card.image,\n isFirstCard: index == 0,\n isLastCard: index >= self.cards.length - 1\n }\n }\n }\n })\n }\n }\n\n class CPPTutorials {\n constructor(tutorials) {\n this.tutorials = tutorials\n const provider = auth.currentUser.provider_profile\n if (provider && provider.settings) {\n this.seenTutorials = provider.settings.tutorials_started\n } else {\n this.seenTutorials = []\n }\n }\n\n openTutorial(name) {\n this.cards = this.tutorials[name].cards\n this.seenTutorials.push(name)\n const manager = new TutorialManager(this.cards, name)\n manager.openModalForCard(0)\n }\n\n openTutorialIfNotSeen(name) {\n if (this.seenTutorials.indexOf(name) >= 0) {\n return\n } else {\n this.openTutorial(name)\n }\n }\n }\n\n return new CPPTutorials(tutorials)\n })\n","module.exports = function providerFormsController(\n $scope,\n kitPriceService,\n geneCount,\n sku,\n testTypes\n) {\n 'ngInject'\n\n $scope.geneCount = geneCount\n $scope.h30KitPriceDollars = kitPriceService.getAdvertisedKitPriceDollars(sku[testTypes.hereditary30])\n $scope.brcaKitPriceDollars = kitPriceService.getAdvertisedKitPriceDollars(sku[testTypes.brca12])\n $scope.fhKitPriceDollars = kitPriceService.getAdvertisedKitPriceDollars(sku[testTypes.fh3])\n}\n","'use strict'\n\nmodule.exports = function ProviderPlatformResubmitOrderController(\n $scope,\n $location,\n $q,\n $routeParams,\n $timeout,\n auth,\n ngToast,\n physicianOrderCheckout,\n DetailedPhysicianOrder,\n PhysicianOrderPayment\n) {\n 'ngInject'\n\n $scope.submitting = false\n\n const goToOrderDetailsPage = () => $location.url('/providers/order/details/' + $scope.order.requisition_number)\n\n const requisitionNumber = $routeParams['requisition_number']\n DetailedPhysicianOrder.getFromRequisitionNumber(requisitionNumber)\n .then((order) => {\n $scope.order = order\n $scope.checkout = new physicianOrderCheckout(order, auth.currentUser.provider_profile, order.test_requested)\n\n // Cannot edit an order that has a payment already\n if (!order.skip_payment) {\n goToOrderDetailsPage()\n }\n })\n\n $scope.handleSubmit = () => {\n let promise\n if ($scope.order.payment.meetsInsuranceCheck()) {\n promise = $q.when()\n } else {\n // Handle switched-to-cash flow\n promise = $scope.checkout.reviewPayment()\n }\n\n return promise\n .then(() => DetailedPhysicianOrder.update($scope.order).$promise)\n .then(() => {\n goToOrderDetailsPage()\n $timeout(() => ngToast.create('Order has been successfully updated'), 1000)\n })\n .catch((response) => {\n const errorMessage = (response.data && response.data.non_field_errors) ?\n response.data.non_field_errors.join(', ') :\n 'Update failed'\n\n ngToast.create({\n className: 'error',\n content: errorMessage\n })\n })\n }\n}\n","module.exports = angular.module('results_v2', [\n require('src/django_apps/results_v2/js/modals').name,\n require('src/django_apps/results_v2/js/directives').name,\n require('src/django_apps/results_v2/js/services').name\n]).config(function(colorRouteProvider) {\n colorRouteProvider\n .when('/results-v2', {\n templateUrl: '/results_v2/report_picker.html',\n controller: require('src/django_apps/results_v2/js/controllers/results_v2_report_picker_controller'),\n seo: {\n title: \"Results V2 - Report Picker\"\n },\n navigation: {showNav: false},\n auth: {\n requireColorEmployee: true\n }\n })\n\n .when('/results-v2/:reportId', {\n templateUrl: '/results/web_report_v2.html',\n controller: require('src/django_apps/results_v2/js/controllers/report_v2_controller'),\n seo: {\n title: 'Your Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' }\n })\n\n .when('/results-v2/v/:reportId/:step', {\n templateUrl: '/results/web_report.html',\n controller: 'ReportWrapperController',\n seo: {\n title: 'Results - Color',\n description: ''\n },\n navigation: { blue: true, active: 'results' },\n resolve: {\n 'report': function($route, Report) {\n 'ngInject'\n return Report.released({ id: $route.current.params.reportId }).$promise\n },\n 'isPDF': ['resolvedPromise', function(resolvedPromise) {\n return resolvedPromise(false)\n }]\n },\n })\n})\n","module.exports = angular.module('resultsV2Modal', [])\n .factory('ShareProviderModal', require('./modals/ShareProviderModal'))\n .factory('ScheduleAppointmentModal', require('./modals/ScheduleAppointmentModal'))\n","module.exports = function ShareProvider($modal) {\n 'ngInject'\n\n return {\n open: function(kitOrderNumber) {\n return $modal.open({\n templateUrl: '/results_v2/modals/ShareProviderModal.html',\n controller: function($scope, $modalInstance, HealthcareProvider, ngToast) {\n 'ngInject'\n $scope.healthcareProvider = new HealthcareProvider()\n $scope.confirming = false\n $scope.disclaimer = false\n $scope.healthcareProvider.order_number = kitOrderNumber\n $scope.confirmProvider = function() {\n $scope.confirming = true\n }\n $scope.addProvider = function() {\n $scope.submitting = true\n $scope.healthcareProvider.$save()\n .then(function(res) {\n $scope.submitting = false\n ngToast.create('Your results will be sent soon.')\n\n // hack to refresh the report frame\n const reportFrame = angular.element('#reportFrame')[0]\n if (reportFrame && reportFrame.contentWindow.ReportStore) {\n reportFrame.contentWindow.ReportStore.fetch()\n }\n $modalInstance.close(res)\n })\n .finally(function(res) {\n $scope.submitting = false\n })\n }\n },\n size: 'sm'\n })\n }\n }\n}\n","module.exports = function(chooseAppointment) {\n 'ngInject'\n\n return {\n open: function(kitOrderNumber) {\n return chooseAppointment(kitOrderNumber)\n }\n }\n}\n","module.exports = angular.module('resultsV2Directives', [])\n .directive('iframeOnload', require('./directives/iframe_onload'))\n .directive('reportNavbar', require('./directives/report_navbar'))\n","module.exports = function iframeOnload() {\n return {\n scope: {\n callback: '&iframeOnload'\n },\n link: function(scope, element, attrs) {\n element.on('load', function() {\n return scope.callback();\n })\n }\n }\n}\n","module.exports = function ReportNavbar($timeout) {\n 'ngInject'\n\n return {\n scope: {\n selectedTab: '@',\n tabs: '=',\n scrollPos: '&',\n report: '=',\n reportContent: '=',\n },\n templateUrl: '/results_v2/directives/report_navbar.html',\n controller: ($scope, $document, $window) => {\n 'ngInject'\n $scope.withCallback = (fn) => {\n fn()\n $document.scrollTo(0, $scope.scrollPos() + 2, 100)\n }\n\n // listen to scroll event to decide whether to show the selector\n let ticking = false;\n $scope.hideOnWeb = true\n $window.addEventListener('scroll', function() {\n if (ticking) {\n return\n }\n $window.requestAnimationFrame(function() {\n // $scope.report is set in report_v2_controller, passed in web_report_v2.jade\n // We do not want to show the affixed navbar for hdr 59 reports\n if ($scope.report && $scope.report.kit_order && $scope.report.kit_order.test_type === 'hdr 59') {\n return\n }\n $scope.hideOnWeb = $scope.scrollPos() >= $window.scrollY\n $scope.$digest()\n ticking = false;\n });\n ticking = true;\n });\n },\n link: (scope, element, attrs) => {\n const setTab = function(index) {\n const tab = element.find(`.tab-bar__list-${index}`)[0]\n if (tab) {\n element.find('.tab-bar__underline')\n .width(tab.clientWidth)\n .css('left', tab.offsetLeft)\n }\n }\n\n scope.mobileToggleMenu = function(bool) {\n scope.mobileMenuOpen = bool ? bool : !scope.mobileMenuOpen\n }\n\n scope.$watch('tabs', (newValue, oldValue) => {\n if (newValue) {\n $timeout(() => setTab(0))\n }\n })\n scope.$watch('selectedTab', (newValue, oldValue) => {\n if (!isNaN(newValue)) {\n setTab(newValue)\n scope.mobileMenuOpen = false\n }\n })\n }\n }\n}\n","'use strict'\n\nmodule.exports = angular.module('resultsV2Services', [])\n .factory('handleReportClick', function(ShareProviderModal, ScheduleAppointmentModal, emailFamilyModal, sampleLetterModal) {\n\n return function(e, reportShareFamilyData, test_type, kitOrderNumber) {\n if (e.target.tagName.toLowerCase() != 'a') {\n return\n }\n\n if (e.target.href.indexOf('appointments') > -1) {\n e.preventDefault()\n ScheduleAppointmentModal.open(kitOrderNumber)\n return\n }\n\n const cls = e.target.classList;\n for (let i = 0; i < cls.length; i++) {\n switch (cls[i]) {\n case 'action--sample_letter':\n e.preventDefault()\n sampleLetterModal.open(reportShareFamilyData.msgMarkdownSampleLetter)\n break;\n case 'action--share_provider':\n e.preventDefault()\n ShareProviderModal.open(kitOrderNumber)\n break;\n case 'action--email_relatives':\n e.preventDefault()\n emailFamilyModal.open(\n reportShareFamilyData.msgMarkdownSampleLetter,\n reportShareFamilyData.reportId,\n test_type\n )\n break;\n case 'action--appointment':\n e.preventDefault()\n ScheduleAppointmentModal.open(kitOrderNumber)\n break;\n default:\n break;\n }\n }\n }\n })\n","const baseReportURL = '/report/sample_web_report'\nconst pgxReportURL = '/results/pgx/dashboard'\nconst prodAssetHost = 'https://prod-static.color.com/r/'\n\nconst dummyNomenclature = [{\n 'name': 'chr17.GRCh37:g.123123_123123',\n 'is_primary': true,\n 'type': 'gHGVS'\n}, {\n 'name': 'chr17.GRCh37:c.1234_1234dupTGAGA',\n 'is_primary': true,\n 'type': 'cHGVS'\n}, {\n 'name': 'chr17.GRCh37:p.Asn1234Metfs*8',\n 'is_primary': true,\n 'type': 'pHGVS'\n}]\n\nconst dummyWarfarinInputs = {\n VKORC1: {\n 31107689: ['A', 'A'],\n },\n CYP4F2: {\n 15990431: ['C', 'C']\n },\n CYP2C9: {\n 96702047: ['A', 'A'],\n 96741053: ['A', 'A'],\n 96741058: ['A', 'A'],\n 96709038: ['A', 'A']\n },\n}\n\nmodule.exports = function ResultsV2PickerController(auth, $q, $scope, $http, $timeout, $location, interpretedGenes, handleReportClick, marked) {\n 'ngInject'\n // this is a hack for the test picker because interpretedGenes contains\n //'CDKN2A (p14ARF)' etc instead of just CDKN2A\n const testGenesCovered = {\n 'breast ovarian 19': interpretedGenes['breast ovarian 19'],\n 'hereditary 7': interpretedGenes['hereditary 7'],\n 'hereditary 25': interpretedGenes['hereditary 25'],\n 'hereditary 30': interpretedGenes['hereditary 30']\n .filter((v) => !v.match('CDKN2A'))\n .concat('CDKN2A'),\n 'hereditary 41': interpretedGenes['hereditary 41']\n .filter((v) => !v.match('CDKN2A'))\n .concat('CDKN2A'),\n 'cardio 30': interpretedGenes['cardio 30'],\n 'fh 3': interpretedGenes['fh 3'],\n 'brca 1 2': interpretedGenes['brca 1 2'],\n 'metabolism 4': interpretedGenes['metabolism 4'],\n 'covid-19': [],\n 'covid-19 antigen': [],\n 'hdr 59': interpretedGenes['hdr 59'],\n 'wisdom 9': interpretedGenes['wisdom 9'],\n // pgx v1 and pgx v3 interpreted genes is automatically populated by pgxGeneInterpretationsPromise\n 'pgx v1': [],\n 'pgx v3': []\n }\n\n const clinicalDomain = {\n 'breast ovarian 19': 'cancer',\n 'hereditary 7': 'cancer',\n 'hereditary 25': 'cancer',\n 'hereditary 30': 'cancer',\n 'hereditary 41': 'cancer',\n 'brca 1 2': 'cancer',\n 'cardio 30': 'cardio',\n 'fh 3': 'cardio',\n 'metabolism 4': 'other',\n 'covid-19': 'other',\n 'covid-19 antigen': 'other',\n 'hdr 59': 'other',\n 'pgx v1': 'medication',\n 'pgx v3': 'medication'\n }\n\n function setDefaultValues() {\n $scope.testType = 'pgx v3'\n $scope.sex = 'F'\n $scope.testMethodology = '082124'\n $scope.reports = []\n $scope.showVusDetails = false;\n updateGenes($scope.testType)\n }\n\n setDefaultValues();\n\n let initialData;\n let editor = null;\n\n const schemaPromise = $http.get('api/v1/report_info_schema')\n .then((res) => {\n $scope.schema = res.data\n $scope.schema['format'] = 'grid'\n initializeEditor()\n })\n\n function initializeEditor() {\n const el = document.getElementById('schema-editor')\n editor = new JSONEditor(el, {\n collapsed: true,\n schema: $scope.schema,\n theme: 'barebones',\n disable_edit_json: true,\n required_by_default: true,\n disable_properties: true\n })\n }\n\n // Get PGX genes and phenotypes covered\n $scope.pgxGenePhenotypes = []\n\n // PGx genes covered - used for pgx options selector\n $scope.pgxGenesCovered = []\n const geneDiplotypes = []\n const pgxGeneInterpretationsPromise = $http.get('api/v1/pgx_gene_interpretations')\n .then((res) => {\n // pgx v1 covers a subset of the genes returned from this endpoint\n // TODO: Maybe filter out the genes that are not covered by pgx v1\n const genesCovered = res.data.map(gene => gene.name)\n testGenesCovered['pgx v1'] = genesCovered\n testGenesCovered['pgx v3'] = genesCovered\n $scope.pgxGenesCovered = genesCovered\n res.data.forEach(genePhenotype => {\n // Flatten for ng-options\n genePhenotype.gene_diplotypes.forEach(gene_diplotype => {\n $scope.pgxGenePhenotypes.push({gene: gene_diplotype.gene, phenotype: gene_diplotype.phenotype})\n geneDiplotypes.push(gene_diplotype)\n })\n })\n updateGenes($scope.testType)\n })\n\n $scope.setReportURL = function() {\n const version = $scope.reportVersion;\n const query = []\n if (version) {\n const host = encodeURIComponent(`${prodAssetHost}${version}`)\n query.push(`host=${host}`)\n }\n if ($scope.pdf) {\n query.push(`pdf=True`)\n }\n if (query.length) {\n $scope.reportURL = `${baseReportURL}?${query.join('&')}`\n } else {\n $scope.reportURL = baseReportURL\n }\n }\n\n const params = $location.search()\n\n /**\n * Reset the editor back to \"default\" settings by\n * destroying it and re-initializing it with the\n * original \"initial\" data\n */\n $scope.resetSelections = function() {\n setDefaultValues();\n editor.destroy()\n initializeEditor()\n editor.setValue(initialData)\n setSexSpecificProfile()\n $scope.generateReport()\n }\n\n function evalValue(val, convertIntIfPossible = false) {\n // Convert boolean\n if (val.toLowerCase() == 'true') {\n return true\n } else if (val.toLowerCase() == 'false') {\n return false\n } else if (!isNaN(parseInt(val, 10)) && convertIntIfPossible) {\n return parseInt(val, 10)\n }\n return val\n }\n\n // Initialize default values that can be done pre-editor initialization.\n function initFromQueryParamPreEditor() {\n Object.keys(params).forEach(function(key) {\n const val = params[key]\n if (key == 'q') { // Fetch payload from existing report\n $scope.sourceReport = parseInt(val)\n } else if (key == 'r') { // Fetch payload from existing reports\n $scope.reports = val.split(',').map((x) => parseInt(x))\n } else { // Set default values from query params\n $scope[key] = evalValue(val)\n }\n })\n }\n\n // Initialize default values that needs to be done post-editor initialization.\n function initFromQueryParamPostEditor() {\n Object.keys(params).forEach(function(key) {\n const val = params[key]\n if (key == 'pathogenic') { // Set mutations. Expects comma delimited list of genes.\n val.split(',').forEach(function(gene) { addMutation(gene) })\n } else if (key == 'likelyPathogenic') { // Set likely pathogenic mutations.\n val.split(',').forEach(function(gene) { addMutation(gene, 'Likely Pathogenic') })\n } else if (key == 'vus') { // Set VUS.\n val.split(',').forEach(function(gene) { addVUS(gene) })\n } else if (key == 'vusp') { // Set VUS-P.\n val.split(',').forEach(function(gene) { addVUS(gene, true) })\n } else if (key == 'trueNegative') { // Set true negatives.\n val.split(',').forEach(function(gene) { addTrueNegative(gene) })\n } else if (key == 'incidentalFinding') { // Set incidental findings.\n val.split(',').forEach(function(gene) { addIncidentalFinding(gene) })\n } else if (key == 'phenotypes') {\n val.split(',').forEach(function(phenotype, index) {\n updatePhenotype(testGenesCovered['pgx v1'][index], phenotype)\n updatePhenotype(testGenesCovered['pgx v3'][index], phenotype)\n })\n } else if (key == 'instantReportContentGenes') { // Set incidental findings.\n val.split(',').forEach(function(gene) { addInstantReportContentForGene(gene) })\n } else if (key.indexOf('root.') == 0) {\n // This allows us to directly modify the JSON editor.\n // For example, root.health_profile.risk_model.elevated_dutch_criteria=true\n const parts = key.split('.')\n if (parts.length < 3) {\n throw \"At least three parts are expected for JSON editor param.\"\n }\n const thisEditor = editor.getEditor(parts.slice(0, 2).join('.'))\n const thisValue = thisEditor.getValue()\n let curValue = thisValue\n // Initialize values if not initialized yet.\n const isArrayRegex = /(\\w+)\\[(\\d+)\\]/ // e.g. root.health_profile.cancers[0]\n let curPath = parts.slice(0, 2).join('.')\n let hadArray = false\n const sliceBase = 2\n parts.slice(sliceBase, parts.length - 1).forEach(function(part, index) {\n let propName = part\n let arrayIndex = null\n if (isArrayRegex.test(part)) {\n const match = isArrayRegex.exec(part)\n propName = match[1]\n arrayIndex = parseInt(match[2])\n }\n curPath = [curPath, propName].join('.')\n if (arrayIndex == null && !curValue[propName]) {\n if (hadArray) {\n throw \"We don't support complex structure that requires schema in arrays.\"\n }\n const schema = editor.getEditor(curPath).validators[0].schema\n schema.definitions = angular.copy($scope.schema.definitions)\n curValue[propName] = new JSONEditor(document.createElement('div'), {schema: schema}).getValue()\n } else if (arrayIndex != null && !curValue[propName][arrayIndex]) {\n hadArray = true\n let schema\n // For array cases, we cannot derive schema from editor.\n if (propName == 'family_relative_health_profiles') {\n // We use female reative health profile by default\n // We change it to male if we set the sex of the relative health profile to male\n if (parts[sliceBase + index + 1] == 'sex' && val == 'M') {\n schema = $scope.schema.definitions.MaleRelativeHealthProfile\n } else {\n schema = $scope.schema.definitions.FemaleRelativeHealthProfile\n }\n } else if (propName == 'cancers') {\n schema = $scope.schema.definitions.CommonCancerHistory\n } else if (propName == 'lab_sendouts') {\n schema = $scope.schema.definitions.LabSendout\n } else { // Only works for the first array.\n schema = editor.getEditor(curPath).schema.items.anyOf[0]\n }\n schema.definitions = angular.copy($scope.schema.definitions)\n curValue[propName][arrayIndex] = new JSONEditor(document.createElement('div'), {schema: schema}).getValue()\n }\n curValue = curValue[propName]\n if (arrayIndex != null) {\n curValue = curValue[arrayIndex]\n }\n })\n curValue[parts[parts.length - 1]] = evalValue(val, true)\n thisEditor.setValue(thisValue)\n }\n })\n }\n\n initFromQueryParamPreEditor()\n\n $scope.setReportURL()\n\n // allow page to preload report info from an existing report\n let initialDataPromise = $q.when({\n data: {\n user: {\n sex: $scope.sex,\n email: auth.currentUser.email,\n phone_number: '(844) 362-6567',\n patient_id: 1,\n },\n test_information: {\n test_type: $scope.testType,\n clinical_domain: clinicalDomain[$scope.testType],\n genes_covered: Array.from(testGenesCovered[$scope.testType]),\n test_outcome: 'negative',\n test_methodology_version: $scope.testMethodology,\n show_vus_details: $scope.showVusDetails\n }\n }\n })\n\n if ($scope.sourceReport) {\n $scope.reports.push($scope.sourceReport)\n initialDataPromise = $http.get('api/v1/report_info/' + $scope.sourceReport + '?preview=1')\n }\n\n $scope.generateReport = function() {\n editor.root.refreshValue();\n const data = editor.getValue();\n\n $http.post('api/v1/generate_v2_report_from_report_info', data)\n .then((res) => {\n $scope.setReportURL()\n const iframe = angular.element('#reportFrame')[0]\n\n $scope.iframeErrors = [];\n const store = iframe.contentWindow.ReportStore\n try {\n store.update(res.data)\n reportShareFamilyData.msgMarkdownSampleLetter = ''\n if (res.data.components && 'share_family_letter' in res.data.components) {\n res.data.components.share_family_letter.content.map((c) => {\n reportShareFamilyData.msgMarkdownSampleLetter += marked(c)\n })\n }\n } catch (error) {\n $scope.iframeErrors.push(error + '\\n' + error.stack)\n }\n })\n .catch((error) => {\n let msg = angular.toJson(error.data)\n if (error.data['non_field_errors']) {\n msg = error.data['non_field_errors'].join(', ')\n }\n $scope.iframeErrors.push(\"error generating report:\\n\" + msg)\n })\n }\n\n // Capture errors from iframe by 1. overriding console.error\n // and 2. adding an error event handler\n $scope.iframeErrors = []\n const framePromise = $q.defer()\n const reportShareFamilyData = {\n msgMarkdownSampleLetter: 'Sample letter.'\n }\n let initialLoad = true\n $scope.reportFrameOnload = function() {\n const iframe = angular.element('#reportFrame')[0]\n const originalError = iframe.contentWindow.console.error\n iframe.contentWindow.console.error = (e) => {\n $scope.iframeErrors.push(arguments[0])\n originalError.apply(arguments)\n }\n iframe.contentWindow.addEventListener('error', (e) => {\n $scope.iframeErrors.push(e)\n })\n iframe.contentWindow.addEventListener('click', (e) => {\n const testType = editor.getEditor('root.test_information.test_type').getValue()\n handleReportClick(\n e, reportShareFamilyData, testType, \"1234\", \"\")\n })\n if (initialLoad) {\n framePromise.resolve()\n initialLoad = false\n } else {\n $scope.generateReport()\n }\n\n if ($scope.fullScreen) {\n window.iFrameResize({\n checkOrigin: false,\n heightCalculationMethod: 'documentElementOffset',\n }, '#reportFrame')\n }\n }\n\n // Generate report after everything is loaded\n $q.all([initialDataPromise, schemaPromise, framePromise.promise, pgxGeneInterpretationsPromise])\n .then((result) => {\n // in order to correctly set anyOf fields, we temporarily disable\n // required by default.\n if ($scope.sourceReport) {\n editor.options.required_by_default = false\n }\n\n initialData = result[0].data // Make this available on controller scope so we can reset the editor\n editor.setValue(initialData);\n editor.options.required_by_default = true\n\n if ($scope.testType === 'pgx v1' || $scope.testType === 'pgx v3') {\n editor.root.refreshValue()\n const geneDiplotypesEditor = editor.getEditor('root.gene_diplotypes')\n const baselineGeneDiplotypes = geneDiplotypes.filter(geneDiplotype => geneDiplotype.is_baseline)\n geneDiplotypesEditor.setValue(baselineGeneDiplotypes)\n }\n\n setSexSpecificProfile()\n initFromQueryParamPostEditor()\n })\n .then(() => { $scope.generateReport() })\n\n function updateGenes(testType) {\n $scope.genes = angular.copy(testGenesCovered[testType])\n $scope.quickFinding = $scope.genes[0]\n $scope.quickGene = $scope.genes[0]\n $scope.relativeVariant = $scope.genes[0]\n $scope.instantReportGene = $scope.genes[0]\n }\n\n // QUICK SET\n $scope.testTypes = Object.keys(testGenesCovered)\n $scope.sexOptions = ['F', 'M']\n $scope.showVusDetailsOptions = [true, false]\n updateGenes($scope.testType)\n\n function addMutation(gene, classification = 'Pathogenic') {\n const testTypeEditor = editor.getEditor('root.test_information')\n const testTypeValue = testTypeEditor.getValue()\n testTypeValue['test_outcome'] = 'positive'\n testTypeEditor.setValue(testTypeValue)\n const mutationEditor = editor.getEditor('root.gene_mutations')\n const mutations = mutationEditor.getValue()\n const mutation = {\n 'classification': classification,\n 'nomenclatures': dummyNomenclature,\n 'variant_id': 0,\n 'zygosity': 'Heterozygous',\n 'criteria': [{\n 'description': 'This is a test supporting evidence. You will see real one on production.',\n }]\n }\n let allelicity = '1';\n\n // Allow specific mutation name to be specified. e.g. BRCA1(R1699Q)\n let r = /(.+)\\((.*)\\)/g\n let match = r.exec(gene)\n if (match) {\n gene = match[1]\n mutation.mutation_name = match[2]\n }\n\n // Allow zygosity to be specified. e.g. BRCA1[Homozygous]\n r = /(.+)\\[(.*)\\]/g\n match = r.exec(gene)\n if (match) {\n gene = match[1]\n mutation.zygosity = match[2]\n if (mutation.zygosity == 'Homozygous') {\n allelicity = '2'\n }\n }\n\n // Allow allelicity to be specified. e.g. BRCA1{1}\n r = /(.+)\\{(.*)\\}/g\n match = r.exec(gene)\n if (match) {\n gene = match[1]\n allelicity = match[2]\n }\n\n const is_carrier = allelicity == '1' && gene == 'GLA' && $scope.sex == 'F';\n let updatedExisting = false\n for (let i = 0; i < mutations.length; i++) {\n if (mutations[i].gene == gene) {\n mutation.variant_id = mutations[i].mutations.length //make unique variant_ids\n mutations[i].mutations.push(mutation)\n mutations[i].allelicity = allelicity\n mutations[i].is_carrier = is_carrier\n updatedExisting = true\n }\n }\n\n if (!updatedExisting) {\n mutations.push({'gene': gene, 'allelicity': allelicity, 'mutations': [mutation], 'is_carrier': is_carrier})\n }\n\n mutationEditor.setValue(mutations)\n }\n\n function addInstantReportContentForGene(gene) {\n const instantReportContentEditor = editor.getEditor('root.instant_report_content')\n const instantReportContent = instantReportContentEditor.getValue()\n const irc = {\n 'gene': gene,\n 'summary': 'This is the instant report content that is overriding the summary section.',\n 'notes': 'This is the instant report content that is overriding the notes section.',\n 'title': 'This is the instant report content that is overriding the title section.',\n 'additional_findings': 'This is the instant report content that is overriding the additional findings section.',\n }\n instantReportContent.push(irc)\n instantReportContentEditor.setValue(instantReportContent)\n }\n\n $scope.quickAddInstantReportContent = function(gene) {\n addInstantReportContentForGene(gene)\n $scope.generateReport()\n }\n\n $scope.quickAddMutation = function(gene, classification = 'Pathogenic') {\n addMutation(gene, classification)\n $scope.generateReport()\n }\n\n function addVUS(gene, vuspNote) {\n const mutationEditor = editor.getEditor('root.gene_mutations')\n const mutations = mutationEditor.getValue()\n const mutation = {\n 'classification': 'Variant of Uncertain Significance',\n 'nomenclatures': dummyNomenclature\n }\n if (vuspNote) {\n mutation['vusp_notes'] = 'This is an example VUS-P note.'\n }\n let updatedExisting = false\n for (let i = 0; i < mutations.length; i++) {\n if (mutations[i].gene == gene) {\n mutations[i].mutations.push(mutation)\n updatedExisting = true\n }\n }\n if (!updatedExisting) {\n mutations.push({'gene': gene, 'mutations': [mutation]})\n }\n\n mutationEditor.setValue(mutations)\n }\n\n $scope.quickAddVUS = function(gene, vuspNote) {\n addVUS(gene, vuspNote)\n $scope.generateReport()\n }\n\n $scope.quickSetTestType = function() {\n const testTypeEditor = editor.getEditor('root.test_information')\n const testInfo = testTypeEditor.getValue()\n testInfo.test_type = $scope.testType\n testInfo.clinical_domain = clinicalDomain[$scope.testType]\n testInfo.genes_covered = Array.from(testGenesCovered[$scope.testType])\n testTypeEditor.setValue(testInfo)\n updateGenes($scope.testType)\n\n $scope.generateReport()\n }\n\n $scope.quickSetShowVusDetails = function() {\n const testTypeEditor = editor.getEditor('root.test_information')\n const testInfo = testTypeEditor.getValue()\n testInfo.show_vus_details = $scope.showVusDetails;\n testTypeEditor.setValue(testInfo)\n $scope.generateReport()\n }\n\n function addIncidentalFinding(gene) {\n const mutationEditor = editor.getEditor('root.incidental_findings')\n const mutations = mutationEditor.getValue()\n const mutation = {\n 'classification': '',\n 'nomenclatures': dummyNomenclature,\n 'variant_type': 'somatic'\n }\n let updatedExisting = false\n for (let i = 0; i < mutations.length; i++) {\n if (mutations[i].gene == gene) {\n mutations[i].mutations.push(mutation)\n updatedExisting = true\n }\n }\n if (!updatedExisting) {\n mutations.push({'gene': gene, 'mutations': [mutation]})\n }\n\n mutationEditor.setValue(mutations)\n }\n\n $scope.quickAddIncidentalFinding = function(gene) {\n addIncidentalFinding(gene)\n $scope.generateReport()\n }\n\n function addTrueNegative(gene) {\n const variantsEditor = editor.getEditor('root.reported_variants_in_relatives')\n const variants = variantsEditor.getValue()\n variants.push({is_true_negative: true, gene: gene, nomenclatures: dummyNomenclature})\n variantsEditor.setValue(variants)\n }\n\n $scope.quickAddTrueNegative = function(gene) {\n addTrueNegative(gene)\n $scope.generateReport()\n }\n\n function setSexSpecificProfile() {\n // Change sex specific health profile.\n // We use json editor to initialize the profile based on the schema.\n const profileSchema = $scope.sex == 'F' ? $scope.schema.definitions.FemaleHealthProfile : $scope.schema.definitions.MaleHealthProfile\n // The schema depends on the root definitions for the schema.\n profileSchema.definitions = angular.copy($scope.schema.definitions)\n const sexSpecificProfileEditor = new JSONEditor(document.createElement('div'), {schema: profileSchema})\n editor.getEditor('root.health_profile').setValue(sexSpecificProfileEditor.getValue())\n }\n\n $scope.quickSetSex = function() {\n editor.getEditor('root.user.sex').setValue($scope.sex)\n setSexSpecificProfile()\n $scope.generateReport()\n }\n\n $scope.quickSetTestMethodology = function() {\n editor.getEditor('root.test_information.test_methodology_version').setValue($scope.testMethodology)\n $scope.generateReport()\n }\n\n $scope.loadReport = function(reportID) {\n if (!$scope.sourceReport && !reportID) {\n return\n }\n if (!reportID) {\n reportID = $scope.sourceReport\n } else {\n $scope.sourceReport = reportID\n }\n $http.get('api/v1/report_info/' + reportID + '?preview=1')\n .then((result) => {\n if ($scope.reports.indexOf(reportID) < 0) {\n $scope.reports.push(reportID)\n }\n // in order to correctly set anyOf fields, we temporarily disable\n // required by default.\n editor.options.required_by_default = false\n const note = result.data.note\n if (note) {\n delete result.data.note\n $scope.reportNote = note\n } else {\n $scope.reportNote = ''\n }\n\n editor.setValue(result.data);\n editor.options.required_by_default = true\n $scope.generateReport()\n })\n }\n\n $scope.viewPdf = function() {\n editor.root.refreshValue();\n const data = editor.getValue();\n $http.post('api/v1/create_report_from_report_info', data)\n .then(function(res) {\n const params = new URLSearchParams(window.location.search);\n window.open(`/report/sample_pdf_report/${res.data.id}?${params}`)\n })\n }\n\n function updatePhenotype(gene, phenotype) {\n phenotype = phenotype.phenotype || phenotype\n editor.root.refreshValue();\n const geneDiplotypesEditor = editor.getEditor('root.gene_diplotypes')\n const newGeneDiplotype = geneDiplotypes.filter(geneDiplotype => geneDiplotype.gene === gene && geneDiplotype.phenotype === phenotype)[0]\n const currentGeneDiplotypes = geneDiplotypesEditor.getValue()\n\n currentGeneDiplotypes.push(newGeneDiplotype)\n geneDiplotypesEditor.setValue(currentGeneDiplotypes)\n }\n\n $scope.quickUpdatePhenotype = function(gene, phenotype) {\n updatePhenotype(gene, phenotype)\n $scope.generateReport()\n }\n}\n","'use strict'\n\nmodule.exports = angular.module('files', [\n require('src/django_apps/files/js/filters').name,\n require('src/django_apps/files/js/services').name\n])\n","'use strict'\n\nmodule.exports = angular.module('filesFilters', ['clrResource', 'clrConstant', 'filesServices'])\n /**\n * @ngdoc filter\n * @name makeS3Url\n * @memberof filesFilters\n *\n * @description\n * Generates a url to an UploadFile represented by the given S3 key and file\n * type.\n */\n .filter('makeS3Url', function(urlBuilder) {\n return function(key, fileType) {\n return urlBuilder.buildUrl('/api/v1/uploaded_file', {\n key: key,\n file_type: fileType\n })\n }\n })\n\n /**\n * @ngdoc filter\n * @name makeGcNotesUrl\n * @memberof filesFilters\n *\n * @description\n * Generates a url to an UploadFile containing counseling notes represented\n * by the given S3 key.\n */\n .filter('makeGcNotesUrl', function(makeS3UrlFilter, uploadFileTypes) {\n return function(key) {\n return makeS3UrlFilter(key, uploadFileTypes.geneticCounselingNote)\n }\n })\n\n /**\n * @ngdoc filter\n * @name makePhysicianOrderFilesUrl\n * @memberof filesFilters\n *\n * @description\n * Generates a url to an UploadFile containing physician order files\n * represented by the given S3 key.\n */\n .filter('makePhysicianOrderFilesUrl', function(makeS3UrlFilter) {\n return function(file) {\n return makeS3UrlFilter(file.s3_key, file.file_type)\n }\n })\n\n .filter('uploadFileType', function(uploadFileTypeLabels) {\n return function(fileType) {\n const label = uploadFileTypeLabels[fileType]\n if (label) {\n return label + ': '\n }\n return label\n }\n })\n","'use strict'\n\nmodule.exports = angular.module('filesServices', ['clrConstant'])\n // Returns a map from upload file types to their human readable labels\n .service('uploadFileTypeLabels', function(uploadFileTypes) {\n const fileTypeLabels = {}\n fileTypeLabels[uploadFileTypes.geneticCounselingNote] = 'Genetic counseling summary'\n fileTypeLabels[uploadFileTypes.geneticTestReport] = 'Genetic test report'\n fileTypeLabels[uploadFileTypes.insuranceCard] = 'Insurance card'\n fileTypeLabels[uploadFileTypes.medicalRecords] = 'Medical records'\n fileTypeLabels[uploadFileTypes.orderFormOrInformedConsent] = 'Order form / Informed consent'\n fileTypeLabels[uploadFileTypes.otherPhysicianOrderFile] = 'Other'\n fileTypeLabels[uploadFileTypes.physicianOrderFiles] = ''\n return fileTypeLabels\n })\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrConstant\n *\n * @description\n * The `clrConstant` provides constants for color app.\n */\n const module = angular.module('clrConstant', [])\n\n /**\n * @ngdoc constant\n * @const geneCount\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns # of genes in current panel\n *\n * @returns {integer}\n */\n module.constant('geneCount', 30)\n\n /**\n * @ngdoc constant\n * @const stateAcronyms\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns state abbreviations\n *\n * @returns {list}\n */\n module.constant('stateAcronyms', [\n 'AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DC',\n 'DE', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN',\n 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN',\n 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ',\n 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI',\n 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA',\n 'WI', 'WV', 'WY'])\n\n /**\n * @ngdoc constant\n * @const stateNames\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns state names and abbreviations\n *\n * @returns {list of dictionary}\n */\n module.constant('stateNames', [\n {'abbreviation': 'AL', 'fullName': 'Alabama'},\n {'abbreviation': 'AK', 'fullName': 'Alaska'},\n {'abbreviation': 'AS', 'fullName': 'American Samoa'},\n {'abbreviation': 'AZ', 'fullName': 'Arizona'},\n {'abbreviation': 'AR', 'fullName': 'Arkansas'},\n {'abbreviation': 'CA', 'fullName': 'California'},\n {'abbreviation': 'CO', 'fullName': 'Colorado'},\n {'abbreviation': 'CT', 'fullName': 'Connecticut'},\n {'abbreviation': 'DE', 'fullName': 'Delaware'},\n {'abbreviation': 'DC', 'fullName': 'District of Columbia'},\n {'abbreviation': 'FL', 'fullName': 'Florida'},\n {'abbreviation': 'GA', 'fullName': 'Georgia'},\n {'abbreviation': 'GU', 'fullName': 'Guam'},\n {'abbreviation': 'HI', 'fullName': 'Hawaii'},\n {'abbreviation': 'ID', 'fullName': 'Idaho'},\n {'abbreviation': 'IL', 'fullName': 'Illinois'},\n {'abbreviation': 'IN', 'fullName': 'Indiana'},\n {'abbreviation': 'IA', 'fullName': 'Iowa'},\n {'abbreviation': 'KS', 'fullName': 'Kansas'},\n {'abbreviation': 'KY', 'fullName': 'Kentucky'},\n {'abbreviation': 'LA', 'fullName': 'Louisiana'},\n {'abbreviation': 'ME', 'fullName': 'Maine'},\n {'abbreviation': 'MD', 'fullName': 'Maryland'},\n {'abbreviation': 'MA', 'fullName': 'Massachusetts'},\n {'abbreviation': 'MI', 'fullName': 'Michigan'},\n {'abbreviation': 'MN', 'fullName': 'Minnesota'},\n {'abbreviation': 'MS', 'fullName': 'Mississippi'},\n {'abbreviation': 'MO', 'fullName': 'Missouri'},\n {'abbreviation': 'MT', 'fullName': 'Montana'},\n {'abbreviation': 'NE', 'fullName': 'Nebraska'},\n {'abbreviation': 'NV', 'fullName': 'Nevada'},\n {'abbreviation': 'NH', 'fullName': 'New Hampshire'},\n {'abbreviation': 'NJ', 'fullName': 'New Jersey'},\n {'abbreviation': 'NM', 'fullName': 'New Mexico'},\n {'abbreviation': 'NY', 'fullName': 'New York'},\n {'abbreviation': 'NC', 'fullName': 'North Carolina'},\n {'abbreviation': 'ND', 'fullName': 'North Dakota'},\n {'abbreviation': 'MP', 'fullName': 'Northern Mariana Islands'},\n {'abbreviation': 'OH', 'fullName': 'Ohio'},\n {'abbreviation': 'OK', 'fullName': 'Oklahoma'},\n {'abbreviation': 'OR', 'fullName': 'Oregon'},\n {'abbreviation': 'PA', 'fullName': 'Pennsylvania'},\n {'abbreviation': 'PR', 'fullName': 'Puerto Rico'},\n {'abbreviation': 'RI', 'fullName': 'Rhode Island'},\n {'abbreviation': 'SC', 'fullName': 'South Carolina'},\n {'abbreviation': 'SD', 'fullName': 'South Dakota'},\n {'abbreviation': 'TN', 'fullName': 'Tennessee'},\n {'abbreviation': 'TX', 'fullName': 'Texas'},\n {'abbreviation': 'VI', 'fullName': 'U.S. Virgin Islands'},\n {'abbreviation': 'UT', 'fullName': 'Utah'},\n {'abbreviation': 'VT', 'fullName': 'Vermont'},\n {'abbreviation': 'VA', 'fullName': 'Virginia'},\n {'abbreviation': 'WA', 'fullName': 'Washington'},\n {'abbreviation': 'WV', 'fullName': 'West Virginia'},\n {'abbreviation': 'WI', 'fullName': 'Wisconsin'},\n {'abbreviation': 'WY', 'fullName': 'Wyoming'},\n /*\n Areas that have 2-letter codes but are deliberately omitted because they are\n outside the US: Federated States of Micronesia, Marshall Islands, and Palau.\n Areas that are not states but are deliberately included because they are\n part of the US: American Samoa, District of Columbia, Guam, Northern\n Mariana Islands, Puerto Rico, Virgin Islands (U.S.).\n */\n ])\n\n /**\n * @ngdoc constant\n * @const topCountries\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns the countries that should be displayed at the top of any country\n * selector, site-wide.\n *\n * @returns {list}\n */\n module.constant('topCountries', ['US', 'CA', 'GB'])\n\n /**\n * The masterGeneTable is a local variable which contains all the relevant\n * info about each gene. In order to keep the code as DRY as possible, we\n * we build all other gene-related data structures from this master table.\n *\n * IMPORTANT: Do NOT alter the order of entries; that has been tweaked to\n * optimize the appearance of a user-visible table.\n */\n const masterGeneTable = [\n {\n name: 'BRCA1',\n interpreted_by: ['hereditary 30', 'brca 1 2', 'breast ovarian 19', 'wisdom 9', 'hereditary 7', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Breast', 'Ovarian', 'Pancreatic', 'Prostate']\n }, {\n name: 'BRCA2',\n interpreted_by: ['hereditary 30', 'brca 1 2', 'breast ovarian 19', 'wisdom 9', 'hereditary 7', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Breast', 'Ovarian', 'Melanoma', 'Pancreatic', 'Prostate']\n }, {\n name: 'MLH1',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'hereditary 7', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Ovarian', 'Uterine', 'Colorectal', 'Pancreatic', 'Prostate', 'Stomach']\n }, {\n name: 'MSH2',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'hereditary 7', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Ovarian', 'Uterine', 'Colorectal', 'Pancreatic', 'Prostate', 'Stomach']\n }, {\n name: 'MSH6',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'hereditary 7', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Ovarian', 'Uterine', 'Colorectal', 'Prostate', 'Stomach']\n }, {\n name: 'PMS2',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'hereditary 7', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Ovarian', 'Uterine', 'Colorectal', 'Prostate'],\n footnote: '*'\n }, {\n name: 'EPCAM',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'hereditary 7', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Ovarian', 'Uterine', 'Colorectal', 'Pancreatic', 'Prostate', 'Stomach'],\n footnote: '*'\n }, {\n name: 'APC',\n interpreted_by: ['hereditary 30', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Colorectal', 'Pancreatic', 'Stomach']\n }, {\n name: 'MUTYH',\n interpreted_by: ['hereditary 30', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Colorectal']\n }, {\n name: 'MITF',\n interpreted_by: ['hereditary 30', 'hereditary 41'],\n cancersCovered: ['Melanoma'],\n footnote: '*'\n }, {\n name: 'BAP1',\n interpreted_by: ['hereditary 30', 'hereditary 41'],\n cancersCovered: ['Melanoma']\n }, {\n name: 'CDKN2A',\n interpreted_by: ['hereditary 30', 'hereditary 41'],\n cancersCovered: ['Melanoma', 'Pancreatic'],\n interpretations: ['(p14ARF)', '(p16INK4a)']\n }, {\n name: 'CDK4',\n interpreted_by: ['hereditary 30', 'hereditary 41'],\n cancersCovered: ['Melanoma'],\n footnote: '*'\n }, {\n name: 'TP53',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'wisdom 9', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Breast', 'Ovarian', 'Uterine', 'Colorectal', 'Melanoma', 'Pancreatic', 'Stomach', 'Prostate']\n }, {\n name: 'PTEN',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'wisdom 9', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Breast', 'Uterine', 'Colorectal', 'Melanoma']\n }, {\n name: 'STK11',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'wisdom 9', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Breast', 'Ovarian', 'Uterine', 'Colorectal', 'Pancreatic', 'Stomach']\n }, {\n name: 'CDH1',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'wisdom 9', 'hereditary 41'],\n cancersCovered: ['Breast', 'Stomach']\n }, {\n name: 'BMPR1A',\n interpreted_by: ['hereditary 30', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Colorectal', 'Pancreatic', 'Stomach']\n }, {\n name: 'SMAD4',\n interpreted_by: ['hereditary 30', 'hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: ['Colorectal', 'Pancreatic', 'Stomach']\n }, {\n name: 'GREM1',\n interpreted_by: ['hereditary 30', 'hereditary 41'],\n cancersCovered: ['Colorectal'],\n footnote: '*'\n }, {\n name: 'POLD1',\n interpreted_by: ['hereditary 30', 'hereditary 41'],\n cancersCovered: ['Colorectal'],\n footnote: '*'\n }, {\n name: 'POLE',\n interpreted_by: ['hereditary 30', 'hereditary 41'],\n cancersCovered: ['Colorectal'],\n footnote: '*'\n }, {\n name: 'PALB2',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'wisdom 9', 'hereditary 41'],\n cancersCovered: ['Breast', 'Ovarian', 'Pancreatic']\n }, {\n name: 'CHEK2',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'wisdom 9', 'hereditary 41'],\n cancersCovered: ['Breast', 'Colorectal', 'Prostate']\n }, {\n name: 'ATM',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'wisdom 9', 'hereditary 41'],\n cancersCovered: ['Breast', 'Pancreatic', 'Prostate']\n }, {\n name: 'BARD1',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'hereditary 41'],\n cancersCovered: ['Breast']\n }, {\n name: 'BRIP1',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'hereditary 41'],\n cancersCovered: ['Breast', 'Ovarian']\n }, {\n name: 'RAD51C',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'hereditary 41'],\n cancersCovered: ['Ovarian']\n }, {\n name: 'RAD51D',\n interpreted_by: ['hereditary 30', 'breast ovarian 19', 'hereditary 41'],\n cancersCovered: ['Ovarian']\n }, {\n name: 'MEN1',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'NF2',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'RB1',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'RET',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'SDHAF2',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'SDHB',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'SDHC',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'SDHD',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'TSC1',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'TSC2',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'VHL',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'WT1',\n interpreted_by: ['hereditary 25', 'hereditary 41', 'hdr 59'],\n cancersCovered: []\n }, {\n name: 'ACTA2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arteriopathy']\n }, {\n name: 'ACTC1',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'APOB',\n interpreted_by: ['cardio 30', 'fh 3', 'hdr 59'],\n cardioConditionsCovered: ['Familial Hypercholesterolemia'],\n footnote: '*'\n }, {\n name: 'COL3A1',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arteriopathy']\n }, {\n name: 'DSC2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'DSG2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'DSP',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'FBN1',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arteriopathy']\n }, {\n name: 'GLA',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'KCNH2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arrhythmia'],\n footnote: '*'\n }, {\n name: 'KCNQ1',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arrhythmia'],\n footnote: '*'\n }, {\n name: 'LDLR',\n interpreted_by: ['cardio 30', 'fh 3', 'hdr 59'],\n cardioConditionsCovered: ['Familial Hypercholesterolemia'],\n }, {\n name: 'LMNA',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'MYBPC3',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy'],\n footnote: '*'\n }, {\n name: 'MYH7',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy'],\n footnote: '*'\n }, {\n name: 'MYH11',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arteriopathy']\n }, {\n name: 'MYL2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'MYL3',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'PCSK9',\n interpreted_by: ['cardio 30', 'fh 3', 'hdr 59'],\n cardioConditionsCovered: ['Familial Hypercholesterolemia']\n }, {\n name: 'PKP2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'PRKAG2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy'],\n footnote: '*'\n }, {\n name: 'RYR2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arrhythmia']\n }, {\n name: 'SCN5A',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arrhythmia']\n }, {\n name: 'SMAD3',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arteriopathy']\n }, {\n name: 'TGFBR1',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arteriopathy'],\n footnote: '*'\n }, {\n name: 'TGFBR2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Arteriopathy']\n }, {\n name: 'TMEM43',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'TNNI3',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'TNNT2',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'TPM1',\n interpreted_by: ['cardio 30', 'hdr 59'],\n cardioConditionsCovered: ['Cardiomyopathy']\n }, {\n name: 'ATP7B',\n interpreted_by: ['metabolism 4', 'hdr 59']\n }, {\n name: 'CACNA1S',\n interpreted_by: ['metabolism 4', 'hdr 59']\n }, {\n name: 'OTC',\n interpreted_by: ['metabolism 4', 'hdr 59']\n }, {\n name: 'RYR1',\n interpreted_by: ['metabolism 4', 'hdr 59']\n }\n ]\n\n /**\n * @ngdoc constant\n * @const interpretedGenes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of interpreted genes.\n *\n * @returns {integer}\n */\n module.constant('interpretedGenes', (function() {\n const result = {}\n for (let g = 0; g < masterGeneTable.length; g++) {\n const gene = masterGeneTable[g]\n for (let ib = 0; ib < gene.interpreted_by.length; ib++) {\n const test = gene.interpreted_by[ib]\n result[test] = result[test] || []\n if (gene.interpretations) {\n for (let i = 0; i < gene.interpretations.length; i++) {\n result[test].push(gene.name + ' ' + gene.interpretations[i])\n }\n } else {\n result[test].push(gene.name)\n }\n }\n }\n for (const test in result) {\n result[test].sort()\n }\n return result\n })())\n\n /**\n * @ngdoc constant\n * @const familyTestingGenes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of genes eligible for Family Testing\n * (currently H30 + FH3)\n *\n * @returns {integer}\n */\n module.constant('familyTestingGenes', (function() {\n const result = []\n for (let g = 0; g < masterGeneTable.length; g++) {\n const gene = masterGeneTable[g]\n if (gene.interpreted_by.indexOf('hereditary 30') >= 0 ||\n gene.interpreted_by.indexOf('cardio 30') >= 0) {\n result.push(gene.name)\n }\n }\n result.sort()\n return result\n })())\n\n /**\n * @ngdoc constant\n * @const cardioConditionsCovered\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns an array of heart conditions covered by the Cardio 30 test\n *\n * @returns {array}\n */\n module.constant('cardioConditionsCovered', [\n 'Cardiomyopathy', 'Arrhythmia', 'Arteriopathy', 'Familial Hypercholesterolemia'\n ])\n\n /**\n * @ngdoc constant\n * @const cancersCovered\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns an array of cancers covered by the Hereditary 30 test\n *\n * @returns {array}\n */\n module.constant('cancersCovered', [\n 'Breast', 'Ovarian', 'Uterine', 'Colorectal', 'Melanoma',\n 'Pancreatic', 'Stomach', 'Prostate'\n ])\n\n /**\n * @ngdoc constant\n * @const cancersCoveredAltName\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of cancers with alternative names, usually asterisks\n *\n * @returns {object}\n */\n module.constant('cancersCoveredAltName', {\n 'Prostate': 'Prostate*'\n })\n\n /**\n * @ngdoc constant\n * @const clinicalCancerName\n * @static\n * @memberof clrConstant\n *\n * @description\n * The cancer name constants we use in the backend.\n * These names should match those defined in the class Cancer in health_profiles/constants.py\n *\n * @returns {object}\n */\n const clinicalCancerName = {\n BREAST: 'Breast cancer',\n OVARIAN: 'Ovarian cancer',\n ENDOMETRIAL: 'Endometrial cancer',\n COLORECTAL: 'Colorectal cancer',\n MELANOMA: 'Melanoma',\n PANCREATIC: 'Pancreatic cancer',\n GASTRIC: 'Gastric cancer',\n PROSTATE: 'Prostate cancer',\n }\n module.constant('clinicalCancerName', clinicalCancerName)\n\n /**\n * @ngdoc constant\n * @const cancerToClinicalName\n * @static\n * @memberof clrConstant\n *\n * @description\n * Maps the cancer constants we use on the frontend (e.g. in cancersCovered) to the cancer names that are used in the\n * backend and returned by health profile serializers such as CancerProfileSerializerMixin\n *\n * @returns {object}\n */\n module.constant('cancerToClinicalName', {\n 'Breast': clinicalCancerName.BREAST,\n 'Ovarian': clinicalCancerName.OVARIAN,\n 'Uterine': clinicalCancerName.ENDOMETRIAL,\n 'Colorectal': clinicalCancerName.COLORECTAL,\n 'Melanoma': clinicalCancerName.MELANOMA,\n 'Pancreatic': clinicalCancerName.PANCREATIC,\n 'Stomach': clinicalCancerName.GASTRIC,\n 'Prostate': clinicalCancerName.PROSTATE,\n })\n\n /**\n * @ngdoc constant\n * @const cancerGenesCovered\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of genes covered with associated cancers, used in geneTable directive\n *\n * @returns {object}\n */\n module.constant('cancerGenesCovered', (function() {\n const result = []\n for (let g = 0; g < masterGeneTable.length; g++) {\n const gene = masterGeneTable[g]\n if (gene.interpreted_by.indexOf('hereditary 30') >= 0) {\n result.push(gene)\n }\n }\n // do NOT sort; the order is tweaked for table aesthetics\n return result\n })())\n\n /**\n * @ngdoc constant\n * @const cardioGenesCovered\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of genes associated with cardio conditions, used in geneTable directive\n *\n * @returns {object}\n */\n module.constant('cardioGenesCovered', (function() {\n const result = []\n for (let g = 0; g < masterGeneTable.length; g++) {\n const gene = masterGeneTable[g]\n if (gene.interpreted_by.indexOf('cardio 30') >= 0) {\n result.push(gene)\n }\n }\n // do NOT sort; the order is tweaked for table aesthetics\n return result\n })())\n\n /**\n * @ngdoc constant\n * @const standardCancerGenesCovered\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of genes covered by the CDC10 Color Standard test\n *\n * @returns {object}\n */\n module.constant('standardCancerGenesCovered', (function() {\n const result = []\n for (let g = 0; g < masterGeneTable.length; g++) {\n const gene = masterGeneTable[g]\n if (gene.interpreted_by.indexOf('hereditary 7') >= 0) {\n result.push(gene)\n }\n }\n return result\n })())\n\n /**\n * @ngdoc constant\n * @const namedMutation\n * @static\n * @memberof clrConstant\n *\n * @description\n * returns cHGVS nomenclature for commonly named mutations\n *\n * @returns {string}\n */\n module.constant('namedMutation', {\n apc_i1307k: 'chr5.GRCh37:g.112175211T>A',\n brca1_r1699q: 'chr17.GRCh37:g.41215947C>T'\n })\n\n /**\n * @ngdoc constant\n * @const testTypes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of test types.\n *\n * @returns {object}\n */\n module.constant('testTypes', {\n brca12: 'brca 1 2',\n breastOvarian19: 'breast ovarian 19',\n wisdom9: 'wisdom 9',\n hereditary30: 'hereditary 30',\n cardio30: 'cardio 30',\n fh3: 'fh 3',\n hereditary7: 'hereditary 7',\n pgxv1: 'pgx v1',\n covid19: 'covid-19',\n covid19Antigen: 'covid-19 antigen',\n aouAcmg59: 'aou acmg 59',\n aouPgxV1: 'aou pgx v1',\n hdr59: 'hdr 59',\n })\n\n /**\n * @ngdoc constant\n * @const appointmentTypes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a dictionary of appointment types.\n *\n * @returns {object}\n */\n module.constant('appointmentTypes', {\n default: 'default',\n pgx: 'pgx'\n })\n\n /**\n * @ngdoc constant\n * @const permissionTypes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a dictionary of permission types.\n *\n * @returns {object}\n */\n module.constant('permissionTypes', {\n putSamplesOnHold: 'samples.put_sample_on_hold',\n viewUsers: 'users.view_users',\n viewAppointments: 'counseling.view_appointments',\n viewHealthHistory: 'health_profiles.view_healthhistory',\n viewCovidReportsQueue: 'results.can_view_covid_reports_queue',\n })\n\n /**\n * @ngdoc constant\n * @const clinicalDomains\n * @static\n * @memberof clrConstant\n *\n * @returns {object}\n */\n module.constant('clinicalDomains', {\n 'brca 1 2': 'cancer',\n 'breast ovarian 19': 'cancer',\n 'wisdom 9': 'cancer',\n 'hereditary 30': 'cancer',\n 'fh 3': 'cardio',\n 'cardio 30': 'cardio',\n 'hereditary 7': 'cancer',\n 'pgx v1': 'medication'\n })\n\n module.factory('defaultSku', function() { return 'combo 3'})\n\n // maps company names (in promotional campaigns) to their logo name\n module.constant('corporateLogos', {\n \"BlackRock\": \"blackrock\",\n \"NetSuite\": \"netsuite\",\n \"Nvidia\": \"nvidia\",\n \"Tribune Media\": \"tribuneMedia\",\n \"Snap\": \"snap\",\n \"loanDepot\": \"loan_depot\"\n })\n\n /**\n * @ngdoc constant\n * @const testOutcome\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of possible test outcomes.\n *\n * @returns {integer}\n */\n module.constant('testOutcome', {\n negative: 'negative',\n non_reportable: 'non-reportable',\n positive: 'positive'\n })\n\n /**\n * @ngdoc constant\n * @const classification\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of possible variant classification.\n *\n * @returns {integer}\n */\n module.constant('classification', {\n p: 'Pathogenic',\n lp: 'Likely Pathogenic',\n ras: 'Significant Risk Allele',\n vus: 'Variant of Uncertain Significance',\n lb: 'Likely Benign',\n b: 'Benign',\n rai: 'Insignificant Risk Allele',\n })\n\n /**\n * @ngdoc constant\n * @const zygosity\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of possible variant zygosity.\n *\n * @returns {integer}\n */\n module.constant('zygosity', {\n heterozygous: 'Heterozygous',\n homozygous: 'Homozygous'\n })\n\n /**\n * @ngdoc constant\n * @name device\n * @memberof clrConstant\n *\n * @description\n *\n * `device` provides device/browser checks to handle\n * cross-browser or responsive logic.\n */\n\n /**\n * @class Device\n */\n const Device = {}\n\n /**\n * @function isMsie\n * @static\n * @memberof clrConstant.device\n *\n * @description\n * Checks if the browser is IE\n *\n * @returns {boolean}\n */\n Device.isMsie = parseInt((/msie (\\d+)/.exec(window.navigator.userAgent.toLowerCase()) || [])[1], 10)\n\n /**\n * @function isWindows\n * @static\n * @memberof clrConstant.device\n *\n * @description\n * Checks if the user's OS is Windows\n *\n * @returns {boolean}\n */\n Device.isWindows = navigator.platform.indexOf('Win') > -1\n\n /**\n * @function isAndroid\n * @static\n * @memberof clrConstant.device\n *\n * @description\n * Checks if the user's OS is Android\n *\n * @returns {boolean}\n */\n Device.isAndroid = /(android)/i.test(navigator.userAgent)\n\n /**\n * @function isSafari\n * @static\n * @memberof clrConstant.device\n *\n * @description\n * Checks if the browser is Safari\n *\n * @see https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent\n *\n * @returns {boolean}\n */\n Device.isSafari = window.navigator.userAgent.match(/Safari\\//) != null\n && window.navigator.userAgent.match(/Chrom(e|ium)\\//) == null\n\n /**\n * @function canPlayHls\n * @static\n * @memberof clrConstant.device\n *\n * @description\n * Checks if the browser can play HLS (application/x-mpegURL mimetype) files\n *\n * @returns {boolean}\n */\n Device.canPlayHls = typeof document.createElement('video').canPlayType == 'undefined' ? false : document.createElement('video').canPlayType('application/vnd.apple.mpegURL')\n\n /**\n * @function isHighDensity\n * @static\n * @memberof clrConstant.device\n *\n * @description\n * Checks if the device is \"High Density\", i.e. Apple Retina (2x),\n * or various Android resolutions above 1.3x.\n * Reference: http://stackoverflow.com/questions/19689715/what-is-the-best-way-to-detect-retina-support-on-a-device-using-javascript\n *\n * @returns {boolean}\n */\n Device.isHighDensity = window.matchMedia && (window.matchMedia('only screen and (min-resolution: 124dpi), only screen and (min-resolution: 1.3dppx), only screen and (min-resolution: 48.8dpcm)').matches || window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3)').matches) || window.devicePixelRatio && window.devicePixelRatio > 1.3\n\n /**\n * @function isIos\n * @static\n * @memberof clrConstant.device\n *\n * @description\n * Checks if the device is running iOS\n * Reference: https://stackoverflow.com/questions/9038625/detect-if-device-is-ios\n *\n * @returns {boolean}\n */\n Device.isIos = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n\n module.constant('device', {\n isMsie: Device.isMsie,\n isWindows: Device.isWindows,\n isAndroid: Device.isAndroid,\n isIos: Device.isIos,\n isSafari: Device.isSafari,\n canPlayHls: Device.canPlayHls,\n isHighDensity: Device.isHighDensity,\n })\n\n const skipAuthSync = extractValueFromElem('skip-auth-sync', false)\n module.constant('skipAuthSync', skipAuthSync)\n\n function extractValueFromElem(elemId, defaultVal) {\n const elem = document.getElementById(elemId)\n return elem ? elem.value : defaultVal\n }\n\n function convertCentsToDollars(cents) {\n return parseInt(cents) / 100\n }\n\n const entryPriceDollars = convertCentsToDollars(extractValueFromElem('entry-price-cents', '0'));\n const entryProviderServicePriceDollars = convertCentsToDollars(extractValueFromElem('entry-provider-service-price-cents', '0'));\n const standalonePriceDollars = convertCentsToDollars(extractValueFromElem('standalone-price-cents', '0'));\n const standaloneProviderServicePriceDollars = convertCentsToDollars(extractValueFromElem('standalone-provider-service-price-cents', '0'));\n const comboPriceDollars = convertCentsToDollars(extractValueFromElem('combo-price-cents', '0'));\n const comboBCAMPriceDollars = convertCentsToDollars(extractValueFromElem('combo-bcam-price-cents', '0'));\n const standardPriceDollars = convertCentsToDollars(extractValueFromElem('standard-price-cents', '0'));\n const comboProviderServicePriceDollars = convertCentsToDollars(extractValueFromElem('combo-provider-service-price-cents', '0'));\n const hereditary30PriceDollars = convertCentsToDollars(extractValueFromElem('hereditary-30-price-cents', '0'));\n const hereditary30ProviderServicePriceDollars = convertCentsToDollars(extractValueFromElem('hereditary-30-provider-service-price-cents', '0'));\n const modifierAddonPriceDollars = convertCentsToDollars(extractValueFromElem('modifier-addon-price-cents', '0'));\n const modifierBrcaUpgradePriceDollars = convertCentsToDollars(extractValueFromElem('modifier-entry-upgrade-price-cents', '0'));\n const modifierFhUpgradePriceDollars = convertCentsToDollars(extractValueFromElem('modifier-entry-upgrade-price-cents', '0'));\n const modifierEntryMultiUnitPriceDollars = convertCentsToDollars(extractValueFromElem('modifier-entry-multi-unit-price-cents', '0'));\n const modifierStandaloneMultiUnitPriceDollars = convertCentsToDollars(extractValueFromElem('modifier-standalone-multi-unit-price-cents', '0'));\n const modifierComboMultiUnitPriceDollars = convertCentsToDollars(extractValueFromElem('modifier-combo-multi-unit-price-cents', '0'));\n const modifierOCComboMultiUnitPriceDollars = convertCentsToDollars(extractValueFromElem('modifier-oc-combo-multi-unit-price-cents', '0'));\n const modifierHereditary30MultiUnitPriceDollars = convertCentsToDollars(extractValueFromElem('modifier-hereditary-30-multi-unit-price-cents', '0'))\n\n // productName should conform with what we use in our `en.json` file\n module.constant('sku', {\n 'brca 1 2': {\n name: 'brca 1 2',\n productName: 'BRCA1/2 Genetic Test',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/product/brca-genetic-test',\n priceDollars: standardPriceDollars,\n providerServicePriceDollars: entryProviderServicePriceDollars,\n testTypes: ['brca 1 2'],\n video: 'pretestBrca12',\n videoScriptUrl: '/video/about-genetic-testing-script/brca-test',\n isEntry: true\n },\n 'wisdom 9': {\n name: 'wisdom 9',\n productName: 'Wisdom Test',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/',\n priceDollars: 0,\n providerServicePriceDollars: standaloneProviderServicePriceDollars,\n testTypes: ['wisdom 9'],\n video: '',\n videoScriptUrl: '/',\n isEntry: false\n },\n 'breast ovarian 19': {\n name: 'breast ovarian 19',\n productName: 'Breast & Ovarian Cancer Test',\n brand: 'Color',\n category: 'Genetic Test',\n url: '',\n priceDollars: standalonePriceDollars,\n providerServicePriceDollars: standaloneProviderServicePriceDollars,\n testTypes: ['breast ovarian 19'],\n video: 'pretestBreastOvarian19',\n videoScriptUrl: '/video/about-genetic-testing-script/breast-ovarian-cancer-test',\n isEntry: false\n },\n 'hereditary 7': {\n name: 'hereditary 7',\n productName: 'BRCA and Lynch Test',\n brand: 'Color',\n category: 'Genetic Test',\n url: '',\n priceDollars: null, // SKU not sold externally\n providerServicePriceDollars: null,\n testTypes: ['hereditary 7'],\n video: 'preCounselCore10', // Use core 10 video\n videoScriptUrl: '/video/about-genetic-testing-script/tier-1-hereditary-conditions-test',\n isEntry: false\n },\n 'hereditary 30': {\n name: 'hereditary 30',\n productName: 'Hereditary Cancer Test',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/product/hereditary-cancer-genetic-test',\n priceDollars: hereditary30PriceDollars,\n providerServicePriceDollars: hereditary30ProviderServicePriceDollars,\n testTypes: ['hereditary 30'],\n video: 'pretestHereditary30',\n videoScriptUrl: '/video/about-genetic-testing-script/hereditary-cancer-test',\n isEntry: false\n },\n 'fh 3': {\n name: 'fh 3',\n productName: 'Hereditary High Cholesterol Test',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/product/hereditary-high-cholesterol-genetic-test',\n priceDollars: entryPriceDollars,\n providerServicePriceDollars: entryProviderServicePriceDollars,\n testTypes: ['fh 3'],\n video: 'preCounselFh',\n videoScriptUrl: '/video/about-genetic-testing-script/hereditary-high-cholesterol-test',\n isEntry: true\n },\n 'cardio 30': {\n name: 'cardio 30',\n productName: 'Hereditary Heart Health Test',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/product/hereditary-heart-health-genetic-test',\n priceDollars: standalonePriceDollars,\n providerServicePriceDollars: standaloneProviderServicePriceDollars,\n testTypes: ['cardio 30'],\n video: 'preCounselCardio30',\n videoScriptUrl: '/video/about-genetic-testing-script/hereditary-heart-health-test',\n isEntry: false\n },\n // TODO (PGx): Update values\n 'pgx v1': {\n name: 'pgx v1',\n productName: 'Medication Response Genetic Test',\n brand: 'Color',\n category: 'Genetic Test',\n url: 'placeholder',\n priceDollars: entryPriceDollars,\n providerServicePriceDollars: entryProviderServicePriceDollars,\n testTypes: ['pgx v1'],\n video: null, // pgx has no video\n videoScriptUrl: null,\n isEntry: true\n },\n 'combo 1': {\n name: 'combo 1',\n productName: 'Color tests',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/product/color-genetic-tests',\n priceDollars: comboPriceDollars,\n providerServicePriceDollars: comboProviderServicePriceDollars,\n testTypes: ['hereditary 30', 'fh 3'],\n video: 'preCounselCombo',\n videoScriptUrl: '/video/about-genetic-testing-script/the-color-test',\n isEntry: false\n },\n 'combo 2': {\n name: 'combo 2',\n productName: 'Color tests',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/product/color-genetic-tests',\n priceDollars: comboPriceDollars,\n providerServicePriceDollars: comboProviderServicePriceDollars,\n testTypes: ['hereditary 30', 'cardio 30'],\n video: 'preCounselCombo2',\n videoScriptUrl: '/video/about-genetic-testing-script/the-color-test',\n isEntry: false\n },\n // TODO (CORE10): Update values\n 'core 10': {\n name: 'core 10',\n productName: 'Tier 1 Hereditary Conditions Test',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/product/color-genetic-tests',\n priceDollars: 199,\n providerServicePriceDollars: 13,\n testTypes: ['fh 3', 'hereditary 7'],\n video: 'preCounselCore10',\n videoScriptUrl: '/video/about-genetic-testing-script/tier-1-hereditary-conditions-test',\n isEntry: true\n },\n // TODO [CONSUMER-7278]: Update values\n 'combo 3': {\n name: 'combo 3',\n productName: 'Color Extended',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/product/overview',\n priceDollars: comboBCAMPriceDollars,\n providerServicePriceDollars: comboProviderServicePriceDollars,\n testTypes: ['hereditary 30', 'cardio 30', 'pgx v1'],\n video: '',\n videoScriptUrl: '',\n isEntry: false\n },\n 'core combo': {\n name: 'core combo',\n productName: 'Color Standard',\n brand: 'Color',\n category: 'Genetic Test',\n url: '/product/color-genetic-tests',\n priceDollars: standardPriceDollars,\n providerServicePriceDollars: comboProviderServicePriceDollars,\n testTypes: ['fh 3', 'hereditary 7', 'pgx v1'],\n video: 'preCounselCore10',\n videoScriptUrl: '/video/about-genetic-testing-script/tier-1-hereditary-conditions-test',\n isEntry: false\n },\n 'covid-19': {\n name: 'covid-19',\n productName: 'COVID-19 Test',\n brand: 'Color',\n category: 'Covid Test',\n url: '',\n priceDollars: standardPriceDollars,\n providerServicePriceDollars: comboProviderServicePriceDollars,\n testTypes: ['covid-19'],\n video: '',\n videoScriptUrl: '',\n isEntry: true\n },\n 'covid-19 antigen': {\n name: 'covid-19 antigen',\n productName: 'COVID-19 Antigen Test',\n brand: 'Color',\n category: 'Covid Antigen Test',\n url: '',\n priceDollars: standardPriceDollars,\n providerServicePriceDollars: comboProviderServicePriceDollars,\n testTypes: ['covid-19 antigen'],\n video: '',\n videoScriptUrl: '',\n isEntry: true\n },\n 'hdr 59': {\n name: 'hdr 59',\n productName: 'Hereditary Disease Risk Test 2.0',\n brand: 'Color',\n category: 'Genetic Test',\n url: '',\n priceDollars: standardPriceDollars,\n providerServicePriceDollars: comboProviderServicePriceDollars,\n testTypes: ['hdr 59'],\n video: '',\n videoScriptUrl: '',\n isEntry: true\n },\n })\n\n const host_url = extractValueFromElem('www-base-host-url', '')\n const logged_in_host_url = extractValueFromElem('www-logged-in-base-host-url', '')\n module.constant('wwwBaseHostUrl', host_url)\n module.constant('wwwLoggedInBaseHostUrl', logged_in_host_url)\n const prod = host_url.indexOf('www.color.com') > -1 || host_url.indexOf('clinical.color.com') > -1\n module.constant('environment', prod ? 'prod' : 'dev')\n\n module.constant('standalonePriceDollars', standalonePriceDollars)\n module.constant('standaloneProviderServicePriceDollars', standaloneProviderServicePriceDollars)\n module.constant('modifierAddonPriceDollars', modifierAddonPriceDollars)\n module.constant('modifierBrcaUpgradePriceDollars', modifierBrcaUpgradePriceDollars)\n module.constant('modifierFhUpgradePriceDollars', modifierFhUpgradePriceDollars)\n module.constant('multiUnitModifiersPriceDollars', {\n 'brca 1 2': modifierEntryMultiUnitPriceDollars,\n 'hereditary 30': modifierHereditary30MultiUnitPriceDollars,\n 'fh 3': modifierEntryMultiUnitPriceDollars,\n 'cardio 30': modifierStandaloneMultiUnitPriceDollars,\n 'combo 1': modifierComboMultiUnitPriceDollars,\n 'combo 2': modifierComboMultiUnitPriceDollars,\n 'combo 3': modifierOCComboMultiUnitPriceDollars\n })\n\n // Any test types updated here must have its \"available_in_ny\" value updated in kit_orders/constants.py\n const blocked = ['fh 5', 'whole exome']\n module.constant('testTypesBlockedInNewYork', blocked)\n\n // used to convert black state list into full name.\n module.constant('stateFullNames', {'NY': 'New York'})\n\n module.constant('kioCountries', ['US', 'CA', 'AU', 'IL', 'PR', 'AE', 'NG', 'CM'])\n\n const euCountries = ['BE', 'BG', 'CZ', 'DK', 'DE', 'EE', 'IE', 'EL', 'ES', 'FR', 'HR',\n 'IT', 'CY', 'LV', 'LT', 'LU', 'HU', 'MT', 'NL', 'AT', 'PL', 'PT', 'RO', 'SI', 'SK',\n 'FI', 'SE', 'UK']\n module.constant('euCountries', euCountries)\n\n // tests allowed in the eu\n const testTypesAllowedInEU = ['hereditary 30', 'breast ovarian 19', 'pgx v1', 'cardio 30']\n module.constant('testTypesAllowedInEU', testTypesAllowedInEU)\n\n // Salesforce WebToCase (for Support/Submit a Request Forms)\n module.constant('salesforceWebToCasePostUrl', extractValueFromElem('salesforce-web-to-case-post-url', ''))\n module.constant('salesforceWebToCaseOrgid', extractValueFromElem('salesforce-web-to-case-orgid', ''))\n\n module.constant('months', [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])\n\n module.constant('defaultLanguage', 'en')\n\n // Provider roles\n const officeManager = ['office_manager', 'Administrative assistant']\n const breastSurgeon = ['breast_surgeon', 'Breast surgeon']\n const colorectalSurgeon = ['colorectal_surgeon', 'Colorectal surgeon']\n const gc = ['gc', 'Genetic counselor']\n const gynOnc = ['gyn_onc', 'GYN oncologist']\n const internist = ['internist', 'Internist/GP']\n const geneticist = ['geneticist', 'Medical geneticist']\n const geneticNursePractitioner = ['genetic_nurse_practitioner', 'Genetic nurse practitioner']\n const medicalOncologist = ['medical_oncologist', 'Medical oncologist']\n const nurse = ['nurse', 'Nurse']\n const nursePractitioner = ['nurse_practitioner', 'Nurse practitioner']\n const ob = ['ob', 'OB/GYN']\n const otherPhysician = ['other_physician', 'Other physician']\n const otherSurgeon = ['other_surgeon', 'Other surgeon']\n const radiologist = ['radiologist', 'Radiologist']\n const surgicalOncologist = ['surgical_oncologist' , 'Surgical oncologist']\n const otherNonPhysician = ['other_non_physician', 'Other non-physician']\n const medicalAssistant = ['medical_assistant', 'Medical assistant']\n const physicianAssistant = ['physician_assistant', 'Physician assistant']\n const urologist = ['urologist', 'Urologist']\n const dermatologist = ['dermatologist', 'Dermatologist']\n const gastroenterologist = ['gastroenterologist', 'Gastroenterologist']\n const radiationOncologist = ['radiation_oncologist', 'Radiation oncologist']\n const cardiologist = ['cardiologist', 'Cardiologist']\n const endocrinologist = ['endocrinologist', 'Endocrinologist']\n const lipidologist = ['lipidologist', 'Lipidologist']\n const other = ['other', 'Unclassified']\n\n module.factory('externalProviderRoles', function() {\n return [\n officeManager, breastSurgeon, colorectalSurgeon, dermatologist, gastroenterologist, gc, geneticNursePractitioner, gynOnc, internist, medicalAssistant, geneticist,\n medicalOncologist, nurse, nursePractitioner, ob, otherPhysician, otherSurgeon, physicianAssistant, radiationOncologist,\n radiologist, surgicalOncologist, urologist,\n cardiologist, endocrinologist, lipidologist\n ]\n })\n\n module.constant('internalProviderRoles', [\n officeManager, breastSurgeon, colorectalSurgeon, dermatologist, gastroenterologist, gc, geneticNursePractitioner, gynOnc, internist, medicalAssistant, geneticist,\n medicalOncologist, nurse, nursePractitioner, ob, otherPhysician, otherSurgeon, physicianAssistant, radiationOncologist,\n radiologist, surgicalOncologist, urologist, cardiologist, endocrinologist, lipidologist, otherNonPhysician, other\n ])\n\n module.constant('npiOptionalRoles', [\n nurse,\n nursePractitioner,\n officeManager,\n gc,\n medicalAssistant\n ])\n\n module.constant('orderingPhysicianRoles', [\n breastSurgeon,\n internist,\n geneticist,\n medicalOncologist,\n ob,\n otherPhysician,\n radiologist,\n surgicalOncologist,\n colorectalSurgeon,\n gynOnc,\n otherSurgeon,\n urologist,\n dermatologist,\n gastroenterologist,\n radiationOncologist,\n cardiologist,\n endocrinologist,\n lipidologist\n ])\n\n const heardNews = ['news', 'News']\n const heardColleague = ['colleague', 'Colleague/Friend']\n const heardPublication = ['publication', 'Medical publication']\n const heardEmail = ['email', 'Promotional email from Color']\n const heardConference = ['conference', 'Conference/Event']\n const heardEmployee = ['employee', 'Someone from Color']\n const heardOther = ['other', 'Other']\n\n module.constant('providerHeardAboutColorThrough', [\n heardColleague, heardConference, heardNews, heardPublication, heardEmail, heardEmployee, heardOther\n ])\n\n const heardFoF = ['friend_or_family', 'Friend or family member']\n const heardProvider = ['provider', 'Healthcare provider']\n const heardEmployer = ['employer', 'My employer']\n const heardFacebook = ['facebook_ad', 'Facebook ad']\n const heardGoogle = ['google', 'Google search result or ad']\n const heardEvent = ['event', 'An event']\n const heardTV = ['tv', 'TV']\n const heardRadio = ['radio', 'Radio/SiriusXM']\n const heardPodcast = ['podcast', 'Podcast']\n const heardSpotify = ['spotify', 'Spotify']\n\n function shuffleArray(array) {\n let m = array.length;\n let t;\n let i\n while (m) {\n i = Math.floor(Math.random() * m--)\n t = array[m]\n array[m] = array[i]\n array[i] = t\n }\n }\n\n const heardAboutColorThrough = [heardFoF, heardProvider, heardEmployer, heardFacebook, heardGoogle, heardEvent, heardTV, heardRadio, heardPodcast, heardSpotify]\n shuffleArray(heardAboutColorThrough)\n heardAboutColorThrough.push(heardOther)\n\n module.constant('consumerHeardAboutColorThrough', heardAboutColorThrough)\n\n // Roles that we won't display as options to be primary contact in UI. (not strictly enforced)\n module.constant('nonPrimaryContactRoles', [officeManager[0], medicalAssistant[0]])\n\n // Low friction healthcare provider pilot such that URL path /care/:key\n // will prefill healthcare provider to the values. CPP-1047\n module.constant('lowFrictionHealthcareProviders', {\n 'azcolorectal': {\n first_name: 'Elizabeth',\n last_name: 'McConnell',\n institution_name: 'McConnell Colorectal Center',\n phone_number: '+16022534271',\n fax_number: '+16022534273',\n state: 'AZ',\n city: 'Phoenix',\n formal_name: \"Dr Elizabeth McConnell\",\n image: \"mcconnell\",\n provider_id: 1097, // ProviderProfile id in prod to take advantage of H30 upgrade code path.\n is_low_friction: true\n },\n 'etkinkramer': {\n first_name: 'Elizabeth',\n last_name: 'Etkin-Kramer',\n institution_name: 'Miami Beach Gynecologist',\n phone_number: '+13056748038',\n fax_number: '+13056748192',\n state: 'FL',\n city: 'Miami Beach',\n formal_name: \"Dr Elizabeth Etkin-Kramer\",\n image: \"\",\n provider_id: 2498, // ProviderProfile id\n is_low_friction: true\n },\n 'millcreekobgyn': {\n first_name: 'Orly',\n last_name: 'Steinberg',\n institution_name: 'Mill Creek OB/GYN',\n phone_number: '+14256733420',\n fax_number: '+14256733423',\n state: 'WA',\n city: 'Mill Creek',\n formal_name: \"Dr. Orly Steinberg\",\n image: \"millcreek\",\n provider_id: 3710, // ProviderProfile id\n is_low_friction: true\n },\n 'chesapeakeurology': {\n first_name: 'Benjamin',\n last_name: 'Lowentritt',\n institution_name: 'Chesapeake Urology',\n phone_number: '+14108255454',\n fax_number: '+14108255811',\n state: 'MD',\n city: 'Towson',\n formal_name: \"Dr. Benjamin Lowentritt\",\n image: \"chesapeake\",\n provider_id: 3987, // ProviderProfile id\n is_low_friction: true\n },\n 'barnabasbreast': {\n first_name: 'Michele',\n last_name: 'Blackwood',\n institution_name: 'Center for Breast Health and Disease Management',\n phone_number: '+19733227020',\n fax_number: '+19733227039',\n state: 'NJ',\n city: 'Livingston',\n formal_name: \"Dr. Michele Blackwood\",\n image: \"barnabasbreast\",\n provider_id: 3955, // ProviderProfile id\n is_low_friction: true\n },\n 'cwc24': {\n first_name: 'CWC',\n last_name: 'Staff',\n institution_name: \"Capital Women's Care - Division 24\",\n phone_number: '+13015935595',\n fax_number: '+13017540947',\n state: 'MD',\n city: 'Silver Spring',\n formal_name: \"Capital Women's Care - Division 24\",\n image: \"cwc\",\n provider_id: 4108, // ProviderProfile id\n is_low_friction: true\n }\n })\n\n /**\n * @ngdoc constant\n * @const uploadFileTypes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns an object enumerating valid file types.\n *\n * @returns {object}\n */\n module.constant('uploadFileTypes', {\n geneticCounselingNote: 'genetic_counseling_note',\n geneticTestReport: 'genetic_test_report',\n insuranceCard: 'insurance_card',\n medicalRecords: 'medical_records',\n orderFormOrInformedConsent: 'order_form_or_informed_consent',\n otherPhysicianOrderFile: 'other_physician_order_file',\n physicianOrderFiles: 'physician_order_files'\n })\n\n /**\n * @ngdoc constant\n * @const CancerGene\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns an object enumerating valid cancer genes for diagnosis.\n *\n * @returns {object}\n */\n module.constant('CancerGene', (function() {\n const result = {}\n for (let g = 0; g < masterGeneTable.length; g++) {\n const gene = masterGeneTable[g]\n if (gene.interpreted_by.indexOf('hereditary 30') >= 0) {\n result[gene.name] = [gene.name, gene.name]\n }\n }\n result['Other'] = ['Other', 'Other']\n return result\n })())\n\n /**\n * @ngdoc constant\n * @const cancerTypes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Enumerates the lists of different valid cancer types.\n *\n * Returns an object of strings to arrays of strings, where the first\n * element in the array is the user-friendly name and the second element\n * is the expected value on the backend.\n *\n * @returns {object}\n */\n module.constant('cancerTypes', {\n BILIARY_TRACT: ['Biliary Tract Cancer', 'biliary_tract_cancer'],\n BRAIN: ['Brain Cancer', 'brain_cancer'],\n BREAST: ['Breast Cancer', 'breast_cancer'],\n CERVICAL: ['Cervical Cancer', 'cervical_cancer'],\n COLORECTAL: ['Colon / Rectal Cancer', 'colorectal_cancer'],\n KERATOCANTHOMAS: ['Keratocanthomas', 'keratocanthomas'],\n KIDNEY: ['Kidney Cancer', 'kidney_cancer'],\n LEUKEMIA: ['Leukemia', 'leukemia'],\n LIVER: ['Liver Cancer', 'liver_cancer'],\n LUNG: ['Lung Cancer', 'lung_cancer'],\n MELANOMA: ['Melanoma', 'melanoma'],\n OSTEOSARCOMA: ['Osteosarcoma', 'osteosarcoma'],\n OVARIAN: ['Ovarian Cancer', 'ovarian_cancer'],\n PANCREATIC: ['Pancreatic Cancer', 'pancreatic_cancer'],\n PROSTATE: ['Prostate Cancer', 'prostate_cancer'],\n RENAL_PELVIS: ['Renal Pelvis Cancer', 'renal_pelvis_cancer'],\n SEBACEOUS_GLAND_ADENOMAS: ['Sebaceous Gland Adenomas', 'sebaceous_gland_adenomas'],\n SMALL_BOWEL: ['Small Bowel Cancer', 'small_bowel_cancer'],\n SMALL_INTESTINE: ['Small Intestine Cancer', 'small_intestine_cancer'],\n SOFT_TISSUE_SARCOMA: ['Soft Tissue Sarcoma', 'soft_tissue_sarcoma'],\n STOMACH: ['Stomach Cancer', 'stomach_cancer'],\n TESTICULAR: ['Testicular Cancer', 'testicular_cancer'],\n THYROID: ['Thyroid Cancer', 'thyroid_cancer'],\n URETER: ['Ureter Cancer', 'ureter_cancer'],\n UTERINE: ['Uterine (Endometrial) Cancer', 'uterine_cancer'],\n\n UNKNOWN: ['Unknown', 'unknown']\n })\n\n /**\n * @ngdoc constant\n * @const criteriaRelationshipTypes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Enumerates the lists of different valid relationships.\n *\n * Returns an object of strings to arrays of strings, where the first\n * element in the array is the user-friendly name and the second element\n * is the expected value on the backend.\n *\n * @returns {object}\n */\n module.constant('criteriaRelationshipTypes', function() {\n const FEMALE = {\n MOTHER: ['Mother', 'Mother'],\n DAUGHTER: ['Daughter', 'Daughter'],\n SISTER: ['Sister', 'Sister'],\n GRANDMOTHER: ['Grandmother', 'Grandmother'],\n AUNT: ['Aunt', 'Aunt'],\n NIECE: ['Niece', 'Niece'],\n GRANDDAUGHTER: ['Granddaughter', 'Granddaughter'],\n HALF_SISTER: ['Half-sister', 'Half-sister'],\n GREAT_GRANDMOTHER: ['Great grandmother', 'Great grandmother'],\n GREAT_AUNT: ['Great aunt', 'Great aunt'],\n FIRST_COUSIN_FEMALE: ['First cousin, female', 'First cousin, female']\n }\n\n const MALE = {\n FATHER: ['Father', 'Father'],\n SON: ['Son', 'Son'],\n BROTHER: ['Brother', 'Brother'],\n GRANDFATHER: ['Grandfather', 'Grandfather'],\n UNCLE: ['Uncle', 'Uncle'],\n NEPHEW: ['Nephew', 'Nephew'],\n GRANDSON: ['Grandson', 'Grandson'],\n HALF_BROTHER: ['Half-brother', 'Half-brother'],\n GREAT_GRANDFATHER: ['Great grandfather', 'Great grandfather'],\n GREAT_UNCLE: ['Great uncle', 'Great uncle'],\n FIRST_COUSIN_MALE: ['First cousin, male', 'First cousin, male']\n }\n\n return {\n FEMALE: FEMALE,\n MALE: MALE,\n ALL: angular.extend({}, FEMALE, MALE)\n }\n }())\n\n /**\n * @ngdoc constant\n * @const sideOfFamilyTypes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Enumerates the lists of different valid sides of a family.\n *\n * Returns an object of strings to arrays of strings, where the first\n * element in the array is the user-friendly name and the second element\n * is the expected value on the backend.\n *\n * @returns {object}\n */\n module.constant('sideOfFamilyTypes', {\n MOTHER: ['Mother', 'Mother'],\n FATHER: ['Father', 'Father']\n })\n\n /**\n * @ngdoc constant\n * @const PhysicianOrderType\n * @static\n * @memberof clrConstant\n *\n * @description\n * Lists the valid types of physician orders.\n *\n * @returns {object}\n */\n module.constant('PhysicianOrderType', {\n SAMPLE_ORDERED: 'sample_ordered',\n SAMPLE_AT_OFFICE: 'sample_at_office',\n\n // WARN: This type is deprecated; however we still need to support legacy\n // logic.\n SAMPLE_TAKEN_HOME: 'sample_taken_home'\n })\n\n /**\n * @ngdoc constant\n * @const ApplicationType\n * @static\n * @memberof clrConstant\n *\n * @description\n * Lists the valid application types.\n *\n * @returns {object}\n */\n module.constant('ApplicationType', {\n CLINICAL: 'clinical',\n WWW: 'www'\n })\n\n /**\n * @ngdoc constant\n * @const currentDraftPhysicianOrderVersion\n * @static\n * @memberof clrConstant\n *\n * @description\n * Current version of stored draft objects\n * @returns {object}\n */\n module.constant('currentDraftPhysicianOrderVersion', 1)\n\n /**\n * @ngdoc constant\n * @const PhysicianOrderCancellationReasons\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns an array of reasons users can select when cancelling physician order\n *\n * @returns {object}\n */\n module.constant('PhysicianOrderCancellationReasons', [\n {\n text: 'This test is not appropriate for the patient',\n value: 'not_appropriate'\n },{\n text: \"I don't recognize the patient\",\n value: 'do_not_recognize'\n },{\n text: 'The patient changed their mind',\n value: 'patient_changed_mind'\n },{\n text: 'Other',\n value: 'other'\n }]\n )\n\n /**\n * @ngdoc constant\n * @const DiabetesTypeOptions\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of options for diabetes type.\n *\n * @returns {object}\n */\n module.constant('DiabetesTypeOptions', [\n {'label': \"Type 2 (adult-onset)\", 'response': 'Type 2'},\n {'label': \"Type 1 (juvenile diabetes)\", 'response': 'Type 1'},\n {'label': \"Gestational Diabetes (diagnosed during pregnancy)\", 'response': 'Gestational Diabetes'},\n {'label': \"Prediabetes (borderline diabetes)\", 'response': 'Prediabetes'},\n {'label': \"I'm not sure\", 'response': \"I'm not sure\"}\n ])\n\n /**\n * @ngdoc constant\n * @const LdlLevelOptions\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of options for Ldl levels.\n *\n * @returns {object}\n */\n module.constant('LdlLevelOptions', [\n \"Less than 154\",\n \"155-189\",\n \"190-249\",\n \"250-329\",\n \"330 or higher\",\n \"I'm not sure\"\n ])\n\n /**\n * A list of options for company that performed genetic tests\n * along with corresponding conditions they test for.\n */\n const geneticLabOptions = [\n { name: 'Ambry Genetics', value: 'Ambry Genetics', conditions: ['Cancer', 'Cardio'] },\n { name: 'Baylor', value: 'Baylor', conditions: ['Cardio'] },\n { name: 'Color Genomics', value: 'Color Genomics', conditions: ['Cancer', 'Cardio'] },\n { name: 'Correlagen Diagnostics', value: 'Correlagen Diagnostics', conditions:['Cardio'] },\n { name: 'Counsyl', value: 'Counsyl', conditions: ['Cancer'] },\n { name: 'GeneDX', value: 'GeneDX', conditions: ['Cancer', 'Cardio'] },\n { name: 'Invitae', value: 'Invitae', conditions: ['Cancer', 'Cardio'] },\n { name: 'LabCorp', value: 'LabCorp', conditions: ['Cancer', 'Cardio'] },\n { name: 'Mayo Clinic', value: 'Mayo Clinic', conditions: ['Cardio'] },\n { name: 'Myriad', value: 'Myriad', conditions: ['Cancer'] },\n { name: 'Prevention Genetics', value: 'Prevention Genetics', conditions: ['Cardio'] },\n ]\n\n /**\n * @ngdoc constant\n * @const geneticLabsByCondition\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a dictionary of lists of the list of labs for each health condition.\n * The key is the condition.\n *\n * @returns {object}\n */\n module.constant('geneticLabsByCondition', (function() {\n const result = {}\n for (let k = 0; k < geneticLabOptions.length; k++) {\n const lab = geneticLabOptions[k]\n for (let j = 0; j < lab.conditions.length; j++) {\n const condition = lab.conditions[j]\n result[condition] = result[condition] || []\n result[condition].push(lab)\n }\n }\n return result\n })())\n\n /**\n * @ngdoc constant\n * @const kidneyOrLiverProblemOptions\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns a list of options for the liver and kidney question in health history\n *\n * @returns [{object}]\n */\n module.constant('kidneyOrLiverProblemOptions', [\n {fieldName: 'had_recent_kidney_failure', name: 'hadRecentKidneyFailure', label: 'Kidney failure in the last 6 weeks'},\n {fieldName: 'had_recent_kidney_infection', name: 'hadRecentKidneyInfection', label: 'Kidney infection in the last 6 weeks'},\n {fieldName: 'had_kidney_stones', name: 'hadKidneyStones', label: 'Kidney stones'},\n {fieldName: 'had_kidney_dialysis', name: 'hadKidneyDialysis', label: 'Kidney dialysis'},\n {fieldName: 'had_polycystic_kidneys', name: 'hadPolycysticKidneys', label: 'Polycystic kidneys'},\n {fieldName: 'had_liver_cirrhosis', name: 'hadLiverCirrhosis', label: 'Liver cirrhosis'},\n {fieldName: 'had_recent_liver_failure', name: 'hadRecentLiverFailure', label: 'Liver failure in the last 6 weeks'},\n {fieldName: 'had_eclampsia', name: 'hadEclampsia', label: 'Eclampsia/pre-eclampsia (pregnancy-related hypertension which can result in liver or kidney damage)'},\n {fieldName: 'had_lupus_nephritis', name: 'hadLupusNephritis', label: 'Lupus nephritis'},\n {fieldName: 'had_hiv_infection', name: 'hadHIVInfection', label: 'HIV infection (kidney and liver disease may be complications)'},\n {fieldName: 'had_unknown_kidney_or_liver_problem', name: 'hadUnknownKidneyOrLiverProblem', label: 'I\\'m not sure'},\n ])\n\n /**\n * @ngdoc constant\n * @const genderIdentities\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns an object containing the gender identity options.\n *\n * @returns {object}\n */\n module.constant('genderIdentities', {\n FEMALE: 'F',\n MALE: 'M',\n NON_BINARY: 'non-binary',\n SELF_DESCRIBED: 'self-described',\n PREFER_NOT_TO_RESPOND: 'prefer not to respond'\n })\n\n /**\n * @ngdoc constant\n * @const organizationRelationship\n * @static\n * @memberof clrConstant\n *\n * @description\n * Returns an object containing the organization relationship options.\n *\n * @returns {object}\n */\n module.constant('organizationRelationship', {\n EMPLOYEE: 'employee',\n HEALTH_INSURANCE_BENEFICIARY: 'health_insurance_beneficiary',\n NON_HEALTH_INSURANCE_BENEFICIARY: 'non_health_insurance_beneficiary',\n EMPLOYEE_RELATIONSHIPS: ['employee', 'health_insurance_beneficiary', 'non_health_insurance_beneficiary']\n })\n\n /**\n * @ngdoc constant\n * @const detailedCovidSampleTypes\n * @static\n * @memberof clrConstant\n *\n * @description\n * Mapping of sample type to external name.\n *\n * @returns {object}\n */\n module.constant('detailedCovidSampleTypes', {\n covid_anterior_nares_swab: 'Covid Anterior Nares Swab',\n covid_dry_anterior_nares_swab: 'Covid Dry Anterior Nares Swab',\n covid_nasopharyngeal_swab: 'Covid Nasopharyngeal Swab',\n covid_oropharyngeal_swab: 'Covid Oropharyngeal Swab',\n })\n}();\n","// *** DO NOT EDIT THIS OBJECT MANUALLY ***\n// It is generated in Python using geographical_area.generate().\n//\n// To re-generate, edit django_apps.users.geographical_area, then run:\n//\n// $ python -m django_apps.users.geographical_area\n//\n// `shared_js` has no mechanism for testing. Until it is moved to a managed workspace, we test via\n// the applications that use this code.\n// See:\n// `$COLOR_ROOT/src/projects/home/frontend/src/lib/util/geoConstants/utils.test.ts`\n// `$COLOR_ROOT/src/django_apps/core/tests/js/geo_constants_spec.js\n// FIXME: When this moves into a yarn workspace, move the unit tests there.\n//\n\n!function() {\n 'use strict'\n\n const module = angular.module('clrGeographical', [])\n\n function getField(list, index, def) {\n if (list == undefined) return def\n if (list[index] == undefined) return def\n return list[index]\n }\n\n function sort_countries($filter, country_list) {\n country_list.sort(function (a, b) {\n return $filter('name')(a).localeCompare($filter('name')(b))\n })\n return country_list\n }\n\n const defaultAddressFieldOrder = [[\"city\"],[\"state\",\"postalCode\"]]\n\n const defaultAddressOptionalFields = [\"state\",\"postalCode\"]\n\n module\n .filter(\"name\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 0, null)\n }\n })\n\n .filter(\"phonePrefix\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 1, null)\n }\n })\n\n .filter(\"phoneMask\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 2, null)\n }\n })\n\n .filter(\"daysToDeliver\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 3, null)\n }\n })\n\n .filter(\"shippingChargeCents\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 4, null)\n }\n })\n\n .filter(\"ourGovtOk\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 5, true)\n }\n })\n\n .filter(\"theirGovtOk\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 6, true)\n }\n })\n\n .filter(\"carrierOk\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 7, true)\n }\n })\n\n .filter(\"cityMaxlen\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 8, 80)\n }\n })\n\n .filter(\"cityLabel\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 9, \"City, Town, or Settlement\")\n }\n })\n\n .filter(\"cityWidth\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 10, 100)\n }\n })\n\n .filter(\"stateMaxlen\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 11, 50)\n }\n })\n\n .filter(\"stateLabel\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 12, \"State, Province, or Region\")\n }\n })\n\n .filter(\"stateWidth\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 13, 60)\n }\n })\n\n .filter(\"postalCodeMaxlen\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 14, 10)\n }\n })\n\n .filter(\"postalCodeLabel\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 15, \"Postal Code\")\n }\n })\n\n .filter(\"postalCodeWidth\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 16, 40)\n }\n })\n\n .filter(\"postalCodeMask\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 17, null)\n }\n })\n\n .filter(\"addressFieldOrder\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 18, defaultAddressFieldOrder)\n }\n })\n\n .filter(\"addressOptionalFields\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 19, defaultAddressOptionalFields)\n }\n })\n\n .filter(\"flagFilename\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 20, countryCode + \".png\")\n }\n })\n\n .filter(\"outboundShipperName\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 21, \"DHL\")\n }\n })\n\n .filter(\"outboundServiceName\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 22, \"Express Worldwide\")\n }\n })\n\n .filter(\"deliveredDutyPaid\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 23, false)\n }\n })\n\n .filter(\"taxIdMaxlen\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 24, null)\n }\n })\n\n .filter(\"taxIdLabel\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 25, null)\n }\n })\n\n .filter(\"taxIdWidth\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 26, null)\n }\n })\n\n .filter(\"taxIdMask\", function(geographicalArea) {\n return function(countryCode) {\n return getField(geographicalArea[countryCode], 27, null)\n }\n })\n\n .filter('fieldWidth', function($filter) {\n return function(countryCode, field) {\n if (field == 'city') return $filter('cityWidth')(countryCode)\n if (field == 'state') return $filter('stateWidth')(countryCode)\n if (field == 'postalCode') return $filter('postalCodeWidth')(countryCode)\n if (field == 'taxId') return $filter('taxIdWidth')(countryCode)\n }\n })\n\n .filter('shippable', function ($filter) {\n return function (countryCode) {\n return $filter('ourGovtOk')(countryCode)\n && $filter('theirGovtOk')(countryCode)\n && $filter('carrierOk')(countryCode)\n }\n })\n\n .filter('hasAddressField', function ($filter) {\n return function (countryCode, fieldName) {\n const fieldOrder = $filter('addressFieldOrder')(countryCode)\n // fieldOrder is a nested array of the address fields for this country, so\n // we need to flatten them.\n const flattenedFields = [].concat.apply([], fieldOrder)\n return flattenedFields.indexOf(fieldName) != -1\n }\n })\n\n .filter('isRequiredField', function ($filter) {\n return function (countryCode, fieldName) {\n const optionalFields = $filter('addressOptionalFields')(countryCode)\n return optionalFields.indexOf(fieldName) == -1\n }\n })\n\n // returns list of countries that are mailable to\n .factory('allCountries', function ($filter, geographicalArea) {\n const allCountries = []\n angular.forEach(Object.keys(geographicalArea), function (countryCode) {\n if ($filter('ourGovtOk')(countryCode) && $filter('carrierOk')(countryCode)) {\n allCountries.push(countryCode)\n }\n })\n return sort_countries($filter, allCountries)\n })\n\n // returns every country in the world\n .factory('entireCountryList', function ($filter, geographicalArea) {\n const entireCountryList = []\n angular.forEach(Object.keys(geographicalArea), function (countryCode) {\n entireCountryList.push(countryCode)\n })\n return sort_countries($filter, entireCountryList)\n })\n\n .factory('phoneCountries', function ($filter, geographicalArea) {\n const phoneCountries = []\n angular.forEach(Object.keys(geographicalArea), function (countryCode) {\n if ($filter('phonePrefix')(countryCode) != null) {\n phoneCountries.push(countryCode)\n }\n })\n return sort_countries($filter, phoneCountries)\n })\n\n /**\n * @ngdoc constant\n * @const geographicalArea\n * @static\n * @memberof clrGeographical\n *\n * @description\n * Returns a list of geographical area.\n *\n * @returns {list}\n */\n .constant('geographicalArea', {\n AF: [\"Afghanistan\",\"+93\",,\"6\",10900],\n AL: [\"Albania\",\"+355\",,\"9\",10900],\n DZ: [\"Algeria\",\"+213\",,\"11\",12200],\n AS: [\"American Samoa\",\"+1\",,\"6\",11600,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\"],\n AD: [\"Andorra\",\"+376\",,\"5\",6900],\n AO: [\"Angola\",\"+244\",,\"6\",12200],\n AI: [\"Anguilla\",\"+1\",,\"5\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n AQ: [\"Antarctica\",,,,,,,false],\n AG: [\"Antigua and Barbuda\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n AR: [\"Argentina\",\"+54\",,\"4\",8100],\n AM: [\"Armenia\",\"+374\",,\"6\",9000],\n AW: [\"Aruba\",\"+297\",,\"4\",6600,,,,,,,,,,,,,,,,\"NL.png\"],\n AU: [\"Australia\",\"+61\",,\"12\",7900,,,,,\"Suburb\",45,3,\"State Code\",30,6,\"Postcode\",25,,[[\"city\",\"state\",\"postalCode\"]],[]],\n AT: [\"Austria\",\"+43\",,\"4\",9300],\n AZ: [\"Azerbaijan\",\"+994\",,\"6\",10700],\n BS: [\"Bahamas\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n BH: [\"Bahrain\",\"+973\",,\"5\",9800],\n BD: [\"Bangladesh\",\"+880\",,\"6\",7900],\n BB: [\"Barbados\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n BY: [\"Belarus\",\"+375\",,\"7\",10700,false],\n BE: [\"Belgium\",\"+32\",,\"4\",8200],\n BZ: [\"Belize\",\"+501\",,\"4\",8100],\n BJ: [\"Benin\",\"+229\",,\"5\",12200],\n BM: [\"Bermuda\",\"+1\",,\"4\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n BT: [\"Bhutan\",\"+975\",,\"10\",9500],\n BO: [\"Bolivia\",\"+591\",,\"5\",8100],\n BQ: [\"Bonaire, Sint Eustatius, and Saba\",\"+599\",,\"4\",6600,,,false,,,,,,,,,,,,,\"NL.png\"],\n BA: [\"Bosnia and Herzegovina\",\"+387\",,\"5\",10900],\n BW: [\"Botswana\",\"+267\",,\"5\",12200],\n BV: [\"Bouvet Island\",,,\"4\",9300,,,false,,,,,,,,,,,,,\"NO.png\"],\n BR: [\"Brazil\",\"+55\",,\"5\",8100,,,,,\"City\",80,2,\"State\",20,9,,100,\"99999-999\",[[\"city\",\"state\"],[\"postalCode\"],[\"taxId\"]],[],,,,true,18,\"Tax ID number (CPF)\",100,\"999.999.999-99\"],\n IO: [\"British Indian Ocean Territory\",\"+246\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n BN: [\"Brunei Darussalam\",\"+673\",,\"5\",10200],\n BG: [\"Bulgaria\",\"+359\",,\"4\",10900],\n BF: [\"Burkina Faso\",\"+226\",,\"5\",12200],\n BI: [\"Burundi\",\"+257\",,\"6\",11400,false],\n CV: [\"Cabo Verde\",\"+238\",,\"7\",11400],\n KH: [\"Cambodia\",\"+855\",,\"7\",10200],\n CM: [\"Cameroon\",\"+237\",,\"5\",12200],\n CA: [\"Canada\",\"+1\",\"(999) 999-9999\",\"3\",6800,,,,,\"City\",45,2,\"Province\",25,,,30,\"A9A 9A9\",[[\"city\",\"state\",\"postalCode\"]],[],,,,true],\n KY: [\"Cayman Islands\",\"+1\",,\"3\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n CF: [\"Central African Republic\",\"+236\",,\"7\",11400,false],\n TD: [\"Chad\",\"+235\",,\"7\",11400],\n CL: [\"Chile\",\"+56\",,\"4\",8100],\n CN: [\"China\",\"+86\",,\"5\",5500,,false],\n CX: [\"Christmas Island\",\"+61\",,,,,,false],\n CC: [\"Cocos (Keeling) Islands\",\"+61\",,,,,,false],\n CO: [\"Colombia\",\"+57\",,\"4\",8100],\n KM: [\"Comoros\",\"+269\",,\"6\",11400],\n CG: [\"Congo\",\"+242\",,\"6\",12200],\n CD: [\"Congo (DRC)\",\"+243\",,\"6\",11400,false],\n CK: [\"Cook Islands\",\"+682\",,\"6\",9500,,,,,\"Island\",70,,,0,4,\"Postcode\",30,,[[\"city\",\"postalCode\"]],[],\"NZ.png\"],\n CR: [\"Costa Rica\",\"+506\",,\"4\",8100],\n HR: [\"Croatia\",\"+385\",,\"4\",10900],\n CU: [\"Cuba\",\"+53\",,,,false,,false],\n CW: [\"Curaçao\",\"+599\",,\"4\",8200,,,false,,,,,,,,,,,,,\"NL.png\"],\n CY: [\"Cyprus\",\"+357\",,\"6\",9300],\n CZ: [\"Czechia\",\"+420\",,\"4\",10900],\n CI: [\"Côte d'Ivoire\",\"+225\",,\"6\",11400,false],\n DK: [\"Denmark\",\"+45\",,\"4\",9300],\n DJ: [\"Djibouti\",\"+253\",,\"6\",11400],\n DM: [\"Dominica\",\"+1\",\"(999) 999-9999\",\"6\",6600],\n DO: [\"Dominican Republic\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n EC: [\"Ecuador\",\"+593\",,\"4\",8100],\n EG: [\"Egypt\",\"+20\",,\"5\",8100],\n SV: [\"El Salvador\",\"+503\",,\"4\",8100],\n GQ: [\"Equatorial Guinea\",\"+240\",,\"7\",11400],\n ER: [\"Eritrea\",\"+291\",,\"6\",11400],\n EE: [\"Estonia\",\"+372\",,\"4\",10900],\n SZ: [\"Eswatini\",\"+268\",,\"6\",9300],\n ET: [\"Ethiopia\",\"+251\",,\"5\",11400],\n FK: [\"Falkland Islands (Malvinas)\",\"+500\",,\"7\",7200,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n FO: [\"Faroe Islands\",\"+298\",,\"7\",6900,,,,,,,,,,,,,,,,\"DK.png\"],\n FJ: [\"Fiji\",\"+679\",,\"7\",10200],\n FI: [\"Finland\",\"+358\",,\"4\",9300,,,,,\"Settlement\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[]],\n FR: [\"France\",\"+33\",,\"4\",6100,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[]],\n GF: [\"French Guiana\",\"+594\",,\"6\",7200,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n PF: [\"French Polynesia\",\"+689\",,\"4\",10200,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n TF: [\"French Southern Territories\",,,\"4\",6100,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n GA: [\"Gabon\",\"+241\",,\"5\",12200],\n GM: [\"Gambia\",\"+220\",,\"6\",12200],\n GE: [\"Georgia\",\"+995\",,\"8\",10700],\n DE: [\"Germany\",\"+49\",,\"4\",8200,,false,,,\"Settlement\",80,,,0,5,,20,,[[\"postalCode\",\"city\"]],[]],\n GH: [\"Ghana\",\"+233\",,\"6\",12200],\n GI: [\"Gibraltar\",\"+350\",,\"5\",6900,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n GR: [\"Greece\",\"+30\",,\"4\",9300],\n GL: [\"Greenland\",\"+299\",,\"8\",6900,,,,,,,,,,,,,,,,\"DK.png\"],\n GD: [\"Grenada\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n GP: [\"Guadeloupe\",\"+590\",,\"4\",6300,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n GU: [\"Guam\",\"+1\",,\"4\",9200,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\"],\n GT: [\"Guatemala\",\"+502\",,\"4\",8100],\n GG: [\"Guernsey\",\"+44\",,\"5\",6900,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n GN: [\"Guinea\",\"+224\",,\"6\",12200],\n GW: [\"Guinea Bissau\",\"+245\",,\"6\",11400],\n GY: [\"Guyana\",\"+592\",,\"6\",8100],\n HT: [\"Haiti\",\"+509\",,\"4\",6600],\n HM: [\"Heard Island and McDonald Islands\",,,\"12\",7900,,,false,,\"Suburb\",45,3,\"State Code\",30,6,\"Postcode\",25,,[[\"city\",\"state\",\"postalCode\"]],[],\"AU.png\"],\n VA: [\"Holy See (Vatican City State)\",\"+379\",,\"4\",6100,,,false],\n HN: [\"Honduras\",\"+504\",,\"4\",8100],\n HK: [\"Hong Kong\",\"+852\",,\"4\",7100,,,,,\"Village, Town, or District\",,15,\"Part of Hong Kong\",40,,,0,,[[\"city\"],[\"state\"]],[]],\n HU: [\"Hungary\",\"+36\",,\"4\",10900],\n IS: [\"Iceland\",\"+354\",,\"4\",9300],\n IN: [\"India\",\"+91\",,\"5\",5800,,false],\n ID: [\"Indonesia\",\"+62\",,\"5\",7900],\n IR: [\"Iran\",\"+98\",,,,false,,false],\n IQ: [\"Iraq\",\"+964\",,\"5\",9000,false],\n IE: [\"Ireland\",\"+353\",,\"4\",8200,,,,,\"Postal Town\",,,,0,8,,30,,[[\"city\"],[\"postalCode\"]],[]],\n IM: [\"Isle of Man\",\"+44\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n IL: [\"Israel\",\"+972\",,\"4\",9800,,,,,\"City\",70,,,0,7,,30,,[[\"postalCode\",\"city\"]],[]],\n IT: [\"Italy\",\"+39\",,\"4\",8200,,,,,\"Town\",45,2,\"Province\",25,5,,30,,[[\"postalCode\",\"city\",\"state\"]],[]],\n JM: [\"Jamaica\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n JP: [\"Japan\",\"+81\",,\"4\",8300],\n JE: [\"Jersey\",\"+44\",,\"5\",6900,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n JO: [\"Jordan\",\"+962\",,\"6\",9800],\n KZ: [\"Kazakhstan\",\"+7\",,\"6\",10900],\n KE: [\"Kenya\",\"+254\",,\"5\",11400],\n KI: [\"Kiribati\",\"+686\",,\"8\",10200],\n XK: [\"Kosovo\",\"+383\",,,,,,false],\n KW: [\"Kuwait\",\"+965\",,\"6\",9800],\n KG: [\"Kyrgyzstan\",\"+996\",,\"7\",10700],\n LA: [\"Laos\",\"+856\",,\"7\",10200],\n LV: [\"Latvia\",\"+371\",,\"4\",10900],\n LB: [\"Lebanon\",\"+961\",,\"5\",9000,false],\n LS: [\"Lesotho\",\"+266\",,\"5\",11400],\n LR: [\"Liberia\",\"+231\",,\"6\",12200],\n LY: [\"Libya\",\"+218\",,\"7\",11400,false],\n LI: [\"Liechtenstein\",\"+423\",,\"5\",6900],\n LT: [\"Lithuania\",\"+370\",,\"5\",10900],\n LU: [\"Luxembourg\",\"+352\",,\"4\",8200],\n MO: [\"Macau\",\"+853\",,\"5\",5800,,false,,,,,,,,,,,,,,\"CN.png\"],\n MG: [\"Madagascar\",\"+261\",,\"6\",12200],\n MW: [\"Malawi\",\"+265\",,\"6\",12200],\n MY: [\"Malaysia\",\"+60\",,\"5\",7900],\n MV: [\"Maldives\",\"+960\",,\"7\",10200],\n ML: [\"Mali\",\"+223\",,\"5\",12200],\n MT: [\"Malta\",\"+356\",,\"5\",9300],\n MH: [\"Marshall Islands\",\"+692\",,,,,,false],\n MQ: [\"Martinique\",\"+596\",,\"4\",6300,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n MR: [\"Mauritania\",\"+222\",,\"6\",11400],\n MU: [\"Mauritius\",\"+230\",,\"5\",12200],\n YT: [\"Mayotte\",\"+262\",,\"4\",11400,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n MX: [\"Mexico\",\"+52\",,\"4\",4500,,,,,\"Settlement\",50,5,\"State\",20,5,,30,\"99999\",[[\"postalCode\",\"city\",\"state\"]],[]],\n FM: [\"Micronesia\",\"+691\",,,,,,false],\n MD: [\"Moldova\",\"+373\",,\"6\",10700],\n MC: [\"Monaco\",\"+377\",,\"5\",6100],\n MN: [\"Mongolia\",\"+976\",,\"9\",10200],\n ME: [\"Montenegro\",\"+382\",,\"6\",10900],\n MS: [\"Montserrat\",\"+1\",,\"5\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n MA: [\"Morocco\",\"+212\",,\"4\",12200],\n MZ: [\"Mozambique\",\"+258\",,\"6\",12200],\n MM: [\"Myanmar\",\"+95\",,,,false,,false],\n NA: [\"Namibia\",\"+264\",,\"5\",12200],\n NR: [\"Nauru\",\"+674\",,\"7\",10200],\n NP: [\"Nepal\",\"+977\",,\"7\",10200],\n NL: [\"Netherlands\",\"+31\",,\"4\",8200],\n NC: [\"New Caledonia\",\"+687\",,\"7\",9500,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n NZ: [\"New Zealand\",\"+64\",,\"5\",7900,,,,,\"Settlement\",70,,,0,4,\"Postcode\",30,,[[\"city\",\"postalCode\"]],[]],\n NI: [\"Nicaragua\",\"+505\",,\"4\",8100],\n NE: [\"Niger\",\"+227\",,\"7\",11400],\n NG: [\"Nigeria\",\"+234\",,\"5\",12200],\n NU: [\"Niue\",\"+683\",,\"7\",10200,,,,,\"Settlement\",70,,,0,4,\"Postcode\",30,,[[\"city\",\"postalCode\"]],[],\"NZ.png\"],\n NF: [\"Norfolk Island\",\"+672\",,\"12\",7900,,,false,,\"Suburb\",45,3,\"State Code\",30,6,\"Postcode\",25,,[[\"city\",\"state\",\"postalCode\"]],[],\"AU.png\"],\n KP: [\"North Korea\",\"+850\",,,,false,,false],\n MK: [\"North Macedonia\",\"+389\",,\"5\",7900],\n MP: [\"Northern Mariana Islands\",\"+1\",,\"2-6\",995,,,false,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\",\"USPS\",\"First-class Mail\"],\n NO: [\"Norway\",\"+47\",,\"4\",9300],\n OM: [\"Oman\",\"+968\",,\"5\",9800],\n PK: [\"Pakistan\",\"+92\",,\"6\",9800],\n PW: [\"Palau\",\"+680\",,,,,,false],\n PS: [\"Palestine\",\"+970\",,,,,,false],\n PA: [\"Panama\",\"+507\",,\"4\",8100],\n PG: [\"Papua New Guinea\",\"+675\",,\"7\",10200],\n PY: [\"Paraguay\",\"+595\",,\"5\",8100],\n PE: [\"Peru\",\"+51\",,\"5\",8100],\n PH: [\"Philippines\",\"+63\",,\"5\",7900],\n PN: [\"Pitcairn\",\"+64\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n PL: [\"Poland\",\"+48\",,\"4\",10900],\n PT: [\"Portugal\",\"+351\",,\"4\",8200],\n PR: [\"Puerto Rico\",\"+1\",,\"2-6\",995,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\",\"USPS\",\"First-class Mail\"],\n QA: [\"Qatar\",\"+974\",,\"5\",9800],\n RO: [\"Romania\",\"+40\",,\"5\",10900],\n RU: [\"Russian Federation\",\"+7\",,\"6\",10700,,false],\n RW: [\"Rwanda\",\"+250\",,\"5\",11400],\n RE: [\"Réunion\",\"+262\",,\"4\",11400,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n BL: [\"Saint Barthélemy\",\"+590\",,\"4\",6600,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n SH: [\"Saint Helena, Ascension and Tristan da Cunha\",\"+290\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n KN: [\"Saint Kitts and Nevis\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n LC: [\"Saint Lucia\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n MF: [\"Saint Martin (French part)\",\"+590\",,\"4\",6100,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n PM: [\"Saint Pierre and Miquelon\",\"+508\",,\"4\",6100,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n VC: [\"Saint Vincent and the Grenadines\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n WS: [\"Samoa\",\"+685\",,\"6\",10200],\n SM: [\"San Marino\",\"+378\",,\"5\",6100],\n ST: [\"Sao Tome and Principe\",\"+239\",,\"8\",11400],\n SA: [\"Saudi Arabia\",\"+966\",,\"4\",9000],\n SN: [\"Senegal\",\"+221\",,\"5\",12200],\n RS: [\"Serbia\",\"+381\",,\"4\",10900],\n SC: [\"Seychelles\",\"+248\",,\"4\",12200],\n SL: [\"Sierra Leone\",\"+232\",,\"6\",11400],\n SG: [\"Singapore\",\"+65\",,\"5\",7100,,,,,\"City\",70,,,0,6,,30,,[[\"city\",\"postalCode\"]],[]],\n SX: [\"Sint Maarten (Dutch part)\",\"+1\",\"(999) 999-9999\",\"4\",6600,,,false,,,,,,,,,,,,,\"NL.png\"],\n SK: [\"Slovakia\",\"+421\",,\"4\",10900],\n SI: [\"Slovenia\",\"+386\",,\"4\",10900],\n SB: [\"Solomon Islands\",\"+677\",,\"6\",10200],\n SO: [\"Somalia\",\"+252\",,,,false,,false],\n ZA: [\"South Africa\",\"+27\",,\"5\",12200],\n GS: [\"South Georgia and the South Sandwich Islands\",\"+500\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n KR: [\"South Korea\",\"+82\",,\"8\",7800,,false],\n SS: [\"South Sudan\",\"+211\",,,,false,,false],\n ES: [\"Spain\",\"+34\",,\"4\",8200,,,,,\"Town\",40,30,\"Province\",30,5,,30,,[[\"postalCode\",\"city\",\"state\"]],[\"state\"]],\n LK: [\"Sri Lanka\",\"+94\",,\"5\",7900],\n SD: [\"Sudan\",\"+249\",,,,false,,false],\n SR: [\"Suriname\",\"+597\",,\"7\",8100],\n SJ: [\"Svalbard and Jan Mayen\",\"+47\",,\"4\",9300,,,false,,,,,,,,,,,,,\"NO.png\"],\n SE: [\"Sweden\",\"+46\",,\"4\",9300],\n CH: [\"Switzerland\",\"+41\",,\"4\",9300],\n SY: [\"Syria\",\"+963\",,,,false,,false],\n TW: [\"Taiwan\",\"+886\",,\"4\",7100],\n TJ: [\"Tajikistan\",\"+992\",,\"7\",10700],\n TZ: [\"Tanzania\",\"+255\",,\"5\",12200],\n TH: [\"Thailand\",\"+66\",,\"5\",7900],\n TL: [\"Timor-Leste\",\"+670\",,\"10\",9500],\n TG: [\"Togo\",\"+228\",,\"5\",12200],\n TK: [\"Tokelau\",\"+690\",,\"5\",7900,,,false,,\"Settlement\",70,,,0,4,\"Postcode\",30,,[[\"city\",\"postalCode\"]],[],\"NZ.png\"],\n TO: [\"Tonga\",\"+676\",,\"7\",10200],\n TT: [\"Trinidad and Tobago\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n TN: [\"Tunisia\",\"+216\",,\"6\",11400],\n TM: [\"Turkmenistan\",\"+993\",,,,,,false],\n TC: [\"Turks and Caicos Islands\",\"+1\",,\"4\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n TV: [\"Tuvalu\",\"+688\",,\"7\",10200],\n TR: [\"Türkiye\",\"+90\",,\"4\",9800],\n UG: [\"Uganda\",\"+256\",,\"5\",12200],\n UA: [\"Ukraine\",\"+380\",,\"6\",10900],\n AE: [\"United Arab Emirates\",\"+971\",,\"4\",9800],\n GB: [\"United Kingdom\",\"+44\",,\"4\",9900,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[]],\n US: [\"United States\",\"+1\",\"(999) 999-9999\",\"2-6\",995,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],,\"USPS\",\"First-class Mail\"],\n UM: [\"United States Minor Outlying Islands\",,,\"2-6\",995,,,false,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\",\"USPS\",\"First-class Mail\"],\n UY: [\"Uruguay\",\"+598\",,\"5\",8100],\n UZ: [\"Uzbekistan\",\"+998\",,\"7\",10700],\n VU: [\"Vanuatu\",\"+678\",,\"6\",9500],\n VE: [\"Venezuela\",\"+58\",,\"4\",7200,false],\n VN: [\"Viet Nam\",\"+84\",,\"5\",7900],\n VG: [\"Virgin Islands, British\",\"+1\",,\"4\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n VI: [\"Virgin Islands, U.S.\",\"+1\",,\"2-6\",995,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\",\"USPS\",\"First-class Mail\"],\n WF: [\"Wallis and Futuna\",\"+681\",,\"4\",6100,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n EH: [\"Western Sahara\",,,,,,,false],\n YE: [\"Yemen\",\"+967\",,\"6\",9000,false],\n ZM: [\"Zambia\",\"+260\",,\"6\",12200],\n ZW: [\"Zimbabwe\",\"+263\",,\"5\",11400,false],\n AX: [\"Åland Islands\",\"+358\",,\"4\",9300,,,false,,\"Settlement\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FI.png\"]\n })\n}()\n","const getAbsolutePath = require('src/django_apps/core/static/js/absolute_path');\n\n!function() {\n\n 'use strict'\n\n const colorApp = angular.module('colorApp')\n\n colorApp.controller('NavigationController', function(\n $scope,\n $window,\n $location,\n auth,\n navigation,\n redirect,\n permissionTypes,\n waffle,\n ) {\n\n // Check whether or not this webview is located inside a Clinical iframe, if so disable the nav from showing\n $scope.isInClinicalIframe = $window.frameElement && $window.frameElement.nodeName == \"IFRAME\" && $window.frameElement.getAttribute('class') == 'clinical-report-iframe';\n\n $scope.navigation = navigation\n $scope.auth = auth\n $scope.location = $location\n $scope.locationHost = escape($window.location.protocol + '//' + $window.location.host)\n\n $scope.$watchCollection('auth.currentUser', function() {\n if ($scope.auth.isLoggedIn) {\n $scope.name = $scope.auth.currentUser.first_name ? $scope.auth.currentUser.first_name + ' ' + $scope.auth.currentUser.last_name : $scope.auth.currentUser.email\n } else {\n $scope.name = ''\n }\n })\n\n $scope.showSubNav = false\n $scope.toggleSubNav = function(subNavName) {\n const isSubNavChanged = $scope.subNavName != subNavName\n $scope.subNavName = subNavName\n if (!$scope.showSubNav || !isSubNavChanged) {\n $scope.showSubNav = !$scope.showSubNav\n }\n }\n\n $scope.showCollapsedNav = false\n $scope.toggleCollapsedNav = function() {\n if ($scope.showCollapsedNav) {\n $scope.showSubnav = false\n }\n $scope.showCollapsedNav = !$scope.showCollapsedNav\n }\n\n $scope.closeAllSubNav = function() {\n $scope.showSubNav = false\n }\n\n let subNavElement\n angular.element($window).on('click', function(e) {\n subNavElement = angular.element('.sub-nav.js--active')\n if (subNavElement.length) {\n $scope.closeAllSubNav()\n }\n })\n\n // I can't $el.bind('click', ...) because navigation isn't a directive,\n // this mimics $(document).click() and $(.navbar).click() to close opened nav states\n $scope.collapseAllNav = function() {\n $scope.showSubNav = false\n $scope.showCollapsedNav = false\n }\n\n $scope.logout = function() {\n $window.$('.body-wrapper, .footer').addClass('u--force-hide')\n auth.logout()\n .then(function() {\n $window.location.href = '/react/sign-in'\n })\n .catch(function() {\n $window.$('.body-wrapper, .footer').removeClass('u--force-hide')\n })\n }\n\n $scope.openHomeDashboard = function() {\n $scope.collapseAllNav()\n redirect('/react/dashboard')\n }\n\n $scope.openProviderPortal = function() {\n $scope.collapseAllNav()\n redirect('/')\n }\n\n $scope.changePath = function(path) {\n $location.path(path)\n $scope.collapseAllNav()\n }\n\n $scope.goToInstitution = function() {\n $window.location.assign('/providers/institution')\n }\n\n $scope.goToConfigurator = function() {\n $window.location.assign('/configurator')\n }\n\n $scope.permissionTypes = permissionTypes\n\n // NOTE(color-thenriod): If you change this code, you probably need to change the same code in\n // src/django_apps/results/static/js/results/controllers/covid_report_list_controller.js\n // ifchange\n $scope.covidReportRetractionPageEnabled = !!(waffle.SWITCHES && waffle.SWITCHES['clinical-covid-report-retraction-2022-08'])\n // Why not just use the `href` attribute of an `` you ask? In short, because it won't work.\n // I don't have the full explanation, but if you are in Angular-land, and you use an in the\n // normal way to link to a page in React-land, you will end up on a blank page in Angular land\n // and you will have to manually refresh the page (which will have the correct url in the url\n // bar - so that's nice I guess). Forcing the redirection with a click handler that forcibly\n // updates the window location will cause a page reload that will actually put you in\n // React-land.\n $scope.goToCovidReportRetractionPage = function() {\n $window.location.assign('/covid_reports/retract')\n }\n // endifchange\n\n // NOTE(anuliksh): If you change this code, you probably need to change the same code in\n // src/django_apps/results/static/js/results/controllers/covid_report_list_controller.js\n // ifchange\n $scope.medicalGeneticistReviewPageEnabled = !!(waffle.SWITCHES && waffle.SWITCHES['clinical-mg-signout-2022-09'])\n // Why not just use the `href` attribute of an `` you ask? In short, because it won't work.\n // I don't have the full explanation, but if you are in Angular-land, and you use an in the\n // normal way to link to a page in React-land, you will end up on a blank page in Angular land\n // and you will have to manually refresh the page (which will have the correct url in the url\n // bar - so that's nice I guess). Forcing the redirection with a click handler that forcibly\n // updates the window location will cause a page reload that will actually put you in\n // React-land.\n $scope.goToMedicalGeneticistReviewPage = function() {\n $window.location.assign('/results/genetics/signout')\n }\n // endifchange\n })\n\n colorApp.controller('NavigationLayoutController', function($scope, navigation) {\n $scope.navigation = navigation\n $scope.getAbsolutePath = getAbsolutePath\n })\n\n colorApp.controller('Display500PageController', function($rootScope) {\n const serverErrorTemplate = $('#serverErrorTemplate')\n const contentTemplate = $('#content')\n $rootScope.$on('error:InternalServerError', function() {\n serverErrorTemplate.css('display', 'block')\n contentTemplate.css('display', 'none')\n })\n $rootScope.$on('$locationChangeStart', function(event, next, current) {\n serverErrorTemplate.css('display', 'none')\n contentTemplate.css('display', 'block')\n })\n })\n\n colorApp.controller('VideoScriptController', function($scope, $location, testTypes, sku) {\n\n $scope.testTypes = testTypes\n\n // Set SKU and video name\n const parts = $location.path().split('/')\n const skuName = parts[parts.length - 1]\n if (skuName == 'the-color-test') {\n $scope.sku = sku['combo 2']\n } else if (skuName == 'hereditary-high-cholesterol-test') {\n $scope.sku = sku[testTypes.fh3]\n } else if (skuName == 'hereditary-cancer-test') {\n $scope.sku = sku[testTypes.hereditary30]\n } else if (skuName == 'breast-ovarian-cancer-test') {\n $scope.sku = sku[testTypes.breastOvarian19]\n } else if (skuName == 'brca-test') {\n $scope.sku = sku[testTypes.brca12]\n } else if (skuName == 'hereditary-heart-health-test') {\n $scope.sku = sku[testTypes.cardio30]\n } else if (skuName == 'tier-1-hereditary-conditions-test') {\n $scope.sku = sku['core 10']\n }\n\n $scope.showTestType = function(testType) {\n if (!$scope.sku) {\n return false\n }\n return $scope.sku.testTypes.indexOf(testType) > -1\n }\n\n // Set references\n let references = []\n if ($scope.showTestType(testTypes.fh3)) {\n references = references.concat([292, 293, 294, 289, 287])\n }\n if ($scope.showTestType(testTypes.hereditary30)) {\n references = references.concat([27, 2 ,3, 4, 5, 162, 104, 105])\n }\n if ($scope.showTestType(testTypes.breastOvarian19)) {\n references = references.concat([27, 2 ,3, 4])\n }\n if ($scope.showTestType(testTypes.brca12)) {\n references = references.concat([27, 2 ,3, 4, 24, 5, 34])\n }\n if ($scope.showTestType(testTypes.cardio30)) {\n references = references.concat([327, 323, 324, 325])\n }\n if ($scope.showTestType(testTypes.hereditary7)) {\n references = references.concat([27, 2, 3, 4, 24, 5, 6, 104, 105])\n }\n references.push(283)\n $scope.references = references.join(',')\n\n })\n\n}();\n","/**\n * This file contains angular directives used across Color sites.\n */\n\n!function() {\n 'use strict'\n\n angular.module('coreDirectives', ['ngToast', 'clrConstant'])\n .directive('clrAccordionListItem', require('./directives/clr_accordion_list_item'))\n .directive('clrBreadcrumbs', require('./directives/clr_breadcrumbs'))\n .directive('clrBreadcrumb', require('./directives/clr_breadcrumb'))\n .directive('clrCheckbox', require('./directives/clr_checkbox'))\n .directive('clrDateInput', require('./directives/clr_date_input'))\n .directive('clrEmailSpelling', require('./directives/clr_email_spelling'))\n .directive('clrForm', require('./directives/clr_form'))\n .directive('clrFormError', require('./directives/clr_form_error'))\n .directive('clrHozChart', require('./directives/clr_hoz_chart'))\n .directive('clrHozChartLegendItem', require('./directives/clr_hoz_chart_legend_item'))\n .directive('clrHozChartRow', require('./directives/clr_hoz_chart_row'))\n .directive('clrMarked', require('./directives/clr_marked'))\n .directive('clrPdfViewer', require('./directives/clr_pdf_viewer'))\n .directive('clrRadioRow', require('./directives/clr_radio_row'))\n .directive('clrSelectOrText', require('./directives/clr_select_or_text'))\n .directive('clrSetFocus', require('./directives/clr_set_focus'))\n .directive('clrSpinnerText', require('./directives/clr_spinner_text'))\n .directive('clrTab', require('./directives/clr_tab'))\n .directive('clrTabCustom', require('./directives/clr_tab_custom'))\n .directive('clrTabSelect', require('./directives/clr_tab_select'))\n .directive('clrTabSet', require('./directives/clr_tab_set'))\n .directive('clrTabSimple', require('./directives/clr_tab_simple'))\n .directive('clrTabSimpleWaypoint', require('./directives/clr_tab_simple_waypoint'))\n .directive('clrTabUnderline', require('./directives/clr_tab_underline'))\n .directive('clrToggleOnInput', require('./directives/clr_toggle_on_input'))\n .directive('clrUploader', require('./directives/clr_uploader'))\n .directive('clrVideoBlockPlayer', require('./directives/clr_video_block_player'))\n .directive('clrVideoThumbnail', require('./directives/clr_video_thumbnail'))\n .directive('htmlCompile', require('./directives/html_compile'))\n .directive('confirmationFor', require('./directives/confirmation_for'))\n .directive('goTo', require('./directives/go_to'))\n .directive('initFocus', require('./directives/init_focus'))\n .directive('kitPriceText', require('./directives/kit_price_text'))\n .directive('popToast', require('./directives/pop_toast'))\n .directive('promoBanner', require('./directives/promo_banner'))\n .directive('impersonationBanner', require('./directives/impersonation_banner'))\n .directive('selectOnClick', require('./directives/select_on_click'))\n .directive('showErrorOnBlur', require('./directives/show_error_on_blur'))\n .directive('stopEnterSubmit', require('./directives/stop_enter_submit'))\n .directive('stopPropagationOn', require('./directives/stop_propagation_on'))\n .directive('tabBar', require('./directives/tab_bar'))\n .directive('tooltip', require('./directives/tooltip'))\n .directive('uiSelectRequired', require('./directives/ui_select_required'))\n .directive('unique', require('./directives/unique'))\n .directive('waffleIfNotSwitch', require('./directives/waffle_if_not_switch'))\n .directive('waffleIfSwitch', require('./directives/waffle_if_switch'))\n .directive('waffleIfFlag', require('./directives/waffle_if_flag'))\n .directive('popupWindow', require('./directives/popup_window'))\n .directive('track', require('./directives/track'))\n .directive('stickyTableHeaders', require('./directives/sticky_table_headers'))\n .directive('reference', require('./directives/reference'))\n .directive('referenceSup', require('./directives/reference_sup'))\n .directive('references', require('./directives/references'))\n .directive('fullReference', require('./directives/full_reference'))\n .directive('inputField', require('./directives/input_field'))\n .directive('htmlInjectionProtection', require('./directives/html_injection_protection'))\n .directive('progressBar', require('./directives/progress_bar'))\n .directive('uploadedImage', require('./directives/uploaded_image'))\n}()\n","\"use strict\"\n\n/**\n *\n *\n */\nmodule.exports = function () {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n itemTitle: '@',\n itemSubtitle: '@?',\n itemSubtitleStrikeText: '@?',\n itemSubtitleText: '@?',\n itemIcon: '@?',\n itemNumber: '@?',\n startsOpen: '=?'\n },\n transclude: true,\n templateUrl: '/directives/clr_accordion_list_item.html',\n link: function (scope) {\n scope.startsOpen = scope.startsOpen ? scope.startsOpen : false\n scope.openState = scope.startsOpen\n scope.toggle = function() {\n scope.openState = !scope.openState\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n return {\n restrict: 'E',\n scope: {\n step: '='\n },\n transclude: true,\n templateUrl: '/directives/clr_breadcrumbs.html',\n controller: function($scope) {\n 'ngInject'\n\n const listeners = []\n\n $scope.$watch('step', function(newValue) {\n angular.forEach(listeners, function(listener) {\n if (listener) {\n listener(newValue)\n }\n })\n })\n\n this.register = function(listener) {\n const i = listeners.length\n listeners.push(listener)\n listener($scope.step)\n return i\n }\n\n this.unregister = function(i) {\n listeners[i] = null\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = function($compile) {\n 'ngInject'\n\n return {\n restrict: 'E',\n require: '^clrBreadcrumbs',\n scope: {\n first: '=?',\n whenStep: '=',\n linkWhenInactive: '=?'\n },\n transclude: true,\n templateUrl: '/directives/clr_breadcrumb.html',\n link: function(scope, elem, attrs, breadcrumbsCtrl) {\n let latestStepValue\n const update = function(watchedValue, actualValue) {\n const active = watchedValue == actualValue\n scope.active = active\n elem.find('.displayed-text').toggleClass('js--active', active)\n }\n\n const registration = breadcrumbsCtrl.register(function(stepValue) {\n latestStepValue = stepValue\n update(scope.whenStep, stepValue)\n })\n\n scope.$watch('whenStep', function(watchedStepValue) {\n update(watchedStepValue, latestStepValue)\n })\n\n scope.$on('$destroy', function() {\n breadcrumbsCtrl.unregister(registration)\n })\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n require: 'ngModel',\n scope: {\n ngModel: '=',\n identifier: '@',\n name: '@',\n value: '@',\n label: '@',\n onChange: '&',\n indent: '=',\n tabindex: '@',\n ngRequired: '=',\n ngDisabled: '=',\n isChar: '=?'\n },\n templateUrl: '/checkbox.html'\n }\n}\n","'use strict'\n\nmodule.exports = function(months) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n require: ['^^form', 'ngModel'],\n scope: {\n label: '@',\n flexStyle: '@',\n validate: '=',\n onChange: '=',\n ngModel: '=',\n contextPrefix: '@?', // this gets prepended to \"Month\" input placeholder.\n displayTooltip: '@?',\n popupContent: '@?',\n },\n templateUrl: '/directives/clr_date_input.html',\n link: function(scope, elem, attr, controllers) {\n scope.showError = true\n scope.isoformat = angular.isDefined(attr.isoformat) && attr.isoformat !== 'false'\n scope.form = controllers[0]\n scope.months = months\n scope.label = scope.label || undefined\n\n // Toggle for new flex form styling, make this default once we switch over all form design\n scope.flexStyle = angular.isDefined(scope.flexStyle) ? (scope.flexStyle == \"true\" ? true : false) : false\n\n const watcher = scope.$watch('ngModel', function(ngModel) {\n scope.dateModel = (scope.ngModel && angular.isDefined(scope.ngModel.$render)) ? scope.ngModel : controllers[1]\n\n scope.dateModel.$render = function() {\n const value = scope.dateModel.$viewValue\n if (value && scope.isoformat) {\n const dateArray = value.split('-')\n if (dateArray.length == 3) {\n scope.year = dateArray[0]\n scope.month = scope.months[parseInt(dateArray[1]) -1]\n scope.day = '' + parseInt(dateArray[2])\n }\n } else if (value) {\n const dateArray = value.split('/')\n if (dateArray.length == 3) {\n scope.month = scope.months[parseInt(dateArray[0]) - 1]\n scope.day = '' + parseInt(dateArray[1])\n scope.year = '' + parseInt(dateArray[2])\n }\n }\n }\n\n watcher()\n\n scope.dateModel.$render()\n })\n\n function validate(date) {\n const cutoff = new Date(1850, 1, 1)\n const numDays = new Date(date.year, date.month, 0).getDate()\n const day = parseInt(date.day)\n if (day > numDays || day < 1) {\n return false\n }\n const b = new Date(date.year, date.month-1, day)\n return b > cutoff\n }\n\n function formatDate(date) {\n if (scope.isoformat) {\n return date.year + '-' + ('0' + date.month).slice(-2) + '-' + ('0' + date.day).slice(-2)\n }\n return date.month + '/' + parseInt(date.day) + '/' + date.year\n }\n\n function onChange(date) {\n if (date.month) {\n date.month = months.indexOf(date.month) + 1\n }\n\n let valid = validate(date)\n scope.dateModel.$setValidity('date', valid)\n\n if (angular.isDefined(scope.validate)) {\n valid = valid && scope.validate(date)\n }\n\n if (angular.isDefined(scope.onChange)) {\n scope.onChange(scope.dateModel, date)\n }\n\n scope.dateModel.$setViewValue(valid ? formatDate(date) : '')\n if (scope.form['month'].$pristine ||\n scope.form['day'].$pristine ||\n scope.form['year'].$pristine) {\n scope.dateModel.$setPristine()\n } else {\n scope.dateModel.$setDirty()\n }\n }\n\n scope.$watch(function() {\n return {\n year: scope.year,\n month: scope.month,\n day: scope.day,\n\n // Also track these because the scope variables are not updated when\n // form validators failed. If the form's showError value is false,\n // not tracking these values subtly causes the clr error message to\n // not get displayed with certain inputs\n _edit: [\n scope.form['month'].$pristine,\n scope.form['day'].$pristine,\n scope.form['year'].$pristine\n ]\n }\n }, onChange, true)\n }\n }\n}\n","\"use strict\"\n\n/*\n* Email domain spellcheck directive.\n*/\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n require: '^form',\n link: function(scope, elem, attrs, formCtrl) {\n scope.form = formCtrl\n const emailSuggestion = angular.element('')\n const emailBlurhandler = function() {\n Mailcheck.run({\n email: formCtrl.email.$viewValue,\n suggested: function(suggestion) {\n const suggestedEmailElement = angular.element('' + '@' + suggestion.domain + '')\n const suggestionClickhandler = function() {\n formCtrl.email.$setViewValue(suggestion.full)\n formCtrl.email.$render()\n emailSuggestion.empty()\n suggestedEmailElement.unbind('click', suggestionClickhandler)\n }\n suggestedEmailElement.bind('click', suggestionClickhandler)\n emailSuggestion.append(\"Did you mean \", suggestedEmailElement, \"?\")\n },\n empty: function() {\n emailSuggestion.empty()\n }\n })\n }\n const emailFocushandler = function() {\n emailSuggestion.empty()\n }\n elem.bind('blur', emailBlurhandler)\n elem.bind('focus', emailFocushandler)\n elem.after(emailSuggestion)\n scope.$on('$destroy', function() {\n elem.unbind('blur', emailBlurhandler)\n elem.unbind('focus', emailFocushandler)\n })\n }\n\n }\n}\n","\"use strict\"\n\n/**\n * Hijacks submit action of the form with a given submit handler.\n * Also it automates error handling of the form.\n */\nmodule.exports = function($window, $q, $raven, $location, ngToast) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n require: 'form',\n scope: {\n onSubmit: '&',\n scrollToTopOnError: '=',\n toastOnError: '=',\n showPartialError: '=',\n sentryTrackValidationError: '=?',\n sentryTrackValidationErrorComponent: '@?',\n warnBeforeUnload: '=?'\n },\n link: function(scope, elem, attrs, form) {\n attrs.$set('novalidate', 'novalidate')\n\n form.showAllErrors = function() {\n // commitViewValue is called explicitly because we have fields which are\n // only set on blur, which is not triggered with browser autofills etc.\n form.$commitViewValue()\n\n // if showPartialError is set, we will only display errors on fields\n // which exist (by marking them dirty). fields which do not have errors\n // at the time this function is called (including fields dynamically added\n // afterwards) will not display errors until this function is called again.\n if (!scope.showPartialError) {\n form.showError = true\n elem.addClass('show-error')\n } else {\n Object.keys(form.$error).map(function(key) {\n form.$error[key].map(function(field) {\n field.$setDirty()\n })\n })\n }\n if (!!scope.scrollToTopOnError) {\n $window.scrollTo(0, 0)\n }\n if (!!scope.toastOnError) {\n ngToast.create({ className: 'error', content: \"Please correct the errors called out in red below.\" })\n }\n }\n\n // addAsyncValidator extends $asyncValidators by storing all pending\n // validator promises in the _pending hash (keyed by field and validator name).\n // The _pending hash ensures that the validate() check only fires\n // after all pending asyncValidator promises are resolved.\n const _pending = {}\n form.addAsyncValidator = function(field, validatorName, validator) {\n if (!form[field]) {\n throw 'error registering async validator: field ' + field + ' does not exist on form'\n }\n form[field].$asyncValidators[validatorName] = function(modelVal, viewVal) {\n const deferred = $q.defer()\n _pending[field + '--' + validatorName] = deferred.promise\n return validator(modelVal, viewVal)\n .then(function(val) {\n deferred.resolve(val)\n return val\n })\n .catch(function(err) {\n deferred.reject(err)\n throw err\n })\n }\n }\n\n function _pendingAsync() {\n return Object.keys(_pending).map(function (k) {\n return _pending[k]\n })\n }\n\n // validate all the form fields. This should not be used in a form with\n // async validators\n\n form.validate = function() {\n if (form.$pending) {\n throw 'cannot validate form with pending requests'\n }\n if (form.$invalid) {\n form.showAllErrors()\n return false\n }\n form.showError = false\n elem.removeClass('show-error')\n return true\n }\n\n // Clean up structure of form.$error for readability purposes on Sentry\n const formattedFormErrorsForSentry = (formErrors) => {\n const formattedFormErrors = []\n for (const f in formErrors) {\n formErrors[f].forEach(g => {\n formattedFormErrors.push({\n // Can't have a properly key of \"name\" cause it's filtered out on Sentry\n fieldName: g.$name,\n fieldErrors: g.$error,\n });\n })\n }\n return formattedFormErrors;\n }\n\n function validateAndSubmit() {\n if (form.validate()) {\n scope.onSubmit();\n form.$dirty = false\n } else if (scope.sentryTrackValidationError) {\n $raven.captureException('Client-side form validation error', {\n culprit: $location.path(),\n // TODO: (Steven) Health history is breaking for clients on family-tree if they have validation errors\n // after the angular upgrade. Figure out root cause and comment back in.\n // extra: {\n // 'form.$error': {\n // clean: formattedFormErrorsForSentry(form.$error),\n // },\n // },\n tags: {\n component: scope.sentryTrackErrorComponent || null,\n },\n level: 'info',\n });\n }\n }\n\n elem.bind('submit', function(event) {\n event.preventDefault()\n\n // if there are no pending fields, validate synchronously\n // otherwise validate async\n $q.all(_pendingAsync())\n .then(validateAndSubmit)\n })\n\n if (scope.warnBeforeUnload) {\n window.onbeforeunload = function() {\n if (form.$dirty) {\n return 'Changes you made may not be saved.'\n }\n return\n }\n }\n }\n }\n}\n","\"use strict\"\n\n/**\n * Adds form error element for a given form input object.\n * It automatically show and hide error appropriately.\n * If you need to customize visibility of error message,\n * you can set showError [true|false] variable for the form input object.\n */\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'AE',\n require: '^form',\n scope: {\n formInput: '=formInput',\n name: '@',\n minlength: '@',\n maxlength: '@',\n min: '@',\n max: '@',\n msg: '@'\n },\n templateUrl: '/form_error.html',\n link: function(scope, element, attrs, formCtrl) {\n scope.form = formCtrl\n if (!attrs.name) {\n attrs.name = \"This field\"\n }\n }\n }\n}\n","\"use strict\"\n\n/**\n * Review if this is even used...\n */\n/**\n * Creates a horizontal bar chart\n *\n * Valid chartStyles:\n * 'basic': used on /learn/why-get-tested/women and /learn/why-get-tested/men - both of which don't exist.\n * 'cancer': used on cancer pages, like /learn/cancer/breast-cancer-facts-and-causes, which is now https://www.color.com/learn/cancer/breast-cancer-facts-and-causes\n *\n */\nmodule.exports = function($filter) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n chartName: '@'\n },\n templateUrl: '/directives/clrHozChart.html',\n controller: function($scope, $element) {\n \"ngInject\"\n\n const self = this\n\n self.shiftBaselineGuide = function(x) {\n if (x.indexOf('<') > -1) {\n x = parseFloat(x.replace('<', ''))\n }\n $element.find('.clrHozChart__baseline-guide').css( { 'left': x } )\n }\n\n self.setTitle = function(phenotype, risk, age, applyScope) {\n $scope.title = 'Avg. risk of ' + phenotype + ' is ' + risk + ' by age ' + age\n if (applyScope) {\n $scope.$apply()\n }\n }\n\n },\n link: function(scope, elem, attrs, ctrl) {\n\n // Private methods to shape scope.chartName content, only valid in certain scope.chartStyles\n function getRiskUpperBound(riskValue) {\n const value = riskValue.toLowerCase()\n return $filter('barChartHeight')(value) + '%'\n }\n function isElevated(riskValue) {\n return $filter('isElevated')(riskValue)\n }\n function getHoverTitle(phenotype, riskAge) {\n return $filter('capitalize')(phenotype, 'firstOnly') + ' risk to age ' + riskAge\n }\n function getBaselineAverage(gender, riskAge) {\n return '' + scope.baselineRisks[riskAge] + ' for average US ' + (gender == 'F' ? 'woman' : 'man')\n }\n function getHoverRisk(riskValue, gene) {\n let result = '' + $filter('riskString')(riskValue) + ''\n if (isElevated(riskValue)) {\n result += '*'\n }\n result += ' with ' + gene + ' mutation'\n return result\n }\n\n // Standard elevated copy\n const elevatedHoverCopy = '* Risk is increased, but further research may clarify the exact risk figure.'\n\n // Default legend teal label\n scope.legendData = {\n bar: 'Risk with mutation'\n }\n scope.chartTicks = ['0%', '', '20%', '', '40%', '', '60%', '', '80%', '', '100%']\n\n // Pick chart data based on scope.chartName\n switch (scope.chartName) {\n case 'femaleRisk': // Learn -> Women risk chart\n scope.chartStyle = 'basic'\n scope.legendData.barHighlight = 'Avg. risk among US women'\n scope.chartData = [\n {\n rowTitle: 'Colorectal',\n barLabel: 'APC',\n barWidth: '100%',\n barHighlightWidth: '4%'\n },\n {\n rowTitle: 'Stomach',\n barLabel: 'CDH1',\n barWidth: '83%',\n barHighlightWidth: '1%'\n },\n {\n rowTitle: 'Breast',\n barLabel: 'BRCA1',\n barWidth: '81%',\n barHighlightWidth: '12%'\n },\n {\n rowTitle: 'Melanoma',\n barLabel: 'CDKN2A',\n barWidth: '68%',\n barHighlightWidth: '2%'\n },\n {\n rowTitle: 'Pancreatic',\n barLabel: 'CDKN2A',\n barWidth: '58%',\n barHighlightWidth: '2%'\n },\n {\n rowTitle: 'Uterine',\n barLabel: 'MLH1',\n barWidth: '54%',\n barHighlightWidth: '3%'\n },\n {\n rowTitle: 'Ovarian',\n barLabel: 'BRCA1',\n barWidth: '54%',\n barHighlightWidth: '2%'\n }\n ]\n break\n case 'maleRisk': // Learn -> Men risk chart\n scope.chartStyle = 'basic'\n scope.legendData.barHighlight = 'Avg. risk among US men'\n scope.chartData = [\n {\n rowTitle: 'Colorectal',\n barLabel: 'APC',\n barWidth: '100%',\n barHighlightWidth: '3.4%'\n },\n {\n rowTitle: 'Stomach',\n barLabel: 'CDH1',\n barWidth: '70%',\n barHighlightWidth: '1%'\n },\n {\n rowTitle: 'Melanoma',\n barLabel: 'CDKN2A',\n barWidth: '67%',\n barHighlightWidth: '2%'\n },\n {\n rowTitle: 'Pancreatic',\n barLabel: 'CDKN2A',\n barWidth: '58%',\n barHighlightWidth: '1%'\n },\n {\n rowTitle: 'Prostate',\n barLabel: 'BRCA2',\n barWidth: '16%',\n barHighlightWidth: '10%'\n },\n {\n rowTitle: 'Male breast',\n barLabel: 'BRCA2',\n barWidth: '12%',\n barHighlightWidth: '0.5%'\n }\n ]\n break\n case \"breastCancerFemale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'breast cancer'\n scope.gender = 'F'\n scope.baselineRisks = {\n 70: '7.1%',\n 80: '10%',\n 95: '12%'\n }\n scope.defaultBaselineRiskAge = 95\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'ATM',\n riskAge: 70,\n riskValue: 'elevated (16-26%)'\n },\n {\n gene: 'BARD1',\n riskAge: 80,\n riskValue: 'elevated [30%]'\n },\n {\n gene: 'BRIP1',\n riskAge: 80,\n riskValue: 'elevated (12-32%)'\n },\n {\n gene: 'NBN',\n riskAge: 95,\n riskValue: 'elevated (20-36%)'\n },\n {\n gene: 'CDH1',\n riskAge: 80,\n riskValue: '39-42%'\n },\n {\n gene: 'CHEK2',\n riskAge: 70,\n riskValue: '20-44%'\n },\n {\n gene: 'STK11',\n riskAge: 70,\n riskValue: '32-54%'\n },\n {\n gene: 'PALB2',\n riskAge: 70,\n riskValue: 'elevated (35-58%)'\n },\n {\n gene: 'BRCA2',\n riskAge: 70,\n riskValue: '74%'\n },\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [77%]'\n },\n {\n gene: 'PTEN',\n riskAge: 70,\n riskValue: '77-80%'\n },\n {\n gene: 'BRCA1',\n riskAge: 80,\n riskValue: '81%'\n }\n ]\n break\n case \"breastCancerMale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'male breast cancer'\n scope.gender = 'M'\n scope.baselineRisks = {\n 70: '<0.1%',\n 80: '<0.1%'\n }\n scope.defaultBaselineRiskAge = 80\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'PALB2',\n riskAge: 70,\n riskValue: 'elevated [1%]'\n },\n {\n gene: 'BRCA1',\n riskAge: 80,\n riskValue: '1.8%'\n },\n {\n gene: 'BRCA2',\n riskAge: 70,\n riskValue: '3-12%'\n }\n ]\n break\n case \"colorectalCancerFemale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'colorectal cancer'\n scope.gender = 'F'\n scope.baselineRisks = {\n 70: '1.6%',\n 80: '2.8%',\n 95: '4.2%'\n }\n scope.defaultBaselineRiskAge = 95\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.footnote = 'Risk information for someone with two mutations in this gene.'\n scope.chartData = [\n {\n gene: 'CHEK2',\n riskAge: 70,\n riskValue: 'elevated (2-5%)'\n },\n {\n gene: 'PTEN',\n riskAge: 70,\n riskValue: '9%'\n },\n {\n gene: 'MUTYH',\n riskAge: 80,\n riskValue: 'elevated [11%]',\n hoverRisk: 'Elevated* with a single MUTYH mutation'\n },\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [12%]'\n },\n {\n gene: 'PMS2',\n riskAge: 70,\n riskValue: '11-15%'\n },\n {\n gene: 'MSH6',\n riskAge: 70,\n riskValue: '10-18%'\n },\n {\n gene: 'BMPR1A',\n riskAge: 80,\n riskValue: '39%'\n },\n {\n gene: 'SMAD4',\n riskAge: 80,\n riskValue: '39%'\n },\n {\n gene: 'STK11',\n riskAge: 70,\n riskValue: '39%'\n },\n {\n gene: 'EPCAM',\n riskAge: 70,\n riskValue: '37-48%'\n },\n {\n gene: 'MSH2',\n riskAge: 70,\n riskValue: '37-48%'\n },\n {\n gene: 'MLH1',\n riskAge: 70,\n riskValue: '36-50%'\n },\n {\n gene: 'GREM1',\n riskAge: 95,\n riskValue: 'elevated [70%]'\n },\n {\n gene: 'POLD1',\n riskAge: 95,\n riskValue: 'elevated [70%]'\n },\n {\n gene: 'POLE',\n riskAge: 95,\n riskValue: 'elevated [70%]'\n },\n {\n gene: 'MUTYH*',\n riskAge: 80,\n riskValue: '86%',\n hoverRisk: '86% with MUTYH mutation in both copies'\n },\n {\n gene: 'APC',\n riskAge: 80,\n riskValue: '70-100%',\n hoverRisk: '70-100% with APC mutation without surgical intervention'\n }\n ]\n break\n case \"colorectalCancerMale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'colorectal cancer'\n scope.gender = 'M'\n scope.baselineRisks = {\n 70: '2%',\n 80: '3.4%',\n 95: '4.6%'\n }\n scope.defaultBaselineRiskAge = 95\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.footnote = 'Risk information for someone with two mutations in this gene.'\n scope.chartData = [\n {\n gene: 'CHEK2',\n riskAge: 70,\n riskValue: 'elevated (3-6%)'\n },\n {\n gene: 'PTEN',\n riskAge: 70,\n riskValue: '9%'\n },\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [13%]'\n },\n {\n gene: 'MUTYH',\n riskAge: 80,\n riskValue: 'elevated [14%]',\n hoverRisk: 'Elevated* with a single MUTYH mutation'\n },\n {\n gene: 'PMS2',\n riskAge: 70,\n riskValue: '20%'\n },\n {\n gene: 'MSH6',\n riskAge: 70,\n riskValue: '12-22%'\n },\n {\n gene: 'BMPR1A',\n riskAge: 80,\n riskValue: '39%'\n },\n {\n gene: 'SMAD4',\n riskAge: 80,\n riskValue: '39%'\n },\n {\n gene: 'STK11',\n riskAge: 70,\n riskValue: '39%'\n },\n {\n gene: 'MLH1',\n riskAge: 70,\n riskValue: '34-41%'\n },\n {\n gene: 'EPCAM',\n riskAge: 70,\n riskValue: '48%'\n },\n {\n gene: 'MSH2',\n riskAge: 70,\n riskValue: '48%'\n },\n {\n gene: 'GREM1',\n riskAge: 95,\n riskValue: 'elevated [70%]'\n },\n {\n gene: 'POLD1',\n riskAge: 95,\n riskValue: 'elevated [70%]'\n },\n {\n gene: 'POLE',\n riskAge: 95,\n riskValue: 'elevated [70%]'\n },\n {\n gene: 'MUTYH*',\n riskAge: 80,\n riskValue: '88%',\n hoverRisk: '88% with MUTYH mutation in both copies'\n },\n {\n gene: 'APC',\n riskAge: 80,\n riskValue: '70-100%',\n hoverRisk: '70-100% with APC mutation without surgical intervention'\n }\n ]\n break\n case \"melanomaFemale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'melanoma'\n scope.gender = 'F'\n scope.baselineRisks = {\n 70: '<1%',\n 80: '1.3%',\n 95: '1.6%'\n }\n scope.defaultBaselineRiskAge = 95\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [2.2%]'\n },\n {\n gene: 'BRCA2',\n riskAge: 70,\n riskValue: 'elevated (1-5%)'\n },\n {\n gene: 'PTEN',\n riskAge: 70,\n riskValue: '6%'\n },\n {\n gene: 'MITF',\n riskAge: 95,\n riskValue: 'elevated [8%]'\n },\n {\n gene: 'BAP1',\n riskAge: 95,\n riskValue: 'elevated [44%]'\n },\n {\n gene: 'CDKN2A',\n riskAge: 80,\n riskValue: '28-67%'\n },\n {\n gene: 'CDK4',\n riskAge: 95,\n riskValue: 'elevated [74%]'\n }\n ]\n break\n case \"melanomaMale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'melanoma'\n scope.gender = 'M'\n scope.baselineRisks = {\n 70: '1.2%',\n 80: '1.9%',\n 95: '2.6%'\n }\n scope.defaultBaselineRiskAge = 95\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [4%]'\n },\n {\n gene: 'BRCA2',\n riskAge: 70,\n riskValue: 'elevated (2-6%)'\n },\n {\n gene: 'PTEN',\n riskAge: 70,\n riskValue: '6%'\n },\n {\n gene: 'MITF',\n riskAge: 95,\n riskValue: 'elevated [13%]'\n },\n {\n gene: 'BAP1',\n riskAge: 95,\n riskValue: 'elevated [44%]'\n },\n {\n gene: 'CDKN2A',\n riskAge: 80,\n riskValue: '28-67%'\n },\n {\n gene: 'CDK4',\n riskAge: 95,\n riskValue: 'elevated [74%]'\n }\n ]\n break\n case \"ovarianCancerFemale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'ovarian cancer'\n scope.gender = 'F'\n scope.baselineRisks = {\n 65: '<1%',\n 70: '<1%',\n 80: '1%',\n 95: '1.3%'\n }\n scope.defaultBaselineRiskAge = 95\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'MSH6',\n riskAge: 70,\n riskValue: 'elevated [1.5%]'\n },\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [3%]'\n },\n {\n gene: 'PALB2',\n riskAge: 70,\n riskValue: 'elevated [5%]'\n },\n {\n gene: 'RAD51C',\n riskAge: 80,\n riskValue: 'elevated (9%)'\n },\n {\n gene: 'EPCAM',\n riskAge: 70,\n riskValue: '8-10%'\n },\n {\n gene: 'MSH2',\n riskAge: 70,\n riskValue: '8-10%'\n },\n {\n gene: 'RAD51D',\n riskAge: 80,\n riskValue: 'elevated (10%)'\n },\n {\n gene: 'BRCA2',\n riskAge: 70,\n riskValue: '12%'\n },\n {\n gene: 'PMS2',\n riskAge: 70,\n riskValue: 'elevated [12%]'\n },\n {\n gene: 'MLH1',\n riskAge: 70,\n riskValue: '6-13%'\n },\n {\n gene: 'BRIP1',\n riskAge: 80,\n riskValue: 'elevated (5-14%)'\n },\n {\n gene: 'STK11',\n riskAge: 65,\n riskValue: '21%'\n },\n {\n gene: 'BRCA1',\n riskAge: 80,\n riskValue: '54%'\n }\n ]\n break\n case \"pancreaticCancerFemale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'pancreatic cancer'\n scope.gender = 'F'\n scope.baselineRisks = {\n 70: '<1%',\n 80: '<1%',\n 95: '1.5%'\n }\n scope.defaultBaselineRiskAge = 80 // Using age 80 instead of 95 because ATM would be below the baseline guide otherwise\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'PALB2',\n riskAge: 70,\n riskValue: 'elevated'\n },\n {\n gene: 'ATM',\n riskAge: 70,\n riskValue: 'elevated [1.1%]'\n },\n {\n gene: 'APC',\n riskAge: 80,\n riskValue: '1.7%'\n },\n {\n gene: 'BRCA2',\n riskAge: 70,\n riskValue: 'elevated (2-3%)'\n },\n {\n gene: 'BMPR1A',\n riskAge: 80,\n riskValue: 'elevated [3%]'\n },\n {\n gene: 'SMAD4',\n riskAge: 80,\n riskValue: 'elevated [3%]'\n },\n {\n gene: 'EPCAM',\n riskAge: 70,\n riskValue: '4%'\n },\n {\n gene: 'MLH1',\n riskAge: 70,\n riskValue: '4%'\n },\n {\n gene: 'MSH2',\n riskAge: 70,\n riskValue: '4%'\n },\n {\n gene: 'BRCA1',\n riskAge: 80,\n riskValue: 'elevated (3-5%)'\n },\n {\n gene: 'STK11',\n riskAge: 70,\n riskValue: '11%'\n },\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [11%]'\n },\n {\n gene: 'CDKN2A',\n riskAge: 80,\n riskValue: '58%'\n }\n ]\n break\n case \"pancreaticCancerMale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'pancreatic cancer'\n scope.gender = 'M'\n scope.baselineRisks = {\n 70: '<1%',\n 80: '1.1%',\n 95: '1.5%'\n }\n scope.defaultBaselineRiskAge = 80\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'PALB2',\n riskAge: 70,\n riskValue: 'elevated'\n },\n {\n gene: 'ATM',\n riskAge: 70,\n riskValue: 'elevated [1.4%]'\n },\n {\n gene: 'APC',\n riskAge: 80,\n riskValue: '1.7%'\n },\n {\n gene: 'BMPR1A',\n riskAge: 80,\n riskValue: 'elevated [3%]'\n },\n {\n gene: 'SMAD4',\n riskAge: 80,\n riskValue: 'elevated [3%]'\n },\n {\n gene: 'EPCAM',\n riskAge: 70,\n riskValue: '4%'\n },\n {\n gene: 'MLH1',\n riskAge: 70,\n riskValue: '4%'\n },\n {\n gene: 'MSH2',\n riskAge: 70,\n riskValue: '4%'\n },\n {\n gene: 'BRCA2',\n riskAge: 70,\n riskValue: 'elevated (3-5%)'\n },\n {\n gene: 'BRCA1',\n riskAge: 80,\n riskValue: 'elevated (3-6%)'\n },\n {\n gene: 'STK11',\n riskAge: 70,\n riskValue: '11%'\n },\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [11%]'\n },\n {\n gene: 'CDKN2A',\n riskAge: 80,\n riskValue: '58%'\n }\n ]\n break\n case \"prostateCancerMale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'prostate cancer'\n scope.gender = 'M'\n scope.baselineRisks = {\n 70: '7.2%',\n 80: '12%',\n 95: '14%'\n }\n scope.defaultBaselineRiskAge = 80 // Using age 80 instead of 95 because CHEK2 would be below the baseline guide otherwise\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'ATM',\n riskAge: 70,\n riskValue: 'elevated'\n },\n {\n gene: 'TP53',\n riskAge: 80,\n riskValue: 'elevated'\n },\n {\n gene: 'CHEK2',\n riskAge: 70,\n riskValue: 'elevated [13%]'\n },\n {\n gene: 'BRCA2',\n riskAge: 70,\n riskValue: 'elevated (7-16%)'\n },\n {\n gene: 'BRCA1',\n riskAge: 80,\n riskValue: 'elevated [28%]'\n },\n {\n gene: 'NBN',\n riskAge: 95,\n riskValue: 'elevated [38%]'\n }\n ]\n break\n case \"stomachCancerFemale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'stomach cancer'\n scope.gender = 'F'\n scope.baselineRisks = {\n 65: '<1%',\n 70: '<1%',\n 80: '<1%',\n 95: '<1%'\n }\n scope.defaultBaselineRiskAge = 95\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'APC',\n riskAge: 80,\n riskValue: 'elevated [1%]'\n },\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [2%]'\n },\n {\n gene: 'MSH6',\n riskAge: 70,\n riskValue: 'elevated [3%]'\n },\n {\n gene: 'EPCAM',\n riskAge: 70,\n riskValue: '5-8%'\n },\n {\n gene: 'MSH2',\n riskAge: 70,\n riskValue: '5-8%'\n },\n {\n gene: 'MLH1',\n riskAge: 70,\n riskValue: '6-11%'\n },\n {\n gene: 'BMPR1A',\n riskAge: 80,\n riskValue: 'elevated (21%)'\n },\n {\n gene: 'SMAD4',\n riskAge: 80,\n riskValue: 'elevated (21%)'\n },\n {\n gene: 'STK11',\n riskAge: 65,\n riskValue: '29%'\n },\n {\n gene: 'CDH1',\n riskAge: 80,\n riskValue: '56-83%'\n }\n ]\n break\n case \"stomachCancerMale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'stomach cancer'\n scope.gender = 'M'\n scope.baselineRisks = {\n 65: '<1%',\n 70: '<1%',\n 80: '<1%',\n 95: '1%'\n }\n scope.defaultBaselineRiskAge = 95\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'APC',\n riskAge: 80,\n riskValue: 'elevated [1%]'\n },\n {\n gene: 'MSH6',\n riskAge: 70,\n riskValue: 'elevated [3%]'\n },\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [3%]'\n },\n {\n gene: 'EPCAM',\n riskAge: 70,\n riskValue: '5-8%'\n },\n {\n gene: 'MSH2',\n riskAge: 70,\n riskValue: '5-8%'\n },\n {\n gene: 'MLH1',\n riskAge: 70,\n riskValue: '6-20%'\n },\n {\n gene: 'BMPR1A',\n riskAge: 80,\n riskValue: 'elevated (21%)'\n },\n {\n gene: 'SMAD4',\n riskAge: 80,\n riskValue: 'elevated (21%)'\n },\n {\n gene: 'STK11',\n riskAge: 65,\n riskValue: '29%'\n },\n {\n gene: 'CDH1',\n riskAge: 80,\n riskValue: '67-70%'\n }\n ]\n break\n case \"uterineCancerFemale\":\n scope.chartStyle = 'cancer'\n scope.phenotype = 'uterine cancer'\n scope.gender = 'F'\n scope.baselineRisks = {\n 65: '<1%',\n 70: '1.7%',\n 95: '2.8%'\n }\n scope.defaultBaselineRiskAge = 95\n scope.defaultBaselineGuide = scope.baselineRisks[scope.defaultBaselineRiskAge]\n scope.chartData = [\n {\n gene: 'TP53',\n riskAge: 95,\n riskValue: 'elevated [6%]'\n },\n {\n gene: 'STK11',\n riskAge: 65,\n riskValue: '9%'\n },\n {\n gene: 'PMS2',\n riskAge: 70,\n riskValue: '12-15%'\n },\n {\n gene: 'MSH6',\n riskAge: 70,\n riskValue: '16-26%'\n },\n {\n gene: 'PTEN',\n riskAge: 70,\n riskValue: '28%'\n },\n {\n gene: 'EPCAM',\n riskAge: 70,\n riskValue: '21-30%'\n },\n {\n gene: 'MSH2',\n riskAge: 70,\n riskValue: '21-30%'\n },\n {\n gene: 'MLH1',\n riskAge: 70,\n riskValue: '18-54%'\n }\n ]\n break\n case \"employerCost\":\n scope.chartStyle = 'basic'\n scope.legendData = null\n scope.chartTicks = ['$0', '', '$1 million', '', '$2 million', '', '$3 million', '']\n scope.footnote = 'Reflects the combined spend for heart disease, high blood pressure, and high cholesterol.'\n scope.chartData = [\n {\n rowTitle: 'Heart disease*',\n barWidth: '100%',\n },\n {\n rowTitle: 'Cancer',\n barWidth: '60%',\n },\n {\n rowTitle: 'Back pain',\n barWidth: '31%',\n },\n {\n rowTitle: 'Diabetes',\n barWidth: '13%',\n },\n {\n rowTitle: 'Arthritis',\n barWidth: '11%',\n },\n {\n rowTitle: 'Depression',\n barWidth: '8%',\n }\n ]\n default:\n break\n }\n\n scope.chartTickWidth = Math.trunc(100.0 / scope.chartTicks.length) + '%'\n\n // Fill in extra data to active chart if they're of `cancer` chartStyle\n if (scope.chartStyle == 'cancer') {\n scope.italicTitle = true\n ctrl.setTitle(scope.phenotype, scope.defaultBaselineGuide, scope.defaultBaselineRiskAge)\n }\n angular.forEach(scope.chartData, function(data) {\n if (scope.chartStyle == 'cancer') {\n data.rowTitle = data.gene\n data.barWidth = getRiskUpperBound(data.riskValue)\n data.hoverTitle = getHoverTitle(scope.phenotype, data.riskAge)\n data.hoverAverage = getBaselineAverage(scope.gender, data.riskAge)\n if (!data.hoverRisk) {\n data.hoverRisk = getHoverRisk(data.riskValue, data.gene)\n }\n if (isElevated(data.riskValue)) {\n data.hoverFootnote = elevatedHoverCopy\n }\n }\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * Creates a legend item inside clrHozChart directive\n */\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n replace: true,\n templateUrl: '/directives/clrHozChartLegendItem.html',\n scope: {\n type: '@',\n label: '@'\n }\n }\n}\n","\"use strict\"\n\n/**\n * Creates a horizontal bar element of clrHozChart directive\n */\nmodule.exports = function($filter) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n replace: true,\n require: '^clrHozChart',\n templateUrl: '/directives/clrHozChartRow.html',\n link: function(scope, elem, attrs, ctrl) {\n\n // Handle shifting label to right of bar chart if < 20%\n const barWidth = parseInt(scope.data.barWidth.split('%')[0])\n if (barWidth < 20) {\n scope.shiftLabel = true\n }\n\n // 'cancer' chartStyle specific tweaks\n if (scope.chartStyle == 'cancer') {\n // Add shifting baseline/changing titles for\n elem.bind('mouseover', function() {\n ctrl.shiftBaselineGuide(scope.baselineRisks[scope.data.riskAge])\n ctrl.setTitle(scope.phenotype, scope.baselineRisks[scope.data.riskAge], scope.data.riskAge, true)\n }).bind('mouseleave', function() {\n ctrl.shiftBaselineGuide(scope.defaultBaselineGuide)\n ctrl.setTitle(scope.phenotype, scope.defaultBaselineGuide, scope.defaultBaselineRiskAge, true)\n })\n }\n\n // Handle elevated risks without a value, set to baseline of highest age\n if ($filter('isElevated')(scope.data.riskValue) && scope.data.riskValue.indexOf('%') == -1) {\n scope.data.barWidth = $filter('barChartHeight')(scope.baselineRisks[scope.defaultBaselineRiskAge]) + '%'\n }\n\n }\n }\n}\n","\"use strict\"\n\n/**\n * marked compiler that can include directives and scope compilation\n */\nmodule.exports = function($compile, marked) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n scope: true,\n link: function(scope, elem, attrs) {\n const template = marked(attrs.clrMarked)\n const content = $compile(template)(scope)\n if (attrs.linksInNewWindow) {\n content.find('a').attr(\"target\", \"_blank\");\n }\n elem.append(content)\n }\n }\n}\n","\"use strict\"\n\n/**\n * CLR PDF Viewer - dynamically creates container for embedded PDFs if the browser supports\n */\n\nmodule.exports = function($window, $rootScope, device) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n pdfUrl: '@',\n pdfHeight: '@?'\n },\n link: function(scope, elem) {\n function embedPDF() {\n const options = {\n width: \"100%\",\n height: \"100%\",\n\n // This HTML is inserted if the user's browser doesn't support embedded pdfs\n fallbackLink: \"

Your browser does not support inline PDFs. Please download the PDF to view it.\",\n\n // Acrobat PDF param order matters, don't shift around: http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/AcrobatDC_pdf_open_parameters.pdf\n pdfOpenParams: {\n zoom: 100,\n navpanes: 1,\n toolbar: 1,\n scrollbar: 1\n }\n }\n $window.PDFObject.embed(scope.pdfUrl, '#' + scope.pdfDomId, options)\n }\n\n // Give DOM node random ID in case this directive is used multiple times\n scope.pdfDomId = \"pdf\" + Math.floor(Math.random() * 100000 + 1)\n const pdfFrame = angular.element(\"

\").attr(\"id\", scope.pdfDomId).addClass(\"clr-pdf-viewer\")\n if (scope.pdfHeight == 'tall') {\n pdfFrame.addClass(\"clr-pdf-viewer--tall\")\n }\n elem.append(pdfFrame)\n\n embedPDF()\n\n // Update the displayed PDF if the url changes\n scope.$watch('pdfUrl', embedPDF)\n\n // Allow reloading PDF via $broadcast\n const deregister = $rootScope.$on('pdf:reload', embedPDF)\n scope.$on('$destroy', deregister)\n }\n }\n}\n","'use strict'\n\nmodule.exports = function() {\n return {\n restrict: 'E',\n require: 'ngModel',\n scope: {\n choices: '=?',\n ngDisabled: '=?',\n ngRequired: '='\n },\n templateUrl: '/directives/clr_radio_row.html',\n link: function(scope, elem, attrs, modelCtrl) {\n scope.elemId = 'input' + scope.$id\n\n attrs.$observe('name', function(name) {\n scope.name = name\n })\n\n scope.$watch('selection', function (newValue, oldValue) {\n if (scope.ngDisabled) {\n return\n }\n modelCtrl.$setViewValue(newValue, 'change')\n })\n\n modelCtrl.$render = function() {\n scope.selection = modelCtrl.$viewValue\n }\n\n if (!scope.choices) {\n if (angular.isDefined(attrs.yesNo)) {\n scope.choices = [\n {\n value: true,\n string: 'YES'\n },\n {\n value: false,\n string: 'NO'\n }\n ]\n } else if (angular.isDefined(attrs.yesNoUnsure)) {\n scope.choices = [\n {\n value: 'Y',\n string: 'YES'\n },\n {\n value: 'N',\n string: 'NO'\n },\n {\n value: 'U',\n string: 'UNSURE'\n }\n ]\n } else {\n throw new Error(\"Must provide either choices, yes-no or yes-no-unsure on clr-radio-row\")\n }\n }\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n require: '^form',\n scope: {\n ngModel: '=',\n name: '@',\n attrName: '@',\n options: '=',\n ngRequired: '=',\n selectDefaultText: '@',\n textDefaultText: '@'\n },\n templateUrl: '/select_or_text.html',\n compile: function() {\n return {\n pre: function(scope) {\n const initValue = scope.ngModel[scope.attrName]\n scope.other = false\n\n // Initialize select input value\n for (let i = 0; i < scope.options.length; i++) {\n if (initValue == scope.options[i].value) {\n scope.selectedValue = initValue\n break\n }\n }\n\n // Initialize text input value\n if (!scope.selectedValue && !!initValue) {\n scope.other = true\n scope.selectedValue = '__other'\n scope.enteredValue = initValue\n }\n\n // Add other option to options\n scope.optionsWithOther = copyOptionsWithOther(scope.options)\n },\n post: function(scope, elem, attrs, formCtrl) {\n scope.form = formCtrl\n scope.$watch('options', function(newValue) {\n scope.optionsWithOther = copyOptionsWithOther(scope.options)\n }, true)\n\n scope.triggerOnSelect = function(value) {\n if (value == '__other') {\n scope.other = true\n scope.ngModel[scope.attrName] = ''\n } else {\n scope.other = false\n scope.ngModel[scope.attrName] = value\n }\n }\n\n scope.triggerOnEnter = function(value) {\n scope.ngModel[scope.attrName] = value\n }\n }\n }\n function copyOptionsWithOther(options) {\n const optionsWithOther = angular.copy(options)\n optionsWithOther.push({ name: 'Other', value: '__other' })\n return optionsWithOther\n }\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n scope: {\n clrSetFocus: '@'\n },\n link: function(scope, elem) {\n elem.bind('click', function() {\n angular.element('[name=' + scope.clrSetFocus + ']').focus()\n })\n scope.$on('destroy', function() {\n elem.unbind('click')\n })\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n transclude: true,\n scope: {\n active: '=active'\n },\n templateUrl: '/spinner_text.html'\n }\n}\n","// The `clrTab` directive adds a tab only to `clrTabSet`, not used in `clrTabSimple`\n\n\"use strict\"\n\nmodule.exports = function($rootScope, $location, $timeout, locationSkipReload) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n transclude: true,\n replace: true,\n require: '^clrTabSet',\n scope: {\n path: '@',\n // Used on reports V1 to handle special URL conditions containing the test type\n pathLastSegmentOnly: '@',\n heroTemplateUrl: '@',\n contentTemplateUrl: '@',\n heroHeight: '@?',\n // Used to register $rootscope listeners, useful to change to this tab from another directive\n enableListener: '@?'\n },\n templateUrl: '/directives/clr_tab.html',\n link: function(scope, elem, attrs, tabCtrl) {\n // `tabCtrl` is `clrTabSet`'s controller\n tabCtrl.addTab(scope)\n\n let relativePath = scope.path\n\n // select method called by clicking on the tab\n scope.select = function () {\n scope.selected = true\n // lag transition slightly in minor chance width hasn't been set by browser yet\n $timeout(function() {\n tabCtrl.setUnderline(elem.width(), elem.position().left)\n }, 25)\n tabCtrl.select(scope)\n // when a tab is clicked vs going through the route\n\n if (scope.pathLastSegmentOnly) {\n relativePath = $location.path().split('/')\n relativePath.pop()\n relativePath.push(scope.path.split('/')[1])\n relativePath = relativePath.join('/')\n }\n if (relativePath != $location.path()) {\n tabCtrl.setScroll()\n locationSkipReload(relativePath)\n }\n }\n\n // select tab based on $location.path() when tabs are instantiated\n // making sure a defined path (`relativePath`) ends with the path as entered (`$location.path())\n const pathMatch = new RegExp(`${relativePath}$`)\n if (relativePath && pathMatch.test($location.path())) {\n scope.select()\n }\n\n // enables selecting a tab if called from call outside of this directive, e.g. `clrTabSelect`\n if (scope.enableListener) {\n $rootScope.$on('clrTab:selectTab', function(event, data) {\n if (scope.enableListener == data) {\n tabCtrl.setScroll(true)\n scope.select()\n }\n })\n }\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function($rootScope) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n transclude: true,\n replace: true,\n require: '^clrTabSet',\n scope: {\n right: '@?',\n showOnDock: '@?'\n },\n templateUrl: '/directives/clr_tab_custom.html'\n }\n}\n","\"use strict\"\n\nmodule.exports = function($rootScope) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n scope: {\n clrTabSelect: '@'\n },\n link: function(scope, elem) {\n elem.bind('click', function() {\n $rootScope.$broadcast('clrTab:selectTab', scope.clrTabSelect)\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * clrTabSet parent directive for other clrTab_____ directives (but not clrTabSimple)\n * Used on reports V1\n * Not used on product or learn pages or reports V2\n */\nmodule.exports = function($timeout, setViewportScroll) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: true,\n transclude: true,\n replace: true,\n templateUrl: '/directives/clr_tab_set.html',\n link: function(scope, elem, attrs) {\n scope.heroNotSwappable = attrs.heroNotSwappable\n scope.inCard = attrs.inCard\n scope.disableScrollfix = attrs.disableScrollfix\n scope.hideTabs = attrs.hideTabs\n scope.tallHero = attrs.tallHero\n\n // Mobile versions of clrTab have an alternate layout that requires minor modifications\n function initMobileTabs() {\n let duplicateButton\n const tabBarButton = elem.find(\".tab-bar__button\")\n if (tabBarButton) {\n duplicateButton = tabBarButton.clone()\n elem.find(\".tab-bar__mobile\").append(duplicateButton)\n }\n angular.element('.tab-bar__link').on('click', function() {\n scope.mobileToggleMenu(false)\n setViewportScroll.enable()\n })\n }\n\n scope.mobileToggleMenu = function(bool) {\n scope.mobileMenuOpen = bool ? bool : !scope.mobileMenuOpen\n if (scope.mobileMenuOpen) {\n setViewportScroll.disable()\n } else {\n setViewportScroll.enable()\n }\n }\n\n $timeout(function () {\n initMobileTabs()\n }, 100) // Needs a slight timeout while waiting for ng-transclude to finish\n\n },\n controller: function($rootScope, $scope, $document, $window, $q, $http, $templateCache, locationSkipReload) {\n \"ngInject\"\n\n const self = this\n const tabs = []\n\n self.select = function (tab) {\n angular.forEach(tabs, function (tab) {\n tab.selected = false\n })\n tab.selected = true\n self.preloadTemplates(tab.heroTemplateUrl, tab.contentTemplateUrl)\n .then(function() {\n self.setUrls(tab.heroTemplateUrl, tab.contentTemplateUrl)\n self.setHeroHeight(tab.heroHeight)\n })\n }\n\n self.setUnderline = function(width, left) {\n $rootScope.$broadcast('clrTab:setUnderline', {\n width: width,\n left: left\n })\n }\n\n self.setScroll = function(forceToTabs) {\n const windowScrollTop = angular.element(window).scrollTop()\n const tabSetOffsetTop = angular.element('.tab-bar').offset().top\n const heroElement = angular.element('.clr-tab-hero')\n const heroBottom = heroElement.outerHeight() + heroElement.offset().top\n // Scroll to top if tabs aren't docked and hero isn't static\n if (windowScrollTop < tabSetOffsetTop && !$scope.heroNotSwappable) {\n $document.scrollTopAnimated(0)\n } else if (windowScrollTop >= tabSetOffsetTop || forceToTabs) {\n $document.scrollTopAnimated(heroBottom)\n }\n }\n\n self.setUrls = function(heroTemplateUrl, contentTemplateUrl) {\n $scope.heroTemplateUrl = heroTemplateUrl\n $scope.contentTemplateUrl = contentTemplateUrl\n }\n\n self.setHeroHeight = function(heroHeight) {\n if ($scope.heroTemplateUrl) {\n $scope.heroHeight = heroHeight || ''\n } else {\n $scope.heroHeight = 0\n }\n }\n\n self.preloadTemplates = function(heroTemplateUrl, contentTemplateUrl) {\n const heroPromise = heroTemplateUrl\n ? $http.get(heroTemplateUrl, {cache: $templateCache})\n : $q.when()\n const contentPromise = $http.get(contentTemplateUrl, {cache: $templateCache})\n return $q.all([heroPromise, contentPromise])\n }\n\n self.addTab = function(tab) {\n tabs.push(tab)\n }\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function ($rootScope, $anchorScroll, $document, $location, $timeout, $compile, setViewportScroll) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {},\n replace: true,\n transclude: true,\n template: '',\n link: function (scope, elem, attrs) {\n\n let activeTab;\n let anchorAtLoad\n const tabUnderlineElement = elem.find('.tab-bar__underline')\n\n // Initialize tabs\n function initTabs() {\n anchorAtLoad = $location.hash()\n if (anchorAtLoad) {\n // Scroll to anchor in url if it exists\n setActiveTab(anchorAtLoad)\n $anchorScroll()\n } else {\n // Otherwise set the active tab as the first anchor\n const firstAnchor = elem.find('a[clr-tab-anchor-name]').attr('clr-tab-anchor-name')\n setActiveTab(firstAnchor)\n }\n }\n\n // Mobile versions of clrTab have an alternate layout that requires minor modifications\n function initMobileTabs() {\n let duplicateButton\n const tabBarButton = elem.find(\".tab-bar__button\")\n if (tabBarButton) {\n duplicateButton = tabBarButton.clone()\n // recompile for any attribute directives, e.g. sample reuse modal\n // needed since button is cloned above\n duplicateButton = $compile(duplicateButton)($rootScope)\n elem.find(\".tab-bar__mobile\").append(duplicateButton)\n }\n }\n\n function setActiveTab(anchorName) {\n // Remove active class from previous tabs\n elem.find('a[clr-tab-anchor-name]').removeClass('js--active')\n elem.find('a[clr-tab-anchor-name]').attr(\"aria-selected\", false)\n // Add active class to new active tab\n activeTab = elem.find('a[clr-tab-anchor-name=\"' + anchorName + '\"]')\n activeTab.addClass('js--active')\n activeTab.attr(\"aria-selected\", true)\n // Move the underline\n setUnderline(tabUnderlineElement, activeTab)\n }\n\n // How to move the clr-tab__underline element\n function setUnderline(tabUnderlineElement, activeTab) {\n const activeTabParent = activeTab.parent()\n if (activeTabParent.length) {\n tabUnderlineElement.width(activeTabParent.width()).css('left', activeTabParent.position().left)\n }\n }\n\n // template ng-click triggers to scroll to anchors\n // expects the following HTML structure:\n // clr-tab-simple()\n // li.tab-bar__list\n // a.tab-bar__link(ng-click=\"$parent.goToAnchor($event)\", clr-tab-anchor-name=\"foo\") How it works\n scope.goToAnchor = function($event) {\n const anchorName = angular.element($event.currentTarget).attr('clr-tab-anchor-name')\n const anchorElement = angular.element('#' + anchorName)\n if (anchorElement.length) {\n $document.scrollToElementAnimated(anchorElement, 68)\n }\n scope.mobileMenuOpen = false\n setViewportScroll.enable()\n }\n\n scope.mobileToggleMenu = function(bool) {\n // setViewportScroll(!scope.mobileMenuOpen)\n scope.mobileMenuOpen = bool ? bool : !scope.mobileMenuOpen\n if (scope.mobileMenuOpen) {\n setViewportScroll.disable()\n } else {\n setViewportScroll.enable()\n }\n }\n\n $rootScope.$on('clrTabWaypoint:setActiveTab', function (event, anchorName) {\n setActiveTab(anchorName)\n })\n\n $timeout(function () {\n initTabs()\n initMobileTabs()\n })\n\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function ($rootScope, $timeout, $location) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n scope: false,\n link: function (scope, elem, attrs) {\n\n const waypoint = new Waypoint({\n // Unwrap the jQuery object\n element: elem[0],\n // Fire when the top of the element hits the bottom of the viewport\n offset: 68,\n // Disable waypoint until the element is ready.\n enabled: false,\n // trigger setActiveTab on clr-tab-simple directive when these waypoints are hit\n handler: function (direction) {\n $rootScope.$broadcast('clrTabWaypoint:setActiveTab', attrs.clrTabSimpleWaypoint)\n }\n })\n\n elem.ready(function () {\n $timeout(function () {\n waypoint.enable()\n }, 250)\n })\n\n scope.$on('$destroy', function () {\n waypoint.destroy()\n })\n\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function($rootScope) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n require: '^clrTabSet',\n scope: true,\n link: function(scope, elem) {\n $rootScope.$on('clrTab:setUnderline', function(event, data) {\n elem.width(data.width).css('left', data.left)\n })\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n require: 'ngModel',\n scope: {\n ngModel: '=',\n clrToggleOnInput: '='\n },\n link: function(scope, elem, attrs, ngModel) {\n scope.$watch(function() {\n return scope.ngModel\n }, function(newValue, oldValue) {\n if (!newValue) {\n scope.clrToggleOnInput = ''\n }\n })\n scope.$watch(function() {\n return scope.clrToggleOnInput\n }, function(newValue, oldValue) {\n if (newValue) {\n // When input is being typed in/has new value\n ngModel.$setViewValue(true)\n } else if (oldValue) {\n // When input has no val(), i.e. when input text is deleted\n ngModel.$setViewValue(false)\n }\n ngModel.$render()\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * File uploader.\n *\n * The uploader scope var must be a FileUploader.\n */\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'E',\n require: '?^form',\n templateUrl: '/directives/uploader.html',\n scope: {\n uploader: '=',\n hideFiles: '=',\n label: '@',\n minFiles: '@'\n },\n link: function(scope, element, attrs, formController) {\n function validate() {\n if (formController && scope.minFiles) {\n const isValid = scope.uploader.queue.length >= scope.minFiles\n formController.$setValidity('minFiles', isValid)\n }\n }\n\n scope.removeFile = function(file) {\n file.cancel()\n file.remove()\n if (scope.uploader.onRemoveFile) {\n scope.uploader.onRemoveFile(file)\n }\n validate()\n }\n\n const originalOnSuccessItem = scope.uploader.onSuccessItem\n scope.uploader.onSuccessItem = function(item, response, status, headers) {\n originalOnSuccessItem(item, response, status, headers)\n validate()\n }\n\n // Remove the file if it fails to upload - otherwise users may not notice that their upload failed\n const originalOnErrorItem = scope.uploader.onErrorItem\n scope.uploader.onErrorItem = function(item, response, status, headers) {\n originalOnErrorItem(item, response, status, headers)\n scope.removeFile(item)\n validate()\n }\n\n validate()\n }\n }\n}\n","\"use strict\"\n\n/**\n * Video directive for the video boxes with a full image background,\n * a play button in the center, and a bottom blue overlay bar w/ text\n */\nmodule.exports = function () {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n videoName: '@',\n imageName: '@',\n buttonSize: '@?',\n contentPadding: '@?',\n contentClass: '@?'\n },\n transclude: true,\n templateUrl: '/directives/clr_video_block_player.html',\n link: function (scope) {\n scope.buttonSize = scope.buttonSize ? scope.buttonSize : 'large' // valid values are 'small' and 'large'\n scope.contentPadding = scope.contentPadding ? scope.contentPadding : 'large' // valid values are 'small' and 'large'\n scope.contentClass = scope.contentClass ? scope.contentClass : ''\n }\n }\n}\n","\"use strict\"\n\n/**\n * Video directive for the videos that appear as thumbnails with an image background\n * and a play button in the center, open appearing in 3-up lists\n */\nmodule.exports = function () {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n videoName: '@',\n imageName: '@',\n contentClass: '@?'\n },\n template: `\n
\n \n
\n
\n
\n `,\n link: function (scope) {\n scope.contentClass = scope.contentClass ? scope.contentClass : ''\n }\n }\n}\n","\"use strict\"\n\n// https://stackoverflow.com/questions/17417607/angular-ng-bind-html-and-directive-within-it\n\nmodule.exports = function($compile) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n const ensureCompileRunsOnce = scope.$watch(\n function(scope) {\n return scope.$eval(attrs.htmlCompile)\n },\n function(value) {\n // When 'compile' expression changes assign it to the DOM\n element.html(value)\n\n // compile the new DOM and link to the current scope\n $compile(element.contents())(scope)\n\n // Use un-watch feature so ensure complications happens only once\n ensureCompileRunsOnce()\n }\n )\n }\n }\n}\n","\"use strict\"\n\n/**\n * Validates the input value is equal to a given model.\n */\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n require: 'ngModel',\n scope: {\n confirmationFor: '='\n },\n link: function(scope, elem, attrs, ngModel) {\n // DOM to model validation\n ngModel.$parsers.unshift(function(value) {\n ngModel.$setValidity('confirmationFor', value == scope.confirmationFor)\n return value\n })\n // model to DOM validation\n ngModel.$formatters.unshift(function(value) {\n ngModel.$setValidity('confirmationFor', value == scope.confirmationFor)\n return value\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * Directs user to a path to avoid using an anchor tag (which causes weird styling sometimes).\n * Useful for enabling a click handler to a large element, like lists of image+text items\n */\nmodule.exports = function goTo($location, $route, $window) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n scope: {\n goTo: '@'\n },\n link: (scope, elem) => {\n const urlRegex = /^((https?|http):\\/\\/)(?:\\S+(?::\\S*)?)/\n\n elem.bind('click', () => {\n if (scope.goTo[0] == '/') { // This way of grabbing the first character is more performant than regex, .charAt(0), and .substring(0, 1)\n $location.path(scope.goTo)\n $route.reload() // Required for performance reasons, $location takes > 1s to process otherwise\n } else if (urlRegex.test(scope.goTo)) {\n $window.location = scope.goTo\n } else {\n console.info('goTo attribute is not a valid URL or path')\n }\n })\n }\n }\n}\n","\"use strict\"\n\n// Event related directives\n/////////////////////////////\n\n/**\n * Focus on the element when it is compiled.\n */\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n link: function(scope, elem, attrs) {\n const initFocusExpr = attrs.initFocus\n if (!initFocusExpr || scope.$eval(initFocusExpr)) {\n scope.$applyAsync(function () {\n elem.focus()\n })\n }\n }\n }\n}\n","\"use strict\"\n\n/**\n * Fetches and displays the kit price via an element directive.\n *\n * Usage example:\n * \n */\nmodule.exports = function($q, kitPriceService, sku, promoCodeStore, claimStore) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n templateUrl: '/directives/kit_price_text.html',\n scope: {\n sku: '@',\n allClass: '@?',\n strikeClass: '@?',\n hideStrike: '=?',\n basePriceOnly: '=?'\n },\n link: function(scope, elem) {\n const skuObj = sku[scope.sku];\n\n const updateScope = () => {\n scope.basePrice = kitPriceService.getAdvertisedKitPriceDollars(skuObj);\n scope.activePrice = kitPriceService.getDisplayedKitPrice(skuObj);\n scope.showStrike = scope.basePrice != scope.activePrice && !scope.hideStrike;\n };\n\n $q.all([promoCodeStore.init(), claimStore.getClaim()]).finally(updateScope()).catch((e) => { throw e } );\n\n }\n };\n}\n","\"use strict\"\n\n// Toast related directives\n/////////////////////////////\n\n/**\n * Pops toast for django messages\n */\nmodule.exports = function(ngToast) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n scope: {\n popToast: '@',\n popToastTags: '@'\n },\n link: function(scope, elem, attrs) {\n ngToast.create({ className: scope.popToastTags, content: scope.popToast })\n }\n }\n}\n","\"use strict\"\n\nconst BANNER_TYPE_ENTERPRISE = 'enterprise'\nconst BANNER_TYPE_REFERRAL = 'referral'\n\n/**\n * Promo Banner\n */\nmodule.exports = function(auth, promoCodeStore, claimStore, kitPriceService, sku, corporateLogos, PromoBanner, $location) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n bannerType: '=?',\n fullWidth: '=?',\n topOfPage: '=?',\n },\n templateUrl: '/directives/promo_banner.html',\n link: function(scope) {\n\n scope.auth = auth\n scope.promoCodeStore = promoCodeStore\n scope.corporateLogos = corporateLogos\n\n if (promoCodeStore.code || claimStore.get()) {\n PromoBanner.get(\n {\n code: promoCodeStore.code,\n token: claimStore.get(),\n sku: $location.search().sku\n }\n ).$promise.then(\n function(banner) {\n // Bind the banner to the scope only if it's not an empty object.\n if (banner.text) {\n scope.banner = banner\n }\n }\n );\n }\n\n scope.shouldShowGiftIcon = function () {\n return scope.banner && (scope.banner.banner_type == BANNER_TYPE_ENTERPRISE || scope.banner.banner_type == BANNER_TYPE_REFERRAL)\n }\n\n scope.getBannerClass = function() {\n const classes = [];\n if (!scope.fullWidth) {\n classes.push('banner--max-width');\n }\n if (scope.topOfPage) {\n classes.push('banner--top-of-page')\n }\n const bannerType = scope.banner ? scope.banner.banner_type : scope.getBannerType()\n if (bannerType == BANNER_TYPE_ENTERPRISE || bannerType == BANNER_TYPE_REFERRAL) {\n classes.push('banner--navy')\n } else {\n classes.push('banner--yellow')\n }\n return classes.join(' ')\n }\n\n /**\n * DEPRECATED - We're moving banner logic to a backend endpoint (See ENG-325)\n */\n scope.getBannerType = function() {\n return null\n }\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = () => {\n \"ngInject\"\n\n return {\n restrict: 'E',\n template: `\n
\n
\n
\n 🎭 Mirroring {{auth.currentUser.email}}. Please stop before mirroring another user.\n
\n Stop\n
\n
\n
\n
\n
`,\n link: (scope) => {\n scope.stopImpersonating = () => {\n window.location.href = '/impersonate/stop/'\n }\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function () {\n \"ngInject\"\n\n return {\n restrict: 'A',\n link: function (scope, element, attrs) {\n element.on('click', function () {\n this.select()\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * The equivalent of setting:\n *\n * \n *\n * On an input element. With this you can just do:\n *\n * \n *\n */\nmodule.exports = function () {\n \"ngInject\"\n\n return {\n restrict: 'A',\n require: '^form',\n link: function (scope, element, attrs, formCtrl) {\n const getName = function () {\n return attrs.showErrorOnBlur && attrs.showErrorOnBlur != \"show-error-on-blur\" ? attrs.showErrorOnBlur : attrs.name\n }\n\n element.on('focus', function (event) {\n scope.$applyAsync(function () {\n // Check if form exists as it may be removed\n const form = formCtrl[getName()]\n if (form) form.showError = true\n })\n })\n\n element.on('blur', function (event) {\n scope.$applyAsync(function () {\n // Check if form exists as it may be removed\n const form = formCtrl[getName()]\n if (form) form.showError = true\n })\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * Stops input from submitting form on enter\n */\nmodule.exports = function () {\n \"ngInject\"\n\n return {\n restrict: 'A',\n link: function (scope, elem) {\n elem.bind(\"keydown keyup\", function (event) {\n if (event.which == 13) {\n event.preventDefault()\n }\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * Stops propagating event.\n */\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n link: function(scope, elem, attrs) {\n elem.bind(attrs.stopPropagationOn, function(e) {\n e.stopPropagation()\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * Creates a .tab-bar element for tabs with paths attached, also handles translations\n */\nmodule.exports = function($location, $filter, $anchorScroll, $timeout) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n scope: {\n tabBar: '='\n },\n templateUrl: '/directives/tabBar.html',\n link: function(scope, elem, attrs) {\n elem.addClass(\"tab-bar\")\n const tab = $filter('filter')(scope.tabBar, {url: $location.path()})\n if (tab.length) {\n tab[0].active = true\n } else {\n scope.tabBar[0].active = true\n }\n $timeout(function() {$anchorScroll()}, 200)\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function($templateCache, $translate) {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n name: '@?',\n message: '@?',\n string: '@?'\n },\n template: '',\n link: function (scope) {\n if (scope.string) {\n if (!scope.name) {\n scope.name = scope.string.toLowerCase().replace(/\\./g, '/')\n }\n $translate(scope.string).then(function(message) {\n $templateCache.put(scope.name + '.html', '

' + message + '

')\n })\n } else {\n $templateCache.put(scope.name + '.html', '

' + scope.message + '

')\n }\n }\n }\n}\n","// Paraphrased from https://github.com/angular-ui/ui-select/issues/258#issuecomment-75227867\n\nmodule.exports = function() {\n return {\n require: 'ngModel',\n link: function(scope, elm, attrs, ctrl) {\n ctrl.$validators.uiSelectRequired = function(modelValue, viewValue) {\n if (attrs.uiSelectRequired) {\n if (!scope.$eval(attrs.uiSelectRequired)) {\n return true\n }\n }\n\n let determineVal;\n if (angular.isArray(modelValue)) {\n determineVal = modelValue;\n } else if (angular.isArray(viewValue)) {\n determineVal = viewValue;\n } else {\n return false;\n }\n return determineVal.length > 0;\n }\n }\n }\n}\n","\"use strict\"\n\n/**\n * Validates input value is unique in given array.\n */\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n require: 'ngModel',\n link: function(scope, elem, attrs, ctrl) {\n ctrl.$parsers.unshift(function(viewValue) {\n if (scope[attrs.unique].indexOf(viewValue) > -1) {\n ctrl.$setValidity('unique', false)\n return undefined\n } else {\n ctrl.$setValidity('unique', true)\n return viewValue\n }\n })\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function($animate, waffle) {\n \"ngInject\"\n\n return {\n multiElement: true,\n restrict: 'A',\n link: function($scope, element, attr) {\n const switchName = attr.waffleIfNotSwitch;\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n const enabled = !waffle.switch_is_active(switchName);\n $animate[enabled ? 'removeClass' : 'addClass'](element, 'ng-hide', {\n tempClasses: 'ng-hide-animate'\n })\n }\n }\n}\n","\"use strict\"\n\n// This code is very similar to that of ng-hide, except that we don't watch the\n// attribute value for changes.\n//\n// c.f. https://github.com/angular/angular.js/blob/v1.3.19/src/ng/directive/ngShowHide.js\nmodule.exports = function($animate, waffle) {\n \"ngInject\"\n\n return {\n multiElement: true,\n restrict: 'A',\n link: function($scope, element, attr) {\n const switchName = attr.waffleIfSwitch;\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n const enabled = waffle.switch_is_active(switchName);\n $animate[enabled ? 'removeClass' : 'addClass'](element, 'ng-hide', {\n tempClasses: 'ng-hide-animate'\n })\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function($animate, waffle) {\n \"ngInject\"\n\n return {\n multiElement: true,\n restrict: 'A',\n link: function($scope, element, attr) {\n const switchName = attr.waffleIfFlag;\n const enabled = waffle.flag_is_active(switchName);\n $animate[enabled ? 'removeClass' : 'addClass'](element, 'ng-hide', {\n tempClasses: 'ng-hide-animate'\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * Checkbox for array model.\n * Appends other text field at the end of the array.\n */\nmodule.exports = function($window) {\n \"ngInject\"\n\n return {\n restrict: 'A',\n scope: {\n href: '@',\n popupName: '@'\n },\n link: function(scope, elem) {\n elem.on('click', function(e) {\n e.preventDefault()\n const newWindow = $window.open(scope.href, scope.popupName, 'height=450,width=800')\n if (newWindow) {\n newWindow.opener = null;\n }\n })\n }\n }\n}\n","module.exports = function() {\n \"ngInject\"\n\n function titleCase(s) {\n return s.replace(/([a-z])([A-Z])/g, '$1 $2')\n .replace(/\\w\\S*/g, function(txt) {\n return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();\n })\n }\n\n return {\n restrict: 'A',\n link: function(scope, elem, attrs) {\n const attrKeys = Object.keys(attrs)\n\n elem.on('click', function(e) {\n const trackData = {}\n for (let i = 0; i < attrKeys.length; i++) {\n const attrKey = attrKeys[i];\n if (attrKey.match(/trackValue/)) {\n trackData[titleCase(attrKey.substr(10))] = attrs[attrKey]\n }\n }\n })\n }\n }\n}\n","\"use strict\"\n\n/**\n * Enables the jQuery plugin for sticky table headers\n */\n\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'A',\n link: function(scope, element) {\n element.stickyTableHeaders()\n }\n }\n}\n","/**\n * @prettier\n */\n\n/**\n * This component matches the reference ID defined in the attribute directive\n * to the card that shows the full list of references.\n */\nmodule.exports = function($document, $rootScope) {\n 'ngInject';\n\n return {\n restrict: 'A',\n link: function(scope, elem, attrs) {\n // Due to implementation optimizations, we're using a global event pattern\n // match up assorted `` in the document to the bottom references card\n // Therefore here we listen for that global event before matching a number to\n // the respective `
    ` list of references\n const renderReferenceWatch = $rootScope.$on('references:renderReference', function(\n event,\n referencesResolved\n ) {\n if (referencesResolved.count) {\n const references = referencesResolved.results;\n // Match up reference ID referenced here with ID matched in the resolved global event\n const index = references\n .map(function(ref) {\n return ref.id;\n })\n .indexOf(parseInt(attrs.reference));\n if (index > -1) {\n // Insert an anchor link with the ordered number to the lower references card\n elem\n .html(\n `${index + 1}`\n )\n .bind('click', function(e) {\n e.preventDefault();\n $document.scrollToElementAnimated(angular.element('#reference_' + attrs.reference));\n });\n } else {\n console.info('Reference not loaded: #' + attrs.reference);\n }\n }\n });\n scope.$on('$destroy', renderReferenceWatch);\n },\n };\n};\n","/**\n * @prettier\n */\n\nmodule.exports = function() {\n return {\n restrict: 'E',\n replace: true,\n template: `,`,\n scope: {\n refs: '=',\n },\n };\n};\n","/**\n * @prettier\n */\n\n/**\n * This renders the full list of references, usually at the bottom of each page\n * then sends a global event to each `` to render each reference ID in order\n * and matched with the unique set called on this card.\n */\nmodule.exports = function($rootScope, $timeout, Reference) {\n 'ngInject';\n\n return {\n restrict: 'A',\n scope: {\n references: '@',\n },\n transclude: true,\n template: `
    \n
    \n

    References

    \n
    \n
    \n
      \n
    1. \n \n
    2. \n
    \n
    \n \n
    \n
    `,\n link: function(scope, elem, attrs) {\n // TODO: Make references global service so that\n // we don't need to fetch everytime.\n if (scope.references) {\n // Remove duplicate values\n const unique = [];\n scope.references.split(',').filter(function(r) {\n if (unique.indexOf(r) == -1) {\n unique.push(r);\n }\n });\n scope.references = unique.join(',');\n $rootScope.$broadcast('references:requireReferences');\n Reference.get({ id__in: scope.references }).$promise.then(function(res) {\n // Related to above comment, temporary 1s timeout to ensure references render on client for varying network conditions.\n $timeout(function() {\n $rootScope.$broadcast('references:renderReference', res);\n }, 1500);\n scope.referencesResolved = res.results;\n });\n }\n },\n };\n};\n","/**\n * @prettier\n */\n\n/**\n * This component renders each individual reference in full text following the AMA citation style\n * https://owl.english.purdue.edu/owl/resource/1017/01/\n */\nmodule.exports = function(marked) {\n 'ngInject';\n\n return {\n scope: {\n reference: '=fullReference',\n },\n template:\n '{{reference.authors}}. . {{reference.journal}}. {{reference.date}};{{reference.volume}}({{reference.issue_number}}):{{reference.pages}}. {{reference.url_title}}.',\n link: function(scope) {\n // Markdown wraps the title in a

    and new line, so we need to remove it\n function updateTitle() {\n if (scope.reference) {\n scope.markdownTitle = marked(scope.reference.title).replace(/(

    |<\\/p>|\\s+$)/g, '');\n }\n }\n scope.$watch('reference.title', function() {\n updateTitle();\n });\n },\n };\n};\n","/**\n * Scope Parameters\n * field: object containing field data to construct input\n * e.g. {\n * label: 'Phone number',\n * name: 'Phone number',\n * type: 'text',\n * required: true\n * }\n * ngModel: object on which form values are set\n * selectOnChange: on-change callback for select inputs\n **/\n\n/**\n *\n * Input Types:\n * text: single-line input[type=text]\n * textarea: multi-line textarea\n * select: a select element, expects an \"options\" block\n * checkbox: displays a single clr-checkbox with a label appended to the right\n * helpText: displays help text, is not a form element\n *\n **/\n\nmodule.exports = () => {\n \"ngInject\"\n\n return {\n restrict: 'E',\n replace: true,\n scope: {\n field: '=',\n ngModel: '=',\n selectOnChange: '&?',\n },\n templateUrl: '/directives/input_field.html',\n link: (scope) => {\n // Set option.selected to populate select drop down\n if (scope.field.type == 'select'){\n scope.field.options.forEach(option => {\n option.selected = option.value == scope.ngModel[scope.field.name]\n })\n }\n }\n }\n}\n","'use strict'\n\nmodule.exports = () => {\n \"ngInject\"\n\n return {\n require: 'ngModel',\n link: function(scope, elem, attr, ctrl) {\n ctrl.$validators.injection = function(modelValue, viewValue) {\n if (ctrl.$isEmpty(modelValue)) {\n return true\n }\n const blacklist = ['<', '>']\n for (let i = 0; i < blacklist.length; i++) {\n if (viewValue.indexOf(blacklist[i]) != -1) {\n return false\n }\n }\n return true\n }\n }\n };\n}\n","'use strict'\n\nmodule.exports = ($location) => {\n 'ngInject'\n\n return {\n restrict: 'E',\n scope: {\n routes: '=',\n routeToText: '=',\n },\n templateUrl: '/directives/progress_bar.html',\n link: (scope) => {\n scope.currentRoute = $location.path()\n // rounding up to a multiple of 5\n scope.percentComplete = Math.ceil((100 * ((scope.routes.indexOf(scope.currentRoute) + 1) / scope.routes.length)) / 5) * 5\n }\n }\n}\n","\"use strict\"\n\nmodule.exports = function() {\n \"ngInject\"\n\n return {\n restrict: 'E',\n scope: {\n src: '@',\n height: '@?'\n },\n template: '',\n link: function (scope) {\n // If the height is not defined, then we display the image at half its actual size for retina display\n if (!scope.height) {\n const img = new Image()\n img.onload = function(){\n scope.height = img.height / 2\n }\n img.src = scope.src\n }\n }\n }\n}\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrEvent\n *\n * @description\n * The `clrEvent` provides DOM event related services.\n */\n const module = angular.module('clrEvent', [])\n\n /**\n * @ngdoc service\n * @name manuallyTriggerScroll\n * @memberof clrEvent\n *\n * @description\n * `manuallyTriggerScroll` manually triggers scroll event.\n *\n * @returns {KeyEvent}\n */\n module.factory('manuallyTriggerScroll', function($window) {\n let delayedScrollId\n return function() {\n if (delayedScrollId != void 0) {\n $window.clearTimeout(delayedScrollId)\n }\n delayedScrollId = $window.setTimeout(function() {\n angular.element(window).trigger('scroll')\n delayedScrollId = void 0\n }, 500)\n }\n })\n\n}();\n","const formatPhone = require('src/django_apps/core/static/js/format_phone');\n\n!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrFilter\n *\n * @description\n * The `clrFilter` is a collection of commonly used filters.\n */\n const module = angular.module('clrFilter', ['clrPhoneNumbers'])\n\n /**\n * @ngdoc filter\n * @name ordinalNumber\n * @memberof clrFilter\n *\n * @description\n * Converts integer into ordinal number string.\n * Supports up to Twentieth.\n */\n module.filter('ordinalNumber', function() {\n const suffixes = ['th', 'teenth'];\n const numStrs = ['', '', '', '', 'Four', 'Fif', 'Six', 'Seven', 'Eigh', 'Nine'];\n const specialCases = {\n 1: 'First',\n 2: 'Second',\n 3: 'Third',\n 10:'Tenth',\n 11: 'Eleventh',\n 12: 'Twelfth',\n 13: 'Thirteenth',\n 20: 'Twentieth'\n }\n\n return function (number) {\n if (number > 20) {\n return number\n }\n if (specialCases[number]) {\n return specialCases[number]\n }\n\n return numStrs[number % 10] + suffixes[Math.floor(number / 10)]\n }\n })\n\n /**\n * @ngdoc filter\n * @name pluralize\n * @memberof clrFilter\n *\n * @description\n * Appends \"_PLURAL\" to a given message bundle key\n * if a given count is more than 1.\n */\n module.filter('pluralize', function() {\n return function(msg, count) {\n if (count > 1) {\n msg += '_PLURAL'\n }\n return msg\n }\n })\n\n module.filter('genderNoun', function() {\n return function (gender, plural) {\n if (plural) {\n return gender == 'F' ? 'WOMEN' : 'MEN'\n } else {\n return gender == 'F' ? 'WOMAN' : 'MAN'\n }\n }\n })\n\n module.filter('genderPronoun', function() {\n return function (gender) {\n return gender == 'F' ? 'SHE' : 'HE'\n }\n })\n\n /**\n * @ngdoc filter\n * @name formatCentsSimple\n * @memberof clrFilter\n *\n * @description\n * Converts an integral number of cents into a simple currency string. If a\n * whole number of dollars, doesn't display a '.00', and adds commas every\n * three digits.\n */\n module.filter('formatCentsSimple', function(numberFilter) {\n return function(cents) {\n if (!angular.isNumber(cents)) {\n return cents\n } else if (cents % 100 == 0) {\n return numberFilter(cents / 100, 0)\n } else {\n return numberFilter(cents / 100, 2)\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name capitalize\n * @memberof clrFilter\n *\n * @description\n * Capitalizes first word, lowercases rest, if format is 'first',\n * capitalizes first word only if format is 'firstOnly',\n * capitalizes 2-letter words if format is 'team',\n * and capitalizes all words if format is undefined.\n */\n module.filter('capitalize', function () {\n return function (words, format) {\n if (!words) {\n return words\n }\n\n if (format == 'first') {\n // Capitalize the first letter of a sentence\n return words.charAt(0).toUpperCase() + words.slice(1).toLowerCase()\n } if (format == 'firstOnly') {\n return words.charAt(0).toUpperCase() + words.slice(1)\n } else {\n words = words.split(' ');\n const capitalizedWords = [];\n\n words.forEach(function(word) {\n if (word.length == 2 && format == 'team') {\n // Uppercase team abbreviations like FC, CD, SD\n capitalizedWords.push(word.toUpperCase())\n } else {\n capitalizedWords.push(word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n }\n })\n return capitalizedWords.join(' ')\n }\n }\n })\n\n module.filter('joinEnglishList', function() {\n return function (words, oxComma) {\n if (words.length <= 2) {\n return words.join(' and ')\n } else {\n if (!oxComma) {\n return words.slice(0, words.length - 1).join(', ') + ' and ' + words[words.length - 1]\n } else {\n return words.slice(0, words.length - 1).join(', ') + ', and ' + words[words.length - 1]\n }\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name ordinalSuffix\n * @memberof clrFilter\n *\n * @description\n * Adds an ordinal suffix to a number.\n * Supports -st, -nd, -rd, -th.\n */\n module.filter('ordinalSuffix', function() {\n const defaultSuffix = \"th\";\n const specialCases = {\n 1: 'st',\n 2: 'nd',\n 3: 'rd'\n }\n\n return function (number) {\n if (number > 3) {\n return number.toString() + defaultSuffix\n } else {\n return number.toString() + specialCases[number]\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name camel\n * @memberof clrFilter\n *\n * @description\n * Converts a string into camel case.\n */\n module.filter('camel', function() {\n return function(str) {\n return str.replace(/(\\s[a-z])/g, function($1) {\n return $1.toUpperCase().replace(' ','')\n })\n }\n })\n\n /**\n * @ngdoc filter\n * @name replace\n * @memberof clrFilter\n *\n * @description\n * Replace all occurance of search strings.\n */\n module.filter('replace', function() {\n return function(str, search, replace) {\n return str.replace(new RegExp(search, 'g'), replace)\n }\n })\n\n /**\n * @ngdoc filter\n * @name barcode\n * @memberof clrFilter\n *\n * @description\n * Converts a 14 digit integer into a barcode string\n */\n module.filter('barcode', function() {\n return function(str) {\n if (angular.isDefined(str) && str.length == 14) {\n return str.substring(0,2) + \"-\" + str.substring(2,6) + \"-\" + str.substring(6,10) + \"-\" + str.substring(10,14)\n } else {\n return str\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name tel\n * @memberof clrFilter\n *\n * @description\n * Converts a phone number integer value into\n * (xxx) xxx-xxxx or +x (xxx) xxx-xxxx or +x-xxx-xxx-xxxx\n */\n module.filter('tel', function () {\n return formatPhone\n })\n\n /**\n * @ngdoc filter\n * @name html\n * @memberof clrFilter\n *\n * @description\n * Renders text as html\n */\n module.filter('html', function ($sce) {\n return function (str) {\n return $sce.trustAsHtml(str)\n }\n })\n\n /**\n * @ngdoc filter\n * @name nullBooleanString\n * @memberof clrFilter\n *\n * @description\n * Converts null boolean value into its string representation.\n */\n module.filter('nullBooleanString', function() {\n return function(value, placeholder) {\n if (value == true) {\n return 'Yes'\n } else if (value == false) {\n return 'No'\n } else {\n return placeholder || 'Unknown'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name unique\n * @memberof clrFilter\n *\n * @description\n * (from https://github.com/a8m/angular-filter/blob/master/src/_filter/collection/unique.js)\n * get collection and filter duplicate members\n * if uniqueFilter get a property(nested to) as argument it's\n * filter by this property as unique identifier\n */\n module.filter('unique', function ($parse) {\n return function (collection, property) {\n\n // from a8m/angular-filter\n function toArray(object) {\n return angular.isArray(object) ? object : Object.keys(object).map(function(key) {\n return object[key]\n })\n }\n\n if (angular.isUndefined(collection)) {\n return false\n }\n\n collection = angular.isObject(collection) ? toArray(collection) : collection\n\n if (!angular.isArray(collection)) {\n return collection\n }\n\n //store all unique identifiers\n const uniqueItems = [];\n const get = $parse(property)\n\n return angular.isUndefined(property)\n //if it's kind of primitive array\n ? collection.filter(function (elm, pos, self) {\n return self.indexOf(elm) === pos\n })\n //else compare with equals\n : collection.filter(function (elm) {\n const prop = get(elm)\n if (some(uniqueItems, prop)) {\n return false\n }\n uniqueItems.push(prop)\n return true\n })\n\n //checked if the unique identifier is already exist\n function some(array, member) {\n if (angular.isUndefined(member)) {\n return false\n }\n return array.some(function(el) {\n return angular.equals(el, member)\n })\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name containsAny\n * @memberof clrFilter\n *\n * @description\n * Returns true if array contains any value inside another array\n */\n module.filter('containsAny', function() {\n return function(arr1, arr2) {\n if (angular.isArray(arr1) && angular.isArray(arr2)) {\n return arr2.some(function (v) {\n return arr1.indexOf(v) >= 0\n })\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name containsNone\n * @memberof clrFilter\n *\n * @description\n * Returns true if array contains no value from another array\n */\n module.filter('containsNone', function() {\n return function(arr1, arr2) {\n if (angular.isArray(arr1) && angular.isArray(arr2)) {\n const result = arr1.filter(function(item){ return arr2.indexOf(item) > -1})\n return result.length == 0\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name containsAll\n * @memberof clrFilter\n *\n * @description\n * Returns true if array contains all values of another array\n */\n module.filter('containsAll', function() {\n return function(arr1, arr2) {\n if (angular.isArray(arr1) && angular.isArray(arr2)) {\n return !!arr2.every(function(val) { return arr1.indexOf(val) >= 0 })\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name urlEncode\n * @memberof clrFilter\n *\n * @description\n * Returns url-encoded text\n */\n module.filter('urlEncode', function($window) {\n return $window.encodeURIComponent\n })\n\n /**\n * @ngdoc filter\n * @name limitRepeatTo\n * @memberof clrFilter\n *\n * @description\n * Add third param to `limitTo` $filter to allow for an offset\n */\n module.filter('limitRepeatTo', function() {\n return function(input, limit, begin) {\n if (angular.isDefined(input)) {\n return input.slice(begin, begin + limit)\n } else {\n return input\n }\n }\n })\n\n module.filter('googleSearchLink', function($window) {\n return function(terms, resultsSinceDate) {\n let dateFilterString = ''\n if (resultsSinceDate) {\n const monthsSince = Math.ceil((new Date() - new Date(resultsSinceDate)) / (1000*60*60*24*30))\n // as_qdr filters to results indexed in the past specified time period.\n // Docs here: https://developers.google.com/custom-search/docs/xml_results\n dateFilterString = '&as_qdr=m' + monthsSince\n }\n return 'https://www.google.com/search?q=' + $window.encodeURIComponent(terms) + dateFilterString\n }\n })\n\n module.filter('scholarSearchLink', function($window, $filter) {\n const maxScholarQueryLen = 255\n return function(terms, resultsSinceDate) {\n if (angular.isDefined(terms) && terms.length > maxScholarQueryLen) {\n // Truncate, and drop the last (possibly truncated) term as well as its preceding 'OR', if needed\n terms = terms.substring(0, maxScholarQueryLen).replace(/( OR )?(\\S+)$/, ')')\n }\n let dateFilterString = ''\n if (resultsSinceDate) {\n // as_ylo filters to results published in the given year or later\n dateFilterString = '&as_ylo=' + $filter('date')(resultsSinceDate, 'yyyy')\n }\n return 'https://scholar.google.com/scholar?q=' + $window.encodeURIComponent(terms) + dateFilterString\n }\n })\n\n module.filter('clinvarSearchLink', function($window) {\n return function(searchTerm) {\n return 'https://www.ncbi.nlm.nih.gov/clinvar/?term=' + $window.encodeURIComponent(searchTerm)\n }\n })\n\n module.filter('testTypeName', function($filter, testTypes) {\n return function(testType) {\n if (testType == testTypes.pgxv1) {\n return \"PGx v1\"\n } else if (testType == testTypes.brca12 || testType == testTypes.fh3) {\n return testType.toUpperCase()\n } else {\n return $filter('capitalize')(testType)\n }\n }\n })\n\n module.filter('testTypeNames', function($filter) {\n return function(testTypes) {\n const testTypeNames = testTypes.map((testType) => $filter('testTypeName')(testType))\n return testTypeNames.join(', ')\n }\n })\n\n /**\n * @ngdoc filter\n * @name withBaseUrl\n * @memberof clrFilter\n *\n * @description\n * Returns the given string with the current base host prepended.\n */\n module.filter('withBaseUrl', function(wwwBaseHostUrl) {\n return function(url) {\n return wwwBaseHostUrl + url\n }\n })\n\n /**\n * @ngdoc filter\n * @name withLoggedInBaseUrl\n * @memberof clrFilter\n *\n * @description\n * Returns the given string with the logged-in hostname prepended.\n */\n module.filter('withLoggedInBaseUrl', function(wwwLoggedInBaseHostUrl) {\n return function(url) {\n return wwwLoggedInBaseHostUrl + url\n }\n })\n\n /**\n * @ngdoc filter\n * @name getFileNameFromS3Key\n * @memberof clrFilter\n *\n * @description\n * Returns the filename of the given S3 key.\n */\n module.filter('getFileNameFromS3Key', function() {\n return function(s3Key) {\n // The keys are generated with the format:\n // 'documents/{user_id}/{date}_{filename}'\n return s3Key.slice(s3Key.indexOf('_') + 1)\n }\n })\n\n /**\n * @ngdoc filter\n * @name internalRoleToUserFacingRole\n * @memberof clrFilter\n *\n * @description\n * Returns the user facing role name from the internal role constant.\n */\n module.filter('internalRoleToUserFacingRole', function(internalProviderRoles) {\n const _map = internalProviderRoles\n .reduce(function(acc, curr) {\n const roleConstant = curr[0]\n const roleName = curr[1]\n\n acc[roleConstant] = roleName\n return acc\n }, {})\n\n return function(internalRole) {\n return _map[internalRole]\n }\n })\n\n /**\n * @ngdoc filter\n * @name phonePrefixToCountryCode\n * @memberof clrFilter\n *\n * @description\n * Returns a best guess at the country code given a phone prefix.\n */\n module.filter('phonePrefixToCountryCode', function(geographicalArea) {\n return function(phonePrefix) {\n if (phonePrefix[0] !== '+') {\n phonePrefix = '+' + phonePrefix\n }\n\n return Object.keys(geographicalArea).filter(function(countryCode) {\n const information = geographicalArea[countryCode]\n const currentPhonePrefix = information[1]\n return currentPhonePrefix === phonePrefix\n })[0]\n }\n })\n\n /**\n * @ngdoc filter\n * @name cleanCurrency\n * @memberof clrFilter\n *\n * @description\n * Returns a two-decimal formatted currency, except when the value\n * has no fractional component, in which case the trailing\n * zeroes are removed.\n */\n module.filter('cleanCurrency', function($filter) {\n return function(amount, symbol) {\n if (amount % 1 == 0) {\n return $filter('currency')(amount, symbol, 0)\n } else {\n return $filter('currency')(amount, symbol, 2)\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name commaSeparatedList\n * @memberof clrFilter\n *\n * @description\n * Returns the array as a string, with elements separated by commas.\n */\n module.filter('commaSeparatedList', function() {\n return function(arr) {\n return arr.join(', ')\n }\n })\n\n /**\n * @ngdoc filter\n * @name cancerTypeToDisplayName\n * @memberof clrFilter\n *\n * @description\n * Returns the given cancer type's display name.\n */\n module.filter('cancerTypeToDisplayName', function(cancerTypes) {\n const cancerTypeToDisplayNameMap = Object.keys(cancerTypes)\n .map(function(key) {\n return cancerTypes[key]\n })\n .reduce(function(map, tuple) {\n const displayName = tuple[0]\n const cancerType = tuple[1]\n map[cancerType] = displayName\n return map\n }, {})\n\n return function(cancerType) {\n return cancerTypeToDisplayNameMap[cancerType]\n }\n })\n\n /**\n * @ngdoc filter\n * @name clrDate\n * @memberof clrFilter\n *\n * @description\n * Returns a datestring formatted as MMM dd, yyyy (e.g. 'Sep 08, 2017')\n * with optional prepended string (e.g. 'on', 'at', etc.)\n */\n module.filter('clrDate', function($filter) {\n return function(date, prependString) {\n prependString = prependString ? prependString + ' ' : '';\n let dateString = '';\n if (typeof date !== 'undefined' && date !== null) {\n dateString = date ? $filter('date')(new Date(date), 'MMM dd, yyyy') : '';\n }\n return prependString + dateString;\n }\n })\n\n /**\n * @ngdoc filter\n * @name percentage\n * @memberof colorApp\n *\n * @description\n * Converts decimal fractions into a percentage representation.\n */\n module.filter('percentage', function () {\n return function (input, decimals) {\n if (angular.isUndefined(input) || input === null || input === '') {\n return ''\n }\n const inputInStr = (parseFloat(input) * 100).toString();\n const splittedInput = inputInStr.split('.');\n const wholeNumber = splittedInput[0]\n\n if (splittedInput.length == 1 || decimals == 0) {\n return wholeNumber + '%'\n } else {\n const fraction = splittedInput[1];\n const end = Math.min(fraction.length, decimals)\n return wholeNumber + '.' + fraction.substr(0, end) + '%'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name eqSet\n * @memberof colorApp\n *\n * @description\n * Determines whether two sets are equal.\n *\n * Inspired from below:\n * https://stackoverflow.com/questions/31128855/comparing-ecma6-sets-for-equality\n */\n module.filter('eqSet', function () {\n return function(set1, set2) {\n if (set1.size !== set2.size) {\n return false;\n }\n\n for (const el1 of set1) {\n if (!set2.has(el1)) {\n return false;\n }\n }\n\n for (const el2 of set2) {\n if (!set1.has(el2)) {\n return false;\n }\n }\n\n return true;\n }\n })\n\n /**\n * @ngdoc filter\n * @name range\n * @memberof clrFilter\n *\n * @description\n * returns an array of values incremented by one up to and including total\n */\n module.filter('range', function() {\n return function(input, total) {\n for (let i = 0; i <= total; i++) {\n input.push(i)\n }\n return input\n }\n })\n\n}();\n","/**\n * @prettier\n */\n\nconst E164Regex = require('src/django_apps/core/static/js/e164_regex').E164Regex;\nconst phonePrefix = require('src/django_apps/core/static/js/geo_constants_definitions').phonePrefix;\n\n/**\n * Converts a phone number integer value into\n * (xxx) xxx-xxxx or +x (xxx) xxx-xxxx or +x-xxx-xxx-xxxx\n *\n * @param tel - The phone number to format\n * @param format - The format\n */\nfunction formatPhone(tel, format) {\n if (!tel) {\n return '';\n }\n let country;\n let number;\n let extension;\n\n // Handle telephone objects, generated by clr-phone-input in some cases\n // when a field is represented with a PhoneNumberField on the back-end.\n // eslint-disable-next-line\n if (typeof tel === 'object') {\n const prefix = phonePrefix(tel.country);\n number = tel.national_number;\n extension = tel.extension;\n\n if (!number) {\n return '';\n }\n\n tel = prefix + number;\n if (extension) {\n tel = tel + ';ext=' + extension;\n }\n }\n\n // Handle E.164-formatted telephone numbers. PhoneNumberFields will\n // return their values in this (very constrained) format. We can match it\n // with a single regex and save a lot of guesswork.\n const e164Match = E164Regex.exec(tel);\n\n if (e164Match) {\n country = e164Match[1];\n number = e164Match[2];\n extension = e164Match[3];\n let formatted;\n\n if (country === '1' && number.length === 10) {\n // Format +12015555555 => (201) 555-5555\n formatted = '(' + number.slice(0, 3) + ') ' + number.slice(3, 6) + '-' + number.slice(6);\n } else {\n // Format +441212345678 => +44 1212345678\n formatted = '+' + country + ' ' + number;\n }\n\n if (extension) {\n formatted += ' ext. ' + extension;\n }\n\n return formatted;\n }\n\n // Clean +-() characters from the input\n const value = tel\n .toString()\n .trim()\n // eslint-disable-next-line no-useless-escape\n .replace(/[\\+\\-()\\s]/g, '');\n\n // If there's anything other than numbers left in the input, return the\n // original value directly.\n if (value.match(/[^0-9]/)) {\n return tel;\n }\n\n let city;\n\n switch (value.length) {\n // Assumes US/Canada +1 telephone numbers\n // To handle more cases up to 15 digits, refer to https://en.wikipedia.org/wiki/List_of_country_calling_codes\n case 10: // PPP#######\n country = 1;\n city = value.slice(0, 3);\n number = value.slice(3);\n break;\n case 11: // CPPP#######\n country = value[0];\n city = value.slice(1, 4);\n number = value.slice(4);\n break;\n default:\n return tel;\n }\n\n number = number.slice(0, 3) + '-' + number.slice(3);\n\n let formatted;\n // For more format info, see https://en.wikipedia.org/wiki/Microsoft_telephone_number_format#Format_comparison_with_E.123\n if (format === 'international') {\n // infers E.123 telephone number, international notation\n // +C-PPP-###-####\n formatted = ('+' + country + '-' + city + '-' + number).trim();\n } else if (format === 'microsoft') {\n // infers Microsoft telephone number format\n // +C (PPP) ###-####\n formatted = ('+' + country + ' (' + city + ') ' + number).trim();\n } else {\n // infers E.123 telephone number, national notation\n // (PPP) ###-####\n formatted = ('(' + city + ') ' + number).trim();\n }\n\n if (extension) {\n return formatted + ' ext. ' + extension;\n } else {\n return formatted;\n }\n}\n\nmodule.exports = formatPhone;\n","// *** DO NOT EDIT THIS OBJECT MANUALLY ***\n// It is generated in Python using geographical_area.generate().\n//\n// To re-generate, edit django_apps.users.geographical_area, then run:\n//\n// $ python -m django_apps.users.geographical_area\n//\n// `shared_js` has no mechanism for testing. Until it is moved to a managed workspace, we test via\n// the applications that use this code.\n// See:\n// `$COLOR_ROOT/src/projects/home/frontend/src/lib/util/geoConstants/utils.test.ts`\n// `$COLOR_ROOT/src/django_apps/core/tests/js/geo_constants_spec.js\n// FIXME: When this moves into a yarn workspace, move the unit tests there.\n//\n\nmodule.exports = {}\n\n/* eslint-disable no-sparse-arrays */\nmodule.exports.geographicalArea = {\n AF: [\"Afghanistan\",\"+93\",,\"6\",10900],\n AL: [\"Albania\",\"+355\",,\"9\",10900],\n DZ: [\"Algeria\",\"+213\",,\"11\",12200],\n AS: [\"American Samoa\",\"+1\",,\"6\",11600,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\"],\n AD: [\"Andorra\",\"+376\",,\"5\",6900],\n AO: [\"Angola\",\"+244\",,\"6\",12200],\n AI: [\"Anguilla\",\"+1\",,\"5\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n AQ: [\"Antarctica\",,,,,,,false],\n AG: [\"Antigua and Barbuda\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n AR: [\"Argentina\",\"+54\",,\"4\",8100],\n AM: [\"Armenia\",\"+374\",,\"6\",9000],\n AW: [\"Aruba\",\"+297\",,\"4\",6600,,,,,,,,,,,,,,,,\"NL.png\"],\n AU: [\"Australia\",\"+61\",,\"12\",7900,,,,,\"Suburb\",45,3,\"State Code\",30,6,\"Postcode\",25,,[[\"city\",\"state\",\"postalCode\"]],[]],\n AT: [\"Austria\",\"+43\",,\"4\",9300],\n AZ: [\"Azerbaijan\",\"+994\",,\"6\",10700],\n BS: [\"Bahamas\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n BH: [\"Bahrain\",\"+973\",,\"5\",9800],\n BD: [\"Bangladesh\",\"+880\",,\"6\",7900],\n BB: [\"Barbados\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n BY: [\"Belarus\",\"+375\",,\"7\",10700,false],\n BE: [\"Belgium\",\"+32\",,\"4\",8200],\n BZ: [\"Belize\",\"+501\",,\"4\",8100],\n BJ: [\"Benin\",\"+229\",,\"5\",12200],\n BM: [\"Bermuda\",\"+1\",,\"4\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n BT: [\"Bhutan\",\"+975\",,\"10\",9500],\n BO: [\"Bolivia\",\"+591\",,\"5\",8100],\n BQ: [\"Bonaire, Sint Eustatius, and Saba\",\"+599\",,\"4\",6600,,,false,,,,,,,,,,,,,\"NL.png\"],\n BA: [\"Bosnia and Herzegovina\",\"+387\",,\"5\",10900],\n BW: [\"Botswana\",\"+267\",,\"5\",12200],\n BV: [\"Bouvet Island\",,,\"4\",9300,,,false,,,,,,,,,,,,,\"NO.png\"],\n BR: [\"Brazil\",\"+55\",,\"5\",8100,,,,,\"City\",80,2,\"State\",20,9,,100,\"99999-999\",[[\"city\",\"state\"],[\"postalCode\"],[\"taxId\"]],[],,,,true,18,\"Tax ID number (CPF)\",100,\"999.999.999-99\"],\n IO: [\"British Indian Ocean Territory\",\"+246\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n BN: [\"Brunei Darussalam\",\"+673\",,\"5\",10200],\n BG: [\"Bulgaria\",\"+359\",,\"4\",10900],\n BF: [\"Burkina Faso\",\"+226\",,\"5\",12200],\n BI: [\"Burundi\",\"+257\",,\"6\",11400,false],\n CV: [\"Cabo Verde\",\"+238\",,\"7\",11400],\n KH: [\"Cambodia\",\"+855\",,\"7\",10200],\n CM: [\"Cameroon\",\"+237\",,\"5\",12200],\n CA: [\"Canada\",\"+1\",\"(999) 999-9999\",\"3\",6800,,,,,\"City\",45,2,\"Province\",25,,,30,\"A9A 9A9\",[[\"city\",\"state\",\"postalCode\"]],[],,,,true],\n KY: [\"Cayman Islands\",\"+1\",,\"3\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n CF: [\"Central African Republic\",\"+236\",,\"7\",11400,false],\n TD: [\"Chad\",\"+235\",,\"7\",11400],\n CL: [\"Chile\",\"+56\",,\"4\",8100],\n CN: [\"China\",\"+86\",,\"5\",5500,,false],\n CX: [\"Christmas Island\",\"+61\",,,,,,false],\n CC: [\"Cocos (Keeling) Islands\",\"+61\",,,,,,false],\n CO: [\"Colombia\",\"+57\",,\"4\",8100],\n KM: [\"Comoros\",\"+269\",,\"6\",11400],\n CG: [\"Congo\",\"+242\",,\"6\",12200],\n CD: [\"Congo (DRC)\",\"+243\",,\"6\",11400,false],\n CK: [\"Cook Islands\",\"+682\",,\"6\",9500,,,,,\"Island\",70,,,0,4,\"Postcode\",30,,[[\"city\",\"postalCode\"]],[],\"NZ.png\"],\n CR: [\"Costa Rica\",\"+506\",,\"4\",8100],\n HR: [\"Croatia\",\"+385\",,\"4\",10900],\n CU: [\"Cuba\",\"+53\",,,,false,,false],\n CW: [\"Curaçao\",\"+599\",,\"4\",8200,,,false,,,,,,,,,,,,,\"NL.png\"],\n CY: [\"Cyprus\",\"+357\",,\"6\",9300],\n CZ: [\"Czechia\",\"+420\",,\"4\",10900],\n CI: [\"Côte d'Ivoire\",\"+225\",,\"6\",11400,false],\n DK: [\"Denmark\",\"+45\",,\"4\",9300],\n DJ: [\"Djibouti\",\"+253\",,\"6\",11400],\n DM: [\"Dominica\",\"+1\",\"(999) 999-9999\",\"6\",6600],\n DO: [\"Dominican Republic\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n EC: [\"Ecuador\",\"+593\",,\"4\",8100],\n EG: [\"Egypt\",\"+20\",,\"5\",8100],\n SV: [\"El Salvador\",\"+503\",,\"4\",8100],\n GQ: [\"Equatorial Guinea\",\"+240\",,\"7\",11400],\n ER: [\"Eritrea\",\"+291\",,\"6\",11400],\n EE: [\"Estonia\",\"+372\",,\"4\",10900],\n SZ: [\"Eswatini\",\"+268\",,\"6\",9300],\n ET: [\"Ethiopia\",\"+251\",,\"5\",11400],\n FK: [\"Falkland Islands (Malvinas)\",\"+500\",,\"7\",7200,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n FO: [\"Faroe Islands\",\"+298\",,\"7\",6900,,,,,,,,,,,,,,,,\"DK.png\"],\n FJ: [\"Fiji\",\"+679\",,\"7\",10200],\n FI: [\"Finland\",\"+358\",,\"4\",9300,,,,,\"Settlement\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[]],\n FR: [\"France\",\"+33\",,\"4\",6100,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[]],\n GF: [\"French Guiana\",\"+594\",,\"6\",7200,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n PF: [\"French Polynesia\",\"+689\",,\"4\",10200,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n TF: [\"French Southern Territories\",,,\"4\",6100,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n GA: [\"Gabon\",\"+241\",,\"5\",12200],\n GM: [\"Gambia\",\"+220\",,\"6\",12200],\n GE: [\"Georgia\",\"+995\",,\"8\",10700],\n DE: [\"Germany\",\"+49\",,\"4\",8200,,false,,,\"Settlement\",80,,,0,5,,20,,[[\"postalCode\",\"city\"]],[]],\n GH: [\"Ghana\",\"+233\",,\"6\",12200],\n GI: [\"Gibraltar\",\"+350\",,\"5\",6900,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n GR: [\"Greece\",\"+30\",,\"4\",9300],\n GL: [\"Greenland\",\"+299\",,\"8\",6900,,,,,,,,,,,,,,,,\"DK.png\"],\n GD: [\"Grenada\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n GP: [\"Guadeloupe\",\"+590\",,\"4\",6300,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n GU: [\"Guam\",\"+1\",,\"4\",9200,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\"],\n GT: [\"Guatemala\",\"+502\",,\"4\",8100],\n GG: [\"Guernsey\",\"+44\",,\"5\",6900,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n GN: [\"Guinea\",\"+224\",,\"6\",12200],\n GW: [\"Guinea Bissau\",\"+245\",,\"6\",11400],\n GY: [\"Guyana\",\"+592\",,\"6\",8100],\n HT: [\"Haiti\",\"+509\",,\"4\",6600],\n HM: [\"Heard Island and McDonald Islands\",,,\"12\",7900,,,false,,\"Suburb\",45,3,\"State Code\",30,6,\"Postcode\",25,,[[\"city\",\"state\",\"postalCode\"]],[],\"AU.png\"],\n VA: [\"Holy See (Vatican City State)\",\"+379\",,\"4\",6100,,,false],\n HN: [\"Honduras\",\"+504\",,\"4\",8100],\n HK: [\"Hong Kong\",\"+852\",,\"4\",7100,,,,,\"Village, Town, or District\",,15,\"Part of Hong Kong\",40,,,0,,[[\"city\"],[\"state\"]],[]],\n HU: [\"Hungary\",\"+36\",,\"4\",10900],\n IS: [\"Iceland\",\"+354\",,\"4\",9300],\n IN: [\"India\",\"+91\",,\"5\",5800,,false],\n ID: [\"Indonesia\",\"+62\",,\"5\",7900],\n IR: [\"Iran\",\"+98\",,,,false,,false],\n IQ: [\"Iraq\",\"+964\",,\"5\",9000,false],\n IE: [\"Ireland\",\"+353\",,\"4\",8200,,,,,\"Postal Town\",,,,0,8,,30,,[[\"city\"],[\"postalCode\"]],[]],\n IM: [\"Isle of Man\",\"+44\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n IL: [\"Israel\",\"+972\",,\"4\",9800,,,,,\"City\",70,,,0,7,,30,,[[\"postalCode\",\"city\"]],[]],\n IT: [\"Italy\",\"+39\",,\"4\",8200,,,,,\"Town\",45,2,\"Province\",25,5,,30,,[[\"postalCode\",\"city\",\"state\"]],[]],\n JM: [\"Jamaica\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n JP: [\"Japan\",\"+81\",,\"4\",8300],\n JE: [\"Jersey\",\"+44\",,\"5\",6900,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n JO: [\"Jordan\",\"+962\",,\"6\",9800],\n KZ: [\"Kazakhstan\",\"+7\",,\"6\",10900],\n KE: [\"Kenya\",\"+254\",,\"5\",11400],\n KI: [\"Kiribati\",\"+686\",,\"8\",10200],\n XK: [\"Kosovo\",\"+383\",,,,,,false],\n KW: [\"Kuwait\",\"+965\",,\"6\",9800],\n KG: [\"Kyrgyzstan\",\"+996\",,\"7\",10700],\n LA: [\"Laos\",\"+856\",,\"7\",10200],\n LV: [\"Latvia\",\"+371\",,\"4\",10900],\n LB: [\"Lebanon\",\"+961\",,\"5\",9000,false],\n LS: [\"Lesotho\",\"+266\",,\"5\",11400],\n LR: [\"Liberia\",\"+231\",,\"6\",12200],\n LY: [\"Libya\",\"+218\",,\"7\",11400,false],\n LI: [\"Liechtenstein\",\"+423\",,\"5\",6900],\n LT: [\"Lithuania\",\"+370\",,\"5\",10900],\n LU: [\"Luxembourg\",\"+352\",,\"4\",8200],\n MO: [\"Macau\",\"+853\",,\"5\",5800,,false,,,,,,,,,,,,,,\"CN.png\"],\n MG: [\"Madagascar\",\"+261\",,\"6\",12200],\n MW: [\"Malawi\",\"+265\",,\"6\",12200],\n MY: [\"Malaysia\",\"+60\",,\"5\",7900],\n MV: [\"Maldives\",\"+960\",,\"7\",10200],\n ML: [\"Mali\",\"+223\",,\"5\",12200],\n MT: [\"Malta\",\"+356\",,\"5\",9300],\n MH: [\"Marshall Islands\",\"+692\",,,,,,false],\n MQ: [\"Martinique\",\"+596\",,\"4\",6300,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n MR: [\"Mauritania\",\"+222\",,\"6\",11400],\n MU: [\"Mauritius\",\"+230\",,\"5\",12200],\n YT: [\"Mayotte\",\"+262\",,\"4\",11400,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n MX: [\"Mexico\",\"+52\",,\"4\",4500,,,,,\"Settlement\",50,5,\"State\",20,5,,30,\"99999\",[[\"postalCode\",\"city\",\"state\"]],[]],\n FM: [\"Micronesia\",\"+691\",,,,,,false],\n MD: [\"Moldova\",\"+373\",,\"6\",10700],\n MC: [\"Monaco\",\"+377\",,\"5\",6100],\n MN: [\"Mongolia\",\"+976\",,\"9\",10200],\n ME: [\"Montenegro\",\"+382\",,\"6\",10900],\n MS: [\"Montserrat\",\"+1\",,\"5\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n MA: [\"Morocco\",\"+212\",,\"4\",12200],\n MZ: [\"Mozambique\",\"+258\",,\"6\",12200],\n MM: [\"Myanmar\",\"+95\",,,,false,,false],\n NA: [\"Namibia\",\"+264\",,\"5\",12200],\n NR: [\"Nauru\",\"+674\",,\"7\",10200],\n NP: [\"Nepal\",\"+977\",,\"7\",10200],\n NL: [\"Netherlands\",\"+31\",,\"4\",8200],\n NC: [\"New Caledonia\",\"+687\",,\"7\",9500,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n NZ: [\"New Zealand\",\"+64\",,\"5\",7900,,,,,\"Settlement\",70,,,0,4,\"Postcode\",30,,[[\"city\",\"postalCode\"]],[]],\n NI: [\"Nicaragua\",\"+505\",,\"4\",8100],\n NE: [\"Niger\",\"+227\",,\"7\",11400],\n NG: [\"Nigeria\",\"+234\",,\"5\",12200],\n NU: [\"Niue\",\"+683\",,\"7\",10200,,,,,\"Settlement\",70,,,0,4,\"Postcode\",30,,[[\"city\",\"postalCode\"]],[],\"NZ.png\"],\n NF: [\"Norfolk Island\",\"+672\",,\"12\",7900,,,false,,\"Suburb\",45,3,\"State Code\",30,6,\"Postcode\",25,,[[\"city\",\"state\",\"postalCode\"]],[],\"AU.png\"],\n KP: [\"North Korea\",\"+850\",,,,false,,false],\n MK: [\"North Macedonia\",\"+389\",,\"5\",7900],\n MP: [\"Northern Mariana Islands\",\"+1\",,\"2-6\",995,,,false,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\",\"USPS\",\"First-class Mail\"],\n NO: [\"Norway\",\"+47\",,\"4\",9300],\n OM: [\"Oman\",\"+968\",,\"5\",9800],\n PK: [\"Pakistan\",\"+92\",,\"6\",9800],\n PW: [\"Palau\",\"+680\",,,,,,false],\n PS: [\"Palestine\",\"+970\",,,,,,false],\n PA: [\"Panama\",\"+507\",,\"4\",8100],\n PG: [\"Papua New Guinea\",\"+675\",,\"7\",10200],\n PY: [\"Paraguay\",\"+595\",,\"5\",8100],\n PE: [\"Peru\",\"+51\",,\"5\",8100],\n PH: [\"Philippines\",\"+63\",,\"5\",7900],\n PN: [\"Pitcairn\",\"+64\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n PL: [\"Poland\",\"+48\",,\"4\",10900],\n PT: [\"Portugal\",\"+351\",,\"4\",8200],\n PR: [\"Puerto Rico\",\"+1\",,\"2-6\",995,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\",\"USPS\",\"First-class Mail\"],\n QA: [\"Qatar\",\"+974\",,\"5\",9800],\n RO: [\"Romania\",\"+40\",,\"5\",10900],\n RU: [\"Russian Federation\",\"+7\",,\"6\",10700,,false],\n RW: [\"Rwanda\",\"+250\",,\"5\",11400],\n RE: [\"Réunion\",\"+262\",,\"4\",11400,,false,,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n BL: [\"Saint Barthélemy\",\"+590\",,\"4\",6600,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n SH: [\"Saint Helena, Ascension and Tristan da Cunha\",\"+290\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n KN: [\"Saint Kitts and Nevis\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n LC: [\"Saint Lucia\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n MF: [\"Saint Martin (French part)\",\"+590\",,\"4\",6100,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n PM: [\"Saint Pierre and Miquelon\",\"+508\",,\"4\",6100,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n VC: [\"Saint Vincent and the Grenadines\",\"+1\",\"(999) 999-9999\",\"5\",6600],\n WS: [\"Samoa\",\"+685\",,\"6\",10200],\n SM: [\"San Marino\",\"+378\",,\"5\",6100],\n ST: [\"Sao Tome and Principe\",\"+239\",,\"8\",11400],\n SA: [\"Saudi Arabia\",\"+966\",,\"4\",9000],\n SN: [\"Senegal\",\"+221\",,\"5\",12200],\n RS: [\"Serbia\",\"+381\",,\"4\",10900],\n SC: [\"Seychelles\",\"+248\",,\"4\",12200],\n SL: [\"Sierra Leone\",\"+232\",,\"6\",11400],\n SG: [\"Singapore\",\"+65\",,\"5\",7100,,,,,\"City\",70,,,0,6,,30,,[[\"city\",\"postalCode\"]],[]],\n SX: [\"Sint Maarten (Dutch part)\",\"+1\",\"(999) 999-9999\",\"4\",6600,,,false,,,,,,,,,,,,,\"NL.png\"],\n SK: [\"Slovakia\",\"+421\",,\"4\",10900],\n SI: [\"Slovenia\",\"+386\",,\"4\",10900],\n SB: [\"Solomon Islands\",\"+677\",,\"6\",10200],\n SO: [\"Somalia\",\"+252\",,,,false,,false],\n ZA: [\"South Africa\",\"+27\",,\"5\",12200],\n GS: [\"South Georgia and the South Sandwich Islands\",\"+500\",,\"4\",9900,,,false,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n KR: [\"South Korea\",\"+82\",,\"8\",7800,,false],\n SS: [\"South Sudan\",\"+211\",,,,false,,false],\n ES: [\"Spain\",\"+34\",,\"4\",8200,,,,,\"Town\",40,30,\"Province\",30,5,,30,,[[\"postalCode\",\"city\",\"state\"]],[\"state\"]],\n LK: [\"Sri Lanka\",\"+94\",,\"5\",7900],\n SD: [\"Sudan\",\"+249\",,,,false,,false],\n SR: [\"Suriname\",\"+597\",,\"7\",8100],\n SJ: [\"Svalbard and Jan Mayen\",\"+47\",,\"4\",9300,,,false,,,,,,,,,,,,,\"NO.png\"],\n SE: [\"Sweden\",\"+46\",,\"4\",9300],\n CH: [\"Switzerland\",\"+41\",,\"4\",9300],\n SY: [\"Syria\",\"+963\",,,,false,,false],\n TW: [\"Taiwan\",\"+886\",,\"4\",7100],\n TJ: [\"Tajikistan\",\"+992\",,\"7\",10700],\n TZ: [\"Tanzania\",\"+255\",,\"5\",12200],\n TH: [\"Thailand\",\"+66\",,\"5\",7900],\n TL: [\"Timor-Leste\",\"+670\",,\"10\",9500],\n TG: [\"Togo\",\"+228\",,\"5\",12200],\n TK: [\"Tokelau\",\"+690\",,\"5\",7900,,,false,,\"Settlement\",70,,,0,4,\"Postcode\",30,,[[\"city\",\"postalCode\"]],[],\"NZ.png\"],\n TO: [\"Tonga\",\"+676\",,\"7\",10200],\n TT: [\"Trinidad and Tobago\",\"+1\",\"(999) 999-9999\",\"4\",6600],\n TN: [\"Tunisia\",\"+216\",,\"6\",11400],\n TM: [\"Turkmenistan\",\"+993\",,,,,,false],\n TC: [\"Turks and Caicos Islands\",\"+1\",,\"4\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n TV: [\"Tuvalu\",\"+688\",,\"7\",10200],\n TR: [\"Türkiye\",\"+90\",,\"4\",9800],\n UG: [\"Uganda\",\"+256\",,\"5\",12200],\n UA: [\"Ukraine\",\"+380\",,\"6\",10900],\n AE: [\"United Arab Emirates\",\"+971\",,\"4\",9800],\n GB: [\"United Kingdom\",\"+44\",,\"4\",9900,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[]],\n US: [\"United States\",\"+1\",\"(999) 999-9999\",\"2-6\",995,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],,\"USPS\",\"First-class Mail\"],\n UM: [\"United States Minor Outlying Islands\",,,\"2-6\",995,,,false,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\",\"USPS\",\"First-class Mail\"],\n UY: [\"Uruguay\",\"+598\",,\"5\",8100],\n UZ: [\"Uzbekistan\",\"+998\",,\"7\",10700],\n VU: [\"Vanuatu\",\"+678\",,\"6\",9500],\n VE: [\"Venezuela\",\"+58\",,\"4\",7200,false],\n VN: [\"Viet Nam\",\"+84\",,\"5\",7900],\n VG: [\"Virgin Islands, British\",\"+1\",,\"4\",6600,,,,,\"Town\",,,,0,8,\"Postcode\",100,,[[\"city\"],[\"postalCode\"]],[],\"GB.png\"],\n VI: [\"Virgin Islands, U.S.\",\"+1\",,\"2-6\",995,,,,,\"City\",55,2,\"State\",20,,\"Zip Code\",25,\"99999\",[[\"city\",\"state\",\"postalCode\"]],[],\"US.png\",\"USPS\",\"First-class Mail\"],\n WF: [\"Wallis and Futuna\",\"+681\",,\"4\",6100,,false,false,,\"Town Name and Sorting Code\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FR.png\"],\n EH: [\"Western Sahara\",,,,,,,false],\n YE: [\"Yemen\",\"+967\",,\"6\",9000,false],\n ZM: [\"Zambia\",\"+260\",,\"6\",12200],\n ZW: [\"Zimbabwe\",\"+263\",,\"5\",11400,false],\n AX: [\"Åland Islands\",\"+358\",,\"4\",9300,,,false,,\"Settlement\",70,,,0,5,,30,,[[\"postalCode\",\"city\"]],[],\"FI.png\"]\n};\n/* eslint-enable no-sparse-arrays */\n\nmodule.exports.getField = function(list, index, defaultValue) {\n // eslint-disable-next-line eqeqeq\n if (list == null || list[index] == null) {\n return defaultValue;\n }\n return list[index];\n}\n\nconst defaultAddressFieldOrder = [[\"city\"],[\"state\",\"postalCode\"]]\n\nconst defaultAddressOptionalFields = [\"state\",\"postalCode\"]\nmodule.exports.name = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 0, null)\n}\n\nmodule.exports.phonePrefix = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 1, null)\n}\n\nmodule.exports.phoneMask = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 2, null)\n}\n\nmodule.exports.daysToDeliver = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 3, null)\n}\n\nmodule.exports.shippingChargeCents = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 4, null)\n}\n\nmodule.exports.ourGovtOk = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 5, true)\n}\n\nmodule.exports.theirGovtOk = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 6, true)\n}\n\nmodule.exports.carrierOk = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 7, true)\n}\n\nmodule.exports.cityMaxlen = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 8, 80)\n}\n\nmodule.exports.cityLabel = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 9, \"City, Town, or Settlement\")\n}\n\nmodule.exports.cityWidth = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 10, 100)\n}\n\nmodule.exports.stateMaxlen = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 11, 50)\n}\n\nmodule.exports.stateLabel = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 12, \"State, Province, or Region\")\n}\n\nmodule.exports.stateWidth = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 13, 60)\n}\n\nmodule.exports.postalCodeMaxlen = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 14, 10)\n}\n\nmodule.exports.postalCodeLabel = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 15, \"Postal Code\")\n}\n\nmodule.exports.postalCodeWidth = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 16, 40)\n}\n\nmodule.exports.postalCodeMask = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 17, null)\n}\n\nmodule.exports.addressFieldOrder = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 18, defaultAddressFieldOrder)\n}\n\nmodule.exports.addressOptionalFields = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 19, defaultAddressOptionalFields)\n}\n\nmodule.exports.flagFilename = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 20, countryCode + \".png\")\n}\n\nmodule.exports.outboundShipperName = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 21, \"DHL\")\n}\n\nmodule.exports.outboundServiceName = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 22, \"Express Worldwide\")\n}\n\nmodule.exports.deliveredDutyPaid = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 23, false)\n}\n\nmodule.exports.taxIdMaxlen = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 24, null)\n}\n\nmodule.exports.taxIdLabel = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 25, null)\n}\n\nmodule.exports.taxIdWidth = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 26, null)\n}\n\nmodule.exports.taxIdMask = function(countryCode) {\n return module.exports.getField(module.exports.geographicalArea[countryCode], 27, null)\n}\n\nmodule.exports.fieldWidth = function(countryCode, field) {\n if (field === 'city') return module.exports.cityWidth(countryCode)\n if (field === 'state') return module.exports.stateWidth(countryCode)\n if (field === 'postalCode') return module.exports.postalCodeWidth(countryCode)\n if (field === 'taxId') return module.exports.taxIdWidth(countryCode)\n}\n\nmodule.exports.shippable = function (countryCode) {\n return module.exports.ourGovtOk(countryCode)\n && module.exports.theirGovtOk(countryCode)\n && module.exports.carrierOk(countryCode)\n}\n\nmodule.exports.hasAddressField = function (countryCode, fieldName) {\n const fieldOrder = module.exports.addressFieldOrder(countryCode)\n // fieldOrder is a nested array of the address fields for this country, so\n // we need to flatten them.\n const flattenedFields = [].concat.apply([], fieldOrder)\n return flattenedFields.indexOf(fieldName) !== -1\n}\n\nmodule.exports.isRequiredField = function (countryCode, fieldName) {\n const optionalFields = module.exports.addressOptionalFields(countryCode)\n return optionalFields.indexOf(fieldName) === -1\n}\n\nmodule.exports.allCountries = function() {\n const allCountries = []\n Object.keys(module.exports.geographicalArea).forEach(function (countryCode) {\n if (module.exports.ourGovtOk(countryCode) && module.exports.carrierOk(countryCode)) {\n allCountries.push(countryCode)\n }\n })\n allCountries.sort(function (a, b) {\n return module.exports.name(a).localeCompare(module.exports.name(b))\n })\n return allCountries\n}();\n\nmodule.exports.phoneCountries = function() {\n const phoneCountries = []\n Object.keys(module.exports.geographicalArea).forEach(function (countryCode) {\n if (module.exports.phonePrefix(countryCode) != null) {\n phoneCountries.push(countryCode)\n }\n })\n phoneCountries.sort(function (a, b) {\n return module.exports.name(a).localeCompare(module.exports.name(b))\n })\n return phoneCountries\n}();\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrLocation\n *\n * @description\n * The `clrLocation` provides utilities for handling URL operations.\n */\n const module = angular.module('clrLocation', [])\n\n /**\n * @ngdoc service\n * @name locationSkipReload\n * @memberof clrLocation\n *\n * @description\n * `locationSkipReload` will change the url without reloading $route, will resolve the\n * route/templates set in app.js, won't re-initialize $scope or the controller.\n *\n * @param {string} path - the intended path you want to change the url to.\n *\n * @example\n * locationSkipReload('/')\n */\n module.factory('locationSkipReload', function($rootScope, $location, $route) {\n // Add bool param to $location.path to prevent page reloading when changing routes\n // http://joelsaupe.com/programming/angularjs-change-path-without-reloading/\n const originalPath = $location.path\n return function (path) {\n const lastRoute = $route.current\n const un = $rootScope.$on('$locationChangeSuccess', function () {\n $route.current = lastRoute\n // Broadcast new event to pageTrack new route with GA, listener in app.js\n $rootScope.$broadcast('$locationSkipReloadSuccess', lastRoute, path)\n un()\n })\n return originalPath.apply($location, [path])\n }\n })\n\n /**\n * @ngdoc service\n * @name redirect\n * @memberof clrLocation\n *\n * @description\n * `redirect` allows to redirect user to a path specified in `next` query\n * param if present, otherwise it redirect user to a given path.\n *\n * @param {string} defaultPath - path used if `next` is not present in query param.\n *\n * @example\n * redirect('/')\n */\n module.factory('redirect', function($window, $location) {\n return function(defaultPath) {\n let next = $location.search().next\n if (next != void 0) {\n // Decode url\n next = decodeURIComponent(next)\n // Use this technique to derive the ?next URL because the route is relative,\n // this technique makes it absolute\n const parser = document.createElement('a')\n parser.href = next\n // IE11 doesn't set other anchor tag properties like .host or .hostname unless\n // you set it to itself (see https://grack.com/blog/2009/11/17/absolutizing-url-in-javascript/)\n // and use .hostname, not .host otherwise IE inserts the port (e.g. ':443') when\n // calling parser.host\n if (parser.hostname == '') {\n parser.href = parser.href\n }\n // Redirects to defaultPath if next url's host name\n // does not match with current URL to prevent unvalidated\n // redirects and forwards that can be used for phishing attacks.\n if ($window.location.hostname == parser.hostname) {\n // Reload the route and don't let angular pushState it, solves email\n // confirmation loop issues in html5mode since the /confirm_email\n // route is Django-based, not angular\n console.log(`Angular redirecting to '${next}'.`);\n $window.location.href = next\n } else {\n console.log(`Angular redirecting to '${defaultPath}', wiping next query param.`);\n $location.search('next', null)\n $location.path(defaultPath)\n }\n } else {\n console.log(`Angular redirecting to '${defaultPath}'.`);\n $location.path(defaultPath)\n }\n }\n })\n\n /**\n * @class PathFlow\n *\n * @description\n * A class that allows to restrict an order of paths that user can visit.\n *\n * @param {Array} flow - ordered object with properties like controller and path.\n * @param {Object} $window - A window service.\n * @param {Object} $location - A location service.\n */\n function PathFlow(name, flow, options, $rootScope, $window, $location) {\n this._flow = flow\n this._pathInFlow = flow.map(function(config) {\n return config.path\n })\n this.startEventName = name + ':start'\n this.resetEventName = name + ':reset'\n\n /**\n * @member {boolean} skipToEnd - when all flows are completed, skips to the end.\n * @default true\n * @memberof PathFlow#\n */\n this.skipToEnd = angular.isDefined(options.skipToEnd) ? options.skipToEnd : true\n\n /**\n * @member {boolean} skipReset - skips reset once if this is set to true.\n * @default false\n * @memberof PathFlow#\n */\n this.skipReset = false\n /**\n * @member {Object} completed - completion stat of each step in the flow.\n * Key is step's path and value is boolean.\n * @memberof PathFlow#\n */\n this.completed = {}\n /**\n * @member {string} current - current path in the flow.\n * @memberof PathFlow#\n */\n this.current = null\n /**\n * @member {Object} state - an object for storing arbitrary information specific to the flow.\n * @memberof PathFlow#\n */\n this.state = {}\n\n /**\n * @method reset\n * @memberof PathFlow#\n *\n * @description\n * Resets flow to the initial state.\n */\n this.reset = function() {\n if (this.skipReset) {\n this.skipReset = false\n return\n }\n this.completed = {}\n this.current = null\n this.state = {}\n $rootScope.$broadcast(this.resetEventName)\n }\n\n /**\n * @method route\n * @memberof PathFlow#\n *\n * @description\n * Routes user.\n *\n * @param {string} path - name of the next path.\n */\n this.route = function(path) {\n // do not route if path is irrelevant to this flow.\n // also reset flow.\n if (this._pathInFlow.indexOf(path) == -1) {\n this.reset()\n return\n }\n\n // If this is start of flow, it initialize current path and\n // broadcast start event.\n if (this._pathInFlow.indexOf(path) == 0 && !this.current) {\n this.current = this._flow[0].path\n $rootScope.$broadcast(this.startEventName)\n }\n\n if (this.skipToEnd) {\n const lastFlow = this._flow[this._flow.length - 1]\n\n if (this.completed[lastFlow.path]) {\n if (path != lastFlow.path) {\n $location.path(lastFlow.path).replace()\n }\n return\n }\n }\n\n for (let i = 0; i < this._flow.length - 1; i++) {\n const curFlow = this._flow[i]\n\n if (path == curFlow.path) {\n return\n }\n\n if (!this.completed[curFlow.path] && !curFlow.optional) {\n $location.path(curFlow.path).replace()\n return\n }\n }\n }\n\n /**\n * @method goTo\n * @memberof PathFlow#\n *\n * @description\n * Changes path and mark a given path as completed.\n *\n * @param {string} path - A next path.\n * @param {string} done - A path to mark as completed.\n * @param {object} params - Name:value pairs to append as query params, i.e. ?name=value\n */\n this.goTo = function(path, done, params) {\n if (done) {\n this.completed[this.current] = true\n }\n this.current = path\n if (params) {\n $location.path(path).search(params)\n } else {\n $location.path(path)\n }\n $window.scrollTo(0, 0)\n }\n }\n\n /**\n * @ngdoc service\n * @name pathFlow\n * @memberof clrLocation\n *\n * @description\n * A factory which creates a path flow object that lets restrict path access order.\n *\n * @param {Array} flow - A list of objects with properties: controller and path.\n * User can only visit these path in a given order.\n * @returns {PathFlow} An instance of `PathFlow`.\n *\n * @example\n * var flow = pathFlow([\n * { controller: 'QuantityController', path: '/purchase/quantity' }\n * , { controller: 'ShippingController', path: '/purchase/shipping' }\n * , { controller: 'BillingController', path: '/purchase/billing' }\n * , { controller: 'ReviewController', path: '/purchase/review' }\n * ])\n *\n * // To change path and mark current path as completed:\n * flow.goTo('/purchase/shipping', '/purchase/quantity')\n *\n * // when routeChangeStart event is triggered:\n * flow.route(next.$$route.originalPath)\n */\n module.factory('pathFlow', function($rootScope, $window, $location) {\n return function(name, flow, options) {\n return new PathFlow(name, flow, options || {}, $rootScope, $window, $location)\n }\n })\n\n module.factory('getPrevPath', function(routeHistory) {\n return function() {\n if (routeHistory.length > 1) {\n return routeHistory[routeHistory.length - 2]\n }\n return null\n }\n })\n}();\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrModal\n *\n * @description\n * The `clrModal` provides common modals.\n */\n const module = angular.module('clrModal', ['ui.bootstrap'])\n\n function TextareaInputModalController($scope, $modalInstance, onSave, title, buttonText, placeholder, initValue) {\n $scope.title = title\n $scope.buttonText = buttonText\n $scope.placeholder = placeholder\n $scope.note = initValue\n $scope.save = function(note) {\n $scope.saving = true\n return onSave(note)\n .then(function() {\n $modalInstance.close()\n })\n .finally(function() {\n $scope.saving = false\n })\n }\n }\n\n /**\n * @ngdoc service\n * @name textareaInputModal\n * @memberof clrModal\n *\n * @description\n * A modal with textarea input.\n */\n module.factory('textareaInputModal', function($modal) {\n return {\n open: function(onSave, title, buttonText, placeholder, initValue, size) {\n return $modal.open({\n templateUrl: '/textarea_input_modal.html',\n controller: TextareaInputModalController,\n size: size || 'lg',\n resolve: {\n onSave: function() {\n return onSave\n },\n title: function() {\n return title\n },\n buttonText: function() {\n return buttonText\n },\n placeholder: function() {\n return placeholder\n },\n initValue: function() {\n return initValue\n }\n }\n })\n }\n }\n })\n\n module.factory('dismissableErrorToast', function(ngToast) {\n return function(msg) {\n ngToast.create({\n className: 'error',\n content: msg,\n timeout: 20000,\n dismissButton: true\n })\n }\n })\n\n function TextModalController($scope, $modalInstance, title, text, buttonText, state, isHtml, cancelButtonText, onSave, isMarkdown, showContactSupportText, showCloseButton) {\n $scope.title = title\n $scope.text = text\n $scope.buttonText = typeof buttonText !== 'undefined' ? buttonText : \"Done\";\n $scope.showContactSupportText = showContactSupportText\n $scope.state = typeof state !== 'undefined' ? state : \"\";\n $scope.isHtml = isHtml\n $scope.isMarkdown = isMarkdown\n $scope.cancelButtonText = cancelButtonText\n $scope.showCloseButton = typeof showCloseButton !== 'undefined' ? showCloseButton : true;\n\n $scope.save = function() {\n if (onSave) {\n $scope.saving = true\n return onSave()\n .then(function() {\n $modalInstance.close()\n })\n .finally(function() {\n $scope.saving = false\n })\n } else {\n $modalInstance.close()\n }\n }\n }\n\n /**\n * @ngdoc service\n * @name textModal\n * @memberof clrModal\n *\n * @description\n * A generic text modal.\n */\n module.factory('textModal', function($modal) {\n return {\n open: function(title, text, buttonText, state, isHtml, cancelButtonText, onSave, isMarkdown, showContactSupportText, showCloseButton) {\n return $modal.open({\n templateUrl: '/text_modal.html',\n controller: TextModalController,\n size: 'md',\n resolve: {\n title: function() {\n return title\n },\n text: function() {\n return text\n },\n buttonText: function() {\n return buttonText\n },\n showContactSupportText: function() {\n return showContactSupportText\n },\n state: function() {\n return state\n },\n isHtml: function() {\n return !!isHtml\n },\n cancelButtonText: function() {\n return cancelButtonText\n },\n onSave: function() {\n return onSave\n },\n isMarkdown: function() {\n return isMarkdown\n },\n showCloseButton: function() {\n return showCloseButton\n }\n }\n })\n }\n }\n })\n\n function TextSaveModalController($scope, $modalInstance, title, buttonText, placeholder, resource, fieldName) {\n $scope.title = title\n $scope.buttonText = buttonText\n $scope.placeholder = placeholder\n $scope.note = resource[fieldName]\n $scope.save = function(note) {\n $scope.saving = true\n resource[fieldName] = note\n resource.$save()\n .then(function() {\n $modalInstance.close()\n })\n .finally(function() {\n $scope.saving = false\n })\n }\n\n $scope.dismiss = function() {\n $modalInstance.dismiss()\n }\n }\n\n /**\n * @ngdoc service\n * @name textSaveModal\n * @memberof clrModal\n *\n * @description\n * A modal with textarea input that saves upon completion.\n */\n module.factory('textSaveModal', function($modal) {\n return {\n open: function(title, buttonText, placeholder, resource, fieldName) {\n return $modal.open({\n templateUrl: '/textarea_input_modal.html',\n controller: TextSaveModalController,\n size: 'lg',\n resolve: {\n title: function() {\n return title\n },\n buttonText: function() {\n return buttonText\n },\n placeholder: function() {\n return placeholder\n },\n resource: function() {\n return resource\n },\n fieldName: function() {\n return fieldName\n }\n }\n })\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name modalShim\n * @memberof clrModal\n *\n * @description\n * An iframe shim that manually adds an iframe for Windows-specific issues around modal windows not appearing above PDF embeds\n */\n module.factory('modalShim', function(device) {\n const iframeShimId = \"modalShim\"\n const iframeShim = angular.element('').addClass(\"modal-shim\").attr(\"id\", iframeShimId)\n return {\n add: function() {\n if (device.isWindows) {\n angular.element('body').append(iframeShim)\n }\n },\n remove: function() {\n angular.element(\"#\" + iframeShimId).remove()\n }\n }\n })\n\n // TODO: Add support for multiple images\n function MultiPageModalController($scope, $modalInstance, titles, texts, buttonTexts, images) {\n $scope.page = 0\n $scope.maxPage = titles.length - 1\n\n $scope.titles = titles\n $scope.texts = texts\n $scope.buttonTexts = buttonTexts\n $scope.images = images\n\n $scope.continue = function() {\n if ($scope.page < $scope.maxPage) {\n $scope.next()\n } else {\n $modalInstance.close()\n }\n }\n\n $scope.next = function() {\n if ($scope.page < $scope.maxPage) {\n $scope.page += 1\n }\n }\n\n $scope.back = function() {\n if ($scope.page > 0) {\n $scope.page -= 1\n }\n }\n\n $scope.getDotClass = function(page) {\n if (page == $scope.maxPage) {\n return ''\n }\n return 'u--margin-right-10'\n }\n }\n\n /**\n * @ngdoc service\n * @name multiPageModal\n * @memberof clrModal\n *\n * @description\n * A generic text modal.\n */\n module.factory('multiPageModal', function($modal) {\n return {\n open: function(titles, texts, buttonTexts, images) {\n return $modal.open({\n templateUrl: '/multi_page_modal.html',\n controller: MultiPageModalController,\n size: 'md',\n resolve: {\n titles: function() {\n return titles\n },\n texts: function() {\n return texts\n },\n buttonTexts: function() {\n return buttonTexts\n },\n images: function() {\n return images\n },\n }\n })\n }\n }\n })\n\n}();\n","const getAbsolutePath = require(\"src/django_apps/core/static/js/absolute_path\");\n\n!(function() {\n \"use strict\";\n\n /**\n * @ngdoc module\n * @name clrNavigation\n *\n * @description\n * The `clrNavigation` provides interaction support with\n * Color's global navigation bar.\n */\n // TODO: Rename navigation to layout.\n const module = angular.module(\"clrNavigation\", []);\n\n /**\n * @class Navigation\n *\n * @description\n * A class for configuring Color's global navigation bar.\n */\n function Navigation() {\n /**\n * @member {boolean} showNav - Shows the navigation if true.\n * @default true\n * @memberof Navigation#\n */\n this.showNav = true;\n /**\n * @member {boolean} showRight - Shows right part of the navigation if true.\n * @default true\n * @memberof Navigation#\n */\n this.showRight = true;\n /**\n * @member {boolean} showLeft - Shows left part of the navigation if true.\n * @default true\n * @memberof Navigation#\n */\n this.showLeft = true;\n /**\n * @member {boolean} affixed - affix logged out navigation if true.\n * @default false\n * @memberof Navigation#\n */\n this.affixed = false;\n /**\n * @member {boolean} showSignInAsButton - Shows signin button of the logged out navigation as button, instead of an anchor, if true.\n * @default false\n * @memberof Navigation#\n */\n this.showSignInAsButton = false;\n /**\n * @member {boolean} linkToProviderSignIn - Signin button links to providers signin instead\n * @default false\n * @memberof Navigation#\n */\n this.linkToProviderSignIn = false;\n /**\n /**\n * @member {boolean} showStore - Shows a link to store on the logged out navigation if true.\n * @default false\n * @memberof Navigation#\n */\n this.showStore = false;\n /**\n * @member {boolean} active - Sets active navigation link highlight\n * @default false\n * @memberof Navigation#\n */\n this.active = false;\n /**\n * @member {boolean} subnavActive - Sets subnav active navigation link highlight\n * @default false\n * @memberof Navigation#\n */\n this.subnavActive = false;\n /**\n * @member {boolean} subnavCompact - Show compacted sub nav with only Sign Out link\n * @default false\n * @memberof Navigation#\n */\n this.subnavCompact = false;\n /**\n * @member {boolean} showPhysicianOrderBreadcrumbs - Show physician ordering breadcrumbs\n * @default false\n * @memberof Navigation#\n */\n this.showPhysicianOrderBreadcrumbs = false;\n /**\n * @member {boolean} showPromoBanner - Show promo banner\n * @default false\n * @memberof Navigation#\n */\n this.showPromoBanner = false;\n /**\n * @member {boolean} showPromoBannerType - Show a specific promo banner\n * @default false\n * @memberof Navigation#\n */\n this.showPromoBannerType = false;\n /**\n * @member {boolean} showPromoBannerWhitelist - Whitelist of banner types we can show\n * @default false or array of banner types\n * @memberof Navigation#\n */\n this.showPromoBannerWhitelist = false;\n /**\n * @member {boolean} showSearchBar - Display search bar in navigation\n * @default false\n * @memberof Navigation#\n */\n this.showSearchBar = false;\n /**\n * @member {string} scrollButtonText - Text of any action button scrolling user to action\n * @default null\n * @memberof Navigation#\n */\n this.scrollButtonText = null;\n\n /**\n * @member {string} layout - Sets the layout style\n * @default 'standard'\n * @memberof Navigation#\n */\n this.layout = \"standard\";\n /**\n * @member {string} mobileFooter - Show mobile footer on this page\n * (valid values: false, 'standard', 'buy', 'providers')\n * @default false\n * @memberof Navigation#\n */\n this.mobileFooter = false;\n /**\n * @member {string} blue - Turn the navbar blue (for OC/PGx launch)\n * (valid values: false, true)\n * @default false\n * @memberof Navigation#\n */\n this.blue = false;\n /**\n * @member {string} showRedcrossCta - Custom Red Cross CTA implementation (https://getcolor.atlassian.net/browse/ACQ-564)\n * (valid values: false, true)\n * @default false\n * @memberof Navigation#\n */\n this.showRedcrossCta = false;\n\n this.logoLink = \"/react/dashboard\";\n }\n\n /**\n * @method reset\n * @memberof Navigation#\n *\n * @description\n * Resets navigation config with a given config.\n *\n * @param {Object} - Object with configuration key values.\n */\n Navigation.prototype.reset = function(config) {\n this.showNav = true;\n this.showRight = true;\n this.showLeft = true;\n this.affixed = false;\n this.affixedButtonText = null;\n this.affixedButtonLink = null;\n this.affixedButtonSku = null;\n this.showSignInAsButton = false;\n this.linkToProviderSignIn = false;\n this.showStore = true;\n this.active = false;\n this.subnavActive = false;\n this.subnavCompact = false;\n this.showPhysicianOrderBreadcrumbs = false;\n this.showPromoBanner = false;\n this.showPromoBannerType = false;\n this.showPromoBannerWhitelist = false;\n this.showSearchBar = false;\n this.scrollButtonText = null;\n this.layout = \"standard\";\n this.mobileFooter = false;\n this.blue = false;\n this.showRedcrossCta = false;\n this.logoLink = \"/react/dashboard\";\n config = config == void 0 ? {} : config;\n\n angular.extend(this, config);\n };\n\n /**\n * @ngdoc service\n * @name navigation\n * @memberof clrNavigation\n *\n * @description\n * A service that allows to configure visual of global navigation.\n *\n * @returns {Navigation} An instance of Navigation.\n *\n * @example\n * navigation.reset({ showLeft: false })\n */\n module.service(\"navigation\", Navigation);\n\n module.directive(\"clrTopNavigation\", function(\n $window,\n $timeout,\n $anchorScroll,\n $location,\n auth,\n navigation,\n redirect,\n setViewportScroll\n ) {\n \"ngInject\";\n return {\n restrict: \"E\",\n scope: {},\n priority: 500,\n templateUrl: \"/clr_top_navigation.html\",\n link: function(scope, elem, attrs) {\n scope.navigation = navigation;\n scope.auth = auth;\n scope.location = $location;\n scope.locationHost = escape(\n $window.location.protocol + \"//\" + $window.location.host\n );\n scope.getAbsolutePath = getAbsolutePath;\n\n scope.$watchCollection(\"auth.currentUser\", function() {\n if (scope.auth.isLoggedIn) {\n scope.name = scope.auth.currentUser.first_name\n ? scope.auth.currentUser.first_name +\n \" \" +\n scope.auth.currentUser.last_name\n : scope.auth.currentUser.email;\n } else {\n scope.name = \"\";\n }\n });\n\n scope.showSubNav = false;\n scope.toggleSubNav = function(subNavName) {\n const isSubNavChanged = scope.subNavName != subNavName;\n scope.subNavName = subNavName;\n if (!scope.showSubNav || !isSubNavChanged) {\n scope.showSubNav = !scope.showSubNav;\n }\n };\n\n scope.showCollapsedNav = false;\n scope.toggleCollapsedNav = function() {\n if (scope.showCollapsedNav) {\n scope.showSubnav = false;\n }\n scope.showCollapsedNav = !scope.showCollapsedNav;\n };\n\n scope.collapseAllNav = function() {\n scope.showSubNav = false;\n scope.showCollapsedNav = false;\n };\n\n // Window click handler to close navigation unless you're clicking inside the top navigation elmeent or any of it's children\n let hasParentTopNavigationElement = false;\n angular.element($window).on(\"click\", function(e) {\n hasParentTopNavigationElement = angular\n .element(e.target)\n .closest(\"#top_navigation\").length;\n if (scope.showSubNav && !hasParentTopNavigationElement) {\n scope.collapseAllNav();\n scope.$apply();\n } else {\n e.stopPropagation();\n }\n });\n\n scope.logout = function() {\n $window.$(\".body-wrapper, .footer\").addClass(\"u--force-hide\");\n auth\n .logout()\n .then(function() {\n $window.location.href = \"/react/sign-in\";\n })\n .catch(function() {\n $window.$(\".body-wrapper, .footer\").removeClass(\"u--force-hide\");\n });\n };\n\n scope.openProviderPortal = function() {\n scope.collapseAllNav();\n redirect(\"/\");\n };\n\n scope.changePath = function(path) {\n $location.path(path);\n scope.collapseAllNav();\n };\n\n // Mobile Navigation toggles/settings\n scope.mobileMenuOpen = false;\n scope.mobileSublinks = false;\n\n scope.mobileToggleMenu = function() {\n angular.element(\"#hamburger\").toggleClass(\"js--active\");\n if (angular.element(\"#hamburger\").hasClass(\"js--active\")) {\n scope.mobileMenuOpen = true;\n setViewportScroll.disable();\n } else {\n scope.mobileMenuOpen = false;\n setViewportScroll.enable();\n $timeout(function() {\n scope.mobileSublinks = false;\n }, 300);\n }\n };\n\n scope.mobileToggleSublinks = function(selected) {\n if (scope.mobileSublinks == selected) {\n scope.mobileSublinks = false;\n } else {\n scope.mobileSublinks = selected;\n }\n };\n\n scope.mobileCloseAll = function(keepMobileSublinks) {\n angular.element(\"#hamburger\").removeClass(\"js--active\");\n scope.mobileMenuOpen = false;\n setViewportScroll.enable();\n if (keepMobileSublinks) {\n $anchorScroll();\n } else {\n scope.mobileSublinks = false;\n }\n };\n // https://css-tricks.com/snippets/css/remove-gray-highlight-when-tapping-links-in-mobile-safari/\n document.addEventListener(\"touchstart\", function() {}, true);\n }\n };\n });\n\n module.directive(\"clrProviderTopNavigation\", function(\n $window,\n auth,\n navigation,\n redirect\n ) {\n \"ngInject\";\n return {\n restrict: \"E\",\n scope: {},\n templateUrl: \"/ordering_physicians/provider_navigation.html\",\n link: function(scope) {\n scope.navigation = navigation;\n scope.auth = auth;\n\n scope.$watchCollection(\"auth.currentUser\", function() {\n if (scope.auth.isLoggedIn) {\n scope.name = scope.auth.currentUser.first_name\n ? scope.auth.currentUser.first_name +\n \" \" +\n scope.auth.currentUser.last_name\n : scope.auth.currentUser.email;\n } else {\n scope.name = \"\";\n }\n });\n\n scope.logout = function() {\n $window.$(\".body-wrapper, .footer\").addClass(\"u--force-hide\");\n auth\n .logout()\n .then(function() {\n $window.location.href = \"/react/sign-in\";\n })\n .catch(function() {\n $window.$(\".body-wrapper, .footer\").removeClass(\"u--force-hide\");\n });\n };\n\n scope.openHomeDashboard = function() {\n redirect(\"/react/dashboard\");\n };\n\n scope.goToInstitution = function() {\n $window.location.assign(\"/providers/institution\");\n };\n }\n };\n });\n})();\n","/**\n * @prettier\n */\n\nconst E164Regex = require('src/django_apps/core/static/js/e164_regex').E164Regex;\n\n!(function() {\n 'use strict';\n\n /**\n * @ngdoc module\n * @name clrPhoneNumbers\n *\n * @description\n * Some helpers for parsing and formatting phone numbers in JavaScript.\n */\n const module = angular.module('clrPhoneNumbers', []);\n\n module.constant('E164Regex', E164Regex);\n})();\n","const cdnify = require('src/django_apps/core/static/js/cdnify')\n\n!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrProvider\n *\n * @description\n * The `clrProvider` provides providers for color app.\n */\n const module = angular.module('clrProvider', ['metatags'])\n\n /**\n * @ngdoc provider\n * @name colorRouteProvider\n * @memberof clrProvider\n *\n * @description\n *\n * `colorRouteProvider` extends `$routeProvider`'s `when` method by\n * adding default `resolve` properties with `auth` so that `auth`\n * is always synced after route change is succeeded. Also incorporates\n * `MetaTagsProvider` to handle meta data when changing routes.\n */\n module.provider('colorRoute', function($routeProvider, MetaTagsProvider) {\n\n let metaTagDefaults = {}\n const colorRouteProvider = angular.extend(this, $routeProvider)\n\n colorRouteProvider.when = function(path, route) {\n route.resolve = angular.extend({}, route.resolve)\n route.resolve['_auth_'] = [\n '$location', '$q', 'auth', 'colorAuthRouteFilter',\n function($location, $q, auth, colorAuthRouteFilter) {\n return auth.sync(auth.isLoggedIn && !auth.currentUser.is_email_confirmed)\n .then(function(res) {\n if (!route.redirectTo) {\n if (colorAuthRouteFilter.apply(route.auth, $location.path())) {\n return $q.reject()\n }\n }\n return res\n })\n }]\n\n $routeProvider.when(path, route)\n\n /* Ignore $routeProvider redirects and expect seo object to exist,\n * otherwise use some defaults */\n const metaTagsWithPath = {\n url: path,\n image: cdnify('social/logo_opaque_padded.png'),\n }\n if (angular.isDefined(route.seo)) {\n MetaTagsProvider.when(path, angular.extend(metaTagsWithPath, metaTagDefaults, route.seo))\n } else {\n MetaTagsProvider.when(path, angular.extend(metaTagsWithPath, metaTagDefaults))\n }\n return this\n }\n\n colorRouteProvider.setMetaTagDefaults = function(defaults) {\n metaTagDefaults = defaults\n }\n\n return colorRouteProvider\n\n })\n\n module.run(function($rootScope, $route, MetaTags) {\n\n // Init `` changes and fire update() when route changes\n MetaTags.initialize()\n $rootScope.$on('$routeChangeSuccess', function(newVal, oldVal) {\n if (oldVal !== newVal) {\n let path = $route.current.originalPath\n if (path && path.length > 1 && path[path.length - 1] == '/') {\n path = path.substring(0, path.length - 1)\n }\n if (path) {\n MetaTags.update(path)\n }\n }\n })\n $rootScope.$on('$locationSkipReloadSuccess', function(event, lastRoute, path) {\n const nextRoute = $route.routes[path]\n if (angular.isDefined(nextRoute) && nextRoute.seo) {\n MetaTags.update(path)\n }\n })\n })\n\n}();\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrRaven\n *\n * @description\n * The `clrRaven` provides some custom logic for ngRaven.\n */\n const module = angular.module('clrRaven', ['ngRaven'])\n\n /**\n * Sentry angular-translate exception handler\n */\n module.factory('sentryTranslateExceptionHandler', function($raven) {\n return function(translationID, uses) {\n // Fire Sentry exception:\n // https://github.com/gdi2290/angular-raven#how-do-i-add-this-to-my-project\n $raven.captureException('Translation key not found: \"' + translationID + '\" in the ' + uses + ' bundle.', {\n fingerprint: [translationID, uses],\n })\n // Return empty string to broken translation key doesn't show\n // http://angular-translate.github.io/docs/#/guide/17_custom-error-handler\n return ' '\n }\n })\n\n /**\n * Initialization:\n * * Set user context when auth event happens.\n * * Register global tags for Sentry.\n */\n module.run(function($rootScope, $raven, environment) {\n function setUserContext(e, userId) {\n if (userId) {\n $raven.setUserContext({id: userId})\n } else {\n $raven.setUserContext()\n }\n }\n\n $rootScope.$on('auth:synced', setUserContext)\n $rootScope.$on('auth:loggedIn', setUserContext)\n $rootScope.$on('auth:loggedOut', setUserContext)\n\n $raven.setTagsContext({\n environment: environment\n })\n })\n\n /**\n * Report every non 2xx requests to sentry.\n */\n module.config(function($httpProvider) {\n const urlCleaners = [\n [/api\\/v1\\/promotional_codes\\/[^\\/]+/, \"api/v1/promotional_codes/_\"],\n [/\\d\\d+/g, \"_\"]\n ]\n function applyPattern(patterns, input) {\n return patterns.reduce(function(str, pattern) {\n return str.replace(pattern[0], pattern[1])\n }, input)\n }\n function setLevel(rejection) {\n // Set different log levels based on type of exception\n // https://docs.sentry.io/clients/javascript/usage/#passing-additional-data\n if (rejection.status == -1 || rejection.status >= 400 && rejection.status <= 499 && rejection.config.method == 'GET') {\n // Covers most client-originated network scenarios (404s from API requests, -1 from Angular template fetch failures, etc)\n return 'info'\n } else if (rejection.status >= 400 && rejection.status <= 499 && rejection.config.method == 'POST') {\n // Slightly more severe warnings on attempts to POST data but it's invalid for some reason\n return 'warning'\n } else {\n // Everything else\n return 'warning'\n }\n }\n\n $httpProvider.interceptors.push(function($q, $raven, $location) {\n return {\n responseError: function(rejection) {\n // We don't report unauthenticated error.\n if (rejection.status != 401 && rejection.status != 404 && !Raven.debug) {\n // clean the URL to make sentry more usable\n const cleanedURL = applyPattern(urlCleaners, rejection.config.url)\n\n // request data is not sent as it could potentially contain PHI.\n const msg = rejection.status + \" \" + rejection.config.method + \" \" + cleanedURL\n $raven.captureMessage(msg, {\n culprit: $location.path(),\n fingerprint: [$location.path(), rejection.status, setLevel(rejection)],\n trimHeadFrames: 2,\n stacktrace: true,\n tags: {\n status: rejection.status\n },\n level: setLevel(rejection),\n extra: {\n originalURL: rejection.config.url\n }\n })\n }\n return $q.reject(rejection)\n }\n }\n })\n })\n\n /**\n * Monkey-patch Raven._send() to send errors on some URLs to specific\n * projects, e.g. provider and RED.\n *\n * Background: https://github.com/color/color/wiki/Error-reporting-via-Sentry\n */\n Raven._originalSend = Raven._send\n Raven._send = function(data) {\n Raven.setDSN(Raven._globalOptions.defaultDSN)\n for (let i = 0; i < Raven._globalOptions.overrideUrls.length; i++) {\n const override = Raven._globalOptions.overrideUrls[i]\n if (window.location.pathname.search(override[0]) > -1) {\n // Have to set level to 'warning' here for it to work. Setting level:\n // 'warning' in Raven.config() (in templates/_raven.html) or in\n // Raven.setTagsContext() (above in this file) have no effect.\n // https://docs.sentry.io/clients/javascript/usage/#raven-js-additional-context\n data.level = 'warning'\n Raven.setDSN(override[1])\n break\n }\n }\n Raven._originalSend(data)\n }\n}();\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrResource\n *\n * @description\n * The `clrResource` provides interaction support with Color's RESTful\n * services via the AngularJS's `$resource` service.\n */\n const module = angular.module('clrResource', ['ngResource', 'clrRequest'])\n\n /**\n * @ngdoc service\n * @name resource\n * @memberof clrResource\n *\n * @description\n * `resource` is a service that is similar to AngularJS's $resource\n * except `$save()` method sends either POST/PUT request depending on\n * the existence of `id` of the resource.\n */\n module.factory('resource', function($resource) {\n return function(url, params, methods) {\n const defaults = {\n update: { method: 'put', isArray: false },\n create: { method: 'post', isArray: false },\n update_with_ignore_auth_module: {\n method: 'put',\n isArray: false,\n ignoreAuthModule: true\n },\n create_with_ignore_auth_module: {\n method: 'post',\n isArray: false,\n ignoreAuthModule: true\n },\n save_with_skip_error_toast: {\n method: 'post',\n isArray: false,\n skipErrorToast: true\n },\n get_with_ignore_auth_module: {\n method: 'GET',\n isArray: false,\n ignoreAuthModule: true\n },\n get_as_cached: {\n method: 'GET',\n isArray: false,\n cache: true\n },\n get_as_array: {\n method: 'GET',\n isArray: true\n }\n }\n\n methods = angular.extend(defaults, methods)\n\n const resource = $resource(url, params, methods)\n\n resource.prototype.$save = function(param) {\n if (!this.id) {\n return this.$create(param)\n } else {\n return this.$update(param)\n }\n }\n\n resource.prototype.$save_with_ignore_auth_module = function(param) {\n if (!this.id) {\n return this.$create_with_ignore_auth_module(param)\n } else {\n return this.$update_with_ignore_auth_module(param)\n }\n }\n\n return resource\n }\n })\n\n /**\n * @class ResourcePaginator\n *\n * @description\n * A wrapper class for AngularJS resource object that allows\n * to fetch resource items in paginated fashion.\n *\n * @param {Object} resource - resource object.\n * @param {Object} defaultParams - query params to use by default.\n * @param {function} transform - function to apply to each result.\n */\n function ResourcePaginator(resource, defaultParams, transform, resolvedPromise) {\n this._transform = transform\n\n this._resolvedPromise = resolvedPromise\n /**\n * @member {Array} items - Fetched items.\n * @memberof ResourcePaginator#\n */\n this.items = []\n\n /**\n * @member {integer} total - A total number of items paginator can fetch from server.\n * @memberof ResourcePaginator#\n */\n this.total = 0\n\n /**\n * @member {boolean} hasNext - Indicates if there exist a next page.\n * @memberof ResourcePaginator#\n */\n this.hasNext = true\n\n /**\n * @member {boolean} hasPrevious - Indicates if there exist a previous page.\n * @memberof ResourcePaginator#\n */\n this.hasPrevious = false\n\n /**\n * @member {boolean} loadingNext - Indicates if the paginator is currently loading next page.\n * @memberof ResourcePaginator#\n */\n this.loadingNext = false\n\n /**\n * @member {boolean} loadingPrevious - Indicates if the paginator is currently loading previous page.\n * @memberof ResourcePaginator#\n */\n this.loadingPrevious = false\n\n /**\n * @member {boolean} loadingFailed - Indicates if the paginator failed to load a page.\n * @memberof ResourcePaginator#\n */\n this.loadingFailed = false\n\n this._nextParams = {}\n this._prevParams = {}\n if (defaultParams != void 0) {\n this._defaultParams = angular.extend({}, defaultParams)\n this._nextParams = angular.extend({}, defaultParams)\n this._prevParams = angular.extend({}, defaultParams)\n }\n this._resource = resource\n }\n\n /**\n * @method getNextPage\n * @memberof ResourcePaginator#\n *\n * @description\n * Starts loading next page and returns a promise.\n *\n * @param {Boolean} ignoreAuth - Indicates if whether auth module should be ignored.\n * @returns {promise} - The newly created promise.\n */\n ResourcePaginator.prototype.getNextPage = function(ignoreAuth) {\n this.loadingNext = true\n let deferred\n if (ignoreAuth) {\n deferred = this._resource.$get_with_ignore_auth_module(this._nextParams)\n } else {\n deferred = this._resource.$get(this._nextParams)\n }\n return deferred.then(angular.bind(this, function(res) {\n this._updateResource()\n const results = this._resource.results\n for (let i = 0; i < results.length; i++) {\n this.items.push(this._transform ? this._transform(results[i]) : results[i])\n }\n return res\n }))\n .catch(() => this.loadingFailed = true)\n .finally(angular.bind(this, function(res) {\n this.loadingNext = false\n return res\n }))\n }\n\n /**\n * @method getPreviousPage\n * @memberof ResourcePaginator#\n *\n * @description\n * Starts loading next page and returns a promise.\n *\n * @param {Boolean} ignoreAuth - Indicates if whether auth module should be ignored.\n * @returns {promise} - The newly created promise.\n */\n ResourcePaginator.prototype.getPreviousPage = function(ignoreAuth) {\n this.loadingPrevious = true\n let deferred\n const currentResource = angular.extend({}, this._resource)\n if (ignoreAuth) {\n deferred = this._resource.$get_with_ignore_auth_module(this._prevParams)\n } else {\n deferred = this._resource.$get(this._prevParams)\n }\n return deferred.then(angular.bind(this, function(res) {\n this._updateResource()\n this.items.splice(-1 * currentResource.results.length)\n return res\n }))\n .catch(() => this.loadingFailed = true)\n .finally(angular.bind(this, function(res) {\n this.loadingPrevious = false\n return res\n }))\n }\n\n /**\n * @method getCurrentPage\n * @memberof ResourcePaginator#\n *\n * @description\n * Returns current page resource was on.\n *\n * @returns {promise} - The newly created promise.\n */\n ResourcePaginator.prototype.getCurrentPage = function() {\n return this._resolvedPromise(this._resource)\n }\n\n ResourcePaginator.prototype.hasItems = function() {\n return this.items.length != 0\n }\n\n ResourcePaginator.prototype.getFirstPage = function(ignoreAuth) {\n this.loadingNext = true\n let deferred\n if (ignoreAuth) {\n deferred = this._resource.$get_with_ignore_auth_module(this._defaultParams)\n } else {\n deferred = this._resource.$get(this._defaultParams)\n }\n return deferred.then(angular.bind(this, function(res) {\n this._updateResource()\n const results = this._resource.results\n\n this.items = results\n return res\n }))\n .catch(() => this.loadingFailed = true)\n .finally(angular.bind(this, function(res) {\n this.loadingNext = false\n return res\n }))\n }\n\n /**\n * @private\n * @method _updateResource\n * @memberof ResourcePaginator#\n *\n * @description\n * Updates properties based on new resource fetches.\n */\n ResourcePaginator.prototype._updateResource = function() {\n this.total = this._resource.count\n const next = this._resource.next\n const previous = this._resource.previous\n this.hasNext = next != null\n this.hasPrevious = previous != null\n if (this.hasNext) {\n this._updateQueryParamWithMeta(next, this._nextParams)\n }\n if (this.hasPrevious) {\n this._updateQueryParamWithMeta(previous, this._prevParams)\n }\n }\n\n /**\n * @method getAllPages\n * @memberof ResourcePaginator#\n *\n * @description\n * Loads all pages.\n *\n * @param {Boolean} ignoreAuth - Indicates if whether auth module should be ignored.\n * @returns {promise} - The promise that resolves all items.\n */\n ResourcePaginator.prototype.getAllPages = function(ignoreAuth) {\n return this.getNextPage(ignoreAuth)\n .then(angular.bind(this, function(res) {\n if (this.hasNext) {\n return this.getAllPages()\n } else {\n return this.items\n }\n }))\n }\n\n ResourcePaginator.prototype.removeItem = function(index) {\n this.items.splice(index, 1)\n this.total -= 1\n }\n\n /**\n * @private\n * @method _updateNextParamWithMeta\n * @memberof ResourcePaginator#\n *\n * @description\n * Updates query params.\n */\n ResourcePaginator.prototype._updateQueryParamWithMeta = function(url, params) {\n let queryStr = parseUrl(url).search;\n\n // clear existing parameters out\n for (const param in params) { delete params[param] }\n\n queryStr = queryStr.substring(1)\n const fields = queryStr.split('&')\n for (let i = 0; i < fields.length; i++) {\n const pair = fields[i].split('=')\n params[pair[0]] = pair[1] ? pair[1].replace('+', ' ') : pair[1]\n }\n }\n\n function parseUrl(url) {\n const a = document.createElement('a')\n a.href = decodeURIComponent(url)\n return a\n }\n\n /**\n * @ngdoc service\n * @name resourcePaginator\n * @memberof clrResource\n *\n * @description\n * A factory which creates a resource paginator object that lets you\n * paginate data provided by server.\n *\n * @param {Object} resource - resource object.\n * @param {Object} defaultParams - Query params to use by default.\n * @returns {ResourcePaginator} An instance of ResourcePaginator.\n *\n * @example\n * var itemPaginator = resourcePaginator(new Item(), { format: 'json' })\n * itemPaginator.getNextPage()\n */\n module.factory('resourcePaginator', function(resolvedPromise) {\n return function(resource, defaultParams, transform) {\n return new ResourcePaginator(resource, defaultParams, transform, resolvedPromise)\n }\n })\n\n module.factory('indexedResource', function(resolvedPromise, resourcePaginator) {\n function IndexedResource(resource) {\n this.resource = resource\n this.items = []\n this.itemsById = {}\n this.loaded = false\n }\n\n IndexedResource.prototype.load = function() {\n if (this.loaded) {\n return resolvedPromise(this.items)\n } else {\n return resourcePaginator(this.resource).getAllPages(true)\n .then(angular.bind(this, function(items) {\n this.items = items\n angular.forEach(items, angular.bind(this, function(item) {\n this.itemsById[item.id] = item\n }))\n this.loaded = true\n return this.items\n }))\n }\n }\n\n IndexedResource.prototype.getById = function(id) {\n return this.itemsById[id]\n }\n\n IndexedResource.prototype.setItem = function(item) {\n this.items.push(item)\n this.itemsById[item.id] = item\n }\n\n return function(resource) {\n return new IndexedResource(resource)\n }\n })\n\n /**\n * Service to persist an object across pages\n */\n function PersistedObject(klass) {\n if (klass) {\n this._obj = new klass()\n }\n this.set = function(obj) { this._obj = obj }\n this.get = function() { return this._obj }\n this.refresh = function() {\n if (klass) {\n this._obj = new klass()\n } else {\n this._obj = null\n }\n }\n this.getOrSetIfEmpty = function(obj) {\n if (!this._obj){\n this._obj = obj\n }\n return this._obj\n }\n }\n\n module.factory('persistedObject', function() {\n return function(klass) { return new PersistedObject(klass) }\n })\n\n function CookiePersistedObject($cookies, $location, cookieName) {\n this.set = function(obj) {\n $cookies.put(cookieName, obj)\n this._obj = obj\n }\n\n this.get = function() {\n if (this._obj) {\n return this._obj\n }\n return $cookies.get(cookieName)\n }\n\n this.clear = function() {\n this._obj = null\n $cookies.remove(cookieName)\n }\n\n this.initFromQueryParams = function() {\n const paramValue = $location.search()[cookieName]\n if (paramValue) {\n this.set(paramValue)\n $location.search(cookieName, null)\n }\n }\n }\n\n /**\n * Service for setting saving query params in cookies\n */\n module.factory('cookiePersistedObject', function($cookies, $location) {\n return function(paramName) {\n return new CookiePersistedObject($cookies, $location, paramName)\n }\n })\n\n module.service('project', function() {\n return new function() {\n this.application = \"www\"\n }()\n })\n\n /**\n * @ngdoc service\n * @name urlBuilder\n * @memberof clrResource\n *\n * @description\n * Appends a set of query params onto the given URL. In the active version of Angular,\n * $httpParamSerializer and other built-ins that are used are not exposed, so we have to\n * adapt it from their source code.\n */\n\n module.service('urlBuilder', function() {\n /**\n * From https://github.com/angular/angular.js/blob/33f7f26558a52124c2eaf40d91bedb58686bde0a/src/Angular.js#L1301\n */\n function encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%3B/gi, ';').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'))\n }\n\n /**\n * From https://github.com/angular/angular.js/blob/ad4336f9359a073e272930f8f9bcd36587a8648f/src/ng/http.js#L942\n */\n function buildUrl(url, params) {\n if (!params) return url\n const parts = []\n angular.forEach(params, function(value, key) {\n if (value === null || angular.isUndefined(value)) return\n if (!angular.isArray(value)) value = [value]\n\n angular.forEach(value, function(v) {\n if (angular.isObject(v)) {\n v = angular.toJson(v)\n }\n\n parts.push(\n encodeUriQuery(key)\n + '='\n + encodeUriQuery(v)\n )\n })\n })\n\n if (parts.length > 0) {\n url += ((url.indexOf('?') === -1) ? '?' : '&') + parts.join('&')\n }\n\n return url\n }\n\n return {\n buildUrl: buildUrl\n }\n })\n\n module.service('fileUploader', function($cookies, ngToast, requestErrorToast, FileUploader) {\n return function(options) {\n options = options || {}\n\n const csrfCookieName = angular.element(\"#csrf-cookie-name\").val();\n const defaultOptions = {\n url: '/api/v1/uploaded_file',\n formData: [],\n alias: 'document',\n headers: {\n 'X-CSRFToken': $cookies.get(csrfCookieName),\n 'Accept': 'application/json'\n },\n queueLimit: 999,\n autoUpload: true\n }\n\n const defaultOptionKeys = Object.keys(defaultOptions)\n for (let i = 0; i < defaultOptionKeys.length; i++) {\n const option = defaultOptionKeys[i]\n\n if (!(option in options)) {\n options[option] = defaultOptions[option]\n }\n }\n\n const uploader = new FileUploader(options)\n\n uploader.onSuccessItem = function(item, response, status, headers) {\n item.s3_key = response\n }\n\n uploader.doneUploading = function(toastOnBlock) {\n if (uploader.isUploading) {\n uploader.uploadAll()\n if (toastOnBlock) {\n ngToast.create({ content: 'Please try again after uploads have finished.' })\n }\n return false\n }\n return true\n }\n\n uploader.getUploadedKeys = function() {\n const keys = []\n for (let i = 0; i < uploader.queue.length; i++) {\n const s3_key = uploader.queue[i].s3_key\n if (s3_key) {\n keys.push(s3_key)\n }\n }\n return keys\n }\n\n uploader.onErrorItem = function(item, response, status, headers) {\n requestErrorToast({data: response})\n }\n\n return uploader\n }\n })\n\n // https://stackoverflow.com/a/35171163\n module.service('setViewportScroll', function($window) {\n\n let cachedScrollY = 0\n const preventMotion = function(event) {\n $window.scrollTo(0,0)\n event.preventDefault()\n event.stopPropagation()\n }\n\n const disable = function() {\n cachedScrollY = $window.scrollY\n $window.addEventListener(\"scroll\", preventMotion, false)\n $window.addEventListener(\"touchmove\", preventMotion, false)\n angular.element(\"html\").css(\"{ overflow: 'hidden' }\")\n angular.element(\"body\").css(\"{ overflow: 'hidden', position: 'relative' }\")\n }\n\n const enable = function() {\n $window.scrollTo(0, cachedScrollY)\n $window.removeEventListener(\"scroll\", preventMotion, false)\n $window.removeEventListener(\"touchmove\", preventMotion, false)\n angular.element(\"html\").css(\"{ overflow: 'visible' }\")\n angular.element(\"body\").css(\"{ overflow: 'visible', position: 'static' }\")\n }\n\n return {\n disable: disable,\n enable: enable\n }\n })\n\n}();\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrRequest\n *\n * @description\n * The `clrRequest` provides HTTP request/resopnse related services.\n */\n const module = angular.module('clrRequest', ['ngToast'])\n\n /**\n * @ngdoc config\n *\n * @description\n * $http interceptor.\n * On 400 response, it pops toast for first error message found in returned response\n * if `ignoreRequestErrorHandling` http config is not present.\n * On 500 response, it redirects 500 page.\n */\n .config(function($httpProvider) {\n $httpProvider.interceptors.push(function($rootScope, $q, ngToast, requestErrorToast) {\n const httpErrorCodeToToast = [400, 403, 405]\n const unreportedErrorCodes = [401]\n return {\n responseError: function(rejection) {\n if ((httpErrorCodeToToast.indexOf(rejection.status) !== -1 && !rejection.config.skipErrorToast || rejection.status === 401 && rejection.config.ignoreAuthModule) &&\n !rejection.config.ignoreRequestErrorHandling) {\n requestErrorToast(rejection)\n } else if (rejection.status === 500) {\n if (rejection.config.internalServerErrorToast) {\n ngToast.create({ className: 'error', content: 'Internal server error.' })\n } else {\n $rootScope.$broadcast('error:InternalServerError')\n }\n }\n return $q.reject(rejection)\n }\n }\n })\n })\n\n /**\n * @ngdoc service\n * @name requestErrorToast\n * @memberof clrRequest\n *\n * @description\n * `requestErrorToast` is a service that pops a toast for the first message\n * found in a given http response object.\n *\n * @param {Object} res - response returned from server.\n *\n * @example\n * requestErrorToast(rejection)\n */\n .factory('requestErrorToast', function(ngToast) {\n\n function hasFieldError(field, errors) {\n return errors.hasOwnProperty(field) && errors[field].length > 0\n }\n\n function getErrorMsgFromObject(errors) {\n // 'var ... in ...' iterates both over arrays (of error strings)\n // and objects (where values are arrays of error strings)\n for (const field in errors) {\n if (hasFieldError(field, errors)) {\n if (angular.isArray(errors[field])) {\n return errors[field][0]\n }\n return errors[field]\n }\n if (typeof errors[field] == 'object' && angular.isUndefined(errors[field].length)) {\n return getErrorMsgFromObject(errors[field])\n }\n }\n }\n\n return function(res) {\n // Ignore empty or generic errors.\n if (!res.data || res.data['detail']) {\n return\n }\n\n const errors = res.data;\n let errorMsg\n\n if (hasFieldError('__all__', errors)) {\n errorMsg = errors['__all__'][0]\n } else if (hasFieldError('non_field_errors', errors)) {\n errorMsg = errors['non_field_errors']\n if (angular.isArray(errorMsg)) {\n errorMsg = errorMsg[0]\n }\n } else {\n errorMsg = getErrorMsgFromObject(errors)\n }\n\n // Encodes the error message as HTML\n const errorHtml = $('

    ').text(errorMsg).html()\n ngToast.create({ className: 'error', content: errorHtml })\n }\n })\n\n /**\n * @ngdoc service\n * @name resolvedPromise\n * @memberof clrRequest\n *\n * @description\n * `resolvedPromise` is a service that returns a resolved promise.\n *\n * @param {any} res - resolved response.\n *\n * @example\n * resolvedPromise(response)\n */\n .factory('resolvedPromise', function($q) {\n return function(res, rejected) {\n const deferred = $q.defer()\n if (rejected) {\n deferred.reject(res)\n } else {\n deferred.resolve(res)\n }\n return deferred.promise\n }\n })\n\n}();\n","!function() {\n 'use strict'\n\n /**\n * @ngdoc module\n * @name clrStaticFiles\n *\n * @description\n * A `static` filter that points a provided resource path at the appropriate\n * static URL for the current deployment environment. This relieves us of a\n * dependency on Django's staticfiles template tags in front-end templates.\n */\n const module = angular.module('clrStaticFiles', [])\n\n // The https://prod-static.color.com/ placeholder will be replaced with the actual static URL\n // prefix during the `collectstatic` management command; see\n // `django_apps.core.storages.StaticURLRewritingMixin.post_process()` for\n // details.\n const injectedStaticUrl = 'https://prod-static.color.com/';\n let actualStaticUrl\n // We do this to test for the placeholder value without it also being\n // replaced by the post-processor.\n if (injectedStaticUrl.slice(0, 2) == '__' && injectedStaticUrl.slice(2) == 'STATIC_URL__') {\n actualStaticUrl = '/static/'\n } else {\n actualStaticUrl = injectedStaticUrl\n }\n\n module.constant('staticUrl', actualStaticUrl)\n\n module.filter('static', function (staticUrl) {\n return function (url) {\n // Strip leading / and append to the static URL.\n return staticUrl + url.replace(/^\\//, '')\n }\n })\n}()\n","!function() {\n\n 'use strict'\n\n const stripe = angular.module('clrStripe', [])\n\n stripe.factory('Stripe', function($window) {\n if ($window.Stripe) {\n Stripe.setPublishableKey(angular.element(\"#stripe-public-key\").val());\n return Stripe\n } else {\n console.warn('Stripe could not be found.')\n return {}\n }\n })\n\n stripe.factory('CreditCard', function($q, Stripe) {\n const CreditCard = function() {}\n\n CreditCard.prototype.$save = function() {\n const creditCardPromise = $q.defer()\n\n this.exp_month = this.expiry.split('/')[0]\n this.exp_year = this.expiry.split('/')[1]\n\n Stripe.createToken(this, function(status, res) {\n if (res.error) {\n creditCardPromise.reject(res)\n } else {\n creditCardPromise.resolve(res)\n }\n })\n\n return creditCardPromise.promise\n }\n\n return CreditCard\n })\n\n}()\n","const videoIds = {\n // Precounseling videos before July 2017\n pretestBrca12: {\n vimeoId: 234543923\n },\n pretestBreastOvarian19: {\n vimeoId: 124322533\n },\n pretestHereditary30: {\n vimeoId: 163089926,\n },\n // New precounseling videos July 2017\n preCounselCancer: {\n vimeoId: 224364319\n },\n preCounselCombo: {\n // 8/25/17: Updated to V3, FIXIT-84\n vimeoId: 231118714\n },\n preCounselFh: {\n vimeoId: 227482214\n },\n preCounselCardio30: {\n vimeoId: 261163566\n },\n preCounselCombo2: {\n vimeoId: 261213066\n },\n preCounselCore10: {\n vimeoId: 271742191\n },\n sample: {\n vimeoId: 120631163,\n },\n storiesRobin: {\n vimeoId: 292217666\n },\n // Benefits-specific video variations (usually an end-card with \"/benefits\" text)\n benefitsNvidiaStory: {\n vimeoId: 292050989\n },\n benefitsMarissaStory: {\n vimeoId: 292050867\n },\n benefitsStoriesPam: {\n vimeoId: 229040189\n },\n}\n\n!function() {\n\n 'use strict'\n\n const module = angular.module('clrVideo', [])\n\n module.factory('VideoService', function() {\n\n function vimeoEmbed(id) {\n return \"\"\n }\n\n const videos = videoIds\n // Add embed IDs used on press page\n angular.forEach(videos, function(video) {\n if (video.vimeoId) {\n video.embed = vimeoEmbed(video.vimeoId)\n }\n })\n return {\n videos: videos\n }\n })\n\n /**\n * @ngdoc service\n * @name vimeoEmbedPlayer\n * @memberof clrVideo\n *\n * @description\n * A Vimeo video player directive\n *\n * To Use:\n *
    \n */\n module.directive('vimeoEmbedPlayer', function($sce, VideoService) {\n // Docs: https://github.com/vimeo/player.js\n return {\n restrict: 'A',\n // priority: 999, // must be higher than ng-repeat's priority of 1000\n link: function(scope, elem, attrs) {\n const videoName = attrs.vimeoEmbedPlayer\n const autoplay = attrs.autoplay ? attrs.autoplay : true\n const vimeo = VideoService.videos[videoName]\n if (vimeo) {\n const url = $sce.trustAsResourceUrl('https://player.vimeo.com/video/' + vimeo.vimeoId + (autoplay ? '?autoplay=1' : ''))\n elem.append('')\n } else {\n console.info('No Vimeo video ID found for: ' + videoName)\n }\n }\n }\n })\n\n /**\n * @ngdoc service\n * @name vimeoModalPlayer\n * @memberof clrVideo\n *\n * @description\n * A Vimeo video player directive\n *\n * To Use:\n * Play Video\n */\n module.directive('vimeoModalPlayer', function(VideoService, vimeoModal) {\n // Docs: https://github.com/vimeo/player.js\n return {\n restrict: 'A',\n priority: 599, // must be lower than ng-repeat's priority of 1000\n link: function(scope, elem, attrs) {\n const videoName = attrs.vimeoModalPlayer\n const autoplay = attrs.autoplay ? attrs.autoplay : true\n const vimeo = VideoService.videos[videoName]\n if (angular.isDefined(vimeo)) {\n elem.on('click', function() {\n vimeoModal.open('https://player.vimeo.com/video/' + vimeo.vimeoId, autoplay)\n })\n } else {\n console.info('No Vimeo video ID found for: ' + videoName)\n }\n }\n }\n })\n\n function VimeoModalController($scope, $modalInstance, $sce, vimeoUrl) {\n $scope.vimeoUrl = $sce.trustAsResourceUrl(vimeoUrl)\n $scope.done = function() {\n $modalInstance.close()\n }\n }\n\n /**\n * @ngdoc service\n * @name vimeoModal\n * @memberof clrVideo\n *\n * @description\n * A Vimeo video modal.\n */\n module.factory('vimeoModal', function($modal) {\n return {\n open: function(vimeoUrl, autoplay) {\n return $modal.open({\n template: '
    ',\n controller: VimeoModalController,\n size: 'lg',\n resolve: {\n vimeoUrl: function() {\n return vimeoUrl + (autoplay ? '?autoplay=1' : '')\n }\n }\n })\n }\n }\n })\n\n}();\n","!function() {\n\n 'use strict'\n\n const module = angular.module('clrWaffle', [])\n\n module.factory('waffle', ['$window', function($window) {\n if ('waffle' in $window) {\n return $window.waffle\n } else {\n return {}\n }\n }])\n}()\n","!function() {\n 'use strict'\n\n const colorApp = angular.module('colorApp')\n const openRegistryModal = function(textModal) {\n return function() {\n textModal.open(\n \"Information transfer to the BRCA Foundation\",\n \"You consent to our transfer of your name, email, birth date, mutation details, ethnicity, personal cancer history, and surgery history (“Information”) to the BRCA Foundation as part of enrolling. Immediately upon such transfer, the BRCA Foundation assumes sole responsibility and liability for using, disclosing and safeguarding your Information under applicable federal and state data privacy and security laws, regulations and guidelines.\",\n 'Done'\n )\n }\n }\n\n colorApp.controller(\n 'FamilyTestingInitializationController',\n function($http, $location, waffle, eligibility, fileUploader, FamilyTestingFlow) {\n 'ngInject'\n\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n if (waffle.switch_is_active('use-react-family-testing-flow-2023-03-30')) {\n return $location.path('/react/hereditary-disease-risk/family-testing/enroll')\n }\n\n const params = $location.search()\n if (eligibility.status == 'unknown' && params.enrollment_token) {\n $http.post('/api/v1/family_testing/claim_enrollment', {enrollment_token: params.enrollment_token} )\n .then(function(res) {\n $location.path('/family-testing/enroll')\n })\n }\n if (eligibility.status == 'pending' ) {\n $location.path('/family-testing/enroll/reviewing')\n return\n }\n if (eligibility.status == 'issued') {\n $location.path('/family-testing/enroll/complete')\n return\n }\n const flowState = FamilyTestingFlow.state\n\n flowState.eligibility = eligibility\n FamilyTestingFlow.initialize()\n FamilyTestingFlow.initializeRelatives()\n\n if (eligibility.status == 'approved') {\n FamilyTestingFlow.initializeEnrollmentData(eligibility)\n FamilyTestingFlow.goTo('/family-testing/enroll/relatives', true)\n } else if (eligibility.color_positive) {\n flowState.resultsOwner = 'self'\n flowState.genes = eligibility.positive_genes\n\n FamilyTestingFlow.goTo('/family-testing/enroll/relatives', true)\n } else {\n flowState.applicant = {}\n flowState.proband = {}\n flowState.genes = []\n flowState.uploader = fileUploader({\n url: '/api/v1/family_testing/upload',\n queueLimit: 1\n })\n\n FamilyTestingFlow.goTo('/family-testing/enroll/results', true)\n }\n }\n )\n\n colorApp.controller(\n 'FamilyTestingResultsController',\n function($scope, $modal, ngToast, familyTestingGenes, months, FamilyTestingFlow) {\n 'ngInject'\n $scope.flowState = FamilyTestingFlow.state\n\n $scope.genes = familyTestingGenes\n $scope.relationships = [\n 'mother',\n 'father',\n 'sister',\n 'brother',\n 'daughter',\n 'son'\n ]\n\n // Initialize birthdate based on the flow state\n const birthdate = $scope.flowState.applicant.birthdate\n if (birthdate) {\n $scope.day = birthdate.getDate()\n $scope.month = months[birthdate.getMonth()]\n $scope.year = birthdate.getFullYear()\n }\n\n function getProbandRelationship() {\n if ($scope.flowState.resultsOwner == 'self') {\n return 'self'\n } else {\n return $scope.flowState.proband.relationship\n }\n }\n\n const originalProbandRelationship = getProbandRelationship()\n\n function getAge(birthdate) {\n const today = new Date()\n let age = today.getFullYear() - birthdate.getFullYear()\n const m = today.getMonth() - birthdate.getMonth()\n if (m < 0 || m == 0 && today.getDate() < birthdate.getDate()) {\n age--\n }\n return age\n }\n\n $scope.onLearnMore = function() {\n return $modal.open({\n templateUrl: '/family_testing/_results_modal.html',\n size: 'lg'\n })\n }\n\n $scope.goToNext = function() {\n const birthdate = new Date($scope.birthdate)\n if (getAge(birthdate) < 18) {\n ngToast.create({\n className: 'error',\n content: \"You must be 18 or older to apply for the Color Family Testing program.\"\n })\n return\n }\n\n // Set up flowState for next steps\n const flowState = $scope.flowState\n flowState.applicant.birthdate = new Date(birthdate)\n\n // Clear out relatives if proband has changed\n if (originalProbandRelationship != getProbandRelationship()) {\n FamilyTestingFlow.initializeRelatives()\n }\n\n if ($scope.flowState.edit && !flowState.relativesNeeded) {\n FamilyTestingFlow.goTo('/family-testing/enroll/review')\n } else {\n FamilyTestingFlow.goTo('/family-testing/enroll/relatives', true)\n }\n }\n }\n )\n\n colorApp.controller(\n 'FamilyTestingRelativesController',\n function($scope, textModal, FamilyTestingFlow) {\n 'ngInject'\n $scope.flowState = FamilyTestingFlow.state\n\n $scope.enrolledRelativeCount = FamilyTestingFlow.getRelatives().length\n\n function enrollRelative() {\n if ($scope.enrolledRelativeCount >= 10) {\n textModal.open(\n \"You have selected 10 relatives\",\n \"At this time, Color’s Family Testing Program covers up to 10 relatives for $50 testing. If you have more than 10 relatives who would be eligible for testing, please contact familyprogram@color.com.\",\n 'Okay',\n \"\",\n true\n )\n return false\n }\n $scope.enrolledRelativeCount += 1\n $scope.form.$setValidity('selection', true)\n return true\n }\n\n function unenrollRelative() {\n $scope.enrolledRelativeCount -= 1\n }\n\n $scope.changeEnrollment = function(relative) {\n // function is called after a change is made to the relative\n if (relative && relative.enroll) {\n if (!enrollRelative()) {\n relative.enroll = false\n }\n } else {\n unenrollRelative()\n }\n }\n\n $scope.addRelative = function(relationship) {\n if (enrollRelative()) {\n $scope.flowState[relationship + 's'].push({ enroll: true })\n }\n }\n\n $scope.goToNext = function() {\n if ($scope.enrolledRelativeCount == 0) {\n $scope.form.$setValidity('selection', false)\n return\n }\n $scope.flowState.relativesNeeded = false\n if ($scope.flowState.edit) {\n FamilyTestingFlow.goTo('/family-testing/enroll/review')\n } else {\n FamilyTestingFlow.goTo('/family-testing/enroll/review', true)\n }\n }\n }\n )\n\n colorApp.controller(\n 'FamilyTestingReviewController',\n function($scope, $http, auth, resolvedPromise, FamilyTestingFlow) {\n 'ngInject'\n $scope.flowState = FamilyTestingFlow.state\n $scope.currentUser = auth.currentUser\n\n $scope.relatives = FamilyTestingFlow.getRelatives()\n\n $scope.goToPage = function(pageUrl) {\n $scope.flowState.edit = true\n FamilyTestingFlow.goTo('/family-testing/enroll/' + pageUrl)\n }\n\n function getInviteeInfo(relative, relationship) {\n if (relative && relative.enroll) {\n return {\n first_name: relative.firstName,\n last_name: relative.lastName,\n age: relative.age,\n email: relative.email,\n relationship: relationship\n }\n } else {\n return null\n }\n }\n\n $scope.submit = function() {\n $scope.submitting = true\n const flowState = $scope.flowState\n let invitees = []\n invitees.push(getInviteeInfo(flowState.mother, 'mother'))\n invitees.push(getInviteeInfo(flowState.father, 'father'))\n angular.forEach(\n ['sister', 'brother', 'daughter', 'son'],\n function(relationship) {\n angular.forEach(\n flowState[relationship + 's'],\n function(invitee) {\n invitees.push(getInviteeInfo(invitee, relationship))\n }\n )\n }\n )\n\n invitees = invitees.filter(function(invitee) { return invitee })\n\n const data = {\n invitees: invitees,\n }\n\n if (flowState.eligibility.status == 'approved') {\n if (flowState.applicant && flowState.applicant.enroll) {\n data.requestor = {'requesting_test': true}\n }\n return $http.post('/api/v1/family_testing/add_additional_invitees', data)\n .then(function() {\n auth.sync(true)\n FamilyTestingFlow.goTo('/family-testing/enroll/confirmation', true)\n })\n }\n else if (!flowState.eligibility.color_positive) {\n data.proband = {\n genes: flowState.genes,\n document_key: flowState.uploader.getUploadedKeys()[0]\n }\n data.requestor = {\n date_of_birth: flowState.applicant.birthdate.toISOString().slice(0, 10),\n sex: flowState.applicant.sex,\n how_you_heard: flowState.applicant.heardAboutColor\n }\n\n if (flowState.resultsOwner == 'self') {\n data.proband.relationship = 'self'\n } else if (flowState.resultsOwner == 'relative') {\n data.proband.relationship = flowState.proband.relationship\n data.proband.first_name = flowState.proband.firstName\n data.proband.last_name = flowState.proband.lastName\n data.proband.age = flowState.proband.age\n data.requestor.requesting_test = flowState.applicant.enroll\n }\n }\n\n resolvedPromise()\n .then(function() {\n return $http.post('/api/v1/family_testing/request_discount', data)\n .then(function() {\n auth.sync(true)\n FamilyTestingFlow.goTo('/family-testing/enroll/confirmation', true)\n })\n })\n .catch(function() {\n // Silently ignoring our API exceptions. FIXME do better in React.\n })\n .finally(function() {\n $scope.submitting = false\n })\n }\n }\n )\n\n colorApp.controller(\n 'FamilyTestingConfirmationController',\n function($scope, FamilyTestingFlow) {\n 'ngInject'\n const flowState = FamilyTestingFlow.state\n $scope.isPreApproved = flowState.isPreApproved()\n }\n )\n\n colorApp.controller(\n 'FamilyTestingAccountCreationController',\n function($scope, $location, auth, ngToast, createAccount) {\n 'ngInject'\n if (auth.isLoggedIn) {\n $location.path('/family-testing/enroll')\n }\n $scope.createAccount = function(account) {\n $scope.creatingAccount = true\n createAccount(account).then(function() {\n $location.path('/family-testing/enroll')\n }).catch(function() {\n ngToast.create({className: 'error', content: \"Account creation failed; please contact support\"})\n }).finally(function() {\n $scope.creatingAccount = false\n })\n }\n }\n )\n}()\n","!function() {\n\n 'use strict'\n\n angular.module('familyTestingDirectives', [])\n\n .directive('familyTestingBreadcrumb', function(FamilyTestingFlow) {\n 'ngInject'\n return {\n restrict: 'E',\n scope: {\n step: '@'\n },\n templateUrl: '/family_testing/_breadcrumb.html',\n link: function(scope) {\n scope.flowState = FamilyTestingFlow.state\n }\n }\n })\n\n .directive('relativeTest', function() {\n return {\n restrict: 'E',\n scope: { relative: '=' },\n templateUrl: '/family_testing/_relative.html'\n }\n })\n\n}();\n","!function() {\n\n 'use strict'\n\n const module = angular.module('familyTestingFilters', [])\n\n module.filter('geneMutations', function() {\n return function(genes) {\n let text = ''\n if (genes.length == 1) {\n text += genes[0]\n } else if (genes.length == 2) {\n text += genes[0] + ' and ' + genes[1]\n } else {\n text += genes.slice(0, -1).join(', ')\n text += ', and ' + genes.slice(-1)\n }\n text += ' mutation'\n if (genes.length > 1) {\n text += 's'\n }\n return text\n }\n })\n\n module.filter('relativeAdjective', function() {\n return function(relationship) {\n if (relationship == 'mother') {\n return 'maternal'\n }\n if (relationship == 'father') {\n return 'paternal'\n }\n }\n })\n}();\n","!function() {\n\n 'use strict'\n\n const module = angular.module('familyTestingServices', ['clrLocation'])\n\n module.factory('FamilyTestingFlow', function(pathFlow, auth) {\n 'ngInject'\n const flow = pathFlow(\n 'familyTestingFlow',\n [\n {\n controller: 'FamilyTestingInitializationController',\n path: '/family-testing/enroll'\n },\n {\n controller: 'FamilyTestingResultsController',\n path: '/family-testing/enroll/results',\n optional: true\n },\n {\n controller: 'FamilyTestingRelativesController',\n path: '/family-testing/enroll/relatives'\n },\n {\n controller: 'FamilyTestingReviewController',\n path: '/family-testing/enroll/review'\n },\n {\n controller: 'FamilyTestingConfirmationController',\n path: '/family-testing/enroll/confirmation'\n }\n ]\n )\n\n flow.initializeRelatives = function() {\n const flowState = flow.state\n\n flowState.mother = null\n flowState.father = null\n flowState.sisters = []\n flowState.brothers = []\n flowState.daughters = []\n flowState.sons = []\n\n if (flowState.resultsOwner == 'self') {\n // Pre-fill relative information from available health history\n angular.forEach(\n flowState.eligibility.family_info,\n function(relative) {\n const relationship = relative.relationship\n const age = relative.age\n if (age < 18) {\n return\n }\n const relativeStub = { age: age, prefilled: true }\n if (relationship == 'mother') {\n flowState.mother = relativeStub\n } else if (relationship == 'father') {\n flowState.father = relativeStub\n } else if (relationship == 'full sister') {\n flowState.sisters.push(relativeStub)\n } else if (relationship == 'full brother') {\n flowState.brothers.push(relativeStub)\n } else if (relationship == 'daughter') {\n flowState.daughters.push(relativeStub)\n } else if (relationship == 'son') {\n flowState.sons.push(relativeStub)\n }\n }\n )\n }\n\n flowState.relativesNeeded = true\n }\n\n flow.initializeEnrollmentData = function(enrollment) {\n const flowState = flow.state\n // Initializes flow with data from existing enrollment\n flowState.genes = enrollment.positive_genes\n flowState.proband = {relationship: enrollment.proband_relationship}\n if (enrollment.proband_relationship == 'self') {\n flowState.resultsOwner = 'self'\n } else {\n flowState.resultsOwner = 'relative'\n }\n }\n\n flow.getRelatives = function() {\n const flowState = flow.state\n let relatives = [flowState.mother, flowState.father]\n relatives = relatives.concat(\n flowState.sisters,\n flowState.brothers,\n flowState.daughters,\n flowState.sons\n )\n\n if (\n flowState.resultsOwner == 'relative' &&\n flowState.applicant &&\n flowState.applicant.enroll\n ) {\n relatives.unshift({\n firstName: auth.currentUser.first_name,\n lastName: auth.currentUser.last_name,\n email: auth.currentUser.email,\n enroll: true\n })\n }\n\n return relatives.filter(function(relative) { return relative && relative.enroll })\n }\n\n flow.initialize = function() {\n const flowState = flow.state\n flowState.isPreApproved = function() {\n // Eligibility is pre-approved if it's a color positive test or\n // it has gone through approval process already.\n const eligibility = flow.state.eligibility\n if (eligibility) {\n if (flow.state.eligibility.status == 'approved') {\n return true\n } else if (flow.state.eligibility.color_positive) {\n return true\n }\n }\n return false\n }\n }\n\n return flow\n })\n\n .factory('Enrollment', function(resource) {\n 'ngInject'\n return resource(\n '/api/v1/enrollments/:id'\n , { format: 'json', page_size: 15, id: '@id'}\n )\n })\n\n}();\n","!function() {\n\n 'use strict'\n\n const colorApp = angular.module('colorApp')\n\n colorApp.controller('SelectSexController', function($scope, $http, $translate, auth, ngToast, redirect, textModal, genderIdentities) {\n const defaultRedirectPath = '/health-history'\n\n $scope.showGenderIdentityOptions = false\n $scope.identity = {}\n $scope.genderIdentities = genderIdentities\n $scope.modalDisplayed = false\n\n if (auth.currentUser.gender) {\n redirect(defaultRedirectPath)\n }\n\n $scope.openGenderIdentityContent = () => {\n $scope.showGenderIdentityOptions = true\n }\n\n $scope.sexClicked = (sex) => {\n if (sex === genderIdentities.FEMALE) {\n $scope.identity.gender = genderIdentities.FEMALE\n } else {\n $scope.identity.gender = genderIdentities.MALE\n }\n }\n\n $scope.displayModal = () => {\n if ($scope.identity.gender_identity != null && $scope.identity.gender_identity != $scope.identity.gender && !$scope.modalDisplayed) {\n $scope.modalDisplayed = true\n $translate([\n \"SELECT_SEX.GENDER_MODAL.TITLE\",\n \"SELECT_SEX.GENDER_MODAL.DESCRIPTION\"\n ]).then((translations) => {\n textModal.open(translations[\"SELECT_SEX.GENDER_MODAL.TITLE\"],\n translations[\"SELECT_SEX.GENDER_MODAL.DESCRIPTION\"],\n 'I understand',\n null,\n false,\n null,\n null,\n false,\n true,\n false).result\n })\n }\n }\n\n $scope.setSexAndGenderIdentity = () => {\n if ($scope.identity.gender_identity !== genderIdentities.SELF_DESCRIBED) {\n $scope.identity.self_described_gender_identity = null\n }\n $scope.submitting = true\n $http.patch('/api/v1/accounts/' + auth.currentUser.id, $scope.identity)\n .then(function() {\n redirect(defaultRedirectPath)\n }).catch(function() {\n ngToast.create({ className: 'error', content: 'There was an issue submitting this information, please try again.' })\n }).finally(function() {\n $scope.submitting = false\n })\n }\n })\n}();\n","!function() {\n\n 'use strict'\n\n const module = angular.module('healthProfileDirectives', ['healthProfileFilter', 'pascalprecht.translate', 'healthProfileResource'])\n\n module.directive('clrAge', function() {\n return {\n scope: { age: '=' },\n replace: true,\n templateUrl: '/health_profiles/age.html'\n }\n })\n\n module.directive('clrAnswer', function() {\n return {\n transclude: true,\n scope: {\n isAnswered: '=',\n question: '@',\n isGridRow: '=?'\n },\n templateUrl: '/health_profiles/answer.html'\n }\n })\n\n module.directive('clrAgeError', function() {\n return {\n require: '^form',\n scope: {\n formInput: '=formInput'\n },\n templateUrl: '/health_profiles/age_error.html',\n link: function(scope, element, attrs, formCtrl) {\n scope.form = formCtrl\n }\n }\n })\n\n // A helper function for genetic testing health history\n // related directives that need to deal with different\n // field names depending on type of genetic testing\n // the directives are dealing with. This function sets\n // the type as \"Cancer\" if not already set in a given scope.\n function addGeneticTestFieldName(scope) {\n // Default type is cancer\n if (!scope.type) {\n scope.type = 'Cancer'\n }\n\n // Set type specific params\n if (scope.type == 'Cancer') {\n scope.mutationsField = 'mutations'\n scope.hadMutationField = 'had_mutation'\n scope.companyField = 'company_performed_genetic_test'\n scope.hadGeneticTestField = 'had_genetic_test_for_hereditary_cancer_risk'\n scope.anyRelativeField = 'any_relative_had_genetic_test_for_hereditary_cancer_risk'\n } else if (scope.type == 'Cardio') {\n scope.mutationsField = 'cardio_mutations'\n scope.hadMutationField = 'had_cardio_mutation'\n scope.companyField = 'company_performed_cardio_test'\n scope.hadGeneticTestField = 'had_genetic_test_for_cardio'\n scope.anyRelativeField = 'any_relative_had_genetic_test_for_cardio'\n } else {\n throw new Error(scope.type + ' type is not supported.')\n }\n }\n\n module.directive('clrGeneticTestInput', function(interpretedGenes, testTypes, geneticLabsByCondition, fileUploader, FileUploader) {\n return {\n require: '^form',\n scope: {\n profile: '=',\n identifier: '@',\n withoutCompany: '=',\n type: '@?',\n ngRequired: '='\n },\n templateUrl: '/health_profiles/genetic_test_input.html',\n link: function(scope, elem, attrs, formCtrl) {\n if (angular.isUndefined(scope.identifier)) {\n scope.identifier = ''\n }\n scope.form = formCtrl\n\n addGeneticTestFieldName(scope)\n\n let genes;\n let labs\n if (scope.type == 'Cancer') {\n genes = angular.copy(interpretedGenes[testTypes.hereditary30])\n labs = angular.copy(geneticLabsByCondition[scope.type])\n } else if (scope.type == 'Fh') {\n genes = angular.copy(interpretedGenes[testTypes.fh3])\n labs = angular.copy(geneticLabsByCondition['Cardio'])\n } else if (scope.type == 'Cardio') {\n genes = angular.copy(interpretedGenes[testTypes.cardio30])\n labs = angular.copy(geneticLabsByCondition[scope.type])\n // LDLRAP1 is a FH gene we currently don't have but are actively looking to add\n genes.push('LDLRAP1')\n genes.sort()\n }\n\n genes.push('Other')\n scope.genes = genes\n scope.selected = {gene: ''}\n\n labs.push({ name: 'Unknown', value: 'Unknown' })\n scope.companyPerformedGeneticTestOptions = labs\n\n if (!scope.profile[scope.mutationsField]) {\n scope.profile[scope.mutationsField] = []\n }\n\n scope.resultsUploaders = []\n\n const createResultsUploader = function(mutation) {\n const uploader = fileUploader({\n url: '/api/v1/family_testing/upload',\n queueLimit: 1\n })\n\n // Display existing file if one has already been uploaded\n if (mutation.resultsDocumentName && mutation.resultsDocumentKey) {\n const file = new FileUploader.FileItem(uploader, { name: mutation.resultsDocumentName })\n file.s3_key = mutation.resultsDocumentKey\n file.isUploaded = true\n uploader.queue.push(file)\n }\n\n // If a file gets added, update file info\n uploader.onSuccessItem = function(item, response, status, headers) {\n mutation.resultsDocumentName = item.file.name\n mutation.resultsDocumentKey = response\n }\n\n // If a file gets removed, clear file info\n uploader.onRemoveFile = function(file) {\n delete mutation.resultsDocumentName\n delete mutation.resultsDocumentKey\n }\n\n return uploader\n }\n\n for (const mutation of scope.profile[scope.mutationsField]) {\n scope.resultsUploaders.push(createResultsUploader(mutation))\n }\n\n scope.$watch('profile.' + scope.hadMutationField, function(hadMutation) {\n if (hadMutation == 'N' || hadMutation == 'U') {\n scope.profile[scope.mutationsField] = []\n scope.resultsUploaders = []\n }\n })\n\n scope.addMutation = function() {\n const gene = scope.selected.gene == 'Other' ? '' : scope.selected.gene\n const mutation = { gene: gene, name: '' }\n scope.resultsUploaders.push(createResultsUploader(mutation))\n scope.profile[scope.mutationsField].push(mutation)\n scope.selected.gene = \"\"\n }\n\n scope.setGene = function(mutation, selectedGene) {\n if (selectedGene != 'Other') {\n mutation.gene = selectedGene\n }\n }\n\n scope.removeMutation = function(index) {\n scope.profile[scope.mutationsField].splice(index, 1)\n scope.resultsUploaders.splice(index, 1)\n }\n }\n }\n })\n\n module.directive('clrCheckboxWithAgeInput', function() {\n return {\n require: '^form',\n scope: {\n checkboxName: '@',\n ageInputName: '@',\n checkboxLabel: '@',\n model: '=',\n ageModel: '=',\n msgAgeQuestion: '@',\n ngRequired: '=',\n ageMax: '@?'\n },\n templateUrl: '/health_profiles/checkbox_with_age_input.html',\n link: function(scope, elem, attrs, formCtrl) {\n scope.form = formCtrl\n\n if (!scope.ageMax) {\n scope.ageMax = 130\n }\n }\n }\n })\n\n module.directive('clrRadioRowWithAgeInput', function() {\n return {\n require: '^form',\n scope: {\n radioRowName: '@',\n ageInputName: '@',\n rowTranslateText: '@',\n model: '=',\n ageModel: '=',\n msgAgeQuestion: '@',\n tooltipText: '@?',\n ngRequired: '='\n },\n templateUrl: '/health_profiles/directives/radio_row_with_age_input.html',\n link: function(scope, elem, attrs, formCtrl) {\n scope.form = formCtrl\n }\n }\n })\n\n module.directive('clrHealthHistory', function(HealthHistory, kidneyOrLiverProblemOptions, waffle) {\n return {\n scope: {\n healthHistory: '=?',\n userId: '@?'\n },\n templateUrl: '/health_profiles/health_history_show.html',\n link: function(scope) {\n scope.HealthHistory = HealthHistory // Used for relationship constants\n scope.relationships = [\n 'daughter', 'son', 'full sister', 'full brother',\n 'maternal half sister', 'maternal half brother',\n 'paternal half sister', 'paternal half brother',\n 'maternal aunt', 'maternal uncle',\n 'paternal aunt', 'paternal uncle',\n 'mother', 'father',\n 'maternal grandmother', 'maternal grandfather',\n 'paternal grandmother', 'paternal grandfather'\n ]\n if (scope.userId) {\n scope.healthHistory = new HealthHistory()\n HealthHistory.get({ user: scope.userId }).$promise\n .then(function(res) {\n if (res.results.length) {\n scope.healthHistory = new HealthHistory(res.results[0])\n }\n })\n }\n\n scope.kidneyOrLiverProblemOptions = kidneyOrLiverProblemOptions\n\n // nosemgrep:semgrep-rules.use-launchdarkly-react\n scope.grandparentNationalitiesEnabled = waffle.switch_is_active('grandparents_nationalities')\n }\n }\n })\n\n function cleanUpCancerFields(profile, attrs) {\n // if had_cancer was answered, then convert null answer into false.\n if (profile && angular.isDefined(profile.had_cancer) && profile.had_cancer !== null) {\n for (let i = 0; i < attrs.length; i++) {\n if (!profile[attrs[i]]) {\n profile[attrs[i]] = false\n }\n }\n }\n }\n\n module.directive('clrCondensedRelativesDisplay', function(HealthHistory) {\n return {\n scope: {\n healthHistory: '=',\n known: '='\n },\n templateUrl: '/health_profiles/condensed_relatives_display.html',\n link: function(scope, elem, attrs) {\n scope.relationships = HealthHistory['R_' + attrs.relationships]\n scope.relatives = scope.healthHistory.getRelatives(scope.relationships)\n\n if (scope.known === 'U' || scope.known === null) {\n scope.hasRelatives = 'unknown'\n } else if (scope.known === 'N' || scope.known === false || scope.relatives.length == 0) {\n scope.hasRelatives = 'no'\n } else {\n scope.hasRelatives = 'yes'\n }\n }\n }\n })\n\n module.directive('clrCondensedRelativeDisplay', function() {\n return {\n scope: {\n relative: '='\n },\n templateUrl: '/health_profiles/condensed_relative_display.html',\n link: function(scope, elem, attrs) {\n scope.cancers = []\n scope.editedBy = []\n\n if (!scope.relative) {\n return\n }\n\n const healthProfile = scope.relative.female_relative_health_profile || scope.relative.male_relative_health_profile\n if (healthProfile) {\n scope.cancers = healthProfile.cancers\n }\n }\n }\n })\n\n module.directive('geneticTestShow', function() {\n return {\n scope: {\n healthHistory: '=',\n type: '@?'\n },\n templateUrl: '/health_profiles/genetic_test_show.html',\n link: function(scope, elem, attrs) {\n addGeneticTestFieldName(scope)\n if (scope.type == 'Cancer') {\n scope.hadGeneticTestMsg = 'HEALTH_HISTORY.PERSONAL.HAD_GENETIC_TEST_Q'\n scope.hadGeneticTestTooltipMsg = 'HEALTH_HISTORY.POPUPS.HAD_GENETIC_TEST'\n } else if (scope.type == 'Fh') {\n scope.hadGeneticTestMsg = 'HEALTH_HISTORY.PERSONAL.HAD_FH_GENETIC_TEST_Q'\n } else if (scope.type == 'Cardio') {\n scope.hadGeneticTestMsg = 'HEALTH_HISTORY.PERSONAL.HAD_CARDIO_GENETIC_TEST_Q'\n }\n }\n }\n })\n\n module.directive('boldOnSelectValue', function() {\n return {\n restrict: 'A',\n scope: {\n toggleValue: '='\n },\n link: function(scope, elem) {\n scope.$watch('toggleValue', function(newValue) {\n if (newValue === true || newValue == 'Y') {\n elem.css({'font-weight': 500})\n } else {\n elem.css({'font-weight': 400})\n }\n })\n }\n }\n })\n\n function getInitialHeightAndWeight(scope) {\n const heightInInches = scope.healthHistory.height_in_inches\n if (heightInInches) {\n scope.heightFeet = Math.floor(heightInInches / 12)\n scope.heightInches = heightInInches % 12\n scope.heightCentimeters = Math.round(heightInInches / 0.39370)\n }\n\n const weightInPounds = scope.healthHistory.weight_in_pounds\n if (weightInPounds) {\n scope.weightKilograms = Math.round(weightInPounds / 2.2046)\n }\n scope.healthHistory.weight_in_pounds = Math.round(scope.healthHistory.weight_in_pounds);\n }\n\n module.directive('generalWellnessShow', function() {\n return {\n restrict: 'E',\n scope: {\n healthHistory: '='\n },\n templateUrl: '/health_profiles/directives/general_wellness_show.html',\n link: function(scope) {\n getInitialHeightAndWeight(scope)\n }\n }\n })\n\n module.directive('gridRowShow', function() {\n return {\n restrict: 'E',\n scope: {\n field: '=',\n ageDiagnosed: '=',\n rowText: '@',\n tooltipText: '@?'\n },\n templateUrl: '/health_profiles/directives/grid_row_show.html'\n }\n })\n\n module.directive('subgridRowShow', function() {\n return {\n restrict: 'E',\n scope: {\n field: '=',\n ageDiagnosed: '=?',\n rowText: '@'\n },\n templateUrl: '/health_profiles/directives/subgrid_row_show.html'\n }\n })\n\n module.directive('relativeGridRowShow', function() {\n return {\n restrict: 'E',\n scope: {\n shouldDisplay: '=',\n ageDiagnosed: '=?',\n rowText: '@'\n },\n templateUrl: '/health_profiles/directives/relative_grid_row_show.html'\n }\n })\n\n module.directive('medicationHistory', function($filter) {\n return {\n restrict: 'E',\n require: '^form',\n scope: {\n healthHistory: '=',\n ngRequired: '='\n },\n templateUrl: '/health_profiles/directives/medication_history.html',\n link: function(scope, element, attrs, formCtrl) {\n scope.form = formCtrl\n if (!scope.healthHistory.hasOwnProperty('current_medications')) {\n scope.healthHistory.current_medications = []\n }\n\n scope.itemSelected = function(item) {\n const medication = item.originalObject\n if ($filter('filter')(scope.healthHistory.current_medications, {$: medication.drug_brand_name}).length) {\n return\n }\n const medicationItem = {\n brand: medication\n }\n scope.healthHistory.current_medications.push(medicationItem)\n scope.healthHistory.current_medications.sort((a, b) => a.brand.drug_brand_name.localeCompare(b.brand.drug_brand_name))\n }\n }\n }\n })\n\n module.directive('medicationList', function() {\n return {\n restrict: 'E',\n scope: {\n medicationList: '='\n },\n templateUrl: '/health_profiles/directives/medication_list.html',\n link: function(scope) {\n scope.removeItem = function(item) {\n const index = scope.medicationList.findIndex(m => m.id == item.id)\n scope.medicationList.splice(index, 1)\n }\n }\n }\n })\n\n module.directive('kidneyOrLiverProblem', function(kidneyOrLiverProblemOptions) {\n return {\n require: '^form',\n restrict: 'E',\n scope: {\n healthHistory: '=',\n ngRequired: '='\n },\n templateUrl: '/health_profiles/directives/kidney_or_liver_problem.html',\n link: function(scope, elem, attrs, formCtrl) {\n scope.form = formCtrl\n scope.options = kidneyOrLiverProblemOptions\n\n scope.atLeastOneOptionSelected = function() {\n return scope.options.some(function(option) { return scope.healthHistory[option.fieldName]})\n }\n }\n }\n })\n\n module.directive('genderIdentityInput', function(genderIdentities) {\n return {\n restrict: 'E',\n scope: {\n ngModel: \"=\",\n ngChange: \"=\",\n },\n templateUrl: '/health_profiles/directives/gender_identity_input.html',\n link: function(scope, elem, attrs, controller) {\n scope.form = controller\n scope.genderIdentityOptions = [\n { value: genderIdentities.FEMALE, label: \"Female\" },\n { value: genderIdentities.MALE, label: \"Male\" },\n { value: genderIdentities.NON_BINARY, label: \"Non-Binary\" },\n { value: genderIdentities.SELF_DESCRIBED, label: \"Prefer to self-describe\" },\n { value: genderIdentities.PREFER_NOT_TO_RESPOND, label: \"Prefer not to say\" }\n ]\n }\n }\n })\n}();\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name healthProfileFilter\n *\n * @description\n * The `healthProfileFilter` provides filters for health profiles.\n */\n const module = angular.module('healthProfileFilter', ['clrFilter'])\n\n /**\n * @ngdoc filter\n * @name anyRelativeHadCancer\n * @memberof healthProfileFilter\n *\n * @description\n * Checks if any of given relative had cancer.\n * Returns true or false.\n */\n module.filter('anyRelativeHadCancer', function() {\n return function(relatives) {\n if (angular.isUndefined(relatives)) {\n return false\n }\n for (let i = 0; i < relatives.length; i++) {\n const relative = relatives[i]\n if (relative.female_relative_health_profile) {\n if (relative.female_relative_health_profile.had_cancer) {\n return true\n }\n } else if (relative.male_relative_health_profile) {\n if (relative.male_relative_health_profile.had_cancer) {\n return true\n }\n }\n }\n return false\n }\n })\n\n /**\n * @ngdoc filter\n * @name anyRelativeHadCardioHistory\n * @memberof healthProfileFilter\n *\n * @description\n * Checks if any of given relative had cardio history.\n * Returns true or false.\n */\n module.filter('anyRelativeHadCardioHistory', function() {\n return function(relatives) {\n if (angular.isUndefined(relatives)) {\n return false\n }\n for (let i = 0; i < relatives.length; i++) {\n const relative = relatives[i]\n if (relative.cardio_history.length) {\n return true\n }\n }\n return false\n }\n })\n\n /**\n * @ngdoc filter\n * @name anyRelativeHadMutation\n * @memberof healthProfileFilter\n *\n * @description\n * Checks if any of given relative had mutation.\n * Returns true or false.\n */\n module.filter('anyRelativeHadMutation', function() {\n return function(relatives, clinicalDomain) {\n if (angular.isUndefined(relatives)) {\n return false\n }\n let fieldName\n if (clinicalDomain == 'cancer') {\n fieldName = 'had_mutation'\n } else if (clinicalDomain == 'cardio') {\n fieldName = 'had_cardio_mutation'\n } else {\n throw clinicalDomain + ' not supported.'\n }\n for (let i = 0; i < relatives.length; i++) {\n if (relatives[i][fieldName] == 'Y') {\n return true\n }\n }\n return false\n }\n })\n\n /**\n * @ngdoc filter\n * @name yesNoFullText\n * @memberof healthProfileFilter\n *\n * @description\n * Converts shortened yes/no/I'm not sure option into full text.\n */\n module.filter('yesNoFullText', function() {\n return function(shortenForm, unknownText) {\n if (shortenForm == 'Y') {\n return 'Yes'\n } else if (shortenForm == 'N') {\n return 'No'\n } else {\n return unknownText ? unknownText : 'I\\'m not sure'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name booleanToYesNo\n * @memberof healthProfileFilter\n *\n * @description\n * Converts boolean to yes or no.\n */\n module.filter('booleanToYesNo', function() {\n return function(value) {\n if (value) {\n return 'Yes'\n } else {\n return 'No'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name birthYearToAge\n * @memberof healthProfileFilter\n *\n * @description\n * Converts birth year to age.\n */\n module.filter('birthYearToAge', function() {\n return function(birthYear) {\n const date = new Date();\n const currentYear = date.getFullYear();\n const anonymizedIndex = birthYear.indexOf ? birthYear.indexOf(' or earlier') : -1\n if (anonymizedIndex == -1) {\n date.setYear(birthYear)\n return currentYear - date.getFullYear()\n } else {\n date.setYear(birthYear.slice(0, anonymizedIndex))\n return currentYear - date.getFullYear() + ' or earlier'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name ageToBirthYear\n * @memberof healthProfileFilter\n *\n * @description\n * Converts age to birth year.\n */\n module.filter('ageToBirthYear', function() {\n return function(age) {\n if (age == null) {\n return null\n }\n const date = new Date()\n date.setYear(date.getFullYear() - age)\n return date.getFullYear()\n }\n })\n\n /**\n * @ngdoc filter\n * @name familyRelativeIdentifier\n * @memberof healthProfileFilter\n *\n * @description\n * Converts health profile object into it's identifier string.\n */\n module.filter('familyRelativeIdentifier', function($filter) {\n const relationshipNames = {\n 'full sister': 'sister',\n 'full brother': 'brother',\n 'maternal half sister': 'half-sister, mother',\n 'maternal half brother': 'half-brother, mother',\n 'paternal half sister': 'half-sister, father',\n 'paternal half brother': 'half-brother, father'\n }\n return function(relative, index, total, relationshipOnly) {\n if (!relative) {\n return\n }\n\n let name;\n let prefix = '';\n let suffix = ''\n\n if (!relationshipOnly && relative.full_name) {\n name = relative.full_name\n } else if (!relationshipOnly && relative.first_name && relative.last_name) {\n name = relative.first_name + ' ' + relative.last_name\n } else {\n name = $filter('capitalize')(relationshipNames[relative.relationship] || relative.relationship, 'first')\n if (!angular.isUndefined(index) && total > 1) {\n prefix = $filter('ordinalNumber')(index + 1) + ' '\n }\n }\n\n if (relative.age_at_death) {\n suffix = ' (' + relative.age_at_death + ', dec.' + ')'\n } else if (relative.birth_year) {\n suffix = ' (' + $filter('birthYearToAge')(relative.birth_year) + ')'\n } else {\n suffix = ' (unknown)'\n }\n\n return prefix + name + suffix\n }\n })\n\n /**\n * @ngdoc filter\n * @name familyRelativeAge\n * @memberof healthProfileFilter\n *\n * @description\n * Converts health profile object into it's age string.\n */\n module.filter('familyRelativeAge', function($filter) {\n return function(relative, fullSentence) {\n if (fullSentence) {\n if (relative.age_at_death) {\n return ' was ' + relative.age_at_death + ' years old at death'\n } else if (relative.birth_year) {\n return ' is ' + $filter('birthYearToAge')(relative.birth_year) + ' years old'\n }\n return \"'s age is unknown\"\n } else {\n if (relative.age_at_death) {\n return relative.age_at_death + ' years old at death'\n } else if (relative.birth_year) {\n return $filter('birthYearToAge')(relative.birth_year) + ' years old'\n }\n return 'unknown'\n }\n }\n })\n\n /**\n * @ngdoc filter\n * @name genesHadMutation\n * @memberof healthProfileFilter\n *\n * @description\n * Returns a list of genes that had mutation given a health profile.\n */\n module.filter('genesHadMutation', function() {\n return function(mutations) {\n return mutations.map(function(m) {\n let res = m.gene\n if (m.name) {\n res += ' (' + m.name + ')'\n }\n return res\n })\n }\n })\n\n /**\n * @ngdoc filter\n * @name cancersDiagnosed\n * @memberof healthProfileFilter\n *\n * @description\n * Returns a list of cancers that have been diagnosed\n * given a gender specific health profile.\n */\n module.filter('cancersDiagnosed', function() {\n return function(profile) {\n const cancers = []\n if (profile.had_breast_cancer) {\n cancers.push('Breast cancer')\n }\n if (profile.had_ovarian_cancer) {\n cancers.push('Ovarian cancer')\n }\n if (profile.had_fallopian_tube_cancer) {\n cancers.push('Fallopian tube cancer')\n }\n if (profile.had_primary_peritoneal_cancer) {\n cancers.push('Primary peritoneal cancer')\n }\n if (profile.had_other_cancer1) {\n cancers.push(profile.other_cancer1)\n }\n if (profile.had_other_cancer2) {\n cancers.push(profile.other_cancer2)\n }\n return cancers\n }\n })\n\n /**\n * @ngdoc filter\n * @name genderFullText\n * @memberof healthProfileFilter\n *\n * @description\n * Expand abbreviated gender string.\n */\n module.filter('genderFullText', function() {\n return function(gender) {\n if (gender == 'F') {\n return 'Female'\n }\n if (gender == 'M') {\n return 'Male'\n }\n return ''\n }\n })\n\n /**\n * @ngdoc filter\n * @name familyRelativesSort\n * @memberof healthProfileFilter\n *\n * @description\n * Returns the list of relatives in order of importance.\n * Priority is children, parents, grandparents, siblings, mother side, father side with female over male priority.\n */\n module.filter('familyRelativesSort', function() {\n const relationshipPriorityList = [\n 'daughter',\n 'son',\n 'mother',\n 'father',\n 'maternal grandmother',\n 'maternal grandfather',\n 'paternal grandmother',\n 'paternal grandfather',\n 'full sister',\n 'full brother',\n 'maternal half sister',\n 'maternal half brother',\n 'paternal half sister',\n 'paternal half brother',\n 'maternal aunt',\n 'maternal uncle',\n 'paternal aunt',\n 'paternal uncle'\n ]\n return function(relatives) {\n return relatives.sort(function(a,b) {\n const indexA = relationshipPriorityList.indexOf(a.relationship)\n const indexB = relationshipPriorityList.indexOf(b.relationship)\n if (indexA == indexB) {\n return a.id - b.id\n }\n return indexA - indexB\n })\n }\n })\n\n}();\n","!function() {\n\n 'use strict'\n\n const module = angular.module('healthProfileResource', ['clrRequest', 'clrResource'])\n\n module.constant('femaleCancerAttrs', [\n 'had_breast_cancer',\n 'had_hematological_malignancy',\n 'had_ovarian_cancer',\n 'had_fallopian_tube_cancer',\n 'had_primary_peritoneal_cancer',\n 'had_colorectal_cancer',\n 'had_endometrial_cancer',\n 'had_gastric_cancer',\n 'had_melanoma',\n 'had_pancreatic_cancer',\n 'had_thyroid_cancer',\n 'had_kidney_cancer',\n 'had_other_cancer1',\n 'had_other_cancer2'\n ])\n\n module.constant('maleCancerAttrs', [\n 'had_breast_cancer',\n 'had_colorectal_cancer',\n 'had_gastric_cancer',\n 'had_melanoma',\n 'had_pancreatic_cancer',\n 'had_prostate_cancer',\n 'had_thyroid_cancer',\n 'had_kidney_cancer',\n 'had_hematological_malignancy',\n 'had_other_cancer1',\n 'had_other_cancer2'\n ])\n\n module.factory('HealthHistory', function($filter, resource, femaleCancerAttrs, maleCancerAttrs) {\n const HealthHistory = resource(\n '/api/v1/health_history/:id'\n , { format: 'json', id: '@id' }\n )\n\n HealthHistory.R_PARENTS = ['mother', 'father']\n HealthHistory.R_MATERNAL_GRANDPARENTS = ['maternal grandmother', 'maternal grandfather']\n HealthHistory.R_PATERNAL_GRANDPARENTS = ['paternal grandmother', 'paternal grandfather']\n HealthHistory.R_GRANDPARENTS = HealthHistory.R_MATERNAL_GRANDPARENTS + HealthHistory.R_PATERNAL_GRANDPARENTS\n HealthHistory.R_ANCESTORS = HealthHistory.R_PARENTS + HealthHistory.R_GRANDPARENTS\n HealthHistory.R_SIBLINGS = [\n 'full sister', 'maternal half sister', 'paternal half sister',\n 'full brother', 'maternal half brother', 'paternal half brother'\n ]\n HealthHistory.R_CHILDREN = ['daughter', 'son']\n // PARSIBS = Parent's Siblings\n HealthHistory.R_MATERNAL_PARSIBS = ['maternal aunt', 'maternal uncle']\n HealthHistory.R_PATERNAL_PARSIBS = ['paternal aunt', 'paternal uncle']\n HealthHistory.R_PARSIBS = HealthHistory.R_MATERNAL_PARSIBS + HealthHistory.R_PATERNAL_PARSIBS\n\n HealthHistory.prototype.initializeRelatives = function() {\n if (!this.family_relative_health_profiles || (this.family_relative_health_profiles.length == 0)) {\n this.family_relative_health_profiles = [\n { relationship: 'mother', can_edit: true, can_delete: false },\n { relationship: 'father', can_edit: true, can_delete: false },\n { relationship: 'maternal grandmother', can_edit: true, can_delete: false },\n { relationship: 'maternal grandfather', can_edit: true, can_delete: false },\n { relationship: 'paternal grandmother', can_edit: true, can_delete: false },\n { relationship: 'paternal grandfather', can_edit: true, can_delete: false }\n ]\n }\n\n this.family_relative_health_profiles = $filter('familyRelativesSort')(this.family_relative_health_profiles)\n }\n\n HealthHistory.prototype.getRelatives = function(relationships) {\n if (!this.family_relative_health_profiles) {\n return []\n }\n\n const relatives = []\n for (let i = 0; i < this.family_relative_health_profiles.length; i++) {\n const relative = this.family_relative_health_profiles[i]\n if (relationships.indexOf(relative.relationship) != -1) {\n relatives.push(relative)\n }\n }\n return relatives\n }\n\n HealthHistory.prototype.getRelative = function(relationship) {\n return this.getRelatives([relationship])[0]\n }\n\n HealthHistory.prototype.hasChildren = function() {\n return this.getRelatives(HealthHistory.R_CHILDREN).length > 0\n }\n\n HealthHistory.prototype.removeAllRelatives = function(relationships) {\n const profiles = this.family_relative_health_profiles\n if (!profiles) {\n return\n }\n for (let i = profiles.length - 1; i >= 0; i--) {\n const relationship = profiles[i].relationship\n if (relationships.indexOf(relationship) != -1) {\n profiles.splice(i, 1)\n }\n }\n }\n\n HealthHistory.prototype.cleanUpBeforeSave = function() {\n // Reset unused family relative health profiles\n if (!this.has_children) {\n this.removeAllRelatives(HealthHistory.R_CHILDREN)\n }\n\n if (this.has_siblings != 'Y') {\n this.removeAllRelatives(HealthHistory.R_SIBLINGS)\n }\n\n if (this.mother_has_siblings != 'Y') {\n this.removeAllRelatives(HealthHistory.R_MATERNAL_PARSIBS)\n }\n\n if (this.father_has_siblings != 'Y') {\n this.removeAllRelatives(HealthHistory.R_PATERNAL_PARSIBS)\n }\n\n // Clean up cancer fields: if had_cancer is set, `null` answers for\n // specific cancers should be changed to `false`.\n const cleanUpCancerFields = function(profile, attrs) {\n if (profile && !angular.isUndefined(profile.had_cancer) && profile.had_cancer !== null) {\n for (let i = 0; i < attrs.length; i++) {\n if (!profile[attrs[i]]) {\n profile[attrs[i]] = false\n }\n }\n }\n }\n\n cleanUpCancerFields(this.female_health_profile, femaleCancerAttrs)\n cleanUpCancerFields(this.male_health_profile, maleCancerAttrs)\n if (this.family_relative_health_profiles) {\n this.family_relative_health_profiles.forEach(function (relative) {\n cleanUpCancerFields(relative.female_health_profile, femaleCancerAttrs)\n cleanUpCancerFields(relative.male_health_profile, maleCancerAttrs)\n })\n }\n }\n\n const superSave = HealthHistory.prototype.$save\n HealthHistory.prototype.$save = function() {\n this.cleanUpBeforeSave()\n return superSave.apply(this, arguments)\n }\n\n return HealthHistory\n })\n\n module.factory('RiskProfile', function(resource) {\n return resource(\n '/api/v1/risk_profiles/:id'\n , { format: 'json', id: '@id' }\n )\n })\n\n module.factory('AnonymizedRiskProfile', function(resource) {\n return resource(\n '/api/v1/anonymized_risk_profiles/:id'\n , { format: 'json', id: '@id' }\n )\n })\n\n}();\n","!function() {\n\n 'use strict'\n\n const module = angular.module('physicianResource', ['clrResource'])\n\n module.factory('VerifiedPhysician', function(resource) {\n return resource(\n '/api/v1/verified_physicians/:id'\n , { id: '@id', format: 'json' }\n , { update: { method: 'PUT' } }\n )\n })\n\n module.factory('PhysicianVerification', function(resource) {\n return resource(\n '/api/v1/physician_verifications/:id'\n , { format: 'json', id: '@id' }\n )\n })\n\n module.factory('Institution', function(resource) {\n return resource(\n '/api/v1/institutions/:id'\n , { format: 'json', id: '@id', ordering: 'name' }\n , { update: { method: 'PUT' } }\n )\n })\n}();\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name reportModal\n *\n * @description\n * The `reportModal` provides result modals.\n */\n const module = angular.module('reportModal', ['ngToast', 'ui.bootstrap'])\n\n function EmailFamilyModal($scope, $modalInstance, sampleLetterModal, letter, reportId, testType) {\n $scope.letter = letter\n $scope.reportId = reportId\n $scope.testType = testType\n $scope.openSampleLetterModal = function() {\n sampleLetterModal.open(letter)\n $modalInstance.dismiss()\n }\n }\n module.factory('emailFamilyModal', function($modal) {\n return {\n open: function(letter, reportId, testType) {\n return $modal.open({\n templateUrl: '/results/_modal-email_family.html',\n controller: EmailFamilyModal,\n size: 'md',\n resolve: {\n letter: function() {\n return letter\n },\n reportId: function() {\n return reportId\n },\n testType: function() {\n return testType\n }\n }\n })\n }\n }\n })\n\n function SampleLetterModal($scope, $modalInstance, letter) {\n $scope.letter = letter\n }\n module.factory('sampleLetterModal', function($modal) {\n return {\n open: function(letter) {\n return $modal.open({\n templateUrl: '/results/_modal-sample_letter.html',\n controller: SampleLetterModal,\n size: 'md',\n resolve: {\n letter: function() {\n return letter\n }\n }\n })\n }\n }\n })\n\n function AddProviderModal($scope, $modalInstance, HealthcareProvider, healthcareProvider, orderNumber, ngToast) {\n if (healthcareProvider) {\n $scope.healthcareProvider = new HealthcareProvider(healthcareProvider)\n $scope.confirming = true\n } else {\n $scope.healthcareProvider = new HealthcareProvider()\n $scope.confirming = false\n }\n $scope.healthcareProvider.order_number = orderNumber\n $scope.confirmProvider = function() {\n $scope.confirming = true\n }\n $scope.addProvider = function() {\n $scope.submitting = true\n $scope.healthcareProvider.$save()\n .then(function(res) {\n $scope.submitting = false\n ngToast.create('Your results will be sent soon.')\n $modalInstance.close(res)\n })\n .finally(function(res) {\n $scope.submitting = false\n })\n }\n }\n module.factory('addProviderModal', function($modal) {\n return {\n open: function(healthcareProvider, orderNumber) {\n return $modal.open({\n templateUrl: '/results/_modal-add_provider.html',\n controller: AddProviderModal,\n size: 'md',\n resolve: {\n healthcareProvider: function() {\n return healthcareProvider\n },\n orderNumber: function() {\n return orderNumber\n }\n }\n })\n }\n }\n })\n\n function OrderingProviderNotesModal($scope, reportContent) {\n $scope.reportContent = reportContent\n $scope.testType = reportContent.kit_order.test_type\n $scope.relevantHistory = ''\n if ($scope.reportContent.relevant_history) {\n $scope.relevantHistory = '(' + $scope.reportContent.relevant_history + ') '\n }\n }\n\n module.factory('orderingProviderNotesModal', function($modal) {\n return {\n open: function(reportContent, report) {\n return $modal.open({\n templateUrl: '/results/_modal-ordering_provider_notes.html',\n controller: OrderingProviderNotesModal,\n size: 'md',\n resolve: {\n reportContent: function() {\n return reportContent\n }\n }\n })\n }\n }\n })\n\n function ReportOrderDetailsModal($scope, $location, $modalInstance, reportContent, report) {\n $scope.reportContent = reportContent\n $scope.report = report\n\n function checkIfDistinctProvider(field, compareTo) {\n return field && (!compareTo || JSON.stringify(field) != JSON.stringify(compareTo))\n }\n\n $scope.hasPrimaryContact = checkIfDistinctProvider(reportContent.primary_contact, reportContent.ordering_physician)\n $scope.hasOrderPlacedBy = checkIfDistinctProvider(reportContent.order_placed_by, reportContent.ordering_physician) &&\n checkIfDistinctProvider(reportContent.order_placed_by, reportContent.primary_contact)\n\n }\n\n module.factory('reportOrderDetailsModal', function($modal) {\n return {\n open: function(reportContent, report) {\n return $modal.open({\n templateUrl: '/results/_modal-order_details.html',\n controller: ReportOrderDetailsModal,\n size: 'lg',\n resolve: {\n reportContent: function() {\n return reportContent\n },\n report: function() {\n return report\n }\n }\n })\n }\n }\n })\n\n function ReportRevisionsModal($scope, revisions) {\n $scope.revisions = revisions\n }\n\n module.factory('reportRevisionsModal', function($modal) {\n return {\n open: function(revisions) {\n return $modal.open({\n templateUrl: '/results/_modal-revisions.html',\n controller: ReportRevisionsModal,\n size: 'md',\n resolve: {\n revisions: function() {\n return revisions\n }\n }\n })\n }\n }\n })\n\n}();\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name resultResource\n *\n * @description\n * The `resultResource` provides resources for\n * variant results API.\n */\n const module = angular.module('resultResource', ['clrResource'])\n\n // Report state values.\n module.constant('reportNotReadyState', 'not_ready')\n module.constant('reportNewState', 'new')\n module.constant('reportContentReviewedState', 'content_reviewed')\n module.constant('reportQueuedforBoardReviewState', 'queued_for_board_review')\n module.constant('reportPreparedForBoardReviewState', 'prepared_for_board_review')\n module.constant('reportBoardReviewedState', 'board_reviewed')\n module.constant('reportSignOutApprovedState', 'sign_out_approved')\n module.constant('reportSignedOffState', 'signed_off')\n module.constant('reportReleaseGatedState', 'release_gated')\n module.constant('reportReleaseApprovedState', 'release_approved')\n module.constant('reportSentToPhysicianState', 'sent_to_ordering_physician')\n module.constant('reportReleaseReadyState', 'release_ready')\n module.constant('reportReleasedState', 'released')\n\n /**\n * @ngdoc service\n * @name Report\n * @memberof resultResource\n *\n * @description\n * A resource for `reports` REST API.\n */\n module.factory('Report', function(resource) {\n return resource(\n '/api/v1/reports/:id'\n , { id: '@id', format: 'json' }, {\n 'released': {\n url: '/api/v1/reports/:id/released'\n }\n }\n )\n })\n\n /**\n * @ngdoc service\n * @name ReportedData\n * @memberof resultResource\n *\n * @description\n * A resource for `reported_data` REST API.\n */\n module.factory('ReportedData', function(resource) {\n return resource(\n '/api/v1/reported_data/:id'\n , { id: '@id', format: 'json' }\n )\n })\n /**\n * @ngdoc service\n * @name LatestReport\n * @memberof resultResource\n *\n * @description\n * A resource for `latest_reports` REST API.\n */\n module.factory('LatestReport', function(resource) {\n return resource(\n '/api/v1/latest_reports/:testType'\n , { testType: '@testType', format: 'json' }\n )\n })\n\n /**\n * @ngdoc service\n * @name AnonymizedReport\n * @memberof resultResource\n *\n * @description\n * A resource for `anonymized_reports` REST API.\n */\n module.factory('AnonymizedReport', function(resource) {\n return resource('/api/v1/anonymized_reports/:id', { id: '@id', format: 'json' })\n })\n\n /**\n * @ngdoc service\n * @name FaxLog\n * @memberof resultResource\n *\n * @description\n * A resource for `fax_logs` REST API.\n */\n module.factory('FaxLog', function(resource) {\n return resource(\n '/api/v1/fax_logs/:id'\n , { id: '@id', format: 'json' }\n )\n })\n\n /**\n *\n * V1 reports are no longer supported. Delete this.\n */\n module.factory('Template', function(resource) {\n return resource('/api/v1/templates/:id', { id: '@id', format: 'json' })\n })\n\n /**\n * @ngdoc service\n * @name Reference\n * @memberof resultResource\n *\n * @description\n * A resource for `references` REST API.\n */\n module.factory('Reference', function(resource) {\n return resource('/api/v1/references/:id', { id: '@id', format: 'json' })\n })\n\n /**\n * @ngdoc service\n * @name ScreeningGuideline\n * @memberof resultResource\n *\n * @description\n * A resource for `screening_guidelines` REST API.\n */\n module.factory('ScreeningGuideline', function(resource) {\n return resource('/api/v1/screening_guidelines', { format: 'json' })\n })\n\n /**\n * @ngdoc service\n * @name sampleRunVariants\n * @memberof resultService\n *\n * @description\n * `sampleRunVariants` loads sample run variants with its classification\n * for a given report.\n */\n module.factory('sampleRunVariants', function($q, resourcePaginator, SampleRunVariant\n , VariantClassification, ClassificationReview, VariantConfirmation, resolvedPromise) {\n\n function SampleRunVariants(report, hideBenignUnreported) {\n this.report = report\n this.hideBenignUnreported = hideBenignUnreported\n this.items = []\n this.loading = false\n }\n\n SampleRunVariants.prototype.load = function() {\n let sampleRunVariants;\n const deferredConfirmations = VariantConfirmation.get({ sample__user: this.report.user.id })\n this.loading = true\n return resourcePaginator(\n new SampleRunVariant()\n , {\n hide_benign: this.hideBenignUnreported,\n report_id: this.report.id,\n sample_sequence_run: this.report.sample_sequence_run.id,\n page_size: 500\n }\n ).getAllPages()\n .then(angular.bind(this, function(res) {\n let variantIds = []\n sampleRunVariants = res\n angular.forEach(sampleRunVariants, function(srv) {\n variantIds.push(srv.variant_id)\n })\n variantIds = variantIds.join()\n let variantClassifications;\n let classificationReviews;\n if (variantIds) {\n variantClassifications = VariantClassification.get({\n for_report: true,\n classification_unit__variant__in: variantIds,\n test_type: this.report.kit_order.test_type,\n hide_unreported: this.hideBenignUnreported,\n page_size: 1000\n }).$promise\n classificationReviews = ClassificationReview.get({\n is_internal: 'True',\n variant_classification__classification_unit__variant__in: variantIds,\n page_size: 1000\n }).$promise\n } else {\n variantClassifications = resolvedPromise({ results: [] })\n classificationReviews = resolvedPromise({ results: [] })\n }\n return $q.all([variantClassifications, classificationReviews])\n }))\n .then(function(res) {\n const variantIdToCuClassifications = {};\n const cuToReviews = {};\n const variantClassifications = res[0].results;\n const classificationReviews = res[1].results\n angular.forEach(variantClassifications, function(vc) {\n // a map of classification_unit_id to possible unreviewed or active variant classifications\n const cur = variantIdToCuClassifications[vc.classification_unit.variant.id] || {}\n // Always show unreviewed classification. o/w active classification.\n if (vc.state != 'reviewed') {\n cur[vc.classification_unit.id] = vc\n } else if (vc.active && (!cur[vc.classification_unit.id] || cur[vc.classification_unit.id].state == 'reviewed')) {\n cur[vc.classification_unit.id] = vc\n }\n variantIdToCuClassifications[vc.classification_unit.variant.id] = cur\n })\n angular.forEach(classificationReviews, function(review) {\n // Ignore cancelled reviews.\n if (review.state == 'cancelled') {\n return\n }\n const curReview = cuToReviews[review.variant_classification.classification_unit.id]\n if (curReview) {\n if (curReview.created_at < review.created_at) {\n cuToReviews[review.variant_classification.classification_unit.id] = review\n }\n } else {\n cuToReviews[review.variant_classification.classification_unit.id] = review\n }\n })\n angular.forEach(sampleRunVariants, function(sampleRunVariant) {\n const cuToClassifications = variantIdToCuClassifications[sampleRunVariant.variant_id]\n const cus = cuToClassifications ? Object.keys(cuToClassifications) : [] // all classification_unit ids for this variant\n sampleRunVariant.variant_classifications = cus.map(function(cu) { return cuToClassifications[cu]; })\n sampleRunVariant.variant_classifications.forEach(function(cls) {\n cls.review = cuToReviews[cls.classification_unit.id]\n })\n })\n return deferredConfirmations.$promise\n })\n .then(angular.bind(this, function(res) {\n const variantIdToConfirmations = {}\n angular.forEach(res.results, function(vc) {\n if (!variantIdToConfirmations[vc.variant_id]) {\n variantIdToConfirmations[vc.variant_id] = []\n }\n variantIdToConfirmations[vc.variant_id].push(vc)\n })\n angular.forEach(sampleRunVariants, function(sampleRunVariant) {\n sampleRunVariant.variant_confirmations = variantIdToConfirmations[sampleRunVariant.variant_id]\n })\n this.items = sampleRunVariants\n return this\n }))\n .finally(angular.bind(this, function() {\n this.loading = false\n return this\n }))\n }\n\n return function(report, hideBenignUnreported) {\n return new SampleRunVariants(report, hideBenignUnreported)\n }\n })\n}();\n","!function() {\n\n 'use strict'\n\n /**\n * @ngdoc module\n * @name resultService\n *\n * @description\n * The `resultService` provides resources for\n * variant results API.\n */\n const module = angular.module('resultService', ['ngSanitize'])\n\n /**\n * @ngdoc service\n * @name reportContent\n * @memberof resultService\n */\n module.factory('reportContent', function($sce, $filter, testOutcome) {\n return function(report) {\n let content = angular.copy(report.generated_content)\n // FIXME: message: Cannot read property 'test_type' of null caused by `content.template` being null/undefined\n // Fill content with all cancer survivor properties\n content = angular.extend(content, $filter('isCancerSurvivor')(content.health_profile, content.template.test_type))\n\n // ADH and LCIS breast biopsy health history, female only\n content.had_breast_biopsy_with_atypical_hyperplasia = $filter('hadBiopsyWithAtypicalHyperplasia')(content.health_profile)\n content.diagnosed_with_lobular_carcinoma_in_situ = $filter('diagnosedWithLcis')(content.health_profile)\n\n content.is_somatic = $filter('isSomaticReport')(content)\n\n content.mutations = $filter('sortMutations')(content.mutations)\n\n content.risks = $filter('risksShaper')(content.risks, content.template.test_type, content.mutations)\n\n content.genes_with_pathogenic_mutations = $filter('genesWithPathogenicMutations')(content.mutations)\n\n content.is_positive = content.test_outcome == testOutcome.positive\n content.is_negative = content.test_outcome == testOutcome.negative\n content.is_non_reportable = content.test_outcome == testOutcome.non_reportable\n\n content.is_updated = report.revisions && report.revisions.length\n content.is_hh_provided = report.is_hh_provided\n content.is_hh_under_review = report.is_hh_under_review\n\n // For PDF signature\n if (content.reviewer) {\n content.reviewer.signature.svg = $sce.trustAsHtml(content.reviewer.signature.svg)\n }\n\n return content\n }\n })\n\n module.factory('reportGenericScreeningGuidelines', require('./services/report_generic_screening_guidelines'))\n module.factory('reportShareFamilyData', require('./services/report_share_family_data'))\n}();\n","'use strict'\n\nmodule.exports = function() {\n 'ngInject'\n\n return function(render_version) {\n // render_version changes to content\n // <= 2: Original set\n // >= 3: Updated breast, colorectal, and prostate content and references\n const guidelines = [\n {\n phenotype: 'breast cancer',\n content: '* **Starting at age 25:** Breast awareness - Women should be familiar with their breasts and promptly report changes to their healthcare provider.\\n\\n* **Between ages 25-39:** Breast exam by your provider every 1-3 years.\\n\\n* **Starting at age 40:** Breast exam by your provider and mammogram every year.',\n references: [128],\n gender: 'F'\n },\n {\n phenotype: 'male breast cancer',\n content: '* There are no specific breast cancer screening guidelines recommended for men without genetic mutations associated with increased risk of male breast cancer. Please speak with your healthcare provider about other cancer screenings that are recommended for men your age based on your personal and family health history.',\n references: [],\n gender: 'M'\n },\n {\n phenotype: 'colorectal cancer',\n content: '* **Starting at age 50:** Colonoscopy every 10 years, or stool-based testing every year, or flexible sigmoidoscopy every 5 years which may include stool-based testing at year three.\\n\\n* These recommendations may change if you have polyps, colon cancer, inflammatory bowel disease (IBD), or family history of colorectal cancer.',\n references: [165]\n },\n {\n phenotype: 'melanoma',\n content: '* To reduce the chance of developing melanoma, the American Cancer Society recommends limiting exposure to UV light by avoiding excess sun exposure, wearing a hat, sunglasses and long protective clothing, applying sunscreen with SPF of 30 or higher and avoiding tanning beds and sun lamps.\\n\\n* Any new, unusual, or changing moles should be reported to your provider or dermatologist.',\n references: [63]\n },\n {\n phenotype: 'ovarian cancer',\n content: '* Currently, there are no standard screening guidelines for ovarian cancer. Please discuss any family history of ovarian cancer with your healthcare provider.',\n references: [54],\n gender: 'F'\n },\n {\n phenotype: 'pancreatic cancer',\n content: '* Currently, there are no standard screening guidelines for pancreatic cancer. Please discuss any family history of pancreatic cancer with your healthcare provider.',\n references: []\n },\n {\n phenotype: 'stomach cancer',\n content: '* Currently, there are no standard screening guidelines for stomach cancer. Please discuss any family history of stomach cancer with your healthcare provider.',\n references: []\n },\n {\n phenotype: 'uterine cancer',\n content: '* **At the time of menopause:** All women should be told about the risks and symptoms of endometrial cancer. Women should report any unexpected vaginal bleeding or spotting to their doctors.\\n\\n* Some women, because of their history, may need to consider having a yearly uterine biopsy. Speak with a healthcare provider about your history.',\n references: [41],\n gender: 'F'\n },\n {\n phenotype: 'prostate cancer',\n content: '* **Starting at age 45:** Begin discussion with your provider about the risks and benefits of screening for prostate cancer every 2-4 years, including a blood test called PSA and a digital rectal exam (DRE).\\n\\n* **After age 75, with caution and only in very healthy men with little or no additional health issues:** PSA and DRE every 1-2 years.',\n references: [181],\n gender: 'M'\n },\n {\n phenotype: 'general recommendations for all individuals',\n content: '* Avoid all forms of tobacco.\\n\\n* Get to and stay at a healthy weight.\\n\\n* Get moving with regular physical activity.\\n\\n* Eat healthy with plenty of fruits and vegetables.\\n\\n* Limit how much alcohol you drink (if you drink at all).\\n\\n* Protect your skin.\\n\\n* Know yourself, your family history, and your risks.\\n\\n* Get regular check-ups and cancer screening tests. A cancer-related check-up should include health counseling and, depending on a person’s age and gender, exams for cancers of the thyroid, oral cavity, skin, lymph nodes, testes, and ovaries, as well as for some other diseases besides cancer.',\n references: [41]\n }\n ]\n if (render_version >= 3) {\n // Breast: Content additions, 1.2016 NCCN citation\n guidelines[0].content = '* **Starting at age 25:** Breast awareness - Women should be familiar with their breasts and promptly report changes to their healthcare provider.\\n\\n* **Between ages 25-39:** Breast exam, risk assessment, and risk reduction counseling by your provider every 1-3 years.\\n\\n* **Starting at age 40:** Breast exam by your provider and mammogram every year. Your provider may discuss screening with tomosynthesis.'\n guidelines[0].references = [228]\n // Colorectal: Content additions, 2.2016 NCCN citation\n guidelines[2].content = '* **Between ages 50-75:**\\n\\n * Colonoscopy every 10 years, or\\n\\n * Stool-based testing (high-sensitivity, guaiac-based, or immunochemical-based) every year, or\\n\\n * Stool-based DNA testing every 3 years, or\\n\\n * Flexible sigmoidoscopy every 5 years which may include guaiac- or immunochemical-based testing at year three, or\\n\\n * CT colonography every 5 years.\\n\\n* These recommendations may change if you have polyps, colon cancer, inflammatory bowel disease (IBD), or family history of colorectal cancer.'\n guidelines[2].references = [229]\n // Prostate: every 1-2 years -> every 1-4 years, 2.2016 NCCN citation\n guidelines[8].content = '* **Starting at age 45:** Begin discussion with your provider about the risks and benefits of screening for prostate cancer every 2-4 years, including a blood test called PSA and a digital rectal exam (DRE).\\n\\n* **After age 75, with caution and only in very healthy men with little or no additional health issues:** PSA and DRE every 1-4 years.'\n guidelines[8].references = [208]\n }\n return guidelines\n }\n}\n","'use strict'\n\n// to be used with /results/directives/report_share_family.html\nmodule.exports = function($filter, $translate, testTypes) {\n 'ngInject'\n\n return function(reportContent, output) {\n output.testTypes = testTypes\n // VUSes don't factor into any of the logic in this component\n const pathogenicMutations = $filter('pathogenicMutations')(reportContent.mutations)\n output.pathogenicMutations = pathogenicMutations\n\n // Logic to figure out which content list to show\n if (reportContent.is_positive) {\n output.recommendChildrenTested = pathogenicMutations.some(function(mutation) {\n if (['SMAD4', 'STK11', 'TP53', 'PTEN', 'APC', 'BMPR1A'].indexOf(mutation.gene) > -1) {\n const mutationNames = $filter('genesWithMutationName')([mutation])\n const mutationName = mutationNames.length ? mutationNames[0].mutationName : ''\n if (reportContent.render_version < 9 || mutation.gene != 'APC' || mutationName != 'I1307K') {\n return true\n }\n }\n return false\n })\n\n if (reportContent.is_somatic) {\n output.showSomatic = true\n } else if (reportContent.genes_with_pathogenic_mutations.length == 1) {\n if ($filter('isBiallelic')(reportContent)) {\n output.showBiallelic = true\n } else if ($filter('isPotentiallyCompoundHeterozygousReport')(reportContent)) {\n output.showCompoundHeterozygous = true\n output.recommendChildrenTested = reportContent.allelicity_by_gene['BRCA2'] === null\n } else if ($filter('isInCis')(reportContent)) {\n output.showInCis = true\n } else {\n output.showSinglePositive = true\n }\n } else if (reportContent.genes_with_pathogenic_mutations.length == 2) {\n const homMutations = pathogenicMutations.filter(function(m) {\n return $filter('isHomozygous')(m)\n })\n const hetMutations = pathogenicMutations.filter(function(m) {\n return !$filter('isHomozygous')(m)\n })\n if (hetMutations.length && homMutations.length) {\n output.showHomozygousHeterozygous = true\n output.hetGene = hetMutations[0].gene\n output.homGene = homMutations[0].gene\n } else {\n output.showMultiplePositives = true\n }\n } else {\n output.showMultiplePositives = true\n }\n } else {\n if (reportContent.gender == 'F') {\n output.showNegativeFemale = true\n } else {\n output.showNegativeMale = true\n }\n }\n\n // TODO: Use $translate, temp workaround to avoid having to deal with $translate promises\n const MALE_LETTER_TRUE = \"Men with this mutation are at an increased risk of developing \"\n const MALE_LETTER_FALSE = \"Men with this mutation are not known to be at an increased risk for developing cancer\"\n\n function createGeneReport(report, mutation) {\n const geneReport = {}\n const mutationNames = $filter('genesWithMutationName')([mutation])\n geneReport.gene = mutation.gene\n geneReport.mutationName = mutationNames.length ? mutationNames[0].mutationName : ''\n geneReport.mutation = mutation\n geneReport.isLikelyPathogenic = $filter('isLikelyPathogenic')(mutation)\n geneReport.pathogenicNomenclature = $filter('nomenclature')(mutation, 'primary').replace(//g, '>')\n // Include both monoallelic and biallelic risks if not monoallelic.\n if (report.allelicity_by_gene[geneReport.gene] == 'monoallelic') {\n geneReport.femaleRisks = $filter('sortedRisks')(report, 'F', true, null, mutation.gene, '1')\n geneReport.maleRisks = $filter('sortedRisks')(report, 'M', true, null, mutation.gene, '1')\n } else {\n geneReport.femaleRisks = $filter('sortedRisks')(report, 'F', true, null, mutation.gene)\n geneReport.maleRisks = $filter('sortedRisks')(report, 'M', true, null, mutation.gene)\n }\n\n // Set female cancers string\n if (mutation.gene == 'TP53') {\n geneReport.femaleCancersString = 'breast, ovarian, brain, sarcoma and other cancers'\n } else if (mutation.gene == 'MSH6') {\n geneReport.femaleCancersString = 'ovarian, colorectal, uterine and other cancers'\n } else if (mutation.gene == 'BRIP1') {\n geneReport.femaleCancersString = 'breast and ovarian cancer'\n } else {\n geneReport.femaleCancersString = $filter('cancerString')(geneReport.femaleRisks.pathogenic, '1')\n }\n\n // Set male cancers string\n if (geneReport.maleRisks.pathogenic.length) {\n geneReport.maleCancersString = ''\n if (!$filter('isPotentiallyCompoundHeterozygousReport')(reportContent)) {\n if (reportContent.genes_with_pathogenic_mutations.length == 1) {\n geneReport.maleCancersString = MALE_LETTER_TRUE\n } else {\n geneReport.maleCancersString = 'Men with ' + geneReport.gene + ' mutations are at an increased risk of developing '\n }\n }\n if (mutation.gene == 'TP53') {\n geneReport.maleCancersString += 'brain, sarcoma and other cancers'\n } else if (mutation.gene == 'MSH6') {\n geneReport.maleCancersString += 'colorectal and other cancers'\n } else {\n geneReport.maleCancersString += $filter('cancerString')(geneReport.maleRisks.pathogenic, '1')\n }\n } else {\n if (reportContent.genes_with_pathogenic_mutations.length == 1) {\n geneReport.maleCancersString = MALE_LETTER_FALSE\n } else {\n geneReport.maleCancersString = 'Men with ' + geneReport.gene + ' mutations are not known to be at an increased risk for developing cancer'\n }\n }\n return geneReport\n } // End of createGeneReport\n\n const geneReports = []\n if (reportContent.is_positive) {\n angular.forEach(pathogenicMutations, function(mutation) {\n geneReports.push(createGeneReport(reportContent, mutation))\n })\n }\n // TODO: Refactor how this letter is generated so it's less cumbersome and more programmatic\n // https://getcolor.atlassian.net/browse/ENG-25\n const sampleLetterTestType = reportContent.template.test_type == testTypes.breastOvarian19 ? '19 genes linked to breast and ovarian cancers' : '30 genes linked to the most common hereditary cancers'\n if (reportContent.is_negative && reportContent.gender == 'F') {\n // No wisdom9 because this directive isn't used there\n if (reportContent.template.test_type == testTypes.breastOvarian19) {\n $translate('RESULT.SHARE_FAMILY.SAMPLE_LETTER.F_BO19_MD').then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n } else if (reportContent.template.test_type == testTypes.hereditary30) {\n $translate('RESULT.SHARE_FAMILY.SAMPLE_LETTER.NEG_H30_MD').then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n }\n } else if (reportContent.is_negative && reportContent.gender == 'M') {\n if (reportContent.template.test_type == testTypes.breastOvarian19) {\n $translate('RESULT.SHARE_FAMILY.SAMPLE_LETTER.M_BO19_MD').then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n } else if (reportContent.template.test_type == testTypes.hereditary30) {\n $translate('RESULT.SHARE_FAMILY.SAMPLE_LETTER.NEG_H30_MD').then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n }\n } else if ($filter('isSingleHomozygousReport')(pathogenicMutations)) {\n // Single Homozygous letter, no condition letter: https://docs.google.com/document/d/1tJ-WbyEgc3HRXssPbCtZWfgRpvGBn3q6DwxN0egQnZk/edit\n // TODO: \"with a condition\" letter not implemented\n let singleMutationName = 'a'\n const phenotypeBiallelicCancerString = $filter('cancerString')(geneReports[0].femaleRisks.pathogenic, '2')\n let phenotypeBiallelicRisks\n if (phenotypeBiallelicCancerString) {\n // specific biallelic risks exist\n phenotypeBiallelicRisks = 'an increased risk to develop ' + phenotypeBiallelicCancerString\n } else if (geneReports[0].gene == 'CHEK2') {\n // no specific biallelic risks for CHEK2 exist yet\n phenotypeBiallelicRisks = 'a significantly increased risk to develop breast cancer and possibly other cancers'\n } else if (geneReports[0].gene == 'APC' && geneReports[0].mutationName == 'I1307K') {\n // no specific biallelic risks for APC I1307K exist yet\n // APC I1307K Homozygous\n phenotypeBiallelicRisks = 'an increased risk to develop colorectal cancer'\n singleMutationName = 'an ' + geneReports[0].mutationName\n geneReports[0].isSlightly = 'a slightly '\n } else if (geneReports[0].gene == 'MITF' || geneReports[0].gene == 'MSH6') {\n // no specific biallelic risks for MITF exist yet\n phenotypeBiallelicRisks = 'an increased risk to develop kidney cancer and melanoma'\n } else {\n throw new Error(geneReports[0].gene + \" does not have specific biallelic risks and there're not overwrites provided.\")\n }\n\n $translate('RESULT.SHARE_FAMILY.SAMPLE_LETTER.HOMOZYGOUS_MD',\n {\n gene: geneReports[0].gene,\n testType: sampleLetterTestType,\n isSlightly: geneReports[0].isSlightly ? geneReports[0].isSlightly : '',\n singleMutationName: singleMutationName,\n phenotypeBiallelicRisks: phenotypeBiallelicRisks,\n pathogenicNomenclature: geneReports[0].pathogenicNomenclature,\n classification: geneReports[0].isLikelyPathogenic ? 'likely pathogenic ' : '',\n femaleCancersString: geneReports[0].femaleCancersString,\n // Homozygous childhood sentence logic that does not apply to the only homozygous report we have currently: CHEK2, leaving here for later implementation when a homozygous gene does appear\n // https://docs.google.com/document/d/1tJ-WbyEgc3HRXssPbCtZWfgRpvGBn3q6DwxN0egQnZk/edit\n addChildhoodTestingSentence: ''\n }).then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n } else if ($filter('isPotentiallyCompoundHeterozygousReport')(reportContent) && reportContent.genes_with_pathogenic_mutations.length == 1) {\n // Compound heterozygous logic, no condition letter: https://docs.google.com/document/d/1VYcdQKwYCoszgll86qK1kHwF_eMfCPSXwCtjdmLwNc8/edit\n // TODO: \"with a condition\" letter not implemented\n\n if (geneReports[0].gene == 'BRCA2') {\n $translate('RESULT.SHARE_FAMILY.SAMPLE_LETTER.UNKNOWN_PHASE_CONDITION_MD',\n {\n gene: geneReports[0].gene,\n pathogenicNomenclature1: geneReports[0].pathogenicNomenclature,\n pathogenicNomenclature2: geneReports[1].pathogenicNomenclature,\n classification1: geneReports[0].isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic',\n classification2: geneReports[1].isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic',\n geneCondition: 'Fanconi anemia',\n conditionPhenotypeRisks: 'bone marrow failure, physical disabilities, and childhood cancers',\n monoallelicPhenotypeRisksF: geneReports[0].femaleCancersString,\n monoallelicPhenotypeRisksM: geneReports[0].maleCancersString\n }).then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n } else if (geneReports[0].gene == 'CHEK2') {\n const noConditionPhenotypeRisks = 'a significantly increased risk to develop breast cancer and possibly other cancers'\n let translationKey = 'RESULT.SHARE_FAMILY.SAMPLE_LETTER.UNKNOWN_PHASE_NO_CONDITION_MD'\n if (reportContent.allelicity_by_gene['CHEK2'] == 'biallelic') {\n translationKey = 'RESULT.SHARE_FAMILY.SAMPLE_LETTER.COMPOUND_HETEROZYGOUS_NO_CONDITION_MD'\n }\n $translate(translationKey,\n {\n testType: sampleLetterTestType,\n gene: geneReports[0].gene,\n noConditionPhenotypeRisks: noConditionPhenotypeRisks,\n pathogenicNomenclature1: geneReports[0].pathogenicNomenclature,\n pathogenicNomenclature2: geneReports[1].pathogenicNomenclature,\n classification: geneReports[0].isLikelyPathogenic ? 'likely pathogenic ' : '',\n femaleCancersString: geneReports[0].femaleCancersString,\n maleCancersString: geneReports[0].maleCancersString,\n // Compound heterozygous childhood sentence logic that does not apply to the only compound het report we have currently: CHEK2, leaving here for later implementation when it does apply\n // https://docs.google.com/document/d/1VYcdQKwYCoszgll86qK1kHwF_eMfCPSXwCtjdmLwNc8/edit\n addChildhoodTestingSentence: ''\n }).then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n } else if (geneReports[0].gene == 'MUTYH') {\n $translate('RESULT.SHARE_FAMILY.SAMPLE_LETTER.UNKNOWN_PHASE_CONDITION_MD',\n {\n gene: geneReports[0].gene,\n pathogenicNomenclature1: geneReports[0].pathogenicNomenclature,\n pathogenicNomenclature2: geneReports[1].pathogenicNomenclature,\n classification1: geneReports[0].isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic',\n classification2: geneReports[1].isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic',\n femaleCancersString: geneReports[0].femaleCancersString,\n maleCancersString: $filter('cancerString')(geneReports[0].maleRisks.pathogenic),\n geneCondition: 'MUTYH-Associated Polyposis (MAP)',\n conditionPhenotypeRisks: 'a significantly increased risk of colorectal and other cancers',\n monoallelicPhenotypeRisksF: 'colorectal cancer',\n monoallelicPhenotypeRisksM: 'colorectal cancer'\n }).then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n } else {\n throw new Error(\"Only BRCA2, CHEK2 and MUTYH are implemented for potentially compount het reports.\")\n }\n } else if (reportContent.is_positive && geneReports.length == 1) {\n\n // Add childhood sentences for genes where children are impacted: https://docs.google.com/document/d/1e7ByoV4HprrMyFd1WV8jkJoWQIgnXtAXrW_W575KGPU/edit\n let addChildhoodTestingSentence = ''\n // MUTYH homozygous needs to be included\n const childhoodTestingGenes = ['APC', 'STK11', 'TP53', 'SMAD4', 'PTEN', 'BMPR1A']\n if ($filter('containsAny')([geneReports[0].gene], childhoodTestingGenes) && geneReports[0].mutationName != 'I1307K') {\n addChildhoodTestingSentence = ' Testing children for this mutation is recommended, as it impacts health and medical management in childhood. '\n }\n\n $translate(['RESULT.SHARE_FAMILY.SAMPLE_LETTER.1_POS_BO19_MD', 'RESULT.SHARE_FAMILY.SAMPLE_LETTER.1_POS_H30_MD'],\n {\n gene: geneReports[0].gene,\n pathogenicNomenclature: geneReports[0].pathogenicNomenclature,\n classification: geneReports[0].isLikelyPathogenic ? 'likely pathogenic ' : '',\n addChildhoodTestingSentence: addChildhoodTestingSentence,\n femaleCancersString: geneReports[0].femaleCancersString,\n maleCancersString: geneReports[0].maleCancersString\n }).then(function(translations) {\n if (reportContent.template.test_type == testTypes.breastOvarian19) {\n output.msgMarkdownSampleLetter = translations['RESULT.SHARE_FAMILY.SAMPLE_LETTER.1_POS_BO19_MD']\n } else if (reportContent.template.test_type == testTypes.hereditary30) {\n output.msgMarkdownSampleLetter = translations['RESULT.SHARE_FAMILY.SAMPLE_LETTER.1_POS_H30_MD']\n }\n })\n } else if (reportContent.is_positive && geneReports.length == 2 && !$filter('isPotentiallyCompoundHeterozygousReport')(reportContent)) {\n if (output.showHomozygousHeterozygous) {\n const hetGeneReport = geneReports[0].gene == output.hetGene ? geneReports[0] : geneReports[1]\n const homGeneReport = geneReports[0].gene == output.homGene ? geneReports[0] : geneReports[1]\n $translate([\n 'RESULT.SHARE_FAMILY.SAMPLE_LETTER.2_POS_HET_HOM_MD'\n ],\n {\n testType: sampleLetterTestType,\n hetGene: output.hetGene,\n homGene: output.homGene,\n hetClassification: hetGeneReport.isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic ',\n homClassification: homGeneReport.isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic ',\n hetNomenclature: hetGeneReport.pathogenicNomenclature,\n homNomenclature: homGeneReport.pathogenicNomenclature,\n hetFemaleCancersString: hetGeneReport.femaleCancersString,\n homFemaleCancersString: homGeneReport.femaleCancersString,\n hetMaleCancersString: hetGeneReport.maleCancersString\n }).then(function(translations) {\n output.msgMarkdownSampleLetter = translations['RESULT.SHARE_FAMILY.SAMPLE_LETTER.2_POS_HET_HOM_MD']\n })\n } else if (geneReports[0].gene == geneReports[1].gene) { // in cis\n $translate([\n 'RESULT.SHARE_FAMILY.SAMPLE_LETTER.IN_CIS_NO_CONDITION_MD',\n 'RESULT.SHARE_FAMILY.SAMPLE_LETTER.IN_CIS_NO_CONDITION_MIXED_MD',\n ],\n {\n testType: sampleLetterTestType,\n gene: geneReports[0].gene,\n classification: geneReports[0].isLikelyPathogenic && geneReports[1].isLikelyPathogenic ? 'likely pathogenic ' : '',\n classification1: geneReports[0].isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic ',\n classification2: geneReports[1].isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic ',\n pathogenicNomenclature1: geneReports[0].pathogenicNomenclature,\n pathogenicNomenclature2: geneReports[1].pathogenicNomenclature,\n femaleCancersString: geneReports[0].femaleCancersString,\n maleCancersString: geneReports[0].maleCancersString,\n }).then(function(translations) {\n if (geneReports[0].isLikelyPathogenic != geneReports[1].isLikelyPathogenic) {\n output.msgMarkdownSampleLetter = translations['RESULT.SHARE_FAMILY.SAMPLE_LETTER.IN_CIS_NO_CONDITION_MIXED_MD']\n } else {\n output.msgMarkdownSampleLetter = translations['RESULT.SHARE_FAMILY.SAMPLE_LETTER.IN_CIS_NO_CONDITION_MD']\n }\n })\n } else {\n $translate([\n 'RESULT.SHARE_FAMILY.SAMPLE_LETTER.2_POS_MD',\n 'RESULT.SHARE_FAMILY.SAMPLE_LETTER.2_POS_MIXED_MD'\n ],\n {\n testType: sampleLetterTestType,\n gene1: geneReports[0].gene,\n gene2: geneReports[1].gene,\n classification: geneReports[0].isLikelyPathogenic && geneReports[1].isLikelyPathogenic ? 'likely pathogenic ' : '',\n classification1: geneReports[0].isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic ',\n classification2: geneReports[1].isLikelyPathogenic ? 'likely pathogenic ' : 'pathogenic ',\n pathogenicNomenclature1: geneReports[0].pathogenicNomenclature,\n pathogenicNomenclature2: geneReports[1].pathogenicNomenclature,\n femaleCancers1String: geneReports[0].femaleCancersString,\n femaleCancers2String: geneReports[1].femaleCancersString,\n maleCancers1String: geneReports[0].maleCancersString,\n maleCancers2String: geneReports[1].maleCancersString\n }).then(function(translations) {\n if ($filter('hasLikelyPathogenic')(pathogenicMutations)) {\n output.msgMarkdownSampleLetter = translations['RESULT.SHARE_FAMILY.SAMPLE_LETTER.2_POS_MIXED_MD']\n } else {\n output.msgMarkdownSampleLetter = translations['RESULT.SHARE_FAMILY.SAMPLE_LETTER.2_POS_MD']\n }\n })\n }\n } else if (reportContent.is_positive && (geneReports.length == 3 || (geneReports.length == 2 && $filter('isPotentiallyCompoundHeterozygousReport')(reportContent)))) {\n // Doesn't handle mixed P/LP right now\n\n // Construct the cancer risk string starting with female first.\n // TODO Refactor: https://getcolor.atlassian.net/browse/ENG-25\n let bothGenderCancersString = \"\"\n angular.forEach(geneReports, function(geneReport) {\n if ($filter('allRisksNotElevated')(geneReport.femaleRisks.pathogenic)) {\n bothGenderCancersString += \"Women with \" + geneReport.gene + \" mutations are not known to be at an increased risk for developing cancer. \"\n } else {\n bothGenderCancersString += \"Women with \" + geneReport.gene + \" mutations are at an increased risk of developing \" + geneReport.femaleCancersString + \". \"\n }\n })\n angular.forEach(geneReports, function(geneReport) {\n bothGenderCancersString += geneReport.maleCancersString + \". \"\n })\n $translate('RESULT.SHARE_FAMILY.SAMPLE_LETTER.3_POS_MD',\n {\n testType: sampleLetterTestType,\n gene1: geneReports[0].gene,\n gene2: geneReports[1].gene,\n gene3: geneReports[2].gene,\n pathogenicNomenclature1: geneReports[0].pathogenicNomenclature,\n pathogenicNomenclature2: geneReports[1].pathogenicNomenclature,\n pathogenicNomenclature3: geneReports[2].pathogenicNomenclature,\n bothGenderCancersString: bothGenderCancersString\n }).then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n } else if (reportContent.is_positive && geneReports.length == 4) {\n let bothGenderCancersString = \"\"\n angular.forEach(geneReports, function(geneReport) {\n if ($filter('allRisksNotElevated')(geneReport.femaleRisks.pathogenic)) {\n bothGenderCancersString += \"Women with \" + geneReport.gene + \" mutations are not known to be at an increased risk for developing cancer. \"\n } else {\n bothGenderCancersString += \"Women with \" + geneReport.gene + \" mutations are at an increased risk of developing \" + geneReport.femaleCancersString + \". \"\n }\n })\n angular.forEach(geneReports, function(geneReport) {\n bothGenderCancersString += geneReport.maleCancersString + \". \"\n })\n $translate('RESULT.SHARE_FAMILY.SAMPLE_LETTER.4_POS_MD',\n {\n testType: sampleLetterTestType,\n gene1: geneReports[0].gene,\n gene2: geneReports[1].gene,\n gene3: geneReports[2].gene,\n gene4: geneReports[3].gene,\n pathogenicNomenclature1: geneReports[0].pathogenicNomenclature,\n pathogenicNomenclature2: geneReports[1].pathogenicNomenclature,\n pathogenicNomenclature3: geneReports[2].pathogenicNomenclature,\n pathogenicNomenclature4: geneReports[3].pathogenicNomenclature,\n bothGenderCancersString: bothGenderCancersString\n }).then(function(translation) {\n output.msgMarkdownSampleLetter = translation\n })\n }\n }\n}\n"],"sourceRoot":""}