@salla.sa/twilight-components 2.14.539 → 2.14.541

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 (401) hide show
  1. package/dist/cjs/{filepond-CIpOpiw6.js → filepond-CNdvfaMJ.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-CPV_SZrj.js → filepond-plugin-file-poster-Di_D3w89.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-C_XGylG1.js → filepond-plugin-file-validate-size-BiRa98qd.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-CmVS48lk.js → filepond-plugin-file-validate-type-Bolv-kyJ.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-KfqhH5F9.js → filepond-plugin-image-edit-AN6huMV9.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BfRIDxO-.js → filepond-plugin-image-exif-orientation-Bwa8QtGo.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-DlvO4sHZ.js → filepond-plugin-image-preview-CaVYLAvG.js} +1 -1
  8. package/dist/cjs/helpers-ClOJIAG8.js +89 -0
  9. package/dist/cjs/{index-CMDyFi6Q.js → index-DX2EKTCE.js} +18 -14
  10. package/dist/cjs/{intlTelInput-BK34b4sR.js → intlTelInput-DnwdGAiP.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/{salla-booking-field_7.cjs.entry.js → salla-attachment-view_9.cjs.entry.js} +1003 -40
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +2 -2
  28. package/dist/cjs/salla-comment-form_8.cjs.entry.js +14 -5
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +303 -26
  32. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +420 -84
  85. package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -5
  86. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +4 -83
  87. package/dist/cjs/salla-review-order-item.cjs.entry.js +125 -0
  88. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  104. package/dist/cjs/twilight.cjs.js +2 -2
  105. package/dist/cjs/upload-limits-C3RarAPN.js +136 -0
  106. package/dist/cjs/{vanilla-picker-DYTpjTDj.js → vanilla-picker-BUFYPi-_.js} +1 -1
  107. package/dist/collection/collection-manifest.json +16 -11
  108. package/dist/collection/components/salla-attachment-view/salla-attachment-view.css +164 -0
  109. package/dist/collection/components/salla-attachment-view/salla-attachment-view.js +250 -0
  110. package/dist/collection/components/salla-attachments/salla-attachments.css +69 -0
  111. package/dist/collection/components/salla-attachments/salla-attachments.js +375 -0
  112. package/dist/collection/components/salla-comments/salla-comment-item.js +13 -3
  113. package/dist/collection/components/salla-comments/salla-comments.css +7 -0
  114. package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +206 -56
  115. package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +322 -30
  116. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  117. package/dist/collection/components/salla-file-upload/salla-file-upload.css +149 -0
  118. package/dist/collection/components/salla-file-upload/salla-file-upload.js +784 -42
  119. package/dist/collection/components/salla-file-upload/upload-limits.js +127 -0
  120. package/dist/collection/components/salla-products-slider/salla-products-slider.js +1 -1
  121. package/dist/collection/components/salla-rating-modal/rating-modal-media.js +85 -0
  122. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +348 -85
  123. package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +17 -7
  124. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +1 -3
  125. package/dist/collection/components/salla-review-factors-tags/helpers.js +8 -7
  126. package/dist/collection/components/salla-review-order-item/interfaces.js +1 -0
  127. package/dist/collection/components/salla-review-order-item/salla-review-order-item.js +154 -0
  128. package/dist/components/index.js +2 -2
  129. package/dist/components/salla-add-product-button2.js +40 -28
  130. package/dist/components/salla-attachment-view.d.ts +11 -0
  131. package/dist/components/salla-attachment-view.js +9 -0
  132. package/dist/components/salla-attachment-view2.js +323 -0
  133. package/dist/components/salla-attachments.d.ts +11 -0
  134. package/dist/components/salla-attachments.js +9 -0
  135. package/dist/components/salla-attachments2.js +232 -0
  136. package/dist/components/salla-basket-gap.js +46 -34
  137. package/dist/components/salla-breadcrumb.js +1 -1
  138. package/dist/components/salla-comment-factors2.js +1 -1
  139. package/dist/components/salla-comment-item2.js +26 -4
  140. package/dist/components/salla-comments.js +14 -2
  141. package/dist/components/salla-cookies-bar.js +319 -27
  142. package/dist/components/salla-custom-fields.js +28 -4
  143. package/dist/components/salla-file-upload2.js +703 -31
  144. package/dist/components/salla-gifting.js +7 -1
  145. package/dist/components/salla-loyalty-exchange-product-card2.js +46 -34
  146. package/dist/components/salla-loyalty-panel.js +8 -2
  147. package/dist/components/salla-loyalty-program.js +8 -2
  148. package/dist/components/salla-multiple-bundle-product-cart2.js +40 -28
  149. package/dist/components/salla-multiple-bundle-product-details2.js +12 -6
  150. package/dist/components/salla-multiple-bundle-product-options-modal2.js +7 -1
  151. package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
  152. package/dist/components/salla-multiple-bundle-product.js +12 -6
  153. package/dist/components/salla-offer-modal.js +8 -2
  154. package/dist/components/salla-order-edit-item2.js +36 -24
  155. package/dist/components/salla-order-edit.js +42 -30
  156. package/dist/components/salla-order-options-modal2.js +34 -22
  157. package/dist/components/salla-product-card2.js +44 -32
  158. package/dist/components/salla-product-options2.js +32 -20
  159. package/dist/components/salla-products-slider2.js +8 -2
  160. package/dist/components/salla-quick-buy2.js +36 -24
  161. package/dist/components/salla-rating-modal-v22.js +449 -97
  162. package/dist/components/salla-rating-modal.js +30 -20
  163. package/dist/components/salla-review-factors-tags2.js +9 -8
  164. package/dist/components/salla-review-order-item.d.ts +11 -0
  165. package/dist/components/salla-review-order-item.js +196 -0
  166. package/dist/components/salla-reward-details2.js +8 -2
  167. package/dist/components/salla-slider2.js +1 -1
  168. package/dist/esm/{filepond-DMUE9Fyj.js → filepond-CKsbRWmS.js} +1 -1
  169. package/dist/esm/{filepond-plugin-file-poster-DBZQTm7s.js → filepond-plugin-file-poster-B_gYCESq.js} +1 -1
  170. package/dist/esm/{filepond-plugin-file-validate-size-CrKxdsNW.js → filepond-plugin-file-validate-size-Bep6fNi3.js} +1 -1
  171. package/dist/esm/{filepond-plugin-file-validate-type-DvEJrucY.js → filepond-plugin-file-validate-type-r3uRmGIr.js} +1 -1
  172. package/dist/esm/{filepond-plugin-image-edit-C6ptCg9o.js → filepond-plugin-image-edit-BJcOlOFL.js} +1 -1
  173. package/dist/esm/{filepond-plugin-image-exif-orientation-IcgeTieF.js → filepond-plugin-image-exif-orientation-DJoDaRwQ.js} +1 -1
  174. package/dist/esm/{filepond-plugin-image-preview-CDMh74os.js → filepond-plugin-image-preview-BsuTLPS0.js} +1 -1
  175. package/dist/esm/helpers-DqXpn47Z.js +85 -0
  176. package/dist/esm/{index-CjQzkU95.js → index-BVqCTDsV.js} +18 -14
  177. package/dist/esm/{intlTelInput-Dsx2z7pR.js → intlTelInput-CD2FA0nI.js} +1 -1
  178. package/dist/esm/loader.js +3 -3
  179. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  180. package/dist/esm/salla-accordion_6.entry.js +1 -1
  181. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  182. package/dist/esm/salla-advertisement.entry.js +1 -1
  183. package/dist/esm/salla-alert_2.entry.js +1 -1
  184. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  185. package/dist/esm/salla-apps-icons.entry.js +1 -1
  186. package/dist/esm/{salla-booking-field_7.entry.js → salla-attachment-view_9.entry.js} +1002 -41
  187. package/dist/esm/salla-badge.entry.js +1 -1
  188. package/dist/esm/salla-basket-gap.entry.js +1 -1
  189. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  190. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  191. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  192. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  193. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  194. package/dist/esm/salla-comment-factors.entry.js +2 -2
  195. package/dist/esm/salla-comment-form_8.entry.js +14 -5
  196. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  197. package/dist/esm/salla-contacts.entry.js +1 -1
  198. package/dist/esm/salla-cookies-bar.entry.js +303 -26
  199. package/dist/esm/salla-count-down.entry.js +1 -1
  200. package/dist/esm/salla-custom-fields.entry.js +1 -1
  201. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  202. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  203. package/dist/esm/salla-filters-widget.entry.js +1 -1
  204. package/dist/esm/salla-filters.entry.js +1 -1
  205. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  206. package/dist/esm/salla-gifting.entry.js +1 -1
  207. package/dist/esm/salla-hook.entry.js +1 -1
  208. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  209. package/dist/esm/salla-installment.entry.js +1 -1
  210. package/dist/esm/salla-list-tile.entry.js +1 -1
  211. package/dist/esm/salla-localization-modal.entry.js +1 -1
  212. package/dist/esm/salla-login-modal.entry.js +1 -1
  213. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  214. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  215. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  216. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  217. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  218. package/dist/esm/salla-loyalty.entry.js +1 -1
  219. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  220. package/dist/esm/salla-map_2.entry.js +1 -1
  221. package/dist/esm/salla-menu.entry.js +1 -1
  222. package/dist/esm/salla-metadata.entry.js +1 -1
  223. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  224. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  225. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  226. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  227. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  228. package/dist/esm/salla-offer-modal.entry.js +1 -1
  229. package/dist/esm/salla-offer.entry.js +1 -1
  230. package/dist/esm/salla-order-branch.entry.js +1 -1
  231. package/dist/esm/salla-order-cancel.entry.js +1 -1
  232. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  233. package/dist/esm/salla-order-details-options.entry.js +1 -1
  234. package/dist/esm/salla-order-details.entry.js +1 -1
  235. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  236. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  237. package/dist/esm/salla-order-edit.entry.js +1 -1
  238. package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
  239. package/dist/esm/salla-order-shipments.entry.js +1 -1
  240. package/dist/esm/salla-order-summary.entry.js +1 -1
  241. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  242. package/dist/esm/salla-orders.entry.js +1 -1
  243. package/dist/esm/salla-payments.entry.js +1 -1
  244. package/dist/esm/salla-placeholder.entry.js +1 -1
  245. package/dist/esm/salla-price-range.entry.js +1 -1
  246. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  247. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  248. package/dist/esm/salla-products-list.entry.js +1 -1
  249. package/dist/esm/salla-products-slider.entry.js +1 -1
  250. package/dist/esm/salla-quick-order.entry.js +1 -1
  251. package/dist/esm/salla-rating-modal-v2.entry.js +420 -84
  252. package/dist/esm/salla-rating-modal.entry.js +3 -5
  253. package/dist/esm/salla-review-factors-tags.entry.js +2 -81
  254. package/dist/esm/salla-review-order-item.entry.js +123 -0
  255. package/dist/esm/salla-scopes.entry.js +1 -1
  256. package/dist/esm/salla-search.entry.js +1 -1
  257. package/dist/esm/salla-skeleton.entry.js +1 -1
  258. package/dist/esm/salla-slider.entry.js +1 -1
  259. package/dist/esm/salla-social-share.entry.js +1 -1
  260. package/dist/esm/salla-social.entry.js +1 -1
  261. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  262. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  263. package/dist/esm/salla-tooltip.entry.js +1 -1
  264. package/dist/esm/salla-trust-badges.entry.js +1 -1
  265. package/dist/esm/salla-user-menu.entry.js +1 -1
  266. package/dist/esm/salla-user-profile.entry.js +1 -1
  267. package/dist/esm/salla-user-settings.entry.js +1 -1
  268. package/dist/esm/salla-verify.entry.js +1 -1
  269. package/dist/esm/salla-wallet.entry.js +1 -1
  270. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  271. package/dist/esm/twilight.js +3 -3
  272. package/dist/esm/upload-limits-DrXX8XG8.js +121 -0
  273. package/dist/esm/{vanilla-picker-oYjMgYry.js → vanilla-picker-Ba_za9Iy.js} +1 -1
  274. package/dist/twilight/{p-49e6fe86.entry.js → p-003499a8.entry.js} +1 -1
  275. package/dist/twilight/{p-58184ae2.entry.js → p-0974f6c6.entry.js} +1 -1
  276. package/dist/twilight/{p-3052178c.entry.js → p-0a9093f1.entry.js} +1 -1
  277. package/dist/twilight/{p-cb179aba.entry.js → p-0ce2c41f.entry.js} +1 -1
  278. package/dist/twilight/{p-bbe79568.entry.js → p-0ea8365b.entry.js} +1 -1
  279. package/dist/twilight/p-1174e53e.entry.js +4 -0
  280. package/dist/twilight/{p-fe7990b7.entry.js → p-11ef8b82.entry.js} +1 -1
  281. package/dist/twilight/{p-dd5800dd.entry.js → p-13244c52.entry.js} +1 -1
  282. package/dist/twilight/{p-187a502c.entry.js → p-14689252.entry.js} +1 -1
  283. package/dist/twilight/{p-48db7b95.entry.js → p-17940d8a.entry.js} +1 -1
  284. package/dist/twilight/{p-a802826b.entry.js → p-1974f6da.entry.js} +1 -1
  285. package/dist/twilight/{p-250d7ab2.entry.js → p-1a191989.entry.js} +1 -1
  286. package/dist/twilight/{p-1d2804ac.entry.js → p-1ec6e0fe.entry.js} +1 -1
  287. package/dist/twilight/{p-5bbf829e.entry.js → p-1fcebaad.entry.js} +1 -1
  288. package/dist/twilight/{p-51a860bc.entry.js → p-2b0cf190.entry.js} +1 -1
  289. package/dist/twilight/{p-68c8772a.entry.js → p-333ea76b.entry.js} +1 -1
  290. package/dist/twilight/{p-8ef3693b.entry.js → p-337cc9f6.entry.js} +1 -1
  291. package/dist/twilight/{p-f7298462.entry.js → p-34d5c7bf.entry.js} +1 -1
  292. package/dist/twilight/{p-b1812d5c.entry.js → p-36abc50f.entry.js} +1 -1
  293. package/dist/twilight/{p-a1494e64.entry.js → p-37d9f762.entry.js} +1 -1
  294. package/dist/twilight/{p-5e9fb02d.entry.js → p-3961522a.entry.js} +1 -1
  295. package/dist/twilight/{p-1754903f.entry.js → p-39d9e02f.entry.js} +1 -1
  296. package/dist/twilight/{p-152c657e.entry.js → p-3a4bb8de.entry.js} +1 -1
  297. package/dist/twilight/{p-7c74dc6e.entry.js → p-409f95a8.entry.js} +1 -1
  298. package/dist/twilight/{p-3bc64439.entry.js → p-42952fac.entry.js} +1 -1
  299. package/dist/twilight/{p-0a1271e1.entry.js → p-436dfe93.entry.js} +1 -1
  300. package/dist/twilight/{p-44cfb2c2.entry.js → p-50c90e0a.entry.js} +1 -1
  301. package/dist/twilight/{p-31c36417.entry.js → p-5115117b.entry.js} +1 -1
  302. package/dist/twilight/{p-1fb46b43.entry.js → p-56647774.entry.js} +1 -1
  303. package/dist/twilight/{p-e020f1c3.entry.js → p-598cadf4.entry.js} +1 -1
  304. package/dist/twilight/{p-331679d8.entry.js → p-635265d1.entry.js} +1 -1
  305. package/dist/twilight/{p-1470e96a.entry.js → p-659e2280.entry.js} +1 -1
  306. package/dist/twilight/p-6a3487de.entry.js +4 -0
  307. package/dist/twilight/{p-1c31cec0.entry.js → p-6d07d195.entry.js} +1 -1
  308. package/dist/twilight/{p-91b4a1a0.entry.js → p-6ee096e8.entry.js} +1 -1
  309. package/dist/twilight/{p-37413a02.entry.js → p-723aeda4.entry.js} +1 -1
  310. package/dist/twilight/{p-ae536a61.entry.js → p-743b79ae.entry.js} +1 -1
  311. package/dist/twilight/{p-b193c991.entry.js → p-75e692d1.entry.js} +1 -1
  312. package/dist/twilight/{p-9c7fcbb0.entry.js → p-79444897.entry.js} +1 -1
  313. package/dist/twilight/{p-6ed4c9bb.entry.js → p-7b23dec7.entry.js} +1 -1
  314. package/dist/twilight/p-7bb24ad6.entry.js +4 -0
  315. package/dist/twilight/{p-c254b6fa.entry.js → p-7d9288b0.entry.js} +1 -1
  316. package/dist/twilight/{p-82c12191.entry.js → p-85f95a58.entry.js} +1 -1
  317. package/dist/twilight/{p-67e88dc4.entry.js → p-86a1f616.entry.js} +1 -1
  318. package/dist/twilight/{p-80ff5572.entry.js → p-87115499.entry.js} +1 -1
  319. package/dist/twilight/{p-cc2b960c.entry.js → p-878c2be2.entry.js} +1 -1
  320. package/dist/twilight/{p-b69e98a8.entry.js → p-89e9a91f.entry.js} +1 -1
  321. package/dist/twilight/{p-2e112687.entry.js → p-90ee37c7.entry.js} +1 -1
  322. package/dist/twilight/{p-aeb76c46.entry.js → p-96584590.entry.js} +1 -1
  323. package/dist/twilight/{p-1dd1fef0.entry.js → p-96a57e9c.entry.js} +1 -1
  324. package/dist/twilight/{p-1c369bcf.entry.js → p-978e4164.entry.js} +1 -1
  325. package/dist/twilight/{p-4058b619.entry.js → p-97fc57c1.entry.js} +1 -1
  326. package/dist/twilight/p-98b1ff35.entry.js +4 -0
  327. package/dist/twilight/{p-5d01f25c.entry.js → p-9d18525b.entry.js} +1 -1
  328. package/dist/twilight/{p-CmQyEOxJ.js → p-B83s3cRn.js} +2 -2
  329. package/dist/twilight/{p-CjQzkU95.js → p-BVqCTDsV.js} +1 -1
  330. package/dist/twilight/{p-BtymczNp.js → p-CP29f7RQ.js} +1 -1
  331. package/dist/twilight/{p-C6w35AiQ.js → p-CS-t4QAX.js} +1 -1
  332. package/dist/twilight/{p-BiyhYWus.js → p-Cluq3aDa.js} +1 -1
  333. package/dist/twilight/{p-DfJdKB52.js → p-D-zqM6k8.js} +1 -1
  334. package/dist/twilight/{p-CGDRqU6i.js → p-DJmqmO68.js} +1 -1
  335. package/dist/twilight/{p-D2uiOzVz.js → p-DgwK96eP.js} +1 -1
  336. package/dist/twilight/p-DqXpn47Z.js +4 -0
  337. package/dist/twilight/p-DrXX8XG8.js +4 -0
  338. package/dist/twilight/{p-C1wu6qA1.js → p-DzW3U8TR.js} +1 -1
  339. package/dist/twilight/{p-B9VKgTTF.js → p-JKh0XFIn.js} +1 -1
  340. package/dist/twilight/{p-699bea26.entry.js → p-a347e701.entry.js} +1 -1
  341. package/dist/twilight/{p-9fa351ab.entry.js → p-a5d08af6.entry.js} +1 -1
  342. package/dist/twilight/{p-8230c543.entry.js → p-a774f6f0.entry.js} +7 -7
  343. package/dist/twilight/p-afaa0fbe.entry.js +4 -0
  344. package/dist/twilight/p-b389b1d3.entry.js +4 -0
  345. package/dist/twilight/{p-298ff716.entry.js → p-b6d5ae9b.entry.js} +1 -1
  346. package/dist/twilight/{p-b0e86201.entry.js → p-b862c670.entry.js} +1 -1
  347. package/dist/twilight/{p-2e43ddf0.entry.js → p-bab59319.entry.js} +1 -1
  348. package/dist/twilight/{p-437fe6f1.entry.js → p-bf4c2184.entry.js} +1 -1
  349. package/dist/twilight/{p-7f73ff43.entry.js → p-c19cf93c.entry.js} +1 -1
  350. package/dist/twilight/{p-3f26f1c5.entry.js → p-c34f8c08.entry.js} +1 -1
  351. package/dist/twilight/{p-116e7555.entry.js → p-c47ecca7.entry.js} +1 -1
  352. package/dist/twilight/{p-84f35767.entry.js → p-c48f5c6b.entry.js} +1 -1
  353. package/dist/twilight/{p-40217fcc.entry.js → p-c53c2f59.entry.js} +1 -1
  354. package/dist/twilight/{p-1151ebd7.entry.js → p-cd805a38.entry.js} +1 -1
  355. package/dist/twilight/{p-4868c03c.entry.js → p-cdd8ed7f.entry.js} +1 -1
  356. package/dist/twilight/{p-9b6db6a7.entry.js → p-ced4b7ac.entry.js} +1 -1
  357. package/dist/twilight/{p-a3f00389.entry.js → p-cf3365e2.entry.js} +1 -1
  358. package/dist/twilight/p-d78998b7.entry.js +4 -0
  359. package/dist/twilight/{p-665bca88.entry.js → p-daea3207.entry.js} +1 -1
  360. package/dist/twilight/{p-664f0936.entry.js → p-dff6d623.entry.js} +1 -1
  361. package/dist/twilight/p-e04221de.entry.js +4 -0
  362. package/dist/twilight/{p-db02986a.entry.js → p-e2934193.entry.js} +1 -1
  363. package/dist/twilight/{p-14c72ffd.entry.js → p-e3dab961.entry.js} +1 -1
  364. package/dist/twilight/{p-bf183f3a.entry.js → p-e41e5fc7.entry.js} +1 -1
  365. package/dist/twilight/{p-5b03dca8.entry.js → p-e4c9cef4.entry.js} +1 -1
  366. package/dist/twilight/{p-27a0a4cc.entry.js → p-eaf9d536.entry.js} +1 -1
  367. package/dist/twilight/{p-a669483e.entry.js → p-ee2b16d7.entry.js} +1 -1
  368. package/dist/twilight/{p-fa28a89f.entry.js → p-ee3ddc23.entry.js} +1 -1
  369. package/dist/twilight/{p-54d0db9a.entry.js → p-f0a14b18.entry.js} +1 -1
  370. package/dist/twilight/{p-8fa84b87.entry.js → p-f195a63d.entry.js} +1 -1
  371. package/dist/twilight/{p-997c4966.entry.js → p-f2c688d6.entry.js} +1 -1
  372. package/dist/twilight/{p-2c6c0844.entry.js → p-f4ac8cae.entry.js} +1 -1
  373. package/dist/twilight/{p-2babb4bd.entry.js → p-f58d14ed.entry.js} +1 -1
  374. package/dist/twilight/{p-3bdba697.entry.js → p-f82cee0c.entry.js} +1 -1
  375. package/dist/twilight/{p-8ae7bf96.entry.js → p-fa17989b.entry.js} +1 -1
  376. package/dist/twilight/{p-b3fe5e44.entry.js → p-fbc075fe.entry.js} +1 -1
  377. package/dist/twilight/{p-3b6b3c54.entry.js → p-fc5d5473.entry.js} +1 -1
  378. package/dist/twilight/twilight.esm.js +1 -1
  379. package/dist/types/components/salla-attachment-view/salla-attachment-view.d.ts +47 -0
  380. package/dist/types/components/salla-attachments/salla-attachments.d.ts +73 -0
  381. package/dist/types/components/salla-comments/interfaces.d.ts +1 -0
  382. package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
  383. package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +117 -12
  384. package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +127 -4
  385. package/dist/types/components/salla-file-upload/upload-limits.d.ts +49 -0
  386. package/dist/types/components/salla-rating-modal/rating-modal-media.d.ts +38 -0
  387. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +30 -7
  388. package/dist/types/components/salla-review-factors-tags/helpers.d.ts +1 -1
  389. package/dist/types/components/salla-review-factors-tags/interfaces.d.ts +7 -0
  390. package/dist/types/components/salla-review-order-item/interfaces.d.ts +30 -0
  391. package/dist/types/components/salla-review-order-item/salla-review-order-item.d.ts +30 -0
  392. package/dist/types/components.d.ts +286 -11
  393. package/package.json +6 -6
  394. package/dist/twilight/p-236f371d.entry.js +0 -4
  395. package/dist/twilight/p-3c22551b.entry.js +0 -4
  396. package/dist/twilight/p-8bce41c8.entry.js +0 -4
  397. package/dist/twilight/p-e701a3dc.entry.js +0 -4
  398. package/dist/twilight/p-f1eebeda.entry.js +0 -4
  399. package/dist/twilight/p-f4bdf19e.entry.js +0 -4
  400. package/dist/twilight/p-faaf4423.entry.js +0 -4
  401. package/dist/components/{keyboard_arrow_right.js → keyboard_arrow_left.js} +6 -6
@@ -8,13 +8,15 @@ import { H as Helper } from './Helper.js';
8
8
  import { I as ImageIcon } from './image.js';
9
9
  import { W as WhatsappIcon } from './whatsapp2.js';
10
10
  import { M as MailIcon } from './mail.js';
11
- import { d as defineCustomElement$7 } from './salla-button2.js';
12
- import { d as defineCustomElement$6 } from './salla-file-upload2.js';
13
- import { d as defineCustomElement$5 } from './salla-loading2.js';
14
- import { d as defineCustomElement$4 } from './salla-modal2.js';
15
- import { d as defineCustomElement$3 } from './salla-placeholder2.js';
16
- import { d as defineCustomElement$2 } from './salla-rating-stars2.js';
17
- import { d as defineCustomElement$1 } from './salla-skeleton2.js';
11
+ import { d as defineCustomElement$9, l as buildMediaUploadAccept } from './salla-attachment-view2.js';
12
+ import { d as defineCustomElement$8 } from './salla-button2.js';
13
+ import { d as defineCustomElement$7 } from './salla-file-upload2.js';
14
+ import { d as defineCustomElement$6 } from './salla-loading2.js';
15
+ import { d as defineCustomElement$5 } from './salla-modal2.js';
16
+ import { d as defineCustomElement$4 } from './salla-placeholder2.js';
17
+ import { d as defineCustomElement$3 } from './salla-rating-stars2.js';
18
+ import { d as defineCustomElement$2 } from './salla-skeleton2.js';
19
+ import { d as defineCustomElement$1 } from './salla-slider2.js';
18
20
 
19
21
  var ShippingFast = `<!-- Generated by IcoMoon.io -->
20
22
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -23,7 +25,90 @@ var ShippingFast = `<!-- Generated by IcoMoon.io -->
23
25
  </svg>
24
26
  `;
25
27
 
26
- const sallaRatingModalCss = "/*!twlt*/.s-rating-modal-product-details{padding-bottom:0.5rem}.s-rating-modal-comment{margin-top:0.35rem}.s-rating-modal-product{margin-bottom:1rem}.s-rating-modal-product-img{position:absolute !important;inset:0;display:block;width:100% !important;max-width:100% !important;height:100% !important;object-fit:cover}.s-rating-modal-product-title{font-size:0.95rem;font-weight:600;line-height:1.5;margin:0}.s-rating-modal-stars-product{margin-top:0.5rem}.s-rating-modal-loyalty-points-note-container{display:flex;align-items:center;gap:0.625rem;width:100%;margin-top:1.5rem;margin-bottom:0.75rem;padding:0.75rem;border-radius:0.5rem;background-color:#E6F4EA}.s-rating-modal-loyalty-points-note-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;color:#1B7F5C}.s-rating-modal-loyalty-points-note-icon svg{width:1.5rem;height:1.5rem;fill:currentColor}.s-rating-modal-loyalty-points-note-text{flex:1;margin:0;font-size:0.875rem;line-height:1.25rem;color:#1f2937}.s-rating-modal-product-details-main{display:flex;align-items:center;margin-bottom:0.5rem;padding-bottom:0;border-bottom:0}.s-rating-modal-product-info-row{display:flex;align-items:center;gap:0.6rem;margin-bottom:0.5rem;padding-bottom:0;border-bottom:0}.s-rating-modal-product-main-review{width:100%;text-align:right}.s-rating-modal-product-rating-rows{display:grid;gap:0.45rem;margin:0.2rem 0 0.7rem}.s-rating-modal-product-rating-row{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;min-height:2rem}.s-rating-modal-product-rating-row salla-rating-stars{flex-shrink:0}.s-rating-modal-product-rating-row .s-rating-stars-wrapper{align-items:center;min-height:1.75rem}.s-rating-modal-product-rating-row .s-rating-stars-label,.s-rating-modal-product-rating-row .s-rating-stars-label-without-tag{min-width:auto;min-height:1.25rem;line-height:1.25rem;font-size:0.8rem;color:#5b6470;white-space:nowrap;text-align:end;transition:opacity 0.15s ease}.s-rating-modal-product-rating-row .s-rating-stars-label--empty,.s-rating-modal-product-rating-row .s-rating-stars-label-without-tag--empty{opacity:0}.s-rating-modal-product-rating-row-main{margin-bottom:0.35rem;padding:0.5rem 0.6rem;border:1px solid #d1d5db;border-radius:0.45rem;background:transparent}.s-rating-modal-product-factor-name{color:#5b6470;font-size:0.9rem;line-height:1.25}.s-rating-modal-product-rating-row-main .s-rating-modal-product-factor-name{font-size:1rem;color:#5b6470}.s-rating-modal-product-factor-required{color:#f87171;margin-inline-start:0.2rem}.s-rating-modal-product-img-wrap{position:relative;width:5rem !important;min-width:5rem !important;max-width:5rem !important;height:3.5rem !important;flex-shrink:0 !important;overflow:hidden;border-radius:0.375rem;background:#f3f4f6}.s-rating-modal-uploader.is-opened{height:auto !important;opacity:1 !important;overflow:visible !important;pointer-events:auto !important;margin-bottom:1rem}.mt-0{margin-top:0px}.block{display:block}.hidden{display:none}.px-3{padding-left:0.75rem;padding-right:0.75rem}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-comments-item-like-btn{margin-top:0.5rem}.s-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-comments-item-like-btn span svg{height:0.75rem;width:0.75rem}.s-rating-modal-wrapper{margin-bottom:1.5rem;transition-property:all;transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-rating-modal-edit-wrapper{margin-top:0.625rem}.s-rating-modal-footer{position:relative;display:flex;align-items:center;justify-content:space-between}.s-rating-modal-footer salla-button button{padding-left:1rem !important;padding-right:1rem !important;font-size:0.75rem !important}.s-rating-modal-btn{height:2.5rem;padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-btn:hover{color:var(--color-primary-dark)}.s-rating-modal-dots{display:flex;flex-shrink:0;flex-grow:1;justify-content:center}.s-rating-modal-dots>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.375rem * var(--tw-space-x-reverse));margin-left:calc(0.375rem * calc(1 - var(--tw-space-x-reverse)))}.s-rating-modal-dots{text-align:center}.s-rating-modal-dots:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-step-dot{height:0.625rem;width:0.625rem;border-radius:9999px;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-step{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-rating-modal-active{--tw-translate-x:0px;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.s-rating-modal-unactive{--tw-translate-x:0.75rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0}.s-rating-modal-hidden{display:none !important}.s-rating-modal-unvisiable{pointer-events:none;opacity:0}.s-rating-modal-step-wrap{position:relative;display:flex;flex-direction:column;align-items:center;padding-bottom:1rem}.s-rating-modal-product-details{position:relative;display:flex;flex:1 1 0%;flex-direction:column;padding-bottom:1rem}.s-rating-modal-product-details-main{display:flex;align-items:flex-start;justify-content:space-between}.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0.375rem;flex-direction:column;align-items:center}@media (min-width: 640px){.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0px;flex-direction:row;gap:0px}}.s-rating-modal-rounded-icon{margin-bottom:1rem;display:flex;height:7rem;width:7rem;align-items:center;justify-content:center;overflow:hidden;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-rating-modal-title{margin-bottom:1rem;font-size:1.125rem;line-height:1.75rem;font-weight:700}.s-rating-modal-store-logo{width:4rem;object-fit:contain}.s-rating-modal-shipping-logo{height:100%;width:100%;object-fit:contain}.s-rating-modal-shipping-icon{font-size:3rem;line-height:1;color:var(--color-primary)}.s-rating-modal-comment{margin-bottom:0.5rem;height:5rem !important;width:100%;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:0.75rem;font-size:0.875rem;line-height:1.25rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-rating-modal-comment:focus{border-color:var(--color-primary)}.s-rating-modal-comment:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.s-rating-modal-validation-msg{margin-top:-3px;line-height:1rem;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-rating-modal-product{margin-bottom:1.5rem}.s-rating-modal-product:last-child{margin-bottom:0px}.s-rating-modal-product .rating-outer-form{display:flex}.s-rating-modal-product .rating-outer-form>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}@media (min-width: 640px){.s-rating-modal-product .rating-outer-form>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}}.s-rating-modal-product .rating-outer-form:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-product-img-wrap{height:3.5rem;width:auto;overflow:hidden;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}@media (min-width: 640px){.s-rating-modal-product-img-wrap{width:5rem}}.s-rating-modal-product-img{position:relative;height:100%;width:100%;object-fit:cover;font-size:0px}.s-rating-modal-product-img::before{position:absolute;top:0px;left:0px;height:100%;width:100%;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-rating-modal-product-title{margin-bottom:0.375rem;font-size:0.875rem;font-weight:700;line-height:1.25rem}.s-rating-modal-thanks{padding-left:2rem;padding-right:2rem;text-align:center;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-rating-modal-icon{display:inline-flex;height:5rem;width:5rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));color:var(--color-primary)}.s-rating-modal-icon svg{height:1.75rem;width:1.75rem;fill:var(--color-primary)}.s-rating-modal-thanks-title{margin-top:1rem;font-weight:700}.s-rating-modal-thanks-msg{margin-bottom:1.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-modal-thanks-btn{height:2.5rem;flex:none;display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-thanks-btn:hover{opacity:0.8}.s-rating-modal-thanks-btn{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-rating-modal-thanks-time{margin-top:0.75rem;display:block;height:1.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-modal-stars-company{margin-bottom:1.25rem}.s-rating-modal-stars-company .s-rating-stars-wrapper{flex-direction:column;align-items:center;justify-content:center;gap:0.5rem}.s-rating-modal-stars-product{margin-bottom:0.25rem}.s-rating-modal-upload-count{font-size:0.875rem;line-height:1.25rem;font-weight:500}.s-rating-modal-bg-gray{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-rating-modal-bg-primary{background-color:var(--color-primary)}unicode{unicode-bidi:plaintext}.s-rating-modal-wrap .s-modal-body{position:relative !important}.s-rating-modal-skeleton{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-rating-modal-skeleton salla-skeleton:nth-child(1){margin-bottom:1.25rem}.s-rating-modal-skeleton salla-skeleton:nth-child(2){margin-bottom:0.75rem}.s-rating-modal-skeleton salla-skeleton:nth-child(3){margin-bottom:1.25rem}.s-rating-modal-skeleton salla-skeleton:nth-child(4){margin-bottom:2rem}.s-rating-modal-skeleton-footer{margin-top:1.5rem;display:flex;width:100%;justify-content:flex-end}.s-rating-modal-skeleton-footer salla-skeleton{margin-bottom:0px !important}.s-rating-modal-skeleton-stars{margin-bottom:0.75rem;display:flex;align-items:center}.s-rating-modal-skeleton-stars>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-rating-modal-skeleton-stars:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-skeleton-stars div svg{width:25px;fill:currentColor;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-rating-modal-uploader{height:0px;opacity:0;transition-property:all;transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-rating-modal-uploader.is-opened{margin-bottom:1.5rem}.s-rating-modal-uploader.is-closed{pointer-events:none;z-index:0}.s-rating-modal-uploader .filepond--drop-label{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-rating-modal-uploader .filepond--file-status .filepond--file-status-main{font-size:11px}.s-rating-modal-uploader .filepond--file-info-main{font-size:11px}.s-rating-modal-uploader li[data-filepond-item-state='load-invalid'] .filepond--file-info{display:none}.s-rating-modal-filepond-placeholder-text{font-size:0.75rem !important;line-height:1rem !important}.s-rating-modal-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-rating-modal-filepond-placeholder-icon{margin-bottom:0.25rem}.s-rating-modal-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-rating-modal-contact{margin-bottom:1rem;display:flex;align-items:center;justify-content:space-between;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));padding:0.5rem}.s-rating-modal-contact p{font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-rating-modal-contact-icons{display:flex;align-items:center;gap:0.5rem}.s-rating-modal-contact-icons span{display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.375rem}.s-rating-modal-contact-icons span svg{height:1rem;width:1rem;fill:var(--color-primary)}.s-rating-modal-footer-end{justify-content:flex-end}.s-rating-modal-delete-wrapper{text-align:center}.s-rating-modal-delete-wrapper h3{margin-top:1.25rem;font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-rating-modal-delete-wrapper p{margin-top:1.25rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-rating-modal-delete-actions{margin-top:1.25rem;display:flex;align-items:center;gap:0.625rem}.s-rating-modal-delete-actions salla-button{width:100%}.s-rating-modal-delete-actions salla-button button{width:100%}";
28
+ const MAX_IMAGE_UPLOAD_LIMIT = 10;
29
+ const MAX_VIDEO_UPLOAD_LIMIT = 5;
30
+ const MAX_VIDEO_FILE_SIZE = '100MB';
31
+ const MAX_VIDEO_DURATION = 60;
32
+ const MAX_PARALLEL_UPLOADS = 10;
33
+ function isVideoUrl(url) {
34
+ const pathname = url.split(/[?#]/, 1)[0];
35
+ return /\.(mp4|webm|mov|avi|mkv)$/i.test(pathname);
36
+ }
37
+ function splitMediaUrls(urls) {
38
+ return urls.reduce((acc, url) => {
39
+ if (!url)
40
+ return acc;
41
+ if (isVideoUrl(url)) {
42
+ acc.videos.push(url);
43
+ }
44
+ else {
45
+ acc.images.push(url);
46
+ }
47
+ return acc;
48
+ }, { images: [], videos: [] });
49
+ }
50
+ function getMediaUrlsByType(items) {
51
+ return splitMediaUrls(items.map(item => item?.url || '').filter(Boolean));
52
+ }
53
+ function parseMediaField(value) {
54
+ if (!value)
55
+ return [];
56
+ if (Array.isArray(value))
57
+ return value.filter(Boolean);
58
+ return value
59
+ .split(',')
60
+ .map(url => url.trim())
61
+ .filter(Boolean);
62
+ }
63
+ function countMediaByType(items) {
64
+ return items.reduce((counts, item) => {
65
+ const url = item?.url || '';
66
+ if (isVideoUrl(url)) {
67
+ counts.video += 1;
68
+ }
69
+ else {
70
+ counts.image += 1;
71
+ }
72
+ return counts;
73
+ }, { image: 0, video: 0 });
74
+ }
75
+ function createPreloadedMediaItem(url) {
76
+ return { id: url, url };
77
+ }
78
+ function removeUploadedImage(images, removedId) {
79
+ const normalizedId = String(removedId);
80
+ let removed = false;
81
+ return images.filter(image => {
82
+ const imageId = image?.id !== undefined && image?.id !== null ? String(image.id) : '';
83
+ const imageUrl = String(image?.url ?? '');
84
+ const matches = imageId === normalizedId || imageUrl === normalizedId;
85
+ if (matches) {
86
+ if (removed) {
87
+ return true;
88
+ }
89
+ removed = true;
90
+ return false;
91
+ }
92
+ return true;
93
+ });
94
+ }
95
+ function syncHiddenMediaInputs(imagesInput, videosInput, items) {
96
+ const { images, videos } = getMediaUrlsByType(items);
97
+ if (imagesInput)
98
+ imagesInput.value = images.join(',');
99
+ if (videosInput)
100
+ videosInput.value = videos.join(',');
101
+ }
102
+ function normalizeSubmittedMedia(data, allowAttachImages, allowAttachVideos) {
103
+ if (!allowAttachImages) {
104
+ delete data.images;
105
+ }
106
+ if (!allowAttachVideos) {
107
+ delete data.videos;
108
+ }
109
+ }
110
+
111
+ const sallaRatingModalCss = "/*!twlt*/.s-rating-modal-uploader{overflow:visible}.s-rating-modal-uploader.is-opened{height:auto !important;opacity:1 !important;overflow:visible;pointer-events:auto !important;margin-bottom:1rem}.s-rating-modal-uploader .s-file-upload-gallery{overflow:visible}.s-rating-modal-edit-wrapper,.s-rating-modal-wrapper{transition:height 0.15s ease}.s-rating-modal-product-details{padding-bottom:0.5rem}.s-rating-modal-comment{margin-top:0.35rem}.s-rating-modal-product{margin-bottom:1rem}.s-rating-modal-product-img{position:absolute !important;inset:0;display:block;width:100% !important;max-width:100% !important;height:100% !important;object-fit:cover}.s-rating-modal-product-title{font-size:0.95rem;font-weight:600;line-height:1.5;margin:0}.s-rating-modal-stars-product{margin-top:0.5rem}.s-rating-modal-loyalty-points-note-container{display:flex;align-items:center;gap:0.625rem;width:100%;margin-top:1.5rem;margin-bottom:0.75rem;padding:0.75rem;border-radius:0.5rem;background-color:#E6F4EA}.s-rating-modal-loyalty-points-note-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;color:#1B7F5C}.s-rating-modal-loyalty-points-note-icon svg{width:1.5rem;height:1.5rem;fill:currentColor}.s-rating-modal-loyalty-points-note-text{flex:1;margin:0;font-size:0.875rem;line-height:1.25rem;color:#1f2937}.s-rating-modal-product-details-main{display:flex;align-items:center;margin-bottom:0.5rem;padding-bottom:0;border-bottom:0}.s-rating-modal-product-info-row{display:flex;align-items:center;gap:0.6rem;margin-bottom:0.5rem;padding-bottom:0;border-bottom:0}.s-rating-modal-product-main-review{width:100%;text-align:right}.s-rating-modal-product-rating-rows{display:grid;gap:0.45rem;margin:0.2rem 0 0.7rem}.s-rating-modal-product-rating-row{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;min-height:2rem}.s-rating-modal-product-rating-row salla-rating-stars{flex-shrink:0}.s-rating-modal-product-rating-row .s-rating-stars-wrapper{align-items:center;min-height:1.75rem}.s-rating-modal-product-rating-row .s-rating-stars-label,.s-rating-modal-product-rating-row .s-rating-stars-label-without-tag{min-width:auto;min-height:1.25rem;line-height:1.25rem;font-size:0.8rem;color:#5b6470;white-space:nowrap;text-align:end;transition:opacity 0.15s ease}.s-rating-modal-product-rating-row .s-rating-stars-label--empty,.s-rating-modal-product-rating-row .s-rating-stars-label-without-tag--empty{opacity:0}.s-rating-modal-product-rating-row-main{margin-bottom:0.35rem;padding:0.5rem 0.6rem;border:1px solid #d1d5db;border-radius:0.45rem;background:transparent}.s-rating-modal-product-factor-name{color:#5b6470;font-size:0.9rem;line-height:1.25}.s-rating-modal-product-rating-row-main .s-rating-modal-product-factor-name{font-size:1rem;color:#5b6470}.s-rating-modal-product-factor-required{color:#f87171;margin-inline-start:0.2rem}.s-rating-modal-product-img-wrap{position:relative;width:5rem !important;min-width:5rem !important;max-width:5rem !important;height:3.5rem !important;flex-shrink:0 !important;overflow:hidden;border-radius:0.375rem;background:#f3f4f6}.mt-0{margin-top:0px}.block{display:block}.hidden{display:none}.px-3{padding-left:0.75rem;padding-right:0.75rem}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-comments-item-like-btn{margin-top:0.5rem}.s-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-comments-item-like-btn span svg{height:0.75rem;width:0.75rem}.s-rating-modal-wrapper{margin-bottom:1.5rem;transition-property:all;transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-rating-modal-edit-wrapper{margin-top:0.625rem}.s-rating-modal-footer{position:relative;display:flex;align-items:center;justify-content:space-between}.s-rating-modal-footer salla-button button{padding-left:1rem !important;padding-right:1rem !important;font-size:0.75rem !important}.s-rating-modal-btn{height:2.5rem;padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-btn:hover{color:var(--color-primary-dark)}.s-rating-modal-dots{display:flex;flex-shrink:0;flex-grow:1;justify-content:center}.s-rating-modal-dots>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.375rem * var(--tw-space-x-reverse));margin-left:calc(0.375rem * calc(1 - var(--tw-space-x-reverse)))}.s-rating-modal-dots{text-align:center}.s-rating-modal-dots:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-step-dot{height:0.625rem;width:0.625rem;border-radius:9999px;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-step{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-rating-modal-active{--tw-translate-x:0px;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.s-rating-modal-unactive{--tw-translate-x:0.75rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0}.s-rating-modal-hidden{display:none !important}.s-rating-modal-unvisiable{pointer-events:none;opacity:0}.s-rating-modal-step-wrap{position:relative;display:flex;flex-direction:column;align-items:center;padding-bottom:1rem}.s-rating-modal-product-details{position:relative;display:flex;flex:1 1 0%;flex-direction:column;padding-bottom:1rem}.s-rating-modal-product-details-main{display:flex;align-items:flex-start;justify-content:space-between}.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0.375rem;flex-direction:column;align-items:center}@media (min-width: 640px){.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0px;flex-direction:row;gap:0px}}.s-rating-modal-rounded-icon{margin-bottom:1rem;display:flex;height:7rem;width:7rem;align-items:center;justify-content:center;overflow:hidden;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-rating-modal-title{margin-bottom:1rem;font-size:1.125rem;line-height:1.75rem;font-weight:700}.s-rating-modal-store-logo{width:4rem;object-fit:contain}.s-rating-modal-shipping-logo{height:100%;width:100%;object-fit:contain}.s-rating-modal-shipping-icon{font-size:3rem;line-height:1;color:var(--color-primary)}.s-rating-modal-comment{margin-bottom:0.5rem;height:5rem !important;width:100%;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:0.75rem;font-size:0.875rem;line-height:1.25rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-rating-modal-comment:focus{border-color:var(--color-primary)}.s-rating-modal-comment:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.s-rating-modal-validation-msg{margin-top:-3px;line-height:1rem;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-rating-modal-product{margin-bottom:1.5rem}.s-rating-modal-product:last-child{margin-bottom:0px}.s-rating-modal-product .rating-outer-form{display:flex}.s-rating-modal-product .rating-outer-form>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}@media (min-width: 640px){.s-rating-modal-product .rating-outer-form>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}}.s-rating-modal-product .rating-outer-form:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-product-img-wrap{height:3.5rem;width:auto;overflow:hidden;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}@media (min-width: 640px){.s-rating-modal-product-img-wrap{width:5rem}}.s-rating-modal-product-img{position:relative;height:100%;width:100%;object-fit:cover;font-size:0px}.s-rating-modal-product-img::before{position:absolute;top:0px;left:0px;height:100%;width:100%;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-rating-modal-product-title{margin-bottom:0.375rem;font-size:0.875rem;font-weight:700;line-height:1.25rem}.s-rating-modal-thanks{padding-left:2rem;padding-right:2rem;text-align:center;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-rating-modal-icon{display:inline-flex;height:5rem;width:5rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));color:var(--color-primary)}.s-rating-modal-icon svg{height:1.75rem;width:1.75rem;fill:var(--color-primary)}.s-rating-modal-thanks-title{margin-top:1rem;font-weight:700}.s-rating-modal-thanks-msg{margin-bottom:1.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-modal-thanks-btn{height:2.5rem;flex:none;display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-thanks-btn:hover{opacity:0.8}.s-rating-modal-thanks-btn{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-rating-modal-thanks-time{margin-top:0.75rem;display:block;height:1.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-modal-stars-company{margin-bottom:1.25rem}.s-rating-modal-stars-company .s-rating-stars-wrapper{flex-direction:column;align-items:center;justify-content:center;gap:0.5rem}.s-rating-modal-stars-product{margin-bottom:0.25rem}.s-rating-modal-upload-count{font-size:0.875rem;line-height:1.25rem;font-weight:500}.s-rating-modal-bg-gray{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-rating-modal-bg-primary{background-color:var(--color-primary)}unicode{unicode-bidi:plaintext}.s-rating-modal-wrap .s-modal-body{position:relative !important}.s-rating-modal-skeleton{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-rating-modal-skeleton salla-skeleton:nth-child(1){margin-bottom:1.25rem}.s-rating-modal-skeleton salla-skeleton:nth-child(2){margin-bottom:0.75rem}.s-rating-modal-skeleton salla-skeleton:nth-child(3){margin-bottom:1.25rem}.s-rating-modal-skeleton salla-skeleton:nth-child(4){margin-bottom:2rem}.s-rating-modal-skeleton-footer{margin-top:1.5rem;display:flex;width:100%;justify-content:flex-end}.s-rating-modal-skeleton-footer salla-skeleton{margin-bottom:0px !important}.s-rating-modal-skeleton-stars{margin-bottom:0.75rem;display:flex;align-items:center}.s-rating-modal-skeleton-stars>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-rating-modal-skeleton-stars:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-skeleton-stars div svg{width:25px;fill:currentColor;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-rating-modal-uploader{height:0px;opacity:0;transition-property:all;transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-rating-modal-uploader.is-opened{margin-bottom:1.5rem;overflow:visible}.s-rating-modal-uploader.is-closed{pointer-events:none;z-index:0}.s-rating-modal-uploader .filepond--drop-label{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-rating-modal-uploader .filepond--file-status .filepond--file-status-main{font-size:11px}.s-rating-modal-uploader .filepond--file-info-main{font-size:11px}.s-rating-modal-uploader li[data-filepond-item-state='load-invalid'] .filepond--file-info{display:none}.s-rating-modal-filepond-placeholder-text{font-size:0.75rem !important;line-height:1rem !important}.s-rating-modal-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-rating-modal-filepond-placeholder-icon{margin-bottom:0.25rem}.s-rating-modal-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-rating-modal-contact{margin-bottom:1rem;display:flex;align-items:center;justify-content:space-between;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));padding:0.5rem}.s-rating-modal-contact p{font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-rating-modal-contact-icons{display:flex;align-items:center;gap:0.5rem}.s-rating-modal-contact-icons span{display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.375rem}.s-rating-modal-contact-icons span svg{height:1rem;width:1rem;fill:var(--color-primary)}.s-rating-modal-footer-end{justify-content:flex-end}.s-rating-modal-delete-wrapper{text-align:center}.s-rating-modal-delete-wrapper h3{margin-top:1.25rem;font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-rating-modal-delete-wrapper p{margin-top:1.25rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-rating-modal-delete-actions{margin-top:1.25rem;display:flex;align-items:center;gap:0.625rem}.s-rating-modal-delete-actions salla-button{width:100%}.s-rating-modal-delete-actions salla-button button{width:100%}";
27
112
 
28
113
  const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingModalV2 extends HTMLElement {
29
114
  constructor() {
@@ -31,6 +116,7 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
31
116
  this.__registerHost();
32
117
  this.hasError = false;
33
118
  this.showContactWidget = true;
119
+ this.errorMessage = '';
34
120
  this.images = [];
35
121
  this.productImages = {};
36
122
  this.editItemImages = [];
@@ -45,7 +131,12 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
45
131
  this.shouldOpenDeleteModal = false;
46
132
  this.editItem = null;
47
133
  this.allowAttachImages = false;
134
+ this.allowAttachVideos = false;
48
135
  this.allowContactSupport = false;
136
+ this.uploadCounts = {};
137
+ this.uploadImageCounts = {};
138
+ this.uploadVideoCounts = {};
139
+ this.hasUploadsInProgress = false;
49
140
  this.loyaltyImageRatingPoints = 0;
50
141
  this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
51
142
  this.contactSubjectLabel = salla.lang.get('pages.rating.contact_subject');
@@ -66,13 +157,19 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
66
157
  });
67
158
  this.contentRefs = [];
68
159
  this.hiddenInputs = [];
160
+ this.hiddenVideoInputs = [];
161
+ this.uploadingByProductId = {};
69
162
  this.userFilledFactorKeys = {};
70
163
  this.boundRatingRows = new WeakSet();
71
164
  this.stepsCount = 0;
72
165
  this.currentIndex = 0;
73
166
  this.submitted = [];
74
- this.MAX_UPLOAD_LIMIT = 3;
75
167
  this.thanksCountdownInterval = null;
168
+ this.MAX_IMAGE_UPLOAD_LIMIT = MAX_IMAGE_UPLOAD_LIMIT;
169
+ this.MAX_VIDEO_UPLOAD_LIMIT = MAX_VIDEO_UPLOAD_LIMIT;
170
+ this.MAX_VIDEO_FILE_SIZE = MAX_VIDEO_FILE_SIZE;
171
+ this.MAX_VIDEO_DURATION = MAX_VIDEO_DURATION;
172
+ this.MAX_PARALLEL_UPLOADS = MAX_PARALLEL_UPLOADS;
76
173
  this.scheduleWizardSetup = false;
77
174
  salla.lang.onLoaded(() => {
78
175
  this.contactUsLabel = salla.lang.get('blocks.footer.social');
@@ -103,8 +200,20 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
103
200
  await setNestedAsync('en.trans', 'pages.rating.review_deleted_successfully', 'The review has been successfully deleted.');
104
201
  await setNestedAsync('ar.trans', 'pages.rating.images_count', 'الصور ( :current من أصل :total )');
105
202
  await setNestedAsync('en.trans', 'pages.rating.images_count', 'Images ( :current of :total )');
106
- await setNestedAsync('ar.trans', 'common.uploader.max_three_images', `.أضف ${this.MAX_UPLOAD_LIMIT} صور كحد أقصى`);
107
- await setNestedAsync('en.trans', 'common.uploader.max_three_images', `Add up to ${this.MAX_UPLOAD_LIMIT} images maximum.`);
203
+ await setNestedAsync('ar.trans', 'pages.rating.media_count', 'الصور (:imageCurrent/:imageTotal) · الفيديو (:videoCurrent/:videoTotal)');
204
+ await setNestedAsync('en.trans', 'pages.rating.media_count', 'Images (:imageCurrent/:imageTotal) · Videos (:videoCurrent/:videoTotal)');
205
+ await setNestedAsync('ar.trans', 'common.uploader.allowed_videos_types', 'يُسمح بفيديوهات mp4 أو mov أو avi أو mkv');
206
+ await setNestedAsync('en.trans', 'common.uploader.allowed_videos_types', 'Videos in mp4, mov, avi, or mkv format are allowed.');
207
+ await setNestedAsync('ar.trans', 'pages.rating.videos_count', 'الفيديو ( :current من أصل :total )');
208
+ await setNestedAsync('en.trans', 'pages.rating.videos_count', 'Videos ( :current of :total )');
209
+ await setNestedAsync('ar.trans', 'common.uploader.allowed_media_types', 'يُسمح بصور jpg أو jpeg أو png وفيديوهات mp4 أو mov أو avi أو mkv');
210
+ await setNestedAsync('en.trans', 'common.uploader.allowed_media_types', 'Images in jpg, jpeg, or png and videos in mp4, mov, avi, or mkv are allowed.');
211
+ await setNestedAsync('ar.trans', 'common.uploader.max_three_images', `أضف حتى ${MAX_IMAGE_UPLOAD_LIMIT} صور و ${MAX_VIDEO_UPLOAD_LIMIT} فيديوهات كحد أقصى`);
212
+ await setNestedAsync('en.trans', 'common.uploader.max_three_images', `Add up to ${MAX_IMAGE_UPLOAD_LIMIT} images and ${MAX_VIDEO_UPLOAD_LIMIT} videos maximum.`);
213
+ await setNestedAsync('ar.trans', 'common.uploader.max_images_count', 'أضف :count صور كحد أقصى');
214
+ await setNestedAsync('en.trans', 'common.uploader.max_images_count', 'Add up to :count images maximum.');
215
+ await setNestedAsync('ar.trans', 'common.uploader.max_videos_count', 'أضف :count فيديوهات كحد أقصى');
216
+ await setNestedAsync('en.trans', 'common.uploader.max_videos_count', 'Add up to :count videos maximum.');
108
217
  await setNestedAsync('ar.trans', 'common.elements.confirm_delete', 'تأكيد الحذف');
109
218
  await setNestedAsync('en.trans', 'common.elements.confirm_delete', 'Confirm deletion');
110
219
  await setNestedAsync('ar.trans', 'pages.rating.rate_required_factors', 'يرجى تقييم جميع المعايير لإتمام مراجعتك.');
@@ -114,8 +223,8 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
114
223
  await setNestedAsync('ar.trans', 'pages.rating.loyalty_points_for_images', 'اكسب :points نقطة ولاء عند إضافة صور لتقييمك!');
115
224
  await setNestedAsync('en.trans', 'pages.rating.loyalty_points_for_images', 'Earn :points loyalty points when adding photos to your review!');
116
225
  this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
117
- this.allowedImagesTypesLabel = salla.lang.get('common.uploader.allowed_images_types');
118
- this.threeImagesMax = salla.lang.get('common.uploader.max_three_images');
226
+ this.allowedImagesTypesLabel = this.getAllowedMediaTypesLabel();
227
+ this.threeImagesMax = this.getMaxUploadHintLabel();
119
228
  this.contactSubjectLabel = salla.lang.get('pages.rating.contact_subject');
120
229
  this.editReviewLabel = salla.lang.get('pages.rating.edit_review');
121
230
  this.areYouSureLabel = salla.lang.get('pages.rating.are_you_sure_you_want_to_delete_review');
@@ -142,7 +251,70 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
142
251
  this.orderId = salla.config.get('page.id');
143
252
  }
144
253
  this.allowAttachImages = !!salla.config.get('store.settings.rating.allow_attach_images');
254
+ this.allowAttachVideos = !!salla.config.get('store.settings.rating.allow_attach_videos');
145
255
  this.allowContactSupport = !!salla.config.get('store.settings.rating.allow_contact_support');
256
+ this.refreshMediaLabels();
257
+ }
258
+ canAttachMedia() {
259
+ return this.allowAttachImages || this.allowAttachVideos;
260
+ }
261
+ getMediaUploadAccept() {
262
+ return buildMediaUploadAccept(this.allowAttachImages, this.allowAttachVideos);
263
+ }
264
+ refreshMediaLabels() {
265
+ this.allowedImagesTypesLabel = this.getAllowedMediaTypesLabel();
266
+ this.threeImagesMax = this.getMaxUploadHintLabel();
267
+ }
268
+ getAllowedMediaTypesLabel() {
269
+ if (this.allowAttachImages && this.allowAttachVideos) {
270
+ return salla.lang.get('common.uploader.allowed_media_types');
271
+ }
272
+ if (this.allowAttachImages) {
273
+ return salla.lang.get('common.uploader.allowed_images_types');
274
+ }
275
+ if (this.allowAttachVideos) {
276
+ return salla.lang.get('common.uploader.allowed_videos_types');
277
+ }
278
+ return '';
279
+ }
280
+ getMaxUploadHintLabel() {
281
+ if (this.allowAttachImages && this.allowAttachVideos) {
282
+ return salla.lang.get('common.uploader.max_three_images');
283
+ }
284
+ if (this.allowAttachImages) {
285
+ return salla.lang.get('common.uploader.max_images_count', {
286
+ count: this.MAX_IMAGE_UPLOAD_LIMIT,
287
+ });
288
+ }
289
+ if (this.allowAttachVideos) {
290
+ return salla.lang.get('common.uploader.max_videos_count', {
291
+ count: this.MAX_VIDEO_UPLOAD_LIMIT,
292
+ });
293
+ }
294
+ return '';
295
+ }
296
+ setUploadCount(productId, count, imageCount, videoCount) {
297
+ this.uploadCounts = { ...this.uploadCounts, [productId]: count };
298
+ if (imageCount != null) {
299
+ this.uploadImageCounts = { ...this.uploadImageCounts, [productId]: imageCount };
300
+ }
301
+ if (videoCount != null) {
302
+ this.uploadVideoCounts = { ...this.uploadVideoCounts, [productId]: videoCount };
303
+ }
304
+ }
305
+ setUploaderProcessing(productId, uploading) {
306
+ this.uploadingByProductId = { ...this.uploadingByProductId, [productId]: uploading };
307
+ this.hasUploadsInProgress = Object.values(this.uploadingByProductId).some(Boolean);
308
+ }
309
+ scheduleUploaderHeightRefresh() {
310
+ [50, 150, 350].forEach(delay => {
311
+ setTimeout(() => this.updateBodyHeight(), delay);
312
+ });
313
+ }
314
+ handleGalleryCountUpdate(productId, detail) {
315
+ this.setUploadCount(productId, detail.count, detail.imageCount, detail.videoCount);
316
+ this.setUploaderProcessing(productId, !!detail.uploading);
317
+ this.scheduleUploaderHeightRefresh();
146
318
  }
147
319
  /** Encrypted order id from page config / prop — used to fetch order details. */
148
320
  getRatingOrderId() {
@@ -288,7 +460,7 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
288
460
  return new Promise(resolve => {
289
461
  setTimeout(() => {
290
462
  this.modal
291
- .open()
463
+ ?.open()
292
464
  .then(() => this.order ||
293
465
  salla.api
294
466
  .withoutNotifier(() => salla.rating.api.order(this.getRatingOrderId()))
@@ -297,7 +469,7 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
297
469
  this.productReviewFactors = await this.fetchAllProductReviewFactors(res.data);
298
470
  }))
299
471
  .then(() => this.readyUpLoyaltyPoints())
300
- .then(() => this.modal.setTitle(`${salla.lang.get('pages.rating.rate_order')} <span class="unicode">(#${this.order.id})</span>`))
472
+ .then(() => this.modal?.setTitle(`${salla.lang.get('pages.rating.rate_order')} <span class="unicode">(#${this.order.id})</span>`))
301
473
  .then(() => {
302
474
  // Initialize productImages for all products
303
475
  const initialImages = {};
@@ -305,14 +477,15 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
305
477
  initialImages[item.product.id] = [];
306
478
  }
307
479
  this.productImages = initialImages;
480
+ this.uploadCounts = Object.fromEntries(Object.keys(initialImages).map(productId => [Number(productId), 0]));
308
481
  })
309
- .then(() => this.modal.stopLoading())
482
+ .then(() => this.modal?.stopLoading())
310
483
  .then(() => this.afterOrderLoaded())
311
- .catch(e => {
484
+ .catch((e) => {
312
485
  resolve(false);
313
486
  this.hasError = true;
314
487
  this.errorMessage = e.response?.data?.error?.message || e.response?.data;
315
- this.modal.stopLoading();
488
+ this.modal?.stopLoading();
316
489
  });
317
490
  resolve(true);
318
491
  }, 50);
@@ -334,7 +507,10 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
334
507
  this.editFactorRatings = { ...this.buildEditFactorRatings(this.editItem.product.id) };
335
508
  this.markExistingFactorRatingsAsUserFilled(this.editItem.product.id, this.editFactorRatings);
336
509
  }
