@salla.sa/twilight-components 2.14.552 → 2.14.553

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 (333) hide show
  1. package/dist/cjs/apple-pay-order-options-DVyeUqBh.js +90 -0
  2. package/dist/cjs/{filepond-BTsLGLic.js → filepond-i59nX3lz.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-DSHHkMx8.js → filepond-plugin-file-poster-BYzX1aNf.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-BB6ltSRf.js → filepond-plugin-file-validate-size-DycWnZhG.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-CNWlgtpi.js → filepond-plugin-file-validate-type-z0JXBj53.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-DuY72vJR.js → filepond-plugin-image-edit-CJRUCqBQ.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-DWzZOyOL.js → filepond-plugin-image-exif-orientation-DxMxZUYg.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-ropJ4nYL.js → filepond-plugin-image-preview-CjSIPPRf.js} +1 -1
  9. package/dist/cjs/{index-CoSVCFSp.js → index-BDeMaV8l.js} +18 -22
  10. package/dist/cjs/{intlTelInput-BSHBNNPO.js → intlTelInput-YxceQr88.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +5 -86
  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 +10 -10
  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 +1 -1
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  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 +1 -1
  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 → salla-count-down_2.cjs.entry.js} +209 -1
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gifting.cjs.entry.js +108 -5
  41. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  54. package/dist/cjs/{salla-slider.cjs.entry.js → salla-map_3.cjs.entry.js} +829 -1
  55. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  80. package/dist/cjs/{salla-order-options-modal_2.cjs.entry.js → salla-product-card.cjs.entry.js} +1 -209
  81. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-scopes.cjs.entry.js +4 -2
  90. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  104. package/dist/cjs/twilight.cjs.js +2 -2
  105. package/dist/cjs/{vanilla-picker-DdIwY7TN.js → vanilla-picker-BkTzr0I6.js} +1 -1
  106. package/dist/collection/components/salla-gifting/salla-gifting.css +3 -0
  107. package/dist/collection/components/salla-gifting/salla-gifting.js +106 -3
  108. package/dist/collection/components/salla-scopes/salla-scopes.js +3 -1
  109. package/dist/components/apple-pay-order-options.js +86 -0
  110. package/dist/components/index.js +2 -2
  111. package/dist/components/salla-gifting.js +165 -20
  112. package/dist/components/salla-quick-buy2.js +1 -82
  113. package/dist/components/salla-scopes.js +3 -1
  114. package/dist/esm/apple-pay-order-options-Bg2HuLRr.js +86 -0
  115. package/dist/esm/{filepond-CqbRA3Vl.js → filepond-OzvsJA0M.js} +1 -1
  116. package/dist/esm/{filepond-plugin-file-poster-Byt9onuT.js → filepond-plugin-file-poster-CDQfaOXY.js} +1 -1
  117. package/dist/esm/{filepond-plugin-file-validate-size-C1P2OJEv.js → filepond-plugin-file-validate-size-1vRv7vgS.js} +1 -1
  118. package/dist/esm/{filepond-plugin-file-validate-type-BP2FLMsG.js → filepond-plugin-file-validate-type-pajN7jZu.js} +1 -1
  119. package/dist/esm/{filepond-plugin-image-edit-C69hhmiF.js → filepond-plugin-image-edit-93DCmlU_.js} +1 -1
  120. package/dist/esm/{filepond-plugin-image-exif-orientation-B2QzeXLq.js → filepond-plugin-image-exif-orientation-CncCUIVb.js} +1 -1
  121. package/dist/esm/{filepond-plugin-image-preview-CR1odLVd.js → filepond-plugin-image-preview-Mz81wKGp.js} +1 -1
  122. package/dist/esm/{index-Q9lz4Iuq.js → index-Dx4PTJFl.js} +18 -22
  123. package/dist/esm/{intlTelInput-DzbfeHCl.js → intlTelInput-DEYUtZO9.js} +1 -1
  124. package/dist/esm/loader.js +3 -3
  125. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  126. package/dist/esm/salla-accordion_6.entry.js +1 -1
  127. package/dist/esm/salla-add-product-button_5.entry.js +2 -83
  128. package/dist/esm/salla-advertisement.entry.js +1 -1
  129. package/dist/esm/salla-alert_2.entry.js +1 -1
  130. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  131. package/dist/esm/salla-applied-filters.entry.js +1 -1
  132. package/dist/esm/salla-apps-icons.entry.js +1 -1
  133. package/dist/esm/salla-attachment-view_9.entry.js +10 -10
  134. package/dist/esm/salla-badge.entry.js +1 -1
  135. package/dist/esm/salla-basket-gap.entry.js +1 -1
  136. package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
  137. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  138. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  139. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  140. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  141. package/dist/esm/salla-comment-factors.entry.js +1 -1
  142. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  143. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  144. package/dist/esm/salla-contacts.entry.js +1 -1
  145. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  146. package/dist/esm/{salla-count-down.entry.js → salla-count-down_2.entry.js} +209 -2
  147. package/dist/esm/salla-custom-fields.entry.js +1 -1
  148. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  149. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  150. package/dist/esm/salla-filters-widget.entry.js +1 -1
  151. package/dist/esm/salla-filters.entry.js +1 -1
  152. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  153. package/dist/esm/salla-gifting.entry.js +108 -5
  154. package/dist/esm/salla-hook.entry.js +1 -1
  155. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  156. package/dist/esm/salla-installment.entry.js +1 -1
  157. package/dist/esm/salla-list-tile.entry.js +1 -1
  158. package/dist/esm/salla-localization-modal.entry.js +1 -1
  159. package/dist/esm/salla-login-modal.entry.js +1 -1
  160. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  161. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  162. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  163. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  164. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  165. package/dist/esm/salla-loyalty.entry.js +1 -1
  166. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  167. package/dist/esm/{salla-slider.entry.js → salla-map_3.entry.js} +828 -2
  168. package/dist/esm/salla-menu.entry.js +1 -1
  169. package/dist/esm/salla-metadata.entry.js +1 -1
  170. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  171. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  172. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  173. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  174. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  175. package/dist/esm/salla-offer-modal.entry.js +1 -1
  176. package/dist/esm/salla-offer.entry.js +1 -1
  177. package/dist/esm/salla-order-branch.entry.js +1 -1
  178. package/dist/esm/salla-order-cancel.entry.js +1 -1
  179. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  180. package/dist/esm/salla-order-details-options.entry.js +1 -1
  181. package/dist/esm/salla-order-details.entry.js +1 -1
  182. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  183. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  184. package/dist/esm/salla-order-edit.entry.js +1 -1
  185. package/dist/esm/salla-order-shipments.entry.js +1 -1
  186. package/dist/esm/salla-order-summary.entry.js +1 -1
  187. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  188. package/dist/esm/salla-orders.entry.js +1 -1
  189. package/dist/esm/salla-payments.entry.js +1 -1
  190. package/dist/esm/salla-placeholder.entry.js +1 -1
  191. package/dist/esm/salla-price-range.entry.js +1 -1
  192. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  193. package/dist/esm/{salla-order-options-modal_2.entry.js → salla-product-card.entry.js} +2 -209
  194. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  195. package/dist/esm/salla-products-list.entry.js +1 -1
  196. package/dist/esm/salla-products-slider.entry.js +1 -1
  197. package/dist/esm/salla-quick-order.entry.js +1 -1
  198. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  199. package/dist/esm/salla-rating-modal.entry.js +1 -1
  200. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  201. package/dist/esm/salla-review-order-item.entry.js +1 -1
  202. package/dist/esm/salla-scopes.entry.js +4 -2
  203. package/dist/esm/salla-search.entry.js +1 -1
  204. package/dist/esm/salla-skeleton.entry.js +1 -1
  205. package/dist/esm/salla-social-share.entry.js +1 -1
  206. package/dist/esm/salla-social.entry.js +1 -1
  207. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  208. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  209. package/dist/esm/salla-tooltip.entry.js +1 -1
  210. package/dist/esm/salla-trust-badges.entry.js +1 -1
  211. package/dist/esm/salla-user-menu.entry.js +1 -1
  212. package/dist/esm/salla-user-profile.entry.js +1 -1
  213. package/dist/esm/salla-user-settings.entry.js +1 -1
  214. package/dist/esm/salla-verify.entry.js +1 -1
  215. package/dist/esm/salla-wallet.entry.js +1 -1
  216. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  217. package/dist/esm/twilight.js +3 -3
  218. package/dist/esm/{vanilla-picker-DZSS4OVz.js → vanilla-picker-43VIKXEr.js} +1 -1
  219. package/dist/twilight/{p-4bac36be.entry.js → p-01dde8da.entry.js} +1 -1
  220. package/dist/twilight/p-05333b72.entry.js +4 -0
  221. package/dist/twilight/{p-7022989a.entry.js → p-05920338.entry.js} +1 -1
  222. package/dist/twilight/{p-7e8b2b0d.entry.js → p-05ed463f.entry.js} +1 -1
  223. package/dist/twilight/{p-25b7344e.entry.js → p-08c448e7.entry.js} +1 -1
  224. package/dist/twilight/{p-4abffe52.entry.js → p-0f475a9c.entry.js} +1 -1
  225. package/dist/twilight/{p-89aad90f.entry.js → p-129d396b.entry.js} +1 -1
  226. package/dist/twilight/{p-34dfff49.entry.js → p-12a40f7d.entry.js} +1 -1
  227. package/dist/twilight/{p-808fef3d.entry.js → p-144a349d.entry.js} +1 -1
  228. package/dist/twilight/{p-1242708e.entry.js → p-15470633.entry.js} +1 -1
  229. package/dist/twilight/{p-fe34bfd0.entry.js → p-1627f8c5.entry.js} +1 -1
  230. package/dist/twilight/{p-5b94bea7.entry.js → p-16c9bb12.entry.js} +1 -1
  231. package/dist/twilight/{p-79e2d7eb.entry.js → p-1a0db854.entry.js} +1 -1
  232. package/dist/twilight/{p-06abf9fb.entry.js → p-204db13a.entry.js} +1 -1
  233. package/dist/twilight/{p-8920aae0.entry.js → p-21b5ef79.entry.js} +1 -1
  234. package/dist/twilight/{p-c7482df4.entry.js → p-21dfba32.entry.js} +1 -1
  235. package/dist/twilight/{p-ae5ce421.entry.js → p-24950b7c.entry.js} +1 -1
  236. package/dist/twilight/{p-e69f6c43.entry.js → p-24a5e070.entry.js} +1 -1
  237. package/dist/twilight/{p-36aa4c09.entry.js → p-26bf1509.entry.js} +1 -1
  238. package/dist/twilight/{p-6867eb35.entry.js → p-2718a5f2.entry.js} +1 -1
  239. package/dist/twilight/{p-8abf3859.entry.js → p-2941175d.entry.js} +1 -1
  240. package/dist/twilight/{p-aa1af88d.entry.js → p-2dfbb461.entry.js} +1 -1
  241. package/dist/twilight/{p-f0cefe50.entry.js → p-2f137e63.entry.js} +1 -1
  242. package/dist/twilight/{p-d7c03cf7.entry.js → p-360e4f8e.entry.js} +1 -1
  243. package/dist/twilight/{p-a24168ae.entry.js → p-378efeff.entry.js} +1 -1
  244. package/dist/twilight/{p-7d3899e7.entry.js → p-3b4e2cf3.entry.js} +1 -1
  245. package/dist/twilight/{p-492c72eb.entry.js → p-3b9cf7e4.entry.js} +1 -1
  246. package/dist/twilight/{p-7dda74dd.entry.js → p-40e417f1.entry.js} +1 -1
  247. package/dist/twilight/{p-06109ef0.entry.js → p-422c19a5.entry.js} +1 -1
  248. package/dist/twilight/{p-e0868b92.entry.js → p-45f512a8.entry.js} +1 -1
  249. package/dist/twilight/{p-f7c2ff0f.entry.js → p-4be292da.entry.js} +1 -1
  250. package/dist/twilight/{p-bfa2b7c5.entry.js → p-50a2be61.entry.js} +1 -1
  251. package/dist/twilight/{p-e6b1dd40.entry.js → p-5197cc6a.entry.js} +1 -1
  252. package/dist/twilight/{p-462a49e4.entry.js → p-58ee3cea.entry.js} +1 -1
  253. package/dist/twilight/{p-bf860754.entry.js → p-619a9a6e.entry.js} +1 -1
  254. package/dist/twilight/{p-f632b2f7.entry.js → p-6343cd09.entry.js} +1 -1
  255. package/dist/twilight/{p-c90ff0bf.entry.js → p-6533ba39.entry.js} +1 -1
  256. package/dist/twilight/{p-b881f716.entry.js → p-6b62d934.entry.js} +1 -1
  257. package/dist/twilight/{p-5d671536.entry.js → p-6ee230b4.entry.js} +1 -1
  258. package/dist/twilight/{p-b92af898.entry.js → p-6fffb603.entry.js} +1 -1
  259. package/dist/twilight/{p-eddf3ee5.entry.js → p-74510683.entry.js} +1 -1
  260. package/dist/twilight/{p-53e430c6.entry.js → p-74a4437f.entry.js} +1 -1
  261. package/dist/twilight/{p-9f4fef0f.entry.js → p-7709f0dd.entry.js} +1 -1
  262. package/dist/twilight/{p-bd389ba7.entry.js → p-79b4ca8e.entry.js} +1 -1
  263. package/dist/twilight/{p-9118b3cf.entry.js → p-7d3355a8.entry.js} +1 -1
  264. package/dist/twilight/{p-a7417d3a.entry.js → p-8123e013.entry.js} +1 -1
  265. package/dist/twilight/{p-00bb1a13.entry.js → p-8137113a.entry.js} +1 -1
  266. package/dist/twilight/{p-61ca8dd2.entry.js → p-8140d052.entry.js} +1 -1
  267. package/dist/twilight/p-8968b284.entry.js +4 -0
  268. package/dist/twilight/{p-a0e73c0f.entry.js → p-8a57a89a.entry.js} +1 -1
  269. package/dist/twilight/{p-0bb678e7.entry.js → p-8bb4da9c.entry.js} +1 -1
  270. package/dist/twilight/{p-31394018.entry.js → p-8bb74e84.entry.js} +1 -1
  271. package/dist/twilight/{p-31d03d8c.entry.js → p-8ff29a31.entry.js} +1 -1
  272. package/dist/twilight/{p-49cbb9ed.entry.js → p-90677c84.entry.js} +1 -1
  273. package/dist/twilight/{p-7d9e3032.entry.js → p-919b40e3.entry.js} +1 -1
  274. package/dist/twilight/{p-7f2bc499.entry.js → p-92a471ea.entry.js} +1 -1
  275. package/dist/twilight/{p-5470f52a.entry.js → p-955661c8.entry.js} +1 -1
  276. package/dist/twilight/{p-c6ed3a34.entry.js → p-9c0e3e8f.entry.js} +1 -1
  277. package/dist/twilight/{p-f4207ccf.entry.js → p-9c5571a0.entry.js} +1 -1
  278. package/dist/twilight/{p-VPmzkmKU.js → p-B5U60WIk.js} +2 -2
  279. package/dist/twilight/{p-CPEEGqkw.js → p-BKvFlB2x.js} +1 -1
  280. package/dist/twilight/p-Bg2HuLRr.js +4 -0
  281. package/dist/twilight/{p-BCwAi8HD.js → p-C1H-fEuk.js} +1 -1
  282. package/dist/twilight/{p-CA-ne4vX.js → p-Cgw3EhC4.js} +1 -1
  283. package/dist/twilight/{p-Ce0SoG8e.js → p-ChQewA0U.js} +1 -1
  284. package/dist/twilight/{p-sDtjU0pK.js → p-Dccf61n9.js} +1 -1
  285. package/dist/twilight/{p-Q9lz4Iuq.js → p-Dx4PTJFl.js} +1 -1
  286. package/dist/twilight/{p-B31LPQuk.js → p-HzrPs4_N.js} +1 -1
  287. package/dist/twilight/{p-DPu3dYaG.js → p-ILDsy-mr.js} +1 -1
  288. package/dist/twilight/{p-d70c704f.entry.js → p-a2c2f78b.entry.js} +1 -1
  289. package/dist/twilight/{p-f5485435.entry.js → p-a2cae5fd.entry.js} +1 -1
  290. package/dist/twilight/{p-2845de1c.entry.js → p-a4d28c99.entry.js} +1 -1
  291. package/dist/twilight/{p-e305f635.entry.js → p-a7bdbeb1.entry.js} +1 -1
  292. package/dist/twilight/{p-bbdec84a.entry.js → p-a7ee89d7.entry.js} +1 -1
  293. package/dist/twilight/{p-4b827efc.entry.js → p-a95b7da2.entry.js} +1 -1
  294. package/dist/twilight/{p-40b70c18.entry.js → p-a965c7da.entry.js} +1 -1
  295. package/dist/twilight/{p-92fbada7.entry.js → p-aa88c61e.entry.js} +1 -1
  296. package/dist/twilight/{p-688b40b4.entry.js → p-acff1e55.entry.js} +1 -1
  297. package/dist/twilight/{p-6f6d6f45.entry.js → p-b1d3bdb6.entry.js} +1 -1
  298. package/dist/twilight/{p-ff6672b6.entry.js → p-b54f9dd8.entry.js} +1 -1
  299. package/dist/twilight/{p-382e5a40.entry.js → p-b572b38c.entry.js} +1 -1
  300. package/dist/twilight/p-bdfceb12.entry.js +4 -0
  301. package/dist/twilight/{p-7deba3f8.entry.js → p-be080eb3.entry.js} +1 -1
  302. package/dist/twilight/p-bfd1e64f.entry.js +4 -0
  303. package/dist/twilight/{p-52e1754b.entry.js → p-c0ff19e0.entry.js} +1 -1
  304. package/dist/twilight/p-c2823b78.entry.js +4 -0
  305. package/dist/twilight/{p-008dcf73.entry.js → p-c2f2a752.entry.js} +1 -1
  306. package/dist/twilight/{p-56e93806.entry.js → p-c53d45d1.entry.js} +1 -1
  307. package/dist/twilight/{p-0100262e.entry.js → p-c653dbde.entry.js} +1 -1
  308. package/dist/twilight/{p-1dc63988.entry.js → p-c6708390.entry.js} +1 -1
  309. package/dist/twilight/{p-c0599e5d.entry.js → p-cabecab4.entry.js} +1 -1
  310. package/dist/twilight/{p-729f3fa0.entry.js → p-cadfb356.entry.js} +1 -1
  311. package/dist/twilight/{p-67b60d33.entry.js → p-cddaa208.entry.js} +1 -1
  312. package/dist/twilight/{p-3c0705e2.entry.js → p-d97e4c69.entry.js} +1 -1
  313. package/dist/twilight/{p-25017fcd.entry.js → p-e1109a12.entry.js} +1 -1
  314. package/dist/twilight/{p-54bdc583.entry.js → p-e315d524.entry.js} +1 -1
  315. package/dist/twilight/{p-ce8205e2.entry.js → p-e4dd05a7.entry.js} +1 -1
  316. package/dist/twilight/{p-d6a04817.entry.js → p-e5b29085.entry.js} +1 -1
  317. package/dist/twilight/{p-27176c04.entry.js → p-e97e121a.entry.js} +1 -1
  318. package/dist/twilight/{p-754af3dd.entry.js → p-f1587a83.entry.js} +1 -1
  319. package/dist/twilight/p-f4e80187.entry.js +4 -0
  320. package/dist/twilight/{p-ea3480ff.entry.js → p-f5cff7aa.entry.js} +1 -1
  321. package/dist/twilight/{p-WyyaE0fN.js → p-lRRdZqp5.js} +1 -1
  322. package/dist/twilight/twilight.esm.js +1 -1
  323. package/dist/types/components/salla-gifting/salla-gifting.d.ts +29 -0
  324. package/package.json +5 -5
  325. package/dist/cjs/salla-map_2.cjs.entry.js +0 -835
  326. package/dist/esm/salla-map_2.entry.js +0 -832
  327. package/dist/twilight/p-171c1927.entry.js +0 -4
  328. package/dist/twilight/p-4941b3cd.entry.js +0 -4
  329. package/dist/twilight/p-6860331a.entry.js +0 -4
  330. package/dist/twilight/p-79451510.entry.js +0 -4
  331. package/dist/twilight/p-8bcf6db3.entry.js +0 -4
  332. package/dist/twilight/p-a70cbfe9.entry.js +0 -4
  333. package/dist/twilight/p-dfc67513.entry.js +0 -4
