@hhgtech/hhg-components 1.27.78 → 1.27.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/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.js +1 -1
- package/build/core-ed3c3eae.js +1 -0
- package/build/{dataTransform-e059c212.js → dataTransform-2507d7ba.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.js +1 -1
- package/build/esm/{core-44c4d5a7.js → core-ebbc89fe.js} +1 -1
- package/build/esm/{dataTransform-3ad49c0d.js → dataTransform-245daba3.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/{fixedBottomAdBlock-f9f4497f.js → fixedBottomAdBlock-0fe4f3db.js} +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/getDynamicHealthTool-f974ef80.js +1 -0
- package/build/esm/{getSocialList-26f09669.js → getSocialList-f9f7ff33.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-31476649.js → index-0619ee9f.js} +1 -1
- package/build/esm/{index-42f49dee.js → index-0ca7274b.js} +1 -1
- package/build/esm/{index-91137710.js → index-2622672d.js} +1 -1
- package/build/esm/{index-0a6fa4cc.js → index-3424374c.js} +2 -2
- package/build/esm/{index-80186250.js → index-548b9603.js} +1 -1
- package/build/esm/{index-27b659b0.js → index-635f7e1e.js} +1 -1
- package/build/esm/{index-d3af565f.js → index-6776c88d.js} +1 -1
- package/build/esm/index-6d6b668d.js +1 -0
- package/build/esm/{index-9b827592.js → index-820ae7d8.js} +1 -1
- package/build/esm/{index-de89c6d8.js → index-971b6660.js} +1 -1
- package/build/esm/{index-380302d6.js → index-abfa12bd.js} +1 -1
- package/build/esm/{index-251ac76a.js → index-af288c07.js} +1 -1
- package/build/esm/{index-0ec9b0bd.js → index-b5d87c62.js} +2 -2
- package/build/esm/{index-6df4978c.js → index-bd6a4ca0.js} +1 -1
- package/build/esm/{index-e48fba27.js → index-c126b1e9.js} +1 -1
- package/build/esm/{index-a1d0e05c.js → index-c1a317b2.js} +1 -1
- package/build/esm/{index-03981da2.js → index-c7064d04.js} +1 -1
- package/build/esm/{index-f50ae417.js → index-d671ac3c.js} +1 -1
- package/build/esm/{index-a13d5bc0.js → index-e7a3d796.js} +1 -1
- package/build/esm/{index-3d8a6f49.js → index-ee126b98.js} +1 -1
- package/build/esm/index-f935423b.js +1 -0
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-74e10a26.js → index.styled-069c7b3e.js} +1 -1
- package/build/esm/{index.styled-4c6e37b0.js → index.styled-1a30c95e.js} +4 -4
- package/build/esm/{index.styled-82196312.js → index.styled-2b748a10.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/onboarding.js +1 -1
- package/build/esm/onboardingV2.js +1 -1
- package/build/esm/pwg.js +3 -3
- package/build/esm/{routing-9bd1c0cf.js → routing-64398360.js} +1 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{types-556bc635.js → types-0fb719e4.js} +1 -1
- package/build/esm/{types-df76e189.js → types-736a9d35.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/{useHealthToolCache-3e5103d3.js → useHealthToolCache-cdf0a7fc.js} +1 -1
- package/build/esm/{useRafState-0e79cc14.js → useRafState-8571953c.js} +1 -1
- package/build/esm/useTranslations-e20dad0f.js +1 -0
- package/build/esm/{utils-1f49154b.js → utils-11d4f935.js} +1 -1
- package/build/esm/{utils-6d17f712.js → utils-413e1d43.js} +1 -1
- package/build/esm/vaccination.js +1 -1
- package/build/{fixedBottomAdBlock-f36f2f92.js → fixedBottomAdBlock-d3de008e.js} +1 -1
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/getDynamicHealthTool-25528444.js +1 -0
- package/build/{getSocialList-07361dc7.js → getSocialList-b0869130.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-88ccb9bc.js → index-03aa06b2.js} +1 -1
- package/build/{index-0f97c479.js → index-074e70aa.js} +1 -1
- package/build/{index-5ba227ab.js → index-0d13aa46.js} +1 -1
- package/build/{index-006ae7f1.js → index-0f9e194c.js} +1 -1
- package/build/{index-e09f33ba.js → index-16c96a09.js} +1 -1
- package/build/{index-668730c7.js → index-3865fa65.js} +1 -1
- package/build/{index-282a8655.js → index-3aac21b3.js} +1 -1
- package/build/{index-8f068d3c.js → index-3e109b04.js} +1 -1
- package/build/{index-ecdde5af.js → index-3e54d932.js} +1 -1
- package/build/{index-3e4d102c.js → index-46f96643.js} +1 -1
- package/build/{index-a4f745f5.js → index-4f42d12d.js} +1 -1
- package/build/index-50af89b5.js +1 -0
- package/build/{index-61b89b4b.js → index-5d64a675.js} +1 -1
- package/build/{index-def58b2f.js → index-6ff50451.js} +1 -1
- package/build/{index-51014c3f.js → index-730aeb54.js} +1 -1
- package/build/{index-57c98658.js → index-97d638d0.js} +1 -1
- package/build/{index-019502eb.js → index-bdffb183.js} +1 -1
- package/build/index-c5630579.js +1 -0
- package/build/{index-bdf6da0e.js → index-cf16038c.js} +1 -1
- package/build/{index-fd8698af.js → index-f8b90552.js} +1 -1
- package/build/{index-8571b215.js → index-f9ca5746.js} +1 -1
- package/build/index.js +1 -1
- package/build/{index.styled-049b5ca0.js → index.styled-344cd3a8.js} +1 -1
- package/build/{index.styled-e9f80af4.js → index.styled-587204e5.js} +5 -5
- package/build/{index.styled-28001484.js → index.styled-a831a91c.js} +1 -1
- 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/onboarding.js +1 -1
- package/build/onboardingV2.js +1 -1
- package/build/pwg.js +1 -1
- package/build/{routing-68d0b247.js → routing-b3839414.js} +1 -1
- package/build/together.js +1 -1
- package/build/{types-df3f4e13.js → types-0d6c8d14.js} +1 -1
- package/build/{types-c657ac6d.js → types-2b02bbc6.js} +1 -1
- package/build/types.js +1 -1
- package/build/useHealthToolCache-19ce509d.js +1 -0
- package/build/{useRafState-f997f496.js → useRafState-ffdfc3d6.js} +1 -1
- package/build/{useTranslations-95f1399d.js → useTranslations-d039f955.js} +1 -1
- package/build/{utils-d79de40e.js → utils-665e255f.js} +1 -1
- package/build/utils-88cf5b1a.js +1 -0
- package/build/vaccination.js +1 -1
- package/package.json +1 -1
- package/build/core-29a98a5e.js +0 -1
- package/build/esm/getDynamicHealthTool-cd934ae0.js +0 -1
- package/build/esm/index-841e9b1a.js +0 -1
- package/build/esm/index-cc4ee537.js +0 -1
- package/build/esm/useTranslations-f02eb191.js +0 -1
- package/build/getDynamicHealthTool-c4503e1c.js +0 -1
- package/build/index-942e90f7.js +0 -1
- package/build/index-fcdcdc6a.js +0 -1
- package/build/useHealthToolCache-5c75347c.js +0 -1
- package/build/utils-67a028e4.js +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-5874e445.js → BMI_BOYS.percentile.monthly-d1bedd10.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-4f0c485b.js → BMI_BOYS.percentile.weekly-bdde16c1.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-f2c3c180.js → BMI_BOYS.percentile.yearly-0928a0ac.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-2f798678.js → BMI_BOYS.zscore.monthly-976ca2f8.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-89b5f292.js → BMI_BOYS.zscore.weekly-0b769177.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-31653ef9.js → BMI_BOYS.zscore.yearly-c4945e50.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-8a149eac.js → BMI_GIRLS.percentile.monthly-702d07e8.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-f76157cc.js → BMI_GIRLS.percentile.weekly-caaf31eb.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-2169a0de.js → BMI_GIRLS.percentile.yearly-a2126557.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-e91267e9.js → BMI_GIRLS.zscore.monthly-dba690c5.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-190df407.js → BMI_GIRLS.zscore.weekly-62a96ad2.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-c28aa15d.js → BMI_GIRLS.zscore.yearly-d0ea743b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-0c88fa9a.js → HEAD CIRCUM_BOYS.percentile.monthly-52bd4838.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-11a67133.js → HEAD CIRCUM_BOYS.percentile.weekly-f9bf1df4.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-7079101e.js → HEAD CIRCUM_BOYS.percentile.yearly-033fc3af.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-6761b3ea.js → HEAD CIRCUM_BOYS.zscore.monthly-9485cf42.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-f1756225.js → HEAD CIRCUM_BOYS.zscore.weekly-c931e51f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-070044b4.js → HEAD CIRCUM_BOYS.zscore.yearly-592e506b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-7ea24f4a.js → HEAD CIRCUM_GIRLS.percentile.monthly-e36d57a8.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-95a8468d.js → HEAD CIRCUM_GIRLS.percentile.weekly-aafab66b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-8674723d.js → HEAD CIRCUM_GIRLS.percentile.yearly-0d36928a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-4cf4585d.js → HEAD CIRCUM_GIRLS.zscore.monthly-09d0c63b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-72f407fd.js → HEAD CIRCUM_GIRLS.zscore.weekly-206a4f2c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-ae7c986a.js → HEAD CIRCUM_GIRLS.zscore.yearly-72ac9cfd.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-e934252c.js → HEIGHT_BOYS.percentile.monthly-40176be1.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-36b2b67f.js → HEIGHT_BOYS.percentile.weekly-4d3c5437.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-840c33e6.js → HEIGHT_BOYS.percentile.yearly-67a384bf.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-9b991e74.js → HEIGHT_BOYS.zscore.monthly-d416002d.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-e0e323e8.js → HEIGHT_BOYS.zscore.weekly-c8489b92.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-ae9791b7.js → HEIGHT_BOYS.zscore.yearly-8cde23cd.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-2038ea42.js → HEIGHT_GIRLS.percentile.monthly-a17307af.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-1c17f5ab.js → HEIGHT_GIRLS.percentile.weekly-34f63d89.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-1381b2f9.js → HEIGHT_GIRLS.percentile.yearly-2ea4fd18.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-1a3f7f80.js → HEIGHT_GIRLS.zscore.monthly-550b9ca7.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-a768d4ba.js → HEIGHT_GIRLS.zscore.weekly-4fb13aaf.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-fd0231dc.js → HEIGHT_GIRLS.zscore.yearly-9dfa0858.js} +0 -0
- /package/build/{Onboarding-0a35aa99.js → Onboarding-98e23f45.js} +0 -0
- /package/build/{Visible-88f41d8d.js → Visible-17145c25.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-360eead3.js → WEIGHT_BOYS.percentile.monthly-530164bc.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-929aee70.js → WEIGHT_BOYS.percentile.weekly-a525c536.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-c217998d.js → WEIGHT_BOYS.percentile.yearly-3e362585.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-945a065b.js → WEIGHT_BOYS.zscore.monthly-e3ec9f42.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-57939d8c.js → WEIGHT_BOYS.zscore.weekly-ec9929ba.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-c0242a0e.js → WEIGHT_BOYS.zscore.yearly-970dc3e1.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-f422811d.js → WEIGHT_GIRLS.percentile.monthly-b6c8e519.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-2283c0f2.js → WEIGHT_GIRLS.percentile.weekly-764d49bd.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-d3e63ef9.js → WEIGHT_GIRLS.percentile.yearly-6bf1706d.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-f7172a03.js → WEIGHT_GIRLS.zscore.monthly-c5616c28.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-9bd8c5b4.js → WEIGHT_GIRLS.zscore.weekly-12cd9391.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-8583c260.js → WEIGHT_GIRLS.zscore.yearly-500d5026.js} +0 -0
- /package/build/{constants-1040c4ad.js → constants-474a8a4b.js} +0 -0
- /package/build/{cookieHelper-9efd7919.js → cookieHelper-3ecc8b3a.js} +0 -0
- /package/build/{dataTransform-46bb19f8.js → dataTransform-533e4a54.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-547e557b.js → BMI_BOYS.percentile.monthly-b8419a20.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-56f1bf64.js → BMI_BOYS.percentile.weekly-20166a43.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-08153283.js → BMI_BOYS.percentile.yearly-3a7bcda7.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-e1743d39.js → BMI_BOYS.zscore.monthly-9b18d024.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-218e6d3b.js → BMI_BOYS.zscore.weekly-674ea595.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-607cc374.js → BMI_BOYS.zscore.yearly-771a2d31.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-d83aa6f1.js → BMI_GIRLS.percentile.monthly-92090c19.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-303de5b0.js → BMI_GIRLS.percentile.weekly-c7b8a867.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-c3487381.js → BMI_GIRLS.percentile.yearly-a647fee0.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-239b7d45.js → BMI_GIRLS.zscore.monthly-f10b828a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-5b0c5d24.js → BMI_GIRLS.zscore.weekly-cd8c06b1.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-51737763.js → BMI_GIRLS.zscore.yearly-0b170ba8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-8ca3e98a.js → HEAD CIRCUM_BOYS.percentile.monthly-0fcf957a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-a09e6c9f.js → HEAD CIRCUM_BOYS.percentile.weekly-ec26b0a8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-22456c92.js → HEAD CIRCUM_BOYS.percentile.yearly-9a8375af.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-b831eed7.js → HEAD CIRCUM_BOYS.zscore.monthly-77cc35ee.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-1746ab2c.js → HEAD CIRCUM_BOYS.zscore.weekly-6eb08daf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-4e918685.js → HEAD CIRCUM_BOYS.zscore.yearly-79fcbaad.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-fb34a270.js → HEAD CIRCUM_GIRLS.percentile.monthly-7a31971a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-bb427f3d.js → HEAD CIRCUM_GIRLS.percentile.weekly-8228b20d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-ee0ef0c6.js → HEAD CIRCUM_GIRLS.percentile.yearly-0a238df6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-ad09e307.js → HEAD CIRCUM_GIRLS.zscore.monthly-85494b20.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-5f3cea34.js → HEAD CIRCUM_GIRLS.zscore.weekly-dc7917dd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-aac07d55.js → HEAD CIRCUM_GIRLS.zscore.yearly-dfe7730a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-bbd8ec94.js → HEIGHT_BOYS.percentile.monthly-c11a0840.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-e7b984aa.js → HEIGHT_BOYS.percentile.weekly-2802944a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-06c1e60d.js → HEIGHT_BOYS.percentile.yearly-32715691.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-068a8a27.js → HEIGHT_BOYS.zscore.monthly-0a9c9856.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-eb7f3f06.js → HEIGHT_BOYS.zscore.weekly-c7cac5c5.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-4ec316ec.js → HEIGHT_BOYS.zscore.yearly-24126e2d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-950d0ea5.js → HEIGHT_GIRLS.percentile.monthly-880560f2.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-78ad3c75.js → HEIGHT_GIRLS.percentile.weekly-eeebac2a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-16cefac2.js → HEIGHT_GIRLS.percentile.yearly-30dfd3ae.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-6fafd59a.js → HEIGHT_GIRLS.zscore.monthly-8b3a3860.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-bbe5c85d.js → HEIGHT_GIRLS.zscore.weekly-9e032970.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-5f2ff241.js → HEIGHT_GIRLS.zscore.yearly-44744e81.js} +0 -0
- /package/build/esm/{Onboarding-43862b7b.js → Onboarding-d35e67b9.js} +0 -0
- /package/build/esm/{Visible-ec398164.js → Visible-b12c90ed.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-aff75784.js → WEIGHT_BOYS.percentile.monthly-8a6d24a5.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-32a8379a.js → WEIGHT_BOYS.percentile.weekly-890c9d86.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-784be088.js → WEIGHT_BOYS.percentile.yearly-5e526089.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-183b855b.js → WEIGHT_BOYS.zscore.monthly-86612229.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-240f85cb.js → WEIGHT_BOYS.zscore.weekly-6857d017.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-5353a9d5.js → WEIGHT_BOYS.zscore.yearly-01b97547.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-99f8e410.js → WEIGHT_GIRLS.percentile.monthly-9c91d896.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-ae372739.js → WEIGHT_GIRLS.percentile.weekly-3468f33b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-2d485623.js → WEIGHT_GIRLS.percentile.yearly-55ae2ca5.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-b187bcda.js → WEIGHT_GIRLS.zscore.monthly-158b668e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-0547fa9c.js → WEIGHT_GIRLS.zscore.weekly-2f89c226.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-29fc2ba0.js → WEIGHT_GIRLS.zscore.yearly-1cc94164.js} +0 -0
- /package/build/esm/{constants-4164a332.js → constants-96faaa9b.js} +0 -0
- /package/build/esm/{cookieHelper-b5198ba7.js → cookieHelper-cfe90368.js} +0 -0
- /package/build/esm/{dataTransform-4798268a.js → dataTransform-b1495139.js} +0 -0
- /package/build/esm/{index-fdeb7f10.js → index-dd47dfb7.js} +0 -0
- /package/build/esm/{isProduction-7fc869ed.js → isProduction-34a6c6ba.js} +0 -0
- /package/build/esm/{localizeNumberFormat-e9a22280.js → localizeNumberFormat-72a222c3.js} +0 -0
- /package/build/esm/{normalizeLink-a9e07d8c.js → normalizeLink-5f52c22e.js} +0 -0
- /package/build/esm/{paths-392d2bdb.js → paths-d31c2d36.js} +0 -0
- /package/build/esm/{screenSizeContext-8144e3e5.js → screenSizeContext-89147b3b.js} +0 -0
- /package/build/esm/{theme-a2a171b2.js → theme-93696046.js} +0 -0
- /package/build/esm/{translationsContext-2c7be8c0.js → translationsContext-0b30bdbf.js} +0 -0
- /package/build/esm/{tslib.es6-2e31dcb2.js → tslib.es6-1a8e085c.js} +0 -0
- /package/build/esm/{types-050ea401.js → types-0d0edd0c.js} +0 -0
- /package/build/esm/{useIsInit-89ffe85c.js → useIsInit-18ed59e7.js} +0 -0
- /package/build/esm/{useOutsideClick-07e69274.js → useOutsideClick-0217b2d7.js} +0 -0
- /package/build/esm/{useScrollbarSize-aca76ea6.js → useScrollbarSize-368da711.js} +0 -0
- /package/build/esm/{useUniqueId-62cbb6d3.js → useUniqueId-a2316bec.js} +0 -0
- /package/build/{index-615df44d.js → index-d238a0a2.js} +0 -0
- /package/build/{isProduction-f892b978.js → isProduction-c1784ce4.js} +0 -0
- /package/build/{localizeNumberFormat-9bccc072.js → localizeNumberFormat-8314b3e6.js} +0 -0
- /package/build/{normalizeLink-bd50251f.js → normalizeLink-d1313dfb.js} +0 -0
- /package/build/{paths-4281a119.js → paths-eaaffadc.js} +0 -0
- /package/build/{screenSizeContext-6f10e9b3.js → screenSizeContext-e28bdb06.js} +0 -0
- /package/build/{theme-48d542a5.js → theme-6f278bf1.js} +0 -0
- /package/build/{translationsContext-f2d68f9a.js → translationsContext-8cd532eb.js} +0 -0
- /package/build/{tslib.es6-6b56e029.js → tslib.es6-d541ada1.js} +0 -0
- /package/build/{types-feb2b3fe.js → types-6b71fb0a.js} +0 -0
- /package/build/{useIsInit-46f59445.js → useIsInit-7f0f843f.js} +0 -0
- /package/build/{useOutsideClick-76205435.js → useOutsideClick-b8a515bb.js} +0 -0
- /package/build/{useScrollbarSize-13f27011.js → useScrollbarSize-dcd10bd4.js} +0 -0
- /package/build/{useUniqueId-efa7ed8c.js → useUniqueId-751fe654.js} +0 -0
package/build/esm/onboarding.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,_ as o}from"./tslib.es6-2e31dcb2.js";import t,{useContext as n,useState as r,useRef as a,useEffect as i,useMemo as s,useCallback as l}from"react";import{Input as d,Grid as m,Title as c}from"@mantine/core";import{useInterval as p,useCounter as u}from"@mantine/hooks";import{B as g}from"./index-9b827592.js";import{x as b,aC as E,J as h,aD as f,aE as v,aF as y,w,E as S}from"./utils-1f49154b.js";import{u as P,a as j,F as k,O as C,b as x}from"./index-0ec9b0bd.js";import{u as B}from"./useTranslations-f02eb191.js";import"lodash/debounce";import"./isProduction-7fc869ed.js";import{L as z}from"./index-6df4978c.js";import{O as T}from"./Onboarding-43862b7b.js";export{O as OnboardingStep}from"./Onboarding-43862b7b.js";import"dayjs";import{M as F}from"./screenSizeContext-8144e3e5.js";import"styled-components";import{t as N}from"./theme-a2a171b2.js";import"./gAssets.js";import{S as I,a as L,b as q,c as A,d as D,e as V,f as _,g as U,h as R,i as W}from"./index.styled-4c6e37b0.js";import{yupResolver as H}from"@mantine/form";import"./index-27b659b0.js";import"./index-0a6fa4cc.js";import"@mantine/dates";import{D as Y}from"./index-a13d5bc0.js";import{A as $}from"./index-80186250.js";import{V as G}from"./Visible-ec398164.js";import{M as Z,h as J}from"./utils-6d17f712.js";export{M as MAPPED_LOCALE}from"./utils-6d17f712.js";import*as K from"yup";import Q from"lodash/throttle";import{T as X}from"./index-a1d0e05c.js";import{format as ee}from"date-fns";import"./translationsContext-2c7be8c0.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-62cbb6d3.js";import"./cookieHelper-b5198ba7.js";import"slugify";import"date-fns/locale";const oe=({inputOrder:e=["phone"],withSimilac:o=!1,customTerms:n=""})=>{const{t:r}=B(),a=P(),i=t.createElement(d.Wrapper,Object.assign({className:o?"input-control":"phone-input",withAsterisk:!0},o?{label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.phone"))}:{}),t.createElement(E,Object.assign({defaultCountry:Z[process.env.UNIFY_LOCALE]||"VN"},a.getInputProps("phone"))),t.createElement(d.Error,{size:"md"},a.errors.phone)),s=t.createElement(h,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourName")),withAsterisk:!0},a.getInputProps("name"))),l=t.createElement(h,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourEmail")),withAsterisk:!0},a.getInputProps("email"))),m=t.createElement(Y,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},a.getInputProps("dob"))),c=t.createElement(f.Group,Object.assign({className:"radio-group",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("bmi.selectGender"))},a.getInputProps("gender")),t.createElement(f,{value:"0",label:r("onboarding.formEmail.genderMale")}),t.createElement(f,{value:"1",label:r("onboarding.formEmail.genderFemale")})),p=t.createElement("div",{className:"otp-input"},t.createElement(v,Object.assign({enterKeyHint:void 0,nonce:void 0},a.getInputProps("otp"))),t.createElement(d.Error,null,a.errors.otp)),u=t.createElement(h.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("password"))),g=t.createElement(h.Wrapper,Object.assign({},a.getInputProps("term",{type:"checkbox"}),{error:null,mb:16}),t.createElement(y,{label:n?t.createElement(b,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},n):t.createElement(b,{size:"p4",as:"span"},"Tôi đã đọc và đồng ý với các điều khoản và chương trình của"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Hello Bacsi"))," ","và"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Abbott Similac"))," ","và được hướng dẫn cách ngưng chương trình"),onChange:e=>{a.setFieldValue("term",e.currentTarget.checked)}}),t.createElement(d.Error,{size:"md"},a.getInputProps("term",{type:"checkbox"}).error)),w=t.createElement($,Object.assign({className:"input-control",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.address"))},a.getInputProps("address"))),S=t.createElement(h.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("confirmPassword"))),j=e.map((e=>({phone:i,full_name:s,email:l,dob:m,gender:c,otp:p,password:u,confirm_password:S,term:g,address:w}[e]||null)));return t.createElement(I,null,j)},te=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default("")}),ne=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName")),email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:K.mixed().required(e("onboarding.similac.address.error")),term:K.bool().oneOf([!0],e("onboarding.similac.term.error"))}),re=e=>K.object().shape({otp:K.string().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),ae=e=>K.object().shape({email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName"))}),ie=e=>K.object().shape({password:K.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:K.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([K.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),se=({onClose:o,onSubmit:n,canSkip:r=!0,customFormTexts:a})=>{const{t:i}=B(),s=j({initialValues:{phone:""},validate:H(te(i))});return t.createElement(L,{heading:(null==a?void 0:a.heading)||i("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||i("onboarding.updatePhone.description")},t.createElement(k,{form:s},t.createElement("form",{onSubmit:s.onSubmit((o=>e(void 0,void 0,void 0,(function*(){n(o.phone)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["phone"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},i("onboarding.button.continue")),r&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},i("onboarding.button.skip")))))},le=n=>{var{onClose:r,onSubmit:a,canSkip:i=!0,customFormTexts:s,customTerms:l,defaultValues:d}=n,m=o(n,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues"]);const{t:c}=B(),{isMobile:p}=w(),u=j({initialValues:Object.assign({phone:"",term:!1},d),validate:H(ne(c))});return t.createElement(L,Object.assign({heading:(null==s?void 0:s.heading)||c("onboarding.updatePhone.heading"),description:(null==s?void 0:s.description)||c("onboarding.updatePhone.description"),hiddenLogo:p},m),t.createElement(k,{form:u},t.createElement("form",{onSubmit:u.onSubmit((o=>e(void 0,void 0,void 0,(function*(){a(o)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["full_name","email","phone","address","term"],withSimilac:!0,customTerms:l}),t.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),i&&t.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:r,type:"button"},c("onboarding.button.skip")))))},de=e=>{var{withSimilac:n=!1}=e,r=o(e,["withSimilac"]);return n?t.createElement(le,Object.assign({},r)):t.createElement(se,Object.assign({},r))},me=({onSubmit:o,phone:l,email:d,onResendCode:m,otpError:c,onClose:b,loading:E,onBack:h,canSkip:f,outOfEdit:v})=>{const{siteType:y,isMarryBaby:w}=n(C),[S,P]=r(30),O=p((()=>P((e=>e-1))),1e3),[M,x]=u(0,{min:0,max:3}),z=a(!0),{t:T}=B();i((()=>(O.start(),O.stop)),[]),i((()=>{0===S&&(O.stop(),z.current=!1)}),[S]);const F=j({initialValues:{otp:""},validate:H(re(T))});i((()=>{c&&F.setFieldError("otp",c)}),[c]);const I=s((()=>Q((()=>{z.current||(x.increment(),P(30),null==m||m(l||d),O.start(),z.current=!0)}),1e3,{trailing:!1})),[l,d,m,O]);return t.createElement(q,{heading:T("onboarding.otpForm.heading"),description:t.createElement(t.Fragment,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:l?T("onboarding.otpForm.description",{phone:`<b style="color:${N.colors.gray800}">${l.slice(0,-3).replace(/./g,"x").concat(l.slice(-3))}</b>`}):T("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${N.colors.gray800}">${J(d)}</b>`})}}),!v&&t.createElement("svg",{onClick:()=>{null==h||h()},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},t.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},t.createElement(k,{form:F},t.createElement("form",{onSubmit:F.onSubmit((t=>e(void 0,void 0,void 0,(function*(){x.increment(),o(t.otp)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["otp"]}),t.createElement("div",{className:"resend"},t.createElement(X,{size:"p4",color:N.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),t.createElement(X,{as:"a",size:"p4",color:w?N.mbColors.pink:N.colors.primaryBase,onClick:I},T("onboarding.otpForm.resendCode",{seconds:S}))),t.createElement(g,{theme:y,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:E,disabled:E,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),f&&M>=3&&t.createElement(g,{theme:y,color:"ghost",isBlock:!0,size:"lg",onClick:b,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none",type:"button"},T("onboarding.button.skip")))))},ce=({onClose:e,onSubmit:o,canSkip:r,loading:a,errorMessage:s,initialData:l})=>{const{t:d,locale:m}=B(),{siteType:c,isMarryBaby:p}=n(C),u=j({validate:H(ae(d))});return i((()=>{u.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),i((()=>{s&&u.setFieldError("email",s)}),[s]),t.createElement(x,{heading:d("onboarding.formEmail.heading"),description:d("onboarding.formEmail.description",{site:p?"Marry Baby":z[m].SITE_NAME_FORMATTED})},t.createElement(k,{form:u},t.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>{o(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")}))}),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},d("onboarding.button.continue")),r&&t.createElement(g,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:e},d("onboarding.button.skip")))))},pe=({onClose:e,onSubmit:o,canSkip:n,errorMessage:r,loading:a})=>{const{t:i}=B(),s=j({initialValues:{password:"",confirmPassword:""},validate:H(ie(i))});return t.createElement(x,{heading:i("onboarding.updatePassword.heading"),description:i("onboarding.updatePassword.description")},t.createElement(k,{form:s},t.createElement("form",{className:"form",onSubmit:s.onSubmit((e=>o((null==e?void 0:e.password)||"")),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["password","confirm_password"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:a,disabled:a},i("onboarding.button.continue")),n&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:e},i("onboarding.button.skip")),r&&t.createElement(d.Error,{className:"form-error"},r))))},ue=n=>{var{banner:a,canSkip:i,createPassError:s,createPassLoading:d,customFormTexts:p,emailLoading:E,flow:h=[T.Phone,T.OTP],initialData:f,onClose:v,onCreatePassByEmail:y,onOtpSubmit:S,onPersonalInfoSubmit:P,onPhoneSubmit:j,onResendCode:k,otpError:O,otpLoading:M,personalInfoError:z,resultScreenProps:I,siteType:L,step:q,withSimilac:H=!1,similacFormProps:Y}=n,$=o(n,["banner","canSkip","createPassError","createPassLoading","customFormTexts","emailLoading","flow","initialData","onClose","onCreatePassByEmail","onOtpSubmit","onPersonalInfoSubmit","onPhoneSubmit","onResendCode","otpError","otpLoading","personalInfoError","resultScreenProps","siteType","step","withSimilac","similacFormProps"]);const{t:G}=B(),[Z,J]=r(q||h[0]),[K,Q]=r(""),[X,ee]=r(""),[oe,te]=u(0,{min:0,max:2}),{isMobile:ne}=w(),re=l((()=>{const e=h.indexOf(Z)+1;e<=h.length-1&&J(h[e])}),[Z]),ae=l((()=>{const e=h.indexOf(Z)-1;e>=0&&J(h[e])}),[Z]),ie=o=>e(void 0,void 0,void 0,(function*(){try{!(yield S(o))&&re()}catch(e){console.error(e)}})),se=()=>{oe>=2||(te.increment(),ae())},ue="marryBaby"===L;return t.createElement(C.Provider,{value:{siteType:L,isMarryBaby:ue}},t.createElement(A,Object.assign({},$),h.length>0?t.createElement(D,null,t.createElement(m,{sx:{[F.mbDown]:{margin:0},".mantine-Grid-col":{[F.mbDown]:{padding:0}}}},t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2,sx:{zIndex:H?99:void 0}},t.createElement(V,{"data-similac":H,"data-has-banner":"object"==typeof a},Z===T.Phone&&(H?t.createElement(le,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){var e;try{const t=null==o?void 0:o.phone;t&&(Q(t),yield Promise.all([null===(e=null==Y?void 0:Y.onFormSubmit)||void 0===e?void 0:e.call(Y,o),null==j?void 0:j(t)])),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding,defaultValues:null==Y?void 0:Y.defaultValues,customTerms:null==Y?void 0:Y.customTerms}):t.createElement(de,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{Q(o),yield null==j?void 0:j(o),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding})),Z===T.OTP&&t.createElement(me,{onClose:v,onSubmit:ie,phone:K,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2}),Z===T.OTPEmail&&t.createElement(me,{onClose:v,onSubmit:ie,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2,email:X}),Z===T.PersonalInfo&&t.createElement(ce,{initialData:null==f?void 0:f[T.PersonalInfo],onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{ee((null==o?void 0:o.email)||"");!(yield null==P?void 0:P(o))&&re()}catch(e){console.error(e)}})),errorMessage:z,loading:E}),Z===T.UpdatePassword&&t.createElement(pe,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{yield null==y?void 0:y(o),!s&&re()}catch(e){console.error(e)}})),errorMessage:s,loading:d}),Z===T.Result&&t.createElement(x,Object.assign({},I),t.createElement(g,{theme:L,size:"lg",onClick:v,className:"form-button"},G("onboarding.button.continue"))))),"object"==typeof a&&!H&&t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2},t.createElement(_,null,t.createElement(U,{"data-is-marry-baby":ue},t.createElement(R,null,(null==a?void 0:a.heading)&&t.createElement(c,{order:1,mb:24},null==a?void 0:a.heading),(null==a?void 0:a.description)&&t.createElement(b,{size:"p1",color:N.colors.gray800},G("onboarding.welcomeScreen.content"))),(null==a?void 0:a.imgSrc)&&t.createElement("div",null,t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy"}))))),"object"==typeof a&&H&&(null==a?void 0:a.imgSrc)&&t.createElement(m.Col,{span:"auto",order:H?1:2,orderMd:H?2:1},t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy",className:"similac"})))):"Incorrect flow"))};export{de as OnboardingForm,ue as OnboardingModal,me as OtpForm};
|
|
1
|
+
import{a as e,_ as o}from"./tslib.es6-1a8e085c.js";import t,{useContext as n,useState as r,useRef as a,useEffect as i,useMemo as s,useCallback as l}from"react";import{Input as d,Grid as m,Title as c}from"@mantine/core";import{useInterval as p,useCounter as u}from"@mantine/hooks";import{B as g}from"./index-820ae7d8.js";import{x as b,aC as E,J as h,aD as f,aE as v,aF as y,w,E as S}from"./utils-11d4f935.js";import{u as P,a as j,F as k,O as C,b as x}from"./index-b5d87c62.js";import{u as B}from"./useTranslations-e20dad0f.js";import"lodash/debounce";import"./isProduction-34a6c6ba.js";import{L as z}from"./index-bd6a4ca0.js";import{O as T}from"./Onboarding-d35e67b9.js";export{O as OnboardingStep}from"./Onboarding-d35e67b9.js";import"dayjs";import{M as F}from"./screenSizeContext-89147b3b.js";import"styled-components";import{t as N}from"./theme-93696046.js";import"./gAssets.js";import{S as I,a as L,b as q,c as A,d as D,e as V,f as _,g as U,h as R,i as W}from"./index.styled-1a30c95e.js";import{yupResolver as H}from"@mantine/form";import"./index-635f7e1e.js";import"./index-3424374c.js";import"@mantine/dates";import{D as Y}from"./index-e7a3d796.js";import{A as $}from"./index-548b9603.js";import{V as G}from"./Visible-b12c90ed.js";import{M as Z,h as J}from"./utils-413e1d43.js";export{M as MAPPED_LOCALE}from"./utils-413e1d43.js";import*as K from"yup";import Q from"lodash/throttle";import{T as X}from"./index-c1a317b2.js";import{format as ee}from"date-fns";import"./translationsContext-0b30bdbf.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-a2316bec.js";import"./cookieHelper-cfe90368.js";import"slugify";import"date-fns/locale";const oe=({inputOrder:e=["phone"],withSimilac:o=!1,customTerms:n=""})=>{const{t:r}=B(),a=P(),i=t.createElement(d.Wrapper,Object.assign({className:o?"input-control":"phone-input",withAsterisk:!0},o?{label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.phone"))}:{}),t.createElement(E,Object.assign({defaultCountry:Z[process.env.UNIFY_LOCALE]||"VN"},a.getInputProps("phone"))),t.createElement(d.Error,{size:"md"},a.errors.phone)),s=t.createElement(h,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourName")),withAsterisk:!0},a.getInputProps("name"))),l=t.createElement(h,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourEmail")),withAsterisk:!0},a.getInputProps("email"))),m=t.createElement(Y,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},a.getInputProps("dob"))),c=t.createElement(f.Group,Object.assign({className:"radio-group",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("bmi.selectGender"))},a.getInputProps("gender")),t.createElement(f,{value:"0",label:r("onboarding.formEmail.genderMale")}),t.createElement(f,{value:"1",label:r("onboarding.formEmail.genderFemale")})),p=t.createElement("div",{className:"otp-input"},t.createElement(v,Object.assign({enterKeyHint:void 0,nonce:void 0},a.getInputProps("otp"))),t.createElement(d.Error,null,a.errors.otp)),u=t.createElement(h.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("password"))),g=t.createElement(h.Wrapper,Object.assign({},a.getInputProps("term",{type:"checkbox"}),{error:null,mb:16}),t.createElement(y,{label:n?t.createElement(b,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},n):t.createElement(b,{size:"p4",as:"span"},"Tôi đã đọc và đồng ý với các điều khoản và chương trình của"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Hello Bacsi"))," ","và"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Abbott Similac"))," ","và được hướng dẫn cách ngưng chương trình"),onChange:e=>{a.setFieldValue("term",e.currentTarget.checked)}}),t.createElement(d.Error,{size:"md"},a.getInputProps("term",{type:"checkbox"}).error)),w=t.createElement($,Object.assign({className:"input-control",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.address"))},a.getInputProps("address"))),S=t.createElement(h.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("confirmPassword"))),j=e.map((e=>({phone:i,full_name:s,email:l,dob:m,gender:c,otp:p,password:u,confirm_password:S,term:g,address:w}[e]||null)));return t.createElement(I,null,j)},te=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default("")}),ne=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName")),email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:K.mixed().required(e("onboarding.similac.address.error")),term:K.bool().oneOf([!0],e("onboarding.similac.term.error"))}),re=e=>K.object().shape({otp:K.string().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),ae=e=>K.object().shape({email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName"))}),ie=e=>K.object().shape({password:K.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:K.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([K.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),se=({onClose:o,onSubmit:n,canSkip:r=!0,customFormTexts:a})=>{const{t:i}=B(),s=j({initialValues:{phone:""},validate:H(te(i))});return t.createElement(L,{heading:(null==a?void 0:a.heading)||i("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||i("onboarding.updatePhone.description")},t.createElement(k,{form:s},t.createElement("form",{onSubmit:s.onSubmit((o=>e(void 0,void 0,void 0,(function*(){n(o.phone)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["phone"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},i("onboarding.button.continue")),r&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},i("onboarding.button.skip")))))},le=n=>{var{onClose:r,onSubmit:a,canSkip:i=!0,customFormTexts:s,customTerms:l,defaultValues:d}=n,m=o(n,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues"]);const{t:c}=B(),{isMobile:p}=w(),u=j({initialValues:Object.assign({phone:"",term:!1},d),validate:H(ne(c))});return t.createElement(L,Object.assign({heading:(null==s?void 0:s.heading)||c("onboarding.updatePhone.heading"),description:(null==s?void 0:s.description)||c("onboarding.updatePhone.description"),hiddenLogo:p},m),t.createElement(k,{form:u},t.createElement("form",{onSubmit:u.onSubmit((o=>e(void 0,void 0,void 0,(function*(){a(o)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["full_name","email","phone","address","term"],withSimilac:!0,customTerms:l}),t.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),i&&t.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:r,type:"button"},c("onboarding.button.skip")))))},de=e=>{var{withSimilac:n=!1}=e,r=o(e,["withSimilac"]);return n?t.createElement(le,Object.assign({},r)):t.createElement(se,Object.assign({},r))},me=({onSubmit:o,phone:l,email:d,onResendCode:m,otpError:c,onClose:b,loading:E,onBack:h,canSkip:f,outOfEdit:v})=>{const{siteType:y,isMarryBaby:w}=n(C),[S,P]=r(30),O=p((()=>P((e=>e-1))),1e3),[M,x]=u(0,{min:0,max:3}),z=a(!0),{t:T}=B();i((()=>(O.start(),O.stop)),[]),i((()=>{0===S&&(O.stop(),z.current=!1)}),[S]);const F=j({initialValues:{otp:""},validate:H(re(T))});i((()=>{c&&F.setFieldError("otp",c)}),[c]);const I=s((()=>Q((()=>{z.current||(x.increment(),P(30),null==m||m(l||d),O.start(),z.current=!0)}),1e3,{trailing:!1})),[l,d,m,O]);return t.createElement(q,{heading:T("onboarding.otpForm.heading"),description:t.createElement(t.Fragment,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:l?T("onboarding.otpForm.description",{phone:`<b style="color:${N.colors.gray800}">${l.slice(0,-3).replace(/./g,"x").concat(l.slice(-3))}</b>`}):T("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${N.colors.gray800}">${J(d)}</b>`})}}),!v&&t.createElement("svg",{onClick:()=>{null==h||h()},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},t.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},t.createElement(k,{form:F},t.createElement("form",{onSubmit:F.onSubmit((t=>e(void 0,void 0,void 0,(function*(){x.increment(),o(t.otp)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["otp"]}),t.createElement("div",{className:"resend"},t.createElement(X,{size:"p4",color:N.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),t.createElement(X,{as:"a",size:"p4",color:w?N.mbColors.pink:N.colors.primaryBase,onClick:I},T("onboarding.otpForm.resendCode",{seconds:S}))),t.createElement(g,{theme:y,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:E,disabled:E,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),f&&M>=3&&t.createElement(g,{theme:y,color:"ghost",isBlock:!0,size:"lg",onClick:b,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none",type:"button"},T("onboarding.button.skip")))))},ce=({onClose:e,onSubmit:o,canSkip:r,loading:a,errorMessage:s,initialData:l})=>{const{t:d,locale:m}=B(),{siteType:c,isMarryBaby:p}=n(C),u=j({validate:H(ae(d))});return i((()=>{u.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),i((()=>{s&&u.setFieldError("email",s)}),[s]),t.createElement(x,{heading:d("onboarding.formEmail.heading"),description:d("onboarding.formEmail.description",{site:p?"Marry Baby":z[m].SITE_NAME_FORMATTED})},t.createElement(k,{form:u},t.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>{o(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")}))}),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},d("onboarding.button.continue")),r&&t.createElement(g,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:e},d("onboarding.button.skip")))))},pe=({onClose:e,onSubmit:o,canSkip:n,errorMessage:r,loading:a})=>{const{t:i}=B(),s=j({initialValues:{password:"",confirmPassword:""},validate:H(ie(i))});return t.createElement(x,{heading:i("onboarding.updatePassword.heading"),description:i("onboarding.updatePassword.description")},t.createElement(k,{form:s},t.createElement("form",{className:"form",onSubmit:s.onSubmit((e=>o((null==e?void 0:e.password)||"")),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["password","confirm_password"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:a,disabled:a},i("onboarding.button.continue")),n&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:e},i("onboarding.button.skip")),r&&t.createElement(d.Error,{className:"form-error"},r))))},ue=n=>{var{banner:a,canSkip:i,createPassError:s,createPassLoading:d,customFormTexts:p,emailLoading:E,flow:h=[T.Phone,T.OTP],initialData:f,onClose:v,onCreatePassByEmail:y,onOtpSubmit:S,onPersonalInfoSubmit:P,onPhoneSubmit:j,onResendCode:k,otpError:O,otpLoading:M,personalInfoError:z,resultScreenProps:I,siteType:L,step:q,withSimilac:H=!1,similacFormProps:Y}=n,$=o(n,["banner","canSkip","createPassError","createPassLoading","customFormTexts","emailLoading","flow","initialData","onClose","onCreatePassByEmail","onOtpSubmit","onPersonalInfoSubmit","onPhoneSubmit","onResendCode","otpError","otpLoading","personalInfoError","resultScreenProps","siteType","step","withSimilac","similacFormProps"]);const{t:G}=B(),[Z,J]=r(q||h[0]),[K,Q]=r(""),[X,ee]=r(""),[oe,te]=u(0,{min:0,max:2}),{isMobile:ne}=w(),re=l((()=>{const e=h.indexOf(Z)+1;e<=h.length-1&&J(h[e])}),[Z]),ae=l((()=>{const e=h.indexOf(Z)-1;e>=0&&J(h[e])}),[Z]),ie=o=>e(void 0,void 0,void 0,(function*(){try{!(yield S(o))&&re()}catch(e){console.error(e)}})),se=()=>{oe>=2||(te.increment(),ae())},ue="marryBaby"===L;return t.createElement(C.Provider,{value:{siteType:L,isMarryBaby:ue}},t.createElement(A,Object.assign({},$),h.length>0?t.createElement(D,null,t.createElement(m,{sx:{[F.mbDown]:{margin:0},".mantine-Grid-col":{[F.mbDown]:{padding:0}}}},t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2,sx:{zIndex:H?99:void 0}},t.createElement(V,{"data-similac":H,"data-has-banner":"object"==typeof a},Z===T.Phone&&(H?t.createElement(le,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){var e;try{const t=null==o?void 0:o.phone;t&&(Q(t),yield Promise.all([null===(e=null==Y?void 0:Y.onFormSubmit)||void 0===e?void 0:e.call(Y,o),null==j?void 0:j(t)])),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding,defaultValues:null==Y?void 0:Y.defaultValues,customTerms:null==Y?void 0:Y.customTerms}):t.createElement(de,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{Q(o),yield null==j?void 0:j(o),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding})),Z===T.OTP&&t.createElement(me,{onClose:v,onSubmit:ie,phone:K,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2}),Z===T.OTPEmail&&t.createElement(me,{onClose:v,onSubmit:ie,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2,email:X}),Z===T.PersonalInfo&&t.createElement(ce,{initialData:null==f?void 0:f[T.PersonalInfo],onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{ee((null==o?void 0:o.email)||"");!(yield null==P?void 0:P(o))&&re()}catch(e){console.error(e)}})),errorMessage:z,loading:E}),Z===T.UpdatePassword&&t.createElement(pe,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{yield null==y?void 0:y(o),!s&&re()}catch(e){console.error(e)}})),errorMessage:s,loading:d}),Z===T.Result&&t.createElement(x,Object.assign({},I),t.createElement(g,{theme:L,size:"lg",onClick:v,className:"form-button"},G("onboarding.button.continue"))))),"object"==typeof a&&!H&&t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2},t.createElement(_,null,t.createElement(U,{"data-is-marry-baby":ue},t.createElement(R,null,(null==a?void 0:a.heading)&&t.createElement(c,{order:1,mb:24},null==a?void 0:a.heading),(null==a?void 0:a.description)&&t.createElement(b,{size:"p1",color:N.colors.gray800},G("onboarding.welcomeScreen.content"))),(null==a?void 0:a.imgSrc)&&t.createElement("div",null,t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy"}))))),"object"==typeof a&&H&&(null==a?void 0:a.imgSrc)&&t.createElement(m.Col,{span:"auto",order:H?1:2,orderMd:H?2:1},t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy",className:"similac"})))):"Incorrect flow"))};export{de as OnboardingForm,ue as OnboardingModal,me as OtpForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{_ as d,a as c}from"./tslib.es6-
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{_ as d,a as c}from"./tslib.es6-1a8e085c.js";import{Box as p,Input as u,Grid as g,Title as b,Container as h,Stack as E,AspectRatio as f}from"@mantine/core";import{x as L,aC as v,J as C,aD as y,aE as x,aF as w,H as S,w as M,L as P,E as j}from"./utils-11d4f935.js";import{D as k}from"./index-e7a3d796.js";import"dayjs";import{M as O,k as F}from"./screenSizeContext-89147b3b.js";import B from"styled-components";import{t as z}from"./theme-93696046.js";import{L as N}from"./index-bd6a4ca0.js";import"./isProduction-34a6c6ba.js";import{L as I}from"./Onboarding-d35e67b9.js";import"./gAssets.js";import{u as T}from"./useTranslations-e20dad0f.js";import"./index-635f7e1e.js";import{useInterval as D,useCounter as Z}from"@mantine/hooks";import{A}from"./index-548b9603.js";import"lodash/debounce";import{V as _}from"./Visible-b12c90ed.js";import{createFormContext as V,yupResolver as H}from"@mantine/form";import"./index-3424374c.js";import"@mantine/dates";import*as q from"yup";import{createPortal as $}from"react-dom";import{B as U}from"./index-820ae7d8.js";import{b as Y}from"./index-b5d87c62.js";import R from"lodash/throttle";import{T as W}from"./index-c1a317b2.js";import{format as G}from"date-fns";import"./translationsContext-0b30bdbf.js";import"string-format";import K from"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-a2316bec.js";import"./cookieHelper-cfe90368.js";import"slugify";import"date-fns/locale";import"./utils-413e1d43.js";const J=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[Q,X,ee]=V(),te=B(p)`
|
|
2
2
|
.phone-input {
|
|
3
3
|
width: 100%;
|
|
4
4
|
margin-bottom: 32px;
|
package/build/esm/pwg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useMemo as t,useState as r,useRef as
|
|
1
|
+
import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as o}from"./index-0ca7274b.js";import{T as n}from"./index-c1a317b2.js";import{P as i}from"./index-971b6660.js";import{u as c}from"./useTranslations-e20dad0f.js";import{t as s}from"./theme-93696046.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as h}from"recharts";import{C as x}from"./index-635f7e1e.js";import{a as f}from"./useOutsideClick-0217b2d7.js";import E from"styled-components";import{_ as k}from"./tslib.es6-1a8e085c.js";import"./Onboarding-d35e67b9.js";import"./index.styled-069c7b3e.js";import"./gAssets.js";import"./index-bd6a4ca0.js";import"date-fns/locale";import"./isProduction-34a6c6ba.js";import"./translationsContext-0b30bdbf.js";import"string-format";import"@mantine/carousel";import"@mantine/core";import"@mantine/hooks";const w=t=>{const{x:r,y:a,payload:l,activeWeek:o}=t;return o===l.value?e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?s.mbColors.pink:s.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},l.value)):e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},v=E.div`
|
|
2
2
|
/* position: absolute; */
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -55,7 +55,7 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
|
|
|
55
55
|
align-items: center;
|
|
56
56
|
gap: 4px;
|
|
57
57
|
}
|
|
58
|
-
`,T=[{name:"overweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"underweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"healthy",backgroundColor:s.colors.green50,color:s.colors.green900}],B=r=>{var l,
|
|
58
|
+
`,T=[{name:"overweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"underweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"healthy",backgroundColor:s.colors.green50,color:s.colors.green900}],B=r=>{var a,l,o,i,c;const{payload:m,active:d}=r,p=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:y}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(l=p.toolTipLabel)||void 0===l?void 0:l[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:s.colors.gray800,type:"semiBold"},null===(c=p.toolTipLabel)||void 0===c?void 0:c[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:y},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:a,activeWeek:l,t:o})=>{const n=o(`bmi.result.${a}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===l?{toolTipLabel:r,translatedStatus:n,status:a}:{})))},z=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:z})=>{const{t:L}=c(),S="marryBaby"===z,O=t((()=>W({weightByWeek:i,weightBefore:o,toolTipLabel:v,status:C,activeWeek:E,t:L})),[i,o,v,C,E]),[F,I]=r(!1),M=a(null);return f(M,(()=>I(!1))),e.createElement(j,null,S?e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark}," ",L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:s.colors.gray500},L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")),Array.isArray(O)&&O.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:O,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:s.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&F&&void 0!==E&&void 0!==k},t))}),e.createElement(y,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:z})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(u,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:s.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:S?s.mbColors.tonePink:s.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>I(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(x,{ref:M,r:4}),fill:S?s.mbColors.pink:s.colors.primaryBase,stroke:S?s.mbColors.pink:s.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),S?e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},L("pregnancy.week")):e.createElement(n,{size:"n1",color:s.colors.gray500},L("pregnancy.week")))))},L=t=>{var{color:r}=t,a=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||s.colors.primaryBase}))},S=({idealWeight:t,siteType:r})=>{const{t:a}=c(),o="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:s.mbColors.lightPink}),e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},a("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(L,{color:s.colors.primary100}),e.createElement(n,{size:"n1",color:s.colors.gray600},e.createElement(n,{size:"n1",as:"span"},a("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:s.mbColors.pink}),e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},a("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(L,null),e.createElement(n,{size:"n1",color:s.colors.gray600},a("pwg.placeholder.weight")))))},O=E.div`
|
|
59
59
|
display: flex;
|
|
60
60
|
flex-direction: column;
|
|
61
61
|
align-items: center;
|
|
@@ -70,4 +70,4 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
|
|
|
70
70
|
> div {
|
|
71
71
|
width: 100%;
|
|
72
72
|
}
|
|
73
|
-
`,F=({chartProps:t,pillCarouselProps:r,idealWeight:
|
|
73
|
+
`,F=({chartProps:t,pillCarouselProps:r,idealWeight:a,description:l,siteType:m})=>{const{t:d}=c(),p="marryBaby"===m;return e.createElement(O,null,e.createElement("div",{className:"chart-header"},p?e.createElement(o,{type:"h3",color:s.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",type:"semiBold",color:s.colors.gray800},d("pregnancyTool.weightSuggested")),l&&l),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(S,{idealWeight:a,siteType:m}),e.createElement(z,Object.assign({},t,{siteType:m}))))};export{F as PregnancyWeightGainChart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e}from"./index-
|
|
1
|
+
import{d as e}from"./index-bd6a4ca0.js";import{i as s}from"./isProduction-34a6c6ba.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,a=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,n=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,a as c,n as d,t as g};
|
package/build/esm/together.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,J as SourceList,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-
|
|
1
|
+
export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,J as SourceList,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-0fb719e4.js";export{U as UserAvatar}from"./index.styled-2b748a10.js";export{d as TogetherDataTransforms}from"./dataTransform-245daba3.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,d as TogetherComponentGlobalContext,e as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-11d4f935.js";import"./tslib.es6-1a8e085c.js";import"react";import"@mantine/core";import"./index-ee126b98.js";import"styled-components";import"./screenSizeContext-89147b3b.js";import"lodash/throttle";import"./index-d671ac3c.js";import"./gAssets.js";import"./index-bd6a4ca0.js";import"date-fns/locale";import"./Onboarding-d35e67b9.js";import"./isProduction-34a6c6ba.js";import"./index-635f7e1e.js";import"@mantine/carousel";import"@mantine/hooks";import"./index-c1a317b2.js";import"./index-820ae7d8.js";import"./index-0619ee9f.js";import"./index-3424374c.js";import"./theme-93696046.js";import"dayjs";import"./useUniqueId-a2316bec.js";import"@mantine/dates";import"./translationsContext-0b30bdbf.js";import"string-format";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-af288c07.js";import"./useTranslations-e20dad0f.js";import"./index-0ca7274b.js";import"date-fns";import"./index-2622672d.js";import"lodash/debounce";import"./types-0d0edd0c.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-c7064d04.js";import"./paths-d31c2d36.js";import"./constants-96faaa9b.js";import"react-contenteditable";import"./cookieHelper-cfe90368.js";import"react-dom";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-069c7b3e.js";import"uuid";import"./utils-413e1d43.js";import"dayjs/plugin/relativeTime";import"./index-c126b1e9.js";import"./routing-64398360.js";import"react-keyed-flatten-children";import"slugify";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,_ as t}from"./tslib.es6-
|
|
1
|
+
import{a as e,_ as t}from"./tslib.es6-1a8e085c.js";import*as a from"react";import o,{createContext as n,useContext as i,useState as l,useRef as r,useEffect as s,useMemo as c,useCallback as d}from"react";import{useMantineTheme as m,createStyles as p,Flex as u,Box as g,rem as v,Checkbox as h,Portal as b,Anchor as f,Accordion as y,Popover as w}from"@mantine/core";import{a as x}from"./index-ee126b98.js";import{u as E}from"./useTranslations-e20dad0f.js";import C from"innertext";import{t as k}from"./theme-93696046.js";import{H as N,I as A,d as T,A as z,P,e as I,f as S}from"./index-3424374c.js";import{d as L,a9 as M,aa as j,O as B,ab as F,ac as O,ad as R,H as V,ae as D,x as U,Q as W,af as H,ag as Z,ah as q,ai as _,aj as G,ak as Q,w as X,al as K,am as $,an as Y,ao as J,E as ee,ap as te,a0 as ae,A as oe,aq as ne,ar as ie,as as le,at as re,au as se}from"./utils-11d4f935.js";import"@mantine/dates";import{D as ce,d as de}from"./index-bd6a4ca0.js";import"./Onboarding-d35e67b9.js";import{CommonGAssets as me}from"./gAssets.js";import pe from"dayjs";import{M as ue,t as ge,o as ve,k as he}from"./screenSizeContext-89147b3b.js";import be,{keyframes as fe,css as ye}from"styled-components";import"./isProduction-34a6c6ba.js";import{I as we}from"./index-635f7e1e.js";import"@mantine/hooks";import{A as xe,a as Ee,B as Ce,D as ke}from"./index-c7064d04.js";import{e as Ne,c as Ae,P as Te,g as ze,b as Pe,h as Ie,i as Se}from"./dataTransform-245daba3.js";import{T as Le}from"./index-c1a317b2.js";import{I as Me}from"./index-0619ee9f.js";import je from"lodash/debounce";import Be from"react-contenteditable";import{B as Fe}from"./index-820ae7d8.js";import{d as Oe,g as Re}from"./cookieHelper-cfe90368.js";import*as Ve from"react-dom";import{format as De}from"date-fns";import"react-day-picker/DayPickerInput";import{U as Ue}from"./index.styled-2b748a10.js";import"./index-af288c07.js";import"lodash/throttle";import"./types-0d0edd0c.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-069c7b3e.js";import"uuid";import"./utils-413e1d43.js";import"string-format";import We from"dayjs/plugin/relativeTime";import{M as He}from"./index-c126b1e9.js";import{a as Ze}from"./useUniqueId-a2316bec.js";import"./translationsContext-0b30bdbf.js";import{g as qe}from"./routing-64398360.js";const _e=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),a.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=n({}),Qe=({children:e,defaultParams:t})=>o.createElement(Ge.Provider,{value:{defaultParams:t}},e),Xe=e=>{const{data:{userInfo:t,env:{togetherBasePath:a}}}=i(L),{defaultParams:o}=i(Ge)||{},n=null==t?void 0:t.id,l=t&&"number"==typeof t.communities_interacted&&0===t.communities_interacted;return{authActionWrapper:(t,i)=>{const r=Object.assign(Object.assign(Object.assign({},o),e),i);if(!n||l){n||Oe(M),(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=j(e,r,a),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},Ke=be.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-1a8e085c.js";import*as t from"react";import i,{useState as a,useCallback as o,useMemo as n,useEffect as s,useRef as l,useReducer as r}from"react";import{u as c}from"./useTranslations-e20dad0f.js";import d from"lodash/debounce";import{I as p,L as u,a as h}from"./constants-96faaa9b.js";import{I as g}from"./index-0619ee9f.js";import m,{createGlobalStyle as C}from"styled-components";import{T as b}from"./index-c1a317b2.js";import{t as y}from"./theme-93696046.js";import{M as f}from"./screenSizeContext-89147b3b.js";import v from"react-loading-skeleton";import x from"lodash/shuffle";import{a as w}from"./useOutsideClick-0217b2d7.js";import{P as E}from"./paths-d31c2d36.js";import{Skeleton as S,Input as L,Divider as k,Tabs as O,Flex as j,Button as I}from"@mantine/core";import{c as F,d as M}from"./index-bd6a4ca0.js";import{g as R,s as $,d as T}from"./cookieHelper-cfe90368.js";import{C as P,I as A}from"./index-3424374c.js";import N from"string-format";const B=e=>t.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),t.createElement("path",{d:"M7.99969 9.38055L5.45236 6.83322C5.17636 6.55722 4.72836 6.55722 4.45236 6.83322C4.17636 7.10922 4.17636 7.55722 4.45236 7.83322L7.52836 10.9092C7.78903 11.1699 8.21103 11.1699 8.47103 10.9092L11.547 7.83322C11.823 7.55722 11.823 7.10922 11.547 6.83322C11.271 6.55722 10.823 6.55722 10.547 6.83322L7.99969 9.38055Z"}));function V(){const[e,t]=a((()=>{if("undefined"==typeof window)return"unset";if(R(F))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,s]=a((()=>{if("undefined"==typeof window)return null;const e=R(F);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=o((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};$(F,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{T(F),t("denied")}))}),[]);return n((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const D=m.div``,z=m.div`
|
|
2
2
|
--searchbar-z-index: 305;
|
|
3
3
|
&[data-is-modal='true'] {
|
|
4
4
|
position: fixed;
|
package/build/esm/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,G as Gender,L as LOCALE,O as OnboardingStep}from"./Onboarding-
|
|
1
|
+
export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,G as Gender,L as LOCALE,O as OnboardingStep}from"./Onboarding-d35e67b9.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./tslib.es6-
|
|
1
|
+
import{a as o}from"./tslib.es6-1a8e085c.js";import{useState as t,useEffect as i,useCallback as e}from"react";import{a}from"./getDynamicHealthTool-f974ef80.js";const l=l=>{const[n,r]=t([]);i((()=>{o(void 0,void 0,void 0,(function*(){const o=yield a(l);r(o)}))}),[a,l]);const s=e((o=>{var t;return(null===(t=n.find((t=>t.template===o)))||void 0===t?void 0:t.link)||""}),[n]);return{allTools:n,getHealthToolLink:s}};export{l as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-1a8e085c.js";import{useRef as t,useEffect as n,useState as r,useCallback as i}from"react";import{g as o}from"./cookieHelper-cfe90368.js";import{u as a}from"./useUniqueId-a2316bec.js";function l(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const c=r=>{const i=t("");n((()=>(e(void 0,void 0,void 0,(function*(){var e,t,n,a,c;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===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.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==r?void 0:r.id){const[e,t,n,i,s,u]=yield Promise.all([r.email?l(r.email):null,r.phone?l(r.phone):null,r.birthday?l(r.birthday.split("-").join("")):null,r.gender?"m":"f",r.city_name?l(r.city_name).then((e=>e.replace(/\s/g,""))):null,r.name?l(r.name):null]);o("_fbc"),o("_fbp");const d={user_id:r.id};u&&(d.fn=u),e&&(d.em=e),t&&(d.ph=t),n&&(d.db=n),s&&(d.ct=s),null===(c=null===(a=window.localStorage)||void 0===a?void 0:a.setItem)||void 0===c||c.call(a,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[r])},s=e=>{const n=t(),r=t(e);return a()||r.current===e||(n.current=r.current,r.current=e),n.current},u=e=>{const[o,a]=r(e),l=t(0),c=i((e=>{cancelAnimationFrame(l.current),l.current=requestAnimationFrame((()=>{a(e)}))}),[]);return n((()=>()=>cancelAnimationFrame(l.current))),[o,c]};export{s as a,u as b,c as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as o,useMemo as a}from"react";import{T as r}from"./translationsContext-0b30bdbf.js";import e from"string-format";function t(){const{values:t,locale:n}=o(r)||{locale:"en-PH"};return a((()=>({t:(o,a)=>t?t[o]?a?e(t[o]||o,a):t[o]||o:(console.warn(`[useTranslations] Missing translation for key ${o} and locale ${n}`),a?e(o,a):o):(console.error("[useTranslations] t method called before translation values are loaded"),o),locale:n})),[t,n])}export{t as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t}from"./tslib.es6-
|
|
1
|
+
import{_ as e,a as t}from"./tslib.es6-1a8e085c.js";import*as a from"react";import r,{memo as o,useMemo as i,useState as l,forwardRef as n,createContext as s,useEffect as c,Fragment as d,Component as p,useCallback as h,useRef as u,useImperativeHandle as g}from"react";import{createStyles as m,Button as b,Autocomplete as f,Image as E,ActionIcon as v,Select as w,rem as x,Text as y,AspectRatio as L,em as C,useMantineTheme as _,Box as O,Breadcrumbs as T,Textarea as A,Accordion as k,Indicator as I,Avatar as S,FileInput as R,createEmotionCache as $,NumberInput as M,PasswordInput as P,TextInput as B,Input as D,Checkbox as j,Slider as H,Radio as N,Flex as z,Tabs as G,ScrollArea as U,Popover as V}from"@mantine/core";import F,{css as Z}from"styled-components";import{I as K}from"./index-635f7e1e.js";import{t as W}from"./theme-93696046.js";import{M as Y,s as q,e as X,b as Q,f as J,c as ee,g as te,a as ae,d as re,B as oe}from"./screenSizeContext-89147b3b.js";import{CommonGAssets as ie}from"./gAssets.js";import{L as le,C as ne,I as se}from"./index-3424374c.js";import{L as ce}from"./Onboarding-d35e67b9.js";import{T as de}from"./index-c1a317b2.js";import"./translationsContext-0b30bdbf.js";import pe from"string-format";import he from"dayjs";import{I as ue,s as ge}from"./index-bd6a4ca0.js";import{i as me}from"./isProduction-34a6c6ba.js";import be from"react-keyed-flatten-children";import{useUncontrolled as fe,useDebouncedValue as Ee,useDisclosure as ve,useClickOutside as we}from"@mantine/hooks";import"@mantine/dates";import{Carousel as xe}from"@mantine/carousel";import{a as ye}from"./useUniqueId-a2316bec.js";import"lodash/debounce";import{g as Le}from"./cookieHelper-cfe90368.js";import Ce from"slugify";const _e=F.div`
|
|
2
2
|
background-color: var(--background-color, transparent);
|
|
3
3
|
color: white;
|
|
4
4
|
cursor: pointer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as a}from"./Onboarding-
|
|
1
|
+
import{L as a}from"./Onboarding-d35e67b9.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};
|
package/build/esm/vaccination.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t}from"./tslib.es6-
|
|
1
|
+
import{_ as e,a as t}from"./tslib.es6-1a8e085c.js";import a,{useMemo as n,useState as r,useEffect as l,Fragment as i}from"react";import{Stack as o,Flex as c,Badge as s,Grid as d,Box as m,Input as p,Container as C,AspectRatio as u,Tabs as g,ScrollArea as b,Divider as h,SimpleGrid as E}from"@mantine/core";import{E as v,x as f,aA as y,z as w,w as x,H as k}from"./utils-11d4f935.js";import"@mantine/dates";import"./index-bd6a4ca0.js";import{G as L}from"./Onboarding-d35e67b9.js";import"./gAssets.js";import j from"dayjs";import{M}from"./screenSizeContext-89147b3b.js";import D from"styled-components";import{t as z}from"./theme-93696046.js";import"./isProduction-34a6c6ba.js";import{u as V}from"./useTranslations-e20dad0f.js";import"./index-635f7e1e.js";import{useDisclosure as T}from"@mantine/hooks";import"lodash/debounce";import{S as $}from"./index-dd47dfb7.js";import"./translationsContext-0b30bdbf.js";import"string-format";import{I as B}from"./index-3424374c.js";import{M as F}from"./index-c126b1e9.js";import{useForm as _}from"@mantine/form";import H from"dayjs/plugin/customParseFormat";import{D as Z}from"./index-e7a3d796.js";import"./index-c1a317b2.js";import"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-a2316bec.js";import"./cookieHelper-cfe90368.js";import"slugify";import"date-fns/locale";import"lodash/throttle";const O=D.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
padding: 16px;
|
|
4
4
|
min-height: 110px;
|