@hhgtech/hhg-components 1.25.13 → 1.25.14

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.
Files changed (279) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care.js +1 -1
  4. package/build/components.js +1 -1
  5. package/build/constants.js +1 -1
  6. package/build/core-6bc5ba44.js +1 -0
  7. package/build/{dataTransform-e3ac854d.js → dataTransform-0dfdf1e4.js} +1 -1
  8. package/build/ecom.js +1 -1
  9. package/build/esm/babyGrowth.js +2 -2
  10. package/build/esm/cache.js +1 -1
  11. package/build/esm/care.js +1 -1
  12. package/build/esm/components.js +1 -1
  13. package/build/esm/constants.js +1 -1
  14. package/build/esm/core-c9e62698.js +1 -0
  15. package/build/esm/{dataTransform-16786588.js → dataTransform-729ed0c4.js} +1 -1
  16. package/build/esm/ecom.js +1 -1
  17. package/build/esm/footer.js +1 -1
  18. package/build/esm/gAssets.js +1 -1
  19. package/build/esm/getDynamicHealthTool-730cff4f.js +1 -0
  20. package/build/esm/{getSocialList-cb4c5aaa.js → getSocialList-93ddcc2d.js} +1 -1
  21. package/build/esm/hooks.js +1 -1
  22. package/build/esm/i18n.js +1 -1
  23. package/build/esm/{index-f0f59b4a.js → index-0f64aa6b.js} +1 -1
  24. package/build/esm/{index-4b3834b0.js → index-139c8c14.js} +1 -1
  25. package/build/esm/{index-74bd30cc.js → index-2d56bbb5.js} +1 -1
  26. package/build/esm/{index-5035344d.js → index-39a73076.js} +1 -1
  27. package/build/esm/{index-076075d1.js → index-3d08c1b1.js} +1 -1
  28. package/build/esm/{index-f72a5db6.js → index-48f0edcb.js} +1 -1
  29. package/build/esm/{index-1ade8351.js → index-535055a0.js} +1 -1
  30. package/build/esm/index-5e678adf.js +1 -0
  31. package/build/esm/{index-e1a2e7b1.js → index-62c65047.js} +1 -1
  32. package/build/esm/{index-07863aa4.js → index-6ab1fbb1.js} +1 -1
  33. package/build/esm/{index-1483611b.js → index-6ab5bb1c.js} +1 -1
  34. package/build/esm/index-78bed25c.js +1 -0
  35. package/build/esm/{index-de075a29.js → index-7f69479b.js} +1 -1
  36. package/build/esm/{index-a25dbc33.js → index-820c9981.js} +2 -2
  37. package/build/esm/{index-5bdb24f3.js → index-846c816f.js} +1 -1
  38. package/build/esm/{index-6569f80d.js → index-a497b37d.js} +1 -1
  39. package/build/esm/{index-1de8b14c.js → index-b84cbbce.js} +1 -1
  40. package/build/esm/{index-a49e0bc1.js → index-bf67b4d3.js} +1 -1
  41. package/build/esm/{index-615defe2.js → index-cec60d3d.js} +1 -1
  42. package/build/esm/index-db082fd1.js +1 -0
  43. package/build/esm/index-dff0b135.js +1 -0
  44. package/build/esm/{index-d3cc6f8a.js → index-f55378b4.js} +1 -1
  45. package/build/esm/{index-a378903a.js → index-f928b9ca.js} +1 -1
  46. package/build/esm/index.js +1 -1
  47. package/build/esm/{index.styled-e0eda731.js → index.styled-3dcb8fb5.js} +3 -3
  48. package/build/esm/{index.styled-8a3ed141.js → index.styled-42c41f2e.js} +1 -1
  49. package/build/esm/{index.styled-0591673c.js → index.styled-4ab6a4f1.js} +1 -1
  50. package/build/esm/{index.styled-928161bc.js → index.styled-82d1a855.js} +1 -1
  51. package/build/esm/{index.styled-79d4b1a1.js → index.styled-90bfb177.js} +1 -1
  52. package/build/esm/{index.styled-e704c9c2.js → index.styled-a4a0721e.js} +1 -1
  53. package/build/esm/{index.styled-1a0e35c1.js → index.styled-fd5b46ba.js} +6 -6
  54. package/build/esm/{index.styles-e4b8b655.js → index.styles-a99e477c.js} +1 -1
  55. package/build/esm/lead.js +1 -1
  56. package/build/esm/mantine.js +1 -1
  57. package/build/esm/misc.js +1 -1
  58. package/build/esm/navigation.js +1 -1
  59. package/build/esm/onboarding.js +1 -1
  60. package/build/esm/pwg.js +3 -3
  61. package/build/esm/{routing-de7d22cc.js → routing-fe70e900.js} +1 -1
  62. package/build/esm/{screenSizeContext-39b53f94.js → screenSizeContext-06491a79.js} +1 -1
  63. package/build/esm/together.js +1 -1
  64. package/build/esm/{translationsProvider-f4d03925.js → translationsProvider-211e18e4.js} +1 -1
  65. package/build/esm/{types-d9736596.js → types-be847843.js} +17 -17
  66. package/build/esm/{types-b2e85f6d.js → types-ed98b0cd.js} +1 -1
  67. package/build/esm/types.js +1 -1
  68. package/build/esm/{useHealthToolCache-98a806f6.js → useHealthToolCache-21e31b1a.js} +1 -1
  69. package/build/esm/useRafState-9f57db65.js +1 -0
  70. package/build/esm/{useScreenSize-b94df01a.js → useScreenSize-ad4f65af.js} +1 -1
  71. package/build/esm/{useTranslations-05394aed.js → useTranslations-c24d56b8.js} +1 -1
  72. package/build/esm/vaccination.js +17 -18
  73. package/build/footer.js +1 -1
  74. package/build/gAssets.js +1 -1
  75. package/build/{getDynamicHealthTool-2053d8df.js → getDynamicHealthTool-76b97236.js} +1 -1
  76. package/build/{getSocialList-03cb4a3e.js → getSocialList-0e343758.js} +1 -1
  77. package/build/hooks.js +1 -1
  78. package/build/i18n.js +1 -1
  79. package/build/index-0a56471d.js +1 -0
  80. package/build/{index-576b1b49.js → index-1903c652.js} +1 -1
  81. package/build/index-3c430741.js +1 -0
  82. package/build/{index-e1695d28.js → index-3c72a639.js} +1 -1
  83. package/build/{index-a66f989d.js → index-4b8c661b.js} +1 -1
  84. package/build/{index-a7753ada.js → index-4d3dd875.js} +1 -1
  85. package/build/{index-4b9eb395.js → index-518c0836.js} +1 -1
  86. package/build/{index-db3cb96a.js → index-538cda6e.js} +1 -1
  87. package/build/index-5c514b5f.js +1 -0
  88. package/build/{index-fb77943d.js → index-7d1d1613.js} +1 -1
  89. package/build/{index-ca950658.js → index-826458bd.js} +1 -1
  90. package/build/index-932e5157.js +1 -0
  91. package/build/{index-7cd1e3e5.js → index-9955daac.js} +1 -1
  92. package/build/{index-b52d2827.js → index-a8590802.js} +1 -1
  93. package/build/{index-c8205d33.js → index-aab9808f.js} +1 -1
  94. package/build/{index-29ecde16.js → index-acebd536.js} +1 -1
  95. package/build/index-b4877bcf.js +1 -0
  96. package/build/{index-a4080a76.js → index-ce5777f5.js} +1 -1
  97. package/build/{index-7fdf24f5.js → index-e8280dca.js} +1 -1
  98. package/build/{index-474541c5.js → index-e9306734.js} +1 -1
  99. package/build/{index-d46d3f74.js → index-ec0c426a.js} +3 -3
  100. package/build/{index-0d34e8a1.js → index-f321d414.js} +1 -1
  101. package/build/index-f3667629.js +1 -0
  102. package/build/index.js +1 -1
  103. package/build/{index.styled-bafd301f.js → index.styled-10a81c42.js} +4 -4
  104. package/build/{index.styled-56c150e6.js → index.styled-27e8f02b.js} +5 -5
  105. package/build/{index.styled-79c7a9cf.js → index.styled-3b3cba03.js} +1 -1
  106. package/build/{index.styled-5e870fd9.js → index.styled-41005c39.js} +1 -1
  107. package/build/{index.styled-1a35bf76.js → index.styled-57487ede.js} +1 -1
  108. package/build/{index.styled-870edf20.js → index.styled-7c965831.js} +1 -1
  109. package/build/{index.styled-98b6398e.js → index.styled-cd537825.js} +1 -1
  110. package/build/{index.styles-34e70fee.js → index.styles-54cc58dd.js} +1 -1
  111. package/build/lead.js +1 -1
  112. package/build/mantine.js +1 -1
  113. package/build/misc.js +1 -1
  114. package/build/navigation.js +1 -1
  115. package/build/onboarding.js +1 -1
  116. package/build/pwg.js +1 -1
  117. package/build/{routing-067a6ade.js → routing-d8ca28e0.js} +1 -1
  118. package/build/screenSizeContext-f67a0038.js +81 -0
  119. package/build/together.js +1 -1
  120. package/build/{translationsProvider-7e36d683.js → translationsProvider-87b64eaa.js} +1 -1
  121. package/build/{types-581af155.js → types-4187d132.js} +3 -3
  122. package/build/{types-1923fa69.js → types-c69496e0.js} +1 -1
  123. package/build/types.js +1 -1
  124. package/build/useHealthToolCache-e0849978.js +1 -0
  125. package/build/{useRafState-821efca4.js → useRafState-6ed34d7f.js} +1 -1
  126. package/build/{useScreenSize-78826de5.js → useScreenSize-504f7aa6.js} +1 -1
  127. package/build/{useTranslations-d015548a.js → useTranslations-5fe756db.js} +1 -1
  128. package/build/vaccination.js +1 -2
  129. package/package.json +1 -1
  130. package/build/core-614e2f77.js +0 -1
  131. package/build/esm/core-e66477d9.js +0 -1
  132. package/build/esm/getDynamicHealthTool-85101b39.js +0 -1
  133. package/build/esm/index-52d9bc33.js +0 -1
  134. package/build/esm/index-66e178df.js +0 -1
  135. package/build/esm/index-dd8c9b9d.js +0 -1
  136. package/build/esm/index-fb849e99.js +0 -1
  137. package/build/esm/useRafState-9ec6ad3e.js +0 -1
  138. package/build/index-141d4714.js +0 -1
  139. package/build/index-34bc07b1.js +0 -1
  140. package/build/index-512c3ad7.js +0 -1
  141. package/build/index-52f77ebf.js +0 -1
  142. package/build/index-6d6b23a9.js +0 -1
  143. package/build/index-faed6f8b.js +0 -1
  144. package/build/screenSizeContext-e8b44907.js +0 -81
  145. package/build/useHealthToolCache-60b6bb5f.js +0 -1
  146. /package/build/{BMI_BOYS.percentile.monthly-c21ab4e7.js → BMI_BOYS.percentile.monthly-91f90ad9.js} +0 -0
  147. /package/build/{BMI_BOYS.percentile.weekly-54e43011.js → BMI_BOYS.percentile.weekly-d5b8007c.js} +0 -0
  148. /package/build/{BMI_BOYS.percentile.yearly-d301bc7d.js → BMI_BOYS.percentile.yearly-823915d9.js} +0 -0
  149. /package/build/{BMI_BOYS.zscore.monthly-674a2873.js → BMI_BOYS.zscore.monthly-b397475d.js} +0 -0
  150. /package/build/{BMI_BOYS.zscore.weekly-56cadf20.js → BMI_BOYS.zscore.weekly-3a7125b8.js} +0 -0
  151. /package/build/{BMI_BOYS.zscore.yearly-8ba5d0b6.js → BMI_BOYS.zscore.yearly-4ddf6269.js} +0 -0
  152. /package/build/{BMI_GIRLS.percentile.monthly-fa093909.js → BMI_GIRLS.percentile.monthly-39b9115d.js} +0 -0
  153. /package/build/{BMI_GIRLS.percentile.weekly-1457a72d.js → BMI_GIRLS.percentile.weekly-5413fd7b.js} +0 -0
  154. /package/build/{BMI_GIRLS.percentile.yearly-10f0379c.js → BMI_GIRLS.percentile.yearly-b2b40486.js} +0 -0
  155. /package/build/{BMI_GIRLS.zscore.monthly-f26d3e1c.js → BMI_GIRLS.zscore.monthly-a63ee5a2.js} +0 -0
  156. /package/build/{BMI_GIRLS.zscore.weekly-3305efa7.js → BMI_GIRLS.zscore.weekly-24a2789b.js} +0 -0
  157. /package/build/{BMI_GIRLS.zscore.yearly-ac090337.js → BMI_GIRLS.zscore.yearly-f9c9fa2b.js} +0 -0
  158. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-c49a1936.js → HEAD CIRCUM_BOYS.percentile.monthly-5b14eac1.js} +0 -0
  159. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-ae07f03c.js → HEAD CIRCUM_BOYS.percentile.weekly-9b687fcd.js} +0 -0
  160. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-a2951f49.js → HEAD CIRCUM_BOYS.percentile.yearly-f45958ef.js} +0 -0
  161. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-e8abd1cc.js → HEAD CIRCUM_BOYS.zscore.monthly-03b80543.js} +0 -0
  162. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-aa341562.js → HEAD CIRCUM_BOYS.zscore.weekly-68a6a0e5.js} +0 -0
  163. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-024b8166.js → HEAD CIRCUM_BOYS.zscore.yearly-6c9c82a0.js} +0 -0
  164. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-a8b1b844.js → HEAD CIRCUM_GIRLS.percentile.monthly-194fc509.js} +0 -0
  165. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-ffbd79f7.js → HEAD CIRCUM_GIRLS.percentile.weekly-fb6c3bc3.js} +0 -0
  166. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-06ac8442.js → HEAD CIRCUM_GIRLS.percentile.yearly-12a597ff.js} +0 -0
  167. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-5b6bd0b7.js → HEAD CIRCUM_GIRLS.zscore.monthly-5a9fe52b.js} +0 -0
  168. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-775b70e3.js → HEAD CIRCUM_GIRLS.zscore.weekly-251bb069.js} +0 -0
  169. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-df637a7a.js → HEAD CIRCUM_GIRLS.zscore.yearly-c6d2e56e.js} +0 -0
  170. /package/build/{HEIGHT_BOYS.percentile.monthly-9322f25f.js → HEIGHT_BOYS.percentile.monthly-3ebc7fe6.js} +0 -0
  171. /package/build/{HEIGHT_BOYS.percentile.weekly-68fe2920.js → HEIGHT_BOYS.percentile.weekly-700cb3ac.js} +0 -0
  172. /package/build/{HEIGHT_BOYS.percentile.yearly-ac4ddd09.js → HEIGHT_BOYS.percentile.yearly-d1cdb4e5.js} +0 -0
  173. /package/build/{HEIGHT_BOYS.zscore.monthly-09374a06.js → HEIGHT_BOYS.zscore.monthly-6254cec7.js} +0 -0
  174. /package/build/{HEIGHT_BOYS.zscore.weekly-437ce7f4.js → HEIGHT_BOYS.zscore.weekly-5fdc08c6.js} +0 -0
  175. /package/build/{HEIGHT_BOYS.zscore.yearly-c3862bb3.js → HEIGHT_BOYS.zscore.yearly-36483016.js} +0 -0
  176. /package/build/{HEIGHT_GIRLS.percentile.monthly-696207df.js → HEIGHT_GIRLS.percentile.monthly-6b5cca5d.js} +0 -0
  177. /package/build/{HEIGHT_GIRLS.percentile.weekly-90812d8a.js → HEIGHT_GIRLS.percentile.weekly-56912e28.js} +0 -0
  178. /package/build/{HEIGHT_GIRLS.percentile.yearly-eb882825.js → HEIGHT_GIRLS.percentile.yearly-8ae752d5.js} +0 -0
  179. /package/build/{HEIGHT_GIRLS.zscore.monthly-9ba3352d.js → HEIGHT_GIRLS.zscore.monthly-b70e49ed.js} +0 -0
  180. /package/build/{HEIGHT_GIRLS.zscore.weekly-acfbdf56.js → HEIGHT_GIRLS.zscore.weekly-a0055ac6.js} +0 -0
  181. /package/build/{HEIGHT_GIRLS.zscore.yearly-11415049.js → HEIGHT_GIRLS.zscore.yearly-622bd553.js} +0 -0
  182. /package/build/{Onboarding-e054f4d9.js → Onboarding-463e8fe0.js} +0 -0
  183. /package/build/{Visible-8dea7639.js → Visible-acaebb92.js} +0 -0
  184. /package/build/{WEIGHT_BOYS.percentile.monthly-c12f8eda.js → WEIGHT_BOYS.percentile.monthly-3a6231fc.js} +0 -0
  185. /package/build/{WEIGHT_BOYS.percentile.weekly-35e9aa18.js → WEIGHT_BOYS.percentile.weekly-e452ada9.js} +0 -0
  186. /package/build/{WEIGHT_BOYS.percentile.yearly-fd319c97.js → WEIGHT_BOYS.percentile.yearly-711c51e3.js} +0 -0
  187. /package/build/{WEIGHT_BOYS.zscore.monthly-3902903f.js → WEIGHT_BOYS.zscore.monthly-a4fdf740.js} +0 -0
  188. /package/build/{WEIGHT_BOYS.zscore.weekly-01e6cb64.js → WEIGHT_BOYS.zscore.weekly-93ff4efc.js} +0 -0
  189. /package/build/{WEIGHT_BOYS.zscore.yearly-372bfef7.js → WEIGHT_BOYS.zscore.yearly-646a3032.js} +0 -0
  190. /package/build/{WEIGHT_GIRLS.percentile.monthly-7baef373.js → WEIGHT_GIRLS.percentile.monthly-8536591e.js} +0 -0
  191. /package/build/{WEIGHT_GIRLS.percentile.weekly-fc207ee2.js → WEIGHT_GIRLS.percentile.weekly-489fd6dd.js} +0 -0
  192. /package/build/{WEIGHT_GIRLS.percentile.yearly-51694de6.js → WEIGHT_GIRLS.percentile.yearly-febcbcb4.js} +0 -0
  193. /package/build/{WEIGHT_GIRLS.zscore.monthly-78775917.js → WEIGHT_GIRLS.zscore.monthly-ffab1b4d.js} +0 -0
  194. /package/build/{WEIGHT_GIRLS.zscore.weekly-590d86c1.js → WEIGHT_GIRLS.zscore.weekly-3121911e.js} +0 -0
  195. /package/build/{WEIGHT_GIRLS.zscore.yearly-0b1aee67.js → WEIGHT_GIRLS.zscore.yearly-0369e1a4.js} +0 -0
  196. /package/build/{constants-a995c0a8.js → constants-34bc97b0.js} +0 -0
  197. /package/build/{cookieHelper-4c0699e8.js → cookieHelper-59747599.js} +0 -0
  198. /package/build/{dataTransform-97817fbb.js → dataTransform-e99b89c0.js} +0 -0
  199. /package/build/esm/{BMI_BOYS.percentile.monthly-f1e1d3b5.js → BMI_BOYS.percentile.monthly-903a15e1.js} +0 -0
  200. /package/build/esm/{BMI_BOYS.percentile.weekly-3b0ca0c5.js → BMI_BOYS.percentile.weekly-292489df.js} +0 -0
  201. /package/build/esm/{BMI_BOYS.percentile.yearly-4a9421ee.js → BMI_BOYS.percentile.yearly-5c143430.js} +0 -0
  202. /package/build/esm/{BMI_BOYS.zscore.monthly-ea554997.js → BMI_BOYS.zscore.monthly-4bc16012.js} +0 -0
  203. /package/build/esm/{BMI_BOYS.zscore.weekly-bbbe3d7d.js → BMI_BOYS.zscore.weekly-cd611f9f.js} +0 -0
  204. /package/build/esm/{BMI_BOYS.zscore.yearly-5fda22f0.js → BMI_BOYS.zscore.yearly-9bfbfb33.js} +0 -0
  205. /package/build/esm/{BMI_GIRLS.percentile.monthly-e71b5661.js → BMI_GIRLS.percentile.monthly-af0c5c50.js} +0 -0
  206. /package/build/esm/{BMI_GIRLS.percentile.weekly-1b502f34.js → BMI_GIRLS.percentile.weekly-b07799bc.js} +0 -0
  207. /package/build/esm/{BMI_GIRLS.percentile.yearly-608681cb.js → BMI_GIRLS.percentile.yearly-5609e97c.js} +0 -0
  208. /package/build/esm/{BMI_GIRLS.zscore.monthly-20ff66a5.js → BMI_GIRLS.zscore.monthly-50be1b86.js} +0 -0
  209. /package/build/esm/{BMI_GIRLS.zscore.weekly-c42ea738.js → BMI_GIRLS.zscore.weekly-462af3a2.js} +0 -0
  210. /package/build/esm/{BMI_GIRLS.zscore.yearly-0d883cee.js → BMI_GIRLS.zscore.yearly-3bfd8596.js} +0 -0
  211. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-2799f8e9.js → HEAD CIRCUM_BOYS.percentile.monthly-a3d2ad95.js} +0 -0
  212. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-cce83b89.js → HEAD CIRCUM_BOYS.percentile.weekly-5e3cf818.js} +0 -0
  213. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-503928c8.js → HEAD CIRCUM_BOYS.percentile.yearly-1f44efc6.js} +0 -0
  214. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-fa90a20a.js → HEAD CIRCUM_BOYS.zscore.monthly-84bd5b5f.js} +0 -0
  215. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-68188877.js → HEAD CIRCUM_BOYS.zscore.weekly-e829f1bb.js} +0 -0
  216. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-f7da476a.js → HEAD CIRCUM_BOYS.zscore.yearly-6064ecbc.js} +0 -0
  217. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-ca3623ae.js → HEAD CIRCUM_GIRLS.percentile.monthly-20e053c8.js} +0 -0
  218. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-8376ae03.js → HEAD CIRCUM_GIRLS.percentile.weekly-38185991.js} +0 -0
  219. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-d61a8a17.js → HEAD CIRCUM_GIRLS.percentile.yearly-73f15695.js} +0 -0
  220. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-e2f7a1fd.js → HEAD CIRCUM_GIRLS.zscore.monthly-9e39f2e2.js} +0 -0
  221. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-da7bd965.js → HEAD CIRCUM_GIRLS.zscore.weekly-35231690.js} +0 -0
  222. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-73eb9b26.js → HEAD CIRCUM_GIRLS.zscore.yearly-27d62e36.js} +0 -0
  223. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-fb9334d2.js → HEIGHT_BOYS.percentile.monthly-55384342.js} +0 -0
  224. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-5450fff6.js → HEIGHT_BOYS.percentile.weekly-e1764208.js} +0 -0
  225. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-153ed3db.js → HEIGHT_BOYS.percentile.yearly-4fdd2a1f.js} +0 -0
  226. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-725fd478.js → HEIGHT_BOYS.zscore.monthly-cfcc747c.js} +0 -0
  227. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-37d9671d.js → HEIGHT_BOYS.zscore.weekly-509158cf.js} +0 -0
  228. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-a4cda789.js → HEIGHT_BOYS.zscore.yearly-2e814fec.js} +0 -0
  229. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-239c6c76.js → HEIGHT_GIRLS.percentile.monthly-dc8b72ac.js} +0 -0
  230. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-5c5ffb26.js → HEIGHT_GIRLS.percentile.weekly-737d6567.js} +0 -0
  231. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-ec2f550d.js → HEIGHT_GIRLS.percentile.yearly-9490074c.js} +0 -0
  232. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-2cae4b7d.js → HEIGHT_GIRLS.zscore.monthly-39a80f9e.js} +0 -0
  233. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-3f98a2a6.js → HEIGHT_GIRLS.zscore.weekly-0b2811bd.js} +0 -0
  234. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-0b17679f.js → HEIGHT_GIRLS.zscore.yearly-c509b19e.js} +0 -0
  235. /package/build/esm/{Onboarding-c98a38a5.js → Onboarding-284bf162.js} +0 -0
  236. /package/build/esm/{Visible-05e82139.js → Visible-6437f2fb.js} +0 -0
  237. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-9ebb8ff3.js → WEIGHT_BOYS.percentile.monthly-a0038529.js} +0 -0
  238. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-ae700539.js → WEIGHT_BOYS.percentile.weekly-b0a622d3.js} +0 -0
  239. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-8cb0bfd3.js → WEIGHT_BOYS.percentile.yearly-6f3af445.js} +0 -0
  240. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-6b0c853c.js → WEIGHT_BOYS.zscore.monthly-5f5a075d.js} +0 -0
  241. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-c2b8459e.js → WEIGHT_BOYS.zscore.weekly-1e49146d.js} +0 -0
  242. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-de34e8c0.js → WEIGHT_BOYS.zscore.yearly-92bd1a09.js} +0 -0
  243. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-8b411335.js → WEIGHT_GIRLS.percentile.monthly-c0fe01da.js} +0 -0
  244. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-b5fe1bd5.js → WEIGHT_GIRLS.percentile.weekly-edfb98e8.js} +0 -0
  245. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-c83c506f.js → WEIGHT_GIRLS.percentile.yearly-cd98b44e.js} +0 -0
  246. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-6865a3d4.js → WEIGHT_GIRLS.zscore.monthly-838867b9.js} +0 -0
  247. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-7bafea31.js → WEIGHT_GIRLS.zscore.weekly-913a7b44.js} +0 -0
  248. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-fc986ffa.js → WEIGHT_GIRLS.zscore.yearly-2850364f.js} +0 -0
  249. /package/build/esm/{constants-0a7fc9d0.js → constants-c73596e4.js} +0 -0
  250. /package/build/esm/{cookieHelper-cbbc5ece.js → cookieHelper-33c75a08.js} +0 -0
  251. /package/build/esm/{dataTransform-31bebacd.js → dataTransform-2b9d49a6.js} +0 -0
  252. /package/build/esm/{index-2b95d543.js → index-19d1c5f5.js} +0 -0
  253. /package/build/esm/{index-7e0d894b.js → index-7523f43b.js} +0 -0
  254. /package/build/esm/{isProduction-aa4c6da9.js → isProduction-2c26f3dc.js} +0 -0
  255. /package/build/esm/{localizeNumberFormat-fe23d3f4.js → localizeNumberFormat-fb43a4de.js} +0 -0
  256. /package/build/esm/{normalizeLink-080b6cfd.js → normalizeLink-0546d9e5.js} +0 -0
  257. /package/build/esm/{theme-5782e8f2.js → theme-fdb22600.js} +0 -0
  258. /package/build/esm/{translationsContext-3047aefe.js → translationsContext-0a2b56ec.js} +0 -0
  259. /package/build/esm/{tslib.es6-6fca6fae.js → tslib.es6-2976dfea.js} +0 -0
  260. /package/build/esm/{types-34bf4318.js → types-76d4c1b7.js} +0 -0
  261. /package/build/esm/{useIsInit-a1b79772.js → useIsInit-621398f6.js} +0 -0
  262. /package/build/esm/{useOutsideClick-43dca545.js → useOutsideClick-e140aab1.js} +0 -0
  263. /package/build/esm/{useScrollbarSize-421af70b.js → useScrollbarSize-2f302086.js} +0 -0
  264. /package/build/esm/{useUniqueId-abc4f1de.js → useUniqueId-0aa6ae63.js} +0 -0
  265. /package/build/esm/{utils-9858d408.js → utils-e471a21f.js} +0 -0
  266. /package/build/{index-f9663d42.js → index-7ad7ae87.js} +0 -0
  267. /package/build/{index-3333cad5.js → index-f7cb444e.js} +0 -0
  268. /package/build/{isProduction-288da54b.js → isProduction-9bf422a5.js} +0 -0
  269. /package/build/{localizeNumberFormat-2cce9921.js → localizeNumberFormat-bc7bf008.js} +0 -0
  270. /package/build/{normalizeLink-b4bfb7d0.js → normalizeLink-0b4e7807.js} +0 -0
  271. /package/build/{theme-105367d6.js → theme-0cca0289.js} +0 -0
  272. /package/build/{translationsContext-b8ff5f27.js → translationsContext-bc23c83d.js} +0 -0
  273. /package/build/{tslib.es6-fbaa8bbc.js → tslib.es6-dde24bb3.js} +0 -0
  274. /package/build/{types-2d9cc644.js → types-0fa704f5.js} +0 -0
  275. /package/build/{useIsInit-c03bb9ff.js → useIsInit-ce705a6b.js} +0 -0
  276. /package/build/{useOutsideClick-98293ab8.js → useOutsideClick-2eab6075.js} +0 -0
  277. /package/build/{useScrollbarSize-4b4c2af0.js → useScrollbarSize-2e92042c.js} +0 -0
  278. /package/build/{useUniqueId-f3ff5a82.js → useUniqueId-4348e2a6.js} +0 -0
  279. /package/build/{utils-c8d455a9.js → utils-9562165e.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";import o,{createContext as n,useContext as i,useState as l,useRef as r,useEffect as s,useMemo as c,useCallback as d}from"react";import{useMantineTheme as m,createStyles as p,Flex as u,Checkbox as g,Portal as h,Anchor as v,Accordion as f,Popover as b}from"@mantine/core";import{B as w}from"./index-d3cc6f8a.js";import{T as x}from"./index-a49e0bc1.js";import{a as y}from"./index.styled-0591673c.js";import{u as E}from"./useTranslations-05394aed.js";import C from"innertext";import{t as k}from"./theme-5782e8f2.js";import{N,a9 as A,a4 as L,D as T,_ as I,C as S,ab as P}from"./index.styled-79d4b1a1.js";import{CommonGAssets as M}from"./gAssets.js";import{T as z,au as j,av as F,aw as B,ax as O,ay as V,az as R,aA as D,U,aB as W,aC as Z,aD as H,aE as q,aF as _,aG as G,aH as Q,aI as X,aJ as K,aK as $,aL as Y,aM as J,aN as ee,aO as te,aP as ae}from"./index.styled-928161bc.js";import{A as oe,B as ne,T as ie,D as le}from"./index-f0f59b4a.js";import{e as re,c as se,P as ce,g as de,b as me,h as pe,i as ue}from"./dataTransform-16786588.js";import{I as ge}from"./index-076075d1.js";import he from"lodash/debounce";import ve from"react-contenteditable";import{H as fe}from"./index-6569f80d.js";import{d as be,g as we}from"./cookieHelper-cbbc5ece.js";import{M as xe,t as ye,c as Ee,a as Ce}from"./utils-9858d408.js";import ke,{keyframes as Ne,css as Ae}from"styled-components";import"./index.styled-e704c9c2.js";import"./index-1ade8351.js";import{I as Le,C as Te,a as Ie}from"./index-4b3834b0.js";import"./index.styled-8a3ed141.js";import"./index-7e0d894b.js";import"./index.styles-e4b8b655.js";import Se from"dayjs";import"./screenSizeContext-39b53f94.js";import{d as Pe}from"./index-74bd30cc.js";import"./isProduction-aa4c6da9.js";import"./Onboarding-c98a38a5.js";import"./index-f72a5db6.js";import"@mantine/hooks";import"date-fns";import"react-day-picker/DayPickerInput";import*as Me from"react-dom";import"./index-a25dbc33.js";import"lodash/throttle";import"keen-slider/react";import"./types-34bf4318.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-1a0e35c1.js";import"string-format";import ze from"dayjs/plugin/relativeTime";import{M as je}from"./index-1de8b14c.js";import{a as Fe}from"./useUniqueId-abc4f1de.js";import"./translationsContext-3047aefe.js";import{g as Be}from"./routing-de7d22cc.js";import{B as Oe}from"./index-fb849e99.js";import{A as Ve}from"./index-66e178df.js";const Re=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),a.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),De=n({}),Ue=({children:e,defaultParams:t})=>o.createElement(De.Provider,{value:{defaultParams:t}},e),We=e=>{const{data:{userInfo:t,env:{togetherBasePath:a}}}=i(z),{defaultParams:o}=i(De)||{},n=null==t?void 0:t.id,l=t&&"number"==typeof t.communities_interacted&&0===t.communities_interacted;return{authActionWrapper:(t,i)=>{const r=Object.assign(Object.assign(Object.assign({},o),e),i);if(!n||l){n||be(j),(null==r?void 0:r._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(r._joinCommunityIds).filter(Boolean))))),null==r||delete r._joinCommunityIds),(null==r?void 0:r._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(r._joinTopicIds).filter(Boolean))))),null==r||delete r._joinTopicIds);const e=(null==r?void 0:r._location)||window.location.href;return null==r||delete r._location,window.location.href=F(e,r,a),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},Ze=ke.div`
1
+ import{a as e,_ as t}from"./tslib.es6-2976dfea.js";import*as a from"react";import o,{createContext as n,useContext as i,useState as l,useRef as r,useEffect as s,useMemo as c,useCallback as d}from"react";import{useMantineTheme as m,createStyles as p,Flex as u,Checkbox as g,Portal as h,Anchor as v,Accordion as f,Popover as b}from"@mantine/core";import{B as w}from"./index-f55378b4.js";import{T as x}from"./index-bf67b4d3.js";import{a as y}from"./index.styled-4ab6a4f1.js";import{u as E}from"./useTranslations-c24d56b8.js";import C from"innertext";import{t as k}from"./theme-fdb22600.js";import{N,a9 as A,a4 as L,D as T,_ as I,C as S,ab as P}from"./index.styled-90bfb177.js";import{CommonGAssets as M}from"./gAssets.js";import{T as z,au as j,av as F,aw as B,ax as O,ay as R,az as V,aA as D,U,aB as W,aC as Z,aD as H,aE as q,aF as _,aG as G,aH as Q,aI as X,aJ as K,aK as $,aL as Y,aM as J,aN as ee,aO as te,aP as ae}from"./index.styled-82d1a855.js";import{A as oe,B as ne,T as ie,D as le}from"./index-0f64aa6b.js";import{e as re,c as se,P as ce,g as de,b as me,h as pe,i as ue}from"./dataTransform-729ed0c4.js";import{I as ge}from"./index-3d08c1b1.js";import he from"lodash/debounce";import ve from"react-contenteditable";import{H as fe}from"./index-a497b37d.js";import{d as be,g as we}from"./cookieHelper-33c75a08.js";import{M as xe,t as ye,c as Ee,a as Ce}from"./utils-e471a21f.js";import ke,{keyframes as Ne,css as Ae}from"styled-components";import"./index.styled-a4a0721e.js";import"./index-535055a0.js";import{I as Le,C as Te,a as Ie}from"./index-139c8c14.js";import"./index.styled-42c41f2e.js";import"./index-7523f43b.js";import"./index.styles-a99e477c.js";import Se from"dayjs";import"./screenSizeContext-06491a79.js";import{d as Pe}from"./index-2d56bbb5.js";import"./isProduction-2c26f3dc.js";import"./Onboarding-284bf162.js";import"./index-48f0edcb.js";import"@mantine/hooks";import"date-fns";import"react-day-picker/DayPickerInput";import*as Me from"react-dom";import"./index-820c9981.js";import"lodash/throttle";import"keen-slider/react";import"./types-76d4c1b7.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-fd5b46ba.js";import"string-format";import ze from"dayjs/plugin/relativeTime";import{M as je}from"./index-b84cbbce.js";import{a as Fe}from"./useUniqueId-0aa6ae63.js";import"./translationsContext-0a2b56ec.js";import{g as Be}from"./routing-fe70e900.js";import{B as Oe}from"./index-5e678adf.js";import{A as Re}from"./index-78bed25c.js";const Ve=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),a.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),De=n({}),Ue=({children:e,defaultParams:t})=>o.createElement(De.Provider,{value:{defaultParams:t}},e),We=e=>{const{data:{userInfo:t,env:{togetherBasePath:a}}}=i(z),{defaultParams:o}=i(De)||{},n=null==t?void 0:t.id,l=t&&"number"==typeof t.communities_interacted&&0===t.communities_interacted;return{authActionWrapper:(t,i)=>{const r=Object.assign(Object.assign(Object.assign({},o),e),i);if(!n||l){n||be(j),(null==r?void 0:r._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(r._joinCommunityIds).filter(Boolean))))),null==r||delete r._joinCommunityIds),(null==r?void 0:r._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(r._joinTopicIds).filter(Boolean))))),null==r||delete r._joinTopicIds);const e=(null==r?void 0:r._location)||window.location.href;return null==r||delete r._location,window.location.href=F(e,r,a),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},Ze=ke.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -94,7 +94,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
94
94
  }
