@salla.sa/twilight-components 2.14.225 → 2.14.227

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 (305) hide show
  1. package/dist/cjs/{app-globals-CTD_ReSe.js → app-globals-hFnZzUKs.js} +3 -3
  2. package/dist/cjs/{app-globals-CTD_ReSe.js.map → app-globals-hFnZzUKs.js.map} +1 -1
  3. package/dist/cjs/{index-BboPJvVk.js → index-BMPxDNpo.js} +4 -4
  4. package/dist/cjs/index-BMPxDNpo.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/salla-accordion-body.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-accordion-head.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  39. package/dist/cjs/twilight.cjs.js +2 -2
  40. package/dist/components/index.js +2 -2
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/esm/{app-globals-BpGR-kiQ.js → app-globals-hq3RnNav.js} +3 -3
  43. package/dist/esm/{app-globals-BpGR-kiQ.js.map → app-globals-hq3RnNav.js.map} +1 -1
  44. package/dist/esm/{index-BuEDxKhL.js → index-bWnWhxOm.js} +4 -4
  45. package/dist/esm/index-bWnWhxOm.js.map +1 -0
  46. package/dist/esm/loader.js +3 -3
  47. package/dist/esm/salla-accordion-body.entry.js +1 -1
  48. package/dist/esm/salla-accordion-head.entry.js +1 -1
  49. package/dist/esm/salla-accordion.entry.js +1 -1
  50. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  51. package/dist/esm/salla-advertisement.entry.js +1 -1
  52. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  53. package/dist/esm/salla-apps-icons.entry.js +1 -1
  54. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  55. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  56. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  57. package/dist/esm/salla-contacts.entry.js +1 -1
  58. package/dist/esm/salla-filters-widget.entry.js +1 -1
  59. package/dist/esm/salla-filters.entry.js +1 -1
  60. package/dist/esm/salla-installment.entry.js +1 -1
  61. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  62. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  63. package/dist/esm/salla-metadata.entry.js +1 -1
  64. package/dist/esm/salla-notification-item.entry.js +1 -1
  65. package/dist/esm/salla-notifications.entry.js +1 -1
  66. package/dist/esm/salla-offer.entry.js +1 -1
  67. package/dist/esm/salla-order-summary.entry.js +1 -1
  68. package/dist/esm/salla-orders.entry.js +1 -1
  69. package/dist/esm/salla-payments.entry.js +1 -1
  70. package/dist/esm/salla-price-range.entry.js +1 -1
  71. package/dist/esm/salla-product-options.entry.js +1 -1
  72. package/dist/esm/salla-review-card.entry.js +1 -1
  73. package/dist/esm/salla-reviews-page.entry.js +1 -1
  74. package/dist/esm/salla-reviews.entry.js +1 -1
  75. package/dist/esm/salla-social.entry.js +1 -1
  76. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  77. package/dist/esm/salla-tooltip.entry.js +1 -1
  78. package/dist/esm/salla-verify.entry.js +1 -1
  79. package/dist/esm/salla-wallet.entry.js +1 -1
  80. package/dist/esm/twilight.js +3 -3
  81. package/dist/esm-es5/{app-globals-BpGR-kiQ.js → app-globals-hq3RnNav.js} +2 -2
  82. package/dist/esm-es5/{app-globals-BpGR-kiQ.js.map → app-globals-hq3RnNav.js.map} +1 -1
  83. package/dist/esm-es5/{index-BuEDxKhL.js → index-bWnWhxOm.js} +3 -3
  84. package/dist/esm-es5/index-bWnWhxOm.js.map +1 -0
  85. package/dist/esm-es5/loader.js +1 -1
  86. package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
  87. package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
  88. package/dist/esm-es5/salla-accordion.entry.js +1 -1
  89. package/dist/esm-es5/salla-add-product-button_51.entry.js +1 -1
  90. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  91. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  92. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  93. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  94. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  95. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  96. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  97. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  98. package/dist/esm-es5/salla-filters.entry.js +1 -1
  99. package/dist/esm-es5/salla-installment.entry.js +1 -1
  100. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  101. package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
  102. package/dist/esm-es5/salla-metadata.entry.js +1 -1
  103. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  104. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  105. package/dist/esm-es5/salla-offer.entry.js +1 -1
  106. package/dist/esm-es5/salla-order-summary.entry.js +1 -1
  107. package/dist/esm-es5/salla-orders.entry.js +1 -1
  108. package/dist/esm-es5/salla-payments.entry.js +1 -1
  109. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  110. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  111. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  112. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  113. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  114. package/dist/esm-es5/salla-social.entry.js +1 -1
  115. package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
  116. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  117. package/dist/esm-es5/salla-verify.entry.js +1 -1
  118. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  119. package/dist/esm-es5/twilight.js +1 -1
  120. package/dist/twilight/{p-5c052357.system.entry.js → p-05aa9a60.system.entry.js} +2 -2
  121. package/dist/twilight/{p-87cdfd0c.system.entry.js → p-06043c02.system.entry.js} +2 -2
  122. package/dist/twilight/{p-e80d7e2d.entry.js → p-0b430727.entry.js} +2 -2
  123. package/dist/twilight/{p-1621ce48.system.entry.js → p-10da3994.system.entry.js} +2 -2
  124. package/dist/twilight/{p-81ccc9b4.system.entry.js → p-1b569b10.system.entry.js} +2 -2
  125. package/dist/twilight/{p-0a7ef531.system.entry.js → p-1d8bff13.system.entry.js} +2 -2
  126. package/dist/twilight/{p-234psyG4.system.js.map → p-1f_p-pyh.system.js.map} +1 -1
  127. package/dist/twilight/{p-c9a6cd5e.entry.js → p-1ff003ae.entry.js} +2 -2
  128. package/dist/twilight/{p-45c86f18.entry.js → p-2009a3b2.entry.js} +2 -2
  129. package/dist/twilight/{p-e42cf6fa.system.entry.js → p-2982aef4.system.entry.js} +2 -2
  130. package/dist/twilight/{p-9dc2b009.entry.js → p-2b36aa10.entry.js} +2 -2
  131. package/dist/twilight/{p-35b811d5.system.entry.js → p-2c15e135.system.entry.js} +2 -2
  132. package/dist/twilight/{p-2597d91f.entry.js → p-318cb424.entry.js} +2 -2
  133. package/dist/twilight/{p-fac7b966.entry.js → p-322c43c3.entry.js} +2 -2
  134. package/dist/twilight/{p-5841f384.system.entry.js → p-32cadc2e.system.entry.js} +2 -2
  135. package/dist/twilight/{p-67e8ce01.entry.js → p-32fa0012.entry.js} +2 -2
  136. package/dist/twilight/{p-66383c6f.system.entry.js → p-35a1f4f8.system.entry.js} +2 -2
  137. package/dist/twilight/{p-874e236e.system.entry.js → p-39c71f65.system.entry.js} +2 -2
  138. package/dist/twilight/{p-301356e4.system.entry.js → p-3d2f33db.system.entry.js} +2 -2
  139. package/dist/twilight/{p-d719437a.entry.js → p-41a2ff58.entry.js} +2 -2
  140. package/dist/twilight/{p-1fa6c0ee.entry.js → p-44088065.entry.js} +2 -2
  141. package/dist/twilight/{p-36b1f945.entry.js → p-49b0682d.entry.js} +2 -2
  142. package/dist/twilight/{p-cd65e281.entry.js → p-5062de31.entry.js} +2 -2
  143. package/dist/twilight/{p-8c80c30f.system.entry.js → p-52f71fe5.system.entry.js} +2 -2
  144. package/dist/twilight/{p-450e1424.entry.js → p-53a27112.entry.js} +2 -2
  145. package/dist/twilight/{p-95f8ce0e.system.entry.js → p-56439c4f.system.entry.js} +2 -2
  146. package/dist/twilight/{p-1f4c5504.system.entry.js → p-5a6cdba6.system.entry.js} +2 -2
  147. package/dist/twilight/{p-4c418786.entry.js → p-636fec68.entry.js} +2 -2
  148. package/dist/twilight/{p-7f262d03.system.entry.js → p-692cd8b6.system.entry.js} +2 -2
  149. package/dist/twilight/{p-9c62b55a.entry.js → p-69f12323.entry.js} +2 -2
  150. package/dist/twilight/{p-58434030.entry.js → p-6c7e91e1.entry.js} +2 -2
  151. package/dist/twilight/{p-08818bf6.entry.js → p-6d0cbbaf.entry.js} +2 -2
  152. package/dist/twilight/{p-3146a7d0.entry.js → p-6ee49c5b.entry.js} +2 -2
  153. package/dist/twilight/{p-e3599746.system.entry.js → p-7d438ff1.system.entry.js} +2 -2
  154. package/dist/twilight/{p-eae01aed.system.entry.js → p-7f79cd75.system.entry.js} +2 -2
  155. package/dist/twilight/{p-5b4470bf.entry.js → p-887601b7.entry.js} +2 -2
  156. package/dist/twilight/{p-bd43fadf.entry.js → p-88b4dd5f.entry.js} +2 -2
  157. package/dist/twilight/{p-7f59cd9f.system.entry.js → p-8cfdf2b6.system.entry.js} +2 -2
  158. package/dist/twilight/{p-d55dc6ed.entry.js → p-8ed8db80.entry.js} +2 -2
  159. package/dist/twilight/{p-653e7373.system.entry.js → p-8fc86179.system.entry.js} +2 -2
  160. package/dist/twilight/{p-fa8949b0.entry.js → p-97c4bb25.entry.js} +2 -2
  161. package/dist/twilight/{p-e0208463.entry.js → p-99e29723.entry.js} +2 -2
  162. package/dist/twilight/{p-3dff2f76.system.entry.js → p-99f7a496.system.entry.js} +2 -2
  163. package/dist/twilight/{p-aa5a65e7.entry.js → p-9cf6352b.entry.js} +2 -2
  164. package/dist/twilight/{p-84d97c1a.system.entry.js → p-9e0f4279.system.entry.js} +2 -2
  165. package/dist/twilight/{p-BAlSNS7p.system.js.map → p-B466X8UK.system.js.map} +1 -1
  166. package/dist/twilight/{p-By0rW4rq.system.js → p-B6dZG1Ey.system.js} +3 -3
  167. package/dist/twilight/p-B6dZG1Ey.system.js.map +1 -0
  168. package/dist/twilight/{p-BBWAcIuZ.system.js.map → p-BZ1NPYKG.system.js.map} +1 -1
  169. package/dist/twilight/{p-BaL0Khy-.system.js.map → p-BaeOPjTV.system.js.map} +1 -1
  170. package/dist/twilight/{p-Dm4CLY1C.system.js → p-Bn-ITW9-.system.js} +2 -2
  171. package/dist/twilight/{p-Dm4CLY1C.system.js.map → p-Bn-ITW9-.system.js.map} +1 -1
  172. package/dist/twilight/{p-BAUuwpBC.system.js.map → p-BzQ9Vv1k.system.js.map} +1 -1
  173. package/dist/twilight/{p-B_hCOF74.system.js.map → p-C37SsRx_.system.js.map} +1 -1
  174. package/dist/twilight/{p-BmjgV4Yf.system.js.map → p-C70-bXs3.system.js.map} +1 -1
  175. package/dist/twilight/{p-puB6JvZi.system.js.map → p-C81PoUd5.system.js.map} +1 -1
  176. package/dist/twilight/{p-DXuq_yem.system.js.map → p-CEuZm94z.system.js.map} +1 -1
  177. package/dist/twilight/{p-DvYFUnj0.system.js.map → p-CJ9Rja8s.system.js.map} +1 -1
  178. package/dist/twilight/{p-_mhrLpJ2.system.js.map → p-CLDTPks4.system.js.map} +1 -1
  179. package/dist/twilight/{p-B7nw4ZLM.system.js.map → p-CMmbDbWu.system.js.map} +1 -1
  180. package/dist/twilight/{p-D7Catdno.system.js.map → p-CPSbLPQo.system.js.map} +1 -1
  181. package/dist/twilight/{p-DDHV71gy.system.js.map → p-CPbFw3rv.system.js.map} +1 -1
  182. package/dist/twilight/{p-DhbfXZto.system.js.map → p-CbzY9xr3.system.js.map} +1 -1
  183. package/dist/twilight/{p-D1iGjmVx.system.js → p-Ch0XDLlb.system.js} +2 -2
  184. package/dist/twilight/{p-D1iGjmVx.system.js.map → p-Ch0XDLlb.system.js.map} +1 -1
  185. package/dist/twilight/{p-Czhh6gjZ.system.js.map → p-CrabmjWX.system.js.map} +1 -1
  186. package/dist/twilight/{p-KVtMSLLa.system.js.map → p-CxEpvuoA.system.js.map} +1 -1
  187. package/dist/twilight/{p-DRljzN-H.system.js.map → p-D2Oj4yiI.system.js.map} +1 -1
  188. package/dist/twilight/{p-DTvwBUcM.system.js.map → p-D3fzmb9X.system.js.map} +1 -1
  189. package/dist/twilight/{p-fGl4YJ-E.system.js.map → p-D5btSzB-.system.js.map} +1 -1
  190. package/dist/twilight/{p-BNm-GRln.system.js.map → p-DIdHS8jD.system.js.map} +1 -1
  191. package/dist/twilight/{p-Bs55DB_F.system.js.map → p-DPT0ERnh.system.js.map} +1 -1
  192. package/dist/twilight/{p-D60VWJR5.system.js.map → p-DSEi1U9-.system.js.map} +1 -1
  193. package/dist/twilight/{p-CrZWdz28.system.js.map → p-DigsgNtD.system.js.map} +1 -1
  194. package/dist/twilight/{p-DpS2AZl2.system.js.map → p-KPLvifz6.system.js.map} +1 -1
  195. package/dist/twilight/{p-BDEbE-jm.system.js.map → p-KzUGBk3Y.system.js.map} +1 -1
  196. package/dist/twilight/{p-YXLSVX9a.system.js.map → p-SbMSZuG_.system.js.map} +1 -1
  197. package/dist/twilight/{p-B8g_PPaA.system.js.map → p-Ulh9NfSj.system.js.map} +1 -1
  198. package/dist/twilight/{p-DcqVqCF2.system.js.map → p-VFLmJZ-9.system.js.map} +1 -1
  199. package/dist/twilight/{p-DU7tMpvX.system.js.map → p-Yelj68cj.system.js.map} +1 -1
  200. package/dist/twilight/{p-CHv52V_M.js → p-ZwtGrJFn.js} +2 -2
  201. package/dist/twilight/{p-CHv52V_M.js.map → p-ZwtGrJFn.js.map} +1 -1
  202. package/dist/twilight/{p-b25f5986.system.entry.js → p-a8640b04.system.entry.js} +2 -2
  203. package/dist/twilight/{p-8ddfc931.system.entry.js → p-acb9d776.system.entry.js} +2 -2
  204. package/dist/twilight/{p-BuEDxKhL.js → p-bWnWhxOm.js} +3 -3
  205. package/dist/twilight/p-bWnWhxOm.js.map +1 -0
  206. package/dist/twilight/{p-93f3da8e.entry.js → p-c09f43d3.entry.js} +2 -2
  207. package/dist/twilight/{p-2c157399.system.entry.js → p-c130265a.system.entry.js} +2 -2
  208. package/dist/twilight/{p-9d92395a.system.entry.js → p-c1b001c4.system.entry.js} +3 -3
  209. package/dist/twilight/{p-9e8b0157.entry.js → p-c3e1063f.entry.js} +2 -2
  210. package/dist/twilight/{p-0747bd06.system.entry.js → p-c50fc635.system.entry.js} +2 -2
  211. package/dist/twilight/{p-63e2d5c7.system.entry.js → p-c84e4d50.system.entry.js} +2 -2
  212. package/dist/twilight/{p-1bd8a562.system.entry.js → p-cfe6ae96.system.entry.js} +2 -2
  213. package/dist/twilight/{p-28af21d8.system.entry.js → p-d26748a6.system.entry.js} +2 -2
  214. package/dist/twilight/p-d55ee175.system.entry.js +5 -0
  215. package/dist/twilight/{p-63446264.entry.js → p-d5db9404.entry.js} +2 -2
  216. package/dist/twilight/{p-5ed120d8.system.entry.js → p-dbc0e68a.system.entry.js} +3 -3
  217. package/dist/twilight/{p-c5e1d754.entry.js → p-dc44cedb.entry.js} +2 -2
  218. package/dist/twilight/{p-93588cb9.system.entry.js → p-e51e9d9c.system.entry.js} +2 -2
  219. package/dist/twilight/{p-b5d9c8b5.entry.js → p-e9fd3384.entry.js} +2 -2
  220. package/dist/twilight/{p-c72bc57b.entry.js → p-ea054cd3.entry.js} +2 -2
  221. package/dist/twilight/{p-cb64785d.entry.js → p-f879f1a9.entry.js} +2 -2
  222. package/dist/twilight/p-f8cf7424.entry.js +5 -0
  223. package/dist/twilight/{p-85b5bc6a.system.entry.js → p-fa2c92fc.system.entry.js} +2 -2
  224. package/dist/twilight/{p-5b0cef47.entry.js → p-fd470a27.entry.js} +2 -2
  225. package/dist/twilight/{p-a2935615.entry.js → p-ff6bf70d.entry.js} +2 -2
  226. package/dist/twilight/{p-BH3uWoHX.system.js.map → p-h3jsRynq.system.js.map} +1 -1
  227. package/dist/twilight/{p-DIwtupWl.system.js.map → p-lKw_UV_U.system.js.map} +1 -1
  228. package/dist/twilight/{p-B_EmtHdV.system.js.map → p-u7_VeCm1.system.js.map} +1 -1
  229. package/dist/twilight/{p-BlBBZ3CL.system.js.map → p-xjEwH2R4.system.js.map} +1 -1
  230. package/dist/twilight/twilight.esm.js +1 -1
  231. package/dist/twilight/twilight.js +1 -1
  232. package/package.json +5 -5
  233. package/dist/cjs/index-BboPJvVk.js.map +0 -1
  234. package/dist/esm/index-BuEDxKhL.js.map +0 -1
  235. package/dist/esm-es5/index-BuEDxKhL.js.map +0 -1
  236. package/dist/twilight/p-4d349075.system.entry.js +0 -5
  237. package/dist/twilight/p-8f8b11d5.entry.js +0 -5
  238. package/dist/twilight/p-BuEDxKhL.js.map +0 -1
  239. package/dist/twilight/p-By0rW4rq.system.js.map +0 -1
  240. /package/dist/twilight/{p-5c052357.system.entry.js.map → p-05aa9a60.system.entry.js.map} +0 -0
  241. /package/dist/twilight/{p-87cdfd0c.system.entry.js.map → p-06043c02.system.entry.js.map} +0 -0
  242. /package/dist/twilight/{p-e80d7e2d.entry.js.map → p-0b430727.entry.js.map} +0 -0
  243. /package/dist/twilight/{p-1621ce48.system.entry.js.map → p-10da3994.system.entry.js.map} +0 -0
  244. /package/dist/twilight/{p-81ccc9b4.system.entry.js.map → p-1b569b10.system.entry.js.map} +0 -0
  245. /package/dist/twilight/{p-0a7ef531.system.entry.js.map → p-1d8bff13.system.entry.js.map} +0 -0
  246. /package/dist/twilight/{p-c9a6cd5e.entry.js.map → p-1ff003ae.entry.js.map} +0 -0
  247. /package/dist/twilight/{p-45c86f18.entry.js.map → p-2009a3b2.entry.js.map} +0 -0
  248. /package/dist/twilight/{p-e42cf6fa.system.entry.js.map → p-2982aef4.system.entry.js.map} +0 -0
  249. /package/dist/twilight/{p-9dc2b009.entry.js.map → p-2b36aa10.entry.js.map} +0 -0
  250. /package/dist/twilight/{p-35b811d5.system.entry.js.map → p-2c15e135.system.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-2597d91f.entry.js.map → p-318cb424.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-fac7b966.entry.js.map → p-322c43c3.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-5841f384.system.entry.js.map → p-32cadc2e.system.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-67e8ce01.entry.js.map → p-32fa0012.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-66383c6f.system.entry.js.map → p-35a1f4f8.system.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-874e236e.system.entry.js.map → p-39c71f65.system.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-301356e4.system.entry.js.map → p-3d2f33db.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-d719437a.entry.js.map → p-41a2ff58.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-1fa6c0ee.entry.js.map → p-44088065.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-36b1f945.entry.js.map → p-49b0682d.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-cd65e281.entry.js.map → p-5062de31.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-8c80c30f.system.entry.js.map → p-52f71fe5.system.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-450e1424.entry.js.map → p-53a27112.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-95f8ce0e.system.entry.js.map → p-56439c4f.system.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-1f4c5504.system.entry.js.map → p-5a6cdba6.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-4c418786.entry.js.map → p-636fec68.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-7f262d03.system.entry.js.map → p-692cd8b6.system.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-9c62b55a.entry.js.map → p-69f12323.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-58434030.entry.js.map → p-6c7e91e1.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-08818bf6.entry.js.map → p-6d0cbbaf.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-3146a7d0.entry.js.map → p-6ee49c5b.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-e3599746.system.entry.js.map → p-7d438ff1.system.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-eae01aed.system.entry.js.map → p-7f79cd75.system.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-5b4470bf.entry.js.map → p-887601b7.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-bd43fadf.entry.js.map → p-88b4dd5f.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-7f59cd9f.system.entry.js.map → p-8cfdf2b6.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-d55dc6ed.entry.js.map → p-8ed8db80.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-653e7373.system.entry.js.map → p-8fc86179.system.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-fa8949b0.entry.js.map → p-97c4bb25.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-e0208463.entry.js.map → p-99e29723.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-3dff2f76.system.entry.js.map → p-99f7a496.system.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-aa5a65e7.entry.js.map → p-9cf6352b.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-84d97c1a.system.entry.js.map → p-9e0f4279.system.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-b25f5986.system.entry.js.map → p-a8640b04.system.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-8ddfc931.system.entry.js.map → p-acb9d776.system.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-93f3da8e.entry.js.map → p-c09f43d3.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-2c157399.system.entry.js.map → p-c130265a.system.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-9d92395a.system.entry.js.map → p-c1b001c4.system.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-9e8b0157.entry.js.map → p-c3e1063f.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-0747bd06.system.entry.js.map → p-c50fc635.system.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-63e2d5c7.system.entry.js.map → p-c84e4d50.system.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-1bd8a562.system.entry.js.map → p-cfe6ae96.system.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-28af21d8.system.entry.js.map → p-d26748a6.system.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-4d349075.system.entry.js.map → p-d55ee175.system.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-63446264.entry.js.map → p-d5db9404.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-5ed120d8.system.entry.js.map → p-dbc0e68a.system.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-c5e1d754.entry.js.map → p-dc44cedb.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-93588cb9.system.entry.js.map → p-e51e9d9c.system.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-b5d9c8b5.entry.js.map → p-e9fd3384.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-c72bc57b.entry.js.map → p-ea054cd3.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-cb64785d.entry.js.map → p-f879f1a9.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-8f8b11d5.entry.js.map → p-f8cf7424.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-85b5bc6a.system.entry.js.map → p-fa2c92fc.system.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-5b0cef47.entry.js.map → p-fd470a27.entry.js.map} +0 -0
  305. /package/dist/twilight/{p-a2935615.entry.js.map → p-ff6bf70d.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as t,H as r}from"./p-BuEDxKhL.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;var o=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>`;var n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>`;var l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--){if(e>=t[r].threshold){return t[r].index}}return 0}}const f=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=e=>{this.activeTabTier=e};salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");this.discountText=salla.lang.get("blocks.tiered_offer.discount");this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(e=>{this.updateOfferValues(e)}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e){var t;if(!this.apiOfferData||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(this.apiOfferData,e.coupon)){this.canRender=false;return}this.canRender=true;if(((t=this.apiOfferData.details)===null||t===void 0?void 0:t.with_current_cart)===false){return}const r=e.sub_total;this.apiOfferData=Object.assign(Object.assign({},this.apiOfferData),{details:Object.assign(Object.assign({},this.apiOfferData.details),{current_value:r})});const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"s-tiered-offer-tab-active":""}`,onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))}))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name))))})()))}render(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};c.style=f;export{c as salla_tiered_offer};
5
- //# sourceMappingURL=p-aa5a65e7.entry.js.map
4
+ import{r as e,h as t,H as r}from"./p-bWnWhxOm.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;var o=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>`;var n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>`;var l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--){if(e>=t[r].threshold){return t[r].index}}return 0}}const f=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=e=>{this.activeTabTier=e};salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");this.discountText=salla.lang.get("blocks.tiered_offer.discount");this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(e=>{this.updateOfferValues(e)}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e){var t;if(!this.apiOfferData||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(this.apiOfferData,e.coupon)){this.canRender=false;return}this.canRender=true;if(((t=this.apiOfferData.details)===null||t===void 0?void 0:t.with_current_cart)===false){return}const r=e.sub_total;this.apiOfferData=Object.assign(Object.assign({},this.apiOfferData),{details:Object.assign(Object.assign({},this.apiOfferData.details),{current_value:r})});const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"s-tiered-offer-tab-active":""}`,onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))}))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name))))})()))}render(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};c.style=f;export{c as salla_tiered_offer};
5
+ //# sourceMappingURL=p-9cf6352b.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-By0rW4rq.system.js"],(function(e){"use strict";var c,t,n;return{setters:[function(e){c=e.r;t=e.h;n=e.H}],execute:function(){var r="";var b=e("salla_accordion_body",function(){function e(e){c(this,e)}e.prototype.render=function(){return t(n,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},t("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))};return e}());b.style=r}}}));
5
- //# sourceMappingURL=p-84d97c1a.system.entry.js.map
4
+ System.register(["./p-B6dZG1Ey.system.js"],(function(e){"use strict";var c,t,n;return{setters:[function(e){c=e.r;t=e.h;n=e.H}],execute:function(){var r="";var b=e("salla_accordion_body",function(){function e(e){c(this,e)}e.prototype.render=function(){return t(n,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},t("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))};return e}());b.style=r}}}));
5
+ //# sourceMappingURL=p-9e0f4279.system.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-BAlSNS7p.system.js","sources":["src/components/salla-offer/interfaces.ts","src/components/salla-offer/salla-offer.scss?tag=salla-offer","src/components/salla-offer/salla-offer.tsx"],"sourcesContent":["export enum PageType {\n ProductDetail = \"product.single\",\n Cart = \"cart\"\n}\n\nexport enum OfferType {\n Conditional = \"conditional\",\n PercentageOrFixed = \"fixed\",\n DiscountsTable = \"discounts_table\",\n Bank = \"bank\",\n BuyXGetY = \"buy_x_get_y\",\n SpecialPrice = \"special_price\",\n}\n\n\nexport interface DiscountDetailFixed {\n discount_type: \"fixed\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailFreeProduct {\n discount_type: \"free_product\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailConditional extends Array<DiscountDetailFixed | DiscountDetailFreeProduct> {}\n\nexport interface DiscountDetailPercentageFixed {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n ends_at: number;\n min_spend: number;\n discount_value: number;\n}\n\nexport interface Discount {\n discounted_amount: any;\n quantity: number;\n percentage: number;\n}\n\nexport interface DiscountDetailTable {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\" | \"order\";\n discount_value: number;\n ends_at: string;\n min_items: number;\n min_spend: number;\n show_price_after_discount: boolean;\n discounts: Discount[];\n}\n\nexport interface BankOffer {\n logo: string;\n discount_value: number;\n discount_type: string;\n minimum_spend: number;\n payments: string[];\n}\n\nexport interface SpecialPriceDetail {\n apply_to: \"product\" | \"category\";\n discount_value: number;\n ends_at: number;\n min_items: number; \n min_spend: number;\n targets: Array<string | number>;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n\n}\n\nexport interface BuyXGetYDetail {\n ends_at: number;\n buy: {\n source: \"product\" | \"category\";\n source_value: number[];\n quantity: number;\n };\n get: {\n source: \"products\" | \"category\";\n source_value: number[];\n type: \"free_product\" | \"percentage\" | \"fixed\";\n value: number;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n };\n}\n\nexport interface Offer {\n id: number;\n title: string;\n description: string;\n type: OfferType | \"conditional\" | \"fixed\" | \"discounts_table\" | \"bank\" | \"buy_x_get_y\";\n details: DiscountDetailConditional | DiscountDetailPercentageFixed | DiscountDetailTable | BankOffer | BuyXGetYDetail | SpecialPriceDetail;\n}\n\nexport interface Product {\n id: number;\n type: string;\n status: string;\n is_available: boolean;\n sku: string;\n name: string;\n price: { amount: number; currency: string; };\n promotion: { title: string; sub_title: string; };\n sale_price: { amount: number; currency: string; };\n regular_price: { amount: number; currency: string; };\n currency: string;\n url: string;\n thumbnail: string;\n has_special_price: boolean;\n favorite?: any;\n}\n\nexport interface Category {\n id?: string;\n id_?: number;\n name?: string;\n url?: string;\n icon?: string;\n sub_categories?: Category[];\n items?: any[] | null;\n}\n\nexport interface Currency {\n code: string | 'SAR';\n name: string;\n symbol: string;\n amount?: number;\n country_code?: string;\n}\n",".s-offer-wrapper .s-slider-block__title {\n h2 {\n font-size: 1.125rem;\n line-height: 1.75rem;\n color: #f87171;\n\n &::before {\n font-family: \"sallaicons\";\n content: \"\\ee30\" !important;\n position: absolute;\n top: 1rem;\n font-size: 3rem;\n font-weight: 400;\n line-height: 1;\n color: #fef2f2;\n }\n }\n}\n\n.s-offer-bank-wrapper-sinlge-item{\n display: flex;\n align-items: center !important;\n gap: 14px;\n}\n\n.s-offer-bank-wrapper {\n display: flex !important;\n width: 100% !important;\n}\n\n// .s-offer-bank-wrapper {\n // \n// }","import { Component, Element, Prop, State, h } from '@stencil/core';\nimport { Offer, Category, Product, Discount, Currency, BuyXGetYDetail, PageType, OfferType, BankOffer,SpecialPriceDetail, DiscountDetailTable } from './interfaces';\n\n\n/**\n * `salla-offer` is a StencilJS component that displays offers, categories, products, banks, and discount information.\n * It uses the `salla-slider` component for carousel functionality.\n *\n * @slot category - The slot for customizing the category entry layout.\n *\n * @csspart custom - Custom CSS part to target specific elements in the component.\n *\n * @example\n * <salla-offer product-id=\"123\"></salla-offer>\n */\n@Component({\n tag: 'salla-offer',\n styleUrl: 'salla-offer.scss',\n})\nexport class SallaOffer {\n\n constructor() {\n // Language\n salla.lang.onLoaded(() => {\n this.offer_with_price_text = salla.lang.get('pages.offer.with_price');\n this.with_discount_text = salla.lang.get('pages.products.with_a_discount');\n this.product_discount_text = salla.lang.get('pages.products.discount');\n this.special_offer_text = salla.lang.get('pages.products.special_offer');\n this.multipleBankOfferTitleText = salla.lang.get('pages.offer.multiple_bank_offers_title');\n this.multipleBankOfferTitleDescription = salla.lang.get('pages.offer.multiple_bank_offers_message');\n this.buy_quantity_text(0);\n })\n\n salla.onReady(() => {\n this.currentPage = salla.config.get('page.slug')\n this.userCurrency = salla.config.get('currencies')[salla.config.get('user.currency_code')].symbol\n });\n\n this.categorySlot = this.host.querySelector('[slot=\"category\"]')?.innerHTML || '<a href={url} class=\"s-offer-slide-cat-entry\"><i class={icon}></i><h4>{name}</h4></a>';\n }\n\n /**\n * Custom Card Component for the Salla Products List.\n *\n * This component allows you to customize the appearance of individual product cards within a Salla Products List.\n *\n * @example\n * <salla-products-list product-card-component=\"my-custom-card-style1\" ...\n * <salla-products-list product-card-component=\"my-custom-card-style2\" ...\n */\n @Prop() productCardComponent: string = 'custom-salla-product-card';\n\n // Declare component state variables\n @State() offersList: Offer[] = [];\n @State() userCurrency: Currency;\n @State() isMultipleBank: boolean = false;\n @State() title?: string;\n @State() currentPage: string;\n @State() hasCustomComponent: boolean;\n\n @State() isBankOffer: boolean = false;\n @State() canRender: boolean = false;\n @State() showOffer: boolean = salla.config.get('store.settings.product.show_special_offers');\n\n // Default translated texts\n @State() offer_with_price_text: string = salla.lang.get('pages.offer.with_price', { price: '' });\n @State() with_discount_text: string = salla.lang.get('pages.products.with_a_discount')\n @State() product_discount_text: string = salla.lang.get('pages.products.discount')\n @State() special_offer_text: string = salla.lang.get('pages.products.special_offer')\n @State() multipleBankOfferTitleText: string = salla.lang.get('pages.offer.multiple_bank_offers_title')\n @State() multipleBankOfferTitleDescription: string = salla.lang.get('pages.offer.multiple_bank_offers_message')\n @State() buy_quantity_text: (quantity: number) => string = (quantity) => salla.lang.get('pages.offer.buy_quantity', { quantity })\n\n // Reference to the host element\n @Element() host: HTMLElement;\n\n private categorySlot: string;\n\n private async getEndpointByPageName(): Promise<string> {\n if (this.currentPage == PageType.Cart) {\n const cartId = await Salla.cart.getCurrentCartId();\n return `offers/cart/${cartId}`;\n }\n\n if (this.currentPage == PageType.ProductDetail) {\n return `offers/product/${salla.config.get('page.id')}`;\n }\n\n return \"offers\";\n }\n\n /**\n * Emits a promotion viewed event for analytics tracking\n */\n private emitPromotionViewed(): void {\n if(!(this.offersList.length && this.canRender && this.showOffer)) return;\n \n // Transform offer data to match analytics expectations\n const promotionData = {\n id: this.offersList[0].id,\n name: this.offersList[0].title,\n creative: this.offersList[0].description || '',\n position: 1 \n };\n \n salla.event.emit('promotion::viewed', [promotionData]);\n }\n /**\n * Emits a promotion clicked event\n */\n private emitPromotionClicked(position: number = 1): void {\n if(!(this.offersList.length && this.canRender && this.showOffer)) return;\n \n // Transform offer data to match analytics expectations\n const promotionData = {\n id: this.offersList[0].id,\n name: this.offersList[0].title,\n creative: this.offersList[0].description || '',\n position: position\n };\n \n salla.event.emit('promotion::clicked', [promotionData]);\n }\n\n componentWillLoad() {\n this.hasCustomComponent = !!customElements.get(this.productCardComponent);\n // let offers = this.getOffersFromStorage();\n // if (offers) {\n // return offers.then(offersFromStorage => this.offersList = offersFromStorage);\n // }\n\n return (new Promise(resolve => salla.onReady(resolve)))\n .then(() => {\n this.showOffer = !salla.url.is_page('product.single') || salla.config.get('store.settings.product.show_special_offers')\n if (this.showOffer) {\n return;\n }\n throw new Error(\"Merchant disabled showing the offers on product page\");\n }\n )\n .then(async () => salla.api.request(await this.getEndpointByPageName()))\n .then((res) => {\n if (!(this.offersList = res.data).length) {\n throw new Error('salla-offers:: There is no offers!');\n }\n //we support these offers only\n const offer = this.offersList.find(offer => [OfferType.SpecialPrice,OfferType.Bank, OfferType.BuyXGetY, OfferType.DiscountsTable].includes(offer.type as any));\n if (!offer) {\n throw new Error('salla-offers:: Offer type not supported yet!');\n }\n //because there is no need for special handling for discounts table, just skip the other cases\n if (offer.type === OfferType.DiscountsTable) {\n return this.offersList = [offer];\n }\n\n //if it's banks offer, we need to include the other banks overs\n if ((this.isBankOffer = offer.type === OfferType.Bank)) {\n this.offersList = this.offersList.filter(offer => offer.type === OfferType.Bank);\n this.isMultipleBank = this.offersList.length > 1;\n return this.offersList;\n }\n\n //if it's special price offer\n if (offer.type === OfferType.SpecialPrice) {\n const details = offer.details as SpecialPriceDetail;\n\n return details.apply_to === 'product'\n // Avoid additional requests; use `salla-products-slider` and pass the custom card\n ? salla.product.api.fetch({ source: \"selected\", source_value: details.targets})\n .then((response: any) => {\n (offer.details as any).products = response.data; // Set the fetched products\n return this.offersList = [offer];\n })\n : salla.product.api.categories() // Fetch all categories in one query\n .then((res) => {\n const categoriesToRender = this.findCategories(res.data, details.targets); // Extract only the selected categories\n (offer.details as any).categories = categoriesToRender;\n return this.offersList = [offer];\n });\n }\n\n //BuyXGetY offers\n const getY = (offer.details as BuyXGetYDetail).get;\n return getY.source === 'products'\n //todo:: avoid this request, and the handling for the products, just use `salla-products-slider` and don't forget to pass the customcard\n ? salla.product.api.fetch({ source: \"selected\", source_value: getY.source_value })\n .then((response: any) => {\n getY.products = response.data;\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n })//set the products\n : salla.product.api.categories()//get all categories in one query, then extract only the selected one, instead of sending multi requests\n .then((res) => {\n getY.categories = this.findCategories(res.data, getY.source_value);\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n });\n })\n .then((offers: Offer[]) => {\n salla.storage.set(this.getStorageKey(), { offers, stored_at: new Date().getTime() });\n this.canRender = true;\n })\n .catch((error) => {\n salla.logger.warn(error)\n });\n }\n\n componentDidLoad() {\n let nav = this.host.querySelector('.s-slider-block__title-nav');\n nav?.classList.add(\"s-offer-bank-payment-nav\")\n this.emitPromotionViewed();\n }\n\n \n\n\n findCategories(categories: Category[], ids: any[]): Category[] {\n let found: Category[] = [];\n for (const category of categories) {\n if (ids.includes(category.id_ || category.id)) { //here we are using || because we are planning to drop `id_`\n found.push(category);\n }\n if (category.sub_categories?.length > 0) {\n found = found.concat(this.findCategories(category.sub_categories, ids));\n }\n }\n\n return found;\n }\n\n //todo::add to the key params, to make sure it will support multi offers in the same page if it's wanted\n getStorageKey(): string {\n try {\n const pageSlug = salla.config.get('page.slug').replace('.', '_');\n const locale = salla.lang.getLocale();\n const currencyCode = salla.config.currency().code;\n\n if (!pageSlug || !locale || !currencyCode) {\n throw new Error('Unable to get the storage key.');\n }\n\n return `s-offers-${pageSlug}-${salla.config.get('page.id')}-${locale}-${currencyCode}`;\n } catch (error) {\n return '';\n }\n }\n\n //@ts-ignore\n getOffersFromStorage(): null | Promise<Offer[]> {\n let storageOffers = salla.storage.get(this.getStorageKey());\n //if the offers not existed, or it has been stored before 10 minutes from now, ignore it;\n if (!storageOffers || storageOffers.stored_at < (new Date().getTime() - 10 * 60 * 1000)) {\n salla.storage.remove(this.getStorageKey());\n return null;\n }\n this.canRender = true;\n\n //return it as resolve to support .then\n return Promise.resolve(storageOffers.offers);\n }\n\n render() {\n // Check if the offers list is empty or if the component is not ready to render\n if (!this.offersList.length || !this.canRender || !this.showOffer) return null;\n const offer: Offer = this.offersList[0];\n\n const blockTitle = this.isBankOffer ? (this.isMultipleBank ? this.multipleBankOfferTitleText : null) : offer.title;\n const blockSubTitle = this.isBankOffer ? (this.isMultipleBank ? this.multipleBankOfferTitleDescription : null) : offer.description;\n\n const titles = {\n 'block-title': blockTitle,\n 'block-subTitle': blockSubTitle,\n 'show-controls': this.isMultipleBank\n };\n\n return (\n <div class=\"s-offer-wrapper\" onClick={() => this.emitPromotionClicked()}>\n {<p class=\"s-offer-corner-badge\">{this.special_offer_text}</p>}\n {/* discounts table is not a slider, it's a table🤔 */}\n {/* single bank offer is not a slider, it's a dom without slider🤔 */}\n <salla-slider type=\"carousel\" id=\"offer-slider\" {...titles}>\n <div slot='items'>\n {this.renderSectionForOfferType(offer.type)}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n private renderSectionForOfferType(offerType: OfferType | string) {\n if (this.isBankOffer) {\n return this.renderBankSection();\n }\n if (offerType == OfferType.SpecialPrice) {\n return this.renderSpecialPriceSection();\n }\n if (offerType == OfferType.BuyXGetY) {\n return this.renderBuyXGetYSection();\n }\n\n return this.renderDiscountTableSection();\n }\n\n /**\n * Generates content for the categories section.\n *\n * @param offeredCategories - An array of Category objects.\n * @returns An array of HTML elements representing categories.\n */\n private getCategoriesSection(category: Category) {\n return <div class=\"s-offer-slide-one-sixth swiper-slide\" innerHTML={this.categorySlot\n .replace(/\\{url\\}/g, category.url)\n .replace(/\\{icon\\}/g, category.icon || \"sicon-store\")\n .replace(/\\{name\\}/g, category.name)}></div>\n }\n\n private renderBuyXGetYSection() {\n const details = (this.offersList[0].details as BuyXGetYDetail)\n return [\n details.get.products?.map((product: Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n details.get.categories?.map((category: Category) => this.getCategoriesSection(category))\n ];\n }\n\n /**\n * Generates content for the bank section.\n *\n * @param offeredBank - An array of Bank objects.\n * @param name - The title of the current offer.\n * @param description - The description of the current offer.\n * @returns An array of HTML elements representing banks.\n *\n * TODO: loop over the list and filter bank types and pass it to this function\n */\n private renderBankSection() {\n return this.offersList.map((bankOffer: Offer) => {\n return <div class={{ \"s-offer-slide-one-sixth\": this.isMultipleBank, \"s-offer-bank-wrapper-sinlge-item\": !this.isMultipleBank }}>\n <div class={{ \"s-offer-bank-wrapper\": true, \"s-offer-slide-one-sixth\": !this.isMultipleBank, \"s-offer-bank-wrapper-multi-spacer\": this.isMultipleBank }}>\n <div class=\"s-offer-bank-logo\">\n <img src={(bankOffer.details as BankOffer).logo || salla.url.cdn('images/s-empty.png')} data-src={(bankOffer.details as BankOffer).logo} alt={bankOffer.title + \" offer\"} />\n </div>\n <ul class=\"s-offer-bank-payment-wrapper\">\n {(bankOffer.details as BankOffer).payments.map((payment: string) => {\n return <li class=\"s-offer-bank-payment-single\">\n <img\n src={salla.url.cdn('images/payment/' + payment + '.png') || salla.url.cdn('images/s-empty.png')}\n data-src={salla.url.cdn('images/payment/' + payment + '.png')}\n alt=\"payment\" />\n </li>\n })}\n </ul>\n {this.isMultipleBank ?\n <p class=\"s-offer-bank-payment-discount-percent\">\n {`${this.product_discount_text} ${(bankOffer.details as BankOffer).discount_value}${(bankOffer.details as BankOffer).discount_type === \"percentage\" && '%'}`}\n </p>\n : \"\"}\n </div>\n {!this.isMultipleBank ?\n <div class=\"s-offer-bank-message s-offer-slide-one-fourth\">\n <h2>{this.offersList[0].title}</h2>\n <p innerHTML={this.generateBankDescription(this.offersList[0].description, (bankOffer.details as BankOffer).discount_value)}></p>\n </div>\n : \"\"}\n </div>\n })\n }\n\n private generateBankDescription(desc: string, value): string {\n return desc.replace(new RegExp(`${value} %`), `<span class=\"s-offer-bank-message-amount\">${value} %</span>`)\n }\n\n /**\n * Generates content for the discount table section.\n *\n * @param discountTable - An array of Discount objects.\n * @returns An array of HTML elements representing discounts_table.\n */\n private renderDiscountTableSection() {\n const offer: Offer = this.offersList[0];\n let show_discounted_price = (offer.details as DiscountDetailTable).show_price_after_discount;\n return (this.offersList[0].details as DiscountDetailTable).discounts?.map((discount: Discount) => <div class=\"s-offer-slide-one-fourth\">\n <div class=\"s-offer-slide-offer-entry\">\n <div class=\"s-offer-slide-offer-entry-price-quantity-container\">\n <p class=\"s-offer-slide-offer-entry-quantity\">{this.buy_quantity_text(discount.quantity)}</p>\n {show_discounted_price ?\n <div class=\"s-offer-slide-offer-entry-price\">\n <span>{this.offer_with_price_text}</span>\n <span class=\"s-offer-slide-offer-entry-price-amount\">{discount.discounted_amount}</span> <span>{this.userCurrency}</span>\n </div> : \"\"}\n </div>\n <p class=\"s-offer-slide-offer-entry-price-amount-percent\">{this.with_discount_text}\n (<span>{discount.percentage}{!!discount.percentage && '%'}</span>)</p>\n </div>\n </div>\n )\n }\n\n private renderSpecialPriceSection() {\n const details = this.offersList[0].details as SpecialPriceDetail;\n\n return [\n // Render products if `apply_to` is \"product\"\n details.apply_to === \"product\" &&\n details.products?.map((product:Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n\n // Render categories if `apply_to` is \"category\"\n details.apply_to === \"category\" &&\n details.categories?.map((category: Category) => this.getCategoriesSection(category)),\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;YAAA,IAAY,QAGX;YAHD,CAAA,UAAY,QAAQ,EAAA;YAClB,IAAA,QAAA,CAAA,eAAA,CAAA,GAAA,gBAAgC;YAChC,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;YACf,CAAC,EAHW,QA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K.system.js","sources":["src/components/salla-offer/interfaces.ts","src/components/salla-offer/salla-offer.scss?tag=salla-offer","src/components/salla-offer/salla-offer.tsx"],"sourcesContent":["export enum PageType {\n ProductDetail = \"product.single\",\n Cart = \"cart\"\n}\n\nexport enum OfferType {\n Conditional = \"conditional\",\n PercentageOrFixed = \"fixed\",\n DiscountsTable = \"discounts_table\",\n Bank = \"bank\",\n BuyXGetY = \"buy_x_get_y\",\n SpecialPrice = \"special_price\",\n}\n\n\nexport interface DiscountDetailFixed {\n discount_type: \"fixed\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailFreeProduct {\n discount_type: \"free_product\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailConditional extends Array<DiscountDetailFixed | DiscountDetailFreeProduct> {}\n\nexport interface DiscountDetailPercentageFixed {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n ends_at: number;\n min_spend: number;\n discount_value: number;\n}\n\nexport interface Discount {\n discounted_amount: any;\n quantity: number;\n percentage: number;\n}\n\nexport interface DiscountDetailTable {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\" | \"order\";\n discount_value: number;\n ends_at: string;\n min_items: number;\n min_spend: number;\n show_price_after_discount: boolean;\n discounts: Discount[];\n}\n\nexport interface BankOffer {\n logo: string;\n discount_value: number;\n discount_type: string;\n minimum_spend: number;\n payments: string[];\n}\n\nexport interface SpecialPriceDetail {\n apply_to: \"product\" | \"category\";\n discount_value: number;\n ends_at: number;\n min_items: number; \n min_spend: number;\n targets: Array<string | number>;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n\n}\n\nexport interface BuyXGetYDetail {\n ends_at: number;\n buy: {\n source: \"product\" | \"category\";\n source_value: number[];\n quantity: number;\n };\n get: {\n source: \"products\" | \"category\";\n source_value: number[];\n type: \"free_product\" | \"percentage\" | \"fixed\";\n value: number;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n };\n}\n\nexport interface Offer {\n id: number;\n title: string;\n description: string;\n type: OfferType | \"conditional\" | \"fixed\" | \"discounts_table\" | \"bank\" | \"buy_x_get_y\";\n details: DiscountDetailConditional | DiscountDetailPercentageFixed | DiscountDetailTable | BankOffer | BuyXGetYDetail | SpecialPriceDetail;\n}\n\nexport interface Product {\n id: number;\n type: string;\n status: string;\n is_available: boolean;\n sku: string;\n name: string;\n price: { amount: number; currency: string; };\n promotion: { title: string; sub_title: string; };\n sale_price: { amount: number; currency: string; };\n regular_price: { amount: number; currency: string; };\n currency: string;\n url: string;\n thumbnail: string;\n has_special_price: boolean;\n favorite?: any;\n}\n\nexport interface Category {\n id?: string;\n id_?: number;\n name?: string;\n url?: string;\n icon?: string;\n sub_categories?: Category[];\n items?: any[] | null;\n}\n\nexport interface Currency {\n code: string | 'SAR';\n name: string;\n symbol: string;\n amount?: number;\n country_code?: string;\n}\n",".s-offer-wrapper .s-slider-block__title {\n h2 {\n font-size: 1.125rem;\n line-height: 1.75rem;\n color: #f87171;\n\n &::before {\n font-family: \"sallaicons\";\n content: \"\\ee30\" !important;\n position: absolute;\n top: 1rem;\n font-size: 3rem;\n font-weight: 400;\n line-height: 1;\n color: #fef2f2;\n }\n }\n}\n\n.s-offer-bank-wrapper-sinlge-item{\n display: flex;\n align-items: center !important;\n gap: 14px;\n}\n\n.s-offer-bank-wrapper {\n display: flex !important;\n width: 100% !important;\n}\n\n// .s-offer-bank-wrapper {\n // \n// }","import { Component, Element, Prop, State, h } from '@stencil/core';\nimport { Offer, Category, Product, Discount, Currency, BuyXGetYDetail, PageType, OfferType, BankOffer,SpecialPriceDetail, DiscountDetailTable } from './interfaces';\n\n\n/**\n * `salla-offer` is a StencilJS component that displays offers, categories, products, banks, and discount information.\n * It uses the `salla-slider` component for carousel functionality.\n *\n * @slot category - The slot for customizing the category entry layout.\n *\n * @csspart custom - Custom CSS part to target specific elements in the component.\n *\n * @example\n * <salla-offer product-id=\"123\"></salla-offer>\n */\n@Component({\n tag: 'salla-offer',\n styleUrl: 'salla-offer.scss',\n})\nexport class SallaOffer {\n\n constructor() {\n // Language\n salla.lang.onLoaded(() => {\n this.offer_with_price_text = salla.lang.get('pages.offer.with_price');\n this.with_discount_text = salla.lang.get('pages.products.with_a_discount');\n this.product_discount_text = salla.lang.get('pages.products.discount');\n this.special_offer_text = salla.lang.get('pages.products.special_offer');\n this.multipleBankOfferTitleText = salla.lang.get('pages.offer.multiple_bank_offers_title');\n this.multipleBankOfferTitleDescription = salla.lang.get('pages.offer.multiple_bank_offers_message');\n this.buy_quantity_text(0);\n })\n\n salla.onReady(() => {\n this.currentPage = salla.config.get('page.slug')\n this.userCurrency = salla.config.get('currencies')[salla.config.get('user.currency_code')].symbol\n });\n\n this.categorySlot = this.host.querySelector('[slot=\"category\"]')?.innerHTML || '<a href={url} class=\"s-offer-slide-cat-entry\"><i class={icon}></i><h4>{name}</h4></a>';\n }\n\n /**\n * Custom Card Component for the Salla Products List.\n *\n * This component allows you to customize the appearance of individual product cards within a Salla Products List.\n *\n * @example\n * <salla-products-list product-card-component=\"my-custom-card-style1\" ...\n * <salla-products-list product-card-component=\"my-custom-card-style2\" ...\n */\n @Prop() productCardComponent: string = 'custom-salla-product-card';\n\n // Declare component state variables\n @State() offersList: Offer[] = [];\n @State() userCurrency: Currency;\n @State() isMultipleBank: boolean = false;\n @State() title?: string;\n @State() currentPage: string;\n @State() hasCustomComponent: boolean;\n\n @State() isBankOffer: boolean = false;\n @State() canRender: boolean = false;\n @State() showOffer: boolean = salla.config.get('store.settings.product.show_special_offers');\n\n // Default translated texts\n @State() offer_with_price_text: string = salla.lang.get('pages.offer.with_price', { price: '' });\n @State() with_discount_text: string = salla.lang.get('pages.products.with_a_discount')\n @State() product_discount_text: string = salla.lang.get('pages.products.discount')\n @State() special_offer_text: string = salla.lang.get('pages.products.special_offer')\n @State() multipleBankOfferTitleText: string = salla.lang.get('pages.offer.multiple_bank_offers_title')\n @State() multipleBankOfferTitleDescription: string = salla.lang.get('pages.offer.multiple_bank_offers_message')\n @State() buy_quantity_text: (quantity: number) => string = (quantity) => salla.lang.get('pages.offer.buy_quantity', { quantity })\n\n // Reference to the host element\n @Element() host: HTMLElement;\n\n private categorySlot: string;\n\n private async getEndpointByPageName(): Promise<string> {\n if (this.currentPage == PageType.Cart) {\n const cartId = await Salla.cart.getCurrentCartId();\n return `offers/cart/${cartId}`;\n }\n\n if (this.currentPage == PageType.ProductDetail) {\n return `offers/product/${salla.config.get('page.id')}`;\n }\n\n return \"offers\";\n }\n\n /**\n * Emits a promotion viewed event for analytics tracking\n */\n private emitPromotionViewed(): void {\n if(!(this.offersList.length && this.canRender && this.showOffer)) return;\n \n // Transform offer data to match analytics expectations\n const promotionData = {\n id: this.offersList[0].id,\n name: this.offersList[0].title,\n creative: this.offersList[0].description || '',\n position: 1 \n };\n \n salla.event.emit('promotion::viewed', [promotionData]);\n }\n /**\n * Emits a promotion clicked event\n */\n private emitPromotionClicked(position: number = 1): void {\n if(!(this.offersList.length && this.canRender && this.showOffer)) return;\n \n // Transform offer data to match analytics expectations\n const promotionData = {\n id: this.offersList[0].id,\n name: this.offersList[0].title,\n creative: this.offersList[0].description || '',\n position: position\n };\n \n salla.event.emit('promotion::clicked', [promotionData]);\n }\n\n componentWillLoad() {\n this.hasCustomComponent = !!customElements.get(this.productCardComponent);\n // let offers = this.getOffersFromStorage();\n // if (offers) {\n // return offers.then(offersFromStorage => this.offersList = offersFromStorage);\n // }\n\n return (new Promise(resolve => salla.onReady(resolve)))\n .then(() => {\n this.showOffer = !salla.url.is_page('product.single') || salla.config.get('store.settings.product.show_special_offers')\n if (this.showOffer) {\n return;\n }\n throw new Error(\"Merchant disabled showing the offers on product page\");\n }\n )\n .then(async () => salla.api.request(await this.getEndpointByPageName()))\n .then((res) => {\n if (!(this.offersList = res.data).length) {\n throw new Error('salla-offers:: There is no offers!');\n }\n //we support these offers only\n const offer = this.offersList.find(offer => [OfferType.SpecialPrice,OfferType.Bank, OfferType.BuyXGetY, OfferType.DiscountsTable].includes(offer.type as any));\n if (!offer) {\n throw new Error('salla-offers:: Offer type not supported yet!');\n }\n //because there is no need for special handling for discounts table, just skip the other cases\n if (offer.type === OfferType.DiscountsTable) {\n return this.offersList = [offer];\n }\n\n //if it's banks offer, we need to include the other banks overs\n if ((this.isBankOffer = offer.type === OfferType.Bank)) {\n this.offersList = this.offersList.filter(offer => offer.type === OfferType.Bank);\n this.isMultipleBank = this.offersList.length > 1;\n return this.offersList;\n }\n\n //if it's special price offer\n if (offer.type === OfferType.SpecialPrice) {\n const details = offer.details as SpecialPriceDetail;\n\n return details.apply_to === 'product'\n // Avoid additional requests; use `salla-products-slider` and pass the custom card\n ? salla.product.api.fetch({ source: \"selected\", source_value: details.targets})\n .then((response: any) => {\n (offer.details as any).products = response.data; // Set the fetched products\n return this.offersList = [offer];\n })\n : salla.product.api.categories() // Fetch all categories in one query\n .then((res) => {\n const categoriesToRender = this.findCategories(res.data, details.targets); // Extract only the selected categories\n (offer.details as any).categories = categoriesToRender;\n return this.offersList = [offer];\n });\n }\n\n //BuyXGetY offers\n const getY = (offer.details as BuyXGetYDetail).get;\n return getY.source === 'products'\n //todo:: avoid this request, and the handling for the products, just use `salla-products-slider` and don't forget to pass the customcard\n ? salla.product.api.fetch({ source: \"selected\", source_value: getY.source_value })\n .then((response: any) => {\n getY.products = response.data;\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n })//set the products\n : salla.product.api.categories()//get all categories in one query, then extract only the selected one, instead of sending multi requests\n .then((res) => {\n getY.categories = this.findCategories(res.data, getY.source_value);\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n });\n })\n .then((offers: Offer[]) => {\n salla.storage.set(this.getStorageKey(), { offers, stored_at: new Date().getTime() });\n this.canRender = true;\n })\n .catch((error) => {\n salla.logger.warn(error)\n });\n }\n\n componentDidLoad() {\n let nav = this.host.querySelector('.s-slider-block__title-nav');\n nav?.classList.add(\"s-offer-bank-payment-nav\")\n this.emitPromotionViewed();\n }\n\n \n\n\n findCategories(categories: Category[], ids: any[]): Category[] {\n let found: Category[] = [];\n for (const category of categories) {\n if (ids.includes(category.id_ || category.id)) { //here we are using || because we are planning to drop `id_`\n found.push(category);\n }\n if (category.sub_categories?.length > 0) {\n found = found.concat(this.findCategories(category.sub_categories, ids));\n }\n }\n\n return found;\n }\n\n //todo::add to the key params, to make sure it will support multi offers in the same page if it's wanted\n getStorageKey(): string {\n try {\n const pageSlug = salla.config.get('page.slug').replace('.', '_');\n const locale = salla.lang.getLocale();\n const currencyCode = salla.config.currency().code;\n\n if (!pageSlug || !locale || !currencyCode) {\n throw new Error('Unable to get the storage key.');\n }\n\n return `s-offers-${pageSlug}-${salla.config.get('page.id')}-${locale}-${currencyCode}`;\n } catch (error) {\n return '';\n }\n }\n\n //@ts-ignore\n getOffersFromStorage(): null | Promise<Offer[]> {\n let storageOffers = salla.storage.get(this.getStorageKey());\n //if the offers not existed, or it has been stored before 10 minutes from now, ignore it;\n if (!storageOffers || storageOffers.stored_at < (new Date().getTime() - 10 * 60 * 1000)) {\n salla.storage.remove(this.getStorageKey());\n return null;\n }\n this.canRender = true;\n\n //return it as resolve to support .then\n return Promise.resolve(storageOffers.offers);\n }\n\n render() {\n // Check if the offers list is empty or if the component is not ready to render\n if (!this.offersList.length || !this.canRender || !this.showOffer) return null;\n const offer: Offer = this.offersList[0];\n\n const blockTitle = this.isBankOffer ? (this.isMultipleBank ? this.multipleBankOfferTitleText : null) : offer.title;\n const blockSubTitle = this.isBankOffer ? (this.isMultipleBank ? this.multipleBankOfferTitleDescription : null) : offer.description;\n\n const titles = {\n 'block-title': blockTitle,\n 'block-subTitle': blockSubTitle,\n 'show-controls': this.isMultipleBank\n };\n\n return (\n <div class=\"s-offer-wrapper\" onClick={() => this.emitPromotionClicked()}>\n {<p class=\"s-offer-corner-badge\">{this.special_offer_text}</p>}\n {/* discounts table is not a slider, it's a table🤔 */}\n {/* single bank offer is not a slider, it's a dom without slider🤔 */}\n <salla-slider type=\"carousel\" id=\"offer-slider\" {...titles}>\n <div slot='items'>\n {this.renderSectionForOfferType(offer.type)}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n private renderSectionForOfferType(offerType: OfferType | string) {\n if (this.isBankOffer) {\n return this.renderBankSection();\n }\n if (offerType == OfferType.SpecialPrice) {\n return this.renderSpecialPriceSection();\n }\n if (offerType == OfferType.BuyXGetY) {\n return this.renderBuyXGetYSection();\n }\n\n return this.renderDiscountTableSection();\n }\n\n /**\n * Generates content for the categories section.\n *\n * @param offeredCategories - An array of Category objects.\n * @returns An array of HTML elements representing categories.\n */\n private getCategoriesSection(category: Category) {\n return <div class=\"s-offer-slide-one-sixth swiper-slide\" innerHTML={this.categorySlot\n .replace(/\\{url\\}/g, category.url)\n .replace(/\\{icon\\}/g, category.icon || \"sicon-store\")\n .replace(/\\{name\\}/g, category.name)}></div>\n }\n\n private renderBuyXGetYSection() {\n const details = (this.offersList[0].details as BuyXGetYDetail)\n return [\n details.get.products?.map((product: Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n details.get.categories?.map((category: Category) => this.getCategoriesSection(category))\n ];\n }\n\n /**\n * Generates content for the bank section.\n *\n * @param offeredBank - An array of Bank objects.\n * @param name - The title of the current offer.\n * @param description - The description of the current offer.\n * @returns An array of HTML elements representing banks.\n *\n * TODO: loop over the list and filter bank types and pass it to this function\n */\n private renderBankSection() {\n return this.offersList.map((bankOffer: Offer) => {\n return <div class={{ \"s-offer-slide-one-sixth\": this.isMultipleBank, \"s-offer-bank-wrapper-sinlge-item\": !this.isMultipleBank }}>\n <div class={{ \"s-offer-bank-wrapper\": true, \"s-offer-slide-one-sixth\": !this.isMultipleBank, \"s-offer-bank-wrapper-multi-spacer\": this.isMultipleBank }}>\n <div class=\"s-offer-bank-logo\">\n <img src={(bankOffer.details as BankOffer).logo || salla.url.cdn('images/s-empty.png')} data-src={(bankOffer.details as BankOffer).logo} alt={bankOffer.title + \" offer\"} />\n </div>\n <ul class=\"s-offer-bank-payment-wrapper\">\n {(bankOffer.details as BankOffer).payments.map((payment: string) => {\n return <li class=\"s-offer-bank-payment-single\">\n <img\n src={salla.url.cdn('images/payment/' + payment + '.png') || salla.url.cdn('images/s-empty.png')}\n data-src={salla.url.cdn('images/payment/' + payment + '.png')}\n alt=\"payment\" />\n </li>\n })}\n </ul>\n {this.isMultipleBank ?\n <p class=\"s-offer-bank-payment-discount-percent\">\n {`${this.product_discount_text} ${(bankOffer.details as BankOffer).discount_value}${(bankOffer.details as BankOffer).discount_type === \"percentage\" && '%'}`}\n </p>\n : \"\"}\n </div>\n {!this.isMultipleBank ?\n <div class=\"s-offer-bank-message s-offer-slide-one-fourth\">\n <h2>{this.offersList[0].title}</h2>\n <p innerHTML={this.generateBankDescription(this.offersList[0].description, (bankOffer.details as BankOffer).discount_value)}></p>\n </div>\n : \"\"}\n </div>\n })\n }\n\n private generateBankDescription(desc: string, value): string {\n return desc.replace(new RegExp(`${value} %`), `<span class=\"s-offer-bank-message-amount\">${value} %</span>`)\n }\n\n /**\n * Generates content for the discount table section.\n *\n * @param discountTable - An array of Discount objects.\n * @returns An array of HTML elements representing discounts_table.\n */\n private renderDiscountTableSection() {\n const offer: Offer = this.offersList[0];\n let show_discounted_price = (offer.details as DiscountDetailTable).show_price_after_discount;\n return (this.offersList[0].details as DiscountDetailTable).discounts?.map((discount: Discount) => <div class=\"s-offer-slide-one-fourth\">\n <div class=\"s-offer-slide-offer-entry\">\n <div class=\"s-offer-slide-offer-entry-price-quantity-container\">\n <p class=\"s-offer-slide-offer-entry-quantity\">{this.buy_quantity_text(discount.quantity)}</p>\n {show_discounted_price ?\n <div class=\"s-offer-slide-offer-entry-price\">\n <span>{this.offer_with_price_text}</span>\n <span class=\"s-offer-slide-offer-entry-price-amount\">{discount.discounted_amount}</span> <span>{this.userCurrency}</span>\n </div> : \"\"}\n </div>\n <p class=\"s-offer-slide-offer-entry-price-amount-percent\">{this.with_discount_text}\n (<span>{discount.percentage}{!!discount.percentage && '%'}</span>)</p>\n </div>\n </div>\n )\n }\n\n private renderSpecialPriceSection() {\n const details = this.offersList[0].details as SpecialPriceDetail;\n\n return [\n // Render products if `apply_to` is \"product\"\n details.apply_to === \"product\" &&\n details.products?.map((product:Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n\n // Render categories if `apply_to` is \"category\"\n details.apply_to === \"category\" &&\n details.categories?.map((category: Category) => this.getCategoriesSection(category)),\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;YAAA,IAAY,QAGX;YAHD,CAAA,UAAY,QAAQ,EAAA;YAClB,IAAA,QAAA,CAAA,eAAA,CAAA,GAAA,gBAAgC;YAChC,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;YACf,CAAC,EAHW,QAAQ,KAAR,QAAQ,GAGnB,EAAA,CAAA,CAAA;YAED,IAAY,SAOX;YAPD,CAAA,UAAY,SAAS,EAAA;YACnB,IAAA,SAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;YAC3B,IAAA,SAAA,CAAA,mBAAA,CAAA,GAAA,OAA2B;YAC3B,IAAA,SAAA,CAAA,gBAAA,CAAA,GAAA,iBAAkC;YAClC,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;YACb,IAAA,SAAA,CAAA,UAAA,CAAA,GAAA,aAAwB;YACxB,IAAA,SAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;YAChC,CAAC,EAPW,SAAS,KAAT,SAAS,GAOpB,EAAA,CAAA,CAAA;;YCZD,MAAM,aAAa,GAAG,khBAAkhB;;kBCmB3hB,UAAU,0BAAA,MAAA;YAErB,IAAA,WAAA,CAAA,OAAA,EAAA;;;YAoBA;;;;;;;;YAQG;YAC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