@salla.sa/twilight-components 2.14.539 → 2.14.541

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/dist/cjs/{filepond-CIpOpiw6.js → filepond-CNdvfaMJ.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-CPV_SZrj.js → filepond-plugin-file-poster-Di_D3w89.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-C_XGylG1.js → filepond-plugin-file-validate-size-BiRa98qd.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-CmVS48lk.js → filepond-plugin-file-validate-type-Bolv-kyJ.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-KfqhH5F9.js → filepond-plugin-image-edit-AN6huMV9.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BfRIDxO-.js → filepond-plugin-image-exif-orientation-Bwa8QtGo.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-DlvO4sHZ.js → filepond-plugin-image-preview-CaVYLAvG.js} +1 -1
  8. package/dist/cjs/helpers-ClOJIAG8.js +89 -0
  9. package/dist/cjs/{index-CMDyFi6Q.js → index-DX2EKTCE.js} +18 -14
  10. package/dist/cjs/{intlTelInput-BK34b4sR.js → intlTelInput-DnwdGAiP.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/{salla-booking-field_7.cjs.entry.js → salla-attachment-view_9.cjs.entry.js} +1003 -40
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +2 -2
  28. package/dist/cjs/salla-comment-form_8.cjs.entry.js +14 -5
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +303 -26
  32. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +420 -84
  85. package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -5
  86. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +4 -83
  87. package/dist/cjs/salla-review-order-item.cjs.entry.js +125 -0
  88. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  104. package/dist/cjs/twilight.cjs.js +2 -2
  105. package/dist/cjs/upload-limits-C3RarAPN.js +136 -0
  106. package/dist/cjs/{vanilla-picker-DYTpjTDj.js → vanilla-picker-BUFYPi-_.js} +1 -1
  107. package/dist/collection/collection-manifest.json +16 -11
  108. package/dist/collection/components/salla-attachment-view/salla-attachment-view.css +164 -0
  109. package/dist/collection/components/salla-attachment-view/salla-attachment-view.js +250 -0
  110. package/dist/collection/components/salla-attachments/salla-attachments.css +69 -0
  111. package/dist/collection/components/salla-attachments/salla-attachments.js +375 -0
  112. package/dist/collection/components/salla-comments/salla-comment-item.js +13 -3
  113. package/dist/collection/components/salla-comments/salla-comments.css +7 -0
  114. package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +206 -56
  115. package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +322 -30
  116. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  117. package/dist/collection/components/salla-file-upload/salla-file-upload.css +149 -0
  118. package/dist/collection/components/salla-file-upload/salla-file-upload.js +784 -42
  119. package/dist/collection/components/salla-file-upload/upload-limits.js +127 -0
  120. package/dist/collection/components/salla-products-slider/salla-products-slider.js +1 -1
  121. package/dist/collection/components/salla-rating-modal/rating-modal-media.js +85 -0
  122. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +348 -85
  123. package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +17 -7
  124. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +1 -3
  125. package/dist/collection/components/salla-review-factors-tags/helpers.js +8 -7
  126. package/dist/collection/components/salla-review-order-item/interfaces.js +1 -0
  127. package/dist/collection/components/salla-review-order-item/salla-review-order-item.js +154 -0
  128. package/dist/components/index.js +2 -2
  129. package/dist/components/salla-add-product-button2.js +40 -28
  130. package/dist/components/salla-attachment-view.d.ts +11 -0
  131. package/dist/components/salla-attachment-view.js +9 -0
  132. package/dist/components/salla-attachment-view2.js +323 -0
  133. package/dist/components/salla-attachments.d.ts +11 -0
  134. package/dist/components/salla-attachments.js +9 -0
  135. package/dist/components/salla-attachments2.js +232 -0
  136. package/dist/components/salla-basket-gap.js +46 -34
  137. package/dist/components/salla-breadcrumb.js +1 -1
  138. package/dist/components/salla-comment-factors2.js +1 -1
  139. package/dist/components/salla-comment-item2.js +26 -4
  140. package/dist/components/salla-comments.js +14 -2
  141. package/dist/components/salla-cookies-bar.js +319 -27
  142. package/dist/components/salla-custom-fields.js +28 -4
  143. package/dist/components/salla-file-upload2.js +703 -31
  144. package/dist/components/salla-gifting.js +7 -1
  145. package/dist/components/salla-loyalty-exchange-product-card2.js +46 -34
  146. package/dist/components/salla-loyalty-panel.js +8 -2
  147. package/dist/components/salla-loyalty-program.js +8 -2
  148. package/dist/components/salla-multiple-bundle-product-cart2.js +40 -28
  149. package/dist/components/salla-multiple-bundle-product-details2.js +12 -6
  150. package/dist/components/salla-multiple-bundle-product-options-modal2.js +7 -1
  151. package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
  152. package/dist/components/salla-multiple-bundle-product.js +12 -6
  153. package/dist/components/salla-offer-modal.js +8 -2
  154. package/dist/components/salla-order-edit-item2.js +36 -24
  155. package/dist/components/salla-order-edit.js +42 -30
  156. package/dist/components/salla-order-options-modal2.js +34 -22
  157. package/dist/components/salla-product-card2.js +44 -32
  158. package/dist/components/salla-product-options2.js +32 -20
  159. package/dist/components/salla-products-slider2.js +8 -2
  160. package/dist/components/salla-quick-buy2.js +36 -24
  161. package/dist/components/salla-rating-modal-v22.js +449 -97
  162. package/dist/components/salla-rating-modal.js +30 -20
  163. package/dist/components/salla-review-factors-tags2.js +9 -8
  164. package/dist/components/salla-review-order-item.d.ts +11 -0
  165. package/dist/components/salla-review-order-item.js +196 -0
  166. package/dist/components/salla-reward-details2.js +8 -2
  167. package/dist/components/salla-slider2.js +1 -1
  168. package/dist/esm/{filepond-DMUE9Fyj.js → filepond-CKsbRWmS.js} +1 -1
  169. package/dist/esm/{filepond-plugin-file-poster-DBZQTm7s.js → filepond-plugin-file-poster-B_gYCESq.js} +1 -1
  170. package/dist/esm/{filepond-plugin-file-validate-size-CrKxdsNW.js → filepond-plugin-file-validate-size-Bep6fNi3.js} +1 -1
  171. package/dist/esm/{filepond-plugin-file-validate-type-DvEJrucY.js → filepond-plugin-file-validate-type-r3uRmGIr.js} +1 -1
  172. package/dist/esm/{filepond-plugin-image-edit-C6ptCg9o.js → filepond-plugin-image-edit-BJcOlOFL.js} +1 -1
  173. package/dist/esm/{filepond-plugin-image-exif-orientation-IcgeTieF.js → filepond-plugin-image-exif-orientation-DJoDaRwQ.js} +1 -1
  174. package/dist/esm/{filepond-plugin-image-preview-CDMh74os.js → filepond-plugin-image-preview-BsuTLPS0.js} +1 -1
  175. package/dist/esm/helpers-DqXpn47Z.js +85 -0
  176. package/dist/esm/{index-CjQzkU95.js → index-BVqCTDsV.js} +18 -14
  177. package/dist/esm/{intlTelInput-Dsx2z7pR.js → intlTelInput-CD2FA0nI.js} +1 -1
  178. package/dist/esm/loader.js +3 -3
  179. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  180. package/dist/esm/salla-accordion_6.entry.js +1 -1
  181. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  182. package/dist/esm/salla-advertisement.entry.js +1 -1
  183. package/dist/esm/salla-alert_2.entry.js +1 -1
  184. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  185. package/dist/esm/salla-apps-icons.entry.js +1 -1
  186. package/dist/esm/{salla-booking-field_7.entry.js → salla-attachment-view_9.entry.js} +1002 -41
  187. package/dist/esm/salla-badge.entry.js +1 -1
  188. package/dist/esm/salla-basket-gap.entry.js +1 -1
  189. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  190. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  191. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  192. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  193. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  194. package/dist/esm/salla-comment-factors.entry.js +2 -2
  195. package/dist/esm/salla-comment-form_8.entry.js +14 -5
  196. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  197. package/dist/esm/salla-contacts.entry.js +1 -1
  198. package/dist/esm/salla-cookies-bar.entry.js +303 -26
  199. package/dist/esm/salla-count-down.entry.js +1 -1
  200. package/dist/esm/salla-custom-fields.entry.js +1 -1
  201. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  202. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  203. package/dist/esm/salla-filters-widget.entry.js +1 -1
  204. package/dist/esm/salla-filters.entry.js +1 -1
  205. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  206. package/dist/esm/salla-gifting.entry.js +1 -1
  207. package/dist/esm/salla-hook.entry.js +1 -1
  208. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  209. package/dist/esm/salla-installment.entry.js +1 -1
  210. package/dist/esm/salla-list-tile.entry.js +1 -1
  211. package/dist/esm/salla-localization-modal.entry.js +1 -1
  212. package/dist/esm/salla-login-modal.entry.js +1 -1
  213. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  214. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  215. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  216. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  217. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  218. package/dist/esm/salla-loyalty.entry.js +1 -1
  219. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  220. package/dist/esm/salla-map_2.entry.js +1 -1
  221. package/dist/esm/salla-menu.entry.js +1 -1
  222. package/dist/esm/salla-metadata.entry.js +1 -1
  223. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  224. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  225. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  226. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  227. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  228. package/dist/esm/salla-offer-modal.entry.js +1 -1
  229. package/dist/esm/salla-offer.entry.js +1 -1
  230. package/dist/esm/salla-order-branch.entry.js +1 -1
  231. package/dist/esm/salla-order-cancel.entry.js +1 -1
  232. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  233. package/dist/esm/salla-order-details-options.entry.js +1 -1
  234. package/dist/esm/salla-order-details.entry.js +1 -1
  235. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  236. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  237. package/dist/esm/salla-order-edit.entry.js +1 -1
  238. package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
  239. package/dist/esm/salla-order-shipments.entry.js +1 -1
  240. package/dist/esm/salla-order-summary.entry.js +1 -1
  241. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  242. package/dist/esm/salla-orders.entry.js +1 -1
  243. package/dist/esm/salla-payments.entry.js +1 -1
  244. package/dist/esm/salla-placeholder.entry.js +1 -1
  245. package/dist/esm/salla-price-range.entry.js +1 -1
  246. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  247. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  248. package/dist/esm/salla-products-list.entry.js +1 -1
  249. package/dist/esm/salla-products-slider.entry.js +1 -1
  250. package/dist/esm/salla-quick-order.entry.js +1 -1
  251. package/dist/esm/salla-rating-modal-v2.entry.js +420 -84
  252. package/dist/esm/salla-rating-modal.entry.js +3 -5
  253. package/dist/esm/salla-review-factors-tags.entry.js +2 -81
  254. package/dist/esm/salla-review-order-item.entry.js +123 -0
  255. package/dist/esm/salla-scopes.entry.js +1 -1
  256. package/dist/esm/salla-search.entry.js +1 -1
  257. package/dist/esm/salla-skeleton.entry.js +1 -1
  258. package/dist/esm/salla-slider.entry.js +1 -1
  259. package/dist/esm/salla-social-share.entry.js +1 -1
  260. package/dist/esm/salla-social.entry.js +1 -1
  261. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  262. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  263. package/dist/esm/salla-tooltip.entry.js +1 -1
  264. package/dist/esm/salla-trust-badges.entry.js +1 -1
  265. package/dist/esm/salla-user-menu.entry.js +1 -1
  266. package/dist/esm/salla-user-profile.entry.js +1 -1
  267. package/dist/esm/salla-user-settings.entry.js +1 -1
  268. package/dist/esm/salla-verify.entry.js +1 -1
  269. package/dist/esm/salla-wallet.entry.js +1 -1
  270. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  271. package/dist/esm/twilight.js +3 -3
  272. package/dist/esm/upload-limits-DrXX8XG8.js +121 -0
  273. package/dist/esm/{vanilla-picker-oYjMgYry.js → vanilla-picker-Ba_za9Iy.js} +1 -1
  274. package/dist/twilight/{p-49e6fe86.entry.js → p-003499a8.entry.js} +1 -1
  275. package/dist/twilight/{p-58184ae2.entry.js → p-0974f6c6.entry.js} +1 -1
  276. package/dist/twilight/{p-3052178c.entry.js → p-0a9093f1.entry.js} +1 -1
  277. package/dist/twilight/{p-cb179aba.entry.js → p-0ce2c41f.entry.js} +1 -1
  278. package/dist/twilight/{p-bbe79568.entry.js → p-0ea8365b.entry.js} +1 -1
  279. package/dist/twilight/p-1174e53e.entry.js +4 -0
  280. package/dist/twilight/{p-fe7990b7.entry.js → p-11ef8b82.entry.js} +1 -1
  281. package/dist/twilight/{p-dd5800dd.entry.js → p-13244c52.entry.js} +1 -1
  282. package/dist/twilight/{p-187a502c.entry.js → p-14689252.entry.js} +1 -1
  283. package/dist/twilight/{p-48db7b95.entry.js → p-17940d8a.entry.js} +1 -1
  284. package/dist/twilight/{p-a802826b.entry.js → p-1974f6da.entry.js} +1 -1
  285. package/dist/twilight/{p-250d7ab2.entry.js → p-1a191989.entry.js} +1 -1
  286. package/dist/twilight/{p-1d2804ac.entry.js → p-1ec6e0fe.entry.js} +1 -1
  287. package/dist/twilight/{p-5bbf829e.entry.js → p-1fcebaad.entry.js} +1 -1
  288. package/dist/twilight/{p-51a860bc.entry.js → p-2b0cf190.entry.js} +1 -1
  289. package/dist/twilight/{p-68c8772a.entry.js → p-333ea76b.entry.js} +1 -1
  290. package/dist/twilight/{p-8ef3693b.entry.js → p-337cc9f6.entry.js} +1 -1
  291. package/dist/twilight/{p-f7298462.entry.js → p-34d5c7bf.entry.js} +1 -1
  292. package/dist/twilight/{p-b1812d5c.entry.js → p-36abc50f.entry.js} +1 -1
  293. package/dist/twilight/{p-a1494e64.entry.js → p-37d9f762.entry.js} +1 -1
  294. package/dist/twilight/{p-5e9fb02d.entry.js → p-3961522a.entry.js} +1 -1
  295. package/dist/twilight/{p-1754903f.entry.js → p-39d9e02f.entry.js} +1 -1
  296. package/dist/twilight/{p-152c657e.entry.js → p-3a4bb8de.entry.js} +1 -1
  297. package/dist/twilight/{p-7c74dc6e.entry.js → p-409f95a8.entry.js} +1 -1
  298. package/dist/twilight/{p-3bc64439.entry.js → p-42952fac.entry.js} +1 -1
  299. package/dist/twilight/{p-0a1271e1.entry.js → p-436dfe93.entry.js} +1 -1
  300. package/dist/twilight/{p-44cfb2c2.entry.js → p-50c90e0a.entry.js} +1 -1
  301. package/dist/twilight/{p-31c36417.entry.js → p-5115117b.entry.js} +1 -1
  302. package/dist/twilight/{p-1fb46b43.entry.js → p-56647774.entry.js} +1 -1
  303. package/dist/twilight/{p-e020f1c3.entry.js → p-598cadf4.entry.js} +1 -1
  304. package/dist/twilight/{p-331679d8.entry.js → p-635265d1.entry.js} +1 -1
  305. package/dist/twilight/{p-1470e96a.entry.js → p-659e2280.entry.js} +1 -1
  306. package/dist/twilight/p-6a3487de.entry.js +4 -0
  307. package/dist/twilight/{p-1c31cec0.entry.js → p-6d07d195.entry.js} +1 -1
  308. package/dist/twilight/{p-91b4a1a0.entry.js → p-6ee096e8.entry.js} +1 -1
  309. package/dist/twilight/{p-37413a02.entry.js → p-723aeda4.entry.js} +1 -1
  310. package/dist/twilight/{p-ae536a61.entry.js → p-743b79ae.entry.js} +1 -1
  311. package/dist/twilight/{p-b193c991.entry.js → p-75e692d1.entry.js} +1 -1
  312. package/dist/twilight/{p-9c7fcbb0.entry.js → p-79444897.entry.js} +1 -1
  313. package/dist/twilight/{p-6ed4c9bb.entry.js → p-7b23dec7.entry.js} +1 -1
  314. package/dist/twilight/p-7bb24ad6.entry.js +4 -0
  315. package/dist/twilight/{p-c254b6fa.entry.js → p-7d9288b0.entry.js} +1 -1
  316. package/dist/twilight/{p-82c12191.entry.js → p-85f95a58.entry.js} +1 -1
  317. package/dist/twilight/{p-67e88dc4.entry.js → p-86a1f616.entry.js} +1 -1
  318. package/dist/twilight/{p-80ff5572.entry.js → p-87115499.entry.js} +1 -1
  319. package/dist/twilight/{p-cc2b960c.entry.js → p-878c2be2.entry.js} +1 -1
  320. package/dist/twilight/{p-b69e98a8.entry.js → p-89e9a91f.entry.js} +1 -1
  321. package/dist/twilight/{p-2e112687.entry.js → p-90ee37c7.entry.js} +1 -1
  322. package/dist/twilight/{p-aeb76c46.entry.js → p-96584590.entry.js} +1 -1
  323. package/dist/twilight/{p-1dd1fef0.entry.js → p-96a57e9c.entry.js} +1 -1
  324. package/dist/twilight/{p-1c369bcf.entry.js → p-978e4164.entry.js} +1 -1
  325. package/dist/twilight/{p-4058b619.entry.js → p-97fc57c1.entry.js} +1 -1
  326. package/dist/twilight/p-98b1ff35.entry.js +4 -0
  327. package/dist/twilight/{p-5d01f25c.entry.js → p-9d18525b.entry.js} +1 -1
  328. package/dist/twilight/{p-CmQyEOxJ.js → p-B83s3cRn.js} +2 -2
  329. package/dist/twilight/{p-CjQzkU95.js → p-BVqCTDsV.js} +1 -1
  330. package/dist/twilight/{p-BtymczNp.js → p-CP29f7RQ.js} +1 -1
  331. package/dist/twilight/{p-C6w35AiQ.js → p-CS-t4QAX.js} +1 -1
  332. package/dist/twilight/{p-BiyhYWus.js → p-Cluq3aDa.js} +1 -1
  333. package/dist/twilight/{p-DfJdKB52.js → p-D-zqM6k8.js} +1 -1
  334. package/dist/twilight/{p-CGDRqU6i.js → p-DJmqmO68.js} +1 -1
  335. package/dist/twilight/{p-D2uiOzVz.js → p-DgwK96eP.js} +1 -1
  336. package/dist/twilight/p-DqXpn47Z.js +4 -0
  337. package/dist/twilight/p-DrXX8XG8.js +4 -0
  338. package/dist/twilight/{p-C1wu6qA1.js → p-DzW3U8TR.js} +1 -1
  339. package/dist/twilight/{p-B9VKgTTF.js → p-JKh0XFIn.js} +1 -1
  340. package/dist/twilight/{p-699bea26.entry.js → p-a347e701.entry.js} +1 -1
  341. package/dist/twilight/{p-9fa351ab.entry.js → p-a5d08af6.entry.js} +1 -1
  342. package/dist/twilight/{p-8230c543.entry.js → p-a774f6f0.entry.js} +7 -7
  343. package/dist/twilight/p-afaa0fbe.entry.js +4 -0
  344. package/dist/twilight/p-b389b1d3.entry.js +4 -0
  345. package/dist/twilight/{p-298ff716.entry.js → p-b6d5ae9b.entry.js} +1 -1
  346. package/dist/twilight/{p-b0e86201.entry.js → p-b862c670.entry.js} +1 -1
  347. package/dist/twilight/{p-2e43ddf0.entry.js → p-bab59319.entry.js} +1 -1
  348. package/dist/twilight/{p-437fe6f1.entry.js → p-bf4c2184.entry.js} +1 -1
  349. package/dist/twilight/{p-7f73ff43.entry.js → p-c19cf93c.entry.js} +1 -1
  350. package/dist/twilight/{p-3f26f1c5.entry.js → p-c34f8c08.entry.js} +1 -1
  351. package/dist/twilight/{p-116e7555.entry.js → p-c47ecca7.entry.js} +1 -1
  352. package/dist/twilight/{p-84f35767.entry.js → p-c48f5c6b.entry.js} +1 -1
  353. package/dist/twilight/{p-40217fcc.entry.js → p-c53c2f59.entry.js} +1 -1
  354. package/dist/twilight/{p-1151ebd7.entry.js → p-cd805a38.entry.js} +1 -1
  355. package/dist/twilight/{p-4868c03c.entry.js → p-cdd8ed7f.entry.js} +1 -1
  356. package/dist/twilight/{p-9b6db6a7.entry.js → p-ced4b7ac.entry.js} +1 -1
  357. package/dist/twilight/{p-a3f00389.entry.js → p-cf3365e2.entry.js} +1 -1
  358. package/dist/twilight/p-d78998b7.entry.js +4 -0
  359. package/dist/twilight/{p-665bca88.entry.js → p-daea3207.entry.js} +1 -1
  360. package/dist/twilight/{p-664f0936.entry.js → p-dff6d623.entry.js} +1 -1
  361. package/dist/twilight/p-e04221de.entry.js +4 -0
  362. package/dist/twilight/{p-db02986a.entry.js → p-e2934193.entry.js} +1 -1
  363. package/dist/twilight/{p-14c72ffd.entry.js → p-e3dab961.entry.js} +1 -1
  364. package/dist/twilight/{p-bf183f3a.entry.js → p-e41e5fc7.entry.js} +1 -1
  365. package/dist/twilight/{p-5b03dca8.entry.js → p-e4c9cef4.entry.js} +1 -1
  366. package/dist/twilight/{p-27a0a4cc.entry.js → p-eaf9d536.entry.js} +1 -1
  367. package/dist/twilight/{p-a669483e.entry.js → p-ee2b16d7.entry.js} +1 -1
  368. package/dist/twilight/{p-fa28a89f.entry.js → p-ee3ddc23.entry.js} +1 -1
  369. package/dist/twilight/{p-54d0db9a.entry.js → p-f0a14b18.entry.js} +1 -1
  370. package/dist/twilight/{p-8fa84b87.entry.js → p-f195a63d.entry.js} +1 -1
  371. package/dist/twilight/{p-997c4966.entry.js → p-f2c688d6.entry.js} +1 -1
  372. package/dist/twilight/{p-2c6c0844.entry.js → p-f4ac8cae.entry.js} +1 -1
  373. package/dist/twilight/{p-2babb4bd.entry.js → p-f58d14ed.entry.js} +1 -1
  374. package/dist/twilight/{p-3bdba697.entry.js → p-f82cee0c.entry.js} +1 -1
  375. package/dist/twilight/{p-8ae7bf96.entry.js → p-fa17989b.entry.js} +1 -1
  376. package/dist/twilight/{p-b3fe5e44.entry.js → p-fbc075fe.entry.js} +1 -1
  377. package/dist/twilight/{p-3b6b3c54.entry.js → p-fc5d5473.entry.js} +1 -1
  378. package/dist/twilight/twilight.esm.js +1 -1
  379. package/dist/types/components/salla-attachment-view/salla-attachment-view.d.ts +47 -0
  380. package/dist/types/components/salla-attachments/salla-attachments.d.ts +73 -0
  381. package/dist/types/components/salla-comments/interfaces.d.ts +1 -0
  382. package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
  383. package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +117 -12
  384. package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +127 -4
  385. package/dist/types/components/salla-file-upload/upload-limits.d.ts +49 -0
  386. package/dist/types/components/salla-rating-modal/rating-modal-media.d.ts +38 -0
  387. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +30 -7
  388. package/dist/types/components/salla-review-factors-tags/helpers.d.ts +1 -1
  389. package/dist/types/components/salla-review-factors-tags/interfaces.d.ts +7 -0
  390. package/dist/types/components/salla-review-order-item/interfaces.d.ts +30 -0
  391. package/dist/types/components/salla-review-order-item/salla-review-order-item.d.ts +30 -0
  392. package/dist/types/components.d.ts +286 -11
  393. package/package.json +6 -6
  394. package/dist/twilight/p-236f371d.entry.js +0 -4
  395. package/dist/twilight/p-3c22551b.entry.js +0 -4
  396. package/dist/twilight/p-8bce41c8.entry.js +0 -4
  397. package/dist/twilight/p-e701a3dc.entry.js +0 -4
  398. package/dist/twilight/p-f1eebeda.entry.js +0 -4
  399. package/dist/twilight/p-f4bdf19e.entry.js +0 -4
  400. package/dist/twilight/p-faaf4423.entry.js +0 -4
  401. package/dist/components/{keyboard_arrow_right.js → keyboard_arrow_left.js} +6 -6
@@ -1,12 +1,12 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,c as e,h as i,H as s,a as r}from"./p-CjQzkU95.js";import{L as o}from"./p-BO5AoBAP.js";import{S as a}from"./p-BscTeWDc.js";const n="BulletDeliveryAPI",l=t=>{const e=null==t?Number.NaN:Number(t);return!Number.isNaN(e)&&0!==e};async function h(t,e,i){try{return await t()}catch(t){return console.error(`${n}: ${i}`,t),e}}const d=new Map;function c(t){const e=d.get(t);return!e||Date.now()-e.timestamp>3e5?(d.delete(t),null):e.data}function u(t,e){d.set(t,{data:e,timestamp:Date.now()})}const p=t=>"SA"===String(t).toUpperCase(),b={async getCountries(t=!1,e){const i=e?.trim()?null:"countries_"+(t?1:0);if(i){const t=c(i);if(t)return t}const s=await h((async()=>{const i={for_branch:t?1:0};return t&&(i.for_allocation=1),e?.trim()&&(i.query=e.trim()),((await salla.api.request("shipping/countries",{params:i}))?.data??[]).map((t=>({id:t.id,code:t.code,name:t.name,has_regions:p(t.code)})))}),[],"Error getting countries");return i&&s.length>0&&u(i,s),s},async getRegions(t,e){if(!l(t))return console.warn(`${n}: getRegions called without valid country_id`),[];const i=e?.trim()?null:`regions_${t}`;if(i){const t=c(i);if(t)return t}const s=await h((async()=>{const i={};return e?.trim()&&(i.query=e.trim()),((await salla.api.request(`shipping/countries/${t}/regions`,{params:i}))?.data??[]).map((e=>({id:e.id,name:e.name,code:e.code,country_id:Number(t)})))}),[],"Error fetching regions");return i&&s.length>0&&u(i,s),s},async getCities(t,e,i){if(!l(t))return console.warn(`${n}: getCities called without valid country_id`),[];const s=i?.trim()?null:`cities_${t}_${e||"all"}`;if(s){const t=c(s);if(t)return t}const r=await h((async()=>{const s={for_branch:0,country_id:t};return e&&(s.region_id=e),i?.trim()&&(s.query=i.trim()),((await salla.api.request("shipping/cities",{params:s}))?.data??[]).map((e=>({id:e.id,name:e.name,country_id:t,...null!=e.region_id&&{region_id:e.region_id}})))}),[],"Error fetching cities");return s&&r.length>0&&u(s,r),r},getDistricts:async(t,e)=>l(t)?h((async()=>{const i={for_branch:0,city_id:t};e?.trim()&&(i.query=e.trim());const s=(await salla.api.request("shipping/districts",{params:i}))?.data;return(Array.isArray(s)?s:Array.isArray(s?.districts)?s.districts:[]).map((e=>({id:e.id,name:e.name,name_en:e.name_en,city_id:t})))}),[],"Error fetching districts"):(console.warn(`${n}: getDistricts called without valid city_id`),[]),getSavedAddresses:async()=>h((async()=>{const t=(await salla.api.request("address"))?.data;return Array.isArray(t)?t:[]}),[],"Error fetching user addresses"),async getBranches({query:t,lat:e,lng:i,country_id:s,per_page:r=20}={}){const o=t?.trim()?.length>=2||e||i||!s?null:`branches_${s}`;if(o){const t=c(o);if(t)return t}const a=await h((async()=>{const o={per_page:r};t?.trim().length>=2&&(o.query=t),e&&(o.lat=e),i&&(o.lng=i),s&&(o.country_id=s);const a=await salla.api.request("branches",{params:o});return Array.isArray(a?.data)?a.data:[]}),[],"Error fetching branches");return o&&a.length>0&&u(o,a),a},saveAddressLocation:async t=>h((async()=>{const e=await salla.api.request("address/location",{...t,for_allocation:!0},"post"),i=e?.data??e;return{success:!0,address:"object"==typeof i&&null!=i&&"id"in i?i:void 0}}),{success:!1},"Error saving address/location"),setDeliveryScope:async t=>h((async()=>(await salla.api.withoutNotifier((()=>salla.scope.change({id:t}))),salla.storage.set("scope",{...salla.storage.get("scope")||{},id:t}),!0)),!1,"Error setting delivery scope"),async allocateScope(t){const e=t=>t?.error?.message??t?.message??"Failed to allocate scope";try{const e=await salla.api.withoutNotifier((()=>salla.api.request("scopes/allocation",t,"post")));return{success:!0,data:e?.data??e}}catch(t){console.error(`${n}: Error allocating scope`,t);const i=t;return{success:!1,error:null!=i?.response?.data?e(i.response.data):i?.message??"Unknown error"}}},getAddressToken:async()=>h((async()=>{const t=await salla.api.request("address/autocomplete-token");return t?.data?.token??null}),null,"Error fetching address autocomplete token")};function m(){d.clear()}const g=t=>t*(Math.PI/180);function f(t,e,i,s){const r=g(i-t),o=g(s-e),a=Math.sin(r/2)**2+Math.cos(g(t))*Math.cos(g(i))*Math.sin(o/2)**2;return 12742*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const v=(t,e,i)=>{if("branch"===t.type){const e=t.branch_details?.city??t.branch_details?.name;return e?`${i} ${e}`.trim():""}if("address"===t.type&&t.address_details){const i=[t.address_details.district?.name,t.address_details.city?.name,t.address_details.country?.name].filter(Boolean).join("، ")||t.address_details.short_address||"";return i?`${e} ${i}`.trim():""}return""},y=t=>null!=t?Number(t):void 0,w=t=>y(t?.address_details?.country?.id),x=t=>t?.country_code??t?.address_details?.country?.code??"",k=t=>y(t?.address_details?.region?.id),S=t=>y(t?.address_details?.city?.id),C=t=>y(t?.address_details?.district?.id),_=t=>t?.branch_details?.id,A=t=>t?.branch_details?.latitude,z=t=>t?.branch_details?.longitude,$=t=>{if(!t||"address"!==t.type||t.address_id)return!1;const e=w(t),i=S(t),s=C(t),r=x(t),o=null!=s&&0!==Number(s),a=Boolean(t.address_details?.district?.name?.trim()),n=!p(r)||o||a;return!!(e&&i&&n)},M=(t,e,i)=>!t||!p(t)||null!=e&&0!==Number(e)&&null!=i&&("number"==typeof i?0!==i:String(i).trim().length>0),L={[GeolocationPositionError.PERMISSION_DENIED]:"Location permission denied",[GeolocationPositionError.POSITION_UNAVAILABLE]:"Location unavailable",[GeolocationPositionError.TIMEOUT]:"Location timeout"},E=globalThis,I=E.ShadowRoot&&(void 0===E.ShadyCSS||E.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,P=Symbol(),T=new WeakMap;let B=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==P)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(I&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=T.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&T.set(e,t))}return t}toString(){return this.cssText}};const N=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new B(i,t,P)},D=I?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new B("string"==typeof t?t:t+"",void 0,P))(e)})(t):t
4
+ import{r as t,c as e,h as i,H as s,a as r}from"./p-BVqCTDsV.js";import{L as o}from"./p-BO5AoBAP.js";import{S as a}from"./p-BscTeWDc.js";const n="BulletDeliveryAPI",l=t=>{const e=null==t?Number.NaN:Number(t);return!Number.isNaN(e)&&0!==e};async function h(t,e,i){try{return await t()}catch(t){return console.error(`${n}: ${i}`,t),e}}const d=new Map;function c(t){const e=d.get(t);return!e||Date.now()-e.timestamp>3e5?(d.delete(t),null):e.data}function u(t,e){d.set(t,{data:e,timestamp:Date.now()})}const p=t=>"SA"===String(t).toUpperCase(),b={async getCountries(t=!1,e){const i=e?.trim()?null:"countries_"+(t?1:0);if(i){const t=c(i);if(t)return t}const s=await h((async()=>{const i={for_branch:t?1:0};return t&&(i.for_allocation=1),e?.trim()&&(i.query=e.trim()),((await salla.api.request("shipping/countries",{params:i}))?.data??[]).map((t=>({id:t.id,code:t.code,name:t.name,has_regions:p(t.code)})))}),[],"Error getting countries");return i&&s.length>0&&u(i,s),s},async getRegions(t,e){if(!l(t))return console.warn(`${n}: getRegions called without valid country_id`),[];const i=e?.trim()?null:`regions_${t}`;if(i){const t=c(i);if(t)return t}const s=await h((async()=>{const i={};return e?.trim()&&(i.query=e.trim()),((await salla.api.request(`shipping/countries/${t}/regions`,{params:i}))?.data??[]).map((e=>({id:e.id,name:e.name,code:e.code,country_id:Number(t)})))}),[],"Error fetching regions");return i&&s.length>0&&u(i,s),s},async getCities(t,e,i){if(!l(t))return console.warn(`${n}: getCities called without valid country_id`),[];const s=i?.trim()?null:`cities_${t}_${e||"all"}`;if(s){const t=c(s);if(t)return t}const r=await h((async()=>{const s={for_branch:0,country_id:t};return e&&(s.region_id=e),i?.trim()&&(s.query=i.trim()),((await salla.api.request("shipping/cities",{params:s}))?.data??[]).map((e=>({id:e.id,name:e.name,country_id:t,...null!=e.region_id&&{region_id:e.region_id}})))}),[],"Error fetching cities");return s&&r.length>0&&u(s,r),r},getDistricts:async(t,e)=>l(t)?h((async()=>{const i={for_branch:0,city_id:t};e?.trim()&&(i.query=e.trim());const s=(await salla.api.request("shipping/districts",{params:i}))?.data;return(Array.isArray(s)?s:Array.isArray(s?.districts)?s.districts:[]).map((e=>({id:e.id,name:e.name,name_en:e.name_en,city_id:t})))}),[],"Error fetching districts"):(console.warn(`${n}: getDistricts called without valid city_id`),[]),getSavedAddresses:async()=>h((async()=>{const t=(await salla.api.request("address"))?.data;return Array.isArray(t)?t:[]}),[],"Error fetching user addresses"),async getBranches({query:t,lat:e,lng:i,country_id:s,per_page:r=20}={}){const o=t?.trim()?.length>=2||e||i||!s?null:`branches_${s}`;if(o){const t=c(o);if(t)return t}const a=await h((async()=>{const o={per_page:r};t?.trim().length>=2&&(o.query=t),e&&(o.lat=e),i&&(o.lng=i),s&&(o.country_id=s);const a=await salla.api.request("branches",{params:o});return Array.isArray(a?.data)?a.data:[]}),[],"Error fetching branches");return o&&a.length>0&&u(o,a),a},saveAddressLocation:async t=>h((async()=>{const e=await salla.api.request("address/location",{...t,for_allocation:!0},"post"),i=e?.data??e;return{success:!0,address:"object"==typeof i&&null!=i&&"id"in i?i:void 0}}),{success:!1},"Error saving address/location"),setDeliveryScope:async t=>h((async()=>(await salla.api.withoutNotifier((()=>salla.scope.change({id:t}))),salla.storage.set("scope",{...salla.storage.get("scope")||{},id:t}),!0)),!1,"Error setting delivery scope"),async allocateScope(t){const e=t=>t?.error?.message??t?.message??"Failed to allocate scope";try{const e=await salla.api.withoutNotifier((()=>salla.api.request("scopes/allocation",t,"post")));return{success:!0,data:e?.data??e}}catch(t){console.error(`${n}: Error allocating scope`,t);const i=t;return{success:!1,error:null!=i?.response?.data?e(i.response.data):i?.message??"Unknown error"}}},getAddressToken:async()=>h((async()=>{const t=await salla.api.request("address/autocomplete-token");return t?.data?.token??null}),null,"Error fetching address autocomplete token")};function m(){d.clear()}const g=t=>t*(Math.PI/180);function f(t,e,i,s){const r=g(i-t),o=g(s-e),a=Math.sin(r/2)**2+Math.cos(g(t))*Math.cos(g(i))*Math.sin(o/2)**2;return 12742*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const v=(t,e,i)=>{if("branch"===t.type){const e=t.branch_details?.city??t.branch_details?.name;return e?`${i} ${e}`.trim():""}if("address"===t.type&&t.address_details){const i=[t.address_details.district?.name,t.address_details.city?.name,t.address_details.country?.name].filter(Boolean).join("، ")||t.address_details.short_address||"";return i?`${e} ${i}`.trim():""}return""},y=t=>null!=t?Number(t):void 0,w=t=>y(t?.address_details?.country?.id),x=t=>t?.country_code??t?.address_details?.country?.code??"",k=t=>y(t?.address_details?.region?.id),S=t=>y(t?.address_details?.city?.id),C=t=>y(t?.address_details?.district?.id),_=t=>t?.branch_details?.id,A=t=>t?.branch_details?.latitude,z=t=>t?.branch_details?.longitude,$=t=>{if(!t||"address"!==t.type||t.address_id)return!1;const e=w(t),i=S(t),s=C(t),r=x(t),o=null!=s&&0!==Number(s),a=Boolean(t.address_details?.district?.name?.trim()),n=!p(r)||o||a;return!!(e&&i&&n)},M=(t,e,i)=>!t||!p(t)||null!=e&&0!==Number(e)&&null!=i&&("number"==typeof i?0!==i:String(i).trim().length>0),L={[GeolocationPositionError.PERMISSION_DENIED]:"Location permission denied",[GeolocationPositionError.POSITION_UNAVAILABLE]:"Location unavailable",[GeolocationPositionError.TIMEOUT]:"Location timeout"},E=globalThis,I=E.ShadowRoot&&(void 0===E.ShadyCSS||E.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,P=Symbol(),T=new WeakMap;let B=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==P)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(I&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=T.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&T.set(e,t))}return t}toString(){return this.cssText}};const D=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new B(i,t,P)},N=I?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new B("string"==typeof t?t:t+"",void 0,P))(e)})(t):t
5
5
  /**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */,{is:j,defineProperty:O,getOwnPropertyDescriptor:U,getOwnPropertyNames:F,getOwnPropertySymbols:R,getPrototypeOf:q}=Object,Z=globalThis,G=Z.trustedTypes,V=G?G.emptyScript:"",H=Z.reactiveElementPolyfillSupport,K={toAttribute(t,e){switch(e){case Boolean:t=t?V:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},W=(t,e)=>!j(t,e),Y={attribute:!0,type:String,converter:K,reflect:!1,useDefault:!1,hasChanged:W};Symbol.metadata??=Symbol("metadata"),Z.litPropertyMetadata??=new WeakMap;let J=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&O(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=U(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const o=s?.call(this);r?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Y}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=q(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...F(t),...R(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(D(t))}else void 0!==t&&e.push(D(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(I)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=E.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:K).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:K;this._$Em=s;const o=r.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i,s=!1,r){if(void 0!==t){const o=this.constructor;if(!1===s&&(r=this[t]),i??=o.getPropertyOptions(t),!((i.hasChanged??W)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==r||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};J.elementStyles=[],J.shadowRootOptions={mode:"open"},J.elementProperties=new Map,J.finalized=new Map,H?.({ReactiveElement:J}),(Z.reactiveElementVersions??=[]).push("2.1.2");
9
+ */,{is:j,defineProperty:O,getOwnPropertyDescriptor:U,getOwnPropertyNames:F,getOwnPropertySymbols:R,getPrototypeOf:q}=Object,Z=globalThis,G=Z.trustedTypes,V=G?G.emptyScript:"",H=Z.reactiveElementPolyfillSupport,K={toAttribute(t,e){switch(e){case Boolean:t=t?V:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},W=(t,e)=>!j(t,e),Y={attribute:!0,type:String,converter:K,reflect:!1,useDefault:!1,hasChanged:W};Symbol.metadata??=Symbol("metadata"),Z.litPropertyMetadata??=new WeakMap;let J=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&O(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=U(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const o=s?.call(this);r?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Y}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=q(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...F(t),...R(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(N(t))}else void 0!==t&&e.push(N(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(I)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=E.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:K).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:K;this._$Em=s;const o=r.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i,s=!1,r){if(void 0!==t){const o=this.constructor;if(!1===s&&(r=this[t]),i??=o.getPropertyOptions(t),!((i.hasChanged??W)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==r||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};J.elementStyles=[],J.shadowRootOptions={mode:"open"},J.elementProperties=new Map,J.finalized=new Map,H?.({ReactiveElement:J}),(Z.reactiveElementVersions??=[]).push("2.1.2");
10
10
  /**
11
11
  * @license
12
12
  * Copyright 2017 Google LLC
@@ -17,7 +17,7 @@ const Q=globalThis,X=Q.trustedTypes,tt=X?X.createPolicy("lit-html",{createHTML:t
17
17
  * @license
18
18
  * Copyright 2017 Google LLC
19
19
  * SPDX-License-Identifier: BSD-3-Clause
20
- */class Bt extends J{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let r=s._$litPart$;if(void 0===r){const t=i?.renderBefore??null;s._$litPart$=r=new zt(e.insertBefore(at(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}}Bt._$litElement$=!0,Bt.finalized=!0,Tt.litElementHydrateSupport?.({LitElement:Bt});const Nt=Tt.litElementPolyfillSupport;Nt?.({LitElement:Bt}),(Tt.litElementVersions??=[]).push("4.2.2");const Dt=globalThis,jt=Dt.ShadowRoot&&(void 0===Dt.ShadyCSS||Dt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ot=Symbol(),Ut=new WeakMap;let Ft=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==Ot)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(jt&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=Ut.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Ut.set(e,t))}return t}toString(){return this.cssText}};const Rt=jt?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new Ft("string"==typeof t?t:t+"",void 0,Ot))(e)})(t):t,{is:qt,defineProperty:Zt,getOwnPropertyDescriptor:Gt,getOwnPropertyNames:Vt,getOwnPropertySymbols:Ht,getPrototypeOf:Kt}=Object,Wt=globalThis,Yt=Wt.trustedTypes,Jt=Yt?Yt.emptyScript:"",Qt=Wt.reactiveElementPolyfillSupport,Xt={toAttribute(t,e){switch(e){case Boolean:t=t?Jt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},te=(t,e)=>!qt(t,e),ee={attribute:!0,type:String,converter:Xt,reflect:!1,useDefault:!1,hasChanged:te};Symbol.metadata??=Symbol("metadata"),Wt.litPropertyMetadata??=new WeakMap;let ie=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ee){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=this.getPropertyDescriptor(t,Symbol(),e);void 0!==i&&Zt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=Gt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const o=s?.call(this);r?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ee}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=Kt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...Vt(t),...Ht(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Rt(t))}else void 0!==t&&e.push(Rt(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(jt)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=Dt.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:Xt).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Xt;this._$Em=s;const o=r.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i,s=!1,r){if(void 0!==t){const o=this.constructor;if(!1===s&&(r=this[t]),i??=o.getPropertyOptions(t),!((i.hasChanged??te)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==r||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};ie.elementStyles=[],ie.shadowRootOptions={mode:"open"},ie.elementProperties=new Map,ie.finalized=new Map,Qt?.({ReactiveElement:ie}),(Wt.reactiveElementVersions??=[]).push("2.1.2");const se=globalThis,re=se.trustedTypes,oe=re?re.createPolicy("lit-html",{createHTML:t=>t}):void 0,ae="$lit$",ne=`lit$${Math.random().toFixed(9).slice(2)}$`,le="?"+ne,he=`<${le}>`,de=document,ce=()=>de.createComment(""),ue=t=>null===t||"object"!=typeof t&&"function"!=typeof t,pe=Array.isArray,be="[ \t\n\f\r]",me=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ge=/-->/g,fe=/>/g,ve=RegExp(`>|${be}(?:([^\\s"'>=/]+)(${be}*=${be}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ye=/'/g,we=/"/g,xe=/^(?:script|style|textarea|title)$/i,ke=(t,...e)=>({_$litType$:1,strings:t,values:e}),Se=Symbol.for("lit-noChange"),Ce=Symbol.for("lit-nothing"),_e=new WeakMap,Ae=de.createTreeWalker(de,129);function ze(t,e){if(!pe(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==oe?oe.createHTML(e):e}class $e{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const a=t.length-1,n=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":3===e?"<math>":"",a=me;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,d=0;for(;d<i.length&&(a.lastIndex=d,l=a.exec(i),null!==l);)d=a.lastIndex,a===me?"!--"===l[1]?a=ge:void 0!==l[1]?a=fe:void 0!==l[2]?(xe.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=ve):void 0!==l[3]&&(a=ve):a===ve?">"===l[0]?(a=r??me,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?ve:'"'===l[3]?we:ye):a===we||a===ye?a=ve:a===ge||a===fe?a=me:(a=ve,r=void 0);const c=a===ve&&t[e+1].startsWith("/>")?" ":"";o+=a===me?i+he:h>=0?(s.push(n),i.slice(0,h)+ae+i.slice(h)+ne+c):i+ne+(-2===h?e:c)}return[ze(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=$e.createElement(l,i),Ae.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=Ae.nextNode())&&n.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(ae)){const e=h[o++],i=s.getAttribute(t).split(ne),a=/([.?@])?(.*)/.exec(e);n.push({type:1,index:r,name:a[2],strings:i,ctor:"."===a[1]?Pe:"?"===a[1]?Te:"@"===a[1]?Be:Ie}),s.removeAttribute(t)}else t.startsWith(ne)&&(n.push({type:6,index:r}),s.removeAttribute(t));if(xe.test(s.tagName)){const t=s.textContent.split(ne),e=t.length-1;if(e>0){s.textContent=re?re.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],ce()),Ae.nextNode(),n.push({type:2,index:++r});s.append(t[e],ce())}}}else if(8===s.nodeType)if(s.data===le)n.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(ne,t+1));)n.push({type:7,index:r}),t+=ne.length-1}r++}}static createElement(t,e){const i=de.createElement("template");return i.innerHTML=t,i}}function Me(t,e,i=t,s){if(e===Se)return e;let r=void 0!==s?i._$Co?.[s]:i._$Cl;const o=ue(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),void 0===o?r=void 0:(r=new o(t),r._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=r:i._$Cl=r),void 0!==r&&(e=Me(t,r._$AS(t,e.values),r,s)),e}class Le{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??de).importNode(e,!0);Ae.currentNode=s;let r=Ae.nextNode(),o=0,a=0,n=i[0];for(;void 0!==n;){if(o===n.index){let e;2===n.type?e=new Ee(r,r.nextSibling,this,t):1===n.type?e=new n.ctor(r,n.name,n.strings,this,t):6===n.type&&(e=new Ne(r,this,t)),this._$AV.push(e),n=i[++a]}o!==n?.index&&(r=Ae.nextNode(),o++)}return Ae.currentNode=de,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}let Ee=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=Ce,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Me(this,t,e),ue(t)?t===Ce||null==t||""===t?(this._$AH!==Ce&&this._$AR(),this._$AH=Ce):t!==this._$AH&&t!==Se&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>pe(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Ce&&ue(this._$AH)?this._$AA.nextSibling.data=t:this.T(de.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=$e.createElement(ze(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new Le(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=_e.get(t.strings);return void 0===e&&_e.set(t.strings,e=new $e(t)),e}k(e){pe(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,r=0;for(const o of e)r===i.length?i.push(s=new t(this.O(ce()),this.O(ce()),this,this.options)):s=i[r],s._$AI(o),r++;r<i.length&&(this._$AR(s&&s._$AB.nextSibling,r),i.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},Ie=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=Ce,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Ce}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=Me(this,t,e,0),o=!ue(t)||t!==this._$AH&&t!==Se,o&&(this._$AH=t);else{const s=t;let a,n;for(t=r[0],a=0;a<r.length-1;a++)n=Me(this,s[i+a],e,a),n===Se&&(n=this._$AH[a]),o||=!ue(n)||n!==this._$AH[a],n===Ce?t=Ce:t!==Ce&&(t+=(n??"")+r[a+1]),this._$AH[a]=n}o&&!s&&this.j(t)}j(t){t===Ce?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class Pe extends Ie{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Ce?void 0:t}}class Te extends Ie{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Ce)}}class Be extends Ie{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){if((t=Me(this,t,e,0)??Ce)===Se)return;const i=this._$AH,s=t===Ce&&i!==Ce||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==Ce&&(i===Ce||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Ne{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Me(this,t)}}const De=se.litHtmlPolyfillSupport;De?.($e,Ee),(se.litHtmlVersions??=[]).push("3.3.2");const je=globalThis;let Oe=class extends ie{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let r=s._$litPart$;if(void 0===r){const t=i?.renderBefore??null;s._$litPart$=r=new Ee(e.insertBefore(ce(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Se}};Oe._$litElement$=!0,Oe.finalized=!0,je.litElementHydrateSupport?.({LitElement:Oe});const Ue=je.litElementPolyfillSupport;Ue?.({LitElement:Oe}),(je.litElementVersions??=[]).push("4.2.2");const Fe={attribute:!0,type:String,converter:Xt,reflect:!1,hasChanged:te},Re=(t=Fe,e,i)=>{const{kind:s,metadata:r}=i;let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),o.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,r,t,!0,i)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const r=this[s];e.call(this,i),this.requestUpdate(s,r,t,!0,i)}}throw Error("Unsupported decorator location: "+s)};function qe(t){return(e,i)=>"object"==typeof i?Re(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function Ze(t){return qe({...t,state:!0,attribute:!1})}const Ge=t=>(...e)=>({_$litDirective$:t,values:e});class Ve{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const He=Ge(class extends Ve{constructor(t){if(super(t),1!==t.type||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const s=!!e[t];s===this.st.has(t)||this.nt?.has(t)||(s?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return Se}}),Ke={},We=Ge(class extends Ve{constructor(t){if(super(t),3!==t.type&&1!==t.type&&4!==t.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===Se||e===Ce)return e;const i=t.element,s=t.name;if(3===t.type){if(e===i[s])return Se}else if(4===t.type){if(!!e===i.hasAttribute(s))return Se}else if(1===t.type&&i.getAttribute(s)===e+"")return Se;return((t,e=Ke)=>{t._$AH=e})(t),e}}),Ye=["AE","AR","AT","AU","BE","BG","BR","CA","CH","CL","CO","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HK","HR","HU","ID","IE","IL","IN","IT","JP","KR","LT","LU","LV","MX","MY","NL","NO","NZ","PE","PH","PL","PT","RO","SE","SG","SI","SK","TH","TR","TW","US","VN","ZA"];function Je(t,e){let i=null;return t.address_components?i=function(t){if(!t)return null;const e=t.find((t=>t.types?.includes("country")));return e?e.short_name:null}(t.address_components):e&&1===e.length&&(i=e[0].toUpperCase()),i?{isSupported:Ye.includes(i),countryCode:i}:{isSupported:null,countryCode:null}}const Qe={en:{placeholder:"Search for an address...",noResults:"No address found for this search. Try different keywords.",errorFetchPredictions:"Unable to search for addresses. Please try again.",errorFetchDetails:"Unable to load address details. Please try again.",errorNetwork:"Network error. Please check your connection and try again.",validationRequired:"This field is required",validationPattern:"Invalid format",validationSaudiFormat:"Please enter a valid Saudi national address (format: AAAA1234)"},ar:{placeholder:"ابحث عن عنوان...",noResults:"لم يتم العثور على عنوان لهذا البحث. جرب كلمات مختلفة.",errorFetchPredictions:"تعذر البحث عن العناوين. يرجى المحاولة مرة أخرى.",errorFetchDetails:"تعذر تحميل تفاصيل العنوان. يرجى المحاولة مرة أخرى.",errorNetwork:"خطأ في الشبكة. يرجى التحقق من اتصالك والمحاولة مرة أخرى.",validationRequired:"هذا الحقل مطلوب",validationPattern:"صيغة غير صحيحة",validationSaudiFormat:"الرجاء إدخال عنوان وطني صحيح (الصيغة: AAAA1234)"},es:{placeholder:"Buscar una dirección...",noResults:"No se encontró ninguna dirección para esta búsqueda. Intenta con diferentes palabras.",errorFetchPredictions:"No se pueden buscar direcciones. Por favor, inténtelo de nuevo.",errorFetchDetails:"No se pueden cargar los detalles de la dirección. Por favor, inténtelo de nuevo.",errorNetwork:"Error de red. Verifique su conexión e inténtelo de nuevo.",validationRequired:"Este campo es obligatorio",validationPattern:"Formato inválido",validationSaudiFormat:"Por favor ingrese una dirección nacional saudí válida (formato: AAAA1234)"},fr:{placeholder:"Rechercher une adresse...",noResults:"Aucune adresse trouvée pour cette recherche. Essayez différents mots-clés.",errorFetchPredictions:"Impossible de rechercher des adresses. Veuillez réessayer.",errorFetchDetails:"Impossible de charger les détails de l'adresse. Veuillez réessayer.",errorNetwork:"Erreur réseau. Vérifiez votre connexion et réessayez.",validationRequired:"Ce champ est obligatoire",validationPattern:"Format invalide",validationSaudiFormat:"Veuillez saisir une adresse nationale saoudienne valide (format: AAAA1234)"},de:{placeholder:"Nach einer Adresse suchen...",noResults:"Keine Adresse für diese Suche gefunden. Versuchen Sie es mit anderen Stichwörtern.",errorFetchPredictions:"Adressen können nicht gesucht werden. Bitte versuchen Sie es erneut.",errorFetchDetails:"Adressdetails können nicht geladen werden. Bitte versuchen Sie es erneut.",errorNetwork:"Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.",validationRequired:"Dieses Feld ist erforderlich",validationPattern:"Ungültiges Format",validationSaudiFormat:"Bitte geben Sie eine gültige saudi-arabische nationale Adresse ein (Format: AAAA1234)"},it:{placeholder:"Cerca un indirizzo...",noResults:"Nessun indirizzo trovato per questa ricerca. Prova con parole chiave diverse.",errorFetchPredictions:"Impossibile cercare indirizzi. Riprova.",errorFetchDetails:"Impossibile caricare i dettagli dell'indirizzo. Riprova.",errorNetwork:"Errore di rete. Controlla la connessione e riprova.",validationRequired:"Questo campo è obbligatorio",validationPattern:"Formato non valido",validationSaudiFormat:"Inserisci un indirizzo nazionale saudita valido (formato: AAAA1234)"},pt:{placeholder:"Pesquisar um endereço...",noResults:"Nenhum endereço encontrado para esta pesquisa. Tente palavras-chave diferentes.",errorFetchPredictions:"Não é possível pesquisar endereços. Por favor, tente novamente.",errorFetchDetails:"Não é possível carregar os detalhes do endereço. Por favor, tente novamente.",errorNetwork:"Erro de rede. Verifique sua conexão e tente novamente.",validationRequired:"Este campo é obrigatório",validationPattern:"Formato inválido",validationSaudiFormat:"Por favor, insira um endereço nacional saudita válido (formato: AAAA1234)"},ru:{placeholder:"Поиск адреса...",noResults:"Адрес для этого поиска не найден. Попробуйте другие ключевые слова.",errorFetchPredictions:"Невозможно выполнить поиск адресов. Пожалуйста, попробуйте еще раз.",errorFetchDetails:"Невозможно загрузить детали адреса. Пожалуйста, попробуйте еще раз.",errorNetwork:"Ошибка сети. Проверьте соединение и попробуйте еще раз.",validationRequired:"Это поле обязательно",validationPattern:"Неверный формат",validationSaudiFormat:"Пожалуйста, введите действительный национальный адрес Саудовской Аравии (формат: AAAA1234)"},ja:{placeholder:"住所を検索...",noResults:"この検索では住所が見つかりませんでした。別のキーワードをお試しください。",errorFetchPredictions:"住所を検索できません。もう一度お試しください。",errorFetchDetails:"住所の詳細を読み込めません。もう一度お試しください。",errorNetwork:"ネットワークエラー。接続を確認してもう一度お試しください。",validationRequired:"この項目は必須です",validationPattern:"無効な形式",validationSaudiFormat:"有効なサウジアラビアの国内住所を入力してください(形式:AAAA1234)"},zh:{placeholder:"搜索地址...",noResults:"未找到此搜索的地址。请尝试不同的关键词。",errorFetchPredictions:"无法搜索地址。请重试。",errorFetchDetails:"无法加载地址详情。请重试。",errorNetwork:"网络错误。请检查您的连接并重试。",validationRequired:"此字段为必填项",validationPattern:"格式无效",validationSaudiFormat:"请输入有效的沙特国家地址(格式:AAAA1234)"},ko:{placeholder:"주소 검색...",noResults:"이 검색에 대한 주소를 찾을 수 없습니다. 다른 키워드를 시도해보세요.",errorFetchPredictions:"주소를 검색할 수 없습니다. 다시 시도해주세요.",errorFetchDetails:"주소 세부정보를 불러올 수 없습니다. 다시 시도해주세요.",errorNetwork:"네트워크 오류입니다. 연결을 확인하고 다시 시도해주세요.",validationRequired:"이 필드는 필수입니다",validationPattern:"유효하지 않은 형식",validationSaudiFormat:"유효한 사우디 국가 주소를 입력하세요 (형식: AAAA1234)"},hi:{placeholder:"पता खोजें...",noResults:"इस खोज के लिए कोई पता नहीं मिला। विभिन्न कीवर्ड आज़माएं।",errorFetchPredictions:"पते खोजने में असमर्थ। कृपया पुनः प्रयास करें।",errorFetchDetails:"पते का विवरण लोड करने में असमर्थ। कृपया पुनः प्रयास करें।",errorNetwork:"नेटवर्क त्रुटि। कृपया अपना कनेक्शन जांचें और पुनः प्रयास करें।",validationRequired:"यह फ़ील्ड आवश्यक है",validationPattern:"अमान्य प्रारूप",validationSaudiFormat:"कृपया एक मान्य सऊदी राष्ट्रीय पता दर्ज करें (प्रारूप: AAAA1234)"},tr:{placeholder:"Adres ara...",noResults:"Bu arama için adres bulunamadı. Farklı anahtar kelimeler deneyin.",errorFetchPredictions:"Adresler aranamıyor. Lütfen tekrar deneyin.",errorFetchDetails:"Adres detayları yüklenemiyor. Lütfen tekrar deneyin.",errorNetwork:"Ağ hatası. Lütfen bağlantınızı kontrol edin ve tekrar deneyin.",validationRequired:"Bu alan zorunludur",validationPattern:"Geçersiz format",validationSaudiFormat:"Lütfen geçerli bir Suudi ulusal adresi girin (format: AAAA1234)"}};function Xe(t="en"){return Qe[t]||Qe.en}var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,ii=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ei(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&ti(e,i,o),o};let si=class extends Oe{constructor(){super(),this.proxyUrl="https://api.salla.dev",this.authToken=null,this.placeholder="",this.defaultPlace="",this.label=null,this.className="",this.language="en",this.dir="auto",this.mode="search",this.name="",this.required=!1,this.pattern=null,this.tooltip=null,this.selectedId=null,this.errors=[],this.disabled=!1,this._value="",this._country=null,this.locationBias=null,this.locationRestriction=null,this.types=null,this._fields=["formatted_address","geometry"],this.strictBounds=!1,this.useSessionToken=!0,this.resolve=!1,this.onValidateAddress=null,this.debounceDelay=300,this.minChars=3,this.predictions=[],this.isOpen=!1,this.isLoading=!1,this.error=null,this.activeIndex=-1,this.inputValue="",this.sessionToken=null,this.validationError=null,this.touched=!1,this.showNationalAddressIcon=!1,this.abortController=null,this._internals=this.attachInternals()}set value(t){const e=this._value;this._value=t||"",this.requestUpdate("value",e)}get value(){return this._value}set country(t){this._country=null==t?null:Array.isArray(t)?t.filter((t=>t&&t.trim())).map((t=>t.trim())):t.split(",").map((t=>t.trim())).filter((t=>t))}get country(){return this._country}set fieldsStr(t){this._fields=t?t.split(",").map((t=>t.trim())).filter((t=>t)):["formatted_address","geometry"]}get fieldsStr(){return this._fields.join(",")}set fields(t){this._fields=t&&t.length>0?t:["formatted_address","geometry"]}get fields(){return this._fields}connectedCallback(){super.connectedCallback(),this.createNewSession(),this.initializeDebounce()}disconnectedCallback(){super.disconnectedCallback(),this.terminateSession(),this.cancelPendingRequest()}initializeDebounce(){this.debouncedFetch=function(t,e){let i=null;return function(...s){i&&clearTimeout(i),i=setTimeout((()=>{t.apply(this,s)}),e)}}(this.fetchPredictions.bind(this),this.debounceDelay)}firstUpdated(){const t=this.value||this.defaultPlace||"";t&&(this.inputValue=t,this.isSaudiFormMode()&&this.isShortAddressFormat(t)&&(this.showNationalAddressIcon=!0))}$nextTick(t){Promise.resolve().then(t)}isShortAddressFormat(t){return/^[a-zA-Z]{4}\d{4}$/.test(t?.trim())}updated(t){if(t.has("value")){const t=this.value||"";t!==this.inputValue&&(this.inputValue=t,this.showNationalAddressIcon=!!(this.isSaudiFormMode()&&t&&this.isShortAddressFormat(t)))}t.has("defaultPlace")&&!this.value&&this.defaultPlace!==this.inputValue&&(this.inputValue=this.defaultPlace||"",this.showNationalAddressIcon=!!(this.isSaudiFormMode()&&this.defaultPlace&&this.isShortAddressFormat(this.defaultPlace))),t.has("selectedId")&&this.selectedId&&this.selectedId!==this.inputValue&&this.isSaudiFormMode()&&this.isShortAddressFormat(this.selectedId)&&(this.inputValue=this.selectedId||"",this.showNationalAddressIcon=!0,this._internals.setFormValue(this.selectedId||"")),t.has("debounceDelay")&&this.initializeDebounce()}createNewSession(){this.useSessionToken&&(this.sessionToken=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})))}terminateSession(){this.sessionToken=null}cancelPendingRequest(){this.abortController&&(this.abortController.abort(),this.abortController=null)}isSaudiFormMode(){return"form"===this.mode&&null!==this.country&&1===this.country.length&&"sa"===this.country[0].toLowerCase()}getWhatsAppLink(){return`https://wa.me/966112898888?text=${encodeURIComponent("العنوان الوطني")}`}renderWhatsAppIcon(){return ke`
20
+ */class Bt extends J{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let r=s._$litPart$;if(void 0===r){const t=i?.renderBefore??null;s._$litPart$=r=new zt(e.insertBefore(at(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}}Bt._$litElement$=!0,Bt.finalized=!0,Tt.litElementHydrateSupport?.({LitElement:Bt});const Dt=Tt.litElementPolyfillSupport;Dt?.({LitElement:Bt}),(Tt.litElementVersions??=[]).push("4.2.2");const Nt=globalThis,jt=Nt.ShadowRoot&&(void 0===Nt.ShadyCSS||Nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ot=Symbol(),Ut=new WeakMap;let Ft=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==Ot)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(jt&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=Ut.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Ut.set(e,t))}return t}toString(){return this.cssText}};const Rt=jt?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new Ft("string"==typeof t?t:t+"",void 0,Ot))(e)})(t):t,{is:qt,defineProperty:Zt,getOwnPropertyDescriptor:Gt,getOwnPropertyNames:Vt,getOwnPropertySymbols:Ht,getPrototypeOf:Kt}=Object,Wt=globalThis,Yt=Wt.trustedTypes,Jt=Yt?Yt.emptyScript:"",Qt=Wt.reactiveElementPolyfillSupport,Xt={toAttribute(t,e){switch(e){case Boolean:t=t?Jt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},te=(t,e)=>!qt(t,e),ee={attribute:!0,type:String,converter:Xt,reflect:!1,useDefault:!1,hasChanged:te};Symbol.metadata??=Symbol("metadata"),Wt.litPropertyMetadata??=new WeakMap;let ie=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ee){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=this.getPropertyDescriptor(t,Symbol(),e);void 0!==i&&Zt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=Gt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const o=s?.call(this);r?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ee}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=Kt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...Vt(t),...Ht(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Rt(t))}else void 0!==t&&e.push(Rt(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(jt)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=Nt.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:Xt).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Xt;this._$Em=s;const o=r.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i,s=!1,r){if(void 0!==t){const o=this.constructor;if(!1===s&&(r=this[t]),i??=o.getPropertyOptions(t),!((i.hasChanged??te)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==r||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};ie.elementStyles=[],ie.shadowRootOptions={mode:"open"},ie.elementProperties=new Map,ie.finalized=new Map,Qt?.({ReactiveElement:ie}),(Wt.reactiveElementVersions??=[]).push("2.1.2");const se=globalThis,re=se.trustedTypes,oe=re?re.createPolicy("lit-html",{createHTML:t=>t}):void 0,ae="$lit$",ne=`lit$${Math.random().toFixed(9).slice(2)}$`,le="?"+ne,he=`<${le}>`,de=document,ce=()=>de.createComment(""),ue=t=>null===t||"object"!=typeof t&&"function"!=typeof t,pe=Array.isArray,be="[ \t\n\f\r]",me=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ge=/-->/g,fe=/>/g,ve=RegExp(`>|${be}(?:([^\\s"'>=/]+)(${be}*=${be}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ye=/'/g,we=/"/g,xe=/^(?:script|style|textarea|title)$/i,ke=(t,...e)=>({_$litType$:1,strings:t,values:e}),Se=Symbol.for("lit-noChange"),Ce=Symbol.for("lit-nothing"),_e=new WeakMap,Ae=de.createTreeWalker(de,129);function ze(t,e){if(!pe(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==oe?oe.createHTML(e):e}class $e{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const a=t.length-1,n=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":3===e?"<math>":"",a=me;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,d=0;for(;d<i.length&&(a.lastIndex=d,l=a.exec(i),null!==l);)d=a.lastIndex,a===me?"!--"===l[1]?a=ge:void 0!==l[1]?a=fe:void 0!==l[2]?(xe.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=ve):void 0!==l[3]&&(a=ve):a===ve?">"===l[0]?(a=r??me,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?ve:'"'===l[3]?we:ye):a===we||a===ye?a=ve:a===ge||a===fe?a=me:(a=ve,r=void 0);const c=a===ve&&t[e+1].startsWith("/>")?" ":"";o+=a===me?i+he:h>=0?(s.push(n),i.slice(0,h)+ae+i.slice(h)+ne+c):i+ne+(-2===h?e:c)}return[ze(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=$e.createElement(l,i),Ae.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=Ae.nextNode())&&n.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(ae)){const e=h[o++],i=s.getAttribute(t).split(ne),a=/([.?@])?(.*)/.exec(e);n.push({type:1,index:r,name:a[2],strings:i,ctor:"."===a[1]?Pe:"?"===a[1]?Te:"@"===a[1]?Be:Ie}),s.removeAttribute(t)}else t.startsWith(ne)&&(n.push({type:6,index:r}),s.removeAttribute(t));if(xe.test(s.tagName)){const t=s.textContent.split(ne),e=t.length-1;if(e>0){s.textContent=re?re.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],ce()),Ae.nextNode(),n.push({type:2,index:++r});s.append(t[e],ce())}}}else if(8===s.nodeType)if(s.data===le)n.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(ne,t+1));)n.push({type:7,index:r}),t+=ne.length-1}r++}}static createElement(t,e){const i=de.createElement("template");return i.innerHTML=t,i}}function Me(t,e,i=t,s){if(e===Se)return e;let r=void 0!==s?i._$Co?.[s]:i._$Cl;const o=ue(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),void 0===o?r=void 0:(r=new o(t),r._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=r:i._$Cl=r),void 0!==r&&(e=Me(t,r._$AS(t,e.values),r,s)),e}class Le{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??de).importNode(e,!0);Ae.currentNode=s;let r=Ae.nextNode(),o=0,a=0,n=i[0];for(;void 0!==n;){if(o===n.index){let e;2===n.type?e=new Ee(r,r.nextSibling,this,t):1===n.type?e=new n.ctor(r,n.name,n.strings,this,t):6===n.type&&(e=new De(r,this,t)),this._$AV.push(e),n=i[++a]}o!==n?.index&&(r=Ae.nextNode(),o++)}return Ae.currentNode=de,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}let Ee=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=Ce,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Me(this,t,e),ue(t)?t===Ce||null==t||""===t?(this._$AH!==Ce&&this._$AR(),this._$AH=Ce):t!==this._$AH&&t!==Se&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>pe(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Ce&&ue(this._$AH)?this._$AA.nextSibling.data=t:this.T(de.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=$e.createElement(ze(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new Le(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=_e.get(t.strings);return void 0===e&&_e.set(t.strings,e=new $e(t)),e}k(e){pe(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,r=0;for(const o of e)r===i.length?i.push(s=new t(this.O(ce()),this.O(ce()),this,this.options)):s=i[r],s._$AI(o),r++;r<i.length&&(this._$AR(s&&s._$AB.nextSibling,r),i.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},Ie=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=Ce,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Ce}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=Me(this,t,e,0),o=!ue(t)||t!==this._$AH&&t!==Se,o&&(this._$AH=t);else{const s=t;let a,n;for(t=r[0],a=0;a<r.length-1;a++)n=Me(this,s[i+a],e,a),n===Se&&(n=this._$AH[a]),o||=!ue(n)||n!==this._$AH[a],n===Ce?t=Ce:t!==Ce&&(t+=(n??"")+r[a+1]),this._$AH[a]=n}o&&!s&&this.j(t)}j(t){t===Ce?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class Pe extends Ie{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Ce?void 0:t}}class Te extends Ie{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Ce)}}class Be extends Ie{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){if((t=Me(this,t,e,0)??Ce)===Se)return;const i=this._$AH,s=t===Ce&&i!==Ce||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==Ce&&(i===Ce||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class De{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Me(this,t)}}const Ne=se.litHtmlPolyfillSupport;Ne?.($e,Ee),(se.litHtmlVersions??=[]).push("3.3.2");const je=globalThis;let Oe=class extends ie{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let r=s._$litPart$;if(void 0===r){const t=i?.renderBefore??null;s._$litPart$=r=new Ee(e.insertBefore(ce(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Se}};Oe._$litElement$=!0,Oe.finalized=!0,je.litElementHydrateSupport?.({LitElement:Oe});const Ue=je.litElementPolyfillSupport;Ue?.({LitElement:Oe}),(je.litElementVersions??=[]).push("4.2.2");const Fe={attribute:!0,type:String,converter:Xt,reflect:!1,hasChanged:te},Re=(t=Fe,e,i)=>{const{kind:s,metadata:r}=i;let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),o.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,r,t,!0,i)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const r=this[s];e.call(this,i),this.requestUpdate(s,r,t,!0,i)}}throw Error("Unsupported decorator location: "+s)};function qe(t){return(e,i)=>"object"==typeof i?Re(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function Ze(t){return qe({...t,state:!0,attribute:!1})}const Ge=t=>(...e)=>({_$litDirective$:t,values:e});class Ve{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const He=Ge(class extends Ve{constructor(t){if(super(t),1!==t.type||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const s=!!e[t];s===this.st.has(t)||this.nt?.has(t)||(s?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return Se}}),Ke={},We=Ge(class extends Ve{constructor(t){if(super(t),3!==t.type&&1!==t.type&&4!==t.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===Se||e===Ce)return e;const i=t.element,s=t.name;if(3===t.type){if(e===i[s])return Se}else if(4===t.type){if(!!e===i.hasAttribute(s))return Se}else if(1===t.type&&i.getAttribute(s)===e+"")return Se;return((t,e=Ke)=>{t._$AH=e})(t),e}}),Ye=["AE","AR","AT","AU","BE","BG","BR","CA","CH","CL","CO","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HK","HR","HU","ID","IE","IL","IN","IT","JP","KR","LT","LU","LV","MX","MY","NL","NO","NZ","PE","PH","PL","PT","RO","SE","SG","SI","SK","TH","TR","TW","US","VN","ZA"];function Je(t,e){let i=null;return t.address_components?i=function(t){if(!t)return null;const e=t.find((t=>t.types?.includes("country")));return e?e.short_name:null}(t.address_components):e&&1===e.length&&(i=e[0].toUpperCase()),i?{isSupported:Ye.includes(i),countryCode:i}:{isSupported:null,countryCode:null}}const Qe={en:{placeholder:"Search for an address...",noResults:"No address found for this search. Try different keywords.",errorFetchPredictions:"Unable to search for addresses. Please try again.",errorFetchDetails:"Unable to load address details. Please try again.",errorNetwork:"Network error. Please check your connection and try again.",validationRequired:"This field is required",validationPattern:"Invalid format",validationSaudiFormat:"Please enter a valid Saudi national address (format: AAAA1234)"},ar:{placeholder:"ابحث عن عنوان...",noResults:"لم يتم العثور على عنوان لهذا البحث. جرب كلمات مختلفة.",errorFetchPredictions:"تعذر البحث عن العناوين. يرجى المحاولة مرة أخرى.",errorFetchDetails:"تعذر تحميل تفاصيل العنوان. يرجى المحاولة مرة أخرى.",errorNetwork:"خطأ في الشبكة. يرجى التحقق من اتصالك والمحاولة مرة أخرى.",validationRequired:"هذا الحقل مطلوب",validationPattern:"صيغة غير صحيحة",validationSaudiFormat:"الرجاء إدخال عنوان وطني صحيح (الصيغة: AAAA1234)"},es:{placeholder:"Buscar una dirección...",noResults:"No se encontró ninguna dirección para esta búsqueda. Intenta con diferentes palabras.",errorFetchPredictions:"No se pueden buscar direcciones. Por favor, inténtelo de nuevo.",errorFetchDetails:"No se pueden cargar los detalles de la dirección. Por favor, inténtelo de nuevo.",errorNetwork:"Error de red. Verifique su conexión e inténtelo de nuevo.",validationRequired:"Este campo es obligatorio",validationPattern:"Formato inválido",validationSaudiFormat:"Por favor ingrese una dirección nacional saudí válida (formato: AAAA1234)"},fr:{placeholder:"Rechercher une adresse...",noResults:"Aucune adresse trouvée pour cette recherche. Essayez différents mots-clés.",errorFetchPredictions:"Impossible de rechercher des adresses. Veuillez réessayer.",errorFetchDetails:"Impossible de charger les détails de l'adresse. Veuillez réessayer.",errorNetwork:"Erreur réseau. Vérifiez votre connexion et réessayez.",validationRequired:"Ce champ est obligatoire",validationPattern:"Format invalide",validationSaudiFormat:"Veuillez saisir une adresse nationale saoudienne valide (format: AAAA1234)"},de:{placeholder:"Nach einer Adresse suchen...",noResults:"Keine Adresse für diese Suche gefunden. Versuchen Sie es mit anderen Stichwörtern.",errorFetchPredictions:"Adressen können nicht gesucht werden. Bitte versuchen Sie es erneut.",errorFetchDetails:"Adressdetails können nicht geladen werden. Bitte versuchen Sie es erneut.",errorNetwork:"Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.",validationRequired:"Dieses Feld ist erforderlich",validationPattern:"Ungültiges Format",validationSaudiFormat:"Bitte geben Sie eine gültige saudi-arabische nationale Adresse ein (Format: AAAA1234)"},it:{placeholder:"Cerca un indirizzo...",noResults:"Nessun indirizzo trovato per questa ricerca. Prova con parole chiave diverse.",errorFetchPredictions:"Impossibile cercare indirizzi. Riprova.",errorFetchDetails:"Impossibile caricare i dettagli dell'indirizzo. Riprova.",errorNetwork:"Errore di rete. Controlla la connessione e riprova.",validationRequired:"Questo campo è obbligatorio",validationPattern:"Formato non valido",validationSaudiFormat:"Inserisci un indirizzo nazionale saudita valido (formato: AAAA1234)"},pt:{placeholder:"Pesquisar um endereço...",noResults:"Nenhum endereço encontrado para esta pesquisa. Tente palavras-chave diferentes.",errorFetchPredictions:"Não é possível pesquisar endereços. Por favor, tente novamente.",errorFetchDetails:"Não é possível carregar os detalhes do endereço. Por favor, tente novamente.",errorNetwork:"Erro de rede. Verifique sua conexão e tente novamente.",validationRequired:"Este campo é obrigatório",validationPattern:"Formato inválido",validationSaudiFormat:"Por favor, insira um endereço nacional saudita válido (formato: AAAA1234)"},ru:{placeholder:"Поиск адреса...",noResults:"Адрес для этого поиска не найден. Попробуйте другие ключевые слова.",errorFetchPredictions:"Невозможно выполнить поиск адресов. Пожалуйста, попробуйте еще раз.",errorFetchDetails:"Невозможно загрузить детали адреса. Пожалуйста, попробуйте еще раз.",errorNetwork:"Ошибка сети. Проверьте соединение и попробуйте еще раз.",validationRequired:"Это поле обязательно",validationPattern:"Неверный формат",validationSaudiFormat:"Пожалуйста, введите действительный национальный адрес Саудовской Аравии (формат: AAAA1234)"},ja:{placeholder:"住所を検索...",noResults:"この検索では住所が見つかりませんでした。別のキーワードをお試しください。",errorFetchPredictions:"住所を検索できません。もう一度お試しください。",errorFetchDetails:"住所の詳細を読み込めません。もう一度お試しください。",errorNetwork:"ネットワークエラー。接続を確認してもう一度お試しください。",validationRequired:"この項目は必須です",validationPattern:"無効な形式",validationSaudiFormat:"有効なサウジアラビアの国内住所を入力してください(形式:AAAA1234)"},zh:{placeholder:"搜索地址...",noResults:"未找到此搜索的地址。请尝试不同的关键词。",errorFetchPredictions:"无法搜索地址。请重试。",errorFetchDetails:"无法加载地址详情。请重试。",errorNetwork:"网络错误。请检查您的连接并重试。",validationRequired:"此字段为必填项",validationPattern:"格式无效",validationSaudiFormat:"请输入有效的沙特国家地址(格式:AAAA1234)"},ko:{placeholder:"주소 검색...",noResults:"이 검색에 대한 주소를 찾을 수 없습니다. 다른 키워드를 시도해보세요.",errorFetchPredictions:"주소를 검색할 수 없습니다. 다시 시도해주세요.",errorFetchDetails:"주소 세부정보를 불러올 수 없습니다. 다시 시도해주세요.",errorNetwork:"네트워크 오류입니다. 연결을 확인하고 다시 시도해주세요.",validationRequired:"이 필드는 필수입니다",validationPattern:"유효하지 않은 형식",validationSaudiFormat:"유효한 사우디 국가 주소를 입력하세요 (형식: AAAA1234)"},hi:{placeholder:"पता खोजें...",noResults:"इस खोज के लिए कोई पता नहीं मिला। विभिन्न कीवर्ड आज़माएं।",errorFetchPredictions:"पते खोजने में असमर्थ। कृपया पुनः प्रयास करें।",errorFetchDetails:"पते का विवरण लोड करने में असमर्थ। कृपया पुनः प्रयास करें।",errorNetwork:"नेटवर्क त्रुटि। कृपया अपना कनेक्शन जांचें और पुनः प्रयास करें।",validationRequired:"यह फ़ील्ड आवश्यक है",validationPattern:"अमान्य प्रारूप",validationSaudiFormat:"कृपया एक मान्य सऊदी राष्ट्रीय पता दर्ज करें (प्रारूप: AAAA1234)"},tr:{placeholder:"Adres ara...",noResults:"Bu arama için adres bulunamadı. Farklı anahtar kelimeler deneyin.",errorFetchPredictions:"Adresler aranamıyor. Lütfen tekrar deneyin.",errorFetchDetails:"Adres detayları yüklenemiyor. Lütfen tekrar deneyin.",errorNetwork:"Ağ hatası. Lütfen bağlantınızı kontrol edin ve tekrar deneyin.",validationRequired:"Bu alan zorunludur",validationPattern:"Geçersiz format",validationSaudiFormat:"Lütfen geçerli bir Suudi ulusal adresi girin (format: AAAA1234)"}};function Xe(t="en"){return Qe[t]||Qe.en}var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,ii=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ei(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&ti(e,i,o),o};let si=class extends Oe{constructor(){super(),this.proxyUrl="https://api.salla.dev",this.authToken=null,this.placeholder="",this.defaultPlace="",this.label=null,this.className="",this.language="en",this.dir="auto",this.mode="search",this.name="",this.required=!1,this.pattern=null,this.tooltip=null,this.selectedId=null,this.errors=[],this.disabled=!1,this._value="",this._country=null,this.locationBias=null,this.locationRestriction=null,this.types=null,this._fields=["formatted_address","geometry"],this.strictBounds=!1,this.useSessionToken=!0,this.resolve=!1,this.onValidateAddress=null,this.debounceDelay=300,this.minChars=3,this.predictions=[],this.isOpen=!1,this.isLoading=!1,this.error=null,this.activeIndex=-1,this.inputValue="",this.sessionToken=null,this.validationError=null,this.touched=!1,this.showNationalAddressIcon=!1,this.abortController=null,this._internals=this.attachInternals()}set value(t){const e=this._value;this._value=t||"",this.requestUpdate("value",e)}get value(){return this._value}set country(t){this._country=null==t?null:Array.isArray(t)?t.filter((t=>t&&t.trim())).map((t=>t.trim())):t.split(",").map((t=>t.trim())).filter((t=>t))}get country(){return this._country}set fieldsStr(t){this._fields=t?t.split(",").map((t=>t.trim())).filter((t=>t)):["formatted_address","geometry"]}get fieldsStr(){return this._fields.join(",")}set fields(t){this._fields=t&&t.length>0?t:["formatted_address","geometry"]}get fields(){return this._fields}connectedCallback(){super.connectedCallback(),this.createNewSession(),this.initializeDebounce()}disconnectedCallback(){super.disconnectedCallback(),this.terminateSession(),this.cancelPendingRequest()}initializeDebounce(){this.debouncedFetch=function(t,e){let i=null;return function(...s){i&&clearTimeout(i),i=setTimeout((()=>{t.apply(this,s)}),e)}}(this.fetchPredictions.bind(this),this.debounceDelay)}firstUpdated(){const t=this.value||this.defaultPlace||"";t&&(this.inputValue=t,this.isSaudiFormMode()&&this.isShortAddressFormat(t)&&(this.showNationalAddressIcon=!0))}$nextTick(t){Promise.resolve().then(t)}isShortAddressFormat(t){return/^[a-zA-Z]{4}\d{4}$/.test(t?.trim())}updated(t){if(t.has("value")){const t=this.value||"";t!==this.inputValue&&(this.inputValue=t,this.showNationalAddressIcon=!!(this.isSaudiFormMode()&&t&&this.isShortAddressFormat(t)))}t.has("defaultPlace")&&!this.value&&this.defaultPlace!==this.inputValue&&(this.inputValue=this.defaultPlace||"",this.showNationalAddressIcon=!!(this.isSaudiFormMode()&&this.defaultPlace&&this.isShortAddressFormat(this.defaultPlace))),t.has("selectedId")&&this.selectedId&&this.selectedId!==this.inputValue&&this.isSaudiFormMode()&&this.isShortAddressFormat(this.selectedId)&&(this.inputValue=this.selectedId||"",this.showNationalAddressIcon=!0,this._internals.setFormValue(this.selectedId||"")),t.has("debounceDelay")&&this.initializeDebounce()}createNewSession(){this.useSessionToken&&(this.sessionToken=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})))}terminateSession(){this.sessionToken=null}cancelPendingRequest(){this.abortController&&(this.abortController.abort(),this.abortController=null)}isSaudiFormMode(){return"form"===this.mode&&null!==this.country&&1===this.country.length&&"sa"===this.country[0].toLowerCase()}getWhatsAppLink(){return`https://wa.me/966112898888?text=${encodeURIComponent("العنوان الوطني")}`}renderWhatsAppIcon(){return ke`
21
21
  <svg class="whatsapp-icon" viewBox="0 0 24 24" fill="currentColor" part="whatsapp-icon">
22
22
  <path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
23
23
  </svg>
@@ -630,7 +630,7 @@ const Q=globalThis,X=Q.trustedTypes,tt=X?X.createPolicy("lit-html",{createHTML:t
630
630
  padding: 0.75rem;
631
631
  }
632
632
  }
633
- `,ii([qe({type:String})],si.prototype,"proxyUrl",2),ii([qe({type:String})],si.prototype,"authToken",2),ii([qe({type:String})],si.prototype,"placeholder",2),ii([qe({type:String})],si.prototype,"defaultPlace",2),ii([qe({type:String})],si.prototype,"label",2),ii([qe({type:String})],si.prototype,"className",2),ii([qe({type:String})],si.prototype,"language",2),ii([qe({type:String})],si.prototype,"dir",2),ii([qe({type:String})],si.prototype,"mode",2),ii([qe({type:String})],si.prototype,"name",2),ii([qe({type:Boolean})],si.prototype,"required",2),ii([qe({type:String})],si.prototype,"pattern",2),ii([qe({type:String})],si.prototype,"tooltip",2),ii([qe({type:String})],si.prototype,"selectedId",2),ii([qe({type:Array})],si.prototype,"errors",2),ii([qe({type:Boolean})],si.prototype,"disabled",2),ii([qe({type:String})],si.prototype,"value",1),ii([qe({type:String})],si.prototype,"country",1),ii([qe({type:Object})],si.prototype,"locationBias",2),ii([qe({type:Object})],si.prototype,"locationRestriction",2),ii([qe({type:Array})],si.prototype,"types",2),ii([qe({type:String})],si.prototype,"fieldsStr",1),ii([qe({type:Array})],si.prototype,"fields",1),ii([qe({type:Boolean})],si.prototype,"strictBounds",2),ii([qe({type:Boolean})],si.prototype,"useSessionToken",2),ii([qe({type:Boolean})],si.prototype,"resolve",2),ii([qe({type:Function})],si.prototype,"onValidateAddress",2),ii([qe({type:Number})],si.prototype,"debounceDelay",2),ii([qe({type:Number})],si.prototype,"minChars",2),ii([Ze()],si.prototype,"predictions",2),ii([Ze()],si.prototype,"isOpen",2),ii([Ze()],si.prototype,"isLoading",2),ii([Ze()],si.prototype,"error",2),ii([Ze()],si.prototype,"activeIndex",2),ii([Ze()],si.prototype,"inputValue",2),ii([Ze()],si.prototype,"sessionToken",2),ii([Ze()],si.prototype,"validationError",2),ii([Ze()],si.prototype,"touched",2),ii([Ze()],si.prototype,"showNationalAddressIcon",2),ii([(t,e)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(t,e,{get(){return(t=>t.renderRoot?.querySelector("input")??null)(this)}})],si.prototype,"inputElement",2),si=ii([(t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})("salla-address-autocomplete")],si);let ri=!1;const oi=new Map,ai=new Promise(((t,e)=>{typeof window>"u"?t():(window.googleMapsInitCallback=t,window.gm_authFailure=()=>{e(new Error("Google Maps authentication failed"))})})),ni=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},li=globalThis,hi=li.ShadowRoot&&(void 0===li.ShadyCSS||li.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,di=Symbol(),ci=new WeakMap;let ui=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==di)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(hi&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=ci.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ci.set(e,t))}return t}toString(){return this.cssText}};const pi=hi?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new ui("string"==typeof t?t:t+"",void 0,di))(e)})(t):t,{is:bi,defineProperty:mi,getOwnPropertyDescriptor:gi,getOwnPropertyNames:fi,getOwnPropertySymbols:vi,getPrototypeOf:yi}=Object,wi=globalThis,xi=wi.trustedTypes,ki=xi?xi.emptyScript:"",Si=wi.reactiveElementPolyfillSupport,Ci={toAttribute(t,e){switch(e){case Boolean:t=t?ki:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},_i=(t,e)=>!bi(t,e),Ai={attribute:!0,type:String,converter:Ci,reflect:!1,useDefault:!1,hasChanged:_i};Symbol.metadata??=Symbol("metadata"),wi.litPropertyMetadata??=new WeakMap;class zi extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ai){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=this.getPropertyDescriptor(t,Symbol(),e);void 0!==i&&mi(this.prototype,t,i)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=gi(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const o=s?.call(this);r?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ai}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=yi(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...fi(t),...vi(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(pi(t))}else void 0!==t&&e.push(pi(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(hi)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=li.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:Ci).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Ci;this._$Em=s;const o=r.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i,s=!1,r){if(void 0!==t){const o=this.constructor;if(!1===s&&(r=this[t]),i??=o.getPropertyOptions(t),!((i.hasChanged??_i)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==r||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}zi.elementStyles=[],zi.shadowRootOptions={mode:"open"},zi.elementProperties=new Map,zi.finalized=new Map,Si?.({ReactiveElement:zi}),(wi.reactiveElementVersions??=[]).push("2.1.2");const $i={attribute:!0,type:String,converter:Ci,reflect:!1,hasChanged:_i},Mi=(t=$i,e,i)=>{const{kind:s,metadata:r}=i;let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),o.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,r,t,!0,i)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const r=this[s];e.call(this,i),this.requestUpdate(s,r,t,!0,i)}}throw Error("Unsupported decorator location: "+s)};function Li(t){return(e,i)=>"object"==typeof i?Mi(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function Ei(t){return Li({...t,state:!0,attribute:!1})}function Ii(t){return(e,i)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}function Pi(t,e,i){const s=[];return e.forEach((e=>{if(!(t&&google&&google.maps&&google.maps.event))return;const r=google.maps.event.addListener(t,e,(t=>{i(e,t)}));s.push((()=>{r&&google.maps.event.removeListener(r)}))})),s}function Ti(t){t.forEach((t=>t())),t.length=0}function Bi(t,e,i){if(!t)return;const s=`set${e.charAt(0).toUpperCase()}${e.slice(1)}`;"function"==typeof t[s]?t[s](i):e in t&&(t[e]=i)}const Ni={en:{buttonLabel:"Use my current location",errorTitle:"Unable to Access Location",closeButton:"Continue",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Location access was denied. Please enable location services in your browser settings.",positionUnavailable:"Your location is currently unavailable. Please check your device settings.",timeout:"Location request timed out. Please try again.",generalError:"Unable to get your location. Please try entering your address manually.",clickToSelectLocation:"You can also choose your location by clicking on the map"},ar:{buttonLabel:"استخدم موقعي الحالي",errorTitle:"تعذر الوصول إلى الموقع",closeButton:"متابعة",loading:"جار الحصول على موقعك...",loadingInstructions:"يرجى السماح بالوصول إلى الموقع في المتصفح للمتابعة",timerMessage:"ستختفي هذه الرسالة تلقائياً بعد 7 ثوانٍ أو انقر متابعة",permissionDenied:"تم رفض الوصول إلى الموقع. يرجى تفعيل خدمات الموقع في إعدادات المتصفح.",positionUnavailable:"موقعك غير متاح حالياً. يرجى التحقق من إعدادات جهازك.",timeout:"انتهت مهلة طلب الموقع. يرجى المحاولة مرة أخرى.",generalError:"تعذر الحصول على موقعك. يرجى إدخال عنوانك يدوياً.",clickToSelectLocation:"يمكنك أيضاً اختيار موقعك بالنقر على الخريطة"},es:{buttonLabel:"Usar mi ubicación actual",errorTitle:"Error de ubicación",closeButton:"Cerrar",loading:"Obteniendo tu ubicación...",loadingInstructions:"Permite el acceso a la ubicación en tu navegador para continuar",timerMessage:"Este mensaje se ocultará automáticamente en 7 segundos o haz clic en Cerrar",permissionDenied:"Se denegó el acceso a la ubicación. Habilita los servicios de ubicación en la configuración de tu navegador.",positionUnavailable:"Tu ubicación no está disponible actualmente. Verifica la configuración de tu dispositivo.",timeout:"La solicitud de ubicación expiró. Inténtalo de nuevo.",generalError:"No se pudo obtener tu ubicación. Intenta ingresar tu dirección manualmente.",clickToSelectLocation:"Haz clic en el mapa para seleccionar una ubicación"},fr:{buttonLabel:"Utiliser ma position actuelle",errorTitle:"Erreur de localisation",closeButton:"Continuer",loading:"Obtention de votre position...",loadingInstructions:"Veuillez autoriser l'accès à la localisation dans votre navigateur pour continuer",timerMessage:"Ce message se masquera automatiquement dans 7 secondes ou cliquez sur Continuer",permissionDenied:"L'accès à la localisation a été refusé. Veuillez activer les services de localisation dans les paramètres de votre navigateur.",positionUnavailable:"Votre position n'est pas disponible actuellement. Veuillez vérifier les paramètres de votre appareil.",timeout:"La demande de localisation a expiré. Veuillez réessayer.",generalError:"Impossible d'obtenir votre position. Veuillez entrer votre adresse manuellement.",clickToSelectLocation:"Vous pouvez également choisir votre position en cliquant sur la carte"},de:{buttonLabel:"Meinen aktuellen Standort verwenden",errorTitle:"Standortfehler",closeButton:"Schließen",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Der Zugriff auf den Standort wurde verweigert. Bitte aktivieren Sie die Standortdienste in Ihren Browsereinstellungen.",positionUnavailable:"Ihr Standort ist derzeit nicht verfügbar. Bitte überprüfen Sie Ihre Geräteeinstellungen.",timeout:"Standortanfrage ist abgelaufen. Bitte versuchen Sie es erneut.",generalError:"Ihr Standort konnte nicht abgerufen werden. Bitte geben Sie Ihre Adresse manuell ein.",clickToSelectLocation:"Klicken Sie auf die Karte, um einen Standort auszuwählen"},zh:{buttonLabel:"使用我的当前位置",errorTitle:"位置错误",closeButton:"关闭",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"位置访问被拒绝。请在浏览器设置中启用位置服务。",positionUnavailable:"您的位置当前不可用。请检查您的设备设置。",timeout:"位置请求超时。请重试。",generalError:"无法获取您的位置。请尝试手动输入地址。",clickToSelectLocation:"点击地图选择位置"},ja:{buttonLabel:"現在地を使用",errorTitle:"位置情報エラー",closeButton:"閉じる",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"位置情報へのアクセスが拒否されました。ブラウザの設定で位置情報サービスを有効にしてください。",positionUnavailable:"現在位置が利用できません。デバイスの設定を確認してください。",timeout:"位置情報リクエストがタイムアウトしました。もう一度お試しください。",generalError:"位置情報を取得できませんでした。住所を手動で入力してください。",clickToSelectLocation:"地図をクリックして場所を選択"},pt:{buttonLabel:"Usar minha localização atual",errorTitle:"Erro de localização",closeButton:"Fechar",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"O acesso à localização foi negado. Ative os serviços de localização nas configurações do navegador.",positionUnavailable:"Sua localização não está disponível no momento. Verifique as configurações do dispositivo.",timeout:"A solicitação de localização expirou. Tente novamente.",generalError:"Não foi possível obter sua localização. Tente inserir seu endereço manualmente.",clickToSelectLocation:"Clique no mapa para selecionar um local"},ru:{buttonLabel:"Использовать мое текущее местоположение",errorTitle:"Ошибка местоположения",closeButton:"Закрыть",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Доступ к местоположению был запрещен. Включите службы определения местоположения в настройках браузера.",positionUnavailable:"Ваше местоположение в настоящее время недоступно. Проверьте настройки устройства.",timeout:"Время ожидания запроса местоположения истекло. Попробуйте еще раз.",generalError:"Не удалось получить ваше местоположение. Попробуйте ввести адрес вручную.",clickToSelectLocation:"Нажмите на карту, чтобы выбрать местоположение"},it:{buttonLabel:"Usa la mia posizione attuale",errorTitle:"Errore di posizione",closeButton:"Chiudi",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"L'accesso alla posizione è stato negato. Abilita i servizi di localizzazione nelle impostazioni del browser.",positionUnavailable:"La tua posizione non è attualmente disponibile. Controlla le impostazioni del dispositivo.",timeout:"La richiesta di posizione è scaduta. Riprova.",generalError:"Impossibile ottenere la tua posizione. Prova a inserire manualmente il tuo indirizzo.",clickToSelectLocation:"Fai clic sulla mappa per selezionare una posizione"},nl:{buttonLabel:"Gebruik mijn huidige locatie",errorTitle:"Locatiefout",closeButton:"Sluiten",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Toegang tot locatie is geweigerd. Schakel locatieservices in in uw browserinstellingen.",positionUnavailable:"Uw locatie is momenteel niet beschikbaar. Controleer uw apparaatinstellingen.",timeout:"Locatieverzoek is verlopen. Probeer het opnieuw.",generalError:"Kan uw locatie niet ophalen. Probeer uw adres handmatig in te voeren.",clickToSelectLocation:"Klik op de kaart om een locatie te selecteren"},tr:{buttonLabel:"Mevcut konumumu kullan",errorTitle:"Konum Hatası",closeButton:"Kapat",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Konum erişimi reddedildi. Lütfen tarayıcı ayarlarınızda konum hizmetlerini etkinleştirin.",positionUnavailable:"Konumunuz şu anda kullanılamıyor. Lütfen cihaz ayarlarınızı kontrol edin.",timeout:"Konum isteği zaman aşımına uğradı. Lütfen tekrar deneyin.",generalError:"Konumunuz alınamadı. Lütfen adresinizi manuel olarak girmeyi deneyin.",clickToSelectLocation:"Bir konum seçmek için haritaya tıklayın"},ko:{buttonLabel:"현재 위치 사용",errorTitle:"위치 오류",closeButton:"닫기",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"위치 액세스가 거부되었습니다. 브라우저 설정에서 위치 서비스를 활성화하십시오.",positionUnavailable:"현재 위치를 사용할 수 없습니다. 기기 설정을 확인하십시오.",timeout:"위치 요청 시간이 초과되었습니다. 다시 시도하십시오.",generalError:"위치를 가져올 수 없습니다. 수동으로 주소를 입력해 보십시오.",clickToSelectLocation:"지도를 클릭하여 위치를 선택하십시오"},hi:{buttonLabel:"मेरा वर्तमान स्थान उपयोग करें",errorTitle:"स्थान त्रुटि",closeButton:"बंद करें",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"स्थान पहुंच अस्वीकार कर दी गई थी। कृपया अपनी ब्राउज़र सेटिंग में स्थान सेवाएं सक्षम करें।",positionUnavailable:"आपका स्थान वर्तमान में उपलब्ध नहीं है। कृपया अपनी डिवाइस सेटिंग्स जांचें।",timeout:"स्थान अनुरोध समय समाप्त हो गया। कृपया पुनः प्रयास करें।",generalError:"आपका स्थान प्राप्त करने में असमर्थ। कृपया अपना पता मैन्युअल रूप से दर्ज करने का प्रयास करें।",clickToSelectLocation:"स्थान चुनने के लिए मानचित्र पर क्लिक करें"}},Di=new Set(["ar","he","fa","ur"]);function ji(t="en"){return Ni[t]||Ni.en}function Oi(t){return Di.has(t)}var Ui=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,Ri=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?Fi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&Ui(e,i,o),o};let qi=class extends Bt{constructor(){super(...arguments),this.zoom=15,this.mapTypeId="roadmap",this.heading=0,this.tilt=0,this.gestureHandling="cooperative",this.minZoom=2,this.maxZoom=19,this.disableDefaultUI=!1,this.mapTypeControl=!1,this.streetViewControl=!1,this.rotateControl=!1,this.fullscreenControl=!1,this.enableGeolocation=!1,this.showLocationMarker=!0,this.geolocationOptions={maximumAge:6e4,timeout:1e4,enableHighAccuracy:!0},this.locationMarkerBackground="#4285F4",this.locationMarkerBorderColor="#1967D2",this.locationMarkerGlyphColor="#FFFFFF",this.locationMarkerScale=1.3,this.locationCircleOptions={},this.language="en",this.options={},this.enableAutocomplete=!1,this.autocompleteProxyUrl="https://api.salla.dev",this.autocompleteStrictBounds=!1,this.autocompleteResolve=!1,this.autocompleteDebounceDelay=300,this.autocompleteMinChars=3,this.geolocationLoading=!1,this.geolocationError=null,this.showLoadingOverlay=!1,this.buttonState="normal",this.eventListeners=[],this.autocompleteListenerAttached=!1}async connectedCallback(){super.connectedCallback(),Oi(this.language)&&(document.dir="rtl")}async firstUpdated(){await ai,this.createMap()}clearAutocompleteInput(){if(!this.autocompleteElement)return;const t=this.autocompleteElement.shadowRoot?.querySelector("input");t&&(t.value="",this.autocompleteElement.inputValue="",this.autocompleteElement.value="")}setupAutocompleteListener(){!this.enableAutocomplete||!this.autocompleteElement||this.autocompleteListenerAttached||(this.autocompleteElement.addEventListener("place-select",(t=>{const{place:e}=t.detail;if(e?.geometry?.location){const{lat:t,lng:i}=e.geometry.location;this.setLocation(t,i,50,!0),this.dispatchMapEvent("location_changed",{position:{lat:t,lng:i},accuracy:50,source:"autocomplete",place:{placeId:e.place_id,formattedAddress:e.formatted_address,addressComponents:e.address_components,name:e.name,types:e.types}}),this.dispatchMapEvent("autocomplete_place_selected",{place:e})}})),this.autocompleteListenerAttached=!0)}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.enableAutocomplete&&!this.autocompleteListenerAttached&&setTimeout((()=>this.setupAutocompleteListener()),0),this.map&&(t.has("center")&&this.center&&Bi(this.map,"center",this.center),t.has("zoom")&&void 0!==this.zoom&&Bi(this.map,"zoom",this.zoom),t.has("minZoom")&&void 0!==this.minZoom&&this.map&&this.map.setOptions({minZoom:this.minZoom}),t.has("maxZoom")&&void 0!==this.maxZoom&&this.map&&this.map.setOptions({maxZoom:this.maxZoom}),t.has("mapTypeId")&&this.mapTypeId&&Bi(this.map,"mapTypeId",this.mapTypeId),t.has("heading")&&void 0!==this.heading&&Bi(this.map,"heading",this.heading),t.has("tilt")&&void 0!==this.tilt&&Bi(this.map,"tilt",this.tilt),t.has("locationMarkerPosition")&&this.locationMarkerPosition&&this.showLocationMarker&&this.setLocation(this.locationMarkerPosition.lat,this.locationMarkerPosition.lng,this.locationMarkerPosition.accuracy))}createMap(){if(!this.mapElement)return;const t={center:this.center,zoom:this.zoom,mapId:this.mapId,mapTypeId:this.mapTypeId,heading:this.heading,tilt:this.tilt,gestureHandling:this.gestureHandling,minZoom:this.minZoom,maxZoom:this.maxZoom,disableDefaultUI:this.disableDefaultUI,zoomControl:this.zoomControl,mapTypeControl:this.mapTypeControl,scaleControl:this.scaleControl,streetViewControl:this.streetViewControl,rotateControl:this.rotateControl,fullscreenControl:this.fullscreenControl,disableDoubleClickZoom:!0,keyboardShortcuts:!1,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM},...this.options};this.map=new google.maps.Map(this.mapElement,t);const e=google.maps.event.addListener(this.map,"click",(t=>{if(t.latLng&&this.showLocationMarker){const e=t.latLng.lat(),i=t.latLng.lng();this.setLocation(e,i,50,!1),this.clearAutocompleteInput(),this.dispatchMapEvent("location_changed",{position:{lat:e,lng:i},accuracy:50,source:"map-click"})}}));this.eventListeners=Pi(this.map,["click","dblclick","drag","dragend","dragstart","idle","mousemove","mouseout","mouseover","resize","rightclick","tilesloaded"],((t,e)=>{this.dispatchMapEvent(t,e)})),this.eventListeners.push((()=>{e&&google.maps.event.removeListener(e)})),["center","zoom","bounds","mapTypeId"].forEach((t=>{const e=`${t}_changed`,i=google.maps.event.addListener(this.map,e,(()=>{const i=`get${t.charAt(0).toUpperCase()}${t.slice(1)}`;if("function"==typeof this.map[i]){const t=this.map[i]();this.dispatchMapEvent(e,t)}}));this.eventListeners.push((()=>{i&&google.maps.event.removeListener(i)}))})),this.dispatchEvent(new CustomEvent("gmap-ready",{detail:{map:this.map},bubbles:!0,composed:!0})),this.locationMarkerPosition&&this.showLocationMarker&&this.setLocation(this.locationMarkerPosition.lat,this.locationMarkerPosition.lng,this.locationMarkerPosition.accuracy)}dispatchMapEvent(t,e){let i=t;(t.includes("_changed")||t.startsWith("geolocation_")||t.startsWith("location_"))&&(i=`gmap-${t.replace(/_/g,"-")}`),this.dispatchEvent(new CustomEvent(i,{detail:e,bubbles:!0,composed:!0}))}cleanup(){Ti(this.eventListeners),this.locationMarker&&(this.locationMarker.map=null,this.locationMarker=void 0),this.locationCircle&&(this.locationCircle.setMap(null),this.locationCircle=void 0),this.map=void 0}panBy(t,e){this.map?.panBy(t,e)}panTo(t){this.map?.panTo(t)}panToBounds(t){this.map?.panToBounds(t)}fitBounds(t){this.map?.fitBounds(t)}resize(){this.map&&google.maps.event.trigger(this.map,"resize")}resizePreserveCenter(){if(!this.map)return;const t=this.map.getCenter();google.maps.event.trigger(this.map,"resize"),t&&this.map.setCenter(t)}setLocation(t,e,i=50,s=!0){if(!this.map)return void console.warn("GMapMap: Cannot set location before map is initialized");const r={lat:t,lng:e};s&&this.map.panTo(r),this.showLocationMarker&&this.addLocationMarker(r,i),this.dispatchMapEvent("location_changed",{position:r,accuracy:i,source:"programmatic"})}async getCurrentLocation(t=!1){if(!navigator.geolocation)throw this.dispatchMapEvent("geolocation_error",{code:"NOT_SUPPORTED",message:"Geolocation is not supported by this browser"}),t||this.showGeolocationError(this.getTranslation("generalError")),new Error("NOT_SUPPORTED");this.geolocationLoading=!0,this.buttonState="loading",this.dispatchMapEvent("geolocation_loading",{message:"Getting your location..."});const e=t?null:setTimeout((()=>{this.geolocationLoading&&(this.showLoadingOverlay=!0)}),150);return new Promise(((i,s)=>{navigator.geolocation.getCurrentPosition((t=>{const s={lat:t.coords.latitude,lng:t.coords.longitude};if(e&&clearTimeout(e),this.geolocationLoading=!1,this.showLoadingOverlay=!1,this.buttonState="success",setTimeout((()=>{this.buttonState="normal"}),2e3),this.map){this.map.panTo(s);const e=t.coords.accuracy;let i=15;i=e>1e3?12:e>500?13:e>100?14:16,this.map.setZoom(i),this.showLocationMarker&&this.addLocationMarker(s,e),this.clearAutocompleteInput()}this.dispatchMapEvent("geolocation_success",{position:s,accuracy:t.coords.accuracy,altitude:t.coords.altitude,altitudeAccuracy:t.coords.altitudeAccuracy,heading:t.coords.heading,speed:t.coords.speed,timestamp:t.timestamp}),this.dispatchMapEvent("location_changed",{position:s,accuracy:t.coords.accuracy,source:"geolocation"}),i(s)}),(i=>{e&&clearTimeout(e),this.geolocationLoading=!1,this.showLoadingOverlay=!1,this.buttonState="error",setTimeout((()=>{this.buttonState="normal"}),2e3);let r="GENERAL_ERROR",o=this.getTranslation("generalError");i.code===i.PERMISSION_DENIED?(r="PERMISSION_DENIED",o=this.getTranslation("permissionDenied")):i.code===i.POSITION_UNAVAILABLE?(r="POSITION_UNAVAILABLE",o=this.getTranslation("positionUnavailable")):i.code===i.TIMEOUT&&(r="TIMEOUT",o=this.getTranslation("timeout")),this.dispatchMapEvent("geolocation_error",{code:r,message:o,error:i}),t||this.showGeolocationError(o),s(i)}),this.geolocationOptions)}))}handleGeolocationClick(){this.geolocationError=null,this.getCurrentLocation()}async addLocationMarker(t,e){if(this.map){if(this.locationMarker&&(this.locationMarker.map=null,this.locationMarker=void 0),this.locationCircle&&(this.locationCircle.setMap(null),this.locationCircle=void 0),!this.mapId)return void console.warn("GMapMap: mapId is required for location marker. Please set the mapId property on <gmap-map>. Get a Map ID from: https://console.cloud.google.com/google/maps-apis/studio/maps");try{const{AdvancedMarkerElement:e,PinElement:i}=await google.maps.importLibrary("marker"),s=new i({background:this.locationMarkerBackground,borderColor:this.locationMarkerBorderColor,glyphColor:this.locationMarkerGlyphColor,scale:this.locationMarkerScale});this.locationMarker=new e({map:this.map,position:t,title:"Your Location (Drag to adjust)",content:s.element,gmpDraggable:!0}),this.locationMarker.addListener("dragend",(()=>{if(this.locationMarker&&this.locationCircle){const t=this.locationMarker.position,e=t.toJSON?t.toJSON():{lat:t.lat(),lng:t.lng()};this.locationCircle.setCenter(e);const i=this.locationCircle.getRadius();this.clearAutocompleteInput(),this.dispatchMapEvent("location_marker_dragend",{position:e,accuracy:i}),this.dispatchMapEvent("location_changed",{position:e,accuracy:i,source:"marker-drag"})}}))}catch(t){console.error("Error creating AdvancedMarkerElement:",t)}this.locationCircle=new google.maps.Circle({map:this.map,center:t,radius:e,fillColor:"#4285F4",fillOpacity:.15,strokeColor:"#4285F4",strokeOpacity:.4,strokeWeight:1,clickable:!1,...this.locationCircleOptions})}}showGeolocationError(t){this.geolocationError=t,setTimeout((()=>{this.geolocationError=null}),7e3)}getTranslation(t){const e={loading:this.geolocationLoadingTitle,loadingInstructions:this.geolocationLoadingInstructions,errorTitle:this.geolocationErrorTitle,closeButton:this.geolocationErrorButtonText,timerMessage:this.geolocationErrorTimerMessage,clickToSelectLocation:this.geolocationClickToSelectMessage,generalError:this.geolocationGeneralErrorMessage,permissionDenied:this.geolocationPermissionDeniedMessage,positionUnavailable:this.geolocationPositionUnavailableMessage,timeout:this.geolocationTimeoutMessage}[t];if(null!=e&&""!==e)return e;const i=ji(this.language);return i[t]||i.generalError}get buttonLabel(){return void 0!==this.geolocationButtonLabel?this.geolocationButtonLabel:ji(this.language).buttonLabel||""}getButtonIconColor(){switch(this.buttonState){case"loading":return"#999";case"success":return"#4285F4";case"error":return"#EA4335";default:return"#666"}}getMap(){return this.map}render(){const t=Oi(this.language)?"rtl":"ltr";return ft`
633
+ `,ii([qe({type:String})],si.prototype,"proxyUrl",2),ii([qe({type:String})],si.prototype,"authToken",2),ii([qe({type:String})],si.prototype,"placeholder",2),ii([qe({type:String})],si.prototype,"defaultPlace",2),ii([qe({type:String})],si.prototype,"label",2),ii([qe({type:String})],si.prototype,"className",2),ii([qe({type:String})],si.prototype,"language",2),ii([qe({type:String})],si.prototype,"dir",2),ii([qe({type:String})],si.prototype,"mode",2),ii([qe({type:String})],si.prototype,"name",2),ii([qe({type:Boolean})],si.prototype,"required",2),ii([qe({type:String})],si.prototype,"pattern",2),ii([qe({type:String})],si.prototype,"tooltip",2),ii([qe({type:String})],si.prototype,"selectedId",2),ii([qe({type:Array})],si.prototype,"errors",2),ii([qe({type:Boolean})],si.prototype,"disabled",2),ii([qe({type:String})],si.prototype,"value",1),ii([qe({type:String})],si.prototype,"country",1),ii([qe({type:Object})],si.prototype,"locationBias",2),ii([qe({type:Object})],si.prototype,"locationRestriction",2),ii([qe({type:Array})],si.prototype,"types",2),ii([qe({type:String})],si.prototype,"fieldsStr",1),ii([qe({type:Array})],si.prototype,"fields",1),ii([qe({type:Boolean})],si.prototype,"strictBounds",2),ii([qe({type:Boolean})],si.prototype,"useSessionToken",2),ii([qe({type:Boolean})],si.prototype,"resolve",2),ii([qe({type:Function})],si.prototype,"onValidateAddress",2),ii([qe({type:Number})],si.prototype,"debounceDelay",2),ii([qe({type:Number})],si.prototype,"minChars",2),ii([Ze()],si.prototype,"predictions",2),ii([Ze()],si.prototype,"isOpen",2),ii([Ze()],si.prototype,"isLoading",2),ii([Ze()],si.prototype,"error",2),ii([Ze()],si.prototype,"activeIndex",2),ii([Ze()],si.prototype,"inputValue",2),ii([Ze()],si.prototype,"sessionToken",2),ii([Ze()],si.prototype,"validationError",2),ii([Ze()],si.prototype,"touched",2),ii([Ze()],si.prototype,"showNationalAddressIcon",2),ii([(t,e)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(t,e,{get(){return(t=>t.renderRoot?.querySelector("input")??null)(this)}})],si.prototype,"inputElement",2),si=ii([(t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})("salla-address-autocomplete")],si);let ri=!1;const oi=new Map,ai=new Promise(((t,e)=>{typeof window>"u"?t():(window.googleMapsInitCallback=t,window.gm_authFailure=()=>{e(new Error("Google Maps authentication failed"))})})),ni=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},li=globalThis,hi=li.ShadowRoot&&(void 0===li.ShadyCSS||li.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,di=Symbol(),ci=new WeakMap;let ui=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==di)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(hi&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=ci.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ci.set(e,t))}return t}toString(){return this.cssText}};const pi=hi?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new ui("string"==typeof t?t:t+"",void 0,di))(e)})(t):t,{is:bi,defineProperty:mi,getOwnPropertyDescriptor:gi,getOwnPropertyNames:fi,getOwnPropertySymbols:vi,getPrototypeOf:yi}=Object,wi=globalThis,xi=wi.trustedTypes,ki=xi?xi.emptyScript:"",Si=wi.reactiveElementPolyfillSupport,Ci={toAttribute(t,e){switch(e){case Boolean:t=t?ki:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},_i=(t,e)=>!bi(t,e),Ai={attribute:!0,type:String,converter:Ci,reflect:!1,useDefault:!1,hasChanged:_i};Symbol.metadata??=Symbol("metadata"),wi.litPropertyMetadata??=new WeakMap;class zi extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ai){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=this.getPropertyDescriptor(t,Symbol(),e);void 0!==i&&mi(this.prototype,t,i)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=gi(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const o=s?.call(this);r?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ai}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=yi(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...fi(t),...vi(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(pi(t))}else void 0!==t&&e.push(pi(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(hi)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=li.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:Ci).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Ci;this._$Em=s;const o=r.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i,s=!1,r){if(void 0!==t){const o=this.constructor;if(!1===s&&(r=this[t]),i??=o.getPropertyOptions(t),!((i.hasChanged??_i)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==r||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}zi.elementStyles=[],zi.shadowRootOptions={mode:"open"},zi.elementProperties=new Map,zi.finalized=new Map,Si?.({ReactiveElement:zi}),(wi.reactiveElementVersions??=[]).push("2.1.2");const $i={attribute:!0,type:String,converter:Ci,reflect:!1,hasChanged:_i},Mi=(t=$i,e,i)=>{const{kind:s,metadata:r}=i;let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),o.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,r,t,!0,i)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const r=this[s];e.call(this,i),this.requestUpdate(s,r,t,!0,i)}}throw Error("Unsupported decorator location: "+s)};function Li(t){return(e,i)=>"object"==typeof i?Mi(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function Ei(t){return Li({...t,state:!0,attribute:!1})}function Ii(t){return(e,i)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}function Pi(t,e,i){const s=[];return e.forEach((e=>{if(!(t&&google&&google.maps&&google.maps.event))return;const r=google.maps.event.addListener(t,e,(t=>{i(e,t)}));s.push((()=>{r&&google.maps.event.removeListener(r)}))})),s}function Ti(t){t.forEach((t=>t())),t.length=0}function Bi(t,e,i){if(!t)return;const s=`set${e.charAt(0).toUpperCase()}${e.slice(1)}`;"function"==typeof t[s]?t[s](i):e in t&&(t[e]=i)}const Di={en:{buttonLabel:"Use my current location",errorTitle:"Unable to Access Location",closeButton:"Continue",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Location access was denied. Please enable location services in your browser settings.",positionUnavailable:"Your location is currently unavailable. Please check your device settings.",timeout:"Location request timed out. Please try again.",generalError:"Unable to get your location. Please try entering your address manually.",clickToSelectLocation:"You can also choose your location by clicking on the map"},ar:{buttonLabel:"استخدم موقعي الحالي",errorTitle:"تعذر الوصول إلى الموقع",closeButton:"متابعة",loading:"جار الحصول على موقعك...",loadingInstructions:"يرجى السماح بالوصول إلى الموقع في المتصفح للمتابعة",timerMessage:"ستختفي هذه الرسالة تلقائياً بعد 7 ثوانٍ أو انقر متابعة",permissionDenied:"تم رفض الوصول إلى الموقع. يرجى تفعيل خدمات الموقع في إعدادات المتصفح.",positionUnavailable:"موقعك غير متاح حالياً. يرجى التحقق من إعدادات جهازك.",timeout:"انتهت مهلة طلب الموقع. يرجى المحاولة مرة أخرى.",generalError:"تعذر الحصول على موقعك. يرجى إدخال عنوانك يدوياً.",clickToSelectLocation:"يمكنك أيضاً اختيار موقعك بالنقر على الخريطة"},es:{buttonLabel:"Usar mi ubicación actual",errorTitle:"Error de ubicación",closeButton:"Cerrar",loading:"Obteniendo tu ubicación...",loadingInstructions:"Permite el acceso a la ubicación en tu navegador para continuar",timerMessage:"Este mensaje se ocultará automáticamente en 7 segundos o haz clic en Cerrar",permissionDenied:"Se denegó el acceso a la ubicación. Habilita los servicios de ubicación en la configuración de tu navegador.",positionUnavailable:"Tu ubicación no está disponible actualmente. Verifica la configuración de tu dispositivo.",timeout:"La solicitud de ubicación expiró. Inténtalo de nuevo.",generalError:"No se pudo obtener tu ubicación. Intenta ingresar tu dirección manualmente.",clickToSelectLocation:"Haz clic en el mapa para seleccionar una ubicación"},fr:{buttonLabel:"Utiliser ma position actuelle",errorTitle:"Erreur de localisation",closeButton:"Continuer",loading:"Obtention de votre position...",loadingInstructions:"Veuillez autoriser l'accès à la localisation dans votre navigateur pour continuer",timerMessage:"Ce message se masquera automatiquement dans 7 secondes ou cliquez sur Continuer",permissionDenied:"L'accès à la localisation a été refusé. Veuillez activer les services de localisation dans les paramètres de votre navigateur.",positionUnavailable:"Votre position n'est pas disponible actuellement. Veuillez vérifier les paramètres de votre appareil.",timeout:"La demande de localisation a expiré. Veuillez réessayer.",generalError:"Impossible d'obtenir votre position. Veuillez entrer votre adresse manuellement.",clickToSelectLocation:"Vous pouvez également choisir votre position en cliquant sur la carte"},de:{buttonLabel:"Meinen aktuellen Standort verwenden",errorTitle:"Standortfehler",closeButton:"Schließen",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Der Zugriff auf den Standort wurde verweigert. Bitte aktivieren Sie die Standortdienste in Ihren Browsereinstellungen.",positionUnavailable:"Ihr Standort ist derzeit nicht verfügbar. Bitte überprüfen Sie Ihre Geräteeinstellungen.",timeout:"Standortanfrage ist abgelaufen. Bitte versuchen Sie es erneut.",generalError:"Ihr Standort konnte nicht abgerufen werden. Bitte geben Sie Ihre Adresse manuell ein.",clickToSelectLocation:"Klicken Sie auf die Karte, um einen Standort auszuwählen"},zh:{buttonLabel:"使用我的当前位置",errorTitle:"位置错误",closeButton:"关闭",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"位置访问被拒绝。请在浏览器设置中启用位置服务。",positionUnavailable:"您的位置当前不可用。请检查您的设备设置。",timeout:"位置请求超时。请重试。",generalError:"无法获取您的位置。请尝试手动输入地址。",clickToSelectLocation:"点击地图选择位置"},ja:{buttonLabel:"現在地を使用",errorTitle:"位置情報エラー",closeButton:"閉じる",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"位置情報へのアクセスが拒否されました。ブラウザの設定で位置情報サービスを有効にしてください。",positionUnavailable:"現在位置が利用できません。デバイスの設定を確認してください。",timeout:"位置情報リクエストがタイムアウトしました。もう一度お試しください。",generalError:"位置情報を取得できませんでした。住所を手動で入力してください。",clickToSelectLocation:"地図をクリックして場所を選択"},pt:{buttonLabel:"Usar minha localização atual",errorTitle:"Erro de localização",closeButton:"Fechar",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"O acesso à localização foi negado. Ative os serviços de localização nas configurações do navegador.",positionUnavailable:"Sua localização não está disponível no momento. Verifique as configurações do dispositivo.",timeout:"A solicitação de localização expirou. Tente novamente.",generalError:"Não foi possível obter sua localização. Tente inserir seu endereço manualmente.",clickToSelectLocation:"Clique no mapa para selecionar um local"},ru:{buttonLabel:"Использовать мое текущее местоположение",errorTitle:"Ошибка местоположения",closeButton:"Закрыть",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Доступ к местоположению был запрещен. Включите службы определения местоположения в настройках браузера.",positionUnavailable:"Ваше местоположение в настоящее время недоступно. Проверьте настройки устройства.",timeout:"Время ожидания запроса местоположения истекло. Попробуйте еще раз.",generalError:"Не удалось получить ваше местоположение. Попробуйте ввести адрес вручную.",clickToSelectLocation:"Нажмите на карту, чтобы выбрать местоположение"},it:{buttonLabel:"Usa la mia posizione attuale",errorTitle:"Errore di posizione",closeButton:"Chiudi",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"L'accesso alla posizione è stato negato. Abilita i servizi di localizzazione nelle impostazioni del browser.",positionUnavailable:"La tua posizione non è attualmente disponibile. Controlla le impostazioni del dispositivo.",timeout:"La richiesta di posizione è scaduta. Riprova.",generalError:"Impossibile ottenere la tua posizione. Prova a inserire manualmente il tuo indirizzo.",clickToSelectLocation:"Fai clic sulla mappa per selezionare una posizione"},nl:{buttonLabel:"Gebruik mijn huidige locatie",errorTitle:"Locatiefout",closeButton:"Sluiten",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Toegang tot locatie is geweigerd. Schakel locatieservices in in uw browserinstellingen.",positionUnavailable:"Uw locatie is momenteel niet beschikbaar. Controleer uw apparaatinstellingen.",timeout:"Locatieverzoek is verlopen. Probeer het opnieuw.",generalError:"Kan uw locatie niet ophalen. Probeer uw adres handmatig in te voeren.",clickToSelectLocation:"Klik op de kaart om een locatie te selecteren"},tr:{buttonLabel:"Mevcut konumumu kullan",errorTitle:"Konum Hatası",closeButton:"Kapat",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Konum erişimi reddedildi. Lütfen tarayıcı ayarlarınızda konum hizmetlerini etkinleştirin.",positionUnavailable:"Konumunuz şu anda kullanılamıyor. Lütfen cihaz ayarlarınızı kontrol edin.",timeout:"Konum isteği zaman aşımına uğradı. Lütfen tekrar deneyin.",generalError:"Konumunuz alınamadı. Lütfen adresinizi manuel olarak girmeyi deneyin.",clickToSelectLocation:"Bir konum seçmek için haritaya tıklayın"},ko:{buttonLabel:"현재 위치 사용",errorTitle:"위치 오류",closeButton:"닫기",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"위치 액세스가 거부되었습니다. 브라우저 설정에서 위치 서비스를 활성화하십시오.",positionUnavailable:"현재 위치를 사용할 수 없습니다. 기기 설정을 확인하십시오.",timeout:"위치 요청 시간이 초과되었습니다. 다시 시도하십시오.",generalError:"위치를 가져올 수 없습니다. 수동으로 주소를 입력해 보십시오.",clickToSelectLocation:"지도를 클릭하여 위치를 선택하십시오"},hi:{buttonLabel:"मेरा वर्तमान स्थान उपयोग करें",errorTitle:"स्थान त्रुटि",closeButton:"बंद करें",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"स्थान पहुंच अस्वीकार कर दी गई थी। कृपया अपनी ब्राउज़र सेटिंग में स्थान सेवाएं सक्षम करें।",positionUnavailable:"आपका स्थान वर्तमान में उपलब्ध नहीं है। कृपया अपनी डिवाइस सेटिंग्स जांचें।",timeout:"स्थान अनुरोध समय समाप्त हो गया। कृपया पुनः प्रयास करें।",generalError:"आपका स्थान प्राप्त करने में असमर्थ। कृपया अपना पता मैन्युअल रूप से दर्ज करने का प्रयास करें।",clickToSelectLocation:"स्थान चुनने के लिए मानचित्र पर क्लिक करें"}},Ni=new Set(["ar","he","fa","ur"]);function ji(t="en"){return Di[t]||Di.en}function Oi(t){return Ni.has(t)}var Ui=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,Ri=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?Fi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&Ui(e,i,o),o};let qi=class extends Bt{constructor(){super(...arguments),this.zoom=15,this.mapTypeId="roadmap",this.heading=0,this.tilt=0,this.gestureHandling="cooperative",this.minZoom=2,this.maxZoom=19,this.disableDefaultUI=!1,this.mapTypeControl=!1,this.streetViewControl=!1,this.rotateControl=!1,this.fullscreenControl=!1,this.enableGeolocation=!1,this.showLocationMarker=!0,this.geolocationOptions={maximumAge:6e4,timeout:1e4,enableHighAccuracy:!0},this.locationMarkerBackground="#4285F4",this.locationMarkerBorderColor="#1967D2",this.locationMarkerGlyphColor="#FFFFFF",this.locationMarkerScale=1.3,this.locationCircleOptions={},this.language="en",this.options={},this.enableAutocomplete=!1,this.autocompleteProxyUrl="https://api.salla.dev",this.autocompleteStrictBounds=!1,this.autocompleteResolve=!1,this.autocompleteDebounceDelay=300,this.autocompleteMinChars=3,this.geolocationLoading=!1,this.geolocationError=null,this.showLoadingOverlay=!1,this.buttonState="normal",this.eventListeners=[],this.autocompleteListenerAttached=!1}async connectedCallback(){super.connectedCallback(),Oi(this.language)&&(document.dir="rtl")}async firstUpdated(){await ai,this.createMap()}clearAutocompleteInput(){if(!this.autocompleteElement)return;const t=this.autocompleteElement.shadowRoot?.querySelector("input");t&&(t.value="",this.autocompleteElement.inputValue="",this.autocompleteElement.value="")}setupAutocompleteListener(){!this.enableAutocomplete||!this.autocompleteElement||this.autocompleteListenerAttached||(this.autocompleteElement.addEventListener("place-select",(t=>{const{place:e}=t.detail;if(e?.geometry?.location){const{lat:t,lng:i}=e.geometry.location;this.setLocation(t,i,50,!0),this.dispatchMapEvent("location_changed",{position:{lat:t,lng:i},accuracy:50,source:"autocomplete",place:{placeId:e.place_id,formattedAddress:e.formatted_address,addressComponents:e.address_components,name:e.name,types:e.types}}),this.dispatchMapEvent("autocomplete_place_selected",{place:e})}})),this.autocompleteListenerAttached=!0)}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.enableAutocomplete&&!this.autocompleteListenerAttached&&setTimeout((()=>this.setupAutocompleteListener()),0),this.map&&(t.has("center")&&this.center&&Bi(this.map,"center",this.center),t.has("zoom")&&void 0!==this.zoom&&Bi(this.map,"zoom",this.zoom),t.has("minZoom")&&void 0!==this.minZoom&&this.map&&this.map.setOptions({minZoom:this.minZoom}),t.has("maxZoom")&&void 0!==this.maxZoom&&this.map&&this.map.setOptions({maxZoom:this.maxZoom}),t.has("mapTypeId")&&this.mapTypeId&&Bi(this.map,"mapTypeId",this.mapTypeId),t.has("heading")&&void 0!==this.heading&&Bi(this.map,"heading",this.heading),t.has("tilt")&&void 0!==this.tilt&&Bi(this.map,"tilt",this.tilt),t.has("locationMarkerPosition")&&this.locationMarkerPosition&&this.showLocationMarker&&this.setLocation(this.locationMarkerPosition.lat,this.locationMarkerPosition.lng,this.locationMarkerPosition.accuracy))}createMap(){if(!this.mapElement)return;const t={center:this.center,zoom:this.zoom,mapId:this.mapId,mapTypeId:this.mapTypeId,heading:this.heading,tilt:this.tilt,gestureHandling:this.gestureHandling,minZoom:this.minZoom,maxZoom:this.maxZoom,disableDefaultUI:this.disableDefaultUI,zoomControl:this.zoomControl,mapTypeControl:this.mapTypeControl,scaleControl:this.scaleControl,streetViewControl:this.streetViewControl,rotateControl:this.rotateControl,fullscreenControl:this.fullscreenControl,disableDoubleClickZoom:!0,keyboardShortcuts:!1,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM},...this.options};this.map=new google.maps.Map(this.mapElement,t);const e=google.maps.event.addListener(this.map,"click",(t=>{if(t.latLng&&this.showLocationMarker){const e=t.latLng.lat(),i=t.latLng.lng();this.setLocation(e,i,50,!1),this.clearAutocompleteInput(),this.dispatchMapEvent("location_changed",{position:{lat:e,lng:i},accuracy:50,source:"map-click"})}}));this.eventListeners=Pi(this.map,["click","dblclick","drag","dragend","dragstart","idle","mousemove","mouseout","mouseover","resize","rightclick","tilesloaded"],((t,e)=>{this.dispatchMapEvent(t,e)})),this.eventListeners.push((()=>{e&&google.maps.event.removeListener(e)})),["center","zoom","bounds","mapTypeId"].forEach((t=>{const e=`${t}_changed`,i=google.maps.event.addListener(this.map,e,(()=>{const i=`get${t.charAt(0).toUpperCase()}${t.slice(1)}`;if("function"==typeof this.map[i]){const t=this.map[i]();this.dispatchMapEvent(e,t)}}));this.eventListeners.push((()=>{i&&google.maps.event.removeListener(i)}))})),this.dispatchEvent(new CustomEvent("gmap-ready",{detail:{map:this.map},bubbles:!0,composed:!0})),this.locationMarkerPosition&&this.showLocationMarker&&this.setLocation(this.locationMarkerPosition.lat,this.locationMarkerPosition.lng,this.locationMarkerPosition.accuracy)}dispatchMapEvent(t,e){let i=t;(t.includes("_changed")||t.startsWith("geolocation_")||t.startsWith("location_"))&&(i=`gmap-${t.replace(/_/g,"-")}`),this.dispatchEvent(new CustomEvent(i,{detail:e,bubbles:!0,composed:!0}))}cleanup(){Ti(this.eventListeners),this.locationMarker&&(this.locationMarker.map=null,this.locationMarker=void 0),this.locationCircle&&(this.locationCircle.setMap(null),this.locationCircle=void 0),this.map=void 0}panBy(t,e){this.map?.panBy(t,e)}panTo(t){this.map?.panTo(t)}panToBounds(t){this.map?.panToBounds(t)}fitBounds(t){this.map?.fitBounds(t)}resize(){this.map&&google.maps.event.trigger(this.map,"resize")}resizePreserveCenter(){if(!this.map)return;const t=this.map.getCenter();google.maps.event.trigger(this.map,"resize"),t&&this.map.setCenter(t)}setLocation(t,e,i=50,s=!0){if(!this.map)return void console.warn("GMapMap: Cannot set location before map is initialized");const r={lat:t,lng:e};s&&this.map.panTo(r),this.showLocationMarker&&this.addLocationMarker(r,i),this.dispatchMapEvent("location_changed",{position:r,accuracy:i,source:"programmatic"})}async getCurrentLocation(t=!1){if(!navigator.geolocation)throw this.dispatchMapEvent("geolocation_error",{code:"NOT_SUPPORTED",message:"Geolocation is not supported by this browser"}),t||this.showGeolocationError(this.getTranslation("generalError")),new Error("NOT_SUPPORTED");this.geolocationLoading=!0,this.buttonState="loading",this.dispatchMapEvent("geolocation_loading",{message:"Getting your location..."});const e=t?null:setTimeout((()=>{this.geolocationLoading&&(this.showLoadingOverlay=!0)}),150);return new Promise(((i,s)=>{navigator.geolocation.getCurrentPosition((t=>{const s={lat:t.coords.latitude,lng:t.coords.longitude};if(e&&clearTimeout(e),this.geolocationLoading=!1,this.showLoadingOverlay=!1,this.buttonState="success",setTimeout((()=>{this.buttonState="normal"}),2e3),this.map){this.map.panTo(s);const e=t.coords.accuracy;let i=15;i=e>1e3?12:e>500?13:e>100?14:16,this.map.setZoom(i),this.showLocationMarker&&this.addLocationMarker(s,e),this.clearAutocompleteInput()}this.dispatchMapEvent("geolocation_success",{position:s,accuracy:t.coords.accuracy,altitude:t.coords.altitude,altitudeAccuracy:t.coords.altitudeAccuracy,heading:t.coords.heading,speed:t.coords.speed,timestamp:t.timestamp}),this.dispatchMapEvent("location_changed",{position:s,accuracy:t.coords.accuracy,source:"geolocation"}),i(s)}),(i=>{e&&clearTimeout(e),this.geolocationLoading=!1,this.showLoadingOverlay=!1,this.buttonState="error",setTimeout((()=>{this.buttonState="normal"}),2e3);let r="GENERAL_ERROR",o=this.getTranslation("generalError");i.code===i.PERMISSION_DENIED?(r="PERMISSION_DENIED",o=this.getTranslation("permissionDenied")):i.code===i.POSITION_UNAVAILABLE?(r="POSITION_UNAVAILABLE",o=this.getTranslation("positionUnavailable")):i.code===i.TIMEOUT&&(r="TIMEOUT",o=this.getTranslation("timeout")),this.dispatchMapEvent("geolocation_error",{code:r,message:o,error:i}),t||this.showGeolocationError(o),s(i)}),this.geolocationOptions)}))}handleGeolocationClick(){this.geolocationError=null,this.getCurrentLocation()}async addLocationMarker(t,e){if(this.map){if(this.locationMarker&&(this.locationMarker.map=null,this.locationMarker=void 0),this.locationCircle&&(this.locationCircle.setMap(null),this.locationCircle=void 0),!this.mapId)return void console.warn("GMapMap: mapId is required for location marker. Please set the mapId property on <gmap-map>. Get a Map ID from: https://console.cloud.google.com/google/maps-apis/studio/maps");try{const{AdvancedMarkerElement:e,PinElement:i}=await google.maps.importLibrary("marker"),s=new i({background:this.locationMarkerBackground,borderColor:this.locationMarkerBorderColor,glyphColor:this.locationMarkerGlyphColor,scale:this.locationMarkerScale});this.locationMarker=new e({map:this.map,position:t,title:"Your Location (Drag to adjust)",content:s.element,gmpDraggable:!0}),this.locationMarker.addListener("dragend",(()=>{if(this.locationMarker&&this.locationCircle){const t=this.locationMarker.position,e=t.toJSON?t.toJSON():{lat:t.lat(),lng:t.lng()};this.locationCircle.setCenter(e);const i=this.locationCircle.getRadius();this.clearAutocompleteInput(),this.dispatchMapEvent("location_marker_dragend",{position:e,accuracy:i}),this.dispatchMapEvent("location_changed",{position:e,accuracy:i,source:"marker-drag"})}}))}catch(t){console.error("Error creating AdvancedMarkerElement:",t)}this.locationCircle=new google.maps.Circle({map:this.map,center:t,radius:e,fillColor:"#4285F4",fillOpacity:.15,strokeColor:"#4285F4",strokeOpacity:.4,strokeWeight:1,clickable:!1,...this.locationCircleOptions})}}showGeolocationError(t){this.geolocationError=t,setTimeout((()=>{this.geolocationError=null}),7e3)}getTranslation(t){const e={loading:this.geolocationLoadingTitle,loadingInstructions:this.geolocationLoadingInstructions,errorTitle:this.geolocationErrorTitle,closeButton:this.geolocationErrorButtonText,timerMessage:this.geolocationErrorTimerMessage,clickToSelectLocation:this.geolocationClickToSelectMessage,generalError:this.geolocationGeneralErrorMessage,permissionDenied:this.geolocationPermissionDeniedMessage,positionUnavailable:this.geolocationPositionUnavailableMessage,timeout:this.geolocationTimeoutMessage}[t];if(null!=e&&""!==e)return e;const i=ji(this.language);return i[t]||i.generalError}get buttonLabel(){return void 0!==this.geolocationButtonLabel?this.geolocationButtonLabel:ji(this.language).buttonLabel||""}getButtonIconColor(){switch(this.buttonState){case"loading":return"#999";case"success":return"#4285F4";case"error":return"#EA4335";default:return"#666"}}getMap(){return this.map}render(){const t=Oi(this.language)?"rtl":"ltr";return ft`
634
634
  <div class="map-page-wrapper">
635
635
  ${this.enableAutocomplete?ft`
636
636
  <div class="auto-complete-map-wrapper">
@@ -715,7 +715,7 @@ const Q=globalThis,X=Q.trustedTypes,tt=X?X.createPolicy("lit-html",{createHTML:t
715
715
  `:""}
716
716
  </div>
717
717
  </div>
718
- `}};qi.styles=N`
718
+ `}};qi.styles=D`
719
719
  :host {
720
720
  display: block;
721
721
  position: relative;
@@ -1000,11 +1000,11 @@ const Q=globalThis,X=Q.trustedTypes,tt=X?X.createPolicy("lit-html",{createHTML:t
1000
1000
  text-align: start;
1001
1001
  direction: inherit;
1002
1002
  }
1003
- `,Ri([Li({type:Object})],qi.prototype,"center",2),Ri([Li({type:Number})],qi.prototype,"zoom",2),Ri([Li({type:String,attribute:"map-id"})],qi.prototype,"mapId",2),Ri([Li({type:String,attribute:"map-type-id"})],qi.prototype,"mapTypeId",2),Ri([Li({type:Number})],qi.prototype,"heading",2),Ri([Li({type:Number})],qi.prototype,"tilt",2),Ri([Li({type:Object})],qi.prototype,"bounds",2),Ri([Li({type:String})],qi.prototype,"gestureHandling",2),Ri([Li({type:Number})],qi.prototype,"minZoom",2),Ri([Li({type:Number})],qi.prototype,"maxZoom",2),Ri([Li({type:Boolean})],qi.prototype,"disableDefaultUI",2),Ri([Li({type:Boolean})],qi.prototype,"zoomControl",2),Ri([Li({type:Boolean})],qi.prototype,"mapTypeControl",2),Ri([Li({type:Boolean})],qi.prototype,"scaleControl",2),Ri([Li({type:Boolean})],qi.prototype,"streetViewControl",2),Ri([Li({type:Boolean})],qi.prototype,"rotateControl",2),Ri([Li({type:Boolean})],qi.prototype,"fullscreenControl",2),Ri([Li({type:Boolean,attribute:"enable-geolocation"})],qi.prototype,"enableGeolocation",2),Ri([Li({type:Boolean,attribute:"show-location-marker"})],qi.prototype,"showLocationMarker",2),Ri([Li({type:Object})],qi.prototype,"geolocationOptions",2),Ri([Li({type:Object,attribute:"location-marker-position"})],qi.prototype,"locationMarkerPosition",2),Ri([Li({type:String,attribute:"location-marker-background"})],qi.prototype,"locationMarkerBackground",2),Ri([Li({type:String,attribute:"location-marker-border-color"})],qi.prototype,"locationMarkerBorderColor",2),Ri([Li({type:String,attribute:"location-marker-glyph-color"})],qi.prototype,"locationMarkerGlyphColor",2),Ri([Li({type:Number,attribute:"location-marker-scale"})],qi.prototype,"locationMarkerScale",2),Ri([Li({type:Object,attribute:"location-circle-options"})],qi.prototype,"locationCircleOptions",2),Ri([Li({type:String})],qi.prototype,"language",2),Ri([Li({type:Object})],qi.prototype,"options",2),Ri([Li({type:String,attribute:"geolocation-button-label"})],qi.prototype,"geolocationButtonLabel",2),Ri([Li({type:String,attribute:"geolocation-loading-title"})],qi.prototype,"geolocationLoadingTitle",2),Ri([Li({type:String,attribute:"geolocation-loading-instructions"})],qi.prototype,"geolocationLoadingInstructions",2),Ri([Li({type:String,attribute:"geolocation-error-title"})],qi.prototype,"geolocationErrorTitle",2),Ri([Li({type:String,attribute:"geolocation-error-button-text"})],qi.prototype,"geolocationErrorButtonText",2),Ri([Li({type:String,attribute:"geolocation-error-timer-message"})],qi.prototype,"geolocationErrorTimerMessage",2),Ri([Li({type:String,attribute:"geolocation-click-to-select-message"})],qi.prototype,"geolocationClickToSelectMessage",2),Ri([Li({type:String,attribute:"geolocation-permission-denied-message"})],qi.prototype,"geolocationPermissionDeniedMessage",2),Ri([Li({type:String,attribute:"geolocation-position-unavailable-message"})],qi.prototype,"geolocationPositionUnavailableMessage",2),Ri([Li({type:String,attribute:"geolocation-timeout-message"})],qi.prototype,"geolocationTimeoutMessage",2),Ri([Li({type:String,attribute:"geolocation-general-error-message"})],qi.prototype,"geolocationGeneralErrorMessage",2),Ri([Li({type:Boolean,attribute:"enable-autocomplete"})],qi.prototype,"enableAutocomplete",2),Ri([Li({type:String,attribute:"autocomplete-hint"})],qi.prototype,"autocompleteHint",2),Ri([Li({type:String,attribute:"autocomplete-proxy-url"})],qi.prototype,"autocompleteProxyUrl",2),Ri([Li({type:String,attribute:"autocomplete-auth-token"})],qi.prototype,"autocompleteAuthToken",2),Ri([Li({type:String,attribute:"autocomplete-placeholder"})],qi.prototype,"autocompletePlaceholder",2),Ri([Li({type:String,attribute:"autocomplete-label"})],qi.prototype,"autocompleteLabel",2),Ri([Li({type:String,attribute:"autocomplete-country"})],qi.prototype,"autocompleteCountry",2),Ri([Li({type:Object,attribute:"autocomplete-location-bias"})],qi.prototype,"autocompleteLocationBias",2),Ri([Li({type:Object,attribute:"autocomplete-location-restriction"})],qi.prototype,"autocompleteLocationRestriction",2),Ri([Li({type:String,attribute:"autocomplete-types"})],qi.prototype,"autocompleteTypes",2),Ri([Li({type:String,attribute:"autocomplete-fields"})],qi.prototype,"autocompleteFields",2),Ri([Li({type:Boolean,attribute:"autocomplete-strict-bounds"})],qi.prototype,"autocompleteStrictBounds",2),Ri([Li({type:Boolean,attribute:"autocomplete-resolve"})],qi.prototype,"autocompleteResolve",2),Ri([Li({type:Number,attribute:"autocomplete-debounce-delay"})],qi.prototype,"autocompleteDebounceDelay",2),Ri([Li({type:Number,attribute:"autocomplete-min-chars"})],qi.prototype,"autocompleteMinChars",2),Ri([Ii(".map")],qi.prototype,"mapElement",2),Ri([Ii("salla-address-autocomplete")],qi.prototype,"autocompleteElement",2),Ri([Ei()],qi.prototype,"geolocationLoading",2),Ri([Ei()],qi.prototype,"geolocationError",2),Ri([Ei()],qi.prototype,"showLoadingOverlay",2),Ri([Ei()],qi.prototype,"buttonState",2),qi=Ri([ni("gmap-map")],qi);var Zi=Object.defineProperty,Gi=Object.getOwnPropertyDescriptor,Vi=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?Gi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&Zi(e,i,o),o};let Hi=class extends Bt{constructor(){super(...arguments),this.title="",this.gmpDraggable=!1,this.gmpClickable=!0,this.scale=1,this.draggable=!1,this.clickable=!0,this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initMarker()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}async updated(t){super.updated(t),this.marker&&(t.has("position")&&this.position&&(this.marker.position=this.normalizePosition(this.position)),t.has("title")&&this.title&&(this.marker.title=this.title),t.has("gmpDraggable")&&(this.marker.gmpDraggable=this.gmpDraggable||this.draggable),t.has("gmpClickable")&&(this.marker.gmpClickable=!1!==this.gmpClickable&&!1!==this.clickable),t.has("zIndex")&&void 0!==this.zIndex&&(this.marker.zIndex=this.zIndex),(t.has("content")||t.has("background")||t.has("borderColor")||t.has("glyphColor")||t.has("scale")||t.has("icon")||t.has("label"))&&this.updateMarkerContent())}async initMarker(){this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createMarker()}));const t=this.closest("gmap-map");t?.getMap&&(this.map=t.getMap(),this.map&&await this.createMarker())}async createMarker(){if(!this.map)return void console.error("GMapMarker: No map found. Make sure the marker is inside a <gmap-map> element.");if(!this.map.get?.("mapId"))return void console.error('GMapMarker: AdvancedMarkerElement requires a mapId to be set on the map. Add mapId to your map. Example: mapId="YOUR_MAP_ID". Get a Map ID from: https://console.cloud.google.com/google/maps-apis/studio/maps');this.markerLibrary=await async function(t){if(oi.has(t))return oi.get(t);if(await ai,typeof google<"u"&&google.maps&&google.maps.importLibrary){const e=await google.maps.importLibrary(t);return oi.set(t,e),e}return google.maps[t]||google.maps}("marker");const{AdvancedMarkerElement:t,PinElement:e}=this.markerLibrary,i=this.gmpDraggable||this.draggable,s=!1!==this.gmpClickable&&!1!==this.clickable,r={map:this.map,position:this.normalizePosition(this.position),title:this.title,gmpDraggable:i,gmpClickable:s};if(void 0!==this.zIndex&&(r.zIndex=this.zIndex),this.content)if("string"==typeof this.content){const t=document.createElement("div");t.innerHTML=this.content,r.content=t}else r.content=this.content;else if(this.icon){const t=document.createElement("img");t.src=this.icon,t.style.width="32px",t.style.height="32px",r.content=t}else{const t={scale:this.scale||1};this.background&&(t.background=this.background),this.borderColor&&(t.borderColor=this.borderColor),this.glyphColor&&(t.glyphColor=this.glyphColor),this.label&&"string"==typeof this.label&&(t.glyph=this.label),this.pinElement=new e(t),this.pinElement?.element&&(r.content=this.pinElement.element)}this.marker=new t(r),this.eventListeners=Pi(this.marker,["click","drag","dragstart","dragend","gmp-click"],((t,e)=>{if("dragend"===t&&this.marker&&this.marker.position){const t=this.marker.position,e=t.toJSON?t.toJSON():{lat:t.lat(),lng:t.lng()};this.dispatchEvent(new CustomEvent("dragend",{detail:{latLng:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("gmap-position-changed",{detail:e,bubbles:!0,composed:!0}))}else this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))})),this.dispatchEvent(new CustomEvent("gmap-marker-ready",{detail:{marker:this.marker},bubbles:!0,composed:!0}))}updateMarkerContent(){if(!this.marker||!this.markerLibrary)return;const{PinElement:t}=this.markerLibrary;if(this.content)if("string"==typeof this.content){const t=document.createElement("div");t.innerHTML=this.content,this.marker.content=t}else this.marker.content=this.content;else if(this.icon){const t=document.createElement("img");t.src=this.icon,t.style.width="32px",t.style.height="32px",this.marker.content=t}else{const e={scale:this.scale||1};this.background&&(e.background=this.background),this.borderColor&&(e.borderColor=this.borderColor),this.glyphColor&&(e.glyphColor=this.glyphColor),this.label&&"string"==typeof this.label&&(e.glyph=this.label),this.pinElement=new t(e),this.pinElement?.element&&(this.marker.content=this.pinElement.element)}}normalizePosition(t){return t?{lat:"number"==typeof t.lat?t.lat:parseFloat(t.lat),lng:"number"==typeof t.lng?t.lng:parseFloat(t.lng)}:{lat:0,lng:0}}cleanup(){Ti(this.eventListeners),this.marker&&(this.marker.map=null,this.marker=void 0)}getMarker(){return this.marker}render(){return ft`<slot></slot>`}};Vi([Li({type:Object})],Hi.prototype,"position",2),Vi([Li({type:String})],Hi.prototype,"title",2),Vi([Li({type:Boolean})],Hi.prototype,"gmpDraggable",2),Vi([Li({type:Boolean})],Hi.prototype,"gmpClickable",2),Vi([Li({type:Number})],Hi.prototype,"zIndex",2),Vi([Li({type:Object})],Hi.prototype,"content",2),Vi([Li({type:String})],Hi.prototype,"background",2),Vi([Li({type:String})],Hi.prototype,"borderColor",2),Vi([Li({type:String})],Hi.prototype,"glyphColor",2),Vi([Li({type:Number})],Hi.prototype,"scale",2),Vi([Li({type:Boolean})],Hi.prototype,"draggable",2),Vi([Li({type:Boolean})],Hi.prototype,"clickable",2),Vi([Li({type:String})],Hi.prototype,"icon",2),Vi([Li({type:String})],Hi.prototype,"label",2),Vi([Ei()],Hi.prototype,"marker",2),Vi([Ei()],Hi.prototype,"map",2),Hi=Vi([ni("gmap-marker")],Hi);var Ki=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,Yi=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?Wi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&Ki(e,i,o),o};let Ji=class extends Bt{constructor(){super(...arguments),this.opened=!0,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initInfoWindow()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.infoWindow&&(t.has("opened")&&(this.opened?this.open():this.close()),t.has("position")&&this.position&&!this.marker&&this.infoWindow.setPosition(this.position),t.has("zIndex")&&void 0!==this.zIndex&&this.infoWindow.setZIndex(this.zIndex))}async initInfoWindow(){const t=this.closest("gmap-marker");if(t)this.addEventListener("gmap-marker-ready",(t=>{this.marker=t.detail.marker,this.createInfoWindow()})),t.getMarker&&(this.marker=t.getMarker(),this.marker&&await this.createInfoWindow());else{const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createInfoWindow()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createInfoWindow()))}}async createInfoWindow(){const t=document.createElement("div");t.style.cssText="min-width: 200px;";const e={content:t,...this.options};void 0!==this.zIndex&&(e.zIndex=this.zIndex),this.position&&!this.marker&&(e.position=this.position),this.infoWindow=new google.maps.InfoWindow(e),this.observeSlotContent(t),this.eventListeners=Pi(this.infoWindow,["closeclick","domready","content_changed"],(t=>{"closeclick"===t&&(this.opened=!1),this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0}))})),this.opened&&this.open()}observeSlotContent(t){this.renderSlotContent(t);const e=this.shadowRoot?.querySelector("slot");e&&e.addEventListener("slotchange",(()=>{this.renderSlotContent(t)})),this.contentObserver=new MutationObserver((()=>{this.renderSlotContent(t)})),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0})}renderSlotContent(t){const e=this.shadowRoot?.querySelector("slot");if(e){const i=e.assignedNodes({flatten:!0});t.innerHTML="",i.forEach((e=>{(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())&&t.appendChild(e.cloneNode(!0))}))}}open(){this.infoWindow&&(this.marker?this.infoWindow.open({anchor:this.marker,map:this.map}):this.map&&this.infoWindow.open(this.map))}close(){this.infoWindow?.close()}cleanup(){Ti(this.eventListeners),this.contentObserver&&(this.contentObserver.disconnect(),this.contentObserver=void 0),this.infoWindow&&(this.infoWindow.close(),this.infoWindow=void 0)}getInfoWindow(){return this.infoWindow}render(){return ft`<slot></slot>`}};Ji.styles=N`
1003
+ `,Ri([Li({type:Object})],qi.prototype,"center",2),Ri([Li({type:Number})],qi.prototype,"zoom",2),Ri([Li({type:String,attribute:"map-id"})],qi.prototype,"mapId",2),Ri([Li({type:String,attribute:"map-type-id"})],qi.prototype,"mapTypeId",2),Ri([Li({type:Number})],qi.prototype,"heading",2),Ri([Li({type:Number})],qi.prototype,"tilt",2),Ri([Li({type:Object})],qi.prototype,"bounds",2),Ri([Li({type:String})],qi.prototype,"gestureHandling",2),Ri([Li({type:Number})],qi.prototype,"minZoom",2),Ri([Li({type:Number})],qi.prototype,"maxZoom",2),Ri([Li({type:Boolean})],qi.prototype,"disableDefaultUI",2),Ri([Li({type:Boolean})],qi.prototype,"zoomControl",2),Ri([Li({type:Boolean})],qi.prototype,"mapTypeControl",2),Ri([Li({type:Boolean})],qi.prototype,"scaleControl",2),Ri([Li({type:Boolean})],qi.prototype,"streetViewControl",2),Ri([Li({type:Boolean})],qi.prototype,"rotateControl",2),Ri([Li({type:Boolean})],qi.prototype,"fullscreenControl",2),Ri([Li({type:Boolean,attribute:"enable-geolocation"})],qi.prototype,"enableGeolocation",2),Ri([Li({type:Boolean,attribute:"show-location-marker"})],qi.prototype,"showLocationMarker",2),Ri([Li({type:Object})],qi.prototype,"geolocationOptions",2),Ri([Li({type:Object,attribute:"location-marker-position"})],qi.prototype,"locationMarkerPosition",2),Ri([Li({type:String,attribute:"location-marker-background"})],qi.prototype,"locationMarkerBackground",2),Ri([Li({type:String,attribute:"location-marker-border-color"})],qi.prototype,"locationMarkerBorderColor",2),Ri([Li({type:String,attribute:"location-marker-glyph-color"})],qi.prototype,"locationMarkerGlyphColor",2),Ri([Li({type:Number,attribute:"location-marker-scale"})],qi.prototype,"locationMarkerScale",2),Ri([Li({type:Object,attribute:"location-circle-options"})],qi.prototype,"locationCircleOptions",2),Ri([Li({type:String})],qi.prototype,"language",2),Ri([Li({type:Object})],qi.prototype,"options",2),Ri([Li({type:String,attribute:"geolocation-button-label"})],qi.prototype,"geolocationButtonLabel",2),Ri([Li({type:String,attribute:"geolocation-loading-title"})],qi.prototype,"geolocationLoadingTitle",2),Ri([Li({type:String,attribute:"geolocation-loading-instructions"})],qi.prototype,"geolocationLoadingInstructions",2),Ri([Li({type:String,attribute:"geolocation-error-title"})],qi.prototype,"geolocationErrorTitle",2),Ri([Li({type:String,attribute:"geolocation-error-button-text"})],qi.prototype,"geolocationErrorButtonText",2),Ri([Li({type:String,attribute:"geolocation-error-timer-message"})],qi.prototype,"geolocationErrorTimerMessage",2),Ri([Li({type:String,attribute:"geolocation-click-to-select-message"})],qi.prototype,"geolocationClickToSelectMessage",2),Ri([Li({type:String,attribute:"geolocation-permission-denied-message"})],qi.prototype,"geolocationPermissionDeniedMessage",2),Ri([Li({type:String,attribute:"geolocation-position-unavailable-message"})],qi.prototype,"geolocationPositionUnavailableMessage",2),Ri([Li({type:String,attribute:"geolocation-timeout-message"})],qi.prototype,"geolocationTimeoutMessage",2),Ri([Li({type:String,attribute:"geolocation-general-error-message"})],qi.prototype,"geolocationGeneralErrorMessage",2),Ri([Li({type:Boolean,attribute:"enable-autocomplete"})],qi.prototype,"enableAutocomplete",2),Ri([Li({type:String,attribute:"autocomplete-hint"})],qi.prototype,"autocompleteHint",2),Ri([Li({type:String,attribute:"autocomplete-proxy-url"})],qi.prototype,"autocompleteProxyUrl",2),Ri([Li({type:String,attribute:"autocomplete-auth-token"})],qi.prototype,"autocompleteAuthToken",2),Ri([Li({type:String,attribute:"autocomplete-placeholder"})],qi.prototype,"autocompletePlaceholder",2),Ri([Li({type:String,attribute:"autocomplete-label"})],qi.prototype,"autocompleteLabel",2),Ri([Li({type:String,attribute:"autocomplete-country"})],qi.prototype,"autocompleteCountry",2),Ri([Li({type:Object,attribute:"autocomplete-location-bias"})],qi.prototype,"autocompleteLocationBias",2),Ri([Li({type:Object,attribute:"autocomplete-location-restriction"})],qi.prototype,"autocompleteLocationRestriction",2),Ri([Li({type:String,attribute:"autocomplete-types"})],qi.prototype,"autocompleteTypes",2),Ri([Li({type:String,attribute:"autocomplete-fields"})],qi.prototype,"autocompleteFields",2),Ri([Li({type:Boolean,attribute:"autocomplete-strict-bounds"})],qi.prototype,"autocompleteStrictBounds",2),Ri([Li({type:Boolean,attribute:"autocomplete-resolve"})],qi.prototype,"autocompleteResolve",2),Ri([Li({type:Number,attribute:"autocomplete-debounce-delay"})],qi.prototype,"autocompleteDebounceDelay",2),Ri([Li({type:Number,attribute:"autocomplete-min-chars"})],qi.prototype,"autocompleteMinChars",2),Ri([Ii(".map")],qi.prototype,"mapElement",2),Ri([Ii("salla-address-autocomplete")],qi.prototype,"autocompleteElement",2),Ri([Ei()],qi.prototype,"geolocationLoading",2),Ri([Ei()],qi.prototype,"geolocationError",2),Ri([Ei()],qi.prototype,"showLoadingOverlay",2),Ri([Ei()],qi.prototype,"buttonState",2),qi=Ri([ni("gmap-map")],qi);var Zi=Object.defineProperty,Gi=Object.getOwnPropertyDescriptor,Vi=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?Gi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&Zi(e,i,o),o};let Hi=class extends Bt{constructor(){super(...arguments),this.title="",this.gmpDraggable=!1,this.gmpClickable=!0,this.scale=1,this.draggable=!1,this.clickable=!0,this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initMarker()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}async updated(t){super.updated(t),this.marker&&(t.has("position")&&this.position&&(this.marker.position=this.normalizePosition(this.position)),t.has("title")&&this.title&&(this.marker.title=this.title),t.has("gmpDraggable")&&(this.marker.gmpDraggable=this.gmpDraggable||this.draggable),t.has("gmpClickable")&&(this.marker.gmpClickable=!1!==this.gmpClickable&&!1!==this.clickable),t.has("zIndex")&&void 0!==this.zIndex&&(this.marker.zIndex=this.zIndex),(t.has("content")||t.has("background")||t.has("borderColor")||t.has("glyphColor")||t.has("scale")||t.has("icon")||t.has("label"))&&this.updateMarkerContent())}async initMarker(){this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createMarker()}));const t=this.closest("gmap-map");t?.getMap&&(this.map=t.getMap(),this.map&&await this.createMarker())}async createMarker(){if(!this.map)return void console.error("GMapMarker: No map found. Make sure the marker is inside a <gmap-map> element.");if(!this.map.get?.("mapId"))return void console.error('GMapMarker: AdvancedMarkerElement requires a mapId to be set on the map. Add mapId to your map. Example: mapId="YOUR_MAP_ID". Get a Map ID from: https://console.cloud.google.com/google/maps-apis/studio/maps');this.markerLibrary=await async function(t){if(oi.has(t))return oi.get(t);if(await ai,typeof google<"u"&&google.maps&&google.maps.importLibrary){const e=await google.maps.importLibrary(t);return oi.set(t,e),e}return google.maps[t]||google.maps}("marker");const{AdvancedMarkerElement:t,PinElement:e}=this.markerLibrary,i=this.gmpDraggable||this.draggable,s=!1!==this.gmpClickable&&!1!==this.clickable,r={map:this.map,position:this.normalizePosition(this.position),title:this.title,gmpDraggable:i,gmpClickable:s};if(void 0!==this.zIndex&&(r.zIndex=this.zIndex),this.content)if("string"==typeof this.content){const t=document.createElement("div");t.innerHTML=this.content,r.content=t}else r.content=this.content;else if(this.icon){const t=document.createElement("img");t.src=this.icon,t.style.width="32px",t.style.height="32px",r.content=t}else{const t={scale:this.scale||1};this.background&&(t.background=this.background),this.borderColor&&(t.borderColor=this.borderColor),this.glyphColor&&(t.glyphColor=this.glyphColor),this.label&&"string"==typeof this.label&&(t.glyph=this.label),this.pinElement=new e(t),this.pinElement?.element&&(r.content=this.pinElement.element)}this.marker=new t(r),this.eventListeners=Pi(this.marker,["click","drag","dragstart","dragend","gmp-click"],((t,e)=>{if("dragend"===t&&this.marker&&this.marker.position){const t=this.marker.position,e=t.toJSON?t.toJSON():{lat:t.lat(),lng:t.lng()};this.dispatchEvent(new CustomEvent("dragend",{detail:{latLng:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("gmap-position-changed",{detail:e,bubbles:!0,composed:!0}))}else this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))})),this.dispatchEvent(new CustomEvent("gmap-marker-ready",{detail:{marker:this.marker},bubbles:!0,composed:!0}))}updateMarkerContent(){if(!this.marker||!this.markerLibrary)return;const{PinElement:t}=this.markerLibrary;if(this.content)if("string"==typeof this.content){const t=document.createElement("div");t.innerHTML=this.content,this.marker.content=t}else this.marker.content=this.content;else if(this.icon){const t=document.createElement("img");t.src=this.icon,t.style.width="32px",t.style.height="32px",this.marker.content=t}else{const e={scale:this.scale||1};this.background&&(e.background=this.background),this.borderColor&&(e.borderColor=this.borderColor),this.glyphColor&&(e.glyphColor=this.glyphColor),this.label&&"string"==typeof this.label&&(e.glyph=this.label),this.pinElement=new t(e),this.pinElement?.element&&(this.marker.content=this.pinElement.element)}}normalizePosition(t){return t?{lat:"number"==typeof t.lat?t.lat:parseFloat(t.lat),lng:"number"==typeof t.lng?t.lng:parseFloat(t.lng)}:{lat:0,lng:0}}cleanup(){Ti(this.eventListeners),this.marker&&(this.marker.map=null,this.marker=void 0)}getMarker(){return this.marker}render(){return ft`<slot></slot>`}};Vi([Li({type:Object})],Hi.prototype,"position",2),Vi([Li({type:String})],Hi.prototype,"title",2),Vi([Li({type:Boolean})],Hi.prototype,"gmpDraggable",2),Vi([Li({type:Boolean})],Hi.prototype,"gmpClickable",2),Vi([Li({type:Number})],Hi.prototype,"zIndex",2),Vi([Li({type:Object})],Hi.prototype,"content",2),Vi([Li({type:String})],Hi.prototype,"background",2),Vi([Li({type:String})],Hi.prototype,"borderColor",2),Vi([Li({type:String})],Hi.prototype,"glyphColor",2),Vi([Li({type:Number})],Hi.prototype,"scale",2),Vi([Li({type:Boolean})],Hi.prototype,"draggable",2),Vi([Li({type:Boolean})],Hi.prototype,"clickable",2),Vi([Li({type:String})],Hi.prototype,"icon",2),Vi([Li({type:String})],Hi.prototype,"label",2),Vi([Ei()],Hi.prototype,"marker",2),Vi([Ei()],Hi.prototype,"map",2),Hi=Vi([ni("gmap-marker")],Hi);var Ki=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,Yi=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?Wi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&Ki(e,i,o),o};let Ji=class extends Bt{constructor(){super(...arguments),this.opened=!0,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initInfoWindow()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.infoWindow&&(t.has("opened")&&(this.opened?this.open():this.close()),t.has("position")&&this.position&&!this.marker&&this.infoWindow.setPosition(this.position),t.has("zIndex")&&void 0!==this.zIndex&&this.infoWindow.setZIndex(this.zIndex))}async initInfoWindow(){const t=this.closest("gmap-marker");if(t)this.addEventListener("gmap-marker-ready",(t=>{this.marker=t.detail.marker,this.createInfoWindow()})),t.getMarker&&(this.marker=t.getMarker(),this.marker&&await this.createInfoWindow());else{const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createInfoWindow()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createInfoWindow()))}}async createInfoWindow(){const t=document.createElement("div");t.style.cssText="min-width: 200px;";const e={content:t,...this.options};void 0!==this.zIndex&&(e.zIndex=this.zIndex),this.position&&!this.marker&&(e.position=this.position),this.infoWindow=new google.maps.InfoWindow(e),this.observeSlotContent(t),this.eventListeners=Pi(this.infoWindow,["closeclick","domready","content_changed"],(t=>{"closeclick"===t&&(this.opened=!1),this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0}))})),this.opened&&this.open()}observeSlotContent(t){this.renderSlotContent(t);const e=this.shadowRoot?.querySelector("slot");e&&e.addEventListener("slotchange",(()=>{this.renderSlotContent(t)})),this.contentObserver=new MutationObserver((()=>{this.renderSlotContent(t)})),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0})}renderSlotContent(t){const e=this.shadowRoot?.querySelector("slot");if(e){const i=e.assignedNodes({flatten:!0});t.innerHTML="",i.forEach((e=>{(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())&&t.appendChild(e.cloneNode(!0))}))}}open(){this.infoWindow&&(this.marker?this.infoWindow.open({anchor:this.marker,map:this.map}):this.map&&this.infoWindow.open(this.map))}close(){this.infoWindow?.close()}cleanup(){Ti(this.eventListeners),this.contentObserver&&(this.contentObserver.disconnect(),this.contentObserver=void 0),this.infoWindow&&(this.infoWindow.close(),this.infoWindow=void 0)}getInfoWindow(){return this.infoWindow}render(){return ft`<slot></slot>`}};Ji.styles=D`
1004
1004
  :host {
1005
1005
  display: contents;
1006
1006
  }
1007
- `,Yi([Li({type:Boolean})],Ji.prototype,"opened",2),Yi([Li({type:Object})],Ji.prototype,"position",2),Yi([Li({type:Number})],Ji.prototype,"zIndex",2),Yi([Li({type:Object})],Ji.prototype,"options",2),Yi([Ei()],Ji.prototype,"infoWindow",2),Yi([Ei()],Ji.prototype,"map",2),Yi([Ei()],Ji.prototype,"marker",2),Ji=Yi([ni("gmap-info-window")],Ji);var Qi=Object.defineProperty,Xi=Object.getOwnPropertyDescriptor,ts=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?Xi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&Qi(e,i,o),o};let es=class extends Bt{constructor(){super(...arguments),this.path=[],this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initPolyline()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.polyline&&(t.has("path")&&this.path&&this.polyline.setPath(this.path),t.has("editable")&&this.polyline.setEditable(this.editable),t.has("draggable")&&this.polyline.setDraggable(this.draggable),t.has("options")&&this.polyline.setOptions(this.options))}async initPolyline(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createPolyline()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createPolyline()))}async createPolyline(){if(!this.map)return;const t={map:this.map,path:this.path,editable:this.editable,draggable:this.draggable,...this.options};this.polyline=new google.maps.Polyline(t),this.eventListeners=Pi(this.polyline,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],((t,e)=>{this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}));const e=google.maps.event.addListener(this.polyline.getPath(),"set_at",(()=>{this.emitPathChanged()})),i=google.maps.event.addListener(this.polyline.getPath(),"insert_at",(()=>{this.emitPathChanged()})),s=google.maps.event.addListener(this.polyline.getPath(),"remove_at",(()=>{this.emitPathChanged()}));this.eventListeners.push((()=>google.maps.event.removeListener(e)),(()=>google.maps.event.removeListener(i)),(()=>google.maps.event.removeListener(s)))}emitPathChanged(){if(!this.polyline)return;const t=this.polyline.getPath().getArray().map((t=>({lat:t.lat(),lng:t.lng()})));this.dispatchEvent(new CustomEvent("gmap-path-changed",{detail:t,bubbles:!0,composed:!0}))}cleanup(){Ti(this.eventListeners),this.polyline&&(this.polyline.setMap(null),this.polyline=void 0)}getPolyline(){return this.polyline}render(){return ft``}};ts([Li({type:Array})],es.prototype,"path",2),ts([Li({type:Boolean})],es.prototype,"editable",2),ts([Li({type:Boolean})],es.prototype,"draggable",2),ts([Li({type:Object})],es.prototype,"options",2),ts([Ei()],es.prototype,"polyline",2),ts([Ei()],es.prototype,"map",2),es=ts([ni("gmap-polyline")],es);var is=Object.defineProperty,ss=Object.getOwnPropertyDescriptor,rs=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ss(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&is(e,i,o),o};let os=class extends Bt{constructor(){super(...arguments),this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initPolygon()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.polygon&&(t.has("path")&&this.path&&this.polygon.setPath(this.path),t.has("paths")&&this.paths&&this.polygon.setPaths(this.paths),t.has("editable")&&this.polygon.setEditable(this.editable),t.has("draggable")&&this.polygon.setDraggable(this.draggable),t.has("options")&&this.polygon.setOptions(this.options))}async initPolygon(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createPolygon()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createPolygon()))}async createPolygon(){if(!this.map)return;const t={map:this.map,editable:this.editable,draggable:this.draggable,...this.options};this.paths?t.paths=this.paths:this.path&&(t.paths=this.path),this.polygon=new google.maps.Polygon(t),this.eventListeners=Pi(this.polygon,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],((t,e)=>{this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))})),this.paths?this.bindPathsChanges():this.bindPathChanges()}bindPathChanges(){if(!this.polygon)return;const t=this.polygon.getPath(),e=google.maps.event.addListener(t,"set_at",(()=>{this.emitPathChanged()})),i=google.maps.event.addListener(t,"insert_at",(()=>{this.emitPathChanged()})),s=google.maps.event.addListener(t,"remove_at",(()=>{this.emitPathChanged()}));this.eventListeners.push((()=>google.maps.event.removeListener(e)),(()=>google.maps.event.removeListener(i)),(()=>google.maps.event.removeListener(s)))}bindPathsChanges(){this.polygon&&this.polygon.getPaths().forEach((t=>{const e=google.maps.event.addListener(t,"set_at",(()=>{this.emitPathsChanged()})),i=google.maps.event.addListener(t,"insert_at",(()=>{this.emitPathsChanged()})),s=google.maps.event.addListener(t,"remove_at",(()=>{this.emitPathsChanged()}));this.eventListeners.push((()=>google.maps.event.removeListener(e)),(()=>google.maps.event.removeListener(i)),(()=>google.maps.event.removeListener(s)))}))}emitPathChanged(){if(!this.polygon)return;const t=this.polygon.getPath().getArray().map((t=>({lat:t.lat(),lng:t.lng()})));this.dispatchEvent(new CustomEvent("gmap-path-changed",{detail:t,bubbles:!0,composed:!0}))}emitPathsChanged(){if(!this.polygon)return;const t=this.polygon.getPaths().getArray().map((t=>t.getArray().map((t=>({lat:t.lat(),lng:t.lng()})))));this.dispatchEvent(new CustomEvent("gmap-paths-changed",{detail:t,bubbles:!0,composed:!0}))}cleanup(){Ti(this.eventListeners),this.polygon&&(this.polygon.setMap(null),this.polygon=void 0)}getPolygon(){return this.polygon}render(){return ft``}};rs([Li({type:Array})],os.prototype,"path",2),rs([Li({type:Array})],os.prototype,"paths",2),rs([Li({type:Boolean})],os.prototype,"editable",2),rs([Li({type:Boolean})],os.prototype,"draggable",2),rs([Li({type:Object})],os.prototype,"options",2),rs([Ei()],os.prototype,"polygon",2),rs([Ei()],os.prototype,"map",2),os=rs([ni("gmap-polygon")],os);var as=Object.defineProperty,ns=Object.getOwnPropertyDescriptor,ls=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ns(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&as(e,i,o),o};let hs=class extends Bt{constructor(){super(...arguments),this.radius=1e3,this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initCircle()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.circle&&(t.has("center")&&this.center&&this.circle.setCenter(this.center),t.has("radius")&&void 0!==this.radius&&this.circle.setRadius(this.radius),t.has("editable")&&this.circle.setEditable(this.editable),t.has("draggable")&&this.circle.setDraggable(this.draggable),t.has("options")&&this.circle.setOptions(this.options))}async initCircle(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createCircle()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createCircle()))}async createCircle(){if(!this.map)return;const t={map:this.map,center:this.center,radius:this.radius,editable:this.editable,draggable:this.draggable,...this.options};this.circle=new google.maps.Circle(t),this.eventListeners=Pi(this.circle,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick","center_changed","radius_changed","bounds_changed"],((t,e)=>{if("center_changed"===t){const e=this.circle.getCenter(),i=e?{lat:e.lat(),lng:e.lng()}:null;this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}else if("radius_changed"===t){const e=this.circle.getRadius();this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}else this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}))}cleanup(){Ti(this.eventListeners),this.circle&&(this.circle.setMap(null),this.circle=void 0)}getCircle(){return this.circle}render(){return ft``}};ls([Li({type:Object})],hs.prototype,"center",2),ls([Li({type:Number})],hs.prototype,"radius",2),ls([Li({type:Boolean})],hs.prototype,"editable",2),ls([Li({type:Boolean})],hs.prototype,"draggable",2),ls([Li({type:Object})],hs.prototype,"options",2),ls([Ei()],hs.prototype,"circle",2),ls([Ei()],hs.prototype,"map",2),hs=ls([ni("gmap-circle")],hs);var ds=Object.defineProperty,cs=Object.getOwnPropertyDescriptor,us=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?cs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&ds(e,i,o),o};let ps=class extends Bt{constructor(){super(...arguments),this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initRectangle()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.rectangle&&(t.has("bounds")&&this.bounds&&this.rectangle.setBounds(this.bounds),t.has("editable")&&this.rectangle.setEditable(this.editable),t.has("draggable")&&this.rectangle.setDraggable(this.draggable),t.has("options")&&this.rectangle.setOptions(this.options))}async initRectangle(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createRectangle()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createRectangle()))}async createRectangle(){if(!this.map)return;const t={map:this.map,bounds:this.bounds,editable:this.editable,draggable:this.draggable,...this.options};this.rectangle=new google.maps.Rectangle(t),this.eventListeners=Pi(this.rectangle,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick","bounds_changed"],((t,e)=>{if("bounds_changed"===t){const e=this.rectangle.getBounds();if(e){const i={north:e.getNorthEast().lat(),south:e.getSouthWest().lat(),east:e.getNorthEast().lng(),west:e.getSouthWest().lng()};this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}}else this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}))}cleanup(){Ti(this.eventListeners),this.rectangle&&(this.rectangle.setMap(null),this.rectangle=void 0)}getRectangle(){return this.rectangle}render(){return ft``}};us([Li({type:Object})],ps.prototype,"bounds",2),us([Li({type:Boolean})],ps.prototype,"editable",2),us([Li({type:Boolean})],ps.prototype,"draggable",2),us([Li({type:Object})],ps.prototype,"options",2),us([Ei()],ps.prototype,"rectangle",2),us([Ei()],ps.prototype,"map",2),ps=us([ni("gmap-rectangle")],ps);var bs=Object.defineProperty,ms=Object.getOwnPropertyDescriptor,gs=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ms(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&bs(e,i,o),o};let fs=class extends Bt{constructor(){super(...arguments),this.gridSize=60,this.markers=[]}async connectedCallback(){super.connectedCallback(),await this.initCluster()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}async initCluster(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createCluster()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createCluster())),this.addEventListener("gmap-marker-ready",(t=>{this.addMarker(t.detail.marker)}))}async createCluster(){if(this.map)try{const t=await import("./p-BkPzCq-C.js").catch((()=>null));if(!t)return void console.error("GMapCluster: @googlemaps/markerclusterer not found. Install with: npm install @googlemaps/markerclusterer");const{MarkerClusterer:e}=t,i={map:this.map,markers:this.markers};this.gridSize&&(i.gridSize=this.gridSize),void 0!==this.maxZoom&&(i.maxZoom=this.maxZoom),this.styles&&(i.styles=this.styles),this.calculator&&(i.calculator=this.calculator),this.markerClusterer=new e(i)}catch(t){console.error("GMapCluster: Error creating cluster:",t)}}addMarker(t){this.markers.includes(t)||(this.markers.push(t),this.markerClusterer&&this.markerClusterer.addMarker(t))}cleanup(){this.markerClusterer&&(this.markerClusterer.clearMarkers(),this.markerClusterer=void 0),this.markers=[]}getClusterer(){return this.markerClusterer}render(){return ft`<slot></slot>`}};gs([Li({type:Number})],fs.prototype,"gridSize",2),gs([Li({type:Number})],fs.prototype,"maxZoom",2),gs([Li({type:Array})],fs.prototype,"styles",2),gs([Li({type:Function})],fs.prototype,"calculator",2),gs([Ei()],fs.prototype,"map",2),gs([Ei()],fs.prototype,"markerClusterer",2),gs([Ei()],fs.prototype,"markers",2),fs=gs([ni("gmap-cluster")],fs);var vs=Object.defineProperty,ys=Object.getOwnPropertyDescriptor,ws=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ys(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&vs(e,i,o),o};let xs=class extends Bt{constructor(){super(...arguments),this.zoom=0,this.visible=!0,this.motionTracking=!0,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback()}async firstUpdated(){await ai,this.createPanorama()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.panorama&&(t.has("position")&&this.position&&this.panorama.setPosition(this.position),t.has("pano")&&this.pano&&this.panorama.setPano(this.pano),t.has("zoom")&&void 0!==this.zoom&&this.panorama.setZoom(this.zoom),t.has("pov")&&this.pov&&this.panorama.setPov(this.pov),t.has("visible")&&this.panorama.setVisible(this.visible),t.has("motionTracking")&&this.panorama.setMotionTracking(this.motionTracking))}createPanorama(){if(!this.panoramaElement)return;const t={position:this.position,pano:this.pano,zoom:this.zoom,pov:this.pov,visible:this.visible,motionTracking:this.motionTracking,...this.options};this.panorama=new google.maps.StreetViewPanorama(this.panoramaElement,t),this.eventListeners=Pi(this.panorama,["closeclick","status_changed"],((t,e)=>{this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}))}cleanup(){Ti(this.eventListeners),this.panorama=void 0}resize(){this.panorama&&google.maps.event.trigger(this.panorama,"resize")}getPanorama(){return this.panorama}render(){return ft`<div class="panorama"></div>`}};xs.styles=N`
1007
+ `,Yi([Li({type:Boolean})],Ji.prototype,"opened",2),Yi([Li({type:Object})],Ji.prototype,"position",2),Yi([Li({type:Number})],Ji.prototype,"zIndex",2),Yi([Li({type:Object})],Ji.prototype,"options",2),Yi([Ei()],Ji.prototype,"infoWindow",2),Yi([Ei()],Ji.prototype,"map",2),Yi([Ei()],Ji.prototype,"marker",2),Ji=Yi([ni("gmap-info-window")],Ji);var Qi=Object.defineProperty,Xi=Object.getOwnPropertyDescriptor,ts=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?Xi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&Qi(e,i,o),o};let es=class extends Bt{constructor(){super(...arguments),this.path=[],this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initPolyline()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.polyline&&(t.has("path")&&this.path&&this.polyline.setPath(this.path),t.has("editable")&&this.polyline.setEditable(this.editable),t.has("draggable")&&this.polyline.setDraggable(this.draggable),t.has("options")&&this.polyline.setOptions(this.options))}async initPolyline(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createPolyline()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createPolyline()))}async createPolyline(){if(!this.map)return;const t={map:this.map,path:this.path,editable:this.editable,draggable:this.draggable,...this.options};this.polyline=new google.maps.Polyline(t),this.eventListeners=Pi(this.polyline,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],((t,e)=>{this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}));const e=google.maps.event.addListener(this.polyline.getPath(),"set_at",(()=>{this.emitPathChanged()})),i=google.maps.event.addListener(this.polyline.getPath(),"insert_at",(()=>{this.emitPathChanged()})),s=google.maps.event.addListener(this.polyline.getPath(),"remove_at",(()=>{this.emitPathChanged()}));this.eventListeners.push((()=>google.maps.event.removeListener(e)),(()=>google.maps.event.removeListener(i)),(()=>google.maps.event.removeListener(s)))}emitPathChanged(){if(!this.polyline)return;const t=this.polyline.getPath().getArray().map((t=>({lat:t.lat(),lng:t.lng()})));this.dispatchEvent(new CustomEvent("gmap-path-changed",{detail:t,bubbles:!0,composed:!0}))}cleanup(){Ti(this.eventListeners),this.polyline&&(this.polyline.setMap(null),this.polyline=void 0)}getPolyline(){return this.polyline}render(){return ft``}};ts([Li({type:Array})],es.prototype,"path",2),ts([Li({type:Boolean})],es.prototype,"editable",2),ts([Li({type:Boolean})],es.prototype,"draggable",2),ts([Li({type:Object})],es.prototype,"options",2),ts([Ei()],es.prototype,"polyline",2),ts([Ei()],es.prototype,"map",2),es=ts([ni("gmap-polyline")],es);var is=Object.defineProperty,ss=Object.getOwnPropertyDescriptor,rs=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ss(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&is(e,i,o),o};let os=class extends Bt{constructor(){super(...arguments),this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initPolygon()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.polygon&&(t.has("path")&&this.path&&this.polygon.setPath(this.path),t.has("paths")&&this.paths&&this.polygon.setPaths(this.paths),t.has("editable")&&this.polygon.setEditable(this.editable),t.has("draggable")&&this.polygon.setDraggable(this.draggable),t.has("options")&&this.polygon.setOptions(this.options))}async initPolygon(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createPolygon()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createPolygon()))}async createPolygon(){if(!this.map)return;const t={map:this.map,editable:this.editable,draggable:this.draggable,...this.options};this.paths?t.paths=this.paths:this.path&&(t.paths=this.path),this.polygon=new google.maps.Polygon(t),this.eventListeners=Pi(this.polygon,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],((t,e)=>{this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))})),this.paths?this.bindPathsChanges():this.bindPathChanges()}bindPathChanges(){if(!this.polygon)return;const t=this.polygon.getPath(),e=google.maps.event.addListener(t,"set_at",(()=>{this.emitPathChanged()})),i=google.maps.event.addListener(t,"insert_at",(()=>{this.emitPathChanged()})),s=google.maps.event.addListener(t,"remove_at",(()=>{this.emitPathChanged()}));this.eventListeners.push((()=>google.maps.event.removeListener(e)),(()=>google.maps.event.removeListener(i)),(()=>google.maps.event.removeListener(s)))}bindPathsChanges(){this.polygon&&this.polygon.getPaths().forEach((t=>{const e=google.maps.event.addListener(t,"set_at",(()=>{this.emitPathsChanged()})),i=google.maps.event.addListener(t,"insert_at",(()=>{this.emitPathsChanged()})),s=google.maps.event.addListener(t,"remove_at",(()=>{this.emitPathsChanged()}));this.eventListeners.push((()=>google.maps.event.removeListener(e)),(()=>google.maps.event.removeListener(i)),(()=>google.maps.event.removeListener(s)))}))}emitPathChanged(){if(!this.polygon)return;const t=this.polygon.getPath().getArray().map((t=>({lat:t.lat(),lng:t.lng()})));this.dispatchEvent(new CustomEvent("gmap-path-changed",{detail:t,bubbles:!0,composed:!0}))}emitPathsChanged(){if(!this.polygon)return;const t=this.polygon.getPaths().getArray().map((t=>t.getArray().map((t=>({lat:t.lat(),lng:t.lng()})))));this.dispatchEvent(new CustomEvent("gmap-paths-changed",{detail:t,bubbles:!0,composed:!0}))}cleanup(){Ti(this.eventListeners),this.polygon&&(this.polygon.setMap(null),this.polygon=void 0)}getPolygon(){return this.polygon}render(){return ft``}};rs([Li({type:Array})],os.prototype,"path",2),rs([Li({type:Array})],os.prototype,"paths",2),rs([Li({type:Boolean})],os.prototype,"editable",2),rs([Li({type:Boolean})],os.prototype,"draggable",2),rs([Li({type:Object})],os.prototype,"options",2),rs([Ei()],os.prototype,"polygon",2),rs([Ei()],os.prototype,"map",2),os=rs([ni("gmap-polygon")],os);var as=Object.defineProperty,ns=Object.getOwnPropertyDescriptor,ls=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ns(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&as(e,i,o),o};let hs=class extends Bt{constructor(){super(...arguments),this.radius=1e3,this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initCircle()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.circle&&(t.has("center")&&this.center&&this.circle.setCenter(this.center),t.has("radius")&&void 0!==this.radius&&this.circle.setRadius(this.radius),t.has("editable")&&this.circle.setEditable(this.editable),t.has("draggable")&&this.circle.setDraggable(this.draggable),t.has("options")&&this.circle.setOptions(this.options))}async initCircle(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createCircle()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createCircle()))}async createCircle(){if(!this.map)return;const t={map:this.map,center:this.center,radius:this.radius,editable:this.editable,draggable:this.draggable,...this.options};this.circle=new google.maps.Circle(t),this.eventListeners=Pi(this.circle,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick","center_changed","radius_changed","bounds_changed"],((t,e)=>{if("center_changed"===t){const e=this.circle.getCenter(),i=e?{lat:e.lat(),lng:e.lng()}:null;this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}else if("radius_changed"===t){const e=this.circle.getRadius();this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}else this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}))}cleanup(){Ti(this.eventListeners),this.circle&&(this.circle.setMap(null),this.circle=void 0)}getCircle(){return this.circle}render(){return ft``}};ls([Li({type:Object})],hs.prototype,"center",2),ls([Li({type:Number})],hs.prototype,"radius",2),ls([Li({type:Boolean})],hs.prototype,"editable",2),ls([Li({type:Boolean})],hs.prototype,"draggable",2),ls([Li({type:Object})],hs.prototype,"options",2),ls([Ei()],hs.prototype,"circle",2),ls([Ei()],hs.prototype,"map",2),hs=ls([ni("gmap-circle")],hs);var ds=Object.defineProperty,cs=Object.getOwnPropertyDescriptor,us=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?cs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&ds(e,i,o),o};let ps=class extends Bt{constructor(){super(...arguments),this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initRectangle()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.rectangle&&(t.has("bounds")&&this.bounds&&this.rectangle.setBounds(this.bounds),t.has("editable")&&this.rectangle.setEditable(this.editable),t.has("draggable")&&this.rectangle.setDraggable(this.draggable),t.has("options")&&this.rectangle.setOptions(this.options))}async initRectangle(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createRectangle()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createRectangle()))}async createRectangle(){if(!this.map)return;const t={map:this.map,bounds:this.bounds,editable:this.editable,draggable:this.draggable,...this.options};this.rectangle=new google.maps.Rectangle(t),this.eventListeners=Pi(this.rectangle,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick","bounds_changed"],((t,e)=>{if("bounds_changed"===t){const e=this.rectangle.getBounds();if(e){const i={north:e.getNorthEast().lat(),south:e.getSouthWest().lat(),east:e.getNorthEast().lng(),west:e.getSouthWest().lng()};this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}}else this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}))}cleanup(){Ti(this.eventListeners),this.rectangle&&(this.rectangle.setMap(null),this.rectangle=void 0)}getRectangle(){return this.rectangle}render(){return ft``}};us([Li({type:Object})],ps.prototype,"bounds",2),us([Li({type:Boolean})],ps.prototype,"editable",2),us([Li({type:Boolean})],ps.prototype,"draggable",2),us([Li({type:Object})],ps.prototype,"options",2),us([Ei()],ps.prototype,"rectangle",2),us([Ei()],ps.prototype,"map",2),ps=us([ni("gmap-rectangle")],ps);var bs=Object.defineProperty,ms=Object.getOwnPropertyDescriptor,gs=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ms(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&bs(e,i,o),o};let fs=class extends Bt{constructor(){super(...arguments),this.gridSize=60,this.markers=[]}async connectedCallback(){super.connectedCallback(),await this.initCluster()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}async initCluster(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createCluster()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createCluster())),this.addEventListener("gmap-marker-ready",(t=>{this.addMarker(t.detail.marker)}))}async createCluster(){if(this.map)try{const t=await import("./p-BkPzCq-C.js").catch((()=>null));if(!t)return void console.error("GMapCluster: @googlemaps/markerclusterer not found. Install with: npm install @googlemaps/markerclusterer");const{MarkerClusterer:e}=t,i={map:this.map,markers:this.markers};this.gridSize&&(i.gridSize=this.gridSize),void 0!==this.maxZoom&&(i.maxZoom=this.maxZoom),this.styles&&(i.styles=this.styles),this.calculator&&(i.calculator=this.calculator),this.markerClusterer=new e(i)}catch(t){console.error("GMapCluster: Error creating cluster:",t)}}addMarker(t){this.markers.includes(t)||(this.markers.push(t),this.markerClusterer&&this.markerClusterer.addMarker(t))}cleanup(){this.markerClusterer&&(this.markerClusterer.clearMarkers(),this.markerClusterer=void 0),this.markers=[]}getClusterer(){return this.markerClusterer}render(){return ft`<slot></slot>`}};gs([Li({type:Number})],fs.prototype,"gridSize",2),gs([Li({type:Number})],fs.prototype,"maxZoom",2),gs([Li({type:Array})],fs.prototype,"styles",2),gs([Li({type:Function})],fs.prototype,"calculator",2),gs([Ei()],fs.prototype,"map",2),gs([Ei()],fs.prototype,"markerClusterer",2),gs([Ei()],fs.prototype,"markers",2),fs=gs([ni("gmap-cluster")],fs);var vs=Object.defineProperty,ys=Object.getOwnPropertyDescriptor,ws=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?ys(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&vs(e,i,o),o};let xs=class extends Bt{constructor(){super(...arguments),this.zoom=0,this.visible=!0,this.motionTracking=!0,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback()}async firstUpdated(){await ai,this.createPanorama()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.panorama&&(t.has("position")&&this.position&&this.panorama.setPosition(this.position),t.has("pano")&&this.pano&&this.panorama.setPano(this.pano),t.has("zoom")&&void 0!==this.zoom&&this.panorama.setZoom(this.zoom),t.has("pov")&&this.pov&&this.panorama.setPov(this.pov),t.has("visible")&&this.panorama.setVisible(this.visible),t.has("motionTracking")&&this.panorama.setMotionTracking(this.motionTracking))}createPanorama(){if(!this.panoramaElement)return;const t={position:this.position,pano:this.pano,zoom:this.zoom,pov:this.pov,visible:this.visible,motionTracking:this.motionTracking,...this.options};this.panorama=new google.maps.StreetViewPanorama(this.panoramaElement,t),this.eventListeners=Pi(this.panorama,["closeclick","status_changed"],((t,e)=>{this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}))}cleanup(){Ti(this.eventListeners),this.panorama=void 0}resize(){this.panorama&&google.maps.event.trigger(this.panorama,"resize")}getPanorama(){return this.panorama}render(){return ft`<div class="panorama"></div>`}};xs.styles=D`
1008
1008
  :host {
1009
1009
  display: block;
1010
1010
  position: relative;