95
95
  }
96
96
  }
97
- `,Ge=({title:t,url:a,image:n,logo:c,className:d,style:p,noRefetch:u})=>{const{data:{locale:g,env:{isMarryBaby:h}}}=i(z),[v,f]=l(!1),b=m(),w=r(u);w.current=u;const[y,E]=l(null);s((()=>{e(void 0,void 0,void 0,(function*(){if(!w.current){if(!a)return E(null);E((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),B(O(V.FETCH_PREVIEW,{_locale:g}),"POST",{data:{link:a}}).then((e=>{var t,o,n;f(!1),E({title:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.title,url:a,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((()=>{E(null)}))}}))}),[a]);const C=(null==y?void 0:y.image)||n,k=(null==y?void 0:y.title)||t,N=(null==y?void 0:y.logo)||c,A=(null==y?void 0:y.url)||a,L=A.replace("http://","").replace("https://","").split(/[/?#]/)[0],T=r(!1);return o.createElement(_e,{"data-is-marrybaby":h,className:`${d} no-replace-click`,style:p,color:b.colors[b.primaryColor][0]},o.createElement("a",{href:A,target:"_blank",rel:"noreferrer"},C&&o.createElement("div",{className:"link-image-wrapper"},!h&&o.createElement("img",{className:"link-image-blur",src:C,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=R)}}),o.createElement("img",{className:"link-image",src:C,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=R)}})),o.createElement("div",{className:"link-info-container"},o.createElement(x,{size:"n1"},h&&N&&!v&&o.createElement("img",{className:"link-logo",src:N,onError:e=>f(!0)}),L),o.createElement(fe,{tag:"h6"},k))))},Qe=n({});var Xe="vvR-m49";const Ke=({children:e,className:t=""})=>{const{isReplied:a,trackingCategory:n,trackingLabel:l,onLikeClick:r}=i(Qe);return o.createElement("div",{className:`${Xe} ${t}`,"data-event-category":n,"data-event-action":a?"Like Comment Click":"Like Post Click","data-event-label":l,onClick:()=>{null==r||r()}},e)},$e=({children:e,className:t=""})=>{const{trackingCategory:a,trackingLabel:n,onShareClick:l}=i(Qe);return o.createElement("div",{className:`${Xe} ${t}`,onClick:()=>{null==l||l()},"data-event-category":a,"data-event-action":"Share Icon Click","data-event-label":n},e)},Ye=({children:e,className:t=""})=>{const{isReplied:a,trackingCategory:n,trackingLabel:l,onCommentClick:r}=i(Qe);return o.createElement("div",{className:`${Xe} ${t}`,"data-event-category":n,"data-event-action":a?"Reply Comment Click":"Comment Text Click","data-event-label":l,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==r||r()}},e)};var Je,et="UhiT4m5",tt="oEfeTkV",at="OlbikxJ",ot="_9GXHCn3",nt="MV3lNuh";!function(e){e[e.post=1]="post",e[e.reply=2]="reply"}(Je||(Je={}));const it=e=>{var{type:a,loveCount:n=0,replyCount:l=0,replyPadding:r,liked:s,isReplied:c,onCommentClick:d,onLikeClick:m,onCommentCountClick:p,onShareClick:u,className:g,style:h,hideCommentIcon:v,showingMostEngaging:f,isMarryBaby:b,hasShare:w=!0,hasCountLike:y=!0,trackingCategory:C="Together",trackingLabel:A="",children:L}=e,T=t(e,["type","loveCount","replyCount","replyPadding","liked","isReplied","onCommentClick","onLikeClick","onCommentCountClick","onShareClick","className","style","hideCommentIcon","showingMostEngaging","isMarryBaby","hasShare","hasCountLike","trackingCategory","trackingLabel","children"]);const{data:{env:{isMarryBaby:I}}}=i(z),S=Boolean(b)?b:I,{t:P}=E();return o.createElement(Qe.Provider,{value:{liked:s,loveCount:n,trackingCategory:C,trackingLabel:A,isReplied:c,onLikeClick:m,onShareClick:u,onCommentClick:d}},L||o.createElement("div",Object.assign({className:`${et} ${g}`,"data-show-most-engaging":f,"data-type":a===Je.post?"post":"reply","data-reply-padding":a===Je.reply&&r,"data-is-marrybaby":S,style:h},T),o.createElement("div",{className:tt},o.createElement("div",{className:at},o.createElement(Ke,null,o.createElement(x,{className:ot,style:{marginRight:"25px"},size:"p3",as:"div"},o.createElement(N,{className:"txt-icon",isMarryBaby:S,isSolid:s,color:s?S?k.mbColors.pink:k.colors.red800:"#737373"}),y&&o.createElement("div",{className:nt},n))),w&&o.createElement($e,null,o.createElement(x,{size:"p3",className:ot,as:"div"},o.createElement(Le.Share,{isMarryBaby:S})))),!v&&o.createElement(Ye,null,o.createElement(x,{size:"p3",className:ot,as:"div"},c?o.createElement(Le.Reply,{className:"txt-icon"}):o.createElement(Le.Comment,{className:"txt-icon",isMarryBaby:S}),c?P("cardReactions.reply"):o.createElement("div",{className:nt},P("post.commentCount",{count:l})))))))};it.LikeWrapper=Ke,it.ShareWrapper=$e,it.CommentWrapper=Ye;const lt=p((e=>({wrapper:{display:"flex",width:"100%",padding:"0.5rem 0",cursor:"grab",overflowX:"auto","::-webkit-scrollbar":{width:0},"&.sliding":{cursor:"grabbing",userSelect:"none",a:{pointerEvents:"none"}}},item:{position:"relative",whiteSpace:"nowrap",padding:"5px 12px",background:e.colors.gray[0],borderRadius:"2rem",cursor:"pointer","-webkit-user-drag":"none",userSelect:"none",textDecoration:"none",marginLeft:"0.5rem","*":{pointerEvents:"none"},"&:first-child":{marginLeft:0}},text:{}}))),rt=e=>{var{topics:a,onClick:n,className:s,style:c,trackingCategory:d="Together",locale:m,classNames:p,styles:u,unstyled:g}=e,h=t(e,["topics","onClick","className","style","trackingCategory","locale","classNames","styles","unstyled"]);const{classes:v,cx:f}=lt(void 0,{name:"TagTopic",classNames:p,styles:u,unstyled:g}),{sliding:b,mouseDownHandler:w,sliderRef:y}=(()=>{const[e,t]=l(!1),a=r(null),o=r(null),n=r();return{sliding:e,mouseDownHandler:function(e){if(a.current){n.current=setTimeout((()=>{t(!0)}),500),o.current={left:a.current.scrollLeft,x:e.clientX};const i=function(e){const t=o.current;if(t){const o=e.clientX-t.x;a.current&&(a.current.scrollLeft=t.left-o)}},l=function(){n.current&&(clearTimeout(n.current),n.current=void 0),t(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",i,{passive:!0}),document.addEventListener("mouseup",l,{passive:!0})}},sliderRef:a,pos:o}})(),{data:{env:{togetherBasePath:E}},action:{sanitizeFunction:C}}=i(z);return o.createElement("div",Object.assign({ref:y,onClick:n,onMouseDown:e=>w(e),className:`${v.wrapper} ${s} ${b?"sliding":""}`,style:c},h),a.map(((e,t)=>o.createElement("a",{className:v.item,key:t,"data-event-category":d,"data-event-action":"Topic in Post Click","data-event-label":`${D(m)}${E}${e.url}`,href:e.isActive&&!e.isHidden?`${E}${e.url}`:void 0},o.createElement(x,{size:"p4"},o.createElement("span",{dangerouslySetInnerHTML:{__html:(null==C?void 0:C(e.name))||e.name}}))))))},st=ke.div`
97
+ `,Ge=({title:t,url:a,image:n,logo:c,className:d,style:p,noRefetch:u})=>{const{data:{locale:g,env:{isMarryBaby:h}}}=i(z),[v,f]=l(!1),b=m(),w=r(u);w.current=u;const[y,E]=l(null);s((()=>{e(void 0,void 0,void 0,(function*(){if(!w.current){if(!a)return E(null);E((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),B(O(R.FETCH_PREVIEW,{_locale:g}),"POST",{data:{link:a}}).then((e=>{var t,o,n;f(!1),E({title:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.title,url:a,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((()=>{E(null)}))}}))}),[a]);const C=(null==y?void 0:y.image)||n,k=(null==y?void 0:y.title)||t,N=(null==y?void 0:y.logo)||c,A=(null==y?void 0:y.url)||a,L=A.replace("http://","").replace("https://","").split(/[/?#]/)[0],T=r(!1);return o.createElement(_e,{"data-is-marrybaby":h,className:`${d} no-replace-click`,style:p,color:b.colors[b.primaryColor][0]},o.createElement("a",{href:A,target:"_blank",rel:"noreferrer"},C&&o.createElement("div",{className:"link-image-wrapper"},!h&&o.createElement("img",{className:"link-image-blur",src:C,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=V)}}),o.createElement("img",{className:"link-image",src:C,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=V)}})),o.createElement("div",{className:"link-info-container"},o.createElement(x,{size:"n1"},h&&N&&!v&&o.createElement("img",{className:"link-logo",src:N,onError:e=>f(!0)}),L),o.createElement(fe,{tag:"h6"},k))))},Qe=n({});var Xe="vvR-m49";const Ke=({children:e,className:t=""})=>{const{isReplied:a,trackingCategory:n,trackingLabel:l,onLikeClick:r}=i(Qe);return o.createElement("div",{className:`${Xe} ${t}`,"data-event-category":n,"data-event-action":a?"Like Comment Click":"Like Post Click","data-event-label":l,onClick:()=>{null==r||r()}},e)},$e=({children:e,className:t=""})=>{const{trackingCategory:a,trackingLabel:n,onShareClick:l}=i(Qe);return o.createElement("div",{className:`${Xe} ${t}`,onClick:()=>{null==l||l()},"data-event-category":a,"data-event-action":"Share Icon Click","data-event-label":n},e)},Ye=({children:e,className:t=""})=>{const{isReplied:a,trackingCategory:n,trackingLabel:l,onCommentClick:r}=i(Qe);return o.createElement("div",{className:`${Xe} ${t}`,"data-event-category":n,"data-event-action":a?"Reply Comment Click":"Comment Text Click","data-event-label":l,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==r||r()}},e)};var Je,et="UhiT4m5",tt="oEfeTkV",at="OlbikxJ",ot="_9GXHCn3",nt="MV3lNuh";!function(e){e[e.post=1]="post",e[e.reply=2]="reply"}(Je||(Je={}));const it=e=>{var{type:a,loveCount:n=0,replyCount:l=0,replyPadding:r,liked:s,isReplied:c,onCommentClick:d,onLikeClick:m,onCommentCountClick:p,onShareClick:u,className:g,style:h,hideCommentIcon:v,showingMostEngaging:f,isMarryBaby:b,hasShare:w=!0,hasCountLike:y=!0,trackingCategory:C="Together",trackingLabel:A="",children:L}=e,T=t(e,["type","loveCount","replyCount","replyPadding","liked","isReplied","onCommentClick","onLikeClick","onCommentCountClick","onShareClick","className","style","hideCommentIcon","showingMostEngaging","isMarryBaby","hasShare","hasCountLike","trackingCategory","trackingLabel","children"]);const{data:{env:{isMarryBaby:I}}}=i(z),S=Boolean(b)?b:I,{t:P}=E();return o.createElement(Qe.Provider,{value:{liked:s,loveCount:n,trackingCategory:C,trackingLabel:A,isReplied:c,onLikeClick:m,onShareClick:u,onCommentClick:d}},L||o.createElement("div",Object.assign({className:`${et} ${g}`,"data-show-most-engaging":f,"data-type":a===Je.post?"post":"reply","data-reply-padding":a===Je.reply&&r,"data-is-marrybaby":S,style:h},T),o.createElement("div",{className:tt},o.createElement("div",{className:at},o.createElement(Ke,null,o.createElement(x,{className:ot,style:{marginRight:"25px"},size:"p3",as:"div"},o.createElement(N,{className:"txt-icon",isMarryBaby:S,isSolid:s,color:s?S?k.mbColors.pink:k.colors.red800:"#737373"}),y&&o.createElement("div",{className:nt},n))),w&&o.createElement($e,null,o.createElement(x,{size:"p3",className:ot,as:"div"},o.createElement(Le.Share,{isMarryBaby:S})))),!v&&o.createElement(Ye,null,o.createElement(x,{size:"p3",className:ot,as:"div"},c?o.createElement(Le.Reply,{className:"txt-icon"}):o.createElement(Le.Comment,{className:"txt-icon",isMarryBaby:S}),c?P("cardReactions.reply"):o.createElement("div",{className:nt},P("post.commentCount",{count:l})))))))};it.LikeWrapper=Ke,it.ShareWrapper=$e,it.CommentWrapper=Ye;const lt=p((e=>({wrapper:{display:"flex",width:"100%",padding:"0.5rem 0",cursor:"grab",overflowX:"auto","::-webkit-scrollbar":{width:0},"&.sliding":{cursor:"grabbing",userSelect:"none",a:{pointerEvents:"none"}}},item:{position:"relative",whiteSpace:"nowrap",padding:"5px 12px",background:e.colors.gray[0],borderRadius:"2rem",cursor:"pointer","-webkit-user-drag":"none",userSelect:"none",textDecoration:"none",marginLeft:"0.5rem","*":{pointerEvents:"none"},"&:first-child":{marginLeft:0}},text:{}}))),rt=e=>{var{topics:a,onClick:n,className:s,style:c,trackingCategory:d="Together",locale:m,classNames:p,styles:u,unstyled:g}=e,h=t(e,["topics","onClick","className","style","trackingCategory","locale","classNames","styles","unstyled"]);const{classes:v,cx:f}=lt(void 0,{name:"TagTopic",classNames:p,styles:u,unstyled:g}),{sliding:b,mouseDownHandler:w,sliderRef:y}=(()=>{const[e,t]=l(!1),a=r(null),o=r(null),n=r();return{sliding:e,mouseDownHandler:function(e){if(a.current){n.current=setTimeout((()=>{t(!0)}),500),o.current={left:a.current.scrollLeft,x:e.clientX};const i=function(e){const t=o.current;if(t){const o=e.clientX-t.x;a.current&&(a.current.scrollLeft=t.left-o)}},l=function(){n.current&&(clearTimeout(n.current),n.current=void 0),t(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",i,{passive:!0}),document.addEventListener("mouseup",l,{passive:!0})}},sliderRef:a,pos:o}})(),{data:{env:{togetherBasePath:E}},action:{sanitizeFunction:C}}=i(z);return o.createElement("div",Object.assign({ref:y,onClick:n,onMouseDown:e=>w(e),className:`${v.wrapper} ${s} ${b?"sliding":""}`,style:c},h),a.map(((e,t)=>o.createElement("a",{className:v.item,key:t,"data-event-category":d,"data-event-action":"Topic in Post Click","data-event-label":`${D(m)}${E}${e.url}`,href:e.isActive&&!e.isHidden?`${E}${e.url}`:void 0},o.createElement(x,{size:"p4"},o.createElement("span",{dangerouslySetInnerHTML:{__html:(null==C?void 0:C(e.name))||e.name}}))))))},st=ke.div`
98
98
  display: flex;
99
99
  align-items: center;
100
100
  justify-content: space-between;
@@ -636,12 +636,12 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
636
636
  width: 24px;
637
637
  height: 24px;
638
638
  }
639
- `;const Vt=ke.ul`
639
+ `;const Rt=ke.ul`
640
640
  padding-left: 18px;
641
641
  li {
642
642
  list-style-type: disc;
643
643
  }
644
- `,Rt=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,doctorId:n,locale:i,isMobile:r,overwriteProfileProps:c,avatarFallback:d=M.getAssetPath("avatar.jpg"),trackingCategory:m="Together"})=>{var p,u,g;const{t:h}=E(),[v,f]=l(null),[b,y]=l(!1);s((()=>{if(e&&n&&String(null==v?void 0:v.id)!==String(n)){y(!0);try{f(null),B(W(Z.GET_DOCTOR_INFO,{doctorId:n,website_url:H[i]}),"get").then((e=>{f(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),c))}))}catch(e){console.error(e)}y(!1)}}),[e,n,null==v?void 0:v.id]);const C=(null==v?void 0:v.experiences)||[],N=((null==v?void 0:v.specialties)||[]).map((e=>(null==e?void 0:e.name)||e)).join(" • "),A=C.map((e=>{try{return JSON.parse(e.description)}catch(t){return e.description}})).filter((e=>e.content));return o.createElement(o.Fragment,null,o.createElement(jt,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},b||!v?o.createElement(qe,null):o.createElement("div",{className:"popup-content"},o.createElement("div",{className:"close-button",onClick:t},o.createElement("img",{src:Mt,style:{width:20,height:20},alt:"close-icon"})),o.createElement("div",{className:"main-info"},o.createElement("div",{className:"border-banner"}),o.createElement("div",{className:"avatar-title"},o.createElement(Bt,null,o.createElement("div",{className:"image-container"},o.createElement("div",{style:{position:"relative"}},o.createElement(Pt,{src:null==v?void 0:v.avatar,fallbackSrc:d,className:"profile-image",alt:"avatar"}),o.createElement("img",{className:"badge-avatar",src:zt,alt:"badge"})))),o.createElement(Ot,null,o.createElement(x,{size:"s3",type:"semiBold",className:"full-name"},null==v?void 0:v.name),o.createElement("div",{className:"specialty"},N&&o.createElement(o.Fragment,null,o.createElement(x,{size:"p4",color:k.colors.gray800},N," • ")),o.createElement("a",{href:q({id:null===(p=null==v?void 0:v.organization)||void 0===p?void 0:p.id,name:null===(u=null==v?void 0:v.organization)||void 0===u?void 0:u.name,slug:null===(g=null==v?void 0:v.organization)||void 0===g?void 0:g.slug,locale:i}),className:"organisation",target:"_blank",rel:"noreferrer"},o.createElement(x,{size:"p4",className:"organisation",color:k.colors.gray800,style:{textDecoration:"underline"}},null==v?void 0:v.organization.name))))),!r&&o.createElement("div",{className:"btn-wrapper"},o.createElement("a",{href:_({name:v.name,id:v.id,locale:i})},o.createElement(w,{color:"primary",size:"md",className:"btn-booking"},h("careBooking.bookAnAppointment"))))),A&&o.createElement(Ot,null,o.createElement("div",{className:"experience"},o.createElement(x,{type:"bold",size:"s3",color:k.colors.gray800,style:{paddingBottom:16}},h("expert.content.description").toUpperCase()),o.createElement(Vt,null,A.map(((e,t)=>o.createElement("li",{key:t},o.createElement(x,{size:"p2"},(e=>(null==e?void 0:e.year)?`${e.year} ${null==e?void 0:e.content}`:(null==e?void 0:e.content)?e.content:"string"==typeof e?e:"")(e)))))),r?o.createElement("div",{className:"btn-wrapper"},o.createElement("a",{href:_({name:v.name,id:v.id,locale:i})},o.createElement(w,{color:"primary",size:"md",className:"btn-booking"},h("careBooking.bookAnAppointment")))):o.createElement("a",{href:_({name:v.name,id:v.id,locale:i})},o.createElement(x,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":m,"data-event-action":"See Full Doctor Profile","data-event-label":D(i)+_({name:v.name,id:v.id,locale:i})},h("home.seeExpert"))))))),o.createElement(Ft,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))};const Dt=ke.div`
644
+ `,Vt=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,doctorId:n,locale:i,isMobile:r,overwriteProfileProps:c,avatarFallback:d=M.getAssetPath("avatar.jpg"),trackingCategory:m="Together"})=>{var p,u,g;const{t:h}=E(),[v,f]=l(null),[b,y]=l(!1);s((()=>{if(e&&n&&String(null==v?void 0:v.id)!==String(n)){y(!0);try{f(null),B(W(Z.GET_DOCTOR_INFO,{doctorId:n,website_url:H[i]}),"get").then((e=>{f(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),c))}))}catch(e){console.error(e)}y(!1)}}),[e,n,null==v?void 0:v.id]);const C=(null==v?void 0:v.experiences)||[],N=((null==v?void 0:v.specialties)||[]).map((e=>(null==e?void 0:e.name)||e)).join(" • "),A=C.map((e=>{try{return JSON.parse(e.description)}catch(t){return e.description}})).filter((e=>e.content));return o.createElement(o.Fragment,null,o.createElement(jt,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},b||!v?o.createElement(qe,null):o.createElement("div",{className:"popup-content"},o.createElement("div",{className:"close-button",onClick:t},o.createElement("img",{src:Mt,style:{width:20,height:20},alt:"close-icon"})),o.createElement("div",{className:"main-info"},o.createElement("div",{className:"border-banner"}),o.createElement("div",{className:"avatar-title"},o.createElement(Bt,null,o.createElement("div",{className:"image-container"},o.createElement("div",{style:{position:"relative"}},o.createElement(Pt,{src:null==v?void 0:v.avatar,fallbackSrc:d,className:"profile-image",alt:"avatar"}),o.createElement("img",{className:"badge-avatar",src:zt,alt:"badge"})))),o.createElement(Ot,null,o.createElement(x,{size:"s3",type:"semiBold",className:"full-name"},null==v?void 0:v.name),o.createElement("div",{className:"specialty"},N&&o.createElement(o.Fragment,null,o.createElement(x,{size:"p4",color:k.colors.gray800},N," • ")),o.createElement("a",{href:q({id:null===(p=null==v?void 0:v.organization)||void 0===p?void 0:p.id,name:null===(u=null==v?void 0:v.organization)||void 0===u?void 0:u.name,slug:null===(g=null==v?void 0:v.organization)||void 0===g?void 0:g.slug,locale:i}),className:"organisation",target:"_blank",rel:"noreferrer"},o.createElement(x,{size:"p4",className:"organisation",color:k.colors.gray800,style:{textDecoration:"underline"}},null==v?void 0:v.organization.name))))),!r&&o.createElement("div",{className:"btn-wrapper"},o.createElement("a",{href:_({name:v.name,id:v.id,locale:i})},o.createElement(w,{color:"primary",size:"md",className:"btn-booking"},h("careBooking.bookAnAppointment"))))),A&&o.createElement(Ot,null,o.createElement("div",{className:"experience"},o.createElement(x,{type:"bold",size:"s3",color:k.colors.gray800,style:{paddingBottom:16}},h("expert.content.description").toUpperCase()),o.createElement(Rt,null,A.map(((e,t)=>o.createElement("li",{key:t},o.createElement(x,{size:"p2"},(e=>(null==e?void 0:e.year)?`${e.year} ${null==e?void 0:e.content}`:(null==e?void 0:e.content)?e.content:"string"==typeof e?e:"")(e)))))),r?o.createElement("div",{className:"btn-wrapper"},o.createElement("a",{href:_({name:v.name,id:v.id,locale:i})},o.createElement(w,{color:"primary",size:"md",className:"btn-booking"},h("careBooking.bookAnAppointment")))):o.createElement("a",{href:_({name:v.name,id:v.id,locale:i})},o.createElement(x,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":m,"data-event-action":"See Full Doctor Profile","data-event-label":D(i)+_({name:v.name,id:v.id,locale:i})},h("home.seeExpert"))))))),o.createElement(Ft,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))};const Dt=ke.div`
645
645
  position: fixed;
646
646
  left: 50%;
647
647
  width: 343px;
@@ -959,7 +959,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
959
959
  width: 24px;
960
960
  height: 24px;
961
961
  }
