@salla.sa/twilight-components 2.14.576 → 2.14.577

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 (470) hide show
  1. package/dist/cjs/{filepond-pMiRtx1x.js → filepond-iflxa4A5.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DxsZ8Mch.js → filepond-plugin-file-poster-NZ84xlKh.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-B6fa4wXz.js → filepond-plugin-file-validate-size-m8Z_JlZX.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-BEggFpci.js → filepond-plugin-file-validate-type-BfF6LYAT.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-BDwSySal.js → filepond-plugin-image-edit-DfRJ3iRj.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-HE8n94tY.js → filepond-plugin-image-exif-orientation-BZxYZai-.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-C-CaMrlm.js → filepond-plugin-image-preview-BQ7HvH2d.js} +1 -1
  8. package/dist/cjs/{helpers-Dm4BirHO.js → helpers-DBynEhOO.js} +0 -15
  9. package/dist/cjs/{index-B3IyDlYG.js → index-CSe-ijAV.js} +2 -2
  10. package/dist/cjs/{intlTelInput-CeiHZwpn.js → intlTelInput-DHfYz8vv.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +3 -3
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +3 -3
  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-applied-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +17 -17
  21. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +179 -187
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +160 -7
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
  26. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-form_9.cjs.entry.js +4 -4
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-count-down.cjs.entry.js +2 -2
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +2 -2
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +3 -3
  38. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gift-card-redeem.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-gifting.cjs.entry.js +3 -3
  42. package/dist/cjs/salla-hook.cjs.entry.js +2 -2
  43. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-list-tile.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-localization-modal.cjs.entry.js +2 -2
  47. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +15 -15
  49. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +3 -3
  50. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +2 -2
  52. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
  53. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +2 -2
  55. package/dist/cjs/salla-map_3.cjs.entry.js +4 -4
  56. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +4 -4
  59. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -6
  60. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
  61. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
  63. package/dist/cjs/salla-offer-modal.cjs.entry.js +2 -2
  64. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-details.cjs.entry.js +2 -2
  70. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +2 -2
  72. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
  76. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-payments.cjs.entry.js +3 -3
  79. package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
  80. package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
  81. package/dist/cjs/salla-product-card-embed.cjs.entry.js +2 -2
  82. package/dist/cjs/salla-product-card.cjs.entry.js +6 -6
  83. package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
  84. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +2 -2
  90. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search-product-card.cjs.entry.js +3 -3
  93. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
  95. package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
  96. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  97. package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
  98. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  100. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
  104. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
  107. package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
  108. package/dist/cjs/twilight.cjs.js +2 -2
  109. package/dist/cjs/{vanilla-picker-DBIBI2Jr.js → vanilla-picker-Brk9Mb54.js} +1 -1
  110. package/dist/collection/assets/svg/mini-map.svg +6 -30
  111. package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
  112. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +241 -238
  113. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +175 -146
  114. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.css +154 -92
  115. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +160 -5
  116. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -1
  117. package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
  118. package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -1
  119. package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -1
  120. package/dist/collection/components/salla-count-down/salla-count-down.js +1 -1
  121. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  122. package/dist/collection/components/salla-file-upload/salla-file-upload.js +2 -2
  123. package/dist/collection/components/salla-filters/salla-filters.js +1 -1
  124. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
  125. package/dist/collection/components/salla-gifting/salla-gifting.js +2 -2
  126. package/dist/collection/components/salla-hook/salla-hook.js +1 -1
  127. package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
  128. package/dist/collection/components/salla-loading/salla-loading.js +1 -1
  129. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
  130. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
  131. package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.js +1 -1
  132. package/dist/collection/components/salla-loyalty-program/salla-loyalty-exchange-product-card.js +2 -2
  133. package/dist/collection/components/salla-loyalty-program/salla-loyalty-hero.js +3 -3
  134. package/dist/collection/components/salla-loyalty-program/salla-loyalty-point.js +4 -4
  135. package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +2 -2
  136. package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +1 -1
  137. package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +3 -3
  138. package/dist/collection/components/salla-loyalty-program/salla-reward-exchange.js +1 -1
  139. package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
  140. package/dist/collection/components/salla-map/salla-map.js +3 -3
  141. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
  142. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
  143. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
  144. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +1 -1
  145. package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
  146. package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
  147. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
  148. package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
  149. package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.js +1 -1
  150. package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
  151. package/dist/collection/components/salla-payments/salla-payments.js +2 -2
  152. package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
  153. package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
  154. package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
  155. package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
  156. package/dist/collection/components/salla-product-card-embed/salla-product-card-embed.js +1 -1
  157. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
  158. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
  159. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
  160. package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
  161. package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.js +1 -1
  162. package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
  163. package/dist/collection/components/salla-search-product-card/salla-search-product-card.js +2 -2
  164. package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
  165. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  166. package/dist/collection/components/salla-social/salla-social.js +1 -1
  167. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
  168. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  169. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  170. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  171. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  172. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  173. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  174. package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
  175. package/dist/components/helpers.js +1 -15
  176. package/dist/components/index.js +2 -2
  177. package/dist/components/salla-accordion-head2.js +2 -2
  178. package/dist/components/salla-bullet-delivery.js +175 -184
  179. package/dist/components/salla-cart-coupons.js +161 -6
  180. package/dist/components/salla-cart-summary.js +1 -1
  181. package/dist/components/salla-color-picker2.js +1 -1
  182. package/dist/components/salla-comment-form2.js +1 -1
  183. package/dist/components/salla-conditional-fields2.js +1 -1
  184. package/dist/components/salla-count-down2.js +1 -1
  185. package/dist/components/salla-datetime-picker2.js +1 -1
  186. package/dist/components/salla-delivery-promise.js +1 -1
  187. package/dist/components/salla-file-upload2.js +2 -2
  188. package/dist/components/salla-filters-widget2.js +2 -2
  189. package/dist/components/salla-filters.js +1 -1
  190. package/dist/components/salla-gifting.js +2 -2
  191. package/dist/components/salla-hook.js +1 -1
  192. package/dist/components/salla-list-tile2.js +1 -1
  193. package/dist/components/salla-loading2.js +1 -1
  194. package/dist/components/salla-localization-modal.js +1 -1
  195. package/dist/components/salla-loyalty-exchange-product-card2.js +2 -2
  196. package/dist/components/salla-loyalty-hero2.js +3 -3
  197. package/dist/components/salla-loyalty-point2.js +4 -4
  198. package/dist/components/salla-loyalty-points-history.js +1 -1
  199. package/dist/components/salla-loyalty-prize-item.js +1 -1
  200. package/dist/components/salla-loyalty-reward.js +2 -2
  201. package/dist/components/salla-maintenance-alert.js +1 -1
  202. package/dist/components/salla-map2.js +3 -3
  203. package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
  204. package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
  205. package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
  206. package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
  207. package/dist/components/salla-multiple-bundle-product.js +1 -1
  208. package/dist/components/salla-notification-item2.js +1 -1
  209. package/dist/components/salla-offer-modal.js +1 -1
  210. package/dist/components/salla-order-details.js +1 -1
  211. package/dist/components/salla-order-edit-product-card.js +1 -1
  212. package/dist/components/salla-order-summary.js +1 -1
  213. package/dist/components/salla-payments.js +2 -2
  214. package/dist/components/salla-placeholder2.js +1 -1
  215. package/dist/components/salla-price-range2.js +2 -2
  216. package/dist/components/salla-product-availability2.js +1 -1
  217. package/dist/components/salla-product-card-embed.js +1 -1
  218. package/dist/components/salla-product-card2.js +5 -5
  219. package/dist/components/salla-product-size-guide.js +2 -2
  220. package/dist/components/salla-quantity-input2.js +1 -1
  221. package/dist/components/salla-quick-buy2.js +1 -1
  222. package/dist/components/salla-review-card2.js +1 -1
  223. package/dist/components/salla-review-factors-tags2.js +1 -1
  224. package/dist/components/salla-reviews-page.js +1 -1
  225. package/dist/components/salla-reward-card2.js +1 -1
  226. package/dist/components/salla-reward-details2.js +3 -3
  227. package/dist/components/salla-reward-exchange2.js +1 -1
  228. package/dist/components/salla-search-product-card2.js +2 -2
  229. package/dist/components/salla-searchable-dropdown2.js +4 -4
  230. package/dist/components/salla-skeleton2.js +1 -1
  231. package/dist/components/salla-social-share2.js +1 -1
  232. package/dist/components/salla-social.js +1 -1
  233. package/dist/components/salla-tab-content2.js +1 -1
  234. package/dist/components/salla-tab-header2.js +1 -1
  235. package/dist/components/salla-tabs2.js +1 -1
  236. package/dist/components/salla-tel-input2.js +1 -1
  237. package/dist/components/salla-tooltip2.js +1 -1
  238. package/dist/components/salla-user-settings.js +1 -1
  239. package/dist/components/salla-wishlist-actions.js +1 -1
  240. package/dist/esm/{filepond-C6VyLUVF.js → filepond-Qm94dFPs.js} +1 -1
  241. package/dist/esm/{filepond-plugin-file-poster-BfFqi2TO.js → filepond-plugin-file-poster-CHpnwHYe.js} +1 -1
  242. package/dist/esm/{filepond-plugin-file-validate-size-BBqb56CB.js → filepond-plugin-file-validate-size-BwHBxxMg.js} +1 -1
  243. package/dist/esm/{filepond-plugin-file-validate-type-O67G3mL2.js → filepond-plugin-file-validate-type-BD-yTEPO.js} +1 -1
  244. package/dist/esm/{filepond-plugin-image-edit-CGZyNJxN.js → filepond-plugin-image-edit-DKc0Yw10.js} +1 -1
  245. package/dist/esm/{filepond-plugin-image-exif-orientation-DA7fGQP3.js → filepond-plugin-image-exif-orientation-CepmNFGF.js} +1 -1
  246. package/dist/esm/{filepond-plugin-image-preview-BijvA1XW.js → filepond-plugin-image-preview-FhnzagMd.js} +1 -1
  247. package/dist/esm/{helpers-CV6uPJEJ.js → helpers-BJxBnTgv.js} +1 -15
  248. package/dist/esm/{index-VyEjj_Gx.js → index-BAXTlrSC.js} +2 -2
  249. package/dist/esm/{intlTelInput-DE-bT5KJ.js → intlTelInput-BJlOPJYY.js} +1 -1
  250. package/dist/esm/loader.js +3 -3
  251. package/dist/esm/salla-accordion-body_2.entry.js +3 -3
  252. package/dist/esm/salla-accordion_6.entry.js +2 -2
  253. package/dist/esm/salla-add-product-button_5.entry.js +3 -3
  254. package/dist/esm/salla-advertisement.entry.js +1 -1
  255. package/dist/esm/salla-alert_2.entry.js +1 -1
  256. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  257. package/dist/esm/salla-applied-filters.entry.js +1 -1
  258. package/dist/esm/salla-apps-icons.entry.js +1 -1
  259. package/dist/esm/salla-attachment-view_9.entry.js +17 -17
  260. package/dist/esm/salla-badge.entry.js +1 -1
  261. package/dist/esm/salla-basket-gap.entry.js +1 -1
  262. package/dist/esm/salla-bullet-delivery_3.entry.js +179 -187
  263. package/dist/esm/salla-cart-coupons.entry.js +160 -7
  264. package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
  265. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  266. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  267. package/dist/esm/salla-comment-factors.entry.js +1 -1
  268. package/dist/esm/salla-comment-form_9.entry.js +4 -4
  269. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  270. package/dist/esm/salla-contacts.entry.js +1 -1
  271. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  272. package/dist/esm/salla-count-down.entry.js +2 -2
  273. package/dist/esm/salla-custom-fields.entry.js +1 -1
  274. package/dist/esm/salla-delivery-promise.entry.js +2 -2
  275. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  276. package/dist/esm/salla-filters-widget.entry.js +3 -3
  277. package/dist/esm/salla-filters.entry.js +2 -2
  278. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  279. package/dist/esm/salla-gift-card-redeem.entry.js +1 -1
  280. package/dist/esm/salla-gifting.entry.js +3 -3
  281. package/dist/esm/salla-hook.entry.js +2 -2
  282. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  283. package/dist/esm/salla-installment.entry.js +1 -1
  284. package/dist/esm/salla-list-tile.entry.js +2 -2
  285. package/dist/esm/salla-localization-modal.entry.js +2 -2
  286. package/dist/esm/salla-login-modal.entry.js +1 -1
  287. package/dist/esm/salla-loyalty-banner_10.entry.js +15 -15
  288. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +3 -3
  289. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  290. package/dist/esm/salla-loyalty-points-history.entry.js +2 -2
  291. package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
  292. package/dist/esm/salla-loyalty.entry.js +1 -1
  293. package/dist/esm/salla-maintenance-alert.entry.js +2 -2
  294. package/dist/esm/salla-map_3.entry.js +4 -4
  295. package/dist/esm/salla-menu.entry.js +1 -1
  296. package/dist/esm/salla-metadata.entry.js +1 -1
  297. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +4 -4
  298. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -6
  299. package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
  300. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  301. package/dist/esm/salla-notification-item_2.entry.js +2 -2
  302. package/dist/esm/salla-offer-modal.entry.js +2 -2
  303. package/dist/esm/salla-offer.entry.js +1 -1
  304. package/dist/esm/salla-order-branch.entry.js +1 -1
  305. package/dist/esm/salla-order-cancel.entry.js +1 -1
  306. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  307. package/dist/esm/salla-order-details-options.entry.js +1 -1
  308. package/dist/esm/salla-order-details.entry.js +2 -2
  309. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  310. package/dist/esm/salla-order-edit-product-card.entry.js +2 -2
  311. package/dist/esm/salla-order-edit.entry.js +1 -1
  312. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  313. package/dist/esm/salla-order-shipments.entry.js +1 -1
  314. package/dist/esm/salla-order-summary.entry.js +2 -2
  315. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  316. package/dist/esm/salla-orders.entry.js +1 -1
  317. package/dist/esm/salla-payments.entry.js +3 -3
  318. package/dist/esm/salla-placeholder.entry.js +2 -2
  319. package/dist/esm/salla-price-range.entry.js +3 -3
  320. package/dist/esm/salla-product-card-embed.entry.js +2 -2
  321. package/dist/esm/salla-product-card.entry.js +6 -6
  322. package/dist/esm/salla-product-size-guide.entry.js +3 -3
  323. package/dist/esm/salla-products-list.entry.js +1 -1
  324. package/dist/esm/salla-products-slider.entry.js +1 -1
  325. package/dist/esm/salla-quick-order.entry.js +1 -1
  326. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  327. package/dist/esm/salla-rating-modal.entry.js +1 -1
  328. package/dist/esm/salla-review-factors-tags.entry.js +2 -2
  329. package/dist/esm/salla-review-order-item.entry.js +1 -1
  330. package/dist/esm/salla-scopes.entry.js +1 -1
  331. package/dist/esm/salla-search-product-card.entry.js +3 -3
  332. package/dist/esm/salla-search.entry.js +1 -1
  333. package/dist/esm/salla-skeleton.entry.js +2 -2
  334. package/dist/esm/salla-social-share.entry.js +2 -2
  335. package/dist/esm/salla-social.entry.js +2 -2
  336. package/dist/esm/salla-tab-content_3.entry.js +4 -4
  337. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  338. package/dist/esm/salla-tooltip.entry.js +2 -2
  339. package/dist/esm/salla-trust-badges.entry.js +1 -1
  340. package/dist/esm/salla-user-menu.entry.js +1 -1
  341. package/dist/esm/salla-user-profile.entry.js +1 -1
  342. package/dist/esm/salla-user-settings.entry.js +2 -2
  343. package/dist/esm/salla-verify.entry.js +1 -1
  344. package/dist/esm/salla-wallet.entry.js +1 -1
  345. package/dist/esm/salla-wishlist-actions.entry.js +2 -2
  346. package/dist/esm/salla-wishlist-summary.entry.js +1 -1
  347. package/dist/esm/twilight.js +3 -3
  348. package/dist/esm/{vanilla-picker-BVwvMAEs.js → vanilla-picker-C_cY41gl.js} +1 -1
  349. package/dist/twilight/{p-f7063e39.entry.js → p-00a727c3.entry.js} +1 -1
  350. package/dist/twilight/{p-0987a1bf.entry.js → p-0227316e.entry.js} +1 -1
  351. package/dist/twilight/{p-4bcf0187.entry.js → p-03c959bb.entry.js} +1 -1
  352. package/dist/twilight/{p-e2d0eb4c.entry.js → p-072ee78f.entry.js} +1 -1
  353. package/dist/twilight/{p-f291fd6b.entry.js → p-073e1363.entry.js} +1 -1
  354. package/dist/twilight/{p-cbaa45a4.entry.js → p-0806da7e.entry.js} +1 -1
  355. package/dist/twilight/{p-c6e6daf9.entry.js → p-08cedab0.entry.js} +1 -1
  356. package/dist/twilight/{p-f7f35e00.entry.js → p-0bcca7f8.entry.js} +1 -1
  357. package/dist/twilight/{p-565f021e.entry.js → p-10a68a21.entry.js} +1 -1
  358. package/dist/twilight/{p-d4466357.entry.js → p-13abf9ca.entry.js} +1 -1
  359. package/dist/twilight/{p-a4ba6008.entry.js → p-13c35685.entry.js} +1 -1
  360. package/dist/twilight/{p-63a287b4.entry.js → p-162fa48e.entry.js} +1 -1
  361. package/dist/twilight/{p-38f82c85.entry.js → p-1762fd86.entry.js} +1 -1
  362. package/dist/twilight/{p-a2bf4487.entry.js → p-18c41e9a.entry.js} +1 -1
  363. package/dist/twilight/{p-76843521.entry.js → p-1fbb0b22.entry.js} +1 -1
  364. package/dist/twilight/{p-d0445027.entry.js → p-1fd6a10e.entry.js} +1 -1
  365. package/dist/twilight/p-28cdaf6b.entry.js +4 -0
  366. package/dist/twilight/{p-15fd28e8.entry.js → p-292a0b4a.entry.js} +1 -1
  367. package/dist/twilight/{p-9eebb417.entry.js → p-2ba4956f.entry.js} +1 -1
  368. package/dist/twilight/{p-faa90387.entry.js → p-2c543420.entry.js} +1 -1
  369. package/dist/twilight/{p-d59a53f5.entry.js → p-2e3a56de.entry.js} +1 -1
  370. package/dist/twilight/p-2e4064eb.entry.js +4 -0
  371. package/dist/twilight/{p-4abd6abc.entry.js → p-3153f560.entry.js} +1 -1
  372. package/dist/twilight/{p-55469fd9.entry.js → p-3a3815a2.entry.js} +1 -1
  373. package/dist/twilight/{p-63af5354.entry.js → p-3cef6be2.entry.js} +1 -1
  374. package/dist/twilight/{p-bc1251f6.entry.js → p-3dd612a6.entry.js} +1 -1
  375. package/dist/twilight/{p-95494a3d.entry.js → p-411c1ab0.entry.js} +1 -1
  376. package/dist/twilight/p-423d852d.entry.js +4 -0
  377. package/dist/twilight/{p-d5d8230d.entry.js → p-44a6598e.entry.js} +1 -1
  378. package/dist/twilight/{p-f889b4d2.entry.js → p-51d83216.entry.js} +1 -1
  379. package/dist/twilight/{p-354f6595.entry.js → p-51fb8841.entry.js} +1 -1
  380. package/dist/twilight/{p-82186e1c.entry.js → p-56609a91.entry.js} +1 -1
  381. package/dist/twilight/{p-f265b4ea.entry.js → p-58c1bf51.entry.js} +1 -1
  382. package/dist/twilight/{p-10da5fab.entry.js → p-59a7ca2e.entry.js} +1 -1
  383. package/dist/twilight/{p-c032ca19.entry.js → p-5a77257c.entry.js} +1 -1
  384. package/dist/twilight/{p-c1f9932b.entry.js → p-5c4e2ed3.entry.js} +1 -1
  385. package/dist/twilight/{p-2438d7e1.entry.js → p-5f464161.entry.js} +1 -1
  386. package/dist/twilight/{p-58398f44.entry.js → p-637670fa.entry.js} +1 -1
  387. package/dist/twilight/{p-80cf8042.entry.js → p-6605f258.entry.js} +1 -1
  388. package/dist/twilight/{p-ca7cd467.entry.js → p-665bc308.entry.js} +1 -1
  389. package/dist/twilight/{p-55afe19f.entry.js → p-6bfe12d5.entry.js} +1 -1
  390. package/dist/twilight/{p-b06b0973.entry.js → p-6de608eb.entry.js} +1 -1
  391. package/dist/twilight/{p-a291f319.entry.js → p-6f9bc285.entry.js} +1 -1
  392. package/dist/twilight/{p-85d5c0b6.entry.js → p-70451662.entry.js} +1 -1
  393. package/dist/twilight/{p-9417b38b.entry.js → p-7b0cf8a1.entry.js} +1 -1
  394. package/dist/twilight/{p-b35956cc.entry.js → p-7d08dcfb.entry.js} +1 -1
  395. package/dist/twilight/{p-ec378cee.entry.js → p-7d37b650.entry.js} +1 -1
  396. package/dist/twilight/{p-7d4c9e95.entry.js → p-7f3e110c.entry.js} +1 -1
  397. package/dist/twilight/{p-ceae3b17.entry.js → p-80302c52.entry.js} +1 -1
  398. package/dist/twilight/{p-47ddfc87.entry.js → p-806083b4.entry.js} +1 -1
  399. package/dist/twilight/{p-bb2c9ac9.entry.js → p-84cff600.entry.js} +1 -1
  400. package/dist/twilight/{p-66be47ec.entry.js → p-884104a3.entry.js} +1 -1
  401. package/dist/twilight/{p-140bf9e1.entry.js → p-898ce93b.entry.js} +1 -1
  402. package/dist/twilight/{p-90033ecc.entry.js → p-8a865d37.entry.js} +1 -1
  403. package/dist/twilight/{p-08bcc8c6.entry.js → p-8c750736.entry.js} +1 -1
  404. package/dist/twilight/{p-6c4d3288.entry.js → p-8fc2eb01.entry.js} +1 -1
  405. package/dist/twilight/{p-02df3435.entry.js → p-97fee81d.entry.js} +1 -1
  406. package/dist/twilight/{p-c95f4657.entry.js → p-9920bbad.entry.js} +1 -1
  407. package/dist/twilight/{p-237ee8db.entry.js → p-99b9bf66.entry.js} +1 -1
  408. package/dist/twilight/{p-dcba291c.entry.js → p-9b4a0dd3.entry.js} +1 -1
  409. package/dist/twilight/{p-b7e14e40.entry.js → p-9e054110.entry.js} +1 -1
  410. package/dist/twilight/{p-VyEjj_Gx.js → p-BAXTlrSC.js} +1 -1
  411. package/dist/twilight/p-BJxBnTgv.js +4 -0
  412. package/dist/twilight/{p-MofCSty6.js → p-BWpg3MwW.js} +1 -1
  413. package/dist/twilight/{p-CVE_4GIW.js → p-C6WaobtY.js} +1 -1
  414. package/dist/twilight/p-CvebbG3m.js +9 -0
  415. package/dist/twilight/{p-k8NfWBBa.js → p-D5lNzFgl.js} +1 -1
  416. package/dist/twilight/{p-Dht_HSXg.js → p-DGzNHmGp.js} +2 -2
  417. package/dist/twilight/{p-XWoqFS1d.js → p-DnrvXyI6.js} +1 -1
  418. package/dist/twilight/{p-BqBflUu5.js → p-DpI1J-G1.js} +1 -1
  419. package/dist/twilight/{p-DtngMbK9.js → p-SguJQlDo.js} +1 -1
  420. package/dist/twilight/{p-BZQPZ7Vk.js → p-_f6GlygH.js} +1 -1
  421. package/dist/twilight/{p-22efe055.entry.js → p-a2d07dba.entry.js} +1 -1
  422. package/dist/twilight/{p-a5dc1d5e.entry.js → p-a73a785d.entry.js} +1 -1
  423. package/dist/twilight/{p-b930b2ba.entry.js → p-a79c04a2.entry.js} +1 -1
  424. package/dist/twilight/{p-9df6ef40.entry.js → p-a9fcdac5.entry.js} +1 -1
  425. package/dist/twilight/{p-a185519a.entry.js → p-ab3ad37f.entry.js} +1 -1
  426. package/dist/twilight/{p-12bcfd57.entry.js → p-abc3e5d5.entry.js} +1 -1
  427. package/dist/twilight/{p-e6803d06.entry.js → p-b356f3f6.entry.js} +1 -1
  428. package/dist/twilight/{p-c593919c.entry.js → p-b55fb51b.entry.js} +1 -1
  429. package/dist/twilight/{p-1b2ce7bb.entry.js → p-bb35af04.entry.js} +1 -1
  430. package/dist/twilight/{p-f12fc91c.entry.js → p-bf845ea7.entry.js} +1 -1
  431. package/dist/twilight/{p-19c39465.entry.js → p-c2e871ae.entry.js} +1 -1
  432. package/dist/twilight/{p-9a0ad6b4.entry.js → p-c38fb150.entry.js} +1 -1
  433. package/dist/twilight/{p-b9e85434.entry.js → p-c63ff8ef.entry.js} +1 -1
  434. package/dist/twilight/{p-724be00d.entry.js → p-c90600b1.entry.js} +1 -1
  435. package/dist/twilight/{p-b3a36e11.entry.js → p-cc1b3318.entry.js} +1 -1
  436. package/dist/twilight/{p-a990b069.entry.js → p-ce1d3ad9.entry.js} +1 -1
  437. package/dist/twilight/{p-9f485845.entry.js → p-ce80fb8f.entry.js} +1 -1
  438. package/dist/twilight/{p-88918b1b.entry.js → p-d3556d1f.entry.js} +1 -1
  439. package/dist/twilight/{p-85a81ddd.entry.js → p-d3cf9f8a.entry.js} +1 -1
  440. package/dist/twilight/{p-f1d0d4da.entry.js → p-dd18ac5c.entry.js} +1 -1
  441. package/dist/twilight/p-dda4d231.entry.js +4 -0
  442. package/dist/twilight/{p-7ef406e5.entry.js → p-e0d834a7.entry.js} +1 -1
  443. package/dist/twilight/{p-09ab0b69.entry.js → p-e4ff7a77.entry.js} +1 -1
  444. package/dist/twilight/{p-2d43aaae.entry.js → p-e66856c5.entry.js} +1 -1
  445. package/dist/twilight/{p-bb83242c.entry.js → p-e7c4d4cc.entry.js} +1 -1
  446. package/dist/twilight/{p-70577d8b.entry.js → p-e944f02a.entry.js} +1 -1
  447. package/dist/twilight/{p-915965eb.entry.js → p-e95fd91e.entry.js} +1 -1
  448. package/dist/twilight/{p-6d46f977.entry.js → p-ea7846fd.entry.js} +1 -1
  449. package/dist/twilight/{p-29bc507d.entry.js → p-f0ca37fc.entry.js} +1 -1
  450. package/dist/twilight/{p-2aa87b3c.entry.js → p-f2e13d28.entry.js} +1 -1
  451. package/dist/twilight/{p-370939c2.entry.js → p-f514b9f5.entry.js} +1 -1
  452. package/dist/twilight/p-fa6f2b27.entry.js +4 -0
  453. package/dist/twilight/{p-a8f4fa9e.entry.js → p-faadae59.entry.js} +1 -1
  454. package/dist/twilight/{p-7f38bccf.entry.js → p-fc500047.entry.js} +1 -1
  455. package/dist/twilight/p-fdc97278.entry.js +4 -0
  456. package/dist/twilight/twilight.esm.js +1 -1
  457. package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +6 -0
  458. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +25 -12
  459. package/dist/types/components/salla-cart-coupons/interfaces.d.ts +20 -0
  460. package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +49 -1
  461. package/dist/types/components.d.ts +2 -2
  462. package/package.json +5 -5
  463. package/dist/twilight/p-26105855.entry.js +0 -4
  464. package/dist/twilight/p-4198d092.entry.js +0 -4
  465. package/dist/twilight/p-BB5KMFvk.js +0 -9
  466. package/dist/twilight/p-CV6uPJEJ.js +0 -4
  467. package/dist/twilight/p-c63be3cf.entry.js +0 -4
  468. package/dist/twilight/p-d6c4c0f7.entry.js +0 -4
  469. package/dist/twilight/p-f059fb37.entry.js +0 -4
  470. package/dist/twilight/p-fe8cb1d6.entry.js +0 -4
@@ -3,14 +3,13 @@
3
3
  */
4
4
  import { h, Host, } from "@stencil/core";
5
5
  import { bulletDeliveryAPI, clearApiCache, isSaudiArabia } from "./api-service";
6
- import { buildAddressLocationPayloadFromSelection, filterBranches, findNearestBranch, getGeolocationErrorMessage, getIntentBranchId, getIntentCityId, getIntentCountryCode, getIntentCountryId, getIntentDistrictId, getIntentLatitude, getIntentLongitude, getIntentRegionId, getIntentSubtitle, hasSessionAddressIntent, isMapOriginIntent, isBranchSelectable, requireRegionAndDistrictForSA, } from "./helpers";
6
+ import { filterBranches, findNearestBranch, getGeolocationErrorMessage, getIntentBranchId, getIntentCityId, getIntentCountryCode, getIntentCountryId, getIntentDistrictId, getIntentLatitude, getIntentLongitude, getIntentRegionId, getIntentSubtitle, hasSessionAddressIntent, isMapOriginIntent, isBranchSelectable, requireRegionAndDistrictForSA, } from "./helpers";
7
7
  const BRANCH_SEARCH_DEBOUNCE_MS = 1000;
8
8
  const GEOLOCATION_TIMEOUT = 10000;
9
9
  /** Final fallback center used only if `user.default_geo_location` is absent (Riyadh — matches checkout map-page). */
10
10
  const DEFAULT_MAP_CENTER = { lat: 24.7756042, lng: 46.7360729 };
11
11
  import GetDirections from "../../assets/svg/get-directions.svg";
12
12
  import GPS from "../../assets/svg/gps.svg";
13
- import LocationTag from "../../assets/svg/location-tag.svg";
14
13
  import Location from "../../assets/svg/location.svg";
15
14
  import MiniMap from "../../assets/svg/mini-map.svg";
16
15
  import Search from "../../assets/svg/search.svg";
@@ -27,7 +26,6 @@ function log(message, data) {
27
26
  */
28
27
  export class SallaBulletDelivery {
29
28
  constructor() {
30
- this.confirming = false;
31
29
  this.pendingCartSubmitResolver = null;
32
30
  this.pendingCartSubmitPromise = null;
33
31
  this.cartSubmitConfirmationPending = false;
@@ -48,6 +46,8 @@ export class SallaBulletDelivery {
48
46
  this.cartSubmittingHandler = null;
49
47
  this.useCartEventApi = false;
50
48
  this.authLoggedInHandler = null;
49
+ /** Re-entrancy latch for tryAutoConfirmAfterLogin(); a flaky/duplicate auth::logged.in must not double-save. */
50
+ this.autoConfirmAfterLoginInFlight = false;
51
51
  this.authLoggedOutHandler = null;
52
52
  this.loginOpenHandler = null;
53
53
  this.hasExplicitPreselectedIdsForOpen = false;
@@ -101,7 +101,6 @@ export class SallaBulletDelivery {
101
101
  this.loadingBranches = false;
102
102
  this.loadingNearestBranch = false;
103
103
  this.locationError = "";
104
- this.savingAddress = false;
105
104
  this.loadingSavedAddresses = false;
106
105
  this.showCartWillBeClearedBanner = false;
107
106
  // Searchable dropdown state
@@ -124,10 +123,10 @@ export class SallaBulletDelivery {
124
123
  this.addressToken = null;
125
124
  this.loadingToken = false;
126
125
  this.mapReady = false;
127
- this.mapStep = 'map';
128
126
  this.addressDescription = '';
129
127
  /** True while reverse-geocoding a map-click/geolocation pick (no place from the map component itself). */
130
128
  this.reverseGeocoding = false;
129
+ this.confirming = false;
131
130
  this.newAddressForm = {
132
131
  ...SallaBulletDelivery.INITIAL_ADDRESS_FORM,
133
132
  };
@@ -256,62 +255,35 @@ export class SallaBulletDelivery {
256
255
  }
257
256
  }
258
257
  };
258
+ // ─── End Map methods ───
259
259
  /**
260
- * Submit add-address form: create address via API then switch back to list.
260
+ * Submit add-address form: stage the picked address/dropdowns as the session intent,
261
+ * then delegate to handleConfirm() for the single save→allocate→close path (avoids
262
+ * a second, independently-maintained "save an address" implementation — see SHPD-9907).
261
263
  */
262
- this.handleSubmitAddAddress = async (e) => {
264
+ this.handleSubmitNewAddress = async (e) => {
263
265
  e.preventDefault();
264
- if (this.savingAddress)
266
+ if (this.confirming)
265
267
  return;
266
- const hasMap = this.hasMapLocation();
268
+ const hasMap = this.canConfirmMapLocation();
267
269
  const hasDropdowns = this.selectedCountry && this.selectedCity;
268
270
  if (!hasMap && !hasDropdowns)
269
271
  return;
270
272
  if (!hasMap &&
271
273
  !requireRegionAndDistrictForSA(this.selectedCountry?.code, this.selectedRegion?.id, this.selectedDistrict?.id ?? (this.districtName?.trim() || null)))
272
274
  return;
273
- this.savingAddress = true;
274
- try {
275
- const payload = this.buildAddressLocationPayload();
276
- const { success, address } = await bulletDeliveryAPI.saveAddressLocation(payload);
277
- if (success) {
278
- await this.loadSavedAddresses();
279
- const latest = address ?? this.savedAddresses[0] ?? null;
280
- if (latest?.is_in_coverage) {
281
- this.selectedSessionAddress = false;
282
- this.selectedSavedAddress = latest;
283
- }
284
- this.addressCreated.emit({ address: latest });
285
- this.viewMode = "main";
286
- this.districtName = "";
287
- this.mapLocationData = null;
288
- this.invalidatePendingGeocode();
289
- this.mapStep = 'map';
290
- this.addressDescription = '';
291
- }
292
- else {
293
- if (!this.isLoggedIn) {
294
- Salla.notify?.error(Salla.lang.get('pages.checkout.login_to_use_saved_addresses'));
295
- this.handleLogin();
296
- }
297
- else {
298
- Salla.notify?.error(Salla.lang.get("common.errors.error_occurred"));
299
- }
300
- }
301
- }
302
- catch (error) {
303
- console.error("SallaBulletDelivery: Error saving address", error);
304
- if (!this.isLoggedIn) {
305
- Salla.notify?.error(Salla.lang.get('pages.checkout.login_to_use_saved_addresses'));
306
- this.handleLogin();
307
- }
308
- else {
309
- Salla.notify?.error(Salla.lang.get("common.errors.error_occurred"));
310
- }
311
- }
312
- finally {
313
- this.savingAddress = false;
314
- }
275
+ const details = this.buildIntentAddress();
276
+ if (!details)
277
+ return;
278
+ this.setStoredIntent({
279
+ type: "address",
280
+ country_id: Number(this.selectedCountry?.id) || 0,
281
+ country_code: this.selectedCountry?.code || "",
282
+ address_details: details,
283
+ });
284
+ this.selectedSavedAddress = null;
285
+ this.selectedSessionAddress = true;
286
+ await this.handleConfirm();
315
287
  };
316
288
  this.handleCountrySelected = (item) => {
317
289
  const country = this.countries.find(c => String(c.id) === String(item.id)) || item;
@@ -391,9 +363,12 @@ export class SallaBulletDelivery {
391
363
  return Salla.config.isMobileApp();
392
364
  }
393
365
  /**
394
- * Opens the bullet delivery modal
366
+ * Opens the bullet delivery modal. Pass `silent: true` to run the same state/data
367
+ * loading below without showing the modal — used by tryAutoConfirmAfterLogin() so a
368
+ * successful auto-confirm never flashes the saved-addresses list; the caller is
369
+ * responsible for revealing the modal itself if it still needs the customer's input.
395
370
  */
396
- async open() {
371
+ async open(silent = false) {
397
372
  if (!this.isEnabled)
398
373
  return; // feature disabled — never open
399
374
  // If mobile app, open the sheet
@@ -408,9 +383,11 @@ export class SallaBulletDelivery {
408
383
  }
409
384
  // Reset state before opening
410
385
  this.resetState();
411
- // Open modal immediately — fields render right away with inline loading
412
- this.modal.open();
413
- Salla.event.dispatch("salla::bullet-delivery.modal.opened");
386
+ if (!silent) {
387
+ // Open modal immediately — fields render right away with inline loading
388
+ this.modal.open();
389
+ Salla.event.dispatch("salla::bullet-delivery.modal.opened");
390
+ }
414
391
  try {
415
392
  this.isLoggedIn = !this.isGuestUser();
416
393
  const savedIntent = this.cleanStaleGuestAddressIdIfNeeded(this.getStoredIntent());
@@ -502,6 +479,7 @@ export class SallaBulletDelivery {
502
479
  this.mapLocationData = null;
503
480
  this.invalidatePendingGeocode();
504
481
  this.autoGeolocationTriggered = false;
482
+ this.addressDescription = "";
505
483
  this.selectedCountry = null;
506
484
  this.selectedRegion = null;
507
485
  this.selectedCity = null;
@@ -600,12 +578,65 @@ export class SallaBulletDelivery {
600
578
  return false;
601
579
  if (!this.isIntentMethodSupported(intent))
602
580
  return false;
581
+ // address_id/branch_id alone isn't enough — saveSessionAddressToProfile() persists
582
+ // address_id as soon as the address is *saved*, before allocation even runs, so a
583
+ // later allocation failure must not make this look complete. scope_allocated is only
584
+ // ever explicitly false (that saved-not-allocated state) or true; undefined means a
585
+ // legacy intent persisted before this field existed (or one written elsewhere without
586
+ // an outcome yet) — treat that the same as before rather than incorrectly re-prompting
587
+ // returning customers who already had a valid, complete intent.
588
+ if (intent.scope_allocated === false)
589
+ return false;
603
590
  if (intent.type === "address")
604
591
  return !!intent.address_id;
605
592
  if (intent.type === "branch")
606
593
  return !!intent.branch_id;
607
594
  return false;
608
595
  }
596
+ /**
597
+ * Auto-save + allocate a guest's pre-login address pick the moment auth::logged.in
598
+ * fires, instead of reopening the modal and waiting for another "Confirm" click
599
+ * (SHPD-9907). Guarded by hasIncompleteUserAddressIntent(), which only turns false
600
+ * once the intent gains an address_id — a durable guard even across a duplicate
601
+ * event, unlike `confirming` alone which resets after the redirect timeout.
602
+ */
603
+ async tryAutoConfirmAfterLogin() {
604
+ if (this.confirming || this.autoConfirmAfterLoginInFlight)
605
+ return false;
606
+ if (!this.hasIncompleteUserAddressIntent())
607
+ return false;
608
+ this.autoConfirmAfterLoginInFlight = true;
609
+ const wasVisible = !!this.modal?.hasAttribute?.("visible");
610
+ try {
611
+ if (!wasVisible) {
612
+ // Load silently — a successful auto-confirm should never flash the
613
+ // saved-addresses list; only reveal the modal below if it can't finish on its own.
614
+ await this.open(true);
615
+ }
616
+ // open() -> loadSavedAddresses() already sets selectedSessionAddress when a
617
+ // session intent exists; bail if that didn't happen (e.g. address_id already set).
618
+ if (!this.selectedSessionAddress) {
619
+ if (!wasVisible)
620
+ this.modal?.open();
621
+ return false;
622
+ }
623
+ await this.handleConfirm();
624
+ // Checking hasCompleteIntentForLoggedInUser() (rather than just
625
+ // allocationOutOfCoverageMessage) also catches a *save* failure — handleConfirm()
626
+ // returns early on that before ever setting an allocation message, which used to
627
+ // make this report success even though nothing was actually confirmed.
628
+ if (!wasVisible && !this.hasCompleteIntentForLoggedInUser()) {
629
+ // Save or allocation failed — surface the modal so the customer can see why
630
+ // and retry or pick a different address.
631
+ this.modal?.open();
632
+ return false;
633
+ }
634
+ return true;
635
+ }
636
+ finally {
637
+ this.autoConfirmAfterLoginInFlight = false;
638
+ }
639
+ }
609
640
  /**
610
641
  * Authenticated users on the cart page must select/confirm an address before
611
642
  * they can dismiss the modal.
@@ -1217,10 +1248,13 @@ export class SallaBulletDelivery {
1217
1248
  this.viewMode = "main";
1218
1249
  this.mapLocationData = null;
1219
1250
  this.invalidatePendingGeocode();
1220
- this.mapStep = 'map';
1221
1251
  this.addressDescription = '';
1222
1252
  this.autoGeolocationTriggered = false;
1223
1253
  }
1254
+ /** Whether there's a saved-addresses list (or a pending session intent) to go back to from the add-address view. */
1255
+ hasAddressesToGoBack() {
1256
+ return this.savedAddresses.length > 0 || hasSessionAddressIntent(this.getStoredIntent());
1257
+ }
1224
1258
  // ─── Map methods ───
1225
1259
  async fetchAddressToken() {
1226
1260
  if (this.addressToken || this.loadingToken)
@@ -1319,9 +1353,13 @@ export class SallaBulletDelivery {
1319
1353
  get isMapModeAvailable() {
1320
1354
  return this.isMapSettingEnabled && !!salla.config.get('store.settings.keys.maps') && !!this.addressToken;
1321
1355
  }
1356
+ /** In map mode and a pin has already been dropped (as opposed to still using the dropdowns), regardless of login state. */
1357
+ get isMapPick() {
1358
+ return this.isMapModeAvailable && this.hasMapLocation();
1359
+ }
1322
1360
  /** Guest is in map mode and has already dropped a pin (as opposed to still using the dropdowns). */
1323
1361
  get isGuestMapPick() {
1324
- return !this.isLoggedIn && this.isMapModeAvailable && this.hasMapLocation();
1362
+ return !this.isLoggedIn && this.isMapPick;
1325
1363
  }
1326
1364
  /** Center shown before geolocation resolves — the customer's IP-based default (falls back to Riyadh). */
1327
1365
  get mapInitialCenter() {
@@ -1344,32 +1382,6 @@ export class SallaBulletDelivery {
1344
1382
  const num = Number(value);
1345
1383
  return Number.isFinite(num) ? num : null;
1346
1384
  }
1347
- // ─── End Map methods ───
1348
- /**
1349
- * Build address/location payload from guest-form state (same fields as add-address).
1350
- */
1351
- buildAddressLocationPayload() {
1352
- if (this.isMapModeAvailable && this.hasMapLocation()) {
1353
- return {
1354
- lat: this.mapLocationData.lat,
1355
- lng: this.mapLocationData.lng,
1356
- ...(this.mapLocationData.shortAddress && { short_address: this.mapLocationData.shortAddress }),
1357
- ...(this.addressDescription?.trim() && { description: this.addressDescription.trim() }),
1358
- };
1359
- }
1360
- const districtName = this.selectedDistrict?.name ?? this.districtName?.trim() ?? "";
1361
- return buildAddressLocationPayloadFromSelection({
1362
- countryId: this.selectedCountry?.id ?? 0,
1363
- countryCode: this.selectedCountry?.code,
1364
- regionId: this.selectedRegion?.id,
1365
- cityId: this.selectedCity?.id,
1366
- districtId: this.selectedDistrict?.id,
1367
- description: districtName,
1368
- lat: this.mapLocationData?.lat,
1369
- lng: this.mapLocationData?.lng,
1370
- shortAddress: this.mapLocationData?.shortAddress,
1371
- });
1372
- }
1373
1385
  async handleTabChange(tab) {
1374
1386
  if (this.tabChanging)
1375
1387
  return;
@@ -1531,7 +1543,7 @@ export class SallaBulletDelivery {
1531
1543
  * when already open AND already correctly reflecting the logged-in state, so a duplicate
1532
1544
  * auth::logged.in firing can't reset in-progress form input or cause a visible re-render flicker.
1533
1545
  */
1534
- handlePendingSubmitAfterLogin() {
1546
+ async handlePendingSubmitAfterLogin() {
1535
1547
  // auth::logged.in can fire prematurely (e.g. a silent cross-store login attempt,
1536
1548
  // packages/twilight/src/api/cart.js's tryCrossStoreLogin, whose profile sync can complete
1537
1549
  // without actually flipping the session to logged-in) while Salla.config still reports a
@@ -1545,6 +1557,10 @@ export class SallaBulletDelivery {
1545
1557
  this.resolvePendingCartSubmit();
1546
1558
  return;
1547
1559
  }
1560
+ // handleConfirm()'s own close() resolves the pending cart-submit gate, so
1561
+ // just return on success rather than resolving it a second time here.
1562
+ if (await this.tryAutoConfirmAfterLogin())
1563
+ return;
1548
1564
  if (!this.modal?.hasAttribute?.("visible") || !this.isLoggedIn) {
1549
1565
  this.open();
1550
1566
  }
@@ -1552,7 +1568,7 @@ export class SallaBulletDelivery {
1552
1568
  buildIntentAddress() {
1553
1569
  if (this.activeTab !== "address")
1554
1570
  return undefined;
1555
- if (this.isGuestMapPick && this.mapLocationData) {
1571
+ if (this.isMapPick && this.mapLocationData) {
1556
1572
  const { lat, lng, formattedAddress, shortAddress } = this.mapLocationData;
1557
1573
  return {
1558
1574
  country: this.selectedCountry
@@ -1943,6 +1959,20 @@ export class SallaBulletDelivery {
1943
1959
  ? String(allocationBranchId)
1944
1960
  : undefined,
1945
1961
  });
1962
+ // Applying the allocated scope to this session must succeed before treating the
1963
+ // confirmation as done — allocateScope() only creates the allocation server-side;
1964
+ // setDeliveryScope() is what makes *this* session use it. Ignoring its result let
1965
+ // checkout proceed (and scope_allocated get persisted) even when it failed.
1966
+ if (allocatedScopeId) {
1967
+ const scopeApplied = await bulletDeliveryAPI.setDeliveryScope(allocatedScopeId);
1968
+ if (!scopeApplied) {
1969
+ this.allocationOutOfCoverageMessage = `${Salla.lang.get("common.errors.error_occurred")}.`;
1970
+ this.confirmBtn?.stop();
1971
+ this.confirming = false;
1972
+ return;
1973
+ }
1974
+ clearApiCache();
1975
+ }
1946
1976
  // Store headers in result object for persistence after page reload
1947
1977
  result.allocation_headers = {
1948
1978
  "s-scope-allocation-type": allocationType,
@@ -1955,11 +1985,7 @@ export class SallaBulletDelivery {
1955
1985
  this.markShownThisSession();
1956
1986
  // After allocation success: persist latest intent so switch UI can always reflect
1957
1987
  // the selected address/branch once confirmed.
1958
- this.setStoredIntent(result);
1959
- if (allocatedScopeId) {
1960
- await bulletDeliveryAPI.setDeliveryScope(allocatedScopeId);
1961
- clearApiCache();
1962
- }
1988
+ this.setStoredIntent({ ...result, scope_allocated: true });
1963
1989
  const allocationConfirmedPayload = {
1964
1990
  ...result,
1965
1991
  address: this.buildAllocationConfirmedAddressData(selectedAddress),
@@ -2157,8 +2183,10 @@ export class SallaBulletDelivery {
2157
2183
  const { success, address } = await bulletDeliveryAPI.saveAddressLocation(payload);
2158
2184
  if (!success || !address)
2159
2185
  return null;
2160
- // Persist address_id immediately to avoid duplicate creation on retry.
2161
- this.setStoredIntent({ ...intent, address_id: address.id });
2186
+ // Persist address_id immediately to avoid duplicate creation on retry — but keep
2187
+ // scope_allocated false: the address is saved, not yet allocated, so a later
2188
+ // allocation failure must not make hasCompleteIntentForLoggedInUser() think it is.
2189
+ this.setStoredIntent({ ...intent, address_id: address.id, scope_allocated: false });
2162
2190
  this.addressCreated.emit({ address });
2163
2191
  return address;
2164
2192
  }
@@ -2193,6 +2221,10 @@ export class SallaBulletDelivery {
2193
2221
  return null;
2194
2222
  const savedAddress = address ?? null;
2195
2223
  if (savedAddress) {
2224
+ // Persist address_id immediately to avoid duplicate creation on retry — but keep
2225
+ // scope_allocated false: the address is saved, not yet allocated, so a later
2226
+ // allocation failure must not make hasCompleteIntentForLoggedInUser() think it is.
2227
+ this.setStoredIntent({ ...intent, address_id: savedAddress.id, scope_allocated: false });
2196
2228
  this.addressCreated.emit({ address: savedAddress });
2197
2229
  }
2198
2230
  return savedAddress;
@@ -2281,14 +2313,14 @@ export class SallaBulletDelivery {
2281
2313
  }
2282
2314
  renderAddressConfirmation() {
2283
2315
  const address = this.mapLocationData?.formattedAddress ?? '';
2284
- const shortCode = this.mapLocationData?.shortAddress;
2285
- return (h("div", { class: "s-bullet-delivery-address-confirm" }, h("div", { class: "s-bullet-delivery-address-confirm-card" }, h("div", { class: "s-bullet-delivery-address-confirm-details" }, h("span", { class: "s-bullet-delivery-address-confirm-label" }, Salla.lang.get('pages.checkout.selected_address')), h("p", { class: "s-bullet-delivery-address-confirm-text" }, address), shortCode && (h("span", { class: "s-bullet-delivery-address-confirm-tag" }, shortCode, h("span", { class: "s-bullet-delivery-address-confirm-tag-icon", innerHTML: LocationTag })))), h("button", { type: "button", class: "s-bullet-delivery-address-confirm-edit", onClick: () => { this.mapStep = 'map'; } }, Salla.lang.get('common.elements.edit'))), h("div", { class: "s-bullet-delivery-address-confirm-description" }, h("label", { class: "s-bullet-delivery-address-confirm-description-label" }, Salla.lang.get('pages.checkout.address_description'), h("span", { class: "s-bullet-delivery-address-confirm-description-optional" }, Salla.lang.get('common.elements.optional'))), h("input", { type: "text", class: "s-bullet-delivery-address-confirm-description-input form-input", placeholder: Salla.lang.get('pages.checkout.address_description_placeholder'), value: this.addressDescription, onInput: (e) => { this.addressDescription = e.target.value; } }))));
2316
+ return (h("div", { class: "s-bullet-delivery-address-confirm" }, h("div", { class: "s-bullet-delivery-address-confirm-card" }, h("span", { class: "s-bullet-delivery-address-map-icon", innerHTML: MiniMap, "aria-hidden": "true" }), h("div", { class: "s-bullet-delivery-address-confirm-details" }, h("span", { class: "s-bullet-delivery-address-confirm-label" }, Salla.lang.get('pages.checkout.selected_address')), h("p", { class: "s-bullet-delivery-address-confirm-text" }, address))), h("div", { class: "s-bullet-delivery-address-confirm-description" }, h("label", { class: "s-bullet-delivery-address-confirm-description-label" }, Salla.lang.get('pages.checkout.address_description'), h("span", { class: "s-bullet-delivery-address-confirm-description-optional" }, Salla.lang.get('common.elements.optional'))), h("input", { type: "text", class: "s-bullet-delivery-address-confirm-description-input form-input", placeholder: Salla.lang.get('pages.checkout.address_description_placeholder'), value: this.addressDescription, onInput: (e) => { this.addressDescription = e.target.value; } }))));
2286
2317
  }
2287
2318
  renderGuestDeliveryForm() {
2288
2319
  if (this.isMapModeAvailable) {
2289
- return this.mapStep === 'confirm' && this.hasMapLocation()
2290
- ? this.renderAddressConfirmation()
2291
- : this.renderMapSection();
2320
+ return [
2321
+ this.renderMapSection(),
2322
+ this.hasMapLocation() ? this.renderAddressConfirmation() : null,
2323
+ ];
2292
2324
  }
2293
2325
  const isSA = isSaudiArabia(this.selectedCountry?.code ?? '');
2294
2326
  return [
@@ -2310,23 +2342,15 @@ export class SallaBulletDelivery {
2310
2342
  if (!this.isMapModeAvailable) {
2311
2343
  return this.renderGuestDeliveryForm();
2312
2344
  }
2313
- const hasMapLoc = this.hasMapLocation();
2314
- const isConfirmStep = this.mapStep === 'confirm' && hasMapLoc;
2315
- const canAdvanceToConfirm = this.canConfirmMapLocation();
2316
- const submitLabel = isConfirmStep
2317
- ? (this.confirming
2318
- ? Salla.lang.get("pages.checkout.loading")
2319
- : Salla.lang.get("pages.checkout.confirm_address"))
2320
- : Salla.lang.get('pages.checkout.confirm_location');
2345
+ const canSubmit = this.canConfirmMapLocation();
2346
+ const submitLabel = this.confirming
2347
+ ? Salla.lang.get("pages.checkout.loading")
2348
+ : Salla.lang.get("pages.checkout.confirm_address");
2321
2349
  const handleSubmit = (e) => {
2322
2350
  e.preventDefault();
2323
- if (!isConfirmStep && canAdvanceToConfirm) {
2324
- this.mapStep = 'confirm';
2325
- return;
2326
- }
2327
2351
  this.handleConfirm();
2328
2352
  };
2329
- return (h("form", { onSubmit: handleSubmit }, this.renderGuestDeliveryForm(), h("div", { class: "s-bullet-delivery-form-actions s-bullet-delivery-form-actions--single", style: { padding: '24px' } }, h("salla-button", { type: "submit", loading: this.confirming, disabled: isConfirmStep ? this.confirming : !canAdvanceToConfirm, width: "wide" }, submitLabel), !this.isLoggedIn && (h("button", { type: "button", class: "s-bullet-delivery-login-prompt", onClick: () => this.handleLogin() }, Salla.lang.get('pages.checkout.login_to_use_saved_addresses'))))));
2353
+ return (h("form", { onSubmit: handleSubmit }, this.renderGuestDeliveryForm(), h("div", { class: "s-bullet-delivery-form-actions s-bullet-delivery-form-actions--single", style: { padding: '24px' } }, h("salla-button", { type: "submit", loading: this.confirming, disabled: !canSubmit || this.confirming, width: "wide" }, submitLabel), !this.isLoggedIn && (h("button", { type: "button", class: "s-bullet-delivery-login-prompt", onClick: () => this.handleLogin() }, Salla.lang.get('pages.checkout.login_to_use_saved_addresses'))))));
2330
2354
  }
2331
2355
  renderBranchSearch() {
2332
2356
  return (h("div", { class: "s-bullet-delivery-branch-search" }, h("div", { class: "s-bullet-delivery-search-row" }, h("div", { class: "s-bullet-delivery-search s-bullet-delivery-branch-search-wrap" }, h("span", { class: "s-bullet-delivery-search-icon s-bullet-delivery-branch-search-icon", innerHTML: Search, "aria-hidden": "true" }), h("input", { type: "text", class: "s-bullet-delivery-branch-search-input form-input", placeholder: Salla.lang.get("pages.checkout.search_for_city_or_branch"), value: this.branchSearchQuery, onInput: (e) => this.handleBranchSearch(e), autocomplete: "off" })), h("button", { type: "button", class: {
@@ -2390,25 +2414,18 @@ export class SallaBulletDelivery {
2390
2414
  "s-hidden": this.activeTab !== "branch",
2391
2415
  } }, this.renderCountrySelect(), this.renderBranchSearch(), this.renderBranchList()));
2392
2416
  }
2393
- /** Add-address form: map two-step flow or dropdown fallback. */
2417
+ /** Add-address form: map + confirm card in one screen, or dropdown fallback. */
2394
2418
  renderAddAddressForm() {
2395
- const title = Salla.lang.get("pages.checkout.add_new_address");
2396
2419
  const mapMode = this.isMapModeAvailable;
2397
2420
  const isSA = isSaudiArabia(this.selectedCountry?.code ?? '');
2398
2421
  const hasMapLoc = this.hasMapLocation();
2399
2422
  let canSubmit;
2400
2423
  let submitLabel;
2401
2424
  if (mapMode) {
2402
- if (this.mapStep === 'map') {
2403
- canSubmit = this.canConfirmMapLocation();
2404
- submitLabel = Salla.lang.get('pages.checkout.confirm_location');
2405
- }
2406
- else {
2407
- canSubmit = hasMapLoc;
2408
- submitLabel = this.savingAddress
2409
- ? Salla.lang.get("pages.checkout.loading")
2410
- : Salla.lang.get("pages.checkout.confirm_address");
2411
- }
2425
+ canSubmit = this.canConfirmMapLocation();
2426
+ submitLabel = this.confirming
2427
+ ? Salla.lang.get("pages.checkout.loading")
2428
+ : Salla.lang.get("pages.checkout.confirm_address");
2412
2429
  }
2413
2430
  else {
2414
2431
  const canSubmitDropdowns = this.selectedCountry &&
@@ -2418,20 +2435,16 @@ export class SallaBulletDelivery {
2418
2435
  !!this.selectedDistrict ||
2419
2436
  !!(this.districtName && this.districtName.trim().length > 0));
2420
2437
  canSubmit = hasMapLoc || canSubmitDropdowns;
2421
- submitLabel = this.savingAddress
2438
+ submitLabel = this.confirming
2422
2439
  ? Salla.lang.get("pages.checkout.loading")
2423
2440
  : Salla.lang.get("pages.checkout.confirm_address");
2424
2441
  }
2425
- const hasAddressesToGoBack = this.savedAddresses.length > 0 || hasSessionAddressIntent(this.getStoredIntent());
2426
2442
  const handleFormSubmit = (e) => {
2427
2443
  e.preventDefault();
2428
- if (mapMode && this.mapStep === 'map' && canSubmit) {
2429
- this.mapStep = 'confirm';
2430
- return;
2431
- }
2432
- this.handleSubmitAddAddress(e);
2444
+ this.handleSubmitNewAddress(e);
2433
2445
  };
2434
- return (h("div", { class: "s-bullet-delivery-add-address" }, h("form", { class: "s-bullet-delivery-add-address-form", onSubmit: handleFormSubmit }, this.renderGuestDeliveryForm(), h("div", { class: "s-bullet-delivery-form-actions s-bullet-delivery-form-actions--single" }, h("salla-button", { type: "submit", loading: this.savingAddress, disabled: !canSubmit || this.savingAddress, class: "s-bullet-delivery-add-address-submit" }, submitLabel)))));
2446
+ return (h("div", { class: "s-bullet-delivery-add-address" }, this.allocationOutOfCoverageMessage &&
2447
+ this.renderAllocationOutOfCoverageAlert(), h("form", { class: "s-bullet-delivery-add-address-form", onSubmit: handleFormSubmit }, this.renderGuestDeliveryForm(), h("div", { class: "s-bullet-delivery-form-actions s-bullet-delivery-form-actions--single" }, h("salla-button", { type: "submit", loading: this.confirming, disabled: !canSubmit || this.confirming, class: "s-bullet-delivery-add-address-submit" }, submitLabel), this.hasAddressesToGoBack() && (h("salla-button", { shape: "link", class: "s-bullet-delivery-back-to-list-link", onClick: () => this.handleBackToAddressList() }, Salla.lang.getWithDefault('pages.checkout.saved_addresses', 'العناوين المحفوظة'), h("i", { class: "sicon-arrow-left" })))))));
2435
2448
  }
2436
2449
  renderFooter() {
2437
2450
  if (this.activeTab === "address" && !this.isLoggedIn && this.isMapModeAvailable) {
@@ -2516,15 +2529,26 @@ export class SallaBulletDelivery {
2516
2529
  if (!this.isEnabled)
2517
2530
  return;
2518
2531
  if (this.pendingCartSubmitPromise) {
2519
- // A prior attempt is still pending (e.g. the user dismissed the modal without
2520
- // completing allocate) — re-prompt instead of silently awaiting with nothing visible.
2521
- if (this.isGuestUser()) {
2522
- this.openGuestLogin();
2523
- }
2524
- else if (!this.modal?.hasAttribute?.("visible")) {
2525
- this.open();
2532
+ // A prior attempt is still pending. For a logged-in user, re-prompt instead of
2533
+ // silently awaiting with nothing visible.
2534
+ if (!this.isGuestUser()) {
2535
+ if (!this.modal?.hasAttribute?.("visible")) {
2536
+ this.open();
2537
+ }
2538
+ await this.pendingCartSubmitPromise;
2539
+ return;
2526
2540
  }
2527
- await this.pendingCartSubmitPromise;
2541
+ // Guest: login was already shown once for this attempt — reopening it here (the
2542
+ // old behavior) fought whatever the guest just chose (e.g. "Continue as Guest")
2543
+ // and froze the page. Reset the gate so the *next* checkout click starts a clean
2544
+ // cycle (reopening login again, repeating until the guest actually logs in and
2545
+ // allocates) — but never resolve *this* invocation: returning here would resolve
2546
+ // salla.cart.event.submitting() (built on emitAsync, which awaits every listener),
2547
+ // letting cart.js's status() continue straight through to the checkout redirect.
2548
+ this.pendingCartSubmitResolver = null;
2549
+ this.pendingCartSubmitPromise = null;
2550
+ this.cartSubmitConfirmationPending = false;
2551
+ await new Promise(() => { });
2528
2552
  return;
2529
2553
  }
2530
2554
  // Logged-in users with a complete intent can continue checkout without re-prompting.
@@ -2555,14 +2579,16 @@ export class SallaBulletDelivery {
2555
2579
  this.closeHandler = this.close.bind(this);
2556
2580
  Salla.event.on("salla::bullet-delivery.modal.close.requested", this.closeHandler);
2557
2581
  this.isRTL = Salla.config.get("theme.is_rtl");
2558
- this.authLoggedInHandler = () => {
2582
+ this.authLoggedInHandler = async () => {
2559
2583
  if (this.cartSubmitConfirmationPending) {
2560
- this.handlePendingSubmitAfterLogin();
2584
+ await this.handlePendingSubmitAfterLogin();
2561
2585
  return;
2562
2586
  }
2563
2587
  // Always prompt after login when intent is incomplete, regardless of prior prompted flags.
2564
2588
  if (!this.hasIncompleteUserAddressIntent())
2565
2589
  return;
2590
+ if (await this.tryAutoConfirmAfterLogin())
2591
+ return;
2566
2592
  if (this.modal?.hasAttribute?.("visible"))
2567
2593
  return;
2568
2594
  this.open();
@@ -2762,7 +2788,6 @@ export class SallaBulletDelivery {
2762
2788
  "loadingBranches": {},
2763
2789
  "loadingNearestBranch": {},
2764
2790
  "locationError": {},
2765
- "savingAddress": {},
2766
2791
  "loadingSavedAddresses": {},
2767
2792
  "showCartWillBeClearedBanner": {},
2768
2793
  "countrySearchQuery": {},
@@ -2782,9 +2807,9 @@ export class SallaBulletDelivery {
2782
2807
  "addressToken": {},
2783
2808
  "loadingToken": {},
2784
2809
  "mapReady": {},
2785
- "mapStep": {},
2786
2810
  "addressDescription": {},
2787
2811
  "reverseGeocoding": {},
2812
+ "confirming": {},
2788
2813
  "newAddressForm": {}
2789
2814
  };
2790
2815
  }
@@ -2873,8 +2898,12 @@ export class SallaBulletDelivery {
2873
2898
  return {
2874
2899
  "open": {
2875
2900
  "complexType": {
2876
- "signature": "() => Promise<void>",
2877
- "parameters": [],
2901
+ "signature": "(silent?: boolean) => Promise<void>",
2902
+ "parameters": [{
2903
+ "name": "silent",
2904
+ "type": "boolean",
2905
+ "docs": ""
2906
+ }],
2878
2907
  "references": {
2879
2908
  "Promise": {
2880
2909
  "location": "global",
@@ -2884,7 +2913,7 @@ export class SallaBulletDelivery {
2884
2913
  "return": "Promise<void>"
2885
2914
  },
2886
2915
  "docs": {
2887
- "text": "Opens the bullet delivery modal",
2916
+ "text": "Opens the bullet delivery modal. Pass `silent: true` to run the same state/data\nloading below without showing the modal \u2014 used by tryAutoConfirmAfterLogin() so a\nsuccessful auto-confirm never flashes the saved-addresses list; the caller is\nresponsible for revealing the modal itself if it still needs the customer's input.",
2888
2917
  "tags": []
2889
2918
  }
2890
2919
  },