@@ -6,14 +6,22 @@ import { a as anime } from './anime.es.js';
6
6
  import { I as IconArrowLeft } from './arrow-left.js';
7
7
  import { C as Cancel } from './cancel.js';
8
8
  import { S as SIGiftSharing } from './gift-sharing.js';
9
- import { d as defineCustomElement$d } from './salla-attachment-view2.js';
10
- import { d as defineCustomElement$c } from './salla-button2.js';
11
- import { d as defineCustomElement$b } from './salla-datetime-picker2.js';
12
- import { d as defineCustomElement$a } from './salla-file-upload2.js';
13
- import { d as defineCustomElement$9 } from './salla-list-tile2.js';
14
- import { d as defineCustomElement$8 } from './salla-loading2.js';
15
- import { d as defineCustomElement$7 } from './salla-modal2.js';
16
- import { d as defineCustomElement$6 } from './salla-placeholder2.js';
9
+ import { b as appendOrderOptionsToPayload } from './apple-pay-order-options.js';
10
+ import { d as defineCustomElement$k } from './salla-attachment-view2.js';
11
+ import { d as defineCustomElement$j } from './salla-booking-field2.js';
12
+ import { d as defineCustomElement$i } from './salla-button2.js';
13
+ import { d as defineCustomElement$h } from './salla-color-picker2.js';
14
+ import { d as defineCustomElement$g } from './salla-conditional-fields2.js';
15
+ import { d as defineCustomElement$f } from './salla-datetime-picker2.js';
16
+ import { d as defineCustomElement$e } from './salla-file-upload2.js';
17
+ import { d as defineCustomElement$d } from './salla-list-tile2.js';
18
+ import { d as defineCustomElement$c } from './salla-loading2.js';
19
+ import { d as defineCustomElement$b } from './salla-map2.js';
20
+ import { d as defineCustomElement$a } from './salla-modal2.js';
21
+ import { d as defineCustomElement$9 } from './salla-order-options-modal2.js';
22
+ import { d as defineCustomElement$8 } from './salla-placeholder2.js';
23
+ import { d as defineCustomElement$7 } from './salla-product-options2.js';
24
+ import { d as defineCustomElement$6 } from './salla-progress-bar2.js';
17
25
  import { d as defineCustomElement$5 } from './salla-searchable-dropdown2.js';
