@hhgtech/hhg-components 1.29.415 → 1.29.416-beta-1

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 (515) hide show
  1. package/build/{InputDate-58ef5472.js → InputDate-cdba1a1a.js} +3 -3
  2. package/build/{LastPeriod-d91118f4.js → LastPeriod-f84d3d12.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-14463bf3.js → MobileBottomNavigationIcon-c6690b1c.js} +3 -3
  4. package/build/{Spinner-6d31e75c.js → Spinner-b730fa1b.js} +1 -1
  5. package/build/{WhatsApp-0e38d63c.js → WhatsApp-80f3faa2.js} +1 -1
  6. package/build/adapters.js +20 -20
  7. package/build/atoms.js +49 -49
  8. package/build/babyGrowth.js +84 -84
  9. package/build/cache.js +2 -2
  10. package/build/care.js +17 -17
  11. package/build/careBookingSearchBar.js +14 -14
  12. package/build/careBookingSearchBarV2.js +15 -15
  13. package/build/components.js +98 -98
  14. package/build/{constants-3ab471e6.js → constants-1608c608.js} +5 -2
  15. package/build/constants.js +3 -3
  16. package/build/constantsDomainLocales.js +1 -1
  17. package/build/constantsRiskScreener.js +2 -2
  18. package/build/constantsSite.js +2 -2
  19. package/build/{core-9b0d889e.js → core-b58b6ade.js} +1 -1
  20. package/build/{dataTransform-38ba6c39.js → dataTransform-21e9ae78.js} +1 -1
  21. package/build/ecom.js +4 -4
  22. package/build/{editor-e8cae9bc.js → editor-1201c05e.js} +11 -11
  23. package/build/embeddedHeathToolCards_babyGrowth.js +24 -24
  24. package/build/embeddedHeathToolCards_babyPoop.js +20 -20
  25. package/build/embeddedHeathToolCards_babyVaccine.js +23 -23
  26. package/build/embeddedHeathToolCards_bmi_bmi.js +26 -26
  27. package/build/embeddedHeathToolCards_bmrBmr.js +26 -26
  28. package/build/embeddedHeathToolCards_dueDate_dueDate.js +23 -23
  29. package/build/embeddedHeathToolCards_ovulation_ovulation.js +23 -23
  30. package/build/embeddedHeathToolCards_pwg_pwg.js +27 -27
  31. package/build/embeddedHeathToolCards_targetHeartRate.js +28 -28
  32. package/build/esm/{InputDate-5538194a.js → InputDate-bf6a9363.js} +3 -3
  33. package/build/esm/{LastPeriod-98f11a32.js → LastPeriod-08abd9e0.js} +1 -1
  34. package/build/esm/{MobileBottomNavigationIcon-aa9b9ec2.js → MobileBottomNavigationIcon-f949a29e.js} +3 -3
  35. package/build/esm/{Spinner-c7e7d439.js → Spinner-df4fdeb5.js} +1 -1
  36. package/build/esm/{WhatsApp-f52d04e3.js → WhatsApp-5b241d8e.js} +1 -1
  37. package/build/esm/adapters.js +20 -20
  38. package/build/esm/atoms.js +49 -49
  39. package/build/esm/babyGrowth.js +84 -84
  40. package/build/esm/cache.js +2 -2
  41. package/build/esm/care.js +17 -17
  42. package/build/esm/careBookingSearchBar.js +14 -14
  43. package/build/esm/careBookingSearchBarV2.js +15 -15
  44. package/build/esm/components.js +98 -98
  45. package/build/esm/{constants-aff32a83.js → constants-4f6be0b0.js} +5 -2
  46. package/build/esm/constants.js +3 -3
  47. package/build/esm/constantsDomainLocales.js +1 -1
  48. package/build/esm/constantsRiskScreener.js +2 -2
  49. package/build/esm/constantsSite.js +2 -2
  50. package/build/esm/{core-0a6ca2ec.js → core-ad50807e.js} +1 -1
  51. package/build/esm/{dataTransform-88d4bea2.js → dataTransform-b5723a88.js} +1 -1
  52. package/build/esm/ecom.js +4 -4
  53. package/build/esm/{editor-8798c983.js → editor-a8d53ac1.js} +11 -11
  54. package/build/esm/embeddedHeathToolCards_babyGrowth.js +24 -24
  55. package/build/esm/embeddedHeathToolCards_babyPoop.js +20 -20
  56. package/build/esm/embeddedHeathToolCards_babyVaccine.js +23 -23
  57. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +26 -26
  58. package/build/esm/embeddedHeathToolCards_bmrBmr.js +26 -26
  59. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +23 -23
  60. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +23 -23
  61. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +27 -27
  62. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +28 -28
  63. package/build/esm/footer.js +22 -22
  64. package/build/esm/gAssets.js +2 -2
  65. package/build/esm/{healthTools-8d291d00.js → healthTools-84409e98.js} +1 -1
  66. package/build/esm/healthToolsCardWrapper.js +19 -19
  67. package/build/esm/healthToolsForm.js +34 -34
  68. package/build/esm/hooks/usePlacesAutocomplete.d.ts +1 -1
  69. package/build/esm/hooks.js +13 -13
  70. package/build/esm/i18n.js +2 -2
  71. package/build/esm/i18nV2.js +2 -2
  72. package/build/esm/{index-0f4ee0ab.js → index-067e8885.js} +15 -15
  73. package/build/esm/{index-318938e5.js → index-10e26d0d.js} +25 -25
  74. package/build/esm/{index-69c7ae68.js → index-16f555a0.js} +6 -6
  75. package/build/esm/{index-9858f292.js → index-1c8c4563.js} +32 -32
  76. package/build/esm/{index-70e409fc.js → index-2089f502.js} +2 -2
  77. package/build/esm/{index-32358681.js → index-20eab504.js} +6 -6
  78. package/build/esm/{index-b7616d0b.js → index-25983827.js} +1 -1
  79. package/build/esm/{index-f982d263.js → index-32c0c36c.js} +3 -3
  80. package/build/esm/{index-73dfd148.js → index-33d9cfb9.js} +3 -3
  81. package/build/esm/{index-5fc90873.js → index-39c0105f.js} +8 -8
  82. package/build/esm/{index-98b7f8c7.js → index-3b49172b.js} +6 -6
  83. package/build/esm/{index-b33b8aca.js → index-477b8c7a.js} +11 -11
  84. package/build/esm/{index-91b88d73.js → index-4851fad7.js} +17 -17
  85. package/build/esm/{index-75fdb3e1.js → index-5234efcb.js} +2 -2
  86. package/build/esm/{index-4f7118de.js → index-547339b4.js} +2 -2
  87. package/build/esm/{index-75b05705.js → index-5747d34b.js} +16 -16
  88. package/build/esm/{index-9ec6a9d0.js → index-5a7a3c1a.js} +13 -13
  89. package/build/esm/{index-176847b7.js → index-5ac13b18.js} +32 -32
  90. package/build/esm/{index-3fe1fce3.js → index-5b071622.js} +2 -2
  91. package/build/esm/{index-67397aa5.js → index-5bab57de.js} +6 -6
  92. package/build/esm/{index-bb27ae5c.js → index-6092ee9c.js} +13 -13
  93. package/build/esm/{index-685ae89f.js → index-6206ea8f.js} +1 -1
  94. package/build/esm/{index-e229f15b.js → index-66adda7e.js} +24 -24
  95. package/build/esm/{index-fb65650b.js → index-66f326a0.js} +2 -2
  96. package/build/esm/{index-c45719be.js → index-6a588d96.js} +2 -2
  97. package/build/esm/{index-e819d1df.js → index-6b742e45.js} +17 -17
  98. package/build/esm/{index-7070c415.js → index-705da63f.js} +2 -2
  99. package/build/esm/{index-d0700a22.js → index-715d6532.js} +2 -2
  100. package/build/esm/{index-dd974ad6.js → index-726402d3.js} +2 -2
  101. package/build/esm/{index-feefc7df.js → index-7490f2c5.js} +6 -6
  102. package/build/esm/{index-ede64fc9.js → index-77d1054c.js} +17 -17
  103. package/build/esm/{index-27a4e1d4.js → index-77efae47.js} +3 -3
  104. package/build/esm/{index-27617594.js → index-782ac143.js} +1 -1
  105. package/build/esm/{index-0331ab25.js → index-792e681e.js} +2 -2
  106. package/build/esm/{index-04a7e028.js → index-7b525830.js} +3 -3
  107. package/build/esm/{index-b34bd2e0.js → index-7dbb7127.js} +1 -1
  108. package/build/esm/{index-6d0441d3.js → index-819c04d5.js} +15 -15
  109. package/build/esm/{index-de587167.js → index-8513ba9e.js} +1 -1
  110. package/build/esm/{index-c85b22a7.js → index-85496ec5.js} +21 -41
  111. package/build/esm/{index-3b61b2a2.js → index-9116fbd2.js} +1 -1
  112. package/build/esm/{index-b0b4f405.js → index-915c0a01.js} +13 -13
  113. package/build/esm/{index-374932e6.js → index-92028dcb.js} +1 -1
  114. package/build/esm/{index-f27f0de6.js → index-92083a73.js} +4 -4
  115. package/build/esm/{index-11cac3cb.js → index-9da3e23b.js} +22 -22
  116. package/build/esm/{index-ff349c3b.js → index-9e29d3e3.js} +30 -30
  117. package/build/esm/{index-04f47cc0.js → index-a99ac287.js} +16 -16
  118. package/build/esm/{index-a277d650.js → index-aabf118a.js} +2 -2
  119. package/build/esm/{index-92773320.js → index-ae970044.js} +4 -4
  120. package/build/esm/{index-ae94b2f8.js → index-b45d145f.js} +17 -17
  121. package/build/esm/{index-4f8312e6.js → index-bc18ecff.js} +2 -2
  122. package/build/esm/{index-c436755a.js → index-bd9013de.js} +5 -5
  123. package/build/esm/{index-1caab809.js → index-c1f7b079.js} +5 -5
  124. package/build/esm/{index-2f61243a.js → index-c57988e9.js} +3 -3
  125. package/build/esm/{index-eac9db63.js → index-c71cd1be.js} +10 -10
  126. package/build/esm/{index-94c92cf3.js → index-ccfee79f.js} +3 -3
  127. package/build/esm/{index-30f9350e.js → index-ce969d66.js} +3 -3
  128. package/build/esm/{index-27155edd.js → index-d0b17929.js} +7 -7
  129. package/build/esm/{index-954861c8.js → index-d588e6bb.js} +2 -2
  130. package/build/esm/{index-f24f57d5.js → index-db423d7b.js} +13 -13
  131. package/build/esm/{index-26cfe0bb.js → index-dea22586.js} +2 -2
  132. package/build/esm/{index-b4aee217.js → index-dfd9f7df.js} +2 -2
  133. package/build/esm/{index-215f5800.js → index-e1fe3a5b.js} +1 -1
  134. package/build/esm/{index-90bb79b8.js → index-e2260ffa.js} +13 -13
  135. package/build/esm/{index-b32fe487.js → index-f27d65ec.js} +15 -15
  136. package/build/esm/{index-0710e23d.js → index-f5335875.js} +9 -15
  137. package/build/esm/{index-185648e7.js → index-f7979138.js} +3 -3
  138. package/build/esm/{index-bdec32bc.js → index-fb2de7c3.js} +7 -7
  139. package/build/esm/{index-f36ec57a.js → index-fb3af40f.js} +13 -13
  140. package/build/esm/index.js +119 -119
  141. package/build/esm/{labelSorting-7d8f17d3.js → labelSorting-edb2b18a.js} +4 -4
  142. package/build/esm/lead/LeadGen.helpers.d.ts +2 -2
  143. package/build/esm/lead/LeadGen.type.d.ts +4 -3
  144. package/build/esm/lead/LeadGenInline/LeadGenInline.d.ts +8 -0
  145. package/build/esm/lead/LeadGenInline/index.d.ts +2 -0
  146. package/build/esm/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +21 -15
  147. package/build/esm/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +1 -3
  148. package/build/esm/lead/index.d.ts +5 -1
  149. package/build/esm/lead/layouts/inline.d.ts +3 -2
  150. package/build/esm/lead/layouts/lightbox/index.d.ts +2 -1
  151. package/build/esm/lead/newLeadPopup.d.ts +2 -1
  152. package/build/esm/lead/services/index.d.ts +5 -1
  153. package/build/esm/lead/services/index.type.d.ts +5 -0
  154. package/build/esm/lead/utils.d.ts +18 -0
  155. package/build/esm/lead.js +432 -332
  156. package/build/esm/{logoIcon-374f4970.js → logoIcon-7646edff.js} +2 -2
  157. package/build/esm/mantine.js +26 -26
  158. package/build/esm/misc/cachedSystem.d.ts +5 -0
  159. package/build/esm/misc.js +18 -18
  160. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  161. package/build/esm/miscGetSocialList.js +8 -8
  162. package/build/esm/miscScreenSizeContext.js +1 -1
  163. package/build/esm/mobileBottomNavigation.js +5 -5
  164. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  165. package/build/esm/molecules.js +75 -75
  166. package/build/esm/moleculesArticleCard.js +6 -6
  167. package/build/esm/moleculesArticleCardV2.js +17 -17
  168. package/build/esm/navigation.js +47 -47
  169. package/build/esm/navigationLogoutPopup.js +11 -11
  170. package/build/esm/navigationProfileButton.js +27 -27
  171. package/build/esm/onboardingV2.js +30 -30
  172. package/build/esm/organisms.js +51 -51
  173. package/build/esm/{post-ecd47b07.js → post-8f42afbc.js} +2 -2
  174. package/build/esm/profileNavigation.js +20 -20
  175. package/build/esm/progressBar.js +1 -1
  176. package/build/esm/pwg.js +23 -23
  177. package/build/esm/ssoV2/api/featureFlag.d.ts +2 -1
  178. package/build/esm/ssoV2.js +53 -41
  179. package/build/esm/{store-4db51f5b.js → store-966ef305.js} +3 -3
  180. package/build/esm/subot.js +37 -37
  181. package/build/esm/surveyOrPremiumBanner.js +34 -34
  182. package/build/esm/surveyQuestionCard.js +11 -11
  183. package/build/esm/{surveyThankyouCard-da2ce7af.js → surveyThankyouCard-c20fa807.js} +5 -5
  184. package/build/esm/together.js +57 -57
  185. package/build/esm/togetherApiUtils.js +4 -4
  186. package/build/esm/togetherAtoms.js +31 -31
  187. package/build/esm/togetherComponentGlobalContext.js +4 -4
  188. package/build/esm/togetherMolecules.js +52 -52
  189. package/build/esm/togetherMoleculesCardAuthor.js +29 -29
  190. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  191. package/build/esm/togetherMoleculesProfileDetail.js +40 -40
  192. package/build/esm/togetherOrganisms.js +51 -51
  193. package/build/esm/togetherRichTextEditor.js +18 -18
  194. package/build/esm/togetherShareBox.js +10 -10
  195. package/build/esm/{translationsProvider-fd926313.js → translationsProvider-647a2db0.js} +1 -1
  196. package/build/esm/{treePopoverMenu-51a31cf4.js → treePopoverMenu-8c561cb3.js} +19 -19
  197. package/build/esm/{types-412455f0.js → types-6bed1943.js} +2 -2
  198. package/build/esm/types.js +2 -2
  199. package/build/esm/{useCategory-8732f623.js → useCategory-69865f9d.js} +5 -5
  200. package/build/esm/{useHealthToolCache-9f834040.js → useHealthToolCache-32e3d6d9.js} +1 -1
  201. package/build/esm/{usePlacesAutocomplete-446bd4ee.js → usePlacesAutocomplete-4ec2c43f.js} +4 -2
  202. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  203. package/build/esm/{utils-d53683c9.js → utils-03be42a6.js} +2 -2
  204. package/build/esm/{utils-98ce346a.js → utils-ab71b4b1.js} +2 -2
  205. package/build/esm/{utils-f7d1e360.js → utils-c729484a.js} +5 -5
  206. package/build/esm/{utils-4d7ed0d7.js → utils-f4d1c5fb.js} +3 -3
  207. package/build/esm/vaccination.js +22 -22
  208. package/build/footer.js +22 -22
  209. package/build/gAssets.js +2 -2
  210. package/build/{healthTools-c73ebe34.js → healthTools-85e5eb32.js} +1 -1
  211. package/build/healthToolsCardWrapper.js +19 -19
  212. package/build/healthToolsForm.js +34 -34
  213. package/build/hooks/usePlacesAutocomplete.d.ts +1 -1
  214. package/build/hooks.js +13 -13
  215. package/build/i18n.js +2 -2
  216. package/build/i18nV2.js +1 -1
  217. package/build/{index-36dab6a0.js → index-02c87bc2.js} +1 -1
  218. package/build/{index-09859d04.js → index-0ca0f026.js} +2 -2
  219. package/build/{index-bd672f38.js → index-0ee812d6.js} +1 -1
  220. package/build/{index-800c6cd9.js → index-0f5669eb.js} +6 -6
  221. package/build/{index-10ae0863.js → index-1055cd24.js} +7 -7
  222. package/build/{index-a13846df.js → index-1a10efaa.js} +13 -13
  223. package/build/{index-073cd8c2.js → index-1ffd5b21.js} +17 -17
  224. package/build/{index-997a2207.js → index-2265eeea.js} +1 -1
  225. package/build/{index-ec35fa03.js → index-24708627.js} +2 -2
  226. package/build/{index-c8cc0745.js → index-268b532d.js} +13 -13
  227. package/build/{index-d8a06556.js → index-28cbbdf4.js} +13 -13
  228. package/build/{index-9a54d8c5.js → index-296e15ed.js} +3 -3
  229. package/build/{index-016a428a.js → index-2adbe7a3.js} +3 -3
  230. package/build/{index-256f0f6e.js → index-2cb14b4b.js} +1 -1
  231. package/build/{index-76fd2e65.js → index-30a19bc1.js} +3 -3
  232. package/build/{index-495dc845.js → index-31b43caf.js} +5 -5
  233. package/build/{index-3db7b258.js → index-32ed78c5.js} +6 -6
  234. package/build/{index-9c4ca6bf.js → index-3867da1b.js} +11 -11
  235. package/build/{index-6fa141c1.js → index-3c38a412.js} +32 -32
  236. package/build/{index-4f86f204.js → index-415315a9.js} +3 -3
  237. package/build/{index-38bc90d8.js → index-429c9b6b.js} +1 -1
  238. package/build/{index-cee8e21b.js → index-4fa88469.js} +9 -15
  239. package/build/{index-6b8c94b2.js → index-58937d75.js} +3 -3
  240. package/build/{index-d759fabc.js → index-5e659205.js} +2 -2
  241. package/build/{index-132959e1.js → index-601b4ce2.js} +24 -24
  242. package/build/{index-0bf2c959.js → index-612cc9b9.js} +2 -2
  243. package/build/{index-2a3391f8.js → index-63955802.js} +2 -2
  244. package/build/{index-9d537b28.js → index-63ca536c.js} +15 -15
  245. package/build/{index-68e59121.js → index-6a8c7325.js} +3 -3
  246. package/build/{index-57ba5e79.js → index-6b87a7fc.js} +7 -7
  247. package/build/{index-4117c682.js → index-6c58b0da.js} +2 -2
  248. package/build/{index-724ff3bc.js → index-6ef7a536.js} +30 -30
  249. package/build/{index-2718d2cb.js → index-6fe359e8.js} +3 -3
  250. package/build/{index-3f6e67a1.js → index-72851afc.js} +2 -2
  251. package/build/{index-0e2ebdca.js → index-756642cb.js} +13 -13
  252. package/build/{index-07575f0c.js → index-7bed6df2.js} +22 -22
  253. package/build/{index-f8fa97dd.js → index-7fa743ce.js} +15 -15
  254. package/build/{index-593890f6.js → index-8bbbf05b.js} +32 -32
  255. package/build/{index-ec80e863.js → index-8de31573.js} +21 -41
  256. package/build/{index-2d6eb5f5.js → index-9f47550e.js} +2 -2
  257. package/build/{index-acc06c0b.js → index-a4476544.js} +2 -2
  258. package/build/{index-39bcd741.js → index-a7704a96.js} +4 -4
  259. package/build/{index-7c8b8e56.js → index-aa0d5699.js} +6 -6
  260. package/build/{index-acb317e2.js → index-af62f473.js} +25 -25
  261. package/build/{index-cc4242ae.js → index-b27ddca8.js} +13 -13
  262. package/build/{index-312ebc69.js → index-b4632771.js} +6 -6
  263. package/build/{index-b62fab2d.js → index-bd6f500a.js} +1 -1
  264. package/build/{index-7b4a82e1.js → index-c370ee7b.js} +16 -16
  265. package/build/{index-a57d707a.js → index-c40d61a0.js} +1 -1
  266. package/build/{index-3e1532fb.js → index-cbf09c07.js} +5 -5
  267. package/build/{index-bed5366c.js → index-cd2b1a11.js} +17 -17
  268. package/build/{index-94945a5f.js → index-cd711b45.js} +17 -17
  269. package/build/{index-08335f5a.js → index-d0f4b4f2.js} +2 -2
  270. package/build/{index-20877a0f.js → index-d6fc5f76.js} +10 -10
  271. package/build/{index-93d99257.js → index-d76cd192.js} +2 -2
  272. package/build/{index-dec3cee2.js → index-d87e96bb.js} +13 -13
  273. package/build/{index-30aa67da.js → index-d94aa2e3.js} +1 -1
  274. package/build/{index-6c6657d7.js → index-daf4d41c.js} +16 -16
  275. package/build/{index-4096d4a6.js → index-db657b3c.js} +17 -17
  276. package/build/{index-1e6e9ba1.js → index-e43f9d13.js} +8 -8
  277. package/build/{index-a2df0bbc.js → index-ef521b19.js} +3 -3
  278. package/build/{index-bfb9ecb4.js → index-f51bb35f.js} +2 -2
  279. package/build/{index-5ebe5b38.js → index-f5aea36a.js} +2 -2
  280. package/build/{index-bf7dc022.js → index-f714c7c6.js} +2 -2
  281. package/build/{index-09c3ae7c.js → index-f845e499.js} +15 -15
  282. package/build/{index-43ba38c7.js → index-fb56674a.js} +6 -6
  283. package/build/{index-7a85c562.js → index-fb9c6a3e.js} +4 -4
  284. package/build/{index-fefebab3.js → index-fc658a63.js} +2 -2
  285. package/build/index.js +119 -119
  286. package/build/{labelSorting-e63a6a77.js → labelSorting-5efd4233.js} +4 -4
  287. package/build/lead/LeadGen.helpers.d.ts +2 -2
  288. package/build/lead/LeadGen.type.d.ts +4 -3
  289. package/build/lead/LeadGenInline/LeadGenInline.d.ts +8 -0
  290. package/build/lead/LeadGenInline/index.d.ts +2 -0
  291. package/build/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +21 -15
  292. package/build/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +1 -3
  293. package/build/lead/index.d.ts +5 -1
  294. package/build/lead/layouts/inline.d.ts +3 -2
  295. package/build/lead/layouts/lightbox/index.d.ts +2 -1
  296. package/build/lead/newLeadPopup.d.ts +2 -1
  297. package/build/lead/services/index.d.ts +5 -1
  298. package/build/lead/services/index.type.d.ts +5 -0
  299. package/build/lead/utils.d.ts +18 -0
  300. package/build/lead.js +431 -329
  301. package/build/{logoIcon-63b93928.js → logoIcon-9f7c0032.js} +2 -2
  302. package/build/mantine.js +24 -24
  303. package/build/misc/cachedSystem.d.ts +5 -0
  304. package/build/misc.js +18 -18
  305. package/build/miscGetDynamicHealthTool.js +4 -4
  306. package/build/miscGetSocialList.js +8 -8
  307. package/build/miscScreenSizeContext.js +1 -1
  308. package/build/mobileBottomNavigation.js +5 -5
  309. package/build/mobileBottomNavigationIcon.js +5 -5
  310. package/build/molecules.js +75 -75
  311. package/build/moleculesArticleCard.js +6 -6
  312. package/build/moleculesArticleCardV2.js +17 -17
  313. package/build/navigation.js +47 -47
  314. package/build/navigationLogoutPopup.js +11 -11
  315. package/build/navigationProfileButton.js +27 -27
  316. package/build/onboardingV2.js +29 -29
  317. package/build/organisms.js +51 -51
  318. package/build/{post-68fdeea4.js → post-146fd5fe.js} +2 -2
  319. package/build/profileNavigation.js +20 -20
  320. package/build/progressBar.js +1 -1
  321. package/build/pwg.js +23 -23
  322. package/build/ssoV2/api/featureFlag.d.ts +2 -1
  323. package/build/ssoV2.js +51 -39
  324. package/build/{store-348302b3.js → store-ba505d6a.js} +3 -3
  325. package/build/subot.js +36 -36
  326. package/build/surveyOrPremiumBanner.js +34 -34
  327. package/build/surveyQuestionCard.js +11 -11
  328. package/build/{surveyThankyouCard-6650c7c4.js → surveyThankyouCard-9b26148e.js} +5 -5
  329. package/build/together.js +57 -57
  330. package/build/togetherApiUtils.js +4 -4
  331. package/build/togetherAtoms.js +31 -31
  332. package/build/togetherComponentGlobalContext.js +4 -4
  333. package/build/togetherMolecules.js +52 -52
  334. package/build/togetherMoleculesCardAuthor.js +29 -29
  335. package/build/togetherMoleculesPostImagePreview.js +11 -11
  336. package/build/togetherMoleculesProfileDetail.js +40 -40
  337. package/build/togetherOrganisms.js +51 -51
  338. package/build/togetherRichTextEditor.js +18 -18
  339. package/build/togetherShareBox.js +10 -10
  340. package/build/{translationsProvider-d58821cd.js → translationsProvider-d88a150a.js} +1 -1
  341. package/build/{treePopoverMenu-5d483005.js → treePopoverMenu-4ff31bad.js} +19 -19
  342. package/build/{types-c48eeb81.js → types-6113ffdf.js} +2 -2
  343. package/build/types.js +2 -2
  344. package/build/{useCategory-ecf755ad.js → useCategory-aa5f1b9e.js} +5 -5
  345. package/build/{useHealthToolCache-2674f4c5.js → useHealthToolCache-f3974059.js} +1 -1
  346. package/build/{usePlacesAutocomplete-ac40a4dd.js → usePlacesAutocomplete-7bb8ea02.js} +4 -2
  347. package/build/useTogetherAuthRequiredAction.js +10 -10
  348. package/build/{utils-33c1a8a1.js → utils-15cf4bed.js} +3 -3
  349. package/build/{utils-3f33c852.js → utils-82bb3b31.js} +2 -2
  350. package/build/{utils-fd45a936.js → utils-b1712bb6.js} +2 -2
  351. package/build/{utils-b7c16896.js → utils-feeb55f4.js} +5 -5
  352. package/build/vaccination.js +22 -22
  353. package/package.json +1 -1
  354. /package/build/{BMI_BOYS.percentile.monthly-cebb1c4d.js → BMI_BOYS.percentile.monthly-1d037709.js} +0 -0
  355. /package/build/{BMI_BOYS.percentile.weekly-17eb127a.js → BMI_BOYS.percentile.weekly-3bbb61f3.js} +0 -0
  356. /package/build/{BMI_BOYS.percentile.yearly-93a7f7c4.js → BMI_BOYS.percentile.yearly-da2c6c1f.js} +0 -0
  357. /package/build/{BMI_BOYS.zscore.monthly-12e5886b.js → BMI_BOYS.zscore.monthly-fb0ece7d.js} +0 -0
  358. /package/build/{BMI_BOYS.zscore.weekly-a562a272.js → BMI_BOYS.zscore.weekly-8415733b.js} +0 -0
  359. /package/build/{BMI_BOYS.zscore.yearly-6eb2b149.js → BMI_BOYS.zscore.yearly-ccde3de8.js} +0 -0
  360. /package/build/{BMI_GIRLS.percentile.monthly-56e35e72.js → BMI_GIRLS.percentile.monthly-8ce3df66.js} +0 -0
  361. /package/build/{BMI_GIRLS.percentile.weekly-b5ddccba.js → BMI_GIRLS.percentile.weekly-71b8f9cf.js} +0 -0
  362. /package/build/{BMI_GIRLS.percentile.yearly-2bf6e5fc.js → BMI_GIRLS.percentile.yearly-03be2266.js} +0 -0
  363. /package/build/{BMI_GIRLS.zscore.monthly-1be7a376.js → BMI_GIRLS.zscore.monthly-c4964f7c.js} +0 -0
  364. /package/build/{BMI_GIRLS.zscore.weekly-a3481505.js → BMI_GIRLS.zscore.weekly-5d7413af.js} +0 -0
  365. /package/build/{BMI_GIRLS.zscore.yearly-ce84f0d4.js → BMI_GIRLS.zscore.yearly-243d5a3f.js} +0 -0
  366. /package/build/{ChevronDown-76b71a87.js → ChevronDown-d280dae8.js} +0 -0
  367. /package/build/{Close-e0c87acf.js → Close-0fa9f81b.js} +0 -0
  368. /package/build/{Google-6251ce88.js → Google-988168e0.js} +0 -0
  369. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-da590130.js → HEAD CIRCUM_BOYS.percentile.monthly-5a50cdbb.js} +0 -0
  370. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-c3357b42.js → HEAD CIRCUM_BOYS.percentile.weekly-2f4858ec.js} +0 -0
  371. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-2a03d4de.js → HEAD CIRCUM_BOYS.percentile.yearly-b595af4a.js} +0 -0
  372. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-e61f4d99.js → HEAD CIRCUM_BOYS.zscore.monthly-fd0a1e09.js} +0 -0
  373. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-285bc4e6.js → HEAD CIRCUM_BOYS.zscore.weekly-4e35b365.js} +0 -0
  374. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-974cd65e.js → HEAD CIRCUM_BOYS.zscore.yearly-d3ab7127.js} +0 -0
  375. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-395967f6.js → HEAD CIRCUM_GIRLS.percentile.monthly-7dc420e6.js} +0 -0
  376. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-5a730eed.js → HEAD CIRCUM_GIRLS.percentile.weekly-91e84da9.js} +0 -0
  377. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-ea99d243.js → HEAD CIRCUM_GIRLS.percentile.yearly-f487601a.js} +0 -0
  378. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-f2304be7.js → HEAD CIRCUM_GIRLS.zscore.monthly-6e2a47b4.js} +0 -0
  379. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-c6e3fece.js → HEAD CIRCUM_GIRLS.zscore.weekly-195aa890.js} +0 -0
  380. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-2c2ee3be.js → HEAD CIRCUM_GIRLS.zscore.yearly-a4f042c7.js} +0 -0
  381. /package/build/{HEIGHT_BOYS.percentile.monthly-64391dd4.js → HEIGHT_BOYS.percentile.monthly-76acdffd.js} +0 -0
  382. /package/build/{HEIGHT_BOYS.percentile.weekly-ed0c482c.js → HEIGHT_BOYS.percentile.weekly-62bd8963.js} +0 -0
  383. /package/build/{HEIGHT_BOYS.percentile.yearly-bc395351.js → HEIGHT_BOYS.percentile.yearly-b005b618.js} +0 -0
  384. /package/build/{HEIGHT_BOYS.zscore.monthly-40fe8e45.js → HEIGHT_BOYS.zscore.monthly-9aa52f61.js} +0 -0
  385. /package/build/{HEIGHT_BOYS.zscore.weekly-f9a00b96.js → HEIGHT_BOYS.zscore.weekly-f0051e9d.js} +0 -0
  386. /package/build/{HEIGHT_BOYS.zscore.yearly-1f8d99b2.js → HEIGHT_BOYS.zscore.yearly-1b4ebed9.js} +0 -0
  387. /package/build/{HEIGHT_GIRLS.percentile.monthly-773c626b.js → HEIGHT_GIRLS.percentile.monthly-171d9e8e.js} +0 -0
  388. /package/build/{HEIGHT_GIRLS.percentile.weekly-d8615dcc.js → HEIGHT_GIRLS.percentile.weekly-6c0a1818.js} +0 -0
  389. /package/build/{HEIGHT_GIRLS.percentile.yearly-f7fa9756.js → HEIGHT_GIRLS.percentile.yearly-b08c1d43.js} +0 -0
  390. /package/build/{HEIGHT_GIRLS.zscore.monthly-cc8eee46.js → HEIGHT_GIRLS.zscore.monthly-93918315.js} +0 -0
  391. /package/build/{HEIGHT_GIRLS.zscore.weekly-744fcec6.js → HEIGHT_GIRLS.zscore.weekly-a9838718.js} +0 -0
  392. /package/build/{HEIGHT_GIRLS.zscore.yearly-08387da6.js → HEIGHT_GIRLS.zscore.yearly-750c9cec.js} +0 -0
  393. /package/build/{Locale-3facafc2.js → Locale-366643f6.js} +0 -0
  394. /package/build/{Visible-37a1bb36.js → Visible-6bf902c1.js} +0 -0
  395. /package/build/{WEIGHT_BOYS.percentile.monthly-2a7c6562.js → WEIGHT_BOYS.percentile.monthly-75d893b1.js} +0 -0
  396. /package/build/{WEIGHT_BOYS.percentile.weekly-fb16deac.js → WEIGHT_BOYS.percentile.weekly-21085ab5.js} +0 -0
  397. /package/build/{WEIGHT_BOYS.percentile.yearly-c2347468.js → WEIGHT_BOYS.percentile.yearly-045c57ed.js} +0 -0
  398. /package/build/{WEIGHT_BOYS.zscore.monthly-27b5db93.js → WEIGHT_BOYS.zscore.monthly-a389150a.js} +0 -0
  399. /package/build/{WEIGHT_BOYS.zscore.weekly-9a7c063a.js → WEIGHT_BOYS.zscore.weekly-f5410a6b.js} +0 -0
  400. /package/build/{WEIGHT_BOYS.zscore.yearly-077fdb59.js → WEIGHT_BOYS.zscore.yearly-b215f167.js} +0 -0
  401. /package/build/{WEIGHT_GIRLS.percentile.monthly-af183d6f.js → WEIGHT_GIRLS.percentile.monthly-c1c9483f.js} +0 -0
  402. /package/build/{WEIGHT_GIRLS.percentile.weekly-1c8ece29.js → WEIGHT_GIRLS.percentile.weekly-6174746a.js} +0 -0
  403. /package/build/{WEIGHT_GIRLS.percentile.yearly-f55d8aa3.js → WEIGHT_GIRLS.percentile.yearly-edad71dd.js} +0 -0
  404. /package/build/{WEIGHT_GIRLS.zscore.monthly-31486c9c.js → WEIGHT_GIRLS.zscore.monthly-e735ee30.js} +0 -0
  405. /package/build/{WEIGHT_GIRLS.zscore.weekly-0b934ceb.js → WEIGHT_GIRLS.zscore.weekly-5d5f4171.js} +0 -0
  406. /package/build/{WEIGHT_GIRLS.zscore.yearly-81757ea2.js → WEIGHT_GIRLS.zscore.yearly-a29f2713.js} +0 -0
  407. /package/build/{animation-20bfc7a1.js → animation-cfe0ef22.js} +0 -0
  408. /package/build/{constants-ea5c320f.js → constants-0ed23d09.js} +0 -0
  409. /package/build/{constants-c059d68b.js → constants-a8611a01.js} +0 -0
  410. /package/build/{constants-e5b47402.js → constants-c27a8035.js} +0 -0
  411. /package/build/{dataTransform-7cacd22a.js → dataTransform-138b7a3d.js} +0 -0
  412. /package/build/esm/{BMI_BOYS.percentile.monthly-b1329e36.js → BMI_BOYS.percentile.monthly-78d4a592.js} +0 -0
  413. /package/build/esm/{BMI_BOYS.percentile.weekly-c6d483ef.js → BMI_BOYS.percentile.weekly-ff9040ea.js} +0 -0
  414. /package/build/esm/{BMI_BOYS.percentile.yearly-a135cf5e.js → BMI_BOYS.percentile.yearly-fcbd5e66.js} +0 -0
  415. /package/build/esm/{BMI_BOYS.zscore.monthly-8980bba2.js → BMI_BOYS.zscore.monthly-8a66782b.js} +0 -0
  416. /package/build/esm/{BMI_BOYS.zscore.weekly-21f062d1.js → BMI_BOYS.zscore.weekly-4a6a951a.js} +0 -0
  417. /package/build/esm/{BMI_BOYS.zscore.yearly-c0eced76.js → BMI_BOYS.zscore.yearly-8557d199.js} +0 -0
  418. /package/build/esm/{BMI_GIRLS.percentile.monthly-baefdf8f.js → BMI_GIRLS.percentile.monthly-eb78528f.js} +0 -0
  419. /package/build/esm/{BMI_GIRLS.percentile.weekly-46ddf650.js → BMI_GIRLS.percentile.weekly-4080e040.js} +0 -0
  420. /package/build/esm/{BMI_GIRLS.percentile.yearly-d8e60410.js → BMI_GIRLS.percentile.yearly-a756a0ad.js} +0 -0
  421. /package/build/esm/{BMI_GIRLS.zscore.monthly-99c3cace.js → BMI_GIRLS.zscore.monthly-0a2ccb7b.js} +0 -0
  422. /package/build/esm/{BMI_GIRLS.zscore.weekly-8310134d.js → BMI_GIRLS.zscore.weekly-bec1efb4.js} +0 -0
  423. /package/build/esm/{BMI_GIRLS.zscore.yearly-a6947d79.js → BMI_GIRLS.zscore.yearly-4a122321.js} +0 -0
  424. /package/build/esm/{ChevronDown-451a5615.js → ChevronDown-9225a593.js} +0 -0
  425. /package/build/esm/{Close-4acf4c82.js → Close-f1da2174.js} +0 -0
  426. /package/build/esm/{Google-8fcb1ebe.js → Google-eec62a77.js} +0 -0
  427. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-5ec8621c.js → HEAD CIRCUM_BOYS.percentile.monthly-51c1f16c.js} +0 -0
  428. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-bc86f72b.js → HEAD CIRCUM_BOYS.percentile.weekly-5aad905b.js} +0 -0
  429. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-7d2c3a46.js → HEAD CIRCUM_BOYS.percentile.yearly-0644b75f.js} +0 -0
  430. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-ef88e92e.js → HEAD CIRCUM_BOYS.zscore.monthly-097e499d.js} +0 -0
  431. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-d7c433de.js → HEAD CIRCUM_BOYS.zscore.weekly-66f310ca.js} +0 -0
  432. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-5e80291f.js → HEAD CIRCUM_BOYS.zscore.yearly-79bf63ed.js} +0 -0
  433. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-885c68f9.js → HEAD CIRCUM_GIRLS.percentile.monthly-d51921b0.js} +0 -0
  434. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-3f2264a4.js → HEAD CIRCUM_GIRLS.percentile.weekly-16e7dd3c.js} +0 -0
  435. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-1bfd23fa.js → HEAD CIRCUM_GIRLS.percentile.yearly-350d2c8d.js} +0 -0
  436. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-36c0172f.js → HEAD CIRCUM_GIRLS.zscore.monthly-f75bd64f.js} +0 -0
  437. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-f83d1a17.js → HEAD CIRCUM_GIRLS.zscore.weekly-820a263a.js} +0 -0
  438. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-2092f8b7.js → HEAD CIRCUM_GIRLS.zscore.yearly-7786916e.js} +0 -0
  439. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-ec480d03.js → HEIGHT_BOYS.percentile.monthly-25da1d57.js} +0 -0
  440. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-96a5a034.js → HEIGHT_BOYS.percentile.weekly-b4eff898.js} +0 -0
  441. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-c2eb7d37.js → HEIGHT_BOYS.percentile.yearly-acddcb6b.js} +0 -0
  442. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-0c3fe32f.js → HEIGHT_BOYS.zscore.monthly-405cd241.js} +0 -0
  443. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-e9ebd290.js → HEIGHT_BOYS.zscore.weekly-5a9e7d28.js} +0 -0
  444. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-0d045612.js → HEIGHT_BOYS.zscore.yearly-56fb7b3c.js} +0 -0
  445. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-ec405052.js → HEIGHT_GIRLS.percentile.monthly-14947ae8.js} +0 -0
  446. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-794e2529.js → HEIGHT_GIRLS.percentile.weekly-85e09f7c.js} +0 -0
  447. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-569a2d0a.js → HEIGHT_GIRLS.percentile.yearly-4f645c5d.js} +0 -0
  448. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-d9e7e4f5.js → HEIGHT_GIRLS.zscore.monthly-f203b4d1.js} +0 -0
  449. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-aec243e2.js → HEIGHT_GIRLS.zscore.weekly-8bcaa5b2.js} +0 -0
  450. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-b5c7dca9.js → HEIGHT_GIRLS.zscore.yearly-78fa2691.js} +0 -0
  451. /package/build/esm/{Locale-a7f918a4.js → Locale-7c177439.js} +0 -0
  452. /package/build/esm/{Visible-98b8b34b.js → Visible-c1d4a1c9.js} +0 -0
  453. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-b3434746.js → WEIGHT_BOYS.percentile.monthly-f74ba58b.js} +0 -0
  454. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-ffee64f8.js → WEIGHT_BOYS.percentile.weekly-3a4fbb80.js} +0 -0
  455. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-27ae3fbb.js → WEIGHT_BOYS.percentile.yearly-c65a32e1.js} +0 -0
  456. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-fbd57fc9.js → WEIGHT_BOYS.zscore.monthly-3ed58d1d.js} +0 -0
  457. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-988ef8e5.js → WEIGHT_BOYS.zscore.weekly-8c0fbbe8.js} +0 -0
  458. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-88357eb8.js → WEIGHT_BOYS.zscore.yearly-aa696db8.js} +0 -0
  459. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-2b01a9ab.js → WEIGHT_GIRLS.percentile.monthly-cfda4fd3.js} +0 -0
  460. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-76019d1f.js → WEIGHT_GIRLS.percentile.weekly-199c8d66.js} +0 -0
  461. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-031409d3.js → WEIGHT_GIRLS.percentile.yearly-c1df4116.js} +0 -0
  462. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-3b049e09.js → WEIGHT_GIRLS.zscore.monthly-005a50de.js} +0 -0
  463. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-b44b958b.js → WEIGHT_GIRLS.zscore.weekly-83f2d9a1.js} +0 -0
  464. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-c5200e22.js → WEIGHT_GIRLS.zscore.yearly-9056f0e1.js} +0 -0
  465. /package/build/esm/{animation-f46b8247.js → animation-46c77276.js} +0 -0
  466. /package/build/esm/{constants-2c66227b.js → constants-12c90134.js} +0 -0
  467. /package/build/esm/{constants-472edf66.js → constants-290c3b11.js} +0 -0
  468. /package/build/esm/{constants-ec327a89.js → constants-f6a00864.js} +0 -0
  469. /package/build/esm/{dataTransform-22982e79.js → dataTransform-99c4fd58.js} +0 -0
  470. /package/build/esm/{index-89e9c0dd.js → index-19f01623.js} +0 -0
  471. /package/build/esm/{index-20556b49.js → index-31c06d2f.js} +0 -0
  472. /package/build/esm/{index-519923b8.js → index-4220b8db.js} +0 -0
  473. /package/build/esm/{index-8cdd7cc6.js → index-50b7813b.js} +0 -0
  474. /package/build/esm/{index-da3922f7.js → index-5ce211bb.js} +0 -0
  475. /package/build/esm/{index-8dd7e84a.js → index-65955e1c.js} +0 -0
  476. /package/build/esm/{index-5b6513d9.js → index-65a121e5.js} +0 -0
  477. /package/build/esm/{index-4e2f33d6.js → index-c635d501.js} +0 -0
  478. /package/build/esm/{index.styles-50a3d079.js → index.styles-e988de17.js} +0 -0
  479. /package/build/esm/{localizeNumberFormat-e44227dd.js → localizeNumberFormat-12cf4023.js} +0 -0
  480. /package/build/esm/{normalizeLink-0bb35be5.js → normalizeLink-47a460df.js} +0 -0
  481. /package/build/esm/{number-72f098d3.js → number-59cca451.js} +0 -0
  482. /package/build/esm/{paths-4d491e77.js → paths-047b41af.js} +0 -0
  483. /package/build/esm/{shared-94691ad3.js → shared-0d99adda.js} +0 -0
  484. /package/build/esm/{text-852055d1.js → text-76c3e90e.js} +0 -0
  485. /package/build/esm/{translationsContext-50a77d4b.js → translationsContext-0c20459e.js} +0 -0
  486. /package/build/esm/{tslib.es6-3d1a652f.js → tslib.es6-d2424a34.js} +0 -0
  487. /package/build/esm/{types-9d97254c.js → types-113c6d92.js} +0 -0
  488. /package/build/esm/{useIsInit-faa9f02e.js → useIsInit-35debeda.js} +0 -0
  489. /package/build/esm/{useOutsideClick-403d4b2e.js → useOutsideClick-5c2d5374.js} +0 -0
  490. /package/build/esm/{useScrollbarSize-41d67513.js → useScrollbarSize-01efff12.js} +0 -0
  491. /package/build/esm/{useUniqueId-983e511f.js → useUniqueId-a6170f09.js} +0 -0
  492. /package/build/esm/{utils-4d940c54.js → utils-369f3418.js} +0 -0
  493. /package/build/{index-a840f078.js → index-0a97a2ea.js} +0 -0
  494. /package/build/{index-e2a2f3e8.js → index-1714fb71.js} +0 -0
  495. /package/build/{index-2eee0e82.js → index-25e01312.js} +0 -0
  496. /package/build/{index-6217edc2.js → index-557376af.js} +0 -0
  497. /package/build/{index-66ef6216.js → index-7f7e3d7a.js} +0 -0
  498. /package/build/{index-14dcb2ef.js → index-a408be9a.js} +0 -0
  499. /package/build/{index-7200db1f.js → index-b40a3e58.js} +0 -0
  500. /package/build/{index-8c2eb52d.js → index-c07f3b33.js} +0 -0
  501. /package/build/{index.styles-4dbdb479.js → index.styles-4197eb52.js} +0 -0
  502. /package/build/{localizeNumberFormat-5efc3afa.js → localizeNumberFormat-22971b14.js} +0 -0
  503. /package/build/{normalizeLink-56ec1348.js → normalizeLink-6c154492.js} +0 -0
  504. /package/build/{number-610dfd10.js → number-e1ed6c68.js} +0 -0
  505. /package/build/{paths-255d602d.js → paths-b26c7673.js} +0 -0
  506. /package/build/{shared-41b258bb.js → shared-860a366c.js} +0 -0
  507. /package/build/{text-6261ae46.js → text-6dedba33.js} +0 -0
  508. /package/build/{translationsContext-6e354212.js → translationsContext-267f8dfd.js} +0 -0
  509. /package/build/{tslib.es6-ba32b355.js → tslib.es6-99840f8f.js} +0 -0
  510. /package/build/{types-9ec0d5b6.js → types-5a5ba6e3.js} +0 -0
  511. /package/build/{useIsInit-bc8bbac2.js → useIsInit-e9d11ec5.js} +0 -0
  512. /package/build/{useOutsideClick-164f08be.js → useOutsideClick-daab3358.js} +0 -0
  513. /package/build/{useScrollbarSize-61ae7675.js → useScrollbarSize-948f9e22.js} +0 -0
  514. /package/build/{useUniqueId-3c389224.js → useUniqueId-6ade25ea.js} +0 -0
  515. /package/build/{utils-a1525b03.js → utils-b6a1148e.js} +0 -0