337
- this.editModal.open();
510
+ this.editModal?.open();
511
+ if (this.editType === 'product' && this.canAttachMedia()) {
512
+ this.scheduleUploaderHeightRefresh();
513
+ }
338
514
  }
339
515
  catch (e) {
340
516
  this.hasError = true;
@@ -345,28 +521,56 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
345
521
  const endpoint = `rating/${feedbackId}/show`;
346
522
  const response = await salla.api.request(endpoint);
347
523
  this.editItem = response.data;
348
- if (this.allowAttachImages && this.editType == 'product' && this.editItem.images.length) {
349
- this.editItemImages = this.editItem.images.map(img => {
350
- return { id: `${Math.floor(100 + Math.random() * 900)}`, url: img };
351
- });
524
+ if (this.canAttachMedia() && this.editType == 'product') {
525
+ const imageUrls = (this.editItem.images || []).filter(Boolean);
526
+ const videoUrls = (this.editItem.videos || []).filter(Boolean);
527
+ let mediaUrls = [...imageUrls, ...videoUrls];
528
+ if (!videoUrls.length && imageUrls.length) {
529
+ const split = splitMediaUrls(imageUrls);
530
+ mediaUrls = [...split.images, ...split.videos];
531
+ }
532
+ mediaUrls = mediaUrls.filter(url => isVideoUrl(url) ? this.allowAttachVideos : this.allowAttachImages);
533
+ if (mediaUrls.length) {
534
+ this.editItemImages = mediaUrls.map(url => createPreloadedMediaItem(url));
535
+ const mediaCounts = countMediaByType(this.editItemImages);
536
+ this.setUploadCount(this.editItem.product.id, this.editItemImages.length, mediaCounts.image, mediaCounts.video);
537
+ }
352
538
  }
353
539
  }
354
540
  async editReview() {
541
+ if (this.hasUploadsInProgress)
542
+ return;
355
543
  const endpoint = `rating/${this.editFeedbackId}`;
356
544
  let data;
357
545
  if (this.editType === 'product') {
358
- const container = this.editModal.querySelector('[data-type="products"]') || this.currentTab;
546
+ const container = this.editModal?.querySelector('[data-type="products"]') || this.currentTab;
359
547
  data = this.buildProductRatingPayload(this.collectFormData(container), container);
360
548
  if (!data.product_id && this.editItem?.product?.id) {
361
549
  data.product_id = String(this.editItem.product.id);
362
550
  }
551
+ if (this.canAttachMedia()) {
552
+ const { images, videos } = getMediaUrlsByType(this.editItemImages);
553
+ if (this.allowAttachImages) {
554
+ data.images = images;
555
+ }
556
+ if (this.allowAttachVideos) {
557
+ data.videos = videos;
558
+ }
559
+ }
560
+ normalizeSubmittedMedia(data, this.allowAttachImages, this.allowAttachVideos);
363
561
  }
364
562
  else {
365
563
  data = this.collectFormData(this.editModal);
366
- data.images && (data.images = data.images.split(','));
564
+ if (data.images) {
565
+ data.images = parseMediaField(data.images);
566
+ }
567
+ if (data.videos) {
568
+ data.videos = parseMediaField(data.videos);
569
+ }
570
+ normalizeSubmittedMedia(data, this.allowAttachImages, this.allowAttachVideos);
367
571
  }
368
- await salla.api.request(endpoint, data, 'put').then(res => {
369
- this.editModal.close();
572
+ await salla.api.request(endpoint, data, 'put').then((res) => {
573
+ this.editModal?.close();
370
574
  salla.notify.success(res.message || this.updatedSuccessfullyLabel);
371
575
  setTimeout(() => {
372
576
  window.location.reload();
@@ -380,14 +584,14 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
380
584
  this.shouldOpenDeleteModal = true;
381
585
  return new Promise(resolve => {
382
586
  setTimeout(() => {
383
- this.deleteModal.open().then(() => resolve(true));
587
+ this.deleteModal?.open().then(() => resolve(true));
384
588
  }, 50);
385
589
  });
386
590
  }
387
591
  async deleteReview() {
388
592
  const endpoint = `rating/${this.deleteFeedbackId}`;
389
593
  await salla.api.request(endpoint, null, 'delete').then(() => {
390
- this.deleteModal.close();
594
+ this.deleteModal?.close();
391
595
  salla.notify.success(this.deletedSuccessfullyLabel);
392
596
  setTimeout(() => {
393
597
  window.location.reload();
@@ -398,12 +602,12 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
398
602
  * Show the rating modal
399
603
  */
400
604
  async close() {
401
- return this.modal.close();
605
+ return this.modal?.close();
402
606
  }
403
607
  // handle wizard
404
608
  handleWizard() {
405
- this.steps = this.modal.querySelectorAll('.s-rating-modal-step');
406
- this.dots = this.modal.querySelectorAll('.s-rating-modal-step-dot');
609
+ this.steps = this.modal?.querySelectorAll('.s-rating-modal-step');
610
+ this.dots = this.modal?.querySelectorAll('.s-rating-modal-step-dot');
407
611
  if (this.stepsCount === 0) {
408
612
  this.showThankYou();
409
613
  return;
@@ -419,18 +623,18 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
419
623
  }
420
624
  showActiveStep(current = null) {
421
625
  this.refreshWizardRefs();
422
- this.currentTab = current || this.steps[this.currentIndex];
626
+ this.currentTab = current || this.steps?.[this.currentIndex];
423
627
  if (!this.currentTab) {
424
628
  return;
425
629
  }
426
- Helper.toggleClassIf('.s-rating-modal-step-dot', 's-rating-modal-bg-gray', 's-rating-modal-bg-primary', dot => dot != this.dots[this.currentIndex]).toggleClassIf('.s-rating-modal-step', 's-rating-modal-active', 's-rating-modal-hidden', tab => tab == this.currentTab);
630
+ Helper.toggleClassIf('.s-rating-modal-step-dot', 's-rating-modal-bg-gray', 's-rating-modal-bg-primary', (dot) => dot != this.dots?.[this.currentIndex]).toggleClassIf('.s-rating-modal-step', 's-rating-modal-active', 's-rating-modal-hidden', (tab) => tab == this.currentTab);
427
631
  if (this.currentIndex !== 0) {
428
632
  // the animation
429
633
  Helper.toggleElementClassIf(this.currentTab, 's-rating-modal-unactive', 's-rating-modal-hidden', () => true);
430
634
  setTimeout(() => Helper.toggleElementClassIf(this.currentTab, 's-rating-modal-active', 's-rating-modal-unactive', () => true), 300);
431
635
  }
432
636
  // Btn text
433
- const nextType = this.steps[this.currentIndex + 1]?.dataset.type;
637
+ const nextType = this.steps?.[this.currentIndex + 1]?.dataset.type;
434
638
  this.nextBtn?.setText(nextType
435
639
  ? `${salla.lang.get('pages.rating.rate')} ${salla.lang.get(`pages.rating.${nextType}`)}`
436
640
  : salla.lang.get('pages.rating.send_ratings'));
@@ -455,13 +659,15 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
455
659
  this.showActiveStep();
456
660
  }
457
661
  async submit() {
662
+ if (this.hasUploadsInProgress)
663
+ return;
458
664
  this.refreshWizardRefs();
459
665
  try {
460
666
  if (!this.submittedBefore()) {
461
667
  this.validate();
462
668
  }
463
669
  salla.config.canLeave = false;
464
- await this.nextBtn.load();
670
+ await this.nextBtn?.load();
465
671
  if (!this.submittedBefore()) {
466
672
  await this.sendFeedback();
467
673
  }
@@ -479,7 +685,7 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
479
685
  }
480
686
  }
481
687
  finally {
482
- this.nextBtn.stop();
688
+ this.nextBtn?.stop();
483
689
  salla.config.canLeave = true;
484
690
  }
485
691
  }
@@ -507,6 +713,9 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
507
713
  inputs.push(input);
508
714
  };
509
715
  container.querySelectorAll('[name]').forEach((input) => {
716
+ if (input.closest('salla-file-upload')) {
717
+ return;
718
+ }
510
719
  addInput(input);
511
720
  });
512
721
  container.querySelectorAll('salla-rating-stars').forEach((stars) => {
@@ -527,25 +736,28 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
527
736
  return [];
528
737
  }
529
738
  validate(rating = null, type = null) {
530
- if (!rating && this.currentTab.dataset.type === 'products') {
739
+ if (!rating && this.currentTab?.dataset?.type === 'products') {
531
740
  const ratingForms = this.currentTab.querySelectorAll('.rating-outer-form');
532
- ratingForms.forEach(ratingForm => this.validate(ratingForm, 'product'));
741
+ ratingForms.forEach((ratingForm) => this.validate(ratingForm, 'product'));
742
+ return;
743
+ }
744
+ const resolvedRating = rating ?? this.currentTab;
745
+ if (!resolvedRating) {
533
746
  return;
534
747
  }
535
- rating = rating || this.currentTab;
536
- const mainRatingRow = rating.querySelector('.s-rating-modal-product-rating-row-main');
537
- const mainRatingInput = this.getRatingHiddenInput(mainRatingRow || rating);
748
+ const mainRatingRow = resolvedRating.querySelector('.s-rating-modal-product-rating-row-main');
749
+ const mainRatingInput = this.getRatingHiddenInput(mainRatingRow || resolvedRating);
538
750
  const stars = mainRatingInput?.value;
539
- const validationMessage = rating.querySelector('.s-rating-modal-validation-msg');
540
- type = type || rating.dataset.type;
751
+ const validationMessage = resolvedRating.querySelector('.s-rating-modal-validation-msg');
752
+ const resolvedType = type || resolvedRating.getAttribute('data-type');
541
753
  if (!stars) {
542
754
  validationMessage.innerHTML = salla.lang
543
- .get(`pages.rating.rate_${type}_stars`)
755
+ .get(`pages.rating.rate_${resolvedType}_stars`)
544
756
  .replace(' (:item)', '');
545
757
  throw new Error(validationMessage.innerHTML);
546
758
  }
547
- if (type === 'product') {
548
- const requiredFactorRows = Array.from(rating.querySelectorAll('.s-rating-modal-product-factor-row[data-required="true"]'));
759
+ if (resolvedType === 'product') {
760
+ const requiredFactorRows = Array.from(resolvedRating.querySelectorAll('.s-rating-modal-product-factor-row[data-required="true"]'));
549
761
  const hasMissingRequiredFactor = requiredFactorRows.some((row) => {
550
762
  const factorStarsInput = this.getRatingHiddenInput(row);
551
763
  return !factorStarsInput?.value;
@@ -555,9 +767,13 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
555
767
  throw new Error(validationMessage.innerHTML);
556
768
  }
557
769
  }
558
- validationMessage.innerHTML = '';
770
+ if (validationMessage) {
771
+ validationMessage.innerHTML = '';
772
+ }
559
773
  }
560
774
  collectFormData(container = this.currentTab) {
775
+ if (!container)
776
+ return {};
561
777
  const data = {};
562
778
  this.collectNamedInputs(container).forEach((input) => {
563
779
  const inputData = salla.helpers.inputData(input.name, input.value, data);
@@ -566,6 +782,8 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
566
782
  return data;
567
783
  }
568
784
  buildProductRatingPayload(data, container = this.currentTab) {
785
+ if (!container)
786
+ return {};
569
787
  if (!data.rating) {
570
788
  const mainRatingRow = container.querySelector('.s-rating-modal-product-rating-row-main');
571
789
  const mainRatingInput = this.getRatingHiddenInput(mainRatingRow || container);
@@ -575,15 +793,24 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
575
793
  }
576
794
  const productId = Number(data.product_id);
577
795
  let images = [];
796
+ let videos = [];
578
797
  if (data.images) {
579
- images =
580
- typeof data.images === 'string' ? data.images.split(',').filter(Boolean) : data.images;
798
+ images = parseMediaField(data.images);
799
+ }
800
+ else if (this.editMode && this.canAttachMedia() && productId) {
801
+ images = getMediaUrlsByType(this.editItemImages).images;
802
+ }
803
+ else if (this.canAttachMedia() && productId) {
804
+ images = getMediaUrlsByType(this.productImages[productId] || []).images;
581
805
  }
582
- else if (this.editMode && this.allowAttachImages && productId) {
583
- images = this.editItemImages.map(img => img.url);
806
+ if (data.videos) {
807
+ videos = parseMediaField(data.videos);
584
808
  }
585
- else if (this.allowAttachImages && productId) {
586
- images = (this.productImages[productId] || []).map(img => img.url);
809
+ else if (this.editMode && this.canAttachMedia() && productId) {
810
+ videos = getMediaUrlsByType(this.editItemImages).videos;
811
+ }
812
+ else if (this.canAttachMedia() && productId) {
813
+ videos = getMediaUrlsByType(this.productImages[productId] || []).videos;
587
814
  }
588
815
  const factors = this.normalizeFactorsList(data.factors)
589
816
  .filter(factor => factor?.id && factor?.rating)
@@ -591,15 +818,21 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
591
818
  id: String(factor.id),
592
819
  rating: String(factor.rating),
593
820
  }));
594
- return {
821
+ const payload = {
595
822
  order_id: this.getSubmitOrderId(),
596
823
  product_id: String(data.product_id),
597
824
  rating: String(data.rating),
598
825
  comment: data.comment || data.content || '',
599
- images,
600
826
  factors,
601
827
  type: 'products',
602
828
  };
829
+ if (this.allowAttachImages) {
830
+ payload.images = images;
831
+ }
832
+ if (this.allowAttachVideos) {
833
+ payload.videos = videos;
834
+ }
835
+ return payload;
603
836
  }
604
837
  async sendFeedback() {
605
838
  this.refreshWizardRefs();
@@ -620,6 +853,9 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
620
853
  }
621
854
  data.order_id = this.getSubmitOrderId();
622
855
  data.type = stepType;
856
+ if (!stepType) {
857
+ return;
858
+ }
623
859
  const res = await salla.rating.api[stepType](data);
624
860
  this.submitted.push(this.currentIndex);
625
861
  return res;
@@ -634,6 +870,8 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
634
870
  let seconds = 10;
635
871
  this.clearThanksCountdown();
636
872
  this.thanksCountdownInterval = setInterval(() => {
873
+ if (!this.thanksTime)
874
+ return;
637
875
  this.thanksTime.innerHTML = `00:0${seconds--}`;
638
876
  if (seconds > 0) {
639
877
  return;
@@ -642,7 +880,7 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
642
880
  this.thanksTime.remove();
643
881
  this.close().then(() => window.location.reload());
644
882
  }, 1000);
645
- this.modal.querySelector('.s-rating-modal-footer').classList.add('s-rating-modal-unvisiable');
883
+ this.modal?.querySelector('.s-rating-modal-footer')?.classList.add('s-rating-modal-unvisiable');
646
884
  this.showActiveStep(this.thanksTab);
647
885
  }
648
886
  getFilepondPlaceholder() {
@@ -950,26 +1188,41 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
950
1188
  }, {});
951
1189
  }
952
1190
  renderProductStep(item, index) {
953
- return (h("section", { class: "s-rating-modal-step s-rating-modal-hidden", "data-type": "products", "data-product-id": item.product.id, key: item.product.id }, h("div", { class: "s-rating-modal-product" }, this.allowAttachImages && this.loyaltyPointsNote(), h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-info-row" }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: item.product.thumbnail, alt: item.product.name, class: "s-rating-modal-product-img" })), h("h3", { class: "s-rating-modal-product-title" }, item.product.name)), this.renderProductReviewFactors(item.product.id, 0, { fieldPrefix: '' }), h("input", { type: "hidden", name: "product_id", value: item.product.id }), h("textarea", { placeholder: salla.lang.get('pages.rating.write_product_rate'), name: "comment", class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-opened", ref: el => (this.contentRefs[index] = el) }, h("salla-file-upload", { name: "image", maxFilesCount: this.MAX_UPLOAD_LIMIT, imagePreviewHeight: 117, "instant-upload": true, type: "feedback", payloadName: "files[]", id: `file-${item.product.id}`, title: item.product.name, allowMultiple: true, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: e => {
1191
+ return (h("section", { class: "s-rating-modal-step s-rating-modal-hidden", "data-type": "products", "data-product-id": item.product.id, key: item.product.id }, h("div", { class: "s-rating-modal-product" }, this.allowAttachImages && this.loyaltyPointsNote(), h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-info-row" }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: item.product.thumbnail, alt: item.product.name, class: "s-rating-modal-product-img" })), h("h3", { class: "s-rating-modal-product-title" }, item.product.name)), this.renderProductReviewFactors(item.product.id, 0, { fieldPrefix: '' }), h("input", { type: "hidden", name: "product_id", value: item.product.id }), h("textarea", { placeholder: salla.lang.get('pages.rating.write_product_rate'), name: "comment", class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.canAttachMedia() && (h("div", { class: "s-rating-modal-uploader is-opened", ref: el => {
1192
+ if (el)
1193
+ this.contentRefs[index] = el;
1194
+ } }, h("salla-file-upload", { name: "image", enableGallery: true, maxImagesCount: this.allowAttachImages ? this.MAX_IMAGE_UPLOAD_LIMIT : undefined, maxVideosCount: this.allowAttachVideos ? this.MAX_VIDEO_UPLOAD_LIMIT : undefined, maxVideoFileSize: this.allowAttachVideos ? this.MAX_VIDEO_FILE_SIZE : undefined, maxVideoDuration: this.allowAttachVideos ? this.MAX_VIDEO_DURATION : undefined, maxParallelUploads: this.MAX_PARALLEL_UPLOADS, imagePreviewHeight: 75, filePosterHeight: 75, "instant-upload": true, type: "feedback", payloadName: "files[]", id: `file-${item.product.id}`, title: item.product.name, allowMultiple: true, instantUpload: true, accept: this.getMediaUploadAccept(), url: salla.url.api('upload'), onUploaded: e => {
1195
+ const productId = item.product.id;
1196
+ const nextImages = [...(this.productImages[productId] || []), e.detail];
954
1197
  this.productImages = {
955
1198
  ...this.productImages,
956
- [item.product.id]: [...(this.productImages[item.product.id] || []), e.detail],
1199
+ [productId]: nextImages,
957
1200
  };
958
- this.hiddenInputs[index].value = this.productImages[item.product.id]
959
- .map(img => img.url)
960
- .join(',');
1201
+ const mediaCounts = countMediaByType(nextImages);
1202
+ this.setUploadCount(productId, nextImages.length, mediaCounts.image, mediaCounts.video);
1203
+ syncHiddenMediaInputs(this.hiddenInputs[index], this.hiddenVideoInputs[index], nextImages);
1204
+ this.scheduleUploaderHeightRefresh();
961
1205
  }, onRemoved: e => {
962
1206
  const removedId = e.detail;
963
- if (!removedId || !this.productImages[item.product.id])
1207
+ const productId = item.product.id;
1208
+ if (!removedId || !this.productImages[productId])
964
1209
  return;
1210
+ const nextImages = removeUploadedImage(this.productImages[productId], removedId);
965
1211
  this.productImages = {
966
1212
  ...this.productImages,
967
- [item.product.id]: this.productImages[item.product.id].filter(img => img.id !== removedId),
1213
+ [productId]: nextImages,
968
1214
  };
969
- this.hiddenInputs[index].value = this.productImages[item.product.id]
970
- .map(img => img.url)
971
- .join(',');
972
- }, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: "images", value: (this.productImages[item.product.id] || []).map(img => img.url).join(','), ref: el => (this.hiddenInputs[index] = el) }), this.renderUploadedImagesCount(item.product.id))))));
1215
+ const mediaCounts = countMediaByType(nextImages);
1216
+ this.setUploadCount(productId, nextImages.length, mediaCounts.image, mediaCounts.video);
1217
+ syncHiddenMediaInputs(this.hiddenInputs[index], this.hiddenVideoInputs[index], nextImages);
1218
+ this.scheduleUploaderHeightRefresh();
1219
+ }, labelIdle: this.getFilepondPlaceholder(), onGalleryUpdated: e => this.handleGalleryCountUpdate(item.product.id, e.detail) }), this.allowAttachImages && (h("input", { type: "hidden", name: "images", value: getMediaUrlsByType(this.productImages[item.product.id] || []).images.join(','), ref: el => {
1220
+ if (el)
1221
+ this.hiddenInputs[index] = el;
1222
+ } })), this.allowAttachVideos && (h("input", { type: "hidden", name: "videos", value: getMediaUrlsByType(this.productImages[item.product.id] || []).videos.join(','), ref: el => {
1223
+ if (el)
1224
+ this.hiddenVideoInputs[index] = el;
1225
+ } })), this.renderUploadedImagesCount(item.product.id))))));
973
1226
  }
974
1227
  renderProductReviewFactors(productId, index, options = {}) {
975
1228
  const factors = this.productReviewFactors[productId] || [];
@@ -989,16 +1242,22 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
989
1242
  const normalized = Number(byId ?? byName ?? byIndex);
990
1243
  return Number.isNaN(normalized) ? undefined : normalized;
991
1244
  };
992
- return (h("div", { class: "s-rating-modal-product-rating-rows", ref: el => this.setupProductRatingAutofill(el, productId) }, h("div", { class: "s-rating-modal-product-rating-row s-rating-modal-product-rating-row-main" }, h("span", { class: "s-rating-modal-product-factor-name" }, this.overallProductRatingLabel, h("span", { class: "s-rating-modal-product-factor-required" }, "*")), h("salla-rating-stars", { size: "medium", name: mainRatingName, key: hasMainRating ? `main-rating-${normalizedMainRating}` : 'main-rating-empty', value: hasMainRating ? normalizedMainRating : undefined, editable: hasMainRating, withLabel: true, labelBeforeStars: true, tag: false })), factors.map((factor, factorIndex) => (h("div", { class: "s-rating-modal-product-rating-row s-rating-modal-product-factor-row px-3", "data-required": factor.required ? 'true' : 'false', "data-factor-key": this.getFactorKey(factor, factorIndex) }, h("input", { type: "hidden", name: this.getFactorFieldName(fieldPrefix, factorIndex, 'name'), value: factor.name }), !!factor.id && (h("input", { type: "hidden", name: this.getFactorFieldName(fieldPrefix, factorIndex, 'id'), value: String(factor.id) })), h("span", { class: "s-rating-modal-product-factor-name" }, factor.name, factor.required ? h("span", { class: "s-rating-modal-product-factor-required" }, "*") : ''), h("salla-rating-stars", { size: "medium", name: this.getFactorFieldName(fieldPrefix, factorIndex, 'rating'), key: `factor-rating-${factor.id ?? factorIndex}-${getPrefilledFactorRating(factor, factorIndex) ?? 0}`, value: getPrefilledFactorRating(factor, factorIndex), editable: options.alwaysEditable ||
1245
+ return (h("div", { class: "s-rating-modal-product-rating-rows", ref: el => el && this.setupProductRatingAutofill(el, productId) }, h("div", { class: "s-rating-modal-product-rating-row s-rating-modal-product-rating-row-main" }, h("span", { class: "s-rating-modal-product-factor-name" }, this.overallProductRatingLabel, h("span", { class: "s-rating-modal-product-factor-required" }, "*")), h("salla-rating-stars", { size: "medium", name: mainRatingName, key: hasMainRating ? `main-rating-${normalizedMainRating}` : 'main-rating-empty', value: hasMainRating ? normalizedMainRating : undefined, editable: hasMainRating, withLabel: true, labelBeforeStars: true, tag: false })), factors.map((factor, factorIndex) => (h("div", { class: "s-rating-modal-product-rating-row s-rating-modal-product-factor-row px-3", "data-required": factor.required ? 'true' : 'false', "data-factor-key": this.getFactorKey(factor, factorIndex) }, h("input", { type: "hidden", name: this.getFactorFieldName(fieldPrefix, factorIndex, 'name'), value: factor.name }), !!factor.id && (h("input", { type: "hidden", name: this.getFactorFieldName(fieldPrefix, factorIndex, 'id'), value: String(factor.id) })), h("span", { class: "s-rating-modal-product-factor-name" }, factor.name, factor.required ? h("span", { class: "s-rating-modal-product-factor-required" }, "*") : ''), h("salla-rating-stars", { size: "medium", name: this.getFactorFieldName(fieldPrefix, factorIndex, 'rating'), key: `factor-rating-${factor.id ?? factorIndex}-${getPrefilledFactorRating(factor, factorIndex) ?? 0}`, value: getPrefilledFactorRating(factor, factorIndex), editable: options.alwaysEditable ||
993
1246
  typeof getPrefilledFactorRating(factor, factorIndex) === 'number', withLabel: true, labelBeforeStars: true, tag: false }))))));
994
1247
  }
995
1248
  handleSendEmail() {
1249
+ if (!this.order) {
1250
+ return;
1251
+ }
996
1252
  const subject = `${this.contactSubjectLabel} #${this.order.id}`;
997
1253
  const body = this.contact_body(salla.config.get('store.name'), this.order.id, this.getCustomerName());
998
1254
  const mailtoLink = `mailto:${salla.config.get('store.contacts.email')}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
999
1255
  window.open(mailtoLink, '_blank');
1000
1256
  }
1001
1257
  handleSendWhatsApp() {
1258
+ if (!this.order) {
1259
+ return;
1260
+ }
1002
1261
  const body = this.contact_body(salla.config.get('store.name'), this.order.id, this.getCustomerName());
1003
1262
  const whatsappLink = `https://wa.me/${salla.config.get('store.contacts.whatsapp')}?text=${encodeURIComponent(body)}`;
1004
1263
  window.open(whatsappLink, '_blank');
@@ -1016,9 +1275,16 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
1016
1275
  this.productFactorRatings = {};
1017
1276
  this.editMainRating = undefined;
1018
1277
  this.userFilledFactorKeys = {};
1278
+ this.uploadingByProductId = {};
1279
+ this.hasUploadsInProgress = false;
1019
1280
  this.hiddenInputs[1] && (this.hiddenInputs[1].value = '');
1020
- this.deleteFeedbackId = null;
1021
- this.editFeedbackId = null;
1281
+ this.editHiddenVideosInput && (this.editHiddenVideosInput.value = '');
1282
+ if (this.body) {
1283
+ this.body.style.height = '';
1284
+ this.body.style.minHeight = '';
1285
+ }
1286
+ this.deleteFeedbackId = undefined;
1287
+ this.editFeedbackId = undefined;
1022
1288
  this.shouldOpenDeleteModal = false;
1023
1289
  this.editMode = false;
1024
1290
  this.deleteMode = false;
@@ -1029,37 +1295,90 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
1029
1295
  this.loyaltyImageRatingPoints = 0;
1030
1296
  }
1031
1297
  getDeleteModal() {
1032
- return (h("salla-modal", { ref: modal => (this.deleteModal = modal), width: "xs", onModalVisibilityChanged: isOpen => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-delete-wrapper", ref: el => (this.body = el) }, h("h3", null, this.confirmDeletionLabel), h("p", null, this.areYouSureLabel), h("div", { class: "s-rating-modal-delete-actions" }, h("salla-button", { loaderPosition: "center", onClick: () => this.deleteReview() }, this.confirmDeleteBtn), h("salla-button", { color: "danger", fill: "outline", onClick: () => this.deleteModal.close() }, this.cancelLabel)))));
1298
+ return (h("salla-modal", { ref: modal => {
1299
+ if (modal)
1300
+ this.deleteModal = modal;
1301
+ }, width: "xs", onModalVisibilityChanged: isOpen => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-delete-wrapper", ref: el => {
1302
+ if (el)
1303
+ this.body = el;
1304
+ } }, h("h3", null, this.confirmDeletionLabel), h("p", null, this.areYouSureLabel), h("div", { class: "s-rating-modal-delete-actions" }, h("salla-button", { loaderPosition: "center", onClick: () => this.deleteReview() }, this.confirmDeleteBtn), h("salla-button", { color: "danger", fill: "outline", onClick: () => this.deleteModal?.close() }, this.cancelLabel)))));
1033
1305
  }
1034
1306
  renderUploadedImagesCount(productId) {
1035
- // In edit mode, use editItemImages; in default mode, use productImages
1036
- const imageCount = this.editMode
1037
- ? this.editItemImages.length
1038
- : (this.productImages[productId] || []).length;
1039
- return (h("span", { class: "s-rating-modal-upload-count" }, salla.lang.choice('pages.rating.images_count', imageCount, {
1040
- current: imageCount,
1041
- total: this.MAX_UPLOAD_LIMIT,
1042
- })));
1307
+ const items = this.editMode ? this.editItemImages : this.productImages[productId] || [];
1308
+ const mediaCounts = countMediaByType(items);
1309
+ const imageCount = this.uploadImageCounts[productId] ?? mediaCounts.image;
1310
+ const videoCount = this.uploadVideoCounts[productId] ?? mediaCounts.video;
1311
+ if (this.allowAttachImages && this.allowAttachVideos) {
1312
+ return (h("span", { class: "s-rating-modal-upload-count" }, salla.lang.get('pages.rating.media_count', {
1313
+ imageCurrent: imageCount,
1314
+ imageTotal: this.MAX_IMAGE_UPLOAD_LIMIT,
1315
+ videoCurrent: videoCount,
1316
+ videoTotal: this.MAX_VIDEO_UPLOAD_LIMIT,
1317
+ })));
1318
+ }
1319
+ if (this.allowAttachImages) {
1320
+ return (h("span", { class: "s-rating-modal-upload-count" }, salla.lang.choice('pages.rating.images_count', imageCount, {
1321
+ current: imageCount,
1322
+ total: this.MAX_IMAGE_UPLOAD_LIMIT,
1323
+ })));
1324
+ }
1325
+ if (this.allowAttachVideos) {
1326
+ return (h("span", { class: "s-rating-modal-upload-count" }, salla.lang.choice('pages.rating.videos_count', videoCount, {
1327
+ current: videoCount,
1328
+ total: this.MAX_VIDEO_UPLOAD_LIMIT,
1329
+ })));
1330
+ }
1331
+ return null;
1043
1332
  }
1044
1333
  getEditModal() {
1045
- return (h("salla-modal", { ref: modal => (this.editModal = modal), width: "md", onModalVisibilityChanged: isOpen => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-edit-wrapper", ref: el => (this.body = el) }, this.editType === 'store' && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "store", ref: currentTab => (this.currentTab = currentTab) }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", value: this.editItem.content, class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType === 'shipping' && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "shipping", ref: currentTab => (this.currentTab = currentTab) }, this.editItem.shipping.logo ? (h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.editItem.shipping.logo, class: "s-rating-modal-shipping-logo", alt: this.editItem.shipping.name }))) : (h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast })), h("div", { class: "s-rating-modal-title" }, ' ', `${salla.lang.get('pages.rating.rate_shipping')} ${this.editItem.shipping.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", class: "s-rating-modal-comment", value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType == 'product' && this.editItem ? (h("section", { class: "s-rating-modal-step", "data-type": "products", ref: currentTab => (this.currentTab = currentTab) }, h("div", { class: "s-rating-modal-product" }, this.allowAttachImages && this.loyaltyPointsNote(), h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-info-row" }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: this.editItem.product.image.url, alt: this.editItem.product.name, class: "s-rating-modal-product-img" })), h("h3", { class: "s-rating-modal-product-title" }, this.editItem.product.name)), this.renderProductReviewFactors(this.editItem.product.id, 0, {
1334
+ return (h("salla-modal", { ref: modal => {
1335
+ if (modal)
1336
+ this.editModal = modal;
1337
+ }, width: "md", onModalVisibilityChanged: isOpen => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-edit-wrapper", ref: el => {
1338
+ if (el)
1339
+ this.body = el;
1340
+ } }, this.editType === 'store' && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "store", ref: currentTab => {
1341
+ if (currentTab)
1342
+ this.currentTab = currentTab;
1343
+ } }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", value: this.editItem.content, class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType === 'shipping' && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "shipping", ref: currentTab => {
1344
+ if (currentTab)
1345
+ this.currentTab = currentTab;
1346
+ } }, this.editItem.shipping.logo ? (h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.editItem.shipping.logo, class: "s-rating-modal-shipping-logo", alt: this.editItem.shipping.name }))) : (h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast })), h("div", { class: "s-rating-modal-title" }, ' ', `${salla.lang.get('pages.rating.rate_shipping')} ${this.editItem.shipping.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", class: "s-rating-modal-comment", value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType == 'product' && this.editItem ? (h("section", { class: "s-rating-modal-step", "data-type": "products", ref: currentTab => {
1347
+ if (currentTab)
1348
+ this.currentTab = currentTab;
1349
+ } }, h("div", { class: "s-rating-modal-product" }, this.allowAttachImages && this.loyaltyPointsNote(), h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-info-row" }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: this.editItem.product.image.url, alt: this.editItem.product.name, class: "s-rating-modal-product-img" })), h("h3", { class: "s-rating-modal-product-title" }, this.editItem.product.name)), this.renderProductReviewFactors(this.editItem.product.id, 0, {
1046
1350
  fieldPrefix: '',
1047
1351
  mainRating: this.editMainRating ?? Number(this.editItem.stars ?? this.editItem.rating),
1048
1352
  factorRatings: this.editFactorRatings,
1049
1353
  alwaysEditable: true,
1050
- }), h("input", { type: "hidden", name: "product_id", value: this.editItem.product.id }), h("textarea", { value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_product_rate'), name: "comment", class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-opened", ref: el => (this.contentRefs[1] = el) }, h("salla-file-upload", { name: "images", allowMultiple: true, maxFilesCount: this.MAX_UPLOAD_LIMIT, imagePreviewHeight: 117, filePosterHeight: 117, "instant-upload": true, type: "feedback", files: JSON.stringify(this.editItemImages), payloadName: "files[]", id: `file-${this.editItem.product.id}`, title: this.editItem.product.name, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: e => {
1354
+ }), h("input", { type: "hidden", name: "product_id", value: this.editItem.product.id }), h("textarea", { value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_product_rate'), name: "comment", class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.canAttachMedia() && (h("div", { class: "s-rating-modal-uploader is-opened", ref: el => {
1355
+ if (el)
1356
+ this.contentRefs[1] = el;
1357
+ } }, h("salla-file-upload", { name: "images", allowMultiple: true, enableGallery: true, maxImagesCount: this.allowAttachImages ? this.MAX_IMAGE_UPLOAD_LIMIT : undefined, maxVideosCount: this.allowAttachVideos ? this.MAX_VIDEO_UPLOAD_LIMIT : undefined, maxVideoFileSize: this.allowAttachVideos ? this.MAX_VIDEO_FILE_SIZE : undefined, maxVideoDuration: this.allowAttachVideos ? this.MAX_VIDEO_DURATION : undefined, maxParallelUploads: this.MAX_PARALLEL_UPLOADS, imagePreviewHeight: 75, filePosterHeight: 75, "instant-upload": true, type: "feedback", files: JSON.stringify(this.editItemImages), payloadName: "files[]", id: `file-${this.editItem.product.id}`, title: this.editItem.product.name, instantUpload: true, accept: this.getMediaUploadAccept(), url: salla.url.api('upload'), onUploaded: e => {
1051
1358
  this.editItemImages = [
1052
1359
  ...this.editItemImages,
1053
1360
  e.detail,
1054
1361
  ];
1055
- this.hiddenInputs[1].value = this.editItemImages.map(img => img.url).join();
1362
+ const mediaCounts = countMediaByType(this.editItemImages);
1363
+ this.setUploadCount(this.editItem.product.id, this.editItemImages.length, mediaCounts.image, mediaCounts.video);
1364
+ syncHiddenMediaInputs(this.hiddenInputs[1], this.editHiddenVideosInput, this.editItemImages);
1365
+ this.scheduleUploaderHeightRefresh();
1056
1366
  }, onRemoved: e => {
1057
1367
  const removedId = e.detail;
1058
1368
  if (!removedId)
1059
1369
  return;
1060
- this.editItemImages = this.editItemImages.filter(img => img.id !== removedId);
1061
- this.hiddenInputs[1].value = this.editItemImages.map(img => img.url).join();
1062
- }, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: "images", value: this.editItemImages.map(img => img.url).join(','), ref: el => (this.hiddenInputs[1] = el) }), this.renderUploadedImagesCount(this.editItem.product.id)))))) : null, h("div", { class: "s-rating-modal-footer s-rating-modal-footer-end" }, h("salla-button", { "loader-position": "center", onClick: () => this.editReview() }, this.editReviewLabel)))));
1370
+ this.editItemImages = removeUploadedImage(this.editItemImages, removedId);
1371
+ const mediaCounts = countMediaByType(this.editItemImages);
1372
+ this.setUploadCount(this.editItem.product.id, this.editItemImages.length, mediaCounts.image, mediaCounts.video);
1373
+ syncHiddenMediaInputs(this.hiddenInputs[1], this.editHiddenVideosInput, this.editItemImages);
1374
+ this.scheduleUploaderHeightRefresh();
1375
+ }, labelIdle: this.getFilepondPlaceholder(), onGalleryUpdated: e => this.handleGalleryCountUpdate(this.editItem.product.id, e.detail) }), this.allowAttachImages && (h("input", { type: "hidden", name: "images", value: getMediaUrlsByType(this.editItemImages).images.join(','), ref: el => {
1376
+ if (el)
1377
+ this.hiddenInputs[1] = el;
1378
+ } })), this.allowAttachVideos && (h("input", { type: "hidden", name: "videos", value: getMediaUrlsByType(this.editItemImages).videos.join(','), ref: el => {
1379
+ if (el)
1380
+ this.editHiddenVideosInput = el;
1381
+ } })), this.renderUploadedImagesCount(this.editItem.product.id)))))) : null, h("div", { class: "s-rating-modal-footer s-rating-modal-footer-end" }, h("salla-button", { "loader-position": "center", loading: this.hasUploadsInProgress, disabled: this.hasUploadsInProgress, onClick: () => this.editReview() }, this.editReviewLabel)))));
1063
1382
  }
