@zonos/elements 1.3.15-alpha.3 → 1.3.15

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 (373) hide show
  1. package/dist/cjs/RemoveIcon-6c79a2a1.js +5 -0
  2. package/dist/cjs/{cart-1b1d39af.js → cart-db549f04.js} +976 -138
  3. package/dist/cjs/containsNonLatinChars-2be5129b.js +24 -0
  4. package/dist/cjs/{getBorderRadius-c8cc2bb3.js → getBorderRadius-44b3eca1.js} +4 -6
  5. package/dist/cjs/index-654a6001.js +1361 -0
  6. package/dist/cjs/isCheckoutMobile-f491ca7c.js +8 -0
  7. package/dist/cjs/{isDarkColor-f5473002.js → isDarkColor-01f45d3f.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/cjs/{submitGtag-ab287a34.js → submitGtag-fd8acad5.js} +21 -2
  10. package/dist/cjs/zonos-address_8.cjs.entry.js +642 -0
  11. package/dist/cjs/zonos-badge_2.cjs.entry.js +7 -7
  12. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  13. package/dist/cjs/{zonos-button_2.cjs.entry.js → zonos-button_3.cjs.entry.js} +53 -13
  14. package/dist/cjs/zonos-card_2.cjs.entry.js +10 -10
  15. package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_9.cjs.entry.js} +135 -109
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +18 -17
  17. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  19. package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
  20. package/dist/cjs/zonos-country-select_3.cjs.entry.js +12 -12
  21. package/dist/cjs/zonos-elements.cjs.js +10 -10
  22. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +8 -8
  23. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  24. package/dist/cjs/zonos-input.cjs.entry.js +57 -0
  25. package/dist/cjs/zonos-link.cjs.entry.js +2 -2
  26. package/dist/cjs/zonos-logo.cjs.entry.js +4 -4
  27. package/dist/cjs/zonos-notification.cjs.entry.js +4 -4
  28. package/dist/cjs/zonos-payment.cjs.entry.js +6 -6
  29. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +6 -6
  30. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +7 -5
  31. package/dist/cjs/zonos-text.cjs.entry.js +3 -2
  32. package/dist/cjs/{zonosStore-aee974e0.js → zonosStore-d8bb0bda.js} +1 -1
  33. package/dist/collection/collection-manifest.json +5 -1
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.css +62 -0
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +80 -0
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.css +59 -0
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +148 -0
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.css +115 -0
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +429 -0
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -3
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +6 -4
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +135 -20
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
  46. package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
  47. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  48. package/dist/collection/components/common/zonos-button/zonos-button.css +1 -0
  49. package/dist/collection/components/common/zonos-button/zonos-button.js +17 -8
  50. package/dist/collection/components/common/zonos-card/zonos-card.js +3 -3
  51. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +1 -0
  52. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +22 -4
  53. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  54. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  55. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  56. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  57. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +3 -3
  58. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +6 -4
  59. package/dist/collection/components/common/zonos-input/zonos-input.css +176 -0
  60. package/dist/collection/components/common/zonos-input/zonos-input.js +193 -0
  61. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  62. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  63. package/dist/collection/components/common/zonos-notification/zonos-notification.js +2 -2
  64. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  65. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +4 -2
  66. package/dist/collection/components/common/zonos-text/zonos-text.js +1 -0
  67. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  68. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  69. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  70. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +7 -8
  71. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  72. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
  73. package/dist/collection/components/main/zonos-controller.js +2 -2
  74. package/dist/collection/components/store/checkout/stripe.js +153 -14
  75. package/dist/collection/components/store/translationStore/strings.arabic.js +36 -6
  76. package/dist/collection/components/store/translationStore/strings.base.js +36 -6
  77. package/dist/collection/components/store/translationStore/strings.chinese.js +36 -6
  78. package/dist/collection/components/store/translationStore/strings.danish.js +36 -6
  79. package/dist/collection/components/store/translationStore/strings.dutch.js +36 -6
  80. package/dist/collection/components/store/translationStore/strings.french.js +36 -6
  81. package/dist/collection/components/store/translationStore/strings.german.js +36 -6
  82. package/dist/collection/components/store/translationStore/strings.hebrew.js +36 -6
  83. package/dist/collection/components/store/translationStore/strings.indonesian.js +36 -6
  84. package/dist/collection/components/store/translationStore/strings.italian.js +36 -6
  85. package/dist/collection/components/store/translationStore/strings.japanese.js +36 -6
  86. package/dist/collection/components/store/translationStore/strings.korean.js +36 -6
  87. package/dist/collection/components/store/translationStore/strings.norwegian.js +36 -6
  88. package/dist/collection/components/store/translationStore/strings.polish.js +36 -6
  89. package/dist/collection/components/store/translationStore/strings.portuguese.js +36 -6
  90. package/dist/collection/components/store/translationStore/strings.russian.js +36 -6
  91. package/dist/collection/components/store/translationStore/strings.spanish.js +36 -6
  92. package/dist/collection/components/store/translationStore/strings.swedish.js +36 -6
  93. package/dist/collection/components/store/translationStore/strings.turkish.js +36 -6
  94. package/dist/collection/components/store/translationStore/strings.vietnamese.js +36 -6
  95. package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -71
  96. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +29 -5
  97. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  98. package/dist/collection/components/utils/checkout/buildTranslateRequestBody.js +98 -0
  99. package/dist/collection/components/utils/containsNonLatinChars.js +10 -8
  100. package/dist/collection/components/utils/getBorderRadius.js +3 -5
  101. package/dist/collection/styles/stripe/defaultVariable.js +2 -2
  102. package/dist/collection/types/checkout/TranslatedText.js +1 -0
  103. package/dist/collection/types/checkout/api/ValidateAddressRequest.js +1 -0
  104. package/dist/components/containsNonLatinChars.js +21 -0
  105. package/dist/components/getBorderRadius.js +3 -5
  106. package/dist/components/stripe.js +255 -4545
  107. package/dist/components/trackConversionEvent.js +1 -1
  108. package/dist/components/translationStore.js +5131 -0
  109. package/dist/components/zonos-address-display.d.ts +11 -0
  110. package/dist/components/zonos-address-display.js +6 -0
  111. package/dist/components/zonos-address-display2.js +64 -0
  112. package/dist/components/zonos-address-form.d.ts +11 -0
  113. package/dist/components/zonos-address-form.js +6 -0
  114. package/dist/components/zonos-address-form2.js +84 -0
  115. package/dist/components/zonos-address-update-dialog.d.ts +11 -0
  116. package/dist/components/zonos-address-update-dialog.js +6 -0
  117. package/dist/components/zonos-address-update-dialog2.js +264 -0
  118. package/dist/components/zonos-address2.js +3 -93
  119. package/dist/components/zonos-badge2.js +3 -3
  120. package/dist/components/zonos-button2.js +18 -9
  121. package/dist/components/zonos-card2.js +3 -3
  122. package/dist/components/zonos-cart-items2.js +1 -1
  123. package/dist/components/zonos-cart-subtotal2.js +2 -1
  124. package/dist/components/zonos-checkbox2.js +15 -6
  125. package/dist/components/zonos-checkout-finish2.js +26 -6
  126. package/dist/components/zonos-checkout-footer2.js +2 -2
  127. package/dist/components/zonos-checkout-payment2.js +2 -1
  128. package/dist/components/zonos-checkout-progress-tabs2.js +5 -4
  129. package/dist/components/zonos-checkout.js +71 -41
  130. package/dist/components/zonos-collapse2.js +2 -2
  131. package/dist/components/zonos-component.js +1 -1
  132. package/dist/components/zonos-controller.js +2 -2
  133. package/dist/components/zonos-country-select2.js +2 -2
  134. package/dist/components/zonos-custom-message2.js +2 -2
  135. package/dist/components/zonos-customer-info2.js +170 -29
  136. package/dist/components/zonos-dialog2.js +7 -5
  137. package/dist/components/zonos-hello-dialog-footer2.js +3 -3
  138. package/dist/components/zonos-hello-dialog2.js +5 -4
  139. package/dist/components/zonos-hello.js +2 -1
  140. package/dist/components/zonos-input.d.ts +11 -0
  141. package/dist/components/zonos-input.js +6 -0
  142. package/dist/components/zonos-input2.js +78 -0
  143. package/dist/components/zonos-language-select2.js +4 -3
  144. package/dist/components/zonos-link-authentication2.js +12 -5
  145. package/dist/components/zonos-link.js +1 -1
  146. package/dist/components/zonos-logo.js +2 -2
  147. package/dist/components/zonos-notification2.js +2 -2
  148. package/dist/components/zonos-payment2.js +1 -1
  149. package/dist/components/zonos-review2.js +2 -1
  150. package/dist/components/zonos-select-dialog-header2.js +2 -2
  151. package/dist/components/zonos-shipping-rich-radio2.js +4 -2
  152. package/dist/components/zonos-shipping2.js +3 -2
  153. package/dist/components/zonos-text2.js +1 -0
  154. package/dist/components/zonos-tooltip2.js +2 -2
  155. package/dist/components/zonos-v-stack2.js +2 -2
  156. package/dist/esm/RemoveIcon-f6715b36.js +3 -0
  157. package/dist/esm/{cart-10bcd2e0.js → cart-462e89a6.js} +976 -139
  158. package/dist/esm/containsNonLatinChars-2d8810c3.js +21 -0
  159. package/dist/esm/{getBorderRadius-8129b0cb.js → getBorderRadius-567f1786.js} +4 -6
  160. package/dist/esm/index-e063389c.js +1328 -0
  161. package/dist/esm/isCheckoutMobile-8846dccb.js +6 -0
  162. package/dist/esm/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
  163. package/dist/esm/loader.js +3 -3
  164. package/dist/esm/{submitGtag-84886899.js → submitGtag-ac7c3c89.js} +21 -3
  165. package/dist/esm/zonos-address_8.entry.js +631 -0
  166. package/dist/esm/zonos-badge_2.entry.js +7 -7
  167. package/dist/esm/zonos-banner.entry.js +2 -2
  168. package/dist/esm/{zonos-button_2.entry.js → zonos-button_3.entry.js} +53 -14
  169. package/dist/esm/zonos-card_2.entry.js +10 -10
  170. package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_9.entry.js} +131 -104
  171. package/dist/esm/zonos-checkout.entry.js +13 -12
  172. package/dist/esm/zonos-component.entry.js +2 -2
  173. package/dist/esm/zonos-controller.entry.js +6 -6
  174. package/dist/esm/zonos-country-flag.entry.js +5 -5
  175. package/dist/esm/zonos-country-select_3.entry.js +12 -12
  176. package/dist/esm/zonos-elements.js +11 -11
  177. package/dist/esm/zonos-hello-dialog.entry.js +8 -8
  178. package/dist/esm/zonos-hello.entry.js +5 -5
  179. package/dist/esm/zonos-input.entry.js +53 -0
  180. package/dist/esm/zonos-link.entry.js +2 -2
  181. package/dist/esm/zonos-logo.entry.js +4 -4
  182. package/dist/esm/zonos-notification.entry.js +4 -4
  183. package/dist/esm/zonos-payment.entry.js +6 -6
  184. package/dist/esm/zonos-select-dialog-header_2.entry.js +6 -6
  185. package/dist/esm/zonos-shipping-rich-radio.entry.js +7 -5
  186. package/dist/esm/zonos-text.entry.js +3 -2
  187. package/dist/esm/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
  188. package/dist/esm-es5/RemoveIcon-f6715b36.js +1 -0
  189. package/dist/esm-es5/cart-462e89a6.js +1 -0
  190. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
  191. package/dist/esm-es5/getBorderRadius-567f1786.js +1 -0
  192. package/dist/esm-es5/index-e063389c.js +2 -0
  193. package/dist/esm-es5/isCheckoutMobile-8846dccb.js +1 -0
  194. package/dist/esm-es5/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
  195. package/dist/esm-es5/loader.js +1 -1
  196. package/dist/esm-es5/submitGtag-ac7c3c89.js +1 -0
  197. package/dist/esm-es5/zonos-address_8.entry.js +1 -0
  198. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  199. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  200. package/dist/esm-es5/zonos-button_3.entry.js +1 -0
  201. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  202. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -0
  203. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  204. package/dist/esm-es5/zonos-component.entry.js +1 -1
  205. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  206. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  207. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  208. package/dist/esm-es5/zonos-elements.js +1 -1
  209. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  210. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  211. package/dist/esm-es5/zonos-input.entry.js +1 -0
  212. package/dist/esm-es5/zonos-link.entry.js +1 -1
  213. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  214. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  215. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  216. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  217. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  218. package/dist/esm-es5/zonos-text.entry.js +1 -1
  219. package/dist/esm-es5/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
  220. package/dist/scripts/loadStripe.js +1 -1
  221. package/dist/scripts/loadZonos.js +1 -1
  222. package/dist/scripts/stripe.js +1 -1
  223. package/dist/scripts/zonos.js +1 -1
  224. package/dist/scripts/zonosBase.js +1 -1
  225. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.d.ts +12 -0
  226. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.d.ts +28 -0
  227. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.d.ts +96 -0
  228. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +22 -2
  229. package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -0
  230. package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +0 -3
  231. package/dist/types/components/common/zonos-input/zonos-input.d.ts +35 -0
  232. package/dist/types/components/store/checkout/stripe.d.ts +25 -1
  233. package/dist/types/components/store/translationStore/strings.arabic.d.ts +35 -5
  234. package/dist/types/components/store/translationStore/strings.base.d.ts +35 -5
  235. package/dist/types/components/store/translationStore/strings.chinese.d.ts +35 -5
  236. package/dist/types/components/store/translationStore/strings.danish.d.ts +35 -5
  237. package/dist/types/components/store/translationStore/strings.dutch.d.ts +35 -5
  238. package/dist/types/components/store/translationStore/strings.french.d.ts +35 -5
  239. package/dist/types/components/store/translationStore/strings.german.d.ts +35 -5
  240. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +35 -5
  241. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +35 -5
  242. package/dist/types/components/store/translationStore/strings.italian.d.ts +35 -5
  243. package/dist/types/components/store/translationStore/strings.japanese.d.ts +35 -5
  244. package/dist/types/components/store/translationStore/strings.korean.d.ts +35 -5
  245. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +35 -5
  246. package/dist/types/components/store/translationStore/strings.polish.d.ts +35 -5
  247. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +35 -5
  248. package/dist/types/components/store/translationStore/strings.russian.d.ts +35 -5
  249. package/dist/types/components/store/translationStore/strings.spanish.d.ts +35 -5
  250. package/dist/types/components/store/translationStore/strings.swedish.d.ts +35 -5
  251. package/dist/types/components/store/translationStore/strings.turkish.d.ts +35 -5
  252. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +35 -5
  253. package/dist/types/components/store/translationStore.d.ts +1 -1
  254. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -10
  255. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +4 -0
  256. package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
  257. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
  258. package/dist/types/components/utils/checkout/buildTranslateRequestBody.d.ts +26 -0
  259. package/dist/types/components/utils/containsNonLatinChars.d.ts +1 -0
  260. package/dist/types/components/utils/getBorderRadius.d.ts +7 -1
  261. package/dist/types/components.d.ts +308 -6
  262. package/dist/types/types/checkout/TranslatedText.d.ts +23 -0
  263. package/dist/types/types/checkout/api/ValidateAddressRequest.d.ts +20 -0
  264. package/dist/types/types/generated/graphql.customer.types.d.ts +2 -0
  265. package/dist/types/types/generated/graphql.customer.types.ts +2 -0
  266. package/dist/zonos-elements/{p-593948b5.system.entry.js → p-029f11dd.system.entry.js} +1 -1
  267. package/dist/zonos-elements/{p-af8391bb.entry.js → p-094c0ee8.entry.js} +1 -1
  268. package/dist/zonos-elements/p-0c64dbbb.js +1 -0
  269. package/dist/zonos-elements/p-11504442.entry.js +1 -0
  270. package/dist/zonos-elements/p-11bef836.system.entry.js +1 -0
  271. package/dist/zonos-elements/{p-bc3a0f7c.entry.js → p-11f1b78c.entry.js} +1 -1
  272. package/dist/zonos-elements/p-13ddaf31.js +2 -0
  273. package/dist/zonos-elements/p-154aaf95.system.js +1 -0
  274. package/dist/zonos-elements/p-163ff5b5.system.js +2 -0
  275. package/dist/zonos-elements/{p-5ee8a685.entry.js → p-1e934274.entry.js} +1 -1
  276. package/dist/zonos-elements/p-20582e58.system.entry.js +1 -0
  277. package/dist/zonos-elements/{p-bfa8d9a4.system.entry.js → p-2439c82f.system.entry.js} +1 -1
  278. package/dist/zonos-elements/p-2670438c.system.js +1 -0
  279. package/dist/zonos-elements/p-321226b0.entry.js +1 -0
  280. package/dist/zonos-elements/{p-d149bc5d.system.entry.js → p-3221530d.system.entry.js} +1 -1
  281. package/dist/zonos-elements/{p-e9fafda6.entry.js → p-32d27535.entry.js} +1 -1
  282. package/dist/zonos-elements/p-3d10866d.entry.js +1 -0
  283. package/dist/zonos-elements/{p-1a5f8df7.entry.js → p-3d8667a7.entry.js} +1 -1
  284. package/dist/zonos-elements/p-3f05d130.system.entry.js +1 -0
  285. package/dist/zonos-elements/p-430eefd4.entry.js +1 -0
  286. package/dist/zonos-elements/{p-fc35d717.system.entry.js → p-49825866.system.entry.js} +1 -1
  287. package/dist/zonos-elements/p-5525b740.entry.js +1 -0
  288. package/dist/zonos-elements/p-578f0aad.system.js +1 -0
  289. package/dist/zonos-elements/{p-3e417d7c.entry.js → p-58a8ef6c.entry.js} +1 -1
  290. package/dist/zonos-elements/p-5d993965.js +1 -0
  291. package/dist/zonos-elements/{p-262b8e1e.system.entry.js → p-5f9c066d.system.entry.js} +1 -1
  292. package/dist/zonos-elements/{p-49120f0e.system.entry.js → p-60e262f0.system.entry.js} +1 -1
  293. package/dist/zonos-elements/p-64b594f4.js +1 -0
  294. package/dist/zonos-elements/{p-7891f8d2.entry.js → p-66471df6.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-95c864ca.system.entry.js → p-679877b1.system.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-fc4da55c.system.js → p-771fbeb3.system.js} +1 -1
  297. package/dist/zonos-elements/p-79f3c4f5.system.js +1 -0
  298. package/dist/zonos-elements/{p-e1ac5b2a.system.entry.js → p-80d78980.system.entry.js} +1 -1
  299. package/dist/zonos-elements/p-81a54668.js +1 -0
  300. package/dist/zonos-elements/p-83cc2936.js +1 -0
  301. package/dist/zonos-elements/{p-520e8e63.system.js → p-87badea9.system.js} +1 -1
  302. package/dist/zonos-elements/p-8a61a04f.system.entry.js +1 -0
  303. package/dist/zonos-elements/p-8b32f560.system.entry.js +1 -0
  304. package/dist/zonos-elements/{p-d01576d7.js → p-909a331c.js} +1 -1
  305. package/dist/zonos-elements/{p-031086ba.system.entry.js → p-94b15a5e.system.entry.js} +1 -1
  306. package/dist/zonos-elements/{p-9768840a.system.entry.js → p-9a45fae5.system.entry.js} +1 -1
  307. package/dist/zonos-elements/{p-24fee841.entry.js → p-9ec93319.entry.js} +1 -1
  308. package/dist/zonos-elements/p-a6d7ac46.js +1 -0
  309. package/dist/zonos-elements/{p-2a99c8b5.system.entry.js → p-a6eeb4bd.system.entry.js} +1 -1
  310. package/dist/zonos-elements/{p-1950dda7.entry.js → p-a93f2e84.entry.js} +1 -1
  311. package/dist/zonos-elements/p-aed0098c.system.js +1 -0
  312. package/dist/zonos-elements/{p-92446677.entry.js → p-b19d51e0.entry.js} +1 -1
  313. package/dist/zonos-elements/{p-46f9c93e.system.entry.js → p-b9652402.system.entry.js} +1 -1
  314. package/dist/zonos-elements/{p-d3772fd3.entry.js → p-baee62a4.entry.js} +1 -1
  315. package/dist/zonos-elements/{p-eff12c31.system.entry.js → p-bf32179a.system.entry.js} +1 -1
  316. package/dist/zonos-elements/p-cd1cc224.entry.js +1 -0
  317. package/dist/zonos-elements/{p-ae4a4634.system.entry.js → p-d1b63cec.system.entry.js} +1 -1
  318. package/dist/zonos-elements/p-d6b103d5.system.js +1 -0
  319. package/dist/zonos-elements/{p-376bdf70.entry.js → p-da6767d8.entry.js} +1 -1
  320. package/dist/zonos-elements/p-dde1383b.entry.js +1 -0
  321. package/dist/zonos-elements/p-df192668.system.js +1 -0
  322. package/dist/zonos-elements/{p-70ede197.system.entry.js → p-df24d548.system.entry.js} +1 -1
  323. package/dist/zonos-elements/{p-6743734f.entry.js → p-e7b4b756.entry.js} +1 -1
  324. package/dist/zonos-elements/{p-d41b5762.js → p-f1962041.js} +1 -1
  325. package/dist/zonos-elements/{p-a0abc499.system.entry.js → p-f3d3c754.system.entry.js} +1 -1
  326. package/dist/zonos-elements/p-f79682b5.entry.js +1 -0
  327. package/dist/zonos-elements/zonos-elements.css +3 -3
  328. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  329. package/dist/zonos-elements/zonos-elements.js +1 -1
  330. package/package.json +3 -2
  331. package/dist/cjs/index-3b4816ef.js +0 -2088
  332. package/dist/cjs/sendErrorLog-29e50f7e.js +0 -29
  333. package/dist/cjs/zonos-address_4.cjs.entry.js +0 -388
  334. package/dist/cjs/zonos-icon.cjs.entry.js +0 -39
  335. package/dist/components/sendErrorLog.js +0 -21
  336. package/dist/esm/index-0e31d804.js +0 -2055
  337. package/dist/esm/sendErrorLog-8642e94a.js +0 -26
  338. package/dist/esm/zonos-address_4.entry.js +0 -381
  339. package/dist/esm/zonos-icon.entry.js +0 -35
  340. package/dist/esm-es5/cart-10bcd2e0.js +0 -1
  341. package/dist/esm-es5/getBorderRadius-8129b0cb.js +0 -1
  342. package/dist/esm-es5/index-0e31d804.js +0 -2
  343. package/dist/esm-es5/sendErrorLog-8642e94a.js +0 -1
  344. package/dist/esm-es5/submitGtag-84886899.js +0 -1
  345. package/dist/esm-es5/zonos-address_4.entry.js +0 -1
  346. package/dist/esm-es5/zonos-button_2.entry.js +0 -1
  347. package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
  348. package/dist/esm-es5/zonos-icon.entry.js +0 -1
  349. package/dist/scripts/insertTranslations.js +0 -1
  350. package/dist/zonos-elements/p-0253aeae.entry.js +0 -1
  351. package/dist/zonos-elements/p-1264b362.entry.js +0 -1
  352. package/dist/zonos-elements/p-2244534c.js +0 -2
  353. package/dist/zonos-elements/p-2825570c.system.js +0 -2
  354. package/dist/zonos-elements/p-33abdb30.js +0 -1
  355. package/dist/zonos-elements/p-450942a3.system.js +0 -1
  356. package/dist/zonos-elements/p-48a2b8b0.entry.js +0 -1
  357. package/dist/zonos-elements/p-5ca09163.entry.js +0 -1
  358. package/dist/zonos-elements/p-5ff27485.js +0 -1
  359. package/dist/zonos-elements/p-6d9dbecb.system.entry.js +0 -1
  360. package/dist/zonos-elements/p-6e8d43de.entry.js +0 -1
  361. package/dist/zonos-elements/p-6f5761e8.js +0 -1
  362. package/dist/zonos-elements/p-78d22069.system.entry.js +0 -1
  363. package/dist/zonos-elements/p-8b44e558.system.js +0 -1
  364. package/dist/zonos-elements/p-8bc0e56a.system.entry.js +0 -1
  365. package/dist/zonos-elements/p-9350d19f.entry.js +0 -1
  366. package/dist/zonos-elements/p-9e8f1065.system.entry.js +0 -1
  367. package/dist/zonos-elements/p-a6bbf6de.system.entry.js +0 -1
  368. package/dist/zonos-elements/p-b8e8330b.system.js +0 -1
  369. package/dist/zonos-elements/p-be022d8e.entry.js +0 -1
  370. package/dist/zonos-elements/p-c6170bec.system.js +0 -1
  371. package/dist/zonos-elements/p-e705c44c.entry.js +0 -1
  372. package/dist/zonos-elements/p-ed2e94d2.js +0 -1
  373. package/dist/zonos-elements/p-f4c38bfc.system.js +0 -1