package/build/esm/lead.js CHANGED
@@ -1,56 +1,56 @@
1
- import { _ as __rest, a as __awaiter } from './tslib.es6-3d1a652f.js';
2
- import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, useCallback, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
3
- import { createStyles, Box, Button as Button$1, Input as Input$1, Autocomplete, clsx, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, TextInput, NumberInput as NumberInput$1, Portal, Transition, Overlay } from '@mantine/core';
1
+ import { a as __awaiter, _ as __rest } from './tslib.es6-d2424a34.js';
2
+ import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, memo, useCallback, forwardRef, useImperativeHandle, useLayoutEffect } from 'react';
3
+ import { createStyles, Box, Button as Button$1, Input as Input$1, Autocomplete, clsx, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, TextInput, NumberInput as NumberInput$1, useMantineTheme, Portal, Transition, Overlay } from '@mantine/core';
4
4
  import debounce from 'lodash/debounce';
5
5
  import { createFormContext, useForm } from '@mantine/form';
6
6
  import dayjs from 'dayjs';
7
- import { B as BEARER_TOKEN_COOKIE } from './index-f27f0de6.js';
7
+ import { B as BEARER_TOKEN_COOKIE } from './index-92083a73.js';
8
8
  import { getCookie, setCookie } from './miscCookieHelper.js';