962
- `;const $t=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,hospitalId:n,locale:i,isMobile:r,overwriteProfileProps:d,avatarFallback:m=M.getAssetPath("avatar.jpg"),trackingCategory:p="Together"})=>{const{t:u}=E(),[g,h]=l(null),[v,f]=l(!1);s((()=>{if(e&&n&&String(null==g?void 0:g.id)!==String(n)){f(!0);try{h(null),B(W(Z.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:H[i]}),"get").then((e=>{h(Object.assign(Object.assign({},null==e?void 0:e._data.branch),d))}))}catch(e){console.error(e)}f(!1)}}),[e,n,null==g?void 0:g.id]);const b=(null==g?void 0:g.specialties)||[],y=c((()=>b.map((e=>e.name))),[b]);return o.createElement(o.Fragment,null,o.createElement(Gt,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},v||!g?o.createElement(qe,null):o.createElement("div",{className:"popup-content"},o.createElement("div",{className:"close-button",onClick:t},o.createElement("img",{src:Mt,style:{width:20,height:20},alt:"close-icon"})),o.createElement("div",{className:"main-info"},o.createElement("div",{className:"border-banner"}),o.createElement("div",{className:"avatar-title"},o.createElement(Xt,null,o.createElement("div",{className:"image-container"},o.createElement("div",{style:{position:"relative"}},o.createElement(Pt,{src:null==g?void 0:g.logo,className:"profile-image",alt:"avatar",fallbackSrc:m}),o.createElement("img",{className:"badge-avatar",src:zt,alt:"badge"})))),o.createElement(Kt,null,o.createElement(x,{size:"s3",type:"semiBold",className:"full-name"},null==g?void 0:g.name),o.createElement("div",{className:"specialty"},b&&o.createElement(x,{size:"p4",color:k.colors.gray800},y.join(" • "),"•"),o.createElement("a",{href:q({id:g.id,name:g.name,slug:g.slug,locale:i}),className:"organisation",target:"_blank",rel:"noreferrer"},o.createElement(x,{size:"p4",className:"organisation",color:k.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.name))))),!r&&o.createElement("a",{href:q({id:g.id,name:g.name,slug:g.slug,locale:i})},o.createElement("div",{className:"btn-wrapper"},o.createElement(w,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment"))))),o.createElement(Kt,null,o.createElement("div",{className:"experience"},o.createElement(x,{type:"bold",size:"s3",color:k.colors.gray800,style:{paddingBottom:16}},u("hospital.content.description").toUpperCase()),o.createElement(x,{size:"p2",color:k.colors.gray500},g.about),r?o.createElement("a",{href:q({id:g.id,name:g.name,slug:g.slug,locale:i})},o.createElement("div",{className:"btn-wrapper"},o.createElement(w,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment")))):o.createElement("a",{href:q({id:g.id,name:g.name,slug:g.slug,locale:i})},o.createElement(x,{size:"s4",color:"#2D87F3",as:"span","data-event-category":p,"data-event-action":"See Full Hospital Profile","data-event-label":D(i)+q({id:g.id,name:g.name,slug:g.slug,locale:i})},u("home.seeHospital"))))))),o.createElement(Qt,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))};var Yt="_2UKyiK1",Jt="E5ga-tI",ea="_8Y2nWXX",ta="d0T7kSP";const aa=({open:e,onClose:t,children:a,profileModalProps:n})=>{const{t:i}=E();return o.createElement(je,Object.assign({className:Yt,opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",styles:{inner:{padding:0,justifyContent:"flex-end",borderRadius:0},modal:{height:"100%",borderRadius:0},body:{padding:"24px",maxHeight:"100%"}},title:"Profile"},n),o.createElement("div",{className:Jt},o.createElement("div",{className:ea},i("profilePanel.modal.heading")),o.createElement("div",{className:ta,onClick:t},o.createElement(Re,null))),a)};var oa=p(((e,t)=>({root:{},authorBadge:{background:"yellow"}})));Se.extend(ze);const na=n({}),ia=({siteType:e})=>{const{t:t}=E(),{handleMakeAppointment:a,doctorId:n,hospitalId:l,currentUrl:r}=i(na);return o.createElement(w,{theme:e,color:"primary",size:"xs",onClick:e=>{null==a||a(n,l),e.stopPropagation()},dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:r,icon:o.createElement(L,{className:"buttonIcon",size:18}),iconPosition:"right",style:{whiteSpace:"nowrap"}},o.createElement("span",null,t("careBooking.bookAnAppointment")))},la=e=>{const{className:t="",community:a,name:n,username:r,url:c,avatar:d,role:m,title:p,userType:g="user",expertId:h,isMarryBaby:v,doctorId:f,hospitalId:b,hasQuickBooking:w,handleMakeAppointment:x,communityTrackingAttr:y,isAnonymous:C,showDetailPopup:N,subLine:L,authActionWrapper:T,profileProps:I,profileModalProps:S,extendEle:P,avatarProps:j,hideInfo:F,timeText:B,onCloseFromPost:O,avatarIcon:V,badgeIconSize:R,hideBackground:D,children:U,styles:W}=e,{data:{locale:Z,router:H,env:{isMarryBaby:q,togetherBasePath:_}}}=i(z),{t:G}=E(),{classes:Q}=oa(void 0,{name:"CardAuthor",styles:W}),X="boolean"==typeof v?v:q,K=X?"marryBaby":"helloSites",$=C?G("cardPost.anonymous"):n||r||"",Y=C?M.getAssetPath("avatar.jpg"):d,J=C?void 0:m,[ee,te]=l(!1),{asPath:ae}=H||{},ne=`https://${Pe[Z]}${ae}`,ie=e=>{if(C||"chatbot"===g)return!1;N?re(!0):c&&(window.location.href=c)};s((()=>{ye(ee)}),[ee]);const[le,re]=l(!1),se="expert"===(null==e?void 0:e.role),[ce,de]=l(null);return s((()=>{le&&!ce&&Promise.resolve().then((function(){return Wn})).then((e=>{de((()=>e.ProfileDetail))}))}),[le]),o.createElement(na.Provider,{value:{handleMakeAppointment:x,doctorId:f,hospitalId:b,currentUrl:ne}},o.createElement(aa,{open:le,onClose:()=>re(!1),profileModalProps:S},ce&&o.createElement(ce,Object.assign({authorProps:{userId:null==e?void 0:e.userId,avatar:Y,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title},authActionWrapper:T,onCloseFromPost:()=>{re(!1),null==O||O()}},I))),"expert"===J&&h?o.createElement(_t,{isOpen:ee,onClose:()=>te(!1),expertId:h}):null,"expert"===J&&f?o.createElement(Rt,{isOpen:ee,onClose:()=>te(!1),doctorId:f,locale:Z}):null,"expert"===J&&b?o.createElement($t,{isOpen:ee,onClose:()=>te(!1),hospitalId:b,locale:Z}):null,o.createElement("div",{className:`hhg-card-author ${Q.root} ${t} ${se?"expert-author":""}`,"data-background":!D&&se,"data-is-marrybaby":X},o.createElement(St,{onAvatarClick:ie,avatarProps:Object.assign(Object.assign({avatar:Y,username:$},j),{style:{cursor:C||!c&&!N?"default":"pointer"}}),avatarIcon:V||se&&o.createElement(bt,{size:R||15})},U?o.createElement("div",{onClick:ie},U):!F&&o.createElement(St.Row,null,o.createElement(St.ColLeft,null,o.createElement(u,{align:"center",onClick:ie},o.createElement(St.MainText,{onClick:ie},$,"chatbot"===g?o.createElement(o.Fragment,null," ",o.createElement(A,{color:k.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}})):J&&o.createElement(oe,{className:Q.authorBadge,siteType:K,role:J,title:p,style:{verticalAlign:"bottom"}}))),L||o.createElement(St.SubTextRow,null,(null==a?void 0:a.name)&&o.createElement(St.SubText,null,o.createElement("a",Object.assign({href:(null==a?void 0:a.slug)&&a.isActive&&!a.isHidden?`${_}/${null==a?void 0:a.slug}`:void 0,className:"author-community-name"},y),`${null==a?void 0:a.name}`)),B&&o.createElement(o.Fragment,null,o.createElement(St.SubDivider,null),o.createElement(St.SubText,{className:"time-text"},B)))),w&&o.createElement(St.ColRight,null,o.createElement(ia,{siteType:K})))),P&&P))};la.BookingBtn=ia,la.MainText=St.MainText,la.SubText=St.SubText,la.SubTextRow=St.SubTextRow,la.SubDivider=St.SubDivider;const ra=e=>({message:e("notification.failure"),type:"danger"}),sa=e=>{var{size:a,color:n}=e,i=t(e,["size","color"]);return o.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99967 1.33331C4.31967 1.33331 1.33301 4.31998 1.33301 7.99998C1.33301 11.68 4.31967 14.6666 7.99967 14.6666C11.6797 14.6666 14.6663 11.68 14.6663 7.99998C14.6663 4.31998 11.6797 1.33331 7.99967 1.33331ZM7.99967 8.66665C7.63301 8.66665 7.33301 8.36665 7.33301 7.99998V5.33331C7.33301 4.96665 7.63301 4.66665 7.99967 4.66665C8.36634 4.66665 8.66634 4.96665 8.66634 5.33331V7.99998C8.66634 8.36665 8.36634 8.66665 7.99967 8.66665ZM7.33301 9.99998V11.3333H8.66634V9.99998H7.33301Z",fill:n}))};sa.defaultProps={size:24,color:k.colors.gray600};var ca="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 da=/<mocka ([^>]*)data-url="true"[^<>]*>(.*?)<\/mocka>/gim,ma=/((?:=")|(?:data-url="true">)|)(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gim,pa=/\[a\+href="([^<"]+)"(?:\+text=\"([^<"]+)")?\]/gim,ua=/<mention [^>]*data-id="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,ga=/<mention [^>]*data-id="([^<"]+)" [^\>]*data-name="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,ha=/\[mention\+id="([^<"]+)"([^\]]*)\]/gim,va=/^(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,fa=/^((https?:\/\/)?(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,ba=/<a [^>]*href="([^>"]+)"[^>]*>([^<]+)<\/a>/gim,wa=/<mocka [^\>]*data-bad-word="[^\"]*" [^\>]*data-error="true"[^\>]*>(.*?)<\/mocka>/gim,xa=({url:e,text:t,method:a})=>{const o=t.indexOf(t.trimStart()),n=t.trimEnd().length,i=t.substring(0,o),l=t.substring(o,n),r=t.substring(n);return"edit"===a?`${i}<mocka data-href="${e}" data-url="true">${l}</mocka>${r}`:"display"===a&&(e.startsWith("http://")||e.startsWith("https://"))?`${i}<a href="${e}" target="_blank">${l}</a>${r}`:t},ya=(e,t)=>e.replace(pa,((e,a,o)=>xa({text:o||a,url:a,method:t}))).replace(ba,((e,a,o)=>xa({text:o||a,url:a,method:t}))),Ea=(e,t=[])=>e.replace(ha,((e,a,o)=>{const n=t.find((e=>String(e.id)===a));if(!n){if(!o)return"";let e="";return o.replace(/\+name="([^<"]+)"/i,((t,a)=>(e=a,t))),`<mention data-id="${a}" data-name="${e}">${e}</mention>`}return`<mention data-id="${a}" data-name="${n.name}">${n.name}</mention>`})),Ca=e=>{const t=[];return e.replace(/(\&amp;)+/g,"&").replace(ma,((e,a,o)=>('="'!==a&&'data-url="true">'!==a&&t.push(o),e))),t},ka=(e,t)=>{const a=[];return e.replace(ua,((e,t)=>(a.push(t),e))).replace(ha,((e,t)=>(a.push(t),e))),t?a:Array.from(new Set(a)).slice(0,30)},Na=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Aa=e=>e.replace(wa,"$1"),La=(e,t=(e=>e))=>((e,t=(e=>e))=>{var a;return t(null===(a=e.replace(/(\&nbsp;)+/g," ").replace(/(\&amp;)+/g,"&"))||void 0===a?void 0:a.replace(/(\u200c|&zwnj;)+/g,"").replace(ma,((e,t,a)=>'="'!==t&&'data-url="true">'!==t?`<a href="${a}" target="_blank">${a}</a>`:e)).replace(da,((e,t,a)=>{var o;const n=null===(o=t.match(/data-href="([^"]*)"/im))||void 0===o?void 0:o[1];return n?`<a href="${n}" target="_blank">${a}</a>`:`<a href="${a}" target="_blank">${a}</a>`})))})((e=>e.replace(ua,((e,t,a)=>`[mention+id="${t}"+name="${a}"]`)))(Aa(e)),t),Ta=["hellobacsi.com","hellosehat.com","hellodoktor.com","hellokrupet.com","hellodoctor.com.ph","hellokhunmor.com","hellosayarwon.com","helloyishi.com.tw","helloswasthya.com","marrybaby.vn"],Ia=e=>e.match(fa)?e.startsWith("https://")||e.startsWith("http://")?e:`https://${e}`:"",Sa=(e,t)=>{const a=t.filter(Boolean);if(e&&a.length>0){return Aa(e).replace(new RegExp(`\\b(${a.map((e=>Na(e))).join("|")})\\b`,"gi"),((e,t)=>{const a=document.createElement("mocka");return a.setAttribute("data-bad-word",t),a.setAttribute("data-error","true"),a.innerText=t,`${a.outerHTML}`}))}return e},Pa=(t,a,o)=>"string"==typeof t?Promise.resolve(t):e(void 0,void 0,void 0,(function*(){var e;const n=new FormData;if(t.type.startsWith("image/gif"))n.append("image",t);else{const e=yield import("browser-image-compression"),a=yield e.default(t,{maxSizeMB:.4,maxWidthOrHeight:1536,useWebWorker:!0});n.append("image",a)}const i=o?K:$,l=yield i(O(o?X.COMMENT.IMAGE_UPLOAD:V.COMMENT.IMAGE_UPLOAD,{_locale:a}),"POST",{data:n});return(null===(e=null==l?void 0:l.data)||void 0===e?void 0:e.image)||""})),Ma=(e,t)=>{const[a,o]=l(e||[]);return{onSelectImages:n=>{const i=n.target.files;if(i)if(t&&e){t((e||a).concat(Array.from(i)))}else o((a=>{const o=e||a;return t&&t(o.concat(Array.from(i))),o.concat(Array.from(i))}))},onRemoveImage:a=>{if(t&&e){const o=e;o.splice(a,1),t(o.slice())}else o((o=>{const n=e||o;return n.splice(a,1),t&&t(n.slice()),n.slice()}))},onRemoveAllImages:()=>{t?t([]):o([])},imageSrcs:c((()=>(e||a).map((e=>"string"==typeof e?e:URL.createObjectURL(e)))),[e,a]),imageFiles:e||a}};var za="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 ja=ke.div`
962
+ `;const $t=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,hospitalId:n,locale:i,isMobile:r,overwriteProfileProps:d,avatarFallback:m=M.getAssetPath("avatar.jpg"),trackingCategory:p="Together"})=>{const{t:u}=E(),[g,h]=l(null),[v,f]=l(!1);s((()=>{if(e&&n&&String(null==g?void 0:g.id)!==String(n)){f(!0);try{h(null),B(W(Z.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:H[i]}),"get").then((e=>{h(Object.assign(Object.assign({},null==e?void 0:e._data.branch),d))}))}catch(e){console.error(e)}f(!1)}}),[e,n,null==g?void 0:g.id]);const b=(null==g?void 0:g.specialties)||[],y=c((()=>b.map((e=>e.name))),[b]);return o.createElement(o.Fragment,null,o.createElement(Gt,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},v||!g?o.createElement(qe,null):o.createElement("div",{className:"popup-content"},o.createElement("div",{className:"close-button",onClick:t},o.createElement("img",{src:Mt,style:{width:20,height:20},alt:"close-icon"})),o.createElement("div",{className:"main-info"},o.createElement("div",{className:"border-banner"}),o.createElement("div",{className:"avatar-title"},o.createElement(Xt,null,o.createElement("div",{className:"image-container"},o.createElement("div",{style:{position:"relative"}},o.createElement(Pt,{src:null==g?void 0:g.logo,className:"profile-image",alt:"avatar",fallbackSrc:m}),o.createElement("img",{className:"badge-avatar",src:zt,alt:"badge"})))),o.createElement(Kt,null,o.createElement(x,{size:"s3",type:"semiBold",className:"full-name"},null==g?void 0:g.name),o.createElement("div",{className:"specialty"},b&&o.createElement(x,{size:"p4",color:k.colors.gray800},y.join(" • "),"•"),o.createElement("a",{href:q({id:g.id,name:g.name,slug:g.slug,locale:i}),className:"organisation",target:"_blank",rel:"noreferrer"},o.createElement(x,{size:"p4",className:"organisation",color:k.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.name))))),!r&&o.createElement("a",{href:q({id:g.id,name:g.name,slug:g.slug,locale:i})},o.createElement("div",{className:"btn-wrapper"},o.createElement(w,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment"))))),o.createElement(Kt,null,o.createElement("div",{className:"experience"},o.createElement(x,{type:"bold",size:"s3",color:k.colors.gray800,style:{paddingBottom:16}},u("hospital.content.description").toUpperCase()),o.createElement(x,{size:"p2",color:k.colors.gray500},g.about),r?o.createElement("a",{href:q({id:g.id,name:g.name,slug:g.slug,locale:i})},o.createElement("div",{className:"btn-wrapper"},o.createElement(w,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment")))):o.createElement("a",{href:q({id:g.id,name:g.name,slug:g.slug,locale:i})},o.createElement(x,{size:"s4",color:"#2D87F3",as:"span","data-event-category":p,"data-event-action":"See Full Hospital Profile","data-event-label":D(i)+q({id:g.id,name:g.name,slug:g.slug,locale:i})},u("home.seeHospital"))))))),o.createElement(Qt,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))};var Yt="_2UKyiK1",Jt="E5ga-tI",ea="_8Y2nWXX",ta="d0T7kSP";const aa=({open:e,onClose:t,children:a,profileModalProps:n})=>{const{t:i}=E();return o.createElement(je,Object.assign({className:Yt,opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",styles:{inner:{padding:0,justifyContent:"flex-end",borderRadius:0},modal:{height:"100%",borderRadius:0},body:{padding:"24px",maxHeight:"100%"}},title:"Profile"},n),o.createElement("div",{className:Jt},o.createElement("div",{className:ea},i("profilePanel.modal.heading")),o.createElement("div",{className:ta,onClick:t},o.createElement(Ve,null))),a)};var oa=p(((e,t)=>({root:{},authorBadge:{background:"yellow"}})));Se.extend(ze);const na=n({}),ia=({siteType:e})=>{const{t:t}=E(),{handleMakeAppointment:a,doctorId:n,hospitalId:l,currentUrl:r}=i(na);return o.createElement(w,{theme:e,color:"primary",size:"xs",onClick:e=>{null==a||a(n,l),e.stopPropagation()},dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:r,icon:o.createElement(L,{className:"buttonIcon",size:18}),iconPosition:"right",style:{whiteSpace:"nowrap"}},o.createElement("span",null,t("careBooking.bookAnAppointment")))},la=e=>{const{className:t="",community:a,name:n,username:r,url:c,avatar:d,role:m,title:p,userType:g="user",expertId:h,isMarryBaby:v,doctorId:f,hospitalId:b,hasQuickBooking:w,handleMakeAppointment:x,communityTrackingAttr:y,isAnonymous:C,showDetailPopup:N,subLine:L,authActionWrapper:T,profileProps:I,profileModalProps:S,extendEle:P,avatarProps:j,hideInfo:F,timeText:B,onCloseFromPost:O,avatarIcon:R,badgeIconSize:V,hideBackground:D,children:U,styles:W}=e,{data:{locale:Z,router:H,env:{isMarryBaby:q,togetherBasePath:_}}}=i(z),{t:G}=E(),{classes:Q}=oa(void 0,{name:"CardAuthor",styles:W}),X="boolean"==typeof v?v:q,K=X?"marryBaby":"helloSites",$=C?G("cardPost.anonymous"):n||r||"",Y=C?M.getAssetPath("avatar.jpg"):d,J=C?void 0:m,[ee,te]=l(!1),{asPath:ae}=H||{},ne=`https://${Pe[Z]}${ae}`,ie=e=>{if(C||"chatbot"===g)return!1;N?re(!0):c&&(window.location.href=c)};s((()=>{ye(ee)}),[ee]);const[le,re]=l(!1),se="expert"===(null==e?void 0:e.role),[ce,de]=l(null);return s((()=>{le&&!ce&&Promise.resolve().then((function(){return Wn})).then((e=>{de((()=>e.ProfileDetail))}))}),[le]),o.createElement(na.Provider,{value:{handleMakeAppointment:x,doctorId:f,hospitalId:b,currentUrl:ne}},o.createElement(aa,{open:le,onClose:()=>re(!1),profileModalProps:S},ce&&o.createElement(ce,Object.assign({authorProps:{userId:null==e?void 0:e.userId,avatar:Y,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title},authActionWrapper:T,onCloseFromPost:()=>{re(!1),null==O||O()}},I))),"expert"===J&&h?o.createElement(_t,{isOpen:ee,onClose:()=>te(!1),expertId:h}):null,"expert"===J&&f?o.createElement(Vt,{isOpen:ee,onClose:()=>te(!1),doctorId:f,locale:Z}):null,"expert"===J&&b?o.createElement($t,{isOpen:ee,onClose:()=>te(!1),hospitalId:b,locale:Z}):null,o.createElement("div",{className:`hhg-card-author ${Q.root} ${t} ${se?"expert-author":""}`,"data-background":!D&&se,"data-is-marrybaby":X},o.createElement(St,{onAvatarClick:ie,avatarProps:Object.assign(Object.assign({avatar:Y,username:$},j),{style:{cursor:C||!c&&!N?"default":"pointer"}}),avatarIcon:R||se&&o.createElement(bt,{size:V||15})},U?o.createElement("div",{onClick:ie},U):!F&&o.createElement(St.Row,null,o.createElement(St.ColLeft,null,o.createElement(u,{align:"center",onClick:ie},o.createElement(St.MainText,{onClick:ie},$,"chatbot"===g?o.createElement(o.Fragment,null," ",o.createElement(A,{color:k.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}})):J&&o.createElement(oe,{className:Q.authorBadge,siteType:K,role:J,title:p,style:{verticalAlign:"bottom"}}))),L||o.createElement(St.SubTextRow,null,(null==a?void 0:a.name)&&o.createElement(St.SubText,null,o.createElement("a",Object.assign({href:(null==a?void 0:a.slug)&&a.isActive&&!a.isHidden?`${_}/${null==a?void 0:a.slug}`:void 0,className:"author-community-name"},y),`${null==a?void 0:a.name}`)),B&&o.createElement(o.Fragment,null,o.createElement(St.SubDivider,null),o.createElement(St.SubText,{className:"time-text"},B)))),w&&o.createElement(St.ColRight,null,o.createElement(ia,{siteType:K})))),P&&P))};la.BookingBtn=ia,la.MainText=St.MainText,la.SubText=St.SubText,la.SubTextRow=St.SubTextRow,la.SubDivider=St.SubDivider;const ra=e=>({message:e("notification.failure"),type:"danger"}),sa=e=>{var{size:a,color:n}=e,i=t(e,["size","color"]);return o.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99967 1.33331C4.31967 1.33331 1.33301 4.31998 1.33301 7.99998C1.33301 11.68 4.31967 14.6666 7.99967 14.6666C11.6797 14.6666 14.6663 11.68 14.6663 7.99998C14.6663 4.31998 11.6797 1.33331 7.99967 1.33331ZM7.99967 8.66665C7.63301 8.66665 7.33301 8.36665 7.33301 7.99998V5.33331C7.33301 4.96665 7.63301 4.66665 7.99967 4.66665C8.36634 4.66665 8.66634 4.96665 8.66634 5.33331V7.99998C8.66634 8.36665 8.36634 8.66665 7.99967 8.66665ZM7.33301 9.99998V11.3333H8.66634V9.99998H7.33301Z",fill:n}))};sa.defaultProps={size:24,color:k.colors.gray600};var ca="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 da=/<mocka ([^>]*)data-url="true"[^<>]*>(.*?)<\/mocka>/gim,ma=/((?:=")|(?:data-url="true">)|)(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gim,pa=/\[a\+href="([^<"]+)"(?:\+text=\"([^<"]+)")?\]/gim,ua=/<mention [^>]*data-id="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,ga=/<mention [^>]*data-id="([^<"]+)" [^\>]*data-name="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,ha=/\[mention\+id="([^<"]+)"([^\]]*)\]/gim,va=/^(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,fa=/^((https?:\/\/)?(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,ba=/<a [^>]*href="([^>"]+)"[^>]*>([^<]+)<\/a>/gim,wa=/<mocka [^\>]*data-bad-word="[^\"]*" [^\>]*data-error="true"[^\>]*>(.*?)<\/mocka>/gim,xa=({url:e,text:t,method:a})=>{const o=t.indexOf(t.trimStart()),n=t.trimEnd().length,i=t.substring(0,o),l=t.substring(o,n),r=t.substring(n);return"edit"===a?`${i}<mocka data-href="${e}" data-url="true">${l}</mocka>${r}`:"display"===a&&(e.startsWith("http://")||e.startsWith("https://"))?`${i}<a href="${e}" target="_blank">${l}</a>${r}`:t},ya=(e,t)=>e.replace(pa,((e,a,o)=>xa({text:o||a,url:a,method:t}))).replace(ba,((e,a,o)=>xa({text:o||a,url:a,method:t}))),Ea=(e,t=[])=>e.replace(ha,((e,a,o)=>{const n=t.find((e=>String(e.id)===a));if(!n){if(!o)return"";let e="";return o.replace(/\+name="([^<"]+)"/i,((t,a)=>(e=a,t))),`<mention data-id="${a}" data-name="${e}">${e}</mention>`}return`<mention data-id="${a}" data-name="${n.name}">${n.name}</mention>`})),Ca=e=>{const t=[];return e.replace(/(\&amp;)+/g,"&").replace(ma,((e,a,o)=>('="'!==a&&'data-url="true">'!==a&&t.push(o),e))),t},ka=(e,t)=>{const a=[];return e.replace(ua,((e,t)=>(a.push(t),e))).replace(ha,((e,t)=>(a.push(t),e))),t?a:Array.from(new Set(a)).slice(0,30)},Na=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Aa=e=>e.replace(wa,"$1"),La=(e,t=(e=>e))=>((e,t=(e=>e))=>{var a;return t(null===(a=e.replace(/(\&nbsp;)+/g," ").replace(/(\&amp;)+/g,"&"))||void 0===a?void 0:a.replace(/(\u200c|&zwnj;)+/g,"").replace(ma,((e,t,a)=>'="'!==t&&'data-url="true">'!==t?`<a href="${a}" target="_blank">${a}</a>`:e)).replace(da,((e,t,a)=>{var o;const n=null===(o=t.match(/data-href="([^"]*)"/im))||void 0===o?void 0:o[1];return n?`<a href="${n}" target="_blank">${a}</a>`:`<a href="${a}" target="_blank">${a}</a>`})))})((e=>e.replace(ua,((e,t,a)=>`[mention+id="${t}"+name="${a}"]`)))(Aa(e)),t),Ta=["hellobacsi.com","hellosehat.com","hellodoktor.com","hellokrupet.com","hellodoctor.com.ph","hellokhunmor.com","hellosayarwon.com","helloyishi.com.tw","helloswasthya.com","marrybaby.vn"],Ia=e=>e.match(fa)?e.startsWith("https://")||e.startsWith("http://")?e:`https://${e}`:"",Sa=(e,t)=>{const a=t.filter(Boolean);if(e&&a.length>0){return Aa(e).replace(new RegExp(`\\b(${a.map((e=>Na(e))).join("|")})\\b`,"gi"),((e,t)=>{const a=document.createElement("mocka");return a.setAttribute("data-bad-word",t),a.setAttribute("data-error","true"),a.innerText=t,`${a.outerHTML}`}))}return e},Pa=(t,a,o)=>"string"==typeof t?Promise.resolve(t):e(void 0,void 0,void 0,(function*(){var e;const n=new FormData;if(t.type.startsWith("image/gif"))n.append("image",t);else{const e=yield import("browser-image-compression"),a=yield e.default(t,{maxSizeMB:.4,maxWidthOrHeight:1536,useWebWorker:!0});n.append("image",a)}const i=o?K:$,l=yield i(O(o?X.COMMENT.IMAGE_UPLOAD:R.COMMENT.IMAGE_UPLOAD,{_locale:a}),"POST",{data:n});return(null===(e=null==l?void 0:l.data)||void 0===e?void 0:e.image)||""})),Ma=(e,t)=>{const[a,o]=l(e||[]);return{onSelectImages:n=>{const i=n.target.files;if(i)if(t&&e){t((e||a).concat(Array.from(i)))}else o((a=>{const o=e||a;return t&&t(o.concat(Array.from(i))),o.concat(Array.from(i))}))},onRemoveImage:a=>{if(t&&e){const o=e;o.splice(a,1),t(o.slice())}else o((o=>{const n=e||o;return n.splice(a,1),t&&t(n.slice()),n.slice()}))},onRemoveAllImages:()=>{t?t([]):o([])},imageSrcs:c((()=>(e||a).map((e=>"string"==typeof e?e:URL.createObjectURL(e)))),[e,a]),imageFiles:e||a}};var za="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 ja=ke.div`
963
963
  input:focus,
964
964
  textarea:focus,
965
965
  [contenteditable='true'] {
@@ -1277,7 +1277,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
1277
1277
  }
1278
1278
  }
1279
1279
  }