1064
1383
  render() {
1065
1384
  if (this.deleteMode) {
@@ -1069,14 +1388,32 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
1069
1388
  return h(Host, { class: "s-rating-modal" }, this.getEditModal());
1070
1389
  }
1071
1390
  if (this.defaultMode) {
1072
- return (h(Host, { class: "s-rating-modal" }, h("salla-modal", { class: "s-rating-modal-wrap", onModalVisibilityChanged: isOpen => this.resetData(isOpen), isLoading: true, width: "md", ref: modal => (this.modal = modal) }, h("div", { slot: "loading" }, h("div", { class: "s-rating-modal-skeleton" }, h("salla-skeleton", { type: "circle", height: "80px", width: "80px" }), h("salla-skeleton", { height: "15px", width: "60%" }), h("salla-skeleton", { height: "10px", width: "30%" }), h("div", { class: "s-rating-modal-skeleton-stars" }, [...Array(5)].map(v => (h("div", { key: v, innerHTML: WishListIcon })))), h("salla-skeleton", { height: "100px", width: "100%" }), h("div", { class: "s-rating-modal-skeleton-footer" }, h("salla-skeleton", { height: "40px", width: "30%" })))), !this.hasError && this.order ? ([
1073
- h("div", { class: "s-rating-modal-wrapper", ref: el => (this.body = el) }, this.isTestimonialsEnabled() ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "store" }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : (''), this.isProductsEnabled() &&
1074
- this.getRateableProducts().map((item, index) => this.renderProductStep(item, index)), this.isShippingEnabled() && this.order.shipping?.company ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "shipping" }, h("input", { type: "hidden", name: "shipping_company_id", value: this.order.shipping.company.id }), this.order.shipping.company.logo ? (h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.order.shipping.company.logo, class: "s-rating-modal-shipping-logo", alt: this.order.shipping.company.name }))) : (h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast })), h("div", { class: "s-rating-modal-title" }, ' ', `${salla.lang.get('pages.rating.rate_shipping')} ${this.order.shipping.company.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : (''), h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => (this.thanksTab = el) }, h("span", { class: "s-rating-modal-icon", innerHTML: CheckCircle2 }), h("h3", { class: "s-rating-modal-thanks-title" }, salla.lang.get('pages.rating.thanks')), h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }), h("time", { class: "s-rating-modal-thanks-time", ref: el => (this.thanksTime = el) }))),
1391
+ return (h(Host, { class: "s-rating-modal" }, h("salla-modal", { class: "s-rating-modal-wrap", onModalVisibilityChanged: isOpen => this.resetData(isOpen), isLoading: true, width: "md", ref: modal => {
1392
+ if (modal)
1393
+ this.modal = modal;
1394
+ } }, h("div", { slot: "loading" }, h("div", { class: "s-rating-modal-skeleton" }, h("salla-skeleton", { type: "circle", height: "80px", width: "80px" }), h("salla-skeleton", { height: "15px", width: "60%" }), h("salla-skeleton", { height: "10px", width: "30%" }), h("div", { class: "s-rating-modal-skeleton-stars" }, [...Array(5)].map(v => (h("div", { key: v, innerHTML: WishListIcon })))), h("salla-skeleton", { height: "100px", width: "100%" }), h("div", { class: "s-rating-modal-skeleton-footer" }, h("salla-skeleton", { height: "40px", width: "30%" })))), !this.hasError && this.order ? ([
1395
+ h("div", { class: "s-rating-modal-wrapper", ref: el => {
1396
+ if (el)
1397
+ this.body = el;
1398
+ } }, this.isTestimonialsEnabled() ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "store" }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : (''), this.isProductsEnabled() &&
1399
+ this.getRateableProducts().map((item, index) => this.renderProductStep(item, index)), this.isShippingEnabled() && this.order.shipping?.company ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "shipping" }, h("input", { type: "hidden", name: "shipping_company_id", value: this.order.shipping.company.id }), this.order.shipping.company.logo ? (h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.order.shipping.company.logo, class: "s-rating-modal-shipping-logo", alt: this.order.shipping.company.name }))) : (h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast })), h("div", { class: "s-rating-modal-title" }, ' ', `${salla.lang.get('pages.rating.rate_shipping')} ${this.order.shipping.company.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : (''), h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => {
1400
+ if (el)
1401
+ this.thanksTab = el;
1402
+ } }, h("span", { class: "s-rating-modal-icon", innerHTML: CheckCircle2 }), h("h3", { class: "s-rating-modal-thanks-title" }, salla.lang.get('pages.rating.thanks')), h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }), h("time", { class: "s-rating-modal-thanks-time", ref: el => {
1403
+ if (el)
1404
+ this.thanksTime = el;
1405
+ } }))),
1075
1406
  this.allowContactSupport &&
