@hhgtech/hhg-components 1.29.362-beta-4 → 1.29.362-beta-6
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/build/{InputDate-e1be6e30.js → InputDate-fd0e82e5.js} +5 -5
- package/build/{LastPeriod-71d556f2.js → LastPeriod-675b0494.js} +1 -1
- package/build/{MobileBottomNavigationIcon-0e8e618d.js → MobileBottomNavigationIcon-88da3d18.js} +3 -3
- package/build/{Spinner-44d4dd80.js → Spinner-c338b48a.js} +1 -1
- package/build/{WhatsApp-9f8ebab8.js → WhatsApp-60349170.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +48 -48
- package/build/babyGrowth.js +83 -83
- package/build/cache.js +2 -2
- package/build/care.js +17 -17
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components/atoms/inputDate/InputDate.d.ts +2 -0
- package/build/components.js +96 -96
- package/build/{constants-b19745e6.js → constants-d903206f.js} +1 -1
- package/build/constants.js +3 -3
- package/build/constantsDomainLocales.js +1 -1
- package/build/constantsRiskScreener.js +2 -2
- package/build/constantsSite.js +2 -2
- package/build/{core-e0613b3f.js → core-b01c1ac6.js} +1 -1
- package/build/{dataTransform-5e92a531.js → dataTransform-394e0d39.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-e48ae369.js → editor-03eeead9.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/{InputDate-6cdaa933.js → InputDate-a4d6ee35.js} +5 -5
- package/build/esm/{LastPeriod-a9073d6f.js → LastPeriod-261ee5fa.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-f24602fc.js → MobileBottomNavigationIcon-b5a1301c.js} +3 -3
- package/build/esm/{Spinner-7eed0f04.js → Spinner-d0e7abf8.js} +1 -1
- package/build/esm/{WhatsApp-1aeae2c2.js → WhatsApp-0015ff5e.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +48 -48
- package/build/esm/babyGrowth.js +83 -83
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components/atoms/inputDate/InputDate.d.ts +2 -0
- package/build/esm/components.js +96 -96
- package/build/esm/{constants-d3ba59ed.js → constants-e2fef392.js} +1 -1
- package/build/esm/constants.js +3 -3
- package/build/esm/constantsDomainLocales.js +1 -1
- package/build/esm/constantsRiskScreener.js +2 -2
- package/build/esm/constantsSite.js +2 -2
- package/build/esm/{core-ae363980.js → core-1a9e6336.js} +1 -1
- package/build/esm/{dataTransform-18f61be2.js → dataTransform-8522b6e5.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-325c13f8.js → editor-aa7c1e7e.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/footer.js +21 -21
- package/build/esm/gAssets.js +2 -2
- package/build/esm/{healthTools-464b574f.js → healthTools-6d9bc6bb.js} +1 -1
- package/build/esm/healthToolsCardWrapper.js +18 -18
- package/build/esm/healthToolsForm.js +33 -33
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-7c4eee9e.js → index-0096a0e9.js} +6 -6
- package/build/esm/{index-16284103.js → index-0157dab8.js} +16 -16
- package/build/esm/{index-81e8359f.js → index-02a48b88.js} +3 -3
- package/build/esm/{index-98070cea.js → index-0a319369.js} +1 -1
- package/build/esm/{index-b6b313fd.js → index-1124693a.js} +31 -31
- package/build/esm/{index-0c2633b1.js → index-128b1ed7.js} +2 -2
- package/build/esm/{index-ce403ed6.js → index-12bd7a04.js} +5 -5
- package/build/esm/{index-873f2dd8.js → index-1334730d.js} +13 -13
- package/build/esm/{index-aabe5021.js → index-18855286.js} +11 -11
- package/build/esm/{index-5f92412c.js → index-1cc1ec84.js} +16 -16
- package/build/esm/{index-53c33c7d.js → index-210d3892.js} +32 -32
- package/build/esm/{index-ee89cc22.js → index-271fb414.js} +3 -3
- package/build/esm/{index-91fd0002.js → index-2c25389c.js} +2 -2
- package/build/esm/{index-0ca62c47.js → index-2d0027bb.js} +7 -7
- package/build/esm/{index-a5634eee.js → index-2dea69ae.js} +13 -13
- package/build/esm/{index-07d4351d.js → index-3b97009b.js} +6 -6
- package/build/esm/{index-59eccced.js → index-3d1a057a.js} +3 -3
- package/build/esm/{index-49c950af.js → index-3e49fab2.js} +2 -2
- package/build/esm/{index-10fd8bbd.js → index-43003e56.js} +2 -2
- package/build/esm/{index-380456e6.js → index-4f679233.js} +3 -3
- package/build/esm/{index-653e3328.js → index-5bacde9a.js} +1 -1
- package/build/esm/{index-3cd3b80a.js → index-62833621.js} +2 -2
- package/build/esm/{index-84363547.js → index-69266c15.js} +22 -22
- package/build/esm/{index-c15fab95.js → index-6aee72f8.js} +2 -2
- package/build/esm/{index-d6b5ccb5.js → index-6c0adc97.js} +1 -1
- package/build/esm/{index-7ef21c9f.js → index-6e30f84b.js} +6 -6
- package/build/esm/{index-2420ca4a.js → index-7bc63809.js} +2 -2
- package/build/esm/{index-fd10dcdf.js → index-7bee1da6.js} +1 -1
- package/build/esm/{index-45ecbd3d.js → index-7eb265fa.js} +18 -18
- package/build/esm/{index-4cb4bc06.js → index-8d7414f5.js} +2 -2
- package/build/esm/{index-4a786400.js → index-929b12bb.js} +1 -1
- package/build/esm/{index-1d68a46d.js → index-94fe2230.js} +15 -15
- package/build/esm/{index-5b64af28.js → index-980b3a3b.js} +21 -21
- package/build/esm/{index-c12512ca.js → index-9943a900.js} +2 -2
- package/build/esm/{index-ed345101.js → index-a0e28e14.js} +25 -25
- package/build/esm/{index-6bd8d6d6.js → index-a14ad51b.js} +2 -2
- package/build/esm/{index-e3725af6.js → index-a262027e.js} +17 -17
- package/build/esm/{index-4aaff87d.js → index-a3da289d.js} +1 -1
- package/build/esm/{index-ba8d6821.js → index-a48580cf.js} +18 -18
- package/build/esm/{index-d88fddbf.js → index-a92da53f.js} +16 -16
- package/build/esm/{index-acac3532.js → index-aa78faae.js} +13 -13
- package/build/esm/{index-9864c853.js → index-abd67120.js} +10 -10
- package/build/esm/{index-45ab1908.js → index-ade570f6.js} +3 -3
- package/build/esm/{index-99f4acdc.js → index-ae36d803.js} +7 -7
- package/build/esm/{index-d3d007d2.js → index-b824c63e.js} +6 -6
- package/build/esm/{index-037e4cbf.js → index-b867b65e.js} +17 -17
- package/build/esm/{index-0046d990.js → index-b88e063b.js} +6 -6
- package/build/esm/{index-0b0e3825.js → index-b8ae41e7.js} +1 -1
- package/build/esm/{index-1c2afeb5.js → index-c4070a12.js} +32 -32
- package/build/esm/{index-add9bdea.js → index-c487aa6f.js} +1 -1
- package/build/esm/{index-69a5fc8b.js → index-c4f0d220.js} +16 -16
- package/build/esm/{index-31f4587b.js → index-c502503e.js} +2 -2
- package/build/esm/{index-2852086c.js → index-c53221d3.js} +2 -2
- package/build/esm/{index-3eeade87.js → index-c75d775a.js} +13 -13
- package/build/esm/{index-088d0012.js → index-c7bef4da.js} +1 -1
- package/build/esm/{index-2d3bf3c9.js → index-cc9c4f8d.js} +24 -24
- package/build/esm/{index-217d458c.js → index-d4f98ef0.js} +3 -3
- package/build/esm/{index-f64086c7.js → index-d76f8524.js} +16 -16
- package/build/esm/{index-af3417e3.js → index-d926a789.js} +17 -17
- package/build/esm/{index-77d422e3.js → index-e2df7129.js} +2 -2
- package/build/esm/{index-f897f4f2.js → index-e2fa8007.js} +2 -2
- package/build/esm/{index-bdc55851.js → index-e512d075.js} +4 -4
- package/build/esm/{index-c4b210af.js → index-ed8b1b4d.js} +10 -10
- package/build/esm/{index-9c90717a.js → index-fdaccc36.js} +5 -5
- package/build/esm/index.js +117 -117
- package/build/esm/interfaces/types/Subot.d.ts +2 -0
- package/build/esm/{labelSorting-8345d24c.js → labelSorting-59a03a60.js} +4 -4
- package/build/esm/lead.js +25 -462
- package/build/esm/{logoIcon-57bb9648.js → logoIcon-f5fabf8a.js} +2 -2
- package/build/esm/mantine.js +25 -25
- package/build/esm/misc.js +17 -17
- package/build/esm/miscGetDynamicHealthTool.js +4 -4
- package/build/esm/miscGetSocialList.js +8 -8
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +5 -5
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +73 -73
- package/build/esm/moleculesArticleCard.js +6 -6
- package/build/esm/moleculesArticleCardV2.js +16 -16
- package/build/esm/navigation.js +45 -45
- package/build/esm/navigationLogoutPopup.js +9 -9
- package/build/esm/navigationProfileButton.js +23 -23
- package/build/esm/onboardingV2.js +29 -29
- package/build/esm/organisms.js +49 -49
- package/build/esm/{post-f8bf5a43.js → post-0bb56712.js} +2 -2
- package/build/esm/profileNavigation.js +19 -19
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +22 -22
- package/build/esm/ssoV2.js +29 -29
- package/build/esm/{store-8aab21fc.js → store-2f4a3de8.js} +4 -4
- package/build/esm/subot/components/dob/utils.d.ts +4 -2
- package/build/esm/subot/components/userInfoForm/utils.d.ts +2 -0
- package/build/esm/subot.js +118 -112
- package/build/esm/surveyOrPremiumBanner.js +32 -32
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-976d0d65.js → surveyThankyouCard-acd5065b.js} +5 -5
- package/build/esm/together.js +55 -55
- package/build/esm/togetherApiUtils.js +4 -4
- package/build/esm/togetherAtoms.js +30 -30
- package/build/esm/togetherComponentGlobalContext.js +4 -4
- package/build/esm/togetherMolecules.js +50 -50
- package/build/esm/togetherMoleculesCardAuthor.js +28 -28
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +38 -38
- package/build/esm/togetherOrganisms.js +49 -49
- package/build/esm/togetherRichTextEditor.js +17 -17
- package/build/esm/togetherShareBox.js +10 -10
- package/build/esm/{treePopoverMenu-499d73f5.js → treePopoverMenu-a2c5e10b.js} +19 -19
- package/build/esm/{types-0ea71f58.js → types-c6f4b649.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-dc3df0d5.js → useCategory-e6c5f3f4.js} +5 -5
- package/build/esm/{useHealthToolCache-01ecd27f.js → useHealthToolCache-42bb7e54.js} +1 -1
- package/build/esm/{useMantineLocale-bd093e71.js → useMantineLocale-86072926.js} +6 -6
- package/build/esm/usePlacesAutocomplete-a9d55e56.js +520 -0
- package/build/esm/{useScreenSize-bd068022.js → useScreenSize-d5709b35.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-43693169.js → utils-3fb29038.js} +3 -3
- package/build/esm/{utils-1a1fa9db.js → utils-80c1ae9d.js} +2 -2
- package/build/esm/{utils-20554857.js → utils-c7536c86.js} +2 -2
- package/build/esm/{utils-7da0a956.js → utils-fa1cee35.js} +4 -4
- package/build/esm/vaccination.js +21 -21
- package/build/footer.js +21 -21
- package/build/gAssets.js +2 -2
- package/build/{healthTools-076f76f5.js → healthTools-e42395ee.js} +1 -1
- package/build/healthToolsCardWrapper.js +18 -18
- package/build/healthToolsForm.js +33 -33
- package/build/hooks.js +13 -13
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-8a8a468e.js → index-001fada4.js} +13 -13
- package/build/{index-b13b1f46.js → index-053f53ad.js} +2 -2
- package/build/{index-d3d9a2b9.js → index-05432eda.js} +4 -4
- package/build/{index-b6f20d0e.js → index-0a086949.js} +6 -6
- package/build/{index-935c2efa.js → index-0b638588.js} +2 -2
- package/build/{index-49479aff.js → index-0d2b0272.js} +25 -25
- package/build/{index-20a90cd0.js → index-0e15566a.js} +10 -10
- package/build/{index-5d3f3176.js → index-14e8a4bf.js} +2 -2
- package/build/{index-2a69d374.js → index-1aa248b8.js} +3 -3
- package/build/{index-de65ab72.js → index-223ee091.js} +2 -2
- package/build/{index-35ce4787.js → index-234dcab6.js} +6 -6
- package/build/{index-1b63aa44.js → index-28246ee7.js} +18 -18
- package/build/{index-6c8d3059.js → index-2b4a1fa4.js} +2 -2
- package/build/{index-d4739619.js → index-2b664d4c.js} +6 -6
- package/build/{index-92750471.js → index-2fd0440f.js} +24 -24
- package/build/{index-9560e920.js → index-341b39a7.js} +1 -1
- package/build/{index-a013cc2e.js → index-3427e121.js} +1 -1
- package/build/{index-b87e6ebc.js → index-34ba141e.js} +31 -31
- package/build/{index-ea4f33ef.js → index-37170515.js} +16 -16
- package/build/{index-9090372f.js → index-47c7236c.js} +5 -5
- package/build/{index-8fca7a9d.js → index-4e12800c.js} +1 -1
- package/build/{index-558853e8.js → index-53b50908.js} +15 -15
- package/build/{index-21f4afdb.js → index-5475cf4e.js} +16 -16
- package/build/{index-3db4e12d.js → index-5a251e58.js} +16 -16
- package/build/{index-47e79b45.js → index-669d4781.js} +10 -10
- package/build/{index-3a974a72.js → index-6bbf3de0.js} +13 -13
- package/build/{index-a307a670.js → index-6d023e3f.js} +1 -1
- package/build/{index-2a177667.js → index-733dea52.js} +17 -17
- package/build/{index-13837682.js → index-7858e63b.js} +2 -2
- package/build/{index-21711ffd.js → index-7995fd09.js} +16 -16
- package/build/{index-b9da4d8b.js → index-7efb4007.js} +16 -16
- package/build/{index-0e638091.js → index-7f31c1b3.js} +17 -17
- package/build/{index-b5a0c362.js → index-868f265e.js} +21 -21
- package/build/{index-fadb11d3.js → index-869029fb.js} +3 -3
- package/build/{index-0c76baea.js → index-88c05c6d.js} +2 -2
- package/build/{index-58e51768.js → index-89dfd95d.js} +7 -7
- package/build/{index-699b9301.js → index-8af743c4.js} +1 -1
- package/build/{index-aebacbb2.js → index-8b14ab7a.js} +2 -2
- package/build/{index-69435f42.js → index-8bf4db6f.js} +17 -17
- package/build/{index-f84993ad.js → index-97349834.js} +1 -1
- package/build/{index-3b15a8ca.js → index-9ab6eff7.js} +3 -3
- package/build/{index-99718f1d.js → index-9becb073.js} +13 -13
- package/build/{index-a8aec9f7.js → index-a0523f88.js} +6 -6
- package/build/{index-e814fd18.js → index-a5454694.js} +32 -32
- package/build/{index-3db2f173.js → index-ab62215d.js} +3 -3
- package/build/{index-546d06a7.js → index-ac084a83.js} +18 -18
- package/build/{index-1b286145.js → index-b4b29605.js} +32 -32
- package/build/{index-89ddaca2.js → index-b9c21c28.js} +6 -6
- package/build/{index-1a053ab4.js → index-c0628923.js} +13 -13
- package/build/{index-d3a1b3a6.js → index-c06af6e7.js} +1 -1
- package/build/{index-4032bb76.js → index-c359d080.js} +2 -2
- package/build/{index-e79696ef.js → index-c3bcf68a.js} +2 -2
- package/build/{index-63c244cd.js → index-c80bb596.js} +3 -3
- package/build/{index-da767d94.js → index-c984ffbe.js} +2 -2
- package/build/{index-a8c86df7.js → index-d1741909.js} +1 -1
- package/build/{index-3e0c5791.js → index-db5c4f29.js} +7 -7
- package/build/{index-5016f9ca.js → index-deeabe50.js} +2 -2
- package/build/{index-65f33982.js → index-e06a7e67.js} +22 -22
- package/build/{index-a811f7ac.js → index-e76258d1.js} +3 -3
- package/build/{index-dc2c3c19.js → index-eaea1669.js} +11 -11
- package/build/{index-3667d285.js → index-f28b96a7.js} +2 -2
- package/build/{index-47ab9159.js → index-f39711fb.js} +2 -2
- package/build/{index-533d8aac.js → index-f518f327.js} +1 -1
- package/build/{index-60760dd9.js → index-fad8eaac.js} +5 -5
- package/build/index.js +117 -117
- package/build/interfaces/types/Subot.d.ts +2 -0
- package/build/{labelSorting-41215dae.js → labelSorting-3a57f00a.js} +4 -4
- package/build/lead.js +55 -492
- package/build/{logoIcon-aee89899.js → logoIcon-1d0cec48.js} +2 -2
- package/build/mantine.js +22 -22
- package/build/misc.js +17 -17
- package/build/miscGetDynamicHealthTool.js +4 -4
- package/build/miscGetSocialList.js +8 -8
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +5 -5
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +73 -73
- package/build/moleculesArticleCard.js +6 -6
- package/build/moleculesArticleCardV2.js +16 -16
- package/build/navigation.js +45 -45
- package/build/navigationLogoutPopup.js +9 -9
- package/build/navigationProfileButton.js +23 -23
- package/build/onboardingV2.js +28 -28
- package/build/organisms.js +49 -49
- package/build/{post-239560ac.js → post-953ae518.js} +2 -2
- package/build/profileNavigation.js +19 -19
- package/build/progressBar.js +1 -1
- package/build/pwg.js +22 -22
- package/build/ssoV2.js +27 -27
- package/build/{store-c0cc20c3.js → store-ec082514.js} +4 -4
- package/build/subot/components/dob/utils.d.ts +4 -2
- package/build/subot/components/userInfoForm/utils.d.ts +2 -0
- package/build/subot.js +116 -110
- package/build/surveyOrPremiumBanner.js +32 -32
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-9cc336eb.js → surveyThankyouCard-60c65d4f.js} +5 -5
- package/build/together.js +55 -55
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +50 -50
- package/build/togetherMoleculesCardAuthor.js +28 -28
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +38 -38
- package/build/togetherOrganisms.js +49 -49
- package/build/togetherRichTextEditor.js +17 -17
- package/build/togetherShareBox.js +10 -10
- package/build/{treePopoverMenu-bc38212c.js → treePopoverMenu-a5ab646e.js} +19 -19
- package/build/{types-e0c4369a.js → types-df93deb4.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-2ee381aa.js → useCategory-0f8cbb89.js} +5 -5
- package/build/{useHealthToolCache-98e0f614.js → useHealthToolCache-656e214f.js} +1 -1
- package/build/{useMantineLocale-bfb9db0d.js → useMantineLocale-d3b08d5e.js} +6 -6
- package/build/usePlacesAutocomplete-7b83983f.js +528 -0
- package/build/{useScreenSize-4399bd9f.js → useScreenSize-c6515eb2.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-403f0647.js → utils-89f1d6d4.js} +3 -3
- package/build/{utils-49d56a81.js → utils-8cdcde5d.js} +2 -2
- package/build/{utils-7877f771.js → utils-925d1a21.js} +2 -2
- package/build/{utils-20b7ba1c.js → utils-ad1f98b3.js} +4 -4
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- package/build/esm/usePlacesAutocomplete-6d0f68c7.js +0 -81
- package/build/usePlacesAutocomplete-f1b37b61.js +0 -85
- /package/build/{BMI_BOYS.percentile.monthly-ba882751.js → BMI_BOYS.percentile.monthly-0c545430.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-ea75e1cf.js → BMI_BOYS.percentile.weekly-b2abdd52.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-9ec7bad0.js → BMI_BOYS.percentile.yearly-73da03a1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-dafdf1fd.js → BMI_BOYS.zscore.monthly-5bc00bd2.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-b19cfd07.js → BMI_BOYS.zscore.weekly-b270dca9.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-6ca20420.js → BMI_BOYS.zscore.yearly-e11a3061.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-3730e0c7.js → BMI_GIRLS.percentile.monthly-f8d3ae24.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-cc69d490.js → BMI_GIRLS.percentile.weekly-ab748c6a.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-24832a0d.js → BMI_GIRLS.percentile.yearly-002aebb0.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-54e2ef16.js → BMI_GIRLS.zscore.monthly-e261af22.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-f63bbc32.js → BMI_GIRLS.zscore.weekly-d58566a9.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-562bc044.js → BMI_GIRLS.zscore.yearly-1147723e.js} +0 -0
- /package/build/{ChevronDown-67f69d5f.js → ChevronDown-83383af6.js} +0 -0
- /package/build/{Close-5e14817a.js → Close-8e99232e.js} +0 -0
- /package/build/{Google-8a43b2c9.js → Google-d203467c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-2ece4d2b.js → HEAD CIRCUM_BOYS.percentile.monthly-211f31d0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-e00ecc7f.js → HEAD CIRCUM_BOYS.percentile.weekly-ad1b91eb.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-dc4d5320.js → HEAD CIRCUM_BOYS.percentile.yearly-3ef825f4.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-4bac3162.js → HEAD CIRCUM_BOYS.zscore.monthly-dd61aed0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-edf860f8.js → HEAD CIRCUM_BOYS.zscore.weekly-5f4bf7d7.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-70a3b850.js → HEAD CIRCUM_BOYS.zscore.yearly-f503bf61.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-0f7879de.js → HEAD CIRCUM_GIRLS.percentile.monthly-76db00a2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-2e92adc6.js → HEAD CIRCUM_GIRLS.percentile.weekly-60938b9d.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-25eea949.js → HEAD CIRCUM_GIRLS.percentile.yearly-de08eaf6.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-9d5ef504.js → HEAD CIRCUM_GIRLS.zscore.monthly-5de26ec2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-18bb16bd.js → HEAD CIRCUM_GIRLS.zscore.weekly-ba767399.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-bc067e11.js → HEAD CIRCUM_GIRLS.zscore.yearly-2d8cafcb.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-f6ae17e8.js → HEIGHT_BOYS.percentile.monthly-3aa10b4d.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-2a02a701.js → HEIGHT_BOYS.percentile.weekly-ae1f58fc.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-1979e09f.js → HEIGHT_BOYS.percentile.yearly-ec9b6a67.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-30a814f8.js → HEIGHT_BOYS.zscore.monthly-2b9abf9e.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-e8a598e3.js → HEIGHT_BOYS.zscore.weekly-ebc79372.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-8a0156ce.js → HEIGHT_BOYS.zscore.yearly-64acc0b1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-eca8f53c.js → HEIGHT_GIRLS.percentile.monthly-8a6d5ba4.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-47102064.js → HEIGHT_GIRLS.percentile.weekly-94c6540f.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-01135b0e.js → HEIGHT_GIRLS.percentile.yearly-3142b8d2.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-96972720.js → HEIGHT_GIRLS.zscore.monthly-02aa6416.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-c93ff614.js → HEIGHT_GIRLS.zscore.weekly-6c8e7a9f.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-c080e8fd.js → HEIGHT_GIRLS.zscore.yearly-090810af.js} +0 -0
- /package/build/{Locale-b6198746.js → Locale-3b16bb0e.js} +0 -0
- /package/build/{Visible-70d7db0a.js → Visible-71839201.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-0f546cd3.js → WEIGHT_BOYS.percentile.monthly-ccef0bf9.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-e49ef9aa.js → WEIGHT_BOYS.percentile.weekly-3e37816c.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-820be855.js → WEIGHT_BOYS.percentile.yearly-37663922.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-756e08cd.js → WEIGHT_BOYS.zscore.monthly-6ca85d8d.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-1dba5a7f.js → WEIGHT_BOYS.zscore.weekly-513cb51e.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-75005e39.js → WEIGHT_BOYS.zscore.yearly-d4ba37d8.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-1e8c72d9.js → WEIGHT_GIRLS.percentile.monthly-3459d0c0.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-fc6aefcf.js → WEIGHT_GIRLS.percentile.weekly-73376e4d.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-9ea63248.js → WEIGHT_GIRLS.percentile.yearly-39258498.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-90daee63.js → WEIGHT_GIRLS.zscore.monthly-aee13b23.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-b7a63e96.js → WEIGHT_GIRLS.zscore.weekly-4f2556e7.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-f2f26e13.js → WEIGHT_GIRLS.zscore.yearly-59489de0.js} +0 -0
- /package/build/{animation-b6455916.js → animation-ee9cffdc.js} +0 -0
- /package/build/{constants-13088947.js → constants-46765397.js} +0 -0
- /package/build/{constants-a6b55494.js → constants-be090ce4.js} +0 -0
- /package/build/{constants-44329ecb.js → constants-c9a1b55d.js} +0 -0
- /package/build/{dataTransform-9097c356.js → dataTransform-577eda33.js} +0 -0
- /package/build/{doctor-6c270d75.js → doctor-aea52c10.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-b2932b8f.js → BMI_BOYS.percentile.monthly-421ba7a1.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-3031be7b.js → BMI_BOYS.percentile.weekly-2131d37d.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-5491020d.js → BMI_BOYS.percentile.yearly-7d7ac950.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-28cbf883.js → BMI_BOYS.zscore.monthly-f8b5a1ee.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-976153d3.js → BMI_BOYS.zscore.weekly-1c0b0ccf.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-8098fcbc.js → BMI_BOYS.zscore.yearly-cd3e748e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-6b6a49e0.js → BMI_GIRLS.percentile.monthly-b67288e2.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-d2e28dde.js → BMI_GIRLS.percentile.weekly-10e2e494.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-5df00fb5.js → BMI_GIRLS.percentile.yearly-0e593580.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-f7e38afc.js → BMI_GIRLS.zscore.monthly-230a4308.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-bc76766d.js → BMI_GIRLS.zscore.weekly-b461adde.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-ad065215.js → BMI_GIRLS.zscore.yearly-e6ec3a95.js} +0 -0
- /package/build/esm/{ChevronDown-0636f64c.js → ChevronDown-6513a253.js} +0 -0
- /package/build/esm/{Close-cdfc64fa.js → Close-e4e577cb.js} +0 -0
- /package/build/esm/{Google-ed99e5c9.js → Google-1a588c29.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-b6fb38fb.js → HEAD CIRCUM_BOYS.percentile.monthly-0c38a166.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-08b975ca.js → HEAD CIRCUM_BOYS.percentile.weekly-32cae606.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-2d6fe027.js → HEAD CIRCUM_BOYS.percentile.yearly-416f773a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-6973d98b.js → HEAD CIRCUM_BOYS.zscore.monthly-dbdb6c06.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-47d08272.js → HEAD CIRCUM_BOYS.zscore.weekly-28568e5a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-ba2eb548.js → HEAD CIRCUM_BOYS.zscore.yearly-446d3462.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-740b9fe2.js → HEAD CIRCUM_GIRLS.percentile.monthly-7d5e08b6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-f872d1e7.js → HEAD CIRCUM_GIRLS.percentile.weekly-5a7731cb.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-24211fd8.js → HEAD CIRCUM_GIRLS.percentile.yearly-70d17e88.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-044d4443.js → HEAD CIRCUM_GIRLS.zscore.monthly-6e9b3ea4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-09e2bc7d.js → HEAD CIRCUM_GIRLS.zscore.weekly-578339b4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-3fb7a64b.js → HEAD CIRCUM_GIRLS.zscore.yearly-5d82e048.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-6d6a3bed.js → HEIGHT_BOYS.percentile.monthly-ceb0c7ee.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-a50691c8.js → HEIGHT_BOYS.percentile.weekly-43fdcf07.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-bb6443fe.js → HEIGHT_BOYS.percentile.yearly-5d863523.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-84ef033e.js → HEIGHT_BOYS.zscore.monthly-7a2bbfd1.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-65579f16.js → HEIGHT_BOYS.zscore.weekly-65248000.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-db3aef5d.js → HEIGHT_BOYS.zscore.yearly-3de1aa3b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-ebd48b01.js → HEIGHT_GIRLS.percentile.monthly-f5422ca7.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-a4a786f7.js → HEIGHT_GIRLS.percentile.weekly-8de0c176.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-3e936e66.js → HEIGHT_GIRLS.percentile.yearly-30774397.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-1ac2da5d.js → HEIGHT_GIRLS.zscore.monthly-acc7105f.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-06a02167.js → HEIGHT_GIRLS.zscore.weekly-3440fc9e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-631fcb40.js → HEIGHT_GIRLS.zscore.yearly-5057439c.js} +0 -0
- /package/build/esm/{Locale-fc8be7de.js → Locale-1c96ad9c.js} +0 -0
- /package/build/esm/{Visible-b6758e21.js → Visible-93776058.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-feceb350.js → WEIGHT_BOYS.percentile.monthly-bf753079.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-0b2a5c7c.js → WEIGHT_BOYS.percentile.weekly-5e9af001.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-e4df24dd.js → WEIGHT_BOYS.percentile.yearly-662fbde6.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-3c5af46d.js → WEIGHT_BOYS.zscore.monthly-f0475982.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-f5fc12f8.js → WEIGHT_BOYS.zscore.weekly-6aafdeeb.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-f6884de6.js → WEIGHT_BOYS.zscore.yearly-5fc306b9.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-2971124c.js → WEIGHT_GIRLS.percentile.monthly-4e5050b6.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-c797158a.js → WEIGHT_GIRLS.percentile.weekly-297c26c6.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-b716ee26.js → WEIGHT_GIRLS.percentile.yearly-bb44c22b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-2d77a6c3.js → WEIGHT_GIRLS.zscore.monthly-715bfa3b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-ec53ef2c.js → WEIGHT_GIRLS.zscore.weekly-56dd1717.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-26a1be04.js → WEIGHT_GIRLS.zscore.yearly-64e721cf.js} +0 -0
- /package/build/esm/{animation-128195ec.js → animation-5400167d.js} +0 -0
- /package/build/esm/{constants-e71c076b.js → constants-0c376e10.js} +0 -0
- /package/build/esm/{constants-d7f47028.js → constants-76dc3883.js} +0 -0
- /package/build/esm/{constants-8ba27525.js → constants-a937eafe.js} +0 -0
- /package/build/esm/{dataTransform-9ca4defb.js → dataTransform-fe86c90a.js} +0 -0
- /package/build/esm/{doctor-8eb2d477.js → doctor-ce0b76fd.js} +0 -0
- /package/build/esm/{index-e535957e.js → index-07890117.js} +0 -0
- /package/build/esm/{index-e3799f05.js → index-2da128ed.js} +0 -0
- /package/build/esm/{index-58e7a004.js → index-56099b5d.js} +0 -0
- /package/build/esm/{index-999e507f.js → index-85758df5.js} +0 -0
- /package/build/esm/{index-22f0be96.js → index-8d8b4325.js} +0 -0
- /package/build/esm/{index-f401bf2e.js → index-afbe819e.js} +0 -0
- /package/build/esm/{index-1064a1a3.js → index-d11f9211.js} +0 -0
- /package/build/esm/{index-1f479de5.js → index-fd2310c2.js} +0 -0
- /package/build/esm/{index.styles-c6ba3938.js → index.styles-f6a5d126.js} +0 -0
- /package/build/esm/{localizeNumberFormat-214d8ba4.js → localizeNumberFormat-69447a14.js} +0 -0
- /package/build/esm/{normalizeLink-648533d8.js → normalizeLink-56bb54f7.js} +0 -0
- /package/build/esm/{number-81701fea.js → number-49c50e28.js} +0 -0
- /package/build/esm/{other-6e01f149.js → other-d6efb1d9.js} +0 -0
- /package/build/esm/{paths-c656c3b5.js → paths-c7db8f50.js} +0 -0
- /package/build/esm/{translationsContext-1622f33c.js → translationsContext-290825cb.js} +0 -0
- /package/build/esm/{tslib.es6-158ccc1d.js → tslib.es6-48e9a62a.js} +0 -0
- /package/build/esm/{types-407cd604.js → types-54a29c87.js} +0 -0
- /package/build/esm/{useIsInit-6a38e8a6.js → useIsInit-61aa33bb.js} +0 -0
- /package/build/esm/{useOutsideClick-e74107d4.js → useOutsideClick-ca9ebf88.js} +0 -0
- /package/build/esm/{useScrollbarSize-60ea662f.js → useScrollbarSize-3d6b723e.js} +0 -0
- /package/build/esm/{useUniqueId-5ba90923.js → useUniqueId-46818085.js} +0 -0
- /package/build/esm/{utils-cd594041.js → utils-c78aa552.js} +0 -0
- /package/build/{index-e43cfa63.js → index-063dd232.js} +0 -0
- /package/build/{index-f79016ad.js → index-2b902706.js} +0 -0
- /package/build/{index-cb21af64.js → index-31d8f042.js} +0 -0
- /package/build/{index-ce349653.js → index-70e345f1.js} +0 -0
- /package/build/{index-16a28d8a.js → index-8ded19d5.js} +0 -0
- /package/build/{index-1db2cc7a.js → index-a55c0148.js} +0 -0
- /package/build/{index-081c7fb3.js → index-bb749661.js} +0 -0
- /package/build/{index-fea999ae.js → index-e90ccbbb.js} +0 -0
- /package/build/{index.styles-7115b21f.js → index.styles-36d65d5c.js} +0 -0
- /package/build/{localizeNumberFormat-b1e4ceeb.js → localizeNumberFormat-381406cb.js} +0 -0
- /package/build/{normalizeLink-d9ff1223.js → normalizeLink-2736a2fa.js} +0 -0
- /package/build/{number-f140b9d8.js → number-9fe1f3c7.js} +0 -0
- /package/build/{other-dcd6c6e0.js → other-55d7a29c.js} +0 -0
- /package/build/{paths-a94cd467.js → paths-4bfc1cef.js} +0 -0
- /package/build/{translationsContext-0cce698e.js → translationsContext-9687dc3f.js} +0 -0
- /package/build/{tslib.es6-0f05f7d2.js → tslib.es6-91e092ae.js} +0 -0
- /package/build/{types-355cbe93.js → types-721d4367.js} +0 -0
- /package/build/{useIsInit-64a0e22f.js → useIsInit-78a4b005.js} +0 -0
- /package/build/{useOutsideClick-78c44ba4.js → useOutsideClick-155e9c38.js} +0 -0
- /package/build/{useScrollbarSize-f372f10c.js → useScrollbarSize-2fac76a7.js} +0 -0
- /package/build/{useUniqueId-2d718c77.js → useUniqueId-220be409.js} +0 -0
- /package/build/{utils-92198b16.js → utils-ad823692.js} +0 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var uuid = require('uuid');
|
|
4
|
+
var miscCookieHelper = require('./miscCookieHelper.js');
|
|
5
|
+
var tslib_es6 = require('./tslib.es6-91e092ae.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
|
|
8
|
+
const CAMPAIGN_TARGET_TYPE = { LINKS: 1, TAGS: 2 };
|
|
9
|
+
let LEAD_API = 'https://dev.leadgen.hellobacsi.com/';
|
|
10
|
+
const LEAD_DEVICE_TYPE = {
|
|
11
|
+
MOBILE: 1,
|
|
12
|
+
DESKTOP: 2,
|
|
13
|
+
};
|
|
14
|
+
exports.LEAD_CLASS = '';
|
|
15
|
+
if (LEAD_API.includes('localhost')) {
|
|
16
|
+
LEAD_API = 'https://dev.leadgen.hellobacsi.com/';
|
|
17
|
+
}
|
|
18
|
+
if (location.hostname.includes('marrybaby.vn')) {
|
|
19
|
+
exports.LEAD_CLASS = 'pink';
|
|
20
|
+
}
|
|
21
|
+
// var LEAD_CURRENT_URL = location.href.toLowerCase();
|
|
22
|
+
let LEAD_CURRENT_URL = 'https://' + location.hostname + location.pathname + location.search;
|
|
23
|
+
LEAD_CURRENT_URL = LEAD_CURRENT_URL.toLowerCase();
|
|
24
|
+
// TODO: set inital object if exists
|
|
25
|
+
if (sessionStorage.getItem('insider_object')) {
|
|
26
|
+
window.insider_object = JSON.parse(sessionStorage.getItem('insider_object'));
|
|
27
|
+
}
|
|
28
|
+
const docLang = document.documentElement.lang;
|
|
29
|
+
// TODO: country code
|
|
30
|
+
const LEAD_LOCALE_DATA = {
|
|
31
|
+
'vi-VN': {
|
|
32
|
+
popupLang: 'vi',
|
|
33
|
+
countryCode: 'vn',
|
|
34
|
+
countryCodeNumber: 84,
|
|
35
|
+
},
|
|
36
|
+
'id-ID': {
|
|
37
|
+
popupLang: 'id',
|
|
38
|
+
countryCode: 'id',
|
|
39
|
+
countryCodeNumber: 62,
|
|
40
|
+
},
|
|
41
|
+
'th-TH': {
|
|
42
|
+
popupLang: 'th',
|
|
43
|
+
countryCode: 'th',
|
|
44
|
+
countryCodeNumber: 66,
|
|
45
|
+
},
|
|
46
|
+
'ms-MY': {
|
|
47
|
+
popupLang: 'ms',
|
|
48
|
+
countryCode: 'my',
|
|
49
|
+
countryCodeNumber: 60,
|
|
50
|
+
},
|
|
51
|
+
'zh-TW': {
|
|
52
|
+
popupLang: 'zh',
|
|
53
|
+
countryCode: 'tw',
|
|
54
|
+
countryCodeNumber: 886,
|
|
55
|
+
},
|
|
56
|
+
'km-KH': {
|
|
57
|
+
popupLang: 'km',
|
|
58
|
+
countryCode: 'kh',
|
|
59
|
+
countryCodeNumber: 855,
|
|
60
|
+
},
|
|
61
|
+
'my-MM': {
|
|
62
|
+
popupLang: 'my',
|
|
63
|
+
countryCode: 'mm',
|
|
64
|
+
countryCodeNumber: 95,
|
|
65
|
+
},
|
|
66
|
+
'hi-IN': {
|
|
67
|
+
popupLang: 'hi',
|
|
68
|
+
countryCode: 'in',
|
|
69
|
+
countryCodeNumber: 91,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
const LEAD_LOCALE = LEAD_LOCALE_DATA[docLang] || LEAD_LOCALE_DATA['vi-VN'];
|
|
73
|
+
function LEAD_RESET_VAR() {
|
|
74
|
+
// LEAD_CURRENT_URL = location.href.toLowerCase();
|
|
75
|
+
LEAD_CURRENT_URL =
|
|
76
|
+
'https://' + location.hostname + location.pathname + location.search;
|
|
77
|
+
}
|
|
78
|
+
const LEAD_TIMEZONE_DATA = {
|
|
79
|
+
1: 'Asia/Ho_Chi_Minh',
|
|
80
|
+
10: 'Asia/Ho_Chi_Minh',
|
|
81
|
+
11: 'Asia/Ho_Chi_Minh',
|
|
82
|
+
12: 'Asia/Ho_Chi_Minh',
|
|
83
|
+
2: 'Asia/Jakarta',
|
|
84
|
+
3: 'Asia/Bangkok',
|
|
85
|
+
4: 'Asia/Phnom_Penh',
|
|
86
|
+
5: 'Asia/Kuala_Lumpur',
|
|
87
|
+
6: 'Asia/Taipei',
|
|
88
|
+
7: 'Asia/Yangon',
|
|
89
|
+
8: 'Asia/Kolkata',
|
|
90
|
+
9: 'Asia/Manila', // Philippines / Filipinos Site
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// import mockLeadData from './mockLeadData'
|
|
94
|
+
const listCampaignScheduled = [];
|
|
95
|
+
const listCampaignScheduledToActivated = [];
|
|
96
|
+
const listCampaignActiveButExpired = [];
|
|
97
|
+
const listCampaignExcludeSonsored = [];
|
|
98
|
+
const listCampaignDifferentSponsor = [];
|
|
99
|
+
const listCampaignNotDisplayInRangeOfTime = [];
|
|
100
|
+
function isMobile() {
|
|
101
|
+
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent);
|
|
102
|
+
}
|
|
103
|
+
const getShuffleArray = (array) => {
|
|
104
|
+
const newArray = [...array];
|
|
105
|
+
for (let i = newArray.length - 1; i > 0; i--) {
|
|
106
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
107
|
+
const temp = newArray[i];
|
|
108
|
+
newArray[i] = newArray[j];
|
|
109
|
+
newArray[j] = temp;
|
|
110
|
+
}
|
|
111
|
+
return newArray;
|
|
112
|
+
};
|
|
113
|
+
const getTimeByTimezone = (timeZone = 'UTC') => {
|
|
114
|
+
const date = new Date();
|
|
115
|
+
return new Date(date.toLocaleString('en-US', { timeZone }));
|
|
116
|
+
};
|
|
117
|
+
const parseDateByCampaignTime = (dateStr) => {
|
|
118
|
+
// Format like this: 2023-04-04 00:00:00
|
|
119
|
+
try {
|
|
120
|
+
const [datePart, timePart] = dateStr.split(' ');
|
|
121
|
+
const [year, month, day] = datePart.split('-').map(Number);
|
|
122
|
+
const [hours, minutes, seconds] = timePart.split(':').map(Number);
|
|
123
|
+
/** JavaScript counts months from 0 to 11 */
|
|
124
|
+
return new Date(year, month - 1, day, hours, minutes, seconds);
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
const checkCampaignNowInTimeframe = (c) => {
|
|
131
|
+
var _a;
|
|
132
|
+
const siteId = ((_a = c.site) === null || _a === void 0 ? void 0 : _a.id) || 1;
|
|
133
|
+
const startedAtStr = c.started_at;
|
|
134
|
+
const endedAtStr = c.ended_at;
|
|
135
|
+
const startedDate = parseDateByCampaignTime(startedAtStr);
|
|
136
|
+
const endedDate = parseDateByCampaignTime(endedAtStr);
|
|
137
|
+
if (!startedDate || !endedDate) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
const timeZone = LEAD_TIMEZONE_DATA[siteId];
|
|
141
|
+
const nowWithTimezoneMs = getTimeByTimezone(timeZone).getTime();
|
|
142
|
+
if (nowWithTimezoneMs <= endedDate.getTime() &&
|
|
143
|
+
nowWithTimezoneMs >= startedDate.getTime()) {
|
|
144
|
+
listCampaignScheduledToActivated.push(c);
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
return false;
|
|
148
|
+
};
|
|
149
|
+
function checkCampaignActiveButExpireAlready(c) {
|
|
150
|
+
var _a;
|
|
151
|
+
/** Do not setup timeframe for this campaign. No need to check */
|
|
152
|
+
if (c.forever === 1) {
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
const startedAtStr = c.started_at;
|
|
156
|
+
const endedAtStr = c.ended_at;
|
|
157
|
+
const startedDate = parseDateByCampaignTime(startedAtStr);
|
|
158
|
+
const endedDate = parseDateByCampaignTime(endedAtStr);
|
|
159
|
+
/** Do not setup timeframe for this campaign. No need to check */
|
|
160
|
+
if (!startedDate || !endedDate) {
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
const siteId = ((_a = c.site) === null || _a === void 0 ? void 0 : _a.id) || 1;
|
|
164
|
+
const timeZone = LEAD_TIMEZONE_DATA[siteId];
|
|
165
|
+
const nowWithTimezoneMs = getTimeByTimezone(timeZone).getTime();
|
|
166
|
+
/** Check if this expire already, do not show */
|
|
167
|
+
if (nowWithTimezoneMs > endedDate.getTime()) {
|
|
168
|
+
listCampaignActiveButExpired.push(c);
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
function shouldNotDisplayIfExcludeAllSponsors(c) {
|
|
174
|
+
var _a;
|
|
175
|
+
const excludeSponsored = Number((_a = c.rules.find((i) => i.rule == 'exclude_sponsored')) === null || _a === void 0 ? void 0 : _a.value);
|
|
176
|
+
const isSponsored = Boolean(document.querySelector('.hhg-disclaimer-text'));
|
|
177
|
+
if (isSponsored && excludeSponsored) {
|
|
178
|
+
listCampaignExcludeSonsored.push(c);
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
function shouldDisplayWithCurrentSponsor(c) {
|
|
184
|
+
var _a, _b;
|
|
185
|
+
try {
|
|
186
|
+
// TODO: BE will rename `exclude_sponsored_list` later
|
|
187
|
+
const stringOrArray = (_a = c.rules.find((i) => i.rule == 'exclude_sponsored_list')) === null || _a === void 0 ? void 0 : _a.value;
|
|
188
|
+
const whiteListSponsors = stringOrArray instanceof Array ? stringOrArray : JSON.parse(stringOrArray);
|
|
189
|
+
const dataSponsoredId = Number((_b = document
|
|
190
|
+
.querySelector('[data-sponsored-id]')) === null || _b === void 0 ? void 0 : _b.getAttribute('data-sponsored-id'));
|
|
191
|
+
// There is no config for sponsor id and white list, should show as default
|
|
192
|
+
if (!dataSponsoredId ||
|
|
193
|
+
dataSponsoredId <= 0 ||
|
|
194
|
+
whiteListSponsors.length === 0) {
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
// Check the dataSponsoredId exists in the white list or not.
|
|
198
|
+
const isExist = whiteListSponsors.find((s) => s.id == dataSponsoredId);
|
|
199
|
+
if (isExist) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
listCampaignDifferentSponsor.push({ id: c.id, rules: c.rules });
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
catch (err) {
|
|
206
|
+
// Default is show
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const filterFnCampaign = (c) => {
|
|
211
|
+
if (shouldNotDisplayIfExcludeAllSponsors(c)) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
else if (!shouldDisplayWithCurrentSponsor(c)) {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
/** Active */
|
|
218
|
+
if (c.formatted_status === 1) {
|
|
219
|
+
return checkCampaignActiveButExpireAlready(c);
|
|
220
|
+
}
|
|
221
|
+
/** Schedule */
|
|
222
|
+
if (c.formatted_status === 0) {
|
|
223
|
+
listCampaignScheduled.push(c);
|
|
224
|
+
return checkCampaignNowInTimeframe(c);
|
|
225
|
+
}
|
|
226
|
+
return false;
|
|
227
|
+
};
|
|
228
|
+
const fillterApprearanceTimeCampaign = (c) => {
|
|
229
|
+
var _a;
|
|
230
|
+
try {
|
|
231
|
+
const isTimeInRange = (currentTime, startTime, endTime) => {
|
|
232
|
+
const startParts = startTime.split(':');
|
|
233
|
+
const endParts = endTime.split(':');
|
|
234
|
+
const startDate = new Date();
|
|
235
|
+
startDate.setHours(Number(startParts[0]), Number(startParts[1]), 0, 0);
|
|
236
|
+
const endDate = new Date();
|
|
237
|
+
endDate.setHours(Number(endParts[0]), Number(endParts[1]), 0, 0);
|
|
238
|
+
return currentTime >= startDate && currentTime <= endDate;
|
|
239
|
+
};
|
|
240
|
+
const rulesApprValue = (_a = c.rules.find((i) => i.rule == 'appearance_time')) === null || _a === void 0 ? void 0 : _a.value;
|
|
241
|
+
const startTime = rulesApprValue.startTime;
|
|
242
|
+
const endTime = rulesApprValue.endTime || '23:59';
|
|
243
|
+
if (!startTime) {
|
|
244
|
+
return true;
|
|
245
|
+
}
|
|
246
|
+
if (isTimeInRange(new Date(), startTime, endTime)) {
|
|
247
|
+
return true;
|
|
248
|
+
}
|
|
249
|
+
listCampaignNotDisplayInRangeOfTime.push(c);
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
catch (err) {
|
|
253
|
+
return true;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
let timeoutRef = null;
|
|
257
|
+
let LEAD_SCROLL_EVENT = null;
|
|
258
|
+
function clearPassiveEvent() {
|
|
259
|
+
if (timeoutRef) {
|
|
260
|
+
clearTimeout(timeoutRef);
|
|
261
|
+
timeoutRef = null;
|
|
262
|
+
}
|
|
263
|
+
if (LEAD_SCROLL_EVENT) {
|
|
264
|
+
window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
|
|
265
|
+
LEAD_SCROLL_EVENT = null;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
|
|
269
|
+
// clear previous passive event, check for new condition
|
|
270
|
+
clearPassiveEvent();
|
|
271
|
+
const leadCurrentUrl = DEBUG_URL ||
|
|
272
|
+
('https://' +
|
|
273
|
+
location.hostname +
|
|
274
|
+
location.pathname +
|
|
275
|
+
location.search).toLowerCase();
|
|
276
|
+
fetch(leadApi + 'api/campaign/' + leadSiteId, {
|
|
277
|
+
method: 'POST',
|
|
278
|
+
headers: {
|
|
279
|
+
'Content-Type': 'application/json',
|
|
280
|
+
},
|
|
281
|
+
body: JSON.stringify({
|
|
282
|
+
url: leadCurrentUrl,
|
|
283
|
+
ga_client_id: miscCookieHelper.getCookie('_ga') || null,
|
|
284
|
+
}),
|
|
285
|
+
})
|
|
286
|
+
.then((response) => {
|
|
287
|
+
return response.json();
|
|
288
|
+
// return mockLeadData || response.json()
|
|
289
|
+
})
|
|
290
|
+
.then((data) => {
|
|
291
|
+
var _a, _b, _c, _d;
|
|
292
|
+
LeadLog('List campagin: ', data);
|
|
293
|
+
LEAD_RESET_VAR();
|
|
294
|
+
if (data._status == 1) {
|
|
295
|
+
const campaigns = (((_b = (_a = data._data) === null || _a === void 0 ? void 0 : _a.campaigns) === null || _b === void 0 ? void 0 : _b.filter(filterFnCampaign)) || []).filter(fillterApprearanceTimeCampaign);
|
|
296
|
+
if (!miscCookieHelper.getCookie('hhg-id')) {
|
|
297
|
+
miscCookieHelper.setCookie('hhg-id', uuid.v1(), {
|
|
298
|
+
domain: '.' + leadDomain,
|
|
299
|
+
path: '/',
|
|
300
|
+
});
|
|
301
|
+
LeadLog('😍 Set HHG ID cookie');
|
|
302
|
+
}
|
|
303
|
+
// getCookie('hhg-id')
|
|
304
|
+
// TODO: HP-534 Filter desktop
|
|
305
|
+
let campaignsDevice = [];
|
|
306
|
+
if (isMobile()) {
|
|
307
|
+
campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
|
|
311
|
+
}
|
|
312
|
+
LeadLog(`👓 campaignsDevice`, campaignsDevice);
|
|
313
|
+
LeadLog('--listCampaignScheduled', listCampaignScheduled);
|
|
314
|
+
LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
|
|
315
|
+
LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
|
|
316
|
+
LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
|
|
317
|
+
LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
|
|
318
|
+
LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
|
|
319
|
+
// Check links
|
|
320
|
+
let listLinksObj = campaignsDevice
|
|
321
|
+
.map((i, index) => i.targets
|
|
322
|
+
.filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
|
|
323
|
+
.map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
|
|
324
|
+
.flat(1);
|
|
325
|
+
// Check list link match current href
|
|
326
|
+
listLinksObj = listLinksObj.filter((i) => {
|
|
327
|
+
var _a;
|
|
328
|
+
const target = new URL(String(i.target).toLowerCase());
|
|
329
|
+
if (i.option == 'exact_match')
|
|
330
|
+
// FOR TEST LOCAL:
|
|
331
|
+
// return Boolean(location.pathname === target.pathname)
|
|
332
|
+
return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
|
|
333
|
+
if (i.option == 'start_with') {
|
|
334
|
+
// FOR TEST LOCAL:
|
|
335
|
+
// if (location.pathname.includes(target.pathname)) {
|
|
336
|
+
if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
|
|
337
|
+
const listExcluding = i.sub_target
|
|
338
|
+
.filter((i) => i.option == 'excluding')
|
|
339
|
+
.map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
|
|
340
|
+
return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
// Check tags
|
|
348
|
+
const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
|
|
349
|
+
const listTags = listMetaTag.map((i) => i.content);
|
|
350
|
+
let listCampaignHasTag = [];
|
|
351
|
+
let listTagsObj = [];
|
|
352
|
+
if (listTags && listTags.length) {
|
|
353
|
+
listCampaignHasTag = campaignsDevice
|
|
354
|
+
.map((i, index) => i.targets
|
|
355
|
+
.filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
|
|
356
|
+
.map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
|
|
357
|
+
.flat(1);
|
|
358
|
+
listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
|
|
359
|
+
}
|
|
360
|
+
const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
|
|
361
|
+
const cookieKeys = document.cookie
|
|
362
|
+
.split('; ')
|
|
363
|
+
.map((i) => i.split('=')[0]);
|
|
364
|
+
const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
|
|
365
|
+
LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
|
|
366
|
+
const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
|
|
367
|
+
LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
|
|
368
|
+
const listCampaignSubmitedClosed = [
|
|
369
|
+
...listCampaignCodeSubmited,
|
|
370
|
+
...listCampaignCodeClosed,
|
|
371
|
+
];
|
|
372
|
+
const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
|
|
373
|
+
const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
|
|
374
|
+
return !hasSubmited;
|
|
375
|
+
});
|
|
376
|
+
const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
|
|
377
|
+
// .sort(
|
|
378
|
+
// (a, b) =>
|
|
379
|
+
// (listCampaignValid[a.campaignIndex]?.score || 0) -
|
|
380
|
+
// (listCampaignValid[b.campaignIndex]?.score || 0),
|
|
381
|
+
// )
|
|
382
|
+
LeadLog('--listCampaignValid : ', listCampaignValid);
|
|
383
|
+
if (listCampaignValid && listCampaignValid.length) {
|
|
384
|
+
const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
|
|
385
|
+
LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
|
|
386
|
+
const { rules } = CAMPAIGN_SHOW;
|
|
387
|
+
// CHECK RULE TRIGGER POPUP
|
|
388
|
+
const timeoutRule = Number((_c = rules.find((i) => i.rule == 'time')) === null || _c === void 0 ? void 0 : _c.value);
|
|
389
|
+
LeadLog(`timeoutRule`, timeoutRule);
|
|
390
|
+
const scrollRule = Number((_d = rules.find((i) => i.rule == 'scroll')) === null || _d === void 0 ? void 0 : _d.value);
|
|
391
|
+
LeadLog(`scrollRule`, scrollRule);
|
|
392
|
+
let impressionAction = 'TIME';
|
|
393
|
+
if (Number.isInteger(timeoutRule)) {
|
|
394
|
+
impressionAction = 'TIME';
|
|
395
|
+
LeadLog('✨ SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
|
|
396
|
+
timeoutRef = setTimeout(() => {
|
|
397
|
+
onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
|
|
398
|
+
}, timeoutRule * 1000);
|
|
399
|
+
}
|
|
400
|
+
if (Number.isInteger(scrollRule)) {
|
|
401
|
+
impressionAction = 'SCROLL';
|
|
402
|
+
LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
|
|
403
|
+
const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
|
|
404
|
+
document.querySelector('body');
|
|
405
|
+
const pct = $p.getBoundingClientRect().top;
|
|
406
|
+
const pb = $p.offsetHeight;
|
|
407
|
+
LeadLog(`👓 Element check scroll: `, $p);
|
|
408
|
+
LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
|
|
409
|
+
const wt = window.pageYOffset || document.documentElement.scrollTop;
|
|
410
|
+
let percent = 0;
|
|
411
|
+
if (wt >= pct) {
|
|
412
|
+
percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
|
|
413
|
+
}
|
|
414
|
+
LeadLog('---Scroll', percent, scrollRule);
|
|
415
|
+
// TODO: CHECK FOOTER HEIGHT
|
|
416
|
+
if (percent >= scrollRule) {
|
|
417
|
+
window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
|
|
418
|
+
onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
|
|
422
|
+
passive: true,
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
LeadLog('🚧 No lead campaigns on current URL, tags');
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
})
|
|
431
|
+
.catch((err) => {
|
|
432
|
+
LeadLog(`Lead error: `, err);
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
const LeadLog = (...params) => {
|
|
436
|
+
if (process.env.NODE_ENV !== 'production' ||
|
|
437
|
+
(process.env.NEXT_PUBLIC_DEPLOY_ENV &&
|
|
438
|
+
process.env.NEXT_PUBLIC_DEPLOY_ENV !== 'production') ||
|
|
439
|
+
(typeof localStorage !== 'undefined' &&
|
|
440
|
+
localStorage.getItem('hhg_debug') === 'true')) {
|
|
441
|
+
console.log(...params);
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
const formatAutoCompleteAddress = (addresses) => {
|
|
446
|
+
if (!addresses || addresses.length < 1)
|
|
447
|
+
return [];
|
|
448
|
+
return addresses.map((s) => ({
|
|
449
|
+
placeId: s.place_id,
|
|
450
|
+
description: s.description,
|
|
451
|
+
rawData: s,
|
|
452
|
+
}));
|
|
453
|
+
};
|
|
454
|
+
const IS_SSR = typeof window === 'undefined';
|
|
455
|
+
// https://developers.google.com/maps/faq#languagesupport
|
|
456
|
+
const GOOGLE_API_LANGUAGE = {
|
|
457
|
+
VN: 'vi',
|
|
458
|
+
ID: 'id',
|
|
459
|
+
TH: 'th',
|
|
460
|
+
MY: 'ms',
|
|
461
|
+
TW: 'zh-TW',
|
|
462
|
+
KH: 'km',
|
|
463
|
+
MM: 'my',
|
|
464
|
+
IN: 'hi',
|
|
465
|
+
PH: 'en',
|
|
466
|
+
};
|
|
467
|
+
const GOOGLE_API_KEY = 'AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU';
|
|
468
|
+
const googleAutocomplete = (text = '', countrycode = '', languageCountrycode = 'vi') => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
469
|
+
return new Promise((resolve, reject) => {
|
|
470
|
+
if (!text) {
|
|
471
|
+
return reject('Need valid text input');
|
|
472
|
+
}
|
|
473
|
+
if (IS_SSR) {
|
|
474
|
+
return reject('Need valid window object');
|
|
475
|
+
}
|
|
476
|
+
try {
|
|
477
|
+
new window.google.maps.places.AutocompleteService().getPlacePredictions(Object.assign(Object.assign({ input: text }, (countrycode
|
|
478
|
+
? {
|
|
479
|
+
componentRestrictions: { country: countrycode },
|
|
480
|
+
}
|
|
481
|
+
: {})), { language: GOOGLE_API_LANGUAGE[languageCountrycode] }), resolve);
|
|
482
|
+
}
|
|
483
|
+
catch (e) {
|
|
484
|
+
reject(e);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
const usePlacesAutocomplete = (text = '', countrycode = '', languageCountrycode = '', debounceTimeout = 500) => {
|
|
489
|
+
const [predictions, setPredictions] = React.useState([]);
|
|
490
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
491
|
+
React.useEffect(() => {
|
|
492
|
+
let handleDebounce;
|
|
493
|
+
if (text) {
|
|
494
|
+
handleDebounce = window.setTimeout(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
495
|
+
if (!text) {
|
|
496
|
+
setPredictions([]);
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
try {
|
|
500
|
+
setIsLoading(true);
|
|
501
|
+
const nextPredictions = yield googleAutocomplete(text, countrycode, languageCountrycode);
|
|
502
|
+
setPredictions(formatAutoCompleteAddress(nextPredictions));
|
|
503
|
+
}
|
|
504
|
+
catch (e) {
|
|
505
|
+
console.error(e);
|
|
506
|
+
}
|
|
507
|
+
finally {
|
|
508
|
+
setIsLoading(false);
|
|
509
|
+
}
|
|
510
|
+
}), debounceTimeout);
|
|
511
|
+
}
|
|
512
|
+
else if (predictions.length) {
|
|
513
|
+
setPredictions([]);
|
|
514
|
+
}
|
|
515
|
+
return () => {
|
|
516
|
+
window.clearTimeout(handleDebounce);
|
|
517
|
+
};
|
|
518
|
+
}, [text, debounceTimeout, countrycode]);
|
|
519
|
+
return { isLoading, predictions };
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
exports.GOOGLE_API_KEY = GOOGLE_API_KEY;
|
|
523
|
+
exports.GOOGLE_API_LANGUAGE = GOOGLE_API_LANGUAGE;
|
|
524
|
+
exports.LEAD_LOCALE = LEAD_LOCALE;
|
|
525
|
+
exports.LeadLog = LeadLog;
|
|
526
|
+
exports.checkShowPopup = checkShowPopup;
|
|
527
|
+
exports.clearPassiveEvent = clearPassiveEvent;
|
|
528
|
+
exports.usePlacesAutocomplete = usePlacesAutocomplete;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('./tslib.es6-
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-91e092ae.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var styled = require('@emotion/styled');
|
|
6
|
-
var utils = require('./utils-
|
|
6
|
+
var utils = require('./utils-ad823692.js');
|
|
7
7
|
|
|
8
8
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
9
9
|
|
|
@@ -4,21 +4,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var miscCookieHelper = require('./miscCookieHelper.js');
|
|
7
|
-
var store = require('./store-
|
|
8
|
-
var togetherComponentGlobalContext = require('./utils-
|
|
9
|
-
var constants = require('./constants-
|
|
10
|
-
require('./tslib.es6-
|
|
7
|
+
var store = require('./store-ec082514.js');
|
|
8
|
+
var togetherComponentGlobalContext = require('./utils-89f1d6d4.js');
|
|
9
|
+
var constants = require('./constants-c9a1b55d.js');
|
|
10
|
+
require('./tslib.es6-91e092ae.js');
|
|
11
11
|
require('zustand');
|
|
12
12
|
require('./constantsIsProduction.js');
|
|
13
|
-
require('./normalizeLink-
|
|
13
|
+
require('./normalizeLink-2736a2fa.js');
|
|
14
14
|
require('./constantsDomainLocales.js');
|
|
15
|
-
require('./Locale-
|
|
16
|
-
require('./index-
|
|
15
|
+
require('./Locale-3b16bb0e.js');
|
|
16
|
+
require('./index-f28b96a7.js');
|
|
17
17
|
require('date-fns/locale');
|
|
18
|
-
require('./index-
|
|
18
|
+
require('./index-f518f327.js');
|
|
19
19
|
require('./constantsSite.js');
|
|
20
20
|
require('./constantsRiskScreener.js');
|
|
21
|
-
require('./index-
|
|
21
|
+
require('./index-063dd232.js');
|
|
22
22
|
require('slugify');
|
|
23
23
|
require('string-format');
|
|
24
24
|
require('./togetherApiPaths.js');
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('./tslib.es6-
|
|
4
|
-
var index = require('./index-
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-91e092ae.js');
|
|
4
|
+
var index = require('./index-063dd232.js');
|
|
5
5
|
var miscCookieHelper = require('./miscCookieHelper.js');
|
|
6
6
|
var slugify = require('slugify');
|
|
7
7
|
var constantsIsProduction = require('./constantsIsProduction.js');
|
|
8
8
|
var formatString = require('string-format');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var togetherApiPaths = require('./togetherApiPaths.js');
|
|
11
|
-
var constants = require('./constants-
|
|
11
|
+
var constants = require('./constants-c9a1b55d.js');
|
|
12
12
|
|
|
13
13
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
14
14
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var index = require('./index-
|
|
4
|
+
var index = require('./index-f28b96a7.js');
|
|
5
5
|
var miscCookieHelper = require('./miscCookieHelper.js');
|
|
6
6
|
var styled = require('@emotion/styled');
|
|
7
7
|
var miscTheme = require('./miscTheme.js');
|
|
8
|
-
var utils = require('./utils-
|
|
8
|
+
var utils = require('./utils-ad823692.js');
|
|
9
9
|
var Skeleton = require('react-loading-skeleton');
|
|
10
10
|
var formatString = require('string-format');
|
|
11
11
|
var constantsDomainLocales = require('./constantsDomainLocales.js');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var healthTools = require('./healthTools-
|
|
4
|
-
var store = require('./store-
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
var Locale = require('./Locale-
|
|
3
|
+
var healthTools = require('./healthTools-e42395ee.js');
|
|
4
|
+
var store = require('./store-ec082514.js');
|
|
5
|
+
var index = require('./index-f518f327.js');
|
|
6
|
+
var Locale = require('./Locale-3b16bb0e.js');
|
|
7
7
|
|
|
8
8
|
const isFeatureWhatsAppEnabled = [
|
|
9
9
|
Locale.LOCALE.Indonesia,
|