9
- import { u as useTranslations } from './index-b7616d0b.js';
10
- import { T as TranslationsContext } from './translationsContext-50a77d4b.js';
11
- import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-4d940c54.js';
12
- import { T as Text } from './index-7070c415.js';
13
- import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-0710e23d.js';
14
- import { D as DatePicker } from './index-69c7ae68.js';
15
- import { B as Button } from './index-94c92cf3.js';
16
- import './index.styles-50a3d079.js';
9
+ import { u as useTranslations } from './index-25983827.js';
10
+ import { T as TranslationsContext } from './translationsContext-0c20459e.js';
11
+ import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-369f3418.js';
12
+ import { T as Text } from './index-705da63f.js';
13
+ import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-f5335875.js';
14
+ import { D as DatePicker } from './index-16f555a0.js';
15
+ import { B as Button } from './index-ccfee79f.js';
16
+ import './index.styles-e988de17.js';
17
17
  import { useIntersection, useClickOutside } from '@mantine/hooks';
18
- import './index-5fc90873.js';
19
- import { C as CustomStylesType } from './text-852055d1.js';
20
- import './index-2f61243a.js';
21
- import { M as MAPPED_LOCALE } from './utils-d53683c9.js';
18
+ import './index-39c0105f.js';
19
+ import { C as CustomStylesType } from './text-76c3e90e.js';
20
+ import './index-c57988e9.js';
21
+ import { M as MAPPED_LOCALE } from './utils-03be42a6.js';
22
22
  import { DateInput } from '@mantine/dates';
