@salla.sa/twilight-components 2.14.230 → 2.14.232

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 (301) hide show
  1. package/dist/cjs/{app-globals-CzeN2gey.js → app-globals-CcyMxulT.js} +3 -3
  2. package/dist/cjs/{app-globals-CzeN2gey.js.map → app-globals-CcyMxulT.js.map} +1 -1
  3. package/dist/cjs/{index-DAzolwX4.js → index-B0NlbfpT.js} +4 -4
  4. package/dist/cjs/{index-DAzolwX4.js.map → index-B0NlbfpT.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/salla-accordion-body.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-accordion-head.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  39. package/dist/cjs/twilight.cjs.js +2 -2
  40. package/dist/components/index.js +2 -2
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/esm/{app-globals-Bwee9N87.js → app-globals-BrKspgg9.js} +3 -3
  43. package/dist/esm/{app-globals-Bwee9N87.js.map → app-globals-BrKspgg9.js.map} +1 -1
  44. package/dist/esm/{index-DWuTKtBW.js → index-iZNAXsJF.js} +4 -4
  45. package/dist/esm/{index-DWuTKtBW.js.map → index-iZNAXsJF.js.map} +1 -1
  46. package/dist/esm/loader.js +3 -3
  47. package/dist/esm/salla-accordion-body.entry.js +1 -1
  48. package/dist/esm/salla-accordion-head.entry.js +1 -1
  49. package/dist/esm/salla-accordion.entry.js +1 -1
  50. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  51. package/dist/esm/salla-advertisement.entry.js +1 -1
  52. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  53. package/dist/esm/salla-apps-icons.entry.js +1 -1
  54. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  55. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  56. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  57. package/dist/esm/salla-contacts.entry.js +1 -1
  58. package/dist/esm/salla-filters-widget.entry.js +1 -1
  59. package/dist/esm/salla-filters.entry.js +1 -1
  60. package/dist/esm/salla-installment.entry.js +1 -1
  61. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  62. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  63. package/dist/esm/salla-metadata.entry.js +1 -1
  64. package/dist/esm/salla-notification-item.entry.js +1 -1
  65. package/dist/esm/salla-notifications.entry.js +1 -1
  66. package/dist/esm/salla-offer.entry.js +1 -1
  67. package/dist/esm/salla-order-summary.entry.js +1 -1
  68. package/dist/esm/salla-orders.entry.js +1 -1
  69. package/dist/esm/salla-payments.entry.js +1 -1
  70. package/dist/esm/salla-price-range.entry.js +1 -1
  71. package/dist/esm/salla-product-options.entry.js +1 -1
  72. package/dist/esm/salla-review-card.entry.js +1 -1
  73. package/dist/esm/salla-reviews-page.entry.js +1 -1
  74. package/dist/esm/salla-reviews.entry.js +1 -1
  75. package/dist/esm/salla-social.entry.js +1 -1
  76. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  77. package/dist/esm/salla-tooltip.entry.js +1 -1
  78. package/dist/esm/salla-verify.entry.js +1 -1
  79. package/dist/esm/salla-wallet.entry.js +1 -1
  80. package/dist/esm/twilight.js +3 -3
  81. package/dist/esm-es5/{app-globals-Bwee9N87.js → app-globals-BrKspgg9.js} +2 -2
  82. package/dist/esm-es5/{app-globals-Bwee9N87.js.map → app-globals-BrKspgg9.js.map} +1 -1
  83. package/dist/esm-es5/{index-DWuTKtBW.js → index-iZNAXsJF.js} +5 -5
  84. package/dist/esm-es5/{index-DWuTKtBW.js.map → index-iZNAXsJF.js.map} +1 -1
  85. package/dist/esm-es5/loader.js +1 -1
  86. package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
  87. package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
  88. package/dist/esm-es5/salla-accordion.entry.js +1 -1
  89. package/dist/esm-es5/salla-add-product-button_51.entry.js +4 -4
  90. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  91. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  92. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  93. package/dist/esm-es5/salla-booking-field_2.entry.js +2 -2
  94. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  95. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  96. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  97. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  98. package/dist/esm-es5/salla-filters.entry.js +1 -1
  99. package/dist/esm-es5/salla-installment.entry.js +1 -1
  100. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  101. package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
  102. package/dist/esm-es5/salla-metadata.entry.js +1 -1
  103. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  104. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  105. package/dist/esm-es5/salla-offer.entry.js +1 -1
  106. package/dist/esm-es5/salla-order-summary.entry.js +2 -2
  107. package/dist/esm-es5/salla-orders.entry.js +1 -1
  108. package/dist/esm-es5/salla-payments.entry.js +1 -1
  109. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  110. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  111. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  112. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  113. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  114. package/dist/esm-es5/salla-social.entry.js +1 -1
  115. package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
  116. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  117. package/dist/esm-es5/salla-verify.entry.js +1 -1
  118. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  119. package/dist/esm-es5/twilight.js +1 -1
  120. package/dist/twilight/{p-f542d77e.system.entry.js → p-057afa3a.system.entry.js} +2 -2
  121. package/dist/twilight/{p-2a4341a8.entry.js → p-0982ae0c.entry.js} +2 -2
  122. package/dist/twilight/{p-92b6f034.system.entry.js → p-0de28fb7.system.entry.js} +2 -2
  123. package/dist/twilight/p-0fc9426e.entry.js +5 -0
  124. package/dist/twilight/{p-4b614548.system.entry.js → p-16a50b65.system.entry.js} +2 -2
  125. package/dist/twilight/{p-0ad41836.entry.js → p-18e52705.entry.js} +2 -2
  126. package/dist/twilight/{p-7a0ce5d1.entry.js → p-1a11ce17.entry.js} +2 -2
  127. package/dist/twilight/{p-e4e860d1.entry.js → p-1bad59b6.entry.js} +2 -2
  128. package/dist/twilight/{p-0f1b1e46.entry.js → p-1befac00.entry.js} +2 -2
  129. package/dist/twilight/{p-4c539fcc.system.entry.js → p-2160ba49.system.entry.js} +2 -2
  130. package/dist/twilight/{p-20f238a0.system.entry.js → p-21e71847.system.entry.js} +2 -2
  131. package/dist/twilight/{p-516f3218.system.entry.js → p-22ca5347.system.entry.js} +2 -2
  132. package/dist/twilight/{p-ae750319.system.entry.js → p-2458c9e9.system.entry.js} +2 -2
  133. package/dist/twilight/{p-6245cde6.system.entry.js → p-26d71929.system.entry.js} +2 -2
  134. package/dist/twilight/{p-1066d12e.system.entry.js → p-2991e23f.system.entry.js} +2 -2
  135. package/dist/twilight/{p-3562d025.entry.js → p-2b25255a.entry.js} +2 -2
  136. package/dist/twilight/{p-b86b81a0.entry.js → p-2bebea74.entry.js} +2 -2
  137. package/dist/twilight/{p-5c76c2b2.system.entry.js → p-30d982df.system.entry.js} +2 -2
  138. package/dist/twilight/{p-1bebbe3d.entry.js → p-3130b171.entry.js} +2 -2
  139. package/dist/twilight/{p-6a996e8a.system.entry.js → p-36270495.system.entry.js} +2 -2
  140. package/dist/twilight/{p-ddfa5a64.system.entry.js → p-36d9d5e4.system.entry.js} +2 -2
  141. package/dist/twilight/{p-9bce1b54.system.entry.js → p-373a82c2.system.entry.js} +2 -2
  142. package/dist/twilight/{p-37d553e5.system.entry.js → p-39c0fcdc.system.entry.js} +2 -2
  143. package/dist/twilight/p-3f0ee015.entry.js +5 -0
  144. package/dist/twilight/{p-2aee6a68.system.entry.js → p-40cff812.system.entry.js} +2 -2
  145. package/dist/twilight/{p-f20798f6.entry.js → p-421c90fe.entry.js} +2 -2
  146. package/dist/twilight/{p-83cea4f0.system.entry.js → p-4d9d2f2f.system.entry.js} +2 -2
  147. package/dist/twilight/{p-e755c300.entry.js → p-544ec514.entry.js} +2 -2
  148. package/dist/twilight/{p-445886ad.entry.js → p-566d369f.entry.js} +2 -2
  149. package/dist/twilight/{p-c175787a.system.entry.js → p-5786e162.system.entry.js} +2 -2
  150. package/dist/twilight/{p-5d7fff02.entry.js → p-63ee2845.entry.js} +2 -2
  151. package/dist/twilight/{p-df0c4065.entry.js → p-68cc3edc.entry.js} +2 -2
  152. package/dist/twilight/{p-51831df7.entry.js → p-6951c737.entry.js} +2 -2
  153. package/dist/twilight/{p-9e9ec157.entry.js → p-69fe102d.entry.js} +7 -7
  154. package/dist/twilight/{p-739a5124.system.entry.js → p-6a0239a0.system.entry.js} +2 -2
  155. package/dist/twilight/{p-4ff2bbf4.system.entry.js → p-6b819095.system.entry.js} +2 -2
  156. package/dist/twilight/{p-7586a50e.system.entry.js → p-78e05bb6.system.entry.js} +2 -2
  157. package/dist/twilight/{p-BdwSnv-_.system.js.map → p-7QLbY7pn.system.js.map} +1 -1
  158. package/dist/twilight/{p-9063b7d7.entry.js → p-7b775a0a.entry.js} +2 -2
  159. package/dist/twilight/{p-3277f8a3.entry.js → p-7e753e64.entry.js} +2 -2
  160. package/dist/twilight/{p-68078462.system.entry.js → p-7ed15e04.system.entry.js} +2 -2
  161. package/dist/twilight/{p-65939c80.system.entry.js → p-85c72e65.system.entry.js} +2 -2
  162. package/dist/twilight/{p-63b3ea2f.entry.js → p-86c566a4.entry.js} +2 -2
  163. package/dist/twilight/{p-5a7bad68.system.entry.js → p-8939d913.system.entry.js} +2 -2
  164. package/dist/twilight/{p-698a3693.entry.js → p-9d1baca1.entry.js} +2 -2
  165. package/dist/twilight/{p-DUa8YmqN.system.js.map → p-B1lAX1eT.system.js.map} +1 -1
  166. package/dist/twilight/{p-DGMCd6h5.system.js.map → p-BKbsOtA4.system.js.map} +1 -1
  167. package/dist/twilight/{p-BTqyH9zP.system.js → p-BX7FZkqj.system.js} +6 -6
  168. package/dist/twilight/{p-BTqyH9zP.system.js.map → p-BX7FZkqj.system.js.map} +1 -1
  169. package/dist/twilight/{p-3jVXRqU4.system.js.map → p-B_lAnNzk.system.js.map} +1 -1
  170. package/dist/twilight/{p-D79MBbJJ.system.js.map → p-BjsCwr-n.system.js.map} +1 -1
  171. package/dist/twilight/{p-BPhhu2Q7.system.js.map → p-BqlaCeFh.system.js.map} +1 -1
  172. package/dist/twilight/{p-DN10t2cI.system.js.map → p-BwyB2Y88.system.js.map} +1 -1
  173. package/dist/twilight/{p-48yJmYvC.system.js.map → p-C0rbCaH-.system.js.map} +1 -1
  174. package/dist/twilight/{p-rD_uaRHC.js → p-C1MNzkpX.js} +2 -2
  175. package/dist/twilight/{p-rD_uaRHC.js.map → p-C1MNzkpX.js.map} +1 -1
  176. package/dist/twilight/{p-CLFMzH2N.system.js.map → p-C3uMI7LH.system.js.map} +1 -1
  177. package/dist/twilight/{p-CsndEHxH.system.js.map → p-C6QVrIqT.system.js.map} +1 -1
  178. package/dist/twilight/{p-D6LiKG0S.system.js.map → p-C91gYM7p.system.js.map} +1 -1
  179. package/dist/twilight/{p-fwGmpkUD.system.js.map → p-C9zdn0OW.system.js.map} +1 -1
  180. package/dist/twilight/{p-Cm-NUOuA.system.js.map → p-CDnKHc30.system.js.map} +1 -1
  181. package/dist/twilight/{p-pn78bMUz.system.js.map → p-CELhJQir.system.js.map} +1 -1
  182. package/dist/twilight/{p-DguvW8UE.system.js.map → p-COrex3bO.system.js.map} +1 -1
  183. package/dist/twilight/{p-DmwqyKEf.system.js.map → p-CVRY93V8.system.js.map} +1 -1
  184. package/dist/twilight/{p-X9KT5ssu.system.js.map → p-Chfya8RP.system.js.map} +1 -1
  185. package/dist/twilight/{p-Bwzf6l2m.system.js.map → p-CntO0wq_.system.js.map} +1 -1
  186. package/dist/twilight/{p-HcXgKso7.system.js.map → p-CvFPj4ep.system.js.map} +1 -1
  187. package/dist/twilight/{p-CrkO_aXc.system.js.map → p-Cw-fI614.system.js.map} +1 -1
  188. package/dist/twilight/{p-BD76JVV3.system.js.map → p-DBDgCHAM.system.js.map} +1 -1
  189. package/dist/twilight/{p-BTZj9ahe.system.js → p-DGaEjwoZ.system.js} +2 -2
  190. package/dist/twilight/{p-BTZj9ahe.system.js.map → p-DGaEjwoZ.system.js.map} +1 -1
  191. package/dist/twilight/{p--7AXCfED.system.js.map → p-DIPaEAtp.system.js.map} +1 -1
  192. package/dist/twilight/{p-CCLDyorI.system.js.map → p-DO3gGatK.system.js.map} +1 -1
  193. package/dist/twilight/{p-BPEkR7Uz.system.js.map → p-DOAtGeo-.system.js.map} +1 -1
  194. package/dist/twilight/{p-Cgf31f5d.system.js.map → p-DRm-kRxH.system.js.map} +1 -1
  195. package/dist/twilight/{p-wbYBcJxh.system.js.map → p-Ddtzn0jx.system.js.map} +1 -1
  196. package/dist/twilight/{p-BgTOBm1J.system.js.map → p-DirBq3yR.system.js.map} +1 -1
  197. package/dist/twilight/{p-DwRDwfPU.system.js.map → p-DtFlYfss.system.js.map} +1 -1
  198. package/dist/twilight/{p-C_Gx4fNg.system.js.map → p-DyG11xn8.system.js.map} +1 -1
  199. package/dist/twilight/{p-CnsQrhjY.system.js.map → p-UIAI3aBI.system.js.map} +1 -1
  200. package/dist/twilight/{p-CB2HThNi.system.js.map → p-YeDOL4oD.system.js.map} +1 -1
  201. package/dist/twilight/{p-DRtUXiV3.system.js.map → p-_kxfhicb.system.js.map} +1 -1
  202. package/dist/twilight/{p-7aefaf33.entry.js → p-a08e9a73.entry.js} +2 -2
  203. package/dist/twilight/{p-f02d527f.system.entry.js → p-a181358b.system.entry.js} +2 -2
  204. package/dist/twilight/{p-20faf731.system.entry.js → p-b00e784a.system.entry.js} +2 -2
  205. package/dist/twilight/{p-e7901c9d.system.entry.js → p-b235449d.system.entry.js} +2 -2
  206. package/dist/twilight/{p-81b6008d.system.entry.js → p-b7d02240.system.entry.js} +2 -2
  207. package/dist/twilight/{p-CwbK3391.system.js.map → p-bBjviUXV.system.js.map} +1 -1
  208. package/dist/twilight/{p-9a63eaf0.entry.js → p-c2bf57ee.entry.js} +2 -2
  209. package/dist/twilight/{p-ab55d416.entry.js → p-cd254480.entry.js} +2 -2
  210. package/dist/twilight/{p-e4b88ce5.system.entry.js → p-cd531bea.system.entry.js} +2 -2
  211. package/dist/twilight/{p-5087750a.system.entry.js → p-ce7bc5bd.system.entry.js} +2 -2
  212. package/dist/twilight/{p-2c9efa34.system.entry.js → p-ce7cead8.system.entry.js} +2 -2
  213. package/dist/twilight/{p-38b6b862.entry.js → p-cec3c889.entry.js} +2 -2
  214. package/dist/twilight/p-cf3ead3a.entry.js +5 -0
  215. package/dist/twilight/{p-6ea49b56.entry.js → p-cf8b52bf.entry.js} +2 -2
  216. package/dist/twilight/{p-0f1a8a47.entry.js → p-d5fae15b.entry.js} +2 -2
  217. package/dist/twilight/{p-77007b51.system.entry.js → p-d6e8290c.system.entry.js} +2 -2
  218. package/dist/twilight/{p-9ae63c85.entry.js → p-dba83eaf.entry.js} +2 -2
  219. package/dist/twilight/{p-d75b04f0.entry.js → p-e37d593d.entry.js} +2 -2
  220. package/dist/twilight/{p-39744d46.entry.js → p-ef23379f.entry.js} +2 -2
  221. package/dist/twilight/{p-1344b38f.entry.js → p-ef344e7e.entry.js} +2 -2
  222. package/dist/twilight/{p-94056702.entry.js → p-f75b098c.entry.js} +2 -2
  223. package/dist/twilight/{p-3363633a.system.entry.js → p-f89d5c9a.system.entry.js} +2 -2
  224. package/dist/twilight/{p-58af07d1.system.entry.js → p-ff4273e3.system.entry.js} +2 -2
  225. package/dist/twilight/{p-DWuTKtBW.js → p-iZNAXsJF.js} +6 -6
  226. package/dist/twilight/{p-DWuTKtBW.js.map → p-iZNAXsJF.js.map} +1 -1
  227. package/dist/twilight/{p-B6ITtzm0.system.js → p-sHV9JMb-.system.js} +2 -2
  228. package/dist/twilight/{p-B6ITtzm0.system.js.map → p-sHV9JMb-.system.js.map} +1 -1
  229. package/dist/twilight/{p-DkuJrfYK.system.js.map → p-vilQp7C7.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/twilight/p-3ee481e4.entry.js +0 -5
  234. package/dist/twilight/p-8d0c6a10.entry.js +0 -5
  235. package/dist/twilight/p-b7f713fe.entry.js +0 -5
  236. /package/dist/twilight/{p-f542d77e.system.entry.js.map → p-057afa3a.system.entry.js.map} +0 -0
  237. /package/dist/twilight/{p-2a4341a8.entry.js.map → p-0982ae0c.entry.js.map} +0 -0
  238. /package/dist/twilight/{p-92b6f034.system.entry.js.map → p-0de28fb7.system.entry.js.map} +0 -0
  239. /package/dist/twilight/{p-3ee481e4.entry.js.map → p-0fc9426e.entry.js.map} +0 -0
  240. /package/dist/twilight/{p-4b614548.system.entry.js.map → p-16a50b65.system.entry.js.map} +0 -0
  241. /package/dist/twilight/{p-0ad41836.entry.js.map → p-18e52705.entry.js.map} +0 -0
  242. /package/dist/twilight/{p-7a0ce5d1.entry.js.map → p-1a11ce17.entry.js.map} +0 -0
  243. /package/dist/twilight/{p-e4e860d1.entry.js.map → p-1bad59b6.entry.js.map} +0 -0
  244. /package/dist/twilight/{p-0f1b1e46.entry.js.map → p-1befac00.entry.js.map} +0 -0
  245. /package/dist/twilight/{p-4c539fcc.system.entry.js.map → p-2160ba49.system.entry.js.map} +0 -0
  246. /package/dist/twilight/{p-20f238a0.system.entry.js.map → p-21e71847.system.entry.js.map} +0 -0
  247. /package/dist/twilight/{p-516f3218.system.entry.js.map → p-22ca5347.system.entry.js.map} +0 -0
  248. /package/dist/twilight/{p-ae750319.system.entry.js.map → p-2458c9e9.system.entry.js.map} +0 -0
  249. /package/dist/twilight/{p-6245cde6.system.entry.js.map → p-26d71929.system.entry.js.map} +0 -0
  250. /package/dist/twilight/{p-1066d12e.system.entry.js.map → p-2991e23f.system.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-3562d025.entry.js.map → p-2b25255a.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-b86b81a0.entry.js.map → p-2bebea74.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-5c76c2b2.system.entry.js.map → p-30d982df.system.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-1bebbe3d.entry.js.map → p-3130b171.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-6a996e8a.system.entry.js.map → p-36270495.system.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-ddfa5a64.system.entry.js.map → p-36d9d5e4.system.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-9bce1b54.system.entry.js.map → p-373a82c2.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-37d553e5.system.entry.js.map → p-39c0fcdc.system.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-b7f713fe.entry.js.map → p-3f0ee015.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-2aee6a68.system.entry.js.map → p-40cff812.system.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-f20798f6.entry.js.map → p-421c90fe.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-83cea4f0.system.entry.js.map → p-4d9d2f2f.system.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-e755c300.entry.js.map → p-544ec514.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-445886ad.entry.js.map → p-566d369f.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-c175787a.system.entry.js.map → p-5786e162.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-5d7fff02.entry.js.map → p-63ee2845.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-df0c4065.entry.js.map → p-68cc3edc.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-51831df7.entry.js.map → p-6951c737.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-9e9ec157.entry.js.map → p-69fe102d.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-739a5124.system.entry.js.map → p-6a0239a0.system.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-4ff2bbf4.system.entry.js.map → p-6b819095.system.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-7586a50e.system.entry.js.map → p-78e05bb6.system.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-9063b7d7.entry.js.map → p-7b775a0a.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-3277f8a3.entry.js.map → p-7e753e64.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-68078462.system.entry.js.map → p-7ed15e04.system.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-65939c80.system.entry.js.map → p-85c72e65.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-63b3ea2f.entry.js.map → p-86c566a4.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-5a7bad68.system.entry.js.map → p-8939d913.system.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-698a3693.entry.js.map → p-9d1baca1.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-7aefaf33.entry.js.map → p-a08e9a73.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-f02d527f.system.entry.js.map → p-a181358b.system.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-20faf731.system.entry.js.map → p-b00e784a.system.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-e7901c9d.system.entry.js.map → p-b235449d.system.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-81b6008d.system.entry.js.map → p-b7d02240.system.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-9a63eaf0.entry.js.map → p-c2bf57ee.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-ab55d416.entry.js.map → p-cd254480.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-e4b88ce5.system.entry.js.map → p-cd531bea.system.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-5087750a.system.entry.js.map → p-ce7bc5bd.system.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-2c9efa34.system.entry.js.map → p-ce7cead8.system.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-38b6b862.entry.js.map → p-cec3c889.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-8d0c6a10.entry.js.map → p-cf3ead3a.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-6ea49b56.entry.js.map → p-cf8b52bf.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-0f1a8a47.entry.js.map → p-d5fae15b.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-77007b51.system.entry.js.map → p-d6e8290c.system.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-9ae63c85.entry.js.map → p-dba83eaf.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-d75b04f0.entry.js.map → p-e37d593d.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-39744d46.entry.js.map → p-ef23379f.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-1344b38f.entry.js.map → p-ef344e7e.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-94056702.entry.js.map → p-f75b098c.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-3363633a.system.entry.js.map → p-f89d5c9a.system.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-58af07d1.system.entry.js.map → p-ff4273e3.system.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-BTqyH9zP.system.js"],(function(t){"use strict";var e,i,s,a;return{setters:[function(t){e=t.r;i=t.h;s=t.H;a=t.g}],execute:function(){var c="";var n=t("salla_accordion",function(){function t(t){e(this,t);this.collapsible=true;this.collapsed=true;this.dir=document.dir||"rtl"}t.prototype.directionChangedHandler=function(t){this.dir=t.detail.dir};t.prototype.handleCollapse=function(t){this.collapsed=t.detail.payload.collapsed};t.prototype.setcollapsibleProp=function(){var t=this.host.querySelector("salla-accordion-head");if(this.collapsible&&t){t.setAttribute("collapsible","true");t.setAttribute("collapsed",this.collapsed.toString())}};t.prototype.componentDidRender=function(){this.setcollapsibleProp();var t=this.host.querySelector("salla-accordion-body");if(this.collapsible){this.host.setAttribute("data-collapsed",this.collapsed.toString());t===null||t===void 0?void 0:t.setAttribute("data-collapsed",this.collapsed.toString())}};t.prototype.render=function(){return i(s,{key:"30e906d87cba59e197e71460bb24e578455f2d28",class:"s-accordion-wrapper ".concat(this.dir),"data-collapsed":this.collapsed.toString()},i("slot",{key:"8c26efc12856022567e5abe587c7537a5776285b"}))};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());n.style=c}}}));
5
- //# sourceMappingURL=p-e4b88ce5.system.entry.js.map
4
+ System.register(["./p-BX7FZkqj.system.js"],(function(t){"use strict";var e,i,s,a;return{setters:[function(t){e=t.r;i=t.h;s=t.H;a=t.g}],execute:function(){var c="";var n=t("salla_accordion",function(){function t(t){e(this,t);this.collapsible=true;this.collapsed=true;this.dir=document.dir||"rtl"}t.prototype.directionChangedHandler=function(t){this.dir=t.detail.dir};t.prototype.handleCollapse=function(t){this.collapsed=t.detail.payload.collapsed};t.prototype.setcollapsibleProp=function(){var t=this.host.querySelector("salla-accordion-head");if(this.collapsible&&t){t.setAttribute("collapsible","true");t.setAttribute("collapsed",this.collapsed.toString())}};t.prototype.componentDidRender=function(){this.setcollapsibleProp();var t=this.host.querySelector("salla-accordion-body");if(this.collapsible){this.host.setAttribute("data-collapsed",this.collapsed.toString());t===null||t===void 0?void 0:t.setAttribute("data-collapsed",this.collapsed.toString())}};t.prototype.render=function(){return i(s,{key:"30e906d87cba59e197e71460bb24e578455f2d28",class:"s-accordion-wrapper ".concat(this.dir),"data-collapsed":this.collapsed.toString()},i("slot",{key:"8c26efc12856022567e5abe587c7537a5776285b"}))};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());n.style=c}}}));
5
+ //# sourceMappingURL=p-cd531bea.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,r,n,i){function e(t){return t instanceof n?t:new n((function(r){r(t)}))}return new(n||(n=Promise))((function(n,a){function s(t){try{u(i.next(t))}catch(t){a(t)}}function o(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?n(t.value):e(t.value).then(s,o)}u((i=i.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,e,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(r){return u([t,r])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(n=0)),n)try{if(i=1,e&&(a=o[0]&2?e["return"]:o[0]?e["throw"]||((a=e["return"])&&a.call(e),0):e.next)&&!(a=a.call(e,o[1])).done)return a;if(e=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;e=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=r.call(t,n)}catch(t){o=[6,t];e=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-BTqyH9zP.system.js","./p-Bnro4LR3.system.js","./p-CSGkUch3.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var r,n,i,e,a,s,o;return{setters:[function(t){r=t.r;n=t.c;i=t.h;e=t.H;a=t.g},function(t){s=t.F},function(t){o=t.H},null],execute:function(){var u=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";var f=t("salla_filters",function(){function t(t){var i=this;r(this,t);this.changed=n(this,"changed");this.isReady=false;this.filtersData={};salla.event.on("filters::hidden",(function(){return i.host.style.display="none"}));salla.lang.onLoaded((function(){i.apply=salla.lang.get("pages.checkout.apply");i.reset=salla.lang.get("pages.categories.filters_reset")}));salla.event.on("filters::fetched",(function(t){var r=t.filters;i.host.style.display="";var n={};i.filters=r.map((function(t){t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label;if(t.key=="rating"){t.type=s.VALUES;var r=t.values,e=r.max,a=r.min;t.values=[5,4,3,2,1].filter((function(t){return t>=a||t<=e}))}if(i.filtersData.variants&&t.type==s.VARIANTS){n.variants=i.filtersData.variants}if(i.filtersData[t.key]&&t.type!==s.VARIANTS){n[t.key]=i.filtersData[t.key]}var o=new URLSearchParams(window.location.search);var u=false;for(var f=0,c=o.keys();f<c.length;f++){var l=c[f];if(l.includes("filters")){u=true;break}}if(salla.config.get("page.slug")=="product.index"&&Object.keys(n).length==0&&!u){var h=window.location.href;var d=salla.config.get("page.id");var v=h.indexOf("?")!==-1?"&":"?";var w=h+v+"filters[category_id]="+d;n.category_id=d;window.history.pushState({path:w},"",w)}return t}));i.filtersData=n;i.host.childNodes.forEach((function(t){return __awaiter(i,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:r=t.setWidgetHeight;if(!r)return[3,2];return[4,t.setWidgetHeight()];case 1:r=n.sent();n.label=2;case 2:return[2,r]}}))}))}))}))}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);t=new URLSearchParams(window.location.search);r=this;return[4,o.extractFiltersFromUrl(t)];case 1:r.filtersData=i.sent();return[3,3];case 2:n=i.sent();console.warn("failed to get filters from URL",n.message);return[3,3];case 3:return[2]}}))}))};t.prototype.getFilters=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.filtersData]}))}))};t.prototype.applyFilters=function(){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(n){if(!this.isReady){return[2]}t=Object.keys(this.filtersData).length>0;setTimeout((function(){var n;if(t){var i=new URL(window.location.href);for(var e=0,a=i.searchParams.entries();e<a.length;e++){var s=a[e][0];if(s.startsWith("filters")){i.searchParams.delete(s)}}var o=r.encodeFilters(r.filtersData);var u=i.search.split("&").filter((function(t){return!t.includes("filters")})).join("&");if(u){i.search=i.search.split("&filters")[0]+"&"+o}else{i.search="?".concat(o)}window.history.pushState({},"",i.href)}else{var i=new URL(window.location.href);(n=i.searchParams)===null||n===void 0?void 0:n.delete("filters");window.history.pushState({},"",i.toString())}salla.event.emit("salla-filters::changed",r.filtersData);r.changed.emit(r.filtersData)}),300);return[2]}))}))};t.prototype.encodeFilters=function(t,r){if(r===void 0){r="filters"}var n=[];for(var i in t){if(Object.prototype.hasOwnProperty.call(t,i)){var e=t[i];var a=r?"".concat(r,"[").concat(i,"]"):i;if(Array.isArray(e)){for(var s=0;s<e.length;s++){n.push("".concat(a,"[").concat(s,"]=").concat(e[s]))}}else if(typeof e==="object"&&e!==null){n.push(this.encodeFilters(e,a))}else{var o="".concat(a,"=").concat(e);n.push(o)}}}return n.join("&")};t.prototype.resetFilters=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.removeFiltersQueryParams();this.filtersData={};this.host.childNodes.forEach((function(t){return t.reset&&t.reset()}));salla.event.emit("salla-filters::reset");return[2,this.applyFilters()]}))}))};t.prototype.removeFiltersQueryParams=function(){var t=new URLSearchParams(window.location.search);var r=Array.from(t.keys()).filter((function(t){return!t.startsWith("filters[")})).map((function(r){return"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(t.get(r)))})).join("&");var n=r?"".concat(window.location.pathname,"?").concat(r):window.location.pathname;window.history.pushState({},"",n)};t.prototype.handleOptionChange=function(t,r,n){if(r.type===s.RANGE){this.filtersData[r.key]=n}var i=t.target.checked;if(r.type===s.VARIANTS){this.filtersData.variants=this.filtersData.variants||{};i&&(this.filtersData.variants[r.key]=n);i||delete this.filtersData.variants[r.key]}else if(t.target.type=="radio"){i&&(this.filtersData[r.key]=n);i||delete this.filtersData[r.key]}else if(t.target.type=="checkbox"){this.filtersData[r.key]=this.filtersData[r.key]||[];if(i){this.filtersData[r.key].push(n)}this.filtersData[r.key]=this.filtersData[r.key].filter((function(t){return t!=n}))}this.applyFilters()};t.prototype.render=function(){var t=this;var r,n;return i(e,{key:"d62d9a867f140a911cb5da11a1034511fd230745"},(r=this.filters)===null||r===void 0?void 0:r.map((function(r){return i("salla-filters-widget",{option:r,filtersData:t.filtersData,onChanged:function(r){var n=r.detail,i=n.event,e=n.option,a=n.value;t.handleOptionChange(i,e,a)}})})),((n=this.filters)===null||n===void 0?void 0:n.length)?i("div",{class:"s-filters-footer"},i("salla-button",{color:"gray",fill:"outline",onClick:function(){return t.resetFilters()}},this.reset)):"")};t.prototype.componentDidLoad=function(){this.isReady=true};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());f.style=u}}}));
5
- //# sourceMappingURL=p-5087750a.system.entry.js.map
4
+ */System.register(["./p-BX7FZkqj.system.js","./p-Bnro4LR3.system.js","./p-CSGkUch3.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var r,n,i,e,a,s,o;return{setters:[function(t){r=t.r;n=t.c;i=t.h;e=t.H;a=t.g},function(t){s=t.F},function(t){o=t.H},null],execute:function(){var u=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";var f=t("salla_filters",function(){function t(t){var i=this;r(this,t);this.changed=n(this,"changed");this.isReady=false;this.filtersData={};salla.event.on("filters::hidden",(function(){return i.host.style.display="none"}));salla.lang.onLoaded((function(){i.apply=salla.lang.get("pages.checkout.apply");i.reset=salla.lang.get("pages.categories.filters_reset")}));salla.event.on("filters::fetched",(function(t){var r=t.filters;i.host.style.display="";var n={};i.filters=r.map((function(t){t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label;if(t.key=="rating"){t.type=s.VALUES;var r=t.values,e=r.max,a=r.min;t.values=[5,4,3,2,1].filter((function(t){return t>=a||t<=e}))}if(i.filtersData.variants&&t.type==s.VARIANTS){n.variants=i.filtersData.variants}if(i.filtersData[t.key]&&t.type!==s.VARIANTS){n[t.key]=i.filtersData[t.key]}var o=new URLSearchParams(window.location.search);var u=false;for(var f=0,c=o.keys();f<c.length;f++){var l=c[f];if(l.includes("filters")){u=true;break}}if(salla.config.get("page.slug")=="product.index"&&Object.keys(n).length==0&&!u){var h=window.location.href;var d=salla.config.get("page.id");var v=h.indexOf("?")!==-1?"&":"?";var w=h+v+"filters[category_id]="+d;n.category_id=d;window.history.pushState({path:w},"",w)}return t}));i.filtersData=n;i.host.childNodes.forEach((function(t){return __awaiter(i,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:r=t.setWidgetHeight;if(!r)return[3,2];return[4,t.setWidgetHeight()];case 1:r=n.sent();n.label=2;case 2:return[2,r]}}))}))}))}))}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);t=new URLSearchParams(window.location.search);r=this;return[4,o.extractFiltersFromUrl(t)];case 1:r.filtersData=i.sent();return[3,3];case 2:n=i.sent();console.warn("failed to get filters from URL",n.message);return[3,3];case 3:return[2]}}))}))};t.prototype.getFilters=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.filtersData]}))}))};t.prototype.applyFilters=function(){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(n){if(!this.isReady){return[2]}t=Object.keys(this.filtersData).length>0;setTimeout((function(){var n;if(t){var i=new URL(window.location.href);for(var e=0,a=i.searchParams.entries();e<a.length;e++){var s=a[e][0];if(s.startsWith("filters")){i.searchParams.delete(s)}}var o=r.encodeFilters(r.filtersData);var u=i.search.split("&").filter((function(t){return!t.includes("filters")})).join("&");if(u){i.search=i.search.split("&filters")[0]+"&"+o}else{i.search="?".concat(o)}window.history.pushState({},"",i.href)}else{var i=new URL(window.location.href);(n=i.searchParams)===null||n===void 0?void 0:n.delete("filters");window.history.pushState({},"",i.toString())}salla.event.emit("salla-filters::changed",r.filtersData);r.changed.emit(r.filtersData)}),300);return[2]}))}))};t.prototype.encodeFilters=function(t,r){if(r===void 0){r="filters"}var n=[];for(var i in t){if(Object.prototype.hasOwnProperty.call(t,i)){var e=t[i];var a=r?"".concat(r,"[").concat(i,"]"):i;if(Array.isArray(e)){for(var s=0;s<e.length;s++){n.push("".concat(a,"[").concat(s,"]=").concat(e[s]))}}else if(typeof e==="object"&&e!==null){n.push(this.encodeFilters(e,a))}else{var o="".concat(a,"=").concat(e);n.push(o)}}}return n.join("&")};t.prototype.resetFilters=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.removeFiltersQueryParams();this.filtersData={};this.host.childNodes.forEach((function(t){return t.reset&&t.reset()}));salla.event.emit("salla-filters::reset");return[2,this.applyFilters()]}))}))};t.prototype.removeFiltersQueryParams=function(){var t=new URLSearchParams(window.location.search);var r=Array.from(t.keys()).filter((function(t){return!t.startsWith("filters[")})).map((function(r){return"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(t.get(r)))})).join("&");var n=r?"".concat(window.location.pathname,"?").concat(r):window.location.pathname;window.history.pushState({},"",n)};t.prototype.handleOptionChange=function(t,r,n){if(r.type===s.RANGE){this.filtersData[r.key]=n}var i=t.target.checked;if(r.type===s.VARIANTS){this.filtersData.variants=this.filtersData.variants||{};i&&(this.filtersData.variants[r.key]=n);i||delete this.filtersData.variants[r.key]}else if(t.target.type=="radio"){i&&(this.filtersData[r.key]=n);i||delete this.filtersData[r.key]}else if(t.target.type=="checkbox"){this.filtersData[r.key]=this.filtersData[r.key]||[];if(i){this.filtersData[r.key].push(n)}this.filtersData[r.key]=this.filtersData[r.key].filter((function(t){return t!=n}))}this.applyFilters()};t.prototype.render=function(){var t=this;var r,n;return i(e,{key:"d62d9a867f140a911cb5da11a1034511fd230745"},(r=this.filters)===null||r===void 0?void 0:r.map((function(r){return i("salla-filters-widget",{option:r,filtersData:t.filtersData,onChanged:function(r){var n=r.detail,i=n.event,e=n.option,a=n.value;t.handleOptionChange(i,e,a)}})})),((n=this.filters)===null||n===void 0?void 0:n.length)?i("div",{class:"s-filters-footer"},i("salla-button",{color:"gray",fill:"outline",onClick:function(){return t.resetFilters()}},this.reset)):"")};t.prototype.componentDidLoad=function(){this.isReady=true};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());f.style=u}}}));
5
+ //# sourceMappingURL=p-ce7bc5bd.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,a,l,e){function s(t){return t instanceof l?t:new l((function(a){a(t)}))}return new(l||(l=Promise))((function(l,n){function r(t){try{c(e.next(t))}catch(t){n(t)}}function i(t){try{c(e["throw"](t))}catch(t){n(t)}}function c(t){t.done?l(t.value):s(t.value).then(r,i)}c((e=e.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var l={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},e,s,n,r;return r={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function i(t){return function(a){return c([t,a])}}function c(i){if(e)throw new TypeError("Generator is already executing.");while(r&&(r=0,i[0]&&(l=0)),l)try{if(e=1,s&&(n=i[0]&2?s["return"]:i[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,i[1])).done)return n;if(s=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:l.label++;return{value:i[1],done:false};case 5:l.label++;s=i[1];i=[0];continue;case 7:i=l.ops.pop();l.trys.pop();continue;default:if(!(n=l.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){l=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){l.label=i[1];break}if(i[0]===6&&l.label<n[1]){l.label=n[1];n=i;break}if(n&&l.label<n[2]){l.label=n[2];l.ops.push(i);break}if(n[2])l.ops.pop();l.trys.pop();continue}i=a.call(t,l)}catch(t){i=[6,t];s=0}finally{e=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-BTqyH9zP.system.js"],(function(t){"use strict";var a,l,e;return{setters:[function(t){a=t.r;l=t.h;e=t.H}],execute:function(){var s=".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:-ms-flexbox !important;display:flex !important;-ms-flex-align:center !important;align-items:center !important;-ms-flex-pack:start !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:-webkit-max-content;width:-moz-max-content;width:max-content;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";var n=t("salla_wallet",function(){function t(t){var l=this;a(this,t);this.isLoading=false;this.nextPageUrl="";this.handleClick=function(){l.loadMoreTransactions()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadTransactions()}))};t.prototype.loadTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/wallet?per_page=10&page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.nextPageUrl=a.data.transactions.next_page_url;this.transactionsArray=a.data.transactions;this.balance=a.data.balance;return[3,5];case 3:l=e.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;var e;return __generator(this,(function(s){switch(s.label){case 0:this.isLoading=true;s.label=1;case 1:s.trys.push([1,3,4,5]);t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10";return[4,salla.api.request(t)];case 2:a=s.sent();this.nextPageUrl=a.data.transactions.next_page_url;(e=this.transactionsArray).push.apply(e,a.data.transactions.data);this.balance=a.data.balance;return[3,5];case 3:l=s.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){if(this.transactionsArray.length>0){return l(e,null,l("table",{class:"s-wallet-table"},l("tbody",{class:"s-wallet-table-tbody"},l("tr",{class:"s-table__tr"},l("td",null,l("div",{class:"s-wallet-table-balance-container"},l("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),l("div",null,l("div",{innerHTML:salla.money(this.balance)}),l("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("table",{class:"s-wallet-table"},l("thead",{class:"s-wallet-table-head"},l("tr",{class:"s-wallet-table-head-tr"},l("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),l("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((function(t){return l("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&l("span",{class:"hidden md:inline-block"},"#",t.id),l("div",{class:"flex items-center md:hidden"},l("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&l("span",null,"#",t.order_id))))),l("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),l("div",{innerHTML:salla.money(t.amount)}))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(t.created_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),l("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),l("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&l("span",null,"#",t.order_id)))),l("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),l("span",null,t.expired_at&&new Date(t.expired_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("div",null,l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),l("div",{class:{"s-wallet-table-transaction-status-default":true,"s-wallet-table-transaction-status-cashback":t.action_type==="cashback","s-wallet-table-transaction-status-refund":t.action_type==="refund","s-wallet-table-transaction-status-purchase":t.action_type==="purchase_by_wallet"}},!!t.description&&l("i",{id:t.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!t.description&&l("salla-tooltip",{text:t.description,targetId:t.id.toString()}),l("span",null,t.title)))))})))),l("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&l("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more"))))}else{return l(e,null,l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("div",{class:"s-wallet-table-empty-state"},l("i",{class:"sicon-full-wallet"}),l("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),l("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};return t}());n.style=s}}}));
5
- //# sourceMappingURL=p-2c9efa34.system.entry.js.map
4
+ */System.register(["./p-BX7FZkqj.system.js"],(function(t){"use strict";var a,l,e;return{setters:[function(t){a=t.r;l=t.h;e=t.H}],execute:function(){var s=".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:-ms-flexbox !important;display:flex !important;-ms-flex-align:center !important;align-items:center !important;-ms-flex-pack:start !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:-webkit-max-content;width:-moz-max-content;width:max-content;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";var n=t("salla_wallet",function(){function t(t){var l=this;a(this,t);this.isLoading=false;this.nextPageUrl="";this.handleClick=function(){l.loadMoreTransactions()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadTransactions()}))};t.prototype.loadTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/wallet?per_page=10&page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.nextPageUrl=a.data.transactions.next_page_url;this.transactionsArray=a.data.transactions;this.balance=a.data.balance;return[3,5];case 3:l=e.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;var e;return __generator(this,(function(s){switch(s.label){case 0:this.isLoading=true;s.label=1;case 1:s.trys.push([1,3,4,5]);t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10";return[4,salla.api.request(t)];case 2:a=s.sent();this.nextPageUrl=a.data.transactions.next_page_url;(e=this.transactionsArray).push.apply(e,a.data.transactions.data);this.balance=a.data.balance;return[3,5];case 3:l=s.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){if(this.transactionsArray.length>0){return l(e,null,l("table",{class:"s-wallet-table"},l("tbody",{class:"s-wallet-table-tbody"},l("tr",{class:"s-table__tr"},l("td",null,l("div",{class:"s-wallet-table-balance-container"},l("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),l("div",null,l("div",{innerHTML:salla.money(this.balance)}),l("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("table",{class:"s-wallet-table"},l("thead",{class:"s-wallet-table-head"},l("tr",{class:"s-wallet-table-head-tr"},l("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),l("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((function(t){return l("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&l("span",{class:"hidden md:inline-block"},"#",t.id),l("div",{class:"flex items-center md:hidden"},l("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&l("span",null,"#",t.order_id))))),l("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),l("div",{innerHTML:salla.money(t.amount)}))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(t.created_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),l("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),l("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&l("span",null,"#",t.order_id)))),l("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),l("span",null,t.expired_at&&new Date(t.expired_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("div",null,l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),l("div",{class:{"s-wallet-table-transaction-status-default":true,"s-wallet-table-transaction-status-cashback":t.action_type==="cashback","s-wallet-table-transaction-status-refund":t.action_type==="refund","s-wallet-table-transaction-status-purchase":t.action_type==="purchase_by_wallet"}},!!t.description&&l("i",{id:t.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!t.description&&l("salla-tooltip",{text:t.description,targetId:t.id.toString()}),l("span",null,t.title)))))})))),l("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&l("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more"))))}else{return l(e,null,l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("div",{class:"s-wallet-table-empty-state"},l("i",{class:"sicon-full-wallet"}),l("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),l("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};return t}());n.style=s}}}));
5
+ //# sourceMappingURL=p-ce7cead8.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,c as i,h as t,H as e,g as l}from"./p-DWuTKtBW.js";import{M as r}from"./p-DmgxDvXL.js";var h=`\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>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n`;const o="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";const a=class{constructor(t){s(this,t);this.verified=i(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((()=>{var s;this.translationLoaded=true;this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type);(s=this.modal)===null||s===void 0?void 0:s.setTitle(this.title)}));if(this.display=="inline"){this.modal={open:()=>"",close:()=>"",setTitle:()=>""};return}salla.event.on("profile::verification",(s=>{var i;let t=Array.isArray(s)?s[0]:s;this.isProfileVerify=true;this.open(t);this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+t.type);(i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title)}));salla.event.on("modalClosed",(()=>{this.resendAfter=0;this.timer.innerHTML="30 : 00"}))}splitNumber(s){this.resetError();let i=s.data||s.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(s.target,i)}modifyNext(s,i){s.value=i[0];i=i.substring(1);if(s.nextElementSibling&&i.length){this.modifyNext(s.nextElementSibling,i)}else if(!s.nextElementSibling&&i.length===0){s.focus()}else if(s.nextElementSibling&&i.length===0){s.nextElementSibling.focus()}}checkAllInputs(){let s=true;for(let i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){s=false}}return s}handleKeyUp(s){var i,t,e,l;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(s.key)){return}let r=s.keyCode||s.charCode;if(s.target.value){(i=s.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(t=s.target.nextElementSibling)===null||t===void 0?void 0:t.select()}else if([8,46].includes(r)){(e=s.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(l=s.target.previousElementSibling)===null||l===void 0?void 0:l.select()}if(s.target.value.length>1){this.splitNumber(s)}}handlePaste(s){this.resetError();const i=salla.helpers.number(s.clipboardData.getData("text"))||"";let t=i.replace(/[^0-9]/g,"");t=t.substring(0,this.otpInputs.length);this.otpInputs.forEach((s=>s.value=""));this.modifyNext(this.otpInputs[0],t)}handleInput(s){this.resetError();salla.helpers.inputDigitsOnly(s.target);if(this.checkAllInputs()){setTimeout((()=>{this.toggleOTPSubmit()}),100)}}resetError(){this.hasError=false;this.errorMessage=""}handleFocus(s){var i;if(s.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(s.target.previousElementSibling.value==""){s.target.previousElementSibling.focus()}}async getCode(){return this.code.value}async open(s){var i,t;this.data=s;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(t=this.firstOtpInput)===null||t===void 0?void 0:t.addEventListener("input",(s=>this.splitNumber(s)));setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let s=[];this.otpInputs.forEach((i=>i.value&&s.push(i.value)));this.code.value=s.join("");if(s.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()}reset(){this.otpInputs.forEach((s=>s.value=""));this.code.value="";this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;let s=setInterval((()=>{if(this.resendAfter<=0){clearInterval(s);this.resend.style.display="block";this.resendMessage.style.display="none"}else{this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`;this.resendAfter--}}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((s=>s.value=""));this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}let s=Object.assign({code:this.code.value},this.data);return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(s):salla.auth.verify(s,this.supportWebAuth))).then((s=>this.verified.emit(s))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((s=>{var i,t,e;this.hasError=true;this.errorMessage=((e=(t=(i=s.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)===null||e===void 0?void 0:e.message)||salla.lang.get("common.errors.error_occurred");if(!s.response){console.log("Unexpected error",s)}else{salla.logger.error(s)}this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return this.display=="inline"?t(e,null,this.myBody()):t("salla-modal",{width:"xs",class:"s-verify",ref:s=>this.modal=s,"modal-title":this.title},t("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?h:r}),this.myBody())}myBody(){return t("div",{class:"s-verify-body",ref:s=>this.body=s},t("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),t("slot",{name:"mobile"}),t("slot",{name:"email"}),t("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:s=>this.code=s}),t("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((s=>t("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${s}`,class:{"s-verify-input":true,"s-has-error":this.hasError},onInput:s=>this.handleInput(s),onPaste:s=>this.handlePaste(s),onKeyUp:s=>this.handleKeyUp(s),onFocus:s=>this.handleFocus(s),required:true})))),this.hasError&&this.errorMessage?t("span",{class:"s-verify-error-message"},this.errorMessage):"",t("div",{slot:"footer",class:"s-verify-footer"},t("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:()=>this.submit(),ref:s=>this.btn=s},salla.lang.get("pages.profile.verify")),t("p",{class:"s-verify-resend-message",ref:s=>this.resendMessage=s},salla.lang.get("blocks.header.resend_after"),t("b",{class:"s-verify-timer",ref:s=>this.timer=s})),t("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:s=>this.resend=s},salla.lang.get("blocks.comments.submit"))),t("slot",{name:"after-footer"}))}get host(){return l(this)}};a.style=o;export{a as salla_verify};
5
- //# sourceMappingURL=p-38b6b862.entry.js.map
4
+ import{r as s,c as i,h as t,H as e,g as l}from"./p-iZNAXsJF.js";import{M as r}from"./p-DmgxDvXL.js";var h=`\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>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n`;const o="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";const a=class{constructor(t){s(this,t);this.verified=i(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((()=>{var s;this.translationLoaded=true;this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type);(s=this.modal)===null||s===void 0?void 0:s.setTitle(this.title)}));if(this.display=="inline"){this.modal={open:()=>"",close:()=>"",setTitle:()=>""};return}salla.event.on("profile::verification",(s=>{var i;let t=Array.isArray(s)?s[0]:s;this.isProfileVerify=true;this.open(t);this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+t.type);(i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title)}));salla.event.on("modalClosed",(()=>{this.resendAfter=0;this.timer.innerHTML="30 : 00"}))}splitNumber(s){this.resetError();let i=s.data||s.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(s.target,i)}modifyNext(s,i){s.value=i[0];i=i.substring(1);if(s.nextElementSibling&&i.length){this.modifyNext(s.nextElementSibling,i)}else if(!s.nextElementSibling&&i.length===0){s.focus()}else if(s.nextElementSibling&&i.length===0){s.nextElementSibling.focus()}}checkAllInputs(){let s=true;for(let i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){s=false}}return s}handleKeyUp(s){var i,t,e,l;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(s.key)){return}let r=s.keyCode||s.charCode;if(s.target.value){(i=s.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(t=s.target.nextElementSibling)===null||t===void 0?void 0:t.select()}else if([8,46].includes(r)){(e=s.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(l=s.target.previousElementSibling)===null||l===void 0?void 0:l.select()}if(s.target.value.length>1){this.splitNumber(s)}}handlePaste(s){this.resetError();const i=salla.helpers.number(s.clipboardData.getData("text"))||"";let t=i.replace(/[^0-9]/g,"");t=t.substring(0,this.otpInputs.length);this.otpInputs.forEach((s=>s.value=""));this.modifyNext(this.otpInputs[0],t)}handleInput(s){this.resetError();salla.helpers.inputDigitsOnly(s.target);if(this.checkAllInputs()){setTimeout((()=>{this.toggleOTPSubmit()}),100)}}resetError(){this.hasError=false;this.errorMessage=""}handleFocus(s){var i;if(s.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(s.target.previousElementSibling.value==""){s.target.previousElementSibling.focus()}}async getCode(){return this.code.value}async open(s){var i,t;this.data=s;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(t=this.firstOtpInput)===null||t===void 0?void 0:t.addEventListener("input",(s=>this.splitNumber(s)));setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let s=[];this.otpInputs.forEach((i=>i.value&&s.push(i.value)));this.code.value=s.join("");if(s.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()}reset(){this.otpInputs.forEach((s=>s.value=""));this.code.value="";this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;let s=setInterval((()=>{if(this.resendAfter<=0){clearInterval(s);this.resend.style.display="block";this.resendMessage.style.display="none"}else{this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`;this.resendAfter--}}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((s=>s.value=""));this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}let s=Object.assign({code:this.code.value},this.data);return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(s):salla.auth.verify(s,this.supportWebAuth))).then((s=>this.verified.emit(s))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((s=>{var i,t,e;this.hasError=true;this.errorMessage=((e=(t=(i=s.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)===null||e===void 0?void 0:e.message)||salla.lang.get("common.errors.error_occurred");if(!s.response){console.log("Unexpected error",s)}else{salla.logger.error(s)}this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return this.display=="inline"?t(e,null,this.myBody()):t("salla-modal",{width:"xs",class:"s-verify",ref:s=>this.modal=s,"modal-title":this.title},t("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?h:r}),this.myBody())}myBody(){return t("div",{class:"s-verify-body",ref:s=>this.body=s},t("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),t("slot",{name:"mobile"}),t("slot",{name:"email"}),t("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:s=>this.code=s}),t("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((s=>t("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${s}`,class:{"s-verify-input":true,"s-has-error":this.hasError},onInput:s=>this.handleInput(s),onPaste:s=>this.handlePaste(s),onKeyUp:s=>this.handleKeyUp(s),onFocus:s=>this.handleFocus(s),required:true})))),this.hasError&&this.errorMessage?t("span",{class:"s-verify-error-message"},this.errorMessage):"",t("div",{slot:"footer",class:"s-verify-footer"},t("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:()=>this.submit(),ref:s=>this.btn=s},salla.lang.get("pages.profile.verify")),t("p",{class:"s-verify-resend-message",ref:s=>this.resendMessage=s},salla.lang.get("blocks.header.resend_after"),t("b",{class:"s-verify-timer",ref:s=>this.timer=s})),t("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:s=>this.resend=s},salla.lang.get("blocks.comments.submit"))),t("slot",{name:"after-footer"}))}get host(){return l(this)}};a.style=o;export{a as salla_verify};
5
+ //# sourceMappingURL=p-cec3c889.entry.js.map
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import{r as s,h as c,H as b}from"./p-iZNAXsJF.js";const o="";const r=class{constructor(c){s(this,c)}render(){return c(b,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},c("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))}};r.style=o;export{r as salla_accordion_body};
5
+ //# sourceMappingURL=p-cf3ead3a.entry.js.map
@@ -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-DWuTKtBW.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}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");return salla.onReady((()=>{const t=!salla.storage.get("cart.id")&&this.optionsData.some((t=>["file","image"].includes(t.type)));return t?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null}))}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)}),[])}componentDidLoad(){var t,i;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-6ea49b56.entry.js.map
4
+ import{r as t,c as i,h as o,H as s,g as n}from"./p-iZNAXsJF.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}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");return salla.onReady((()=>{const t=!salla.storage.get("cart.id")&&this.optionsData.some((t=>["file","image"].includes(t.type)));return t?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null}))}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)}),[])}componentDidLoad(){var t,i;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-cf8b52bf.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as e,g as t}from"./p-DWuTKtBW.js";var i;(function(s){s["ProductDetail"]="product.single";s["Cart"]="cart"})(i||(i={}));var r;(function(s){s["Conditional"]="conditional";s["PercentageOrFixed"]="fixed";s["DiscountsTable"]="discounts_table";s["Bank"]="bank";s["BuyXGetY"]="buy_x_get_y";s["SpecialPrice"]="special_price"})(r||(r={}));const a='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';const o=class{constructor(e){s(this,e);var t;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text=s=>salla.lang.get("pages.offer.buy_quantity",{quantity:s});salla.lang.onLoaded((()=>{this.offer_with_price_text=salla.lang.get("pages.offer.with_price");this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text(0)}));salla.onReady((()=>{this.currentPage=salla.config.get("page.slug");this.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((t=this.host.querySelector('[slot="category"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}async getEndpointByPageName(){if(this.currentPage==i.Cart){const s=await Salla.cart.getCurrentCartId();return`offers/cart/${s}`}if(this.currentPage==i.ProductDetail){return`offers/product/${salla.config.get("page.id")}`}return"offers"}emitPromotionViewed(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const s={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[s])}emitPromotionClicked(s=1){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:s};salla.event.emit("promotion::clicked",[e])}componentWillLoad(){this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((s=>salla.onReady(s))).then((()=>{this.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(this.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((async()=>salla.api.request(await this.getEndpointByPageName()))).then((s=>{if(!(this.offersList=s.data).length){throw new Error("salla-offers:: There is no offers!")}const e=this.offersList.find((s=>[r.SpecialPrice,r.Bank,r.BuyXGetY,r.DiscountsTable].includes(s.type)));if(!e){throw new Error("salla-offers:: Offer type not supported yet!")}if(e.type===r.DiscountsTable){return this.offersList=[e]}if(this.isBankOffer=e.type===r.Bank){this.offersList=this.offersList.filter((s=>s.type===r.Bank));this.isMultipleBank=this.offersList.length>1;return this.offersList}if(e.type===r.SpecialPrice){const s=e.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((s=>{e.details.products=s.data;return this.offersList=[e]})):salla.product.api.categories().then((t=>{const i=this.findCategories(t.data,s.targets);e.details.categories=i;return this.offersList=[e]}))}const t=e.details.get;return t.source==="products"?salla.product.api.fetch({source:"selected",source_value:t.source_value}).then((s=>{t.products=s.data;e.details.get=t;return this.offersList=[e]})):salla.product.api.categories().then((s=>{t.categories=this.findCategories(s.data,t.source_value);e.details.get=t;return this.offersList=[e]}))})).then((s=>{salla.storage.set(this.getStorageKey(),{offers:s,stored_at:(new Date).getTime()});this.canRender=true})).catch((s=>{salla.logger.warn(s)}))}componentDidLoad(){let s=this.host.querySelector(".s-slider-block__title-nav");s===null||s===void 0?void 0:s.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()}findCategories(s,e){var t;let i=[];for(const r of s){if(e.includes(r.id_||r.id)){i.push(r)}if(((t=r.sub_categories)===null||t===void 0?void 0:t.length)>0){i=i.concat(this.findCategories(r.sub_categories,e))}}return i}getStorageKey(){try{const s=salla.config.get("page.slug").replace(".","_");const e=salla.lang.getLocale();const t=salla.config.currency().code;if(!s||!e||!t){throw new Error("Unable to get the storage key.")}return`s-offers-${s}-${salla.config.get("page.id")}-${e}-${t}`}catch(s){return""}}getOffersFromStorage(){let s=salla.storage.get(this.getStorageKey());if(!s||s.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(s.offers)}render(){if(!this.offersList.length||!this.canRender||!this.showOffer)return null;const s=this.offersList[0];const t=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:s.title;const i=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:s.description;const r={"block-title":t,"block-subTitle":i,"show-controls":this.isMultipleBank};return e("div",{class:"s-offer-wrapper",onClick:()=>this.emitPromotionClicked()},e("p",{class:"s-offer-corner-badge"},this.special_offer_text),e("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},r),e("div",{slot:"items"},this.renderSectionForOfferType(s.type))))}renderSectionForOfferType(s){if(this.isBankOffer){return this.renderBankSection()}if(s==r.SpecialPrice){return this.renderSpecialPriceSection()}if(s==r.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()}getCategoriesSection(s){return e("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,s.url).replace(/\{icon\}/g,s.icon||"sicon-store").replace(/\{name\}/g,s.name)})}renderBuyXGetYSection(){var s,t;const i=this.offersList[0].details;return[(s=i.get.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s})))),(t=i.get.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s)))]}renderBankSection(){return this.offersList.map((s=>e("div",{class:{"s-offer-slide-one-sixth":this.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!this.isMultipleBank}},e("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!this.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":this.isMultipleBank}},e("div",{class:"s-offer-bank-logo"},e("img",{src:s.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":s.details.logo,alt:s.title+" offer"})),e("ul",{class:"s-offer-bank-payment-wrapper"},s.details.payments.map((s=>e("li",{class:"s-offer-bank-payment-single"},e("img",{src:salla.url.cdn("images/payment/"+s+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+s+".png"),alt:"payment"}))))),this.isMultipleBank?e("p",{class:"s-offer-bank-payment-discount-percent"},`${this.product_discount_text} ${s.details.discount_value}${s.details.discount_type==="percentage"&&"%"}`):""),!this.isMultipleBank?e("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},e("h2",null,this.offersList[0].title),e("p",{innerHTML:this.generateBankDescription(this.offersList[0].description,s.details.discount_value)})):"")))}generateBankDescription(s,e){return s.replace(new RegExp(`${e} %`),`<span class="s-offer-bank-message-amount">${e} %</span>`)}renderDiscountTableSection(){var s;const t=this.offersList[0];let i=t.details.show_price_after_discount;return(s=this.offersList[0].details.discounts)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},e("div",{class:"s-offer-slide-offer-entry"},e("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},e("p",{class:"s-offer-slide-offer-entry-quantity"},this.buy_quantity_text(s.quantity)),i?e("div",{class:"s-offer-slide-offer-entry-price"},e("span",null,this.offer_with_price_text),e("span",{class:"s-offer-slide-offer-entry-price-amount"},s.discounted_amount)," ",e("span",null,this.userCurrency)):""),e("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},this.with_discount_text,"(",e("span",null,s.percentage,!!s.percentage&&"%"),")")))))}renderSpecialPriceSection(){var s,t;const i=this.offersList[0].details;return[i.apply_to==="product"&&((s=i.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s}))))),i.apply_to==="category"&&((t=i.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s))))]}get host(){return t(this)}};o.style=a;export{o as salla_offer};
5
- //# sourceMappingURL=p-0f1a8a47.entry.js.map
4
+ import{r as s,h as e,g as t}from"./p-iZNAXsJF.js";var i;(function(s){s["ProductDetail"]="product.single";s["Cart"]="cart"})(i||(i={}));var r;(function(s){s["Conditional"]="conditional";s["PercentageOrFixed"]="fixed";s["DiscountsTable"]="discounts_table";s["Bank"]="bank";s["BuyXGetY"]="buy_x_get_y";s["SpecialPrice"]="special_price"})(r||(r={}));const a='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';const o=class{constructor(e){s(this,e);var t;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text=s=>salla.lang.get("pages.offer.buy_quantity",{quantity:s});salla.lang.onLoaded((()=>{this.offer_with_price_text=salla.lang.get("pages.offer.with_price");this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text(0)}));salla.onReady((()=>{this.currentPage=salla.config.get("page.slug");this.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((t=this.host.querySelector('[slot="category"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}async getEndpointByPageName(){if(this.currentPage==i.Cart){const s=await Salla.cart.getCurrentCartId();return`offers/cart/${s}`}if(this.currentPage==i.ProductDetail){return`offers/product/${salla.config.get("page.id")}`}return"offers"}emitPromotionViewed(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const s={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[s])}emitPromotionClicked(s=1){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:s};salla.event.emit("promotion::clicked",[e])}componentWillLoad(){this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((s=>salla.onReady(s))).then((()=>{this.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(this.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((async()=>salla.api.request(await this.getEndpointByPageName()))).then((s=>{if(!(this.offersList=s.data).length){throw new Error("salla-offers:: There is no offers!")}const e=this.offersList.find((s=>[r.SpecialPrice,r.Bank,r.BuyXGetY,r.DiscountsTable].includes(s.type)));if(!e){throw new Error("salla-offers:: Offer type not supported yet!")}if(e.type===r.DiscountsTable){return this.offersList=[e]}if(this.isBankOffer=e.type===r.Bank){this.offersList=this.offersList.filter((s=>s.type===r.Bank));this.isMultipleBank=this.offersList.length>1;return this.offersList}if(e.type===r.SpecialPrice){const s=e.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((s=>{e.details.products=s.data;return this.offersList=[e]})):salla.product.api.categories().then((t=>{const i=this.findCategories(t.data,s.targets);e.details.categories=i;return this.offersList=[e]}))}const t=e.details.get;return t.source==="products"?salla.product.api.fetch({source:"selected",source_value:t.source_value}).then((s=>{t.products=s.data;e.details.get=t;return this.offersList=[e]})):salla.product.api.categories().then((s=>{t.categories=this.findCategories(s.data,t.source_value);e.details.get=t;return this.offersList=[e]}))})).then((s=>{salla.storage.set(this.getStorageKey(),{offers:s,stored_at:(new Date).getTime()});this.canRender=true})).catch((s=>{salla.logger.warn(s)}))}componentDidLoad(){let s=this.host.querySelector(".s-slider-block__title-nav");s===null||s===void 0?void 0:s.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()}findCategories(s,e){var t;let i=[];for(const r of s){if(e.includes(r.id_||r.id)){i.push(r)}if(((t=r.sub_categories)===null||t===void 0?void 0:t.length)>0){i=i.concat(this.findCategories(r.sub_categories,e))}}return i}getStorageKey(){try{const s=salla.config.get("page.slug").replace(".","_");const e=salla.lang.getLocale();const t=salla.config.currency().code;if(!s||!e||!t){throw new Error("Unable to get the storage key.")}return`s-offers-${s}-${salla.config.get("page.id")}-${e}-${t}`}catch(s){return""}}getOffersFromStorage(){let s=salla.storage.get(this.getStorageKey());if(!s||s.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(s.offers)}render(){if(!this.offersList.length||!this.canRender||!this.showOffer)return null;const s=this.offersList[0];const t=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:s.title;const i=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:s.description;const r={"block-title":t,"block-subTitle":i,"show-controls":this.isMultipleBank};return e("div",{class:"s-offer-wrapper",onClick:()=>this.emitPromotionClicked()},e("p",{class:"s-offer-corner-badge"},this.special_offer_text),e("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},r),e("div",{slot:"items"},this.renderSectionForOfferType(s.type))))}renderSectionForOfferType(s){if(this.isBankOffer){return this.renderBankSection()}if(s==r.SpecialPrice){return this.renderSpecialPriceSection()}if(s==r.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()}getCategoriesSection(s){return e("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,s.url).replace(/\{icon\}/g,s.icon||"sicon-store").replace(/\{name\}/g,s.name)})}renderBuyXGetYSection(){var s,t;const i=this.offersList[0].details;return[(s=i.get.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s})))),(t=i.get.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s)))]}renderBankSection(){return this.offersList.map((s=>e("div",{class:{"s-offer-slide-one-sixth":this.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!this.isMultipleBank}},e("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!this.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":this.isMultipleBank}},e("div",{class:"s-offer-bank-logo"},e("img",{src:s.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":s.details.logo,alt:s.title+" offer"})),e("ul",{class:"s-offer-bank-payment-wrapper"},s.details.payments.map((s=>e("li",{class:"s-offer-bank-payment-single"},e("img",{src:salla.url.cdn("images/payment/"+s+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+s+".png"),alt:"payment"}))))),this.isMultipleBank?e("p",{class:"s-offer-bank-payment-discount-percent"},`${this.product_discount_text} ${s.details.discount_value}${s.details.discount_type==="percentage"&&"%"}`):""),!this.isMultipleBank?e("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},e("h2",null,this.offersList[0].title),e("p",{innerHTML:this.generateBankDescription(this.offersList[0].description,s.details.discount_value)})):"")))}generateBankDescription(s,e){return s.replace(new RegExp(`${e} %`),`<span class="s-offer-bank-message-amount">${e} %</span>`)}renderDiscountTableSection(){var s;const t=this.offersList[0];let i=t.details.show_price_after_discount;return(s=this.offersList[0].details.discounts)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},e("div",{class:"s-offer-slide-offer-entry"},e("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},e("p",{class:"s-offer-slide-offer-entry-quantity"},this.buy_quantity_text(s.quantity)),i?e("div",{class:"s-offer-slide-offer-entry-price"},e("span",null,this.offer_with_price_text),e("span",{class:"s-offer-slide-offer-entry-price-amount"},s.discounted_amount)," ",e("span",null,this.userCurrency)):""),e("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},this.with_discount_text,"(",e("span",null,s.percentage,!!s.percentage&&"%"),")")))))}renderSpecialPriceSection(){var s,t;const i=this.offersList[0].details;return[i.apply_to==="product"&&((s=i.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s}))))),i.apply_to==="category"&&((t=i.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s))))]}get host(){return t(this)}};o.style=a;export{o as salla_offer};
5
+ //# sourceMappingURL=p-d5fae15b.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-BTqyH9zP.system.js"],(function(e){"use strict";var c,t,n;return{setters:[function(e){c=e.r;t=e.h;n=e.H}],execute:function(){var r="";var b=e("salla_accordion_body",function(){function e(e){c(this,e)}e.prototype.render=function(){return t(n,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},t("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))};return e}());b.style=r}}}));
5
- //# sourceMappingURL=p-77007b51.system.entry.js.map
4
+ System.register(["./p-BX7FZkqj.system.js"],(function(e){"use strict";var c,t,n;return{setters:[function(e){c=e.r;t=e.h;n=e.H}],execute:function(){var r="";var b=e("salla_accordion_body",function(){function e(e){c(this,e)}e.prototype.render=function(){return t(n,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},t("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))};return e}());b.style=r}}}));
5
+ //# sourceMappingURL=p-d6e8290c.system.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-DWuTKtBW.js";import{f as i,t as a}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 e=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>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:a,facebook:i,youtube:e,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:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},l("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",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-9ae63c85.entry.js.map
4
+ import{r as c,h as l,H as t,g as s}from"./p-iZNAXsJF.js";import{f as i,t as a}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 e=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>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:a,facebook:i,youtube:e,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:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},l("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",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-dba83eaf.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-DWuTKtBW.js";import{H as n}from"./p-DVKz7ZDb.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-d75b04f0.entry.js.map
4
+ import{r as t,h as i,g as s}from"./p-iZNAXsJF.js";import{H as n}from"./p-DVKz7ZDb.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-e37d593d.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-DWuTKtBW.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:"8797bb6b8123ab8a8d4536eb990dcde15e1ddd06",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),o(),s("div",{key:"b2b3bdc4e8a63aae9103eca5274003b49d4bf19e",class:"s-review-card-content"},this.renderHeader(),s("p",{key:"0e64b3fe2ae5e59a1899515c04063f74b9828001",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-39744d46.entry.js.map
4
+ import{r as i,h as s,g as t}from"./p-iZNAXsJF.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:"8797bb6b8123ab8a8d4536eb990dcde15e1ddd06",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),o(),s("div",{key:"b2b3bdc4e8a63aae9103eca5274003b49d4bf19e",class:"s-review-card-content"},this.renderHeader(),s("p",{key:"0e64b3fe2ae5e59a1899515c04063f74b9828001",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-ef23379f.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-DWuTKtBW.js";import{G as s}from"./p-C0JNGIpa.js";const o="";const e=l=>{if(!l)return"";return new Date(Number(l)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})};const r=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:"985386d18096b99ef6114a6e21363900c5dab374"},a("div",{key:"67bb4fceebc5ef047cd3b0ee5b94297e4c9d9d17"},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"},e((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"},e(l===null||l===void 0?void 0:l.points_expire_date)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(l===null||l===void 0?void 0:l.key)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(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-1344b38f.entry.js.map
4
+ import{r as l,h as a,H as t}from"./p-iZNAXsJF.js";import{G as s}from"./p-C0JNGIpa.js";const o="";const e=l=>{if(!l)return"";return new Date(Number(l)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})};const r=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:"985386d18096b99ef6114a6e21363900c5dab374"},a("div",{key:"67bb4fceebc5ef047cd3b0ee5b94297e4c9d9d17"},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"},e((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"},e(l===null||l===void 0?void 0:l.points_expire_date)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(l===null||l===void 0?void 0:l.key)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(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-ef344e7e.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as a,c,h as s,H as e,g as t}from"./p-DWuTKtBW.js";import{p as d,m as o}from"./p-DfeagqF1.js";const i="";const l=class{constructor(s){a(this,s);this.accordionToggle=c(this,"accordionToggle");this.collapsible=false;this.collapsed=true}emitCollapsePanel(){this.accordionToggle.emit({payload:{collapsed:this.collapsed}})}toggleCollapse(){var a,c,s;if(!this.collapsible)return;this.collapsed=!this.collapsed;(a=this.host.parentElement)===null||a===void 0?void 0:a.setAttribute("data-collapsed",this.collapsed.toString());(s=(c=this.host.parentElement)===null||c===void 0?void 0:c.querySelector("salla-accordion-body"))===null||s===void 0?void 0:s.setAttribute("data-collapsed",this.collapsed.toString());this.emitCollapsePanel()}render(){return s(e,{key:"9bb7ad4ad615f5316968b48839b2433619bd3850","data-collapsed":this.collapsed.toString(),onClick:()=>this.toggleCollapse(),class:"s-accordion-head-wrapper"},s("div",{key:"6826492e1c552440d6407435dfe4e0ca3915cdf4",class:"s-accordion-head-wrapper-start"},s("slot",{key:"2c19c500b57444ac8f69c2f64616904a819f54da",name:"title"}),s("slot",{key:"a6ed0daccd969ec94128f5f749ccddfa9f62e5d3",name:"subtitle"})),s("div",{key:"ddeff9dcacc42028d272298371c721ce00039176",class:"s-accordion-head-wrapper-end"},s("slot",{key:"daa4d8c9db6484f3fc67cf855250c5bc3cc59314",name:"notification"}),this.collapsible&&s("button",{key:"2bcc66dc07c3ae1ea9a31fbd0c7b8204f1eca2be",class:{"s-accordion-head-wrapper-toggle":true,active:!this.collapsed},onClick:a=>{a.stopPropagation();this.toggleCollapse()}},s("span",{key:"2853844a2fbc662c002f7e2cacb299874c9debb3",class:"s-accordion-head-wrapper-toggle-icon",innerHTML:this.collapsed?d:o}))))}get host(){return t(this)}};l.style=i;export{l as salla_accordion_head};
5
- //# sourceMappingURL=p-94056702.entry.js.map
4
+ import{r as a,c,h as s,H as e,g as t}from"./p-iZNAXsJF.js";import{p as d,m as i}from"./p-DfeagqF1.js";const o="";const l=class{constructor(s){a(this,s);this.accordionToggle=c(this,"accordionToggle");this.collapsible=false;this.collapsed=true}emitCollapsePanel(){this.accordionToggle.emit({payload:{collapsed:this.collapsed}})}toggleCollapse(){var a,c,s;if(!this.collapsible)return;this.collapsed=!this.collapsed;(a=this.host.parentElement)===null||a===void 0?void 0:a.setAttribute("data-collapsed",this.collapsed.toString());(s=(c=this.host.parentElement)===null||c===void 0?void 0:c.querySelector("salla-accordion-body"))===null||s===void 0?void 0:s.setAttribute("data-collapsed",this.collapsed.toString());this.emitCollapsePanel()}render(){return s(e,{key:"9bb7ad4ad615f5316968b48839b2433619bd3850","data-collapsed":this.collapsed.toString(),onClick:()=>this.toggleCollapse(),class:"s-accordion-head-wrapper"},s("div",{key:"6826492e1c552440d6407435dfe4e0ca3915cdf4",class:"s-accordion-head-wrapper-start"},s("slot",{key:"2c19c500b57444ac8f69c2f64616904a819f54da",name:"title"}),s("slot",{key:"a6ed0daccd969ec94128f5f749ccddfa9f62e5d3",name:"subtitle"})),s("div",{key:"ddeff9dcacc42028d272298371c721ce00039176",class:"s-accordion-head-wrapper-end"},s("slot",{key:"daa4d8c9db6484f3fc67cf855250c5bc3cc59314",name:"notification"}),this.collapsible&&s("button",{key:"2bcc66dc07c3ae1ea9a31fbd0c7b8204f1eca2be",class:{"s-accordion-head-wrapper-toggle":true,active:!this.collapsed},onClick:a=>{a.stopPropagation();this.toggleCollapse()}},s("span",{key:"2853844a2fbc662c002f7e2cacb299874c9debb3",class:"s-accordion-head-wrapper-toggle-icon",innerHTML:this.collapsed?d:i}))))}get host(){return t(this)}};l.style=o;export{l as salla_accordion_head};
5
+ //# sourceMappingURL=p-f75b098c.entry.js.map