@salla.sa/twilight-components 2.14.259 → 2.14.260

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 (304) hide show
  1. package/dist/cjs/{app-globals-BaW1ktwu.js → app-globals-C-RMRzcr.js} +3 -3
  2. package/dist/cjs/{app-globals-BaW1ktwu.js.map → app-globals-C-RMRzcr.js.map} +1 -1
  3. package/dist/cjs/{index-BUbxVNrN.js → index-Cb0SQNc9.js} +4 -4
  4. package/dist/cjs/index-Cb0SQNc9.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/salla-accordion_4.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  39. package/dist/cjs/twilight.cjs.js +2 -2
  40. package/dist/components/index.js +2 -2
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/esm/{app-globals-wZyXu1Pt.js → app-globals-CYjWTTrt.js} +3 -3
  43. package/dist/esm/{app-globals-wZyXu1Pt.js.map → app-globals-CYjWTTrt.js.map} +1 -1
  44. package/dist/esm/{index-Dr_h0iSH.js → index-DtlYcjlJ.js} +4 -4
  45. package/dist/esm/index-DtlYcjlJ.js.map +1 -0
  46. package/dist/esm/loader.js +3 -3
  47. package/dist/esm/salla-accordion_4.entry.js +1 -1
  48. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  49. package/dist/esm/salla-advertisement.entry.js +1 -1
  50. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  51. package/dist/esm/salla-apps-icons.entry.js +1 -1
  52. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  53. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  54. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  55. package/dist/esm/salla-contacts.entry.js +1 -1
  56. package/dist/esm/salla-filters-widget.entry.js +1 -1
  57. package/dist/esm/salla-filters.entry.js +1 -1
  58. package/dist/esm/salla-installment.entry.js +1 -1
  59. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  60. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  61. package/dist/esm/salla-metadata.entry.js +1 -1
  62. package/dist/esm/salla-notification-item.entry.js +1 -1
  63. package/dist/esm/salla-notifications.entry.js +1 -1
  64. package/dist/esm/salla-offer.entry.js +1 -1
  65. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  66. package/dist/esm/salla-order-details.entry.js +1 -1
  67. package/dist/esm/salla-order-summary.entry.js +1 -1
  68. package/dist/esm/salla-orders.entry.js +1 -1
  69. package/dist/esm/salla-payments.entry.js +1 -1
  70. package/dist/esm/salla-price-range.entry.js +1 -1
  71. package/dist/esm/salla-product-options.entry.js +1 -1
  72. package/dist/esm/salla-review-card.entry.js +1 -1
  73. package/dist/esm/salla-reviews-page.entry.js +1 -1
  74. package/dist/esm/salla-reviews.entry.js +1 -1
  75. package/dist/esm/salla-social.entry.js +1 -1
  76. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  77. package/dist/esm/salla-tooltip.entry.js +1 -1
  78. package/dist/esm/salla-verify.entry.js +1 -1
  79. package/dist/esm/salla-wallet.entry.js +1 -1
  80. package/dist/esm/twilight.js +3 -3
  81. package/dist/esm-es5/{app-globals-wZyXu1Pt.js → app-globals-CYjWTTrt.js} +2 -2
  82. package/dist/esm-es5/{app-globals-wZyXu1Pt.js.map → app-globals-CYjWTTrt.js.map} +1 -1
  83. package/dist/esm-es5/{index-Dr_h0iSH.js → index-DtlYcjlJ.js} +3 -3
  84. package/dist/esm-es5/index-DtlYcjlJ.js.map +1 -0
  85. package/dist/esm-es5/loader.js +1 -1
  86. package/dist/esm-es5/salla-accordion_4.entry.js +1 -1
  87. package/dist/esm-es5/salla-add-product-button_51.entry.js +4 -4
  88. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  89. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  90. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  91. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  92. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  93. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  94. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  95. package/dist/esm-es5/salla-filters-widget.entry.js +2 -2
  96. package/dist/esm-es5/salla-filters.entry.js +1 -1
  97. package/dist/esm-es5/salla-installment.entry.js +1 -1
  98. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  99. package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
  100. package/dist/esm-es5/salla-metadata.entry.js +2 -2
  101. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  102. package/dist/esm-es5/salla-notifications.entry.js +2 -2
  103. package/dist/esm-es5/salla-offer.entry.js +1 -1
  104. package/dist/esm-es5/salla-order-details-multiple-bundle-product.entry.js +1 -1
  105. package/dist/esm-es5/salla-order-details.entry.js +1 -1
  106. package/dist/esm-es5/salla-order-summary.entry.js +2 -2
  107. package/dist/esm-es5/salla-orders.entry.js +2 -2
  108. package/dist/esm-es5/salla-payments.entry.js +1 -1
  109. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  110. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  111. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  112. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  113. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  114. package/dist/esm-es5/salla-social.entry.js +1 -1
  115. package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
  116. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  117. package/dist/esm-es5/salla-verify.entry.js +1 -1
  118. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  119. package/dist/esm-es5/twilight.js +1 -1
  120. package/dist/twilight/{p-B3kEjtyr.system.js.map → p--178guyc.system.js.map} +1 -1
  121. package/dist/twilight/{p-3592b583.system.entry.js → p-007ca6d7.system.entry.js} +2 -2
  122. package/dist/twilight/{p-949a66c1.system.entry.js → p-0259d6cb.system.entry.js} +2 -2
  123. package/dist/twilight/{p-97dde580.system.entry.js → p-0303d452.system.entry.js} +2 -2
  124. package/dist/twilight/{p-d0ab3dbc.system.entry.js → p-04e33bba.system.entry.js} +2 -2
  125. package/dist/twilight/{p-6bde3b47.entry.js → p-099e8eb6.entry.js} +2 -2
  126. package/dist/twilight/{p-c1c17d0b.system.entry.js → p-0ba23365.system.entry.js} +2 -2
  127. package/dist/twilight/{p-e59edbdd.entry.js → p-109f5735.entry.js} +2 -2
  128. package/dist/twilight/{p-cd019bf1.system.entry.js → p-1362c93c.system.entry.js} +2 -2
  129. package/dist/twilight/{p-0769a6e0.entry.js → p-138b8ce7.entry.js} +2 -2
  130. package/dist/twilight/{p-db0cd840.entry.js → p-19061cec.entry.js} +2 -2
  131. package/dist/twilight/{p-ae051ea2.entry.js → p-1b42ce8a.entry.js} +2 -2
  132. package/dist/twilight/{p-d7304e82.entry.js → p-2323e473.entry.js} +2 -2
  133. package/dist/twilight/{p-0e3a43f5.system.entry.js → p-2bb3b70e.system.entry.js} +2 -2
  134. package/dist/twilight/{p-56770d90.system.entry.js → p-36b00bb1.system.entry.js} +3 -3
  135. package/dist/twilight/{p-7ec7d474.entry.js → p-385257e0.entry.js} +2 -2
  136. package/dist/twilight/{p-d52b8ce4.system.entry.js → p-39a319ec.system.entry.js} +2 -2
  137. package/dist/twilight/{p-0a6f1ffb.entry.js → p-3ad485dd.entry.js} +2 -2
  138. package/dist/twilight/{p-e3e75bed.entry.js → p-3ad79104.entry.js} +2 -2
  139. package/dist/twilight/{p-00dfddea.system.entry.js → p-3e960ee9.system.entry.js} +2 -2
  140. package/dist/twilight/{p-6154b6eb.entry.js → p-3f20e330.entry.js} +2 -2
  141. package/dist/twilight/{p-ae7b050f.system.entry.js → p-4cf011a4.system.entry.js} +2 -2
  142. package/dist/twilight/{p-e705ac16.system.entry.js → p-54a5d0ac.system.entry.js} +2 -2
  143. package/dist/twilight/{p-84c3941d.system.entry.js → p-55771cda.system.entry.js} +2 -2
  144. package/dist/twilight/{p-df3f649a.system.entry.js → p-57cfb4b1.system.entry.js} +2 -2
  145. package/dist/twilight/{p-b29ee431.entry.js → p-58768895.entry.js} +2 -2
  146. package/dist/twilight/{p-e5b92338.system.entry.js → p-5cb3dd8e.system.entry.js} +2 -2
  147. package/dist/twilight/{p-c0c81732.system.entry.js → p-5f352ca9.system.entry.js} +2 -2
  148. package/dist/twilight/{p-edbe1cac.system.entry.js → p-66464e8e.system.entry.js} +2 -2
  149. package/dist/twilight/{p-9cc55265.entry.js → p-6a611226.entry.js} +2 -2
  150. package/dist/twilight/{p-89a0da99.entry.js → p-6e1ecf18.entry.js} +2 -2
  151. package/dist/twilight/{p-ceb8da67.system.entry.js → p-7105480a.system.entry.js} +2 -2
  152. package/dist/twilight/{p-15554834.system.entry.js → p-784ee964.system.entry.js} +2 -2
  153. package/dist/twilight/{p-d7ec137d.system.entry.js → p-7dc3a160.system.entry.js} +2 -2
  154. package/dist/twilight/{p-c94aaea0.entry.js → p-7f20c85c.entry.js} +6 -6
  155. package/dist/twilight/{p-532b9b17.entry.js → p-83549a90.entry.js} +2 -2
  156. package/dist/twilight/{p-f84e2327.entry.js → p-862ad154.entry.js} +2 -2
  157. package/dist/twilight/{p-b0051f63.entry.js → p-939f9104.entry.js} +2 -2
  158. package/dist/twilight/{p-039346b8.system.entry.js → p-93e6452b.system.entry.js} +2 -2
  159. package/dist/twilight/{p-08d61ff2.entry.js → p-97cc91c4.entry.js} +2 -2
  160. package/dist/twilight/{p-228242f7.entry.js → p-9fa8d963.entry.js} +2 -2
  161. package/dist/twilight/{p-Dw8CTCni.system.js.map → p-B9diX3Ld.system.js.map} +1 -1
  162. package/dist/twilight/{p-ERq3kNfh.system.js.map → p-BNKx_fXu.system.js.map} +1 -1
  163. package/dist/twilight/{p-Bqwo1MhQ.system.js.map → p-BP64ZxhW.system.js.map} +1 -1
  164. package/dist/twilight/{p-D4hseaGD.system.js.map → p-BWbXuc8f.system.js.map} +1 -1
  165. package/dist/twilight/{p-DbYzV2HQ.system.js.map → p-Brt6MZMy.system.js.map} +1 -1
  166. package/dist/twilight/{p-BAr95b3n.system.js.map → p-Bx7mzn4-.system.js.map} +1 -1
  167. package/dist/twilight/{p-CHzuzHDL.system.js.map → p-C0zi3xso.system.js.map} +1 -1
  168. package/dist/twilight/{p-Cc8dkoHl.system.js.map → p-C25xo2I9.system.js.map} +1 -1
  169. package/dist/twilight/{p-7FnPac86.system.js.map → p-C3b5GFVP.system.js.map} +1 -1
  170. package/dist/twilight/{p-7jsBTJOk.system.js.map → p-C6nl4csu.system.js.map} +1 -1
  171. package/dist/twilight/{p-BlvvQJnI.system.js.map → p-C8JDkECr.system.js.map} +1 -1
  172. package/dist/twilight/{p-Dosz7Na1.system.js.map → p-C9OfFWmp.system.js.map} +1 -1
  173. package/dist/twilight/{p-Cf6u_xVH.system.js.map → p-CI_HtUC7.system.js.map} +1 -1
  174. package/dist/twilight/{p-COs3bEuH.system.js.map → p-CX4G4VV7.system.js.map} +1 -1
  175. package/dist/twilight/{p-D3plH8z9.system.js.map → p-C_tZ3UPA.system.js.map} +1 -1
  176. package/dist/twilight/{p-JsYArMQH.system.js.map → p-CdPxDxze.system.js.map} +1 -1
  177. package/dist/twilight/{p-BnsVGJir.system.js.map → p-Ch2ngfCk.system.js.map} +1 -1
  178. package/dist/twilight/{p-RygE2GKU.system.js.map → p-Cl6TP9Ol.system.js.map} +1 -1
  179. package/dist/twilight/{p-DeseX8V6.system.js.map → p-CvcXa2TU.system.js.map} +1 -1
  180. package/dist/twilight/{p-BfdixxaW.system.js.map → p-D0CcSuA9.system.js.map} +1 -1
  181. package/dist/twilight/{p-CVcJQx-E.system.js.map → p-D2T3kwP1.system.js.map} +1 -1
  182. package/dist/twilight/{p-BwJ_P_jJ.system.js → p-DF5hpYv8.system.js} +2 -2
  183. package/dist/twilight/{p-BwJ_P_jJ.system.js.map → p-DF5hpYv8.system.js.map} +1 -1
  184. package/dist/twilight/{p-KjQfyzJD.system.js.map → p-DG_xtA-f.system.js.map} +1 -1
  185. package/dist/twilight/{p-1fOf1jhv.system.js.map → p-DHzL55RC.system.js.map} +1 -1
  186. package/dist/twilight/{p-GfIPqLYs.system.js.map → p-DS9YDo5Q.system.js.map} +1 -1
  187. package/dist/twilight/{p-BZl5RHdf.system.js.map → p-DhIVzS4b.system.js.map} +1 -1
  188. package/dist/twilight/{p-BL8Qlvzz.system.js → p-DiFVtThr.system.js} +3 -3
  189. package/dist/twilight/p-DiFVtThr.system.js.map +1 -0
  190. package/dist/twilight/{p-DrLXNast.system.js.map → p-DqqqpQLX.system.js.map} +1 -1
  191. package/dist/twilight/{p-Dr_h0iSH.js → p-DtlYcjlJ.js} +3 -3
  192. package/dist/twilight/p-DtlYcjlJ.js.map +1 -0
  193. package/dist/twilight/{p-DZiCNWuJ.js → p-FCntN3lB.js} +2 -2
  194. package/dist/twilight/{p-DZiCNWuJ.js.map → p-FCntN3lB.js.map} +1 -1
  195. package/dist/twilight/{p-CpG6hlX3.system.js.map → p-NwP5WLUz.system.js.map} +1 -1
  196. package/dist/twilight/{p-D1nfm0gQ.system.js.map → p-UHVUEdWQ.system.js.map} +1 -1
  197. package/dist/twilight/{p-BBzKqD9K.system.js → p-_Zg_vfYO.system.js} +2 -2
  198. package/dist/twilight/{p-BBzKqD9K.system.js.map → p-_Zg_vfYO.system.js.map} +1 -1
  199. package/dist/twilight/{p-7c783b6c.entry.js → p-a80652d3.entry.js} +2 -2
  200. package/dist/twilight/{p-967da197.system.entry.js → p-b23ce243.system.entry.js} +2 -2
  201. package/dist/twilight/{p-9ee4ee16.system.entry.js → p-bcae7f12.system.entry.js} +2 -2
  202. package/dist/twilight/{p-e8e7d078.system.entry.js → p-c0072de1.system.entry.js} +3 -3
  203. package/dist/twilight/{p-e48ca56a.entry.js → p-c6a3fdb0.entry.js} +2 -2
  204. package/dist/twilight/{p-8e099efd.system.entry.js → p-c6fde185.system.entry.js} +2 -2
  205. package/dist/twilight/{p-12c89d39.system.entry.js → p-c94f95c1.system.entry.js} +2 -2
  206. package/dist/twilight/{p-9c7abe6a.entry.js → p-cbcfb963.entry.js} +2 -2
  207. package/dist/twilight/{p-e27633d6.system.entry.js → p-ce103d4c.system.entry.js} +2 -2
  208. package/dist/twilight/{p-da2c57dd.system.entry.js → p-d14a8edc.system.entry.js} +2 -2
  209. package/dist/twilight/{p-12dd0623.entry.js → p-d1809737.entry.js} +2 -2
  210. package/dist/twilight/{p-f032b94d.system.entry.js → p-d632f1fa.system.entry.js} +2 -2
  211. package/dist/twilight/{p-61fcba71.entry.js → p-d71d6dff.entry.js} +2 -2
  212. package/dist/twilight/{p-4eb654dc.system.entry.js → p-d8aab17c.system.entry.js} +2 -2
  213. package/dist/twilight/{p-00068e76.entry.js → p-db7a231b.entry.js} +2 -2
  214. package/dist/twilight/{p-96f8325a.system.entry.js → p-e0e29fb0.system.entry.js} +2 -2
  215. package/dist/twilight/{p-5dd3d1b7.entry.js → p-e1e90d0c.entry.js} +2 -2
  216. package/dist/twilight/{p-fce368f7.entry.js → p-e28d3b71.entry.js} +2 -2
  217. package/dist/twilight/{p-75c9e2c4.entry.js → p-e6d51e3a.entry.js} +2 -2
  218. package/dist/twilight/{p-16cb7a49.entry.js → p-ee66c0dd.entry.js} +2 -2
  219. package/dist/twilight/{p-a6e8e1e7.entry.js → p-ef04d7e0.entry.js} +2 -2
  220. package/dist/twilight/{p-510b1a2a.entry.js → p-f0dd4f76.entry.js} +2 -2
  221. package/dist/twilight/{p-7e9bec45.entry.js → p-f1d6fdbf.entry.js} +2 -2
  222. package/dist/twilight/{p-c7c91c45.system.entry.js → p-f2bac5d5.system.entry.js} +2 -2
  223. package/dist/twilight/p-f702aead.entry.js +5 -0
  224. package/dist/twilight/{p-63d10a9e.system.entry.js → p-fba0b0f7.system.entry.js} +2 -2
  225. package/dist/twilight/{p-Dh2Y37LB.system.js.map → p-hUWZ36QL.system.js.map} +1 -1
  226. package/dist/twilight/{p-4ae6httG.system.js.map → p-lKe9xnuY.system.js.map} +1 -1
  227. package/dist/twilight/{p-CH4ZFrh_.system.js.map → p-t6iSIvKc.system.js.map} +1 -1
  228. package/dist/twilight/{p-DYrmIHi5.system.js.map → p-xfMEaBec.system.js.map} +1 -1
  229. package/dist/twilight/{p-Dvmkrqbs.system.js.map → p-y6fipjol.system.js.map} +1 -1
  230. package/dist/twilight/twilight.esm.js +1 -1
  231. package/dist/twilight/twilight.js +1 -1
  232. package/package.json +5 -5
  233. package/dist/cjs/index-BUbxVNrN.js.map +0 -1
  234. package/dist/esm/index-Dr_h0iSH.js.map +0 -1
  235. package/dist/esm-es5/index-Dr_h0iSH.js.map +0 -1
  236. package/dist/twilight/p-BL8Qlvzz.system.js.map +0 -1
  237. package/dist/twilight/p-Dr_h0iSH.js.map +0 -1
  238. package/dist/twilight/p-dbe580d1.entry.js +0 -5
  239. /package/dist/twilight/{p-3592b583.system.entry.js.map → p-007ca6d7.system.entry.js.map} +0 -0
  240. /package/dist/twilight/{p-949a66c1.system.entry.js.map → p-0259d6cb.system.entry.js.map} +0 -0
  241. /package/dist/twilight/{p-97dde580.system.entry.js.map → p-0303d452.system.entry.js.map} +0 -0
  242. /package/dist/twilight/{p-d0ab3dbc.system.entry.js.map → p-04e33bba.system.entry.js.map} +0 -0
  243. /package/dist/twilight/{p-6bde3b47.entry.js.map → p-099e8eb6.entry.js.map} +0 -0
  244. /package/dist/twilight/{p-c1c17d0b.system.entry.js.map → p-0ba23365.system.entry.js.map} +0 -0
  245. /package/dist/twilight/{p-e59edbdd.entry.js.map → p-109f5735.entry.js.map} +0 -0
  246. /package/dist/twilight/{p-cd019bf1.system.entry.js.map → p-1362c93c.system.entry.js.map} +0 -0
  247. /package/dist/twilight/{p-0769a6e0.entry.js.map → p-138b8ce7.entry.js.map} +0 -0
  248. /package/dist/twilight/{p-db0cd840.entry.js.map → p-19061cec.entry.js.map} +0 -0
  249. /package/dist/twilight/{p-ae051ea2.entry.js.map → p-1b42ce8a.entry.js.map} +0 -0
  250. /package/dist/twilight/{p-d7304e82.entry.js.map → p-2323e473.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-0e3a43f5.system.entry.js.map → p-2bb3b70e.system.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-56770d90.system.entry.js.map → p-36b00bb1.system.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-7ec7d474.entry.js.map → p-385257e0.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-d52b8ce4.system.entry.js.map → p-39a319ec.system.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-0a6f1ffb.entry.js.map → p-3ad485dd.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-e3e75bed.entry.js.map → p-3ad79104.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-00dfddea.system.entry.js.map → p-3e960ee9.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-6154b6eb.entry.js.map → p-3f20e330.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-ae7b050f.system.entry.js.map → p-4cf011a4.system.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-e705ac16.system.entry.js.map → p-54a5d0ac.system.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-84c3941d.system.entry.js.map → p-55771cda.system.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-df3f649a.system.entry.js.map → p-57cfb4b1.system.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-b29ee431.entry.js.map → p-58768895.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-e5b92338.system.entry.js.map → p-5cb3dd8e.system.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-c0c81732.system.entry.js.map → p-5f352ca9.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-edbe1cac.system.entry.js.map → p-66464e8e.system.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-9cc55265.entry.js.map → p-6a611226.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-89a0da99.entry.js.map → p-6e1ecf18.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-ceb8da67.system.entry.js.map → p-7105480a.system.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-15554834.system.entry.js.map → p-784ee964.system.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-d7ec137d.system.entry.js.map → p-7dc3a160.system.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-c94aaea0.entry.js.map → p-7f20c85c.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-532b9b17.entry.js.map → p-83549a90.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-f84e2327.entry.js.map → p-862ad154.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-b0051f63.entry.js.map → p-939f9104.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-039346b8.system.entry.js.map → p-93e6452b.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-08d61ff2.entry.js.map → p-97cc91c4.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-228242f7.entry.js.map → p-9fa8d963.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-7c783b6c.entry.js.map → p-a80652d3.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-967da197.system.entry.js.map → p-b23ce243.system.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-9ee4ee16.system.entry.js.map → p-bcae7f12.system.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-e8e7d078.system.entry.js.map → p-c0072de1.system.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-e48ca56a.entry.js.map → p-c6a3fdb0.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-8e099efd.system.entry.js.map → p-c6fde185.system.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-12c89d39.system.entry.js.map → p-c94f95c1.system.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-9c7abe6a.entry.js.map → p-cbcfb963.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-e27633d6.system.entry.js.map → p-ce103d4c.system.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-da2c57dd.system.entry.js.map → p-d14a8edc.system.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-12dd0623.entry.js.map → p-d1809737.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-f032b94d.system.entry.js.map → p-d632f1fa.system.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-61fcba71.entry.js.map → p-d71d6dff.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-4eb654dc.system.entry.js.map → p-d8aab17c.system.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-00068e76.entry.js.map → p-db7a231b.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-96f8325a.system.entry.js.map → p-e0e29fb0.system.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-5dd3d1b7.entry.js.map → p-e1e90d0c.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-fce368f7.entry.js.map → p-e28d3b71.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-75c9e2c4.entry.js.map → p-e6d51e3a.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-16cb7a49.entry.js.map → p-ee66c0dd.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-a6e8e1e7.entry.js.map → p-ef04d7e0.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-510b1a2a.entry.js.map → p-f0dd4f76.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-7e9bec45.entry.js.map → p-f1d6fdbf.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-c7c91c45.system.entry.js.map → p-f2bac5d5.system.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-dbe580d1.entry.js.map → p-f702aead.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-63d10a9e.system.entry.js.map → p-fba0b0f7.system.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,c as i,h as o,H as s,g as n}from"./p-Dr_h0iSH.js";import{I as e}from"./p-uTyAzPSy.js";import{C as a}from"./p-C6jIkM-X.js";var l;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["DIGITAL_CARD_VALUE"]="digital-code-value";t["COUNTRY"]="country";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker";t["BOOKING"]="booking"})(l||(l={}));var r;(function(t){t["Sar"]="SAR"})(r||(r={}));var d=`\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-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n`;const p="";const c=class{constructor(s){t(this,s);this.changed=i(this,"changed");this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ");this.isCustomDonation=false;this.selectedOptions=[];this.disableCardValue=true;this.availableDigitalCardValues=[];this.outSkus=[];this.ignoreDefaultCardValue=false;this.productId=salla.config.get("page.id");this.handleDonationOptions=(t,i,o)=>{if(i==="custom"&&o==="input"){salla.helpers.inputDigitsOnly(t.target);salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value});return}t.preventDefault();t.stopPropagation();this.isCustomDonation=t.target.value==="custom";if(this.donationInput){if(t.target.value==="custom"){this.donationInput.value="";this.donationInput.focus()}else{this.donationInput.value=t.target.value}if(i==="custom"){return}salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}};this.hideLabel=t=>{if(t.type===l.DONATION&&(t.donation&&!t.donation.can_donate)){return true}return false};this.getExpireDonationMessage=t=>{if(!t.donation){return}const i=t.donation.target_amount<=t.donation.collected_amount;return o("div",{class:{"s-product-options-donation-message":true,"s-product-options-donation-completed":i,"s-product-options-donation-expired":!i}},o("p",null,t.donation.target_message),o("span",{innerHTML:i?salla.money(t.donation.target_amount):""}))};this.canDisabled=!salla.config.get("store.settings.product.notify_options_availability")||salla.url.is_page("cart");salla.lang.onLoaded((()=>{this.outOfStockText=salla.lang.get("pages.products.out_of_stock");this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((t=>this.setOptionsData(t.data.options)))}}async setOptionsData(t){var i,o;this.optionsData=t;const s=this;(o=(i=this.optionsData[0])===null||i===void 0?void 0:i.details)===null||o===void 0?void 0:o.forEach((function(t){Object.entries(t.skus_availability||{}).filter((t=>!t[1])).map((t=>s.outSkus.push(Number(t[0]))))}))}async getSelectedOptionsData(){const t={};const i=this.host.getElementSallaData();i.forEach(((i,o)=>{if(o.startsWith("options[")){t[o.replace("options[","").replace("]","")]=i}}));return t}async reportValidity(){const t=this.host.querySelectorAll("[required]");let i=true;for(let o=0;o<t.length;o++){if("reportValidity"in t[o]&&!t[o].reportValidity()){i=false}}return i}async hasOutOfStockOption(){var t,i;return this.selectedOptions.some((t=>t.is_out))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((i=this.selectedSkus)===null||i===void 0?void 0:i.every((t=>this.outSkus.includes(t))))}async getSelectedOptions(){return this.selectedOptions}async getOption(t){return this.optionsData.find((i=>i.id===t))}invalidHandler(t,i){const o=t.target.closest(".s-product-options-option");if(!o.classList.contains("s-product-options-option-error")){o.classList.add("s-product-options-option-error")}if(!salla.url.is_page("cart")){const t=this.host.querySelector(".s-product-options-option-error");if(t===o){this.scrollToElement(o)}}}scrollToElement(t){if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}}changedHandler(t,i,o=true){const s={event:t,option:i,detail:null,productId:this.productId};if(i.details){const o=i.details.find((i=>Number(i.id)===Number(t.target.value)));s.detail=o}if(i.type==="country"){this.handleCountryOptionChange(t,s.detail)}const n=t.target.closest(".s-product-options-option");if(t.target.value||(i.type===l.FILE||i.type===l.IMAGE)&&t.type==="added"||i.type===l.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((()=>{n.classList.remove("s-product-options-option-error")}),200)}if(i.type===l.DONATION){salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}this.setSelectedSkus();this.handleRequiredMultipleOptions(i);const e=this.selectedOptions.findIndex((t=>t.option_id===s.option.id));if(s.option.type===l.MULTIPLE_OPTIONS){const t=this.selectedOptions.findIndex((t=>{var i;return t.option_id===s.option.id&&(t===null||t===void 0?void 0:t.id)===((i=s.detail)===null||i===void 0?void 0:i.id)}));if(t>-1){this.selectedOptions.splice(t,1)}else{this.selectedOptions.push(Object.assign(Object.assign({},s.detail),{option_id:s.option.id}))}}else{if(!s.detail||Object.keys(s.detail).length===0){if(e>-1){this.selectedOptions.splice(e,1)}}else{if(e>-1){this.selectedOptions[e]=Object.assign(Object.assign({},s.detail),{option_id:s.option.id})}else{this.selectedOptions.push(Object.assign(Object.assign({},s.detail),{option_id:s.option.id}))}}}this.optionsData=this.optionsData.map((t=>{if(t.id===s.option.id){return Object.assign(Object.assign({},t),{details:t.details.map((t=>{var i,o;return Object.assign(Object.assign({},t),{is_selected:s.option.type===l.MULTIPLE_OPTIONS?this.selectedOptions.some((i=>i.id===t.id)):Number(t.id)===Number((i=s.detail)===null||i===void 0?void 0:i.id),value:(o=s.detail)===null||o===void 0?void 0:o.value})}))})}return t}));if(o){this.changed.emit(s);salla.event.emit("product-options::change",s)}}setSelectedSkus(){this.selectedSkus=this.selectedOptions.map((t=>Object.keys(t.skus_availability||{}))).reduce(((t,i)=>t.filter((t=>i.includes(t)))),[]).map((t=>Number(t)))}handleRequiredMultipleOptions(t){if(t.type!==l.MULTIPLE_OPTIONS||!t.required){return}const i=this.host.querySelector(`[data-option-id="${t.id}"]`);const o=i.querySelectorAll("input:checked").length;i.querySelectorAll("input").forEach((t=>t.toggleAttribute("required",!o)))}getLatLng(t,i){return t?t.split(",")[i==="lat"?0:1]:""}getDisplayForType(t){if(this[`${t.type}Option`]){return this[`${t.type}Option`](t)}if(t.type===l.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===l.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===l.SINGLE_OPTION){return this.singleOption(t)}if(t.type===l.DIGITAL_CARD_VALUE){return this.digitalCardValuesOption(t)}if(t.type===l.COUNTRY){return this.countryOption(t)}if(t.type===l.BOOKING&&salla.url.is_page("cart")){return o("salla-booking-field",{onInvalidInput:i=>this.invalidHandler(i,t),option:t,productId:t.value})}salla.log(`Couldn't find options type(${t.type})😢`);return""}getOptionShownWhen(t){return t.visibility_condition?{"data-show-when":`options[${t.visibility_condition.option}] ${t.visibility_condition.operator} ${t.visibility_condition.value}`}:{}}getAvailableDigitalCardSKUs(t){const i=this.optionsData.find((({type:t})=>t==="digital-code-value"));if(!i)throw new Error("product-options:: No digital card options found");const o=Object.keys(t.skus_availability).filter((i=>t.skus_availability[i]===false));this.availableDigitalCardValues=i.details.filter((t=>!Object.keys(t.skus_availability).filter((t=>o.includes(t))).length))}handleCountryOptionChange(t,i){t.stopImmediatePropagation();this.ignoreDefaultCardValue=true;const o=this.host.querySelector("input[data-code-value]:checked");if(o)o.checked=false;const s=this.optionsData.find((({type:t})=>t==="digital-code-value"));if(!s)throw new Error("product-options:: No digital card options found");this.getAvailableDigitalCardSKUs(i)}getSelectedDigitalCardOptions(t){const i=t.details.find((t=>t.is_selected));const o=t.details.find((t=>!!t.is_default))||t.details[0];if(!["digital-code-value","country"].includes(t.type))return;return i||o}async componentWillLoad(){if(salla.url.is_page("cart")){this.disableCardValue=false;this.fillSelectedOptions()}if(this.config){try{this.optionConfig=typeof this.config==="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse JSON in config prop:",t)}}const t=this.optionsData.filter((({type:t})=>["country","digital-card-value"].includes(t))).length>0&&salla.url.is_page("cart");if(t){const t=this.optionsData.find((t=>t.type==="country"));const i=t&&this.getSelectedDigitalCardOptions(t);if(i){this.getAvailableDigitalCardSKUs(i)}}this.outOfStockText=salla.lang.get("pages.products.out_of_stock");await salla.onReady();document.addEventListener("paste",this.handlePaste.bind(this));const i=!salla.storage.get("cart.id")&&this.optionsData.some((t=>["file","image"].includes(t.type)));return i?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null}handlePaste(t){var i;const o=t.target;if(!Salla.config.get("store.settings.content_copyright")||!Salla.helpers.hasApplePay()||!(o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement)||!o.classList.contains("s-form-control")||!o.name.startsWith("options[")){return}t.preventDefault();const s=((i=t.clipboardData)===null||i===void 0?void 0:i.getData("text"))||"";const n=o.selectionStart;const e=o.selectionEnd;const a=o.value.slice(0,n)+s+o.value.slice(e);o.value=a;o.setSelectionRange(n+s.length,n+s.length)}hideDigitalCardsOptions(t){return this.disableCardValue&&t.type===l.DIGITAL_CARD_VALUE&&!salla.url.is_page("cart")}render(){var t;if(((t=this.optionsData)===null||t===void 0?void 0:t.length)===0){return}return o(s,{class:"s-product-options-wrapper"},o("salla-conditional-fields",null,this.optionsData.map((t=>o("div",Object.assign({key:t.id,class:`s-product-options-option-container${t.visibility_condition||this.hideDigitalCardsOptions(t)?" hidden":""}`,"data-option-id":t.id},this.getOptionShownWhen(t)),t.name==="splitter"?this.splitterOption():o("div",{class:{"s-product-options-option":true,"s-product-options-option-booking":t.type===l.BOOKING&&salla.url.is_page("cart")},"data-option-type":t.type,"data-option-required":`${t.required}`},o("label",{htmlFor:`options[${t.id}]`,class:`s-product-options-option-label ${this.hideLabel(t)?"s-product-options-option-label-hidden":""}`},o("b",null,t.name,t.required&&o("span",null," * ")," "),o("small",null,t.placeholder)),o("div",{class:`s-product-options-option-content ${this.hideLabel(t)||t.type===l.BOOKING&&salla.url.is_page("cart")?"s-product-options-option-content-full-width":""}`},this.getDisplayForType(t))))))))}generateUniqueKey(t){return this.uniqueKey?`${t}-${this.uniqueKey}`:t}fillSelectedOptions(){this.selectedOptions=this.optionsData.reduce(((t,i)=>{const o=i.details.filter((t=>t.is_selected));const s=o.map((t=>Object.assign(Object.assign({},t),{option_id:i.id})));return t.concat(s)}),[])}triggerProductFormSelectionEvents(){const t=t=>["change","input"].forEach((i=>t.dispatchEvent(new window.Event(i,{bubbles:true}))));const i=this.host.closest("form");if(i){t(i)}else{const i=new MutationObserver((()=>{const o=this.host.closest("form");if(o){t(o);i.disconnect()}}));i.observe(document.body,{childList:true,subtree:true})}}componentDidLoad(){var t,i;if(salla.url.is_page("product.single")){this.triggerProductFormSelectionEvents()}if(((t=this.optionsData)===null||t===void 0?void 0:t.length)===0&&!this.optionsData.some((t=>t.type===l.DONATION))){return}const o=(i=this.optionsData.find((t=>t.type===l.DONATION)))===null||i===void 0?void 0:i.details.find((t=>t.is_selected));if(!o){return}setTimeout((()=>{salla.event.emit("product-options::donation-changed",{id:this.productId,price:o.additional_price})}),1e3)}donationOption(t,i){var s,n;return o("div",{class:"s-product-options-donation-wrapper"},((s=t.donation)===null||s===void 0?void 0:s.can_donate)?[t.donation?o("div",{key:t.id,class:"s-product-options-donation-progress"},o("salla-progress-bar",{donation:t.donation})):"",t.details.length?[o("h4",{key:t.id},this.selectAmount),o("div",{key:t.id,class:"s-product-options-donation-options"},t.details.map(((i,s)=>o("div",{key:t.id,class:"s-product-options-donation-options-item"},o("input",{id:this.generateUniqueKey(`donation-option-${s}`),type:"radio",name:"donating_option",checked:i.is_selected,value:i.additional_price,onChange:t=>this.handleDonationOptions(t,i,"option")}),o("label",{htmlFor:this.generateUniqueKey(`donation-option-${s}`)},o("span",{innerHTML:salla.money(i.name)}))))),((n=t.donation)===null||n===void 0?void 0:n.custom_amount_enabled)?o("div",{class:"s-product-options-donation-options-item"},o("input",{id:this.generateUniqueKey("donation-option-custom"),type:"radio",name:"donating_option",value:"custom",onChange:t=>this.handleDonationOptions(t,"custom","option")}),o("label",{htmlFor:this.generateUniqueKey("donation-option-custom")},o("span",null," ",this.selectDonationAmount," "))):"")]:"",o("div",{key:t.id,class:{"s-product-options-donation-input-group":true,shown:!t.details.length||t.details.length&&this.isCustomDonation}},o("input",{type:"text",id:"donating-amount",name:"donation_amount",class:"s-form-control",ref:t=>{this.donationInput=t},value:t.details.length&&t.details.some((t=>t.is_selected))?t.details.find((t=>t.is_selected)).additional_price:t.value,placeholder:t.placeholder,onInput:t=>this.handleDonationOptions(t,"custom","input"),onBlur:i=>this.changedHandler(i,t),onInvalid:i=>this.invalidHandler(i,t)}),o("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))]:this.getExpireDonationMessage(t))}fileUploader(t,i=null){var s;return o("salla-file-upload",Object.assign({},i||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:`options[${t.id}]`,required:!t.visibility_condition&&t.required,height:"120px",onAdded:i=>this.changedHandler(i,t),url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:i=>this.invalidHandler(i,t),class:{"s-product-options-image-input":true,required:t.required}}),o("div",{class:"s-product-options-filepond-placeholder"},o("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:((s=i.accept)===null||s===void 0?void 0:s.split(",").every((t=>t.includes("image"))))?a:d}),o("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),o("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))}imageOption(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})}fileOption(t){const i=t.details.map((t=>this.fileTypes[t.name])).filter(Boolean);return(i===null||i===void 0?void 0:i.length)?this.fileUploader(t,{accept:i.join(",")}):"File types not selected."}numberOption(t){return o("input",{type:"text",value:t.value,class:"s-form-control",required:!t.visibility_condition&&t.required,name:`options[${t.id}]`,placeholder:t.placeholder,onBlur:i=>this.changedHandler(i,t),onInvalid:i=>this.invalidHandler(i,t),onInput:t=>salla.helpers.inputDigitsOnly(t.target)})}splitterOption(){return o("div",{class:"s-product-options-splitter"})}textOption(t){return o("div",{class:"s-product-options-text"},o("input",{type:"text",value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,name:`options[${t.id}]`,placeholder:t.placeholder,onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)}))}textareaOption(t){return o("div",{class:"s-product-options-textarea"},o("div",{class:"mt-1"},o("textarea",{rows:4,value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,id:`options[${t.id}]`,name:`options[${t.id}]`,placeholder:t.placeholder,onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)})))}mapOption(t){return o("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:`options[${t.id}]`,searchable:true,required:t.required,onInvalidInput:i=>this.invalidHandler(i,t),onSelected:i=>this.changedHandler(i,t)})}colorPickerOption(t){return o("salla-color-picker",{onSubmitted:i=>this.changedHandler(i,t),name:`options[${t.id}]`,required:!t.visibility_condition&&t.required,onInvalidInput:i=>this.invalidHandler(i,t),color:t.value})}timeOption(t){return o("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,name:`options[${t.id}]`,class:"s-product-options-time-element",onInvalidInput:i=>this.invalidHandler(i,t),onPicked:i=>this.changedHandler(i,t)})}dateOption(t){return o("div",{class:"s-product-options-date-element"},o("salla-datetime-picker",{value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,minDate:new Date,name:`options[${t.id}]`,onInvalidInput:i=>this.invalidHandler(i,t),onPicked:i=>this.changedHandler(i,t)}))}datetimeOption(t){return o("div",{class:"s-product-options-datetime-element"},o("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:!t.visibility_condition&&t.required,name:`options[${t.id}]`,maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:i=>this.invalidHandler(i,t),onPicked:i=>this.changedHandler(i,t)}))}getOptionDetailName(t,i=true,o){var s;let n;if(o&&o===l.COLOR){n=t.name+(i&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?` <br/> <p> ${this.outOfStockText} </p>`:"")+(t.additional_price?` <p> (${salla.money(t.additional_price,false)}) </p>`:"")}if(!n){n=t.name+(i&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?` - ${this.outOfStockText}`:"")+(t.additional_price?` (${salla.money(t.additional_price,false)})`:"")}return n.replace("<i class=sicon-sar></i>",((s=salla.config.currency())===null||s===void 0?void 0:s.symbol)||"ر.س")}isOptionDetailOut(t){var i;if(t.is_out||!t.skus_availability||!((i=this.selectedSkus)===null||i===void 0?void 0:i.length)){return t.is_out}const o=this.selectedOptions.filter((i=>i.id===t.id)).length;if(o&&this.selectedOptions.length===1){return false}if(o){const i=this.selectedSkus.filter((t=>this.outSkus.includes(t)));return Object.keys(t.skus_availability).some((t=>i.includes(Number(t))))}return this.selectedOptions.some((i=>i.is_out&&i.option_id!==t.option_id))}renderInput(t,i,s,n,e,a){const l=this.generateUniqueKey(`${t}-${s.id}-${i.id}`);const r=this.isOptionDetailOut(i);return o("label",{class:{"s-product-options-disabled":r}},o("input",{id:l,type:t,name:e,value:i.id,disabled:r,required:n,checked:i.is_selected,onInvalid:t=>this.invalidHandler(t,s),onChange:t=>this.changedHandler(t,s)}),o("div",{class:{"s-product-options-grid-mode-span":a,"s-product-options-disabled":r}},this.getOptionDetailName(i)))}renderOptionDetails(t,i,o,s=false){const n=t==="radio"?`options[${i.id}]`:`options[${i.id}][]`;return i===null||i===void 0?void 0:i.details.map((e=>this.renderInput(t,e,i,o,n,s)))}renderSelect(t){return o("div",null,o("select",{name:`options[${t.id}]`,required:!t.visibility_condition&&t.required,class:"s-form-control",onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)},o("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((t=>o("option",{key:t.id,value:t.id,disabled:this.canDisabled&&this.isOptionDetailOut(t),selected:t.is_selected},this.getOptionDetailName(t))))))}renderButtonStyle(t,i,s){return o("div",{class:"s-product-options-grid-mode"},this.renderOptionDetails(t,i,s,true))}singleOption(t){var i,o;const s=((o=(i=this.optionConfig)===null||i===void 0?void 0:i["single-option"])===null||o===void 0?void 0:o.type)==="button";const n=!t.visibility_condition&&t.required;return s?this.renderButtonStyle("radio",t,n):this.renderSelect(t)}multipleOptions(t){var i,s;const n=((s=(i=this.optionConfig)===null||i===void 0?void 0:i["multiple-option"])===null||s===void 0?void 0:s.type)==="button";const e=t.required&&!t.details.some((t=>t.is_selected))&&!t.visibility_condition;return n?this.renderButtonStyle("checkbox",t,e):o("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},this.renderOptionDetails("checkbox",t,e))}colorOption(t){return o("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((i=>o("div",{class:"s-product-options-colors-item",key:i.id},o("input",{type:"radio",value:i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:`options[${t.id}]`,disabled:this.canDisabled&&this.isOptionDetailOut(i),id:this.generateUniqueKey(`color-${this.productId}-${t.id}-${i.id}`),onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)}),o("label",{htmlFor:this.generateUniqueKey(`color-${this.productId}-${t.id}-${i.id}`)},o("span",{style:{backgroundColor:i.color}}),o("div",{innerHTML:this.getOptionDetailName(i,true,t.type)}))))))}thumbnailOption(t){return o("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((i=>o("div",{key:i.id},o("input",{type:"radio",value:i.id,"data-itemid":i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:`options[${t.id}]`,"data-img-id":i.option_value,disabled:this.canDisabled&&this.isOptionDetailOut(i),id:this.generateUniqueKey(`option_${this.productId}-${t.id}_${i.id}`),onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)}),o("label",{htmlFor:this.generateUniqueKey(`option_${this.productId}-${t.id}_${i.id}`),"data-img-id":i.option_value,class:"go-to-slide"},o("img",{"data-src":i.image,src:i.image,title:i.name,alt:i.name}),o("span",{innerHTML:e,class:"s-product-options-thumbnails-icon"}),this.isOptionDetailOut(i)?[o("small",{key:i.id,class:"s-product-options-thumbnails-stock-badge"},this.outOfStockText),this.canDisabled?o("div",{key:i.id,class:"s-product-options-thumbnails-badge-overlay"}):""]:""),o("p",null,this.getOptionDetailName(i,false)," ")))))}digitalCardValuesOption(t){return o("div",{class:"s-product-options-digital-card-wrapper"},this.availableDigitalCardValues.length>0?this.availableDigitalCardValues.map((i=>{var s,n,e;const a=String(i.id);return o("label",{htmlFor:this.generateUniqueKey(a.toString()),key:a,class:"s-product-options-digital-card-option"},o("input",Object.assign({type:"radio","data-code-value":true,class:"s-form-control s-product-options-digital-card-input",value:i.id,name:`options[${t.id}]`,id:this.generateUniqueKey(a.toString()),required:!t.visibility_condition&&t.required,onInvalid:i=>this.invalidHandler(i,t)},!this.ignoreDefaultCardValue?{defaultChecked:((s=this.getSelectedDigitalCardOptions(t))===null||s===void 0?void 0:s.id)===i.id}:{})),o("span",null,i.name," ",(e=(n=salla.config)===null||n===void 0?void 0:n.currency())===null||e===void 0?void 0:e.symbol))})):o("div",{class:"s-product-options-digital-card-out-of-stock"}))}countryOption(t){return o("div",{class:"s-product-options-digital-card-wrapper"},t.details.map((i=>{var s;return o("label",{htmlFor:this.generateUniqueKey(i.id.toString()),key:i.id,class:{"s-product-options-digital-card-option":true,"s-product-options-digital-card-option-stock-out":i.is_out}},o("input",Object.assign({id:this.generateUniqueKey(i.id.toString()),type:"radio",class:"s-form-control s-product-options-digital-card-input",value:i.id,name:`options[${t.id}]`,disabled:i.is_out,required:!t.visibility_condition&&t.required,onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t),onClick:()=>{this.disableCardValue=false}},salla.url.is_page("cart")?{defaultChecked:((s=this.getSelectedDigitalCardOptions(t))===null||s===void 0?void 0:s.id)===i.id}:{})),o("img",{loading:"lazy",alt:i.code,height:24,width:24,class:"s-product-options-country-flag",src:`https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/${String(i.code).toLocaleLowerCase()}.svg`}),o("span",null,i.name))})))}get host(){return n(this)}};c.style=p;export{c as salla_product_options};
5
- //# sourceMappingURL=p-00068e76.entry.js.map
4
+ import{r as t,c as i,h as o,H as s,g as n}from"./p-DtlYcjlJ.js";import{I as e}from"./p-uTyAzPSy.js";import{C as a}from"./p-C6jIkM-X.js";var l;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["DIGITAL_CARD_VALUE"]="digital-code-value";t["COUNTRY"]="country";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker";t["BOOKING"]="booking"})(l||(l={}));var r;(function(t){t["Sar"]="SAR"})(r||(r={}));var d=`\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-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n`;const p="";const c=class{constructor(s){t(this,s);this.changed=i(this,"changed");this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ");this.isCustomDonation=false;this.selectedOptions=[];this.disableCardValue=true;this.availableDigitalCardValues=[];this.outSkus=[];this.ignoreDefaultCardValue=false;this.productId=salla.config.get("page.id");this.handleDonationOptions=(t,i,o)=>{if(i==="custom"&&o==="input"){salla.helpers.inputDigitsOnly(t.target);salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value});return}t.preventDefault();t.stopPropagation();this.isCustomDonation=t.target.value==="custom";if(this.donationInput){if(t.target.value==="custom"){this.donationInput.value="";this.donationInput.focus()}else{this.donationInput.value=t.target.value}if(i==="custom"){return}salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}};this.hideLabel=t=>{if(t.type===l.DONATION&&(t.donation&&!t.donation.can_donate)){return true}return false};this.getExpireDonationMessage=t=>{if(!t.donation){return}const i=t.donation.target_amount<=t.donation.collected_amount;return o("div",{class:{"s-product-options-donation-message":true,"s-product-options-donation-completed":i,"s-product-options-donation-expired":!i}},o("p",null,t.donation.target_message),o("span",{innerHTML:i?salla.money(t.donation.target_amount):""}))};this.canDisabled=!salla.config.get("store.settings.product.notify_options_availability")||salla.url.is_page("cart");salla.lang.onLoaded((()=>{this.outOfStockText=salla.lang.get("pages.products.out_of_stock");this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((t=>this.setOptionsData(t.data.options)))}}async setOptionsData(t){var i,o;this.optionsData=t;const s=this;(o=(i=this.optionsData[0])===null||i===void 0?void 0:i.details)===null||o===void 0?void 0:o.forEach((function(t){Object.entries(t.skus_availability||{}).filter((t=>!t[1])).map((t=>s.outSkus.push(Number(t[0]))))}))}async getSelectedOptionsData(){const t={};const i=this.host.getElementSallaData();i.forEach(((i,o)=>{if(o.startsWith("options[")){t[o.replace("options[","").replace("]","")]=i}}));return t}async reportValidity(){const t=this.host.querySelectorAll("[required]");let i=true;for(let o=0;o<t.length;o++){if("reportValidity"in t[o]&&!t[o].reportValidity()){i=false}}return i}async hasOutOfStockOption(){var t,i;return this.selectedOptions.some((t=>t.is_out))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((i=this.selectedSkus)===null||i===void 0?void 0:i.every((t=>this.outSkus.includes(t))))}async getSelectedOptions(){return this.selectedOptions}async getOption(t){return this.optionsData.find((i=>i.id===t))}invalidHandler(t,i){const o=t.target.closest(".s-product-options-option");if(!o.classList.contains("s-product-options-option-error")){o.classList.add("s-product-options-option-error")}if(!salla.url.is_page("cart")){const t=this.host.querySelector(".s-product-options-option-error");if(t===o){this.scrollToElement(o)}}}scrollToElement(t){if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}}changedHandler(t,i,o=true){const s={event:t,option:i,detail:null,productId:this.productId};if(i.details){const o=i.details.find((i=>Number(i.id)===Number(t.target.value)));s.detail=o}if(i.type==="country"){this.handleCountryOptionChange(t,s.detail)}const n=t.target.closest(".s-product-options-option");if(t.target.value||(i.type===l.FILE||i.type===l.IMAGE)&&t.type==="added"||i.type===l.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((()=>{n.classList.remove("s-product-options-option-error")}),200)}if(i.type===l.DONATION){salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}this.setSelectedSkus();this.handleRequiredMultipleOptions(i);const e=this.selectedOptions.findIndex((t=>t.option_id===s.option.id));if(s.option.type===l.MULTIPLE_OPTIONS){const t=this.selectedOptions.findIndex((t=>{var i;return t.option_id===s.option.id&&(t===null||t===void 0?void 0:t.id)===((i=s.detail)===null||i===void 0?void 0:i.id)}));if(t>-1){this.selectedOptions.splice(t,1)}else{this.selectedOptions.push(Object.assign(Object.assign({},s.detail),{option_id:s.option.id}))}}else{if(!s.detail||Object.keys(s.detail).length===0){if(e>-1){this.selectedOptions.splice(e,1)}}else{if(e>-1){this.selectedOptions[e]=Object.assign(Object.assign({},s.detail),{option_id:s.option.id})}else{this.selectedOptions.push(Object.assign(Object.assign({},s.detail),{option_id:s.option.id}))}}}this.optionsData=this.optionsData.map((t=>{if(t.id===s.option.id){return Object.assign(Object.assign({},t),{details:t.details.map((t=>{var i,o;return Object.assign(Object.assign({},t),{is_selected:s.option.type===l.MULTIPLE_OPTIONS?this.selectedOptions.some((i=>i.id===t.id)):Number(t.id)===Number((i=s.detail)===null||i===void 0?void 0:i.id),value:(o=s.detail)===null||o===void 0?void 0:o.value})}))})}return t}));if(o){this.changed.emit(s);salla.event.emit("product-options::change",s)}}setSelectedSkus(){this.selectedSkus=this.selectedOptions.map((t=>Object.keys(t.skus_availability||{}))).reduce(((t,i)=>t.filter((t=>i.includes(t)))),[]).map((t=>Number(t)))}handleRequiredMultipleOptions(t){if(t.type!==l.MULTIPLE_OPTIONS||!t.required){return}const i=this.host.querySelector(`[data-option-id="${t.id}"]`);const o=i.querySelectorAll("input:checked").length;i.querySelectorAll("input").forEach((t=>t.toggleAttribute("required",!o)))}getLatLng(t,i){return t?t.split(",")[i==="lat"?0:1]:""}getDisplayForType(t){if(this[`${t.type}Option`]){return this[`${t.type}Option`](t)}if(t.type===l.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===l.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===l.SINGLE_OPTION){return this.singleOption(t)}if(t.type===l.DIGITAL_CARD_VALUE){return this.digitalCardValuesOption(t)}if(t.type===l.COUNTRY){return this.countryOption(t)}if(t.type===l.BOOKING&&salla.url.is_page("cart")){return o("salla-booking-field",{onInvalidInput:i=>this.invalidHandler(i,t),option:t,productId:t.value})}salla.log(`Couldn't find options type(${t.type})😢`);return""}getOptionShownWhen(t){return t.visibility_condition?{"data-show-when":`options[${t.visibility_condition.option}] ${t.visibility_condition.operator} ${t.visibility_condition.value}`}:{}}getAvailableDigitalCardSKUs(t){const i=this.optionsData.find((({type:t})=>t==="digital-code-value"));if(!i)throw new Error("product-options:: No digital card options found");const o=Object.keys(t.skus_availability).filter((i=>t.skus_availability[i]===false));this.availableDigitalCardValues=i.details.filter((t=>!Object.keys(t.skus_availability).filter((t=>o.includes(t))).length))}handleCountryOptionChange(t,i){t.stopImmediatePropagation();this.ignoreDefaultCardValue=true;const o=this.host.querySelector("input[data-code-value]:checked");if(o)o.checked=false;const s=this.optionsData.find((({type:t})=>t==="digital-code-value"));if(!s)throw new Error("product-options:: No digital card options found");this.getAvailableDigitalCardSKUs(i)}getSelectedDigitalCardOptions(t){const i=t.details.find((t=>t.is_selected));const o=t.details.find((t=>!!t.is_default))||t.details[0];if(!["digital-code-value","country"].includes(t.type))return;return i||o}async componentWillLoad(){if(salla.url.is_page("cart")){this.disableCardValue=false;this.fillSelectedOptions()}if(this.config){try{this.optionConfig=typeof this.config==="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse JSON in config prop:",t)}}const t=this.optionsData.filter((({type:t})=>["country","digital-card-value"].includes(t))).length>0&&salla.url.is_page("cart");if(t){const t=this.optionsData.find((t=>t.type==="country"));const i=t&&this.getSelectedDigitalCardOptions(t);if(i){this.getAvailableDigitalCardSKUs(i)}}this.outOfStockText=salla.lang.get("pages.products.out_of_stock");await salla.onReady();document.addEventListener("paste",this.handlePaste.bind(this));const i=!salla.storage.get("cart.id")&&this.optionsData.some((t=>["file","image"].includes(t.type)));return i?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null}handlePaste(t){var i;const o=t.target;if(!Salla.config.get("store.settings.content_copyright")||!Salla.helpers.hasApplePay()||!(o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement)||!o.classList.contains("s-form-control")||!o.name.startsWith("options[")){return}t.preventDefault();const s=((i=t.clipboardData)===null||i===void 0?void 0:i.getData("text"))||"";const n=o.selectionStart;const e=o.selectionEnd;const a=o.value.slice(0,n)+s+o.value.slice(e);o.value=a;o.setSelectionRange(n+s.length,n+s.length)}hideDigitalCardsOptions(t){return this.disableCardValue&&t.type===l.DIGITAL_CARD_VALUE&&!salla.url.is_page("cart")}render(){var t;if(((t=this.optionsData)===null||t===void 0?void 0:t.length)===0){return}return o(s,{class:"s-product-options-wrapper"},o("salla-conditional-fields",null,this.optionsData.map((t=>o("div",Object.assign({key:t.id,class:`s-product-options-option-container${t.visibility_condition||this.hideDigitalCardsOptions(t)?" hidden":""}`,"data-option-id":t.id},this.getOptionShownWhen(t)),t.name==="splitter"?this.splitterOption():o("div",{class:{"s-product-options-option":true,"s-product-options-option-booking":t.type===l.BOOKING&&salla.url.is_page("cart")},"data-option-type":t.type,"data-option-required":`${t.required}`},o("label",{htmlFor:`options[${t.id}]`,class:`s-product-options-option-label ${this.hideLabel(t)?"s-product-options-option-label-hidden":""}`},o("b",null,t.name,t.required&&o("span",null," * ")," "),o("small",null,t.placeholder)),o("div",{class:`s-product-options-option-content ${this.hideLabel(t)||t.type===l.BOOKING&&salla.url.is_page("cart")?"s-product-options-option-content-full-width":""}`},this.getDisplayForType(t))))))))}generateUniqueKey(t){return this.uniqueKey?`${t}-${this.uniqueKey}`:t}fillSelectedOptions(){this.selectedOptions=this.optionsData.reduce(((t,i)=>{const o=i.details.filter((t=>t.is_selected));const s=o.map((t=>Object.assign(Object.assign({},t),{option_id:i.id})));return t.concat(s)}),[])}triggerProductFormSelectionEvents(){const t=t=>["change","input"].forEach((i=>t.dispatchEvent(new window.Event(i,{bubbles:true}))));const i=this.host.closest("form");if(i){t(i)}else{const i=new MutationObserver((()=>{const o=this.host.closest("form");if(o){t(o);i.disconnect()}}));i.observe(document.body,{childList:true,subtree:true})}}componentDidLoad(){var t,i;if(salla.url.is_page("product.single")){this.triggerProductFormSelectionEvents()}if(((t=this.optionsData)===null||t===void 0?void 0:t.length)===0&&!this.optionsData.some((t=>t.type===l.DONATION))){return}const o=(i=this.optionsData.find((t=>t.type===l.DONATION)))===null||i===void 0?void 0:i.details.find((t=>t.is_selected));if(!o){return}setTimeout((()=>{salla.event.emit("product-options::donation-changed",{id:this.productId,price:o.additional_price})}),1e3)}donationOption(t,i){var s,n;return o("div",{class:"s-product-options-donation-wrapper"},((s=t.donation)===null||s===void 0?void 0:s.can_donate)?[t.donation?o("div",{key:t.id,class:"s-product-options-donation-progress"},o("salla-progress-bar",{donation:t.donation})):"",t.details.length?[o("h4",{key:t.id},this.selectAmount),o("div",{key:t.id,class:"s-product-options-donation-options"},t.details.map(((i,s)=>o("div",{key:t.id,class:"s-product-options-donation-options-item"},o("input",{id:this.generateUniqueKey(`donation-option-${s}`),type:"radio",name:"donating_option",checked:i.is_selected,value:i.additional_price,onChange:t=>this.handleDonationOptions(t,i,"option")}),o("label",{htmlFor:this.generateUniqueKey(`donation-option-${s}`)},o("span",{innerHTML:salla.money(i.name)}))))),((n=t.donation)===null||n===void 0?void 0:n.custom_amount_enabled)?o("div",{class:"s-product-options-donation-options-item"},o("input",{id:this.generateUniqueKey("donation-option-custom"),type:"radio",name:"donating_option",value:"custom",onChange:t=>this.handleDonationOptions(t,"custom","option")}),o("label",{htmlFor:this.generateUniqueKey("donation-option-custom")},o("span",null," ",this.selectDonationAmount," "))):"")]:"",o("div",{key:t.id,class:{"s-product-options-donation-input-group":true,shown:!t.details.length||t.details.length&&this.isCustomDonation}},o("input",{type:"text",id:"donating-amount",name:"donation_amount",class:"s-form-control",ref:t=>{this.donationInput=t},value:t.details.length&&t.details.some((t=>t.is_selected))?t.details.find((t=>t.is_selected)).additional_price:t.value,placeholder:t.placeholder,onInput:t=>this.handleDonationOptions(t,"custom","input"),onBlur:i=>this.changedHandler(i,t),onInvalid:i=>this.invalidHandler(i,t)}),o("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))]:this.getExpireDonationMessage(t))}fileUploader(t,i=null){var s;return o("salla-file-upload",Object.assign({},i||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:`options[${t.id}]`,required:!t.visibility_condition&&t.required,height:"120px",onAdded:i=>this.changedHandler(i,t),url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:i=>this.invalidHandler(i,t),class:{"s-product-options-image-input":true,required:t.required}}),o("div",{class:"s-product-options-filepond-placeholder"},o("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:((s=i.accept)===null||s===void 0?void 0:s.split(",").every((t=>t.includes("image"))))?a:d}),o("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),o("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))}imageOption(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})}fileOption(t){const i=t.details.map((t=>this.fileTypes[t.name])).filter(Boolean);return(i===null||i===void 0?void 0:i.length)?this.fileUploader(t,{accept:i.join(",")}):"File types not selected."}numberOption(t){return o("input",{type:"text",value:t.value,class:"s-form-control",required:!t.visibility_condition&&t.required,name:`options[${t.id}]`,placeholder:t.placeholder,onBlur:i=>this.changedHandler(i,t),onInvalid:i=>this.invalidHandler(i,t),onInput:t=>salla.helpers.inputDigitsOnly(t.target)})}splitterOption(){return o("div",{class:"s-product-options-splitter"})}textOption(t){return o("div",{class:"s-product-options-text"},o("input",{type:"text",value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,name:`options[${t.id}]`,placeholder:t.placeholder,onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)}))}textareaOption(t){return o("div",{class:"s-product-options-textarea"},o("div",{class:"mt-1"},o("textarea",{rows:4,value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,id:`options[${t.id}]`,name:`options[${t.id}]`,placeholder:t.placeholder,onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)})))}mapOption(t){return o("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:`options[${t.id}]`,searchable:true,required:t.required,onInvalidInput:i=>this.invalidHandler(i,t),onSelected:i=>this.changedHandler(i,t)})}colorPickerOption(t){return o("salla-color-picker",{onSubmitted:i=>this.changedHandler(i,t),name:`options[${t.id}]`,required:!t.visibility_condition&&t.required,onInvalidInput:i=>this.invalidHandler(i,t),color:t.value})}timeOption(t){return o("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,name:`options[${t.id}]`,class:"s-product-options-time-element",onInvalidInput:i=>this.invalidHandler(i,t),onPicked:i=>this.changedHandler(i,t)})}dateOption(t){return o("div",{class:"s-product-options-date-element"},o("salla-datetime-picker",{value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,minDate:new Date,name:`options[${t.id}]`,onInvalidInput:i=>this.invalidHandler(i,t),onPicked:i=>this.changedHandler(i,t)}))}datetimeOption(t){return o("div",{class:"s-product-options-datetime-element"},o("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:!t.visibility_condition&&t.required,name:`options[${t.id}]`,maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:i=>this.invalidHandler(i,t),onPicked:i=>this.changedHandler(i,t)}))}getOptionDetailName(t,i=true,o){var s;let n;if(o&&o===l.COLOR){n=t.name+(i&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?` <br/> <p> ${this.outOfStockText} </p>`:"")+(t.additional_price?` <p> (${salla.money(t.additional_price,false)}) </p>`:"")}if(!n){n=t.name+(i&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?` - ${this.outOfStockText}`:"")+(t.additional_price?` (${salla.money(t.additional_price,false)})`:"")}return n.replace("<i class=sicon-sar></i>",((s=salla.config.currency())===null||s===void 0?void 0:s.symbol)||"ر.س")}isOptionDetailOut(t){var i;if(t.is_out||!t.skus_availability||!((i=this.selectedSkus)===null||i===void 0?void 0:i.length)){return t.is_out}const o=this.selectedOptions.filter((i=>i.id===t.id)).length;if(o&&this.selectedOptions.length===1){return false}if(o){const i=this.selectedSkus.filter((t=>this.outSkus.includes(t)));return Object.keys(t.skus_availability).some((t=>i.includes(Number(t))))}return this.selectedOptions.some((i=>i.is_out&&i.option_id!==t.option_id))}renderInput(t,i,s,n,e,a){const l=this.generateUniqueKey(`${t}-${s.id}-${i.id}`);const r=this.isOptionDetailOut(i);return o("label",{class:{"s-product-options-disabled":r}},o("input",{id:l,type:t,name:e,value:i.id,disabled:r,required:n,checked:i.is_selected,onInvalid:t=>this.invalidHandler(t,s),onChange:t=>this.changedHandler(t,s)}),o("div",{class:{"s-product-options-grid-mode-span":a,"s-product-options-disabled":r}},this.getOptionDetailName(i)))}renderOptionDetails(t,i,o,s=false){const n=t==="radio"?`options[${i.id}]`:`options[${i.id}][]`;return i===null||i===void 0?void 0:i.details.map((e=>this.renderInput(t,e,i,o,n,s)))}renderSelect(t){return o("div",null,o("select",{name:`options[${t.id}]`,required:!t.visibility_condition&&t.required,class:"s-form-control",onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)},o("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((t=>o("option",{key:t.id,value:t.id,disabled:this.canDisabled&&this.isOptionDetailOut(t),selected:t.is_selected},this.getOptionDetailName(t))))))}renderButtonStyle(t,i,s){return o("div",{class:"s-product-options-grid-mode"},this.renderOptionDetails(t,i,s,true))}singleOption(t){var i,o;const s=((o=(i=this.optionConfig)===null||i===void 0?void 0:i["single-option"])===null||o===void 0?void 0:o.type)==="button";const n=!t.visibility_condition&&t.required;return s?this.renderButtonStyle("radio",t,n):this.renderSelect(t)}multipleOptions(t){var i,s;const n=((s=(i=this.optionConfig)===null||i===void 0?void 0:i["multiple-option"])===null||s===void 0?void 0:s.type)==="button";const e=t.required&&!t.details.some((t=>t.is_selected))&&!t.visibility_condition;return n?this.renderButtonStyle("checkbox",t,e):o("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},this.renderOptionDetails("checkbox",t,e))}colorOption(t){return o("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((i=>o("div",{class:"s-product-options-colors-item",key:i.id},o("input",{type:"radio",value:i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:`options[${t.id}]`,disabled:this.canDisabled&&this.isOptionDetailOut(i),id:this.generateUniqueKey(`color-${this.productId}-${t.id}-${i.id}`),onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)}),o("label",{htmlFor:this.generateUniqueKey(`color-${this.productId}-${t.id}-${i.id}`)},o("span",{style:{backgroundColor:i.color}}),o("div",{innerHTML:this.getOptionDetailName(i,true,t.type)}))))))}thumbnailOption(t){return o("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((i=>o("div",{key:i.id},o("input",{type:"radio",value:i.id,"data-itemid":i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:`options[${t.id}]`,"data-img-id":i.option_value,disabled:this.canDisabled&&this.isOptionDetailOut(i),id:this.generateUniqueKey(`option_${this.productId}-${t.id}_${i.id}`),onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)}),o("label",{htmlFor:this.generateUniqueKey(`option_${this.productId}-${t.id}_${i.id}`),"data-img-id":i.option_value,class:"go-to-slide"},o("img",{"data-src":i.image,src:i.image,title:i.name,alt:i.name}),o("span",{innerHTML:e,class:"s-product-options-thumbnails-icon"}),this.isOptionDetailOut(i)?[o("small",{key:i.id,class:"s-product-options-thumbnails-stock-badge"},this.outOfStockText),this.canDisabled?o("div",{key:i.id,class:"s-product-options-thumbnails-badge-overlay"}):""]:""),o("p",null,this.getOptionDetailName(i,false)," ")))))}digitalCardValuesOption(t){return o("div",{class:"s-product-options-digital-card-wrapper"},this.availableDigitalCardValues.length>0?this.availableDigitalCardValues.map((i=>{var s,n,e;const a=String(i.id);return o("label",{htmlFor:this.generateUniqueKey(a.toString()),key:a,class:"s-product-options-digital-card-option"},o("input",Object.assign({type:"radio","data-code-value":true,class:"s-form-control s-product-options-digital-card-input",value:i.id,name:`options[${t.id}]`,id:this.generateUniqueKey(a.toString()),required:!t.visibility_condition&&t.required,onInvalid:i=>this.invalidHandler(i,t)},!this.ignoreDefaultCardValue?{defaultChecked:((s=this.getSelectedDigitalCardOptions(t))===null||s===void 0?void 0:s.id)===i.id}:{})),o("span",null,i.name," ",(e=(n=salla.config)===null||n===void 0?void 0:n.currency())===null||e===void 0?void 0:e.symbol))})):o("div",{class:"s-product-options-digital-card-out-of-stock"}))}countryOption(t){return o("div",{class:"s-product-options-digital-card-wrapper"},t.details.map((i=>{var s;return o("label",{htmlFor:this.generateUniqueKey(i.id.toString()),key:i.id,class:{"s-product-options-digital-card-option":true,"s-product-options-digital-card-option-stock-out":i.is_out}},o("input",Object.assign({id:this.generateUniqueKey(i.id.toString()),type:"radio",class:"s-form-control s-product-options-digital-card-input",value:i.id,name:`options[${t.id}]`,disabled:i.is_out,required:!t.visibility_condition&&t.required,onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t),onClick:()=>{this.disableCardValue=false}},salla.url.is_page("cart")?{defaultChecked:((s=this.getSelectedDigitalCardOptions(t))===null||s===void 0?void 0:s.id)===i.id}:{})),o("img",{loading:"lazy",alt:i.code,height:24,width:24,class:"s-product-options-country-flag",src:`https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/${String(i.code).toLocaleLowerCase()}.svg`}),o("span",null,i.name))})))}get host(){return n(this)}};c.style=p;export{c as salla_product_options};
5
+ //# sourceMappingURL=p-db7a231b.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-BL8Qlvzz.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:"499e2f4c68034191143f53bb4d4581e85e4066b0"},t("ul",{key:"17053219a16087c96e1d9e5c15d1478729f43954",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-96f8325a.system.entry.js.map
4
+ System.register(["./p-DiFVtThr.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:"499e2f4c68034191143f53bb4d4581e85e4066b0"},t("ul",{key:"17053219a16087c96e1d9e5c15d1478729f43954",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-e0e29fb0.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as l,h as a,H as t}from"./p-Dr_h0iSH.js";import{G as s}from"./p-C0JNGIpa.js";const o="";const r=l=>{if(!l)return"";return new Date(Number(l)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})};const e=l=>{if(!l)return"";try{const a=l.toLowerCase();const t=salla.lang.get(`pages.loyalty_program.${a}`);return t===`pages.loyalty_program.${a}`?l:t}catch(a){return l}};const i=class{constructor(a){l(this,a);this.loyaltyPointsArray=[];this.isLoadingLoyalty=false;this.nextPageUrlLoyalty="";this.handleClick=()=>{this.loadMoreLoyaltyPoints()}}componentWillLoad(){return salla.onReady().then((()=>{this.loadLoyaltyPoints()}))}async loadLoyaltyPoints(){this.isLoadingLoyalty=true;try{let l=`/balance/points?page=1`;let a=await salla.api.request(l);this.loyaltyPointsArray=a.data;this.nextPageUrlLoyalty=a.cursor.next}catch(l){console.error("Error loading loyalty points transactions",l)}finally{this.isLoadingLoyalty=false}}async loadMoreLoyaltyPoints(){var l;if(!this.nextPageUrlLoyalty)return;this.isLoadingLoyalty=true;try{let a=await salla.api.request(this.nextPageUrlLoyalty);this.loyaltyPointsArray=[...this.loyaltyPointsArray,...a.data];this.nextPageUrlLoyalty=((l=a.cursor)===null||l===void 0?void 0:l.next)||""}catch(l){console.error("Error loading more loyalty points",l)}finally{this.isLoadingLoyalty=false}}render(){return a(t,{key:"300d58186edf747b1dd6dc7a1d67c0c93606aa5e"},a("div",{key:"98e3a15104e813c6798ccac75fbd1bb163735c54"},this.isLoadingLoyalty?a("salla-loading",null):a("div",null,this.loyaltyPointsArray.length>0?a("div",null,a("table",{class:"s-loyalty-program-table"},a("thead",{class:"s-loyalty-program-table-head"},a("tr",{class:"s-loyalty-program-table-head-tr"},a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.points")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.date")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.note")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.status")))),a("tbody",{class:"s-loyalty-program-table-tbody"},this.loyaltyPointsArray.map((l=>a("tr",{class:"s-loyalty-program-table-tbody-tr"},a("td",{class:"s-loyalty-program-table-tbody-tr-td"},(l===null||l===void 0?void 0:l.type)==="plus"?"+":"",(l===null||l===void 0?void 0:l.points)||""," ",salla.lang.get("pages.loyalty_program.point")),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r((l===null||l===void 0?void 0:l.created_at)?Number(l.created_at)*1e3:undefined)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(l===null||l===void 0?void 0:l.points_expire_date)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},e(l===null||l===void 0?void 0:l.key)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},e(l===null||l===void 0?void 0:l.status_key))))))),a("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrlLoyalty&&a("salla-button",{onClick:this.handleClick,loading:this.isLoadingLoyalty},salla.lang.get("common.elements.load_more")))):a("div",null,a("div",{class:"s-loyalty-program-table-empty-state"},a("span",{innerHTML:s}),a("div",{class:"s-loyalty-program-table-placeholder-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_title")),a("div",{class:"s-loyalty-program-table-placeholder-sub-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_sub_title")))))))}};i.style=o;export{i as salla_loyalty_program};
5
- //# sourceMappingURL=p-5dd3d1b7.entry.js.map
4
+ import{r as l,h as a,H as t}from"./p-DtlYcjlJ.js";import{G as s}from"./p-C0JNGIpa.js";const o="";const r=l=>{if(!l)return"";return new Date(Number(l)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})};const e=l=>{if(!l)return"";try{const a=l.toLowerCase();const t=salla.lang.get(`pages.loyalty_program.${a}`);return t===`pages.loyalty_program.${a}`?l:t}catch(a){return l}};const i=class{constructor(a){l(this,a);this.loyaltyPointsArray=[];this.isLoadingLoyalty=false;this.nextPageUrlLoyalty="";this.handleClick=()=>{this.loadMoreLoyaltyPoints()}}componentWillLoad(){return salla.onReady().then((()=>{this.loadLoyaltyPoints()}))}async loadLoyaltyPoints(){this.isLoadingLoyalty=true;try{let l=`/balance/points?page=1`;let a=await salla.api.request(l);this.loyaltyPointsArray=a.data;this.nextPageUrlLoyalty=a.cursor.next}catch(l){console.error("Error loading loyalty points transactions",l)}finally{this.isLoadingLoyalty=false}}async loadMoreLoyaltyPoints(){var l;if(!this.nextPageUrlLoyalty)return;this.isLoadingLoyalty=true;try{let a=await salla.api.request(this.nextPageUrlLoyalty);this.loyaltyPointsArray=[...this.loyaltyPointsArray,...a.data];this.nextPageUrlLoyalty=((l=a.cursor)===null||l===void 0?void 0:l.next)||""}catch(l){console.error("Error loading more loyalty points",l)}finally{this.isLoadingLoyalty=false}}render(){return a(t,{key:"300d58186edf747b1dd6dc7a1d67c0c93606aa5e"},a("div",{key:"98e3a15104e813c6798ccac75fbd1bb163735c54"},this.isLoadingLoyalty?a("salla-loading",null):a("div",null,this.loyaltyPointsArray.length>0?a("div",null,a("table",{class:"s-loyalty-program-table"},a("thead",{class:"s-loyalty-program-table-head"},a("tr",{class:"s-loyalty-program-table-head-tr"},a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.points")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.date")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.note")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.status")))),a("tbody",{class:"s-loyalty-program-table-tbody"},this.loyaltyPointsArray.map((l=>a("tr",{class:"s-loyalty-program-table-tbody-tr"},a("td",{class:"s-loyalty-program-table-tbody-tr-td"},(l===null||l===void 0?void 0:l.type)==="plus"?"+":"",(l===null||l===void 0?void 0:l.points)||""," ",salla.lang.get("pages.loyalty_program.point")),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r((l===null||l===void 0?void 0:l.created_at)?Number(l.created_at)*1e3:undefined)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(l===null||l===void 0?void 0:l.points_expire_date)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},e(l===null||l===void 0?void 0:l.key)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},e(l===null||l===void 0?void 0:l.status_key))))))),a("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrlLoyalty&&a("salla-button",{onClick:this.handleClick,loading:this.isLoadingLoyalty},salla.lang.get("common.elements.load_more")))):a("div",null,a("div",{class:"s-loyalty-program-table-empty-state"},a("span",{innerHTML:s}),a("div",{class:"s-loyalty-program-table-placeholder-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_title")),a("div",{class:"s-loyalty-program-table-placeholder-sub-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_sub_title")))))))}};i.style=o;export{i as salla_loyalty_program};
5
+ //# sourceMappingURL=p-e1e90d0c.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as t,H as r}from"./p-Dr_h0iSH.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;var o=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>`;var n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>`;var l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--){if(e>=t[r].threshold){return t[r].index}}return 0}}const f=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=e=>{this.activeTabTier=e};salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");this.discountText=salla.lang.get("blocks.tiered_offer.discount");this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();if(t){this.updateOfferValues(e,t)}}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){var r,s;if(!t||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(t,e.coupon)){this.canRender=false;return}this.canRender=true;if(((r=t.details)===null||r===void 0?void 0:r.with_current_cart)===false){return}const i=((s=t.details)===null||s===void 0?void 0:s.current_value)||0;this.apiOfferData=t;const o=this.findCurrentTierIndex(i);if(o===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=o;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,o);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"s-tiered-offer-tab-active":""}`,onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))}))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name))))})()))}render(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};c.style=f;export{c as salla_tiered_offer};
5
- //# sourceMappingURL=p-fce368f7.entry.js.map
4
+ import{r as e,h as t,H as r}from"./p-DtlYcjlJ.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;var o=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>`;var n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>`;var l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--){if(e>=t[r].threshold){return t[r].index}}return 0}}const f=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=e=>{this.activeTabTier=e};salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");this.discountText=salla.lang.get("blocks.tiered_offer.discount");this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();if(t){this.updateOfferValues(e,t)}}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){var r,s;if(!t||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(t,e.coupon)){this.canRender=false;return}this.canRender=true;if(((r=t.details)===null||r===void 0?void 0:r.with_current_cart)===false){return}const i=((s=t.details)===null||s===void 0?void 0:s.current_value)||0;this.apiOfferData=t;const o=this.findCurrentTierIndex(i);if(o===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=o;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,o);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"s-tiered-offer-tab-active":""}`,onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))}))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name))))})()))}render(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};c.style=f;export{c as salla_tiered_offer};
5
+ //# sourceMappingURL=p-e28d3b71.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as a,H as t,g as l}from"./p-Dr_h0iSH.js";const r=":host{display:block}";const i=class{constructor(a){s(this,a);var t;this.apps=salla.config.get("store.apps");this.appSlot=((t=this.host.querySelector('[slot="app"]'))===null||t===void 0?void 0:t.innerHTML)||`<img alt={name} src={icon} />`;salla.onReady((()=>{this.apps=salla.config.get("store.apps")}));salla.lang.onLoaded((()=>{this.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}getAppsArray(){return Object.entries(this.apps).map((([s,a])=>({name:s,value:a})))}componentWillLoad(){return new Promise((s=>salla.onReady(s)))}render(){const s=this.getAppsArray();if(Array.isArray(s)&&!s.length){return}return a(t,{class:"s-apps-icons"},!this.hideTitle&&a("h3",null,this.appsTitle),a("div",{class:{"s-apps-icons-list":true,vertical:this.vertical}},s.map(((s,t)=>a("a",{key:t,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:this.appSlot.replace(/\{icon\}/g,salla.url.cdn(`images/${s.name}.png`)).replace(/\{name\}/g,s.name)})))))}componentDidRender(){var s;(s=this.host.querySelector('[slot="app"]'))===null||s===void 0?void 0:s.remove()}get host(){return l(this)}};i.style=r;export{i as salla_apps_icons};
5
- //# sourceMappingURL=p-75c9e2c4.entry.js.map
4
+ import{r as s,h as a,H as t,g as l}from"./p-DtlYcjlJ.js";const r=":host{display:block}";const i=class{constructor(a){s(this,a);var t;this.apps=salla.config.get("store.apps");this.appSlot=((t=this.host.querySelector('[slot="app"]'))===null||t===void 0?void 0:t.innerHTML)||`<img alt={name} src={icon} />`;salla.onReady((()=>{this.apps=salla.config.get("store.apps")}));salla.lang.onLoaded((()=>{this.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}getAppsArray(){return Object.entries(this.apps).map((([s,a])=>({name:s,value:a})))}componentWillLoad(){return new Promise((s=>salla.onReady(s)))}render(){const s=this.getAppsArray();if(Array.isArray(s)&&!s.length){return}return a(t,{class:"s-apps-icons"},!this.hideTitle&&a("h3",null,this.appsTitle),a("div",{class:{"s-apps-icons-list":true,vertical:this.vertical}},s.map(((s,t)=>a("a",{key:t,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:this.appSlot.replace(/\{icon\}/g,salla.url.cdn(`images/${s.name}.png`)).replace(/\{name\}/g,s.name)})))))}componentDidRender(){var s;(s=this.host.querySelector('[slot="app"]'))===null||s===void 0?void 0:s.remove()}get host(){return l(this)}};i.style=r;export{i as salla_apps_icons};
5
+ //# sourceMappingURL=p-e6d51e3a.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,c as t,h as i,H as e,g as a}from"./p-Dr_h0iSH.js";import{H as h}from"./p-CGaH6V1S.js";import{F as l}from"./p-DL4h2bc3.js";import"./p-CgtvEd63.js";const r=":host{display:block}";const c=class{constructor(i){s(this,i);this.changed=t(this,"changed");this.initHeight=195;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل";this.page=salla.config.get("page")}connectedCallback(){this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;salla.onReady((()=>{this.page=salla.config.get("page")}));salla.lang.onLoaded((()=>{this.showMoreLabel=salla.lang.getWithDefault("common.titles.more",this.showMoreLabel);this.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",this.showLessLabel)}))}componentDidLoad(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight=`${this.initHeight}px`);this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}async setWidgetHeight(s=250){this.widgetContent.removeAttribute("style");setTimeout((()=>{let s=this.widgetContent.scrollHeight;this.widgetContent.style.height=s+"px"}),s)}async reset(){if(this.option.type===l.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((s=>s.checked=false))}async showMore(){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?`${this.widgetValues.scrollHeight}px`:`${this.initHeight}px`;setTimeout((()=>{this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}),400)}async toggleWidget(){this.isOpen=!this.isOpen;h.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(()=>this.isOpen))}renderFilterOption(s){if(![l.VALUES,l.MINIMUM,l.VARIANTS].includes(s.type)){return""}return s.values.map(((t,e)=>{let a=typeof t=="number"?t:t.key||t.value;return i("label",{class:"s-filters-label",htmlFor:`${s.key}-option-${a}`,key:`${s.key}-option-${a}`},i("input",{id:`${s.key}-option-${a}`,name:s.key,type:"radio",checked:this.isSelectedOption(s,a),class:`s-filters-radio`,onChange:t=>this.changed.emit({event:t,option:s,value:a})}),this.getOptionLabel(s,t))}))}isSelectedOption(s,t){if(s.type===l.MINIMUM){return this.filtersData[s.key]==t}if(s.type===l.VARIANTS){return this.filtersData[s.type]&&this.filtersData[s.type][Object.keys(this.filtersData[s.type])[0]]==t}if(s.type===l.RANGE){return this.filtersData[s.key]&&this.filtersData[s.key].min==t.min&&this.filtersData[s.key].max==t.max}if(s.type===l.VALUES){return this.filtersData[s.key]&&Number(this.filtersData[s.key])==Number(t)}return false}getOptionLabel(s,t){if(s.key=="rating"){return i("salla-rating-stars",{size:"small",value:t})}let e=t.value||"null";return i("span",{class:"s-filters-option-name"},e)}render(){return i(e,{key:"1987fec03cfe48cddc60af2d81bbc30a476dcb61",class:"s-filters-widget-container"},i("h3",{key:"4232775c4012d1be8bb3036d9d09e5d29d951ee4",class:"s-filters-widget-title",onClick:()=>this.toggleWidget()},i("span",{key:"61cf9ea5a69f3ab5377502a396cc84478c6152a1"},this.option.label),i("span",{key:"b75914eb06f9d419d0a89da2a8f2da2f891f3d27",class:`s-filters-widget-plusminus ${this.isOpen?"s-filters-widget-plusminus-active":""}`})),i("div",{key:"f65e2f8a44648b034dacf1bda1aa64b5398627b7",class:"s-filters-widget-content",ref:s=>this.widgetContent=s},i("div",{key:"adcafe169ce8cbef671263f3624bce071b168c36",class:"s-filters-widget-values",ref:s=>this.widgetValues=s},i("slot",{key:"fa006556e44e508c3c64cc5ae76cc826b7e7601e"}),this.option.type!==l.RANGE?this.renderFilterOption(this.option):i("salla-price-range",{onChanged:s=>{this.changed.emit(s.detail)},ref:s=>this.priceRange=s,filtersData:this.filtersData,option:this.option})),this.withLoadMore&&i("a",{key:"16a4ddeb365dc1d52fc51a8999fc6d7dbe094658",class:"s-filters-widget-more",onClick:()=>this.showMore()},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))}get host(){return a(this)}};c.style=r;export{c as salla_filters_widget};
5
- //# sourceMappingURL=p-16cb7a49.entry.js.map
4
+ import{r as s,c as t,h as i,H as e,g as a}from"./p-DtlYcjlJ.js";import{H as h}from"./p-CGaH6V1S.js";import{F as l}from"./p-DL4h2bc3.js";import"./p-CgtvEd63.js";const r=":host{display:block}";const c=class{constructor(i){s(this,i);this.changed=t(this,"changed");this.initHeight=195;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل";this.page=salla.config.get("page")}connectedCallback(){this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;salla.onReady((()=>{this.page=salla.config.get("page")}));salla.lang.onLoaded((()=>{this.showMoreLabel=salla.lang.getWithDefault("common.titles.more",this.showMoreLabel);this.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",this.showLessLabel)}))}componentDidLoad(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight=`${this.initHeight}px`);this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}async setWidgetHeight(s=250){this.widgetContent.removeAttribute("style");setTimeout((()=>{let s=this.widgetContent.scrollHeight;this.widgetContent.style.height=s+"px"}),s)}async reset(){if(this.option.type===l.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((s=>s.checked=false))}async showMore(){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?`${this.widgetValues.scrollHeight}px`:`${this.initHeight}px`;setTimeout((()=>{this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}),400)}async toggleWidget(){this.isOpen=!this.isOpen;h.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(()=>this.isOpen))}renderFilterOption(s){if(![l.VALUES,l.MINIMUM,l.VARIANTS].includes(s.type)){return""}return s.values.map(((t,e)=>{let a=typeof t=="number"?t:t.key||t.value;return i("label",{class:"s-filters-label",htmlFor:`${s.key}-option-${a}`,key:`${s.key}-option-${a}`},i("input",{id:`${s.key}-option-${a}`,name:s.key,type:"radio",checked:this.isSelectedOption(s,a),class:`s-filters-radio`,onChange:t=>this.changed.emit({event:t,option:s,value:a})}),this.getOptionLabel(s,t))}))}isSelectedOption(s,t){if(s.type===l.MINIMUM){return this.filtersData[s.key]==t}if(s.type===l.VARIANTS){return this.filtersData[s.type]&&this.filtersData[s.type][Object.keys(this.filtersData[s.type])[0]]==t}if(s.type===l.RANGE){return this.filtersData[s.key]&&this.filtersData[s.key].min==t.min&&this.filtersData[s.key].max==t.max}if(s.type===l.VALUES){return this.filtersData[s.key]&&Number(this.filtersData[s.key])==Number(t)}return false}getOptionLabel(s,t){if(s.key=="rating"){return i("salla-rating-stars",{size:"small",value:t})}let e=t.value||"null";return i("span",{class:"s-filters-option-name"},e)}render(){return i(e,{key:"1987fec03cfe48cddc60af2d81bbc30a476dcb61",class:"s-filters-widget-container"},i("h3",{key:"4232775c4012d1be8bb3036d9d09e5d29d951ee4",class:"s-filters-widget-title",onClick:()=>this.toggleWidget()},i("span",{key:"61cf9ea5a69f3ab5377502a396cc84478c6152a1"},this.option.label),i("span",{key:"b75914eb06f9d419d0a89da2a8f2da2f891f3d27",class:`s-filters-widget-plusminus ${this.isOpen?"s-filters-widget-plusminus-active":""}`})),i("div",{key:"f65e2f8a44648b034dacf1bda1aa64b5398627b7",class:"s-filters-widget-content",ref:s=>this.widgetContent=s},i("div",{key:"adcafe169ce8cbef671263f3624bce071b168c36",class:"s-filters-widget-values",ref:s=>this.widgetValues=s},i("slot",{key:"fa006556e44e508c3c64cc5ae76cc826b7e7601e"}),this.option.type!==l.RANGE?this.renderFilterOption(this.option):i("salla-price-range",{onChanged:s=>{this.changed.emit(s.detail)},ref:s=>this.priceRange=s,filtersData:this.filtersData,option:this.option})),this.withLoadMore&&i("a",{key:"16a4ddeb365dc1d52fc51a8999fc6d7dbe094658",class:"s-filters-widget-more",onClick:()=>this.showMore()},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))}get host(){return a(this)}};c.style=r;export{c as salla_filters_widget};
5
+ //# sourceMappingURL=p-ee66c0dd.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as i,g as s}from"./p-Dr_h0iSH.js";import{H as n}from"./p-CGaH6V1S.js";import"./p-CgtvEd63.js";const o="";const a=class{constructor(i){t(this,i);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((()=>{this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");this.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}loading(t=true){var i;let s=(i=this.status)===null||i===void 0?void 0:i.querySelector(".s-button-text");if(s){n.toggleElementClassIf(s,"s-button-hide","s-button-show",(()=>t));this.btnLoader.style.display=t?"inherit":"none"}}getNotificationCard(t){const i=document.createElement("salla-notification-item");i.notification=t;i.classList.add("s-block");return i}render(){var t;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:t=>this.wrapper=t}),this.nextPage&&i("div",{class:"s-infinite-scroll-wrapper",ref:t=>this.status=t},i("button",{onClick:()=>this.loadMore(),class:"s-infinite-scroll-btn s-button-btn s-button-primary"},i("span",{class:"s-button-text s-infinite-scroll-btn-text"},(t=this.loadMoreText)!==null&&t!==void 0?t:this.load_more_text_trans),i("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:t=>this.btnLoader=t,style:{display:"none"}}))))}handleResponse(t){return t.map((t=>this.getNotificationCard(t)))}initiateInfiniteScroll(){var t,i,s;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.nextPage,history:true,nextPage:this.nextPage,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(t=>{this.loading()}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("load",(t=>{var i;this.loading(false);this.pagination=t.pagination;this.nextPage=((i=t.pagination.links)===null||i===void 0?void 0:i.next)||null;this.handleResponse(t.data).forEach((t=>this.wrapper.append(t)));let s=this.host.querySelectorAll("salla-notification-item:not(.animated)");n.animateItems(s)}));(s=this.infiniteScroll)===null||s===void 0?void 0:s.on("error",(t=>{salla.logger.error("Error loading more comments:",t)}))}async loadInitialData(){await salla.api.notifications.fetch({per_page:this.itemPerPage}).then((t=>{var i;this.pagination=t.pagination;this.total=t.pagination.total;this.nextPage=((i=t.pagination.links)===null||i===void 0?void 0:i.next)||null;setTimeout((()=>{if(!t.data.length){return this.showPlaceholder=true}this.handleResponse(t.data).forEach((t=>this.wrapper.append(t)));this.initiateInfiniteScroll();let i=this.wrapper.querySelectorAll("salla-notification-item:not(.animated)");n.animateItems(i)}),100)})).catch((t=>{salla.logger.error(t);this.showPlaceholder=true;this.loading(false)}))}async loadMore(){var t;(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}async componentWillLoad(){await this.loadInitialData()}get host(){return s(this)}};a.style=o;export{a as salla_notifications};
5
- //# sourceMappingURL=p-a6e8e1e7.entry.js.map
4
+ import{r as t,h as i,g as s}from"./p-DtlYcjlJ.js";import{H as n}from"./p-CGaH6V1S.js";import"./p-CgtvEd63.js";const o="";const a=class{constructor(i){t(this,i);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((()=>{this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");this.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}loading(t=true){var i;let s=(i=this.status)===null||i===void 0?void 0:i.querySelector(".s-button-text");if(s){n.toggleElementClassIf(s,"s-button-hide","s-button-show",(()=>t));this.btnLoader.style.display=t?"inherit":"none"}}getNotificationCard(t){const i=document.createElement("salla-notification-item");i.notification=t;i.classList.add("s-block");return i}render(){var t;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:t=>this.wrapper=t}),this.nextPage&&i("div",{class:"s-infinite-scroll-wrapper",ref:t=>this.status=t},i("button",{onClick:()=>this.loadMore(),class:"s-infinite-scroll-btn s-button-btn s-button-primary"},i("span",{class:"s-button-text s-infinite-scroll-btn-text"},(t=this.loadMoreText)!==null&&t!==void 0?t:this.load_more_text_trans),i("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:t=>this.btnLoader=t,style:{display:"none"}}))))}handleResponse(t){return t.map((t=>this.getNotificationCard(t)))}initiateInfiniteScroll(){var t,i,s;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.nextPage,history:true,nextPage:this.nextPage,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(t=>{this.loading()}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("load",(t=>{var i;this.loading(false);this.pagination=t.pagination;this.nextPage=((i=t.pagination.links)===null||i===void 0?void 0:i.next)||null;this.handleResponse(t.data).forEach((t=>this.wrapper.append(t)));let s=this.host.querySelectorAll("salla-notification-item:not(.animated)");n.animateItems(s)}));(s=this.infiniteScroll)===null||s===void 0?void 0:s.on("error",(t=>{salla.logger.error("Error loading more comments:",t)}))}async loadInitialData(){await salla.api.notifications.fetch({per_page:this.itemPerPage}).then((t=>{var i;this.pagination=t.pagination;this.total=t.pagination.total;this.nextPage=((i=t.pagination.links)===null||i===void 0?void 0:i.next)||null;setTimeout((()=>{if(!t.data.length){return this.showPlaceholder=true}this.handleResponse(t.data).forEach((t=>this.wrapper.append(t)));this.initiateInfiniteScroll();let i=this.wrapper.querySelectorAll("salla-notification-item:not(.animated)");n.animateItems(i)}),100)})).catch((t=>{salla.logger.error(t);this.showPlaceholder=true;this.loading(false)}))}async loadMore(){var t;(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}async componentWillLoad(){await this.loadInitialData()}get host(){return s(this)}};a.style=o;export{a as salla_notifications};
5
+ //# sourceMappingURL=p-ef04d7e0.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as c,h as l,H as t,g as s}from"./p-Dr_h0iSH.js";import{f as i,t as e}from"./p-Dz7o69vX.js";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 n=`\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 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>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`;const h=":host{display:block}";const r=class{constructor(l){c(this,l);var t;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:n,tiktok:v};this.socialSlot=((t=this.host.querySelector('[slot="social-item"]'))===null||t===void 0?void 0:t.innerHTML)||`<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>`;salla.lang.onLoaded((()=>{this.links=salla.config.get("store.social")}))}getLinksArray(){return this.links?Object.entries(this.links).filter((([c,l])=>!!l&&c!=="whatsapp")).map((([c,l])=>({type:c,value:l}))):[]}componentWillLoad(){return new Promise((c=>salla.onReady(c)))}render(){const c=this.getLinksArray();return l(t,{key:"499e2f4c68034191143f53bb4d4581e85e4066b0"},l("ul",{key:"17053219a16087c96e1d9e5c15d1478729f43954",class:"s-social-list"},c.map((c=>l("li",{class:"s-social-link"},l("div",{id:"social-slot",innerHTML:this.socialSlot.replace(/\{icon\}/g,this.iconsList[c.type]).replace(/\{type\}/g,c.type).replace(/\{link\}/g,c.value.toString())}))))))}componentDidRender(){var c;this.host.querySelectorAll("#social-slot").forEach((c=>c.replaceWith(c.firstChild)));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()}get host(){return s(this)}};r.style=h;export{r as salla_social};
5
- //# sourceMappingURL=p-510b1a2a.entry.js.map
4
+ import{r as c,h as l,H as t,g as s}from"./p-DtlYcjlJ.js";import{f as i,t as e}from"./p-Dz7o69vX.js";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 n=`\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 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>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`;const h=":host{display:block}";const r=class{constructor(l){c(this,l);var t;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:n,tiktok:v};this.socialSlot=((t=this.host.querySelector('[slot="social-item"]'))===null||t===void 0?void 0:t.innerHTML)||`<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>`;salla.lang.onLoaded((()=>{this.links=salla.config.get("store.social")}))}getLinksArray(){return this.links?Object.entries(this.links).filter((([c,l])=>!!l&&c!=="whatsapp")).map((([c,l])=>({type:c,value:l}))):[]}componentWillLoad(){return new Promise((c=>salla.onReady(c)))}render(){const c=this.getLinksArray();return l(t,{key:"499e2f4c68034191143f53bb4d4581e85e4066b0"},l("ul",{key:"17053219a16087c96e1d9e5c15d1478729f43954",class:"s-social-list"},c.map((c=>l("li",{class:"s-social-link"},l("div",{id:"social-slot",innerHTML:this.socialSlot.replace(/\{icon\}/g,this.iconsList[c.type]).replace(/\{type\}/g,c.type).replace(/\{link\}/g,c.value.toString())}))))))}componentDidRender(){var c;this.host.querySelectorAll("#social-slot").forEach((c=>c.replaceWith(c.firstChild)));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()}get host(){return s(this)}};r.style=h;export{r as salla_social};
5
+ //# sourceMappingURL=p-f0dd4f76.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as i,h as s,g as t}from"./p-Dr_h0iSH.js";import{I as e}from"./p-uTyAzPSy.js";var r=` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>`;var a=` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>`;var l=` <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>`;const n=":host{display:block}";const d=class{constructor(s){i(this,s);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=i=>{var s;if(!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.setPointerCapture(i.pointerId);this.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=i=>{if(!this.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=i=>{var s;if(!this.isSwiping||!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.releasePointerCapture(i.pointerId);this.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=i=>{var s;if(!this.isSwiping||!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.releasePointerCapture(i.pointerId);this.isSwiping=false};this.goToSlide=i=>{this.currentSlide=Math.max(0,Math.min(i,this.images.length-1))}}async componentDidLoad(){var i,s;await salla.onReady();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?` تم شراءه ${(i=this.review.product)===null||i===void 0?void 0:i.sold_quantity} مرة`:`Purchased ${this.review.product.sold_quantity} times`,{count:(s=this.review.product)===null||s===void 0?void 0:s.sold_quantity});this.initializeSlider()}disconnectedCallback(){this.removeEventListeners()}get images(){var i,s;const{review:t}=this;return((i=t===null||t===void 0?void 0:t.images)===null||i===void 0?void 0:i.length)>1?t.images.map(((i,s)=>({url:i,alt:"",id:s}))):((s=t===null||t===void 0?void 0:t.product)===null||s===void 0?void 0:s.images)||[]}get hasMultipleImages(){return this.images.length>1}get slideTransform(){const i=this.isRTL?1:-1;return`translateX(${this.currentSlide*100*i}%)`}initializeSlider(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()}addEventListeners(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})}removeEventListeners(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)}startSwipe(i,s){this.startPoint={x:i,y:s};this.isSwiping=true}componentDidRender(){this.removeEventListeners();this.addEventListeners()}endSwipe(i,s){this.isSwiping=false;const t=i-this.startPoint.x;const e=s-this.startPoint.y;this.processSwipe(t,e)}processSwipe(i,s){const t=10;if(Math.abs(i)<t||Math.abs(s)>Math.abs(i))return;const e=i<0;const r=this.isRTL?!e:e;if(r){this.goToNextSlide()}else{this.goToPrevSlide()}}goToNextSlide(){if(this.currentSlide<this.images.length-1){this.currentSlide++}}goToPrevSlide(){if(this.currentSlide>0){this.currentSlide--}}renderStars(){return Array(5).fill(null).map(((i,t)=>s("span",{key:t,innerHTML:this.review.stars>=t+1?r:a})))}renderDots(){return this.images.map((({url:i},t)=>s("button",{key:i||t,type:"button",class:`s-review-card-slider-dot ${this.currentSlide===t?"active":""}`,onClick:()=>this.goToSlide(t),"aria-label":`Go to slide ${t+1}`,onPointerDown:()=>this.goToSlide(t)})))}renderSlider(){if(!this.hasMultipleImages)return null;return s("div",{class:"s-review-card-slider-container"},s("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((i=>s("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},s("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))))),s("div",{class:"s-review-card-slider-dots"},this.renderDots()))}renderSingleImage(){var i,t;const e=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!e||this.hasMultipleImages)return null;return s("img",{src:e.url,alt:e.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})}renderHeader(){var i,t;return s("div",{class:"s-review-card-header"},s("div",{class:"s-review-card-reviewer-name"},s("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&s("span",{class:"s-review-card-verified-icon",innerHTML:e})),s("div",{class:"s-review-card-stars"},this.renderStars()))}renderProductInfo(){var i,t,e,r,a;const n=(i=this.review)===null||i===void 0?void 0:i.product;if(!n)return null;return s("a",{href:(e=(t=this.review)===null||t===void 0?void 0:t.product)===null||e===void 0?void 0:e.url,class:"s-review-card-product-container"},s("img",{alt:((r=n.image)===null||r===void 0?void 0:r.alt)||"Product",src:(a=n.image)===null||a===void 0?void 0:a.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),s("div",{class:"s-review-card-product-details"},s("p",{class:"s-review-card-product-details-name"},n.name),this.showPurchaseCount?s("p",{class:"s-review-card-product-details-purchase-count"},s("span",{innerHTML:l}),this.purchasedCount):null))}render(){var i;return s("div",{key:"22c0b4997b5eaa3eee23c642aa8fc778cff7fd22",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),o(),s("div",{key:"db1391a8d4ddad808f54551b39d9bfeb55466225",class:"s-review-card-content"},this.renderHeader(),s("p",{key:"4c6e9af60e480f5c9f840e7ba95f7c59ba12e172",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),o(),this.renderProductInfo()))}get el(){return t(this)}};const o=i=>s("div",{class:`s-review-card-divider ${""}`});d.style=n;export{d as salla_review_card};
5
- //# sourceMappingURL=p-7e9bec45.entry.js.map
4
+ import{r as i,h as s,g as t}from"./p-DtlYcjlJ.js";import{I as e}from"./p-uTyAzPSy.js";var r=` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>`;var a=` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>`;var l=` <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>`;const n=":host{display:block}";const d=class{constructor(s){i(this,s);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=i=>{var s;if(!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.setPointerCapture(i.pointerId);this.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=i=>{if(!this.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=i=>{var s;if(!this.isSwiping||!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.releasePointerCapture(i.pointerId);this.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=i=>{var s;if(!this.isSwiping||!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.releasePointerCapture(i.pointerId);this.isSwiping=false};this.goToSlide=i=>{this.currentSlide=Math.max(0,Math.min(i,this.images.length-1))}}async componentDidLoad(){var i,s;await salla.onReady();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?` تم شراءه ${(i=this.review.product)===null||i===void 0?void 0:i.sold_quantity} مرة`:`Purchased ${this.review.product.sold_quantity} times`,{count:(s=this.review.product)===null||s===void 0?void 0:s.sold_quantity});this.initializeSlider()}disconnectedCallback(){this.removeEventListeners()}get images(){var i,s;const{review:t}=this;return((i=t===null||t===void 0?void 0:t.images)===null||i===void 0?void 0:i.length)>1?t.images.map(((i,s)=>({url:i,alt:"",id:s}))):((s=t===null||t===void 0?void 0:t.product)===null||s===void 0?void 0:s.images)||[]}get hasMultipleImages(){return this.images.length>1}get slideTransform(){const i=this.isRTL?1:-1;return`translateX(${this.currentSlide*100*i}%)`}initializeSlider(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()}addEventListeners(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})}removeEventListeners(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)}startSwipe(i,s){this.startPoint={x:i,y:s};this.isSwiping=true}componentDidRender(){this.removeEventListeners();this.addEventListeners()}endSwipe(i,s){this.isSwiping=false;const t=i-this.startPoint.x;const e=s-this.startPoint.y;this.processSwipe(t,e)}processSwipe(i,s){const t=10;if(Math.abs(i)<t||Math.abs(s)>Math.abs(i))return;const e=i<0;const r=this.isRTL?!e:e;if(r){this.goToNextSlide()}else{this.goToPrevSlide()}}goToNextSlide(){if(this.currentSlide<this.images.length-1){this.currentSlide++}}goToPrevSlide(){if(this.currentSlide>0){this.currentSlide--}}renderStars(){return Array(5).fill(null).map(((i,t)=>s("span",{key:t,innerHTML:this.review.stars>=t+1?r:a})))}renderDots(){return this.images.map((({url:i},t)=>s("button",{key:i||t,type:"button",class:`s-review-card-slider-dot ${this.currentSlide===t?"active":""}`,onClick:()=>this.goToSlide(t),"aria-label":`Go to slide ${t+1}`,onPointerDown:()=>this.goToSlide(t)})))}renderSlider(){if(!this.hasMultipleImages)return null;return s("div",{class:"s-review-card-slider-container"},s("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((i=>s("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},s("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))))),s("div",{class:"s-review-card-slider-dots"},this.renderDots()))}renderSingleImage(){var i,t;const e=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!e||this.hasMultipleImages)return null;return s("img",{src:e.url,alt:e.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})}renderHeader(){var i,t;return s("div",{class:"s-review-card-header"},s("div",{class:"s-review-card-reviewer-name"},s("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&s("span",{class:"s-review-card-verified-icon",innerHTML:e})),s("div",{class:"s-review-card-stars"},this.renderStars()))}renderProductInfo(){var i,t,e,r,a;const n=(i=this.review)===null||i===void 0?void 0:i.product;if(!n)return null;return s("a",{href:(e=(t=this.review)===null||t===void 0?void 0:t.product)===null||e===void 0?void 0:e.url,class:"s-review-card-product-container"},s("img",{alt:((r=n.image)===null||r===void 0?void 0:r.alt)||"Product",src:(a=n.image)===null||a===void 0?void 0:a.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),s("div",{class:"s-review-card-product-details"},s("p",{class:"s-review-card-product-details-name"},n.name),this.showPurchaseCount?s("p",{class:"s-review-card-product-details-purchase-count"},s("span",{innerHTML:l}),this.purchasedCount):null))}render(){var i;return s("div",{key:"22c0b4997b5eaa3eee23c642aa8fc778cff7fd22",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),o(),s("div",{key:"db1391a8d4ddad808f54551b39d9bfeb55466225",class:"s-review-card-content"},this.renderHeader(),s("p",{key:"4c6e9af60e480f5c9f840e7ba95f7c59ba12e172",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),o(),this.renderProductInfo()))}get el(){return t(this)}};const o=i=>s("div",{class:`s-review-card-divider ${""}`});d.style=n;export{d as salla_review_card};
5
+ //# sourceMappingURL=p-f1d6fdbf.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-BL8Qlvzz.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,s,i,e;return{setters:[function(t){n=t.r;s=t.h;i=t.g},function(t){e=t.a}],execute:function(){var a=":host{display:block}";var r=t("salla_advertisement",function(){function t(t){var s=this;n(this,t);var i;this.currentSlug=salla.config.get("page.slug");salla.onReady((function(){s.currentSlug=salla.config.get("page.slug")}));this.advSlot=((i=this.host.querySelector('[slot="adv"]'))===null||i===void 0?void 0:i.innerHTML)||'<div class="s-advertisement-content"><h2 class="s-advertisement-content-main">{iconElem}{urlElem}</h2>{closeElem}</div>\n '}t.prototype.isNotVisible=function(t){return!!salla.storage.get("statusAd-".concat(t.id))};t.prototype.setCanDisplayFlag=function(t,n){if(!n){salla.storage.set("statusAd-".concat(t.id),"dismissed");e({targets:this.host,opacity:[1,0],duration:300,height:[this.host.clientHeight,0],easing:"easeInOutQuad"})}};t.prototype.render=function(){var t=this;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}return this.advertisements.map((function(n){return s("div",{class:{"s-hidden":t.isNotVisible(n),"s-advertisement":true},"data-id":n.id,style:{"background-color":n.colors.bg,color:n.colors.text}},s("div",{id:"adv-slot",innerHTML:t.advSlot.replace("{iconElem}",'<i class="s-advertisement-content-icon '.concat(n.icon,'"></i>')).replace("{urlElem}",n.url?'<a href="'.concat(n.url,'" target="').concat(n.target,'">').concat(n.description,"</a>"):n.description).replace("{closeElem}",'<button class="s-advertisement-action" aria-label="close-alert"><i class="sicon-cancel"></i></button>').replace("{icon}",n.icon).replace("{url}",n.url).replace("{target}",n.target).replace("{description}",n.description).replace("{bg_color}",n.colors.bg).replace("{text_color}",n.colors.text)}))}))};t.prototype.componentWillLoad=function(){var t=this;return new Promise((function(t){return salla.onReady(t)})).then((function(){return salla.api.advertisement.fetch(t.currentSlug)})).then((function(t){return Array.isArray(t.data)?t.data.find((function(t){return!salla.storage.get("statusAd-".concat(t.id))})):null})).then((function(n){return t.advertisements=n?[n]:[]}))};t.prototype.componentDidRender=function(){var t=this;var n;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}setTimeout((function(){var n=t.host.querySelector(".s-advertisement-action");if(n){n.addEventListener("click",(function(){return t.setCanDisplayFlag(t.advertisements[0],false)}))}}));this.host.querySelectorAll("#adv-slot").forEach((function(t){return t===null||t===void 0?void 0:t.replaceWith(t===null||t===void 0?void 0:t.firstChild)}));(n=this.host.querySelector('[slot="adv"]'))===null||n===void 0?void 0:n.remove();e({targets:this.host,opacity:[0,1],duration:300,height:[0,this.host.clientHeight],easing:"easeInOutQuad"})};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());r.style=a}}}));
5
- //# sourceMappingURL=p-c7c91c45.system.entry.js.map
4
+ System.register(["./p-DiFVtThr.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,i,s,e;return{setters:[function(t){n=t.r;i=t.h;s=t.g},function(t){e=t.a}],execute:function(){var a=":host{display:block}";var r=t("salla_advertisement",function(){function t(t){var i=this;n(this,t);var s;this.currentSlug=salla.config.get("page.slug");salla.onReady((function(){i.currentSlug=salla.config.get("page.slug")}));this.advSlot=((s=this.host.querySelector('[slot="adv"]'))===null||s===void 0?void 0:s.innerHTML)||'<div class="s-advertisement-content"><h2 class="s-advertisement-content-main">{iconElem}{urlElem}</h2>{closeElem}</div>\n '}t.prototype.isNotVisible=function(t){return!!salla.storage.get("statusAd-".concat(t.id))};t.prototype.setCanDisplayFlag=function(t,n){if(!n){salla.storage.set("statusAd-".concat(t.id),"dismissed");e({targets:this.host,opacity:[1,0],duration:300,height:[this.host.clientHeight,0],easing:"easeInOutQuad"})}};t.prototype.render=function(){var t=this;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}return this.advertisements.map((function(n){return i("div",{class:{"s-hidden":t.isNotVisible(n),"s-advertisement":true},"data-id":n.id,style:{"background-color":n.colors.bg,color:n.colors.text}},i("div",{id:"adv-slot",innerHTML:t.advSlot.replace("{iconElem}",'<i class="s-advertisement-content-icon '.concat(n.icon,'"></i>')).replace("{urlElem}",n.url?'<a href="'.concat(n.url,'" target="').concat(n.target,'">').concat(n.description,"</a>"):n.description).replace("{closeElem}",'<button class="s-advertisement-action" aria-label="close-alert"><i class="sicon-cancel"></i></button>').replace("{icon}",n.icon).replace("{url}",n.url).replace("{target}",n.target).replace("{description}",n.description).replace("{bg_color}",n.colors.bg).replace("{text_color}",n.colors.text)}))}))};t.prototype.componentWillLoad=function(){var t=this;return new Promise((function(t){return salla.onReady(t)})).then((function(){return salla.api.advertisement.fetch(t.currentSlug)})).then((function(t){return Array.isArray(t.data)?t.data.find((function(t){return!salla.storage.get("statusAd-".concat(t.id))})):null})).then((function(n){return t.advertisements=n?[n]:[]}))};t.prototype.componentDidRender=function(){var t=this;var n;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}setTimeout((function(){var n=t.host.querySelector(".s-advertisement-action");if(n){n.addEventListener("click",(function(){return t.setCanDisplayFlag(t.advertisements[0],false)}))}}));this.host.querySelectorAll("#adv-slot").forEach((function(t){return t===null||t===void 0?void 0:t.replaceWith(t===null||t===void 0?void 0:t.firstChild)}));(n=this.host.querySelector('[slot="adv"]'))===null||n===void 0?void 0:n.remove();e({targets:this.host,opacity:[0,1],duration:300,height:[0,this.host.clientHeight],easing:"easeInOutQuad"})};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());r.style=a}}}));
5
+ //# sourceMappingURL=p-f2bac5d5.system.entry.js.map
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import{r as t,h as s,g as i}from"./p-DtlYcjlJ.js";import{a}from"./p-CgtvEd63.js";const e=":host{display:block}";const l=class{constructor(s){t(this,s);var i;this.currentSlug=salla.config.get("page.slug");salla.onReady((()=>{this.currentSlug=salla.config.get("page.slug")}));this.advSlot=((i=this.host.querySelector('[slot="adv"]'))===null||i===void 0?void 0:i.innerHTML)||`<div class="s-advertisement-content"><h2 class="s-advertisement-content-main">{iconElem}{urlElem}</h2>{closeElem}</div>\n `}isNotVisible(t){return!!salla.storage.get(`statusAd-${t.id}`)}setCanDisplayFlag(t,s){if(!s){salla.storage.set(`statusAd-${t.id}`,"dismissed");a({targets:this.host,opacity:[1,0],duration:300,height:[this.host.clientHeight,0],easing:"easeInOutQuad"})}}render(){if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}return this.advertisements.map((t=>s("div",{class:{"s-hidden":this.isNotVisible(t),"s-advertisement":true},"data-id":t.id,style:{"background-color":t.colors.bg,color:t.colors.text}},s("div",{id:"adv-slot",innerHTML:this.advSlot.replace("{iconElem}",`<i class="s-advertisement-content-icon ${t.icon}"></i>`).replace("{urlElem}",t.url?`<a href="${t.url}" target="${t.target}">${t.description}</a>`:t.description).replace("{closeElem}",`<button class="s-advertisement-action" aria-label="close-alert"><i class="sicon-cancel"></i></button>`).replace("{icon}",t.icon).replace("{url}",t.url).replace("{target}",t.target).replace("{description}",t.description).replace("{bg_color}",t.colors.bg).replace("{text_color}",t.colors.text)}))))}componentWillLoad(){return new Promise((t=>salla.onReady(t))).then((()=>salla.api.advertisement.fetch(this.currentSlug))).then((t=>Array.isArray(t.data)?t.data.find((t=>!salla.storage.get(`statusAd-${t.id}`))):null)).then((t=>this.advertisements=t?[t]:[]))}componentDidRender(){var t;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}setTimeout((()=>{let t=this.host.querySelector(".s-advertisement-action");if(t){t.addEventListener("click",(()=>this.setCanDisplayFlag(this.advertisements[0],false)))}}));this.host.querySelectorAll("#adv-slot").forEach((t=>t===null||t===void 0?void 0:t.replaceWith(t===null||t===void 0?void 0:t.firstChild)));(t=this.host.querySelector('[slot="adv"]'))===null||t===void 0?void 0:t.remove();a({targets:this.host,opacity:[0,1],duration:300,height:[0,this.host.clientHeight],easing:"easeInOutQuad"})}get host(){return i(this)}};l.style=e;export{l as salla_advertisement};
5
+ //# sourceMappingURL=p-f702aead.entry.js.map