1280
- `;let Ba=null;function Oa(e){var t,a;let o=-1;if(void 0!==window.getSelection){const n=window.getSelection();if((null==n?void 0:n.rangeCount)&&(null==n?void 0:n.rangeCount)>0){const n=null===(t=window.getSelection())||void 0===t?void 0:t.getRangeAt(0);if(n){const t=n.cloneRange();t.selectNodeContents(e),t.setEnd(n.endContainer,n.endOffset),o=Va(t.cloneContents().childNodes,o);const i=null===(a=n.endContainer.parentElement)||void 0===a?void 0:a.closest("mocka"),l=n.endContainer.nodeValue||n.endContainer.outerHTML;i&&(null==l?void 0:l.length)&&(o=o-n.endOffset+(i.outerHTML.length-(null==i?void 0:i.outerHTML.lastIndexOf(l))))}}}return o}function Va(e,t){return e.forEach(((a,o)=>{const n=o+1===e.length;if(a.nodeType===Node.ELEMENT_NODE){const e=a.outerHTML;if(!n)return void(t+=e.length);t+=e.indexOf(">")+1,t=Va(a.childNodes,t)}else a.nodeType===Node.TEXT_NODE&&(t+=(a.nodeValue||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").length)})),t}e(void 0,void 0,void 0,(function*(){if("undefined"==typeof window)return;const e=yield import("react-quill");Ba=e.default;const t=e.Quill||Ba.Quill;t.register("modules/preserveWhiteSpace",class{constructor(e,t){this.quill=e,this.options=t,e.container.style.whiteSpace="pre-line"}});const a=t.import("blots/inline");class o extends a{static create(e){if(!e)return super.create(!1);const t=super.create(e);return o.setNodeConfigurations(t,e),t}static formats(e){return!(!e.innerText||!(e.getAttribute("data-href")||e.getAttribute("data-url")||e.getAttribute("data-error")||e.getAttribute("data-bad-word")))&&{"data-bad-word":e.getAttribute("data-bad-word"),"data-error":e.getAttribute("data-error"),"data-href":e.getAttribute("data-href"),"data-url":e.getAttribute("data-url"),"data-text":e.innerText||e.getAttribute("data-href")}}static setNodeConfigurations(e,t){var a,o;t&&(null===(o=null===(a=null==t?void 0:t["data-text"])||void 0===a?void 0:a.replace(/(\&nbsp;)+/g," "))||void 0===o?void 0:o.replace(/(\u200c|&zwnj;)+/g,""))&&(t["data-bad-word"]&&e.setAttribute("data-bad-word",t["data-bad-word"]),t["data-href"]&&e.setAttribute("data-href",t["data-href"]),t["data-error"]&&e.setAttribute("data-error",t["data-error"]),t["data-url"]&&e.setAttribute("data-url",t["data-url"]))}}o.blotName="mocka1",o.tagName="mocka",t.register(o);class n extends a{static create(e){if(!e)return super.create(!1);const t=super.create(e);return n.setNodeConfigurations(t,e),t}static formats(e){return!(!e.getAttribute("data-name")||!e.getAttribute("data-id"))&&{"data-name":e.getAttribute("data-name"),"data-id":e.getAttribute("data-id")}}static setNodeConfigurations(e,t){var a,o;t&&t["data-id"]&&(null===(o=null===(a=null==t?void 0:t["data-name"])||void 0===a?void 0:a.replace(/(\&nbsp;)+/g," "))||void 0===o?void 0:o.replace(/(\u200c|&zwnj;)+/g,""))&&(t["data-id"]&&e.setAttribute("data-id",t["data-id"]),t["data-name"]&&e.setAttribute("data-name",t["data-name"]))}}n.blotName="mention",n.tagName="mention",t.register(n)}));const Ra=(e,t)=>{var a;const{formatUrl:o,bannedWords:n=[]}=t||{},i=e.replace(/<font [^\>]*>(.+)<\/font>/gim,((e,t)=>t.replace(/<u[^\>]*>(.+)<\/u>/gim,"$1"))).replace(ga,((e,t,a,o)=>{if(o!==a){const e=a.split(" "),n=e.findIndex(((t,a)=>{const n=e.slice(0,a+1).join(" ");return!o.startsWith(n)}));if(0===n)return`@${o}`;{const a=(n<0?e:e.slice(0,n)).join(" "),i=o.slice(a.length).trim();return console.log(n,a,i),`<mention data-id="${t}" data-name="${a}">${a}</mention> ${i} `}}return e}));if(!o)return{value:Sa(i,n)};let l=(e=>e.replace(wa,((e,t)=>{const a=document.createElement("div");a.innerHTML=e;const o=a.firstChild;return(null==o?void 0:o.innerText)!==(null==o?void 0:o.getAttribute("data-bad-word"))?t:e})))((e=>{var t,a;return null===(a=null===(t=e.replace(/(\&nbsp;)+/g," "))||void 0===t?void 0:t.replace(/(\u200c|&zwnj;)+/g,""))||void 0===a?void 0:a.replace(da,((e,t,a)=>{var o;const n=null===(o=t.match(/data-href="([^"]*)"/im))||void 0===o?void 0:o[1];return!n||n===a||a.match(va)?a:n?`<a href="${n}">${a}</a>`:`<a href="${a}">${a}</a>`})).replace(ma,((e,t,a)=>{if('="'!==t&&'data-url="true">'!==t){const e=a.toLowerCase(),t=`${e.startsWith("http")?"":" https://"}${e}`;return xa({text:t,url:t,method:"edit"})}return e})).replace(ba,((e,t,a)=>xa({text:a||t,url:t,method:"edit"})))})(i));const r=(e=>{var t;return[...Ca(e),...(null===(t=e.match(da))||void 0===t?void 0:t.map((e=>{var t,a;const o=null===(t=e.match(/data-href="([^"]*)"/im))||void 0===t?void 0:t[1],n=null===(a=e.match(/>(.*?)<\/mocka>/im))||void 0===a?void 0:a[1];return o||n})))||[]].filter((e=>!!e))})(i);if(r){const e=[];let t="";return r.forEach((t=>{if(t)try{const a=new URL(t);Ta.some((e=>a.origin.endsWith(e)))||e.push(t)}catch(a){e.push(t)}})),e.length>0&&(l=l.replace(new RegExp(`data-url="true">(${e.map(Na).join("|")})<`,"gi"),'data-error="true" data-url="true">$1<').replace(new RegExp(`data-href="(${e.map(Na).join("|")})" data-url="true">`,"gi"),'data-href="$1" data-error="true" data-url="true">')),t=null===(a=r.filter((t=>-1===e.indexOf(t))))||void 0===a?void 0:a[0],{invalidUrls:e,previewUrl:t,value:Sa(l,n)}}return{value:Sa(l,n)}},Da=({html:t,onChange:a,className:n,style:c,onImagePickerClick:m,bannedWords:p=[],onInvalidUrlsChange:u,onPreviewUrlChange:g,setEditorRef:h,isReplying:v})=>{var f,b,w,y;const E=r([]);E.current=p;const[C,k]=l([]),[N,A]=l(null),{data:{locale:L}}=i(z),T=(null==p?void 0:p.join(","))||"";s((()=>{var e,t;const a=null===(t=null===(e=W.current)||void 0===e?void 0:e.getEditor())||void 0===t?void 0:t.root.innerHTML;P(a)}),[T]);const I=e=>{N&&N.url===e||(A({url:e,isFetching:!0}),B(O(V.FETCH_PREVIEW,{_locale:L}),"POST",{data:{link:e}}).then((t=>{var a,o,n,i;A({title:null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.title,description:null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.description,image:(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.image)||(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.logo),url:e})})).catch((()=>{A(null)})))},S=r(I);S.current=I;const P=d(he((e=>{if(e){const t=Ra(e,{bannedWords:E.current,formatUrl:!0}),{invalidUrls:o,previewUrl:n,value:i}=t;o&&k(o),n?S.current(n):A(null),i!==e&&(null==a||a(i))}}),500),[]);s((()=>{u&&u(C)}),[C]),s((()=>{g&&((null==N?void 0:N.url)?g({title:N.title||"",url:N.url||"",image:N.image||"",description:N.description||""}):g(null))}),[N]);const M=r(m);M.current=m;const F=Fe(),R=r({toolbar:{handlers:{image:()=>{var e;return null===(e=M.current)||void 0===e?void 0:e.call(M)},link:()=>!1},container:"#toolbar-"+F},preserveWhiteSpace:!0}),D=r(-1),W=r(null);h&&(null===(b=null===(f=W.current)||void 0===f?void 0:f.getEditor())||void 0===b?void 0:b.root)&&h(null===(y=null===(w=W.current)||void 0===w?void 0:w.getEditor())||void 0===y?void 0:y.root);const Z=()=>{var e,t,a,o,n,i,l,r;if(null===(t=null===(e=W.current)||void 0===e?void 0:e.getEditor())||void 0===t?void 0:t.root){const e=Oa(null===(o=null===(a=W.current)||void 0===a?void 0:a.getEditor())||void 0===o?void 0:o.root),t=null===(i=null===(n=W.current)||void 0===n?void 0:n.getEditor())||void 0===i?void 0:i.root.innerHTML;if(e>=0&&e<t.length){if(ka(t,!0).length<30-(v?1:0)){const e=function(e){var t,a;let o=null;if(void 0!==window.getSelection){const n=window.getSelection();if((null==n?void 0:n.rangeCount)&&(null==n?void 0:n.rangeCount)>0){const n=null===(t=window.getSelection())||void 0===t?void 0:t.getRangeAt(0);if(n){const t=n.cloneRange();t.selectNodeContents(e),t.setEnd(n.endContainer,n.endOffset);const i=(t.endContainer.nodeValue||"").substring(0,n.endOffset),l=i.lastIndexOf("@");if(l+1<i.length&&(0===l||" @"===i.slice(l-1,l+1))){const e=null===(a=i.slice(l+1))||void 0===a?void 0:a.trim();if(e){t.setStart(n.endContainer,l);const a=t.cloneRange();a.setStart(a.endContainer,l),o={name:e,rect:t.getBoundingClientRect(),replaceRange:a}}}}}}return o}(null===(r=null===(l=W.current)||void 0===l?void 0:l.getEditor())||void 0===r?void 0:r.root);e?(Q(e.name,e.rect),ee.current=e.replaceRange):(ee.current=null,Q("",null))}else ee.current=null,Q("",null);D.current=e}}else q([])},[H,q]=l([]),[_,G]=l({top:0,left:0}),Q=d(he(((t,a,o)=>e(void 0,void 0,void 0,(function*(){var e,n,i,l;if(!t||!DOMRect)return q([]);const r=yield((null===(e=we(j))||void 0===e?void 0:e.length)||0)>0?$(O(V.SEARCH_USER,{_locale:L,name:t}),"get"):K(O(X.SEARCH_USER,{_locale:L,name:t}),"get");oe(0),q(null===(i=null===(n=null==r?void 0:r.data)||void 0===n?void 0:n.users)||void 0===i?void 0:i.filter((e=>!(null==o?void 0:o.includes(String(e.id))))));const s=a,c=null===(l=J.current)||void 0===l?void 0:l.getBoundingClientRect();if(s&&c){const e=343,t=256,a={top:s.bottom-c.top,width:"min(343px, 100%)",maxHeight:t};c.width-(s.left-c.left)<e?a.right=0:a.left=s.left-c.left,G(a)}}))),500),[]),Y=(e,t)=>{var a,o,n;if(ee.current){ee.current.deleteContents();const i=document.createElement("mention");i.setAttribute("data-id",e),i.setAttribute("data-name",t),i.innerText=t;const l=document.createTextNode(" ");ee.current.insertNode(l),ee.current.insertNode(i);(null===(o=null===(a=W.current)||void 0===a?void 0:a.getEditor())||void 0===o?void 0:o.root).focus();const r=null===(n=window.getSelection())||void 0===n?void 0:n.getRangeAt(0);null==r||r.setStart(ee.current.endContainer,ee.current.endOffset),null==r||r.setEnd(ee.current.endContainer,ee.current.endOffset)}q([])},J=r(null),ee=r(null),te=r(null),[ae,oe]=l(0);return s((()=>{if(te.current){const e=te.current,t=e.children.item(ae);if(t){const a=e.getBoundingClientRect(),o=t.getBoundingClientRect();t.offsetTop<e.scrollTop?e.scrollTop=t.offsetTop:t.offsetTop+o.height>e.scrollTop+a.height&&(e.scrollTop=t.offsetTop-a.height+o.height)}}}),[ae]),s((()=>{const e=function(e){var t;(null===(t=J.current)||void 0===t?void 0:t.contains(e.target))||q([])};return window.addEventListener("click",e,{passive:!0}),()=>{window.removeEventListener("click",e)}}),[]),o.createElement(Fa,{ref:J,className:n,style:c,onKeyDownCapture:e=>{if(null==H?void 0:H.length){let t=!1;if("ArrowDown"===e.key)t=!0,oe((e=>e+1>=H.length?0:e+1));else if("Escape"===e.key)t=!0,oe(0),q([]);else if("ArrowUp"===e.key)t=!0,oe((e=>e-1<0?H.length-1:e-1));else if("Enter"===e.key||"Tab"===e.key){const e=H[ae];e&&(t=!0,Y(e.id,e.name))}if(t)return e.preventDefault(),!1}}},o.createElement(Ua,{id:F,onAddLink:(e,t)=>{var o,n;const i=D.current+1,l=null===(n=null===(o=W.current)||void 0===o?void 0:o.getEditor())||void 0===n?void 0:n.root.innerHTML,r=((null==l?void 0:l.substring(0,i))||"")+`<mocka data-href="${t}" data-url="true">${e}</mocka> `+((null==l?void 0:l.substring(i))||"");null==a||a(r),P(r)}}),Ba&&o.createElement(Ba,{ref:W,theme:"snow",value:t,onChange:e=>{null==a||a(e),P(e),Z()},onChangeSelection:()=>{Z()},modules:R.current,formats:["mocka1","mention","id","key","bold","italic","underline","list","bullet"]}),!!(null==H?void 0:H.length)&&o.createElement("div",{ref:te,className:"mention-search-container",style:_},H.map(((e,t)=>o.createElement("div",{className:"mention-search-item "+(ae===t?"item-selected":""),key:e.id,onClick:t=>{t.preventDefault(),t.stopPropagation(),Y(e.id,e.name)},onMouseEnter:()=>{oe(t)}},o.createElement(U,{className:"search-avatar",username:e.name,avatar:e.avatar}),o.createElement("div",null,o.createElement(x,{size:"p2"},e.name),o.createElement(x,{size:"p4",color:"#595959"},"@",e.username)))))))},Ua=({onAddLink:e,id:t})=>o.createElement("div",{id:"toolbar-"+t,onClick:e=>{e.preventDefault(),e.stopPropagation()}},o.createElement("span",{className:"ql-formats"},o.createElement("button",{className:"ql-bold",type:"button"}),o.createElement("button",{className:"ql-italic",type:"button"}),o.createElement("button",{className:"ql-underline",type:"button"})),o.createElement("span",{className:"ql-formats"},o.createElement("button",{className:"ql-list",value:"ordered",type:"button"}),o.createElement("button",{className:"ql-list",value:"bullet",type:"button"})),o.createElement("span",{className:"ql-formats"},o.createElement("button",{className:"ql-image",type:"button"}),e&&o.createElement(ut,{className:"link-tool-wrapper",toggleButtonContent:o.createElement("img",{className:"link-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='M9.54545 16H7.09091C6.55368 16 6.02172 15.8965 5.52539 15.6955C5.02905 15.4945 4.57808 15.1999 4.1982 14.8284C3.43101 14.0783 3 13.0609 3 12C3 10.9391 3.43101 9.92172 4.1982 9.17157C4.96539 8.42143 6.00593 8 7.09091 8H9.54545M13.9256 8H16.9091C17.4463 8 17.9783 8.10346 18.4746 8.30448C18.9709 8.5055 19.4219 8.80014 19.8018 9.17157C20.1817 9.54301 20.483 9.98396 20.6886 10.4693C20.8942 10.9546 21 11.4747 21 12C21 12.5253 20.8942 13.0454 20.6886 13.5307C20.483 14.016 20.1817 14.457 19.8018 14.8284C19.4219 15.1999 18.9709 15.4945 18.4746 15.6955C17.9783 15.8965 17.4463 16 16.9091 16H13.9256' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9 12H15' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"}),buttonProps:{size:"md",color:"transparent"},align:"end"},(({setShow:t})=>o.createElement(Za,{onAddUrl:e,setShow:t}))))),Wa=["notification.limitUrlDomain","notification.urlWrongFormat"],Za=({onAddUrl:e,setShow:t})=>{const{data:{env:{isMarryBaby:a}}}=i(z),{t:n}=E(),[r,s]=l(""),[c,d]=l(""),[m,p]=l(-1),u=r.trim()&&c.trim()&&m<0;return o.createElement("div",{className:"link-tool-popover"},o.createElement(ge,{name:"url",value:r,size:"md",label:"URL",placeholder:n("placeholder.enterUrlHere"),type:"text",className:"link-input-url",onChange:e=>{s(e),(e=>{const t=Ia(e.trim());try{const e=new URL(t);return e.protocol.startsWith("http")?Ta.some((t=>e.origin.endsWith("/"+t)||e.origin.endsWith("."+t)))?(p(-1),!0):(p(0),!1):(p(1),!1)}catch(e){return p(1),!1}})(e)}}),m>=0&&o.createElement(x,{size:"c2",className:"error-text"},n(Wa[m])),o.createElement(ge,{name:"text",value:c,size:"md",label:n("createPost.urlText"),placeholder:n("placeholder.enterUrlTextHere"),type:"text",className:"link-input-text",onChange:e=>d(e)}),o.createElement("div",{"data-is-marrybaby":a,className:"link-input-button-wrapper"},o.createElement(w,{theme:a?"marryBaby":"helloSites",size:"sm",color:"primary",className:"link-input-button",onClick:()=>{u&&(e(c.trim(),Ia(r.trim())),t&&t(!1))},isDisabled:!u},n("insert"))))},Ha=({className:e,style:t,bannedWords:a=[],value:n,onChange:i,onPreviewUrlChange:c,onInvalidUrlsChange:d,onImageFilesChange:m,imageFiles:p,isReplying:u})=>{const{t:g}=E(),[h,v]=l(null),f=r(null),{onSelectImages:b,onRemoveImage:w,imageSrcs:y}=Ma(p,m);return s((()=>{c&&((null==h?void 0:h.url)?c({title:h.title||"",url:h.url||"",image:h.image||"",description:h.description||""}):c(null))}),[h]),o.createElement(ja,{className:e,style:t},o.createElement(x,{size:"p4",className:"description-label"},g("createPost.popup.description")),o.createElement("div",{className:"textarea-control"},o.createElement("div",{className:"textarea-wrapper"},o.createElement(Da,{html:n||"",onChange:i,bannedWords:a,onImagePickerClick:()=>{var e;return null===(e=f.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:v,onInvalidUrlsChange:d,isReplying:u}))),o.createElement(x,{size:"p4",className:"count-string"},g("character"),": ",C(n||"").length),(!y||0===y.length)&&h&&o.createElement("div",{className:"link-preview-wrapper"},h.isFetching?o.createElement(qe,null):o.createElement(o.Fragment,null,o.createElement(Ge,{title:h.title,url:h.url||"#",image:h.image,noRefetch:!0}),o.createElement("img",{src:za,className:"icon-close",onClick:()=>v(null)}))),o.createElement("input",{ref:f,type:"file",accept:"image/png, image/gif, image/jpeg",multiple:!0,style:{display:"none"},onChange:b}),y.length>Y?o.createElement("div",{className:"input-notification"},o.createElement("img",{src:ca}),o.createElement(x,{size:"p4",color:k.colors.alertWarning},g("createPost.popup.warningImage"))):null,y.length>0&&o.createElement("div",{className:"image-gallery"},y.map(((e,t)=>o.createElement("div",{key:t,className:"image-item"},o.createElement("img",{src:e}),o.createElement("img",{className:"close-btn",src:za,onClick:()=>w(t)}))))))},qa=ke.div`
1280
+ `;let Ba=null;function Oa(e){var t,a;let o=-1;if(void 0!==window.getSelection){const n=window.getSelection();if((null==n?void 0:n.rangeCount)&&(null==n?void 0:n.rangeCount)>0){const n=null===(t=window.getSelection())||void 0===t?void 0:t.getRangeAt(0);if(n){const t=n.cloneRange();t.selectNodeContents(e),t.setEnd(n.endContainer,n.endOffset),o=Ra(t.cloneContents().childNodes,o);const i=null===(a=n.endContainer.parentElement)||void 0===a?void 0:a.closest("mocka"),l=n.endContainer.nodeValue||n.endContainer.outerHTML;i&&(null==l?void 0:l.length)&&(o=o-n.endOffset+(i.outerHTML.length-(null==i?void 0:i.outerHTML.lastIndexOf(l))))}}}return o}function Ra(e,t){return e.forEach(((a,o)=>{const n=o+1===e.length;if(a.nodeType===Node.ELEMENT_NODE){const e=a.outerHTML;if(!n)return void(t+=e.length);t+=e.indexOf(">")+1,t=Ra(a.childNodes,t)}else a.nodeType===Node.TEXT_NODE&&(t+=(a.nodeValue||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").length)})),t}e(void 0,void 0,void 0,(function*(){if("undefined"==typeof window)return;const e=yield import("react-quill");Ba=e.default;const t=e.Quill||Ba.Quill;t.register("modules/preserveWhiteSpace",class{constructor(e,t){this.quill=e,this.options=t,e.container.style.whiteSpace="pre-line"}});const a=t.import("blots/inline");class o extends a{static create(e){if(!e)return super.create(!1);const t=super.create(e);return o.setNodeConfigurations(t,e),t}static formats(e){return!(!e.innerText||!(e.getAttribute("data-href")||e.getAttribute("data-url")||e.getAttribute("data-error")||e.getAttribute("data-bad-word")))&&{"data-bad-word":e.getAttribute("data-bad-word"),"data-error":e.getAttribute("data-error"),"data-href":e.getAttribute("data-href"),"data-url":e.getAttribute("data-url"),"data-text":e.innerText||e.getAttribute("data-href")}}static setNodeConfigurations(e,t){var a,o;t&&(null===(o=null===(a=null==t?void 0:t["data-text"])||void 0===a?void 0:a.replace(/(\&nbsp;)+/g," "))||void 0===o?void 0:o.replace(/(\u200c|&zwnj;)+/g,""))&&(t["data-bad-word"]&&e.setAttribute("data-bad-word",t["data-bad-word"]),t["data-href"]&&e.setAttribute("data-href",t["data-href"]),t["data-error"]&&e.setAttribute("data-error",t["data-error"]),t["data-url"]&&e.setAttribute("data-url",t["data-url"]))}}o.blotName="mocka1",o.tagName="mocka",t.register(o);class n extends a{static create(e){if(!e)return super.create(!1);const t=super.create(e);return n.setNodeConfigurations(t,e),t}static formats(e){return!(!e.getAttribute("data-name")||!e.getAttribute("data-id"))&&{"data-name":e.getAttribute("data-name"),"data-id":e.getAttribute("data-id")}}static setNodeConfigurations(e,t){var a,o;t&&t["data-id"]&&(null===(o=null===(a=null==t?void 0:t["data-name"])||void 0===a?void 0:a.replace(/(\&nbsp;)+/g," "))||void 0===o?void 0:o.replace(/(\u200c|&zwnj;)+/g,""))&&(t["data-id"]&&e.setAttribute("data-id",t["data-id"]),t["data-name"]&&e.setAttribute("data-name",t["data-name"]))}}n.blotName="mention",n.tagName="mention",t.register(n)}));const Va=(e,t)=>{var a;const{formatUrl:o,bannedWords:n=[]}=t||{},i=e.replace(/<font [^\>]*>(.+)<\/font>/gim,((e,t)=>t.replace(/<u[^\>]*>(.+)<\/u>/gim,"$1"))).replace(ga,((e,t,a,o)=>{if(o!==a){const e=a.split(" "),n=e.findIndex(((t,a)=>{const n=e.slice(0,a+1).join(" ");return!o.startsWith(n)}));if(0===n)return`@${o}`;{const a=(n<0?e:e.slice(0,n)).join(" "),i=o.slice(a.length).trim();return console.log(n,a,i),`<mention data-id="${t}" data-name="${a}">${a}</mention> ${i} `}}return e}));if(!o)return{value:Sa(i,n)};let l=(e=>e.replace(wa,((e,t)=>{const a=document.createElement("div");a.innerHTML=e;const o=a.firstChild;return(null==o?void 0:o.innerText)!==(null==o?void 0:o.getAttribute("data-bad-word"))?t:e})))((e=>{var t,a;return null===(a=null===(t=e.replace(/(\&nbsp;)+/g," "))||void 0===t?void 0:t.replace(/(\u200c|&zwnj;)+/g,""))||void 0===a?void 0:a.replace(da,((e,t,a)=>{var o;const n=null===(o=t.match(/data-href="([^"]*)"/im))||void 0===o?void 0:o[1];return!n||n===a||a.match(va)?a:n?`<a href="${n}">${a}</a>`:`<a href="${a}">${a}</a>`})).replace(ma,((e,t,a)=>{if('="'!==t&&'data-url="true">'!==t){const e=a.toLowerCase(),t=`${e.startsWith("http")?"":" https://"}${e}`;return xa({text:t,url:t,method:"edit"})}return e})).replace(ba,((e,t,a)=>xa({text:a||t,url:t,method:"edit"})))})(i));const r=(e=>{var t;return[...Ca(e),...(null===(t=e.match(da))||void 0===t?void 0:t.map((e=>{var t,a;const o=null===(t=e.match(/data-href="([^"]*)"/im))||void 0===t?void 0:t[1],n=null===(a=e.match(/>(.*?)<\/mocka>/im))||void 0===a?void 0:a[1];return o||n})))||[]].filter((e=>!!e))})(i);if(r){const e=[];let t="";return r.forEach((t=>{if(t)try{const a=new URL(t);Ta.some((e=>a.origin.endsWith(e)))||e.push(t)}catch(a){e.push(t)}})),e.length>0&&(l=l.replace(new RegExp(`data-url="true">(${e.map(Na).join("|")})<`,"gi"),'data-error="true" data-url="true">$1<').replace(new RegExp(`data-href="(${e.map(Na).join("|")})" data-url="true">`,"gi"),'data-href="$1" data-error="true" data-url="true">')),t=null===(a=r.filter((t=>-1===e.indexOf(t))))||void 0===a?void 0:a[0],{invalidUrls:e,previewUrl:t,value:Sa(l,n)}}return{value:Sa(l,n)}},Da=({html:t,onChange:a,className:n,style:c,onImagePickerClick:m,bannedWords:p=[],onInvalidUrlsChange:u,onPreviewUrlChange:g,setEditorRef:h,isReplying:v})=>{var f,b,w,y;const E=r([]);E.current=p;const[C,k]=l([]),[N,A]=l(null),{data:{locale:L}}=i(z),T=(null==p?void 0:p.join(","))||"";s((()=>{var e,t;const a=null===(t=null===(e=W.current)||void 0===e?void 0:e.getEditor())||void 0===t?void 0:t.root.innerHTML;P(a)}),[T]);const I=e=>{N&&N.url===e||(A({url:e,isFetching:!0}),B(O(R.FETCH_PREVIEW,{_locale:L}),"POST",{data:{link:e}}).then((t=>{var a,o,n,i;A({title:null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.title,description:null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.description,image:(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.image)||(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.logo),url:e})})).catch((()=>{A(null)})))},S=r(I);S.current=I;const P=d(he((e=>{if(e){const t=Va(e,{bannedWords:E.current,formatUrl:!0}),{invalidUrls:o,previewUrl:n,value:i}=t;o&&k(o),n?S.current(n):A(null),i!==e&&(null==a||a(i))}}),500),[]);s((()=>{u&&u(C)}),[C]),s((()=>{g&&((null==N?void 0:N.url)?g({title:N.title||"",url:N.url||"",image:N.image||"",description:N.description||""}):g(null))}),[N]);const M=r(m);M.current=m;const F=Fe(),V=r({toolbar:{handlers:{image:()=>{var e;return null===(e=M.current)||void 0===e?void 0:e.call(M)},link:()=>!1},container:"#toolbar-"+F},preserveWhiteSpace:!0}),D=r(-1),W=r(null);h&&(null===(b=null===(f=W.current)||void 0===f?void 0:f.getEditor())||void 0===b?void 0:b.root)&&h(null===(y=null===(w=W.current)||void 0===w?void 0:w.getEditor())||void 0===y?void 0:y.root);const Z=()=>{var e,t,a,o,n,i,l,r;if(null===(t=null===(e=W.current)||void 0===e?void 0:e.getEditor())||void 0===t?void 0:t.root){const e=Oa(null===(o=null===(a=W.current)||void 0===a?void 0:a.getEditor())||void 0===o?void 0:o.root),t=null===(i=null===(n=W.current)||void 0===n?void 0:n.getEditor())||void 0===i?void 0:i.root.innerHTML;if(e>=0&&e<t.length){if(ka(t,!0).length<30-(v?1:0)){const e=function(e){var t,a;let o=null;if(void 0!==window.getSelection){const n=window.getSelection();if((null==n?void 0:n.rangeCount)&&(null==n?void 0:n.rangeCount)>0){const n=null===(t=window.getSelection())||void 0===t?void 0:t.getRangeAt(0);if(n){const t=n.cloneRange();t.selectNodeContents(e),t.setEnd(n.endContainer,n.endOffset);const i=(t.endContainer.nodeValue||"").substring(0,n.endOffset),l=i.lastIndexOf("@");if(l+1<i.length&&(0===l||" @"===i.slice(l-1,l+1))){const e=null===(a=i.slice(l+1))||void 0===a?void 0:a.trim();if(e){t.setStart(n.endContainer,l);const a=t.cloneRange();a.setStart(a.endContainer,l),o={name:e,rect:t.getBoundingClientRect(),replaceRange:a}}}}}}return o}(null===(r=null===(l=W.current)||void 0===l?void 0:l.getEditor())||void 0===r?void 0:r.root);e?(Q(e.name,e.rect),ee.current=e.replaceRange):(ee.current=null,Q("",null))}else ee.current=null,Q("",null);D.current=e}}else q([])},[H,q]=l([]),[_,G]=l({top:0,left:0}),Q=d(he(((t,a,o)=>e(void 0,void 0,void 0,(function*(){var e,n,i,l;if(!t||!DOMRect)return q([]);const r=yield((null===(e=we(j))||void 0===e?void 0:e.length)||0)>0?$(O(R.SEARCH_USER,{_locale:L,name:t}),"get"):K(O(X.SEARCH_USER,{_locale:L,name:t}),"get");oe(0),q(null===(i=null===(n=null==r?void 0:r.data)||void 0===n?void 0:n.users)||void 0===i?void 0:i.filter((e=>!(null==o?void 0:o.includes(String(e.id))))));const s=a,c=null===(l=J.current)||void 0===l?void 0:l.getBoundingClientRect();if(s&&c){const e=343,t=256,a={top:s.bottom-c.top,width:"min(343px, 100%)",maxHeight:t};c.width-(s.left-c.left)<e?a.right=0:a.left=s.left-c.left,G(a)}}))),500),[]),Y=(e,t)=>{var a,o,n;if(ee.current){ee.current.deleteContents();const i=document.createElement("mention");i.setAttribute("data-id",e),i.setAttribute("data-name",t),i.innerText=t;const l=document.createTextNode(" ");ee.current.insertNode(l),ee.current.insertNode(i);(null===(o=null===(a=W.current)||void 0===a?void 0:a.getEditor())||void 0===o?void 0:o.root).focus();const r=null===(n=window.getSelection())||void 0===n?void 0:n.getRangeAt(0);null==r||r.setStart(ee.current.endContainer,ee.current.endOffset),null==r||r.setEnd(ee.current.endContainer,ee.current.endOffset)}q([])},J=r(null),ee=r(null),te=r(null),[ae,oe]=l(0);return s((()=>{if(te.current){const e=te.current,t=e.children.item(ae);if(t){const a=e.getBoundingClientRect(),o=t.getBoundingClientRect();t.offsetTop<e.scrollTop?e.scrollTop=t.offsetTop:t.offsetTop+o.height>e.scrollTop+a.height&&(e.scrollTop=t.offsetTop-a.height+o.height)}}}),[ae]),s((()=>{const e=function(e){var t;(null===(t=J.current)||void 0===t?void 0:t.contains(e.target))||q([])};return window.addEventListener("click",e,{passive:!0}),()=>{window.removeEventListener("click",e)}}),[]),o.createElement(Fa,{ref:J,className:n,style:c,onKeyDownCapture:e=>{if(null==H?void 0:H.length){let t=!1;if("ArrowDown"===e.key)t=!0,oe((e=>e+1>=H.length?0:e+1));else if("Escape"===e.key)t=!0,oe(0),q([]);else if("ArrowUp"===e.key)t=!0,oe((e=>e-1<0?H.length-1:e-1));else if("Enter"===e.key||"Tab"===e.key){const e=H[ae];e&&(t=!0,Y(e.id,e.name))}if(t)return e.preventDefault(),!1}}},o.createElement(Ua,{id:F,onAddLink:(e,t)=>{var o,n;const i=D.current+1,l=null===(n=null===(o=W.current)||void 0===o?void 0:o.getEditor())||void 0===n?void 0:n.root.innerHTML,r=((null==l?void 0:l.substring(0,i))||"")+`<mocka data-href="${t}" data-url="true">${e}</mocka> `+((null==l?void 0:l.substring(i))||"");null==a||a(r),P(r)}}),Ba&&o.createElement(Ba,{ref:W,theme:"snow",value:t,onChange:e=>{null==a||a(e),P(e),Z()},onChangeSelection:()=>{Z()},modules:V.current,formats:["mocka1","mention","id","key","bold","italic","underline","list","bullet"]}),!!(null==H?void 0:H.length)&&o.createElement("div",{ref:te,className:"mention-search-container",style:_},H.map(((e,t)=>o.createElement("div",{className:"mention-search-item "+(ae===t?"item-selected":""),key:e.id,onClick:t=>{t.preventDefault(),t.stopPropagation(),Y(e.id,e.name)},onMouseEnter:()=>{oe(t)}},o.createElement(U,{className:"search-avatar",username:e.name,avatar:e.avatar}),o.createElement("div",null,o.createElement(x,{size:"p2"},e.name),o.createElement(x,{size:"p4",color:"#595959"},"@",e.username)))))))},Ua=({onAddLink:e,id:t})=>o.createElement("div",{id:"toolbar-"+t,onClick:e=>{e.preventDefault(),e.stopPropagation()}},o.createElement("span",{className:"ql-formats"},o.createElement("button",{className:"ql-bold",type:"button"}),o.createElement("button",{className:"ql-italic",type:"button"}),o.createElement("button",{className:"ql-underline",type:"button"})),o.createElement("span",{className:"ql-formats"},o.createElement("button",{className:"ql-list",value:"ordered",type:"button"}),o.createElement("button",{className:"ql-list",value:"bullet",type:"button"})),o.createElement("span",{className:"ql-formats"},o.createElement("button",{className:"ql-image",type:"button"}),e&&o.createElement(ut,{className:"link-tool-wrapper",toggleButtonContent:o.createElement("img",{className:"link-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='M9.54545 16H7.09091C6.55368 16 6.02172 15.8965 5.52539 15.6955C5.02905 15.4945 4.57808 15.1999 4.1982 14.8284C3.43101 14.0783 3 13.0609 3 12C3 10.9391 3.43101 9.92172 4.1982 9.17157C4.96539 8.42143 6.00593 8 7.09091 8H9.54545M13.9256 8H16.9091C17.4463 8 17.9783 8.10346 18.4746 8.30448C18.9709 8.5055 19.4219 8.80014 19.8018 9.17157C20.1817 9.54301 20.483 9.98396 20.6886 10.4693C20.8942 10.9546 21 11.4747 21 12C21 12.5253 20.8942 13.0454 20.6886 13.5307C20.483 14.016 20.1817 14.457 19.8018 14.8284C19.4219 15.1999 18.9709 15.4945 18.4746 15.6955C17.9783 15.8965 17.4463 16 16.9091 16H13.9256' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9 12H15' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"}),buttonProps:{size:"md",color:"transparent"},align:"end"},(({setShow:t})=>o.createElement(Za,{onAddUrl:e,setShow:t}))))),Wa=["notification.limitUrlDomain","notification.urlWrongFormat"],Za=({onAddUrl:e,setShow:t})=>{const{data:{env:{isMarryBaby:a}}}=i(z),{t:n}=E(),[r,s]=l(""),[c,d]=l(""),[m,p]=l(-1),u=r.trim()&&c.trim()&&m<0;return o.createElement("div",{className:"link-tool-popover"},o.createElement(ge,{name:"url",value:r,size:"md",label:"URL",placeholder:n("placeholder.enterUrlHere"),type:"text",className:"link-input-url",onChange:e=>{s(e),(e=>{const t=Ia(e.trim());try{const e=new URL(t);return e.protocol.startsWith("http")?Ta.some((t=>e.origin.endsWith("/"+t)||e.origin.endsWith("."+t)))?(p(-1),!0):(p(0),!1):(p(1),!1)}catch(e){return p(1),!1}})(e)}}),m>=0&&o.createElement(x,{size:"c2",className:"error-text"},n(Wa[m])),o.createElement(ge,{name:"text",value:c,size:"md",label:n("createPost.urlText"),placeholder:n("placeholder.enterUrlTextHere"),type:"text",className:"link-input-text",onChange:e=>d(e)}),o.createElement("div",{"data-is-marrybaby":a,className:"link-input-button-wrapper"},o.createElement(w,{theme:a?"marryBaby":"helloSites",size:"sm",color:"primary",className:"link-input-button",onClick:()=>{u&&(e(c.trim(),Ia(r.trim())),t&&t(!1))},isDisabled:!u},n("insert"))))},Ha=({className:e,style:t,bannedWords:a=[],value:n,onChange:i,onPreviewUrlChange:c,onInvalidUrlsChange:d,onImageFilesChange:m,imageFiles:p,isReplying:u})=>{const{t:g}=E(),[h,v]=l(null),f=r(null),{onSelectImages:b,onRemoveImage:w,imageSrcs:y}=Ma(p,m);return s((()=>{c&&((null==h?void 0:h.url)?c({title:h.title||"",url:h.url||"",image:h.image||"",description:h.description||""}):c(null))}),[h]),o.createElement(ja,{className:e,style:t},o.createElement(x,{size:"p4",className:"description-label"},g("createPost.popup.description")),o.createElement("div",{className:"textarea-control"},o.createElement("div",{className:"textarea-wrapper"},o.createElement(Da,{html:n||"",onChange:i,bannedWords:a,onImagePickerClick:()=>{var e;return null===(e=f.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:v,onInvalidUrlsChange:d,isReplying:u}))),o.createElement(x,{size:"p4",className:"count-string"},g("character"),": ",C(n||"").length),(!y||0===y.length)&&h&&o.createElement("div",{className:"link-preview-wrapper"},h.isFetching?o.createElement(qe,null):o.createElement(o.Fragment,null,o.createElement(Ge,{title:h.title,url:h.url||"#",image:h.image,noRefetch:!0}),o.createElement("img",{src:za,className:"icon-close",onClick:()=>v(null)}))),o.createElement("input",{ref:f,type:"file",accept:"image/png, image/gif, image/jpeg",multiple:!0,style:{display:"none"},onChange:b}),y.length>Y?o.createElement("div",{className:"input-notification"},o.createElement("img",{src:ca}),o.createElement(x,{size:"p4",color:k.colors.alertWarning},g("createPost.popup.warningImage"))):null,y.length>0&&o.createElement("div",{className:"image-gallery"},y.map(((e,t)=>o.createElement("div",{key:t,className:"image-item"},o.createElement("img",{src:e}),o.createElement("img",{className:"close-btn",src:za,onClick:()=>w(t)}))))))},qa=ke.div`
1281
1281
  input:focus,
1282
1282
  textarea:focus,
1283
1283
  [contenteditable='true'] {
@@ -1384,7 +1384,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
1384
1384
  }
1385
1385
  }
1386
1386
  }
1387
- `,Xa=({className:t,style:a,topics:n,communityId:d,onChange:m,isLoading:p,disabled:u,forceTopics:g,selectedTopics:h,noFetch:v})=>{const{data:{locale:f,env:{isMarryBaby:b}}}=i(z),[w,x]=l(n?[...n]:[]),[y,E]=l(h?[...h]:[]),[C,k]=l(!1),N=r(n);N.current=n,s((()=>{var t;!d||v||(null===(t=N.current)||void 0===t?void 0:t.length)||(x([]),k(!0),e(void 0,void 0,void 0,(function*(){var e;try{const t=yield B(O(V.TOPIC.LIST,{communityId:d,_locale:f}),"GET"),a=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.topics;Array.isArray(a)&&x((()=>(null==a?void 0:a.map(re).sort(((e,t)=>(e.order||0)-(t.order||0))))||[]))}catch(e){console.log(e),k(!1)}k(!1)})))}),[d,v]);const A=null==n?void 0:n.map((e=>e.id)).join("-"),L=null==w?void 0:w.map((e=>e.id)).join("-"),T=null==g?void 0:g.map((e=>e.id)).join("-");s((()=>{n&&void 0!==A&&A!==L&&x(n)}),[n,A,L]);const I=c((()=>w.filter((e=>!(null==g?void 0:g.some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)))))),[L,T]);return o.createElement(Qa,{"data-is-marrybaby":b,className:t,style:a},g.map((e=>o.createElement(Ka,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:!0,selected:!0}))),I.map((e=>o.createElement(Ka,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:u,selected:(h||y).some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)),onClick:()=>{const t=h||y,a=t.findIndex((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId));-1!==a?t.splice(a,1):t.push(e),m&&h?m(t.slice()):(m&&m(t.slice()),E(t.slice()))}}))),(p||C)&&o.createElement(qe,{className:"topic-spinner"}))},Ka=({topic:e,disabled:t,selected:a,onClick:n})=>o.createElement("div",{className:"tag-item"+(a?" --active":""),"data-disabled":t,onClick:t?void 0:n},e.name),$a=ke.div`
1387
+ `,Xa=({className:t,style:a,topics:n,communityId:d,onChange:m,isLoading:p,disabled:u,forceTopics:g,selectedTopics:h,noFetch:v})=>{const{data:{locale:f,env:{isMarryBaby:b}}}=i(z),[w,x]=l(n?[...n]:[]),[y,E]=l(h?[...h]:[]),[C,k]=l(!1),N=r(n);N.current=n,s((()=>{var t;!d||v||(null===(t=N.current)||void 0===t?void 0:t.length)||(x([]),k(!0),e(void 0,void 0,void 0,(function*(){var e;try{const t=yield B(O(R.TOPIC.LIST,{communityId:d,_locale:f}),"GET"),a=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.topics;Array.isArray(a)&&x((()=>(null==a?void 0:a.map(re).sort(((e,t)=>(e.order||0)-(t.order||0))))||[]))}catch(e){console.log(e),k(!1)}k(!1)})))}),[d,v]);const A=null==n?void 0:n.map((e=>e.id)).join("-"),L=null==w?void 0:w.map((e=>e.id)).join("-"),T=null==g?void 0:g.map((e=>e.id)).join("-");s((()=>{n&&void 0!==A&&A!==L&&x(n)}),[n,A,L]);const I=c((()=>w.filter((e=>!(null==g?void 0:g.some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)))))),[L,T]);return o.createElement(Qa,{"data-is-marrybaby":b,className:t,style:a},g.map((e=>o.createElement(Ka,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:!0,selected:!0}))),I.map((e=>o.createElement(Ka,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:u,selected:(h||y).some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)),onClick:()=>{const t=h||y,a=t.findIndex((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId));-1!==a?t.splice(a,1):t.push(e),m&&h?m(t.slice()):(m&&m(t.slice()),E(t.slice()))}}))),(p||C)&&o.createElement(qe,{className:"topic-spinner"}))},Ka=({topic:e,disabled:t,selected:a,onClick:n})=>o.createElement("div",{className:"tag-item"+(a?" --active":""),"data-disabled":t,onClick:t?void 0:n},e.name),$a=ke.div`
1388
1388
  position: relative;
1389
1389
  display: flex;
1390
1390
  height: 100%;
@@ -1519,7 +1519,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
1519
1519
  display: inline-block;
1520
1520
  vertical-align: middle;
1521
1521
  }