23
- import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-954861c8.js';
24
- import { C as COMMON_DATE_TRANSLATE_KEY } from './index-374932e6.js';
25
- import './index-8dd7e84a.js';
26
- import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-446bd4ee.js';
27
- import { H as Heading$1 } from './index-fb65650b.js';
28
- import { t as translationsMap$1 } from './translationsProvider-fd926313.js';
29
- import { L as LOCALE } from './Locale-a7f918a4.js';
23
+ import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-d588e6bb.js';
24
+ import { C as COMMON_DATE_TRANSLATE_KEY } from './index-92028dcb.js';
25
+ import './index-65955e1c.js';
26
+ import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-4ec2c43f.js';
27
+ import { H as Heading$1 } from './index-66f326a0.js';
28
+ import { t as translationsMap$1 } from './translationsProvider-647a2db0.js';
29
+ import { L as LOCALE } from './Locale-7c177439.js';
30
30
  import { v1 } from 'uuid';
31
31
  import { domainLocales } from './constantsDomainLocales.js';
32
32
  import { parsePhoneNumber } from 'react-phone-number-input';
33
33
  import styled from '@emotion/styled';
34
34
  import { theme } from './miscTheme.js';
35
35
  import { css } from '@emotion/react';
36
- import { T as TogetherComponentGlobalContext } from './utils-4d7ed0d7.js';
37
- import { M as MantineProvider } from './index-185648e7.js';
38
- import { i as isVideo } from './index-5b6513d9.js';
39
- import { u as useScreenSize } from './index-b4aee217.js';
36
+ import { T as TogetherComponentGlobalContext } from './utils-f4d1c5fb.js';
37
+ import { M as MantineProvider } from './index-f7979138.js';
38
+ import { i as isVideo } from './index-65a121e5.js';
39
+ import { u as useScreenSize } from './index-dfd9f7df.js';
40
40
  import { motion } from 'framer-motion';