1076
1407
  this.showContactWidget &&
1077
1408
  (salla.config.get('store.contacts.whatsapp') ||
1078
1409
  salla.config.get('store.contacts.email')) ? (h("div", { class: "s-rating-modal-contact" }, h("p", null, this.contactUsLabel), h("div", { class: "s-rating-modal-contact-icons" }, salla.config.get('store.contacts.whatsapp') && (h("span", { onClick: () => this.handleSendWhatsApp(), innerHTML: WhatsappIcon })), salla.config.get('store.contacts.email') && (h("span", { onClick: () => this.handleSendEmail(), innerHTML: MailIcon }))))) : (''),
1079
- h("div", { class: "s-rating-modal-footer" }, h("button", { ref: el => (this.backBtn = el), onClick: () => this.previousTab(), class: "s-rating-modal-btn s-rating-modal-unvisiable" }, salla.lang.get('common.elements.back')), this.stepsCount > 1 ? (h("ul", { class: "s-rating-modal-dots" }, [...Array(this.stepsCount)].map((_, v) => (h("li", { key: v, class: "s-rating-modal-bg-gray s-rating-modal-step-dot" }))))) : (''), h("salla-button", { "loader-position": "center", ref: el => (this.nextBtn = el), onClick: () => this.submit() }, salla.lang.get('common.elements.next'))),
1410
+ h("div", { class: "s-rating-modal-footer" }, h("button", { ref: el => {
1411
+ if (el)
1412
+ this.backBtn = el;
1413
+ }, onClick: () => this.previousTab(), class: "s-rating-modal-btn s-rating-modal-unvisiable" }, salla.lang.get('common.elements.back')), this.stepsCount > 1 ? (h("ul", { class: "s-rating-modal-dots" }, [...Array(this.stepsCount)].map((_, v) => (h("li", { key: v, class: "s-rating-modal-bg-gray s-rating-modal-step-dot" }))))) : (''), h("salla-button", { "loader-position": "center", loading: this.hasUploadsInProgress, disabled: this.hasUploadsInProgress, ref: el => {
1414
+ if (el)
1415
+ this.nextBtn = el;
1416
+ }, onClick: () => this.submit() }, salla.lang.get('common.elements.next'))),
1080
1417
  ]) : (h("salla-placeholder", { alignment: "center" })))));
