@zonos/elements 1.3.250 → 1.3.251

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 (202) hide show
  1. package/dist/cjs/{cart-fcd1359c.js → cart-77640463.js} +1 -1
  2. package/dist/cjs/{hasInclusivePrice-745a8f29.js → hasInclusivePrice-e93c64fd.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{invoice-f040e147.js → invoice-211ef96c.js} +2 -2
  5. package/dist/cjs/{isCollectMobileTablet-cf92852e.js → isCollectMobileTablet-14fb5ab4.js} +2 -2
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{localization-523b793a.js → localization-be7afc1b.js} +120 -0
  8. package/dist/cjs/{paypal-8c98c0a1.js → paypal-c61ef042.js} +2 -2
  9. package/dist/cjs/{placeTestOrder-9b1e09f0.js → placeTestOrder-0f7477c8.js} +2 -2
  10. package/dist/cjs/{renderCheckoutCurrency-94b6e51d.js → renderCheckoutCurrency-1ac02803.js} +2 -2
  11. package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
  14. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
  15. package/dist/cjs/zonos-checkout.cjs.entry.js +30 -4
  16. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  17. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
  18. package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
  19. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  21. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  22. package/dist/cjs/zonos-elements.cjs.js +1 -1
  23. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  24. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  26. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
  27. package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
  28. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-store-credit.cjs.entry.js +3 -3
  30. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +29 -2
  31. package/dist/collection/components/store/translationStore/strings.arabic.js +6 -0
  32. package/dist/collection/components/store/translationStore/strings.base.js +6 -0
  33. package/dist/collection/components/store/translationStore/strings.chinese.js +6 -0
  34. package/dist/collection/components/store/translationStore/strings.danish.js +6 -0
  35. package/dist/collection/components/store/translationStore/strings.dutch.js +6 -0
  36. package/dist/collection/components/store/translationStore/strings.french.js +6 -0
  37. package/dist/collection/components/store/translationStore/strings.german.js +6 -0
  38. package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -0
  39. package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -0
  40. package/dist/collection/components/store/translationStore/strings.italian.js +6 -0
  41. package/dist/collection/components/store/translationStore/strings.japanese.js +6 -0
  42. package/dist/collection/components/store/translationStore/strings.korean.js +6 -0
  43. package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -0
  44. package/dist/collection/components/store/translationStore/strings.polish.js +6 -0
  45. package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -0
  46. package/dist/collection/components/store/translationStore/strings.russian.js +6 -0
  47. package/dist/collection/components/store/translationStore/strings.spanish.js +6 -0
  48. package/dist/collection/components/store/translationStore/strings.swedish.js +6 -0
  49. package/dist/collection/components/store/translationStore/strings.turkish.js +6 -0
  50. package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -0
  51. package/dist/esm/{cart-6e465f7b.js → cart-394c9ddb.js} +2 -2
  52. package/dist/esm/{hasInclusivePrice-c49d384d.js → hasInclusivePrice-f0322e1c.js} +1 -1
  53. package/dist/esm/index.js +7 -7
  54. package/dist/esm/{invoice-d416ba65.js → invoice-5ae81ae5.js} +2 -2
  55. package/dist/esm/{isCollectMobileTablet-48040572.js → isCollectMobileTablet-15b668d6.js} +2 -2
  56. package/dist/esm/loader.js +1 -1
  57. package/dist/esm/{localization-f4a7fb5a.js → localization-0ebc8356.js} +120 -0
  58. package/dist/esm/{paypal-6af6b978.js → paypal-b6fa3ec3.js} +2 -2
  59. package/dist/esm/{placeTestOrder-d19ac166.js → placeTestOrder-5756cbc3.js} +2 -2
  60. package/dist/esm/{renderCheckoutCurrency-c8aa8e7e.js → renderCheckoutCurrency-5f3e06ea.js} +2 -2
  61. package/dist/esm/zonos-address-display_8.entry.js +2 -2
  62. package/dist/esm/zonos-address_4.entry.js +2 -2
  63. package/dist/esm/zonos-card_5.entry.js +3 -3
  64. package/dist/esm/zonos-cart-items_12.entry.js +6 -6
  65. package/dist/esm/zonos-checkout.entry.js +30 -4
  66. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  67. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  68. package/dist/esm/zonos-collect.entry.js +4 -4
  69. package/dist/esm/zonos-controller.entry.js +2 -2
  70. package/dist/esm/zonos-country-flag.entry.js +1 -1
  71. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  72. package/dist/esm/zonos-elements.js +1 -1
  73. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  74. package/dist/esm/zonos-hello.entry.js +1 -1
  75. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  76. package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
  77. package/dist/esm/zonos-invoice.entry.js +4 -4
  78. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  79. package/dist/esm/zonos-store-credit.entry.js +3 -3
  80. package/dist/esm-es5/{cart-6e465f7b.js → cart-394c9ddb.js} +1 -1
  81. package/dist/esm-es5/hasInclusivePrice-f0322e1c.js +1 -0
  82. package/dist/esm-es5/index.js +1 -1
  83. package/dist/esm-es5/{invoice-d416ba65.js → invoice-5ae81ae5.js} +1 -1
  84. package/dist/esm-es5/{isCollectMobileTablet-48040572.js → isCollectMobileTablet-15b668d6.js} +1 -1
  85. package/dist/esm-es5/loader.js +1 -1
  86. package/dist/esm-es5/localization-0ebc8356.js +1 -0
  87. package/dist/esm-es5/{paypal-6af6b978.js → paypal-b6fa3ec3.js} +2 -2
  88. package/dist/esm-es5/{placeTestOrder-d19ac166.js → placeTestOrder-5756cbc3.js} +1 -1
  89. package/dist/esm-es5/{renderCheckoutCurrency-c8aa8e7e.js → renderCheckoutCurrency-5f3e06ea.js} +1 -1
  90. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  91. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  92. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  93. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  94. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  95. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  96. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  97. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  98. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  99. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  100. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  101. package/dist/esm-es5/zonos-elements.js +1 -1
  102. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  103. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  104. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  105. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  106. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  107. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  108. package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
  109. package/dist/scripts/index.d.ts +10 -0
  110. package/dist/scripts/index.js +1 -1
  111. package/dist/scripts/loadZonos.js +1 -1
  112. package/dist/scripts/zonos.js +1 -1
  113. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +5 -0
  114. package/dist/types/components/store/translationStore/strings.arabic.d.ts +6 -0
  115. package/dist/types/components/store/translationStore/strings.base.d.ts +6 -0
  116. package/dist/types/components/store/translationStore/strings.chinese.d.ts +6 -0
  117. package/dist/types/components/store/translationStore/strings.danish.d.ts +6 -0
  118. package/dist/types/components/store/translationStore/strings.dutch.d.ts +6 -0
  119. package/dist/types/components/store/translationStore/strings.french.d.ts +6 -0
  120. package/dist/types/components/store/translationStore/strings.german.d.ts +6 -0
  121. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +6 -0
  122. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +6 -0
  123. package/dist/types/components/store/translationStore/strings.italian.d.ts +6 -0
  124. package/dist/types/components/store/translationStore/strings.japanese.d.ts +6 -0
  125. package/dist/types/components/store/translationStore/strings.korean.d.ts +6 -0
  126. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +6 -0
  127. package/dist/types/components/store/translationStore/strings.polish.d.ts +6 -0
  128. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +6 -0
  129. package/dist/types/components/store/translationStore/strings.russian.d.ts +6 -0
  130. package/dist/types/components/store/translationStore/strings.spanish.d.ts +6 -0
  131. package/dist/types/components/store/translationStore/strings.swedish.d.ts +6 -0
  132. package/dist/types/components/store/translationStore/strings.turkish.d.ts +6 -0
  133. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +6 -0
  134. package/dist/types/types/utils/ZonosSettings.d.ts +4 -0
  135. package/dist/zonos-elements/index.esm.js +1 -1
  136. package/dist/zonos-elements/{p-9f49e35a.system.entry.js → p-07ca3347.system.entry.js} +1 -1
  137. package/dist/zonos-elements/{p-2b7ef406.system.js → p-09d7a5cb.system.js} +1 -1
  138. package/dist/zonos-elements/{p-741e07e1.system.entry.js → p-0af96b5b.system.entry.js} +1 -1
  139. package/dist/zonos-elements/{p-cad67b10.system.entry.js → p-0da3cc62.system.entry.js} +1 -1
  140. package/dist/zonos-elements/p-0dd5a4b8.system.js +1 -0
  141. package/dist/zonos-elements/{p-26848428.entry.js → p-1162b685.entry.js} +1 -1
  142. package/dist/zonos-elements/{p-59fe8416.entry.js → p-11d6de1a.entry.js} +1 -1
  143. package/dist/zonos-elements/p-1282495f.system.js +1 -0
  144. package/dist/zonos-elements/p-13041752.js +1 -0
  145. package/dist/zonos-elements/{p-90b8c428.system.js → p-27fad55a.system.js} +1 -1
  146. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  147. package/dist/zonos-elements/{p-cc78c9d4.js → p-29f7950c.js} +1 -1
  148. package/dist/zonos-elements/p-2b118454.js +1 -0
  149. package/dist/zonos-elements/{p-fbfaa4f9.entry.js → p-2bdc2206.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-f4cc124f.entry.js → p-2c2e5ee6.entry.js} +1 -1
  151. package/dist/zonos-elements/{p-fa0139c3.system.js → p-2c9c750e.system.js} +1 -1
  152. package/dist/zonos-elements/{p-f0855df3.system.js → p-321e7920.system.js} +1 -1
  153. package/dist/zonos-elements/{p-64ad0854.entry.js → p-3d757163.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-13ed3789.js → p-4f23732f.js} +1 -1
  155. package/dist/zonos-elements/{p-48228d76.js → p-57b27c60.js} +1 -1
  156. package/dist/zonos-elements/{p-77c0a02b.entry.js → p-615b5d13.entry.js} +1 -1
  157. package/dist/zonos-elements/{p-e331a235.js → p-620ba943.js} +1 -1
  158. package/dist/zonos-elements/{p-2435f196.entry.js → p-785111e7.entry.js} +1 -1
  159. package/dist/zonos-elements/p-7b294762.system.entry.js +1 -0
  160. package/dist/zonos-elements/p-7fde2d8a.entry.js +1 -0
  161. package/dist/zonos-elements/{p-b334c76c.entry.js → p-8abeab5a.entry.js} +1 -1
  162. package/dist/zonos-elements/{p-a1a3657e.system.entry.js → p-8dfa0bb8.system.entry.js} +1 -1
  163. package/dist/zonos-elements/{p-f25e7f5a.entry.js → p-8efb79ab.entry.js} +1 -1
  164. package/dist/zonos-elements/{p-9d64783a.entry.js → p-920d9189.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-28d62fc8.system.entry.js → p-92d91395.system.entry.js} +1 -1
  166. package/dist/zonos-elements/{p-66e1dc55.entry.js → p-95f7f2a0.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-b08bf843.entry.js → p-97fb5ad5.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-b9581a92.entry.js → p-9ff90151.entry.js} +1 -1
  169. package/dist/zonos-elements/{p-9bc5e944.system.entry.js → p-a0ac3ca2.system.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-7042c6da.system.entry.js → p-a1e23675.system.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-5fceccc3.system.entry.js → p-a5adc047.system.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-5ca50862.system.entry.js → p-a5fb864a.system.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-3827041d.entry.js → p-a95ac160.entry.js} +1 -1
  174. package/dist/zonos-elements/p-ac353826.js +1 -0
  175. package/dist/zonos-elements/{p-d634f954.system.entry.js → p-b37a85f0.system.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-b07da3e8.system.entry.js → p-b49b8da4.system.entry.js} +1 -1
  177. package/dist/zonos-elements/{p-e9ca4447.entry.js → p-bdaf2a38.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-1f63615f.system.entry.js → p-c1ae7391.system.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-85529818.system.entry.js → p-c2121663.system.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-65892fa7.system.js → p-c52b917b.system.js} +1 -1
  181. package/dist/zonos-elements/{p-17fbfda0.system.entry.js → p-c6047442.system.entry.js} +1 -1
  182. package/dist/zonos-elements/p-ca19a10a.js +1 -0
  183. package/dist/zonos-elements/p-cf69bcc4.system.js +1 -0
  184. package/dist/zonos-elements/{p-a026b5ad.system.entry.js → p-d65cfa9b.system.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-d2301d8a.entry.js → p-d8610393.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-a6a401e5.system.entry.js → p-daaaa8f1.system.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-1b56814d.entry.js → p-efa69c89.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-df316670.system.js → p-fbccfa3e.system.js} +1 -1
  189. package/dist/zonos-elements/{p-a1b0e9a5.system.entry.js → p-fce715f1.system.entry.js} +1 -1
  190. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  191. package/package.json +1 -1
  192. package/dist/esm-es5/hasInclusivePrice-c49d384d.js +0 -1
  193. package/dist/esm-es5/localization-f4a7fb5a.js +0 -1
  194. package/dist/zonos-elements/p-1e6509d7.js +0 -1
  195. package/dist/zonos-elements/p-4d5932ac.system.entry.js +0 -1
  196. package/dist/zonos-elements/p-77113201.system.js +0 -1
  197. package/dist/zonos-elements/p-997b7eef.js +0 -1
  198. package/dist/zonos-elements/p-9c6917ab.system.js +0 -1
  199. package/dist/zonos-elements/p-c30a155e.js +0 -1
  200. package/dist/zonos-elements/p-d46484aa.entry.js +0 -1
  201. package/dist/zonos-elements/p-e4d58bd7.js +0 -1
  202. package/dist/zonos-elements/p-fa5767c3.system.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,o,n){function s(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,i){function r(t){try{l(n.next(t))}catch(t){i(t)}}function a(t){try{l(n["throw"](t))}catch(t){i(t)}}function l(t){t.done?o(t.value):s(t.value).then(r,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(n=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;s=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t];s=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{t as throttle_1}from"./throttle-0504ba2c.js";import{b as stripeStore,t as trackConversionEvent,Q as extractName,F as stripeStoreOnChange,q as stripeStorePrefetchLandedCost,d as cartStore}from"./cart-6e465f7b.js";import{s as storageStore,r as getFallbackDefaultCountryCode,t as translate,q as storageStoreOnChange,l as localizationStore}from"./localization-f4a7fb5a.js";import{z as zonosStore,g as getZonosStoreTheme,f as zonosStoreFontFamily}from"./zonosStore-5242a58d.js";import{l as logError,i as isCheckoutMobile,s as sendErrorLog}from"./handleFetch-a844cac1.js";import{a as shouldRenderTaxIdInput,s as shouldRenderShortAddressCodeInput}from"./shouldRenderTaxIdInput-2572bf77.js";import{c as classes}from"./classes-0d95c529.js";import{l as log}from"./VarianceTest-572cecf5.js";import{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./TaxId-50d72254.js";import{g as getBorderRadius}from"./getBorderRadius-c21a42e5.js";import"./debounce-efc0e473.js";import"./isDarkColor-3537021b.js";import"./ShortAddressCode-7620e622.js";var zonosAddressCss=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var ZonosAddressStyle0=zonosAddressCss;var ZonosAddress=function(){function t(t){registerInstance(this,t);this.invalidCharacters=createEvent(this,"invalidCharacters",7);this.taxIdChanged=createEvent(this,"taxIdChanged",7);this.storeUnsubscribeList=[];this.isAutoCompleteAdjusted=false;this.defaultAddress=[];this.taxIdErrorMessage="";this.shortAddressCodeErrorMessage="";this.stripe=window.Zonos.stripe;this.isDirtyAddress=false;this.isAddressFilled=false;this.checkoutSessionId=storageStore.checkoutSessionId;this.prevCountry=null;this.prevPostalCode=null;this.trackingSent=false;this.prefetchLandedCost=throttle_1(stripeStorePrefetchLandedCost,1e3)}t.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:stripeStore.stripeBillingAddressElement,stripeAddressEventData:stripeStore.stripeBillingAddressEventData,stripeElements:stripeStore.stripeElementsForBillingAddress}}return{stripeAddressElement:stripeStore.stripeAddressElement,stripeAddressEventData:stripeStore.stripeAddressEventData,stripeElements:stripeStore.stripeElements}};t.prototype.updateAddressEventData=function(t){var e=t.event,o=t.type;switch(o){case"billing":stripeStore.stripeBillingAddressEventData=e;break;default:{stripeStore.stripeAddressEventData=e;break}}if(o==="shipping"){if(e.value.address.line1.length){void this.prefetchLandedCost()}}};t.prototype.isAddressFilledChanged=function(){if(!storageStore.checkoutSessionId){return}if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.trackingSent=true;var t=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:t,eventName:"checkout_customerInfoFilled"})}};t.prototype.updateAddressElement=function(t){var e=t.stripeAddressElement,o=t.type;if(o==="shipping"){stripeStore.stripeAddressElement=e;return}stripeStore.stripeBillingAddressElement=e};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,o,n,s,i,r,a,l,c;var d=this;return __generator(this,(function(h){this.stripe=window.Zonos.stripe;t=this.getStripeAddressInstance(),e=t.stripeAddressEventData,o=t.stripeElements;if(!this.stripe||!o){logError("Stripe is not initialized. Couldn't load stripe element.");return[2]}n=this.defaultAddress.map((function(t){return Object.assign(Object.assign({},t),{name:t.name,phone:t.phone||undefined})}));s=localizationStore.shippingZoneCountries;i=s?Object.values(s).map((function(t){return t.code})):[];r=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries");a=this.type==="shipping"?i:[];l=(e===null||e===void 0?void 0:e.value.address.country)||getFallbackDefaultCountryCode(a);log("Stripe country code: ".concat(l),"info");c=o.create("address",{allowedCountries:r?[]:a,contacts:n.length&&!e?this.defaultAddress:[],defaultValues:{address:Object.assign(Object.assign({},e===null||e===void 0?void 0:e.value.address),{country:l}),firstName:e===null||e===void 0?void 0:e.value.firstName,lastName:e===null||e===void 0?void 0:e.value.lastName,phone:e===null||e===void 0?void 0:e.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});c.mount(this.el.querySelector(".zonos--address-component"));if(e===null||e===void 0?void 0:e.value.address){this.prevCountry=e.value.address.country;this.prevPostalCode=e.value.address.postal_code}c.on("change",(function(t){var e=t.value;if(!d.isDirtyAddress&&e.address.line1.length>=3){d.isDirtyAddress=true;if(!d.isAutoCompleteAdjusted){var o=d.el.querySelector('iframe[src*="autocomplete-suggestions"]');if(o){o.style.zIndex="3"}d.isAutoCompleteAdjusted=true}setTimeout((function(){if(isCheckoutMobile()){d.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var t=d.type==="shipping"?100:600;var e=d.el.closest(".zonos--group");var o=d.el.getBoundingClientRect().top+t;e===null||e===void 0?void 0:e.scrollTo({behavior:"smooth",top:o})}}),600)}var n=extractName({firstName:e.firstName,lastName:e.lastName,name:e.name}),s=n.firstName,i=n.lastName;d.updateAddressEventData({event:Object.assign(Object.assign({},t),{elementMode:d.type,elementType:"address",value:Object.assign(Object.assign({},e),{firstName:s,lastName:i})}),type:d.type})}));this.updateAddressElement({stripeAddressElement:c,type:this.type});return[2]}))}))};t.prototype.defaultAddressChanged=function(t,e){var o=JSON.stringify(e);var n=JSON.stringify(t);if(o===n){return}log("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});var s=this.getStripeAddressInstance().stripeAddressElement;s===null||s===void 0?void 0:s.clear();s===null||s===void 0?void 0:s.destroy();if(this.type==="shipping"){stripeStore.stripeAddressEventData=null}else{stripeStore.stripeBillingAddressEventData=null}void this.watchInitStripe()};t.prototype.isInTaxIdCountry=function(t){return countryRequireTaxId.includes(t)};t.prototype.renderTaxIdInput=function(){var t=this;var e;if(this.type==="billing"){return null}var o=(e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country;if(!o){return null}if(!this.isInTaxIdCountry(o)){return null}var n=shouldRenderTaxIdInput({companyName:stripeStore.companyName,countryCode:o});if(!n){return null}var s=shipToTaxIdLabels[o];return h("div",{class:"zonos--tax-id-input"},h("zonos-stripe-input",{inputLabel:translate(s.friendlyName),inputPlaceholder:s.placeholder,inputValue:stripeStore.taxId||"",isError:!!this.taxIdErrorMessage,onInputChange:function(e){stripeStore.taxId=e.detail;t.taxIdChanged.emit(e.detail)}}),this.taxIdErrorMessage&&h("zonos-text",{textColor:"red-600",type:"caption"},this.taxIdErrorMessage))};t.prototype.renderShortAddressCodeInput=function(){var t;if(this.type==="billing"){return null}var e=(t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country;if(!e){return null}var o=shouldRenderShortAddressCodeInput({countryCode:e});if(!o){return null}return h("div",{class:"zonos--short-address-code-input"},h("zonos-stripe-input",{inputLabel:translate("Short address code"),inputPlaceholder:"RRRD2929",inputValue:stripeStore.shortAddressCode||"",isError:!!this.shortAddressCodeErrorMessage,onInputChange:function(t){stripeStore.shortAddressCode=t.detail}}),this.shortAddressCodeErrorMessage&&h("zonos-text",{textColor:"red-600",type:"caption"},this.shortAddressCodeErrorMessage))};t.prototype.renderCompanyNameInput=function(){if(this.type==="billing"&&!window.Zonos.isCollect&&!window.Zonos.isInvoice){return null}var t=zonosStore.checkoutSettings.companyFieldsStatus==="ENABLED"||!!window.Zonos.isCollect||!!window.Zonos.isInvoice;if(!t){return null}return h("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:translate("Company name (optional)"),inputValue:stripeStore.companyName,onInputChange:function(t){stripeStore.companyName=t.detail}})};t.prototype.disconnectedCallback=function(){var t=this.getStripeAddressInstance().stripeAddressElement;t===null||t===void 0?void 0:t.destroy();try{this.storeUnsubscribeList.forEach((function(t){return t()}))}catch(t){}};t.prototype.componentDidLoad=function(){var t=this;var e=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!e&&e.value.address.line1.length>0;void this.watchInitStripe();this.checkoutSessionId=storageStore.checkoutSessionId;this.storeUnsubscribeList=[storageStoreOnChange("checkoutSessionId",(function(){t.checkoutSessionId=storageStore.checkoutSessionId})),stripeStoreOnChange("stripeElements",(function(){if(t.type==="shipping"){void t.watchInitStripe()}})),stripeStoreOnChange("stripeElementsForBillingAddress",(function(){if(t.type==="billing"){void t.watchInitStripe()}}))]};t.prototype.render=function(){var t;this.checkoutSessionId=storageStore.checkoutSessionId;if((t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.complete){this.isAddressFilled=true}return h(Host,{key:"5dc571d7c5e706ae9cb90de70deee22847e5ba7e",class:classes(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&h("zonos-text",{key:"a7c9f730bc9b64aa2c6e8cc24701e638481eac19",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("slot",{key:"3078529c201c7947ffc833485d46184bc79ab1d1",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),h("div",{key:"b4a9850ac30ad9c483e05743ff41b7de9756d826",class:"zonos--address-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}},enumerable:false,configurable:true});return t}();ZonosAddress.style=ZonosAddressStyle0;var ExclamationMarkDuotoneIcon='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var HelpDuotoneIcon='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>';var WarningDuotoneIcon='<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var zonosConfirmDialogCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}";var ZonosConfirmDialogStyle0=zonosConfirmDialogCss;var ZonosConfirmDialog=function(){function t(t){var e=this;registerInstance(this,t);this.confirmClicked=createEvent(this,"confirmClicked",7);this.cancelClicked=createEvent(this,"cancelClicked",7);this.dialogTitle=translate("Are you sure?");this.dialogIntent="info";this.dialogSubtitle=null;this.dialogWidth=350;this.dialogType="confirm";this.isMobile=false;this.noClickOutside=false;this.clickOutsideDialogHandler=function(t){if(t.target===t.currentTarget&&!e.noClickOutside){e.closeDialogHandler()}}}t.prototype.handleKeyDown=function(t){if(t.key==="Escape"){this.closeDialogHandler()}};t.prototype.focusDialog=function(){var t=this;if(this.dialogOpen){setTimeout((function(){var e,o;(o=(e=t.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".zonos--backdrop"))===null||o===void 0?void 0:o.focus()}),100)}};t.prototype.confirmDialogHandler=function(){if(!this.dialogOpen){return}this.confirmClicked.emit()};t.prototype.closeDialogHandler=function(){if(!this.dialogOpen){return}this.cancelClicked.emit()};t.prototype.renderIcon=function(){switch(this.dialogIntent){case"info":return h("zonos-icon",{content:HelpDuotoneIcon,iconColor:"blue-800"});case"danger":return h("zonos-icon",{content:ExclamationMarkDuotoneIcon,iconColor:"red-800"});case"warn":return h("zonos-icon",{content:WarningDuotoneIcon,iconColor:"orange-800"})}};t.prototype.getButtonConfirmVariant=function(){switch(this.dialogIntent){case"warn":return"warning";case"danger":return"danger";default:return"primary"}};t.prototype.render=function(){var t=this;this.focusDialog();var e=getBorderRadius();var o=getZonosStoreTheme(zonosStore.appearance.theme);return h(Host,{key:"db0bfe0b8a125e806a97c9382faa938078000349",class:classes([this.dialogOpen&&"open","zonos--elements"]),"data-dialog-type":this.dialogType,"data-theme":o,style:{"--zonos--border-radius":e,"--zonos--dialog-width":"".concat(this.dialogWidth,"px"),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"1676defad54705df4e9282bda6b5734592d0fb60",class:"zonos--backdrop",tabIndex:-1}),h("div",{key:"2a6ec6b5df7ea30304cfed5276e55618b40add93",class:classes(["zonos--confirm-layout",this.dialogIntent]),onClick:function(e){return t.clickOutsideDialogHandler(e)}},h("div",{key:"d1c8358c3fd98c27a469fe7443d1983c1c134a7c",class:"zonos--confirm-dialog",onBlur:function(){t.focusDialog()}},h("div",{key:"137e9659aa7aec2e4604acf80809b35bce69ca79",class:"wrapper"},h("div",{key:"9c1057857ea095e7e88c8950469add2bc4c1318e",class:"icon-wrapper"},this.renderIcon()),h("div",{key:"48f0e0cd9ce62b425bae831d1387261bbd4162a1",class:"content"},h("div",{key:"0d3e681f350e5db547181beadf5c6bcf49a8bbd2",class:"title"},h("zonos-text",{key:"f16a43d2b3c9504911b1e36ba573873f80093c47",type:"subheader"},this.dialogTitle)),this.dialogSubtitle&&h("div",{key:"fd570f98bc736a68c16fedee72b1417dc6906fa6",class:"subtitle"},h("zonos-text",{key:"6785aa19dd44cf7f6fae7317e3924be6c6ee8af3",textColor:"gray-800"},this.dialogSubtitle))),h("div",{key:"4206cad3dcff0055fc5f3ea8e7c217ae33c63263",class:"footer"},this.dialogType==="confirm"&&h("zonos-button",{key:"72d1a216641d482bdbeae384963dcdff1cfc3f45",backgroundColor:"gray-0",class:"cancel-button",onClick:function(){return t.closeDialogHandler()},size:"lg",withBoxShadow:true},this.dialogCancelBtnText||translate("Cancel")),h("zonos-button",{key:"a6a206eff11d1f42c33ef9113cc393d727c60f89",class:"confirm-button",onClick:function(){return t.confirmDialogHandler()},size:"lg",variant:this.getButtonConfirmVariant()},this.dialogConfirmBtnText))))))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosConfirmDialog.style=ZonosConfirmDialogStyle0;var validateEmailValue=function(t){var e=/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/;return e.test(t)};var zonosLinkAuthenticationCss=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";var ZonosLinkAuthenticationStyle0=zonosLinkAuthenticationCss;var MAX_RETRIES_INITIALIZE_LINK=51;var ZonosLinkAuthentication=function(){function t(t){var e=this;registerInstance(this,t);this.linkAuthenticationChange=createEvent(this,"linkAuthenticationChange",7);this.storeUnsubscribeList=[];this.defaultEmail=null;this.isEmailError=false;this.stripe=stripeStore.stripe;this.isStagingMode=cartStore.isStagingMode;this.clientSecret=stripeStore.clientSecret;this.retriesInitializeLink=0;this.setCustomEmailInputToLinkEvent=function(t){var e=validateEmailValue(t);var o={complete:!!e,elementType:"linkAuthentication",empty:!t,value:{email:t}};stripeStore.stripeLinkEventData=o};this.handleNormalEmailInput=function(t){var o;var n=t.detail;e.setCustomEmailInputToLinkEvent(n);(o=e.linkAuthenticationChange)===null||o===void 0?void 0:o.emit()}}t.prototype.watchIsStagingMode=function(){var t=this;setTimeout((function(){void t.watchInitStripe()}),0)};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,o,n;var s=this;return __generator(this,(function(i){switch(i.label){case 0:if(!this.stripe||!stripeStore.stripeElements){return[2]}if(cartStore.isStagingMode||!this.clientSecret){return[2]}t=this.defaultEmail?{email:this.defaultEmail}:undefined;i.label=1;case 1:i.trys.push([1,2,,6]);e=stripeStore.stripeLinkElement||stripeStore.stripeElements.create("linkAuthentication",{defaultValues:t});o=this.el.querySelector(".zonos--link-authentication-component");if(!o){logError("Cannot find container element for linkAuthenticationElement");return[2]}e.mount(o);e.on("change",(function(t){var e;stripeStore.stripeLinkEventData=t;(e=s.linkAuthenticationChange)===null||e===void 0?void 0:e.emit()}));stripeStore.stripeLinkElement=e;this.retriesInitializeLink=0;if(this.retriesInitializeLink>11){log("Stripe link element initialized","info",{retriesInitializeLink:this.retriesInitializeLink,stripe:this.stripe});void sendErrorLog({endpoint:"stripe-link-authentication-init-long-running",errors:["Stripe link element initialized after 20 retries - 10 seconds"],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}return[3,6];case 2:n=i.sent();if(!(n instanceof Error))return[3,5];this.retriesInitializeLink++;if(!(this.retriesInitializeLink<MAX_RETRIES_INITIALIZE_LINK))return[3,4];return[4,new Promise((function(t){return setTimeout(t,500)}))];case 3:i.sent();void this.watchInitStripe();i.label=4;case 4:if(this.retriesInitializeLink===MAX_RETRIES_INITIALIZE_LINK){void sendErrorLog({endpoint:"stripe-link-authentication-init-error",errors:[n.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}i.label=5;case 5:return[3,6];case 6:return[2]}}))}))};t.prototype.watchDefaultEmail=function(t,e){var o,n;log("Default email is changed","info",{newDefaultEmail:t,oldDefaultEmail:e});if(e===t){return}if(!t){stripeStore.stripeLinkEventData=null}if(cartStore.isStagingMode){this.setCustomEmailInputToLinkEvent(t||"");return}(o=stripeStore.stripeLinkElement)===null||o===void 0?void 0:o.clear();(n=stripeStore.stripeLinkElement)===null||n===void 0?void 0:n.destroy();stripeStore.stripeLinkElement=null;stripeStore.stripeLinkEventData=null;log("Reset stripe link element when default email is changed","info",{defaultEmail:t});void this.watchInitStripe()};t.prototype.disconnectedCallback=function(){try{this.storeUnsubscribeList.forEach((function(t){return t()}))}catch(t){}};t.prototype.componentDidLoad=function(){var t=this;this.storeUnsubscribeList=[stripeStoreOnChange("stripeElements",(function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){void this.watchInitStripe();return[2]}))}))})),stripeStoreOnChange("clientSecret",(function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){this.clientSecret=stripeStore.clientSecret;return[2]}))}))})),stripeStoreOnChange("stripe",(function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){this.stripe=stripeStore.stripe;return[2]}))}))}))];void this.watchInitStripe();if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};t.prototype.render=function(){var t=this;this.isStagingMode=cartStore.isStagingMode;this.clientSecret=stripeStore.clientSecret;var e=function(){var e;if(cartStore.isStagingMode){return h("zonos-stripe-input",{inputLabel:translate("Email"),inputValue:t.defaultEmail||((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"",isError:t.isEmailError,onBlur:function(){var e;var o=((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"";if(!o){return}var n=validateEmailValue(o);t.isEmailError=!n},onInputChange:t.handleNormalEmailInput})}return h("div",{class:"zonos--link-authentication-component ".concat(t.isEmailError&&"zonos--input-invalid")})};return h(Host,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":getBorderRadius()}},this.titleText&&h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),e(),this.isEmailError&&h("zonos-text",{textColor:"red-600"},translate("Please enter a valid email address.")))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}},enumerable:false,configurable:true});return t}();ZonosLinkAuthentication.style=ZonosLinkAuthenticationStyle0;var zonosLoadingOverlayCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";var ZonosLoadingOverlayStyle0=zonosLoadingOverlayCss;var ZonosLoadingOverlay=function(){function t(t){registerInstance(this,t);this.open=false;this.size=40}t.prototype.render=function(){return h(Host,{key:"13154a3c9250f15d8dca292f0673c6465bfb15e0",class:classes(["zonos--elements",this.open&&"zonos--open"])},h("div",{key:"4470fccd21e58bd7959ef3e20c8775ac637cace0",class:"zonos--loading-overlay"},h("zonos-spinner",{key:"5b32b821cea982866da56176eeaafd5d8958f25d",size:this.size,spinnerColor:this.spinnerColor})))};return t}();ZonosLoadingOverlay.style=ZonosLoadingOverlayStyle0;export{ZonosAddress as zonos_address,ZonosConfirmDialog as zonos_confirm_dialog,ZonosLinkAuthentication as zonos_link_authentication,ZonosLoadingOverlay as zonos_loading_overlay};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,o,n){function s(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,i){function r(t){try{l(n.next(t))}catch(t){i(t)}}function a(t){try{l(n["throw"](t))}catch(t){i(t)}}function l(t){t.done?o(t.value):s(t.value).then(r,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(n=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;s=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t];s=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{t as throttle_1}from"./throttle-0504ba2c.js";import{b as stripeStore,t as trackConversionEvent,Q as extractName,E as stripeStoreOnChange,q as stripeStorePrefetchLandedCost,d as cartStore}from"./cart-394c9ddb.js";import{s as storageStore,r as getFallbackDefaultCountryCode,t as translate,q as storageStoreOnChange,l as localizationStore}from"./localization-0ebc8356.js";import{z as zonosStore,g as getZonosStoreTheme,f as zonosStoreFontFamily}from"./zonosStore-5242a58d.js";import{l as logError,i as isCheckoutMobile,s as sendErrorLog}from"./handleFetch-a844cac1.js";import{a as shouldRenderTaxIdInput,s as shouldRenderShortAddressCodeInput}from"./shouldRenderTaxIdInput-2572bf77.js";import{c as classes}from"./classes-0d95c529.js";import{l as log}from"./VarianceTest-572cecf5.js";import{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./TaxId-50d72254.js";import{g as getBorderRadius}from"./getBorderRadius-c21a42e5.js";import"./debounce-efc0e473.js";import"./isDarkColor-3537021b.js";import"./ShortAddressCode-7620e622.js";var zonosAddressCss=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var ZonosAddressStyle0=zonosAddressCss;var ZonosAddress=function(){function t(t){registerInstance(this,t);this.invalidCharacters=createEvent(this,"invalidCharacters",7);this.taxIdChanged=createEvent(this,"taxIdChanged",7);this.storeUnsubscribeList=[];this.isAutoCompleteAdjusted=false;this.defaultAddress=[];this.taxIdErrorMessage="";this.shortAddressCodeErrorMessage="";this.stripe=window.Zonos.stripe;this.isDirtyAddress=false;this.isAddressFilled=false;this.checkoutSessionId=storageStore.checkoutSessionId;this.prevCountry=null;this.prevPostalCode=null;this.trackingSent=false;this.prefetchLandedCost=throttle_1(stripeStorePrefetchLandedCost,1e3)}t.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:stripeStore.stripeBillingAddressElement,stripeAddressEventData:stripeStore.stripeBillingAddressEventData,stripeElements:stripeStore.stripeElementsForBillingAddress}}return{stripeAddressElement:stripeStore.stripeAddressElement,stripeAddressEventData:stripeStore.stripeAddressEventData,stripeElements:stripeStore.stripeElements}};t.prototype.updateAddressEventData=function(t){var e=t.event,o=t.type;switch(o){case"billing":stripeStore.stripeBillingAddressEventData=e;break;default:{stripeStore.stripeAddressEventData=e;break}}if(o==="shipping"){if(e.value.address.line1.length){void this.prefetchLandedCost()}}};t.prototype.isAddressFilledChanged=function(){if(!storageStore.checkoutSessionId){return}if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.trackingSent=true;var t=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:t,eventName:"checkout_customerInfoFilled"})}};t.prototype.updateAddressElement=function(t){var e=t.stripeAddressElement,o=t.type;if(o==="shipping"){stripeStore.stripeAddressElement=e;return}stripeStore.stripeBillingAddressElement=e};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,o,n,s,i,r,a,l,c;var d=this;return __generator(this,(function(h){this.stripe=window.Zonos.stripe;t=this.getStripeAddressInstance(),e=t.stripeAddressEventData,o=t.stripeElements;if(!this.stripe||!o){logError("Stripe is not initialized. Couldn't load stripe element.");return[2]}n=this.defaultAddress.map((function(t){return Object.assign(Object.assign({},t),{name:t.name,phone:t.phone||undefined})}));s=localizationStore.shippingZoneCountries;i=s?Object.values(s).map((function(t){return t.code})):[];r=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries");a=this.type==="shipping"?i:[];l=(e===null||e===void 0?void 0:e.value.address.country)||getFallbackDefaultCountryCode(a);log("Stripe country code: ".concat(l),"info");c=o.create("address",{allowedCountries:r?[]:a,contacts:n.length&&!e?this.defaultAddress:[],defaultValues:{address:Object.assign(Object.assign({},e===null||e===void 0?void 0:e.value.address),{country:l}),firstName:e===null||e===void 0?void 0:e.value.firstName,lastName:e===null||e===void 0?void 0:e.value.lastName,phone:e===null||e===void 0?void 0:e.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});c.mount(this.el.querySelector(".zonos--address-component"));if(e===null||e===void 0?void 0:e.value.address){this.prevCountry=e.value.address.country;this.prevPostalCode=e.value.address.postal_code}c.on("change",(function(t){var e=t.value;if(!d.isDirtyAddress&&e.address.line1.length>=3){d.isDirtyAddress=true;if(!d.isAutoCompleteAdjusted){var o=d.el.querySelector('iframe[src*="autocomplete-suggestions"]');if(o){o.style.zIndex="3"}d.isAutoCompleteAdjusted=true}setTimeout((function(){if(isCheckoutMobile()){d.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var t=d.type==="shipping"?100:600;var e=d.el.closest(".zonos--group");var o=d.el.getBoundingClientRect().top+t;e===null||e===void 0?void 0:e.scrollTo({behavior:"smooth",top:o})}}),600)}var n=extractName({firstName:e.firstName,lastName:e.lastName,name:e.name}),s=n.firstName,i=n.lastName;d.updateAddressEventData({event:Object.assign(Object.assign({},t),{elementMode:d.type,elementType:"address",value:Object.assign(Object.assign({},e),{firstName:s,lastName:i})}),type:d.type})}));this.updateAddressElement({stripeAddressElement:c,type:this.type});return[2]}))}))};t.prototype.defaultAddressChanged=function(t,e){var o=JSON.stringify(e);var n=JSON.stringify(t);if(o===n){return}log("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});var s=this.getStripeAddressInstance().stripeAddressElement;s===null||s===void 0?void 0:s.clear();s===null||s===void 0?void 0:s.destroy();if(this.type==="shipping"){stripeStore.stripeAddressEventData=null}else{stripeStore.stripeBillingAddressEventData=null}void this.watchInitStripe()};t.prototype.isInTaxIdCountry=function(t){return countryRequireTaxId.includes(t)};t.prototype.renderTaxIdInput=function(){var t=this;var e;if(this.type==="billing"){return null}var o=(e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country;if(!o){return null}if(!this.isInTaxIdCountry(o)){return null}var n=shouldRenderTaxIdInput({companyName:stripeStore.companyName,countryCode:o});if(!n){return null}var s=shipToTaxIdLabels[o];return h("div",{class:"zonos--tax-id-input"},h("zonos-stripe-input",{inputLabel:translate(s.friendlyName),inputPlaceholder:s.placeholder,inputValue:stripeStore.taxId||"",isError:!!this.taxIdErrorMessage,onInputChange:function(e){stripeStore.taxId=e.detail;t.taxIdChanged.emit(e.detail)}}),this.taxIdErrorMessage&&h("zonos-text",{textColor:"red-600",type:"caption"},this.taxIdErrorMessage))};t.prototype.renderShortAddressCodeInput=function(){var t;if(this.type==="billing"){return null}var e=(t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country;if(!e){return null}var o=shouldRenderShortAddressCodeInput({countryCode:e});if(!o){return null}return h("div",{class:"zonos--short-address-code-input"},h("zonos-stripe-input",{inputLabel:translate("Short address code"),inputPlaceholder:"RRRD2929",inputValue:stripeStore.shortAddressCode||"",isError:!!this.shortAddressCodeErrorMessage,onInputChange:function(t){stripeStore.shortAddressCode=t.detail}}),this.shortAddressCodeErrorMessage&&h("zonos-text",{textColor:"red-600",type:"caption"},this.shortAddressCodeErrorMessage))};t.prototype.renderCompanyNameInput=function(){if(this.type==="billing"&&!window.Zonos.isCollect&&!window.Zonos.isInvoice){return null}var t=zonosStore.checkoutSettings.companyFieldsStatus==="ENABLED"||!!window.Zonos.isCollect||!!window.Zonos.isInvoice;if(!t){return null}return h("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:translate("Company name (optional)"),inputValue:stripeStore.companyName,onInputChange:function(t){stripeStore.companyName=t.detail}})};t.prototype.disconnectedCallback=function(){var t=this.getStripeAddressInstance().stripeAddressElement;t===null||t===void 0?void 0:t.destroy();try{this.storeUnsubscribeList.forEach((function(t){return t()}))}catch(t){}};t.prototype.componentDidLoad=function(){var t=this;var e=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!e&&e.value.address.line1.length>0;void this.watchInitStripe();this.checkoutSessionId=storageStore.checkoutSessionId;this.storeUnsubscribeList=[storageStoreOnChange("checkoutSessionId",(function(){t.checkoutSessionId=storageStore.checkoutSessionId})),stripeStoreOnChange("stripeElements",(function(){if(t.type==="shipping"){void t.watchInitStripe()}})),stripeStoreOnChange("stripeElementsForBillingAddress",(function(){if(t.type==="billing"){void t.watchInitStripe()}}))]};t.prototype.render=function(){var t;this.checkoutSessionId=storageStore.checkoutSessionId;if((t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.complete){this.isAddressFilled=true}return h(Host,{key:"5dc571d7c5e706ae9cb90de70deee22847e5ba7e",class:classes(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&h("zonos-text",{key:"a7c9f730bc9b64aa2c6e8cc24701e638481eac19",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("slot",{key:"3078529c201c7947ffc833485d46184bc79ab1d1",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),h("div",{key:"b4a9850ac30ad9c483e05743ff41b7de9756d826",class:"zonos--address-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}},enumerable:false,configurable:true});return t}();ZonosAddress.style=ZonosAddressStyle0;var ExclamationMarkDuotoneIcon='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var HelpDuotoneIcon='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>';var WarningDuotoneIcon='<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var zonosConfirmDialogCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}";var ZonosConfirmDialogStyle0=zonosConfirmDialogCss;var ZonosConfirmDialog=function(){function t(t){var e=this;registerInstance(this,t);this.confirmClicked=createEvent(this,"confirmClicked",7);this.cancelClicked=createEvent(this,"cancelClicked",7);this.dialogTitle=translate("Are you sure?");this.dialogIntent="info";this.dialogSubtitle=null;this.dialogWidth=350;this.dialogType="confirm";this.isMobile=false;this.noClickOutside=false;this.clickOutsideDialogHandler=function(t){if(t.target===t.currentTarget&&!e.noClickOutside){e.closeDialogHandler()}}}t.prototype.handleKeyDown=function(t){if(t.key==="Escape"){this.closeDialogHandler()}};t.prototype.focusDialog=function(){var t=this;if(this.dialogOpen){setTimeout((function(){var e,o;(o=(e=t.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".zonos--backdrop"))===null||o===void 0?void 0:o.focus()}),100)}};t.prototype.confirmDialogHandler=function(){if(!this.dialogOpen){return}this.confirmClicked.emit()};t.prototype.closeDialogHandler=function(){if(!this.dialogOpen){return}this.cancelClicked.emit()};t.prototype.renderIcon=function(){switch(this.dialogIntent){case"info":return h("zonos-icon",{content:HelpDuotoneIcon,iconColor:"blue-800"});case"danger":return h("zonos-icon",{content:ExclamationMarkDuotoneIcon,iconColor:"red-800"});case"warn":return h("zonos-icon",{content:WarningDuotoneIcon,iconColor:"orange-800"})}};t.prototype.getButtonConfirmVariant=function(){switch(this.dialogIntent){case"warn":return"warning";case"danger":return"danger";default:return"primary"}};t.prototype.render=function(){var t=this;this.focusDialog();var e=getBorderRadius();var o=getZonosStoreTheme(zonosStore.appearance.theme);return h(Host,{key:"db0bfe0b8a125e806a97c9382faa938078000349",class:classes([this.dialogOpen&&"open","zonos--elements"]),"data-dialog-type":this.dialogType,"data-theme":o,style:{"--zonos--border-radius":e,"--zonos--dialog-width":"".concat(this.dialogWidth,"px"),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"1676defad54705df4e9282bda6b5734592d0fb60",class:"zonos--backdrop",tabIndex:-1}),h("div",{key:"2a6ec6b5df7ea30304cfed5276e55618b40add93",class:classes(["zonos--confirm-layout",this.dialogIntent]),onClick:function(e){return t.clickOutsideDialogHandler(e)}},h("div",{key:"d1c8358c3fd98c27a469fe7443d1983c1c134a7c",class:"zonos--confirm-dialog",onBlur:function(){t.focusDialog()}},h("div",{key:"137e9659aa7aec2e4604acf80809b35bce69ca79",class:"wrapper"},h("div",{key:"9c1057857ea095e7e88c8950469add2bc4c1318e",class:"icon-wrapper"},this.renderIcon()),h("div",{key:"48f0e0cd9ce62b425bae831d1387261bbd4162a1",class:"content"},h("div",{key:"0d3e681f350e5db547181beadf5c6bcf49a8bbd2",class:"title"},h("zonos-text",{key:"f16a43d2b3c9504911b1e36ba573873f80093c47",type:"subheader"},this.dialogTitle)),this.dialogSubtitle&&h("div",{key:"fd570f98bc736a68c16fedee72b1417dc6906fa6",class:"subtitle"},h("zonos-text",{key:"6785aa19dd44cf7f6fae7317e3924be6c6ee8af3",textColor:"gray-800"},this.dialogSubtitle))),h("div",{key:"4206cad3dcff0055fc5f3ea8e7c217ae33c63263",class:"footer"},this.dialogType==="confirm"&&h("zonos-button",{key:"72d1a216641d482bdbeae384963dcdff1cfc3f45",backgroundColor:"gray-0",class:"cancel-button",onClick:function(){return t.closeDialogHandler()},size:"lg",withBoxShadow:true},this.dialogCancelBtnText||translate("Cancel")),h("zonos-button",{key:"a6a206eff11d1f42c33ef9113cc393d727c60f89",class:"confirm-button",onClick:function(){return t.confirmDialogHandler()},size:"lg",variant:this.getButtonConfirmVariant()},this.dialogConfirmBtnText))))))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosConfirmDialog.style=ZonosConfirmDialogStyle0;var validateEmailValue=function(t){var e=/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/;return e.test(t)};var zonosLinkAuthenticationCss=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";var ZonosLinkAuthenticationStyle0=zonosLinkAuthenticationCss;var MAX_RETRIES_INITIALIZE_LINK=51;var ZonosLinkAuthentication=function(){function t(t){var e=this;registerInstance(this,t);this.linkAuthenticationChange=createEvent(this,"linkAuthenticationChange",7);this.storeUnsubscribeList=[];this.defaultEmail=null;this.isEmailError=false;this.stripe=stripeStore.stripe;this.isStagingMode=cartStore.isStagingMode;this.clientSecret=stripeStore.clientSecret;this.retriesInitializeLink=0;this.setCustomEmailInputToLinkEvent=function(t){var e=validateEmailValue(t);var o={complete:!!e,elementType:"linkAuthentication",empty:!t,value:{email:t}};stripeStore.stripeLinkEventData=o};this.handleNormalEmailInput=function(t){var o;var n=t.detail;e.setCustomEmailInputToLinkEvent(n);(o=e.linkAuthenticationChange)===null||o===void 0?void 0:o.emit()}}t.prototype.watchIsStagingMode=function(){var t=this;setTimeout((function(){void t.watchInitStripe()}),0)};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,o,n;var s=this;return __generator(this,(function(i){switch(i.label){case 0:if(!this.stripe||!stripeStore.stripeElements){return[2]}if(cartStore.isStagingMode||!this.clientSecret){return[2]}t=this.defaultEmail?{email:this.defaultEmail}:undefined;i.label=1;case 1:i.trys.push([1,2,,6]);e=stripeStore.stripeLinkElement||stripeStore.stripeElements.create("linkAuthentication",{defaultValues:t});o=this.el.querySelector(".zonos--link-authentication-component");if(!o){logError("Cannot find container element for linkAuthenticationElement");return[2]}e.mount(o);e.on("change",(function(t){var e;stripeStore.stripeLinkEventData=t;(e=s.linkAuthenticationChange)===null||e===void 0?void 0:e.emit()}));stripeStore.stripeLinkElement=e;this.retriesInitializeLink=0;if(this.retriesInitializeLink>11){log("Stripe link element initialized","info",{retriesInitializeLink:this.retriesInitializeLink,stripe:this.stripe});void sendErrorLog({endpoint:"stripe-link-authentication-init-long-running",errors:["Stripe link element initialized after 20 retries - 10 seconds"],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}return[3,6];case 2:n=i.sent();if(!(n instanceof Error))return[3,5];this.retriesInitializeLink++;if(!(this.retriesInitializeLink<MAX_RETRIES_INITIALIZE_LINK))return[3,4];return[4,new Promise((function(t){return setTimeout(t,500)}))];case 3:i.sent();void this.watchInitStripe();i.label=4;case 4:if(this.retriesInitializeLink===MAX_RETRIES_INITIALIZE_LINK){void sendErrorLog({endpoint:"stripe-link-authentication-init-error",errors:[n.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}i.label=5;case 5:return[3,6];case 6:return[2]}}))}))};t.prototype.watchDefaultEmail=function(t,e){var o,n;log("Default email is changed","info",{newDefaultEmail:t,oldDefaultEmail:e});if(e===t){return}if(!t){stripeStore.stripeLinkEventData=null}if(cartStore.isStagingMode){this.setCustomEmailInputToLinkEvent(t||"");return}(o=stripeStore.stripeLinkElement)===null||o===void 0?void 0:o.clear();(n=stripeStore.stripeLinkElement)===null||n===void 0?void 0:n.destroy();stripeStore.stripeLinkElement=null;stripeStore.stripeLinkEventData=null;log("Reset stripe link element when default email is changed","info",{defaultEmail:t});void this.watchInitStripe()};t.prototype.disconnectedCallback=function(){try{this.storeUnsubscribeList.forEach((function(t){return t()}))}catch(t){}};t.prototype.componentDidLoad=function(){var t=this;this.storeUnsubscribeList=[stripeStoreOnChange("stripeElements",(function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){void this.watchInitStripe();return[2]}))}))})),stripeStoreOnChange("clientSecret",(function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){this.clientSecret=stripeStore.clientSecret;return[2]}))}))})),stripeStoreOnChange("stripe",(function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){this.stripe=stripeStore.stripe;return[2]}))}))}))];void this.watchInitStripe();if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};t.prototype.render=function(){var t=this;this.isStagingMode=cartStore.isStagingMode;this.clientSecret=stripeStore.clientSecret;var e=function(){var e;if(cartStore.isStagingMode){return h("zonos-stripe-input",{inputLabel:translate("Email"),inputValue:t.defaultEmail||((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"",isError:t.isEmailError,onBlur:function(){var e;var o=((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"";if(!o){return}var n=validateEmailValue(o);t.isEmailError=!n},onInputChange:t.handleNormalEmailInput})}return h("div",{class:"zonos--link-authentication-component ".concat(t.isEmailError&&"zonos--input-invalid")})};return h(Host,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":getBorderRadius()}},this.titleText&&h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),e(),this.isEmailError&&h("zonos-text",{textColor:"red-600"},translate("Please enter a valid email address.")))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}},enumerable:false,configurable:true});return t}();ZonosLinkAuthentication.style=ZonosLinkAuthenticationStyle0;var zonosLoadingOverlayCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";var ZonosLoadingOverlayStyle0=zonosLoadingOverlayCss;var ZonosLoadingOverlay=function(){function t(t){registerInstance(this,t);this.open=false;this.size=40}t.prototype.render=function(){return h(Host,{key:"13154a3c9250f15d8dca292f0673c6465bfb15e0",class:classes(["zonos--elements",this.open&&"zonos--open"])},h("div",{key:"4470fccd21e58bd7959ef3e20c8775ac637cace0",class:"zonos--loading-overlay"},h("zonos-spinner",{key:"5b32b821cea982866da56176eeaafd5d8958f25d",size:this.size,spinnerColor:this.spinnerColor})))};return t}();ZonosLoadingOverlay.style=ZonosLoadingOverlayStyle0;export{ZonosAddress as zonos_address,ZonosConfirmDialog as zonos_confirm_dialog,ZonosLinkAuthentication as zonos_link_authentication,ZonosLoadingOverlay as zonos_loading_overlay};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,o,e,n){function a(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,s){function i(t){try{c(n.next(t))}catch(t){s(t)}}function r(t){try{c(n["throw"](t))}catch(t){s(t)}}function c(t){t.done?e(t.value):a(t.value).then(i,r)}c((n=n.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(t){return function(o){return c([t,o])}}function c(r){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(e=0)),e)try{if(n=1,a&&(s=r[0]&2?a["return"]:r[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,r[1])).done)return s;if(a=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;a=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){e.label=r[1];break}if(r[0]===6&&e.label<s[1]){e.label=s[1];s=r;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(r);break}if(s[2])e.ops.pop();e.trys.pop();continue}r=o.call(t,e)}catch(t){r=[6,t];a=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,o,e){if(e||arguments.length===2)for(var n=0,a=o.length,s;n<a;n++){if(s||!(n in o)){if(!s)s=Array.prototype.slice.call(o,0,n);s[n]=o[n]}}return t.concat(s||Array.prototype.slice.call(o))};import{r as registerInstance,h,a as Host,g as getElement,d as createEvent}from"./index-cfd394c8.js";import{f as zonosStoreFontFamily}from"./zonosStore-5242a58d.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-c21a42e5.js";import{b as stripeStore,t as trackConversionEvent}from"./cart-6e465f7b.js";import{s as storageStore}from"./localization-f4a7fb5a.js";import{l as logError}from"./handleFetch-a844cac1.js";import{d as paypalStoreInitButtons,e as paypalStoreOnChange}from"./paypal-6af6b978.js";import{l as log}from"./VarianceTest-572cecf5.js";import"./isDarkColor-3537021b.js";import"./isContrastColor-c17e83c9.js";import"./submitGtag-13de9f1f.js";var zonosCardCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";var ZonosCardStyle0=zonosCardCss;var ZonosCard=function(){function t(t){registerInstance(this,t);this.borderRadius=6;this.spacing="24px"}t.prototype.render=function(){var t=this.backgroundColor?"var(--zonos-elements-".concat(this.backgroundColor,")"):"transparent";var o=getBorderRadius({customRoundRadius:"".concat(this.borderRadius,"px"),overrideBorderStyle:"ROUNDED"});return h(Host,{key:"8832966776c626c783e771fb7f9a773d2539e07f",style:{"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"89c9af9275ca5b01f658081fefb7756bfcbf6d58",class:classes(["styled-card"]),style:{"--zonos--background-color":t,"--zonos--border-radius":o,padding:this.spacing}},this.label&&h("header",{key:"3da688655c5a9af66397525d02224dbc431d00d0",class:"card-header",style:{padding:this.spacing}},h("zonos-text",{key:"8e9524d26e5a0a7e3149b4008efd02b5a7b9ebc6",type:"subheader"},this.label),h("h-stack",{key:"f7298bbb158686b03b2a09f5d6c089c0f4d144c4",spacing:8},this.actions)),h("slot",{key:"24888347ff25ffd21b416da4f5aae493f8044638"}),(this.footerActions||this.footerContent)&&h("footer",{key:"b6792e7345b87e9407585ed4558c7327ea3eab36",class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},h("div",{key:"70ccde8e9b1988db1ba477efea5b44e812a7514d"},this.footerContent),h("h-stack",{key:"4e48425e9db7031d779da7061f0b2d92b27869a0",spacing:8},this.footerActions))))};return t}();ZonosCard.style=ZonosCardStyle0;var PaymentEmptyStateDarkIcon='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>\n</mask>\n<g mask="url(#mask0_3739_19124)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var PaymentEmptyStateLightIcon='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>\n</mask>\n<g mask="url(#mask0_3739_19125)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var zonosEmptyStatePaymentCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;position:relative}:host zonos-text{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host svg{width:var(--zonos--width);height:var(--zonos--height)}";var ZonosEmptyStatePaymentStyle0=zonosEmptyStatePaymentCss;var ZonosEmptyStatePayment=function(){function t(t){registerInstance(this,t);this.theme="LIGHT"}t.prototype.render=function(){if(!this.el.shadowRoot){return null}if(this.theme==="DARK"){this.el.shadowRoot.innerHTML=PaymentEmptyStateDarkIcon}else{this.el.shadowRoot.innerHTML=PaymentEmptyStateLightIcon}return h(Host,{class:"zonos--elements",style:{"--zonos--font-family":zonosStoreFontFamily(),"--zonos--height":"100%","--zonos--width":"100%"}},h("zonos-text",{type:"semiBoldLabel"},this.emptyStateText))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosEmptyStatePayment.style=ZonosEmptyStatePaymentStyle0;var zonosNotificationCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";var ZonosNotificationStyle0=zonosNotificationCss;var ZonosNotification=function(){function t(t){registerInstance(this,t);this.notificationArray=[]}t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var o,e;var n=this;return __generator(this,(function(a){o="id-".concat(Math.random().toString(36).substring(2,9));e=Object.assign(Object.assign({},t),{id:o,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[e],false);setTimeout((function(){n.updateTransitionClass({id:o,transitionClass:"show"})}),50);setTimeout((function(){n.removeNotification(o)}),e.timeout);return[2]}))}))};t.prototype.updateTransitionClass=function(t){var o=t.id,e=t.transitionClass;this.notificationArray=this.notificationArray.map((function(t){if(t.id===o){return Object.assign(Object.assign({},t),{transitionClass:e})}return t}))};t.prototype.removeNotification=function(t){var o=this;this.updateTransitionClass({id:t,transitionClass:""});setTimeout((function(){o.notificationArray=o.notificationArray.filter((function(o){return o.id!==t}))}),300)};t.prototype.render=function(){var t=this;return h(Host,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:classes(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((function(o){return h("div",{"aria-hidden":"true",class:classes(["zonos--notification-item",o.type,o.transitionClass]),key:o.id,onClick:function(){t.removeNotification(o.id)}},h("zonos-text",{textColor:"gray-0"},o.message))}))))};return t}();ZonosNotification.style=ZonosNotificationStyle0;var zonosPaymentCss=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";var ZonosPaymentStyle0=zonosPaymentCss;var ZonosPayment=function(){function t(t){registerInstance(this,t);this.stripe=stripeStore.stripe;this.stripeElements=stripeStore.stripeElements;this.isPaymentInfoFilled=false;this.trackingSent=false}t.prototype.watchIsPaymentInfoFilled=function(){var t;if(this.isPaymentInfoFilled&&!this.trackingSent){var o=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:o,eventName:"checkout_paymentInfoFilled",metadata:{paymentMethod:(t=stripeStore.stripePaymentEventData)===null||t===void 0?void 0:t.value.type}});this.trackingSent=true}};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,o,e;var n=this;return __generator(this,(function(a){switch(a.label){case 0:if(!this.stripeElements){return[2]}return[4,this.stripeElements.fetchUpdates()];case 1:a.sent();o=stripeStore.stripePaymentElement||this.stripeElements.create("payment",{defaultValues:{billingDetails:{address:{country:(t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country}}},layout:"tabs"});e=this.el.querySelector(".zonos--payment-component");if(!e){logError("Cannot find container element for paymentElement");return[2]}o.mount(e);o.on("change",(function(t){if(t.complete){n.isPaymentInfoFilled=true}stripeStore.stripePaymentEventData=t}));stripeStore.stripePaymentElement=o;return[2]}}))}))};t.prototype.componentDidLoad=function(){void this.watchInitStripe()};t.prototype.render=function(){return h(Host,{key:"1fb61e01184d3a0b2dc079ae468e96175d9f6518",class:"zonos--payment zonos--elements"},this.titleText&&h("zonos-text",{key:"3860ff7fc2656ff045ce09c0de2e14aa7a22e194",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"3cabad9c095f2eeba8cfc464374ca9abfc2af5ee",class:"zonos--payment-component"}),h("div",{key:"9e2b13a0d8131a5513f99e2a6436ca3c5f03d7cf",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isPaymentInfoFilled:["watchIsPaymentInfoFilled"],stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}();ZonosPayment.style=ZonosPaymentStyle0;var zonosPaypalPaymentCss=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";var ZonosPaypalPaymentStyle0=zonosPaypalPaymentCss;var ZonosPaypalPayment=function(){function t(t){registerInstance(this,t);this.paypalSessionDone=createEvent(this,"paypalSessionDone",7);this.paypalSessionFail=createEvent(this,"paypalSessionFail",7);this.storeUnsubscribeList=[]}t.prototype.loadPaypal=function(){return __awaiter(this,void 0,void 0,(function(){var t,o;var e=this;return __generator(this,(function(n){if(!window.Zonos.paypal){log("Paypal is not available");return[2]}t=paypalStoreInitButtons({onPaypalFail:function(){log("onPaypalFail");e.paypalSessionFail.emit()},onPaypalSessionDone:function(t){var o=t.orderId;log("onPaypalSessionDone","info",{orderId:o});e.paypalSessionDone.emit({orderId:o})}});if(!(t===null||t===void 0?void 0:t.length)){log("There are no paypal buttons available");return[2]}o=this.el.querySelector(".zonos--payment-paypal-container");if(!o){log("Cannot find container element for paypal buttons");return[2]}t.forEach((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,t.render(o)];case 1:e.sent();return[2]}}))}))}));return[2]}))}))};t.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[paypalStoreOnChange("paypal",this.loadPaypal.bind(this))]};t.prototype.componentDidLoad=function(){void this.loadPaypal()};t.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(t){return t()}))};t.prototype.render=function(){return h(Host,{key:"35387382aaa81e3f8e025e8f3503be41b86e2355",class:"zonos--paypal-payment zonos--elements"},h("div",{key:"34fad15dee67d8b913071a59d35b1c2317d4d3a0",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosPaypalPayment.style=ZonosPaypalPaymentStyle0;export{ZonosCard as zonos_card,ZonosEmptyStatePayment as zonos_empty_state_payment,ZonosNotification as zonos_notification,ZonosPayment as zonos_payment,ZonosPaypalPayment as zonos_paypal_payment};
1
+ var __awaiter=this&&this.__awaiter||function(t,o,e,n){function a(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,s){function i(t){try{c(n.next(t))}catch(t){s(t)}}function r(t){try{c(n["throw"](t))}catch(t){s(t)}}function c(t){t.done?e(t.value):a(t.value).then(i,r)}c((n=n.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(t){return function(o){return c([t,o])}}function c(r){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(e=0)),e)try{if(n=1,a&&(s=r[0]&2?a["return"]:r[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,r[1])).done)return s;if(a=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;a=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){e.label=r[1];break}if(r[0]===6&&e.label<s[1]){e.label=s[1];s=r;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(r);break}if(s[2])e.ops.pop();e.trys.pop();continue}r=o.call(t,e)}catch(t){r=[6,t];a=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,o,e){if(e||arguments.length===2)for(var n=0,a=o.length,s;n<a;n++){if(s||!(n in o)){if(!s)s=Array.prototype.slice.call(o,0,n);s[n]=o[n]}}return t.concat(s||Array.prototype.slice.call(o))};import{r as registerInstance,h,a as Host,g as getElement,d as createEvent}from"./index-cfd394c8.js";import{f as zonosStoreFontFamily}from"./zonosStore-5242a58d.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-c21a42e5.js";import{b as stripeStore,t as trackConversionEvent}from"./cart-394c9ddb.js";import{s as storageStore}from"./localization-0ebc8356.js";import{l as logError}from"./handleFetch-a844cac1.js";import{d as paypalStoreInitButtons,e as paypalStoreOnChange}from"./paypal-b6fa3ec3.js";import{l as log}from"./VarianceTest-572cecf5.js";import"./isDarkColor-3537021b.js";import"./isContrastColor-c17e83c9.js";import"./submitGtag-13de9f1f.js";var zonosCardCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";var ZonosCardStyle0=zonosCardCss;var ZonosCard=function(){function t(t){registerInstance(this,t);this.borderRadius=6;this.spacing="24px"}t.prototype.render=function(){var t=this.backgroundColor?"var(--zonos-elements-".concat(this.backgroundColor,")"):"transparent";var o=getBorderRadius({customRoundRadius:"".concat(this.borderRadius,"px"),overrideBorderStyle:"ROUNDED"});return h(Host,{key:"8832966776c626c783e771fb7f9a773d2539e07f",style:{"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"89c9af9275ca5b01f658081fefb7756bfcbf6d58",class:classes(["styled-card"]),style:{"--zonos--background-color":t,"--zonos--border-radius":o,padding:this.spacing}},this.label&&h("header",{key:"3da688655c5a9af66397525d02224dbc431d00d0",class:"card-header",style:{padding:this.spacing}},h("zonos-text",{key:"8e9524d26e5a0a7e3149b4008efd02b5a7b9ebc6",type:"subheader"},this.label),h("h-stack",{key:"f7298bbb158686b03b2a09f5d6c089c0f4d144c4",spacing:8},this.actions)),h("slot",{key:"24888347ff25ffd21b416da4f5aae493f8044638"}),(this.footerActions||this.footerContent)&&h("footer",{key:"b6792e7345b87e9407585ed4558c7327ea3eab36",class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},h("div",{key:"70ccde8e9b1988db1ba477efea5b44e812a7514d"},this.footerContent),h("h-stack",{key:"4e48425e9db7031d779da7061f0b2d92b27869a0",spacing:8},this.footerActions))))};return t}();ZonosCard.style=ZonosCardStyle0;var PaymentEmptyStateDarkIcon='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>\n</mask>\n<g mask="url(#mask0_3739_19124)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var PaymentEmptyStateLightIcon='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>\n</mask>\n<g mask="url(#mask0_3739_19125)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var zonosEmptyStatePaymentCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;position:relative}:host zonos-text{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host svg{width:var(--zonos--width);height:var(--zonos--height)}";var ZonosEmptyStatePaymentStyle0=zonosEmptyStatePaymentCss;var ZonosEmptyStatePayment=function(){function t(t){registerInstance(this,t);this.theme="LIGHT"}t.prototype.render=function(){if(!this.el.shadowRoot){return null}if(this.theme==="DARK"){this.el.shadowRoot.innerHTML=PaymentEmptyStateDarkIcon}else{this.el.shadowRoot.innerHTML=PaymentEmptyStateLightIcon}return h(Host,{class:"zonos--elements",style:{"--zonos--font-family":zonosStoreFontFamily(),"--zonos--height":"100%","--zonos--width":"100%"}},h("zonos-text",{type:"semiBoldLabel"},this.emptyStateText))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosEmptyStatePayment.style=ZonosEmptyStatePaymentStyle0;var zonosNotificationCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";var ZonosNotificationStyle0=zonosNotificationCss;var ZonosNotification=function(){function t(t){registerInstance(this,t);this.notificationArray=[]}t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var o,e;var n=this;return __generator(this,(function(a){o="id-".concat(Math.random().toString(36).substring(2,9));e=Object.assign(Object.assign({},t),{id:o,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[e],false);setTimeout((function(){n.updateTransitionClass({id:o,transitionClass:"show"})}),50);setTimeout((function(){n.removeNotification(o)}),e.timeout);return[2]}))}))};t.prototype.updateTransitionClass=function(t){var o=t.id,e=t.transitionClass;this.notificationArray=this.notificationArray.map((function(t){if(t.id===o){return Object.assign(Object.assign({},t),{transitionClass:e})}return t}))};t.prototype.removeNotification=function(t){var o=this;this.updateTransitionClass({id:t,transitionClass:""});setTimeout((function(){o.notificationArray=o.notificationArray.filter((function(o){return o.id!==t}))}),300)};t.prototype.render=function(){var t=this;return h(Host,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:classes(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((function(o){return h("div",{"aria-hidden":"true",class:classes(["zonos--notification-item",o.type,o.transitionClass]),key:o.id,onClick:function(){t.removeNotification(o.id)}},h("zonos-text",{textColor:"gray-0"},o.message))}))))};return t}();ZonosNotification.style=ZonosNotificationStyle0;var zonosPaymentCss=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";var ZonosPaymentStyle0=zonosPaymentCss;var ZonosPayment=function(){function t(t){registerInstance(this,t);this.stripe=stripeStore.stripe;this.stripeElements=stripeStore.stripeElements;this.isPaymentInfoFilled=false;this.trackingSent=false}t.prototype.watchIsPaymentInfoFilled=function(){var t;if(this.isPaymentInfoFilled&&!this.trackingSent){var o=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:o,eventName:"checkout_paymentInfoFilled",metadata:{paymentMethod:(t=stripeStore.stripePaymentEventData)===null||t===void 0?void 0:t.value.type}});this.trackingSent=true}};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,o,e;var n=this;return __generator(this,(function(a){switch(a.label){case 0:if(!this.stripeElements){return[2]}return[4,this.stripeElements.fetchUpdates()];case 1:a.sent();o=stripeStore.stripePaymentElement||this.stripeElements.create("payment",{defaultValues:{billingDetails:{address:{country:(t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country}}},layout:"tabs"});e=this.el.querySelector(".zonos--payment-component");if(!e){logError("Cannot find container element for paymentElement");return[2]}o.mount(e);o.on("change",(function(t){if(t.complete){n.isPaymentInfoFilled=true}stripeStore.stripePaymentEventData=t}));stripeStore.stripePaymentElement=o;return[2]}}))}))};t.prototype.componentDidLoad=function(){void this.watchInitStripe()};t.prototype.render=function(){return h(Host,{key:"1fb61e01184d3a0b2dc079ae468e96175d9f6518",class:"zonos--payment zonos--elements"},this.titleText&&h("zonos-text",{key:"3860ff7fc2656ff045ce09c0de2e14aa7a22e194",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"3cabad9c095f2eeba8cfc464374ca9abfc2af5ee",class:"zonos--payment-component"}),h("div",{key:"9e2b13a0d8131a5513f99e2a6436ca3c5f03d7cf",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isPaymentInfoFilled:["watchIsPaymentInfoFilled"],stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}();ZonosPayment.style=ZonosPaymentStyle0;var zonosPaypalPaymentCss=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";var ZonosPaypalPaymentStyle0=zonosPaypalPaymentCss;var ZonosPaypalPayment=function(){function t(t){registerInstance(this,t);this.paypalSessionDone=createEvent(this,"paypalSessionDone",7);this.paypalSessionFail=createEvent(this,"paypalSessionFail",7);this.storeUnsubscribeList=[]}t.prototype.loadPaypal=function(){return __awaiter(this,void 0,void 0,(function(){var t,o;var e=this;return __generator(this,(function(n){if(!window.Zonos.paypal){log("Paypal is not available");return[2]}t=paypalStoreInitButtons({onPaypalFail:function(){log("onPaypalFail");e.paypalSessionFail.emit()},onPaypalSessionDone:function(t){var o=t.orderId;log("onPaypalSessionDone","info",{orderId:o});e.paypalSessionDone.emit({orderId:o})}});if(!(t===null||t===void 0?void 0:t.length)){log("There are no paypal buttons available");return[2]}o=this.el.querySelector(".zonos--payment-paypal-container");if(!o){log("Cannot find container element for paypal buttons");return[2]}t.forEach((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,t.render(o)];case 1:e.sent();return[2]}}))}))}));return[2]}))}))};t.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[paypalStoreOnChange("paypal",this.loadPaypal.bind(this))]};t.prototype.componentDidLoad=function(){void this.loadPaypal()};t.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(t){return t()}))};t.prototype.render=function(){return h(Host,{key:"35387382aaa81e3f8e025e8f3503be41b86e2355",class:"zonos--paypal-payment zonos--elements"},h("div",{key:"34fad15dee67d8b913071a59d35b1c2317d4d3a0",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosPaypalPayment.style=ZonosPaypalPaymentStyle0;export{ZonosCard as zonos_card,ZonosEmptyStatePayment as zonos_empty_state_payment,ZonosNotification as zonos_notification,ZonosPayment as zonos_payment,ZonosPaypalPayment as zonos_paypal_payment};