41
41
  import { createPortal } from 'react-dom';
42
- import { I as InputDate } from './InputDate-5538194a.js';
43
- import { D as DrawerComponent } from './index-d0700a22.js';
44
- import { C as Close } from './Close-4acf4c82.js';
42
+ import { I as InputDate } from './InputDate-bf6a9363.js';
43
+ import { D as DrawerComponent } from './index-715d6532.js';
44
+ import { C as Close } from './Close-f1da2174.js';
45
45
  import './constantsIsProduction.js';
46
- import './normalizeLink-0bb35be5.js';
46
+ import './normalizeLink-47a460df.js';
47
47
  import '@hhgtech/icons/other';
48
48
  import '@mantine/carousel';
49
49
  import 'classnames';
50
- import './useUniqueId-983e511f.js';
50
+ import './useUniqueId-a6170f09.js';
51
51
  import './constantsSite.js';
52
52
  import '@hhgtech/icons/core';
53
- import './shared-94691ad3.js';
53
+ import './shared-0d99adda.js';
54
54
  import '@mantine/notifications';
55
55
  import 'date-fns/locale';
56
56
  import './constantsRiskScreener.js';
@@ -66,11 +66,11 @@ import './i18n-values/vi-VN.js';
66
66
  import './i18n-values/vi-VN_MB.js';
67
67
  import './i18n-values/zh-SG.js';
68
68
  import './i18n-values/zh-TW.js';
69
- import './index-519923b8.js';
69
+ import './index-4220b8db.js';
70
70
  import 'slugify';
71
71
  import 'string-format';
72
72
  import './togetherApiPaths.js';
73
- import './constants-ec327a89.js';
73
+ import './constants-f6a00864.js';
74
74
  import 'vaul';
75
75
 
76
76
  const LeadGenComponentContext = createContext({});
@@ -123,33 +123,6 @@ const LEADGEN_BLOCK_INPUT = [
123
123
  LEADGEN_BLOCK.CheckboxBlock,
124
124
  LEADGEN_BLOCK.TncBlock,
125
125
  ];
126
- const leadGenFieldNamePhone = (listBlockAdded) => {
127
- return listBlockAdded
128
- .filter(({ name }) => [
129
- LEADGEN_BLOCK.PhoneBlock,
130
- LEADGEN_BLOCK.PhoneOtpBlock,
131
- LEADGEN_BLOCK.WhatsappOtpBlock,
132
- LEADGEN_BLOCK.ZaloOtpBlock,
133
- ].includes(name))
134
- .map(({ data }) => data.value);
135
- };
136
- const leadGenFieldRequired = (blocks) => {
137
- if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
138
- return [];
139
- }
140
- return blocks
141
- .map(({ data, name, id }) => {
142
- const { required, value } = data;
143
- if (name === LEADGEN_BLOCK.TncBlock && id && required) {
144
- return `TNC-${id}`;
145
- }
146
- if (required) {
147
- return value;
148
- }
149
- return;
150
- })
151
- .filter(Boolean);
152
- };
153
126
  const SSO_MAP_LEAD = ['name', 'email', 'birthday', 'phone', 'gender'];
