@salla.sa/twilight-components 2.14.220 → 2.14.221

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 (333) hide show
  1. package/dist/cjs/{app-globals-2vTvVXxF.js → app-globals-CURclN4K.js} +3 -3
  2. package/dist/cjs/{app-globals-2vTvVXxF.js.map → app-globals-CURclN4K.js.map} +1 -1
  3. package/dist/cjs/{index-B04Y8RyW.js → index-1TYwVkJb.js} +8 -4
  4. package/dist/cjs/index-1TYwVkJb.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +3 -3
  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 +338 -0
  36. package/dist/cjs/salla-tiered-offer.cjs.entry.js.map +1 -0
  37. package/dist/cjs/salla-tiered-offer.entry.cjs.js.map +1 -0
  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 +3 -3
  42. package/dist/collection/assets/svg/diamond-02.svg +4 -0
  43. package/dist/collection/assets/svg/gold.svg +6 -0
  44. package/dist/collection/assets/svg/star-rounded.svg +3 -0
  45. package/dist/collection/assets/svg/stars.svg +5 -0
  46. package/dist/collection/collection-manifest.json +1 -0
  47. package/dist/collection/components/salla-tiered-offer/constants.js +12 -0
  48. package/dist/collection/components/salla-tiered-offer/constants.js.map +1 -0
  49. package/dist/collection/components/salla-tiered-offer/interfaces.js +9 -0
  50. package/dist/collection/components/salla-tiered-offer/interfaces.js.map +1 -0
  51. package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.css +26 -0
  52. package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +288 -0
  53. package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js.map +1 -0
  54. package/dist/collection/components/salla-tiered-offer/utils.js +38 -0
  55. package/dist/collection/components/salla-tiered-offer/utils.js.map +1 -0
  56. package/dist/components/index.js +2 -2
  57. package/dist/components/index.js.map +1 -1
  58. package/dist/components/salla-tiered-offer.d.ts +11 -0
  59. package/dist/components/salla-tiered-offer.js +371 -0
  60. package/dist/components/salla-tiered-offer.js.map +1 -0
  61. package/dist/esm/{app-globals-DRz9_J1y.js → app-globals-CIvCwBrC.js} +3 -3
  62. package/dist/esm/{app-globals-DRz9_J1y.js.map → app-globals-CIvCwBrC.js.map} +1 -1
  63. package/dist/esm/{index-L1Wml9tS.js → index-DJeJWTdD.js} +8 -4
  64. package/dist/esm/index-DJeJWTdD.js.map +1 -0
  65. package/dist/esm/loader.js +4 -4
  66. package/dist/esm/salla-accordion-body.entry.js +1 -1
  67. package/dist/esm/salla-accordion-head.entry.js +1 -1
  68. package/dist/esm/salla-accordion.entry.js +1 -1
  69. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  70. package/dist/esm/salla-advertisement.entry.js +1 -1
  71. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  72. package/dist/esm/salla-apps-icons.entry.js +1 -1
  73. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  74. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  75. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  76. package/dist/esm/salla-contacts.entry.js +1 -1
  77. package/dist/esm/salla-filters-widget.entry.js +1 -1
  78. package/dist/esm/salla-filters.entry.js +1 -1
  79. package/dist/esm/salla-installment.entry.js +1 -1
  80. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  81. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  82. package/dist/esm/salla-metadata.entry.js +1 -1
  83. package/dist/esm/salla-notification-item.entry.js +1 -1
  84. package/dist/esm/salla-notifications.entry.js +1 -1
  85. package/dist/esm/salla-offer.entry.js +1 -1
  86. package/dist/esm/salla-order-summary.entry.js +1 -1
  87. package/dist/esm/salla-orders.entry.js +1 -1
  88. package/dist/esm/salla-payments.entry.js +1 -1
  89. package/dist/esm/salla-price-range.entry.js +1 -1
  90. package/dist/esm/salla-product-options.entry.js +1 -1
  91. package/dist/esm/salla-review-card.entry.js +1 -1
  92. package/dist/esm/salla-reviews-page.entry.js +1 -1
  93. package/dist/esm/salla-reviews.entry.js +1 -1
  94. package/dist/esm/salla-social.entry.js +1 -1
  95. package/dist/esm/salla-tiered-offer.entry.js +336 -0
  96. package/dist/esm/salla-tiered-offer.entry.js.map +1 -0
  97. package/dist/esm/salla-tooltip.entry.js +1 -1
  98. package/dist/esm/salla-verify.entry.js +1 -1
  99. package/dist/esm/salla-wallet.entry.js +1 -1
  100. package/dist/esm/twilight.js +4 -4
  101. package/dist/esm-es5/{app-globals-DRz9_J1y.js → app-globals-CIvCwBrC.js} +2 -2
  102. package/dist/esm-es5/{app-globals-DRz9_J1y.js.map → app-globals-CIvCwBrC.js.map} +1 -1
  103. package/dist/esm-es5/{index-L1Wml9tS.js → index-DJeJWTdD.js} +3 -3
  104. package/dist/esm-es5/index-DJeJWTdD.js.map +1 -0
  105. package/dist/esm-es5/loader.js +1 -1
  106. package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
  107. package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
  108. package/dist/esm-es5/salla-accordion.entry.js +1 -1
  109. package/dist/esm-es5/salla-add-product-button_51.entry.js +4 -4
  110. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  111. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  112. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  113. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  114. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  115. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  116. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  117. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  118. package/dist/esm-es5/salla-filters.entry.js +1 -1
  119. package/dist/esm-es5/salla-installment.entry.js +1 -1
  120. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  121. package/dist/esm-es5/salla-loyalty-program.entry.js +2 -2
  122. package/dist/esm-es5/salla-metadata.entry.js +2 -2
  123. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  124. package/dist/esm-es5/salla-notifications.entry.js +2 -2
  125. package/dist/esm-es5/salla-offer.entry.js +1 -1
  126. package/dist/esm-es5/salla-order-summary.entry.js +2 -2
  127. package/dist/esm-es5/salla-orders.entry.js +1 -1
  128. package/dist/esm-es5/salla-payments.entry.js +1 -1
  129. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  130. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  131. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  132. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  133. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  134. package/dist/esm-es5/salla-social.entry.js +1 -1
  135. package/dist/esm-es5/salla-tiered-offer.entry.js +5 -0
  136. package/dist/esm-es5/salla-tiered-offer.entry.js.map +1 -0
  137. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  138. package/dist/esm-es5/salla-verify.entry.js +1 -1
  139. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  140. package/dist/esm-es5/twilight.js +1 -1
  141. package/dist/twilight/{p-1ccd8b8e.entry.js → p-018db6d5.entry.js} +2 -2
  142. package/dist/twilight/{p-d9c2f2b0.system.entry.js → p-01ab98b8.system.entry.js} +2 -2
  143. package/dist/twilight/{p-30c8b458.system.entry.js → p-0213d2ff.system.entry.js} +2 -2
  144. package/dist/twilight/{p-a198f405.entry.js → p-0530fecd.entry.js} +2 -2
  145. package/dist/twilight/{p-0225792d.system.entry.js → p-0a564fe6.system.entry.js} +2 -2
  146. package/dist/twilight/{p-1af18eb4.entry.js → p-0bd54dae.entry.js} +2 -2
  147. package/dist/twilight/{p-6c83517d.entry.js → p-11542446.entry.js} +2 -2
  148. package/dist/twilight/{p-4fd3a01d.entry.js → p-1196a23a.entry.js} +2 -2
  149. package/dist/twilight/{p-f72dd4b6.system.entry.js → p-125e8e09.system.entry.js} +2 -2
  150. package/dist/twilight/{p-47b6e06b.system.entry.js → p-137b9ced.system.entry.js} +2 -2
  151. package/dist/twilight/{p-039b45e6.system.entry.js → p-14bce2e7.system.entry.js} +2 -2
  152. package/dist/twilight/{p-cbadf894.system.entry.js → p-1bc7d70c.system.entry.js} +2 -2
  153. package/dist/twilight/{p-a477ee76.system.entry.js → p-1c1baf96.system.entry.js} +2 -2
  154. package/dist/twilight/{p-c63ddf33.entry.js → p-1e32544e.entry.js} +2 -2
  155. package/dist/twilight/{p-DuTXkmaO.system.js → p-1xnr2J3b.system.js} +6 -6
  156. package/dist/twilight/p-1xnr2J3b.system.js.map +1 -0
  157. package/dist/twilight/{p-75ec194e.system.entry.js → p-2411b6cb.system.entry.js} +2 -2
  158. package/dist/twilight/{p-bfb9457b.system.entry.js → p-2943fae2.system.entry.js} +2 -2
  159. package/dist/twilight/{p-fbaa093c.entry.js → p-2e1838fc.entry.js} +2 -2
  160. package/dist/twilight/{p-12a13525.entry.js → p-2ecd9c73.entry.js} +2 -2
  161. package/dist/twilight/{p-ca88566e.entry.js → p-345e7510.entry.js} +2 -2
  162. package/dist/twilight/{p-Cee0DssD.system.js.map → p-3_GHqNLe.system.js.map} +1 -1
  163. package/dist/twilight/{p-DwLeLHva.system.js.map → p-3iOHI_bZ.system.js.map} +1 -1
  164. package/dist/twilight/{p-2ac20d02.entry.js → p-4719adfd.entry.js} +2 -2
  165. package/dist/twilight/p-512dbfd8.system.entry.js +5 -0
  166. package/dist/twilight/{p-666189da.system.entry.js → p-5222370a.system.entry.js} +2 -2
  167. package/dist/twilight/{p-57bbd96b.system.entry.js → p-56329c93.system.entry.js} +2 -2
  168. package/dist/twilight/{p-7b7618d5.entry.js → p-594c82e8.entry.js} +2 -2
  169. package/dist/twilight/{p-184f98b1.entry.js → p-5a3e638f.entry.js} +2 -2
  170. package/dist/twilight/{p-6fcc8ed3.entry.js → p-5f22ded8.entry.js} +2 -2
  171. package/dist/twilight/{p-e00746e9.system.entry.js → p-60550d95.system.entry.js} +2 -2
  172. package/dist/twilight/{p-5b8bf0e6.system.entry.js → p-611a0591.system.entry.js} +2 -2
  173. package/dist/twilight/{p-af1f9cd6.entry.js → p-62372bb6.entry.js} +2 -2
  174. package/dist/twilight/{p-789f0166.system.entry.js → p-64346d4f.system.entry.js} +2 -2
  175. package/dist/twilight/{p-4291c03c.system.entry.js → p-65f8266c.system.entry.js} +2 -2
  176. package/dist/twilight/{p-90fc2489.entry.js → p-7dc53e3e.entry.js} +2 -2
  177. package/dist/twilight/{p-9a3f6331.entry.js → p-84aaa78d.entry.js} +2 -2
  178. package/dist/twilight/{p-d07e552b.system.entry.js → p-8b0b63d3.system.entry.js} +2 -2
  179. package/dist/twilight/p-8b9cdaa8.system.entry.js +5 -0
  180. package/dist/twilight/p-8b9cdaa8.system.entry.js.map +1 -0
  181. package/dist/twilight/{p-96d501d2.entry.js → p-8d171391.entry.js} +2 -2
  182. package/dist/twilight/{p-0a469ba7.system.entry.js → p-8d241400.system.entry.js} +3 -3
  183. package/dist/twilight/{p-c781f7a7.entry.js → p-8f504c22.entry.js} +2 -2
  184. package/dist/twilight/{p-2cd40336.system.entry.js → p-96c0dbe6.system.entry.js} +2 -2
  185. package/dist/twilight/{p-62ba5382.entry.js → p-9c6d592b.entry.js} +2 -2
  186. package/dist/twilight/{p-DmQdqVWv.system.js.map → p-B0iUa0dk.system.js.map} +1 -1
  187. package/dist/twilight/{p-DFlc0grl.system.js.map → p-B78CJAeo.system.js.map} +1 -1
  188. package/dist/twilight/{p-9jT7Wo1H.system.js.map → p-BEAZDb3Z.system.js.map} +1 -1
  189. package/dist/twilight/{p-C9IwdXDn.system.js.map → p-BQW3a64v.system.js.map} +1 -1
  190. package/dist/twilight/p-BYmyEppC.system.js.map +1 -0
  191. package/dist/twilight/{p-BfxbBmpF.system.js.map → p-BbGRMLwX.system.js.map} +1 -1
  192. package/dist/twilight/{p-BCvHzhOW.system.js.map → p-BiWj3BdY.system.js.map} +1 -1
  193. package/dist/twilight/{p-cWZujtjd.system.js.map → p-BmpTR30a.system.js.map} +1 -1
  194. package/dist/twilight/{p-DUDOY-ZS.system.js.map → p-BwBcvX6V.system.js.map} +1 -1
  195. package/dist/twilight/{p-nvgYekhd.system.js.map → p-C1YpO4ps.system.js.map} +1 -1
  196. package/dist/twilight/{p-BWD1Mdmj.system.js.map → p-CS3lHUTW.system.js.map} +1 -1
  197. package/dist/twilight/{p-D_Of4cjl.system.js.map → p-CW5Y_Ilm.system.js.map} +1 -1
  198. package/dist/twilight/{p-DPreD4Hr.system.js.map → p-CW_Wih48.system.js.map} +1 -1
  199. package/dist/twilight/{p-DKke2twA.system.js.map → p-Cny8cSf0.system.js.map} +1 -1
  200. package/dist/twilight/{p-BP344v_q.system.js.map → p-Cv-fXCMq.system.js.map} +1 -1
  201. package/dist/twilight/{p-Burnn1Qt.js → p-D4Rc_kre.js} +2 -2
  202. package/dist/twilight/{p-Burnn1Qt.js.map → p-D4Rc_kre.js.map} +1 -1
  203. package/dist/twilight/{p-nuRa4ECK.system.js.map → p-D8gfPwyY.system.js.map} +1 -1
  204. package/dist/twilight/{p-BlpV9vce.system.js.map → p-DDxbK6va.system.js.map} +1 -1
  205. package/dist/twilight/{p-tI_9cOVN.system.js.map → p-DF0wZDI-.system.js.map} +1 -1
  206. package/dist/twilight/{p-Cl_CHxGj.system.js.map → p-DJO9K4n7.system.js.map} +1 -1
  207. package/dist/twilight/{p-L1Wml9tS.js → p-DJeJWTdD.js} +3 -3
  208. package/dist/twilight/p-DJeJWTdD.js.map +1 -0
  209. package/dist/twilight/{p-BWnEoSJY.system.js.map → p-DYXzVtwh.system.js.map} +1 -1
  210. package/dist/twilight/{p-egmUBeji.system.js.map → p-D_GDndNn.system.js.map} +1 -1
  211. package/dist/twilight/{p-Bvg9GRmu.system.js.map → p-DanADfyI.system.js.map} +1 -1
  212. package/dist/twilight/{p-DVqtOGyR.system.js.map → p-DlFxCb4V.system.js.map} +1 -1
  213. package/dist/twilight/{p-BUNm7oxn.system.js → p-Dtkyz9uf.system.js} +2 -2
  214. package/dist/twilight/{p-BUNm7oxn.system.js.map → p-Dtkyz9uf.system.js.map} +1 -1
  215. package/dist/twilight/{p-BftU992I.system.js.map → p-DuXM8liP.system.js.map} +1 -1
  216. package/dist/twilight/{p-DvZ3uG1Y.system.js.map → p-DvaxAP4E.system.js.map} +1 -1
  217. package/dist/twilight/{p-BIOQiBj0.system.js.map → p-DygvAhI4.system.js.map} +1 -1
  218. package/dist/twilight/{p-ByVXW9BA.system.js.map → p-V-F3jS9L.system.js.map} +1 -1
  219. package/dist/twilight/{p-B0ThVjj_.system.js.map → p-Vh3TFQnV.system.js.map} +1 -1
  220. package/dist/twilight/{p-0e4f26bb.system.entry.js → p-a4376ad7.system.entry.js} +2 -2
  221. package/dist/twilight/{p-8d9a5dc0.entry.js → p-a52f5483.entry.js} +2 -2
  222. package/dist/twilight/{p-38526ba5.system.entry.js → p-a8541cb2.system.entry.js} +2 -2
  223. package/dist/twilight/{p-a3ab451d.entry.js → p-aae55c3c.entry.js} +2 -2
  224. package/dist/twilight/{p-60e6d7e6.system.entry.js → p-ab9a81e5.system.entry.js} +2 -2
  225. package/dist/twilight/p-b311d422.entry.js +5 -0
  226. package/dist/twilight/{p-d0a760cc.entry.js → p-b734e69f.entry.js} +2 -2
  227. package/dist/twilight/{p-5c918974.entry.js → p-bdef02e0.entry.js} +2 -2
  228. package/dist/twilight/{p-52156f6d.system.entry.js → p-bec1f4a2.system.entry.js} +2 -2
  229. package/dist/twilight/{p-228d58df.system.entry.js → p-c62d7968.system.entry.js} +2 -2
  230. package/dist/twilight/{p-b1ad7c75.entry.js → p-cba454b7.entry.js} +2 -2
  231. package/dist/twilight/{p-3bdebf0d.entry.js → p-d0db93be.entry.js} +2 -2
  232. package/dist/twilight/{p-be1034af.system.entry.js → p-d78f9304.system.entry.js} +2 -2
  233. package/dist/twilight/{p-CpzD5fce.system.js.map → p-dKVQW-4Z.system.js.map} +1 -1
  234. package/dist/twilight/{p-08258532.entry.js → p-ddfc02db.entry.js} +2 -2
  235. package/dist/twilight/p-df86fa35.entry.js +5 -0
  236. package/dist/twilight/p-df86fa35.entry.js.map +1 -0
  237. package/dist/twilight/{p-342e13e4.system.entry.js → p-e09dbe92.system.entry.js} +2 -2
  238. package/dist/twilight/{p-284dae41.system.entry.js → p-e45781c5.system.entry.js} +3 -3
  239. package/dist/twilight/{p-154d97db.system.entry.js → p-e490de2f.system.entry.js} +2 -2
  240. package/dist/twilight/{p-76137ff1.entry.js → p-e9e4a641.entry.js} +7 -7
  241. package/dist/twilight/{p-fe959c9a.system.entry.js → p-eb847afb.system.entry.js} +2 -2
  242. package/dist/twilight/{p-CIghWdV5.system.js.map → p-eyvPNcBM.system.js.map} +1 -1
  243. package/dist/twilight/{p-50f789e5.entry.js → p-f26aa117.entry.js} +2 -2
  244. package/dist/twilight/{p-f6c410c6.entry.js → p-f5364a4e.entry.js} +2 -2
  245. package/dist/twilight/{p-5a577bf3.system.entry.js → p-f6e14858.system.entry.js} +2 -2
  246. package/dist/twilight/{p-5b4f648e.entry.js → p-f8f0dd3d.entry.js} +2 -2
  247. package/dist/twilight/{p-962cd525.entry.js → p-fd20f996.entry.js} +2 -2
  248. package/dist/twilight/{p-b4b5a600.system.entry.js → p-fe4d5abb.system.entry.js} +2 -2
  249. package/dist/twilight/{p-j7nJelMY.system.js.map → p-rHIfLORZ.system.js.map} +1 -1
  250. package/dist/twilight/p-t_BLXxaT.system.js +5 -0
  251. package/dist/twilight/{p-ByGP8fWO.system.js.map → p-t_BLXxaT.system.js.map} +1 -1
  252. package/dist/twilight/{p-YvHIMjOJ.system.js.map → p-urL630v4.system.js.map} +1 -1
  253. package/dist/twilight/salla-tiered-offer.entry.esm.js.map +1 -0
  254. package/dist/twilight/twilight.esm.js +1 -1
  255. package/dist/twilight/twilight.js +1 -1
  256. package/dist/types/components/salla-tiered-offer/constants.d.ts +2 -0
  257. package/dist/types/components/salla-tiered-offer/interfaces.d.ts +44 -0
  258. package/dist/types/components/salla-tiered-offer/salla-tiered-offer.d.ts +39 -0
  259. package/dist/types/components/salla-tiered-offer/utils.d.ts +19 -0
  260. package/dist/types/components.d.ts +13 -0
  261. package/package.json +5 -5
  262. package/dist/cjs/index-B04Y8RyW.js.map +0 -1
  263. package/dist/esm/index-L1Wml9tS.js.map +0 -1
  264. package/dist/esm-es5/index-L1Wml9tS.js.map +0 -1
  265. package/dist/twilight/p-2c11821b.entry.js +0 -5
  266. package/dist/twilight/p-ByGP8fWO.system.js +0 -5
  267. package/dist/twilight/p-DuTXkmaO.system.js.map +0 -1
  268. package/dist/twilight/p-L1Wml9tS.js.map +0 -1
  269. package/dist/twilight/p-e58e21db.system.entry.js +0 -5
  270. /package/dist/twilight/{p-1ccd8b8e.entry.js.map → p-018db6d5.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-d9c2f2b0.system.entry.js.map → p-01ab98b8.system.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-30c8b458.system.entry.js.map → p-0213d2ff.system.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-a198f405.entry.js.map → p-0530fecd.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-0225792d.system.entry.js.map → p-0a564fe6.system.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-1af18eb4.entry.js.map → p-0bd54dae.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-6c83517d.entry.js.map → p-11542446.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-4fd3a01d.entry.js.map → p-1196a23a.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-f72dd4b6.system.entry.js.map → p-125e8e09.system.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-47b6e06b.system.entry.js.map → p-137b9ced.system.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-039b45e6.system.entry.js.map → p-14bce2e7.system.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-cbadf894.system.entry.js.map → p-1bc7d70c.system.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-a477ee76.system.entry.js.map → p-1c1baf96.system.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-c63ddf33.entry.js.map → p-1e32544e.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-75ec194e.system.entry.js.map → p-2411b6cb.system.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-bfb9457b.system.entry.js.map → p-2943fae2.system.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-fbaa093c.entry.js.map → p-2e1838fc.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-12a13525.entry.js.map → p-2ecd9c73.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-ca88566e.entry.js.map → p-345e7510.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-2ac20d02.entry.js.map → p-4719adfd.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-e58e21db.system.entry.js.map → p-512dbfd8.system.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-666189da.system.entry.js.map → p-5222370a.system.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-57bbd96b.system.entry.js.map → p-56329c93.system.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-7b7618d5.entry.js.map → p-594c82e8.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-184f98b1.entry.js.map → p-5a3e638f.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-6fcc8ed3.entry.js.map → p-5f22ded8.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-e00746e9.system.entry.js.map → p-60550d95.system.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-5b8bf0e6.system.entry.js.map → p-611a0591.system.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-af1f9cd6.entry.js.map → p-62372bb6.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-789f0166.system.entry.js.map → p-64346d4f.system.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-4291c03c.system.entry.js.map → p-65f8266c.system.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-90fc2489.entry.js.map → p-7dc53e3e.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-9a3f6331.entry.js.map → p-84aaa78d.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-d07e552b.system.entry.js.map → p-8b0b63d3.system.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-96d501d2.entry.js.map → p-8d171391.entry.js.map} +0 -0
  305. /package/dist/twilight/{p-0a469ba7.system.entry.js.map → p-8d241400.system.entry.js.map} +0 -0
  306. /package/dist/twilight/{p-c781f7a7.entry.js.map → p-8f504c22.entry.js.map} +0 -0
  307. /package/dist/twilight/{p-2cd40336.system.entry.js.map → p-96c0dbe6.system.entry.js.map} +0 -0
  308. /package/dist/twilight/{p-62ba5382.entry.js.map → p-9c6d592b.entry.js.map} +0 -0
  309. /package/dist/twilight/{p-0e4f26bb.system.entry.js.map → p-a4376ad7.system.entry.js.map} +0 -0
  310. /package/dist/twilight/{p-8d9a5dc0.entry.js.map → p-a52f5483.entry.js.map} +0 -0
  311. /package/dist/twilight/{p-38526ba5.system.entry.js.map → p-a8541cb2.system.entry.js.map} +0 -0
  312. /package/dist/twilight/{p-a3ab451d.entry.js.map → p-aae55c3c.entry.js.map} +0 -0
  313. /package/dist/twilight/{p-60e6d7e6.system.entry.js.map → p-ab9a81e5.system.entry.js.map} +0 -0
  314. /package/dist/twilight/{p-2c11821b.entry.js.map → p-b311d422.entry.js.map} +0 -0
  315. /package/dist/twilight/{p-d0a760cc.entry.js.map → p-b734e69f.entry.js.map} +0 -0
  316. /package/dist/twilight/{p-5c918974.entry.js.map → p-bdef02e0.entry.js.map} +0 -0
  317. /package/dist/twilight/{p-52156f6d.system.entry.js.map → p-bec1f4a2.system.entry.js.map} +0 -0
  318. /package/dist/twilight/{p-228d58df.system.entry.js.map → p-c62d7968.system.entry.js.map} +0 -0
  319. /package/dist/twilight/{p-b1ad7c75.entry.js.map → p-cba454b7.entry.js.map} +0 -0
  320. /package/dist/twilight/{p-3bdebf0d.entry.js.map → p-d0db93be.entry.js.map} +0 -0
  321. /package/dist/twilight/{p-be1034af.system.entry.js.map → p-d78f9304.system.entry.js.map} +0 -0
  322. /package/dist/twilight/{p-08258532.entry.js.map → p-ddfc02db.entry.js.map} +0 -0
  323. /package/dist/twilight/{p-342e13e4.system.entry.js.map → p-e09dbe92.system.entry.js.map} +0 -0
  324. /package/dist/twilight/{p-284dae41.system.entry.js.map → p-e45781c5.system.entry.js.map} +0 -0
  325. /package/dist/twilight/{p-154d97db.system.entry.js.map → p-e490de2f.system.entry.js.map} +0 -0
  326. /package/dist/twilight/{p-76137ff1.entry.js.map → p-e9e4a641.entry.js.map} +0 -0
  327. /package/dist/twilight/{p-fe959c9a.system.entry.js.map → p-eb847afb.system.entry.js.map} +0 -0
  328. /package/dist/twilight/{p-50f789e5.entry.js.map → p-f26aa117.entry.js.map} +0 -0
  329. /package/dist/twilight/{p-f6c410c6.entry.js.map → p-f5364a4e.entry.js.map} +0 -0
  330. /package/dist/twilight/{p-5a577bf3.system.entry.js.map → p-f6e14858.system.entry.js.map} +0 -0
  331. /package/dist/twilight/{p-5b4f648e.entry.js.map → p-f8f0dd3d.entry.js.map} +0 -0
  332. /package/dist/twilight/{p-962cd525.entry.js.map → p-fd20f996.entry.js.map} +0 -0
  333. /package/dist/twilight/{p-b4b5a600.system.entry.js.map → p-fe4d5abb.system.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i["throw"](e))}catch(e){s(e)}}function c(e){e.done?n(e.value):a(e.value).then(r,o)}c((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,r;return r={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function o(e){return function(t){return c([e,t])}}function c(o){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,o[0]&&(n=0)),n)try{if(i=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;a=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(o[0]===6&&n.label<s[1]){n.label=s[1];s=o;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(o);break}if(s[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e];a=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
1
+ var __awaiter=this&&this.__awaiter||function(e,n,t,i){function a(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i["throw"](e))}catch(e){s(e)}}function c(e){e.done?t(e.value):a(e.value).then(r,o)}c((i=i.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,r;return r={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function o(e){return function(n){return c([e,n])}}function c(o){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,o[0]&&(t=0)),t)try{if(i=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;a=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(o[0]===6&&t.label<s[1]){t.label=s[1];s=o;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(o);break}if(s[2])t.ops.pop();t.trys.pop();continue}o=n.call(e,t)}catch(e){o=[6,e];a=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-DuTXkmaO.system.js"],(function(e){"use strict";var t,n,i,a,s;return{setters:[function(e){t=e.r;n=e.c;i=e.h;a=e.H;s=e.g}],execute:function(){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>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.333z"></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>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n';var c='\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>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n';var l=":host{display:block}";var u=e("salla_booking_field",function(){function e(e){var i=this;t(this,e);this.invalidInput=n(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((function(){return i.setTranslations()}));Salla.event.on("booking::open",(function(e){return i.handleBookingOpen(e)}))}e.prototype.setTranslations=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=function(e,t,n){return new Promise((function(i){salla.helpers.setNested(salla.lang.messages[e],t,n);i(true)}))};return[4,e("ar.trans","pages.cart.book_an_appointment","حجز موعد")];case 1:t.sent();return[4,e("en.trans","pages.cart.book_an_appointment","Book an Appointment")];case 2:t.sent();return[4,e("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد")];case 3:t.sent();return[4,e("en.trans","pages.cart.edit_an_appointment","Edit an Appointment")];case 4:t.sent();return[4,e("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح")];case 5:t.sent();return[4,e("en.trans","pages.cart.booked_successfully","Booked Successfully")];case 6:t.sent();return[4,e("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد")];case 7:t.sent();return[4,e("en.trans","pages.cart.select_appointment_date","Select appointment date")];case 8:t.sent();this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date");return[2]}}))}))};e.prototype.openBookingModal=function(e,t){var n=this;if(t===void 0){t=false}if(t&&(!e.detail||typeof e.detail!=="number"||e.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((function(e){if(e.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:e.data.redirect.url,id:n.productId})})).catch((function(e){salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(e.response||e)}))};e.prototype.handleBookingOpen=function(e){var t=this;if(e.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",e.id,e.url);this.iframeReady=true;setTimeout((function(){t.modal.setTitle(t.selectDate);t.modal.open()}),100)};e.prototype.setAfterReloadEvent=function(e,t){salla.storage.set("afterReloadEvent",{event:e,payload:t})};e.prototype.emitAfterReloadEvent=function(){var e=salla.storage.get("afterReloadEvent");if(e&&e.event){var t=new CustomEvent(e.event,{detail:e.payload});window.dispatchEvent(t);salla.storage.remove("afterReloadEvent")}};e.prototype.componentWillLoad=function(){if(this.option&&this.option.details.length){this.reservations=this.option.details}};e.prototype.componentDidLoad=function(){var e=this;window.addEventListener("booking::open-after-reload",(function(t){return e.openBookingModal(t,true)}));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(function(t){return e.invalidInput.emit(t)}));this.reservationsInput.addEventListener("input",(function(){e.reservationsInput.setCustomValidity("");e.reservationsInput.reportValidity()}))};e.prototype.handleMessageEvent=function(e){var t,n;if(e.data.source!=="booking")return;var i=e.data.type;var a=e.data.message;if(localStorage.getItem("debug"))console.log("Received an action:".concat(i),e.data);if(i==="error"){if((t=a.fields)===null||t===void 0?void 0:t.reservation){salla.notify.error(a.fields.reservation[0]);return}var s=Object.values(a.fields||[a.message]).flat().map((function(e){return"<li>".concat(e,"</li>")})).join("");salla.notify.error("<ul>".concat(s,"</ul>"))}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((function(e){if(e.time&&e.time.length>0){var t=e.time[0];return{date:e.date,day:e.day,from_timestamp:t.from,to_timestamp:t.to}}return null})).filter((function(e){return e!==null}));salla.notify.success(this.bookedLabel);(n=this.modal)===null||n===void 0?void 0:n.close();setTimeout((function(){return window.location.reload()}))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}};e.prototype.bookingModal=function(){var e=this;return i("salla-modal",{class:"s-booking-field-modal",ref:function(t){return e.modal=t},width:"md",position:"middle",noPadding:true},i("iframe",{ref:function(t){return e.iframe=t},src:this.bookingUrl,frameborder:"0"}))};e.prototype.renderReservationDate=function(e){return i("span",{class:e.from_timestamp?"s-booking-field-reservations-has-time":""},i("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),e.date)};e.prototype.renderReservationTime=function(e){if(!e.from_timestamp)return"";return i("span",{class:"s-booking-field-reservations-time"},i("i",{class:"s-booking-field-reservations-icon",innerHTML:c}),i("span",null,e.from_timestamp," - ",e.to_timestamp))};e.prototype.render=function(){var e=this;return i(a,{key:"56540a5278d395485a411e712929f32cf76f637e"},i("div",{key:"63673b28b671596d47f4f014223e9c5012f3b671",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?i("div",{class:"s-booking-field-price"},i("span",{innerHTML:salla.money(this.option.price)})):"",i("salla-button",{key:"6d9ffa722391aa0234454fe9ddc90f3477268489",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:function(t){return e.openBookingModal(t,false)}},i("span",{key:"dcc8a2b68be4596199e7c776f4501764fd25523f",class:"s-booking-field-book-now-content"},i("span",{key:"b4b2eaf369a5fa822c84b376808c7ee16d8d2598",innerHTML:r}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&i("div",{key:"2684b88bdaf47133dbcaaf6c96f1b81d4ee7ca70",class:"s-booking-field-reservations"},this.reservations.map((function(t,n){return i("div",{key:n,class:"s-booking-field-reservations-item"},e.renderReservationDate(t),e.renderReservationTime(t))}))),i("input",{key:"3d20fcb5fbca8a9e340344d41c316619aec03050",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:function(t){return e.reservationsInput=t}}),this.iframeReady&&this.bookingModal())};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());u.style=l;var f=e("salla_conditional_fields",function(){function e(e){t(this,e)}e.prototype.hideAllOptions=function(e){var t=this;this.host.querySelectorAll('[data-show-when^="options['.concat(e,'"]')).forEach((function(e){e.classList.add("hidden");t.hideAllOptions(e.dataset.optionId);t.disableInputs(e)}))};e.prototype.disableInputs=function(e){e.querySelectorAll("[name]").forEach((function(e){var t;e.setAttribute("disabled","");e.removeAttribute("required");if(((t=e===null||e===void 0?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))};e.prototype.changeHandler=function(e){var t=this;var n;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox","radio"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((n=e===null||e===void 0?void 0:e.target)===null||n===void 0?void 0:n.tagName)||"N/A"));return}var i=e.target.name.replace("[]","");var a=e.target.getAttribute("type")==="checkbox";var s=e.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",'[data-show-when^="'.concat(i,'"]'));this.host.querySelectorAll('[data-show-when^="'.concat(i,'"]')).forEach((function(n){var i=!(n===null||n===void 0?void 0:n.dataset.showWhen.includes("!="));var r=n===null||n===void 0?void 0:n.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();var o;if(a){var c=Array.from(t.host.querySelectorAll('input[name="'.concat(e.target.name,'"]:checked')),(function(e){return e===null||e===void 0?void 0:e.value}));o=c.includes(r.toString())}else if(s){o=e.target.checked&&e.target.value===r}else{o=r===e.target.value}salla.log("The input is ",a?"Multiple":s?"Radio":"Single"," value:",o);var l=i&&o||!i&&!o;if(l){n.classList.remove("hidden");n.querySelectorAll("[name]").forEach((function(e){e.removeAttribute("disabled");var t=e.closest(".s-product-options-option");if(t.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){var n=Array.from(document.querySelectorAll('input[type="checkbox"][name="'.concat(e.getAttribute("name"),'"]')));var i=n.some((function(e){return e.checked}));if(i){n.forEach((function(e){e.removeAttribute("required")}))}}}))}else{t.hideAllOptions(n.dataset.optionId);n.classList.add("hidden");t.disableInputs(n)}}))};e.prototype.componentDidRender=function(){var e=this;this.host.querySelectorAll("[data-show-when]").forEach((function(t){var n;var i=(n=t===null||t===void 0?void 0:t.dataset)===null||n===void 0?void 0:n.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!i){return}e.changeHandler({target:e.host.querySelector('[name^="'+i+'"]')})}))};e.prototype.render=function(){return i(a,{key:"aed72d12357c54338c231d5d4c259a510f8b4e95"},i("slot",{key:"84c5af881a45cee9fa71f5e2e63ee9b92aad76c9"}))};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}())}}}));
5
- //# sourceMappingURL=p-284dae41.system.entry.js.map
4
+ */System.register(["./p-1xnr2J3b.system.js"],(function(e){"use strict";var n,t,i,a,s;return{setters:[function(e){n=e.r;t=e.c;i=e.h;a=e.H;s=e.g}],execute:function(){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>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.333z"></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>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n';var c='\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>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n';var l=":host{display:block}";var u=e("salla_booking_field",function(){function e(e){var i=this;n(this,e);this.invalidInput=t(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((function(){return i.setTranslations()}));Salla.event.on("booking::open",(function(e){return i.handleBookingOpen(e)}))}e.prototype.setTranslations=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:e=function(e,n,t){return new Promise((function(i){salla.helpers.setNested(salla.lang.messages[e],n,t);i(true)}))};return[4,e("ar.trans","pages.cart.book_an_appointment","حجز موعد")];case 1:n.sent();return[4,e("en.trans","pages.cart.book_an_appointment","Book an Appointment")];case 2:n.sent();return[4,e("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد")];case 3:n.sent();return[4,e("en.trans","pages.cart.edit_an_appointment","Edit an Appointment")];case 4:n.sent();return[4,e("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح")];case 5:n.sent();return[4,e("en.trans","pages.cart.booked_successfully","Booked Successfully")];case 6:n.sent();return[4,e("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد")];case 7:n.sent();return[4,e("en.trans","pages.cart.select_appointment_date","Select appointment date")];case 8:n.sent();this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date");return[2]}}))}))};e.prototype.openBookingModal=function(e,n){var t=this;if(n===void 0){n=false}if(n&&(!e.detail||typeof e.detail!=="number"||e.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((function(e){if(e.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:e.data.redirect.url,id:t.productId})})).catch((function(e){salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(e.response||e)}))};e.prototype.handleBookingOpen=function(e){var n=this;if(e.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",e.id,e.url);this.iframeReady=true;setTimeout((function(){n.modal.setTitle(n.selectDate);n.modal.open()}),100)};e.prototype.setAfterReloadEvent=function(e,n){salla.storage.set("afterReloadEvent",{event:e,payload:n})};e.prototype.emitAfterReloadEvent=function(){var e=salla.storage.get("afterReloadEvent");if(e&&e.event){var n=new CustomEvent(e.event,{detail:e.payload});window.dispatchEvent(n);salla.storage.remove("afterReloadEvent")}};e.prototype.componentWillLoad=function(){if(this.option&&this.option.details.length){this.reservations=this.option.details}};e.prototype.componentDidLoad=function(){var e=this;window.addEventListener("booking::open-after-reload",(function(n){return e.openBookingModal(n,true)}));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(function(n){return e.invalidInput.emit(n)}));this.reservationsInput.addEventListener("input",(function(){e.reservationsInput.setCustomValidity("");e.reservationsInput.reportValidity()}))};e.prototype.handleMessageEvent=function(e){var n,t;if(e.data.source!=="booking")return;var i=e.data.type;var a=e.data.message;if(localStorage.getItem("debug"))console.log("Received an action:".concat(i),e.data);if(i==="error"){if((n=a.fields)===null||n===void 0?void 0:n.reservation){salla.notify.error(a.fields.reservation[0]);return}var s=Object.values(a.fields||[a.message]).flat().map((function(e){return"<li>".concat(e,"</li>")})).join("");salla.notify.error("<ul>".concat(s,"</ul>"))}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((function(e){if(e.time&&e.time.length>0){var n=e.time[0];return{date:e.date,day:e.day,from_timestamp:n.from,to_timestamp:n.to}}return null})).filter((function(e){return e!==null}));salla.notify.success(this.bookedLabel);(t=this.modal)===null||t===void 0?void 0:t.close();setTimeout((function(){return window.location.reload()}))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}};e.prototype.bookingModal=function(){var e=this;return i("salla-modal",{class:"s-booking-field-modal",ref:function(n){return e.modal=n},width:"md",position:"middle",noPadding:true},i("iframe",{ref:function(n){return e.iframe=n},src:this.bookingUrl,frameborder:"0"}))};e.prototype.renderReservationDate=function(e){return i("span",{class:e.from_timestamp?"s-booking-field-reservations-has-time":""},i("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),e.date)};e.prototype.renderReservationTime=function(e){if(!e.from_timestamp)return"";return i("span",{class:"s-booking-field-reservations-time"},i("i",{class:"s-booking-field-reservations-icon",innerHTML:c}),i("span",null,e.from_timestamp," - ",e.to_timestamp))};e.prototype.render=function(){var e=this;return i(a,{key:"56540a5278d395485a411e712929f32cf76f637e"},i("div",{key:"63673b28b671596d47f4f014223e9c5012f3b671",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?i("div",{class:"s-booking-field-price"},i("span",{innerHTML:salla.money(this.option.price)})):"",i("salla-button",{key:"6d9ffa722391aa0234454fe9ddc90f3477268489",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:function(n){return e.openBookingModal(n,false)}},i("span",{key:"dcc8a2b68be4596199e7c776f4501764fd25523f",class:"s-booking-field-book-now-content"},i("span",{key:"b4b2eaf369a5fa822c84b376808c7ee16d8d2598",innerHTML:r}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&i("div",{key:"2684b88bdaf47133dbcaaf6c96f1b81d4ee7ca70",class:"s-booking-field-reservations"},this.reservations.map((function(n,t){return i("div",{key:t,class:"s-booking-field-reservations-item"},e.renderReservationDate(n),e.renderReservationTime(n))}))),i("input",{key:"3d20fcb5fbca8a9e340344d41c316619aec03050",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:function(n){return e.reservationsInput=n}}),this.iframeReady&&this.bookingModal())};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());u.style=l;var f=e("salla_conditional_fields",function(){function e(e){n(this,e)}e.prototype.hideAllOptions=function(e){var n=this;this.host.querySelectorAll('[data-show-when^="options['.concat(e,'"]')).forEach((function(e){e.classList.add("hidden");n.hideAllOptions(e.dataset.optionId);n.disableInputs(e)}))};e.prototype.disableInputs=function(e){e.querySelectorAll("[name]").forEach((function(e){var n;e.setAttribute("disabled","");e.removeAttribute("required");if(((n=e===null||e===void 0?void 0:e.tagName)===null||n===void 0?void 0:n.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))};e.prototype.changeHandler=function(e){var n=this;var t;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox","radio"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((t=e===null||e===void 0?void 0:e.target)===null||t===void 0?void 0:t.tagName)||"N/A"));return}var i=e.target.name.replace("[]","");var a=e.target.getAttribute("type")==="checkbox";var s=e.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",'[data-show-when^="'.concat(i,'"]'));this.host.querySelectorAll('[data-show-when^="'.concat(i,'"]')).forEach((function(t){var i=!(t===null||t===void 0?void 0:t.dataset.showWhen.includes("!="));var r=t===null||t===void 0?void 0:t.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();var o;if(a){var c=Array.from(n.host.querySelectorAll('input[name="'.concat(e.target.name,'"]:checked')),(function(e){return e===null||e===void 0?void 0:e.value}));o=c.includes(r.toString())}else if(s){o=e.target.checked&&e.target.value===r}else{o=r===e.target.value}salla.log("The input is ",a?"Multiple":s?"Radio":"Single"," value:",o);var l=i&&o||!i&&!o;if(l){t.classList.remove("hidden");t.querySelectorAll("[name]").forEach((function(e){e.removeAttribute("disabled");var n=e.closest(".s-product-options-option");if(n.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){var t=Array.from(document.querySelectorAll('input[type="checkbox"][name="'.concat(e.getAttribute("name"),'"]')));var i=t.some((function(e){return e.checked}));if(i){t.forEach((function(e){e.removeAttribute("required")}))}}}))}else{n.hideAllOptions(t.dataset.optionId);t.classList.add("hidden");n.disableInputs(t)}}))};e.prototype.componentDidRender=function(){var e=this;this.host.querySelectorAll("[data-show-when]").forEach((function(n){var t;var i=(t=n===null||n===void 0?void 0:n.dataset)===null||t===void 0?void 0:t.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!i){return}e.changeHandler({target:e.host.querySelector('[name^="'+i+'"]')})}))};e.prototype.render=function(){return i(a,{key:"aed72d12357c54338c231d5d4c259a510f8b4e95"},i("slot",{key:"84c5af881a45cee9fa71f5e2e63ee9b92aad76c9"}))};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}())}}}));
5
+ //# sourceMappingURL=p-e45781c5.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-DuTXkmaO.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,s,i,e;return{setters:[function(t){n=t.r;s=t.h;i=t.g},function(t){e=t.a}],execute:function(){var a=":host{display:block}";var r=t("salla_advertisement",function(){function t(t){var s=this;n(this,t);var i;this.currentSlug=salla.config.get("page.slug");salla.onReady((function(){s.currentSlug=salla.config.get("page.slug")}));this.advSlot=((i=this.host.querySelector('[slot="adv"]'))===null||i===void 0?void 0:i.innerHTML)||'<div class="s-advertisement-content"><h2 class="s-advertisement-content-main">{iconElem}{urlElem}</h2>{closeElem}</div>\n '}t.prototype.isNotVisible=function(t){return!!salla.storage.get("statusAd-".concat(t.id))};t.prototype.setCanDisplayFlag=function(t,n){if(!n){salla.storage.set("statusAd-".concat(t.id),"dismissed");e({targets:this.host,opacity:[1,0],duration:300,height:[this.host.clientHeight,0],easing:"easeInOutQuad"})}};t.prototype.render=function(){var t=this;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}return this.advertisements.map((function(n){return s("div",{class:{"s-hidden":t.isNotVisible(n),"s-advertisement":true},"data-id":n.id,style:{"background-color":n.colors.bg,color:n.colors.text}},s("div",{id:"adv-slot",innerHTML:t.advSlot.replace("{iconElem}",'<i class="s-advertisement-content-icon '.concat(n.icon,'"></i>')).replace("{urlElem}",n.url?'<a href="'.concat(n.url,'" target="').concat(n.target,'">').concat(n.description,"</a>"):n.description).replace("{closeElem}",'<button class="s-advertisement-action" aria-label="close-alert"><i class="sicon-cancel"></i></button>').replace("{icon}",n.icon).replace("{url}",n.url).replace("{target}",n.target).replace("{description}",n.description).replace("{bg_color}",n.colors.bg).replace("{text_color}",n.colors.text)}))}))};t.prototype.componentWillLoad=function(){var t=this;return new Promise((function(t){return salla.onReady(t)})).then((function(){return salla.api.advertisement.fetch(t.currentSlug)})).then((function(t){return Array.isArray(t.data)?t.data.find((function(t){return!salla.storage.get("statusAd-".concat(t.id))})):null})).then((function(n){return t.advertisements=n?[n]:[]}))};t.prototype.componentDidRender=function(){var t=this;var n;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}setTimeout((function(){var n=t.host.querySelector(".s-advertisement-action");if(n){n.addEventListener("click",(function(){return t.setCanDisplayFlag(t.advertisements[0],false)}))}}));this.host.querySelectorAll("#adv-slot").forEach((function(t){return t===null||t===void 0?void 0:t.replaceWith(t===null||t===void 0?void 0:t.firstChild)}));(n=this.host.querySelector('[slot="adv"]'))===null||n===void 0?void 0:n.remove();e({targets:this.host,opacity:[0,1],duration:300,height:[0,this.host.clientHeight],easing:"easeInOutQuad"})};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());r.style=a}}}));
5
- //# sourceMappingURL=p-154d97db.system.entry.js.map
4
+ System.register(["./p-1xnr2J3b.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,s,i,e;return{setters:[function(t){n=t.r;s=t.h;i=t.g},function(t){e=t.a}],execute:function(){var a=":host{display:block}";var r=t("salla_advertisement",function(){function t(t){var s=this;n(this,t);var i;this.currentSlug=salla.config.get("page.slug");salla.onReady((function(){s.currentSlug=salla.config.get("page.slug")}));this.advSlot=((i=this.host.querySelector('[slot="adv"]'))===null||i===void 0?void 0:i.innerHTML)||'<div class="s-advertisement-content"><h2 class="s-advertisement-content-main">{iconElem}{urlElem}</h2>{closeElem}</div>\n '}t.prototype.isNotVisible=function(t){return!!salla.storage.get("statusAd-".concat(t.id))};t.prototype.setCanDisplayFlag=function(t,n){if(!n){salla.storage.set("statusAd-".concat(t.id),"dismissed");e({targets:this.host,opacity:[1,0],duration:300,height:[this.host.clientHeight,0],easing:"easeInOutQuad"})}};t.prototype.render=function(){var t=this;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}return this.advertisements.map((function(n){return s("div",{class:{"s-hidden":t.isNotVisible(n),"s-advertisement":true},"data-id":n.id,style:{"background-color":n.colors.bg,color:n.colors.text}},s("div",{id:"adv-slot",innerHTML:t.advSlot.replace("{iconElem}",'<i class="s-advertisement-content-icon '.concat(n.icon,'"></i>')).replace("{urlElem}",n.url?'<a href="'.concat(n.url,'" target="').concat(n.target,'">').concat(n.description,"</a>"):n.description).replace("{closeElem}",'<button class="s-advertisement-action" aria-label="close-alert"><i class="sicon-cancel"></i></button>').replace("{icon}",n.icon).replace("{url}",n.url).replace("{target}",n.target).replace("{description}",n.description).replace("{bg_color}",n.colors.bg).replace("{text_color}",n.colors.text)}))}))};t.prototype.componentWillLoad=function(){var t=this;return new Promise((function(t){return salla.onReady(t)})).then((function(){return salla.api.advertisement.fetch(t.currentSlug)})).then((function(t){return Array.isArray(t.data)?t.data.find((function(t){return!salla.storage.get("statusAd-".concat(t.id))})):null})).then((function(n){return t.advertisements=n?[n]:[]}))};t.prototype.componentDidRender=function(){var t=this;var n;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}setTimeout((function(){var n=t.host.querySelector(".s-advertisement-action");if(n){n.addEventListener("click",(function(){return t.setCanDisplayFlag(t.advertisements[0],false)}))}}));this.host.querySelectorAll("#adv-slot").forEach((function(t){return t===null||t===void 0?void 0:t.replaceWith(t===null||t===void 0?void 0:t.firstChild)}));(n=this.host.querySelector('[slot="adv"]'))===null||n===void 0?void 0:n.remove();e({targets:this.host,opacity:[0,1],duration:300,height:[0,this.host.clientHeight],easing:"easeInOutQuad"})};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());r.style=a}}}));
5
+ //# sourceMappingURL=p-e490de2f.system.entry.js.map