1522
- `,eo=({className:t,style:a,onPostCreatedEdited:n,onClose:r,communities:c=[],forceSelectCommunity:d,forceSelectTopics:m,articleId:p,optionalTopic:u,editPostData:h,defaultCommunity:v,defaultTopics:f,noFetchTopic:b,hideTopicList:N,selectAskDoctor:A,showAskDoctorOptions:L})=>{const I=!!(null==h?void 0:h.id),{data:{locale:S,env:{isMarryBaby:P}},action:{pushNotifications:j,sanitizeFunction:F}}=i(z),{t:B}=E(),[R,D]=l(!1),[U,W]=l(A),[Z,H]=l(!1),[q,_]=l(!1),[G,Q]=l(""),[X,K]=l(""),[J,ee]=l(d?{label:d.name,value:`${d.id||""}-${d.mappedCategoryId||""}`}:{label:B("community.choose"),value:""}),[te,ae]=l([...m]||[]),[oe,ie]=l([]),[le,re]=l([]),ce=d||c.find((e=>`${e.id||""}-${e.mappedCategoryId||""}`===J.value)),de=d?[d]:c.filter((e=>e.isActive)).sort(((e,t)=>e.name>t.name?1:e.name<t.name?-1:0)),[me,pe]=l(null),[ue,ge]=l([]),he=G&&C(X)&&(u||!u&&te.length>0)&&ce&&(!oe||oe.length<=Y)&&!(null==ue?void 0:ue.length)&&!q;s((()=>{if(h){const e=h;Q(e.title||""),K(Ea(ya(e.description||"","edit"),e.mentions)),ee({label:e.community.name,value:`${e.community.id||""}-${e.community.mappedCategoryId||""}`}),ae(e.topics||[]),ie(e.photos||[]),D(!!e.isAnonymous||!1),W(!!e.isAskDoctor||!1)}else v&&ee({label:v.name,value:`${v.id||""}-${v.mappedCategoryId||""}`}),f&&ae(f)}),[]);const ve=()=>e(void 0,void 0,void 0,(function*(){var t,a,o,i,l,s,c,d,m;if(L&&void 0===U)return H(!0),!1;const u=yield(({title:t,description:a,communityId:o,imageFiles:n,previewUrl:i,topicIds:l,locale:r,sanitizeFunction:s,categoryCommunityId:c,categoryTopicIds:d,introUrl:m,bannerUrl:p,scheduleTime:u,isAnonymous:g,isAskDoctor:h})=>e(void 0,void 0,void 0,(function*(){const e=new FormData,v=Aa(a),f=Aa(t),b=ka(v);if(e.append("title",f),e.append("description",La(v,s)),c?e.append("category_community",String(c)):o&&e.append("community_id",String(o)),e.append("is_anonymous",g?"1":"0"),e.append("is_question",h?"1":"0"),(null==i?void 0:i.title)&&e.append("preview_title",i.title),(null==i?void 0:i.description)&&e.append("preview_description",i.description),(null==i?void 0:i.url)&&e.append("preview_link",Ee(i.url)),(null==i?void 0:i.image)&&e.append("preview_image",Ee(i.image)),null==l||l.forEach((t=>{e.append("topics[]",String(t||""))})),null==d||d.forEach((t=>{e.append("category_topics[]",String(t||""))})),null==n?void 0:n.length){const t=yield Promise.all(n.map(((e,t)=>new Promise((a=>{setTimeout((()=>{a(Pa(e,r))}),2e3*t)})))));null==t||t.filter(Boolean).slice(0,Y).forEach(((t,a)=>{e.append(`images[${a}]`,t)}))}else e.append("images","");return null==b||b.forEach((t=>{e.append("mention_ids[]",t)})),e.append("intro_url",m||""),e.append("banner",p||""),u&&(e.append("post_type","scheduled"),e.append("schedule_datetime",u)),e})))({title:G,description:X,communityId:String((null==ce?void 0:ce.id)||""),imageFiles:oe,previewUrl:me,topicIds:null==te?void 0:te.map((e=>String(e.id||""))).filter(Boolean),locale:S,sanitizeFunction:F,categoryCommunityId:String((null==ce?void 0:ce.mappedCategoryId)||""),categoryTopicIds:null==te?void 0:te.map((e=>String(e.mappedCategoryId||""))).filter(Boolean),isAnonymous:R?1:0,isAskDoctor:U?1:0});let g;p&&u.append("article_id",p),I?(null==h?void 0:h.id)&&(g=yield(({id:t,locale:a,formData:o})=>e(void 0,void 0,void 0,(function*(){return yield $(O(V.POST.UPDATE,{id:t,_locale:a}),"POST",{data:o})})))({id:h.id,formData:u,locale:S})):g=yield(({locale:t,formData:a,isArticleComment:o})=>e(void 0,void 0,void 0,(function*(){return yield $(O(o?V.POST.CREATE_ARTICLE_COMMENT:V.POST.CREATE,{_locale:t}),"POST",{data:a})})))({formData:u,locale:S,isArticleComment:!(null==ce?void 0:ce.id)&&!!(null==ce?void 0:ce.mappedCategoryId)});const v=null==g?void 0:g.data;(null==v?void 0:v.id)&&!(null===(a=null===(t=null==g?void 0:g.messages)||void 0===t?void 0:t.moderation)||void 0===a?void 0:a.type)?(j({message:B("createPost.popup.success"),type:"success"}),(e=>{n&&n(se(e),I),r&&r()})(v)):"banned"===(null===(i=null===(o=null==g?void 0:g.messages)||void 0===o?void 0:o.moderation)||void 0===i?void 0:i.type)?(j({title:B("notification.post.blocked.title"),message:B("notification.post.blocked.message"),type:"danger"}),g.messages.moderation.words&&re(g.messages.moderation.words)):"suspect"===(null===(s=null===(l=null==g?void 0:g.messages)||void 0===l?void 0:l.moderation)||void 0===s?void 0:s.type)?(j({title:B("notification.post.suspect.title"),message:B("notification.post.suspect.message"),type:"warning"}),r&&r()):(null===(d=null===(c=null==g?void 0:g.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"))})))?(j({message:B("notification.suspend.message"),type:"danger"}),r&&r()):j({message:(null===(m=null==g?void 0:g.messages)||void 0===m?void 0:m[0])||B("notification.failure"),type:"danger"})}));return o.createElement($a,{className:t,style:a},o.createElement("div",{className:"input-group-container"},o.createElement(Ga,{className:"input-group",bannedWords:le,value:G,onChange:Q}),o.createElement(Ha,{className:"input-group",bannedWords:le,value:X,onChange:K,onPreviewUrlChange:pe,onInvalidUrlsChange:ge,onImageFilesChange:ie,imageFiles:oe}),L&&o.createElement(Ya,{"data-is-marry-baby":P},o.createElement("div",{className:"switch-label"},o.createElement(T,{isMarryBaby:P,size:P?32:24,color:k.colors.primaryBase,className:"label-icon"}),o.createElement("span",{className:"label-txt"},B("createPost.askDoctor"))),o.createElement(ne,{value:U,choices:[{label:B("createPost.askDoctorChoice.yes"),value:!0},{label:B("createPost.askDoctorChoice.no"),value:!1}],onChange:e=>{"boolean"==typeof e&&(H(!1),W(e))}})),Z&&o.createElement(Ja,null,o.createElement(sa,{color:k.colors.red700,size:14}),o.createElement(x,{size:"p3",as:"span",color:k.colors.red700},B("createPost.message.askDoctorRequire"))),o.createElement("div",{className:"input-group"},o.createElement(x,{size:"p4",className:"input-group-label"},B("admin.community")),o.createElement(y,{options:(null==de?void 0:de.map(((e,t)=>({label:e.name,value:`${e.id||""}-${e.mappedCategoryId||""}`}))))||[],id:"community-picker",placeholder:B("community.choose"),value:J,onChange:e=>{ee({label:e.label,value:String(e.value)}),ae([])},disabled:!!d}),o.createElement(x,{size:"sm",className:"warning",color:k.colors.gray400},"* ",B("commentPopup.warning.newPost"))),!N&&o.createElement("div",{className:"input-group"},o.createElement(x,{size:"p4",className:"input-group-label"},B("tab.topic")),o.createElement("div",{className:"input-notification"},o.createElement("img",{src:ce?"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":ca}),o.createElement(x,{size:"base",color:k.colors.gray500},B(ce?"createPost.popup.primary":"createPost.popup.warning"))),ce&&o.createElement(Xa,{className:"tag-list",communityId:ce.id,forceTopics:m,onChange:ae,selectedTopics:te,noFetch:b}))),o.createElement("div",{className:"form-action"},o.createElement("div",{className:"input-group"},o.createElement(g,{className:"swich-input-group",labelPosition:"left",name:"PostAnonymous",checked:R,color:P?"pink":void 0,label:o.createElement("div",{className:"switch-label"},o.createElement("img",{className:"label-icon",src:M.getAssetPath("anomyous-avatar.svg"),alt:"anomyous avatar",style:{marginRight:"10px",width:"24px"}}),o.createElement("span",{className:"label-txt"},B("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(w,{theme:P?"marryBaby":"helloSites",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(he&&!q){_(!0);try{yield ve()}catch(e){console.error(e),j(ra(B))}_(!1)}})),isDisabled:!he,isLoading:q},B("createPost.popup.submit")))))};var to="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='M18 6L6 18' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6L18 18' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const ao=ke.div`
1522
+ `,eo=({className:t,style:a,onPostCreatedEdited:n,onClose:r,communities:c=[],forceSelectCommunity:d,forceSelectTopics:m,articleId:p,optionalTopic:u,editPostData:h,defaultCommunity:v,defaultTopics:f,noFetchTopic:b,hideTopicList:N,selectAskDoctor:A,showAskDoctorOptions:L})=>{const I=!!(null==h?void 0:h.id),{data:{locale:S,env:{isMarryBaby:P}},action:{pushNotifications:j,sanitizeFunction:F}}=i(z),{t:B}=E(),[V,D]=l(!1),[U,W]=l(A),[Z,H]=l(!1),[q,_]=l(!1),[G,Q]=l(""),[X,K]=l(""),[J,ee]=l(d?{label:d.name,value:`${d.id||""}-${d.mappedCategoryId||""}`}:{label:B("community.choose"),value:""}),[te,ae]=l([...m]||[]),[oe,ie]=l([]),[le,re]=l([]),ce=d||c.find((e=>`${e.id||""}-${e.mappedCategoryId||""}`===J.value)),de=d?[d]:c.filter((e=>e.isActive)).sort(((e,t)=>e.name>t.name?1:e.name<t.name?-1:0)),[me,pe]=l(null),[ue,ge]=l([]),he=G&&C(X)&&(u||!u&&te.length>0)&&ce&&(!oe||oe.length<=Y)&&!(null==ue?void 0:ue.length)&&!q;s((()=>{if(h){const e=h;Q(e.title||""),K(Ea(ya(e.description||"","edit"),e.mentions)),ee({label:e.community.name,value:`${e.community.id||""}-${e.community.mappedCategoryId||""}`}),ae(e.topics||[]),ie(e.photos||[]),D(!!e.isAnonymous||!1),W(!!e.isAskDoctor||!1)}else v&&ee({label:v.name,value:`${v.id||""}-${v.mappedCategoryId||""}`}),f&&ae(f)}),[]);const ve=()=>e(void 0,void 0,void 0,(function*(){var t,a,o,i,l,s,c,d,m;if(L&&void 0===U)return H(!0),!1;const u=yield(({title:t,description:a,communityId:o,imageFiles:n,previewUrl:i,topicIds:l,locale:r,sanitizeFunction:s,categoryCommunityId:c,categoryTopicIds:d,introUrl:m,bannerUrl:p,scheduleTime:u,isAnonymous:g,isAskDoctor:h})=>e(void 0,void 0,void 0,(function*(){const e=new FormData,v=Aa(a),f=Aa(t),b=ka(v);if(e.append("title",f),e.append("description",La(v,s)),c?e.append("category_community",String(c)):o&&e.append("community_id",String(o)),e.append("is_anonymous",g?"1":"0"),e.append("is_question",h?"1":"0"),(null==i?void 0:i.title)&&e.append("preview_title",i.title),(null==i?void 0:i.description)&&e.append("preview_description",i.description),(null==i?void 0:i.url)&&e.append("preview_link",Ee(i.url)),(null==i?void 0:i.image)&&e.append("preview_image",Ee(i.image)),null==l||l.forEach((t=>{e.append("topics[]",String(t||""))})),null==d||d.forEach((t=>{e.append("category_topics[]",String(t||""))})),null==n?void 0:n.length){const t=yield Promise.all(n.map(((e,t)=>new Promise((a=>{setTimeout((()=>{a(Pa(e,r))}),2e3*t)})))));null==t||t.filter(Boolean).slice(0,Y).forEach(((t,a)=>{e.append(`images[${a}]`,t)}))}else e.append("images","");return null==b||b.forEach((t=>{e.append("mention_ids[]",t)})),e.append("intro_url",m||""),e.append("banner",p||""),u&&(e.append("post_type","scheduled"),e.append("schedule_datetime",u)),e})))({title:G,description:X,communityId:String((null==ce?void 0:ce.id)||""),imageFiles:oe,previewUrl:me,topicIds:null==te?void 0:te.map((e=>String(e.id||""))).filter(Boolean),locale:S,sanitizeFunction:F,categoryCommunityId:String((null==ce?void 0:ce.mappedCategoryId)||""),categoryTopicIds:null==te?void 0:te.map((e=>String(e.mappedCategoryId||""))).filter(Boolean),isAnonymous:V?1:0,isAskDoctor:U?1:0});let g;p&&u.append("article_id",p),I?(null==h?void 0:h.id)&&(g=yield(({id:t,locale:a,formData:o})=>e(void 0,void 0,void 0,(function*(){return yield $(O(R.POST.UPDATE,{id:t,_locale:a}),"POST",{data:o})})))({id:h.id,formData:u,locale:S})):g=yield(({locale:t,formData:a,isArticleComment:o})=>e(void 0,void 0,void 0,(function*(){return yield $(O(o?R.POST.CREATE_ARTICLE_COMMENT:R.POST.CREATE,{_locale:t}),"POST",{data:a})})))({formData:u,locale:S,isArticleComment:!(null==ce?void 0:ce.id)&&!!(null==ce?void 0:ce.mappedCategoryId)});const v=null==g?void 0:g.data;(null==v?void 0:v.id)&&!(null===(a=null===(t=null==g?void 0:g.messages)||void 0===t?void 0:t.moderation)||void 0===a?void 0:a.type)?(j({message:B("createPost.popup.success"),type:"success"}),(e=>{n&&n(se(e),I),r&&r()})(v)):"banned"===(null===(i=null===(o=null==g?void 0:g.messages)||void 0===o?void 0:o.moderation)||void 0===i?void 0:i.type)?(j({title:B("notification.post.blocked.title"),message:B("notification.post.blocked.message"),type:"danger"}),g.messages.moderation.words&&re(g.messages.moderation.words)):"suspect"===(null===(s=null===(l=null==g?void 0:g.messages)||void 0===l?void 0:l.moderation)||void 0===s?void 0:s.type)?(j({title:B("notification.post.suspect.title"),message:B("notification.post.suspect.message"),type:"warning"}),r&&r()):(null===(d=null===(c=null==g?void 0:g.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"))})))?(j({message:B("notification.suspend.message"),type:"danger"}),r&&r()):j({message:(null===(m=null==g?void 0:g.messages)||void 0===m?void 0:m[0])||B("notification.failure"),type:"danger"})}));return o.createElement($a,{className:t,style:a},o.createElement("div",{className:"input-group-container"},o.createElement(Ga,{className:"input-group",bannedWords:le,value:G,onChange:Q}),o.createElement(Ha,{className:"input-group",bannedWords:le,value:X,onChange:K,onPreviewUrlChange:pe,onInvalidUrlsChange:ge,onImageFilesChange:ie,imageFiles:oe}),L&&o.createElement(Ya,{"data-is-marry-baby":P},o.createElement("div",{className:"switch-label"},o.createElement(T,{isMarryBaby:P,size:P?32:24,color:k.colors.primaryBase,className:"label-icon"}),o.createElement("span",{className:"label-txt"},B("createPost.askDoctor"))),o.createElement(ne,{value:U,choices:[{label:B("createPost.askDoctorChoice.yes"),value:!0},{label:B("createPost.askDoctorChoice.no"),value:!1}],onChange:e=>{"boolean"==typeof e&&(H(!1),W(e))}})),Z&&o.createElement(Ja,null,o.createElement(sa,{color:k.colors.red700,size:14}),o.createElement(x,{size:"p3",as:"span",color:k.colors.red700},B("createPost.message.askDoctorRequire"))),o.createElement("div",{className:"input-group"},o.createElement(x,{size:"p4",className:"input-group-label"},B("admin.community")),o.createElement(y,{options:(null==de?void 0:de.map(((e,t)=>({label:e.name,value:`${e.id||""}-${e.mappedCategoryId||""}`}))))||[],id:"community-picker",placeholder:B("community.choose"),value:J,onChange:e=>{ee({label:e.label,value:String(e.value)}),ae([])},disabled:!!d}),o.createElement(x,{size:"sm",className:"warning",color:k.colors.gray400},"* ",B("commentPopup.warning.newPost"))),!N&&o.createElement("div",{className:"input-group"},o.createElement(x,{size:"p4",className:"input-group-label"},B("tab.topic")),o.createElement("div",{className:"input-notification"},o.createElement("img",{src:ce?"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":ca}),o.createElement(x,{size:"base",color:k.colors.gray500},B(ce?"createPost.popup.primary":"createPost.popup.warning"))),ce&&o.createElement(Xa,{className:"tag-list",communityId:ce.id,forceTopics:m,onChange:ae,selectedTopics:te,noFetch:b}))),o.createElement("div",{className:"form-action"},o.createElement("div",{className:"input-group"},o.createElement(g,{className:"swich-input-group",labelPosition:"left",name:"PostAnonymous",checked:V,color:P?"pink":void 0,label:o.createElement("div",{className:"switch-label"},o.createElement("img",{className:"label-icon",src:M.getAssetPath("anomyous-avatar.svg"),alt:"anomyous avatar",style:{marginRight:"10px",width:"24px"}}),o.createElement("span",{className:"label-txt"},B("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(w,{theme:P?"marryBaby":"helloSites",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(he&&!q){_(!0);try{yield ve()}catch(e){console.error(e),j(ra(B))}_(!1)}})),isDisabled:!he,isLoading:q},B("createPost.popup.submit")))))};var to="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='M18 6L6 18' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6L18 18' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const ao=ke.div`
1523
1523
  [data-type='confirm'] {
1524
1524
  max-width: 468px;
1525
1525
  height: 486px;
@@ -1974,7 +1974,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
1974
1974
  }
1975
1975
  }
1976
1976
  }
1977
- `,so=n({}),co=({isReply:t,className:a,onClose:n,replyToName:c,style:d,replyingId:m,replyingUser:p,onPostSuccess:u,isMainCmt:g=!1,post:h,isMarryBaby:v})=>{const{action:{pushNotifications:f,sanitizeFunction:b},data:{userInfo:y,locale:C,env:{isMarryBaby:k}}}=i(z),N="boolean"==typeof v?v:k,{t:A}=E(),{onSelectImages:L,onRemoveImage:T,imageSrcs:I,onRemoveAllImages:S,imageFiles:P}=Ma(),[M,j]=l(""),{trigger:F}=i(so),[B,R]=l(!1),D=r(null),W=r(null),Z=r(null),[H,q]=l([]),[_,G]=l([]),[Q,X]=l(null);return s((()=>{var e;null===(e=Z.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout((()=>{var e;null===(e=W.current)||void 0===e||e.focus()}),400)}),[F]),o.createElement(ro,{"data-is-reply":t,className:a,style:d},t&&o.createElement("div",{className:"reply-to-container"},o.createElement(x,{size:"p4"},o.createElement("span",{dangerouslySetInnerHTML:{__html:A("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:()=>n&&n()})),o.createElement("div",{className:"input-container",ref:Z},o.createElement(U,{className:"avatar-wrapper "+(t?"avatar-wrapper-reply":""),avatar:(null==y?void 0:y.id)?y.avatar:J,username:(null==y?void 0:y.name)||(null==y?void 0:y.username)}),o.createElement("input",{ref:D,onChange:L,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),o.createElement(ge,{value:M,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"}),CustomInput:o.createElement("div",{className:"as-input"},o.createElement(Da,{className:"textarea",html:M,onChange:j,onImagePickerClick:()=>{var e;return null===(e=D.current)||void 0===e?void 0:e.click()},bannedWords:_,onPreviewUrlChange:X,onInvalidUrlsChange:q,setEditorRef:e=>W.current=e,isReplying:t}))}),o.createElement(w,{theme:N?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>e(void 0,void 0,void 0,(function*(){var a,o,i,l,r,s,c,d,g;if((null==h?void 0:h.id)&&!B){R(!0);try{const v=e=>{j(""),S(),n&&n();const t=de(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),u&&u(t)},w=yield(({postId:t,message:a,photos:o,link:n,locale:i,sanitizeFunction:l,replyingUserId:r,replyingUserName:s,replyingId:c})=>e(void 0,void 0,void 0,(function*(){const e=new FormData;let d=La(a.replace(/(\&nbsp;)+/g," "),l);const m=ka(d);return o&&o.length>0&&(yield Promise.all(null==o?void 0:o.map((e=>Pa(e,i))))).filter(Boolean).slice(0,Y).forEach((t=>{e.append("images[]",t)})),n&&e.append("link",n),null==m||m.forEach((t=>{e.append("mention_ids[]",t)})),e.append("post_id",t),c&&e.append("parent_id",c),r&&(m.unshift(r),d=`[mention+id="${r}"+name="${(s||"").replace('"',"'")}"]${d}`,e.append("parent_user_id",String(r))),e.append("content",d),e.append("content",d),e})))(Object.assign({message:M,photos:P,postId:String(h.id),link:null==Q?void 0:Q.url,sanitizeFunction:b,locale:C},t&&m?{replyingUserId:String((null==p?void 0:p.id)||(null===(a=null==h?void 0:h.author)||void 0===a?void 0:a.id)||""),replyingId:m,replyingUserName:(null==p?void 0:p.name)||(null==p?void 0:p.username)||""}:{})),x=yield t&&m?((t,a)=>e(void 0,void 0,void 0,(function*(){return $(O(V.COMMENT.REPLY,{_locale:a}),"POST",{data:t})})))(w,C):((t,a)=>e(void 0,void 0,void 0,(function*(){return $(O(V.COMMENT.CREATE,{_locale:a}),"POST",{data:t})})))(w,C),y=null==x?void 0:x.data;(null==y?void 0:y.id)&&!(null===(i=null===(o=null==x?void 0:x.messages)||void 0===o?void 0:o.moderation)||void 0===i?void 0:i.type)?v(x):"banned"===(null===(r=null===(l=null==x?void 0:x.messages)||void 0===l?void 0:l.moderation)||void 0===r?void 0:r.type)?(f({title:A("notification.comment.blocked.title"),message:A("notification.comment.blocked.message"),type:"danger"}),x.messages.moderation.words&&G(x.messages.moderation.words)):"suspect"===(null===(c=null===(s=null==x?void 0:x.messages)||void 0===s?void 0:s.moderation)||void 0===c?void 0:c.type)?(f({title:A("notification.comment.suspect.title"),message:A("notification.comment.suspect.message"),type:"warning"}),j(""),S(),n&&n()):(null===(d=null==x?void 0:x.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"))})))?(f({message:A("notification.suspend.message"),type:"warning"}),j(""),S(),n&&n()):f({title:"",message:(null===(g=null==x?void 0:x.messages)||void 0===g?void 0:g[0])||A("notification.comment.somethingWrong"),type:"danger"})}catch(e){f({title:"",message:A("notification.comment.somethingWrong"),type:"danger"})}R(!1)}})),isLoading:B,isDisabled:!!(null==H?void 0:H.length)||B||!M||(null==M?void 0:M.length)<2||!M.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"}))),(null==H?void 0:H.length)?o.createElement("div",{className:"error-text"},A("notification.limitUrlDomain")):null,(!I||0===I.length)&&Q&&o.createElement("div",{className:"link-preview-wrapper"},Q.isFetching?o.createElement(qe,null):o.createElement(o.Fragment,null,o.createElement(Ge,{title:Q.title,url:Q.url||"#",image:Q.image,noRefetch:!0}),o.createElement("img",{src:za,className:"icon-close",onClick:()=>X(null)}))),I&&I.length>0&&o.createElement("div",{className:"preview-images-container"},I.map(((e,t)=>o.createElement("div",{key:t,className:"image-src-wrapper"},o.createElement("img",{className:"preview-image",src:e}),o.createElement("img",{src:za,className:"icon-close-circle",onClick:()=>T(t)}))))))};const mo=ke.a`
1977
+ `,so=n({}),co=({isReply:t,className:a,onClose:n,replyToName:c,style:d,replyingId:m,replyingUser:p,onPostSuccess:u,isMainCmt:g=!1,post:h,isMarryBaby:v})=>{const{action:{pushNotifications:f,sanitizeFunction:b},data:{userInfo:y,locale:C,env:{isMarryBaby:k}}}=i(z),N="boolean"==typeof v?v:k,{t:A}=E(),{onSelectImages:L,onRemoveImage:T,imageSrcs:I,onRemoveAllImages:S,imageFiles:P}=Ma(),[M,j]=l(""),{trigger:F}=i(so),[B,V]=l(!1),D=r(null),W=r(null),Z=r(null),[H,q]=l([]),[_,G]=l([]),[Q,X]=l(null);return s((()=>{var e;null===(e=Z.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout((()=>{var e;null===(e=W.current)||void 0===e||e.focus()}),400)}),[F]),o.createElement(ro,{"data-is-reply":t,className:a,style:d},t&&o.createElement("div",{className:"reply-to-container"},o.createElement(x,{size:"p4"},o.createElement("span",{dangerouslySetInnerHTML:{__html:A("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:()=>n&&n()})),o.createElement("div",{className:"input-container",ref:Z},o.createElement(U,{className:"avatar-wrapper "+(t?"avatar-wrapper-reply":""),avatar:(null==y?void 0:y.id)?y.avatar:J,username:(null==y?void 0:y.name)||(null==y?void 0:y.username)}),o.createElement("input",{ref:D,onChange:L,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),o.createElement(ge,{value:M,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"}),CustomInput:o.createElement("div",{className:"as-input"},o.createElement(Da,{className:"textarea",html:M,onChange:j,onImagePickerClick:()=>{var e;return null===(e=D.current)||void 0===e?void 0:e.click()},bannedWords:_,onPreviewUrlChange:X,onInvalidUrlsChange:q,setEditorRef:e=>W.current=e,isReplying:t}))}),o.createElement(w,{theme:N?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>e(void 0,void 0,void 0,(function*(){var a,o,i,l,r,s,c,d,g;if((null==h?void 0:h.id)&&!B){V(!0);try{const v=e=>{j(""),S(),n&&n();const t=de(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),u&&u(t)},w=yield(({postId:t,message:a,photos:o,link:n,locale:i,sanitizeFunction:l,replyingUserId:r,replyingUserName:s,replyingId:c})=>e(void 0,void 0,void 0,(function*(){const e=new FormData;let d=La(a.replace(/(\&nbsp;)+/g," "),l);const m=ka(d);return o&&o.length>0&&(yield Promise.all(null==o?void 0:o.map((e=>Pa(e,i))))).filter(Boolean).slice(0,Y).forEach((t=>{e.append("images[]",t)})),n&&e.append("link",n),null==m||m.forEach((t=>{e.append("mention_ids[]",t)})),e.append("post_id",t),c&&e.append("parent_id",c),r&&(m.unshift(r),d=`[mention+id="${r}"+name="${(s||"").replace('"',"'")}"]${d}`,e.append("parent_user_id",String(r))),e.append("content",d),e.append("content",d),e})))(Object.assign({message:M,photos:P,postId:String(h.id),link:null==Q?void 0:Q.url,sanitizeFunction:b,locale:C},t&&m?{replyingUserId:String((null==p?void 0:p.id)||(null===(a=null==h?void 0:h.author)||void 0===a?void 0:a.id)||""),replyingId:m,replyingUserName:(null==p?void 0:p.name)||(null==p?void 0:p.username)||""}:{})),x=yield t&&m?((t,a)=>e(void 0,void 0,void 0,(function*(){return $(O(R.COMMENT.REPLY,{_locale:a}),"POST",{data:t})})))(w,C):((t,a)=>e(void 0,void 0,void 0,(function*(){return $(O(R.COMMENT.CREATE,{_locale:a}),"POST",{data:t})})))(w,C),y=null==x?void 0:x.data;(null==y?void 0:y.id)&&!(null===(i=null===(o=null==x?void 0:x.messages)||void 0===o?void 0:o.moderation)||void 0===i?void 0:i.type)?v(x):"banned"===(null===(r=null===(l=null==x?void 0:x.messages)||void 0===l?void 0:l.moderation)||void 0===r?void 0:r.type)?(f({title:A("notification.comment.blocked.title"),message:A("notification.comment.blocked.message"),type:"danger"}),x.messages.moderation.words&&G(x.messages.moderation.words)):"suspect"===(null===(c=null===(s=null==x?void 0:x.messages)||void 0===s?void 0:s.moderation)||void 0===c?void 0:c.type)?(f({title:A("notification.comment.suspect.title"),message:A("notification.comment.suspect.message"),type:"warning"}),j(""),S(),n&&n()):(null===(d=null==x?void 0:x.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"))})))?(f({message:A("notification.suspend.message"),type:"warning"}),j(""),S(),n&&n()):f({title:"",message:(null===(g=null==x?void 0:x.messages)||void 0===g?void 0:g[0])||A("notification.comment.somethingWrong"),type:"danger"})}catch(e){f({title:"",message:A("notification.comment.somethingWrong"),type:"danger"})}V(!1)}})),isLoading:B,isDisabled:!!(null==H?void 0:H.length)||B||!M||(null==M?void 0:M.length)<2||!M.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"}))),(null==H?void 0:H.length)?o.createElement("div",{className:"error-text"},A("notification.limitUrlDomain")):null,(!I||0===I.length)&&Q&&o.createElement("div",{className:"link-preview-wrapper"},Q.isFetching?o.createElement(qe,null):o.createElement(o.Fragment,null,o.createElement(Ge,{title:Q.title,url:Q.url||"#",image:Q.image,noRefetch:!0}),o.createElement("img",{src:za,className:"icon-close",onClick:()=>X(null)}))),I&&I.length>0&&o.createElement("div",{className:"preview-images-container"},I.map(((e,t)=>o.createElement("div",{key:t,className:"image-src-wrapper"},o.createElement("img",{className:"preview-image",src:e}),o.createElement("img",{src:za,className:"icon-close-circle",onClick:()=>T(t)}))))))};const mo=ke.a`
1978
1978
  * {
1979
1979
  pointer-events: none;
1980
1980
  }
@@ -2232,7 +2232,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
2232
2232
  &[data-is-marrybaby='true'] {
2233
2233
  padding: 0 1rem 1rem;
2234
2234
  }
2235
- `,bo=({className:t,style:a,reason:n,reasonText:r,onClose:s,postId:c})=>{const{data:{locale:d,env:{isMarryBaby:m}},action:{pushNotifications:p}}=i(z),{t:u}=E(),[g,h]=l(!1);return o.createElement(fo,{"data-is-marrybaby":m,className:t,style:a},o.createElement("ul",{className:"report-list"},o.createElement("li",{className:"report-item"},o.createElement("img",{src:vo}),o.createElement(x,{className:"__label",color:k.colors.gray800,size:"p4"},r))),o.createElement(w,{theme:m?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:g,onClick:()=>e(void 0,void 0,void 0,(function*(){if(c&&!g){h(!0);try{const e=yield(({id:e,reason:t,locale:a})=>{const o=new FormData;return o.append("reason",t),$(O(V.POST.REPORT,{_locale:a,id:e}),"POST",{data:o})})({id:c,reason:n,locale:d});1===(null==e?void 0:e.status)&&(p({message:"Post reported",type:"success"}),s&&s())}catch(e){}h(!1)}}))},u("submit")))},wo=ke.div`
2235
+ `,bo=({className:t,style:a,reason:n,reasonText:r,onClose:s,postId:c})=>{const{data:{locale:d,env:{isMarryBaby:m}},action:{pushNotifications:p}}=i(z),{t:u}=E(),[g,h]=l(!1);return o.createElement(fo,{"data-is-marrybaby":m,className:t,style:a},o.createElement("ul",{className:"report-list"},o.createElement("li",{className:"report-item"},o.createElement("img",{src:vo}),o.createElement(x,{className:"__label",color:k.colors.gray800,size:"p4"},r))),o.createElement(w,{theme:m?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:g,onClick:()=>e(void 0,void 0,void 0,(function*(){if(c&&!g){h(!0);try{const e=yield(({id:e,reason:t,locale:a})=>{const o=new FormData;return o.append("reason",t),$(O(R.POST.REPORT,{_locale:a,id:e}),"POST",{data:o})})({id:c,reason:n,locale:d});1===(null==e?void 0:e.status)&&(p({message:"Post reported",type:"success"}),s&&s())}catch(e){}h(!1)}}))},u("submit")))},wo=ke.div`
2236
2236
  padding: 0.5rem 1rem 1rem;
2237
2237
  line-height: 1.5;
2238
2238
  word-break: break-word;
@@ -2289,7 +2289,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
2289
2289
  }
2290
2290
  }
2291
2291
  }
2292
- `;var xo=p((e=>({root:{mention:{color:e.fn.primaryColor()}}})));const yo=e=>{var{trackingCategory:a,url:n,className:r,style:s,replyingTo:d,mentionedUser:m,description:p,disableShortenContent:u,mentions:g=[],maxChars:h=1e3,hideShowAllBtn:f,styles:b}=e,w=t(e,["trackingCategory","url","className","style","replyingTo","mentionedUser","description","disableShortenContent","mentions","maxChars","hideShowAllBtn","styles"]);const{classes:x,theme:y}=xo(void 0,{name:"PostContent",styles:b}),[C,k]=l(!1),{t:N}=E(),{authActionWrapper:A}=We(),[L,T]=l(!1),I=Ea(ya(p||"","display"),g),{action:{sanitizeFunction:S}}=i(z),P=c((()=>{const e=S(I||"");if(u||C)return{showContent:e,hasSeeMore:!1};const t=e.slice(0,h),a=h-27*((t.match(/<\/div>/g)||[]).length-1),o=(t||"").slice(0,a<40?40:a),n=S(o.replace(/(<|<\/)( +|[a-zA-Z]*)$/gi,"")),i=n.length<e.length-10;return{showContent:i?n:e,hasSeeMore:i}}),[u,C,I]),M=(null==m?void 0:m.name)||d,j="expert"===(null==m?void 0:m.role)&&!!(null==m?void 0:m.partnerId);return o.createElement(o.Fragment,null,j&&o.createElement(_t,{isOpen:L,onClose:()=>T(!1),expertId:String(null==m?void 0:m.partnerId)}),o.createElement(wo,Object.assign({className:`${x.root} ${r} no-replace-click`,style:s,mentionColor:y.fn.primaryColor()},w),M&&o.createElement(v,{onClick:()=>j&&T(!0),className:"post-content-replying"},"@",M),(null==p?void 0:p.startsWith("[mention+id="))&&o.createElement("span",{className:"post-content-replying tag-only"},"@"),o.createElement("span",{dangerouslySetInnerHTML:{__html:P.showContent},className:"post-content "+(P.hasSeeMore?"has-see-more":"")}),P.hasSeeMore&&!C&&o.createElement("span",null,"... ",!f&&o.createElement(v,Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),A((()=>k(!0)))},className:"see-more-text"},a?{"data-event-category":a,"data-event-action":"See More Post Click","data-event-label":n}:{}),N("post.seeMore")))))};const Eo=ke.div`
2292
+ `;var xo=p((e=>({root:{mention:{color:e.fn.primaryColor()}}})));const yo=e=>{var{trackingCategory:a,url:n,className:r,style:s,replyingTo:d,mentionedUser:m,description:p,disableShortenContent:u,mentions:g=[],maxChars:h=1e3,hideShowAllBtn:f,styles:b}=e,w=t(e,["trackingCategory","url","className","style","replyingTo","mentionedUser","description","disableShortenContent","mentions","maxChars","hideShowAllBtn","styles"]);const{classes:x,theme:y}=xo(void 0,{name:"PostContent",styles:b}),[C,k]=l(!1),{t:N}=E(),{authActionWrapper:A}=We(),[L,T]=l(!1),I=Ea(ya(p||"","display"),g),{action:{sanitizeFunction:S}}=i(z),P=c((()=>{const e=S(I||"");if(u||C)return{showContent:e,hasSeeMore:!1};const t=e.slice(0,h),a=h-27*((t.match(/<\/div>/g)||[]).length-1),o=(t||"").slice(0,a<40?40:a),n=S(o.replace(/(<|<\/)( +|[a-zA-Z]*)$/gi,"")),i=n.length<e.length-10;return{showContent:i?n:e,hasSeeMore:i}}),[u,C,I]),M=(null==m?void 0:m.name)||d,j="expert"===(null==m?void 0:m.role)&&!!(null==m?void 0:m.partnerId);return o.createElement(o.Fragment,null,j&&o.createElement(_t,{isOpen:L,onClose:()=>T(!1),expertId:String(null==m?void 0:m.partnerId)}),o.createElement(wo,Object.assign({className:`${x.root} ${r} no-replace-click`,style:s,mentionColor:y.fn.primaryColor()},w),M&&o.createElement(v,{onClick:()=>j&&T(!0),className:"post-content-replying"},"@",M),(null==p?void 0:p.startsWith("[mention+id="))&&o.createElement("span",{className:"post-content-replying tag-only",style:{color:y.fn.primaryColor()}},"@"),o.createElement("span",{dangerouslySetInnerHTML:{__html:P.showContent},className:"post-content "+(P.hasSeeMore?"has-see-more":"")}),P.hasSeeMore&&!C&&o.createElement("span",null,"... ",!f&&o.createElement(v,Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),A((()=>k(!0)))},className:"see-more-text"},a?{"data-event-category":a,"data-event-action":"See More Post Click","data-event-label":n}:{}),N("post.seeMore")))))};const Eo=ke.div`
2293
2293
  padding: 14px 16px 14px 17px;
2294
2294
  background: ${e=>e.bgColor};
2295
2295
  border-left: 3px solid ${e=>e.highlight};
@@ -2542,7 +2542,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
2542
2542
  height: 30px;
2543
2543
  }
2544
2544
  }
2545
- `,Bo=({initialViewIndex:e,images:t,onClose:a})=>{const[n,i]=l(e),[r,c]=l(!1);s((()=>{setTimeout((()=>{c(!0)}),0)}),[]);const d=null==t?void 0:t[n],m=0===n,p=!(null==t?void 0:t.length)||n===(null==t?void 0:t.length)-1;return o.createElement(h,null,o.createElement(Po,{"data-open":r&&!!d},o.createElement(Mo,null,o.createElement("img",{src:to,className:"icon-close",onClick:a,alt:"close"})),d&&n>=0&&o.createElement(o.Fragment,null,o.createElement(zo,null,o.createElement("img",{className:"img-preview",src:d,alt:"post img open"}),o.createElement(jo,{"data-disabled":m,onClick:()=>!m&&i(n-1)},o.createElement(Fo,null,o.createElement("img",{src:So,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":m}))),o.createElement(jo,{"data-right":!0,"data-disabled":p,onClick:()=>!p&&i(n+1)},o.createElement(Fo,null,o.createElement("img",{src:So,alt:"right arrow","data-disabled":p})))))))},Oo="hhgcomp-sensitivemask-inner",Vo=S(ke.div`
2545
+ `,Bo=({initialViewIndex:e,images:t,onClose:a})=>{const[n,i]=l(e),[r,c]=l(!1);s((()=>{setTimeout((()=>{c(!0)}),0)}),[]);const d=null==t?void 0:t[n],m=0===n,p=!(null==t?void 0:t.length)||n===(null==t?void 0:t.length)-1;return o.createElement(h,null,o.createElement(Po,{"data-open":r&&!!d},o.createElement(Mo,null,o.createElement("img",{src:to,className:"icon-close",onClick:a,alt:"close"})),d&&n>=0&&o.createElement(o.Fragment,null,o.createElement(zo,null,o.createElement("img",{className:"img-preview",src:d,alt:"post img open"}),o.createElement(jo,{"data-disabled":m,onClick:()=>!m&&i(n-1)},o.createElement(Fo,null,o.createElement("img",{src:So,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":m}))),o.createElement(jo,{"data-right":!0,"data-disabled":p,onClick:()=>!p&&i(n+1)},o.createElement(Fo,null,o.createElement("img",{src:So,alt:"right arrow","data-disabled":p})))))))},Oo="hhgcomp-sensitivemask-inner",Ro=S(ke.div`
2546
2546
  position: absolute;
2547
2547
  top: 0;
2548
2548
  right: 0;
@@ -2554,7 +2554,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
2554
2554
  align-items: center;
2555
2555
  justify-content: center;
2556
2556
  cursor: pointer;
2557
- `,Oo),Ro=ke.div``,Do=ke.div`
2557
+ `,Oo),Vo=ke.div``,Do=ke.div`
2558
2558
  position: absolute;
2559
2559
  bottom: 0;
2560
2560
  left: 0;
@@ -2598,7 +2598,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
2598
2598
  justify-content: flex-start;
2599
2599
  }
2600
2600
  }