18
26
  import { d as defineCustomElement$4 } from './salla-skeleton2.js';
19
27
  import { d as defineCustomElement$3 } from './salla-slider2.js';
@@ -32,13 +40,17 @@ var Alert = `<!-- Generated by IcoMoon.io -->
32
40
  </svg>
33
41
  `;
34
42
 
35
- const sallaGiftingCss = "/*!twlt*/.s-gifting-steps-wrapper{transition:height 0.8s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}.s-gifting-modal .s-searchable-dropdown-trigger{border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger:hover:not(.s-searchable-dropdown-trigger--disabled){border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger--open,.s-gifting-modal .s-searchable-dropdown-trigger:focus{border-color:var(--color-primary, #00897b);box-shadow:0 0 0 1px var(--color-primary, #00897b)}.s-gifting-modal .s-searchable-dropdown-trigger-placeholder{color:#000}.s-gifting-modal .s-gifting-image-section{margin-bottom:1.5rem}.s-gifting-modal .s-gifting-slider{margin-bottom:0.5rem}.s-gifting-modal .s-gifting-image{display:block}.s-gifting-modal .s-gifting-image img{display:block;width:auto;height:100px;object-fit:contain}.s-gifting-modal .s-gifting-image-section+.anime-item .s-gifting-text-title{margin-top:1rem}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.relative{position:relative}.mt-1{margin-top:0.25rem}.inline{display:inline}.hidden{display:none}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.opacity-0{opacity:0}.outline{outline-style:solid}.transition{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-hidden{display:none}.has-error .s-form-label{color:#ff443a}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-hidden{display:none}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-form-label{margin-bottom:0.25rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-group{margin-top:0.75rem;margin-bottom:0.75rem}.s-checkbox{cursor:pointer;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));appearance:none;background-color:#fff;margin:0;width:18px;height:18px;border-width:1px;border-radius:4px;display:grid;place-content:center}.s-checkbox:before{width:10px;height:10px;clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);transform:scale(0);transform-origin:bottom left;transition:120ms transform ease-in-out;box-shadow:inset 1em 1em #444;background-color:#444}.s-checkbox:checked:before{transform:scale(1)}.s-checkbox::before{--tw-content:'';content:var(--tw-content)}.s-form-has-error .s-form-label{color:#ff443a}.s-form-has-error .s-form-control,.s-form-has-error .s-tel-input-control,.s-form-has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-gifting-widget .s-list-tile-item-icon{display:none}.s-gifting-widget-vertical .s-list-tile-item-icon{display:block}.s-gifting-widget-vertical .s-list-tile-item-title svg{fill:var(--color-primary)}.s-gifting-widget-vertical .s-list-tile-item-subtitle{padding-right:3.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-gifting-widget-vertical .s-list-tile-item{flex-wrap:wrap;padding:0px}@media (min-width: 1024px){.s-gifting-widget-vertical .s-list-tile-item-action{flex:1 1 0%}}.s-gifting-widget-vertical .widget-icon{--tw-translate-y:0.625rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:1.875rem;line-height:2.25rem;color:var(--color-primary)}.s-gifting-widget .s-button-text{display:flex}.s-gifting-widget .s-list-tile-item{flex-direction:column;justify-content:space-between;gap:1rem;border-radius:0.75rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:1.25rem;text-align:center}@media (min-width: 768px){.s-gifting-widget .s-list-tile-item{text-align:left}}@media (min-width: 1024px){.s-gifting-widget .s-list-tile-item{flex-direction:row}}@media (min-width: 768px){.s-gifting-widget .s-list-tile-item:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}}.s-gifting-widget-horizontal .s-gifting-widget-action button{padding-left:2rem;padding-right:2rem;font-weight:400}.s-gifting-info{display:flex;align-items:center;gap:0.5rem;border-radius:0.5rem;--tw-border-opacity:1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1));padding:1rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.s-gifting-info svg{height:1.25rem;width:1.25rem;fill:#1d4ed8}.s-gifting-error{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-gifting-info span{font-size:0.75rem;line-height:1rem}.s-gifting-widget-action-content{display:flex;align-items:center}.s-gifting-widget-action-content svg{margin-left:0.5rem;margin-right:0.5rem}.s-gifting-modal-header{margin-bottom:1.25rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.s-gifting-modal .s-modal-header{display:block}.s-gifting-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;padding-bottom:2rem}@media (min-width: 640px){.s-gifting-modal .s-modal-body{padding-bottom:1.5rem}}.s-gifting-modal-icon{margin-bottom:1.25rem;display:flex;height:5rem;width:5rem;flex-direction:row;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));font-size:1.875rem;line-height:2.25rem}.s-gifting-modal-title{display:flex;width:100%;align-items:center;justify-content:space-between}.s-gifting-modal-title::before{display:block;height:1px;flex:1 1 auto;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-gifting-modal-title::after{display:block;height:1px;flex:1 1 auto;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-gifting-modal-badge-wrapper{display:flex;align-items:center;padding-left:0.75rem;padding-right:0.75rem}.s-gifting-modal-badge{margin-right:0.5rem;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.875rem;line-height:1.25rem}.s-gifting-modal-badge:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0px;margin-left:0.5rem}.s-gifting-modal-uploader.has-bg{position:relative}.s-gifting-modal-uploader.has-bg .s-gifting-remove-preview{pointer-events:auto;--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.s-gifting-modal-uploader-title{margin-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem}.s-gifting-steps-wrapper{position:relative}.s-gifting-steps-wrapper .s-button-wrap{pointer-events:auto !important}.is-current-step-2 .gift-step-1,.is-current-step-1 .gift-step-2{pointer-events:none;z-index:-1}.s-gifting-step-one{padding-top:1.25rem}.s-gifting-step-two{position:absolute;top:0px;left:0px;margin-left:auto;margin-right:auto;display:flex;width:100%;--tw-translate-x:-105%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));flex-direction:column;opacity:0}.s-gifting-step-one .swiper-wrapper{height:100px}.s-gifting-step-one .swiper-slide{width:auto !important}.s-gifting-step-one .filepond--list-scroller{overflow-y:hidden}.s-gifting-step-one .swiper-wrapper img{border-radius:0.375rem;object-fit:cover}.s-gifting-step-one .filepond--root{height:230px}.s-gifting-step-one .filepond--list{left:0px !important;height:100% !important}.s-gifting-step-one .filepond-bg{position:absolute;top:0px;z-index:10;height:100%;width:100%;border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1));background-size:cover}.s-gifting-step-one .s-slider-button-next{top:35% !important}.s-gifting-step-one .s-slider-button-next button{height:35px;width:35px;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-gifting-step-one .s-slider-button-prev{top:35% !important}.s-gifting-step-one .s-slider-button-prev button{height:35px;width:35px;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-gifting-tel-input .s-tel-input-control{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.s-gifting-tel-input .s-tel-input-error-msg{display:none}.s-gifting-step-two-footer{margin-top:1.25rem;display:flex;flex-direction:row;align-items:center;justify-content:center}.s-gifting-step-two-footer>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.625rem * var(--tw-space-x-reverse));margin-left:calc(0.625rem * calc(1 - var(--tw-space-x-reverse)))}.s-gifting-step-two-footer:where([dir=\"rtl\"],[dir=\"rtl\"] *){flex-direction:row-reverse}.s-gifting-step-two-footer a{border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);fill:var(--color-primary);padding-top:8px;padding-bottom:8px;padding-left:25px;padding-right:25px}.s-gifting-step-two-footer a svg{height:1.25rem;width:1.25rem}.s-gifting-step-two .s-form-group.s-form-has-error .s-tel-input-control{--tw-border-opacity:1 !important;border-color:rgb(255 68 58 / var(--tw-border-opacity, 1)) !important}.s-gifting-selectText{margin-bottom:20px !important}.s-gifting-schedule .s-form-label{margin-bottom:0px !important}.s-gifting-schedule{margin-bottom:0.5rem;display:flex;align-items:center;justify-content:flex-start}.s-gifting-schedule>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.375rem * var(--tw-space-x-reverse));margin-left:calc(0.375rem * calc(1 - var(--tw-space-x-reverse)))}.s-gifting-schedule:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-gifting-clickable{cursor:pointer}.s-gifting-remove-preview{pointer-events:none;position:absolute;top:-7px;left:-7px;z-index:10;display:flex;height:1.25rem;width:1.25rem;--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1));text-align:center;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));opacity:0;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-gifting-remove-preview:where([dir=\"rtl\"],[dir=\"rtl\"] *){left:unset;right:-7px}.s-gifting-remove-preview svg{height:100%;width:15px;fill:#fff}.s-gifting-textarea{transition-property:all;transition-duration:200ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-gifting-calendar-hint{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.s-gifting-calendar.shown{margin-top:0.75rem;height:75px;opacity:1}.s-gifting-textarea.shown{height:122px;opacity:1}.s-gifting-calendar.hide{pointer-events:none;visibility:hidden;margin:0px;height:0px;opacity:0}.s-gifting-textarea.hide{pointer-events:none;visibility:hidden;margin:0px;height:0px;opacity:0}.s-gifting-filepond-placeholder-icon svg{margin-top:12px;margin-bottom:12px;margin-left:auto;margin-right:auto;height:4rem;width:3rem;fill:#e5e7eb}.s-gifting-filepond-placeholder-text{margin-left:auto;margin-right:auto;width:65%;min-width:18rem;font-size:0.75rem !important;line-height:1rem !important;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));margin-top:0.75rem;margin-bottom:0.75rem;font-family:var(--font-main), -apple-system, BlinkMacSystemFont}.s-gifting-skeleton-content salla-skeleton:nth-child(1){margin-bottom:0.75rem}.s-gifting-skeleton-content salla-skeleton:nth-child(2){margin-bottom:1.25rem}.s-gifting-skeleton-content salla-skeleton:nth-child(3){margin-bottom:0.75rem}.s-gifting-skeleton-content salla-skeleton:nth-child(4){margin-bottom:1.25rem}.s-gifting-skeleton .s-gifting-modal-header salla-skeleton{margin-bottom:1.25rem}.s-gifting-skeleton .s-gifting-modal-title{margin-bottom:1.25rem}.s-gifting-image{margin-left:5px;margin-right:5px}";
43
+ const sallaGiftingCss = "/*!twlt*/.s-gifting-steps-wrapper{transition:height 0.8s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}.s-gifting-modal .s-searchable-dropdown-trigger{border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger:hover:not(.s-searchable-dropdown-trigger--disabled){border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger--open,.s-gifting-modal .s-searchable-dropdown-trigger:focus{border-color:var(--color-primary, #00897b);box-shadow:0 0 0 1px var(--color-primary, #00897b)}.s-gifting-modal .s-searchable-dropdown-trigger-placeholder{color:#000}.s-gifting-modal .s-gifting-image-section{margin-bottom:1.5rem}.s-gifting-modal .s-gifting-slider{margin-bottom:0.5rem}.s-gifting-modal .s-gifting-image{display:block}.s-gifting-modal .s-gifting-image img{display:block;width:auto;height:100px;object-fit:contain}.s-gifting-modal .s-gifting-image-section+.anime-item .s-gifting-text-title{margin-top:1rem}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.relative{position:relative}.mt-1{margin-top:0.25rem}.block{display:block}.inline{display:inline}.hidden{display:none}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.opacity-0{opacity:0}.outline{outline-style:solid}.transition{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-hidden{display:none}.has-error .s-form-label{color:#ff443a}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-hidden{display:none}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-form-label{margin-bottom:0.25rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-group{margin-top:0.75rem;margin-bottom:0.75rem}.s-checkbox{cursor:pointer;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));appearance:none;background-color:#fff;margin:0;width:18px;height:18px;border-width:1px;border-radius:4px;display:grid;place-content:center}.s-checkbox:before{width:10px;height:10px;clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);transform:scale(0);transform-origin:bottom left;transition:120ms transform ease-in-out;box-shadow:inset 1em 1em #444;background-color:#444}.s-checkbox:checked:before{transform:scale(1)}.s-checkbox::before{--tw-content:'';content:var(--tw-content)}.s-form-has-error .s-form-label{color:#ff443a}.s-form-has-error .s-form-control,.s-form-has-error .s-tel-input-control,.s-form-has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-gifting-widget .s-list-tile-item-icon{display:none}.s-gifting-widget-vertical .s-list-tile-item-icon{display:block}.s-gifting-widget-vertical .s-list-tile-item-title svg{fill:var(--color-primary)}.s-gifting-widget-vertical .s-list-tile-item-subtitle{padding-right:3.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-gifting-widget-vertical .s-list-tile-item{flex-wrap:wrap;padding:0px}@media (min-width: 1024px){.s-gifting-widget-vertical .s-list-tile-item-action{flex:1 1 0%}}.s-gifting-widget-vertical .widget-icon{--tw-translate-y:0.625rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:1.875rem;line-height:2.25rem;color:var(--color-primary)}.s-gifting-widget .s-button-text{display:flex}.s-gifting-widget .s-list-tile-item{flex-direction:column;justify-content:space-between;gap:1rem;border-radius:0.75rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:1.25rem;text-align:center}@media (min-width: 768px){.s-gifting-widget .s-list-tile-item{text-align:left}}@media (min-width: 1024px){.s-gifting-widget .s-list-tile-item{flex-direction:row}}@media (min-width: 768px){.s-gifting-widget .s-list-tile-item:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}}.s-gifting-widget-horizontal .s-gifting-widget-action button{padding-left:2rem;padding-right:2rem;font-weight:400}.s-gifting-info{display:flex;align-items:center;gap:0.5rem;border-radius:0.5rem;--tw-border-opacity:1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1));padding:1rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.s-gifting-info svg{height:1.25rem;width:1.25rem;fill:#1d4ed8}.s-gifting-error{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-gifting-info span{font-size:0.75rem;line-height:1rem}.s-gifting-widget-action-content{display:flex;align-items:center}.s-gifting-widget-action-content svg{margin-left:0.5rem;margin-right:0.5rem}.s-gifting-modal-header{margin-bottom:1.25rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.s-gifting-modal .s-modal-header{display:block}.s-gifting-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;padding-bottom:2rem}@media (min-width: 640px){.s-gifting-modal .s-modal-body{padding-bottom:1.5rem}}.s-gifting-modal-icon{margin-bottom:1.25rem;display:flex;height:5rem;width:5rem;flex-direction:row;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));font-size:1.875rem;line-height:2.25rem}.s-gifting-modal-title{display:flex;width:100%;align-items:center;justify-content:space-between}.s-gifting-modal-title::before{display:block;height:1px;flex:1 1 auto;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-gifting-modal-title::after{display:block;height:1px;flex:1 1 auto;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-gifting-modal-badge-wrapper{display:flex;align-items:center;padding-left:0.75rem;padding-right:0.75rem}.s-gifting-modal-badge{margin-right:0.5rem;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.875rem;line-height:1.25rem}.s-gifting-modal-badge:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0px;margin-left:0.5rem}.s-gifting-modal-uploader.has-bg{position:relative}.s-gifting-modal-uploader.has-bg .s-gifting-remove-preview{pointer-events:auto;--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.s-gifting-modal-uploader-title{margin-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem}.s-gifting-steps-wrapper{position:relative}.s-gifting-steps-wrapper .s-button-wrap{pointer-events:auto !important}.is-current-step-2 .gift-step-1,.is-current-step-1 .gift-step-2{pointer-events:none;z-index:-1}.s-gifting-step-one{padding-top:1.25rem}.s-gifting-step-two{position:absolute;top:0px;left:0px;margin-left:auto;margin-right:auto;display:flex;width:100%;--tw-translate-x:-105%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));flex-direction:column;opacity:0}.s-gifting-step-one .swiper-wrapper{height:100px}.s-gifting-step-one .swiper-slide{width:auto !important}.s-gifting-step-one .filepond--list-scroller{overflow-y:hidden}.s-gifting-step-one .swiper-wrapper img{border-radius:0.375rem;object-fit:cover}.s-gifting-step-one .filepond--root{height:230px}.s-gifting-step-one .filepond--list{left:0px !important;height:100% !important}.s-gifting-step-one .filepond-bg{position:absolute;top:0px;z-index:10;height:100%;width:100%;border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1));background-size:cover}.s-gifting-step-one .s-slider-button-next{top:35% !important}.s-gifting-step-one .s-slider-button-next button{height:35px;width:35px;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-gifting-step-one .s-slider-button-prev{top:35% !important}.s-gifting-step-one .s-slider-button-prev button{height:35px;width:35px;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-gifting-tel-input .s-tel-input-control{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.s-gifting-tel-input .s-tel-input-error-msg{display:none}.s-gifting-step-two-footer{margin-top:1.25rem;display:flex;flex-direction:row;align-items:center;justify-content:center}.s-gifting-step-two-footer>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.625rem * var(--tw-space-x-reverse));margin-left:calc(0.625rem * calc(1 - var(--tw-space-x-reverse)))}.s-gifting-step-two-footer:where([dir=\"rtl\"],[dir=\"rtl\"] *){flex-direction:row-reverse}.s-gifting-step-two-footer a{border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);fill:var(--color-primary);padding-top:8px;padding-bottom:8px;padding-left:25px;padding-right:25px}.s-gifting-step-two-footer a svg{height:1.25rem;width:1.25rem}.s-gifting-step-two .s-form-group.s-form-has-error .s-tel-input-control{--tw-border-opacity:1 !important;border-color:rgb(255 68 58 / var(--tw-border-opacity, 1)) !important}.s-gifting-selectText{margin-bottom:20px !important}.s-gifting-schedule .s-form-label{margin-bottom:0px !important}.s-gifting-schedule{margin-bottom:0.5rem;display:flex;align-items:center;justify-content:flex-start}.s-gifting-schedule>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.375rem * var(--tw-space-x-reverse));margin-left:calc(0.375rem * calc(1 - var(--tw-space-x-reverse)))}.s-gifting-schedule:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-gifting-clickable{cursor:pointer}.s-gifting-remove-preview{pointer-events:none;position:absolute;top:-7px;left:-7px;z-index:10;display:flex;height:1.25rem;width:1.25rem;--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1));text-align:center;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));opacity:0;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-gifting-remove-preview:where([dir=\"rtl\"],[dir=\"rtl\"] *){left:unset;right:-7px}.s-gifting-remove-preview svg{height:100%;width:15px;fill:#fff}.s-gifting-textarea{transition-property:all;transition-duration:200ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-gifting-calendar-hint{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.s-gifting-calendar.shown{margin-top:0.75rem;height:75px;opacity:1}.s-gifting-textarea.shown{height:122px;opacity:1}.s-gifting-calendar.hide{pointer-events:none;visibility:hidden;margin:0px;height:0px;opacity:0}.s-gifting-textarea.hide{pointer-events:none;visibility:hidden;margin:0px;height:0px;opacity:0}.s-gifting-filepond-placeholder-icon svg{margin-top:12px;margin-bottom:12px;margin-left:auto;margin-right:auto;height:4rem;width:3rem;fill:#e5e7eb}.s-gifting-filepond-placeholder-text{margin-left:auto;margin-right:auto;width:65%;min-width:18rem;font-size:0.75rem !important;line-height:1rem !important;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));margin-top:0.75rem;margin-bottom:0.75rem;font-family:var(--font-main), -apple-system, BlinkMacSystemFont}.s-gifting-skeleton-content salla-skeleton:nth-child(1){margin-bottom:0.75rem}.s-gifting-skeleton-content salla-skeleton:nth-child(2){margin-bottom:1.25rem}.s-gifting-skeleton-content salla-skeleton:nth-child(3){margin-bottom:0.75rem}.s-gifting-skeleton-content salla-skeleton:nth-child(4){margin-bottom:1.25rem}.s-gifting-skeleton .s-gifting-modal-header salla-skeleton{margin-bottom:1.25rem}.s-gifting-skeleton .s-gifting-modal-title{margin-bottom:1.25rem}.s-gifting-image{margin-left:5px;margin-right:5px}";
36
44
 
