@salla.sa/twilight-components 2.14.555 → 2.14.557

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 (347) hide show
  1. package/dist/cjs/{filepond-V64-M5Vo.js → filepond-B0WltAUU.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-B7aoDNhd.js → filepond-plugin-file-poster-CY6apY0i.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-CqXpFD_V.js → filepond-plugin-file-validate-size-D4ROC-Be.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-DscY_V_T.js → filepond-plugin-file-validate-type-6lBH-fIm.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-CCSCHmYX.js → filepond-plugin-image-edit-zEOX3Sjw.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BukXu8El.js → filepond-plugin-image-exif-orientation-y0OgGNND.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-FxqKQGsC.js → filepond-plugin-image-preview-C-amHd3H.js} +1 -1
  8. package/dist/cjs/{index-JqDmtj3h.js → index-CyKUnNvM.js} +18 -14
  9. package/dist/cjs/{intlTelInput-BE60HZ-g.js → intlTelInput-CTwMzcpE.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-accordion_6.cjs.entry.js +13 -3
  13. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
  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_3.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 +1 -1
  28. package/dist/cjs/salla-comment-form_9.cjs.entry.js +1 -1
  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 +1 -1
  32. package/dist/cjs/salla-count-down_2.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 +835 -0
  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-shipments.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-orders.cjs.entry.js +224 -46
  75. package/dist/cjs/salla-payments.cjs.entry.js +76 -2
  76. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card.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 +33 -4
  85. package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -2
  86. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  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-map_3.cjs.entry.js → salla-slider.cjs.entry.js} +13 -837
  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 +3 -165
  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/{vanilla-picker-C6UDkt2D.js → vanilla-picker-B_r1mvJW.js} +1 -1
  106. package/dist/collection/components/salla-button/salla-button.js +32 -2
  107. package/dist/collection/components/salla-orders/salla-orders.css +122 -0
  108. package/dist/collection/components/salla-orders/salla-orders.js +231 -45
  109. package/dist/collection/components/salla-payments/salla-payments.css +3 -0
  110. package/dist/collection/components/salla-payments/salla-payments.js +74 -0
  111. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +32 -3
  112. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +2 -1
  113. package/dist/collection/components/salla-slider/salla-slider.js +12 -8
  114. package/dist/collection/components/salla-trust-badges/salla-trust-badges.css +1 -16
  115. package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +1 -163
  116. package/dist/components/index.js +2 -2
  117. package/dist/components/salla-button2.js +13 -2
  118. package/dist/components/salla-orders.js +294 -48
  119. package/dist/components/salla-payments.js +75 -1
  120. package/dist/components/salla-rating-modal-v22.js +32 -3
  121. package/dist/components/salla-rating-modal2.js +2 -1
  122. package/dist/components/salla-slider2.js +12 -8
  123. package/dist/components/salla-trust-badges.js +2 -164
  124. package/dist/esm/{filepond-BbwWCoUz.js → filepond-B9wUqRiS.js} +1 -1
  125. package/dist/esm/{filepond-plugin-file-poster-CZ8FMKd0.js → filepond-plugin-file-poster-Cms0jrkz.js} +1 -1
  126. package/dist/esm/{filepond-plugin-file-validate-size-CuxiDUA-.js → filepond-plugin-file-validate-size-B2gy-nn6.js} +1 -1
  127. package/dist/esm/{filepond-plugin-file-validate-type-DQeyRMJ1.js → filepond-plugin-file-validate-type-D_AqfbaS.js} +1 -1
  128. package/dist/esm/{filepond-plugin-image-edit-BbEOhu0E.js → filepond-plugin-image-edit-ChS3tv_T.js} +1 -1
  129. package/dist/esm/{filepond-plugin-image-exif-orientation-BtSlyB35.js → filepond-plugin-image-exif-orientation-iLQFxzEc.js} +1 -1
  130. package/dist/esm/{filepond-plugin-image-preview-C-ekUjUD.js → filepond-plugin-image-preview-Dm1gYrYZ.js} +1 -1
  131. package/dist/esm/{index-v673k1ze.js → index-BLzx0e6P.js} +18 -14
  132. package/dist/esm/{intlTelInput-C_t3NVhh.js → intlTelInput-BTOzA2B4.js} +1 -1
  133. package/dist/esm/loader.js +3 -3
  134. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  135. package/dist/esm/salla-accordion_6.entry.js +13 -3
  136. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  137. package/dist/esm/salla-advertisement.entry.js +1 -1
  138. package/dist/esm/salla-alert_2.entry.js +1 -1
  139. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  140. package/dist/esm/salla-applied-filters.entry.js +1 -1
  141. package/dist/esm/salla-apps-icons.entry.js +1 -1
  142. package/dist/esm/salla-attachment-view_9.entry.js +10 -10
  143. package/dist/esm/salla-badge.entry.js +1 -1
  144. package/dist/esm/salla-basket-gap.entry.js +1 -1
  145. package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
  146. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  147. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  148. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  149. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  150. package/dist/esm/salla-comment-factors.entry.js +1 -1
  151. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  152. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  153. package/dist/esm/salla-contacts.entry.js +1 -1
  154. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  155. package/dist/esm/salla-count-down_2.entry.js +1 -1
  156. package/dist/esm/salla-custom-fields.entry.js +1 -1
  157. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  158. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  159. package/dist/esm/salla-filters-widget.entry.js +1 -1
  160. package/dist/esm/salla-filters.entry.js +1 -1
  161. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  162. package/dist/esm/salla-gifting.entry.js +1 -1
  163. package/dist/esm/salla-hook.entry.js +1 -1
  164. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  165. package/dist/esm/salla-installment.entry.js +1 -1
  166. package/dist/esm/salla-list-tile.entry.js +1 -1
  167. package/dist/esm/salla-localization-modal.entry.js +1 -1
  168. package/dist/esm/salla-login-modal.entry.js +1 -1
  169. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  170. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  171. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  172. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  173. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  174. package/dist/esm/salla-loyalty.entry.js +1 -1
  175. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  176. package/dist/esm/salla-map_2.entry.js +832 -0
  177. package/dist/esm/salla-menu.entry.js +1 -1
  178. package/dist/esm/salla-metadata.entry.js +1 -1
  179. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  180. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  181. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  182. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  183. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  184. package/dist/esm/salla-offer-modal.entry.js +1 -1
  185. package/dist/esm/salla-offer.entry.js +1 -1
  186. package/dist/esm/salla-order-branch.entry.js +1 -1
  187. package/dist/esm/salla-order-cancel.entry.js +1 -1
  188. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  189. package/dist/esm/salla-order-details-options.entry.js +1 -1
  190. package/dist/esm/salla-order-details.entry.js +1 -1
  191. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  192. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  193. package/dist/esm/salla-order-edit.entry.js +1 -1
  194. package/dist/esm/salla-order-shipments.entry.js +1 -1
  195. package/dist/esm/salla-order-summary.entry.js +1 -1
  196. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  197. package/dist/esm/salla-orders.entry.js +224 -46
  198. package/dist/esm/salla-payments.entry.js +76 -2
  199. package/dist/esm/salla-placeholder.entry.js +1 -1
  200. package/dist/esm/salla-price-range.entry.js +1 -1
  201. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  202. package/dist/esm/salla-product-card.entry.js +1 -1
  203. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  204. package/dist/esm/salla-products-list.entry.js +1 -1
  205. package/dist/esm/salla-products-slider.entry.js +1 -1
  206. package/dist/esm/salla-quick-order.entry.js +1 -1
  207. package/dist/esm/salla-rating-modal-v2.entry.js +33 -4
  208. package/dist/esm/salla-rating-modal.entry.js +3 -2
  209. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  210. package/dist/esm/salla-review-order-item.entry.js +1 -1
  211. package/dist/esm/salla-scopes.entry.js +1 -1
  212. package/dist/esm/salla-search.entry.js +1 -1
  213. package/dist/esm/salla-skeleton.entry.js +1 -1
  214. package/dist/esm/{salla-map_3.entry.js → salla-slider.entry.js} +14 -836
  215. package/dist/esm/salla-social-share.entry.js +1 -1
  216. package/dist/esm/salla-social.entry.js +1 -1
  217. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  218. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  219. package/dist/esm/salla-tooltip.entry.js +1 -1
  220. package/dist/esm/salla-trust-badges.entry.js +3 -165
  221. package/dist/esm/salla-user-menu.entry.js +1 -1
  222. package/dist/esm/salla-user-profile.entry.js +1 -1
  223. package/dist/esm/salla-user-settings.entry.js +1 -1
  224. package/dist/esm/salla-verify.entry.js +1 -1
  225. package/dist/esm/salla-wallet.entry.js +1 -1
  226. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  227. package/dist/esm/twilight.js +3 -3
  228. package/dist/esm/{vanilla-picker-De2ilLoG.js → vanilla-picker-CbIzx8P3.js} +1 -1
  229. package/dist/twilight/{p-f98409d5.entry.js → p-0416a2a8.entry.js} +1 -1
  230. package/dist/twilight/{p-5b5c0c17.entry.js → p-05490b44.entry.js} +1 -1
  231. package/dist/twilight/{p-53da4e3c.entry.js → p-05b66ce1.entry.js} +1 -1
  232. package/dist/twilight/{p-cd311823.entry.js → p-06c1c936.entry.js} +1 -1
  233. package/dist/twilight/{p-36c48ad0.entry.js → p-07b67ef6.entry.js} +1 -1
  234. package/dist/twilight/{p-29058912.entry.js → p-0c80fbcf.entry.js} +1 -1
  235. package/dist/twilight/{p-b4a60b8a.entry.js → p-1420e962.entry.js} +1 -1
  236. package/dist/twilight/p-18d0c69f.entry.js +4 -0
  237. package/dist/twilight/{p-fac7ca25.entry.js → p-1bfb9675.entry.js} +1 -1
  238. package/dist/twilight/{p-96d5d862.entry.js → p-210095ee.entry.js} +1 -1
  239. package/dist/twilight/{p-332b2ecc.entry.js → p-2a5b180a.entry.js} +1 -1
  240. package/dist/twilight/p-2b7ca018.entry.js +4 -0
  241. package/dist/twilight/{p-d47dddea.entry.js → p-2bd06384.entry.js} +1 -1
  242. package/dist/twilight/{p-adbb84d6.entry.js → p-2c0870cb.entry.js} +1 -1
  243. package/dist/twilight/{p-6c18776d.entry.js → p-33e0d7b8.entry.js} +1 -1
  244. package/dist/twilight/{p-3c20da9e.entry.js → p-34f2d378.entry.js} +1 -1
  245. package/dist/twilight/{p-916ab646.entry.js → p-365745de.entry.js} +1 -1
  246. package/dist/twilight/{p-fc571372.entry.js → p-3a97face.entry.js} +1 -1
  247. package/dist/twilight/{p-781ca3b5.entry.js → p-3b4b1f29.entry.js} +1 -1
  248. package/dist/twilight/{p-c61ca934.entry.js → p-3ba22519.entry.js} +1 -1
  249. package/dist/twilight/{p-c5e95ee3.entry.js → p-3cc1a9b8.entry.js} +1 -1
  250. package/dist/twilight/{p-2e79124b.entry.js → p-407a73f4.entry.js} +1 -1
  251. package/dist/twilight/p-45706908.entry.js +4 -0
  252. package/dist/twilight/{p-1e94e0a2.entry.js → p-46ba098a.entry.js} +1 -1
  253. package/dist/twilight/{p-47aa2c89.entry.js → p-47597499.entry.js} +1 -1
  254. package/dist/twilight/{p-f0e72376.entry.js → p-4cabeff6.entry.js} +1 -1
  255. package/dist/twilight/{p-7f7347b7.entry.js → p-53285f66.entry.js} +1 -1
  256. package/dist/twilight/{p-e4b6668f.entry.js → p-56b2f8d7.entry.js} +1 -1
  257. package/dist/twilight/{p-58e3105b.entry.js → p-595bfef8.entry.js} +1 -1
  258. package/dist/twilight/{p-3403bec0.entry.js → p-59ccfd64.entry.js} +1 -1
  259. package/dist/twilight/{p-faa82f0b.entry.js → p-5bb8c263.entry.js} +1 -1
  260. package/dist/twilight/p-5cbd36fb.entry.js +4 -0
  261. package/dist/twilight/{p-fd27e4ca.entry.js → p-5cc80969.entry.js} +1 -1
  262. package/dist/twilight/{p-49f29350.entry.js → p-5f6c10d6.entry.js} +1 -1
  263. package/dist/twilight/{p-7144699e.entry.js → p-61b6c754.entry.js} +1 -1
  264. package/dist/twilight/{p-c0be9473.entry.js → p-67caf54b.entry.js} +1 -1
  265. package/dist/twilight/{p-0f5de1bf.entry.js → p-6866b3d6.entry.js} +1 -1
  266. package/dist/twilight/{p-3b67ea7c.entry.js → p-6af36173.entry.js} +1 -1
  267. package/dist/twilight/{p-7596f1d9.entry.js → p-6d8b0678.entry.js} +1 -1
  268. package/dist/twilight/{p-2f9a2bce.entry.js → p-6ea62f2b.entry.js} +1 -1
  269. package/dist/twilight/{p-c341612e.entry.js → p-738ec366.entry.js} +1 -1
  270. package/dist/twilight/{p-a94e10cf.entry.js → p-7767f3a7.entry.js} +1 -1
  271. package/dist/twilight/{p-87be4526.entry.js → p-7a19cb93.entry.js} +1 -1
  272. package/dist/twilight/{p-1c963977.entry.js → p-7c859f0c.entry.js} +1 -1
  273. package/dist/twilight/{p-a7175222.entry.js → p-7d86bc77.entry.js} +1 -1
  274. package/dist/twilight/{p-98655456.entry.js → p-7f077279.entry.js} +1 -1
  275. package/dist/twilight/{p-01bee709.entry.js → p-7ffa452c.entry.js} +1 -1
  276. package/dist/twilight/{p-29c6b1d7.entry.js → p-809a0076.entry.js} +1 -1
  277. package/dist/twilight/{p-441d35f3.entry.js → p-81f8537a.entry.js} +1 -1
  278. package/dist/twilight/{p-763fcce6.entry.js → p-86cd2898.entry.js} +1 -1
  279. package/dist/twilight/{p-5b12104d.entry.js → p-894fdcdd.entry.js} +1 -1
  280. package/dist/twilight/p-8a7bb785.entry.js +4 -0
  281. package/dist/twilight/{p-a1866532.entry.js → p-8b81811b.entry.js} +1 -1
  282. package/dist/twilight/{p-1a53b7ba.entry.js → p-8d8c84d8.entry.js} +1 -1
  283. package/dist/twilight/{p-4de30125.entry.js → p-8e2f52b2.entry.js} +1 -1
  284. package/dist/twilight/{p-22a82c83.entry.js → p-932e3bff.entry.js} +1 -1
  285. package/dist/twilight/{p-0459fa04.entry.js → p-96a13e17.entry.js} +1 -1
  286. package/dist/twilight/{p-6a884697.entry.js → p-96ded4cf.entry.js} +1 -1
  287. package/dist/twilight/{p-aa86e779.entry.js → p-98e83214.entry.js} +1 -1
  288. package/dist/twilight/{p-787696da.entry.js → p-99a757ac.entry.js} +1 -1
  289. package/dist/twilight/{p-f3c1b249.entry.js → p-9ddcdf20.entry.js} +1 -1
  290. package/dist/twilight/{p-1881142d.entry.js → p-9ef91e6b.entry.js} +1 -1
  291. package/dist/twilight/{p-CrhT4X_0.js → p-BBCmWsAH.js} +1 -1
  292. package/dist/twilight/{p-v673k1ze.js → p-BLzx0e6P.js} +1 -1
  293. package/dist/twilight/{p-Dl5Cti4G.js → p-BQGQ9tVS.js} +1 -1
  294. package/dist/twilight/{p-DkLse5IZ.js → p-BTjFfROl.js} +1 -1
  295. package/dist/twilight/{p-i4DEtsKA.js → p-Bi7BjntU.js} +1 -1
  296. package/dist/twilight/{p-ClQurXJY.js → p-BqaOIJsE.js} +1 -1
  297. package/dist/twilight/{p-BoK_yrzl.js → p-CBW4kczX.js} +1 -1
  298. package/dist/twilight/{p-C38aqYcA.js → p-C_G6bYCk.js} +1 -1
  299. package/dist/twilight/{p-c43d0713.entry.js → p-a0c97ac9.entry.js} +1 -1
  300. package/dist/twilight/{p-93bbb768.entry.js → p-a4175383.entry.js} +1 -1
  301. package/dist/twilight/{p-48404719.entry.js → p-a4b7ee47.entry.js} +1 -1
  302. package/dist/twilight/{p-b1bfe620.entry.js → p-a51931ba.entry.js} +1 -1
  303. package/dist/twilight/{p-ccd1d170.entry.js → p-a7801576.entry.js} +1 -1
  304. package/dist/twilight/p-a8b41edc.entry.js +4 -0
  305. package/dist/twilight/{p-99347a4b.entry.js → p-ada5f9db.entry.js} +1 -1
  306. package/dist/twilight/{p-6a88ecbb.entry.js → p-b36ca739.entry.js} +1 -1
  307. package/dist/twilight/{p-854cf6b2.entry.js → p-bba884dc.entry.js} +1 -1
  308. package/dist/twilight/p-bc0bc63f.entry.js +4 -0
  309. package/dist/twilight/{p-7830f9cc.entry.js → p-be424137.entry.js} +1 -1
  310. package/dist/twilight/{p-3a557186.entry.js → p-c0fc7756.entry.js} +1 -1
  311. package/dist/twilight/{p-3322b527.entry.js → p-c428c44b.entry.js} +1 -1
  312. package/dist/twilight/{p-f8947c55.entry.js → p-c4f963ea.entry.js} +1 -1
  313. package/dist/twilight/{p-ac8e107d.entry.js → p-c69e0669.entry.js} +1 -1
  314. package/dist/twilight/{p-a1459207.entry.js → p-c9d10c9f.entry.js} +1 -1
  315. package/dist/twilight/{p-e10eaa53.entry.js → p-cb7bc39f.entry.js} +1 -1
  316. package/dist/twilight/{p-b12c9ac8.entry.js → p-cd86c231.entry.js} +1 -1
  317. package/dist/twilight/{p-22833fa3.entry.js → p-d1ba8e6e.entry.js} +1 -1
  318. package/dist/twilight/{p-cf910c80.entry.js → p-d84a11b8.entry.js} +1 -1
  319. package/dist/twilight/{p-fc7abb9d.entry.js → p-de3b3e41.entry.js} +1 -1
  320. package/dist/twilight/{p-057a429d.entry.js → p-eb10186c.entry.js} +1 -1
  321. package/dist/twilight/{p-7f2a8357.entry.js → p-eb9fca37.entry.js} +1 -1
  322. package/dist/twilight/{p-223dcdd5.entry.js → p-ed3fc3bb.entry.js} +1 -1
  323. package/dist/twilight/p-ee463cf9.entry.js +4 -0
  324. package/dist/twilight/{p-dc59eba5.entry.js → p-f276a319.entry.js} +1 -1
  325. package/dist/twilight/{p-b7e01562.entry.js → p-f602c556.entry.js} +1 -1
  326. package/dist/twilight/{p-1e5e139c.entry.js → p-f87ba34e.entry.js} +1 -1
  327. package/dist/twilight/{p-a8907480.entry.js → p-fa459971.entry.js} +1 -1
  328. package/dist/twilight/{p-1f29f0d9.entry.js → p-fa7966bd.entry.js} +1 -1
  329. package/dist/twilight/{p-00e7a638.entry.js → p-fad4aa22.entry.js} +1 -1
  330. package/dist/twilight/{p-FzJa0xDL.js → p-iB9dUe00.js} +1 -1
  331. package/dist/twilight/{p-BktQ3gNi.js → p-oVUukCva.js} +1 -1
  332. package/dist/twilight/twilight.esm.js +1 -1
  333. package/dist/types/components/salla-button/salla-button.d.ts +6 -0
  334. package/dist/types/components/salla-orders/interface.d.ts +1 -0
  335. package/dist/types/components/salla-orders/salla-orders.d.ts +29 -2
  336. package/dist/types/components/salla-payments/salla-payments.d.ts +4 -0
  337. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +7 -0
  338. package/dist/types/components/salla-trust-badges/salla-trust-badges.d.ts +0 -22
  339. package/dist/types/components.d.ts +10 -0
  340. package/package.json +5 -5
  341. package/dist/twilight/p-07ef3ff3.entry.js +0 -4
  342. package/dist/twilight/p-2f19a192.entry.js +0 -4
  343. package/dist/twilight/p-64da04fc.entry.js +0 -4
  344. package/dist/twilight/p-7e0a47e2.entry.js +0 -4
  345. package/dist/twilight/p-ab142dda.entry.js +0 -4
  346. package/dist/twilight/p-b9c2c39b.entry.js +0 -4
  347. package/dist/twilight/p-d43ae452.entry.js +0 -4
