@hhgtech/hhg-components 1.28.27 → 1.28.28
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-14381f42.js → constants-32fce788.js} +1 -1
- package/build/{constants-366d8cc3.js → constants-40e42f36.js} +1 -1
- package/build/constants.js +1 -1
- package/build/{core-7b6d9373.js → core-9daa2b6d.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/babyGrowth.js +4 -4
- 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-a2326fe5.js → constants-cf8d2b27.js} +2 -2
- package/build/esm/{constants-f36eb4e2.js → constants-f17c72d7.js} +1 -1
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-2f2dda7e.js → core-469917c1.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/{getDynamicHealthTool-41d50b69.js → getDynamicHealthTool-07d36d83.js} +1 -1
- package/build/esm/{getSocialList-060992d0.js → getSocialList-52e734b5.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-0da50440.js → index-0914cf85.js} +1 -1
- package/build/esm/index-0f17b8aa.js +1 -0
- package/build/esm/index-36c96e53.js +1 -0
- package/build/esm/{index-7764ffef.js → index-539f568d.js} +1 -1
- package/build/esm/{index-7eaffe1d.js → index-59321c99.js} +1 -1
- package/build/esm/{index-ad37bd51.js → index-5ff5ccf6.js} +1 -1
- package/build/esm/{index-c97cb127.js → index-63cb82b7.js} +1 -1
- package/build/esm/{index-be029805.js → index-6a242131.js} +6 -6
- package/build/esm/index-6db1bd1f.js +1 -0
- package/build/esm/{index-bb52270a.js → index-70255978.js} +1 -1
- package/build/esm/{index-8076b5e7.js → index-7532b0c5.js} +1 -1
- package/build/esm/{index-5d265d4a.js → index-7af053cd.js} +2 -2
- package/build/esm/{index-8f7e0932.js → index-8727c628.js} +1 -1
- package/build/esm/{index-21499b02.js → index-992c1d4f.js} +1 -1
- package/build/esm/{index-4e2b3392.js → index-9e8718ca.js} +1 -1
- package/build/esm/{index-18db64a2.js → index-a53e5cc5.js} +1 -1
- package/build/esm/{index-0069b300.js → index-a5572feb.js} +1 -1
- package/build/esm/index-ab913381.js +1 -0
- package/build/esm/{index-d45b63f5.js → index-bb64c9f3.js} +1 -1
- package/build/esm/index-d97b7f95.js +1 -0
- package/build/esm/{index-2f775881.js → index-dce8c446.js} +1 -1
- package/build/esm/index-e9742f34.js +1 -0
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-818887fe.js → index.styled-82281f59.js} +1 -1
- package/build/esm/{index.styled-0dcbc92f.js → index.styled-83170533.js} +2 -2
- package/build/esm/{index.styled-ead6e56f.js → index.styled-8642a0c0.js} +1 -1
- package/build/esm/{index.styled-fbb9b538.js → index.styled-bd0daa57.js} +1 -1
- package/build/esm/{index.styles-f64f8d92.js → index.styles-309a8680.js} +1 -1
- package/build/esm/lead.js +1 -1
- package/build/esm/mantine.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/onboardingV2.js +1 -1
- package/build/esm/pwg.js +3 -3
- package/build/esm/{routing-2ba10dbb.js → routing-910eb4da.js} +1 -1
- package/build/esm/subot.js +1 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{types-48cbc013.js → types-225e1b02.js} +1 -1
- package/build/esm/{types-0fecac8b.js → types-f83118a3.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-b8bdf992.js → useCategory-28c9abc6.js} +1 -1
- package/build/esm/{useHealthToolCache-f00411f5.js → useHealthToolCache-e117dfc4.js} +1 -1
- package/build/esm/{usePlacesAutocomplete-65a79be3.js → usePlacesAutocomplete-e30f1118.js} +1 -1
- package/build/esm/{useRafState-3be3d0f1.js → useRafState-10da1fd9.js} +1 -1
- package/build/esm/{useTranslations-86073e0f.js → useTranslations-d8b9e866.js} +1 -1
- package/build/esm/{utils-d8b31ded.js → utils-a7d6d7bd.js} +1 -1
- package/build/esm/{utils-d6d6970c.js → utils-c6957af3.js} +1 -1
- package/build/esm/vaccination.js +1 -1
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/{getDynamicHealthTool-333e03a9.js → getDynamicHealthTool-de43b3f5.js} +1 -1
- package/build/{getSocialList-7ecf1347.js → getSocialList-9fc8841e.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-d23ceba7.js → index-08284f8f.js} +2 -2
- package/build/{index-0ab457b1.js → index-289338c5.js} +1 -1
- package/build/index-2efa93f4.js +1 -0
- package/build/{index-9b13300a.js → index-377f90fc.js} +1 -1
- package/build/{index-423f1457.js → index-48ac2384.js} +1 -1
- package/build/{index-24cc82a8.js → index-494c572e.js} +1 -1
- package/build/{index-f3be380d.js → index-542a0aa1.js} +1 -1
- package/build/index-64661797.js +1 -0
- package/build/{index-3d3ba5a5.js → index-701c4a92.js} +1 -1
- package/build/{index-114d7387.js → index-85ea987c.js} +1 -1
- package/build/index-97b22be6.js +1 -0
- package/build/{index-a5a8d5b2.js → index-9c75f185.js} +1 -1
- package/build/{index-7deb2119.js → index-a3916b70.js} +1 -1
- package/build/{index-86f98021.js → index-adc97936.js} +1 -1
- package/build/{index-b9bb33ab.js → index-cdb7ff38.js} +1 -1
- package/build/index-cefda9d4.js +1 -0
- package/build/index-dbb6aa7b.js +1 -0
- package/build/{index-c8b6e55e.js → index-dc09ac1e.js} +1 -1
- package/build/{index-1c5db8eb.js → index-ee279ebe.js} +11 -11
- package/build/{index-50466223.js → index-f2ae4ff9.js} +1 -1
- package/build/{index-ac0f6385.js → index-f6748529.js} +1 -1
- package/build/{index-95c522c4.js → index-f712bf65.js} +1 -1
- package/build/index.js +1 -1
- package/build/index.styled-2bf89382.js +50 -0
- package/build/{index.styled-8dfefbeb.js → index.styled-366879b1.js} +1 -1
- package/build/{index.styled-41210848.js → index.styled-72b6bed2.js} +1 -1
- package/build/{index.styled-49b96aab.js → index.styled-86c3180a.js} +6 -6
- package/build/{index.styles-512df4ca.js → index.styles-5b4ce3f7.js} +5 -5
- package/build/lead.js +1 -1
- package/build/mantine.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/onboardingV2.js +1 -1
- package/build/pwg.js +1 -1
- package/build/{routing-f680f947.js → routing-9196855e.js} +1 -1
- package/build/subot.js +1 -1
- package/build/together.js +1 -1
- package/build/{types-3f2b8af5.js → types-7c5b4a63.js} +1 -1
- package/build/{types-b0e9dd8a.js → types-7ff69523.js} +1 -1
- package/build/types.js +1 -1
- package/build/{useCategory-be3f9396.js → useCategory-db396f3e.js} +1 -1
- package/build/useHealthToolCache-78894feb.js +1 -0
- package/build/{usePlacesAutocomplete-98b87115.js → usePlacesAutocomplete-cc9ed6fe.js} +1 -1
- package/build/{useRafState-7ffa2d5a.js → useRafState-ade92052.js} +1 -1
- package/build/{useTranslations-ee5c0b48.js → useTranslations-45ef6653.js} +1 -1
- package/build/{utils-bd531f10.js → utils-9013d9b5.js} +1 -1
- package/build/{utils-c7f33c02.js → utils-cef4a03b.js} +1 -1
- package/build/vaccination.js +1 -1
- package/package.json +1 -1
- package/build/esm/index-48c55bdf.js +0 -1
- package/build/esm/index-4ab7a8ff.js +0 -1
- package/build/esm/index-abd079a6.js +0 -1
- package/build/esm/index-bf0691ed.js +0 -1
- package/build/esm/index-cef99cec.js +0 -1
- package/build/esm/index-d79a7b50.js +0 -1
- package/build/index-0141e4a6.js +0 -1
- package/build/index-07d53d13.js +0 -1
- package/build/index-aa8dabc6.js +0 -1
- package/build/index-b7126d99.js +0 -1
- package/build/index-c140ea63.js +0 -1
- package/build/index.styled-8018ceba.js +0 -50
- package/build/useHealthToolCache-bd4c5d0c.js +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-361346e6.js → BMI_BOYS.percentile.monthly-3dc40e7f.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-45ac48c1.js → BMI_BOYS.percentile.weekly-c850c918.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-5c0939d0.js → BMI_BOYS.percentile.yearly-801eb999.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-4f2403fc.js → BMI_BOYS.zscore.monthly-0ab0be45.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-5af7989f.js → BMI_BOYS.zscore.weekly-9a937581.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-dffb1a51.js → BMI_BOYS.zscore.yearly-17dfd6d3.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-0563b375.js → BMI_GIRLS.percentile.monthly-d8085dfe.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-3e5d9dc6.js → BMI_GIRLS.percentile.weekly-1f360a48.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-b477720e.js → BMI_GIRLS.percentile.yearly-51c5c6d1.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-a40829a3.js → BMI_GIRLS.zscore.monthly-b3f5412f.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-f46c55c7.js → BMI_GIRLS.zscore.weekly-67ca1c19.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-fb6e8eca.js → BMI_GIRLS.zscore.yearly-53909407.js} +0 -0
- /package/build/{ChevronDown-706fb94d.js → ChevronDown-e78dfe2c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-6abbcf47.js → HEAD CIRCUM_BOYS.percentile.monthly-5a9fd77d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-73f63264.js → HEAD CIRCUM_BOYS.percentile.weekly-10342371.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-33ee7e00.js → HEAD CIRCUM_BOYS.percentile.yearly-ce0fca94.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-41bc55c7.js → HEAD CIRCUM_BOYS.zscore.monthly-7ed50089.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-2cc779ec.js → HEAD CIRCUM_BOYS.zscore.weekly-94d77f2e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-55db15a7.js → HEAD CIRCUM_BOYS.zscore.yearly-d54b7848.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-72a3bdba.js → HEAD CIRCUM_GIRLS.percentile.monthly-8dec8c91.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-a4e5a1e5.js → HEAD CIRCUM_GIRLS.percentile.weekly-b1976ffa.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-6ca29c9a.js → HEAD CIRCUM_GIRLS.percentile.yearly-9d04b05d.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-1bf1fced.js → HEAD CIRCUM_GIRLS.zscore.monthly-7f142a08.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-6a455b87.js → HEAD CIRCUM_GIRLS.zscore.weekly-d48f6954.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-2f19120c.js → HEAD CIRCUM_GIRLS.zscore.yearly-14434e4f.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-72ebf746.js → HEIGHT_BOYS.percentile.monthly-676f5530.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-f7249660.js → HEIGHT_BOYS.percentile.weekly-60e45b6b.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-fff6fe4f.js → HEIGHT_BOYS.percentile.yearly-15334902.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-863198f6.js → HEIGHT_BOYS.zscore.monthly-bce4de71.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-12443587.js → HEIGHT_BOYS.zscore.weekly-823114cd.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-c9f0fc9c.js → HEIGHT_BOYS.zscore.yearly-835c9bb9.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-214471bf.js → HEIGHT_GIRLS.percentile.monthly-553e9c6f.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-3498771d.js → HEIGHT_GIRLS.percentile.weekly-feb2d33e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-ed22f447.js → HEIGHT_GIRLS.percentile.yearly-6f499cc5.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-ffcd1583.js → HEIGHT_GIRLS.zscore.monthly-abfe8b81.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-89eebef9.js → HEIGHT_GIRLS.zscore.weekly-b7966832.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-e9d20d40.js → HEIGHT_GIRLS.zscore.yearly-37f75f33.js} +0 -0
- /package/build/{Subot-32f549c2.js → Subot-1722467d.js} +0 -0
- /package/build/{Visible-e3ad0c25.js → Visible-1c56fbc5.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-6db6cf22.js → WEIGHT_BOYS.percentile.monthly-91f605bd.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-10d39e3a.js → WEIGHT_BOYS.percentile.weekly-80e52ebe.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-0dd1515b.js → WEIGHT_BOYS.percentile.yearly-a42fe36c.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-5f3bbccb.js → WEIGHT_BOYS.zscore.monthly-abd7d187.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-e9d339a8.js → WEIGHT_BOYS.zscore.weekly-b4f653d8.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-37daf2df.js → WEIGHT_BOYS.zscore.yearly-e00bb874.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-990cd19d.js → WEIGHT_GIRLS.percentile.monthly-aacad85f.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-172e0379.js → WEIGHT_GIRLS.percentile.weekly-92f347b4.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-cbc6e831.js → WEIGHT_GIRLS.percentile.yearly-cdea1c92.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-78043109.js → WEIGHT_GIRLS.zscore.monthly-f1843232.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-19d9a433.js → WEIGHT_GIRLS.zscore.weekly-a544817b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-761f1424.js → WEIGHT_GIRLS.zscore.yearly-1c0aa2ae.js} +0 -0
- /package/build/{cookieHelper-a2566341.js → cookieHelper-ffb4fd8b.js} +0 -0
- /package/build/{dataTransform-907b2930.js → dataTransform-6d870326.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-9e38458e.js → BMI_BOYS.percentile.monthly-a3ce9938.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-603a2d9f.js → BMI_BOYS.percentile.weekly-509586f6.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-42a916cb.js → BMI_BOYS.percentile.yearly-c5bb805b.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-f2adabc8.js → BMI_BOYS.zscore.monthly-56a8ca62.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-b5cccd08.js → BMI_BOYS.zscore.weekly-f7ef381f.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-d479c131.js → BMI_BOYS.zscore.yearly-4d43acd4.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-e407232f.js → BMI_GIRLS.percentile.monthly-95bcbb2b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-0430e817.js → BMI_GIRLS.percentile.weekly-289ebe3b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-dd974740.js → BMI_GIRLS.percentile.yearly-3f7e04aa.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-a366f596.js → BMI_GIRLS.zscore.monthly-63241d58.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-4cdc8cc2.js → BMI_GIRLS.zscore.weekly-dcf15800.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-3fe9b80a.js → BMI_GIRLS.zscore.yearly-a83f804e.js} +0 -0
- /package/build/esm/{ChevronDown-1f2379d1.js → ChevronDown-9654e503.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-98c97da0.js → HEAD CIRCUM_BOYS.percentile.monthly-01025ce1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-5a1700cf.js → HEAD CIRCUM_BOYS.percentile.weekly-d57418d1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-e8d8abcc.js → HEAD CIRCUM_BOYS.percentile.yearly-89076acf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-a80e58cc.js → HEAD CIRCUM_BOYS.zscore.monthly-92d740bf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-31129921.js → HEAD CIRCUM_BOYS.zscore.weekly-712e4d7e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-e4c6407b.js → HEAD CIRCUM_BOYS.zscore.yearly-5a85d048.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-dc5e084b.js → HEAD CIRCUM_GIRLS.percentile.monthly-d3c2de41.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-2c5917ae.js → HEAD CIRCUM_GIRLS.percentile.weekly-e9eb1057.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-9e650d5f.js → HEAD CIRCUM_GIRLS.percentile.yearly-b729a3d7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-8b3fd7c4.js → HEAD CIRCUM_GIRLS.zscore.monthly-0e6d5b95.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-5ba99827.js → HEAD CIRCUM_GIRLS.zscore.weekly-76b8c388.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-b0256871.js → HEAD CIRCUM_GIRLS.zscore.yearly-6c43b660.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-e7c89b9d.js → HEIGHT_BOYS.percentile.monthly-bd14dfb3.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-aba8106d.js → HEIGHT_BOYS.percentile.weekly-28561e1d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-7a73167c.js → HEIGHT_BOYS.percentile.yearly-95cbc5d4.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-95db18e9.js → HEIGHT_BOYS.zscore.monthly-8f8c7e63.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-aff72330.js → HEIGHT_BOYS.zscore.weekly-b6b2133d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-69482de4.js → HEIGHT_BOYS.zscore.yearly-0a721242.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-a447fbcb.js → HEIGHT_GIRLS.percentile.monthly-0b7e5c85.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-f7f87b6a.js → HEIGHT_GIRLS.percentile.weekly-0e965359.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-2214187a.js → HEIGHT_GIRLS.percentile.yearly-82135038.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-40832d83.js → HEIGHT_GIRLS.zscore.monthly-78fc054c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-c7d64e54.js → HEIGHT_GIRLS.zscore.weekly-776a1a17.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-f086888a.js → HEIGHT_GIRLS.zscore.yearly-c1f848e1.js} +0 -0
- /package/build/esm/{Subot-90eeb6b3.js → Subot-3e26682c.js} +0 -0
- /package/build/esm/{Visible-2f53b79b.js → Visible-76578e44.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-b17b8ff9.js → WEIGHT_BOYS.percentile.monthly-d2143081.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-3af7ebf3.js → WEIGHT_BOYS.percentile.weekly-a1b742dc.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-f782303b.js → WEIGHT_BOYS.percentile.yearly-426bf234.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-c9ed64af.js → WEIGHT_BOYS.zscore.monthly-c2f66396.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-4540cabb.js → WEIGHT_BOYS.zscore.weekly-dea5836f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-2f1f9c58.js → WEIGHT_BOYS.zscore.yearly-3aaa5b87.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-86dce0cb.js → WEIGHT_GIRLS.percentile.monthly-98555f5c.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-69578cf9.js → WEIGHT_GIRLS.percentile.weekly-ed4ecaea.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-0a7ad86a.js → WEIGHT_GIRLS.percentile.yearly-f1e194fc.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-c38d04c1.js → WEIGHT_GIRLS.zscore.monthly-dadc78cb.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-054a7793.js → WEIGHT_GIRLS.zscore.weekly-8dd9e19c.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-9cae2489.js → WEIGHT_GIRLS.zscore.yearly-256c3290.js} +0 -0
- /package/build/esm/{cookieHelper-0c7b12e7.js → cookieHelper-b7f7d5f1.js} +0 -0
- /package/build/esm/{dataTransform-5d371539.js → dataTransform-3542601c.js} +0 -0
- /package/build/esm/{index-d2815002.js → index-354ddd99.js} +0 -0
- /package/build/esm/{index-1e929af7.js → index-5e6b6109.js} +0 -0
- /package/build/esm/{index-8532d46b.js → index-f9986ddb.js} +0 -0
- /package/build/esm/{isProduction-9316ccb5.js → isProduction-13f6d491.js} +0 -0
- /package/build/esm/{localizeNumberFormat-d1127967.js → localizeNumberFormat-a578872d.js} +0 -0
- /package/build/esm/{normalizeLink-6d5c758b.js → normalizeLink-f1a07e08.js} +0 -0
- /package/build/esm/{number-4ce2a65c.js → number-4286843a.js} +0 -0
- /package/build/esm/{paths-85cabf93.js → paths-a3913e3c.js} +0 -0
- /package/build/esm/{screenSizeContext-705a313a.js → screenSizeContext-fc852596.js} +0 -0
- /package/build/esm/{theme-4d46eb99.js → theme-afaf0d05.js} +0 -0
- /package/build/esm/{translationsContext-267d2c2b.js → translationsContext-74126881.js} +0 -0
- /package/build/esm/{tslib.es6-0016fb2e.js → tslib.es6-914e91bc.js} +0 -0
- /package/build/esm/{types-60cfe8b3.js → types-fee4011a.js} +0 -0
- /package/build/esm/{useIsInit-755f04c3.js → useIsInit-531139ff.js} +0 -0
- /package/build/esm/{useOutsideClick-a454f054.js → useOutsideClick-1dc534d6.js} +0 -0
- /package/build/esm/{useScrollbarSize-8fe9a9d3.js → useScrollbarSize-bac85788.js} +0 -0
- /package/build/{index-519982d6.js → index-0b14280f.js} +0 -0
- /package/build/{index-6460bb54.js → index-30a6de1a.js} +0 -0
- /package/build/{index-214222a0.js → index-94130616.js} +0 -0
- /package/build/{isProduction-69925a51.js → isProduction-51951576.js} +0 -0
- /package/build/{localizeNumberFormat-a302e355.js → localizeNumberFormat-7d655858.js} +0 -0
- /package/build/{normalizeLink-be8f13d1.js → normalizeLink-b646fe58.js} +0 -0
- /package/build/{number-ec54adad.js → number-2bbfe6b9.js} +0 -0
- /package/build/{paths-7baf53b7.js → paths-62703942.js} +0 -0
- /package/build/{screenSizeContext-111c12b7.js → screenSizeContext-a6dd41f9.js} +0 -0
- /package/build/{theme-4b109976.js → theme-3f0985a0.js} +0 -0
- /package/build/{translationsContext-5b78f642.js → translationsContext-8d6ba9f9.js} +0 -0
- /package/build/{tslib.es6-209b302e.js → tslib.es6-5f2b74ff.js} +0 -0
- /package/build/{types-1b46d6d3.js → types-f1f451e3.js} +0 -0
- /package/build/{useIsInit-c4d76526.js → useIsInit-e1320c4c.js} +0 -0
- /package/build/{useOutsideClick-5bcace03.js → useOutsideClick-9eb66aa1.js} +0 -0
- /package/build/{useScrollbarSize-30b0c701.js → useScrollbarSize-651139db.js} +0 -0
|
@@ -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-914e91bc.js";import{Box as p,Input as u,Grid as g,Title as b,Container as h,Flex as E,rem as f,Stack as L,AspectRatio as v}from"@mantine/core";import{P as y,c as C,R as x,O as w,d as S,u as j,B as P}from"./index-7af053cd.js";import{D as O}from"./index-8727c628.js";import{T as k,I as F}from"./index-36c96e53.js";import"dayjs";import{M as z,k as B}from"./screenSizeContext-fc852596.js";import N from"styled-components";import{t as T}from"./theme-afaf0d05.js";import{L as I}from"./index-63cb82b7.js";import"./isProduction-13f6d491.js";import"./Subot-3e26682c.js";import{CommonGAssets as D}from"./gAssets.js";import{u as A}from"./useTranslations-d8b9e866.js";import{useInterval as Z,useCounter as _}from"@mantine/hooks";import{A as V}from"./index-bb64c9f3.js";import"lodash/debounce";import"./useCategory-28c9abc6.js";import{V as q}from"./Visible-76578e44.js";import{createFormContext as $,yupResolver as H}from"@mantine/form";import{M as W,h as U}from"./utils-a7d6d7bd.js";export{M as MAPPED_LOCALE}from"./utils-a7d6d7bd.js";import{H as Y}from"./index.styles-309a8680.js";import"./constants-cf8d2b27.js";import{L as R}from"./utils-c6957af3.js";import"@mantine/dates";import"./index.styled-8642a0c0.js";import"./index-f9986ddb.js";import*as G from"yup";import{createPortal as K}from"react-dom";import"./translationsContext-74126881.js";import"string-format";import J from"lodash/throttle";import{B as Q}from"./index-992c1d4f.js";import{T as X}from"./index-d97b7f95.js";import{format as ee}from"date-fns";import te from"react-keyed-flatten-children";import"@mantine/carousel";import"classnames";import"date-fns/locale";import"./cookieHelper-b7f7d5f1.js";import"slugify";const ne=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[re,oe,ae]=$(),ie=N(p)`
|
|
2
2
|
.phone-input {
|
|
3
3
|
width: 100%;
|
|
4
4
|
margin-bottom: 32px;
|
package/build/esm/pwg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useMemo as t,useState as r,useRef as
|
|
1
|
+
import e,{useMemo as t,useState as r,useRef as o}from"react";import{M as a,a as l}from"./index-0914cf85.js";import{T as n}from"./index-36c96e53.js";import{P as i}from"./index-a53e5cc5.js";import{u as s}from"./useTranslations-d8b9e866.js";import{t as c}from"./theme-afaf0d05.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 f}from"./index-f9986ddb.js";import{a as x}from"./useOutsideClick-1dc534d6.js";import E from"styled-components";import{_ as k}from"./tslib.es6-914e91bc.js";import"./index.styled-8642a0c0.js";import"@mantine/core";import"dayjs";import"./screenSizeContext-fc852596.js";import"lodash/throttle";import"./index-63cb82b7.js";import"date-fns/locale";import"./Subot-3e26682c.js";import"./isProduction-13f6d491.js";import"./gAssets.js";import"./index.styled-83170533.js";import"./index-7af053cd.js";import"@mantine/hooks";import"@mantine/carousel";import"classnames";import"./index-d97b7f95.js";import"@mantine/dates";import"./translationsContext-74126881.js";import"string-format";const w=t=>{const{x:r,y:o,payload:a,activeWeek:l}=t;return l===a.value?e.createElement("g",{transform:`translate(${r},${o})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?c.mbColors.pink:c.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},a.value)):e.createElement("g",{transform:`translate(${r},${o})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},a.value))},v=E.div`
|
|
2
2
|
/* position: absolute; */
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -55,7 +55,7 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as o,a as
|
|
|
55
55
|
align-items: center;
|
|
56
56
|
gap: 4px;
|
|
57
57
|
}
|
|
58
|
-
`,T=[{name:"overweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"underweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"healthy",backgroundColor:c.colors.green50,color:c.colors.green900}],B=r=>{var a,
|
|
58
|
+
`,T=[{name:"overweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"underweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"healthy",backgroundColor:c.colors.green50,color:c.colors.green900}],B=r=>{var o,a,l,i,s;const{payload:m,active:d}=r,p=null===(o=null==m?void 0:m[0])||void 0===o?void 0:o.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===(a=p.toolTipLabel)||void 0===a?void 0:a[0]," ",null===(l=p.toolTipLabel)||void 0===l?void 0:l[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:c.colors.gray800,weight:"semiBold"},null===(s=p.toolTipLabel)||void 0===s?void 0:s[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:o,activeWeek:a,t:l})=>{const n=l(`bmi.result.${o}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===a?{toolTipLabel:r,translatedStatus:n,status:o}:{})))},S=({weightBefore:l,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:S})=>{const{t:z}=s(),L="marryBaby"===S,F=t((()=>W({weightByWeek:i,weightBefore:l,toolTipLabel:v,status:C,activeWeek:E,t:z})),[i,l,v,C,E]),[I,M]=r(!1),N=o(null);return x(N,(()=>M(!1))),e.createElement(j,null,L?e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark}," ",z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")),Array.isArray(F)&&F.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:F,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:c.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&I&&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:S})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(u,{domain:[e=>Math.max(e,l-10||e),e=>Math.max(e,l+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:c.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:L?c.mbColors.tonePink:c.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>M(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(f,{ref:N,r:4}),fill:L?c.mbColors.pink:c.colors.primaryBase,stroke:L?c.mbColors.pink:c.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),L?e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},z("pregnancy.week")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("pregnancy.week")))))},z=t=>{var{color:r}=t,o=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"},o),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||c.colors.primaryBase}))},L=({idealWeight:t,siteType:r})=>{const{t:o}=s(),l="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,l?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.lightPink}),e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},o("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(z,{color:c.colors.primary100}),e.createElement(n,{size:"n1",color:c.colors.gray600},e.createElement(n,{size:"n1",as:"span"},o("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t)))),e.createElement("div",null,l?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.pink}),e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},o("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(z,null),e.createElement(n,{size:"n1",color:c.colors.gray600},o("pwg.placeholder.weight")))))},F=E.div`
|
|
59
59
|
display: flex;
|
|
60
60
|
flex-direction: column;
|
|
61
61
|
align-items: center;
|
|
@@ -70,4 +70,4 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as o,a as
|
|
|
70
70
|
> div {
|
|
71
71
|
width: 100%;
|
|
72
72
|
}
|
|
73
|
-
`,I=({chartProps:t,pillCarouselProps:r,idealWeight:
|
|
73
|
+
`,I=({chartProps:t,pillCarouselProps:r,idealWeight:o,description:a,siteType:m})=>{const{t:d}=s(),p="marryBaby"===m;return e.createElement(F,null,e.createElement("div",{className:"chart-header"},p?e.createElement(l,{type:"h3",color:c.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",weight:"semiBold",color:c.colors.gray800},d("pregnancyTool.weightSuggested")),a&&a),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(L,{idealWeight:o,siteType:m}),e.createElement(S,Object.assign({},t,{siteType:m}))))};export{I as PregnancyWeightGainChart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e}from"./index-
|
|
1
|
+
import{d as e}from"./index-63cb82b7.js";import{i as s}from"./isProduction-13f6d491.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/subot.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useContext as t,useState as i,useEffect as n,useRef as o,useMemo as a,createContext as l,useCallback as r,forwardRef as s,memo as d,useImperativeHandle as c}from"react";import{e as u,c as v,f as m,E as f,L as p,N as g,d as b,g as h,F as x}from"./Subot-90eeb6b3.js";import{a as y,_ as P}from"./tslib.es6-0016fb2e.js";import{B as w,d as E,e as C,G as T,f as O,M as k,g as j,A as I}from"./index-c97cb127.js";import N from"js-cookie";import H from"fastdom";import S from"fastdom/extensions/fastdom-promised";import{D as L}from"./index.styled-818887fe.js";import{U as B,G as D,ad as X,b as A,ae as M,af as z}from"./index.styles-f64f8d92.js";import"./index-8076b5e7.js";import{Box as R,Textarea as Y}from"@mantine/core";import{T as U,I as F}from"./index-4ab7a8ff.js";import"./translationsContext-267d2c2b.js";import G from"string-format";import"innertext";import"./theme-4d46eb99.js";import{B as Z,S as q}from"./index-5d265d4a.js";import"@mantine/dates";import"./gAssets.js";import J from"dayjs";import{M as V}from"./screenSizeContext-705a313a.js";import W from"styled-components";import{i as K}from"./isProduction-9316ccb5.js";import"@mantine/hooks";import"./constants-a2326fe5.js";import"lodash/debounce";import"react-contenteditable";import"react-dom";import"./useCategory-b8bdf992.js";import{v4 as Q}from"uuid";import _ from"hex-rgb";import $ from"classnames";import{Remarkable as ee}from"remarkable";import te from"dayjs/plugin/isSameOrBefore";import{motion as ie}from"framer-motion";import"./utils-d6d6970c.js";import{C as ne}from"./index-d2815002.js";import"./index.styled-ead6e56f.js";import"./index-8532d46b.js";import{D as oe,L as ae}from"./index-4e2b3392.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index-be029805.js";import"lodash/throttle";import"html-react-parser";import"./types-60cfe8b3.js";import{Controller as le,useForm as re}from"react-hook-form";import"./index.styled-fbb9b538.js";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-0dcbc92f.js";import"./utils-d8b31ded.js";import"@mantine/form";import"lodash/flatten";import"lodash/uniqBy";import"./constants-f36eb4e2.js";import{useInView as se}from"react-intersection-observer";import{B as de}from"./index-21499b02.js";import ce from"lodash/isEmpty";import ue,{getCountryCallingCode as ve,isPossiblePhoneNumber as me,parsePhoneNumber as fe}from"react-phone-number-input";import{LoadScript as pe}from"@react-google-maps/api";import{u as ge,G as be,a as he}from"./usePlacesAutocomplete-65a79be3.js";import"date-fns/locale";import"./useTranslations-86073e0f.js";import"./number-4ce2a65c.js";import"./index-2f775881.js";import"./routing-2ba10dbb.js";import"dayjs/plugin/relativeTime";import"./paths-85cabf93.js";import"./index-ad37bd51.js";import"./cookieHelper-0c7b12e7.js";import"react-keyed-flatten-children";import"slugify";import"@mantine/carousel";import"./index-bb52270a.js";import"@hookform/resolvers/yup";import"./index-bf0691ed.js";import"./index-0da50440.js";import"./index-abd079a6.js";const xe=H.extend(S),ye="sms/otp",Pe="whatsapp/otp",we="sms/verify",Ee="sms/verify-whatsapp",Ce="bots",Te="inline/messages",Oe="inline/impressions",ke="inline/clicks",je="log/bot/{botId}/{cookieId}/{accountId}?type={type}",Ie="log/bot",Ne="vouchers/total_quantity?search={search}&client_id={clientId}",He=(e,t)=>{const{subotApiUrl:i}=null==D?void 0:D.env;return i+G(e,Object.assign({},t))},Se=e=>y(void 0,void 0,void 0,(function*(){try{return yield B(He(Te),"POST",{data:e})}catch(e){}})),Le=e=>y(void 0,void 0,void 0,(function*(){try{const t=yield B(He(Ce)+`/${e}`,"GET");return(e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}})(t),t}catch(e){}})),Be=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],De=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...Be],Xe=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(De.includes(i))if(Be.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),Ae=e=>[{id:Q(),label:JSON.stringify({title:"",description:""}),type:u.SSO_INTENT,url:""},{id:Q(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:u.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:Q(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:u.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:Q(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:u.SSO_INTENT,url:"/images/subot/shield.svg"}];function Me(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const ze=e=>X.parse(e||"")["hhg-id"]||N.get("hhg-id")||"",Re=e=>{if(e)return N.set("hhg-id",e),e;const t=ze();if(t)return t;const i=Q();return N.set("hhg-id",i),i},Ye=e=>{const t=X.parse(e||"")[w]||N.get(w)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},Ue=e=>{const t=X.parse(e||"")[w]||N.get(w)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},Fe=Q(),Ge=()=>Fe,Ze=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${K?"":"discover."}${E[e]}`,qe=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},Je=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},Ve=30,We=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},Ke=(e,t,i,n)=>{const o=We(e[0]);if(!t)return{};const a=e.findIndex((e=>e.id==t));return{current_total_dynamic_score:e.reduce(((e,l,r)=>{var s,d;if(r>a)return e;const c=l,u=i&&c.id===t?{action_id:i}:c._message;let m=0;const f=null===(s=c.actions)||void 0===s?void 0:s.find((e=>e.id===(null==u?void 0:u.action_id)));m+=(null==f?void 0:f.score)||0;const p=void 0!==o[c.id],g=i&&c.id===t?n:null==u?void 0:u.form_submit_meta;if(p&&c.type===v.FORM&&g){const e=o[c.id].action_id,t=null===(d=c.actions)||void 0===d?void 0:d.find((t=>t.id===e)),i=null==t?void 0:t.key,n=g.find((e=>e.key===i&&"number"===e.control));if(o[c.id].number&&["+","-","x","/"].includes(o[c.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[c.id].operator,i=o[c.id].number;let a=0;"+"===t&&(a=e+i),"-"===t&&(a=e-i),"x"===t&&(a=e*i),"/"===t&&(a=e/i),isNaN(a)||(m+=a)}}return e+m}),0)}},Qe=(e,t)=>{const i=We(t[0]);if(0===Object.keys(i).length)return e;const n=t.filter((e=>e.type===v.FORM));return Object.keys(i).forEach((t=>{var o,a,l;const r=n.find((e=>e.id===t)),s=null===(o=null==r?void 0:r.actions)||void 0===o?void 0:o.find((e=>{var n;return e.id===(null===(n=i[t])||void 0===n?void 0:n.action_id)})),d=null==s?void 0:s.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===d&&"number"===e.control));if(i[t].number&&["+","-","x","/"].includes(i[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const n=Number(c.value),o=i[t].operator,a=i[t].number;let l=0;if("+"===o&&(l=n+a),"-"===o&&(l=n-a),"x"===o&&(l=n*a),"/"===o&&(l=n/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},_e=()=>{const{data:{locale:e,router:o}}=t(A),{asPath:a}=o||{},[l,r]=i((()=>`${Ze(e,!1)}${C}${a}`));return n((()=>{r(window.location.href)}),[a]),l},$e=W.div`
|
|
1
|
+
import e,{useContext as t,useState as i,useEffect as n,useRef as o,useMemo as a,createContext as l,useCallback as r,forwardRef as s,memo as d,useImperativeHandle as c}from"react";import{e as u,c as v,f as m,E as f,L as p,N as g,d as b,g as h,F as x}from"./Subot-3e26682c.js";import{a as y,_ as P}from"./tslib.es6-914e91bc.js";import{B as w,d as E,e as C,G as T,f as O,M as k,g as j,A as I}from"./index-63cb82b7.js";import N from"js-cookie";import H from"fastdom";import S from"fastdom/extensions/fastdom-promised";import{D as L}from"./index.styled-82281f59.js";import{U as B,G as D,ad as X,b as A,ae as M,af as z}from"./index.styles-309a8680.js";import"./index-7532b0c5.js";import{Box as R,Textarea as Y}from"@mantine/core";import{T as U,I as F}from"./index-36c96e53.js";import"./translationsContext-74126881.js";import G from"string-format";import"innertext";import"./theme-afaf0d05.js";import{B as Z,S as q}from"./index-7af053cd.js";import"@mantine/dates";import"./gAssets.js";import J from"dayjs";import{M as V}from"./screenSizeContext-fc852596.js";import W from"styled-components";import{i as K}from"./isProduction-13f6d491.js";import"@mantine/hooks";import"./constants-cf8d2b27.js";import"lodash/debounce";import"react-contenteditable";import"react-dom";import"./useCategory-28c9abc6.js";import{v4 as Q}from"uuid";import _ from"hex-rgb";import $ from"classnames";import{Remarkable as ee}from"remarkable";import te from"dayjs/plugin/isSameOrBefore";import{motion as ie}from"framer-motion";import"./utils-c6957af3.js";import{C as ne}from"./index-354ddd99.js";import"./index.styled-8642a0c0.js";import"./index-f9986ddb.js";import{D as oe,L as ae}from"./index-9e8718ca.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index-6a242131.js";import"lodash/throttle";import"html-react-parser";import"./types-fee4011a.js";import{Controller as le,useForm as re}from"react-hook-form";import"./index.styled-bd0daa57.js";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-83170533.js";import"./utils-a7d6d7bd.js";import"@mantine/form";import"lodash/flatten";import"lodash/uniqBy";import"./constants-f17c72d7.js";import{useInView as se}from"react-intersection-observer";import{B as de}from"./index-992c1d4f.js";import ce from"lodash/isEmpty";import ue,{getCountryCallingCode as ve,isPossiblePhoneNumber as me,parsePhoneNumber as fe}from"react-phone-number-input";import{LoadScript as pe}from"@react-google-maps/api";import{u as ge,G as be,a as he}from"./usePlacesAutocomplete-e30f1118.js";import"date-fns/locale";import"./useTranslations-d8b9e866.js";import"./number-4286843a.js";import"./index-dce8c446.js";import"./routing-910eb4da.js";import"dayjs/plugin/relativeTime";import"./paths-a3913e3c.js";import"./index-5ff5ccf6.js";import"./cookieHelper-b7f7d5f1.js";import"react-keyed-flatten-children";import"slugify";import"@mantine/carousel";import"./index-70255978.js";import"@hookform/resolvers/yup";import"./index-ab913381.js";import"./index-0914cf85.js";import"./index-d97b7f95.js";const xe=H.extend(S),ye="sms/otp",Pe="whatsapp/otp",we="sms/verify",Ee="sms/verify-whatsapp",Ce="bots",Te="inline/messages",Oe="inline/impressions",ke="inline/clicks",je="log/bot/{botId}/{cookieId}/{accountId}?type={type}",Ie="log/bot",Ne="vouchers/total_quantity?search={search}&client_id={clientId}",He=(e,t)=>{const{subotApiUrl:i}=null==D?void 0:D.env;return i+G(e,Object.assign({},t))},Se=e=>y(void 0,void 0,void 0,(function*(){try{return yield B(He(Te),"POST",{data:e})}catch(e){}})),Le=e=>y(void 0,void 0,void 0,(function*(){try{const t=yield B(He(Ce)+`/${e}`,"GET");return(e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}})(t),t}catch(e){}})),Be=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],De=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...Be],Xe=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(De.includes(i))if(Be.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),Ae=e=>[{id:Q(),label:JSON.stringify({title:"",description:""}),type:u.SSO_INTENT,url:""},{id:Q(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:u.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:Q(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:u.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:Q(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:u.SSO_INTENT,url:"/images/subot/shield.svg"}];function Me(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const ze=e=>X.parse(e||"")["hhg-id"]||N.get("hhg-id")||"",Re=e=>{if(e)return N.set("hhg-id",e),e;const t=ze();if(t)return t;const i=Q();return N.set("hhg-id",i),i},Ye=e=>{const t=X.parse(e||"")[w]||N.get(w)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},Ue=e=>{const t=X.parse(e||"")[w]||N.get(w)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},Fe=Q(),Ge=()=>Fe,Ze=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${K?"":"discover."}${E[e]}`,qe=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},Je=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},Ve=30,We=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},Ke=(e,t,i,n)=>{const o=We(e[0]);if(!t)return{};const a=e.findIndex((e=>e.id==t));return{current_total_dynamic_score:e.reduce(((e,l,r)=>{var s,d;if(r>a)return e;const c=l,u=i&&c.id===t?{action_id:i}:c._message;let m=0;const f=null===(s=c.actions)||void 0===s?void 0:s.find((e=>e.id===(null==u?void 0:u.action_id)));m+=(null==f?void 0:f.score)||0;const p=void 0!==o[c.id],g=i&&c.id===t?n:null==u?void 0:u.form_submit_meta;if(p&&c.type===v.FORM&&g){const e=o[c.id].action_id,t=null===(d=c.actions)||void 0===d?void 0:d.find((t=>t.id===e)),i=null==t?void 0:t.key,n=g.find((e=>e.key===i&&"number"===e.control));if(o[c.id].number&&["+","-","x","/"].includes(o[c.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[c.id].operator,i=o[c.id].number;let a=0;"+"===t&&(a=e+i),"-"===t&&(a=e-i),"x"===t&&(a=e*i),"/"===t&&(a=e/i),isNaN(a)||(m+=a)}}return e+m}),0)}},Qe=(e,t)=>{const i=We(t[0]);if(0===Object.keys(i).length)return e;const n=t.filter((e=>e.type===v.FORM));return Object.keys(i).forEach((t=>{var o,a,l;const r=n.find((e=>e.id===t)),s=null===(o=null==r?void 0:r.actions)||void 0===o?void 0:o.find((e=>{var n;return e.id===(null===(n=i[t])||void 0===n?void 0:n.action_id)})),d=null==s?void 0:s.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===d&&"number"===e.control));if(i[t].number&&["+","-","x","/"].includes(i[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const n=Number(c.value),o=i[t].operator,a=i[t].number;let l=0;if("+"===o&&(l=n+a),"-"===o&&(l=n-a),"x"===o&&(l=n*a),"/"===o&&(l=n/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},_e=()=>{const{data:{locale:e,router:o}}=t(A),{asPath:a}=o||{},[l,r]=i((()=>`${Ze(e,!1)}${C}${a}`));return n((()=>{r(window.location.href)}),[a]),l},$e=W.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
padding: 12px 16px;
|
|
4
4
|
border-radius: 8px;
|
package/build/esm/together.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as CardAuthor,C as CardReactions,L as LabelSortPin,c as LabelSorting,m as PopoverMenu,e as PopupDoctor,P as PopupExpert,g as PopupFrame,f as PopupHospital,i as PostContent,k as ProfileDetail,j as ProfileDetailModal,h as ShareBox,S as SharePopup,n as SourceList,l as TabNameInProfileDetail,b as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,u as useTogetherAuthRequiredAction}from"./index.styled-
|
|
1
|
+
export{d as CardAuthor,C as CardReactions,L as LabelSortPin,c as LabelSorting,m as PopoverMenu,e as PopupDoctor,P as PopupExpert,g as PopupFrame,f as PopupHospital,i as PostContent,k as ProfileDetail,j as ProfileDetailModal,h as ShareBox,S as SharePopup,n as SourceList,l as TabNameInProfileDetail,b as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,u as useTogetherAuthRequiredAction}from"./index.styled-82281f59.js";export{d as TogetherDataTransforms,U as UserAvatar}from"./index-7532b0c5.js";export{C as CardLink,i as CardPost,j as CardPostPopoverMore,k as CardReply,l as CardReplyPopover,a as CreateNewPostContent,b as CreatePostDescription,c as CreatePostTitle,d as ImagePreviewPopup,I as InputCommentBar,L as LabelPin,P as PopupDanger,f as PostImagePreview,e as PostSingleImageViewPopup,h as SkipQuestionOfExpertBtn,g as SocialLinkPreview,S as SubmitReportForm,t as TogetherTypes,T as TopicSelectList,V as VerifiedTag}from"./types-225e1b02.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,b as TogetherComponentGlobalContext,d as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./index.styles-309a8680.js";import"react";import"@mantine/core";import"./tslib.es6-914e91bc.js";import"./useTranslations-d8b9e866.js";import"./translationsContext-74126881.js";import"string-format";import"./index-36c96e53.js";import"./theme-afaf0d05.js";import"dayjs";import"./screenSizeContext-fc852596.js";import"styled-components";import"lodash/throttle";import"./index-63cb82b7.js";import"date-fns/locale";import"./Subot-3e26682c.js";import"./isProduction-13f6d491.js";import"./gAssets.js";import"./index-7af053cd.js";import"@mantine/hooks";import"@mantine/carousel";import"classnames";import"@mantine/dates";import"./number-4286843a.js";import"date-fns";import"./index-992c1d4f.js";import"./index-dce8c446.js";import"./constants-cf8d2b27.js";import"./routing-910eb4da.js";import"dayjs/plugin/relativeTime";import"./paths-a3913e3c.js";import"lodash/debounce";import"./useCategory-28c9abc6.js";import"./index-5ff5ccf6.js";import"innertext";import"./cookieHelper-b7f7d5f1.js";import"react-contenteditable";import"react-dom";import"./utils-c6957af3.js";import"./index.styled-8642a0c0.js";import"./index-f9986ddb.js";import"./index-6db1bd1f.js";import"react-keyed-flatten-children";import"slugify";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,_ as t}from"./tslib.es6-0016fb2e.js";import o,{useContext as n,useState as a,useRef as l,useEffect as i,useMemo as s,useCallback as r}from"react";import{useMantineTheme as c,Checkbox as d,Portal as m,Popover as u}from"@mantine/core";import{p,L as v,r as g,q as h,s as y,t as C,v as E,R as k,w,x as f,y as b,z as N,E as I,F as x,G as P,H as T,I as M,D as j,J as _,g as L,M as S,K as z,N as B,O as A,Q as O,U as F,V as R,W as D,X as U,Y as V,Z as $,_ as Z,$ as H,a0 as W,a1 as Q,a2 as K,a3 as G,u as q,S as Y,a4 as J,j as X,k as ee,a as te,a5 as oe,d as ne,i as ae,a6 as le,C as ie,a7 as se,a8 as re,b as ce}from"./index.styled-818887fe.js";import{u as de}from"./useTranslations-86073e0f.js";import me from"innertext";import{t as ue}from"./theme-4d46eb99.js";import{T as pe,a as ve,A as ge,C as he,b as ye,I as Ce}from"./index-4ab7a8ff.js";import{B as Ee,I as ke}from"./index-5d265d4a.js";import"@mantine/dates";import{d as we}from"./index-c97cb127.js";import"./Subot-90eeb6b3.js";import{CommonGAssets as fe}from"./gAssets.js";import"dayjs";import{o as be,t as Ne,k as Ie}from"./screenSizeContext-705a313a.js";import"styled-components";import"./isProduction-9316ccb5.js";import"@mantine/hooks";import{b as xe,U as Pe,A as Te,B as Me,a7 as je,H as _e,z as Le,a8 as Se,a9 as ze,aa as Be,V as Ae,Z as Oe,Y as Fe,ab as Re,_ as De}from"./index.styles-f64f8d92.js";import{B as Ue,D as Ve}from"./index-d79a7b50.js";import{g as $e,a as Ze,U as He,h as We}from"./index-8076b5e7.js";import{I as Qe}from"./index-2f775881.js";import Ke from"lodash/debounce";import Ge from"react-contenteditable";import"./useCategory-b8bdf992.js";import{B as qe}from"./index-21499b02.js";import*as Ye from"react-dom";import"./constants-a2326fe5.js";const Je=({title:t,url:s,image:r,logo:d,className:m,style:u,noRefetch:v})=>{const{data:{locale:g,env:{isMarryBaby:h}}}=n(xe),[y,C]=a(!1),E=c(),k=l(v);k.current=v;const[w,f]=a(null);i((()=>{e(void 0,void 0,void 0,(function*(){if(!k.current){if(!s)return f(null);f((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),Pe(Te(Me.FETCH_PREVIEW,{_locale:g}),"POST",{data:{link:s},headers:{"Content-Type":"application/json"}}).then((e=>{var t,o,n;C(!1),f({title:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.title,url:s,image:(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.image)||(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)})})).catch((()=>{f(null)}))}}))}),[s]);const b=(null==w?void 0:w.image)||r,N=(null==w?void 0:w.title)||t,I=(null==w?void 0:w.logo)||d,x=(null==w?void 0:w.url)||s,P=x.replace("http://","").replace("https://","").split(/[/?#]/)[0],T=l(!1);return o.createElement(p,{"data-is-marrybaby":h,className:`${m} no-replace-click`,style:u,color:E.colors[E.primaryColor][0]},o.createElement("a",{href:x,target:"_blank",rel:"noreferrer"},b&&o.createElement("div",{className:"link-image-wrapper"},!h&&o.createElement("img",{className:"link-image-blur",src:b,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=je)},loading:"lazy"}),o.createElement("img",{className:"link-image",src:b,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=je)},loading:"lazy"})),o.createElement("div",{className:"link-info-container"},o.createElement(pe,{size:"n1"},h&&I&&!y&&o.createElement("img",{className:"link-logo",src:I,onError:()=>C(!0),loading:"lazy"}),P),o.createElement(_e,{tag:"h6"},N))))};const Xe=({onClick:e,color:t,className:a,style:l})=>{const{data:{env:{isMarryBaby:i}}}=n(xe),{t:s}=de();return o.createElement(v,{label:o.createElement(o.Fragment,null,i&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M3.5 19.9999L7.87 15.6299' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.95634 11.294C4.56534 11.685 4.56534 12.318 4.95634 12.708L7.87434 15.626L10.7923 18.544C11.1833 18.935 11.8163 18.935 12.2063 18.544L13.3813 17.369C13.5693 17.181 13.6743 16.927 13.6743 16.662V12.726L16.5743 9.82597L18.8833 9.94897C19.1663 9.96397 19.4433 9.85797 19.6433 9.65797L20.2173 9.08397C20.6083 8.69297 20.6083 8.05997 20.2173 7.66997L15.8313 3.28397C15.4403 2.89297 14.8073 2.89297 14.4173 3.28397L13.8433 3.85797C13.6423 4.05897 13.5363 4.33497 13.5523 4.61797L13.6753 6.92697L10.7753 9.82697H6.83834C6.57334 9.82697 6.31834 9.93197 6.13134 10.12L4.95634 11.294V11.294Z' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath d='M16.5699 9.83018L13.6699 6.93018' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3c/svg%3e",loading:"lazy"})," ",s("label.pinnedPost")),rightLabel:!i&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='7.18605' y1='7.68219' x2='3.68219' y2='13.8139' stroke='%23FEA21E' stroke-linecap='round'/%3e%3cpath d='M3.24591 7.78426C3.21275 7.84168 3.20376 7.90993 3.22092 7.97398C3.23808 8.03803 3.27998 8.09264 3.3374 8.12579L8.78429 11.2706C8.90385 11.3396 9.05674 11.2986 9.12578 11.1791C9.71191 10.1641 9.71348 8.97262 9.23682 7.99339L10.8583 5.18521C11.5115 5.00603 12.0982 4.57973 12.4638 3.94629C12.5328 3.82672 12.4919 3.67383 12.3723 3.6048L8.18237 1.18584C8.12494 1.15268 8.0567 1.1437 7.99265 1.16086C7.92861 1.17803 7.874 1.21993 7.84086 1.27736C7.47521 1.91077 7.39934 2.63194 7.57065 3.28723L5.94919 6.09545C4.86323 6.1723 3.83201 6.76934 3.24591 7.78426Z' fill='%23FEA21E' stroke='%23FEA21E' stroke-width='0.5' stroke-linejoin='round'/%3e%3c/svg%3e",loading:"lazy"}),onClick:e,color:"white",className:`label-pinned ${a}`,style:l})},et=e=>({message:e("notification.failure"),type:"danger"});var tt="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%23FE921D'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const ot=(e,t)=>{const[o,n]=a(e||[]);return{onSelectImages:a=>{const l=a.target.files;if(l)if(t&&e){t((e||o).concat(Array.from(l)))}else n((o=>{const n=e||o;return t&&t(n.concat(Array.from(l))),n.concat(Array.from(l))}))},onRemoveImage:o=>{if(t&&e){const n=e;n.splice(o,1),t(n.slice())}else n((n=>{const a=e||n;return a.splice(o,1),t&&t(a.slice()),a.slice()}))},onRemoveAllImages:()=>{t?t([]):n([])},imageSrcs:s((()=>(e||o).map((e=>"string"==typeof e?e:URL.createObjectURL(e)))),[e,o]),imageFiles:e||o}};var nt="data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 22.9844C17.5228 22.9844 22 18.5072 22 12.9844C22 7.46153 17.5228 2.98438 12 2.98438C6.47715 2.98438 2 7.46153 2 12.9844C2 18.5072 6.47715 22.9844 12 22.9844Z' fill='%23262626'/%3e%3cpath d='M14.8281 10.1562L9.17127 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.17188 10.1562L14.8287 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const at=({className:e,style:t,bannedWords:n=[],value:s,onChange:r,onPreviewUrlChange:c,onInvalidUrlsChange:d,onImageFilesChange:m,imageFiles:u,isReplying:p})=>{const{t:v}=de(),[g,h]=a(null),y=l(null),{onSelectImages:C,onRemoveImage:f,imageSrcs:b}=ot(u,m);return i((()=>{c&&((null==g?void 0:g.url)?c({title:g.title||"",url:g.url||"",image:g.image||"",description:g.description||""}):c(null))}),[g]),o.createElement(E,{className:e,style:t},o.createElement(pe,{size:"p4",className:"description-label"},v("createPost.popup.description")),o.createElement("div",{className:"textarea-control"},o.createElement("div",{className:"textarea-wrapper"},o.createElement(k,{html:s||"",onChange:r,bannedWords:n,onImagePickerClick:()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:h,onInvalidUrlsChange:d,isReplying:p}))),o.createElement(pe,{size:"p4",className:"count-string"},v("character"),": ",me(s||"").length),(!b||0===b.length)&&g&&o.createElement("div",{className:"link-preview-wrapper"},g.isFetching?o.createElement(w,null):o.createElement(o.Fragment,null,o.createElement(Je,{title:g.title,url:g.url||"#",image:g.image,noRefetch:!0}),o.createElement("img",{src:nt,className:"icon-close",onClick:()=>h(null),loading:"lazy"}))),o.createElement("input",{ref:y,type:"file",accept:"image/png, image/gif, image/jpeg",multiple:!0,style:{display:"none"},onChange:C}),b.length>Se?o.createElement("div",{className:"input-notification"},o.createElement("img",{src:tt,loading:"lazy"}),o.createElement(pe,{size:"p4",color:ue.colors.alertWarning},v("createPost.popup.warningImage"))):null,b.length>0&&o.createElement("div",{className:"image-gallery"},b.map(((e,t)=>o.createElement("div",{key:t,className:"image-item"},o.createElement("img",{src:e,loading:"lazy"}),o.createElement("img",{className:"close-btn",src:nt,onClick:()=>f(t),loading:"lazy"}))))))},lt=(e,t)=>{if(!t)return e;const{limit:o,bannedWords:n=[]}=t,a="number"==typeof o&&o>=0?e.substring(0,o):e;return f(a,n)},it=({className:e,style:t,bannedWords:n=[],value:s,onChange:c})=>{var d;const{t:m}=de(),[u,p]=a(""),v=l(null);i((()=>{if(v.current){const e=e=>{var t;e.preventDefault();const o=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/plain");document.execCommand("insertHTML",!1,o)},t=v.current;return t.addEventListener("paste",e,{passive:!0}),()=>t.removeEventListener("paste",e)}}),[v]);const g=(null==n?void 0:n.join(","))||"";i((()=>{var e;if(g){const t=null===(e=v.current)||void 0===e?void 0:e.innerText;if(t){const e=f(t,n);e!==t&&(c&&c(e),p(e))}}}),[g]);const h=r(Ke((()=>{if(v.current){const e=lt(v.current.innerText,{limit:120,bannedWords:n});c&&c(e),p(e)}}),300),[]);return i((()=>{setTimeout((()=>{var e;null===(e=v.current)||void 0===e||e.focus()}),500)}),[]),o.createElement(b,{className:e,style:t},o.createElement(Qe,{name:"title",value:s||u,size:"md",label:m("createPost.title"),CustomInput:o.createElement(Ge,{innerRef:v,html:s||u,onChange:()=>{if(v.current&&v.current.innerText!==(s||u)){const e=lt(v.current.innerText,{bannedWords:n});c&&c(e),p(e),h()}},className:"title-input"})}),o.createElement(pe,{size:"p4",className:"count-string"},m("createPost.popup.wordCount",{count:(null===(d=v.current)||void 0===d?void 0:d.innerText.length)||0,max:120})))},st=({className:t,style:r,topics:c,communityId:d,onChange:m,isLoading:u,disabled:p,forceTopics:v,selectedTopics:g,noFetch:h,dataEventCategory:y,dataEventAction:C,dataEventLabel:E})=>{const{data:{locale:k,env:{isMarryBaby:f}}}=n(xe),[b,I]=a(c?[...c]:[]),[x,P]=a(g?[...g]:[]),[T,M]=a(!1),j=l(c);j.current=c,i((()=>{var t;!d||h||(null===(t=j.current)||void 0===t?void 0:t.length)||(I([]),M(!0),e(void 0,void 0,void 0,(function*(){var e;try{const t=yield Pe(Te(Me.TOPIC.LIST,{communityId:d,_locale:k}),"GET"),o=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.topics;Array.isArray(o)&&I((()=>(null==o?void 0:o.map($e).sort(((e,t)=>(e.order||0)-(t.order||0))))||[]))}catch(e){console.log(e),M(!1)}M(!1)})))}),[d,h]);const _=null==c?void 0:c.map((e=>e.id)).join("-"),L=null==b?void 0:b.map((e=>e.id)).join("-"),S=null==v?void 0:v.map((e=>e.id)).join("-");i((()=>{c&&void 0!==_&&_!==L&&I(c)}),[c,_,L]);const z=s((()=>b.filter((e=>!(null==v?void 0:v.some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)))))),[L,S]);return o.createElement(N,{"data-is-marrybaby":f,className:t,style:r},v.map((e=>o.createElement(rt,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:!0,selected:!0,dataEventAction:C,dataEventCategory:y,dataEventLabel:E}))),z.map((e=>o.createElement(rt,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:p,selected:(g||x).some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)),onClick:()=>{const t=g||x,o=t.findIndex((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId));-1!==o?t.splice(o,1):t.push(e),m&&g?m(t.slice()):(m&&m(t.slice()),P(t.slice()))},dataEventAction:C,dataEventCategory:y,dataEventLabel:E}))),(u||T)&&o.createElement(w,{className:"topic-spinner"}))},rt=e=>{var{topic:n,disabled:a,selected:l,onClick:i}=e,s=t(e,["topic","disabled","selected","onClick"]);return o.createElement("div",Object.assign({className:"tag-item"+(l?" --active":""),"data-disabled":a,onClick:a?void 0:i},s),n.name)},ct=({className:t,style:l,onPostCreatedEdited:s,onClose:r,communities:c=[],forceSelectCommunity:m,forceSelectTopics:u,articleId:p,optionalTopic:v,editPostData:E,defaultCommunity:k,defaultTopics:w,noFetchTopic:f,hideTopicList:b,selectAskDoctor:N,showAskDoctorOptions:_,currentPageUrl:L})=>{const S=!!(null==E?void 0:E.id),{data:{locale:z,env:{isMarryBaby:B}},action:{pushNotifications:A,sanitizeFunction:O}}=n(xe),{t:F}=de(),[R,D]=a(!1),[U,V]=a(N),[$,Z]=a(!1),[H,W]=a(!1),[Q,K]=a(!1),[G,q]=a(""),[Y,J]=a(""),[X,ee]=a(m?{label:m.name,value:`${m.id||""}-${m.mappedCategoryId||""}`}:{label:F("community.choose"),value:""}),[te,oe]=a([...u]||[]),[ne,ae]=a([]),[le,ie]=a([]),se=m||c.find((e=>`${e.id||""}-${e.mappedCategoryId||""}`===X.value)),re=m?[m]:c.filter((e=>e.isActive)).sort(((e,t)=>e.name>t.name?1:e.name<t.name?-1:0)),[ce,he]=a(null),[ye,Ce]=a([]),ke=G&&!H&&me(Y)&&(v||!v&&te.length>0)&&se&&(!ne||ne.length<=Se)&&!(null==ye?void 0:ye.length)&&!Q;i((()=>{if(E){const e=E;q(e.title||""),J(I(x(e.description||"","edit"),e.mentions)),ee({label:e.community.name,value:`${e.community.id||""}-${e.community.mappedCategoryId||""}`}),oe(e.topics||[]),ae(e.photos||[]),D(!!e.isAnonymous||!1),V(!!e.isAskDoctor||!1)}else k&&ee({label:k.name,value:`${k.id||""}-${k.mappedCategoryId||""}`}),w&&oe(w)}),[]),i((()=>{W(""!==G&&!/[a-zA-Z]/.test(G))}),[G]);const we=()=>e(void 0,void 0,void 0,(function*(){var t,o,n,a,l,i,c,d,m;if(_&&void 0===U)return Z(!0),!1;const u=yield(({title:t,description:o,communityId:n,imageFiles:a,previewUrl:l,topicIds:i,locale:s,sanitizeFunction:r,categoryCommunityId:c,categoryTopicIds:d,introUrl:m,bannerUrl:u,scheduleTime:p,isAnonymous:v,isAskDoctor:E})=>e(void 0,void 0,void 0,(function*(){const e=new FormData,k=g(o),w=g(t),f=h(k);if(e.append("title",w),e.append("description",y(k,r)),c?e.append("category_community",String(c)):n&&e.append("community_id",String(n)),e.append("is_anonymous",v?"1":"0"),e.append("is_question",E?"1":"0"),(null==l?void 0:l.title)&&e.append("preview_title",l.title),(null==l?void 0:l.description)&&e.append("preview_description",l.description),(null==l?void 0:l.url)&&e.append("preview_link",be(l.url)),(null==l?void 0:l.image)&&e.append("preview_image",be(l.image)),null==i||i.forEach((t=>{e.append("topics[]",String(t||""))})),null==d||d.forEach((t=>{e.append("category_topics[]",String(t||""))})),null==a?void 0:a.length){const t=yield Promise.all(a.map(((e,t)=>new Promise((o=>{setTimeout((()=>{o(C(e,s))}),2e3*t)})))));null==t||t.filter(Boolean).slice(0,Se).forEach(((t,o)=>{e.append(`images[${o}]`,t)}))}else e.append("images","");return null==f||f.forEach((t=>{e.append("mention_ids[]",t)})),e.append("intro_url",m||""),e.append("banner",u||""),p&&(e.append("post_type","scheduled"),e.append("schedule_datetime",p)),e})))({title:G,description:Y,communityId:String((null==se?void 0:se.id)||""),imageFiles:ne,previewUrl:ce,topicIds:null==te?void 0:te.map((e=>String(e.id||""))).filter(Boolean),locale:z,sanitizeFunction:O,categoryCommunityId:String((null==se?void 0:se.mappedCategoryId)||""),categoryTopicIds:null==te?void 0:te.map((e=>String(e.mappedCategoryId||""))).filter(Boolean),isAnonymous:R?1:0,isAskDoctor:U?1:0});let v;p&&u.append("article_id",p),S?(null==E?void 0:E.id)&&(v=yield(({id:t,locale:o,formData:n})=>e(void 0,void 0,void 0,(function*(){return yield Le(Te(Me.POST.UPDATE,{id:t,_locale:o}),"POST",{data:n})})))({id:E.id,formData:u,locale:z})):v=yield(({locale:t,formData:o,isArticleComment:n})=>e(void 0,void 0,void 0,(function*(){return yield Le(Te(n?Me.POST.CREATE_ARTICLE_COMMENT:Me.POST.CREATE,{_locale:t}),"POST",{data:o})})))({formData:u,locale:z,isArticleComment:!(null==se?void 0:se.id)&&!!(null==se?void 0:se.mappedCategoryId)});const k=null==v?void 0:v.data;(null==k?void 0:k.id)&&!(null===(o=null===(t=null==v?void 0:v.messages)||void 0===t?void 0:t.moderation)||void 0===o?void 0:o.type)?(A({message:F("createPost.popup.success"),type:"success"}),(e=>{s&&s(Ze(e),S),r&&r()})(k)):"banned"===(null===(a=null===(n=null==v?void 0:v.messages)||void 0===n?void 0:n.moderation)||void 0===a?void 0:a.type)?(A({title:F("notification.post.blocked.title"),message:F("notification.post.blocked.message"),type:"danger"}),v.messages.moderation.words&&ie(v.messages.moderation.words)):"suspect"===(null===(i=null===(l=null==v?void 0:v.messages)||void 0===l?void 0:l.moderation)||void 0===i?void 0:i.type)?(A({title:F("notification.post.suspect.title"),message:F("notification.post.suspect.message"),type:"warning"}),r&&r()):(null===(d=null===(c=null==v?void 0:v.messages)||void 0===c?void 0:c.find)||void 0===d?void 0:d.call(c,(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(A({message:F("notification.suspend.message"),type:"danger"}),r&&r()):A({message:(null===(m=null==v?void 0:v.messages)||void 0===m?void 0:m[0])||F("notification.failure"),type:"danger"})}));return o.createElement(P,{className:t,style:l},o.createElement("div",{className:"input-group-container"},o.createElement(it,{className:"input-group",bannedWords:le,value:G,onChange:q}),H&&o.createElement(T,null,o.createElement(ve,{isSolid:!0,color:ue.colors.red700,size:14}),o.createElement(pe,{size:"p3",as:"span",color:ue.colors.red700},F("createPost.popup.specialCharErr"))),o.createElement(at,{className:"input-group",bannedWords:le,value:Y,onChange:J,onPreviewUrlChange:he,onInvalidUrlsChange:Ce,onImageFilesChange:ae,imageFiles:ne}),_&&o.createElement(M,{"data-is-marry-baby":B},o.createElement("div",{className:"switch-label"},o.createElement(ge,{isMarryBaby:B,size:B?32:24,color:ue.colors.primaryBase,className:"label-icon"}),o.createElement("span",{className:"label-txt"},F("createPost.askDoctor"))),o.createElement(Ue,{value:U,choices:[{label:F("createPost.askDoctorChoice.yes"),value:!0,dataEventCategory:"Together",dataEventAction:"Write Post Click - Ask Doctor",dataEventLabel:L},{label:F("createPost.askDoctorChoice.no"),value:!1}],onChange:e=>{"boolean"==typeof e&&(Z(!1),V(e))}})),$&&o.createElement(T,null,o.createElement(ve,{isSolid:!0,color:ue.colors.red700,size:14}),o.createElement(pe,{size:"p3",as:"span",color:ue.colors.red700},F("createPost.message.askDoctorRequire"))),o.createElement("div",{className:"input-group"},o.createElement(pe,{size:"p4",className:"input-group-label"},F("admin.community")),o.createElement(j,{options:(null==re?void 0:re.map((e=>({label:e.name,value:`${e.id||""}-${e.mappedCategoryId||""}`}))))||[],id:"community-picker",placeholder:F("community.choose"),value:X,dropdownLabelTrackingAttributes:{"data-event-category":"Together","data-event-action":"Write Post Click - Choose Community/Topic","data-event-label":L},onChange:e=>{ee({label:e.label,value:String(e.value)}),oe([])},disabled:!!m}),o.createElement(pe,{size:"sm",className:"warning",color:ue.colors.gray400},"* ",F("commentPopup.warning.newPost"))),!b&&o.createElement("div",{className:"input-group"},o.createElement(pe,{size:"p4",className:"input-group-label"},F("tab.topic")),o.createElement("div",{className:"input-notification"},o.createElement("img",{src:se?"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%232D87F3'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":tt,loading:"lazy"}),o.createElement(pe,{size:"base",color:ue.colors.gray500},F(se?"createPost.popup.primary":"createPost.popup.warning"))),se&&o.createElement(st,{className:"tag-list",communityId:se.id,forceTopics:u,onChange:oe,selectedTopics:te,noFetch:f,dataEventCategory:"Together",dataEventAction:"Write Post Click - Choose Community/Topic",dataEventLabel:L}))),o.createElement("div",{className:"form-action"},o.createElement("div",{className:"input-group"},o.createElement(d,{className:"swich-input-group",labelPosition:"left",name:"PostAnonymous",checked:R,color:B?"pink":void 0,"data-event-category":"Together","data-event-action":"Write Post Click - Incognito","data-event-label":L,label:o.createElement("div",{className:"switch-label"},o.createElement("img",{className:"label-icon",src:fe.getAssetPath("anomyous-avatar.svg"),alt:"anomyous avatar",style:{marginRight:"10px",width:"24px"},loading:"lazy"}),o.createElement("span",{className:"label-txt"},F("createPost.postAnonymous"))),value:"Post Anonymous",onChange:e=>D(e.currentTarget.checked),styles:{body:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},label:{display:"flex",alignItems:"center"}}})),o.createElement("div",{className:"input-group"},o.createElement(Ee,{className:"submit-btn pointer-event-child-none",size:"lg","data-event-category":"Ask Doctor","data-event-action":"Submit Question","data-event-label":window.location.href,onClick:()=>e(void 0,void 0,void 0,(function*(){if(ke&&!Q){K(!0);try{yield we()}catch(e){console.error(e),A(et(F))}K(!1)}})),disabled:!ke,loading:Q},F("createPost.popup.submit")))))},dt=({className:e,isMarryBaby:t,style:l,title:s,description:r,acceptText:c,cancelText:d,onAccept:m,onCancel:u,thumbnail:p,isThumbnailIcon:v,onClose:g,acceptBtnTracking:h,acceptBtnProps:y,cancelBtnProps:C})=>{const{data:{env:{isMarryBaby:E}}}=n(xe),k="boolean"==typeof t?t:E,[w,f]=a(!1);return i((()=>(Ne(!0),setTimeout((()=>f(!0)),0),()=>Ne(!1))),[]),"undefined"==typeof window?null:Ye.createPortal(o.createElement(_,{"data-is-marrybaby":k,className:e,style:l,"data-open":w},o.createElement(L,{className:"popup-frame",isOpen:w,onClose:g},o.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},o.createElement("div",{className:"confirm-content"},p&&o.createElement("div",{className:"thumbnail-container "+(v?"is-icon":"")},o.createElement("img",{className:"thumbnail",src:p,loading:"lazy"})),o.createElement(_e,{className:"title",tag:"h2"},s),o.createElement(pe,{className:"desc",size:"lg"},r),o.createElement("div",{className:"btn-group"},o.createElement(qe,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==m||m(),null==g||g()}},y,h),c),o.createElement(qe,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",onClick:()=>{null==u||u(),null==g||g()}},C),d)))),k&&p&&o.createElement("div",{className:"thumbnail-container is-mobile "+(v?"is-icon":"")},o.createElement("img",{className:"thumbnail",src:p,loading:"lazy"})))),Ie())};const mt=({isReply:t,className:s,onClose:r,replyToName:c,style:d,replyingId:m,replyingUser:u,onPostSuccess:p,post:v,isMarryBaby:g})=>{const{action:{pushNotifications:E,sanitizeFunction:f},data:{userInfo:b,locale:N,env:{isMarryBaby:I}}}=n(xe),x="boolean"==typeof g?g:I,{t:P}=de(),{onSelectImages:T,onRemoveImage:M,imageSrcs:j,onRemoveAllImages:_,imageFiles:L}=ot(),[B,A]=a(""),{trigger:O}=n(S),[F,R]=a(!1),D=l(null),U=l(null),V=l(null),[$,Z]=a([]),[H,W]=a([]),[Q,K]=a(null);return i((()=>{var e;null===(e=V.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout((()=>{var e;null===(e=U.current)||void 0===e||e.focus()}),400)}),[O]),o.createElement(z,{"data-is-reply":t,className:s,style:d},t&&o.createElement("div",{className:"reply-to-container"},o.createElement(pe,{size:"p4"},o.createElement("span",{dangerouslySetInnerHTML:{__html:P("inputComment.replyTo",{name:`<span style="color: #2D87F3; cursor: pointer">@${c||""}</span>`})}})),o.createElement("img",{src:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8.00016' cy='8.50004' r='6.66667' fill='white' stroke='%23404040'/%3e%3cpath d='M10 6.5L6 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6.5L10 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:()=>r&&r(),loading:"lazy"})),o.createElement("div",{className:"input-container",ref:V},o.createElement(He,{className:"avatar-wrapper "+(t?"avatar-wrapper-reply":""),avatar:(null==b?void 0:b.id)?b.avatar:ze,username:(null==b?void 0:b.name)||(null==b?void 0:b.username)}),o.createElement("input",{ref:D,onChange:T,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),o.createElement(Qe,{value:B,name:"input",size:"md",className:"input-wrapper",displayIcon:o.createElement("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.7543 4.85352H4.49227C4.01776 4.85352 3.56268 5.04201 3.22715 5.37754C2.89162 5.71307 2.70313 6.16815 2.70312 6.64266V19.1667C2.70313 19.6412 2.89162 20.0963 3.22715 20.4318C3.56268 20.7673 4.01776 20.9558 4.49227 20.9558H17.0163C17.4908 20.9558 17.9459 20.7673 18.2814 20.4318C18.6169 20.0963 18.8054 19.6412 18.8054 19.1667V12.9047' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M17.4633 3.51187C17.8192 3.15599 18.3019 2.95605 18.8052 2.95605C19.3085 2.95605 19.7912 3.15599 20.147 3.51187C20.5029 3.86775 20.7029 4.35044 20.7029 4.85373C20.7029 5.35702 20.5029 5.83971 20.147 6.19559L11.6486 14.694L8.07031 15.5886L8.96489 12.0103L17.4633 3.51187Z' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",loading:"lazy"}),CustomInput:o.createElement("div",{className:"as-input"},o.createElement(k,{className:"textarea",html:B,onChange:A,onImagePickerClick:()=>{var e;return null===(e=D.current)||void 0===e?void 0:e.click()},bannedWords:H,onPreviewUrlChange:K,onInvalidUrlsChange:Z,setEditorRef:e=>U.current=e,isReplying:t}))}),o.createElement(qe,{theme:x?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>e(void 0,void 0,void 0,(function*(){var o,n,a,l,i,s,c,d,g;if((null==v?void 0:v.id)&&!F){R(!0);try{const k=e=>{A(""),_(),r&&r();const t=We(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),p&&p(t)},w=yield(({postId:t,message:o,photos:n,link:a,locale:l,sanitizeFunction:i,replyingUserId:s,replyingUserName:r,replyingId:c})=>e(void 0,void 0,void 0,(function*(){const e=new FormData;let d=y(o.replace(/(\ )+/g," "),i);const m=h(d);return n&&n.length>0&&(yield Promise.all(null==n?void 0:n.map((e=>C(e,l))))).filter(Boolean).slice(0,Se).forEach((t=>{e.append("images[]",t)})),a&&e.append("link",a),null==m||m.forEach((t=>{e.append("mention_ids[]",t)})),e.append("post_id",t),c&&e.append("parent_id",c),s&&(m.unshift(s),d=`[mention+id="${s}"+name="${(r||"").replace('"',"'")}"]${d}`,e.append("parent_user_id",String(s))),e.append("content",d),e.append("content",d),e})))(Object.assign({message:B,photos:L,postId:String(v.id),link:null==Q?void 0:Q.url,sanitizeFunction:f,locale:N},t&&m?{replyingUserId:String((null==u?void 0:u.id)||(null===(o=null==v?void 0:v.author)||void 0===o?void 0:o.id)||""),replyingId:m,replyingUserName:(null==u?void 0:u.name)||(null==u?void 0:u.username)||""}:{})),b=yield t&&m?((t,o)=>e(void 0,void 0,void 0,(function*(){return Le(Te(Me.COMMENT.REPLY,{_locale:o}),"POST",{data:t})})))(w,N):((t,o)=>e(void 0,void 0,void 0,(function*(){return Le(Te(Me.COMMENT.CREATE,{_locale:o}),"POST",{data:t})})))(w,N),I=null==b?void 0:b.data;(null==I?void 0:I.id)&&!(null===(a=null===(n=null==b?void 0:b.messages)||void 0===n?void 0:n.moderation)||void 0===a?void 0:a.type)?k(b):"banned"===(null===(i=null===(l=null==b?void 0:b.messages)||void 0===l?void 0:l.moderation)||void 0===i?void 0:i.type)?(E({title:P("notification.comment.blocked.title"),message:P("notification.comment.blocked.message"),type:"danger"}),b.messages.moderation.words&&W(b.messages.moderation.words)):"suspect"===(null===(c=null===(s=null==b?void 0:b.messages)||void 0===s?void 0:s.moderation)||void 0===c?void 0:c.type)?(E({title:P("notification.comment.suspect.title"),message:P("notification.comment.suspect.message"),type:"warning"}),A(""),_(),r&&r()):(null===(d=null==b?void 0:b.messages)||void 0===d?void 0:d.find((e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(E({message:P("notification.suspend.message"),type:"warning"}),A(""),_(),r&&r()):E({title:"",message:(null===(g=null==b?void 0:b.messages)||void 0===g?void 0:g[0])||P("notification.comment.somethingWrong"),type:"danger"})}catch(e){E({title:"",message:P("notification.comment.somethingWrong"),type:"danger"})}R(!1)}})),isLoading:F,isDisabled:!!(null==$?void 0:$.length)||F||!B||(null==B?void 0:B.length)<2||!B.trim()},o.createElement("img",{src:"data:image/svg+xml,%3csvg width='20' height='21' viewBox='0 0 20 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.5 9.73438L3.75 13.4844L7.5 17.2344' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M16.25 4.73438L16.25 10.3026C16.25 11.1464 15.9208 11.9557 15.3347 12.5524C14.7487 13.1491 13.9538 13.4844 13.125 13.4844L3.75 13.4844' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-enter",loading:"lazy"}))),(null==$?void 0:$.length)?o.createElement("div",{className:"error-text"},P("notification.limitUrlDomain")):null,(!j||0===j.length)&&Q&&o.createElement("div",{className:"link-preview-wrapper"},Q.isFetching?o.createElement(w,null):o.createElement(o.Fragment,null,o.createElement(Je,{title:Q.title,url:Q.url||"#",image:Q.image,noRefetch:!0}),o.createElement("img",{src:nt,className:"icon-close",onClick:()=>K(null),loading:"lazy"}))),j&&j.length>0&&o.createElement("div",{className:"preview-images-container"},j.map(((e,t)=>o.createElement("div",{key:t,className:"image-src-wrapper"},o.createElement("img",{className:"preview-image",src:e,loading:"lazy"}),o.createElement("img",{src:nt,className:"icon-close-circle",onClick:()=>M(t),loading:"lazy"}))))))};var ut="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 5V8' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11H8.00708' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const pt=({className:t,style:l,reason:i,reasonText:s,onClose:r,postId:c})=>{const{data:{locale:d,env:{isMarryBaby:m}},action:{pushNotifications:u}}=n(xe),{t:p}=de(),[v,g]=a(!1);return o.createElement(B,{"data-is-marrybaby":m,className:t,style:l},o.createElement("ul",{className:"report-list"},o.createElement("li",{className:"report-item"},o.createElement("img",{src:ut,loading:"lazy"}),o.createElement(pe,{className:"__label",color:ue.colors.gray800,size:"p4"},s))),o.createElement(qe,{theme:m?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:v,onClick:()=>e(void 0,void 0,void 0,(function*(){if(c&&!v){g(!0);try{const e=yield(({id:e,reason:t,locale:o})=>{const n=new FormData;return n.append("reason",t),Le(Te(Me.POST.REPORT,{_locale:o,id:e}),"POST",{data:n})})({id:c,reason:i,locale:d});1===(null==e?void 0:e.status)&&(u({message:"Post reported",type:"success"}),r&&r())}catch(e){}g(!1)}}))},p("submit")))};const vt=({className:e,style:t,authorName:n,images:l,onClose:s,onOpenSingleView:r,alt:c})=>{const{t:d}=de(),[u,p]=a(!1);return i((()=>{setTimeout((()=>{p(!0)}),0)}),[]),o.createElement(m,null,o.createElement(A,{className:e,style:t,"data-open":u},o.createElement("div",{className:"top-bar"},o.createElement("img",{className:"icon-arrow-left",src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.0508 18.0607L4.00078 12.0367L10.0508 6.01172' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.00195 12.0352L19.002 12.0352' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",onClick:s,alt:"go back",loading:"lazy"}),o.createElement(pe,{size:"p2",weight:"bold",style:{textAlign:"center"}},d("previewPhotos.title",{name:n}))),o.createElement("div",{className:"container"},l.map(((e,t)=>o.createElement("img",{className:"img-preview",key:t,src:e,onClick:()=>null==r?void 0:r(t),alt:c,loading:"lazy"}))))),",")};var gt="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12.8125L10 8.8125L6 4.8125' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const ht=({initialViewIndex:e,images:t,onClose:n,alt:l})=>{const[s,r]=a(e),[c,d]=a(!1);i((()=>{setTimeout((()=>{d(!0)}),0)}),[]);const u=null==t?void 0:t[s],p=0===s,v=!(null==t?void 0:t.length)||s===(null==t?void 0:t.length)-1;return o.createElement(m,null,o.createElement(O,{"data-open":c&&!!u},o.createElement(F,null,o.createElement("img",{src:R,className:"icon-close",onClick:n,alt:"close",loading:"lazy"})),u&&s>=0&&o.createElement(o.Fragment,null,o.createElement(D,null,o.createElement("img",{className:"img-preview",src:u,alt:l,loading:"lazy"}),o.createElement(U,{"data-disabled":p,onClick:()=>!p&&r(s-1)},o.createElement(V,null,o.createElement("img",{src:gt,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":p,loading:"lazy"}))),o.createElement(U,{"data-right":!0,"data-disabled":v,onClick:()=>!v&&r(s+1)},o.createElement(V,null,o.createElement("img",{src:gt,alt:"right arrow","data-disabled":v,loading:"lazy"})))))))},yt=({image:e,showIcon:t=!0})=>{const[n,l]=a(!0);return o.createElement($,{"data-is-blurred":n,onClick:e=>n&&e.stopPropagation()},o.createElement("img",{loading:"lazy",className:"img-preview",src:e}),o.createElement(Z,{onClick:e=>{e.stopPropagation(),l(!n)}},t&&o.createElement(H,null,n?o.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.71 2.5399C1.32 2.1499 1.32 1.5199 1.71 1.1299C2.1 0.739902 2.74 0.739902 3.13 1.1299L19.44 17.4599C19.83 17.8499 19.83 18.4799 19.44 18.8699C19.05 19.2599 18.42 19.2599 18.03 18.8699L15.31 16.1499C13.97 16.6699 12.52 16.9699 11 16.9699C6 16.9699 1.73 13.8599 0 9.4699C0.77 7.4999 2.06 5.7999 3.68 4.5099L1.71 2.5399ZM16 9.4699C16 6.7099 13.76 4.4699 11 4.4699C10.49 4.4699 10 4.5699 9.53 4.7099L7.36 2.5399C8.51 2.1699 9.73 1.9699 11 1.9699C16 1.9699 20.27 5.0799 22 9.4599C21.31 11.2199 20.21 12.7599 18.82 13.9899L15.76 10.9299C15.9 10.4699 16 9.9799 16 9.4699ZM11 14.4699C8.24 14.4699 6 12.2299 6 9.4699C6 8.6999 6.18 7.9699 6.49 7.3299L8.06 8.8999C8.03 9.0799 8 9.2699 8 9.4699C8 11.1299 9.34 12.4699 11 12.4699C11.2 12.4699 11.38 12.4399 11.57 12.3999L13.14 13.9699C12.49 14.2899 11.77 14.4699 11 14.4699ZM13.97 9.1399C13.82 7.7399 12.72 6.6499 11.33 6.4999L13.97 9.1399Z",fill:"white"})):o.createElement("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none"},o.createElement("path",{d:"M11.9999 0C5.14188 0 1.88558 5.87864 1.09558 7.55664C0.963582 7.83664 0.963582 8.16141 1.09558 8.44141C1.88558 10.1204 5.14188 16 11.9999 16C18.8339 16 22.0924 10.1629 22.8964 8.46094C23.0344 8.16794 23.0344 7.83206 22.8964 7.53906C22.0924 5.83706 18.8339 0 11.9999 0ZM11.9999 3C14.7609 3 16.9999 5.239 16.9999 8C16.9999 10.761 14.7609 13 11.9999 13C9.23888 13 6.99988 10.761 6.99988 8C6.99988 5.239 9.23888 3 11.9999 3ZM11.9999 5C11.2042 5 10.4412 5.31607 9.87856 5.87868C9.31595 6.44129 8.99988 7.20435 8.99988 8C8.99988 8.79565 9.31595 9.55871 9.87856 10.1213C10.4412 10.6839 11.2042 11 11.9999 11C12.7955 11 13.5586 10.6839 14.1212 10.1213C14.6838 9.55871 14.9999 8.79565 14.9999 8C14.9999 7.20435 14.6838 6.44129 14.1212 5.87868C13.5586 5.31607 12.7955 5 11.9999 5Z",fill:"#2D87F3"})))))},Ct=({className:e,images:t=[],style:s,authorName:r,isSensitive:c=!1,alt:d})=>{const{data:{env:{isMarryBaby:m}}}=n(xe),{t:u}=de(),p="+ "+((t.length||0)-4),[v,g]=a(!1),[h,y]=a(-1),C=t.length>5,E=l(!1);return i((()=>()=>{E.current&&Ne(!1)}),[]),i((()=>{v||h>=0?(Ne(!0),E.current=!0):(Ne(!1),E.current=!1)}),[v,h]),o.createElement(o.Fragment,null,c&&o.createElement(W,{message:u("sensitiveMask.contentWarningDescription"),icon:o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.00002 0.666748C4.40002 0.666748 0.666687 4.40008 0.666687 9.00008C0.666687 13.6001 4.40002 17.3334 9.00002 17.3334C13.6 17.3334 17.3334 13.6001 17.3334 9.00008C17.3334 4.40008 13.6 0.666748 9.00002 0.666748ZM9.00002 9.83341C8.54169 9.83341 8.16669 9.45841 8.16669 9.00008V5.66675C8.16669 5.20842 8.54169 4.83342 9.00002 4.83342C9.45835 4.83342 9.83335 5.20842 9.83335 5.66675V9.00008C9.83335 9.45841 9.45835 9.83341 9.00002 9.83341ZM8.16669 11.5001V13.1667H9.83335V11.5001H8.16669Z",fill:"#FE921D"}))}),o.createElement(Q,{className:e,style:s,"data-image-count":C?5:t.length||0,"data-is-marrybaby":m,"data-cursor-pointer":!c},null==t?void 0:t.slice(0,5).map(((e,t)=>{const n=4===t&&C;return o.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&C?g(!0):y(t)}},c&&o.createElement(yt,{image:e,showIcon:!n}),!m&&o.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e,alt:d}),o.createElement("img",{loading:"lazy",className:"img-preview",src:e,alt:d}),n&&o.createElement("div",{className:"img-more-overlay"},o.createElement(_e,{tag:"h1",as:"h2",color:"white"},p)))}))),v&&o.createElement(vt,{authorName:r||"",images:t,onClose:()=>g(!1),onOpenSingleView:y,alt:d}),h>=0&&o.createElement(ht,{images:t,initialViewIndex:h,onClose:()=>y(-1),alt:d}))},Et=({url:t,image:r,className:d,style:m,baseUrl:u="",autoPlay:p=!0})=>{const{data:{locale:v}}=n(xe),[g,h]=a(null);i((()=>{e(void 0,void 0,void 0,(function*(){if(!r){if(!t)return h(null);h((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),Pe(Te(Me.FETCH_PREVIEW,{_locale:v},void 0,u),"POST",{data:{link:t},headers:{"Content-Type":"application/json"}},!!u).then((e=>{var o,n;h({url:t,image:(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.image)||(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)})})).catch((()=>{h(null)}))}}))}),[t,r]);const y=r||(null==g?void 0:g.image),C=(null==g?void 0:g.url)||t,E=s((()=>K(C)),[C]),k=s((()=>C.includes("facebook.com")||C.includes("fb.watch")),[C]),f=l(0),b=l(0),[N,I]=a(!1);i((()=>{const e=()=>{var e;const t=null===(e=x.current)||void 0===e?void 0:e.getBoundingClientRect();let o=!1;t&&(!f.current||Math.abs((f.current-t.width)/(null==t?void 0:t.width))>.2)&&(f.current=Math.floor(t.width),o=!0),t&&(!b.current||Math.abs((b.current-t.height)/(null==t?void 0:t.height))>.2)&&(b.current=Math.floor(t.height),o=!0),o&&I((e=>!e))};return e(),window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}}),[]);const x=l(null),P=c();return o.createElement(G,{className:`${d} no-replace-click`,style:m,ref:x,color:P.colors[P.primaryColor][0]},r||!E&&!k?o.createElement("a",{href:C,target:"_blank",rel:"noreferrer"},o.createElement("div",{className:"link-image-wrapper "+((null==g?void 0:g.isFetching)?"fetching":"")},(null==g?void 0:g.isFetching)?o.createElement(w,{className:"loading-spinner"}):o.createElement(ke,{className:"link-image",src:y||je,backupSrc:je,alt:C}))):o.createElement("div",{className:"link-image-wrapper"},E?o.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${E}?&autoplay=${p?1:0}&mute=1&enablejsapi=1`,frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"},loading:"lazy"}):k?o.createElement("iframe",{key:String(N),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(C)}&autoplay=${p?1:0}&show_text=false&t=0&width=${f.current}&height=${b.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:b.current,width:f.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share",loading:"lazy"}):null))};var kt="KsWg8i6",wt="_9tS0EUN",ft="kyyRKlb",bt="-Uqqka-";const Nt=l=>{var{post:i,onSkip:s,btnText:d,currentPageUrl:m}=l,p=t(l,["post","onSkip","btnText","currentPageUrl"]);const{t:v}=de(),{data:{locale:g},action:{pushNotifications:h}}=n(xe),[y,C]=a(!1),[E,k]=a(!1),w=c(),f=r((()=>e(void 0,void 0,void 0,(function*(){var e;k(!0);const t=yield Le(Te(Me.USER.SKIP_QUESTION,{_locale:g,id:null==i?void 0:i.id}),"PUT");1===(null==t?void 0:t.status)?(null==s||s({id:(null==i?void 0:i.id)||"",communityId:(null===(e=null==i?void 0:i.community)||void 0===e?void 0:e.id)||""}),C(!1),h({title:"",message:"Skip success",type:"success"})):h({title:"",message:null==t?void 0:t.messages,type:"danger"}),k(!1)}))),[]);return o.createElement(u,{width:327,withArrow:!0,shadow:"md",opened:y},o.createElement(u.Target,null,o.createElement("div",Object.assign({className:`${kt} ${(null==p?void 0:p.className)||""}`,onClick:()=>C(!0)},p),d||v("profilePanel.questionNotClear"))),o.createElement(u.Dropdown,null,o.createElement("div",null,o.createElement("div",{className:wt},v("profilePanel.skipQuestion.heading")),o.createElement("div",{className:ft},v("profilePanel.skipQuestion.content")),o.createElement("div",{className:bt},o.createElement(Ee,{size:"md",variant:"secondary",leftIcon:o.createElement(he,{color:w.fn.primaryColor(),size:24}),onClick:()=>C(!1),styles:()=>({leftIcon:{marginRight:0}})}),o.createElement(Ee,{variant:"primary",size:"md",leftIcon:o.createElement(ye,{color:"white",size:24}),onClick:f,loading:E,"data-event-category":"Together","data-event-action":"Unclear Question Click","data-event-label":m,styles:()=>({leftIcon:{marginRight:0}})})))))};var It="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M5 10C3.9 10 3 10.9 3 12C3 13.1 3.9 14 5 14C6.1 14 7 13.1 7 12C7 10.9 6.1 10 5 10Z' fill='%233E3F58'/%3e %3cpath d='M19 10C17.9 10 17 10.9 17 12C17 13.1 17.9 14 19 14C20.1 14 21 13.1 21 12C21 10.9 20.1 10 19 10Z' fill='%233E3F58'/%3e %3cpath d='M12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z' fill='%233E3F58'/%3e %3c/svg%3e",xt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='%23595959' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Pt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Tt="data:image/svg+xml,%3csvg width='3' height='13' viewBox='0 0 3 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='1.58326' cy='6.41663' r='1.25' transform='rotate(89.9997 1.58326 6.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='1.41663' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 1.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='11.4166' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 11.4166)' fill='%23595959'/%3e%3c/svg%3e",Mt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 5.33337C13.1046 5.33337 14 4.43794 14 3.33337C14 2.2288 13.1046 1.33337 12 1.33337C10.8954 1.33337 10 2.2288 10 3.33337C10 4.43794 10.8954 5.33337 12 5.33337Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M12 14.6666C13.1046 14.6666 14 13.7712 14 12.6666C14 11.5621 13.1046 10.6666 12 10.6666C10.8954 10.6666 10 11.5621 10 12.6666C10 13.7712 10.8954 14.6666 12 14.6666Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.72668 9.00665L10.28 11.66' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.2734 4.33997L5.72668 6.9933' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",jt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 4H3.33333H14' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33334 3.99992V2.66659C5.33334 2.31296 5.47382 1.97382 5.72387 1.72378C5.97392 1.47373 6.31305 1.33325 6.66668 1.33325H9.33334C9.68697 1.33325 10.0261 1.47373 10.2762 1.72378C10.5262 1.97382 10.6667 2.31296 10.6667 2.66659V3.99992M12.6667 3.99992V13.3333C12.6667 13.6869 12.5262 14.026 12.2762 14.2761C12.0261 14.5261 11.687 14.6666 11.3333 14.6666H4.66668C4.31305 14.6666 3.97392 14.5261 3.72387 14.2761C3.47382 14.026 3.33334 13.6869 3.33334 13.3333V3.99992H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66666 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33334 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const _t=({authorEmail:t,onDeletePost:l,shareUrl:i,post:s,className:r="",popoverClassName:c="",onBookmark:d,onRemoveBookmark:m,onEditPost:u})=>{const{data:{locale:p,userInfo:v,togetherUserId:g,env:{isMarryBaby:h}},action:{pushNotifications:y}}=n(xe),{t:C}=de(),[E,k]=a(!1),[w,f]=a(!1),[b,N]=a(!1),{authActionWrapper:I}=q(),x=t&&(null==v?void 0:v.email)&&t===String(null==v?void 0:v.email);return o.createElement("div",{className:r,onClick:e=>{e.preventDefault(),e.stopPropagation()}},b&&o.createElement(Y,{url:i,text:null==s?void 0:s.title,onClose:()=>N(!1)}),w&&o.createElement(dt,{thumbnail:fe.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:C("popup.deletePost.title"),description:C("popup.deletePost.description"),acceptText:C("popup.deletePost.accept"),cancelText:C("popup.deletePost.cancel"),onAccept:()=>e(void 0,void 0,void 0,(function*(){if((null==s?void 0:s.id)&&!E){k(!0);try{const t=yield(({id:t,locale:o})=>e(void 0,void 0,void 0,(function*(){if(t)return yield Le(Te(Me.POST.DELETE,{id:t,_locale:o}),"DELETE")})))({id:s.id,locale:p});1===(null==t?void 0:t.status)&&(null==l||l())}catch(e){}k(!1)}})),onClose:()=>f(!1)}),o.createElement(J,{className:c,toggleButtonContent:o.createElement("img",{src:h?It:Tt,loading:"lazy"}),position:"bottom",align:"end",buttonProps:{isLoading:E},data:x?{isShowheader:!1,type:"list",list:[{icon:Mt,label:C("morePopover.share"),onClick:()=>N(!0)},{icon:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.16952 3.2356H2.99484C2.6785 3.2356 2.37512 3.36126 2.15143 3.58495C1.92774 3.80863 1.80208 4.11202 1.80208 4.42836V12.7777C1.80208 13.094 1.92774 13.3974 2.15143 13.6211C2.37512 13.8448 2.6785 13.9705 2.99484 13.9705H11.3442C11.6605 13.9705 11.9639 13.8448 12.1876 13.6211C12.4113 13.3974 12.537 13.094 12.537 12.7777V8.60303' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M11.6425 2.341C11.8798 2.10375 12.2016 1.97046 12.5371 1.97046C12.8726 1.97046 13.1944 2.10375 13.4317 2.341C13.6689 2.57826 13.8022 2.90005 13.8022 3.23558C13.8022 3.57111 13.6689 3.89289 13.4317 4.13015L7.76607 9.79578L5.38054 10.3922L5.97692 8.00663L11.6425 2.341Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",label:C("actionPopover.edit"),onClick:u},{icon:jt,label:C("actionPopover.delete"),onClick:()=>{I((()=>f(!0)))}}]}:{isShowheader:!1,type:"list",list:[{icon:Mt,label:C("morePopover.share"),onClick:()=>N(!0)},{icon:(null==s?void 0:s.bookmarked)?xt:Pt,label:(null==s?void 0:s.bookmarked)?C("morePopover.unsavePost"):C("morePopover.savePost"),onClick:()=>{I((()=>e(void 0,void 0,void 0,(function*(){if((null==v?void 0:v.id)&&(null==s?void 0:s.id))if(null==s?void 0:s.bookmarked){const e=yield Le(Te(Me.BOOKMARK.DELETE,{_locale:p}),"DELETE",{data:{post_id:String(s.id)}});1===(null==e?void 0:e.status)?(y({title:"",message:"Removed saved post",type:"success",displayIcon:Pt}),m&&m()):y({title:"",message:"Remove failed",type:"danger",displayIcon:Pt})}else{const e=yield Le(Te(Me.BOOKMARK.CREATE,{_locale:p}),"POST",{data:{user_id:g||v.id,post_id:s.id}});1===(null==e?void 0:e.status)?(y({title:"",message:"Post saved",type:"success",displayIcon:xt}),d&&d()):y({title:"",message:"Post saved failed",type:"danger",displayIcon:Pt})}}))))}},{icon:ut,label:C("morePopover.report"),subTree:{title:C("morePopover.report.title"),description:C("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(Be).map((e=>({label:Be[e].label,reason:Be[e].reportReasonText,reasonValue:e}))).map((e=>({label:C(e.label),subTree:{title:C("morePopover.reportSubmit.title"),description:C("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>o.createElement(pt,{reason:e.reasonValue,reasonText:C(e.reason),postId:null==s?void 0:s.id,onClose:()=>t&&t(!1)})}})))}}]}}))};const Lt=({onDeleteComment:t,commentId:l,className:i="",popoverClassName:s=""})=>{const{data:{env:{isMarryBaby:r},locale:c},action:{pushNotifications:d}}=n(xe),{t:m}=de(),[u,p]=a(!1),{authActionWrapper:v}=q();return o.createElement("div",{className:i,onClick:e=>{e.preventDefault(),e.stopPropagation()}},u&&o.createElement(dt,{thumbnail:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cg stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' clip-path='url(%23clip0)'%3e%3cpath d='M2 4.008h12M5.333 4.008V2.675a1.333 1.333 0 0 1 1.334-1.333h2.666a1.333 1.333 0 0 1 1.334 1.333v1.333m2 0v9.334a1.333 1.333 0 0 1-1.334 1.333H4.667a1.333 1.333 0 0 1-1.334-1.333V4.008h9.334ZM6.667 7.342v4M9.333 7.342v4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3cpath fill='white' d='M0 .008h16v16H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:m("popup.deleteComment.title"),description:m("popup.deleteComment.description"),acceptText:m("popup.deletePost.accept"),cancelText:m("popup.deletePost.cancel"),onAccept:()=>e(void 0,void 0,void 0,(function*(){var e;if(!l)return;const o=yield(({id:e,locale:t})=>Le(Te(Me.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"))({id:l,locale:c});1===(null==o?void 0:o.status)?(t&&t(),d({title:"",message:m("notification.success"),type:"success"})):d({title:"",message:(null===(e=null==o?void 0:o.messages)||void 0===e?void 0:e[0])||m("notification.failure"),type:"danger"})})),onClose:()=>p(!1)}),o.createElement(J,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:jt,label:m("actionPopover.delete"),onClick:()=>{v((()=>{p(!0)}))}}]},className:s,toggleButtonContent:o.createElement("img",{src:r?It:Tt,loading:"lazy"}),buttonProps:{}}))};var St="-dzIuHr";const zt=({userId:e,avatar:t,name:n,role:l,title:i,className:s})=>{const{t:r}=de(),[c,d]=a(!1);return o.createElement(o.Fragment,null,o.createElement(qe,{className:`${St} ${s}`,color:"success",size:"xs",onClick:()=>d(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},o.createElement("span",{className:"text"},o.createElement(Ce.Endorse,{isSolid:!0,size:18,color:ue.colors.green800,className:"icon"}),r("cardReply.verifyBy",{name:`${n||""}`}))),o.createElement(X,{open:c,onClose:()=>d(!1),profileModalProps:{zIndex:1e3}},o.createElement(ee,{authorProps:{userId:e,avatar:t,name:n,role:l,title:i},hideQuestionTab:!0})))};const Bt=({className:t,style:l,comment:r,type:c="comment",level:d=0,replyingId:m,onPostCommentSuccess:u,post:p,onDeleteComment:v,refetchComment:g,hasQuickBookingEnable:h,handleMakeAppointment:y,cardAuthorProps:C,maxChars:E=600,disableShortenContent:k})=>{var w,f,b,N,I,x,P,T,M,j,_,L,S;const{data:{locale:z,userInfo:B,env:{isMarryBaby:A}}}=n(xe),{t:O}=de(),[F,R]=a(r||null),{id:D,countLikes:U,content:V,replies:$=[],images:Z=[],author:H,liked:W,link:Q,mentionedUser:K,mentions:G}=F,{text:Y,replyingTo:J}=(e=>{try{const t=e.match(/\[@([^\]]+)\]/),o=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:o}}catch(e){}return{text:""}})(V),{authActionWrapper:X}=q({_joinCommunityIds:[null===(w=null==p?void 0:p.community)||void 0===w?void 0:w.id],_joinTopicIds:null===(f=null==p?void 0:p.topics)||void 0===f?void 0:f.map((e=>e.id))}),[ee,re]=a(4),ce=!!(null==B?void 0:B.id)&&(null==$?void 0:$.some((e=>e.author.id===B.id))),me=e=>{R((t=>{if(!t.replies.find((t=>t.id===e.id))){t.replies.unshift(e);const o=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return g&&g(o),o}return t}))},[ue,pe]=a(!1),ve=s((()=>"comment"===c&&$&&0!=$.length?$.sort(((e,t)=>{const o=new Date(e.createdAt).getTime(),n=new Date(t.createdAt).getTime();return o>n?-1:o<n?1:0})):$),[c,$]),ge=(null==$?void 0:$.length)||0,he=String(null==H?void 0:H.email)&&(null==B?void 0:B.email)&&String(null==H?void 0:H.email)===String(null==B?void 0:B.email),ye=(null==H?void 0:H.name)||(null==H?void 0:H.username)||"",Ce=(null==H?void 0:H.username)||(null==H?void 0:H.name)||"",Ee=null==H?void 0:H.avatar,ke=(null==p?void 0:p.isAnonymous)||null==H?void 0:H.role,fe=[...(null==p?void 0:p.isAnonymous)?[{id:(null===(b=null==p?void 0:p.author)||void 0===b?void 0:b.id)||0,name:O("cardPost.anonymous")}]:[],...G||[]],[be,Ne]=a(null),[Ie,je]=a(null);i((()=>{if(null==H?void 0:H.hospitalId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Pe(Ae(Oe.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:we[z]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.branch)&&Ne(null==o?void 0:o._data.branch)}));t(H.hospitalId)}if(null==H?void 0:H.doctorId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Pe(Ae(Oe.GET_DOCTOR_INFO,{doctorId:t,website_url:we[z]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.doctor)&&je(null==o?void 0:o._data.doctor)}));t(H.doctorId)}}),[H.hospitalId,H.doctorId]);const _e=(null==Ie?void 0:Ie.valid_outpatient)||(null==Ie?void 0:Ie.valid_telemedicine),Se=((null==be?void 0:be.total_available_service)||(null==be?void 0:be.total_available_doctor))>0,ze=h&&(_e||Se),Be="chatbot"===(null===(N=null==F?void 0:F.author)||void 0===N?void 0:N.type);return o.createElement(te,{defaultParams:{_joinCommunityIds:[null===(I=null==p?void 0:p.community)||void 0===I?void 0:I.id],_joinTopicIds:null===(x=null==p?void 0:p.topics)||void 0===x?void 0:x.map((e=>e.id))}},o.createElement(oe,{className:t,style:l,"data-is-reply":!!d,"data-is-marrybaby":A,"data-has-booking":ze},"reply"===c&&o.createElement(Ve,{className:"top-divider",type:"solid"}),o.createElement("div",{style:{padding:"16px 16px 0"}},o.createElement(ne,Object.assign({avatar:Ee,name:ye,username:Ce,timeText:null==p?void 0:p.createdTime,community:null==p?void 0:p.community,className:"post-author "+(he?"with-popover":""),type:c,userId:null==H?void 0:H.id,role:ke,expertId:null==H?void 0:H.partnerId,title:null==H?void 0:H.title,doctorId:null==H?void 0:H.doctorId,hospitalId:null==H?void 0:H.hospitalId,hasQuickBooking:ze,handleMakeAppointment:y,isAnonymous:(null==F?void 0:F.isAnonymous)||Boolean(null==p?void 0:p.isAnonymous)&&(null===(P=null==p?void 0:p.author)||void 0===P?void 0:P.username)===(null==H?void 0:H.username),hideBackground:Be,userType:null==H?void 0:H.type},C)),Boolean(null==F?void 0:F.isVerify)&&!Boolean(null==F?void 0:F.isOppose)&&o.createElement(zt,{title:null===(T=null==F?void 0:F.userVerify)||void 0===T?void 0:T.title,name:null===(M=null==F?void 0:F.userVerify)||void 0===M?void 0:M.name,userId:null===(j=null==F?void 0:F.userVerify)||void 0===j?void 0:j.id,role:null===(_=null==F?void 0:F.userVerify)||void 0===_?void 0:_.role,avatar:null===(L=null==F?void 0:F.userVerify)||void 0===L?void 0:L.avatar,className:"verify-tag"})),o.createElement(ae,{className:"post-content-wrapper",replyingTo:J,mentionedUser:K,description:Y,mentions:fe,maxChars:E,disableShortenContent:k}),o.createElement("span",null),o.createElement("span",null),Z&&Z.length>0?o.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},o.createElement(Ct,{images:Z,authorName:null==H?void 0:H.username})):null,Z&&0!==Z.length||!Q?null:o.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},o.createElement(Je,{url:Q})),"most-engaging"!==c?o.createElement(o.Fragment,null,Be&&o.createElement(le,{listUrl:null==F?void 0:F.source,categorySlug:null==F?void 0:F.categorySlug}),o.createElement(ie,{type:se.reply,loveCount:U,replyCount:ge,className:"post-reaction",liked:W,isReplied:ce,hideCommentIcon:"reply"===c||Be,hasShare:!1,onCommentClick:()=>X((()=>pe((e=>!e)))),onCommentCountClick:()=>X((()=>{pe(!0)})),onLikeClick:()=>X((()=>e(void 0,void 0,void 0,(function*(){if(D){const t=yield(({commentId:t,setLike:o=!1,locale:n})=>e(void 0,void 0,void 0,(function*(){return Le(Te(o?Me.COMMENT.LIKE:Me.COMMENT.UNLIKE,{_locale:n,id:t}),"GET")})))({commentId:D,setLike:!W,locale:z});1===t.status&&R((e=>Object.assign(Object.assign({},e),{liked:!W,countLikes:e.countLikes+(W?-1:1)})))}}))))}),ue&&o.createElement(mt,{replyingId:m||F.id,replyToName:ye,isReply:!0,onClose:()=>pe(!1),onPostSuccess:e=>{"reply"===c?u&&u(e):me(e)},post:p,replyingUser:H}),"comment"===c&&$&&$.length>0?o.createElement("div",{className:"comment-reply-wrapper"},null===(S=null==ve?void 0:ve.slice(0,ee))||void 0===S?void 0:S.map((e=>o.createElement(Bt,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:d+1,replyingId:D,onPostCommentSuccess:me,post:p,onDeleteComment:()=>{R((t=>Object.assign(Object.assign({},t),{replies:t.replies.filter((t=>t.id!==e.id)),countReplies:t.countReplies-1})))},handleMakeAppointment:y,hasQuickBookingEnable:h}))),ge>ee&&o.createElement(o.Fragment,null,o.createElement(Ve,{className:"top-divider",type:"solid"}),o.createElement(qe,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>re((e=>e+4))},O("comment.seeMoreReplies",{count:ge-ee}),o.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12L10 8L6 4' stroke='%232D87F3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",loading:"lazy"})))):null):null,he&&o.createElement(Lt,{onDeleteComment:v,className:"popover",commentId:F.id})))},At=(t,o)=>e(void 0,void 0,void 0,(function*(){var e,n,a;const l=yield Re(Te(Me.COMMENT.LIST,{postId:t,_locale:o,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(a=null===(n=null===(e=null==l?void 0:l.data)||void 0===e?void 0:e.comments)||void 0===n?void 0:n.map(We))||void 0===a?void 0:a[0]})),Ot=({className:t,style:l,hideViewMoreComment:s,showMostEngaging:r,onCommentClick:c,onCommentCountClick:d,onMostEngagingCommentClick:m,onPostCommentSuccess:u,disableCardLink:p,disableShortenContent:v,onDeletePost:g,onEditPost:h,post:y,mostEngagingComment:C,onDeleteComment:E,showInputComment:k,InlineCommentsComponent:w,hasQuickBookingEnable:f,handleMakeAppointment:b,cardAuthorProps:N})=>{const[I,x]=a(y),[P,T]=a(!1),[M,j]=a(C),{community:_,topics:L,author:S,slug:z,isPin:B,liked:A,photos:O,mentions:F,title:R,description:D,previewUrl:U,likesCount:V,commentsCount:$,id:Z,commented:H}=I,{data:{locale:W,env:{isMarryBaby:Q,togetherBasePath:K}},action:{pushNotifications:G}}=n(xe),{t:J}=de(),[X,ee]=a(k),oe=`${K}/${(null==_?void 0:_.slug)||"_"}/${z||""}`,le=`${Fe(W)}${oe}`,{authActionWrapper:ue}=q((null==_?void 0:_.slug)?{_joinCommunityIds:[_.id],_joinTopicIds:null==L?void 0:L.map((e=>e.id))}:void 0),[pe,ve]=a(!1);i((()=>{ee(k)}),[k]);const ge=(null==S?void 0:S.name)||(null==S?void 0:S.username)||"",he=(null==S?void 0:S.username)||(null==S?void 0:S.name)||"",ye=null==S?void 0:S.avatar,Ce=(null==I?void 0:I.isAnonymous)||null==S?void 0:S.role,[Ee,ke]=a(null),[we,fe]=a(null);i((()=>{if(null==S?void 0:S.hospitalId){(t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Pe(Ae(Oe.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:De[W]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.branch)&&ke(null==o?void 0:o._data.branch)})))(S.hospitalId)}if(null==S?void 0:S.doctorId){(t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Pe(Ae(Oe.GET_DOCTOR_INFO,{doctorId:t,website_url:De[W]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.doctor)&&fe(null==o?void 0:o._data.doctor)})))(S.doctorId)}}),[S.hospitalId,S.doctorId]);const be=(null==we?void 0:we.valid_outpatient)||(null==we?void 0:we.valid_telemedicine),Ne=((null==Ee?void 0:Ee.total_available_service)||(null==Ee?void 0:Ee.total_available_doctor))>0,Ie=f&&(be||Ne);i((()=>{e(void 0,void 0,void 0,(function*(){if(Z&&$&&r&&!(null==C?void 0:C.id)){const e=yield At(Z,W);j(e)}}))}),[Z,W,$,r,null==C?void 0:C.id]),i((()=>{j(C)}),[null==C?void 0:C.id]);const Se=t=>e(void 0,void 0,void 0,(function*(){if($>1&&(null==M?void 0:M.id)&&(null==M?void 0:M.id)===(null==t?void 0:t.id)){const e=yield At(Z,W);j(e)}x((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1}))),E&&E(t)}));return o.createElement(te,{defaultParams:(null==_?void 0:_.slug)?{_joinCommunityIds:[_.id],_joinTopicIds:null==L?void 0:L.map((e=>e.id))}:void 0},P&&o.createElement(Y,{url:le,avatar:je,text:R,onClose:()=>T(!1)}),o.createElement(re,{className:t,style:l,"data-is-marrybaby":Q},B?o.createElement(Xe,{className:"post-pin"}):null,o.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},o.createElement(ne,Object.assign({avatar:ye,name:ge,username:he,url:p?void 0:oe,community:_,timeText:null==I?void 0:I.createdTime,className:"post-author",role:Ce,userId:null==S?void 0:S.id,expertId:null==S?void 0:S.partnerId,doctorId:null==S?void 0:S.doctorId,hospitalId:null==S?void 0:S.hospitalId,title:null==S?void 0:S.title,hasQuickBooking:Ie,handleMakeAppointment:b,"data-testid":"name",isAnonymous:!!(null==I?void 0:I.isAnonymous),extendEle:o.createElement(_t,{authorEmail:String(null==S?void 0:S.email),onDeletePost:g,shareUrl:le,post:I,className:"popover",onEditPost:h})},N))),o.createElement("a",{href:p?void 0:oe,className:"post-content-link-wrapper"},R&&o.createElement(_e,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},me(R)),o.createElement(ae,{className:"post-content-wrapper",description:D,disableShortenContent:v,mentions:F,"data-testid":"Content of the Post"})),o.createElement("span",null),o.createElement("span",null),o.createElement("div",{key:"tag-topic"},L&&L.length>0?o.createElement(ce,{topics:L,className:"post-topics"}):null),o.createElement("div",{key:"social-preview"},(null==I?void 0:I.introUrl)?o.createElement("div",{className:"social-preview-wrapper "+((null==O?void 0:O.length)?"has-image":"")},o.createElement(Et,{url:I.introUrl,image:I.bannerImage})):null),o.createElement("div",{key:"image-preview"},(null==O?void 0:O.length)?o.createElement("div",{className:"image-preview-wrapper"},o.createElement(Ct,{images:O,authorName:null==S?void 0:S.name})):null),o.createElement("div",{key:"link-preview"},(null==I?void 0:I.introUrl)||(null==O?void 0:O.length)||!(null==U?void 0:U.url)?null:o.createElement("div",{className:"link-preview-wrapper"},o.createElement(Je,{title:U.title,url:U.url,image:U.image}))),o.createElement(ie,{isMarryBaby:Q,type:se.post,loveCount:V,replyCount:$,className:"post-reaction "+((null==O?void 0:O.length)||(null==U?void 0:U.url)?"hide-top-border":""),liked:pe?!A:A,isReplied:H,onCommentClick:()=>ue((()=>{c?c():ee((e=>!e))})),onCommentCountClick:()=>{ue((()=>{Q?ee(!0):d?d():!p&&(window.location.href=oe)}))},onShareClick:()=>{T(!0)},onLikeClick:()=>e(void 0,void 0,void 0,(function*(){if(Z&&!pe){ve(!0);try{const t=yield(({id:t,locale:o})=>e(void 0,void 0,void 0,(function*(){if(t)return yield Le(Te(Me.POST.LIKE,{id:t,_locale:o}),"GET")})))({id:Z,locale:W});1!==(null==t?void 0:t.status)?G(et(J)):x((e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})))}catch(e){G(et(J))}ve(!1)}})),showingMostEngaging:!(!r||!(null==M?void 0:M.id))}),X&&o.createElement(mt,{isMainCmt:!k,onClose:()=>ee(!1),onPostSuccess:e=>{0!==$||(null==M?void 0:M.id)||j(e),x((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0}))),u&&u(e)},post:I}),r&&(null==M?void 0:M.id)?o.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{m?(e.stopPropagation(),m()):window.location.href=oe}},o.createElement(Bt,{hasQuickBookingEnable:f,handleMakeAppointment:b,comment:M,post:I,onDeleteComment:()=>{Se&&Se(M)},className:"most-engaging-comment",type:"most-engaging",key:M.id,cardAuthorProps:N}),$>1&&!s&&o.createElement(qe,{className:"see-more-comments",color:"ghost",size:"md"},J("comment.seeMoreComments",{count:$-1}))):null,w))};var Ft=Object.freeze({__proto__:null});export{Je as C,mt as I,Xe as L,dt as P,pt as S,st as T,zt as V,ct as a,at as b,it as c,vt as d,ht as e,Ct as f,Et as g,Nt as h,Ot as i,_t as j,Bt as k,Lt as l,Ft as t};
|
|
1
|
+
import{a as e,_ as t}from"./tslib.es6-914e91bc.js";import o,{useContext as n,useState as a,useRef as l,useEffect as i,useMemo as s,useCallback as r}from"react";import{useMantineTheme as c,Checkbox as d,Portal as m,Popover as u}from"@mantine/core";import{p,L as v,r as g,q as h,s as y,t as C,v as E,R as k,w,x as f,y as b,z as N,E as I,F as x,G as P,H as T,I as M,D as j,J as _,g as L,M as S,K as z,N as B,O as A,Q as O,U as F,V as R,W as D,X as U,Y as V,Z as $,_ as Z,$ as H,a0 as W,a1 as Q,a2 as K,a3 as G,u as q,S as Y,a4 as J,j as X,k as ee,a as te,a5 as oe,d as ne,i as ae,a6 as le,C as ie,a7 as se,a8 as re,b as ce}from"./index.styled-82281f59.js";import{u as de}from"./useTranslations-d8b9e866.js";import me from"innertext";import{t as ue}from"./theme-afaf0d05.js";import{T as pe,a as ve,A as ge,C as he,b as ye,I as Ce}from"./index-36c96e53.js";import{B as Ee,I as ke}from"./index-7af053cd.js";import"@mantine/dates";import{d as we}from"./index-63cb82b7.js";import"./Subot-3e26682c.js";import{CommonGAssets as fe}from"./gAssets.js";import"dayjs";import{o as be,t as Ne,k as Ie}from"./screenSizeContext-fc852596.js";import"styled-components";import"./isProduction-13f6d491.js";import"@mantine/hooks";import{b as xe,U as Pe,A as Te,B as Me,a7 as je,H as _e,z as Le,a8 as Se,a9 as ze,aa as Be,V as Ae,Z as Oe,Y as Fe,ab as Re,_ as De}from"./index.styles-309a8680.js";import{B as Ue,D as Ve}from"./index-6db1bd1f.js";import{g as $e,a as Ze,U as He,h as We}from"./index-7532b0c5.js";import{I as Qe}from"./index-dce8c446.js";import Ke from"lodash/debounce";import Ge from"react-contenteditable";import"./useCategory-28c9abc6.js";import{B as qe}from"./index-992c1d4f.js";import*as Ye from"react-dom";import"./constants-cf8d2b27.js";const Je=({title:t,url:s,image:r,logo:d,className:m,style:u,noRefetch:v})=>{const{data:{locale:g,env:{isMarryBaby:h}}}=n(xe),[y,C]=a(!1),E=c(),k=l(v);k.current=v;const[w,f]=a(null);i((()=>{e(void 0,void 0,void 0,(function*(){if(!k.current){if(!s)return f(null);f((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),Pe(Te(Me.FETCH_PREVIEW,{_locale:g}),"POST",{data:{link:s},headers:{"Content-Type":"application/json"}}).then((e=>{var t,o,n;C(!1),f({title:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.title,url:s,image:(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.image)||(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)})})).catch((()=>{f(null)}))}}))}),[s]);const b=(null==w?void 0:w.image)||r,N=(null==w?void 0:w.title)||t,I=(null==w?void 0:w.logo)||d,x=(null==w?void 0:w.url)||s,P=x.replace("http://","").replace("https://","").split(/[/?#]/)[0],T=l(!1);return o.createElement(p,{"data-is-marrybaby":h,className:`${m} no-replace-click`,style:u,color:E.colors[E.primaryColor][0]},o.createElement("a",{href:x,target:"_blank",rel:"noreferrer"},b&&o.createElement("div",{className:"link-image-wrapper"},!h&&o.createElement("img",{className:"link-image-blur",src:b,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=je)},loading:"lazy"}),o.createElement("img",{className:"link-image",src:b,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=je)},loading:"lazy"})),o.createElement("div",{className:"link-info-container"},o.createElement(pe,{size:"n1"},h&&I&&!y&&o.createElement("img",{className:"link-logo",src:I,onError:()=>C(!0),loading:"lazy"}),P),o.createElement(_e,{tag:"h6"},N))))};const Xe=({onClick:e,color:t,className:a,style:l})=>{const{data:{env:{isMarryBaby:i}}}=n(xe),{t:s}=de();return o.createElement(v,{label:o.createElement(o.Fragment,null,i&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M3.5 19.9999L7.87 15.6299' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.95634 11.294C4.56534 11.685 4.56534 12.318 4.95634 12.708L7.87434 15.626L10.7923 18.544C11.1833 18.935 11.8163 18.935 12.2063 18.544L13.3813 17.369C13.5693 17.181 13.6743 16.927 13.6743 16.662V12.726L16.5743 9.82597L18.8833 9.94897C19.1663 9.96397 19.4433 9.85797 19.6433 9.65797L20.2173 9.08397C20.6083 8.69297 20.6083 8.05997 20.2173 7.66997L15.8313 3.28397C15.4403 2.89297 14.8073 2.89297 14.4173 3.28397L13.8433 3.85797C13.6423 4.05897 13.5363 4.33497 13.5523 4.61797L13.6753 6.92697L10.7753 9.82697H6.83834C6.57334 9.82697 6.31834 9.93197 6.13134 10.12L4.95634 11.294V11.294Z' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath d='M16.5699 9.83018L13.6699 6.93018' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3c/svg%3e",loading:"lazy"})," ",s("label.pinnedPost")),rightLabel:!i&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='7.18605' y1='7.68219' x2='3.68219' y2='13.8139' stroke='%23FEA21E' stroke-linecap='round'/%3e%3cpath d='M3.24591 7.78426C3.21275 7.84168 3.20376 7.90993 3.22092 7.97398C3.23808 8.03803 3.27998 8.09264 3.3374 8.12579L8.78429 11.2706C8.90385 11.3396 9.05674 11.2986 9.12578 11.1791C9.71191 10.1641 9.71348 8.97262 9.23682 7.99339L10.8583 5.18521C11.5115 5.00603 12.0982 4.57973 12.4638 3.94629C12.5328 3.82672 12.4919 3.67383 12.3723 3.6048L8.18237 1.18584C8.12494 1.15268 8.0567 1.1437 7.99265 1.16086C7.92861 1.17803 7.874 1.21993 7.84086 1.27736C7.47521 1.91077 7.39934 2.63194 7.57065 3.28723L5.94919 6.09545C4.86323 6.1723 3.83201 6.76934 3.24591 7.78426Z' fill='%23FEA21E' stroke='%23FEA21E' stroke-width='0.5' stroke-linejoin='round'/%3e%3c/svg%3e",loading:"lazy"}),onClick:e,color:"white",className:`label-pinned ${a}`,style:l})},et=e=>({message:e("notification.failure"),type:"danger"});var tt="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%23FE921D'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const ot=(e,t)=>{const[o,n]=a(e||[]);return{onSelectImages:a=>{const l=a.target.files;if(l)if(t&&e){t((e||o).concat(Array.from(l)))}else n((o=>{const n=e||o;return t&&t(n.concat(Array.from(l))),n.concat(Array.from(l))}))},onRemoveImage:o=>{if(t&&e){const n=e;n.splice(o,1),t(n.slice())}else n((n=>{const a=e||n;return a.splice(o,1),t&&t(a.slice()),a.slice()}))},onRemoveAllImages:()=>{t?t([]):n([])},imageSrcs:s((()=>(e||o).map((e=>"string"==typeof e?e:URL.createObjectURL(e)))),[e,o]),imageFiles:e||o}};var nt="data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 22.9844C17.5228 22.9844 22 18.5072 22 12.9844C22 7.46153 17.5228 2.98438 12 2.98438C6.47715 2.98438 2 7.46153 2 12.9844C2 18.5072 6.47715 22.9844 12 22.9844Z' fill='%23262626'/%3e%3cpath d='M14.8281 10.1562L9.17127 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.17188 10.1562L14.8287 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const at=({className:e,style:t,bannedWords:n=[],value:s,onChange:r,onPreviewUrlChange:c,onInvalidUrlsChange:d,onImageFilesChange:m,imageFiles:u,isReplying:p})=>{const{t:v}=de(),[g,h]=a(null),y=l(null),{onSelectImages:C,onRemoveImage:f,imageSrcs:b}=ot(u,m);return i((()=>{c&&((null==g?void 0:g.url)?c({title:g.title||"",url:g.url||"",image:g.image||"",description:g.description||""}):c(null))}),[g]),o.createElement(E,{className:e,style:t},o.createElement(pe,{size:"p4",className:"description-label"},v("createPost.popup.description")),o.createElement("div",{className:"textarea-control"},o.createElement("div",{className:"textarea-wrapper"},o.createElement(k,{html:s||"",onChange:r,bannedWords:n,onImagePickerClick:()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:h,onInvalidUrlsChange:d,isReplying:p}))),o.createElement(pe,{size:"p4",className:"count-string"},v("character"),": ",me(s||"").length),(!b||0===b.length)&&g&&o.createElement("div",{className:"link-preview-wrapper"},g.isFetching?o.createElement(w,null):o.createElement(o.Fragment,null,o.createElement(Je,{title:g.title,url:g.url||"#",image:g.image,noRefetch:!0}),o.createElement("img",{src:nt,className:"icon-close",onClick:()=>h(null),loading:"lazy"}))),o.createElement("input",{ref:y,type:"file",accept:"image/png, image/gif, image/jpeg",multiple:!0,style:{display:"none"},onChange:C}),b.length>Se?o.createElement("div",{className:"input-notification"},o.createElement("img",{src:tt,loading:"lazy"}),o.createElement(pe,{size:"p4",color:ue.colors.alertWarning},v("createPost.popup.warningImage"))):null,b.length>0&&o.createElement("div",{className:"image-gallery"},b.map(((e,t)=>o.createElement("div",{key:t,className:"image-item"},o.createElement("img",{src:e,loading:"lazy"}),o.createElement("img",{className:"close-btn",src:nt,onClick:()=>f(t),loading:"lazy"}))))))},lt=(e,t)=>{if(!t)return e;const{limit:o,bannedWords:n=[]}=t,a="number"==typeof o&&o>=0?e.substring(0,o):e;return f(a,n)},it=({className:e,style:t,bannedWords:n=[],value:s,onChange:c})=>{var d;const{t:m}=de(),[u,p]=a(""),v=l(null);i((()=>{if(v.current){const e=e=>{var t;e.preventDefault();const o=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/plain");document.execCommand("insertHTML",!1,o)},t=v.current;return t.addEventListener("paste",e,{passive:!0}),()=>t.removeEventListener("paste",e)}}),[v]);const g=(null==n?void 0:n.join(","))||"";i((()=>{var e;if(g){const t=null===(e=v.current)||void 0===e?void 0:e.innerText;if(t){const e=f(t,n);e!==t&&(c&&c(e),p(e))}}}),[g]);const h=r(Ke((()=>{if(v.current){const e=lt(v.current.innerText,{limit:120,bannedWords:n});c&&c(e),p(e)}}),300),[]);return i((()=>{setTimeout((()=>{var e;null===(e=v.current)||void 0===e||e.focus()}),500)}),[]),o.createElement(b,{className:e,style:t},o.createElement(Qe,{name:"title",value:s||u,size:"md",label:m("createPost.title"),CustomInput:o.createElement(Ge,{innerRef:v,html:s||u,onChange:()=>{if(v.current&&v.current.innerText!==(s||u)){const e=lt(v.current.innerText,{bannedWords:n});c&&c(e),p(e),h()}},className:"title-input"})}),o.createElement(pe,{size:"p4",className:"count-string"},m("createPost.popup.wordCount",{count:(null===(d=v.current)||void 0===d?void 0:d.innerText.length)||0,max:120})))},st=({className:t,style:r,topics:c,communityId:d,onChange:m,isLoading:u,disabled:p,forceTopics:v,selectedTopics:g,noFetch:h,dataEventCategory:y,dataEventAction:C,dataEventLabel:E})=>{const{data:{locale:k,env:{isMarryBaby:f}}}=n(xe),[b,I]=a(c?[...c]:[]),[x,P]=a(g?[...g]:[]),[T,M]=a(!1),j=l(c);j.current=c,i((()=>{var t;!d||h||(null===(t=j.current)||void 0===t?void 0:t.length)||(I([]),M(!0),e(void 0,void 0,void 0,(function*(){var e;try{const t=yield Pe(Te(Me.TOPIC.LIST,{communityId:d,_locale:k}),"GET"),o=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.topics;Array.isArray(o)&&I((()=>(null==o?void 0:o.map($e).sort(((e,t)=>(e.order||0)-(t.order||0))))||[]))}catch(e){console.log(e),M(!1)}M(!1)})))}),[d,h]);const _=null==c?void 0:c.map((e=>e.id)).join("-"),L=null==b?void 0:b.map((e=>e.id)).join("-"),S=null==v?void 0:v.map((e=>e.id)).join("-");i((()=>{c&&void 0!==_&&_!==L&&I(c)}),[c,_,L]);const z=s((()=>b.filter((e=>!(null==v?void 0:v.some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)))))),[L,S]);return o.createElement(N,{"data-is-marrybaby":f,className:t,style:r},v.map((e=>o.createElement(rt,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:!0,selected:!0,dataEventAction:C,dataEventCategory:y,dataEventLabel:E}))),z.map((e=>o.createElement(rt,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:p,selected:(g||x).some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)),onClick:()=>{const t=g||x,o=t.findIndex((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId));-1!==o?t.splice(o,1):t.push(e),m&&g?m(t.slice()):(m&&m(t.slice()),P(t.slice()))},dataEventAction:C,dataEventCategory:y,dataEventLabel:E}))),(u||T)&&o.createElement(w,{className:"topic-spinner"}))},rt=e=>{var{topic:n,disabled:a,selected:l,onClick:i}=e,s=t(e,["topic","disabled","selected","onClick"]);return o.createElement("div",Object.assign({className:"tag-item"+(l?" --active":""),"data-disabled":a,onClick:a?void 0:i},s),n.name)},ct=({className:t,style:l,onPostCreatedEdited:s,onClose:r,communities:c=[],forceSelectCommunity:m,forceSelectTopics:u,articleId:p,optionalTopic:v,editPostData:E,defaultCommunity:k,defaultTopics:w,noFetchTopic:f,hideTopicList:b,selectAskDoctor:N,showAskDoctorOptions:_,currentPageUrl:L})=>{const S=!!(null==E?void 0:E.id),{data:{locale:z,env:{isMarryBaby:B}},action:{pushNotifications:A,sanitizeFunction:O}}=n(xe),{t:F}=de(),[R,D]=a(!1),[U,V]=a(N),[$,Z]=a(!1),[H,W]=a(!1),[Q,K]=a(!1),[G,q]=a(""),[Y,J]=a(""),[X,ee]=a(m?{label:m.name,value:`${m.id||""}-${m.mappedCategoryId||""}`}:{label:F("community.choose"),value:""}),[te,oe]=a([...u]||[]),[ne,ae]=a([]),[le,ie]=a([]),se=m||c.find((e=>`${e.id||""}-${e.mappedCategoryId||""}`===X.value)),re=m?[m]:c.filter((e=>e.isActive)).sort(((e,t)=>e.name>t.name?1:e.name<t.name?-1:0)),[ce,he]=a(null),[ye,Ce]=a([]),ke=G&&!H&&me(Y)&&(v||!v&&te.length>0)&&se&&(!ne||ne.length<=Se)&&!(null==ye?void 0:ye.length)&&!Q;i((()=>{if(E){const e=E;q(e.title||""),J(I(x(e.description||"","edit"),e.mentions)),ee({label:e.community.name,value:`${e.community.id||""}-${e.community.mappedCategoryId||""}`}),oe(e.topics||[]),ae(e.photos||[]),D(!!e.isAnonymous||!1),V(!!e.isAskDoctor||!1)}else k&&ee({label:k.name,value:`${k.id||""}-${k.mappedCategoryId||""}`}),w&&oe(w)}),[]),i((()=>{W(""!==G&&!/[a-zA-Z]/.test(G))}),[G]);const we=()=>e(void 0,void 0,void 0,(function*(){var t,o,n,a,l,i,c,d,m;if(_&&void 0===U)return Z(!0),!1;const u=yield(({title:t,description:o,communityId:n,imageFiles:a,previewUrl:l,topicIds:i,locale:s,sanitizeFunction:r,categoryCommunityId:c,categoryTopicIds:d,introUrl:m,bannerUrl:u,scheduleTime:p,isAnonymous:v,isAskDoctor:E})=>e(void 0,void 0,void 0,(function*(){const e=new FormData,k=g(o),w=g(t),f=h(k);if(e.append("title",w),e.append("description",y(k,r)),c?e.append("category_community",String(c)):n&&e.append("community_id",String(n)),e.append("is_anonymous",v?"1":"0"),e.append("is_question",E?"1":"0"),(null==l?void 0:l.title)&&e.append("preview_title",l.title),(null==l?void 0:l.description)&&e.append("preview_description",l.description),(null==l?void 0:l.url)&&e.append("preview_link",be(l.url)),(null==l?void 0:l.image)&&e.append("preview_image",be(l.image)),null==i||i.forEach((t=>{e.append("topics[]",String(t||""))})),null==d||d.forEach((t=>{e.append("category_topics[]",String(t||""))})),null==a?void 0:a.length){const t=yield Promise.all(a.map(((e,t)=>new Promise((o=>{setTimeout((()=>{o(C(e,s))}),2e3*t)})))));null==t||t.filter(Boolean).slice(0,Se).forEach(((t,o)=>{e.append(`images[${o}]`,t)}))}else e.append("images","");return null==f||f.forEach((t=>{e.append("mention_ids[]",t)})),e.append("intro_url",m||""),e.append("banner",u||""),p&&(e.append("post_type","scheduled"),e.append("schedule_datetime",p)),e})))({title:G,description:Y,communityId:String((null==se?void 0:se.id)||""),imageFiles:ne,previewUrl:ce,topicIds:null==te?void 0:te.map((e=>String(e.id||""))).filter(Boolean),locale:z,sanitizeFunction:O,categoryCommunityId:String((null==se?void 0:se.mappedCategoryId)||""),categoryTopicIds:null==te?void 0:te.map((e=>String(e.mappedCategoryId||""))).filter(Boolean),isAnonymous:R?1:0,isAskDoctor:U?1:0});let v;p&&u.append("article_id",p),S?(null==E?void 0:E.id)&&(v=yield(({id:t,locale:o,formData:n})=>e(void 0,void 0,void 0,(function*(){return yield Le(Te(Me.POST.UPDATE,{id:t,_locale:o}),"POST",{data:n})})))({id:E.id,formData:u,locale:z})):v=yield(({locale:t,formData:o,isArticleComment:n})=>e(void 0,void 0,void 0,(function*(){return yield Le(Te(n?Me.POST.CREATE_ARTICLE_COMMENT:Me.POST.CREATE,{_locale:t}),"POST",{data:o})})))({formData:u,locale:z,isArticleComment:!(null==se?void 0:se.id)&&!!(null==se?void 0:se.mappedCategoryId)});const k=null==v?void 0:v.data;(null==k?void 0:k.id)&&!(null===(o=null===(t=null==v?void 0:v.messages)||void 0===t?void 0:t.moderation)||void 0===o?void 0:o.type)?(A({message:F("createPost.popup.success"),type:"success"}),(e=>{s&&s(Ze(e),S),r&&r()})(k)):"banned"===(null===(a=null===(n=null==v?void 0:v.messages)||void 0===n?void 0:n.moderation)||void 0===a?void 0:a.type)?(A({title:F("notification.post.blocked.title"),message:F("notification.post.blocked.message"),type:"danger"}),v.messages.moderation.words&&ie(v.messages.moderation.words)):"suspect"===(null===(i=null===(l=null==v?void 0:v.messages)||void 0===l?void 0:l.moderation)||void 0===i?void 0:i.type)?(A({title:F("notification.post.suspect.title"),message:F("notification.post.suspect.message"),type:"warning"}),r&&r()):(null===(d=null===(c=null==v?void 0:v.messages)||void 0===c?void 0:c.find)||void 0===d?void 0:d.call(c,(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(A({message:F("notification.suspend.message"),type:"danger"}),r&&r()):A({message:(null===(m=null==v?void 0:v.messages)||void 0===m?void 0:m[0])||F("notification.failure"),type:"danger"})}));return o.createElement(P,{className:t,style:l},o.createElement("div",{className:"input-group-container"},o.createElement(it,{className:"input-group",bannedWords:le,value:G,onChange:q}),H&&o.createElement(T,null,o.createElement(ve,{isSolid:!0,color:ue.colors.red700,size:14}),o.createElement(pe,{size:"p3",as:"span",color:ue.colors.red700},F("createPost.popup.specialCharErr"))),o.createElement(at,{className:"input-group",bannedWords:le,value:Y,onChange:J,onPreviewUrlChange:he,onInvalidUrlsChange:Ce,onImageFilesChange:ae,imageFiles:ne}),_&&o.createElement(M,{"data-is-marry-baby":B},o.createElement("div",{className:"switch-label"},o.createElement(ge,{isMarryBaby:B,size:B?32:24,color:ue.colors.primaryBase,className:"label-icon"}),o.createElement("span",{className:"label-txt"},F("createPost.askDoctor"))),o.createElement(Ue,{value:U,choices:[{label:F("createPost.askDoctorChoice.yes"),value:!0,dataEventCategory:"Together",dataEventAction:"Write Post Click - Ask Doctor",dataEventLabel:L},{label:F("createPost.askDoctorChoice.no"),value:!1}],onChange:e=>{"boolean"==typeof e&&(Z(!1),V(e))}})),$&&o.createElement(T,null,o.createElement(ve,{isSolid:!0,color:ue.colors.red700,size:14}),o.createElement(pe,{size:"p3",as:"span",color:ue.colors.red700},F("createPost.message.askDoctorRequire"))),o.createElement("div",{className:"input-group"},o.createElement(pe,{size:"p4",className:"input-group-label"},F("admin.community")),o.createElement(j,{options:(null==re?void 0:re.map((e=>({label:e.name,value:`${e.id||""}-${e.mappedCategoryId||""}`}))))||[],id:"community-picker",placeholder:F("community.choose"),value:X,dropdownLabelTrackingAttributes:{"data-event-category":"Together","data-event-action":"Write Post Click - Choose Community/Topic","data-event-label":L},onChange:e=>{ee({label:e.label,value:String(e.value)}),oe([])},disabled:!!m}),o.createElement(pe,{size:"sm",className:"warning",color:ue.colors.gray400},"* ",F("commentPopup.warning.newPost"))),!b&&o.createElement("div",{className:"input-group"},o.createElement(pe,{size:"p4",className:"input-group-label"},F("tab.topic")),o.createElement("div",{className:"input-notification"},o.createElement("img",{src:se?"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%232D87F3'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":tt,loading:"lazy"}),o.createElement(pe,{size:"base",color:ue.colors.gray500},F(se?"createPost.popup.primary":"createPost.popup.warning"))),se&&o.createElement(st,{className:"tag-list",communityId:se.id,forceTopics:u,onChange:oe,selectedTopics:te,noFetch:f,dataEventCategory:"Together",dataEventAction:"Write Post Click - Choose Community/Topic",dataEventLabel:L}))),o.createElement("div",{className:"form-action"},o.createElement("div",{className:"input-group"},o.createElement(d,{className:"swich-input-group",labelPosition:"left",name:"PostAnonymous",checked:R,color:B?"pink":void 0,"data-event-category":"Together","data-event-action":"Write Post Click - Incognito","data-event-label":L,label:o.createElement("div",{className:"switch-label"},o.createElement("img",{className:"label-icon",src:fe.getAssetPath("anomyous-avatar.svg"),alt:"anomyous avatar",style:{marginRight:"10px",width:"24px"},loading:"lazy"}),o.createElement("span",{className:"label-txt"},F("createPost.postAnonymous"))),value:"Post Anonymous",onChange:e=>D(e.currentTarget.checked),styles:{body:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},label:{display:"flex",alignItems:"center"}}})),o.createElement("div",{className:"input-group"},o.createElement(Ee,{className:"submit-btn pointer-event-child-none",size:"lg","data-event-category":"Ask Doctor","data-event-action":"Submit Question","data-event-label":window.location.href,onClick:()=>e(void 0,void 0,void 0,(function*(){if(ke&&!Q){K(!0);try{yield we()}catch(e){console.error(e),A(et(F))}K(!1)}})),disabled:!ke,loading:Q},F("createPost.popup.submit")))))},dt=({className:e,isMarryBaby:t,style:l,title:s,description:r,acceptText:c,cancelText:d,onAccept:m,onCancel:u,thumbnail:p,isThumbnailIcon:v,onClose:g,acceptBtnTracking:h,acceptBtnProps:y,cancelBtnProps:C})=>{const{data:{env:{isMarryBaby:E}}}=n(xe),k="boolean"==typeof t?t:E,[w,f]=a(!1);return i((()=>(Ne(!0),setTimeout((()=>f(!0)),0),()=>Ne(!1))),[]),"undefined"==typeof window?null:Ye.createPortal(o.createElement(_,{"data-is-marrybaby":k,className:e,style:l,"data-open":w},o.createElement(L,{className:"popup-frame",isOpen:w,onClose:g},o.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},o.createElement("div",{className:"confirm-content"},p&&o.createElement("div",{className:"thumbnail-container "+(v?"is-icon":"")},o.createElement("img",{className:"thumbnail",src:p,loading:"lazy"})),o.createElement(_e,{className:"title",tag:"h2"},s),o.createElement(pe,{className:"desc",size:"lg"},r),o.createElement("div",{className:"btn-group"},o.createElement(qe,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==m||m(),null==g||g()}},y,h),c),o.createElement(qe,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",onClick:()=>{null==u||u(),null==g||g()}},C),d)))),k&&p&&o.createElement("div",{className:"thumbnail-container is-mobile "+(v?"is-icon":"")},o.createElement("img",{className:"thumbnail",src:p,loading:"lazy"})))),Ie())};const mt=({isReply:t,className:s,onClose:r,replyToName:c,style:d,replyingId:m,replyingUser:u,onPostSuccess:p,post:v,isMarryBaby:g})=>{const{action:{pushNotifications:E,sanitizeFunction:f},data:{userInfo:b,locale:N,env:{isMarryBaby:I}}}=n(xe),x="boolean"==typeof g?g:I,{t:P}=de(),{onSelectImages:T,onRemoveImage:M,imageSrcs:j,onRemoveAllImages:_,imageFiles:L}=ot(),[B,A]=a(""),{trigger:O}=n(S),[F,R]=a(!1),D=l(null),U=l(null),V=l(null),[$,Z]=a([]),[H,W]=a([]),[Q,K]=a(null);return i((()=>{var e;null===(e=V.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout((()=>{var e;null===(e=U.current)||void 0===e||e.focus()}),400)}),[O]),o.createElement(z,{"data-is-reply":t,className:s,style:d},t&&o.createElement("div",{className:"reply-to-container"},o.createElement(pe,{size:"p4"},o.createElement("span",{dangerouslySetInnerHTML:{__html:P("inputComment.replyTo",{name:`<span style="color: #2D87F3; cursor: pointer">@${c||""}</span>`})}})),o.createElement("img",{src:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8.00016' cy='8.50004' r='6.66667' fill='white' stroke='%23404040'/%3e%3cpath d='M10 6.5L6 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6.5L10 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:()=>r&&r(),loading:"lazy"})),o.createElement("div",{className:"input-container",ref:V},o.createElement(He,{className:"avatar-wrapper "+(t?"avatar-wrapper-reply":""),avatar:(null==b?void 0:b.id)?b.avatar:ze,username:(null==b?void 0:b.name)||(null==b?void 0:b.username)}),o.createElement("input",{ref:D,onChange:T,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),o.createElement(Qe,{value:B,name:"input",size:"md",className:"input-wrapper",displayIcon:o.createElement("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.7543 4.85352H4.49227C4.01776 4.85352 3.56268 5.04201 3.22715 5.37754C2.89162 5.71307 2.70313 6.16815 2.70312 6.64266V19.1667C2.70313 19.6412 2.89162 20.0963 3.22715 20.4318C3.56268 20.7673 4.01776 20.9558 4.49227 20.9558H17.0163C17.4908 20.9558 17.9459 20.7673 18.2814 20.4318C18.6169 20.0963 18.8054 19.6412 18.8054 19.1667V12.9047' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M17.4633 3.51187C17.8192 3.15599 18.3019 2.95605 18.8052 2.95605C19.3085 2.95605 19.7912 3.15599 20.147 3.51187C20.5029 3.86775 20.7029 4.35044 20.7029 4.85373C20.7029 5.35702 20.5029 5.83971 20.147 6.19559L11.6486 14.694L8.07031 15.5886L8.96489 12.0103L17.4633 3.51187Z' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",loading:"lazy"}),CustomInput:o.createElement("div",{className:"as-input"},o.createElement(k,{className:"textarea",html:B,onChange:A,onImagePickerClick:()=>{var e;return null===(e=D.current)||void 0===e?void 0:e.click()},bannedWords:H,onPreviewUrlChange:K,onInvalidUrlsChange:Z,setEditorRef:e=>U.current=e,isReplying:t}))}),o.createElement(qe,{theme:x?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>e(void 0,void 0,void 0,(function*(){var o,n,a,l,i,s,c,d,g;if((null==v?void 0:v.id)&&!F){R(!0);try{const k=e=>{A(""),_(),r&&r();const t=We(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),p&&p(t)},w=yield(({postId:t,message:o,photos:n,link:a,locale:l,sanitizeFunction:i,replyingUserId:s,replyingUserName:r,replyingId:c})=>e(void 0,void 0,void 0,(function*(){const e=new FormData;let d=y(o.replace(/(\ )+/g," "),i);const m=h(d);return n&&n.length>0&&(yield Promise.all(null==n?void 0:n.map((e=>C(e,l))))).filter(Boolean).slice(0,Se).forEach((t=>{e.append("images[]",t)})),a&&e.append("link",a),null==m||m.forEach((t=>{e.append("mention_ids[]",t)})),e.append("post_id",t),c&&e.append("parent_id",c),s&&(m.unshift(s),d=`[mention+id="${s}"+name="${(r||"").replace('"',"'")}"]${d}`,e.append("parent_user_id",String(s))),e.append("content",d),e.append("content",d),e})))(Object.assign({message:B,photos:L,postId:String(v.id),link:null==Q?void 0:Q.url,sanitizeFunction:f,locale:N},t&&m?{replyingUserId:String((null==u?void 0:u.id)||(null===(o=null==v?void 0:v.author)||void 0===o?void 0:o.id)||""),replyingId:m,replyingUserName:(null==u?void 0:u.name)||(null==u?void 0:u.username)||""}:{})),b=yield t&&m?((t,o)=>e(void 0,void 0,void 0,(function*(){return Le(Te(Me.COMMENT.REPLY,{_locale:o}),"POST",{data:t})})))(w,N):((t,o)=>e(void 0,void 0,void 0,(function*(){return Le(Te(Me.COMMENT.CREATE,{_locale:o}),"POST",{data:t})})))(w,N),I=null==b?void 0:b.data;(null==I?void 0:I.id)&&!(null===(a=null===(n=null==b?void 0:b.messages)||void 0===n?void 0:n.moderation)||void 0===a?void 0:a.type)?k(b):"banned"===(null===(i=null===(l=null==b?void 0:b.messages)||void 0===l?void 0:l.moderation)||void 0===i?void 0:i.type)?(E({title:P("notification.comment.blocked.title"),message:P("notification.comment.blocked.message"),type:"danger"}),b.messages.moderation.words&&W(b.messages.moderation.words)):"suspect"===(null===(c=null===(s=null==b?void 0:b.messages)||void 0===s?void 0:s.moderation)||void 0===c?void 0:c.type)?(E({title:P("notification.comment.suspect.title"),message:P("notification.comment.suspect.message"),type:"warning"}),A(""),_(),r&&r()):(null===(d=null==b?void 0:b.messages)||void 0===d?void 0:d.find((e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(E({message:P("notification.suspend.message"),type:"warning"}),A(""),_(),r&&r()):E({title:"",message:(null===(g=null==b?void 0:b.messages)||void 0===g?void 0:g[0])||P("notification.comment.somethingWrong"),type:"danger"})}catch(e){E({title:"",message:P("notification.comment.somethingWrong"),type:"danger"})}R(!1)}})),isLoading:F,isDisabled:!!(null==$?void 0:$.length)||F||!B||(null==B?void 0:B.length)<2||!B.trim()},o.createElement("img",{src:"data:image/svg+xml,%3csvg width='20' height='21' viewBox='0 0 20 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.5 9.73438L3.75 13.4844L7.5 17.2344' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M16.25 4.73438L16.25 10.3026C16.25 11.1464 15.9208 11.9557 15.3347 12.5524C14.7487 13.1491 13.9538 13.4844 13.125 13.4844L3.75 13.4844' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-enter",loading:"lazy"}))),(null==$?void 0:$.length)?o.createElement("div",{className:"error-text"},P("notification.limitUrlDomain")):null,(!j||0===j.length)&&Q&&o.createElement("div",{className:"link-preview-wrapper"},Q.isFetching?o.createElement(w,null):o.createElement(o.Fragment,null,o.createElement(Je,{title:Q.title,url:Q.url||"#",image:Q.image,noRefetch:!0}),o.createElement("img",{src:nt,className:"icon-close",onClick:()=>K(null),loading:"lazy"}))),j&&j.length>0&&o.createElement("div",{className:"preview-images-container"},j.map(((e,t)=>o.createElement("div",{key:t,className:"image-src-wrapper"},o.createElement("img",{className:"preview-image",src:e,loading:"lazy"}),o.createElement("img",{src:nt,className:"icon-close-circle",onClick:()=>M(t),loading:"lazy"}))))))};var ut="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 5V8' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11H8.00708' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const pt=({className:t,style:l,reason:i,reasonText:s,onClose:r,postId:c})=>{const{data:{locale:d,env:{isMarryBaby:m}},action:{pushNotifications:u}}=n(xe),{t:p}=de(),[v,g]=a(!1);return o.createElement(B,{"data-is-marrybaby":m,className:t,style:l},o.createElement("ul",{className:"report-list"},o.createElement("li",{className:"report-item"},o.createElement("img",{src:ut,loading:"lazy"}),o.createElement(pe,{className:"__label",color:ue.colors.gray800,size:"p4"},s))),o.createElement(qe,{theme:m?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:v,onClick:()=>e(void 0,void 0,void 0,(function*(){if(c&&!v){g(!0);try{const e=yield(({id:e,reason:t,locale:o})=>{const n=new FormData;return n.append("reason",t),Le(Te(Me.POST.REPORT,{_locale:o,id:e}),"POST",{data:n})})({id:c,reason:i,locale:d});1===(null==e?void 0:e.status)&&(u({message:"Post reported",type:"success"}),r&&r())}catch(e){}g(!1)}}))},p("submit")))};const vt=({className:e,style:t,authorName:n,images:l,onClose:s,onOpenSingleView:r,alt:c})=>{const{t:d}=de(),[u,p]=a(!1);return i((()=>{setTimeout((()=>{p(!0)}),0)}),[]),o.createElement(m,null,o.createElement(A,{className:e,style:t,"data-open":u},o.createElement("div",{className:"top-bar"},o.createElement("img",{className:"icon-arrow-left",src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.0508 18.0607L4.00078 12.0367L10.0508 6.01172' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.00195 12.0352L19.002 12.0352' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",onClick:s,alt:"go back",loading:"lazy"}),o.createElement(pe,{size:"p2",weight:"bold",style:{textAlign:"center"}},d("previewPhotos.title",{name:n}))),o.createElement("div",{className:"container"},l.map(((e,t)=>o.createElement("img",{className:"img-preview",key:t,src:e,onClick:()=>null==r?void 0:r(t),alt:c,loading:"lazy"}))))),",")};var gt="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12.8125L10 8.8125L6 4.8125' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const ht=({initialViewIndex:e,images:t,onClose:n,alt:l})=>{const[s,r]=a(e),[c,d]=a(!1);i((()=>{setTimeout((()=>{d(!0)}),0)}),[]);const u=null==t?void 0:t[s],p=0===s,v=!(null==t?void 0:t.length)||s===(null==t?void 0:t.length)-1;return o.createElement(m,null,o.createElement(O,{"data-open":c&&!!u},o.createElement(F,null,o.createElement("img",{src:R,className:"icon-close",onClick:n,alt:"close",loading:"lazy"})),u&&s>=0&&o.createElement(o.Fragment,null,o.createElement(D,null,o.createElement("img",{className:"img-preview",src:u,alt:l,loading:"lazy"}),o.createElement(U,{"data-disabled":p,onClick:()=>!p&&r(s-1)},o.createElement(V,null,o.createElement("img",{src:gt,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":p,loading:"lazy"}))),o.createElement(U,{"data-right":!0,"data-disabled":v,onClick:()=>!v&&r(s+1)},o.createElement(V,null,o.createElement("img",{src:gt,alt:"right arrow","data-disabled":v,loading:"lazy"})))))))},yt=({image:e,showIcon:t=!0})=>{const[n,l]=a(!0);return o.createElement($,{"data-is-blurred":n,onClick:e=>n&&e.stopPropagation()},o.createElement("img",{loading:"lazy",className:"img-preview",src:e}),o.createElement(Z,{onClick:e=>{e.stopPropagation(),l(!n)}},t&&o.createElement(H,null,n?o.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.71 2.5399C1.32 2.1499 1.32 1.5199 1.71 1.1299C2.1 0.739902 2.74 0.739902 3.13 1.1299L19.44 17.4599C19.83 17.8499 19.83 18.4799 19.44 18.8699C19.05 19.2599 18.42 19.2599 18.03 18.8699L15.31 16.1499C13.97 16.6699 12.52 16.9699 11 16.9699C6 16.9699 1.73 13.8599 0 9.4699C0.77 7.4999 2.06 5.7999 3.68 4.5099L1.71 2.5399ZM16 9.4699C16 6.7099 13.76 4.4699 11 4.4699C10.49 4.4699 10 4.5699 9.53 4.7099L7.36 2.5399C8.51 2.1699 9.73 1.9699 11 1.9699C16 1.9699 20.27 5.0799 22 9.4599C21.31 11.2199 20.21 12.7599 18.82 13.9899L15.76 10.9299C15.9 10.4699 16 9.9799 16 9.4699ZM11 14.4699C8.24 14.4699 6 12.2299 6 9.4699C6 8.6999 6.18 7.9699 6.49 7.3299L8.06 8.8999C8.03 9.0799 8 9.2699 8 9.4699C8 11.1299 9.34 12.4699 11 12.4699C11.2 12.4699 11.38 12.4399 11.57 12.3999L13.14 13.9699C12.49 14.2899 11.77 14.4699 11 14.4699ZM13.97 9.1399C13.82 7.7399 12.72 6.6499 11.33 6.4999L13.97 9.1399Z",fill:"white"})):o.createElement("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none"},o.createElement("path",{d:"M11.9999 0C5.14188 0 1.88558 5.87864 1.09558 7.55664C0.963582 7.83664 0.963582 8.16141 1.09558 8.44141C1.88558 10.1204 5.14188 16 11.9999 16C18.8339 16 22.0924 10.1629 22.8964 8.46094C23.0344 8.16794 23.0344 7.83206 22.8964 7.53906C22.0924 5.83706 18.8339 0 11.9999 0ZM11.9999 3C14.7609 3 16.9999 5.239 16.9999 8C16.9999 10.761 14.7609 13 11.9999 13C9.23888 13 6.99988 10.761 6.99988 8C6.99988 5.239 9.23888 3 11.9999 3ZM11.9999 5C11.2042 5 10.4412 5.31607 9.87856 5.87868C9.31595 6.44129 8.99988 7.20435 8.99988 8C8.99988 8.79565 9.31595 9.55871 9.87856 10.1213C10.4412 10.6839 11.2042 11 11.9999 11C12.7955 11 13.5586 10.6839 14.1212 10.1213C14.6838 9.55871 14.9999 8.79565 14.9999 8C14.9999 7.20435 14.6838 6.44129 14.1212 5.87868C13.5586 5.31607 12.7955 5 11.9999 5Z",fill:"#2D87F3"})))))},Ct=({className:e,images:t=[],style:s,authorName:r,isSensitive:c=!1,alt:d})=>{const{data:{env:{isMarryBaby:m}}}=n(xe),{t:u}=de(),p="+ "+((t.length||0)-4),[v,g]=a(!1),[h,y]=a(-1),C=t.length>5,E=l(!1);return i((()=>()=>{E.current&&Ne(!1)}),[]),i((()=>{v||h>=0?(Ne(!0),E.current=!0):(Ne(!1),E.current=!1)}),[v,h]),o.createElement(o.Fragment,null,c&&o.createElement(W,{message:u("sensitiveMask.contentWarningDescription"),icon:o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.00002 0.666748C4.40002 0.666748 0.666687 4.40008 0.666687 9.00008C0.666687 13.6001 4.40002 17.3334 9.00002 17.3334C13.6 17.3334 17.3334 13.6001 17.3334 9.00008C17.3334 4.40008 13.6 0.666748 9.00002 0.666748ZM9.00002 9.83341C8.54169 9.83341 8.16669 9.45841 8.16669 9.00008V5.66675C8.16669 5.20842 8.54169 4.83342 9.00002 4.83342C9.45835 4.83342 9.83335 5.20842 9.83335 5.66675V9.00008C9.83335 9.45841 9.45835 9.83341 9.00002 9.83341ZM8.16669 11.5001V13.1667H9.83335V11.5001H8.16669Z",fill:"#FE921D"}))}),o.createElement(Q,{className:e,style:s,"data-image-count":C?5:t.length||0,"data-is-marrybaby":m,"data-cursor-pointer":!c},null==t?void 0:t.slice(0,5).map(((e,t)=>{const n=4===t&&C;return o.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&C?g(!0):y(t)}},c&&o.createElement(yt,{image:e,showIcon:!n}),!m&&o.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e,alt:d}),o.createElement("img",{loading:"lazy",className:"img-preview",src:e,alt:d}),n&&o.createElement("div",{className:"img-more-overlay"},o.createElement(_e,{tag:"h1",as:"h2",color:"white"},p)))}))),v&&o.createElement(vt,{authorName:r||"",images:t,onClose:()=>g(!1),onOpenSingleView:y,alt:d}),h>=0&&o.createElement(ht,{images:t,initialViewIndex:h,onClose:()=>y(-1),alt:d}))},Et=({url:t,image:r,className:d,style:m,baseUrl:u="",autoPlay:p=!0})=>{const{data:{locale:v}}=n(xe),[g,h]=a(null);i((()=>{e(void 0,void 0,void 0,(function*(){if(!r){if(!t)return h(null);h((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),Pe(Te(Me.FETCH_PREVIEW,{_locale:v},void 0,u),"POST",{data:{link:t},headers:{"Content-Type":"application/json"}},!!u).then((e=>{var o,n;h({url:t,image:(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.image)||(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)})})).catch((()=>{h(null)}))}}))}),[t,r]);const y=r||(null==g?void 0:g.image),C=(null==g?void 0:g.url)||t,E=s((()=>K(C)),[C]),k=s((()=>C.includes("facebook.com")||C.includes("fb.watch")),[C]),f=l(0),b=l(0),[N,I]=a(!1);i((()=>{const e=()=>{var e;const t=null===(e=x.current)||void 0===e?void 0:e.getBoundingClientRect();let o=!1;t&&(!f.current||Math.abs((f.current-t.width)/(null==t?void 0:t.width))>.2)&&(f.current=Math.floor(t.width),o=!0),t&&(!b.current||Math.abs((b.current-t.height)/(null==t?void 0:t.height))>.2)&&(b.current=Math.floor(t.height),o=!0),o&&I((e=>!e))};return e(),window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}}),[]);const x=l(null),P=c();return o.createElement(G,{className:`${d} no-replace-click`,style:m,ref:x,color:P.colors[P.primaryColor][0]},r||!E&&!k?o.createElement("a",{href:C,target:"_blank",rel:"noreferrer"},o.createElement("div",{className:"link-image-wrapper "+((null==g?void 0:g.isFetching)?"fetching":"")},(null==g?void 0:g.isFetching)?o.createElement(w,{className:"loading-spinner"}):o.createElement(ke,{className:"link-image",src:y||je,backupSrc:je,alt:C}))):o.createElement("div",{className:"link-image-wrapper"},E?o.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${E}?&autoplay=${p?1:0}&mute=1&enablejsapi=1`,frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"},loading:"lazy"}):k?o.createElement("iframe",{key:String(N),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(C)}&autoplay=${p?1:0}&show_text=false&t=0&width=${f.current}&height=${b.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:b.current,width:f.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share",loading:"lazy"}):null))};var kt="KsWg8i6",wt="_9tS0EUN",ft="kyyRKlb",bt="-Uqqka-";const Nt=l=>{var{post:i,onSkip:s,btnText:d,currentPageUrl:m}=l,p=t(l,["post","onSkip","btnText","currentPageUrl"]);const{t:v}=de(),{data:{locale:g},action:{pushNotifications:h}}=n(xe),[y,C]=a(!1),[E,k]=a(!1),w=c(),f=r((()=>e(void 0,void 0,void 0,(function*(){var e;k(!0);const t=yield Le(Te(Me.USER.SKIP_QUESTION,{_locale:g,id:null==i?void 0:i.id}),"PUT");1===(null==t?void 0:t.status)?(null==s||s({id:(null==i?void 0:i.id)||"",communityId:(null===(e=null==i?void 0:i.community)||void 0===e?void 0:e.id)||""}),C(!1),h({title:"",message:"Skip success",type:"success"})):h({title:"",message:null==t?void 0:t.messages,type:"danger"}),k(!1)}))),[]);return o.createElement(u,{width:327,withArrow:!0,shadow:"md",opened:y},o.createElement(u.Target,null,o.createElement("div",Object.assign({className:`${kt} ${(null==p?void 0:p.className)||""}`,onClick:()=>C(!0)},p),d||v("profilePanel.questionNotClear"))),o.createElement(u.Dropdown,null,o.createElement("div",null,o.createElement("div",{className:wt},v("profilePanel.skipQuestion.heading")),o.createElement("div",{className:ft},v("profilePanel.skipQuestion.content")),o.createElement("div",{className:bt},o.createElement(Ee,{size:"md",variant:"secondary",leftIcon:o.createElement(he,{color:w.fn.primaryColor(),size:24}),onClick:()=>C(!1),styles:()=>({leftIcon:{marginRight:0}})}),o.createElement(Ee,{variant:"primary",size:"md",leftIcon:o.createElement(ye,{color:"white",size:24}),onClick:f,loading:E,"data-event-category":"Together","data-event-action":"Unclear Question Click","data-event-label":m,styles:()=>({leftIcon:{marginRight:0}})})))))};var It="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M5 10C3.9 10 3 10.9 3 12C3 13.1 3.9 14 5 14C6.1 14 7 13.1 7 12C7 10.9 6.1 10 5 10Z' fill='%233E3F58'/%3e %3cpath d='M19 10C17.9 10 17 10.9 17 12C17 13.1 17.9 14 19 14C20.1 14 21 13.1 21 12C21 10.9 20.1 10 19 10Z' fill='%233E3F58'/%3e %3cpath d='M12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z' fill='%233E3F58'/%3e %3c/svg%3e",xt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='%23595959' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Pt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Tt="data:image/svg+xml,%3csvg width='3' height='13' viewBox='0 0 3 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='1.58326' cy='6.41663' r='1.25' transform='rotate(89.9997 1.58326 6.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='1.41663' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 1.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='11.4166' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 11.4166)' fill='%23595959'/%3e%3c/svg%3e",Mt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 5.33337C13.1046 5.33337 14 4.43794 14 3.33337C14 2.2288 13.1046 1.33337 12 1.33337C10.8954 1.33337 10 2.2288 10 3.33337C10 4.43794 10.8954 5.33337 12 5.33337Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M12 14.6666C13.1046 14.6666 14 13.7712 14 12.6666C14 11.5621 13.1046 10.6666 12 10.6666C10.8954 10.6666 10 11.5621 10 12.6666C10 13.7712 10.8954 14.6666 12 14.6666Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.72668 9.00665L10.28 11.66' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.2734 4.33997L5.72668 6.9933' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",jt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 4H3.33333H14' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33334 3.99992V2.66659C5.33334 2.31296 5.47382 1.97382 5.72387 1.72378C5.97392 1.47373 6.31305 1.33325 6.66668 1.33325H9.33334C9.68697 1.33325 10.0261 1.47373 10.2762 1.72378C10.5262 1.97382 10.6667 2.31296 10.6667 2.66659V3.99992M12.6667 3.99992V13.3333C12.6667 13.6869 12.5262 14.026 12.2762 14.2761C12.0261 14.5261 11.687 14.6666 11.3333 14.6666H4.66668C4.31305 14.6666 3.97392 14.5261 3.72387 14.2761C3.47382 14.026 3.33334 13.6869 3.33334 13.3333V3.99992H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66666 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33334 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const _t=({authorEmail:t,onDeletePost:l,shareUrl:i,post:s,className:r="",popoverClassName:c="",onBookmark:d,onRemoveBookmark:m,onEditPost:u})=>{const{data:{locale:p,userInfo:v,togetherUserId:g,env:{isMarryBaby:h}},action:{pushNotifications:y}}=n(xe),{t:C}=de(),[E,k]=a(!1),[w,f]=a(!1),[b,N]=a(!1),{authActionWrapper:I}=q(),x=t&&(null==v?void 0:v.email)&&t===String(null==v?void 0:v.email);return o.createElement("div",{className:r,onClick:e=>{e.preventDefault(),e.stopPropagation()}},b&&o.createElement(Y,{url:i,text:null==s?void 0:s.title,onClose:()=>N(!1)}),w&&o.createElement(dt,{thumbnail:fe.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:C("popup.deletePost.title"),description:C("popup.deletePost.description"),acceptText:C("popup.deletePost.accept"),cancelText:C("popup.deletePost.cancel"),onAccept:()=>e(void 0,void 0,void 0,(function*(){if((null==s?void 0:s.id)&&!E){k(!0);try{const t=yield(({id:t,locale:o})=>e(void 0,void 0,void 0,(function*(){if(t)return yield Le(Te(Me.POST.DELETE,{id:t,_locale:o}),"DELETE")})))({id:s.id,locale:p});1===(null==t?void 0:t.status)&&(null==l||l())}catch(e){}k(!1)}})),onClose:()=>f(!1)}),o.createElement(J,{className:c,toggleButtonContent:o.createElement("img",{src:h?It:Tt,loading:"lazy"}),position:"bottom",align:"end",buttonProps:{isLoading:E},data:x?{isShowheader:!1,type:"list",list:[{icon:Mt,label:C("morePopover.share"),onClick:()=>N(!0)},{icon:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.16952 3.2356H2.99484C2.6785 3.2356 2.37512 3.36126 2.15143 3.58495C1.92774 3.80863 1.80208 4.11202 1.80208 4.42836V12.7777C1.80208 13.094 1.92774 13.3974 2.15143 13.6211C2.37512 13.8448 2.6785 13.9705 2.99484 13.9705H11.3442C11.6605 13.9705 11.9639 13.8448 12.1876 13.6211C12.4113 13.3974 12.537 13.094 12.537 12.7777V8.60303' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M11.6425 2.341C11.8798 2.10375 12.2016 1.97046 12.5371 1.97046C12.8726 1.97046 13.1944 2.10375 13.4317 2.341C13.6689 2.57826 13.8022 2.90005 13.8022 3.23558C13.8022 3.57111 13.6689 3.89289 13.4317 4.13015L7.76607 9.79578L5.38054 10.3922L5.97692 8.00663L11.6425 2.341Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",label:C("actionPopover.edit"),onClick:u},{icon:jt,label:C("actionPopover.delete"),onClick:()=>{I((()=>f(!0)))}}]}:{isShowheader:!1,type:"list",list:[{icon:Mt,label:C("morePopover.share"),onClick:()=>N(!0)},{icon:(null==s?void 0:s.bookmarked)?xt:Pt,label:(null==s?void 0:s.bookmarked)?C("morePopover.unsavePost"):C("morePopover.savePost"),onClick:()=>{I((()=>e(void 0,void 0,void 0,(function*(){if((null==v?void 0:v.id)&&(null==s?void 0:s.id))if(null==s?void 0:s.bookmarked){const e=yield Le(Te(Me.BOOKMARK.DELETE,{_locale:p}),"DELETE",{data:{post_id:String(s.id)}});1===(null==e?void 0:e.status)?(y({title:"",message:"Removed saved post",type:"success",displayIcon:Pt}),m&&m()):y({title:"",message:"Remove failed",type:"danger",displayIcon:Pt})}else{const e=yield Le(Te(Me.BOOKMARK.CREATE,{_locale:p}),"POST",{data:{user_id:g||v.id,post_id:s.id}});1===(null==e?void 0:e.status)?(y({title:"",message:"Post saved",type:"success",displayIcon:xt}),d&&d()):y({title:"",message:"Post saved failed",type:"danger",displayIcon:Pt})}}))))}},{icon:ut,label:C("morePopover.report"),subTree:{title:C("morePopover.report.title"),description:C("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(Be).map((e=>({label:Be[e].label,reason:Be[e].reportReasonText,reasonValue:e}))).map((e=>({label:C(e.label),subTree:{title:C("morePopover.reportSubmit.title"),description:C("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>o.createElement(pt,{reason:e.reasonValue,reasonText:C(e.reason),postId:null==s?void 0:s.id,onClose:()=>t&&t(!1)})}})))}}]}}))};const Lt=({onDeleteComment:t,commentId:l,className:i="",popoverClassName:s=""})=>{const{data:{env:{isMarryBaby:r},locale:c},action:{pushNotifications:d}}=n(xe),{t:m}=de(),[u,p]=a(!1),{authActionWrapper:v}=q();return o.createElement("div",{className:i,onClick:e=>{e.preventDefault(),e.stopPropagation()}},u&&o.createElement(dt,{thumbnail:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cg stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' clip-path='url(%23clip0)'%3e%3cpath d='M2 4.008h12M5.333 4.008V2.675a1.333 1.333 0 0 1 1.334-1.333h2.666a1.333 1.333 0 0 1 1.334 1.333v1.333m2 0v9.334a1.333 1.333 0 0 1-1.334 1.333H4.667a1.333 1.333 0 0 1-1.334-1.333V4.008h9.334ZM6.667 7.342v4M9.333 7.342v4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3cpath fill='white' d='M0 .008h16v16H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:m("popup.deleteComment.title"),description:m("popup.deleteComment.description"),acceptText:m("popup.deletePost.accept"),cancelText:m("popup.deletePost.cancel"),onAccept:()=>e(void 0,void 0,void 0,(function*(){var e;if(!l)return;const o=yield(({id:e,locale:t})=>Le(Te(Me.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"))({id:l,locale:c});1===(null==o?void 0:o.status)?(t&&t(),d({title:"",message:m("notification.success"),type:"success"})):d({title:"",message:(null===(e=null==o?void 0:o.messages)||void 0===e?void 0:e[0])||m("notification.failure"),type:"danger"})})),onClose:()=>p(!1)}),o.createElement(J,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:jt,label:m("actionPopover.delete"),onClick:()=>{v((()=>{p(!0)}))}}]},className:s,toggleButtonContent:o.createElement("img",{src:r?It:Tt,loading:"lazy"}),buttonProps:{}}))};var St="-dzIuHr";const zt=({userId:e,avatar:t,name:n,role:l,title:i,className:s})=>{const{t:r}=de(),[c,d]=a(!1);return o.createElement(o.Fragment,null,o.createElement(qe,{className:`${St} ${s}`,color:"success",size:"xs",onClick:()=>d(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},o.createElement("span",{className:"text"},o.createElement(Ce.Endorse,{isSolid:!0,size:18,color:ue.colors.green800,className:"icon"}),r("cardReply.verifyBy",{name:`${n||""}`}))),o.createElement(X,{open:c,onClose:()=>d(!1),profileModalProps:{zIndex:1e3}},o.createElement(ee,{authorProps:{userId:e,avatar:t,name:n,role:l,title:i},hideQuestionTab:!0})))};const Bt=({className:t,style:l,comment:r,type:c="comment",level:d=0,replyingId:m,onPostCommentSuccess:u,post:p,onDeleteComment:v,refetchComment:g,hasQuickBookingEnable:h,handleMakeAppointment:y,cardAuthorProps:C,maxChars:E=600,disableShortenContent:k})=>{var w,f,b,N,I,x,P,T,M,j,_,L,S;const{data:{locale:z,userInfo:B,env:{isMarryBaby:A}}}=n(xe),{t:O}=de(),[F,R]=a(r||null),{id:D,countLikes:U,content:V,replies:$=[],images:Z=[],author:H,liked:W,link:Q,mentionedUser:K,mentions:G}=F,{text:Y,replyingTo:J}=(e=>{try{const t=e.match(/\[@([^\]]+)\]/),o=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:o}}catch(e){}return{text:""}})(V),{authActionWrapper:X}=q({_joinCommunityIds:[null===(w=null==p?void 0:p.community)||void 0===w?void 0:w.id],_joinTopicIds:null===(f=null==p?void 0:p.topics)||void 0===f?void 0:f.map((e=>e.id))}),[ee,re]=a(4),ce=!!(null==B?void 0:B.id)&&(null==$?void 0:$.some((e=>e.author.id===B.id))),me=e=>{R((t=>{if(!t.replies.find((t=>t.id===e.id))){t.replies.unshift(e);const o=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return g&&g(o),o}return t}))},[ue,pe]=a(!1),ve=s((()=>"comment"===c&&$&&0!=$.length?$.sort(((e,t)=>{const o=new Date(e.createdAt).getTime(),n=new Date(t.createdAt).getTime();return o>n?-1:o<n?1:0})):$),[c,$]),ge=(null==$?void 0:$.length)||0,he=String(null==H?void 0:H.email)&&(null==B?void 0:B.email)&&String(null==H?void 0:H.email)===String(null==B?void 0:B.email),ye=(null==H?void 0:H.name)||(null==H?void 0:H.username)||"",Ce=(null==H?void 0:H.username)||(null==H?void 0:H.name)||"",Ee=null==H?void 0:H.avatar,ke=(null==p?void 0:p.isAnonymous)||null==H?void 0:H.role,fe=[...(null==p?void 0:p.isAnonymous)?[{id:(null===(b=null==p?void 0:p.author)||void 0===b?void 0:b.id)||0,name:O("cardPost.anonymous")}]:[],...G||[]],[be,Ne]=a(null),[Ie,je]=a(null);i((()=>{if(null==H?void 0:H.hospitalId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Pe(Ae(Oe.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:we[z]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.branch)&&Ne(null==o?void 0:o._data.branch)}));t(H.hospitalId)}if(null==H?void 0:H.doctorId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Pe(Ae(Oe.GET_DOCTOR_INFO,{doctorId:t,website_url:we[z]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.doctor)&&je(null==o?void 0:o._data.doctor)}));t(H.doctorId)}}),[H.hospitalId,H.doctorId]);const _e=(null==Ie?void 0:Ie.valid_outpatient)||(null==Ie?void 0:Ie.valid_telemedicine),Se=((null==be?void 0:be.total_available_service)||(null==be?void 0:be.total_available_doctor))>0,ze=h&&(_e||Se),Be="chatbot"===(null===(N=null==F?void 0:F.author)||void 0===N?void 0:N.type);return o.createElement(te,{defaultParams:{_joinCommunityIds:[null===(I=null==p?void 0:p.community)||void 0===I?void 0:I.id],_joinTopicIds:null===(x=null==p?void 0:p.topics)||void 0===x?void 0:x.map((e=>e.id))}},o.createElement(oe,{className:t,style:l,"data-is-reply":!!d,"data-is-marrybaby":A,"data-has-booking":ze},"reply"===c&&o.createElement(Ve,{className:"top-divider",type:"solid"}),o.createElement("div",{style:{padding:"16px 16px 0"}},o.createElement(ne,Object.assign({avatar:Ee,name:ye,username:Ce,timeText:null==p?void 0:p.createdTime,community:null==p?void 0:p.community,className:"post-author "+(he?"with-popover":""),type:c,userId:null==H?void 0:H.id,role:ke,expertId:null==H?void 0:H.partnerId,title:null==H?void 0:H.title,doctorId:null==H?void 0:H.doctorId,hospitalId:null==H?void 0:H.hospitalId,hasQuickBooking:ze,handleMakeAppointment:y,isAnonymous:(null==F?void 0:F.isAnonymous)||Boolean(null==p?void 0:p.isAnonymous)&&(null===(P=null==p?void 0:p.author)||void 0===P?void 0:P.username)===(null==H?void 0:H.username),hideBackground:Be,userType:null==H?void 0:H.type},C)),Boolean(null==F?void 0:F.isVerify)&&!Boolean(null==F?void 0:F.isOppose)&&o.createElement(zt,{title:null===(T=null==F?void 0:F.userVerify)||void 0===T?void 0:T.title,name:null===(M=null==F?void 0:F.userVerify)||void 0===M?void 0:M.name,userId:null===(j=null==F?void 0:F.userVerify)||void 0===j?void 0:j.id,role:null===(_=null==F?void 0:F.userVerify)||void 0===_?void 0:_.role,avatar:null===(L=null==F?void 0:F.userVerify)||void 0===L?void 0:L.avatar,className:"verify-tag"})),o.createElement(ae,{className:"post-content-wrapper",replyingTo:J,mentionedUser:K,description:Y,mentions:fe,maxChars:E,disableShortenContent:k}),o.createElement("span",null),o.createElement("span",null),Z&&Z.length>0?o.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},o.createElement(Ct,{images:Z,authorName:null==H?void 0:H.username})):null,Z&&0!==Z.length||!Q?null:o.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},o.createElement(Je,{url:Q})),"most-engaging"!==c?o.createElement(o.Fragment,null,Be&&o.createElement(le,{listUrl:null==F?void 0:F.source,categorySlug:null==F?void 0:F.categorySlug}),o.createElement(ie,{type:se.reply,loveCount:U,replyCount:ge,className:"post-reaction",liked:W,isReplied:ce,hideCommentIcon:"reply"===c||Be,hasShare:!1,onCommentClick:()=>X((()=>pe((e=>!e)))),onCommentCountClick:()=>X((()=>{pe(!0)})),onLikeClick:()=>X((()=>e(void 0,void 0,void 0,(function*(){if(D){const t=yield(({commentId:t,setLike:o=!1,locale:n})=>e(void 0,void 0,void 0,(function*(){return Le(Te(o?Me.COMMENT.LIKE:Me.COMMENT.UNLIKE,{_locale:n,id:t}),"GET")})))({commentId:D,setLike:!W,locale:z});1===t.status&&R((e=>Object.assign(Object.assign({},e),{liked:!W,countLikes:e.countLikes+(W?-1:1)})))}}))))}),ue&&o.createElement(mt,{replyingId:m||F.id,replyToName:ye,isReply:!0,onClose:()=>pe(!1),onPostSuccess:e=>{"reply"===c?u&&u(e):me(e)},post:p,replyingUser:H}),"comment"===c&&$&&$.length>0?o.createElement("div",{className:"comment-reply-wrapper"},null===(S=null==ve?void 0:ve.slice(0,ee))||void 0===S?void 0:S.map((e=>o.createElement(Bt,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:d+1,replyingId:D,onPostCommentSuccess:me,post:p,onDeleteComment:()=>{R((t=>Object.assign(Object.assign({},t),{replies:t.replies.filter((t=>t.id!==e.id)),countReplies:t.countReplies-1})))},handleMakeAppointment:y,hasQuickBookingEnable:h}))),ge>ee&&o.createElement(o.Fragment,null,o.createElement(Ve,{className:"top-divider",type:"solid"}),o.createElement(qe,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>re((e=>e+4))},O("comment.seeMoreReplies",{count:ge-ee}),o.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12L10 8L6 4' stroke='%232D87F3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",loading:"lazy"})))):null):null,he&&o.createElement(Lt,{onDeleteComment:v,className:"popover",commentId:F.id})))},At=(t,o)=>e(void 0,void 0,void 0,(function*(){var e,n,a;const l=yield Re(Te(Me.COMMENT.LIST,{postId:t,_locale:o,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(a=null===(n=null===(e=null==l?void 0:l.data)||void 0===e?void 0:e.comments)||void 0===n?void 0:n.map(We))||void 0===a?void 0:a[0]})),Ot=({className:t,style:l,hideViewMoreComment:s,showMostEngaging:r,onCommentClick:c,onCommentCountClick:d,onMostEngagingCommentClick:m,onPostCommentSuccess:u,disableCardLink:p,disableShortenContent:v,onDeletePost:g,onEditPost:h,post:y,mostEngagingComment:C,onDeleteComment:E,showInputComment:k,InlineCommentsComponent:w,hasQuickBookingEnable:f,handleMakeAppointment:b,cardAuthorProps:N})=>{const[I,x]=a(y),[P,T]=a(!1),[M,j]=a(C),{community:_,topics:L,author:S,slug:z,isPin:B,liked:A,photos:O,mentions:F,title:R,description:D,previewUrl:U,likesCount:V,commentsCount:$,id:Z,commented:H}=I,{data:{locale:W,env:{isMarryBaby:Q,togetherBasePath:K}},action:{pushNotifications:G}}=n(xe),{t:J}=de(),[X,ee]=a(k),oe=`${K}/${(null==_?void 0:_.slug)||"_"}/${z||""}`,le=`${Fe(W)}${oe}`,{authActionWrapper:ue}=q((null==_?void 0:_.slug)?{_joinCommunityIds:[_.id],_joinTopicIds:null==L?void 0:L.map((e=>e.id))}:void 0),[pe,ve]=a(!1);i((()=>{ee(k)}),[k]);const ge=(null==S?void 0:S.name)||(null==S?void 0:S.username)||"",he=(null==S?void 0:S.username)||(null==S?void 0:S.name)||"",ye=null==S?void 0:S.avatar,Ce=(null==I?void 0:I.isAnonymous)||null==S?void 0:S.role,[Ee,ke]=a(null),[we,fe]=a(null);i((()=>{if(null==S?void 0:S.hospitalId){(t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Pe(Ae(Oe.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:De[W]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.branch)&&ke(null==o?void 0:o._data.branch)})))(S.hospitalId)}if(null==S?void 0:S.doctorId){(t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Pe(Ae(Oe.GET_DOCTOR_INFO,{doctorId:t,website_url:De[W]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.doctor)&&fe(null==o?void 0:o._data.doctor)})))(S.doctorId)}}),[S.hospitalId,S.doctorId]);const be=(null==we?void 0:we.valid_outpatient)||(null==we?void 0:we.valid_telemedicine),Ne=((null==Ee?void 0:Ee.total_available_service)||(null==Ee?void 0:Ee.total_available_doctor))>0,Ie=f&&(be||Ne);i((()=>{e(void 0,void 0,void 0,(function*(){if(Z&&$&&r&&!(null==C?void 0:C.id)){const e=yield At(Z,W);j(e)}}))}),[Z,W,$,r,null==C?void 0:C.id]),i((()=>{j(C)}),[null==C?void 0:C.id]);const Se=t=>e(void 0,void 0,void 0,(function*(){if($>1&&(null==M?void 0:M.id)&&(null==M?void 0:M.id)===(null==t?void 0:t.id)){const e=yield At(Z,W);j(e)}x((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1}))),E&&E(t)}));return o.createElement(te,{defaultParams:(null==_?void 0:_.slug)?{_joinCommunityIds:[_.id],_joinTopicIds:null==L?void 0:L.map((e=>e.id))}:void 0},P&&o.createElement(Y,{url:le,avatar:je,text:R,onClose:()=>T(!1)}),o.createElement(re,{className:t,style:l,"data-is-marrybaby":Q},B?o.createElement(Xe,{className:"post-pin"}):null,o.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},o.createElement(ne,Object.assign({avatar:ye,name:ge,username:he,url:p?void 0:oe,community:_,timeText:null==I?void 0:I.createdTime,className:"post-author",role:Ce,userId:null==S?void 0:S.id,expertId:null==S?void 0:S.partnerId,doctorId:null==S?void 0:S.doctorId,hospitalId:null==S?void 0:S.hospitalId,title:null==S?void 0:S.title,hasQuickBooking:Ie,handleMakeAppointment:b,"data-testid":"name",isAnonymous:!!(null==I?void 0:I.isAnonymous),extendEle:o.createElement(_t,{authorEmail:String(null==S?void 0:S.email),onDeletePost:g,shareUrl:le,post:I,className:"popover",onEditPost:h})},N))),o.createElement("a",{href:p?void 0:oe,className:"post-content-link-wrapper"},R&&o.createElement(_e,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},me(R)),o.createElement(ae,{className:"post-content-wrapper",description:D,disableShortenContent:v,mentions:F,"data-testid":"Content of the Post"})),o.createElement("span",null),o.createElement("span",null),o.createElement("div",{key:"tag-topic"},L&&L.length>0?o.createElement(ce,{topics:L,className:"post-topics"}):null),o.createElement("div",{key:"social-preview"},(null==I?void 0:I.introUrl)?o.createElement("div",{className:"social-preview-wrapper "+((null==O?void 0:O.length)?"has-image":"")},o.createElement(Et,{url:I.introUrl,image:I.bannerImage})):null),o.createElement("div",{key:"image-preview"},(null==O?void 0:O.length)?o.createElement("div",{className:"image-preview-wrapper"},o.createElement(Ct,{images:O,authorName:null==S?void 0:S.name})):null),o.createElement("div",{key:"link-preview"},(null==I?void 0:I.introUrl)||(null==O?void 0:O.length)||!(null==U?void 0:U.url)?null:o.createElement("div",{className:"link-preview-wrapper"},o.createElement(Je,{title:U.title,url:U.url,image:U.image}))),o.createElement(ie,{isMarryBaby:Q,type:se.post,loveCount:V,replyCount:$,className:"post-reaction "+((null==O?void 0:O.length)||(null==U?void 0:U.url)?"hide-top-border":""),liked:pe?!A:A,isReplied:H,onCommentClick:()=>ue((()=>{c?c():ee((e=>!e))})),onCommentCountClick:()=>{ue((()=>{Q?ee(!0):d?d():!p&&(window.location.href=oe)}))},onShareClick:()=>{T(!0)},onLikeClick:()=>e(void 0,void 0,void 0,(function*(){if(Z&&!pe){ve(!0);try{const t=yield(({id:t,locale:o})=>e(void 0,void 0,void 0,(function*(){if(t)return yield Le(Te(Me.POST.LIKE,{id:t,_locale:o}),"GET")})))({id:Z,locale:W});1!==(null==t?void 0:t.status)?G(et(J)):x((e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})))}catch(e){G(et(J))}ve(!1)}})),showingMostEngaging:!(!r||!(null==M?void 0:M.id))}),X&&o.createElement(mt,{isMainCmt:!k,onClose:()=>ee(!1),onPostSuccess:e=>{0!==$||(null==M?void 0:M.id)||j(e),x((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0}))),u&&u(e)},post:I}),r&&(null==M?void 0:M.id)?o.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{m?(e.stopPropagation(),m()):window.location.href=oe}},o.createElement(Bt,{hasQuickBookingEnable:f,handleMakeAppointment:b,comment:M,post:I,onDeleteComment:()=>{Se&&Se(M)},className:"most-engaging-comment",type:"most-engaging",key:M.id,cardAuthorProps:N}),$>1&&!s&&o.createElement(qe,{className:"see-more-comments",color:"ghost",size:"md"},J("comment.seeMoreComments",{count:$-1}))):null,w))};var Ft=Object.freeze({__proto__:null});export{Je as C,mt as I,Xe as L,dt as P,pt as S,st as T,zt as V,ct as a,at as b,it as c,vt as d,ht as e,Ct as f,Et as g,Nt as h,Ot as i,_t as j,Bt as k,Lt as l,Ft as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-914e91bc.js";import t,{useState as i,useCallback as a,useMemo as o,useEffect as n,useRef as s,useReducer as l}from"react";import{u as r}from"./useTranslations-d8b9e866.js";import c from"lodash/debounce";import{I as d,e as p,f as u,M as h,g,C as m}from"./constants-cf8d2b27.js";import{I as C}from"./index-dce8c446.js";import b,{createGlobalStyle as y}from"styled-components";import{T as f,I as v}from"./index-36c96e53.js";import{t as x}from"./theme-afaf0d05.js";import S from"lodash/shuffle";import{a as E}from"./useOutsideClick-1dc534d6.js";import{M as w}from"./screenSizeContext-fc852596.js";import L from"react-loading-skeleton";import{P as k}from"./paths-a3913e3c.js";import{Skeleton as O,Input as j,Divider as I,Tabs as $,Flex as F,Button as M}from"@mantine/core";import{U as R,d as T}from"./index-63cb82b7.js";import{g as P,s as N,d as A}from"./cookieHelper-b7f7d5f1.js";import{C as B}from"./index-354ddd99.js";import{C as V}from"./ChevronDown-9654e503.js";import D from"string-format";function K(){const[e,t]=i((()=>{if("undefined"==typeof window)return"unset";if(P(R))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[n,s]=i((()=>{if("undefined"==typeof window)return null;const e=P(R);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=a((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const i={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};N(R,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{A(R),t("denied")}))}),[]);return o((()=>({geoLocationPermission:e,geoLocationCoordinates:n,requestGeoLocation:l})),[e,n])}const z=b.div``,_=b.div`
|
|
2
2
|
--searchbar-z-index: 305;
|
|
3
3
|
&[data-is-modal='true'] {
|
|
4
4
|
position: fixed;
|
package/build/esm/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,E as ELEMENT_CONTROL_INPUT_TYPE,F as FULL_KEY_ADDRESS,G as Gender,L as LOCALE,f as NodeActionType,d as NodeFinalTypes,e as NodeIntentType,g as NodeMultipleOptions,N as NodePosition,c as NodeType,O as OnboardingStep}from"./Subot-
|
|
1
|
+
export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,E as ELEMENT_CONTROL_INPUT_TYPE,F as FULL_KEY_ADDRESS,G as Gender,L as LOCALE,f as NodeActionType,d as NodeFinalTypes,e as NodeIntentType,g as NodeMultipleOptions,N as NodePosition,c as NodeType,O as OnboardingStep}from"./Subot-3e26682c.js";
|