37
45
  const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting extends HTMLElement {
38
46
  constructor() {
39
47
  super();
40
48
  this.__registerHost();
41
49
  this.defaultEvent = "gifting:open";
50
+ /** Order options picked in the pre-gift modal, sent as `order_options` with the gift payload. */
51
+ this.collectedOrderOptions = [];
52
+ /** Live PDP price, kept in sync by `onPriceUpdated`, used to seed the order-options total. */
53
+ this.livePrice = 0;
42
54
  this.selectImageForYourGift = salla.lang.get('blocks.buy_as_gift.select_image_for_your_gift');
43
55
  this.currentStep = 1;
44
56
  this.showCalendar = false;
@@ -181,10 +193,12 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
181
193
  return null;
182
194
  }
183
195
  componentDidLoad() {
184
- salla.event.product.onPriceUpdated(() => {
196
+ salla.event.product.onPriceUpdated((response) => {
185
197
  const quantityInput = document.querySelector(`.s-quantity-input-input`);
186
198
  // @ts-ignore
187
199
  this.quantity = quantityInput?.value;
200
+ // Seeds the order-options modal total so it reflects the current variant/quantity price.
201
+ this.livePrice = Number(response?.data?.price) || this.livePrice;
188
202
  });
189
203
  }
190
204
  getFormDataFromForm() {
@@ -209,6 +223,93 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
209
223
  }
210
224
  return formData;
211
225
  }
226
+ /**
227
+ * Order-options gate. Two shapes, because the two gifting entry points already differ:
228
+ *
229
+ * - **Cart page**: the order-option forms are rendered inline and synced to the cart on change,
230
+ * so gifting reuses the cart-submit check — block on invalid, never re-ask in a modal.
231
+ * - **PDP**: nothing renders the options, so they're collected in the shared
232
+ * <salla-order-options-modal> *before* the gifting modal, the same modal and sequence the PDP
233
+ * uses for Quick Purchase and Apple Pay.
234
+ *
235
+ * Returns false when the buyer must fix something first (invalid inline form, or a dismissed
236
+ * modal); the gifting modal then stays closed and they retry from the widget button.
237
+ */
238
+ async collectOrderOptions() {
239
+ this.collectedOrderOptions = [];
240
+ if (!this.productId) {
241
+ return this.validateInlineCartOptions();
242
+ }
243
+ const { products, basePrice } = this.getOrderOptionsTarget();
244
+ if (!products.length) {
245
+ return true;
246
+ }
247
+ let response;
248
+ try {
249
+ response = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions(products));
250
+ }
251
+ catch (error) {
252
+ salla?.logger?.warn?.('order-options: fetch failed', error);
253
+ return true;
254
+ }
255
+ const orderOptions = response?.data?.order_options || [];
256
+ if (!orderOptions.length) {
257
+ return true;
258
+ }
259
+ const price = basePrice > 0 ? basePrice : Number(response?.data?.products?.[0]?.price?.amount) || 0;
260
+ try {
261
+ const result = await this.ensureOrderOptionsModal().open({ orderOptions, basePrice: price });
262
+ this.collectedOrderOptions = result?.orderOptions || [];
263
+ return true;
264
+ }
265
+ catch {
266
+ // dismissed — keep the gifting modal closed.
267
+ return false;
268
+ }
269
+ }
270
+ /**
271
+ * Same check the theme runs on cart submit: every `form[id^="item-"]` (cart items *and* the
272
+ * inline order-option forms) must be valid. Values are already on the cart — each form syncs
273
+ * through `cart.updateItem` on change — so nothing is collected here, gifting is only blocked.
274
+ */
275
+ validateInlineCartOptions() {
276
+ const forms = document.querySelectorAll('form[id^="item-"]');
277
+ let isValid = true;
278
+ forms.forEach(form => {
279
+ if (!form.reportValidity()) {
280
+ isValid = false;
281
+ }
282
+ });
283
+ if (!isValid) {
284
+ salla.error(salla.lang.get('common.messages.required_fields'));
285
+ }
286
+ return isValid;
287
+ }
288
+ /** What to ask order options for on the PDP. `basePrice` seeds the modal's live total. */
289
+ getOrderOptionsTarget() {
290
+ return {
291
+ products: [{ id: this.productId, quantity: this.getGiftQuantity() }],
292
+ basePrice: this.livePrice,
293
+ };
294
+ }
295
+ /** `quantity` state is only seeded on price updates, so fall back to the product form. */
296
+ getGiftQuantity() {
297
+ const fromState = Number(this.quantity);
298
+ if (Number.isFinite(fromState) && fromState > 0) {
299
+ return fromState;
300
+ }
301
+ const fromForm = Number(this.getFormDataFromForm()?.get('quantity'));
302
+ return Number.isFinite(fromForm) && fromForm > 0 ? fromForm : 1;
303
+ }
304
+ /** Get-or-create the singleton order-options modal on <body>. */
305
+ ensureOrderOptionsModal() {
306
+ let modal = document.querySelector('salla-order-options-modal');
307
+ if (!modal) {
308
+ modal = document.createElement('salla-order-options-modal');
309
+ document.body.appendChild(modal);
310
+ }
311
+ return modal;
312
+ }
212
313
  /**
213
314
  * Show / Open the gifting modal window
214
315
  */
@@ -218,6 +319,12 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
218
319
  salla.event.dispatch('login::open', { withoutReload: true });
219
320
  return;
220
321
  }
