@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
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as e,g as t}from"./p-L1Wml9tS.js";var i;(function(s){s["ProductDetail"]="product.single";s["Cart"]="cart"})(i||(i={}));var r;(function(s){s["Conditional"]="conditional";s["PercentageOrFixed"]="fixed";s["DiscountsTable"]="discounts_table";s["Bank"]="bank";s["BuyXGetY"]="buy_x_get_y";s["SpecialPrice"]="special_price"})(r||(r={}));const a='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';const o=class{constructor(e){s(this,e);var t;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text=s=>salla.lang.get("pages.offer.buy_quantity",{quantity:s});salla.lang.onLoaded((()=>{this.offer_with_price_text=salla.lang.get("pages.offer.with_price");this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text(0)}));salla.onReady((()=>{this.currentPage=salla.config.get("page.slug");this.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((t=this.host.querySelector('[slot="category"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}async getEndpointByPageName(){if(this.currentPage==i.Cart){const s=await Salla.cart.getCurrentCartId();return`offers/cart/${s}`}if(this.currentPage==i.ProductDetail){return`offers/product/${salla.config.get("page.id")}`}return"offers"}emitPromotionViewed(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const s={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[s])}emitPromotionClicked(s=1){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:s};salla.event.emit("promotion::clicked",[e])}componentWillLoad(){this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((s=>salla.onReady(s))).then((()=>{this.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(this.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((async()=>salla.api.request(await this.getEndpointByPageName()))).then((s=>{if(!(this.offersList=s.data).length){throw new Error("salla-offers:: There is no offers!")}const e=this.offersList.find((s=>[r.SpecialPrice,r.Bank,r.BuyXGetY,r.DiscountsTable].includes(s.type)));if(!e){throw new Error("salla-offers:: Offer type not supported yet!")}if(e.type===r.DiscountsTable){return this.offersList=[e]}if(this.isBankOffer=e.type===r.Bank){this.offersList=this.offersList.filter((s=>s.type===r.Bank));this.isMultipleBank=this.offersList.length>1;return this.offersList}if(e.type===r.SpecialPrice){const s=e.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((s=>{e.details.products=s.data;return this.offersList=[e]})):salla.product.api.categories().then((t=>{const i=this.findCategories(t.data,s.targets);e.details.categories=i;return this.offersList=[e]}))}const t=e.details.get;return t.source==="products"?salla.product.api.fetch({source:"selected",source_value:t.source_value}).then((s=>{t.products=s.data;e.details.get=t;return this.offersList=[e]})):salla.product.api.categories().then((s=>{t.categories=this.findCategories(s.data,t.source_value);e.details.get=t;return this.offersList=[e]}))})).then((s=>{salla.storage.set(this.getStorageKey(),{offers:s,stored_at:(new Date).getTime()});this.canRender=true})).catch((s=>{salla.logger.warn(s)}))}componentDidLoad(){let s=this.host.querySelector(".s-slider-block__title-nav");s===null||s===void 0?void 0:s.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()}findCategories(s,e){var t;let i=[];for(const r of s){if(e.includes(r.id_||r.id)){i.push(r)}if(((t=r.sub_categories)===null||t===void 0?void 0:t.length)>0){i=i.concat(this.findCategories(r.sub_categories,e))}}return i}getStorageKey(){try{const s=salla.config.get("page.slug").replace(".","_");const e=salla.lang.getLocale();const t=salla.config.currency().code;if(!s||!e||!t){throw new Error("Unable to get the storage key.")}return`s-offers-${s}-${salla.config.get("page.id")}-${e}-${t}`}catch(s){return""}}getOffersFromStorage(){let s=salla.storage.get(this.getStorageKey());if(!s||s.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(s.offers)}render(){if(!this.offersList.length||!this.canRender||!this.showOffer)return null;const s=this.offersList[0];const t=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:s.title;const i=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:s.description;const r={"block-title":t,"block-subTitle":i,"show-controls":this.isMultipleBank};return e("div",{class:"s-offer-wrapper",onClick:()=>this.emitPromotionClicked()},e("p",{class:"s-offer-corner-badge"},this.special_offer_text),e("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},r),e("div",{slot:"items"},this.renderSectionForOfferType(s.type))))}renderSectionForOfferType(s){if(this.isBankOffer){return this.renderBankSection()}if(s==r.SpecialPrice){return this.renderSpecialPriceSection()}if(s==r.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()}getCategoriesSection(s){return e("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,s.url).replace(/\{icon\}/g,s.icon||"sicon-store").replace(/\{name\}/g,s.name)})}renderBuyXGetYSection(){var s,t;const i=this.offersList[0].details;return[(s=i.get.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s})))),(t=i.get.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s)))]}renderBankSection(){return this.offersList.map((s=>e("div",{class:{"s-offer-slide-one-sixth":this.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!this.isMultipleBank}},e("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!this.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":this.isMultipleBank}},e("div",{class:"s-offer-bank-logo"},e("img",{src:s.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":s.details.logo,alt:s.title+" offer"})),e("ul",{class:"s-offer-bank-payment-wrapper"},s.details.payments.map((s=>e("li",{class:"s-offer-bank-payment-single"},e("img",{src:salla.url.cdn("images/payment/"+s+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+s+".png"),alt:"payment"}))))),this.isMultipleBank?e("p",{class:"s-offer-bank-payment-discount-percent"},`${this.product_discount_text} ${s.details.discount_value}${s.details.discount_type==="percentage"&&"%"}`):""),!this.isMultipleBank?e("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},e("h2",null,this.offersList[0].title),e("p",{innerHTML:this.generateBankDescription(this.offersList[0].description,s.details.discount_value)})):"")))}generateBankDescription(s,e){return s.replace(new RegExp(`${e} %`),`<span class="s-offer-bank-message-amount">${e} %</span>`)}renderDiscountTableSection(){var s;const t=this.offersList[0];let i=t.details.show_price_after_discount;return(s=this.offersList[0].details.discounts)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},e("div",{class:"s-offer-slide-offer-entry"},e("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},e("p",{class:"s-offer-slide-offer-entry-quantity"},this.buy_quantity_text(s.quantity)),i?e("div",{class:"s-offer-slide-offer-entry-price"},e("span",null,this.offer_with_price_text),e("span",{class:"s-offer-slide-offer-entry-price-amount"},s.discounted_amount)," ",e("span",null,this.userCurrency)):""),e("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},this.with_discount_text,"(",e("span",null,s.percentage,!!s.percentage&&"%"),")")))))}renderSpecialPriceSection(){var s,t;const i=this.offersList[0].details;return[i.apply_to==="product"&&((s=i.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s}))))),i.apply_to==="category"&&((t=i.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s))))]}get host(){return t(this)}};o.style=a;export{o as salla_offer};
5
- //# sourceMappingURL=p-7b7618d5.entry.js.map
4
+ import{r as s,h as e,g as t}from"./p-DJeJWTdD.js";var i;(function(s){s["ProductDetail"]="product.single";s["Cart"]="cart"})(i||(i={}));var r;(function(s){s["Conditional"]="conditional";s["PercentageOrFixed"]="fixed";s["DiscountsTable"]="discounts_table";s["Bank"]="bank";s["BuyXGetY"]="buy_x_get_y";s["SpecialPrice"]="special_price"})(r||(r={}));const a='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';const o=class{constructor(e){s(this,e);var t;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text=s=>salla.lang.get("pages.offer.buy_quantity",{quantity:s});salla.lang.onLoaded((()=>{this.offer_with_price_text=salla.lang.get("pages.offer.with_price");this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text(0)}));salla.onReady((()=>{this.currentPage=salla.config.get("page.slug");this.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((t=this.host.querySelector('[slot="category"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}async getEndpointByPageName(){if(this.currentPage==i.Cart){const s=await Salla.cart.getCurrentCartId();return`offers/cart/${s}`}if(this.currentPage==i.ProductDetail){return`offers/product/${salla.config.get("page.id")}`}return"offers"}emitPromotionViewed(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const s={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[s])}emitPromotionClicked(s=1){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:s};salla.event.emit("promotion::clicked",[e])}componentWillLoad(){this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((s=>salla.onReady(s))).then((()=>{this.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(this.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((async()=>salla.api.request(await this.getEndpointByPageName()))).then((s=>{if(!(this.offersList=s.data).length){throw new Error("salla-offers:: There is no offers!")}const e=this.offersList.find((s=>[r.SpecialPrice,r.Bank,r.BuyXGetY,r.DiscountsTable].includes(s.type)));if(!e){throw new Error("salla-offers:: Offer type not supported yet!")}if(e.type===r.DiscountsTable){return this.offersList=[e]}if(this.isBankOffer=e.type===r.Bank){this.offersList=this.offersList.filter((s=>s.type===r.Bank));this.isMultipleBank=this.offersList.length>1;return this.offersList}if(e.type===r.SpecialPrice){const s=e.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((s=>{e.details.products=s.data;return this.offersList=[e]})):salla.product.api.categories().then((t=>{const i=this.findCategories(t.data,s.targets);e.details.categories=i;return this.offersList=[e]}))}const t=e.details.get;return t.source==="products"?salla.product.api.fetch({source:"selected",source_value:t.source_value}).then((s=>{t.products=s.data;e.details.get=t;return this.offersList=[e]})):salla.product.api.categories().then((s=>{t.categories=this.findCategories(s.data,t.source_value);e.details.get=t;return this.offersList=[e]}))})).then((s=>{salla.storage.set(this.getStorageKey(),{offers:s,stored_at:(new Date).getTime()});this.canRender=true})).catch((s=>{salla.logger.warn(s)}))}componentDidLoad(){let s=this.host.querySelector(".s-slider-block__title-nav");s===null||s===void 0?void 0:s.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()}findCategories(s,e){var t;let i=[];for(const r of s){if(e.includes(r.id_||r.id)){i.push(r)}if(((t=r.sub_categories)===null||t===void 0?void 0:t.length)>0){i=i.concat(this.findCategories(r.sub_categories,e))}}return i}getStorageKey(){try{const s=salla.config.get("page.slug").replace(".","_");const e=salla.lang.getLocale();const t=salla.config.currency().code;if(!s||!e||!t){throw new Error("Unable to get the storage key.")}return`s-offers-${s}-${salla.config.get("page.id")}-${e}-${t}`}catch(s){return""}}getOffersFromStorage(){let s=salla.storage.get(this.getStorageKey());if(!s||s.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(s.offers)}render(){if(!this.offersList.length||!this.canRender||!this.showOffer)return null;const s=this.offersList[0];const t=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:s.title;const i=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:s.description;const r={"block-title":t,"block-subTitle":i,"show-controls":this.isMultipleBank};return e("div",{class:"s-offer-wrapper",onClick:()=>this.emitPromotionClicked()},e("p",{class:"s-offer-corner-badge"},this.special_offer_text),e("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},r),e("div",{slot:"items"},this.renderSectionForOfferType(s.type))))}renderSectionForOfferType(s){if(this.isBankOffer){return this.renderBankSection()}if(s==r.SpecialPrice){return this.renderSpecialPriceSection()}if(s==r.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()}getCategoriesSection(s){return e("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,s.url).replace(/\{icon\}/g,s.icon||"sicon-store").replace(/\{name\}/g,s.name)})}renderBuyXGetYSection(){var s,t;const i=this.offersList[0].details;return[(s=i.get.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s})))),(t=i.get.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s)))]}renderBankSection(){return this.offersList.map((s=>e("div",{class:{"s-offer-slide-one-sixth":this.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!this.isMultipleBank}},e("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!this.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":this.isMultipleBank}},e("div",{class:"s-offer-bank-logo"},e("img",{src:s.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":s.details.logo,alt:s.title+" offer"})),e("ul",{class:"s-offer-bank-payment-wrapper"},s.details.payments.map((s=>e("li",{class:"s-offer-bank-payment-single"},e("img",{src:salla.url.cdn("images/payment/"+s+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+s+".png"),alt:"payment"}))))),this.isMultipleBank?e("p",{class:"s-offer-bank-payment-discount-percent"},`${this.product_discount_text} ${s.details.discount_value}${s.details.discount_type==="percentage"&&"%"}`):""),!this.isMultipleBank?e("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},e("h2",null,this.offersList[0].title),e("p",{innerHTML:this.generateBankDescription(this.offersList[0].description,s.details.discount_value)})):"")))}generateBankDescription(s,e){return s.replace(new RegExp(`${e} %`),`<span class="s-offer-bank-message-amount">${e} %</span>`)}renderDiscountTableSection(){var s;const t=this.offersList[0];let i=t.details.show_price_after_discount;return(s=this.offersList[0].details.discounts)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},e("div",{class:"s-offer-slide-offer-entry"},e("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},e("p",{class:"s-offer-slide-offer-entry-quantity"},this.buy_quantity_text(s.quantity)),i?e("div",{class:"s-offer-slide-offer-entry-price"},e("span",null,this.offer_with_price_text),e("span",{class:"s-offer-slide-offer-entry-price-amount"},s.discounted_amount)," ",e("span",null,this.userCurrency)):""),e("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},this.with_discount_text,"(",e("span",null,s.percentage,!!s.percentage&&"%"),")")))))}renderSpecialPriceSection(){var s,t;const i=this.offersList[0].details;return[i.apply_to==="product"&&((s=i.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s}))))),i.apply_to==="category"&&((t=i.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s))))]}get host(){return t(this)}};o.style=a;export{o as salla_offer};
5
+ //# sourceMappingURL=p-594c82e8.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{a as t,d as i,e,f as s,r,h as a,g as n}from"./p-L1Wml9tS.js";import{S as o}from"./p-DiKTtDW5.js";import{H as l}from"./p-DjVGZdqd.js";import"./p-CgtvEd63.js";var c;var u;function f(){if(u)return c;u=1;var i=t();var e=function(){return i.Date.now()};c=e;return c}var h;var d;function v(){if(d)return h;d=1;var t=/\s/;function i(i){var e=i.length;while(e--&&t.test(i.charAt(e))){}return e}h=i;return h}var p;var m;function g(){if(m)return p;m=1;var t=v();var i=/^\s+/;function e(e){return e?e.slice(0,t(e)+1).replace(i,""):e}p=e;return p}var w;var b;function y(){if(b)return w;b=1;var t=g(),s=i(),r=e();var a=0/0;var n=/^[-+]0x[0-9a-f]+$/i;var o=/^0b[01]+$/i;var l=/^0o[0-7]+$/i;var c=parseInt;function u(i){if(typeof i=="number"){return i}if(r(i)){return a}if(s(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=s(e)?e+"":e}if(typeof i!="string"){return i===0?i:+i}i=t(i);var u=o.test(i);return u||l.test(i)?c(i.slice(2),u?2:8):n.test(i)?a:+i}w=u;return w}var _;var k;function T(){if(k)return _;k=1;var t=i(),e=f(),s=y();var r="Expected a function";var a=Math.max,n=Math.min;function o(i,o,l){var c,u,f,h,d,v,p=0,m=false,g=false,w=true;if(typeof i!="function"){throw new TypeError(r)}o=s(o)||0;if(t(l)){m=!!l.leading;g="maxWait"in l;f=g?a(s(l.maxWait)||0,o):f;w="trailing"in l?!!l.trailing:w}function b(t){var e=c,s=u;c=u=undefined;p=t;h=i.apply(s,e);return h}function y(t){p=t;d=setTimeout(T,o);return m?b(t):h}function _(t){var i=t-v,e=t-p,s=o-i;return g?n(s,f-e):s}function k(t){var i=t-v,e=t-p;return v===undefined||i>=o||i<0||g&&e>=f}function T(){var t=e();if(k(t)){return E(t)}d=setTimeout(T,_(t))}function E(t){d=undefined;if(w&&c){return b(t)}c=u=undefined;return h}function S(){if(d!==undefined){clearTimeout(d)}p=0;c=v=u=d=undefined}function M(){return d===undefined?h:E(e())}function x(){var t=e(),i=k(t);c=arguments;u=this;v=t;if(i){if(d===undefined){return y(v)}if(g){clearTimeout(d);d=setTimeout(T,o);return b(v)}}if(d===undefined){d=setTimeout(T,o)}return h}x.cancel=S;x.flush=M;return x}_=o;return _}var E;var S;function M(){if(S)return E;S=1;var t=T(),e=i();var s="Expected a function";function r(i,r,a){var n=true,o=true;if(typeof i!="function"){throw new TypeError(s)}if(e(a)){n="leading"in a?!!a.leading:n;o="trailing"in a?!!a.trailing:o}return t(i,r,{leading:n,maxWait:r,trailing:o})}E=r;return E}var x=M();var C=s(x);class L{constructor(t){this.grid=t;this.create=()=>{this.mutationObserver.observe(this.grid,{childList:true});for(const t of Array.from(this.grid.children)){this.resizeObserver.observe(t)}};this.onContainerMutation=t=>{const i=t.flatMap((t=>Array.from(t.removedNodes)));const e=t.flatMap((t=>Array.from(t.addedNodes)));for(const t of i){if(t instanceof Element){this.resizeObserver.unobserve(t)}}for(const t of e){if(t instanceof Element){this.resizeObserver.observe(t)}}if(i.length>0&&e.length===0){this.update()}};this.onChildrenResize=t=>{const i=t.filter((t=>t.target.parentElement!==null));if(i.length>0){this.update()}};this.update=C((()=>{const t=window.getComputedStyle(this.grid);if(t.getPropertyValue("display").includes("grid")===false){this.clean();return}const i=j(this.grid);if(i.length<=1){this.clean();return}const e=Number.parseFloat(t.getPropertyValue("row-gap").trim())||0;const s=Array.from(this.grid.children);for(let t=0;t<i.length;t++){const i=s[t];i===null||i===void 0?void 0:i.style.removeProperty("margin-top")}for(let t=0;t<s.length;t++){const r=s[t-i.length];const a=s[t];if(r!==undefined&&a!==undefined){const t=r.getBoundingClientRect().bottom;a.style.removeProperty("margin-top");const i=a.getBoundingClientRect().top;if(i-e!==t){const s=Math.round((t-(i-e)+Number.EPSILON)*100)/100;a.style.setProperty("margin-top",`${s}px`)}}}}),32);this.destroy=()=>{this.resizeObserver.disconnect();this.mutationObserver.disconnect();this.clean()};this.clean=()=>{for(const t of Array.from(this.grid.children)){t.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}[Symbol.dispose](){this.destroy()}}function j(t){const i=window.getComputedStyle(t);const e=i.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}const A=":host{display:block}";const R=class{constructor(t){r(this,t);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}getUrlParams(){const t=new URLSearchParams(window.location.search);return{sort:t.get("sort")||null,page:Number.parseInt(t.get("page"))||1}}updateUrlParams(t){const i=new URL(window.location.href);for(const[e,s]of Object.entries(t)){if(s){i.searchParams.set(e,s.toString())}else{i.searchParams.delete(e)}}window.history.replaceState({},"",i.toString())}fetchReviews(t,i){const e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:i||e.page||1,sort:t||e.sort||null}})}async initializeMasonry(){const t=this.el.querySelector(".s-reviews-page-grid");if(!t)return;try{new L(t);salla.logger.info("Masonry initialized successfully")}catch(t){salla.logger.error("Masonry initialization failed:",t)}}animateReviewCards(){const t=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");l.animateItems(t)}initiateInfiniteScroll(){var t,i,e;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>{var t,i;return((i=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||i===void 0?void 0:i.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(()=>{this.isLoading=true}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("load",(t=>{this.pagination=t.pagination;this.reviews=[...this.reviews,...t.data];this.isLoading=false;this.updateUrlParams({page:t.pagination.current_page})}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("error",(t=>{salla.logger.error("Error loading more reviews:",t);this.isLoading=false}))}componentDidRender(){setTimeout((()=>{requestAnimationFrame(this.animateReviewCards.bind(this))}),176)}async componentWillLoad(){var t;try{await salla.onReady();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");const i=this.getUrlParams();const e=await this.fetchReviews(i.sort);this.sort=i.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(t=this.pagination)===null||t===void 0?void 0:t.total)}catch(t){salla.logger.error("Error loading reviews:",t)}}async handleSorting(t){const i=t.target.value;this.sort=i;this.updateUrlParams({sort:i,page:1});const e=await this.fetchReviews(i,1);this.reviews=e.data;this.pagination=e.pagination}async componentDidLoad(){await this.initializeMasonry();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1})}disconnectedCallback(){if(this.infiniteScroll){this.infiniteScroll.destroy()}}renderSortingOptions(){const t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((t=>a("option",{key:t.value,value:t.value,selected:t.value===this.sort},t.label)))}render(){var t,i;return a("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},a("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},a("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,a("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),a("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},a("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),a("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:t=>this.handleSorting(t),disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?a("main",{class:"s-reviews-page-grid",ref:t=>{this.wrapper=t}},this.reviews.map((t=>a("salla-review-card",{key:t.id,review:t})))):a("div",{class:"s-products-list-placeholder"},a("span",{innerHTML:o}),a("p",null,this.placeholderText)),((i=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||i===void 0?void 0:i.next)&&this.reviews.length?a("div",{class:"s-reviews-page-load-more-container"},a("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:()=>{var t;return(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:()=>{var t;return(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)}get el(){return n(this)}};R.style=A;export{R as salla_reviews_page};
5
- //# sourceMappingURL=p-184f98b1.entry.js.map
4
+ import{a as t,d as i,e,f as s,r,h as a,g as n}from"./p-DJeJWTdD.js";import{S as o}from"./p-DiKTtDW5.js";import{H as l}from"./p-DjVGZdqd.js";import"./p-CgtvEd63.js";var c;var u;function f(){if(u)return c;u=1;var i=t();var e=function(){return i.Date.now()};c=e;return c}var h;var d;function v(){if(d)return h;d=1;var t=/\s/;function i(i){var e=i.length;while(e--&&t.test(i.charAt(e))){}return e}h=i;return h}var p;var m;function g(){if(m)return p;m=1;var t=v();var i=/^\s+/;function e(e){return e?e.slice(0,t(e)+1).replace(i,""):e}p=e;return p}var w;var b;function y(){if(b)return w;b=1;var t=g(),s=i(),r=e();var a=0/0;var n=/^[-+]0x[0-9a-f]+$/i;var o=/^0b[01]+$/i;var l=/^0o[0-7]+$/i;var c=parseInt;function u(i){if(typeof i=="number"){return i}if(r(i)){return a}if(s(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=s(e)?e+"":e}if(typeof i!="string"){return i===0?i:+i}i=t(i);var u=o.test(i);return u||l.test(i)?c(i.slice(2),u?2:8):n.test(i)?a:+i}w=u;return w}var _;var T;function k(){if(T)return _;T=1;var t=i(),e=f(),s=y();var r="Expected a function";var a=Math.max,n=Math.min;function o(i,o,l){var c,u,f,h,d,v,p=0,m=false,g=false,w=true;if(typeof i!="function"){throw new TypeError(r)}o=s(o)||0;if(t(l)){m=!!l.leading;g="maxWait"in l;f=g?a(s(l.maxWait)||0,o):f;w="trailing"in l?!!l.trailing:w}function b(t){var e=c,s=u;c=u=undefined;p=t;h=i.apply(s,e);return h}function y(t){p=t;d=setTimeout(k,o);return m?b(t):h}function _(t){var i=t-v,e=t-p,s=o-i;return g?n(s,f-e):s}function T(t){var i=t-v,e=t-p;return v===undefined||i>=o||i<0||g&&e>=f}function k(){var t=e();if(T(t)){return E(t)}d=setTimeout(k,_(t))}function E(t){d=undefined;if(w&&c){return b(t)}c=u=undefined;return h}function M(){if(d!==undefined){clearTimeout(d)}p=0;c=v=u=d=undefined}function S(){return d===undefined?h:E(e())}function x(){var t=e(),i=T(t);c=arguments;u=this;v=t;if(i){if(d===undefined){return y(v)}if(g){clearTimeout(d);d=setTimeout(k,o);return b(v)}}if(d===undefined){d=setTimeout(k,o)}return h}x.cancel=M;x.flush=S;return x}_=o;return _}var E;var M;function S(){if(M)return E;M=1;var t=k(),e=i();var s="Expected a function";function r(i,r,a){var n=true,o=true;if(typeof i!="function"){throw new TypeError(s)}if(e(a)){n="leading"in a?!!a.leading:n;o="trailing"in a?!!a.trailing:o}return t(i,r,{leading:n,maxWait:r,trailing:o})}E=r;return E}var x=S();var C=s(x);class D{constructor(t){this.grid=t;this.create=()=>{this.mutationObserver.observe(this.grid,{childList:true});for(const t of Array.from(this.grid.children)){this.resizeObserver.observe(t)}};this.onContainerMutation=t=>{const i=t.flatMap((t=>Array.from(t.removedNodes)));const e=t.flatMap((t=>Array.from(t.addedNodes)));for(const t of i){if(t instanceof Element){this.resizeObserver.unobserve(t)}}for(const t of e){if(t instanceof Element){this.resizeObserver.observe(t)}}if(i.length>0&&e.length===0){this.update()}};this.onChildrenResize=t=>{const i=t.filter((t=>t.target.parentElement!==null));if(i.length>0){this.update()}};this.update=C((()=>{const t=window.getComputedStyle(this.grid);if(t.getPropertyValue("display").includes("grid")===false){this.clean();return}const i=j(this.grid);if(i.length<=1){this.clean();return}const e=Number.parseFloat(t.getPropertyValue("row-gap").trim())||0;const s=Array.from(this.grid.children);for(let t=0;t<i.length;t++){const i=s[t];i===null||i===void 0?void 0:i.style.removeProperty("margin-top")}for(let t=0;t<s.length;t++){const r=s[t-i.length];const a=s[t];if(r!==undefined&&a!==undefined){const t=r.getBoundingClientRect().bottom;a.style.removeProperty("margin-top");const i=a.getBoundingClientRect().top;if(i-e!==t){const s=Math.round((t-(i-e)+Number.EPSILON)*100)/100;a.style.setProperty("margin-top",`${s}px`)}}}}),32);this.destroy=()=>{this.resizeObserver.disconnect();this.mutationObserver.disconnect();this.clean()};this.clean=()=>{for(const t of Array.from(this.grid.children)){t.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}[Symbol.dispose](){this.destroy()}}function j(t){const i=window.getComputedStyle(t);const e=i.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}const A=":host{display:block}";const L=class{constructor(t){r(this,t);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}getUrlParams(){const t=new URLSearchParams(window.location.search);return{sort:t.get("sort")||null,page:Number.parseInt(t.get("page"))||1}}updateUrlParams(t){const i=new URL(window.location.href);for(const[e,s]of Object.entries(t)){if(s){i.searchParams.set(e,s.toString())}else{i.searchParams.delete(e)}}window.history.replaceState({},"",i.toString())}fetchReviews(t,i){const e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:i||e.page||1,sort:t||e.sort||null}})}async initializeMasonry(){const t=this.el.querySelector(".s-reviews-page-grid");if(!t)return;try{new D(t);salla.logger.info("Masonry initialized successfully")}catch(t){salla.logger.error("Masonry initialization failed:",t)}}animateReviewCards(){const t=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");l.animateItems(t)}initiateInfiniteScroll(){var t,i,e;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>{var t,i;return((i=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||i===void 0?void 0:i.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(()=>{this.isLoading=true}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("load",(t=>{this.pagination=t.pagination;this.reviews=[...this.reviews,...t.data];this.isLoading=false;this.updateUrlParams({page:t.pagination.current_page})}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("error",(t=>{salla.logger.error("Error loading more reviews:",t);this.isLoading=false}))}componentDidRender(){setTimeout((()=>{requestAnimationFrame(this.animateReviewCards.bind(this))}),176)}async componentWillLoad(){var t;try{await salla.onReady();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");const i=this.getUrlParams();const e=await this.fetchReviews(i.sort);this.sort=i.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(t=this.pagination)===null||t===void 0?void 0:t.total)}catch(t){salla.logger.error("Error loading reviews:",t)}}async handleSorting(t){const i=t.target.value;this.sort=i;this.updateUrlParams({sort:i,page:1});const e=await this.fetchReviews(i,1);this.reviews=e.data;this.pagination=e.pagination}async componentDidLoad(){await this.initializeMasonry();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1})}disconnectedCallback(){if(this.infiniteScroll){this.infiniteScroll.destroy()}}renderSortingOptions(){const t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((t=>a("option",{key:t.value,value:t.value,selected:t.value===this.sort},t.label)))}render(){var t,i;return a("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},a("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},a("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,a("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),a("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},a("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),a("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:t=>this.handleSorting(t),disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?a("main",{class:"s-reviews-page-grid",ref:t=>{this.wrapper=t}},this.reviews.map((t=>a("salla-review-card",{key:t.id,review:t})))):a("div",{class:"s-products-list-placeholder"},a("span",{innerHTML:o}),a("p",null,this.placeholderText)),((i=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||i===void 0?void 0:i.next)&&this.reviews.length?a("div",{class:"s-reviews-page-load-more-container"},a("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:()=>{var t;return(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:()=>{var t;return(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)}get el(){return n(this)}};L.style=A;export{L as salla_reviews_page};
5
+ //# sourceMappingURL=p-5a3e638f.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t,H as a,g as e}from"./p-L1Wml9tS.js";const o="";const i=class{constructor(t){s(this,t);this.collapsible=true;this.collapsed=true;this.dir=document.dir||"rtl"}directionChangedHandler(s){this.dir=s.detail.dir}handleCollapse(s){this.collapsed=s.detail.payload.collapsed}setcollapsibleProp(){const s=this.host.querySelector("salla-accordion-head");if(this.collapsible&&s){s.setAttribute("collapsible","true");s.setAttribute("collapsed",this.collapsed.toString())}}componentDidRender(){this.setcollapsibleProp();const s=this.host.querySelector("salla-accordion-body");if(this.collapsible){this.host.setAttribute("data-collapsed",this.collapsed.toString());s===null||s===void 0?void 0:s.setAttribute("data-collapsed",this.collapsed.toString())}}render(){return t(a,{key:"30e906d87cba59e197e71460bb24e578455f2d28",class:`s-accordion-wrapper ${this.dir}`,"data-collapsed":this.collapsed.toString()},t("slot",{key:"8c26efc12856022567e5abe587c7537a5776285b"}))}get host(){return e(this)}};i.style=o;export{i as salla_accordion};
5
- //# sourceMappingURL=p-6fcc8ed3.entry.js.map
4
+ import{r as s,h as t,H as a,g as e}from"./p-DJeJWTdD.js";const o="";const i=class{constructor(t){s(this,t);this.collapsible=true;this.collapsed=true;this.dir=document.dir||"rtl"}directionChangedHandler(s){this.dir=s.detail.dir}handleCollapse(s){this.collapsed=s.detail.payload.collapsed}setcollapsibleProp(){const s=this.host.querySelector("salla-accordion-head");if(this.collapsible&&s){s.setAttribute("collapsible","true");s.setAttribute("collapsed",this.collapsed.toString())}}componentDidRender(){this.setcollapsibleProp();const s=this.host.querySelector("salla-accordion-body");if(this.collapsible){this.host.setAttribute("data-collapsed",this.collapsed.toString());s===null||s===void 0?void 0:s.setAttribute("data-collapsed",this.collapsed.toString())}}render(){return t(a,{key:"30e906d87cba59e197e71460bb24e578455f2d28",class:`s-accordion-wrapper ${this.dir}`,"data-collapsed":this.collapsed.toString()},t("slot",{key:"8c26efc12856022567e5abe587c7537a5776285b"}))}get host(){return e(this)}};i.style=o;export{i as salla_accordion};
5
+ //# sourceMappingURL=p-5f22ded8.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,a,e,n){function r(t){return t instanceof e?t:new e((function(a){a(t)}))}return new(e||(e=Promise))((function(e,i){function s(t){try{o(n.next(t))}catch(t){i(t)}}function u(t){try{o(n["throw"](t))}catch(t){i(t)}}function o(t){t.done?e(t.value):r(t.value).then(s,u)}o((n=n.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(t){return function(a){return o([t,a])}}function o(u){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(n=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;r=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=a.call(t,e)}catch(t){u=[6,t];r=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-DuTXkmaO.system.js"],(function(t){"use strict";var a,e,n,r;return{setters:[function(t){a=t.r;e=t.h;n=t.H;r=t.g}],execute:function(){var i="";var s=t("salla_metadata",function(){function t(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(t){salla.log("Bad json passed via entityId prop")}}}t.prototype.getValue=function(t){if(t.type==="file"){return'<a href="'.concat(t.value,'" class="text-primary" target="_blank"><span class="sicon-download"></span> ').concat(this.download,"</a>")}if(t.type==="url"){return'<a href="'.concat(t.value,'" class="text-blue-700 underline" target="_blank">').concat(t.value,"</a>")}if(t.type==="date"){var a=new Date(t.value);var e=String(a.getDate()).padStart(2,"0");var n=String(a.getMonth()+1).padStart(2,"0");var r=a.getFullYear();var i="".concat(e,"/").concat(n,"/").concat(r);return i}return t.value};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,e;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.onReady()];case 1:n.sent();if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("custom-fields"))){return[2,salla.logger.error("feature custom-fields is not activated")]}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return[2,salla.logger.error("can't render salla-metadata without enity-id prop!")]}return[4,salla.lang.onLoaded()];case 2:n.sent();this.download=salla.lang.get("pages.thank_you.download");return[4,Salla.api.metadata.fetchValues(this.entity,this.entityId)];case 3:e=n.sent();this.specs=(a=e.data[0])===null||a===void 0?void 0:a.sections;return[2]}}))}))};t.prototype.render=function(){var t=this;if(!this.specs.length){return}return e(n,{class:"s-metadata-wrapper"},this.specs.map((function(a){return e("div",{class:"s-metadata-box"},e("div",{class:"s-metadata-box-header"},e("i",{class:"sicon-list"}),a.name),a.fields.map((function(a){return e("div",{class:"s-metadata-row"},e("p",{class:"s-metadata-row-name"},a.name),e("p",{class:"s-metadata-row-value",innerHTML:t.getValue(a)}))})))})))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());s.style=i}}}));
5
- //# sourceMappingURL=p-e00746e9.system.entry.js.map
4
+ */System.register(["./p-1xnr2J3b.system.js"],(function(t){"use strict";var a,e,n,r;return{setters:[function(t){a=t.r;e=t.h;n=t.H;r=t.g}],execute:function(){var i="";var s=t("salla_metadata",function(){function t(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(t){salla.log("Bad json passed via entityId prop")}}}t.prototype.getValue=function(t){if(t.type==="file"){return'<a href="'.concat(t.value,'" class="text-primary" target="_blank"><span class="sicon-download"></span> ').concat(this.download,"</a>")}if(t.type==="url"){return'<a href="'.concat(t.value,'" class="text-blue-700 underline" target="_blank">').concat(t.value,"</a>")}if(t.type==="date"){var a=new Date(t.value);var e=String(a.getDate()).padStart(2,"0");var n=String(a.getMonth()+1).padStart(2,"0");var r=a.getFullYear();var i="".concat(e,"/").concat(n,"/").concat(r);return i}return t.value};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,e;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.onReady()];case 1:n.sent();if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("custom-fields"))){return[2,salla.logger.error("feature custom-fields is not activated")]}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return[2,salla.logger.error("can't render salla-metadata without enity-id prop!")]}return[4,salla.lang.onLoaded()];case 2:n.sent();this.download=salla.lang.get("pages.thank_you.download");return[4,Salla.api.metadata.fetchValues(this.entity,this.entityId)];case 3:e=n.sent();this.specs=(a=e.data[0])===null||a===void 0?void 0:a.sections;return[2]}}))}))};t.prototype.render=function(){var t=this;if(!this.specs.length){return}return e(n,{class:"s-metadata-wrapper"},this.specs.map((function(a){return e("div",{class:"s-metadata-box"},e("div",{class:"s-metadata-box-header"},e("i",{class:"sicon-list"}),a.name),a.fields.map((function(a){return e("div",{class:"s-metadata-row"},e("p",{class:"s-metadata-row-name"},a.name),e("p",{class:"s-metadata-row-value",innerHTML:t.getValue(a)}))})))})))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());s.style=i}}}));
5
+ //# sourceMappingURL=p-60550d95.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,n,i,e){function r(t){return t instanceof i?t:new i((function(n){n(t)}))}return new(i||(i=Promise))((function(i,o){function s(t){try{u(e.next(t))}catch(t){o(t)}}function a(t){try{u(e["throw"](t))}catch(t){o(t)}}function u(t){t.done?i(t.value):r(t.value).then(s,a)}u((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},e,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(n){return u([t,n])}}function u(a){if(e)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(e=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=n.call(t,i)}catch(t){a=[6,t];r=0}finally{e=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-DuTXkmaO.system.js","./p-C-c0Msup.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,i,e,r;return{setters:[function(t){n=t.r;i=t.h;e=t.g},function(t){r=t.H},null],execute:function(){var o="";var s=t("salla_notifications",function(){function t(t){var i=this;n(this,t);this.itemPerPage=10;this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");this.load_more_text_trans=salla.lang.get("common.elements.load_more");salla.lang.onLoaded((function(){i.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");i.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var n;var i=(n=this.status)===null||n===void 0?void 0:n.querySelector(".s-button-text");if(i){r.toggleElementClassIf(i,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.getNotificationCard=function(t){var n=document.createElement("salla-notification-item");n.notification=t;n.classList.add("s-block");return n};t.prototype.render=function(){var t=this;var n;if(this.showPlaceholder){return i("div",{class:"s-notifications-no-content"},i("salla-placeholder",{alignment:"center"},i("span",{slot:"title"},this.no_notifications_trans)))}return i("div",{class:"s-notifications-wrapper"},i("div",{class:"s-notifications-container",ref:function(n){return t.wrapper=n}}),this.nextPage&&i("div",{class:"s-infinite-scroll-wrapper",ref:function(n){return t.status=n}},i("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},i("span",{class:"s-button-text s-infinite-scroll-btn-text"},(n=this.loadMoreText)!==null&&n!==void 0?n:this.load_more_text_trans),i("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(n){return t.btnLoader=n},style:{display:"none"}}))))};t.prototype.handleResponse=function(t){var n=this;return t.map((function(t){return n.getNotificationCard(t)}))};t.prototype.initiateInfiniteScroll=function(){var t=this;var n,i,e;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){return t.nextPage},history:true,nextPage:this.nextPage,scrollThreshold:false},true);(n=this.infiniteScroll)===null||n===void 0?void 0:n.on("request",(function(n){t.loading()}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("load",(function(n){var i;t.loading(false);t.pagination=n.pagination;t.nextPage=((i=n.pagination.links)===null||i===void 0?void 0:i.next)||null;t.handleResponse(n.data).forEach((function(n){return t.wrapper.append(n)}));var e=t.host.querySelectorAll("salla-notification-item:not(.animated)");r.animateItems(e)}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.api.notifications.fetch({per_page:this.itemPerPage}).then((function(n){var i;t.pagination=n.pagination;t.total=n.pagination.total;t.nextPage=((i=n.pagination.links)===null||i===void 0?void 0:i.next)||null;setTimeout((function(){if(!n.data.length){return t.showPlaceholder=true}t.handleResponse(n.data).forEach((function(n){return t.wrapper.append(n)}));t.initiateInfiniteScroll();var i=t.wrapper.querySelectorAll("salla-notification-item:not(.animated)");r.animateItems(i)}),100)})).catch((function(n){salla.logger.error(n);t.showPlaceholder=true;t.loading(false)}))];case 1:n.sent();return[2]}}))}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage();return[2]}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.loadInitialData()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());s.style=o}}}));
5
- //# sourceMappingURL=p-5b8bf0e6.system.entry.js.map
4
+ */System.register(["./p-1xnr2J3b.system.js","./p-C-c0Msup.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,i,e,r;return{setters:[function(t){n=t.r;i=t.h;e=t.g},function(t){r=t.H},null],execute:function(){var o="";var s=t("salla_notifications",function(){function t(t){var i=this;n(this,t);this.itemPerPage=10;this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");this.load_more_text_trans=salla.lang.get("common.elements.load_more");salla.lang.onLoaded((function(){i.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");i.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var n;var i=(n=this.status)===null||n===void 0?void 0:n.querySelector(".s-button-text");if(i){r.toggleElementClassIf(i,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.getNotificationCard=function(t){var n=document.createElement("salla-notification-item");n.notification=t;n.classList.add("s-block");return n};t.prototype.render=function(){var t=this;var n;if(this.showPlaceholder){return i("div",{class:"s-notifications-no-content"},i("salla-placeholder",{alignment:"center"},i("span",{slot:"title"},this.no_notifications_trans)))}return i("div",{class:"s-notifications-wrapper"},i("div",{class:"s-notifications-container",ref:function(n){return t.wrapper=n}}),this.nextPage&&i("div",{class:"s-infinite-scroll-wrapper",ref:function(n){return t.status=n}},i("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},i("span",{class:"s-button-text s-infinite-scroll-btn-text"},(n=this.loadMoreText)!==null&&n!==void 0?n:this.load_more_text_trans),i("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(n){return t.btnLoader=n},style:{display:"none"}}))))};t.prototype.handleResponse=function(t){var n=this;return t.map((function(t){return n.getNotificationCard(t)}))};t.prototype.initiateInfiniteScroll=function(){var t=this;var n,i,e;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){return t.nextPage},history:true,nextPage:this.nextPage,scrollThreshold:false},true);(n=this.infiniteScroll)===null||n===void 0?void 0:n.on("request",(function(n){t.loading()}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("load",(function(n){var i;t.loading(false);t.pagination=n.pagination;t.nextPage=((i=n.pagination.links)===null||i===void 0?void 0:i.next)||null;t.handleResponse(n.data).forEach((function(n){return t.wrapper.append(n)}));var e=t.host.querySelectorAll("salla-notification-item:not(.animated)");r.animateItems(e)}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.api.notifications.fetch({per_page:this.itemPerPage}).then((function(n){var i;t.pagination=n.pagination;t.total=n.pagination.total;t.nextPage=((i=n.pagination.links)===null||i===void 0?void 0:i.next)||null;setTimeout((function(){if(!n.data.length){return t.showPlaceholder=true}t.handleResponse(n.data).forEach((function(n){return t.wrapper.append(n)}));t.initiateInfiniteScroll();var i=t.wrapper.querySelectorAll("salla-notification-item:not(.animated)");r.animateItems(i)}),100)})).catch((function(n){salla.logger.error(n);t.showPlaceholder=true;t.loading(false)}))];case 1:n.sent();return[2]}}))}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage();return[2]}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.loadInitialData()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());s.style=o}}}));
5
+ //# sourceMappingURL=p-611a0591.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t}from"./p-L1Wml9tS.js";import{I as a}from"./p-uTyAzPSy.js";var e=`\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>file-archive</title>\n<path d="M17.333 16h-5.333c-0.737 0-1.333 0.597-1.333 1.333v2.667c0 2.205 1.795 4 4 4s4-1.795 4-4v-2.667c0-0.736-0.596-1.333-1.333-1.333zM16 20c0 0.735-0.597 1.333-1.333 1.333s-1.333-0.599-1.333-1.333v-1.333h2.667zM17.333 12h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM28.943 8.391l-8-8c-0.249-0.251-0.588-0.391-0.943-0.391h-13.333c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h18.667c2.205 0 4-1.795 4-4v-18.667c0-0.353-0.14-0.693-0.391-0.943zM26.667 28c0 0.735-0.597 1.333-1.333 1.333h-18.667c-0.736 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.597-1.333 1.333-1.333h12.781l7.219 7.219zM17.333 8h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM17.333 4h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-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>download</title>\n<path d="M15.056 20.941c0.123 0.124 0.271 0.221 0.435 0.289 0.163 0.067 0.336 0.103 0.509 0.103s0.347-0.036 0.509-0.103c0.164-0.068 0.311-0.165 0.435-0.289l5.332-5.332c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-3.057 3.057v-12.781c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v12.781l-3.057-3.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885zM25.333 26.667h-18.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h18.667c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n`;var i=`\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>swap-stroke</title>\n<path d="M6.667 18.667h-2.667c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333v2.667c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-2.667c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h2.667c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM28 10.667h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.597 1.333-1.333 1.333h-13.333c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333z"></path>\n</svg>\n`;var l=`\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>debit-card-back</title>\n<path d="M30 28h-28c-1.105 0-2-0.895-2-2v0-18c0-1.105 0.895-2 2-2v0h28c1.105 0 2 0.895 2 2v0 18c0 1.105-0.895 2-2 2v0zM30 26v0zM2 8v18h28v-18zM31 14h-30c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h30c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM11 22h-6c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h6c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM24 24c-2.209 0-4-1.791-4-4s1.791-4 4-4c2.209 0 4 1.791 4 4v0c0 2.209-1.791 4-4 4v0zM24 18c-1.105 0-2 0.895-2 2s0.895 2 2 2c1.105 0 2-0.895 2-2v0c0-1.105-0.895-2-2-2v0zM20 24c-2.209 0-4-1.791-4-4s1.791-4 4-4v0c0.002 0 0.005 0 0.007 0 1.032 0 1.972 0.398 2.673 1.048l-0.003-0.002c0.191 0.183 0.311 0.439 0.311 0.724 0 0.552-0.448 1-1 1-0.257 0-0.492-0.097-0.669-0.257l0.001 0.001c-0.345-0.319-0.807-0.514-1.315-0.514-0.002 0-0.003 0-0.005 0h0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0c0.002 0 0.004 0 0.007 0 0.508 0 0.971-0.195 1.317-0.515l-0.001 0.001c0.179-0.171 0.422-0.276 0.689-0.276 0.552 0 1 0.448 1 1 0 0.295-0.128 0.56-0.331 0.743l-0.001 0.001c-0.699 0.648-1.638 1.046-2.671 1.046-0.003 0-0.007 0-0.010 0h0.001z"></path>\n</svg>\n`;const n=":host{display:block}";const h=class{constructor(t){s(this,t);this.codeCopied=null;this.noItemFound=true;this.order_items=[];this.isDigitalCard=s=>s.product.type==="codes";this.isDigitalProduct=s=>s.product.type==="digital"}async componentWillLoad(){salla.lang.onLoaded((()=>{this.codes_text=salla.lang.get("pages.thank_you.codes");this.copy_text=salla.lang.get("common.elements.copy");this.files_text=salla.lang.get("pages.thank_you.files");this.download_text=salla.lang.get("pages.thank_you.download")}));return await this.getOrderItems()}copyToClipboardHandler(s){if(navigator&&"clipboard"in navigator){try{navigator.clipboard.writeText(s).then((()=>{this.codeCopied=s;this.copyCodeButtonTimeout=setTimeout((()=>{this.codeCopied=null}),3e3)}))}catch(s){salla.loggers.error("copy functionality is not supported by the browser")}}}async getOrderItems(){const s=this.orderId||salla.config.get("page.id");const t="Failed to fetch order items";if(!s){salla.logger.error(t);throw new Error(t)}try{const{data:{items:t=[]}}=await salla.api.request(`orders/${s}`);const a=t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)));if(a){this.order_items=t;this.noItemFound=false}}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{key:"6358d81e74e1fd966b7046deab946f33391b2fc6",class:"s-order-summary-wrapper"},this.noItemFound?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"})):this.order_items.map((s=>this.isDigitalCard(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.codes_text," (",s.name,")"),s.codes.map((s=>t("div",{key:s.code,class:"s-order-summary-code-item-wrapper"},t("p",null,t("span",{innerHTML:l}),t("span",null,s.code)),t("salla-button",{class:`s-order-summary-item-copy-button ${this.codeCopied===s.code?"copied":""}`,onClick:()=>this.copyToClipboardHandler(s.code),shape:"link"},t("span",{innerHTML:this.codeCopied===s.code?a:i}),t("span",null,this.copy_text)))))):this.isDigitalProduct(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.files_text," (",s.name,")"),t("ul",null,s.files.map((s=>t("li",{class:"s-order-summary-digital-item-wrapper"},t("div",null,t("span",{innerHTML:e}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:c}),t("span",null,this.download_text))))))):null)))}};h.style=n;export{h as salla_order_summary};
5
- //# sourceMappingURL=p-af1f9cd6.entry.js.map
4
+ import{r as s,h as t}from"./p-DJeJWTdD.js";import{I as a}from"./p-uTyAzPSy.js";var e=`\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>file-archive</title>\n<path d="M17.333 16h-5.333c-0.737 0-1.333 0.597-1.333 1.333v2.667c0 2.205 1.795 4 4 4s4-1.795 4-4v-2.667c0-0.736-0.596-1.333-1.333-1.333zM16 20c0 0.735-0.597 1.333-1.333 1.333s-1.333-0.599-1.333-1.333v-1.333h2.667zM17.333 12h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM28.943 8.391l-8-8c-0.249-0.251-0.588-0.391-0.943-0.391h-13.333c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h18.667c2.205 0 4-1.795 4-4v-18.667c0-0.353-0.14-0.693-0.391-0.943zM26.667 28c0 0.735-0.597 1.333-1.333 1.333h-18.667c-0.736 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.597-1.333 1.333-1.333h12.781l7.219 7.219zM17.333 8h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM17.333 4h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-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>download</title>\n<path d="M15.056 20.941c0.123 0.124 0.271 0.221 0.435 0.289 0.163 0.067 0.336 0.103 0.509 0.103s0.347-0.036 0.509-0.103c0.164-0.068 0.311-0.165 0.435-0.289l5.332-5.332c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-3.057 3.057v-12.781c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v12.781l-3.057-3.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885zM25.333 26.667h-18.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h18.667c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n`;var i=`\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>swap-stroke</title>\n<path d="M6.667 18.667h-2.667c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333v2.667c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-2.667c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h2.667c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM28 10.667h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.597 1.333-1.333 1.333h-13.333c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333z"></path>\n</svg>\n`;var l=`\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>debit-card-back</title>\n<path d="M30 28h-28c-1.105 0-2-0.895-2-2v0-18c0-1.105 0.895-2 2-2v0h28c1.105 0 2 0.895 2 2v0 18c0 1.105-0.895 2-2 2v0zM30 26v0zM2 8v18h28v-18zM31 14h-30c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h30c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM11 22h-6c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h6c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM24 24c-2.209 0-4-1.791-4-4s1.791-4 4-4c2.209 0 4 1.791 4 4v0c0 2.209-1.791 4-4 4v0zM24 18c-1.105 0-2 0.895-2 2s0.895 2 2 2c1.105 0 2-0.895 2-2v0c0-1.105-0.895-2-2-2v0zM20 24c-2.209 0-4-1.791-4-4s1.791-4 4-4v0c0.002 0 0.005 0 0.007 0 1.032 0 1.972 0.398 2.673 1.048l-0.003-0.002c0.191 0.183 0.311 0.439 0.311 0.724 0 0.552-0.448 1-1 1-0.257 0-0.492-0.097-0.669-0.257l0.001 0.001c-0.345-0.319-0.807-0.514-1.315-0.514-0.002 0-0.003 0-0.005 0h0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0c0.002 0 0.004 0 0.007 0 0.508 0 0.971-0.195 1.317-0.515l-0.001 0.001c0.179-0.171 0.422-0.276 0.689-0.276 0.552 0 1 0.448 1 1 0 0.295-0.128 0.56-0.331 0.743l-0.001 0.001c-0.699 0.648-1.638 1.046-2.671 1.046-0.003 0-0.007 0-0.010 0h0.001z"></path>\n</svg>\n`;const n=":host{display:block}";const h=class{constructor(t){s(this,t);this.codeCopied=null;this.noItemFound=true;this.order_items=[];this.isDigitalCard=s=>s.product.type==="codes";this.isDigitalProduct=s=>s.product.type==="digital"}async componentWillLoad(){salla.lang.onLoaded((()=>{this.codes_text=salla.lang.get("pages.thank_you.codes");this.copy_text=salla.lang.get("common.elements.copy");this.files_text=salla.lang.get("pages.thank_you.files");this.download_text=salla.lang.get("pages.thank_you.download")}));return await this.getOrderItems()}copyToClipboardHandler(s){if(navigator&&"clipboard"in navigator){try{navigator.clipboard.writeText(s).then((()=>{this.codeCopied=s;this.copyCodeButtonTimeout=setTimeout((()=>{this.codeCopied=null}),3e3)}))}catch(s){salla.loggers.error("copy functionality is not supported by the browser")}}}async getOrderItems(){const s=this.orderId||salla.config.get("page.id");const t="Failed to fetch order items";if(!s){salla.logger.error(t);throw new Error(t)}try{const{data:{items:t=[]}}=await salla.api.request(`orders/${s}`);const a=t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)));if(a){this.order_items=t;this.noItemFound=false}}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{key:"6358d81e74e1fd966b7046deab946f33391b2fc6",class:"s-order-summary-wrapper"},this.noItemFound?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"})):this.order_items.map((s=>this.isDigitalCard(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.codes_text," (",s.name,")"),s.codes.map((s=>t("div",{key:s.code,class:"s-order-summary-code-item-wrapper"},t("p",null,t("span",{innerHTML:l}),t("span",null,s.code)),t("salla-button",{class:`s-order-summary-item-copy-button ${this.codeCopied===s.code?"copied":""}`,onClick:()=>this.copyToClipboardHandler(s.code),shape:"link"},t("span",{innerHTML:this.codeCopied===s.code?a:i}),t("span",null,this.copy_text)))))):this.isDigitalProduct(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.files_text," (",s.name,")"),t("ul",null,s.files.map((s=>t("li",{class:"s-order-summary-digital-item-wrapper"},t("div",null,t("span",{innerHTML:e}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:c}),t("span",null,this.download_text))))))):null)))}};h.style=n;export{h as salla_order_summary};
5
+ //# sourceMappingURL=p-62372bb6.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,r,e,n){function s(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function i(t){try{u(n["throw"](t))}catch(t){o(t)}}function u(t){t.done?e(t.value):s(t.value).then(a,i)}u((n=n.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(t){return function(r){return u([t,r])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,i[0]&&(e=0)),e)try{if(n=1,s&&(o=i[0]&2?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;if(s=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:e.label++;return{value:i[1],done:false};case 5:e.label++;s=i[1];i=[0];continue;case 7:i=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){e.label=i[1];break}if(i[0]===6&&e.label<o[1]){e.label=o[1];o=i;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(i);break}if(o[2])e.ops.pop();e.trys.pop();continue}i=r.call(t,e)}catch(t){i=[6,t];s=0}finally{n=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-DuTXkmaO.system.js","./p-C-c0Msup.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var r,e,n,s;return{setters:[function(t){r=t.r;e=t.h;n=t.g},function(t){s=t.H},null],execute:function(){var o=":host{display:block}";var a=t("salla_orders",function(){function t(t){var e=this;r(this,t);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((function(){e.languageCode=salla.lang.locale;e.orderNumberText=salla.lang.get("pages.thank_you.order_id");e.totalOrderText=salla.lang.get("pages.orders.total");e.orderDateText=salla.lang.get("pages.orders.date");e.orderStatusText=salla.lang.get("pages.orders.status");e.noOrderText=salla.lang.get("pages.orders.non_orders");e.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var r;var e=(r=this.status)===null||r===void 0?void 0:r.querySelector(".s-button-text");if(e){s.toggleElementClassIf(e,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.initiateInfiniteScroll=function(){var t=this;var r,e,n;if(!this.hasInfiniteScroll){return}if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){return t.nextPage},history:false,nextPage:this.nextPage,scrollThreshold:false},true);(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("request",(function(r){t.loading()}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(r){var e,n;t.loading(false);t.pagination=r.pagination;t.nextPage=((n=(e=r.pagination)===null||e===void 0?void 0:e.links)===null||n===void 0?void 0:n.next)||null;t.handleResponse(r.data).forEach((function(r){t.wrapper.append(r)}));var o=t.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(o)}));(n=this.infiniteScroll)===null||n===void 0?void 0:n.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.infiniteScroll.loadNextPage();return[2]}))}))};t.prototype.handleResponse=function(t){var r=this;return t.map((function(t){return r.getSingleOrderItem(t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(e){switch(e.label){case 0:t=new URL(window.location.href);return[4,salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((function(t){var e,n,o,a;r.orders=t.data;r.hasInfiniteScroll=!!((e=t.pagination)===null||e===void 0?void 0:e.links.next);r.pagination=t.pagination;r.total=(n=t.pagination)===null||n===void 0?void 0:n.total;r.nextPage=((a=(o=t.pagination)===null||o===void 0?void 0:o.links)===null||a===void 0?void 0:a.next)||null;if(!r.orders.length){r.showPlaceholder=true;return r.loading(false)}setTimeout((function(){r.handleResponse(t.data).forEach((function(t){r.wrapper.append(t)}));r.initiateInfiniteScroll();var e=r.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(e)}),100)})).catch((function(t){r.showPlaceholder=true;r.loading(false);salla.logger.error(t)}))];case 1:e.sent();return[2]}}))}))};t.prototype.getSingleOrderItem=function(t){var r=document.createElement("tr");r.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");var e=document.createElement("td");e.classList.add("s-orders-table-tbody-tr-td");var n=document.createElement("div");n.classList.add("s-orders-table-tbody-tr-td-content");var o=document.createElement("span");o.classList.add("s-orders-mobile-title");o.textContent=this.orderNumberText+":";var a=document.createElement("span");a.classList.add("s-orders-reference-id");a.textContent="#"+t.reference_id;n.appendChild(o);n.appendChild(a);if(t.source=="buy_as_gift"){var i=document.createElement("i");i.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");n.appendChild(i)}var u=document.createElement("a");u.href=t.url;n.appendChild(u);var l=document.createElement("div");l.classList.add("s-orders-copy-to-clipboard-button");var d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(function(t){s.copyToClipboard(t);s.toggleElementClassIf(d,"copied","code-to-copy",(function(){return true}));setTimeout((function(){s.toggleElementClassIf(d,"code-to-copy","copied",(function(){return true}))}),1e3)}));var c=document.createElement("span");c.textContent="#"+t.reference_id;var f=document.createElement("i");f.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");var h=salla.config.get("theme.is_rtl",true);if(h){d.appendChild(f);d.appendChild(c)}else{d.appendChild(c);d.appendChild(f)}l.appendChild(d);n.appendChild(l);e.appendChild(n);r.appendChild(e);var v=document.createElement("td");v.classList.add("s-orders-table-tbody-tr-td");var b=document.createElement("div");b.classList.add("s-orders-table-tbody-tr-td-content");var m=document.createElement("span");m.classList.add("s-orders-mobile-title");m.textContent=this.totalOrderText+":";var p=document.createElement("div");p.innerHTML=salla.money(t.total);var y=document.createElement("a");y.href=t.url;b.appendChild(m);b.appendChild(p);b.appendChild(y);v.appendChild(b);r.appendChild(v);var _=document.createElement("td");_.classList.add("s-orders-table-tbody-tr-td");var g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");var w=document.createElement("span");w.classList.add("s-orders-mobile-title");w.textContent=this.orderDateText+":";var k=document.createElement("div");k.textContent=s.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);var x=document.createElement("a");x.href=t.url;g.appendChild(w);g.appendChild(k);g.appendChild(x);_.appendChild(g);r.appendChild(_);var j=document.createElement("td");j.classList.add("s-orders-table-tbody-tr-td");var T=document.createElement("div");T.classList.add("s-orders-table-tbody-tr-td-content");var C=document.createElement("span");C.classList.add("s-orders-mobile-title");C.textContent=this.orderStatusText+":";var O=document.createElement("span");O.classList.add("s-orders-status-container");O.style.color=t.status.color;var S=document.createElement("i");S.classList.add(t.status.icon);var q=document.createElement("span");q.textContent=t.status.name;O.appendChild(S);O.appendChild(q);T.appendChild(C);T.appendChild(O);var E=document.createElement("i");E.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");T.appendChild(E);var L=document.createElement("a");L.href=t.url;T.appendChild(L);j.appendChild(T);r.appendChild(j);return r};t.prototype.render=function(){var t=this;var r;if(this.showPlaceholder){return e("div",{class:"s-orders-no-content"},e("i",{class:"sicon-packed-box icon"}),e("p",null,this.noOrderText))}return e("div",{class:"s-orders-wrapper"},e("table",{class:"s-orders-table"},e("thead",{class:"s-orders-table-head"},e("tr",{class:"s-orders-table-head-tr"},e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),e("tbody",{class:"s-orders-table-tbody",ref:function(r){return t.wrapper=r}})),this.nextPage&&e("div",{class:"s-infinite-scroll-wrapper",ref:function(r){return t.status=r}},e("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},e("span",{class:"s-button-text s-infinite-scroll-btn-text"},(r=this.loadMoreText)!==null&&r!==void 0?r:this.load_more_text_trans),e("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(r){return t.btnLoader=r},style:{display:"none"}}))))};t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadInitialData()})).then((function(){return t.initiateInfiniteScroll()}))};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());a.style=o}}}));
5
- //# sourceMappingURL=p-789f0166.system.entry.js.map
4
+ */System.register(["./p-1xnr2J3b.system.js","./p-C-c0Msup.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var r,e,n,s;return{setters:[function(t){r=t.r;e=t.h;n=t.g},function(t){s=t.H},null],execute:function(){var o=":host{display:block}";var a=t("salla_orders",function(){function t(t){var e=this;r(this,t);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((function(){e.languageCode=salla.lang.locale;e.orderNumberText=salla.lang.get("pages.thank_you.order_id");e.totalOrderText=salla.lang.get("pages.orders.total");e.orderDateText=salla.lang.get("pages.orders.date");e.orderStatusText=salla.lang.get("pages.orders.status");e.noOrderText=salla.lang.get("pages.orders.non_orders");e.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var r;var e=(r=this.status)===null||r===void 0?void 0:r.querySelector(".s-button-text");if(e){s.toggleElementClassIf(e,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.initiateInfiniteScroll=function(){var t=this;var r,e,n;if(!this.hasInfiniteScroll){return}if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){return t.nextPage},history:false,nextPage:this.nextPage,scrollThreshold:false},true);(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("request",(function(r){t.loading()}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(r){var e,n;t.loading(false);t.pagination=r.pagination;t.nextPage=((n=(e=r.pagination)===null||e===void 0?void 0:e.links)===null||n===void 0?void 0:n.next)||null;t.handleResponse(r.data).forEach((function(r){t.wrapper.append(r)}));var o=t.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(o)}));(n=this.infiniteScroll)===null||n===void 0?void 0:n.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.infiniteScroll.loadNextPage();return[2]}))}))};t.prototype.handleResponse=function(t){var r=this;return t.map((function(t){return r.getSingleOrderItem(t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(e){switch(e.label){case 0:t=new URL(window.location.href);return[4,salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((function(t){var e,n,o,a;r.orders=t.data;r.hasInfiniteScroll=!!((e=t.pagination)===null||e===void 0?void 0:e.links.next);r.pagination=t.pagination;r.total=(n=t.pagination)===null||n===void 0?void 0:n.total;r.nextPage=((a=(o=t.pagination)===null||o===void 0?void 0:o.links)===null||a===void 0?void 0:a.next)||null;if(!r.orders.length){r.showPlaceholder=true;return r.loading(false)}setTimeout((function(){r.handleResponse(t.data).forEach((function(t){r.wrapper.append(t)}));r.initiateInfiniteScroll();var e=r.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(e)}),100)})).catch((function(t){r.showPlaceholder=true;r.loading(false);salla.logger.error(t)}))];case 1:e.sent();return[2]}}))}))};t.prototype.getSingleOrderItem=function(t){var r=document.createElement("tr");r.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");var e=document.createElement("td");e.classList.add("s-orders-table-tbody-tr-td");var n=document.createElement("div");n.classList.add("s-orders-table-tbody-tr-td-content");var o=document.createElement("span");o.classList.add("s-orders-mobile-title");o.textContent=this.orderNumberText+":";var a=document.createElement("span");a.classList.add("s-orders-reference-id");a.textContent="#"+t.reference_id;n.appendChild(o);n.appendChild(a);if(t.source=="buy_as_gift"){var i=document.createElement("i");i.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");n.appendChild(i)}var u=document.createElement("a");u.href=t.url;n.appendChild(u);var l=document.createElement("div");l.classList.add("s-orders-copy-to-clipboard-button");var d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(function(t){s.copyToClipboard(t);s.toggleElementClassIf(d,"copied","code-to-copy",(function(){return true}));setTimeout((function(){s.toggleElementClassIf(d,"code-to-copy","copied",(function(){return true}))}),1e3)}));var c=document.createElement("span");c.textContent="#"+t.reference_id;var f=document.createElement("i");f.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");var h=salla.config.get("theme.is_rtl",true);if(h){d.appendChild(f);d.appendChild(c)}else{d.appendChild(c);d.appendChild(f)}l.appendChild(d);n.appendChild(l);e.appendChild(n);r.appendChild(e);var v=document.createElement("td");v.classList.add("s-orders-table-tbody-tr-td");var b=document.createElement("div");b.classList.add("s-orders-table-tbody-tr-td-content");var m=document.createElement("span");m.classList.add("s-orders-mobile-title");m.textContent=this.totalOrderText+":";var p=document.createElement("div");p.innerHTML=salla.money(t.total);var y=document.createElement("a");y.href=t.url;b.appendChild(m);b.appendChild(p);b.appendChild(y);v.appendChild(b);r.appendChild(v);var _=document.createElement("td");_.classList.add("s-orders-table-tbody-tr-td");var g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");var w=document.createElement("span");w.classList.add("s-orders-mobile-title");w.textContent=this.orderDateText+":";var k=document.createElement("div");k.textContent=s.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);var x=document.createElement("a");x.href=t.url;g.appendChild(w);g.appendChild(k);g.appendChild(x);_.appendChild(g);r.appendChild(_);var j=document.createElement("td");j.classList.add("s-orders-table-tbody-tr-td");var C=document.createElement("div");C.classList.add("s-orders-table-tbody-tr-td-content");var T=document.createElement("span");T.classList.add("s-orders-mobile-title");T.textContent=this.orderStatusText+":";var O=document.createElement("span");O.classList.add("s-orders-status-container");O.style.color=t.status.color;var S=document.createElement("i");S.classList.add(t.status.icon);var q=document.createElement("span");q.textContent=t.status.name;O.appendChild(S);O.appendChild(q);C.appendChild(T);C.appendChild(O);var E=document.createElement("i");E.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");C.appendChild(E);var L=document.createElement("a");L.href=t.url;C.appendChild(L);j.appendChild(C);r.appendChild(j);return r};t.prototype.render=function(){var t=this;var r;if(this.showPlaceholder){return e("div",{class:"s-orders-no-content"},e("i",{class:"sicon-packed-box icon"}),e("p",null,this.noOrderText))}return e("div",{class:"s-orders-wrapper"},e("table",{class:"s-orders-table"},e("thead",{class:"s-orders-table-head"},e("tr",{class:"s-orders-table-head-tr"},e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),e("tbody",{class:"s-orders-table-tbody",ref:function(r){return t.wrapper=r}})),this.nextPage&&e("div",{class:"s-infinite-scroll-wrapper",ref:function(r){return t.status=r}},e("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},e("span",{class:"s-button-text s-infinite-scroll-btn-text"},(r=this.loadMoreText)!==null&&r!==void 0?r:this.load_more_text_trans),e("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(r){return t.btnLoader=r},style:{display:"none"}}))))};t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadInitialData()})).then((function(){return t.initiateInfiniteScroll()}))};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());a.style=o}}}));
5
+ //# sourceMappingURL=p-64346d4f.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-CKompMo1.system.js"],(function(c){"use strict";var l,t,n,s,i,e;return{setters:[function(c){l=c.r;t=c.h;n=c.H;s=c.g},function(c){i=c.f;e=c.t}],execute:function(){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>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></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>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var v='\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>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';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>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var h=":host{display:block}";var u=c("salla_social",function(){function c(c){var t=this;l(this,c);var n;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:v,tiktok:r};this.socialSlot=((n=this.host.querySelector('[slot="social-item"]'))===null||n===void 0?void 0:n.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){t.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return t(n,{key:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},t("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",class:"s-social-list"},l.map((function(l){return t("li",{class:"s-social-link"},t("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return c}());u.style=h}}}));
5
- //# sourceMappingURL=p-4291c03c.system.entry.js.map
4
+ System.register(["./p-1xnr2J3b.system.js","./p-CKompMo1.system.js"],(function(c){"use strict";var l,t,n,s,i,e;return{setters:[function(c){l=c.r;t=c.h;n=c.H;s=c.g},function(c){i=c.f;e=c.t}],execute:function(){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>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></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>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var v='\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>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';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>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var h=":host{display:block}";var u=c("salla_social",function(){function c(c){var t=this;l(this,c);var n;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:v,tiktok:r};this.socialSlot=((n=this.host.querySelector('[slot="social-item"]'))===null||n===void 0?void 0:n.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){t.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return t(n,{key:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},t("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",class:"s-social-list"},l.map((function(l){return t("li",{class:"s-social-link"},t("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return c}());u.style=h}}}));
5
+ //# sourceMappingURL=p-65f8266c.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as a,H as s,g as l}from"./p-L1Wml9tS.js";const i=":host{display:block}";const e=class{constructor(a){t(this,a);this.alertDelay=null;this.data=salla.config.get("store.app_install_prompt");this.open=false;this.closing=false}connectedCallback(){salla.onReady((()=>{this.data=salla.config.get("store.app_install_prompt");if(!this.isMobileOrTabletDevice())return;if(!this.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");this.ctaLink=salla.url.get("app");this.alertDelay=setTimeout((()=>this.open=true),3e3)}))}disconnectedCallback(){clearTimeout(this.alertDelay)}isMobileOrTabletDevice(t=1024){const a=window.innerWidth<=t;const s=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);const l="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return s&&a&&l}closeAlert(){salla.storage.set("app_install_prompt_disabled",true);this.closing=true;this.host.addEventListener("animationend",(()=>{this.closing=false;this.open=false}),{once:true})}render(){return this.data?a(s,{class:`s-app-install-alert-wrapper ${this.open?"open":""} ${this.closing?"closing":""}`,position:this.data.position},a("div",null,a("img",{src:this.data.icon,width:"58",height:"58",alt:`${salla.config.get("store.name")}`})),a("div",{class:"s-app-install-alert-content"},a("h2",{class:"s-app-install-alert-title"},this.data.title),a("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",a("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),a("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:()=>this.closeAlert()},a("i",{class:"sicon-cancel"}))):null}get host(){return l(this)}};e.style=i;export{e as salla_app_install_alert};
5
- //# sourceMappingURL=p-90fc2489.entry.js.map
4
+ import{r as t,h as a,H as s,g as l}from"./p-DJeJWTdD.js";const i=":host{display:block}";const e=class{constructor(a){t(this,a);this.alertDelay=null;this.data=salla.config.get("store.app_install_prompt");this.open=false;this.closing=false}connectedCallback(){salla.onReady((()=>{this.data=salla.config.get("store.app_install_prompt");if(!this.isMobileOrTabletDevice())return;if(!this.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");this.ctaLink=salla.url.get("app");this.alertDelay=setTimeout((()=>this.open=true),3e3)}))}disconnectedCallback(){clearTimeout(this.alertDelay)}isMobileOrTabletDevice(t=1024){const a=window.innerWidth<=t;const s=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);const l="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return s&&a&&l}closeAlert(){salla.storage.set("app_install_prompt_disabled",true);this.closing=true;this.host.addEventListener("animationend",(()=>{this.closing=false;this.open=false}),{once:true})}render(){return this.data?a(s,{class:`s-app-install-alert-wrapper ${this.open?"open":""} ${this.closing?"closing":""}`,position:this.data.position},a("div",null,a("img",{src:this.data.icon,width:"58",height:"58",alt:`${salla.config.get("store.name")}`})),a("div",{class:"s-app-install-alert-content"},a("h2",{class:"s-app-install-alert-title"},this.data.title),a("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",a("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),a("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:()=>this.closeAlert()},a("i",{class:"sicon-cancel"}))):null}get host(){return l(this)}};e.style=i;export{e as salla_app_install_alert};
5
+ //# sourceMappingURL=p-7dc53e3e.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as a,h as t,H as s,g as e}from"./p-L1Wml9tS.js";const i="";const l=class{constructor(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(a){salla.log("Bad json passed via entityId prop")}}}getValue(a){if(a.type==="file"){return`<a href="${a.value}" class="text-primary" target="_blank"><span class="sicon-download"></span> ${this.download}</a>`}if(a.type==="url"){return`<a href="${a.value}" class="text-blue-700 underline" target="_blank">${a.value}</a>`}if(a.type==="date"){const t=new Date(a.value);const s=String(t.getDate()).padStart(2,"0");const e=String(t.getMonth()+1).padStart(2,"0");const i=t.getFullYear();const l=`${s}/${e}/${i}`;return l}return a.value}async componentWillLoad(){var a,t;await salla.onReady();if(!((a=salla.config.get("store.features"))===null||a===void 0?void 0:a.includes("custom-fields"))){return salla.logger.error("feature custom-fields is not activated")}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return salla.logger.error("can't render salla-metadata without enity-id prop!")}await salla.lang.onLoaded();this.download=salla.lang.get("pages.thank_you.download");const s=await Salla.api.metadata.fetchValues(this.entity,this.entityId);this.specs=(t=s.data[0])===null||t===void 0?void 0:t.sections}render(){if(!this.specs.length){return}return t(s,{class:"s-metadata-wrapper"},this.specs.map((a=>t("div",{class:"s-metadata-box"},t("div",{class:"s-metadata-box-header"},t("i",{class:"sicon-list"}),a.name),a.fields.map((a=>t("div",{class:"s-metadata-row"},t("p",{class:"s-metadata-row-name"},a.name),t("p",{class:"s-metadata-row-value",innerHTML:this.getValue(a)}))))))))}get host(){return e(this)}};l.style=i;export{l as salla_metadata};
5
- //# sourceMappingURL=p-9a3f6331.entry.js.map
4
+ import{r as a,h as t,H as s,g as e}from"./p-DJeJWTdD.js";const i="";const l=class{constructor(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(a){salla.log("Bad json passed via entityId prop")}}}getValue(a){if(a.type==="file"){return`<a href="${a.value}" class="text-primary" target="_blank"><span class="sicon-download"></span> ${this.download}</a>`}if(a.type==="url"){return`<a href="${a.value}" class="text-blue-700 underline" target="_blank">${a.value}</a>`}if(a.type==="date"){const t=new Date(a.value);const s=String(t.getDate()).padStart(2,"0");const e=String(t.getMonth()+1).padStart(2,"0");const i=t.getFullYear();const l=`${s}/${e}/${i}`;return l}return a.value}async componentWillLoad(){var a,t;await salla.onReady();if(!((a=salla.config.get("store.features"))===null||a===void 0?void 0:a.includes("custom-fields"))){return salla.logger.error("feature custom-fields is not activated")}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return salla.logger.error("can't render salla-metadata without enity-id prop!")}await salla.lang.onLoaded();this.download=salla.lang.get("pages.thank_you.download");const s=await Salla.api.metadata.fetchValues(this.entity,this.entityId);this.specs=(t=s.data[0])===null||t===void 0?void 0:t.sections}render(){if(!this.specs.length){return}return t(s,{class:"s-metadata-wrapper"},this.specs.map((a=>t("div",{class:"s-metadata-box"},t("div",{class:"s-metadata-box-header"},t("i",{class:"sicon-list"}),a.name),a.fields.map((a=>t("div",{class:"s-metadata-row"},t("p",{class:"s-metadata-row-name"},a.name),t("p",{class:"s-metadata-row-value",innerHTML:this.getValue(a)}))))))))}get host(){return e(this)}};l.style=i;export{l as salla_metadata};
5
+ //# sourceMappingURL=p-84aaa78d.entry.js.map