@salla.sa/twilight-components 2.14.221 → 2.14.222

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 (315) hide show
  1. package/dist/cjs/{app-globals-CURclN4K.js → app-globals-DPedpk8u.js} +3 -3
  2. package/dist/cjs/{app-globals-CURclN4K.js.map → app-globals-DPedpk8u.js.map} +1 -1
  3. package/dist/cjs/{index-1TYwVkJb.js → index-BDn6fH9S.js} +4 -4
  4. package/dist/cjs/{index-1TYwVkJb.js.map → index-BDn6fH9S.js.map} +1 -1
  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 +16 -5
  16. package/dist/cjs/salla-conditional-offer.cjs.entry.js.map +1 -1
  17. package/dist/cjs/salla-conditional-offer.entry.cjs.js.map +1 -1
  18. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  41. package/dist/cjs/twilight.cjs.js +2 -2
  42. package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js +15 -4
  43. package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js.map +1 -1
  44. package/dist/components/index.js +2 -2
  45. package/dist/components/index.js.map +1 -1
  46. package/dist/components/salla-conditional-offer.js +15 -4
  47. package/dist/components/salla-conditional-offer.js.map +1 -1
  48. package/dist/esm/{app-globals-CIvCwBrC.js → app-globals-wLakfxcp.js} +3 -3
  49. package/dist/esm/{app-globals-CIvCwBrC.js.map → app-globals-wLakfxcp.js.map} +1 -1
  50. package/dist/esm/{index-DJeJWTdD.js → index-Dj2SrCy0.js} +4 -4
  51. package/dist/esm/{index-DJeJWTdD.js.map → index-Dj2SrCy0.js.map} +1 -1
  52. package/dist/esm/loader.js +3 -3
  53. package/dist/esm/salla-accordion-body.entry.js +1 -1
  54. package/dist/esm/salla-accordion-head.entry.js +1 -1
  55. package/dist/esm/salla-accordion.entry.js +1 -1
  56. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  57. package/dist/esm/salla-advertisement.entry.js +1 -1
  58. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  59. package/dist/esm/salla-apps-icons.entry.js +1 -1
  60. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  61. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  62. package/dist/esm/salla-conditional-offer.entry.js +16 -5
  63. package/dist/esm/salla-conditional-offer.entry.js.map +1 -1
  64. package/dist/esm/salla-contacts.entry.js +1 -1
  65. package/dist/esm/salla-filters-widget.entry.js +1 -1
  66. package/dist/esm/salla-filters.entry.js +1 -1
  67. package/dist/esm/salla-installment.entry.js +1 -1
  68. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  69. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  70. package/dist/esm/salla-metadata.entry.js +1 -1
  71. package/dist/esm/salla-notification-item.entry.js +1 -1
  72. package/dist/esm/salla-notifications.entry.js +1 -1
  73. package/dist/esm/salla-offer.entry.js +1 -1
  74. package/dist/esm/salla-order-summary.entry.js +1 -1
  75. package/dist/esm/salla-orders.entry.js +1 -1
  76. package/dist/esm/salla-payments.entry.js +1 -1
  77. package/dist/esm/salla-price-range.entry.js +1 -1
  78. package/dist/esm/salla-product-options.entry.js +1 -1
  79. package/dist/esm/salla-review-card.entry.js +1 -1
  80. package/dist/esm/salla-reviews-page.entry.js +1 -1
  81. package/dist/esm/salla-reviews.entry.js +1 -1
  82. package/dist/esm/salla-social.entry.js +1 -1
  83. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  84. package/dist/esm/salla-tooltip.entry.js +1 -1
  85. package/dist/esm/salla-verify.entry.js +1 -1
  86. package/dist/esm/salla-wallet.entry.js +1 -1
  87. package/dist/esm/twilight.js +3 -3
  88. package/dist/esm-es5/{app-globals-CIvCwBrC.js → app-globals-wLakfxcp.js} +2 -2
  89. package/dist/esm-es5/{app-globals-CIvCwBrC.js.map → app-globals-wLakfxcp.js.map} +1 -1
  90. package/dist/esm-es5/{index-DJeJWTdD.js → index-Dj2SrCy0.js} +3 -3
  91. package/dist/esm-es5/{index-DJeJWTdD.js.map → index-Dj2SrCy0.js.map} +1 -1
  92. package/dist/esm-es5/loader.js +1 -1
  93. package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
  94. package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
  95. package/dist/esm-es5/salla-accordion.entry.js +1 -1
  96. package/dist/esm-es5/salla-add-product-button_51.entry.js +4 -4
  97. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  98. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  99. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  100. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  101. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  102. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  103. package/dist/esm-es5/salla-conditional-offer.entry.js.map +1 -1
  104. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  105. package/dist/esm-es5/salla-filters-widget.entry.js +2 -2
  106. package/dist/esm-es5/salla-filters.entry.js +1 -1
  107. package/dist/esm-es5/salla-installment.entry.js +1 -1
  108. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  109. package/dist/esm-es5/salla-loyalty-program.entry.js +2 -2
  110. package/dist/esm-es5/salla-metadata.entry.js +1 -1
  111. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  112. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  113. package/dist/esm-es5/salla-offer.entry.js +1 -1
  114. package/dist/esm-es5/salla-order-summary.entry.js +1 -1
  115. package/dist/esm-es5/salla-orders.entry.js +2 -2
  116. package/dist/esm-es5/salla-payments.entry.js +1 -1
  117. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  118. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  119. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  120. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  121. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  122. package/dist/esm-es5/salla-social.entry.js +1 -1
  123. package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
  124. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  125. package/dist/esm-es5/salla-verify.entry.js +1 -1
  126. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  127. package/dist/esm-es5/twilight.js +1 -1
  128. package/dist/twilight/{p-4719adfd.entry.js → p-00ce3e65.entry.js} +2 -2
  129. package/dist/twilight/{p-60550d95.system.entry.js → p-02cc2225.system.entry.js} +2 -2
  130. package/dist/twilight/{p-8d241400.system.entry.js → p-0b16f452.system.entry.js} +2 -2
  131. package/dist/twilight/{p-d0db93be.entry.js → p-109136fc.entry.js} +2 -2
  132. package/dist/twilight/{p-eb847afb.system.entry.js → p-12adb702.system.entry.js} +2 -2
  133. package/dist/twilight/{p-2ecd9c73.entry.js → p-16dfee33.entry.js} +2 -2
  134. package/dist/twilight/{p-018db6d5.entry.js → p-18537486.entry.js} +2 -2
  135. package/dist/twilight/{p-96c0dbe6.system.entry.js → p-1cbc4329.system.entry.js} +2 -2
  136. package/dist/twilight/{p-2e1838fc.entry.js → p-1cf1344e.entry.js} +2 -2
  137. package/dist/twilight/{p-1c1baf96.system.entry.js → p-1d6100c4.system.entry.js} +2 -2
  138. package/dist/twilight/{p-2411b6cb.system.entry.js → p-29567106.system.entry.js} +2 -2
  139. package/dist/twilight/{p-fd20f996.entry.js → p-315c5fd3.entry.js} +2 -2
  140. package/dist/twilight/{p-5a3e638f.entry.js → p-337fca82.entry.js} +2 -2
  141. package/dist/twilight/{p-611a0591.system.entry.js → p-3b02f780.system.entry.js} +2 -2
  142. package/dist/twilight/{p-D4Rc_kre.js → p-4drPVtGP.js} +2 -2
  143. package/dist/twilight/{p-D4Rc_kre.js.map → p-4drPVtGP.js.map} +1 -1
  144. package/dist/twilight/{p-594c82e8.entry.js → p-5394cdeb.entry.js} +2 -2
  145. package/dist/twilight/{p-a8541cb2.system.entry.js → p-55306475.system.entry.js} +2 -2
  146. package/dist/twilight/{p-cba454b7.entry.js → p-59763129.entry.js} +2 -2
  147. package/dist/twilight/{p-bec1f4a2.system.entry.js → p-5cd7ff6d.system.entry.js} +2 -2
  148. package/dist/twilight/{p-bdef02e0.entry.js → p-5e1f0ddf.entry.js} +2 -2
  149. package/dist/twilight/p-618eb3f2.system.entry.js +5 -0
  150. package/dist/twilight/p-618eb3f2.system.entry.js.map +1 -0
  151. package/dist/twilight/{p-f5364a4e.entry.js → p-67b54ac4.entry.js} +2 -2
  152. package/dist/twilight/p-67ebf87e.system.entry.js +5 -0
  153. package/dist/twilight/{p-e9e4a641.entry.js → p-688dd765.entry.js} +7 -7
  154. package/dist/twilight/{p-e45781c5.system.entry.js → p-6ec767ac.system.entry.js} +3 -3
  155. package/dist/twilight/{p-0bd54dae.entry.js → p-70e74f3c.entry.js} +2 -2
  156. package/dist/twilight/{p-01ab98b8.system.entry.js → p-7236a037.system.entry.js} +2 -2
  157. package/dist/twilight/{p-0213d2ff.system.entry.js → p-7436f972.system.entry.js} +2 -2
  158. package/dist/twilight/{p-a52f5483.entry.js → p-74647582.entry.js} +2 -2
  159. package/dist/twilight/{p-DJO9K4n7.system.js.map → p-78vq_YNh.system.js.map} +1 -1
  160. package/dist/twilight/{p-8f504c22.entry.js → p-8162a820.entry.js} +2 -2
  161. package/dist/twilight/p-864f1430.system.entry.js +5 -0
  162. package/dist/twilight/{p-137b9ced.system.entry.js → p-865fc401.system.entry.js} +2 -2
  163. package/dist/twilight/{p-2943fae2.system.entry.js → p-87206bd7.system.entry.js} +2 -2
  164. package/dist/twilight/p-8c08dafb.entry.js +5 -0
  165. package/dist/twilight/{p-a4376ad7.system.entry.js → p-8ce2a142.system.entry.js} +2 -2
  166. package/dist/twilight/{p-ab9a81e5.system.entry.js → p-8d28bf6e.system.entry.js} +2 -2
  167. package/dist/twilight/{p-8b0b63d3.system.entry.js → p-97337c52.system.entry.js} +2 -2
  168. package/dist/twilight/{p-ddfc02db.entry.js → p-9e54e404.entry.js} +2 -2
  169. package/dist/twilight/{p-BQW3a64v.system.js.map → p-B-EmhPha.system.js.map} +1 -1
  170. package/dist/twilight/{p-Vh3TFQnV.system.js.map → p-B6apPCKk.system.js.map} +1 -1
  171. package/dist/twilight/{p-CW5Y_Ilm.system.js.map → p-BC5TR2o4.system.js.map} +1 -1
  172. package/dist/twilight/{p-DanADfyI.system.js.map → p-BFLzwSRe.system.js.map} +1 -1
  173. package/dist/twilight/{p-B78CJAeo.system.js.map → p-BIlNLy1w.system.js.map} +1 -1
  174. package/dist/twilight/{p-rHIfLORZ.system.js.map → p-B_H7JnAQ.system.js.map} +1 -1
  175. package/dist/twilight/{p-CS3lHUTW.system.js.map → p-BfizdcIv.system.js.map} +1 -1
  176. package/dist/twilight/{p-BbGRMLwX.system.js.map → p-BgVK0PPB.system.js.map} +1 -1
  177. package/dist/twilight/{p-Dtkyz9uf.system.js → p-BtfcvLWi.system.js} +2 -2
  178. package/dist/twilight/{p-Dtkyz9uf.system.js.map → p-BtfcvLWi.system.js.map} +1 -1
  179. package/dist/twilight/{p-Cv-fXCMq.system.js.map → p-BxPxFmIf.system.js.map} +1 -1
  180. package/dist/twilight/{p-BEAZDb3Z.system.js.map → p-C6Mc-nga.system.js.map} +1 -1
  181. package/dist/twilight/{p-D8gfPwyY.system.js.map → p-CAhB5SXO.system.js.map} +1 -1
  182. package/dist/twilight/{p-BmpTR30a.system.js.map → p-CD5EBKFr.system.js.map} +1 -1
  183. package/dist/twilight/{p-D_GDndNn.system.js.map → p-CDPN9ikP.system.js.map} +1 -1
  184. package/dist/twilight/{p-urL630v4.system.js.map → p-CE_xhQMS.system.js.map} +1 -1
  185. package/dist/twilight/{p-3_GHqNLe.system.js.map → p-CIzZIur3.system.js.map} +1 -1
  186. package/dist/twilight/{p-t_BLXxaT.system.js → p-CaVNqQXu.system.js} +2 -2
  187. package/dist/twilight/{p-t_BLXxaT.system.js.map → p-CaVNqQXu.system.js.map} +1 -1
  188. package/dist/twilight/{p-CW_Wih48.system.js.map → p-CfNLozg0.system.js.map} +1 -1
  189. package/dist/twilight/{p-BYmyEppC.system.js.map → p-ClaSC-3N.system.js.map} +1 -1
  190. package/dist/twilight/{p-eyvPNcBM.system.js.map → p-Cm8GjH45.system.js.map} +1 -1
  191. package/dist/twilight/{p-DuXM8liP.system.js.map → p-CpJOChwF.system.js.map} +1 -1
  192. package/dist/twilight/{p-DYXzVtwh.system.js.map → p-CsweHiBJ.system.js.map} +1 -1
  193. package/dist/twilight/{p-dKVQW-4Z.system.js.map → p-CtiUKful.system.js.map} +1 -1
  194. package/dist/twilight/{p-C1YpO4ps.system.js.map → p-D0vXKNzE.system.js.map} +1 -1
  195. package/dist/twilight/{p-BiWj3BdY.system.js.map → p-D6fGvShW.system.js.map} +1 -1
  196. package/dist/twilight/{p-DDxbK6va.system.js.map → p-DInbMpRZ.system.js.map} +1 -1
  197. package/dist/twilight/{p-DlFxCb4V.system.js.map → p-DRUO4ntA.system.js.map} +1 -1
  198. package/dist/twilight/{p-DJeJWTdD.js → p-Dj2SrCy0.js} +3 -3
  199. package/dist/twilight/{p-DJeJWTdD.js.map → p-Dj2SrCy0.js.map} +1 -1
  200. package/dist/twilight/{p-1xnr2J3b.system.js → p-DvJ_tnSw.system.js} +3 -3
  201. package/dist/twilight/{p-1xnr2J3b.system.js.map → p-DvJ_tnSw.system.js.map} +1 -1
  202. package/dist/twilight/{p-BwBcvX6V.system.js.map → p-DvQIv_6Y.system.js.map} +1 -1
  203. package/dist/twilight/{p-3iOHI_bZ.system.js.map → p-Dx2JzDoP.system.js.map} +1 -1
  204. package/dist/twilight/{p-B0iUa0dk.system.js.map → p-Dzal8dOY.system.js.map} +1 -1
  205. package/dist/twilight/p-FGWU4ai_.system.js.map +1 -0
  206. package/dist/twilight/{p-DvaxAP4E.system.js.map → p-LondrlGD.system.js.map} +1 -1
  207. package/dist/twilight/{p-DF0wZDI-.system.js.map → p-Q2yReOd3.system.js.map} +1 -1
  208. package/dist/twilight/{p-V-F3jS9L.system.js.map → p-WlDhq-4G.system.js.map} +1 -1
  209. package/dist/twilight/{p-1bc7d70c.system.entry.js → p-a20b6984.system.entry.js} +2 -2
  210. package/dist/twilight/{p-fe4d5abb.system.entry.js → p-a439d5c1.system.entry.js} +2 -2
  211. package/dist/twilight/{p-9c6d592b.entry.js → p-a531e0e4.entry.js} +2 -2
  212. package/dist/twilight/{p-e09dbe92.system.entry.js → p-acaa2f80.system.entry.js} +2 -2
  213. package/dist/twilight/{p-e490de2f.system.entry.js → p-ae7962ba.system.entry.js} +2 -2
  214. package/dist/twilight/{p-14bce2e7.system.entry.js → p-b167e712.system.entry.js} +2 -2
  215. package/dist/twilight/{p-84aaa78d.entry.js → p-b42c8720.entry.js} +2 -2
  216. package/dist/twilight/{p-65f8266c.system.entry.js → p-b477f55b.system.entry.js} +2 -2
  217. package/dist/twilight/{p-f26aa117.entry.js → p-bc918d89.entry.js} +2 -2
  218. package/dist/twilight/{p-8d171391.entry.js → p-c3adc5d9.entry.js} +2 -2
  219. package/dist/twilight/{p-f6e14858.system.entry.js → p-c842f73f.system.entry.js} +2 -2
  220. package/dist/twilight/{p-125e8e09.system.entry.js → p-c8cea269.system.entry.js} +2 -2
  221. package/dist/twilight/{p-7dc53e3e.entry.js → p-d37bad6f.entry.js} +2 -2
  222. package/dist/twilight/{p-62372bb6.entry.js → p-d85581c6.entry.js} +2 -2
  223. package/dist/twilight/{p-5222370a.system.entry.js → p-d8d9cdcd.system.entry.js} +2 -2
  224. package/dist/twilight/{p-d78f9304.system.entry.js → p-de891990.system.entry.js} +2 -2
  225. package/dist/twilight/{p-11542446.entry.js → p-def552bd.entry.js} +2 -2
  226. package/dist/twilight/{p-c62d7968.system.entry.js → p-e4f73083.system.entry.js} +2 -2
  227. package/dist/twilight/{p-aae55c3c.entry.js → p-e5872e75.entry.js} +2 -2
  228. package/dist/twilight/{p-b734e69f.entry.js → p-ed4c7158.entry.js} +2 -2
  229. package/dist/twilight/{p-df86fa35.entry.js → p-ee443b00.entry.js} +2 -2
  230. package/dist/twilight/{p-64346d4f.system.entry.js → p-f1f3d74e.system.entry.js} +2 -2
  231. package/dist/twilight/{p-345e7510.entry.js → p-f3b8551c.entry.js} +2 -2
  232. package/dist/twilight/{p-1e32544e.entry.js → p-f41e7eed.entry.js} +2 -2
  233. package/dist/twilight/{p-5f22ded8.entry.js → p-f4918259.entry.js} +2 -2
  234. package/dist/twilight/p-f594b721.entry.js +5 -0
  235. package/dist/twilight/p-f594b721.entry.js.map +1 -0
  236. package/dist/twilight/{p-f8f0dd3d.entry.js → p-f9d8f20d.entry.js} +2 -2
  237. package/dist/twilight/{p-b311d422.entry.js → p-fb59e3b5.entry.js} +2 -2
  238. package/dist/twilight/{p-8b9cdaa8.system.entry.js → p-ffb9ab7b.system.entry.js} +2 -2
  239. package/dist/twilight/{p-Cny8cSf0.system.js.map → p-jlCh1xBh.system.js.map} +1 -1
  240. package/dist/twilight/salla-conditional-offer.entry.esm.js.map +1 -1
  241. package/dist/twilight/twilight.esm.js +1 -1
  242. package/dist/twilight/twilight.js +1 -1
  243. package/package.json +5 -5
  244. package/dist/twilight/p-0530fecd.entry.js +0 -5
  245. package/dist/twilight/p-0a564fe6.system.entry.js +0 -5
  246. package/dist/twilight/p-0a564fe6.system.entry.js.map +0 -1
  247. package/dist/twilight/p-1196a23a.entry.js +0 -5
  248. package/dist/twilight/p-1196a23a.entry.js.map +0 -1
  249. package/dist/twilight/p-512dbfd8.system.entry.js +0 -5
  250. package/dist/twilight/p-56329c93.system.entry.js +0 -5
  251. package/dist/twilight/p-DygvAhI4.system.js.map +0 -1
  252. /package/dist/twilight/{p-4719adfd.entry.js.map → p-00ce3e65.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-60550d95.system.entry.js.map → p-02cc2225.system.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-8d241400.system.entry.js.map → p-0b16f452.system.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-d0db93be.entry.js.map → p-109136fc.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-eb847afb.system.entry.js.map → p-12adb702.system.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-2ecd9c73.entry.js.map → p-16dfee33.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-018db6d5.entry.js.map → p-18537486.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-96c0dbe6.system.entry.js.map → p-1cbc4329.system.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-2e1838fc.entry.js.map → p-1cf1344e.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-1c1baf96.system.entry.js.map → p-1d6100c4.system.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-2411b6cb.system.entry.js.map → p-29567106.system.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-fd20f996.entry.js.map → p-315c5fd3.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-5a3e638f.entry.js.map → p-337fca82.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-611a0591.system.entry.js.map → p-3b02f780.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-594c82e8.entry.js.map → p-5394cdeb.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-a8541cb2.system.entry.js.map → p-55306475.system.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-cba454b7.entry.js.map → p-59763129.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-bec1f4a2.system.entry.js.map → p-5cd7ff6d.system.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-bdef02e0.entry.js.map → p-5e1f0ddf.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-f5364a4e.entry.js.map → p-67b54ac4.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-56329c93.system.entry.js.map → p-67ebf87e.system.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-e9e4a641.entry.js.map → p-688dd765.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-e45781c5.system.entry.js.map → p-6ec767ac.system.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-0bd54dae.entry.js.map → p-70e74f3c.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-01ab98b8.system.entry.js.map → p-7236a037.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-0213d2ff.system.entry.js.map → p-7436f972.system.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-a52f5483.entry.js.map → p-74647582.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-8f504c22.entry.js.map → p-8162a820.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-512dbfd8.system.entry.js.map → p-864f1430.system.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-137b9ced.system.entry.js.map → p-865fc401.system.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-2943fae2.system.entry.js.map → p-87206bd7.system.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-0530fecd.entry.js.map → p-8c08dafb.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-a4376ad7.system.entry.js.map → p-8ce2a142.system.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-ab9a81e5.system.entry.js.map → p-8d28bf6e.system.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-8b0b63d3.system.entry.js.map → p-97337c52.system.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-ddfc02db.entry.js.map → p-9e54e404.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-1bc7d70c.system.entry.js.map → p-a20b6984.system.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-fe4d5abb.system.entry.js.map → p-a439d5c1.system.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-9c6d592b.entry.js.map → p-a531e0e4.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-e09dbe92.system.entry.js.map → p-acaa2f80.system.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-e490de2f.system.entry.js.map → p-ae7962ba.system.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-14bce2e7.system.entry.js.map → p-b167e712.system.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-84aaa78d.entry.js.map → p-b42c8720.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-65f8266c.system.entry.js.map → p-b477f55b.system.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-f26aa117.entry.js.map → p-bc918d89.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-8d171391.entry.js.map → p-c3adc5d9.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-f6e14858.system.entry.js.map → p-c842f73f.system.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-125e8e09.system.entry.js.map → p-c8cea269.system.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-7dc53e3e.entry.js.map → p-d37bad6f.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-62372bb6.entry.js.map → p-d85581c6.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-5222370a.system.entry.js.map → p-d8d9cdcd.system.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-d78f9304.system.entry.js.map → p-de891990.system.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-11542446.entry.js.map → p-def552bd.entry.js.map} +0 -0
  305. /package/dist/twilight/{p-c62d7968.system.entry.js.map → p-e4f73083.system.entry.js.map} +0 -0
  306. /package/dist/twilight/{p-aae55c3c.entry.js.map → p-e5872e75.entry.js.map} +0 -0
  307. /package/dist/twilight/{p-b734e69f.entry.js.map → p-ed4c7158.entry.js.map} +0 -0
  308. /package/dist/twilight/{p-df86fa35.entry.js.map → p-ee443b00.entry.js.map} +0 -0
  309. /package/dist/twilight/{p-64346d4f.system.entry.js.map → p-f1f3d74e.system.entry.js.map} +0 -0
  310. /package/dist/twilight/{p-345e7510.entry.js.map → p-f3b8551c.entry.js.map} +0 -0
  311. /package/dist/twilight/{p-1e32544e.entry.js.map → p-f41e7eed.entry.js.map} +0 -0
  312. /package/dist/twilight/{p-5f22ded8.entry.js.map → p-f4918259.entry.js.map} +0 -0
  313. /package/dist/twilight/{p-f8f0dd3d.entry.js.map → p-f9d8f20d.entry.js.map} +0 -0
  314. /package/dist/twilight/{p-b311d422.entry.js.map → p-fb59e3b5.entry.js.map} +0 -0
  315. /package/dist/twilight/{p-8b9cdaa8.system.entry.js.map → p-ffb9ab7b.system.entry.js.map} +0 -0
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ System.register(["./p-DvJ_tnSw.system.js"],(function(n){"use strict";var i,t,e;return{setters:[function(n){i=n.r;t=n.h;e=n.H}],execute:function(){var r;(function(n){n["PERCENTAGE"]="percentage";n["FIXED"]="fixed";n["FREE_PRODUCT"]="free_product"})(r||(r={}));var o;(function(n){n["PRODUCT_COUNT"]="products_count";n["PRODUCT_PURCHASE"]="order_amount"})(o||(o={}));var a=":host{display:block}";var s=n("salla_conditional_offer",function(){function n(n){i(this,n);this.offer=null;this.products={};this.isLoading=false;this.canRender=true}n.prototype.componentWillLoad=function(){var n=this;salla.onReady().then((function(){var n,i,t;if(!((n=salla.config.get("store.features"))===null||n===void 0?void 0:n.includes("conditional-offer"))||salla.storage.get("cart")!==""&&!((t=(i=salla.storage.get("cart"))===null||i===void 0?void 0:i.summary)===null||t===void 0?void 0:t.count)){throw new Error("feature or cart object does not existed")}})).then((function(){return salla.api.cart.offers()})).then((function(i){var t=i.data;n.offer=t.find((function(n){return n.type==="conditional"}));if(!n.offer){n.canRender=false;return}n.isLoading=true;n.offer.details.discounts.unshift({value:0,min_spend:0});return n.updateInitialOfferValue()})).then((function(){if(!n.offer)return;return n.getProducts()})).then((function(){if(!n.offer)return;salla.event.on("cart::updated",(function(i){return n.updateOfferValues(i)}))})).catch((function(i){n.canRender=false;salla.logger.warn("salla-conditional-offer:: ",i)})).finally((function(){n.isLoading=false}))};n.prototype.getProducts=function(){var n=this;var i=this.offer.details.discounts.filter((function(n){var i=n.type;return i===r.FREE_PRODUCT})).map((function(n){var i=n.value;return i}));if(i.length>0){return salla.product.fetch({source:"selected",source_value:i}).then((function(i){var t=i.data;t.forEach((function(i){var t=i.id,e=i.url,r=i.image;n.products[t]={url:e,image:r}}))}))}};n.prototype.updateInitialOfferValue=function(){var n=this;return salla.api.cart.details().then((function(i){var t=i.data.cart;return n.updateOfferValues(t)}))};n.prototype.updateOfferValues=function(n){var i=n.items,t=n.sub_total;var e;var r=this.offer.details.based_on===o.PRODUCT_COUNT?i.reduce((function(n,i){var t=i.quantity;return n+t}),0):t;this.offer=Object.assign(Object.assign({},this.offer),{details:Object.assign(Object.assign({},(e=this.offer)===null||e===void 0?void 0:e.details),{current_value:r})});return this.offer};n.prototype.getCheckpointContent=function(n){var i,e;if(n.type===r.PERCENTAGE)return"".concat(n.value,"%");if(n.type===r.FIXED)return salla.money(n.value);if(n.type!==r.FREE_PRODUCT){salla.logger.error("salla-conditional-offer:: unexpected type (".concat(n.type,")!"));return""}var o=this.products[n.value];if(!o){salla.logger.error("salla-conditional-offer:: there is no product with id (".concat(n.value,")!"));return""}return t("a",{class:"s-conditional-offer-product-link",href:o.url},t("img",{class:"s-conditional-offer-checkpoint-image-content",loading:"lazy",decoding:"async",alt:((i=o===null||o===void 0?void 0:o.image)===null||i===void 0?void 0:i.alt)||"",src:(e=o===null||o===void 0?void 0:o.image)===null||e===void 0?void 0:e.url}))};n.prototype.getOfferType=function(n){var i;var t=(i=this.offer.details)===null||i===void 0?void 0:i.based_on;if(t===o.PRODUCT_COUNT)return salla.lang.choice("blocks.header.products_count",n.min_spend);if(t===o.PRODUCT_PURCHASE)return salla.money(n.min_spend);salla.logger.warn("salla-conditional-offer:: Unexpected offer detail's based_on value: ".concat(t));return"".concat(n.min_spend)};n.prototype.clamp=function(n,i,t){return Math.max(i,Math.min(n,t))};n.prototype.mapValueRanges=function(n,i,t,e,r){var o=(n-i)*(r-e)/(t-i)+e;if(o===Number.POSITIVE_INFINITY)return 100;if(o===Number.NEGATIVE_INFINITY)return 0;return this.clamp(o,0,100)};n.prototype.getCheckPointView=function(n,i){var e,r;var o=this.offer.details.discounts.findIndex((function(i){var t=i.min_spend;return t===n.min_spend}));var a=(r=(e=this.offer.details.discounts[o-1])===null||e===void 0?void 0:e.min_spend)!==null&&r!==void 0?r:0;var s=this.mapValueRanges(this.offer.details.current_value,a,n.min_spend,0,100);var l=n.min_spend<=this.offer.details.current_value;return t("div",{class:"s-conditional-offer-checkpoint-container"},i>0?[t("div",{key:"progress-line",class:"s-conditional-offer-progress-line-container"},t("div",{class:"s-conditional-offer-progress-line-inactive"}),t("div",{class:"s-conditional-offer-progress-line-active",style:{width:"".concat(s,"%")}})),t("div",{key:"checkpoint",class:"s-conditional-offer-checkpoint ".concat(l?"s-conditional-offer-active-checkpoint":"")},t("div",{class:"s-conditional-offer-item-avatar-content ".concat(l?"active":""),innerHTML:this.products&&this.getCheckpointContent(n)}),t("div",{class:"s-conditional-offer-checkpoint-label ".concat(l?"active":""),innerHTML:this.getOfferType(n)}))]:t("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":true,"first-checkpoint":i===0,active:l},innerHTML:this.getOfferType(n)}))};n.prototype.getLoadingSkeletonView=function(){return t(e,{class:"s-conditional-offer-container"},t("div",{class:"s-conditional-offer-skeleton-inner-container"},t("div",{class:"s-conditional-offer-skeleton-subtitle"},t("salla-skeleton",{height:"16px",width:"30%"})),t("div",{class:"s-conditional-offer-skeleton-subtitle"},t("salla-skeleton",{height:"16px",width:"35%"})),t("div",{class:"s-conditional-offer-skeleton-checkpoints-wrapper"},Array(3).fill(null).map((function(){return[t("salla-skeleton",{key:"checkpoint-line",height:"8px"}),t("div",{key:"checkpoint"},t("salla-skeleton",{height:"60px",width:"60px",type:"circle"}))]})))))};n.prototype.render=function(){var n=this;if(!this.canRender)return null;if(this.isLoading)return this.getLoadingSkeletonView();if(!this.offer)return null;return t(e,{class:"s-conditional-offer-container"},t("div",{class:"s-conditional-offer-title-wrapper"},t("div",{class:"s-conditional-offer-title"},this.offer.title),this.offer.description?t("div",{class:"s-conditional-offer-subtitle"},this.offer.description," ",t("i",{class:"sicon-information"})):null),t("div",{class:"s-conditional-offer-progress-container"},this.offer.details.discounts.map((function(i,e){return t("div",{class:{"flex-1":e>0},key:i.min_spend},n.getCheckPointView(i,e))}))))};return n}());s.style=a}}}));
5
+ //# sourceMappingURL=p-618eb3f2.system.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DiscountType","OfferType","sallaConditionalOfferCss","SallaConditionalOffer","exports","class_1","hostRef","this","offer","products","isLoading","canRender","prototype","componentWillLoad","_this","salla","onReady","then","_a","config","get","includes","storage","_c","_b","summary","count","Error","api","cart","offers","_d","data","find","type","details","discounts","unshift","value","min_spend","updateInitialOfferValue","getProducts","event","on","updatedCart","updateOfferValues","catch","error","logger","warn","finally","freeProductIDs","filter","FREE_PRODUCT","map","length","product","fetch","source","source_value","forEach","id","url","image","items","sub_total","current_value","based_on","PRODUCT_COUNT","reduce","quantity","Object","assign","getCheckpointContent","discount","PERCENTAGE","concat","FIXED","money","productItem","h","class","href","loading","decoding","alt","src","getOfferType","basedOn","lang","choice","PRODUCT_PURCHASE","clamp","min","max","Math","mapValueRanges","initialMinRange","initialMaxRange","newMinRange","newMaxRange","newRange","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","getCheckPointView","index","checkpointIndex","findIndex","previousCheckpointValue","progressPercentage","isActive","key","style","width","innerHTML","active","getLoadingSkeletonView","Host","height","Array","fill","render","title","description"],"sources":["src/components/salla-conditional-offer/interfaces.ts","src/components/salla-conditional-offer/salla-conditional-offer.scss?tag=salla-conditional-offer","src/components/salla-conditional-offer/salla-conditional-offer.tsx"],"sourcesContent":["import type { Product } from \"@salla.sa/twilight/types/common\";\n\nexport enum DiscountType {\n PERCENTAGE = \"percentage\",\n FIXED = \"fixed\",\n FREE_PRODUCT = \"free_product\",\n}\n\nexport enum OfferType {\n PRODUCT_COUNT = \"products_count\",\n PRODUCT_PURCHASE = \"order_amount\",\n}\n\nexport interface Discount {\n type?: DiscountType;\n value?: number;\n min_spend?: number;\n max_discount?: number;\n}\n\nexport interface OfferDetails {\n based_on?: OfferType;\n ends_at?: number;\n start_value?: number;\n end_value?: number;\n current_value?: number;\n discounts?: Discount[];\n}\n\nexport interface Offer {\n id?: number;\n type?: string;\n title?: string;\n description?: string;\n details?: OfferDetails | null;\n}\n\n\nexport interface ProductDetail {\n id?: number;\n sku?: string;\n name?: string;\n description?: string;\n url?: string;\n promotion_title?: null;\n subtitle?: null;\n type?: string;\n status?: string;\n price?: number;\n base_currency_price?: BaseCurrencyPrice;\n sale_price?: number;\n regular_price?: number;\n starting_price?: null;\n quantity?: null;\n max_quantity?: number;\n discount_ends?: null;\n is_taxable?: boolean;\n has_read_more?: boolean;\n can_add_note?: boolean;\n can_show_remained_quantity?: boolean;\n can_upload_file?: boolean;\n has_custom_form?: boolean;\n has_metadata?: boolean;\n is_on_sale?: boolean;\n is_hidden_quantity?: boolean;\n is_available?: boolean;\n is_out_of_stock?: boolean;\n is_require_shipping?: boolean;\n weight?: null;\n calories?: null;\n image?: Image;\n currency?: string;\n}\n\nexport interface BaseCurrencyPrice {\n currency?: string;\n amount?: number;\n}\n\nexport interface Image {\n url?: string;\n alt?: string;\n}\n\nexport interface UpdatedCart {\n items: Array<Product>;\n sub_total: number;\n}\n",":host {\n display: block;\n}","import { Component, Host, State, h } from \"@stencil/core\";\nimport {\n type Discount,\n DiscountType,\n type Offer,\n OfferType,\n type UpdatedCart,\n} from \"./interfaces\";\nimport type { Product } from \"@salla.sa/twilight/types/common\";\n\n@Component({\n tag: \"salla-conditional-offer\",\n styleUrl: \"salla-conditional-offer.scss\",\n})\nexport class SallaConditionalOffer {\n\n @State() offer: Offer = null;\n @State() products: Record<string, Pick<Product, 'image' | 'url'>> = {}\n @State() isLoading = false\n @State() canRender = true\n\n componentWillLoad() {\n salla.onReady().then(() => {\n if (!salla.config.get('store.features')?.includes('conditional-offer') || (salla.storage.get(\"cart\") !== '' && !salla.storage.get(\"cart\")?.summary?.count)) {\n throw new Error('feature or cart object does not existed');\n }\n })\n .then(() => salla.api.cart.offers())\n .then(({ data }: { data: Offer[] }) => {\n this.offer = data.find(offer => offer.type === \"conditional\")\n\n if (!this.offer) {\n this.canRender = false\n return;\n }\n\n this.isLoading = true\n this.offer.details.discounts.unshift(({ value: 0, min_spend: 0 }))\n return this.updateInitialOfferValue()\n }).then(() => {\n if (!this.offer) return;\n return this.getProducts()\n }).then(() => {\n if (!this.offer) return;\n salla.event.on(\"cart::updated\", (updatedCart: UpdatedCart) => this.updateOfferValues(updatedCart))\n })\n .catch(error => {\n this.canRender = false\n salla.logger.warn('salla-conditional-offer:: ', error)\n }).finally(() => {\n this.isLoading = false\n })\n\n }\n\n private getProducts() {\n const freeProductIDs = this.offer.details.discounts.filter(({ type }) => type === DiscountType.FREE_PRODUCT).map(({ value }) => value)\n if (freeProductIDs.length > 0) {\n return salla.product.fetch({ source: 'selected', source_value: freeProductIDs }).then(({ data }: { data: Array<Product> }) => {\n data.forEach(({ id, url, image }) => {\n this.products[id] = { url, image }\n })\n })\n }\n }\n\n private updateInitialOfferValue() {\n return salla.api.cart.details().then(({ data: { cart } }: { data: { cart: UpdatedCart } }) => this.updateOfferValues(cart))\n }\n\n private updateOfferValues({ items, sub_total }: UpdatedCart) {\n const current_value = this.offer.details.based_on === OfferType.PRODUCT_COUNT ? items.reduce((count: number, { quantity }) => count + quantity, 0,) : sub_total\n //we need to assign the offer object a new reference to trigger re-rendering\n this.offer = {\n ...this.offer, details: {\n ...this.offer?.details, current_value,\n }\n }\n return this.offer\n }\n\n private getCheckpointContent(discount: Discount) {\n\n if (discount.type === DiscountType.PERCENTAGE) return `${discount.value}%`\n\n if (discount.type === DiscountType.FIXED) return salla.money(discount.value)\n\n if (discount.type !== DiscountType.FREE_PRODUCT) {\n salla.logger.error(`salla-conditional-offer:: unexpected type (${discount.type})!`);\n return \"\";\n }\n\n const productItem = this.products[discount.value]\n\n if (!productItem) {\n salla.logger.error(`salla-conditional-offer:: there is no product with id (${discount.value})!`);\n return \"\";\n }\n\n return <a class=\"s-conditional-offer-product-link\" href={productItem.url} >\n <img\n class=\"s-conditional-offer-checkpoint-image-content\"\n loading=\"lazy\"\n decoding=\"async\"\n alt={productItem?.image?.alt || \"\"}\n src={productItem?.image?.url} />\n </a>\n }\n\n private getOfferType(discount: Discount): string {\n const basedOn = this.offer.details?.based_on;\n if (basedOn === OfferType.PRODUCT_COUNT) return salla.lang.choice(\"blocks.header.products_count\", discount.min_spend);\n if (basedOn === OfferType.PRODUCT_PURCHASE) return salla.money(discount.min_spend);\n\n salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${basedOn}`);\n return `${discount.min_spend}`;\n }\n\n private clamp(value: number, min: number, max: number) {\n return Math.max(min, Math.min(value, max));\n }\n\n private mapValueRanges(value: number, initialMinRange: number, initialMaxRange: number, newMinRange: number, newMaxRange: number) {\n\n const newRange = ((value - initialMinRange) * (newMaxRange - newMinRange)) / (initialMaxRange - initialMinRange) + newMinRange;\n\n if (newRange === Number.POSITIVE_INFINITY) return 100\n\n if (newRange === Number.NEGATIVE_INFINITY) return 0\n\n return this.clamp(newRange, 0, 100)\n }\n\n private getCheckPointView(discount: Discount, index: number) {\n const checkpointIndex = this.offer.details.discounts.findIndex(({ min_spend }) => min_spend === discount.min_spend);\n const previousCheckpointValue = this.offer.details.discounts[checkpointIndex - 1]?.min_spend ?? 0;\n const progressPercentage = this.mapValueRanges(this.offer.details.current_value, previousCheckpointValue, discount.min_spend, 0, 100);\n const isActive = discount.min_spend <= this.offer.details.current_value;\n\n return (\n <div class=\"s-conditional-offer-checkpoint-container\">\n {index > 0 ? [\n <div key=\"progress-line\" class=\"s-conditional-offer-progress-line-container\">\n <div class=\"s-conditional-offer-progress-line-inactive\" />\n <div class=\"s-conditional-offer-progress-line-active\" style={{ width: `${progressPercentage}%` }} />\n </div>,\n <div key=\"checkpoint\" class={`s-conditional-offer-checkpoint ${isActive ? \"s-conditional-offer-active-checkpoint\" : \"\"}`} >\n <div class={`s-conditional-offer-item-avatar-content ${isActive ? \"active\" : \"\"}`} innerHTML={this.products && this.getCheckpointContent(discount)}>\n </div>\n <div class={`s-conditional-offer-checkpoint-label ${isActive ? \"active\" : \"\"}`} innerHTML={this.getOfferType(discount)} />\n\n </div>\n ] :\n <div key=\"label\" class={{ \"s-conditional-offer-checkpoint-label\": true, \"first-checkpoint\": index === 0, active: isActive }} innerHTML={this.getOfferType(discount)} />\n }\n </div>\n );\n }\n\n private getLoadingSkeletonView() {\n return <Host class=\"s-conditional-offer-container\" >\n <div class=\"s-conditional-offer-skeleton-inner-container\">\n <div class=\"s-conditional-offer-skeleton-subtitle\">\n <salla-skeleton height=\"16px\" width=\"30%\" />\n </div>\n\n <div class=\"s-conditional-offer-skeleton-subtitle\">\n <salla-skeleton height=\"16px\" width=\"35%\" />\n </div>\n <div class=\"s-conditional-offer-skeleton-checkpoints-wrapper\">\n {Array(3).fill(null).map(() => (\n [<salla-skeleton key=\"checkpoint-line\" height=\"8px\" />,\n <div key=\"checkpoint\">\n <salla-skeleton height=\"60px\" width=\"60px\" type=\"circle\" />\n </div>]\n ))}\n </div>\n\n </div>\n </Host>\n }\n\n render() {\n if (!this.canRender) return null\n if (this.isLoading) return this.getLoadingSkeletonView()\n if (!this.offer) return null\n\n return <Host class=\"s-conditional-offer-container\">\n <div class=\"s-conditional-offer-title-wrapper\">\n <div class=\"s-conditional-offer-title\">{this.offer.title}</div>\n {this.offer.description ? <div class=\"s-conditional-offer-subtitle\">\n {this.offer.description} <i class=\"sicon-information\" />\n </div> : null}\n </div>\n <div class=\"s-conditional-offer-progress-container\">\n {this.offer.details.discounts.map((discount, index) => (\n <div class={{ \"flex-1\": index > 0 }} key={discount.min_spend}>\n {this.getCheckPointView(discount, index)}\n </div>\n ))}\n </div>\n </Host>\n }\n}\n"],"mappings":";;;kJAEA,IAAYA,GAAZ,SAAYA,GACRA,EAAA,2BACAA,EAAA,iBACAA,EAAA,8BACH,EAJD,CAAYA,MAIX,KAED,IAAYC,GAAZ,SAAYA,GACRA,EAAA,kCACAA,EAAA,kCAC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@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t}from"./p-DJeJWTdD.js";import{S as i,A as e}from"./p-yRO-ZESF.js";import{G as c}from"./p-C0JNGIpa.js";var r=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tag-money</title>\n<path d="M20.567 11.433c-0.521-0.521-1.364-0.521-1.885 0l-0.524 0.524c-1.28-0.819-3.091-0.681-4.191 0.419-0.631 0.631-0.976 1.468-0.976 2.359 0 0.889 0.347 1.727 0.976 2.357l0.943 0.943c0.171 0.171 0.195 0.368 0.195 0.472s-0.025 0.301-0.196 0.472c-0.169 0.169-0.367 0.195-0.471 0.195s-0.301-0.025-0.472-0.195l-2.357-2.357c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l0.944 0.941-0.472 0.472c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l0.519-0.519c0.54 0.359 1.173 0.553 1.837 0.553 0.892 0 1.729-0.348 2.357-0.976 0.631-0.631 0.976-1.467 0.976-2.357s-0.347-1.727-0.976-2.357l-0.943-0.943c-0.26-0.26-0.26-0.684 0-0.944 0.259-0.259 0.683-0.261 0.944 0l1.885 1.887c0.521 0.521 1.364 0.521 1.885 0 0.521-0.52 0.521-1.364 0-1.885l-0.472-0.472 0.472-0.472c0.521-0.521 0.521-1.365 0.001-1.887zM28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>\n</svg>\n`;var a=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>fire</title>\n<path d="M21.56 3.009c-0.052-0.047-0.116-0.065-0.173-0.103-0.073-0.048-0.143-0.1-0.223-0.132-0.083-0.033-0.165-0.047-0.252-0.063-0.081-0.016-0.16-0.035-0.243-0.035-0.089 0-0.172 0.020-0.26 0.037-0.080 0.016-0.159 0.028-0.236 0.059-0.084 0.035-0.157 0.088-0.235 0.14-0.053 0.036-0.115 0.053-0.165 0.097-0.049 0.044-0.988 0.895-2.288 2.255-2.364-2.839-4.476-4.815-4.576-4.908-0.056-0.052-0.127-0.075-0.188-0.115-0.075-0.049-0.143-0.105-0.224-0.137-0.080-0.032-0.163-0.041-0.245-0.057-0.085-0.016-0.167-0.040-0.252-0.040-0.084 0-0.163 0.023-0.245 0.039-0.087 0.016-0.172 0.025-0.253 0.059-0.080 0.032-0.147 0.087-0.22 0.135-0.063 0.041-0.133 0.064-0.189 0.116-0.453 0.423-11.092 10.408-11.092 18.095 0 7.977 4.935 13.549 12 13.549h8.667c6.673 0 11.333-5.115 11.333-12.439 0-7.052-10.013-16.167-10.44-16.552zM20.667 29.333h-7.777c-2.924 0-4.889-2.044-4.889-5.084 0-2.317 2.816-6.441 4.888-8.887 0.76 0.909 2.755 3.397 3.969 5.869 0.212 0.431 0.639 0.715 1.117 0.743 0.489 0.031 0.937-0.203 1.197-0.605 0.552-0.849 1.109-1.596 1.497-2.093 1.491 1.897 3.331 4.78 3.331 6.399 0 2.188-1.34 3.659-3.333 3.659zM26.537 27.052c0.081-0.44 0.129-0.899 0.129-1.377 0-3.269-3.713-7.847-4.46-8.735l-0.523-0.617c-0.507-0.599-1.528-0.599-2.035 0l-0.531 0.627c-0.147 0.175-0.495 0.599-0.936 1.187-1.595-2.597-3.495-4.776-3.595-4.889l-0.697-0.793c-0.507-0.577-1.499-0.577-2.004 0l-0.697 0.795c-0.6 0.684-5.856 6.803-5.856 11.001 0 0.881 0.127 1.712 0.356 2.484-1.896-1.933-3.023-4.821-3.023-8.283 0-4.915 6.073-11.997 9.329-15.255 1.001 1.008 2.692 2.789 4.368 4.927 0.243 0.309 0.609 0.496 1.001 0.509h0.048c0.376 0 0.735-0.159 0.988-0.439 0.889-0.981 1.693-1.795 2.269-2.359 3.051 2.965 8.663 9.323 8.663 13.727 0 3.171-1.031 5.769-2.796 7.491z"></path>\n</svg>\n`;var o=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>discount-coupon</title>\n<path d="M27 28h-22c-0.552 0-1-0.448-1-1v0c0-1.657-1.343-3-3-3v0c-0.552 0-1-0.448-1-1v0-12c0-0.552 0.448-1 1-1v0c1.657 0 3-1.343 3-3v0c0-0.552 0.448-1 1-1v0h22c0.552 0 1 0.448 1 1v0c0 1.657 1.343 3 3 3v0c0.552 0 1 0.448 1 1v0 12c0 0.552-0.448 1-1 1v0c-1.657 0-3 1.343-3 3v0c0 0.552-0.448 1-1 1v0zM5.9 26h20.2c0.415-1.964 1.936-3.485 3.867-3.894l0.033-0.006v-10.2c-1.964-0.415-3.485-1.936-3.894-3.867l-0.006-0.033h-20.2c-0.415 1.964-1.936 3.485-3.867 3.894l-0.033 0.006v10.2c1.964 0.415 3.485 1.936 3.894 3.867l0.006 0.033zM20 7h2v3h-2v-3zM20 12h2v4h-2v-4zM20 18h2v4h-2v-4zM20 24h2v3h-2v-3zM9 16c-1.657 0-3-1.343-3-3s1.343-3 3-3c1.657 0 3 1.343 3 3v0c0 1.657-1.343 3-3 3v0zM9 12c-0.552 0-1 0.448-1 1s0.448 1 1 1c0.552 0 1-0.448 1-1v0c0-0.552-0.448-1-1-1v0zM15 24c-1.657 0-3-1.343-3-3s1.343-3 3-3c1.657 0 3 1.343 3 3v0c0 1.657-1.343 3-3 3v0zM15 20c-0.552 0-1 0.448-1 1s0.448 1 1 1c0.552 0 1-0.448 1-1v0c0-0.552-0.448-1-1-1v0zM7 24c-0.552-0-1-0.448-1-1 0-0.244 0.088-0.468 0.233-0.642l-0.001 0.002 10-12c0.185-0.221 0.461-0.36 0.769-0.36 0.553 0 1.001 0.448 1.001 1.001 0 0.245-0.088 0.469-0.233 0.643l0.001-0.002-10 12c-0.185 0.22-0.46 0.358-0.767 0.358-0.001 0-0.002 0-0.003 0h0z"></path>\n</svg>\n`;const l=":host{display:block}";const n=class{constructor(t){s(this,t);this.internalOffers=[];this.showAll=false;this.freeLabel="";this.receivedOffer="";this.discountAmountLabel="";this.showMoreOffers="";this.icons={DiscountCouponIcon:o,GiftIcon:c,FireIcon:a,SpecialDiscountIcon:i,TagMoneyIcon:r};this.visibleOffersCount=3;this.handleCartItemUpdated=s=>{const t=s.data.cart.items.find((s=>s.id===this.itemId));if((t===null||t===void 0?void 0:t.id)===this.itemId){this.internalQuantity=t.quantity;this.internalOffers=t.detailed_offers||[];this.internalProductPrice=t.product_price}};this.toggleShowAll=()=>{this.showAll=!this.showAll}}async componentWillLoad(){await Salla.onReady();await salla.lang.onLoaded((()=>{this.freeLabel=salla.lang.get("common.elements.freeExclam");this.receivedOffer=salla.lang.get("pages.cart.received_offer");this.discountAmountLabel=salla.lang.get("pages.cart.discount_amount");this.showMoreOffers=salla.lang.get("pages.cart.show_more_offers")}));this.internalQuantity=this.quantity;this.internalOffers=this.parseOffers(this.offers);this.internalProductPrice=this.productPrice}componentDidLoad(){salla.event.on("cart::item.updated",(s=>this.handleCartItemUpdated(s)))}parseOffers(s){try{if(typeof s!=="string"){console.warn("Offers is not a string. Returning as-is.",s);return Array.isArray(s)?s:[]}return JSON.parse(s||"[]")}catch(s){console.error("Failed to parse offers",s);return[]}}get visibleOffers(){return this.internalOffers.slice(0,this.visibleOffersCount)}get hiddenOffers(){return this.internalOffers.slice(this.visibleOffersCount)}getPaidQty(s,t){return s-t.free_quantity}renderOffer(s,i){const e=this.getPaidQty(s,i);return t("div",{class:"s-cart-item-offers-box"},i.free_quantity>0&&e>0&&t("div",{class:"s-cart-item-offers-paid-free"},t("div",{class:"s-cart-item-offers-line"},salla.helpers.number(e)," × ",t("span",{innerHTML:salla.money(this.internalProductPrice)})),t("div",{class:"s-cart-item-offers-line"},salla.helpers.number(i.free_quantity)," ×",t("span",{class:"s-cart-item-offers-regular-price",innerHTML:salla.money(this.internalProductPrice)}),t("span",{class:"s-cart-item-offers-free-label"},this.freeLabel))),t("div",{class:"s-cart-item-offers-details"},t("span",{class:`s-cart-item-offers-icon`,innerHTML:this.icons[i.discount_icon]||""}),t("div",null,t("p",{class:"s-cart-item-offers-title"},this.receivedOffer.replace(":offer",i.offer_name)),t("p",{class:"s-cart-item-offers-discount"},t("span",{innerHTML:this.discountAmountLabel.replace(":amount",salla.money(i.discount_amount.toFixed(2)))})))))}render(){var s,i;if(!((s=this.internalOffers)===null||s===void 0?void 0:s.length)){return null}return t("div",{class:"s-cart-item-offers-container",id:`offers_list_${this.itemId}`},this.visibleOffers.map((s=>this.renderOffer(this.internalQuantity,s))),((i=this.internalOffers)===null||i===void 0?void 0:i.length)>this.visibleOffersCount&&t("div",{class:"s-cart-item-offers-show-more"},t("button",{class:"s-cart-item-offers-show-more-btn",onClick:this.toggleShowAll,type:"button"},t("span",{class:"s-cart-item-offers-show-more-label"},"+",this.hiddenOffers.length," ",this.showMoreOffers,t("span",{innerHTML:e,class:{"s-cart-item-offers-arrow-icon":true,"s-cart-item-offers-arrow-open":this.showAll}})))),this.showAll&&t("div",{class:"s-cart-item-offers-collapsed",id:`offers_${this.itemId}`},this.hiddenOffers.map((s=>this.renderOffer(this.internalQuantity,s)))))}};n.style=l;export{n as salla_cart_item_offers};
5
- //# sourceMappingURL=p-f5364a4e.entry.js.map
4
+ import{r as s,h as t}from"./p-Dj2SrCy0.js";import{S as i,A as e}from"./p-yRO-ZESF.js";import{G as c}from"./p-C0JNGIpa.js";var r=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tag-money</title>\n<path d="M20.567 11.433c-0.521-0.521-1.364-0.521-1.885 0l-0.524 0.524c-1.28-0.819-3.091-0.681-4.191 0.419-0.631 0.631-0.976 1.468-0.976 2.359 0 0.889 0.347 1.727 0.976 2.357l0.943 0.943c0.171 0.171 0.195 0.368 0.195 0.472s-0.025 0.301-0.196 0.472c-0.169 0.169-0.367 0.195-0.471 0.195s-0.301-0.025-0.472-0.195l-2.357-2.357c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l0.944 0.941-0.472 0.472c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l0.519-0.519c0.54 0.359 1.173 0.553 1.837 0.553 0.892 0 1.729-0.348 2.357-0.976 0.631-0.631 0.976-1.467 0.976-2.357s-0.347-1.727-0.976-2.357l-0.943-0.943c-0.26-0.26-0.26-0.684 0-0.944 0.259-0.259 0.683-0.261 0.944 0l1.885 1.887c0.521 0.521 1.364 0.521 1.885 0 0.521-0.52 0.521-1.364 0-1.885l-0.472-0.472 0.472-0.472c0.521-0.521 0.521-1.365 0.001-1.887zM28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>\n</svg>\n`;var a=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>fire</title>\n<path d="M21.56 3.009c-0.052-0.047-0.116-0.065-0.173-0.103-0.073-0.048-0.143-0.1-0.223-0.132-0.083-0.033-0.165-0.047-0.252-0.063-0.081-0.016-0.16-0.035-0.243-0.035-0.089 0-0.172 0.020-0.26 0.037-0.080 0.016-0.159 0.028-0.236 0.059-0.084 0.035-0.157 0.088-0.235 0.14-0.053 0.036-0.115 0.053-0.165 0.097-0.049 0.044-0.988 0.895-2.288 2.255-2.364-2.839-4.476-4.815-4.576-4.908-0.056-0.052-0.127-0.075-0.188-0.115-0.075-0.049-0.143-0.105-0.224-0.137-0.080-0.032-0.163-0.041-0.245-0.057-0.085-0.016-0.167-0.040-0.252-0.040-0.084 0-0.163 0.023-0.245 0.039-0.087 0.016-0.172 0.025-0.253 0.059-0.080 0.032-0.147 0.087-0.22 0.135-0.063 0.041-0.133 0.064-0.189 0.116-0.453 0.423-11.092 10.408-11.092 18.095 0 7.977 4.935 13.549 12 13.549h8.667c6.673 0 11.333-5.115 11.333-12.439 0-7.052-10.013-16.167-10.44-16.552zM20.667 29.333h-7.777c-2.924 0-4.889-2.044-4.889-5.084 0-2.317 2.816-6.441 4.888-8.887 0.76 0.909 2.755 3.397 3.969 5.869 0.212 0.431 0.639 0.715 1.117 0.743 0.489 0.031 0.937-0.203 1.197-0.605 0.552-0.849 1.109-1.596 1.497-2.093 1.491 1.897 3.331 4.78 3.331 6.399 0 2.188-1.34 3.659-3.333 3.659zM26.537 27.052c0.081-0.44 0.129-0.899 0.129-1.377 0-3.269-3.713-7.847-4.46-8.735l-0.523-0.617c-0.507-0.599-1.528-0.599-2.035 0l-0.531 0.627c-0.147 0.175-0.495 0.599-0.936 1.187-1.595-2.597-3.495-4.776-3.595-4.889l-0.697-0.793c-0.507-0.577-1.499-0.577-2.004 0l-0.697 0.795c-0.6 0.684-5.856 6.803-5.856 11.001 0 0.881 0.127 1.712 0.356 2.484-1.896-1.933-3.023-4.821-3.023-8.283 0-4.915 6.073-11.997 9.329-15.255 1.001 1.008 2.692 2.789 4.368 4.927 0.243 0.309 0.609 0.496 1.001 0.509h0.048c0.376 0 0.735-0.159 0.988-0.439 0.889-0.981 1.693-1.795 2.269-2.359 3.051 2.965 8.663 9.323 8.663 13.727 0 3.171-1.031 5.769-2.796 7.491z"></path>\n</svg>\n`;var o=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>discount-coupon</title>\n<path d="M27 28h-22c-0.552 0-1-0.448-1-1v0c0-1.657-1.343-3-3-3v0c-0.552 0-1-0.448-1-1v0-12c0-0.552 0.448-1 1-1v0c1.657 0 3-1.343 3-3v0c0-0.552 0.448-1 1-1v0h22c0.552 0 1 0.448 1 1v0c0 1.657 1.343 3 3 3v0c0.552 0 1 0.448 1 1v0 12c0 0.552-0.448 1-1 1v0c-1.657 0-3 1.343-3 3v0c0 0.552-0.448 1-1 1v0zM5.9 26h20.2c0.415-1.964 1.936-3.485 3.867-3.894l0.033-0.006v-10.2c-1.964-0.415-3.485-1.936-3.894-3.867l-0.006-0.033h-20.2c-0.415 1.964-1.936 3.485-3.867 3.894l-0.033 0.006v10.2c1.964 0.415 3.485 1.936 3.894 3.867l0.006 0.033zM20 7h2v3h-2v-3zM20 12h2v4h-2v-4zM20 18h2v4h-2v-4zM20 24h2v3h-2v-3zM9 16c-1.657 0-3-1.343-3-3s1.343-3 3-3c1.657 0 3 1.343 3 3v0c0 1.657-1.343 3-3 3v0zM9 12c-0.552 0-1 0.448-1 1s0.448 1 1 1c0.552 0 1-0.448 1-1v0c0-0.552-0.448-1-1-1v0zM15 24c-1.657 0-3-1.343-3-3s1.343-3 3-3c1.657 0 3 1.343 3 3v0c0 1.657-1.343 3-3 3v0zM15 20c-0.552 0-1 0.448-1 1s0.448 1 1 1c0.552 0 1-0.448 1-1v0c0-0.552-0.448-1-1-1v0zM7 24c-0.552-0-1-0.448-1-1 0-0.244 0.088-0.468 0.233-0.642l-0.001 0.002 10-12c0.185-0.221 0.461-0.36 0.769-0.36 0.553 0 1.001 0.448 1.001 1.001 0 0.245-0.088 0.469-0.233 0.643l0.001-0.002-10 12c-0.185 0.22-0.46 0.358-0.767 0.358-0.001 0-0.002 0-0.003 0h0z"></path>\n</svg>\n`;const l=":host{display:block}";const n=class{constructor(t){s(this,t);this.internalOffers=[];this.showAll=false;this.freeLabel="";this.receivedOffer="";this.discountAmountLabel="";this.showMoreOffers="";this.icons={DiscountCouponIcon:o,GiftIcon:c,FireIcon:a,SpecialDiscountIcon:i,TagMoneyIcon:r};this.visibleOffersCount=3;this.handleCartItemUpdated=s=>{const t=s.data.cart.items.find((s=>s.id===this.itemId));if((t===null||t===void 0?void 0:t.id)===this.itemId){this.internalQuantity=t.quantity;this.internalOffers=t.detailed_offers||[];this.internalProductPrice=t.product_price}};this.toggleShowAll=()=>{this.showAll=!this.showAll}}async componentWillLoad(){await Salla.onReady();await salla.lang.onLoaded((()=>{this.freeLabel=salla.lang.get("common.elements.freeExclam");this.receivedOffer=salla.lang.get("pages.cart.received_offer");this.discountAmountLabel=salla.lang.get("pages.cart.discount_amount");this.showMoreOffers=salla.lang.get("pages.cart.show_more_offers")}));this.internalQuantity=this.quantity;this.internalOffers=this.parseOffers(this.offers);this.internalProductPrice=this.productPrice}componentDidLoad(){salla.event.on("cart::item.updated",(s=>this.handleCartItemUpdated(s)))}parseOffers(s){try{if(typeof s!=="string"){console.warn("Offers is not a string. Returning as-is.",s);return Array.isArray(s)?s:[]}return JSON.parse(s||"[]")}catch(s){console.error("Failed to parse offers",s);return[]}}get visibleOffers(){return this.internalOffers.slice(0,this.visibleOffersCount)}get hiddenOffers(){return this.internalOffers.slice(this.visibleOffersCount)}getPaidQty(s,t){return s-t.free_quantity}renderOffer(s,i){const e=this.getPaidQty(s,i);return t("div",{class:"s-cart-item-offers-box"},i.free_quantity>0&&e>0&&t("div",{class:"s-cart-item-offers-paid-free"},t("div",{class:"s-cart-item-offers-line"},salla.helpers.number(e)," × ",t("span",{innerHTML:salla.money(this.internalProductPrice)})),t("div",{class:"s-cart-item-offers-line"},salla.helpers.number(i.free_quantity)," ×",t("span",{class:"s-cart-item-offers-regular-price",innerHTML:salla.money(this.internalProductPrice)}),t("span",{class:"s-cart-item-offers-free-label"},this.freeLabel))),t("div",{class:"s-cart-item-offers-details"},t("span",{class:`s-cart-item-offers-icon`,innerHTML:this.icons[i.discount_icon]||""}),t("div",null,t("p",{class:"s-cart-item-offers-title"},this.receivedOffer.replace(":offer",i.offer_name)),t("p",{class:"s-cart-item-offers-discount"},t("span",{innerHTML:this.discountAmountLabel.replace(":amount",salla.money(i.discount_amount.toFixed(2)))})))))}render(){var s,i;if(!((s=this.internalOffers)===null||s===void 0?void 0:s.length)){return null}return t("div",{class:"s-cart-item-offers-container",id:`offers_list_${this.itemId}`},this.visibleOffers.map((s=>this.renderOffer(this.internalQuantity,s))),((i=this.internalOffers)===null||i===void 0?void 0:i.length)>this.visibleOffersCount&&t("div",{class:"s-cart-item-offers-show-more"},t("button",{class:"s-cart-item-offers-show-more-btn",onClick:this.toggleShowAll,type:"button"},t("span",{class:"s-cart-item-offers-show-more-label"},"+",this.hiddenOffers.length," ",this.showMoreOffers,t("span",{innerHTML:e,class:{"s-cart-item-offers-arrow-icon":true,"s-cart-item-offers-arrow-open":this.showAll}})))),this.showAll&&t("div",{class:"s-cart-item-offers-collapsed",id:`offers_${this.itemId}`},this.hiddenOffers.map((s=>this.renderOffer(this.internalQuantity,s)))))}};n.style=l;export{n as salla_cart_item_offers};
5
+ //# sourceMappingURL=p-67b54ac4.entry.js.map
@@ -0,0 +1,5 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,n,r,i){function e(t){return t instanceof r?t:new r((function(n){n(t)}))}return new(r||(r=Promise))((function(r,a){function s(t){try{u(i.next(t))}catch(t){a(t)}}function o(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?r(t.value):e(t.value).then(s,o)}u((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,e,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(n){return u([t,n])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(r=0)),r)try{if(i=1,e&&(a=o[0]&2?e["return"]:o[0]?e["throw"]||((a=e["return"])&&a.call(e),0):e.next)&&!(a=a.call(e,o[1])).done)return a;if(e=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;e=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){r.label=o[1];break}if(o[0]===6&&r.label<a[1]){r.label=a[1];a=o;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(o);break}if(a[2])r.ops.pop();r.trys.pop();continue}o=n.call(t,r)}catch(t){o=[6,t];e=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
+ /*!
3
+ * Crafted with ❤ by Salla
4
+ */System.register(["./p-DvJ_tnSw.system.js","./p-Bnro4LR3.system.js","./p-C-c0Msup.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,r,i,e,a,s,o;return{setters:[function(t){n=t.r;r=t.c;i=t.h;e=t.H;a=t.g},function(t){s=t.F},function(t){o=t.H},null],execute:function(){var u=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";var f=t("salla_filters",function(){function t(t){var i=this;n(this,t);this.changed=r(this,"changed");this.isReady=false;this.filtersData={};salla.event.on("filters::hidden",(function(){return i.host.style.display="none"}));salla.lang.onLoaded((function(){i.apply=salla.lang.get("pages.checkout.apply");i.reset=salla.lang.get("pages.categories.filters_reset")}));salla.event.on("filters::fetched",(function(t){var n=t.filters;i.host.style.display="";var r={};i.filters=n.map((function(t){t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label;if(t.key=="rating"){t.type=s.VALUES;var n=t.values,e=n.max,a=n.min;t.values=[5,4,3,2,1].filter((function(t){return t>=a||t<=e}))}if(i.filtersData.variants&&t.type==s.VARIANTS){r.variants=i.filtersData.variants}if(i.filtersData[t.key]&&t.type!==s.VARIANTS){r[t.key]=i.filtersData[t.key]}var o=new URLSearchParams(window.location.search);var u=false;for(var f=0,c=o.keys();f<c.length;f++){var l=c[f];if(l.includes("filters")){u=true;break}}if(salla.config.get("page.slug")=="product.index"&&Object.keys(r).length==0&&!u){var h=window.location.href;var v=salla.config.get("page.id");var d=h.indexOf("?")!==-1?"&":"?";var w=h+d+"filters[category_id]="+v;r.category_id=v;window.history.pushState({path:w},"",w)}return t}));i.filtersData=r;i.host.childNodes.forEach((function(t){return __awaiter(i,void 0,void 0,(function(){var n;return __generator(this,(function(r){switch(r.label){case 0:n=t.setWidgetHeight;if(!n)return[3,2];return[4,t.setWidgetHeight()];case 1:n=r.sent();r.label=2;case 2:return[2,n]}}))}))}))}))}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,r;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);t=new URLSearchParams(window.location.search);n=this;return[4,o.extractFiltersFromUrl(t)];case 1:n.filtersData=i.sent();return[3,3];case 2:r=i.sent();console.warn("failed to get filters from URL",r.message);return[3,3];case 3:return[2]}}))}))};t.prototype.getFilters=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.filtersData]}))}))};t.prototype.applyFilters=function(){return __awaiter(this,void 0,void 0,(function(){var t;var n=this;return __generator(this,(function(r){if(!this.isReady){return[2]}t=Object.keys(this.filtersData).length>0;setTimeout((function(){var r;if(t){var i=new URL(window.location.href);for(var e=0,a=i.searchParams.entries();e<a.length;e++){var s=a[e][0];if(s.startsWith("filters")){i.searchParams.delete(s)}}var o=n.encodeFilters(n.filtersData);var u=i.search.split("&").filter((function(t){return!t.includes("filters")})).join("&");if(u){i.search=i.search.split("&filters")[0]+"&"+o}else{i.search="?".concat(o)}window.history.pushState({},"",i.href)}else{var i=new URL(window.location.href);(r=i.searchParams)===null||r===void 0?void 0:r.delete("filters");window.history.pushState({},"",i.toString())}salla.event.emit("salla-filters::changed",n.filtersData);n.changed.emit(n.filtersData)}),300);return[2]}))}))};t.prototype.encodeFilters=function(t,n){if(n===void 0){n="filters"}var r=[];for(var i in t){if(Object.prototype.hasOwnProperty.call(t,i)){var e=t[i];var a=n?"".concat(n,"[").concat(i,"]"):i;if(Array.isArray(e)){for(var s=0;s<e.length;s++){r.push("".concat(a,"[").concat(s,"]=").concat(e[s]))}}else if(typeof e==="object"&&e!==null){r.push(this.encodeFilters(e,a))}else{var o="".concat(a,"=").concat(e);r.push(o)}}}return r.join("&")};t.prototype.resetFilters=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.removeFiltersQueryParams();this.filtersData={};this.host.childNodes.forEach((function(t){return t.reset&&t.reset()}));salla.event.emit("salla-filters::reset");return[2,this.applyFilters()]}))}))};t.prototype.removeFiltersQueryParams=function(){var t=new URLSearchParams(window.location.search);var n=Array.from(t.keys()).filter((function(t){return!t.startsWith("filters[")})).map((function(n){return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(t.get(n)))})).join("&");var r=n?"".concat(window.location.pathname,"?").concat(n):window.location.pathname;window.history.pushState({},"",r)};t.prototype.handleOptionChange=function(t,n,r){if(n.type===s.RANGE){this.filtersData[n.key]=r}var i=t.target.checked;if(n.type===s.VARIANTS){this.filtersData.variants=this.filtersData.variants||{};i&&(this.filtersData.variants[n.key]=r);i||delete this.filtersData.variants[n.key]}else if(t.target.type=="radio"){i&&(this.filtersData[n.key]=r);i||delete this.filtersData[n.key]}else if(t.target.type=="checkbox"){this.filtersData[n.key]=this.filtersData[n.key]||[];if(i){this.filtersData[n.key].push(r)}this.filtersData[n.key]=this.filtersData[n.key].filter((function(t){return t!=r}))}this.applyFilters()};t.prototype.render=function(){var t=this;var n,r;return i(e,{key:"d62d9a867f140a911cb5da11a1034511fd230745"},(n=this.filters)===null||n===void 0?void 0:n.map((function(n){return i("salla-filters-widget",{option:n,filtersData:t.filtersData,onChanged:function(n){var r=n.detail,i=r.event,e=r.option,a=r.value;t.handleOptionChange(i,e,a)}})})),((r=this.filters)===null||r===void 0?void 0:r.length)?i("div",{class:"s-filters-footer"},i("salla-button",{color:"gray",fill:"outline",onClick:function(){return t.resetFilters()}},this.reset)):"")};t.prototype.componentDidLoad=function(){this.isReady=true};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());f.style=u}}}));
5
+ //# sourceMappingURL=p-67ebf87e.system.entry.js.map