322
+ // Required customizations can't be bypassed by gifting: the order-options modal runs first, and
323
+ // dismissing it keeps the gifting modal closed. Runs here (not in the button handler) so the
324
+ // `gifting:open` event and the after-login re-entry go through the same gate.
325
+ if (!(await this.collectOrderOptions())) {
326
+ return;
327
+ }
221
328
  // Reopen on step 1, but KEEP the user's selections (image / text / custom
222
329
  // message / sender+receiver). The modal element is never destroyed, so its
223
330
  // state and DOM survive close→reopen without a page refresh — we only reset
@@ -722,6 +829,9 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
722
829
  formData = this.getFormDataFromForm() || new FormData();
723
830
  formData = this.mergeObjectToFormData(giftPayload, formData);
724
831
  }
832
+ // PDP flow only — the cart flow's options are already on the cart, and the API keeps existing
833
+ // selections when the request carries no `order_options`.
834
+ appendOrderOptionsToPayload(formData ?? giftPayload, this.collectedOrderOptions);
725
835
  const addGiftMethod = this.productId
726
836
  ? () => salla.product.addProductGiftToCart(this.productId, formData, true)
727
837
  : () => salla.cart.addCartGiftToCart(giftPayload, true);
@@ -774,7 +884,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
774
884
  }