1081
1418
  }
1082
1419
  }
@@ -1120,7 +1457,12 @@ const SallaRatingModalV2 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
1120
1457
  "deleteFeedbackId": [32],
1121
1458
  "editItem": [32],
1122
1459
  "allowAttachImages": [32],
1460
+ "allowAttachVideos": [32],
1123
1461
  "allowContactSupport": [32],
1462
+ "uploadCounts": [32],
1463
+ "uploadImageCounts": [32],
1464
+ "uploadVideoCounts": [32],
1465
+ "hasUploadsInProgress": [32],
1124
1466
  "loyaltyImageRatingPoints": [32],
1125
1467
  "open": [64],
1126
1468
  "openEditModal": [64],
@@ -1131,44 +1473,54 @@ function defineCustomElement() {
1131
1473
  if (typeof customElements === "undefined") {
1132
1474
  return;
1133
1475
  }
1134
- const components = ["salla-rating-modal-v2", "salla-button", "salla-file-upload", "salla-loading", "salla-modal", "salla-placeholder", "salla-rating-stars", "salla-skeleton"];
1476
+ const components = ["salla-rating-modal-v2", "salla-attachment-view", "salla-button", "salla-file-upload", "salla-loading", "salla-modal", "salla-placeholder", "salla-rating-stars", "salla-skeleton", "salla-slider"];
1135
1477
  components.forEach(tagName => { switch (tagName) {
1136
1478
  case "salla-rating-modal-v2":
1137
1479
  if (!customElements.get(tagName)) {
1138
1480
  customElements.define(tagName, SallaRatingModalV2);
1139
1481
  }
1140
1482
  break;
1483
+ case "salla-attachment-view":
1484
+ if (!customElements.get(tagName)) {
1485
+ defineCustomElement$9();
1486
+ }
1487
+ break;
1141
1488
  case "salla-button":
1142
1489
  if (!customElements.get(tagName)) {
1143
- defineCustomElement$7();
1490
+ defineCustomElement$8();
1144
1491
  }
1145
1492
  break;
1146
1493
  case "salla-file-upload":
1147
1494
  if (!customElements.get(tagName)) {
1148
- defineCustomElement$6();
1495
+ defineCustomElement$7();
1149
1496
  }
1150
1497
  break;
1151
1498
  case "salla-loading":
1152
1499
  if (!customElements.get(tagName)) {
1153
- defineCustomElement$5();
1500
+ defineCustomElement$6();
1154
1501
  }
1155
1502
  break;
1156
1503
  case "salla-modal":
1157
1504
  if (!customElements.get(tagName)) {
1158
- defineCustomElement$4();
1505
+ defineCustomElement$5();
1159
1506
  }
1160
1507
  break;
1161
1508
  case "salla-placeholder":
1162
1509
  if (!customElements.get(tagName)) {
1163
- defineCustomElement$3();
1510
+ defineCustomElement$4();
1164
1511
  }
1165
1512
  break;
1166
1513
  case "salla-rating-stars":
1167
1514
  if (!customElements.get(tagName)) {
1168
- defineCustomElement$2();
1515
+ defineCustomElement$3();
1169
1516
  }
1170
1517
  break;
1171
1518
  case "salla-skeleton":
1519
+ if (!customElements.get(tagName)) {
1520
+ defineCustomElement$2();
1521
+ }
1522
+ break;
1523
+ case "salla-slider":
1172
1524
  if (!customElements.get(tagName)) {
1173
1525
  defineCustomElement$1();
1174
1526
  }