154
127
  const LEAD_LOCALE_DATA$1 = {
155
128
  'vi-VN': {
@@ -232,6 +205,33 @@ const mappingSSOToLead = (userInfoProps) => {
232
205
  return;
233
206
  }
234
207
  };
208
+ const leadGenFieldNamePhone = (listBlockAdded) => {
209
+ return listBlockAdded
210
+ .filter(({ name }) => [
211
+ LEADGEN_BLOCK.PhoneBlock,
212
+ LEADGEN_BLOCK.PhoneOtpBlock,
213
+ LEADGEN_BLOCK.WhatsappOtpBlock,
214
+ LEADGEN_BLOCK.ZaloOtpBlock,
215
+ ].includes(name))
216
+ .map(({ data }) => data.value);
217
+ };
218
+ const leadGenFieldRequired = (blocks) => {
219
+ if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
220
+ return [];
221
+ }
222
+ return blocks
223
+ .map(({ data, name, id }) => {
224
+ const { required, value } = data;
225
+ if (name === LEADGEN_BLOCK.TncBlock && id && required) {
226
+ return `TNC-${id}`;
227
+ }
228
+ if (required) {
229
+ return value;
230
+ }
231
+ return;
232
+ })
233
+ .filter(Boolean);
234
+ };
235
235
  const formatCampaignDetail = (campaign) => {
236
236
  if (!campaign) {
237
237
  return {};
@@ -378,6 +378,55 @@ const formatLeadGenFormValue = (values = {}, blocks) => {
378
378
  return newValues;
379
379
  };
380
380
 
381
+ const TIMEOUT = 30 * 60 * 1000;
382
+ const WAITING_FIRST_RESP = 'waitingTheFirstResponse';
383
+ const CachedSystem = {
384
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
385
+ cached: {},
386
+ clearCached: (prefix) => {
387
+ console.log(CachedSystem.cached);
388
+ Object.keys(CachedSystem.cached)
389
+ .filter((k) => k.startsWith(prefix))
390
+ .forEach((key) => {
391
+ console.log(key);
392
+ CachedSystem.cached[key] = undefined;
393
+ });
394
+ },
395
+ withCached: (key, fnResponse, timeout = TIMEOUT) => __awaiter(void 0, void 0, void 0, function* () {
396
+ if (CachedSystem.cached[key] === WAITING_FIRST_RESP) {
397
+ return new Promise((resolve) => {
398
+ const startDate = new Date().getTime();
399
+ const intervalId = setInterval(() => {
400
+ const currentDate = new Date().getTime();
401
+ if (currentDate - startDate > 3000) {
402
+ clearInterval(intervalId);
403
+ }
404
+ if (typeof CachedSystem.cached[key] === 'object') {
405
+ resolve(CachedSystem.cached[key]);
406
+ clearInterval(intervalId);
407
+ }
408
+ }, 100);
409
+ });
410
+ }
411
+ if (typeof CachedSystem.cached[key] === 'object') {
412
+ return CachedSystem.cached[key];
413
+ }
414
+ CachedSystem.cached[key] = 'waitingTheFirstResponse';
415
+ try {
416
+ const result = yield fnResponse();
417
+ CachedSystem.cached[key] = result;
418
+ setTimeout(() => {
419
+ CachedSystem.cached[key] = undefined;
420
+ }, timeout);
421
+ return result;
422
+ }
423
+ catch (err) {
424
+ CachedSystem.cached[key] = undefined;
425
+ return Promise.reject(err);
426
+ }
427
+ }),
428
+ };
429
+
381
430
  class Store {
382
431
  constructor() {
383
432
  this.apiSsoUrl = 'https://staging-id.hellobacsi.com/';
@@ -387,6 +436,8 @@ class Store {
387
436
  }
388
437
  const leadStore = new Store();
389
438
 
439
+ const LEADGEN_CACHE_KEY = 'LeadGen_';
440
+ const LEADGEN_CACHE_TIME = 5 * 60 * 1000; // 5 minutes
390
441
  const METHOD = {
391
442
  GET: 'get',
392
443
  POST: 'POST',
@@ -573,7 +624,19 @@ const trackingSubscription = (data) => {
573
624
  data,
574
625
  });
575
626
  };
627
+ function getCampaigns({ url, siteId, apiLeadUrl, }) {
628
+ const ga_client_id = getCookie('_ga') || null;
629
+ const AS_PATH = `${apiLeadUrl || leadStore.apiLeadUrl}api/campaign/${siteId}`;
630
+ return CachedSystem.withCached(LEADGEN_CACHE_KEY + AS_PATH, () => fetch(AS_PATH, {
631
+ method: 'POST',
632
+ headers: { 'Content-Type': 'application/json' },
633
+ body: JSON.stringify({ url, ga_client_id }),
634
+ })
635
+ .then((res) => res.json())
636
+ .then(({ _data }) => (_data === null || _data === void 0 ? void 0 : _data.campaigns) || []), LEADGEN_CACHE_TIME);
637
+ }
576
638
  const Service = {
639
+ getCampaigns,
577
640
  campaignGetById,
578
641
  getCampaignByCode,
579
642
  getSubscriptionBoxInfo,
@@ -1626,12 +1689,6 @@ const getTranslations = (locale) => {
1626
1689
  return translationsMap['en-PH'];
1627
1690
  };
1628
1691
 
1629
- const LeadGenTranslationProvider = (props) => {
1630
- const { locale, children } = props;
1631
- const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
1632
- return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
1633
- };
1634
-
1635
1692
  // import mockLeadData from './mockLeadData'
1636
1693
  const listCampaignScheduled = [];
1637
1694
  const listCampaignScheduledToActivated = [];
@@ -1807,167 +1864,167 @@ function clearPassiveEvent() {
1807
1864
  LEAD_SCROLL_EVENT = null;
1808
1865
  }
1809
1866
  }
1810
- function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
1811
- // clear previous passive event, check for new condition
1812
- clearPassiveEvent();
1813
- const leadCurrentUrl = DEBUG_URL ||
1814
- ('https://' +
1815
- location.hostname +
1816
- location.pathname +
1817
- location.search).toLowerCase();
1818
- fetch(leadApi + 'api/campaign/' + leadSiteId, {
1819
- method: 'POST',
1820
- headers: {
1821
- 'Content-Type': 'application/json',
1822
- },
1823
- body: JSON.stringify({
1824
- url: leadCurrentUrl,
1825
- ga_client_id: getCookie('_ga') || null,
1826
- }),
1827
- })
1828
- .then((response) => {
1829
- return response.json();
1830
- // return mockLeadData || response.json()
1831
- })
1832
- .then((data) => {
1833
- var _a, _b, _c, _d;
1834
- LeadLog('List campagin: ', data);
1835
- LEAD_RESET_VAR();
1836
- if (data._status == 1) {
1837
- const campaigns = (((_b = (_a = data._data) === null || _a === void 0 ? void 0 : _a.campaigns) === null || _b === void 0 ? void 0 : _b.filter(filterFnCampaign)) || []).filter(fillterApprearanceTimeCampaign);
1838
- if (!getCookie('hhg-id')) {
1839
- setCookie('hhg-id', v1(), {
1840
- domain: '.' + leadDomain,
1841
- path: '/',
1842
- });
1843
- LeadLog('😍 Set HHG ID cookie');
1844
- }
1845
- // getCookie('hhg-id')
1846
- // TODO: HP-534 Filter desktop
1847
- let campaignsDevice = [];
1848
- if (isMobile()) {
1849
- campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
1867
+ function getCurrentCampaign({ campaigns = [], leadDomain, leadCurrentUrl, }) {
1868
+ if (!getCookie('hhg-id')) {
1869
+ setCookie('hhg-id', v1(), { domain: `.${leadDomain}`, path: '/' });
1870
+ LeadLog('😍 Set HHG ID cookie');
1871
+ }
1872
+ // TODO: HP-534 Filter desktop
1873
+ let campaignsDevice = [];
1874
+ if (isMobile()) {
1875
+ campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
1876
+ }
1877
+ else {
1878
+ campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
1879
+ }
1880
+ LeadLog(`👓 campaignsDevice`, campaignsDevice);
1881
+ LeadLog('--listCampaignScheduled', listCampaignScheduled);
1882
+ LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
1883
+ LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
1884
+ LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
1885
+ LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
1886
+ LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
1887
+ // Check links
1888
+ let listLinksObj = campaignsDevice
1889
+ .map((i, index) => i.targets
1890
+ .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
1891
+ .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1892
+ .flat(1) || [];
1893
+ // Check list link match current href
1894
+ listLinksObj = listLinksObj.filter((i) => {
1895
+ var _a;
1896
+ const target = new URL(String(i.target).toLowerCase());
1897
+ if (i.option == 'exact_match')
1898
+ // FOR TEST LOCAL:
1899
+ // return Boolean(location.pathname === target.pathname)
1900
+ return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
1901
+ if (i.option == 'start_with') {
1902
+ // FOR TEST LOCAL:
1903
+ // if (location.pathname.includes(target.pathname)) {
1904
+ if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
1905
+ const listExcluding = i.sub_target
1906
+ .filter((i) => i.option == 'excluding')
1907
+ .map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
1908
+ return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
1850
1909
  }
1851
1910
  else {
1852
- campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
1853
- }
1854
- LeadLog(`👓 campaignsDevice`, campaignsDevice);
1855
- LeadLog('--listCampaignScheduled', listCampaignScheduled);
1856
- LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
1857
- LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
1858
- LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
1859
- LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
1860
- LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
1861
- // Check links
1862
- let listLinksObj = campaignsDevice
1863
- .map((i, index) => i.targets
1864
- .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
1865
- .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1866
- .flat(1);
1867
- // Check list link match current href
1868
- listLinksObj = listLinksObj.filter((i) => {
1869
- var _a;
1870
- const target = new URL(String(i.target).toLowerCase());
1871
- if (i.option == 'exact_match')
1872
- // FOR TEST LOCAL:
1873
- // return Boolean(location.pathname === target.pathname)
1874
- return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
1875
- if (i.option == 'start_with') {
1876
- // FOR TEST LOCAL:
1877
- // if (location.pathname.includes(target.pathname)) {
1878
- if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
1879
- const listExcluding = i.sub_target
1880
- .filter((i) => i.option == 'excluding')
1881
- .map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
1882
- return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
1883
- }
1884
- else {
1885
- return false;
1886
- }
1887
- }
1888
- });
1889
- // Check tags
1890
- const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
1891
- const listTags = listMetaTag.map((i) => i.content);
1892
- let listCampaignHasTag = [];
1893
- let listTagsObj = [];
1894
- if (listTags && listTags.length) {
1895
- listCampaignHasTag = campaignsDevice
1896
- .map((i, index) => i.targets
1897
- .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
1898
- .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1899
- .flat(1);
1900
- listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
1911
+ return false;
1901
1912
  }
1902
- const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
1903
- const cookieKeys = document.cookie
1904
- .split('; ')
1905
- .map((i) => i.split('=')[0]);
1906
- const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
1907
- LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
1908
- const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
1909
- LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
1910
- const listCampaignSubmitedClosed = [
1911
- ...listCampaignCodeSubmited,
1912
- ...listCampaignCodeClosed,
1913
- ];
1914
- const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
1915
- const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
1916
- return !hasSubmited;
1917
- });
1918
- const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
1919
- // .sort(
1920
- // (a, b) =>
1921
- // (listCampaignValid[a.campaignIndex]?.score || 0) -
1922
- // (listCampaignValid[b.campaignIndex]?.score || 0),
1923
- // )
1924
- LeadLog('--listCampaignValid : ', listCampaignValid);
1925
- if (listCampaignValid && listCampaignValid.length) {
1926
- const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
1927
- LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
1928
- const { rules } = CAMPAIGN_SHOW;
1929
- // CHECK RULE TRIGGER POPUP
1930
- const timeoutRule = Number((_c = rules.find((i) => i.rule == 'time')) === null || _c === void 0 ? void 0 : _c.value);
1931
- LeadLog(`timeoutRule`, timeoutRule);
1932
- const scrollRule = Number((_d = rules.find((i) => i.rule == 'scroll')) === null || _d === void 0 ? void 0 : _d.value);
1933
- LeadLog(`scrollRule`, scrollRule);
1934
- let impressionAction = 'TIME';
1935
- if (Number.isInteger(timeoutRule)) {
1936
- impressionAction = 'TIME';
1937
- LeadLog(' SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
1938
- timeoutRef = setTimeout(() => {
1939
- onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1940
- }, timeoutRule * 1000);
1941
- }
1942
- if (Number.isInteger(scrollRule)) {
1943
- impressionAction = 'SCROLL';
1944
- LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
1945
- const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
1946
- document.querySelector('body');
1947
- const pct = $p.getBoundingClientRect().top;
1948
- const pb = $p.offsetHeight;
1949
- LeadLog(`👓 Element check scroll: `, $p);
1950
- LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
1951
- const wt = window.pageYOffset || document.documentElement.scrollTop;
1952
- let percent = 0;
1953
- if (wt >= pct) {
1954
- percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
1955
- }
1956
- LeadLog('---Scroll', percent, scrollRule);
1957
- // TODO: CHECK FOOTER HEIGHT
1958
- if (percent >= scrollRule) {
1959
- window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
1960
- onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1961
- }
1962
- };
1963
- window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
1964
- passive: true,
1965
- });
1966
- }
1913
+ }
1914
+ });
1915
+ // Check tags
1916
+ const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
1917
+ const listTags = listMetaTag.map((i) => i.content);
1918
+ let listCampaignHasTag = [];
1919
+ let listTagsObj = [];
1920
+ if (listTags && listTags.length) {
1921
+ listCampaignHasTag = campaignsDevice
1922
+ .map((i, index) => i.targets
1923
+ .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
1924
+ .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1925
+ .flat(1);
1926
+ listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
1927
+ }
1928
+ const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
1929
+ const cookieKeys = document.cookie.split('; ').map((i) => i.split('=')[0]);
1930
+ const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
1931
+ LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
1932
+ const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
1933
+ LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
1934
+ const listCampaignSubmitedClosed = [
1935
+ ...listCampaignCodeSubmited,
1936
+ ...listCampaignCodeClosed,
1937
+ ];
1938
+ const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
1939
+ const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
1940
+ return !hasSubmited;
1941
+ });
1942
+ const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
1943
+ // .sort(
1944
+ // (a, b) =>
1945
+ // (listCampaignValid[a.campaignIndex]?.score || 0) -
1946
+ // (listCampaignValid[b.campaignIndex]?.score || 0),
1947
+ // )
1948
+ LeadLog('--listCampaignValid : ', listCampaignValid);
1949
+ if (listCampaignValid && listCampaignValid.length) {
1950
+ const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
1951
+ return CAMPAIGN_SHOW;
1952
+ }
1953
+ else {
1954
+ LeadLog('🚧 No lead campaigns on current URL, tags');
1955
+ return null;
1956
+ }
1957
+ }
1958
+ function addEventShowCurrentCampaign({ campaign: CAMPAIGN_SHOW, onShowPopup, }) {
1959
+ var _a, _b;
1960
+ LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
1961
+ const { rules } = CAMPAIGN_SHOW;
1962
+ // CHECK RULE TRIGGER POPUP
1963
+ const timeoutRule = Number((_a = rules.find((i) => i.rule == 'time')) === null || _a === void 0 ? void 0 : _a.value);
1964
+ LeadLog(`timeoutRule`, timeoutRule);
1965
+ const scrollRule = Number((_b = rules.find((i) => i.rule == 'scroll')) === null || _b === void 0 ? void 0 : _b.value);
1966
+ LeadLog(`scrollRule`, scrollRule);
1967
+ let impressionAction = 'TIME';
1968
+ if (Number.isInteger(timeoutRule)) {
1969
+ impressionAction = 'TIME';
1970
+ LeadLog('✨ SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
1971
+ timeoutRef = setTimeout(() => {
1972
+ onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1973
+ }, timeoutRule * 1000);
1974
+ return { campaign: CAMPAIGN_SHOW, action: impressionAction };
1975
+ }
1976
+ if (Number.isInteger(scrollRule)) {
1977
+ impressionAction = 'SCROLL';
1978
+ LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
1979
+ const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
1980
+ document.querySelector('body');
1981
+ const pct = $p.getBoundingClientRect().top;
1982
+ const pb = $p.offsetHeight;
1983
+ LeadLog(`👓 Element check scroll: `, $p);
1984
+ LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
1985
+ const wt = window.pageYOffset || document.documentElement.scrollTop;
1986
+ let percent = 0;
1987
+ if (wt >= pct) {
1988
+ percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
1967
1989
  }
1968
- else {
1969
- LeadLog('🚧 No lead campaigns on current URL, tags');
1990
+ LeadLog('---Scroll', percent, scrollRule);
1991
+ // TODO: CHECK FOOTER HEIGHT
1992
+ if (percent >= scrollRule) {
1993
+ window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
1994
+ onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1970
1995
  }
1996
+ };
1997
+ window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
1998
+ passive: true,
1999
+ });
2000
+ }
2001
+ }
2002
+ function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
2003
+ // clear previous passive event, check for new condition
2004
+ clearPassiveEvent();
2005
+ let leadCurrentUrl = DEBUG_URL;
2006
+ if (typeof window !== 'undefined') {
2007
+ const { location } = window;
2008
+ leadCurrentUrl = leadCurrentUrl || location.href.toLowerCase();
2009
+ }
2010
+ Service.getCampaigns({
2011
+ url: leadCurrentUrl,
2012
+ siteId: leadSiteId,
2013
+ apiLeadUrl: leadApi,
2014
+ })
2015
+ .then((campRes) => {
2016
+ LeadLog('List campagin: ', campRes);
2017
+ LEAD_RESET_VAR();
2018
+ const campaigns = (campRes || [])
2019
+ .filter(filterFnCampaign)
2020
+ .filter(fillterApprearanceTimeCampaign);
2021
+ const campaign = getCurrentCampaign({
2022
+ campaigns,
2023
+ leadCurrentUrl,
2024
+ leadDomain,
2025
+ });
2026
+ if (campaign && (campaign === null || campaign === void 0 ? void 0 : campaign.id)) {
2027
+ addEventShowCurrentCampaign({ campaign, onShowPopup });
1971
2028
  }
1972
2029
  })
1973
2030
  .catch((err) => {
@@ -1984,147 +2041,149 @@ const LeadLog = (...params) => {
1984
2041
  }
1985
2042
  };
1986
2043
 
2044
+ const LeadGenInlineWithoutMemo = (props) => {
2045
+ const [campaign, setCampaign] = useState();
2046
+ const { forceCampaign, apiUrl, apiLeadUrl, siteId, siteDomain, DEBUG_URL } = props;
2047
+ useEffect(() => {
2048
+ if (forceCampaign) {
2049
+ setCampaign(forceCampaign);
2050
+ return;
2051
+ }
2052
+ (() => __awaiter(void 0, void 0, void 0, function* () {
2053
+ const campaign = yield leadGenInlineGetCampaign({
2054
+ siteId,
2055
+ siteDomain,
2056
+ apiLeadUrl: apiUrl || apiLeadUrl || '',
2057
+ url: DEBUG_URL,
2058
+ });
2059
+ if (campaign) {
2060
+ setCampaign(campaign);
2061
+ }
2062
+ }))();
2063
+ }, [forceCampaign, DEBUG_URL, apiUrl, apiLeadUrl, siteId, siteDomain]);
2064
+ if (!campaign || !(campaign === null || campaign === void 0 ? void 0 : campaign.id)) {
2065
+ return null;
2066
+ }
2067
+ return (React__default.createElement(LeadGen, Object.assign({}, props, { forceCampaign: campaign, apiUrl: apiUrl || apiLeadUrl, flatComponent: true })));
2068
+ };
2069
+ const LeadGenInline = memo(LeadGenInlineWithoutMemo);
2070
+ function leadGenInlineGetCampaign(props) {
2071
+ var _a;
2072
+ return __awaiter(this, void 0, void 0, function* () {
2073
+ const { url, apiLeadUrl, siteId, siteDomain } = props;
2074
+ const campaigns = yield Service.getCampaigns({ url, apiLeadUrl, siteId });
2075
+ const campaignsInline = (_a = (campaigns || [])) === null || _a === void 0 ? void 0 : _a.filter(({ extra_fields }) => {
2076
+ const { currentLayout } = extra_fields || {};
2077
+ return currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.includes('Inline');
2078
+ });
2079
+ return getCurrentCampaign({
2080
+ campaigns: campaignsInline,
2081
+ leadCurrentUrl: url,
2082
+ leadDomain: siteDomain,
2083
+ });
2084
+ });
2085
+ }
2086
+
2087
+ const LeadGenTranslationProvider = (props) => {
2088
+ const { locale, children } = props;
2089
+ const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
2090
+ return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
2091
+ };
2092
+
1987
2093
  const LeadGenContext = createContext({
1988
- submit(value) {
2094
+ onSubmit(value) {
1989
2095
  /** Init for FAKING function */
1990
2096
  LeadLog('** LeadGen Submit : ', value);
1991
2097
  return Promise.reject(value);
1992
2098
  },
1993
- submitSubscriptionBox(value) {
2099
+ onImpression(value) {
1994
2100
  /** Init for FAKING function */
1995
- LeadLog('** LeadGen SubmitSubscriptionBox : ', value);
1996
- return Promise.reject(value);
1997
- },
1998
- impression(type) {
1999
- /** Init for FAKING function */
2000
- LeadLog('** LeadGen Impression : ', type);
2101
+ LeadLog('** LeadGen Impression : ', value);
2001
2102
  return Promise.reject();
2002
2103
  },
2003
- /** For Subscription Box */
2004
- subscriptionIcon: '',
2005
- subscriptionTitle: '',
2006
- subscriptionPhoneType: '',
2007
2104
  });
2008
2105
  const LeadGenContextProvider = (props) => {
2009
- const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues, articleId = 1, categoryList, siteDomain: site_domain, children, userInfo } = props, restProps = __rest(props, ["campaign_code", "apiSsoUrl", "apiLeadUrl", "apiSubotUrl", "locale", "forceCampaign", "extraValues", "articleId", "categoryList", "siteDomain", "children", "userInfo"]);
2106
+ const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues, siteId, siteDomain, DEBUG_URL = '', children, articleId, categoryId, userInfo } = props, restProps = __rest(props, ["campaign_code", "apiSsoUrl", "apiLeadUrl", "apiSubotUrl", "locale", "forceCampaign", "extraValues", "siteId", "siteDomain", "DEBUG_URL", "children", "articleId", "categoryId", "userInfo"]);
2010
2107
  const { t } = useTranslations();
2011
- const [forceCampaign, setForceCampaign] = useState(forceCampaignProps);
2108
+ const [rawForceCampaign, setRawForceCampaign] = useState(forceCampaignProps);
2109
+ const [forceCampaign, setForceCampaign] = useState(() => formatCampaignDetail(forceCampaignProps));
2012
2110
  const [subscriptionInfo, setSubscriptionInfo] = useState({
2013
2111
  subscriptionIcon: '',
2014
2112
  subscriptionTitle: '',
2015
2113
  subscriptionType: 'TypeA',
2016
2114
  subscriptionPhoneType: '',
2017
- subcriptionCateId: '',
2018
- subcriptionCateName: '',
2019
2115
  });
2020
2116
  const locale = useMemo(() => {
2021
2117
  return localeProps || LOCALE['PhilippinesEnglish'];
2022
2118
  }, [localeProps]);
2023
- const { url, campaign_id, cookie_id, ga_client_id, category_list, article_id, article_title, } = useMemo(() => ({
2024
- url: location.href.toLowerCase() || '',
2025
- cookie_id: getCookie('hhg-id') || null,
2026
- ga_client_id: getCookie('_ga'),
2027
- campaign_id: forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2028
- campaign_code: campaignCodeProps || (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code),
2029
- category_list: categoryList,
2030
- article_id: articleId,
2031
- article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
2032
- }), [
2033
- campaignCodeProps,
2034
- articleId,
2035
- categoryList,
2036
- forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2037
- extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2038
- subscriptionInfo === null || subscriptionInfo === void 0 ? void 0 : subscriptionInfo.subcriptionCateName,
2039
- ]);
2040
- // const fetchCampaign = useCallback(
2041
- // (campaign_code: string) => {
2042
- // Service.getCampaignByCode(campaign_code).then((res) => {
2043
- // const { _data } = res || {}
2044
- // const { campaigns } = _data || {}
2045
- // LeadLog('** LeadGen Campaign : ', campaigns)
2046
- // setForceCampaign(formatCampaignDetail(campaigns))
2047
- // })
2048
- // },
2049
- // [campaignCodeProps],
2050
- // )
2051
2119
  // TODO : Update form for LeadGen
2052
- const submit = useCallback((data) => {
2120
+ const onSubmit = useCallback((data) => {
2053
2121
  return Service.postSubscriptionBoxLead({ data });
2122
+ }, [forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.blocks]);
2123
+ const onImpression = useCallback((value) => {
2124
+ //
2125
+ console.log('** RYAN LeadGenContext.tsx 188 value : ', value);
2126
+ return Promise.resolve('dfdfdf');
2054
2127
  }, []);
2055
2128
  const submitSubscriptionBox = useCallback((value) => {
2056
- const data = Object.assign(Object.assign({}, value), {
2129
+ const data = Object.assign(Object.assign(Object.assign(Object.assign({}, value), {
2057
2130
  // campaign_id,
2058
- site_domain, url: (value === null || value === void 0 ? void 0 : value.url) || url, cookie_id, ga_client_id: (value === null || value === void 0 ? void 0 : value.ga_client_id) || ga_client_id,
2059
- // ...extraValues,
2060
- article_id, category_id: subscriptionInfo.subcriptionCateId, category_name: subscriptionInfo.subcriptionCateName, article_title });
2131
+ site_domain: siteDomain, url: (value === null || value === void 0 ? void 0 : value.url) || location.href.toLowerCase() || '', cookie_id: getCookie('hhg-id') || null, ga_client_id: getCookie('_ga') }), extraValues), { article_id: articleId, category_id: categoryId, article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '' });
2061
2132
  return Service.postSubscriptionBoxLead({ data });
2062
2133
  }, [
2063
2134
  extraValues,
2064
- site_domain,
2065
- campaign_id,
2066
- article_id,
2067
- article_title,
2068
- subscriptionInfo.subcriptionCateId,
2069
- subscriptionInfo.subcriptionCateName,
2070
- url,
2071
- cookie_id,
2072
- ga_client_id,
2135
+ extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2136
+ siteDomain,
2137
+ articleId,
2138
+ categoryId,
2073
2139
  ]);
2074
- const impression = useCallback((type) => {
2075
- const gaCookie = getCookie('_ga') || null;
2140
+ const impressionSubscriptionBox = useCallback((type) => {
2076
2141
  const impression = {
2077
2142
  subscription_title: subscriptionInfo.subscriptionTitle,
2078
2143
  name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || '',
2079
2144
  area_code: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '',
2080
2145
  phone_number: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) || '',
2081
- site_domain: domainLocales[locale],
2146
+ site_domain: siteDomain,
2082
2147
  url: location.href.toLowerCase(),
2083
2148
  cookie_id: getCookie('hhg-id'),
2084
- ga_client_id: gaCookie,
2085
- article_title,
2086
- article_id,
2087
- category_id: subscriptionInfo.subcriptionCateId,
2088
- category_name: subscriptionInfo.subcriptionCateName,
2149
+ ga_client_id: getCookie('_ga') || null,
2150
+ article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
2151
+ article_id: articleId,
2152
+ category_id: categoryId,
2153
+ category_name: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name) || '',
2089
2154
  type,
2090
2155
  };
2091
2156
  return Service.trackingSubscription(impression);
2092
2157
  }, [
2093
- campaign_id,
2094
- url,
2095
- article_title,
2096
- cookie_id,
2097
- ga_client_id,
2098
- subscriptionInfo.subcriptionCateId,
2099
- subscriptionInfo.subcriptionCateName,
2158
+ articleId,
2159
+ categoryId,
2100
2160
  subscriptionInfo.subscriptionTitle,
2101
- article_id,
2161
+ extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name,
2102
2162
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.name,
2103
2163
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code,
2104
2164
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
2105
2165
  ]);
2106
2166
  useEffect(() => {
2167
+ /** Force Campaign */
2107
2168
  if (forceCampaignProps) {
2108
2169
  setForceCampaign(formatCampaignDetail(forceCampaignProps));
2170
+ setRawForceCampaign(forceCampaignProps);
2109
2171
  return;
2110
2172
  }
2111
2173
  /** For Subscription Box */
2112
- if (category_list) {
2174
+ if (categoryId) {
2113
2175
  Service.getSubscriptionBoxInfo({
2114
- category: category_list.map((i) => i.termId).join(','),
2115
- site: site_domain,
2176
+ category: categoryId,
2177
+ site: siteDomain,
2116
2178
  slug: location === null || location === void 0 ? void 0 : location.pathname,
2117
2179
  }).then((res) => {
2118
- var _a;
2119
2180
  const { _data } = res || {};
2120
- const { item = [], btn_type = 'zalo' } = _data || {};
2121
- const { icon, content, cate_id } = ((_a = item.filter((i) => i.cate_id !== 'default')) === null || _a === void 0 ? void 0 : _a[0]) || {};
2181
+ const { item, campaign_code, btn_type = 'zalo' } = _data || {};
2182
+ const { icon, content } = item || {};
2183
+ LeadLog('** LeadGen SubscriptionBox campaign_code : ', campaign_code);
2122
2184
  LeadLog('** LeadGen SubscriptionBox subscription_icon : ', icon);
2123
2185
  LeadLog('** LeadGen SubscriptionBox subscription_title : ', content);
2124
- setSubscriptionInfo((prev) => {
2125
- var _a, _b;
2126
- return (Object.assign(Object.assign({}, prev), { subscriptionIcon: icon, subscriptionTitle: content, subscriptionPhoneType: btn_type, subcriptionCateId: cate_id, subcriptionCateName: (_b = (_a = category_list.filter((i) => i.termId == cate_id)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name }));
2127
- });
2186
+ setSubscriptionInfo((prev) => (Object.assign(Object.assign({}, prev), { subscriptionIcon: icon, subscriptionTitle: content, subscriptionPhoneType: btn_type })));
2128
2187
  setForceCampaign(formatCampaignDetail({
2129
2188
  id: 6993,
2130
2189
  name: '',
@@ -2248,10 +2307,39 @@ const LeadGenContextProvider = (props) => {
2248
2307
  });
2249
2308
  return;
2250
2309
  }
2251
- // if (campaignCodeProps) {
2252
- // fetchCampaign(campaignCodeProps)
2310
+ if (campaignCodeProps) {
2311
+ Service.getCampaignByCode(campaignCodeProps).then((res) => {
2312
+ const { _data } = res || {};
2313
+ const { campaigns } = _data || {};
2314
+ LeadLog('** LeadGen Campaign : ', campaigns);
2315
+ setForceCampaign(formatCampaignDetail(campaigns));
2316
+ setRawForceCampaign(campaigns);
2317
+ });
2318
+ return;
2319
+ }
2320
+ // /** For LeadGen */
2321
+ // if (!leadStore.campaigns?.length) {
2322
+ // checkShowPopup({
2323
+ // leadApi: apiLeadUrl,
2324
+ // leadDomain: siteDomain,
2325
+ // leadSiteId: siteId,
2326
+ // onShowPopup(campaign: any, action: string) {
2327
+ // console.log('** RYAN LeadGenContext.tsx 421 action : ', action)
2328
+ // setForceCampaign(formatCampaignDetail(campaign))
2329
+ // setRawForceCampaign(campaign)
2330
+ // },
2331
+ // DEBUG_URL,
2332
+ // })
2253
2333
  // }
2254
- }, [forceCampaignProps, campaignCodeProps, category_list]);
2334
+ }, [
2335
+ forceCampaignProps,
2336
+ campaignCodeProps,
2337
+ categoryId,
2338
+ siteId,
2339
+ siteDomain,
2340
+ apiLeadUrl,
2341
+ DEBUG_URL,
2342
+ ]);
2255
2343
  useEffect(() => {
2256
2344
  leadStore.apiSsoUrl = apiSsoUrl;
2257
2345
  leadStore.apiLeadUrl = apiLeadUrl;
@@ -2262,10 +2350,16 @@ const LeadGenContextProvider = (props) => {
2262
2350
  }
2263
2351
  return (React__default.createElement(LeadGenContext.Provider, { value: Object.assign(Object.assign(Object.assign({}, restProps), subscriptionInfo), { userInfo, campaign_code: campaignCodeProps, apiSsoUrl,
2264
2352
  apiLeadUrl,
2265
- apiSubotUrl, locale: localeProps, articleId, categoryId: subscriptionInfo.subcriptionCateId, siteDomain: site_domain, forceCampaign,
2266
- submit,
2353
+ apiSubotUrl, locale: localeProps, extraValues,
2354
+ articleId,
2355
+ categoryId,
2356
+ siteDomain,
2357
+ forceCampaign,
2358
+ rawForceCampaign,
2359
+ onSubmit,
2360
+ onImpression,
2267
2361
  submitSubscriptionBox,
2268
- impression }) },
2362
+ impressionSubscriptionBox }) },
2269
2363
  React__default.createElement(LeadGenTranslationProvider, { locale: locale }, children)));
2270
2364
  };
2271
2365
  const useLeadGenContext = () => {
@@ -3278,7 +3372,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3278
3372
  const { image, extra_fields, id: campaign_id, bot_id: campaign_subot_id = [], ThankYouBlock, } = forceCampaign || {};
3279
3373
  const { textBlocks, listBlockAdded, actionBlocks } = extra_fields || {};
3280
3374
  const { submitBlock } = actionBlocks || {};
3281
- const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impression, } = useLeadGenContext();
3375
+ const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impressionSubscriptionBox, } = useLeadGenContext();
3282
3376
  const { t } = useTranslations();
3283
3377
  const { action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
3284
3378
  const [loading, setLoading] = useState(false);
@@ -3338,7 +3432,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3338
3432
  const reqValues = Object.assign(Object.assign({}, newValues), ssoValues);
3339
3433
  const [res] = yield Promise.all([
3340
3434
  submitSubscriptionBox(reqValues),
3341
- impression('submit_form'),
3435
+ impressionSubscriptionBox('submit_form'),
3342
3436
  ]);
3343
3437
  const { _data } = res || {};
3344
3438
  const { model } = _data || {};
@@ -3384,7 +3478,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3384
3478
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.uid,
3385
3479
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
3386
3480
  ]);
3387
- return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impression('impression') },
3481
+ return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impressionSubscriptionBox('impression') },
3388
3482
  React__default.createElement(StyledLeadGenSubscriptionBox, { "data-phone-type": subscriptionPhoneType, "data-type": "subscription_box_A" },
3389
3483
  showThankyou && (React__default.createElement(LeadGenThankYou, { image: Object.assign(Object.assign({}, thankyouImage), { src: thankyouImage.src || `${apiLeadUrl}admin/img/thanksyou.png` }), title: thankyouTitle, description: thankyouDescription, button: thankyouButton })),
3390
3484
  !showThankyou && (React__default.createElement(LeadGenSubscriptionBoxA, { loading: loading, image: subscriptionIcon || image, title: subscription_title, submitText: (_c = submitBlock === null || submitBlock === void 0 ? void 0 : submitBlock.data) === null || _c === void 0 ? void 0 : _c.value, blocks: listBlockAdded, locale: locale, form: form, rules: validateObj, onFinish: middlewareOnSubmit })))));
@@ -3393,9 +3487,11 @@ const LeadGenSubscriptionBox$1 = memo(LeadGenSubscriptionBoxWithoutMemo);
3393
3487
 
3394
3488
  const Container = () => {
3395
3489
  const context = useContext(LeadGenContext);
3396
- const { campaign_code, locale, siteId, siteDomain, userInfo, forceCampaign, subscriptionTitle, } = context;
3397
- console.log({ subscriptionTitle });
3398
- return subscriptionTitle ? (React__default.createElement(LeadGenSubscriptionBox$1, { locale: locale, siteId: siteId, siteDomain: siteDomain, userInfo: userInfo, forceCampaign: forceCampaign, campaign_code: campaign_code })) : null;
3490
+ const { campaign_code, locale, siteId, siteDomain, userInfo, forceCampaign } = context;
3491
+ if (!forceCampaign || !(forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id)) {
3492
+ return null;
3493
+ }
3494
+ return (React__default.createElement(LeadGenSubscriptionBox$1, { locale: locale, siteId: siteId, siteDomain: siteDomain, userInfo: userInfo, forceCampaign: forceCampaign, campaign_code: campaign_code }));
3399
3495
  };
3400
3496
  Container.displayName = 'LeadGenSubscriptionBox';
3401
3497
  const ALLOW_LOCALE = [LOCALE.Vietnam, LOCALE.Malaysia, LOCALE.Indonesia];
@@ -4117,7 +4213,7 @@ const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkN
4117
4213
  React__default.createElement(Button, { className: `lead-modal__btn ${LEAD_CLASS}`, color: primaryColor }, linkText)))))));