775
885
  render() {
776
886
  return [
777
- h("div", { key: '3795180f3f719218220086c66f6bfbe6e57dc1d4' }, h("salla-list-tile", { key: 'cb9fd3e10b02bb429b25c028fcd2d328e73eab6e', class: this.generateClass() }, h("div", { key: 'cca448eae1144b0606bf8f07844974cd7f966236', slot: "title" }, this.vertical ? h("span", { innerHTML: SIGiftSharing }) : '', h("h3", { key: 'c33210bdf1a72cdf0151138ce2949fc462efaf94' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '007fc138265e6ab82dbdfab8169baa407b111e60', slot: "subtitle" }, h("div", { key: '89de9cc780511609d294f67a3d639a0305300b17' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'ea647e47079ab8e57580675f485bc99c2b213cd4', slot: "action" }, h("salla-button", { key: 'e87bcc03e5ab02204ca9f1d590421cae13282269', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: 'ce294391f8c18e345ec2117a15e2942dd00790fc', name: "widget-btn-content" }, h("div", { key: '7106257d9f44b869fcd3933ae8a1d2a50f4486dd', class: "s-gifting-widget-action-content" }, h("span", { key: '305822ae865b6da9275ced4600933d83d42e54e7', innerHTML: SIGiftSharing }), " \u00A0", h("span", { key: '13f2d03213e1fea9fe9911a94259b89085406ab3' }, this.sectionBtnText)))))), h("salla-modal", { key: 'b55185fbd34776043661ca6f15a739e34e98e0ef', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '9f59cea6e2835d80e24bc269b78a5bc47b354f6a', slot: "loading" }, h("div", { key: '3f74f3384be120a0733e921de696d2beeccd49ce', class: "s-gifting-skeleton" }, h("div", { key: 'e3ffb5b8d712bc391ad6b4190556ac870e37db0c', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: 'b9b154ab445516fa1fae66cc458dd68114024d9d', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '1ecf5c6ea1ebeccbd6ed7f259045647148863826', class: "s-gifting-modal-title" }, h("div", { key: '165d927a3bcaf47dd5c7657db8543ad02b47dc44', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: 'cba1667fa446566c5bc862c206313d8f48a0991e', height: '15px', width: '150px' })))), h("div", { key: 'f56f8e8820f789ca117a0e19cf660bc4d836ec6a', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '74b8cec4be6e18ec8a1b340d8fed0b2d136bb1d3', height: '10px', width: '150px' }), h("salla-skeleton", { key: '5c615a0c0eb72908e601c2cfd28fe12a6391ef80', height: '230px' }), h("salla-skeleton", { key: '5c432b6e3f8c70574e1d05d26f57443ff5da45fe', height: '10px', width: '150px' }), h("salla-skeleton", { key: '7f5d7ec5cf3ef50f945e2a57363ac215e41f306b', height: '30px' }), h("salla-skeleton", { key: '47c0e823643dc9c2d4908dde353adf5b0e4355ad', height: '40px' })))), h("slot", { key: '3ad3a57a07cb8182e5cd86783ba19c8ae8f34d3b', name: "header" }), !!this.hasError ?
887
+ h("div", { key: 'fd15533a1dbb57c0bbf31d66046b7051b63221d7' }, h("salla-list-tile", { key: 'b6f298371176e3fc829a8f0a7de775adbc70f903', class: this.generateClass() }, h("div", { key: '46c0dfc5d7d89576d411b5765d92a72b3dd289ba', slot: "title" }, this.vertical ? h("span", { innerHTML: SIGiftSharing }) : '', h("h3", { key: 'd0b9bbd243458f9ea25aa7a970d3084d16ca56a8' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '0ac470d3daa813ca8177e9f92c9c0eec402784b0', slot: "subtitle" }, h("div", { key: 'a783624dfe67959544cd70b3a087ccd004fb517f' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'd76689c03fdff0aa9ff50323227a191e8aa7aa11', slot: "action" }, h("salla-button", { key: '1516f29ca50b92f78a8f7e5a07daa9e70740dae9', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '9d9b070b98e7a60736ca87347b0982a3034681a2', name: "widget-btn-content" }, h("div", { key: '4813d5f3bf85c3f5a0eefb5bd5478a009b6aceb2', class: "s-gifting-widget-action-content" }, h("span", { key: '738760ee256892c2f654ebae06877ca6cdaf0bec', innerHTML: SIGiftSharing }), " \u00A0", h("span", { key: 'bb181feda8126bd541517dabe107c44ab4da177a' }, this.sectionBtnText)))))), h("salla-modal", { key: '0d4478c6d9cf6bd1e75e81dca234c05af9303e0e', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: 'cea9b69f0af18a825f1cf4ac979fb571cc4b497f', slot: "loading" }, h("div", { key: '8190baa4b26d4de58ea98a4bd3662a54ca024e3a', class: "s-gifting-skeleton" }, h("div", { key: '6271ba338d1e85c5337f9b4956b2b0eb1c610669', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '77fb7f73e5dd748b69c9ed7263e3cefc9b24d643', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '4e436f8ad10aad25ffb84632973376855c0d803d', class: "s-gifting-modal-title" }, h("div", { key: '98c17840dd15e6d8495bd709a76d257001a3c2f3', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '9582b325011b36f5dbb7bf70a044554e339af05a', height: '15px', width: '150px' })))), h("div", { key: 'd95d5c41fb226a654e62c183fcababcf1a1af9b5', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '73ee2dd11f30ad370261a9b88324f40a52607973', height: '10px', width: '150px' }), h("salla-skeleton", { key: '8b07be46818f49401a5c7aae8a19de0445e9785e', height: '230px' }), h("salla-skeleton", { key: '6a7a9ff47ad18efdfc51d2c70dba6cf89c572974', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'f033c20b65077bfa99fb302415e10ff55f2d112d', height: '30px' }), h("salla-skeleton", { key: '60bf4740d16b9cf852536315b62d1abafc14e4d5', height: '40px' })))), h("slot", { key: 'eac7b126556b6895457fdd0c87f15b872975947f', name: "header" }), !!this.hasError ?
778
888
  h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
