@hhgtech/hhg-components 1.27.73 → 1.27.74
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-71a2fc47.js +1 -0
- package/build/{dataTransform-b57ffe49.js → dataTransform-6dfba380.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/babyGrowth.js +5 -5
- 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-b9ce5e48.js +1 -0
- package/build/esm/{dataTransform-acd309eb.js → dataTransform-b390c460.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/{fixedBottomAdBlock-4f598b4e.js → fixedBottomAdBlock-1da31147.js} +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/getDynamicHealthTool-7c51b447.js +1 -0
- package/build/esm/{getSocialList-62952c6e.js → getSocialList-47bd9dcc.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-7768bc42.js → index-00c08836.js} +1 -1
- package/build/esm/{index-a46315a8.js → index-01ab910a.js} +1 -1
- package/build/esm/{index-dc45af44.js → index-0645b438.js} +1 -1
- package/build/esm/{index-58d76b74.js → index-0bb9ace1.js} +1 -1
- package/build/esm/{index-ac0440c7.js → index-19616958.js} +1 -1
- package/build/esm/{index-6c3b66ef.js → index-23c96cda.js} +1 -1
- package/build/esm/{index-d99f5fe1.js → index-3f63d34b.js} +2 -2
- package/build/esm/{index-61b40bb3.js → index-5f38dff4.js} +2 -2
- package/build/esm/{index-b6603e31.js → index-7230353c.js} +1 -1
- package/build/esm/{index-2dbad103.js → index-9116eee5.js} +1 -1
- package/build/esm/{index-2bd17e3a.js → index-92c2686f.js} +1 -1
- package/build/esm/{index-e8aa27ee.js → index-a62315fd.js} +1 -1
- package/build/esm/index-aca4d584.js +1 -0
- package/build/esm/{index-ca8ba9cb.js → index-b452faa0.js} +1 -1
- package/build/esm/{index-77a12ad4.js → index-beb249e2.js} +1 -1
- package/build/esm/{index-acb68002.js → index-c62d01fb.js} +1 -1
- package/build/esm/index-cf4715e6.js +1 -0
- package/build/esm/{index-e006ea08.js → index-d24c00af.js} +1 -1
- package/build/esm/{index-d96a464a.js → index-dc68f019.js} +1 -1
- package/build/esm/{index-03fb3d5f.js → index-dd69cd16.js} +1 -1
- package/build/esm/{index-25a079fc.js → index-ee03bd1e.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-f8d51cb2.js → index.styled-1887c4a1.js} +4 -4
- package/build/esm/{index.styled-574d9f4e.js → index.styled-278d87b9.js} +2 -2
- package/build/esm/{index.styled-9454d250.js → index.styled-fa80a8b4.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 +5 -5
- package/build/esm/{routing-2ca62b4e.js → routing-158b3332.js} +1 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{types-d69ee206.js → types-1254ac5f.js} +10 -10
- package/build/esm/{types-9b1fb32b.js → types-a19266d1.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/useHealthToolCache-162bcbc6.js +1 -0
- package/build/esm/{useRafState-24287f60.js → useRafState-53e9f6f2.js} +1 -1
- package/build/esm/{useTranslations-e8adac8a.js → useTranslations-7c64ae29.js} +1 -1
- package/build/esm/{utils-0f4c6649.js → utils-5c8bc72f.js} +1 -1
- package/build/esm/{utils-49cd0015.js → utils-f61711a0.js} +1 -1
- package/build/esm/vaccination.js +5 -5
- package/build/{fixedBottomAdBlock-dd768903.js → fixedBottomAdBlock-d8a3d073.js} +1 -1
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/getDynamicHealthTool-6baf2791.js +1 -0
- package/build/{getSocialList-a0d8c4a7.js → getSocialList-daccb671.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-70e4f70a.js → index-101319ed.js} +2 -2
- package/build/{index-f5843f88.js → index-15e7fec7.js} +1 -1
- package/build/{index-54f6d8ba.js → index-1a026bbd.js} +1 -1
- package/build/{index-f56461c2.js → index-30246cae.js} +1 -1
- package/build/{index-1f22fb4d.js → index-3642131c.js} +1 -1
- package/build/{index-b2cc7acc.js → index-42c4fba8.js} +1 -1
- package/build/{index-98b4c324.js → index-4eb464fd.js} +1 -1
- package/build/{index-bf806fa4.js → index-50b551ee.js} +1 -1
- package/build/{index-f33dd806.js → index-548ede37.js} +1 -1
- package/build/index-594e1572.js +1 -0
- package/build/{index-2bafc328.js → index-6bde464c.js} +1 -1
- package/build/{index-2115a785.js → index-7081b380.js} +1 -1
- package/build/{index-56226bf8.js → index-7ee02e49.js} +1 -1
- package/build/{index-fd68bdb7.js → index-8bcbbd1d.js} +1 -1
- package/build/{index-6c6477b0.js → index-a03a300e.js} +1 -1
- package/build/{index-487def80.js → index-a21f86e1.js} +1 -1
- package/build/{index-8cac71fc.js → index-a8e57e13.js} +1 -1
- package/build/{index-650f746c.js → index-b3141835.js} +1 -1
- package/build/{index-eabacc42.js → index-c5abff13.js} +1 -1
- package/build/{index-2ba9af52.js → index-d5d33d50.js} +1 -1
- package/build/{index-3cfe6be9.js → index-f31b915a.js} +6 -6
- package/build/index.js +1 -1
- package/build/{index.styled-cce65f47.js → index.styled-2a3d9464.js} +4 -4
- package/build/{index.styled-ab1adfdd.js → index.styled-8b1c5ddd.js} +1 -1
- package/build/index.styled-99d336f5.js +50 -0
- 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 +2 -2
- package/build/{routing-eb58bf99.js → routing-586bd56e.js} +1 -1
- package/build/together.js +1 -1
- package/build/{types-dc124c2c.js → types-133c6b8e.js} +1 -1
- package/build/{types-c6b697e7.js → types-39a7d5fe.js} +4 -4
- package/build/types.js +1 -1
- package/build/{useHealthToolCache-374f4461.js → useHealthToolCache-2aa8ae3d.js} +1 -1
- package/build/{useRafState-2bfbf48d.js → useRafState-00cf9a59.js} +1 -1
- package/build/{useTranslations-388b2c98.js → useTranslations-13036869.js} +1 -1
- package/build/{utils-66fc3fa8.js → utils-155a94ff.js} +1 -1
- package/build/utils-4335c86a.js +1 -0
- package/build/vaccination.js +1 -1
- package/package.json +1 -1
- package/build/core-1296b978.js +0 -1
- package/build/esm/core-aef19cc1.js +0 -1
- package/build/esm/getDynamicHealthTool-e1e9eb88.js +0 -1
- package/build/esm/index-2b4f9440.js +0 -1
- package/build/esm/index-4c42fd2d.js +0 -1
- package/build/esm/useHealthToolCache-77748b45.js +0 -1
- package/build/getDynamicHealthTool-365b67da.js +0 -1
- package/build/index-e0fd117e.js +0 -1
- package/build/index.styled-38be6a23.js +0 -50
- package/build/utils-2bd51637.js +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-e7969a8c.js → BMI_BOYS.percentile.monthly-9e358ef5.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-42b951dc.js → BMI_BOYS.percentile.weekly-4f24dcd0.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-933664a5.js → BMI_BOYS.percentile.yearly-b8a0e0fd.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-f17ef1fa.js → BMI_BOYS.zscore.monthly-728690f3.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-ed7cc2ee.js → BMI_BOYS.zscore.weekly-a759ecdf.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-096bfd78.js → BMI_BOYS.zscore.yearly-c221d0e8.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-bdb9e678.js → BMI_GIRLS.percentile.monthly-a18f6a0d.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-e9e42718.js → BMI_GIRLS.percentile.weekly-0b83258c.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-ecfbd535.js → BMI_GIRLS.percentile.yearly-e82ab0e7.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-8b52f84f.js → BMI_GIRLS.zscore.monthly-8c7940f9.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-c1519c5f.js → BMI_GIRLS.zscore.weekly-05e0ee5a.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-c72f1e1b.js → BMI_GIRLS.zscore.yearly-60232b62.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-d6942910.js → HEAD CIRCUM_BOYS.percentile.monthly-bc317c04.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-7bbe3d72.js → HEAD CIRCUM_BOYS.percentile.weekly-ad63d0de.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-cf2082c8.js → HEAD CIRCUM_BOYS.percentile.yearly-e8885937.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-fa1d4ea1.js → HEAD CIRCUM_BOYS.zscore.monthly-2f31ce32.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-46201be1.js → HEAD CIRCUM_BOYS.zscore.weekly-82ceef6c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-6f6a75ef.js → HEAD CIRCUM_BOYS.zscore.yearly-58b8d317.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-2d3c69ed.js → HEAD CIRCUM_GIRLS.percentile.monthly-2725bd27.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-38c7470e.js → HEAD CIRCUM_GIRLS.percentile.weekly-f5988461.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-7e815061.js → HEAD CIRCUM_GIRLS.percentile.yearly-7bd44fe1.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-966e1673.js → HEAD CIRCUM_GIRLS.zscore.monthly-518d8e7b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-397d5497.js → HEAD CIRCUM_GIRLS.zscore.weekly-28f4787f.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-51c69a5c.js → HEAD CIRCUM_GIRLS.zscore.yearly-19f48ca1.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-bf8bed39.js → HEIGHT_BOYS.percentile.monthly-7e3c48a7.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-51275e3e.js → HEIGHT_BOYS.percentile.weekly-35a40feb.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-d9baf324.js → HEIGHT_BOYS.percentile.yearly-52880682.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-4c7134a9.js → HEIGHT_BOYS.zscore.monthly-e3fd98ec.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-ea470e59.js → HEIGHT_BOYS.zscore.weekly-0d16d9e6.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-b4001eac.js → HEIGHT_BOYS.zscore.yearly-cf21a5d9.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-97007a17.js → HEIGHT_GIRLS.percentile.monthly-d0fc4c5b.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-2d9cf38b.js → HEIGHT_GIRLS.percentile.weekly-7edcb75d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-dcc7e180.js → HEIGHT_GIRLS.percentile.yearly-6131e7e8.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-05dab57e.js → HEIGHT_GIRLS.zscore.monthly-2399598a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-9c1227b0.js → HEIGHT_GIRLS.zscore.weekly-0a449380.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-f69f0c16.js → HEIGHT_GIRLS.zscore.yearly-c4b3db44.js} +0 -0
- /package/build/{Onboarding-763263bd.js → Onboarding-855d106a.js} +0 -0
- /package/build/{Visible-1510daae.js → Visible-99cc785d.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-5aef6340.js → WEIGHT_BOYS.percentile.monthly-ce13e1f8.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-78eae415.js → WEIGHT_BOYS.percentile.weekly-79e8295d.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-3e111a86.js → WEIGHT_BOYS.percentile.yearly-14065157.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-88e278fc.js → WEIGHT_BOYS.zscore.monthly-20b5a70b.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-ad3d219a.js → WEIGHT_BOYS.zscore.weekly-a5d7fa4d.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-cdc469bc.js → WEIGHT_BOYS.zscore.yearly-48bcaebe.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-ef315c6b.js → WEIGHT_GIRLS.percentile.monthly-a4a7382e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-b9b2294d.js → WEIGHT_GIRLS.percentile.weekly-336ef557.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-573f8c5f.js → WEIGHT_GIRLS.percentile.yearly-a522d66c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-dcf55ae9.js → WEIGHT_GIRLS.zscore.monthly-8c08ae1e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-32036680.js → WEIGHT_GIRLS.zscore.weekly-415cfc28.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-f472782e.js → WEIGHT_GIRLS.zscore.yearly-d29c998b.js} +0 -0
- /package/build/{constants-2a1ae49b.js → constants-2575f8df.js} +0 -0
- /package/build/{cookieHelper-c02a9835.js → cookieHelper-ce41346c.js} +0 -0
- /package/build/{dataTransform-50ca2b71.js → dataTransform-be4cff89.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-026be207.js → BMI_BOYS.percentile.monthly-d799e7ab.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-9d11ceed.js → BMI_BOYS.percentile.weekly-6f524062.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-915860f5.js → BMI_BOYS.percentile.yearly-0f32498c.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-027665dd.js → BMI_BOYS.zscore.monthly-44453bc2.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-36332c51.js → BMI_BOYS.zscore.weekly-532d3c4a.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-01355236.js → BMI_BOYS.zscore.yearly-6e7be1d4.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-de2fbc61.js → BMI_GIRLS.percentile.monthly-2d9268b1.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-a3e37e19.js → BMI_GIRLS.percentile.weekly-225f52d3.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-3186aba5.js → BMI_GIRLS.percentile.yearly-71f8cf0d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-c8b642f7.js → BMI_GIRLS.zscore.monthly-4c5fbe22.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-c7892f39.js → BMI_GIRLS.zscore.weekly-9c6dba69.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-2bf35542.js → BMI_GIRLS.zscore.yearly-6d0dfb33.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-bc65812f.js → HEAD CIRCUM_BOYS.percentile.monthly-71c5b06c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-c963ce3c.js → HEAD CIRCUM_BOYS.percentile.weekly-5e8de778.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-91e16bf5.js → HEAD CIRCUM_BOYS.percentile.yearly-2c865c67.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-f7ecf3be.js → HEAD CIRCUM_BOYS.zscore.monthly-19238c60.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-a052bb19.js → HEAD CIRCUM_BOYS.zscore.weekly-3d687852.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-272adbaa.js → HEAD CIRCUM_BOYS.zscore.yearly-b5df2f12.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-6a7b41c4.js → HEAD CIRCUM_GIRLS.percentile.monthly-e24a7c02.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-095cbc85.js → HEAD CIRCUM_GIRLS.percentile.weekly-e1775bd7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-0133cc9d.js → HEAD CIRCUM_GIRLS.percentile.yearly-cc92856a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-bcc9ccfd.js → HEAD CIRCUM_GIRLS.zscore.monthly-dba2197a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-c6eda8cb.js → HEAD CIRCUM_GIRLS.zscore.weekly-7e1283e1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-9d59e363.js → HEAD CIRCUM_GIRLS.zscore.yearly-95db057e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-9b992c6a.js → HEIGHT_BOYS.percentile.monthly-3f96ff99.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-3a8a7218.js → HEIGHT_BOYS.percentile.weekly-57104831.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-ab7c235b.js → HEIGHT_BOYS.percentile.yearly-382d19d1.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-a9e24711.js → HEIGHT_BOYS.zscore.monthly-ac31246d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-f15762c5.js → HEIGHT_BOYS.zscore.weekly-ed03a71f.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-e918cdf5.js → HEIGHT_BOYS.zscore.yearly-338d489d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-06edf320.js → HEIGHT_GIRLS.percentile.monthly-8e6ae50a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-cada39b4.js → HEIGHT_GIRLS.percentile.weekly-4293543e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-c6255de8.js → HEIGHT_GIRLS.percentile.yearly-53fe9da2.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-59b2af8e.js → HEIGHT_GIRLS.zscore.monthly-46990abf.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-1d14e2b6.js → HEIGHT_GIRLS.zscore.weekly-e4ab24c4.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-e839dbb2.js → HEIGHT_GIRLS.zscore.yearly-5f1f7933.js} +0 -0
- /package/build/esm/{Onboarding-ff78862f.js → Onboarding-8d78ce80.js} +0 -0
- /package/build/esm/{Visible-df051a7d.js → Visible-4deda7fa.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-ca848d26.js → WEIGHT_BOYS.percentile.monthly-83d1d112.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-3631d852.js → WEIGHT_BOYS.percentile.weekly-d9b4ba63.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-9691b24d.js → WEIGHT_BOYS.percentile.yearly-2145867b.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-24aae22c.js → WEIGHT_BOYS.zscore.monthly-eb4ffb7e.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-a573fac1.js → WEIGHT_BOYS.zscore.weekly-f49f9ac0.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-24aeb0e7.js → WEIGHT_BOYS.zscore.yearly-aa73b620.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-eb2b71f3.js → WEIGHT_GIRLS.percentile.monthly-1e23ac05.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-0fc5ac47.js → WEIGHT_GIRLS.percentile.weekly-2c91df72.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-54f86a24.js → WEIGHT_GIRLS.percentile.yearly-313dda4b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-6c507f4b.js → WEIGHT_GIRLS.zscore.monthly-670f1cbe.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-fd6436d5.js → WEIGHT_GIRLS.zscore.weekly-3eb614c8.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-e0b72bae.js → WEIGHT_GIRLS.zscore.yearly-a6338b20.js} +0 -0
- /package/build/esm/{constants-bd2e2bb9.js → constants-940d6a04.js} +0 -0
- /package/build/esm/{cookieHelper-24e8a5fb.js → cookieHelper-df820d6d.js} +0 -0
- /package/build/esm/{dataTransform-6a627eb5.js → dataTransform-0e2a6381.js} +0 -0
- /package/build/esm/{index-1626c7eb.js → index-5bb6aa13.js} +0 -0
- /package/build/esm/{isProduction-b12d596a.js → isProduction-dd42f212.js} +0 -0
- /package/build/esm/{localizeNumberFormat-1cebd783.js → localizeNumberFormat-4a78d812.js} +0 -0
- /package/build/esm/{normalizeLink-86bd6e1e.js → normalizeLink-873cf02a.js} +0 -0
- /package/build/esm/{paths-64ccdd58.js → paths-880f5744.js} +0 -0
- /package/build/esm/{screenSizeContext-4eb558b5.js → screenSizeContext-e3538e28.js} +0 -0
- /package/build/esm/{theme-6958f818.js → theme-9e139ee1.js} +0 -0
- /package/build/esm/{translationsContext-cf558e50.js → translationsContext-4d6e5519.js} +0 -0
- /package/build/esm/{tslib.es6-aa6dda30.js → tslib.es6-2cae0456.js} +0 -0
- /package/build/esm/{types-614fc596.js → types-509b5c8f.js} +0 -0
- /package/build/esm/{useIsInit-1907bb7f.js → useIsInit-ae099602.js} +0 -0
- /package/build/esm/{useOutsideClick-7843e861.js → useOutsideClick-db382ec6.js} +0 -0
- /package/build/esm/{useScrollbarSize-859a83e2.js → useScrollbarSize-bbb43f77.js} +0 -0
- /package/build/esm/{useUniqueId-224e1126.js → useUniqueId-f42d4577.js} +0 -0
- /package/build/{index-68c32ed4.js → index-955b62d4.js} +0 -0
- /package/build/{isProduction-5decd5ee.js → isProduction-216750c9.js} +0 -0
- /package/build/{localizeNumberFormat-fc44b259.js → localizeNumberFormat-e6f899f3.js} +0 -0
- /package/build/{normalizeLink-2e7b8c35.js → normalizeLink-b5159fef.js} +0 -0
- /package/build/{paths-d8522736.js → paths-26da8632.js} +0 -0
- /package/build/{screenSizeContext-58d16a70.js → screenSizeContext-0cbcce17.js} +0 -0
- /package/build/{theme-714ba8eb.js → theme-a03c9486.js} +0 -0
- /package/build/{translationsContext-5dbe0768.js → translationsContext-ff7a812d.js} +0 -0
- /package/build/{tslib.es6-71ed3e73.js → tslib.es6-47c66715.js} +0 -0
- /package/build/{types-dfb71ff9.js → types-c284f38a.js} +0 -0
- /package/build/{useIsInit-a3d864b6.js → useIsInit-e1eb70d2.js} +0 -0
- /package/build/{useOutsideClick-1fd814a9.js → useOutsideClick-db9f6d2d.js} +0 -0
- /package/build/{useScrollbarSize-79ed5c61.js → useScrollbarSize-68573d61.js} +0 -0
- /package/build/{useUniqueId-3d496ffe.js → useUniqueId-e9593656.js} +0 -0
package/build/esm/onboarding.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,_ as o}from"./tslib.es6-aa6dda30.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-ac0440c7.js";import{x as b,aC as f,J as E,aD as h,aE as v,aF as y,w,E as S}from"./utils-49cd0015.js";import{u as P,a as j,F as k,O as C,b as x}from"./index-6c3b66ef.js";import{u as B}from"./useTranslations-e8adac8a.js";import"lodash/debounce";import"./isProduction-b12d596a.js";import{L as z}from"./index-25a079fc.js";import{O as T}from"./Onboarding-ff78862f.js";export{O as OnboardingStep}from"./Onboarding-ff78862f.js";import"dayjs";import{M as F}from"./screenSizeContext-4eb558b5.js";import"styled-components";import{t as N}from"./theme-6958f818.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-f8d51cb2.js";import{yupResolver as H}from"@mantine/form";import"./index-e006ea08.js";import"./index-d99f5fe1.js";import"@mantine/dates";import{D as Y}from"./index-2bd17e3a.js";import{A as $}from"./index-d96a464a.js";import{V as G}from"./Visible-df051a7d.js";import{M as Z,h as J}from"./utils-0f4c6649.js";export{M as MAPPED_LOCALE}from"./utils-0f4c6649.js";import*as K from"yup";import Q from"lodash/throttle";import{T as X}from"./index-4c42fd2d.js";import{format as ee}from"date-fns";import"./translationsContext-cf558e50.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-224e1126.js";import"./cookieHelper-24e8a5fb.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(f,Object.assign({defaultCountry:Z[process.env.UNIFY_LOCALE]||"VN"},a.getInputProps("phone"))),t.createElement(d.Error,{size:"md"},a.errors.phone)),s=t.createElement(E,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourName")),withAsterisk:!0},a.getInputProps("name"))),l=t.createElement(E,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(h.Group,Object.assign({className:"radio-group",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("bmi.selectGender"))},a.getInputProps("gender")),t.createElement(h,{value:"0",label:r("onboarding.formEmail.genderMale")}),t.createElement(h,{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(E.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(E.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(E.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:f,onBack:E,canSkip:h,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==E||E()},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:f,disabled:f,"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")),h&&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:f,flow:E=[T.Phone,T.OTP],initialData:h,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||E[0]),[K,Q]=r(""),[X,ee]=r(""),[oe,te]=u(0,{min:0,max:2}),{isMobile:ne}=w(),re=l((()=>{const e=E.indexOf(Z)+1;e<=E.length-1&&J(E[e])}),[Z]),ae=l((()=>{const e=E.indexOf(Z)-1;e>=0&&J(E[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({},$),E.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==h?void 0:h[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:f}),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-2cae0456.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-19616958.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-f61711a0.js";import{u as P,a as j,F as k,O as C,b as x}from"./index-23c96cda.js";import{u as B}from"./useTranslations-7c64ae29.js";import"lodash/debounce";import"./isProduction-dd42f212.js";import{L as z}from"./index-ee03bd1e.js";import{O as T}from"./Onboarding-8d78ce80.js";export{O as OnboardingStep}from"./Onboarding-8d78ce80.js";import"dayjs";import{M as F}from"./screenSizeContext-e3538e28.js";import"styled-components";import{t as N}from"./theme-9e139ee1.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-1887c4a1.js";import{yupResolver as H}from"@mantine/form";import"./index-d24c00af.js";import"./index-3f63d34b.js";import"@mantine/dates";import{D as Y}from"./index-92c2686f.js";import{A as $}from"./index-dc68f019.js";import{V as G}from"./Visible-4deda7fa.js";import{M as Z,h as J}from"./utils-5c8bc72f.js";export{M as MAPPED_LOCALE}from"./utils-5c8bc72f.js";import*as K from"yup";import Q from"lodash/throttle";import{T as X}from"./index-aca4d584.js";import{format as ee}from"date-fns";import"./translationsContext-4d6e5519.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-f42d4577.js";import"./cookieHelper-df820d6d.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-2cae0456.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-f61711a0.js";import{D as k}from"./index-92c2686f.js";import"dayjs";import{M as O,k as F}from"./screenSizeContext-e3538e28.js";import B from"styled-components";import{t as z}from"./theme-9e139ee1.js";import{L as N}from"./index-ee03bd1e.js";import"./isProduction-dd42f212.js";import{L as I}from"./Onboarding-8d78ce80.js";import"./gAssets.js";import{u as T}from"./useTranslations-7c64ae29.js";import"./index-d24c00af.js";import{useInterval as D,useCounter as Z}from"@mantine/hooks";import{A}from"./index-dc68f019.js";import"lodash/debounce";import{V as _}from"./Visible-4deda7fa.js";import{createFormContext as V,yupResolver as H}from"@mantine/form";import"./index-3f63d34b.js";import"@mantine/dates";import*as q from"yup";import{createPortal as $}from"react-dom";import{B as U}from"./index-19616958.js";import{b as Y}from"./index-23c96cda.js";import R from"lodash/throttle";import{T as W}from"./index-aca4d584.js";import{format as G}from"date-fns";import"./translationsContext-4d6e5519.js";import"string-format";import K from"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-f42d4577.js";import"./cookieHelper-df820d6d.js";import"slugify";import"date-fns/locale";import"./utils-5c8bc72f.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 a}from"react";import{M as l,a as o}from"./index-
|
|
1
|
+
import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as o}from"./index-01ab910a.js";import{T as n}from"./index-aca4d584.js";import{P as i}from"./index-c62d01fb.js";import{u as c}from"./useTranslations-7c64ae29.js";import{t as s}from"./theme-9e139ee1.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-d24c00af.js";import{a as f}from"./useOutsideClick-db382ec6.js";import E from"styled-components";import{_ as k}from"./tslib.es6-2cae0456.js";import"./Onboarding-8d78ce80.js";import"./index.styled-278d87b9.js";import"./gAssets.js";import"./index-ee03bd1e.js";import"date-fns/locale";import"./isProduction-dd42f212.js";import"./translationsContext-4d6e5519.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;
|
|
@@ -18,7 +18,7 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as
|
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
padding: 4px 8px;
|
|
21
|
-
background: ${
|
|
21
|
+
background: ${s.colors.yellow600};
|
|
22
22
|
border-radius: 3px;
|
|
23
23
|
} */
|
|
24
24
|
& > * {
|
|
@@ -55,14 +55,14 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as
|
|
|
55
55
|
align-items: center;
|
|
56
56
|
gap: 4px;
|
|
57
57
|
}
|
|
58
|
-
`,T=[{name:"overweight",backgroundColor:
|
|
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;
|
|
62
62
|
padding: 24px 16px;
|
|
63
63
|
width: 100%;
|
|
64
64
|
gap: 24px;
|
|
65
|
-
border: 1px solid ${
|
|
65
|
+
border: 1px solid ${s.colors.neutral100};
|
|
66
66
|
border-radius: 8px;
|
|
67
67
|
.chart-header {
|
|
68
68
|
text-align: center;
|
|
@@ -70,4 +70,4 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as
|
|
|
70
70
|
> div {
|
|
71
71
|
width: 100%;
|
|
72
72
|
}
|
|
73
|
-
`,F=({chartProps:t,pillCarouselProps:r,idealWeight:a,description:l,siteType:m})=>{const{t:d}=
|
|
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-ee03bd1e.js";import{i as s}from"./isProduction-dd42f212.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`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>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,n as c,i 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-a19266d1.js";export{U as UserAvatar}from"./index.styled-fa80a8b4.js";export{d as TogetherDataTransforms}from"./dataTransform-b390c460.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,d as TogetherComponentGlobalContext,e as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-f61711a0.js";import"./tslib.es6-2cae0456.js";import"react";import"@mantine/core";import"./index-7230353c.js";import"styled-components";import"./screenSizeContext-e3538e28.js";import"lodash/throttle";import"./index-0645b438.js";import"./gAssets.js";import"./index-ee03bd1e.js";import"date-fns/locale";import"./Onboarding-8d78ce80.js";import"./isProduction-dd42f212.js";import"./index-d24c00af.js";import"@mantine/carousel";import"@mantine/hooks";import"./index-aca4d584.js";import"./index-19616958.js";import"./index-a62315fd.js";import"./index-3f63d34b.js";import"./theme-9e139ee1.js";import"dayjs";import"./useUniqueId-f42d4577.js";import"@mantine/dates";import"./translationsContext-4d6e5519.js";import"string-format";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-5f38dff4.js";import"./useTranslations-7c64ae29.js";import"./index-01ab910a.js";import"date-fns";import"./index-b452faa0.js";import"lodash/debounce";import"./types-509b5c8f.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-0bb9ace1.js";import"./paths-880f5744.js";import"./constants-940d6a04.js";import"react-contenteditable";import"./cookieHelper-df820d6d.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-278d87b9.js";import"uuid";import"./utils-5c8bc72f.js";import"dayjs/plugin/relativeTime";import"./index-dd69cd16.js";import"./routing-158b3332.js";import"react-keyed-flatten-children";import"slugify";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-2cae0456.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-7c64ae29.js";import d from"lodash/debounce";import{I as p,L as u,a as h}from"./constants-940d6a04.js";import{I as g}from"./index-a62315fd.js";import m,{createGlobalStyle as C}from"styled-components";import{T as b}from"./index-aca4d584.js";import{t as f}from"./theme-9e139ee1.js";import{M as y}from"./screenSizeContext-e3538e28.js";import v from"react-loading-skeleton";import x from"lodash/shuffle";import{a as w}from"./useOutsideClick-db382ec6.js";import{P as E}from"./paths-880f5744.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 M,d as F}from"./index-ee03bd1e.js";import{g as R,s as $,d as T}from"./cookieHelper-df820d6d.js";import{C as P,I as A}from"./index-3f63d34b.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(M))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(M);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};$(M,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{T(M),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;
|
|
@@ -180,9 +180,9 @@ import{a as e}from"./tslib.es6-aa6dda30.js";import*as t from"react";import i,{us
|
|
|
180
180
|
position: relative;
|
|
181
181
|
`,Me=m(Ie)`
|
|
182
182
|
flex: 1;
|
|
183
|
-
`,
|
|
183
|
+
`,Fe=m(Ie)`
|
|
184
184
|
flex: 2;
|
|
185
|
-
`,
|
|
185
|
+
`,Re=m((({className:e,color:t})=>i.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"8",fill:"white"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z",fill:t||"currentColor"}))))`
|
|
186
186
|
display: none;
|
|
187
187
|
&.shown {
|
|
188
188
|
display: block;
|
|
@@ -220,7 +220,7 @@ import{a as e}from"./tslib.es6-aa6dda30.js";import*as t from"react";import i,{us
|
|
|
220
220
|
}
|
|
221
221
|
`,Pe=m(b)`
|
|
222
222
|
font-weight: ${({theme:e})=>e.sizes.fwSemiBold};
|
|
223
|
-
`,Ae=({onClick:e})=>{const{t:t}=c(),a=t("booking.searchBar.searchButton");return i.createElement(Te,{onClick:e,title:a},i.createElement($e,null),i.createElement(Pe,{size:"s3",color:"white"},a))};function Ne({isMobile:e,state:t,dispatch:a,debouncedFetchCitiesByKeyword:s,debouncedFetchSearchResults:r,focusLocationInput:d,focusSearchInput:p,renderLocationResults:u,renderSearchResults:g,locationTrackingAttributes:m,trackingAttributes:C,onSearch:b,initalSearchValue:y}){const v=l(null),x=l(null),{focused:E,searchLocationKeywords:S,geoLocationPermission:L,selectedLocation:k,searchKeywords:O,inputSearchPlaceholder:j}=t,{t:I}=c();ge({wrapperRef:x,disabled:!!j}),w(v,(()=>{e||a({type:Le.ClickOutsideInputLocation})})),w(x,(()=>{e||a({type:Le.ClickOutsideInputSearch})}));const M=n((()=>"granted"===L&&(null==k?void 0:k.id)===h?f.colors.primaryBase:f.colors.gray400),[L,k]),
|
|
223
|
+
`,Ae=({onClick:e})=>{const{t:t}=c(),a=t("booking.searchBar.searchButton");return i.createElement(Te,{onClick:e,title:a},i.createElement($e,null),i.createElement(Pe,{size:"s3",color:"white"},a))};function Ne({isMobile:e,state:t,dispatch:a,debouncedFetchCitiesByKeyword:s,debouncedFetchSearchResults:r,focusLocationInput:d,focusSearchInput:p,renderLocationResults:u,renderSearchResults:g,locationTrackingAttributes:m,trackingAttributes:C,onSearch:b,initalSearchValue:y}){const v=l(null),x=l(null),{focused:E,searchLocationKeywords:S,geoLocationPermission:L,selectedLocation:k,searchKeywords:O,inputSearchPlaceholder:j}=t,{t:I}=c();ge({wrapperRef:x,disabled:!!j}),w(v,(()=>{e||a({type:Le.ClickOutsideInputLocation})})),w(x,(()=>{e||a({type:Le.ClickOutsideInputSearch})}));const M=n((()=>"granted"===L&&(null==k?void 0:k.id)===h?f.colors.primaryBase:f.colors.gray400),[L,k]),F=o((function(e){a({type:Le.ChangeInputSearch,payload:e}),"function"!=typeof b&&(e.trim().length>Ee[t.locale]||y?r(e.trim(),t):(r.cancel(),a({type:Le.DisplayInitialSearchResults})))}),[a,t]),R=o((function(e){a({type:Le.ChangeInputLocation,payload:e}),e.trim().length>Ee[t.locale]?s(e.trim()):(s.cancel(),a({type:Le.DisplayInitialCities}))}),[s,a]);return i.createElement(je,null,i.createElement(Me,{ref:v},i.createElement(K,{inputClassName:"location"===E?"focused":void 0,placeholder:I("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:i.createElement(Y,{className:"location-pin-icon",color:M}),actionIcon:i.createElement(Re,{color:f.colors.gray300,className:""!==S?"shown":""}),onActionClick:function(){a({type:Le.ClearInputLocation}),s.cancel(),d()},value:S,onChange:R,onFocus:()=>a({type:Le.FocusInputLocation}),size:"md",trackingAttributes:m}),!e&&u()),i.createElement(Fe,{ref:x},i.createElement(K,{placeholder:j||I("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:i.createElement(Re,{color:f.colors.gray300,className:""!==O?"shown":""}),onActionClick:function(){a({type:Le.ClearInputSearch}),r.cancel(),r("",t),p()},value:O,onChange:F,onFocus:()=>a({type:Le.FocusInputSearch}),inputClassName:"search"===E?"focused":void 0,size:"md",trackingAttributes:C,onKeyPress:e=>{t.autoCompleteDisabled&&"Enter"===e.key&&b&&b({cityId:t.selectedLocation.id,keyword:O})},enterKeyHint:t.autoCompleteDisabled?"search":void 0}),!e&&g()),t.autoCompleteDisabled&&!t.isMobile&&i.createElement(Ae,{onClick:()=>{b({cityId:t.selectedLocation.id,keyword:O})}}))}const Be=()=>i.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},i.createElement("path",{d:"M7.00004 0.666992C5.29757 0.666992 3.64067 0.813476 2.52087 1.03158C1.73311 1.18457 1.16671 1.86816 1.16671 2.6722V4.83366C1.16671 5.29264 1.54106 5.66699 2.00004 5.66699H12C12.459 5.66699 12.8334 5.29264 12.8334 4.83366V2.69824C12.8334 1.89421 12.267 1.21061 11.4792 1.05762C10.3562 0.839518 8.69275 0.666992 7.00004 0.666992ZM6.16671 1.50033H7.83337V2.33366H8.66671V4.00033H7.83337V4.83366H6.16671V4.00033H5.33337V2.33366H6.16671V1.50033ZM1.42712 6.50033C1.3197 6.89421 1.24158 7.32389 1.19275 7.77637C1.14718 8.18001 1.05603 9.25423 1.06254 9.36491C0.603556 9.72624 0.333374 10.2861 0.333374 10.9014C0.333374 11.8356 0.977906 12.6364 1.84379 12.8285C2.74548 15.0192 4.55212 17.3337 7.00004 17.3337C9.44796 17.3337 11.2546 14.9964 12.1563 12.8024C13.0222 12.6136 13.6667 11.8356 13.6667 10.9014C13.6667 10.2861 13.3965 9.72624 12.9375 9.36491C12.9441 9.25423 12.8562 8.16048 12.8073 7.75033C12.7552 7.30436 12.6804 6.89095 12.573 6.50033H5.35942C6.52804 8.20606 9.27543 7.18717 11.0365 7.62012C11.5736 8.79199 11.1667 10.4326 11.1667 10.4326L11.8177 10.641C11.9121 10.6702 12 10.7549 12 10.9014C12 11.0576 11.8861 11.1943 11.6875 11.1878L11.0105 11.0837L10.7761 11.7347C9.96554 14.0492 8.4128 15.667 7.00004 15.667C5.58728 15.667 4.03455 14.0492 3.224 11.7347L2.96358 11.0837L2.26046 11.1878C2.11723 11.1878 2.00004 11.0576 2.00004 10.9014C2.00004 10.7549 2.08793 10.6702 2.18233 10.641L2.83337 10.4326C2.73246 10.5531 2.4102 8.7041 2.83337 8.03678C3.59184 7.5127 4.2266 7.87728 5.12504 6.50033H1.42712ZM5.17712 9.05241C4.57166 9.05241 4.08337 9.55371 4.08337 10.1722C4.08337 10.7907 4.57166 11.292 5.17712 11.292C5.78259 11.292 6.27087 10.7907 6.27087 10.1722C6.27087 9.55371 5.78259 9.05241 5.17712 9.05241ZM8.82296 9.05241C8.21749 9.05241 7.72921 9.55371 7.72921 10.1722C7.72921 10.7907 8.21749 11.292 8.82296 11.292C9.42843 11.292 9.91671 10.7907 9.91671 10.1722C9.91671 9.55371 9.42843 9.05241 8.82296 9.05241Z",fill:"#9AA2AC"})),Ve=()=>i.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},i.createElement("path",{d:"M8.99996 0.666992C6.27535 0.666992 3.85348 1.97884 2.33329 4.00033H4.59892C5.80009 2.94564 7.36259 2.33366 8.99996 2.33366C10.6373 2.33366 12.1998 2.94564 13.401 4.00033H15.6666C14.1464 1.97884 11.7246 0.666992 8.99996 0.666992ZM1.78642 4.83366C1.07678 7.04069 0.666626 9.59928 0.666626 12.3337C0.666626 14.085 0.826131 15.7679 1.13538 17.3337H16.8645C17.1738 15.7679 17.3333 14.085 17.3333 12.3337C17.3333 9.59928 16.9231 7.04069 16.2135 4.83366H1.78642ZM8.99996 7.33366C11.3014 7.33366 13.1666 9.19889 13.1666 11.5003C13.1666 13.8018 11.3014 15.667 8.99996 15.667C6.69853 15.667 4.83329 13.8018 4.83329 11.5003C4.83329 9.19889 6.69853 7.33366 8.99996 7.33366ZM8.16663 9.00033V10.667H6.49996V12.3337H8.16663V14.0003H9.83329V12.3337H11.5V10.667H9.83329V9.00033H8.16663Z",fill:"#9AA2AC"})),De=()=>i.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},i.createElement("path",{d:"M8 0.666992L0.5 5.63533V14.8337C0.5 15.7545 1.24583 16.5003 2.16667 16.5003H13.8333C14.7542 16.5003 15.5 15.7545 15.5 14.8337V5.63533L8 0.666992ZM11.3333 10.667H8.83333V13.167H7.16667V10.667H4.66667V9.00033H7.16667V6.50033H8.83333V9.00033H11.3333V10.667Z",fill:"#9AA2AC"})),ze=()=>i.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},i.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),He=m.header`
|
|
224
224
|
display: flex;
|
|
225
225
|
justify-content: space-between;
|
|
226
226
|
padding: 12px 24px;
|
|
@@ -336,7 +336,7 @@ import{a as e}from"./tslib.es6-aa6dda30.js";import*as t from"react";import i,{us
|
|
|
336
336
|
0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
|
|
337
337
|
0px 0px 1px rgba(0, 0, 0, 0.04);
|
|
338
338
|
}
|
|
339
|
-
`,nt=({data:e,state:t,dispatch:a,isMobile:o,isLoading:n,keyword:s,hideResults:l,isNavResultItem:r})=>i.createElement(ot,null,e&&e.map((e=>l&&l.includes(e.type)?i.createElement(i.Fragment,null):i.createElement(at,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:o,isLoading:n,keyword:s,isNavResultItem:r})))),st=(e,t,i)=>N(e,Object.assign(Object.assign({},t),{domain:
|
|
339
|
+
`,nt=({data:e,state:t,dispatch:a,isMobile:o,isLoading:n,keyword:s,hideResults:l,isNavResultItem:r})=>i.createElement(ot,null,e&&e.map((e=>l&&l.includes(e.type)?i.createElement(i.Fragment,null):i.createElement(at,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:o,isLoading:n,keyword:s,isNavResultItem:r})))),st=(e,t,i)=>N(e,Object.assign(Object.assign({},t),{domain:F[i||"en-PH"]}));const lt=({isMobile:t,careApiDomain:g,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:f="",careFrontDomain:y="/care",isDebug:v=!1,askForGeolocationPermission:x=!1,gaTrackingSearchBar:w,gaTrackingLocationSearch:S,autoCompleteDisabled:L=!1,inputSearchPlaceholder:k="",isOptionAllLocation:O=!1,hideResults:j=[],isNavResultItem:I=!0,routerPush:M,onGeoLocationPermissionChange:F,onSearch:R,onChangeLocation:$})=>{const{t:T,locale:P}=c(),A=l(null),N=l(null),[B,K]=a(void 0),[Z,Y]=a(!1),{geoLocationPermission:U,geoLocationCoordinates:W,requestGeoLocation:Q}=V(),[q,J]=r(Oe,Se,(e=>Object.assign(Object.assign({},e),{isDebug:v,isMobile:t,geoLocationPermission:m||U||"unset",geoLocationCoordinates:C||W||null,searchKeywords:f,initialSelectedCity:b||null,selectedLocation:b||e.selectedLocation||null,searchLocationKeywords:(null==b?void 0:b.name)||e.searchLocationKeywords,autoCompleteDisabled:L,inputSearchPlaceholder:k,locale:P}))),{navigateTo:X,focused:ee,isLoadingCities:te,cities:ae,searchKeywords:oe,geoLocationPermission:ne,selectedLocation:se,initialSelectedCity:le,defaultCity:re,searchResults:ce,isLoadingSearchResults:de,isMobileModalOpened:pe,inputSearchPlaceholder:ue}=q,{fetchCitiesByLocation:he,fetchCitiesByKeyword:ge,fetchSearchResults:me}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const a=o((function(a,o={}){const n=`${t}${a}`;return e({type:Le.FetchCitiesStart}),fetch(st(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:Le.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:o((function({coordinates:t}){let o={};const n={};t&&(o={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(n.noPaging=1);const s=[a(E.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(E.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:Le.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(E.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:Le.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:o((function(a,o){const n=`${t}${E.GET_SEARCH_V2}`;e({type:Le.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:l,geoLocationCoordinates:r}=o;let c="";if(!l||!s)return void e({type:Le.FetchSearchResultsFinish});l.id===h?r||(c=s.id):c=l.id===p?"":l.id;const d=(null==r?void 0:r.lat)||"",u=(null==r?void 0:r.lng)||"";return fetch(st(n,{domain:t,searchType:"global",keyword:a.trim().length>Ee[i]?a.trim():"",city:c===h?"":c,lat:d,lng:u},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:Le.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:Le.FetchSearchResultsFinish})))}),[i,t,e])}}({dispatch:J,locale:P,careApiDomain:g}),be=n((()=>{var e;return{id:h,name:T("booking.searchBar.currentLocation"),slug:null===(e=u[P])||void 0===e?void 0:e.CURRENT}}),[T,P]),fe=n((()=>d(ge,400)),[ge]),ye=n((()=>d(me,400)),[me]);s((()=>{""!==f&&f!==q.searchKeywords&&J({type:Le.UpdateInitialSearchValue,payload:f})}),[f]),s((()=>{x&&(null==se?void 0:se.id)===h&&"unset"===ne&&Q()}),[x,se,ne]),s((()=>{m||ne===U||("granted"===U&&W?J({type:Le.GrantGeoLocationPermission,payload:W}):"denied"===U&&J({type:Le.DenyGeoLocationPermission}))}),[ne,U,W,m]),s((()=>{X&&(M?M(X):window.location.href=`${y}${X}`)}),[X]);const ve=o((function(){J({type:Le.SelectCurrentLocation,payload:be})}),[T,J]);s((()=>{var e;"denied"===ne||le||J({type:Le.SelectLocation,payload:{name:T("booking.searchBar.allLocations"),id:p,slug:null===(e=u[P])||void 0===e?void 0:e.ALL}}),F&&F(ne,q.geoLocationCoordinates),t&&"granted"===ne&&se&&J({type:Le.FocusInputSearch}),he({coordinates:q.geoLocationCoordinates})}),[ne]),s((()=>{se&&re&&me(q.searchKeywords,q)}),[se,re]),s((()=>{k!==ue&&J({type:Le.SetInputSearchPlaceholder,payload:k})}),[k,ue]),s((()=>{pe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[pe]);const xe=o((function(e){"ms-MY"===P&&Y(!0),J({type:Le.SelectLocation,payload:e}),"ms-MY"!==P&&Ie(),$&&$(e)}),[T,J]);function ke(){"ms-MY"===P&&Y(!0),t&&"granted"!==q.geoLocationPermission?Q():(ve(),"ms-MY"!==P&&Ie())}function je(){var e;A.current&&(null===(e=A.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ie(){var e;A.current&&(null===(e=A.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Me(){J({type:Le.CloseMobileModal})}function Fe(){return"location"!==ee?null:i.createElement(ie,{isLoading:te,cities:ae,onLocationClick:xe,onCurrentLocationClick:ke,isLocationLoading:te,geoLocationPermission:ne,selectedLocation:se,isOptionAllLocation:O})}function Re(){return"search"!==ee?null:q.autoCompleteDisabled?t?i.createElement(Ae,{onClick:()=>{R({cityId:q.selectedLocation.id,keyword:oe}),Me()}}):null:i.createElement(nt,{data:ce,state:q,dispatch:J,isMobile:!1,keyword:oe,isLoading:de,hideResults:j,isNavResultItem:I})}function $e(){return i.createElement(Ne,{isMobile:t,state:q,dispatch:J,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:ye,focusLocationInput:je,focusSearchInput:Ie,renderLocationResults:Fe,renderSearchResults:Re,trackingAttributes:w,locationTrackingAttributes:S,onSearch:R,initalSearchValue:f})}return s((()=>{if(window.visualViewport){const e=e=>{const t=e.target;K(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[K]),s((()=>{if(se&&Z&&"ms-MY"===P){const e=`/${se.slug}/hospital`;J({type:Le.NavigateTo,payload:e}),Y(!1)}}),[Z,P,se]),t?i.createElement(i.Fragment,null,i.createElement(G,null),i.createElement(_,{ref:N}),i.createElement(z,{id:"booking-search-bar",ref:A,"data-is-modal":t&&pe,style:{"--mobile-care-searchbar-height":pe&&B?`${B}px`:"100%"}},pe?i.createElement(i.Fragment,null,i.createElement(H,null,i.createElement(we,{headingText:T("booking.searchBar.searchButton"),onLeftClick:Me}),$e()),Fe(),Re()):i.createElement(Ce,{onClick:function(){var t;return e(this,void 0,void 0,(function*(){N.current&&N.current.focus(),J({type:Le.OpenMobileModal}),yield Promise.resolve(),A.current&&(null===(t=A.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:ee,value:oe,trackingAttributes:w,inputSearchPlaceholder:k}))):i.createElement(D,{id:"booking-search-bar",ref:A},$e())},rt=m.div``,ct=m.div`
|
|
340
340
|
background-color: ${f.colors.neutral50};
|
|
341
341
|
padding-bottom: 10px;
|
|
342
342
|
${y.mbDown} {
|
|
@@ -477,7 +477,7 @@ import{a as e}from"./tslib.es6-aa6dda30.js";import*as t from"react";import i,{us
|
|
|
477
477
|
line-height: 22px;
|
|
478
478
|
cursor: pointer;
|
|
479
479
|
}
|
|
480
|
-
`;const wt=({state:e,type:t,results:a,location:o,isLoading:s,typeInformation:l,dispatch:r})=>{const{t:d}=c(),{selectedLocation:p}=e,u=n((()=>l[t].slug),[l,t]);return i.createElement(ft,null,i.createElement(yt,null,i.createElement("div",{className:"title"},d("booking.searchResult.description",{search_type:l[t].name,search_location:o})),a.length>0&&i.createElement("div",{className:"btn-see-all",onClick:()=>{const e=`/${p.slug}/${u}`;e&&r({type:ht.NavigateTo,payload:e})}},d("home.seeAll"))),i.createElement(vt,null,s&&Array(3).fill(void 0).map(((e,a)=>i.createElement(xt,{key:t+"loading"+a,className:2===a?"last-item":""},i.createElement("div",{className:"image-item"},i.createElement(S,{height:48,circle:!0,mb:"xl",animate:!0})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},i.createElement(S,{height:8,mt:10,radius:"xl",animate:!0})),i.createElement("div",{className:"description"},i.createElement("div",{className:"sub-description"},i.createElement(S,{height:8,mt:10,radius:"xl",animate:!0}))))))),!s&&a&&a.length>0&&i.createElement(i.Fragment,null,a.map(((e,o)=>{var n,s;const c=a.length>4&&3===o||a.length<=4&&o===a.length-1;let d="";return"hospital"===t&&(d=(null==e?void 0:e.address)||""),"doctor"===t&&(d=(null===(n=null==e?void 0:e.specialties)||void 0===n?void 0:n.join(", "))||""),"service"===t&&(d=(null===(s=null==e?void 0:e.organization)||void 0===s?void 0:s.name)||""),o>=4?i.createElement(i.Fragment,null):i.createElement(xt,{key:e.id,className:c?"last-item":"",onClick:()=>(e=>{let i="";switch(t){case"service":i=`/${p.slug}/${u}/${e.slug}`;break;case"doctor":case"hospital":i=`/${u}/${e.slug}-${e.id}`}i&&r({type:ht.NavigateTo,payload:i})})(e)},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.logo||e.avatar,alt:e.name})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},e.name),i.createElement("div",{className:"description"},l[t].icon,i.createElement("div",{className:"sub-description"},d))))}))),!s&&0===(null==a?void 0:a.length)&&i.createElement(b,{size:"sm",color:f.colors.gray400},d("booking.searchBar.noResults"))))},Et=m.div`
|
|
480
|
+
`;const wt=({state:e,type:t,results:a,location:o,isLoading:s,typeInformation:l,dispatch:r})=>{const{t:d}=c(),{selectedLocation:p}=e,u=n((()=>l[t].slug),[l,t]);return i.createElement(ft,null,i.createElement(yt,null,i.createElement("div",{className:"title"},d("booking.searchResult.description",{search_type:l[t].name,search_location:o})),a.length>0&&i.createElement("div",{className:"btn-see-all",onClick:()=>{const e=`/${p.slug}/${u}`;e&&r({type:ht.NavigateTo,payload:e})}},d("home.seeAll"))),i.createElement(vt,null,s&&Array(3).fill(void 0).map(((e,a)=>i.createElement(xt,{key:t+"loading"+a,className:2===a?"last-item":""},i.createElement("div",{className:"image-item"},i.createElement(S,{height:48,circle:!0,mb:"xl",animate:!0})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},i.createElement(S,{height:8,mt:10,radius:"xl",animate:!0})),i.createElement("div",{className:"description"},i.createElement("div",{className:"sub-description"},i.createElement(S,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!s&&a&&a.length>0&&i.createElement(i.Fragment,null,a.map(((e,o)=>{var n,s;const c=a.length>4&&3===o||a.length<=4&&o===a.length-1;let d="";return"hospital"===t&&(d=(null==e?void 0:e.address)||""),"doctor"===t&&(d=(null===(n=null==e?void 0:e.specialties)||void 0===n?void 0:n.join(", "))||""),"service"===t&&(d=(null===(s=null==e?void 0:e.organization)||void 0===s?void 0:s.name)||""),o>=4?i.createElement(i.Fragment,null):i.createElement(xt,{key:e.id,className:c?"last-item":"",onClick:()=>(e=>{let i="";switch(t){case"service":i=`/${p.slug}/${u}/${e.slug}`;break;case"doctor":case"hospital":i=`/${u}/${e.slug}-${e.id}`}i&&r({type:ht.NavigateTo,payload:i})})(e)},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.logo||e.avatar,alt:e.name})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},e.name),i.createElement("div",{className:"description"},l[t].icon,i.createElement("div",{className:"sub-description"},d))))}))),!s&&0===(null==a?void 0:a.length)&&i.createElement(b,{size:"sm",color:f.colors.gray400},d("booking.searchBar.noResults"))))},Et=m.div`
|
|
481
481
|
position: relative;
|
|
482
482
|
|
|
483
483
|
${y.mbDown} {
|
|
@@ -558,7 +558,7 @@ import{a as e}from"./tslib.es6-aa6dda30.js";import*as t from"react";import i,{us
|
|
|
558
558
|
`;m(Y)`
|
|
559
559
|
width: 12px;
|
|
560
560
|
height: 18px;
|
|
561
|
-
`;const kt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),Ot=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),jt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),It=()=>i.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},i.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),Mt=({state:e,isMobile:t,debouncedFetchSearchResults:a,selectedLocation:s,onSpecialtyClick:r,dispatch:d})=>{var p;const{t:h,locale:g}=c(),m=l(null),C=n((()=>u[g]),[g]),f=n((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:t?"border: 1px solid #d9d9d9":"none",height:t?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:t?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[t]),y=o((function(e){console.log(e)}),[a,d]);return w(m,(()=>{d({type:ht.ClickOutsideInputSpecialty})})),i.createElement(Et,{ref:m},i.createElement(L.Wrapper,null,i.createElement(L,{size:t?"md":"lg",placeholder:h("booking.searchPopup.specialties"),value:(null===(p=null==e?void 0:e.selectedSpecialty)||void 0===p?void 0:p.name)||"",rightSection:i.createElement(B,null),styles:f,onFocus:()=>d({type:ht.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&i.createElement(St,null,i.createElement(Lt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:h("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:C.SPECIALTIES})}},i.createElement("div",{className:"image-item"},i.createElement(It,null)),i.createElement(b,{size:"md"},h("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>i.createElement(Lt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==s?void 0:s.id)===e.id},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.thumbnail,alt:e.name})),i.createElement(b,{size:"md"},e.name))))))},Rt=({state:e,type:t,isMobile:a,isLoading:s,initalSearchValue:r,typeInformation:d,debouncedFetchSearchResults:p,trackingAttributes:u,focusSearchInput:h,onSearch:g,dispatch:m})=>{var C;const{t:b}=c(),f=l(null),y=n((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),v=n((()=>"doctor"===t?b("booking.searchBar.placeholder.doctor"):"service"===t?b("booking.searchBar.placeholder.service"):"hospital"===t?b("booking.searchBar.placeholder.hospital"):"specialty"===t?b("booking.searchBar.placeholder.specialty"):""),[t]),x=n((()=>({root:{flex:1}})),[]),E=n((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),S=n((()=>({input:{color:"#262626"}})),[]);w(f,(()=>{m({type:ht.ClickOutsideInputSearch})}));const k=o((function(i){m({type:ht.ChangeInputSearch,payload:i}),"function"!=typeof g&&(i.trim().length>pt[e.locale]||r||0===i.trim().length?p(i.trim(),e,t):(p.cancel(),m({type:ht.DisplayInitialSearchResults})))}),[m,e,t]),O=o((function(e){m({type:ht.SelectSpecialty,payload:e}),h()}),[m]);return i.createElement(Ct,{ref:f},"specialty"===t?i.createElement(L.Wrapper,{styles:x},i.createElement(L,{icon:i.createElement(A.Search,null),size:a?"md":"lg",placeholder:v,styles:S,onChange:e=>{k(e.target.value)}})):i.createElement(i.Fragment,null,a?i.createElement(i.Fragment,null,i.createElement(Mt,{state:e,isMobile:a,dispatch:m,debouncedFetchSearchResults:p,onSpecialtyClick:O}),i.createElement(L.Wrapper,{styles:x},i.createElement(L,{icon:i.createElement(A.Search,null),size:"md",placeholder:v,onFocus:()=>m({type:ht.FocusInputSearch}),onChange:e=>{k(e.target.value)}}))):i.createElement(L.Wrapper,{styles:x},i.createElement(L,Object.assign({icon:i.createElement(A.Search,null),size:"lg",placeholder:v,styles:E,name:"search-results",autoComplete:"off",onChange:e=>{k(e.target.value)},onFocus:()=>m({type:ht.FocusInputSearch})},y,{rightSection:i.createElement(Mt,{state:e,isMobile:a,dispatch:m,debouncedFetchSearchResults:p,onSpecialtyClick:O})}))),"search"===e.focused&&i.createElement(bt,null,i.createElement(wt,{type:t,state:e,results:(null===(C=e.searchResults)||void 0===C?void 0:C[t])||[],location:e.selectedLocation.name,dispatch:m,isLoading:s,typeInformation:d}))))},Ft=m.div`
|
|
561
|
+
`;const kt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),Ot=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),jt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),It=()=>i.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},i.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),Mt=({state:e,isMobile:t,debouncedFetchSearchResults:a,selectedLocation:s,onSpecialtyClick:r,dispatch:d})=>{var p;const{t:h,locale:g}=c(),m=l(null),C=n((()=>u[g]),[g]),f=n((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:t?"border: 1px solid #d9d9d9":"none",height:t?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:t?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[t]),y=o((function(e){console.log(e)}),[a,d]);return w(m,(()=>{d({type:ht.ClickOutsideInputSpecialty})})),i.createElement(Et,{ref:m},i.createElement(L.Wrapper,null,i.createElement(L,{size:t?"md":"lg",placeholder:h("booking.searchPopup.specialties"),value:(null===(p=null==e?void 0:e.selectedSpecialty)||void 0===p?void 0:p.name)||"",rightSection:i.createElement(B,null),styles:f,onFocus:()=>d({type:ht.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&i.createElement(St,null,i.createElement(Lt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:h("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:C.SPECIALTIES})}},i.createElement("div",{className:"image-item"},i.createElement(It,null)),i.createElement(b,{size:"md"},h("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>i.createElement(Lt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==s?void 0:s.id)===e.id},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.thumbnail,alt:e.name})),i.createElement(b,{size:"md"},e.name))))))},Ft=({state:e,type:t,isMobile:a,isLoading:s,initalSearchValue:r,typeInformation:d,debouncedFetchSearchResults:p,trackingAttributes:u,focusSearchInput:h,onSearch:g,dispatch:m})=>{var C;const{t:b}=c(),f=l(null),y=n((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),v=n((()=>"doctor"===t?b("booking.searchBar.placeholder.doctor"):"service"===t?b("booking.searchBar.placeholder.service"):"hospital"===t?b("booking.searchBar.placeholder.hospital"):"specialty"===t?b("booking.searchBar.placeholder.specialty"):""),[t]),x=n((()=>({root:{flex:1}})),[]),E=n((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),S=n((()=>({input:{color:"#262626"}})),[]);w(f,(()=>{m({type:ht.ClickOutsideInputSearch})}));const k=o((function(i){m({type:ht.ChangeInputSearch,payload:i}),"function"!=typeof g&&(i.trim().length>pt[e.locale]||r||0===i.trim().length?p(i.trim(),e,t):(p.cancel(),m({type:ht.DisplayInitialSearchResults})))}),[m,e,t]),O=o((function(e){m({type:ht.SelectSpecialty,payload:e}),h()}),[m]);return i.createElement(Ct,{ref:f},"specialty"===t?i.createElement(L.Wrapper,{styles:x},i.createElement(L,{icon:i.createElement(A.Search,null),size:a?"md":"lg",placeholder:v,styles:S,onChange:e=>{k(e.target.value)}})):i.createElement(i.Fragment,null,"service"===t?i.createElement(L.Wrapper,{styles:x},i.createElement(L,{icon:i.createElement(A.Search,null),size:a?"md":"lg",placeholder:v,onFocus:()=>m({type:ht.FocusInputSearch}),onChange:e=>{k(e.target.value)}})):i.createElement(i.Fragment,null,a?i.createElement(i.Fragment,null,i.createElement(Mt,{state:e,isMobile:a,dispatch:m,debouncedFetchSearchResults:p,onSpecialtyClick:O}),i.createElement(L.Wrapper,{styles:x},i.createElement(L,{icon:i.createElement(A.Search,null),size:"md",placeholder:v,onFocus:()=>m({type:ht.FocusInputSearch}),onChange:e=>{k(e.target.value)}}))):i.createElement(L.Wrapper,{styles:x},i.createElement(L,Object.assign({icon:i.createElement(A.Search,null),size:"lg",placeholder:v,styles:E,name:"search-results",autoComplete:"off",onChange:e=>{k(e.target.value)},onFocus:()=>m({type:ht.FocusInputSearch})},y,{rightSection:i.createElement(Mt,{state:e,isMobile:a,dispatch:m,debouncedFetchSearchResults:p,onSpecialtyClick:O})})))),"search"===e.focused&&i.createElement(bt,null,i.createElement(wt,{type:t,state:e,results:(null===(C=e.searchResults)||void 0===C?void 0:C[t])||[],location:e.selectedLocation.name,dispatch:m,isLoading:s,typeInformation:d}))))},Rt=m.div`
|
|
562
562
|
position: relative;
|
|
563
563
|
|
|
564
564
|
${y.mbDown} {
|
|
@@ -621,7 +621,7 @@ import{a as e}from"./tslib.es6-aa6dda30.js";import*as t from"react";import i,{us
|
|
|
621
621
|
`,Pt=m(Y)`
|
|
622
622
|
width: 12px;
|
|
623
623
|
height: 18px;
|
|
624
|
-
`,At=({state:e,isMobile:t,debouncedFetchCitiesByKeyword:a,selectedLocation:s,trackingAttributes:r,onLocationClick:d,dispatch:h})=>{const{t:g,locale:m}=c(),C=l(null),y=n((()=>r?{"data-event-category":r.dataEventCategory,"data-event-action":r.dataEventAction,"data-event-label":r.dataEventLabel}:{}),[r]),v=o((function(t){h({type:ht.ChangeInputLocation,payload:t}),t.trim().length>pt[e.locale]?a(t.trim()):(a.cancel(),h({type:ht.DisplayInitialCities}))}),[a,h]);return w(C,(()=>{h({type:ht.ClickOutsideInputLocation})})),i.createElement(
|
|
624
|
+
`,At=({state:e,isMobile:t,debouncedFetchCitiesByKeyword:a,selectedLocation:s,trackingAttributes:r,onLocationClick:d,dispatch:h})=>{const{t:g,locale:m}=c(),C=l(null),y=n((()=>r?{"data-event-category":r.dataEventCategory,"data-event-action":r.dataEventAction,"data-event-label":r.dataEventLabel}:{}),[r]),v=o((function(t){h({type:ht.ChangeInputLocation,payload:t}),t.trim().length>pt[e.locale]?a(t.trim()):(a.cancel(),h({type:ht.DisplayInitialCities}))}),[a,h]);return w(C,(()=>{h({type:ht.ClickOutsideInputLocation})})),i.createElement(Rt,{ref:C},i.createElement(L.Wrapper,null,i.createElement(L,Object.assign({size:t?"md":"lg",placeholder:"Search location",value:e.searchLocationKeywords,onFocus:()=>h({type:ht.FocusInputLocation}),onChange:e=>{v(e.target.value)}},y))),"location"===e.focused&&i.createElement($t,null,i.createElement(Tt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;d&&d({name:g("booking.searchBar.allLocations"),id:p,slug:null===(e=u[m])||void 0===e?void 0:e.ALL})}},i.createElement(Pt,{color:f.colors.neutral400}),i.createElement(b,{size:"md"},g("booking.searchBar.allLocations"))),e.cities.map((e=>i.createElement(Tt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),d&&d(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==s?void 0:s.id)===e.id},i.createElement(Pt,{color:f.colors.neutral400}),i.createElement(b,{size:"md"},e.name))))))},Nt=m.div`
|
|
625
625
|
display: flex;
|
|
626
626
|
flex-wrap: wrap;
|
|
627
627
|
row-gap: 8px;
|
|
@@ -704,7 +704,7 @@ import{a as e}from"./tslib.es6-aa6dda30.js";import*as t from"react";import i,{us
|
|
|
704
704
|
text-align: center;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
`,zt=({state:e,isMobile:t,specialties:a,isLoading:o,dispatch:s})=>{const{t:l,locale:r}=c(),{selectedLocation:d}=e,p=n((()=>u[r]),[r]);return i.createElement(i.Fragment,null,!t&&i.createElement(Vt,{color:"#E4E8EC"}),i.createElement(Nt,null,a.length>0&&!o&&i.createElement(i.Fragment,null,a.map(((e,t)=>t>=15?i.createElement(i.Fragment,null):i.createElement(Bt,{key:e.id,onClick:()=>(e=>{const t=`/${d.slug}/${p.DOCTOR}/${e}`;s({type:ht.NavigateTo,payload:t})})(e.slug)},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.thumbnail,alt:e.name})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},e.name)))))),0===a.length&&!o&&i.createElement(b,{size:"sm",color:f.colors.gray400},l("booking.searchBar.noResults")),o&&Array(6).fill(void 0).map(((e,t)=>i.createElement(Bt,{key:"loading"+t},i.createElement("div",{className:"image-item"},i.createElement(S,{height:40,mt:10,animate:!0})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},i.createElement(S,{height:
|
|
707
|
+
`,zt=({state:e,isMobile:t,specialties:a,isLoading:o,dispatch:s})=>{const{t:l,locale:r}=c(),{selectedLocation:d}=e,p=n((()=>u[r]),[r]);return i.createElement(i.Fragment,null,!t&&i.createElement(Vt,{color:"#E4E8EC"}),i.createElement(Nt,null,a.length>0&&!o&&i.createElement(i.Fragment,null,a.map(((e,t)=>t>=15?i.createElement(i.Fragment,null):i.createElement(Bt,{key:e.id,onClick:()=>(e=>{const t=`/${d.slug}/${p.DOCTOR}/${e}`;s({type:ht.NavigateTo,payload:t})})(e.slug)},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.thumbnail,alt:e.name})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},e.name)))))),0===a.length&&!o&&i.createElement(b,{size:"sm",color:f.colors.gray400},l("booking.searchBar.noResults")),o&&Array(6).fill(void 0).map(((e,t)=>i.createElement(Bt,{key:"loading"+t},i.createElement("div",{className:"image-item"},i.createElement(S,{height:40,mt:10,animate:!0})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},i.createElement(S,{height:20,mt:10,radius:"sm",animate:!0}))))))),a.length>15&&i.createElement(Dt,null,i.createElement("div",{className:"show-more",onClick:()=>{const e=`/${p.SPECIALTIES}`;s({type:ht.NavigateTo,payload:e})}},l("home.seeAll"))))},Ht=m.div`
|
|
708
708
|
// display: flex;
|
|
709
709
|
display: none;
|
|
710
710
|
gap: 5px;
|
|
@@ -748,4 +748,4 @@ import{a as e}from"./tslib.es6-aa6dda30.js";import*as t from"react";import i,{us
|
|
|
748
748
|
background: rgba(255, 255, 255, 0.64);
|
|
749
749
|
backdrop-filter: blur(12px);
|
|
750
750
|
border-bottom: 1px solid ${f.colors.neutral100};
|
|
751
|
-
`,Zt=({currentTab:e,isMobile:t,setCurrentTab:a})=>{const{t:o}=c(),s=n((()=>({root:{overflowY:t?"hidden":"initial",overflowX:t?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:t?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:t?"14px":"16px",fontWeight:600,lineHeight:t?"22px":"24px"}})),[t]);return i.createElement(Gt,null,i.createElement(P,null,i.createElement(O,{value:e,onTabChange:e=>{a(e)},styles:s},i.createElement(O.List,null,i.createElement(O.Tab,{value:"hospital"},o("booking.searchPopup.hospitals")),i.createElement(O.Tab,{value:"doctor"},o("booking.searchPopup.doctors")),i.createElement(O.Tab,{value:"service"},o("booking.searchPopup.services")),i.createElement(O.Tab,{value:"specialty"},o("booking.searchPopup.specialties"))))))};const Yt=({isMobile:e,careApiDomain:t,geoLocationPermission:g,geoLocationCoordinates:m,initialSelectedCity:C,initialSearchValue:b="",careFrontDomain:f="/care",isDebug:y=!1,gaTrackingSearchBar:v,gaTrackingLocationSearch:x,autoCompleteDisabled:w=!1,inputSearchPlaceholder:S="",routerPush:L,onGeoLocationPermissionChange:k,onChangeLocation:O})=>{const{locale:M,t:
|
|
751
|
+
`,Zt=({currentTab:e,isMobile:t,setCurrentTab:a})=>{const{t:o}=c(),s=n((()=>({root:{overflowY:t?"hidden":"initial",overflowX:t?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:t?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:t?"14px":"16px",fontWeight:600,lineHeight:t?"22px":"24px"}})),[t]);return i.createElement(Gt,null,i.createElement(P,null,i.createElement(O,{value:e,onTabChange:e=>{a(e)},styles:s},i.createElement(O.List,null,i.createElement(O.Tab,{value:"hospital"},o("booking.searchPopup.hospitals")),i.createElement(O.Tab,{value:"doctor"},o("booking.searchPopup.doctors")),i.createElement(O.Tab,{value:"service"},o("booking.searchPopup.services")),i.createElement(O.Tab,{value:"specialty"},o("booking.searchPopup.specialties"))))))};const Yt=({isMobile:e,careApiDomain:t,geoLocationPermission:g,geoLocationCoordinates:m,initialSelectedCity:C,initialSearchValue:b="",careFrontDomain:f="/care",isDebug:y=!1,gaTrackingSearchBar:v,gaTrackingLocationSearch:x,autoCompleteDisabled:w=!1,inputSearchPlaceholder:S="",routerPush:L,onGeoLocationPermissionChange:k,onChangeLocation:O})=>{const{locale:M,t:F}=c(),R=l(null),[$,T]=a("hospital"),{geoLocationPermission:P,geoLocationCoordinates:A}=V(),[N,B]=r(mt,ut,(t=>Object.assign(Object.assign({},t),{isDebug:y,isMobile:e,geoLocationPermission:g||P||"unset",geoLocationCoordinates:m||A||null,searchKeywords:b,initialSelectedCity:C||null,selectedLocation:C||t.selectedLocation||null,searchLocationKeywords:(null==C?void 0:C.name)||t.searchLocationKeywords,autoCompleteDisabled:w,inputSearchPlaceholder:S,locale:M}))),{navigateTo:D,searchKeywords:z,geoLocationPermission:H,selectedLocation:_,selectedSpecialty:K,initialSelectedCity:G,searchResults:Z,isLoadingSearchResults:Y}=N,{fetchCitiesByLocation:U,fetchCitiesByKeyword:W,fetchSearchResults:Q,fetchAllSpecialties:q}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const a=o((function(a,o={}){const n=`${t}${a}`;return e({type:ht.FetchCitiesStart}),fetch(st(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ht.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:o((function({coordinates:t}){let o={};const n={};t&&(o={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(n.noPaging=1);const s=[a(E.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(E.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:ht.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(E.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ht.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:o((function(a,o,n,s){const l="specialty"===n?`${t}${E.GET_SEARCH_SPECIALTY}`:`${t}${E.GET_SEARCH_V2}`;e({type:ht.FetchSearchResultsStart});const{selectedLocation:r,geoLocationCoordinates:c,selectedSpecialty:d}=o;let u="";if(!r)return void e({type:ht.FetchSearchResultsFinish});u=r.id===p?"":r.id;const g=(null==c?void 0:c.lat)||"",m=(null==c?void 0:c.lng)||"",C=(null==d?void 0:d.id)>0?null==d?void 0:d.id:"";return fetch(st(l,{domain:t,searchType:n||"global",keyword:a.trim().length>pt[i]?a.trim():"",city:u===h?"":u,lat:g,lng:m,specialty_id:C},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:ht.FetchSearchResultsComplete,payload:{key:n,searches:t.searches||t.specialties||[]}}),s&&e({type:ht.UpdateInitialSearchResults,payload:{key:n,searches:t.searches||t.specialties||[]}})})).catch((e=>{console.log("error loading search results",{url:l,error:e})})).finally((()=>e({type:ht.FetchSearchResultsFinish})))}),[i,t,e]),fetchAllSpecialties:o((function(){const a=`${t}${E.GET_SEARCH_SPECIALTY}`;return fetch(st(a,{domain:t,searchType:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:ht.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:a,error:e})}))}),[i,t,e])}}({dispatch:B,locale:M,careApiDomain:t}),J=n((()=>u[M]),[M]),X=n((()=>({doctor:{name:F("booking.searchPopup.doctors"),icon:i.createElement(kt,null),slug:J.DOCTOR},service:{name:F("booking.searchPopup.services"),icon:i.createElement(Ot,null),slug:J.SERVICE},hospital:{name:F("booking.searchPopup.hospitals"),icon:i.createElement(jt,null),slug:J.HOSPITAL},specialty:{name:F("booking.searchPopup.specialties"),icon:i.createElement(It,null),slug:J.SPECIALTIES}})),[$]),ee=n((()=>d(W,400)),[W]),te=n((()=>d(Q,400)),[Q]),ie=o((function(e){B({type:ht.SelectLocation,payload:e}),ae(),O&&O(e)}),[F,B]);function ae(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return s((()=>{var t;"denied"===H||G||B({type:ht.SelectLocation,payload:{name:F("booking.searchBar.allLocations"),id:p,slug:null===(t=u[M])||void 0===t?void 0:t.ALL}}),k&&k(H,N.geoLocationCoordinates),e&&"granted"===H&&_&&B({type:ht.FocusInputSearch}),U({coordinates:N.geoLocationCoordinates})}),[H]),s((()=>{B({type:ht.SelectSpecialty,payload:{name:F("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:J.SPECIALTIES}})}),[]),s((()=>{q()}),[]),s((()=>{D&&(L?L(D):window.location.href=`${f}${D}`)}),[D]),s((()=>{Q(N.searchKeywords,N,$,!0)}),[_,K,$]),i.createElement(rt,{ref:R},i.createElement(Zt,{currentTab:$,setCurrentTab:T,isMobile:e}),i.createElement(ct,null,i.createElement(dt,null,i.createElement(j,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==$&&i.createElement(At,{state:N,isMobile:e,dispatch:B,debouncedFetchCitiesByKeyword:ee,selectedLocation:_,onLocationClick:ie,trackingAttributes:x}),i.createElement(Ft,{type:$,isMobile:e,state:N,dispatch:B,debouncedFetchSearchResults:te,initalSearchValue:b,focusSearchInput:ae,typeInformation:X,trackingAttributes:v,isLoading:Y}),i.createElement(I,{size:e?"md":"lg",fullWidth:e,onClick:function(){let e="";const{slug:t}=X[$];e="specialty"===$?`/${t}?q=${z}`:`/${_.slug}/${t}?q=${z}`,e&&B({type:ht.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},F("booking.searchBar.searchButton"))),"specialty"!==$&&i.createElement(Kt,null),"specialty"===$&&i.createElement(zt,{state:N,isMobile:e,dispatch:B,specialties:(null==Z?void 0:Z.specialty)||[],isLoading:Y}))))};var Ut;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Ut||(Ut={}));var Wt=Object.freeze({__proto__:null,get RedirectType(){return Ut}});export{lt as B,B as C,Yt as a,Wt as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,_ as t}from"./tslib.es6-
|
|
1
|
+
import{a as e,_ as t}from"./tslib.es6-2cae0456.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-7230353c.js";import{u as E}from"./useTranslations-7c64ae29.js";import C from"innertext";import{t as k}from"./theme-9e139ee1.js";import{H as N,I as A,d as T,A as z,P,e as I,f as S}from"./index-3f63d34b.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-f61711a0.js";import"@mantine/dates";import{D as ce,d as de}from"./index-ee03bd1e.js";import"./Onboarding-8d78ce80.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-e3538e28.js";import be,{keyframes as fe,css as ye}from"styled-components";import"./isProduction-dd42f212.js";import{I as we}from"./index-d24c00af.js";import"@mantine/hooks";import{A as xe,a as Ee,B as Ce,D as ke}from"./index-0bb9ace1.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-b390c460.js";import{T as Le}from"./index-aca4d584.js";import{I as Me}from"./index-a62315fd.js";import je from"lodash/debounce";import Be from"react-contenteditable";import{B as Fe}from"./index-19616958.js";import{d as Oe,g as Re}from"./cookieHelper-df820d6d.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-fa80a8b4.js";import"./index-5f38dff4.js";import"lodash/throttle";import"./types-509b5c8f.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-278d87b9.js";import"uuid";import"./utils-5c8bc72f.js";import"string-format";import We from"dayjs/plugin/relativeTime";import{M as He}from"./index-dd69cd16.js";import{a as Ze}from"./useUniqueId-f42d4577.js";import"./translationsContext-4d6e5519.js";import{g as qe}from"./routing-158b3332.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;
|
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-8d78ce80.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./tslib.es6-2cae0456.js";import{useState as t,useEffect as i,useCallback as a}from"react";import{a as e}from"./getDynamicHealthTool-7c51b447.js";const l=l=>{const[n,r]=t([]);i((()=>{o(void 0,void 0,void 0,(function*(){const o=yield e(l);r(o)}))}),[e,l]);const s=a((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-2cae0456.js";import{useRef as t,useEffect as n,useState as r,useCallback as i}from"react";import{g as o}from"./cookieHelper-df820d6d.js";import{u as a}from"./useUniqueId-f42d4577.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext as o,useMemo as a}from"react";import{T as e}from"./translationsContext-
|
|
1
|
+
import{useContext as o,useMemo as a}from"react";import{T as e}from"./translationsContext-4d6e5519.js";import r from"string-format";function t(){const{values:t,locale:n}=o(e)||{locale:"en-PH"};return a((()=>({t:(o,a)=>t?t[o]?a?r(t[o]||o,a):t[o]||o:(console.warn(`[useTranslations] Missing translation for key ${o} and locale ${n}`),a?r(o,a):o):(console.error("[useTranslations] t method called before translation values are loaded"),o),locale:n})),[t,n])}export{t as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as a}from"./Onboarding-
|
|
1
|
+
import{L as a}from"./Onboarding-8d78ce80.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};
|