2601
- `,Uo=({image:e,showIcon:t=!0})=>{const[a,n]=l(!0);return o.createElement(Do,{"data-is-blurred":a,onClick:e=>a&&e.stopPropagation()},o.createElement("img",{loading:"lazy",className:"img-preview",src:e}),o.createElement(Vo,{onClick:e=>{e.stopPropagation(),n(!a)}},t&&o.createElement(Ro,null,a?o.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},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",xmlns:"http://www.w3.org/2000/svg"},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"})))))},Wo=({className:e,images:t=[],style:a,authorName:n,isSensitive:c=!1})=>{const{data:{env:{isMarryBaby:d}}}=i(z),{t:m}=E(),p="+ "+((t.length||0)-4),[u,g]=l(!1),[h,v]=l(-1),f=t.length>5,b=r(!1);return s((()=>()=>{b.current&&ye(!1)}),[]),s((()=>{u||h>=0?(ye(!0),b.current=!0):(ye(!1),b.current=!1)}),[u,h]),o.createElement(o.Fragment,null,c&&o.createElement(To,{message:m("sensitiveMask.contentWarningDescription"),icon:o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},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(Ao,{className:e,style:a,"data-image-count":f?5:t.length||0,"data-is-marrybaby":d,"data-cursor-pointer":!c},null==t?void 0:t.slice(0,5).map(((e,t)=>{const a=4===t&&f;return o.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&f?g(!0):v(t)}},c&&o.createElement(Uo,{image:e,showIcon:!a}),!d&&o.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e}),o.createElement("img",{loading:"lazy",className:"img-preview",src:e}),a&&o.createElement("div",{className:"img-more-overlay"},o.createElement(fe,{tag:"h1",as:"h2",color:"white"},p)))}))),u&&o.createElement(Io,{authorName:n||"",images:t,onClose:()=>g(!1),onOpenSingleView:v}),h>=0&&o.createElement(Bo,{images:t,initialViewIndex:h,onClose:()=>v(-1)}))},Zo=ke.div`
2601
+ `,Uo=({image:e,showIcon:t=!0})=>{const[a,n]=l(!0);return o.createElement(Do,{"data-is-blurred":a,onClick:e=>a&&e.stopPropagation()},o.createElement("img",{loading:"lazy",className:"img-preview",src:e}),o.createElement(Ro,{onClick:e=>{e.stopPropagation(),n(!a)}},t&&o.createElement(Vo,null,a?o.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},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",xmlns:"http://www.w3.org/2000/svg"},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"})))))},Wo=({className:e,images:t=[],style:a,authorName:n,isSensitive:c=!1})=>{const{data:{env:{isMarryBaby:d}}}=i(z),{t:m}=E(),p="+ "+((t.length||0)-4),[u,g]=l(!1),[h,v]=l(-1),f=t.length>5,b=r(!1);return s((()=>()=>{b.current&&ye(!1)}),[]),s((()=>{u||h>=0?(ye(!0),b.current=!0):(ye(!1),b.current=!1)}),[u,h]),o.createElement(o.Fragment,null,c&&o.createElement(To,{message:m("sensitiveMask.contentWarningDescription"),icon:o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},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(Ao,{className:e,style:a,"data-image-count":f?5:t.length||0,"data-is-marrybaby":d,"data-cursor-pointer":!c},null==t?void 0:t.slice(0,5).map(((e,t)=>{const a=4===t&&f;return o.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&f?g(!0):v(t)}},c&&o.createElement(Uo,{image:e,showIcon:!a}),!d&&o.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e}),o.createElement("img",{loading:"lazy",className:"img-preview",src:e}),a&&o.createElement("div",{className:"img-more-overlay"},o.createElement(fe,{tag:"h1",as:"h2",color:"white"},p)))}))),u&&o.createElement(Io,{authorName:n||"",images:t,onClose:()=>g(!1),onOpenSingleView:v}),h>=0&&o.createElement(Bo,{images:t,initialViewIndex:h,onClose:()=>v(-1)}))},Zo=ke.div`
2602
2602
  .link-info-container {
2603
2603
  padding: 0.5rem 1rem;
2604
2604
  background: ${e=>e.color||"#f4faff"};
@@ -2634,7 +2634,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
2634
2634
  overflow: hidden;
2635
2635
  border-radius: 1rem;
2636
2636
  }
2637
- `,Ho=({url:t,image:a,className:n,style:d,autoPlay:p=!0})=>{const{data:{locale:u}}=i(z),[g,h]=l(null);s((()=>{e(void 0,void 0,void 0,(function*(){if(!a){if(!t)return h(null);h((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),B(O(V.FETCH_PREVIEW,{_locale:u}),"POST",{data:{link:t},headers:{"Content-Type":"application/json"}}).then((e=>{var a,o;h({url:t,image:(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.image)||(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.logo)})})).catch((()=>{h(null)}))}}))}),[t,a]);const v=a||(null==g?void 0:g.image),f=(null==g?void 0:g.url)||t,b=c((()=>(e=>{var t;return e.includes("youtu")&&(null===(t=/(.*?)(^|\/|v=)([a-z0-9_-]{11})(.*)?/gim.exec(e))||void 0===t?void 0:t[3])||""})(f)),[f]),w=c((()=>f.includes("facebook.com")||f.includes("fb.watch")),[f]),x=r(0),y=r(0),[E,C]=l(!1);s((()=>{const e=()=>{var e;const t=null===(e=k.current)||void 0===e?void 0:e.getBoundingClientRect();let a=!1;t&&(!x.current||Math.abs((x.current-t.width)/(null==t?void 0:t.width))>.2)&&(x.current=Math.floor(t.width),a=!0),t&&(!y.current||Math.abs((y.current-t.height)/(null==t?void 0:t.height))>.2)&&(y.current=Math.floor(t.height),a=!0),a&&C((e=>!e))};return e(),window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}}),[]);const k=r(null),N=r(!1),A=m();return o.createElement(Zo,{className:`${n} no-replace-click`,style:d,ref:k,color:A.colors[A.primaryColor][0]},a||!b&&!w?o.createElement("a",{href:f,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(qe,{className:"loading-spinner"}):o.createElement("img",{className:"link-image",src:v||R,onError:e=>{N.current||(N.current=!0,e.currentTarget.src=R)}}))):o.createElement("div",{className:"link-image-wrapper"},b?o.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${b}?&autoplay=${p?1:0}&mute=1&enablejsapi=1`,frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"}}):w?o.createElement("iframe",{key:String(E),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(f)}&autoplay=${p?1:0}&show_text=false&t=0&width=${x.current}&height=${y.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:y.current,width:x.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"}):null))};var qo="PD6nRZX";const _o=({className:e,size:t="md"})=>{const{t:a}=E();return o.createElement("div",{className:`${qo} ${e}`},o.createElement(w,{size:t,color:"transparent",isLoading:!0},a("loading")))},Go=n({});var Qo="DZmf3s7";const Xo=({src:e,defaultSrc:t=M.getAssetPath("logo/logomark.png"),ratio:a=1,size:n=80,radius:i=8,alt:l,className:r=""})=>o.createElement("div",{className:r},o.createElement("div",{className:Qo,style:{width:`${n}px`,height:n*a+"px",borderRadius:`${i}px`}},o.createElement(Pt,{src:e,fallbackSrc:t,alt:l})));var Ko="l5fL1xL",$o="L-aGKo7";const Yo=({children:e,className:t=""})=>o.createElement("div",{className:`${Ko} ${t}`},e),Jo=({children:e,className:t=""})=>o.createElement("div",{className:`${$o} ${t}`},e);var en="eaR8ATZ",tn="xM-7K0a";const an=({category:e,title:t,src:a,children:n,className:i=""})=>o.createElement("div",{className:`${en} ${i}`},o.createElement(Xo,{src:a}),o.createElement("div",{className:tn},n||o.createElement("div",null,e&&o.createElement(Yo,null,e),t&&o.createElement(Jo,null,t))));an.CategoryText=Yo,an.Title=Jo;const on=({featureImage:e,postTitle:t,author:a,categories:n,isReview:i,className:l=""})=>{var r;const s=i?"Medically reviewed by Jobelle Ann Dela Cruz Bigalbal, MD":"Written by Jobelle Ann Dela Cruz Bigalbal, MD";return o.createElement(an,{src:e,className:l},o.createElement(o.Fragment,null,o.createElement(an.CategoryText,null,null===(r=null==n?void 0:n[0])||void 0===r?void 0:r.name),o.createElement(an.Title,null,t),o.createElement(St,{avatarProps:Object.assign(Object.assign({},a),{size:32}),subTitle:o.createElement(o.Fragment,null,s,o.createElement(St.SubDivider,null),"Dec 12, 2022")})))};var nn={container:"SFSgnOz",header:"Tf3aoVa",heading:"TOt4QXl",headingIcon:"_5XYN1KT",accBodyGroup:"yE-tZRj",accBodyGroupItem:"LXiGuGT",accBodyGroupDesc:"r4rx-6v",subTitle:"XrHh8-C",subIcon:"c5-Yecd",group:"UBj6nWr",groupBody:"_2vptVBd",articleCardLink:"ZPDAwiR",relatedList:"_6wJn-NR",socialItem:"_21XDdFv",mbChevronWrapper:"LSyr3Zo"};const ln=({className:e=""})=>{var t,a,n,l,r;const{t:s}=E(),{info:c,isMarryBaby:d}=i(Go),m=null==c?void 0:c.data,p=[{type:"linkedin",icon:M.getAssetPath("linkedin.svg"),url:null===(t=null==c?void 0:c.contact)||void 0===t?void 0:t.linkedin},{type:"instagram",icon:M.getAssetPath("instagram.svg"),url:null===(a=null==c?void 0:c.contact)||void 0===a?void 0:a.instagram},{type:"facebook",icon:M.getAssetPath("facebook.svg"),url:null===(n=null==c?void 0:c.contact)||void 0===n?void 0:n.facebook},{type:"youtube",icon:M.getAssetPath("youtube.svg"),url:null===(l=null==c?void 0:c.contact)||void 0===l?void 0:l.youtube},{type:"tiktok",icon:M.getAssetPath("tiktok.svg"),url:null===(r=null==c?void 0:c.contact)||void 0===r?void 0:r.tiktok}],g=[...((null==c?void 0:c.experiences)||[]).length>0?[{key:"experience",heading:s("profilePanel.experience"),iconSrc:M.getAssetPath(d?"award-doc-mb.svg":"award-doc.svg"),panel:o.createElement("div",{className:nn.accBodyGroup},null==c?void 0:c.experiences.map(((e,t)=>o.createElement("div",{className:nn.accBodyGroupItem,key:String(t)},o.createElement("div",{className:nn.accBodyGroupTitle},e.title),o.createElement("div",{className:nn.accBodyGroupDesc},o.createElement("p",null,e.organization),o.createElement("p",null,e.duration))))))}]:[],...((null==c?void 0:c.educations)||[]).length>0?[{key:"education",heading:s("profilePanel.education"),iconSrc:M.getAssetPath(d?"book-mb.svg":"book.svg"),panel:o.createElement("div",{className:nn.accBodyGroup},null==c?void 0:c.educations.map(((e,t)=>o.createElement("div",{className:nn.accBodyGroupItem,key:String(t)},o.createElement("div",{className:nn.accBodyGroupTitle},e.schoolName),o.createElement("div",{className:nn.accBodyGroupDesc},o.createElement("p",null,e.study),o.createElement("p",null,e.completedYear))))))}]:[],...((null==c?void 0:c.awards)||[]).length>0?[{key:"awards",heading:s("profilePanel.awards"),iconSrc:M.getAssetPath(d?"award-mb.svg":"award.svg"),panel:o.createElement("div",{className:nn.accBodyGroup},null==c?void 0:c.awards.map(((e,t)=>o.createElement("div",{className:nn.accBodyGroupTitle,key:t},e.title))))}]:[]],h=(null==c?void 0:c.relatedPosts)||[],v=p.filter((e=>e.url));return o.createElement("div",{className:`${nn.container} ${e}`,"data-is-marrybaby":d},g.length>0&&o.createElement(f,{defaultValue:g[0].key,chevron:d?o.createElement("div",{className:nn.mbChevronWrapper},o.createElement(P,{size:12,color:k.mbColors.midGray})):o.createElement(P,{color:k.colors.gray400}),styles:{chevron:{"&[data-rotate]":{".minus-path":{display:"block"},".plus-path":{display:"none"}}},content:{display:"flex",flexDirection:"column",gap:"16px",padding:"0"},item:{border:0},control:{paddingLeft:0,"&:hover":{background:"transparent"}}}},g.map((e=>o.createElement(f.Item,{key:e.key,value:e.key},o.createElement(f.Control,null,o.createElement("div",{className:nn.header},o.createElement("div",{className:nn.headingIcon},o.createElement("img",{src:e.iconSrc})),o.createElement("div",{className:nn.heading},e.heading))),o.createElement(f.Panel,null,e.panel))))),h.length>0&&o.createElement("div",{className:nn.group},o.createElement("div",{className:nn.subTitle},o.createElement("img",{className:nn.subIcon,src:M.getAssetPath(d?"mb-logo.svg":"logo/circle-solid.svg")}),s("profilePanel.publishedArticles")),o.createElement("div",{className:`${nn.relatedList}`},null==c?void 0:c.relatedPosts.map((e=>o.createElement("a",{key:String(e.id),href:`${window.location.origin}${null==e?void 0:e.permalink}`,className:nn.articleCardLink},o.createElement(on,Object.assign({className:"article-card"},Object.assign(Object.assign({},e),!e.author&&{author:{displayName:null==m?void 0:m.name,avatar:null==m?void 0:m.avatar}}),{isReview:!0}))))))),v.length>0&&o.createElement("div",{className:nn.group},o.createElement("div",{className:nn.subTitle},o.createElement("img",{className:nn.subIcon,src:M.getAssetPath(d?"social-mb.svg":"social.svg")}),s("profilePanel.socialLinks")),o.createElement("div",{className:nn.groupBody},o.createElement(u,null,p.map(((e,t)=>e.url&&o.createElement("div",{className:nn.socialItem,key:t},o.createElement("a",{href:e.url,target:"_blank",rel:"noreferrer"},o.createElement("img",{src:e.icon,loading:"lazy",width:"32px"})))))))))};var rn="_8fd7YMs",sn="DomiQfw",cn="-b2qnfL";const dn=({message:e,buttonTxt:t,imgSrc:a,onBtnClick:n})=>{const{siteType:l,isMarryBaby:r}=i(Go);return o.createElement("div",{className:rn},o.createElement("div",{className:sn},o.createElement("img",{src:a||M.getAssetPath(r?"comments-mb.svg":"comments.svg")})),e&&o.createElement("div",{className:cn},e),t&&o.createElement(w,{size:"md",theme:l,color:"secondary",onClick:n},t))};var mn={container:"GYUElSy",question:"_3C6QpT1",questionTitle:"_9M9VYL6",community:"_1RuSyv3",questionCard:"_1IG-eEp"};const pn=({post:e,className:t=""})=>{var a,n,l,r,s,c,d,m;const{t:p}=E(),{data:{userInfo:u,env:{togetherBasePath:g}}}=i(z),{authActionWrapper:h,authorProps:v,isMarryBaby:f}=i(Go),b=`${window.location.origin}${g}/${null===(a=null==e?void 0:e.community)||void 0===a?void 0:a.slug}/${null==e?void 0:e.slug}`;return o.createElement("div",{className:`${mn.container} ${t}`},o.createElement("div",{className:mn.header},o.createElement("div",{className:mn.question},p("profilePanel.question")," ",o.createElement(Ve,{className:mn.questionTitle,href:"#",onClick:()=>{(null==u?void 0:u.id)||null==h||h((()=>window.location.href=b))}},"#",null==e?void 0:e.title)),o.createElement("div",{className:mn.community},null===(n=null==e?void 0:e.community)||void 0===n?void 0:n.name," - ",null==e?void 0:e.createdTime)),o.createElement("div",{className:mn.questionCard},o.createElement(la,Object.assign({className:"card-author"},v,{role:"user",avatarIcon:o.createElement(bt,null),subLine:o.createElement(la.SubTextRow,null,o.createElement(la.SubText,null,null===(s=null===(r=null===(l=null==e?void 0:e.expertAnswer)||void 0===l?void 0:l.answer)||void 0===r?void 0:r[0])||void 0===s?void 0:s.createdTime))})),o.createElement(yo,{className:"post-content-wrapper",description:(null===(m=null===(d=null===(c=null==e?void 0:e.expertAnswer)||void 0===c?void 0:c.answer)||void 0===d?void 0:d[0])||void 0===m?void 0:m.content)||"",mentions:null==e?void 0:e.mentions,"data-testid":"Content of the Post"})),o.createElement(Oe,{size:"md",onClick:()=>{(null==u?void 0:u.id)?window.location.href=b:null==h||h((()=>window.location.href=b))}},p("profilePanel.anserwing.viewFull")))};var un="MrdoES3";const gn=({id:t})=>{const{t:a}=E(),{data:{locale:n}}=i(z),{authorProps:r}=i(Go),[c,d]=l(null),[m,p]=l(!1);return s((()=>{t&&e(void 0,void 0,void 0,(function*(){var e;p(!0);const a=yield B(O(V.USER.LIST_ANSWERS,{_locale:n,id:t}),"GET"),o=((null===(e=null==a?void 0:a.data)||void 0===e?void 0:e.replies)||[]).map(se);d(o),p(!1)}))}),[]),o.createElement("div",{className:un},m?o.createElement(_o,null):null!==c&&(c.length>0?c.map((e=>o.createElement(pn,{className:"post-card",key:e.id,post:e}))):o.createElement(dn,{message:a("profilePanel.emptyPostMess.content",{name:(null==r?void 0:r.name)||(null==r?void 0:r.username)})})))},hn=e=>{var{size:a,color:n}=e,i=t(e,["size","color"]);return o.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),o.createElement("path",{d:"M9.99983 9.14326L6.94303 12.2001C6.61183 12.5313 6.07423 12.5313 5.74303 12.2001C5.41183 11.8689 5.41183 11.3313 5.74303 11.0001L9.43423 7.30886C9.74703 6.99606 10.2534 6.99606 10.5654 7.30886L14.2566 11.0001C14.5878 11.3313 14.5878 11.8689 14.2566 12.2001C13.9254 12.5313 13.3878 12.5313 13.0566 12.2001L9.99983 9.14326Z",fill:n}))};hn.defaultProps={size:24,color:k.colors.gray600};var vn="KsWg8i6",fn="_9tS0EUN",bn="kyyRKlb",wn="-Uqqka-";const xn=a=>{var{post:n,onSkip:r,siteType:s,btnText:c}=a,m=t(a,["post","onSkip","siteType","btnText"]);const{t:p}=E(),{data:{locale:u},action:{pushNotifications:g}}=i(z),[h,v]=l(!1),[f,x]=l(!1),y=d((()=>e(void 0,void 0,void 0,(function*(){var e;x(!0);const t=yield $(O(V.USER.SKIP_QUESTION,{_locale:u,id:null==n?void 0:n.id}),"PUT");1===(null==t?void 0:t.status)?(null==r||r({id:(null==n?void 0:n.id)||"",communityId:(null===(e=null==n?void 0:n.community)||void 0===e?void 0:e.id)||""}),v(!1),g({title:"",message:"Skip success",type:"success"})):g({title:"",message:null==t?void 0:t.messages,type:"danger"}),x(!1)}))),[]);return o.createElement(b,{width:327,withArrow:!0,shadow:"md",opened:h},o.createElement(b.Target,null,o.createElement("div",Object.assign({className:`${vn} ${(null==m?void 0:m.className)||""}`,onClick:()=>v(!0)},m),c||p("profilePanel.questionNotClear"))),o.createElement(b.Dropdown,null,o.createElement("div",null,o.createElement("div",{className:fn},p("profilePanel.skipQuestion.heading")),o.createElement("div",{className:bn},p("profilePanel.skipQuestion.content")),o.createElement("div",{className:wn},o.createElement(w,{theme:s,size:"md",color:"secondary",icon:o.createElement(Te,{color:k.colors.primaryBase,size:24}),onClick:()=>v(!1)}),o.createElement(w,{theme:s,size:"md",icon:o.createElement(Ie,{color:"white",size:24}),onClick:y,isLoading:f})))))};var yn="toEutn7",En="drdisHs",Cn="HNlhOdx";const kn=e=>{var a,n,l,r,{post:s,onSkip:c}=e,d=t(e,["post","onSkip"]);const{data:{env:{togetherBasePath:m}}}=i(z),{showSkipQuestionTag:p}=i(Go);return o.createElement(o.Fragment,null,o.createElement("div",Object.assign({},d,{className:`${yn} ${(null==d?void 0:d.className)||""}`}),o.createElement(la,{className:"card-author",avatar:null===(a=null==s?void 0:s.author)||void 0===a?void 0:a.avatar,name:(null===(n=null==s?void 0:s.author)||void 0===n?void 0:n.name)||(null===(l=null==s?void 0:s.author)||void 0===l?void 0:l.username),isAnonymous:Boolean(null==s?void 0:s.isAnonymous),subLine:o.createElement(la.SubTextRow,null,o.createElement(la.SubText,null,null==s?void 0:s.createdTime))}),o.createElement(Ve,{href:`${window.location.origin}${m}/${null===(r=null==s?void 0:s.community)||void 0===r?void 0:r.slug}/${null==s?void 0:s.slug}`,className:En,rel:"noreferrer"},null==s?void 0:s.title),p&&o.createElement(xn,{className:Cn,post:s,onSkip:c})))};var Nn={accordion:"I-uIJ6E",header:"_41WRsj2",heading:"AcOGL93",headingIcon:"JD3dWJN",panel:"dKAgnS8",chevron:"L2Q9T6m"};const An=()=>{var t,a;const{t:n}=E(),{data:{locale:r,userInfo:c}}=i(z),{onSkipQuestion:d,countValues:m,setCountValues:p}=i(Go),[u,g]=l(),[h,v]=l([]),[b,w]=l(!1),x=null==c?void 0:c.id;s((()=>{x&&e(void 0,void 0,void 0,(function*(){var e;w(!0);const t=yield $(O(V.USER.LIST_QUESTION_NEED_REPLY,{_locale:r}),"GET"),a=[],o=Object.create({});((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.communities)||[]).filter((e=>((null==e?void 0:e.question)||[]).length>0)).map((e=>{o[e.id]=e.question.map(se),delete e.question,a.push(me(e))})),v(a),g(o),w(!1)}))}),[]);const y=({id:e,communityId:t})=>{if(e&&t&&u){const a=Object.assign(Object.assign({},u),{[t]:[...((null==u?void 0:u[t])||[]).filter((t=>t.id!==e))]});let o=0;Object.keys(a).map((e=>o+=a[e].length||0)),g(a),p(Object.assign(Object.assign({},m),{total_question:o})),null==d||d(o)}};return o.createElement("div",{className:Nn.container},b?o.createElement(_o,null):(null==m?void 0:m.total_question)>0?h.length>0&&o.createElement(f,{className:Nn.accordion,defaultValue:String((null===(a=h[null===(t=Object.keys(h))||void 0===t?void 0:t[0]])||void 0===a?void 0:a.id)||""),styles:{control:{padding:"16px",border:`1px solid ${k.colors.neutral100}`,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,border:`1px solid ${k.colors.neutral100}`,borderTop:0,borderBottom:0},item:{marginBottom:"16px"}},chevron:o.createElement("div",{className:Nn.chevron},o.createElement(hn,{color:k.colors.gray600,size:20}))},h.map((e=>{const t=u&&(null==u?void 0:u[e.id])||[];return t.length>0&&o.createElement(f.Item,{key:e.id,value:String(e.id)},o.createElement(f.Control,null,o.createElement("div",{className:Nn.header},o.createElement("div",{className:Nn.headingIcon},o.createElement("img",{src:e.thumbnail})),o.createElement("div",{className:Nn.heading},e.name))),o.createElement(f.Panel,null,o.createElement("div",{className:Nn.body},t.map((e=>o.createElement(kn,{className:"question-card",key:e.id,post:e,onSkip:y}))))))}))):o.createElement(dn,{message:n("profilePanel.emptyCareMess.content"),imgSrc:M.getAssetPath("questions.svg")}))};var Ln="GA-zc-O",Tn="A18McWD",In="IB049vj",Sn="_8I--vEV";const Pn=({post:e,className:t=""})=>{var a;const{data:{userInfo:n,env:{togetherBasePath:l}}}=i(z),{authActionWrapper:r,authorProps:s}=i(Go),c=`${window.location.origin}${l}/${null===(a=null==e?void 0:e.community)||void 0===a?void 0:a.slug}/${null==e?void 0:e.slug}`;return o.createElement("div",{className:`${Ln} ${t}`},o.createElement("div",{className:In},o.createElement("a",{className:Sn,href:c,onClick:e=>{(null==n?void 0:n.id)||(e.preventDefault(),null==r||r((()=>window.location.href=c)))}}),o.createElement(St,{className:"card-author",avatarProps:{avatar:null==s?void 0:s.avatar,size:32}},o.createElement(la.MainText,{className:Tn},null==e?void 0:e.title),o.createElement(la.SubTextRow,null,o.createElement(la.SubText,null,null==e?void 0:e.createdTime))),o.createElement(yo,{className:"post-content-wrapper",description:null==e?void 0:e.description,mentions:null==e?void 0:e.mentions,maxChars:200,"data-testid":"Content of the Post"})))};var Mn="TSMHoEM";const zn=()=>{const{t:t}=E(),{data:{locale:a}}=i(z),{authorId:n,authorProps:r,isAuthorLogin:c,onCloseFromPost:d}=i(Go),[m,p]=l(null),[u,g]=l(!1);return s((()=>{n&&e(void 0,void 0,void 0,(function*(){var e;g(!0);const t=yield B(O(V.USER.LIST_POST,{_locale:a,id:n,isAnonymous:0}),"GET"),o=((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.posts)||[]).map(se);p(o),g(!1)}))}),[n]),o.createElement("div",{className:Mn},u?o.createElement(_o,null):null!==m&&(m.length>0?m.map((e=>o.createElement(Pn,{className:"post-card",key:e.id,post:e}))):o.createElement(dn,{message:t("profilePanel.emptyPostMess.content",{name:(null==r?void 0:r.name)||(null==r?void 0:r.username)||""}),buttonTxt:c&&t("profilePanel.createPost"),onBtnClick:()=>{null==d||d()}})))};var jn="_4Vekw96",Fn="DIJdGcB",Bn="aQSt4-Q";const On=e=>e?{title:null==e?void 0:e.title,organization:null==e?void 0:e.organization,duration:e.duration}:{},Vn=e=>e?{completedYear:null==e?void 0:e.completed_year,schoolName:e.school_name,study:e.study}:{};var Rn,Dn;!function(e){e[e.About=0]="About",e[e.Care=1]="Care",e[e.Answer=2]="Answer",e[e.Posts=3]="Posts"}(Rn||(Rn={})),function(e){e[e.Expert=0]="Expert",e[e.User=1]="User"}(Dn||(Dn={}));const Un=a=>{var n,r,{authorProps:c,selectedTab:d,authActionWrapper:m,onSkipQuestion:p,onCloseFromPost:u,hideQuestionTab:g,hideAnswerTab:h,showSkipQuestionTag:v,rolesToShowQuestionsTab:f=["expert"]}=a,b=t(a,["authorProps","selectedTab","authActionWrapper","onSkipQuestion","onCloseFromPost","hideQuestionTab","hideAnswerTab","showSkipQuestionTag","rolesToShowQuestionsTab"]);const{data:{locale:w,userInfo:x,env:{isMarryBaby:y}}}=i(z),{t:C}=E(),k=null==c?void 0:c.role,N=null==x?void 0:x.role,A=String(null==c?void 0:c.userId),[L,T]=l(),[I,S]=l(!1),[P,M]=l(),j=(null==x?void 0:x._togetherUserId)===(null==c?void 0:c.userId),F=[...-1!==f.indexOf(k)?[{key:Rn.About,name:C("profilePanel.tabs.highlight"),component:o.createElement(ln,{id:A,info:P})}]:[{key:Rn.Posts,name:C("profilePanel.tabs.posts"),component:o.createElement(zn,null),hasCountResult:!0,keyOfCountApi:"post",keyOfResult:"total_post"}],...g||-1===f.indexOf(N)||(null==x?void 0:x._togetherUserId)!==(null==c?void 0:c.userId)?[]:[{key:Rn.Care,name:`${C("profilePanel.tabs.care")}`,component:o.createElement(An,null),hasCountResult:!0,keyOfCountApi:"question",keyOfResult:"total_question"}],...h||-1===f.indexOf(k)?[]:[{key:Rn.Answer,name:`${C("profilePanel.tabs.expertAnswer")}`,component:o.createElement(gn,{id:A}),hasCountResult:!0,keyOfCountApi:"reply",keyOfResult:"total_reply"}]],[R,D]=l(null),[U,W]=l(null),Z={initialTab:U,tabContent:R,onChange:e=>W(e),styles:e=>({label:{fontSize:e.fontSizes.sm,fontWeight:600}})},H=null==F?void 0:F.filter((e=>null==e?void 0:e.hasCountResult));s((()=>{e(void 0,void 0,void 0,(function*(){var e,t,a,o,n,i,l,r,s;S(!0);const c=yield Promise.all([B(O(V.USER.DETAIL,{_locale:w,id:A}),"GET"),...H.map((e=>B(O(V.USER.COUNT_TABS,{_locale:w,id:A,[e.keyOfCountApi]:1}),"GET")))]),[m]=c,p={data:null==m?void 0:m.data,experiences:((null===(t=null===(e=null==m?void 0:m.data)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.experiences)||[]).map(On),relatedPosts:((null===(a=null==m?void 0:m.data)||void 0===a?void 0:a.related_post)||[]).map((e=>pe(e.post))),educations:((null===(n=null===(o=null==m?void 0:m.data)||void 0===o?void 0:o.fields)||void 0===n?void 0:n.educations)||[]).map(Vn),awards:(null===(l=null===(i=null==m?void 0:m.data)||void 0===i?void 0:i.fields)||void 0===l?void 0:l.awards_accreditations)||[],contact:(null===(s=null===(r=null==m?void 0:m.data)||void 0===r?void 0:r.fields)||void 0===s?void 0:s.contact)||{}};1===(null==m?void 0:m.status)&&M(p);const u=(null==p?void 0:p.relatedPosts)||[],g=Object.keys(p.contact).map((e=>{var t;return""!==(null===(t=null==p?void 0:p.contact)||void 0===t?void 0:t[e])})),h=[...(null==p?void 0:p.experiences)||[],...(null==p?void 0:p.educations)||[],...(null==p?void 0:p.awards)||[]],v=u.length>0||g.length>0||h.length>0,f={},b=H.map(((e,t)=>{var a,o,n;const i=(null===(n=null===(o=null===(a=c[t+1])||void 0===a?void 0:a.data)||void 0===o?void 0:o.counting)||void 0===n?void 0:n[e.keyOfResult])||0;return i>0?(f[e.keyOfResult]=i,e):-1!==[Rn.Care,Rn.Posts].indexOf(e.key)?e:void 0})).filter(Boolean).map((e=>e.key)),x=F.map((e=>{const t=Object.assign(Object.assign({},e),{name:e.name+(e.keyOfResult?` (${(null==f?void 0:f[e.keyOfResult])||"0"})`:"")});return t.hasCountResult?-1!==b.indexOf(t.key)?t:void 0:t.key===Rn.About?v&&t:t})).filter(Boolean);D(x),W((()=>{if(!d)return 0;const e=null==x?void 0:x.findIndex((e=>e.key===d));return-1!==e?e:0})()),T(f),S(!1)}))}),[]);const q=null==P?void 0:P.data;return o.createElement(Go.Provider,{value:{isMarryBaby:y,siteType:y?"marryBaby":"helloSites",authorId:String((null==c?void 0:c.userId)||""),authActionWrapper:m,onSkipQuestion:p,info:P,authorProps:c,onCloseFromPost:u,countValues:L,setCountValues:T,isAuthorLogin:j,showSkipQuestionTag:v}},o.createElement("div",Object.assign({},b,{className:`${jn} ${(null==b?void 0:b.className)||""}`,"data-is-marrybaby":y}),I?o.createElement(_o,null):o.createElement(o.Fragment,null,o.createElement(la,Object.assign({},c,{className:"card-author",showDetailPopup:!1,subLine:"expert"===(null==c?void 0:c.role)?(null==q?void 0:q.specialty)&&(null==q?void 0:q.organisation)&&o.createElement(la.SubTextRow,null,(null==q?void 0:q.specialty)&&o.createElement(o.Fragment,null,o.createElement(la.SubText,null,null==q?void 0:q.specialty),o.createElement(la.SubDivider,null)),o.createElement(la.SubText,null,null==q?void 0:q.organisation)):(null==q?void 0:q.created_at)&&o.createElement(la.SubTextRow,null,o.createElement(la.SubText,null,C("profilePanel.joined")," ",Se(null==q?void 0:q.created_at).toNow(!0)))})),"expert"===k&&o.createElement("div",{className:Fn,dangerouslySetInnerHTML:{__html:null===(n=null==P?void 0:P.data)||void 0===n?void 0:n.description}}),null!==R&&null!==U&&(R.length>0?o.createElement("div",{className:Bn},o.createElement(ie,Object.assign({},Z)),null===(r=null==R?void 0:R[U])||void 0===r?void 0:r.component):o.createElement(dn,{message:C("profilePanel.emptyPostMess.content",{name:(null==c?void 0:c.name)||(null==c?void 0:c.username)||""})})))))};var Wn=Object.freeze({__proto__:null,get TabName(){return Rn},get UserType(){return Dn},TabDataInit:{experiences:[],relatedPosts:[],educations:[],awards:[],contact:{},data:{}},ProfileDetail:Un}),Zn="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",Hn="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",qn="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 _n=({onDeleteComment:t,commentId:a,className:n="",popoverClassName:r=""})=>{const{data:{env:{isMarryBaby:s},locale:c},action:{pushNotifications:d}}=i(z),{t:m}=E(),[p,u]=l(!1),{authActionWrapper:g}=We();return o.createElement("div",{className:n,onClick:e=>{e.preventDefault(),e.stopPropagation()}},p&&o.createElement(lo,{thumbnail:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0)'%3e%3cpath d='M2 4.00781H3.33333H14' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33337 4.00846V2.67513C5.33337 2.32151 5.47385 1.98237 5.7239 1.73232C5.97395 1.48227 6.31309 1.3418 6.66671 1.3418H9.33337C9.687 1.3418 10.0261 1.48227 10.2762 1.73232C10.5262 1.98237 10.6667 2.32151 10.6667 2.67513V4.00846M12.6667 4.00846V13.3418C12.6667 13.6954 12.5262 14.0346 12.2762 14.2846C12.0261 14.5347 11.687 14.6751 11.3334 14.6751H4.66671C4.31309 14.6751 3.97395 14.5347 3.7239 14.2846C3.47385 14.0346 3.33337 13.6954 3.33337 13.3418V4.00846H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66663 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33337 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3crect width='16' height='16' fill='white' transform='translate(0 0.0078125)'/%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(!a)return;const o=yield(({id:e,locale:t})=>$(O(V.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"))({id:a,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:()=>u(!1)}),o.createElement(gt,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:qn,label:m("actionPopover.delete"),onClick:()=>{g((()=>{u(!0)}))}}]},className:r,toggleButtonContent:o.createElement("img",{src:s?Zn:Hn}),buttonProps:{}}))},Gn=ke.div`
2637
+ `,Ho=({url:t,image:a,className:n,style:d,autoPlay:p=!0})=>{const{data:{locale:u}}=i(z),[g,h]=l(null);s((()=>{e(void 0,void 0,void 0,(function*(){if(!a){if(!t)return h(null);h((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),B(O(R.FETCH_PREVIEW,{_locale:u}),"POST",{data:{link:t},headers:{"Content-Type":"application/json"}}).then((e=>{var a,o;h({url:t,image:(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.image)||(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.logo)})})).catch((()=>{h(null)}))}}))}),[t,a]);const v=a||(null==g?void 0:g.image),f=(null==g?void 0:g.url)||t,b=c((()=>(e=>{var t;return e.includes("youtu")&&(null===(t=/(.*?)(^|\/|v=)([a-z0-9_-]{11})(.*)?/gim.exec(e))||void 0===t?void 0:t[3])||""})(f)),[f]),w=c((()=>f.includes("facebook.com")||f.includes("fb.watch")),[f]),x=r(0),y=r(0),[E,C]=l(!1);s((()=>{const e=()=>{var e;const t=null===(e=k.current)||void 0===e?void 0:e.getBoundingClientRect();let a=!1;t&&(!x.current||Math.abs((x.current-t.width)/(null==t?void 0:t.width))>.2)&&(x.current=Math.floor(t.width),a=!0),t&&(!y.current||Math.abs((y.current-t.height)/(null==t?void 0:t.height))>.2)&&(y.current=Math.floor(t.height),a=!0),a&&C((e=>!e))};return e(),window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}}),[]);const k=r(null),N=r(!1),A=m();return o.createElement(Zo,{className:`${n} no-replace-click`,style:d,ref:k,color:A.colors[A.primaryColor][0]},a||!b&&!w?o.createElement("a",{href:f,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(qe,{className:"loading-spinner"}):o.createElement("img",{className:"link-image",src:v||V,onError:e=>{N.current||(N.current=!0,e.currentTarget.src=V)}}))):o.createElement("div",{className:"link-image-wrapper"},b?o.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${b}?&autoplay=${p?1:0}&mute=1&enablejsapi=1`,frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"}}):w?o.createElement("iframe",{key:String(E),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(f)}&autoplay=${p?1:0}&show_text=false&t=0&width=${x.current}&height=${y.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:y.current,width:x.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"}):null))};var qo="PD6nRZX";const _o=({className:e,size:t="md"})=>{const{t:a}=E();return o.createElement("div",{className:`${qo} ${e}`},o.createElement(w,{size:t,color:"transparent",isLoading:!0},a("loading")))},Go=n({});var Qo="DZmf3s7";const Xo=({src:e,defaultSrc:t=M.getAssetPath("logo/logomark.png"),ratio:a=1,size:n=80,radius:i=8,alt:l,className:r=""})=>o.createElement("div",{className:r},o.createElement("div",{className:Qo,style:{width:`${n}px`,height:n*a+"px",borderRadius:`${i}px`}},o.createElement(Pt,{src:e,fallbackSrc:t,alt:l})));var Ko="l5fL1xL",$o="L-aGKo7";const Yo=({children:e,className:t=""})=>o.createElement("div",{className:`${Ko} ${t}`},e),Jo=({children:e,className:t=""})=>o.createElement("div",{className:`${$o} ${t}`},e);var en="eaR8ATZ",tn="xM-7K0a";const an=({category:e,title:t,src:a,children:n,className:i=""})=>o.createElement("div",{className:`${en} ${i}`},o.createElement(Xo,{src:a}),o.createElement("div",{className:tn},n||o.createElement("div",null,e&&o.createElement(Yo,null,e),t&&o.createElement(Jo,null,t))));an.CategoryText=Yo,an.Title=Jo;const on=({featureImage:e,postTitle:t,author:a,categories:n,isReview:i,className:l=""})=>{var r;const s=i?"Medically reviewed by Jobelle Ann Dela Cruz Bigalbal, MD":"Written by Jobelle Ann Dela Cruz Bigalbal, MD";return o.createElement(an,{src:e,className:l},o.createElement(o.Fragment,null,o.createElement(an.CategoryText,null,null===(r=null==n?void 0:n[0])||void 0===r?void 0:r.name),o.createElement(an.Title,null,t),o.createElement(St,{avatarProps:Object.assign(Object.assign({},a),{size:32}),subTitle:o.createElement(o.Fragment,null,s,o.createElement(St.SubDivider,null),"Dec 12, 2022")})))};var nn={container:"SFSgnOz",header:"Tf3aoVa",heading:"TOt4QXl",headingIcon:"_5XYN1KT",accBodyGroup:"yE-tZRj",accBodyGroupItem:"LXiGuGT",accBodyGroupDesc:"r4rx-6v",subTitle:"XrHh8-C",subIcon:"c5-Yecd",group:"UBj6nWr",groupBody:"_2vptVBd",articleCardLink:"ZPDAwiR",relatedList:"_6wJn-NR",socialItem:"_21XDdFv",mbChevronWrapper:"LSyr3Zo"};const ln=({className:e=""})=>{var t,a,n,l,r;const{t:s}=E(),{info:c,isMarryBaby:d}=i(Go),m=null==c?void 0:c.data,p=[{type:"linkedin",icon:M.getAssetPath("linkedin.svg"),url:null===(t=null==c?void 0:c.contact)||void 0===t?void 0:t.linkedin},{type:"instagram",icon:M.getAssetPath("instagram.svg"),url:null===(a=null==c?void 0:c.contact)||void 0===a?void 0:a.instagram},{type:"facebook",icon:M.getAssetPath("facebook.svg"),url:null===(n=null==c?void 0:c.contact)||void 0===n?void 0:n.facebook},{type:"youtube",icon:M.getAssetPath("youtube.svg"),url:null===(l=null==c?void 0:c.contact)||void 0===l?void 0:l.youtube},{type:"tiktok",icon:M.getAssetPath("tiktok.svg"),url:null===(r=null==c?void 0:c.contact)||void 0===r?void 0:r.tiktok}],g=[...((null==c?void 0:c.experiences)||[]).length>0?[{key:"experience",heading:s("profilePanel.experience"),iconSrc:M.getAssetPath(d?"award-doc-mb.svg":"award-doc.svg"),panel:o.createElement("div",{className:nn.accBodyGroup},null==c?void 0:c.experiences.map(((e,t)=>o.createElement("div",{className:nn.accBodyGroupItem,key:String(t)},o.createElement("div",{className:nn.accBodyGroupTitle},e.title),o.createElement("div",{className:nn.accBodyGroupDesc},o.createElement("p",null,e.organization),o.createElement("p",null,e.duration))))))}]:[],...((null==c?void 0:c.educations)||[]).length>0?[{key:"education",heading:s("profilePanel.education"),iconSrc:M.getAssetPath(d?"book-mb.svg":"book.svg"),panel:o.createElement("div",{className:nn.accBodyGroup},null==c?void 0:c.educations.map(((e,t)=>o.createElement("div",{className:nn.accBodyGroupItem,key:String(t)},o.createElement("div",{className:nn.accBodyGroupTitle},e.schoolName),o.createElement("div",{className:nn.accBodyGroupDesc},o.createElement("p",null,e.study),o.createElement("p",null,e.completedYear))))))}]:[],...((null==c?void 0:c.awards)||[]).length>0?[{key:"awards",heading:s("profilePanel.awards"),iconSrc:M.getAssetPath(d?"award-mb.svg":"award.svg"),panel:o.createElement("div",{className:nn.accBodyGroup},null==c?void 0:c.awards.map(((e,t)=>o.createElement("div",{className:nn.accBodyGroupTitle,key:t},e.title))))}]:[]],h=(null==c?void 0:c.relatedPosts)||[],v=p.filter((e=>e.url));return o.createElement("div",{className:`${nn.container} ${e}`,"data-is-marrybaby":d},g.length>0&&o.createElement(f,{defaultValue:g[0].key,chevron:d?o.createElement("div",{className:nn.mbChevronWrapper},o.createElement(P,{size:12,color:k.mbColors.midGray})):o.createElement(P,{color:k.colors.gray400}),styles:{chevron:{"&[data-rotate]":{".minus-path":{display:"block"},".plus-path":{display:"none"}}},content:{display:"flex",flexDirection:"column",gap:"16px",padding:"0"},item:{border:0},control:{paddingLeft:0,"&:hover":{background:"transparent"}}}},g.map((e=>o.createElement(f.Item,{key:e.key,value:e.key},o.createElement(f.Control,null,o.createElement("div",{className:nn.header},o.createElement("div",{className:nn.headingIcon},o.createElement("img",{src:e.iconSrc})),o.createElement("div",{className:nn.heading},e.heading))),o.createElement(f.Panel,null,e.panel))))),h.length>0&&o.createElement("div",{className:nn.group},o.createElement("div",{className:nn.subTitle},o.createElement("img",{className:nn.subIcon,src:M.getAssetPath(d?"mb-logo.svg":"logo/circle-solid.svg")}),s("profilePanel.publishedArticles")),o.createElement("div",{className:`${nn.relatedList}`},null==c?void 0:c.relatedPosts.map((e=>o.createElement("a",{key:String(e.id),href:`${window.location.origin}${null==e?void 0:e.permalink}`,className:nn.articleCardLink},o.createElement(on,Object.assign({className:"article-card"},Object.assign(Object.assign({},e),!e.author&&{author:{displayName:null==m?void 0:m.name,avatar:null==m?void 0:m.avatar}}),{isReview:!0}))))))),v.length>0&&o.createElement("div",{className:nn.group},o.createElement("div",{className:nn.subTitle},o.createElement("img",{className:nn.subIcon,src:M.getAssetPath(d?"social-mb.svg":"social.svg")}),s("profilePanel.socialLinks")),o.createElement("div",{className:nn.groupBody},o.createElement(u,null,p.map(((e,t)=>e.url&&o.createElement("div",{className:nn.socialItem,key:t},o.createElement("a",{href:e.url,target:"_blank",rel:"noreferrer"},o.createElement("img",{src:e.icon,loading:"lazy",width:"32px"})))))))))};var rn="_8fd7YMs",sn="DomiQfw",cn="-b2qnfL";const dn=({message:e,buttonTxt:t,imgSrc:a,onBtnClick:n})=>{const{siteType:l,isMarryBaby:r}=i(Go);return o.createElement("div",{className:rn},o.createElement("div",{className:sn},o.createElement("img",{src:a||M.getAssetPath(r?"comments-mb.svg":"comments.svg")})),e&&o.createElement("div",{className:cn},e),t&&o.createElement(w,{size:"md",theme:l,color:"secondary",onClick:n},t))};var mn={container:"GYUElSy",question:"_3C6QpT1",questionTitle:"_9M9VYL6",community:"_1RuSyv3",questionCard:"_1IG-eEp"};const pn=({post:e,className:t=""})=>{var a,n,l,r,s,c,d,m;const{t:p}=E(),{data:{userInfo:u,env:{togetherBasePath:g}}}=i(z),{authActionWrapper:h,authorProps:v,isMarryBaby:f}=i(Go),b=`${window.location.origin}${g}/${null===(a=null==e?void 0:e.community)||void 0===a?void 0:a.slug}/${null==e?void 0:e.slug}`;return o.createElement("div",{className:`${mn.container} ${t}`},o.createElement("div",{className:mn.header},o.createElement("div",{className:mn.question},p("profilePanel.question")," ",o.createElement(Re,{className:mn.questionTitle,href:"#",onClick:()=>{(null==u?void 0:u.id)||null==h||h((()=>window.location.href=b))}},"#",null==e?void 0:e.title)),o.createElement("div",{className:mn.community},null===(n=null==e?void 0:e.community)||void 0===n?void 0:n.name," - ",null==e?void 0:e.createdTime)),o.createElement("div",{className:mn.questionCard},o.createElement(la,Object.assign({className:"card-author"},v,{role:"user",avatarIcon:o.createElement(bt,null),subLine:o.createElement(la.SubTextRow,null,o.createElement(la.SubText,null,null===(s=null===(r=null===(l=null==e?void 0:e.expertAnswer)||void 0===l?void 0:l.answer)||void 0===r?void 0:r[0])||void 0===s?void 0:s.createdTime))})),o.createElement(yo,{className:"post-content-wrapper",description:(null===(m=null===(d=null===(c=null==e?void 0:e.expertAnswer)||void 0===c?void 0:c.answer)||void 0===d?void 0:d[0])||void 0===m?void 0:m.content)||"",mentions:null==e?void 0:e.mentions,"data-testid":"Content of the Post"})),o.createElement(Oe,{size:"md",onClick:()=>{(null==u?void 0:u.id)?window.location.href=b:null==h||h((()=>window.location.href=b))}},p("profilePanel.anserwing.viewFull")))};var un="MrdoES3";const gn=({id:t})=>{const{t:a}=E(),{data:{locale:n}}=i(z),{authorProps:r}=i(Go),[c,d]=l(null),[m,p]=l(!1);return s((()=>{t&&e(void 0,void 0,void 0,(function*(){var e;p(!0);const a=yield B(O(R.USER.LIST_ANSWERS,{_locale:n,id:t}),"GET"),o=((null===(e=null==a?void 0:a.data)||void 0===e?void 0:e.replies)||[]).map(se);d(o),p(!1)}))}),[]),o.createElement("div",{className:un},m?o.createElement(_o,null):null!==c&&(c.length>0?c.map((e=>o.createElement(pn,{className:"post-card",key:e.id,post:e}))):o.createElement(dn,{message:a("profilePanel.emptyPostMess.content",{name:(null==r?void 0:r.name)||(null==r?void 0:r.username)})})))},hn=e=>{var{size:a,color:n}=e,i=t(e,["size","color"]);return o.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),o.createElement("path",{d:"M9.99983 9.14326L6.94303 12.2001C6.61183 12.5313 6.07423 12.5313 5.74303 12.2001C5.41183 11.8689 5.41183 11.3313 5.74303 11.0001L9.43423 7.30886C9.74703 6.99606 10.2534 6.99606 10.5654 7.30886L14.2566 11.0001C14.5878 11.3313 14.5878 11.8689 14.2566 12.2001C13.9254 12.5313 13.3878 12.5313 13.0566 12.2001L9.99983 9.14326Z",fill:n}))};hn.defaultProps={size:24,color:k.colors.gray600};var vn="KsWg8i6",fn="_9tS0EUN",bn="kyyRKlb",wn="-Uqqka-";const xn=a=>{var{post:n,onSkip:r,siteType:s,btnText:c}=a,p=t(a,["post","onSkip","siteType","btnText"]);const{t:u}=E(),{data:{locale:g},action:{pushNotifications:h}}=i(z),[v,f]=l(!1),[w,x]=l(!1),y=m(),C=d((()=>e(void 0,void 0,void 0,(function*(){var e;x(!0);const t=yield $(O(R.USER.SKIP_QUESTION,{_locale:g,id:null==n?void 0:n.id}),"PUT");1===(null==t?void 0:t.status)?(null==r||r({id:(null==n?void 0:n.id)||"",communityId:(null===(e=null==n?void 0:n.community)||void 0===e?void 0:e.id)||""}),f(!1),h({title:"",message:"Skip success",type:"success"})):h({title:"",message:null==t?void 0:t.messages,type:"danger"}),x(!1)}))),[]);return o.createElement(b,{width:327,withArrow:!0,shadow:"md",opened:v},o.createElement(b.Target,null,o.createElement("div",Object.assign({className:`${vn} ${(null==p?void 0:p.className)||""}`,onClick:()=>f(!0)},p),c||u("profilePanel.questionNotClear"))),o.createElement(b.Dropdown,null,o.createElement("div",null,o.createElement("div",{className:fn},u("profilePanel.skipQuestion.heading")),o.createElement("div",{className:bn},u("profilePanel.skipQuestion.content")),o.createElement("div",{className:wn},o.createElement(Oe,{size:"md",variant:"secondary",leftIcon:o.createElement(Te,{color:y.fn.primaryColor(),size:24}),onClick:()=>f(!1),styles:()=>({leftIcon:{marginRight:0}})}),o.createElement(Oe,{variant:"primary",size:"md",leftIcon:o.createElement(Ie,{color:"white",size:24}),onClick:C,loading:w,styles:()=>({leftIcon:{marginRight:0}})})))))};var yn="toEutn7",En="drdisHs",Cn="HNlhOdx";const kn=e=>{var a,n,l,r,{post:s,onSkip:c}=e,d=t(e,["post","onSkip"]);const{data:{env:{togetherBasePath:m}}}=i(z),{showSkipQuestionTag:p}=i(Go);return o.createElement(o.Fragment,null,o.createElement("div",Object.assign({},d,{className:`${yn} ${(null==d?void 0:d.className)||""}`}),o.createElement(la,{className:"card-author",avatar:null===(a=null==s?void 0:s.author)||void 0===a?void 0:a.avatar,name:(null===(n=null==s?void 0:s.author)||void 0===n?void 0:n.name)||(null===(l=null==s?void 0:s.author)||void 0===l?void 0:l.username),isAnonymous:Boolean(null==s?void 0:s.isAnonymous),subLine:o.createElement(la.SubTextRow,null,o.createElement(la.SubText,null,null==s?void 0:s.createdTime))}),o.createElement(Re,{href:`${window.location.origin}${m}/${null===(r=null==s?void 0:s.community)||void 0===r?void 0:r.slug}/${null==s?void 0:s.slug}`,className:En,rel:"noreferrer"},null==s?void 0:s.title),p&&o.createElement(xn,{className:Cn,post:s,onSkip:c})))};var Nn={accordion:"I-uIJ6E",header:"_41WRsj2",heading:"AcOGL93",headingIcon:"JD3dWJN",panel:"dKAgnS8",chevron:"L2Q9T6m"};const An=()=>{var t,a;const{t:n}=E(),{data:{locale:r,userInfo:c}}=i(z),{onSkipQuestion:d,countValues:m,setCountValues:p}=i(Go),[u,g]=l(),[h,v]=l([]),[b,w]=l(!1),x=null==c?void 0:c.id;s((()=>{x&&e(void 0,void 0,void 0,(function*(){var e;w(!0);const t=yield $(O(R.USER.LIST_QUESTION_NEED_REPLY,{_locale:r}),"GET"),a=[],o=Object.create({});((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.communities)||[]).filter((e=>((null==e?void 0:e.question)||[]).length>0)).map((e=>{o[e.id]=e.question.map(se),delete e.question,a.push(me(e))})),v(a),g(o),w(!1)}))}),[]);const y=({id:e,communityId:t})=>{if(e&&t&&u){const a=Object.assign(Object.assign({},u),{[t]:[...((null==u?void 0:u[t])||[]).filter((t=>t.id!==e))]});let o=0;Object.keys(a).map((e=>o+=a[e].length||0)),g(a),p(Object.assign(Object.assign({},m),{total_question:o})),null==d||d(o)}};return o.createElement("div",{className:Nn.container},b?o.createElement(_o,null):(null==m?void 0:m.total_question)>0?h.length>0&&o.createElement(f,{className:Nn.accordion,defaultValue:String((null===(a=h[null===(t=Object.keys(h))||void 0===t?void 0:t[0]])||void 0===a?void 0:a.id)||""),styles:{control:{padding:"16px",border:`1px solid ${k.colors.neutral100}`,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,border:`1px solid ${k.colors.neutral100}`,borderTop:0,borderBottom:0},item:{marginBottom:"16px"}},chevron:o.createElement("div",{className:Nn.chevron},o.createElement(hn,{color:k.colors.gray600,size:20}))},h.map((e=>{const t=u&&(null==u?void 0:u[e.id])||[];return t.length>0&&o.createElement(f.Item,{key:e.id,value:String(e.id)},o.createElement(f.Control,null,o.createElement("div",{className:Nn.header},o.createElement("div",{className:Nn.headingIcon},o.createElement("img",{src:e.thumbnail})),o.createElement("div",{className:Nn.heading},e.name))),o.createElement(f.Panel,null,o.createElement("div",{className:Nn.body},t.map((e=>o.createElement(kn,{className:"question-card",key:e.id,post:e,onSkip:y}))))))}))):o.createElement(dn,{message:n("profilePanel.emptyCareMess.content"),imgSrc:M.getAssetPath("questions.svg")}))};var Ln="GA-zc-O",Tn="A18McWD",In="IB049vj",Sn="_8I--vEV";const Pn=({post:e,className:t=""})=>{var a;const{data:{userInfo:n,env:{togetherBasePath:l}}}=i(z),{authActionWrapper:r,authorProps:s}=i(Go),c=`${window.location.origin}${l}/${null===(a=null==e?void 0:e.community)||void 0===a?void 0:a.slug}/${null==e?void 0:e.slug}`;return o.createElement("div",{className:`${Ln} ${t}`},o.createElement("div",{className:In},o.createElement("a",{className:Sn,href:c,onClick:e=>{(null==n?void 0:n.id)||(e.preventDefault(),null==r||r((()=>window.location.href=c)))}}),o.createElement(St,{className:"card-author",avatarProps:{avatar:null==s?void 0:s.avatar,size:32}},o.createElement(la.MainText,{className:Tn},null==e?void 0:e.title),o.createElement(la.SubTextRow,null,o.createElement(la.SubText,null,null==e?void 0:e.createdTime))),o.createElement(yo,{className:"post-content-wrapper",description:null==e?void 0:e.description,mentions:null==e?void 0:e.mentions,maxChars:200,"data-testid":"Content of the Post"})))};var Mn="TSMHoEM";const zn=()=>{const{t:t}=E(),{data:{locale:a}}=i(z),{authorId:n,authorProps:r,isAuthorLogin:c,onCloseFromPost:d}=i(Go),[m,p]=l(null),[u,g]=l(!1);return s((()=>{n&&e(void 0,void 0,void 0,(function*(){var e;g(!0);const t=yield B(O(R.USER.LIST_POST,{_locale:a,id:n,isAnonymous:0}),"GET"),o=((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.posts)||[]).map(se);p(o),g(!1)}))}),[n]),o.createElement("div",{className:Mn},u?o.createElement(_o,null):null!==m&&(m.length>0?m.map((e=>o.createElement(Pn,{className:"post-card",key:e.id,post:e}))):o.createElement(dn,{message:t("profilePanel.emptyPostMess.content",{name:(null==r?void 0:r.name)||(null==r?void 0:r.username)||""}),buttonTxt:c&&t("profilePanel.createPost"),onBtnClick:()=>{null==d||d()}})))};var jn="_4Vekw96",Fn="DIJdGcB",Bn="aQSt4-Q";const On=e=>e?{title:null==e?void 0:e.title,organization:null==e?void 0:e.organization,duration:e.duration}:{},Rn=e=>e?{completedYear:null==e?void 0:e.completed_year,schoolName:e.school_name,study:e.study}:{};var Vn,Dn;!function(e){e[e.About=0]="About",e[e.Care=1]="Care",e[e.Answer=2]="Answer",e[e.Posts=3]="Posts"}(Vn||(Vn={})),function(e){e[e.Expert=0]="Expert",e[e.User=1]="User"}(Dn||(Dn={}));const Un=a=>{var n,r,{authorProps:c,selectedTab:d,authActionWrapper:m,onSkipQuestion:p,onCloseFromPost:u,hideQuestionTab:g,hideAnswerTab:h,showSkipQuestionTag:v,rolesToShowQuestionsTab:f=["expert"]}=a,b=t(a,["authorProps","selectedTab","authActionWrapper","onSkipQuestion","onCloseFromPost","hideQuestionTab","hideAnswerTab","showSkipQuestionTag","rolesToShowQuestionsTab"]);const{data:{locale:w,userInfo:x,env:{isMarryBaby:y}}}=i(z),{t:C}=E(),k=null==c?void 0:c.role,N=null==x?void 0:x.role,A=String(null==c?void 0:c.userId),[L,T]=l(),[I,S]=l(!1),[P,M]=l(),j=(null==x?void 0:x._togetherUserId)===(null==c?void 0:c.userId),F=[...-1!==f.indexOf(k)?[{key:Vn.About,name:C("profilePanel.tabs.highlight"),component:o.createElement(ln,{id:A,info:P})}]:[{key:Vn.Posts,name:C("profilePanel.tabs.posts"),component:o.createElement(zn,null),hasCountResult:!0,keyOfCountApi:"post",keyOfResult:"total_post"}],...g||-1===f.indexOf(N)||(null==x?void 0:x._togetherUserId)!==(null==c?void 0:c.userId)?[]:[{key:Vn.Care,name:`${C("profilePanel.tabs.care")}`,component:o.createElement(An,null),hasCountResult:!0,keyOfCountApi:"question",keyOfResult:"total_question"}],...h||-1===f.indexOf(k)?[]:[{key:Vn.Answer,name:`${C("profilePanel.tabs.expertAnswer")}`,component:o.createElement(gn,{id:A}),hasCountResult:!0,keyOfCountApi:"reply",keyOfResult:"total_reply"}]],[V,D]=l(null),[U,W]=l(null),Z={initialTab:U,tabContent:V,onChange:e=>W(e),styles:e=>({label:{fontSize:e.fontSizes.sm,fontWeight:600}})},H=null==F?void 0:F.filter((e=>null==e?void 0:e.hasCountResult));s((()=>{e(void 0,void 0,void 0,(function*(){var e,t,a,o,n,i,l,r,s;S(!0);const c=yield Promise.all([B(O(R.USER.DETAIL,{_locale:w,id:A}),"GET"),...H.map((e=>B(O(R.USER.COUNT_TABS,{_locale:w,id:A,[e.keyOfCountApi]:1}),"GET")))]),[m]=c,p={data:null==m?void 0:m.data,experiences:((null===(t=null===(e=null==m?void 0:m.data)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.experiences)||[]).map(On),relatedPosts:((null===(a=null==m?void 0:m.data)||void 0===a?void 0:a.related_post)||[]).map((e=>pe(e.post))),educations:((null===(n=null===(o=null==m?void 0:m.data)||void 0===o?void 0:o.fields)||void 0===n?void 0:n.educations)||[]).map(Rn),awards:(null===(l=null===(i=null==m?void 0:m.data)||void 0===i?void 0:i.fields)||void 0===l?void 0:l.awards_accreditations)||[],contact:(null===(s=null===(r=null==m?void 0:m.data)||void 0===r?void 0:r.fields)||void 0===s?void 0:s.contact)||{}};1===(null==m?void 0:m.status)&&M(p);const u=(null==p?void 0:p.relatedPosts)||[],g=Object.keys(p.contact).map((e=>{var t;return""!==(null===(t=null==p?void 0:p.contact)||void 0===t?void 0:t[e])})),h=[...(null==p?void 0:p.experiences)||[],...(null==p?void 0:p.educations)||[],...(null==p?void 0:p.awards)||[]],v=u.length>0||g.length>0||h.length>0,f={},b=H.map(((e,t)=>{var a,o,n;const i=(null===(n=null===(o=null===(a=c[t+1])||void 0===a?void 0:a.data)||void 0===o?void 0:o.counting)||void 0===n?void 0:n[e.keyOfResult])||0;return i>0?(f[e.keyOfResult]=i,e):-1!==[Vn.Care,Vn.Posts].indexOf(e.key)?e:void 0})).filter(Boolean).map((e=>e.key)),x=F.map((e=>{const t=Object.assign(Object.assign({},e),{name:e.name+(e.keyOfResult?` (${(null==f?void 0:f[e.keyOfResult])||"0"})`:"")});return t.hasCountResult?-1!==b.indexOf(t.key)?t:void 0:t.key===Vn.About?v&&t:t})).filter(Boolean);D(x),W((()=>{if(!d)return 0;const e=null==x?void 0:x.findIndex((e=>e.key===d));return-1!==e?e:0})()),T(f),S(!1)}))}),[]);const q=null==P?void 0:P.data;return o.createElement(Go.Provider,{value:{isMarryBaby:y,siteType:y?"marryBaby":"helloSites",authorId:String((null==c?void 0:c.userId)||""),authActionWrapper:m,onSkipQuestion:p,info:P,authorProps:c,onCloseFromPost:u,countValues:L,setCountValues:T,isAuthorLogin:j,showSkipQuestionTag:v}},o.createElement("div",Object.assign({},b,{className:`${jn} ${(null==b?void 0:b.className)||""}`,"data-is-marrybaby":y}),I?o.createElement(_o,null):o.createElement(o.Fragment,null,o.createElement(la,Object.assign({},c,{className:"card-author",showDetailPopup:!1,subLine:"expert"===(null==c?void 0:c.role)?(null==q?void 0:q.specialty)&&(null==q?void 0:q.organisation)&&o.createElement(la.SubTextRow,null,(null==q?void 0:q.specialty)&&o.createElement(o.Fragment,null,o.createElement(la.SubText,null,null==q?void 0:q.specialty),o.createElement(la.SubDivider,null)),o.createElement(la.SubText,null,null==q?void 0:q.organisation)):(null==q?void 0:q.created_at)&&o.createElement(la.SubTextRow,null,o.createElement(la.SubText,null,C("profilePanel.joined")," ",Se(null==q?void 0:q.created_at).toNow(!0)))})),"expert"===k&&o.createElement("div",{className:Fn,dangerouslySetInnerHTML:{__html:null===(n=null==P?void 0:P.data)||void 0===n?void 0:n.description}}),null!==V&&null!==U&&(V.length>0?o.createElement("div",{className:Bn},o.createElement(ie,Object.assign({},Z)),null===(r=null==V?void 0:V[U])||void 0===r?void 0:r.component):o.createElement(dn,{message:C("profilePanel.emptyPostMess.content",{name:(null==c?void 0:c.name)||(null==c?void 0:c.username)||""})})))))};var Wn=Object.freeze({__proto__:null,get TabName(){return Vn},get UserType(){return Dn},TabDataInit:{experiences:[],relatedPosts:[],educations:[],awards:[],contact:{},data:{}},ProfileDetail:Un}),Zn="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",Hn="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",qn="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 _n=({onDeleteComment:t,commentId:a,className:n="",popoverClassName:r=""})=>{const{data:{env:{isMarryBaby:s},locale:c},action:{pushNotifications:d}}=i(z),{t:m}=E(),[p,u]=l(!1),{authActionWrapper:g}=We();return o.createElement("div",{className:n,onClick:e=>{e.preventDefault(),e.stopPropagation()}},p&&o.createElement(lo,{thumbnail:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0)'%3e%3cpath d='M2 4.00781H3.33333H14' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33337 4.00846V2.67513C5.33337 2.32151 5.47385 1.98237 5.7239 1.73232C5.97395 1.48227 6.31309 1.3418 6.66671 1.3418H9.33337C9.687 1.3418 10.0261 1.48227 10.2762 1.73232C10.5262 1.98237 10.6667 2.32151 10.6667 2.67513V4.00846M12.6667 4.00846V13.3418C12.6667 13.6954 12.5262 14.0346 12.2762 14.2846C12.0261 14.5347 11.687 14.6751 11.3334 14.6751H4.66671C4.31309 14.6751 3.97395 14.5347 3.7239 14.2846C3.47385 14.0346 3.33337 13.6954 3.33337 13.3418V4.00846H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66663 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33337 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3crect width='16' height='16' fill='white' transform='translate(0 0.0078125)'/%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(!a)return;const o=yield(({id:e,locale:t})=>$(O(R.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"))({id:a,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:()=>u(!1)}),o.createElement(gt,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:qn,label:m("actionPopover.delete"),onClick:()=>{g((()=>{u(!0)}))}}]},className:r,toggleButtonContent:o.createElement("img",{src:s?Zn:Hn}),buttonProps:{}}))},Gn=ke.div`
2638
2638
  .add-link {
2639
2639
  color: ${k.colors.primaryBase};
2640
2640
  }
@@ -2900,7 +2900,7 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
2900
2900
  `,pi=ke(di)`
2901
2901
  margin-top: 12px;
2902
2902
  padding: 0.5rem 1rem 1rem;
2903
- `;var ui="-dzIuHr";const gi=({userId:e,avatar:t,name:a,role:n,title:i,className:r})=>{const{t:s}=E(),[c,d]=l(!1);return o.createElement(o.Fragment,null,o.createElement(w,{className:`${ui} ${r}`,color:"success",size:"xs",onClick:()=>d(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},o.createElement("span",{className:"text"},o.createElement(Le.Endorse,{isSolid:!0,size:18,color:k.colors.green800,className:"icon"}),s("cardReply.verifyBy",{name:`${a||""}`}))),o.createElement(aa,{open:c,onClose:()=>d(!1),profileModalProps:{zIndex:1e3}},o.createElement(Un,{authorProps:{userId:e,avatar:t,name:a,role:n,title:i},hideQuestionTab:!0})))},hi=({className:t,style:a,comment:n,type:r="comment",level:d=0,replyingId:m,onPostCommentSuccess:p,post:u,onDeleteComment:g,refetchComment:h,hasQuickBookingEnable:v,handleMakeAppointment:f,cardAuthorProps:b,maxChars:x=600,disableShortenContent:y})=>{var C,k,N,A,L,T,I,S,P,M,j,F;const{data:{locale:R,userInfo:D,env:{isMarryBaby:U}}}=i(z),{t:H}=E(),[q,_]=l(n||null),{id:G,countReplies:Q,countLikes:X,content:K,createdAt:Y,replies:J=[],images:ee=[],author:te,liked:ae,link:oe,mentionedUser:ne,mentions:ie}=q,{text:re,replyingTo:se}=(e=>{try{const t=e.match(/\[@([^\]]+)\]/),a=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:a}}catch(e){}return{text:""}})(K),{authActionWrapper:ce}=We({_joinCommunityIds:[null===(C=null==u?void 0:u.community)||void 0===C?void 0:C.id],_joinTopicIds:null===(k=null==u?void 0:u.topics)||void 0===k?void 0:k.map((e=>e.id))}),[de,me]=l(4),pe=!!(null==D?void 0:D.id)&&(null==J?void 0:J.some((e=>e.author.id===D.id))),ue=e=>{_((t=>{if(!t.replies.find((t=>t.id===e.id))){t.replies.unshift(e);const a=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return h&&h(a),a}return t}))},[ge,he]=l(!1),ve=c((()=>"comment"===r&&J&&0!=J.length?J.sort(((e,t)=>{const a=new Date(e.createdAt).getTime(),o=new Date(t.createdAt).getTime();return a>o?-1:a<o?1:0})):J),[r,J]),fe=(null==J?void 0:J.length)||0,be=String(null==te?void 0:te.email)&&(null==D?void 0:D.email)&&String(null==te?void 0:te.email)===String(null==D?void 0:D.email),we=(null==te?void 0:te.name)||(null==te?void 0:te.username)||"",xe=(null==te?void 0:te.username)||(null==te?void 0:te.name)||"",ye=null==te?void 0:te.avatar,Ee=(null==u?void 0:u.isAnonymous)||null==te?void 0:te.role,Ce=[...(null==u?void 0:u.isAnonymous)?[{id:(null===(N=null==u?void 0:u.author)||void 0===N?void 0:N.id)||0,name:H("cardPost.anonymous")}]:[],...ie||[]],[ke,Ne]=l(null),[Ae,Le]=l(null);s((()=>{if(null==te?void 0:te.hospitalId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const a=yield B(W(Z.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:Pe[R]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.branch)&&Ne(null==a?void 0:a._data.branch)}));t(te.hospitalId)}if(null==te?void 0:te.doctorId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const a=yield B(W(Z.GET_DOCTOR_INFO,{doctorId:t,website_url:Pe[R]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&Le(null==a?void 0:a._data.doctor)}));t(te.doctorId)}}),[te.hospitalId,te.doctorId]);const Te=(null==Ae?void 0:Ae.valid_outpatient)||(null==Ae?void 0:Ae.valid_telemedicine),Ie=((null==ke?void 0:ke.total_available_service)||(null==ke?void 0:ke.total_available_doctor))>0,Se=v&&(Te||Ie),Me="chatbot"===(null===(A=null==q?void 0:q.author)||void 0===A?void 0:A.type);return o.createElement(Ue,{defaultParams:{_joinCommunityIds:[null===(L=null==u?void 0:u.community)||void 0===L?void 0:L.id],_joinTopicIds:null===(T=null==u?void 0:u.topics)||void 0===T?void 0:T.map((e=>e.id))}},o.createElement(mi,{className:t,style:a,"data-is-reply":!!d,"data-is-marrybaby":U,"data-has-booking":Se},"reply"===r&&o.createElement(le,{className:"top-divider",type:"solid"}),o.createElement("div",{style:{padding:"16px 16px 0"}},o.createElement(la,Object.assign({avatar:ye,name:we,username:xe,timeText:null==u?void 0:u.createdTime,community:null==u?void 0:u.community,className:"post-author "+(be?"with-popover":""),type:r,userId:null==te?void 0:te.id,role:Ee,expertId:null==te?void 0:te.partnerId,title:null==te?void 0:te.title,doctorId:null==te?void 0:te.doctorId,hospitalId:null==te?void 0:te.hospitalId,hasQuickBooking:Se,handleMakeAppointment:f,isAnonymous:!!(null==u?void 0:u.isAnonymous),hideBackground:Me,userType:null==te?void 0:te.type},b)),Boolean(null==q?void 0:q.isVerify)&&!Boolean(null==q?void 0:q.isOppose)&&o.createElement(gi,{title:null===(I=null==q?void 0:q.userVerify)||void 0===I?void 0:I.title,name:null===(S=null==q?void 0:q.userVerify)||void 0===S?void 0:S.name,userId:null===(P=null==q?void 0:q.userVerify)||void 0===P?void 0:P.id,role:null===(M=null==q?void 0:q.userVerify)||void 0===M?void 0:M.role,avatar:null===(j=null==q?void 0:q.userVerify)||void 0===j?void 0:j.avatar,className:"verify-tag"})),o.createElement(yo,{className:"post-content-wrapper",replyingTo:se,mentionedUser:ne,description:re,mentions:Ce,maxChars:x,disableShortenContent:y}),o.createElement("span",null),o.createElement("span",null),ee&&ee.length>0?o.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},o.createElement(Wo,{images:ee,authorName:null==te?void 0:te.username})):null,ee&&0!==ee.length||!oe?null:o.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},o.createElement(Ge,{url:oe})),"most-engaging"!==r?o.createElement(o.Fragment,null,Me&&o.createElement(pi,{listUrl:null==q?void 0:q.source,categorySlug:null==q?void 0:q.categorySlug}),o.createElement(it,{type:Je.reply,loveCount:X,replyCount:fe,className:"post-reaction",liked:ae,isReplied:pe,hideCommentIcon:"reply"===r||Me,hasShare:!1,onCommentClick:()=>ce((()=>he((e=>!e)))),onCommentCountClick:()=>ce((()=>{he(!0)})),onLikeClick:()=>ce((()=>e(void 0,void 0,void 0,(function*(){if(G){const t=yield(({commentId:t,setLike:a=!1,locale:o})=>e(void 0,void 0,void 0,(function*(){return $(O(a?V.COMMENT.LIKE:V.COMMENT.UNLIKE,{_locale:o,id:t}),"GET")})))({commentId:G,setLike:!ae,locale:R});1===t.status&&_((e=>Object.assign(Object.assign({},e),{liked:!ae,countLikes:e.countLikes+(ae?-1:1)})))}}))))}),ge&&o.createElement(co,{replyingId:m||q.id,replyToName:we,isReply:!0,onClose:()=>he(!1),onPostSuccess:e=>{"reply"===r?p&&p(e):ue(e)},post:u,replyingUser:te}),"comment"===r&&J&&J.length>0?o.createElement("div",{className:"comment-reply-wrapper"},null===(F=null==ve?void 0:ve.slice(0,de))||void 0===F?void 0:F.map((e=>o.createElement(hi,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:d+1,replyingId:G,onPostCommentSuccess:ue,post:u,onDeleteComment:()=>{_((t=>Object.assign(Object.assign({},t),{replies:t.replies.filter((t=>t.id!==e.id)),countReplies:t.countReplies-1})))},handleMakeAppointment:f,hasQuickBookingEnable:v}))),fe>de&&o.createElement(o.Fragment,null,o.createElement(le,{className:"top-divider",type:"solid"}),o.createElement(w,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>me((e=>e+4))},H("comment.seeMoreReplies",{count:fe-de}),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"})))):null):null,be&&o.createElement(_n,{onDeleteComment:g,className:"popover",commentId:q.id})))};var vi="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",fi="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",bi="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";const wi=({authorEmail:t,onDeletePost:a,shareUrl:n,post:r,className:s="",popoverClassName:c="",onBookmark:d,onRemoveBookmark:m,onEditPost:p})=>{const{data:{locale:u,userInfo:g,togetherUserId:h,env:{isMarryBaby:v}},action:{pushNotifications:f}}=i(z),{t:b}=E(),[w,x]=l(!1),[y,C]=l(!1),[k,N]=l(!1),{authActionWrapper:A}=We(),L=t&&(null==g?void 0:g.email)&&t===String(null==g?void 0:g.email);return o.createElement("div",{className:s,onClick:e=>{e.preventDefault(),e.stopPropagation()}},k&&o.createElement(go,{url:n,text:null==r?void 0:r.title,onClose:()=>N(!1)}),y&&o.createElement(lo,{thumbnail:M.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:b("popup.deletePost.title"),description:b("popup.deletePost.description"),acceptText:b("popup.deletePost.accept"),cancelText:b("popup.deletePost.cancel"),onAccept:()=>e(void 0,void 0,void 0,(function*(){if((null==r?void 0:r.id)&&!w){x(!0);try{const t=yield(({id:t,locale:a})=>e(void 0,void 0,void 0,(function*(){if(t)return yield $(O(V.POST.DELETE,{id:t,_locale:a}),"DELETE")})))({id:r.id,locale:u});1===(null==t?void 0:t.status)&&(null==a||a())}catch(e){}x(!1)}})),onClose:()=>C(!1)}),o.createElement(gt,{className:c,toggleButtonContent:o.createElement("img",{src:v?Zn:Hn}),position:"bottom",align:"end",buttonProps:{isLoading:w},data:L?{isShowheader:!1,type:"list",list:[{icon:bi,label:b("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:b("actionPopover.edit"),onClick:p},{icon:qn,label:b("actionPopover.delete"),onClick:()=>{A((()=>C(!0)))}}]}:{isShowheader:!1,type:"list",list:[{icon:bi,label:b("morePopover.share"),onClick:()=>N(!0)},{icon:(null==r?void 0:r.bookmarked)?vi:fi,label:(null==r?void 0:r.bookmarked)?b("morePopover.unsavePost"):b("morePopover.savePost"),onClick:()=>{A((()=>e(void 0,void 0,void 0,(function*(){if((null==g?void 0:g.id)&&(null==r?void 0:r.id))if(null==r?void 0:r.bookmarked){const e=yield $(O(V.BOOKMARK.DELETE,{_locale:u}),"DELETE",{data:{post_id:String(r.id)}});1===(null==e?void 0:e.status)?(f({title:"",message:"Removed saved post",type:"success",displayIcon:fi}),m&&m()):f({title:"",message:"Remove failed",type:"danger",displayIcon:fi})}else{const e=yield $(O(V.BOOKMARK.CREATE,{_locale:u}),"POST",{data:{user_id:h||g.id,post_id:r.id}});1===(null==e?void 0:e.status)?(f({title:"",message:"Post saved",type:"success",displayIcon:vi}),d&&d()):f({title:"",message:"Post saved failed",type:"danger",displayIcon:fi})}}))))}},{icon:vo,label:b("morePopover.report"),subTree:{title:b("morePopover.report.title"),description:b("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(te).map((e=>({label:te[e].label,reason:te[e].reportReasonText,reasonValue:e}))).map((e=>({label:b(e.label),subTree:{title:b("morePopover.reportSubmit.title"),description:b("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>o.createElement(bo,{reason:e.reasonValue,reasonText:b(e.reason),postId:null==r?void 0:r.id,onClose:()=>t&&t(!1)})}})))}}]}}))},xi=ke.div`
2903
+ `;var ui="-dzIuHr";const gi=({userId:e,avatar:t,name:a,role:n,title:i,className:r})=>{const{t:s}=E(),[c,d]=l(!1);return o.createElement(o.Fragment,null,o.createElement(w,{className:`${ui} ${r}`,color:"success",size:"xs",onClick:()=>d(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},o.createElement("span",{className:"text"},o.createElement(Le.Endorse,{isSolid:!0,size:18,color:k.colors.green800,className:"icon"}),s("cardReply.verifyBy",{name:`${a||""}`}))),o.createElement(aa,{open:c,onClose:()=>d(!1),profileModalProps:{zIndex:1e3}},o.createElement(Un,{authorProps:{userId:e,avatar:t,name:a,role:n,title:i},hideQuestionTab:!0})))},hi=({className:t,style:a,comment:n,type:r="comment",level:d=0,replyingId:m,onPostCommentSuccess:p,post:u,onDeleteComment:g,refetchComment:h,hasQuickBookingEnable:v,handleMakeAppointment:f,cardAuthorProps:b,maxChars:x=600,disableShortenContent:y})=>{var C,k,N,A,L,T,I,S,P,M,j,F;const{data:{locale:V,userInfo:D,env:{isMarryBaby:U}}}=i(z),{t:H}=E(),[q,_]=l(n||null),{id:G,countReplies:Q,countLikes:X,content:K,createdAt:Y,replies:J=[],images:ee=[],author:te,liked:ae,link:oe,mentionedUser:ne,mentions:ie}=q,{text:re,replyingTo:se}=(e=>{try{const t=e.match(/\[@([^\]]+)\]/),a=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:a}}catch(e){}return{text:""}})(K),{authActionWrapper:ce}=We({_joinCommunityIds:[null===(C=null==u?void 0:u.community)||void 0===C?void 0:C.id],_joinTopicIds:null===(k=null==u?void 0:u.topics)||void 0===k?void 0:k.map((e=>e.id))}),[de,me]=l(4),pe=!!(null==D?void 0:D.id)&&(null==J?void 0:J.some((e=>e.author.id===D.id))),ue=e=>{_((t=>{if(!t.replies.find((t=>t.id===e.id))){t.replies.unshift(e);const a=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return h&&h(a),a}return t}))},[ge,he]=l(!1),ve=c((()=>"comment"===r&&J&&0!=J.length?J.sort(((e,t)=>{const a=new Date(e.createdAt).getTime(),o=new Date(t.createdAt).getTime();return a>o?-1:a<o?1:0})):J),[r,J]),fe=(null==J?void 0:J.length)||0,be=String(null==te?void 0:te.email)&&(null==D?void 0:D.email)&&String(null==te?void 0:te.email)===String(null==D?void 0:D.email),we=(null==te?void 0:te.name)||(null==te?void 0:te.username)||"",xe=(null==te?void 0:te.username)||(null==te?void 0:te.name)||"",ye=null==te?void 0:te.avatar,Ee=(null==u?void 0:u.isAnonymous)||null==te?void 0:te.role,Ce=[...(null==u?void 0:u.isAnonymous)?[{id:(null===(N=null==u?void 0:u.author)||void 0===N?void 0:N.id)||0,name:H("cardPost.anonymous")}]:[],...ie||[]],[ke,Ne]=l(null),[Ae,Le]=l(null);s((()=>{if(null==te?void 0:te.hospitalId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const a=yield B(W(Z.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:Pe[V]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.branch)&&Ne(null==a?void 0:a._data.branch)}));t(te.hospitalId)}if(null==te?void 0:te.doctorId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const a=yield B(W(Z.GET_DOCTOR_INFO,{doctorId:t,website_url:Pe[V]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&Le(null==a?void 0:a._data.doctor)}));t(te.doctorId)}}),[te.hospitalId,te.doctorId]);const Te=(null==Ae?void 0:Ae.valid_outpatient)||(null==Ae?void 0:Ae.valid_telemedicine),Ie=((null==ke?void 0:ke.total_available_service)||(null==ke?void 0:ke.total_available_doctor))>0,Se=v&&(Te||Ie),Me="chatbot"===(null===(A=null==q?void 0:q.author)||void 0===A?void 0:A.type);return o.createElement(Ue,{defaultParams:{_joinCommunityIds:[null===(L=null==u?void 0:u.community)||void 0===L?void 0:L.id],_joinTopicIds:null===(T=null==u?void 0:u.topics)||void 0===T?void 0:T.map((e=>e.id))}},o.createElement(mi,{className:t,style:a,"data-is-reply":!!d,"data-is-marrybaby":U,"data-has-booking":Se},"reply"===r&&o.createElement(le,{className:"top-divider",type:"solid"}),o.createElement("div",{style:{padding:"16px 16px 0"}},o.createElement(la,Object.assign({avatar:ye,name:we,username:xe,timeText:null==u?void 0:u.createdTime,community:null==u?void 0:u.community,className:"post-author "+(be?"with-popover":""),type:r,userId:null==te?void 0:te.id,role:Ee,expertId:null==te?void 0:te.partnerId,title:null==te?void 0:te.title,doctorId:null==te?void 0:te.doctorId,hospitalId:null==te?void 0:te.hospitalId,hasQuickBooking:Se,handleMakeAppointment:f,isAnonymous:!!(null==u?void 0:u.isAnonymous),hideBackground:Me,userType:null==te?void 0:te.type},b)),Boolean(null==q?void 0:q.isVerify)&&!Boolean(null==q?void 0:q.isOppose)&&o.createElement(gi,{title:null===(I=null==q?void 0:q.userVerify)||void 0===I?void 0:I.title,name:null===(S=null==q?void 0:q.userVerify)||void 0===S?void 0:S.name,userId:null===(P=null==q?void 0:q.userVerify)||void 0===P?void 0:P.id,role:null===(M=null==q?void 0:q.userVerify)||void 0===M?void 0:M.role,avatar:null===(j=null==q?void 0:q.userVerify)||void 0===j?void 0:j.avatar,className:"verify-tag"})),o.createElement(yo,{className:"post-content-wrapper",replyingTo:se,mentionedUser:ne,description:re,mentions:Ce,maxChars:x,disableShortenContent:y}),o.createElement("span",null),o.createElement("span",null),ee&&ee.length>0?o.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},o.createElement(Wo,{images:ee,authorName:null==te?void 0:te.username})):null,ee&&0!==ee.length||!oe?null:o.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},o.createElement(Ge,{url:oe})),"most-engaging"!==r?o.createElement(o.Fragment,null,Me&&o.createElement(pi,{listUrl:null==q?void 0:q.source,categorySlug:null==q?void 0:q.categorySlug}),o.createElement(it,{type:Je.reply,loveCount:X,replyCount:fe,className:"post-reaction",liked:ae,isReplied:pe,hideCommentIcon:"reply"===r||Me,hasShare:!1,onCommentClick:()=>ce((()=>he((e=>!e)))),onCommentCountClick:()=>ce((()=>{he(!0)})),onLikeClick:()=>ce((()=>e(void 0,void 0,void 0,(function*(){if(G){const t=yield(({commentId:t,setLike:a=!1,locale:o})=>e(void 0,void 0,void 0,(function*(){return $(O(a?R.COMMENT.LIKE:R.COMMENT.UNLIKE,{_locale:o,id:t}),"GET")})))({commentId:G,setLike:!ae,locale:V});1===t.status&&_((e=>Object.assign(Object.assign({},e),{liked:!ae,countLikes:e.countLikes+(ae?-1:1)})))}}))))}),ge&&o.createElement(co,{replyingId:m||q.id,replyToName:we,isReply:!0,onClose:()=>he(!1),onPostSuccess:e=>{"reply"===r?p&&p(e):ue(e)},post:u,replyingUser:te}),"comment"===r&&J&&J.length>0?o.createElement("div",{className:"comment-reply-wrapper"},null===(F=null==ve?void 0:ve.slice(0,de))||void 0===F?void 0:F.map((e=>o.createElement(hi,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:d+1,replyingId:G,onPostCommentSuccess:ue,post:u,onDeleteComment:()=>{_((t=>Object.assign(Object.assign({},t),{replies:t.replies.filter((t=>t.id!==e.id)),countReplies:t.countReplies-1})))},handleMakeAppointment:f,hasQuickBookingEnable:v}))),fe>de&&o.createElement(o.Fragment,null,o.createElement(le,{className:"top-divider",type:"solid"}),o.createElement(w,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>me((e=>e+4))},H("comment.seeMoreReplies",{count:fe-de}),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"})))):null):null,be&&o.createElement(_n,{onDeleteComment:g,className:"popover",commentId:q.id})))};var vi="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",fi="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",bi="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";const wi=({authorEmail:t,onDeletePost:a,shareUrl:n,post:r,className:s="",popoverClassName:c="",onBookmark:d,onRemoveBookmark:m,onEditPost:p})=>{const{data:{locale:u,userInfo:g,togetherUserId:h,env:{isMarryBaby:v}},action:{pushNotifications:f}}=i(z),{t:b}=E(),[w,x]=l(!1),[y,C]=l(!1),[k,N]=l(!1),{authActionWrapper:A}=We(),L=t&&(null==g?void 0:g.email)&&t===String(null==g?void 0:g.email);return o.createElement("div",{className:s,onClick:e=>{e.preventDefault(),e.stopPropagation()}},k&&o.createElement(go,{url:n,text:null==r?void 0:r.title,onClose:()=>N(!1)}),y&&o.createElement(lo,{thumbnail:M.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:b("popup.deletePost.title"),description:b("popup.deletePost.description"),acceptText:b("popup.deletePost.accept"),cancelText:b("popup.deletePost.cancel"),onAccept:()=>e(void 0,void 0,void 0,(function*(){if((null==r?void 0:r.id)&&!w){x(!0);try{const t=yield(({id:t,locale:a})=>e(void 0,void 0,void 0,(function*(){if(t)return yield $(O(R.POST.DELETE,{id:t,_locale:a}),"DELETE")})))({id:r.id,locale:u});1===(null==t?void 0:t.status)&&(null==a||a())}catch(e){}x(!1)}})),onClose:()=>C(!1)}),o.createElement(gt,{className:c,toggleButtonContent:o.createElement("img",{src:v?Zn:Hn}),position:"bottom",align:"end",buttonProps:{isLoading:w},data:L?{isShowheader:!1,type:"list",list:[{icon:bi,label:b("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:b("actionPopover.edit"),onClick:p},{icon:qn,label:b("actionPopover.delete"),onClick:()=>{A((()=>C(!0)))}}]}:{isShowheader:!1,type:"list",list:[{icon:bi,label:b("morePopover.share"),onClick:()=>N(!0)},{icon:(null==r?void 0:r.bookmarked)?vi:fi,label:(null==r?void 0:r.bookmarked)?b("morePopover.unsavePost"):b("morePopover.savePost"),onClick:()=>{A((()=>e(void 0,void 0,void 0,(function*(){if((null==g?void 0:g.id)&&(null==r?void 0:r.id))if(null==r?void 0:r.bookmarked){const e=yield $(O(R.BOOKMARK.DELETE,{_locale:u}),"DELETE",{data:{post_id:String(r.id)}});1===(null==e?void 0:e.status)?(f({title:"",message:"Removed saved post",type:"success",displayIcon:fi}),m&&m()):f({title:"",message:"Remove failed",type:"danger",displayIcon:fi})}else{const e=yield $(O(R.BOOKMARK.CREATE,{_locale:u}),"POST",{data:{user_id:h||g.id,post_id:r.id}});1===(null==e?void 0:e.status)?(f({title:"",message:"Post saved",type:"success",displayIcon:vi}),d&&d()):f({title:"",message:"Post saved failed",type:"danger",displayIcon:fi})}}))))}},{icon:vo,label:b("morePopover.report"),subTree:{title:b("morePopover.report.title"),description:b("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(te).map((e=>({label:te[e].label,reason:te[e].reportReasonText,reasonValue:e}))).map((e=>({label:b(e.label),subTree:{title:b("morePopover.reportSubmit.title"),description:b("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>o.createElement(bo,{reason:e.reasonValue,reasonText:b(e.reason),postId:null==r?void 0:r.id,onClose:()=>t&&t(!1)})}})))}}]}}))},xi=ke.div`
2904
2904
  position: relative;
2905
2905
  margin-bottom: 24px;
2906
2906
  background: white;
@@ -3075,4 +3075,4 @@ import{a as e,_ as t}from"./tslib.es6-6fca6fae.js";import*as a from"react";impor
3075
3075
  margin-bottom: 12px;
3076
3076
  }
3077
3077
  }
3078
- `,yi=(t,a)=>e(void 0,void 0,void 0,(function*(){var e,o,n;const i=yield ae(O(V.COMMENT.LIST,{postId:t,_locale:a,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(n=null===(o=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e.comments)||void 0===o?void 0:o.map(de))||void 0===n?void 0:n[0]})),Ei=({className:t,style:a,hideViewMoreComment:n,showMostEngaging:r,onCommentClick:c,onCommentCountClick:d,onMostEngagingCommentClick:m,onPostCommentSuccess:p,disableCardLink:u,disableShortenContent:g,onDeletePost:h,onEditPost:v,post:f,mostEngagingComment:b,onDeleteComment:x,showInputComment:y,InlineCommentsComponent:k,hasQuickBookingEnable:N,handleMakeAppointment:A,cardAuthorProps:L})=>{const[T,I]=l(f),[S,P]=l(!1),[M,j]=l(b),{community:F,topics:U,author:q,slug:_,isPin:G,liked:Q,scheduleDateTime:X,createdAt:K,photos:Y,mentions:J,title:ee,description:te,previewUrl:ae,likesCount:oe,commentsCount:ne,id:ie,commented:le}=T,{data:{locale:re,env:{isMarryBaby:se,togetherBasePath:ce}},action:{pushNotifications:de}}=i(z),{t:me}=E(),[pe,ue]=l(y),ge=`${ce}/${(null==F?void 0:F.slug)||"_"}/${_||""}`,he=`${D(re)}${ge}`,{authActionWrapper:ve}=We((null==F?void 0:F.slug)?{_joinCommunityIds:[F.id],_joinTopicIds:null==U?void 0:U.map((e=>e.id))}:void 0),[be,we]=l(!1);s((()=>{ue(y)}),[y]);const xe=(null==q?void 0:q.name)||(null==q?void 0:q.username)||"",ye=(null==q?void 0:q.username)||(null==q?void 0:q.name)||"",Ee=null==q?void 0:q.avatar,Ce=(null==T?void 0:T.isAnonymous)||null==q?void 0:q.role,[ke,Ne]=l(null),[Ae,Le]=l(null);s((()=>{if(null==q?void 0:q.hospitalId){(t=>e(void 0,void 0,void 0,(function*(){var e;const a=yield B(W(Z.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:H[re]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.branch)&&Ne(null==a?void 0:a._data.branch)})))(q.hospitalId)}if(null==q?void 0:q.doctorId){(t=>e(void 0,void 0,void 0,(function*(){var e;const a=yield B(W(Z.GET_DOCTOR_INFO,{doctorId:t,website_url:H[re]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&Le(null==a?void 0:a._data.doctor)})))(q.doctorId)}}),[q.hospitalId,q.doctorId]);const Te=(null==Ae?void 0:Ae.valid_outpatient)||(null==Ae?void 0:Ae.valid_telemedicine),Ie=((null==ke?void 0:ke.total_available_service)||(null==ke?void 0:ke.total_available_doctor))>0,Se=N&&(Te||Ie);s((()=>{e(void 0,void 0,void 0,(function*(){if(ie&&ne&&r&&!(null==b?void 0:b.id)){const e=yield yi(ie,re);j(e)}}))}),[ie,re,ne,r,null==b?void 0:b.id]),s((()=>{j(b)}),[null==b?void 0:b.id]);const Pe=t=>e(void 0,void 0,void 0,(function*(){if(ne>1&&(null==M?void 0:M.id)&&(null==M?void 0:M.id)===(null==t?void 0:t.id)){const e=yield yi(ie,re);j(e)}I((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1}))),x&&x(t)}));return o.createElement(Ue,{defaultParams:(null==F?void 0:F.slug)?{_joinCommunityIds:[F.id],_joinTopicIds:null==U?void 0:U.map((e=>e.id))}:void 0},S&&o.createElement(go,{url:he,avatar:R,text:ee,onClose:()=>P(!1)}),o.createElement(xi,{className:t,style:a,"data-is-marrybaby":se},G?o.createElement(dt,{className:"post-pin"}):null,o.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},o.createElement(la,Object.assign({avatar:Ee,name:xe,username:ye,url:u?void 0:ge,community:F,timeText:null==T?void 0:T.createdTime,className:"post-author",role:Ce,userId:null==q?void 0:q.id,expertId:null==q?void 0:q.partnerId,doctorId:null==q?void 0:q.doctorId,hospitalId:null==q?void 0:q.hospitalId,title:null==q?void 0:q.title,hasQuickBooking:Se,handleMakeAppointment:A,"data-testid":"name",isAnonymous:!!(null==T?void 0:T.isAnonymous),extendEle:o.createElement(wi,{authorEmail:String(null==q?void 0:q.email),onDeletePost:h,shareUrl:he,post:T,className:"popover",onEditPost:v})},L))),o.createElement("a",{href:u?void 0:ge,className:"post-content-link-wrapper"},ee&&o.createElement(fe,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},C(ee)),o.createElement(yo,{className:"post-content-wrapper",description:te,disableShortenContent:g,mentions:J,"data-testid":"Content of the Post"})),o.createElement("span",null),o.createElement("span",null),o.createElement("div",{key:"tag-topic"},U&&U.length>0?o.createElement(rt,{topics:U,className:"post-topics"}):null),o.createElement("div",{key:"social-preview"},(null==T?void 0:T.introUrl)?o.createElement("div",{className:"social-preview-wrapper "+((null==Y?void 0:Y.length)?"has-image":"")},o.createElement(Ho,{url:T.introUrl,image:T.bannerImage})):null),o.createElement("div",{key:"image-preview"},(null==Y?void 0:Y.length)?o.createElement("div",{className:"image-preview-wrapper"},o.createElement(Wo,{images:Y,authorName:null==q?void 0:q.name})):null),o.createElement("div",{key:"link-preview"},(null==T?void 0:T.introUrl)||(null==Y?void 0:Y.length)||!(null==ae?void 0:ae.url)?null:o.createElement("div",{className:"link-preview-wrapper"},o.createElement(Ge,{title:ae.title,url:ae.url,image:ae.image}))),o.createElement(it,{isMarryBaby:se,type:Je.post,loveCount:oe,replyCount:ne,className:"post-reaction "+((null==Y?void 0:Y.length)||(null==ae?void 0:ae.url)?"hide-top-border":""),liked:be?!Q:Q,isReplied:le,onCommentClick:()=>ve((()=>{c?c():ue((e=>!e))})),onCommentCountClick:()=>{ve((()=>{se?ue(!0):d?d():!u&&(window.location.href=ge)}))},onShareClick:()=>{P(!0)},onLikeClick:()=>e(void 0,void 0,void 0,(function*(){if(ie&&!be){we(!0);try{const t=yield(({id:t,locale:a})=>e(void 0,void 0,void 0,(function*(){if(t)return yield $(O(V.POST.LIKE,{id:t,_locale:a}),"GET")})))({id:ie,locale:re});1!==(null==t?void 0:t.status)?de(ra(me)):I((e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})))}catch(e){de(ra(me))}we(!1)}})),showingMostEngaging:!(!r||!(null==M?void 0:M.id))}),pe&&o.createElement(co,{isMainCmt:!y,onClose:()=>ue(!1),onPostSuccess:e=>{0!==ne||(null==M?void 0:M.id)||j(e),I((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0}))),p&&p(e)},post:T}),r&&(null==M?void 0:M.id)?o.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{m?(e.stopPropagation(),m()):window.location.href=ge}},o.createElement(hi,{hasQuickBookingEnable:N,handleMakeAppointment:A,comment:M,post:T,onDeleteComment:()=>{Pe&&Pe(M)},className:"most-engaging-comment",type:"most-engaging",key:M.id,cardAuthorProps:L}),ne>1&&!n&&o.createElement(w,{className:"see-more-comments",color:"ghost",size:"md"},me("comment.seeMoreComments",{count:ne-1}))):null,k))};var Ci=Object.freeze({__proto__:null});export{Rn as A,xn as B,Ge as C,Ei as D,wi as E,hi as F,_n as G,ut as H,co as I,di as J,Re as K,qe as L,lo as P,go as S,De as T,gi as V,Ue as a,it as b,rt as c,ct as d,dt as e,ft as f,la as g,eo as h,Ha as i,Ga as j,_t as k,Rt as l,$t as m,Xa as n,no as o,bo as p,uo as q,yo as r,Io as s,Ci as t,We as u,Bo as v,Wo as w,Ho as x,aa as y,Un as z};
3078
+ `,yi=(t,a)=>e(void 0,void 0,void 0,(function*(){var e,o,n;const i=yield ae(O(R.COMMENT.LIST,{postId:t,_locale:a,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(n=null===(o=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e.comments)||void 0===o?void 0:o.map(de))||void 0===n?void 0:n[0]})),Ei=({className:t,style:a,hideViewMoreComment:n,showMostEngaging:r,onCommentClick:c,onCommentCountClick:d,onMostEngagingCommentClick:m,onPostCommentSuccess:p,disableCardLink:u,disableShortenContent:g,onDeletePost:h,onEditPost:v,post:f,mostEngagingComment:b,onDeleteComment:x,showInputComment:y,InlineCommentsComponent:k,hasQuickBookingEnable:N,handleMakeAppointment:A,cardAuthorProps:L})=>{const[T,I]=l(f),[S,P]=l(!1),[M,j]=l(b),{community:F,topics:U,author:q,slug:_,isPin:G,liked:Q,scheduleDateTime:X,createdAt:K,photos:Y,mentions:J,title:ee,description:te,previewUrl:ae,likesCount:oe,commentsCount:ne,id:ie,commented:le}=T,{data:{locale:re,env:{isMarryBaby:se,togetherBasePath:ce}},action:{pushNotifications:de}}=i(z),{t:me}=E(),[pe,ue]=l(y),ge=`${ce}/${(null==F?void 0:F.slug)||"_"}/${_||""}`,he=`${D(re)}${ge}`,{authActionWrapper:ve}=We((null==F?void 0:F.slug)?{_joinCommunityIds:[F.id],_joinTopicIds:null==U?void 0:U.map((e=>e.id))}:void 0),[be,we]=l(!1);s((()=>{ue(y)}),[y]);const xe=(null==q?void 0:q.name)||(null==q?void 0:q.username)||"",ye=(null==q?void 0:q.username)||(null==q?void 0:q.name)||"",Ee=null==q?void 0:q.avatar,Ce=(null==T?void 0:T.isAnonymous)||null==q?void 0:q.role,[ke,Ne]=l(null),[Ae,Le]=l(null);s((()=>{if(null==q?void 0:q.hospitalId){(t=>e(void 0,void 0,void 0,(function*(){var e;const a=yield B(W(Z.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:H[re]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.branch)&&Ne(null==a?void 0:a._data.branch)})))(q.hospitalId)}if(null==q?void 0:q.doctorId){(t=>e(void 0,void 0,void 0,(function*(){var e;const a=yield B(W(Z.GET_DOCTOR_INFO,{doctorId:t,website_url:H[re]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&Le(null==a?void 0:a._data.doctor)})))(q.doctorId)}}),[q.hospitalId,q.doctorId]);const Te=(null==Ae?void 0:Ae.valid_outpatient)||(null==Ae?void 0:Ae.valid_telemedicine),Ie=((null==ke?void 0:ke.total_available_service)||(null==ke?void 0:ke.total_available_doctor))>0,Se=N&&(Te||Ie);s((()=>{e(void 0,void 0,void 0,(function*(){if(ie&&ne&&r&&!(null==b?void 0:b.id)){const e=yield yi(ie,re);j(e)}}))}),[ie,re,ne,r,null==b?void 0:b.id]),s((()=>{j(b)}),[null==b?void 0:b.id]);const Pe=t=>e(void 0,void 0,void 0,(function*(){if(ne>1&&(null==M?void 0:M.id)&&(null==M?void 0:M.id)===(null==t?void 0:t.id)){const e=yield yi(ie,re);j(e)}I((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1}))),x&&x(t)}));return o.createElement(Ue,{defaultParams:(null==F?void 0:F.slug)?{_joinCommunityIds:[F.id],_joinTopicIds:null==U?void 0:U.map((e=>e.id))}:void 0},S&&o.createElement(go,{url:he,avatar:V,text:ee,onClose:()=>P(!1)}),o.createElement(xi,{className:t,style:a,"data-is-marrybaby":se},G?o.createElement(dt,{className:"post-pin"}):null,o.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},o.createElement(la,Object.assign({avatar:Ee,name:xe,username:ye,url:u?void 0:ge,community:F,timeText:null==T?void 0:T.createdTime,className:"post-author",role:Ce,userId:null==q?void 0:q.id,expertId:null==q?void 0:q.partnerId,doctorId:null==q?void 0:q.doctorId,hospitalId:null==q?void 0:q.hospitalId,title:null==q?void 0:q.title,hasQuickBooking:Se,handleMakeAppointment:A,"data-testid":"name",isAnonymous:!!(null==T?void 0:T.isAnonymous),extendEle:o.createElement(wi,{authorEmail:String(null==q?void 0:q.email),onDeletePost:h,shareUrl:he,post:T,className:"popover",onEditPost:v})},L))),o.createElement("a",{href:u?void 0:ge,className:"post-content-link-wrapper"},ee&&o.createElement(fe,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},C(ee)),o.createElement(yo,{className:"post-content-wrapper",description:te,disableShortenContent:g,mentions:J,"data-testid":"Content of the Post"})),o.createElement("span",null),o.createElement("span",null),o.createElement("div",{key:"tag-topic"},U&&U.length>0?o.createElement(rt,{topics:U,className:"post-topics"}):null),o.createElement("div",{key:"social-preview"},(null==T?void 0:T.introUrl)?o.createElement("div",{className:"social-preview-wrapper "+((null==Y?void 0:Y.length)?"has-image":"")},o.createElement(Ho,{url:T.introUrl,image:T.bannerImage})):null),o.createElement("div",{key:"image-preview"},(null==Y?void 0:Y.length)?o.createElement("div",{className:"image-preview-wrapper"},o.createElement(Wo,{images:Y,authorName:null==q?void 0:q.name})):null),o.createElement("div",{key:"link-preview"},(null==T?void 0:T.introUrl)||(null==Y?void 0:Y.length)||!(null==ae?void 0:ae.url)?null:o.createElement("div",{className:"link-preview-wrapper"},o.createElement(Ge,{title:ae.title,url:ae.url,image:ae.image}))),o.createElement(it,{isMarryBaby:se,type:Je.post,loveCount:oe,replyCount:ne,className:"post-reaction "+((null==Y?void 0:Y.length)||(null==ae?void 0:ae.url)?"hide-top-border":""),liked:be?!Q:Q,isReplied:le,onCommentClick:()=>ve((()=>{c?c():ue((e=>!e))})),onCommentCountClick:()=>{ve((()=>{se?ue(!0):d?d():!u&&(window.location.href=ge)}))},onShareClick:()=>{P(!0)},onLikeClick:()=>e(void 0,void 0,void 0,(function*(){if(ie&&!be){we(!0);try{const t=yield(({id:t,locale:a})=>e(void 0,void 0,void 0,(function*(){if(t)return yield $(O(R.POST.LIKE,{id:t,_locale:a}),"GET")})))({id:ie,locale:re});1!==(null==t?void 0:t.status)?de(ra(me)):I((e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})))}catch(e){de(ra(me))}we(!1)}})),showingMostEngaging:!(!r||!(null==M?void 0:M.id))}),pe&&o.createElement(co,{isMainCmt:!y,onClose:()=>ue(!1),onPostSuccess:e=>{0!==ne||(null==M?void 0:M.id)||j(e),I((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0}))),p&&p(e)},post:T}),r&&(null==M?void 0:M.id)?o.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{m?(e.stopPropagation(),m()):window.location.href=ge}},o.createElement(hi,{hasQuickBookingEnable:N,handleMakeAppointment:A,comment:M,post:T,onDeleteComment:()=>{Pe&&Pe(M)},className:"most-engaging-comment",type:"most-engaging",key:M.id,cardAuthorProps:L}),ne>1&&!n&&o.createElement(w,{className:"see-more-comments",color:"ghost",size:"md"},me("comment.seeMoreComments",{count:ne-1}))):null,k))};var Ci=Object.freeze({__proto__:null});export{Vn as A,xn as B,Ge as C,Ei as D,wi as E,hi as F,_n as G,ut as H,co as I,di as J,Ve as K,qe as L,lo as P,go as S,De as T,gi as V,Ue as a,it as b,rt as c,ct as d,dt as e,ft as f,la as g,eo as h,Ha as i,Ga as j,_t as k,Vt as l,$t as m,Xa as n,no as o,bo as p,uo as q,yo as r,Io as s,Ci as t,We as u,Bo as v,Wo as w,Ho as x,aa as y,Un as z};