779
889
  :
780
890
  [
@@ -797,7 +907,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
797
907
  h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-city` }, this.receiverCityFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCity, items: this.displayedCities, selectedItem: this.selectedCity, loading: this.loadingCities, searching: this.searchingCities, disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId), required: true, inputId: `${this.hostId}-city`, searchQuery: this.citySearchQuery, clientSearch: !this.enableCityAjaxSearch, dropUp: true, keepParentScroll: true, onItemSelected: (e) => this.handleCitySelected(e.detail), onSearchInput: (e) => this.handleCitySearch(e.detail), onDropdownClosed: () => this.handleCityDropdownClosed() }), this.errors && this.errors['receiver.city_id'] ?
798
908
  h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() && this.cityNoticeText() &&
799
909
  h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.cityNoticeText())), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, !this.skipStep1() && h("a", { href: "#!", innerHTML: IconArrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
800
- ], h("slot", { key: '4b5e340be26e46c09508d192207fa6af9ec0cc44', name: "footer" })))
910
+ ], h("slot", { key: '8f516d4a4275f867f0564ef7aa187fb2bcc1e32f', name: "footer" })))
801
911
  ];
802
912
  }
803
913
  static get style() { return sallaGiftingCss; }
@@ -890,7 +1000,7 @@ function defineCustomElement$1() {
890
1000
  if (typeof customElements === "undefined") {
891
1001
  return;
892
1002
  }
893
- const components = ["salla-gifting", "salla-attachment-view", "salla-button", "salla-datetime-picker", "salla-file-upload", "salla-list-tile", "salla-loading", "salla-modal", "salla-placeholder", "salla-searchable-dropdown", "salla-skeleton", "salla-slider", "salla-tel-input"];
1003
+ const components = ["salla-gifting", "salla-attachment-view", "salla-booking-field", "salla-button", "salla-color-picker", "salla-conditional-fields", "salla-datetime-picker", "salla-file-upload", "salla-list-tile", "salla-loading", "salla-map", "salla-modal", "salla-order-options-modal", "salla-placeholder", "salla-product-options", "salla-progress-bar", "salla-searchable-dropdown", "salla-skeleton", "salla-slider", "salla-tel-input"];
894
1004
  components.forEach(tagName => { switch (tagName) {
895
1005
  case "salla-gifting":
896
1006
  if (!customElements.get(tagName)) {
@@ -899,40 +1009,75 @@ function defineCustomElement$1() {
899
1009
  break;
900
1010
  case "salla-attachment-view":
901
1011
  if (!customElements.get(tagName)) {
902
- defineCustomElement$d();
1012
+ defineCustomElement$k();
1013
+ }
1014
+ break;
1015
+ case "salla-booking-field":
1016
+ if (!customElements.get(tagName)) {
1017
+ defineCustomElement$j();
903
1018
  }
904
1019
  break;
905
1020
  case "salla-button":
906
1021
  if (!customElements.get(tagName)) {
907
- defineCustomElement$c();
1022
+ defineCustomElement$i();
1023
+ }
1024
+ break;
1025
+ case "salla-color-picker":
1026
+ if (!customElements.get(tagName)) {
1027
+ defineCustomElement$h();
1028
+ }
1029
+ break;
1030
+ case "salla-conditional-fields":
1031
+ if (!customElements.get(tagName)) {
1032
+ defineCustomElement$g();
908
1033
  }
909
1034
  break;
910
1035
  case "salla-datetime-picker":
911
1036
  if (!customElements.get(tagName)) {
912
- defineCustomElement$b();
1037
+ defineCustomElement$f();
913
1038
  }
914
1039
  break;
915
1040
  case "salla-file-upload":
916
1041
  if (!customElements.get(tagName)) {
917
- defineCustomElement$a();
1042
+ defineCustomElement$e();
918
1043
  }
919
1044
  break;
920
1045
  case "salla-list-tile":
921
1046
  if (!customElements.get(tagName)) {
922
- defineCustomElement$9();
1047
+ defineCustomElement$d();
923
1048
  }
924
1049
  break;
925
1050
  case "salla-loading":
926
1051
  if (!customElements.get(tagName)) {
927
- defineCustomElement$8();
1052
+ defineCustomElement$c();
1053
+ }
1054
+ break;
1055
+ case "salla-map":
1056
+ if (!customElements.get(tagName)) {
1057
+ defineCustomElement$b();
928
1058
  }
929
1059
  break;
930
1060
  case "salla-modal":
931
1061
  if (!customElements.get(tagName)) {
932
- defineCustomElement$7();
1062
+ defineCustomElement$a();
1063
+ }
1064
+ break;
1065
+ case "salla-order-options-modal":
1066
+ if (!customElements.get(tagName)) {
1067
+ defineCustomElement$9();
933
1068
  }
934
1069
  break;
935
1070
  case "salla-placeholder":
1071
+ if (!customElements.get(tagName)) {
1072
+ defineCustomElement$8();
1073
+ }
1074
+ break;
1075
+ case "salla-product-options":
1076
+ if (!customElements.get(tagName)) {
1077
+ defineCustomElement$7();
1078
+ }
1079
+ break;
1080
+ case "salla-progress-bar":
936
1081
  if (!customElements.get(tagName)) {
937
1082
  defineCustomElement$6();
938
1083
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
5
5
  import { a as axios } from './axios.js';
6
+ import { r as resolveApplePayOrderOptions, a as reportProductOptionsValiditySync, b as appendOrderOptionsToPayload } from './apple-pay-order-options.js';
6
7
  import { d as defineCustomElement$e } from './salla-attachment-view2.js';
7
8
  import { d as defineCustomElement$d } from './salla-booking-field2.js';
8
9
  import { d as defineCustomElement$c } from './salla-button2.js';
@@ -1573,88 +1574,6 @@ if (typeof window !== 'undefined' && (SallaApplePay.canUseNative() || window.Pay
1573
1574
  document.querySelectorAll('data-show-if-apple-pay-supported').forEach(element => element.style.display = 'none');
1574
1575
  }
1575
1576
 
1576
- /**
1577
- * Order-options helpers for the Apple Pay quick-buy flow — keeps <salla-quick-buy> to thin AP wiring.
1578
- * Apple Pay resolves options inside the session-started hook (single gesture), so the caller owns
1579
- * the ApplePaySession and drives it via callbacks.
1580
- */
1581
- /** Get-or-create the singleton order-options modal on <body>. */
1582
- function ensureOrderOptionsModal() {
1583
- let modal = document.querySelector('salla-order-options-modal');
1584
- if (!modal) {
1585
- modal = document.createElement('salla-order-options-modal');
1586
- document.body.appendChild(modal);
1587
- }
1588
- return modal;
1589
- }
1590
- /** Sync PDP-option validity (an `await` would consume the Apple Pay gesture). Skips hidden/disabled inputs. */
1591
- function reportProductOptionsValiditySync(productId) {
1592
- const optionsElement = document.querySelector(`salla-product-options[product-id="${productId}"]`);
1593
- if (!optionsElement)
1594
- return true;
1595
- const requiredInputs = optionsElement.querySelectorAll('[required]');
1596
- let pass = true;
1597
- requiredInputs.forEach((input) => {
1598
- if (input.disabled || input.closest('.hidden'))
1599
- return;
1600
- if ('reportValidity' in input && !input.reportValidity())
1601
- pass = false;
1602
- });
1603
- return pass;
1604
- }
1605
- /** Merge collected order-options into the quick-purchase payload (FormData or plain object). */
1606
- function appendOrderOptionsToPayload(data, orderOptions) {
1607
- if (!orderOptions.length)
1608
- return;
1609
- if (data && typeof data.append === 'function') {
1610
- orderOptions.forEach((entry, i) => {
1611
- data.append(`order_options[${i}][id]`, String(entry.id));
1612
- data.append(`order_options[${i}][value]`, String(entry.value));
1613
- });
1614
- return;
1615
- }
1616
- if (data && typeof data === 'object') {
1617
- data.order_options = orderOptions;
1618
- }
1619
- }
1620
- /**
1621
- * Fetch order options and, if any, collect them via the modal (apple-pay mode). Callbacks drive the
1622
- * caller's pre-created session: `beginPendingSession` (no options), `discardPendingSession` (options
1623
- * found — the modal's AP button starts a fresh one), `onSubmit` (submitted).
1624
- */
1625
- async function resolveApplePayOrderOptions(opts) {
1626
- let resp;
1627
- try {
1628
- resp = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions([{ id: opts.productId, quantity: opts.quantity }]));
1629
- }
1630
- catch (error) {
1631
- salla?.logger?.warn?.('order-options: fetch failed', error);
1632
- opts.beginPendingSession();
1633
- return;
1634
- }
1635
- const items = resp?.data?.order_options || [];
1636
- if (!items.length) {
1637
- opts.beginPendingSession(); // begin() doesn't need a fresh gesture
1638
- return;
1639
- }
1640
- opts.discardPendingSession(); // drop the unused session; the modal builds a fresh one
1641
- const basePrice = Number(opts.amount) > 0
1642
- ? Number(opts.amount)
1643
- : Number(resp?.data?.products?.[0]?.price?.amount) || 0;
1644
- const modal = ensureOrderOptionsModal();
1645
- try {
1646
- await modal.open({
1647
- orderOptions: items,
1648
- basePrice,
1649
- paymentMode: 'apple-pay',
1650
- onSubmit: opts.onSubmit,
1651
- });
1652
- }
1653
- catch {
1654
- // dismissed — no live session
1655
- }
1656
- }
1657
-
1658
1577
  const sallaQuickBuyCss = "/*!twlt*/.s-quick-buy-button .s-button-text{display:flex}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:40px;--apple-pay-button-border-radius:.75rem;--apple-pay-button-box-sizing:content-box}.s-add-product-button-with-sticky-bar salla-quick-buy .s-quick-buy-button .s-button-text span{display:none}@media (min-width: 768px){.s-add-product-button-with-sticky-bar salla-quick-buy .s-quick-buy-button .s-button-text span{display:block}}.s-quick-buy-button svg{margin-right:0.375rem;height:1rem;width:1rem}.s-quick-buy-button svg:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0px;margin-left:0.375rem}.s-quick-buy-apple-pay{display:block;width:100%}@media (min-width: 640px){.s-quick-buy-apple-pay{margin-top:0.625rem}}.s-quick-buy-apple-pay .apple-pay-btn-wrapper .apple-pay-btn{width:auto !important;border-radius:var(--s-radius, 0.25rem) !important}";
1659
1578
 
1660
1579
  const SallaQuickBuy = /*@__PURE__*/ proxyCustomElement(class SallaQuickBuy extends HTMLElement {
@@ -58,7 +58,9 @@ const SallaScopees = /*@__PURE__*/ proxyCustomElement(class SallaScopees extends
58
58
  ? "blocks.scope.shopping_from_another_market"
59
59
  : "blocks.scope.shopping_from_another_branch");
60
60
  }
61
- return salla.lang.get('blocks.scope.search_for_availability_in_other_branches');
61
+ return salla.lang.get(isMultiCountries
62
+ ? 'blocks.scope.search_for_availability_in_other_markets'
63
+ : 'blocks.scope.search_for_availability_in_other_branches');
62
64
  };
63
65
  salla.event.on('scopes::open', ({ mode = null, product_id = null } = {}) => {
64
66
  this.open(mode, product_id);
@@ -0,0 +1,86 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ /**
5
+ * Order-options helpers for the Apple Pay quick-buy flow — keeps <salla-quick-buy> to thin AP wiring.
6
+ * Apple Pay resolves options inside the session-started hook (single gesture), so the caller owns
7
+ * the ApplePaySession and drives it via callbacks.
8
+ */
9
+ /** Get-or-create the singleton order-options modal on <body>. */
10
+ function ensureOrderOptionsModal() {
11
+ let modal = document.querySelector('salla-order-options-modal');
12
+ if (!modal) {
13
+ modal = document.createElement('salla-order-options-modal');
14
+ document.body.appendChild(modal);
15
+ }
16
+ return modal;
17
+ }
18
+ /** Sync PDP-option validity (an `await` would consume the Apple Pay gesture). Skips hidden/disabled inputs. */
19
+ function reportProductOptionsValiditySync(productId) {
20
+ const optionsElement = document.querySelector(`salla-product-options[product-id="${productId}"]`);
21
+ if (!optionsElement)
22
+ return true;
23
+ const requiredInputs = optionsElement.querySelectorAll('[required]');
24
+ let pass = true;
25
+ requiredInputs.forEach((input) => {
26
+ if (input.disabled || input.closest('.hidden'))
27
+ return;
28
+ if ('reportValidity' in input && !input.reportValidity())
29
+ pass = false;
30
+ });
31
+ return pass;
32
+ }
33
+ /** Merge collected order-options into the quick-purchase payload (FormData or plain object). */
34
+ function appendOrderOptionsToPayload(data, orderOptions) {
35
+ if (!orderOptions.length)
36
+ return;
37
+ if (data && typeof data.append === 'function') {
38
+ orderOptions.forEach((entry, i) => {
39
+ data.append(`order_options[${i}][id]`, String(entry.id));
40
+ data.append(`order_options[${i}][value]`, String(entry.value));
41
+ });
42
+ return;
43
+ }
44
+ if (data && typeof data === 'object') {
45
+ data.order_options = orderOptions;
46
+ }
47
+ }
48
+ /**
49
+ * Fetch order options and, if any, collect them via the modal (apple-pay mode). Callbacks drive the
50
+ * caller's pre-created session: `beginPendingSession` (no options), `discardPendingSession` (options
51
+ * found — the modal's AP button starts a fresh one), `onSubmit` (submitted).
52
+ */
53
+ async function resolveApplePayOrderOptions(opts) {
54
+ let resp;
55
+ try {
56
+ resp = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions([{ id: opts.productId, quantity: opts.quantity }]));
57
+ }
58
+ catch (error) {
59
+ salla?.logger?.warn?.('order-options: fetch failed', error);
60
+ opts.beginPendingSession();
61
+ return;
62
+ }
63
+ const items = resp?.data?.order_options || [];
64
+ if (!items.length) {
65
+ opts.beginPendingSession(); // begin() doesn't need a fresh gesture
66
+ return;
67
+ }
68
+ opts.discardPendingSession(); // drop the unused session; the modal builds a fresh one
69
+ const basePrice = Number(opts.amount) > 0
70
+ ? Number(opts.amount)
71
+ : Number(resp?.data?.products?.[0]?.price?.amount) || 0;
72
+ const modal = ensureOrderOptionsModal();
73
+ try {
74
+ await modal.open({
75
+ orderOptions: items,
76
+ basePrice,
77
+ paymentMode: 'apple-pay',
78
+ onSubmit: opts.onSubmit,
79
+ });
80
+ }
81
+ catch {
82
+ // dismissed — no live session
83
+ }
84
+ }
85
+
86
+ export { appendOrderOptionsToPayload as a, reportProductOptionsValiditySync as b, resolveApplePayOrderOptions as r };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Q9lz4Iuq.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Dx4PTJFl.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Q9lz4Iuq.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Dx4PTJFl.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Q9lz4Iuq.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Dx4PTJFl.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Q9lz4Iuq.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Dx4PTJFl.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Q9lz4Iuq.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Dx4PTJFl.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Q9lz4Iuq.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Dx4PTJFl.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Q9lz4Iuq.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Dx4PTJFl.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {