@hhgtech/hhg-components 1.28.68 → 1.28.69
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/BMI_BOYS.percentile.monthly-48c9471d.js +688 -0
- package/build/BMI_BOYS.percentile.weekly-4965852e.js +182 -0
- package/build/BMI_BOYS.percentile.yearly-0f7cc8f4.js +83 -0
- package/build/BMI_BOYS.zscore.monthly-5bb8a433.js +440 -0
- package/build/BMI_BOYS.zscore.weekly-3d56f80f.js +118 -0
- package/build/BMI_BOYS.zscore.yearly-57081f24.js +55 -0
- package/build/BMI_GIRLS.percentile.monthly-95859cd9.js +688 -0
- package/build/BMI_GIRLS.percentile.weekly-009cf4df.js +182 -0
- package/build/BMI_GIRLS.percentile.yearly-4436947b.js +83 -0
- package/build/BMI_GIRLS.zscore.monthly-689b4eee.js +440 -0
- package/build/BMI_GIRLS.zscore.weekly-dff693df.js +118 -0
- package/build/BMI_GIRLS.zscore.yearly-05ef5f4f.js +55 -0
- package/build/ChevronDown-275f1ab5.js +29 -0
- package/build/HEAD CIRCUM_BOYS.percentile.monthly-55c580a7.js +688 -0
- package/build/HEAD CIRCUM_BOYS.percentile.weekly-e30f4a42.js +182 -0
- package/build/HEAD CIRCUM_BOYS.percentile.yearly-2378a5f0.js +83 -0
- package/build/HEAD CIRCUM_BOYS.zscore.monthly-102d5559.js +440 -0
- package/build/HEAD CIRCUM_BOYS.zscore.weekly-7b0f1ba8.js +118 -0
- package/build/HEAD CIRCUM_BOYS.zscore.yearly-e9237d31.js +55 -0
- package/build/HEAD CIRCUM_GIRLS.percentile.monthly-1ddda8b3.js +688 -0
- package/build/HEAD CIRCUM_GIRLS.percentile.weekly-843147ea.js +182 -0
- package/build/HEAD CIRCUM_GIRLS.percentile.yearly-9b51c237.js +83 -0
- package/build/HEAD CIRCUM_GIRLS.zscore.monthly-3f1b233c.js +440 -0
- package/build/HEAD CIRCUM_GIRLS.zscore.weekly-9e14d3fe.js +118 -0
- package/build/HEAD CIRCUM_GIRLS.zscore.yearly-d924f5ae.js +55 -0
- package/build/HEIGHT_BOYS.percentile.monthly-15538920.js +688 -0
- package/build/HEIGHT_BOYS.percentile.weekly-10bd0277.js +182 -0
- package/build/HEIGHT_BOYS.percentile.yearly-8e678d38.js +237 -0
- package/build/HEIGHT_BOYS.zscore.monthly-2c110da9.js +440 -0
- package/build/HEIGHT_BOYS.zscore.weekly-288b7733.js +118 -0
- package/build/HEIGHT_BOYS.zscore.yearly-42f6f9f7.js +153 -0
- package/build/HEIGHT_GIRLS.percentile.monthly-04abe7d2.js +688 -0
- package/build/HEIGHT_GIRLS.percentile.weekly-9653b16c.js +182 -0
- package/build/HEIGHT_GIRLS.percentile.yearly-9efacd67.js +237 -0
- package/build/HEIGHT_GIRLS.zscore.monthly-c64a97b2.js +440 -0
- package/build/HEIGHT_GIRLS.zscore.weekly-3302dd83.js +118 -0
- package/build/HEIGHT_GIRLS.zscore.yearly-ebe5114f.js +153 -0
- package/build/Subot-5fc40fb5.js +217 -0
- package/build/Visible-5c5d57cf.js +29 -0
- package/build/WEIGHT_BOYS.percentile.monthly-5e11e7a0.js +688 -0
- package/build/WEIGHT_BOYS.percentile.weekly-68ae2578.js +182 -0
- package/build/WEIGHT_BOYS.percentile.yearly-030c06a4.js +138 -0
- package/build/WEIGHT_BOYS.zscore.monthly-d22c7b57.js +440 -0
- package/build/WEIGHT_BOYS.zscore.weekly-d8d901e6.js +118 -0
- package/build/WEIGHT_BOYS.zscore.yearly-c311a084.js +90 -0
- package/build/WEIGHT_GIRLS.percentile.monthly-5c44f8eb.js +688 -0
- package/build/WEIGHT_GIRLS.percentile.weekly-faa98671.js +182 -0
- package/build/WEIGHT_GIRLS.percentile.yearly-560b862e.js +138 -0
- package/build/WEIGHT_GIRLS.zscore.monthly-5365ba1a.js +440 -0
- package/build/WEIGHT_GIRLS.zscore.weekly-0d9dc521.js +118 -0
- package/build/WEIGHT_GIRLS.zscore.yearly-5a3c4e43.js +90 -0
- package/build/adapters.js +36 -1
- package/build/{esm/animation-a158bfd1.js → animation-eb4e500b.js} +32 -10
- package/build/babyGrowth.js +913 -47
- package/build/cache.js +13 -1
- package/build/care.js +38 -1
- package/build/components.js +186 -1
- package/build/constants-8b8bc19f.js +255 -0
- package/build/constants-ae18ce18.js +935 -0
- package/build/constants.js +43 -1
- package/build/cookieHelper-5c9f4bb8.js +43 -0
- package/build/core-2aa8d86c.js +51 -0
- package/build/dataTransform-089f414c.js +66 -0
- package/build/ecom.js +745 -1
- package/build/esm/BMI_BOYS.percentile.monthly-de5dce68.js +686 -0
- package/build/esm/BMI_BOYS.percentile.weekly-9d3990b6.js +180 -0
- package/build/esm/BMI_BOYS.percentile.yearly-98b9114a.js +81 -0
- package/build/esm/BMI_BOYS.zscore.monthly-394646f0.js +438 -0
- package/build/esm/BMI_BOYS.zscore.weekly-c669ea51.js +116 -0
- package/build/esm/BMI_BOYS.zscore.yearly-771ef6b6.js +53 -0
- package/build/esm/BMI_GIRLS.percentile.monthly-1ff3d499.js +686 -0
- package/build/esm/BMI_GIRLS.percentile.weekly-211d2f27.js +180 -0
- package/build/esm/BMI_GIRLS.percentile.yearly-206fdcff.js +81 -0
- package/build/esm/BMI_GIRLS.zscore.monthly-b1137e36.js +438 -0
- package/build/esm/BMI_GIRLS.zscore.weekly-63ed3cd6.js +116 -0
- package/build/esm/BMI_GIRLS.zscore.yearly-221d187c.js +53 -0
- package/build/esm/ChevronDown-9a8ece61.js +7 -0
- package/build/esm/HEAD CIRCUM_BOYS.percentile.monthly-4c37847c.js +686 -0
- package/build/esm/HEAD CIRCUM_BOYS.percentile.weekly-8f6ea38a.js +180 -0
- package/build/esm/HEAD CIRCUM_BOYS.percentile.yearly-6c12a99a.js +81 -0
- package/build/esm/HEAD CIRCUM_BOYS.zscore.monthly-c531b497.js +438 -0
- package/build/esm/HEAD CIRCUM_BOYS.zscore.weekly-6cafba00.js +116 -0
- package/build/esm/HEAD CIRCUM_BOYS.zscore.yearly-fe8114a0.js +53 -0
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.monthly-25ce0d36.js +686 -0
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.weekly-5d3f2862.js +180 -0
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.yearly-2b709ca5.js +81 -0
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.monthly-e8617bae.js +438 -0
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.weekly-f3252d67.js +116 -0
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.yearly-5b62d41f.js +53 -0
- package/build/esm/HEIGHT_BOYS.percentile.monthly-63d2cf96.js +686 -0
- package/build/esm/HEIGHT_BOYS.percentile.weekly-8ea5102d.js +180 -0
- package/build/esm/HEIGHT_BOYS.percentile.yearly-8107b77b.js +235 -0
- package/build/esm/HEIGHT_BOYS.zscore.monthly-641cdfa3.js +438 -0
- package/build/esm/HEIGHT_BOYS.zscore.weekly-86da0362.js +116 -0
- package/build/esm/HEIGHT_BOYS.zscore.yearly-060f6e79.js +151 -0
- package/build/esm/HEIGHT_GIRLS.percentile.monthly-fb987d37.js +686 -0
- package/build/esm/HEIGHT_GIRLS.percentile.weekly-82655dc0.js +180 -0
- package/build/esm/HEIGHT_GIRLS.percentile.yearly-a63b8456.js +235 -0
- package/build/esm/HEIGHT_GIRLS.zscore.monthly-77d676a3.js +438 -0
- package/build/esm/HEIGHT_GIRLS.zscore.weekly-c0387a4e.js +116 -0
- package/build/esm/HEIGHT_GIRLS.zscore.yearly-41203c20.js +151 -0
- package/build/esm/Subot-3289bd8e.js +212 -0
- package/build/esm/Visible-a3d436dd.js +7 -0
- package/build/esm/WEIGHT_BOYS.percentile.monthly-50802d8b.js +686 -0
- package/build/esm/WEIGHT_BOYS.percentile.weekly-4d72ddd6.js +180 -0
- package/build/esm/WEIGHT_BOYS.percentile.yearly-20a29844.js +136 -0
- package/build/esm/WEIGHT_BOYS.zscore.monthly-729e6614.js +438 -0
- package/build/esm/WEIGHT_BOYS.zscore.weekly-90352f48.js +116 -0
- package/build/esm/WEIGHT_BOYS.zscore.yearly-fe1871cc.js +88 -0
- package/build/esm/WEIGHT_GIRLS.percentile.monthly-e6afb2e0.js +686 -0
- package/build/esm/WEIGHT_GIRLS.percentile.weekly-b66d3016.js +180 -0
- package/build/esm/WEIGHT_GIRLS.percentile.yearly-a55622c5.js +136 -0
- package/build/esm/WEIGHT_GIRLS.zscore.monthly-2cdcbe75.js +438 -0
- package/build/esm/WEIGHT_GIRLS.zscore.weekly-d5be31d5.js +116 -0
- package/build/esm/WEIGHT_GIRLS.zscore.yearly-99e8d3a7.js +88 -0
- package/build/esm/adapters.js +26 -1
- package/build/{animation-ea278d9a.js → esm/animation-3d5edc39.js} +22 -10
- package/build/esm/babyGrowth.js +883 -47
- package/build/esm/cache.js +3 -1
- package/build/esm/care.js +26 -1
- package/build/esm/components.js +88 -1
- package/build/esm/constants-2a6d2434.js +932 -0
- package/build/esm/constants-b77ffe3d.js +238 -0
- package/build/esm/constants.js +4 -1
- package/build/esm/cookieHelper-d314282c.js +39 -0
- package/build/esm/core-8c73d133.js +47 -0
- package/build/esm/dataTransform-8ecfc046.js +56 -0
- package/build/esm/ecom.js +737 -1
- package/build/esm/footer.js +31 -1
- package/build/esm/gAssets.js +5 -1
- package/build/esm/getDynamicHealthTool-f4497aa5.js +44 -0
- package/build/esm/getSocialList-a5b8462e.js +66 -0
- package/build/esm/hooks.js +21 -1
- package/build/esm/i18n-values/en-PH.js +600 -1
- package/build/esm/i18n-values/hi-IN.js +600 -1
- package/build/esm/i18n-values/id-ID.js +600 -1
- package/build/esm/i18n-values/km-KH.js +600 -1
- package/build/esm/i18n-values/ms-MY.js +602 -1
- package/build/esm/i18n-values/my-MM.js +600 -1
- package/build/esm/i18n-values/th-TH.js +600 -1
- package/build/esm/i18n-values/tl-PH.js +600 -1
- package/build/esm/i18n-values/vi-VN.js +607 -1
- package/build/esm/i18n-values/vi-VN_MB.js +607 -1
- package/build/esm/i18n-values/zh-TW.js +600 -1
- package/build/esm/i18n.js +55 -1
- package/build/esm/i18nV2.js +18 -1
- package/build/esm/index-12fa4985.js +8 -0
- package/build/esm/index-1e59f99a.js +152 -0
- package/build/esm/index-32e53dac.js +1936 -0
- package/build/esm/index-3474401a.js +149 -0
- package/build/esm/index-34899aa3.js +17 -0
- package/build/esm/index-350e8f5b.js +124 -0
- package/build/esm/index-41bf860a.js +151 -0
- package/build/esm/index-4aa8e518.js +116 -0
- package/build/esm/index-4fe2b03f.js +32 -0
- package/build/esm/index-6ea6484e.js +29 -0
- package/build/esm/index-717401ee.js +184 -0
- package/build/esm/index-7af5242a.js +24 -0
- package/build/esm/index-7b8c85cd.js +8302 -0
- package/build/esm/index-81f295b7.js +23 -0
- package/build/esm/index-8858383e.js +52 -0
- package/build/esm/index-8f52dcf3.js +33 -0
- package/build/esm/index-9ea7e838.js +33 -0
- package/build/esm/index-aabac2aa.js +3241 -0
- package/build/esm/index-b9b2c417.js +837 -0
- package/build/esm/index-c2da5293.js +12 -0
- package/build/esm/index-c56d60db.js +370 -0
- package/build/esm/index-c5d7f692.js +24 -0
- package/build/esm/index-cc93e010.js +53 -0
- package/build/esm/index-d7f046db.js +5 -0
- package/build/esm/index-d8177667.js +14 -0
- package/build/esm/index-da139dda.js +615 -0
- package/build/esm/index-e612be9c.js +905 -0
- package/build/esm/index-f3d0592b.js +71 -0
- package/build/esm/index.js +190 -1
- package/build/{index.styled-625bfdc7.js → esm/index.styled-9c9db9cc.js} +17 -5
- package/build/esm/index.styles-5add27c5.js +1303 -0
- package/build/esm/isProduction-0ea904dd.js +27 -0
- package/build/esm/lead.js +2140 -1
- package/build/esm/localizeNumberFormat-2ac3773e.js +23 -0
- package/build/esm/mantine.js +113 -1
- package/build/esm/misc.js +22 -1
- package/build/esm/navigation.js +51 -1
- package/build/esm/normalizeLink-d1c9617e.js +12 -0
- package/build/esm/number-0c126a39.js +38 -0
- package/build/esm/onboardingV2.js +860 -34
- package/build/esm/paths-a8204db4.js +14 -0
- package/build/esm/pwg.js +208 -7
- package/build/esm/routing-2474f896.js +40 -0
- package/build/esm/subot.js +4553 -134
- package/build/esm/theme-e74db08c.js +186 -0
- package/build/esm/together.js +52 -1
- package/build/esm/translationsContext-ad3e25de.js +5 -0
- package/build/esm/tslib.es6-1b1533a9.js +38 -0
- package/build/esm/types-06f00b3d.js +8015 -0
- package/build/esm/types-15e34418.js +3432 -0
- package/build/esm/types-ba190c26.js +21 -0
- package/build/esm/types.js +1 -1
- package/build/esm/unifyEnv.js +42 -1
- package/build/esm/useCategory-2c87152d.js +292 -0
- package/build/esm/useHealthToolCache-29d22ddb.js +17 -0
- package/build/esm/useIsInit-8a2fc8e5.js +11 -0
- package/build/esm/useOutsideClick-c8a7ff20.js +45 -0
- package/build/esm/usePlacesAutocomplete-63e04e8e.js +80 -0
- package/build/esm/useScrollbarSize-51ce1374.js +57 -0
- package/build/esm/useTranslations-4f1db486.js +26 -0
- package/build/esm/useUniqueId-3638402f.js +41 -0
- package/build/esm/utils-2c484c05.js +132 -0
- package/build/esm/utils-3a2a47d9.js +22 -0
- package/build/esm/utils-6d7b88da.js +367 -0
- package/build/esm/utils-70718e9c.js +1124 -0
- package/build/esm/vaccination.js +868 -40
- package/build/footer.js +39 -1
- package/build/gAssets.js +14 -1
- package/build/getDynamicHealthTool-114a1e27.js +48 -0
- package/build/getSocialList-4713441d.js +72 -0
- package/build/hooks.js +44 -1
- package/build/i18n-values/en-PH.js +611 -1
- package/build/i18n-values/hi-IN.js +611 -1
- package/build/i18n-values/id-ID.js +611 -1
- package/build/i18n-values/km-KH.js +611 -1
- package/build/i18n-values/ms-MY.js +613 -1
- package/build/i18n-values/my-MM.js +611 -1
- package/build/i18n-values/th-TH.js +611 -1
- package/build/i18n-values/tl-PH.js +611 -1
- package/build/i18n-values/vi-VN.js +618 -1
- package/build/i18n-values/vi-VN_MB.js +618 -1
- package/build/i18n-values/zh-TW.js +611 -1
- package/build/i18n.js +64 -1
- package/build/i18nV2.js +26 -1
- package/build/index-020e6908.js +39 -0
- package/build/index-0da9b2e8.js +59 -0
- package/build/index-11468c00.js +157 -0
- package/build/index-117448a5.js +133 -0
- package/build/index-12c07f71.js +18 -0
- package/build/index-1a105e87.js +123 -0
- package/build/index-1baaedb0.js +55 -0
- package/build/index-32d38318.js +7 -0
- package/build/index-38582ee0.js +8373 -0
- package/build/index-3e5fc2d6.js +1994 -0
- package/build/index-3eef6bed.js +853 -0
- package/build/index-4035e658.js +159 -0
- package/build/index-488d71ae.js +30 -0
- package/build/index-5553f9e1.js +930 -0
- package/build/index-5fa68e45.js +380 -0
- package/build/index-7b467209.js +39 -0
- package/build/index-81cb1142.js +77 -0
- package/build/index-84ab5b89.js +38 -0
- package/build/index-8a95d709.js +30 -0
- package/build/index-9da9f0c3.js +35 -0
- package/build/index-af91c83e.js +20 -0
- package/build/index-b6aea85e.js +191 -0
- package/build/index-bc4f4c33.js +156 -0
- package/build/index-c604d6bb.js +624 -0
- package/build/index-d330735e.js +30 -0
- package/build/index-d8a7efaf.js +14 -0
- package/build/index-e2e81fa2.js +23 -0
- package/build/index-e3d896b3.js +3261 -0
- package/build/index.js +436 -1
- package/build/{esm/index.styled-ac7ac0fc.js → index.styled-5628b3e7.js} +25 -5
- package/build/index.styles-b822bf42.js +1342 -0
- package/build/isProduction-5ce3a388.js +29 -0
- package/build/lead.js +2168 -1
- package/build/localizeNumberFormat-f5f50987.js +31 -0
- package/build/mantine.js +154 -1
- package/build/misc.js +70 -1
- package/build/navigation.js +61 -1
- package/build/normalizeLink-6f7b85d8.js +15 -0
- package/build/number-79fe92e1.js +40 -0
- package/build/onboardingV2.js +892 -34
- package/build/paths-a5643d9e.js +16 -0
- package/build/pwg.js +217 -7
- package/build/routing-191a9a00.js +46 -0
- package/build/subot.js +4592 -134
- package/build/theme-fa910869.js +189 -0
- package/build/together.js +112 -1
- package/build/translationsContext-950334bf.js +7 -0
- package/build/tslib.es6-65e312a5.js +41 -0
- package/build/types-0f117a9f.js +8084 -0
- package/build/types-1fedb3d1.js +3446 -0
- package/build/types-52a4e888.js +24 -0
- package/build/types.js +56 -1
- package/build/unifyEnv.js +46 -1
- package/build/useCategory-cfc702f5.js +299 -0
- package/build/useHealthToolCache-43a7014d.js +19 -0
- package/build/useIsInit-89535012.js +13 -0
- package/build/useOutsideClick-c6813964.js +49 -0
- package/build/usePlacesAutocomplete-297de092.js +84 -0
- package/build/useScrollbarSize-0fa31aa7.js +64 -0
- package/build/useTranslations-e1853417.js +32 -0
- package/build/useUniqueId-11369116.js +44 -0
- package/build/utils-52113753.js +384 -0
- package/build/utils-64bd0c42.js +143 -0
- package/build/utils-661411f6.js +1171 -0
- package/build/utils-e1513cbc.js +25 -0
- package/build/vaccination.js +891 -40
- package/package.json +4 -5
- package/build/BMI_BOYS.percentile.monthly-8cc875f7.js +0 -1
- package/build/BMI_BOYS.percentile.weekly-b45b05e3.js +0 -1
- package/build/BMI_BOYS.percentile.yearly-e4f1d19c.js +0 -1
- package/build/BMI_BOYS.zscore.monthly-e51737eb.js +0 -1
- package/build/BMI_BOYS.zscore.weekly-4080c0d5.js +0 -1
- package/build/BMI_BOYS.zscore.yearly-703e5747.js +0 -1
- package/build/BMI_GIRLS.percentile.monthly-ac5a001d.js +0 -1
- package/build/BMI_GIRLS.percentile.weekly-6a6f4703.js +0 -1
- package/build/BMI_GIRLS.percentile.yearly-8eb7e8e5.js +0 -1
- package/build/BMI_GIRLS.zscore.monthly-c2763465.js +0 -1
- package/build/BMI_GIRLS.zscore.weekly-7438d8b6.js +0 -1
- package/build/BMI_GIRLS.zscore.yearly-a56ffb0c.js +0 -1
- package/build/ChevronDown-81b50697.js +0 -1
- package/build/HEAD CIRCUM_BOYS.percentile.monthly-cccf9306.js +0 -1
- package/build/HEAD CIRCUM_BOYS.percentile.weekly-85fc8a7e.js +0 -1
- package/build/HEAD CIRCUM_BOYS.percentile.yearly-d22ad913.js +0 -1
- package/build/HEAD CIRCUM_BOYS.zscore.monthly-4db20906.js +0 -1
- package/build/HEAD CIRCUM_BOYS.zscore.weekly-1a4dc975.js +0 -1
- package/build/HEAD CIRCUM_BOYS.zscore.yearly-a2bcdd3a.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.percentile.monthly-13e127f5.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.percentile.weekly-95a7695c.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.percentile.yearly-852dc893.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.zscore.monthly-9865857d.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.zscore.weekly-9bdf4dda.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.zscore.yearly-ac24fb2f.js +0 -1
- package/build/HEIGHT_BOYS.percentile.monthly-691b0568.js +0 -1
- package/build/HEIGHT_BOYS.percentile.weekly-520bd6ac.js +0 -1
- package/build/HEIGHT_BOYS.percentile.yearly-9093722e.js +0 -1
- package/build/HEIGHT_BOYS.zscore.monthly-84db220e.js +0 -1
- package/build/HEIGHT_BOYS.zscore.weekly-ce0c52d1.js +0 -1
- package/build/HEIGHT_BOYS.zscore.yearly-dab7d4e0.js +0 -1
- package/build/HEIGHT_GIRLS.percentile.monthly-7f42e4cd.js +0 -1
- package/build/HEIGHT_GIRLS.percentile.weekly-79ca42e5.js +0 -1
- package/build/HEIGHT_GIRLS.percentile.yearly-4e11d0f8.js +0 -1
- package/build/HEIGHT_GIRLS.zscore.monthly-74be7929.js +0 -1
- package/build/HEIGHT_GIRLS.zscore.weekly-a47a1d90.js +0 -1
- package/build/HEIGHT_GIRLS.zscore.yearly-f4984496.js +0 -1
- package/build/Subot-b0700a95.js +0 -1
- package/build/Visible-0267024a.js +0 -1
- package/build/WEIGHT_BOYS.percentile.monthly-08b33be0.js +0 -1
- package/build/WEIGHT_BOYS.percentile.weekly-65a4fa70.js +0 -1
- package/build/WEIGHT_BOYS.percentile.yearly-f3b46cc5.js +0 -1
- package/build/WEIGHT_BOYS.zscore.monthly-d1191a6a.js +0 -1
- package/build/WEIGHT_BOYS.zscore.weekly-61c60cf9.js +0 -1
- package/build/WEIGHT_BOYS.zscore.yearly-0d89c866.js +0 -1
- package/build/WEIGHT_GIRLS.percentile.monthly-221c1ba4.js +0 -1
- package/build/WEIGHT_GIRLS.percentile.weekly-fbd203a6.js +0 -1
- package/build/WEIGHT_GIRLS.percentile.yearly-36a909c2.js +0 -1
- package/build/WEIGHT_GIRLS.zscore.monthly-09b6ae5b.js +0 -1
- package/build/WEIGHT_GIRLS.zscore.weekly-7ada849a.js +0 -1
- package/build/WEIGHT_GIRLS.zscore.yearly-5115a509.js +0 -1
- package/build/constants-47b9b5ff.js +0 -108
- package/build/constants-8d5fe5b9.js +0 -1
- package/build/cookieHelper-effc4373.js +0 -1
- package/build/core-fc6dbe08.js +0 -1
- package/build/dataTransform-ad721ec5.js +0 -1
- package/build/esm/BMI_BOYS.percentile.monthly-2aa26d5a.js +0 -1
- package/build/esm/BMI_BOYS.percentile.weekly-838f6b27.js +0 -1
- package/build/esm/BMI_BOYS.percentile.yearly-e77609d7.js +0 -1
- package/build/esm/BMI_BOYS.zscore.monthly-2657168d.js +0 -1
- package/build/esm/BMI_BOYS.zscore.weekly-d3c18887.js +0 -1
- package/build/esm/BMI_BOYS.zscore.yearly-3759a54e.js +0 -1
- package/build/esm/BMI_GIRLS.percentile.monthly-f3e35273.js +0 -1
- package/build/esm/BMI_GIRLS.percentile.weekly-7936ee97.js +0 -1
- package/build/esm/BMI_GIRLS.percentile.yearly-757b0bc4.js +0 -1
- package/build/esm/BMI_GIRLS.zscore.monthly-d9760b61.js +0 -1
- package/build/esm/BMI_GIRLS.zscore.weekly-a58e0db1.js +0 -1
- package/build/esm/BMI_GIRLS.zscore.yearly-92413c27.js +0 -1
- package/build/esm/ChevronDown-e7d44dc3.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.percentile.monthly-c50f125e.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.percentile.weekly-29038598.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.percentile.yearly-32c4e2be.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.zscore.monthly-cd04e4b1.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.zscore.weekly-6b63745c.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.zscore.yearly-3a5be78c.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.monthly-c7996a02.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.weekly-553c94d5.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.yearly-97f86688.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.monthly-a442f7cc.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.weekly-cdd37afd.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.yearly-50d9daff.js +0 -1
- package/build/esm/HEIGHT_BOYS.percentile.monthly-53580c1f.js +0 -1
- package/build/esm/HEIGHT_BOYS.percentile.weekly-60514fb8.js +0 -1
- package/build/esm/HEIGHT_BOYS.percentile.yearly-d6b456a7.js +0 -1
- package/build/esm/HEIGHT_BOYS.zscore.monthly-21bd1444.js +0 -1
- package/build/esm/HEIGHT_BOYS.zscore.weekly-2a4e7aa0.js +0 -1
- package/build/esm/HEIGHT_BOYS.zscore.yearly-7f68c522.js +0 -1
- package/build/esm/HEIGHT_GIRLS.percentile.monthly-d5d7448a.js +0 -1
- package/build/esm/HEIGHT_GIRLS.percentile.weekly-c3c18801.js +0 -1
- package/build/esm/HEIGHT_GIRLS.percentile.yearly-3491901c.js +0 -1
- package/build/esm/HEIGHT_GIRLS.zscore.monthly-9f15dd03.js +0 -1
- package/build/esm/HEIGHT_GIRLS.zscore.weekly-81319284.js +0 -1
- package/build/esm/HEIGHT_GIRLS.zscore.yearly-8a7db57c.js +0 -1
- package/build/esm/Subot-fcd7c77c.js +0 -1
- package/build/esm/Visible-66d0e6f3.js +0 -1
- package/build/esm/WEIGHT_BOYS.percentile.monthly-0f5ea175.js +0 -1
- package/build/esm/WEIGHT_BOYS.percentile.weekly-88f50098.js +0 -1
- package/build/esm/WEIGHT_BOYS.percentile.yearly-63383bc3.js +0 -1
- package/build/esm/WEIGHT_BOYS.zscore.monthly-bf93eec1.js +0 -1
- package/build/esm/WEIGHT_BOYS.zscore.weekly-fe0600be.js +0 -1
- package/build/esm/WEIGHT_BOYS.zscore.yearly-4212bebb.js +0 -1
- package/build/esm/WEIGHT_GIRLS.percentile.monthly-6cc8cf8c.js +0 -1
- package/build/esm/WEIGHT_GIRLS.percentile.weekly-05d66e6d.js +0 -1
- package/build/esm/WEIGHT_GIRLS.percentile.yearly-b8c1af06.js +0 -1
- package/build/esm/WEIGHT_GIRLS.zscore.monthly-8c9195d5.js +0 -1
- package/build/esm/WEIGHT_GIRLS.zscore.weekly-4ef9aeee.js +0 -1
- package/build/esm/WEIGHT_GIRLS.zscore.yearly-0ccaeb51.js +0 -1
- package/build/esm/constants-046883ea.js +0 -1
- package/build/esm/constants-1e65de37.js +0 -108
- package/build/esm/cookieHelper-e37e6893.js +0 -1
- package/build/esm/core-7a237cdc.js +0 -1
- package/build/esm/dataTransform-f4476a6b.js +0 -1
- package/build/esm/getDynamicHealthTool-e095ea8b.js +0 -1
- package/build/esm/getSocialList-5f74d2b2.js +0 -1
- package/build/esm/index-006bca17.js +0 -1
- package/build/esm/index-068a9606.js +0 -137
- package/build/esm/index-0d0e5f45.js +0 -1
- package/build/esm/index-1e29d7b0.js +0 -1
- package/build/esm/index-2b572b4f.js +0 -1
- package/build/esm/index-318d4230.js +0 -117
- package/build/esm/index-39174b30.js +0 -1
- package/build/esm/index-3bfcc95c.js +0 -1
- package/build/esm/index-3c612859.js +0 -1
- package/build/esm/index-4004c359.js +0 -113
- package/build/esm/index-41f67971.js +0 -177
- package/build/esm/index-42a8c7e8.js +0 -1430
- package/build/esm/index-461eded2.js +0 -2748
- package/build/esm/index-575f65cb.js +0 -1
- package/build/esm/index-7f4008ff.js +0 -1
- package/build/esm/index-81dbde00.js +0 -375
- package/build/esm/index-99348fe5.js +0 -1
- package/build/esm/index-9b8a2194.js +0 -1
- package/build/esm/index-9d529405.js +0 -1
- package/build/esm/index-a445a873.js +0 -1
- package/build/esm/index-ab99f4fa.js +0 -1
- package/build/esm/index-b7782e6c.js +0 -1
- package/build/esm/index-b7a87c5c.js +0 -50
- package/build/esm/index-c737fbcc.js +0 -1
- package/build/esm/index-dfe2918d.js +0 -1
- package/build/esm/index-e7dea007.js +0 -1
- package/build/esm/index-eab0e39a.js +0 -1
- package/build/esm/index-fa743e14.js +0 -1
- package/build/esm/index.styles-d0b249c6.js +0 -817
- package/build/esm/isProduction-819e0c5c.js +0 -1
- package/build/esm/localizeNumberFormat-87b8adfd.js +0 -1
- package/build/esm/normalizeLink-86ab5a4c.js +0 -1
- package/build/esm/number-087a7e5f.js +0 -1
- package/build/esm/paths-838a5528.js +0 -1
- package/build/esm/routing-c85cbf05.js +0 -1
- package/build/esm/theme-691eca44.js +0 -1
- package/build/esm/translationsContext-f8842fe7.js +0 -1
- package/build/esm/tslib.es6-1ab8a2bb.js +0 -1
- package/build/esm/types-2d76a291.js +0 -3004
- package/build/esm/types-81267cf7.js +0 -1
- package/build/esm/types-e02aa1d1.js +0 -785
- package/build/esm/useCategory-16048c77.js +0 -1
- package/build/esm/useHealthToolCache-b2ecca8b.js +0 -1
- package/build/esm/useIsInit-c9c6a218.js +0 -1
- package/build/esm/useOutsideClick-9787ba70.js +0 -1
- package/build/esm/usePlacesAutocomplete-1966a8e8.js +0 -1
- package/build/esm/useScrollbarSize-2cadb783.js +0 -1
- package/build/esm/useTranslations-06f29a74.js +0 -1
- package/build/esm/useUniqueId-8d28d0f0.js +0 -1
- package/build/esm/utils-21a3e198.js +0 -1
- package/build/esm/utils-581f9d39.js +0 -8
- package/build/esm/utils-8845cf64.js +0 -141
- package/build/esm/utils-9188a853.js +0 -1
- package/build/getDynamicHealthTool-110fd918.js +0 -1
- package/build/getSocialList-eca125e9.js +0 -1
- package/build/index-06e0154a.js +0 -177
- package/build/index-07abd94a.js +0 -1
- package/build/index-0c773078.js +0 -117
- package/build/index-170f5567.js +0 -1
- package/build/index-19ccb0c7.js +0 -1
- package/build/index-219cacd2.js +0 -1
- package/build/index-2c0386df.js +0 -50
- package/build/index-2ce34495.js +0 -1
- package/build/index-3f31aa06.js +0 -1
- package/build/index-686fe563.js +0 -1
- package/build/index-6c8c7fa5.js +0 -1
- package/build/index-76c307b4.js +0 -375
- package/build/index-78e20b2b.js +0 -1
- package/build/index-853a455f.js +0 -1
- package/build/index-9834ba3a.js +0 -1
- package/build/index-9c1259e4.js +0 -1
- package/build/index-9eed92e6.js +0 -1
- package/build/index-a046b313.js +0 -137
- package/build/index-ae78fa34.js +0 -113
- package/build/index-c4552011.js +0 -1
- package/build/index-d0a7d5e2.js +0 -1
- package/build/index-d59720e6.js +0 -1
- package/build/index-de63ce4e.js +0 -1
- package/build/index-e363ea7e.js +0 -1
- package/build/index-e4952f3b.js +0 -2748
- package/build/index-e9919dca.js +0 -1430
- package/build/index-f124e061.js +0 -1
- package/build/index-fc3d21c5.js +0 -1
- package/build/index.styles-e56f16e2.js +0 -817
- package/build/isProduction-b8d43f53.js +0 -1
- package/build/localizeNumberFormat-7b0e4009.js +0 -1
- package/build/normalizeLink-eb3980aa.js +0 -1
- package/build/number-03c2dc35.js +0 -1
- package/build/paths-38b399e5.js +0 -1
- package/build/routing-fa35242c.js +0 -1
- package/build/theme-58404344.js +0 -1
- package/build/translationsContext-6a4e467c.js +0 -1
- package/build/tslib.es6-f82cfdbc.js +0 -1
- package/build/types-006c0884.js +0 -785
- package/build/types-48100068.js +0 -3004
- package/build/types-b4886ab8.js +0 -1
- package/build/useCategory-5efbe937.js +0 -1
- package/build/useHealthToolCache-4085d047.js +0 -1
- package/build/useIsInit-cde99e17.js +0 -1
- package/build/useOutsideClick-8d455bb1.js +0 -1
- package/build/usePlacesAutocomplete-fa0acdc7.js +0 -1
- package/build/useScrollbarSize-3593573d.js +0 -1
- package/build/useTranslations-d91f297f.js +0 -1
- package/build/useUniqueId-76286c45.js +0 -1
- package/build/utils-6c4e6bc4.js +0 -8
- package/build/utils-dd2fab54.js +0 -141
- package/build/utils-e1f42597.js +0 -1
- package/build/utils-fade3897.js +0 -1
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
import React__default, { useContext, useState } from 'react';
|
|
2
|
+
import { M as MediaQueries } from './utils-2c484c05.js';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { t as theme } from './theme-e74db08c.js';
|
|
5
|
+
import { _ as __rest } from './tslib.es6-1b1533a9.js';
|
|
6
|
+
import { T as TogetherComponentGlobalContext } from './utils-70718e9c.js';
|
|
7
|
+
|
|
8
|
+
const StyledPopup = styled.div `
|
|
9
|
+
position: fixed;
|
|
10
|
+
left: 50%;
|
|
11
|
+
|
|
12
|
+
padding: 0 16px 32px;
|
|
13
|
+
background-color: ${theme.colors.white};
|
|
14
|
+
border-radius: ${theme.borderRadius};
|
|
15
|
+
box-shadow: 0px 4px 8px ${theme.colors.gray200};
|
|
16
|
+
transform: translate(-50%, -50%);
|
|
17
|
+
transition: all 0.5s ease-in-out;
|
|
18
|
+
visibility: hidden;
|
|
19
|
+
|
|
20
|
+
&[data-open='true'] {
|
|
21
|
+
z-index: 400;
|
|
22
|
+
top: 50%;
|
|
23
|
+
opacity: 1;
|
|
24
|
+
visibility: visible;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&[data-open='false'] {
|
|
28
|
+
top: -50%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[data-type='lead'] {
|
|
32
|
+
width: 332px;
|
|
33
|
+
height: 460px;
|
|
34
|
+
|
|
35
|
+
div {
|
|
36
|
+
top: -15px;
|
|
37
|
+
right: -15px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[data-type='form'] {
|
|
42
|
+
width: 496px;
|
|
43
|
+
height: 548px;
|
|
44
|
+
${MediaQueries.mbDown} {
|
|
45
|
+
width: 340px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&[data-type='confirm'] {
|
|
50
|
+
${MediaQueries.mbDown} {
|
|
51
|
+
width: calc(100% - 32px);
|
|
52
|
+
}
|
|
53
|
+
${MediaQueries.mbUp} {
|
|
54
|
+
width: 100%;
|
|
55
|
+
max-width: 407px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.popup-content {
|
|
60
|
+
position: relative;
|
|
61
|
+
z-index: 111;
|
|
62
|
+
height: 100%;
|
|
63
|
+
padding: 16px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.close-button {
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 16px;
|
|
69
|
+
right: 0;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
|
|
72
|
+
img {
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: 100%;
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
const StyledPopupWrapper = styled.div `
|
|
80
|
+
position: fixed;
|
|
81
|
+
z-index: 110;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
align-items: center;
|
|
87
|
+
background: rgba(38, 38, 38, 0.3);
|
|
88
|
+
|
|
89
|
+
&[data-open='false'] {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
`;
|
|
93
|
+
|
|
94
|
+
const Popup = ({ type = 'lead', closeIcon, isOpen = true, onClose, children, className = '', enableAnimation = true, }) => {
|
|
95
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
96
|
+
React__default.createElement(StyledPopup, { "data-open": isOpen, "data-type": type, "data-animation": enableAnimation },
|
|
97
|
+
React__default.createElement("div", { className: `${className || ''} popup-content` },
|
|
98
|
+
!!closeIcon && (React__default.createElement("div", { className: "close-button", onClick: onClose }, closeIcon)),
|
|
99
|
+
children)),
|
|
100
|
+
React__default.createElement(StyledPopupWrapper, { "data-open": isOpen, onClick: onClose })));
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const formatAuthor = (author) => {
|
|
104
|
+
if (!author)
|
|
105
|
+
return {};
|
|
106
|
+
return {
|
|
107
|
+
displayName: author.display_name || null,
|
|
108
|
+
avatar: author.avatar || null,
|
|
109
|
+
thumbnailAvatar: author.avatar_thumbnail || null,
|
|
110
|
+
profileUrl: author.profile_url || null,
|
|
111
|
+
description: author.description || null,
|
|
112
|
+
metaTag: author.meta_tag || '',
|
|
113
|
+
specialty: author.specialty || '',
|
|
114
|
+
organisation: author.organisation || '',
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
const formatArticleExpert = (expert) => {
|
|
118
|
+
if (!expert)
|
|
119
|
+
return {};
|
|
120
|
+
return {
|
|
121
|
+
id: expert.ID || null,
|
|
122
|
+
name: expert.name || null,
|
|
123
|
+
specialty: expert.specialty || null,
|
|
124
|
+
avatar: expert.avatar || null,
|
|
125
|
+
permalink: expert.permalink || null,
|
|
126
|
+
thumbnailAvatar: expert.avatar_thumbnail || null,
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
const formatSpotlightsSummary = (spotlight) => {
|
|
130
|
+
if (typeof spotlight === 'undefined' || !spotlight)
|
|
131
|
+
return null;
|
|
132
|
+
return {
|
|
133
|
+
id: spotlight.ID,
|
|
134
|
+
name: spotlight.name,
|
|
135
|
+
permalink: spotlight.permalink,
|
|
136
|
+
image: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.small_banner) || (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image) || '',
|
|
137
|
+
imageMedium: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_medium) || null,
|
|
138
|
+
imageThumbnail: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_thumbnail) || null,
|
|
139
|
+
// desktopBanner: spotlight?.desktop_banner || '',
|
|
140
|
+
// mobileBanner: spotlight?.mobile_banner || '',
|
|
141
|
+
startDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.start_date,
|
|
142
|
+
endDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.end_date,
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
const formatArticleSubscriptionBanner = (banner) => {
|
|
146
|
+
if (!banner)
|
|
147
|
+
return {};
|
|
148
|
+
const { button_text, button_url, status, banner_desktop, banner_mobile } = banner, rest = __rest(banner, ["button_text", "button_url", "status", "banner_desktop", "banner_mobile"]);
|
|
149
|
+
return Object.assign({ buttonText: button_text || '', buttonUrl: button_url || '', status: Boolean(status), bannerDesktop: banner_desktop || '', bannerMobile: banner_mobile || '' }, rest);
|
|
150
|
+
};
|
|
151
|
+
const TRANSLATE_LANGUAGES = {
|
|
152
|
+
EN: 'English',
|
|
153
|
+
FIL: 'Filipino',
|
|
154
|
+
};
|
|
155
|
+
const formatTranslateOptions = (translate) => {
|
|
156
|
+
if (typeof translate === 'undefined' || Object.keys(translate).length < 2)
|
|
157
|
+
return [];
|
|
158
|
+
return Object.keys(translate).map((languageKey) => ({
|
|
159
|
+
label: languageKey.toUpperCase() in TRANSLATE_LANGUAGES
|
|
160
|
+
? TRANSLATE_LANGUAGES[languageKey.toUpperCase()]
|
|
161
|
+
: languageKey.toUpperCase(),
|
|
162
|
+
value: translate[languageKey].slice(-1) === '/'
|
|
163
|
+
? translate[languageKey]
|
|
164
|
+
: `${translate[languageKey]}/`,
|
|
165
|
+
}));
|
|
166
|
+
};
|
|
167
|
+
const formatArticle = (article) => {
|
|
168
|
+
var _a, _b, _c, _d;
|
|
169
|
+
if (!article)
|
|
170
|
+
return {};
|
|
171
|
+
return {
|
|
172
|
+
id: article.ID,
|
|
173
|
+
postName: article.post_name,
|
|
174
|
+
sponsor: article.sponsor ? formatSponsor(article.sponsor) : null,
|
|
175
|
+
isSponsored: article.is_sponsored || null,
|
|
176
|
+
isPremium: article.is_premium || false,
|
|
177
|
+
postTitle: article.post_title || '',
|
|
178
|
+
postModified: article.post_modified || '',
|
|
179
|
+
postDate: article.post_date || '',
|
|
180
|
+
modifiedTime: article.modified_time || '',
|
|
181
|
+
permalink: article.permalink || '',
|
|
182
|
+
featureImage: article.image || null,
|
|
183
|
+
featureImageMobile: article.image_medium || null,
|
|
184
|
+
featureImageMobileXs: article.image_thumbnail || null,
|
|
185
|
+
author: formatAuthor(article.author),
|
|
186
|
+
reviewer: article.reviewed_by
|
|
187
|
+
? formatAuthor(article.reviewed_by) || null
|
|
188
|
+
: null,
|
|
189
|
+
articleReviewed: (article === null || article === void 0 ? void 0 : article.reviewed)
|
|
190
|
+
? Object.assign(Object.assign({}, article === null || article === void 0 ? void 0 : article.reviewed), { author: formatUserProfile((_a = article === null || article === void 0 ? void 0 : article.reviewed) === null || _a === void 0 ? void 0 : _a.author), editor: formatUserProfile((_b = article === null || article === void 0 ? void 0 : article.reviewed) === null || _b === void 0 ? void 0 : _b.editor), expert: formatUserProfile((_c = article === null || article === void 0 ? void 0 : article.reviewed) === null || _c === void 0 ? void 0 : _c.expert), fact_check: formatUserProfile((_d = article === null || article === void 0 ? void 0 : article.reviewed) === null || _d === void 0 ? void 0 : _d.fact_check) }) : null,
|
|
191
|
+
category: formatCategory(article.category),
|
|
192
|
+
postContent: article.post_content || null,
|
|
193
|
+
keyTakeaways: article.key_takeaways || null,
|
|
194
|
+
categories: (article.categories || []).map(formatCategory),
|
|
195
|
+
sources: article.sources || null,
|
|
196
|
+
description: article.description || null,
|
|
197
|
+
excerpt: article.excerpt || null,
|
|
198
|
+
expert: formatArticleExpert(article.expert),
|
|
199
|
+
metaTag: article.meta_tag || null,
|
|
200
|
+
spotlight: formatSpotlightsSummary(article === null || article === void 0 ? void 0 : article.spotlight),
|
|
201
|
+
affiliate_message: article.affiliate_message || null,
|
|
202
|
+
turnOffComment: !!article.turn_off_comment,
|
|
203
|
+
hasAffiliate: !!article.is_affiliate,
|
|
204
|
+
// faqs: (article.faqs || []).map(formatArticleFaqs),
|
|
205
|
+
translateOptions: formatTranslateOptions(article.translate),
|
|
206
|
+
jumpingLink: article.jumping_link || [],
|
|
207
|
+
pregnancy: (article === null || article === void 0 ? void 0 : article.pregnancy) || false,
|
|
208
|
+
pregnancyWeek: (article === null || article === void 0 ? void 0 : article.week_pregnancy) || 1,
|
|
209
|
+
primaryCategory: formatCategory(article.primary_category),
|
|
210
|
+
turnOffIvsPlayer: !!article.turn_off_ivs_player,
|
|
211
|
+
turnOffArticleVoice: !!article.turn_off_article_voice,
|
|
212
|
+
enableAudio: !!article.enable_audio,
|
|
213
|
+
// breadcrumb: (article.breadcrumb || [])?.map(formatBreadcrumb) || [],
|
|
214
|
+
label: (article === null || article === void 0 ? void 0 : article.label) || '',
|
|
215
|
+
editLast: formatAuthor(article.edit_last),
|
|
216
|
+
subscriptionBanner: formatArticleSubscriptionBanner(article.subscription_banner),
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
const formatUserProfile = (user) => {
|
|
220
|
+
if (typeof user === 'undefined' || !user)
|
|
221
|
+
return null;
|
|
222
|
+
return Object.assign(Object.assign({}, user), { profile_url: (user === null || user === void 0 ? void 0 : user.slug)
|
|
223
|
+
? ['expert', 'medical'].includes((user === null || user === void 0 ? void 0 : user.role) || '')
|
|
224
|
+
? `/expert/${user === null || user === void 0 ? void 0 : user.slug}`
|
|
225
|
+
: `/author/${user === null || user === void 0 ? void 0 : user.slug}`
|
|
226
|
+
: user.profile_url });
|
|
227
|
+
};
|
|
228
|
+
const formatBMIResult = (data) => {
|
|
229
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
230
|
+
if (!data || !data.status)
|
|
231
|
+
return {};
|
|
232
|
+
return {
|
|
233
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
234
|
+
comparison: (_a = data === null || data === void 0 ? void 0 : data.comparison) !== null && _a !== void 0 ? _a : '',
|
|
235
|
+
assessmentData: [
|
|
236
|
+
{
|
|
237
|
+
tab: 'tools.condition',
|
|
238
|
+
content: (_b = data === null || data === void 0 ? void 0 : data.condition) !== null && _b !== void 0 ? _b : '',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
tab: 'tools.risks',
|
|
242
|
+
content: (_c = data === null || data === void 0 ? void 0 : data.risk) !== null && _c !== void 0 ? _c : '',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
tab: 'tools.suggestion',
|
|
246
|
+
content: (_d = data === null || data === void 0 ? void 0 : data.suggestion) !== null && _d !== void 0 ? _d : '',
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
chartData: ((_e = data === null || data === void 0 ? void 0 : data.chart_data) === null || _e === void 0 ? void 0 : _e.length) > 0 ? data === null || data === void 0 ? void 0 : data.chart_data : [],
|
|
250
|
+
disclaimer: (_f = data === null || data === void 0 ? void 0 : data.disclaimer) !== null && _f !== void 0 ? _f : '',
|
|
251
|
+
illustrator: (_g = data === null || data === void 0 ? void 0 : data.illustrator) !== null && _g !== void 0 ? _g : '',
|
|
252
|
+
faqs: (_h = data === null || data === void 0 ? void 0 : data.faqs) !== null && _h !== void 0 ? _h : [],
|
|
253
|
+
suggestedArticlesLink: (_j = data === null || data === void 0 ? void 0 : data.suggested_articles_link) !== null && _j !== void 0 ? _j : '',
|
|
254
|
+
// suggestedArticles: data?.suggested_articles?.map(formatArticle) ?? [],
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
const formatSponsor = (sponsor) => {
|
|
258
|
+
if (!sponsor)
|
|
259
|
+
return {};
|
|
260
|
+
return {
|
|
261
|
+
title: sponsor.title,
|
|
262
|
+
logo: sponsor.logo,
|
|
263
|
+
link: sponsor.link,
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
const formatReviewedCategory = (data) => {
|
|
267
|
+
return {
|
|
268
|
+
postTitle: data.post_title,
|
|
269
|
+
permalink: data.permalink,
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
const formatCategory = (category) => {
|
|
273
|
+
var _a, _b;
|
|
274
|
+
if (!category)
|
|
275
|
+
return {};
|
|
276
|
+
return {
|
|
277
|
+
termId: category.term_id || null,
|
|
278
|
+
sponsor: category.sponsor ? formatSponsor(category.sponsor) : null,
|
|
279
|
+
isSponsored: category.is_sponsored || null,
|
|
280
|
+
categoryName: category.cat_name || null,
|
|
281
|
+
name: category.name || null,
|
|
282
|
+
iconUrl: category.icon || '',
|
|
283
|
+
slugName: category.category_nicename || null,
|
|
284
|
+
description: category.description || null,
|
|
285
|
+
featureImage: category.image || null,
|
|
286
|
+
displayName: category.name || null,
|
|
287
|
+
parent: category.parent || null,
|
|
288
|
+
permalink: category.permalink || null,
|
|
289
|
+
slug: category.slug || null,
|
|
290
|
+
childCates: ((_a = category.child_cates) === null || _a === void 0 ? void 0 : _a.map((childCate) => {
|
|
291
|
+
return formatCategory(childCate);
|
|
292
|
+
})) || [],
|
|
293
|
+
colorFeatureImage: category.color_feature_image || null,
|
|
294
|
+
imageColor: category.image_color || null,
|
|
295
|
+
textColor: category.text_color || null,
|
|
296
|
+
catParent: ((_b = category.cat_parent) === null || _b === void 0 ? void 0 : _b.name)
|
|
297
|
+
? {
|
|
298
|
+
name: category.cat_parent.name,
|
|
299
|
+
permalink: category.cat_parent.permalink,
|
|
300
|
+
}
|
|
301
|
+
: {},
|
|
302
|
+
metaTag: category.meta_tag || '',
|
|
303
|
+
reviewedBy: category.reviewed_by
|
|
304
|
+
? formatReviewedCategory(category.reviewed_by)
|
|
305
|
+
: null,
|
|
306
|
+
reviewedDate: category.reviewed_date || '',
|
|
307
|
+
faqs: category.faqs
|
|
308
|
+
? category.faqs.map((faq) => formatFaqsCategory(faq))
|
|
309
|
+
: null,
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
const formatCategoryApi = (category) => {
|
|
313
|
+
if (!category)
|
|
314
|
+
return {};
|
|
315
|
+
return {
|
|
316
|
+
categoryInfo: formatCategory(category.data.category) || null,
|
|
317
|
+
explainersPosts: (category.data.explainers_posts || []).map(formatArticle),
|
|
318
|
+
subCategories: (category.data.sub_categories || []).map(formatCategory),
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
const formatFaqsCategory = (data) => {
|
|
322
|
+
return {
|
|
323
|
+
title: data.title,
|
|
324
|
+
content: data.content,
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
const formatHealthTool = (healthTool) => {
|
|
328
|
+
if (!healthTool)
|
|
329
|
+
return {};
|
|
330
|
+
return {
|
|
331
|
+
icon: healthTool.icon,
|
|
332
|
+
link: healthTool.link.startsWith('http')
|
|
333
|
+
? healthTool.link
|
|
334
|
+
: '/health-tools' + healthTool.link,
|
|
335
|
+
subtitle: healthTool.subtitle,
|
|
336
|
+
title: healthTool.title,
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
const formatHealthToolTypeCategory = (category) => {
|
|
340
|
+
var _a, _b;
|
|
341
|
+
if (!category)
|
|
342
|
+
return {};
|
|
343
|
+
return {
|
|
344
|
+
termId: (category === null || category === void 0 ? void 0 : category.term_id) || 0,
|
|
345
|
+
name: (category === null || category === void 0 ? void 0 : category.name) || '',
|
|
346
|
+
healthTools: (_b = (_a = category === null || category === void 0 ? void 0 : category.health_tools) === null || _a === void 0 ? void 0 : _a.map((tool) => formatHealthTool(tool))) !== null && _b !== void 0 ? _b : [],
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
const formatCommunity = (community) => {
|
|
350
|
+
if (!community)
|
|
351
|
+
return {};
|
|
352
|
+
return {
|
|
353
|
+
topicCount: community.topics_count || 0,
|
|
354
|
+
postCount: community.posts_count || 0,
|
|
355
|
+
memberCount: community.members_count || 0,
|
|
356
|
+
thumbnail: community.thumbnail || '',
|
|
357
|
+
coverImage: community.cover_image || '',
|
|
358
|
+
mobileCoverImage: community.mobile_cover_image || '',
|
|
359
|
+
name: community.name || '',
|
|
360
|
+
description: community.description || '',
|
|
361
|
+
slug: community.slug || '',
|
|
362
|
+
id: community.id || 0,
|
|
363
|
+
joined: Boolean(community.joined),
|
|
364
|
+
isActive: community.is_active !== null && typeof community.is_active !== 'undefined'
|
|
365
|
+
? Boolean(community.is_active)
|
|
366
|
+
: true,
|
|
367
|
+
mappedCategoryId: community.mapped_category_id || 0,
|
|
368
|
+
discoverCategory: community.discover_category
|
|
369
|
+
? {
|
|
370
|
+
categoryId: community.discover_category.category_id || 0,
|
|
371
|
+
name: community.discover_category.name || '',
|
|
372
|
+
}
|
|
373
|
+
: null,
|
|
374
|
+
isHidden: Boolean(community.is_hidden),
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
const formatTopic = (topic) => {
|
|
378
|
+
var _a, _b, _c, _d;
|
|
379
|
+
if (!topic)
|
|
380
|
+
return {};
|
|
381
|
+
return {
|
|
382
|
+
id: topic.id || 0,
|
|
383
|
+
name: topic.name || '',
|
|
384
|
+
image: topic.thumbnail || '',
|
|
385
|
+
slug: topic.slug || '',
|
|
386
|
+
url: '/' + ((_a = topic.community) === null || _a === void 0 ? void 0 : _a.slug) + '/' + (topic === null || topic === void 0 ? void 0 : topic.slug) || '',
|
|
387
|
+
description: topic.description || '',
|
|
388
|
+
joined: topic.joined || false,
|
|
389
|
+
postCount: topic.count_posts || 0,
|
|
390
|
+
memberCount: topic.count_members || 0,
|
|
391
|
+
communityId: String((_b = topic.community) === null || _b === void 0 ? void 0 : _b.id),
|
|
392
|
+
communitySlug: (_c = topic.community) === null || _c === void 0 ? void 0 : _c.slug,
|
|
393
|
+
communityName: (_d = topic.community) === null || _d === void 0 ? void 0 : _d.name,
|
|
394
|
+
order: topic.order || 0,
|
|
395
|
+
isActive: topic.is_active !== null && typeof topic.is_active !== 'undefined'
|
|
396
|
+
? Boolean(topic.is_active)
|
|
397
|
+
: true,
|
|
398
|
+
mappedCategoryId: topic.mapped_category_id || 0,
|
|
399
|
+
discoverCategory: topic.discover_category
|
|
400
|
+
? {
|
|
401
|
+
categoryId: topic.discover_category.category_id || 0,
|
|
402
|
+
name: topic.discover_category.name || '',
|
|
403
|
+
}
|
|
404
|
+
: null,
|
|
405
|
+
isHidden: Boolean(topic.is_hidden),
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
const formatExpertAnswer = (data) => {
|
|
409
|
+
if (!data)
|
|
410
|
+
return {};
|
|
411
|
+
return {
|
|
412
|
+
answer: data === null || data === void 0 ? void 0 : data.answer.map(formatComment),
|
|
413
|
+
expert: data === null || data === void 0 ? void 0 : data.expert,
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
const formatPost = (post) => {
|
|
417
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
418
|
+
if (!post)
|
|
419
|
+
return {};
|
|
420
|
+
return {
|
|
421
|
+
id: post.id,
|
|
422
|
+
topics: ((_a = post.topics) === null || _a === void 0 ? void 0 : _a.map((topic) => {
|
|
423
|
+
var _a, _b, _c, _d;
|
|
424
|
+
return ({
|
|
425
|
+
id: topic.id || 0,
|
|
426
|
+
name: topic.name || '',
|
|
427
|
+
slug: topic.slug || '',
|
|
428
|
+
url: '/' + ((_a = post.community) === null || _a === void 0 ? void 0 : _a.slug) + '/' + topic.slug,
|
|
429
|
+
communityId: String((_b = post.community) === null || _b === void 0 ? void 0 : _b.id),
|
|
430
|
+
communitySlug: ((_c = post.community) === null || _c === void 0 ? void 0 : _c.slug) || '',
|
|
431
|
+
communityName: ((_d = post.community) === null || _d === void 0 ? void 0 : _d.name) || '',
|
|
432
|
+
isHidden: Boolean(topic.is_hidden),
|
|
433
|
+
isActive: true,
|
|
434
|
+
});
|
|
435
|
+
})) || [],
|
|
436
|
+
community: {
|
|
437
|
+
id: ((_b = post.community) === null || _b === void 0 ? void 0 : _b.id) || 0,
|
|
438
|
+
name: ((_c = post.community) === null || _c === void 0 ? void 0 : _c.name) || '',
|
|
439
|
+
slug: ((_d = post.community) === null || _d === void 0 ? void 0 : _d.slug) || '',
|
|
440
|
+
isActive: true,
|
|
441
|
+
isHidden: Boolean((_e = post.community) === null || _e === void 0 ? void 0 : _e.is_hidden),
|
|
442
|
+
},
|
|
443
|
+
slug: post.slug || '',
|
|
444
|
+
author: {
|
|
445
|
+
id: ((_f = post.user) === null || _f === void 0 ? void 0 : _f.id) || 0,
|
|
446
|
+
username: ((_g = post.user) === null || _g === void 0 ? void 0 : _g.user_name) || '',
|
|
447
|
+
email: ((_h = post.user) === null || _h === void 0 ? void 0 : _h.email) || '',
|
|
448
|
+
name: ((_j = post.user) === null || _j === void 0 ? void 0 : _j.name) || '',
|
|
449
|
+
avatar: ((_k = post.user) === null || _k === void 0 ? void 0 : _k.avatar) || '',
|
|
450
|
+
role: ((_l = post.user) === null || _l === void 0 ? void 0 : _l.role)
|
|
451
|
+
? (_o = (_m = post.user) === null || _m === void 0 ? void 0 : _m.role) === null || _o === void 0 ? void 0 : _o.toLowerCase()
|
|
452
|
+
: '',
|
|
453
|
+
type: ((_p = post.user) === null || _p === void 0 ? void 0 : _p.type) || '',
|
|
454
|
+
partnerId: ((_q = post.user) === null || _q === void 0 ? void 0 : _q.partner_id) ? String((_r = post.user) === null || _r === void 0 ? void 0 : _r.partner_id) : '',
|
|
455
|
+
title: ((_s = post.user) === null || _s === void 0 ? void 0 : _s.title) || '',
|
|
456
|
+
doctorId: ((_t = post.user) === null || _t === void 0 ? void 0 : _t.doctor_id) ? String((_u = post.user) === null || _u === void 0 ? void 0 : _u.doctor_id) : '',
|
|
457
|
+
hospitalId: ((_v = post.user) === null || _v === void 0 ? void 0 : _v.hospital_id) ? String((_w = post.user) === null || _w === void 0 ? void 0 : _w.hospital_id) : '',
|
|
458
|
+
},
|
|
459
|
+
previewUrl: {
|
|
460
|
+
title: post.preview_title || '',
|
|
461
|
+
url: post.preview_link || '',
|
|
462
|
+
image: post.preview_image || '',
|
|
463
|
+
description: post.preview_description || '',
|
|
464
|
+
},
|
|
465
|
+
createdAt: post.created_at || '',
|
|
466
|
+
scheduleDateTime: post.schedule_datetime || '',
|
|
467
|
+
photos: post.images || [],
|
|
468
|
+
description: post.description || '',
|
|
469
|
+
commentsCount: post.comments_count || 0,
|
|
470
|
+
likesCount: post.likes_count || 0,
|
|
471
|
+
title: post.name || '',
|
|
472
|
+
isPin: !!post.is_pin,
|
|
473
|
+
pinDate: post.pin_date || '',
|
|
474
|
+
liked: post.liked || false,
|
|
475
|
+
bookmarked: Boolean(post.bookmarked) || false,
|
|
476
|
+
mentions: post.mentions || [],
|
|
477
|
+
commented: Boolean(post.commented) || false,
|
|
478
|
+
introUrl: post.intro_url || '',
|
|
479
|
+
bannerImage: post.banner_image || '',
|
|
480
|
+
isAnonymous: post.is_anonymous ? 1 : 0,
|
|
481
|
+
isAskDoctor: post.is_question ? 1 : 0,
|
|
482
|
+
expertAnswer: formatExpertAnswer(post === null || post === void 0 ? void 0 : post.expert_answer),
|
|
483
|
+
createdTime: post.created_time || '',
|
|
484
|
+
isMinigame: post.event_type === 'mini_game',
|
|
485
|
+
eventStart: post.event_start,
|
|
486
|
+
eventEnd: post.event_end,
|
|
487
|
+
// authorExpertId: post.author_expert_id ? String(post.author_expert_id) : '',
|
|
488
|
+
};
|
|
489
|
+
};
|
|
490
|
+
const formatPostPagination = (pagination) => {
|
|
491
|
+
if (!pagination)
|
|
492
|
+
return {};
|
|
493
|
+
return {
|
|
494
|
+
currentPage: pagination.current || 0,
|
|
495
|
+
lastPage: pagination.last || 0,
|
|
496
|
+
total: pagination.total_items || 0,
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
const formatNotification = (notification) => {
|
|
500
|
+
var _a, _b, _c;
|
|
501
|
+
if (!notification)
|
|
502
|
+
return {};
|
|
503
|
+
return {
|
|
504
|
+
time: notification.created_at,
|
|
505
|
+
content: notification.content,
|
|
506
|
+
postId: String(notification.post_id),
|
|
507
|
+
fromUser: {
|
|
508
|
+
name: (_a = notification.from_user) === null || _a === void 0 ? void 0 : _a.name,
|
|
509
|
+
id: (_b = notification.from_user) === null || _b === void 0 ? void 0 : _b.id,
|
|
510
|
+
avatar: (_c = notification.from_user) === null || _c === void 0 ? void 0 : _c.avatar,
|
|
511
|
+
},
|
|
512
|
+
toUserId: String(notification.to_user_id),
|
|
513
|
+
postSlug: notification.post_slug || '',
|
|
514
|
+
communitySlug: notification.community_slug || '',
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
const formatSpotlightsList = (spotligts) => {
|
|
518
|
+
if (!spotligts)
|
|
519
|
+
return [];
|
|
520
|
+
return spotligts.map((spotlight) => ({
|
|
521
|
+
id: spotlight.ID,
|
|
522
|
+
name: spotlight.name,
|
|
523
|
+
permalink: spotlight.permalink,
|
|
524
|
+
image: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.small_banner) || (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image),
|
|
525
|
+
imageMedium: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_medium) || null,
|
|
526
|
+
imageThumbnail: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_thumbnail) || null,
|
|
527
|
+
startDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.start_date,
|
|
528
|
+
endDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.end_date,
|
|
529
|
+
}));
|
|
530
|
+
};
|
|
531
|
+
const formatOvulationInfo = (data) => {
|
|
532
|
+
if (!data)
|
|
533
|
+
return {};
|
|
534
|
+
return {
|
|
535
|
+
disclaimer: data.disclaimer,
|
|
536
|
+
featuredImage: data.featured_image,
|
|
537
|
+
info: data.informations || [],
|
|
538
|
+
reviewedBy: data.reviewed_by
|
|
539
|
+
? {
|
|
540
|
+
id: data.reviewed_by.ID,
|
|
541
|
+
permalink: data.reviewed_by.permalink,
|
|
542
|
+
name: data.reviewed_by.name,
|
|
543
|
+
postTitle: data.reviewed_by.post_title,
|
|
544
|
+
}
|
|
545
|
+
: null,
|
|
546
|
+
reviewedDate: data.reviewed_date,
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
const formatSuggestedArticle = (data) => {
|
|
550
|
+
if (!data)
|
|
551
|
+
return {};
|
|
552
|
+
return {
|
|
553
|
+
postId: data.post_id || null,
|
|
554
|
+
categoryId: data.category_id || null,
|
|
555
|
+
postUrl: data.post_url || null,
|
|
556
|
+
postReviewed: data.post_reviewed || null,
|
|
557
|
+
postPageviews: data.post_pageviews || null,
|
|
558
|
+
postRank: data.post_rank || null,
|
|
559
|
+
isPin: data.is_pin || null,
|
|
560
|
+
frequency: data.frequency || null,
|
|
561
|
+
topic: data.topic || null,
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
const formatTopicHealthTool = (data) => {
|
|
565
|
+
if (!data)
|
|
566
|
+
return {};
|
|
567
|
+
return {
|
|
568
|
+
id: data.tool_id || null,
|
|
569
|
+
topicFrequency: data.frequency || null,
|
|
570
|
+
topicId: data.topic_id || null,
|
|
571
|
+
topicName: data.topic_name || null,
|
|
572
|
+
isPinned: !!data.is_pin || null,
|
|
573
|
+
toolLink: data.tool_link || '',
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
const formatComment = (data) => {
|
|
577
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
578
|
+
if (!data)
|
|
579
|
+
return {};
|
|
580
|
+
return {
|
|
581
|
+
content: data.content,
|
|
582
|
+
countLikes: data.likes_count,
|
|
583
|
+
countReplies: data.replies_count,
|
|
584
|
+
createdAt: data.created_at,
|
|
585
|
+
createdTime: data.created_time,
|
|
586
|
+
id: String(data.id),
|
|
587
|
+
images: data.image || [],
|
|
588
|
+
link: data.link || null,
|
|
589
|
+
replies: data.replies && data.replies.length > 0
|
|
590
|
+
? data.replies.map(formatComment)
|
|
591
|
+
: [],
|
|
592
|
+
author: {
|
|
593
|
+
id: ((_a = data.user) === null || _a === void 0 ? void 0 : _a.id) || 0,
|
|
594
|
+
username: ((_b = data.user) === null || _b === void 0 ? void 0 : _b.user_name) || '',
|
|
595
|
+
name: ((_c = data.user) === null || _c === void 0 ? void 0 : _c.name) || '',
|
|
596
|
+
role: ((_d = data.user) === null || _d === void 0 ? void 0 : _d.role)
|
|
597
|
+
? (_f = (_e = data.user) === null || _e === void 0 ? void 0 : _e.role) === null || _f === void 0 ? void 0 : _f.toLowerCase()
|
|
598
|
+
: '',
|
|
599
|
+
avatar: ((_g = data.user) === null || _g === void 0 ? void 0 : _g.avatar) || '',
|
|
600
|
+
type: ((_h = data.user) === null || _h === void 0 ? void 0 : _h.type) || '',
|
|
601
|
+
email: ((_j = data.user) === null || _j === void 0 ? void 0 : _j.email) || '',
|
|
602
|
+
partnerId: ((_k = data.user) === null || _k === void 0 ? void 0 : _k.partner_id) ? String((_l = data.user) === null || _l === void 0 ? void 0 : _l.partner_id) : '',
|
|
603
|
+
title: ((_m = data.user) === null || _m === void 0 ? void 0 : _m.title) || '',
|
|
604
|
+
doctorId: ((_o = data.user) === null || _o === void 0 ? void 0 : _o.doctor_id) ? String((_p = data.user) === null || _p === void 0 ? void 0 : _p.doctor_id) : '',
|
|
605
|
+
hospitalId: ((_q = data.user) === null || _q === void 0 ? void 0 : _q.hospital_id) ? String((_r = data.user) === null || _r === void 0 ? void 0 : _r.hospital_id) : '',
|
|
606
|
+
},
|
|
607
|
+
liked: !!data.liked,
|
|
608
|
+
mentionedUser: data.mentioned
|
|
609
|
+
? {
|
|
610
|
+
id: ((_s = data.mentioned) === null || _s === void 0 ? void 0 : _s.id) || 0,
|
|
611
|
+
username: ((_t = data.mentioned) === null || _t === void 0 ? void 0 : _t.user_name) || '',
|
|
612
|
+
name: ((_u = data.mentioned) === null || _u === void 0 ? void 0 : _u.name) || '',
|
|
613
|
+
role: ((_v = data.mentioned) === null || _v === void 0 ? void 0 : _v.role)
|
|
614
|
+
? (_x = (_w = data.mentioned) === null || _w === void 0 ? void 0 : _w.role) === null || _x === void 0 ? void 0 : _x.toLowerCase()
|
|
615
|
+
: '',
|
|
616
|
+
avatar: ((_y = data.mentioned) === null || _y === void 0 ? void 0 : _y.avatar) || '',
|
|
617
|
+
type: ((_z = data.mentioned) === null || _z === void 0 ? void 0 : _z.type) || '',
|
|
618
|
+
email: ((_0 = data.mentioned) === null || _0 === void 0 ? void 0 : _0.email) || '',
|
|
619
|
+
partnerId: ((_1 = data.mentioned) === null || _1 === void 0 ? void 0 : _1.partner_id)
|
|
620
|
+
? String((_2 = data.mentioned) === null || _2 === void 0 ? void 0 : _2.partner_id)
|
|
621
|
+
: '',
|
|
622
|
+
doctorId: ((_3 = data.mentioned) === null || _3 === void 0 ? void 0 : _3.doctor_id)
|
|
623
|
+
? String((_4 = data.mentioned) === null || _4 === void 0 ? void 0 : _4.doctor_id)
|
|
624
|
+
: '',
|
|
625
|
+
hospitalId: ((_5 = data.mentioned) === null || _5 === void 0 ? void 0 : _5.hospital_id)
|
|
626
|
+
? String((_6 = data.mentioned) === null || _6 === void 0 ? void 0 : _6.hospital_id)
|
|
627
|
+
: '',
|
|
628
|
+
title: ((_7 = data.mentioned) === null || _7 === void 0 ? void 0 : _7.title) || '',
|
|
629
|
+
}
|
|
630
|
+
: null,
|
|
631
|
+
mentions: data.mentions || [],
|
|
632
|
+
isSensitive: data.is_sensitive || 0,
|
|
633
|
+
userReadComment: data.user_read_comment,
|
|
634
|
+
source: data.source || [],
|
|
635
|
+
isVerify: data.is_verify || 0,
|
|
636
|
+
isOppose: data.is_oppose || 0,
|
|
637
|
+
userVerify: data.user_verify || {},
|
|
638
|
+
categorySlug: data.categories || '',
|
|
639
|
+
isAnonymous: Boolean(Number(data.is_anonymous || 0)),
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
const formatReportedPostToPostDetail = (data) => {
|
|
643
|
+
if (!data)
|
|
644
|
+
return {};
|
|
645
|
+
return {
|
|
646
|
+
name: data.title,
|
|
647
|
+
description: data.description,
|
|
648
|
+
images: data.images,
|
|
649
|
+
likes_count: data.count_likes,
|
|
650
|
+
comments_count: data.count_comments,
|
|
651
|
+
topics: [],
|
|
652
|
+
// created_at:
|
|
653
|
+
// created_date?: string
|
|
654
|
+
// preview_image:
|
|
655
|
+
slug: data.post_slug,
|
|
656
|
+
id: data.post_id,
|
|
657
|
+
is_pin: data.is_pin,
|
|
658
|
+
pin_date: '',
|
|
659
|
+
post_type: data.post_type,
|
|
660
|
+
schedule_datetime: data.schedule_datetime,
|
|
661
|
+
is_active: data.is_active,
|
|
662
|
+
preview_title: data.preview_title || '',
|
|
663
|
+
preview_image: data.preview_image || '',
|
|
664
|
+
preview_description: data.preview_description || '',
|
|
665
|
+
preview_link: data.preview_link || '',
|
|
666
|
+
user: data.user,
|
|
667
|
+
created_at: '',
|
|
668
|
+
created_time: '',
|
|
669
|
+
community: {
|
|
670
|
+
id: data.community_id,
|
|
671
|
+
name: data.community_name,
|
|
672
|
+
slug: data.community_slug,
|
|
673
|
+
description: '',
|
|
674
|
+
},
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
const formatTopicSubot = (data) => {
|
|
678
|
+
if (!data)
|
|
679
|
+
return {};
|
|
680
|
+
return {
|
|
681
|
+
chatBotId: data.subot_id,
|
|
682
|
+
isPinned: data.is_pin,
|
|
683
|
+
topicId: data.topic_id,
|
|
684
|
+
topicFrequency: data.frequency,
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
const formatSiteWideBanner = (sitewide_banner, type) => {
|
|
688
|
+
if (typeof sitewide_banner === 'undefined' || !sitewide_banner)
|
|
689
|
+
return null;
|
|
690
|
+
return {
|
|
691
|
+
content: (sitewide_banner === null || sitewide_banner === void 0 ? void 0 : sitewide_banner.content) || '',
|
|
692
|
+
icon: (sitewide_banner === null || sitewide_banner === void 0 ? void 0 : sitewide_banner.icon) || '',
|
|
693
|
+
type: type || 'other',
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
const formatPWGContent = (data) => {
|
|
697
|
+
if (!data)
|
|
698
|
+
return {};
|
|
699
|
+
return {
|
|
700
|
+
disclaimer: data.disclaimer,
|
|
701
|
+
info: data.info || [],
|
|
702
|
+
reviewedBy: data.reviewed_by ? formatUserProfile(data.reviewed_by) : null,
|
|
703
|
+
reviewedDate: data.reviewed_date,
|
|
704
|
+
metaTag: data.meta_tag,
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
const formatUserProfileUrl = (user) => {
|
|
708
|
+
if (typeof user === 'undefined' || !user)
|
|
709
|
+
return '';
|
|
710
|
+
return (user === null || user === void 0 ? void 0 : user.turn_off_profile)
|
|
711
|
+
? ''
|
|
712
|
+
: (user === null || user === void 0 ? void 0 : user.slug)
|
|
713
|
+
? ['expert', 'medical'].includes((user === null || user === void 0 ? void 0 : user.role) || '')
|
|
714
|
+
? `/expert/${user === null || user === void 0 ? void 0 : user.slug}`
|
|
715
|
+
: `/author/${user === null || user === void 0 ? void 0 : user.slug}`
|
|
716
|
+
: (user === null || user === void 0 ? void 0 : user.profile_url) || (user === null || user === void 0 ? void 0 : user.permalink) || '#';
|
|
717
|
+
};
|
|
718
|
+
const formatTHRContent = (data) => {
|
|
719
|
+
if (!data)
|
|
720
|
+
return {};
|
|
721
|
+
return {
|
|
722
|
+
disclaimer: data.disclaimer,
|
|
723
|
+
info: data.info || [],
|
|
724
|
+
reviewedBy: data.reviewed_by ? formatUserProfile(data.reviewed_by) : null,
|
|
725
|
+
reviewedDate: data.reviewed_date,
|
|
726
|
+
metaTag: data.meta_tag,
|
|
727
|
+
};
|
|
728
|
+
};
|
|
729
|
+
const formatBabyGrowthContent = (data) => {
|
|
730
|
+
var _a, _b, _c;
|
|
731
|
+
if (!data || !data.information)
|
|
732
|
+
return {};
|
|
733
|
+
return {
|
|
734
|
+
information: (_a = data.information.map((info) => ({
|
|
735
|
+
title: info.title,
|
|
736
|
+
description: info.description,
|
|
737
|
+
}))) !== null && _a !== void 0 ? _a : [],
|
|
738
|
+
reviewBy: {
|
|
739
|
+
reviewer: ((_b = data.reviewed_by) === null || _b === void 0 ? void 0 : _b.display_name) || ((_c = data.reviewed_by) === null || _c === void 0 ? void 0 : _c.name) || '',
|
|
740
|
+
date: data.reviewed_date || '',
|
|
741
|
+
link: formatUserProfileUrl(data === null || data === void 0 ? void 0 : data.reviewed_by),
|
|
742
|
+
},
|
|
743
|
+
metaTag: data.meta_tag || '',
|
|
744
|
+
title: data.title || '',
|
|
745
|
+
description: data.description || '',
|
|
746
|
+
disclaimer: data.disclaimer || '',
|
|
747
|
+
is_sponsored: data.is_sponsored || false,
|
|
748
|
+
sponsor: data.sponsor,
|
|
749
|
+
featuredImage: data.featured_image || '',
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
var dataTransform = /*#__PURE__*/Object.freeze({
|
|
754
|
+
__proto__: null,
|
|
755
|
+
formatAuthor: formatAuthor,
|
|
756
|
+
formatArticleExpert: formatArticleExpert,
|
|
757
|
+
formatSpotlightsSummary: formatSpotlightsSummary,
|
|
758
|
+
TRANSLATE_LANGUAGES: TRANSLATE_LANGUAGES,
|
|
759
|
+
formatTranslateOptions: formatTranslateOptions,
|
|
760
|
+
formatArticle: formatArticle,
|
|
761
|
+
formatUserProfile: formatUserProfile,
|
|
762
|
+
formatBMIResult: formatBMIResult,
|
|
763
|
+
formatSponsor: formatSponsor,
|
|
764
|
+
formatReviewedCategory: formatReviewedCategory,
|
|
765
|
+
formatCategory: formatCategory,
|
|
766
|
+
formatCategoryApi: formatCategoryApi,
|
|
767
|
+
formatFaqsCategory: formatFaqsCategory,
|
|
768
|
+
formatHealthTool: formatHealthTool,
|
|
769
|
+
formatHealthToolTypeCategory: formatHealthToolTypeCategory,
|
|
770
|
+
formatCommunity: formatCommunity,
|
|
771
|
+
formatTopic: formatTopic,
|
|
772
|
+
formatExpertAnswer: formatExpertAnswer,
|
|
773
|
+
formatPost: formatPost,
|
|
774
|
+
formatPostPagination: formatPostPagination,
|
|
775
|
+
formatNotification: formatNotification,
|
|
776
|
+
formatSpotlightsList: formatSpotlightsList,
|
|
777
|
+
formatOvulationInfo: formatOvulationInfo,
|
|
778
|
+
formatSuggestedArticle: formatSuggestedArticle,
|
|
779
|
+
formatTopicHealthTool: formatTopicHealthTool,
|
|
780
|
+
formatComment: formatComment,
|
|
781
|
+
formatReportedPostToPostDetail: formatReportedPostToPostDetail,
|
|
782
|
+
formatTopicSubot: formatTopicSubot,
|
|
783
|
+
formatSiteWideBanner: formatSiteWideBanner,
|
|
784
|
+
formatPWGContent: formatPWGContent,
|
|
785
|
+
formatUserProfileUrl: formatUserProfileUrl,
|
|
786
|
+
formatTHRContent: formatTHRContent,
|
|
787
|
+
formatBabyGrowthContent: formatBabyGrowthContent
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
const StyledUserAvatar = styled.div `
|
|
791
|
+
width: ${(props) => props.size || 40}px;
|
|
792
|
+
height: ${(props) => props.size || 40}px;
|
|
793
|
+
flex-shrink: 0;
|
|
794
|
+
cursor: pointer;
|
|
795
|
+
|
|
796
|
+
img {
|
|
797
|
+
border-radius: 50%;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.avatar {
|
|
801
|
+
width: 100%;
|
|
802
|
+
height: 100%;
|
|
803
|
+
object-fit: cover;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
.avatar-default {
|
|
807
|
+
display: flex;
|
|
808
|
+
align-items: center;
|
|
809
|
+
justify-content: center;
|
|
810
|
+
background-color: ${theme.colors.secondaryBase};
|
|
811
|
+
border-radius: 50%;
|
|
812
|
+
color: white;
|
|
813
|
+
font-size: 1em;
|
|
814
|
+
font-weight: bold;
|
|
815
|
+
line-height: 1;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
&[data-is-marrybaby='true'] {
|
|
819
|
+
.avatar-default {
|
|
820
|
+
background-color: ${theme.mbColors.pink};
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
`;
|
|
824
|
+
|
|
825
|
+
const UserAvatar = (_a) => {
|
|
826
|
+
var { className, isMarryBaby: isMarryBabyProp, style, avatar, username, size } = _a, rest = __rest(_a, ["className", "isMarryBaby", "style", "avatar", "username", "size"]);
|
|
827
|
+
const { data: { env: { isMarryBaby: isMarryBabyContext }, }, } = useContext(TogetherComponentGlobalContext);
|
|
828
|
+
const isMarryBaby = typeof isMarryBabyProp === 'boolean' ? isMarryBabyProp : isMarryBabyContext;
|
|
829
|
+
const [tempAvatar, setTempAvatar] = useState(false);
|
|
830
|
+
return (React__default.createElement(StyledUserAvatar, Object.assign({ "data-is-marrybaby": isMarryBaby, className: className, style: style, size: size }, rest), avatar && !tempAvatar ? (React__default.createElement("img", { loading: "lazy", src: avatar, className: `avatar`, alt: "avatar", onError: () => {
|
|
831
|
+
// e.currentTarget.onerror = null
|
|
832
|
+
if (!tempAvatar)
|
|
833
|
+
setTempAvatar(true);
|
|
834
|
+
} })) : (React__default.createElement("div", { className: "avatar avatar-default" }, username && (username === null || username === void 0 ? void 0 : username.length) > 0 ? username[0].toUpperCase() : 'A'))));
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
export { Popup as P, UserAvatar as U, formatPost as a, formatComment as b, formatCommunity as c, dataTransform as d, formatArticle as e, formatTopic as f, formatCategory as g, formatUserProfileUrl as h };
|