4118
4214
  };
4119
4215
 
4120
- const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
4216
+ const InlineLayout = ({ flatComponent, content, inlinePosition, doImpression, }) => {
4121
4217
  const target = useMemo(() => {
4122
4218
  if (!inlinePosition)
4123
4219
  return null;
@@ -4222,6 +4318,9 @@ const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
4222
4318
  }
4223
4319
  }
4224
4320
  }, [inlinePosition]);
4321
+ if (!!flatComponent) {
4322
+ return (React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content));
4323
+ }
4225
4324
  if (!inlinePosition || !target)
4226
4325
  return null;
4227
4326
  return createPortal(React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content), target);
@@ -4717,15 +4816,14 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
4717
4816
  const _d = form.getInputProps(`TNC-${id}`), { error } = _d, tncInputProps = __rest(_d, ["error"]);
4718
4817
  return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox", key: id },
4719
4818
  React__default.createElement(Input$1.Wrapper, { error: error },
4720
- React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + id, label: React__default.createElement(Text, { as: "span", size: "c1", variant: "secondary", dangerouslySetInnerHTML: { __html: data.valueHTML }, styles: (theme) => ({
4819
+ React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + id, label: React__default.createElement(Text, { as: "span", size: "c1", variant: "secondary", dangerouslySetInnerHTML: { __html: data.valueHTML }, styles: {
4721
4820
  root: {
4722
4821
  a: {
4723
- textDecoration: 'underline !important',
4822
+ textDecoration: 'underline',
4724
4823
  textUnderlineOffset: '3px',
4725
- color: `${theme.colors.gray[7]} !important`,
4726
4824
  },
4727
4825
  },
4728
- }) }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps)))));
4826
+ } }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps)))));
4729
4827
  }