@@ -0,0 +1,1328 @@
1
+ const NAMESPACE = 'zonos-elements';
2
+
3
+ /*
4
+ Stencil Client Platform v4.18.0 | MIT Licensed | https://stenciljs.com
5
+ */
6
+ var __defProp = Object.defineProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+
12
+ // src/runtime/asset-path.ts
13
+ var getAssetPath = (path) => {
14
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
15
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
16
+ };
17
+
18
+ // src/utils/constants.ts
19
+ var EMPTY_OBJ = {};
20
+ var SVG_NS = "http://www.w3.org/2000/svg";
21
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
22
+
23
+ // src/utils/helpers.ts
24
+ var isDef = (v) => v != null;
25
+ var isComplexType = (o) => {
26
+ o = typeof o;
27
+ return o === "object" || o === "function";
28
+ };
29
+
30
+ // src/utils/query-nonce-meta-tag-content.ts
31
+ function queryNonceMetaTagContent(doc2) {
32
+ var _a, _b, _c;
33
+ return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
34
+ }
35
+
36
+ // src/utils/result.ts
37
+ var result_exports = {};
38
+ __export(result_exports, {
39
+ err: () => err,
40
+ map: () => map,
41
+ ok: () => ok,
42
+ unwrap: () => unwrap,
43
+ unwrapErr: () => unwrapErr
44
+ });
45
+ var ok = (value) => ({
46
+ isOk: true,
47
+ isErr: false,
48
+ value
49
+ });
50
+ var err = (value) => ({
51
+ isOk: false,
52
+ isErr: true,
53
+ value
54
+ });
55
+ function map(result, fn) {
56
+ if (result.isOk) {
57
+ const val = fn(result.value);
58
+ if (val instanceof Promise) {
59
+ return val.then((newVal) => ok(newVal));
60
+ } else {
61
+ return ok(val);
62
+ }
63
+ }
64
+ if (result.isErr) {
65
+ const value = result.value;
66
+ return err(value);
67
+ }
68
+ throw "should never get here";
69
+ }
70
+ var unwrap = (result) => {
71
+ if (result.isOk) {
72
+ return result.value;
73
+ } else {
74
+ throw result.value;
75
+ }
76
+ };
77
+ var unwrapErr = (result) => {
78
+ if (result.isErr) {
79
+ return result.value;
80
+ } else {
81
+ throw result.value;
82
+ }
83
+ };
84
+ var createTime = (fnName, tagName = "") => {
85
+ {
86
+ return () => {
87
+ return;
88
+ };
89
+ }
90
+ };
91
+ var uniqueTime = (key, measureText) => {
92
+ {
93
+ return () => {
94
+ return;
95
+ };
96
+ }
97
+ };
98
+ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
99
+ var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
100
+ var h = (nodeName, vnodeData, ...children) => {
101
+ let child = null;
102
+ let key = null;
103
+ let simple = false;
104
+ let lastSimple = false;
105
+ const vNodeChildren = [];
106
+ const walk = (c) => {
107
+ for (let i2 = 0; i2 < c.length; i2++) {
108
+ child = c[i2];
109
+ if (Array.isArray(child)) {
110
+ walk(child);
111
+ } else if (child != null && typeof child !== "boolean") {
112
+ if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
113
+ child = String(child);
114
+ }
115
+ if (simple && lastSimple) {
116
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
117
+ } else {
118
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
119
+ }
120
+ lastSimple = simple;
121
+ }
122
+ }
123
+ };
124
+ walk(children);
125
+ if (vnodeData) {
126
+ if (vnodeData.key) {
127
+ key = vnodeData.key;
128
+ }
129
+ {
130
+ const classData = vnodeData.className || vnodeData.class;
131
+ if (classData) {
132
+ vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
133
+ }
134
+ }
135
+ }
136
+ if (typeof nodeName === "function") {
137
+ return nodeName(
138
+ vnodeData === null ? {} : vnodeData,
139
+ vNodeChildren,
140
+ vdomFnUtils
141
+ );
142
+ }
143
+ const vnode = newVNode(nodeName, null);
144
+ vnode.$attrs$ = vnodeData;
145
+ if (vNodeChildren.length > 0) {
146
+ vnode.$children$ = vNodeChildren;
147
+ }
148
+ {
149
+ vnode.$key$ = key;
150
+ }
151
+ return vnode;
152
+ };
153
+ var newVNode = (tag, text) => {
154
+ const vnode = {
155
+ $flags$: 0,
156
+ $tag$: tag,
157
+ $text$: text,
158
+ $elm$: null,
159
+ $children$: null
160
+ };
161
+ {
162
+ vnode.$attrs$ = null;
163
+ }
164
+ {
165
+ vnode.$key$ = null;
166
+ }
167
+ return vnode;
168
+ };
169
+ var Host = {};
170
+ var isHost = (node) => node && node.$tag$ === Host;
171
+ var vdomFnUtils = {
172
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
173
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
174
+ };
175
+ var convertToPublic = (node) => ({
176
+ vattrs: node.$attrs$,
177
+ vchildren: node.$children$,
178
+ vkey: node.$key$,
179
+ vname: node.$name$,
180
+ vtag: node.$tag$,
181
+ vtext: node.$text$
182
+ });
183
+ var convertToPrivate = (node) => {
184
+ if (typeof node.vtag === "function") {
185
+ const vnodeData = { ...node.vattrs };
186
+ if (node.vkey) {
187
+ vnodeData.key = node.vkey;
188
+ }
189
+ if (node.vname) {
190
+ vnodeData.name = node.vname;
191
+ }
192
+ return h(node.vtag, vnodeData, ...node.vchildren || []);
193
+ }
194
+ const vnode = newVNode(node.vtag, node.vtext);
195
+ vnode.$attrs$ = node.vattrs;
196
+ vnode.$children$ = node.vchildren;
197
+ vnode.$key$ = node.vkey;
198
+ vnode.$name$ = node.vname;
199
+ return vnode;
200
+ };
201
+ var parsePropertyValue = (propValue, propType) => {
202
+ if (propValue != null && !isComplexType(propValue)) {
203
+ if (propType & 4 /* Boolean */) {
204
+ return propValue === "false" ? false : propValue === "" || !!propValue;
205
+ }
206
+ if (propType & 2 /* Number */) {
207
+ return parseFloat(propValue);
208
+ }
209
+ if (propType & 1 /* String */) {
210
+ return String(propValue);
211
+ }
212
+ return propValue;
213
+ }
214
+ return propValue;
215
+ };
216
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
217
+
218
+ // src/runtime/event-emitter.ts
219
+ var createEvent = (ref, name, flags) => {
220
+ const elm = getElement(ref);
221
+ return {
222
+ emit: (detail) => {
223
+ return emitEvent(elm, name, {
224
+ bubbles: !!(flags & 4 /* Bubbles */),
225
+ composed: !!(flags & 2 /* Composed */),
226
+ cancelable: !!(flags & 1 /* Cancellable */),
227
+ detail
228
+ });
229
+ }
230
+ };
231
+ };
232
+ var emitEvent = (elm, name, opts) => {
233
+ const ev = plt.ce(name, opts);
234
+ elm.dispatchEvent(ev);
235
+ return ev;
236
+ };
237
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
238
+ var registerStyle = (scopeId2, cssText, allowCS) => {
239
+ let style = styles.get(scopeId2);
240
+ if (supportsConstructableStylesheets && allowCS) {
241
+ style = style || new CSSStyleSheet();
242
+ if (typeof style === "string") {
243
+ style = cssText;
244
+ } else {
245
+ style.replaceSync(cssText);
246
+ }
247
+ } else {
248
+ style = cssText;
249
+ }
250
+ styles.set(scopeId2, style);
251
+ };
252
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
253
+ var _a;
254
+ const scopeId2 = getScopeId(cmpMeta);
255
+ const style = styles.get(scopeId2);
256
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
257
+ if (style) {
258
+ if (typeof style === "string") {
259
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
260
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
261
+ let styleElm;
262
+ if (!appliedStyles) {
263
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
264
+ }
265
+ if (!appliedStyles.has(scopeId2)) {
266
+ {
267
+ styleElm = doc.createElement("style");
268
+ styleElm.innerHTML = style;
269
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
270
+ if (nonce != null) {
271
+ styleElm.setAttribute("nonce", nonce);
272
+ }
273
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
274
+ }
275
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
276
+ styleElm.innerHTML += SLOT_FB_CSS;
277
+ }
278
+ if (appliedStyles) {
279
+ appliedStyles.add(scopeId2);
280
+ }
281
+ }
282
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
283
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
284
+ }
285
+ }
286
+ return scopeId2;
287
+ };
288
+ var attachStyles = (hostRef) => {
289
+ const cmpMeta = hostRef.$cmpMeta$;
290
+ const elm = hostRef.$hostElement$;
291
+ const flags = cmpMeta.$flags$;
292
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
293
+ const scopeId2 = addStyle(
294
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
295
+ cmpMeta);
296
+ if (flags & 10 /* needsScopedEncapsulation */) {
297
+ elm["s-sc"] = scopeId2;
298
+ elm.classList.add(scopeId2 + "-h");
299
+ if (flags & 2 /* scopedCssEncapsulation */) {
300
+ elm.classList.add(scopeId2 + "-s");
301
+ }
302
+ }
303
+ endAttachStyles();
304
+ };
305
+ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
306
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
307
+ if (oldValue !== newValue) {
308
+ let isProp = isMemberInElement(elm, memberName);
309
+ let ln = memberName.toLowerCase();
310
+ if (memberName === "class") {
311
+ const classList = elm.classList;
312
+ const oldClasses = parseClassList(oldValue);
313
+ const newClasses = parseClassList(newValue);
314
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
315
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
316
+ } else if (memberName === "style") {
317
+ {
318
+ for (const prop in oldValue) {
319
+ if (!newValue || newValue[prop] == null) {
320
+ if (prop.includes("-")) {
321
+ elm.style.removeProperty(prop);
322
+ } else {
323
+ elm.style[prop] = "";
324
+ }
325
+ }
326
+ }
327
+ }
328
+ for (const prop in newValue) {
329
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
330
+ if (prop.includes("-")) {
331
+ elm.style.setProperty(prop, newValue[prop]);
332
+ } else {
333
+ elm.style[prop] = newValue[prop];
334
+ }
335
+ }
336
+ }
337
+ } else if (memberName === "key") ; else if (memberName === "ref") {
338
+ if (newValue) {
339
+ newValue(elm);
340
+ }
341
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
342
+ if (memberName[2] === "-") {
343
+ memberName = memberName.slice(3);
344
+ } else if (isMemberInElement(win, ln)) {
345
+ memberName = ln.slice(2);
346
+ } else {
347
+ memberName = ln[2] + memberName.slice(3);
348
+ }
349
+ if (oldValue || newValue) {
350
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
351
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
352
+ if (oldValue) {
353
+ plt.rel(elm, memberName, oldValue, capture);
354
+ }
355
+ if (newValue) {
356
+ plt.ael(elm, memberName, newValue, capture);
357
+ }
358
+ }
359
+ } else {
360
+ const isComplex = isComplexType(newValue);
361
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
362
+ try {
363
+ if (!elm.tagName.includes("-")) {
364
+ const n = newValue == null ? "" : newValue;
365
+ if (memberName === "list") {
366
+ isProp = false;
367
+ } else if (oldValue == null || elm[memberName] != n) {
368
+ elm[memberName] = n;
369
+ }
370
+ } else {
371
+ elm[memberName] = newValue;
372
+ }
373
+ } catch (e) {
374
+ }
375
+ }
376
+ if (newValue == null || newValue === false) {
377
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
378
+ {
379
+ elm.removeAttribute(memberName);
380
+ }
381
+ }
382
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
383
+ newValue = newValue === true ? "" : newValue;
384
+ {
385
+ elm.setAttribute(memberName, newValue);
386
+ }
387
+ }
388
+ }
389
+ }
390
+ };
391
+ var parseClassListRegex = /\s/;
392
+ var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
393
+ var CAPTURE_EVENT_SUFFIX = "Capture";
394
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
395
+
396
+ // src/runtime/vdom/update-element.ts
397
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
398
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
399
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
400
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
401
+ {
402
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
403
+ if (!(memberName in newVnodeAttrs)) {
404
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
405
+ }
406
+ }
407
+ }
408
+ for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
409
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
410
+ }
411
+ };
412
+ function sortedAttrNames(attrNames) {
413
+ return attrNames.includes("ref") ? (
414
+ // we need to sort these to ensure that `'ref'` is the last attr
415
+ [...attrNames.filter((attr) => attr !== "ref"), "ref"]
416
+ ) : (
417
+ // no need to sort, return the original array
418
+ attrNames
419
+ );
420
+ }
421
+
422
+ // src/runtime/vdom/vdom-render.ts
423
+ var scopeId;
424
+ var hostTagName;
425
+ var useNativeShadowDom = false;
426
+ var isSvgMode = false;
427
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
428
+ var _a, _b, _c;
429
+ const newVNode2 = newParentVNode.$children$[childIndex];
430
+ let i2 = 0;
431
+ let elm;
432
+ let childNode;
433
+ if (newVNode2.$text$ !== null) {
434
+ elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
435
+ } else {
436
+ if (!isSvgMode) {
437
+ isSvgMode = newVNode2.$tag$ === "svg";
438
+ }
439
+ elm = newVNode2.$elm$ = doc.createElementNS(
440
+ isSvgMode ? SVG_NS : HTML_NS,
441
+ newVNode2.$tag$
442
+ ) ;
443
+ if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
444
+ isSvgMode = false;
445
+ }
446
+ {
447
+ updateElement(null, newVNode2, isSvgMode);
448
+ }
449
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
450
+ elm.classList.add(elm["s-si"] = scopeId);
451
+ }
452
+ {
453
+ const rootScopeId = ((_a = newParentVNode.$elm$) == null ? void 0 : _a["s-rsc"]) || ((_b = newParentVNode.$elm$) == null ? void 0 : _b["s-si"]) || ((_c = newParentVNode.$elm$) == null ? void 0 : _c["s-sc"]);
454
+ if (rootScopeId) {
455
+ elm["s-rsc"] = rootScopeId;
456
+ !elm.classList.contains(rootScopeId) && elm.classList.add(rootScopeId);
457
+ }
458
+ }
459
+ if (newVNode2.$children$) {
460
+ for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
461
+ childNode = createElm(oldParentVNode, newVNode2, i2);
462
+ if (childNode) {
463
+ elm.appendChild(childNode);
464
+ }
465
+ }
466
+ }
467
+ {
468
+ if (newVNode2.$tag$ === "svg") {
469
+ isSvgMode = false;
470
+ } else if (elm.tagName === "foreignObject") {
471
+ isSvgMode = true;
472
+ }
473
+ }
474
+ }
475
+ elm["s-hn"] = hostTagName;
476
+ return elm;
477
+ };
478
+ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
479
+ let containerElm = parentElm;
480
+ let childNode;
481
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
482
+ containerElm = containerElm.shadowRoot;
483
+ }
484
+ for (; startIdx <= endIdx; ++startIdx) {
485
+ if (vnodes[startIdx]) {
486
+ childNode = createElm(null, parentVNode, startIdx);
487
+ if (childNode) {
488
+ vnodes[startIdx].$elm$ = childNode;
489
+ containerElm.insertBefore(childNode, before);
490
+ }
491
+ }
492
+ }
493
+ };
494
+ var removeVnodes = (vnodes, startIdx, endIdx) => {
495
+ for (let index = startIdx; index <= endIdx; ++index) {
496
+ const vnode = vnodes[index];
497
+ if (vnode) {
498
+ const elm = vnode.$elm$;
499
+ nullifyVNodeRefs(vnode);
500
+ if (elm) {
501
+ elm.remove();
502
+ }
503
+ }
504
+ }
505
+ };
506
+ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
507
+ let oldStartIdx = 0;
508
+ let newStartIdx = 0;
509
+ let idxInOld = 0;
510
+ let i2 = 0;
511
+ let oldEndIdx = oldCh.length - 1;
512
+ let oldStartVnode = oldCh[0];
513
+ let oldEndVnode = oldCh[oldEndIdx];
514
+ let newEndIdx = newCh.length - 1;
515
+ let newStartVnode = newCh[0];
516
+ let newEndVnode = newCh[newEndIdx];
517
+ let node;
518
+ let elmToMove;
519
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
520
+ if (oldStartVnode == null) {
521
+ oldStartVnode = oldCh[++oldStartIdx];
522
+ } else if (oldEndVnode == null) {
523
+ oldEndVnode = oldCh[--oldEndIdx];
524
+ } else if (newStartVnode == null) {
525
+ newStartVnode = newCh[++newStartIdx];
526
+ } else if (newEndVnode == null) {
527
+ newEndVnode = newCh[--newEndIdx];
528
+ } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
529
+ patch(oldStartVnode, newStartVnode, isInitialRender);
530
+ oldStartVnode = oldCh[++oldStartIdx];
531
+ newStartVnode = newCh[++newStartIdx];
532
+ } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
533
+ patch(oldEndVnode, newEndVnode, isInitialRender);
534
+ oldEndVnode = oldCh[--oldEndIdx];
535
+ newEndVnode = newCh[--newEndIdx];
536
+ } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
537
+ patch(oldStartVnode, newEndVnode, isInitialRender);
538
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
539
+ oldStartVnode = oldCh[++oldStartIdx];
540
+ newEndVnode = newCh[--newEndIdx];
541
+ } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
542
+ patch(oldEndVnode, newStartVnode, isInitialRender);
543
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
544
+ oldEndVnode = oldCh[--oldEndIdx];
545
+ newStartVnode = newCh[++newStartIdx];
546
+ } else {
547
+ idxInOld = -1;
548
+ {
549
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
550
+ if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
551
+ idxInOld = i2;
552
+ break;
553
+ }
554
+ }
555
+ }
556
+ if (idxInOld >= 0) {
557
+ elmToMove = oldCh[idxInOld];
558
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
559
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
560
+ } else {
561
+ patch(elmToMove, newStartVnode, isInitialRender);
562
+ oldCh[idxInOld] = void 0;
563
+ node = elmToMove.$elm$;
564
+ }
565
+ newStartVnode = newCh[++newStartIdx];
566
+ } else {
567
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
568
+ newStartVnode = newCh[++newStartIdx];
569
+ }
570
+ if (node) {
571
+ {
572
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
573
+ }
574
+ }
575
+ }
576
+ }
577
+ if (oldStartIdx > oldEndIdx) {
578
+ addVnodes(
579
+ parentElm,
580
+ newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
581
+ newVNode2,
582
+ newCh,
583
+ newStartIdx,
584
+ newEndIdx
585
+ );
586
+ } else if (newStartIdx > newEndIdx) {
587
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
588
+ }
589
+ };
590
+ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
591
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
592
+ if (!isInitialRender) {
593
+ return leftVNode.$key$ === rightVNode.$key$;
594
+ }
595
+ return true;
596
+ }
597
+ return false;
598
+ };
599
+ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
600
+ const elm = newVNode2.$elm$ = oldVNode.$elm$;
601
+ const oldChildren = oldVNode.$children$;
602
+ const newChildren = newVNode2.$children$;
603
+ const tag = newVNode2.$tag$;
604
+ const text = newVNode2.$text$;
605
+ if (text === null) {
606
+ {
607
+ isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
608
+ }
609
+ {
610
+ if (tag === "slot" && !useNativeShadowDom) ; else {
611
+ updateElement(oldVNode, newVNode2, isSvgMode);
612
+ }
613
+ }
614
+ if (oldChildren !== null && newChildren !== null) {
615
+ updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
616
+ } else if (newChildren !== null) {
617
+ if (oldVNode.$text$ !== null) {
618
+ elm.textContent = "";
619
+ }
620
+ addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
621
+ } else if (oldChildren !== null) {
622
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
623
+ }
624
+ if (isSvgMode && tag === "svg") {
625
+ isSvgMode = false;
626
+ }
627
+ } else if (oldVNode.$text$ !== text) {
628
+ elm.data = text;
629
+ }
630
+ };
631
+ var nullifyVNodeRefs = (vNode) => {
632
+ {
633
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
634
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
635
+ }
636
+ };
637
+ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
638
+ const hostElm = hostRef.$hostElement$;
639
+ const cmpMeta = hostRef.$cmpMeta$;
640
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
641
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
642
+ hostTagName = hostElm.tagName;
643
+ if (isInitialLoad && rootVnode.$attrs$) {
644
+ for (const key of Object.keys(rootVnode.$attrs$)) {
645
+ if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
646
+ rootVnode.$attrs$[key] = hostElm[key];
647
+ }
648
+ }
649
+ }
650
+ rootVnode.$tag$ = null;
651
+ rootVnode.$flags$ |= 4 /* isHost */;
652
+ hostRef.$vnode$ = rootVnode;
653
+ rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
654
+ {
655
+ scopeId = hostElm["s-sc"];
656
+ }
657
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
658
+ patch(oldVNode, rootVnode, isInitialLoad);
659
+ };
660
+
661
+ // src/runtime/update-component.ts
662
+ var attachToAncestor = (hostRef, ancestorComponent) => {
663
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
664
+ ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
665
+ }
666
+ };
667
+ var scheduleUpdate = (hostRef, isInitialLoad) => {
668
+ {
669
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
670
+ }
671
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
672
+ hostRef.$flags$ |= 512 /* needsRerender */;
673
+ return;
674
+ }
675
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
676
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
677
+ return writeTask(dispatch) ;
678
+ };
679
+ var dispatchHooks = (hostRef, isInitialLoad) => {
680
+ const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
681
+ const instance = hostRef.$lazyInstance$ ;
682
+ let maybePromise;
683
+ if (isInitialLoad) {
684
+ {
685
+ hostRef.$flags$ |= 256 /* isListenReady */;
686
+ if (hostRef.$queuedListeners$) {
687
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
688
+ hostRef.$queuedListeners$ = void 0;
689
+ }
690
+ }
691
+ {
692
+ maybePromise = safeCall(instance, "componentWillLoad");
693
+ }
694
+ }
695
+ endSchedule();
696
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
697
+ };
698
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
699
+ var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
700
+ var updateComponent = async (hostRef, instance, isInitialLoad) => {
701
+ var _a;
702
+ const elm = hostRef.$hostElement$;
703
+ const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
704
+ const rc = elm["s-rc"];
705
+ if (isInitialLoad) {
706
+ attachStyles(hostRef);
707
+ }
708
+ const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
709
+ {
710
+ callRender(hostRef, instance, elm, isInitialLoad);
711
+ }
712
+ if (rc) {
713
+ rc.map((cb) => cb());
714
+ elm["s-rc"] = void 0;
715
+ }
716
+ endRender();
717
+ endUpdate();
718
+ {
719
+ const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
720
+ const postUpdate = () => postUpdateComponent(hostRef);
721
+ if (childrenPromises.length === 0) {
722
+ postUpdate();
723
+ } else {
724
+ Promise.all(childrenPromises).then(postUpdate);
725
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
726
+ childrenPromises.length = 0;
727
+ }
728
+ }
729
+ };
730
+ var renderingRef = null;
731
+ var callRender = (hostRef, instance, elm, isInitialLoad) => {
732
+ try {
733
+ renderingRef = instance;
734
+ instance = instance.render() ;
735
+ {
736
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
737
+ }
738
+ {
739
+ hostRef.$flags$ |= 2 /* hasRendered */;
740
+ }
741
+ {
742
+ {
743
+ {
744
+ renderVdom(hostRef, instance, isInitialLoad);
745
+ }
746
+ }
747
+ }
748
+ } catch (e) {
749
+ consoleError(e, hostRef.$hostElement$);
750
+ }
751
+ renderingRef = null;
752
+ return null;
753
+ };
754
+ var getRenderingRef = () => renderingRef;
755
+ var postUpdateComponent = (hostRef) => {
756
+ const tagName = hostRef.$cmpMeta$.$tagName$;
757
+ const elm = hostRef.$hostElement$;
758
+ const endPostUpdate = createTime("postUpdate", tagName);
759
+ const instance = hostRef.$lazyInstance$ ;
760
+ const ancestorComponent = hostRef.$ancestorComponent$;
761
+ {
762
+ safeCall(instance, "componentDidRender");
763
+ }
764
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
765
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
766
+ {
767
+ addHydratedFlag(elm);
768
+ }
769
+ {
770
+ safeCall(instance, "componentDidLoad");
771
+ }
772
+ endPostUpdate();
773
+ {
774
+ hostRef.$onReadyResolve$(elm);
775
+ if (!ancestorComponent) {
776
+ appDidLoad();
777
+ }
778
+ }
779
+ } else {
780
+ endPostUpdate();
781
+ }
782
+ {
783
+ hostRef.$onInstanceResolve$(elm);
784
+ }
785
+ {
786
+ if (hostRef.$onRenderResolve$) {
787
+ hostRef.$onRenderResolve$();
788
+ hostRef.$onRenderResolve$ = void 0;
789
+ }
790
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
791
+ nextTick(() => scheduleUpdate(hostRef, false));
792
+ }
793
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
794
+ }
795
+ };
796
+ var forceUpdate = (ref) => {
797
+ {
798
+ const hostRef = getHostRef(ref);
799
+ const isConnected = hostRef.$hostElement$.isConnected;
800
+ if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
801
+ scheduleUpdate(hostRef, false);
802
+ }
803
+ return isConnected;
804
+ }
805
+ };
806
+ var appDidLoad = (who) => {
807
+ {
808
+ addHydratedFlag(doc.documentElement);
809
+ }
810
+ nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
811
+ };
812
+ var safeCall = (instance, method, arg) => {
813
+ if (instance && instance[method]) {
814
+ try {
815
+ return instance[method](arg);
816
+ } catch (e) {
817
+ consoleError(e);
818
+ }
819
+ }
820
+ return void 0;
821
+ };
822
+ var addHydratedFlag = (elm) => elm.classList.add("hydrated") ;
823
+
824
+ // src/runtime/set-value.ts
825
+ var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
826
+ var setValue = (ref, propName, newVal, cmpMeta) => {
827
+ const hostRef = getHostRef(ref);
828
+ const elm = hostRef.$hostElement$ ;
829
+ const oldVal = hostRef.$instanceValues$.get(propName);
830
+ const flags = hostRef.$flags$;
831
+ const instance = hostRef.$lazyInstance$ ;
832
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
833
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
834
+ const didValueChange = newVal !== oldVal && !areBothNaN;
835
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
836
+ hostRef.$instanceValues$.set(propName, newVal);
837
+ if (instance) {
838
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
839
+ const watchMethods = cmpMeta.$watchers$[propName];
840
+ if (watchMethods) {
841
+ watchMethods.map((watchMethodName) => {
842
+ try {
843
+ instance[watchMethodName](newVal, oldVal, propName);
844
+ } catch (e) {
845
+ consoleError(e, elm);
846
+ }
847
+ });
848
+ }
849
+ }
850
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
851
+ scheduleUpdate(hostRef, false);
852
+ }
853
+ }
854
+ }
855
+ };
856
+
857
+ // src/runtime/proxy-component.ts
858
+ var proxyComponent = (Cstr, cmpMeta, flags) => {
859
+ var _a;
860
+ const prototype = Cstr.prototype;
861
+ if (cmpMeta.$members$) {
862
+ if (Cstr.watchers) {
863
+ cmpMeta.$watchers$ = Cstr.watchers;
864
+ }
865
+ const members = Object.entries(cmpMeta.$members$);
866
+ members.map(([memberName, [memberFlags]]) => {
867
+ if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
868
+ Object.defineProperty(prototype, memberName, {
869
+ get() {
870
+ return getValue(this, memberName);
871
+ },
872
+ set(newValue) {
873
+ setValue(this, memberName, newValue, cmpMeta);
874
+ },
875
+ configurable: true,
876
+ enumerable: true
877
+ });
878
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
879
+ Object.defineProperty(prototype, memberName, {
880
+ value(...args) {
881
+ var _a2;
882
+ const ref = getHostRef(this);
883
+ return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
884
+ var _a3;
885
+ return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
886
+ });
887
+ }
888
+ });
889
+ }
890
+ });
891
+ if ((flags & 1 /* isElementConstructor */)) {
892
+ const attrNameToPropName = /* @__PURE__ */ new Map();
893
+ prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
894
+ plt.jmp(() => {
895
+ var _a2;
896
+ const propName = attrNameToPropName.get(attrName);
897
+ if (this.hasOwnProperty(propName)) {
898
+ newValue = this[propName];
899
+ delete this[propName];
900
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
901
+ return;
902
+ } else if (propName == null) {
903
+ const hostRef = getHostRef(this);
904
+ const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
905
+ if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
906
+ const instance = hostRef.$lazyInstance$ ;
907
+ const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
908
+ entry == null ? void 0 : entry.forEach((callbackName) => {
909
+ if (instance[callbackName] != null) {
910
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
911
+ }
912
+ });
913
+ }
914
+ return;
915
+ }
916
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
917
+ });
918
+ };
919
+ Cstr.observedAttributes = Array.from(
920
+ /* @__PURE__ */ new Set([
921
+ ...Object.keys((_a = cmpMeta.$watchers$) != null ? _a : {}),
922
+ ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
923
+ const attrName = m[1] || propName;
924
+ attrNameToPropName.set(attrName, propName);
925
+ return attrName;
926
+ })
927
+ ])
928
+ );
929
+ }
930
+ }
931
+ return Cstr;
932
+ };
933
+
934
+ // src/runtime/initialize-component.ts
935
+ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
936
+ let Cstr;
937
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
938
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
939
+ const bundleId = cmpMeta.$lazyBundleId$;
940
+ if (bundleId) {
941
+ Cstr = loadModule(cmpMeta);
942
+ if (Cstr.then) {
943
+ const endLoad = uniqueTime();
944
+ Cstr = await Cstr;
945
+ endLoad();
946
+ }
947
+ if (!Cstr.isProxied) {
948
+ {
949
+ cmpMeta.$watchers$ = Cstr.watchers;
950
+ }
951
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
952
+ Cstr.isProxied = true;
953
+ }
954
+ const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
955
+ {
956
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
957
+ }
958
+ try {
959
+ new Cstr(hostRef);
960
+ } catch (e) {
961
+ consoleError(e);
962
+ }
963
+ {
964
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
965
+ }
966
+ {
967
+ hostRef.$flags$ |= 128 /* isWatchReady */;
968
+ }
969
+ endNewInstance();
970
+ } else {
971
+ Cstr = elm.constructor;
972
+ customElements.whenDefined(cmpMeta.$tagName$).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
973
+ }
974
+ if (Cstr.style) {
975
+ let style = Cstr.style;
976
+ const scopeId2 = getScopeId(cmpMeta);
977
+ if (!styles.has(scopeId2)) {
978
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
979
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
980
+ endRegisterStyles();
981
+ }
982
+ }
983
+ }
984
+ const ancestorComponent = hostRef.$ancestorComponent$;
985
+ const schedule = () => scheduleUpdate(hostRef, true);
986
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
987
+ ancestorComponent["s-rc"].push(schedule);
988
+ } else {
989
+ schedule();
990
+ }
991
+ };
992
+ var fireConnectedCallback = (instance) => {
993
+ };
994
+
995
+ // src/runtime/connected-callback.ts
996
+ var connectedCallback = (elm) => {
997
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
998
+ const hostRef = getHostRef(elm);
999
+ const cmpMeta = hostRef.$cmpMeta$;
1000
+ const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1001
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1002
+ hostRef.$flags$ |= 1 /* hasConnected */;
1003
+ {
1004
+ let ancestorComponent = elm;
1005
+ while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1006
+ if (ancestorComponent["s-p"]) {
1007
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1008
+ break;
1009
+ }
1010
+ }
1011
+ }
1012
+ if (cmpMeta.$members$) {
1013
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1014
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1015
+ const value = elm[memberName];
1016
+ delete elm[memberName];
1017
+ elm[memberName] = value;
1018
+ }
1019
+ });
1020
+ }
1021
+ {
1022
+ initializeComponent(elm, hostRef, cmpMeta);
1023
+ }
1024
+ } else {
1025
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1026
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1027
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1028
+ }
1029
+ }
1030
+ endConnected();
1031
+ }
1032
+ };
1033
+ var disconnectInstance = (instance) => {
1034
+ {
1035
+ safeCall(instance, "disconnectedCallback");
1036
+ }
1037
+ };
1038
+ var disconnectedCallback = async (elm) => {
1039
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1040
+ const hostRef = getHostRef(elm);
1041
+ {
1042
+ if (hostRef.$rmListeners$) {
1043
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1044
+ hostRef.$rmListeners$ = void 0;
1045
+ }
1046
+ }
1047
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1048
+ disconnectInstance(hostRef.$lazyInstance$);
1049
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1050
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1051
+ }
1052
+ }
1053
+ };
1054
+
1055
+ // src/runtime/bootstrap-lazy.ts
1056
+ var bootstrapLazy = (lazyBundles, options = {}) => {
1057
+ var _a;
1058
+ const endBootstrap = createTime();
1059
+ const cmpTags = [];
1060
+ const exclude = options.exclude || [];
1061
+ const customElements2 = win.customElements;
1062
+ const head = doc.head;
1063
+ const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1064
+ const dataStyles = /* @__PURE__ */ doc.createElement("style");
1065
+ const deferredConnectedCallbacks = [];
1066
+ let appLoadFallback;
1067
+ let isBootstrapping = true;
1068
+ Object.assign(plt, options);
1069
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
1070
+ let hasSlotRelocation = false;
1071
+ lazyBundles.map((lazyBundle) => {
1072
+ lazyBundle[1].map((compactMeta) => {
1073
+ var _a2;
1074
+ const cmpMeta = {
1075
+ $flags$: compactMeta[0],
1076
+ $tagName$: compactMeta[1],
1077
+ $members$: compactMeta[2],
1078
+ $listeners$: compactMeta[3]
1079
+ };
1080
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1081
+ hasSlotRelocation = true;
1082
+ }
1083
+ {
1084
+ cmpMeta.$members$ = compactMeta[2];
1085
+ }
1086
+ {
1087
+ cmpMeta.$listeners$ = compactMeta[3];
1088
+ }
1089
+ {
1090
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1091
+ }
1092
+ const tagName = cmpMeta.$tagName$;
1093
+ const HostElement = class extends HTMLElement {
1094
+ // StencilLazyHost
1095
+ constructor(self) {
1096
+ super(self);
1097
+ self = this;
1098
+ registerHost(self, cmpMeta);
1099
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1100
+ {
1101
+ {
1102
+ self.attachShadow({ mode: "open" });
1103
+ }
1104
+ }
1105
+ }
1106
+ }
1107
+ connectedCallback() {
1108
+ if (appLoadFallback) {
1109
+ clearTimeout(appLoadFallback);
1110
+ appLoadFallback = null;
1111
+ }
1112
+ if (isBootstrapping) {
1113
+ deferredConnectedCallbacks.push(this);
1114
+ } else {
1115
+ plt.jmp(() => connectedCallback(this));
1116
+ }
1117
+ }
1118
+ disconnectedCallback() {
1119
+ plt.jmp(() => disconnectedCallback(this));
1120
+ }
1121
+ componentOnReady() {
1122
+ return getHostRef(this).$onReadyPromise$;
1123
+ }
1124
+ };
1125
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1126
+ if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
1127
+ cmpTags.push(tagName);
1128
+ customElements2.define(
1129
+ tagName,
1130
+ proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
1131
+ );
1132
+ }
1133
+ });
1134
+ });
1135
+ if (cmpTags.length > 0) {
1136
+ if (hasSlotRelocation) {
1137
+ dataStyles.textContent += SLOT_FB_CSS;
1138
+ }
1139
+ {
1140
+ dataStyles.textContent += cmpTags + HYDRATED_CSS;
1141
+ }
1142
+ if (dataStyles.innerHTML.length) {
1143
+ dataStyles.setAttribute("data-styles", "");
1144
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1145
+ if (nonce != null) {
1146
+ dataStyles.setAttribute("nonce", nonce);
1147
+ }
1148
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1149
+ }
1150
+ }
1151
+ isBootstrapping = false;
1152
+ if (deferredConnectedCallbacks.length) {
1153
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1154
+ } else {
1155
+ {
1156
+ plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
1157
+ }
1158
+ }
1159
+ endBootstrap();
1160
+ };
1161
+
1162
+ // src/runtime/fragment.ts
1163
+ var Fragment = (_, children) => children;
1164
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1165
+ if (listeners) {
1166
+ listeners.map(([flags, name, method]) => {
1167
+ const target = getHostListenerTarget(elm, flags) ;
1168
+ const handler = hostListenerProxy(hostRef, method);
1169
+ const opts = hostListenerOpts(flags);
1170
+ plt.ael(target, name, handler, opts);
1171
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1172
+ });
1173
+ }
1174
+ };
1175
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1176
+ try {
1177
+ {
1178
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
1179
+ hostRef.$lazyInstance$[methodName](ev);
1180
+ } else {
1181
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1182
+ }
1183
+ }
1184
+ } catch (e) {
1185
+ consoleError(e);
1186
+ }
1187
+ };
1188
+ var getHostListenerTarget = (elm, flags) => {
1189
+ if (flags & 4 /* TargetDocument */)
1190
+ return doc;
1191
+ if (flags & 8 /* TargetWindow */)
1192
+ return win;
1193
+ if (flags & 16 /* TargetBody */)
1194
+ return doc.body;
1195
+ return elm;
1196
+ };
1197
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1198
+ passive: (flags & 1 /* Passive */) !== 0,
1199
+ capture: (flags & 2 /* Capture */) !== 0
1200
+ } : (flags & 2 /* Capture */) !== 0;
1201
+
1202
+ // src/runtime/nonce.ts
1203
+ var setNonce = (nonce) => plt.$nonce$ = nonce;
1204
+
1205
+ // src/client/client-host-ref.ts
1206
+ var hostRefs = /* @__PURE__ */ new WeakMap();
1207
+ var getHostRef = (ref) => hostRefs.get(ref);
1208
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
1209
+ var registerHost = (hostElement, cmpMeta) => {
1210
+ const hostRef = {
1211
+ $flags$: 0,
1212
+ $hostElement$: hostElement,
1213
+ $cmpMeta$: cmpMeta,
1214
+ $instanceValues$: /* @__PURE__ */ new Map()
1215
+ };
1216
+ {
1217
+ hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
1218
+ }
1219
+ {
1220
+ hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
1221
+ hostElement["s-p"] = [];
1222
+ hostElement["s-rc"] = [];
1223
+ }
1224
+ addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
1225
+ return hostRefs.set(hostElement, hostRef);
1226
+ };
1227
+ var isMemberInElement = (elm, memberName) => memberName in elm;
1228
+ var consoleError = (e, el) => (0, console.error)(e, el);
1229
+
1230
+ // src/client/client-load-module.ts
1231
+ var cmpModules = /* @__PURE__ */ new Map();
1232
+ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1233
+ const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
1234
+ const bundleId = cmpMeta.$lazyBundleId$;
1235
+ const module = cmpModules.get(bundleId) ;
1236
+ if (module) {
1237
+ return module[exportName];
1238
+ }
1239
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1240
+ return import(
1241
+ /* @vite-ignore */
1242
+ /* webpackInclude: /\.entry\.js$/ */
1243
+ /* webpackExclude: /\.system\.entry\.js$/ */
1244
+ /* webpackMode: "lazy" */
1245
+ `./${bundleId}.entry.js${""}`
1246
+ ).then((importedModule) => {
1247
+ {
1248
+ cmpModules.set(bundleId, importedModule);
1249
+ }
1250
+ return importedModule[exportName];
1251
+ }, consoleError);
1252
+ };
1253
+
1254
+ // src/client/client-style.ts
1255
+ var styles = /* @__PURE__ */ new Map();
1256
+ var win = typeof window !== "undefined" ? window : {};
1257
+ var doc = win.document || { head: {} };
1258
+ var plt = {
1259
+ $flags$: 0,
1260
+ $resourcesUrl$: "",
1261
+ jmp: (h2) => h2(),
1262
+ raf: (h2) => requestAnimationFrame(h2),
1263
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1264
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1265
+ ce: (eventName, opts) => new CustomEvent(eventName, opts)
1266
+ };
1267
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
1268
+ let supportsListenerOptions2 = false;
1269
+ try {
1270
+ doc.addEventListener(
1271
+ "e",
1272
+ null,
1273
+ Object.defineProperty({}, "passive", {
1274
+ get() {
1275
+ supportsListenerOptions2 = true;
1276
+ }
1277
+ })
1278
+ );
1279
+ } catch (e) {
1280
+ }
1281
+ return supportsListenerOptions2;
1282
+ })();
1283
+ var promiseResolve = (v) => Promise.resolve(v);
1284
+ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
1285
+ try {
1286
+ new CSSStyleSheet();
1287
+ return typeof new CSSStyleSheet().replaceSync === "function";
1288
+ } catch (e) {
1289
+ }
1290
+ return false;
1291
+ })() ;
1292
+ var queuePending = false;
1293
+ var queueDomReads = [];
1294
+ var queueDomWrites = [];
1295
+ var queueTask = (queue, write) => (cb) => {
1296
+ queue.push(cb);
1297
+ if (!queuePending) {
1298
+ queuePending = true;
1299
+ if (write && plt.$flags$ & 4 /* queueSync */) {
1300
+ nextTick(flush);
1301
+ } else {
1302
+ plt.raf(flush);
1303
+ }
1304
+ }
1305
+ };
1306
+ var consume = (queue) => {
1307
+ for (let i2 = 0; i2 < queue.length; i2++) {
1308
+ try {
1309
+ queue[i2](performance.now());
1310
+ } catch (e) {
1311
+ consoleError(e);
1312
+ }
1313
+ }
1314
+ queue.length = 0;
1315
+ };
1316
+ var flush = () => {
1317
+ consume(queueDomReads);
1318
+ {
1319
+ consume(queueDomWrites);
1320
+ if (queuePending = queueDomReads.length > 0) {
1321
+ plt.raf(flush);
1322
+ }
1323
+ }
1324
+ };
1325
+ var nextTick = (cb) => promiseResolve().then(cb);
1326
+ var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
1327
+
1328
+ export { Fragment as F, Host as H, getAssetPath as a, bootstrapLazy as b, createEvent as c, getElement as d, forceUpdate as f, getRenderingRef as g, h, promiseResolve as p, registerInstance as r, setNonce as s };