@sheerid/jslib-nightly 3.0.0-preview.1685 → 3.0.0-preview.1687
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_mysheerid-preview.css +4 -4
- package/_mysheerid-preview.js +37 -37
- package/_mysheerid-preview.js.map +1 -1
- package/chunk/AddressComponent-CbrPCKfd.js +4 -4
- package/chunk/AddressComponent-DzZK_Rz6.js +4 -4
- package/chunk/AddressFieldRow-C4Zu2e04.js +4 -4
- package/chunk/AddressFieldRow-sCxjKtsT.js +4 -4
- package/chunk/{ApiUrls-JOCQD5qu.js → ApiUrls-DdWZmvWC.js} +5 -5
- package/chunk/{ApiUrls-JOCQD5qu.js.map → ApiUrls-DdWZmvWC.js.map} +1 -1
- package/chunk/{ApiUrls-BcFXL9Uc.js → ApiUrls-mF1wUCwh.js} +5 -5
- package/chunk/{ApiUrls-BcFXL9Uc.js.map → ApiUrls-mF1wUCwh.js.map} +1 -1
- package/chunk/{BirthDateComponent-l89_NYLs.js → BirthDateComponent-CTHryG1X.js} +5 -5
- package/chunk/{BirthDateComponent-DaikYdNn.js.map → BirthDateComponent-CTHryG1X.js.map} +1 -1
- package/chunk/{BirthDateComponent-DaikYdNn.js → BirthDateComponent-DrxBkMgy.js} +5 -5
- package/chunk/{BirthDateComponent-l89_NYLs.js.map → BirthDateComponent-DrxBkMgy.js.map} +1 -1
- package/chunk/{CaptchaComponent-BWtsOn3F.js → CaptchaComponent-CPmgNolg.js} +5 -5
- package/chunk/{CaptchaComponent-BWtsOn3F.js.map → CaptchaComponent-CPmgNolg.js.map} +1 -1
- package/chunk/{CaptchaComponent-siqepVpm.js → CaptchaComponent-DMZM88XX.js} +5 -5
- package/chunk/{CaptchaComponent-siqepVpm.js.map → CaptchaComponent-DMZM88XX.js.map} +1 -1
- package/chunk/{ChangeLocaleComponent-C24FTXx5.js → ChangeLocaleComponent-BKrMmPLF.js} +5 -5
- package/chunk/{ChangeLocaleComponent-C24FTXx5.js.map → ChangeLocaleComponent-BKrMmPLF.js.map} +1 -1
- package/chunk/{ChangeLocaleComponent-p9C8JevD.js → ChangeLocaleComponent-CiotUHdU.js} +5 -5
- package/chunk/{ChangeLocaleComponent-p9C8JevD.js.map → ChangeLocaleComponent-CiotUHdU.js.map} +1 -1
- package/chunk/City-BRBq9K9K.js +4 -4
- package/chunk/City-DGcAYRJp.js +4 -4
- package/chunk/{CollegeNameComponent-DZK2SUt0.js → CollegeNameComponent-ByUUJzqs.js} +6 -6
- package/chunk/{CollegeNameComponent-C8yiZSki.js.map → CollegeNameComponent-ByUUJzqs.js.map} +1 -1
- package/chunk/{CollegeNameComponent-C8yiZSki.js → CollegeNameComponent-C1Xr56P0.js} +6 -6
- package/chunk/{CollegeNameComponent-DZK2SUt0.js.map → CollegeNameComponent-C1Xr56P0.js.map} +1 -1
- package/chunk/{CountryComponentWrapper-Bpo4sVB_.js → CountryComponentWrapper-Dpb5JssG.js} +5 -5
- package/chunk/{CountryComponentWrapper-Bpo4sVB_.js.map → CountryComponentWrapper-Dpb5JssG.js.map} +1 -1
- package/chunk/{CountryComponentWrapper-CpmNFtmD.js → CountryComponentWrapper-klUrb2-x.js} +5 -5
- package/chunk/{CountryComponentWrapper-CpmNFtmD.js.map → CountryComponentWrapper-klUrb2-x.js.map} +1 -1
- package/chunk/{DischargeDateComponent-D7jmEk_k.js → DischargeDateComponent-Ckp16mVP.js} +7 -7
- package/chunk/{DischargeDateComponent-D7jmEk_k.js.map → DischargeDateComponent-Ckp16mVP.js.map} +1 -1
- package/chunk/{DischargeDateComponent-X95XFfZI.js → DischargeDateComponent-u9AEVBYi.js} +7 -7
- package/chunk/{DischargeDateComponent-X95XFfZI.js.map → DischargeDateComponent-u9AEVBYi.js.map} +1 -1
- package/chunk/DriverLicenseNumberComponent-B62pE7M4.js +4 -4
- package/chunk/DriverLicenseNumberComponent-C9lJDS6O.js +4 -4
- package/chunk/{EmailLoopPending-Dy3Y8Qgm.js → EmailLoopPending-1N2zCnbm.js} +5 -5
- package/chunk/{EmailLoopPending-Dy3Y8Qgm.js.map → EmailLoopPending-1N2zCnbm.js.map} +1 -1
- package/chunk/{EmailLoopPending-D90GATME.js → EmailLoopPending-B9j3njKM.js} +5 -5
- package/chunk/{EmailLoopPending-D90GATME.js.map → EmailLoopPending-B9j3njKM.js.map} +1 -1
- package/chunk/ExtraMessage-BkAdlJoa.js +4 -4
- package/chunk/ExtraMessage-DRgnOojA.js +4 -4
- package/chunk/{FirstResponderOrganizationComponent-8Ax3AVfK.js → FirstResponderOrganizationComponent-ChLrTfUN.js} +6 -6
- package/chunk/{FirstResponderOrganizationComponent-8Ax3AVfK.js.map → FirstResponderOrganizationComponent-ChLrTfUN.js.map} +1 -1
- package/chunk/{FirstResponderOrganizationComponent-qfAIdTXQ.js → FirstResponderOrganizationComponent-Cy3bw6bD.js} +6 -6
- package/chunk/{FirstResponderOrganizationComponent-qfAIdTXQ.js.map → FirstResponderOrganizationComponent-Cy3bw6bD.js.map} +1 -1
- package/chunk/FormFieldInputSelect-B22wVmPh.js +4 -4
- package/chunk/FormFieldInputSelect-Dbo19ygL.js +4 -4
- package/chunk/FormFieldText-CYasqvPy.js +4 -4
- package/chunk/FormFieldText-PcZJUKyn.js +4 -4
- package/chunk/{FormFieldTypeahead-DRGqg__j.js → FormFieldTypeahead-UxXzNaPQ.js} +6 -6
- package/chunk/{FormFieldTypeahead-DRGqg__j.js.map → FormFieldTypeahead-UxXzNaPQ.js.map} +1 -1
- package/chunk/{FormFieldTypeahead-Bt-7j3F3.js → FormFieldTypeahead-aiTJHucT.js} +6 -6
- package/chunk/{FormFieldTypeahead-Bt-7j3F3.js.map → FormFieldTypeahead-aiTJHucT.js.map} +1 -1
- package/chunk/FormSelectChoice-Da11OJMy.js +4 -4
- package/chunk/InputSelectComponent-SM8O2pkK.js +4 -4
- package/chunk/InputSelectComponent-rHA6nOYz.js +4 -4
- package/chunk/{LicensedProfessionalOrganizationComponent-BqT8sZB6.js → LicensedProfessionalOrganizationComponent-CaSeJ_el.js} +6 -6
- package/chunk/{LicensedProfessionalOrganizationComponent-BqT8sZB6.js.map → LicensedProfessionalOrganizationComponent-CaSeJ_el.js.map} +1 -1
- package/chunk/{LicensedProfessionalOrganizationComponent-ZPz6LRce.js → LicensedProfessionalOrganizationComponent-DkE8sKJE.js} +6 -6
- package/chunk/{LicensedProfessionalOrganizationComponent-ZPz6LRce.js.map → LicensedProfessionalOrganizationComponent-DkE8sKJE.js.map} +1 -1
- package/chunk/LoadingSpinnerComponent-C3Wx__mt.js +4 -4
- package/chunk/LoadingSpinnerComponent-CMdfn56v.js +4 -4
- package/chunk/{LowIncomeOrganizationComponent-vgDtpuaj.js → LowIncomeOrganizationComponent-CK-YGzQu.js} +7 -7
- package/chunk/{LowIncomeOrganizationComponent-vgDtpuaj.js.map → LowIncomeOrganizationComponent-CK-YGzQu.js.map} +1 -1
- package/chunk/{LowIncomeOrganizationComponent-Bm3Ba9dy.js → LowIncomeOrganizationComponent-DjdCMtDa.js} +7 -7
- package/chunk/{LowIncomeOrganizationComponent-Bm3Ba9dy.js.map → LowIncomeOrganizationComponent-DjdCMtDa.js.map} +1 -1
- package/chunk/{MedicalProfessionalOrganizationComponent-Bgkysahz.js → MedicalProfessionalOrganizationComponent-D179JUHo.js} +6 -6
- package/chunk/{MedicalProfessionalOrganizationComponent-Bgkysahz.js.map → MedicalProfessionalOrganizationComponent-D179JUHo.js.map} +1 -1
- package/chunk/{MedicalProfessionalOrganizationComponent-Cfc5PzRm.js → MedicalProfessionalOrganizationComponent-FrnvaTNV.js} +6 -6
- package/chunk/{MedicalProfessionalOrganizationComponent-Cfc5PzRm.js.map → MedicalProfessionalOrganizationComponent-FrnvaTNV.js.map} +1 -1
- package/chunk/MemberIdComponent-DjukHrGI.js +4 -4
- package/chunk/MemberIdComponent-g0ai4C-r.js +4 -4
- package/chunk/{MembershipOrganizationComponent-BZvdYOtv.js → MembershipOrganizationComponent-C5FV6sUO.js} +6 -6
- package/chunk/{MembershipOrganizationComponent-BZvdYOtv.js.map → MembershipOrganizationComponent-C5FV6sUO.js.map} +1 -1
- package/chunk/{MembershipOrganizationComponent-e3VeC3yP.js → MembershipOrganizationComponent-Doy6ssD6.js} +6 -6
- package/chunk/{MembershipOrganizationComponent-e3VeC3yP.js.map → MembershipOrganizationComponent-Doy6ssD6.js.map} +1 -1
- package/chunk/Message-Dh15jweG.js +4 -4
- package/chunk/Message-HTwXp2LC.js +4 -4
- package/chunk/Onfido-CTCgAwnB.js +4 -4
- package/chunk/{PersonalInfoStepFrame-McEISOww.js → PersonalInfoStepFrame-CCpZQsI5.js} +7 -7
- package/chunk/{PersonalInfoStepFrame-McEISOww.js.map → PersonalInfoStepFrame-CCpZQsI5.js.map} +1 -1
- package/chunk/{PersonalInfoStepFrame-DsqODJf4.js → PersonalInfoStepFrame-Diy30jks.js} +5 -5
- package/chunk/{PersonalInfoStepFrame-DsqODJf4.js.map → PersonalInfoStepFrame-Diy30jks.js.map} +1 -1
- package/chunk/{PersonalInfoStepSubmitButton-BsvoqVO5.js → PersonalInfoStepSubmitButton-BD0oEu01.js} +5 -5
- package/chunk/{PersonalInfoStepSubmitButton-BsvoqVO5.js.map → PersonalInfoStepSubmitButton-BD0oEu01.js.map} +1 -1
- package/chunk/{PersonalInfoStepSubmitButton-bUadx-tz.js → PersonalInfoStepSubmitButton-K9E9gzfI.js} +5 -5
- package/chunk/{PersonalInfoStepSubmitButton-bUadx-tz.js.map → PersonalInfoStepSubmitButton-K9E9gzfI.js.map} +1 -1
- package/chunk/PostalCodeComponent-Bjl9BbdS.js +4 -4
- package/chunk/PostalCodeComponent-G6yEyz83.js +4 -4
- package/chunk/{RewardCode-DoVnfkbv.js → RewardCode-BXh0FcRA.js} +5 -5
- package/chunk/{RewardCode-DoVnfkbv.js.map → RewardCode-BXh0FcRA.js.map} +1 -1
- package/chunk/{RewardCode-BlNB8y-Z.js → RewardCode-C4BvRFpD.js} +5 -5
- package/chunk/{RewardCode-BlNB8y-Z.js.map → RewardCode-C4BvRFpD.js.map} +1 -1
- package/chunk/SSN-BfOLNtPR.js +4 -4
- package/chunk/SSN-Cde5WrVX.js +4 -4
- package/chunk/StateSelectComponent-E1ZAUdXD.js +4 -4
- package/chunk/StateSelectComponent-nYrElVek.js +4 -4
- package/chunk/StatusComponent-BPSqIuI5.js +4 -4
- package/chunk/StatusComponent-D6od8eav.js +4 -4
- package/chunk/{StepAgePersonalInfo-D71CZw61.js → StepAgePersonalInfo-BEOV8sTc.js} +12 -12
- package/chunk/{StepAgePersonalInfo-D71CZw61.js.map → StepAgePersonalInfo-BEOV8sTc.js.map} +1 -1
- package/chunk/{StepAgePersonalInfo-Be5536zS.js → StepAgePersonalInfo-DcNI6k_p.js} +12 -12
- package/chunk/{StepAgePersonalInfo-Be5536zS.js.map → StepAgePersonalInfo-DcNI6k_p.js.map} +1 -1
- package/chunk/StepCard-Bho5ssmi.js +4 -4
- package/chunk/StepCard-DYYUqLJy.js +4 -4
- package/chunk/{StepCollectIdentifier-DhTNoL76.js → StepCollectIdentifier-CNauQd7k.js} +6 -6
- package/chunk/{StepCollectIdentifier-DhTNoL76.js.map → StepCollectIdentifier-CNauQd7k.js.map} +1 -1
- package/chunk/{StepCollectIdentifier-DVIKPQwB.js → StepCollectIdentifier-DVRdMGHI.js} +6 -6
- package/chunk/{StepCollectIdentifier-DVIKPQwB.js.map → StepCollectIdentifier-DVRdMGHI.js.map} +1 -1
- package/chunk/{StepCollectMilitaryPersonalInfoComponent-DPuWQYFv.js → StepCollectMilitaryPersonalInfoComponent-0bWl6gDF.js} +13 -13
- package/chunk/{StepCollectMilitaryPersonalInfoComponent-DPuWQYFv.js.map → StepCollectMilitaryPersonalInfoComponent-0bWl6gDF.js.map} +1 -1
- package/chunk/{StepCollectMilitaryPersonalInfoComponent-DE59C2Pj.js → StepCollectMilitaryPersonalInfoComponent-BrfG4TMb.js} +13 -13
- package/chunk/{StepCollectMilitaryPersonalInfoComponent-DE59C2Pj.js.map → StepCollectMilitaryPersonalInfoComponent-BrfG4TMb.js.map} +1 -1
- package/chunk/{StepCollectPersonalInfo-B5ihuCwg.js → StepCollectPersonalInfo-BTck9GE6.js} +21 -21
- package/chunk/{StepCollectPersonalInfo-B5ihuCwg.js.map → StepCollectPersonalInfo-BTck9GE6.js.map} +1 -1
- package/chunk/{StepCollectPersonalInfo-C2NvswGA.js → StepCollectPersonalInfo-DZniV5g9.js} +21 -21
- package/chunk/{StepCollectPersonalInfo-C2NvswGA.js.map → StepCollectPersonalInfo-DZniV5g9.js.map} +1 -1
- package/chunk/StepCompleteAuthentication-CuBLCUgr.js +4 -4
- package/chunk/StepCompleteAuthentication-EwKCNe6f.js +4 -4
- package/chunk/{StepConsolation-Dk2bcjcP.js → StepConsolation-CADjRjaS.js} +5 -5
- package/chunk/{StepConsolation-Dk2bcjcP.js.map → StepConsolation-CADjRjaS.js.map} +1 -1
- package/chunk/{StepConsolation-D0b83oia.js → StepConsolation-CU5awLoC.js} +5 -5
- package/chunk/{StepConsolation-D0b83oia.js.map → StepConsolation-CU5awLoC.js.map} +1 -1
- package/chunk/{StepDocUpload-DnInI_2V.js → StepDocUpload-CKnuuKxK.js} +5 -5
- package/chunk/{StepDocUpload-DnInI_2V.js.map → StepDocUpload-CKnuuKxK.js.map} +1 -1
- package/chunk/{StepDocUpload-Bav4mZgM.js → StepDocUpload-DrQ1ZRO9.js} +5 -5
- package/chunk/{StepDocUpload-Bav4mZgM.js.map → StepDocUpload-DrQ1ZRO9.js.map} +1 -1
- package/chunk/{StepDriverLicensePersonalInfoComponent-B5uULASd.js → StepDriverLicensePersonalInfoComponent-COBk6D5m.js} +8 -8
- package/chunk/{StepDriverLicensePersonalInfoComponent-B5uULASd.js.map → StepDriverLicensePersonalInfoComponent-COBk6D5m.js.map} +1 -1
- package/chunk/{StepDriverLicensePersonalInfoComponent-BMHSFDx-.js → StepDriverLicensePersonalInfoComponent-CbRSBeRS.js} +8 -8
- package/chunk/{StepDriverLicensePersonalInfoComponent-BMHSFDx-.js.map → StepDriverLicensePersonalInfoComponent-CbRSBeRS.js.map} +1 -1
- package/chunk/{StepEmailLoop-AcJDcFNR.js → StepEmailLoop-Cwl4v6PZ.js} +6 -6
- package/chunk/{StepEmailLoop-AcJDcFNR.js.map → StepEmailLoop-Cwl4v6PZ.js.map} +1 -1
- package/chunk/{StepEmailLoop-BS2X2exP.js → StepEmailLoop-DEGo6g18.js} +6 -6
- package/chunk/{StepEmailLoop-BS2X2exP.js.map → StepEmailLoop-DEGo6g18.js.map} +1 -1
- package/chunk/{StepEmploymentPersonalInfo-DUNAF5wA.js → StepEmploymentPersonalInfo-DDrq1kLj.js} +11 -11
- package/chunk/{StepEmploymentPersonalInfo-DUNAF5wA.js.map → StepEmploymentPersonalInfo-DDrq1kLj.js.map} +1 -1
- package/chunk/{StepEmploymentPersonalInfo-e1kVVwll.js → StepEmploymentPersonalInfo-VR0m_hKq.js} +11 -11
- package/chunk/{StepEmploymentPersonalInfo-e1kVVwll.js.map → StepEmploymentPersonalInfo-VR0m_hKq.js.map} +1 -1
- package/chunk/{StepFirstResponderPersonalInfo-BB_7xD1_.js → StepFirstResponderPersonalInfo-CQtjbBo1.js} +13 -13
- package/chunk/{StepFirstResponderPersonalInfo-BB_7xD1_.js.map → StepFirstResponderPersonalInfo-CQtjbBo1.js.map} +1 -1
- package/chunk/{StepFirstResponderPersonalInfo-BaxnfnSf.js → StepFirstResponderPersonalInfo-Dccox59I.js} +13 -13
- package/chunk/{StepFirstResponderPersonalInfo-BaxnfnSf.js.map → StepFirstResponderPersonalInfo-Dccox59I.js.map} +1 -1
- package/chunk/{StepGeneralIdentityPersonalInfoComponent-Cmg8mFQJ.js → StepGeneralIdentityPersonalInfoComponent-BvzQ1nOu.js} +9 -9
- package/chunk/{StepGeneralIdentityPersonalInfoComponent-Cmg8mFQJ.js.map → StepGeneralIdentityPersonalInfoComponent-BvzQ1nOu.js.map} +1 -1
- package/chunk/{StepGeneralIdentityPersonalInfoComponent-Bg3pFwrY.js → StepGeneralIdentityPersonalInfoComponent-DjfvBr1R.js} +9 -9
- package/chunk/{StepGeneralIdentityPersonalInfoComponent-Bg3pFwrY.js.map → StepGeneralIdentityPersonalInfoComponent-DjfvBr1R.js.map} +1 -1
- package/chunk/StepHeader-fmaQRWhw.js +4 -4
- package/chunk/StepHeader-rAnYifYn.js +4 -4
- package/chunk/{StepHybridIdentityPersonalInfoComponent-COssIlOY.js → StepHybridIdentityPersonalInfoComponent-5_G7up0l.js} +9 -9
- package/chunk/{StepHybridIdentityPersonalInfoComponent-COssIlOY.js.map → StepHybridIdentityPersonalInfoComponent-5_G7up0l.js.map} +1 -1
- package/chunk/{StepHybridIdentityPersonalInfoComponent-CRXidK6R.js → StepHybridIdentityPersonalInfoComponent-mjok5oc2.js} +9 -9
- package/chunk/{StepHybridIdentityPersonalInfoComponent-CRXidK6R.js.map → StepHybridIdentityPersonalInfoComponent-mjok5oc2.js.map} +1 -1
- package/chunk/{StepIDCheckLoop-rWp_a1-l.js → StepIDCheckLoop-Cub5O4_H.js} +5 -5
- package/chunk/{StepIDCheckLoop-rWp_a1-l.js.map → StepIDCheckLoop-Cub5O4_H.js.map} +1 -1
- package/chunk/{StepIDCheckLoop-BW29xYmu.js → StepIDCheckLoop-wRl0nY1a.js} +5 -5
- package/chunk/{StepIDCheckLoop-BW29xYmu.js.map → StepIDCheckLoop-wRl0nY1a.js.map} +1 -1
- package/chunk/{StepIDCheckLoopOnfido-CLO5gxgV.js → StepIDCheckLoopOnfido-DvZrNLDM.js} +6 -6
- package/chunk/{StepIDCheckLoopOnfido-CLO5gxgV.js.map → StepIDCheckLoopOnfido-DvZrNLDM.js.map} +1 -1
- package/chunk/{StepIDCheckLoopOnfido-NUwiwP08.js → StepIDCheckLoopOnfido-OGedOclI.js} +6 -6
- package/chunk/{StepIDCheckLoopOnfido-NUwiwP08.js.map → StepIDCheckLoopOnfido-OGedOclI.js.map} +1 -1
- package/chunk/{StepIDCheckLoopRegula-CIeVW95N.js → StepIDCheckLoopRegula-CtWKy-t_.js} +5 -5
- package/chunk/{StepIDCheckLoopRegula-CIeVW95N.js.map → StepIDCheckLoopRegula-CtWKy-t_.js.map} +1 -1
- package/chunk/{StepIDCheckLoopRegula-OtuhUrWf.js → StepIDCheckLoopRegula-CybXdq7k.js} +5 -5
- package/chunk/{StepIDCheckLoopRegula-OtuhUrWf.js.map → StepIDCheckLoopRegula-CybXdq7k.js.map} +1 -1
- package/chunk/{StepLicensedProfessionalPersonalInfo-CUMvoI-q.js → StepLicensedProfessionalPersonalInfo-gHE0SgyL.js} +13 -13
- package/chunk/{StepLicensedProfessionalPersonalInfo-CUMvoI-q.js.map → StepLicensedProfessionalPersonalInfo-gHE0SgyL.js.map} +1 -1
- package/chunk/{StepLicensedProfessionalPersonalInfo-B8qcR39C.js → StepLicensedProfessionalPersonalInfo-pPsDkWGL.js} +13 -13
- package/chunk/{StepLicensedProfessionalPersonalInfo-B8qcR39C.js.map → StepLicensedProfessionalPersonalInfo-pPsDkWGL.js.map} +1 -1
- package/chunk/{StepLowIncomePersonalInfo-RbN5B8Z_.js → StepLowIncomePersonalInfo-BqwzM6cy.js} +14 -14
- package/chunk/{StepLowIncomePersonalInfo-RbN5B8Z_.js.map → StepLowIncomePersonalInfo-BqwzM6cy.js.map} +1 -1
- package/chunk/{StepLowIncomePersonalInfo-B2D6Fob8.js → StepLowIncomePersonalInfo-CE2CjgS0.js} +14 -14
- package/chunk/{StepLowIncomePersonalInfo-B2D6Fob8.js.map → StepLowIncomePersonalInfo-CE2CjgS0.js.map} +1 -1
- package/chunk/{StepMedicalProfessionalPersonalInfo-DooF0APW.js → StepMedicalProfessionalPersonalInfo-BzRKpbnY.js} +13 -13
- package/chunk/{StepMedicalProfessionalPersonalInfo-DooF0APW.js.map → StepMedicalProfessionalPersonalInfo-BzRKpbnY.js.map} +1 -1
- package/chunk/{StepMedicalProfessionalPersonalInfo-ChJMOcHO.js → StepMedicalProfessionalPersonalInfo-Z_X8Qsc2.js} +13 -13
- package/chunk/{StepMedicalProfessionalPersonalInfo-ChJMOcHO.js.map → StepMedicalProfessionalPersonalInfo-Z_X8Qsc2.js.map} +1 -1
- package/chunk/{StepMemberPersonalInfo-Co7OFLDa.js → StepMemberPersonalInfo-DGStxZaI.js} +11 -11
- package/chunk/{StepMemberPersonalInfo-Co7OFLDa.js.map → StepMemberPersonalInfo-DGStxZaI.js.map} +1 -1
- package/chunk/{StepMemberPersonalInfo--aAg4FuP.js → StepMemberPersonalInfo-xYdwCPx2.js} +11 -11
- package/chunk/{StepMemberPersonalInfo--aAg4FuP.js.map → StepMemberPersonalInfo-xYdwCPx2.js.map} +1 -1
- package/chunk/{StepMoverPersonalInfo-BMHtdUmp.js → StepMoverPersonalInfo-BAjJYLls.js} +8 -8
- package/chunk/{StepMoverPersonalInfo-BMHtdUmp.js.map → StepMoverPersonalInfo-BAjJYLls.js.map} +1 -1
- package/chunk/{StepMoverPersonalInfo-B-ymPk-P.js → StepMoverPersonalInfo-BsLp8JL7.js} +8 -8
- package/chunk/{StepMoverPersonalInfo-B-ymPk-P.js.map → StepMoverPersonalInfo-BsLp8JL7.js.map} +1 -1
- package/chunk/{StepOverrideComponent-dlShQe5c.js → StepOverrideComponent-3CNGQeSJ.js} +5 -5
- package/chunk/{StepOverrideComponent-dlShQe5c.js.map → StepOverrideComponent-3CNGQeSJ.js.map} +1 -1
- package/chunk/{StepOverrideComponent-D8N2NsQu.js → StepOverrideComponent-Csu1f4KI.js} +5 -5
- package/chunk/{StepOverrideComponent-D8N2NsQu.js.map → StepOverrideComponent-Csu1f4KI.js.map} +1 -1
- package/chunk/{StepSMSLoop-DBkD1tTW.js → StepSMSLoop-BW9dnD16.js} +5 -5
- package/chunk/{StepSMSLoop-DBkD1tTW.js.map → StepSMSLoop-BW9dnD16.js.map} +1 -1
- package/chunk/{StepSMSLoop-Cf2xJOkc.js → StepSMSLoop-TyivH54c.js} +5 -5
- package/chunk/{StepSMSLoop-Cf2xJOkc.js.map → StepSMSLoop-TyivH54c.js.map} +1 -1
- package/chunk/StepSSO-CRxZpMj0.js +4 -4
- package/chunk/StepSSO-M0HIDtje.js +4 -4
- package/chunk/{StepSocialSecurityNumber-qcujIqeH.js → StepSocialSecurityNumber-9lYH9Fg5.js} +6 -6
- package/chunk/{StepSocialSecurityNumber-qcujIqeH.js.map → StepSocialSecurityNumber-9lYH9Fg5.js.map} +1 -1
- package/chunk/{StepSocialSecurityNumber-uaScFRmd.js → StepSocialSecurityNumber-BCmkCuG3.js} +6 -6
- package/chunk/{StepSocialSecurityNumber-uaScFRmd.js.map → StepSocialSecurityNumber-BCmkCuG3.js.map} +1 -1
- package/chunk/{StepStudentPersonalInfo-sfLir9nJ.js → StepStudentPersonalInfo-BpyFwB4C.js} +12 -12
- package/chunk/{StepStudentPersonalInfo-sfLir9nJ.js.map → StepStudentPersonalInfo-BpyFwB4C.js.map} +1 -1
- package/chunk/{StepStudentPersonalInfo-DqKEnF4p.js → StepStudentPersonalInfo-Cz9EV-iN.js} +12 -12
- package/chunk/{StepStudentPersonalInfo-DqKEnF4p.js.map → StepStudentPersonalInfo-Cz9EV-iN.js.map} +1 -1
- package/chunk/{StepSuccess-TUVVg-xn.js → StepSuccess-0wmyP-A1.js} +5 -5
- package/chunk/{StepSuccess-TUVVg-xn.js.map → StepSuccess-0wmyP-A1.js.map} +1 -1
- package/chunk/{StepSuccess-C_e5fvMl.js → StepSuccess-ChWldQ0T.js} +5 -5
- package/chunk/{StepSuccess-C_e5fvMl.js.map → StepSuccess-ChWldQ0T.js.map} +1 -1
- package/chunk/{StepTeacherPersonalInfo-C_vfKHdt.js → StepTeacherPersonalInfo-0BKvQ5Tb.js} +12 -12
- package/chunk/{StepTeacherPersonalInfo-C_vfKHdt.js.map → StepTeacherPersonalInfo-0BKvQ5Tb.js.map} +1 -1
- package/chunk/{StepTeacherPersonalInfo-Nfp7YbL2.js → StepTeacherPersonalInfo-B5oyLYam.js} +12 -12
- package/chunk/{StepTeacherPersonalInfo-Nfp7YbL2.js.map → StepTeacherPersonalInfo-B5oyLYam.js.map} +1 -1
- package/chunk/StepThirdPartyLoop-CyLnB9tE.js +4 -4
- package/chunk/StepThirdPartyLoop-ZPr0uE_l.js +4 -4
- package/chunk/{TeacherSchoolComponent-dP3zgkSz.js → TeacherSchoolComponent-B2jvqp86.js} +6 -6
- package/chunk/{TeacherSchoolComponent-Cpt8ouqy.js.map → TeacherSchoolComponent-B2jvqp86.js.map} +1 -1
- package/chunk/{TeacherSchoolComponent-Cpt8ouqy.js → TeacherSchoolComponent-CTfEMMY5.js} +6 -6
- package/chunk/{TeacherSchoolComponent-dP3zgkSz.js.map → TeacherSchoolComponent-CTfEMMY5.js.map} +1 -1
- package/chunk/TestingRouteOverrides---5rGgy_.js +4 -4
- package/chunk/TestingRouteOverrides-B4dH_D9L.js +4 -4
- package/chunk/ThreatMetrix-D_TbL50B.js +4 -4
- package/chunk/{VerificationApiClient-xv6TwTZH.js → VerificationApiClient-BWRZQcp1.js} +5 -5
- package/chunk/{VerificationApiClient-xv6TwTZH.js.map → VerificationApiClient-BWRZQcp1.js.map} +1 -1
- package/chunk/{VerificationApiClient-C1uDroNA.js → VerificationApiClient-BwpNfHAu.js} +5 -5
- package/chunk/{VerificationApiClient-C1uDroNA.js.map → VerificationApiClient-BwpNfHAu.js.map} +1 -1
- package/chunk/ar-BW_N5We3.js +4 -4
- package/chunk/bg-By79VRCv.js +4 -4
- package/chunk/bn-IN-CThqyey4.js +4 -4
- package/chunk/chevron-down-BdP0bwEn.js +4 -4
- package/chunk/chevron-down-Byqign_m.js +4 -4
- package/chunk/countryUtils-VyaCdqfz.js +12 -0
- package/chunk/{countryUtils-C7eZ5e5T.js.map → countryUtils-VyaCdqfz.js.map} +1 -1
- package/chunk/{countryUtils-C7eZ5e5T.js → countryUtils-yABU9DlO.js} +5 -5
- package/chunk/{countryUtils-aXNSFhn3.js.map → countryUtils-yABU9DlO.js.map} +1 -1
- package/chunk/cs-PoOBh4zq.js +4 -4
- package/chunk/da-BiNSaCA7.js +4 -4
- package/chunk/de-BHwmyXWA.js +4 -4
- package/chunk/el-C2SjBEX2.js +4 -4
- package/chunk/empties-CAivbxer.js +4 -4
- package/chunk/empties-CJHDc0XR.js +4 -4
- package/chunk/en-GB-CDcQXyw5.js +4 -4
- package/chunk/es-D9PGd5GZ.js +4 -4
- package/chunk/es-ES-1jd_EnwU.js +4 -4
- package/chunk/et-D8EuVvYv.js +4 -4
- package/chunk/eventEmitter-CSG6jR7V.js +4 -4
- package/chunk/fa-DYG7YgrJ.js +4 -4
- package/chunk/fi-BT_jwnUK.js +4 -4
- package/chunk/fr-CA-DIvLodr_.js +4 -4
- package/chunk/fr-CHZPHJuF.js +4 -4
- package/chunk/ga-BwuuA-WY.js +4 -4
- package/chunk/hi-IN-B6QZLZ_y.js +4 -4
- package/chunk/hooks-BT2btDjA.js +4 -4
- package/chunk/hooks-vHWCExNG.js +4 -4
- package/chunk/hr-DxqvbR_k.js +4 -4
- package/chunk/hu-DjFtzRPx.js +4 -4
- package/chunk/id-CquyA6KW.js +4 -4
- package/chunk/index.es-6IWNQ_AH.js +4 -4
- package/chunk/index.es-DkMsYObI.js +4 -4
- package/chunk/input-CXs25npC.js +4 -4
- package/chunk/input-DqAXNyUt.js +4 -4
- package/chunk/is-BFjVachN.js +4 -4
- package/chunk/it-B_Qa8EFE.js +4 -4
- package/chunk/iw-CzHE5v9w.js +4 -4
- package/chunk/ja-UgyBuJ0Q.js +4 -4
- package/chunk/kk-a5Hw0Yfq.js +4 -4
- package/chunk/ko-BOblM2p5.js +4 -4
- package/chunk/lo-D_C2z8KW.js +4 -4
- package/chunk/lt-Ch9eg6Ic.js +4 -4
- package/chunk/lv-DuPPbQCS.js +4 -4
- package/chunk/mockProgramBranding-C9Ysu3Mp.js +4 -4
- package/chunk/mockProgramConfiguration-BNqSCrMG.js +4 -4
- package/chunk/mockProgramI18n-CgYx_1_a.js +4 -4
- package/chunk/mockProgramTheme-Cfk2dzF3.js +4 -4
- package/chunk/mocks-BarDaveO.js +4 -4
- package/chunk/mocks-Cqiel1sy.js +4 -4
- package/chunk/ms-ovGKr08n.js +4 -4
- package/chunk/nl-BE-B6YMdqU3.js +4 -4
- package/chunk/nl-XRVtO5vg.js +4 -4
- package/chunk/no-DQupf-YQ.js +4 -4
- package/chunk/pl-BO_C3wL1.js +4 -4
- package/chunk/portal-root-Bw2O7NHG.js +4 -4
- package/chunk/portal-root-D0FXGGfU.js +4 -4
- package/chunk/pt-BR-eyUkbtjX.js +4 -4
- package/chunk/pt-JT-yPUUR.js +4 -4
- package/chunk/refs-Mq0rtW9K.js +4 -4
- package/chunk/ro-DiTIogIg.js +4 -4
- package/chunk/ru-DdOLsBXU.js +4 -4
- package/chunk/runtimeTypes-B2AGNJMT.js +4 -4
- package/chunk/sk-DT2MEP_-.js +4 -4
- package/chunk/sl-Bcc1pyFV.js +4 -4
- package/chunk/sr-DXd0bizl.js +4 -4
- package/chunk/stepComponentHelpers-B8eG0gHy.js +4 -4
- package/chunk/stepComponentHelpers-LL4jUeQk.js +4 -4
- package/chunk/strings-DWLVdUcm.js +4 -4
- package/chunk/sv-VaAqieCM.js +4 -4
- package/chunk/sw-4Ojo7XUc.js +4 -4
- package/chunk/ta-BIhdIPje.js +4 -4
- package/chunk/th-IxA9Jfbp.js +4 -4
- package/chunk/tl-BhkqT846.js +4 -4
- package/chunk/tr-CoSCBU3A.js +4 -4
- package/chunk/tslib.es6-BltELOTz.js +4 -4
- package/chunk/uk-C5X4y7PR.js +4 -4
- package/chunk/ur-CzzdR_Sc.js +4 -4
- package/chunk/useAnchoredPopupScrollLock-BWjolwbP.js +4 -4
- package/chunk/useAnchoredPopupScrollLock-CjPxWmVd.js +4 -4
- package/chunk/useBaseUiId-BneiucuO.js +4 -4
- package/chunk/useBaseUiId-CstpA3qz.js +4 -4
- package/chunk/{useCollectFieldsEndpoint-B4TjtefL.js → useCollectFieldsEndpoint-CFPCn3R8.js} +6 -6
- package/chunk/{useCollectFieldsEndpoint-B4TjtefL.js.map → useCollectFieldsEndpoint-CFPCn3R8.js.map} +1 -1
- package/chunk/{useCollectFieldsEndpoint-CttlzHe_.js → useCollectFieldsEndpoint-r91gRs48.js} +6 -6
- package/chunk/{useCollectFieldsEndpoint-CttlzHe_.js.map → useCollectFieldsEndpoint-r91gRs48.js.map} +1 -1
- package/chunk/useControlled--1tL2ps0.js +4 -4
- package/chunk/useControlled-CaekrNYX.js +4 -4
- package/chunk/useMetrics-BRogiXFS.js +4 -4
- package/chunk/useMetrics-BsOBbYTo.js +4 -4
- package/chunk/useOpenChangeComplete-BV62V6Jn.js +4 -4
- package/chunk/useOpenChangeComplete-CDvp6rN0.js +4 -4
- package/chunk/{useStepFooter-Bj5yikRm.js → useStepFooter-BLmQgYsg.js} +5 -5
- package/chunk/{useStepFooter-Bj5yikRm.js.map → useStepFooter-BLmQgYsg.js.map} +1 -1
- package/chunk/{useStepFooter-B-vuzk6o.js → useStepFooter-namA0AlV.js} +5 -5
- package/chunk/{useStepFooter-B-vuzk6o.js.map → useStepFooter-namA0AlV.js.map} +1 -1
- package/chunk/{useSubmissionOptInMetadata-BN_43EIk.js → useSubmissionOptInMetadata-Ce6NWisK.js} +7 -7
- package/chunk/{useSubmissionOptInMetadata-BN_43EIk.js.map → useSubmissionOptInMetadata-Ce6NWisK.js.map} +1 -1
- package/chunk/{useSubmissionOptInMetadata-31Ki_IMr.js → useSubmissionOptInMetadata-DXWSs8E6.js} +7 -7
- package/chunk/{useSubmissionOptInMetadata-31Ki_IMr.js.map → useSubmissionOptInMetadata-DXWSs8E6.js.map} +1 -1
- package/chunk/useValueChanged-DP0ELC8K.js +4 -4
- package/chunk/useValueChanged-VmIEqLoX.js +4 -4
- package/chunk/validators-59ZSZLq_.js +4 -4
- package/chunk/validators-DDGp7LtZ.js +4 -4
- package/chunk/vi-rju54yia.js +4 -4
- package/chunk/x-CjVC4ZVS.js +4 -4
- package/chunk/x-Sbyd32ux.js +4 -4
- package/chunk/zh-HK-DL4BupbX.js +4 -4
- package/chunk/zh-ezz3-fTv.js +4 -4
- package/chunk/zu-BXhYYLAD.js +4 -4
- package/package.json +1 -1
- package/sheerid-install.css +4 -4
- package/sheerid-install.js +4 -4
- package/sheerid.css +4 -4
- package/sheerid.js +37 -37
- package/sheerid.js.map +1 -1
- package/chunk/countryUtils-aXNSFhn3.js +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_mysheerid-preview.js","names":["useMemo","createElement","Spinner","_Fragment","_Fragment","produce","_Fragment","_Fragment","_Fragment","produce","_Fragment","Suspense","useSyncExternalStore","isClickLikeOpenEvent","isClickLikeOpenEventShared","REASONS.triggerHover","isInsideEnabledTrigger","isClickLikeOpenEvent","isClickLikeOpenEventShared","REASONS.triggerHover","isInsideEnabledTrigger","_formatErrorMessage","REASONS.triggerHover","REASONS.imperativeAction","REASONS.focusOut","PopoverTrigger","_formatErrorMessage","_formatErrorMessage","_formatErrorMessage","_formatErrorMessage","PopoverPrimitive.Root","PopoverPrimitive.Trigger","PopoverPrimitive.Portal","PopoverPrimitive.Positioner","PopoverPrimitive.Popup","createContext","useContext","_Fragment","_Fragment","Suspense","useLDClient","useMemo","deterministicStringify","produce","flatten","i18next","Suspense","LoadingScreen","LoadStep","LDProvider","i18next","CustomMetricNames","recordCTAClickEvent","observePerformanceMetrics","addThemeMessages","require_flat","i18next_default","setUserDimension","Namespace","recordEvent","addOptionsMessages","getSafe","deepClone","__toESM","CustomDimensionNames","setOptions","QUERY_STRING_PREV_STEP_OVERRIDE","F","isValidHttpUrl","getFieldValidationErrorsEmpty","getMessages","getOptionsMessages","resetOptions","getOptions","recordGaEvent","getOption","QUERY_STRING_THIRD_PARTY_PROVIDER_OVERRIDE","getLocaleSafely","EventName","assertValidHtmlElement","fn","logger","VerificationStepsEnum","ThirdPartyLoopProvider","MockStepsEnum","isCollectStep","useRefWithInit","InstallTypes","isElement","formatErrorMessage","useStableCallback","setInstallType","getInstallType","Button","useRenderElement","NOOP","BrandThemeProvider","buttonVariants","EMPTY_OBJECT","StepLogo","useBrandTheme","StepFrame","useIsEmbedded","StepHeading","StepHeader","cva","useButton","useIsoLayoutEffect","isHTMLElement","createStore","require_react_dom","Provider","clearProgramConfigurationOverrides","mergeProgramI18nBaseline","mergeProgramConfigurationBaseline","programStore","clearPreviewOverrides","clearProgramBrandingOverrides","setProgramBrandingOverrides","require_jsx_runtime","setProgramConfigurationOverrides","selectResponseOverride","selectPreviewMessages","setPreviewOverrides","useSegment","linkClassName","useLoadingState","useProgramBranding","useProgramTheme","useProgramMessages","getBrandFaqUrl","cn","useProgramId","useMessage","I18nContext","LinkExternal","useProgramConfiguration","mergeProgramBaseline","useFaqHref","require_react","TextLink","Message","require_shim","useAppDispatch","useVerificationId","connect","useStore","useVerificationResponse","listenToInstallPage","require_json_stable_stringify","splitProgramTheme","speakToOuterFrame","enableMockProgram","appendClientParams","disableMockProgram","getPublishedVersion","getRouteOverride","getPreviousStepOverride","getQueryOrOption","getOverriddenMock","hooks","addPredefinedHooks","postMessageFromIframe","getRemainingRewardCodes","addHook","createFetchExistingVerificationRequest","createSubmitStep","createUpdateProgramTheme","createUpdateViewModel","getEmptyViewModel","resetStore","createUpdateFieldValidationErrors","hasFailedInstantMatch","setViewModel","createFetchNewVerificationRequest","fieldIdErrorMap","getStore","createResetState","useSubmissionOptInMetadata","createUpdateLocale","getTabRef","setTabRef","closeTabRef","IntlProvider","se","R","useFlags","flagDefaults","useFlag","DirectionContext","useAnchorPositioning","usePositioner","getDisabledMountTransitionStyles","useAnchoredPopupScrollLock","LoadingSpinnerComponent","dashed","useStepFooter","Timeout","getTarget","useTimeout","contains","ownerDocument","FloatingPortal","isOutsideEvent","useClick","popupTransitionStateMapping","useFloatingNodeId","FloatingTree","fastComponent","getNodeChildren","isMouseLikePointerType","fastComponentRef","getNextTabbable","useFloatingParentNodeId","POPUP_COLLISION_AVOIDANCE","getTabbableAfterElement","useDismiss","FloatingNode","triggerOpenStateMapping","usePopupRootStore","mergeCleanups","inertValue","FloatingRootStore","isTargetInsideEnabledTrigger","PopupTriggerMap","attachPreventUnmountOnClose","createDefaultInitialFocus","usePopupInteractionProps","useOpenStateTransitions","InternalBackdrop","CLICK_TRIGGER_IDENTIFIER","useFloatingTree","FOCUSABLE_POPUP_PROPS","useImplicitActiveTrigger","FocusGuard","usePortalContainer","createPopupOpenState","useOpenMethodTriggerProps","PortalRoot","PopupHandleAttachment","usePopupRootSync","FloatingFocusManager","pressableTriggerOpenStateMapping","ReactStore","useTriggerDataForwarding","isInteractiveElement","getTabbableBeforeElement","useOnMount","triggerHover","focusOut","createChangeEventDetails","useBaseUiId","imperativeAction","addEventListener","useAnimationsFinished","useValueAsRef","useOpenChangeComplete","import_react","I18nextProvider","value","i18n","defaultNS","children","setProgramI18nFromTheme","intl","partial","setProgramTheme","store","state","doSet","newProgramTheme","programTheme","programI18n","options","programConfiguration","import_jsx_runtime","DirectionProvider","props","contextValue","direction","import_flat","import_json_stable_stringify","import_react_dom","DirectionRoot","selectFormValidationOptions","verificationResponse","LoadingScreenMessage","step","LoadingScreenComponent","FaqLinkComponent","segment","faqHref","linkText","msg","PoweredByComponent","hideFaqLink","usePollingInterval","timerRef","stopInterval","callback","pollTime","SSOPendingContent","ButtonType","messages","cancelButtonType","cancelSingleSignOn","SSOContentComponent","dashedStepName","updateViewModelAndOpenLoginTab","\"PRIMARY\"","\"SECONDARY\"","SingleSignOnComponent","verificationService","viewModel","previousViewModel","previousVerificationResponse","isMockingStep","stepName","stepFooter","timeout","pollForVerificationServiceUpdates","programId","verificationId","updateViewModel","nextState","key","cancelSingleSignOnStep","openLoginTab","loginUrl","ssoMessages","StepSSOComponent","ReviewPendingComponent","IDCheckLoopPendingComponent","thirdPartyLoopMessageMap","ThirdPartyLoopError","StepThirdPartyLoopComponent","ThirdPartyLoopPendingComponent","thirdPartyLoopMessages","isMockingPreviousStepThirdPartyLoop","verificationLastResponse","cancelThirdPartyLoop","DOC_UPLOAD_FAST_POLL_DURATION","DOC_UPLOAD_FAST_POLL_WINDOW","DOC_UPLOAD_POLL_DURATION","SINGLE_SIGN_ON_POLL_DURATION","StepPendingComponent","isMockingPreviousStepSSO","isMockingPreviousStepIdCheckLoop","footerTextRef","isPreviousStepSSO","isPreviousStepThirdPartyLoop","isPreviousStepIdCheckLoop","isSsoOrThirdPartyLoopPath","isIdCheckLoopPath","isDocUploadPath","setPollTime","timeoutId","stopPollingInterval","showSSO","showThirdPartyLoop","showIdCheckLoop","TryAgainButtonComponent","dispatch","currentSegment","tryAgainHandler","url","ConfiguredTryAgainAction","tryAgainButton","allowReset","TryAgainActionType","PostMessageButton","RedirectButton","redirectUrl","assertValidTryAgainAction","action","LegacyTryAgainAction","TryAgainActionComponent","CONTACT_SUPPORT_ERROR_IDS","useErrorTitleId","firstErrorId","errorIds","ErrorMsg","displayErrorMessageIds","errorDetailId","errId","errMsgId","ErrorNote","noteMessageId","ErrorButton","branding","faqUrl","StepErrorComponent","responseErrorIds","errorIdsSet","errorId","titleId","showContactSupport","defaultComponents","n","getComponent","componentName","getLoadingScreen","LoadStepComponent","stepToLoad","Component","CustomTextWrapper","dangerouslySetInnerHTML","TestModeFlagComponent","resolveValue","pointerType","getDelay","result","prop","getRestMs","isClickLikeOpenEvent","interactedInside","openEventType","isHoverOpenEvent","createInitialPopupStoreState","activeTriggerIdSelector","openSelector","popupIdSelector","triggerOwnsOpenPopup","triggerId","triggerOwnsOpenPopupOrIsOnlyTrigger","popupStoreSelectors","isActive","import_shim","usePopupHandleStore","subscribe","handle","listener","getSnapshot","HoverInteraction","pointerEventsMutationOwnerByScopeElement","clearSafePolygonPointerEventsMutation","instance","scopeElement","applySafePolygonPointerEventsMutation","existingOwner","referenceElement","floatingElement","useHoverInteractionSharedState","data","useHoverFloatingInteraction","closeDelayProp","nodeIdProp","parameters","context","open","domReferenceElement","tree","parentId","childClosedTimeout","isClickLikeOpenEvent$2","dataRef","isHoverOpen","clearPointerEvents","enabled","ref","floatingEl","doc","parentFloating","node","cachedScopeElement","parentScopeElement","hasParentChildren","closeWithDelay","closeDelay","close","event","handleInteractInside","target","onFloatingMouseEnter","onNodeClosed","onFloatingMouseLeave","currentNodeId","relatedTarget","floating","EMPTY_REF","useHoverReferenceInteraction","shouldOpenProp","externalTree","isHoverCloseActiveRef","handleCloseRef","handleClose","delayRef","delay","restMsRef","restMs","enabledRef","shouldOpenRef","isClosingRef","isClosing","isClickLikeOpenEvent$1","checkShouldOpen","isOverInactiveTrigger","allTriggers","currentTarget","currentDomReference","targetElement","trigger","cleanupMouseMoveHandler","isActiveTrigger","onOpenChangeLocal","details","events","runElseBranch","triggerElementRef","onMouseEnter","mouseOnly","restMsValue","openDelay","eventTarget","triggerNode","triggerElement","isOverInactive","isOpen","isInClosingTransition","isHoverCloseTransition","isReenteringSameTriggerDuringCloseTransition","isRestOnlyDelay","shouldOpenImmediately","shouldOpen","onMouseLeave","handleCloseContextBase","getHandleCloseContext","currentTrigger","onMouseOut","staleOpenGuard","guardStaleOpen","move","setPointerRef","currentOpen","handleMouseMove","latestOpen","nativeEvent","CURSOR_SPEED_THRESHOLD","CURSOR_SPEED_THRESHOLD_SQUARED","POLYGON_BUFFER","hasIntersectingEdge","yi","pointY","yj","pointX","xj","xi","isPointInQuadrilateral","isInsideValue","x1","y1","x2","y2","x3","y3","x4","y4","isInsideRect","rect","isInsideAxisAlignedRect","safePolygon","side","placement","hasLanded","lastX","lastY","lastCursorTime","isCursorMovingSlowly","currentTime","elapsedTime","nextX","nextY","deltaX","deltaY","distanceSquared","thresholdSquared","onClose","domReference","elements","x","y","isLeave","isOverFloatingEl","isOverReferenceEl","hasOpenChildNode","nodeId","closeIfNoOpenChild","refRect","cursorLeaveFromRight","cursorLeaveFromBottom","isFloatingWider","isFloatingTaller","left","right","top","bottom","isInsideTroughRect","clientX","clientY","isInsidePolygon","cursorXOffset","cursorPointOneX","cursorPointTwoX","cursorPointY","commonYLeft","commonYRight","cursorYOffset","cursorPointOneY","cursorPointTwoY","cursorPointX","commonXTop","commonXBottom","PopoverRootContext","usePopoverRootContext","optional","selectors","PopoverStore","triggerElements","createInitialState","initialState","floatingId","nested","createInitialContext","isHover","eventDetails","isKeyboardClick","isDismissClose","nextOpen","shouldPreventUnmountOnClose","activeTriggerId","changeState","popupOpenState","instantType","PopoverRootComponent","openProp","triggerIdProp","defaultTriggerIdProp","usePopoverRootStore","defaultOpen","mounted","payload","onOpenChange","onOpenChangeComplete","forceUnmount","shouldRenderInteractions","PopoverInteractions","PopoverRoot","floatingRootContext","dismiss","modal","triggerProps","popupProps","useTriggerFocusGuards","preFocusGuardRef","handlePreFocusGuardFocus","handleFocusTargetFocus","positionerElement","nextTabbable","prevTabbable","PopoverTrigger$1","idProp","elementProps","componentProps","rootStore","thisTriggerId","isTriggerActive","floatingContext","isOpenedByThisTrigger","popupId","openReason","stickIfOpen","openMethod","focusManagerModal","hoverProps","disabled","openOnHover","click","interactionTypeProps","interactionType","rootTriggerProps","isMountedByThisTrigger","nativeButton","stateAttributesMapping","element","buttonRef","forwardedRef","registerTrigger","getButtonProps","keyedElement","PopoverPortalContext","usePopoverPortalContext","PopoverPortal","portalProps","keepMounted","PopoverPositionerContext","usePopoverPositionerContext","PopoverPositioner","transitionStatus","adaptiveOrigin","prevTriggerElementRef","runOnceAnimationsFinish","positioning","currentTriggerElement","prevTriggerElement","ac","trueModalNonHover","setPositionerElement","ARROW_UP","ARROW_DOWN","ARROW_LEFT","ARROW_RIGHT","HOME","COMPOSITE_KEYS","SHIFT","MODIFIER_KEYS","isInputElement","isNativeInput","scrollIntoViewIfNeeded","scrollContainer","targetX","targetY","isOverflowingX","isOverflowingY","orientation","elementOffsetLeft","getOffset","containerStyles","getStyles","elementStyles","elementOffsetTop","propName","ancestor","styles","ToolbarRootContext","useToolbarRootContext","ClosePartContext","useClosePartCount","closePartCount","setClosePartCount","register","count","PopoverPopup","positioner","insideToolbar","closePartContext","descriptionId","activeTriggerElement","resolvedInitialFocus","initialFocus","hasClosePart","setPopupElement","finalFocus","Popover","PopoverTrigger","PopoverContent","portalContainer","container","className","HowDoesVerifyingWorkComponent","initialVisibility","alertVariants","Alert","AlertTitle","AlertDescription","LowRewardPoolNote","LandingSidePanelContext","LandingSidePanelProvider","useLandingSidePanel","PersonalInfoStepIntro","inLandingSide","sidePanelShowsIntro","failedInstantMatch","titleMsgId","subtitleMsgId","title","LANDING_MIN_HEIGHT","Layout","layout","renderAsLandingPage","isEmbedded","splitRight","fullRight","center","FormWrapperComponent","NewVerificationInnerComponent","programThemeProp","verificationServiceProp","ldClient","responseOverride","flags","stringFlags","metadata","metadataWithFlags","newViewModel","_launchDarklyUserTargeting","identity","previewMessages","messagesWithOptions","locale","renderAs","loadingStep","isLoading","trapFocus","lastFocusableElement","e","focusableContent","maintainFocusInLightbox","NewVerification","NewVerificationComponent","ownProps","otherDispatchProps","propsFromDispatch","propsFromState","getLDProgramContext","FlagProvider","VerificationForm","VerificationFormEs5","trackingId","previewFormStateStore","FILLED_VALUES","getAllFieldsErrored","errors","fieldId","applyFormState","filled","formState","empty","whenFormReady","response","setPreviewFormState","prev","clearPreviewFormState","reapplyPreviewFormState","setPreviewMessages","clearPreviewMessages","locales","MOCK_OPTION_KEYS","setPreviewMock","optionPatch","directives","optionKey","setPreviewBranding","setPreviewConfiguration","configuration","setPreviewResponse","patch","setPreviewLocale","clearPreview","messageLocales","loadInElement","containerElement","renderMockProgram","config","form","setProgramThemeChoices","theme","setProgramOptions","resetProgramOptions","getFeatureFlags","getProgramMessages","programThemeMessages","_mysheerid_preview_default"],"sources":["../../node_modules/react-i18next/dist/es/I18nextProvider.js","../src/lib/VerificationService/ProgramTheme/ProgramTheme.ts","../../node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs","../../packages/ui/src/components/direction-root.tsx","../src/lib/VerificationService/formValidationOptions.ts","../src/components/LoadingScreen/LoadingScreenMessage.tsx","../src/components/LoadingScreen/LoadingScreenComponent.tsx","../src/components/FaqLink/FaqLinkComponent.tsx","../src/components/PoweredBy/PoweredByComponent.tsx","../src/lib/utils/usePollingInterval/usePollingInterval.ts","../src/components/StepPending/SSOPendingContent.tsx","../src/components/StepSSO/SSOContentComponent.tsx","../src/components/SingleSignOnComponent.tsx","../src/components/StepSSO/StepSSOComponent.tsx","../src/components/StepPending/ReviewPendingComponent.tsx","../src/components/StepPending/IDCheckLoopPendingComponent.tsx","../src/components/StepThirdPartyLoop/StepThirdPartyLoopComponent.tsx","../src/components/StepPending/ThirdPartyLoopPendingComponent.tsx","../src/components/StepPending/StepPendingComponent.tsx","../src/components/TryAgainButtonComponent.tsx","../src/components/ConfiguredTryAgainAction.tsx","../src/components/LegacyTryAgainAction.tsx","../src/components/TryAgainAction.tsx","../src/components/StepError/StepErrorComponent.tsx","../src/components/LoadStepComponent.tsx","../src/components/CustomTextWrapper.tsx","../src/components/TestModeFlag/TestModeFlagComponent.tsx","../../node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs","../../node_modules/@base-ui/react/utils/popups/store.mjs","../../node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs","../../node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs","../../node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs","../../node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs","../../node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs","../../node_modules/@base-ui/react/popover/root/PopoverRootContext.mjs","../../node_modules/@base-ui/react/popover/store/PopoverStore.mjs","../../node_modules/@base-ui/react/popover/root/PopoverRoot.mjs","../../node_modules/@base-ui/react/utils/popups/useTriggerFocusGuards.mjs","../../node_modules/@base-ui/react/popover/trigger/PopoverTrigger.mjs","../../node_modules/@base-ui/react/popover/portal/PopoverPortalContext.mjs","../../node_modules/@base-ui/react/popover/portal/PopoverPortal.mjs","../../node_modules/@base-ui/react/popover/positioner/PopoverPositionerContext.mjs","../../node_modules/@base-ui/react/popover/positioner/PopoverPositioner.mjs","../../node_modules/@base-ui/react/internals/composite/composite.mjs","../../node_modules/@base-ui/react/toolbar/root/ToolbarRootContext.mjs","../../node_modules/@base-ui/react/utils/closePart.mjs","../../node_modules/@base-ui/react/popover/popup/PopoverPopup.mjs","../../packages/ui/src/components/popover.tsx","../src/components/HowDoesVerifyingWork/HowDoesVerifyingWorkComponent.tsx","../../packages/ui/src/components/alert.tsx","../src/components/RewardsRemaining/LowRewardPoolNote.tsx","../src/components/Layout/LandingSidePanel.tsx","../src/components/PersonalInfoStepIntro/PersonalInfoStepIntro.tsx","../src/components/Layout/Layout.tsx","../src/components/FormWrapper/FormWrapperComponent.tsx","../src/components/NewVerificationInnerComponent.tsx","../src/lib/frames/windowFocus.ts","../src/components/NewVerificationComponent.tsx","../src/components/FeatureFlags/FlagProvider.tsx","../src/components/VerificationForm/VerificationFormComponent.tsx","../src/es5Bindings/VerificationFormEs5.tsx","../src/lib/state/previewFormStateStore.ts","../src/lib/state/previewMessages.ts","../src/lib/state/previewResponse.ts","../src/lib/state/previewApi.ts","../src/lib/installScript/_mysheerid-preview.ts"],"sourcesContent":["import { createElement, useMemo } from 'react';\nimport { I18nContext } from './context.js';\nexport function I18nextProvider({\n i18n,\n defaultNS,\n children\n}) {\n const value = useMemo(() => ({\n i18n,\n defaultNS\n }), [i18n, defaultNS]);\n return createElement(I18nContext.Provider, {\n value\n }, children);\n}","import { logger } from \"@jslib/shared/utils/logger\";\n\nimport { addThemeMessages } from \"@/lib/intl/i18next\";\n\nimport { type ProgramI18n, type ProgramThemeResponse, type ReduxState } from \"../../types/types\";\nimport { type DeepPartial } from \"../../types/helpers\";\nimport { deepClone } from \"../../utils/objects\";\nimport { createUpdateProgramTheme } from \"../VerificationServiceActions\";\nimport { getStore } from \"../VerificationServiceStore\";\nimport { addHook } from \"../../hooks\";\nimport { mergeProgramBaseline } from \"../../state/programStore\";\nimport { mergeProgramI18nBaseline } from \"../../state/programI18nStore\";\nimport { mergeProgramConfigurationBaseline } from \"../../state/programConfigurationStore\";\nimport { splitProgramTheme } from \"../../ProgramTheme/splitProgramTheme\";\n\n/**\n * Legacy callers still pass the program's i18n inside the theme. Load it into i18next's \"theme\" namespace and the i18n store, as `setProgramTheme` always has. react-intl's messages are not rebuilt; they never were.\n */\nconst setProgramI18nFromTheme = (intl: DeepPartial<ProgramI18n>, partial: boolean) => {\n if (intl.locale && intl.messages) {\n addThemeMessages(intl as ProgramI18n);\n }\n mergeProgramI18nBaseline(intl, partial);\n};\n\nexport const setProgramTheme = (\n newProgramTheme: DeepPartial<ProgramThemeResponse> | {},\n options: { partial: boolean } = { partial: true },\n) => {\n const store = getStore();\n const state: ReduxState = store.getState();\n const doSet = () => {\n const { programTheme, programConfiguration, programI18n } = splitProgramTheme(\n deepClone(newProgramTheme) as DeepPartial<ProgramThemeResponse>,\n );\n logger.info(\"Setting programTheme\", programTheme);\n\n // Execute before the theme writes below, since those re-render the i18n and configuration consumers.\n if (programI18n) {\n setProgramI18nFromTheme(programI18n, options.partial);\n }\n if (programConfiguration) {\n mergeProgramConfigurationBaseline(programConfiguration, options.partial);\n }\n createUpdateProgramTheme(store.dispatch)(programTheme, options.partial);\n mergeProgramBaseline(programTheme, options.partial);\n };\n\n if (state.isLoading) {\n addHook({\n name: \"ON_VERIFICATION_READY\",\n callback: () => {\n doSet();\n },\n });\n } else {\n doSet();\n }\n};\n","'use client';\n\nimport * as React from 'react';\nimport { DirectionContext } from \"../internals/direction-context/DirectionContext.mjs\";\n\n/**\n * Enables RTL behavior for Base UI components.\n *\n * Documentation: [Base UI Direction Provider](https://base-ui.com/react/utils/direction-provider)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DirectionProvider = function DirectionProvider(props) {\n const {\n direction = 'ltr'\n } = props;\n const contextValue = React.useMemo(() => ({\n direction\n }), [direction]);\n return /*#__PURE__*/_jsx(DirectionContext.Provider, {\n value: contextValue,\n children: props.children\n });\n};\nif (process.env.NODE_ENV !== \"production\") DirectionProvider.displayName = \"DirectionProvider\";","import type React from \"react\";\nimport { type ReactNode } from \"react\";\nimport { DirectionProvider, type TextDirection } from \"@base-ui/react/direction-provider\";\n\ninterface DirectionRootProps {\n direction: TextDirection;\n className?: string;\n children: ReactNode;\n}\n\n// DirectionProvider renders no element, so this div carries `dir` for the DOM while the\n// provider gives Base UI components the same direction.\nexport const DirectionRoot: React.FC<DirectionRootProps> = ({ direction, className, children }) => (\n <div dir={direction} className={className}>\n <DirectionProvider direction={direction}>{children}</DirectionProvider>\n </div>\n);\n","import {\n type FormValidationOptions,\n type ProgramConfiguration,\n type VerificationResponse,\n type ViewModel,\n} from \"../types/types\";\n\n/** Derives form validation options from the effective configuration, response, and view model. */\nexport const selectFormValidationOptions = (\n programConfiguration: ProgramConfiguration | undefined,\n verificationResponse: VerificationResponse | undefined,\n viewModel: ViewModel | undefined,\n): FormValidationOptions => ({\n minAge: verificationResponse?.minAge || programConfiguration?.minAge,\n maxAge: verificationResponse?.maxAge || programConfiguration?.maxAge,\n smsLoopEnabled: programConfiguration?.smsLoopEnabled,\n strictMilitaryValidationEnabled: programConfiguration?.strictMilitaryValidationEnabled,\n transitionalMilitaryValidityDays: programConfiguration?.transitionalMilitaryValidityDays,\n currentStep: verificationResponse?.currentStep,\n viewModel,\n});\n","import { Message } from \"@/components/Message\";\n\nimport { isCollectStep } from \"../../lib/types/runtimeTypes\";\nimport { type VerificationStep } from \"../../lib/types/types\";\n\ninterface Props {\n step: VerificationStep;\n}\n\nexport default function LoadingScreenMessage({ step }: Props) {\n return (\n <div>\n {isCollectStep(step) && (\n // Subtitle size: the body size, scaled up a quarter\n <div className=\"text-center text-[calc(var(--body-size)*1.25)] font-bold\" role=\"alert\">\n <Message id=\"step.personalInfo.verifyingTitle\" />\n </div>\n )}\n\n <div className=\"text-center\">\n <Message id=\"step.personalInfo.verifyingSubtitle\" />\n </div>\n </div>\n );\n}\n","import React from \"react\";\n\nimport { type VerificationStep } from \"../../lib/types/types\";\nimport { LoadingSpinnerComponent as Spinner } from \"../LoadingSpinner/LoadingSpinnerComponent\";\n\nimport LoadingScreenMessage from \"./LoadingScreenMessage\";\n\ninterface Props {\n step?: VerificationStep;\n}\n\n// eslint-disable-next-line react/prop-types\nconst LoadingScreenComponent: React.FC<Props> = ({ step }) => (\n <div className=\"flex min-h-125 w-full flex-col items-center justify-center\">\n <Spinner />\n {step && (\n // This is itself a Suspense fallback, and the message suspends until its catalog has loaded;\n // without its own boundary that suspends the fallback and unmounts the whole app.\n <React.Suspense fallback={null}>\n <LoadingScreenMessage step={step} />\n </React.Suspense>\n )}\n </div>\n);\n\nexport { LoadingScreenComponent };\n","import { TextLink } from \"@jslib/ui/components/text-link\";\n\nimport { useMessage } from \"@/components/Message\";\nimport { useSegment } from \"@/lib/state/contextHooks\";\n\nimport { LinkExternal } from \"../LinkExternal\";\n\nimport { useFaqHref } from \"./useFaqHref\";\n\ninterface Props {\n linkText?: string;\n}\n\nexport const FaqLinkComponent = ({ linkText }: Props) => {\n const segment = useSegment();\n const faqHref = useFaqHref();\n const { msg } = useMessage();\n\n if (!segment) return null;\n\n return (\n <LinkExternal as={TextLink} href={faqHref}>\n {linkText || msg({ id: \"getHelp\" })}\n </LinkExternal>\n );\n};\n","import Message from \"@components/Message\";\n\nimport { FaqLinkComponent } from \"../FaqLink/FaqLinkComponent\";\n\ninterface Props {\n hideFaqLink?: boolean;\n}\n\n/** The centred \"powered by SheerID\" line and help link that close a step's footer. */\nexport const PoweredByComponent = ({ hideFaqLink = false }: Props) => (\n <div className=\"flex flex-col items-center gap-2 text-center\">\n <Message id=\"poweredBy\" />\n {!hideFaqLink && <FaqLinkComponent />}\n </div>\n);\n","import React from \"react\";\n\nexport const usePollingInterval = (callback, pollTime) => {\n const timerRef = React.useRef(null);\n\n function stopInterval() {\n clearInterval(timerRef.current);\n }\n\n React.useEffect(() => {\n timerRef.current = setInterval(callback, pollTime);\n\n return () => stopInterval();\n }, [callback, pollTime]);\n\n return stopInterval;\n};\n","import { Button } from \"@jslib/ui/components/button\";\n\nimport Message from \"@/components/Message\";\n\nimport { ButtonType, type SingleSignOnMessages } from \"../SingleSignOnComponent\";\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\ninterface SingleSignOnProps {\n messages: SingleSignOnMessages;\n cancelSingleSignOn: () => void;\n cancelButtonType?: ButtonType;\n}\n\nexport const SSOPendingContent = ({\n messages,\n cancelSingleSignOn,\n cancelButtonType = ButtonType.PRIMARY,\n}: SingleSignOnProps) => (\n <>\n <StepHeader titleId={messages.title} />\n <p className=\"text-center\">\n <Message id={messages.subtitle} />\n </p>\n {messages.subtitle2 && (\n <p className=\"text-center\">\n <Message id={messages.subtitle2} />\n </p>\n )}\n <Button\n variant={cancelButtonType === ButtonType.SECONDARY ? \"light\" : \"primary\"}\n type=\"submit\"\n onClick={cancelSingleSignOn}\n >\n <Message id={messages.cancel} />\n </Button>\n </>\n);\n","import type React from \"react\";\n\nimport { Button } from \"@jslib/ui/components/button\";\n\nimport Message from \"@/components/Message\";\n\nimport { type SSOContentProps } from \"../SingleSignOnComponent\";\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\nconst SSOContentComponent: React.FC<SSOContentProps> = ({\n messages,\n updateViewModelAndOpenLoginTab,\n dashedStepName,\n}) => (\n <>\n <StepHeader titleId={messages.title} />\n <p className=\"text-center\">\n <Message id={messages.subtitle} />\n </p>\n <Button\n id={`sid-submit-btn-${dashedStepName}`}\n variant=\"primary\"\n type=\"submit\"\n onClick={() => updateViewModelAndOpenLoginTab(\"isSingleSignOnActive\", true)}\n >\n <Message id={messages.login} />\n </Button>\n </>\n);\nexport { SSOContentComponent };\n","import { produce } from \"immer\";\n\nimport { StepFrame } from \"@jslib/ui/components/step-frame\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport { type MessageId } from \"@/lib/intl/types\";\n\nimport {\n type SSOResponse,\n type SingleSignOnViewModel,\n type StudentPersonalInfoViewModel,\n type VerificationService,\n} from \"../lib/types/types\";\nimport { VerificationStepsEnum } from \"../lib/types/runtimeTypes\";\nimport { getRouteOverride } from \"../lib/ServerApi/TestingRouteOverrides\";\nimport { appendClientParams } from \"../lib/ServerApi/clientParams\";\nimport { closeTabRef, setTabRef, getTabRef } from \"../lib/refs/refs\";\nimport { dashed } from \"../lib/utils/strings\";\nimport { isValidHttpUrl } from \"../lib/utils/routing/Url\";\nimport { EventName, recordCTAClickEvent } from \"../lib/GoogleAnalytics/ga\";\n\nimport { useStepFooter } from \"./FormFooter/useStepFooter\";\nimport { SSOPendingContent } from \"./StepPending/SSOPendingContent\";\nimport { SSOContentComponent } from \"./StepSSO/SSOContentComponent\";\n\nexport type SingleSignOnMessages = {\n title: MessageId;\n subtitle: MessageId;\n login: MessageId;\n cancel: MessageId;\n subtitle2?: MessageId;\n};\n\nexport enum ButtonType {\n PRIMARY = \"primary\",\n SECONDARY = \"secondary\",\n}\n\nexport interface SSOContentProps {\n messages: SingleSignOnMessages;\n updateViewModelAndOpenLoginTab: (key: string, value: boolean) => void;\n dashedStepName: string;\n cancelSingleSignOn?: () => void;\n}\n\ninterface SingleSignOnProps {\n verificationService: VerificationService;\n stepName: VerificationStepsEnum.sso | VerificationStepsEnum.thirdPartyLoop;\n messages: SingleSignOnMessages;\n cancelButtonType?: ButtonType;\n}\n\nconst SingleSignOnComponent = ({\n verificationService,\n stepName,\n messages,\n cancelButtonType = ButtonType.PRIMARY,\n}: SingleSignOnProps) => {\n const { programId } = verificationService;\n const viewModel = verificationService.viewModel as SingleSignOnViewModel;\n const previousViewModel =\n (verificationService.previousViewModel as StudentPersonalInfoViewModel) || undefined;\n const verificationResponse = verificationService.verificationResponse as SSOResponse;\n const previousVerificationResponse =\n verificationService.previousVerificationResponse || undefined;\n const { verificationId, locale } = verificationService.verificationResponse;\n const isMockingStep = getRouteOverride();\n const dashedStepName = dashed(stepName);\n const stepFooter = useStepFooter();\n let timeout;\n\n const pollForVerificationServiceUpdates = () =>\n setTimeout(() => {\n verificationService.fetchExistingVerificationRequest(\n programId,\n verificationId,\n previousVerificationResponse,\n previousViewModel,\n );\n }, 1000);\n\n const updateViewModel = (key, value) => {\n const nextState = produce(viewModel, (draft) => {\n (draft[key] as any) = value;\n });\n verificationService.updateViewModel(nextState);\n };\n\n const cancelSingleSignOnStep = () => {\n recordCTAClickEvent(EventName.SSO_CANCEL_CLICKED, {\n programId,\n locale,\n verificationId,\n });\n\n closeTabRef();\n const nextState = produce(viewModel, () => {});\n logger.info(\"SingleSignOnComponent submitting cancel request\");\n clearTimeout(timeout);\n verificationService.submitStep(stepName, nextState, verificationService.verificationResponse);\n };\n\n const updateViewModelAndOpenLoginTab = (key, value) => {\n recordCTAClickEvent(EventName.SSO_SIGN_IN_CLICKED, {\n programId,\n locale,\n verificationId,\n });\n\n updateViewModel(key, value);\n openLoginTab();\n };\n\n const openLoginTab = () => {\n // Only the sso step's loginUrl navigates to the SheerID platform, which\n // reads the client params before redirecting to the identity provider.\n const loginUrl =\n stepName === VerificationStepsEnum.sso\n ? appendClientParams(verificationResponse.loginUrl)\n : verificationResponse.loginUrl;\n\n // A loginUrl with any scheme other than http(s) is never opened\n if (!isValidHttpUrl(loginUrl)) {\n logger.error(\n \"Invalid loginUrl - must be an absolute http(s) URL. Not opening the login tab.\",\n \"sso loginUrl\",\n );\n return;\n }\n\n setTabRef(window.open(loginUrl, \"_blank\"));\n getTabRef().focus();\n };\n\n if (viewModel.isSingleSignOnActive && !isMockingStep) {\n timeout = pollForVerificationServiceUpdates();\n }\n\n if (!viewModel.countryChoice && previousViewModel && previousViewModel.countryChoice) {\n updateViewModel(\"countryChoice\", previousViewModel.countryChoice);\n }\n\n return (\n <StepFrame id={`sid-step-${dashedStepName}`} {...stepFooter}>\n {viewModel.isSingleSignOnActive ? (\n <SSOPendingContent\n messages={messages}\n cancelSingleSignOn={cancelSingleSignOnStep}\n cancelButtonType={cancelButtonType}\n />\n ) : (\n <SSOContentComponent\n messages={messages}\n updateViewModelAndOpenLoginTab={updateViewModelAndOpenLoginTab}\n dashedStepName={dashedStepName}\n />\n )}\n </StepFrame>\n );\n};\n\nexport { SingleSignOnComponent };\n","import { type VerificationService } from \"../../lib/types/types\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { SingleSignOnComponent, type SingleSignOnMessages } from \"../SingleSignOnComponent\";\n\ninterface StepSSOProps {\n verificationService: VerificationService;\n}\n\nexport const ssoMessages: SingleSignOnMessages = {\n title: \"step.sso.title\",\n subtitle: \"step.sso.subtitle\",\n login: \"step.sso.login\",\n cancel: \"step.sso.cancel\",\n subtitle2: \"step.sso.subtitle2\",\n};\n\nconst StepSSOComponent = ({ verificationService }: StepSSOProps) => {\n return (\n <SingleSignOnComponent\n verificationService={verificationService}\n stepName={VerificationStepsEnum.sso}\n messages={ssoMessages}\n />\n );\n};\nexport { StepSSOComponent };\n","import type React from \"react\";\n\nimport Message from \"@components/Message\";\n\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\nexport const ReviewPendingComponent: React.FC = () => (\n <>\n <StepHeader titleId=\"step.pending.titleReview\" />\n <div className=\"flex flex-col gap-5 text-center\">\n <p>\n <Message id=\"step.pending.uploadedDocument\" />\n </p>\n <p>\n <Message id=\"step.pending.turnaroundTime\" />\n </p>\n <p>\n <Message id=\"step.pending.subtitle2\" />\n </p>\n <p>\n <Message id=\"step.pending.subtitle3\" />\n </p>\n </div>\n </>\n);\n","import type React from \"react\";\n\nimport Message from \"@components/Message\";\n\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\nexport const IDCheckLoopPendingComponent: React.FC = () => (\n <>\n <StepHeader titleId=\"step.pending.idCheckLoop.title\" />\n <div className=\"flex flex-col gap-5 text-center\">\n <p>\n <Message id=\"step.pending.idCheckLoop.subtitle\" />\n </p>\n <strong>\n <Message id=\"step.pending.idCheckLoop.subtitle2\" />\n </strong>\n </div>\n </>\n);\n","import { StepFrame } from \"@jslib/ui/components/step-frame\";\n\nimport Message from \"@/components/Message\";\n\nimport { type VerificationService, type ThirdPartyLoopResponse } from \"../../lib/types/types\";\nimport { ThirdPartyLoopProvider, VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n ButtonType,\n SingleSignOnComponent,\n type SingleSignOnMessages,\n} from \"../SingleSignOnComponent\";\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\ninterface StepThirdPartyLoopProps {\n verificationService: VerificationService;\n}\n\nexport const thirdPartyLoopMessageMap: {\n [key in ThirdPartyLoopProvider]: SingleSignOnMessages;\n} = {\n [ThirdPartyLoopProvider.SIGNZY]: {\n title: \"step.thirdPartyLoop.signzy.title\",\n subtitle: \"step.thirdPartyLoop.signzy.subtitle\",\n login: \"step.thirdPartyLoop.signzy.login\",\n cancel: \"step.thirdPartyLoop.signzy.cancel\",\n },\n};\n\nexport const ThirdPartyLoopError = () => (\n <>\n <StepHeader titleId=\"error\" />\n <p className=\"text-center\">\n <Message id=\"step.thirdPartyLoop.error\" />\n </p>\n </>\n);\n\nconst StepThirdPartyLoopComponent = ({ verificationService }: StepThirdPartyLoopProps) => {\n const verificationResponse = verificationService.verificationResponse as ThirdPartyLoopResponse;\n const messages =\n thirdPartyLoopMessageMap[verificationResponse.thirdPartyLoopProvider] || undefined;\n\n if (!messages) {\n return (\n <StepFrame id=\"sid-step-third-party-loop\">\n <ThirdPartyLoopError />\n </StepFrame>\n );\n }\n\n return (\n <SingleSignOnComponent\n verificationService={verificationService}\n stepName={VerificationStepsEnum.thirdPartyLoop}\n messages={messages}\n cancelButtonType={ButtonType.SECONDARY}\n />\n );\n};\n\nexport { StepThirdPartyLoopComponent };\n","import {\n ThirdPartyLoopError,\n thirdPartyLoopMessageMap,\n} from \"../StepThirdPartyLoop/StepThirdPartyLoopComponent\";\nimport { type ThirdPartyLoopProvider } from \"../../lib/types/runtimeTypes\";\nimport { getQueryOrOption } from \"../../lib/ServerApi/TestingRouteOverrides\";\nimport { type ThirdPartyLoopResponse } from \"../../lib/types/types\";\nimport { QUERY_STRING_THIRD_PARTY_PROVIDER_OVERRIDE } from \"../../constants\";\nimport { ButtonType } from \"../SingleSignOnComponent\";\n\nimport { SSOPendingContent } from \"./SSOPendingContent\";\n\ninterface ThirdPartyLoopPendingProps {\n cancelThirdPartyLoop: () => void;\n verificationLastResponse: ThirdPartyLoopResponse;\n isMockingPreviousStepThirdPartyLoop: boolean;\n}\n\nconst ThirdPartyLoopPending = ({\n verificationLastResponse,\n cancelThirdPartyLoop,\n isMockingPreviousStepThirdPartyLoop,\n}: ThirdPartyLoopPendingProps) => {\n const thirdPartyLoopProvider = isMockingPreviousStepThirdPartyLoop\n ? (getQueryOrOption(QUERY_STRING_THIRD_PARTY_PROVIDER_OVERRIDE) as ThirdPartyLoopProvider)\n : verificationLastResponse?.thirdPartyLoopProvider;\n\n const thirdPartyLoopMessages = thirdPartyLoopMessageMap[thirdPartyLoopProvider] || undefined;\n\n if (!thirdPartyLoopMessages) {\n return <ThirdPartyLoopError />;\n }\n\n return (\n <SSOPendingContent\n messages={thirdPartyLoopMessages}\n cancelSingleSignOn={cancelThirdPartyLoop}\n cancelButtonType={ButtonType.SECONDARY}\n />\n );\n};\n\nexport const ThirdPartyLoopPendingComponent = ThirdPartyLoopPending;\n","import React from \"react\";\nimport { produce } from \"immer\";\n\nimport { StepFrame } from \"@jslib/ui/components/step-frame\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport {\n type VerificationService,\n type StudentPersonalInfoViewModel,\n type ThirdPartyLoopResponse,\n} from \"../../lib/types/types\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { closeTabRef } from \"../../lib/refs/refs\";\nimport { PoweredByComponent } from \"../PoweredBy/PoweredByComponent\";\nimport { useSubmissionOptInMetadata } from \"../FormFooter/useSubmissionOptInMetadata\";\nimport { usePollingInterval } from \"../../lib/utils/usePollingInterval/usePollingInterval\";\nimport {\n getPreviousStepOverride,\n getRouteOverride,\n} from \"../../lib/ServerApi/TestingRouteOverrides\";\n\nimport { ssoMessages } from \"../StepSSO/StepSSOComponent\";\n\nimport { ReviewPendingComponent } from \"./ReviewPendingComponent\";\nimport { IDCheckLoopPendingComponent } from \"./IDCheckLoopPendingComponent\";\nimport { ThirdPartyLoopPendingComponent } from \"./ThirdPartyLoopPendingComponent\";\nimport { SSOPendingContent } from \"./SSOPendingContent\";\n\n// Poll fast (5s) for the first 20s after doc upload to catch quick verifications,\n// then back off to 20s. Matches the historic cadence that the removed countdown\n// implicitly produced (5s during the visible countdown, 20s after).\nconst DOC_UPLOAD_FAST_POLL_DURATION = 5000;\nconst DOC_UPLOAD_FAST_POLL_WINDOW = 20000;\nconst DOC_UPLOAD_POLL_DURATION = 20000;\nconst SINGLE_SIGN_ON_POLL_DURATION = 2000;\n\ninterface StepPendingProps {\n verificationService: VerificationService;\n}\n\nexport const StepPendingComponent = ({ verificationService }: StepPendingProps) => {\n const { programId } = verificationService;\n const { viewModel } = verificationService;\n const previousViewModel =\n (verificationService.previousViewModel as StudentPersonalInfoViewModel) || undefined;\n const verificationLastResponse =\n verificationService.verificationResponse.lastResponse ||\n verificationService.previousVerificationResponse ||\n undefined;\n const { verificationId } = verificationService.verificationResponse;\n const isMockingStep = getRouteOverride();\n const isMockingPreviousStepSSO =\n getPreviousStepOverride() && getPreviousStepOverride() === VerificationStepsEnum.sso;\n const isMockingPreviousStepThirdPartyLoop =\n getPreviousStepOverride() && getPreviousStepOverride() === VerificationStepsEnum.thirdPartyLoop;\n const isMockingPreviousStepIdCheckLoop =\n getPreviousStepOverride() && getPreviousStepOverride() === VerificationStepsEnum.idCheckLoop;\n const footerTextRef = useSubmissionOptInMetadata();\n\n const isPreviousStepSSO = (): boolean =>\n verificationLastResponse?.currentStep === VerificationStepsEnum.sso;\n\n const isPreviousStepThirdPartyLoop = (): boolean =>\n verificationLastResponse?.currentStep === VerificationStepsEnum.thirdPartyLoop;\n\n const isPreviousStepIdCheckLoop = (): boolean =>\n verificationLastResponse?.currentStep === VerificationStepsEnum.idCheckLoop;\n\n const isSsoOrThirdPartyLoopPath =\n isPreviousStepSSO() ||\n isPreviousStepThirdPartyLoop() ||\n isMockingPreviousStepSSO ||\n isMockingPreviousStepThirdPartyLoop;\n const isIdCheckLoopPath = isPreviousStepIdCheckLoop() || isMockingPreviousStepIdCheckLoop;\n const isDocUploadPath = !isSsoOrThirdPartyLoopPath && !isIdCheckLoopPath;\n\n const [pollTime, setPollTime] = React.useState<number>(() => {\n if (isSsoOrThirdPartyLoopPath) return SINGLE_SIGN_ON_POLL_DURATION;\n if (isIdCheckLoopPath) return DOC_UPLOAD_POLL_DURATION;\n return DOC_UPLOAD_FAST_POLL_DURATION;\n });\n\n React.useEffect(() => {\n if (!isDocUploadPath) return undefined;\n const timeoutId = setTimeout(\n () => setPollTime(DOC_UPLOAD_POLL_DURATION),\n DOC_UPLOAD_FAST_POLL_WINDOW,\n );\n return () => clearTimeout(timeoutId);\n }, [isDocUploadPath]);\n\n const stopPollingInterval =\n !isMockingStep &&\n usePollingInterval(() => {\n verificationService.fetchExistingVerificationRequest(\n programId,\n verificationId,\n verificationLastResponse,\n previousViewModel,\n false,\n );\n }, pollTime);\n\n const cancelSingleSignOnStep = (\n step: VerificationStepsEnum.thirdPartyLoop | VerificationStepsEnum.sso,\n ) => {\n const nextState = produce(viewModel, () => {});\n logger.info(\"StepSingleSignOnComponent submitting cancel request, step:\", step);\n stopPollingInterval();\n\n closeTabRef();\n verificationService.submitStep(step, nextState, verificationLastResponse);\n };\n\n const getPendingContent = () => {\n const showSSO = isPreviousStepSSO() || isMockingPreviousStepSSO;\n const showThirdPartyLoop =\n isPreviousStepThirdPartyLoop() || isMockingPreviousStepThirdPartyLoop;\n const showIdCheckLoop = isPreviousStepIdCheckLoop() || isMockingPreviousStepIdCheckLoop;\n\n if (showSSO) {\n return (\n <SSOPendingContent\n messages={ssoMessages}\n cancelSingleSignOn={() => cancelSingleSignOnStep(VerificationStepsEnum.sso)}\n />\n );\n }\n\n if (showThirdPartyLoop) {\n return (\n <ThirdPartyLoopPendingComponent\n cancelThirdPartyLoop={() => cancelSingleSignOnStep(VerificationStepsEnum.thirdPartyLoop)}\n verificationLastResponse={verificationLastResponse as ThirdPartyLoopResponse}\n isMockingPreviousStepThirdPartyLoop={isMockingPreviousStepThirdPartyLoop}\n />\n );\n }\n\n if (showIdCheckLoop) {\n return <IDCheckLoopPendingComponent />;\n }\n\n return <ReviewPendingComponent />;\n };\n\n return (\n <StepFrame\n id=\"sid-step-pending\"\n // The footer is empty here, with no shield or text, but still rendered so its ref can record\n // submissionOptIn.\n footerContent={isIdCheckLoopPath ? <PoweredByComponent /> : <></>}\n footerTextRef={isIdCheckLoopPath ? undefined : footerTextRef}\n >\n {getPendingContent()}\n </StepFrame>\n );\n};\n","import React from \"react\";\n\nimport { Button } from \"@jslib/ui/components/button\";\n\nimport { getSafe } from \"@jslib/shared/utils/getSafe\";\n\nimport Message from \"@components/Message\";\n\nimport { type Segment } from \"@/lib/types/types\";\nimport { useAppDispatch, useProgramId, useVerificationResponse } from \"@/lib/state/contextHooks\";\nimport {\n createFetchNewVerificationRequest,\n createResetState,\n} from \"@/lib/VerificationService/VerificationServiceActions\";\n\nconst TryAgainButtonComponent = () => {\n const dispatch = useAppDispatch();\n const programId = useProgramId();\n const verificationResponse = useVerificationResponse();\n const currentSegment = getSafe<Segment>(() => verificationResponse.segment);\n\n const tryAgainHandler = React.useCallback(() => {\n // If the program is embedded in an iframe (i.e. not directly embedded on a site),\n // we can simply reload the page to get proper state resetting (Ticket: NEXUS-135)\n if (window.self !== window.top) {\n const url = new URL(window.location.href);\n url.searchParams.delete(\"verificationId\");\n window.location.replace(url);\n return;\n }\n\n (async () => {\n const trackingId = undefined;\n const forceNewVerificationRequest = true;\n createResetState(dispatch)();\n await createFetchNewVerificationRequest(dispatch)(\n programId,\n currentSegment,\n undefined,\n trackingId,\n forceNewVerificationRequest,\n );\n })();\n }, [dispatch, programId, currentSegment]);\n\n return (\n <Button variant=\"light\" onClick={tryAgainHandler}>\n <Message id=\"tryAgain\" />\n </Button>\n );\n};\n\nexport { TryAgainButtonComponent };\n","import type React from \"react\";\n\nimport { buttonVariants } from \"@jslib/ui/components/button\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport Message from \"@components/Message\";\n\nimport { useProgramConfiguration } from \"@/lib/state/contextHooks\";\nimport { isValidHttpUrl } from \"@/lib/utils/routing/Url\";\n\nimport { TryAgainButtonComponent } from \"./TryAgainButtonComponent\";\nimport { LinkExternal } from \"./LinkExternal\";\n\ninterface Props {\n /** `false` hides a `RESET` button, for errors that resetting the form can't fix. */\n allowReset?: boolean;\n}\n\n/**\n * The Try Again button, driven by the program configuration's `tryAgainButton`. Hidden unless its mode is\n * `RESET` or `REDIRECT`.\n */\nexport const ConfiguredTryAgainAction: React.FC<Props> = ({ allowReset = true }) => {\n const tryAgainButton = useProgramConfiguration()?.tryAgainButton;\n\n switch (tryAgainButton?.mode) {\n case \"RESET\":\n return allowReset ? <TryAgainButtonComponent /> : null;\n case \"REDIRECT\":\n if (!isValidHttpUrl(tryAgainButton.url)) {\n logger.error(\"Invalid tryAgainButton redirect url - must be an absolute http(s) URL.\");\n return null;\n }\n return (\n <LinkExternal\n className={buttonVariants({ variant: \"light\" })}\n href={tryAgainButton.url}\n target=\"_top\"\n >\n <Message id=\"tryAgain\" />\n </LinkExternal>\n );\n default:\n return null;\n }\n};\n","import type React from \"react\";\n\nimport { Button, buttonVariants } from \"@jslib/ui/components/button\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport Message from \"@components/Message\";\n\nimport { getOption } from \"../options/options\";\nimport { speakToOuterFrame } from \"../lib/frames/frameMessages\";\nimport { useVerificationResponse } from \"../lib/state/contextHooks\";\nimport { isValidHttpUrl } from \"../lib/utils/routing/Url\";\n\nimport { TryAgainButtonComponent } from \"./TryAgainButtonComponent\";\nimport { LinkExternal } from \"./LinkExternal\";\n\nexport const TryAgainActionType = {\n NONE: \"none\",\n RESET: \"reset\",\n POSTMESSAGE: \"postMessage\",\n REDIRECT: \"redirect\",\n} as const;\n\nconst PostMessageButton = () => {\n // @TODO - Add debounce to prevent double click triggering the postMesssage twice\n const verificationResponse = useVerificationResponse();\n\n const onClickHandler = () =>\n speakToOuterFrame({\n action: \"tryAgain\",\n verificationResponse,\n });\n\n return (\n <Button variant=\"light\" onClick={onClickHandler}>\n <Message id=\"tryAgain\" />\n </Button>\n );\n};\n\nconst RedirectButton = ({ redirectUrl, target = \"_blank\" }) => (\n <LinkExternal\n className={buttonVariants({ variant: \"primary\" })}\n target={target}\n href={redirectUrl.toString()}\n >\n <Message id=\"seeOtherOffers\" />\n </LinkExternal>\n);\n\ntype AssertValidTryAgainAction = (action: unknown) => asserts action is TryAgainAction;\nconst assertValidTryAgainAction: AssertValidTryAgainAction = (action: unknown) => {\n if (\n !(\n typeof action === \"object\" &&\n \"type\" in action &&\n Object.values(TryAgainActionType).includes(\n action.type as (typeof TryAgainActionType)[keyof typeof TryAgainActionType],\n )\n )\n )\n throw new RangeError(\"Invalid tryAgainAction option type - using default TryAgainButton.\");\n\n return undefined;\n};\n\ninterface Props {\n /** `false` hides a `reset` action, for errors that resetting the form can't fix. */\n allowReset?: boolean;\n}\n\n/**\n * The Try Again button, driven by the deprecated `tryAgainAction` option. Delete it with the option once\n * `ConfiguredTryAgainAction` drives every program.\n */\nexport const LegacyTryAgainAction: React.FC<Props> = ({ allowReset = true }) => {\n const action = getOption(\"tryAgainAction\");\n if (!allowReset && action?.type === TryAgainActionType.RESET) return null;\n try {\n assertValidTryAgainAction(action);\n\n switch (action.type) {\n case TryAgainActionType.NONE:\n return null;\n case TryAgainActionType.POSTMESSAGE:\n if (window.self === window.top) {\n logger.error(\n `Invalid tryAgainAction option type \"${action.type}\" - page must be embedded in an iframe.`,\n );\n return null;\n }\n return <PostMessageButton />;\n case TryAgainActionType.REDIRECT:\n if (!isValidHttpUrl(action.url))\n throw new RangeError(\n \"Invalid tryAgainAction redirect url - must be an absolute http(s) URL. Using default TryAgainButton.\",\n );\n return <RedirectButton redirectUrl={action.url} target={action.target} />;\n case TryAgainActionType.RESET:\n return <TryAgainButtonComponent />;\n default:\n throw new RangeError(\"Invalid tryAgainAction option type - using default TryAgainButton.\");\n }\n } catch (e: any) {\n logger.error(e.message);\n return <TryAgainButtonComponent />;\n }\n};\n\nexport type TryAgainNoneAction = { type: typeof TryAgainActionType.NONE };\nexport type TryAgainResetAction = { type: typeof TryAgainActionType.RESET };\nexport type TryAgainPostMessageAction = { type: typeof TryAgainActionType.POSTMESSAGE };\nexport type TryAgainRedirectAction = {\n type: typeof TryAgainActionType.REDIRECT;\n target?: string;\n url: URL;\n};\n\nexport type TryAgainAction =\n | TryAgainNoneAction\n | TryAgainResetAction\n | TryAgainPostMessageAction\n | TryAgainRedirectAction;\n","import type React from \"react\";\n\nimport { useFlag } from \"./FeatureFlags/hooks\";\nimport { ConfiguredTryAgainAction } from \"./ConfiguredTryAgainAction\";\nimport { LegacyTryAgainAction } from \"./LegacyTryAgainAction\";\n\ninterface Props {\n /** `false` hides a reset button, for errors that resetting the form can't fix. */\n allowReset?: boolean;\n}\n\n/**\n * The error step's Try Again button. While `hc-my-sheer-id-theme-builder` is on, the program configuration's\n * `tryAgainButton` drives it and the `tryAgainAction` option is ignored; otherwise the option drives it.\n */\nexport const TryAgainActionComponent: React.FC<Props> = ({ allowReset = true }) =>\n useFlag(\"hc-my-sheer-id-theme-builder\") === true ? (\n <ConfiguredTryAgainAction allowReset={allowReset} />\n ) : (\n <LegacyTryAgainAction allowReset={allowReset} />\n );\n","import { buttonVariants } from \"@jslib/ui/components/button\";\nimport { StepFrame } from \"@jslib/ui/components/step-frame\";\n\nimport Message from \"@components/Message\";\nimport { PoweredByComponent } from \"@components/PoweredBy/PoweredByComponent\";\nimport { LinkExternal } from \"@components/LinkExternal\";\nimport { StepHeader } from \"@components/StepHeader/StepHeader\";\nimport { TryAgainActionComponent } from \"@components/TryAgainAction\";\n\nimport {\n type VerificationService,\n type ErrorId,\n type ErrorResponse,\n type ErrorDetailId,\n} from \"@/lib/types/types\";\nimport { VerificationStepsEnum } from \"@/lib/types/runtimeTypes\";\nimport { recordEvent } from \"@/lib/GoogleAnalytics/ga\";\nimport { type MessageId } from \"@/lib/intl/types\";\nimport { isValidHttpUrl } from \"@/lib/utils/routing/Url\";\nimport { useProgramBranding, useProgramMessages } from \"@/lib/state/contextHooks\";\nimport { getBrandFaqUrl } from \"@/lib/ProgramTheme/programThemeGetters\";\n\ninterface StepErrorProps {\n verificationService: VerificationService;\n errorId?: ErrorId;\n}\n\n// Error IDs for which we surface the \"contact support\" message above the action\n// button and hide the \"Get help\" link in the footer. Add or remove IDs here.\nconst CONTACT_SUPPORT_ERROR_IDS: ErrorId[] = [\n \"docReviewLimitExceeded\",\n \"verificationLimitExceeded\",\n \"fraudRulesReject\",\n];\n\n/** The errorId's own title when the program has one, else the generic error title. */\nconst useErrorTitleId = (errorIds: ErrorId[]): MessageId => {\n const messages = useProgramMessages();\n const firstErrorId = errorIds[0];\n\n return messages?.[`step.error.errorId.${firstErrorId}.title`]\n ? `step.error.errorId.${firstErrorId}.title`\n : \"step.error.title\";\n};\n\nconst ErrorMsg = ({\n errorIds,\n errorDetailId,\n}: {\n errorIds: ErrorId[];\n errorDetailId: ErrorDetailId;\n}) => {\n const displayErrorMessageIds = new Map();\n if (errorDetailId) {\n displayErrorMessageIds.set(errorDetailId, `errorDetailId.${errorDetailId}`);\n } else {\n errorIds?.forEach((errId) => displayErrorMessageIds.set(errId, `errorId.${errId}`));\n }\n\n if (displayErrorMessageIds.size > 0) {\n return (\n <p className=\"text-center\">\n {Array.from(displayErrorMessageIds).map(([errId, errMsgId]) => (\n <Message key={errMsgId} id={errMsgId} />\n ))}\n </p>\n );\n }\n\n return null;\n};\n\n/**\n * Supplementary guidance for an error, shown muted beneath the main error message.\n * Rendered only for errorIds that define a `step.error.errorId.<errorId>.note` message.\n */\nconst ErrorNote = ({ errorIds }: { errorIds: ErrorId[] }) => {\n const messages = useProgramMessages();\n const noteMessageId: MessageId = `step.error.errorId.${errorIds[0]}.note`;\n if (!messages?.[noteMessageId]) return null;\n\n return (\n <p className=\"text-center text-sm text-muted-foreground\">\n <Message id={noteMessageId} />\n </p>\n );\n};\n\nconst ErrorButton = ({\n verificationService,\n errorIds,\n redirectUrl,\n}: {\n verificationService: VerificationService;\n errorIds: ErrorId[];\n redirectUrl?: string;\n}) => {\n const messages = useProgramMessages();\n const branding = useProgramBranding();\n if (errorIds.includes(\"unauthorizedAccountStatus\")) {\n const faqUrl = getBrandFaqUrl(verificationService.programTheme, branding);\n if (!faqUrl) return null;\n return (\n <LinkExternal\n className={buttonVariants({ variant: \"light\" })}\n href={faqUrl}\n onClick={() => recordEvent(VerificationStepsEnum.error, faqUrl)}\n >\n <Message id=\"step.error.errorId.unauthorizedAccountStatus.buttonText\" />\n </LinkExternal>\n );\n }\n\n if (errorIds.includes(\"verificationLimitExceeded\")) return null;\n\n if (\n errorIds.includes(\"missingRequiredMetadata\") ||\n errorIds.includes(\"missingRequiredExternalId\")\n ) {\n // Resetting the form can't supply the missing metadata or external ID\n return <TryAgainActionComponent allowReset={false} />;\n }\n\n const firstErrorId = errorIds[0];\n // A redirectUrl with any scheme other than http(s) is treated as absent so it is never linked to\n if (messages?.[`step.error.errorId.${firstErrorId}.buttonText`] && isValidHttpUrl(redirectUrl)) {\n return (\n <LinkExternal\n className={buttonVariants({ variant: \"light\" })}\n href={redirectUrl}\n onClick={() => recordEvent(VerificationStepsEnum.error, redirectUrl)}\n >\n <Message id={`step.error.errorId.${firstErrorId}.buttonText`} />\n </LinkExternal>\n );\n }\n\n return <TryAgainActionComponent />;\n};\n\nexport const StepErrorComponent = ({ verificationService, errorId }: StepErrorProps) => {\n const verificationResponse = verificationService.verificationResponse as ErrorResponse;\n const { errorIds: responseErrorIds, redirectUrl, errorDetailId } = verificationResponse;\n\n const errorIdsSet = new Set<ErrorId>();\n if (errorId) errorIdsSet.add(errorId);\n if (Array.isArray(responseErrorIds)) responseErrorIds.forEach((errId) => errorIdsSet.add(errId));\n const errorIds = Array.from(errorIdsSet);\n const titleId = useErrorTitleId(errorIds);\n\n const showContactSupport = errorIds.some((errId) => CONTACT_SUPPORT_ERROR_IDS.includes(errId));\n\n return (\n <StepFrame\n id=\"sid-step-error\"\n footerContent={<PoweredByComponent hideFaqLink={showContactSupport} />}\n >\n <StepHeader titleId={titleId} />\n <div className=\"flex flex-col gap-5\">\n <ErrorMsg errorIds={errorIds} errorDetailId={errorDetailId} />\n <ErrorNote errorIds={errorIds} />\n {showContactSupport && (\n <p className=\"text-center\">\n <Message id=\"contactSupport\" />\n </p>\n )}\n </div>\n <div className=\"flex justify-center\">\n <ErrorButton\n verificationService={verificationService}\n errorIds={errorIds}\n redirectUrl={redirectUrl}\n />\n </div>\n </StepFrame>\n );\n};\n","import React, { type ComponentType, type ReactNode, Suspense, useEffect } from \"react\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport { type VerificationStep, type VerificationService } from \"../lib/types/types\";\nimport { CustomMetricNames, EventName, recordGaEvent } from \"../lib/GoogleAnalytics/ga\";\n\nimport { LoadingScreenComponent } from \"./LoadingScreen/LoadingScreenComponent\";\n\n// These should _not_ be lazy loaded\n// Either they should be immediately available (e.g. loading screen)\n// or they are very frequently used, so much so that we want to avoid\n// an extra round-trip to load them\nimport StepPendingComponent from \"./StepPending/index\";\nimport StepErrorComponent from \"./StepError\";\n\nconst defaultComponents = {\n StepPendingComponent,\n StepErrorComponent,\n StepStudentPersonalInfoComponent: React.lazy(() => import(\"./StepStudentPersonalInfo\")),\n StepOverrideComponent: React.lazy(() => import(\"./StepOverrideComponent\")),\n StepAgePersonalInfoComponent: React.lazy(() => import(\"./StepAgePersonalInfo\")),\n StepSeniorPersonalInfoComponent: React.lazy(() => import(\"./StepAgePersonalInfo\")),\n StepCollectMilitaryPersonalInfoComponent: React.lazy(\n () => import(\"./StepMilitaryPersonalInfo/StepCollectMilitaryPersonalInfoComponent\"),\n ),\n // Aliases — same component as StepCollectMilitaryPersonalInfoComponent.\n StepCollectMilitaryStatusComponent: React.lazy(\n () => import(\"./StepMilitaryPersonalInfo/StepCollectMilitaryPersonalInfoComponent\"),\n ),\n StepActiveMilitaryPersonalInfoComponent: React.lazy(\n () => import(\"./StepMilitaryPersonalInfo/StepCollectMilitaryPersonalInfoComponent\"),\n ),\n StepInactiveMilitaryPersonalInfoComponent: React.lazy(\n () => import(\"./StepMilitaryPersonalInfo/StepCollectMilitaryPersonalInfoComponent\"),\n ),\n StepDriverLicensePersonalInfoComponent: React.lazy(\n () => import(\"./StepIdentityPersonalInfo/StepDriverLicensePersonalInfoComponent\"),\n ),\n StepEmploymentPersonalInfoComponent: React.lazy(() => import(\"./StepEmploymentPersonalInfo\")),\n StepFirstResponderPersonalInfoComponent: React.lazy(\n () => import(\"./StepFirstResponderPersonalInfo/index\"),\n ),\n StepGeneralIdentityPersonalInfoComponent: React.lazy(\n () => import(\"./StepIdentityPersonalInfo/StepGeneralIdentityPersonalInfoComponent\"),\n ),\n StepHybridIdentityPersonalInfoComponent: React.lazy(\n () => import(\"./StepIdentityPersonalInfo/StepHybridIdentityPersonalInfoComponent\"),\n ),\n StepIDCheckLoopComponent: React.lazy(() => import(\"./StepIDCheckLoop\")),\n StepLicensedProfessionalPersonalInfoComponent: React.lazy(\n () => import(\"./StepLicensedProfessionalPersonalInfo/index\"),\n ),\n StepLowIncomePersonalInfoComponent: React.lazy(() => import(\"./StepLowIncomePersonalInfo\")),\n StepMedicalProfessionalPersonalInfoComponent: React.lazy(\n () => import(\"./StepMedicalProfessionalPersonalInfo\"),\n ),\n StepMemberPersonalInfoComponent: React.lazy(() => import(\"./StepMemberPersonalInfo\")),\n StepConsolationComponent: React.lazy(() => import(\"./StepConsolation\")),\n StepDocUploadComponent: React.lazy(() => import(\"./StepDocUpload\")),\n StepEmailLoopComponent: React.lazy(() => import(\"./StepEmailLoop\")),\n StepPendingEmailLoopComponent: React.lazy(() => import(\"./StepEmailLoop/EmailLoopPending\")),\n StepMoverPersonalInfoComponent: React.lazy(() => import(\"./StepMoverPersonalInfo\")),\n StepSMSLoopComponent: React.lazy(() => import(\"./StepSMSLoop\")),\n StepSocialSecurity: React.lazy(() => import(\"./StepSocialSecurityNumber\")),\n StepSSOComponent: React.lazy(() => import(\"./StepSSO\")),\n StepSuccessComponent: React.lazy(() => import(\"./StepSuccess\")),\n StepTeacherPersonalInfoComponent: React.lazy(() => import(\"./StepTeacherPersonalInfo\")),\n StepCompleteAuthentication: React.lazy(() => import(\"./StepCompleteAuthentication/index\")),\n StepCollectIdentifierComponent: React.lazy(() => import(\"./StepCollectIdentifier\")),\n StepCollectPersonalInfo: React.lazy(() => import(\"./StepCollectPersonalInfo\")),\n StepThirdPartyLoopComponent: React.lazy(() => import(\"./StepThirdPartyLoop\")),\n} satisfies Record<string, ComponentType | ((props: unknown) => ReactNode)>;\n\nconst getComponent = (componentName: keyof typeof defaultComponents) => {\n logger.info(\"getComponent\", componentName);\n return defaultComponents[componentName];\n};\n\nconst getLoadingScreen = () => <LoadingScreenComponent />;\n\ninterface Props {\n stepToLoad: VerificationStep;\n verificationService: VerificationService;\n}\n\nconst LoadStepComponent = ({ stepToLoad, verificationService }: Props) => {\n logger.info(`LoadStepComponent: rendering step: ${stepToLoad}`);\n let Component;\n\n useEffect(() => {\n // see ObservePerformanceMetrics in ga.ts - we'll use LCP if we have it as\n // it's a better metric, but this gives us something in all browsers.\n try {\n performance.mark(CustomMetricNames.INITIAL_STEP_LOAD);\n } catch {\n // jsdom doesn't have `performance` as such tests fall over.\n }\n }, []);\n\n // To allow for a ratio of form_seen:form_submitted events. Help track system & program health.\n React.useEffect(() => {\n // don't spam offsite logging\n if ([\"pending\", \"error\"].includes(stepToLoad)) {\n return;\n }\n try {\n // if this happens repeatedly, the last mark will be used when .measure() is called:\n performance.mark(EventName.STEP_SEEN);\n\n // if this happens repeatedly remember you can group by verificationId in BI queries:\n recordGaEvent({\n eventName: EventName.STEP_SEEN,\n params: {\n step: stepToLoad,\n },\n });\n } catch (e) {\n logger.error(e);\n }\n }, [stepToLoad]);\n\n switch (stepToLoad) {\n case \"collectPersonalInfo\":\n Component = getComponent(\"StepCollectPersonalInfo\");\n break;\n case \"collectStudentPersonalInfo\":\n Component = getComponent(\"StepStudentPersonalInfoComponent\");\n break;\n case \"collectSeniorPersonalInfo\":\n Component = getComponent(\"StepSeniorPersonalInfoComponent\");\n break;\n case \"collectAgePersonalInfo\":\n Component = getComponent(\"StepAgePersonalInfoComponent\");\n break;\n case \"collectTeacherPersonalInfo\":\n Component = getComponent(\"StepTeacherPersonalInfoComponent\");\n break;\n case \"collectMemberPersonalInfo\":\n Component = getComponent(\"StepMemberPersonalInfoComponent\");\n break;\n case \"collectMilitaryStatus\":\n Component = getComponent(\"StepCollectMilitaryStatusComponent\");\n break;\n case \"collectActiveMilitaryPersonalInfo\":\n Component = getComponent(\"StepActiveMilitaryPersonalInfoComponent\");\n break;\n case \"collectInactiveMilitaryPersonalInfo\":\n Component = getComponent(\"StepInactiveMilitaryPersonalInfoComponent\");\n break;\n case \"collectMilitaryPersonalInfo\":\n Component = getComponent(\"StepCollectMilitaryPersonalInfoComponent\");\n break;\n case \"collectFirstResponderPersonalInfo\":\n Component = getComponent(\"StepFirstResponderPersonalInfoComponent\");\n break;\n case \"collectMedicalProfessionalPersonalInfo\":\n Component = getComponent(\"StepMedicalProfessionalPersonalInfoComponent\");\n break;\n case \"collectEmployeePersonalInfo\":\n Component = getComponent(\"StepEmploymentPersonalInfoComponent\");\n break;\n case \"collectDriverLicensePersonalInfo\":\n Component = getComponent(\"StepDriverLicensePersonalInfoComponent\");\n break;\n case \"collectGeneralIdentityPersonalInfo\":\n Component = getComponent(\"StepGeneralIdentityPersonalInfoComponent\");\n break;\n case \"collectHybridIdentityPersonalInfo\":\n Component = getComponent(\"StepHybridIdentityPersonalInfoComponent\");\n break;\n case \"collectLicensedProfessionalPersonalInfo\":\n Component = getComponent(\"StepLicensedProfessionalPersonalInfoComponent\");\n break;\n case \"collectMoverPersonalInfo\":\n Component = getComponent(\"StepMoverPersonalInfoComponent\");\n break;\n case \"collectLowIncomePersonalInfo\":\n Component = getComponent(\"StepLowIncomePersonalInfoComponent\");\n break;\n case \"collectSocialSecurityNumber\":\n Component = getComponent(\"StepSocialSecurity\");\n break;\n case \"success\":\n Component = getComponent(\"StepSuccessComponent\");\n break;\n case \"consolation\":\n Component = getComponent(\"StepConsolationComponent\");\n break;\n case \"override\":\n Component = getComponent(\"StepOverrideComponent\");\n break;\n case \"docUpload\":\n Component = getComponent(\"StepDocUploadComponent\");\n break;\n case \"pending\":\n Component = getComponent(\"StepPendingComponent\");\n break;\n case \"sso\":\n Component = getComponent(\"StepSSOComponent\");\n break;\n case \"thirdPartyLoop\":\n Component = getComponent(\"StepThirdPartyLoopComponent\");\n break;\n case \"smsLoop\":\n Component = getComponent(\"StepSMSLoopComponent\");\n break;\n case \"emailLoop\":\n Component = getComponent(\"StepEmailLoopComponent\");\n break;\n case \"idCheckLoop\":\n Component = getComponent(\"StepIDCheckLoopComponent\");\n break;\n case \"collectIdentifier\":\n Component = getComponent(\"StepCollectIdentifierComponent\");\n break;\n case \"completeAuthentication\":\n Component = getComponent(\"StepCompleteAuthentication\");\n break;\n case \"missingRequiredMetadata\":\n Component = getComponent(\"StepErrorComponent\");\n return (\n <Component verificationService={verificationService} errorId=\"missingRequiredMetadata\" />\n );\n case \"missingRequiredExternalId\":\n Component = getComponent(\"StepErrorComponent\");\n return (\n <Component verificationService={verificationService} errorId=\"missingRequiredExternalId\" />\n );\n // If explicitly trying to render the error component, such as when testing/styling\n case \"error\":\n Component = getComponent(\"StepErrorComponent\");\n break;\n case \"cancelDocUpload\":\n case \"cancelEmailLoop\":\n case \"cancelSocialSecurityNumber\":\n case \"docReviewLimitExceeded\":\n case \"emailLoopCollectOrganizationEmail\":\n // These steps are not loaded directly through this function. They exist\n // here so we get exhaustiveness type checking.\n logger.error(\"Attempted to load unexpected step\", stepToLoad);\n return <StepErrorComponent verificationService={verificationService} errorId=\"invalidStep\" />;\n default:\n // This 'satisfies never' ensures that all possible steps are handled.\n logger.error(\"Unable to load step\", stepToLoad satisfies never);\n return <StepErrorComponent verificationService={verificationService} errorId=\"invalidStep\" />;\n }\n\n return (\n <Suspense fallback={getLoadingScreen()}>\n <Component verificationService={verificationService} />\n </Suspense>\n );\n};\n\nexport { LoadStepComponent };\n","import React from \"react\";\n\ninterface CustomTextWrapperProps {\n dangerouslySetInnerHTML?: any;\n}\n\nconst CustomTextWrapper = ({ dangerouslySetInnerHTML, ...props }: CustomTextWrapperProps) =>\n dangerouslySetInnerHTML ? (\n <span dangerouslySetInnerHTML={dangerouslySetInnerHTML} {...props} />\n ) : (\n <React.Fragment {...props} />\n );\n\nexport { CustomTextWrapper };\n","import { TextLink } from \"@jslib/ui/components/text-link\";\n\nimport { type VerificationService } from \"../../lib/types/types\";\nimport { useProgramConfiguration } from \"../../lib/state/contextHooks\";\nimport { LinkExternal } from \"../LinkExternal\";\n\ninterface Props {\n verificationService: VerificationService;\n}\n\n// White on a fixed red, whatever the brand theme, so a test program can't be mistaken for a live one.\nconst TestModeFlagComponent = (_props: Props) => {\n const programConfiguration = useProgramConfiguration();\n return programConfiguration?.isTestMode ? (\n <div\n className=\"mx-auto max-w-form bg-[#e12046] p-2.5 text-center text-white uppercase\"\n role=\"note\"\n >\n Test Mode\n <LinkExternal\n as={TextLink}\n className=\"ps-1.25 text-white lowercase underline hover:text-white/80\"\n href=\"https://developer.sheerid.com/getting-started#test-program\"\n aria-label=\"learn more about a sheerid test mode program\"\n >\n (learn more)\n </LinkExternal>\n </div>\n ) : null;\n};\n\nexport { TestModeFlagComponent };\n","import { isMouseLikePointerType } from \"../utils/event.mjs\";\nexport { isTargetInsideEnabledTrigger as isInsideEnabledTrigger } from \"../utils/element.mjs\";\nfunction resolveValue(value, pointerType) {\n if (pointerType != null && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}\nexport function getDelay(value, prop, pointerType) {\n const result = resolveValue(value, pointerType);\n if (typeof result === 'number') {\n return result;\n }\n return result?.[prop];\n}\nexport function getRestMs(value) {\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}\nexport function isClickLikeOpenEvent(openEventType, interactedInside) {\n return interactedInside || openEventType === 'click' || openEventType === 'mousedown';\n}\nexport function isHoverOpenEvent(openEventType) {\n return openEventType?.includes('mouse') && openEventType !== 'mousedown';\n}","import { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { FloatingRootStore } from \"../../floating-ui-react/components/FloatingRootStore.mjs\";\n\n/**\n * State common to all popup stores.\n */\n\nexport function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {\n return {\n open: false,\n openProp: undefined,\n mounted: false,\n transitionStatus: undefined,\n floatingRootContext: new FloatingRootStore({\n open: false,\n transitionStatus: undefined,\n floatingElement: null,\n referenceElement: null,\n triggerElements,\n floatingId,\n syncOnly: true,\n nested,\n onOpenChange: undefined\n }),\n floatingId,\n triggerCount: 0,\n preventUnmountingOnClose: false,\n payload: undefined,\n activeTriggerId: null,\n activeTriggerElement: null,\n triggerIdProp: undefined,\n popupElement: null,\n positionerElement: null,\n activeTriggerProps: EMPTY_OBJECT,\n inactiveTriggerProps: EMPTY_OBJECT,\n popupProps: EMPTY_OBJECT\n };\n}\nconst activeTriggerIdSelector = state => state.triggerIdProp ?? state.activeTriggerId;\nconst openSelector = state => state.openProp ?? state.open;\nconst popupIdSelector = state => {\n const popupId = state.popupElement?.id ?? state.floatingId;\n return popupId || undefined;\n};\nfunction triggerOwnsOpenPopup(state, triggerId) {\n return triggerId !== undefined && openSelector(state) && activeTriggerIdSelector(state) === triggerId;\n}\nfunction triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {\n if (triggerOwnsOpenPopup(state, triggerId)) {\n return true;\n }\n return triggerId !== undefined && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;\n}\nexport const popupStoreSelectors = {\n open: openSelector,\n mounted: state => state.mounted,\n transitionStatus: state => state.transitionStatus,\n floatingRootContext: state => state.floatingRootContext,\n triggerCount: state => state.triggerCount,\n preventUnmountingOnClose: state => state.preventUnmountingOnClose,\n payload: state => state.payload,\n activeTriggerId: activeTriggerIdSelector,\n activeTriggerElement: state => state.mounted ? state.activeTriggerElement : null,\n popupId: popupIdSelector,\n /**\n * Whether the trigger with the given ID was used to open the popup.\n */\n isTriggerActive: (state, triggerId) => triggerId !== undefined && activeTriggerIdSelector(state) === triggerId,\n /**\n * Whether the popup is open and was activated by a trigger with the given ID.\n */\n isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),\n /**\n * Whether the popup is mounted and was activated by a trigger with the given ID.\n */\n isMountedByTrigger: (state, triggerId) => triggerId !== undefined && activeTriggerIdSelector(state) === triggerId && state.mounted,\n triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,\n /**\n * Popup id for the trigger that currently owns the open popup.\n */\n triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : undefined,\n popupProps: state => state.popupProps,\n popupElement: state => state.popupElement,\n positionerElement: state => state.positionerElement\n};\n\n/**\n * Store members a detached handle-backed trigger reads or invokes for trigger registration and data\n * forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a\n * detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to\n * be durable. Component handle-store views Pick these from their concrete store (preserving its\n * context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.\n */\n\n/**\n * The subset of a popup store that trigger registration and data forwarding rely on. Narrow enough\n * that an inert store can be passed while detached.\n */","'use client';\n\nimport * as React from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { NOOP } from '@base-ui/utils/empty';\n/**\n * Reads the store currently exposed by a popup handle and subscribes to store-pointer changes.\n * Detached triggers use this to follow a handle as a root attaches or detaches: while no root is\n * attached, the handle exposes its fallback store; once a root attaches, subscribers re-render and\n * read from the live root store.\n *\n * Returns `undefined` when no handle is provided so callers can fall back to their root context.\n *\n * @param handle The popup handle to read from, or `undefined` when the trigger is not handle-bound.\n */\nexport function usePopupHandleStore(handle) {\n const subscribe = React.useCallback(listener => {\n if (handle === undefined) {\n return NOOP;\n }\n return handle.subscribeStore(listener);\n }, [handle]);\n const getSnapshot = React.useCallback(() => {\n return handle === undefined ? undefined : handle.store;\n }, [handle]);\n return useSyncExternalStore(subscribe, getSnapshot, () => handle?.serverStore);\n}","'use client';\n\nimport { useOnMount } from '@base-ui/utils/useOnMount';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { Timeout } from '@base-ui/utils/useTimeout';\nimport { isInteractiveElement } from \"../utils.mjs\";\nexport { isInteractiveElement };\nexport class HoverInteraction {\n constructor() {\n this.pointerType = undefined;\n this.interactedInside = false;\n this.handler = undefined;\n this.blockMouseMove = true;\n this.performedPointerEventsMutation = false;\n this.pointerEventsScopeElement = null;\n this.pointerEventsReferenceElement = null;\n this.pointerEventsFloatingElement = null;\n this.restTimeoutPending = false;\n this.openChangeTimeout = new Timeout();\n this.restTimeout = new Timeout();\n this.handleCloseOptions = undefined;\n }\n static create() {\n return new HoverInteraction();\n }\n dispose = () => {\n this.openChangeTimeout.clear();\n this.restTimeout.clear();\n };\n disposeEffect = () => {\n return this.dispose;\n };\n}\nconst pointerEventsMutationOwnerByScopeElement = new WeakMap();\nexport function clearSafePolygonPointerEventsMutation(instance) {\n if (!instance.performedPointerEventsMutation) {\n return;\n }\n const scopeElement = instance.pointerEventsScopeElement;\n if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {\n instance.pointerEventsScopeElement?.style.removeProperty('pointer-events');\n instance.pointerEventsReferenceElement?.style.removeProperty('pointer-events');\n instance.pointerEventsFloatingElement?.style.removeProperty('pointer-events');\n pointerEventsMutationOwnerByScopeElement.delete(scopeElement);\n }\n instance.performedPointerEventsMutation = false;\n instance.pointerEventsScopeElement = null;\n instance.pointerEventsReferenceElement = null;\n instance.pointerEventsFloatingElement = null;\n}\nexport function applySafePolygonPointerEventsMutation(instance, options) {\n const {\n scopeElement,\n referenceElement,\n floatingElement\n } = options;\n const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);\n if (existingOwner && existingOwner !== instance) {\n clearSafePolygonPointerEventsMutation(existingOwner);\n }\n clearSafePolygonPointerEventsMutation(instance);\n instance.performedPointerEventsMutation = true;\n instance.pointerEventsScopeElement = scopeElement;\n instance.pointerEventsReferenceElement = referenceElement;\n instance.pointerEventsFloatingElement = floatingElement;\n pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);\n scopeElement.style.pointerEvents = 'none';\n referenceElement.style.pointerEvents = 'auto';\n floatingElement.style.pointerEvents = 'auto';\n}\nexport function useHoverInteractionSharedState(store) {\n const data = store.context.dataRef.current;\n const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;\n if (!data.hoverInteractionState) {\n data.hoverInteractionState = instance;\n }\n useOnMount(data.hoverInteractionState.disposeEffect);\n return data.hoverInteractionState;\n}","'use client';\n\nimport * as React from 'react';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { contains, getTarget } from \"../utils/element.mjs\";\nimport { getNodeChildren } from \"../utils/nodes.mjs\";\nimport { applySafePolygonPointerEventsMutation, clearSafePolygonPointerEventsMutation, isInteractiveElement, useHoverInteractionSharedState } from \"./useHoverInteractionSharedState.mjs\";\nimport { getDelay, isClickLikeOpenEvent as isClickLikeOpenEventShared, isHoverOpenEvent, isInsideEnabledTrigger } from \"./useHoverShared.mjs\";\n/**\n * Provides hover interactions that should be attached to the floating element.\n */\nexport function useHoverFloatingInteraction(context, parameters = {}) {\n const {\n enabled = true,\n closeDelay: closeDelayProp = 0,\n nodeId: nodeIdProp\n } = parameters;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const {\n dataRef\n } = store.context;\n const tree = useFloatingTree();\n const parentId = useFloatingParentNodeId();\n const instance = useHoverInteractionSharedState(store);\n const childClosedTimeout = useTimeout();\n const isClickLikeOpenEvent = useStableCallback(() => {\n return isClickLikeOpenEventShared(dataRef.current.openEvent?.type, instance.interactedInside);\n });\n const isHoverOpen = useStableCallback(() => {\n return isHoverOpenEvent(dataRef.current.openEvent?.type);\n });\n const clearPointerEvents = useStableCallback(() => {\n clearSafePolygonPointerEventsMutation(instance);\n });\n useIsoLayoutEffect(() => {\n if (!open) {\n instance.pointerType = undefined;\n instance.restTimeoutPending = false;\n instance.interactedInside = false;\n clearPointerEvents();\n }\n }, [open, instance, clearPointerEvents]);\n React.useEffect(() => {\n return clearPointerEvents;\n }, [clearPointerEvents]);\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return undefined;\n }\n if (open && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {\n const ref = domReferenceElement;\n const floatingEl = floatingElement;\n const doc = ownerDocument(floatingElement);\n const parentFloating = tree?.nodesRef.current.find(node => node.id === parentId)?.context?.elements.floating;\n if (parentFloating) {\n parentFloating.style.pointerEvents = '';\n }\n\n // A keep-mounted submenu can appear in the tree before it opens, so a\n // cached scope or parent lookup may resolve to the submenu itself. That\n // would not shield sibling items in the parent menu.\n const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;\n const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;\n const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest('[data-rootownerid]') ?? doc.body;\n applySafePolygonPointerEventsMutation(instance, {\n scopeElement,\n referenceElement: ref,\n floatingElement: floatingEl\n });\n return () => {\n clearPointerEvents();\n };\n }\n return undefined;\n }, [enabled, open, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function hasParentChildren() {\n return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);\n }\n function closeWithDelay(event) {\n const closeDelay = getDelay(closeDelayProp, 'close', instance.pointerType);\n const close = () => {\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n tree?.events.emit('floating.closed', event);\n };\n if (closeDelay) {\n instance.openChangeTimeout.start(closeDelay, close);\n } else {\n instance.openChangeTimeout.clear();\n close();\n }\n }\n function handleInteractInside(event) {\n const target = getTarget(event);\n if (!isInteractiveElement(target)) {\n instance.interactedInside = false;\n return;\n }\n instance.interactedInside = target?.closest('[aria-haspopup]') != null;\n }\n function onFloatingMouseEnter() {\n instance.openChangeTimeout.clear();\n childClosedTimeout.clear();\n tree?.events.off('floating.closed', onNodeClosed);\n clearPointerEvents();\n }\n function onFloatingMouseLeave(event) {\n if (hasParentChildren() && tree) {\n tree.events.on('floating.closed', onNodeClosed);\n return;\n }\n if (isInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {\n // If the mouse is leaving the reference element to another trigger, don't explicitly close the popup\n // as it will be moved.\n return;\n }\n const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;\n const relatedTarget = event.relatedTarget;\n const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some(node => contains(node.context?.elements.floating, relatedTarget));\n if (isMovingIntoDescendantFloating) {\n return;\n }\n\n // If the safePolygon handler is active, let it handle the close logic.\n if (instance.handler) {\n instance.handler(event);\n return;\n }\n clearPointerEvents();\n if (isHoverOpen() && !isClickLikeOpenEvent()) {\n closeWithDelay(event);\n }\n }\n function onNodeClosed(event) {\n if (!tree || !parentId || hasParentChildren()) {\n return;\n }\n // Allow the mouseenter event to fire in case child was closed because mouse moved into parent.\n childClosedTimeout.start(0, () => {\n tree.events.off('floating.closed', onNodeClosed);\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n tree.events.emit('floating.closed', event);\n });\n }\n const floating = floatingElement;\n return mergeCleanups(floating && addEventListener(floating, 'mouseenter', onFloatingMouseEnter), floating && addEventListener(floating, 'mouseleave', onFloatingMouseLeave), floating && addEventListener(floating, 'pointerdown', handleInteractInside, true), () => {\n tree?.events.off('floating.closed', onNodeClosed);\n });\n }, [enabled, floatingElement, store, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { contains, getTarget } from \"../utils/element.mjs\";\nimport { isMouseLikePointerType } from \"../utils/event.mjs\";\nimport { applySafePolygonPointerEventsMutation, clearSafePolygonPointerEventsMutation, useHoverInteractionSharedState } from \"./useHoverInteractionSharedState.mjs\";\nimport { getDelay, getRestMs, isClickLikeOpenEvent as isClickLikeOpenEventShared, isInsideEnabledTrigger } from \"./useHoverShared.mjs\";\nconst EMPTY_REF = {\n current: null\n};\n\n/**\n * Provides hover interactions that should be attached to reference or trigger\n * elements.\n */\nexport function useHoverReferenceInteraction(context, props = {}) {\n const {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true,\n triggerElementRef = EMPTY_REF,\n externalTree,\n isActiveTrigger = true,\n getHandleCloseContext,\n isClosing,\n shouldOpen: shouldOpenProp,\n guardStaleOpen = false\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const {\n dataRef,\n events\n } = store.context;\n const tree = useFloatingTree(externalTree);\n const instance = useHoverInteractionSharedState(store);\n const isHoverCloseActiveRef = React.useRef(false);\n const handleCloseRef = useValueAsRef(handleClose);\n const delayRef = useValueAsRef(delay);\n const restMsRef = useValueAsRef(restMs);\n const enabledRef = useValueAsRef(enabled);\n const shouldOpenRef = useValueAsRef(shouldOpenProp);\n const isClosingRef = useValueAsRef(isClosing);\n const isClickLikeOpenEvent = useStableCallback(() => {\n return isClickLikeOpenEventShared(dataRef.current.openEvent?.type, instance.interactedInside);\n });\n const checkShouldOpen = useStableCallback(() => {\n return shouldOpenRef.current?.() !== false;\n });\n const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {\n const allTriggers = store.context.triggerElements;\n\n // Fast path for normal usage where handlers are attached directly to triggers.\n if (allTriggers.hasElement(currentTarget)) {\n return !currentDomReference || !contains(currentDomReference, currentTarget);\n }\n\n // Fallback for delegated/wrapper usage where currentTarget may be outside the trigger map.\n if (!isElement(target)) {\n return false;\n }\n const targetElement = target;\n return allTriggers.hasMatchingElement(trigger => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));\n });\n const cleanupMouseMoveHandler = useStableCallback(() => {\n if (!instance.handler) {\n return;\n }\n const doc = ownerDocument(store.select('domReferenceElement'));\n doc.removeEventListener('mousemove', instance.handler);\n instance.handler = undefined;\n });\n const clearPointerEvents = useStableCallback(() => {\n clearSafePolygonPointerEventsMutation(instance);\n });\n if (isActiveTrigger) {\n // eslint-disable-next-line no-underscore-dangle\n instance.handleCloseOptions = handleClose?.__options;\n }\n React.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);\n\n // When closing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function onOpenChangeLocal(details) {\n if (!details.open) {\n isHoverCloseActiveRef.current = details.reason === REASONS.triggerHover;\n cleanupMouseMoveHandler();\n instance.openChangeTimeout.clear();\n instance.restTimeout.clear();\n instance.blockMouseMove = true;\n instance.restTimeoutPending = false;\n } else {\n isHoverCloseActiveRef.current = false;\n }\n }\n events.on('openchange', onOpenChangeLocal);\n return () => {\n events.off('openchange', onOpenChangeLocal);\n };\n }, [enabled, events, instance, cleanupMouseMoveHandler]);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function closeWithDelay(event, runElseBranch = true) {\n const closeDelay = getDelay(delayRef.current, 'close', instance.pointerType);\n if (closeDelay) {\n instance.openChangeTimeout.start(closeDelay, () => {\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n tree?.events.emit('floating.closed', event);\n });\n } else if (runElseBranch) {\n instance.openChangeTimeout.clear();\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n tree?.events.emit('floating.closed', event);\n }\n }\n const trigger = triggerElementRef.current ?? (isActiveTrigger ? store.select('domReferenceElement') : null);\n if (!isElement(trigger)) {\n return undefined;\n }\n function onMouseEnter(event) {\n instance.openChangeTimeout.clear();\n instance.blockMouseMove = false;\n if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {\n return;\n }\n\n // Only rest delay is set; there's no fallback delay.\n // This will be handled by `onMouseMove`.\n const restMsValue = getRestMs(restMsRef.current);\n const openDelay = getDelay(delayRef.current, 'open', instance.pointerType);\n const eventTarget = getTarget(event);\n const currentTarget = event.currentTarget ?? null;\n const currentDomReference = store.select('domReferenceElement');\n let triggerNode = currentTarget;\n\n // Wrapper/delegated mode: resolve the actual trigger from the event target.\n if (isElement(eventTarget) && !store.context.triggerElements.hasElement(eventTarget)) {\n for (const triggerElement of store.context.triggerElements.elements()) {\n if (contains(triggerElement, eventTarget)) {\n triggerNode = triggerElement;\n break;\n }\n }\n }\n\n // Wrapper/delegated mode fallback: if the wrapper contains the active trigger,\n // treat this as re-entering that active trigger.\n if (isElement(currentTarget) && isElement(currentDomReference) && !store.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {\n triggerNode = currentDomReference;\n }\n const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);\n const isOpen = store.select('open');\n const isInClosingTransition = isClosingRef.current?.() ?? store.select('transitionStatus') === 'ending';\n const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;\n const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;\n const isRestOnlyDelay = restMsValue > 0 && !openDelay;\n const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;\n const shouldOpen = !isOpen || isOverInactive;\n\n // Open immediately when moving between triggers while open, or during\n // a hover-driven close transition (including same-trigger re-entry).\n if (shouldOpenImmediately) {\n if (checkShouldOpen()) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, triggerNode));\n }\n return;\n }\n if (isRestOnlyDelay) {\n return;\n }\n if (openDelay) {\n instance.openChangeTimeout.start(openDelay, () => {\n if (shouldOpen && checkShouldOpen()) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, triggerNode));\n }\n });\n } else if (shouldOpen) {\n if (checkShouldOpen()) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, triggerNode));\n }\n }\n }\n function onMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n clearPointerEvents();\n return;\n }\n cleanupMouseMoveHandler();\n const domReferenceElement = store.select('domReferenceElement');\n const doc = ownerDocument(domReferenceElement);\n instance.restTimeout.clear();\n instance.restTimeoutPending = false;\n const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();\n if (isInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {\n return;\n }\n if (handleCloseRef.current && handleCloseContextBase) {\n if (!store.select('open')) {\n instance.openChangeTimeout.clear();\n }\n const currentTrigger = triggerElementRef.current;\n instance.handler = handleCloseRef.current({\n ...handleCloseContextBase,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (enabledRef.current && !isClickLikeOpenEvent() && currentTrigger === store.select('domReferenceElement')) {\n closeWithDelay(event, true);\n }\n }\n });\n doc.addEventListener('mousemove', instance.handler);\n instance.handler(event);\n return;\n }\n const shouldClose = instance.pointerType === 'touch' ? !contains(store.select('floatingElement'), event.relatedTarget) : true;\n if (shouldClose) {\n closeWithDelay(event);\n }\n }\n\n // Backup cancellation for Chrome's dropped `mouseleave` — see `guardStaleOpen`.\n function onMouseOut(event) {\n if (contains(trigger, event.relatedTarget)) {\n return; // moved within the trigger's own subtree\n }\n instance.openChangeTimeout.clear();\n instance.restTimeout.clear();\n instance.restTimeoutPending = false;\n }\n const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, 'mouseout', onMouseOut) : undefined;\n if (move) {\n return mergeCleanups(addEventListener(trigger, 'mousemove', onMouseEnter, {\n once: true\n }), addEventListener(trigger, 'mouseenter', onMouseEnter), addEventListener(trigger, 'mouseleave', onMouseLeave), staleOpenGuard);\n }\n return mergeCleanups(addEventListener(trigger, 'mouseenter', onMouseEnter), addEventListener(trigger, 'mouseleave', onMouseLeave), staleOpenGuard);\n }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);\n return React.useMemo(() => {\n if (!enabled) {\n return undefined;\n }\n function setPointerRef(event) {\n instance.pointerType = event.pointerType;\n }\n return {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove(event) {\n const {\n nativeEvent\n } = event;\n const trigger = event.currentTarget;\n const currentDomReference = store.select('domReferenceElement');\n const currentOpen = store.select('open');\n const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);\n if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {\n return;\n }\n if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {\n const floatingElement = store.select('floatingElement');\n if (floatingElement) {\n const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;\n applySafePolygonPointerEventsMutation(instance, {\n scopeElement,\n referenceElement: trigger,\n floatingElement\n });\n }\n }\n const restMsValue = getRestMs(restMsRef.current);\n if (currentOpen && !isOverInactive || restMsValue === 0) {\n return;\n }\n if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {\n return;\n }\n instance.restTimeout.clear();\n function handleMouseMove() {\n instance.restTimeoutPending = false;\n\n // A delayed hover open should not override a click-like open that happened\n // while the hover delay was pending.\n if (isClickLikeOpenEvent()) {\n return;\n }\n const latestOpen = store.select('open');\n if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, nativeEvent, trigger));\n }\n }\n if (instance.pointerType === 'touch') {\n ReactDOM.flushSync(() => {\n handleMouseMove();\n });\n } else if (isOverInactive && currentOpen) {\n handleMouseMove();\n } else {\n instance.restTimeoutPending = true;\n instance.restTimeout.start(restMsValue, handleMouseMove);\n }\n }\n };\n }, [enabled, instance, isClickLikeOpenEvent, isOverInactiveTrigger, mouseOnly, store, restMsRef, checkShouldOpen]);\n}","import { isElement } from '@floating-ui/utils/dom';\nimport { Timeout } from '@base-ui/utils/useTimeout';\nimport { contains, getTarget } from \"./utils/element.mjs\";\nimport { getNodeChildren } from \"./utils/nodes.mjs\";\n\n/* eslint-disable no-nested-ternary */\n\nconst CURSOR_SPEED_THRESHOLD = 0.1;\nconst CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;\nconst POLYGON_BUFFER = 0.5;\nfunction hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {\n return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;\n}\nfunction isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {\n let isInsideValue = false;\n if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {\n isInsideValue = !isInsideValue;\n }\n if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {\n isInsideValue = !isInsideValue;\n }\n if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {\n isInsideValue = !isInsideValue;\n }\n if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {\n isInsideValue = !isInsideValue;\n }\n return isInsideValue;\n}\nfunction isInsideRect(pointX, pointY, rect) {\n return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;\n}\nfunction isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {\n const minX = Math.min(x1, x2);\n const maxX = Math.max(x1, x2);\n const minY = Math.min(y1, y2);\n const maxY = Math.max(y1, y2);\n return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;\n}\n/**\n * Generates a safe polygon area that the user can traverse without closing the\n * floating element once leaving the reference element.\n * @see https://floating-ui.com/docs/useHover#safepolygon\n */\nexport function safePolygon(options = {}) {\n const {\n blockPointerEvents = false\n } = options;\n const timeout = new Timeout();\n const fn = ({\n x,\n y,\n placement,\n elements,\n onClose,\n nodeId,\n tree\n }) => {\n const side = placement?.split('-')[0];\n let hasLanded = false;\n let lastX = null;\n let lastY = null;\n let lastCursorTime = typeof performance !== 'undefined' ? performance.now() : 0;\n function isCursorMovingSlowly(nextX, nextY) {\n const currentTime = performance.now();\n const elapsedTime = currentTime - lastCursorTime;\n if (lastX === null || lastY === null || elapsedTime === 0) {\n lastX = nextX;\n lastY = nextY;\n lastCursorTime = currentTime;\n return false;\n }\n const deltaX = nextX - lastX;\n const deltaY = nextY - lastY;\n const distanceSquared = deltaX * deltaX + deltaY * deltaY;\n const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;\n lastX = nextX;\n lastY = nextY;\n lastCursorTime = currentTime;\n return distanceSquared < thresholdSquared;\n }\n function close() {\n timeout.clear();\n onClose();\n }\n return function onMouseMove(event) {\n timeout.clear();\n const domReference = elements.domReference;\n const floating = elements.floating;\n if (!domReference || !floating || side == null || x == null || y == null) {\n return undefined;\n }\n const {\n clientX,\n clientY\n } = event;\n const target = getTarget(event);\n const isLeave = event.type === 'mouseleave';\n const isOverFloatingEl = contains(floating, target);\n const isOverReferenceEl = contains(domReference, target);\n if (isOverFloatingEl) {\n hasLanded = true;\n if (!isLeave) {\n return undefined;\n }\n }\n if (isOverReferenceEl) {\n hasLanded = false;\n if (!isLeave) {\n hasLanded = true;\n return undefined;\n }\n }\n\n // Prevent overlapping floating element from being stuck in an open-close\n // loop: https://github.com/floating-ui/floating-ui/issues/1910\n if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {\n return undefined;\n }\n function hasOpenChildNode() {\n return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);\n }\n function closeIfNoOpenChild() {\n if (!hasOpenChildNode()) {\n close();\n }\n }\n\n // If any nested child is open, abort.\n if (hasOpenChildNode()) {\n return undefined;\n }\n const refRect = domReference.getBoundingClientRect();\n const rect = floating.getBoundingClientRect();\n const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n const isFloatingWider = rect.width > refRect.width;\n const isFloatingTaller = rect.height > refRect.height;\n const left = (isFloatingWider ? refRect : rect).left;\n const right = (isFloatingWider ? refRect : rect).right;\n const top = (isFloatingTaller ? refRect : rect).top;\n const bottom = (isFloatingTaller ? refRect : rect).bottom;\n\n // If the pointer is leaving from the opposite side, the \"buffer\" logic\n // creates a point where the floating element remains open, but should be\n // ignored.\n // A constant of 1 handles floating point rounding errors.\n if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n closeIfNoOpenChild();\n return undefined;\n }\n\n // Ignore when the cursor is within the rectangular trough between the\n // two elements. Since the triangle is created from the cursor point,\n // which can start beyond the ref element's edge, traversing back and\n // forth from the ref to the floating element can cause it to close. This\n // ensures it always remains open in that case.\n let isInsideTroughRect = false;\n switch (side) {\n case 'top':\n isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);\n break;\n case 'bottom':\n isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);\n break;\n case 'left':\n isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);\n break;\n case 'right':\n isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);\n break;\n default:\n }\n if (isInsideTroughRect) {\n return undefined;\n }\n if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {\n closeIfNoOpenChild();\n return undefined;\n }\n if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {\n closeIfNoOpenChild();\n return undefined;\n }\n let isInsidePolygon = false;\n switch (side) {\n case 'top':\n {\n const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;\n const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;\n const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;\n const cursorPointY = y + POLYGON_BUFFER + 1;\n const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;\n const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;\n isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);\n break;\n }\n case 'bottom':\n {\n const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;\n const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;\n const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;\n const cursorPointY = y - POLYGON_BUFFER;\n const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;\n const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;\n isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);\n break;\n }\n case 'left':\n {\n const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;\n const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;\n const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;\n const cursorPointX = x + POLYGON_BUFFER + 1;\n const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;\n const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;\n isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);\n break;\n }\n case 'right':\n {\n const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;\n const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;\n const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;\n const cursorPointX = x - POLYGON_BUFFER;\n const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;\n const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;\n isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);\n break;\n }\n default:\n }\n if (!isInsidePolygon) {\n closeIfNoOpenChild();\n } else if (!hasLanded) {\n timeout.start(40, closeIfNoOpenChild);\n }\n return undefined;\n };\n };\n\n // eslint-disable-next-line no-underscore-dangle\n fn.__options = {\n ...options,\n blockPointerEvents\n };\n return fn;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const PopoverRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") PopoverRootContext.displayName = \"PopoverRootContext\";\nexport function usePopoverRootContext(optional) {\n const context = React.useContext(PopoverRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.' : _formatErrorMessage(47));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { ReactStore } from '@base-ui/utils/store';\nimport { Timeout } from '@base-ui/utils/useTimeout';\nimport { NOOP } from '@base-ui/utils/empty';\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { NullStore } from \"../../utils/NullStore.mjs\";\nimport { attachPreventUnmountOnClose, createInitialPopupStoreState, popupStoreSelectors, PopupTriggerMap, createPopupOpenState } from \"../../utils/popups/index.mjs\";\nimport { PATIENT_CLICK_THRESHOLD } from \"../../internals/constants.mjs\";\nconst selectors = {\n ...popupStoreSelectors,\n disabled: state => state.disabled,\n instantType: state => state.instantType,\n openMethod: state => state.openMethod,\n openChangeReason: state => state.openChangeReason,\n modal: state => state.modal,\n focusManagerModal: state => state.focusManagerModal,\n stickIfOpen: state => state.stickIfOpen,\n titleElementId: state => state.titleElementId,\n descriptionElementId: state => state.descriptionElementId,\n openOnHover: state => state.openOnHover,\n closeDelay: state => state.closeDelay,\n adaptiveOrigin: state => state.adaptiveOrigin\n};\n\n/**\n * The store view that detached handle-backed triggers read from. Both the real `PopoverStore` and\n * the inert fallback store satisfy it, so a trigger can read from whichever store the handle\n * currently exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus\n * `setOpen` (called by the focus guards) — so the exposed surface can't bypass the open-change\n * pipeline; on the detached fallback store every one of these mutations is a no-op.\n */\n\nexport class PopoverStore extends ReactStore {\n constructor(initialState, floatingId, nested) {\n const triggerElements = new PopupTriggerMap();\n super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors);\n }\n setOpen = (nextOpen, eventDetails) => {\n const isHover = eventDetails.reason === REASONS.triggerHover;\n const isKeyboardClick = eventDetails.reason === REASONS.triggerPress && eventDetails.event.detail === 0;\n const isDismissClose = !nextOpen && (eventDetails.reason === REASONS.escapeKey || eventDetails.reason == null);\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);\n const activeTriggerId = this.select('activeTriggerId');\n if (!nextOpen && eventDetails.reason === REASONS.closePress && eventDetails.trigger == null && activeTriggerId != null) {\n eventDetails.trigger = this.context.triggerElements.getById(activeTriggerId) ?? this.select('activeTriggerElement') ?? undefined;\n }\n this.context.onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n this.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);\n const changeState = () => {\n const popupOpenState = createPopupOpenState(this.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());\n popupOpenState.openChangeReason = eventDetails.reason;\n this.update(popupOpenState);\n };\n if (isHover) {\n // Only allow \"patient\" clicks to close the popover if it's open.\n // If they clicked within 500ms of the popover opening, keep it open.\n this.set('stickIfOpen', true);\n this.context.stickIfOpenTimeout.start(PATIENT_CLICK_THRESHOLD, () => {\n this.set('stickIfOpen', false);\n });\n ReactDOM.flushSync(changeState);\n } else {\n changeState();\n }\n let instantType;\n if (isKeyboardClick) {\n instantType = 'click';\n } else if (isDismissClose) {\n instantType = 'dismiss';\n } else if (eventDetails.reason === REASONS.focusOut) {\n instantType = 'focus';\n }\n this.set('instantType', instantType);\n };\n}\n\n/**\n * Creates the inert fallback store used by detached handle-backed triggers while no\n * `Popover.Root` is attached. It preserves a popover-specific trigger registry in context so\n * detached triggers can register before migrating to the live root store. `setOpen` is a no-op\n * (matching the inert reads/writes of `NullStore`), so a trigger can hand the store to focus-guard\n * helpers that expect `setOpen` without it ever taking effect while detached.\n */\nexport function createNullPopoverStore() {\n const triggerElements = new PopupTriggerMap();\n const store = new NullStore(Object.freeze(createInitialState(undefined, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors);\n return Object.assign(store, {\n setOpen: NOOP\n });\n}\nfunction createInitialState(initialState, triggerElements, floatingId, nested = false) {\n const state = {\n ...createInitialPopupStoreState(triggerElements, floatingId, nested),\n disabled: false,\n modal: false,\n focusManagerModal: false,\n instantType: undefined,\n openMethod: null,\n openChangeReason: null,\n titleElementId: undefined,\n descriptionElementId: undefined,\n stickIfOpen: true,\n openOnHover: false,\n closeDelay: 0,\n adaptiveOrigin: undefined,\n ...initialState\n };\n if (state.open && initialState?.mounted === undefined) {\n state.mounted = true;\n }\n return state;\n}\nfunction createInitialContext(triggerElements) {\n return {\n popupRef: /*#__PURE__*/React.createRef(),\n onOpenChange: undefined,\n onOpenChangeComplete: undefined,\n triggerFocusTargetRef: /*#__PURE__*/React.createRef(),\n beforeContentFocusGuardRef: /*#__PURE__*/React.createRef(),\n stickIfOpenTimeout: new Timeout(),\n triggerElements\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { fastComponent } from '@base-ui/utils/fastHooks';\nimport { useDismiss, FloatingTree } from \"../../floating-ui-react/index.mjs\";\nimport { PopoverRootContext, usePopoverRootContext } from \"./PopoverRootContext.mjs\";\nimport { PopoverStore } from \"../store/PopoverStore.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { PopupHandleAttachment, useImplicitActiveTrigger, usePopupRootStore, useOpenStateTransitions, usePopupInteractionProps, usePopupRootSync } from \"../../utils/popups/index.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PopoverRootComponent = fastComponent(function PopoverRootComponent({\n props\n}) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n modal = false,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null\n } = props;\n const store = usePopoverRootStore(handle, {\n modal,\n open: defaultOpen,\n openProp,\n activeTriggerId: defaultTriggerIdProp,\n triggerIdProp\n });\n store.useControlledProp('openProp', openProp);\n store.useControlledProp('triggerIdProp', triggerIdProp);\n const open = store.useState('open');\n const mounted = store.useState('mounted');\n const payload = store.useState('payload');\n store.useContextCallback('onOpenChange', onOpenChange);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n usePopupRootSync(store, open);\n useImplicitActiveTrigger(store);\n const {\n forceUnmount\n } = useOpenStateTransitions(open, store, () => {\n store.update({\n stickIfOpen: true,\n openChangeReason: null\n });\n });\n store.useSyncedValues({\n modal\n });\n React.useEffect(() => {\n if (!open) {\n store.context.stickIfOpenTimeout.clear();\n }\n }, [store, open]);\n React.useImperativeHandle(props.actionsRef, () => ({\n unmount: forceUnmount,\n close: () => store.setOpen(false, createChangeEventDetails(REASONS.imperativeAction))\n }), [forceUnmount, store]);\n const shouldRenderInteractions = open || mounted;\n return /*#__PURE__*/_jsxs(PopoverRootContext.Provider, {\n value: store,\n children: [handle && /*#__PURE__*/_jsx(PopupHandleAttachment, {\n handle: handle,\n store: store\n }), shouldRenderInteractions && /*#__PURE__*/_jsx(PopoverInteractions, {\n store: store,\n modal: modal\n }), typeof children === 'function' ? children({\n payload\n }) : children]\n });\n});\n\n/**\n * Groups all parts of the popover.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nif (process.env.NODE_ENV !== \"production\") PopoverRootComponent.displayName = \"PopoverRootComponent\";\nexport function PopoverRoot(props) {\n if (usePopoverRootContext(true)) {\n return /*#__PURE__*/_jsx(PopoverRootComponent, {\n props: props\n });\n }\n return /*#__PURE__*/_jsx(FloatingTree, {\n children: /*#__PURE__*/_jsx(PopoverRootComponent, {\n props: props\n })\n });\n}\nfunction usePopoverRootStore(handle, initialState) {\n // The store is owned by this Root instance and created exactly once. It is not tied to the handle:\n // the handle attaches to it, so swapping the handle re-attaches rather than recreating state.\n // Default values are only initial values; controlled values and root state are synced after creation.\n const store = usePopupRootStore((floatingId, nested) => new PopoverStore(initialState, floatingId, nested));\n\n // Popover-specific: dispose the patient-click timeout held in the store's context on unmount.\n React.useEffect(() => store.context.stickIfOpenTimeout.disposeEffect(), [store]);\n return store;\n}\nfunction PopoverInteractions({\n store,\n modal\n}) {\n const floatingRootContext = store.useState('floatingRootContext');\n const dismiss = useDismiss(floatingRootContext, {\n outsidePressEvent: {\n // Ensure `aria-hidden` on outside elements is removed immediately\n // on outside press when trapping focus.\n mouse: modal === 'trap-focus' ? 'sloppy' : 'intentional',\n touch: 'sloppy'\n }\n });\n\n // `useDismiss` is not given an `enabled` option, so it always returns both prop bags. Restore\n // the `EMPTY_OBJECT` fallbacks if that ever changes: the store fields are non-optional.\n // `dismiss.trigger` is always the same object as `dismiss.reference`.\n const triggerProps = dismiss.reference;\n // PopoverPopup already spreads `FOCUSABLE_POPUP_PROPS` directly, so the popup\n // props only need to carry the dismiss handlers.\n const popupProps = dismiss.floating;\n usePopupInteractionProps(store, {\n activeTriggerProps: triggerProps,\n inactiveTriggerProps: triggerProps,\n popupProps\n });\n return null;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { contains, getNextTabbable, getTabbableAfterElement, getTabbableBeforeElement, isOutsideEvent } from \"../../floating-ui-react/utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\n\n/**\n * Minimal store interface required by the focus guard hook.\n * Both PopoverStore and MenuStore satisfy this interface.\n */\n\n/**\n * Provides focus guard handlers for popup triggers (Popover, Menu).\n *\n * When the popup is open, invisible focus guard elements are placed before and after\n * the trigger. These handlers close the popup and move focus to the appropriate\n * tabbable element when the guards receive focus (i.e. when the user tabs out).\n */\nexport function useTriggerFocusGuards(store, triggerElementRef) {\n const preFocusGuardRef = React.useRef(null);\n function handlePreFocusGuardFocus(event) {\n ReactDOM.flushSync(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent, event.currentTarget));\n });\n const previousTabbable = getTabbableBeforeElement(preFocusGuardRef.current);\n previousTabbable?.focus();\n }\n function handleFocusTargetFocus(event) {\n const positionerElement = store.select('positionerElement');\n if (positionerElement && isOutsideEvent(event, positionerElement)) {\n store.context.beforeContentFocusGuardRef.current?.focus();\n } else {\n ReactDOM.flushSync(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent, event.currentTarget));\n });\n let nextTabbable = getTabbableAfterElement(store.context.triggerFocusTargetRef.current || triggerElementRef.current);\n while (nextTabbable !== null && contains(positionerElement, nextTabbable)) {\n const prevTabbable = nextTabbable;\n nextTabbable = getNextTabbable(nextTabbable);\n if (nextTabbable === prevTabbable) {\n break;\n }\n }\n nextTabbable?.focus();\n }\n }\n return {\n preFocusGuardRef,\n handlePreFocusGuardFocus,\n handleFocusTargetFocus\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { fastComponentRef } from '@base-ui/utils/fastHooks';\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.mjs\";\nimport { useButton } from \"../../internals/use-button/useButton.mjs\";\nimport { triggerOpenStateMapping, pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../internals/constants.mjs\";\nimport { safePolygon, useClick, useHoverReferenceInteraction } from \"../../floating-ui-react/index.mjs\";\nimport { OPEN_DELAY } from \"../utils/constants.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { usePopupHandleStore, useTriggerDataForwarding } from \"../../utils/popups/index.mjs\";\nimport { useTriggerFocusGuards } from \"../../utils/popups/useTriggerFocusGuards.mjs\";\nimport { useOpenMethodTriggerProps } from \"../../utils/useOpenInteractionType.mjs\";\n\n/**\n * A button that opens the popover.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const PopoverTrigger = fastComponentRef(function PopoverTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n disabled = false,\n nativeButton = true,\n handle,\n payload,\n openOnHover = false,\n delay = OPEN_DELAY,\n closeDelay = 0,\n id: idProp,\n ...elementProps\n } = componentProps;\n const rootStore = usePopoverRootContext(true);\n const handleStore = usePopupHandleStore(handle);\n const store = handleStore ?? rootStore;\n if (!store) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.' : _formatErrorMessage(74));\n }\n const thisTriggerId = useBaseUiId(idProp);\n const isTriggerActive = store.useState('isTriggerActive', thisTriggerId);\n const floatingContext = store.useState('floatingRootContext');\n const isOpenedByThisTrigger = store.useState('isOpenedByTrigger', thisTriggerId);\n const popupId = store.useState('triggerPopupId', thisTriggerId);\n const triggerElementRef = React.useRef(null);\n const {\n registerTrigger,\n isMountedByThisTrigger\n } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {\n payload,\n disabled,\n openOnHover,\n closeDelay\n });\n const openReason = store.useState('openChangeReason');\n const stickIfOpen = store.useState('stickIfOpen');\n const openMethod = store.useState('openMethod');\n const focusManagerModal = store.useState('focusManagerModal');\n const hoverProps = useHoverReferenceInteraction(floatingContext, {\n enabled: !disabled && openOnHover && (openMethod !== 'touch' || openReason !== REASONS.triggerPress),\n mouseOnly: true,\n move: false,\n handleClose: safePolygon(),\n restMs: delay,\n delay: {\n close: closeDelay\n },\n triggerElementRef,\n isActiveTrigger: isTriggerActive,\n isClosing: () => store.select('transitionStatus') === 'ending'\n });\n const click = useClick(floatingContext, {\n stickIfOpen\n });\n const interactionTypeProps = useOpenMethodTriggerProps(() => store.select('open'), interactionType => {\n store.set('openMethod', interactionType);\n });\n const rootTriggerProps = store.useState('triggerProps', isMountedByThisTrigger);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const stateAttributesMapping = {\n open(value) {\n if (value && openReason === REASONS.triggerPress) {\n return pressableTriggerOpenStateMapping.open(value);\n }\n return triggerOpenStateMapping.open(value);\n }\n };\n const {\n preFocusGuardRef,\n handlePreFocusGuardFocus,\n handleFocusTargetFocus\n } = useTriggerFocusGuards(store, triggerElementRef);\n const state = {\n disabled,\n open: isOpenedByThisTrigger\n };\n const element = useRenderElement('button', componentProps, {\n state,\n ref: [buttonRef, forwardedRef, registerTrigger, triggerElementRef],\n props: [click.reference, hoverProps, rootTriggerProps, interactionTypeProps, {\n [CLICK_TRIGGER_IDENTIFIER]: '',\n id: thisTriggerId,\n 'aria-haspopup': 'dialog',\n 'aria-expanded': isOpenedByThisTrigger,\n 'aria-controls': popupId\n }, elementProps, getButtonProps],\n stateAttributesMapping\n });\n\n // A fragment with key is required to ensure that the `element` is mounted to the same DOM node\n // regardless of whether the focus guards are rendered or not.\n const keyedElement = /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId);\n if (isMountedByThisTrigger && !focusManagerModal) {\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(FocusGuard, {\n ref: preFocusGuardRef,\n onFocus: handlePreFocusGuardFocus\n }), keyedElement, /*#__PURE__*/_jsx(FocusGuard, {\n ref: store.context.triggerFocusTargetRef,\n onFocus: handleFocusTargetFocus\n })]\n });\n }\n return keyedElement;\n});\nif (process.env.NODE_ENV !== \"production\") PopoverTrigger.displayName = \"PopoverTrigger\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const PopoverPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") PopoverPortalContext.displayName = \"PopoverPortalContext\";\nexport function usePopoverPortalContext() {\n const value = React.useContext(PopoverPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Popover.Portal> is missing.' : _formatErrorMessage(45));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.mjs\";\nimport { PopoverPortalContext } from \"./PopoverPortalContext.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PopoverPortal = /*#__PURE__*/React.forwardRef(function PopoverPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const store = usePopoverRootContext();\n const mounted = store.useState('mounted');\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(PopoverPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") PopoverPortal.displayName = \"PopoverPortal\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const PopoverPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") PopoverPositionerContext.displayName = \"PopoverPositionerContext\";\nexport function usePopoverPositionerContext() {\n const context = React.useContext(PopoverPositionerContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.' : _formatErrorMessage(46));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { FloatingNode, useFloatingNodeId } from \"../../floating-ui-react/index.mjs\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.mjs\";\nimport { PopoverPositionerContext } from \"./PopoverPositionerContext.mjs\";\nimport { useAnchorPositioning } from \"../../internals/useAnchorPositioning.mjs\";\nimport { usePopoverPortalContext } from \"../portal/PopoverPortalContext.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { POPUP_COLLISION_AVOIDANCE } from \"../../internals/constants.mjs\";\nimport { useAnimationsFinished } from \"../../internals/useAnimationsFinished.mjs\";\nimport { usePositioner } from \"../../utils/usePositioner.mjs\";\nimport { useAnchoredPopupScrollLock } from \"../../utils/useAnchoredPopupScrollLock.mjs\";\n\n/**\n * Positions the popover against the trigger.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const PopoverPositioner = /*#__PURE__*/React.forwardRef(function PopoverPositioner(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n anchor,\n // `useAnchorPositioning` applies the same defaults to the undefined values; the names\n // remain destructured to exclude the props from `elementProps`.\n positionMethod,\n side,\n align,\n sideOffset,\n alignOffset,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding,\n arrowPadding,\n sticky,\n disableAnchorTracking = false,\n collisionAvoidance = POPUP_COLLISION_AVOIDANCE,\n ...elementProps\n } = componentProps;\n const store = usePopoverRootContext();\n const keepMounted = usePopoverPortalContext();\n const nodeId = useFloatingNodeId();\n const floatingRootContext = store.useState('floatingRootContext');\n const mounted = store.useState('mounted');\n const open = store.useState('open');\n const openReason = store.useState('openChangeReason');\n const triggerElement = store.useState('activeTriggerElement');\n const modal = store.useState('modal');\n const openMethod = store.useState('openMethod');\n const positionerElement = store.useState('positionerElement');\n const instantType = store.useState('instantType');\n const transitionStatus = store.useState('transitionStatus');\n const adaptiveOrigin = store.useState('adaptiveOrigin');\n const prevTriggerElementRef = React.useRef(null);\n const runOnceAnimationsFinish = useAnimationsFinished(positionerElement);\n const positioning = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod,\n mounted,\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n disableAnchorTracking,\n keepMounted,\n nodeId,\n collisionAvoidance,\n adaptiveOrigin\n });\n const domReference = floatingRootContext.useState('domReferenceElement');\n\n // When the current trigger element changes, enable transitions on the\n // positioner temporarily\n useIsoLayoutEffect(() => {\n const currentTriggerElement = domReference;\n const prevTriggerElement = prevTriggerElementRef.current;\n if (currentTriggerElement) {\n prevTriggerElementRef.current = currentTriggerElement;\n }\n if (prevTriggerElement && currentTriggerElement && currentTriggerElement !== prevTriggerElement) {\n store.set('instantType', undefined);\n const ac = new AbortController();\n runOnceAnimationsFinish(() => {\n store.set('instantType', 'trigger-change');\n }, ac.signal);\n return () => {\n ac.abort();\n };\n }\n return undefined;\n }, [domReference, runOnceAnimationsFinish, store]);\n const trueModalNonHover = modal === true && openReason !== REASONS.triggerHover;\n useAnchoredPopupScrollLock(open && trueModalNonHover, openMethod === 'touch', positionerElement, triggerElement);\n const setPositionerElement = store.useStateSetter('positionerElement');\n const state = {\n open,\n side: positioning.side,\n align: positioning.align,\n anchorHidden: positioning.anchorHidden,\n instant: instantType\n };\n const element = usePositioner(componentProps, state, {\n styles: positioning.positionerStyles,\n transitionStatus,\n props: elementProps,\n refs: [forwardedRef, setPositionerElement],\n hidden: !mounted,\n inert: !open\n });\n return /*#__PURE__*/_jsxs(PopoverPositionerContext.Provider, {\n value: positioning,\n children: [mounted && trueModalNonHover && /*#__PURE__*/_jsx(InternalBackdrop, {\n inert: inertValue(!open),\n cutout: triggerElement\n }), /*#__PURE__*/_jsx(FloatingNode, {\n id: nodeId,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") PopoverPositioner.displayName = \"PopoverPositioner\";","import { isHTMLElement } from '@floating-ui/utils/dom';\nexport { stopEvent, isIndexOutOfListBounds, isListIndexDisabled, findNonDisabledListIndex, getMaxListIndex, getMinListIndex } from \"../../floating-ui-react/utils.mjs\";\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const HOME = 'Home';\nexport const END = 'End';\nexport const PAGE_UP = 'PageUp';\nexport const PAGE_DOWN = 'PageDown';\nexport const COMPOSITE_KEYS = new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);\nexport const SHIFT = 'Shift';\nexport const MODIFIER_KEYS = [SHIFT, 'Control', 'Alt', 'Meta'];\nfunction isInputElement(element) {\n return isHTMLElement(element) && element.tagName === 'INPUT';\n}\nexport function isNativeInput(element) {\n if (isInputElement(element) && element.selectionStart != null) {\n return true;\n }\n if (isHTMLElement(element) && element.tagName === 'TEXTAREA') {\n return true;\n }\n return false;\n}\nexport function scrollIntoViewIfNeeded(scrollContainer, element, direction, orientation) {\n if (!scrollContainer || !element || !element.scrollTo) {\n return;\n }\n let targetX = scrollContainer.scrollLeft;\n let targetY = scrollContainer.scrollTop;\n const isOverflowingX = scrollContainer.clientWidth < scrollContainer.scrollWidth;\n const isOverflowingY = scrollContainer.clientHeight < scrollContainer.scrollHeight;\n if (isOverflowingX && orientation !== 'vertical') {\n const elementOffsetLeft = getOffset(scrollContainer, element, 'left');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (direction === 'ltr') {\n if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n } else if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n }\n }\n if (direction === 'rtl') {\n if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n } else if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n }\n }\n }\n if (isOverflowingY && orientation !== 'horizontal') {\n const elementOffsetTop = getOffset(scrollContainer, element, 'top');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (elementOffsetTop - elementStyles.scrollMarginTop < scrollContainer.scrollTop + containerStyles.scrollPaddingTop) {\n // overflow upwards, align top edges\n targetY = elementOffsetTop - elementStyles.scrollMarginTop - containerStyles.scrollPaddingTop;\n } else if (elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom > scrollContainer.scrollTop + scrollContainer.clientHeight - containerStyles.scrollPaddingBottom) {\n // overflow downwards, align bottom edges\n targetY = elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom - scrollContainer.clientHeight + containerStyles.scrollPaddingBottom;\n }\n }\n scrollContainer.scrollTo({\n left: targetX,\n top: targetY,\n behavior: 'auto'\n });\n}\nfunction getOffset(ancestor, element, side) {\n const propName = side === 'left' ? 'offsetLeft' : 'offsetTop';\n let result = 0;\n while (element.offsetParent) {\n result += element[propName];\n if (element.offsetParent === ancestor) {\n break;\n }\n element = element.offsetParent;\n }\n return result;\n}\nfunction getStyles(element) {\n const styles = getComputedStyle(element);\n return {\n scrollMarginTop: parseFloat(styles.scrollMarginTop) || 0,\n scrollMarginRight: parseFloat(styles.scrollMarginRight) || 0,\n scrollMarginBottom: parseFloat(styles.scrollMarginBottom) || 0,\n scrollMarginLeft: parseFloat(styles.scrollMarginLeft) || 0,\n scrollPaddingTop: parseFloat(styles.scrollPaddingTop) || 0,\n scrollPaddingRight: parseFloat(styles.scrollPaddingRight) || 0,\n scrollPaddingBottom: parseFloat(styles.scrollPaddingBottom) || 0,\n scrollPaddingLeft: parseFloat(styles.scrollPaddingLeft) || 0\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ToolbarRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToolbarRootContext.displayName = \"ToolbarRootContext\";\nexport function useToolbarRootContext(optional) {\n const context = React.useContext(ToolbarRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.' : _formatErrorMessage(69));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nexport const ClosePartContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ClosePartContext.displayName = \"ClosePartContext\";\nexport function useClosePartCount() {\n const [closePartCount, setClosePartCount] = React.useState(0);\n const register = useStableCallback(() => {\n setClosePartCount(count => count + 1);\n return () => {\n setClosePartCount(count => Math.max(0, count - 1));\n };\n });\n const context = React.useMemo(() => ({\n register\n }), [register]);\n return {\n context,\n hasClosePart: closePartCount > 0\n };\n}\nexport function useClosePartRegistration() {\n const context = React.useContext(ClosePartContext);\n useIsoLayoutEffect(() => {\n return context?.register();\n }, [context]);\n}","'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { FloatingFocusManager, useHoverFloatingInteraction } from \"../../floating-ui-react/index.mjs\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.mjs\";\nimport { usePopoverPositionerContext } from \"../positioner/PopoverPositionerContext.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../internals/getDisabledMountTransitionStyles.mjs\";\nimport { ClosePartContext, useClosePartCount } from \"../../utils/closePart.mjs\";\nimport { FOCUSABLE_POPUP_PROPS, createDefaultInitialFocus } from \"../../utils/popups/index.mjs\";\n\n/**\n * A container for the popover contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PopoverPopup = /*#__PURE__*/React.forwardRef(function PopoverPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n initialFocus,\n finalFocus,\n ...elementProps\n } = componentProps;\n const store = usePopoverRootContext();\n const positioner = usePopoverPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const {\n context: closePartContext,\n hasClosePart\n } = useClosePartCount();\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const instantType = store.useState('instantType');\n const transitionStatus = store.useState('transitionStatus');\n const popupProps = store.useState('popupProps');\n const titleId = store.useState('titleElementId');\n const descriptionId = store.useState('descriptionElementId');\n const modal = store.useState('modal');\n const mounted = store.useState('mounted');\n const openReason = store.useState('openChangeReason');\n const activeTriggerElement = store.useState('activeTriggerElement');\n const floatingContext = store.useState('floatingRootContext');\n const floatingId = floatingContext.useState('floatingId');\n const disabled = store.useState('disabled');\n const openOnHover = store.useState('openOnHover');\n const closeDelay = store.useState('closeDelay');\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n useHoverFloatingInteraction(floatingContext, {\n enabled: openOnHover && !disabled,\n closeDelay\n });\n const resolvedInitialFocus = initialFocus === undefined ? createDefaultInitialFocus(store.context.popupRef) : initialFocus;\n const focusManagerModal = modal !== false && hasClosePart;\n store.useSyncedValue('focusManagerModal', focusManagerModal);\n const setPopupElement = store.useStateSetter('popupElement');\n const state = {\n open,\n side: positioner.side,\n align: positioner.align,\n instant: instantType,\n transitionStatus\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, store.context.popupRef, setPopupElement],\n props: [popupProps, {\n id: floatingId,\n role: 'dialog',\n ...FOCUSABLE_POPUP_PROPS,\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n onKeyDown(event) {\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n }\n }, getDisabledMountTransitionStyles(transitionStatus), elementProps],\n stateAttributesMapping: popupTransitionStateMapping\n });\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingContext,\n openInteractionType: openMethod,\n modal: focusManagerModal,\n disabled: !mounted || openReason === REASONS.triggerHover,\n initialFocus: resolvedInitialFocus,\n returnFocus: finalFocus,\n restoreFocus: \"popup\",\n previousFocusableElement: isHTMLElement(activeTriggerElement) ? activeTriggerElement : undefined,\n nextFocusableElement: store.context.triggerFocusTargetRef,\n beforeContentFocusGuardRef: store.context.beforeContentFocusGuardRef,\n children: /*#__PURE__*/_jsx(ClosePartContext.Provider, {\n value: closePartContext,\n children: element\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") PopoverPopup.displayName = \"PopoverPopup\";","import type * as React from \"react\";\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\";\n\nimport { usePortalContainer } from \"#components/portal-root\";\nimport { cn } from \"#lib/utils\";\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n container,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<PopoverPrimitive.Positioner.Props, \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"> &\n Pick<PopoverPrimitive.Portal.Props, \"container\">) {\n const portalContainer = usePortalContainer();\n return (\n <PopoverPrimitive.Portal container={container ?? portalContainer}>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n );\n}\n\nfunction PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nexport { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };\n","import type React from \"react\";\n\nimport { Popover, PopoverContent, PopoverTrigger } from \"@jslib/ui/components/popover\";\nimport { linkClassName } from \"@jslib/ui/components/text-link\";\nimport { cn } from \"@jslib/ui/lib/utils\";\n\nimport Message from \"@components/Message\";\nimport { FaqLinkComponent } from \"@components/FaqLink/FaqLinkComponent\";\n\ninterface HowDoesVerifyingWorkProps {\n initialVisibility?: boolean;\n}\n\nconst HowDoesVerifyingWorkComponent: React.FC<HowDoesVerifyingWorkProps> = ({\n initialVisibility = false,\n}: HowDoesVerifyingWorkProps) => (\n <Popover defaultOpen={initialVisibility}>\n <div>\n <PopoverTrigger\n // WCAG 1.4.1: the trigger sits inline in body text, so colour can't be its only cue. It is\n // underlined whatever the brand theme sets for links, and the underline clears on hover.\n className={cn(linkClassName, \"cursor-pointer underline hover:no-underline\")}\n >\n <Message id=\"howDoesVerifyingWork\" />\n </PopoverTrigger>\n </div>\n <PopoverContent side=\"bottom\" sideOffset={10} className=\"block w-82.5 p-5 font-body\">\n <Message id=\"step.personalInfo.howDoesVerifyingWorkDetails\" />\n \n <FaqLinkComponent />\n </PopoverContent>\n </Popover>\n);\n\nexport { HowDoesVerifyingWorkComponent };\n","import type * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"#lib/utils\";\n\nconst alertVariants = cva(\n \"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"alert-action\" className={cn(\"absolute top-2 right-2\", className)} {...props} />\n );\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertAction };\n","import type React from \"react\";\n\nimport { Alert, AlertDescription } from \"@jslib/ui/components/alert\";\n\nimport { Message } from \"@/components/Message\";\nimport { useProgramConfiguration } from \"@/lib/state/contextHooks\";\nimport { getRemainingRewardCodes } from \"@/lib/ProgramConfiguration/programConfigurationGetters\";\n\n/** The rewards left, when the program reports them, as a note for a converted step's header. */\nexport const LowRewardPoolNote: React.FC = () => {\n const offersRemaining = getRemainingRewardCodes(useProgramConfiguration());\n\n if (offersRemaining === null) return null;\n\n return (\n <Alert role=\"note\">\n <AlertDescription>\n <Message id=\"lowRewardPool\" />\n </AlertDescription>\n </Alert>\n );\n};\n","import { createContext, useContext } from \"react\";\n\n// True inside a full-right landing page, whose side panel shows the step's intro beside the form.\nconst LandingSidePanelContext = createContext(false);\n\nexport const LandingSidePanelProvider = LandingSidePanelContext.Provider;\n\nexport const useLandingSidePanel = (): boolean => useContext(LandingSidePanelContext);\n","import type React from \"react\";\n\nimport { StepHeading } from \"@jslib/ui/components/step-heading\";\nimport { cn } from \"@jslib/ui/lib/utils\";\n\nimport Message from \"@/components/Message\";\nimport { type MessageId } from \"@/lib/intl/types\";\nimport { useVerificationResponse } from \"@/lib/state/contextHooks\";\n\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport { type PersonalInfoResponse } from \"../../lib/types/types\";\nimport { HowDoesVerifyingWorkComponent } from \"../HowDoesVerifyingWork/HowDoesVerifyingWorkComponent\";\nimport { LowRewardPoolNote } from \"../RewardsRemaining/LowRewardPoolNote\";\nimport { useLandingSidePanel } from \"../Layout/LandingSidePanel\";\nimport { StepLogo } from \"../StepHeader/StepHeader\";\n\ninterface PersonalInfoStepIntroProps {\n /**\n * `form` (the default) opens the step. `landingSide` is the full-right landing page's side panel:\n * no logo, start-aligned, and a larger title that doesn't take focus.\n */\n placement?: \"form\" | \"landingSide\";\n}\n\n/** The logo, title, subtitle and explainer that open a personal-info step, then its required-fields note. */\nexport const PersonalInfoStepIntro: React.FC<PersonalInfoStepIntroProps> = ({\n placement = \"form\",\n}) => {\n const inLandingSide = placement === \"landingSide\";\n // In the form, the intro gives way to the side panel while the panel is beside the form.\n const sidePanelShowsIntro = useLandingSidePanel() && !inLandingSide;\n // No response yet while the verification loads (the landing side panel renders meanwhile).\n const verificationResponse = useVerificationResponse<PersonalInfoResponse | undefined>();\n const failedInstantMatch = !!verificationResponse && hasFailedInstantMatch(verificationResponse);\n\n const titleMsgId: MessageId = failedInstantMatch\n ? \"step.personalInfo.tryAgain.title\"\n : \"step.personalInfo.title\";\n const subtitleMsgId: MessageId = failedInstantMatch\n ? \"step.personalInfo.tryAgain.subtitle\"\n : \"step.personalInfo.subtitle\";\n\n const title = (\n <h1>\n <Message id={titleMsgId} />\n </h1>\n );\n\n return (\n <header className=\"flex flex-col\">\n {!inLandingSide && <StepLogo />}\n <div className={cn(sidePanelShowsIntro && \"landing-wide:hidden\")}>\n {inLandingSide ? (\n // The side panel's title is v2's: four times the body size, in the panel's colour, with a\n // heading's default top margin (0.67em).\n <div className=\"mt-[0.67em] mb-2 font-heading text-[length:calc(var(--body-size)*4)] leading-tight text-(--landing-foreground)\">\n {title}\n </div>\n ) : (\n <StepHeading>{title}</StepHeading>\n )}\n <div\n className={cn(\n inLandingSide\n ? \"mb-2 text-start text-[length:calc(var(--body-size)*1.5)]\"\n : \"text-center\",\n failedInstantMatch && \"text-destructive\",\n )}\n >\n <Message id={subtitleMsgId} />\n </div>\n {!failedInstantMatch && (\n <>\n <div className={inLandingSide ? \"text-start\" : \"text-center\"}>\n <HowDoesVerifyingWorkComponent />\n </div>\n <LowRewardPoolNote />\n </>\n )}\n </div>\n {/* The required-fields note belongs with the fields, so the side panel leaves it to the form. */}\n {!inLandingSide && (\n <div className=\"mt-[calc(var(--spacing)*2.4)]\">\n <Message id=\"requiredFields\" />\n </div>\n )}\n </header>\n );\n};\n","import type React from \"react\";\nimport { Suspense } from \"react\";\n\nimport { cn } from \"@jslib/ui/lib/utils\";\n\nimport { useBrandTheme } from \"@/components/BrandThemeProvider/BrandThemeProvider\";\n\nimport { PersonalInfoStepIntro } from \"../PersonalInfoStepIntro/PersonalInfoStepIntro\";\nimport { useIsEmbedded } from \"../../lib/frames/useIsEmbedded\";\n\nimport { LandingSidePanelProvider } from \"./LandingSidePanel\";\n\nexport interface LayoutProps {\n children: React.ReactNode;\n renderAsLandingPage?: boolean;\n}\n\n// The landing page fills at least the viewport; `--landing-min-height` lets a host with no viewport\n// of its own (MySheerID's preview pane) set it.\nconst LANDING_MIN_HEIGHT = \"min-h-[var(--landing-min-height,100svh)]\";\n\n/*\n * The landing page around the form. The `landing-*` variants (src/tailwind.css) query the form's\n * width: beside-the-form layouts stack at `landing-narrow`, and the form fills a phone.\n */\nexport const Layout: React.FC<LayoutProps> = ({ children, renderAsLandingPage }) => {\n const { isEmbedded } = useIsEmbedded();\n const layout = useBrandTheme().brandTheme.form?.layout;\n\n if (!renderAsLandingPage || isEmbedded) {\n return <>{children}</>;\n }\n\n // Centred unless the brand theme picks one of the beside-the-form layouts.\n const splitRight = layout === \"SPLIT_RIGHT\";\n const fullRight = layout === \"FULL_RIGHT\";\n const center = !splitRight && !fullRight;\n\n return (\n <LandingSidePanelProvider value={fullRight}>\n <div\n data-landing-layout={layout ?? \"CENTER\"}\n className={cn(\n \"flex h-full w-full justify-center bg-(--landing-background) bg-(image:--landing-background-image) bg-cover bg-fixed bg-no-repeat transition-colors duration-300\",\n LANDING_MIN_HEIGHT,\n !center && \"items-center\",\n )}\n >\n <div\n className={cn(\n \"flex h-full w-full justify-center landing-phone:p-0\",\n center && \"items-center p-4\",\n !center && \"justify-end\",\n fullRight && \"landing-narrow:justify-center\",\n )}\n >\n {fullRight && (\n // The panel sits on the landing colours, so its links take --landing-link.\n <aside className=\"flex w-1/2 flex-col ps-16 pt-20 text-(--landing-foreground) [--link:var(--landing-link)] landing-narrow:hidden\">\n {/* Outside the form's Suspense boundary, so it waits for its messages on its own. */}\n <Suspense fallback={null}>\n <PersonalInfoStepIntro placement=\"landingSide\" />\n </Suspense>\n </aside>\n )}\n <div\n className={cn(\n \"h-full w-full max-w-[39rem] bg-background p-6 transition-colors duration-300 landing-narrow:p-0\",\n !center && \"flex w-1/2 items-center justify-center\",\n splitRight && [LANDING_MIN_HEIGHT, \"landing-narrow:w-[60%]\"],\n fullRight && \"mx-16 my-4 w-full landing-narrow:m-0\",\n \"landing-phone:h-full landing-phone:w-full\",\n )}\n >\n <div className=\"h-full w-full\">{children}</div>\n </div>\n </div>\n </div>\n </LandingSidePanelProvider>\n );\n};\n","import { PortalRoot } from \"@jslib/ui/components/portal-root\";\n\n// The form's body typography and background. The portal container lives inside it so overlays\n// inherit them. Print keeps backgrounds (the internal mockup generator prints the form). The colours\n// fade, so the theme arriving after the first paint doesn't flash.\nconst FormWrapperComponent = ({ children }: { children: React.ReactNode }) => (\n <div className=\"min-w-62.5 bg-background font-body leading-normal transition-colors duration-300 [print-color-adjust:exact]\">\n <PortalRoot>{children}</PortalRoot>\n </div>\n);\n\nexport { FormWrapperComponent };\n","import React, { Suspense, useMemo } from \"react\";\nimport { IntlProvider } from \"react-intl\";\nimport { I18nextProvider } from \"react-i18next\";\nimport flatten from \"flat\";\nimport produce from \"immer\";\nimport { useLDClient } from \"launchdarkly-react-client-sdk\";\nimport deterministicStringify from \"json-stable-stringify\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\nimport { DirectionRoot } from \"@jslib/ui/components/direction-root\";\n\nimport i18next from \"@/lib/intl/i18next\";\n\nimport { getInstallType } from \"@/lib/ServerApi/ApiUrls\";\n\nimport { getQueryOrOption } from \"@/lib/ServerApi/TestingRouteOverrides\";\nimport { QUERY_STRING_PREV_STEP_OVERRIDE, QUERY_STRING_STEP_OVERRIDE } from \"@/constants\";\nimport {\n useProgramConfiguration,\n useLoadingState,\n useProgramMessages,\n useProgramTheme,\n useVerificationId,\n} from \"@/lib/state/contextHooks\";\nimport { selectFormValidationOptions } from \"@/lib/VerificationService/formValidationOptions\";\nimport {\n programStore,\n selectPreviewMessages,\n selectResponseOverride,\n} from \"@/lib/state/programStore\";\nimport { useStore } from \"@/lib/store/useStore\";\nimport { MockStepsEnum } from \"@/lib/types/runtimeTypes\";\n\nimport { getOptionsMessages } from \"../lib/intl/intl\";\nimport {\n type VerificationStep,\n type ProgramTheme,\n type VerificationService,\n} from \"../lib/types/types\";\nimport { getOptions } from \"../options/options\";\nimport { CustomDimensionNames, setUserDimension } from \"../lib/GoogleAnalytics/ga\";\n\nimport { LoadStepComponent as LoadStep } from \"./LoadStepComponent\";\nimport { CustomTextWrapper } from \"./CustomTextWrapper\";\nimport { TestModeFlagComponent } from \"./TestModeFlag/TestModeFlagComponent\";\nimport { LoadingScreenComponent as LoadingScreen } from \"./LoadingScreen/LoadingScreenComponent\";\nimport { Layout } from \"./Layout/Layout\";\nimport { FormWrapperComponent } from \"./FormWrapper/FormWrapperComponent\";\nimport { useFlags } from \"./FeatureFlags/hooks\";\nimport { BrandThemeProvider } from \"./BrandThemeProvider/BrandThemeProvider\";\n\nexport const NewVerificationInnerComponent = ({\n locale,\n programTheme: programThemeProp,\n verificationService: verificationServiceProp,\n programId,\n}: {\n // TODO better types:\n locale: any;\n programTheme: ProgramTheme;\n verificationService: VerificationService;\n programId: string;\n}) => {\n const ldClient = useLDClient();\n const { renderAs, _launchDarklyUserTargeting } = getOptions();\n const programTheme = useProgramTheme() ?? programThemeProp;\n const programConfiguration = useProgramConfiguration();\n const verificationId = useVerificationId();\n const { isLoading, loadingStep } = useLoadingState();\n const responseOverride = useStore(programStore, selectResponseOverride);\n const verificationResponse = useMemo(\n () =>\n responseOverride\n ? { ...verificationServiceProp.verificationResponse, ...responseOverride }\n : verificationServiceProp.verificationResponse,\n [responseOverride, verificationServiceProp.verificationResponse],\n );\n const verificationService = useMemo(\n () => ({\n ...verificationServiceProp,\n programTheme,\n verificationResponse,\n formValidationOptions: selectFormValidationOptions(\n programConfiguration,\n verificationResponse,\n verificationServiceProp.viewModel,\n ),\n }),\n [verificationServiceProp, programTheme, programConfiguration, verificationResponse],\n );\n const flags = useFlags();\n\n React.useEffect(() => {\n try {\n if (flags && verificationService && verificationService.viewModel) {\n const stringFlags = deterministicStringify(flags);\n setUserDimension(CustomDimensionNames.flags, stringFlags);\n const metadata = verificationService.viewModel.metadata || {};\n const metadataWithFlags = produce(metadata, (draft) => {\n draft.flags = stringFlags;\n });\n const newViewModel = produce(verificationService.viewModel, (draft) => {\n draft.metadata = metadataWithFlags;\n });\n verificationService.updateViewModel(newViewModel);\n }\n } catch (e) {\n logger.error(e);\n }\n }, []);\n\n React.useEffect(() => {\n // HC-202: Launch darkly experimentation trial.\n // Keeping this behind a private option so we can turn it on just for hosted programs.\n if (verificationId && _launchDarklyUserTargeting && ldClient) {\n const identity: {\n kind: string;\n user: { key: string; locale?: string; segment?: string; installType?: string };\n program: { key: string };\n } = {\n kind: \"multi\",\n user: {\n key: verificationId,\n locale: verificationService.verificationResponse.locale,\n segment: verificationService.verificationResponse.segment,\n installType: getInstallType(),\n },\n program: { key: programId },\n };\n ldClient.identify(identity);\n }\n }, [verificationId, ldClient]);\n\n React.useEffect(() => {\n try {\n // provides feature flags for mysheerid-preview install script\n getOptions()._launchDarklyFlagCb(flags);\n } catch {\n // Do nothing if LD option is not present\n }\n }, [flags]);\n\n const messages = useProgramMessages();\n const previewMessages = useStore(programStore, selectPreviewMessages);\n const messagesWithOptions = {\n ...messages,\n ...(flatten(getOptionsMessages(locale)) as object),\n ...(flatten(previewMessages?.[locale] ?? {}) as object),\n };\n const direction = i18next.dir(locale);\n\n return (\n // Don't change locale, so we don't have to load pluralization data, which has complications. HD-560\n <IntlProvider\n locale=\"en\"\n key={locale}\n messages={messagesWithOptions}\n textComponent={CustomTextWrapper}\n >\n <BrandThemeProvider themeChoices={programTheme?.themeChoices}>\n <DirectionRoot direction={direction} className={`sid-${direction} sid-locale-${locale}`}>\n <FormWrapperComponent>\n <Layout renderAsLandingPage={renderAs === \"landingPage\"}>\n <I18nextProvider i18n={i18next}>\n <Suspense fallback={<LoadingScreen step={loadingStep} />}>\n {isLoading ? (\n <LoadingScreen step={loadingStep} />\n ) : getQueryOrOption(QUERY_STRING_STEP_OVERRIDE) === MockStepsEnum.loading ? (\n <LoadingScreen\n step={getQueryOrOption(QUERY_STRING_PREV_STEP_OVERRIDE) as VerificationStep}\n />\n ) : (\n <div>\n {!getOptions().hideTestModeFlag && (\n <TestModeFlagComponent verificationService={verificationService} />\n )}\n <LoadStep\n stepToLoad={\n verificationService.overrideStep ||\n verificationService.verificationResponse?.currentStep\n }\n verificationService={verificationService}\n />\n </div>\n )}\n </Suspense>\n </I18nextProvider>\n </Layout>\n </FormWrapperComponent>\n </DirectionRoot>\n </BrandThemeProvider>\n </IntlProvider>\n );\n};\n","import { postMessageFromIframe } from \"./postMessageFromIframe\";\n\n/*\n Trap focus in the lightbox by sending and receiving postMessages, here and from the modal script, while tabbing through the program.\n*/\nconst trapFocus = () => {\n let lastFocusableElement: HTMLElement | null = null;\n\n document.addEventListener(\"keydown\", (e) => {\n const isTabPressed: boolean = e.key === \"Tab\";\n\n if (!isTabPressed) {\n return;\n }\n const focusableElements =\n 'button, a[href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n const focusableContent: NodeListOf<HTMLElement> = document.querySelectorAll(focusableElements);\n lastFocusableElement = focusableContent[focusableContent.length - 1];\n\n if (lastFocusableElement) {\n if (!e.shiftKey && document.activeElement === lastFocusableElement) {\n postMessageFromIframe({ type: \"focus\", focusOn: \"firstElement\" });\n e.preventDefault();\n }\n }\n });\n\n window.addEventListener(\"message\", (event) => {\n const message = event.data;\n\n if (message.focusOn === \"lastElement\" && lastFocusableElement) {\n lastFocusableElement.focus();\n }\n });\n\n // set inital focus to lightbox close button\n postMessageFromIframe({ type: \"focus\", focusOn: \"firstElement\" });\n};\n\nexport const maintainFocusInLightbox = () => {\n window.addEventListener(\"message\", (event) => {\n const message = event.data;\n\n if (message.isInLightBox === \"true\") {\n trapFocus();\n }\n });\n};\n","/* eslint-disable */\n// TODO remove eslint-disable and fix this file\nimport React from \"react\";\nimport { Dispatch } from \"redux\";\nimport { connect, MapStateToProps, MapDispatchToProps, MergeProps } from \"react-redux\";\nimport { IntlProvider } from \"react-intl\";\nimport flatten from \"flat\";\n\nimport {\n DatabaseId,\n Locale,\n ReduxState,\n VerificationService,\n VerificationServiceFunctions,\n VerificationServiceValues,\n Segment,\n} from \"../lib/types/types\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\nimport {\n createFetchNewVerificationRequest,\n createUpdateViewModel,\n createUpdateFieldValidationErrors,\n createSubmitStep,\n createFetchExistingVerificationRequest,\n createUpdateProgramTheme,\n createUpdateLocale,\n createResetState,\n} from \"../lib/VerificationService/VerificationServiceActions\";\n\nimport { getLocaleSafely, getOptionsMessages } from \"../lib/intl/intl\";\nimport { useProgramMessages } from \"../lib/state/contextHooks\";\nimport { getSafe } from \"@jslib/shared/utils/getSafe\";\nimport { NewVerificationInnerComponent } from \"./NewVerificationInnerComponent\";\nimport { enableES5 } from \"immer\";\nimport { maintainFocusInLightbox } from \"../lib/frames/windowFocus\";\nimport { listenToInstallPage } from \"../lib/frames/frameMessages\";\nimport { setViewModel } from \"../lib/VerificationService/ViewModel\";\nimport { setOptions } from \"../options/options\";\nimport { CustomTextWrapper } from \"./CustomTextWrapper\";\n\ninterface NewVerificationProps {\n programId: DatabaseId;\n verificationService?: VerificationService;\n trackingId?: string;\n}\ninterface NewVerificationState {}\n\nexport class NewVerification extends React.Component<NewVerificationProps, NewVerificationState> {\n verificationService: VerificationService;\n\n constructor(props) {\n super(props);\n logger.info(\"NewVerificationComponent: constructing\");\n\n if (this.props.trackingId && this.props.trackingId.length) {\n logger.info(`Attaching a trackingId to this verification request ${this.props.trackingId}`);\n } else {\n logger.info(\"No trackingId to associate with the verification request\");\n }\n }\n\n componentDidMount() {\n enableES5(); // https://sheerid.atlassian.net/browse/UX-362\n maintainFocusInLightbox();\n listenToInstallPage((event) => {\n switch (event.data.action) {\n case \"setViewModel\":\n setViewModel(event.data.viewModel, {\n partial: true,\n metadataCheck: true,\n externalUserIdCheck: true,\n });\n break;\n case \"setOptions\":\n setOptions(event.data.options);\n break;\n default:\n }\n });\n logger.info(\"NewVerificationComponent: fetchNewVerificationRequest\");\n const currentSegment = getSafe<Segment>(\n () => this.props.verificationService.verificationResponse.segment,\n );\n this.props.verificationService.fetchNewVerificationRequest(\n this.props.programId,\n currentSegment,\n this.props.verificationService.previousViewModel,\n this.props.trackingId,\n );\n }\n\n public render() {\n const { viewModel } = this.props.verificationService;\n\n const locale: Locale = getLocaleSafely(viewModel);\n\n const { programTheme } = this.props.verificationService;\n const { verificationResponse } = this.props.verificationService;\n logger.info(\n \"NewVerificationComponent: verificationResponse, viewModel\",\n verificationResponse,\n viewModel,\n );\n\n logger.info(\n `NewVerificationComponent: locale: ${locale}, currentStep: ${verificationResponse?.currentStep}`,\n );\n\n return (\n <NewVerificationInnerComponent\n locale={locale}\n programTheme={programTheme}\n verificationService={this.props.verificationService}\n programId={this.props.programId}\n />\n );\n }\n}\n\nconst mapStateToProps: MapStateToProps<ReduxState, NewVerificationProps, any> = (\n state: ReduxState,\n ownProps: NewVerificationProps,\n): ReduxState => ({\n ...state,\n});\n\nconst mapDispatchToProps: MapDispatchToProps<any, any> = (\n dispatch: Dispatch,\n ownProps: NewVerificationProps,\n) => ({\n dispatch, // Pass dispatch through for mergeProps use\n fetchNewVerificationRequest: createFetchNewVerificationRequest(dispatch),\n fetchExistingVerificationRequest: createFetchExistingVerificationRequest(dispatch),\n updateViewModel: createUpdateViewModel(dispatch),\n updateLocale: createUpdateLocale(dispatch, ownProps.programId as DatabaseId),\n updateProgramTheme: createUpdateProgramTheme(dispatch),\n updateFieldValidationErrors: createUpdateFieldValidationErrors(dispatch),\n resetState: createResetState(dispatch),\n});\n\n// Return a VerificationService\nconst mergeProps: MergeProps<\n VerificationServiceValues & ReduxState,\n VerificationServiceFunctions,\n NewVerificationProps,\n any\n> = (propsFromState, propsFromDispatch, ownProps): NewVerificationProps => {\n const { dispatch, ...otherDispatchProps } = propsFromDispatch;\n const { programTheme } = propsFromState;\n\n return {\n verificationService: {\n ...propsFromState,\n ...otherDispatchProps,\n // Create submitStep here, need access to fully set programTheme\n submitStep: createSubmitStep(dispatch, programTheme),\n },\n ...ownProps,\n };\n};\n\nexport const NewVerificationComponent = connect(\n mapStateToProps,\n mapDispatchToProps,\n mergeProps,\n)(NewVerification);\n","import type React from \"react\";\nimport { LDProvider } from \"launchdarkly-react-client-sdk\";\n\nimport { flagDefaults } from \"@jslib/shared/flags\";\n\nexport const getLDProgramContext = (programId: string) => ({\n kind: \"program\",\n key: programId,\n});\n\ninterface ProviderProps {\n programId: string;\n children: React.ReactNode;\n}\n\nexport const FlagProvider = ({ programId, children }: ProviderProps) => (\n <LDProvider\n clientSideID={import.meta.env.VITE_LD_CLIENT_ID}\n // It is important that we create our contexts carefully in the jslib\n // to avoid creating contexts for anyone who looks at a jslib form.\n context={getLDProgramContext(programId)}\n flags={flagDefaults}\n reactOptions={{ useCamelCaseFlagKeys: false }}\n options={{ streaming: false }}\n >\n {children}\n </LDProvider>\n);\n","import React, { useEffect } from \"react\";\nimport { Provider } from \"react-redux\";\n\nimport { getSafe } from \"@jslib/shared/utils/getSafe\";\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport { NewVerificationComponent } from \"../NewVerificationComponent\";\nimport { type DatabaseId, type ProgramIdAction } from \"../../lib/types/types\";\nimport { getStore } from \"../../lib/VerificationService/VerificationServiceStore\";\nimport {\n CustomDimensionNames,\n observePerformanceMetrics,\n setUserDimension,\n} from \"../../lib/GoogleAnalytics/ga\";\nimport { addPredefinedHooks } from \"../../lib/hooks\";\nimport { getPublishedVersion } from \"../../lib/ServerApi/ApiUrls\";\nimport { FlagProvider } from \"../FeatureFlags/FlagProvider\";\n\ninterface VerificationFormProps {\n programId: DatabaseId;\n // TODO fix next line\n trackingId?: string; // eslint-disable-line\n}\n\nconst store = getStore();\n\n// This call can take place at any time after the jslib .js file is parsed\n// It only needs to be called once per page-load\n\n/** @deprecated : Remove once NR has been updated to use clientVersion (HC-1665) */\nsetUserDimension(\n CustomDimensionNames.jslibVersionActual,\n getSafe(() => getPublishedVersion(), \"?\"),\n);\nsetUserDimension(\n CustomDimensionNames.clientVersion,\n getSafe(() => getPublishedVersion(), \"?\"),\n);\n\nexport const VerificationForm = React.forwardRef(\n ({ programId, trackingId = undefined }: VerificationFormProps, ref: any) => {\n try {\n addPredefinedHooks(); // keep this as early as possible in the jslib initialization\n } catch (e) {\n logger.warn(\"Failed to add predefined hooks\", e);\n }\n\n useEffect(() => {\n // this should only happen once per form\n observePerformanceMetrics();\n });\n\n store.dispatch<ProgramIdAction>({ programId, type: \"PROGRAM_ID\" });\n\n if (ref) {\n // eslint-disable-next-line no-param-reassign\n ref.current = {\n refresh: React.useCallback(() => store.dispatch({ type: \"FORCE_UPDATE\" }), []),\n reset: React.useCallback(() => store.dispatch({ type: \"RESET_STATE\" }), []),\n };\n }\n\n return (\n <Provider store={store}>\n <FlagProvider programId={programId}>\n <NewVerificationComponent programId={programId} trackingId={trackingId} />\n </FlagProvider>\n </Provider>\n );\n },\n);\n","import React from \"react\";\nimport ReactDom from \"react-dom\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport { type DatabaseId, type ViewModel } from \"../lib/types/types\";\nimport { assertValidHtmlElement } from \"../lib/types/assertions\";\nimport { VerificationForm } from \"../components/VerificationForm/VerificationFormComponent\";\n\nexport class VerificationFormEs5 {\n element: HTMLElement;\n\n programId: DatabaseId;\n\n trackingId: string;\n\n viewModel: ViewModel;\n\n ref: React.RefObject<any>;\n\n constructor(element: HTMLElement, programId: DatabaseId, trackingId?: string) {\n // In case the 'new' keyword isn't used by es5 devs\n if (!(this instanceof VerificationFormEs5)) {\n throw new Error(\n 'Method \"render\" not found. Did you use the \"new\" keyword when instantiating VerificationForm?',\n );\n }\n\n logger.info(`Constructing VerificationFormEs5 ${programId}`);\n assertValidHtmlElement(element);\n\n this.element = element;\n this.programId = programId;\n this.trackingId = trackingId;\n this.ref = React.createRef();\n\n this.render();\n }\n\n refresh() {\n this.ref.current.refresh();\n }\n\n reset() {\n this.ref.current.reset();\n }\n\n render() {\n ReactDom.render(\n <VerificationForm programId={this.programId} trackingId={this.trackingId} ref={this.ref} />,\n this.element,\n );\n }\n\n unmount() {\n ReactDom.unmountComponentAtNode(this.element);\n }\n}\n","import { hooks } from \"../hooks\";\nimport { createStore } from \"../store/createStore\";\nimport { getEmptyViewModel } from \"../ServerApi/VerificationRequestGetters\";\nimport { fieldIdErrorMap } from \"../VerificationService/VerificationServiceHelpers\";\nimport { createUpdateFieldValidationErrors } from \"../VerificationService/VerificationServiceActions\";\nimport { getStore } from \"../VerificationService/VerificationServiceStore\";\nimport { setViewModel } from \"../VerificationService/ViewModel\";\nimport { getFieldValidationErrorsEmpty } from \"../types/empties\";\nimport {\n type FieldValidationErrors,\n type StudentPersonalInfoViewModel,\n type VerificationStep,\n type ViewModel,\n} from \"../types/types\";\n\n/** The form states the MySheerID theme builder can preview. */\nexport type PreviewFormState = \"empty\" | \"filled\" | \"errors\";\n\nexport interface PreviewFormStateStoreState {\n /** `undefined` until a form state is previewed, and again once it's cleared. */\n formState: PreviewFormState | undefined;\n}\n\n/**\n * The selected form state. The form is driven the way an installer drives it: values through the public `setViewModel`, errors through the action the form's own validation dispatches. The selection is kept so a newly rendered form can be given it once it's ready.\n */\nexport const previewFormStateStore = createStore<PreviewFormStateStoreState>({\n formState: undefined,\n});\n\n// Dummy values for the \"filled\" state. A step supports form-state previews only if it's listed here. Any other step is left alone.\nconst FILLED_VALUES: Partial<Record<VerificationStep, Partial<ViewModel>>> = {\n collectStudentPersonalInfo: {\n firstName: \"Jane\",\n lastName: \"Doe\",\n email: \"jane.doe@example.edu\",\n phoneNumber: \"555-555-0100\",\n birthDate: \"2000-05-15\",\n organization: { id: 1, name: \"Example University\" },\n } satisfies Partial<StudentPersonalInfoViewModel>,\n};\n\n// Every field, with the error its validator reports, plus market consent, which has no server error id. A step only shows the errors of the fields it renders, so this errors exactly those.\nconst getAllFieldsErrored = (): FieldValidationErrors => {\n const errors = getFieldValidationErrorsEmpty();\n fieldIdErrorMap.forEach((fieldId, errorId) => {\n errors[fieldId] = errorId;\n });\n errors.marketConsentValue = \"marketConsentRequired\";\n return errors;\n};\n\n// Apply the selection current when this runs, so applies queued while a form loads all land on the latest one. Clearing (no selection) empties the fields, the same as \"empty\".\nconst applyFormState = (step: VerificationStep | undefined): void => {\n const filled = step ? FILLED_VALUES[step] : undefined;\n if (!filled) return;\n const { formState } = previewFormStateStore.get();\n\n if (formState === \"filled\") {\n setViewModel(filled);\n } else {\n const empty = getEmptyViewModel(step) as Record<string, unknown>;\n setViewModel(Object.fromEntries(Object.keys(filled).map((key) => [key, empty[key]])));\n }\n createUpdateFieldValidationErrors(getStore().dispatch)(\n formState === \"errors\" ? getAllFieldsErrored() : getFieldValidationErrorsEmpty(),\n );\n};\n\n// Like `setViewModel`, wait out a loading form. The step, and so the dummy data, is only known then.\nconst whenFormReady = (callback: (step: VerificationStep | undefined) => void): void => {\n const { isLoading, verificationResponse } = getStore().getState();\n if (isLoading) {\n hooks.once(\"ON_VERIFICATION_READY\", (response) => callback(response?.currentStep));\n } else {\n callback(verificationResponse?.currentStep);\n }\n};\n\n/** Re-render the previewed form empty, filled with dummy data, or with every visible field errored. */\nexport function setPreviewFormState(formState: PreviewFormState): void {\n previewFormStateStore.set((prev) => (prev.formState === formState ? prev : { formState }));\n whenFormReady(applyFormState);\n}\n\n/** Drop the selection, emptying the form if a state had been applied. */\nexport function clearPreviewFormState(): void {\n if (previewFormStateStore.get().formState === undefined) return;\n previewFormStateStore.set({ formState: undefined });\n whenFormReady(applyFormState);\n}\n\n/** Give a newly rendered form the selected state, whether it was selected before or after the render. */\nexport function reapplyPreviewFormState(): void {\n if (previewFormStateStore.get().formState === undefined) return;\n whenFormReady(applyFormState);\n}\n","import i18next, { addOptionsMessages, Namespace } from \"../intl/i18next\";\nimport { getOptions } from \"../../options/options\";\nimport { type Locale } from \"../types/types\";\n\nimport { programStore } from \"./programStore\";\n\n/**\n * Override message copy for a locale for program previewing. Writes the store (react-intl path, merged on\n * render) and the i18next `options` namespace (i18next path); the store change re-renders both.\n */\nexport function setPreviewMessages(locale: Locale, messages: Record<string, unknown>): void {\n programStore.set((prev) => ({\n ...prev,\n overrides: {\n ...prev.overrides,\n messages: {\n ...prev.overrides.messages,\n [locale]: { ...prev.overrides.messages?.[locale], ...messages },\n },\n },\n }));\n\n addOptionsMessages({ [locale]: messages });\n}\n\n/**\n * Remove preview message overrides from the i18next `options` namespace. That namespace is shared with legacy `setOptions` messages, so we drop the whole per-locale bundle then re-apply the legacy messages from options.\n */\nexport function clearPreviewMessages(locales: Locale[]): void {\n locales.forEach((locale) => i18next.removeResourceBundle(locale, Namespace.OPTIONS));\n addOptionsMessages(getOptions().messagesWithLocale as Record<string, object>);\n}\n","import { getOverriddenMock } from \"../ServerApi/TestingRouteOverrides\";\nimport { getStore } from \"../VerificationService/VerificationServiceStore\";\nimport { setOptions } from \"../../options/options\";\nimport { type MockStep, type Options } from \"../types/types\";\n\nimport { programStore, type MockOverrides } from \"./programStore\";\n\n// Preview mock directives map onto the existing `mock*` options that getOverriddenMock reads.\nconst MOCK_OPTION_KEYS: Partial<Record<keyof MockOverrides, keyof Options>> = {\n step: \"mockStep\",\n previousStep: \"mockPreviousStep\",\n segment: \"mockSegment\",\n subSegment: \"mockSubSegment\",\n errorId: \"mockErrorId\",\n errorDetailId: \"mockErrorDetailId\",\n captchaState: \"mockCaptchaState\",\n rewardCode: \"mockRewardCode\",\n redirectUrl: \"mockRedirectUrl\",\n consumerInfoState: \"mockConsumerInfoState\",\n idCheckLoopServiceType: \"mockIdCheckLoopServiceType\",\n docSelected: \"mockDocSelected\",\n};\n\n/**\n * Preview a mocked verification response (step, redirect URL, reward code, error, …). Bridges to the\n * still-Redux verificationResponse: reuses getOverriddenMock, then dispatches in place — no teardown.\n */\nexport async function setPreviewMock(directives: MockOverrides): Promise<void> {\n // Feed the existing options-based mock machinery (getOverriddenMock reads these).\n const optionPatch: Partial<Options> = {};\n (Object.keys(directives) as (keyof MockOverrides)[]).forEach((key) => {\n const optionKey = MOCK_OPTION_KEYS[key];\n if (optionKey) (optionPatch as Record<string, unknown>)[optionKey] = directives[key];\n });\n setOptions(optionPatch);\n\n // Build the full per-step mock (reusing getOverriddenMock for parity) before touching the store,\n // so mock directives and the resolved response land in one atomic update — no intermediate render.\n const step = directives.step ?? programStore.get().overrides.mock?.step;\n const response = step\n ? await getOverriddenMock(step as MockStep, getStore().getState().verificationResponse)\n : undefined;\n\n programStore.set((prev) => ({\n ...prev,\n overrides: {\n ...prev.overrides,\n mock: { ...prev.overrides.mock, ...directives },\n ...(response ? { response } : {}),\n },\n }));\n}\n","import { type DeepPartial } from \"../types/helpers\";\nimport {\n type AllResponseTypes,\n type Locale,\n type ProgramBranding,\n type ProgramConfiguration,\n} from \"../types/types\";\nimport { getStore } from \"../VerificationService/VerificationServiceStore\";\nimport { createUpdateLocale } from \"../VerificationService/VerificationServiceActions\";\n\nimport { programStore, setPreviewOverrides, clearPreviewOverrides } from \"./programStore\";\nimport {\n clearProgramConfigurationOverrides,\n setProgramConfigurationOverrides,\n} from \"./programConfigurationStore\";\nimport { clearProgramBrandingOverrides, setProgramBrandingOverrides } from \"./programBrandingStore\";\nimport { setPreviewMessages, clearPreviewMessages } from \"./previewMessages\";\nimport { setPreviewMock } from \"./previewResponse\";\nimport { disableMockProgram } from \"./mockProgram\";\nimport { clearPreviewFormState, setPreviewFormState } from \"./previewFormStateStore\";\n\n/**\n * Branding edits, in the `ProgramBranding` shape. MySheerID sends the whole branding, `fonts[]`\n * included: the form registers only fonts listed there, so a font the theme references must be in it.\n * Edits accumulate (each call deep-merges onto the last) and `clearPreview` drops them;\n * `{ brandTheme: null }` goes back to the program's theme choices.\n */\nexport function setPreviewBranding(branding: DeepPartial<ProgramBranding>): void {\n setProgramBrandingOverrides(branding);\n}\n\n/** Configuration edits, in the `ProgramConfiguration` shape. */\nexport function setPreviewConfiguration(configuration: DeepPartial<ProgramConfiguration>): void {\n setProgramConfigurationOverrides(configuration);\n}\n\n/** Merge a partial verification-response override onto the current response. */\nexport function setPreviewResponse(patch: Partial<AllResponseTypes>): void {\n setPreviewOverrides({ response: patch });\n}\n\n/** Switch the previewed locale without teardown (re-fetches messages via the existing action). */\nexport function setPreviewLocale(locale: Locale): Promise<object> {\n const store = getStore();\n const { programId, verificationResponse } = store.getState();\n return createUpdateLocale(store.dispatch, programId)(locale, verificationResponse?.segment);\n}\n\nexport function clearPreview(): void {\n // Capture message locales before clearing the store, so we can also drop them from i18next.\n const messageLocales = Object.keys(programStore.get().overrides.messages ?? {}) as Locale[];\n clearPreviewOverrides();\n clearProgramConfigurationOverrides();\n clearProgramBrandingOverrides();\n clearPreviewMessages(messageLocales);\n clearPreviewFormState();\n disableMockProgram();\n}\n\nexport { setPreviewMessages, setPreviewMock, setPreviewFormState };\n","import { type Flags } from \"@jslib/shared/flags\";\nimport { InstallTypes, setInstallType } from \"@jslib/shared/utils/getInstallType\";\n\nimport {\n type Locale,\n type MockStep,\n type Options,\n type ProgramThemeResponse,\n type ProgramThemeMessages,\n type Segment,\n} from \"../types/types\";\n\nimport \"../../scss/sheerid-iframe.scss\";\nimport { getMessages } from \"../intl/intl\";\nimport { setProgramTheme } from \"../VerificationService/ProgramTheme/ProgramTheme\";\nimport { VerificationFormEs5 } from \"../../es5Bindings/VerificationFormEs5\";\nimport { resetOptions, setOptions } from \"../../options/options\";\nimport { resetStore } from \"../VerificationService/VerificationServiceStore\";\nimport { enableMockProgram } from \"../state/mockProgram\";\nimport { reapplyPreviewFormState } from \"../state/previewFormStateStore\";\nimport {\n clearPreview,\n setPreviewBranding,\n setPreviewConfiguration,\n setPreviewFormState,\n setPreviewLocale,\n setPreviewMessages,\n setPreviewMock,\n setPreviewResponse,\n} from \"../state/previewApi\";\n\n// MySheerID's program builder is the only consumer of this bundle, so everything\n// it renders is a preview and reports itself as one.\nsetInstallType(InstallTypes.programBuilderPreview);\n\nexport function loadInElement(containerElement: HTMLElement, programId: string) {\n const form = new VerificationFormEs5(containerElement, programId);\n return form;\n}\n\n/** What `renderMockProgram` renders. `collect` resolves to the mocked program's collect step. */\nexport interface MockProgramConfig {\n step: MockStep;\n}\n\n/**\n * Render a single step of a mocked program — no programId, and no calls to the verification\n * service. For previewing branding in the theme designer, before a program exists.\n *\n * Theming is not part of this call. Apply it with `setPreviewBranding` / `setPreviewConfiguration` / `setPreviewMessages`, either before this call (the first paint is then already themed) or after it (the form re-renders in place, no teardown). Rendering a different step is a fresh call.\n * `setPreviewBranding` takes the whole branding, `fonts[]` included: its brand theme replaces the program's.\n *\n * `setPreviewFormState` switches the collect step between empty, filled and errored, the same way. A state selected before this call is applied once the new form is ready.\n *\n * The rendered form is for display only; it is not a working verification and must not be submitted.\n */\nexport function renderMockProgram(\n containerElement: HTMLElement,\n config: MockProgramConfig,\n): VerificationFormEs5 {\n enableMockProgram();\n setOptions({\n mockStep: config.step,\n mockSegment: \"student\",\n });\n const form = new VerificationFormEs5(containerElement, undefined);\n reapplyPreviewFormState();\n return form;\n}\n\nexport function setProgramThemeChoices(theme: ProgramThemeResponse) {\n setProgramTheme(theme);\n}\n\nexport function setProgramOptions(options: Options) {\n resetStore(); // Some options (e.g. locale) aren't correctly changed without resetting the store\n setOptions(options);\n}\n\nexport function resetProgramOptions() {\n resetOptions();\n}\n\nexport function getFeatureFlags(callback: (flags: Flags) => void) {\n setOptions({\n _launchDarklyFlagCb: callback,\n });\n}\n\nexport function getProgramMessages(\n locale: Locale,\n programThemeMessages: ProgramThemeMessages,\n segment?: Segment,\n) {\n return getMessages(locale, programThemeMessages, segment);\n}\n\n// Re-exported as named exports so consumers can import them the same way as the legacy functions\n// above (which are `export function`). This file is the public bundle API; jslib-internal code\n// should import these from `../state/previewApi`, not from here.\nexport {\n setPreviewBranding,\n setPreviewConfiguration,\n setPreviewMessages,\n setPreviewResponse,\n setPreviewMock,\n setPreviewLocale,\n setPreviewFormState,\n clearPreview,\n};\n\nexport default {\n loadInElement,\n renderMockProgram,\n getProgramMessages,\n getFeatureFlags,\n setProgramThemeChoices,\n setProgramOptions,\n resetProgramOptions,\n setPreviewBranding,\n setPreviewConfiguration,\n setPreviewMessages,\n setPreviewResponse,\n setPreviewMock,\n setPreviewLocale,\n setPreviewFormState,\n clearPreview,\n};\n"],"ignoreList":[0,2,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,SAAgBkQ,GAAgB,EAC9B,SACA,cACA,eACC;CACD,IAAMC,KAAA,GAAQnQ,EAAAA,QAAAA,QAAe;EAC3B;EACA;CACF,IAAI,CAACoQ,GAAMC,CAAS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EAAS,GACjB,EAAE,cAAW,4BAAyB2F,EAAM,SAAS;CAC3D,OAAOxF,GAAmBwF,EAAM,UAAUsD,CAAS,CAAC,CAAC6d,GAAQjgB,GAAsB,OAAO;AAC5F;AAEA,SAAgBkjB,KAAqB;CAEnC,IAAMC,IAAiB,OAAO,KAAK7tB,EAAa,IAAI,CAAC,CAAC,UAAU,YAAY,CAAC,CAAC;CAM9E,AALAC,GAAsB,GACtBJ,GAAmC,GACnCK,GAA8B,GAC9B6sB,GAAqBc,CAAc,GACnCjB,GAAsB,GACtBrqB,GAAmB;AACrB;;;ACxBA/D,GAAeJ,GAAa,qBAAqB;AAEjD,SAAgB0vB,GAAc,GAA+B,GAAmB;CAE9E,OAAO,IADUjC,GAAoBkC,GAAkBjhB,CAChD;AACT;AAkBA,SAAgBkhB,GACd,GACA,GACqB;CAErB,AADA3rB,GAAkB,GAClBvF,EAAW;EACT,UAAUmxB,EAAO;EACjB,aAAa;CACf,CAAC;CACD,IAAMC,IAAO,IAAIrC,GAAoBkC,GAAkB,KAAA,CAAS;CAEhE,OADAlB,GAAwB,GACjBqB;AACT;AAEA,SAAgBC,GAAuB,GAA6B;CAClE,GAAgBC,CAAK;AACvB;AAEA,SAAgBC,GAAkB,GAAkB;CAElD,AADA9qB,GAAW,GACXzG,EAAWgN,CAAO;AACpB;AAEA,SAAgBwkB,KAAsB;CACpC,EAAa;AACf;AAEA,SAAgBC,GAAgB,GAAkC;CAChE,EAAW,EACT,qBAAqB/iB,EACvB,CAAC;AACH;AAEA,SAAgBgjB,GACd,GACA,GACA,GACA;CACA,OAAOrxB,EAAYwtB,GAAQ8D,GAAsB1jB,CAAO;AAC1D;AAgBA,IAAA2jB,KAAe;CACb;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
1
|
+
{"version":3,"file":"_mysheerid-preview.js","names":["useMemo","createElement","Spinner","_Fragment","_Fragment","produce","_Fragment","_Fragment","_Fragment","produce","_Fragment","Suspense","useSyncExternalStore","isClickLikeOpenEvent","isClickLikeOpenEventShared","REASONS.triggerHover","isInsideEnabledTrigger","isClickLikeOpenEvent","isClickLikeOpenEventShared","REASONS.triggerHover","isInsideEnabledTrigger","_formatErrorMessage","REASONS.triggerHover","REASONS.imperativeAction","REASONS.focusOut","PopoverTrigger","_formatErrorMessage","_formatErrorMessage","_formatErrorMessage","_formatErrorMessage","PopoverPrimitive.Root","PopoverPrimitive.Trigger","PopoverPrimitive.Portal","PopoverPrimitive.Positioner","PopoverPrimitive.Popup","createContext","useContext","_Fragment","_Fragment","Suspense","useLDClient","useMemo","deterministicStringify","produce","flatten","i18next","Suspense","LoadingScreen","LoadStep","LDProvider","i18next","CustomMetricNames","recordCTAClickEvent","observePerformanceMetrics","addThemeMessages","require_flat","i18next_default","setUserDimension","Namespace","recordEvent","addOptionsMessages","getSafe","deepClone","__toESM","CustomDimensionNames","setOptions","QUERY_STRING_PREV_STEP_OVERRIDE","F","isValidHttpUrl","getFieldValidationErrorsEmpty","getMessages","getOptionsMessages","resetOptions","getOptions","recordGaEvent","getOption","QUERY_STRING_THIRD_PARTY_PROVIDER_OVERRIDE","getLocaleSafely","EventName","assertValidHtmlElement","fn","logger","VerificationStepsEnum","ThirdPartyLoopProvider","MockStepsEnum","isCollectStep","useRefWithInit","InstallTypes","isElement","formatErrorMessage","useStableCallback","setInstallType","getInstallType","Button","useRenderElement","NOOP","BrandThemeProvider","buttonVariants","EMPTY_OBJECT","StepLogo","useBrandTheme","StepFrame","useIsEmbedded","StepHeading","StepHeader","cva","useButton","useIsoLayoutEffect","isHTMLElement","createStore","require_react_dom","Provider","clearProgramConfigurationOverrides","mergeProgramI18nBaseline","mergeProgramConfigurationBaseline","programStore","clearPreviewOverrides","clearProgramBrandingOverrides","setProgramBrandingOverrides","require_jsx_runtime","setProgramConfigurationOverrides","selectResponseOverride","selectPreviewMessages","setPreviewOverrides","useSegment","linkClassName","useLoadingState","useProgramBranding","useProgramTheme","useProgramMessages","getBrandFaqUrl","cn","useProgramId","useMessage","I18nContext","LinkExternal","useProgramConfiguration","mergeProgramBaseline","useFaqHref","require_react","TextLink","Message","require_shim","useAppDispatch","useVerificationId","connect","useStore","useVerificationResponse","listenToInstallPage","require_json_stable_stringify","splitProgramTheme","speakToOuterFrame","enableMockProgram","appendClientParams","disableMockProgram","getPublishedVersion","getRouteOverride","getPreviousStepOverride","getQueryOrOption","getOverriddenMock","hooks","addPredefinedHooks","postMessageFromIframe","getRemainingRewardCodes","addHook","createFetchExistingVerificationRequest","createSubmitStep","createUpdateProgramTheme","createUpdateViewModel","getEmptyViewModel","resetStore","createUpdateFieldValidationErrors","hasFailedInstantMatch","setViewModel","createFetchNewVerificationRequest","fieldIdErrorMap","getStore","createResetState","useSubmissionOptInMetadata","createUpdateLocale","getTabRef","setTabRef","closeTabRef","IntlProvider","se","R","useFlags","flagDefaults","useFlag","DirectionContext","useAnchorPositioning","usePositioner","getDisabledMountTransitionStyles","useAnchoredPopupScrollLock","LoadingSpinnerComponent","dashed","useStepFooter","Timeout","getTarget","useTimeout","contains","ownerDocument","FloatingPortal","isOutsideEvent","useClick","popupTransitionStateMapping","useFloatingNodeId","FloatingTree","fastComponent","getNodeChildren","isMouseLikePointerType","fastComponentRef","getNextTabbable","useFloatingParentNodeId","POPUP_COLLISION_AVOIDANCE","getTabbableAfterElement","useDismiss","FloatingNode","triggerOpenStateMapping","usePopupRootStore","mergeCleanups","inertValue","FloatingRootStore","isTargetInsideEnabledTrigger","PopupTriggerMap","attachPreventUnmountOnClose","createDefaultInitialFocus","usePopupInteractionProps","useOpenStateTransitions","InternalBackdrop","CLICK_TRIGGER_IDENTIFIER","useFloatingTree","FOCUSABLE_POPUP_PROPS","useImplicitActiveTrigger","FocusGuard","usePortalContainer","createPopupOpenState","useOpenMethodTriggerProps","PortalRoot","PopupHandleAttachment","usePopupRootSync","FloatingFocusManager","pressableTriggerOpenStateMapping","ReactStore","useTriggerDataForwarding","isInteractiveElement","getTabbableBeforeElement","useOnMount","triggerHover","focusOut","createChangeEventDetails","useBaseUiId","imperativeAction","addEventListener","useAnimationsFinished","useValueAsRef","useOpenChangeComplete","import_react","I18nextProvider","value","i18n","defaultNS","children","setProgramI18nFromTheme","intl","partial","setProgramTheme","store","state","doSet","newProgramTheme","programTheme","programI18n","options","programConfiguration","import_jsx_runtime","DirectionProvider","props","contextValue","direction","import_flat","import_json_stable_stringify","import_react_dom","DirectionRoot","selectFormValidationOptions","verificationResponse","LoadingScreenMessage","step","LoadingScreenComponent","FaqLinkComponent","segment","faqHref","linkText","msg","PoweredByComponent","hideFaqLink","usePollingInterval","timerRef","stopInterval","callback","pollTime","SSOPendingContent","ButtonType","messages","cancelButtonType","cancelSingleSignOn","SSOContentComponent","dashedStepName","updateViewModelAndOpenLoginTab","\"PRIMARY\"","\"SECONDARY\"","SingleSignOnComponent","verificationService","viewModel","previousViewModel","previousVerificationResponse","isMockingStep","stepName","stepFooter","timeout","pollForVerificationServiceUpdates","programId","verificationId","updateViewModel","nextState","key","cancelSingleSignOnStep","openLoginTab","loginUrl","ssoMessages","StepSSOComponent","ReviewPendingComponent","IDCheckLoopPendingComponent","thirdPartyLoopMessageMap","ThirdPartyLoopError","StepThirdPartyLoopComponent","ThirdPartyLoopPendingComponent","thirdPartyLoopMessages","isMockingPreviousStepThirdPartyLoop","verificationLastResponse","cancelThirdPartyLoop","DOC_UPLOAD_FAST_POLL_DURATION","DOC_UPLOAD_FAST_POLL_WINDOW","DOC_UPLOAD_POLL_DURATION","SINGLE_SIGN_ON_POLL_DURATION","StepPendingComponent","isMockingPreviousStepSSO","isMockingPreviousStepIdCheckLoop","footerTextRef","isPreviousStepSSO","isPreviousStepThirdPartyLoop","isPreviousStepIdCheckLoop","isSsoOrThirdPartyLoopPath","isIdCheckLoopPath","isDocUploadPath","setPollTime","timeoutId","stopPollingInterval","showSSO","showThirdPartyLoop","showIdCheckLoop","TryAgainButtonComponent","dispatch","currentSegment","tryAgainHandler","url","ConfiguredTryAgainAction","tryAgainButton","allowReset","TryAgainActionType","PostMessageButton","RedirectButton","redirectUrl","assertValidTryAgainAction","action","LegacyTryAgainAction","TryAgainActionComponent","CONTACT_SUPPORT_ERROR_IDS","useErrorTitleId","firstErrorId","errorIds","ErrorMsg","displayErrorMessageIds","errorDetailId","errId","errMsgId","ErrorNote","noteMessageId","ErrorButton","branding","faqUrl","StepErrorComponent","responseErrorIds","errorIdsSet","errorId","titleId","showContactSupport","defaultComponents","n","getComponent","componentName","getLoadingScreen","LoadStepComponent","stepToLoad","Component","CustomTextWrapper","dangerouslySetInnerHTML","TestModeFlagComponent","resolveValue","pointerType","getDelay","result","prop","getRestMs","isClickLikeOpenEvent","interactedInside","openEventType","isHoverOpenEvent","createInitialPopupStoreState","activeTriggerIdSelector","openSelector","popupIdSelector","triggerOwnsOpenPopup","triggerId","triggerOwnsOpenPopupOrIsOnlyTrigger","popupStoreSelectors","isActive","import_shim","usePopupHandleStore","subscribe","handle","listener","getSnapshot","HoverInteraction","pointerEventsMutationOwnerByScopeElement","clearSafePolygonPointerEventsMutation","instance","scopeElement","applySafePolygonPointerEventsMutation","existingOwner","referenceElement","floatingElement","useHoverInteractionSharedState","data","useHoverFloatingInteraction","closeDelayProp","nodeIdProp","parameters","context","open","domReferenceElement","tree","parentId","childClosedTimeout","isClickLikeOpenEvent$2","dataRef","isHoverOpen","clearPointerEvents","enabled","ref","floatingEl","doc","parentFloating","node","cachedScopeElement","parentScopeElement","hasParentChildren","closeWithDelay","closeDelay","close","event","handleInteractInside","target","onFloatingMouseEnter","onNodeClosed","onFloatingMouseLeave","currentNodeId","relatedTarget","floating","EMPTY_REF","useHoverReferenceInteraction","shouldOpenProp","externalTree","isHoverCloseActiveRef","handleCloseRef","handleClose","delayRef","delay","restMsRef","restMs","enabledRef","shouldOpenRef","isClosingRef","isClosing","isClickLikeOpenEvent$1","checkShouldOpen","isOverInactiveTrigger","allTriggers","currentTarget","currentDomReference","targetElement","trigger","cleanupMouseMoveHandler","isActiveTrigger","onOpenChangeLocal","details","events","runElseBranch","triggerElementRef","onMouseEnter","mouseOnly","restMsValue","openDelay","eventTarget","triggerNode","triggerElement","isOverInactive","isOpen","isInClosingTransition","isHoverCloseTransition","isReenteringSameTriggerDuringCloseTransition","isRestOnlyDelay","shouldOpenImmediately","shouldOpen","onMouseLeave","handleCloseContextBase","getHandleCloseContext","currentTrigger","onMouseOut","staleOpenGuard","guardStaleOpen","move","setPointerRef","currentOpen","handleMouseMove","latestOpen","nativeEvent","CURSOR_SPEED_THRESHOLD","CURSOR_SPEED_THRESHOLD_SQUARED","POLYGON_BUFFER","hasIntersectingEdge","yi","pointY","yj","pointX","xj","xi","isPointInQuadrilateral","isInsideValue","x1","y1","x2","y2","x3","y3","x4","y4","isInsideRect","rect","isInsideAxisAlignedRect","safePolygon","side","placement","hasLanded","lastX","lastY","lastCursorTime","isCursorMovingSlowly","currentTime","elapsedTime","nextX","nextY","deltaX","deltaY","distanceSquared","thresholdSquared","onClose","domReference","elements","x","y","isLeave","isOverFloatingEl","isOverReferenceEl","hasOpenChildNode","nodeId","closeIfNoOpenChild","refRect","cursorLeaveFromRight","cursorLeaveFromBottom","isFloatingWider","isFloatingTaller","left","right","top","bottom","isInsideTroughRect","clientX","clientY","isInsidePolygon","cursorXOffset","cursorPointOneX","cursorPointTwoX","cursorPointY","commonYLeft","commonYRight","cursorYOffset","cursorPointOneY","cursorPointTwoY","cursorPointX","commonXTop","commonXBottom","PopoverRootContext","usePopoverRootContext","optional","selectors","PopoverStore","triggerElements","createInitialState","initialState","floatingId","nested","createInitialContext","isHover","eventDetails","isKeyboardClick","isDismissClose","nextOpen","shouldPreventUnmountOnClose","activeTriggerId","changeState","popupOpenState","instantType","PopoverRootComponent","openProp","triggerIdProp","defaultTriggerIdProp","usePopoverRootStore","defaultOpen","mounted","payload","onOpenChange","onOpenChangeComplete","forceUnmount","shouldRenderInteractions","PopoverInteractions","PopoverRoot","floatingRootContext","dismiss","modal","triggerProps","popupProps","useTriggerFocusGuards","preFocusGuardRef","handlePreFocusGuardFocus","handleFocusTargetFocus","positionerElement","nextTabbable","prevTabbable","PopoverTrigger$1","idProp","elementProps","componentProps","rootStore","thisTriggerId","isTriggerActive","floatingContext","isOpenedByThisTrigger","popupId","openReason","stickIfOpen","openMethod","focusManagerModal","hoverProps","disabled","openOnHover","click","interactionTypeProps","interactionType","rootTriggerProps","isMountedByThisTrigger","nativeButton","stateAttributesMapping","element","buttonRef","forwardedRef","registerTrigger","getButtonProps","keyedElement","PopoverPortalContext","usePopoverPortalContext","PopoverPortal","portalProps","keepMounted","PopoverPositionerContext","usePopoverPositionerContext","PopoverPositioner","transitionStatus","adaptiveOrigin","prevTriggerElementRef","runOnceAnimationsFinish","positioning","currentTriggerElement","prevTriggerElement","ac","trueModalNonHover","setPositionerElement","ARROW_UP","ARROW_DOWN","ARROW_LEFT","ARROW_RIGHT","HOME","COMPOSITE_KEYS","SHIFT","MODIFIER_KEYS","isInputElement","isNativeInput","scrollIntoViewIfNeeded","scrollContainer","targetX","targetY","isOverflowingX","isOverflowingY","orientation","elementOffsetLeft","getOffset","containerStyles","getStyles","elementStyles","elementOffsetTop","propName","ancestor","styles","ToolbarRootContext","useToolbarRootContext","ClosePartContext","useClosePartCount","closePartCount","setClosePartCount","register","count","PopoverPopup","positioner","insideToolbar","closePartContext","descriptionId","activeTriggerElement","resolvedInitialFocus","initialFocus","hasClosePart","setPopupElement","finalFocus","Popover","PopoverTrigger","PopoverContent","portalContainer","container","className","HowDoesVerifyingWorkComponent","initialVisibility","alertVariants","Alert","AlertTitle","AlertDescription","LowRewardPoolNote","LandingSidePanelContext","LandingSidePanelProvider","useLandingSidePanel","PersonalInfoStepIntro","inLandingSide","sidePanelShowsIntro","failedInstantMatch","titleMsgId","subtitleMsgId","title","LANDING_MIN_HEIGHT","Layout","layout","renderAsLandingPage","isEmbedded","splitRight","fullRight","center","FormWrapperComponent","NewVerificationInnerComponent","programThemeProp","verificationServiceProp","ldClient","responseOverride","flags","stringFlags","metadata","metadataWithFlags","newViewModel","_launchDarklyUserTargeting","identity","previewMessages","messagesWithOptions","locale","renderAs","loadingStep","isLoading","trapFocus","lastFocusableElement","e","focusableContent","maintainFocusInLightbox","NewVerification","NewVerificationComponent","ownProps","otherDispatchProps","propsFromDispatch","propsFromState","getLDProgramContext","FlagProvider","VerificationForm","VerificationFormEs5","trackingId","previewFormStateStore","FILLED_VALUES","getAllFieldsErrored","errors","fieldId","applyFormState","filled","formState","empty","whenFormReady","response","setPreviewFormState","prev","clearPreviewFormState","reapplyPreviewFormState","setPreviewMessages","clearPreviewMessages","locales","MOCK_OPTION_KEYS","setPreviewMock","optionPatch","directives","optionKey","setPreviewBranding","setPreviewConfiguration","configuration","setPreviewResponse","patch","setPreviewLocale","clearPreview","messageLocales","loadInElement","containerElement","renderMockProgram","config","form","setProgramThemeChoices","theme","setProgramOptions","resetProgramOptions","getFeatureFlags","getProgramMessages","programThemeMessages","_mysheerid_preview_default"],"sources":["../../node_modules/react-i18next/dist/es/I18nextProvider.js","../src/lib/VerificationService/ProgramTheme/ProgramTheme.ts","../../node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs","../../packages/ui/src/components/direction-root.tsx","../src/lib/VerificationService/formValidationOptions.ts","../src/components/LoadingScreen/LoadingScreenMessage.tsx","../src/components/LoadingScreen/LoadingScreenComponent.tsx","../src/components/FaqLink/FaqLinkComponent.tsx","../src/components/PoweredBy/PoweredByComponent.tsx","../src/lib/utils/usePollingInterval/usePollingInterval.ts","../src/components/StepPending/SSOPendingContent.tsx","../src/components/StepSSO/SSOContentComponent.tsx","../src/components/SingleSignOnComponent.tsx","../src/components/StepSSO/StepSSOComponent.tsx","../src/components/StepPending/ReviewPendingComponent.tsx","../src/components/StepPending/IDCheckLoopPendingComponent.tsx","../src/components/StepThirdPartyLoop/StepThirdPartyLoopComponent.tsx","../src/components/StepPending/ThirdPartyLoopPendingComponent.tsx","../src/components/StepPending/StepPendingComponent.tsx","../src/components/TryAgainButtonComponent.tsx","../src/components/ConfiguredTryAgainAction.tsx","../src/components/LegacyTryAgainAction.tsx","../src/components/TryAgainAction.tsx","../src/components/StepError/StepErrorComponent.tsx","../src/components/LoadStepComponent.tsx","../src/components/CustomTextWrapper.tsx","../src/components/TestModeFlag/TestModeFlagComponent.tsx","../../node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs","../../node_modules/@base-ui/react/utils/popups/store.mjs","../../node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs","../../node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs","../../node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs","../../node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs","../../node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs","../../node_modules/@base-ui/react/popover/root/PopoverRootContext.mjs","../../node_modules/@base-ui/react/popover/store/PopoverStore.mjs","../../node_modules/@base-ui/react/popover/root/PopoverRoot.mjs","../../node_modules/@base-ui/react/utils/popups/useTriggerFocusGuards.mjs","../../node_modules/@base-ui/react/popover/trigger/PopoverTrigger.mjs","../../node_modules/@base-ui/react/popover/portal/PopoverPortalContext.mjs","../../node_modules/@base-ui/react/popover/portal/PopoverPortal.mjs","../../node_modules/@base-ui/react/popover/positioner/PopoverPositionerContext.mjs","../../node_modules/@base-ui/react/popover/positioner/PopoverPositioner.mjs","../../node_modules/@base-ui/react/internals/composite/composite.mjs","../../node_modules/@base-ui/react/toolbar/root/ToolbarRootContext.mjs","../../node_modules/@base-ui/react/utils/closePart.mjs","../../node_modules/@base-ui/react/popover/popup/PopoverPopup.mjs","../../packages/ui/src/components/popover.tsx","../src/components/HowDoesVerifyingWork/HowDoesVerifyingWorkComponent.tsx","../../packages/ui/src/components/alert.tsx","../src/components/RewardsRemaining/LowRewardPoolNote.tsx","../src/components/Layout/LandingSidePanel.tsx","../src/components/PersonalInfoStepIntro/PersonalInfoStepIntro.tsx","../src/components/Layout/Layout.tsx","../src/components/FormWrapper/FormWrapperComponent.tsx","../src/components/NewVerificationInnerComponent.tsx","../src/lib/frames/windowFocus.ts","../src/components/NewVerificationComponent.tsx","../src/components/FeatureFlags/FlagProvider.tsx","../src/components/VerificationForm/VerificationFormComponent.tsx","../src/es5Bindings/VerificationFormEs5.tsx","../src/lib/state/previewFormStateStore.ts","../src/lib/state/previewMessages.ts","../src/lib/state/previewResponse.ts","../src/lib/state/previewApi.ts","../src/lib/installScript/_mysheerid-preview.ts"],"sourcesContent":["import { createElement, useMemo } from 'react';\nimport { I18nContext } from './context.js';\nexport function I18nextProvider({\n i18n,\n defaultNS,\n children\n}) {\n const value = useMemo(() => ({\n i18n,\n defaultNS\n }), [i18n, defaultNS]);\n return createElement(I18nContext.Provider, {\n value\n }, children);\n}","import { logger } from \"@jslib/shared/utils/logger\";\n\nimport { addThemeMessages } from \"@/lib/intl/i18next\";\n\nimport { type ProgramI18n, type ProgramThemeResponse, type ReduxState } from \"../../types/types\";\nimport { type DeepPartial } from \"../../types/helpers\";\nimport { deepClone } from \"../../utils/objects\";\nimport { createUpdateProgramTheme } from \"../VerificationServiceActions\";\nimport { getStore } from \"../VerificationServiceStore\";\nimport { addHook } from \"../../hooks\";\nimport { mergeProgramBaseline } from \"../../state/programStore\";\nimport { mergeProgramI18nBaseline } from \"../../state/programI18nStore\";\nimport { mergeProgramConfigurationBaseline } from \"../../state/programConfigurationStore\";\nimport { splitProgramTheme } from \"../../ProgramTheme/splitProgramTheme\";\n\n/**\n * Legacy callers still pass the program's i18n inside the theme. Load it into i18next's \"theme\" namespace and the i18n store, as `setProgramTheme` always has. react-intl's messages are not rebuilt; they never were.\n */\nconst setProgramI18nFromTheme = (intl: DeepPartial<ProgramI18n>, partial: boolean) => {\n if (intl.locale && intl.messages) {\n addThemeMessages(intl as ProgramI18n);\n }\n mergeProgramI18nBaseline(intl, partial);\n};\n\nexport const setProgramTheme = (\n newProgramTheme: DeepPartial<ProgramThemeResponse> | {},\n options: { partial: boolean } = { partial: true },\n) => {\n const store = getStore();\n const state: ReduxState = store.getState();\n const doSet = () => {\n const { programTheme, programConfiguration, programI18n } = splitProgramTheme(\n deepClone(newProgramTheme) as DeepPartial<ProgramThemeResponse>,\n );\n logger.info(\"Setting programTheme\", programTheme);\n\n // Execute before the theme writes below, since those re-render the i18n and configuration consumers.\n if (programI18n) {\n setProgramI18nFromTheme(programI18n, options.partial);\n }\n if (programConfiguration) {\n mergeProgramConfigurationBaseline(programConfiguration, options.partial);\n }\n createUpdateProgramTheme(store.dispatch)(programTheme, options.partial);\n mergeProgramBaseline(programTheme, options.partial);\n };\n\n if (state.isLoading) {\n addHook({\n name: \"ON_VERIFICATION_READY\",\n callback: () => {\n doSet();\n },\n });\n } else {\n doSet();\n }\n};\n","'use client';\n\nimport * as React from 'react';\nimport { DirectionContext } from \"../internals/direction-context/DirectionContext.mjs\";\n\n/**\n * Enables RTL behavior for Base UI components.\n *\n * Documentation: [Base UI Direction Provider](https://base-ui.com/react/utils/direction-provider)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DirectionProvider = function DirectionProvider(props) {\n const {\n direction = 'ltr'\n } = props;\n const contextValue = React.useMemo(() => ({\n direction\n }), [direction]);\n return /*#__PURE__*/_jsx(DirectionContext.Provider, {\n value: contextValue,\n children: props.children\n });\n};\nif (process.env.NODE_ENV !== \"production\") DirectionProvider.displayName = \"DirectionProvider\";","import type React from \"react\";\nimport { type ReactNode } from \"react\";\nimport { DirectionProvider, type TextDirection } from \"@base-ui/react/direction-provider\";\n\ninterface DirectionRootProps {\n direction: TextDirection;\n className?: string;\n children: ReactNode;\n}\n\n// DirectionProvider renders no element, so this div carries `dir` for the DOM while the\n// provider gives Base UI components the same direction.\nexport const DirectionRoot: React.FC<DirectionRootProps> = ({ direction, className, children }) => (\n <div dir={direction} className={className}>\n <DirectionProvider direction={direction}>{children}</DirectionProvider>\n </div>\n);\n","import {\n type FormValidationOptions,\n type ProgramConfiguration,\n type VerificationResponse,\n type ViewModel,\n} from \"../types/types\";\n\n/** Derives form validation options from the effective configuration, response, and view model. */\nexport const selectFormValidationOptions = (\n programConfiguration: ProgramConfiguration | undefined,\n verificationResponse: VerificationResponse | undefined,\n viewModel: ViewModel | undefined,\n): FormValidationOptions => ({\n minAge: verificationResponse?.minAge || programConfiguration?.minAge,\n maxAge: verificationResponse?.maxAge || programConfiguration?.maxAge,\n smsLoopEnabled: programConfiguration?.smsLoopEnabled,\n strictMilitaryValidationEnabled: programConfiguration?.strictMilitaryValidationEnabled,\n transitionalMilitaryValidityDays: programConfiguration?.transitionalMilitaryValidityDays,\n currentStep: verificationResponse?.currentStep,\n viewModel,\n});\n","import { Message } from \"@/components/Message\";\n\nimport { isCollectStep } from \"../../lib/types/runtimeTypes\";\nimport { type VerificationStep } from \"../../lib/types/types\";\n\ninterface Props {\n step: VerificationStep;\n}\n\nexport default function LoadingScreenMessage({ step }: Props) {\n return (\n <div>\n {isCollectStep(step) && (\n // Subtitle size: the body size, scaled up a quarter\n <div className=\"text-center text-[calc(var(--body-size)*1.25)] font-bold\" role=\"alert\">\n <Message id=\"step.personalInfo.verifyingTitle\" />\n </div>\n )}\n\n <div className=\"text-center\">\n <Message id=\"step.personalInfo.verifyingSubtitle\" />\n </div>\n </div>\n );\n}\n","import React from \"react\";\n\nimport { type VerificationStep } from \"../../lib/types/types\";\nimport { LoadingSpinnerComponent as Spinner } from \"../LoadingSpinner/LoadingSpinnerComponent\";\n\nimport LoadingScreenMessage from \"./LoadingScreenMessage\";\n\ninterface Props {\n step?: VerificationStep;\n}\n\n// eslint-disable-next-line react/prop-types\nconst LoadingScreenComponent: React.FC<Props> = ({ step }) => (\n <div className=\"flex min-h-125 w-full flex-col items-center justify-center\">\n <Spinner />\n {step && (\n // This is itself a Suspense fallback, and the message suspends until its catalog has loaded;\n // without its own boundary that suspends the fallback and unmounts the whole app.\n <React.Suspense fallback={null}>\n <LoadingScreenMessage step={step} />\n </React.Suspense>\n )}\n </div>\n);\n\nexport { LoadingScreenComponent };\n","import { TextLink } from \"@jslib/ui/components/text-link\";\n\nimport { useMessage } from \"@/components/Message\";\nimport { useSegment } from \"@/lib/state/contextHooks\";\n\nimport { LinkExternal } from \"../LinkExternal\";\n\nimport { useFaqHref } from \"./useFaqHref\";\n\ninterface Props {\n linkText?: string;\n}\n\nexport const FaqLinkComponent = ({ linkText }: Props) => {\n const segment = useSegment();\n const faqHref = useFaqHref();\n const { msg } = useMessage();\n\n if (!segment) return null;\n\n return (\n <LinkExternal as={TextLink} href={faqHref}>\n {linkText || msg({ id: \"getHelp\" })}\n </LinkExternal>\n );\n};\n","import Message from \"@components/Message\";\n\nimport { FaqLinkComponent } from \"../FaqLink/FaqLinkComponent\";\n\ninterface Props {\n hideFaqLink?: boolean;\n}\n\n/** The centred \"powered by SheerID\" line and help link that close a step's footer. */\nexport const PoweredByComponent = ({ hideFaqLink = false }: Props) => (\n <div className=\"flex flex-col items-center gap-2 text-center\">\n <Message id=\"poweredBy\" />\n {!hideFaqLink && <FaqLinkComponent />}\n </div>\n);\n","import React from \"react\";\n\nexport const usePollingInterval = (callback, pollTime) => {\n const timerRef = React.useRef(null);\n\n function stopInterval() {\n clearInterval(timerRef.current);\n }\n\n React.useEffect(() => {\n timerRef.current = setInterval(callback, pollTime);\n\n return () => stopInterval();\n }, [callback, pollTime]);\n\n return stopInterval;\n};\n","import { Button } from \"@jslib/ui/components/button\";\n\nimport Message from \"@/components/Message\";\n\nimport { ButtonType, type SingleSignOnMessages } from \"../SingleSignOnComponent\";\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\ninterface SingleSignOnProps {\n messages: SingleSignOnMessages;\n cancelSingleSignOn: () => void;\n cancelButtonType?: ButtonType;\n}\n\nexport const SSOPendingContent = ({\n messages,\n cancelSingleSignOn,\n cancelButtonType = ButtonType.PRIMARY,\n}: SingleSignOnProps) => (\n <>\n <StepHeader titleId={messages.title} />\n <p className=\"text-center\">\n <Message id={messages.subtitle} />\n </p>\n {messages.subtitle2 && (\n <p className=\"text-center\">\n <Message id={messages.subtitle2} />\n </p>\n )}\n <Button\n variant={cancelButtonType === ButtonType.SECONDARY ? \"light\" : \"primary\"}\n type=\"submit\"\n onClick={cancelSingleSignOn}\n >\n <Message id={messages.cancel} />\n </Button>\n </>\n);\n","import type React from \"react\";\n\nimport { Button } from \"@jslib/ui/components/button\";\n\nimport Message from \"@/components/Message\";\n\nimport { type SSOContentProps } from \"../SingleSignOnComponent\";\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\nconst SSOContentComponent: React.FC<SSOContentProps> = ({\n messages,\n updateViewModelAndOpenLoginTab,\n dashedStepName,\n}) => (\n <>\n <StepHeader titleId={messages.title} />\n <p className=\"text-center\">\n <Message id={messages.subtitle} />\n </p>\n <Button\n id={`sid-submit-btn-${dashedStepName}`}\n variant=\"primary\"\n type=\"submit\"\n onClick={() => updateViewModelAndOpenLoginTab(\"isSingleSignOnActive\", true)}\n >\n <Message id={messages.login} />\n </Button>\n </>\n);\nexport { SSOContentComponent };\n","import { produce } from \"immer\";\n\nimport { StepFrame } from \"@jslib/ui/components/step-frame\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport { type MessageId } from \"@/lib/intl/types\";\n\nimport {\n type SSOResponse,\n type SingleSignOnViewModel,\n type StudentPersonalInfoViewModel,\n type VerificationService,\n} from \"../lib/types/types\";\nimport { VerificationStepsEnum } from \"../lib/types/runtimeTypes\";\nimport { getRouteOverride } from \"../lib/ServerApi/TestingRouteOverrides\";\nimport { appendClientParams } from \"../lib/ServerApi/clientParams\";\nimport { closeTabRef, setTabRef, getTabRef } from \"../lib/refs/refs\";\nimport { dashed } from \"../lib/utils/strings\";\nimport { isValidHttpUrl } from \"../lib/utils/routing/Url\";\nimport { EventName, recordCTAClickEvent } from \"../lib/GoogleAnalytics/ga\";\n\nimport { useStepFooter } from \"./FormFooter/useStepFooter\";\nimport { SSOPendingContent } from \"./StepPending/SSOPendingContent\";\nimport { SSOContentComponent } from \"./StepSSO/SSOContentComponent\";\n\nexport type SingleSignOnMessages = {\n title: MessageId;\n subtitle: MessageId;\n login: MessageId;\n cancel: MessageId;\n subtitle2?: MessageId;\n};\n\nexport enum ButtonType {\n PRIMARY = \"primary\",\n SECONDARY = \"secondary\",\n}\n\nexport interface SSOContentProps {\n messages: SingleSignOnMessages;\n updateViewModelAndOpenLoginTab: (key: string, value: boolean) => void;\n dashedStepName: string;\n cancelSingleSignOn?: () => void;\n}\n\ninterface SingleSignOnProps {\n verificationService: VerificationService;\n stepName: VerificationStepsEnum.sso | VerificationStepsEnum.thirdPartyLoop;\n messages: SingleSignOnMessages;\n cancelButtonType?: ButtonType;\n}\n\nconst SingleSignOnComponent = ({\n verificationService,\n stepName,\n messages,\n cancelButtonType = ButtonType.PRIMARY,\n}: SingleSignOnProps) => {\n const { programId } = verificationService;\n const viewModel = verificationService.viewModel as SingleSignOnViewModel;\n const previousViewModel =\n (verificationService.previousViewModel as StudentPersonalInfoViewModel) || undefined;\n const verificationResponse = verificationService.verificationResponse as SSOResponse;\n const previousVerificationResponse =\n verificationService.previousVerificationResponse || undefined;\n const { verificationId, locale } = verificationService.verificationResponse;\n const isMockingStep = getRouteOverride();\n const dashedStepName = dashed(stepName);\n const stepFooter = useStepFooter();\n let timeout;\n\n const pollForVerificationServiceUpdates = () =>\n setTimeout(() => {\n verificationService.fetchExistingVerificationRequest(\n programId,\n verificationId,\n previousVerificationResponse,\n previousViewModel,\n );\n }, 1000);\n\n const updateViewModel = (key, value) => {\n const nextState = produce(viewModel, (draft) => {\n (draft[key] as any) = value;\n });\n verificationService.updateViewModel(nextState);\n };\n\n const cancelSingleSignOnStep = () => {\n recordCTAClickEvent(EventName.SSO_CANCEL_CLICKED, {\n programId,\n locale,\n verificationId,\n });\n\n closeTabRef();\n const nextState = produce(viewModel, () => {});\n logger.info(\"SingleSignOnComponent submitting cancel request\");\n clearTimeout(timeout);\n verificationService.submitStep(stepName, nextState, verificationService.verificationResponse);\n };\n\n const updateViewModelAndOpenLoginTab = (key, value) => {\n recordCTAClickEvent(EventName.SSO_SIGN_IN_CLICKED, {\n programId,\n locale,\n verificationId,\n });\n\n updateViewModel(key, value);\n openLoginTab();\n };\n\n const openLoginTab = () => {\n // Only the sso step's loginUrl navigates to the SheerID platform, which\n // reads the client params before redirecting to the identity provider.\n const loginUrl =\n stepName === VerificationStepsEnum.sso\n ? appendClientParams(verificationResponse.loginUrl)\n : verificationResponse.loginUrl;\n\n // A loginUrl with any scheme other than http(s) is never opened\n if (!isValidHttpUrl(loginUrl)) {\n logger.error(\n \"Invalid loginUrl - must be an absolute http(s) URL. Not opening the login tab.\",\n \"sso loginUrl\",\n );\n return;\n }\n\n setTabRef(window.open(loginUrl, \"_blank\"));\n getTabRef().focus();\n };\n\n if (viewModel.isSingleSignOnActive && !isMockingStep) {\n timeout = pollForVerificationServiceUpdates();\n }\n\n if (!viewModel.countryChoice && previousViewModel && previousViewModel.countryChoice) {\n updateViewModel(\"countryChoice\", previousViewModel.countryChoice);\n }\n\n return (\n <StepFrame id={`sid-step-${dashedStepName}`} {...stepFooter}>\n {viewModel.isSingleSignOnActive ? (\n <SSOPendingContent\n messages={messages}\n cancelSingleSignOn={cancelSingleSignOnStep}\n cancelButtonType={cancelButtonType}\n />\n ) : (\n <SSOContentComponent\n messages={messages}\n updateViewModelAndOpenLoginTab={updateViewModelAndOpenLoginTab}\n dashedStepName={dashedStepName}\n />\n )}\n </StepFrame>\n );\n};\n\nexport { SingleSignOnComponent };\n","import { type VerificationService } from \"../../lib/types/types\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { SingleSignOnComponent, type SingleSignOnMessages } from \"../SingleSignOnComponent\";\n\ninterface StepSSOProps {\n verificationService: VerificationService;\n}\n\nexport const ssoMessages: SingleSignOnMessages = {\n title: \"step.sso.title\",\n subtitle: \"step.sso.subtitle\",\n login: \"step.sso.login\",\n cancel: \"step.sso.cancel\",\n subtitle2: \"step.sso.subtitle2\",\n};\n\nconst StepSSOComponent = ({ verificationService }: StepSSOProps) => {\n return (\n <SingleSignOnComponent\n verificationService={verificationService}\n stepName={VerificationStepsEnum.sso}\n messages={ssoMessages}\n />\n );\n};\nexport { StepSSOComponent };\n","import type React from \"react\";\n\nimport Message from \"@components/Message\";\n\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\nexport const ReviewPendingComponent: React.FC = () => (\n <>\n <StepHeader titleId=\"step.pending.titleReview\" />\n <div className=\"flex flex-col gap-5 text-center\">\n <p>\n <Message id=\"step.pending.uploadedDocument\" />\n </p>\n <p>\n <Message id=\"step.pending.turnaroundTime\" />\n </p>\n <p>\n <Message id=\"step.pending.subtitle2\" />\n </p>\n <p>\n <Message id=\"step.pending.subtitle3\" />\n </p>\n </div>\n </>\n);\n","import type React from \"react\";\n\nimport Message from \"@components/Message\";\n\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\nexport const IDCheckLoopPendingComponent: React.FC = () => (\n <>\n <StepHeader titleId=\"step.pending.idCheckLoop.title\" />\n <div className=\"flex flex-col gap-5 text-center\">\n <p>\n <Message id=\"step.pending.idCheckLoop.subtitle\" />\n </p>\n <strong>\n <Message id=\"step.pending.idCheckLoop.subtitle2\" />\n </strong>\n </div>\n </>\n);\n","import { StepFrame } from \"@jslib/ui/components/step-frame\";\n\nimport Message from \"@/components/Message\";\n\nimport { type VerificationService, type ThirdPartyLoopResponse } from \"../../lib/types/types\";\nimport { ThirdPartyLoopProvider, VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n ButtonType,\n SingleSignOnComponent,\n type SingleSignOnMessages,\n} from \"../SingleSignOnComponent\";\nimport { StepHeader } from \"../StepHeader/StepHeader\";\n\ninterface StepThirdPartyLoopProps {\n verificationService: VerificationService;\n}\n\nexport const thirdPartyLoopMessageMap: {\n [key in ThirdPartyLoopProvider]: SingleSignOnMessages;\n} = {\n [ThirdPartyLoopProvider.SIGNZY]: {\n title: \"step.thirdPartyLoop.signzy.title\",\n subtitle: \"step.thirdPartyLoop.signzy.subtitle\",\n login: \"step.thirdPartyLoop.signzy.login\",\n cancel: \"step.thirdPartyLoop.signzy.cancel\",\n },\n};\n\nexport const ThirdPartyLoopError = () => (\n <>\n <StepHeader titleId=\"error\" />\n <p className=\"text-center\">\n <Message id=\"step.thirdPartyLoop.error\" />\n </p>\n </>\n);\n\nconst StepThirdPartyLoopComponent = ({ verificationService }: StepThirdPartyLoopProps) => {\n const verificationResponse = verificationService.verificationResponse as ThirdPartyLoopResponse;\n const messages =\n thirdPartyLoopMessageMap[verificationResponse.thirdPartyLoopProvider] || undefined;\n\n if (!messages) {\n return (\n <StepFrame id=\"sid-step-third-party-loop\">\n <ThirdPartyLoopError />\n </StepFrame>\n );\n }\n\n return (\n <SingleSignOnComponent\n verificationService={verificationService}\n stepName={VerificationStepsEnum.thirdPartyLoop}\n messages={messages}\n cancelButtonType={ButtonType.SECONDARY}\n />\n );\n};\n\nexport { StepThirdPartyLoopComponent };\n","import {\n ThirdPartyLoopError,\n thirdPartyLoopMessageMap,\n} from \"../StepThirdPartyLoop/StepThirdPartyLoopComponent\";\nimport { type ThirdPartyLoopProvider } from \"../../lib/types/runtimeTypes\";\nimport { getQueryOrOption } from \"../../lib/ServerApi/TestingRouteOverrides\";\nimport { type ThirdPartyLoopResponse } from \"../../lib/types/types\";\nimport { QUERY_STRING_THIRD_PARTY_PROVIDER_OVERRIDE } from \"../../constants\";\nimport { ButtonType } from \"../SingleSignOnComponent\";\n\nimport { SSOPendingContent } from \"./SSOPendingContent\";\n\ninterface ThirdPartyLoopPendingProps {\n cancelThirdPartyLoop: () => void;\n verificationLastResponse: ThirdPartyLoopResponse;\n isMockingPreviousStepThirdPartyLoop: boolean;\n}\n\nconst ThirdPartyLoopPending = ({\n verificationLastResponse,\n cancelThirdPartyLoop,\n isMockingPreviousStepThirdPartyLoop,\n}: ThirdPartyLoopPendingProps) => {\n const thirdPartyLoopProvider = isMockingPreviousStepThirdPartyLoop\n ? (getQueryOrOption(QUERY_STRING_THIRD_PARTY_PROVIDER_OVERRIDE) as ThirdPartyLoopProvider)\n : verificationLastResponse?.thirdPartyLoopProvider;\n\n const thirdPartyLoopMessages = thirdPartyLoopMessageMap[thirdPartyLoopProvider] || undefined;\n\n if (!thirdPartyLoopMessages) {\n return <ThirdPartyLoopError />;\n }\n\n return (\n <SSOPendingContent\n messages={thirdPartyLoopMessages}\n cancelSingleSignOn={cancelThirdPartyLoop}\n cancelButtonType={ButtonType.SECONDARY}\n />\n );\n};\n\nexport const ThirdPartyLoopPendingComponent = ThirdPartyLoopPending;\n","import React from \"react\";\nimport { produce } from \"immer\";\n\nimport { StepFrame } from \"@jslib/ui/components/step-frame\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport {\n type VerificationService,\n type StudentPersonalInfoViewModel,\n type ThirdPartyLoopResponse,\n} from \"../../lib/types/types\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { closeTabRef } from \"../../lib/refs/refs\";\nimport { PoweredByComponent } from \"../PoweredBy/PoweredByComponent\";\nimport { useSubmissionOptInMetadata } from \"../FormFooter/useSubmissionOptInMetadata\";\nimport { usePollingInterval } from \"../../lib/utils/usePollingInterval/usePollingInterval\";\nimport {\n getPreviousStepOverride,\n getRouteOverride,\n} from \"../../lib/ServerApi/TestingRouteOverrides\";\n\nimport { ssoMessages } from \"../StepSSO/StepSSOComponent\";\n\nimport { ReviewPendingComponent } from \"./ReviewPendingComponent\";\nimport { IDCheckLoopPendingComponent } from \"./IDCheckLoopPendingComponent\";\nimport { ThirdPartyLoopPendingComponent } from \"./ThirdPartyLoopPendingComponent\";\nimport { SSOPendingContent } from \"./SSOPendingContent\";\n\n// Poll fast (5s) for the first 20s after doc upload to catch quick verifications,\n// then back off to 20s. Matches the historic cadence that the removed countdown\n// implicitly produced (5s during the visible countdown, 20s after).\nconst DOC_UPLOAD_FAST_POLL_DURATION = 5000;\nconst DOC_UPLOAD_FAST_POLL_WINDOW = 20000;\nconst DOC_UPLOAD_POLL_DURATION = 20000;\nconst SINGLE_SIGN_ON_POLL_DURATION = 2000;\n\ninterface StepPendingProps {\n verificationService: VerificationService;\n}\n\nexport const StepPendingComponent = ({ verificationService }: StepPendingProps) => {\n const { programId } = verificationService;\n const { viewModel } = verificationService;\n const previousViewModel =\n (verificationService.previousViewModel as StudentPersonalInfoViewModel) || undefined;\n const verificationLastResponse =\n verificationService.verificationResponse.lastResponse ||\n verificationService.previousVerificationResponse ||\n undefined;\n const { verificationId } = verificationService.verificationResponse;\n const isMockingStep = getRouteOverride();\n const isMockingPreviousStepSSO =\n getPreviousStepOverride() && getPreviousStepOverride() === VerificationStepsEnum.sso;\n const isMockingPreviousStepThirdPartyLoop =\n getPreviousStepOverride() && getPreviousStepOverride() === VerificationStepsEnum.thirdPartyLoop;\n const isMockingPreviousStepIdCheckLoop =\n getPreviousStepOverride() && getPreviousStepOverride() === VerificationStepsEnum.idCheckLoop;\n const footerTextRef = useSubmissionOptInMetadata();\n\n const isPreviousStepSSO = (): boolean =>\n verificationLastResponse?.currentStep === VerificationStepsEnum.sso;\n\n const isPreviousStepThirdPartyLoop = (): boolean =>\n verificationLastResponse?.currentStep === VerificationStepsEnum.thirdPartyLoop;\n\n const isPreviousStepIdCheckLoop = (): boolean =>\n verificationLastResponse?.currentStep === VerificationStepsEnum.idCheckLoop;\n\n const isSsoOrThirdPartyLoopPath =\n isPreviousStepSSO() ||\n isPreviousStepThirdPartyLoop() ||\n isMockingPreviousStepSSO ||\n isMockingPreviousStepThirdPartyLoop;\n const isIdCheckLoopPath = isPreviousStepIdCheckLoop() || isMockingPreviousStepIdCheckLoop;\n const isDocUploadPath = !isSsoOrThirdPartyLoopPath && !isIdCheckLoopPath;\n\n const [pollTime, setPollTime] = React.useState<number>(() => {\n if (isSsoOrThirdPartyLoopPath) return SINGLE_SIGN_ON_POLL_DURATION;\n if (isIdCheckLoopPath) return DOC_UPLOAD_POLL_DURATION;\n return DOC_UPLOAD_FAST_POLL_DURATION;\n });\n\n React.useEffect(() => {\n if (!isDocUploadPath) return undefined;\n const timeoutId = setTimeout(\n () => setPollTime(DOC_UPLOAD_POLL_DURATION),\n DOC_UPLOAD_FAST_POLL_WINDOW,\n );\n return () => clearTimeout(timeoutId);\n }, [isDocUploadPath]);\n\n const stopPollingInterval =\n !isMockingStep &&\n usePollingInterval(() => {\n verificationService.fetchExistingVerificationRequest(\n programId,\n verificationId,\n verificationLastResponse,\n previousViewModel,\n false,\n );\n }, pollTime);\n\n const cancelSingleSignOnStep = (\n step: VerificationStepsEnum.thirdPartyLoop | VerificationStepsEnum.sso,\n ) => {\n const nextState = produce(viewModel, () => {});\n logger.info(\"StepSingleSignOnComponent submitting cancel request, step:\", step);\n stopPollingInterval();\n\n closeTabRef();\n verificationService.submitStep(step, nextState, verificationLastResponse);\n };\n\n const getPendingContent = () => {\n const showSSO = isPreviousStepSSO() || isMockingPreviousStepSSO;\n const showThirdPartyLoop =\n isPreviousStepThirdPartyLoop() || isMockingPreviousStepThirdPartyLoop;\n const showIdCheckLoop = isPreviousStepIdCheckLoop() || isMockingPreviousStepIdCheckLoop;\n\n if (showSSO) {\n return (\n <SSOPendingContent\n messages={ssoMessages}\n cancelSingleSignOn={() => cancelSingleSignOnStep(VerificationStepsEnum.sso)}\n />\n );\n }\n\n if (showThirdPartyLoop) {\n return (\n <ThirdPartyLoopPendingComponent\n cancelThirdPartyLoop={() => cancelSingleSignOnStep(VerificationStepsEnum.thirdPartyLoop)}\n verificationLastResponse={verificationLastResponse as ThirdPartyLoopResponse}\n isMockingPreviousStepThirdPartyLoop={isMockingPreviousStepThirdPartyLoop}\n />\n );\n }\n\n if (showIdCheckLoop) {\n return <IDCheckLoopPendingComponent />;\n }\n\n return <ReviewPendingComponent />;\n };\n\n return (\n <StepFrame\n id=\"sid-step-pending\"\n // The footer is empty here, with no shield or text, but still rendered so its ref can record\n // submissionOptIn.\n footerContent={isIdCheckLoopPath ? <PoweredByComponent /> : <></>}\n footerTextRef={isIdCheckLoopPath ? undefined : footerTextRef}\n >\n {getPendingContent()}\n </StepFrame>\n );\n};\n","import React from \"react\";\n\nimport { Button } from \"@jslib/ui/components/button\";\n\nimport { getSafe } from \"@jslib/shared/utils/getSafe\";\n\nimport Message from \"@components/Message\";\n\nimport { type Segment } from \"@/lib/types/types\";\nimport { useAppDispatch, useProgramId, useVerificationResponse } from \"@/lib/state/contextHooks\";\nimport {\n createFetchNewVerificationRequest,\n createResetState,\n} from \"@/lib/VerificationService/VerificationServiceActions\";\n\nconst TryAgainButtonComponent = () => {\n const dispatch = useAppDispatch();\n const programId = useProgramId();\n const verificationResponse = useVerificationResponse();\n const currentSegment = getSafe<Segment>(() => verificationResponse.segment);\n\n const tryAgainHandler = React.useCallback(() => {\n // If the program is embedded in an iframe (i.e. not directly embedded on a site),\n // we can simply reload the page to get proper state resetting (Ticket: NEXUS-135)\n if (window.self !== window.top) {\n const url = new URL(window.location.href);\n url.searchParams.delete(\"verificationId\");\n window.location.replace(url);\n return;\n }\n\n (async () => {\n const trackingId = undefined;\n const forceNewVerificationRequest = true;\n createResetState(dispatch)();\n await createFetchNewVerificationRequest(dispatch)(\n programId,\n currentSegment,\n undefined,\n trackingId,\n forceNewVerificationRequest,\n );\n })();\n }, [dispatch, programId, currentSegment]);\n\n return (\n <Button variant=\"light\" onClick={tryAgainHandler}>\n <Message id=\"tryAgain\" />\n </Button>\n );\n};\n\nexport { TryAgainButtonComponent };\n","import type React from \"react\";\n\nimport { buttonVariants } from \"@jslib/ui/components/button\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport Message from \"@components/Message\";\n\nimport { useProgramConfiguration } from \"@/lib/state/contextHooks\";\nimport { isValidHttpUrl } from \"@/lib/utils/routing/Url\";\n\nimport { TryAgainButtonComponent } from \"./TryAgainButtonComponent\";\nimport { LinkExternal } from \"./LinkExternal\";\n\ninterface Props {\n /** `false` hides a `RESET` button, for errors that resetting the form can't fix. */\n allowReset?: boolean;\n}\n\n/**\n * The Try Again button, driven by the program configuration's `tryAgainButton`. Hidden unless its mode is\n * `RESET` or `REDIRECT`.\n */\nexport const ConfiguredTryAgainAction: React.FC<Props> = ({ allowReset = true }) => {\n const tryAgainButton = useProgramConfiguration()?.tryAgainButton;\n\n switch (tryAgainButton?.mode) {\n case \"RESET\":\n return allowReset ? <TryAgainButtonComponent /> : null;\n case \"REDIRECT\":\n if (!isValidHttpUrl(tryAgainButton.url)) {\n logger.error(\"Invalid tryAgainButton redirect url - must be an absolute http(s) URL.\");\n return null;\n }\n return (\n <LinkExternal\n className={buttonVariants({ variant: \"light\" })}\n href={tryAgainButton.url}\n target=\"_top\"\n >\n <Message id=\"tryAgain\" />\n </LinkExternal>\n );\n default:\n return null;\n }\n};\n","import type React from \"react\";\n\nimport { Button, buttonVariants } from \"@jslib/ui/components/button\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport Message from \"@components/Message\";\n\nimport { getOption } from \"../options/options\";\nimport { speakToOuterFrame } from \"../lib/frames/frameMessages\";\nimport { useVerificationResponse } from \"../lib/state/contextHooks\";\nimport { isValidHttpUrl } from \"../lib/utils/routing/Url\";\n\nimport { TryAgainButtonComponent } from \"./TryAgainButtonComponent\";\nimport { LinkExternal } from \"./LinkExternal\";\n\nexport const TryAgainActionType = {\n NONE: \"none\",\n RESET: \"reset\",\n POSTMESSAGE: \"postMessage\",\n REDIRECT: \"redirect\",\n} as const;\n\nconst PostMessageButton = () => {\n // @TODO - Add debounce to prevent double click triggering the postMesssage twice\n const verificationResponse = useVerificationResponse();\n\n const onClickHandler = () =>\n speakToOuterFrame({\n action: \"tryAgain\",\n verificationResponse,\n });\n\n return (\n <Button variant=\"light\" onClick={onClickHandler}>\n <Message id=\"tryAgain\" />\n </Button>\n );\n};\n\nconst RedirectButton = ({ redirectUrl, target = \"_blank\" }) => (\n <LinkExternal\n className={buttonVariants({ variant: \"primary\" })}\n target={target}\n href={redirectUrl.toString()}\n >\n <Message id=\"seeOtherOffers\" />\n </LinkExternal>\n);\n\ntype AssertValidTryAgainAction = (action: unknown) => asserts action is TryAgainAction;\nconst assertValidTryAgainAction: AssertValidTryAgainAction = (action: unknown) => {\n if (\n !(\n typeof action === \"object\" &&\n \"type\" in action &&\n Object.values(TryAgainActionType).includes(\n action.type as (typeof TryAgainActionType)[keyof typeof TryAgainActionType],\n )\n )\n )\n throw new RangeError(\"Invalid tryAgainAction option type - using default TryAgainButton.\");\n\n return undefined;\n};\n\ninterface Props {\n /** `false` hides a `reset` action, for errors that resetting the form can't fix. */\n allowReset?: boolean;\n}\n\n/**\n * The Try Again button, driven by the deprecated `tryAgainAction` option. Delete it with the option once\n * `ConfiguredTryAgainAction` drives every program.\n */\nexport const LegacyTryAgainAction: React.FC<Props> = ({ allowReset = true }) => {\n const action = getOption(\"tryAgainAction\");\n if (!allowReset && action?.type === TryAgainActionType.RESET) return null;\n try {\n assertValidTryAgainAction(action);\n\n switch (action.type) {\n case TryAgainActionType.NONE:\n return null;\n case TryAgainActionType.POSTMESSAGE:\n if (window.self === window.top) {\n logger.error(\n `Invalid tryAgainAction option type \"${action.type}\" - page must be embedded in an iframe.`,\n );\n return null;\n }\n return <PostMessageButton />;\n case TryAgainActionType.REDIRECT:\n if (!isValidHttpUrl(action.url))\n throw new RangeError(\n \"Invalid tryAgainAction redirect url - must be an absolute http(s) URL. Using default TryAgainButton.\",\n );\n return <RedirectButton redirectUrl={action.url} target={action.target} />;\n case TryAgainActionType.RESET:\n return <TryAgainButtonComponent />;\n default:\n throw new RangeError(\"Invalid tryAgainAction option type - using default TryAgainButton.\");\n }\n } catch (e: any) {\n logger.error(e.message);\n return <TryAgainButtonComponent />;\n }\n};\n\nexport type TryAgainNoneAction = { type: typeof TryAgainActionType.NONE };\nexport type TryAgainResetAction = { type: typeof TryAgainActionType.RESET };\nexport type TryAgainPostMessageAction = { type: typeof TryAgainActionType.POSTMESSAGE };\nexport type TryAgainRedirectAction = {\n type: typeof TryAgainActionType.REDIRECT;\n target?: string;\n url: URL;\n};\n\nexport type TryAgainAction =\n | TryAgainNoneAction\n | TryAgainResetAction\n | TryAgainPostMessageAction\n | TryAgainRedirectAction;\n","import type React from \"react\";\n\nimport { useFlag } from \"./FeatureFlags/hooks\";\nimport { ConfiguredTryAgainAction } from \"./ConfiguredTryAgainAction\";\nimport { LegacyTryAgainAction } from \"./LegacyTryAgainAction\";\n\ninterface Props {\n /** `false` hides a reset button, for errors that resetting the form can't fix. */\n allowReset?: boolean;\n}\n\n/**\n * The error step's Try Again button. While `hc-my-sheer-id-theme-builder` is on, the program configuration's\n * `tryAgainButton` drives it and the `tryAgainAction` option is ignored; otherwise the option drives it.\n */\nexport const TryAgainActionComponent: React.FC<Props> = ({ allowReset = true }) =>\n useFlag(\"hc-my-sheer-id-theme-builder\") === true ? (\n <ConfiguredTryAgainAction allowReset={allowReset} />\n ) : (\n <LegacyTryAgainAction allowReset={allowReset} />\n );\n","import { buttonVariants } from \"@jslib/ui/components/button\";\nimport { StepFrame } from \"@jslib/ui/components/step-frame\";\n\nimport Message from \"@components/Message\";\nimport { PoweredByComponent } from \"@components/PoweredBy/PoweredByComponent\";\nimport { LinkExternal } from \"@components/LinkExternal\";\nimport { StepHeader } from \"@components/StepHeader/StepHeader\";\nimport { TryAgainActionComponent } from \"@components/TryAgainAction\";\n\nimport {\n type VerificationService,\n type ErrorId,\n type ErrorResponse,\n type ErrorDetailId,\n} from \"@/lib/types/types\";\nimport { VerificationStepsEnum } from \"@/lib/types/runtimeTypes\";\nimport { recordEvent } from \"@/lib/GoogleAnalytics/ga\";\nimport { type MessageId } from \"@/lib/intl/types\";\nimport { isValidHttpUrl } from \"@/lib/utils/routing/Url\";\nimport { useProgramBranding, useProgramMessages } from \"@/lib/state/contextHooks\";\nimport { getBrandFaqUrl } from \"@/lib/ProgramTheme/programThemeGetters\";\n\ninterface StepErrorProps {\n verificationService: VerificationService;\n errorId?: ErrorId;\n}\n\n// Error IDs for which we surface the \"contact support\" message above the action\n// button and hide the \"Get help\" link in the footer. Add or remove IDs here.\nconst CONTACT_SUPPORT_ERROR_IDS: ErrorId[] = [\n \"docReviewLimitExceeded\",\n \"verificationLimitExceeded\",\n \"fraudRulesReject\",\n];\n\n/** The errorId's own title when the program has one, else the generic error title. */\nconst useErrorTitleId = (errorIds: ErrorId[]): MessageId => {\n const messages = useProgramMessages();\n const firstErrorId = errorIds[0];\n\n return messages?.[`step.error.errorId.${firstErrorId}.title`]\n ? `step.error.errorId.${firstErrorId}.title`\n : \"step.error.title\";\n};\n\nconst ErrorMsg = ({\n errorIds,\n errorDetailId,\n}: {\n errorIds: ErrorId[];\n errorDetailId: ErrorDetailId;\n}) => {\n const displayErrorMessageIds = new Map();\n if (errorDetailId) {\n displayErrorMessageIds.set(errorDetailId, `errorDetailId.${errorDetailId}`);\n } else {\n errorIds?.forEach((errId) => displayErrorMessageIds.set(errId, `errorId.${errId}`));\n }\n\n if (displayErrorMessageIds.size > 0) {\n return (\n <p className=\"text-center\">\n {Array.from(displayErrorMessageIds).map(([errId, errMsgId]) => (\n <Message key={errMsgId} id={errMsgId} />\n ))}\n </p>\n );\n }\n\n return null;\n};\n\n/**\n * Supplementary guidance for an error, shown muted beneath the main error message.\n * Rendered only for errorIds that define a `step.error.errorId.<errorId>.note` message.\n */\nconst ErrorNote = ({ errorIds }: { errorIds: ErrorId[] }) => {\n const messages = useProgramMessages();\n const noteMessageId: MessageId = `step.error.errorId.${errorIds[0]}.note`;\n if (!messages?.[noteMessageId]) return null;\n\n return (\n <p className=\"text-center text-sm text-muted-foreground\">\n <Message id={noteMessageId} />\n </p>\n );\n};\n\nconst ErrorButton = ({\n verificationService,\n errorIds,\n redirectUrl,\n}: {\n verificationService: VerificationService;\n errorIds: ErrorId[];\n redirectUrl?: string;\n}) => {\n const messages = useProgramMessages();\n const branding = useProgramBranding();\n if (errorIds.includes(\"unauthorizedAccountStatus\")) {\n const faqUrl = getBrandFaqUrl(verificationService.programTheme, branding);\n if (!faqUrl) return null;\n return (\n <LinkExternal\n className={buttonVariants({ variant: \"light\" })}\n href={faqUrl}\n onClick={() => recordEvent(VerificationStepsEnum.error, faqUrl)}\n >\n <Message id=\"step.error.errorId.unauthorizedAccountStatus.buttonText\" />\n </LinkExternal>\n );\n }\n\n if (errorIds.includes(\"verificationLimitExceeded\")) return null;\n\n if (\n errorIds.includes(\"missingRequiredMetadata\") ||\n errorIds.includes(\"missingRequiredExternalId\")\n ) {\n // Resetting the form can't supply the missing metadata or external ID\n return <TryAgainActionComponent allowReset={false} />;\n }\n\n const firstErrorId = errorIds[0];\n // A redirectUrl with any scheme other than http(s) is treated as absent so it is never linked to\n if (messages?.[`step.error.errorId.${firstErrorId}.buttonText`] && isValidHttpUrl(redirectUrl)) {\n return (\n <LinkExternal\n className={buttonVariants({ variant: \"light\" })}\n href={redirectUrl}\n onClick={() => recordEvent(VerificationStepsEnum.error, redirectUrl)}\n >\n <Message id={`step.error.errorId.${firstErrorId}.buttonText`} />\n </LinkExternal>\n );\n }\n\n return <TryAgainActionComponent />;\n};\n\nexport const StepErrorComponent = ({ verificationService, errorId }: StepErrorProps) => {\n const verificationResponse = verificationService.verificationResponse as ErrorResponse;\n const { errorIds: responseErrorIds, redirectUrl, errorDetailId } = verificationResponse;\n\n const errorIdsSet = new Set<ErrorId>();\n if (errorId) errorIdsSet.add(errorId);\n if (Array.isArray(responseErrorIds)) responseErrorIds.forEach((errId) => errorIdsSet.add(errId));\n const errorIds = Array.from(errorIdsSet);\n const titleId = useErrorTitleId(errorIds);\n\n const showContactSupport = errorIds.some((errId) => CONTACT_SUPPORT_ERROR_IDS.includes(errId));\n\n return (\n <StepFrame\n id=\"sid-step-error\"\n footerContent={<PoweredByComponent hideFaqLink={showContactSupport} />}\n >\n <StepHeader titleId={titleId} />\n <div className=\"flex flex-col gap-5\">\n <ErrorMsg errorIds={errorIds} errorDetailId={errorDetailId} />\n <ErrorNote errorIds={errorIds} />\n {showContactSupport && (\n <p className=\"text-center\">\n <Message id=\"contactSupport\" />\n </p>\n )}\n </div>\n <div className=\"flex justify-center\">\n <ErrorButton\n verificationService={verificationService}\n errorIds={errorIds}\n redirectUrl={redirectUrl}\n />\n </div>\n </StepFrame>\n );\n};\n","import React, { type ComponentType, type ReactNode, Suspense, useEffect } from \"react\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport { type VerificationStep, type VerificationService } from \"../lib/types/types\";\nimport { CustomMetricNames, EventName, recordGaEvent } from \"../lib/GoogleAnalytics/ga\";\n\nimport { LoadingScreenComponent } from \"./LoadingScreen/LoadingScreenComponent\";\n\n// These should _not_ be lazy loaded\n// Either they should be immediately available (e.g. loading screen)\n// or they are very frequently used, so much so that we want to avoid\n// an extra round-trip to load them\nimport StepPendingComponent from \"./StepPending/index\";\nimport StepErrorComponent from \"./StepError\";\n\nconst defaultComponents = {\n StepPendingComponent,\n StepErrorComponent,\n StepStudentPersonalInfoComponent: React.lazy(() => import(\"./StepStudentPersonalInfo\")),\n StepOverrideComponent: React.lazy(() => import(\"./StepOverrideComponent\")),\n StepAgePersonalInfoComponent: React.lazy(() => import(\"./StepAgePersonalInfo\")),\n StepSeniorPersonalInfoComponent: React.lazy(() => import(\"./StepAgePersonalInfo\")),\n StepCollectMilitaryPersonalInfoComponent: React.lazy(\n () => import(\"./StepMilitaryPersonalInfo/StepCollectMilitaryPersonalInfoComponent\"),\n ),\n // Aliases — same component as StepCollectMilitaryPersonalInfoComponent.\n StepCollectMilitaryStatusComponent: React.lazy(\n () => import(\"./StepMilitaryPersonalInfo/StepCollectMilitaryPersonalInfoComponent\"),\n ),\n StepActiveMilitaryPersonalInfoComponent: React.lazy(\n () => import(\"./StepMilitaryPersonalInfo/StepCollectMilitaryPersonalInfoComponent\"),\n ),\n StepInactiveMilitaryPersonalInfoComponent: React.lazy(\n () => import(\"./StepMilitaryPersonalInfo/StepCollectMilitaryPersonalInfoComponent\"),\n ),\n StepDriverLicensePersonalInfoComponent: React.lazy(\n () => import(\"./StepIdentityPersonalInfo/StepDriverLicensePersonalInfoComponent\"),\n ),\n StepEmploymentPersonalInfoComponent: React.lazy(() => import(\"./StepEmploymentPersonalInfo\")),\n StepFirstResponderPersonalInfoComponent: React.lazy(\n () => import(\"./StepFirstResponderPersonalInfo/index\"),\n ),\n StepGeneralIdentityPersonalInfoComponent: React.lazy(\n () => import(\"./StepIdentityPersonalInfo/StepGeneralIdentityPersonalInfoComponent\"),\n ),\n StepHybridIdentityPersonalInfoComponent: React.lazy(\n () => import(\"./StepIdentityPersonalInfo/StepHybridIdentityPersonalInfoComponent\"),\n ),\n StepIDCheckLoopComponent: React.lazy(() => import(\"./StepIDCheckLoop\")),\n StepLicensedProfessionalPersonalInfoComponent: React.lazy(\n () => import(\"./StepLicensedProfessionalPersonalInfo/index\"),\n ),\n StepLowIncomePersonalInfoComponent: React.lazy(() => import(\"./StepLowIncomePersonalInfo\")),\n StepMedicalProfessionalPersonalInfoComponent: React.lazy(\n () => import(\"./StepMedicalProfessionalPersonalInfo\"),\n ),\n StepMemberPersonalInfoComponent: React.lazy(() => import(\"./StepMemberPersonalInfo\")),\n StepConsolationComponent: React.lazy(() => import(\"./StepConsolation\")),\n StepDocUploadComponent: React.lazy(() => import(\"./StepDocUpload\")),\n StepEmailLoopComponent: React.lazy(() => import(\"./StepEmailLoop\")),\n StepPendingEmailLoopComponent: React.lazy(() => import(\"./StepEmailLoop/EmailLoopPending\")),\n StepMoverPersonalInfoComponent: React.lazy(() => import(\"./StepMoverPersonalInfo\")),\n StepSMSLoopComponent: React.lazy(() => import(\"./StepSMSLoop\")),\n StepSocialSecurity: React.lazy(() => import(\"./StepSocialSecurityNumber\")),\n StepSSOComponent: React.lazy(() => import(\"./StepSSO\")),\n StepSuccessComponent: React.lazy(() => import(\"./StepSuccess\")),\n StepTeacherPersonalInfoComponent: React.lazy(() => import(\"./StepTeacherPersonalInfo\")),\n StepCompleteAuthentication: React.lazy(() => import(\"./StepCompleteAuthentication/index\")),\n StepCollectIdentifierComponent: React.lazy(() => import(\"./StepCollectIdentifier\")),\n StepCollectPersonalInfo: React.lazy(() => import(\"./StepCollectPersonalInfo\")),\n StepThirdPartyLoopComponent: React.lazy(() => import(\"./StepThirdPartyLoop\")),\n} satisfies Record<string, ComponentType | ((props: unknown) => ReactNode)>;\n\nconst getComponent = (componentName: keyof typeof defaultComponents) => {\n logger.info(\"getComponent\", componentName);\n return defaultComponents[componentName];\n};\n\nconst getLoadingScreen = () => <LoadingScreenComponent />;\n\ninterface Props {\n stepToLoad: VerificationStep;\n verificationService: VerificationService;\n}\n\nconst LoadStepComponent = ({ stepToLoad, verificationService }: Props) => {\n logger.info(`LoadStepComponent: rendering step: ${stepToLoad}`);\n let Component;\n\n useEffect(() => {\n // see ObservePerformanceMetrics in ga.ts - we'll use LCP if we have it as\n // it's a better metric, but this gives us something in all browsers.\n try {\n performance.mark(CustomMetricNames.INITIAL_STEP_LOAD);\n } catch {\n // jsdom doesn't have `performance` as such tests fall over.\n }\n }, []);\n\n // To allow for a ratio of form_seen:form_submitted events. Help track system & program health.\n React.useEffect(() => {\n // don't spam offsite logging\n if ([\"pending\", \"error\"].includes(stepToLoad)) {\n return;\n }\n try {\n // if this happens repeatedly, the last mark will be used when .measure() is called:\n performance.mark(EventName.STEP_SEEN);\n\n // if this happens repeatedly remember you can group by verificationId in BI queries:\n recordGaEvent({\n eventName: EventName.STEP_SEEN,\n params: {\n step: stepToLoad,\n },\n });\n } catch (e) {\n logger.error(e);\n }\n }, [stepToLoad]);\n\n switch (stepToLoad) {\n case \"collectPersonalInfo\":\n Component = getComponent(\"StepCollectPersonalInfo\");\n break;\n case \"collectStudentPersonalInfo\":\n Component = getComponent(\"StepStudentPersonalInfoComponent\");\n break;\n case \"collectSeniorPersonalInfo\":\n Component = getComponent(\"StepSeniorPersonalInfoComponent\");\n break;\n case \"collectAgePersonalInfo\":\n Component = getComponent(\"StepAgePersonalInfoComponent\");\n break;\n case \"collectTeacherPersonalInfo\":\n Component = getComponent(\"StepTeacherPersonalInfoComponent\");\n break;\n case \"collectMemberPersonalInfo\":\n Component = getComponent(\"StepMemberPersonalInfoComponent\");\n break;\n case \"collectMilitaryStatus\":\n Component = getComponent(\"StepCollectMilitaryStatusComponent\");\n break;\n case \"collectActiveMilitaryPersonalInfo\":\n Component = getComponent(\"StepActiveMilitaryPersonalInfoComponent\");\n break;\n case \"collectInactiveMilitaryPersonalInfo\":\n Component = getComponent(\"StepInactiveMilitaryPersonalInfoComponent\");\n break;\n case \"collectMilitaryPersonalInfo\":\n Component = getComponent(\"StepCollectMilitaryPersonalInfoComponent\");\n break;\n case \"collectFirstResponderPersonalInfo\":\n Component = getComponent(\"StepFirstResponderPersonalInfoComponent\");\n break;\n case \"collectMedicalProfessionalPersonalInfo\":\n Component = getComponent(\"StepMedicalProfessionalPersonalInfoComponent\");\n break;\n case \"collectEmployeePersonalInfo\":\n Component = getComponent(\"StepEmploymentPersonalInfoComponent\");\n break;\n case \"collectDriverLicensePersonalInfo\":\n Component = getComponent(\"StepDriverLicensePersonalInfoComponent\");\n break;\n case \"collectGeneralIdentityPersonalInfo\":\n Component = getComponent(\"StepGeneralIdentityPersonalInfoComponent\");\n break;\n case \"collectHybridIdentityPersonalInfo\":\n Component = getComponent(\"StepHybridIdentityPersonalInfoComponent\");\n break;\n case \"collectLicensedProfessionalPersonalInfo\":\n Component = getComponent(\"StepLicensedProfessionalPersonalInfoComponent\");\n break;\n case \"collectMoverPersonalInfo\":\n Component = getComponent(\"StepMoverPersonalInfoComponent\");\n break;\n case \"collectLowIncomePersonalInfo\":\n Component = getComponent(\"StepLowIncomePersonalInfoComponent\");\n break;\n case \"collectSocialSecurityNumber\":\n Component = getComponent(\"StepSocialSecurity\");\n break;\n case \"success\":\n Component = getComponent(\"StepSuccessComponent\");\n break;\n case \"consolation\":\n Component = getComponent(\"StepConsolationComponent\");\n break;\n case \"override\":\n Component = getComponent(\"StepOverrideComponent\");\n break;\n case \"docUpload\":\n Component = getComponent(\"StepDocUploadComponent\");\n break;\n case \"pending\":\n Component = getComponent(\"StepPendingComponent\");\n break;\n case \"sso\":\n Component = getComponent(\"StepSSOComponent\");\n break;\n case \"thirdPartyLoop\":\n Component = getComponent(\"StepThirdPartyLoopComponent\");\n break;\n case \"smsLoop\":\n Component = getComponent(\"StepSMSLoopComponent\");\n break;\n case \"emailLoop\":\n Component = getComponent(\"StepEmailLoopComponent\");\n break;\n case \"idCheckLoop\":\n Component = getComponent(\"StepIDCheckLoopComponent\");\n break;\n case \"collectIdentifier\":\n Component = getComponent(\"StepCollectIdentifierComponent\");\n break;\n case \"completeAuthentication\":\n Component = getComponent(\"StepCompleteAuthentication\");\n break;\n case \"missingRequiredMetadata\":\n Component = getComponent(\"StepErrorComponent\");\n return (\n <Component verificationService={verificationService} errorId=\"missingRequiredMetadata\" />\n );\n case \"missingRequiredExternalId\":\n Component = getComponent(\"StepErrorComponent\");\n return (\n <Component verificationService={verificationService} errorId=\"missingRequiredExternalId\" />\n );\n // If explicitly trying to render the error component, such as when testing/styling\n case \"error\":\n Component = getComponent(\"StepErrorComponent\");\n break;\n case \"cancelDocUpload\":\n case \"cancelEmailLoop\":\n case \"cancelSocialSecurityNumber\":\n case \"docReviewLimitExceeded\":\n case \"emailLoopCollectOrganizationEmail\":\n // These steps are not loaded directly through this function. They exist\n // here so we get exhaustiveness type checking.\n logger.error(\"Attempted to load unexpected step\", stepToLoad);\n return <StepErrorComponent verificationService={verificationService} errorId=\"invalidStep\" />;\n default:\n // This 'satisfies never' ensures that all possible steps are handled.\n logger.error(\"Unable to load step\", stepToLoad satisfies never);\n return <StepErrorComponent verificationService={verificationService} errorId=\"invalidStep\" />;\n }\n\n return (\n <Suspense fallback={getLoadingScreen()}>\n <Component verificationService={verificationService} />\n </Suspense>\n );\n};\n\nexport { LoadStepComponent };\n","import React from \"react\";\n\ninterface CustomTextWrapperProps {\n dangerouslySetInnerHTML?: any;\n}\n\nconst CustomTextWrapper = ({ dangerouslySetInnerHTML, ...props }: CustomTextWrapperProps) =>\n dangerouslySetInnerHTML ? (\n <span dangerouslySetInnerHTML={dangerouslySetInnerHTML} {...props} />\n ) : (\n <React.Fragment {...props} />\n );\n\nexport { CustomTextWrapper };\n","import { TextLink } from \"@jslib/ui/components/text-link\";\n\nimport { type VerificationService } from \"../../lib/types/types\";\nimport { useProgramConfiguration } from \"../../lib/state/contextHooks\";\nimport { LinkExternal } from \"../LinkExternal\";\n\ninterface Props {\n verificationService: VerificationService;\n}\n\n// White on a fixed red, whatever the brand theme, so a test program can't be mistaken for a live one.\nconst TestModeFlagComponent = (_props: Props) => {\n const programConfiguration = useProgramConfiguration();\n return programConfiguration?.isTestMode ? (\n <div\n className=\"mx-auto max-w-form bg-[#e12046] p-2.5 text-center text-white uppercase\"\n role=\"note\"\n >\n Test Mode\n <LinkExternal\n as={TextLink}\n className=\"ps-1.25 text-white lowercase underline hover:text-white/80\"\n href=\"https://developer.sheerid.com/getting-started#test-program\"\n aria-label=\"learn more about a sheerid test mode program\"\n >\n (learn more)\n </LinkExternal>\n </div>\n ) : null;\n};\n\nexport { TestModeFlagComponent };\n","import { isMouseLikePointerType } from \"../utils/event.mjs\";\nexport { isTargetInsideEnabledTrigger as isInsideEnabledTrigger } from \"../utils/element.mjs\";\nfunction resolveValue(value, pointerType) {\n if (pointerType != null && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}\nexport function getDelay(value, prop, pointerType) {\n const result = resolveValue(value, pointerType);\n if (typeof result === 'number') {\n return result;\n }\n return result?.[prop];\n}\nexport function getRestMs(value) {\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}\nexport function isClickLikeOpenEvent(openEventType, interactedInside) {\n return interactedInside || openEventType === 'click' || openEventType === 'mousedown';\n}\nexport function isHoverOpenEvent(openEventType) {\n return openEventType?.includes('mouse') && openEventType !== 'mousedown';\n}","import { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { FloatingRootStore } from \"../../floating-ui-react/components/FloatingRootStore.mjs\";\n\n/**\n * State common to all popup stores.\n */\n\nexport function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {\n return {\n open: false,\n openProp: undefined,\n mounted: false,\n transitionStatus: undefined,\n floatingRootContext: new FloatingRootStore({\n open: false,\n transitionStatus: undefined,\n floatingElement: null,\n referenceElement: null,\n triggerElements,\n floatingId,\n syncOnly: true,\n nested,\n onOpenChange: undefined\n }),\n floatingId,\n triggerCount: 0,\n preventUnmountingOnClose: false,\n payload: undefined,\n activeTriggerId: null,\n activeTriggerElement: null,\n triggerIdProp: undefined,\n popupElement: null,\n positionerElement: null,\n activeTriggerProps: EMPTY_OBJECT,\n inactiveTriggerProps: EMPTY_OBJECT,\n popupProps: EMPTY_OBJECT\n };\n}\nconst activeTriggerIdSelector = state => state.triggerIdProp ?? state.activeTriggerId;\nconst openSelector = state => state.openProp ?? state.open;\nconst popupIdSelector = state => {\n const popupId = state.popupElement?.id ?? state.floatingId;\n return popupId || undefined;\n};\nfunction triggerOwnsOpenPopup(state, triggerId) {\n return triggerId !== undefined && openSelector(state) && activeTriggerIdSelector(state) === triggerId;\n}\nfunction triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {\n if (triggerOwnsOpenPopup(state, triggerId)) {\n return true;\n }\n return triggerId !== undefined && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;\n}\nexport const popupStoreSelectors = {\n open: openSelector,\n mounted: state => state.mounted,\n transitionStatus: state => state.transitionStatus,\n floatingRootContext: state => state.floatingRootContext,\n triggerCount: state => state.triggerCount,\n preventUnmountingOnClose: state => state.preventUnmountingOnClose,\n payload: state => state.payload,\n activeTriggerId: activeTriggerIdSelector,\n activeTriggerElement: state => state.mounted ? state.activeTriggerElement : null,\n popupId: popupIdSelector,\n /**\n * Whether the trigger with the given ID was used to open the popup.\n */\n isTriggerActive: (state, triggerId) => triggerId !== undefined && activeTriggerIdSelector(state) === triggerId,\n /**\n * Whether the popup is open and was activated by a trigger with the given ID.\n */\n isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),\n /**\n * Whether the popup is mounted and was activated by a trigger with the given ID.\n */\n isMountedByTrigger: (state, triggerId) => triggerId !== undefined && activeTriggerIdSelector(state) === triggerId && state.mounted,\n triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,\n /**\n * Popup id for the trigger that currently owns the open popup.\n */\n triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : undefined,\n popupProps: state => state.popupProps,\n popupElement: state => state.popupElement,\n positionerElement: state => state.positionerElement\n};\n\n/**\n * Store members a detached handle-backed trigger reads or invokes for trigger registration and data\n * forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a\n * detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to\n * be durable. Component handle-store views Pick these from their concrete store (preserving its\n * context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.\n */\n\n/**\n * The subset of a popup store that trigger registration and data forwarding rely on. Narrow enough\n * that an inert store can be passed while detached.\n */","'use client';\n\nimport * as React from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { NOOP } from '@base-ui/utils/empty';\n/**\n * Reads the store currently exposed by a popup handle and subscribes to store-pointer changes.\n * Detached triggers use this to follow a handle as a root attaches or detaches: while no root is\n * attached, the handle exposes its fallback store; once a root attaches, subscribers re-render and\n * read from the live root store.\n *\n * Returns `undefined` when no handle is provided so callers can fall back to their root context.\n *\n * @param handle The popup handle to read from, or `undefined` when the trigger is not handle-bound.\n */\nexport function usePopupHandleStore(handle) {\n const subscribe = React.useCallback(listener => {\n if (handle === undefined) {\n return NOOP;\n }\n return handle.subscribeStore(listener);\n }, [handle]);\n const getSnapshot = React.useCallback(() => {\n return handle === undefined ? undefined : handle.store;\n }, [handle]);\n return useSyncExternalStore(subscribe, getSnapshot, () => handle?.serverStore);\n}","'use client';\n\nimport { useOnMount } from '@base-ui/utils/useOnMount';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { Timeout } from '@base-ui/utils/useTimeout';\nimport { isInteractiveElement } from \"../utils.mjs\";\nexport { isInteractiveElement };\nexport class HoverInteraction {\n constructor() {\n this.pointerType = undefined;\n this.interactedInside = false;\n this.handler = undefined;\n this.blockMouseMove = true;\n this.performedPointerEventsMutation = false;\n this.pointerEventsScopeElement = null;\n this.pointerEventsReferenceElement = null;\n this.pointerEventsFloatingElement = null;\n this.restTimeoutPending = false;\n this.openChangeTimeout = new Timeout();\n this.restTimeout = new Timeout();\n this.handleCloseOptions = undefined;\n }\n static create() {\n return new HoverInteraction();\n }\n dispose = () => {\n this.openChangeTimeout.clear();\n this.restTimeout.clear();\n };\n disposeEffect = () => {\n return this.dispose;\n };\n}\nconst pointerEventsMutationOwnerByScopeElement = new WeakMap();\nexport function clearSafePolygonPointerEventsMutation(instance) {\n if (!instance.performedPointerEventsMutation) {\n return;\n }\n const scopeElement = instance.pointerEventsScopeElement;\n if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {\n instance.pointerEventsScopeElement?.style.removeProperty('pointer-events');\n instance.pointerEventsReferenceElement?.style.removeProperty('pointer-events');\n instance.pointerEventsFloatingElement?.style.removeProperty('pointer-events');\n pointerEventsMutationOwnerByScopeElement.delete(scopeElement);\n }\n instance.performedPointerEventsMutation = false;\n instance.pointerEventsScopeElement = null;\n instance.pointerEventsReferenceElement = null;\n instance.pointerEventsFloatingElement = null;\n}\nexport function applySafePolygonPointerEventsMutation(instance, options) {\n const {\n scopeElement,\n referenceElement,\n floatingElement\n } = options;\n const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);\n if (existingOwner && existingOwner !== instance) {\n clearSafePolygonPointerEventsMutation(existingOwner);\n }\n clearSafePolygonPointerEventsMutation(instance);\n instance.performedPointerEventsMutation = true;\n instance.pointerEventsScopeElement = scopeElement;\n instance.pointerEventsReferenceElement = referenceElement;\n instance.pointerEventsFloatingElement = floatingElement;\n pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);\n scopeElement.style.pointerEvents = 'none';\n referenceElement.style.pointerEvents = 'auto';\n floatingElement.style.pointerEvents = 'auto';\n}\nexport function useHoverInteractionSharedState(store) {\n const data = store.context.dataRef.current;\n const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;\n if (!data.hoverInteractionState) {\n data.hoverInteractionState = instance;\n }\n useOnMount(data.hoverInteractionState.disposeEffect);\n return data.hoverInteractionState;\n}","'use client';\n\nimport * as React from 'react';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { contains, getTarget } from \"../utils/element.mjs\";\nimport { getNodeChildren } from \"../utils/nodes.mjs\";\nimport { applySafePolygonPointerEventsMutation, clearSafePolygonPointerEventsMutation, isInteractiveElement, useHoverInteractionSharedState } from \"./useHoverInteractionSharedState.mjs\";\nimport { getDelay, isClickLikeOpenEvent as isClickLikeOpenEventShared, isHoverOpenEvent, isInsideEnabledTrigger } from \"./useHoverShared.mjs\";\n/**\n * Provides hover interactions that should be attached to the floating element.\n */\nexport function useHoverFloatingInteraction(context, parameters = {}) {\n const {\n enabled = true,\n closeDelay: closeDelayProp = 0,\n nodeId: nodeIdProp\n } = parameters;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const {\n dataRef\n } = store.context;\n const tree = useFloatingTree();\n const parentId = useFloatingParentNodeId();\n const instance = useHoverInteractionSharedState(store);\n const childClosedTimeout = useTimeout();\n const isClickLikeOpenEvent = useStableCallback(() => {\n return isClickLikeOpenEventShared(dataRef.current.openEvent?.type, instance.interactedInside);\n });\n const isHoverOpen = useStableCallback(() => {\n return isHoverOpenEvent(dataRef.current.openEvent?.type);\n });\n const clearPointerEvents = useStableCallback(() => {\n clearSafePolygonPointerEventsMutation(instance);\n });\n useIsoLayoutEffect(() => {\n if (!open) {\n instance.pointerType = undefined;\n instance.restTimeoutPending = false;\n instance.interactedInside = false;\n clearPointerEvents();\n }\n }, [open, instance, clearPointerEvents]);\n React.useEffect(() => {\n return clearPointerEvents;\n }, [clearPointerEvents]);\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return undefined;\n }\n if (open && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {\n const ref = domReferenceElement;\n const floatingEl = floatingElement;\n const doc = ownerDocument(floatingElement);\n const parentFloating = tree?.nodesRef.current.find(node => node.id === parentId)?.context?.elements.floating;\n if (parentFloating) {\n parentFloating.style.pointerEvents = '';\n }\n\n // A keep-mounted submenu can appear in the tree before it opens, so a\n // cached scope or parent lookup may resolve to the submenu itself. That\n // would not shield sibling items in the parent menu.\n const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;\n const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;\n const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest('[data-rootownerid]') ?? doc.body;\n applySafePolygonPointerEventsMutation(instance, {\n scopeElement,\n referenceElement: ref,\n floatingElement: floatingEl\n });\n return () => {\n clearPointerEvents();\n };\n }\n return undefined;\n }, [enabled, open, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function hasParentChildren() {\n return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);\n }\n function closeWithDelay(event) {\n const closeDelay = getDelay(closeDelayProp, 'close', instance.pointerType);\n const close = () => {\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n tree?.events.emit('floating.closed', event);\n };\n if (closeDelay) {\n instance.openChangeTimeout.start(closeDelay, close);\n } else {\n instance.openChangeTimeout.clear();\n close();\n }\n }\n function handleInteractInside(event) {\n const target = getTarget(event);\n if (!isInteractiveElement(target)) {\n instance.interactedInside = false;\n return;\n }\n instance.interactedInside = target?.closest('[aria-haspopup]') != null;\n }\n function onFloatingMouseEnter() {\n instance.openChangeTimeout.clear();\n childClosedTimeout.clear();\n tree?.events.off('floating.closed', onNodeClosed);\n clearPointerEvents();\n }\n function onFloatingMouseLeave(event) {\n if (hasParentChildren() && tree) {\n tree.events.on('floating.closed', onNodeClosed);\n return;\n }\n if (isInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {\n // If the mouse is leaving the reference element to another trigger, don't explicitly close the popup\n // as it will be moved.\n return;\n }\n const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;\n const relatedTarget = event.relatedTarget;\n const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some(node => contains(node.context?.elements.floating, relatedTarget));\n if (isMovingIntoDescendantFloating) {\n return;\n }\n\n // If the safePolygon handler is active, let it handle the close logic.\n if (instance.handler) {\n instance.handler(event);\n return;\n }\n clearPointerEvents();\n if (isHoverOpen() && !isClickLikeOpenEvent()) {\n closeWithDelay(event);\n }\n }\n function onNodeClosed(event) {\n if (!tree || !parentId || hasParentChildren()) {\n return;\n }\n // Allow the mouseenter event to fire in case child was closed because mouse moved into parent.\n childClosedTimeout.start(0, () => {\n tree.events.off('floating.closed', onNodeClosed);\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n tree.events.emit('floating.closed', event);\n });\n }\n const floating = floatingElement;\n return mergeCleanups(floating && addEventListener(floating, 'mouseenter', onFloatingMouseEnter), floating && addEventListener(floating, 'mouseleave', onFloatingMouseLeave), floating && addEventListener(floating, 'pointerdown', handleInteractInside, true), () => {\n tree?.events.off('floating.closed', onNodeClosed);\n });\n }, [enabled, floatingElement, store, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { contains, getTarget } from \"../utils/element.mjs\";\nimport { isMouseLikePointerType } from \"../utils/event.mjs\";\nimport { applySafePolygonPointerEventsMutation, clearSafePolygonPointerEventsMutation, useHoverInteractionSharedState } from \"./useHoverInteractionSharedState.mjs\";\nimport { getDelay, getRestMs, isClickLikeOpenEvent as isClickLikeOpenEventShared, isInsideEnabledTrigger } from \"./useHoverShared.mjs\";\nconst EMPTY_REF = {\n current: null\n};\n\n/**\n * Provides hover interactions that should be attached to reference or trigger\n * elements.\n */\nexport function useHoverReferenceInteraction(context, props = {}) {\n const {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true,\n triggerElementRef = EMPTY_REF,\n externalTree,\n isActiveTrigger = true,\n getHandleCloseContext,\n isClosing,\n shouldOpen: shouldOpenProp,\n guardStaleOpen = false\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const {\n dataRef,\n events\n } = store.context;\n const tree = useFloatingTree(externalTree);\n const instance = useHoverInteractionSharedState(store);\n const isHoverCloseActiveRef = React.useRef(false);\n const handleCloseRef = useValueAsRef(handleClose);\n const delayRef = useValueAsRef(delay);\n const restMsRef = useValueAsRef(restMs);\n const enabledRef = useValueAsRef(enabled);\n const shouldOpenRef = useValueAsRef(shouldOpenProp);\n const isClosingRef = useValueAsRef(isClosing);\n const isClickLikeOpenEvent = useStableCallback(() => {\n return isClickLikeOpenEventShared(dataRef.current.openEvent?.type, instance.interactedInside);\n });\n const checkShouldOpen = useStableCallback(() => {\n return shouldOpenRef.current?.() !== false;\n });\n const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {\n const allTriggers = store.context.triggerElements;\n\n // Fast path for normal usage where handlers are attached directly to triggers.\n if (allTriggers.hasElement(currentTarget)) {\n return !currentDomReference || !contains(currentDomReference, currentTarget);\n }\n\n // Fallback for delegated/wrapper usage where currentTarget may be outside the trigger map.\n if (!isElement(target)) {\n return false;\n }\n const targetElement = target;\n return allTriggers.hasMatchingElement(trigger => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));\n });\n const cleanupMouseMoveHandler = useStableCallback(() => {\n if (!instance.handler) {\n return;\n }\n const doc = ownerDocument(store.select('domReferenceElement'));\n doc.removeEventListener('mousemove', instance.handler);\n instance.handler = undefined;\n });\n const clearPointerEvents = useStableCallback(() => {\n clearSafePolygonPointerEventsMutation(instance);\n });\n if (isActiveTrigger) {\n // eslint-disable-next-line no-underscore-dangle\n instance.handleCloseOptions = handleClose?.__options;\n }\n React.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);\n\n // When closing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function onOpenChangeLocal(details) {\n if (!details.open) {\n isHoverCloseActiveRef.current = details.reason === REASONS.triggerHover;\n cleanupMouseMoveHandler();\n instance.openChangeTimeout.clear();\n instance.restTimeout.clear();\n instance.blockMouseMove = true;\n instance.restTimeoutPending = false;\n } else {\n isHoverCloseActiveRef.current = false;\n }\n }\n events.on('openchange', onOpenChangeLocal);\n return () => {\n events.off('openchange', onOpenChangeLocal);\n };\n }, [enabled, events, instance, cleanupMouseMoveHandler]);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function closeWithDelay(event, runElseBranch = true) {\n const closeDelay = getDelay(delayRef.current, 'close', instance.pointerType);\n if (closeDelay) {\n instance.openChangeTimeout.start(closeDelay, () => {\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n tree?.events.emit('floating.closed', event);\n });\n } else if (runElseBranch) {\n instance.openChangeTimeout.clear();\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n tree?.events.emit('floating.closed', event);\n }\n }\n const trigger = triggerElementRef.current ?? (isActiveTrigger ? store.select('domReferenceElement') : null);\n if (!isElement(trigger)) {\n return undefined;\n }\n function onMouseEnter(event) {\n instance.openChangeTimeout.clear();\n instance.blockMouseMove = false;\n if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {\n return;\n }\n\n // Only rest delay is set; there's no fallback delay.\n // This will be handled by `onMouseMove`.\n const restMsValue = getRestMs(restMsRef.current);\n const openDelay = getDelay(delayRef.current, 'open', instance.pointerType);\n const eventTarget = getTarget(event);\n const currentTarget = event.currentTarget ?? null;\n const currentDomReference = store.select('domReferenceElement');\n let triggerNode = currentTarget;\n\n // Wrapper/delegated mode: resolve the actual trigger from the event target.\n if (isElement(eventTarget) && !store.context.triggerElements.hasElement(eventTarget)) {\n for (const triggerElement of store.context.triggerElements.elements()) {\n if (contains(triggerElement, eventTarget)) {\n triggerNode = triggerElement;\n break;\n }\n }\n }\n\n // Wrapper/delegated mode fallback: if the wrapper contains the active trigger,\n // treat this as re-entering that active trigger.\n if (isElement(currentTarget) && isElement(currentDomReference) && !store.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {\n triggerNode = currentDomReference;\n }\n const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);\n const isOpen = store.select('open');\n const isInClosingTransition = isClosingRef.current?.() ?? store.select('transitionStatus') === 'ending';\n const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;\n const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;\n const isRestOnlyDelay = restMsValue > 0 && !openDelay;\n const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;\n const shouldOpen = !isOpen || isOverInactive;\n\n // Open immediately when moving between triggers while open, or during\n // a hover-driven close transition (including same-trigger re-entry).\n if (shouldOpenImmediately) {\n if (checkShouldOpen()) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, triggerNode));\n }\n return;\n }\n if (isRestOnlyDelay) {\n return;\n }\n if (openDelay) {\n instance.openChangeTimeout.start(openDelay, () => {\n if (shouldOpen && checkShouldOpen()) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, triggerNode));\n }\n });\n } else if (shouldOpen) {\n if (checkShouldOpen()) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, triggerNode));\n }\n }\n }\n function onMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n clearPointerEvents();\n return;\n }\n cleanupMouseMoveHandler();\n const domReferenceElement = store.select('domReferenceElement');\n const doc = ownerDocument(domReferenceElement);\n instance.restTimeout.clear();\n instance.restTimeoutPending = false;\n const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();\n if (isInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {\n return;\n }\n if (handleCloseRef.current && handleCloseContextBase) {\n if (!store.select('open')) {\n instance.openChangeTimeout.clear();\n }\n const currentTrigger = triggerElementRef.current;\n instance.handler = handleCloseRef.current({\n ...handleCloseContextBase,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (enabledRef.current && !isClickLikeOpenEvent() && currentTrigger === store.select('domReferenceElement')) {\n closeWithDelay(event, true);\n }\n }\n });\n doc.addEventListener('mousemove', instance.handler);\n instance.handler(event);\n return;\n }\n const shouldClose = instance.pointerType === 'touch' ? !contains(store.select('floatingElement'), event.relatedTarget) : true;\n if (shouldClose) {\n closeWithDelay(event);\n }\n }\n\n // Backup cancellation for Chrome's dropped `mouseleave` — see `guardStaleOpen`.\n function onMouseOut(event) {\n if (contains(trigger, event.relatedTarget)) {\n return; // moved within the trigger's own subtree\n }\n instance.openChangeTimeout.clear();\n instance.restTimeout.clear();\n instance.restTimeoutPending = false;\n }\n const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, 'mouseout', onMouseOut) : undefined;\n if (move) {\n return mergeCleanups(addEventListener(trigger, 'mousemove', onMouseEnter, {\n once: true\n }), addEventListener(trigger, 'mouseenter', onMouseEnter), addEventListener(trigger, 'mouseleave', onMouseLeave), staleOpenGuard);\n }\n return mergeCleanups(addEventListener(trigger, 'mouseenter', onMouseEnter), addEventListener(trigger, 'mouseleave', onMouseLeave), staleOpenGuard);\n }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);\n return React.useMemo(() => {\n if (!enabled) {\n return undefined;\n }\n function setPointerRef(event) {\n instance.pointerType = event.pointerType;\n }\n return {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove(event) {\n const {\n nativeEvent\n } = event;\n const trigger = event.currentTarget;\n const currentDomReference = store.select('domReferenceElement');\n const currentOpen = store.select('open');\n const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);\n if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {\n return;\n }\n if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {\n const floatingElement = store.select('floatingElement');\n if (floatingElement) {\n const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;\n applySafePolygonPointerEventsMutation(instance, {\n scopeElement,\n referenceElement: trigger,\n floatingElement\n });\n }\n }\n const restMsValue = getRestMs(restMsRef.current);\n if (currentOpen && !isOverInactive || restMsValue === 0) {\n return;\n }\n if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {\n return;\n }\n instance.restTimeout.clear();\n function handleMouseMove() {\n instance.restTimeoutPending = false;\n\n // A delayed hover open should not override a click-like open that happened\n // while the hover delay was pending.\n if (isClickLikeOpenEvent()) {\n return;\n }\n const latestOpen = store.select('open');\n if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, nativeEvent, trigger));\n }\n }\n if (instance.pointerType === 'touch') {\n ReactDOM.flushSync(() => {\n handleMouseMove();\n });\n } else if (isOverInactive && currentOpen) {\n handleMouseMove();\n } else {\n instance.restTimeoutPending = true;\n instance.restTimeout.start(restMsValue, handleMouseMove);\n }\n }\n };\n }, [enabled, instance, isClickLikeOpenEvent, isOverInactiveTrigger, mouseOnly, store, restMsRef, checkShouldOpen]);\n}","import { isElement } from '@floating-ui/utils/dom';\nimport { Timeout } from '@base-ui/utils/useTimeout';\nimport { contains, getTarget } from \"./utils/element.mjs\";\nimport { getNodeChildren } from \"./utils/nodes.mjs\";\n\n/* eslint-disable no-nested-ternary */\n\nconst CURSOR_SPEED_THRESHOLD = 0.1;\nconst CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;\nconst POLYGON_BUFFER = 0.5;\nfunction hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {\n return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;\n}\nfunction isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {\n let isInsideValue = false;\n if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {\n isInsideValue = !isInsideValue;\n }\n if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {\n isInsideValue = !isInsideValue;\n }\n if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {\n isInsideValue = !isInsideValue;\n }\n if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {\n isInsideValue = !isInsideValue;\n }\n return isInsideValue;\n}\nfunction isInsideRect(pointX, pointY, rect) {\n return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;\n}\nfunction isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {\n const minX = Math.min(x1, x2);\n const maxX = Math.max(x1, x2);\n const minY = Math.min(y1, y2);\n const maxY = Math.max(y1, y2);\n return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;\n}\n/**\n * Generates a safe polygon area that the user can traverse without closing the\n * floating element once leaving the reference element.\n * @see https://floating-ui.com/docs/useHover#safepolygon\n */\nexport function safePolygon(options = {}) {\n const {\n blockPointerEvents = false\n } = options;\n const timeout = new Timeout();\n const fn = ({\n x,\n y,\n placement,\n elements,\n onClose,\n nodeId,\n tree\n }) => {\n const side = placement?.split('-')[0];\n let hasLanded = false;\n let lastX = null;\n let lastY = null;\n let lastCursorTime = typeof performance !== 'undefined' ? performance.now() : 0;\n function isCursorMovingSlowly(nextX, nextY) {\n const currentTime = performance.now();\n const elapsedTime = currentTime - lastCursorTime;\n if (lastX === null || lastY === null || elapsedTime === 0) {\n lastX = nextX;\n lastY = nextY;\n lastCursorTime = currentTime;\n return false;\n }\n const deltaX = nextX - lastX;\n const deltaY = nextY - lastY;\n const distanceSquared = deltaX * deltaX + deltaY * deltaY;\n const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;\n lastX = nextX;\n lastY = nextY;\n lastCursorTime = currentTime;\n return distanceSquared < thresholdSquared;\n }\n function close() {\n timeout.clear();\n onClose();\n }\n return function onMouseMove(event) {\n timeout.clear();\n const domReference = elements.domReference;\n const floating = elements.floating;\n if (!domReference || !floating || side == null || x == null || y == null) {\n return undefined;\n }\n const {\n clientX,\n clientY\n } = event;\n const target = getTarget(event);\n const isLeave = event.type === 'mouseleave';\n const isOverFloatingEl = contains(floating, target);\n const isOverReferenceEl = contains(domReference, target);\n if (isOverFloatingEl) {\n hasLanded = true;\n if (!isLeave) {\n return undefined;\n }\n }\n if (isOverReferenceEl) {\n hasLanded = false;\n if (!isLeave) {\n hasLanded = true;\n return undefined;\n }\n }\n\n // Prevent overlapping floating element from being stuck in an open-close\n // loop: https://github.com/floating-ui/floating-ui/issues/1910\n if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {\n return undefined;\n }\n function hasOpenChildNode() {\n return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);\n }\n function closeIfNoOpenChild() {\n if (!hasOpenChildNode()) {\n close();\n }\n }\n\n // If any nested child is open, abort.\n if (hasOpenChildNode()) {\n return undefined;\n }\n const refRect = domReference.getBoundingClientRect();\n const rect = floating.getBoundingClientRect();\n const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n const isFloatingWider = rect.width > refRect.width;\n const isFloatingTaller = rect.height > refRect.height;\n const left = (isFloatingWider ? refRect : rect).left;\n const right = (isFloatingWider ? refRect : rect).right;\n const top = (isFloatingTaller ? refRect : rect).top;\n const bottom = (isFloatingTaller ? refRect : rect).bottom;\n\n // If the pointer is leaving from the opposite side, the \"buffer\" logic\n // creates a point where the floating element remains open, but should be\n // ignored.\n // A constant of 1 handles floating point rounding errors.\n if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n closeIfNoOpenChild();\n return undefined;\n }\n\n // Ignore when the cursor is within the rectangular trough between the\n // two elements. Since the triangle is created from the cursor point,\n // which can start beyond the ref element's edge, traversing back and\n // forth from the ref to the floating element can cause it to close. This\n // ensures it always remains open in that case.\n let isInsideTroughRect = false;\n switch (side) {\n case 'top':\n isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);\n break;\n case 'bottom':\n isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);\n break;\n case 'left':\n isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);\n break;\n case 'right':\n isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);\n break;\n default:\n }\n if (isInsideTroughRect) {\n return undefined;\n }\n if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {\n closeIfNoOpenChild();\n return undefined;\n }\n if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {\n closeIfNoOpenChild();\n return undefined;\n }\n let isInsidePolygon = false;\n switch (side) {\n case 'top':\n {\n const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;\n const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;\n const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;\n const cursorPointY = y + POLYGON_BUFFER + 1;\n const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;\n const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;\n isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);\n break;\n }\n case 'bottom':\n {\n const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;\n const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;\n const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;\n const cursorPointY = y - POLYGON_BUFFER;\n const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;\n const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;\n isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);\n break;\n }\n case 'left':\n {\n const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;\n const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;\n const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;\n const cursorPointX = x + POLYGON_BUFFER + 1;\n const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;\n const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;\n isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);\n break;\n }\n case 'right':\n {\n const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;\n const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;\n const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;\n const cursorPointX = x - POLYGON_BUFFER;\n const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;\n const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;\n isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);\n break;\n }\n default:\n }\n if (!isInsidePolygon) {\n closeIfNoOpenChild();\n } else if (!hasLanded) {\n timeout.start(40, closeIfNoOpenChild);\n }\n return undefined;\n };\n };\n\n // eslint-disable-next-line no-underscore-dangle\n fn.__options = {\n ...options,\n blockPointerEvents\n };\n return fn;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const PopoverRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") PopoverRootContext.displayName = \"PopoverRootContext\";\nexport function usePopoverRootContext(optional) {\n const context = React.useContext(PopoverRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.' : _formatErrorMessage(47));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { ReactStore } from '@base-ui/utils/store';\nimport { Timeout } from '@base-ui/utils/useTimeout';\nimport { NOOP } from '@base-ui/utils/empty';\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { NullStore } from \"../../utils/NullStore.mjs\";\nimport { attachPreventUnmountOnClose, createInitialPopupStoreState, popupStoreSelectors, PopupTriggerMap, createPopupOpenState } from \"../../utils/popups/index.mjs\";\nimport { PATIENT_CLICK_THRESHOLD } from \"../../internals/constants.mjs\";\nconst selectors = {\n ...popupStoreSelectors,\n disabled: state => state.disabled,\n instantType: state => state.instantType,\n openMethod: state => state.openMethod,\n openChangeReason: state => state.openChangeReason,\n modal: state => state.modal,\n focusManagerModal: state => state.focusManagerModal,\n stickIfOpen: state => state.stickIfOpen,\n titleElementId: state => state.titleElementId,\n descriptionElementId: state => state.descriptionElementId,\n openOnHover: state => state.openOnHover,\n closeDelay: state => state.closeDelay,\n adaptiveOrigin: state => state.adaptiveOrigin\n};\n\n/**\n * The store view that detached handle-backed triggers read from. Both the real `PopoverStore` and\n * the inert fallback store satisfy it, so a trigger can read from whichever store the handle\n * currently exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus\n * `setOpen` (called by the focus guards) — so the exposed surface can't bypass the open-change\n * pipeline; on the detached fallback store every one of these mutations is a no-op.\n */\n\nexport class PopoverStore extends ReactStore {\n constructor(initialState, floatingId, nested) {\n const triggerElements = new PopupTriggerMap();\n super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors);\n }\n setOpen = (nextOpen, eventDetails) => {\n const isHover = eventDetails.reason === REASONS.triggerHover;\n const isKeyboardClick = eventDetails.reason === REASONS.triggerPress && eventDetails.event.detail === 0;\n const isDismissClose = !nextOpen && (eventDetails.reason === REASONS.escapeKey || eventDetails.reason == null);\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);\n const activeTriggerId = this.select('activeTriggerId');\n if (!nextOpen && eventDetails.reason === REASONS.closePress && eventDetails.trigger == null && activeTriggerId != null) {\n eventDetails.trigger = this.context.triggerElements.getById(activeTriggerId) ?? this.select('activeTriggerElement') ?? undefined;\n }\n this.context.onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n this.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);\n const changeState = () => {\n const popupOpenState = createPopupOpenState(this.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());\n popupOpenState.openChangeReason = eventDetails.reason;\n this.update(popupOpenState);\n };\n if (isHover) {\n // Only allow \"patient\" clicks to close the popover if it's open.\n // If they clicked within 500ms of the popover opening, keep it open.\n this.set('stickIfOpen', true);\n this.context.stickIfOpenTimeout.start(PATIENT_CLICK_THRESHOLD, () => {\n this.set('stickIfOpen', false);\n });\n ReactDOM.flushSync(changeState);\n } else {\n changeState();\n }\n let instantType;\n if (isKeyboardClick) {\n instantType = 'click';\n } else if (isDismissClose) {\n instantType = 'dismiss';\n } else if (eventDetails.reason === REASONS.focusOut) {\n instantType = 'focus';\n }\n this.set('instantType', instantType);\n };\n}\n\n/**\n * Creates the inert fallback store used by detached handle-backed triggers while no\n * `Popover.Root` is attached. It preserves a popover-specific trigger registry in context so\n * detached triggers can register before migrating to the live root store. `setOpen` is a no-op\n * (matching the inert reads/writes of `NullStore`), so a trigger can hand the store to focus-guard\n * helpers that expect `setOpen` without it ever taking effect while detached.\n */\nexport function createNullPopoverStore() {\n const triggerElements = new PopupTriggerMap();\n const store = new NullStore(Object.freeze(createInitialState(undefined, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors);\n return Object.assign(store, {\n setOpen: NOOP\n });\n}\nfunction createInitialState(initialState, triggerElements, floatingId, nested = false) {\n const state = {\n ...createInitialPopupStoreState(triggerElements, floatingId, nested),\n disabled: false,\n modal: false,\n focusManagerModal: false,\n instantType: undefined,\n openMethod: null,\n openChangeReason: null,\n titleElementId: undefined,\n descriptionElementId: undefined,\n stickIfOpen: true,\n openOnHover: false,\n closeDelay: 0,\n adaptiveOrigin: undefined,\n ...initialState\n };\n if (state.open && initialState?.mounted === undefined) {\n state.mounted = true;\n }\n return state;\n}\nfunction createInitialContext(triggerElements) {\n return {\n popupRef: /*#__PURE__*/React.createRef(),\n onOpenChange: undefined,\n onOpenChangeComplete: undefined,\n triggerFocusTargetRef: /*#__PURE__*/React.createRef(),\n beforeContentFocusGuardRef: /*#__PURE__*/React.createRef(),\n stickIfOpenTimeout: new Timeout(),\n triggerElements\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { fastComponent } from '@base-ui/utils/fastHooks';\nimport { useDismiss, FloatingTree } from \"../../floating-ui-react/index.mjs\";\nimport { PopoverRootContext, usePopoverRootContext } from \"./PopoverRootContext.mjs\";\nimport { PopoverStore } from \"../store/PopoverStore.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { PopupHandleAttachment, useImplicitActiveTrigger, usePopupRootStore, useOpenStateTransitions, usePopupInteractionProps, usePopupRootSync } from \"../../utils/popups/index.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PopoverRootComponent = fastComponent(function PopoverRootComponent({\n props\n}) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n modal = false,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null\n } = props;\n const store = usePopoverRootStore(handle, {\n modal,\n open: defaultOpen,\n openProp,\n activeTriggerId: defaultTriggerIdProp,\n triggerIdProp\n });\n store.useControlledProp('openProp', openProp);\n store.useControlledProp('triggerIdProp', triggerIdProp);\n const open = store.useState('open');\n const mounted = store.useState('mounted');\n const payload = store.useState('payload');\n store.useContextCallback('onOpenChange', onOpenChange);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n usePopupRootSync(store, open);\n useImplicitActiveTrigger(store);\n const {\n forceUnmount\n } = useOpenStateTransitions(open, store, () => {\n store.update({\n stickIfOpen: true,\n openChangeReason: null\n });\n });\n store.useSyncedValues({\n modal\n });\n React.useEffect(() => {\n if (!open) {\n store.context.stickIfOpenTimeout.clear();\n }\n }, [store, open]);\n React.useImperativeHandle(props.actionsRef, () => ({\n unmount: forceUnmount,\n close: () => store.setOpen(false, createChangeEventDetails(REASONS.imperativeAction))\n }), [forceUnmount, store]);\n const shouldRenderInteractions = open || mounted;\n return /*#__PURE__*/_jsxs(PopoverRootContext.Provider, {\n value: store,\n children: [handle && /*#__PURE__*/_jsx(PopupHandleAttachment, {\n handle: handle,\n store: store\n }), shouldRenderInteractions && /*#__PURE__*/_jsx(PopoverInteractions, {\n store: store,\n modal: modal\n }), typeof children === 'function' ? children({\n payload\n }) : children]\n });\n});\n\n/**\n * Groups all parts of the popover.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nif (process.env.NODE_ENV !== \"production\") PopoverRootComponent.displayName = \"PopoverRootComponent\";\nexport function PopoverRoot(props) {\n if (usePopoverRootContext(true)) {\n return /*#__PURE__*/_jsx(PopoverRootComponent, {\n props: props\n });\n }\n return /*#__PURE__*/_jsx(FloatingTree, {\n children: /*#__PURE__*/_jsx(PopoverRootComponent, {\n props: props\n })\n });\n}\nfunction usePopoverRootStore(handle, initialState) {\n // The store is owned by this Root instance and created exactly once. It is not tied to the handle:\n // the handle attaches to it, so swapping the handle re-attaches rather than recreating state.\n // Default values are only initial values; controlled values and root state are synced after creation.\n const store = usePopupRootStore((floatingId, nested) => new PopoverStore(initialState, floatingId, nested));\n\n // Popover-specific: dispose the patient-click timeout held in the store's context on unmount.\n React.useEffect(() => store.context.stickIfOpenTimeout.disposeEffect(), [store]);\n return store;\n}\nfunction PopoverInteractions({\n store,\n modal\n}) {\n const floatingRootContext = store.useState('floatingRootContext');\n const dismiss = useDismiss(floatingRootContext, {\n outsidePressEvent: {\n // Ensure `aria-hidden` on outside elements is removed immediately\n // on outside press when trapping focus.\n mouse: modal === 'trap-focus' ? 'sloppy' : 'intentional',\n touch: 'sloppy'\n }\n });\n\n // `useDismiss` is not given an `enabled` option, so it always returns both prop bags. Restore\n // the `EMPTY_OBJECT` fallbacks if that ever changes: the store fields are non-optional.\n // `dismiss.trigger` is always the same object as `dismiss.reference`.\n const triggerProps = dismiss.reference;\n // PopoverPopup already spreads `FOCUSABLE_POPUP_PROPS` directly, so the popup\n // props only need to carry the dismiss handlers.\n const popupProps = dismiss.floating;\n usePopupInteractionProps(store, {\n activeTriggerProps: triggerProps,\n inactiveTriggerProps: triggerProps,\n popupProps\n });\n return null;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { contains, getNextTabbable, getTabbableAfterElement, getTabbableBeforeElement, isOutsideEvent } from \"../../floating-ui-react/utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\n\n/**\n * Minimal store interface required by the focus guard hook.\n * Both PopoverStore and MenuStore satisfy this interface.\n */\n\n/**\n * Provides focus guard handlers for popup triggers (Popover, Menu).\n *\n * When the popup is open, invisible focus guard elements are placed before and after\n * the trigger. These handlers close the popup and move focus to the appropriate\n * tabbable element when the guards receive focus (i.e. when the user tabs out).\n */\nexport function useTriggerFocusGuards(store, triggerElementRef) {\n const preFocusGuardRef = React.useRef(null);\n function handlePreFocusGuardFocus(event) {\n ReactDOM.flushSync(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent, event.currentTarget));\n });\n const previousTabbable = getTabbableBeforeElement(preFocusGuardRef.current);\n previousTabbable?.focus();\n }\n function handleFocusTargetFocus(event) {\n const positionerElement = store.select('positionerElement');\n if (positionerElement && isOutsideEvent(event, positionerElement)) {\n store.context.beforeContentFocusGuardRef.current?.focus();\n } else {\n ReactDOM.flushSync(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent, event.currentTarget));\n });\n let nextTabbable = getTabbableAfterElement(store.context.triggerFocusTargetRef.current || triggerElementRef.current);\n while (nextTabbable !== null && contains(positionerElement, nextTabbable)) {\n const prevTabbable = nextTabbable;\n nextTabbable = getNextTabbable(nextTabbable);\n if (nextTabbable === prevTabbable) {\n break;\n }\n }\n nextTabbable?.focus();\n }\n }\n return {\n preFocusGuardRef,\n handlePreFocusGuardFocus,\n handleFocusTargetFocus\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { fastComponentRef } from '@base-ui/utils/fastHooks';\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.mjs\";\nimport { useButton } from \"../../internals/use-button/useButton.mjs\";\nimport { triggerOpenStateMapping, pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../internals/constants.mjs\";\nimport { safePolygon, useClick, useHoverReferenceInteraction } from \"../../floating-ui-react/index.mjs\";\nimport { OPEN_DELAY } from \"../utils/constants.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { usePopupHandleStore, useTriggerDataForwarding } from \"../../utils/popups/index.mjs\";\nimport { useTriggerFocusGuards } from \"../../utils/popups/useTriggerFocusGuards.mjs\";\nimport { useOpenMethodTriggerProps } from \"../../utils/useOpenInteractionType.mjs\";\n\n/**\n * A button that opens the popover.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const PopoverTrigger = fastComponentRef(function PopoverTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n disabled = false,\n nativeButton = true,\n handle,\n payload,\n openOnHover = false,\n delay = OPEN_DELAY,\n closeDelay = 0,\n id: idProp,\n ...elementProps\n } = componentProps;\n const rootStore = usePopoverRootContext(true);\n const handleStore = usePopupHandleStore(handle);\n const store = handleStore ?? rootStore;\n if (!store) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.' : _formatErrorMessage(74));\n }\n const thisTriggerId = useBaseUiId(idProp);\n const isTriggerActive = store.useState('isTriggerActive', thisTriggerId);\n const floatingContext = store.useState('floatingRootContext');\n const isOpenedByThisTrigger = store.useState('isOpenedByTrigger', thisTriggerId);\n const popupId = store.useState('triggerPopupId', thisTriggerId);\n const triggerElementRef = React.useRef(null);\n const {\n registerTrigger,\n isMountedByThisTrigger\n } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {\n payload,\n disabled,\n openOnHover,\n closeDelay\n });\n const openReason = store.useState('openChangeReason');\n const stickIfOpen = store.useState('stickIfOpen');\n const openMethod = store.useState('openMethod');\n const focusManagerModal = store.useState('focusManagerModal');\n const hoverProps = useHoverReferenceInteraction(floatingContext, {\n enabled: !disabled && openOnHover && (openMethod !== 'touch' || openReason !== REASONS.triggerPress),\n mouseOnly: true,\n move: false,\n handleClose: safePolygon(),\n restMs: delay,\n delay: {\n close: closeDelay\n },\n triggerElementRef,\n isActiveTrigger: isTriggerActive,\n isClosing: () => store.select('transitionStatus') === 'ending'\n });\n const click = useClick(floatingContext, {\n stickIfOpen\n });\n const interactionTypeProps = useOpenMethodTriggerProps(() => store.select('open'), interactionType => {\n store.set('openMethod', interactionType);\n });\n const rootTriggerProps = store.useState('triggerProps', isMountedByThisTrigger);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const stateAttributesMapping = {\n open(value) {\n if (value && openReason === REASONS.triggerPress) {\n return pressableTriggerOpenStateMapping.open(value);\n }\n return triggerOpenStateMapping.open(value);\n }\n };\n const {\n preFocusGuardRef,\n handlePreFocusGuardFocus,\n handleFocusTargetFocus\n } = useTriggerFocusGuards(store, triggerElementRef);\n const state = {\n disabled,\n open: isOpenedByThisTrigger\n };\n const element = useRenderElement('button', componentProps, {\n state,\n ref: [buttonRef, forwardedRef, registerTrigger, triggerElementRef],\n props: [click.reference, hoverProps, rootTriggerProps, interactionTypeProps, {\n [CLICK_TRIGGER_IDENTIFIER]: '',\n id: thisTriggerId,\n 'aria-haspopup': 'dialog',\n 'aria-expanded': isOpenedByThisTrigger,\n 'aria-controls': popupId\n }, elementProps, getButtonProps],\n stateAttributesMapping\n });\n\n // A fragment with key is required to ensure that the `element` is mounted to the same DOM node\n // regardless of whether the focus guards are rendered or not.\n const keyedElement = /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId);\n if (isMountedByThisTrigger && !focusManagerModal) {\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(FocusGuard, {\n ref: preFocusGuardRef,\n onFocus: handlePreFocusGuardFocus\n }), keyedElement, /*#__PURE__*/_jsx(FocusGuard, {\n ref: store.context.triggerFocusTargetRef,\n onFocus: handleFocusTargetFocus\n })]\n });\n }\n return keyedElement;\n});\nif (process.env.NODE_ENV !== \"production\") PopoverTrigger.displayName = \"PopoverTrigger\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const PopoverPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") PopoverPortalContext.displayName = \"PopoverPortalContext\";\nexport function usePopoverPortalContext() {\n const value = React.useContext(PopoverPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Popover.Portal> is missing.' : _formatErrorMessage(45));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.mjs\";\nimport { PopoverPortalContext } from \"./PopoverPortalContext.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PopoverPortal = /*#__PURE__*/React.forwardRef(function PopoverPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const store = usePopoverRootContext();\n const mounted = store.useState('mounted');\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(PopoverPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") PopoverPortal.displayName = \"PopoverPortal\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const PopoverPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") PopoverPositionerContext.displayName = \"PopoverPositionerContext\";\nexport function usePopoverPositionerContext() {\n const context = React.useContext(PopoverPositionerContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.' : _formatErrorMessage(46));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { FloatingNode, useFloatingNodeId } from \"../../floating-ui-react/index.mjs\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.mjs\";\nimport { PopoverPositionerContext } from \"./PopoverPositionerContext.mjs\";\nimport { useAnchorPositioning } from \"../../internals/useAnchorPositioning.mjs\";\nimport { usePopoverPortalContext } from \"../portal/PopoverPortalContext.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { POPUP_COLLISION_AVOIDANCE } from \"../../internals/constants.mjs\";\nimport { useAnimationsFinished } from \"../../internals/useAnimationsFinished.mjs\";\nimport { usePositioner } from \"../../utils/usePositioner.mjs\";\nimport { useAnchoredPopupScrollLock } from \"../../utils/useAnchoredPopupScrollLock.mjs\";\n\n/**\n * Positions the popover against the trigger.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const PopoverPositioner = /*#__PURE__*/React.forwardRef(function PopoverPositioner(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n anchor,\n // `useAnchorPositioning` applies the same defaults to the undefined values; the names\n // remain destructured to exclude the props from `elementProps`.\n positionMethod,\n side,\n align,\n sideOffset,\n alignOffset,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding,\n arrowPadding,\n sticky,\n disableAnchorTracking = false,\n collisionAvoidance = POPUP_COLLISION_AVOIDANCE,\n ...elementProps\n } = componentProps;\n const store = usePopoverRootContext();\n const keepMounted = usePopoverPortalContext();\n const nodeId = useFloatingNodeId();\n const floatingRootContext = store.useState('floatingRootContext');\n const mounted = store.useState('mounted');\n const open = store.useState('open');\n const openReason = store.useState('openChangeReason');\n const triggerElement = store.useState('activeTriggerElement');\n const modal = store.useState('modal');\n const openMethod = store.useState('openMethod');\n const positionerElement = store.useState('positionerElement');\n const instantType = store.useState('instantType');\n const transitionStatus = store.useState('transitionStatus');\n const adaptiveOrigin = store.useState('adaptiveOrigin');\n const prevTriggerElementRef = React.useRef(null);\n const runOnceAnimationsFinish = useAnimationsFinished(positionerElement);\n const positioning = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod,\n mounted,\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n disableAnchorTracking,\n keepMounted,\n nodeId,\n collisionAvoidance,\n adaptiveOrigin\n });\n const domReference = floatingRootContext.useState('domReferenceElement');\n\n // When the current trigger element changes, enable transitions on the\n // positioner temporarily\n useIsoLayoutEffect(() => {\n const currentTriggerElement = domReference;\n const prevTriggerElement = prevTriggerElementRef.current;\n if (currentTriggerElement) {\n prevTriggerElementRef.current = currentTriggerElement;\n }\n if (prevTriggerElement && currentTriggerElement && currentTriggerElement !== prevTriggerElement) {\n store.set('instantType', undefined);\n const ac = new AbortController();\n runOnceAnimationsFinish(() => {\n store.set('instantType', 'trigger-change');\n }, ac.signal);\n return () => {\n ac.abort();\n };\n }\n return undefined;\n }, [domReference, runOnceAnimationsFinish, store]);\n const trueModalNonHover = modal === true && openReason !== REASONS.triggerHover;\n useAnchoredPopupScrollLock(open && trueModalNonHover, openMethod === 'touch', positionerElement, triggerElement);\n const setPositionerElement = store.useStateSetter('positionerElement');\n const state = {\n open,\n side: positioning.side,\n align: positioning.align,\n anchorHidden: positioning.anchorHidden,\n instant: instantType\n };\n const element = usePositioner(componentProps, state, {\n styles: positioning.positionerStyles,\n transitionStatus,\n props: elementProps,\n refs: [forwardedRef, setPositionerElement],\n hidden: !mounted,\n inert: !open\n });\n return /*#__PURE__*/_jsxs(PopoverPositionerContext.Provider, {\n value: positioning,\n children: [mounted && trueModalNonHover && /*#__PURE__*/_jsx(InternalBackdrop, {\n inert: inertValue(!open),\n cutout: triggerElement\n }), /*#__PURE__*/_jsx(FloatingNode, {\n id: nodeId,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") PopoverPositioner.displayName = \"PopoverPositioner\";","import { isHTMLElement } from '@floating-ui/utils/dom';\nexport { stopEvent, isIndexOutOfListBounds, isListIndexDisabled, findNonDisabledListIndex, getMaxListIndex, getMinListIndex } from \"../../floating-ui-react/utils.mjs\";\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const HOME = 'Home';\nexport const END = 'End';\nexport const PAGE_UP = 'PageUp';\nexport const PAGE_DOWN = 'PageDown';\nexport const COMPOSITE_KEYS = new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);\nexport const SHIFT = 'Shift';\nexport const MODIFIER_KEYS = [SHIFT, 'Control', 'Alt', 'Meta'];\nfunction isInputElement(element) {\n return isHTMLElement(element) && element.tagName === 'INPUT';\n}\nexport function isNativeInput(element) {\n if (isInputElement(element) && element.selectionStart != null) {\n return true;\n }\n if (isHTMLElement(element) && element.tagName === 'TEXTAREA') {\n return true;\n }\n return false;\n}\nexport function scrollIntoViewIfNeeded(scrollContainer, element, direction, orientation) {\n if (!scrollContainer || !element || !element.scrollTo) {\n return;\n }\n let targetX = scrollContainer.scrollLeft;\n let targetY = scrollContainer.scrollTop;\n const isOverflowingX = scrollContainer.clientWidth < scrollContainer.scrollWidth;\n const isOverflowingY = scrollContainer.clientHeight < scrollContainer.scrollHeight;\n if (isOverflowingX && orientation !== 'vertical') {\n const elementOffsetLeft = getOffset(scrollContainer, element, 'left');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (direction === 'ltr') {\n if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n } else if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n }\n }\n if (direction === 'rtl') {\n if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n } else if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n }\n }\n }\n if (isOverflowingY && orientation !== 'horizontal') {\n const elementOffsetTop = getOffset(scrollContainer, element, 'top');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (elementOffsetTop - elementStyles.scrollMarginTop < scrollContainer.scrollTop + containerStyles.scrollPaddingTop) {\n // overflow upwards, align top edges\n targetY = elementOffsetTop - elementStyles.scrollMarginTop - containerStyles.scrollPaddingTop;\n } else if (elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom > scrollContainer.scrollTop + scrollContainer.clientHeight - containerStyles.scrollPaddingBottom) {\n // overflow downwards, align bottom edges\n targetY = elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom - scrollContainer.clientHeight + containerStyles.scrollPaddingBottom;\n }\n }\n scrollContainer.scrollTo({\n left: targetX,\n top: targetY,\n behavior: 'auto'\n });\n}\nfunction getOffset(ancestor, element, side) {\n const propName = side === 'left' ? 'offsetLeft' : 'offsetTop';\n let result = 0;\n while (element.offsetParent) {\n result += element[propName];\n if (element.offsetParent === ancestor) {\n break;\n }\n element = element.offsetParent;\n }\n return result;\n}\nfunction getStyles(element) {\n const styles = getComputedStyle(element);\n return {\n scrollMarginTop: parseFloat(styles.scrollMarginTop) || 0,\n scrollMarginRight: parseFloat(styles.scrollMarginRight) || 0,\n scrollMarginBottom: parseFloat(styles.scrollMarginBottom) || 0,\n scrollMarginLeft: parseFloat(styles.scrollMarginLeft) || 0,\n scrollPaddingTop: parseFloat(styles.scrollPaddingTop) || 0,\n scrollPaddingRight: parseFloat(styles.scrollPaddingRight) || 0,\n scrollPaddingBottom: parseFloat(styles.scrollPaddingBottom) || 0,\n scrollPaddingLeft: parseFloat(styles.scrollPaddingLeft) || 0\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ToolbarRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToolbarRootContext.displayName = \"ToolbarRootContext\";\nexport function useToolbarRootContext(optional) {\n const context = React.useContext(ToolbarRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.' : _formatErrorMessage(69));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nexport const ClosePartContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ClosePartContext.displayName = \"ClosePartContext\";\nexport function useClosePartCount() {\n const [closePartCount, setClosePartCount] = React.useState(0);\n const register = useStableCallback(() => {\n setClosePartCount(count => count + 1);\n return () => {\n setClosePartCount(count => Math.max(0, count - 1));\n };\n });\n const context = React.useMemo(() => ({\n register\n }), [register]);\n return {\n context,\n hasClosePart: closePartCount > 0\n };\n}\nexport function useClosePartRegistration() {\n const context = React.useContext(ClosePartContext);\n useIsoLayoutEffect(() => {\n return context?.register();\n }, [context]);\n}","'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { FloatingFocusManager, useHoverFloatingInteraction } from \"../../floating-ui-react/index.mjs\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.mjs\";\nimport { usePopoverPositionerContext } from \"../positioner/PopoverPositionerContext.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../internals/getDisabledMountTransitionStyles.mjs\";\nimport { ClosePartContext, useClosePartCount } from \"../../utils/closePart.mjs\";\nimport { FOCUSABLE_POPUP_PROPS, createDefaultInitialFocus } from \"../../utils/popups/index.mjs\";\n\n/**\n * A container for the popover contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PopoverPopup = /*#__PURE__*/React.forwardRef(function PopoverPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n initialFocus,\n finalFocus,\n ...elementProps\n } = componentProps;\n const store = usePopoverRootContext();\n const positioner = usePopoverPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const {\n context: closePartContext,\n hasClosePart\n } = useClosePartCount();\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const instantType = store.useState('instantType');\n const transitionStatus = store.useState('transitionStatus');\n const popupProps = store.useState('popupProps');\n const titleId = store.useState('titleElementId');\n const descriptionId = store.useState('descriptionElementId');\n const modal = store.useState('modal');\n const mounted = store.useState('mounted');\n const openReason = store.useState('openChangeReason');\n const activeTriggerElement = store.useState('activeTriggerElement');\n const floatingContext = store.useState('floatingRootContext');\n const floatingId = floatingContext.useState('floatingId');\n const disabled = store.useState('disabled');\n const openOnHover = store.useState('openOnHover');\n const closeDelay = store.useState('closeDelay');\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n useHoverFloatingInteraction(floatingContext, {\n enabled: openOnHover && !disabled,\n closeDelay\n });\n const resolvedInitialFocus = initialFocus === undefined ? createDefaultInitialFocus(store.context.popupRef) : initialFocus;\n const focusManagerModal = modal !== false && hasClosePart;\n store.useSyncedValue('focusManagerModal', focusManagerModal);\n const setPopupElement = store.useStateSetter('popupElement');\n const state = {\n open,\n side: positioner.side,\n align: positioner.align,\n instant: instantType,\n transitionStatus\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, store.context.popupRef, setPopupElement],\n props: [popupProps, {\n id: floatingId,\n role: 'dialog',\n ...FOCUSABLE_POPUP_PROPS,\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n onKeyDown(event) {\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n }\n }, getDisabledMountTransitionStyles(transitionStatus), elementProps],\n stateAttributesMapping: popupTransitionStateMapping\n });\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingContext,\n openInteractionType: openMethod,\n modal: focusManagerModal,\n disabled: !mounted || openReason === REASONS.triggerHover,\n initialFocus: resolvedInitialFocus,\n returnFocus: finalFocus,\n restoreFocus: \"popup\",\n previousFocusableElement: isHTMLElement(activeTriggerElement) ? activeTriggerElement : undefined,\n nextFocusableElement: store.context.triggerFocusTargetRef,\n beforeContentFocusGuardRef: store.context.beforeContentFocusGuardRef,\n children: /*#__PURE__*/_jsx(ClosePartContext.Provider, {\n value: closePartContext,\n children: element\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") PopoverPopup.displayName = \"PopoverPopup\";","import type * as React from \"react\";\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\";\n\nimport { usePortalContainer } from \"#components/portal-root\";\nimport { cn } from \"#lib/utils\";\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n container,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<PopoverPrimitive.Positioner.Props, \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"> &\n Pick<PopoverPrimitive.Portal.Props, \"container\">) {\n const portalContainer = usePortalContainer();\n return (\n <PopoverPrimitive.Portal container={container ?? portalContainer}>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n );\n}\n\nfunction PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nexport { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };\n","import type React from \"react\";\n\nimport { Popover, PopoverContent, PopoverTrigger } from \"@jslib/ui/components/popover\";\nimport { linkClassName } from \"@jslib/ui/components/text-link\";\nimport { cn } from \"@jslib/ui/lib/utils\";\n\nimport Message from \"@components/Message\";\nimport { FaqLinkComponent } from \"@components/FaqLink/FaqLinkComponent\";\n\ninterface HowDoesVerifyingWorkProps {\n initialVisibility?: boolean;\n}\n\nconst HowDoesVerifyingWorkComponent: React.FC<HowDoesVerifyingWorkProps> = ({\n initialVisibility = false,\n}: HowDoesVerifyingWorkProps) => (\n <Popover defaultOpen={initialVisibility}>\n <div>\n <PopoverTrigger\n // WCAG 1.4.1: the trigger sits inline in body text, so colour can't be its only cue. It is\n // underlined whatever the brand theme sets for links, and the underline clears on hover.\n className={cn(linkClassName, \"cursor-pointer underline hover:no-underline\")}\n >\n <Message id=\"howDoesVerifyingWork\" />\n </PopoverTrigger>\n </div>\n <PopoverContent side=\"bottom\" sideOffset={10} className=\"block w-82.5 p-5 font-body\">\n <Message id=\"step.personalInfo.howDoesVerifyingWorkDetails\" />\n \n <FaqLinkComponent />\n </PopoverContent>\n </Popover>\n);\n\nexport { HowDoesVerifyingWorkComponent };\n","import type * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"#lib/utils\";\n\nconst alertVariants = cva(\n \"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"alert-action\" className={cn(\"absolute top-2 right-2\", className)} {...props} />\n );\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertAction };\n","import type React from \"react\";\n\nimport { Alert, AlertDescription } from \"@jslib/ui/components/alert\";\n\nimport { Message } from \"@/components/Message\";\n\nimport { useProgramConfiguration } from \"../../lib/state/contextHooks\";\nimport { getRemainingRewardCodes } from \"../../lib/ProgramConfiguration/programConfigurationGetters\";\n\n/**\n * The rewards left, when the program reports them, as a note for a converted step's header.\n * The count reaches the message as `{{offersRemaining}}` through useIntlValues.\n */\nexport const LowRewardPoolNote: React.FC = () => {\n const offersRemaining = getRemainingRewardCodes(useProgramConfiguration());\n\n if (offersRemaining === null) return null;\n\n return (\n <Alert role=\"note\">\n <AlertDescription>\n <Message id=\"lowRewardPool\" />\n </AlertDescription>\n </Alert>\n );\n};\n","import { createContext, useContext } from \"react\";\n\n// True inside a full-right landing page, whose side panel shows the step's intro beside the form.\nconst LandingSidePanelContext = createContext(false);\n\nexport const LandingSidePanelProvider = LandingSidePanelContext.Provider;\n\nexport const useLandingSidePanel = (): boolean => useContext(LandingSidePanelContext);\n","import type React from \"react\";\n\nimport { StepHeading } from \"@jslib/ui/components/step-heading\";\nimport { cn } from \"@jslib/ui/lib/utils\";\n\nimport Message from \"@/components/Message\";\nimport { type MessageId } from \"@/lib/intl/types\";\nimport { useVerificationResponse } from \"@/lib/state/contextHooks\";\n\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport { type PersonalInfoResponse } from \"../../lib/types/types\";\nimport { HowDoesVerifyingWorkComponent } from \"../HowDoesVerifyingWork/HowDoesVerifyingWorkComponent\";\nimport { LowRewardPoolNote } from \"../RewardsRemaining/LowRewardPoolNote\";\nimport { useLandingSidePanel } from \"../Layout/LandingSidePanel\";\nimport { StepLogo } from \"../StepHeader/StepHeader\";\n\ninterface PersonalInfoStepIntroProps {\n /**\n * `form` (the default) opens the step. `landingSide` is the full-right landing page's side panel:\n * no logo, start-aligned, and a larger title that doesn't take focus.\n */\n placement?: \"form\" | \"landingSide\";\n}\n\n/** The logo, title, subtitle and explainer that open a personal-info step, then its required-fields note. */\nexport const PersonalInfoStepIntro: React.FC<PersonalInfoStepIntroProps> = ({\n placement = \"form\",\n}) => {\n const inLandingSide = placement === \"landingSide\";\n // In the form, the intro gives way to the side panel while the panel is beside the form.\n const sidePanelShowsIntro = useLandingSidePanel() && !inLandingSide;\n // No response yet while the verification loads (the landing side panel renders meanwhile).\n const verificationResponse = useVerificationResponse<PersonalInfoResponse | undefined>();\n const failedInstantMatch = !!verificationResponse && hasFailedInstantMatch(verificationResponse);\n\n const titleMsgId: MessageId = failedInstantMatch\n ? \"step.personalInfo.tryAgain.title\"\n : \"step.personalInfo.title\";\n const subtitleMsgId: MessageId = failedInstantMatch\n ? \"step.personalInfo.tryAgain.subtitle\"\n : \"step.personalInfo.subtitle\";\n\n const title = (\n <h1>\n <Message id={titleMsgId} />\n </h1>\n );\n\n return (\n <header className=\"flex flex-col\">\n {!inLandingSide && <StepLogo />}\n <div className={cn(sidePanelShowsIntro && \"landing-wide:hidden\")}>\n {inLandingSide ? (\n // The side panel's title is v2's: four times the body size, in the panel's colour, with a\n // heading's default top margin (0.67em).\n <div className=\"mt-[0.67em] mb-2 font-heading text-[length:calc(var(--body-size)*4)] leading-tight text-(--landing-foreground)\">\n {title}\n </div>\n ) : (\n <StepHeading>{title}</StepHeading>\n )}\n <div\n className={cn(\n inLandingSide\n ? \"mb-2 text-start text-[length:calc(var(--body-size)*1.5)]\"\n : \"text-center\",\n failedInstantMatch && \"text-destructive\",\n )}\n >\n <Message id={subtitleMsgId} />\n </div>\n {!failedInstantMatch && (\n <>\n <div className={inLandingSide ? \"text-start\" : \"text-center\"}>\n <HowDoesVerifyingWorkComponent />\n </div>\n <LowRewardPoolNote />\n </>\n )}\n </div>\n {/* The required-fields note belongs with the fields, so the side panel leaves it to the form. */}\n {!inLandingSide && (\n <div className=\"mt-[calc(var(--spacing)*2.4)]\">\n <Message id=\"requiredFields\" />\n </div>\n )}\n </header>\n );\n};\n","import type React from \"react\";\nimport { Suspense } from \"react\";\n\nimport { cn } from \"@jslib/ui/lib/utils\";\n\nimport { useBrandTheme } from \"@/components/BrandThemeProvider/BrandThemeProvider\";\n\nimport { PersonalInfoStepIntro } from \"../PersonalInfoStepIntro/PersonalInfoStepIntro\";\nimport { useIsEmbedded } from \"../../lib/frames/useIsEmbedded\";\n\nimport { LandingSidePanelProvider } from \"./LandingSidePanel\";\n\nexport interface LayoutProps {\n children: React.ReactNode;\n renderAsLandingPage?: boolean;\n}\n\n// The landing page fills at least the viewport; `--landing-min-height` lets a host with no viewport\n// of its own (MySheerID's preview pane) set it.\nconst LANDING_MIN_HEIGHT = \"min-h-[var(--landing-min-height,100svh)]\";\n\n/*\n * The landing page around the form. The `landing-*` variants (src/tailwind.css) query the form's\n * width: beside-the-form layouts stack at `landing-narrow`, and the form fills a phone.\n */\nexport const Layout: React.FC<LayoutProps> = ({ children, renderAsLandingPage }) => {\n const { isEmbedded } = useIsEmbedded();\n const layout = useBrandTheme().brandTheme.form?.layout;\n\n if (!renderAsLandingPage || isEmbedded) {\n return <>{children}</>;\n }\n\n // Centred unless the brand theme picks one of the beside-the-form layouts.\n const splitRight = layout === \"SPLIT_RIGHT\";\n const fullRight = layout === \"FULL_RIGHT\";\n const center = !splitRight && !fullRight;\n\n return (\n <LandingSidePanelProvider value={fullRight}>\n <div\n data-landing-layout={layout ?? \"CENTER\"}\n className={cn(\n \"flex h-full w-full justify-center bg-(--landing-background) bg-(image:--landing-background-image) bg-cover bg-fixed bg-no-repeat transition-colors duration-300\",\n LANDING_MIN_HEIGHT,\n !center && \"items-center\",\n )}\n >\n <div\n className={cn(\n \"flex h-full w-full justify-center landing-phone:p-0\",\n center && \"items-center p-4\",\n !center && \"justify-end\",\n fullRight && \"landing-narrow:justify-center\",\n )}\n >\n {fullRight && (\n // The panel sits on the landing colours, so its links take --landing-link.\n <aside className=\"flex w-1/2 flex-col ps-16 pt-20 text-(--landing-foreground) [--link:var(--landing-link)] landing-narrow:hidden\">\n {/* Outside the form's Suspense boundary, so it waits for its messages on its own. */}\n <Suspense fallback={null}>\n <PersonalInfoStepIntro placement=\"landingSide\" />\n </Suspense>\n </aside>\n )}\n <div\n className={cn(\n \"h-full w-full max-w-[39rem] bg-background p-6 transition-colors duration-300 landing-narrow:p-0\",\n !center && \"flex w-1/2 items-center justify-center\",\n splitRight && [LANDING_MIN_HEIGHT, \"landing-narrow:w-[60%]\"],\n fullRight && \"mx-16 my-4 w-full landing-narrow:m-0\",\n \"landing-phone:h-full landing-phone:w-full\",\n )}\n >\n <div className=\"h-full w-full\">{children}</div>\n </div>\n </div>\n </div>\n </LandingSidePanelProvider>\n );\n};\n","import { PortalRoot } from \"@jslib/ui/components/portal-root\";\n\n// The form's body typography and background. The portal container lives inside it so overlays\n// inherit them. Print keeps backgrounds (the internal mockup generator prints the form). The colours\n// fade, so the theme arriving after the first paint doesn't flash.\nconst FormWrapperComponent = ({ children }: { children: React.ReactNode }) => (\n <div className=\"min-w-62.5 bg-background font-body leading-normal transition-colors duration-300 [print-color-adjust:exact]\">\n <PortalRoot>{children}</PortalRoot>\n </div>\n);\n\nexport { FormWrapperComponent };\n","import React, { Suspense, useMemo } from \"react\";\nimport { IntlProvider } from \"react-intl\";\nimport { I18nextProvider } from \"react-i18next\";\nimport flatten from \"flat\";\nimport produce from \"immer\";\nimport { useLDClient } from \"launchdarkly-react-client-sdk\";\nimport deterministicStringify from \"json-stable-stringify\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\nimport { DirectionRoot } from \"@jslib/ui/components/direction-root\";\n\nimport i18next from \"@/lib/intl/i18next\";\n\nimport { getInstallType } from \"@/lib/ServerApi/ApiUrls\";\n\nimport { getQueryOrOption } from \"@/lib/ServerApi/TestingRouteOverrides\";\nimport { QUERY_STRING_PREV_STEP_OVERRIDE, QUERY_STRING_STEP_OVERRIDE } from \"@/constants\";\nimport {\n useProgramConfiguration,\n useLoadingState,\n useProgramMessages,\n useProgramTheme,\n useVerificationId,\n} from \"@/lib/state/contextHooks\";\nimport { selectFormValidationOptions } from \"@/lib/VerificationService/formValidationOptions\";\nimport {\n programStore,\n selectPreviewMessages,\n selectResponseOverride,\n} from \"@/lib/state/programStore\";\nimport { useStore } from \"@/lib/store/useStore\";\nimport { MockStepsEnum } from \"@/lib/types/runtimeTypes\";\n\nimport { getOptionsMessages } from \"../lib/intl/intl\";\nimport {\n type VerificationStep,\n type ProgramTheme,\n type VerificationService,\n} from \"../lib/types/types\";\nimport { getOptions } from \"../options/options\";\nimport { CustomDimensionNames, setUserDimension } from \"../lib/GoogleAnalytics/ga\";\n\nimport { LoadStepComponent as LoadStep } from \"./LoadStepComponent\";\nimport { CustomTextWrapper } from \"./CustomTextWrapper\";\nimport { TestModeFlagComponent } from \"./TestModeFlag/TestModeFlagComponent\";\nimport { LoadingScreenComponent as LoadingScreen } from \"./LoadingScreen/LoadingScreenComponent\";\nimport { Layout } from \"./Layout/Layout\";\nimport { FormWrapperComponent } from \"./FormWrapper/FormWrapperComponent\";\nimport { useFlags } from \"./FeatureFlags/hooks\";\nimport { BrandThemeProvider } from \"./BrandThemeProvider/BrandThemeProvider\";\n\nexport const NewVerificationInnerComponent = ({\n locale,\n programTheme: programThemeProp,\n verificationService: verificationServiceProp,\n programId,\n}: {\n // TODO better types:\n locale: any;\n programTheme: ProgramTheme;\n verificationService: VerificationService;\n programId: string;\n}) => {\n const ldClient = useLDClient();\n const { renderAs, _launchDarklyUserTargeting } = getOptions();\n const programTheme = useProgramTheme() ?? programThemeProp;\n const programConfiguration = useProgramConfiguration();\n const verificationId = useVerificationId();\n const { isLoading, loadingStep } = useLoadingState();\n const responseOverride = useStore(programStore, selectResponseOverride);\n const verificationResponse = useMemo(\n () =>\n responseOverride\n ? { ...verificationServiceProp.verificationResponse, ...responseOverride }\n : verificationServiceProp.verificationResponse,\n [responseOverride, verificationServiceProp.verificationResponse],\n );\n const verificationService = useMemo(\n () => ({\n ...verificationServiceProp,\n programTheme,\n verificationResponse,\n formValidationOptions: selectFormValidationOptions(\n programConfiguration,\n verificationResponse,\n verificationServiceProp.viewModel,\n ),\n }),\n [verificationServiceProp, programTheme, programConfiguration, verificationResponse],\n );\n const flags = useFlags();\n\n React.useEffect(() => {\n try {\n if (flags && verificationService && verificationService.viewModel) {\n const stringFlags = deterministicStringify(flags);\n setUserDimension(CustomDimensionNames.flags, stringFlags);\n const metadata = verificationService.viewModel.metadata || {};\n const metadataWithFlags = produce(metadata, (draft) => {\n draft.flags = stringFlags;\n });\n const newViewModel = produce(verificationService.viewModel, (draft) => {\n draft.metadata = metadataWithFlags;\n });\n verificationService.updateViewModel(newViewModel);\n }\n } catch (e) {\n logger.error(e);\n }\n }, []);\n\n React.useEffect(() => {\n // HC-202: Launch darkly experimentation trial.\n // Keeping this behind a private option so we can turn it on just for hosted programs.\n if (verificationId && _launchDarklyUserTargeting && ldClient) {\n const identity: {\n kind: string;\n user: { key: string; locale?: string; segment?: string; installType?: string };\n program: { key: string };\n } = {\n kind: \"multi\",\n user: {\n key: verificationId,\n locale: verificationService.verificationResponse.locale,\n segment: verificationService.verificationResponse.segment,\n installType: getInstallType(),\n },\n program: { key: programId },\n };\n ldClient.identify(identity);\n }\n }, [verificationId, ldClient]);\n\n React.useEffect(() => {\n try {\n // provides feature flags for mysheerid-preview install script\n getOptions()._launchDarklyFlagCb(flags);\n } catch {\n // Do nothing if LD option is not present\n }\n }, [flags]);\n\n const messages = useProgramMessages();\n const previewMessages = useStore(programStore, selectPreviewMessages);\n const messagesWithOptions = {\n ...messages,\n ...(flatten(getOptionsMessages(locale)) as object),\n ...(flatten(previewMessages?.[locale] ?? {}) as object),\n };\n const direction = i18next.dir(locale);\n\n return (\n // Don't change locale, so we don't have to load pluralization data, which has complications. HD-560\n <IntlProvider\n locale=\"en\"\n key={locale}\n messages={messagesWithOptions}\n textComponent={CustomTextWrapper}\n >\n <BrandThemeProvider themeChoices={programTheme?.themeChoices}>\n <DirectionRoot direction={direction} className={`sid-${direction} sid-locale-${locale}`}>\n <FormWrapperComponent>\n <Layout renderAsLandingPage={renderAs === \"landingPage\"}>\n <I18nextProvider i18n={i18next}>\n <Suspense fallback={<LoadingScreen step={loadingStep} />}>\n {isLoading ? (\n <LoadingScreen step={loadingStep} />\n ) : getQueryOrOption(QUERY_STRING_STEP_OVERRIDE) === MockStepsEnum.loading ? (\n <LoadingScreen\n step={getQueryOrOption(QUERY_STRING_PREV_STEP_OVERRIDE) as VerificationStep}\n />\n ) : (\n <div>\n {!getOptions().hideTestModeFlag && (\n <TestModeFlagComponent verificationService={verificationService} />\n )}\n <LoadStep\n stepToLoad={\n verificationService.overrideStep ||\n verificationService.verificationResponse?.currentStep\n }\n verificationService={verificationService}\n />\n </div>\n )}\n </Suspense>\n </I18nextProvider>\n </Layout>\n </FormWrapperComponent>\n </DirectionRoot>\n </BrandThemeProvider>\n </IntlProvider>\n );\n};\n","import { postMessageFromIframe } from \"./postMessageFromIframe\";\n\n/*\n Trap focus in the lightbox by sending and receiving postMessages, here and from the modal script, while tabbing through the program.\n*/\nconst trapFocus = () => {\n let lastFocusableElement: HTMLElement | null = null;\n\n document.addEventListener(\"keydown\", (e) => {\n const isTabPressed: boolean = e.key === \"Tab\";\n\n if (!isTabPressed) {\n return;\n }\n const focusableElements =\n 'button, a[href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n const focusableContent: NodeListOf<HTMLElement> = document.querySelectorAll(focusableElements);\n lastFocusableElement = focusableContent[focusableContent.length - 1];\n\n if (lastFocusableElement) {\n if (!e.shiftKey && document.activeElement === lastFocusableElement) {\n postMessageFromIframe({ type: \"focus\", focusOn: \"firstElement\" });\n e.preventDefault();\n }\n }\n });\n\n window.addEventListener(\"message\", (event) => {\n const message = event.data;\n\n if (message.focusOn === \"lastElement\" && lastFocusableElement) {\n lastFocusableElement.focus();\n }\n });\n\n // set inital focus to lightbox close button\n postMessageFromIframe({ type: \"focus\", focusOn: \"firstElement\" });\n};\n\nexport const maintainFocusInLightbox = () => {\n window.addEventListener(\"message\", (event) => {\n const message = event.data;\n\n if (message.isInLightBox === \"true\") {\n trapFocus();\n }\n });\n};\n","/* eslint-disable */\n// TODO remove eslint-disable and fix this file\nimport React from \"react\";\nimport { Dispatch } from \"redux\";\nimport { connect, MapStateToProps, MapDispatchToProps, MergeProps } from \"react-redux\";\nimport { IntlProvider } from \"react-intl\";\nimport flatten from \"flat\";\n\nimport {\n DatabaseId,\n Locale,\n ReduxState,\n VerificationService,\n VerificationServiceFunctions,\n VerificationServiceValues,\n Segment,\n} from \"../lib/types/types\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\nimport {\n createFetchNewVerificationRequest,\n createUpdateViewModel,\n createUpdateFieldValidationErrors,\n createSubmitStep,\n createFetchExistingVerificationRequest,\n createUpdateProgramTheme,\n createUpdateLocale,\n createResetState,\n} from \"../lib/VerificationService/VerificationServiceActions\";\n\nimport { getLocaleSafely, getOptionsMessages } from \"../lib/intl/intl\";\nimport { useProgramMessages } from \"../lib/state/contextHooks\";\nimport { getSafe } from \"@jslib/shared/utils/getSafe\";\nimport { NewVerificationInnerComponent } from \"./NewVerificationInnerComponent\";\nimport { enableES5 } from \"immer\";\nimport { maintainFocusInLightbox } from \"../lib/frames/windowFocus\";\nimport { listenToInstallPage } from \"../lib/frames/frameMessages\";\nimport { setViewModel } from \"../lib/VerificationService/ViewModel\";\nimport { setOptions } from \"../options/options\";\nimport { CustomTextWrapper } from \"./CustomTextWrapper\";\n\ninterface NewVerificationProps {\n programId: DatabaseId;\n verificationService?: VerificationService;\n trackingId?: string;\n}\ninterface NewVerificationState {}\n\nexport class NewVerification extends React.Component<NewVerificationProps, NewVerificationState> {\n verificationService: VerificationService;\n\n constructor(props) {\n super(props);\n logger.info(\"NewVerificationComponent: constructing\");\n\n if (this.props.trackingId && this.props.trackingId.length) {\n logger.info(`Attaching a trackingId to this verification request ${this.props.trackingId}`);\n } else {\n logger.info(\"No trackingId to associate with the verification request\");\n }\n }\n\n componentDidMount() {\n enableES5(); // https://sheerid.atlassian.net/browse/UX-362\n maintainFocusInLightbox();\n listenToInstallPage((event) => {\n switch (event.data.action) {\n case \"setViewModel\":\n setViewModel(event.data.viewModel, {\n partial: true,\n metadataCheck: true,\n externalUserIdCheck: true,\n });\n break;\n case \"setOptions\":\n setOptions(event.data.options);\n break;\n default:\n }\n });\n logger.info(\"NewVerificationComponent: fetchNewVerificationRequest\");\n const currentSegment = getSafe<Segment>(\n () => this.props.verificationService.verificationResponse.segment,\n );\n this.props.verificationService.fetchNewVerificationRequest(\n this.props.programId,\n currentSegment,\n this.props.verificationService.previousViewModel,\n this.props.trackingId,\n );\n }\n\n public render() {\n const { viewModel } = this.props.verificationService;\n\n const locale: Locale = getLocaleSafely(viewModel);\n\n const { programTheme } = this.props.verificationService;\n const { verificationResponse } = this.props.verificationService;\n logger.info(\n \"NewVerificationComponent: verificationResponse, viewModel\",\n verificationResponse,\n viewModel,\n );\n\n logger.info(\n `NewVerificationComponent: locale: ${locale}, currentStep: ${verificationResponse?.currentStep}`,\n );\n\n return (\n <NewVerificationInnerComponent\n locale={locale}\n programTheme={programTheme}\n verificationService={this.props.verificationService}\n programId={this.props.programId}\n />\n );\n }\n}\n\nconst mapStateToProps: MapStateToProps<ReduxState, NewVerificationProps, any> = (\n state: ReduxState,\n ownProps: NewVerificationProps,\n): ReduxState => ({\n ...state,\n});\n\nconst mapDispatchToProps: MapDispatchToProps<any, any> = (\n dispatch: Dispatch,\n ownProps: NewVerificationProps,\n) => ({\n dispatch, // Pass dispatch through for mergeProps use\n fetchNewVerificationRequest: createFetchNewVerificationRequest(dispatch),\n fetchExistingVerificationRequest: createFetchExistingVerificationRequest(dispatch),\n updateViewModel: createUpdateViewModel(dispatch),\n updateLocale: createUpdateLocale(dispatch, ownProps.programId as DatabaseId),\n updateProgramTheme: createUpdateProgramTheme(dispatch),\n updateFieldValidationErrors: createUpdateFieldValidationErrors(dispatch),\n resetState: createResetState(dispatch),\n});\n\n// Return a VerificationService\nconst mergeProps: MergeProps<\n VerificationServiceValues & ReduxState,\n VerificationServiceFunctions,\n NewVerificationProps,\n any\n> = (propsFromState, propsFromDispatch, ownProps): NewVerificationProps => {\n const { dispatch, ...otherDispatchProps } = propsFromDispatch;\n const { programTheme } = propsFromState;\n\n return {\n verificationService: {\n ...propsFromState,\n ...otherDispatchProps,\n // Create submitStep here, need access to fully set programTheme\n submitStep: createSubmitStep(dispatch, programTheme),\n },\n ...ownProps,\n };\n};\n\nexport const NewVerificationComponent = connect(\n mapStateToProps,\n mapDispatchToProps,\n mergeProps,\n)(NewVerification);\n","import type React from \"react\";\nimport { LDProvider } from \"launchdarkly-react-client-sdk\";\n\nimport { flagDefaults } from \"@jslib/shared/flags\";\n\nexport const getLDProgramContext = (programId: string) => ({\n kind: \"program\",\n key: programId,\n});\n\ninterface ProviderProps {\n programId: string;\n children: React.ReactNode;\n}\n\nexport const FlagProvider = ({ programId, children }: ProviderProps) => (\n <LDProvider\n clientSideID={import.meta.env.VITE_LD_CLIENT_ID}\n // It is important that we create our contexts carefully in the jslib\n // to avoid creating contexts for anyone who looks at a jslib form.\n context={getLDProgramContext(programId)}\n flags={flagDefaults}\n reactOptions={{ useCamelCaseFlagKeys: false }}\n options={{ streaming: false }}\n >\n {children}\n </LDProvider>\n);\n","import React, { useEffect } from \"react\";\nimport { Provider } from \"react-redux\";\n\nimport { getSafe } from \"@jslib/shared/utils/getSafe\";\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport { NewVerificationComponent } from \"../NewVerificationComponent\";\nimport { type DatabaseId, type ProgramIdAction } from \"../../lib/types/types\";\nimport { getStore } from \"../../lib/VerificationService/VerificationServiceStore\";\nimport {\n CustomDimensionNames,\n observePerformanceMetrics,\n setUserDimension,\n} from \"../../lib/GoogleAnalytics/ga\";\nimport { addPredefinedHooks } from \"../../lib/hooks\";\nimport { getPublishedVersion } from \"../../lib/ServerApi/ApiUrls\";\nimport { FlagProvider } from \"../FeatureFlags/FlagProvider\";\n\ninterface VerificationFormProps {\n programId: DatabaseId;\n // TODO fix next line\n trackingId?: string; // eslint-disable-line\n}\n\nconst store = getStore();\n\n// This call can take place at any time after the jslib .js file is parsed\n// It only needs to be called once per page-load\n\n/** @deprecated : Remove once NR has been updated to use clientVersion (HC-1665) */\nsetUserDimension(\n CustomDimensionNames.jslibVersionActual,\n getSafe(() => getPublishedVersion(), \"?\"),\n);\nsetUserDimension(\n CustomDimensionNames.clientVersion,\n getSafe(() => getPublishedVersion(), \"?\"),\n);\n\nexport const VerificationForm = React.forwardRef(\n ({ programId, trackingId = undefined }: VerificationFormProps, ref: any) => {\n try {\n addPredefinedHooks(); // keep this as early as possible in the jslib initialization\n } catch (e) {\n logger.warn(\"Failed to add predefined hooks\", e);\n }\n\n useEffect(() => {\n // this should only happen once per form\n observePerformanceMetrics();\n });\n\n store.dispatch<ProgramIdAction>({ programId, type: \"PROGRAM_ID\" });\n\n if (ref) {\n // eslint-disable-next-line no-param-reassign\n ref.current = {\n refresh: React.useCallback(() => store.dispatch({ type: \"FORCE_UPDATE\" }), []),\n reset: React.useCallback(() => store.dispatch({ type: \"RESET_STATE\" }), []),\n };\n }\n\n return (\n <Provider store={store}>\n <FlagProvider programId={programId}>\n <NewVerificationComponent programId={programId} trackingId={trackingId} />\n </FlagProvider>\n </Provider>\n );\n },\n);\n","import React from \"react\";\nimport ReactDom from \"react-dom\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport { type DatabaseId, type ViewModel } from \"../lib/types/types\";\nimport { assertValidHtmlElement } from \"../lib/types/assertions\";\nimport { VerificationForm } from \"../components/VerificationForm/VerificationFormComponent\";\n\nexport class VerificationFormEs5 {\n element: HTMLElement;\n\n programId: DatabaseId;\n\n trackingId: string;\n\n viewModel: ViewModel;\n\n ref: React.RefObject<any>;\n\n constructor(element: HTMLElement, programId: DatabaseId, trackingId?: string) {\n // In case the 'new' keyword isn't used by es5 devs\n if (!(this instanceof VerificationFormEs5)) {\n throw new Error(\n 'Method \"render\" not found. Did you use the \"new\" keyword when instantiating VerificationForm?',\n );\n }\n\n logger.info(`Constructing VerificationFormEs5 ${programId}`);\n assertValidHtmlElement(element);\n\n this.element = element;\n this.programId = programId;\n this.trackingId = trackingId;\n this.ref = React.createRef();\n\n this.render();\n }\n\n refresh() {\n this.ref.current.refresh();\n }\n\n reset() {\n this.ref.current.reset();\n }\n\n render() {\n ReactDom.render(\n <VerificationForm programId={this.programId} trackingId={this.trackingId} ref={this.ref} />,\n this.element,\n );\n }\n\n unmount() {\n ReactDom.unmountComponentAtNode(this.element);\n }\n}\n","import { hooks } from \"../hooks\";\nimport { createStore } from \"../store/createStore\";\nimport { getEmptyViewModel } from \"../ServerApi/VerificationRequestGetters\";\nimport { fieldIdErrorMap } from \"../VerificationService/VerificationServiceHelpers\";\nimport { createUpdateFieldValidationErrors } from \"../VerificationService/VerificationServiceActions\";\nimport { getStore } from \"../VerificationService/VerificationServiceStore\";\nimport { setViewModel } from \"../VerificationService/ViewModel\";\nimport { getFieldValidationErrorsEmpty } from \"../types/empties\";\nimport {\n type FieldValidationErrors,\n type StudentPersonalInfoViewModel,\n type VerificationStep,\n type ViewModel,\n} from \"../types/types\";\n\n/** The form states the MySheerID theme builder can preview. */\nexport type PreviewFormState = \"empty\" | \"filled\" | \"errors\";\n\nexport interface PreviewFormStateStoreState {\n /** `undefined` until a form state is previewed, and again once it's cleared. */\n formState: PreviewFormState | undefined;\n}\n\n/**\n * The selected form state. The form is driven the way an installer drives it: values through the public `setViewModel`, errors through the action the form's own validation dispatches. The selection is kept so a newly rendered form can be given it once it's ready.\n */\nexport const previewFormStateStore = createStore<PreviewFormStateStoreState>({\n formState: undefined,\n});\n\n// Dummy values for the \"filled\" state. A step supports form-state previews only if it's listed here. Any other step is left alone.\nconst FILLED_VALUES: Partial<Record<VerificationStep, Partial<ViewModel>>> = {\n collectStudentPersonalInfo: {\n firstName: \"Jane\",\n lastName: \"Doe\",\n email: \"jane.doe@example.edu\",\n phoneNumber: \"555-555-0100\",\n birthDate: \"2000-05-15\",\n organization: { id: 1, name: \"Example University\" },\n } satisfies Partial<StudentPersonalInfoViewModel>,\n};\n\n// Every field, with the error its validator reports, plus market consent, which has no server error id. A step only shows the errors of the fields it renders, so this errors exactly those.\nconst getAllFieldsErrored = (): FieldValidationErrors => {\n const errors = getFieldValidationErrorsEmpty();\n fieldIdErrorMap.forEach((fieldId, errorId) => {\n errors[fieldId] = errorId;\n });\n errors.marketConsentValue = \"marketConsentRequired\";\n return errors;\n};\n\n// Apply the selection current when this runs, so applies queued while a form loads all land on the latest one. Clearing (no selection) empties the fields, the same as \"empty\".\nconst applyFormState = (step: VerificationStep | undefined): void => {\n const filled = step ? FILLED_VALUES[step] : undefined;\n if (!filled) return;\n const { formState } = previewFormStateStore.get();\n\n if (formState === \"filled\") {\n setViewModel(filled);\n } else {\n const empty = getEmptyViewModel(step) as Record<string, unknown>;\n setViewModel(Object.fromEntries(Object.keys(filled).map((key) => [key, empty[key]])));\n }\n createUpdateFieldValidationErrors(getStore().dispatch)(\n formState === \"errors\" ? getAllFieldsErrored() : getFieldValidationErrorsEmpty(),\n );\n};\n\n// Like `setViewModel`, wait out a loading form. The step, and so the dummy data, is only known then.\nconst whenFormReady = (callback: (step: VerificationStep | undefined) => void): void => {\n const { isLoading, verificationResponse } = getStore().getState();\n if (isLoading) {\n hooks.once(\"ON_VERIFICATION_READY\", (response) => callback(response?.currentStep));\n } else {\n callback(verificationResponse?.currentStep);\n }\n};\n\n/** Re-render the previewed form empty, filled with dummy data, or with every visible field errored. */\nexport function setPreviewFormState(formState: PreviewFormState): void {\n previewFormStateStore.set((prev) => (prev.formState === formState ? prev : { formState }));\n whenFormReady(applyFormState);\n}\n\n/** Drop the selection, emptying the form if a state had been applied. */\nexport function clearPreviewFormState(): void {\n if (previewFormStateStore.get().formState === undefined) return;\n previewFormStateStore.set({ formState: undefined });\n whenFormReady(applyFormState);\n}\n\n/** Give a newly rendered form the selected state, whether it was selected before or after the render. */\nexport function reapplyPreviewFormState(): void {\n if (previewFormStateStore.get().formState === undefined) return;\n whenFormReady(applyFormState);\n}\n","import i18next, { addOptionsMessages, Namespace } from \"../intl/i18next\";\nimport { getOptions } from \"../../options/options\";\nimport { type Locale } from \"../types/types\";\n\nimport { programStore } from \"./programStore\";\n\n/**\n * Override message copy for a locale for program previewing. Writes the store (react-intl path, merged on\n * render) and the i18next `options` namespace (i18next path); the store change re-renders both.\n */\nexport function setPreviewMessages(locale: Locale, messages: Record<string, unknown>): void {\n programStore.set((prev) => ({\n ...prev,\n overrides: {\n ...prev.overrides,\n messages: {\n ...prev.overrides.messages,\n [locale]: { ...prev.overrides.messages?.[locale], ...messages },\n },\n },\n }));\n\n addOptionsMessages({ [locale]: messages });\n}\n\n/**\n * Remove preview message overrides from the i18next `options` namespace. That namespace is shared with legacy `setOptions` messages, so we drop the whole per-locale bundle then re-apply the legacy messages from options.\n */\nexport function clearPreviewMessages(locales: Locale[]): void {\n locales.forEach((locale) => i18next.removeResourceBundle(locale, Namespace.OPTIONS));\n addOptionsMessages(getOptions().messagesWithLocale as Record<string, object>);\n}\n","import { getOverriddenMock } from \"../ServerApi/TestingRouteOverrides\";\nimport { getStore } from \"../VerificationService/VerificationServiceStore\";\nimport { setOptions } from \"../../options/options\";\nimport { type MockStep, type Options } from \"../types/types\";\n\nimport { programStore, type MockOverrides } from \"./programStore\";\n\n// Preview mock directives map onto the existing `mock*` options that getOverriddenMock reads.\nconst MOCK_OPTION_KEYS: Partial<Record<keyof MockOverrides, keyof Options>> = {\n step: \"mockStep\",\n previousStep: \"mockPreviousStep\",\n segment: \"mockSegment\",\n subSegment: \"mockSubSegment\",\n errorId: \"mockErrorId\",\n errorDetailId: \"mockErrorDetailId\",\n captchaState: \"mockCaptchaState\",\n rewardCode: \"mockRewardCode\",\n redirectUrl: \"mockRedirectUrl\",\n consumerInfoState: \"mockConsumerInfoState\",\n idCheckLoopServiceType: \"mockIdCheckLoopServiceType\",\n docSelected: \"mockDocSelected\",\n};\n\n/**\n * Preview a mocked verification response (step, redirect URL, reward code, error, …). Bridges to the\n * still-Redux verificationResponse: reuses getOverriddenMock, then dispatches in place — no teardown.\n */\nexport async function setPreviewMock(directives: MockOverrides): Promise<void> {\n // Feed the existing options-based mock machinery (getOverriddenMock reads these).\n const optionPatch: Partial<Options> = {};\n (Object.keys(directives) as (keyof MockOverrides)[]).forEach((key) => {\n const optionKey = MOCK_OPTION_KEYS[key];\n if (optionKey) (optionPatch as Record<string, unknown>)[optionKey] = directives[key];\n });\n setOptions(optionPatch);\n\n // Build the full per-step mock (reusing getOverriddenMock for parity) before touching the store,\n // so mock directives and the resolved response land in one atomic update — no intermediate render.\n const step = directives.step ?? programStore.get().overrides.mock?.step;\n const response = step\n ? await getOverriddenMock(step as MockStep, getStore().getState().verificationResponse)\n : undefined;\n\n programStore.set((prev) => ({\n ...prev,\n overrides: {\n ...prev.overrides,\n mock: { ...prev.overrides.mock, ...directives },\n ...(response ? { response } : {}),\n },\n }));\n}\n","import { type DeepPartial } from \"../types/helpers\";\nimport {\n type AllResponseTypes,\n type Locale,\n type ProgramBranding,\n type ProgramConfiguration,\n} from \"../types/types\";\nimport { getStore } from \"../VerificationService/VerificationServiceStore\";\nimport { createUpdateLocale } from \"../VerificationService/VerificationServiceActions\";\n\nimport { programStore, setPreviewOverrides, clearPreviewOverrides } from \"./programStore\";\nimport {\n clearProgramConfigurationOverrides,\n setProgramConfigurationOverrides,\n} from \"./programConfigurationStore\";\nimport { clearProgramBrandingOverrides, setProgramBrandingOverrides } from \"./programBrandingStore\";\nimport { setPreviewMessages, clearPreviewMessages } from \"./previewMessages\";\nimport { setPreviewMock } from \"./previewResponse\";\nimport { disableMockProgram } from \"./mockProgram\";\nimport { clearPreviewFormState, setPreviewFormState } from \"./previewFormStateStore\";\n\n/**\n * Branding edits, in the `ProgramBranding` shape. MySheerID sends the whole branding, `fonts[]`\n * included: the form registers only fonts listed there, so a font the theme references must be in it.\n * Edits accumulate (each call deep-merges onto the last) and `clearPreview` drops them;\n * `{ brandTheme: null }` goes back to the program's theme choices.\n */\nexport function setPreviewBranding(branding: DeepPartial<ProgramBranding>): void {\n setProgramBrandingOverrides(branding);\n}\n\n/** Configuration edits, in the `ProgramConfiguration` shape. */\nexport function setPreviewConfiguration(configuration: DeepPartial<ProgramConfiguration>): void {\n setProgramConfigurationOverrides(configuration);\n}\n\n/** Merge a partial verification-response override onto the current response. */\nexport function setPreviewResponse(patch: Partial<AllResponseTypes>): void {\n setPreviewOverrides({ response: patch });\n}\n\n/** Switch the previewed locale without teardown (re-fetches messages via the existing action). */\nexport function setPreviewLocale(locale: Locale): Promise<object> {\n const store = getStore();\n const { programId, verificationResponse } = store.getState();\n return createUpdateLocale(store.dispatch, programId)(locale, verificationResponse?.segment);\n}\n\nexport function clearPreview(): void {\n // Capture message locales before clearing the store, so we can also drop them from i18next.\n const messageLocales = Object.keys(programStore.get().overrides.messages ?? {}) as Locale[];\n clearPreviewOverrides();\n clearProgramConfigurationOverrides();\n clearProgramBrandingOverrides();\n clearPreviewMessages(messageLocales);\n clearPreviewFormState();\n disableMockProgram();\n}\n\nexport { setPreviewMessages, setPreviewMock, setPreviewFormState };\n","import { type Flags } from \"@jslib/shared/flags\";\nimport { InstallTypes, setInstallType } from \"@jslib/shared/utils/getInstallType\";\n\nimport {\n type Locale,\n type MockStep,\n type Options,\n type ProgramThemeResponse,\n type ProgramThemeMessages,\n type Segment,\n} from \"../types/types\";\n\nimport \"../../scss/sheerid-iframe.scss\";\nimport { getMessages } from \"../intl/intl\";\nimport { setProgramTheme } from \"../VerificationService/ProgramTheme/ProgramTheme\";\nimport { VerificationFormEs5 } from \"../../es5Bindings/VerificationFormEs5\";\nimport { resetOptions, setOptions } from \"../../options/options\";\nimport { resetStore } from \"../VerificationService/VerificationServiceStore\";\nimport { enableMockProgram } from \"../state/mockProgram\";\nimport { reapplyPreviewFormState } from \"../state/previewFormStateStore\";\nimport {\n clearPreview,\n setPreviewBranding,\n setPreviewConfiguration,\n setPreviewFormState,\n setPreviewLocale,\n setPreviewMessages,\n setPreviewMock,\n setPreviewResponse,\n} from \"../state/previewApi\";\n\n// MySheerID's program builder is the only consumer of this bundle, so everything\n// it renders is a preview and reports itself as one.\nsetInstallType(InstallTypes.programBuilderPreview);\n\nexport function loadInElement(containerElement: HTMLElement, programId: string) {\n const form = new VerificationFormEs5(containerElement, programId);\n return form;\n}\n\n/** What `renderMockProgram` renders. `collect` resolves to the mocked program's collect step. */\nexport interface MockProgramConfig {\n step: MockStep;\n}\n\n/**\n * Render a single step of a mocked program — no programId, and no calls to the verification\n * service. For previewing branding in the theme designer, before a program exists.\n *\n * Theming is not part of this call. Apply it with `setPreviewBranding` / `setPreviewConfiguration` / `setPreviewMessages`, either before this call (the first paint is then already themed) or after it (the form re-renders in place, no teardown). Rendering a different step is a fresh call.\n * `setPreviewBranding` takes the whole branding, `fonts[]` included: its brand theme replaces the program's.\n *\n * `setPreviewFormState` switches the collect step between empty, filled and errored, the same way. A state selected before this call is applied once the new form is ready.\n *\n * The rendered form is for display only; it is not a working verification and must not be submitted.\n */\nexport function renderMockProgram(\n containerElement: HTMLElement,\n config: MockProgramConfig,\n): VerificationFormEs5 {\n enableMockProgram();\n setOptions({\n mockStep: config.step,\n mockSegment: \"student\",\n });\n const form = new VerificationFormEs5(containerElement, undefined);\n reapplyPreviewFormState();\n return form;\n}\n\nexport function setProgramThemeChoices(theme: ProgramThemeResponse) {\n setProgramTheme(theme);\n}\n\nexport function setProgramOptions(options: Options) {\n resetStore(); // Some options (e.g. locale) aren't correctly changed without resetting the store\n setOptions(options);\n}\n\nexport function resetProgramOptions() {\n resetOptions();\n}\n\nexport function getFeatureFlags(callback: (flags: Flags) => void) {\n setOptions({\n _launchDarklyFlagCb: callback,\n });\n}\n\nexport function getProgramMessages(\n locale: Locale,\n programThemeMessages: ProgramThemeMessages,\n segment?: Segment,\n) {\n return getMessages(locale, programThemeMessages, segment);\n}\n\n// Re-exported as named exports so consumers can import them the same way as the legacy functions\n// above (which are `export function`). This file is the public bundle API; jslib-internal code\n// should import these from `../state/previewApi`, not from here.\nexport {\n setPreviewBranding,\n setPreviewConfiguration,\n setPreviewMessages,\n setPreviewResponse,\n setPreviewMock,\n setPreviewLocale,\n setPreviewFormState,\n clearPreview,\n};\n\nexport default {\n loadInElement,\n renderMockProgram,\n getProgramMessages,\n getFeatureFlags,\n setProgramThemeChoices,\n setProgramOptions,\n resetProgramOptions,\n setPreviewBranding,\n setPreviewConfiguration,\n setPreviewMessages,\n setPreviewResponse,\n setPreviewMock,\n setPreviewLocale,\n setPreviewFormState,\n clearPreview,\n};\n"],"ignoreList":[0,2,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,SAAgBkQ,GAAgB,EAC9B,SACA,cACA,eACC;CACD,IAAMC,KAAA,GAAQnQ,EAAAA,QAAAA,QAAe;EAC3B;EACA;CACF,IAAI,CAACoQ,GAAMC,CAAS,CAAC;CACrB,QAAA,GAAOpQ,EAAAA,cAAAA,CAAcqI,GAAY,UAAU,EACzC,SACF,GAAGgI,CAAQ;AACb;;;ACIA,IAAMC,MAA2B,GAAgC,MAAqB;CAIpF,AAHIC,EAAK,UAAUA,EAAK,YACtBlN,EAAiBkN,CAAmB,GAEtCvJ,GAAyBuJ,GAAMC,CAAO;AACxC,GAEaC,MACX,GACA,IAAgC,EAAE,SAAS,GAA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