4730
4828
  return null;
4731
4829
  })));
@@ -4978,7 +5076,7 @@ const LEADGEN_SHOW_HEADER = [
4978
5076
  ];
4979
5077
  // const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39', 'u0adw7hw8kw7t89']
4980
5078
  const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39'];
4981
- const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, onUnmount, doImpression, showThankyou, campaignId, campaignCode, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, action, }) => {
5079
+ const LightboxLayout = ({ flatComponent, popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, onUnmount, doImpression, showThankyou, campaignId, campaignCode, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, action, }) => {
4982
5080
  var _a, _b;
4983
5081
  const { primaryColor } = useContext(LeadGenContext$1);
4984
5082
  const { isMobile } = useScreenSize();
@@ -5378,7 +5476,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
5378
5476
  return React__default.createElement(SideBarLayout, { content: PopupContainer });
5379
5477
  }
5380
5478
  else if (isInline) {
5381
- return (React__default.createElement(InlineLayout, { action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5479
+ return (React__default.createElement(InlineLayout, { flatComponent: flatComponent, action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5382
5480
  }
5383
5481
  return null;
5384
5482
  };
@@ -5471,7 +5569,7 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
5471
5569
  return null;
5472
5570
  }
5473
5571
  }
5474
- const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5572
+ const NewLeadPopup = ({ flatComponent, campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5475
5573
  var _a, _b;
5476
5574
  const { apiUrl, siteDomain } = useContext(LeadGenContext$1);
5477
5575
  const { extra_fields, image, image_desktop, code, image_background, image_overlay_mobile, image_overlay_desktop, } = campaign || {};
@@ -5574,7 +5672,7 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpres
5574
5672
  currentLayout == 'Fullscreen' ||
5575
5673
  currentLayout == 'Sidebar' ||
5576
5674
  currentLayout == 'Slider') {
5577
- return (React__default.createElement(LightboxLayout, { popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, onUnmount: onUnmount, doImpression: doImpression, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (params) => onSubmit(params, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaignCode: campaign.code, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo, action: action }));
5675
+ return (React__default.createElement(LightboxLayout, { flatComponent: flatComponent, popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, onUnmount: onUnmount, doImpression: doImpression, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (params) => onSubmit(params, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaignCode: campaign.code, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo, action: action }));
5578
5676
  }
5579
5677
  else if (currentLayout.includes('Skin')) {
5580
5678
  return (React__default.createElement(SkinLayout, { popupId: popupIdRef.current, link: actionBlocks.linkButtonBlock.data.url, linkNewTab: !!actionBlocks.linkButtonBlock.data.newtab, linkText: actionBlocks.linkButtonBlock.data.value, onClose: onClose, onOtherSubmit: onOtherSubmit, imageMobile: image, imageDesktop: image_desktop, currentLayout: currentLayout }));
@@ -5666,8 +5764,10 @@ const formatTrackingData = (params) => {
5666
5764
  };
5667
5765
 
5668
5766
  // mount css
5669
- const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, }) => {
5767
+ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, flatComponent, }) => {
5670
5768
  var _a, _b;
5769
+ const theme = useMantineTheme();
5770
+ console.log({ theme });
5671
5771
  const scrollEventHandlerRef = useRef();
5672
5772
  const leadStartTimeRef = useRef(Date.now());
5673
5773
  const { apiUrl } = useMemo(() => {
@@ -6006,7 +6106,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
6006
6106
  !!currentLayout &&
6007
6107
  !currentLayout.includes('Inline') &&
6008
6108
  !currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.6, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
6009
- React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, onUnmount: onUnmount, doImpression: doImpression, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo })))));
6109
+ React__default.createElement(NewLeadPopup, { flatComponent: flatComponent, campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, onUnmount: onUnmount, doImpression: doImpression, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo })))));
6010
6110
  }))))))));
6011
6111
  };
6012
6112
  const LeadGen = _LeadGen;
@@ -6017,4 +6117,4 @@ LeadGen.Thankyou = Thankyou;
6017
6117
  LeadGen.OtpForm = OtpBlock$1;
6018
6118
  LeadGen.Close = Close;
6019
6119
 
6020
- export { LeadGen, LeadGenSubscriptionBox };
6120
+ export { LeadGen, LeadGenInline, LeadGenSubscriptionBox, leadGenInlineGetCampaign };