@@ -0,0 +1,832 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BLzx0e6P.js';
5
+ import { L as Location } from './location-BO5AoBAP.js';
6
+
7
+ var Edit = `<!-- Generated by IcoMoon.io -->
8
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
9
+ <title>edit</title>
10
+ <path d="M30.583 1.417c-1.828-1.829-5.019-1.829-6.847 0l-13.396 13.396c-0.161 0.161-0.279 0.361-0.341 0.581l-1.949 6.911c-0.131 0.464 0 0.964 0.341 1.305 0.253 0.252 0.593 0.389 0.943 0.389 0.121 0 0.243-0.016 0.361-0.051l6.911-1.949c0.22-0.061 0.419-0.179 0.581-0.34l10.455-10.453s0 0 0 0l2.941-2.941c1.887-1.888 1.887-4.96 0-6.848zM15.547 19.528l-4.284 1.208 1.208-4.284 9.265-9.265 3.076 3.076zM28.696 6.38l-1.999 1.999-3.076-3.076 1.999-1.999c0.849-0.848 2.227-0.848 3.076 0 0.848 0.848 0.848 2.227 0 3.076zM24 20c-0.737 0-1.333 0.597-1.333 1.333v4c0 2.205-1.795 4-4 4h-12c-2.205 0-4-1.795-4-4v-12c0-2.205 1.795-4 4-4h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-4c-3.676 0-6.667 2.991-6.667 6.667v12c0 3.676 2.991 6.667 6.667 6.667h12c3.676 0 6.667-2.991 6.667-6.667v-4c0-0.736-0.596-1.333-1.333-1.333z"></path>
11
+ </svg>
12
+ `;
13
+
14
+ var CurrentLocation = `<!-- Generated by IcoMoon.io -->
15
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
16
+ <title>location-target</title>
17
+ <path d="M16 9.333c-3.676 0-6.667 2.991-6.667 6.667s2.991 6.667 6.667 6.667 6.667-2.991 6.667-6.667-2.991-6.667-6.667-6.667zM16 20c-2.205 0-4-1.795-4-4s1.795-4 4-4 4 1.795 4 4-1.795 4-4 4zM30.667 14.667h-1.401c-0.627-6.289-5.643-11.305-11.932-11.932v-1.401c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.401c-6.289 0.627-11.305 5.643-11.932 11.932h-1.401c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h1.401c0.628 6.289 5.643 11.305 11.932 11.932v1.401c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-1.401c6.289-0.628 11.305-5.643 11.932-11.932h1.401c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333zM16 26.667c-5.881 0-10.667-4.785-10.667-10.667s4.785-10.667 10.667-10.667 10.667 4.785 10.667 10.667-4.785 10.667-10.667 10.667z"></path>
18
+ </svg>
19
+ `;
20
+
21
+ var LocationMarker = `<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
22
+ <rect width="36" height="36" rx="18" fill="#5CD5C4"/>
23
+ <path d="M18 10C17.0104 10 16.1458 10.1771 15.4062 10.5312C14.6562 10.8854 14.026 11.3542 13.5156 11.9375C13.0156 12.5104 12.6406 13.1667 12.3906 13.9062C12.1302 14.6458 12 15.401 12 16.1719C12 16.8906 12.2604 17.7656 12.7812 18.7969C13.3021 19.8281 13.8854 20.8333 14.5312 21.8125C15.1875 22.7812 15.8073 23.6406 16.3906 24.3906C16.9844 25.1302 17.349 25.5885 17.4844 25.7656C17.5469 25.8385 17.625 25.8958 17.7188 25.9375C17.8125 25.9792 17.9062 26 18 26C18.1042 26 18.1979 25.9792 18.2812 25.9375C18.375 25.8958 18.4531 25.8385 18.5156 25.7656C18.651 25.5885 19.0156 25.1302 19.6094 24.3906C20.1927 23.6406 20.8073 22.7812 21.4531 21.8125C22.1094 20.8333 22.6979 19.8281 23.2188 18.7969C23.7396 17.7656 24 16.8906 24 16.1719C24 15.401 23.8698 14.6458 23.6094 13.9062C23.3594 13.1667 22.9792 12.5104 22.4688 11.9375C21.9688 11.3542 21.3438 10.8854 20.5938 10.5312C19.8542 10.1771 18.9896 10 18 10ZM18 24.2812C17.5833 23.75 17.1094 23.1198 16.5781 22.3906C16.0365 21.651 15.526 20.901 15.0469 20.1406C14.5677 19.3698 14.1615 18.6302 13.8281 17.9219C13.4948 17.2135 13.3281 16.6302 13.3281 16.1719C13.3281 15.5885 13.4219 15.0052 13.6094 14.4219C13.7969 13.849 14.0781 13.3333 14.4531 12.875C14.8385 12.4167 15.3281 12.0469 15.9219 11.7656C16.5052 11.474 17.1979 11.3281 18 11.3281C18.8021 11.3281 19.4948 11.474 20.0781 11.7656C20.6719 12.0469 21.1562 12.4167 21.5312 12.875C21.9167 13.3333 22.2031 13.849 22.3906 14.4219C22.5781 15.0052 22.6719 15.5885 22.6719 16.1719C22.6719 16.6302 22.5052 17.2135 22.1719 17.9219C21.8385 18.6302 21.4323 19.3698 20.9531 20.1406C20.474 20.901 19.9688 21.651 19.4375 22.3906C18.8958 23.1198 18.4167 23.75 18 24.2812ZM18 13.3281C17.2604 13.3281 16.6302 13.5885 16.1094 14.1094C15.5885 14.6302 15.3281 15.2604 15.3281 16C15.3281 16.7396 15.5885 17.3698 16.1094 17.8906C16.6302 18.4115 17.2604 18.6719 18 18.6719C18.7396 18.6719 19.3698 18.4115 19.8906 17.8906C20.4115 17.3698 20.6719 16.7396 20.6719 16C20.6719 15.2604 20.4115 14.6302 19.8906 14.1094C19.3698 13.5885 18.7396 13.3281 18 13.3281ZM18 17.3281C17.6354 17.3281 17.3229 17.1979 17.0625 16.9375C16.8021 16.6771 16.6719 16.3646 16.6719 16C16.6719 15.6354 16.8021 15.3229 17.0625 15.0625C17.3229 14.8021 17.6354 14.6719 18 14.6719C18.3646 14.6719 18.6771 14.8021 18.9375 15.0625C19.1979 15.3229 19.3281 15.6354 19.3281 16C19.3281 16.3646 19.1979 16.6771 18.9375 16.9375C18.6771 17.1979 18.3646 17.3281 18 17.3281Z" fill="white"/>
24
+ </svg>
25
+ `;
26
+
27
+ // export json
28
+ const light = [
29
+ {
30
+ featureType: 'water',
31
+ elementType: 'geometry',
32
+ stylers: [
33
+ {
34
+ color: '#e9e9e9',
35
+ },
36
+ {
37
+ lightness: 17,
38
+ },
39
+ ],
40
+ },
41
+ {
42
+ featureType: 'landscape',
43
+ elementType: 'geometry',
44
+ stylers: [
45
+ {
46
+ color: '#f5f5f5',
47
+ },
48
+ {
49
+ lightness: 20,
50
+ },
51
+ ],
52
+ },
53
+ {
54
+ featureType: 'road.highway',
55
+ elementType: 'geometry.fill',
56
+ stylers: [
57
+ {
58
+ color: '#ffffff',
59
+ },
60
+ {
61
+ lightness: 17,
62
+ },
63
+ ],
64
+ },
65
+ {
66
+ featureType: 'road.highway',
67
+ elementType: 'geometry.stroke',
68
+ stylers: [
69
+ {
70
+ color: '#ffffff',
71
+ },
72
+ {
73
+ lightness: 29,
74
+ },
75
+ {
76
+ weight: 0.2,
77
+ },
78
+ ],
79
+ },
80
+ {
81
+ featureType: 'road.arterial',
82
+ elementType: 'geometry',
83
+ stylers: [
84
+ {
85
+ color: '#ffffff',
86
+ },
87
+ {
88
+ lightness: 18,
89
+ },
90
+ ],
91
+ },
92
+ {
93
+ featureType: 'road.local',
94
+ elementType: 'geometry',
95
+ stylers: [
96
+ {
97
+ color: '#ffffff',
98
+ },
99
+ {
100
+ lightness: 16,
101
+ },
102
+ ],
103
+ },
104
+ {
105
+ featureType: 'poi',
106
+ elementType: 'geometry',
107
+ stylers: [
108
+ {
109
+ color: '#f5f5f5',
110
+ },
111
+ {
112
+ lightness: 21,
113
+ },
114
+ ],
115
+ },
116
+ {
117
+ featureType: 'poi.park',
118
+ elementType: 'geometry',
119
+ stylers: [
120
+ {
121
+ color: '#dedede',
122
+ },
123
+ {
124
+ lightness: 21,
125
+ },
126
+ ],
127
+ },
128
+ {
129
+ elementType: 'labels.text.stroke',
130
+ stylers: [
131
+ {
132
+ visibility: 'on',
133
+ },
134
+ {
135
+ color: '#ffffff',
136
+ },
137
+ {
138
+ lightness: 16,
139
+ },
140
+ ],
141
+ },
142
+ {
143
+ elementType: 'labels.text.fill',
144
+ stylers: [
145
+ {
146
+ saturation: 36,
147
+ },
148
+ {
149
+ color: '#333333',
150
+ },
151
+ {
152
+ lightness: 40,
153
+ },
154
+ ],
155
+ },
156
+ {
157
+ elementType: 'labels.icon',
158
+ stylers: [
159
+ {
160
+ visibility: 'off',
161
+ },
162
+ ],
163
+ },
164
+ {
165
+ featureType: 'transit',
166
+ elementType: 'geometry',
167
+ stylers: [
168
+ {
169
+ color: '#f2f2f2',
170
+ },
171
+ {
172
+ lightness: 19,
173
+ },
174
+ ],
175
+ },
176
+ {
177
+ featureType: 'administrative',
178
+ elementType: 'geometry.fill',
179
+ stylers: [
180
+ {
181
+ color: '#fefefe',
182
+ },
183
+ {
184
+ lightness: 20,
185
+ },
186
+ ],
187
+ },
188
+ {
189
+ featureType: 'administrative',
190
+ elementType: 'geometry.stroke',
191
+ stylers: [
192
+ {
193
+ color: '#fefefe',
194
+ },
195
+ {
196
+ lightness: 17,
197
+ },
198
+ {
199
+ weight: 1.2,
200
+ },
201
+ ],
202
+ },
203
+ ];
204
+ const dark = [
205
+ {
206
+ elementType: 'geometry',
207
+ stylers: [
208
+ {
209
+ color: '#242f3e',
210
+ },
211
+ ],
212
+ },
213
+ {
214
+ elementType: 'labels.text.fill',
215
+ stylers: [
216
+ {
217
+ color: '#746855',
218
+ },
219
+ ],
220
+ },
221
+ {
222
+ elementType: 'labels.text.stroke',
223
+ stylers: [
224
+ {
225
+ color: '#242f3e',
226
+ },
227
+ ],
228
+ },
229
+ {
230
+ featureType: 'administrative.locality',
231
+ elementType: 'labels.text.fill',
232
+ stylers: [
233
+ {
234
+ color: '#d59563',
235
+ },
236
+ ],
237
+ },
238
+ {
239
+ featureType: 'poi',
240
+ elementType: 'labels.text.fill',
241
+ stylers: [
242
+ {
243
+ color: '#d59563',
244
+ },
245
+ ],
246
+ },
247
+ {
248
+ featureType: 'poi.park',
249
+ elementType: 'geometry',
250
+ stylers: [
251
+ {
252
+ color: '#263c3f',
253
+ },
254
+ ],
255
+ },
256
+ {
257
+ featureType: 'poi.park',
258
+ elementType: 'labels.text.fill',
259
+ stylers: [
260
+ {
261
+ color: '#6b9a76',
262
+ },
263
+ ],
264
+ },
265
+ {
266
+ featureType: 'road',
267
+ elementType: 'geometry',
268
+ stylers: [
269
+ {
270
+ color: '#38414e',
271
+ },
272
+ ],
273
+ },
274
+ {
275
+ featureType: 'road',
276
+ elementType: 'geometry.stroke',
277
+ stylers: [
278
+ {
279
+ color: '#212a37',
280
+ },
281
+ ],
282
+ },
283
+ {
284
+ featureType: 'road',
285
+ elementType: 'labels.text.fill',
286
+ stylers: [
287
+ {
288
+ color: '#9ca5b3',
289
+ },
290
+ ],
291
+ },
292
+ {
293
+ featureType: 'road.highway',
294
+ elementType: 'geometry',
295
+ stylers: [
296
+ {
297
+ color: '#746855',
298
+ },
299
+ ],
300
+ },
301
+ {
302
+ featureType: 'road.highway',
303
+ elementType: 'geometry.stroke',
304
+ stylers: [
305
+ {
306
+ color: '#1f2835',
307
+ },
308
+ ],
309
+ },
310
+ {
311
+ featureType: 'road.highway',
312
+ elementType: 'labels.text.fill',
313
+ stylers: [
314
+ {
315
+ color: '#f3d19c',
316
+ },
317
+ ],
318
+ },
319
+ {
320
+ featureType: 'transit',
321
+ elementType: 'geometry',
322
+ stylers: [
323
+ {
324
+ color: '#2f3948',
325
+ },
326
+ ],
327
+ },
328
+ {
329
+ featureType: 'transit.station',
330
+ elementType: 'labels.text.fill',
331
+ stylers: [
332
+ {
333
+ color: '#d59563',
334
+ },
335
+ ],
336
+ },
337
+ {
338
+ featureType: 'water',
339
+ elementType: 'geometry',
340
+ stylers: [
341
+ {
342
+ color: '#17263c',
343
+ },
344
+ ],
345
+ },
346
+ {
347
+ featureType: 'water',
348
+ elementType: 'labels.text.fill',
349
+ stylers: [
350
+ {
351
+ color: '#515c6d',
352
+ },
353
+ ],
354
+ },
355
+ {
356
+ featureType: 'water',
357
+ elementType: 'labels.text.stroke',
358
+ stylers: [
359
+ {
360
+ color: '#17263c',
361
+ },
362
+ ],
363
+ },
364
+ ];
365
+ var styles = {
366
+ light,
367
+ dark,
368
+ };
369
+
370
+ class Loader {
371
+ constructor(apiKey = null, options = {}) {
372
+ this.apiKey = apiKey;
373
+ this.options = options;
374
+ if (typeof window === 'undefined') {
375
+ throw new Error('google-maps is supported only in browser environment');
376
+ }
377
+ }
378
+ load() {
379
+ if (typeof this.api !== 'undefined') {
380
+ return Promise.resolve(this.api);
381
+ }
382
+ if (typeof this.loader !== 'undefined') {
383
+ return this.loader;
384
+ }
385
+ window[Loader.CALLBACK_NAME] = () => {
386
+ this.api = window['google'];
387
+ if (typeof this.resolve === 'undefined') {
388
+ throw new Error('Should not happen');
389
+ }
390
+ this.resolve(this.api);
391
+ };
392
+ window['gm_authFailure'] = () => {
393
+ if (typeof this.reject === 'undefined') {
394
+ throw new Error('Should not happen');
395
+ }
396
+ this.reject(new Error('google-maps: authentication error'));
397
+ };
398
+ return this.loader = new Promise((resolve, reject) => {
399
+ this.resolve = resolve;
400
+ this.reject = reject;
401
+ const script = document.createElement('script');
402
+ script.src = this.createUrl();
403
+ script.async = true;
404
+ script.onerror = (e) => reject(e);
405
+ document.head.appendChild(script);
406
+ });
407
+ }
408
+ createUrl() {
409
+ const parameters = [
410
+ `callback=${Loader.CALLBACK_NAME}`,
411
+ ];
412
+ if (this.apiKey) {
413
+ parameters.push(`key=${this.apiKey}`);
414
+ }
415
+ for (let name in this.options) {
416
+ if (this.options.hasOwnProperty(name)) {
417
+ let value = this.options[name];
418
+ if (name === 'version') {
419
+ name = 'v';
420
+ }
421
+ if (name === 'libraries') {
422
+ value = value.join(',');
423
+ }
424
+ parameters.push(`${name}=${value}`);
425
+ }
426
+ }
427
+ return `https://maps.googleapis.com/maps/api/js?${parameters.join('&')}`;
428
+ }
429
+ }
430
+ Loader.CALLBACK_NAME = '_dk_google_maps_loader_cb';
431
+
432
+ const sallaMapCss = "/*!twlt*/.s-map-wrapper{position:relative}.s-map-value-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;border:0;opacity:0;pointer-events:none}.s-map-wrapper.s-has-error .s-map-location-button{outline:2px solid rgb(248, 113, 113);outline-offset:2px}.visible{visibility:visible}.s-has-error{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-has-error:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.s-has-error{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-map-modal-title{position:relative;margin-top:1rem;margin-bottom:1rem;padding-left:1rem;padding-right:1rem}.s-map-location-icon{margin-right:0.5rem}.s-map-location-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.5rem;margin-right:0px}.s-map-location-icon svg{height:1rem !important;width:1rem !important}.s-map-modal-body{position:relative;overflow:hidden}.s-map-element{height:400px;width:100%}.s-map-search-wrapper{position:absolute;top:0px;z-index:1;margin:1.25rem;width:-webkit-fill-available}.s-map-search-wrapper input{height:2.5rem;width:100%;padding:0.5rem}.s-map-search-wrapper input:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}.s-map-search-results{margin-top:0px;display:flex;height:6rem;flex-direction:column;padding:0.5rem}.s-map-modal-body .s-loading-container{position:absolute;margin:0px;padding:5rem}.s-map-my-location-button{position:absolute;bottom:1.5rem;left:0px;margin:0.5rem}.s-map-location-button .s-button-text{display:flex;align-items:center}.s-map-submit-button button{border-top-right-radius:0px;border-top-left-radius:0px;padding-top:12px;padding-bottom:12px}";
433
+
434
+ const SallaMap = class {
435
+ constructor(hostRef) {
436
+ registerInstance(this, hostRef);
437
+ this.selected = createEvent(this, "selected");
438
+ this.mapClicked = createEvent(this, "mapClicked");
439
+ this.currentLocationChanged = createEvent(this, "currentLocationChanged");
440
+ this.invalidInput = createEvent(this, "invalidInput");
441
+ this.defaultLat = 21.419421; //Mecca 🕋
442
+ this.defaultLng = 39.82553; //Mecca 🕋
443
+ // state variables
444
+ this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
445
+ this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
446
+ this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
447
+ this.locateButtonEdit = salla.lang.get('common.elements.edit');
448
+ this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
449
+ this.searchInputValue = null;
450
+ this.formattedAddress = '';
451
+ this.geolocationError = false;
452
+ /**
453
+ * File input name for the native formData
454
+ */
455
+ this.name = 'location';
456
+ /**
457
+ * Set if the location input is required or not
458
+ */
459
+ this.required = false;
460
+ /**
461
+ * Disable or enable actions
462
+ */
463
+ this.readonly = false;
464
+ /**
465
+ * Sets the search bar visibility.
466
+ */
467
+ this.searchable = false;
468
+ /**
469
+ * Sets start map zoom.
470
+ */
471
+ this.zoom = 10;
472
+ /**
473
+ * Sets map style.
474
+ */
475
+ this.theme = 'light';
476
+ salla.lang.onLoaded(() => {
477
+ this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
478
+ this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
479
+ this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
480
+ this.locateButtonEdit = salla.lang.get('common.elements.edit');
481
+ this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
482
+ });
483
+ salla.onReady(() => {
484
+ this.apiKey = salla.config.get('store.settings.keys.maps');
485
+ });
486
+ }
487
+ formatAddress(address) {
488
+ return address.length > 25 ? address.substring(0, 25) + '...' : address;
489
+ }
490
+ /** Treat numeric `0` as valid; reject null/undefined/blank/NaN (incl. whitespace). */
491
+ hasCoordinate(value) {
492
+ if (value === null || value === undefined) {
493
+ return false;
494
+ }
495
+ if (typeof value === 'number') {
496
+ return Number.isFinite(value);
497
+ }
498
+ const trimmed = String(value).trim();
499
+ if (trimmed === '') {
500
+ return false;
501
+ }
502
+ return Number.isFinite(Number(trimmed));
503
+ }
504
+ /**
505
+ * Prefer confirmed selection; fall back to lat/lng props so cart/order-form
506
+ * options with an existing location keep a valid form value before geocode finishes.
507
+ */
508
+ getLatLng() {
509
+ const lat = this.hasCoordinate(this.selectedLat) ? this.selectedLat : this.lat;
510
+ const lng = this.hasCoordinate(this.selectedLng) ? this.selectedLng : this.lng;
511
+ return this.hasCoordinate(lat) && this.hasCoordinate(lng) ? `${lat}, ${lng}` : '';
512
+ }
513
+ syncMapInputValue() {
514
+ if (!this.mapInput) {
515
+ return;
516
+ }
517
+ this.mapInput.value = this.getLatLng();
518
+ this.mapInput.setCustomValidity('');
519
+ }
520
+ focusLocateControl() {
521
+ const locateButton = this.host.querySelector('.s-map-location-button');
522
+ locateButton?.focus?.();
523
+ }
524
+ componentWillLoad() {
525
+ if (this.hasCoordinate(this.lat) && this.hasCoordinate(this.lng)) {
526
+ this.selectedLat = this.lat;
527
+ this.selectedLng = this.lng;
528
+ }
529
+ }
530
+ getPositionAddress(location, submit = false) {
531
+ // get address and set it to search input
532
+ const Geocoder = new google.maps.Geocoder();
533
+ Geocoder.geocode({
534
+ location,
535
+ }, (results, status) => {
536
+ if (status === google.maps.GeocoderStatus.OK) {
537
+ if (this.searchable) {
538
+ this.searchInputValue = results[0].formatted_address;
539
+ this.searchInput.value = results[0].formatted_address;
540
+ }
541
+ if (submit) {
542
+ this.formattedAddress = results[0].formatted_address;
543
+ }
544
+ }
545
+ });
546
+ }
547
+ initGoogleMaps(options, mapDOM) {
548
+ const loader = new Loader(this.apiKey, options);
549
+ loader.load().then(google => {
550
+ this.map = new google.maps.Map(mapDOM, {
551
+ center: (this.lat || this.lng) ? {
552
+ lat: this.lat,
553
+ lng: this.lng,
554
+ } : {
555
+ lat: this.defaultLat,
556
+ lng: this.defaultLng,
557
+ },
558
+ zoom: this.zoom,
559
+ zoomControl: true,
560
+ mapTypeControl: false,
561
+ scaleControl: false,
562
+ streetViewControl: false,
563
+ rotateControl: false,
564
+ fullscreenControl: false,
565
+ disableDefaultUI: false,
566
+ });
567
+ this.map.setOptions({
568
+ styles: this.theme === 'light' ? styles.light : styles.dark,
569
+ });
570
+ this.marker = new google.maps.Marker({
571
+ position: this.map.getCenter(),
572
+ map: this.map,
573
+ icon: {
574
+ url: 'data:image/svg+xml;utf8,' + encodeURIComponent(LocationMarker),
575
+ scaledSize: new google.maps.Size(30, 30),
576
+ },
577
+ });
578
+ if (this.searchable) {
579
+ const searchBox = new google.maps.places.SearchBox(this.searchInput);
580
+ google.maps.event.addListener(searchBox, 'places_changed', () => {
581
+ const places = searchBox.getPlaces();
582
+ // goto first place
583
+ if (places.length > 0 && this.map) {
584
+ this.map.setCenter(places[0].geometry.location);
585
+ this.lat = places[0].geometry.location.lat();
586
+ this.lng = places[0].geometry.location.lng();
587
+ // set marker
588
+ this.marker.setPosition(places[0].geometry.location);
589
+ this.searchInputValue = places[0].formatted_address;
590
+ this.formattedAddress = places[0].formatted_address;
591
+ }
592
+ });
593
+ }
594
+ // add listener to map
595
+ google.maps.event.addListener(this.map, 'click', e => {
596
+ if (this.readonly)
597
+ return;
598
+ this.marker.setPosition(e.latLng);
599
+ this.lat = e.latLng.lat();
600
+ this.lng = e.latLng.lng();
601
+ this.getPositionAddress(e.latLng);
602
+ this.mapClicked.emit({
603
+ lat: e.latLng.lat(),
604
+ lng: e.latLng.lng(),
605
+ address: this.formattedAddress ? this.formattedAddress : null,
606
+ });
607
+ });
608
+ if (!this.lat && !this.lng) {
609
+ this.getCurrentLocation();
610
+ if (this.geolocationError) {
611
+ this.map.setCenter({
612
+ lat: this.lat,
613
+ lng: this.lng,
614
+ });
615
+ this.marker.setPosition({
616
+ lat: this.lat,
617
+ lng: this.lng,
618
+ });
619
+ }
620
+ }
621
+ });
622
+ }
623
+ getCurrentLocation() {
624
+ if (navigator.geolocation && this.map) {
625
+ navigator.geolocation.getCurrentPosition(position => {
626
+ // set map to this location
627
+ const mapOptions = {
628
+ center: new google.maps.LatLng(position.coords.latitude, position.coords.longitude),
629
+ zoom: 15,
630
+ };
631
+ this.map.setOptions(mapOptions);
632
+ // set marker
633
+ this.marker.setPosition(mapOptions.center);
634
+ this.getPositionAddress(mapOptions.center);
635
+ this.lat = position.coords.latitude;
636
+ this.lng = position.coords.longitude;
637
+ this.currentLocationChanged.emit({
638
+ lat: position.coords.latitude,
639
+ lng: position.coords.longitude,
640
+ address: this.formattedAddress ? this.formattedAddress : null,
641
+ });
642
+ }, this.handleLocationError.bind(this));
643
+ }
644
+ else {
645
+ salla.log('Geolocation is not supported by this browser.');
646
+ this.geolocationError = true;
647
+ }
648
+ }
649
+ handleLocationError(error) {
650
+ this.geolocationError = true;
651
+ switch (error.code) {
652
+ case error.PERMISSION_DENIED:
653
+ salla.log('User denied the request for Geolocation.');
654
+ break;
655
+ case error.POSITION_UNAVAILABLE:
656
+ salla.log('Location information is unavailable.');
657
+ break;
658
+ case error.TIMEOUT:
659
+ salla.log('The request to get user location timed out.');
660
+ break;
661
+ case error.UNKNOWN_ERROR:
662
+ salla.log('An unknown error occurred.');
663
+ break;
664
+ }
665
+ }
666
+ componentDidLoad() {
667
+ this.syncMapInputValue();
668
+ // if lat and lng provided then get the formatted address
669
+ if (this.hasCoordinate(this.lat) && this.hasCoordinate(this.lng)) {
670
+ // get address
671
+ fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get('user.language_code') ||
672
+ document.documentElement.lang ||
673
+ 'ar'}`)
674
+ .then(res => res.json())
675
+ .then(res => {
676
+ if (res.status === 'OK') {
677
+ this.formattedAddress = res.results[0].formatted_address;
678
+ this.searchInputValue = res.results[0].formatted_address;
679
+ if (this.searchInput) {
680
+ this.searchInput.value = res.results[0].formatted_address;
681
+ }
682
+ this.selectedLng = this.lng;
683
+ this.selectedLat = this.lat;
684
+ this.syncMapInputValue();
685
+ }
686
+ });
687
+ }
688
+ this.mapInput.addEventListener('invalid', e => {
689
+ // Keep native constraint validation, but move focus to the visible control
690
+ // so Chromium does not throw "An invalid form control is not focusable".
691
+ e.preventDefault();
692
+ this.host.classList.add('s-has-error');
693
+ this.focusLocateControl();
694
+ this.invalidInput.emit(e);
695
+ });
696
+ this.mapInput.addEventListener('input', () => {
697
+ this.mapInput.setCustomValidity('');
698
+ this.host.classList.remove('s-has-error');
699
+ });
700
+ }
701
+ /**
702
+ * Validate the selected location when the field is required.
703
+ * Native required still applies on a focusable visually-hidden input; this method
704
+ * syncs value first and routes focus to the visible locate control via `invalid`.
705
+ */
706
+ async reportValidity() {
707
+ this.syncMapInputValue();
708
+ if (!this.mapInput || !this.required || this.readonly || this.getLatLng()) {
709
+ this.mapInput?.setCustomValidity('');
710
+ this.host.classList.remove('s-has-error');
711
+ return true;
712
+ }
713
+ return this.mapInput.reportValidity();
714
+ }
715
+ /**
716
+ * Open location component
717
+ */
718
+ async open() {
719
+ // only init google maps on modal open :) to save resources
720
+ if (!this.map)
721
+ this.initGoogleMaps({
722
+ libraries: this.searchable ? ['places', 'search'] : [],
723
+ language: salla.config.get('user.language_code') ||
724
+ document.documentElement.lang ||
725
+ 'ar',
726
+ }, this.mapElement);
727
+ return await this.locationModal.open();
728
+ }
729
+ // rendering functions
730
+ getLocationModal() {
731
+ return (h("div", null, h("div", { class: "s-map-modal-title" }, !!this.modalTitle ? this.modalTitle : this.modalActivityTitle), h("div", { class: "s-map-modal-body" }, h("div", { class: "s-map-element", ref: el => (this.mapElement = el) }), this.readonly ? "" :
732
+ [
733
+ this.searchable && (h("div", { class: "s-map-search-wrapper" }, h("input", { class: "s-map-search-input", ref: el => (this.searchInput = el), placeholder: this.searchPlaceholder }))),
734
+ h("salla-button", { class: "s-map-my-location-button", onClick: () => {
735
+ this.getCurrentLocation();
736
+ }, shape: "icon", color: "primary" }, h("span", { innerHTML: CurrentLocation })),
737
+ h("salla-button", { class: "s-map-submit-button", color: "primary", width: "wide", onClick: () => {
738
+ let points = {
739
+ lat: this.lat,
740
+ lng: this.lng,
741
+ address: this.formattedAddress ? this.formattedAddress : null,
742
+ };
743
+ salla.event.emit('salla-map::selected', points);
744
+ this.selected.emit(points);
745
+ this.selectedLat = points.lat;
746
+ this.selectedLng = points.lng;
747
+ this.getPositionAddress(new google.maps.LatLng(points.lat, points.lng), true);
748
+ this.syncMapInputValue();
749
+ this.host.classList.remove('s-has-error');
750
+ this.mapInput.dispatchEvent(new window.Event('change', { bubbles: true }));
751
+ this.locationModal.close();
752
+ } }, this.confirmButtonTitle)
753
+ ])));
754
+ }
755
+ // render
756
+ render() {
757
+ return (h(Host, { key: '20ed1a1d4099e817164c3764341d473c1b735add', class: "s-map-wrapper" }, h("salla-modal", { key: '77309d82d11bbae677a935aef0e02588c5f9fbfa', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
758
+ this.locationModal = modal;
759
+ } }, this.getLocationModal()), h("slot", { key: '57e6d352f42a3321a98925dd4136eaf0fdbb06b0', name: "button" }, h("salla-button", { key: 'a0c39395b18ca41f2ea31c5c5729b2ba20c17a16', onClick: () => {
760
+ this.open();
761
+ }, color: "primary", class: "s-map-location-button" }, h("span", { key: 'b9478a06c198812edeacab794fb63699ea72fd6b', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: 'd1619a934c72218d4d00b651e95743ad8d14a7a2', class: "s-map-value-input", name: this.name, required: this.required, value: this.getLatLng(), tabIndex: -1, "aria-hidden": "true", ref: input => (this.mapInput = input) })));
762
+ }
763
+ get host() { return getElement(this); }
764
+ };
765
+ SallaMap.style = sallaMapCss;
766
+
767
+ const sallaProgressBarCss = "/*!twlt*/.s-progress-bar-container{margin-bottom:0.625rem}.s-progress-bar-header{margin-bottom:0.375rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-progress-bar-target-section{margin-bottom:0.625rem;display:flex;justify-content:space-between;font-size:0.875rem;line-height:1.25rem}.s-progress-bar-wrapper{margin-bottom:0.375rem;width:100%;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-progress-bar-wrapper:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.s-progress-bar-progress{height:100%;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.s-progress-bar-message{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-progress-bar-wrapper .s-progress-bar-progress-stripped{background-image:linear-gradient(-45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%,rgba(255, 255, 255, .2) 50%,rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-size:30px 30px}.s-reviews-summary-progress .s-progress-bar-wrapper{margin-bottom:0px}.s-reviews-summary-progress .s-progress-bar-container{margin-bottom:0px}";
768
+
769
+ const SallaProgressBar = class {
770
+ constructor(hostRef) {
771
+ registerInstance(this, hostRef);
772
+ /**
773
+ * Set height for the wrapper.
774
+ */
775
+ this.height = "10px";
776
+ try {
777
+ if (this.donation) {
778
+ let donationJson = typeof this.donation == 'string' ? JSON.parse(this.donation) : this.donation;
779
+ if (donationJson.can_donate && donationJson.target_amount) {
780
+ donationJson.target_end_date = donationJson.target_end_date == '0000-00-00' ? null : donationJson.target_end_date;
781
+ this.value = donationJson.collected_amount;
782
+ this.target = donationJson.target_amount;
783
+ this.header = salla.lang.get('pages.products.target');
784
+ this.message = donationJson.target_end_date ? salla.lang.get('pages.products.donation_target_date') + ' ' + donationJson.target_end_date : '';
785
+ }
786
+ else {
787
+ //in case the product is not enabled target campaign
788
+ this.message = donationJson.target_amount
789
+ ? donationJson.target_message
790
+ : '';
791
+ }
792
+ }
793
+ }
794
+ catch (e) {
795
+ salla.log('Wrong donation json');
796
+ }
797
+ salla.lang.onLoaded(() => {
798
+ this.header = this.header?.replace('pages.products.target', salla.lang.get('pages.products.target'));
799
+ this.message = this.message?.replace('pages.products.donation_target_date', salla.lang.get('pages.products.donation_target_date'));
800
+ });
801
+ salla.onReady(() => {
802
+ this.color = this.color || salla.config.get('theme.color.primary', "#ffd5c4");
803
+ if (!this.unit) {
804
+ this.unit = salla.config.currency().symbol;
805
+ }
806
+ });
807
+ }
808
+ getPercentage() {
809
+ return (this.value / this.target) * 100;
810
+ }
811
+ render() {
812
+ if (!this.target && !this.message) {
813
+ return '';
814
+ }
815
+ return (h("div", { class: "s-progress-bar-container" }, this.header ? h("div", { class: "s-progress-bar-header" }, this.header) : '', this.getProgressBar(), this.message ? h("span", { class: "s-progress-bar-message" }, this.message) : ''));
816
+ }
817
+ getProgressBar() {
818
+ return this.target ? [
819
+ !this.hideUnits ? (h("div", { class: "s-progress-bar-target-section" }, h("span", { innerHTML: `${salla.helpers.number(this.value)} ${this.unit}` }), h("span", { innerHTML: `${salla.helpers.number(this.target)} ${this.unit}` }))) : null,
820
+ h("div", { class: "s-progress-bar-wrapper", style: { height: this.height } }, h("div", { class: {
821
+ "s-progress-bar-progress": true,
822
+ 's-progress-bar-progress-stripped': this.stripped
823
+ }, style: {
824
+ width: `${this.getPercentage()}%`,
825
+ backgroundColor: this.color
826
+ } }))
827
+ ] : null;
828
+ }
829
+ };
830
+ SallaProgressBar.style = sallaProgressBarCss;
831
+
832
+ export { SallaMap as salla_map, SallaProgressBar as salla_progress_bar };