@hhgtech/hhg-components 1.28.46 → 1.28.47
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/README.md +0 -5
- package/build/babyGrowth.js +2 -2
- package/build/cache.js +1 -1
- package/build/care.js +1 -1
- package/build/components.js +1 -1
- package/build/{constants-28db3174.js → constants-0b9aa2f4.js} +1 -1
- package/build/{constants-627c575a.js → constants-ded45618.js} +1 -1
- package/build/constants.js +1 -1
- package/build/{core-19b328be.js → core-d774c80a.js} +1 -1
- package/build/{dataTransform-308ec1d0.js → dataTransform-770a8af7.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/babyGrowth.js +2 -2
- package/build/esm/cache.js +1 -1
- package/build/esm/care.js +1 -1
- package/build/esm/components.js +1 -1
- package/build/esm/{constants-e35c5696.js → constants-7f54318a.js} +1 -1
- package/build/esm/{constants-414e0341.js → constants-d7c4fed6.js} +1 -1
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-091d7f79.js → core-539e7939.js} +1 -1
- package/build/esm/{dataTransform-6f1823e1.js → dataTransform-82022f0b.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/{getDynamicHealthTool-37333454.js → getDynamicHealthTool-4d3d11ac.js} +1 -1
- package/build/esm/{getSocialList-a6c965a8.js → getSocialList-1766c602.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/i18nV2.js +1 -1
- package/build/esm/{index-d18cfff8.js → index-0fd0a8fb.js} +1 -1
- package/build/esm/{index-1bf1317e.js → index-156081e2.js} +1 -1
- package/build/esm/{index-92506b05.js → index-1d068cf5.js} +1 -1
- package/build/esm/{index-49c2a65e.js → index-1fce73b8.js} +1 -1
- package/build/esm/{index-865973f4.js → index-2f6fbc5e.js} +1 -1
- package/build/esm/{index-7b8714ba.js → index-30ecb1e3.js} +1 -1
- package/build/esm/{index-3e89f917.js → index-5581ff57.js} +1 -1
- package/build/esm/{index-f21deeb6.js → index-679dd359.js} +1 -1
- package/build/esm/{index-34cf1092.js → index-72664e72.js} +1 -1
- package/build/esm/index-7b4c9ffd.js +1 -0
- package/build/esm/{index-cb13973d.js → index-8e3a85f0.js} +1 -1
- package/build/esm/{index-9e5a2805.js → index-924d8b45.js} +1 -1
- package/build/esm/index-98f238b2.js +1 -0
- package/build/esm/{index-3d2b9817.js → index-9b020630.js} +1 -1
- package/build/esm/{index-cc5ea46f.js → index-ac89ac70.js} +1 -1
- package/build/esm/{index-fd0e0617.js → index-b51813fe.js} +1 -1
- package/build/esm/{index-a0bcdf6a.js → index-bd5220da.js} +1 -1
- package/build/esm/{index-bb8dc02f.js → index-c51596b2.js} +1 -1
- package/build/esm/{index-d6dac1a0.js → index-cff19603.js} +1 -1
- package/build/esm/{index-5cacbac8.js → index-d53f330a.js} +1 -1
- package/build/esm/{index-4786b57c.js → index-f09be292.js} +1 -1
- package/build/esm/index-f5ac3469.js +1 -0
- package/build/esm/{index-bcca5543.js → index-fcb7c05d.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-b876c90a.js → index.styled-222b6ef8.js} +3 -3
- package/build/esm/{index.styles-00233f7a.js → index.styles-f450b969.js} +1 -1
- package/build/esm/lead.js +1 -1
- package/build/esm/mantine.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/onboardingV2.js +1 -1
- package/build/esm/pwg.js +3 -3
- package/build/esm/{routing-5b211351.js → routing-fa27835c.js} +1 -1
- package/build/esm/subot.js +1 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{types-242705e6.js → types-1779ff39.js} +1 -1
- package/build/esm/{types-21b8927e.js → types-de0e0789.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-2e217da0.js → useCategory-dc56ef34.js} +1 -1
- package/build/esm/useHealthToolCache-09b61354.js +1 -0
- package/build/esm/{usePlacesAutocomplete-ed4983f5.js → usePlacesAutocomplete-c2dd02dd.js} +1 -1
- package/build/esm/useTranslations-49e0430f.js +1 -0
- package/build/esm/{utils-39fb1c8c.js → utils-ab3bd9a9.js} +2 -2
- package/build/esm/{utils-19ad9237.js → utils-bc76e7d8.js} +1 -1
- package/build/esm/{utils-d4e0e9b5.js → utils-ce8e4c84.js} +1 -1
- package/build/esm/vaccination.js +11 -11
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/{getDynamicHealthTool-3e4543ff.js → getDynamicHealthTool-91d3a539.js} +1 -1
- package/build/{getSocialList-196c323b.js → getSocialList-95d4b1ab.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-0c7093ea.js → index-031eda4d.js} +5 -5
- package/build/{index-065c9097.js → index-04bf4b9a.js} +1 -1
- package/build/{index-19e259ce.js → index-087d7573.js} +1 -1
- package/build/{index-6f8ff7df.js → index-0a35e29e.js} +1 -1
- package/build/{index-9003442e.js → index-0e2baf55.js} +1 -1
- package/build/{index-cbbe3154.js → index-1c74e473.js} +17 -17
- package/build/{index-4a8b5e48.js → index-20b8b28c.js} +1 -1
- package/build/{index-ff74de8e.js → index-22f6821f.js} +1 -1
- package/build/{index-d27a3f5f.js → index-3183ed6e.js} +1 -1
- package/build/{index-7154350f.js → index-3c0d0730.js} +1 -1
- package/build/{index-8e6644eb.js → index-4198e282.js} +1 -1
- package/build/{index-4c4d7568.js → index-5e65f738.js} +2 -2
- package/build/{index-5385e211.js → index-84f168eb.js} +1 -1
- package/build/{index-4de92198.js → index-8b4d8b74.js} +1 -1
- package/build/{index-96dd78ba.js → index-8d147028.js} +1 -1
- package/build/{index-0f6355d4.js → index-9f2fce62.js} +1 -1
- package/build/{index-8a21ecb2.js → index-a1e30b09.js} +1 -1
- package/build/{index-2420eee5.js → index-abe7bb48.js} +1 -1
- package/build/{index-425f3390.js → index-afd5d772.js} +1 -1
- package/build/{index-beef0ff7.js → index-c53c2cf6.js} +1 -1
- package/build/index-ebed7399.js +1 -0
- package/build/{index-e13a4f9a.js → index-f56af2a1.js} +1 -1
- package/build/{index-43df25b1.js → index-f80db37d.js} +1 -1
- package/build/index.js +1 -1
- package/build/{index.styled-a45b7854.js → index.styled-250b6af4.js} +1 -1
- package/build/{index.styles-ce607f17.js → index.styles-f2358064.js} +5 -5
- package/build/lead.js +1 -1
- package/build/mantine.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/onboardingV2.js +5 -5
- package/build/pwg.js +1 -1
- package/build/{routing-46446fba.js → routing-ed60b4e3.js} +1 -1
- package/build/subot.js +1 -1
- package/build/together.js +1 -1
- package/build/{types-d2335814.js → types-2602cb14.js} +1 -1
- package/build/{types-e54d8d93.js → types-662fa8fb.js} +1 -1
- package/build/types.js +1 -1
- package/build/{useCategory-c99469f2.js → useCategory-f58f3f7e.js} +1 -1
- package/build/useHealthToolCache-d78d2251.js +1 -0
- package/build/{usePlacesAutocomplete-55e04a25.js → usePlacesAutocomplete-11729974.js} +1 -1
- package/build/{useTranslations-b435b717.js → useTranslations-eef7f548.js} +1 -1
- package/build/{utils-9778a239.js → utils-5af37bc5.js} +1 -1
- package/build/{utils-83803365.js → utils-74e9f3ab.js} +2 -2
- package/build/{utils-c18ec2df.js → utils-adde2380.js} +1 -1
- package/build/vaccination.js +1 -1
- package/package.json +2 -5
- package/build/esm/index-638a744e.js +0 -1
- package/build/esm/index-73532662.js +0 -1
- package/build/esm/index-c1cb45b2.js +0 -1
- package/build/esm/useHealthToolCache-011e34e2.js +0 -1
- package/build/esm/useTranslations-80f9bf98.js +0 -1
- package/build/index-07dff904.js +0 -1
- package/build/useHealthToolCache-dc437f4f.js +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-0eb54c7c.js → BMI_BOYS.percentile.monthly-b574351a.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-b7bde0b1.js → BMI_BOYS.percentile.weekly-ad058945.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-2aa9ad44.js → BMI_BOYS.percentile.yearly-8ada8234.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-97389f6d.js → BMI_BOYS.zscore.monthly-f16e149c.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-bc5a17ee.js → BMI_BOYS.zscore.weekly-776e513d.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-95e1abf3.js → BMI_BOYS.zscore.yearly-3d6a4a73.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-8a628c8b.js → BMI_GIRLS.percentile.monthly-10009b9f.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-c3423d0b.js → BMI_GIRLS.percentile.weekly-6557eb44.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-30c05aa5.js → BMI_GIRLS.percentile.yearly-3f4acf36.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-e81868f9.js → BMI_GIRLS.zscore.monthly-6a304df3.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-98365971.js → BMI_GIRLS.zscore.weekly-e0d6db84.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-34dac101.js → BMI_GIRLS.zscore.yearly-a6ec380e.js} +0 -0
- /package/build/{ChevronDown-77fab19e.js → ChevronDown-a8966000.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-f49c4a46.js → HEAD CIRCUM_BOYS.percentile.monthly-71a87239.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-72afd132.js → HEAD CIRCUM_BOYS.percentile.weekly-b862aacb.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-ab0deda0.js → HEAD CIRCUM_BOYS.percentile.yearly-13eada26.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-fbd5f8c4.js → HEAD CIRCUM_BOYS.zscore.monthly-f9c4f89e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-87f840f6.js → HEAD CIRCUM_BOYS.zscore.weekly-4e1a4178.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-9a7dd00c.js → HEAD CIRCUM_BOYS.zscore.yearly-554a8878.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-679b8839.js → HEAD CIRCUM_GIRLS.percentile.monthly-2910870c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-b4e20015.js → HEAD CIRCUM_GIRLS.percentile.weekly-0f14fedf.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-9cd60765.js → HEAD CIRCUM_GIRLS.percentile.yearly-596b0da0.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-ab6de2c6.js → HEAD CIRCUM_GIRLS.zscore.monthly-69ae9a0c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-7d38c523.js → HEAD CIRCUM_GIRLS.zscore.weekly-114e70a3.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-eb9d57e8.js → HEAD CIRCUM_GIRLS.zscore.yearly-b6747ec7.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-41de847f.js → HEIGHT_BOYS.percentile.monthly-cb959489.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-62b868f0.js → HEIGHT_BOYS.percentile.weekly-7955c34e.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-e2c7bb82.js → HEIGHT_BOYS.percentile.yearly-b073f41f.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-5d6cc9db.js → HEIGHT_BOYS.zscore.monthly-1ae80a89.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-d7b99302.js → HEIGHT_BOYS.zscore.weekly-cd4bc068.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-e5699025.js → HEIGHT_BOYS.zscore.yearly-7eb6af8e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-bac0286d.js → HEIGHT_GIRLS.percentile.monthly-d2959962.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-6999925f.js → HEIGHT_GIRLS.percentile.weekly-99981d42.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-ebfa2c19.js → HEIGHT_GIRLS.percentile.yearly-d1d13641.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-39be4dd2.js → HEIGHT_GIRLS.zscore.monthly-d9a63188.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-207cf2f5.js → HEIGHT_GIRLS.zscore.weekly-d58b3339.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-265aafc2.js → HEIGHT_GIRLS.zscore.yearly-ae58b0a3.js} +0 -0
- /package/build/{Subot-54546cbb.js → Subot-511ff255.js} +0 -0
- /package/build/{Visible-27b623f0.js → Visible-338d5d3b.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-9ca3a316.js → WEIGHT_BOYS.percentile.monthly-3687233c.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-7e51fb9b.js → WEIGHT_BOYS.percentile.weekly-c0915786.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-b47c5be9.js → WEIGHT_BOYS.percentile.yearly-898b748c.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-6d59370f.js → WEIGHT_BOYS.zscore.monthly-e47a72be.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-38beac02.js → WEIGHT_BOYS.zscore.weekly-23cc874f.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-1f4013a7.js → WEIGHT_BOYS.zscore.yearly-2c523e95.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-c9144c22.js → WEIGHT_GIRLS.percentile.monthly-232c03ec.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-5455b91e.js → WEIGHT_GIRLS.percentile.weekly-363f6163.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-03c736dd.js → WEIGHT_GIRLS.percentile.yearly-09c2db7a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-415a66a8.js → WEIGHT_GIRLS.zscore.monthly-996f2f01.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-1e23361d.js → WEIGHT_GIRLS.zscore.weekly-1c937534.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-8db29178.js → WEIGHT_GIRLS.zscore.yearly-ab136277.js} +0 -0
- /package/build/{animation-1e9aff6a.js → animation-1e5b6297.js} +0 -0
- /package/build/{cookieHelper-59a64e32.js → cookieHelper-91788da6.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-57e884f8.js → BMI_BOYS.percentile.monthly-f3616831.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-b2c63459.js → BMI_BOYS.percentile.weekly-e94f9b0c.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-8ca90fac.js → BMI_BOYS.percentile.yearly-8f7ac99b.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-b493d2f9.js → BMI_BOYS.zscore.monthly-54be7428.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-62ae4fbc.js → BMI_BOYS.zscore.weekly-6c12aa9f.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-e2aad569.js → BMI_BOYS.zscore.yearly-1c23b3d9.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-7f8de0c2.js → BMI_GIRLS.percentile.monthly-8a502893.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-6e0b116a.js → BMI_GIRLS.percentile.weekly-fa839bec.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-4a395636.js → BMI_GIRLS.percentile.yearly-a4566ca8.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-be973fb7.js → BMI_GIRLS.zscore.monthly-aab4d85c.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-c19aae0e.js → BMI_GIRLS.zscore.weekly-f8488af5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-7bf54eb9.js → BMI_GIRLS.zscore.yearly-a4d7a630.js} +0 -0
- /package/build/esm/{ChevronDown-b9b5a352.js → ChevronDown-7443ba17.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-6e42d726.js → HEAD CIRCUM_BOYS.percentile.monthly-dd491a3d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-8999c4bf.js → HEAD CIRCUM_BOYS.percentile.weekly-9a4cc487.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-b5760636.js → HEAD CIRCUM_BOYS.percentile.yearly-5ff7c492.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-fe30f273.js → HEAD CIRCUM_BOYS.zscore.monthly-921be2d2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-17145cf6.js → HEAD CIRCUM_BOYS.zscore.weekly-f5d468d9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-0d813a98.js → HEAD CIRCUM_BOYS.zscore.yearly-5199b4a7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-ae35f7b2.js → HEAD CIRCUM_GIRLS.percentile.monthly-8679c7bc.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-430e5931.js → HEAD CIRCUM_GIRLS.percentile.weekly-9e2dcb2b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-ce5d85d6.js → HEAD CIRCUM_GIRLS.percentile.yearly-c6203100.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-b304dc6c.js → HEAD CIRCUM_GIRLS.zscore.monthly-856a5b1e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-de588d96.js → HEAD CIRCUM_GIRLS.zscore.weekly-0783f118.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-44e77264.js → HEAD CIRCUM_GIRLS.zscore.yearly-a84257a0.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-e574a87c.js → HEIGHT_BOYS.percentile.monthly-788fb5b4.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-49bc6c02.js → HEIGHT_BOYS.percentile.weekly-f5190462.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-99cf7774.js → HEIGHT_BOYS.percentile.yearly-afe4fd67.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-63c3566b.js → HEIGHT_BOYS.zscore.monthly-bb98f05e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-a7eff90c.js → HEIGHT_BOYS.zscore.weekly-dfb95358.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-b06dea5e.js → HEIGHT_BOYS.zscore.yearly-055fefcb.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-b154ae1d.js → HEIGHT_GIRLS.percentile.monthly-441d5eec.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-a3dd221b.js → HEIGHT_GIRLS.percentile.weekly-df673b20.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-c1a93361.js → HEIGHT_GIRLS.percentile.yearly-b8635e96.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-47b24f91.js → HEIGHT_GIRLS.zscore.monthly-8350897b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-f3cd351a.js → HEIGHT_GIRLS.zscore.weekly-820a7ef3.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-f6e9bb0c.js → HEIGHT_GIRLS.zscore.yearly-b2f2d906.js} +0 -0
- /package/build/esm/{Subot-0c45fa4c.js → Subot-3d309d90.js} +0 -0
- /package/build/esm/{Visible-3eb21335.js → Visible-45ab1e13.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-87900c96.js → WEIGHT_BOYS.percentile.monthly-566b72c0.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-6fb93a78.js → WEIGHT_BOYS.percentile.weekly-ae3bef15.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-ccca0fe8.js → WEIGHT_BOYS.percentile.yearly-fd72f182.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-35d466dc.js → WEIGHT_BOYS.zscore.monthly-4ebeca1a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-d74d6ff5.js → WEIGHT_BOYS.zscore.weekly-1edeedcc.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-2c068e1e.js → WEIGHT_BOYS.zscore.yearly-b42da93c.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-1ee7e829.js → WEIGHT_GIRLS.percentile.monthly-ab099390.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-ab30775b.js → WEIGHT_GIRLS.percentile.weekly-e604f0e1.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-893b6771.js → WEIGHT_GIRLS.percentile.yearly-9575be98.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-c37f1d39.js → WEIGHT_GIRLS.zscore.monthly-bddddbe3.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-3a1449f6.js → WEIGHT_GIRLS.zscore.weekly-f255cbfc.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-aa00837d.js → WEIGHT_GIRLS.zscore.yearly-a99d0fd7.js} +0 -0
- /package/build/esm/{animation-03daa77e.js → animation-4d5baff8.js} +0 -0
- /package/build/esm/{cookieHelper-cbd9f06e.js → cookieHelper-0acd4fc8.js} +0 -0
- /package/build/esm/{index-c9bdb9a2.js → index-550480ee.js} +0 -0
- /package/build/esm/{index-7d682662.js → index-5dc45c1c.js} +0 -0
- /package/build/esm/{index-fb029176.js → index-a6ddd645.js} +0 -0
- /package/build/esm/{isProduction-cfb9150a.js → isProduction-135c9280.js} +0 -0
- /package/build/esm/{localizeNumberFormat-213a73b8.js → localizeNumberFormat-883148fd.js} +0 -0
- /package/build/esm/{normalizeLink-cc25681e.js → normalizeLink-75e03b67.js} +0 -0
- /package/build/esm/{number-dd894856.js → number-73b198fe.js} +0 -0
- /package/build/esm/{paths-2d37bc61.js → paths-61361575.js} +0 -0
- /package/build/esm/{theme-9f017335.js → theme-0d3c8845.js} +0 -0
- /package/build/esm/{translationsContext-9fc8f894.js → translationsContext-ee7ec6eb.js} +0 -0
- /package/build/esm/{tslib.es6-cabcb8ea.js → tslib.es6-c43c14a5.js} +0 -0
- /package/build/esm/{types-2d28585d.js → types-745b966e.js} +0 -0
- /package/build/esm/{useIsInit-81de6d8b.js → useIsInit-d5727c47.js} +0 -0
- /package/build/esm/{useOutsideClick-e1437a3f.js → useOutsideClick-e4f22be5.js} +0 -0
- /package/build/esm/{useScrollbarSize-6ecc2f5a.js → useScrollbarSize-0d367255.js} +0 -0
- /package/build/esm/{utils-3f639011.js → utils-1550f4c2.js} +0 -0
- /package/build/{index-4b719c83.js → index-52b005ff.js} +0 -0
- /package/build/{index-7005321e.js → index-983a543a.js} +0 -0
- /package/build/{index-21c825aa.js → index-f2e5a43e.js} +0 -0
- /package/build/{isProduction-426652cc.js → isProduction-8a3929cb.js} +0 -0
- /package/build/{localizeNumberFormat-5389239f.js → localizeNumberFormat-d00e3203.js} +0 -0
- /package/build/{normalizeLink-ef4fc463.js → normalizeLink-e4d8df7b.js} +0 -0
- /package/build/{number-f6e8e1a9.js → number-9930fc27.js} +0 -0
- /package/build/{paths-b1c94851.js → paths-ed97730a.js} +0 -0
- /package/build/{theme-98a7bede.js → theme-0bb94193.js} +0 -0
- /package/build/{translationsContext-6c5fb248.js → translationsContext-e09b4f33.js} +0 -0
- /package/build/{tslib.es6-d46558cb.js → tslib.es6-293338f5.js} +0 -0
- /package/build/{types-032556e4.js → types-140f0c7d.js} +0 -0
- /package/build/{useIsInit-8386673c.js → useIsInit-f9337a25.js} +0 -0
- /package/build/{useOutsideClick-5544e570.js → useOutsideClick-ac461ca7.js} +0 -0
- /package/build/{useScrollbarSize-d4ccc356.js → useScrollbarSize-9413af1b.js} +0 -0
- /package/build/{utils-469dda3f.js → utils-ec00b8cb.js} +0 -0
package/build/esm/subot.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{createContext as t,useContext as i,useRef as n,useState as o,useEffect as a,useCallback as l,useMemo as r,forwardRef as s,memo as d,useImperativeHandle as c}from"react";import{e as u,c as m,N as p,d as v,f as g,g as b,E as h,L as f,F as y}from"./Subot-0c45fa4c.js";import{a as E,_ as x}from"./tslib.es6-cabcb8ea.js";import{B as C,d as w,M as k,e as S,G as I,h as N,A as _,f as O}from"./index-bcca5543.js";import T from"js-cookie";import A from"fastdom";import B from"fastdom/extensions/fastdom-promised";import P from"string-format";import{G as j,b as M,x as R,y as L,T as U,L as D}from"./utils-39fb1c8c.js";import{v4 as F}from"uuid";import{i as H}from"./isProduction-cfb9150a.js";import z from"hex-rgb";import Y from"classnames";import{C as q}from"./index-fb029176.js";import{D as G,L as V}from"./index-865973f4.js";import{motion as X}from"framer-motion";import{M as Q}from"./utils-3f639011.js";import K from"styled-components";import{B as W,S as J}from"./index-9e5a2805.js";import{Remarkable as Z}from"remarkable";import{useInView as $}from"react-intersection-observer";import{Box as ee,Textarea as te}from"@mantine/core";import{I as ie,T as ne}from"./index-fd0e0617.js";import oe from"dayjs";import ae from"dayjs/plugin/isSameOrBefore";import{t as le}from"./theme-9f017335.js";import"@mantine/dates";import"./index-3d2b9817.js";import"./translationsContext-9fc8f894.js";import"@mantine/hooks";import{B as re}from"./index-49c2a65e.js";import se from"lodash/isEmpty";import{Controller as de,useForm as ce}from"react-hook-form";import ue,{getCountryCallingCode as me,isPossiblePhoneNumber as pe,parsePhoneNumber as ve}from"react-phone-number-input";import{LoadScript as ge}from"@react-google-maps/api";import{u as be,G as he,a as fe}from"./usePlacesAutocomplete-ed4983f5.js";import{D as ye}from"./index-cc5ea46f.js";import"date-fns/locale";import"./cookieHelper-cbd9f06e.js";import"slugify";import"./useTranslations-80f9bf98.js";import"date-fns";import"react-day-picker/DayPickerInput";import"@mantine/carousel";const Ee=A.extend(B),xe={POST_VERIFY_SMS_OTP:"sms/update-phone",POST_SEND_OTP:"sms/otp",POST_SEND_OTP_WHATSAPP:"whatsapp/otp",POST_VERIFY_OTP:"sms/verify",POST_VERIFY_OTP_WHATSAPP:"sms/verify-whatsapp",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",GET_INLINE_FIRST_NODE:"bots",GET_INLINE_MESSAGE:"inline/messages",GET_INLINE_IMPRESSION:"inline/impressions",GET_INLINE_CLICK:"inline/clicks",GET_SUBOT_LOG:"log/bot/{botId}/{cookieId}/{accountId}?type={type}",POST_SUBOT_CREATE_LOG:"log/bot",FETCH_URL_DATA:"preview",GET_VOUCHER_QUANTITY:"vouchers/total_quantity?search={search}&client_id={clientId}"},Ce={cached:{},clearCached:e=>{console.log(Ce.cached),Object.keys(Ce.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),Ce.cached[e]=void 0}))},withCached:(e,t)=>E(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===Ce.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof Ce.cached[e]&&(t(Ce.cached[e]),clearInterval(n))}),100)}));if("object"==typeof Ce.cached[e])return Ce.cached[e];Ce.cached[e]="waitingTheFirstResponse";try{const i=yield t();return Ce.cached[e]=i,setTimeout((()=>{Ce.cached[e]=void 0}),18e5),i}catch(t){return Ce.cached[e]=void 0,Promise.reject(t)}}))},we=(e,t)=>{const{subotApiUrl:i}=null==j?void 0:j.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+P(e,Object.assign({},t))},ke=e=>E(void 0,void 0,void 0,(function*(){try{return yield M(we(xe.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Se=e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},Ie=e=>E(void 0,void 0,void 0,(function*(){try{return yield Ce.withCached("SubotInlineFirstNode",(()=>E(void 0,void 0,void 0,(function*(){const t=yield M(we(xe.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Se(t),t}))))}catch(e){return null}})),Ne=e=>E(void 0,void 0,void 0,(function*(){try{return yield M(we(xe.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),_e=e=>E(void 0,void 0,void 0,(function*(){try{return yield M(we(xe.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),Oe=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],Te=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...Oe],Ae=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(Te.includes(i))if(Oe.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),Be=e=>[{id:F(),label:JSON.stringify({title:"",description:""}),type:u.SSO_INTENT,url:""},{id:F(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:u.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:F(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:u.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:F(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:u.SSO_INTENT,url:"/images/subot/shield.svg"}];function Pe(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const je=e=>R.parse(e||"")["hhg-id"]||T.get("hhg-id")||"",Me=e=>{if(e)return T.set("hhg-id",e),e;const t=je();if(t)return t;const i=F();return T.set("hhg-id",i),i},Re=e=>{const t=R.parse(e||"")[C]||T.get(C)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},Le=e=>{const t=R.parse(e||"")[C]||T.get(C)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},Ue=F(),De=()=>Ue,Fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${H?"":"discover."}${w[e]}`,He=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},ze=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},Ye=30,qe=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},Ge=(e,t,i,n)=>{const o=qe(e[0]);if(!t)return{};const a=e.findIndex((e=>e.id==t)),l=e.reduce(((e,l,r)=>{var s,d;if(r>a)return e;const c=l,u=i&&c.id===t?{action_id:i}:c._message;let p=0;const v=null===(s=c.actions)||void 0===s?void 0:s.find((e=>e.id===(null==u?void 0:u.action_id)));p+=(null==v?void 0:v.score)||0;const g=void 0!==o[c.id],b=i&&c.id===t?n:null==u?void 0:u.form_submit_meta;if(g&&c.type===m.FORM&&b){const e=o[c.id].action_id,t=null===(d=c.actions)||void 0===d?void 0:d.find((t=>t.id===e)),i=null==t?void 0:t.key,n=b.find((e=>e.key===i&&"number"===e.control));if(o[c.id].number&&["+","-","x","/"].includes(o[c.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[c.id].operator,i=o[c.id].number;let a=0;"+"===t&&(a=e+i),"-"===t&&(a=e-i),"x"===t&&(a=e*i),"/"===t&&(a=e/i),isNaN(a)||(p+=a)}}return e+p}),0);return{current_total_dynamic_score:l}},Ve=(e,t)=>{const i=qe(t[0]);if(0===Object.keys(i).length)return e;const n=t.filter((e=>e.type===m.FORM));return Object.keys(i).forEach((t=>{var o,a,l;const r=n.find((e=>e.id===t)),s=null===(o=null==r?void 0:r.actions)||void 0===o?void 0:o.find((e=>{var n;return e.id===(null===(n=i[t])||void 0===n?void 0:n.action_id)})),d=null==s?void 0:s.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===d&&"number"===e.control));if(i[t].number&&["+","-","x","/"].includes(i[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const n=Number(c.value),o=i[t].operator,a=i[t].number;let l=0;if("+"===o&&(l=n+a),"-"===o&&(l=n-a),"x"===o&&(l=n*a),"/"===o&&(l=n/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},Xe="other",Qe="stateInlineSSO",Ke=()=>{try{const e=window.next.router.components["/[...slug]"].props.pageProps;return"services-connection"===e.template?{project_id:"care-path",user_funnel:e.spotlight.additionalSlugActive||"",audience_name:e.spotlight.groupIdActive||""}:{}}catch(e){return{}}},We=e=>{const t=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,t)=>{var i,n,o,a,l,r,s,d,c,u,p,v,b,h,f,y,E,x,C,w,k;if(t.actions&&(null===(i=t._message)||void 0===i?void 0:i.action_id)&&(null===(n=t._message)||void 0===n?void 0:n.action_value)){const i=t._message.action_value;if(t.type===m.FORM){const i=["address","province","district","commune"],n=((null===(o=t._message)||void 0===o?void 0:o.form_submit_meta)||[]).filter((e=>!i.includes(e.control))),m=((null===(a=t._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>i.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(l=m.address)||void 0===l?void 0:l.value,null===(r=m.commune)||void 0===r?void 0:r.value,null===(s=m.district)||void 0===s?void 0:s.value,null===(d=m.province)||void 0===d?void 0:d.value].filter(Boolean).join(", ");p&&m.address?e.push({attribute:m.address.key,value:p,label_question:(null===(u=null===(c=t.intents)||void 0===c?void 0:c[0])||void 0===u?void 0:u.label)||""}):n.forEach((i=>{var n,o;e.push({attribute:i.key,value:i.value,label_question:(null===(o=null===(n=t.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(t.type===m.TEXT)if(t.is_multi_select){const i=Object.keys(t._message.selected_actions||{}),n=t.actions.filter((e=>e.label&&i.includes(e.id))).map((e=>e.label));i.length&&e.push({attribute:t.actions[0].key||"",value:n,label_question:(null===(v=null===(p=t.intents)||void 0===p?void 0:p[0])||void 0===v?void 0:v.label)||""})}else{const n=t._message.action_id,o=t.actions.find((e=>e.id===n)),a=null==o?void 0:o.label,l=null===(f=null===(h=null===(b=t._message)||void 0===b?void 0:b.form_submit_meta)||void 0===h?void 0:h.find((e=>e.key===Xe)))||void 0===f?void 0:f.value,r=(null==o?void 0:o.type)===g.USER_CHOICE_TEXT_BY_INPUT;a&&n&&e.push({attribute:i,value:r&&l?l:a,label_question:(null===(E=null===(y=t.intents)||void 0===y?void 0:y[0])||void 0===E?void 0:E.label)||""})}if(t.type===m.POLL){const i=t.id,n=(null===(C=null===(x=t._message)||void 0===x?void 0:x.current_polls)||void 0===C?void 0:C[i])||[],o=t.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:t.actions[0].key||"",value:o,label_question:(null===(k=null===(w=t.intents)||void 0===w?void 0:w[0])||void 0===k?void 0:k.label)||""})}}return e}),[]);return t},Je=(e,t)=>{var i;try{if("ACUVUE"!==(null===(i=t.extra_settings)||void 0===i?void 0:i.subot_type))return;let n="",o="",a="",l=Le().email;if((e||[]).forEach((e=>{var t,i,r;const s=e._message;if(!s)return;const d=null===(t=e.actions)||void 0===t?void 0:t.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?n=(null==d?void 0:d.label)||"":"voucher_color"===s.action_value&&(o=(null==d?void 0:d.label)||""),e.type===m.FORM){const e=null===(i=s.form_submit_meta)||void 0===i?void 0:i.find((e=>"voucher_size"===e.key)),t=null===(r=s.form_submit_meta)||void 0===r?void 0:r.find((e=>"email"===e.control));e&&(a=e.value),t&&(l=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===n&&l)return{email:l,voucherName:n};if(n&&o&&a&&l)return{email:l,voucherName:`${n}|${o}|${a}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},Ze=({nodes:e,activeId:t,params:i,accountIdFromLogs:n})=>E(void 0,void 0,void 0,(function*(){try{let o="in_progress";const a=e[e.length-1];(null==a?void 0:a.type)&&v.includes(a.type)&&(o="complete");const l=e.slice(1),r={activeId:t,params:i,nodes:l,tracking:Object.assign(Object.assign({},Ke()),{full_url:window.location.href}),unifiedAnswers:We(l),voucherAnswers:Je(l,e[0])},s={cookie_id:Me(),account_id:n||Re()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(r),status:o,type:"inline",market:k[L]};yield M(we(xe.POST_SUBOT_CREATE_LOG),"POST",{data:s})}catch(e){}})),$e=(e,t)=>{try{const[i,n,o]=z(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},et=t({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),tt=({children:t,articleLink:s,subotId:d,isFullContainer:c,bgColor:u,primaryColor:m,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})=>{const{formatMessage:h,action:{pushNotifications:f}}=i(U),y=n(null),C=n(null),[w,k]=o(!0),[N,_]=o(""),[O,A]=o([]),[B,P]=o(!1),[R,L]=o({});a((()=>{const e=u||"#e3f2ff",t=m||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=y.current,a=(new Date).getTime();o&&(Ee.mutate((()=>{o.style.setProperty("--subot-inline-bg-color",e),o.style.setProperty("--subot-inline-primary-color",t),o.style.setProperty("--subot-inline-primary-color-hover",$e(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",$e(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",$e(t,.3)||"#bcdeff")})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[u,m]);const D=l((()=>{const e=window.gaData,t=window.location.origin+S+("tl-PH"===(null==j?void 0:j.locale)?s.replace("fil/",""):s),i={bot_id:d,account_id:Re()||null,action_id:"",action_value:"",cookie_id:Me(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:T.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:t.replace("http://localhost:6006","https://discover.hellobacsi.com").replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover.").replace("staging.hellohealthgroup.com","discover.hellodoctor.com.ph").replace("https://hellohealthgroup.com","https://hellodoctor.com.ph"),window_id:De()};return Ae(i,null==j?void 0:j.router.query)}),[]),F=l((()=>{var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),H=l(((e,t=!0)=>E(void 0,void 0,void 0,(function*(){var i;if(!e||!e.url||!e.bot_id)return;let n="",o=[];k(!0);const a=yield Ie(e.bot_id);1===(null==a?void 0:a._status)&&(n=null==a?void 0:a._data.id.toString(),o.push(null==a?void 0:a._data,null==a?void 0:a._data.first_node));const l=t?yield(r=o[0],E(void 0,void 0,void 0,(function*(){var e,t;try{if(!r)return null;const i=yield M(we(xe.GET_SUBOT_LOG,{botId:r.id,cookieId:Me(),accountId:Re()||"",type:"inline"}),"GET");if(!(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.data)||"inline"!==(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.type))return null;const n=JSON.parse(i._data.data),o=n.nodes,a="in_progress"===i._data.status,l="complete"===i._data.status;return a||l?{nodes:[r,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:Re()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var r;l&&(o=l.nodes,n=l.activeId,C.current=(null===(i=l.params)||void 0===i?void 0:i.account_id)||0);const s=((e,{getParams:t})=>{try{if(!Re())return null;const i=JSON.parse(localStorage.getItem(Qe)||""),n=18e5;return(null==i?void 0:i.botId)===e&&i.listNodes&&i.activeId&&i.createdAt+n>Date.now()&&(localStorage.removeItem(Qe),i.listNodes.slice(-1)[0].position===p.SSO)?{listNodes:i.listNodes,activeId:i.activeId,params:Object.assign(Object.assign(Object.assign({},t()),i.params),{account_id:Re()||null,cookie_id:Me(i.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:D});if(s&&s.params.action_id&&s.params.action_value){const e=yield ke(s.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(n=null==e?void 0:e._data.node.id,o=s.listNodes,o[o.length-1]=null==e?void 0:e._data.node,Ze({nodes:o,activeId:n,params:s.params,accountIdFromLogs:C.current}),setTimeout((()=>{F()}),100))}const d=(null==s?void 0:s.params)||(null==l?void 0:l.params)||e,[c,u]=((e,t,i)=>{if(!(null==e?void 0:e.subot_field_type))return[t,i];const n=i.find((e=>e.id==t));return n&&n.hasOwnProperty("first_node")&&i.length>1?[i[1].id,i]:[t,i]})(o[0],n,o);k(!1),_(c),A(u),L(Object.assign(Object.assign({},e),d))}))),[]),z=l(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${d}"]`);i&&i.click();let n=N,o=[...O];if(null==t?void 0:t.node_id){const e=o.findIndex((({id:e})=>e==t.node_id));-1!==e&&(o[e]._message=Object.assign(Object.assign({},o[e]._message),t),o=[...o.slice(0,e+1)])}if(k(!0),e){const t=o.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)o=[...o,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},o[t]),e),{_message:Object.assign(Object.assign({},o[t]._message),null==e?void 0:e._message)});o=[...o.slice(0,t),Object.assign({},i),...o.slice(t+1)]}n=e.id}setTimeout((()=>{A(o),_(n),k(!1),Ze({nodes:o,activeId:n,params:R,accountIdFromLogs:C.current})}),250)}),[O,N]),Y=l((e=>E(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),Ge(O,N,e.action_id)),i=yield ke(t);if(k(!1),1===(null==i?void 0:i._status)){const e=null==i?void 0:i._data,{node:n}=e,o=x(e,["node"]),a=Object.assign(Object.assign({},n),{_message:Object.assign(Object.assign({},o),{node_id:n.id})});return void(-1!==O.findIndex((e=>e.id===a.id))?z(a):z(a,t))}f({title:h({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=O.find((e=>e.id==N));t&&t.hasOwnProperty("first_node")&&(_(O[1].id.toString()),Ze({nodes:O,activeId:O[1].id.toString(),params:D(),accountIdFromLogs:C.current}))}))),[z,O]),q=l((()=>{const e=O.findIndex((({id:e})=>e==N));if(e&&-1!==e&&e>1){const t=O[e-1];_(t.id),Ze({nodes:O,activeId:t.id,params:R,accountIdFromLogs:C.current})}}),[O,N]),G=l((()=>{const e=D();H(e,!1);const t=O[0],i=O[1];Ze({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:C.current})}),[D,H,O]),V=l((e=>{A((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==N?t.map((t=>{const i=t;return i.id===N?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[N]);a((()=>{if(T.get(I)){const e=D();H(e)}else Pe({condition:()=>Boolean(T.get(I)),finished:()=>{const e=D();H(e)}})}),[]),a((()=>{if(!O.length)return;O.find((e=>e.id==N))&&N||_(d+"")}),[N,O]);const X=r((()=>({activeId:N,params:R,listNodes:O,loading:w,setLoading:k,getParams:D,onNext:Y,onPrev:q,onSubmit:z,onStartOver:G,onChange:V,isShowFooter:B,setIsShowFooter:P,isFullContainer:c,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})),[N,Y,q,z,V,G,B,R,O,w,k,D,c,v,g,b]);return O.length?e.createElement(et.Provider,{value:X},e.createElement("div",{ref:y},t)):null},it=t=>e.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e.createElement("path",{d:"M5.99105 4.99067C5.79212 4.99072 5.59772 5.0501 5.43271 5.16121C5.2677 5.27233 5.13958 5.43013 5.06472 5.61444C4.98986 5.79875 4.97167 6.0012 5.01248 6.1959C5.05328 6.39061 5.15122 6.56872 5.29379 6.70747L10.5868 12.0004L5.29379 17.2934C5.19781 17.3855 5.12119 17.4959 5.0684 17.618C5.01562 17.7402 4.98773 17.8716 4.98638 18.0046C4.98503 18.1377 5.01023 18.2697 5.06052 18.3928C5.11081 18.516 5.18517 18.6279 5.27925 18.722C5.37333 18.8161 5.48523 18.8904 5.60841 18.9407C5.73159 18.991 5.86356 19.0162 5.9966 19.0149C6.12964 19.0135 6.26108 18.9856 6.38321 18.9328C6.50533 18.8801 6.6157 18.8034 6.70785 18.7075L12.0008 13.4145L17.2938 18.7075C17.3859 18.8034 17.4963 18.8801 17.6184 18.9328C17.7406 18.9856 17.872 19.0135 18.005 19.0149C18.1381 19.0162 18.27 18.991 18.3932 18.9407C18.5164 18.8904 18.6283 18.8161 18.7224 18.722C18.8165 18.6279 18.8908 18.516 18.9411 18.3928C18.9914 18.2697 19.0166 18.1377 19.0153 18.0047C19.0139 17.8716 18.986 17.7402 18.9332 17.618C18.8804 17.4959 18.8038 17.3855 18.7078 17.2934L13.4149 12.0004L18.7078 6.70747C18.8524 6.567 18.951 6.38616 18.991 6.18864C19.031 5.99112 19.0103 5.78614 18.9318 5.60055C18.8532 5.41497 18.7205 5.25744 18.5509 5.14861C18.3812 5.03978 18.1827 4.98473 17.9813 4.99067C17.7215 4.99841 17.4749 5.10699 17.2938 5.2934L12.0008 10.5864L6.70785 5.2934C6.61466 5.19761 6.50321 5.12146 6.3801 5.06947C6.25698 5.01747 6.1247 4.99068 5.99105 4.99067Z",fill:"#595959"})),nt="480px",ot=K.div`
|
|
1
|
+
import e,{createContext as t,useContext as i,useRef as n,useState as o,useEffect as a,useCallback as l,useMemo as r,forwardRef as s,memo as d,useImperativeHandle as c}from"react";import{e as u,c as m,N as p,d as v,f as g,g as b,E as h,L as f,F as y}from"./Subot-3d309d90.js";import{a as E,_ as x}from"./tslib.es6-c43c14a5.js";import{B as C,d as w,M as k,e as S,G as I,h as N,A as _,f as O}from"./index-fcb7c05d.js";import T from"js-cookie";import A from"fastdom";import B from"fastdom/extensions/fastdom-promised";import P from"string-format";import{G as j,b as M,x as R,y as L,T as U,L as D}from"./utils-ab3bd9a9.js";import{v4 as F}from"uuid";import{i as H}from"./isProduction-135c9280.js";import z from"hex-rgb";import Y from"classnames";import{C as q}from"./index-a6ddd645.js";import{D as G,L as V}from"./index-2f6fbc5e.js";import{motion as X}from"framer-motion";import{M as Q}from"./utils-1550f4c2.js";import K from"styled-components";import{B as W,S as J}from"./index-924d8b45.js";import{Remarkable as Z}from"remarkable";import{useInView as $}from"react-intersection-observer";import{Box as ee,Textarea as te}from"@mantine/core";import{I as ie,T as ne}from"./index-b51813fe.js";import oe from"dayjs";import ae from"dayjs/plugin/isSameOrBefore";import{t as le}from"./theme-0d3c8845.js";import"@mantine/dates";import"./index-9b020630.js";import"./translationsContext-ee7ec6eb.js";import"@mantine/hooks";import{B as re}from"./index-1fce73b8.js";import se from"lodash/isEmpty";import{Controller as de,useForm as ce}from"react-hook-form";import ue,{getCountryCallingCode as me,isPossiblePhoneNumber as pe,parsePhoneNumber as ve}from"react-phone-number-input";import{LoadScript as ge}from"@react-google-maps/api";import{u as be,G as he,a as fe}from"./usePlacesAutocomplete-c2dd02dd.js";import{D as ye}from"./index-ac89ac70.js";import"date-fns/locale";import"./cookieHelper-0acd4fc8.js";import"slugify";import"./useTranslations-49e0430f.js";import"date-fns";import"react-day-picker/DayPickerInput";import"@mantine/carousel";const Ee=A.extend(B),xe={POST_VERIFY_SMS_OTP:"sms/update-phone",POST_SEND_OTP:"sms/otp",POST_SEND_OTP_WHATSAPP:"whatsapp/otp",POST_VERIFY_OTP:"sms/verify",POST_VERIFY_OTP_WHATSAPP:"sms/verify-whatsapp",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",GET_INLINE_FIRST_NODE:"bots",GET_INLINE_MESSAGE:"inline/messages",GET_INLINE_IMPRESSION:"inline/impressions",GET_INLINE_CLICK:"inline/clicks",GET_SUBOT_LOG:"log/bot/{botId}/{cookieId}/{accountId}?type={type}",POST_SUBOT_CREATE_LOG:"log/bot",FETCH_URL_DATA:"preview",GET_VOUCHER_QUANTITY:"vouchers/total_quantity?search={search}&client_id={clientId}"},Ce={cached:{},clearCached:e=>{console.log(Ce.cached),Object.keys(Ce.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),Ce.cached[e]=void 0}))},withCached:(e,t)=>E(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===Ce.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof Ce.cached[e]&&(t(Ce.cached[e]),clearInterval(n))}),100)}));if("object"==typeof Ce.cached[e])return Ce.cached[e];Ce.cached[e]="waitingTheFirstResponse";try{const i=yield t();return Ce.cached[e]=i,setTimeout((()=>{Ce.cached[e]=void 0}),18e5),i}catch(t){return Ce.cached[e]=void 0,Promise.reject(t)}}))},we=(e,t)=>{const{subotApiUrl:i}=null==j?void 0:j.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+P(e,Object.assign({},t))},ke=e=>E(void 0,void 0,void 0,(function*(){try{return yield M(we(xe.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Se=e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},Ie=e=>E(void 0,void 0,void 0,(function*(){try{return yield Ce.withCached("SubotInlineFirstNode",(()=>E(void 0,void 0,void 0,(function*(){const t=yield M(we(xe.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Se(t),t}))))}catch(e){return null}})),Ne=e=>E(void 0,void 0,void 0,(function*(){try{return yield M(we(xe.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),_e=e=>E(void 0,void 0,void 0,(function*(){try{return yield M(we(xe.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),Oe=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],Te=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...Oe],Ae=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(Te.includes(i))if(Oe.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),Be=e=>[{id:F(),label:JSON.stringify({title:"",description:""}),type:u.SSO_INTENT,url:""},{id:F(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:u.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:F(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:u.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:F(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:u.SSO_INTENT,url:"/images/subot/shield.svg"}];function Pe(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const je=e=>R.parse(e||"")["hhg-id"]||T.get("hhg-id")||"",Me=e=>{if(e)return T.set("hhg-id",e),e;const t=je();if(t)return t;const i=F();return T.set("hhg-id",i),i},Re=e=>{const t=R.parse(e||"")[C]||T.get(C)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},Le=e=>{const t=R.parse(e||"")[C]||T.get(C)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},Ue=F(),De=()=>Ue,Fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${H?"":"discover."}${w[e]}`,He=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},ze=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},Ye=30,qe=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},Ge=(e,t,i,n)=>{const o=qe(e[0]);if(!t)return{};const a=e.findIndex((e=>e.id==t)),l=e.reduce(((e,l,r)=>{var s,d;if(r>a)return e;const c=l,u=i&&c.id===t?{action_id:i}:c._message;let p=0;const v=null===(s=c.actions)||void 0===s?void 0:s.find((e=>e.id===(null==u?void 0:u.action_id)));p+=(null==v?void 0:v.score)||0;const g=void 0!==o[c.id],b=i&&c.id===t?n:null==u?void 0:u.form_submit_meta;if(g&&c.type===m.FORM&&b){const e=o[c.id].action_id,t=null===(d=c.actions)||void 0===d?void 0:d.find((t=>t.id===e)),i=null==t?void 0:t.key,n=b.find((e=>e.key===i&&"number"===e.control));if(o[c.id].number&&["+","-","x","/"].includes(o[c.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[c.id].operator,i=o[c.id].number;let a=0;"+"===t&&(a=e+i),"-"===t&&(a=e-i),"x"===t&&(a=e*i),"/"===t&&(a=e/i),isNaN(a)||(p+=a)}}return e+p}),0);return{current_total_dynamic_score:l}},Ve=(e,t)=>{const i=qe(t[0]);if(0===Object.keys(i).length)return e;const n=t.filter((e=>e.type===m.FORM));return Object.keys(i).forEach((t=>{var o,a,l;const r=n.find((e=>e.id===t)),s=null===(o=null==r?void 0:r.actions)||void 0===o?void 0:o.find((e=>{var n;return e.id===(null===(n=i[t])||void 0===n?void 0:n.action_id)})),d=null==s?void 0:s.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===d&&"number"===e.control));if(i[t].number&&["+","-","x","/"].includes(i[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const n=Number(c.value),o=i[t].operator,a=i[t].number;let l=0;if("+"===o&&(l=n+a),"-"===o&&(l=n-a),"x"===o&&(l=n*a),"/"===o&&(l=n/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},Xe="other",Qe="stateInlineSSO",Ke=()=>{try{const e=window.next.router.components["/[...slug]"].props.pageProps;return"services-connection"===e.template?{project_id:"care-path",user_funnel:e.spotlight.additionalSlugActive||"",audience_name:e.spotlight.groupIdActive||""}:{}}catch(e){return{}}},We=e=>{const t=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,t)=>{var i,n,o,a,l,r,s,d,c,u,p,v,b,h,f,y,E,x,C,w,k;if(t.actions&&(null===(i=t._message)||void 0===i?void 0:i.action_id)&&(null===(n=t._message)||void 0===n?void 0:n.action_value)){const i=t._message.action_value;if(t.type===m.FORM){const i=["address","province","district","commune"],n=((null===(o=t._message)||void 0===o?void 0:o.form_submit_meta)||[]).filter((e=>!i.includes(e.control))),m=((null===(a=t._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>i.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(l=m.address)||void 0===l?void 0:l.value,null===(r=m.commune)||void 0===r?void 0:r.value,null===(s=m.district)||void 0===s?void 0:s.value,null===(d=m.province)||void 0===d?void 0:d.value].filter(Boolean).join(", ");p&&m.address?e.push({attribute:m.address.key,value:p,label_question:(null===(u=null===(c=t.intents)||void 0===c?void 0:c[0])||void 0===u?void 0:u.label)||""}):n.forEach((i=>{var n,o;e.push({attribute:i.key,value:i.value,label_question:(null===(o=null===(n=t.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(t.type===m.TEXT)if(t.is_multi_select){const i=Object.keys(t._message.selected_actions||{}),n=t.actions.filter((e=>e.label&&i.includes(e.id))).map((e=>e.label));i.length&&e.push({attribute:t.actions[0].key||"",value:n,label_question:(null===(v=null===(p=t.intents)||void 0===p?void 0:p[0])||void 0===v?void 0:v.label)||""})}else{const n=t._message.action_id,o=t.actions.find((e=>e.id===n)),a=null==o?void 0:o.label,l=null===(f=null===(h=null===(b=t._message)||void 0===b?void 0:b.form_submit_meta)||void 0===h?void 0:h.find((e=>e.key===Xe)))||void 0===f?void 0:f.value,r=(null==o?void 0:o.type)===g.USER_CHOICE_TEXT_BY_INPUT;a&&n&&e.push({attribute:i,value:r&&l?l:a,label_question:(null===(E=null===(y=t.intents)||void 0===y?void 0:y[0])||void 0===E?void 0:E.label)||""})}if(t.type===m.POLL){const i=t.id,n=(null===(C=null===(x=t._message)||void 0===x?void 0:x.current_polls)||void 0===C?void 0:C[i])||[],o=t.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:t.actions[0].key||"",value:o,label_question:(null===(k=null===(w=t.intents)||void 0===w?void 0:w[0])||void 0===k?void 0:k.label)||""})}}return e}),[]);return t},Je=(e,t)=>{var i;try{if("ACUVUE"!==(null===(i=t.extra_settings)||void 0===i?void 0:i.subot_type))return;let n="",o="",a="",l=Le().email;if((e||[]).forEach((e=>{var t,i,r;const s=e._message;if(!s)return;const d=null===(t=e.actions)||void 0===t?void 0:t.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?n=(null==d?void 0:d.label)||"":"voucher_color"===s.action_value&&(o=(null==d?void 0:d.label)||""),e.type===m.FORM){const e=null===(i=s.form_submit_meta)||void 0===i?void 0:i.find((e=>"voucher_size"===e.key)),t=null===(r=s.form_submit_meta)||void 0===r?void 0:r.find((e=>"email"===e.control));e&&(a=e.value),t&&(l=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===n&&l)return{email:l,voucherName:n};if(n&&o&&a&&l)return{email:l,voucherName:`${n}|${o}|${a}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},Ze=({nodes:e,activeId:t,params:i,accountIdFromLogs:n})=>E(void 0,void 0,void 0,(function*(){try{let o="in_progress";const a=e[e.length-1];(null==a?void 0:a.type)&&v.includes(a.type)&&(o="complete");const l=e.slice(1),r={activeId:t,params:i,nodes:l,tracking:Object.assign(Object.assign({},Ke()),{full_url:window.location.href}),unifiedAnswers:We(l),voucherAnswers:Je(l,e[0])},s={cookie_id:Me(),account_id:n||Re()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(r),status:o,type:"inline",market:k[L]};yield M(we(xe.POST_SUBOT_CREATE_LOG),"POST",{data:s})}catch(e){}})),$e=(e,t)=>{try{const[i,n,o]=z(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},et=t({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),tt=({children:t,articleLink:s,subotId:d,isFullContainer:c,bgColor:u,primaryColor:m,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})=>{const{formatMessage:h,action:{pushNotifications:f}}=i(U),y=n(null),C=n(null),[w,k]=o(!0),[N,_]=o(""),[O,A]=o([]),[B,P]=o(!1),[R,L]=o({});a((()=>{const e=u||"#e3f2ff",t=m||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=y.current,a=(new Date).getTime();o&&(Ee.mutate((()=>{o.style.setProperty("--subot-inline-bg-color",e),o.style.setProperty("--subot-inline-primary-color",t),o.style.setProperty("--subot-inline-primary-color-hover",$e(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",$e(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",$e(t,.3)||"#bcdeff")})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[u,m]);const D=l((()=>{const e=window.gaData,t=window.location.origin+S+("tl-PH"===(null==j?void 0:j.locale)?s.replace("fil/",""):s),i={bot_id:d,account_id:Re()||null,action_id:"",action_value:"",cookie_id:Me(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:T.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:t.replace("http://localhost:6006","https://discover.hellobacsi.com").replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover.").replace("staging.hellohealthgroup.com","discover.hellodoctor.com.ph").replace("https://hellohealthgroup.com","https://hellodoctor.com.ph"),window_id:De()};return Ae(i,null==j?void 0:j.router.query)}),[]),F=l((()=>{var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),H=l(((e,t=!0)=>E(void 0,void 0,void 0,(function*(){var i;if(!e||!e.url||!e.bot_id)return;let n="",o=[];k(!0);const a=yield Ie(e.bot_id);1===(null==a?void 0:a._status)&&(n=null==a?void 0:a._data.id.toString(),o.push(null==a?void 0:a._data,null==a?void 0:a._data.first_node));const l=t?yield(r=o[0],E(void 0,void 0,void 0,(function*(){var e,t;try{if(!r)return null;const i=yield M(we(xe.GET_SUBOT_LOG,{botId:r.id,cookieId:Me(),accountId:Re()||"",type:"inline"}),"GET");if(!(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.data)||"inline"!==(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.type))return null;const n=JSON.parse(i._data.data),o=n.nodes,a="in_progress"===i._data.status,l="complete"===i._data.status;return a||l?{nodes:[r,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:Re()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var r;l&&(o=l.nodes,n=l.activeId,C.current=(null===(i=l.params)||void 0===i?void 0:i.account_id)||0);const s=((e,{getParams:t})=>{try{if(!Re())return null;const i=JSON.parse(localStorage.getItem(Qe)||""),n=18e5;return(null==i?void 0:i.botId)===e&&i.listNodes&&i.activeId&&i.createdAt+n>Date.now()&&(localStorage.removeItem(Qe),i.listNodes.slice(-1)[0].position===p.SSO)?{listNodes:i.listNodes,activeId:i.activeId,params:Object.assign(Object.assign(Object.assign({},t()),i.params),{account_id:Re()||null,cookie_id:Me(i.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:D});if(s&&s.params.action_id&&s.params.action_value){const e=yield ke(s.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(n=null==e?void 0:e._data.node.id,o=s.listNodes,o[o.length-1]=null==e?void 0:e._data.node,Ze({nodes:o,activeId:n,params:s.params,accountIdFromLogs:C.current}),setTimeout((()=>{F()}),100))}const d=(null==s?void 0:s.params)||(null==l?void 0:l.params)||e,[c,u]=((e,t,i)=>{if(!(null==e?void 0:e.subot_field_type))return[t,i];const n=i.find((e=>e.id==t));return n&&n.hasOwnProperty("first_node")&&i.length>1?[i[1].id,i]:[t,i]})(o[0],n,o);k(!1),_(c),A(u),L(Object.assign(Object.assign({},e),d))}))),[]),z=l(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${d}"]`);i&&i.click();let n=N,o=[...O];if(null==t?void 0:t.node_id){const e=o.findIndex((({id:e})=>e==t.node_id));-1!==e&&(o[e]._message=Object.assign(Object.assign({},o[e]._message),t),o=[...o.slice(0,e+1)])}if(k(!0),e){const t=o.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)o=[...o,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},o[t]),e),{_message:Object.assign(Object.assign({},o[t]._message),null==e?void 0:e._message)});o=[...o.slice(0,t),Object.assign({},i),...o.slice(t+1)]}n=e.id}setTimeout((()=>{A(o),_(n),k(!1),Ze({nodes:o,activeId:n,params:R,accountIdFromLogs:C.current})}),250)}),[O,N]),Y=l((e=>E(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),Ge(O,N,e.action_id)),i=yield ke(t);if(k(!1),1===(null==i?void 0:i._status)){const e=null==i?void 0:i._data,{node:n}=e,o=x(e,["node"]),a=Object.assign(Object.assign({},n),{_message:Object.assign(Object.assign({},o),{node_id:n.id})});return void(-1!==O.findIndex((e=>e.id===a.id))?z(a):z(a,t))}f({title:h({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=O.find((e=>e.id==N));t&&t.hasOwnProperty("first_node")&&(_(O[1].id.toString()),Ze({nodes:O,activeId:O[1].id.toString(),params:D(),accountIdFromLogs:C.current}))}))),[z,O]),q=l((()=>{const e=O.findIndex((({id:e})=>e==N));if(e&&-1!==e&&e>1){const t=O[e-1];_(t.id),Ze({nodes:O,activeId:t.id,params:R,accountIdFromLogs:C.current})}}),[O,N]),G=l((()=>{const e=D();H(e,!1);const t=O[0],i=O[1];Ze({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:C.current})}),[D,H,O]),V=l((e=>{A((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==N?t.map((t=>{const i=t;return i.id===N?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[N]);a((()=>{if(T.get(I)){const e=D();H(e)}else Pe({condition:()=>Boolean(T.get(I)),finished:()=>{const e=D();H(e)}})}),[]),a((()=>{if(!O.length)return;O.find((e=>e.id==N))&&N||_(d+"")}),[N,O]);const X=r((()=>({activeId:N,params:R,listNodes:O,loading:w,setLoading:k,getParams:D,onNext:Y,onPrev:q,onSubmit:z,onStartOver:G,onChange:V,isShowFooter:B,setIsShowFooter:P,isFullContainer:c,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})),[N,Y,q,z,V,G,B,R,O,w,k,D,c,v,g,b]);return O.length?e.createElement(et.Provider,{value:X},e.createElement("div",{ref:y},t)):null},it=t=>e.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e.createElement("path",{d:"M5.99105 4.99067C5.79212 4.99072 5.59772 5.0501 5.43271 5.16121C5.2677 5.27233 5.13958 5.43013 5.06472 5.61444C4.98986 5.79875 4.97167 6.0012 5.01248 6.1959C5.05328 6.39061 5.15122 6.56872 5.29379 6.70747L10.5868 12.0004L5.29379 17.2934C5.19781 17.3855 5.12119 17.4959 5.0684 17.618C5.01562 17.7402 4.98773 17.8716 4.98638 18.0046C4.98503 18.1377 5.01023 18.2697 5.06052 18.3928C5.11081 18.516 5.18517 18.6279 5.27925 18.722C5.37333 18.8161 5.48523 18.8904 5.60841 18.9407C5.73159 18.991 5.86356 19.0162 5.9966 19.0149C6.12964 19.0135 6.26108 18.9856 6.38321 18.9328C6.50533 18.8801 6.6157 18.8034 6.70785 18.7075L12.0008 13.4145L17.2938 18.7075C17.3859 18.8034 17.4963 18.8801 17.6184 18.9328C17.7406 18.9856 17.872 19.0135 18.005 19.0149C18.1381 19.0162 18.27 18.991 18.3932 18.9407C18.5164 18.8904 18.6283 18.8161 18.7224 18.722C18.8165 18.6279 18.8908 18.516 18.9411 18.3928C18.9914 18.2697 19.0166 18.1377 19.0153 18.0047C19.0139 17.8716 18.986 17.7402 18.9332 17.618C18.8804 17.4959 18.8038 17.3855 18.7078 17.2934L13.4149 12.0004L18.7078 6.70747C18.8524 6.567 18.951 6.38616 18.991 6.18864C19.031 5.99112 19.0103 5.78614 18.9318 5.60055C18.8532 5.41497 18.7205 5.25744 18.5509 5.14861C18.3812 5.03978 18.1827 4.98473 17.9813 4.99067C17.7215 4.99841 17.4749 5.10699 17.2938 5.2934L12.0008 10.5864L6.70785 5.2934C6.61466 5.19761 6.50321 5.12146 6.3801 5.06947C6.25698 5.01747 6.1247 4.99068 5.99105 4.99067Z",fill:"#595959"})),nt="480px",ot=K.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
|
|
4
4
|
.si-inline-revamp-container {
|
package/build/esm/together.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{f as CardAuthor,C as CardLink,B as CardPost,D as CardPostPopoverMore,b as CardReactions,E as CardReply,F as CardReplyPopover,g as CreateNewPostContent,h as CreatePostDescription,i as CreatePostTitle,r as ImagePreviewPopup,I as InputCommentBar,d as LabelPin,L as LabelSortPin,e as LabelSorting,G as PopoverMenu,P as PopupDanger,k as PopupDoctor,j as PopupExpert,n as PopupFrame,l as PopupHospital,q as PostContent,v as PostImagePreview,s as PostSingleImageViewPopup,y as ProfileDetail,x as ProfileDetailModal,p as ShareBox,S as SharePopup,A as SkipQuestionOfExpertBtn,w as SocialLinkPreview,H as SourceList,o as SubmitReportForm,z as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,m as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-
|
|
1
|
+
export{f as CardAuthor,C as CardLink,B as CardPost,D as CardPostPopoverMore,b as CardReactions,E as CardReply,F as CardReplyPopover,g as CreateNewPostContent,h as CreatePostDescription,i as CreatePostTitle,r as ImagePreviewPopup,I as InputCommentBar,d as LabelPin,L as LabelSortPin,e as LabelSorting,G as PopoverMenu,P as PopupDanger,k as PopupDoctor,j as PopupExpert,n as PopupFrame,l as PopupHospital,q as PostContent,v as PostImagePreview,s as PostSingleImageViewPopup,y as ProfileDetail,x as ProfileDetailModal,p as ShareBox,S as SharePopup,A as SkipQuestionOfExpertBtn,w as SocialLinkPreview,H as SourceList,o as SubmitReportForm,z as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,m as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-de0e0789.js";export{d as TogetherDataTransforms,U as UserAvatar}from"./index-156081e2.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-ab3bd9a9.js";import"react";import"./index-b51813fe.js";import"./tslib.es6-c43c14a5.js";import"@mantine/core";import"./theme-0d3c8845.js";import"./useTranslations-49e0430f.js";import"./translationsContext-ee7ec6eb.js";import"string-format";import"./index-ac89ac70.js";import"styled-components";import"innertext";import"./index-924d8b45.js";import"@mantine/hooks";import"./index-9b020630.js";import"./index-fcb7c05d.js";import"date-fns/locale";import"./Subot-3d309d90.js";import"./isProduction-135c9280.js";import"dayjs";import"./utils-1550f4c2.js";import"@mantine/carousel";import"classnames";import"@mantine/dates";import"./index-d53f330a.js";import"./index.styles-f450b969.js";import"./constants-7f54318a.js";import"./animation-4d5baff8.js";import"react-keyed-flatten-children";import"./paths-61361575.js";import"./index-f09be292.js";import"lodash/debounce";import"react-contenteditable";import"./index-1fce73b8.js";import"./cookieHelper-0acd4fc8.js";import"react-dom";import"./number-73b198fe.js";import"date-fns";import"dayjs/plugin/relativeTime";import"./index-1d068cf5.js";import"./routing-fa27835c.js";import"./utils-bc76e7d8.js";import"./index.styled-222b6ef8.js";import"./index-5dc45c1c.js";import"slugify";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-c43c14a5.js";import t,{useState as i,useCallback as a,useMemo as o,useEffect as n,useRef as s,useReducer as l}from"react";import{u as r}from"./useTranslations-49e0430f.js";import c from"lodash/debounce";import{I as d,a as p,f as u,M as h,g,C as m}from"./constants-7f54318a.js";import{I as C}from"./index-f09be292.js";import b,{createGlobalStyle as y}from"styled-components";import{T as f,I as v}from"./index-b51813fe.js";import{t as x}from"./theme-0d3c8845.js";import S from"lodash/shuffle";import{a as E}from"./useOutsideClick-e4f22be5.js";import{M as w}from"./utils-1550f4c2.js";import L from"react-loading-skeleton";import{P as k}from"./paths-61361575.js";import{Skeleton as O,Input as j,Divider as I,Tabs as $,Flex as F,Button as M}from"@mantine/core";import{U as R,d as T}from"./index-fcb7c05d.js";import{g as P,s as N,d as A}from"./cookieHelper-0acd4fc8.js";import{C as B}from"./index-a6ddd645.js";import{C as D}from"./ChevronDown-7443ba17.js";import V from"string-format";function K(){const[e,t]=i((()=>{if("undefined"==typeof window)return"unset";if(P(R))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[n,s]=i((()=>{if("undefined"==typeof window)return null;const e=P(R);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=a((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const i={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};N(R,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{A(R),t("denied")}))}),[]);return o((()=>({geoLocationPermission:e,geoLocationCoordinates:n,requestGeoLocation:l})),[e,n])}const z=b.div``,_=b.div`
|
|
2
2
|
--searchbar-z-index: 305;
|
|
3
3
|
&[data-is-modal='true'] {
|
|
4
4
|
position: fixed;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as e from"react";import t,{createContext as a,useContext as o,useState as n,useRef as i,useEffect as l,useMemo as r,useCallback as s}from"react";import{T as c,H as d,I as m,a as p,A as u,P as g,C as v,b as h}from"./index-
|
|
1
|
+
import*as e from"react";import t,{createContext as a,useContext as o,useState as n,useRef as i,useEffect as l,useMemo as r,useCallback as s}from"react";import{T as c,H as d,I as m,a as p,A as u,P as g,C as v,b as h}from"./index-b51813fe.js";import"./translationsContext-ee7ec6eb.js";import"string-format";import{T as b,B as f,g as y,b as w,d as x,P as E,e as C,f as k,h as N,C as A,i as T,j as z,k as P,l as I,m as S,A as L,n as M,o as j,M as B,p as F,R as O,q as R,r as V}from"./utils-ab3bd9a9.js";import{a as D,_ as U}from"./tslib.es6-c43c14a5.js";import{useMantineTheme as W,createStyles as H,Flex as Z,Box as q,rem as _,Checkbox as G,Portal as Q,Anchor as X,Accordion as K,Popover as $}from"@mantine/core";import{D as Y}from"./index-ac89ac70.js";import{u as J,b as ee}from"./useTranslations-49e0430f.js";import te from"innertext";import{t as ae}from"./theme-0d3c8845.js";import{I as oe,u as ne,B as ie,A as le,a as re,T as se}from"./index-924d8b45.js";import"@mantine/dates";import{D as ce,d as de}from"./index-fcb7c05d.js";import{L as me}from"./Subot-3d309d90.js";import{C as pe}from"./index-9b020630.js";import"@mantine/hooks";import{A as ue,a as ge,B as ve,D as he}from"./index-d53f330a.js";import{U as be,f as fe,a as ye,P as we,b as xe,c as Ee,e as Ce,g as ke}from"./index-156081e2.js";import{I as Ne}from"./index-f09be292.js";import Ae from"lodash/debounce";import Te from"react-contenteditable";import{B as ze}from"./index-1fce73b8.js";import{H as Pe,g as Ie}from"./index.styles-f450b969.js";import{d as Se,g as Le}from"./cookieHelper-0acd4fc8.js";import{M as Me,t as je,c as Be,a as Fe}from"./utils-1550f4c2.js";import*as Oe from"react-dom";import Re,{keyframes as Ve}from"styled-components";import{a as De}from"./number-73b198fe.js";import{format as Ue}from"date-fns";import We from"dayjs";import He from"dayjs/plugin/relativeTime";import{M as Ze}from"./index-1d068cf5.js";import{g as qe}from"./routing-fa27835c.js";import"./constants-7f54318a.js";import"./utils-bc76e7d8.js";import"./index.styled-222b6ef8.js";import"./index-5dc45c1c.js";const _e=t=>e.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},t),e.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),Ge=a({}),Qe=({children:e,defaultParams:a})=>t.createElement(Ge.Provider,{value:{defaultParams:a}},e),Xe=e=>{const{data:{userInfo:t,env:{togetherBasePath:a}}}=o(b),{defaultParams:n}=o(Ge)||{},i=null==t?void 0:t.id,l=t&&"number"==typeof t.communities_interacted&&0===t.communities_interacted;return{authActionWrapper:(t,o)=>{const r=Object.assign(Object.assign(Object.assign({},n),e),o);if(!i||l){i||Se(f),(null==r?void 0:r._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(r._joinCommunityIds).filter(Boolean))))),null==r||delete r._joinCommunityIds),(null==r?void 0:r._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(r._joinTopicIds).filter(Boolean))))),null==r||delete r._joinTopicIds);const e=(null==r?void 0:r._location)||window.location.href;return null==r||delete r._location,window.location.href=y(e,r,a),null}return t&&t()},params:Object.assign(Object.assign({},n),e)}},Ke=Re.div`
|
|
2
2
|
.link-info-container {
|
|
3
3
|
padding: 0.5rem 1rem;
|
|
4
4
|
background: ${e=>e.color||"#f4faff"};
|
package/build/esm/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,E as ELEMENT_CONTROL_INPUT_TYPE,F as FULL_KEY_ADDRESS,G as Gender,L as LOCALE,f as NodeActionType,d as NodeFinalTypes,e as NodeIntentType,g as NodeMultipleOptions,N as NodePosition,c as NodeType,O as OnboardingStep,S as SubotType}from"./Subot-
|
|
1
|
+
export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,E as ELEMENT_CONTROL_INPUT_TYPE,F as FULL_KEY_ADDRESS,G as Gender,L as LOCALE,f as NodeActionType,d as NodeFinalTypes,e as NodeIntentType,g as NodeMultipleOptions,N as NodePosition,c as NodeType,O as OnboardingStep,S as SubotType}from"./Subot-3d309d90.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-c43c14a5.js";import{useRef as a,useEffect as n,useState as t,useCallback as i,useMemo as l}from"react";import{g as s}from"./cookieHelper-0acd4fc8.js";import{a as b,u as r}from"./useTranslations-49e0430f.js";import{L as h}from"./Subot-3d309d90.js";function o(e){const a=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",a).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const u=t=>{const i=a("");n((()=>(e(void 0,void 0,void 0,(function*(){var e,a,n,l,b;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(a=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===a||a.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(n=i.current)||void 0===n?void 0:n.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==t?void 0:t.id){const[e,a,n,i,r,h]=yield Promise.all([t.email?o(t.email):null,t.phone?o(t.phone):null,t.birthday?o(t.birthday.split("-").join("")):null,t.gender?"m":"f",t.city_name?o(t.city_name).then((e=>e.replace(/\s/g,""))):null,t.name?o(t.name):null]);s("_fbc"),s("_fbp");const u={user_id:t.id};h&&(u.fn=h),e&&(u.em=e),a&&(u.ph=a),n&&(u.db=n),r&&(u.ct=r),null===(b=null===(l=window.localStorage)||void 0===l?void 0:l.setItem)||void 0===b||b.call(l,"fbDataLayer_userInfo",JSON.stringify(u))}})),()=>{})),[t])},c=e=>{const n=a(),t=a(e);return b()||t.current===e||(n.current=t.current,t.current=e),n.current},g=e=>{const[l,s]=t(e),b=a(0),r=i((e=>{cancelAnimationFrame(b.current),b.current=requestAnimationFrame((()=>{s(e)}))}),[]);return n((()=>()=>cancelAnimationFrame(b.current))),[l,r]},d={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},p={[h.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[h.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[h.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[h.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[h.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};const m=e=>{const{locale:a}=r();return{isPregnancy:l((()=>decodeURI(e.replace(/\//gi,"")).includes(d[a])),[]),isParenting:l((()=>{var n;return decodeURI(e.replace(/\//gi,"")).includes(null===(n=p[a])||void 0===n?void 0:n.parenting)}),[]),type:l((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(e,p[a])),[e,a])}};export{p as M,d as P,c as a,g as b,m as c,u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./tslib.es6-c43c14a5.js";import{useState as t,useEffect as i,useCallback as a}from"react";import{a as l}from"./getDynamicHealthTool-4d3d11ac.js";const n=n=>{const[r,e]=t([]);i((()=>{o(void 0,void 0,void 0,(function*(){const o=yield l(n);e(o)}))}),[l,n]);const s=a((o=>{var t;return(null===(t=r.find((t=>t.template===o)))||void 0===t?void 0:t.link)||""}),[r]);return{allTools:r,getHealthToolLink:s}};export{n as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-c43c14a5.js";import{useState as i,useEffect as t}from"react";const o="undefined"==typeof window,n={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},r="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",c=(r="",c="",s="",a=500)=>{const[d,l]=i([]),[p,u]=i(!1);return t((()=>{let i;return r?i=window.setTimeout((()=>e(void 0,void 0,void 0,(function*(){var i;if(r)try{u(!0);const t=yield((i="",t="",r="vi")=>e(void 0,void 0,void 0,(function*(){return new Promise(((e,c)=>{if(!i)return c("Need valid text input");if(o)return c("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:i},t?{componentRestrictions:{country:t}}:{}),{language:n[r]}),e)}catch(e){c(e)}}))})))(r,c,s);l(!(i=t)||i.length<1?[]:i.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{u(!1)}else l([])}))),a):d.length&&l([]),()=>{window.clearTimeout(i)}}),[r,a,c]),{isLoading:p,predictions:d}};export{r as G,n as a,c as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as r,useContext as e,useMemo as t}from"react";import{T as n}from"./translationsContext-ee7ec6eb.js";import o from"string-format";const a=()=>{const e=r(!0);return!!e.current&&(e.current=!1,!0)};let s=0;const l=()=>{const e=r("");return a()&&(s+=1,e.current=`hhg-gen-id${s}`),e.current};function c(){const{values:r,locale:a}=e(n)||{locale:"en-PH"};return t((()=>({t:(e,t)=>r?r[e]?t?o(r[e]||e,t):r[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${a}`),t?o(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:a})),[r,a])}export{a,l as b,c as u};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-c43c14a5.js";import{g as t}from"./cookieHelper-0acd4fc8.js";import r from"slugify";import"./index-fcb7c05d.js";import o from"string-format";import a,{createContext as i,useState as s,useEffect as l}from"react";import{i as n}from"./isProduction-135c9280.js";
|
|
2
2
|
/*!
|
|
3
3
|
* cookie
|
|
4
4
|
* Copyright(c) 2012-2014 Roman Shtylman
|
|
5
5
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
6
6
|
* MIT Licensed
|
|
7
|
-
*/var _=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},o=(t||{}).decode||d,a=0;for(;a<e.length;){var i=e.indexOf("=",a);if(-1===i)break;var s=e.indexOf(";",a);if(-1===s)s=e.length;else if(s<i){a=e.lastIndexOf(";",i-1)+1;continue}var l=e.slice(a,i).trim();if(void 0===r[l]){var n=e.slice(i+1,s).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1)),r[l]=T(n,o)}a=s+1}return r},c=function(e,t,r){var o=r||{},a=o.encode||p;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!E.test(e))throw new TypeError("argument name is invalid");var i=a(t);if(i&&!E.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(l)}if(o.domain){if(!E.test(o.domain))throw new TypeError("option domain is invalid");s+="; Domain="+o.domain}if(o.path){if(!E.test(o.path))throw new TypeError("option path is invalid");s+="; Path="+o.path}if(o.expires){var n=o.expires;if(!function(e){return"[object Date]"===u.call(e)||e instanceof Date}(n)||isNaN(n.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.toUTCString()}o.httpOnly&&(s+="; HttpOnly");o.secure&&(s+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},u=Object.prototype.toString,E=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function d(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function p(e){return encodeURIComponent(e)}function T(e,t){try{return t(e)}catch(t){return e}}var m={parse:_,serialize:c};const O={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"},HEALTH_TOOL:{CREATE:"health-profile/{type}/create?website_url={website_url}",GET_STATUS:"health-profile/get-status-for-user?website_url={website_url}"}},b={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},h={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},A={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},g={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},v=i({data:g,action:{pushNotifications:e=>e,sanitizeFunction:e=>e},formatMessage:()=>null});let I=g;const L=({locale:e="vi-VN",children:t,userInfo:r,router:o,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:n=(e=>e),pushNotifications:_=(()=>!1),formatMessage:c})=>{const[u,E]=s();return I={userInfo:r,locale:e,togetherUserId:u,router:o,env:i},l((()=>{(null==r?void 0:r.id)&&Q(V(O.PROFILE,{_locale:e}),"GET").then((e=>{var t;E(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==r?void 0:r.id]),a.createElement(v.Provider,{value:{data:{userInfo:r,locale:e,togetherUserId:u,router:o,env:i},action:{pushNotifications:_,sanitizeFunction:n},formatMessage:c}},t)},S="DD/MM/YYYY",w="/images/avatar.jpg",R="/images/default-image.jpg",y={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},f={"id-ID":{"kalkulator-bmi":y.BMI,"kebutuhan-kalori":y.BMR,"kalkulator-hari-perkiraan-lahir":y.DUE_DATE,"kalkulator-masa-subur-2":y.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":y.PWG,"kalkulator-detak-jantung-saat-olahraga":y.THR},"ms-MY":{"kalkulator-bmi":y.BMI,"kalkulator-bmr":y.BMR,"kalkulator-tarikh-bersalin":y.DUE_DATE,"kalkulator-kesuburan":y.OVULATION,"kalkulator-tambah-berat-badan-hamil":y.PWG,"target-heart-rate-calculator":y.THR},"vi-VN":{"cach-tinh-chi-so-bmi":y.BMI,"tinh-chi-so-bmr":y.BMR,"cong-cu-tinh-ngay-du-sinh":y.DUE_DATE,"tinh-ngay-rung-trung":y.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":y.PWG,"cong-cu-do-nhip-tim":y.THR},"zh-TW":{"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"due-date-calculator":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnancy-weight-gain-calculator":y.PWG,"target-heart-rate-calculator":y.THR},"en-PH":{"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"due-date-calculator":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnancy-weight-gain-calculator":y.PWG,"target-heart-rate-calculator":y.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":y.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":y.BMR,"เครื่องมือคำนวณกำหนดคลอด":y.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":y.OVULATION,"เครื่องคำนวณน้ำหนักตัว":y.PWG,"เครื่องวัดอัตราการเต้น":y.THR},"hi-IN":{"bmi-calculator-en":y.BMI,"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"delivery-date-calculator":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnancy-weight-gain-calculator":y.PWG,"target-heart-rate-calculator":y.THR},"km-KH":{"គណនា-bmi":y.BMI,"គណនា-bmr":y.BMR,"គណនាថ្ងៃសម្រាលកូន":y.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":y.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":y.PWG,"គណនារកចង្វាក់បេះដូងល្អ":y.THR},"my-MM":{"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"due-date-calendar":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnaancy-weight-calculator":y.PWG,"target-heartrate":y.THR,"pregnancy-weight-calculator":y.PWG,"target-heart-rate":y.THR}},P="hhg_user_token",D="together_admin_token",G={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},N="hhg-id",C={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},M=20,U={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}};var k=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:S,DEFAULT_AVATAR_IMG:w,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:R,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:y,LOCALE_HEALTH_TOOLS:f,BEARER_TOKEN_COOKIE:P,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:D,Z_INDEX:G,BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:N,GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:C,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:U});const B={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},H={"vi-VN":"marrybaby.vn"},x=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",F=e=>{const{env:{isMarryBaby:t}}=I;return`https://${t?H[e]:B[e]}`},j=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},K=e=>{const{env:{isMarryBaby:t}}=I;if("undefined"!=typeof window)return window.location.origin;const r="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${r?t?"fe.":"discover.":t?"www.":""}${B[e]}`},V=(e,t,r,a)=>{let i="";r&&(i=Object.keys(r).map((e=>e+"="+r[e])).join("&"));const{togetherBaseApiUrl:s=""}=(null==I?void 0:I.env)||{};let l=o(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:F(String(t._locale))}:{}),t));l+=`${l.includes("?")?"&":"?"}${i}`;return(a||s)+"api/v1/"+j(l)},Y=(e,t,r)=>{const{discoverBaseApiUrl:a="",discoverBaseProdApiUrl:i=""}=(null==I?void 0:I.env)||{};return(!n&&r?i:a)+"wp-json/api/"+j(o(e,Object.assign({},t)))},W=(e,t,r)=>{const{marryBabyApiUrl:a="",marryBabyProdApiUrl:i=""}=(null==I?void 0:I.env)||{};return(r&&!n?i:a)+"wp-json/api/"+j(o(e,Object.assign({},t)))},$=(e,t)=>{const{careBaseApiUrl:r=""}=(null==I?void 0:I.env)||{};return(r||"https://service-health-care.hellohealthgroup.com/")+j(o(e,Object.assign({},t)))},X=(e,t)=>{const{premiumBaseApiUrl:r=""}=(null==I?void 0:I.env)||{};return(r||"https://premium-content-stag.hellohealthgroup.com/")+j(o(e,Object.assign({},t)))},z=(e,t)=>{const{publicSSO:r=""}=(null==I?void 0:I.env)||{};return(r||"https://staging-id.hellobacsi.com/")+"api/"+j(o(e,Object.assign({},t)))},q=e=>((null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e),Z=(t,r,o,a=!1)=>e(void 0,void 0,void 0,(function*(){var e,i,s,l;try{const e=yield fetch(a?t:(l=t,encodeURI(l).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:r},q(o)),{headers:Object.assign({},null==o?void 0:o.headers)})).then((e=>e.json()));if(e)return e}catch(r){return console.log(r),console.log({url:t,status:null===(e=null==r?void 0:r.response)||void 0===e?void 0:e.status,statusText:null===(i=null==r?void 0:r.response)||void 0===i?void 0:i.statusText}),(null===(s=null==r?void 0:r.response)||void 0===s?void 0:s.data)||null}return null})),J=(r,o="GET",a,i)=>e(void 0,void 0,void 0,(function*(){var e,s,l,n,_,c;try{const n="string"==typeof r?r:r.url,_="string"==typeof r?r:r.backupUrl,c=m.parse(i||""),u=c[P]||t(P);if(!u||!u.length)return Z(_||n,o,a);try{const t=yield fetch(n,Object.assign(Object.assign({method:o},q(a)),{headers:Object.assign({Authorization:"Bearer "+u},null==a?void 0:a.headers)})).then((e=>e.json()));if(null===(e=null==t?void 0:t.messages)||void 0===e?void 0:e.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return Z(_||n,o,a);if(t)return t}catch(e){return console.log({status:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.status,statusText:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.statusText}),Z(_||n,o,a)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(_=null==e?void 0:e.response)||void 0===_?void 0:_.statusText}),(null===(c=null==e?void 0:e.response)||void 0===c?void 0:c.data)||null}return null})),Q=(r,o,a,i)=>e(void 0,void 0,void 0,(function*(){try{const e=m.parse(i||""),s=e[P]||t(P);if(s&&s.length){const e=yield fetch(r,Object.assign(Object.assign({method:o},q(a)),{headers:Object.assign({Authorization:"Bearer "+s},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null})),ee=(r,o,a,i)=>e(void 0,void 0,void 0,(function*(){try{const e=m.parse(i||""),s=e[D]||t(D);if(s&&s.length){const e=yield fetch(r,Object.assign(Object.assign({method:o},q(a)),{headers:Object.assign({Authorization:"Bearer "+s},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null}));function te(e,t,r){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+r+"$2"):e+a+t+"="+r}const re=(e,t,r="/community")=>{const o=e||("undefined"!=typeof window?window.location.href:"/");let a="undefined"!=typeof window?window.location.origin:"";a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:r}=I.env,o=e||window.location.href;return t&&Object.keys(t).map((e=>{te(o,e,t[e])})),te(o,"source","communities"),r?`${r}?returnUrl=${encodeURIComponent(o.toString())}`:o})(`${a}${r}/on-boarding?return=${encodeURIComponent(o)}`,t)},oe=(e,t,o,a)=>o&&t?`${o}-${t}`:`${r(e||"",{lower:!0,locale:a||x})}-${t}`,ae=({name:e,id:t,locale:r})=>{var o;return`/care/${null===(o=U[r||"vi-VN"])||void 0===o?void 0:o.DOCTOR}/${oe(e,t)}`},ie=({name:e,id:t,slug:r,locale:o})=>{var a;return`/care/${null===(a=U[o||"vi-VN"])||void 0===a?void 0:a.HOSPITAL}/${oe(e,t,r)}`};export{A,P as B,b as C,g as D,I as G,y as H,N as L,M,O as P,C as R,v as T,G as Z,L as a,Z as b,k as c,V as d,R as e,K as f,re as g,$ as h,B as i,ie as j,ae as k,Y as l,h as m,ee as n,Q as o,w as p,W as q,J as r,S as s,X as t,F as u,z as v,H as w,m as x,x as y};
|
|
7
|
+
*/var _=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},o=(t||{}).decode||E,a=0;for(;a<e.length;){var i=e.indexOf("=",a);if(-1===i)break;var s=e.indexOf(";",a);if(-1===s)s=e.length;else if(s<i){a=e.lastIndexOf(";",i-1)+1;continue}var l=e.slice(a,i).trim();if(void 0===r[l]){var n=e.slice(i+1,s).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1)),r[l]=T(n,o)}a=s+1}return r},c=function(e,t,r){var o=r||{},a=o.encode||p;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!d.test(e))throw new TypeError("argument name is invalid");var i=a(t);if(i&&!d.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(l)}if(o.domain){if(!d.test(o.domain))throw new TypeError("option domain is invalid");s+="; Domain="+o.domain}if(o.path){if(!d.test(o.path))throw new TypeError("option path is invalid");s+="; Path="+o.path}if(o.expires){var n=o.expires;if(!function(e){return"[object Date]"===u.call(e)||e instanceof Date}(n)||isNaN(n.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.toUTCString()}o.httpOnly&&(s+="; HttpOnly");o.secure&&(s+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},u=Object.prototype.toString,d=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function E(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function p(e){return encodeURIComponent(e)}function T(e,t){try{return t(e)}catch(t){return e}}var m={parse:_,serialize:c};const O={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"},HEALTH_TOOL:{CREATE:"health-profile/{type}/create?website_url={website_url}",GET_STATUS:"health-profile/get-status-for-user?website_url={website_url}"}},h={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},b={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},A={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},g={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},v=i({data:g,action:{pushNotifications:e=>e,sanitizeFunction:e=>e},formatMessage:()=>null});let I=g;const L=({locale:e="vi-VN",children:t,userInfo:r,router:o,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:n=(e=>e),pushNotifications:_=(()=>!1),formatMessage:c})=>{const[u,d]=s();return I={userInfo:r,locale:e,togetherUserId:u,router:o,env:i},l((()=>{(null==r?void 0:r.id)&&Q(V(O.PROFILE,{_locale:e}),"GET").then((e=>{var t;d(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==r?void 0:r.id]),a.createElement(v.Provider,{value:{data:{userInfo:r,locale:e,togetherUserId:u,router:o,env:i},action:{pushNotifications:_,sanitizeFunction:n},formatMessage:c}},t)},S="DD/MM/YYYY",w="/images/avatar.jpg",R="/images/default-image.jpg",y={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},f={"id-ID":{"kalkulator-bmi":y.BMI,"kebutuhan-kalori":y.BMR,"kalkulator-hari-perkiraan-lahir":y.DUE_DATE,"kalkulator-masa-subur-2":y.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":y.PWG,"kalkulator-detak-jantung-saat-olahraga":y.THR},"ms-MY":{"kalkulator-bmi":y.BMI,"kalkulator-bmr":y.BMR,"kalkulator-tarikh-bersalin":y.DUE_DATE,"kalkulator-kesuburan":y.OVULATION,"kalkulator-tambah-berat-badan-hamil":y.PWG,"target-heart-rate-calculator":y.THR},"vi-VN":{"cach-tinh-chi-so-bmi":y.BMI,"tinh-chi-so-bmr":y.BMR,"cong-cu-tinh-ngay-du-sinh":y.DUE_DATE,"tinh-ngay-rung-trung":y.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":y.PWG,"cong-cu-do-nhip-tim":y.THR},"zh-TW":{"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"due-date-calculator":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnancy-weight-gain-calculator":y.PWG,"target-heart-rate-calculator":y.THR},"en-PH":{"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"due-date-calculator":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnancy-weight-gain-calculator":y.PWG,"target-heart-rate-calculator":y.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":y.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":y.BMR,"เครื่องมือคำนวณกำหนดคลอด":y.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":y.OVULATION,"เครื่องคำนวณน้ำหนักตัว":y.PWG,"เครื่องวัดอัตราการเต้น":y.THR},"hi-IN":{"bmi-calculator-en":y.BMI,"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"delivery-date-calculator":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnancy-weight-gain-calculator":y.PWG,"target-heart-rate-calculator":y.THR},"km-KH":{"គណនា-bmi":y.BMI,"គណនា-bmr":y.BMR,"គណនាថ្ងៃសម្រាលកូន":y.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":y.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":y.PWG,"គណនារកចង្វាក់បេះដូងល្អ":y.THR},"my-MM":{"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"due-date-calendar":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnaancy-weight-calculator":y.PWG,"target-heartrate":y.THR,"pregnancy-weight-calculator":y.PWG,"target-heart-rate":y.THR}},P="hhg_user_token",D="together_admin_token",G={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},N="hhg-id",C={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},M=20,U={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}};var k=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:S,DEFAULT_AVATAR_IMG:w,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:R,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:y,LOCALE_HEALTH_TOOLS:f,BEARER_TOKEN_COOKIE:P,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:D,Z_INDEX:G,BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:N,GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:C,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:U});const B={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},H={"vi-VN":"marrybaby.vn"},x=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",F=e=>{const{env:{isMarryBaby:t}}=I;return`https://${t?H[e]:B[e]}`},j=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},K=e=>{const{env:{isMarryBaby:t}}=I;if("undefined"!=typeof window)return window.location.origin;const r="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${r?t?"fe.":"discover.":t?"www.":""}${B[e]}`},V=(e,t,r,a)=>{let i="";r&&(i=Object.keys(r).map((e=>e+"="+r[e])).join("&"));const{togetherBaseApiUrl:s=""}=(null==I?void 0:I.env)||{};let l=o(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:F(String(t._locale))}:{}),t));l+=`${l.includes("?")?"&":"?"}${i}`;return(a||s)+"api/v1/"+j(l)},Y=(e,t,r)=>{const{discoverBaseApiUrl:a="",discoverBaseProdApiUrl:i=""}=(null==I?void 0:I.env)||{};return(!n&&r?i:a)+"wp-json/api/"+j(o(e,Object.assign({},t)))},W=(e,t,r)=>{const{marryBabyApiUrl:a="",marryBabyProdApiUrl:i=""}=(null==I?void 0:I.env)||{};return(r&&!n?i:a)+"wp-json/api/"+j(o(e,Object.assign({},t)))},$=(e,t)=>{const{careBaseApiUrl:r=""}=(null==I?void 0:I.env)||{};return(r||"https://service-health-care.hellohealthgroup.com/")+j(o(e,Object.assign({},t)))},X=(e,t)=>{const{premiumBaseApiUrl:r=""}=(null==I?void 0:I.env)||{};return(r||"https://premium-content-stag.hellohealthgroup.com/")+j(o(e,Object.assign({},t)))},z=(e,t)=>{const{publicSSO:r=""}=(null==I?void 0:I.env)||{};return(r||"https://staging-id.hellobacsi.com/")+"api/"+j(o(e,Object.assign({},t)))},q=e=>((null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e),Z=(t,r,o,a=!1)=>e(void 0,void 0,void 0,(function*(){var e,i,s,l;try{const e=yield fetch(a?t:(l=t,encodeURI(l).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:r},q(o)),{headers:Object.assign({},null==o?void 0:o.headers)})).then((e=>e.json()));if(e)return e}catch(r){return console.log(r),console.log({url:t,status:null===(e=null==r?void 0:r.response)||void 0===e?void 0:e.status,statusText:null===(i=null==r?void 0:r.response)||void 0===i?void 0:i.statusText}),(null===(s=null==r?void 0:r.response)||void 0===s?void 0:s.data)||null}return null})),J=(r,o="GET",a,i)=>e(void 0,void 0,void 0,(function*(){var e,s,l,n,_,c;try{const n="string"==typeof r?r:r.url,_="string"==typeof r?r:r.backupUrl,c=m.parse(i||""),u=c[P]||t(P);if(!u||!u.length)return Z(_||n,o,a);try{const t=yield fetch(n,Object.assign(Object.assign({method:o},q(a)),{headers:Object.assign({Authorization:"Bearer "+u},null==a?void 0:a.headers)})).then((e=>e.json()));if(null===(e=null==t?void 0:t.messages)||void 0===e?void 0:e.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return Z(_||n,o,a);if(t)return t}catch(e){return console.log({status:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.status,statusText:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.statusText}),Z(_||n,o,a)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(_=null==e?void 0:e.response)||void 0===_?void 0:_.statusText}),(null===(c=null==e?void 0:e.response)||void 0===c?void 0:c.data)||null}return null})),Q=(r,o,a,i)=>e(void 0,void 0,void 0,(function*(){try{const e=m.parse(i||""),s=e[P]||t(P);if(s&&s.length){const e=yield fetch(r,Object.assign(Object.assign({method:o},q(a)),{headers:Object.assign({Authorization:"Bearer "+s},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null})),ee=(r,o,a,i)=>e(void 0,void 0,void 0,(function*(){try{const e=m.parse(i||""),s=e[D]||t(D);if(s&&s.length){const e=yield fetch(r,Object.assign(Object.assign({method:o},q(a)),{headers:Object.assign({Authorization:"Bearer "+s},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null}));function te(e,t,r){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+r+"$2"):e+a+t+"="+r}const re=(e,t,r="/community")=>{const o=e||("undefined"!=typeof window?window.location.href:"/");let a="undefined"!=typeof window?window.location.origin:"";a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:r}=I.env,o=e||window.location.href;return t&&Object.keys(t).map((e=>{te(o,e,t[e])})),te(o,"source","communities"),r?`${r}?returnUrl=${encodeURIComponent(o.toString())}`:o})(`${a}${r}/on-boarding?return=${encodeURIComponent(o)}`,t)},oe=(e,t,o,a)=>o&&t?`${o}-${t}`:`${r(e||"",{lower:!0,locale:a||x})}-${t}`,ae=({name:e,id:t,locale:r})=>{var o;return`/care/${null===(o=U[r||"vi-VN"])||void 0===o?void 0:o.DOCTOR}/${oe(e,t)}`},ie=({name:e,id:t,slug:r,locale:o})=>{var a;return`/care/${null===(a=U[o||"vi-VN"])||void 0===a?void 0:a.HOSPITAL}/${oe(e,t,r)}`};export{A,P as B,h as C,g as D,I as G,y as H,N as L,M,O as P,C as R,v as T,G as Z,L as a,Z as b,k as c,V as d,R as e,K as f,re as g,$ as h,B as i,ie as j,ae as k,Y as l,b as m,ee as n,Q as o,w as p,W as q,J as r,S as s,X as t,F as u,z as v,H as w,m as x,x as y};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as t}from"./utils-
|
|
1
|
+
import{M as t}from"./utils-1550f4c2.js";import e from"styled-components";import a,{memo as o,useMemo as s}from"react";import{C as n}from"./index-9b020630.js";import{I as r}from"./index-924d8b45.js";import{L as l}from"./Subot-3d309d90.js";const h=e.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as a}from"./Subot-
|
|
1
|
+
import{L as a}from"./Subot-3d309d90.js";const i={[a.Vietnam]:"VN",[a.Cambodia]:"KH",[a.Indonesia]:"ID",[a.Malaysia]:"MY",[a.PhilippinesEnglish]:"PH",[a.PhilippinesTagalog]:"PH",[a.Taiwan]:"TW",[a.Thailand]:"TH",[a.Myanmar]:"MM"},n=(a="")=>{const i=a.indexOf("@"),n=a.substring(0,i),s=n.length>3?3:n.length;return a.replace(a.substring(s,i),a.slice(s,i).replace(/./g,"x"))};export{i as M,n as h};
|